diff --git a/.forgejo/workflows/push.yaml b/.forgejo/workflows/push.yaml index 219205f..02458ae 100644 --- a/.forgejo/workflows/push.yaml +++ b/.forgejo/workflows/push.yaml @@ -142,10 +142,7 @@ jobs: shell: bash run: | fs_file=$(find .pio/build/${{ matrix.chip.name }}_${{ matrix.epd_variant }} -name "littlefs*.bin") - echo $fs_file - fs_name=$(basename "$fs_file") - shasum -a 256 "$fs_file" | awk '{print $1}' > "${{ matrix.chip.name }}_${{ matrix.epd_variant }}/${fs_name}.sha256" - cat "${{ matrix.chip.name }}_${{ matrix.epd_variant }}/${fs_name}.sha256" + shasum -a 256 "$fs_file" | awk '{print $1}' > "${fs_file}.sha256" - name: Copy all artifacts to output folder run: cp .pio/build/${{ matrix.chip.name }}_${{ matrix.epd_variant }}/*.bin .pio/boot_app0.bin ${{ matrix.chip.name }}_${{ matrix.epd_variant }} diff --git a/src/lib/config.cpp b/src/lib/config.cpp index 8c387ba..2f5e062 100644 --- a/src/lib/config.cpp +++ b/src/lib/config.cpp @@ -810,19 +810,6 @@ const char* getFirmwareFilename() { } } -const char* getWebUiFilename() { - if (HW_REV == "REV_B_EPD_2_13") { - return "littlefs_8MB.bin"; - } else if (HW_REV == "REV_A_EPD_2_13") { - return "littlefs_4MB.bin"; - } else if (HW_REV == "REV_A_EPD_2_9") { - return "littlefs_4MB.bin"; - } else { - return "littlefs_4MB.bin"; - } -} - - // void loadIcons() { // size_t ocean_logo_size = 886; diff --git a/src/lib/config.hpp b/src/lib/config.hpp index 87dd4d6..a0153f5 100644 --- a/src/lib/config.hpp +++ b/src/lib/config.hpp @@ -85,5 +85,5 @@ void addScreenMapping(int value, const char* name); int findScreenIndexByValue(int value); String replaceAmbiguousChars(String input); const char* getFirmwareFilename(); -const char* getWebUiFilename(); + // void loadIcons(); \ No newline at end of file diff --git a/src/lib/ota.cpp b/src/lib/ota.cpp index 05c45e1..1800f76 100644 --- a/src/lib/ota.cpp +++ b/src/lib/ota.cpp @@ -171,13 +171,14 @@ int downloadUpdateHandler(char updateType) break; case UPDATE_WEBUI: { - latestRelease = getLatestRelease(getWebUiFilename()); + latestRelease = getLatestRelease("littlefs.bin"); // updateWebUi(latestRelease.fileUrl, U_SPIFFS); // return 0; } break; } + // First, download the expected SHA256 String expectedSHA256 = downloadSHA256(latestRelease.checksumUrl); if (expectedSHA256.isEmpty())