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

Add support to G512 and G513

This commit is contained in:
MatMoul 2018-08-01 23:37:29 +02:00
parent 92e656d199
commit 68551c65ec
5 changed files with 17 additions and 1 deletions

View File

@ -1,11 +1,13 @@
# g810-led</br> # g810-led</br>
Linux led controller for Logitech G213, G410, G413, G610, G810, G910 and GPRO Keyboards.</br> Linux led controller for Logitech G213, G410, G413, G512, G513, G610, G810, G910 and GPRO Keyboards.</br>
## Compatible keyboards :</br> ## Compatible keyboards :</br>
- **G213 Prodigy**</br> - **G213 Prodigy**</br>
- **G410 Atlas Spectrum**</br> - **G410 Atlas Spectrum**</br>
- **G413 Carbon**</br> - **G413 Carbon**</br>
- **G512 Carbon**</br>
- **G513 Carbon**</br>
- **G610 Orion Brown**</br> - **G610 Orion Brown**</br>
- **G610 Orion Red**</br> - **G610 Orion Red**</br>
- **G810 Orion Spectrum**</br> - **G810 Orion Spectrum**</br>
@ -23,6 +25,8 @@ Linux led controller for Logitech G213, G410, G413, G610, G810, G910 and GPRO Ke
`g213-led --help`</br> `g213-led --help`</br>
`g410-led --help`</br> `g410-led --help`</br>
`g413-led --help`</br> `g413-led --help`</br>
`g512-led --help`</br>
`g513-led --help`</br>
`g610-led --help`</br> `g610-led --help`</br>
`g810-led --help`</br> `g810-led --help`</br>
`g910-led --help`</br> `g910-led --help`</br>

View File

@ -61,6 +61,8 @@ setup:
@test -s $(DESTDIR)/usr/bin/g213-led || ln -s /usr/bin/$(PROGN) $(DESTDIR)/usr/bin/g213-led @test -s $(DESTDIR)/usr/bin/g213-led || ln -s /usr/bin/$(PROGN) $(DESTDIR)/usr/bin/g213-led
@test -s $(DESTDIR)/usr/bin/g410-led || ln -s /usr/bin/$(PROGN) $(DESTDIR)/usr/bin/g410-led @test -s $(DESTDIR)/usr/bin/g410-led || ln -s /usr/bin/$(PROGN) $(DESTDIR)/usr/bin/g410-led
@test -s $(DESTDIR)/usr/bin/g413-led || ln -s /usr/bin/$(PROGN) $(DESTDIR)/usr/bin/g413-led @test -s $(DESTDIR)/usr/bin/g413-led || ln -s /usr/bin/$(PROGN) $(DESTDIR)/usr/bin/g413-led
@test -s $(DESTDIR)/usr/bin/g512-led || ln -s /usr/bin/$(PROGN) $(DESTDIR)/usr/bin/g512-led
@test -s $(DESTDIR)/usr/bin/g513-led || ln -s /usr/bin/$(PROGN) $(DESTDIR)/usr/bin/g513-led
@test -s $(DESTDIR)/usr/bin/g610-led || ln -s /usr/bin/$(PROGN) $(DESTDIR)/usr/bin/g610-led @test -s $(DESTDIR)/usr/bin/g610-led || ln -s /usr/bin/$(PROGN) $(DESTDIR)/usr/bin/g610-led
@test -s $(DESTDIR)/usr/bin/g910-led || ln -s /usr/bin/$(PROGN) $(DESTDIR)/usr/bin/g910-led @test -s $(DESTDIR)/usr/bin/g910-led || ln -s /usr/bin/$(PROGN) $(DESTDIR)/usr/bin/g910-led
@test -s $(DESTDIR)/usr/bin/gpro-led || ln -s /usr/bin/$(PROGN) $(DESTDIR)/usr/bin/gpro-led @test -s $(DESTDIR)/usr/bin/gpro-led || ln -s /usr/bin/$(PROGN) $(DESTDIR)/usr/bin/gpro-led
@ -106,6 +108,9 @@ uninstall:
@rm /usr/bin/g213-led @rm /usr/bin/g213-led
@rm /usr/bin/g410-led @rm /usr/bin/g410-led
@rm /usr/bin/g413-led @rm /usr/bin/g413-led
@rm /usr/bin/g413-led
@rm /usr/bin/g512-led
@rm /usr/bin/g513-led
@rm /usr/bin/g610-led @rm /usr/bin/g610-led
@rm /usr/bin/g910-led @rm /usr/bin/g910-led
@rm /usr/bin/gpro-led @rm /usr/bin/gpro-led

View File

@ -358,6 +358,7 @@ bool LedKeyboard::commit() {
case KeyboardModel::g413: case KeyboardModel::g413:
return true; // Keyboard is non-transactional return true; // Keyboard is non-transactional
case KeyboardModel::g410: case KeyboardModel::g410:
case KeyboardModel::g513:
case KeyboardModel::g610: case KeyboardModel::g610:
case KeyboardModel::g810: case KeyboardModel::g810:
case KeyboardModel::gpro: case KeyboardModel::gpro:
@ -569,6 +570,7 @@ bool LedKeyboard::setAllKeys(LedKeyboard::Color color) {
setNativeEffect(NativeEffect::color, NativeEffectPart::keys, 0, color); setNativeEffect(NativeEffect::color, NativeEffectPart::keys, 0, color);
return true; return true;
case KeyboardModel::g410: case KeyboardModel::g410:
case KeyboardModel::g513:
case KeyboardModel::g610: case KeyboardModel::g610:
case KeyboardModel::g810: case KeyboardModel::g810:
case KeyboardModel::g910: case KeyboardModel::g910:
@ -731,6 +733,7 @@ bool LedKeyboard::setNativeEffect(NativeEffect effect, NativeEffectPart part, ui
if (part == NativeEffectPart::logo) return true; //Does not have logo component if (part == NativeEffectPart::logo) return true; //Does not have logo component
break; break;
case KeyboardModel::g410: case KeyboardModel::g410:
case KeyboardModel::g513:
case KeyboardModel::g610: // Unconfirmed case KeyboardModel::g610: // Unconfirmed
case KeyboardModel::g810: case KeyboardModel::g810:
case KeyboardModel::gpro: case KeyboardModel::gpro:
@ -856,6 +859,7 @@ LedKeyboard::byte_buffer_t LedKeyboard::getKeyGroupAddress(LedKeyboard::KeyAddre
case KeyboardModel::g413: case KeyboardModel::g413:
return {}; // Device doesn't support per-key setting return {}; // Device doesn't support per-key setting
case KeyboardModel::g410: case KeyboardModel::g410:
case KeyboardModel::g513:
case KeyboardModel::g610: case KeyboardModel::g610:
case KeyboardModel::g810: case KeyboardModel::g810:
case KeyboardModel::gpro: case KeyboardModel::gpro:

View File

@ -31,6 +31,7 @@ class LedKeyboard {
{ 0x46d, 0xc336, (u_int16_t)KeyboardModel::g213 }, { 0x46d, 0xc336, (u_int16_t)KeyboardModel::g213 },
{ 0x46d, 0xc330, (u_int16_t)KeyboardModel::g410 }, { 0x46d, 0xc330, (u_int16_t)KeyboardModel::g410 },
{ 0x46d, 0xc33a, (u_int16_t)KeyboardModel::g413 }, { 0x46d, 0xc33a, (u_int16_t)KeyboardModel::g413 },
{ 0x46d, 0xc33c, (u_int16_t)KeyboardModel::g513 },
{ 0x46d, 0xc333, (u_int16_t)KeyboardModel::g610 }, { 0x46d, 0xc333, (u_int16_t)KeyboardModel::g610 },
{ 0x46d, 0xc338, (u_int16_t)KeyboardModel::g610 }, { 0x46d, 0xc338, (u_int16_t)KeyboardModel::g610 },
{ 0x46d, 0xc331, (u_int16_t)KeyboardModel::g810 }, { 0x46d, 0xc331, (u_int16_t)KeyboardModel::g810 },
@ -45,6 +46,7 @@ class LedKeyboard {
g213, g213,
g410, g410,
g413, g413,
g513,
g610, g610,
g810, g810,
g910, g910,

View File

@ -1,6 +1,7 @@
ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c336", MODE="666" RUN+="/usr/bin/g213-led -p /etc/g810-led/profile" ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c336", MODE="666" RUN+="/usr/bin/g213-led -p /etc/g810-led/profile"
ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c330", MODE="666" RUN+="/usr/bin/g410-led -p /etc/g810-led/profile" ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c330", MODE="666" RUN+="/usr/bin/g410-led -p /etc/g810-led/profile"
ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c33a", MODE="666" RUN+="/usr/bin/g413-led -p /etc/g810-led/profile" ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c33a", MODE="666" RUN+="/usr/bin/g413-led -p /etc/g810-led/profile"
ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c33c", MODE="666" RUN+="/usr/bin/g513-led -p /etc/g810-led/profile"
ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c333", MODE="666" RUN+="/usr/bin/g610-led -p /etc/g810-led/profile" ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c333", MODE="666" RUN+="/usr/bin/g610-led -p /etc/g810-led/profile"
ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c338", MODE="666" RUN+="/usr/bin/g610-led -p /etc/g810-led/profile" ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c338", MODE="666" RUN+="/usr/bin/g610-led -p /etc/g810-led/profile"
ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c331", MODE="666" RUN+="/usr/bin/g810-led -p /etc/g810-led/profile" ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c331", MODE="666" RUN+="/usr/bin/g810-led -p /etc/g810-led/profile"