}
int ext_split_toggle(void *data) {
+ BAND *band;
if(can_transmit) {
split=split==1?0:1;
tx_set_mode(transmitter,get_tx_mode());
+ //
+ // Since the TX band possibly changed, we have to
+ // adjust the TX antenna
+ //
+ band=band_get_band(vfo[get_tx_vfo()].band);
+ set_alex_tx_antenna(band->alexTxAntenna);
+ g_print("transmitter TxAnt=%d\n", band->alexTxAntenna);
+
g_idle_add(ext_vfo_update, NULL);
}
return 0;
gboolean receiver_button_release_event(GtkWidget *widget, GdkEventButton *event, gpointer data) {
RECEIVER *rx=(RECEIVER *)data;
+ BAND *band;
+ int id;
if(making_active) {
active_receiver=rx;
making_active=FALSE;
// setup the transmitter mode and filter
tx_set_mode(transmitter,get_tx_mode());
+ // set RX antenna
+ id=active_receiver->id;
+ band=band_get_band(vfo[id].band);
+ set_alex_rx_antenna(band->alexRxAntenna);
+ g_print("receiver: %d RxAnt=%d\n", id, band->alexRxAntenna);
+
+ // set TX antenna
+ band=band_get_band(vfo[get_tx_vfo()].band);
+ set_alex_tx_antenna(band->alexTxAntenna);
+ g_print("transmitter TxAnt=%d\n", band->alexTxAntenna);
+
//g_print("receiver: %d adc=%d attenuation=%d rx_gain_calibration=%d\n",rx->id,rx->adc,adc_attenuation[rx->adc],rx_gain_calibration);
} else {
if(pressed) {