aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Vincent <jesse@keyboard.io>2017-10-02 18:46:46 -0700
committerJesse Vincent <jesse@keyboard.io>2017-10-02 18:46:46 -0700
commit8bfd32d5b998413d5c6049be78d8426b3c13e18b (patch)
tree158571470262f65f01bd6578965b05b6613bdd8a
parent91ddf30b5535779f7180ddb1073e6b133c481cb2 (diff)
downloadModel01-Firmware-8bfd32d5b998413d5c6049be78d8426b3c13e18b.tar.gz
Model01-Firmware-8bfd32d5b998413d5c6049be78d8426b3c13e18b.zip
decompose a conditional to make it easier to read and refactor
-rw-r--r--Model01-Firmware.ino8
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))