]> git.rkrishnan.org Git - pihpsdr.git/commitdiff
fixed references to SoapySDR when not compiled in
authorJohn Melton g0orx/n6lyt <john.d.melton@googlemail.com>
Tue, 14 Jun 2016 06:39:01 +0000 (06:39 +0000)
committerJohn Melton g0orx/n6lyt <john.d.melton@googlemail.com>
Tue, 14 Jun 2016 06:39:01 +0000 (06:39 +0000)
Makefile
discovered.h
main.c
menu.c
pihpsdr
release/pihpsdr.tar
release/pihpsdr/pihpsdr
vfo.c

index 763ade8f730a7feb9dcb9c8749ef5ff913dae1bd..cc35a17cb80307f4b02b8d32cef12d4561b5fd8b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -6,7 +6,7 @@ LINK=gcc
 #LIMESDR_INCLUDE=LIMESDR
 
 ifeq ($(LIMESDR_INCLUDE),LIMESDR)
-#LIMESDR_OPTIONS=-D LIMESDR
+LIMESDR_OPTIONS=-D LIMESDR
 SOAPYSDRLIBS=-lSoapySDR -lpulse-simple -lpulse
 LIMESDR_SOURCES= \
 audio.c \
@@ -24,7 +24,7 @@ endif
 
 
 #required for FREEDV (uncomment lines below)
-FREEDV_INCLUDE=FREEDV
+#FREEDV_INCLUDE=FREEDV
 
 ifeq ($(FREEDV_INCLUDE),FREEDV)
 FREEDV_OPTIONS=-D FREEDV
index a3ac2efd4866e121c9de2e3a50e506d498ae2f9c..5b76d87d9d85f9a11cb86ea983d5e1a48fb3782e 100644 (file)
@@ -18,7 +18,9 @@
 */
 
 #include <netinet/in.h>
+#ifdef LIMESDR
 #include <SoapySDR/Device.h>
+#endif
 
 #define MAX_DEVICES 16
 
 #define NEW_DEVICE_ORION2 5
 #define NEW_DEVICE_HERMES_LITE 6
 
+#ifdef LIMESDR
 #define LIMESDR_USB_DEVICE 0
+#endif
 
 #define STATE_AVAILABLE 2
 #define STATE_SENDING 3
 
 #define ORIGINAL_PROTOCOL 0
 #define NEW_PROTOCOL 1
+#ifdef LIMESDR
 #define LIMESDR_PROTOCOL 2
+#endif
 
 struct _DISCOVERED {
     int protocol;
@@ -62,9 +68,11 @@ struct _DISCOVERED {
         struct sockaddr_in interface_netmask;
         char interface_name[64];
       } network;
+#ifdef LIMESDR
       struct soapy {
         SoapySDRKwargs *args;
       } soapy;
+#endif
     } info;
 };
 
diff --git a/main.c b/main.c
index f0e109a409d121069dfb1a71483547ff7d2265af..66ac9667d1ff512a80092b5b31f6ad4a56fa5ecf 100644 (file)
--- a/main.c
+++ b/main.c
@@ -604,7 +604,11 @@ static void configure_cb(GtkWidget *widget, gpointer data) {
   gtk_grid_attach(GTK_GRID(grid),sample_rate_384,0,4,1,1);
   g_signal_connect(sample_rate_384,"pressed",G_CALLBACK(sample_rate_cb),(gpointer *)384000);
 
-  if(d->protocol==NEW_PROTOCOL || d->protocol==LIMESDR_PROTOCOL) {
+  if(d->protocol==NEW_PROTOCOL
+#ifdef LIMESDR
+    || d->protocol==LIMESDR_PROTOCOL
+#endif
+    ) {
     GtkWidget *sample_rate_768=gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(sample_rate_384),"768000");
     //gtk_widget_override_font(sample_rate_768, pango_font_description_from_string("Arial 18"));
     gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (sample_rate_768), sample_rate==768000);
diff --git a/menu.c b/menu.c
index 9bc6f5d2d36978a12281148f4c784a77f22b2a28..c91bbfe9695a5f98ccf06fe1e20faf69a7a59717 100644 (file)
--- a/menu.c
+++ b/menu.c
@@ -401,9 +401,11 @@ static void tx_ant_cb(GtkWidget *widget, gpointer data) {
   set_alex_tx_antenna(ant);
 }
 
+#ifdef FREEDV
 static void freedv_text_changed_cb(GtkWidget *widget, gpointer data) {
   strcpy(freedv_tx_text_data,gtk_entry_get_text(GTK_ENTRY(widget)));
 }
+#endif
 
 static void switch_page_cb(GtkNotebook *notebook,
                GtkWidget   *page,
diff --git a/pihpsdr b/pihpsdr
index 8bc9b1434e0728b6f8334fd5daad092fb9bcf416..843c4207a79ab135e61d897731f9ffc13cf8c427 100755 (executable)
Binary files a/pihpsdr and b/pihpsdr differ
index 638dc2e600c622d5618a36e4099ffc65a3018578..6c0eb0303d2bb81b75eaa68e2f6bba85e8734a01 100644 (file)
Binary files a/release/pihpsdr.tar and b/release/pihpsdr.tar differ
index 8bc9b1434e0728b6f8334fd5daad092fb9bcf416..843c4207a79ab135e61d897731f9ffc13cf8c427 100755 (executable)
Binary files a/release/pihpsdr/pihpsdr and b/release/pihpsdr/pihpsdr differ
diff --git a/vfo.c b/vfo.c
index 76ecf4c7402cb4bf6e0a521edc6732da4ac59729..99c19c64aa5d128cba2eaf67fae7ec3ec5ca0df7 100644 (file)
--- a/vfo.c
+++ b/vfo.c
@@ -40,6 +40,9 @@
 #include "toolbar.h"
 #include "wdsp.h"
 #include "wdsp_init.h"
+#ifdef LIMESDR
+#include "discovered.h"
+#endif
 
 static GtkWidget *parent_window;
 static int my_width;