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

Add G413 support

This commit is contained in:
MatMoul 2017-08-02 11:43:03 +02:00
parent 476bf8b5af
commit 0a7ee5b858
4 changed files with 7 additions and 2 deletions

View File

@ -5,6 +5,7 @@ Linux led controller for Logitech G213, G410, G610, G810, G910 and GPRO Keyboard
## Compatible keyboards :</br>
- **G213 Prodigy**</br>
- **G410 Atlas Spectrum**</br>
- **G413 Carbon**</br>
- **G610 Orion Brown**</br>
- **G610 Orion Red**</br>
- **G810 Orion Spectrum**</br>

View File

@ -60,6 +60,7 @@ setup:
@cp bin/$(PROGN) $(DESTDIR)/usr/bin
@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/g413-led || ln -s /usr/bin/$(PROGN) $(DESTDIR)/usr/bin/g413-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/gpro-led || ln -s /usr/bin/$(PROGN) $(DESTDIR)/usr/bin/gpro-led
@ -104,6 +105,7 @@ uninstall:
@rm /usr/bin/g213-led
@rm /usr/bin/g410-led
@rm /usr/bin/g413-led
@rm /usr/bin/g610-led
@rm /usr/bin/g910-led
@rm /usr/bin/gpro-led

View File

@ -355,7 +355,8 @@ bool LedKeyboard::commit() {
byte_buffer_t data;
switch (currentDevice.model) {
case KeyboardModel::g213:
break; // Keyboard is non-transactional
case KeyboardModel::g413:
return true; // Keyboard is non-transactional
case KeyboardModel::g410:
case KeyboardModel::g610:
case KeyboardModel::g810:
@ -727,7 +728,7 @@ bool LedKeyboard::setNativeEffect(NativeEffect effect, NativeEffectPart part, ui
case KeyboardModel::g213:
case KeyboardModel::g413:
protocolByte = 0x0c;
if (part == NativeEffectPart::logo) return false; //Does not have logo component
if (part == NativeEffectPart::logo) return true; //Does not have logo component
break;
case KeyboardModel::g410:
case KeyboardModel::g610: // Unconfirmed

View File

@ -1,5 +1,6 @@
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}=="c33a", MODE="666" RUN+="/usr/bin/g413-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}=="c331", MODE="666" RUN+="/usr/bin/g810-led -p /etc/g810-led/profile"