Added RD HTTP api call for realtime udp

pull/133/head
cschwinne 2019-03-09 14:48:13 +01:00
rodzic 0166dfe16e
commit b9c27ed324
2 zmienionych plików z 8 dodań i 9 usunięć

Wyświetl plik

@ -89,7 +89,7 @@
//version code in format yymmddb (b = daily build)
#define VERSION 1903072
#define VERSION 1903091
char versionString[] = "0.8.4-dev";

Wyświetl plik

@ -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) {