Added condition to cli "log" command to end if serial terminal is disconnected. (#1425)
* Added condition to cli "log" command. If USB is disconnected while "log" command is running, it will end the command. * Reverted change on cli_commands.c Added condition in cli.c for cli_cmd_interrupt_received function to react appropriately when serial terminal is disconnected. Added condition in subghz_cli.c for subghz chat cmd to exit gracefully when serial terminal is disconnected. * Formatting Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
@@ -676,6 +676,11 @@ static void subghz_cli_command_chat(Cli* cli, string_t args) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(cli_is_connected(cli)) {
|
||||
printf("\r\n");
|
||||
chat_event.event = SubGhzChatEventUserExit;
|
||||
subghz_chat_worker_put_event_chat(subghz_chat, &chat_event);
|
||||
}
|
||||
}
|
||||
|
||||
string_clear(input);
|
||||
|
Reference in New Issue
Block a user