summaryrefslogtreecommitdiffstats
path: root/quantum
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2018-05-16 04:33:53 +0200
committerJack Humbert <jack.humb@gmail.com>2018-05-16 04:33:53 +0200
commita572323f94b533582edab4402867dc994cc8c75f (patch)
tree9d2f9e497f6edc149add5c1a0e9525aaf128e54f /quantum
parent323cd357674ebd9ab6ac025ec8e015faeaa751e4 (diff)
downloadqmk_firmware-a572323f94b533582edab4402867dc994cc8c75f.tar.gz
qmk_firmware-a572323f94b533582edab4402867dc994cc8c75f.tar.xz
Add default to LEADER_TIMEOUT in case it's not defined (#2818)
* Add default to LEADER_TIMEOUT in case it's not defined * Update Leader Timeout default
Diffstat (limited to 'quantum')
-rw-r--r--quantum/process_keycode/process_leader.c4
-rw-r--r--quantum/process_keycode/process_leader.h5
2 files changed, 6 insertions, 3 deletions
diff --git a/quantum/process_keycode/process_leader.c b/quantum/process_keycode/process_leader.c
index e0fe47654..c87ef115a 100644
--- a/quantum/process_keycode/process_leader.c
+++ b/quantum/process_keycode/process_leader.c
@@ -18,6 +18,10 @@
#include "process_leader.h"
+#ifndef LEADER_TIMEOUT
+ #define LEADER_TIMEOUT 300
+#endif
+
__attribute__ ((weak))
void leader_start(void) {}
diff --git a/quantum/process_keycode/process_leader.h b/quantum/process_keycode/process_leader.h
index da7a3d2ef..59c3eed1b 100644
--- a/quantum/process_keycode/process_leader.h
+++ b/quantum/process_keycode/process_leader.h
@@ -19,14 +19,13 @@
#include "quantum.h"
+
bool process_leader(uint16_t keycode, keyrecord_t *record);
void leader_start(void);
void leader_end(void);
-#ifndef LEADER_TIMEOUT
- #define LEADER_TIMEOUT 200
-#endif
+
#define SEQ_ONE_KEY(key) if (leader_sequence[0] == (key) && leader_sequence[1] == 0 && leader_sequence[2] == 0 && leader_sequence[3] == 0 && leader_sequence[4] == 0)
#define SEQ_TWO_KEYS(key1, key2) if (leader_sequence[0] == (key1) && leader_sequence[1] == (key2) && leader_sequence[2] == 0 && leader_sequence[3] == 0 && leader_sequence[4] == 0)
#define SEQ_THREE_KEYS(key1, key2, key3) if (leader_sequence[0] == (key1) && leader_sequence[1] == (key2) && leader_sequence[2] == (key3) && leader_sequence[3] == 0 && leader_sequence[4] == 0)