feat: editable radio settings on Manage → Radio (+ !adm radio) - #33
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
The Manage → Radio tab is now editable, reorganized top→bottom into Identity, Radio settings, Advert (moved down), Contact table (moved down), and a read-only Device info dump.
Identity — edit the node Name; a New private key field (paste 128-hex) to rotate identity. Section Save/Cancel enable only on change, with a Reboot after checkbox.
Radio settings — a Preset dropdown (US/Canada, EU 868, EU/Asia 433, ANZ) that fills freq/bw/sf/cr; individually editable Frequency / Bandwidth / SF / CR / TX power, Latitude/Longitude, and an "Include location in adverts" toggle. Same change-gated Save/Cancel + Reboot after.
Change-detection snapshots the radio's reported values into a form + pristine copy; after a save the device info is re-queried and the forms re-snapshot.
Backend
mcbot.py:refresh_self_info()(re-query SELF_INFO after a change) andadopt_new_private_key()(rewrite cached key file + refresh in-memory identity so a restart doesn't reload the stale key).management.py:radio_set_name,radio_apply_settings(freq/bw/sf/cr atomic; tx/coords/loc-policy; optional reboot),radio_apply_identity/_radio_import_key,radio_reboot— all audited (radio.name/settings/identity/reboot) and surfacing the radio's ERROR. Region presets live inRADIO_PRESETS.webapi/routers/dbadmin.py:GET /api/radio/presets,POST /api/radio/identity,POST /api/radio/settings,POST /api/radio/reboot(allrequire_auth).commands/adm.py:!adm radio name|set|preset|location|advloc|reboot|key(DM-only, owner-gated).Safety / notes
auto_reconnectrestores it).Tests
tests/test_radio_config.py(stubbed radio): name (+length guard), apply-settings all/partial/out-of-range/reboot, identity import (adopts pubkey, bad-key guards), radio-ERROR→MgmtError. Full suite (12 files) green; web-ui build clean.Breaking changes
None — additive; existing Advert/Contact-table functionality unchanged, just relocated.