From 8da43f57337b289a86109f3af65d1e091bf9c25f Mon Sep 17 00:00:00 2001
From: c vw <dl1ycf@darc.de>
Date: Tue, 4 May 2021 16:56:42 +0200
Subject: [PATCH] Use set_drive directly, since update_display is within GTK

---
 transmitter.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/transmitter.c b/transmitter.c
index 6f41524..015f46e 100644
--- a/transmitter.c
+++ b/transmitter.c
@@ -50,6 +50,7 @@
 #endif
 #include "audio.h"
 #include "ext.h"
+#include "sliders.h"
 
 double getNextSideToneSample();
 double getNextInternalSideToneSample();
@@ -684,7 +685,7 @@ static gboolean update_display(gpointer data) {
 //  set the drive slider to zero. Do not do this while tuning
 //
     if (tx->swr_protection && !getTune() && tx->swr >= tx->swr_alarm) {
-      g_idle_add(ext_set_drive, GINT_TO_POINTER(0));
+      set_drive(0.0);
       display_swr_protection = TRUE;
     }
 
-- 
2.45.2