From: c vw <dl1ycf@darc.de>
Date: Tue, 4 May 2021 14:56:42 +0000 (+0200)
Subject: Use set_drive directly, since update_display is within GTK
X-Git-Url: https://git.rkrishnan.org/%5B/%5D%20/file/frontends?a=commitdiff_plain;h=8da43f57337b289a86109f3af65d1e091bf9c25f;p=pihpsdr.git

Use set_drive directly, since update_display is within GTK
---

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;
     }