RNode: add Germany Ruhrgebiet preset and raise custom TX power cap to 27 dBm - #1131
Merged
Conversation
Popular Local Presets: - Add a Germany "Ruhrgebiet" preset (freq 869462500, bw 125000, SF8, CR5, 27 dBm, 10% long-term airtime). The frequency sits in EU sub-band P (869.4-869.65 MHz), whose regulatory limit is 27 dBm / 10% duty, so the preset is compliant. Preset airtime support: - RNodeRegionalPreset gains an optional longTermAirtimeLimit, applied to the lt_alock field when a preset is selected; a "10% LT" chip is shown on the preset card when set. Custom config TX cap: - Raise the no-region/custom default max TX power from 22 to 27 dBm in RNodeConfigValidator, the ReviewConfigStep fallback, and the ReticulumConfig doc. The Python backend already permits up to 36 dBm and surfaces device errors, so no backend change is required. Tests: - RNodeRegionalPresetsTest: assert the exact Ruhrgebiet field set. - RNodeWizardViewModelTest: selectPreset applies tx 27 + lt 10%, and a preset without an airtime limit preserves the existing ltAlock. - RNodeConfigValidatorTest: updated for the new 27 dBm default.
Contributor
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Greptile found the new LT-airtime chip pushes the Ruhrgebiet preset to five labels in a single non-wrapping Row, which can overflow or clip on narrow screens / larger fonts. Switch the settings-preview row to FlowRow (with vertical spacing), matching how chips wrap elsewhere in this wizard (ModemPresetStep), so the card stays usable on constrained displays.
Match the module convention used by every other FlowRow consumer (ModemPresetStep, DiscoveredInterfacesScreen, ...) by importing ExperimentalLayoutApi and annotating PopularPresetCard with @OptIn(ExperimentalLayoutApi::class).
Only the Heltec v4 reaches above the 17-22 dBm ceiling that most RNode radios cap at, so the preset no longer forces 27 dBm. The preset's txPower field is now optional (null = keep the frequency region's default) and the wizard only overrides the current value when a preset actually specifies one. The 27 dBm custom-config cap from the previous commit stays for manual use.
TX power is hardware-dependent: most RNode radios top out at 17-22 dBm while the Heltec v4 reaches the higher EU868 sub-band-P ceiling, so a preset cannot know what its target board supports. The preset model no longer carries a txPower field, selectPreset never touches the wizard's TX power (region default or user-set value is preserved), and the preset card no longer shows a dBm chip.
This reverts commit e378060.
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.
Summary
Two small RNode changes, isolated from unrelated in-flight work.
1. New "Popular Local Preset" for Germany - Ruhrgebiet
RNodeRegionalPresetgains an optionallongTermAirtimeLimit, applied to thelt_alockfield on selection (short-termst_alockuntouched). A "10% LT" chip is shown on the preset card when a preset defines it.2. Custom config TX power cap 22 -> 27 dBm
RNodeConfigValidator.DEFAULT_MAX_TX_POWER22 -> 27, plus theReviewConfigStepfallback and theReticulumConfigdoc comment.Testing
main::app:testNoSentryKotlinBackendDebugUnitTestfor the touched classes = 258 tests, 0 failures/errors.selectPresetapplies TX 27 + LT 10%; preset without an airtime limit preserves the existingltAlock; validator default max is now 27.Notes