1
0
mirror of https://github.com/MatMoul/g810-led.git synced 2024-12-23 01:06:11 +00:00
Commit Graph

175 Commits

Author SHA1 Message Date
Kevin Pearson
c19d4760ce Rearrange argument parsing for help commands
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>
2017-04-29 08:55:53 -04:00
Kevin Pearson
114fa9b703 Augment command arg parsing to set specific device
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>
2017-04-28 16:18:37 -04:00
Kevin Pearson
53876ac54e Add utility to convert string to uint16_t
Purpose for this is for command argument parsing of vendor and product
IDs

Signed-off-by: Kevin Pearson <pearson.kevin.m@gmail.com>
2017-04-28 16:18:37 -04:00
Kevin Pearson
4b2a1002e8 Add support for opening a specific device
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>
2017-04-28 16:18:37 -04:00
Kevin Pearson
47e2468681 Unify version string
Specified version string in makefile will now propogate to VERSION as a
macro appended to CFLAGS.

Cleaned up version string, quotes not necessary when specifying
major/minor/micro, though this is purely cosmetic.

Signed-off-by: Kevin Pearson <pearosn.kevin.m@gmail.com>
2017-04-26 10:07:00 -04:00
b4d96ffa15 Version 0.2.0 2017-04-21 23:08:03 +02:00
9ae812b88e Finalization of g213 support 2017-04-21 23:00:21 +02:00
Kevin Pearson
793aa0d557 Initial work to add G213 support
Currently supported:
- G213 by region {1..5}
- Standard FX calls
- Startup behavior
- Help and command-line app support

resolves MatMoul/g810-led#69

Signed-off-by: Kevin Pearson <pearson.kevin.m@gmail.com>
2017-04-20 21:26:48 -04:00
1f0458ea4f Version 0.1.9 2017-04-14 03:08:51 +02:00
0e952273c0 Version 0.1.8 2017-04-14 03:06:24 +02:00
468b133cf0 Version 0.1.7 2017-04-14 02:42:55 +02:00
Kevin Pearson
d69ce2855f Fix spelling of SupportedKeyboards
Signed-off-by: Kevin Pearson <pearson.kevin.m@gmail.com>
2017-04-06 09:43:37 -04:00
d0c5b91815 Version 0.1.6 2017-03-25 01:15:37 +01:00
b4ab4b8939 Version 0.1.5 2017-03-25 01:13:31 +01:00
35af244e51 Version 0.1.4 2017-03-25 00:04:44 +01:00
95fb9c084e Update g410effects support 2017-03-25 00:03:05 +01:00
a1d4c81471 Improve code layout 2017-03-24 23:53:38 +01:00
16b8b7d12c Version 0.1.3 2017-03-18 22:17:43 +01:00
d9a7c4c561 Remove logo for G410 2017-03-18 19:44:37 +01:00
267fd9688d Clean comment 2017-03-17 20:16:57 +01:00
48e6167961 Validate setNativeEffects 2017-03-11 23:56:58 +01:00
53c3a01857 V 0.1.2 2017-03-11 23:31:23 +01:00
af1007636f Merge pull request #52 from CReimer/hidapi_wait
Make hidapi wait for at least 1ms (Fixes #45)
2017-03-11 23:14:33 +01:00
Christopher Reimer
72f5f230eb Make hidapi wait for at least 1ms for any answer from the keyboard. Setting this to 0 seems to make hidapi skip the read. And at least the G910 doesn't seem to like this very much. 2017-03-11 22:30:29 +01:00
1a86c04ba2 Version 0.1.1 2017-03-11 22:02:58 +01:00
5bdc691ddd Clean code 2017-03-11 21:35:39 +01:00
5ca929f15e Clean code 2017-03-11 21:34:29 +01:00
3c4c2ceef0 Set V 0.2.0 Branch 2017-03-11 21:34:17 +01:00
e233ad903f Remove commit for RM Keys 2017-03-11 21:16:38 +01:00
8931db5685 Add GKeys mapping mode suport 2017-03-11 21:14:50 +01:00
664f1346c7 Filter numpad keys for g410 2017-03-11 18:53:29 +01:00
d72e526ac9 Typo 2017-03-11 18:44:46 +01:00
148bd480df Add MKeys profile support 2017-03-11 18:11:40 +01:00
be7d367079 Add MKeys led control 2017-03-11 17:56:40 +01:00
57acff0910 Version 0.1.0 2017-02-25 03:24:28 +01:00
1af3da597b Version 0.0.2 2017-02-25 03:12:20 +01:00
a43c89a2bd Add make release support 2017-02-25 03:07:10 +01:00
7df4cc0888 make more readable 2017-02-25 01:12:58 +01:00
af6f24aac6 make more readable 2017-02-25 01:11:01 +01:00
6a98d1dd95 Update help and todo 2017-02-25 01:03:17 +01:00
3e1e4d494f Add devil comment 2017-02-12 02:12:14 +01:00
7765ca3591 Avoid sending keys that not supported by a keyboard model 2017-02-12 02:09:37 +01:00
e79c4e3241 Improve samples 2017-02-12 01:00:02 +01:00
da8eb644eb Restore g910 native effect 2017-02-11 22:28:53 +01:00
9bd190331b Bug correction 2017-02-07 00:51:01 +01:00
945c1dfc8a Bug correction 2017-02-07 00:49:18 +01:00
9bca0c8f30 Update FX help 2017-02-07 00:43:16 +01:00
b4e833c22e Update FX help 2017-02-07 00:42:50 +01:00
c05e058376 Make help more selective from binary name 2017-02-07 00:40:45 +01:00
4327a5d0e7 Make help more selective from binary name 2017-02-07 00:25:11 +01:00
ed153fed70 Make help more selective from binary name 2017-02-07 00:22:12 +01:00
b87c2595a7 Make help more selective from binary name 2017-02-07 00:18:23 +01:00
c887ad1773 Prepare avoid sending keys that not supported by a keyboard model 2017-02-07 00:03:50 +01:00
529c22aecb Update FX indicators color 2017-01-26 04:49:15 +01:00
12b16e8374 G910 commit bug correction 2017-01-24 00:00:01 +01:00
e8c678a181 Improve code 2017-01-22 00:47:38 +01:00
bcdcee88f1 Switch to hidapi 2017-01-21 22:45:48 +01:00
cdaae30aa2 esc bug 2017-01-21 09:17:35 +01:00
c2c8f6b7ac Full refactor code 2017-01-21 09:15:18 +01:00
0860773197 possible bug 2017-01-11 20:56:19 +01:00
83d16a23c1 Bug correction in sendDataInternal 2017-01-11 20:25:37 +01:00
f4ea0405cd Add FX features 2017-01-08 03:23:13 +01:00
c8a579a8f2 Clean code 2017-01-06 06:31:42 +01:00
3596a85315 Add profile pipe support 2017-01-06 06:08:09 +01:00
0ecd800b41 Add new product ID for G610 2017-01-05 21:59:03 +01:00
3af632a589 Add FX support for g910 2017-01-04 03:37:33 +01:00
MohamadSaada
fc86f2af44 Update Keyboard.cpp 2017-01-01 13:27:51 +00:00
56d5307043 Add natives effects support in profile 2016-12-30 22:27:53 +01:00
4bfa9811b3 Add wave effect 2016-12-30 21:35:26 +01:00
3b13f247b5 Add native effect support 2016-12-30 17:55:19 +01:00
5a2bff5225 Add first shot for effect code 2016-12-30 01:30:17 +01:00
d6a9c4191b Swap x and y key 2016-12-27 22:13:53 +01:00
800548ac5b Add gkeys in help 2016-12-24 05:50:14 +01:00
519f20211c include libusb.h and reindent libusb_device_descriptor desc 2016-12-14 01:44:33 +01:00
Charles
54897d9a5a Multiple changes of datatypes being past overflowing constants (most char needed to be changed to unsigned char or uint8_t). Also changed the include style of the <libusb.h> to be controlled through the makefile setting 2016-12-12 14:06:45 -06:00
ee2705f832 Clean code 2016-12-08 22:53:51 +01:00
8019e68f74 Possible buffer overflow correction 2016-12-08 22:51:48 +01:00
3af149101e Reindent with tab 2016-12-08 22:43:08 +01:00
4f9b5f381b Possible buffer overflow correction 2016-12-06 23:06:29 +01:00
a4a0b83542 Rename keyboard protocol version 2016-12-06 22:54:04 +01:00
MohamadSaada
80afb5dfaf Update Keyboard.cpp
14 isn't working because in the last iteration you might have some empty slots in the array, this way it will prevent that and work perfectly. I am using it in my program and have checked it in wireshark. I modified your program fully to suit my g910 keyboard.
2016-12-03 21:48:21 +00:00
69281f01d5 Imrove help and readme for g910 2016-12-03 15:22:03 +01:00
Daniel Kolosa
bcccdae449 Added support for g910 spectrum 2016-12-01 20:07:13 -05:00
c941052edb Add multiple logo support 2016-11-29 21:34:31 +01:00
b040e1b5c0 Add multiple logo support 2016-11-29 21:29:10 +01:00
e684cbf296 Remove multimedia keys for g910-spark and adjust gkeys buffer 2016-11-28 21:19:41 +01:00
f29e47da92 Set value from andreast1990 return 2016-11-28 00:54:29 +01:00
4d407ed834 Add spark support preview 2016-11-28 00:40:03 +01:00
b23e48069b Add G610 support 2016-11-18 21:48:50 +01:00
d2f248c295 Tempory patch 2016-11-12 00:55:55 +01:00
31144f67ce Move keyboard detection to Keyboard.cpp 2016-11-12 00:34:59 +01:00
30855c4c75 setGroupKeys keyValues count 2016-11-11 23:43:48 +01:00
f7970eb11c Delete correction 2016-11-11 23:42:14 +01:00
4a9268d878 Bug correction 2016-11-11 23:40:46 +01:00
2fd1d15777 Clean includes 2016-11-11 23:38:53 +01:00
7afb90dc20 Merge branch 'master' of git://github.com/larsnaesbye/g810-led into larsnaesbye-master 2016-10-31 22:31:56 +01:00
Lars Næsbye Christensen
24f8bf2c2f simple typo fix 2016-10-31 18:16:36 +01:00
089ff25f3e Clean code 2016-10-30 01:03:14 +02:00
bcafbf8f62 Merge branch 'keynames_backup' into keynames 2016-10-30 00:58:20 +02:00
bd1fbd9983 Optimize multiple pid detection 2016-10-29 22:49:35 +02:00