RadioConfigViewModel
Constructors
Properties
MQTT proxy connection state for the settings UI.
Latest result from a probeMqttConnection call, or null if no probe has been run.
Whether this phone is currently running the MQTT proxy (relaying broker traffic to the connected device).
Functions
Saves the node's current public/private keys to OS-backed encrypted storage, keyed by node number.
Clear the latest probe result (e.g. when the user edits the address).
Deletes the encrypted key backup for this node, if any.
Sets the initial loading state for remote config sub-screens. Must be called before the first collectAsStateWithLifecycle read so the LoadingOverlay is visible from the very first composition frame.
Run a one-shot reachability/credentials probe against an MQTT broker. Cancels any in-flight probe before starting a new one. Result is exposed via mqttProbeStatus.
Restores the previously backed-up keys for this node and pushes them to the device via admin config.
Routes the User config save: ham onboarding (set_ham_mode) when the licensed toggle transitions OFF→ON on the locally connected node, setOwner otherwise. Routing on the transition — not the toggle state — keeps subsequent saves of an already-licensed node on the set_owner path, so edits to other owner fields still reach the device and the node doesn't reboot on every save (firmware reboots on set_ham_mode). The local-node guard is the backstop for the UI gate — set_ham_mode must never be sent to a remote node.
Whether an encrypted key backup exists for the node currently being configured.
Phone-local control over the MQTT proxy that does not touch the device's persisted MQTT config. Turning it off calls MqttManager.stop immediately, cutting the proxy firehose that can saturate the BLE link and MCU on nRF devices — no slow device read-modify-write-readback round-trip. Turning it back on resumes proxying using the device's current MQTT config (a no-op unless the device has MQTT and proxy-to-client enabled).
Sends a plain set_owner with user. Prefer saveUserConfig for User config screen saves — it routes ham onboarding to set_ham_mode when the licensed toggle is first enabled; calling this directly bypasses that.