]> git.rkrishnan.org Git - pihpsdr.git/commitdiff
Fix 2 receivers in radio_menu
authorJohn Melton G0ORX <john.d.melton@googlemail.com>
Wed, 18 Mar 2020 20:15:29 +0000 (20:15 +0000)
committerJohn Melton G0ORX <john.d.melton@googlemail.com>
Wed, 18 Mar 2020 20:15:29 +0000 (20:15 +0000)
new_discovery.c
old_discovery.c
radio_menu.c

index d6c3d468a5eeda234dae6ff33322b7adbb166461..6039d34b4ab504ac139d38f904262bcd6033266e 100644 (file)
@@ -275,6 +275,7 @@ gpointer new_discover_receive_thread(gpointer data) {
                     memcpy((void*)&discovered[devices].info.network.interface_netmask,(void*)&interface_netmask,sizeof(interface_netmask));
                     discovered[devices].info.network.interface_length=sizeof(interface_addr);
                     strcpy(discovered[devices].info.network.interface_name,interface_name);
+                    discovered[devices].supported_receivers=2;
                     fprintf(stderr,"new_discover: found %d protocol=%d device=%d software_version=%d status=%d address=%s (%02X:%02X:%02X:%02X:%02X:%02X) on %s\n", 
                             devices,
                             discovered[devices].protocol,
index f28e313fcde763c309fd2acc4f66e26b466960d3..9d53a32743aee0fc5a58e698ae0b181333c99050 100644 (file)
@@ -484,6 +484,7 @@ g_print("old_discovery: name=%s min=%f max=%f\n",discovered[devices].name, disco
                     discovered[devices].info.network.interface_length=sizeof(interface_addr);
                     strcpy(discovered[devices].info.network.interface_name,interface_name);
                    discovered[devices].use_tcp=0;
+                    discovered[devices].supported_receivers=2;
                    fprintf(stderr,"old_discovery: found device=%d software_version=%d status=%d address=%s (%02X:%02X:%02X:%02X:%02X:%02X) on %s min=%f max=%f\n",
                             discovered[devices].device,
                             discovered[devices].software_version,
index 388ba4d27aafda8de343aae69435481a22780ca5..765ef01d1617855a5293103e39bf69af734e9467 100644 (file)
@@ -25,6 +25,7 @@
 #include <string.h>
 
 #include "main.h"
+#include "discovered.h"
 #include "new_menu.h"
 #include "radio_menu.h"
 #include "adc.h"
@@ -440,7 +441,7 @@ void radio_menu(GtkWidget *parent) {
 
   row++;
 
-  if(receivers>1) {
+  if(radio->supported_receivers>1) {
     receivers_2=gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(receivers_1),"2");
     gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (receivers_2), receivers==2);
     gtk_grid_attach(GTK_GRID(grid),receivers_2,col,row,1,1);