]> git.rkrishnan.org Git - pihpsdr.git/commitdiff
MIDI turned off and all related code guarded under a macro
authorRamakrishnan Muthukrishnan <ram@rkrishnan.org>
Tue, 17 Jan 2023 17:30:16 +0000 (23:00 +0530)
committerRamakrishnan Muthukrishnan <ram@rkrishnan.org>
Tue, 17 Jan 2023 17:30:16 +0000 (23:00 +0530)
Makefile
cw_menu.c
radio.c
rigctl.c

index c0d26a9c36976eeab5a53e8f80f232b95454b94c..aeabce17ddcdca538b86d08b07e8de1eef2041a6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -17,13 +17,13 @@ GIT_VERSION := $(shell git describe --abbrev=0 --tags --always)
 GPIO_INCLUDE=GPIO
 
 # uncomment if level control (power output) is software based
-LEVEL_CTRL=SW_LEVEL_CTRL
+LEVEL_CTRL=SW_LEVEL_CTRL
 
 # uncomment the line below to include Pure Signal support
 #PURESIGNAL_INCLUDE=PURESIGNAL
 
 # uncomment the line below to include MIDI support
-MIDI_INCLUDE=MIDI
+MIDI_INCLUDE=MIDI
 
 # uncomment the line below to include USB Ozy support
 # USBOZY_INCLUDE=USBOZY
index 3cd51636247da9210b5267605f138b8355a1c8a1..94effe72c629eee4e494099dd6ad16f18bbecfa9 100644 (file)
--- a/cw_menu.c
+++ b/cw_menu.c
@@ -48,8 +48,10 @@ void cw_changed() {
 // NewProtocol: rely on periodically sent HighPrio packets
 #ifdef LOCALCW
   keyer_update();
+#ifdef MIDI
   midi_keyer_update();
 #endif
+#endif
 //
 // speed and side tone frequency are displayed in the VFO bar
 //
diff --git a/radio.c b/radio.c
index 0287e98822fe8600649043c01aa467d212edbc27..26c99327a077170382e4fb53b19fc46c9780c292 100644 (file)
--- a/radio.c
+++ b/radio.c
@@ -678,10 +678,12 @@ static void create_visual() {
     keyer_update();
   }
 
+#ifdef MIDI
   if (cw_keyer_midi == 1) {
       midi_keyer_update();
   }
 #endif
+#endif
 
 #ifdef CLIENT_SERVER
   if (!radio_is_remote) {
@@ -1880,8 +1882,10 @@ void radioRestoreState() {
     value = getProperty("cw_keyer_speed");
     if (value) {
       cw_keyer_speed = atoi(value);
+#ifdef MIDI
       // if we have the midikeyer, set the speed to this value
       midi_keyer_update();
+#endif
     }
     value = getProperty("cw_keyer_mode");
     if (value)
index 6cef7d99c8162679cd1acac925ff697135247ecc..df87081068e1551e9043c99de783ffbecdb72be9 100644 (file)
--- a/rigctl.c
+++ b/rigctl.c
@@ -3154,7 +3154,9 @@ int parse_cmd(void *data) {
           cw_keyer_speed = speed;
 #ifdef LOCALCW
           keyer_update();
+#ifdef MIDI
          midi_keyer_update();
+#endif
 #endif
           vfo_update();
         }