diff --git a/main.c b/main.c index d72101f..d500bea 100644 --- a/main.c +++ b/main.c @@ -1785,7 +1785,7 @@ VNA_SHELL_FUNCTION(cmd_trace) set_unit(type); goto update; } - goto usage; +// goto usage; } static const char cmd_store_list[] = "store|clear|subtract"; if (argc == 1) { @@ -1803,7 +1803,7 @@ VNA_SHELL_FUNCTION(cmd_trace) goto update; } } - goto usage; +// goto usage; } // 0 1 static const char cmd_scale_ref_list[] = "scale|reflevel"; diff --git a/plot.c b/plot.c index 51bc308..89b0c69 100644 --- a/plot.c +++ b/plot.c @@ -2097,8 +2097,9 @@ static void cell_draw_marker_info(int x0, int y0) // buf[k++] = 0; ili9341_set_background(DEFAULT_BG_COLOR); uint16_t color; - if ((setting.mode == M_LOW && temppeakLevel - get_attenuation() + setting.offset > -1) || - (setting.mode == M_HIGH && temppeakLevel - get_attenuation()+ setting.offset > -10)) + if ((!setting.subtract_stored) && // Disabled when normalized + ((setting.mode == M_LOW && temppeakLevel - get_attenuation() + setting.offset > -1) || + (setting.mode == M_HIGH && temppeakLevel - get_attenuation()+ setting.offset > -10) )) color = BRIGHT_COLOR_RED; else color = marker_color(markers[i].mtype); diff --git a/ui_sa.c b/ui_sa.c index e7f1a79..23068ec 100644 --- a/ui_sa.c +++ b/ui_sa.c @@ -894,6 +894,13 @@ static UI_FUNCTION_ADV_CALLBACK(menu_storage_acb) break; case 3: toggle_normalize(); + if (setting.subtract_stored) { + kp_help_text = "Ref level"; + ui_mode_keypad(KM_REFLEVEL); + ui_process_keypad(); +// setting.normalize_level = uistat.value; + } else + set_auto_reflevel(true); break; } ui_mode_normal();