From efb24ec1dd6646656ce16a4cb091bc7ed1e2d14b Mon Sep 17 00:00:00 2001 From: erikkaashoek Date: Mon, 9 Nov 2026 16:03:11 +0100 Subject: [PATCH] Level calibration: "Touch screen to continue" is visible on the tinySA (BASIC), its message lines start at y 180 instead of 200 so the last one fits the 240 pixel screen --- sa_core.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/sa_core.c b/sa_core.c index 44511d2..f022447 100644 --- a/sa_core.c +++ b/sa_core.c @@ -7957,6 +7957,14 @@ void calibrate_harmonic(void) } #endif +// First of the three 20 pixel message lines at the end of the calibration, the last one +// ("Touch screen to continue") must be on the 240 pixel screen of the tinySA +#ifdef TINYSA4 +#define CAL_MSG_Y 200 +#else +#define CAL_MSG_Y 180 +#endif + void calibrate(void) { int local_test_status; @@ -8209,14 +8217,14 @@ void calibrate(void) low_level: #endif ili9341_set_foreground(LCD_BRIGHT_COLOR_RED); - ili9341_drawstring_7x13("Signal level incorrect", 30, 200); - ili9341_drawstring_7x13("Check cable between connectors", 30, 220); + ili9341_drawstring_7x13("Signal level incorrect", 30, CAL_MSG_Y); + ili9341_drawstring_7x13("Check cable between connectors", 30, CAL_MSG_Y + 20); goto quit; } // chThdSleepMilliseconds(1000); if (local_test_status != TS_PASS) { ili9341_set_foreground(LCD_BRIGHT_COLOR_RED); - ili9341_drawstring_7x13("Calibration failed", 30, 220); + ili9341_drawstring_7x13("Calibration failed", 30, CAL_MSG_Y + 20); goto quit; } #ifdef TINYSA4 @@ -8296,12 +8304,12 @@ low_level: #endif config_save(); ili9341_set_foreground(LCD_BRIGHT_COLOR_GREEN); - ili9341_drawstring_7x13("Calibration complete", 40, 220); + ili9341_drawstring_7x13("Calibration complete", 40, CAL_MSG_Y + 20); quit: #ifdef TINYSA4 config.ultra = old_ultra; #endif - ili9341_drawstring_7x13("Touch screen to continue", 40, 240); + ili9341_drawstring_7x13("Touch screen to continue", 40, CAL_MSG_Y + 40); wait_user(); ili9341_clear_screen(); set_sweep_points(old_sweep_points);