Small adjustments

This commit is contained in:
cschwinne 2021-04-21 17:21:55 +02:00
parent afde7940d8
commit 7f6a554e1b
4 changed files with 20 additions and 4 deletions

View File

@ -2,6 +2,12 @@
### Builds after release 0.12.0
#### Build 2104210
- Added `tb` to JSON state, allowing setting the timebase (set tb=0 to start e.g. wipe effect from the beginning). Receive only.
- Slightly raised Solid mode refresh rate to work with LEDs (TM1814) that require refresh rates of at least 2fps
- Added sunrise and sunset calculation to the backup JSON time source
#### Build 2104151
- `NUM_STRIPS` no longer required with compile-time strip defaults

View File

@ -35,7 +35,7 @@
*/
uint16_t WS2812FX::mode_static(void) {
fill(SEGCOLOR(0));
return (SEGMENT.getOption(SEG_OPTION_TRANSITIONAL)) ? FRAMETIME : 500; //update faster if in transition
return (SEGMENT.getOption(SEG_OPTION_TRANSITIONAL)) ? FRAMETIME : 380; //update faster if in transition
}

View File

@ -182,6 +182,9 @@ bool deserializeState(JsonObject root)
jsonTransitionOnce = true;
}
strip.setTransition(transitionDelayTemp);
tr = root[F("tb")] | -1;
if (tr >= 0) strip.timebase = ((uint32_t)tr) - millis();
int cy = root[F("pl")] | -2;
if (cy > -2) presetCyclingEnabled = (cy >= 0);
@ -203,9 +206,16 @@ bool deserializeState(JsonObject root)
receiveNotifications = udpn["recv"] | receiveNotifications;
bool noNotification = udpn[F("nn")]; //send no notification just for this request
unsigned long timein = root[F("time")] | UINT32_MAX;
unsigned long timein = root[F("time")] | UINT32_MAX; //backup time source if NTP not synced
if (timein != UINT32_MAX) {
if (millis() - ntpLastSyncTime > 50000000L) setTime(timein);
time_t prev = now();
if (millis() - ntpLastSyncTime > 50000000L) {
setTime(timein);
if (abs(now() - prev) > 60L) {
updateLocalTime();
calculateSunriseAndSunset();
}
}
if (presetsModifiedTime == 0) presetsModifiedTime = timein;
}

View File

@ -8,7 +8,7 @@
*/
// version code in format yymmddb (b = daily build)
#define VERSION 2104151
#define VERSION 2104210
//uncomment this if you have a "my_config.h" file you'd like to use
//#define WLED_USE_MY_CONFIG