Bugfix galore.

This commit is contained in:
Blaz Kristan 2021-12-21 20:43:49 +01:00
parent 42474e551f
commit cb4c736fab
7 changed files with 1294 additions and 1289 deletions

View File

@ -784,12 +784,12 @@ class FourLineDisplayUsermod : public Usermod {
if (enabled) {
if (clockMode) {
clear();
knownMinute = 99;
knownMinute = knownHour = 99;
showTime();
}else setPowerSave(1);
} else
setPowerSave(1);
displayTurnedOff = true;
}
else {
} else {
setPowerSave(0);
displayTurnedOff = false;
}

View File

@ -613,7 +613,7 @@ void WS2812FX::restartRuntime() {
}
void WS2812FX::resetSegments() {
for (uint8_t i = 0; i < MAX_NUM_SEGMENTS; i++) if (_segments[i].name) delete _segments[i].name;
for (uint8_t i = 0; i < MAX_NUM_SEGMENTS; i++) if (_segments[i].name) delete[] _segments[i].name;
mainSegment = 0;
memset(_segments, 0, sizeof(_segments));
//memset(_segment_runtimes, 0, sizeof(_segment_runtimes));

View File

@ -212,8 +212,9 @@ button {
transform: rotate(0deg);
transition: transform 0.3s;
position: absolute;
top: 8px;
right: 8px;
top: 0;
right: 0;
padding: 8px;
}
.exp {

View File

@ -2198,7 +2198,9 @@ function expand(i,a=false)
*/
expanded[i] = !expanded[i];
seg.style.display = (expanded[i]) ? "block":"none";
gId('sege' +i).style.transform = (expanded[i]) ? "rotate(180deg)":"rotate(0deg)";
//gId('sege' +i).style.transform = (expanded[i]) ? "rotate(180deg)":"rotate(0deg)";
if (expanded[i]) gId('sege' +i).classList.add("exp");
else gId('sege' +i).classList.remove("exp");
if (expanded[i]) gId(i<100?'segutil':'putil').classList.remove(i<100?"staybot":"staytop");
else gId(i<100?'segutil':'putil').classList.add(i<100?"staybot":"staytop");

File diff suppressed because it is too large Load Diff

View File

@ -336,6 +336,7 @@ void checkTimers()
&& (timerWeekday[i] & 0x01) //timer is enabled
&& ((timerWeekday[i] >> weekdayMondayFirst()) & 0x01)) //timer should activate at current day of week
{
unloadPlaylist();
applyPreset(timerMacro[i]);
}
}
@ -349,6 +350,7 @@ void checkTimers()
&& (timerWeekday[8] & 0x01) //timer is enabled
&& ((timerWeekday[8] >> weekdayMondayFirst()) & 0x01)) //timer should activate at current day of week
{
unloadPlaylist();
applyPreset(timerMacro[8]);
DEBUG_PRINTF("Sunrise macro %d triggered.",timerMacro[8]);
}
@ -363,6 +365,7 @@ void checkTimers()
&& (timerWeekday[9] & 0x01) //timer is enabled
&& ((timerWeekday[9] >> weekdayMondayFirst()) & 0x01)) //timer should activate at current day of week
{
unloadPlaylist();
applyPreset(timerMacro[9]);
DEBUG_PRINTF("Sunset macro %d triggered.",timerMacro[9]);
}

View File

@ -298,8 +298,7 @@ void handleNotifications()
for (uint8_t i = 0; i < srcSegs; i++) {
WS2812FX::Segment& selseg = strip.getSegment(i);
for (uint8_t j = 0; j<4; j++) selseg.setOption(j, (udpIn[40+i*3] >> j) & 0x01); //only take into account mirrored, selected, on, reversed
selseg.spacing = udpIn[41+i*3];
selseg.grouping = udpIn[42+i*3];
strip.setSegment(i, selseg.start, selseg.stop, udpIn[42+i*3], udpIn[41+i*3], selseg.offset); // will also properly reset segments
}
}
}