Package-level declarations

Types

Link copied to clipboard
class AndroidFirmwareFileHandler(context: Context, client: HttpClient) : FirmwareFileHandler

Helper class to handle file operations related to firmware updates, such as downloading, copying from URI, and extracting specific files from Zip archives.

Link copied to clipboard

Manages USB-related interactions for firmware updates.

Link copied to clipboard
class DefaultFirmwareUpdateManager(radioPrefs: RadioPrefs, secureDfuHandler: SecureDfuHandler, usbUpdateHandler: UsbUpdateHandler, esp32OtaUpdateHandler: Esp32OtaUpdateHandler) : FirmwareUpdateManager

Default FirmwareUpdateManager that routes to the correct handler based on the current connection type and device architecture. All handlers are KMP-ready and work on Android, Desktop, and (future) iOS.

Link copied to clipboard
data class FirmwareArtifact(val uri: CommonUri, val fileName: String? = null, val isTemporary: Boolean = false)

Platform-neutral handle for a firmware file or extracted artifact.

Link copied to clipboard

Abstraction over platform file and network I/O required by the firmware update pipeline. Implementations live in androidMain and jvmMain.

Link copied to clipboard
open class FirmwareRetriever(fileHandler: FirmwareFileHandler)

Retrieves firmware files, either by direct download or by extracting from a release asset zip.

Link copied to clipboard
data class FirmwareUpdateActions(val onReleaseTypeSelect: (FirmwareReleaseType) -> Unit, val onStartUpdate: (Boolean) -> Unit, val onPickFile: () -> Unit, val onSaveFile: (String) -> Unit, val onPickVolume: () -> Unit, val onBootloaderUpgrade: () -> Unit, val onConfirmLocalFile: () -> Unit, val onDismissLocalFile: () -> Unit, val onRetry: () -> Unit, val onCancel: () -> Unit, val onDone: () -> Unit, val onDismissBootloaderWarning: () -> Unit)
Link copied to clipboard

Common interface for all firmware update handlers (BLE DFU, ESP32 OTA, USB).

Link copied to clipboard

Routes firmware update requests to the appropriate platform-specific handler based on the active connection type (BLE, WiFi/TCP, or USB) and device architecture.

Link copied to clipboard

The transport mechanism used to deliver firmware to the device, determined by the active radio connection.

Link copied to clipboard
sealed interface FirmwareUpdateState

State machine for the firmware update flow, observed by FirmwareUpdateScreen.

Link copied to clipboard
class FirmwareUpdateViewModel(firmwareReleaseRepository: FirmwareReleaseRepository, deviceHardwareRepository: DeviceHardwareRepository, maintenanceUf2Repository: MaintenanceUf2Repository, nodeRepository: NodeRepository, radioController: RadioController, radioPrefs: RadioPrefs, bootloaderWarningDataSource: BootloaderWarningDataSource, firmwareRecoveryDataSource: FirmwareRecoveryDataSource, firmwareUpdateManager: FirmwareUpdateManager, usbManager: FirmwareUsbManager, fileHandler: FirmwareFileHandler, firmwareRetriever: FirmwareRetriever, firmwareMaintenanceLock: FirmwareMaintenanceLock, applicationScope: ApplicationCoroutineScope, hiddenFeaturesUnlock: HiddenFeaturesUnlock, analytics: PlatformAnalytics, nodeRestartTracker: NodeRestartTracker) : ViewModel

ViewModel driving the firmware update screen. Coordinates release checking, file retrieval, transport-specific update execution, and post-update device verification.

Link copied to clipboard
Link copied to clipboard
class JvmFirmwareFileHandler(client: HttpClient) : FirmwareFileHandler
Link copied to clipboard
data class PendingLocalFirmwareFile(val uri: CommonUri, val fileName: String, val deviceName: String, val platformioTarget: String, val updateMethod: FirmwareUpdateMethod, val address: String)
Link copied to clipboard
data class ProgressState(val message: UiText = UiText.DynamicString(""), val progress: Float = 0.0f, val details: String? = null, val hint: UiText? = null)

Represents the progress of a long-running firmware update task.

Link copied to clipboard

Which leg of a multi-pass USB/UF2 sequence a file-save prompt belongs to.

Link copied to clipboard
data class UsbMaintenanceGate(val show: Boolean = false, val eraseRefusal: UsbMaintenanceRefusal? = null, val showBootloaderUpgrade: Boolean = false)

Which maintenance affordances the Ready state should show, precomputed by the ViewModel.

Link copied to clipboard

Why a maintenance action cannot run. Surfaced as explanatory copy rather than silently hiding the action.

Link copied to clipboard

A maintenance operation the user can start from the Ready state.

Link copied to clipboard
class UsbUpdateHandler(firmwareRetriever: FirmwareRetriever, radioController: RadioController, nodeRepository: NodeRepository) : FirmwareUpdateHandler

Handles firmware updates via USB Mass Storage (UF2).

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun FirmwareUpdateScreen(onNavigateUp: () -> Unit, viewModel: FirmwareUpdateViewModel, modifier: Modifier = Modifier)
Link copied to clipboard
Link copied to clipboard