sprintf(name,"band.%d.errorLO",b);
setProperty(name,value);
- sprintf(value,"%lld",bands[b].txFrequencyLO);
- sprintf(name,"band.%d.txFrequencyLO",b);
- setProperty(name,value);
-
- sprintf(value,"%lld",bands[b].txErrorLO);
- sprintf(name,"band.%d.txErrorLO",b);
- setProperty(name,value);
-
-
sprintf(value,"%d",bands[b].disablePA);
sprintf(name,"band.%d.disablePA",b);
setProperty(name,value);
value=getProperty(name);
if(value) bands[b].errorLO=atoll(value);
- sprintf(name,"band.%d.txFrequencyLO",b);
- value=getProperty(name);
- if(value) bands[b].txFrequencyLO=atoll(value);
-
- sprintf(name,"band.%d.txErrorLO",b);
- value=getProperty(name);
- if(value) bands[b].txErrorLO=atoll(value);
-
sprintf(name,"band.%d.disablePA",b);
value=getProperty(name);
if(value) bands[b].disablePA=atoi(value);
long long frequencyMax;
long long frequencyLO;
long long errorLO;
- long long txFrequencyLO;
- long long txErrorLO;
int disablePA;
};
}
void start_vfo() {
+ int old_menu=active_menu;
cleanup();
- vfo_menu(top_window);
+ if(old_menu!=VFO_MENU) {
+ vfo_menu(top_window);
+ active_menu=VFO_MENU;
+ }
}
static gboolean vfo_cb (GtkWidget *widget, GdkEventButton *event, gpointer data) {
MODE_MENU,
FILTER_MENU,
NOISE_MENU,
- AGC_MENU
+ AGC_MENU,
+ VFO_MENU
};
extern int active_menu;
divisor=50000L;
break;
case 768000:
- divisor=50000L;
+ divisor=100000L;
break;
case 1048576:
case 1536000:
case 2097152:
- divisor=100000L;
+ divisor=200000L;
break;
}
for(i=0;i<display_width;i++) {
if((384000.0>=rx_rates[i].minimum) && (384000<=(int)rx_rates[i].maximum)) {
sample_rate=384000;
}
-/*
if((768000.0>=rx_rates[i].minimum) && (768000<=(int)rx_rates[i].maximum)) {
sample_rate=768000;
}
-*/
}
}
}
v=get_tx_vfo();
if(soapy_device!=NULL) {
- //f=(double)(vfo[v].frequency+vfo[v].ctun_frequency-vfo[v].lo_tx);
if(vfo[v].ctun) {
- f=(double)(vfo[v].ctun_frequency-vfo[v].lo_tx);
+ f=(double)(vfo[v].ctun_frequency);
} else {
- f=(double)(vfo[v].frequency-vfo[v].lo_tx);
+ f=(double)(vfo[v].frequency);
}
if(transmitter->xit_enabled) {
}
// plot frequency markers
- //long long half=24000LL; //(long long)(tx->output_rate/2);
long long half=6000LL; //(long long)(tx->output_rate/2);
long long frequency;
if(vfo[txvfo].ctun) {
- frequency=vfo[txvfo].ctun_frequency-vfo[txvfo].lo_tx;
+ frequency=vfo[txvfo].ctun_frequency;
} else {
- frequency=vfo[txvfo].frequency-vfo[txvfo].lo_tx;
+ frequency=vfo[txvfo].frequency;
}
double vfofreq=(double)display_width * 0.5;
if (!cw_is_on_vfo_freq) {
sprintf(name,"vfo.%d.lo",i);
sprintf(value,"%lld",vfo[i].lo);
setProperty(name,value);
- sprintf(name,"vfo.%d.lo_tx",i);
- sprintf(value,"%lld",vfo[i].lo_tx);
- setProperty(name,value);
sprintf(name,"vfo.%d.ctun_frequency",i);
sprintf(value,"%lld",vfo[i].ctun_frequency);
setProperty(name,value);
sprintf(name,"vfo.%d.filter",i);
value=getProperty(name);
if(value) vfo[i].filter=atoi(value);
- sprintf(name,"vfo.%d.lo_tx",i);
- value=getProperty(name);
- if(value) vfo[i].lo_tx=atoll(value);
// Sanity check: if !ctun, offset must be zero
if (!vfo[i].ctun) {
vfo[i].offset=0;
vfo[id].mode=entry->mode;
vfo[id].filter=entry->filter;
vfo[id].lo=band->frequencyLO+band->errorLO;
- vfo[id].lo_tx=band->txFrequencyLO+band->txErrorLO;
// turn off ctun
vfo[id].ctun=0;
long long lo;
long long offset;
- long long lo_tx;
} vfo[MAX_VFOS];
xvtr->frequencyLO=(long long)(atof(lof)*1000000.0);
loerr=gtk_entry_get_text(GTK_ENTRY(lo_error[i]));
xvtr->errorLO=atoll(loerr);
-/*
- txlof=gtk_entry_get_text(GTK_ENTRY(tx_lo_frequency[i]));
- xvtr->txFrequencyLO=(long long)(atof(txlof)*1000000.0);
- txloerr=gtk_entry_get_text(GTK_ENTRY(tx_lo_error[i]));
- xvtr->txErrorLO=atoll(txloerr);
-*/
- xvtr->txFrequencyLO=0LL;
- xvtr->txErrorLO=0LL;
xvtr->disablePA=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(disable_pa[i]));
for(b=0;b<bandstack->entries;b++) {
BAND *xvtr=band_get_band(band);
//g_print("update_receiver: found band: %s\n",xvtr->title);
vfo[0].lo=xvtr->frequencyLO+xvtr->errorLO;
- vfo[0].lo_tx=xvtr->txFrequencyLO+xvtr->txErrorLO;
saved_ctun=vfo[0].ctun;
if(saved_ctun) {
vfo[0].ctun=FALSE;
update_receiver(vfo[0].band,TRUE);
}
-void tx_lo_frequency_cb(GtkEditable *editable,gpointer user_data) {
- int band=GPOINTER_TO_INT(user_data);
- BAND *xvtr=band_get_band(band);
- const char* lof=gtk_entry_get_text(GTK_ENTRY(tx_lo_frequency[band]));
- xvtr->txFrequencyLO=(long long)(atof(lof)*1000000.0);
- update_receiver(band,FALSE);
-}
-
-void tx_lo_error_cb(GtkEditable *editable,gpointer user_data) {
- int band=GPOINTER_TO_INT(user_data);
- BAND *xvtr=band_get_band(band);
- const char* errorf=gtk_entry_get_text(GTK_ENTRY(tx_lo_error[band]));
- xvtr->txErrorLO=atoll(errorf);
- update_receiver(band,TRUE);
-}
-
static void cleanup() {
save_xvtr();
if(dialog!=NULL) {