FirmwareUpdateState

Types

Link copied to clipboard
data class AwaitingFileSave(val uf2Artifact: FirmwareArtifact, val fileName: String) : FirmwareUpdateState

UF2 file is ready; waiting for the user to choose a save location (USB flow).

Link copied to clipboard

Resolving device hardware and fetching available firmware releases.

Link copied to clipboard
data class Downloading(val progressState: ProgressState) : FirmwareUpdateState

Firmware file is being downloaded from the release server.

Link copied to clipboard
data class Error(val error: UiText) : FirmwareUpdateState

An error occurred at any stage of the update pipeline.

Link copied to clipboard

No update activity — initial state before FirmwareUpdateViewModel.checkForUpdates runs.

Link copied to clipboard
data class Processing(val progressState: ProgressState) : FirmwareUpdateState

Intermediate processing (e.g. extracting, preparing DFU).

Link copied to clipboard
data class Ready(val release: FirmwareRelease?, val deviceHardware: DeviceHardware, val address: String, val showBootloaderWarning: Boolean, val updateMethod: FirmwareUpdateMethod, val currentFirmwareVersion: String? = null) : FirmwareUpdateState

Device and release info resolved; the user may initiate an update.

Link copied to clipboard

The firmware update completed and the device reconnected successfully.

Link copied to clipboard
data class Updating(val progressState: ProgressState) : FirmwareUpdateState

Firmware is actively being written to the device.

Link copied to clipboard

The device did not reconnect within the expected timeout after flashing.

Link copied to clipboard

Waiting for the device to reboot and reconnect after a successful flash.