From: c vw <dl1ycf@darc.de>
Date: Mon, 6 Jan 2020 09:49:52 +0000 (+0100)
Subject: stop/start old protcol when changing puresignal
X-Git-Url: https://git.rkrishnan.org/pf/content/en/seg/priv/class-simplejson.JSONDecoder-index.html?a=commitdiff_plain;h=a373e89d1ff1c0d104a841e199000ff9e032eb37;p=pihpsdr.git

stop/start old protcol when changing puresignal
---

diff --git a/transmitter.c b/transmitter.c
index e135bea..b98d98c 100644
--- a/transmitter.c
+++ b/transmitter.c
@@ -1289,6 +1289,10 @@ void tx_set_displaying(TRANSMITTER *tx,int state) {
 
 void tx_set_ps(TRANSMITTER *tx,int state) {
 #ifdef PURESIGNAL
+  if (protocol == ORIGINAL_PROTOCOL) {
+    old_protocol_stop();
+    usleep(100000);
+  }
   if(state) {
     tx->puresignal=1;
     SetPSControl(tx->id, 0, 0, 1, 0);
@@ -1302,6 +1306,9 @@ void tx_set_ps(TRANSMITTER *tx,int state) {
     schedule_high_priority();
     schedule_receive_specific();
   }
+  if (protocol == ORIGINAL_PROTOCOL) {
+    old_protocol_run();
+  }
   g_idle_add(ext_vfo_update,NULL);
 #endif
 }