Browse Source

Clean code

rfm69
Xose Pérez 6 years ago
parent
commit
a8f588551b
3 changed files with 2736 additions and 2723 deletions
  1. BIN
      code/espurna/data/index.html.gz
  2. +2722
    -2718
      code/espurna/static/index.html.gz.h
  3. +14
    -5
      code/espurna/ws.ino

BIN
code/espurna/data/index.html.gz View File


+ 2722
- 2718
code/espurna/static/index.html.gz.h
File diff suppressed because it is too large
View File


+ 14
- 5
code/espurna/ws.ino View File

@ -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;
}
};


Loading…
Cancel
Save