From 8bfd32d5b998413d5c6049be78d8426b3c13e18b Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Mon, 2 Oct 2017 18:46:46 -0700 Subject: decompose a conditional to make it easier to read and refactor --- Model01-Firmware.ino | 8 +++++--- 1 file 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)) -- cgit v1.2.3