]> git.rkrishnan.org Git - pihpsdr.git/commitdiff
StreamLine: reduce diffs to original version
authorc vw <dl1ycf@darc.de>
Thu, 16 Aug 2018 12:24:36 +0000 (14:24 +0200)
committerc vw <dl1ycf@darc.de>
Thu, 16 Aug 2018 12:24:36 +0000 (14:24 +0200)
13 files changed:
Makefile
Makefile.mac
discovery.c
gpio.c
iambic.c
noise_menu.c
old_protocol.c
ps_menu.c
radio.c
receiver.c
transmitter.c
tx_panadapter.c
vfo.c

index 396096f379e1deb2bce5d434edd6d1c84c2287cb..82e927590564b124c2aee0c26377c39ee9252741 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -27,34 +27,28 @@ GIT_VERSION := $(shell git describe --abbrev=0 --tags)
 # uncomment the line to below include support local CW keyer
 #LOCALCW_INCLUDE=LOCALCW
 
-# uncomment the line below to include support for STEMlab discovery (with avahi)
+# uncomment the line below to include support for STEMlab discovery (WITH AVAHI)
 #STEMLAB_DISCOVERY=STEMLAB_DISCOVERY
 
-# uncomment the line below to include support for STEMlab discovery WITHOUT AVAHI
+# uncomment the line below to include support for STEMlab discovery (WITHOUT AVAHI)
 #STEMLAB_DISCOVERY=STEMLAB_DISCOVERY_NOAVAHI
 
 # uncommment this line for activate work-around some RedPitaty HPSDR bugs
 #STEMLAB_FIX_OPTION=-DSTEMLAB_FIX
 
-#uncomment the line below for the platform being compiled on
+#uncomment the line below for the platform being compiled on (actually not used)
 UNAME_N=raspberrypi
 #UNAME_N=odroid
 #UNAME_N=up
 #UNAME_N=pine64
 #UNAME_N=jetsen
 
-# Additional options that can be chosen at compile time:
-# -DPROTOCOL_DEBUG      logs (on stderr) all state changes sent to the SDR (only old protocol)
-# -DDEBUG               activate general debug output
-#
-# leave the list empty if no such option should be used
-
-DEBUGL_OPTION=
-
-
 CC=gcc
 LINK=gcc
 
+# uncomment the line below for various debug facilities
+#DEBUG_OPTION=-D DEBUG
+
 ifeq ($(PURESIGNAL_INCLUDE),PURESIGNAL)
 PURESIGNAL_OPTIONS=-D PURESIGNAL
 PURESIGNAL_SOURCES= \
@@ -176,8 +170,10 @@ ifeq ($(I2C_INCLUDE),I2C)
 endif
 
 #
-# We have two versions here, the second one has to be used
-# if you do not have the avahi libraries
+# We have two versions of STEMLAB_DISCOVERY here,
+# the second one has to be used
+# if you do not have the avahi (devel-) libraries
+# on your system.
 #
 ifeq ($(STEMLAB_DISCOVERY), STEMLAB_DISCOVERY)
 STEMLAB_OPTIONS=-D STEMLAB_DISCOVERY \
index a09b6f1947120a88cad10685f3803a72d196901f..e4b482eb2660bd063fd757d79c3557f2ddea6166 100644 (file)
@@ -27,29 +27,21 @@ PURESIGNAL_INCLUDE=PURESIGNAL
 # uncomment the line to below include support local CW keyer
 #LOCALCW_INCLUDE=LOCALCW
 
-# uncomment the line below to include support for STEMlab discovery (with avahi)
-#STEMLAB_DISCOVERY=STEMLAB_DISCOVERY
-
-# uncomment the line below to include support for STEMlab discovery WITHOUT AVAHI
+# uncomment the line below to include support for STEMlab discovery (WITHOUT AVAHI)
 STEMLAB_DISCOVERY=STEMLAB_DISCOVERY_NOAVAHI
 
 # un-commment this line for activate work-around some RedPitaty HPSDR bugs
 STEMLAB_FIX_OPTION=-DSTEMLAB_FIX
 
-#uncomment the line below for the platform being compiled on
+#uncomment the line below for the platform being compiled on (actually not used)
 UNAME_N=raspberrypi
 #UNAME_N=odroid
 #UNAME_N=up
 #UNAME_N=pine64
 #UNAME_N=jetsen
 
-# Additional options that can be chosen at compile time:
-# -DPROTOCOL_DEBUG     logs (on stderr) all state changes sent to the SDR (only old protocol)
-# -DDEBUG              activate debug output
-#
-# leave the list empty if no such option should be used
-
-DEBUG_OPTION=
+# uncomment the line below for various debug facilities
+#DEBUG_OPTION=-D DEBUG
 
 CC=gcc
 LINK=gcc
@@ -175,20 +167,6 @@ ifeq ($(I2C_INCLUDE),I2C)
   I2C_OBJS=i2c.o
 endif
 
-#
-# We have two versions here, the second one has to be used
-# if you do not have the avahi libraries
-#
-ifeq ($(STEMLAB_DISCOVERY), STEMLAB_DISCOVERY)
-STEMLAB_OPTIONS=-D STEMLAB_DISCOVERY \
-  `pkg-config --cflags avahi-gobject` \
-  `pkg-config --cflags libcurl`
-STEMLAB_LIBS=`pkg-config --libs avahi-gobject` `pkg-config --libs libcurl`
-STEMLAB_SOURCES=stemlab_discovery.c
-STEMLAB_HEADERS=stemlab_discovery.h
-STEMLAB_OBJS=stemlab_discovery.o
-endif
-
 ifeq ($(STEMLAB_DISCOVERY), STEMLAB_DISCOVERY_NOAVAHI)
 STEMLAB_OPTIONS=-D STEMLAB_DISCOVERY -D NO_AVAHI `pkg-config --cflags libcurl`
 STEMLAB_LIBS=`pkg-config --libs libcurl`
@@ -493,12 +471,19 @@ app:      $(OBJS) $(REMOTE_OBJS) $(USBOZY_OBJS) $(LIMESDR_OBJS) $(FREEDV_OBJS) \
        @cp MacOS/hpsdr.icns pihpsdr.app/Contents/Resources/hpsdr.icns
        @cp MacOS/pihpsdr.sh pihpsdr.app/Contents/MacOS/pihpsdr
        @cp MacOS/hpsdr.png pihpsdr.app/Contents/Resources
-       @for lib in `otool -L pihpsdr.app/Contents/MacOS/pihpsdr-bin | grep dylib | sed -e "s/ (.*//" | grep -Ev "/(usr/lib|System)" | grep -Ev /libg `; do \
+       @for lib in `otool -L pihpsdr.app/Contents/MacOS/pihpsdr-bin | grep dylib | sed -e "s/ (.*//" | grep -Ev "/(usr/lib|System)" | grep -Ev /libg  | grep -Ev pango | grep -Ev cairo`; do \
          libfn="`basename $$lib`"; \
          cp "$$lib" "pihpsdr.app/Contents/Frameworks/$$libfn"; \
          chmod u+w "pihpsdr.app/Contents/Frameworks/$$libfn"; \
          install_name_tool -id "@executable_path/../Frameworks/$libfn" "pihpsdr.app/Contents/Frameworks/$$libfn"; \
          install_name_tool -change "$$lib" "@executable_path/../Frameworks/$$libfn" pihpsdr.app/Contents/MacOS/pihpsdr-bin; \
        done
+#
+# Make "app" and copy wdspWisdom and props file to app bundle
+#
+localapp:      app
+       cp wdspWisdom pihpsdr.app/Contents/Resources
+       cp *.props    pihpsdr.app/Contents/Resources
+
 #############################################################################
 
index 0cadd72388b2adcf1bfb7ba1fb548570636ec28d..876a119139a5b67cbb6e3246d3309da09232c533 100644 (file)
@@ -227,7 +227,7 @@ fprintf(stderr,"%p Protocol=%d name=%s\n",d,d->protocol,d->name);
             sprintf(text,"%s (%s) on USB /dev/ozy", d->name, d->protocol==ORIGINAL_PROTOCOL?"Protocol 1":"Protocol 2");
           } else {
 #endif
-            sprintf(text,"%s (%s %s) %s (%02X:%02X:%02X:%02X:%02X:%02X) on %s ",
+            sprintf(text,"%s (%s %s) %s (%02X:%02X:%02X:%02X:%02X:%02X) on %s",
                           d->name,
                           d->protocol==ORIGINAL_PROTOCOL?"Protocol 1":"Protocol 2",
                           version,
diff --git a/gpio.c b/gpio.c
index a593b119b91f642d0898d7f50d849b53dba3a5ba..422a4a9ee6a7e3d658b62a94f2bf953f0999f21b 100644 (file)
--- a/gpio.c
+++ b/gpio.c
@@ -859,6 +859,8 @@ void gpio_restore_state() {
  value=getProperty("ENABLE_GPIO_SIDETONE");            
  if(value) ENABLE_GPIO_SIDETONE=atoi(value);           
 #endif
+
+
 }
 
 void gpio_save_state() {
index a3a6799bda2893ebd2a6defe8b7701121bb05a14..f36f594194d81f58fad138546350975464375fe5 100644 (file)
--- a/iambic.c
+++ b/iambic.c
@@ -167,13 +167,11 @@ void keyer_event(int gpio, int level) {
            cwvox=(int) vox_hang;
        }
     }
-    if (gpio == CWL_BUTTON) {
+    if (gpio == CWL_BUTTON)
         kcwl = state;
         //fprintf(stderr,"L=%d\n",state);   
-    } else { // CWR_BUTTON
+    else // CWR_BUTTON
         kcwr = state;
-        //fprintf(stderr,"R=%d\n",state);   
-    }
 
     if (state || cw_keyer_mode == KEYER_STRAIGHT) {
 #ifdef __APPLE__
index c2e280eae2264426303a17e1f9dc55e8d687835f..2e61492cc96e900e364fb046d3490647fbb21298 100644 (file)
@@ -132,7 +132,6 @@ static void snb_cb(GtkWidget *widget, gpointer data) {
 void noise_menu(GtkWidget *parent) {
   GtkWidget *b;
   int i;
-  int mode=vfo[active_receiver->id].mode;
 
   parent_window=parent;
 
index 80427a3591bccb9b596427086b7c60a0b4c96ce2..4e9b9d9ddbf038fc622fe278424e75bbbda3880b 100644 (file)
@@ -131,9 +131,6 @@ static double phase=0.0;
 static int running;
 static long ep4_sequence;
 
-// DL1YCF added this variable for lost-package-check
-// init with -1 such that there is no error message if the
-// first packet is received with seq_num = 0
 static long last_seq_num=-1;
 
 static int current_rx=0;
index 082cbf705237e8ea5939e964ebf31274e010ac5f..ac2509641668878d1706b05c4ef1430b9ce30def 100644 (file)
--- a/ps_menu.c
+++ b/ps_menu.c
@@ -291,7 +291,6 @@ static void twotone_cb(GtkWidget *widget, gpointer data) {
     g_timeout_add((guint) 100, info_thread, NULL);
   } else {
     running=0;
-    usleep(20000); // to be sure info_thread stopped
   }
 }
 
diff --git a/radio.c b/radio.c
index 70ed23a0ff2f64d36cbab8451c43fc669cedb565..3bf10ec5aaa3121211d3592df2e883add2e331a8 100644 (file)
--- a/radio.c
+++ b/radio.c
@@ -833,7 +833,7 @@ void setTune(int state) {
       //schedule_general();
     }
     if(tune) {
-        for(i=0;i<receivers;i++) {
+      for(i=0;i<receivers;i++) {
         SetChannelState(receiver[i]->id,0,i==(receivers-1));
         set_displaying(receiver[i],0);
         if(protocol==NEW_PROTOCOL) {
index 76cfaef9a21d8fb66d8470ab175577f59f71ab9d..54f862c80f91469f6d231d792f125b80e2a7ae9e 100644 (file)
@@ -1197,16 +1197,8 @@ static void process_rx_buffer(RECEIVER *rx) {
   short left_audio_sample;
   short right_audio_sample;
   int i;
-  int mute=0;
-  //
-  // DL1YCF: mute the receiver if we are transmitting on its frequency
-  //
-  if (isTransmitting()) {
-    if (!split && (rx->id == active_receiver->id)) mute=1;
-    if ( split && (rx->id != active_receiver->id)) mute=1;
-  }
   for(i=0;i<rx->output_samples;i++) {
-    if(mute) {
+    if(isTransmitting()) {
       left_audio_sample=0;
       right_audio_sample=0;
     } else {
index b2e01e3a8ffdc26d260b9a9f5f0c7e8e78b5a283..b4c17c951caa87d922b8752ff7e3d8392e5331c4 100644 (file)
@@ -986,10 +986,8 @@ void add_ps_iq_samples(TRANSMITTER *tx, double i_sample_tx,double q_sample_tx, d
   if(rx_feedback->samples>=rx_feedback->buffer_size) {
     if(isTransmitting()) {
       pscc(transmitter->id, rx_feedback->buffer_size, tx_feedback->iq_input_buffer, rx_feedback->iq_input_buffer);
-      if(transmitter->displaying) {
-        if(transmitter->feedback) {
-          Spectrum0(1, rx_feedback->id, 0, 0, rx_feedback->iq_input_buffer);
-        }
+      if(transmitter->displaying && transmitter->feedback) {
+        Spectrum0(1, rx_feedback->id, 0, 0, rx_feedback->iq_input_buffer);
       }
     }
     rx_feedback->samples=0;
index 85eb58dfed2b126946e1a23058efb6b6ab94368c..852220f541c78508302ccf0ea164225032f7b450 100644 (file)
@@ -49,9 +49,6 @@ static gfloat hz_per_pixel;
 static gfloat filter_left;
 static gfloat filter_right;
 
-#include "new_menu.h"
-#include "ext.h"
-#include "sliders.h"
 
 /* Create a new surface of the appropriate size to store our scribbles */
 static gboolean
@@ -143,16 +140,17 @@ tx_panadapter_motion_notify_event_cb (GtkWidget      *widget,
   int x, y;
   GdkModifierType state;
   gdk_window_get_device_position (event->window,
-                                  event->device,
-                                  &x,
-                                  &y,
-                                  &state);
+                                event->device,
+                                &x,
+                                &y,
+                                &state);
   if(((state & GDK_BUTTON1_MASK) == GDK_BUTTON1_MASK) || pressed) {
     int moved=last_x-x;
     vfo_move((long long)((float)moved*hz_per_pixel));
     last_x=x;
     has_moved=TRUE;
   }
+
   return TRUE;
 }
 
diff --git a/vfo.c b/vfo.c
index efd6b209dd1f769320262434462abde72b87e99a..7d041a7bba3bd001d21ad6447d5faf1522fb9ff2 100644 (file)
--- a/vfo.c
+++ b/vfo.c
@@ -68,6 +68,7 @@ char *step_labels[]={"1Hz","10Hz","25Hz","50Hz","100Hz","250Hz","500Hz","1kHz","
 static GtkWidget* menu=NULL;
 static GtkWidget* band_menu=NULL;
 
+
 static void vfo_save_bandstack() {
   BANDSTACK *bandstack=bandstack_get_bandstack(vfo[0].band);
   BANDSTACK_ENTRY *entry=&bandstack->entry[vfo[0].bandstack];
@@ -345,15 +346,12 @@ void vfo_bandstack_changed(int b) {
 
 }
 
-//
-// When changing the mode, store the current filter setting
-// and for the new mode, switch to the filter we had the last time
-//
 void vfo_mode_changed(int m) {
   int id=active_receiver->id;
-
   vfo[id].mode=m;
-  // restore filter and NR configuration used last in the new mode
+//
+// Change to the filter/NR combination stored for this mode
+//
   vfo[id].filter      =mode_settings[m].filter;
   active_receiver->nr =mode_settings[m].nr;
   active_receiver->nr2=mode_settings[m].nr2;
@@ -697,7 +695,7 @@ void vfo_update() {
        // If it is out-of-band, we display "Out of band" in red.
         // Frequencies we are not transmitting on are displayed in green
        // (dimmed if the freq. does not belong to the active receiver).
-        // Depending on which receiver is the active one, and if we use slit,
+        // Depending on which receiver is the active one, and if we use split,
         // the following frequencies are used for transmitting (see old_protocol.c):
        // id == 0, split == 0 : TX freq = VFO_A
        // id == 0, split == 1 : TX freq = VFO_B