AP_VideoTX: don't try to change pitmode on anything other than SA2.1

This commit is contained in:
Andy Piper 2021-04-07 15:56:50 +01:00 committed by Peter Barker
parent bfcefa3f34
commit 4fd88e8ad0
1 changed files with 3 additions and 2 deletions

View File

@ -183,8 +183,9 @@ void AP_SmartAudio::update_vtx_params()
uint8_t pitModeRunning = (vtx.get_options() & uint8_t(AP_VideoTX::VideoOptions::VTX_PITMODE)); uint8_t pitModeRunning = (vtx.get_options() & uint8_t(AP_VideoTX::VideoOptions::VTX_PITMODE));
uint8_t pitMode = opts & uint8_t(AP_VideoTX::VideoOptions::VTX_PITMODE); uint8_t pitMode = opts & uint8_t(AP_VideoTX::VideoOptions::VTX_PITMODE);
uint8_t mode; uint8_t mode;
// check if we are turning pitmode on or off // check if we are turning pitmode on or off, but only on SA 2.1 as older versions
if (pitMode != pitModeRunning) { // appear not to work properly
if (pitMode != pitModeRunning && _protocol_version >= SMARTAUDIO_SPEC_PROTOCOL_v21) {
if (pitModeRunning) { if (pitModeRunning) {
debug("Turning OFF pitmode"); debug("Turning OFF pitmode");
// turn it off // turn it off