mirror of
https://github.com/MatMoul/g810-led.git
synced 2024-12-23 09:16:11 +00:00
remove unneeded switch
This commit is contained in:
parent
b881e69698
commit
f1284cc0b7
@ -770,25 +770,12 @@ bool LedKeyboard::setOnBoardMode(OnBoardMode onBoardMode) {
|
|||||||
byte_buffer_t data;
|
byte_buffer_t data;
|
||||||
switch (currentDevice.model) {
|
switch (currentDevice.model) {
|
||||||
case KeyboardModel::g815:
|
case KeyboardModel::g815:
|
||||||
switch (onBoardMode) {
|
data = { 0x11, 0xff, 0x11, 0x1a, onBoardMode };
|
||||||
case LedKeyboard::OnBoardMode::board:
|
data.resize(20, 0x00);
|
||||||
data = { 0x11, 0xff, 0x11, 0x1a, 0x01 };
|
return sendDataInternal(data);
|
||||||
data.resize(20, 0x00);
|
|
||||||
return sendDataInternal(data);
|
|
||||||
case LedKeyboard::OnBoardMode::software:
|
|
||||||
data = { 0x11, 0xff, 0x11, 0x1b, 0x02 };
|
|
||||||
data.resize(20, 0x00);
|
|
||||||
return sendDataInternal(data);
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
data.push_back((unsigned char)onBoardMode);
|
|
||||||
data.resize(20, 0x00);
|
|
||||||
return sendDataInternal(data);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool LedKeyboard::setNativeEffect(NativeEffect effect, NativeEffectPart part,
|
bool LedKeyboard::setNativeEffect(NativeEffect effect, NativeEffectPart part,
|
||||||
|
Loading…
Reference in New Issue
Block a user