diff options
author | Jesse Vincent <jesse@keyboard.io> | 2017-10-02 18:46:46 -0700 |
---|---|---|
committer | Jesse Vincent <jesse@keyboard.io> | 2017-10-02 18:46:46 -0700 |
commit | 8bfd32d5b998413d5c6049be78d8426b3c13e18b (patch) | |
tree | 158571470262f65f01bd6578965b05b6613bdd8a | |
parent | 91ddf30b5535779f7180ddb1073e6b133c481cb2 (diff) | |
download | Model01-Firmware-8bfd32d5b998413d5c6049be78d8426b3c13e18b.tar.gz Model01-Firmware-8bfd32d5b998413d5c6049be78d8426b3c13e18b.zip |
decompose a conditional to make it easier to read and refactor
-rw-r--r-- | Model01-Firmware.ino | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Model01-Firmware.ino b/Model01-Firmware.ino index bc9f15f..1be0fcc 100644 --- a/Model01-Firmware.ino +++ b/Model01-Firmware.ino @@ -97,9 +97,11 @@ static kaleidoscope::LEDSolidColor solidIndigo(0, 0, 170); static kaleidoscope::LEDSolidColor solidViolet(130, 0, 120); const macro_t *macroAction(uint8_t macroIndex, uint8_t keyState) { - if (macroIndex == 1 && keyToggledOn(keyState)) { - Macros.type(PSTR("Keyboardio Model 01 - Kaleidoscope ")); - Macros.type(PSTR(BUILD_INFORMATION)); + if (macroIndex == 1) { + if (keyToggledOn(keyState)) { + Macros.type(PSTR("Keyboardio Model 01 - Kaleidoscope ")); + Macros.type(PSTR(BUILD_INFORMATION)); + } } else if (macroIndex == MACRO_ANY) { static Key lastKey; if (keyToggledOn(keyState)) |