Skip to content

Simulated interface now tracks current firmware versions and supports in-sim firmware updates - #33

Draft
peterhollender with Copilot wants to merge 6 commits into
mainfrom
copilot/update-simulated-interface-fw-version
Draft

Simulated interface now tracks current firmware versions and supports in-sim firmware updates#33
peterhollender with Copilot wants to merge 6 commits into
mainfrom
copilot/update-simulated-interface-fw-version

Conversation

Copilot AI commented Sep 4, 2026

Copy link
Copy Markdown

The simulator was returning stale hard-coded TX/HV firmware versions, which triggered false update-required warnings in app flows. This change aligns simulator version/reporting behavior with bundled firmware artifacts and enables firmware update paths to mutate simulated device state.

  • Dynamic firmware defaults (no hard-coded stale versions)

    • SimulatedTxDevice and SimulatedHVController now default to latest bundled versions from openlifu_sdk.util.firmware.
    • TX user config fw_ver now initializes from that resolved version.
  • Version override support at construction

    • SimulatedLIFUInterface accepts:
      • firmware_version (shared default)
      • tx_firmware_version
      • hv_firmware_version
    • Supports deterministic simulation scenarios for older/newer firmware cohorts.
  • Simulated firmware update behavior

    • Added update semantics to simulated TX/HV controllers:
      • no args → apply latest bundled firmware version
      • firmware_version=... → force explicit target
      • package_file=... → parse target version from image metadata
    • TX updates also mutate read_config(...).json_data["fw_ver"] and refresh updated.
  • Public firmware utility surface

    • Exposed get_firmware_version(path) in openlifu_sdk.util.firmware to avoid cross-module private helper use.
  • Focused simulator firmware tests

    • New unit tests cover:
      • bundled-version defaults
      • constructor overrides
      • update mutation effects
      • no-arg “update to latest”
      • package-file version extraction
      • progress callback exception propagation
from openlifu_sdk.ui.simulated_interface import SimulatedLIFUInterface

iface = SimulatedLIFUInterface(firmware_version="1.0.0")
iface.txdevice.update_firmware(module=0)  # -> latest bundled TX firmware
iface.hvcontroller.update_firmware(firmware_version="1.2.6")

print(iface.txdevice.get_version())                   # e.g. "v2.0.8"
print(iface.txdevice.read_config().json_data["fw_ver"])  # "2.0.8"
print(iface.hvcontroller.get_version())               # "v1.2.6"

Copilot AI and others added 5 commits September 4, 2026 15:20
Co-authored-by: peterhollender <6217005+peterhollender@users.noreply.github.com>
Co-authored-by: peterhollender <6217005+peterhollender@users.noreply.github.com>
Co-authored-by: peterhollender <6217005+peterhollender@users.noreply.github.com>
Co-authored-by: peterhollender <6217005+peterhollender@users.noreply.github.com>
Co-authored-by: peterhollender <6217005+peterhollender@users.noreply.github.com>
Copilot AI changed the title [WIP] Update simulated interface to retrieve latest firmware version Simulated interface now tracks current firmware versions and supports in-sim firmware updates Sep 4, 2026
Copilot AI requested a review from peterhollender September 4, 2026 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Simulated Interface fw version is out of date

2 participants