1
0
mirror of https://github.com/bdring/Grbl_Esp32.git synced 2025-09-01 10:23:19 +02:00

Add $bye as alternative to $system/control=restart

Just because
This commit is contained in:
Mitch Bradley
2021-06-23 19:43:48 -10:00
parent a6dfd9257c
commit 97b2fae2f6

View File

@@ -379,6 +379,13 @@ namespace WebUI {
return Error::Ok;
}
static Error restart(char* parameter, AuthenticationLevel auth_level) {
parameter = trim(parameter);
info_all("Restart ongoing");
COMMANDS::restart_ESP();
return Error::Ok;
}
static void showWifiStats() {
#ifdef ENABLE_WIFI
int mode = WiFi.getMode();
@@ -1073,6 +1080,7 @@ namespace WebUI {
new WebCommand(NULL, WEBCMD, WG, "ESP800", "Firmware/Info", showFwInfo, anyState);
new WebCommand(NULL, WEBCMD, WU, "ESP420", "System/Stats", showSysStats, anyState);
new WebCommand("RESTART", WEBCMD, WA, "ESP444", "System/Control", setSystemMode);
new WebCommand("RESTART", WEBCMD, WA, NULL, "Bye", restart);
new WebCommand(NULL, WEBCMD, WU, "ESP720", "LocalFS/Size", SPIFFSSize);
new WebCommand("FORMAT", WEBCMD, WA, "ESP710", "LocalFS/Format", formatSpiffs);