]> git.rkrishnan.org Git - pihpsdr.git/commitdiff
local cw now also in P2
authorc vw <dl1ycf@darc.de>
Wed, 7 Aug 2019 14:34:55 +0000 (16:34 +0200)
committerc vw <dl1ycf@darc.de>
Wed, 7 Aug 2019 14:34:55 +0000 (16:34 +0200)
old_protocol.c

index 67bddd2cf9c604a6a89eee8b05edcb457846d7f9..915f85e1e5d8d1545b65fa31724c4a6b236d06de 100644 (file)
@@ -57,6 +57,7 @@
 #endif
 #include "vox.h"
 #include "ext.h"
+#include "iambic.h"
 #include "error_handler.h"
 
 #define min(x,y) (x<y?x:y)
@@ -788,10 +789,22 @@ static void process_ozy_input_buffer(unsigned char  *buffer) {
     dash=(control_in[0]&0x02)==0x02;
     dot=(control_in[0]&0x04)==0x04;
 
-    if (dot || dash) cw_key_hit=1;
-    if(vfo[tx_vfo].mode==modeCWL || vfo[tx_vfo].mode==modeCWU) {
-      local_ptt=local_ptt|dot|dash;
+    if (cw_keyer_internal) {
+      // Stops CAT cw transmission if paddle hit in "internal" CW
+      if ((dash || dot) && cw_keyer_internal) cw_key_hit=1;
+    } else {
+#ifdef LOCALCW
+      //
+      // report "key hit" event to the local keyer
+      // (local keyer will stop CAT cw if necessary)
+      if (dash != previous_dash) keyer_event(0, dash);
+      if (dot  != previous_dot ) keyer_event(1, dot );
+#endif
     }
+
+    //if(vfo[tx_vfo].mode==modeCWL || vfo[tx_vfo].mode==modeCWU) {
+    //  local_ptt=local_ptt|dot|dash;
+    // }
     if(previous_ptt!=local_ptt) {
       g_idle_add(ext_mox_update,(gpointer)(long)(local_ptt));
     }