mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-15 04:19:26 -07:00
Format
This commit is contained in:
@@ -35,8 +35,9 @@ void uart_terminal_scene_console_output_on_enter(void* context) {
|
||||
furi_string_reset(app->text_box_store);
|
||||
app->text_box_store_strlen = 0;
|
||||
|
||||
// app->show_stopscan_tip in the if is just a hack to get the help displayed since there is no commands in this app
|
||||
if(app->show_stopscan_tip || 0 == strncmp("help", app->selected_tx_string, strlen("help"))) {
|
||||
// app->show_stopscan_tip in the if is just a hack to get the help displayed since there is no commands in this app
|
||||
if(app->show_stopscan_tip ||
|
||||
0 == strncmp("help", app->selected_tx_string, strlen("help"))) {
|
||||
const char* help_msg =
|
||||
"Morse Flasher for\nMayhem Fin\n\nBased on UART terminal by\ncool4uma, which is a\nmodified WiFi Marauder\ncompanion by 0xchocolate\n\n";
|
||||
furi_string_cat_str(app->text_box_store, help_msg);
|
||||
|
||||
@@ -27,7 +27,14 @@ const UART_TerminalItem items[NUM_MENU_ITEMS] = {
|
||||
{"Quick message",
|
||||
{"SOS", "CQD", "VVV", "Eureka", "E.T ph...", "what h...", "Mayhem", "Flipper"},
|
||||
8,
|
||||
{"sos", "cqd", "vvv", "eureka", "e.t. phone home", "what hath god wrought!", "let the mayhem begin", "flipper zero in da housa"},
|
||||
{"sos",
|
||||
"cqd",
|
||||
"vvv",
|
||||
"eureka",
|
||||
"e.t. phone home",
|
||||
"what hath god wrought!",
|
||||
"let the mayhem begin",
|
||||
"flipper zero in da housa"},
|
||||
NO_ARGS,
|
||||
FOCUS_CONSOLE_END,
|
||||
NO_TIP},
|
||||
|
||||
@@ -58,7 +58,9 @@ UART_TerminalApp* uart_terminal_app_alloc() {
|
||||
|
||||
app->text_input = uart_text_input_alloc();
|
||||
view_dispatcher_add_view(
|
||||
app->view_dispatcher, UART_TerminalAppViewTextInput, uart_text_input_get_view(app->text_input));
|
||||
app->view_dispatcher,
|
||||
UART_TerminalAppViewTextInput,
|
||||
uart_text_input_get_view(app->text_input));
|
||||
|
||||
scene_manager_next_scene(app->scene_manager, UART_TerminalSceneStart);
|
||||
|
||||
@@ -95,9 +97,8 @@ int32_t uart_terminal_app(void* p) {
|
||||
furi_delay_ms(200);
|
||||
furi_hal_power_enable_external_3_3v();
|
||||
furi_hal_power_enable_otg();
|
||||
for(int i=0;i<2;i++)
|
||||
{
|
||||
furi_delay_ms(500);
|
||||
for(int i = 0; i < 2; i++) {
|
||||
furi_delay_ms(500);
|
||||
furi_hal_uart_tx(FuriHalUartIdUSART1, (uint8_t[1]){'.'}, 1);
|
||||
}
|
||||
furi_delay_ms(1);
|
||||
|
||||
@@ -71,7 +71,7 @@ UART_TerminalUart* uart_terminal_uart_init(UART_TerminalApp* app) {
|
||||
furi_hal_uart_set_irq_cb(UART_CH, uart_terminal_uart_on_irq_cb, uart);*/
|
||||
|
||||
uart->app = app;
|
||||
uart->rx_stream = furi_stream_buffer_alloc(RX_BUF_SIZE, 1);
|
||||
uart->rx_stream = furi_stream_buffer_alloc(RX_BUF_SIZE, 1);
|
||||
uart->rx_thread = furi_thread_alloc();
|
||||
furi_thread_set_name(uart->rx_thread, "UART_TerminalUartRxThread");
|
||||
furi_thread_set_stack_size(uart->rx_thread, 1024);
|
||||
|
||||
Reference in New Issue
Block a user