Add more exotic versions to HW detection

This commit is contained in:
Djuri Baars 2024-09-21 18:51:41 +02:00
parent 018b0431df
commit 3cd9fcef46
2 changed files with 12 additions and 4 deletions

View file

@ -70,9 +70,14 @@ class FwUpdater:
def start_firmware_update(self, release_name, address, hw_rev): def start_firmware_update(self, release_name, address, hw_rev):
# self.SetStatusText(f"Starting firmware update") # self.SetStatusText(f"Starting firmware update")
model_name = "lolin_s3_mini_213epd" hw_rev_to_model = {
if (hw_rev == "REV_B_EPD_2_13"): "REV_B_EPD_2_13": "btclock_rev_b_213epd",
model_name = "btclock_rev_b_213epd" "REV_V8_EPD_2_13": "btclock_v8_213epd",
"REV_A_EPD_2_9": "lolin_s3_mini_29epd"
}
model_name = hw_rev_to_model.get(hw_rev, "lolin_s3_mini_213epd")
local_filename = f"{get_app_data_folder()}/{ local_filename = f"{get_app_data_folder()}/{
release_name}_{model_name}_firmware.bin" release_name}_{model_name}_firmware.bin"

View file

@ -60,7 +60,10 @@ class ReleaseChecker:
self.release_name = release_name self.release_name = release_name
filenames_to_download = ["lolin_s3_mini_213epd_firmware.bin", filenames_to_download = ["lolin_s3_mini_213epd_firmware.bin",
"btclock_rev_b_213epd_firmware.bin", "littlefs.bin"] "lolin_s3_mini_29epd_firmware.bin",
"btclock_v8_213epd_firmware.bin",
"btclock_rev_b_213epd_firmware.bin",
"littlefs.bin"]
asset_urls = [asset['browser_download_url'] asset_urls = [asset['browser_download_url']
for asset in latest_release['assets'] if asset['name'] in filenames_to_download] for asset in latest_release['assets'] if asset['name'] in filenames_to_download]