Make the linter happy

pull/365/head
Jesse Vincent 7 years ago
parent ecef342f1f
commit d515f0088b
No known key found for this signature in database
GPG Key ID: 122F5DF7108E4046

@ -38,8 +38,7 @@ const Key keymaps[][ROWS][COLS] PROGMEM = {
Key_skip, Key_N, Key_M, Key_Comma, Key_Period, Key_Slash, Key_Minus, Key_skip, Key_N, Key_M, Key_Comma, Key_Period, Key_Slash, Key_Minus,
Key_RightShift, Key_RightAlt, Key_Spacebar, Key_RightControl, Key_RightShift, Key_RightAlt, Key_Spacebar, Key_RightControl,
Key_skip Key_skip),
),
}; };
const macro_t *macroAction(uint8_t macroIndex, uint8_t keyState) { const macro_t *macroAction(uint8_t macroIndex, uint8_t keyState) {
@ -72,12 +71,14 @@ const macro_t *macroAction(uint8_t macroIndex, uint8_t keyState) {
LEDControl.set_all_leds_to(0, 0, 0); LEDControl.set_all_leds_to(0, 0, 0);
LEDControl.led_sync(); LEDControl.led_sync();
delay(100); delay(100);
for (uint8_t step = 0; step <= 0xf0; step += 8) { for (uint8_t step = 0; step <= 0xf0; step += 8) {
AlphaSquare.color = { step, step, step }; AlphaSquare.color = { step, step, step };
AlphaSquare.display(KaleidoscopePlugins::AlphaSquareSymbols::Lambda, 2); AlphaSquare.display(KaleidoscopePlugins::AlphaSquareSymbols::Lambda, 2);
AlphaSquare.display(KaleidoscopePlugins::AlphaSquareSymbols::Lambda, 10); AlphaSquare.display(KaleidoscopePlugins::AlphaSquareSymbols::Lambda, 10);
delay(10); delay(10);
} }
for (uint8_t step = 0xff; step >= 8; step -= 8) { for (uint8_t step = 0xff; step >= 8; step -= 8) {
AlphaSquare.color = { step, step, step }; AlphaSquare.color = { step, step, step };
AlphaSquare.display(KaleidoscopePlugins::AlphaSquareSymbols::Lambda, 2); AlphaSquare.display(KaleidoscopePlugins::AlphaSquareSymbols::Lambda, 2);
@ -85,8 +86,8 @@ const macro_t *macroAction(uint8_t macroIndex, uint8_t keyState) {
delay(10); delay(10);
} }
delay(100); delay(100);
} }
LEDControl.set_all_leds_to(0, 0, 0); LEDControl.set_all_leds_to(0, 0, 0);
return MACRO_NONE; return MACRO_NONE;

@ -27,8 +27,8 @@ class AlphaSquareEffect : public LEDMode {
public: public:
AlphaSquareEffect(void); AlphaSquareEffect(void);
virtual void begin(void) final; void begin(void) final;
virtual void update(void) final; void update(void) final;
static uint16_t length; static uint16_t length;
private: private:

@ -25,59 +25,57 @@
p00, p01, p02, p03, \ p00, p01, p02, p03, \
p10, p11, p12, p13, \ p10, p11, p12, p13, \
p20, p21, p22, p23, \ p20, p21, p22, p23, \
p30, p31, p32, p33 \ p30, p31, p32, p33) \
) \
(uint16_t) ( \ (uint16_t) ( \
p00 << 0 | p01 << 1 | p02 << 2 | p03 << 3 | \ p00 << 0 | p01 << 1 | p02 << 2 | p03 << 3 | \
p10 << 4 | p11 << 5 | p12 << 6 | p13 << 7 | \ p10 << 4 | p11 << 5 | p12 << 6 | p13 << 7 | \
p20 << 8 | p21 << 9 | p22 << 10 | p23 << 11 | \ p20 << 8 | p21 << 9 | p22 << 10 | p23 << 11 | \
p30 << 12 | p31 << 13 | p32 << 14 | p33 << 15 \ p30 << 12 | p31 << 13 | p32 << 14 | p33 << 15 )
)
namespace KaleidoscopePlugins { namespace KaleidoscopePlugins {
class AlphaSquare : public KaleidoscopePlugin { class AlphaSquare : public KaleidoscopePlugin {
public: public:
AlphaSquare(void); AlphaSquare(void);
virtual void begin(void) final; 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, cRGB keyColor);
static void display(Key key, uint8_t row, uint8_t col); static void display(Key key, uint8_t row, uint8_t col);
static void display(Key key) { static void display(Key key) {
display(key, 0, 2); display(key, 0, 2);
}; }
static void display(Key key, uint8_t col) { static void display(Key key, uint8_t col) {
display(key, 0, 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, cRGB keyColor);
static void display(uint16_t symbol, uint8_t row, uint8_t col); static void display(uint16_t symbol, uint8_t row, uint8_t col);
static void display(uint16_t symbol) { static void display(uint16_t symbol) {
display(symbol, 0, 2); display(symbol, 0, 2);
}; }
static void display(uint16_t symbol, uint8_t col) { static void display(uint16_t symbol, uint8_t col) {
display(symbol, 0, col); display(symbol, 0, col);
}; }
static void clear(Key key, uint8_t row, uint8_t col) { static void clear(Key key, uint8_t row, uint8_t col) {
display(key, row, col, {0, 0, 0}); display(key, row, col, {0, 0, 0});
}; }
static void clear(Key key, uint8_t col) { static void clear(Key key, uint8_t col) {
clear(key, 0, col); clear(key, 0, col);
}; }
static void clear(Key key) { static void clear(Key key) {
clear(key, 0, 2); clear(key, 0, 2);
}; }
static void clear(uint16_t symbol, uint8_t row, uint8_t col) { static void clear(uint16_t symbol, uint8_t row, uint8_t col) {
display(symbol, row, col, {0, 0, 0}); display(symbol, row, col, {0, 0, 0});
}; }
static void clear(uint16_t symbol, uint8_t col) { static void clear(uint16_t symbol, uint8_t col) {
clear(symbol, 0, col); clear(symbol, 0, col);
}; }
static void clear(uint16_t symbol) { static void clear(uint16_t symbol) {
clear(symbol, 0, 2); clear(symbol, 0, 2);
}; }
static cRGB color; static cRGB color;
}; };

Loading…
Cancel
Save