refactor: Add LONG_TURBO ChannelOption and validation test#4039
Merged
Conversation
- Adds the `LONG_TURBO` modem preset to the `ChannelOption` enum. - Includes a new string resource for its label. - Refactors the `ChannelOption` enum for better readability by grouping presets. - Adds a companion object with a `from(modemPreset)` helper function and a `DEFAULT` constant. - Introduces a new unit test (`ChannelOptionTest`) to ensure that every `ModemPreset` from the protobufs has a corresponding `ChannelOption`, preventing future omissions.
Add tests to ensure the mapping between `ChannelOption` and `ModemPreset` is accurate and complete. These tests verify that: - There are no extra `ChannelOption` entries for `ModemPreset`s that have been removed. - Each `ChannelOption` maps to a unique `ModemPreset`, ensuring no duplicate mappings exist.
jamesarich
commented
Dec 18, 2025
thebentern
approved these changes
Dec 18, 2025
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4039 +/- ##
========================================
+ Coverage 0.56% 0.60% +0.04%
========================================
Files 406 406
Lines 24279 24283 +4
Branches 3119 3121 +2
========================================
+ Hits 136 148 +12
+ Misses 24122 24112 -10
- Partials 21 23 +2 ☔ View full report in Codecov by Sentry. |
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.
Adds
LONG_TURBOand adds tests to ensure that ModemPreset protobuf changes (both new and removed entries) are addressed in our ChannelOption mappings.