From 1de8811241bda64520bb0b2fbdb9cdf8276d1fe5 Mon Sep 17 00:00:00 2001 From: c vw Date: Fri, 21 May 2021 20:03:47 +0200 Subject: [PATCH] MIDI: suppress key-down if cw_keyer_internal, but let key-up pass. --- midi3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/midi3.c b/midi3.c index 48f881d..eedf934 100644 --- a/midi3.c +++ b/midi3.c @@ -61,7 +61,7 @@ typedef struct _MIDIcmd MIDIcmd; static int DoTheRestOfTheMIDI(void *data); void DoTheMidi(enum MIDIaction action, enum MIDItype type, int val) { - if (action == MIDI_ACTION_CWKEYER && cw_keyer_internal == 0) { + if (action == MIDI_ACTION_CWKEYER) { // // This is a CW key-up/down which uses functions from the keyer // that by-pass the interrupt-driven standard action. @@ -75,7 +75,7 @@ void DoTheMidi(enum MIDIaction action, enum MIDItype type, int val) { // // Since this if for immediate key-down, it does not rely on LOCALCW // - if (val != 0) { + if (val != 0 && cw_keyer_internal == 0) { cw_key_down=960000; // max. 20 sec to protect hardware cw_key_up=0; cw_key_hit=1; -- 2.45.2