Enhancement/preset offgrid repeat toggle#275
Enhancement/preset offgrid repeat toggle#275just-stuff-tm wants to merge 5 commits intozjs81:mainfrom
Conversation
8d10adc to
f233bdb
Compare
Code Review FindingsMust Fix
Should Fix
Nice to Have
|
|
I rebased will be pushing with the enhancements shortly |
166cd72 to
fb11882
Compare
There was a problem hiding this comment.
Pull request overview
This PR enhances the off-grid repeat toggle in the radio settings dialog so that toggling repeat mode automatically adjusts the frequency to the appropriate off-grid frequency for the selected region/band (and restores it when disabled). It also tracks and remembers the non-repeat radio state across the session, filters off-grid presets from the visible dropdown, and adds debug logging for radio settings state changes.
Changes:
- Automatically switch frequency to the band-appropriate off-grid frequency when the repeat toggle is enabled, and restore the original preset frequency when disabled.
- Introduce
_RadioSettingsSnapshotclass andMeshCoreRadioStateSnapshotto capture and remember radio state, enabling round-trip persistence of non-repeat settings. - Add debug-mode logging throughout radio settings interactions and refactor preset selection to track and sync with manual setting changes.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
lib/connector/meshcore_connector.dart |
Adds MeshCoreRadioStateSnapshot data class and in-memory storage for remembered non-repeat radio state on the connector. |
lib/screens/settings_screen.dart |
Major refactor of radio settings dialog: adds snapshot tracking, off-grid frequency auto-switching, preset filtering, sync logic, and debug logging. Moves coding rate helpers to top-level. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| _clientRepeat = widget.connector.clientRepeat ?? false; | ||
| _selectedPresetIndex = _findMatchingPresetIndex(); | ||
| _lastNonRepeatSnapshot = _currentSnapshot(); |
| Navigator.pop(context); | ||
| _logRadioSettingsState('Radio settings saved successfully'); |
* Refactor contact filtering and improve localization strings; enhance path trace handling * Add localization for new CLI commands and update existing strings * Enhance contact handling and UI updates across multiple screens add unfiltered contact access and improve last seen resolution * Add polling interval configuration and improve contact handling * Reorder command constants for better organization and clarity * Refactor contact handling by removing unnecessary mapping and improving clarity across multiple screens * Moved RadioStatsIconButton in chat screen for improved UI consistency * Added indicators to AppBar for channels * Ignore contacts with self public key in contact handling * Simplify path removal logic and clean up unused imports in path management dialog * Enhance path hop resolution by adding distance checks to improve candidate selection accuracy * Remove unnecessary reset of radio stats poll reference count in polling interval setter
d0e3767 to
6375710
Compare
This reverts commit 758619b.
…gate debug logging - Replace floating-point epsilon frequency comparison with integer Hz - Add frequencyHz getter and fromMeshCoreSnapshot/toMeshCoreSnapshot conversion methods on _RadioSettingsSnapshot - Move _toUiCodingRate/_toDeviceCodingRate to documented top-level functions - Gate _logRadioSettingsState behind kDebugMode - Use integer Hz in == and hashCode for _RadioSettingsSnapshot Addresses code review findings on preset/off-grid repeat toggle PR.
6375710 to
1e9508d
Compare
Enhancement for