]> git.rkrishnan.org Git - pihpsdr.git/commitdiff
use of keyboard ; up (u) and down (d) VFO
authorpa3gsb <pa3gsb@gmail.com>
Sat, 22 Feb 2020 10:56:25 +0000 (11:56 +0100)
committerpa3gsb <pa3gsb@gmail.com>
Sat, 22 Feb 2020 10:56:25 +0000 (11:56 +0100)
main.c

diff --git a/main.c b/main.c
index 546a875d01896df478b497b84bfa065a505aa4b4..c2281a2b410e0425ccd2a4cbee3c73472dc18b47 100644 (file)
--- a/main.c
+++ b/main.c
@@ -109,20 +109,34 @@ static void* wisdom_thread(void *arg) {
 //
 gboolean keypress_cb(GtkWidget *widget, GdkEventKey *event, gpointer data) {
 
-  if (event->keyval == GDK_KEY_space && radio != NULL) {
-    if(getTune()==1) {
-      setTune(0);
-    }
-    if(getMox()==1) {
-      setMox(0);
-    } else if(canTransmit() || tx_out_of_band) {
-      setMox(1);
-    } else {
-      transmitter_set_out_of_band(transmitter);
-    }
-    g_idle_add(ext_vfo_update,NULL);
-    return TRUE;
+   if (radio != NULL) {
+         if (event->keyval == GDK_KEY_space) {
+                 
+                 fprintf(stderr, "space");
+                 
+               if(getTune()==1) {
+                 setTune(0);
+               }
+               if(getMox()==1) {
+                 setMox(0);
+               } else if(canTransmit() || tx_out_of_band) {
+                 setMox(1);
+               } else {
+                 transmitter_set_out_of_band(transmitter);
+               }
+               g_idle_add(ext_vfo_update,NULL);
+               return TRUE;
+         }
+         if (event->keyval == GDK_KEY_d ) {
+               vfo_move(step,TRUE);
+               return TRUE;
+         }
+         if (event->keyval == GDK_KEY_u ) {
+                vfo_move(-step,TRUE);
+                return TRUE;
+         }
   }
+  
   return FALSE;
 }