diff --git a/yoRadio/src/core/display.cpp b/yoRadio/src/core/display.cpp index 4b8f1bd..4859da7 100644 --- a/yoRadio/src/core/display.cpp +++ b/yoRadio/src/core/display.cpp @@ -252,7 +252,8 @@ void Display::_setReturnTicker(uint8_t time_s){ void Display::_swichMode(displayMode_e newmode) { #ifdef USE_NEXTION - nextion.swichMode(newmode); + //nextion.swichMode(newmode); + nextion.putRequest({NEWMODE, newmode}); #endif if (newmode == _mode || network.status != CONNECTED) return; _mode = newmode; diff --git a/yoRadio/src/core/options.h b/yoRadio/src/core/options.h index b3472ac..2bfa9e4 100644 --- a/yoRadio/src/core/options.h +++ b/yoRadio/src/core/options.h @@ -1,7 +1,7 @@ #ifndef options_h #define options_h -#define YOVERSION "0.9.017" +#define YOVERSION "0.9.018" /******************************************************* DO NOT EDIT THIS FILE. diff --git a/yoRadio/src/displays/nextion.cpp b/yoRadio/src/displays/nextion.cpp index 4ee9806..dafaf43 100644 --- a/yoRadio/src/displays/nextion.cpp +++ b/yoRadio/src/displays/nextion.cpp @@ -30,6 +30,7 @@ void nextionCore0( void * pvParameters ){ void Nextion::begin(bool dummy) { _dummyDisplay=dummy; + mode=LOST; hSerial.begin(NEXTION_BAUD, SERIAL_8N1, NEXTION_RX, NEXTION_TX); if (!hSerial) { Serial.println("Invalid HardwareSerial pin configuration, check config"); @@ -459,7 +460,9 @@ void Nextion::swichMode(displayMode_e newmode){ if (newmode == VOL) { _volDelay = millis(); } - //if (newmode == mode) return; + if (newmode == mode) { + return; + } mode = newmode; #ifdef DUMMYDISPLAY display.mode(newmode);