Gergely Nagy
d77f6f8de0
Stop using obsolete interfaces
...
`USE_PLUGINS` and `loop_hook_use` are deprecated, use `Kaleidoscope.use` and
`Kaleidoscope.useLoopHook` instead.
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
c7bc3ad04c
Stop using USE_PLUGINS
...
The `USE_PLUGINS` macro is getting obsoleted, use `Kaleidoscope.use` instead.
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
a57679c014
Stop using obsolete functions
...
Use `Kaleidoscope.use` and `Kaleidoscope.useEventHandlerHook` instead of the
obsolete `USE_PLUGINS` and `event_handler_hook_use` interfaces.
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
1b6dc98703
Use `Kaleidoscope.use` instead of `USE_PLUGINS`
...
The latter is being obsoleted, so use the former, newer API.
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
bd1f7dfe36
Stop using obsolete functions
...
`USE_PLUGINS` and `event_handler_hook_use` are obsolete, use the proper APIs
instead.
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
0cb75c5e7f
Stop using obsolete functions
...
`USE_PLUGINS` and `event_handler_hook_use` are being phased out, stop using them.
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
119d021e6a
Layer: Add Layer.highest() to access the cached highestLayer
...
Sometimes we would like to know the highest active layer, which is available in
the `highestLayer` private variable, and via `.top()` too. We do not want to
make `highestLayer` public, because we want to be the only ones changing it. And
while `top()` gets us roughly the same information, it does so at a cost. For a
lot of purposes, the cached `highestLayer` would be perfectly adequate.
The new `Layer.highest()` accessor does just this.
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
a8fdd4b9c4
Major performance optimization
...
Now that we only care about the highest active layer, make sure we only do work
if that changed between two cycles. This way, `onActivate()` will take care of
the initial setup, `update()` will be an almost no-op for most of the time, and
`refreshAt()` will take care of refreshing keys other plugins may have changed.
This makes us about twice as fast as we were, on average.
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
c3f9e2f148
README.md: Updated to remove any mention of transparent colors
...
The underlying `LED-PaletteTheme` plugin stopped supporting transparent colors,
and as a consequence, so did we. Update the README accordingly.
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
4a494c686b
Drop transparency support
...
Supporting transparency is very, very expensive in terms of speed, while the
benefits are marginal at best. Drop support for it for now.
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
72630bd326
Update the example to use Kaleidoscope.use
...
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
2a7eb7f4ee
Update the README.md to show an up to date example
...
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
7eded65ba3
Fix the LEDControl references
...
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
a8fdb3a5f0
Really fix the example this time...
...
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
bbf5ae3a08
Updated the example to work with the new LEDControl APIs
...
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
a5d3a9ff37
Updated to use Kaleidoscope.use instead of USE_PLUGINS
...
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
dc0b2a2b91
Updated to use the new LEDMode/LEDControl API
...
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
4dbc5d5707
Update the example to work with the new LEDMode/LEDControl API
...
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
475e9b531f
Merge pull request #8 from keyboardio/f/led-api-update
...
Updated to use the new LEDMode/LEDControl API
7 years ago
Gergely Nagy
bf60ae58e5
Merge pull request #1 from keyboardio/f/led-api-update
...
Updated to use the new LEDMode/LEDControl API
7 years ago
Gergely Nagy
b9e2d3a27d
Merge pull request #3 from keyboardio/f/led-api-update
...
Updated to use the new LEDMode/LEDControl API
7 years ago
Gergely Nagy
be10584f52
Merge pull request #1 from keyboardio/f/led-api-update
...
Updated to use the new LEDMode/LEDControl API
7 years ago
Gergely Nagy
dafb257e42
Merge pull request #1 from keyboardio/f/led-api-update
...
Updated to use the new LEDMode/LEDControl API
7 years ago
Gergely Nagy
b40874edfc
Merge pull request #1 from keyboardio/f/led-api-update
...
Updated to use the new LEDMode/LEDControl API
7 years ago
Gergely Nagy
25fcd12402
Merge pull request #1 from keyboardio/f/led-api-update
...
Updated to use the new LEDMode/LEDControl API
7 years ago
Gergely Nagy
a451ed8383
Merge pull request #11 from keyboardio/f/led-api-update
...
Updated to use the new LEDMode/LEDControl API
7 years ago
Gergely Nagy
ad076a36dd
Merge pull request #3 from keyboardio/f/led-api-update
...
Updated to use the new LEDMode/LEDControl API
7 years ago
Gergely Nagy
4781af907b
Merge pull request #7 from keyboardio/f/led-api-update
...
Updated to use the new LEDMode/LEDControl API
7 years ago
Gergely Nagy
2765bca10b
Merge pull request #5 from keyboardio/f/led-api-update
...
Updated to use the new LEDMode/LEDControl API
7 years ago
Gergely Nagy
1672a1c033
Merge pull request #7 from keyboardio/f/led-api-update
...
Update to use the new LEDMode/LEDControl API
7 years ago
Gergely Nagy
1e08277a90
Merge pull request #4 from keyboardio/f/led-mode-api-update
...
Update to use the new LEDMode/LEDControl API
7 years ago
Gergely Nagy
8829c32fb7
Merge pull request #11 from keyboardio/f/led-mode/api-redesign
...
Major update of how LED modes work
7 years ago
Gergely Nagy
8375838c81
Redo the logic that checks if we need to highlight
...
Instead of using `Kaleidoscope-Ranges` and custom helper functions with magic
constants to decide whether we need to highlight a key, refresh it, or leave it
alone, use an if-else chain and inner ifs for activity.
Leverages the new `OneShot.isOneShotKey(key)` and `OneShot.isActive(key)`
methods.
The net result is slightly cleaner code (though it can still be improved), and
about 0.2ms saved, along with some PROGMEM space.
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
6fbcf4ec5d
Add a `OneShot.isActive(key)` method
...
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
f39cb776a3
Lift out the `isOS` macro into `OneShot.isOneShotKey`.
...
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
e15aaed8c6
loopHook: Correct a thinko
...
Thanks @obra for catching it!
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
kaleidoscope@gergo.csillger.hu
ddd7ce47f7
Updated to use the new LEDMode/LEDControl API
...
Signed-off-by: kaleidoscope@gergo.csillger.hu <algernon@madhouse-project.org>
7 years ago
Gergely Nagy
da0c998760
Updated to use the new LEDMode/LEDControl API
...
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
b829d6371b
Updated to use the new LEDMode/LEDControl API
...
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
75edd6425e
Updated to use the new LEDMode/LEDControl API
...
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
25cb263e6a
Updated to use the new LEDMode/LEDControl API
...
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
7f705c43b5
Updated to use the new LEDMode/LEDControl API
...
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
de54b5b279
Updated to use the new LEDMode/LEDControl API
...
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
a7f9207cec
Updated to use the new LEDMode/LEDControl API
...
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
8bb7a5b1e4
Updated to use the new LEDMode/LEDControl API
...
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
7c67b22dff
Updated to use the new LEDMode/LEDControl API
...
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
0d22199cac
Updated to use the new LEDMode/LEDControl API
...
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
559858db8a
Updated to use the new LEDMode/LEDControl API
...
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
fe53c4fabe
Update to use the new LEDMode/LEDControl API
...
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
d4ddd5fd73
Update to use the new LEDMode/LEDControl API
...
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago