mirror of
https://github.com/MatMoul/g810-led.git
synced 2024-12-23 09:16:11 +00:00
Add support for g512
Signed-off-by: Paulo Flabiano Smorigo <pfsmorigo@gmail.com>
This commit is contained in:
parent
118631d184
commit
1642d2dc02
@ -374,6 +374,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::g512:
|
||||||
case KeyboardModel::g513:
|
case KeyboardModel::g513:
|
||||||
case KeyboardModel::g610:
|
case KeyboardModel::g610:
|
||||||
case KeyboardModel::g810:
|
case KeyboardModel::g810:
|
||||||
@ -449,6 +450,7 @@ bool LedKeyboard::setKeys(KeyValueArray keyValues) {
|
|||||||
break;
|
break;
|
||||||
case LedKeyboard::KeyAddressGroup::keys:
|
case LedKeyboard::KeyAddressGroup::keys:
|
||||||
switch (currentDevice.model) {
|
switch (currentDevice.model) {
|
||||||
|
case LedKeyboard::KeyboardModel::g512:
|
||||||
case LedKeyboard::KeyboardModel::g513:
|
case LedKeyboard::KeyboardModel::g513:
|
||||||
case LedKeyboard::KeyboardModel::g610:
|
case LedKeyboard::KeyboardModel::g610:
|
||||||
case LedKeyboard::KeyboardModel::g810:
|
case LedKeyboard::KeyboardModel::g810:
|
||||||
@ -588,6 +590,7 @@ bool LedKeyboard::setAllKeys(LedKeyboard::Color color) {
|
|||||||
NativeEffectStorage::none);
|
NativeEffectStorage::none);
|
||||||
return true;
|
return true;
|
||||||
case KeyboardModel::g410:
|
case KeyboardModel::g410:
|
||||||
|
case KeyboardModel::g512:
|
||||||
case KeyboardModel::g513:
|
case KeyboardModel::g513:
|
||||||
case KeyboardModel::g610:
|
case KeyboardModel::g610:
|
||||||
case KeyboardModel::g810:
|
case KeyboardModel::g810:
|
||||||
@ -752,6 +755,7 @@ bool LedKeyboard::setNativeEffect(NativeEffect effect, NativeEffectPart part,
|
|||||||
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::g512:
|
||||||
case KeyboardModel::g513:
|
case KeyboardModel::g513:
|
||||||
case KeyboardModel::g610: // Unconfirmed
|
case KeyboardModel::g610: // Unconfirmed
|
||||||
case KeyboardModel::g810:
|
case KeyboardModel::g810:
|
||||||
@ -835,6 +839,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::g512:
|
||||||
case KeyboardModel::g513:
|
case KeyboardModel::g513:
|
||||||
case KeyboardModel::gpro:
|
case KeyboardModel::gpro:
|
||||||
switch (keyAddressGroup) {
|
switch (keyAddressGroup) {
|
||||||
|
@ -48,6 +48,7 @@ class LedKeyboard {
|
|||||||
{ 0x46d, 0xc336, (uint16_t)KeyboardModel::g213 },
|
{ 0x46d, 0xc336, (uint16_t)KeyboardModel::g213 },
|
||||||
{ 0x46d, 0xc330, (uint16_t)KeyboardModel::g410 },
|
{ 0x46d, 0xc330, (uint16_t)KeyboardModel::g410 },
|
||||||
{ 0x46d, 0xc33a, (uint16_t)KeyboardModel::g413 },
|
{ 0x46d, 0xc33a, (uint16_t)KeyboardModel::g413 },
|
||||||
|
{ 0x46d, 0xc342, (uint16_t)KeyboardModel::g512 },
|
||||||
{ 0x46d, 0xc33c, (uint16_t)KeyboardModel::g513 },
|
{ 0x46d, 0xc33c, (uint16_t)KeyboardModel::g513 },
|
||||||
{ 0x46d, 0xc333, (uint16_t)KeyboardModel::g610 },
|
{ 0x46d, 0xc333, (uint16_t)KeyboardModel::g610 },
|
||||||
{ 0x46d, 0xc338, (uint16_t)KeyboardModel::g610 },
|
{ 0x46d, 0xc338, (uint16_t)KeyboardModel::g610 },
|
||||||
@ -63,7 +64,8 @@ class LedKeyboard {
|
|||||||
g213,
|
g213,
|
||||||
g410,
|
g410,
|
||||||
g413,
|
g413,
|
||||||
g513,
|
g512,
|
||||||
|
g513,
|
||||||
g610,
|
g610,
|
||||||
g810,
|
g810,
|
||||||
g910,
|
g910,
|
||||||
|
@ -32,6 +32,7 @@ namespace help {
|
|||||||
if(cmdName == "g213-led") return KeyboardFeatures::g213;
|
if(cmdName == "g213-led") return KeyboardFeatures::g213;
|
||||||
else if(cmdName == "g410-led") return KeyboardFeatures::g410;
|
else if(cmdName == "g410-led") return KeyboardFeatures::g410;
|
||||||
else if(cmdName == "g413-led") return KeyboardFeatures::g413;
|
else if(cmdName == "g413-led") return KeyboardFeatures::g413;
|
||||||
|
else if(cmdName == "g512-led") return KeyboardFeatures::g512;
|
||||||
else if(cmdName == "g513-led") return KeyboardFeatures::g513;
|
else if(cmdName == "g513-led") return KeyboardFeatures::g513;
|
||||||
else if(cmdName == "g610-led") return KeyboardFeatures::g610;
|
else if(cmdName == "g610-led") return KeyboardFeatures::g610;
|
||||||
else if(cmdName == "g810-led") return KeyboardFeatures::g810;
|
else if(cmdName == "g810-led") return KeyboardFeatures::g810;
|
||||||
|
@ -47,6 +47,7 @@ namespace help {
|
|||||||
g213 = rgb | logo1 | numpad | multimedia | setall | setregion | setindicators | poweronfx | userstoredlighting,
|
g213 = rgb | logo1 | numpad | multimedia | setall | setregion | setindicators | poweronfx | userstoredlighting,
|
||||||
g410 = rgb | commit | setall | setgroup | setkey | poweronfx | userstoredlighting,
|
g410 = rgb | commit | setall | setgroup | setkey | poweronfx | userstoredlighting,
|
||||||
g413 = intensity | setall | userstoredlighting,
|
g413 = intensity | setall | userstoredlighting,
|
||||||
|
g512 = rgb | commit | numpad | setall | setgroup | setkey | setindicators | poweronfx | userstoredlighting,
|
||||||
g513 = rgb | commit | numpad | setall | setgroup | setkey | setindicators | poweronfx | userstoredlighting,
|
g513 = rgb | commit | numpad | setall | setgroup | setkey | setindicators | poweronfx | userstoredlighting,
|
||||||
g610 = intensity | commit | logo1 | numpad | multimedia | setall | setgroup | setkey | setindicators | poweronfx | userstoredlighting,
|
g610 = intensity | commit | logo1 | numpad | multimedia | setall | setgroup | setkey | setindicators | poweronfx | userstoredlighting,
|
||||||
g810 = rgb | commit | logo1 | numpad | multimedia | setall | setgroup | setkey | setindicators | poweronfx,
|
g810 = rgb | commit | logo1 | numpad | multimedia | setall | setgroup | setkey | setindicators | poweronfx,
|
||||||
|
@ -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}=="c342", MODE="666" RUN+="/usr/bin/g512-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}=="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"
|
||||||
@ -12,6 +13,7 @@ ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c3
|
|||||||
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c336", MODE="666" RUN+="/usr/bin/g213-led -p /etc/g810-led/profile"
|
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c336", MODE="666" RUN+="/usr/bin/g213-led -p /etc/g810-led/profile"
|
||||||
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c330", MODE="666" RUN+="/usr/bin/g410-led -p /etc/g810-led/profile"
|
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c330", MODE="666" RUN+="/usr/bin/g410-led -p /etc/g810-led/profile"
|
||||||
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c33a", MODE="666" RUN+="/usr/bin/g413-led -p /etc/g810-led/profile"
|
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c33a", MODE="666" RUN+="/usr/bin/g413-led -p /etc/g810-led/profile"
|
||||||
|
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c342", MODE="666" RUN+="/usr/bin/g512-led -p /etc/g810-led/profile"
|
||||||
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c33c", MODE="666" RUN+="/usr/bin/g513-led -p /etc/g810-led/profile"
|
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c33c", MODE="666" RUN+="/usr/bin/g513-led -p /etc/g810-led/profile"
|
||||||
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c333", MODE="666" RUN+="/usr/bin/g610-led -p /etc/g810-led/profile"
|
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c333", MODE="666" RUN+="/usr/bin/g610-led -p /etc/g810-led/profile"
|
||||||
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c338", MODE="666" RUN+="/usr/bin/g610-led -p /etc/g810-led/profile"
|
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c338", MODE="666" RUN+="/usr/bin/g610-led -p /etc/g810-led/profile"
|
||||||
|
Loading…
Reference in New Issue
Block a user