diff --git a/src/classes/Keyboard.cpp b/src/classes/Keyboard.cpp index 1c3b286..db26562 100644 --- a/src/classes/Keyboard.cpp +++ b/src/classes/Keyboard.cpp @@ -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,