astyle with current project style guidelines

pull/389/head
Jesse Vincent 8 years ago
parent 1f8fc546e5
commit 5273b43ba0
No known key found for this signature in database
GPG Key ID: 122F5DF7108E4046

@ -40,13 +40,13 @@ const Key keymaps[][ROWS][COLS] PROGMEM = {
),
};
void setup () {
Kaleidoscope.setup (KEYMAP_SIZE);
Kaleidoscope.use (&LEDControl, &ActiveModColorEffect, NULL);
void setup() {
Kaleidoscope.setup(KEYMAP_SIZE);
Kaleidoscope.use(&LEDControl, &ActiveModColorEffect, NULL);
ActiveModColorEffect.configure ({0x00, 0xff, 0xff});
ActiveModColorEffect.configure({0x00, 0xff, 0xff});
}
void loop () {
Kaleidoscope.loop ();
void loop() {
Kaleidoscope.loop();
}

@ -25,27 +25,27 @@ cRGB ActiveModColorEffect::highlightColor = (cRGB) {
0xff, 0xff, 0xff
};
ActiveModColorEffect::ActiveModColorEffect (void) {
ActiveModColorEffect::ActiveModColorEffect(void) {
}
void
ActiveModColorEffect::begin (void) {
loop_hook_use (loopHook);
ActiveModColorEffect::begin(void) {
loop_hook_use(loopHook);
}
void
ActiveModColorEffect::configure (const cRGB highlightColor_) {
ActiveModColorEffect::configure(const cRGB highlightColor_) {
highlightColor = highlightColor_;
}
void
ActiveModColorEffect::loopHook (bool postClear) {
ActiveModColorEffect::loopHook(bool postClear) {
if (postClear)
return;
for (byte r = 0; r < ROWS; r++) {
for (byte c = 0; c < COLS; c++) {
Key k = Layer.lookup (r, c);
Key k = Layer.lookup(r, c);
if (k.raw >= KaleidoscopePlugins::Ranges::OSM_FIRST && k.raw <= KaleidoscopePlugins::Ranges::OSM_LAST) {
uint8_t idx = k.raw - KaleidoscopePlugins::Ranges::OSM_FIRST;
@ -56,8 +56,8 @@ ActiveModColorEffect::loopHook (bool postClear) {
if (k.raw < Key_LeftControl.raw || k.raw > Key_RightGui.raw)
continue;
if (Keyboard.isModifierActive (k.keyCode))
LEDControl.led_set_crgb_at (r, c, highlightColor);
if (Keyboard.isModifierActive(k.keyCode))
LEDControl.led_set_crgb_at(r, c, highlightColor);
}
}
}

@ -23,14 +23,14 @@ namespace KaleidoscopePlugins {
namespace LEDEffects {
class ActiveModColorEffect : public KaleidoscopePlugin {
public:
ActiveModColorEffect (void);
ActiveModColorEffect(void);
static void configure (const cRGB highlightColor);
virtual void begin (void) final;
static void configure(const cRGB highlightColor);
virtual void begin(void) final;
private:
static cRGB highlightColor;
static void loopHook (bool postClear);
static void loopHook(bool postClear);
};
};
};

Loading…
Cancel
Save