@@ -501,40 +501,40 @@ U8G_PB_DEV(u8g_dev_tft_320x240_upscale_from_128x64, WIDTH, HEIGHT, PAGE_HEIGHT,
501
501
502
502
void MarlinUI::touch_calibration_screen () {
503
503
uint16_t x, y;
504
- calibrationState calibration_stage = touch_calibration.get_calibration_state ();
504
+ calibrationState stage = touch_calibration.get_calibration_state ();
505
505
506
- if (calibration_stage == CALIBRATION_NONE) {
506
+ if (stage == CALIBRATION_NONE) {
507
507
// start and clear screen
508
508
defer_status_screen (true );
509
- calibration_stage = touch_calibration.calibration_start ();
509
+ stage = touch_calibration.calibration_start ();
510
510
tftio.set_window (0 , 0 , (TFT_WIDTH) - 1 , (TFT_HEIGHT) - 1 );
511
511
tftio.WriteMultiple (TFT_MARLINBG_COLOR, uint32_t (TFT_WIDTH) * (TFT_HEIGHT));
512
512
}
513
513
else {
514
514
// clear last cross
515
- x = touch_calibration.calibration_points [_MIN (calibration_stage - 1 , CALIBRATION_BOTTOM_RIGHT)].x ;
516
- y = touch_calibration.calibration_points [_MIN (calibration_stage - 1 , CALIBRATION_BOTTOM_RIGHT)].y ;
515
+ x = touch_calibration.calibration_points [_MIN (stage - 1 , CALIBRATION_BOTTOM_RIGHT)].x ;
516
+ y = touch_calibration.calibration_points [_MIN (stage - 1 , CALIBRATION_BOTTOM_RIGHT)].y ;
517
517
drawCross (x, y, TFT_MARLINBG_COLOR);
518
518
}
519
519
520
520
FSTR_P str = nullptr ;
521
- if (calibration_stage < CALIBRATION_SUCCESS) {
521
+ if (stage < CALIBRATION_SUCCESS) {
522
522
// handle current state
523
- switch (calibration_stage ) {
523
+ switch (stage ) {
524
524
case CALIBRATION_TOP_LEFT: str = GET_TEXT_F (MSG_TOP_LEFT); break ;
525
525
case CALIBRATION_BOTTOM_LEFT: str = GET_TEXT_F (MSG_BOTTOM_LEFT); break ;
526
526
case CALIBRATION_TOP_RIGHT: str = GET_TEXT_F (MSG_TOP_RIGHT); break ;
527
527
case CALIBRATION_BOTTOM_RIGHT: str = GET_TEXT_F (MSG_BOTTOM_RIGHT); break ;
528
528
default : break ;
529
529
}
530
530
531
- x = touch_calibration.calibration_points [calibration_stage ].x ;
532
- y = touch_calibration.calibration_points [calibration_stage ].y ;
531
+ x = touch_calibration.calibration_points [stage ].x ;
532
+ y = touch_calibration.calibration_points [stage ].y ;
533
533
drawCross (x, y, TFT_MARLINUI_COLOR);
534
534
}
535
535
else {
536
536
// end calibration
537
- str = calibration_stage == CALIBRATION_SUCCESS ? GET_TEXT_F (MSG_CALIBRATION_COMPLETED) : GET_TEXT_F (MSG_CALIBRATION_FAILED);
537
+ str = stage == CALIBRATION_SUCCESS ? GET_TEXT_F (MSG_CALIBRATION_COMPLETED) : GET_TEXT_F (MSG_CALIBRATION_FAILED);
538
538
defer_status_screen (false );
539
539
touch_calibration.calibration_end ();
540
540
TERN_ (HAS_TOUCH_BUTTONS, redrawTouchButtons = true );
@@ -548,7 +548,7 @@ U8G_PB_DEV(u8g_dev_tft_320x240_upscale_from_128x64, WIDTH, HEIGHT, PAGE_HEIGHT,
548
548
} while (u8g.nextPage ());
549
549
drawing_screen = false ;
550
550
safe_delay (250 );
551
- if (calibration_stage == CALIBRATION_SUCCESS) {
551
+ if (stage == CALIBRATION_SUCCESS) {
552
552
safe_delay (500 );
553
553
ui.goto_previous_screen ();
554
554
}
0 commit comments