diff --git a/ESP32_AP-Flasher/data/www/content_cards.json.gz b/ESP32_AP-Flasher/data/www/content_cards.json.gz index 56a271dc..60796166 100644 Binary files a/ESP32_AP-Flasher/data/www/content_cards.json.gz and b/ESP32_AP-Flasher/data/www/content_cards.json.gz differ diff --git a/ESP32_AP-Flasher/data/www/index.html.gz b/ESP32_AP-Flasher/data/www/index.html.gz index 0a6dfc00..715b4fa9 100644 Binary files a/ESP32_AP-Flasher/data/www/index.html.gz and b/ESP32_AP-Flasher/data/www/index.html.gz differ diff --git a/ESP32_AP-Flasher/data/www/main.js.gz b/ESP32_AP-Flasher/data/www/main.js.gz index 95cad4db..9c74dd51 100644 Binary files a/ESP32_AP-Flasher/data/www/main.js.gz and b/ESP32_AP-Flasher/data/www/main.js.gz differ diff --git a/ESP32_AP-Flasher/src/web.cpp b/ESP32_AP-Flasher/src/web.cpp index df6b736d..1b423d30 100644 --- a/ESP32_AP-Flasher/src/web.cpp +++ b/ESP32_AP-Flasher/src/web.cpp @@ -297,6 +297,9 @@ void init_web() { if (strcmp(cmdValue, "reset") == 0) { sendTagCommand(mac, CMD_DO_RESET_SETTINGS, !taginfo->isExternal); } + if (strcmp(cmdValue, "deepsleep") == 0) { + sendTagCommand(mac, CMD_DO_DEEPSLEEP, !taginfo->isExternal); + } request->send(200, "text/plain", "Ok, done"); } else { request->send(200, "text/plain", "Error: mac not found"); diff --git a/ESP32_AP-Flasher/wwwroot/content_cards.json b/ESP32_AP-Flasher/wwwroot/content_cards.json index 27227833..08dc92b5 100644 --- a/ESP32_AP-Flasher/wwwroot/content_cards.json +++ b/ESP32_AP-Flasher/wwwroot/content_cards.json @@ -476,7 +476,9 @@ "options": { "0": "Reboot", "1": "Scan Channels", - "2": "Clear settings" + "2": "Clear settings", + "3": "Enter Deep Sleep" + } } ] diff --git a/ESP32_AP-Flasher/wwwroot/index.html b/ESP32_AP-Flasher/wwwroot/index.html index f3433328..2b8cee1d 100644 --- a/ESP32_AP-Flasher/wwwroot/index.html +++ b/ESP32_AP-Flasher/wwwroot/index.html @@ -48,6 +48,7 @@ +

diff --git a/ESP32_AP-Flasher/wwwroot/main.js b/ESP32_AP-Flasher/wwwroot/main.js index 07ee2f61..b1694376 100644 --- a/ESP32_AP-Flasher/wwwroot/main.js +++ b/ESP32_AP-Flasher/wwwroot/main.js @@ -454,6 +454,10 @@ $('#cfgscan').onclick = function () { sendCmd($('#cfgmac').dataset.mac, "scan"); } +$('#cfgdeepsleep').onclick = function () { + sendCmd($('#cfgmac').dataset.mac, "deepsleep"); +} + $('#cfgreset').onclick = function () { sendCmd($('#cfgmac').dataset.mac, "reset"); }