Skip to content

feat(settings): Add firmware capability checks for settings#4403

Merged
jamesarich merged 1 commit into
mainfrom
fix/statusmesssage-capability
Feb 2, 2026
Merged

feat(settings): Add firmware capability checks for settings#4403
jamesarich merged 1 commit into
mainfrom
fix/statusmesssage-capability

Conversation

@jamesarich

Copy link
Copy Markdown
Collaborator

This commit introduces firmware capability checks to dynamically show or hide certain settings based on the connected device's firmware version.

  • Capabilities.kt:
    • Added supportsStatusMessage (for firmware >= 2.7.17).
    • Added supportsSecondaryChannelLocation (for firmware >= 2.6.10).
  • Channel Configuration:
    • The ChannelConfigScreen and ChannelLegendDialog now use the new supportsSecondaryChannelLocation capability to determine if location sharing on secondary channels is supported, replacing direct version string comparisons.
  • Module Routes:
    • The ModuleRoute enum now includes an isSupported lambda that checks device capabilities.
    • The Status Message module will now only be displayed if the firmware supports it.
  • Tests:
    • Added unit tests for the new capability checks.

This commit introduces firmware capability checks to dynamically show or hide certain settings based on the connected device's firmware version.

- **`Capabilities.kt`**:
    - Added `supportsStatusMessage` (for firmware >= 2.7.17).
    - Added `supportsSecondaryChannelLocation` (for firmware >= 2.6.10).
- **Channel Configuration**:
    - The `ChannelConfigScreen` and `ChannelLegendDialog` now use the new `supportsSecondaryChannelLocation` capability to determine if location sharing on secondary channels is supported, replacing direct version string comparisons.
- **Module Routes**:
    - The `ModuleRoute` enum now includes an `isSupported` lambda that checks device capabilities.
    - The Status Message module will now only be displayed if the firmware supports it.
- **Tests**:
    - Added unit tests for the new capability checks.

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
@jamesarich jamesarich enabled auto-merge February 2, 2026 15:13
@github-actions github-actions Bot added the bugfix PR tag label Feb 2, 2026
@codecov

codecov Bot commented Feb 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 15.38462% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 8.36%. Comparing base (221e774) to head (f64bff7).
⚠️ Report is 3 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...htastic/feature/settings/navigation/ModuleRoute.kt 0.00% 10 Missing ⚠️
...ture/settings/radio/channel/ChannelConfigScreen.kt 0.00% 1 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##            main   #4403   +/-   ##
=====================================
  Coverage   8.35%   8.36%           
=====================================
  Files        418     418           
  Lines      14311   14318    +7     
  Branches    2076    2078    +2     
=====================================
+ Hits        1195    1197    +2     
- Misses     12885   12890    +5     
  Partials     231     231           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jamesarich jamesarich added this pull request to the merge queue Feb 2, 2026
Merged via the queue into main with commit 37b2efa Feb 2, 2026
12 checks passed
@jamesarich jamesarich deleted the fix/statusmesssage-capability branch February 2, 2026 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix PR tag

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant