Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 3d67d38

Browse files
committedJul 16, 2023
consistency
1 parent 93f8162 commit 3d67d38

File tree

3 files changed

+116
-54
lines changed

3 files changed

+116
-54
lines changed
 

‎Marlin/src/lcd/tft/ui_move_axis_screen_1024.cpp

+26-13
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@ static void drawCurStepValue() {
101101
tft.canvas(motionAxisState.zTypePos.x, motionAxisState.zTypePos.y, tft_string.width(), 34);
102102
tft.set_background(COLOR_BACKGROUND);
103103
tft.add_text(0, 0, Z_BTN_COLOR, tft_string);
104+
104105
tft.queue.sync();
106+
105107
tft_string.set(F("Offset"));
106108
tft.canvas(motionAxisState.zTypePos.x, motionAxisState.zTypePos.y + 34, tft_string.width(), 34);
107109
tft.set_background(COLOR_BACKGROUND);
@@ -125,7 +127,7 @@ static void drawCurStepValue() {
125127
static void drawMessage(PGM_P const msg) {
126128
tft.canvas(X_MARGIN, TFT_HEIGHT - Y_MARGIN - 34, TFT_HEIGHT / 2, 34);
127129
tft.set_background(COLOR_BACKGROUND);
128-
tft.add_text(0, 0, COLOR_YELLOW, msg);
130+
tft.add_text(0, 0, COLOR_STATUS_MESSAGE, msg);
129131
}
130132

131133
static void drawMessage(FSTR_P const fmsg) { drawMessage(FTOP(fmsg)); }
@@ -278,9 +280,9 @@ static void moveAxis(const AxisEnum axis, const int8_t direction) {
278280
// Disable touch until home is done
279281
touch.disable();
280282
TERN_(HAS_EXTRUDERS, drawAxisValue(E_AXIS));
281-
TERN_(HAS_X_AXIS, drawAxisValue(X_AXIS));
282-
TERN_(HAS_Y_AXIS, drawAxisValue(Y_AXIS));
283-
TERN_(HAS_Z_AXIS, drawAxisValue(Z_AXIS));
283+
TERN_(HAS_X_AXIS, drawAxisValue(X_AXIS));
284+
TERN_(HAS_Y_AXIS, drawAxisValue(Y_AXIS));
285+
TERN_(HAS_Z_AXIS, drawAxisValue(Z_AXIS));
284286
}
285287

286288
static void step_size() {
@@ -344,7 +346,10 @@ void MarlinUI::move_axis_screen() {
344346
if (busy) motionAxisState.z_selection = Z_SELECTION_Z_PROBE;
345347
#endif
346348

347-
// ROW 1 -> E- Y- CurY Z+
349+
/**************************************************************************
350+
* Row 1: | [E-] | [Y-] | Current Y | [Z+] |
351+
*************************************************************************/
352+
348353
int x = X_MARGIN, y = Y_MARGIN, spacing = 0;
349354

350355
TERN_(HAS_EXTRUDERS, drawBtn(x, y, "E+", (intptr_t)e_plus, imgUp, E_BTN_COLOR, !busy));
@@ -367,7 +372,10 @@ void MarlinUI::move_axis_screen() {
367372
drawBtn(x, y, "Z+", (intptr_t)z_plus, imgUp, Z_BTN_COLOR, !busy || ENABLED(BABYSTEP_ZPROBE_OFFSET)); // Only enabled when not busy or have baby step
368373
#endif
369374

370-
// ROW 2 -> "Ex" X- HOME X+ "Z"
375+
/**************************************************************************
376+
* Row 2: | "Ex" | [X-] | [Home] | [X+] | "Z" |
377+
*************************************************************************/
378+
371379
y += BTN_HEIGHT + (TFT_HEIGHT - Y_MARGIN * 2 - 4 * BTN_HEIGHT) / 3;
372380
x = X_MARGIN;
373381
spacing = (TFT_WIDTH - X_MARGIN * 2 - 5 * BTN_WIDTH) / 4;
@@ -382,7 +390,7 @@ void MarlinUI::move_axis_screen() {
382390

383391
TERN_(HAS_X_AXIS, drawBtn(x, y, "X-", (intptr_t)x_minus, imgLeft, X_BTN_COLOR, !busy));
384392

385-
x += BTN_WIDTH + spacing; //imgHome is 64x64
393+
x += BTN_WIDTH + spacing;
386394

387395
#if ALL(HAS_X_AXIS, TOUCH_SCREEN)
388396
add_control(TFT_WIDTH / 2 - images[imgHome].width / 2, y - (images[imgHome].width - BTN_HEIGHT) / 2, BUTTON, (intptr_t)do_home, imgHome, !busy);
@@ -398,21 +406,23 @@ void MarlinUI::move_axis_screen() {
398406
#if HAS_Z_AXIS
399407
motionAxisState.zTypePos.set(x, y);
400408
drawCurZSelection();
409+
#if ALL(HAS_BED_PROBE, TOUCH_SCREEN)
410+
if (!busy) touch.add_control(BUTTON, x, y, BTN_WIDTH, 34 * 2, (intptr_t)z_select);
411+
#endif
401412
#endif
402413

403-
#if ALL(HAS_BED_PROBE, TOUCH_SCREEN)
404-
if (!busy) touch.add_control(BUTTON, x, y, BTN_WIDTH, 34 * 2, (intptr_t)z_select);
405-
#endif
414+
/**************************************************************************
415+
* Row 3: | [E-] | Current X | [Y-] | [Z-] |
416+
*************************************************************************/
406417

407-
// ROW 3 -> E- CurX Y- Z-
408418
y += BTN_HEIGHT + (TFT_HEIGHT - Y_MARGIN * 2 - 4 * BTN_HEIGHT) / 3;
409419
x = X_MARGIN;
410420
spacing = (TFT_WIDTH - X_MARGIN * 2 - 3 * BTN_WIDTH) / 2;
411421

412422
#if HAS_EXTRUDERS
413423
drawBtn(x, y, "E-", (intptr_t)e_minus, imgDown, E_BTN_COLOR, !busy);
414424
motionAxisState.eValuePos.set(x, y + BTN_HEIGHT + 2);
415-
TERN_(HAS_EXTRUDERS, drawAxisValue(E_AXIS));
425+
drawAxisValue(E_AXIS);
416426
#endif
417427

418428
// Cur X
@@ -435,7 +445,10 @@ void MarlinUI::move_axis_screen() {
435445
drawAxisValue(Z_AXIS);
436446
#endif
437447

438-
// ROW 4 -> step_size disable steppers back
448+
/**************************************************************************
449+
* Row 4: | Step Size | [Disable Steppers] | [Back] |
450+
*************************************************************************/
451+
439452
y = TFT_HEIGHT - Y_MARGIN - 32;
440453
x = TFT_WIDTH / 2 - CUR_STEP_VALUE_WIDTH / 2;
441454
motionAxisState.stepValuePos.set(x, y);

‎Marlin/src/lcd/tft/ui_move_axis_screen_320.cpp

+57-22
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@ static void drawCurStepValue() {
9292
tft.canvas(motionAxisState.stepValuePos.x, motionAxisState.stepValuePos.y, CUR_STEP_VALUE_WIDTH, 20);
9393
tft.set_background(COLOR_BACKGROUND);
9494
tft.add_text(CUR_STEP_VALUE_WIDTH - tft_string.width(), 0, COLOR_AXIS_HOMED, tft_string);
95+
9596
tft.queue.sync();
97+
9698
tft_string.set(F("mm"));
9799
tft.canvas(motionAxisState.stepValuePos.x, motionAxisState.stepValuePos.y + 20, CUR_STEP_VALUE_WIDTH, 20);
98100
tft.set_background(COLOR_BACKGROUND);
@@ -105,7 +107,9 @@ static void drawCurStepValue() {
105107
tft.canvas(motionAxisState.zTypePos.x, motionAxisState.zTypePos.y, tft_string.width(), 20);
106108
tft.set_background(COLOR_BACKGROUND);
107109
tft.add_text(0, 0, Z_BTN_COLOR, tft_string);
110+
108111
tft.queue.sync();
112+
109113
tft_string.set(F("Offset"));
110114
tft.canvas(motionAxisState.zTypePos.x, motionAxisState.zTypePos.y + 34, tft_string.width(), 20);
111115
tft.set_background(COLOR_BACKGROUND);
@@ -289,9 +293,9 @@ static void moveAxis(const AxisEnum axis, const int8_t direction) {
289293
// Disable touch until home is done
290294
touch.disable();
291295
TERN_(HAS_EXTRUDERS, drawAxisValue(E_AXIS));
292-
TERN_(HAS_X_AXIS, drawAxisValue(X_AXIS));
293-
TERN_(HAS_Y_AXIS, drawAxisValue(Y_AXIS));
294-
TERN_(HAS_Z_AXIS, drawAxisValue(Z_AXIS));
296+
TERN_(HAS_X_AXIS, drawAxisValue(X_AXIS));
297+
TERN_(HAS_Y_AXIS, drawAxisValue(Y_AXIS));
298+
TERN_(HAS_Z_AXIS, drawAxisValue(Z_AXIS));
295299
}
296300

297301
static void step_size() {
@@ -358,7 +362,10 @@ void MarlinUI::move_axis_screen() {
358362

359363
#if ENABLED(TFT_COLOR_UI_PORTRAIT)
360364

361-
// ROW 1 -> E+ Y+ Z+
365+
/**************************************************************************
366+
* ROW 1: | [E+] | [Y+] | [Z+] |
367+
*************************************************************************/
368+
362369
int x = X_MARGIN, y = Y_MARGIN, spacing = 0;
363370

364371
TERN_(HAS_EXTRUDERS, drawBtn(x, y, "E+", (intptr_t)e_plus, imgUp, E_BTN_COLOR, !busy));
@@ -376,7 +383,10 @@ void MarlinUI::move_axis_screen() {
376383
drawBtn(x, y, "Z+", (intptr_t)z_plus, imgUp, Z_BTN_COLOR, !busy || ENABLED(BABYSTEP_ZPROBE_OFFSET)); // Only enabled when not busy or have baby step
377384
#endif
378385

379-
// ROW 2 -> "Ex" CurY "Z"
386+
/**************************************************************************
387+
* ROW 2: | "Ex" | Current Y | "Z" |
388+
*************************************************************************/
389+
380390
x = X_MARGIN;
381391
y += BTN_HEIGHT + 2;
382392

@@ -396,7 +406,10 @@ void MarlinUI::move_axis_screen() {
396406
drawCurZSelection();
397407
#endif
398408

399-
// ROW 3 -> X- HOME X+
409+
/**************************************************************************
410+
* ROW 3: | [X-] | [Home] | [X+] | "Z" |
411+
*************************************************************************/
412+
400413
y += (TFT_HEIGHT - Y_MARGIN * 2 - 4 * BTN_HEIGHT) / 3 - 2;
401414
x = X_MARGIN;
402415

@@ -410,22 +423,28 @@ void MarlinUI::move_axis_screen() {
410423
if (!busy) touch.add_control(BUTTON, x, y, BTN_WIDTH, 34 * 2, (intptr_t)z_select);
411424
#endif
412425

413-
// ROW 4 -> Cur X
426+
/**************************************************************************
427+
* ROW 4: | Current X |
428+
*************************************************************************/
429+
414430
y += BTN_HEIGHT + 2;
415431

416432
#if HAS_X_AXIS
417433
motionAxisState.xValuePos.set(x, y);
418434
drawAxisValue(X_AXIS);
419435
#endif
420436

421-
// ROW 5 -> E- CurX Y- Z-
437+
/**************************************************************************
438+
* ROW 5: | [E-] | [Y-] | [Z-] |
439+
*************************************************************************/
440+
422441
y += (TFT_HEIGHT - Y_MARGIN * 2 - 4 * BTN_HEIGHT) / 3 - 2;
423442
x = X_MARGIN;
424443

425444
#if HAS_EXTRUDERS
426445
drawBtn(x, y, "E-", (intptr_t)e_minus, imgDown, E_BTN_COLOR, !busy);
427446
motionAxisState.eValuePos.set(x, y + BTN_HEIGHT + 2);
428-
TERN_(HAS_EXTRUDERS, drawAxisValue(E_AXIS));
447+
drawAxisValue(E_AXIS);
429448
#endif
430449

431450
x += BTN_WIDTH + spacing;
@@ -435,12 +454,15 @@ void MarlinUI::move_axis_screen() {
435454
x += BTN_WIDTH + spacing;
436455

437456
#if HAS_Z_AXIS
438-
drawBtn(x, y, "Z-", (intptr_t)z_minus, imgDown, Z_BTN_COLOR, !busy || ENABLED(BABYSTEP_ZPROBE_OFFSET)); //only enabled when not busy or have baby step
457+
drawBtn(x, y, "Z-", (intptr_t)z_minus, imgDown, Z_BTN_COLOR, !busy || ENABLED(BABYSTEP_ZPROBE_OFFSET)); // Only enabled when not busy or have baby step
439458
motionAxisState.zValuePos.set(x, y + BTN_HEIGHT + 2);
440459
drawAxisValue(Z_AXIS);
441460
#endif
442461

443-
// ROW 6 -> step_size disable steppers back
462+
/**************************************************************************
463+
* ROW 6: | Step Size | [Disable Steppers] | [Back] |
464+
*************************************************************************/
465+
444466
y = TFT_HEIGHT - Y_MARGIN - BTN_HEIGHT;
445467
x = zplus_x - CUR_STEP_VALUE_WIDTH - 10;
446468
motionAxisState.stepValuePos.set(X_MARGIN + BTN_WIDTH - CUR_STEP_VALUE_WIDTH, y);
@@ -455,7 +477,10 @@ void MarlinUI::move_axis_screen() {
455477

456478
#else // !TFT_COLOR_UI_PORTRAIT
457479

458-
// ROW 1 -> E+ Y+ CurY Z+
480+
/**************************************************************************
481+
* ROW 1: | [E+] | [Y+] | Current Y | [Z+] |
482+
*************************************************************************/
483+
459484
int x = X_MARGIN, y = Y_MARGIN, spacing = 0;
460485

461486
TERN_(HAS_EXTRUDERS, drawBtn(x, y, "E+", (intptr_t)e_plus, imgUp, E_BTN_COLOR, !busy));
@@ -468,6 +493,7 @@ void MarlinUI::move_axis_screen() {
468493

469494
x += BTN_WIDTH;
470495

496+
// Cur Y
471497
#if HAS_Y_AXIS
472498
motionAxisState.yValuePos.set(x + 2, y);
473499
drawAxisValue(Y_AXIS);
@@ -476,10 +502,13 @@ void MarlinUI::move_axis_screen() {
476502
x += spacing;
477503

478504
#if HAS_Z_AXIS
479-
drawBtn(x, y, "Z+", (intptr_t)z_plus, imgUp, Z_BTN_COLOR, !busy || ENABLED(BABYSTEP_ZPROBE_OFFSET)); //only enabled when not busy or have baby step
505+
drawBtn(x, y, "Z+", (intptr_t)z_plus, imgUp, Z_BTN_COLOR, !busy || ENABLED(BABYSTEP_ZPROBE_OFFSET)); // Only enabled when not busy or have baby step
480506
#endif
481507

482-
// ROW 2 -> "Ex" X- HOME X+ "Z"
508+
/**************************************************************************
509+
* ROW 2: | "Ex" | [X-] | [Home] | [X+] | "Z" |
510+
*************************************************************************/
511+
483512
y += BTN_HEIGHT + (TFT_HEIGHT - Y_MARGIN * 2 - 4 * BTN_HEIGHT) / 3;
484513
x = X_MARGIN;
485514
spacing = (TFT_WIDTH - X_MARGIN * 2 - 5 * BTN_WIDTH) / 4;
@@ -494,7 +523,7 @@ void MarlinUI::move_axis_screen() {
494523

495524
TERN_(HAS_X_AXIS, drawBtn(x, y, "X-", (intptr_t)x_minus, imgLeft, X_BTN_COLOR, !busy));
496525

497-
x += BTN_WIDTH + spacing; //imgHome is 64x64
526+
x += BTN_WIDTH + spacing;
498527

499528
#if ALL(HAS_X_AXIS, TOUCH_SCREEN)
500529
add_control(TFT_WIDTH / 2 - images[imgHome].width / 2, y - (images[imgHome].width - BTN_HEIGHT) / 2, BUTTON, (intptr_t)do_home, imgHome, !busy);
@@ -510,21 +539,23 @@ void MarlinUI::move_axis_screen() {
510539
#if HAS_Z_AXIS
511540
motionAxisState.zTypePos.set(x, y);
512541
drawCurZSelection();
542+
#if ALL(HAS_BED_PROBE, TOUCH_SCREEN)
543+
if (!busy) touch.add_control(BUTTON, x, y, BTN_WIDTH, 34 * 2, (intptr_t)z_select);
544+
#endif
513545
#endif
514546

515-
#if ALL(HAS_BED_PROBE, TOUCH_SCREEN)
516-
if (!busy) touch.add_control(BUTTON, x, y, BTN_WIDTH, 34 * 2, (intptr_t)z_select);
517-
#endif
547+
/**************************************************************************
548+
* ROW 3: | [E-] | Current X | [Y-] | [Z-] |
549+
*************************************************************************/
518550

519-
// ROW 3 -> E- CurX Y- Z-
520551
y += BTN_HEIGHT + (TFT_HEIGHT - Y_MARGIN * 2 - 4 * BTN_HEIGHT) / 3;
521552
x = X_MARGIN;
522553
spacing = (TFT_WIDTH - X_MARGIN * 2 - 3 * BTN_WIDTH) / 2;
523554

524555
#if HAS_EXTRUDERS
525556
drawBtn(x, y, "E-", (intptr_t)e_minus, imgDown, E_BTN_COLOR, !busy);
526557
motionAxisState.eValuePos.set(x, y + BTN_HEIGHT + 2);
527-
TERN_(HAS_EXTRUDERS, drawAxisValue(E_AXIS));
558+
drawAxisValue(E_AXIS);
528559
#endif
529560

530561
// Cur X
@@ -542,12 +573,15 @@ void MarlinUI::move_axis_screen() {
542573

543574
// Cur Z
544575
#if HAS_Z_AXIS
545-
drawBtn(x, y, "Z-", (intptr_t)z_minus, imgDown, Z_BTN_COLOR, !busy || ENABLED(BABYSTEP_ZPROBE_OFFSET)); //only enabled when not busy or have baby step
576+
drawBtn(x, y, "Z-", (intptr_t)z_minus, imgDown, Z_BTN_COLOR, !busy || ENABLED(BABYSTEP_ZPROBE_OFFSET)); // Only enabled when not busy or have baby step
546577
motionAxisState.zValuePos.set(x, y + BTN_HEIGHT + 2);
547578
drawAxisValue(Z_AXIS);
548579
#endif
549580

550-
// ROW 4 -> step_size disable steppers back
581+
/**************************************************************************
582+
* ROW 4: | Step Size | [Disable Steppers] | [Back] |
583+
*************************************************************************/
584+
551585
y = TFT_HEIGHT - Y_MARGIN - BTN_HEIGHT;
552586
x = xplus_x - CUR_STEP_VALUE_WIDTH - 10;
553587
motionAxisState.stepValuePos.set(yplus_x + BTN_WIDTH - CUR_STEP_VALUE_WIDTH, y);
@@ -563,5 +597,6 @@ void MarlinUI::move_axis_screen() {
563597

564598
TERN_(TOUCH_SCREEN, add_control(TFT_WIDTH - X_MARGIN - BTN_WIDTH, y, BACK, imgBack));
565599
}
600+
566601
#endif // MOVE_AXIS_SCREEN
567602
#endif // HAS_UI_320x240

‎Marlin/src/lcd/tft/ui_move_axis_screen_480.cpp

+33-19
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ static void drawMessage(PGM_P const msg) {
139139
tft.canvas(X_MARGIN, TFT_HEIGHT - Y_MARGIN - Y_OFFSET, TFT_HEIGHT / 2, Y_OFFSET);
140140
#endif
141141
tft.set_background(COLOR_BACKGROUND);
142-
tft.add_text(0, 0, COLOR_YELLOW, msg);
142+
tft.add_text(0, 0, COLOR_STATUS_MESSAGE, msg);
143143
}
144144

145145
static void drawMessage(FSTR_P const fmsg) { drawMessage(FTOP(fmsg)); }
@@ -293,9 +293,9 @@ static void moveAxis(const AxisEnum axis, const int8_t direction) {
293293
// Disable touch until home is done
294294
touch.disable();
295295
TERN_(HAS_EXTRUDERS, drawAxisValue(E_AXIS));
296-
TERN_(HAS_X_AXIS, drawAxisValue(X_AXIS));
297-
TERN_(HAS_Y_AXIS, drawAxisValue(Y_AXIS));
298-
TERN_(HAS_Z_AXIS, drawAxisValue(Z_AXIS));
296+
TERN_(HAS_X_AXIS, drawAxisValue(X_AXIS));
297+
TERN_(HAS_Y_AXIS, drawAxisValue(Y_AXIS));
298+
TERN_(HAS_Z_AXIS, drawAxisValue(Z_AXIS));
299299
}
300300

301301
static void step_size() {
@@ -364,7 +364,7 @@ void MarlinUI::move_axis_screen() {
364364
int y = MOVE_AXIS_MARGIN_SIZE;
365365

366366
/**************************************************************************
367-
* 1st: | Button "E+" | Button "Y+" | Button "Z+" |
367+
* ROW 1: | [E+] | [Y+] | [Z+] |
368368
*************************************************************************/
369369

370370
TERN_(HAS_EXTRUDERS, drawBtn(TFT_WIDTH / 6 - BTN_WIDTH / 2, y, "E+", (intptr_t)e_plus, imgUp, E_BTN_COLOR, !busy));
@@ -374,7 +374,7 @@ void MarlinUI::move_axis_screen() {
374374
y += BTN_HEIGHT + 4;
375375

376376
/**************************************************************************
377-
* 2nd: | Label "Ex" (E0, E1, etc.) | Y value | Label "Z" |
377+
* ROW 2: | "Ex" (E0, E1, etc.) | Current Y | "Z" |
378378
*************************************************************************/
379379

380380
// Label "Ex" (E0, E1, etc.)
@@ -404,7 +404,7 @@ void MarlinUI::move_axis_screen() {
404404
y += BTN_HEIGHT + MOVE_AXIS_MARGIN_SIZE;
405405

406406
/**************************************************************************
407-
* 3rd: | Button "X-" | Button "Homing" | Button "X+" |
407+
* ROW 3: | [X-] | [Home] | [X+] |
408408
*************************************************************************/
409409

410410
#if HAS_X_AXIS
@@ -416,7 +416,7 @@ void MarlinUI::move_axis_screen() {
416416
y += BTN_HEIGHT + 4;
417417

418418
/**************************************************************************
419-
* 4th: | X value |
419+
* ROW 4: | X value |
420420
*************************************************************************/
421421

422422
#ifdef HAS_X_AXIS
@@ -427,7 +427,7 @@ void MarlinUI::move_axis_screen() {
427427
y += BTN_HEIGHT + MOVE_AXIS_MARGIN_SIZE;
428428

429429
/**************************************************************************
430-
* 5th: | Button "E-" | Button "Y-" | Button "Z-"
430+
* ROW 5: | [E-] | [Y-] | [Z-] |
431431
*************************************************************************/
432432

433433
TERN_(HAS_EXTRUDERS, drawBtn(TFT_WIDTH / 6 - BTN_WIDTH / 2, y, "E-", (intptr_t)e_minus, imgDown, E_BTN_COLOR, !busy));
@@ -437,7 +437,7 @@ void MarlinUI::move_axis_screen() {
437437
y += BTN_HEIGHT + 4;
438438

439439
/**************************************************************************
440-
* 6th: | Current Ex value | Z value |
440+
* ROW 6: | Current Ex | Current Z |
441441
*************************************************************************/
442442

443443
// Current Ex value
@@ -454,13 +454,13 @@ void MarlinUI::move_axis_screen() {
454454
y += BTN_HEIGHT + MOVE_AXIS_MARGIN_SIZE;
455455

456456
/**************************************************************************
457-
* 7th: | Message - drawMessage(...) function |
457+
* ROW 7: | Message - drawMessage(...) function |
458458
*************************************************************************/
459459

460460
y += FONT_LINE_HEIGHT + MOVE_AXIS_MARGIN_SIZE;
461461

462462
/**************************************************************************
463-
* 8th: | Step size | Button "Disable steppers" | Button "Back" |
463+
* ROW 8: | Step Size | [Disable Steppers] | [Back] |
464464
*************************************************************************/
465465

466466
// Step size
@@ -478,7 +478,10 @@ void MarlinUI::move_axis_screen() {
478478

479479
#else // !TFT_COLOR_UI_PORTRAIT
480480

481-
// ROW 1 -> E- Y- CurY Z+
481+
/**************************************************************************
482+
* ROW 1: | [E+] | [Y+] | [Z+] |
483+
*************************************************************************/
484+
482485
int x = X_MARGIN, y = Y_MARGIN, spacing = 0;
483486

484487
TERN_(HAS_EXTRUDERS, drawBtn(x, y, "E+", (intptr_t)e_plus, imgUp, E_BTN_COLOR, !busy));
@@ -497,11 +500,15 @@ void MarlinUI::move_axis_screen() {
497500
#endif
498501

499502
x += spacing;
503+
500504
#if HAS_Z_AXIS
501505
drawBtn(x, y, "Z+", (intptr_t)z_plus, imgUp, Z_BTN_COLOR, !busy || ENABLED(BABYSTEP_ZPROBE_OFFSET)); // Only enabled when not busy or have baby step
502506
#endif
503507

504-
// ROW 2 -> "Ex" X- HOME X+ "Z"
508+
/**************************************************************************
509+
* ROW 2: | "Ex" | [X-] | [Home] | [X+] | "Z" |
510+
*************************************************************************/
511+
505512
y += BTN_HEIGHT + (TFT_HEIGHT - Y_MARGIN * 2 - 4 * BTN_HEIGHT) / 3;
506513
x = X_MARGIN;
507514
spacing = (TFT_WIDTH - X_MARGIN * 2 - 5 * BTN_WIDTH) / 4;
@@ -516,7 +523,7 @@ void MarlinUI::move_axis_screen() {
516523

517524
TERN_(HAS_X_AXIS, drawBtn(x, y, "X-", (intptr_t)x_minus, imgLeft, X_BTN_COLOR, !busy));
518525

519-
x += BTN_WIDTH + spacing; //imgHome is 64x64
526+
x += BTN_WIDTH + spacing;
520527

521528
#if ALL(HAS_X_AXIS, TOUCH_SCREEN)
522529
add_control(TFT_WIDTH / 2 - images[imgHome].width / 2, y - (images[imgHome].width - BTN_HEIGHT) / 2, BUTTON, (intptr_t)do_home, imgHome, !busy);
@@ -537,7 +544,10 @@ void MarlinUI::move_axis_screen() {
537544
#endif
538545
#endif
539546

540-
// ROW 3 -> E- CurX Y- Z-
547+
/**************************************************************************
548+
* ROW 3: | [E-] | Current X | [Y-] | [Z-] |
549+
*************************************************************************/
550+
541551
y += BTN_HEIGHT + (TFT_HEIGHT - Y_MARGIN * 2 - 4 * BTN_HEIGHT) / 3;
542552
x = X_MARGIN;
543553
spacing = (TFT_WIDTH - X_MARGIN * 2 - 3 * BTN_WIDTH) / 2;
@@ -551,7 +561,7 @@ void MarlinUI::move_axis_screen() {
551561
// Cur X
552562
#if HAS_X_AXIS
553563
motionAxisState.xValuePos.set(BTN_WIDTH + (TFT_WIDTH - X_MARGIN * 2 - 5 * BTN_WIDTH) / 4, y - 10);
554-
TERN_(HAS_X_AXIS, drawAxisValue(X_AXIS));
564+
drawAxisValue(X_AXIS);
555565
#endif
556566

557567
x += BTN_WIDTH + spacing;
@@ -563,12 +573,15 @@ void MarlinUI::move_axis_screen() {
563573

564574
// Cur Z
565575
#if HAS_Z_AXIS
566-
drawBtn(x, y, "Z-", (intptr_t)z_minus, imgDown, Z_BTN_COLOR, !busy || ENABLED(BABYSTEP_ZPROBE_OFFSET)); //only enabled when not busy or have baby step
576+
drawBtn(x, y, "Z-", (intptr_t)z_minus, imgDown, Z_BTN_COLOR, !busy || ENABLED(BABYSTEP_ZPROBE_OFFSET)); // Only enabled when not busy or have baby step
567577
motionAxisState.zValuePos.set(x, y + BTN_HEIGHT + 2);
568578
drawAxisValue(Z_AXIS);
569579
#endif
570580

571-
// ROW 4 -> step_size disable steppers back
581+
/**************************************************************************
582+
* ROW 4: | Step Size | [Disable Steppers] | [Back] |
583+
*************************************************************************/
584+
572585
y = TFT_HEIGHT - Y_MARGIN - TERN(HAS_UI_480x272, BTN_WIDTH / 2, 32);
573586
x = TFT_WIDTH / 2 - CUR_STEP_VALUE_WIDTH / 2;
574587
motionAxisState.stepValuePos.set(x, y);
@@ -584,5 +597,6 @@ void MarlinUI::move_axis_screen() {
584597

585598
#endif // !TFT_COLOR_UI_PORTRAIT
586599
}
600+
587601
#endif // MOVE_AXIS_SCREEN
588602
#endif // HAS_UI_480x320 || HAS_UI_480x272

0 commit comments

Comments
 (0)
Please sign in to comment.