From: c vw Date: Fri, 21 May 2021 18:03:47 +0000 (+0200) Subject: MIDI: suppress key-down if cw_keyer_internal, but let key-up pass. X-Git-Url: https://git.rkrishnan.org/listings/vdrive/index.php?a=commitdiff_plain;h=1de8811241bda64520bb0b2fbdb9cdf8276d1fe5;p=pihpsdr.git MIDI: suppress key-down if cw_keyer_internal, but let key-up pass. --- 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;