mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2025-12-29 10:50:36 -07:00
🚸 Improve TFT touch calibrate (#26200)
This commit is contained in:
parent
da0bef50e1
commit
28548efa75
3 changed files with 11 additions and 4 deletions
|
|
@ -542,6 +542,7 @@ U8G_PB_DEV(u8g_dev_tft_320x240_upscale_from_128x64, WIDTH, HEIGHT, PAGE_HEIGHT,
|
|||
tftio.set_window(TFT_PIXEL_OFFSET_X, TFT_PIXEL_OFFSET_Y, X_HI, Y_HI);
|
||||
do {
|
||||
set_font(FONT_MENU);
|
||||
lcd_put_u8str(0, 7, GET_TEXT_F(MSG_TOUCH_CALIBRATION));
|
||||
lcd_put_u8str(0, LCD_PIXEL_HEIGHT / 2, str);
|
||||
} while (u8g.nextPage());
|
||||
drawing_screen = false;
|
||||
|
|
|
|||
|
|
@ -924,10 +924,11 @@ namespace LanguageNarrow_en {
|
|||
|
||||
LSTR MSG_SOUND = _UxGT("Sound");
|
||||
|
||||
LSTR MSG_TOP_LEFT = _UxGT("Top Left");
|
||||
LSTR MSG_BOTTOM_LEFT = _UxGT("Bottom Left");
|
||||
LSTR MSG_TOP_RIGHT = _UxGT("Top Right");
|
||||
LSTR MSG_BOTTOM_RIGHT = _UxGT("Bottom Right");
|
||||
LSTR MSG_TOP_LEFT = _UxGT("Touch Top Left");
|
||||
LSTR MSG_BOTTOM_LEFT = _UxGT("Touch Bottom Left");
|
||||
LSTR MSG_TOP_RIGHT = _UxGT("Touch Top Right");
|
||||
LSTR MSG_BOTTOM_RIGHT = _UxGT("Touch Bottom Right");
|
||||
LSTR MSG_TOUCH_CALIBRATION = _UxGT("Touch Calibration");
|
||||
LSTR MSG_CALIBRATION_COMPLETED = _UxGT("Calibration Completed");
|
||||
LSTR MSG_CALIBRATION_FAILED = _UxGT("Calibration Failed");
|
||||
|
||||
|
|
|
|||
|
|
@ -487,6 +487,11 @@ void MarlinUI::clear_for_drawing() { clear_lcd(); }
|
|||
touch.clear();
|
||||
|
||||
if (stage < CALIBRATION_SUCCESS) {
|
||||
tft_string.set(GET_TEXT(MSG_TOUCH_CALIBRATION));
|
||||
tft.canvas(0, 0, TFT_WIDTH, tft_string.font_height());
|
||||
tft.set_background(COLOR_BACKGROUND);
|
||||
tft.add_text(tft_string.center(TFT_WIDTH), 0, COLOR_MENU_TEXT, tft_string);
|
||||
|
||||
switch (stage) {
|
||||
case CALIBRATION_TOP_LEFT: tft_string.set(GET_TEXT(MSG_TOP_LEFT)); break;
|
||||
case CALIBRATION_TOP_RIGHT: tft_string.set(GET_TEXT(MSG_TOP_RIGHT)); break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue