diff --git a/plot.c b/plot.c index 4c44bec..b7b997e 100644 --- a/plot.c +++ b/plot.c @@ -1899,6 +1899,9 @@ cell_draw_marker_info(int x0, int y0) } } #endif + +extern float temppeakLevel; + static void cell_draw_marker_info(int x0, int y0) { char buf[32]; @@ -1988,7 +1991,13 @@ static void cell_draw_marker_info(int x0, int y0) buf[k++] = ' '; // buf[k++] = 0; ili9341_set_background(DEFAULT_BG_COLOR); - ili9341_set_foreground(marker_color(markers[i].mtype)); + uint16_t color; + if ((setting.mode == M_LOW && temppeakLevel - get_attenuation() > -1) || + (setting.mode == M_HIGH && temppeakLevel - get_attenuation() > -10)) + color = BRIGHT_COLOR_RED; + else + color = marker_color(markers[i].mtype); + ili9341_set_foreground(color); // if (setting.unit) // cell_drawstring(buf, xpos, ypos); // else diff --git a/sa_core.c b/sa_core.c index 92fcc95..a9c5359 100644 --- a/sa_core.c +++ b/sa_core.c @@ -417,6 +417,7 @@ void set_subtract_storage(void) if (!setting.show_stored) set_storage(); setting.subtract_stored = true; +// setting.auto_attenuation = false; } else { setting.subtract_stored = false; } @@ -430,6 +431,7 @@ void toggle_normalize(void) for (int i=0; i 0 && !setting.subtract_stored) { // Auto attenuate + if (!in_selftest && setting.mode == M_LOW && setting.auto_attenuation && max_index[0] > 0) { // Auto attenuate setting.atten_step = false; // No step attenuate in low mode auto attenuate float old_attenuate = get_attenuation(); float actual_max_level = actual_t[max_index[0]] - old_attenuate;