From 202bbc3fab41d3c33585db3ccc685bd371481326 Mon Sep 17 00:00:00 2001 From: Andy Piper Date: Wed, 21 Sep 2022 17:48:31 +0100 Subject: [PATCH] AP_VideoTX: ensure that Tramp changes are broadcast to the GCS --- libraries/AP_VideoTX/AP_Tramp.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libraries/AP_VideoTX/AP_Tramp.cpp b/libraries/AP_VideoTX/AP_Tramp.cpp index ea2dfc60c2..59177274a1 100644 --- a/libraries/AP_VideoTX/AP_Tramp.cpp +++ b/libraries/AP_VideoTX/AP_Tramp.cpp @@ -111,6 +111,7 @@ char AP_Tramp::handle_response(void) // update the vtx AP_VideoTX& vtx = AP::vtx(); + bool update_pending = vtx.have_params_changed(); vtx.set_frequency_mhz(freq); AP_VideoTX::VideoBand band; @@ -128,7 +129,10 @@ char AP_Tramp::handle_response(void) } // make sure the configured values now reflect reality - vtx.set_defaults(); + // if they do then announce if there were changes + if (!vtx.set_defaults() && update_pending && !vtx.have_params_changed()) { + vtx.announce_vtx_settings(); + } debug("device config: freq: %u, power: %u, pitmode: %u", unsigned(freq), unsigned(power), unsigned(pit_mode));