meson is a build system generator similar to cmake or autotools, but
without the crazy of either of those languages. It provides a pleasant
scripting language that is inspired by languages like python, but is not
python. It has a non-turing complete language, with an emphasis on
upstream functionality instead of downstream scripts. It has support for
most Unix-like OSes, including linux, the four major BSDs, and macOS.
this includes support for abstracting dependency discovery, using
pkg-config, macOS frameworks, cmake, and some hand coded extensions.
It provides nice features like builtin support for debug builds,
changing from static to shared library builds, turning warning arguments
on and off, generates for pkg-config, and other modern niceties.
For g810-led this provides a number of advantages for distro packaging.
Distros already use meson for projects like mesa, systemd, and gnome, so
they're packaging wrappers already know how to configure, build, and
install meson based packages. It also provides advantages when moving to
other platforms, as meson understands the difference between clang,
apple's clang fork, gcc, and a host of other compilers.
hid_write() expects a report ID in the first byte. The 0x11 and 0x12
values sent as the first byte of commands are consistent with report
IDs published in the keyboard's USB descriptors.
This change was motivated by commands not working reliably using
hidapi on macOS with a G Pro keyboard.
NOTE: Ripple effect (0x05) seems to have a conflict with an unadvertised
"stars"-like effect for the G410 and G810. Did not explore setting
timing for the G410/G810 effect, but is likely contrasted greatly with
the timing of the new Ripple effect. GHub limits ripple timing between
20ms and 200ms, but actual values are arbitrary and were tested up to
5000ms. Ideally should be kept within the 20-200ms range for best feel
of the effect. Logo does not honor the effect, and GHub simply sets to
the default "Logitech Blue".
Signed-off-by: Kevin Pearson <kevin.pearson@ortmanconsulting.com>
TODO: There is a new ripple effect that needs to be added. This commit
only provides support for the current effects.
Signed-off-by: Kevin Pearson <kevin.pearson@ortmanconsulting.com>
I had problems (with g513) where the udev rules were causing the script to run repeatedly, glitching any effects and stopping regular commands from executing. The singular version "SUBSYSTEM" instead of "SUBSYSTEMS" seems to fix that. YMMV