FirmwareUpdateViewModel
ViewModel driving the firmware update screen. Coordinates release checking, file retrieval, transport-specific update execution, and post-update device verification.
Constructors
Properties
The Last-Fault: a drive reported during the current USB maintenance sequence. The bootloader prints the record once, so the first one read is kept for the rest of the sequence, past the reboot that drops it from the drive.
True where the USB firmware pass is written by picking the device's drive, so INFO_UF2.TXT is read and the drive vetted first. Elsewhere the image is saved through a file picker, which grants access to that file only.
Functions
Writes the reviewed bootloader upgrade to the drive the review read.
Waits again for a flashed device to come back after FirmwareUpdateState.VerificationFailed.
Moves on to reinstalling the firmware without writing the bootloader, so nothing destructive has happened.
Upgrades the bootloader over BLE with the Ready state's package, then reinstalls the selected release.
Resumes a maintenance sequence once the user has pointed at the device's UF2 volume.
Writes the pending USB pass to the drive the user picked: the next maintenance pass, or a plain update.