diff --git a/ahoy.code-workspace b/ahoy.code-workspace new file mode 100644 index 000000000..20d5909ee --- /dev/null +++ b/ahoy.code-workspace @@ -0,0 +1,45 @@ +{ + "folders": [ + { + "path": "." + }, + { + "path": "src" + } + ], + "settings": { + "files.associations": { + "algorithm": "cpp", + "array": "cpp", + "chrono": "cpp", + "deque": "cpp", + "format": "cpp", + "forward_list": "cpp", + "functional": "cpp", + "initializer_list": "cpp", + "iterator": "cpp", + "list": "cpp", + "memory": "cpp", + "queue": "cpp", + "random": "cpp", + "regex": "cpp", + "vector": "cpp", + "xhash": "cpp", + "xlocmon": "cpp", + "xlocnum": "cpp", + "xmemory": "cpp", + "xstring": "cpp", + "xtree": "cpp", + "xutility": "cpp", + "*.tcc": "cpp", + "string": "cpp", + "unordered_map": "cpp", + "unordered_set": "cpp", + "string_view": "cpp", + "sstream": "cpp", + "istream": "cpp", + "ostream": "cpp" + }, + "editor.formatOnSave": false + } +} \ No newline at end of file diff --git a/src/CHANGES.md b/src/CHANGES.md index 15dcfba21..316224ab8 100644 --- a/src/CHANGES.md +++ b/src/CHANGES.md @@ -5,6 +5,7 @@ * merge PR: MI-MQTT and last retransmit #1363 * fixed DTU-ID, now built from the unique part of the MAC * fix lang in `/system` #1346 +* added protection to prevent update to wrong firmware (environment check) ## 0.8.56 - 2024-01-15 * potential fix of update problems and random reboots #1359 #1354 diff --git a/src/app.cpp b/src/app.cpp index 6350e9903..8dfcdb4db 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -35,7 +35,7 @@ void app::setup() { } #if defined(ESP32) if(mConfig->cmt.enabled) { - mCmtRadio.setup(&mConfig->serial.debug, &mConfig->serial.privacyLog, &mConfig->serial.printWholeTrace, mConfig->cmt.pinSclk, mConfig->cmt.pinSdio, mConfig->cmt.pinCsb, mConfig->cmt.pinFcsb, false); + mCmtRadio.setup(&mConfig->serial.debug, &mConfig->serial.privacyLog, &mConfig->serial.printWholeTrace, mConfig->cmt.pinSclk, mConfig->cmt.pinSdio, mConfig->cmt.pinCsb, mConfig->cmt.pinFcsb); } #endif #ifdef ETHERNET diff --git a/src/web/RestApi.h b/src/web/RestApi.h index edf92a972..097adac3f 100644 --- a/src/web/RestApi.h +++ b/src/web/RestApi.h @@ -326,8 +326,8 @@ class RestApi { void getHtmlSystem(AsyncWebServerRequest *request, JsonObject obj) { getSysInfo(request, obj.createNestedObject(F("system"))); getGeneric(request, obj.createNestedObject(F("generic"))); - char tmp[100]; - snprintf(tmp, 100, "%s

%s", FACTORY_RESET, BTN_REBOOT); + char tmp[200]; + snprintf(tmp, 200, "%s

%s", FACTORY_RESET, BTN_REBOOT); obj[F("html")] = String(tmp); } diff --git a/src/web/html/update.html b/src/web/html/update.html index 800d9dfed..52ace5f12 100644 --- a/src/web/html/update.html +++ b/src/web/html/update.html @@ -23,17 +23,34 @@ {#HTML_FOOTER}