feat(settings): implement set_ham_mode HamParameters admin message

When the licensed amateur radio toggle is on for the locally connected
node, the User config screen repurposes the long-name field as the
callsign (max 8 chars, iOS parity) and saving sends
AdminMessage(set_ham_mode) instead of set_owner. Current LoRa
tx_power/override_frequency are echoed into the HamParameters so a
re-send while already licensed never wipes the node's overrides
(firmware applies them verbatim). The node entry is optimistically
updated pending the device's authoritative NodeInfo.

Closes #5759

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
James Rich
2026-06-12 07:20:45 -05:00
parent 0a4c22b3d3
commit a55427550c
11 changed files with 214 additions and 5 deletions

View File

@@ -25,6 +25,7 @@ import org.meshtastic.core.repository.RadioController
import org.meshtastic.proto.Channel
import org.meshtastic.proto.ClientNotification
import org.meshtastic.proto.Config
import org.meshtastic.proto.HamParameters
import org.meshtastic.proto.ModuleConfig
import org.meshtastic.proto.User
@@ -99,6 +100,8 @@ class FakeRadioController :
override suspend fun setOwner(destNum: Int, user: User, packetId: Int) {}
override suspend fun setHamMode(destNum: Int, hamParameters: HamParameters, packetId: Int) {}
override suspend fun setConfig(destNum: Int, config: Config, packetId: Int) {}
override suspend fun setModuleConfig(destNum: Int, config: ModuleConfig, packetId: Int) {}