]> git.donarmstrong.com Git - qmk_firmware.git/blobdiff - quantum/process_keycode/process_leader.c
Add default to LEADER_TIMEOUT in case it's not defined (#2818)
[qmk_firmware.git] / quantum / process_keycode / process_leader.c
index e53d221e75ad6f49ee287c509e3dde3ba526597b..c87ef115af3f5ec56620e8c352e494e016c7dd79 100644 (file)
@@ -1,5 +1,27 @@
+/* Copyright 2016 Jack Humbert
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef DISABLE_LEADER
+
 #include "process_leader.h"
 
+#ifndef LEADER_TIMEOUT
+  #define LEADER_TIMEOUT 300
+#endif
+
 __attribute__ ((weak))
 void leader_start(void) {}
 
@@ -35,4 +57,6 @@ bool process_leader(uint16_t keycode, keyrecord_t *record) {
     }
   }
   return true;
-}
\ No newline at end of file
+}
+
+#endif