1
0
mirror of https://github.com/MatMoul/g810-led.git synced 2024-12-22 17:06:10 +00:00

remove unneeded switch

This commit is contained in:
cornernote 2020-01-17 10:45:26 +10:30
parent b881e69698
commit f1284cc0b7

View File

@ -770,25 +770,12 @@ bool LedKeyboard::setOnBoardMode(OnBoardMode onBoardMode) {
byte_buffer_t data;
switch (currentDevice.model) {
case KeyboardModel::g815:
switch (onBoardMode) {
case LedKeyboard::OnBoardMode::board:
data = { 0x11, 0xff, 0x11, 0x1a, 0x01 };
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;
data = { 0x11, 0xff, 0x11, 0x1a, onBoardMode };
data.resize(20, 0x00);
return sendDataInternal(data);
default:
return false;
}
data.push_back((unsigned char)onBoardMode);
data.resize(20, 0x00);
return sendDataInternal(data);
}
bool LedKeyboard::setNativeEffect(NativeEffect effect, NativeEffectPart part,