]> git.rkrishnan.org Git - pihpsdr.git/commitdiff
more debug prints and rounding experiments
authorRamakrishnan Muthukrishnan <ram@rkrishnan.org>
Fri, 14 Jan 2022 09:37:58 +0000 (15:07 +0530)
committerRamakrishnan Muthukrishnan <ram@rkrishnan.org>
Fri, 14 Jan 2022 09:37:58 +0000 (15:07 +0530)
rigctl.c
sliders.c

index e028ce450d53ec4e3efa6b3b86bc590534fdcb50..1997bbe60103721908d877281ea628a9050d4d94 100644 (file)
--- a/rigctl.c
+++ b/rigctl.c
@@ -3483,8 +3483,8 @@ int parse_cmd(void *data) {
           } else {
               att = (attI * 31.0) / 99.0;
           }
-          printf("setting attn val [-12..48]: %f\n", att);
-          set_attenuation_value(att);
+          printf("setting attn val [-12..48]: %f\n", round(att));
+          set_attenuation_value(round(att));
       }
       break;
     case 'C': // RC
index 60bcdcb56981e0b0de6fcc06d3ede30ebc2c7dce..87af31dd97f3a1e2535e97b40c72affcb87f4cc5 100644 (file)
--- a/sliders.c
+++ b/sliders.c
@@ -180,6 +180,7 @@ void set_attenuation_value(double value) {
       scale_dialog=gtk_dialog_new_with_buttons(title,GTK_WINDOW(top_window),GTK_DIALOG_DESTROY_WITH_PARENT,NULL,NULL);
       GtkWidget *content=gtk_dialog_get_content_area(GTK_DIALOG(scale_dialog));
       if (have_rx_gain) {
+          printf("************** set attenuation scale [-12, 48] \n");
         attenuation_scale=gtk_scale_new_with_range(GTK_ORIENTATION_HORIZONTAL,-12.0, 48.0, 1.00);
       } else {
         attenuation_scale=gtk_scale_new_with_range(GTK_ORIENTATION_HORIZONTAL,0.0, 31.0, 1.00);