From a9dae25e3a3d4c8b2870a4428d128103f6b88cf2 Mon Sep 17 00:00:00 2001 From: Ray Morris Date: Fri, 19 Dec 2025 10:37:47 -0600 Subject: [PATCH] msp: add minimum power index to MSP_VTX_CONFIG MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .gitignore | 6 ++++++ src/main/fc/fc_msp.c | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/.gitignore b/.gitignore index 9b72fa8305a..ccfda8cc1c3 100644 --- a/.gitignore +++ b/.gitignore @@ -46,3 +46,9 @@ launch.json # Assitnow token and files for test script tokens.yaml *.ubx + +# Local development files +.semgrepignore +build_sitl/ +CLAUDE.md +brother/ diff --git a/src/main/fc/fc_msp.c b/src/main/fc/fc_msp.c index 53daf9f524e..12c3f8268f5 100644 --- a/src/main/fc/fc_msp.c +++ b/src/main/fc/fc_msp.c @@ -1526,6 +1526,12 @@ static bool mspFcProcessOutCommand(uint16_t cmdMSP, sbuf_t *dst, mspPostProcessF sbufWriteU8(dst, vtxDevice->capability.bandCount); sbufWriteU8(dst, vtxDevice->capability.channelCount); sbufWriteU8(dst, vtxDevice->capability.powerCount); + + uint8_t minPowerIndex = 1; + if (deviceType == VTXDEV_MSP) { + minPowerIndex = 0; + } + sbufWriteU8(dst, minPowerIndex); } else { sbufWriteU8(dst, VTXDEV_UNKNOWN); // no VTX configured