feat: replace LoRa bandwidth text input with constrained dropdown#5687
Conversation
The bandwidth field in manual LoRa modem settings was a free-text integer input that didn't allow decimal values. Since only specific LoRa bandwidth values are valid (matching SX126x chip capabilities), replace it with a dropdown containing the valid options: 7.8, 10.4, 15.6, 20.8, 31.25, 41.7, 62.5, 125, 250, and 500 kHz. The dropdown maps display labels to the integer proto codes used by firmware (via bwKHzToCode rounding convention). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Reflects the change from free-text numeric input to a constrained dropdown with valid LoRa bandwidth values. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
🖼️ Preview staleness check — advisoryThis PR modifies UI composables but does not update any
Changed UI files: What to check:
Adding previews checklist:
If this PR does not require preview updates (e.g., logic-only change, non-visual refactor), add the |
📄 Docs staleness check — advisoryThis PR modifies user-facing UI source files but does not update any page under
Changed source files: What to check:
New page checklist (if adding a new doc page):
If this PR does not require a doc update (e.g., internal refactor, bug fix, test change), add the
|
❌ 1 Tests Failed:
View the top 1 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
The LoRa manual modem settings screen used a free-text integer input for bandwidth. This prevented users from entering valid fractional values (e.g., 15.6, 31.25, 62.5 kHz) and allowed invalid arbitrary integers.
Replaces the numeric input with a dropdown containing all 10 valid SX126x LoRa bandwidths: 7.8, 10.4, 15.6, 20.8, 31.25, 41.7, 62.5, 125, 250, and 500 kHz. Each option maps to the integer proto code used by firmware (via the
bwKHzToCoderounding convention).This aligns Android with Apple's enum-constrained picker approach (noted as a gap in the cross-platform audit), while including the full set of firmware-supported bandwidths rather than Apple's current subset of 5.
Also updates
settings-validation.mdto reflect the new input type.