I took the liberty to create a Fedora Copr repository for this project
to make this easier to install. I've added the installation instructions
to `INSTALL.md` in case you want to add it there.
> https://copr.fedorainfracloud.org/coprs/lkiesow/g810-led/
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>
GPRO udev rule needs to use the /etc/g810-led/profile path like
the others.
Removed uninstallation of g810-led.service that is not being installed
in setup.
Signed-off-by: Lauri Leukkunen <lauri@rahina.org>
Help output does not need to initialize a device, so rearrange
the parsing to check for help commands prior to performing
any device IO.
Signed-off-by: Kevin Pearson <pearson.kevin.m@gmail.com>
Change argument parsing to segregate options from the command
Add -dv -dp and -ds options to allow matching a vendor ID, device ID,
and/or device serial number.
Modify --list-keyboards to parse the DeviceInfo vector and output
information to stdout.
Signed-off-by: Kevin Pearson <pearson.kevin.m@gmail.com>
Allow filtration and matching of specified Device ID, Product ID, Serial
Number
Fix an issue in listKeyboards (hidapi) with an out of bounds search when
using serial number
Fix possible null reference problem in listKeyboards (hidapi) that
caused rare segfaults when traversing the device enumeration in
increments of two
Fix handling of output of listKeyboards (hidapi) where it was
incrementing the dev list pointer, then accessing the node to look for
device serial number (potential security risk)
Fix handling of serial number output of listKeyboards (hidapi) to handle
wchar_t instead of outputting the memory address
Fix issue in listKeyboards (libusb) failure to finish cleaning up USB
contexts, leading to a segfault if calling a separate function after
listing keyboards.
Fix issue in close (libusb) segfaulting if m_hidHandle was null, so
added a check.
Modify listKeyboards to provide a vector of DeviceInfo objects that can
be used by calling applications instead of outputting to stdout directly.
Implement a struct to hold information regarding device information and
ability for a library caller to query this information to make decisions
about the currently targeted device.
Signed-off-by: Kevin Pearson <pearson.kevin.m@gmail.com>