From: John Melton g0orx/n6lyt Date: Tue, 14 Jun 2016 06:39:01 +0000 (+0000) Subject: fixed references to SoapySDR when not compiled in X-Git-Url: https://git.rkrishnan.org/pf/components/$rel_link?a=commitdiff_plain;h=8565907906b054835d7b15c22498fea5c26f82c6;p=pihpsdr.git fixed references to SoapySDR when not compiled in --- diff --git a/Makefile b/Makefile index 763ade8..cc35a17 100644 --- 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 diff --git a/discovered.h b/discovered.h index a3ac2ef..5b76d87 100644 --- a/discovered.h +++ b/discovered.h @@ -18,7 +18,9 @@ */ #include +#ifdef LIMESDR #include +#endif #define MAX_DEVICES 16 @@ -37,14 +39,18 @@ #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 f0e109a..66ac966 100644 --- 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 9bc6f5d..c91bbfe 100644 --- 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 8bc9b14..843c420 100755 Binary files a/pihpsdr and b/pihpsdr differ diff --git a/release/pihpsdr.tar b/release/pihpsdr.tar index 638dc2e..6c0eb03 100644 Binary files a/release/pihpsdr.tar and b/release/pihpsdr.tar differ diff --git a/release/pihpsdr/pihpsdr b/release/pihpsdr/pihpsdr index 8bc9b14..843c420 100755 Binary files a/release/pihpsdr/pihpsdr and b/release/pihpsdr/pihpsdr differ diff --git a/vfo.c b/vfo.c index 76ecf4c..99c19c6 100644 --- 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;