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:

@ -24,148 +24,148 @@ static const uint16_t alphabet[] PROGMEM = {
SYM4x4(1, 1, 1, 1, SYM4x4(1, 1, 1, 1,
1, 0, 0, 1, 1, 0, 0, 1,
1, 1, 1, 1, 1, 1, 1, 1,
1, 0, 0, 1), // A 1, 0, 0, 1), // A
SYM4x4(1, 1, 1, 1, SYM4x4(1, 1, 1, 1,
1, 0, 1, 1, 1, 0, 1, 1,
1, 1, 0, 1, 1, 1, 0, 1,
1, 1, 1, 1), // B 1, 1, 1, 1), // B
SYM4x4(1, 1, 1, 1, SYM4x4(1, 1, 1, 1,
1, 0, 0, 0, 1, 0, 0, 0,
1, 0, 0, 0, 1, 0, 0, 0,
1, 1, 1, 1), // C 1, 1, 1, 1), // C
SYM4x4(1, 1, 1, 0, SYM4x4(1, 1, 1, 0,
1, 0, 0, 1, 1, 0, 0, 1,
1, 0, 0, 1, 1, 0, 0, 1,
1, 1, 1, 0), // D 1, 1, 1, 0), // D
SYM4x4(1, 1, 1, 1, SYM4x4(1, 1, 1, 1,
1, 1, 0, 0, 1, 1, 0, 0,
1, 0, 0, 0, 1, 0, 0, 0,
1, 1, 1, 1), // E 1, 1, 1, 1), // E
SYM4x4(1, 1, 1, 1, SYM4x4(1, 1, 1, 1,
1, 0, 0, 0, 1, 0, 0, 0,
1, 1, 1, 0, 1, 1, 1, 0,
1, 0, 0, 0), // F 1, 0, 0, 0), // F
SYM4x4(1, 1, 1, 0, SYM4x4(1, 1, 1, 0,
1, 0, 0, 0, 1, 0, 0, 0,
1, 0, 0, 1, 1, 0, 0, 1,
1, 1, 1, 1), // G 1, 1, 1, 1), // G
SYM4x4(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 1), // 8
SYM4x4(1, 1, 1, 1, SYM4x4(1, 1, 1, 1,
1, 0, 0, 1, 1, 0, 0, 1,
1, 1, 1, 1, 1, 1, 1, 1,
0, 0, 0, 1), // 9 0, 0, 0, 1), // 9
SYM4x4(0, 1, 1, 0, SYM4x4(0, 1, 1, 0,
1, 0, 0, 1, 1, 0, 0, 1,
1, 0, 0, 1, 1, 0, 0, 1,
0, 1, 1, 0), // 0 0, 1, 1, 0), // 0
}; };
cRGB AlphaSquare::color = {0x80, 0x80, 0x80}; cRGB AlphaSquare::color = {0x80, 0x80, 0x80};

@ -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