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:
parent
a3469402ba
commit
476bf8b5af
@ -564,6 +564,9 @@ bool LedKeyboard::setAllKeys(LedKeyboard::Color color) {
|
|||||||
case KeyboardModel::g213:
|
case KeyboardModel::g213:
|
||||||
for (uint8_t rIndex=0x01; rIndex <= 0x05; rIndex++) if (! setRegion(rIndex, color)) return false;
|
for (uint8_t rIndex=0x01; rIndex <= 0x05; rIndex++) if (! setRegion(rIndex, color)) return false;
|
||||||
return true;
|
return true;
|
||||||
|
case KeyboardModel::g413:
|
||||||
|
setNativeEffect(NativeEffect::color, NativeEffectPart::keys, 0, color);
|
||||||
|
return true;
|
||||||
case KeyboardModel::g410:
|
case KeyboardModel::g410:
|
||||||
case KeyboardModel::g610:
|
case KeyboardModel::g610:
|
||||||
case KeyboardModel::g810:
|
case KeyboardModel::g810:
|
||||||
@ -722,6 +725,7 @@ bool LedKeyboard::setNativeEffect(NativeEffect effect, NativeEffectPart part, ui
|
|||||||
|
|
||||||
switch (currentDevice.model) {
|
switch (currentDevice.model) {
|
||||||
case KeyboardModel::g213:
|
case KeyboardModel::g213:
|
||||||
|
case KeyboardModel::g413:
|
||||||
protocolByte = 0x0c;
|
protocolByte = 0x0c;
|
||||||
if (part == NativeEffectPart::logo) return false; //Does not have logo component
|
if (part == NativeEffectPart::logo) return false; //Does not have logo component
|
||||||
break;
|
break;
|
||||||
@ -848,6 +852,7 @@ bool LedKeyboard::sendDataInternal(byte_buffer_t &data) {
|
|||||||
LedKeyboard::byte_buffer_t LedKeyboard::getKeyGroupAddress(LedKeyboard::KeyAddressGroup keyAddressGroup) {
|
LedKeyboard::byte_buffer_t LedKeyboard::getKeyGroupAddress(LedKeyboard::KeyAddressGroup keyAddressGroup) {
|
||||||
switch (currentDevice.model) {
|
switch (currentDevice.model) {
|
||||||
case KeyboardModel::g213:
|
case KeyboardModel::g213:
|
||||||
|
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::g610:
|
case KeyboardModel::g610:
|
||||||
|
@ -30,6 +30,7 @@ class LedKeyboard {
|
|||||||
std::vector<std::vector<uint16_t>> SupportedKeyboards = {
|
std::vector<std::vector<uint16_t>> SupportedKeyboards = {
|
||||||
{ 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, 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 },
|
||||||
@ -43,6 +44,7 @@ class LedKeyboard {
|
|||||||
unknown = 0x00,
|
unknown = 0x00,
|
||||||
g213,
|
g213,
|
||||||
g410,
|
g410,
|
||||||
|
g413,
|
||||||
g610,
|
g610,
|
||||||
g810,
|
g810,
|
||||||
g910,
|
g910,
|
||||||
|
@ -15,6 +15,7 @@ namespace help {
|
|||||||
KeyboardFeatures getKeyboardFeatures(string cmdName) {
|
KeyboardFeatures getKeyboardFeatures(string cmdName) {
|
||||||
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 == "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;
|
||||||
else if(cmdName == "g910-led") return KeyboardFeatures::g910;
|
else if(cmdName == "g910-led") return KeyboardFeatures::g910;
|
||||||
|
@ -28,6 +28,7 @@ namespace help {
|
|||||||
|
|
||||||
g213 = rgb | logo1 | numpad | multimedia | setall | setregion | setindicators | poweronfx,
|
g213 = rgb | logo1 | numpad | multimedia | setall | setregion | setindicators | poweronfx,
|
||||||
g410 = rgb | commit | setall | setgroup | setkey | poweronfx,
|
g410 = rgb | commit | setall | setgroup | setkey | poweronfx,
|
||||||
|
g413 = intensity | setall,
|
||||||
g610 = intensity | commit | logo1 | numpad | multimedia | setall | setgroup | setkey | setindicators | poweronfx,
|
g610 = intensity | commit | logo1 | numpad | multimedia | setall | setgroup | setkey | setindicators | poweronfx,
|
||||||
g810 = rgb | commit | logo1 | numpad | multimedia | setall | setgroup | setkey | setindicators | poweronfx,
|
g810 = rgb | commit | logo1 | numpad | multimedia | setall | setgroup | setkey | setindicators | poweronfx,
|
||||||
g910 = rgb | commit | logo1 | logo2 | numpad | multimedia | gkeys | setall | setgroup | setkey | setindicators | poweronfx,
|
g910 = rgb | commit | logo1 | logo2 | numpad | multimedia | gkeys | setall | setgroup | setkey | setindicators | poweronfx,
|
||||||
|
Loading…
Reference in New Issue
Block a user