Skip to content

Commit a9dae25

Browse files
sensei-hackerclaude
andcommitted
msp: add minimum power index to MSP_VTX_CONFIG
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 <[email protected]>
1 parent 2152748 commit a9dae25

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,9 @@ launch.json
4646
# Assitnow token and files for test script
4747
tokens.yaml
4848
*.ubx
49+
50+
# Local development files
51+
.semgrepignore
52+
build_sitl/
53+
CLAUDE.md
54+
brother/

src/main/fc/fc_msp.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1526,6 +1526,12 @@ static bool mspFcProcessOutCommand(uint16_t cmdMSP, sbuf_t *dst, mspPostProcessF
15261526
sbufWriteU8(dst, vtxDevice->capability.bandCount);
15271527
sbufWriteU8(dst, vtxDevice->capability.channelCount);
15281528
sbufWriteU8(dst, vtxDevice->capability.powerCount);
1529+
1530+
uint8_t minPowerIndex = 1;
1531+
if (deviceType == VTXDEV_MSP) {
1532+
minPowerIndex = 0;
1533+
}
1534+
sbufWriteU8(dst, minPowerIndex);
15291535
}
15301536
else {
15311537
sbufWriteU8(dst, VTXDEV_UNKNOWN); // no VTX configured

0 commit comments

Comments
 (0)