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 @@ -590,6 +590,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 @@ -1126,6 +1127,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 @@ -126,7 +126,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>
Immediately force presets switching during realtime mode: <input type="checkbox" name="ROP"><br><br>
<i>Network DMX input</i><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 @@ -455,6 +455,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
10 changes: 9 additions & 1 deletion wled00/wled.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,9 @@ void WLED::loop()
#ifdef WLED_DEBUG
stripMillis = millis();
#endif
if (!realtimeMode || realtimeOverride || (realtimeMode && useMainSegmentOnly)) // block stuff if WARLS/Adalight is enabled

bool doInternalUpdates = !realtimeMode || realtimeOverride || (realtimeMode && useMainSegmentOnly);
if (doInternalUpdates) // block stuff if WARLS/Adalight is enabled
{
if (apActive) dnsServer.processNextRequest();
#ifdef WLED_ENABLE_AOTA
Expand All @@ -119,14 +121,20 @@ void WLED::loop()
handleHue();
yield();
#endif
}

if (doInternalUpdates || realtimeAllowPresets)
{
if (!presetNeedsSaving()) {
handlePlaylist();
yield();
}
handlePresets();
Copy link
Member

@softhack007 softhack007 Feb 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another option would be to create an else branch for if (!realtimeMode ...., and put handlepresets() into the else branch. But I would still prefer this to be guarded by a user-controled settings.

yield();
}

if (doInternalUpdates)
{
if (!offMode || strip.isOffRefreshRequired() || strip.needsUpdate())
strip.service();
#ifdef ESP8266
Expand Down
1 change: 1 addition & 0 deletions wled00/wled.h
Original file line number Diff line number Diff line change
Expand Up @@ -849,6 +849,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/buttons to override realtime mode

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 @@ -470,6 +470,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