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++; diff --git a/sa_core.c b/sa_core.c index d81ec3d..9c3061b 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__ @@ -5628,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); diff --git a/ui.c b/ui.c index c879177..3371825 100644 --- a/ui.c +++ b/ui.c @@ -6239,14 +6239,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