From 1e4e3674ac684d557967ba9567292f4b8beaa24b Mon Sep 17 00:00:00 2001 From: c vw Date: Mon, 14 Dec 2020 15:19:02 +0100 Subject: [PATCH] Make XIT increments 10 times the RIT increment. --- radio_menu.c | 8 ++++---- toolbar.c | 9 +++++++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/radio_menu.c b/radio_menu.c index 8e13f34..3d45724 100644 --- a/radio_menu.c +++ b/radio_menu.c @@ -652,23 +652,23 @@ void radio_menu(GtkWidget *parent) { row=1; GtkWidget *rit_label=gtk_label_new(NULL); - gtk_label_set_markup(GTK_LABEL(rit_label), "RIT/XIT step (Hz):"); + gtk_label_set_markup(GTK_LABEL(rit_label), "RIT(XIT) step (Hz):"); gtk_grid_attach(GTK_GRID(grid),rit_label,col,row,1,1); row++; - GtkWidget *rit_1=gtk_radio_button_new_with_label(NULL,"1"); + GtkWidget *rit_1=gtk_radio_button_new_with_label(NULL,"1(10)"); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (rit_1), rit_increment==1); gtk_grid_attach(GTK_GRID(grid),rit_1,col,row,1,1); g_signal_connect(rit_1,"pressed",G_CALLBACK(rit_cb),(gpointer *)1); row++; - GtkWidget *rit_10=gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(rit_1),"10"); + GtkWidget *rit_10=gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(rit_1),"10(100)"); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (rit_10), rit_increment==10); gtk_grid_attach(GTK_GRID(grid),rit_10,col,row,1,1); g_signal_connect(rit_10,"pressed",G_CALLBACK(rit_cb),(gpointer *)10); row++; - GtkWidget *rit_100=gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(rit_10),"100"); + GtkWidget *rit_100=gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(rit_10),"100(1000)"); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (rit_100), rit_increment==100); gtk_grid_attach(GTK_GRID(grid),rit_100,col,row,1,1); g_signal_connect(rit_100,"pressed",G_CALLBACK(rit_cb),(gpointer *)100); diff --git a/toolbar.c b/toolbar.c index fa08056..6727192 100644 --- a/toolbar.c +++ b/toolbar.c @@ -91,7 +91,7 @@ static gboolean rit_timer_cb(gpointer data) { static gboolean xit_timer_cb(gpointer data) { int i=GPOINTER_TO_INT(data); - transmitter->xit+=(i*rit_increment); + transmitter->xit+=(10*i*rit_increment); if(transmitter->xit>10000) transmitter->xit=10000; if(transmitter->xit<-10000) transmitter->xit=-10000; if(protocol==NEW_PROTOCOL) { @@ -427,7 +427,12 @@ static void xit_enable_cb(GtkWidget *widget, gpointer data) { static void xit_cb(GtkWidget *widget, gpointer data) { if(can_transmit) { int i=GPOINTER_TO_INT(data); - transmitter->xit+=i*rit_increment; + // + // in practical operation, you mostly want to change rit by small amounts + // (if listening to a group of non-transceive members) but XIT is mostly used + // for "split" operation and needs 10 times larger increments + // + transmitter->xit+=i*rit_increment*10; if(transmitter->xit>10000) transmitter->xit=10000; if(transmitter->xit<-10000) transmitter->xit=-10000; if(protocol==NEW_PROTOCOL) { -- 2.45.2