From ecef342f1f0c1e7da62dacaf62da314652a14e60 Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Sat, 3 Jun 2017 22:52:50 -0700 Subject: [PATCH] astyle with current project style guidelines --- examples/LED-AlphaSquare/LED-AlphaSquare.ino | 124 +++---- src/Kaleidoscope/AlphaSquare-Effect.cpp | 76 ++--- src/Kaleidoscope/AlphaSquare-Effect.h | 20 +- src/Kaleidoscope/LED-AlphaSquare.cpp | 332 +++++++++---------- src/Kaleidoscope/LED-AlphaSquare.h | 76 ++--- 5 files changed, 314 insertions(+), 314 deletions(-) diff --git a/examples/LED-AlphaSquare/LED-AlphaSquare.ino b/examples/LED-AlphaSquare/LED-AlphaSquare.ino index 963ebabd..9324d4d4 100644 --- a/examples/LED-AlphaSquare/LED-AlphaSquare.ino +++ b/examples/LED-AlphaSquare/LED-AlphaSquare.ino @@ -22,83 +22,83 @@ #include const Key keymaps[][ROWS][COLS] PROGMEM = { - [0] = KEYMAP_STACKED - ( - Key_LEDEffectNext, Key_1, Key_2, Key_3, Key_4, Key_5, M(0), - Key_Backtick, Key_Q, Key_W, Key_E, Key_R, Key_T, Key_Tab, - Key_PageUp, Key_A, Key_S, Key_D, Key_F, Key_G, - Key_PageDown, Key_Z, Key_X, Key_C, Key_V, Key_B, Key_Escape, + [0] = KEYMAP_STACKED + ( + Key_LEDEffectNext, Key_1, Key_2, Key_3, Key_4, Key_5, M(0), + Key_Backtick, Key_Q, Key_W, Key_E, Key_R, Key_T, Key_Tab, + Key_PageUp, Key_A, Key_S, Key_D, Key_F, Key_G, + Key_PageDown, Key_Z, Key_X, Key_C, Key_V, Key_B, Key_Escape, - Key_LeftControl, Key_Backspace, Key_LeftGui, Key_LeftShift, - Key_skip, + Key_LeftControl, Key_Backspace, Key_LeftGui, Key_LeftShift, + Key_skip, - Key_skip, Key_6, Key_7, Key_8, Key_9, Key_0, Key_skip, - Key_Enter, Key_Y, Key_U, Key_I, Key_O, Key_P, Key_Equals, - Key_H, Key_J, Key_K, Key_L, Key_Semicolon, Key_Quote, - Key_skip, Key_N, Key_M, Key_Comma, Key_Period, Key_Slash, Key_Minus, + Key_skip, Key_6, Key_7, Key_8, Key_9, Key_0, Key_skip, + Key_Enter, Key_Y, Key_U, Key_I, Key_O, Key_P, Key_Equals, + Key_H, Key_J, Key_K, Key_L, Key_Semicolon, Key_Quote, + Key_skip, Key_N, Key_M, Key_Comma, Key_Period, Key_Slash, Key_Minus, - Key_RightShift, Key_RightAlt, Key_Spacebar, Key_RightControl, - Key_skip - ), + Key_RightShift, Key_RightAlt, Key_Spacebar, Key_RightControl, + Key_skip + ), }; const macro_t *macroAction(uint8_t macroIndex, uint8_t keyState) { - if (!key_toggled_on (keyState)) - return MACRO_NONE; - - if (macroIndex == 0) { - for (uint8_t i = Key_A.keyCode; i <= Key_0.keyCode; i++) { - LEDControl.set_all_leds_to (0, 0, 0); - LEDControl.led_sync (); - delay (100); + if (!key_toggled_on(keyState)) + return MACRO_NONE; - uint8_t col = 2; - if (i % 2) - col = 10; + if (macroIndex == 0) { + for (uint8_t i = Key_A.keyCode; i <= Key_0.keyCode; i++) { + LEDControl.set_all_leds_to(0, 0, 0); + LEDControl.led_sync(); + delay(100); - for (uint8_t step = 0; step <= 0xf0; step += 8) { - AlphaSquare.color = { step, step, step }; - AlphaSquare.display ({i, 0}, col); - delay (10); - } - for (uint8_t step = 0xff; step >= 8; step -= 8) { - AlphaSquare.color = { step, step, step }; - AlphaSquare.display ({i, 0}, col); - delay (10); - } - delay (100); - } + uint8_t col = 2; + if (i % 2) + col = 10; - LEDControl.set_all_leds_to (0, 0, 0); - LEDControl.led_sync (); - delay (100); - for (uint8_t step = 0; step <= 0xf0; step += 8) { - AlphaSquare.color = { step, step, step }; - AlphaSquare.display (KaleidoscopePlugins::AlphaSquareSymbols::Lambda, 2); - AlphaSquare.display (KaleidoscopePlugins::AlphaSquareSymbols::Lambda, 10); - delay (10); - } - for (uint8_t step = 0xff; step >= 8; step -= 8) { - AlphaSquare.color = { step, step, step }; - AlphaSquare.display (KaleidoscopePlugins::AlphaSquareSymbols::Lambda, 2); - AlphaSquare.display (KaleidoscopePlugins::AlphaSquareSymbols::Lambda, 10); - delay (10); - } - delay (100); + for (uint8_t step = 0; step <= 0xf0; step += 8) { + AlphaSquare.color = { step, step, step }; + AlphaSquare.display({i, 0}, col); + delay(10); + } + for (uint8_t step = 0xff; step >= 8; step -= 8) { + AlphaSquare.color = { step, step, step }; + AlphaSquare.display({i, 0}, col); + delay(10); + } + delay(100); + } + LEDControl.set_all_leds_to(0, 0, 0); + LEDControl.led_sync(); + delay(100); + for (uint8_t step = 0; step <= 0xf0; step += 8) { + AlphaSquare.color = { step, step, step }; + AlphaSquare.display(KaleidoscopePlugins::AlphaSquareSymbols::Lambda, 2); + AlphaSquare.display(KaleidoscopePlugins::AlphaSquareSymbols::Lambda, 10); + delay(10); } - LEDControl.set_all_leds_to (0, 0, 0); + for (uint8_t step = 0xff; step >= 8; step -= 8) { + AlphaSquare.color = { step, step, step }; + AlphaSquare.display(KaleidoscopePlugins::AlphaSquareSymbols::Lambda, 2); + AlphaSquare.display(KaleidoscopePlugins::AlphaSquareSymbols::Lambda, 10); + delay(10); + } + delay(100); - return MACRO_NONE; + } + LEDControl.set_all_leds_to(0, 0, 0); + + return MACRO_NONE; } -void setup () { - Kaleidoscope.setup (); +void setup() { + Kaleidoscope.setup(); - USE_PLUGINS (&AlphaSquare, &AlphaSquareEffect, &Macros); - AlphaSquare.color = { 0xcb, 0xc0, 0xff }; + USE_PLUGINS(&AlphaSquare, &AlphaSquareEffect, &Macros); + AlphaSquare.color = { 0xcb, 0xc0, 0xff }; } -void loop () { - Kaleidoscope.loop (); +void loop() { + Kaleidoscope.loop(); } diff --git a/src/Kaleidoscope/AlphaSquare-Effect.cpp b/src/Kaleidoscope/AlphaSquare-Effect.cpp index 2e5ff942..4cbffa0a 100644 --- a/src/Kaleidoscope/AlphaSquare-Effect.cpp +++ b/src/Kaleidoscope/AlphaSquare-Effect.cpp @@ -25,59 +25,59 @@ uint32_t AlphaSquareEffect::endTimeLeft, AlphaSquareEffect::endTimeRight; Key AlphaSquareEffect::lastKeyLeft, AlphaSquareEffect::lastKeyRight; uint8_t AlphaSquareEffect::us; -AlphaSquareEffect::AlphaSquareEffect (void) { +AlphaSquareEffect::AlphaSquareEffect(void) { } void -AlphaSquareEffect::begin (void) { - Kaleidoscope.useEventHandlerHook (eventHandlerHook); - Kaleidoscope.use (&LEDControl, NULL); - us = LEDControl.mode_add (this); +AlphaSquareEffect::begin(void) { + Kaleidoscope.useEventHandlerHook(eventHandlerHook); + Kaleidoscope.use(&LEDControl, NULL); + us = LEDControl.mode_add(this); } void -AlphaSquareEffect::update (void) { - if (endTimeLeft && millis () > endTimeLeft) { - ::AlphaSquare.clear (lastKeyLeft); - endTimeLeft = 0; - } - if (endTimeRight && millis () > endTimeRight) { - ::AlphaSquare.clear (lastKeyRight, 10); - endTimeRight = 0; - } +AlphaSquareEffect::update(void) { + if (endTimeLeft && millis() > endTimeLeft) { + ::AlphaSquare.clear(lastKeyLeft); + endTimeLeft = 0; + } + if (endTimeRight && millis() > endTimeRight) { + ::AlphaSquare.clear(lastKeyRight, 10); + endTimeRight = 0; + } } Key -AlphaSquareEffect::eventHandlerHook (Key key, byte row, byte col, uint8_t keyState) { - if (LEDControl.get_mode () != us) - return key; +AlphaSquareEffect::eventHandlerHook(Key key, byte row, byte col, uint8_t keyState) { + if (LEDControl.get_mode() != us) + return key; - if (keyState & INJECTED) - return key; + if (keyState & INJECTED) + return key; - if (key < Key_A || key > Key_0) - return key; + if (key < Key_A || key > Key_0) + return key; - if (!key_is_pressed (keyState)) - return key; + if (!key_is_pressed(keyState)) + return key; - uint8_t displayCol = 2; - Key prevKey = lastKeyLeft; + uint8_t displayCol = 2; + Key prevKey = lastKeyLeft; - if (col < COLS / 2) { - lastKeyLeft = key; - endTimeLeft = millis () + length; - } else { - prevKey = lastKeyRight; - lastKeyRight = key; - endTimeRight = millis () + length; - displayCol = 10; - } + if (col < COLS / 2) { + lastKeyLeft = key; + endTimeLeft = millis() + length; + } else { + prevKey = lastKeyRight; + lastKeyRight = key; + endTimeRight = millis() + length; + displayCol = 10; + } - if (prevKey != key) - ::AlphaSquare.clear (prevKey, displayCol); - ::AlphaSquare.display (key, displayCol); - return key; + if (prevKey != key) + ::AlphaSquare.clear(prevKey, displayCol); + ::AlphaSquare.display(key, displayCol); + return key; } }; }; diff --git a/src/Kaleidoscope/AlphaSquare-Effect.h b/src/Kaleidoscope/AlphaSquare-Effect.h index 7ffbec73..66179084 100644 --- a/src/Kaleidoscope/AlphaSquare-Effect.h +++ b/src/Kaleidoscope/AlphaSquare-Effect.h @@ -24,19 +24,19 @@ namespace KaleidoscopePlugins { namespace LEDEffects { class AlphaSquareEffect : public LEDMode { - public: - AlphaSquareEffect (void); + public: + AlphaSquareEffect(void); - virtual void begin (void) final; - virtual void update (void) final; + virtual void begin(void) final; + virtual void update(void) final; - static uint16_t length; - private: - static uint32_t endTimeLeft, endTimeRight; - static Key lastKeyLeft, lastKeyRight; - static uint8_t us; + static uint16_t length; + private: + static uint32_t endTimeLeft, endTimeRight; + static Key lastKeyLeft, lastKeyRight; + static uint8_t us; - static Key eventHandlerHook (Key key, uint8_t row, uint8_t col, uint8_t keyState); + static Key eventHandlerHook(Key key, uint8_t row, uint8_t col, uint8_t keyState); }; }; }; diff --git a/src/Kaleidoscope/LED-AlphaSquare.cpp b/src/Kaleidoscope/LED-AlphaSquare.cpp index 6b64d10b..903a2eb2 100644 --- a/src/Kaleidoscope/LED-AlphaSquare.cpp +++ b/src/Kaleidoscope/LED-AlphaSquare.cpp @@ -21,196 +21,196 @@ namespace KaleidoscopePlugins { static const uint16_t alphabet[] PROGMEM = { - SYM4x4(1, 1, 1, 1, - 1, 0, 0, 1, - 1, 1, 1, 1, - 1, 0, 0, 1), // A - SYM4x4(1, 1, 1, 1, - 1, 0, 1, 1, - 1, 1, 0, 1, - 1, 1, 1, 1), // B - SYM4x4(1, 1, 1, 1, - 1, 0, 0, 0, - 1, 0, 0, 0, - 1, 1, 1, 1), // C - SYM4x4(1, 1, 1, 0, - 1, 0, 0, 1, - 1, 0, 0, 1, - 1, 1, 1, 0), // D - SYM4x4(1, 1, 1, 1, - 1, 1, 0, 0, - 1, 0, 0, 0, - 1, 1, 1, 1), // E - SYM4x4(1, 1, 1, 1, - 1, 0, 0, 0, - 1, 1, 1, 0, - 1, 0, 0, 0), // F - SYM4x4(1, 1, 1, 0, - 1, 0, 0, 0, - 1, 0, 0, 1, - 1, 1, 1, 1), // G - SYM4x4(1, 0, 0, 1, - 1, 1, 1, 1, - 1, 0, 0, 1, - 1, 0, 0, 1), // H - SYM4x4(1, 1, 1, 1, - 0, 1, 1, 0, - 0, 1, 1, 0, - 1, 1, 1, 1), // I - SYM4x4(1, 1, 1, 1, - 0, 0, 0, 1, - 1, 0, 0, 1, - 0, 1, 1, 0), // J - SYM4x4(1, 0, 0, 1, - 1, 1, 0, 0, - 1, 1, 0, 0, - 1, 0, 1, 1), // K - SYM4x4(1, 0, 0, 0, - 1, 0, 0, 0, - 1, 0, 0, 0, - 1, 1, 1, 1), // L - SYM4x4(1, 0, 1, 1, - 1, 1, 1, 1, - 1, 1, 0, 1, - 1, 0, 0, 1), // M - SYM4x4(1, 0, 0, 1, - 1, 1, 0, 1, - 1, 0, 1, 1, - 1, 0, 0, 1), // N - SYM4x4(1, 1, 1, 1, - 1, 0, 0, 1, - 1, 0, 0, 1, - 1, 1, 1, 1), // O - SYM4x4(1, 1, 1, 1, - 1, 0, 0, 1, - 1, 1, 1, 1, - 1, 0, 0, 0), // P - SYM4x4(1, 1, 1, 1, - 1, 0, 0, 1, - 1, 0, 1, 1, - 1, 1, 1, 1), // Q - SYM4x4(1, 1, 1, 1, - 1, 0, 0, 1, - 1, 1, 1, 0, - 1, 0, 1, 1), // R - SYM4x4(1, 1, 1, 1, - 1, 1, 0, 0, - 0, 0, 1, 1, - 1, 1, 1, 1), // S - SYM4x4(1, 1, 1, 1, - 0, 1, 1, 0, - 0, 1, 1, 0, - 0, 1, 1, 0), // T - SYM4x4(1, 0, 0, 1, - 1, 0, 0, 1, - 1, 0, 0, 1, - 1, 1, 1, 1), // U - SYM4x4(1, 0, 0, 1, - 1, 0, 0, 1, - 1, 0, 0, 1, - 0, 1, 1, 0), // V - SYM4x4(1, 0, 0, 1, - 1, 0, 1, 1, - 1, 1, 1, 1, - 1, 0, 1, 1), // W - SYM4x4(1, 0, 0, 1, - 0, 1, 1, 0, - 0, 1, 1, 0, - 1, 0, 0, 1), // X - SYM4x4(1, 0, 0, 1, - 1, 1, 1, 1, - 0, 1, 1, 0, - 0, 1, 1, 0), // Y - SYM4x4(1, 1, 1, 1, - 0, 0, 1, 1, - 1, 1, 0, 0, - 1, 1, 1, 1), // Z - // --------------------- - SYM4x4(0, 1, 1, 0, - 1, 0, 1, 0, - 0, 0, 1, 0, - 1, 1, 1, 1), // 1 - SYM4x4(0, 1, 1, 0, - 1, 0, 0, 1, - 0, 0, 1, 0, - 1, 1, 0, 1), // 2 - SYM4x4(1, 1, 1, 1, - 0, 0, 1, 1, - 0, 0, 0, 1, - 1, 1, 1, 1), // 3 - SYM4x4(1, 0, 0, 1, - 1, 1, 1, 1, - 0, 0, 0, 1, - 0, 0, 0, 1), // 4 - SYM4x4(1, 1, 1, 1, - 1, 0, 0, 0, - 0, 1, 1, 1, - 1, 1, 1, 1), // 5 - SYM4x4(0, 1, 1, 0, - 1, 0, 0, 0, - 1, 1, 1, 1, - 1, 1, 1, 1), // 6 - SYM4x4(1, 1, 1, 1, - 0, 0, 0, 1, - 0, 0, 1, 0, - 0, 1, 0, 0), // 7 - SYM4x4(1, 1, 1, 0, - 1, 0, 1, 1, - 1, 1, 0, 1, - 0, 1, 1, 1), // 8 - SYM4x4(1, 1, 1, 1, - 1, 0, 0, 1, - 1, 1, 1, 1, - 0, 0, 0, 1), // 9 - SYM4x4(0, 1, 1, 0, - 1, 0, 0, 1, - 1, 0, 0, 1, - 0, 1, 1, 0), // 0 + SYM4x4(1, 1, 1, 1, + 1, 0, 0, 1, + 1, 1, 1, 1, + 1, 0, 0, 1), // A + SYM4x4(1, 1, 1, 1, + 1, 0, 1, 1, + 1, 1, 0, 1, + 1, 1, 1, 1), // B + SYM4x4(1, 1, 1, 1, + 1, 0, 0, 0, + 1, 0, 0, 0, + 1, 1, 1, 1), // C + SYM4x4(1, 1, 1, 0, + 1, 0, 0, 1, + 1, 0, 0, 1, + 1, 1, 1, 0), // D + SYM4x4(1, 1, 1, 1, + 1, 1, 0, 0, + 1, 0, 0, 0, + 1, 1, 1, 1), // E + SYM4x4(1, 1, 1, 1, + 1, 0, 0, 0, + 1, 1, 1, 0, + 1, 0, 0, 0), // F + SYM4x4(1, 1, 1, 0, + 1, 0, 0, 0, + 1, 0, 0, 1, + 1, 1, 1, 1), // G + SYM4x4(1, 0, 0, 1, + 1, 1, 1, 1, + 1, 0, 0, 1, + 1, 0, 0, 1), // H + SYM4x4(1, 1, 1, 1, + 0, 1, 1, 0, + 0, 1, 1, 0, + 1, 1, 1, 1), // I + SYM4x4(1, 1, 1, 1, + 0, 0, 0, 1, + 1, 0, 0, 1, + 0, 1, 1, 0), // J + SYM4x4(1, 0, 0, 1, + 1, 1, 0, 0, + 1, 1, 0, 0, + 1, 0, 1, 1), // K + SYM4x4(1, 0, 0, 0, + 1, 0, 0, 0, + 1, 0, 0, 0, + 1, 1, 1, 1), // L + SYM4x4(1, 0, 1, 1, + 1, 1, 1, 1, + 1, 1, 0, 1, + 1, 0, 0, 1), // M + SYM4x4(1, 0, 0, 1, + 1, 1, 0, 1, + 1, 0, 1, 1, + 1, 0, 0, 1), // N + SYM4x4(1, 1, 1, 1, + 1, 0, 0, 1, + 1, 0, 0, 1, + 1, 1, 1, 1), // O + SYM4x4(1, 1, 1, 1, + 1, 0, 0, 1, + 1, 1, 1, 1, + 1, 0, 0, 0), // P + SYM4x4(1, 1, 1, 1, + 1, 0, 0, 1, + 1, 0, 1, 1, + 1, 1, 1, 1), // Q + SYM4x4(1, 1, 1, 1, + 1, 0, 0, 1, + 1, 1, 1, 0, + 1, 0, 1, 1), // R + SYM4x4(1, 1, 1, 1, + 1, 1, 0, 0, + 0, 0, 1, 1, + 1, 1, 1, 1), // S + SYM4x4(1, 1, 1, 1, + 0, 1, 1, 0, + 0, 1, 1, 0, + 0, 1, 1, 0), // T + SYM4x4(1, 0, 0, 1, + 1, 0, 0, 1, + 1, 0, 0, 1, + 1, 1, 1, 1), // U + SYM4x4(1, 0, 0, 1, + 1, 0, 0, 1, + 1, 0, 0, 1, + 0, 1, 1, 0), // V + SYM4x4(1, 0, 0, 1, + 1, 0, 1, 1, + 1, 1, 1, 1, + 1, 0, 1, 1), // W + SYM4x4(1, 0, 0, 1, + 0, 1, 1, 0, + 0, 1, 1, 0, + 1, 0, 0, 1), // X + SYM4x4(1, 0, 0, 1, + 1, 1, 1, 1, + 0, 1, 1, 0, + 0, 1, 1, 0), // Y + SYM4x4(1, 1, 1, 1, + 0, 0, 1, 1, + 1, 1, 0, 0, + 1, 1, 1, 1), // Z + // --------------------- + SYM4x4(0, 1, 1, 0, + 1, 0, 1, 0, + 0, 0, 1, 0, + 1, 1, 1, 1), // 1 + SYM4x4(0, 1, 1, 0, + 1, 0, 0, 1, + 0, 0, 1, 0, + 1, 1, 0, 1), // 2 + SYM4x4(1, 1, 1, 1, + 0, 0, 1, 1, + 0, 0, 0, 1, + 1, 1, 1, 1), // 3 + SYM4x4(1, 0, 0, 1, + 1, 1, 1, 1, + 0, 0, 0, 1, + 0, 0, 0, 1), // 4 + SYM4x4(1, 1, 1, 1, + 1, 0, 0, 0, + 0, 1, 1, 1, + 1, 1, 1, 1), // 5 + SYM4x4(0, 1, 1, 0, + 1, 0, 0, 0, + 1, 1, 1, 1, + 1, 1, 1, 1), // 6 + SYM4x4(1, 1, 1, 1, + 0, 0, 0, 1, + 0, 0, 1, 0, + 0, 1, 0, 0), // 7 + SYM4x4(1, 1, 1, 0, + 1, 0, 1, 1, + 1, 1, 0, 1, + 0, 1, 1, 1), // 8 + SYM4x4(1, 1, 1, 1, + 1, 0, 0, 1, + 1, 1, 1, 1, + 0, 0, 0, 1), // 9 + SYM4x4(0, 1, 1, 0, + 1, 0, 0, 1, + 1, 0, 0, 1, + 0, 1, 1, 0), // 0 }; cRGB AlphaSquare::color = {0x80, 0x80, 0x80}; -AlphaSquare::AlphaSquare (void) { +AlphaSquare::AlphaSquare(void) { } void -AlphaSquare::begin (void) { +AlphaSquare::begin(void) { } void -AlphaSquare::display (Key key, uint8_t row, uint8_t col, cRGB keyColor) { - if (key < Key_A || key > Key_0) - return; +AlphaSquare::display(Key key, uint8_t row, uint8_t col, cRGB keyColor) { + if (key < Key_A || key > Key_0) + return; - uint8_t index = key.keyCode - Key_A.keyCode; - uint16_t symbol = pgm_read_word (&alphabet[index]); + uint8_t index = key.keyCode - Key_A.keyCode; + uint16_t symbol = pgm_read_word(&alphabet[index]); - display (symbol, row, col, keyColor); + display(symbol, row, col, keyColor); } void -AlphaSquare::display (Key key, uint8_t row, uint8_t col) { - display (key, row, col, color); +AlphaSquare::display(Key key, uint8_t row, uint8_t col) { + display(key, row, col, color); } void -AlphaSquare::display (uint16_t symbol, uint8_t row, uint8_t col, cRGB keyColor) { - for (uint8_t r = 0; r < 4; r++) { - for (uint8_t c = 0; c < 4; c++) { - uint8_t pixel = bitRead (symbol, r * 4 + c); - if (!pixel) - continue; +AlphaSquare::display(uint16_t symbol, uint8_t row, uint8_t col, cRGB keyColor) { + for (uint8_t r = 0; r < 4; r++) { + for (uint8_t c = 0; c < 4; c++) { + uint8_t pixel = bitRead(symbol, r * 4 + c); + if (!pixel) + continue; - LEDControl.led_set_crgb_at (row + r, col + c, keyColor); - } + LEDControl.led_set_crgb_at(row + r, col + c, keyColor); } + } - LEDControl.led_sync (); + LEDControl.led_sync(); } void -AlphaSquare::display (uint16_t symbol, uint8_t row, uint8_t col) { - display (symbol, row, col, color); +AlphaSquare::display(uint16_t symbol, uint8_t row, uint8_t col) { + display(symbol, row, col, color); } }; diff --git a/src/Kaleidoscope/LED-AlphaSquare.h b/src/Kaleidoscope/LED-AlphaSquare.h index 71588c78..f63ea287 100644 --- a/src/Kaleidoscope/LED-AlphaSquare.h +++ b/src/Kaleidoscope/LED-AlphaSquare.h @@ -36,50 +36,50 @@ namespace KaleidoscopePlugins { class AlphaSquare : public KaleidoscopePlugin { - public: - AlphaSquare (void); + public: + AlphaSquare(void); - virtual void begin (void) final; + virtual void begin(void) final; - static void display (Key key, uint8_t row, uint8_t col, cRGB keyColor); - static void display (Key key, uint8_t row, uint8_t col); - static void display (Key key) { - display (key, 0, 2); - }; - static void display (Key key, uint8_t col) { - display (key, 0, col); - }; + static void display(Key key, uint8_t row, uint8_t col, cRGB keyColor); + static void display(Key key, uint8_t row, uint8_t col); + static void display(Key key) { + display(key, 0, 2); + }; + static void display(Key key, uint8_t col) { + display(key, 0, col); + }; - static void display (uint16_t symbol, uint8_t row, uint8_t col, cRGB keyColor); - static void display (uint16_t symbol, uint8_t row, uint8_t col); - static void display (uint16_t symbol) { - display (symbol, 0, 2); - }; - static void display (uint16_t symbol, uint8_t col) { - display (symbol, 0, col); - }; + static void display(uint16_t symbol, uint8_t row, uint8_t col, cRGB keyColor); + static void display(uint16_t symbol, uint8_t row, uint8_t col); + static void display(uint16_t symbol) { + display(symbol, 0, 2); + }; + static void display(uint16_t symbol, uint8_t col) { + display(symbol, 0, col); + }; - static void clear (Key key, uint8_t row, uint8_t col) { - display (key, row, col, {0, 0, 0}); - }; - static void clear (Key key, uint8_t col) { - clear (key, 0, col); - }; - static void clear (Key key) { - clear (key, 0, 2); - }; + static void clear(Key key, uint8_t row, uint8_t col) { + display(key, row, col, {0, 0, 0}); + }; + static void clear(Key key, uint8_t col) { + clear(key, 0, col); + }; + static void clear(Key key) { + clear(key, 0, 2); + }; - static void clear (uint16_t symbol, uint8_t row, uint8_t col) { - display (symbol, row, col, {0, 0, 0}); - }; - static void clear (uint16_t symbol, uint8_t col) { - clear (symbol, 0, col); - }; - static void clear (uint16_t symbol) { - clear (symbol, 0, 2); - }; + static void clear(uint16_t symbol, uint8_t row, uint8_t col) { + display(symbol, row, col, {0, 0, 0}); + }; + static void clear(uint16_t symbol, uint8_t col) { + clear(symbol, 0, col); + }; + static void clear(uint16_t symbol) { + clear(symbol, 0, 2); + }; - static cRGB color; + static cRGB color; }; };