Package-level declarations

Types

Link copied to clipboard
sealed interface DeviceModelState
Link copied to clipboard
class DeviceModelViewModel(repository: DeviceModelRepository, displayMirrorManager: DisplayMirrorManager, adminController: AdminController, nodeRepository: NodeRepository, radioConfigRepository: RadioConfigRepository, dispatchers: CoroutineDispatchers) : ViewModel

Fetches a device's GLB and the bounds the viewer frames it with; one model at a time, the last request wins.

Link copied to clipboard
enum class HopWindow : Enum<HopWindow>

"Last heard" windows offered above the histogram. A null hours means no time filter (all known nodes).

Link copied to clipboard
data class NodeFilterToggles(val includeUnknown: Boolean, val onToggleIncludeUnknown: () -> Unit, val excludeInfrastructure: Boolean, val onToggleExcludeInfrastructure: () -> Unit, val onlyOnline: Boolean, val onToggleOnlyOnline: () -> Unit, val onlyDirect: Boolean, val onToggleOnlyDirect: () -> Unit, val showIgnored: Boolean, val onToggleShowIgnored: () -> Unit, val ignoredNodeCount: Int, val excludeUnheard: Boolean, val onToggleExcludeUnheard: () -> Unit, val excludeMqtt: Boolean, val onToggleExcludeMqtt: () -> Unit, val onlySigned: Boolean, val onToggleOnlySigned: () -> Unit, val onlyEncrypted: Boolean, val onToggleOnlyEncrypted: () -> Unit)
Link copied to clipboard
sealed class NodeMenuAction

Properties

Link copied to clipboard

Tag for the collapsed node search field, so a test can target it rather than the expanded overlay's copy.

Functions

Link copied to clipboard
fun AdministrationSection(node: Node, metricsState: MetricsState, onAction: (NodeDetailAction) -> Unit, onFirmwareSelect: (FirmwareRelease) -> Unit, sessionStatus: SessionStatus, isEnsuringSession: Boolean, modifier: Modifier = Modifier)
Link copied to clipboard

A status register setting a fault (fan, bit 4), a warning (fan speed, bit 21) and a bit this build does not name (bit

Link copied to clipboard
fun BananaToggle(checked: Boolean, onCheckedChange: (Boolean) -> Unit, modifier: Modifier = Modifier, colors: IconToggleButtonColors = IconButtonDefaults.iconToggleButtonColors(checkedContainerColor = MaterialTheme.colorScheme.secondaryContainer))

Stands a real-size banana beside the model, or takes it away.

Link copied to clipboard
fun CompassSheetContent(uiState: CompassUiState, onRequestLocationPermission: () -> Unit, onOpenLocationSettings: () -> Unit, onRequestPosition: () -> Unit, modifier: Modifier = Modifier, onOpenMeshHud: () -> Unit? = null)
Link copied to clipboard
fun CooldownIconButton(onClick: () -> Unit, cooldownTimestamp: Long?, modifier: Modifier = Modifier, cooldownDuration: Long = COOL_DOWN_TIME_MS, content: @Composable () -> Unit)
Link copied to clipboard
fun CooldownOutlinedIconButton(onClick: () -> Unit, cooldownTimestamp: Long?, modifier: Modifier = Modifier, cooldownDuration: Long = COOL_DOWN_TIME_MS, content: @Composable () -> Unit)
Link copied to clipboard
fun DeviceActions(node: Node, ourNode: Node?, lastTracerouteTime: Long?, lastRequestNeighborsTime: Long?, availableLogs: Set<LogsType>, onAction: (NodeDetailAction) -> Unit, displayUnits: MeasurementSystem, isFahrenheit: Boolean, modifier: Modifier = Modifier, isLocal: Boolean = false, hasConversation: Boolean = false, airQualityHistory: List<Telemetry> = emptyList(), trackedInLiveUpdate: Boolean? = null, canRequestNeighborInfo: Boolean = false)
Link copied to clipboard
fun DeviceLinksSection(links: List<DeviceLink>, modifier: Modifier = Modifier)

Collapsible "I want one" section listing msh.to vendor/variant and marketplace links for the viewed device. Renders nothing when there are no matching links. Ported from the Meshtastic-Apple DeviceLinksSection.

Link copied to clipboard
fun DeviceModelDialog(deviceHardware: DeviceHardware, onDismiss: () -> Unit, modifier: Modifier = Modifier, mirrorScreen: Boolean = false)

The hardware's real-size 3D model, orbitable, over the whole window; the illustration when it cannot be shown.

Link copied to clipboard
fun SceneScope.DeviceScreenNode(screenMin: FloatArray, screenMax: FloatArray, frame: MirrorFrame)

The frame on a plane just proud of the display glass, facing +Z like the flasher's models. The node is created once and fed new bitmaps: replacing it would make SceneView re-center the whole scene on every frame.

Link copied to clipboard
fun DisplayNameDialog(node: Node, onSave: (Int, String) -> Unit, onDismiss: () -> Unit)

Node-list entry point for the local display name. Saving an empty name clears it.

Link copied to clipboard
fun DisplayNameSection(node: Node, onSaveDisplayName: (Int, String) -> Unit, modifier: Modifier = Modifier)

Edits the local-only display name. The broadcast long name is the placeholder, so the user sees what is replaced.

Link copied to clipboard

Temperature and humidity for context, plus the AS3935 pair that shares a column.

Link copied to clipboard
fun FirmwareReleaseSheetContent(firmwareRelease: FirmwareRelease, modifier: Modifier = Modifier)
Link copied to clipboard
fun hopHistogram(nodes: List<Node>, cutoffSecs: Int?): List<Int>

Counts nodes at each hop distance, as a list indexed by hop (element 0 = direct nodes). The list is contiguous from hop 0 up to the furthest hop observed, so zero-count gaps in the middle are preserved. Nodes with an unknown hop (hopsAway < 0) are excluded. When cutoffSecs is non-null, only nodes with lastHeard >= cutoffSecs are counted. Returns an empty list when nothing qualifies.

Link copied to clipboard
fun InfoCard(text: String, value: String, modifier: Modifier = Modifier, icon: ImageVector? = null, iconRes: DrawableResource? = null, rotateIcon: Float = 0.0f, valueColor: Color = MaterialTheme.colorScheme.onSurface)
Link copied to clipboard
fun LinkedCoordinatesItem(node: Node, displayUnits: MeasurementSystem = MeasurementSystem.METRIC)
Link copied to clipboard
fun LocalNodeContextMenu(expanded: Boolean, onDismiss: () -> Unit, onUpdateStatus: () -> Unit? = null, onEditName: () -> Unit? = null, onShareContact: () -> Unit? = null)

A menu of its own: favoriting, muting, messaging or removing yourself is meaningless (design#115). Each action is absent, never disabled, when its callback is null: update status, edit the broadcast name in device settings, and share our contact.

Link copied to clipboard
fun ModelNotice(notice: String, modifier: Modifier = Modifier, contentColor: Color = MaterialTheme.colorScheme.onSurfaceVariant, containerColor: Color = MaterialTheme.colorScheme.surfaceContainerHigh)

The model file's own copyright notice behind an info button, shut until tapped, as the maps carry their credit. The text is the owner's, so it is never translated or cut.

Link copied to clipboard
fun NodeContextMenu(expanded: Boolean, node: Node, ourNode: Node?, onFavorite: () -> Unit, onMute: () -> Unit, onMessage: () -> Unit, onTraceRoute: () -> Unit, lastTracerouteTime: Long?, onIgnore: () -> Unit, onRemove: () -> Unit, onDismiss: () -> Unit, onOpenMeshView: () -> Unit = {}, onOpenCompass: () -> Unit = {}, onSetDisplayName: () -> Unit = {})

Shared context menu for node actions (message, display name, favorite, mute, trace route, compass, mesh view, ignore, remove). Message then display name lead on every client, and platform-only items sit before ignore (design#171).

Link copied to clipboard
fun NodeCountSummary(onlineCount: Int, shownCount: Int, totalCount: Int, modifier: Modifier = Modifier)

Node totals for the Nodes list header: how many nodes are online, how many the current filter shows, and how many are known in total.

Link copied to clipboard
@Preview(name = "NodeCountSummary - default", widthDp = 360)
fun NodeCountSummaryDefaultPreview()

Default case on a narrow (compact-width) phone.

Link copied to clipboard
@Preview(name = "NodeCountSummary - font scale 2x", widthDp = 360, fontScale = 2.0)
fun NodeCountSummaryLargeFontPreview()

Accessibility text size: largest Android font scale.

@Preview(name = "NodeCountSummary - long locale font scale 2x", widthDp = 320, fontScale = 2.0)
fun NodeCountSummaryLongLocaleLargeFontPreview()

Worst case: verbose locale AND largest font scale on a narrow phone.

Link copied to clipboard
@Preview(name = "NodeCountSummary - long locale", widthDp = 320)
fun NodeCountSummaryLongLocalePreview()

Long/translated text: verbose locale on a narrow phone.

Link copied to clipboard
@Preview(name = "NodeCountSummary - narrow 320dp", widthDp = 320)
fun NodeCountSummaryNarrowPreview()

Narrowest realistic phone width — labels must reflow, never ellipsize.

Link copied to clipboard
@Preview(name = "NodeCountSummary - wide 840dp", widthDp = 840)
fun NodeCountSummaryWidePreview()

Wide/tablet layout — the labels stay on one line and the block does not stretch awkwardly.

Link copied to clipboard
fun NodeDetailsSection(node: Node, modifier: Modifier = Modifier, deviceHardware: DeviceHardware? = null, reportedTarget: String? = null, isLocal: Boolean = false, onRequestUserInfo: () -> Unit? = null, hasDeviceModel: Boolean = false, onOpenDeviceModel: (DeviceHardware) -> Unit? = null)
Link copied to clipboard
fun NodeFilterSearchBar(filterText: String, onTextChange: (String) -> Unit, currentSortOption: NodeSortOption, onSortSelect: (NodeSortOption) -> Unit, toggles: NodeFilterToggles, modifier: Modifier = Modifier, searchResults: @Composable ColumnScope.() -> Unit = {})

The node list's search field: a Material 3 MeshtasticSearchBar whose expanded surface shows the matching nodes, with the sort and filter menu as its trailing action.

Link copied to clipboard
fun NodeHopHistogramSheet(nodes: List<Node>, onDismiss: () -> Unit)

Bottom sheet showing how many mesh nodes sit at each hop distance, filtered to a "last heard" HopWindow. Gives a quick sense of how busy and dispersed the local mesh is (see issue #5745).

Link copied to clipboard
Link copied to clipboard
fun NodeListHelp(onDismiss: () -> Unit)
Link copied to clipboard
fun NotesSection(node: Node, onSaveNotes: (Int, String) -> Unit, modifier: Modifier = Modifier)
Link copied to clipboard
Link copied to clipboard

MONO_VLSB only: byte (y / 8) * width + x, bit y % 8.