Skip to content

Commit

Permalink
Ensure the correct power limits are sent to the FC.
Browse files Browse the repository at this point in the history
Convert an FC commanded 0 power setting to POWER+2 (0mW).
  • Loading branch information
geoffsim committed Sep 20, 2024
1 parent 0d6a901 commit 493aed3
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions src/msp_displayport.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit 493aed3

Please sign in to comment.