From 12a96bba04f2bae690076569a21f214e4a4ace88 Mon Sep 17 00:00:00 2001 From: erikkaashoek Date: Mon, 29 Mar 2021 08:58:52 +0200 Subject: [PATCH] Repaired test status and marker colors --- plot.c | 4 +++- sa_core.c | 18 ++++++++++-------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/plot.c b/plot.c index ac6fadd..549ee8e 100644 --- a/plot.c +++ b/plot.c @@ -92,8 +92,10 @@ uint16_t marker_color(int mtype) { if (mtype & M_REFERENCE) return LCD_M_REFERENCE; - if (mtype & M_DELTA) + if (mtype & M_STORED) return LCD_M_DELTA; +// if (mtype & M_DELTA) +// return LCD_BRIGHT_COLOR_RED; if (mtype & M_NOISE) return LCD_M_NOISE; return LCD_M_DEFAULT; diff --git a/sa_core.c b/sa_core.c index f49674e..2c607ce 100644 --- a/sa_core.c +++ b/sa_core.c @@ -4201,13 +4201,13 @@ void cell_draw_test_info(int x0, int y0) int ypos = 50+i*INFO_SPACING - y0; unsigned int color = LCD_FG_COLOR; if (i == -1) { - plot_printf(self_test_status_buf, sizeof self_test_status_buf, FONT_s"Self test status:"); + plot_printf(self_test_status_buf, sizeof self_test_status_buf, FONT_s"Self test status:"); } else if (test_case[i].kind == TC_END) { - if (test_wait) - plot_printf(self_test_status_buf, sizeof self_test_status_buf, FONT_s"Touch screen to continue"); - else - self_test_status_buf[0] = 0; - } else { + if (test_wait) + plot_printf(self_test_status_buf, sizeof self_test_status_buf, FONT_s"Touch screen to continue"); + else + self_test_status_buf[0] = 0; + } else { plot_printf(self_test_status_buf, sizeof self_test_status_buf, FONT_s"Test %d: %s%s", i+1, test_fail_cause[i], test_text[test_status[i]] ); if (test_status[i] == TS_PASS) color = LCD_BRIGHT_COLOR_GREEN; @@ -4413,7 +4413,8 @@ int test_validate(int i) test_status[i] = current_test_status; // Must be set before draw_all() !!!!!!!! // draw_frequencies(); // draw_cal_status(); - redraw_request |= REDRAW_CAL_STATUS; +// redraw_request |= REDRAW_CAL_STATUS; + redraw_request |= REDRAW_AREA | REDRAW_CAL_STATUS; draw_all(TRUE); return current_test_status; } @@ -4629,8 +4630,9 @@ void self_test(int test) if (no_wait) { goto quit; } +// draw_all(TRUE); ili9341_set_foreground(LCD_BRIGHT_COLOR_GREEN); - ili9341_drawstring_7x13("Self test complete", 50, 200); + ili9341_drawstring_7x13("Self test complete", 50, 202); ili9341_drawstring_7x13("Touch screen to continue", 50, 215); resume2: test_wait = true;