From 40d299f4c29b72c10ea03958aff8f1ecab3a4930 Mon Sep 17 00:00:00 2001 From: e2002 Date: Fri, 18 Jul 2025 08:50:57 +0300 Subject: [PATCH] v0.9.533 --- README.md | 4 ++++ yoRadio/src/core/commandhandler.cpp | 2 +- yoRadio/src/core/netserver.cpp | 4 ++++ yoRadio/src/core/options.h | 2 +- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 94bb273..5e1442e 100644 --- a/README.md +++ b/README.md @@ -234,6 +234,10 @@ Work is in progress... --- ## Version history +### 0.9.533 +- fixed compilation error for esp32 core version lower than 3.0.0 +- fixed error setting display brightness to 1 + ### 0.9.530 - optimization of webserver/socket code in netserver.cpp, part#1 - added support for ArduinoOTA (OTA update from Arduino IDE) (disabled by default)\ diff --git a/yoRadio/src/core/commandhandler.cpp b/yoRadio/src/core/commandhandler.cpp index 9e880b2..57c7969 100644 --- a/yoRadio/src/core/commandhandler.cpp +++ b/yoRadio/src/core/commandhandler.cpp @@ -56,7 +56,7 @@ bool CommandHandler::exec(const char *command, const char *value, uint8_t cid) { if (strEquals(command, "fliptouch")) { config.saveValue(&config.store.fliptouch, static_cast(atoi(value))); flipTS(); return true; } if (strEquals(command, "dbgtouch")) { config.saveValue(&config.store.dbgtouch, static_cast(atoi(value))); return true; } if (strEquals(command, "flipscreen")) { config.saveValue(&config.store.flipscreen, static_cast(atoi(value))); display.flip(); display.putRequest(NEWMODE, CLEAR); display.putRequest(NEWMODE, PLAYER); return true; } - if (strEquals(command, "brightness")) { if (!config.store.dspon) netserver.requestOnChange(DSPON, 0); config.store.brightness = static_cast(atoi(value)); config.setBrightness(true); return true; } + if (strEquals(command, "brightness")) { if (!config.store.dspon) netserver.requestOnChange(DSPON, 0); config.store.brightness = static_cast(atoi(value)); config.setBrightness(true); return true; } if (strEquals(command, "screenon")) { config.setDspOn(static_cast(atoi(value))); return true; } if (strEquals(command, "contrast")) { config.saveValue(&config.store.contrast, static_cast(atoi(value))); display.setContrast(); return true; } if (strEquals(command, "screensaverenabled")){ config.enableScreensaver(static_cast(atoi(value))); return true; } diff --git a/yoRadio/src/core/netserver.cpp b/yoRadio/src/core/netserver.cpp index d98a815..e58366e 100644 --- a/yoRadio/src/core/netserver.cpp +++ b/yoRadio/src/core/netserver.cpp @@ -14,7 +14,11 @@ #include #if USE_OTA +#if ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(3, 0, 0) #include +#else +#include +#endif #include #endif diff --git a/yoRadio/src/core/options.h b/yoRadio/src/core/options.h index 0ff0744..67a20a3 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.530" +#define YOVERSION "0.9.533" /******************************************************* DO NOT EDIT THIS FILE.