From ef57a6ec41caf19201c58318ee120929e9f96a7e Mon Sep 17 00:00:00 2001 From: fvanroie Date: Mon, 30 Mar 2020 15:53:23 +0200 Subject: [PATCH] Allow payload for reboot --- src/hasp_dispatch.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/hasp_dispatch.cpp b/src/hasp_dispatch.cpp index d051aa40..5883bbc5 100644 --- a/src/hasp_dispatch.cpp +++ b/src/hasp_dispatch.cpp @@ -114,7 +114,7 @@ void dispatchAttribute(String strTopic, const char * payload) } else if(strTopic == F("light")) { dispatchBacklight(payload); - } else if(cmnd == F("reboot") || cmnd == F("restart")) { + } else if(strTopic == F("reboot") || strTopic == F("restart")) { dispatchReboot(true); } else if(strTopic == F("clearpage")) { @@ -281,8 +281,6 @@ void dispatchReboot(bool saveConfig) debugStop(); delay(250); wifiStop(); - // debugPrintln(F("STOP: Properly Rebooting the MCU now!")); - // debugPrintln(F("-------------------------------------")); Log.notice(F("STOP: Properly Rebooting the MCU now!")); Log.verbose(F("-------------------------------------")); ESP.restart();