Merge pull request #1140 from keyboardio/focus-command/reset

FocusSerial: Implement a `device.reset` command
pull/1141/head
Jesse Vincent 3 years ago committed by GitHub
commit dd44da41e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -90,9 +90,13 @@ bool FocusSerial::handleHelp(const char *command,
}
EventHandlerResult FocusSerial::onFocusEvent(const char *command) {
if (handleHelp(command, PSTR("help\nplugins")))
if (handleHelp(command, PSTR("help\ndevice.reset\nplugins")))
return EventHandlerResult::OK;
if (strcmp_P(command, PSTR("device.reset")) == 0) {
Runtime.device().rebootBootloader();
return EventHandlerResult::EVENT_CONSUMED;
}
if (strcmp_P(command, PSTR("plugins")) == 0) {
kaleidoscope::Hooks::onNameQuery();
return EventHandlerResult::EVENT_CONSUMED;

Loading…
Cancel
Save