Fixes
This commit is contained in:
@@ -62,17 +62,15 @@ bool menuRadioDiagAnalogs(event_t event)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(HARDWARE_TOUCH)
|
#if defined(HARDWARE_TOUCH)
|
||||||
if (touchGT911Flag) {
|
if (!touchGT911Flag) {
|
||||||
lcdDrawText(MENUS_MARGIN_LEFT, MENU_CONTENT_TOP + 7 * FH, "Touch panel:");
|
lcdDrawText(MENUS_MARGIN_LEFT, MENU_CONTENT_TOP + 7 * FH, "Touch panel:");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (touchPanelEvent) {
|
if (touchPanelEvent) {
|
||||||
uint8_t tmp,mode = 0;
|
touchPanelRead();
|
||||||
gt911ReadRegister(GT911_READ_XY_REG,&mode,1); //read status
|
|
||||||
lcdDrawNumber(lcdNextPos + 1, MENU_CONTENT_TOP + 7 * FH, touchState.x);
|
lcdDrawNumber(lcdNextPos + 1, MENU_CONTENT_TOP + 7 * FH, touchState.x);
|
||||||
lcdDrawText(MENUS_MARGIN_LEFT, MENU_CONTENT_TOP + 7 * FH, ", ");
|
lcdDrawText(MENUS_MARGIN_LEFT, MENU_CONTENT_TOP + 7 * FH, ", ");
|
||||||
lcdDrawNumber(lcdNextPos + 1, MENU_CONTENT_TOP + 7 * FH, touchState.y);
|
lcdDrawNumber(lcdNextPos + 1, MENU_CONTENT_TOP + 7 * FH, touchState.y);
|
||||||
gt911WriteRegister(GT911_CLEARBUF_REG, &tmp, 1);
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ extern uint8_t touchPanelEvent;
|
|||||||
|
|
||||||
uint8_t gt911WriteRegister(uint16_t reg, uint8_t * buf, uint8_t len);
|
uint8_t gt911WriteRegister(uint16_t reg, uint8_t * buf, uint8_t len);
|
||||||
void gt911ReadRegister(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
|
//GT911 param table
|
||||||
const uint8_t GT911_Cfg[]= //
|
const uint8_t GT911_Cfg[]= //
|
||||||
|
|||||||
Reference in New Issue
Block a user