Add live
property to state, allowing toggling of realtime (not incl. in state resp.) ( #1308 )
This commit is contained in:
parent
b25e22bca4
commit
adbeb4ae54
@ -2,6 +2,11 @@
|
|||||||
|
|
||||||
### WLED version 0.11.0
|
### WLED version 0.11.0
|
||||||
|
|
||||||
|
#### Build 2011260
|
||||||
|
|
||||||
|
- Add `live` property to state, allowing toggling of realtime (not incl. in state resp.)
|
||||||
|
- PIO environment changes
|
||||||
|
|
||||||
#### Build 2011230
|
#### Build 2011230
|
||||||
|
|
||||||
- Version bump to 0.11.0 "Mirai"
|
- Version bump to 0.11.0 "Mirai"
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
default_envs = travis_esp8266, travis_esp32
|
default_envs = travis_esp8266, travis_esp32
|
||||||
|
|
||||||
# Release binaries
|
# Release binaries
|
||||||
; default_envs = nodemcuv2, esp01_1m_full, esp32dev, custom_WS2801, custom_APA102, custom_LEDPIN_16, custom_LEDPIN_4, custom_LEDPIN_3, custom32_LEDPIN_16
|
; default_envs = nodemcuv2, esp01_1m_full, esp32dev, custom_WS2801, custom_APA102, custom_LEDPIN_16, custom_LEDPIN_4, custom_LEDPIN_3, custom32_LEDPIN_16, custom32_APA102
|
||||||
|
|
||||||
# Single binaries (uncomment your board)
|
# Single binaries (uncomment your board)
|
||||||
; default_envs = nodemcuv2
|
; default_envs = nodemcuv2
|
||||||
@ -150,7 +150,9 @@ build_flags =
|
|||||||
; NONOSDK22x_190703 = 2.2.2-dev(38a443e)
|
; NONOSDK22x_190703 = 2.2.2-dev(38a443e)
|
||||||
-DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x_190703
|
-DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x_190703
|
||||||
; lwIP 2 - Higher Bandwidth no Features
|
; lwIP 2 - Higher Bandwidth no Features
|
||||||
-DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH_LOW_FLASH
|
; -DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH_LOW_FLASH
|
||||||
|
; lwIP 1.4 - Higher Bandwidth (Aircoookie has)
|
||||||
|
-DPIO_FRAMEWORK_ARDUINO_LWIP_HIGHER_BANDWIDTH
|
||||||
; VTABLES in Flash
|
; VTABLES in Flash
|
||||||
-DVTABLES_IN_FLASH
|
-DVTABLES_IN_FLASH
|
||||||
; restrict to minimal mime-types
|
; restrict to minimal mime-types
|
||||||
@ -304,25 +306,25 @@ lib_ignore =
|
|||||||
board = esp8285
|
board = esp8285
|
||||||
platform = ${common.platform_wled_default}
|
platform = ${common.platform_wled_default}
|
||||||
platform_packages = ${common.platform_packages}
|
platform_packages = ${common.platform_packages}
|
||||||
board_build.ldscript = ${common.ldscript_1m0m}
|
board_build.ldscript = ${common.ldscript_1m128k}
|
||||||
build_unflags = ${common.build_unflags}
|
build_unflags = ${common.build_unflags}
|
||||||
build_flags = ${common.build_flags_esp8266} -D WLED_DISABLE_HUESYNC -D WLED_USE_ANALOG_LEDS
|
build_flags = ${common.build_flags_esp8266} -D WLED_DISABLE_OTA -D WLED_USE_ANALOG_LEDS
|
||||||
|
|
||||||
[env:esp8285_4CH_H801]
|
[env:esp8285_4CH_H801]
|
||||||
board = esp8285
|
board = esp8285
|
||||||
platform = ${common.platform_wled_default}
|
platform = ${common.platform_wled_default}
|
||||||
platform_packages = ${common.platform_packages}
|
platform_packages = ${common.platform_packages}
|
||||||
board_build.ldscript = ${common.ldscript_1m0m}
|
board_build.ldscript = ${common.ldscript_1m128k}
|
||||||
build_unflags = ${common.build_unflags}
|
build_unflags = ${common.build_unflags}
|
||||||
build_flags = ${common.build_flags_esp8266} -D WLED_DISABLE_HUESYNC -D WLED_USE_ANALOG_LEDS -D WLED_USE_H801
|
build_flags = ${common.build_flags_esp8266} -D WLED_DISABLE_OTA -D WLED_USE_ANALOG_LEDS -D WLED_USE_H801
|
||||||
|
|
||||||
[env:esp8285_5CH_H801]
|
[env:esp8285_5CH_H801]
|
||||||
board = esp8285
|
board = esp8285
|
||||||
platform = ${common.platform_wled_default}
|
platform = ${common.platform_wled_default}
|
||||||
platform_packages = ${common.platform_packages}
|
platform_packages = ${common.platform_packages}
|
||||||
board_build.ldscript = ${common.ldscript_1m0m}
|
board_build.ldscript = ${common.ldscript_1m128k}
|
||||||
build_unflags = ${common.build_unflags}
|
build_unflags = ${common.build_unflags}
|
||||||
build_flags = ${common.build_flags_esp8266} -D WLED_DISABLE_HUESYNC -D WLED_USE_ANALOG_LEDS -D WLED_USE_H801 -D WLED_ENABLE_5CH_LEDS
|
build_flags = ${common.build_flags_esp8266} -D WLED_DISABLE_OTA -D WLED_USE_ANALOG_LEDS -D WLED_USE_H801 -D WLED_ENABLE_5CH_LEDS
|
||||||
|
|
||||||
[env:d1_mini_5CH_Shojo_PCB]
|
[env:d1_mini_5CH_Shojo_PCB]
|
||||||
board = d1_mini
|
board = d1_mini
|
||||||
@ -410,6 +412,15 @@ lib_ignore =
|
|||||||
ESPAsyncTCP
|
ESPAsyncTCP
|
||||||
ESPAsyncUDP
|
ESPAsyncUDP
|
||||||
|
|
||||||
|
[env:custom32_APA102]
|
||||||
|
board = esp32dev
|
||||||
|
platform = espressif32@2.0
|
||||||
|
build_unflags = ${common.build_unflags}
|
||||||
|
build_flags = ${common.build_flags_esp32} -D USE_APA102
|
||||||
|
lib_ignore =
|
||||||
|
ESPAsyncTCP
|
||||||
|
ESPAsyncUDP
|
||||||
|
|
||||||
[env:custom32_TOUCHPIN_T0]
|
[env:custom32_TOUCHPIN_T0]
|
||||||
board = esp32dev
|
board = esp32dev
|
||||||
platform = espressif32@2.0
|
platform = espressif32@2.0
|
||||||
@ -443,7 +454,7 @@ platform = espressif32@2.0
|
|||||||
[env:sp501e]
|
[env:sp501e]
|
||||||
board = esp_wroom_02
|
board = esp_wroom_02
|
||||||
platform = ${common.platform_wled_default}
|
platform = ${common.platform_wled_default}
|
||||||
board_build.ldscript = ${common.ldscript_2m1m}
|
board_build.ldscript = ${common.ldscript_2m512k}
|
||||||
build_flags = ${common.build_flags_esp8266} -D LEDPIN=3 -D BTNPIN=1
|
build_flags = ${common.build_flags_esp8266} -D LEDPIN=3 -D BTNPIN=1
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
@ -470,7 +481,7 @@ build_flags = ${common.build_flags_esp32} ${common.debug_flags} ${common.build_f
|
|||||||
board = esp_wroom_02
|
board = esp_wroom_02
|
||||||
platform = ${common.platform_wled_default}
|
platform = ${common.platform_wled_default}
|
||||||
platform_packages = ${common.platform_packages}
|
platform_packages = ${common.platform_packages}
|
||||||
board_build.ldscript = ${common.ldscript_2m1m}
|
board_build.ldscript = ${common.ldscript_2m512k}
|
||||||
build_unflags = ${common.build_unflags}
|
build_unflags = ${common.build_unflags}
|
||||||
build_flags = ${common.build_flags_esp8266} -D LEDPIN=3
|
build_flags = ${common.build_flags_esp8266} -D LEDPIN=3
|
||||||
|
|
||||||
@ -478,7 +489,7 @@ build_flags = ${common.build_flags_esp8266} -D LEDPIN=3
|
|||||||
board = esp_wroom_02
|
board = esp_wroom_02
|
||||||
platform = ${common.platform_wled_default}
|
platform = ${common.platform_wled_default}
|
||||||
platform_packages = ${common.platform_packages}
|
platform_packages = ${common.platform_packages}
|
||||||
board_build.ldscript = ${common.ldscript_2m1m}
|
board_build.ldscript = ${common.ldscript_2m512k}
|
||||||
build_unflags = ${common.build_unflags}
|
build_unflags = ${common.build_unflags}
|
||||||
build_flags = ${common.build_flags_esp8266} -D USE_WS2801 -D CLKPIN=13 -D DATAPIN=3
|
build_flags = ${common.build_flags_esp8266} -D USE_WS2801 -D CLKPIN=13 -D DATAPIN=3
|
||||||
|
|
||||||
@ -486,7 +497,7 @@ build_flags = ${common.build_flags_esp8266} -D USE_WS2801 -D CLKPIN=13 -D DATAPI
|
|||||||
board = esp_wroom_02
|
board = esp_wroom_02
|
||||||
platform = ${common.platform_wled_default}
|
platform = ${common.platform_wled_default}
|
||||||
platform_packages = ${common.platform_packages}
|
platform_packages = ${common.platform_packages}
|
||||||
board_build.ldscript = ${common.ldscript_2m1m}
|
board_build.ldscript = ${common.ldscript_2m512k}
|
||||||
build_unflags = ${common.build_unflags}
|
build_unflags = ${common.build_unflags}
|
||||||
build_flags = ${common.build_flags_esp8266} -D USE_APA102 -D CLKPIN=13 -D DATAPIN=3
|
build_flags = ${common.build_flags_esp8266} -D USE_APA102 -D CLKPIN=13 -D DATAPIN=3
|
||||||
|
|
||||||
@ -494,7 +505,7 @@ build_flags = ${common.build_flags_esp8266} -D USE_APA102 -D CLKPIN=13 -D DATAPI
|
|||||||
board = esp_wroom_02
|
board = esp_wroom_02
|
||||||
platform = ${common.platform_wled_default}
|
platform = ${common.platform_wled_default}
|
||||||
platform_packages = ${common.platform_packages}
|
platform_packages = ${common.platform_packages}
|
||||||
board_build.ldscript = ${common.ldscript_2m1m}
|
board_build.ldscript = ${common.ldscript_2m512k}
|
||||||
build_unflags = ${common.build_unflags}
|
build_unflags = ${common.build_unflags}
|
||||||
build_flags = ${common.build_flags_esp8266}
|
build_flags = ${common.build_flags_esp8266}
|
||||||
|
|
||||||
@ -502,7 +513,7 @@ build_flags = ${common.build_flags_esp8266}
|
|||||||
board = esp_wroom_02
|
board = esp_wroom_02
|
||||||
platform = ${common.platform_wled_default}
|
platform = ${common.platform_wled_default}
|
||||||
platform_packages = ${common.platform_packages}
|
platform_packages = ${common.platform_packages}
|
||||||
board_build.ldscript = ${common.ldscript_2m1m}
|
board_build.ldscript = ${common.ldscript_2m512k}
|
||||||
build_unflags = ${common.build_unflags}
|
build_unflags = ${common.build_unflags}
|
||||||
build_flags = ${common.build_flags_esp8266} -D USE_WS2801 #-D CLKPIN=0 -D DATAPIN=2
|
build_flags = ${common.build_flags_esp8266} -D USE_WS2801 #-D CLKPIN=0 -D DATAPIN=2
|
||||||
|
|
||||||
@ -510,6 +521,6 @@ build_flags = ${common.build_flags_esp8266} -D USE_WS2801 #-D CLKPIN=0 -D DATAPI
|
|||||||
board = esp_wroom_02
|
board = esp_wroom_02
|
||||||
platform = ${common.platform_wled_default}
|
platform = ${common.platform_wled_default}
|
||||||
platform_packages = ${common.platform_packages}
|
platform_packages = ${common.platform_packages}
|
||||||
board_build.ldscript = ${common.ldscript_2m1m}
|
board_build.ldscript = ${common.ldscript_2m512k}
|
||||||
build_unflags = ${common.build_unflags}
|
build_unflags = ${common.build_unflags}
|
||||||
build_flags = ${common.build_flags_esp8266} -D USE_APA102 #-D CLKPIN=0 -D DATAPIN=2
|
build_flags = ${common.build_flags_esp8266} -D USE_APA102 #-D CLKPIN=0 -D DATAPIN=2
|
||||||
|
@ -208,6 +208,12 @@ bool deserializeState(JsonObject root)
|
|||||||
realtimeOverride = root[F("lor")] | realtimeOverride;
|
realtimeOverride = root[F("lor")] | realtimeOverride;
|
||||||
if (realtimeOverride > 2) realtimeOverride = REALTIME_OVERRIDE_ALWAYS;
|
if (realtimeOverride > 2) realtimeOverride = REALTIME_OVERRIDE_ALWAYS;
|
||||||
|
|
||||||
|
if (root.containsKey("live")) {
|
||||||
|
bool lv = root["live"];
|
||||||
|
if (lv) realtimeLock(65000); //enter realtime without timeout
|
||||||
|
else realtimeTimeout = 0; //cancel realtime mode immediately
|
||||||
|
}
|
||||||
|
|
||||||
byte prevMain = strip.getMainSegmentId();
|
byte prevMain = strip.getMainSegmentId();
|
||||||
strip.mainSegment = root[F("mainseg")] | prevMain;
|
strip.mainSegment = root[F("mainseg")] | prevMain;
|
||||||
if (strip.getMainSegmentId() != prevMain) setValuesFromMainSeg();
|
if (strip.getMainSegmentId() != prevMain) setValuesFromMainSeg();
|
||||||
@ -423,7 +429,7 @@ void serializeInfo(JsonObject root)
|
|||||||
|
|
||||||
root[F("name")] = serverDescription;
|
root[F("name")] = serverDescription;
|
||||||
root[F("udpport")] = udpPort;
|
root[F("udpport")] = udpPort;
|
||||||
root[F("live")] = (bool)realtimeMode;
|
root["live"] = (bool)realtimeMode;
|
||||||
|
|
||||||
switch (realtimeMode) {
|
switch (realtimeMode) {
|
||||||
case REALTIME_MODE_INACTIVE: root["lm"] = ""; break;
|
case REALTIME_MODE_INACTIVE: root["lm"] = ""; break;
|
||||||
|
@ -86,6 +86,7 @@ void realtimeLock(uint32_t timeoutMs, byte md)
|
|||||||
realtimeMode = md;
|
realtimeMode = md;
|
||||||
|
|
||||||
if (arlsForceMaxBri && !realtimeOverride) strip.setBrightness(scaledBri(255));
|
if (arlsForceMaxBri && !realtimeOverride) strip.setBrightness(scaledBri(255));
|
||||||
|
if (md == REALTIME_MODE_GENERIC) strip.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user