ESP32 show LHBT background if ``WebColor2`` bit0 is not set. Bit0 is default set using #252525

This commit is contained in:
Theo Arends 2023-12-02 16:59:04 +01:00
parent 3d0ab2259c
commit b7819bcfac
4 changed files with 14 additions and 0 deletions

View File

@ -6,6 +6,7 @@ All notable changes to this project will be documented in this file.
## [13.2.0.3]
### Added
- DeepSleep support through TIMERS (#20117)
- ESP32 show LHBT background if ``WebColor2`` bit0 is not set. Bit0 is default set using #252525
### Breaking Changed

View File

@ -140,6 +140,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm
- DeepSleep support through TIMERS [#20117](https://github.com/arendst/Tasmota/issues/20117)
- Support for ESP32-C2 and ESP32-C6 using Arduino core v3
- ESP32 core v3 auto TasConsole USB or Serial connection by @staars
- ESP32 show LHBT background if ``WebColor2`` bit0 is not set. Bit0 is default set using #252525
- ESP32 Partition Wizard can be loaded dynamically [#19980](https://github.com/arendst/Tasmota/issues/19980)
- ESP32 support for Avago Tech Bluetooth Buttons [#20088](https://github.com/arendst/Tasmota/issues/20088)
- Berry ``debug.gcdebug()`` to enable GC debugging [#19936](https://github.com/arendst/Tasmota/issues/19936)

View File

@ -1762,6 +1762,11 @@ void SettingsDelta(void) {
if (Settings->version < 0x0D000003) { // 13.0.0.3
Settings->battery_level_percent = 101;
}
#if (LANGUAGE_LCID == 1049)
if (Settings->version < 0x0D020003) { // 13.2.0.3
Settings->web_color[1][2] &= 0xFE; // Reset WebColor2 bit0 once. Fix by user setting WebColor2 bit0 (like #252525)
}
#endif
Settings->version = TASMOTA_VERSION;
SettingsSave(1);

View File

@ -900,6 +900,13 @@ void WSContentSendStyle_P(const char* formatP, ...) {
_WSContentSendBuffer(false, formatP, arg);
va_end(arg);
}
#if defined(ESP32) || (LANGUAGE_LCID == 1049)
if (0 == (WebColor(COL_BACKGROUND) & 1)) { // Show LHBT background if WebColor2 bit0 is not set
WSContentSend_P(PSTR("body{background:linear-gradient(#FF0018 7%%,#FFA52C,#FFFF41,#008018,#0000F9,#86007D 93%%);background-repeat:no-repeat;background-attachment:fixed;background-size:cover;}"));
}
#endif
WSContentSend_P(HTTP_HEAD_STYLE3, WebColor(COL_TEXT),
#ifdef FIRMWARE_MINIMAL
WebColor(COL_TEXT_WARNING),