Skip to content

refactor(firmware): Simplify ESP32 firmware check#4272

Merged
jamesarich merged 1 commit into
mainfrom
fix/esp32-detection
Jan 21, 2026
Merged

refactor(firmware): Simplify ESP32 firmware check#4272
jamesarich merged 1 commit into
mainfrom
fix/esp32-detection

Conversation

@jamesarich

Copy link
Copy Markdown
Collaborator

This commit refactors the firmware retrieval process to consistently prioritize Unified OTA binaries for all ESP32-based devices. The logic no longer differentiates based on UI capabilities (like MUI or E-Ink) or an explicit supportsUnifiedOta flag.

This change simplifies the codebase by removing the supportsUnifiedOta property and related special handling, relying instead on the device's architecture to determine the appropriate firmware path.

Key Changes:

  • Unified OTA Priority: The FirmwareRetriever now always attempts to download the architecture-specific Unified OTA binary first for all ESP32 devices (e.g., mt-esp32-ota.bin, mt-esp32s3-ota.bin).
  • Removed supportsUnifiedOta: The supportsUnifiedOta flag has been removed from DeviceHardware, BootloaderOtaQuirk, and the device_bootloader_ota_quirks.json asset file, as it is now redundant.
  • isEsp32Arc Helper: A new isEsp32Arc property was added to the DeviceHardware model to simplify checking if a device is ESP32-based. This is now used in SettingsViewModel to determine OTA availability.

This commit refactors the firmware retrieval process to consistently prioritize Unified OTA binaries for all ESP32-based devices. The logic no longer differentiates based on UI capabilities (like MUI or E-Ink) or an explicit `supportsUnifiedOta` flag.

This change simplifies the codebase by removing the `supportsUnifiedOta` property and related special handling, relying instead on the device's architecture to determine the appropriate firmware path.

### Key Changes:
- **Unified OTA Priority:** The `FirmwareRetriever` now always attempts to download the architecture-specific Unified OTA binary first for all ESP32 devices (e.g., `mt-esp32-ota.bin`, `mt-esp32s3-ota.bin`).
- **Removed `supportsUnifiedOta`:** The `supportsUnifiedOta` flag has been removed from `DeviceHardware`, `BootloaderOtaQuirk`, and the `device_bootloader_ota_quirks.json` asset file, as it is now redundant.
- **`isEsp32Arc` Helper:** A new `isEsp32Arc` property was added to the `DeviceHardware` model to simplify checking if a device is ESP32-based. This is now used in `SettingsViewModel` to determine OTA availability.

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
@github-actions github-actions Bot added the bugfix PR tag label Jan 21, 2026
@codecov

codecov Bot commented Jan 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (85a6900) to head (f35ab1a).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #4272   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files          3       3           
  Lines         23      23           
  Branches       7       7           
=====================================
  Misses        23      23           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jamesarich jamesarich marked this pull request as ready for review January 21, 2026 02:31
@jamesarich jamesarich changed the title refactor(firmware): Simplify ESP32 firmware retrieval logic refactor(firmware): Simplify ESP32 firmware check Jan 21, 2026
@jamesarich jamesarich added this pull request to the merge queue Jan 21, 2026
Merged via the queue into main with commit b73a304 Jan 21, 2026
12 checks passed
@jamesarich jamesarich deleted the fix/esp32-detection branch January 21, 2026 03:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix PR tag

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant