[FL-2493] Infrared: fix crash on invalid name. Input: cancel info in dump command. (#1153)
* Infrared: fix crash on invalid name. Input: cancel info in dump command. * FuriHal: add abort handler
This commit is contained in:
@@ -24,19 +24,15 @@ static void input_cli_dump(Cli* cli, string_t args, Input* input) {
|
||||
FuriPubSubSubscription* input_subscription =
|
||||
furi_pubsub_subscribe(input->event_pubsub, input_cli_dump_events_callback, input_queue);
|
||||
|
||||
bool stop = false;
|
||||
InputEvent input_event;
|
||||
while(!stop) {
|
||||
printf("Press CTRL+C to stop\r\n");
|
||||
while(!cli_cmd_interrupt_received(cli)) {
|
||||
if(osMessageQueueGet(input_queue, &input_event, NULL, 100) == osOK) {
|
||||
printf(
|
||||
"key: %s type: %s\r\n",
|
||||
input_get_key_name(input_event.key),
|
||||
input_get_type_name(input_event.type));
|
||||
}
|
||||
|
||||
if(cli_cmd_interrupt_received(cli)) {
|
||||
stop = true;
|
||||
}
|
||||
}
|
||||
|
||||
furi_pubsub_unsubscribe(input->event_pubsub, input_subscription);
|
||||
|
Reference in New Issue
Block a user