Browse Source

AP_VideoTX: prioritize pitmode changes over power changes

zr-v5.1
Andy Piper 4 years ago committed by Peter Barker
parent
commit
bfcefa3f34
  1. 11
      libraries/AP_VideoTX/AP_SmartAudio.cpp

11
libraries/AP_VideoTX/AP_SmartAudio.cpp

@ -201,7 +201,14 @@ void AP_SmartAudio::update_vtx_params() @@ -201,7 +201,14 @@ void AP_SmartAudio::update_vtx_params()
}
}
if (_vtx_freq_change_pending) {
if (pitMode) {// prevent power changes in pitmode as this takes the VTX out of pitmode
_vtx_power_change_pending = false;
}
// prioritize pitmode changes
if (_vtx_options_change_pending) {
set_operation_mode(mode);
} else if (_vtx_freq_change_pending) {
if (_vtx_use_set_freq) {
set_frequency(vtx.get_configured_frequency_mhz(), false);
} else {
@ -224,8 +231,6 @@ void AP_SmartAudio::update_vtx_params() @@ -224,8 +231,6 @@ void AP_SmartAudio::update_vtx_params()
}
break;
}
} else if (_vtx_options_change_pending) {
set_operation_mode(mode);
}
}
}

Loading…
Cancel
Save