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

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: () -> Unit, val onPickFile: () -> Unit, val onSaveFile: (String) -> 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, nodeRepository: NodeRepository, radioController: RadioController, radioPrefs: RadioPrefs, bootloaderWarningDataSource: BootloaderWarningDataSource, firmwareUpdateManager: FirmwareUpdateManager, usbManager: FirmwareUsbManager, fileHandler: FirmwareFileHandler, applicationScope: ApplicationCoroutineScope) : 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 ProgressState(val message: UiText = UiText.DynamicString(""), val progress: Float = 0.0f, val details: String? = null)

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

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
fun FirmwareUpdateScreen(onNavigateUp: () -> Unit, viewModel: FirmwareUpdateViewModel, modifier: Modifier = Modifier)