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.
This commit is contained in:
Frank
2023-03-13 11:35:48 +01:00
parent ab808c5522
commit 910ce494b4
3 changed files with 7 additions and 4 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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