From 4fd88e8ad0201084e38473b1e364102d2e47fbd7 Mon Sep 17 00:00:00 2001 From: Andy Piper Date: Wed, 7 Apr 2021 15:56:50 +0100 Subject: [PATCH] AP_VideoTX: don't try to change pitmode on anything other than SA2.1 --- libraries/AP_VideoTX/AP_SmartAudio.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libraries/AP_VideoTX/AP_SmartAudio.cpp b/libraries/AP_VideoTX/AP_SmartAudio.cpp index a48a96e95d..5dd19c0161 100644 --- a/libraries/AP_VideoTX/AP_SmartAudio.cpp +++ b/libraries/AP_VideoTX/AP_SmartAudio.cpp @@ -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 pitMode = opts & uint8_t(AP_VideoTX::VideoOptions::VTX_PITMODE); uint8_t mode; - // check if we are turning pitmode on or off - if (pitMode != pitModeRunning) { + // check if we are turning pitmode on or off, but only on SA 2.1 as older versions + // appear not to work properly + if (pitMode != pitModeRunning && _protocol_version >= SMARTAUDIO_SPEC_PROTOCOL_v21) { if (pitModeRunning) { debug("Turning OFF pitmode"); // turn it off