This commit is contained in:
3djc
2020-04-25 13:43:51 +02:00
parent b61691df1d
commit 541b5e8f3c
2 changed files with 3 additions and 5 deletions
+2 -4
View File
@@ -62,17 +62,15 @@ bool menuRadioDiagAnalogs(event_t event)
#endif
#if defined(HARDWARE_TOUCH)
if (touchGT911Flag) {
if (!touchGT911Flag) {
lcdDrawText(MENUS_MARGIN_LEFT, MENU_CONTENT_TOP + 7 * FH, "Touch panel:");
}
if (touchPanelEvent) {
uint8_t tmp,mode = 0;
gt911ReadRegister(GT911_READ_XY_REG,&mode,1); //read status
touchPanelRead();
lcdDrawNumber(lcdNextPos + 1, MENU_CONTENT_TOP + 7 * FH, touchState.x);
lcdDrawText(MENUS_MARGIN_LEFT, MENU_CONTENT_TOP + 7 * FH, ", ");
lcdDrawNumber(lcdNextPos + 1, MENU_CONTENT_TOP + 7 * FH, touchState.y);
gt911WriteRegister(GT911_CLEARBUF_REG, &tmp, 1);
}
#endif
+1 -1
View File
@@ -36,7 +36,7 @@ extern uint8_t touchPanelEvent;
uint8_t gt911WriteRegister(uint16_t reg, uint8_t * buf, uint8_t len);
void gt911ReadRegister(uint16_t reg, uint8_t * buf, uint8_t len);
void touchPanelRead();
//GT911 param table
const uint8_t GT911_Cfg[]= //