From 9056cd35eaed4ae0e81bfe76aa191fd99ae86061 Mon Sep 17 00:00:00 2001 From: giacomo892 Date: Wed, 2 Jun 2021 09:44:28 +0200 Subject: [PATCH] AP_SmartAudio: Add pull down VTX option --- libraries/AP_VideoTX/AP_SmartAudio.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libraries/AP_VideoTX/AP_SmartAudio.cpp b/libraries/AP_VideoTX/AP_SmartAudio.cpp index a8dc4710c0..93ea8f7f09 100644 --- a/libraries/AP_VideoTX/AP_SmartAudio.cpp +++ b/libraries/AP_VideoTX/AP_SmartAudio.cpp @@ -247,6 +247,8 @@ void AP_SmartAudio::update_vtx_params() */ void AP_SmartAudio::send_request(const Frame& requestFrame, uint8_t size) { + AP_VideoTX &vtx = AP::vtx(); + if (size <= 0 || _port == nullptr) { return; } @@ -254,6 +256,9 @@ void AP_SmartAudio::send_request(const Frame& requestFrame, uint8_t size) const uint8_t *request = reinterpret_cast(&requestFrame); // write request + if (vtx.has_option(AP_VideoTX::VideoOptions::VTX_PULLDOWN)) { + _port->write((uint8_t)0x00); + } _port->write(request, size); _port->flush();