Catch press and hold state
This commit is contained in:
@@ -524,7 +524,7 @@ void touchPanelRead()
|
|||||||
|
|
||||||
if (ft6x06_TS_DetectTouch(TOUCH_FT6236_I2C_ADDRESS)) {
|
if (ft6x06_TS_DetectTouch(TOUCH_FT6236_I2C_ADDRESS)) {
|
||||||
handleTouch();
|
handleTouch();
|
||||||
if (touchState.event == TE_DOWN)
|
if (touchState.event == TE_DOWN && downTime == 0)
|
||||||
downTime = now;
|
downTime = now;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -537,9 +537,11 @@ void touchPanelRead()
|
|||||||
tapCount++;
|
tapCount++;
|
||||||
touchState.tapCount = tapCount;
|
touchState.tapCount = tapCount;
|
||||||
tapTime = now;
|
tapTime = now;
|
||||||
|
} else {
|
||||||
|
touchState.tapCount = 0; //not a tap
|
||||||
}
|
}
|
||||||
}
|
downTime = 0;
|
||||||
else {
|
} else {
|
||||||
touchState.x = LCD_WIDTH;
|
touchState.x = LCD_WIDTH;
|
||||||
touchState.y = LCD_HEIGHT;
|
touchState.y = LCD_HEIGHT;
|
||||||
touchState.event = TE_SLIDE_END;
|
touchState.event = TE_SLIDE_END;
|
||||||
|
|||||||
Reference in New Issue
Block a user