Package-level declarations

Types

Link copied to clipboard
open class BaseMapViewModel(mapPrefs: MapPrefs, nodeRepository: NodeRepository, packetRepository: PacketRepository, radioController: RadioController, radioConfigRepository: RadioConfigRepository, notificationPrefs: NotificationPrefs, localeUnitsProvider: LocaleUnitsProvider, networkRepository: NetworkRepository) : ViewModel

Shared base ViewModel for the map feature, providing node data, waypoints, map filter preferences, and traceroute overlay state.

Link copied to clipboard
Link copied to clipboard
data class MapBounds(val south: Double, val west: Double, val north: Double, val east: Double)

A latitude/longitude box, in degrees.

Link copied to clipboard

Which nodes a map shows, and which of them draws on top.

Link copied to clipboard
data class MapPoint(val latitude: Double, val longitude: Double)

A point on the map, in degrees. Deliberately not either renderer's type — see MapBounds.

Link copied to clipboard
class SharedMapViewModel(mapPrefs: MapPrefs, nodeRepository: NodeRepository, packetRepository: PacketRepository, radioController: RadioController, radioConfigRepository: RadioConfigRepository, notificationPrefs: NotificationPrefs, localeUnitsProvider: LocaleUnitsProvider, networkRepository: NetworkRepository) : BaseMapViewModel
Link copied to clipboard
data class TracerouteNodeSelection(val overlayNodeNums: Set<Int>, val nodesForMarkers: List<Node>, val nodeLookup: Map<Int, Node>)

Result of resolving a TracerouteOverlay's node nums into displayable Node instances.

Properties

Link copied to clipboard

How recently a node must have been heard for the map to pulse it.

Functions

Link copied to clipboard
fun decodeExcludedRoles(names: Set<String>): Set<Config.DeviceConfig.Role>

Resolves persisted role names back to roles, dropping any the current protobufs no longer define.

Link copied to clipboard
fun heardJustNow(lastHeard: Int, nowSeconds: Long): Boolean

Whether lastHeard is recent enough to pulse.

Link copied to clipboard
fun LastHeardFilter.includes(recordedAtSeconds: Int, nowSeconds: Long): Boolean

Whether a recorded moment falls inside this filter's window.

Link copied to clipboard
fun MapScreen(onClickNodeChip: (Int) -> Unit, navigateToNodeDetails: (Int) -> Unit, modifier: Modifier = Modifier, viewModel: SharedMapViewModel, waypointId: Int? = null, sitePlannerNodeNum: Int? = null)
Link copied to clipboard
fun shouldAutoUseOfflineBasemap(networkAvailable: Boolean, hasOfflineBasemap: Boolean): Boolean

Whether the map should switch itself onto an offline-capable basemap right now, with no toggle for the user to remember to flip.

Link copied to clipboard
fun tracerouteNodeSelection(tracerouteOverlay: TracerouteOverlay?, tracerouteNodePositions: Map<Int, Position>, nodes: List<Node>, getNodeOrFallback: (Int) -> Node): TracerouteNodeSelection

Resolves traceroute overlay node nums into displayable Node instances. Snapshot positions (recorded at traceroute time) take priority over live positions from the node database.

Link copied to clipboard
fun BaseMapViewModel.tracerouteNodeSelection(tracerouteOverlay: TracerouteOverlay?, tracerouteNodePositions: Map<Int, Position>, nodes: List<Node>): TracerouteNodeSelection

Convenience extension that delegates to tracerouteNodeSelection using the VM's getNodeOrFallback.