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

main
erikkaashoek 4 days ago
parent ab678dcc8c
commit efb24ec1dd

@ -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);

Loading…
Cancel
Save

Powered by TurnKey Linux.