From a092e6b5523d0cf94bb3e6b16a3b2a1c717ea673 Mon Sep 17 00:00:00 2001 From: erikkaashoek Date: Thu, 12 Nov 2026 08:23:04 +0100 Subject: [PATCH 1/9] Console: ui on|off stops the screen drawing while a PC is in control (Ultra) ui off shows "Remote only mode. Touch screen to enable UI" and the drawing functions return at once, so a command no longer waits for a redraw of the screen. A touch or a jog press only gives the UI back, as do ui on, a lost USB connection, USB DISK mode and the commands that need the user (new command flag CMD_UI_ON: selftest, touchcal, touchtest, menu). The PC learns it from a "ui on" line before its next reply. ui shows the state, it is not stored and survives mode changes. While the UI is off message boxes go to the console without their delay, rbw and sweeptime report the values of changed settings while paused, and measure nf_store computes the noise figure itself (noise_figure(), it was only computed while drawing the marker info). --- main.c | 80 ++++++++++++++++++++++++++++++++++++++++++----------- nanovna.h | 13 ++++++++- plot.c | 47 +++++++++++++++++-------------- sa_cmd.c | 35 +++++++++++++++++++---- ui.c | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++---- 5 files changed, 209 insertions(+), 49 deletions(-) diff --git a/main.c b/main.c index de5e6a1..6efb6b0 100644 --- a/main.c +++ b/main.c @@ -63,7 +63,22 @@ char shell_line[VNA_SHELL_MAX_LENGTH]; char *shell_args[VNA_SHELL_MAX_ARGUMENTS + 1]; uint16_t shell_nargs; static volatile vna_shellcmd_t shell_function = 0; -static volatile bool shell_function_ui; // shell_function may also run in a UI wait loop (CMD_RUN_IN_UI) +static volatile uint8_t shell_function_flags; // CMD_xxx of shell_function: CMD_RUN_IN_UI also runs it in a UI wait loop + +// Some commands can executed only in sweep thread, not in main cycle +#define CMD_WAIT_MUTEX 1 +#define CMD_RUN_IN_LOAD 2 +#define CMD_RUN_IN_UI 4 +#ifdef __USE_USB_MSC__ +#define CMD_DISK_OK 8 // allowed in USB DISK mode, does not use SPI1 or spi_buffer +#else +#define CMD_DISK_OK 0 +#endif +#ifdef __UI_OFF__ +#define CMD_UI_ON 16 // needs the user at the tinySA: ui on before it runs (with CMD_WAIT_MUTEX) +#else +#define CMD_UI_ON 0 +#endif //#define ENABLED_DUMP // Allow get threads debug info @@ -90,6 +105,7 @@ void update_frequencies(void); static void set_frequencies(freq_t start, freq_t stop, uint16_t points); static bool sweep(bool break_on_operation); static long_t my_atoi(const char *p); +static bool shell_check_connect(void); uint8_t sweep_mode = SWEEP_ENABLE; uint16_t sweep_once_count = 1; @@ -152,11 +168,12 @@ void shell_run_pending(bool ui_wait) { chSysLock(); vna_shellcmd_t local_func = shell_function; - if (ui_wait && !shell_function_ui) + uint8_t local_flags = shell_function_flags; + if (ui_wait && !(local_flags & CMD_RUN_IN_UI)) local_func = 0; else { shell_function = 0; - shell_function_ui = false; + shell_function_flags = 0; // The shell sets OP_CONSOLE together with shell_function, a request without a // command (direct command, timed out command) has done its job: the sweep stopped operation_requested &= ~OP_CONSOLE; @@ -166,6 +183,10 @@ void shell_run_pending(bool ui_wait) if (local_func) { if (!ui_wait) // a UI wait loop keeps a pending touch or lever event operation_requested = OP_NONE; // otherwise commands will be aborted +#ifdef __UI_OFF__ + if (local_flags & CMD_UI_ON) // the command needs the user at the tinySA + set_ui(true); +#endif local_func(shell_nargs - 1, &shell_args[1]); if (ui_wait || operation_requested == OP_NONE) // Don't prompt if aborted @@ -315,6 +336,12 @@ static THD_FUNCTION(Thread1, arg) usb_disk_mode(); } #endif +#ifdef __UI_OFF__ + if (ui_off && !shell_check_connect()) { // an unplugged tinySA must not stay blind + set_ui(true); + ui_on_notice = false; // no PC to tell + } +#endif // START_PROFILE // Process UI inputs if (!(sweep_mode & SWEEP_SELFTEST)) @@ -1039,6 +1066,21 @@ VNA_SHELL_FUNCTION(cmd_release) #endif +#ifdef __UI_OFF__ +VNA_SHELL_FUNCTION(cmd_ui) +{ + if (argc == 0) { + shell_printf("ui %s" VNA_SHELL_NEWLINE_STR, ui_off ? "off" : "on"); + return; + } + int m = generic_option_cmd("ui", "off|on", argc, argv[0]); + if (m >= 0) { + set_ui(m); + ui_on_notice = false; // the PC asked for it + } +} +#endif + #ifdef TINYSA4 // Row y of the screen for a capture, y counting up from 0: the screen is read as one DMA stream, // the next row into the other half of buf (2 * LCD_WIDTH pixels) while the caller uses row y. @@ -2758,15 +2800,6 @@ typedef struct { } VNAShellCommand; #pragma pack(pop) -// Some commands can executed only in sweep thread, not in main cycle -#define CMD_WAIT_MUTEX 1 -#define CMD_RUN_IN_LOAD 2 -#define CMD_RUN_IN_UI 4 -#ifdef __USE_USB_MSC__ -#define CMD_DISK_OK 8 // allowed in USB DISK mode, does not use SPI1 or spi_buffer -#else -#define CMD_DISK_OK 0 -#endif static const VNAShellCommand commands[] = { {"version" , cmd_version , CMD_DISK_OK}, @@ -2799,8 +2832,8 @@ static const VNAShellCommand commands[] = {"zero" , cmd_zero , CMD_WAIT_MUTEX | CMD_RUN_IN_LOAD}, // Will set the scanraw measured value offset (128 or 174) {"sweep" , cmd_sweep , CMD_WAIT_MUTEX | CMD_RUN_IN_LOAD}, {"test" , cmd_test , 0}, - {"touchcal" , cmd_touchcal , CMD_WAIT_MUTEX}, - {"touchtest" , cmd_touchtest , CMD_WAIT_MUTEX}, + {"touchcal" , cmd_touchcal , CMD_WAIT_MUTEX | CMD_UI_ON}, + {"touchtest" , cmd_touchtest , CMD_WAIT_MUTEX | CMD_UI_ON}, {"pause" , cmd_pause , CMD_WAIT_MUTEX | CMD_RUN_IN_LOAD}, #ifdef TINYSA4 {"restart" , cmd_restart , CMD_WAIT_MUTEX | CMD_RUN_IN_LOAD}, @@ -2830,6 +2863,9 @@ static const VNAShellCommand commands[] = {"refresh" , cmd_refresh , CMD_DISK_OK}, {"touch" , cmd_touch , CMD_DISK_OK}, {"release" , cmd_release , CMD_DISK_OK}, +#endif +#ifdef __UI_OFF__ + {"ui" , cmd_ui , CMD_WAIT_MUTEX}, // draws: runs in the sweep thread #endif {"vbat" , cmd_vbat , CMD_WAIT_MUTEX}, // Uses same adc as touch!!!!! #ifdef ENABLE_VBAT_OFFSET_COMMAND @@ -2876,10 +2912,14 @@ static const VNAShellCommand commands[] = { "ext_gain", cmd_ext_gain, CMD_RUN_IN_LOAD}, { "output", cmd_output, CMD_RUN_IN_LOAD }, { "deviceid", cmd_deviceid, CMD_RUN_IN_LOAD }, +#ifdef __UI_OFF__ + { "selftest", cmd_selftest, CMD_WAIT_MUTEX | CMD_UI_ON }, // ui on: in the sweep thread +#else { "selftest", cmd_selftest, 0 }, +#endif { "correction", cmd_correction, CMD_RUN_IN_LOAD }, { "calc", cmd_calc, CMD_WAIT_MUTEX | CMD_RUN_IN_LOAD}, - { "menu", cmd_menu, CMD_WAIT_MUTEX | CMD_RUN_IN_LOAD }, + { "menu", cmd_menu, CMD_WAIT_MUTEX | CMD_RUN_IN_LOAD | CMD_UI_ON }, { "text", cmd_text, CMD_RUN_IN_LOAD}, { "remark", cmd_remark, CMD_RUN_IN_LOAD }, #ifdef ENABLE_SD_CARD_CMD @@ -3198,6 +3238,14 @@ static int VNAShell_readLine(char *line, int max_size) // static void VNAShell_executeLine(char *line) { +#ifdef __UI_OFF__ + // The UI came back without "ui on" (touch, jog, a command that needs the user): tell the PC + // here, in this thread before the reply, so it never splits other console output + if (ui_on_notice) { + ui_on_notice = false; + shell_printf("ui on" VNA_SHELL_NEWLINE_STR); + } +#endif // Execute line const VNAShellCommand *scp = VNAShell_parceLine(line); if (scp) { @@ -3232,7 +3280,7 @@ static void VNAShell_executeLine(char *line) } if (cmd_flag & CMD_WAIT_MUTEX) { chSysLock(); - shell_function_ui = cmd_flag & CMD_RUN_IN_UI; + shell_function_flags = cmd_flag; shell_function = scp->sc_function; operation_requested|=OP_CONSOLE; // this will abort current sweep to give priority to the new request chSysUnlock(); diff --git a/nanovna.h b/nanovna.h index e49a30f..11f1b13 100644 --- a/nanovna.h +++ b/nanovna.h @@ -119,6 +119,7 @@ #define __VBW__ #define __SWEEP_RESTART__ #define __BURST__ // Burst modulation: TIM8 on PB9 keys the OOK of the Si4468 (GPIO1, normally CTS) +#define __UI_OFF__ // ui off: no LCD drawing while a PC is in control, a touch gives the UI back // #define DIRECT_CORRECTION // Not enough space for config in one flash page. #define DB_PER_DEGREE_BELOW 0.056 #define DB_PER_DEGREE_ABOVE 0.069 @@ -419,7 +420,9 @@ extern freq_t ultra_start; //extern bool ultra; #endif #ifdef TINYSA4 -extern float measured_noise_figure; +#ifdef __NOISE_FIGURE__ +float noise_figure(void); +#endif extern float *drive_dBm; extern bool level_error; extern bool depth_error; @@ -1672,6 +1675,14 @@ void refresh_sweep_menu(int i); void save_to_sd(int mask); void drawMessageBox(const char *header, char *text, uint32_t delay); bool isFullScreenMode(void); +#ifdef __UI_OFF__ +extern bool ui_off; // the screen shows the ui off message, the drawing functions return at once +extern volatile bool ui_on_notice; +void set_ui(bool on); +#define UI_OFF ui_off +#else +#define UI_OFF false +#endif int btn_side(void); extern int si5351_available; diff --git a/plot.c b/plot.c index 9348ada..5230f8d 100644 --- a/plot.c +++ b/plot.c @@ -404,6 +404,24 @@ marker_to_value(const int i) return(v); } +#ifdef __NOISE_FIGURE__ +// Noise figure of marker 0 in the NF measurements, for the marker info and for nf_store +float noise_figure(void) +{ + float nf = marker_to_value(0) + 173.93f - nf_gain; // measured noise figure at 20C + if (setting.measurement != M_NF_TINYSA) { + float mnf = expf(nf/10.0f * logf(10.0f)); // measure noise factor + float tnf = expf(config.noise_figure/10.0f * logf(10.0f)); // tinySA noise factor + float amp_gain = expf(nf_gain/10.0f * logf(10.0f)); + float anf = mnf - (tnf - 1.0f)/amp_gain; + nf = 10.0f*logf(anf)/logf(10.0f); + } + // powf(10,x) = expf(x * logf(10)) + // log10f(x) = logf(x)/logf(10) + return nf; +} +#endif + #ifdef TINYSA3 float sa_sqrtf(const float x) { @@ -1391,6 +1409,7 @@ draw_cell(int m, int n) static void draw_all_cells(bool flush_markmap) { + if (UI_OFF) return; // redraw_marker(), redraw_trigger(): draw_all() is gated already int m, n; // START_PROFILE for (n = 0; n < (area_height+CELLHEIGHT-1) / CELLHEIGHT; n++){ @@ -1941,34 +1960,21 @@ static void cell_draw_marker_info(int x0, int y0) } #ifdef __NOISE_FIGURE__ } else if (i>=2 && (setting.measurement == M_NF_TINYSA || setting.measurement == M_NF_VALIDATE || setting.measurement == M_NF_AMPLIFIER) && markers[0].enabled) { - float aNP = 0; - aNP = marker_to_value(0); - measured_noise_figure = aNP + 173.93 - nf_gain; // measured noise figure at 20C - if (setting.measurement != M_NF_TINYSA) { - float mnf = expf(measured_noise_figure/10.0 * logf(10)); // measure noise factor - float tnf = expf(config.noise_figure/10.0 * logf(10.0)); // tinySA noise factor - float amp_gain = expf(nf_gain/10.0 * logf(10.0)); - float anf = mnf - (tnf - 1.0)/amp_gain; - measured_noise_figure = 10.0*logf(anf)/logf(10.0); - } - // powf(10,x) = expf(x * logf(10)) - // log10f(x) = logf(x)/logf(10) - - + float nf = noise_figure(); ili9341_set_foreground(marker_color(0)); // j = 1; int xpos = 1 + (j%2)*(WIDTH/2) + CELLOFFSETX - x0; int ypos = 1 + (j/2)*(16) - y0; if (setting.measurement == M_NF_TINYSA) { - cell_printf(xpos, ypos, FONT_b"TINYSA NF: %4.1f", measured_noise_figure); + cell_printf(xpos, ypos, FONT_b"TINYSA NF: %4.1f", nf); } else { if (setting.measurement == M_NF_VALIDATE) - cell_printf(xpos, ypos, FONT_b"TINYSA NF ERROR: %4.1f", measured_noise_figure); + cell_printf(xpos, ypos, FONT_b"TINYSA NF ERROR: %4.1f", nf); else - cell_printf(xpos, ypos, FONT_b"GAIN: %4.1fdB NF: %4.1f", nf_gain, measured_noise_figure); + cell_printf(xpos, ypos, FONT_b"GAIN: %4.1fdB NF: %4.1f", nf_gain, nf); } #ifdef __LEVEL_METER__ - plot_printf(level_text, sizeof(level_text), "%4.1f", measured_noise_figure); + plot_printf(level_text, sizeof(level_text), "%4.1f", nf); #endif break; @@ -2051,7 +2057,7 @@ draw_frequencies(void) { char buf1[40]; char buf2[32]; - if (MODE_OUTPUT(setting.mode)) // No frequencies during output + if (MODE_OUTPUT(setting.mode) || UI_OFF) // No frequencies during output or ui off return; if (current_menu_is_form() && !in_selftest) return; @@ -2207,6 +2213,7 @@ request_to_redraw_grid(void) void redraw_frame(void) { + if (UI_OFF) return; ili9341_set_background(LCD_BG_COLOR); ili9341_clear_screen(); draw_frequencies(); @@ -2473,7 +2480,7 @@ set_level_meter_or_waterfall(void) else graph_bottom = NO_WATERFALL; _grid_y = graph_bottom / NGRIDY; area_height = AREA_HEIGHT_NORMAL; - if (setting.waterfall != W_OFF || setting.level_meter){ + if ((setting.waterfall != W_OFF || setting.level_meter) && !UI_OFF){ ili9341_set_background(LCD_BG_COLOR); ili9341_fill(OFFSETX, graph_bottom, LCD_WIDTH - OFFSETX, CHART_BOTTOM - graph_bottom); } diff --git a/sa_cmd.c b/sa_cmd.c index 8d462fc..8c11736 100644 --- a/sa_cmd.c +++ b/sa_cmd.c @@ -426,9 +426,25 @@ VNA_SHELL_FUNCTION(cmd_level) set_level(f); } +#ifdef __UI_OFF__ +// The actual RBW and sweep time of changed settings. While paused the cal status calculates +// them, but with the UI off it does not draw. +static void update_actual_values(void) +{ + if (dirty) { + update_rbw(); + calculate_step_delay(); + setting.actual_sweep_time_us = calc_min_sweep_time_us(); + } +} +#endif + VNA_SHELL_FUNCTION(cmd_sweeptime) { if (argc != 1 || argv[0][0] == '?') { +#ifdef __UI_OFF__ + update_actual_values(); +#endif usage_printf("sweeptime 0.003..60\r\n%5.3Fs\r\n",((float)setting.actual_sweep_time_us)/ONE_SECOND_TIME); return; } @@ -618,6 +634,9 @@ VNA_SHELL_FUNCTION(cmd_rbw) { if (argc != 1 || argv[0][0] == '?') { usage: +#ifdef __UI_OFF__ + update_actual_values(); +#endif #ifdef TINYSA4 usage_printf("rbw 0.2..850|auto\r\n%.1FHz\r\n", actual_rbw_x10*100.0); #else @@ -1376,9 +1395,11 @@ again: dirty = true; // adc_stop_analog_watchdog(); int oldpos = 0; - ili9341_set_background(LCD_BG_COLOR); - ili9341_fill(OFFSETX, CHART_BOTTOM+1, WIDTH, 1); - ili9341_set_background(LCD_SWEEP_LINE_COLOR); + if (!UI_OFF) { // ui off: no progress bar + ili9341_set_background(LCD_BG_COLOR); + ili9341_fill(OFFSETX, CHART_BOTTOM+1, WIDTH, 1); + ili9341_set_background(LCD_SWEEP_LINE_COLOR); + } #define BUFFER_SIZE 64 uint8_t buf[BUFFER_SIZE]; int idx = 0; @@ -1395,7 +1416,7 @@ again: idx = 0; } int pos = i * (WIDTH+1) / points; - if (pos - oldpos > 8) { + if (pos - oldpos > 8 && !UI_OFF) { ili9341_fill(OFFSETX + oldpos, CHART_BOTTOM+1, pos - oldpos, 1); // update sweep progress bar oldpos = pos; } @@ -1405,8 +1426,10 @@ again: // adc_start_analog_watchdog(); if ((unbuffered & 2) && !operation_requested) goto again; - ili9341_set_background(LCD_BG_COLOR); - ili9341_fill(OFFSETX, CHART_BOTTOM+1, WIDTH, 1); + if (!UI_OFF) { + ili9341_set_background(LCD_BG_COLOR); + ili9341_fill(OFFSETX, CHART_BOTTOM+1, WIDTH, 1); + } setting.frequency_step = old_step; dirty = true; redraw_request = 0; // disable screen update in this mode diff --git a/ui.c b/ui.c index 305b206..6a92fbc 100644 --- a/ui.c +++ b/ui.c @@ -193,7 +193,44 @@ static void draw_button(uint16_t x, uint16_t y, uint16_t w, uint16_t h, ui_butto //svoid save_csv(uint8_t mask); //#endif +#ifdef __UI_OFF__ +bool ui_off = false; +volatile bool ui_on_notice = false; // the UI is back: "ui on" starts the next console reply + +// ui off: the screen shows a message and the console never waits for the screen. A touch or +// the jog (ui_process), ui on, a command that needs the user (CMD_UI_ON), USB DISK mode or a +// lost connection give the UI back. +void set_ui(bool on) +{ + if (on == !ui_off) // no change + return; + if (on) { + ui_off = false; + ui_on_notice = true; // cleared by "ui on" and a lost connection: no need to tell + redraw_frame(); + request_to_redraw_grid(); + if (ui_mode != UI_NORMAL) // the menu of the output modes + draw_menu(); + return; + } + static const char msg[] = "Remote only mode. Touch screen to enable UI"; + int w = 0; + for (const char *p = msg; *p; p++) + w += wFONT_GET_WIDTH(*p); +#ifdef __SD_FILE_BROWSER__ + if (ui_mode == UI_BROWSER) // set_ui(true) can not redraw the browser + ui_mode_normal(); +#endif + ili9341_set_foreground(LCD_FG_COLOR); + ili9341_set_background(LCD_BG_COLOR); + ili9341_clear_screen(); + ili9341_drawstring_10x14(msg, (LCD_WIDTH - w)/2, (LCD_HEIGHT - wFONT_GET_HEIGHT)/2); + ui_off = true; +} +#endif + bool isFullScreenMode(void) { + if (UI_OFF) return true; // draw_all() and the sweep progress bar draw nothing #ifdef __SD_FILE_BROWSER__ return ui_mode == UI_BROWSER; #else @@ -1880,8 +1917,6 @@ UI_FUNCTION_CALLBACK(menu_curve_confirm_cb) menu_move_back(false); } -float measured_noise_figure; - #if 0 UI_FUNCTION_CALLBACK(menu_noise_figure_confirm_cb) { @@ -3038,6 +3073,11 @@ static UI_FUNCTION_ADV_CALLBACK(menu_measure_acb) return; } menu_move_back(false); +#ifdef __NOISE_FIGURE__ + // Store the NF of a running TINYSA NF measurement: here, before markers_reset(), as the marker + // info would show it (with the UI off nothing draws it) + float nf = (data == M_NF_STORE && setting.measurement == M_NF_TINYSA) ? noise_figure() : 0; +#endif markers_reset(); if ((data != M_OFF && setting.measurement != M_OFF) || data == M_OFF ) @@ -3262,8 +3302,8 @@ static UI_FUNCTION_ADV_CALLBACK(menu_measure_acb) nf_gain = 0; goto noise_figure; case M_NF_STORE: - if (measured_noise_figure > 2 && measured_noise_figure < 20) { - config.noise_figure = measured_noise_figure; + if (nf > 2 && nf < 20) { + config.noise_figure = nf; config_save(); data = M_NF_VALIDATE; // Continue to validate goto validate; @@ -4520,6 +4560,9 @@ void usb_disk_mode(void) if ((disk_initialize(0) & STA_NOINIT) || disk_ioctl(0, GET_SECTOR_COUNT, &blocks) != RES_OK || blocks == 0) error = "SD card error"; } +#ifdef __UI_OFF__ + set_ui(true); // this screen needs the user +#endif ili9341_set_foreground(LCD_FG_COLOR); ili9341_set_background(LCD_BG_COLOR); ili9341_clear_screen(); @@ -6582,6 +6625,7 @@ const char *month[] = { "Jan", "Feb", "Mar","Apr","May","Jun","Jul","Aug","Sep", void draw_cal_status(void) { + if (UI_OFF) return; #define BLEN 7 char buf[BLEN+1]; buf[6]=0; @@ -7163,6 +7207,12 @@ draw_button(uint16_t x, uint16_t y, uint16_t w, uint16_t h, ui_button_t *b) } void drawMessageBox(const char *header, char *text, uint32_t delay){ +#ifdef __UI_OFF__ + if (ui_off) { // the PC in control gets the message, without the delay + shell_printf("%s: %s\r\n", header, text); + return; + } +#endif ui_button_t b; b.bg = LCD_MENU_COLOR; b.fg = LCD_MENU_TEXT_COLOR; @@ -7424,6 +7474,7 @@ static const uint8_t check_box[] = { static void draw_menu_buttons(const menuitem_t *menu, uint32_t mask) { + if (UI_OFF) return; int i, y; ui_button_t button; const menuitem_t *m = menu; @@ -7840,7 +7891,7 @@ leave_ui_mode() if (setting.waterfall) set_level_meter_or_waterfall(); #ifdef __LEVEL_METER__ - if (setting.level_meter) + if (setting.level_meter && !UI_OFF) ili9341_fill(LCD_WIDTH-MENU_BUTTON_WIDTH, area_height, MENU_BUTTON_WIDTH, menu_button_height*MENU_BUTTON_MAX - area_height); #endif redraw_request|=REDRAW_AREA | REDRAW_FREQUENCY | REDRAW_CAL_STATUS | REDRAW_BATTERY; @@ -8834,7 +8885,7 @@ ui_process(void) { #ifdef __USE_SD_CARD__ // SD icon repeat, only from the normal screen: a capture would close an open menu - if (sd_repeat && setting.interval && ui_mode == UI_NORMAL && + if (sd_repeat && setting.interval && ui_mode == UI_NORMAL && !UI_OFF && chVTGetSystemTimeX() - sd_repeat_start >= (systime_t)setting.interval * CH_CFG_ST_FREQUENCY) sd_icon_save(); #endif @@ -8844,9 +8895,17 @@ ui_process(void) selection = -1; // hide keyboard mode selection ui_mode_menu(); } +#ifdef __UI_OFF__ + bool wake = false; // ui off: a jog press or a touch only gives the UI back +#endif // Clear only the handled request: the shell may have set OP_CONSOLE meanwhile for a // waiting command, without it an output mode sweep never stops to run that command if ((operation_requested&OP_LEVER) || previous_button_state != button_state) { +#ifdef __UI_OFF__ + if (ui_off) + wake = btn_check() != 0; // a press, also left or right, the release is no event + else +#endif ui_process_lever(); previous_button_state = button_state; chSysLock(); @@ -8854,11 +8913,23 @@ ui_process(void) chSysUnlock(); } if (operation_requested&OP_TOUCH) { +#ifdef __UI_OFF__ + if (ui_off) { + if (touch_check() != EVT_TOUCH_NONE) { + touch_wait_release(); + wake = true; + } + } else +#endif ui_process_touch(); chSysLock(); operation_requested &= ~OP_TOUCH; chSysUnlock(); } +#ifdef __UI_OFF__ + if (wake) + set_ui(true); +#endif touch_start_watchdog(); } From dc5566601a61d1cc7e45fc20dea04e710476e860 Mon Sep 17 00:00:00 2001 From: erikkaashoek Date: Thu, 12 Nov 2026 08:24:19 +0100 Subject: [PATCH 2/9] USB DISK mode: redraw the generator menu on exit (Ultra) In an output mode ui_mode_normal() keeps the form menu open, but the exit only redrew the frame and the grid, so the screen stayed empty until a touch. The exit now uses the redraw of ui on: frame, grid and an open menu. --- ui.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/ui.c b/ui.c index 6a92fbc..bef7db2 100644 --- a/ui.c +++ b/ui.c @@ -193,6 +193,17 @@ static void draw_button(uint16_t x, uint16_t y, uint16_t w, uint16_t h, ui_butto //svoid save_csv(uint8_t mask); //#endif +#if defined(__UI_OFF__) || defined(__USE_USB_MSC__) +// Redraw the screen after a full screen message: frame, grid and an open menu (output modes) +static void redraw_ui(void) +{ + redraw_frame(); + request_to_redraw_grid(); + if (ui_mode != UI_NORMAL) + draw_menu(); +} +#endif + #ifdef __UI_OFF__ bool ui_off = false; volatile bool ui_on_notice = false; // the UI is back: "ui on" starts the next console reply @@ -207,10 +218,7 @@ void set_ui(bool on) if (on) { ui_off = false; ui_on_notice = true; // cleared by "ui on" and a lost connection: no need to tell - redraw_frame(); - request_to_redraw_grid(); - if (ui_mode != UI_NORMAL) // the menu of the output modes - draw_menu(); + redraw_ui(); return; } static const char msg[] = "Remote only mode. Touch screen to enable UI"; @@ -4608,9 +4616,8 @@ void usb_disk_mode(void) msc_disk_mode = false; touch_wait_release(); dirty = true; // Restore MCU clock and hardware settings on the next sweep - ui_mode_normal(); - redraw_frame(); - request_to_redraw_grid(); + ui_mode_normal(); // the form menu of the output modes stays open + redraw_ui(); } static UI_FUNCTION_CALLBACK(menu_usb_disk_cb) { From a267e7c876cabc5b9b5caee67ea5e1bfb50d8675 Mon Sep 17 00:00:00 2001 From: erikkaashoek Date: Thu, 12 Nov 2026 08:24:30 +0100 Subject: [PATCH 3/9] Changelog: V1.4315 ui on|off console command (tinySA ULTRA) --- changelog.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/changelog.txt b/changelog.txt index f756ed3..0b0e5cf 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,8 @@ +V1.4315 2026-11-12 For all tinySA Ultra models +- Console: "ui off" stops all drawing on the screen while a PC is in control, so commands no longer wait for the screen to be redrawn. The screen shows "Remote only mode. Touch screen to enable UI". A touch or a jog press gives the UI back, as do "ui on", unplugging USB, USB DISK mode and the commands that need the user (selftest, touchcal, touchtest, menu); the console then sends "ui on" before the reply to the next command. While the UI is off, messages such as errors go to the console. "ui" shows the state. It is not stored in the config or in presets and stays off when the mode changes +- STORE TINYSA NF only stores the noise figure of MEASURE TINYSA NF: after VALIDATE TINYSA NF or MEASURE AMP NF it stored a wrong value +- Leaving USB DISK mode in the signal generator shows the generator menu again, the screen stayed empty + V1.4311 2026-11-11 For all tinySA models - Console: "measure {mode} [value]..." starts a measurement of the MEASURE menu, the values the menu asks for are the arguments, e.g. "measure channel_power 5800M 20M". Modes: off|harmonic|oip3|phase_noise|snr|3db_width|occupied_width|am|fm|thd|channel_power|linear, on the Ultra also nf_tinysa|nf_store|nf_validate|nf_amp - Console: "recall defaults" loads the factory settings in low input mode, as PRESET > LOAD DEFAULTS, but does not store them as the startup preset From f2fc3311ae55cdedae696f7324a463455a9ca582 Mon Sep 17 00:00:00 2001 From: erikkaashoek Date: Thu, 12 Nov 2026 10:18:22 +0100 Subject: [PATCH 4/9] scanraw: no hardware setup for a new frequency step perform() now also sets up the first point when the frequency step changed, not only when dirty: the part that depends on the step (RBW and its sub-steps, step delay, RSSI correction of the RBW, sweep time estimate) for a new step, the hardware (radios, switches, MCU clock, correction tables) only when dirty. scanraw no longer sets dirty itself, so it skips the hardware setup (the basic power cycles and re-initializes both SI4432, about 80 ms) and the redraw that its dirty caused after it. Zero span keeps dirty: its series of RSSI samples needs the full setup at its frequency. A single zero span point is measured as in a sweep, with a step of half the RBW, instead of filling the RSSI buffer of a whole zero span sweep (40 ms on the Ultra). --- sa_cmd.c | 13 +++++++++++-- sa_core.c | 27 ++++++++++++++++++--------- 2 files changed, 29 insertions(+), 11 deletions(-) diff --git a/sa_cmd.c b/sa_cmd.c index 8c11736..6def7ca 100644 --- a/sa_cmd.c +++ b/sa_cmd.c @@ -1390,9 +1390,17 @@ VNA_SHELL_FUNCTION(cmd_scanraw) freq_t old_step = setting.frequency_step; float f_step = (stop-start)/ points; setting.frequency_step = (freq_t)f_step; + // perform() recalculates for a new frequency step itself. Zero span measures a series of RSSI + // samples at one frequency, which needs a full setup, also for the sweep after it. + bool zero_span = setting.frequency_step == 0; + if (zero_span && points == 1) { // one point as in a sweep: one measurement, auto RBW as in zero span + setting.frequency_step = setting.rbw_x10 ? setting.rbw_x10*50 : 300000; + zero_span = false; + } again: operation_requested = false; - dirty = true; + if (zero_span) + dirty = true; // adc_stop_analog_watchdog(); int oldpos = 0; if (!UI_OFF) { // ui off: no progress bar @@ -1431,7 +1439,8 @@ again: ili9341_fill(OFFSETX, CHART_BOTTOM+1, WIDTH, 1); } setting.frequency_step = old_step; - dirty = true; + if (zero_span) + dirty = true; redraw_request = 0; // disable screen update in this mode } diff --git a/sa_core.c b/sa_core.c index 4d3a8f6..f6b5827 100644 --- a/sa_core.c +++ b/sa_core.c @@ -3715,6 +3715,7 @@ bool depth_error = false; #endif +static freq_t setup_frequency_step; // frequency step the first point of perform() was set up for pureRSSI_t perform(bool break_on_operation, int i, freq_t f, int tracking) // Measure the RSSI for one frequency, used from sweep and other measurement routines. Must do all HW setup { @@ -3735,7 +3736,11 @@ pureRSSI_t perform(bool break_on_operation, int i, freq_t f, int tracking) / } #endif TRACE(10); - if (i == 0 && dirty ) { // if first point in scan and dirty + // First point after a change of settings (dirty) or of the frequency step (scanraw, the sweep + // after it): only dirty sets up the hardware, which takes about 80 ms on the tinySA basic + if (i == 0 && (dirty || setting.frequency_step != setup_frequency_step)) { + const bool hw = dirty; + if (hw) { #ifdef __ADF4351__ clear_frequency_cache(); #endif @@ -3749,15 +3754,17 @@ pureRSSI_t perform(bool break_on_operation, int i, freq_t f, int tracking) / PE4302_Write_Byte((int)(setting.attenuate_x2)); #endif set_calibration_freq(setting.refer); - update_rbw(); - calculate_step_delay(); prev_output_level_dBm = MIN_RSSI_VALUE; // clear cached level setting - // Initialize HW - scandirty = true; // This is the first pass with new settings for (int t=0;t Date: Thu, 12 Nov 2026 10:32:18 +0100 Subject: [PATCH 5/9] Zero span: drop RSSI samples left in the buffer at a new setup The zero span fill measures sweep_points RSSI samples and the following reads return them until the buffer is used up. A reader that stopped early, such as scanraw with fewer points than the sweep or an aborted sweep, left samples of its frequency and RBW behind, and the next scanraw or sweep returned them for its first points (a 29-31 MHz scanraw after a 290 point zero span scanraw showed the noise of a 600 kHz RBW at 30 MHz). The first point after a change of settings or frequency step now clears them. --- sa_core.c | 10 ++++++++++ si4432.c | 5 +++++ si4432.h | 2 ++ si4468.c | 5 +++++ 4 files changed, 22 insertions(+) diff --git a/sa_core.c b/sa_core.c index f6b5827..1db339a 100644 --- a/sa_core.c +++ b/sa_core.c @@ -3765,6 +3765,16 @@ pureRSSI_t perform(bool break_on_operation, int i, freq_t f, int tracking) / update_rbw(); calculate_step_delay(); scandirty = true; // This is the first pass with new settings +#ifdef __FAST_SWEEP__ + // A zero span reader that stopped early (scanraw with fewer points, an abort) left RSSI + // samples of its own frequency and RBW in the buffer, the next reads would return them +#ifdef __SI4432__ + SI4432_Fill_clear(); +#endif +#ifdef __SI4463__ + SI446x_Fill_clear(); +#endif +#endif // Set for actual time pre calculated value (update after sweep) setting.actual_sweep_time_us = calc_min_sweep_time_us(); // Change actual sweep time as user input if it greater minimum diff --git a/si4432.c b/si4432.c index 2661a02..56e568d 100644 --- a/si4432.c +++ b/si4432.c @@ -709,6 +709,11 @@ void SI4432_Fill(int s, int start) buf_end = sweep_points - 1; buf_read = true; } + +void SI4432_Fill_clear(void) // drop the samples a zero span reader did not use +{ + buf_read = false; +} #endif #ifdef __LISTEN__ diff --git a/si4432.h b/si4432.h index 5105ca9..deeebce 100644 --- a/si4432.h +++ b/si4432.h @@ -140,6 +140,7 @@ uint16_t set_rbw(uint16_t WISH); void set_calibration_freq(int freq); #ifdef __FAST_SWEEP__ void SI4432_Fill(int s, int start); +void SI4432_Fill_clear(void); void SI4432_trigger_fill(int s, uint8_t trigger_lvl, int up_direction, int trigger_mode); #if 0 int SI4432_is_fast_mode(void); @@ -194,6 +195,7 @@ extern si446x_info_t SI4463_info; pureRSSI_t getSI4463_RSSI_correction(void); void Si446x_getInfo(si446x_info_t* info); void SI446x_Fill(int s, int start); +void SI446x_Fill_clear(void); void SI446x_trigger_fill(int s, uint8_t trigger_lvl, int up_direction, int trigger_mode); void SI4463_init(void); void set_calibration_freq(int freq); diff --git a/si4468.c b/si4468.c index 8a8335c..3198f95 100644 --- a/si4468.c +++ b/si4468.c @@ -2205,6 +2205,11 @@ void SI446x_Fill(int s, int start) buf_end = sweep_points - 1; buf_read = true; } + +void SI446x_Fill_clear(void) // drop the samples a zero span reader did not use +{ + buf_read = false; +} #endif #ifdef __LISTEN__ From 7ea574948e0e80c909f5a9c4c488194805a7f7c4 Mon Sep 17 00:00:00 2001 From: erikkaashoek Date: Thu, 12 Nov 2026 13:50:25 +0100 Subject: [PATCH 6/9] Console: ui off "text" shows a line under the ui off message (Ultra) The text identifies a tinySA, e.g. the tracking generator and the spectrum analyzer when a PC uses two tinySA. ui off "text" draws the screen again, also when the UI is off already, so a new text replaces the old one; a plain ui off keeps the text and ui off "" removes it. Characters outside the font show as '?', characters beyond the screen width are left out (39 characters fit the console line, 39 wide ones not the screen). --- main.c | 13 +++++++++---- nanovna.h | 1 + ui.c | 34 +++++++++++++++++++++++++++++----- 3 files changed, 39 insertions(+), 9 deletions(-) diff --git a/main.c b/main.c index 6efb6b0..0767e9c 100644 --- a/main.c +++ b/main.c @@ -1073,11 +1073,16 @@ VNA_SHELL_FUNCTION(cmd_ui) shell_printf("ui %s" VNA_SHELL_NEWLINE_STR, ui_off ? "off" : "on"); return; } - int m = generic_option_cmd("ui", "off|on", argc, argv[0]); - if (m >= 0) { - set_ui(m); - ui_on_notice = false; // the PC asked for it + int m = get_str_index(argv[0], "off|on"); + if (m < 0 || argc > 2 || (argc == 2 && m)) { + usage_printf("ui [off [\"text\"]|on]" VNA_SHELL_NEWLINE_STR); + return; } + if (argc == 2) + set_ui_text(argv[1]); // a line under the message, e.g. "Tracking generator" + else + set_ui(m); + ui_on_notice = false; // the PC asked for it } #endif diff --git a/nanovna.h b/nanovna.h index 11f1b13..8aba95c 100644 --- a/nanovna.h +++ b/nanovna.h @@ -1679,6 +1679,7 @@ bool isFullScreenMode(void); extern bool ui_off; // the screen shows the ui off message, the drawing functions return at once extern volatile bool ui_on_notice; void set_ui(bool on); +void set_ui_text(char *text); #define UI_OFF ui_off #else #define UI_OFF false diff --git a/ui.c b/ui.c index bef7db2..df38e86 100644 --- a/ui.c +++ b/ui.c @@ -208,6 +208,15 @@ static void redraw_ui(void) bool ui_off = false; volatile bool ui_on_notice = false; // the UI is back: "ui on" starts the next console reply +// A centered line of the ui off screen: 0 the message, 1 the text of ui off "text" +static void ui_off_line(const char *s, int line) +{ + int w = 0; + for (const char *p = s; *p; p++) + w += wFONT_GET_WIDTH(*p); + ili9341_drawstring_10x14(s, (LCD_WIDTH - w)/2, (LCD_HEIGHT - wFONT_GET_HEIGHT)/2 + line*2*wFONT_STR_HEIGHT); +} + // ui off: the screen shows a message and the console never waits for the screen. A touch or // the jog (ui_process), ui on, a command that needs the user (CMD_UI_ON), USB DISK mode or a // lost connection give the UI back. @@ -221,10 +230,6 @@ void set_ui(bool on) redraw_ui(); return; } - static const char msg[] = "Remote only mode. Touch screen to enable UI"; - int w = 0; - for (const char *p = msg; *p; p++) - w += wFONT_GET_WIDTH(*p); #ifdef __SD_FILE_BROWSER__ if (ui_mode == UI_BROWSER) // set_ui(true) can not redraw the browser ui_mode_normal(); @@ -232,9 +237,28 @@ void set_ui(bool on) ili9341_set_foreground(LCD_FG_COLOR); ili9341_set_background(LCD_BG_COLOR); ili9341_clear_screen(); - ili9341_drawstring_10x14(msg, (LCD_WIDTH - w)/2, (LCD_HEIGHT - wFONT_GET_HEIGHT)/2); + ui_off_line("Remote only mode. Touch screen to enable UI", 0); ui_off = true; } + +// ui off "text": the ui off screen with a line under the message, also when the UI is off +// already, e.g. to tell the TG from the SA in a tracking generator setup of two tinySA +void set_ui_text(char *text) +{ + int w = 0; + for (char *p = text; *p; p++) { + if ((uint8_t)*p > '~') // not in the font + *p = '?'; + w += wFONT_GET_WIDTH(*p); + if (w > LCD_WIDTH) { // only the characters that fit on the screen + *p = 0; + break; + } + } + ui_off = false; // draw the screen again + set_ui(false); + ui_off_line(text, 1); +} #endif bool isFullScreenMode(void) { From c2c35978b946406529cefa573915ec9496415ca2 Mon Sep 17 00:00:00 2001 From: erikkaashoek Date: Thu, 12 Nov 2026 16:32:29 +0100 Subject: [PATCH 7/9] ui off: an unplugged USB cable gives the UI back, also in an output mode (Ultra) On the bench unplugging the generator left the UI off until the jog was pressed. The USB state check was right (an ST-Link monitor showed USB_SUSPENDED for the whole unplug), but an output mode repeats its sweep until an operation is requested, so the sweep loop never got to the check. The USB suspend event now requests one (OP_CONSOLE) while the UI is off. --- main.c | 4 +++- usbcfg.c | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index 0767e9c..6a725bc 100644 --- a/main.c +++ b/main.c @@ -337,7 +337,9 @@ static THD_FUNCTION(Thread1, arg) } #endif #ifdef __UI_OFF__ - if (ui_off && !shell_check_connect()) { // an unplugged tinySA must not stay blind + // An unplugged tinySA must not stay blind. The USB suspend also stops the endless sweep of + // an output mode (usbcfg.c), else this would only run after the next touch or command. + if (ui_off && !shell_check_connect()) { set_ui(true); ui_on_notice = false; // no PC to tell } diff --git a/usbcfg.c b/usbcfg.c index 7333816..b5f4387 100644 --- a/usbcfg.c +++ b/usbcfg.c @@ -422,6 +422,12 @@ static void usb_event(USBDriver *usbp, usbevent_t event) { /* Disconnection event on suspend.*/ sduDisconnectI(&SDU1); +#ifdef __UI_OFF__ + /* ui off: the sweep loop gives the UI back without the PC, but an output mode + keeps sweeping until an operation is requested.*/ + if (ui_off) + operation_requested |= OP_CONSOLE; +#endif chSysUnlockFromISR(); return; From 7334ad147c5a40c91e302cfea7b1490af2cc41a8 Mon Sep 17 00:00:00 2001 From: erikkaashoek Date: Thu, 12 Nov 2026 16:48:44 +0100 Subject: [PATCH 8/9] ui off: no "ui on" notice in front of a binary reply (Ultra) A wake while a command waits puts the notice in front of the next reply. In front of the pixels of capture, the samples of scanraw or the file of sd_read it shifted the data (a bench capture came 7 bytes off). These commands now have the flag CMD_BINARY, the notice then waits for the next text reply. --- main.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/main.c b/main.c index 6a725bc..5b16396 100644 --- a/main.c +++ b/main.c @@ -76,8 +76,10 @@ static volatile uint8_t shell_function_flags; // CMD_xxx of shell_function: CMD_ #endif #ifdef __UI_OFF__ #define CMD_UI_ON 16 // needs the user at the tinySA: ui on before it runs (with CMD_WAIT_MUTEX) +#define CMD_BINARY 32 // binary reply: no "ui on" notice in front of it #else #define CMD_UI_ON 0 +#define CMD_BINARY 0 #endif //#define ENABLED_DUMP @@ -2834,7 +2836,7 @@ static const VNAShellCommand commands[] = #ifdef TINYSA4 {"hop" , cmd_hop , CMD_WAIT_MUTEX}, #endif - {"scanraw" , cmd_scanraw , CMD_WAIT_MUTEX}, + {"scanraw" , cmd_scanraw , CMD_WAIT_MUTEX | CMD_BINARY}, {"abort" , cmd_abort , 0}, {"zero" , cmd_zero , CMD_WAIT_MUTEX | CMD_RUN_IN_LOAD}, // Will set the scanraw measured value offset (128 or 174) {"sweep" , cmd_sweep , CMD_WAIT_MUTEX | CMD_RUN_IN_LOAD}, @@ -2865,7 +2867,7 @@ static const VNAShellCommand commands[] = {"usart" , cmd_usart , CMD_WAIT_MUTEX}, {"usart_cfg" , cmd_usart_cfg , CMD_WAIT_MUTEX | CMD_RUN_IN_LOAD}, #endif - {"capture" , cmd_capture , CMD_WAIT_MUTEX | CMD_RUN_IN_UI}, + {"capture" , cmd_capture , CMD_WAIT_MUTEX | CMD_RUN_IN_UI | CMD_BINARY}, #ifdef __REMOTE_DESKTOP__ {"refresh" , cmd_refresh , CMD_DISK_OK}, {"touch" , cmd_touch , CMD_DISK_OK}, @@ -2931,7 +2933,7 @@ static const VNAShellCommand commands[] = { "remark", cmd_remark, CMD_RUN_IN_LOAD }, #ifdef ENABLE_SD_CARD_CMD { "sd_list", cmd_sd_list, CMD_WAIT_MUTEX }, - { "sd_read", cmd_sd_read, CMD_WAIT_MUTEX }, + { "sd_read", cmd_sd_read, CMD_WAIT_MUTEX | CMD_BINARY }, { "sd_delete", cmd_sd_delete, CMD_WAIT_MUTEX }, #endif #ifdef __USE_USB_MSC__ @@ -3245,16 +3247,17 @@ static int VNAShell_readLine(char *line, int max_size) // static void VNAShell_executeLine(char *line) { + // Execute line + const VNAShellCommand *scp = VNAShell_parceLine(line); #ifdef __UI_OFF__ // The UI came back without "ui on" (touch, jog, a command that needs the user): tell the PC - // here, in this thread before the reply, so it never splits other console output - if (ui_on_notice) { + // here, in this thread before the reply, so it never splits other console output. Not in + // front of binary data, that would shift it: then before the next text reply. + if (ui_on_notice && !(scp && (scp->flags & CMD_BINARY))) { ui_on_notice = false; shell_printf("ui on" VNA_SHELL_NEWLINE_STR); } #endif - // Execute line - const VNAShellCommand *scp = VNAShell_parceLine(line); if (scp) { uint16_t cmd_flag = scp->flags; #ifdef __USE_USB_MSC__ From 4823c39c063dc3142943dadf3eab48cef6520fec Mon Sep 17 00:00:00 2001 From: erikkaashoek Date: Thu, 12 Nov 2026 17:29:27 +0100 Subject: [PATCH 9/9] Changelog: V1.4321 ui on|off, scanraw speed-up, zero span buffer fix --- changelog.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/changelog.txt b/changelog.txt index 0b0e5cf..9b6ddf9 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,7 +1,9 @@ -V1.4315 2026-11-12 For all tinySA Ultra models -- Console: "ui off" stops all drawing on the screen while a PC is in control, so commands no longer wait for the screen to be redrawn. The screen shows "Remote only mode. Touch screen to enable UI". A touch or a jog press gives the UI back, as do "ui on", unplugging USB, USB DISK mode and the commands that need the user (selftest, touchcal, touchtest, menu); the console then sends "ui on" before the reply to the next command. While the UI is off, messages such as errors go to the console. "ui" shows the state. It is not stored in the config or in presets and stays off when the mode changes -- STORE TINYSA NF only stores the noise figure of MEASURE TINYSA NF: after VALIDATE TINYSA NF or MEASURE AMP NF it stored a wrong value -- Leaving USB DISK mode in the signal generator shows the generator menu again, the screen stayed empty +V1.4321 2026-11-12 For all tinySA models +- Console: "ui off" stops all drawing on the screen while a PC is in control, so commands no longer wait for the screen to be redrawn (e.g. 2 ms instead of about 120 ms after a setting). The screen shows "Remote only mode. Touch screen to enable UI", "ui off "text"" adds a line under it, e.g. to tell the tracking generator from the analyzer when a PC uses two tinySA. A touch or a jog press gives the UI back, as do "ui on", unplugging USB, USB DISK mode and the commands that need the user (selftest, touchcal, touchtest, menu); the console then sends "ui on" before the next text reply. While the UI is off, messages such as errors go to the console. "ui" shows the state. It is not stored in the config or in presets and stays off when the mode changes (Ultra only) +- Console: "scanraw" no longer sets up the hardware again for every scan, only the RBW and timing of its frequency step: a one point scanraw takes about 2 ms instead of 86 ms on the tinySA basic, and the screen is no longer redrawn after each scanraw. "scanraw {f} {f} 1" (one point at one frequency) takes 2 ms instead of 93 ms on the tinySA basic and 6 ms instead of 40 ms on the Ultra +- Console: after a zero span "scanraw" with fewer points than the sweep, or an aborted zero span sweep, the next scanraw or sweep returned the remaining zero span samples for its first points, so a signal could be missing +- STORE TINYSA NF only stores the noise figure of MEASURE TINYSA NF: after VALIDATE TINYSA NF or MEASURE AMP NF it stored a wrong value (Ultra only) +- Leaving USB DISK mode in the signal generator shows the generator menu again, the screen stayed empty (Ultra only) V1.4311 2026-11-11 For all tinySA models - Console: "measure {mode} [value]..." starts a measurement of the MEASURE menu, the values the menu asks for are the arguments, e.g. "measure channel_power 5800M 20M". Modes: off|harmonic|oip3|phase_noise|snr|3db_width|occupied_width|am|fm|thd|channel_power|linear, on the Ultra also nf_tinysa|nf_store|nf_validate|nf_amp