It seems the red component in the LEDs is a tiny bit stronger than the others,
so lets adjust the component's value a little on the firmware side to make
colors come out right.
This is not the best solution, it should eventually be configurable, but until
then, this is the best workaround we could come up with.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
for some reason, this line shows up on stderr anytime I (or the
find-device-port script) run `system_profiler SPUSBDataType`
2020-02-24 23:19:14.656 system_profiler[23932:4118769] SPUSBDevice:
IOCreatePlugInInterfaceForService failed 0xe00002be
I got annoyed enough to suppress it, so I could see the other output
that I actually care about.
Instead of scanning during the interrupt, do so in the main context, and only
use the interrupt for signaling that we need to scan. This resolves a problem
where scanning took too long, and we ended up missing events.
Fixes#812.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
Kaleidoscope builder has its own port autodetection. Although fairly
robus, this mechanism sometimes fails under certain circumstances
on some Linux systems (e.g. Ubuntu 18.04).
As a workaround this change enables the variables DEVICE_PORT
and DEVICE_PORT_BOOTLOADER being predefined on GNU/Linux, e.g. as
DEVICE_PORT=/dev/ttyACM0 make flash
which will disable the port autodetection.
Signed-off-by: Florian Fleissner <florian.fleissner@inpartik.de>
mod
As it turns out, simply removing the `library.properties` from the Bundle's
Kaleidoscope is not enough to discard it completely. So instead, to make sure
we're using the right version of it, remove the copy from the bundle, and
symlink ourselves back in.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
While `ShiftToLayer` and `LockLayer` activate the given layer, and keep all
others active as well, `MoveToLayer` activates the given layer, and deactivates
all others. This allows one to have discrete layers that stand on their own,
without any other layers interfering.
Basically, this is a different way to work with layers, a less powerful, but
also simpler one.
Fixes#564.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
`Layer.move()` relied on `activate()` to update the caches, but `activate()`
worked under the assumption that we also `deactivate()` layers - which we did
not in `move()`, as we directly modified the state. Since we directly modify the
state, we can't rely on `activate()` either, and have to update the caches
ourselves.
Unlike `activate()`, we do this unconditionally, because there isn't a case
where we do not want to update them.
This makes `MoveToLayer()` play well with `Colormap`, and any other plugin that
rely on cached layer information, such as the topmost active layer.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
This reverts commit 47c1e23fed, because changing
the order in the struct just made things worse. Looks like they _do_ need to be
RGB, but the CRGB macro still puts them in BGR order. This is consistent with
the Raise factory firmware, so lets stick with that.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
By means of this macro, headers can check if they are compiled
in the sketch compilation unit or in any other compilation unit.
Signed-off-by: Florian Fleissner <florian.fleissner@inpartik.de>
The new plugin exposes some layer control functions over Focus, to be able to
control layers from the host side.
Fixes#780.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
When setting the idle timeout to zero, stop checking for idleness, and never
turn the LEDs off. Setting the timeout to a higher value again will resume the
plugin's functionality.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
Even though the HID facade is deprecated in favour of the HID driver, to
maintain backwards compatibility, we should include `kaleidoscope/hid.h` by
default.
Fixes#793.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
When handling the `led.brightness` command, we forgot to break out of the switch
statement, thus executing the `setall` branch too. This resulted in very slow
operations, because we had to wait for a read to timeout.
Adding a break fixes all that.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>