From b9c27ed324b3f36690da0f44437cc664ccf40648 Mon Sep 17 00:00:00 2001 From: cschwinne Date: Sat, 9 Mar 2019 14:48:13 +0100 Subject: [PATCH] Added RD HTTP api call for realtime udp --- wled00/wled00.ino | 2 +- wled00/wled03_set.ino | 15 +++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/wled00/wled00.ino b/wled00/wled00.ino index 1269fd6c..e76a444b 100644 --- a/wled00/wled00.ino +++ b/wled00/wled00.ino @@ -89,7 +89,7 @@ //version code in format yymmddb (b = daily build) -#define VERSION 1903072 +#define VERSION 1903091 char versionString[] = "0.8.4-dev"; diff --git a/wled00/wled03_set.ino b/wled00/wled03_set.ino index 1ad2afdb..9c95ae97 100644 --- a/wled00/wled03_set.ino +++ b/wled00/wled03_set.ino @@ -527,6 +527,10 @@ bool handleSet(AsyncWebServerRequest *request, String req) //toggle receive UDP direct notifications pos = req.indexOf("RN="); if (pos > 0) receiveNotifications = (req.charAt(pos+3) != '0'); + + //receive live data via UDP/Hyperion + pos = req.indexOf("RD="); + if (pos > 0) receiveDirect = (req.charAt(pos+3) != '0'); //toggle nightlight mode bool aNlDef = false; @@ -665,14 +669,9 @@ bool handleSet(AsyncWebServerRequest *request, String req) overlayRefreshedTime = 0; } #endif - pos = req.indexOf("NM="); //mode, 1 countdown - if (pos > 0) { - countdownMode = true; - if (req.indexOf("NM=0") > 0) - { - countdownMode = false; - } - } + //mode, 1 countdown + pos = req.indexOf("NM="); + if (pos > 0) countdownMode = (req.charAt(pos+3) != '0'); pos = req.indexOf("U0="); //user var 0 if (pos > 0) {