fix touch slide deltaX/deltaY not resetting

This commit is contained in:
gagarinlg
2021-11-22 11:44:12 +10:00
committed by Peter Feerick
parent 3e9a6b79d3
commit 22112de372
2 changed files with 6 additions and 1 deletions
+2
View File
@@ -745,6 +745,8 @@ struct TouchState touchPanelRead()
RTOS_WAIT_MS(1);
} while(RTOS_GET_MS() - startReadStatus < GT911_TIMEOUT);
internalTouchState.deltaX = 0;
internalTouchState.deltaY = 0;
TRACE("touch state = 0x%x", state);
if (state & 0x80u) {
uint8_t pointsCount = (state & 0x0Fu);
+4 -1
View File
@@ -550,5 +550,8 @@ TouchState touchPanelRead()
internalTouchState.event = TE_SLIDE_END;
}
}
return internalTouchState;
TouchState ret = internalTouchState;
internalTouchState.deltaX = 0;
internalTouchState.deltaY = 0;
return ret;
}