From 9dc01b5382c7e4ff772e415f404d7fb70b1efd3d Mon Sep 17 00:00:00 2001 From: erikkaashoek Date: Fri, 11 Aug 2023 09:43:43 +0200 Subject: [PATCH] remote text --- main.c | 4 +++- si4468.c | 2 +- ui.c | 6 ++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index af41a6a..3c9b21b 100644 --- a/main.c +++ b/main.c @@ -820,6 +820,7 @@ VNA_SHELL_FUNCTION(cmd_menu) in_menu_command = false; } +uint8_t remote_text = false; VNA_SHELL_FUNCTION(cmd_text) { if (argc!= 1) @@ -833,6 +834,7 @@ VNA_SHELL_FUNCTION(cmd_text) uistat.value = my_atof(kp_buf); uistat.freq_value = my_atoui(kp_buf); set_numeric_value(); + remote_text = true; ui_mode_normal(); } @@ -2294,7 +2296,7 @@ static const VNAShellCommand commands[] = { "correction", cmd_correction, CMD_RUN_IN_LOAD }, { "calc", cmd_calc, CMD_WAIT_MUTEX | CMD_RUN_IN_LOAD}, { "menu", cmd_menu, CMD_WAIT_MUTEX }, - { "text", cmd_text, CMD_WAIT_MUTEX }, + { "text", cmd_text, 0}, { "remark", cmd_remark, CMD_WAIT_MUTEX }, #ifdef ENABLE_SD_CARD_CMD { "sd_list", cmd_sd_list, CMD_WAIT_MUTEX }, diff --git a/si4468.c b/si4468.c index 3098d91..0a7692d 100644 --- a/si4468.c +++ b/si4468.c @@ -260,7 +260,7 @@ bool PE4302_Write_Byte(unsigned char DATA ) #ifdef __SI5351__ #include "si5351.h" static int shifted = 0; -static int old_shifted = -1; +//static int old_shifted = -1; #define SHIFT_MUL 31 #define SHIFT_DIV 29 diff --git a/ui.c b/ui.c index 1ba8dfc..36c72b3 100644 --- a/ui.c +++ b/ui.c @@ -7279,6 +7279,8 @@ keypad_apply_touch(void) } extern uint8_t in_menu_command; +extern uint8_t remote_text; + static void ui_process_keypad(void) { @@ -7313,6 +7315,10 @@ ui_process_keypad(void) /* exit loop on done or cancel */ break; } + if (remote_text) { + remote_text = false; + break; + } } kp_help_text = NULL; redraw_frame();