diff options
author | Jesse Vincent <jesse@keyboard.io> | 2017-06-09 18:08:34 -0700 |
---|---|---|
committer | Jesse Vincent <jesse@keyboard.io> | 2017-06-09 18:08:34 -0700 |
commit | d04098d212be05c3070a492ea45295eb613d2d6b (patch) | |
tree | f955b735cd8168e68e31764d9a7659a5de9ea9fa | |
parent | 9f987624d57ea6ea8f0055e6d3869b986eeedc6c (diff) | |
download | model01-firmware-d04098d212be05c3070a492ea45295eb613d2d6b.tar.gz model01-firmware-d04098d212be05c3070a492ea45295eb613d2d6b.tar.bz2 model01-firmware-d04098d212be05c3070a492ea45295eb613d2d6b.zip |
Update the versioning macro to hopefully pull verison info in from the build system
-rw-r--r-- | Model01-Firmware.ino | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/Model01-Firmware.ino b/Model01-Firmware.ino index fc826d1..9ad1e91 100644 --- a/Model01-Firmware.ino +++ b/Model01-Firmware.ino @@ -4,6 +4,11 @@ #define DEBUG_SERIAL false +#ifndef BUILD_INFORMATION +#define BUILD_INFORMATION "locally built" +#endif + + #include "Kaleidoscope-MouseKeys.h" #include "Kaleidoscope-Macros.h" #include "Kaleidoscope-LEDControl.h" @@ -19,7 +24,8 @@ #include "Kaleidoscope-LED-AlphaSquare.h" #include "Kaleidoscope-Model01-TestMode.h" - +#define MACRO_VERSION_INFO 1 +#define Macro_VersionInfo M(MACRO_VERSION_INFO) #define MACRO_ANY 2 #define Macro_Any M(MACRO_ANY) #define NUMPAD_KEYMAP 2 @@ -43,7 +49,7 @@ ___ \ #define NUMPAD KEYMAP_STACKED (\ - ___, ___, ___, ___, ___, ___, ___, \ + ___, ___, ___, ___, ___, ___, Macro_VersionInfo, \ ___, ___, ___, ___, ___, ___, ___, \ ___, ___, ___, ___, ___, ___, \ ___, ___, ___, ___, ___, ___, ___, \ @@ -93,13 +99,9 @@ const macro_t *macroAction(uint8_t macroIndex, uint8_t keyState) { if (macroIndex == TOGGLENUMLOCK && key_toggled_on(keyState)) { return NumLock.toggle(Macros.row, Macros.col, NUMPAD_KEYMAP); } else if (macroIndex == 1 && key_toggled_on(keyState)) { - Serial.print("Keyboardio keyboard driver v0.00"); - return MACRO(I(25), - D(LeftShift), T(M), U(LeftShift), T(O), T(D), T(E), T(L), - T(Spacebar), - W(100), - T(0), T(1), - END); + Macros.type("Keyboardio Model 01 - Kaleidoscope "); + Macros.type(BUILD_INFORMATION); + Macros.type("\n"); } else if (macroIndex == MACRO_ANY && key_toggled_on(keyState)) { Keyboard.press(Key_A.keyCode + (uint8_t)(millis() % 36)); Keyboard.sendReport(); |