static GtkWidget *sliders;
gint scale_timer;
-int scale_status=NO_FUNCTION;
+int scale_status=NO_ACTION;
int scale_rx=0;
GtkWidget *scale_dialog;
int scale_timeout_cb(gpointer data) {
gtk_widget_destroy(scale_dialog);
- scale_status=NO_FUNCTION;
+ scale_status=NO_ACTION;
return FALSE;
}
}
} else {
if(scale_status!=ATTENUATION) {
- if(scale_status!=NO_FUNCTION) {
+ if(scale_status!=NO_ACTION) {
g_source_remove(scale_timer);
gtk_widget_destroy(scale_dialog);
- scale_status=NO_FUNCTION;
+ scale_status=NO_ACTION;
}
}
- if(scale_status==NO_FUNCTION) {
+ if(scale_status==NO_ACTION) {
char title[64];
if (have_rx_gain) {
sprintf(title,"RX GAIN - ADC-%d (dB)",active_receiver->adc);
gtk_range_set_value (GTK_RANGE(agc_scale),receiver[rx]->agc_gain);
} else {
if(scale_status!=AGC_GAIN || scale_rx!=rx) {
- if(scale_status!=NO_FUNCTION) {
+ if(scale_status!=NO_ACTION) {
g_source_remove(scale_timer);
gtk_widget_destroy(scale_dialog);
- scale_status=NO_FUNCTION;
+ scale_status=NO_ACTION;
}
}
- if(scale_status==NO_FUNCTION) {
+ if(scale_status==NO_ACTION) {
scale_status=AGC_GAIN;
scale_rx=rx;
char title[64];
gtk_range_set_value (GTK_RANGE(af_gain_scale),receiver[rx]->volume*100.0);
} else {
if(scale_status!=AF_GAIN || scale_rx!=rx) {
- if(scale_status!=NO_FUNCTION) {
+ if(scale_status!=NO_ACTION) {
g_source_remove(scale_timer);
gtk_widget_destroy(scale_dialog);
- scale_status=NO_FUNCTION;
+ scale_status=NO_ACTION;
}
}
- if(scale_status==NO_FUNCTION) {
+ if(scale_status==NO_ACTION) {
scale_status=AF_GAIN;
scale_rx=rx;
char title[64];
gtk_range_set_value (GTK_RANGE(rf_gain_scale),adc[receiver[rx]->id].gain);
} else {
if(scale_status!=RF_GAIN || scale_rx!=rx) {
- if(scale_status!=NO_FUNCTION) {
+ if(scale_status!=NO_ACTION) {
g_source_remove(scale_timer);
gtk_widget_destroy(scale_dialog);
- scale_status=NO_FUNCTION;
+ scale_status=NO_ACTION;
}
}
- if(scale_status==NO_FUNCTION) {
+ if(scale_status==NO_ACTION) {
scale_status=RF_GAIN;
scale_rx=rx;
char title[64];
void set_filter_width(int rx,int width) {
g_print("%s\n",__FUNCTION__);
if(scale_status!=IF_WIDTH || scale_rx!=rx) {
- if(scale_status!=NO_FUNCTION) {
+ if(scale_status!=NO_ACTION) {
g_source_remove(scale_timer);
gtk_widget_destroy(scale_dialog);
- scale_status=NO_FUNCTION;
+ scale_status=NO_ACTION;
}
}
- if(scale_status==NO_FUNCTION) {
+ if(scale_status==NO_ACTION) {
scale_status=IF_WIDTH;
scale_rx=rx;
char title[64];
void set_filter_shift(int rx,int shift) {
g_print("%s\n",__FUNCTION__);
if(scale_status!=IF_SHIFT || scale_rx!=rx) {
- if(scale_status!=NO_FUNCTION) {
+ if(scale_status!=NO_ACTION) {
g_source_remove(scale_timer);
gtk_widget_destroy(scale_dialog);
- scale_status=NO_FUNCTION;
+ scale_status=NO_ACTION;
}
}
- if(scale_status==NO_FUNCTION) {
+ if(scale_status==NO_ACTION) {
scale_status=IF_SHIFT;
scale_rx=rx;
char title[64];
gtk_range_set_value (GTK_RANGE(mic_gain_scale),mic_gain);
} else {
if(scale_status!=MIC_GAIN) {
- if(scale_status!=NO_FUNCTION) {
+ if(scale_status!=NO_ACTION) {
g_source_remove(scale_timer);
gtk_widget_destroy(scale_dialog);
- scale_status=NO_FUNCTION;
+ scale_status=NO_ACTION;
}
}
- if(scale_status==NO_FUNCTION) {
+ if(scale_status==NO_ACTION) {
scale_status=MIC_GAIN;
scale_dialog=gtk_dialog_new_with_buttons("Mic Gain",GTK_WINDOW(top_window),GTK_DIALOG_DESTROY_WITH_PARENT,NULL,NULL);
GtkWidget *content=gtk_dialog_get_content_area(GTK_DIALOG(scale_dialog));
gtk_range_set_value (GTK_RANGE(mic_gain_scale),linein_gain);
} else {
if(scale_status!=LINEIN_GAIN) {
- if(scale_status!=NO_FUNCTION) {
+ if(scale_status!=NO_ACTION) {
g_source_remove(scale_timer);
gtk_widget_destroy(scale_dialog);
- scale_status=NO_FUNCTION;
+ scale_status=NO_ACTION;
}
}
- if(scale_status==NO_FUNCTION) {
+ if(scale_status==NO_ACTION) {
scale_status=LINEIN_GAIN;
scale_dialog=gtk_dialog_new_with_buttons("Linein Gain",GTK_WINDOW(top_window),GTK_DIALOG_DESTROY_WITH_PARENT,NULL,NULL);
GtkWidget *content=gtk_dialog_get_content_area(GTK_DIALOG(scale_dialog));
gtk_range_set_value (GTK_RANGE(drive_scale),value);
} else {
if(scale_status!=DRIVE) {
- if(scale_status!=NO_FUNCTION) {
+ if(scale_status!=NO_ACTION) {
g_source_remove(scale_timer);
gtk_widget_destroy(scale_dialog);
- scale_status=NO_FUNCTION;
+ scale_status=NO_ACTION;
}
}
- if(scale_status==NO_FUNCTION) {
+ if(scale_status==NO_ACTION) {
scale_status=DRIVE;
scale_dialog=gtk_dialog_new_with_buttons("Drive",GTK_WINDOW(top_window),GTK_DIALOG_DESTROY_WITH_PARENT,NULL,NULL);
GtkWidget *content=gtk_dialog_get_content_area(GTK_DIALOG(scale_dialog));
} else {
#endif
if(scale_status!=SQUELCH) {
- if(scale_status!=NO_FUNCTION) {
+ if(scale_status!=NO_ACTION) {
g_source_remove(scale_timer);
gtk_widget_destroy(scale_dialog);
- scale_status=NO_FUNCTION;
+ scale_status=NO_ACTION;
}
}
- if(scale_status==NO_FUNCTION) {
+ if(scale_status==NO_ACTION) {
scale_status=SQUELCH;
char title[64];
sprintf(title,"Squelch RX %d (Hz)",active_receiver->id);
} else {
#endif
if(scale_status!=COMPRESSION) {
- if(scale_status!=NO_FUNCTION) {
+ if(scale_status!=NO_ACTION) {
g_source_remove(scale_timer);
gtk_widget_destroy(scale_dialog);
- scale_status=NO_FUNCTION;
+ scale_status=NO_ACTION;
}
}
- if(scale_status==NO_FUNCTION) {
+ if(scale_status==NO_ACTION) {
scale_status=COMPRESSION;
scale_dialog=gtk_dialog_new_with_buttons("COMP",GTK_WINDOW(top_window),GTK_DIALOG_DESTROY_WITH_PARENT,NULL,NULL);
GtkWidget *content=gtk_dialog_get_content_area(GTK_DIALOG(scale_dialog));
void show_diversity_gain() {
g_print("%s\n",__FUNCTION__);
if(scale_status!=DIV_GAIN) {
- if(scale_status!=NO_FUNCTION) {
+ if(scale_status!=NO_ACTION) {
g_source_remove(scale_timer);
gtk_widget_destroy(scale_dialog);
- scale_status=NO_FUNCTION;
+ scale_status=NO_ACTION;
}
}
- if(scale_status==NO_FUNCTION) {
+ if(scale_status==NO_ACTION) {
scale_status=DIV_GAIN;
scale_dialog=gtk_dialog_new_with_buttons("Diversity Gain",GTK_WINDOW(top_window),GTK_DIALOG_DESTROY_WITH_PARENT,NULL,NULL);
GtkWidget *content=gtk_dialog_get_content_area(GTK_DIALOG(scale_dialog));
void show_diversity_phase() {
g_print("%s\n",__FUNCTION__);
if(scale_status!=DIV_PHASE) {
- if(scale_status!=NO_FUNCTION) {
+ if(scale_status!=NO_ACTION) {
g_source_remove(scale_timer);
gtk_widget_destroy(scale_dialog);
- scale_status=NO_FUNCTION;
+ scale_status=NO_ACTION;
}
}
- if(scale_status==NO_FUNCTION) {
+ if(scale_status==NO_ACTION) {
scale_status=DIV_PHASE;
scale_dialog=gtk_dialog_new_with_buttons("Diversity Phase",GTK_WINDOW(top_window),GTK_DIALOG_DESTROY_WITH_PARENT,NULL,NULL);
GtkWidget *content=gtk_dialog_get_content_area(GTK_DIALOG(scale_dialog));