Revert "Add a way to optimize for a one-shot-only setup."

This reverts commit b3e1f73546, because it broke
more things than it fixed.
pull/389/head
Gergely Nagy 7 years ago
parent b3e1f73546
commit 26b07ba67a

@ -46,15 +46,6 @@ property:
> The color to use for highlighting the modifiers. Defaults to a white color. > The color to use for highlighting the modifiers. Defaults to a white color.
### `.oneshot_only`
> A flag one can set to tell the plugin that they are using one-shot modifiers
> and layers only. This allows it to take some shortcuts, and optimize
> performance, at the cost of not highlighting any non-oneshot keys it otherwise
> would.
>
> Defaults to `false`.
## Dependencies ## Dependencies
* [Kaleidoscope-LEDControl](https://github.com/keyboardio/Kaleidoscope-LEDControl) * [Kaleidoscope-LEDControl](https://github.com/keyboardio/Kaleidoscope-LEDControl)

@ -25,7 +25,6 @@ namespace kaleidoscope {
cRGB ActiveModColorEffect::highlight_color = (cRGB) { cRGB ActiveModColorEffect::highlight_color = (cRGB) {
0xff, 0xff, 0xff 0xff, 0xff, 0xff
}; };
bool ActiveModColorEffect::oneshot_only;
void ActiveModColorEffect::begin(void) { void ActiveModColorEffect::begin(void) {
Kaleidoscope.useLoopHook(loopHook); Kaleidoscope.useLoopHook(loopHook);
@ -35,9 +34,6 @@ void ActiveModColorEffect::loopHook(bool is_post_clear) {
if (is_post_clear) if (is_post_clear)
return; return;
if (oneshot_only && !::OneShot.isActive())
return;
for (byte r = 0; r < ROWS; r++) { for (byte r = 0; r < ROWS; r++) {
for (byte c = 0; c < COLS; c++) { for (byte c = 0; c < COLS; c++) {
Key k = Layer.lookupOnActiveLayer(r, c); Key k = Layer.lookupOnActiveLayer(r, c);

@ -29,7 +29,6 @@ class ActiveModColorEffect : public KaleidoscopePlugin {
void begin(void) final; void begin(void) final;
static cRGB highlight_color; static cRGB highlight_color;
static bool oneshot_only;
private: private:
static void loopHook(bool is_post_clear); static void loopHook(bool is_post_clear);

Loading…
Cancel
Save