From eb7ca618c72d0985927c296b4b8b1e5d1ada4c9f Mon Sep 17 00:00:00 2001 From: gemu2015 Date: Mon, 19 Aug 2019 13:38:14 +0200 Subject: [PATCH] display update --- sonoff/my_user_config.h | 5 ----- sonoff/xdsp_08_ILI9488.ino | 5 ++++- sonoff/xdsp_10_RA8876.ino | 5 ++++- sonoff/xsns_45_vl53l0x.ino | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/sonoff/my_user_config.h b/sonoff/my_user_config.h index 702639947..869208675 100644 --- a/sonoff/my_user_config.h +++ b/sonoff/my_user_config.h @@ -534,9 +534,4 @@ #error "Select either USE_DISCOVERY or USE_MQTT_AWS_IOT, mDNS takes too much code space and is not needed for AWS IoT" #endif -#define USE_DISPLAY_ILI9488 -#define USE_DISPLAY -#define USE_SPI -#define USE_DISPLAY_ILI9488 - #endif // _MY_USER_CONFIG_H_ diff --git a/sonoff/xdsp_08_ILI9488.ino b/sonoff/xdsp_08_ILI9488.ino index ab37962cf..e4f6fc235 100644 --- a/sonoff/xdsp_08_ILI9488.ino +++ b/sonoff/xdsp_08_ILI9488.ino @@ -122,12 +122,12 @@ void ILI9488_InitDriver() } } +#ifdef USE_TOUCH_BUTTONS void ILI9488_MQTT(uint8_t count,const char *cp) { snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"" D_JSON_TIME "\":\"%s\""), GetDateAndTime(DT_LOCAL).c_str()); snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"RA8876\":{\"%s%d\":\"%d\"}}"), mqtt_data,cp,count+1,(buttons[count]->vpower&0x80)>>7); MqttPublishPrefixTopic_P(TELE, PSTR(D_RSLT_SENSOR), Settings.flag.mqtt_sensor_retain); } - // check digitizer hit void FT6236Check() { uint16_t temp; @@ -210,6 +210,7 @@ if (2 == ctouch_counter) { } } } +#endif // USE_TOUCH_BUTTONS /*********************************************************************************************/ /*********************************************************************************************\ * Interface @@ -228,7 +229,9 @@ bool Xdsp08(byte function) result = true; break; case FUNC_DISPLAY_EVERY_50_MSECOND: +#ifdef USE_TOUCH_BUTTONS if (FT6236_found) FT6236Check(); +#endif break; } } diff --git a/sonoff/xdsp_10_RA8876.ino b/sonoff/xdsp_10_RA8876.ino index d7e03828c..afe8691af 100644 --- a/sonoff/xdsp_10_RA8876.ino +++ b/sonoff/xdsp_10_RA8876.ino @@ -107,6 +107,7 @@ void RA8876_InitDriver() } } +#ifdef USE_TOUCH_BUTTONS void RA8876_MQTT(uint8_t count,const char *cp) { snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"" D_JSON_TIME "\":\"%s\""), GetDateAndTime(DT_LOCAL).c_str()); snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"RA8876\":{\"%s%d\":\"%d\"}}"), mqtt_data,cp,count+1,(buttons[count]->vpower&0x80)>>7); @@ -210,7 +211,7 @@ if (2 == ctouch_counter) { } } } - +#endif USE_TOUCH_BUTTONS /* void testall() { ra8876->clearScreen(0); @@ -408,7 +409,9 @@ bool Xdsp10(byte function) result = true; break; case FUNC_DISPLAY_EVERY_50_MSECOND: +#ifdef USE_TOUCH_BUTTONS if (FT5316_found) FT5316Check(); +#endif break; } } diff --git a/sonoff/xsns_45_vl53l0x.ino b/sonoff/xsns_45_vl53l0x.ino index 1f9248709..ce30460b7 100755 --- a/sonoff/xsns_45_vl53l0x.ino +++ b/sonoff/xsns_45_vl53l0x.ino @@ -131,7 +131,7 @@ void Vl53l0Show(boolean json) * Interface \*********************************************************************************************/ -#define XSNS_45 +#define XSNS_45 45 bool Xsns45(byte function) {