diff --git a/ESP32_AP-Flasher/data/www/content_cards.json.gz b/ESP32_AP-Flasher/data/www/content_cards.json.gz index a06edadc..0977c766 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/edit.html.gz b/ESP32_AP-Flasher/data/www/edit.html.gz index b94cbe01..a5610f1f 100644 Binary files a/ESP32_AP-Flasher/data/www/edit.html.gz and b/ESP32_AP-Flasher/data/www/edit.html.gz differ diff --git a/ESP32_AP-Flasher/data/www/flash.js.gz b/ESP32_AP-Flasher/data/www/flash.js.gz index 572e6792..f7ddd013 100644 Binary files a/ESP32_AP-Flasher/data/www/flash.js.gz and b/ESP32_AP-Flasher/data/www/flash.js.gz differ diff --git a/ESP32_AP-Flasher/data/www/index.html.gz b/ESP32_AP-Flasher/data/www/index.html.gz index 97b5cff8..bb327a2d 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/jsontemplate-demo.html.gz b/ESP32_AP-Flasher/data/www/jsontemplate-demo.html.gz index 0d7ef3ce..1a93cab6 100644 Binary files a/ESP32_AP-Flasher/data/www/jsontemplate-demo.html.gz and b/ESP32_AP-Flasher/data/www/jsontemplate-demo.html.gz differ diff --git a/ESP32_AP-Flasher/data/www/main.css.gz b/ESP32_AP-Flasher/data/www/main.css.gz index 8204db0e..500a1191 100644 Binary files a/ESP32_AP-Flasher/data/www/main.css.gz and b/ESP32_AP-Flasher/data/www/main.css.gz differ diff --git a/ESP32_AP-Flasher/data/www/main.js.gz b/ESP32_AP-Flasher/data/www/main.js.gz index 9923adf2..00f2ffee 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/data/www/ota.js.gz b/ESP32_AP-Flasher/data/www/ota.js.gz index 67725136..749ac7e4 100644 Binary files a/ESP32_AP-Flasher/data/www/ota.js.gz and b/ESP32_AP-Flasher/data/www/ota.js.gz differ diff --git a/ESP32_AP-Flasher/data/www/painter.js.gz b/ESP32_AP-Flasher/data/www/painter.js.gz index 59b29f9b..203bc2fa 100644 Binary files a/ESP32_AP-Flasher/data/www/painter.js.gz and b/ESP32_AP-Flasher/data/www/painter.js.gz differ diff --git a/ESP32_AP-Flasher/data/www/setup.html.gz b/ESP32_AP-Flasher/data/www/setup.html.gz index e6ed5f76..815b7740 100644 Binary files a/ESP32_AP-Flasher/data/www/setup.html.gz and b/ESP32_AP-Flasher/data/www/setup.html.gz differ diff --git a/ESP32_AP-Flasher/data/www/setup.js.gz b/ESP32_AP-Flasher/data/www/setup.js.gz index eaac7eb4..32cc8bc8 100644 Binary files a/ESP32_AP-Flasher/data/www/setup.js.gz and b/ESP32_AP-Flasher/data/www/setup.js.gz differ diff --git a/ESP32_AP-Flasher/data/www/upload-demo.html.gz b/ESP32_AP-Flasher/data/www/upload-demo.html.gz index 51a7ab33..a2a5d84e 100644 Binary files a/ESP32_AP-Flasher/data/www/upload-demo.html.gz and b/ESP32_AP-Flasher/data/www/upload-demo.html.gz differ diff --git a/ESP32_AP-Flasher/data/www/variables-demo.html.gz b/ESP32_AP-Flasher/data/www/variables-demo.html.gz index e5846ccf..71024ec1 100644 Binary files a/ESP32_AP-Flasher/data/www/variables-demo.html.gz and b/ESP32_AP-Flasher/data/www/variables-demo.html.gz differ diff --git a/ESP32_AP-Flasher/include/tag_db.h b/ESP32_AP-Flasher/include/tag_db.h index a22458b6..8a5331f7 100644 --- a/ESP32_AP-Flasher/include/tag_db.h +++ b/ESP32_AP-Flasher/include/tag_db.h @@ -54,6 +54,7 @@ class tagRecord { struct Config { uint8_t channel; + uint8_t subghzchannel; char alias[32]; uint8_t led; uint8_t tft; diff --git a/ESP32_AP-Flasher/platformio.ini b/ESP32_AP-Flasher/platformio.ini index fb95ac22..2e4ce048 100644 --- a/ESP32_AP-Flasher/platformio.ini +++ b/ESP32_AP-Flasher/platformio.ini @@ -257,6 +257,7 @@ build_flags = -D SERIAL_FLASHER_BOOT_HOLD_TIME_MS=50 -D SERIAL_FLASHER_RESET_HOLD_TIME_MS=100 -D C6_OTA_FLASHING + -D HAS_SUBGHZ build_src_filter = +<*>--- board_build.flash_mode=qio diff --git a/ESP32_AP-Flasher/src/newproto.cpp b/ESP32_AP-Flasher/src/newproto.cpp index fb4bdcb8..0ae6d099 100644 --- a/ESP32_AP-Flasher/src/newproto.cpp +++ b/ESP32_AP-Flasher/src/newproto.cpp @@ -640,8 +640,11 @@ void setAPchannel() { udpsync.getAPList(); } else { if (curChannel.channel != config.channel) { - curChannel.channel = config.channel; - sendChannelPower(&curChannel); + curChannel.channel = config.channel; +#ifdef HAS_SUBGHZ + curChannel.subghzchannel = config.subghzchannel; +#endif + sendChannelPower(&curChannel); } } } diff --git a/ESP32_AP-Flasher/src/tag_db.cpp b/ESP32_AP-Flasher/src/tag_db.cpp index ef8aa815..c394679c 100644 --- a/ESP32_AP-Flasher/src/tag_db.cpp +++ b/ESP32_AP-Flasher/src/tag_db.cpp @@ -315,6 +315,7 @@ void initAPconfig() { configFile.close(); } config.channel = APconfig.containsKey("channel") ? APconfig["channel"] : 0; + config.subghzchannel = APconfig.containsKey("subghzchannel") ? APconfig["subghzchannel"] : 0; if (APconfig["alias"]) strlcpy(config.alias, APconfig["alias"], sizeof(config.alias)); config.led = APconfig.containsKey("led") ? APconfig["led"] : 255; config.tft = APconfig.containsKey("tft") ? APconfig["tft"] : 255; @@ -343,6 +344,7 @@ void saveAPconfig() { fs::File configFile = contentFS->open("/current/apconfig.json", "w"); DynamicJsonDocument APconfig(500); APconfig["channel"] = config.channel; + APconfig["subghzchannel"] = config.subghzchannel; APconfig["alias"] = config.alias; APconfig["led"] = config.led; APconfig["tft"] = config.tft; diff --git a/ESP32_AP-Flasher/src/web.cpp b/ESP32_AP-Flasher/src/web.cpp index 22477967..0b6af745 100644 --- a/ESP32_AP-Flasher/src/web.cpp +++ b/ESP32_AP-Flasher/src/web.cpp @@ -509,6 +509,13 @@ void init_web() { #else response->print("\"hasBLE\": \"0\", "); #endif + +#ifdef HAS_SUBGHZ + response->print("\"hasSubGhz\": \"1\", "); +#else + response->print("\"hasSubGhz\": \"0\", "); +#endif + response->print("\"apstate\": \"" + String(apInfo.state) + "\""); File configFile = contentFS->open("/current/apconfig.json", "r"); @@ -542,6 +549,9 @@ void init_web() { if (request->hasParam("channel", true)) { config.channel = static_cast(request->getParam("channel", true)->value().toInt()); } + if (request->hasParam("subghzchannel", true)) { + config.subghzchannel = static_cast(request->getParam("subghzchannel", true)->value().toInt()); + } if (request->hasParam("led", true)) { config.led = static_cast(request->getParam("led", true)->value().toInt()); updateBrightnessFromConfig(); diff --git a/ESP32_AP-Flasher/wwwroot/index.html b/ESP32_AP-Flasher/wwwroot/index.html index 2a72504f..aa62c295 100644 --- a/ESP32_AP-Flasher/wwwroot/index.html +++ b/ESP32_AP-Flasher/wwwroot/index.html @@ -289,6 +289,24 @@ options:

+

+ + +