The new `.setBrightness()` and `.getBrightness()` methods control the brightness
of the LEDs, by dispatching them to the LED drivers. We dispatch to the drivers
so that nothing else needs to be aware of brightness control. Plugins will
always set the unadjusted colors, and anything and anyone who reads colors, will
also get the unadjusted values.
Pushing the adjustment down to the driver level makes everything smooth, and
since we do gamma correction there anyway, it makes sense to do brightness
adjustment at the same place, too.
Fixes#775.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
The (internal) `::dygma::raise::Hand` class had two methods that weren't used by
Kaleidoscope at all: `.setAllLEDsTo` and `.setOneLEDTo`. Since they're unused,
remove them.
We weren't going to use them anyway, because they immediately sync to the LED
driver, while we want to do that in `syncLeds()`, and in there only.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
The old device API (`Hardware.h`, basically) along with some other related
symbols (`ROWS`, `COLS`, etc) were deprecated, they emit warnings, but not
removal date was set. Lets do that now.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
While we added the new APIs and the entry in UPGRADING.md last summer, a removal
date was never announced. Lets fix that now, and remove these in March.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
Remove two entries from the ToC, which were removed. We do not explicitly list
items below "Removed APIs", and these two were moved there a while ago.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
OneShot has dropped the old stickability controls almost a year ago, and that's
already part of UPGRADING.md. Remove the note that they will be removed - they
already were.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
This adds `LEDControl.disable()` and `LEDControl.enable()` which disable and
enable LED operations, respectively. These are meant to replace the current
`LEDControl.paused` property (which is getting deprecated with this change), and
do some additional work on top of just disabling or re-enabling future updates
and sync. Namely, `disable()` will also turn LEDs off, while `enable()` will
refresh them all, too.
We also add a dedicated `Key_LEDToggle` key to disable/enable LEDs. This is
useful when one wants to turn LEDs off, without changing active LED mode to
`LEDOff`.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
To activate the `Upper` layer, one has to press `Fun+Esc`, and layers get locked
to `Upper`. To go back to base, one would need to press `Fun`, while the `Upper`
key itself is disabled.
For the sake of laziness, this little change turns that disabled key on the
`Upper` layer into the same macro key as `Fun`, so hitting the same position
again will get us back to the QWERTY layer.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
The layout card for the Atreus will be using `Fun` and `Upper` for the layer
names. Update the example to follow the same naming.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
In particular, having backtick and backslash on the fn layer wasn't
helpful since they have dedicated keys now.
Also for the most part, the shift+number punctuation keys are in
sequential order, which makes them a lot easier to learn. (The
exception is the # key, which is moved down to make room for the arrow
cluster.)
The parens are moved so they're surrounding the arrows on the home
row, and the curly brackets are moved to mirror the square brackets.
A redundant backspace is added so it can be hit with either hand now.
https://atreus.technomancy.us/i/layout-new.png
The USB-Quirks plugin was relying on the old HIDAdaptor APIs, including
the (undocumented) defines that enable/disable the boot keyboard. Since we no
longer have those defines, the plugin was effectively a no-op.
This updates the plugin to work with the new APIs, without the need for ifdefs.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
`RaiseKeyScanner::pressedKeyswitchCount` and `::previousPressedKeyswitchCount()`
used `__builtin_popcountl` to count the bits set in the left and right hand
states, but that only looks at 32 bits out of the 64 we have in each half. We
should be using `__builtin_popcountll` instead.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
To make it easier to configure which HID implementation - and which parts of it
- a particular board uses, we turn our current HID facade (`kaleidoscope::hid`)
into a proper, Props-supported driver. This also allows us to get rid of the
`Kaleidoscope-HIDAdaptor-KeyboardioHID` library.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
Make the Model01's `setup()` method non-static, so that we can call the parents
`setup()` method too. We want to do that so if new drivers are added, we
automatically pick those up.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
- Rewrite decay code to fade brightness smoothly with an x^4
relationship
- Fade hue linearly from orange to red rather than for a subset of
time from red to orange
Signed-off-by: Bart Nagel <bart@tremby.net>
With this change, each device can specify a short name in their device
properties, which will be used to override the HID shortname. Due to link order,
we need to do the override in the user sketch, so we hook into the `KEYMAPS`
macro, to call `_INIT_HID_GETSHORTNAME`, which will set the override up for us.
The short name defaults to "kaleidoscope".
Together with keyboardio/KeyboardioHID#61, fixeskeyboardio/KeyboardioHID#54.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>