diff --git a/TestMode.cpp b/TestMode.cpp index dd281141..a06a6a9b 100644 --- a/TestMode.cpp +++ b/TestMode.cpp @@ -2,48 +2,48 @@ #include "TestMode.h" void TestMode_::TestLEDs(void) { - // make all LEDs dim red - LEDControl.set_all_leds_to(50,0,0); - led_sync(); - delay(1000); - // make all LEDs dim blue - LEDControl.set_all_leds_to(0,50,0); - led_sync(); - delay(1000); - // make all LEDs dim green - LEDControl.set_all_leds_to(0,0,50); - led_sync(); - delay(1000); - // make all LEDs dim white - LEDControl.set_all_leds_to(50,50,50); - led_sync(); - delay(1000); - // make all the LEDs bright red - LEDControl.set_all_leds_to(200,0,0); - led_sync(); - delay(1000); - // make all the LEDs bright green - LEDControl.set_all_leds_to(0,200,0); - led_sync(); - delay(1000); - // make all the LEDs bright blue - LEDControl.set_all_leds_to(0,0,200); - led_sync(); - delay(1000); - // make all the LEDs bright white (1.6A) - LEDControl.set_all_leds_to(160,160,160); - led_sync(); - delay(1000); - // rainbow for 10 seconds - for(auto i=0; i<10000;i++ ) { - LEDControl.effect_rainbow_update(); - led_sync(); - delay(1); - } - // set all the keys to red - LEDControl.set_all_leds_to(50,0,0); - // make all LEDs dim blue - // as you hit each key, set it to blue - // as you hit each key a second time, set it to green - // as you hit each key a third time, set it to off + // make all LEDs dim red + LEDControl.set_all_leds_to(50,0,0); + led_sync(); + delay(1000); + // make all LEDs dim blue + LEDControl.set_all_leds_to(0,50,0); + led_sync(); + delay(1000); + // make all LEDs dim green + LEDControl.set_all_leds_to(0,0,50); + led_sync(); + delay(1000); + // make all LEDs dim white + LEDControl.set_all_leds_to(50,50,50); + led_sync(); + delay(1000); + // make all the LEDs bright red + LEDControl.set_all_leds_to(200,0,0); + led_sync(); + delay(1000); + // make all the LEDs bright green + LEDControl.set_all_leds_to(0,200,0); + led_sync(); + delay(1000); + // make all the LEDs bright blue + LEDControl.set_all_leds_to(0,0,200); + led_sync(); + delay(1000); + // make all the LEDs bright white (1.6A) + LEDControl.set_all_leds_to(160,160,160); + led_sync(); + delay(1000); + // rainbow for 10 seconds + for(auto i=0; i<10000; i++ ) { + LEDControl.effect_rainbow_update(); + led_sync(); + delay(1); + } + // set all the keys to red + LEDControl.set_all_leds_to(50,0,0); + // make all LEDs dim blue + // as you hit each key, set it to blue + // as you hit each key a second time, set it to green + // as you hit each key a third time, set it to off } diff --git a/TestMode.h b/TestMode.h index 5333106c..0e97e833 100644 --- a/TestMode.h +++ b/TestMode.h @@ -1,11 +1,11 @@ class TestMode_ { - public: + public: - void start(); + void start(); - private: + private: - void TestLEDs(); - void TestKeys(); - void TestOneKey(); + void TestLEDs(); + void TestKeys(); + void TestOneKey(); }; diff --git a/key_defs.h b/key_defs.h index 2cb93045..493d8cc5 100644 --- a/key_defs.h +++ b/key_defs.h @@ -5,8 +5,8 @@ typedef union { struct { - uint8_t flags; - uint8_t rawKey; + uint8_t flags; + uint8_t rawKey; }; uint16_t raw; } Key; diff --git a/key_events.cpp b/key_events.cpp index 035d0ef2..b2cf9ca3 100644 --- a/key_events.cpp +++ b/key_events.cpp @@ -43,8 +43,8 @@ void handle_synthetic_key_event(Key mappedKey, uint8_t currentState, uint8_t pre __attribute__((weak)) custom_handler_t eventHandlers[] = { - handle_key_event_default, - (custom_handler_t) NULL + handle_key_event_default, + (custom_handler_t) NULL }; Key lookup_key(byte keymap, byte row, byte col) { @@ -57,9 +57,9 @@ Key lookup_key(byte keymap, byte row, byte col) { void handle_key_event(byte row, byte col, uint8_t currentState, uint8_t previousState) { for (byte i = 0; eventHandlers[i] != NULL; i++) { - custom_handler_t handler = eventHandlers[i]; - if ((*handler)(row, col, currentState, previousState)) - return; + custom_handler_t handler = eventHandlers[i]; + if ((*handler)(row, col, currentState, previousState)) + return; } }