Revert "[FL-3909] CLI improvements, part I (#3928)" --nobuild

This reverts commit 0f831412fa.

This was reverted by OFW right after it was made, back in October 2024.
They are now getting back to implementing these features differently.
Thus, a revert is in order. But neofetch is staying :)
This commit is contained in:
Willy-JL
2025-04-03 01:51:47 +01:00
parent d93ff9bdb0
commit 858526cae1
11 changed files with 108 additions and 377 deletions

View File

@@ -991,12 +991,13 @@ static void subghz_cli_command_chat(Cli* cli, FuriString* args) {
chat_event = subghz_chat_worker_get_event_chat(subghz_chat);
switch(chat_event.event) {
case SubGhzChatEventInputData:
if(chat_event.c == CliKeyETX) {
if(chat_event.c == CliSymbolAsciiETX) {
printf("\r\n");
chat_event.event = SubGhzChatEventUserExit;
subghz_chat_worker_put_event_chat(subghz_chat, &chat_event);
break;
} else if((chat_event.c == CliKeyBackspace) || (chat_event.c == CliKeyDEL)) {
} else if(
(chat_event.c == CliSymbolAsciiBackspace) || (chat_event.c == CliSymbolAsciiDel)) {
size_t len = furi_string_utf8_length(input);
if(len > furi_string_utf8_length(name)) {
printf("%s", "\e[D\e[1P");
@@ -1018,7 +1019,7 @@ static void subghz_cli_command_chat(Cli* cli, FuriString* args) {
}
furi_string_set(input, sysmsg);
}
} else if(chat_event.c == CliKeyCR) {
} else if(chat_event.c == CliSymbolAsciiCR) {
printf("\r\n");
furi_string_push_back(input, '\r');
furi_string_push_back(input, '\n');
@@ -1032,7 +1033,7 @@ static void subghz_cli_command_chat(Cli* cli, FuriString* args) {
furi_string_printf(input, "%s", furi_string_get_cstr(name));
printf("%s", furi_string_get_cstr(input));
fflush(stdout);
} else if(chat_event.c == CliKeyLF) {
} else if(chat_event.c == CliSymbolAsciiLF) {
//cut out the symbol \n
} else {
putc(chat_event.c, stdout);

View File

@@ -1,6 +1,5 @@
#pragma once
#include <cli/cli.h>
#include <cli/cli_ansi.h>
void subghz_on_system_start(void);