From 910ce494b4077969f0d3da416eca4d6120230d97 Mon Sep 17 00:00:00 2001 From: Frank Date: Mon, 13 Mar 2023 11:35:48 +0100 Subject: [PATCH] usermod bugfixes * rotary ALT: changing brightness did not have an effect (stateUpdated missing) * four-line-display ALT: allow clockmode without NTP (network time) - there are other possible time sources, like RTC. --- .../usermod_v2_four_line_display_ALT.h | 4 ++-- .../usermod_v2_rotary_encoder_ui_ALT.h | 5 ++++- wled00/wled.h | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/usermods/usermod_v2_four_line_display_ALT/usermod_v2_four_line_display_ALT.h b/usermods/usermod_v2_four_line_display_ALT/usermod_v2_four_line_display_ALT.h index f7f376b1..7c8a538e 100644 --- a/usermods/usermod_v2_four_line_display_ALT/usermod_v2_four_line_display_ALT.h +++ b/usermods/usermod_v2_four_line_display_ALT/usermod_v2_four_line_display_ALT.h @@ -703,7 +703,7 @@ class FourLineDisplayUsermod : public Usermod { // and turn it back on if it changed. clear(); sleepOrClock(true); - } else if (displayTurnedOff && ntpEnabled) { + } else if (displayTurnedOff) { // WLEDMM removed "&& ntpEnabled" showTime(); } return; @@ -1058,7 +1058,7 @@ class FourLineDisplayUsermod : public Usermod { if (sleepEnable) { displayTurnedOff = true; //setContrast(contrastFix? 2+ contrast/4 : 0); // un-comment to dim display in "clock mode" - if (clockMode && ntpEnabled) { + if (clockMode) { // WLEDMM removed " && ntpEnabled" knownMinute = knownHour = 99; showTime(); } else diff --git a/usermods/usermod_v2_rotary_encoder_ui_ALT/usermod_v2_rotary_encoder_ui_ALT.h b/usermods/usermod_v2_rotary_encoder_ui_ALT/usermod_v2_rotary_encoder_ui_ALT.h index a18f7ca3..59f1ccaa 100644 --- a/usermods/usermod_v2_rotary_encoder_ui_ALT/usermod_v2_rotary_encoder_ui_ALT.h +++ b/usermods/usermod_v2_rotary_encoder_ui_ALT/usermod_v2_rotary_encoder_ui_ALT.h @@ -526,7 +526,10 @@ public: } display->updateRedrawTime(); #endif - bri = max(min((increase ? bri+fadeAmount : bri-fadeAmount), 255), 0); + byte lastBri = bri; + if (bri < 40) bri = max(min((increase ? bri+fadeAmount/2 : bri-fadeAmount/2), 255), 0); // WLEDMM slower steps when brightness < 16% + else bri = max(min((increase ? bri+fadeAmount : bri-fadeAmount), 255), 0); + if (lastBri != bri) stateChanged = true; // WLEDMM bugfix lampUdated(); #ifdef USERMOD_FOUR_LINE_DISPLAY if (display->canDraw()) // only draw if nothing else is drawing diff --git a/wled00/wled.h b/wled00/wled.h index e0a8aa9a..24e71a5d 100644 --- a/wled00/wled.h +++ b/wled00/wled.h @@ -8,7 +8,7 @@ */ // version code in format yymmddb (b = daily build) -#define VERSION 2303111 +#define VERSION 2303130 //uncomment this if you have a "my_config.h" file you'd like to use //#define WLED_USE_MY_CONFIG