MSP: Add minimum power index to MSP_VTX_CONFIG#11190
Open
sensei-hacker wants to merge 2 commits intoiNavFlight:maintenance-9.xfrom
Open
MSP: Add minimum power index to MSP_VTX_CONFIG#11190sensei-hacker wants to merge 2 commits intoiNavFlight:maintenance-9.xfrom
sensei-hacker wants to merge 2 commits intoiNavFlight:maintenance-9.xfrom
Conversation
Adds minPowerIndex (byte 12) to MSP_VTX_CONFIG response to indicate the minimum valid power index for the VTX device. - MSP VTX: minPowerIndex = 0 (supports power off at index 0) - SmartAudio/Tramp: minPowerIndex = 1 (power off not supported) This allows configurator to correctly display all available power levels without hardcoding device-specific logic. Backward compatible: old configurators will ignore the extra byte. Related: iNavFlight/inav-configurator#2486 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Contributor
PR Compliance Guide 🔍All compliance sections have been disabled in the configurations. |
6 tasks
These entries are not relevant to this PR and should not be included in upstream changes.
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.
User description
Summary
Adds
minPowerIndex(byte 12) toMSP_VTX_CONFIGresponse to indicate the minimum valid power index for VTX devices.This complements the existing
powerCountfield and enables configurator to display all available power levels without hardcoding device-specific logic.Related Configurator PR: iNavFlight/inav-configurator#2486
Changes
File:
src/main/fc/fc_msp.cAdded single byte to
MSP_VTX_CONFIGresponse afterpowerCount:Values:
minPowerIndex = 0(supports power off at index 0)minPowerIndex = 1(power off not supported)Protocol Change
Before (11 bytes):
After (12 bytes):
1-11. (same as above)
12. minPowerIndex (NEW)
Compatibility
✅ Backward Compatible
MSP Power Level Examples
MSP VTX (minPowerIndex=0, powerCount=4):
SmartAudio (minPowerIndex=1, powerCount=8):
Rationale
Current firmware sends
powerCount(maximum valid index) but not the minimum. This works for most VTX devices which start at index 1, but MSP VTX devices support power off at index 0.Without this change, configurators must hardcode device-type-specific logic:
With this change, configurator gets complete info from firmware:
Testing
Related
Description
Adds minPowerIndex field to MSP_VTX_CONFIG response
Enables configurators to display power levels dynamically
MSP VTX devices report minPowerIndex=0, others report 1
Maintains backward compatibility with older configurators
Diagram Walkthrough
flowchart LR A["MSP_VTX_CONFIG Request"] --> B["Check Device Type"] B --> C{"Is MSP VTX?"} C -->|Yes| D["minPowerIndex = 0"] C -->|No| E["minPowerIndex = 1"] D --> F["Send 12-byte Response"] E --> F F --> G["Configurator Receives Complete Power Range Info"]File Walkthrough
fc_msp.c
Add minPowerIndex to VTX config responsesrc/main/fc/fc_msp.c
logic