Browse Source

0.8.122

* fix github action
pull/1541/head
lumapu 8 months ago
parent
commit
d8a1528c99
  1. 7
      .github/workflows/compile_development.yml
  2. 2
      src/CHANGES.md
  3. 9
      src/web/RestApi.h

7
.github/workflows/compile_development.yml

@ -70,6 +70,11 @@ jobs:
- name: Run PlatformIO
run: pio run -d src -e ${{ matrix.variant }}
- name: Compress .elf
uses: edgarrc/action-7z@v1
with:
args: 7z a -t7z -mx=9 src/.pio/build/${{ matrix.variant }}/firmware.elf.7z src/.pio/build/${{ matrix.variant }}/firmware.elf
- name: Rename Firmware
run: python scripts/getVersion.py ${{ matrix.variant }} >> $GITHUB_OUTPUT
@ -135,7 +140,7 @@ jobs:
- name: Compress .elf
uses: edgarrc/action-7z@v1
with:
args: 7z a -t7z -mx=9 src/.pio/build/${{ matrix.variant }}firmware.elf.7z src/.pio/build/${{ matrix.variant }}firmware.elf
args: 7z a -t7z -mx=9 src/.pio/build/${{ matrix.variant }}/firmware.elf.7z src/.pio/build/${{ matrix.variant }}/firmware.elf
- name: Rename Firmware
run: python scripts/getVersion.py ${{ matrix.variant }} >> $GITHUB_OUTPUT

2
src/CHANGES.md

@ -1,7 +1,7 @@
# Development Changes
## 0.8.122 - 2024-05-23
* add button for donwloading coredump
* add button for donwloading coredump (ESP32 variants only)
## 0.8.121 - 2024-05-20
* fix ESP32 factory image generation

9
src/web/RestApi.h

@ -55,7 +55,9 @@ class RestApi {
mSrv->on("/api", HTTP_GET, std::bind(&RestApi::onApi, this, std::placeholders::_1));
mSrv->on("/get_setup", HTTP_GET, std::bind(&RestApi::onDwnldSetup, this, std::placeholders::_1));
#if defined(ESP32)
mSrv->on("/coredump", HTTP_GET, std::bind(&RestApi::getCoreDump, this, std::placeholders::_1));
#endif
}
uint32_t getTimezoneOffset(void) {
@ -349,6 +351,7 @@ class RestApi {
fp.close();
}
#if defined(ESP32)
void getCoreDump(AsyncWebServerRequest *request) {
const esp_partition_t *partition = esp_partition_find_first(ESP_PARTITION_TYPE_DATA, ESP_PARTITION_SUBTYPE_DATA_COREDUMP, "coredump");
if (partition != NULL) {
@ -375,6 +378,7 @@ class RestApi {
request->send(response);
}
}
#endif
void getGeneric(AsyncWebServerRequest *request, JsonObject obj) {
mApp->resetLockTimeout();
@ -463,8 +467,13 @@ class RestApi {
void getHtmlSystem(AsyncWebServerRequest *request, JsonObject obj) {
getSysInfo(request, obj.createNestedObject(F("system")));
getGeneric(request, obj.createNestedObject(F("generic")));
#if defined(ESP32)
char tmp[300];
snprintf(tmp, 300, "<a href=\"/factory\" class=\"btn\">%s</a><br/><br/><a href=\"/reboot\" class=\"btn\">%s</a><br/><br/><a href=\"/coredump\" class=\"btn\">%s</a>", FACTORY_RESET, BTN_REBOOT, BTN_COREDUMP);
#else
char tmp[200];
snprintf(tmp, 200, "<a href=\"/factory\" class=\"btn\">%s</a><br/><br/><a href=\"/reboot\" class=\"btn\">%s</a>", FACTORY_RESET, BTN_REBOOT);
#endif
obj[F("html")] = String(tmp);
}

Loading…
Cancel
Save