|
|
@ -93,14 +93,21 @@ void _wsParse(AsyncWebSocketClient *client, uint8_t * payload, size_t length) { |
|
|
|
|
|
|
|
DEBUG_MSG_P(PSTR("[WEBSOCKET] Requested action: %s\n"), action); |
|
|
|
|
|
|
|
if (strcmp(action, "reboot") == 0) deferredReset(100, CUSTOM_RESET_WEB); |
|
|
|
if (strcmp(action, "reconnect") == 0) _web_defer.once_ms(100, wifiDisconnect); |
|
|
|
|
|
|
|
if (strcmp(action, "factory_reset") == 0) |
|
|
|
{ |
|
|
|
if (strcmp(action, "reboot") == 0) { |
|
|
|
deferredReset(100, CUSTOM_RESET_WEB); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
if (strcmp(action, "reconnect") == 0) { |
|
|
|
_web_defer.once_ms(100, wifiDisconnect); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
if (strcmp(action, "factory_reset") == 0) { |
|
|
|
DEBUG_MSG_P(PSTR("\n\nFACTORY RESET\n\n")); |
|
|
|
resetSettings(); |
|
|
|
deferredReset(100, CUSTOM_RESET_FACTORY); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
JsonObject& data = root["data"]; |
|
|
@ -120,6 +127,8 @@ void _wsParse(AsyncWebSocketClient *client, uint8_t * payload, size_t length) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|