From 4efbc035bac1b68474d7a8e8be3f6d4ec8fbf7e6 Mon Sep 17 00:00:00 2001 From: jpirnay Date: Tue, 21 Apr 2026 21:47:30 +0200 Subject: [PATCH] Try resetting the version info --- .github/workflows/release.yml | 22 ++++++++++++++++++++++ .github/workflows/release_candidate.yml | 14 ++++++++++++++ platformio.ini | 2 +- src/main.cpp | 2 ++ 4 files changed, 39 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index aae332c1..360e9076 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,6 +28,28 @@ jobs: - name: Build CrossPoint run: pio run -e gh_release + - name: Patch min_chip_rev_full to 0 + run: | + python3 - <<'EOF' + import struct, sys + # esp_image_header_t (8 bytes) + extended header: + # offset 0: wp_pin (B) + # offset 1: clk/q drv (B) + # offset 2: d/cs drv (B) + # offset 3: hd/wp drv (B) + # offset 4: chip_id (H, 2 bytes) + # offset 6: min_rev (B) + # offset 7: min_rev_full (H, 2 bytes) <-- patch target + MIN_REV_FULL_OFFSET = 8 + 7 + path = ".pio/build/gh_release/firmware.bin" + with open(path, "r+b") as f: + f.seek(MIN_REV_FULL_OFFSET) + old = struct.unpack(" 0.0") + f.seek(MIN_REV_FULL_OFFSET) + f.write(struct.pack(" 0.0") + f.seek(MIN_REV_FULL_OFFSET) + f.write(struct.pack("