[FL-2612, FL-2618, FL-2619, FL-2622] CLI, threads, notifications, archive fixes (#1354)
* CLI, notifications, archive fixes * Led blink fix * Fix thread flags notification index * Archive: fix infinite tab switch on empty SD card Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
@@ -229,18 +229,22 @@ static void cli_handle_enter(Cli* cli) {
|
||||
|
||||
// Search for command
|
||||
furi_check(osMutexAcquire(cli->mutex, osWaitForever) == osOK);
|
||||
CliCommand* cli_command = CliCommandTree_get(cli->commands, command);
|
||||
if(cli_command) {
|
||||
CliCommand* cli_command_ptr = CliCommandTree_get(cli->commands, command);
|
||||
|
||||
if(cli_command_ptr) {
|
||||
CliCommand cli_command;
|
||||
memcpy(&cli_command, cli_command_ptr, sizeof(CliCommand));
|
||||
furi_check(osMutexRelease(cli->mutex) == osOK);
|
||||
cli_nl(cli);
|
||||
cli_execute_command(cli, cli_command, args);
|
||||
cli_execute_command(cli, &cli_command, args);
|
||||
} else {
|
||||
furi_check(osMutexRelease(cli->mutex) == osOK);
|
||||
cli_nl(cli);
|
||||
printf(
|
||||
"`%s` command not found, use `help` or `?` to list all available commands",
|
||||
string_get_cstr(command));
|
||||
cli_putc(cli, CliSymbolAsciiBell);
|
||||
}
|
||||
furi_check(osMutexRelease(cli->mutex) == osOK);
|
||||
|
||||
cli_reset(cli);
|
||||
cli_prompt(cli);
|
||||
|
@@ -199,6 +199,7 @@ static int32_t vcp_worker(void* context) {
|
||||
furi_hal_cdc_set_callbacks(VCP_IF_NUM, NULL, NULL);
|
||||
// Restore previous USB mode (if it was set during init)
|
||||
if((vcp->usb_if_prev != &usb_cdc_single) && (vcp->usb_if_prev != &usb_cdc_dual)) {
|
||||
furi_hal_usb_unlock();
|
||||
furi_hal_usb_set_config(vcp->usb_if_prev, NULL);
|
||||
}
|
||||
xStreamBufferReceive(vcp->tx_stream, vcp->data_buffer, USB_CDC_PKT_LEN, 0);
|
||||
|
Reference in New Issue
Block a user