case SMETER:
{
double level=value+(double)adc_attenuation[rx->adc];
+ if (filter_board == CHARLY25) {
+ // preamp/dither encodes the preamp level
+ if (rx->preamp) level -= 18.0;
+ if (rx->dither) level -= 18.0;
+ }
offset=210.0;
int i;
text_location=10;
offset=5.0;
double level=value+(double)adc_attenuation[rx->adc];
+ if (filter_board == CHARLY25) {
+ // preamp/dither encodes the preamp level
+ if (rx->preamp) level -= 18.0;
+ if (rx->dither) level -= 18.0;
+ }
if(meter_width>=114) {
//int db=meter_width/114; // S9+60 (9*6)+60
//if(db>2) db=2;
#include <sys/socket.h>
#include <arpa/inet.h> //inet_addr
-//#undef RIGCTL_DEBUG
-#define RIGCTL_DEBUG
+#undef RIGCTL_DEBUG
+//#define RIGCTL_DEBUG
int rigctl_port_base=19090;
int rigctl_enable=0;
// call audo_close_output with old device, audio_open_output with new one
//
static void local_output_changed_cb(GtkWidget *widget, gpointer data) {
-//active_receiver->audio_device=(int)(long)data;
int newdev = (int)(long)data;
-fprintf(stderr,"local_output_changed rx=%d from %d to %d\n",active_receiver->id,active_receiver->audio_device,newdev);
+ fprintf(stderr,"local_output_changed rx=%d from %d to %d\n",active_receiver->id,active_receiver->audio_device,newdev);
if(active_receiver->local_audio) {
audio_close_output(active_receiver); // audio_close with OLD device
active_receiver->audio_device=newdev; // update rx to NEW device
} else {
active_receiver->local_audio=0;
}
-fprintf(stderr,"local_output_changed rx=%d local_audio=%d\n",active_receiver->id,active_receiver->local_audio);
+ fprintf(stderr,"local_output_changed rx=%d local_audio=%d\n",active_receiver->id,active_receiver->local_audio);
+ } else {
+ // If not (currently) using local audio, just change dev num
+ active_receiver->audio_device=newdev;
}
}
static void c25_att_combobox_changed(GtkWidget *widget, gpointer data) {
int id = atoi(gtk_combo_box_get_active_id(GTK_COMBO_BOX(widget)));
+ //DL1YCF: store attenuation, such that in meter.c the correct level is displayed
+ adc_attenuation[active_receiver->adc] = 12.0*id;
set_alex_attenuation(id);
}
static void c25_preamp_combobox_changed(GtkWidget *widget, gpointer data) {
int id = atoi(gtk_combo_box_get_active_id(GTK_COMBO_BOX(widget)));
+ //DL1YCF comment: dither and preamp are "misused" to store the PreAmp value.
+ // this has to be exploited in meter.c
active_receiver->dither = id >= 2;
active_receiver->preamp = id >= 1;
}