core - group channel toggle, set_with_on fix, mdns

This commit is contained in:
2021-10-13 12:27:56 +03:00
parent 9bfaca7898
commit bf76a5c23c
2 changed files with 5 additions and 5 deletions

View File

@@ -802,7 +802,7 @@ int Item::Ctrl(itemCmd cmd, char* subItem, bool allowRecursion)
if (chActive) cmd.Cmd(CMD_OFF); if (chActive) cmd.Cmd(CMD_OFF);
else else
{ {
cmd.loadItemDef(this); // cmd.loadItemDef(this); ///
cmd.Cmd(CMD_ON); cmd.Cmd(CMD_ON);
} }
status2Send |=SEND_COMMAND | SEND_IMMEDIATE; status2Send |=SEND_COMMAND | SEND_IMMEDIATE;
@@ -1029,7 +1029,7 @@ int Item::Ctrl(itemCmd cmd, char* subItem, bool allowRecursion)
debugSerial<<F("ON:Already Active\n"); debugSerial<<F("ON:Already Active\n");
return -3; return -3;
} }
cmd.loadItemDef(this); if (!cmd.isValue()) cmd.loadItemDef(this); // if no_suffix - both, command ON and value provided
status2Send |= SEND_COMMAND | SEND_PARAMETERS | SEND_IMMEDIATE; status2Send |= SEND_COMMAND | SEND_PARAMETERS | SEND_IMMEDIATE;
toExecute=true; toExecute=true;
break; break;

View File

@@ -242,7 +242,7 @@ uint16_t httpHandler(Client& client, String request, uint8_t method, long conten
client.println( client.println(
#ifdef CORS #ifdef CORS
//Redirect to cloud PWA application //Redirect to cloud PWA application
String(F("Location: "))+(CORS)+String(F("/pwa")) String(F("Location: " CORS "/pwa"))
#else #else
String(F("Location: /index.html")) String(F("Location: /index.html"))
#endif #endif
@@ -982,7 +982,7 @@ if (WiFi.status() == WL_CONNECTED) {
mdns.begin(Ethernet.localIP(), "lighthub"); mdns.begin(Ethernet.localIP(), "lighthub");
char txtRecord[32] = "\x7mac="; char txtRecord[32] = "\x10mac=";
SetBytes(sysConf.mac,6,txtRecord+5); SetBytes(sysConf.mac,6,txtRecord+5);
char mdnsName[32] = "LightHub"; char mdnsName[32] = "LightHub";
SetBytes(sysConf.mac+4,2,mdnsName+8); SetBytes(sysConf.mac+4,2,mdnsName+8);