Skip to content

Commit

Permalink
Fix 2 receivers in radio_menu
Browse files Browse the repository at this point in the history
  • Loading branch information
g0orx committed Mar 18, 2020
1 parent ea9bfb6 commit 9e9bfcd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions new_discovery.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions old_discovery.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion radio_menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <string.h>

#include "main.h"
#include "discovered.h"
#include "new_menu.h"
#include "radio_menu.h"
#include "adc.h"
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 9e9bfcd

Please sign in to comment.