-
Notifications
You must be signed in to change notification settings - Fork 6
/
TestHyperPixelTouchScreen.cpp
45 lines (37 loc) · 1.1 KB
/
TestHyperPixelTouchScreen.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*
* TestHyperPixelTouchScreen.cpp
*
* Created on: 22 Jul 2018
* Author: andrewcapon
*/
#include <unistd.h>
#include "TestHyperPixelTouchScreen.h"
#include "HyperPixelTouchScreen.h"
TestHyperPixelTouchScreen::TestHyperPixelTouchScreen()
{
}
TestHyperPixelTouchScreen::~TestHyperPixelTouchScreen()
{
}
void TestHyperPixelTouchScreen::TouchBegin(TouchEvent &touchEvent)
{
printf("TouchBegin(%u)(%d) = (%d, %d)\n", touchEvent.GetTouchId(), touchEvent.GetInitialArea(), touchEvent.GetX(), touchEvent.GetY());
}
void TestHyperPixelTouchScreen::TouchEnd(TouchEvent &touchEvent)
{
printf("TouchEnd(%u)(%d) = (%d, %d)\n", touchEvent.GetTouchId(), touchEvent.GetInitialArea(), touchEvent.GetX(), touchEvent.GetY());
}
void TestHyperPixelTouchScreen::TouchMove(TouchEvent &touchEvent)
{
printf("TouchMove(%u)(%d) = (%d, %d)\n", touchEvent.GetTouchId(), touchEvent.GetInitialArea(), touchEvent.GetX(), touchEvent.GetY());
}
void TestHyperPixelTouchScreen::StartTest(void)
{
HyperPixelTouchScreen touchScreen(0, true);
if(touchScreen.IsConnected())
for(;;)
{
touchScreen.Process(this);
usleep(1000);
}
}