LEDControl: Fix a thinko in FocusLEDCommand

When handling the `led.brightness` command, we forgot to break out of the switch
statement, thus executing the `setall` branch too. This resulted in very slow
operations, because we had to wait for a read to timeout.

Adding a break fixes all that.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
pull/796/head
Gergely Nagy 5 years ago
parent b1356900a1
commit 794f0e26e0
No known key found for this signature in database
GPG Key ID: AC1E90BAC433F68F

@ -245,6 +245,7 @@ EventHandlerResult FocusLEDCommand::onFocusEvent(const char *command) {
::Focus.read(brightness);
::LEDControl.setBrightness(brightness);
}
break;
}
case SETALL: {
cRGB c;

Loading…
Cancel
Save