From 02c057c562007ac05ccaa1d624fcf705a2b403a6 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Fri, 12 Sep 2025 17:22:45 +0300 Subject: [PATCH 1/4] Fix multi-band settings application --- main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index e85dcee..622da6e 100644 --- a/main.c +++ b/main.c @@ -1619,8 +1619,10 @@ void update_bands(void) _f_band_index[idx] = b; setting.bands[b].stop_index = idx; idx++; - if (idx >= sweep_points) - return; + if (idx >= sweep_points) { + b = BANDS_MAX; // exit both loops + break; + } } else { b++; From 79221302b3ba95169d9be4d86c047363096b39f2 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Fri, 12 Sep 2025 10:53:23 +0300 Subject: [PATCH 2/4] Make multi-band and measurement main screen indications interactive Clicking on them opens corresponding menu, i.e., bands submenu or submenu with active measurement --- ui.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/ui.c b/ui.c index e0d52c7..3fe0602 100644 --- a/ui.c +++ b/ui.c @@ -6228,14 +6228,20 @@ redraw_cal_status: if (setting.multi_band){ ili9341_set_foreground(LCD_BRIGHT_COLOR_GREEN); lcd_printf(x, y, "MULTI"); - y += 2*YSTEP + YSTEP/2; + y = add_quick_menu(y+= YSTEP, (menuitem_t *)menu_band_select); } #endif #ifdef TINYSA4 - if (setting.measurement != M_OFF){ + const uint8_t measurement = setting.measurement; + if (measurement != M_OFF) { ili9341_set_foreground(LCD_BRIGHT_COLOR_GREEN); - lcd_printf(x, y, measurement_text[setting.measurement]); - y += 2*YSTEP + YSTEP/2; + lcd_printf(x, y, measurement_text[measurement]); + const menuitem_t *measurement_menuitem = measurement < M_LINEARITY + ? menu_measure + : (measurement < M_NF_TINYSA + ? menu_measure2 + : menu_measure_noise_figure); + y = add_quick_menu(y += YSTEP, (menuitem_t *)measurement_menuitem); } #endif From 3a006f5312610c29fdacd4c145d74303c793e402 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sun, 28 Sep 2025 12:28:31 +0300 Subject: [PATCH 3/4] Show sweep progress bar on spectrum analyzer screen only * Hide progress bar in file browser * Hide progress bar in form/fullscreen menu * Do not clear progress bar when it was not drawn. This is the case with file browser when previous or next page button is held but not released --- sa_core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sa_core.c b/sa_core.c index a0053df..dcff7e2 100644 --- a/sa_core.c +++ b/sa_core.c @@ -5095,7 +5095,8 @@ static bool sweep(bool break_on_operation) #endif } - bool show_bar = ( MODE_INPUT(setting.mode) || setting.frequency_step != 0 || setting.level_sweep != 0.0 ? true : false); + bool show_bar = ( MODE_INPUT(setting.mode) || setting.frequency_step != 0 || setting.level_sweep != 0.0 ) + && !isFullScreenMode() && !current_menu_is_form(); #if 0 #ifdef TINYSA4 @@ -5205,7 +5206,7 @@ static bool sweep(bool break_on_operation) #ifdef TINYSA4 progress_bar && #endif - setting.actual_sweep_time_us > ONE_SECOND_TIME /* && MODE_INPUT(setting.mode) */) { + show_bar && setting.actual_sweep_time_us > ONE_SECOND_TIME /* && MODE_INPUT(setting.mode) */) { ili9341_set_background(LCD_BG_COLOR); ili9341_fill(OFFSETX, CHART_BOTTOM+1, WIDTH, 1); // Erase progress bar #ifdef __SWEEP_RESTART__ From 77289e0bc01e9fcbb7adf3a996a4efa69e7af321 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Wed, 1 Oct 2025 16:12:27 +0300 Subject: [PATCH 4/4] Fix erasure of progress bar when it should not be visible When long sweep completes, a black line appeared at the bottom of the screen Also, the same issue occurred even with progress bar turned off This commit amends 3a006f5312610c29fdacd4c145d74303c793e402, erikkaashoek/tinySA#145 --- sa_core.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sa_core.c b/sa_core.c index dcff7e2..66ca456 100644 --- a/sa_core.c +++ b/sa_core.c @@ -5629,7 +5629,11 @@ static volatile int dummy; } // scandirty = true; // To show trigger happened } - if (setting.actual_sweep_time_us > ONE_SECOND_TIME /* && MODE_INPUT(setting.mode) */) { + if ( +#ifdef TINYSA4 + progress_bar && +#endif + show_bar && setting.actual_sweep_time_us > ONE_SECOND_TIME /* && MODE_INPUT(setting.mode) */) { // ili9341_fill(OFFSETX, CHART_BOTTOM+1, WIDTH, 1, 0); // Erase progress bar before updating actual_sweep_time ili9341_set_background(LCD_BG_COLOR); ili9341_fill(OFFSETX, CHART_BOTTOM+1, WIDTH, 1);