]> git.rkrishnan.org Git - pihpsdr.git/commitdiff
Increased max. MIDI CW key-down to 20 sec, and let MIDI CW key-down
authorc vw <dl1ycf@darc.de>
Thu, 14 Jan 2021 15:17:56 +0000 (16:17 +0100)
committerc vw <dl1ycf@darc.de>
Thu, 14 Jan 2021 15:17:56 +0000 (16:17 +0100)
abort any pending CAT CW messages

midi3.c

diff --git a/midi3.c b/midi3.c
index 5ad079aa24e8c678ae1e48de04bbde54956170f9..0e53ed65acfb411da6b34e2e3e3c63dfcb21857e 100644 (file)
--- a/midi3.c
+++ b/midi3.c
@@ -229,8 +229,9 @@ void DoTheMidi(enum MIDIaction action, enum MIDItype type, int val) {
           //
            if (type == MIDI_TYPE_KEY) {
               if (val != 0) {
-               cw_key_down=480000;  // max. 10 sec
+               cw_key_down=960000;  // max. 20 sec to protect hardware
                cw_key_up=0;
+               cw_key_hit=1;        // abort any pending CAT CW messages
              } else {
                cw_key_down=0;
                cw_key_up=0;