soapy_protocol_set_gain(receiver[0],active_receiver->rf_gain);
}
+/*
for(int i=0;i<radio->info.soapy.rx_gains;i++) {
int value=soapy_protocol_get_gain_element(active_receiver,radio->info.soapy.rx_gain[i]);
gtk_spin_button_set_value(GTK_SPIN_BUTTON(rx_gains[i]),(double)value);
}
+*/
+
}
static void rx_gain_value_changed_cb(GtkWidget *widget, gpointer data) {
gain=gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(widget));
soapy_protocol_set_gain_element(receiver[0],(char *)gtk_widget_get_name(widget),gain);
+/*
for(int i=0;i<radio->info.soapy.rx_gains;i++) {
if(strcmp(radio->info.soapy.rx_gain[i],(char *)gtk_widget_get_name(widget))==0) {
adc[0].rx_gain[i]=gain;
break;
}
}
+*/
}
}
if(radio->device==SOAPYSDR_USB_DEVICE) {
transmitter->drive=gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(widget));
soapy_protocol_set_tx_gain(transmitter,(double)transmitter->drive);
+/*
for(int i=0;i<radio->info.soapy.tx_gains;i++) {
int value=soapy_protocol_get_tx_gain_element(transmitter,radio->info.soapy.tx_gain[i]);
gtk_spin_button_set_value(GTK_SPIN_BUTTON(tx_gains[i]),(double)value);
}
+*/
}
}
if(radio->device==SOAPYSDR_USB_DEVICE) {
gain=gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(widget));
soapy_protocol_set_tx_gain_element(transmitter,(char *)gtk_widget_get_name(widget),gain);
+/*
for(int i=0;i<radio->info.soapy.tx_gains;i++) {
if(strcmp(radio->info.soapy.tx_gain[i],(char *)gtk_widget_get_name(widget))==0) {
dac[0].tx_gain[i]=gain;
break;
}
}
+*/
}
}
col=0;
if(radio->device==SOAPYSDR_USB_DEVICE) {
int i;
+/*
if(radio->info.soapy.rx_gains>0) {
GtkWidget *rx_gain=gtk_label_new(NULL);
gtk_label_set_markup(GTK_LABEL(rx_gain), "<b>RX Gains:</b>");
row++;
temp_row=row;
-
+*/
col=0;
if(radio->info.soapy.rx_has_automatic_gain) {
GtkWidget *agc=gtk_check_button_new_with_label("Hardware AGC: ");
}
+/*
//rx_gains=g_new(GtkWidget*,radio->info.soapy.rx_gains);
for(i=0;i<radio->info.soapy.rx_gains;i++) {
col=0;
row++;
}
-
+*/
// used single gain control - LimeSDR works out best setting for the 3 rx gains
col=0;
GtkWidget *rf_gain_label=gtk_label_new("RF Gain");
row=temp_row;
if(can_transmit) {
+/*
//tx_gains=g_new(GtkWidget*,radio->info.soapy.tx_gains);
for(i=0;i<radio->info.soapy.tx_gains;i++) {
col=2;
row++;
}
-
+*/
// used single gain control - LimeSDR works out best setting for the 3 rx gains
col=2;
GtkWidget *tx_gain_label=gtk_label_new("TX Gain");