reconfigure_radio();
}
+static void display_sequence_errors_cb(GtkWidget *widget, gpointer data) {
+ display_sequence_errors=display_sequence_errors==1?0:1;
+}
+
void display_menu(GtkWidget *parent) {
parent_window=parent;
gtk_grid_attach(GTK_GRID(grid),b_display_toolbar,col,row,1,1);
g_signal_connect(b_display_toolbar,"toggled",G_CALLBACK(display_toolbar_cb),(gpointer *)NULL);
+ col++;
+
+ GtkWidget *b_display_sequence_errors=gtk_check_button_new_with_label("Display Seq Errs");
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (b_display_sequence_errors), display_sequence_errors);
+ gtk_widget_show(b_display_sequence_errors);
+ gtk_grid_attach(GTK_GRID(grid),b_display_sequence_errors,col,row,1,1);
+ g_signal_connect(b_display_sequence_errors,"toggled",G_CALLBACK(display_sequence_errors_cb),(gpointer *)NULL);
+
gtk_container_add(GTK_CONTAINER(content),grid);
sub_menu=dialog;
gboolean duplex=FALSE;
gboolean mute_rx_while_transmitting=FALSE;
-int sequence_errors=0;
+gboolean display_sequence_errors=TRUE;
+gint sequence_errors=0;
gint rx_height;
average_current=0;
n_current=0;
+ display_sequence_errors=TRUE;
+
radioRestoreState();
//
}
#endif
+ value=getProperty("radio.display_sequence_errors");
+ if(value!=NULL) display_sequence_errors=atoi(value);
//g_print("sem_post\n");
#ifdef __APPLE__
sprintf(value,"%d",rigctl_port_base);
setProperty("rigctl_port_base",value);
+ sprintf(value,"%d",display_sequence_errors);
+ setProperty("radio.display_sequence_errors",value);
+
saveProperties(property_path);
g_print("sem_post\n");
#ifdef __APPLE__
extern int rx_gain_calibration; // position of the RX gain slider that
// corresponds to zero amplification/attenuation
-extern int sequence_errors;
+extern gboolean display_sequence_errors;
+extern gint sequence_errors;
extern void radio_stop();
extern void reconfigure_radio();
}
#endif
- if(sequence_errors!=0) {
- cairo_move_to(cr,100.0,50.0);
- cairo_set_source_rgb(cr,1.0,0.0,0.0);
- cairo_set_font_size(cr,12);
- cairo_show_text(cr, "Sequence Error");
- sequence_error_count++;
- // show for 2 second
- if(sequence_error_count==2*rx->fps) {
- sequence_errors=0;
- sequence_error_count=0;
+ if(display_sequence_errors) {
+ if(sequence_errors!=0) {
+ cairo_move_to(cr,100.0,50.0);
+ cairo_set_source_rgb(cr,1.0,0.0,0.0);
+ cairo_set_font_size(cr,12);
+ cairo_show_text(cr, "Sequence Error");
+ sequence_error_count++;
+ // show for 2 second
+ if(sequence_error_count==2*rx->fps) {
+ sequence_errors=0;
+ sequence_error_count=0;
+ }
}
}