From: c vw <dl1ycf@darc.de> Date: Wed, 7 Aug 2019 14:34:55 +0000 (+0200) Subject: local cw now also in P2 X-Git-Url: https://git.rkrishnan.org/pf/module-simplejson.html?a=commitdiff_plain;h=655f447c6cc18dc6c627d67411e4961e69dcd949;p=pihpsdr.git local cw now also in P2 --- diff --git a/old_protocol.c b/old_protocol.c index 67bddd2..915f85e 100644 --- a/old_protocol.c +++ b/old_protocol.c @@ -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)); }