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:
ESurge
2022-07-22 20:35:14 -07:00
committed by GitHub
parent 16e598b2c0
commit 253b98c8f0
2 changed files with 18 additions and 11 deletions

View File

@@ -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);