From 493aed3dd0ffcc84d94b4cceaca42be501f959a4 Mon Sep 17 00:00:00 2001 From: Geoff Sim Date: Fri, 20 Sep 2024 15:28:05 +0100 Subject: [PATCH] Ensure the correct power limits are sent to the FC. Convert an FC commanded 0 power setting to POWER+2 (0mW). --- src/msp_displayport.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src/msp_displayport.c b/src/msp_displayport.c index bf83631..78c447c 100644 --- a/src/msp_displayport.c +++ b/src/msp_displayport.c @@ -933,18 +933,8 @@ void msp_set_vtx_config(uint8_t power, uint8_t save) { crc ^= 0x06; // band count msp_tx(0x08); crc ^= 0x08; // channel count -#if defined HDZERO_FREESTYLE_V1 || HDZERO_FREESTYLE_V2 - if (powerLock) { - msp_tx(3); - crc ^= (3); // power count - } else { - msp_tx(5); - crc ^= (5); // power count - } -#else - msp_tx(POWER_MAX + 2); - crc ^= (POWER_MAX + 2); // power count -#endif + msp_tx(POWER_MAX + 1); + crc ^= (POWER_MAX + 1); // max power msp_tx(0x00); crc ^= 0x00; // disable/clear vtx table msp_tx(crc); @@ -1056,6 +1046,10 @@ void parse_vtx_settings(uint8_t ident) { fc_lp_rx = msp_rx_buf[8]; } + if (fc_pwr_rx == 0) { + fc_pwr_rx = POWER_MAX+2; + } + mspVtxLock = 1; pwr_lmt_done = 1;