This should address common misconceptions of "No matching or compatible
device found" by isolating permission problems from lack of a matching
device in the system.
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've tested the FX support on a g512 and all command work just fine with
the exception of not being able to set a logo color simply because there
is no backlit logo…
This patch just updates the help notice which mentions that the FX
commands are only tested on the g810, suggesting that they might not
work on other keyboards.
Raw use of 0xFF as the effectpart byte is device-undefined and was
implemented as a wrapper around mutliplle native effects calls as well
as handling the indicators. Logic was previously implemented in the
application, allowing for library use in this particular case to have
undefined behavior.
Signed-off-by: Kevin Pearson <pearson.kevin.m@gmail.com>