Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions wled00/cfg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,7 @@ bool deserializeConfig(JsonObject doc, bool fromFS) {
CJSON(receiveDirect, if_live["en"]); // UDP/Hyperion realtime
CJSON(useMainSegmentOnly, if_live[F("mso")]);
CJSON(realtimeRespectLedMaps, if_live[F("rlm")]);
CJSON(realtimeAllowPresets, if_live[F("rop")]);
CJSON(e131Port, if_live["port"]); // 5568
if (e131Port == DDP_DEFAULT_PORT) e131Port = E131_DEFAULT_PORT; // prevent double DDP port allocation
CJSON(e131Multicast, if_live[F("mc")]);
Expand Down Expand Up @@ -1137,6 +1138,7 @@ void serializeConfig(JsonObject root) {
if_live["en"] = receiveDirect; // UDP/Hyperion realtime
if_live[F("mso")] = useMainSegmentOnly;
if_live[F("rlm")] = realtimeRespectLedMaps;
if_live[F("rop")] = realtimeAllowPresets;
if_live["port"] = e131Port;
if_live[F("mc")] = e131Multicast;

Expand Down
3 changes: 2 additions & 1 deletion wled00/data/settings_sync.htm
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@ <h3>Instance List</h3>
<h3>Realtime</h3>
Receive UDP realtime: <input type="checkbox" name="RD"><br>
Use main segment only: <input type="checkbox" name="MO"><br>
Respect LED Maps: <input type="checkbox" name="RLM"><br><br>
Respect LED Maps: <input type="checkbox" name="RLM"><br>
Allow presets during realtime: <input type="checkbox" name="ROP"><br><br>
<h4>Network DMX input</h4><br>
Type:
<select name=DI onchange="SP(); adj();">
Expand Down
1 change: 1 addition & 0 deletions wled00/set.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,7 @@ void handleSettingsSet(AsyncWebServerRequest *request, byte subPage)
receiveDirect = request->hasArg(F("RD")); // UDP realtime
useMainSegmentOnly = request->hasArg(F("MO"));
realtimeRespectLedMaps = request->hasArg(F("RLM"));
realtimeAllowPresets = request->hasArg(F("ROP"));
e131SkipOutOfSequence = request->hasArg(F("ES"));
e131Multicast = request->hasArg(F("EM"));
t = request->arg(F("EP")).toInt();
Expand Down
11 changes: 11 additions & 0 deletions wled00/wled.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,17 @@ void WLED::loop()
delay(1); //required to make sure ESP enters modem sleep (see #1184)
#endif
}
else if (realtimeAllowPresets) {
// Realtime (live) data is active and no live override is set: keep presets and playlists working like in
// normal operation. A preset with LO=1/2 takes over the strip, a preset that leaves the override alone
// (e.g. brightness only) is applied without interrupting the stream.
if (!presetNeedsSaving()) {
handlePlaylist();
yield();
}
handlePresets();
yield();
}
#ifdef WLED_DEBUG
stripMillis = millis() - stripMillis;
avgStripMillis += stripMillis;
Expand Down
1 change: 1 addition & 0 deletions wled00/wled.h
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,7 @@ WLED_GLOBAL uint8_t tpmPacketCount _INIT(0);
WLED_GLOBAL uint16_t tpmPayloadFrameSize _INIT(0);
WLED_GLOBAL bool useMainSegmentOnly _INIT(false);
WLED_GLOBAL bool realtimeRespectLedMaps _INIT(true); // Respect LED maps when receiving realtime data
WLED_GLOBAL bool realtimeAllowPresets _INIT(false); // Allow presets to be applied while receiving realtime data

WLED_GLOBAL unsigned long lastInterfaceUpdate _INIT(0);
WLED_GLOBAL byte interfaceUpdateCallMode _INIT(CALL_MODE_INIT);
Expand Down
1 change: 1 addition & 0 deletions wled00/xml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,7 @@ void getSettingsJS(byte subPage, Print& settingsScript)
printSetFormCheckbox(settingsScript,PSTR("RD"),receiveDirect);
printSetFormCheckbox(settingsScript,PSTR("MO"),useMainSegmentOnly);
printSetFormCheckbox(settingsScript,PSTR("RLM"),realtimeRespectLedMaps);
printSetFormCheckbox(settingsScript,PSTR("ROP"),realtimeAllowPresets);
printSetFormValue(settingsScript,PSTR("EP"),e131Port);
printSetFormCheckbox(settingsScript,PSTR("ES"),e131SkipOutOfSequence);
printSetFormCheckbox(settingsScript,PSTR("EM"),e131Multicast);
Expand Down
Loading