]> git.rkrishnan.org Git - pihpsdr.git/commitdiff
fix for CW mode display
authorJohn Melton - G0ORX/N6LYT <john.d.melton@googlemail.com>
Mon, 25 Jul 2016 06:18:13 +0000 (06:18 +0000)
committerJohn Melton - G0ORX/N6LYT <john.d.melton@googlemail.com>
Mon, 25 Jul 2016 06:18:13 +0000 (06:18 +0000)
old_protocol.c
panadapter.c
pihpsdr
radio.c
release/pihpsdr.tar
release/pihpsdr/pihpsdr
toolbar.c

index 1484df455d2147b30e689ff752e9863b444054fc..3564a9a60457711ce4c2396d872e3b67367cb8c0 100644 (file)
@@ -408,15 +408,6 @@ static void process_ozy_input_buffer(char  *buffer) {
     dash=(control_in[0]&0x02)==0x02;
     dot=(control_in[0]&0x04)==0x04;
 
-if(last_ptt!=ptt) {
-  fprintf(stderr,"ptt=%d\n",ptt);
-}
-if(last_dot!=dot) {
-  fprintf(stderr,"dot=%d\n",dot);
-}
-if(last_dash!=dash) {
-  fprintf(stderr,"dash=%d\n",dash);
-}
     if(last_ptt!=ptt) {
       g_idle_add(ptt_update,(gpointer)ptt);
     }
@@ -506,8 +497,13 @@ if(last_dash!=dash) {
           }
         } else {
 #endif
-          micinputbuffer[samples*2]=(double)mic_sample_float*mic_gain;
-          micinputbuffer[(samples*2)+1]=(double)mic_sample_float*mic_gain;
+          if(mode==modeCWL || mode==modeCWU) {
+            micinputbuffer[samples*2]=0.0;
+            micinputbuffer[(samples*2)+1]=0.0;
+          } else {
+            micinputbuffer[samples*2]=(double)mic_sample_float*mic_gain;
+            micinputbuffer[(samples*2)+1]=(double)mic_sample_float*mic_gain;
+          }
           iqinputbuffer[samples*2]=0.0;
           iqinputbuffer[(samples*2)+1]=0.0;
           samples++;
@@ -931,16 +927,12 @@ void ozy_send_buffer() {
   }
 
   // set mox
-  if((mode!=modeCWU && mode!=modeCWL)) {
-    if(isTransmitting()) {
+  if(mode==modeCWU || mode==modeCWL) {
+    if(tune) {
       output_buffer[C0]|=0x01;
     }
   } else {
-    if(tune==0) {
-      if(cw_keyer_internal==0) {
-        output_buffer[C0]|=0x01;
-      }
-    } else {
+    if(isTransmitting()) {
       output_buffer[C0]|=0x01;
     }
   }
index b4ca1101553b3b746d82a8665d5a46964f9a239a..0cde9c8a2ce93298d956e59113f082dbf60db55b 100644 (file)
@@ -256,7 +256,6 @@ void panadapter_update(float *data,int tx) {
             long divisor=20000;
             long half=(long)getSampleRate()/2L;
             long frequency=getFrequency();
-fprintf(stderr,"panadapter_update: sample_rate=%d\n",sample_rate);
             switch(sample_rate) {
               case 48000:
                 divisor=5000L;
diff --git a/pihpsdr b/pihpsdr
index 27974e76a941f5819b95e6e4dfe64989ad38342e..b75b16211f71932f1ccc8ded12f5ce8c3135370e 100755 (executable)
Binary files a/pihpsdr and b/pihpsdr differ
diff --git a/radio.c b/radio.c
index f3434f4a773861fdc86dbe6e4ef311708afe9adf..9cb01300c377a09dc7799b6c826cef637c66aad9 100644 (file)
--- a/radio.c
+++ b/radio.c
@@ -260,10 +260,7 @@ int getTune() {
 int isTransmitting() {
   BANDSTACK_ENTRY *entry;
   entry=bandstack_entry_get_current();
-  if((entry->mode==modeCWL || entry->mode==modeCWU) && cw_keyer_internal==1 && !tune) {
-    return 0;
-  }
-  return ptt!=0 || mox!=0 || tune!=0;
+  return ptt || mox || tune;
 }
 
 void setFrequency(long long f) {
index 37c11550d1e3331b77be0c899ec73f87d94a3c92..9d2efabecc49dc0399510d098ec927bebaba765f 100644 (file)
Binary files a/release/pihpsdr.tar and b/release/pihpsdr.tar differ
index 27974e76a941f5819b95e6e4dfe64989ad38342e..afb00b9159e440a30f538eab6b7fb2bb39cd04ca 100755 (executable)
Binary files a/release/pihpsdr/pihpsdr and b/release/pihpsdr/pihpsdr differ
index e57fba1615f855729ae00b162e1c381ee5bea017..e9c5ccbabead5a2640294fc37ec09da66dfdb752 100644 (file)
--- a/toolbar.c
+++ b/toolbar.c
@@ -991,10 +991,7 @@ fprintf(stderr,"mox_cb\n");
 }
 
 int ptt_update(void *data) {
-  int ptt=(int)data;
-  if((mode==modeCWL || mode==modeCWU) && cw_keyer_internal==1) {
-    // just ignore it
-  } else {
+  if(mode!=modeCWU && mode!=modeCWL) {
     mox_cb(NULL,NULL);
   }
   return 0;