0
0
Fork 0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2025-03-15 10:46:18 +00:00

🚸 General TFT cleanup

This commit is contained in:
Scott Lahteine 2023-06-07 22:37:16 -05:00
parent 9d830d7207
commit 9360e13cdd
5 changed files with 230 additions and 194 deletions

View file

@ -654,8 +654,10 @@ static void drawCurStepValue() {
tft_string.set(F("Offset")); tft_string.set(F("Offset"));
tft.canvas(motionAxisState.zTypePos.x, motionAxisState.zTypePos.y + 34, tft_string.width(), 34); tft.canvas(motionAxisState.zTypePos.x, motionAxisState.zTypePos.y + 34, tft_string.width(), 34);
tft.set_background(COLOR_BACKGROUND); tft.set_background(COLOR_BACKGROUND);
#if HAS_BED_PROBE
if (motionAxisState.z_selection == Z_SELECTION_Z_PROBE) if (motionAxisState.z_selection == Z_SELECTION_Z_PROBE)
tft.add_text(0, 0, Z_BTN_COLOR, tft_string); tft.add_text(0, 0, Z_BTN_COLOR, tft_string);
#endif
} }
#endif #endif
@ -717,7 +719,8 @@ static void moveAxis(const AxisEnum axis, const int8_t direction) {
const float diff = motionAxisState.currentStepSize * direction; const float diff = motionAxisState.currentStepSize * direction;
#if HAS_Z_AXIS #if HAS_BED_PROBE
if (axis == Z_AXIS && motionAxisState.z_selection == Z_SELECTION_Z_PROBE) { if (axis == Z_AXIS && motionAxisState.z_selection == Z_SELECTION_Z_PROBE) {
#if ENABLED(BABYSTEP_ZPROBE_OFFSET) #if ENABLED(BABYSTEP_ZPROBE_OFFSET)
const int16_t babystep_increment = direction * BABYSTEP_SIZE_Z; const int16_t babystep_increment = direction * BABYSTEP_SIZE_Z;
@ -740,7 +743,7 @@ static void moveAxis(const AxisEnum axis, const int8_t direction) {
else else
drawMessage(GET_TEXT_F(MSG_LCD_SOFT_ENDSTOPS)); drawMessage(GET_TEXT_F(MSG_LCD_SOFT_ENDSTOPS));
#elif HAS_BED_PROBE #else
// only change probe.offset.z // only change probe.offset.z
probe.offset.z += diff; probe.offset.z += diff;
if (direction < 0 && current_position[axis] < Z_PROBE_OFFSET_RANGE_MIN) { if (direction < 0 && current_position[axis] < Z_PROBE_OFFSET_RANGE_MIN) {
@ -758,7 +761,8 @@ static void moveAxis(const AxisEnum axis, const int8_t direction) {
#endif #endif
return; return;
} }
#endif // HAS_Z_AXIS
#endif // HAS_BED_PROBE
if (!ui.manual_move.processing) { if (!ui.manual_move.processing) {
// Get motion limit from software endstops, if any // Get motion limit from software endstops, if any
@ -852,7 +856,7 @@ static void disable_steppers() {
} }
static void drawBtn(int x, int y, const char *label, intptr_t data, MarlinImage img, uint16_t bgColor, bool enabled = true) { static void drawBtn(int x, int y, const char *label, intptr_t data, MarlinImage img, uint16_t bgColor, bool enabled = true) {
uint16_t width = Images[imgBtn52Rounded].width, const uint16_t width = Images[imgBtn52Rounded].width,
height = Images[imgBtn52Rounded].height; height = Images[imgBtn52Rounded].height;
if (!enabled) bgColor = COLOR_CONTROL_DISABLED; if (!enabled) bgColor = COLOR_CONTROL_DISABLED;
@ -887,8 +891,9 @@ void MarlinUI::move_axis_screen() {
const bool busy = printingIsActive(); const bool busy = printingIsActive();
// Babysteps during printing? Select babystep for Z probe offset // Babysteps during printing? Select babystep for Z probe offset
if (busy && ENABLED(BABYSTEP_ZPROBE_OFFSET)) #if ENABLED(BABYSTEP_ZPROBE_OFFSET)
motionAxisState.z_selection = Z_SELECTION_Z_PROBE; if (busy) motionAxisState.z_selection = Z_SELECTION_Z_PROBE;
#endif
// ROW 1 -> E- Y- CurY Z+ // ROW 1 -> E- Y- CurY Z+
int x = X_MARGIN, y = Y_MARGIN, spacing = 0; int x = X_MARGIN, y = Y_MARGIN, spacing = 0;
@ -897,13 +902,16 @@ void MarlinUI::move_axis_screen() {
spacing = (TFT_WIDTH - X_MARGIN * 2 - 3 * BTN_WIDTH) / 2; spacing = (TFT_WIDTH - X_MARGIN * 2 - 3 * BTN_WIDTH) / 2;
x += BTN_WIDTH + spacing; x += BTN_WIDTH + spacing;
drawBtn(x, y, "Y+", (intptr_t)y_plus, imgUp, Y_BTN_COLOR, !busy);
TERN_(HAS_Y_AXIS, drawBtn(x, y, "Y+", (intptr_t)y_plus, imgUp, Y_BTN_COLOR, !busy));
x += BTN_WIDTH;
// Cur Y // Cur Y
x += BTN_WIDTH; #if HAS_Y_AXIS
motionAxisState.yValuePos.x = x + 2; motionAxisState.yValuePos.set(x + 2, y);
motionAxisState.yValuePos.y = y;
drawAxisValue(Y_AXIS); drawAxisValue(Y_AXIS);
#endif
x += spacing; x += spacing;
#if HAS_Z_AXIS #if HAS_Z_AXIS
@ -915,27 +923,34 @@ void MarlinUI::move_axis_screen() {
x = X_MARGIN; x = X_MARGIN;
spacing = (TFT_WIDTH - X_MARGIN * 2 - 5 * BTN_WIDTH) / 4; spacing = (TFT_WIDTH - X_MARGIN * 2 - 5 * BTN_WIDTH) / 4;
motionAxisState.eNamePos.x = x;
motionAxisState.eNamePos.y = y;
#if HAS_EXTRUDERS #if HAS_EXTRUDERS
motionAxisState.eNamePos.set(x, y);
drawCurESelection(); drawCurESelection();
TERN_(TOUCH_SCREEN, if (!busy) touch.add_control(BUTTON, x, y, BTN_WIDTH, BTN_HEIGHT, (intptr_t)e_select)); TERN_(TOUCH_SCREEN, if (!busy) touch.add_control(BUTTON, x, y, BTN_WIDTH, BTN_HEIGHT, (intptr_t)e_select));
#endif #endif
x += BTN_WIDTH + spacing; x += BTN_WIDTH + spacing;
drawBtn(x, y, "X-", (intptr_t)x_minus, imgLeft, X_BTN_COLOR, !busy);
TERN_(HAS_X_AXIS, drawBtn(x, y, "X-", (intptr_t)x_minus, imgLeft, X_BTN_COLOR, !busy));
x += BTN_WIDTH + spacing; //imgHome is 64x64 x += BTN_WIDTH + spacing; //imgHome is 64x64
TERN_(TOUCH_SCREEN, add_control(TFT_WIDTH / 2 - Images[imgHome].width / 2, y - (Images[imgHome].width - BTN_HEIGHT) / 2, BUTTON, (intptr_t)do_home, imgHome, !busy));
#if ALL(HAS_X_AXIS, TOUCH_SCREEN)
add_control(TFT_WIDTH / 2 - Images[imgHome].width / 2, y - (Images[imgHome].width - BTN_HEIGHT) / 2, BUTTON, (intptr_t)do_home, imgHome, !busy);
#endif
x += BTN_WIDTH + spacing; x += BTN_WIDTH + spacing;
uint16_t xplus_x = x; uint16_t xplus_x = x;
drawBtn(x, y, "X+", (intptr_t)x_plus, imgRight, X_BTN_COLOR, !busy);
TERN_(HAS_X_AXIS, drawBtn(x, y, "X+", (intptr_t)x_plus, imgRight, X_BTN_COLOR, !busy));
x += BTN_WIDTH + spacing; x += BTN_WIDTH + spacing;
motionAxisState.zTypePos.x = x;
motionAxisState.zTypePos.y = y; #if HAS_Z_AXIS
TERN_(HAS_Z_AXIS, drawCurZSelection()); motionAxisState.zTypePos.set(x, y);
drawCurZSelection();
#endif
#if ALL(HAS_BED_PROBE, TOUCH_SCREEN) #if ALL(HAS_BED_PROBE, TOUCH_SCREEN)
if (!busy) touch.add_control(BUTTON, x, y, BTN_WIDTH, 34 * 2, (intptr_t)z_select); if (!busy) touch.add_control(BUTTON, x, y, BTN_WIDTH, 34 * 2, (intptr_t)z_select);
#endif #endif
@ -945,39 +960,35 @@ void MarlinUI::move_axis_screen() {
x = X_MARGIN; x = X_MARGIN;
spacing = (TFT_WIDTH - X_MARGIN * 2 - 3 * BTN_WIDTH) / 2; spacing = (TFT_WIDTH - X_MARGIN * 2 - 3 * BTN_WIDTH) / 2;
TERN_(HAS_EXTRUDERS, drawBtn(x, y, "E-", (intptr_t)e_minus, imgDown, E_BTN_COLOR, !busy)); #if HAS_EXTRUDERS
drawBtn(x, y, "E-", (intptr_t)e_minus, imgDown, E_BTN_COLOR, !busy);
// Cur E motionAxisState.eValuePos.set(x, y + BTN_HEIGHT + 2);
motionAxisState.eValuePos.x = x;
motionAxisState.eValuePos.y = y + BTN_HEIGHT + 2;
TERN_(HAS_EXTRUDERS, drawAxisValue(E_AXIS)); TERN_(HAS_EXTRUDERS, drawAxisValue(E_AXIS));
// Cur X
motionAxisState.xValuePos.x = BTN_WIDTH + (TFT_WIDTH - X_MARGIN * 2 - 5 * BTN_WIDTH) / 4; //X- pos
motionAxisState.xValuePos.y = y - 10;
drawAxisValue(X_AXIS);
x += BTN_WIDTH + spacing;
drawBtn(x, y, "Y-", (intptr_t)y_minus, imgDown, Y_BTN_COLOR, !busy);
x += BTN_WIDTH + spacing;
#if HAS_Z_AXIS
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
#endif #endif
// Cur Z #if HAS_X_AXIS
motionAxisState.zValuePos.x = x; motionAxisState.xValuePos.set(BTN_WIDTH + (TFT_WIDTH - X_MARGIN * 2 - 5 * BTN_WIDTH) / 4, y - 10);
motionAxisState.zValuePos.y = y + BTN_HEIGHT + 2; drawAxisValue(X_AXIS);
TERN_(HAS_Z_AXIS, drawAxisValue(Z_AXIS)); #endif
x += BTN_WIDTH + spacing;
TERN_(HAS_Y_AXIS, drawBtn(x, y, "Y-", (intptr_t)y_minus, imgDown, Y_BTN_COLOR, !busy));
x += BTN_WIDTH + spacing;
#if HAS_Z_AXIS
drawBtn(x, y, "Z-", (intptr_t)z_minus, imgDown, Z_BTN_COLOR, !busy || ENABLED(BABYSTEP_ZPROBE_OFFSET)); // Only enabled when not busy or have babystep
motionAxisState.zValuePos.set(x, y + BTN_HEIGHT + 2);
drawAxisValue(Z_AXIS);
#endif
// ROW 4 -> step_size disable steppers back // ROW 4 -> step_size disable steppers back
y = TFT_HEIGHT - Y_MARGIN - 32; // y = TFT_HEIGHT - Y_MARGIN - 32;
x = TFT_WIDTH / 2 - CUR_STEP_VALUE_WIDTH / 2; x = TFT_WIDTH / 2 - CUR_STEP_VALUE_WIDTH / 2;
motionAxisState.stepValuePos.x = x; motionAxisState.stepValuePos.set(x, y);
motionAxisState.stepValuePos.y = y;
if (!busy) { if (!busy) {
drawCurStepValue(); drawCurStepValue();
TERN_(TOUCH_SCREEN, touch.add_control(BUTTON, motionAxisState.stepValuePos.x, motionAxisState.stepValuePos.y, CUR_STEP_VALUE_WIDTH, BTN_HEIGHT, (intptr_t)step_size)); TERN_(TOUCH_SCREEN, touch.add_control(BUTTON, x, y, CUR_STEP_VALUE_WIDTH, BTN_HEIGHT, (intptr_t)step_size));
} }
// aligned with x+ // aligned with x+

View file

@ -739,8 +739,10 @@ static void drawCurStepValue() {
tft_string.set(F("Offset")); tft_string.set(F("Offset"));
tft.canvas(motionAxisState.zTypePos.x, motionAxisState.zTypePos.y + 34, tft_string.width(), 20); tft.canvas(motionAxisState.zTypePos.x, motionAxisState.zTypePos.y + 34, tft_string.width(), 20);
tft.set_background(COLOR_BACKGROUND); tft.set_background(COLOR_BACKGROUND);
#if HAS_BED_PROBE
if (motionAxisState.z_selection == Z_SELECTION_Z_PROBE) if (motionAxisState.z_selection == Z_SELECTION_Z_PROBE)
tft.add_text(0, 0, Z_BTN_COLOR, tft_string); tft.add_text(0, 0, Z_BTN_COLOR, tft_string);
#endif
} }
#endif #endif
@ -809,7 +811,8 @@ static void moveAxis(const AxisEnum axis, const int8_t direction) {
const float diff = motionAxisState.currentStepSize * direction; const float diff = motionAxisState.currentStepSize * direction;
#if HAS_Z_AXIS #if HAS_BED_PROBE
if (axis == Z_AXIS && motionAxisState.z_selection == Z_SELECTION_Z_PROBE) { if (axis == Z_AXIS && motionAxisState.z_selection == Z_SELECTION_Z_PROBE) {
#if ENABLED(BABYSTEP_ZPROBE_OFFSET) #if ENABLED(BABYSTEP_ZPROBE_OFFSET)
const int16_t babystep_increment = direction * BABYSTEP_SIZE_Z; const int16_t babystep_increment = direction * BABYSTEP_SIZE_Z;
@ -829,10 +832,10 @@ static void moveAxis(const AxisEnum axis, const int8_t direction) {
drawMessage(NUL_STR); // clear the error drawMessage(NUL_STR); // clear the error
drawAxisValue(axis); drawAxisValue(axis);
} }
else { else
drawMessage(GET_TEXT_F(MSG_LCD_SOFT_ENDSTOPS)); drawMessage(GET_TEXT_F(MSG_LCD_SOFT_ENDSTOPS));
}
#elif HAS_BED_PROBE #else
// only change probe.offset.z // only change probe.offset.z
probe.offset.z += diff; probe.offset.z += diff;
if (direction < 0 && current_position[axis] < Z_PROBE_OFFSET_RANGE_MIN) { if (direction < 0 && current_position[axis] < Z_PROBE_OFFSET_RANGE_MIN) {
@ -843,14 +846,15 @@ static void moveAxis(const AxisEnum axis, const int8_t direction) {
current_position[axis] = Z_PROBE_OFFSET_RANGE_MAX; current_position[axis] = Z_PROBE_OFFSET_RANGE_MAX;
drawMessage(GET_TEXT_F(MSG_LCD_SOFT_ENDSTOPS)); drawMessage(GET_TEXT_F(MSG_LCD_SOFT_ENDSTOPS));
} }
else { else
drawMessage(NUL_STR); // clear the error drawMessage(NUL_STR); // clear the error
}
drawAxisValue(axis); drawAxisValue(axis);
#endif #endif
return; return;
} }
#endif // HAS_Z_AXIS
#endif // HAS_BED_PROBE
if (!ui.manual_move.processing) { if (!ui.manual_move.processing) {
// Get motion limit from software endstops, if any // Get motion limit from software endstops, if any
@ -945,8 +949,8 @@ static void disable_steppers() {
} }
static void drawBtn(int x, int y, const char *label, intptr_t data, MarlinImage img, uint16_t bgColor, bool enabled = true) { static void drawBtn(int x, int y, const char *label, intptr_t data, MarlinImage img, uint16_t bgColor, bool enabled = true) {
uint16_t width = Images[imgBtn39Rounded].width; const uint16_t width = Images[imgBtn39Rounded].width,
uint16_t height = Images[imgBtn39Rounded].height; height = Images[imgBtn39Rounded].height;
if (!enabled) bgColor = COLOR_CONTROL_DISABLED; if (!enabled) bgColor = COLOR_CONTROL_DISABLED;
@ -979,23 +983,26 @@ void MarlinUI::move_axis_screen() {
const bool busy = printingIsActive(); const bool busy = printingIsActive();
// Babysteps during printing? Select babystep for Z probe offset // Babysteps during printing? Select babystep for Z probe offset
if (busy && ENABLED(BABYSTEP_ZPROBE_OFFSET)) #if ENABLED(BABYSTEP_ZPROBE_OFFSET)
motionAxisState.z_selection = Z_SELECTION_Z_PROBE; if (busy) motionAxisState.z_selection = Z_SELECTION_Z_PROBE;
#endif
#if ENABLED(TFT_COLOR_UI_PORTRAIT) #if ENABLED(TFT_COLOR_UI_PORTRAIT)
// ROW 1 -> E+ Y+ Z+ // ROW 1 -> E+ Y+ Z+
int x = X_MARGIN, y = Y_MARGIN, spacing = 0; int x = X_MARGIN, y = Y_MARGIN, spacing = 0;
drawBtn(x, y, "E+", (intptr_t)e_plus, imgUp, E_BTN_COLOR, !busy); TERN_(HAS_EXTRUDERS, drawBtn(x, y, "E+", (intptr_t)e_plus, imgUp, E_BTN_COLOR, !busy));
spacing = (TFT_WIDTH - X_MARGIN * 2 - 3 * BTN_WIDTH) / 2; spacing = (TFT_WIDTH - X_MARGIN * 2 - 3 * BTN_WIDTH) / 2;
x += BTN_WIDTH + spacing; x += BTN_WIDTH + spacing;
uint16_t yplus_x = x; uint16_t yplus_x = x;
drawBtn(x, y, "Y+", (intptr_t)y_plus, imgUp, Y_BTN_COLOR, !busy);
TERN_(HAS_Y_AXIS, drawBtn(x, y, "Y+", (intptr_t)y_plus, imgUp, Y_BTN_COLOR, !busy));
x += BTN_WIDTH + spacing; x += BTN_WIDTH + spacing;
uint16_t zplus_x = x; uint16_t zplus_x = x;
#if HAS_Z_AXIS #if HAS_Z_AXIS
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 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
#endif #endif
@ -1004,30 +1011,31 @@ void MarlinUI::move_axis_screen() {
x = X_MARGIN; x = X_MARGIN;
y += BTN_HEIGHT + 2; y += BTN_HEIGHT + 2;
motionAxisState.eNamePos.x = x;
motionAxisState.eNamePos.y = y;
#if HAS_EXTRUDERS #if HAS_EXTRUDERS
motionAxisState.eNamePos.set(x, y);
drawCurESelection(); drawCurESelection();
TERN_(TOUCH_SCREEN, if (!busy) touch.add_control(BUTTON, x, y, BTN_WIDTH, BTN_HEIGHT, (intptr_t)e_select)); TERN_(TOUCH_SCREEN, if (!busy) touch.add_control(BUTTON, x, y, BTN_WIDTH, BTN_HEIGHT, (intptr_t)e_select));
#endif #endif
motionAxisState.yValuePos.x = yplus_x; #if HAS_Y_AXIS
motionAxisState.yValuePos.y = y; motionAxisState.yValuePos.set(yplus_x, y);
drawAxisValue(Y_AXIS); drawAxisValue(Y_AXIS);
#endif
motionAxisState.zTypePos.x = zplus_x; #if HAS_Z_AXIS
motionAxisState.zTypePos.y = y; motionAxisState.zTypePos.set(zplus_x, y);
TERN_(HAS_Z_AXIS, drawCurZSelection()); drawCurZSelection();
#endif
// ROW 3 -> X- HOME X+ // ROW 3 -> X- HOME X+
y += (TFT_HEIGHT - Y_MARGIN * 2 - 4 * BTN_HEIGHT) / 3 - 2; y += (TFT_HEIGHT - Y_MARGIN * 2 - 4 * BTN_HEIGHT) / 3 - 2;
x = X_MARGIN; x = X_MARGIN;
#if HAS_X_AXIS
drawBtn(x, y, "X-", (intptr_t)x_minus, imgLeft, X_BTN_COLOR, !busy); drawBtn(x, y, "X-", (intptr_t)x_minus, imgLeft, X_BTN_COLOR, !busy);
TERN_(TOUCH_SCREEN, add_control(TFT_WIDTH / 2 - Images[imgHome].width / 2, y - (Images[imgHome].width - BTN_HEIGHT) / 2, BUTTON, (intptr_t)do_home, imgHome, !busy)); TERN_(TOUCH_SCREEN, add_control(TFT_WIDTH / 2 - Images[imgHome].width / 2, y - (Images[imgHome].width - BTN_HEIGHT) / 2, BUTTON, (intptr_t)do_home, imgHome, !busy));
drawBtn(zplus_x, y, "X+", (intptr_t)x_plus, imgRight, X_BTN_COLOR, !busy); drawBtn(zplus_x, y, "X+", (intptr_t)x_plus, imgRight, X_BTN_COLOR, !busy);
#endif
#if ALL(HAS_BED_PROBE, TOUCH_SCREEN) #if ALL(HAS_BED_PROBE, TOUCH_SCREEN)
if (!busy) touch.add_control(BUTTON, x, y, BTN_WIDTH, 34 * 2, (intptr_t)z_select); if (!busy) touch.add_control(BUTTON, x, y, BTN_WIDTH, 34 * 2, (intptr_t)z_select);
@ -1036,9 +1044,10 @@ void MarlinUI::move_axis_screen() {
// ROW 4 -> Cur X // ROW 4 -> Cur X
y += BTN_HEIGHT + 2; y += BTN_HEIGHT + 2;
motionAxisState.xValuePos.x = x; #if HAS_X_AXIS
motionAxisState.xValuePos.y = y; motionAxisState.xValuePos.set(x, y);
drawAxisValue(X_AXIS); drawAxisValue(X_AXIS);
#endif
// ROW 5 -> E- CurX Y- Z- // ROW 5 -> E- CurX Y- Z-
y += (TFT_HEIGHT - Y_MARGIN * 2 - 4 * BTN_HEIGHT) / 3 - 2; y += (TFT_HEIGHT - Y_MARGIN * 2 - 4 * BTN_HEIGHT) / 3 - 2;
@ -1046,31 +1055,26 @@ void MarlinUI::move_axis_screen() {
#if HAS_EXTRUDERS #if HAS_EXTRUDERS
drawBtn(x, y, "E-", (intptr_t)e_minus, imgDown, E_BTN_COLOR, !busy); drawBtn(x, y, "E-", (intptr_t)e_minus, imgDown, E_BTN_COLOR, !busy);
motionAxisState.eValuePos.set(x, y + BTN_HEIGHT + 2);
TERN_(HAS_EXTRUDERS, drawAxisValue(E_AXIS));
#endif #endif
// Cur E x += BTN_WIDTH + spacing;
motionAxisState.eValuePos.x = x;
motionAxisState.eValuePos.y = y + BTN_HEIGHT + 2; TERN_(HAS_Y_AXIS, drawBtn(x, y, "Y-", (intptr_t)y_minus, imgDown, Y_BTN_COLOR, !busy));
TERN_(HAS_EXTRUDERS, drawAxisValue(E_AXIS));
x += BTN_WIDTH + spacing; x += BTN_WIDTH + spacing;
drawBtn(x, y, "Y-", (intptr_t)y_minus, imgDown, Y_BTN_COLOR, !busy);
x += BTN_WIDTH + spacing;
#if HAS_Z_AXIS #if HAS_Z_AXIS
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 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
motionAxisState.zValuePos.set(x, y + BTN_HEIGHT + 2);
drawAxisValue(Z_AXIS);
#endif #endif
// Cur Z
motionAxisState.zValuePos.x = x;
motionAxisState.zValuePos.y = y + BTN_HEIGHT + 2;
TERN_(HAS_Z_AXIS, drawAxisValue(Z_AXIS));
// ROW 6 -> step_size disable steppers back // ROW 6 -> step_size disable steppers back
y = TFT_HEIGHT - Y_MARGIN - BTN_HEIGHT; // y = TFT_HEIGHT - Y_MARGIN - BTN_HEIGHT;
x = zplus_x - CUR_STEP_VALUE_WIDTH - 10; x = zplus_x - CUR_STEP_VALUE_WIDTH - 10;
motionAxisState.stepValuePos.x = X_MARGIN + BTN_WIDTH - CUR_STEP_VALUE_WIDTH; motionAxisState.stepValuePos.set(X_MARGIN + BTN_WIDTH - CUR_STEP_VALUE_WIDTH, y);
motionAxisState.stepValuePos.y = TFT_HEIGHT - Y_MARGIN - BTN_HEIGHT;
if (!busy) { if (!busy) {
drawCurStepValue(); drawCurStepValue();
@ -1090,15 +1094,18 @@ void MarlinUI::move_axis_screen() {
spacing = (TFT_WIDTH - X_MARGIN * 2 - 3 * BTN_WIDTH) / 2; spacing = (TFT_WIDTH - X_MARGIN * 2 - 3 * BTN_WIDTH) / 2;
x += BTN_WIDTH + spacing; x += BTN_WIDTH + spacing;
uint16_t yplus_x = x; uint16_t yplus_x = x;
drawBtn(x, y, "Y+", (intptr_t)y_plus, imgUp, Y_BTN_COLOR, !busy);
// Cur Y TERN_(HAS_Y_AXIS, drawBtn(x, y, "Y+", (intptr_t)y_plus, imgUp, Y_BTN_COLOR, !busy));
x += BTN_WIDTH; x += BTN_WIDTH;
motionAxisState.yValuePos.x = x + 2;
motionAxisState.yValuePos.y = y; #if HAS_Y_AXIS
motionAxisState.yValuePos.set(x + 2, y);
drawAxisValue(Y_AXIS); drawAxisValue(Y_AXIS);
#endif
x += spacing; x += spacing;
#if HAS_Z_AXIS #if HAS_Z_AXIS
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 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
#endif #endif
@ -1108,27 +1115,34 @@ void MarlinUI::move_axis_screen() {
x = X_MARGIN; x = X_MARGIN;
spacing = (TFT_WIDTH - X_MARGIN * 2 - 5 * BTN_WIDTH) / 4; spacing = (TFT_WIDTH - X_MARGIN * 2 - 5 * BTN_WIDTH) / 4;
motionAxisState.eNamePos.x = x;
motionAxisState.eNamePos.y = y;
#if HAS_EXTRUDERS #if HAS_EXTRUDERS
motionAxisState.eNamePos.set(x, y);
drawCurESelection(); drawCurESelection();
TERN_(TOUCH_SCREEN, if (!busy) touch.add_control(BUTTON, x, y, BTN_WIDTH, BTN_HEIGHT, (intptr_t)e_select)); TERN_(TOUCH_SCREEN, if (!busy) touch.add_control(BUTTON, x, y, BTN_WIDTH, BTN_HEIGHT, (intptr_t)e_select));
#endif #endif
x += BTN_WIDTH + spacing; x += BTN_WIDTH + spacing;
drawBtn(x, y, "X-", (intptr_t)x_minus, imgLeft, X_BTN_COLOR, !busy);
TERN_(HAS_X_AXIS, drawBtn(x, y, "X-", (intptr_t)x_minus, imgLeft, X_BTN_COLOR, !busy));
x += BTN_WIDTH + spacing; //imgHome is 64x64 x += BTN_WIDTH + spacing; //imgHome is 64x64
TERN_(TOUCH_SCREEN, add_control(TFT_WIDTH / 2 - Images[imgHome].width / 2, y - (Images[imgHome].width - BTN_HEIGHT) / 2, BUTTON, (intptr_t)do_home, imgHome, !busy));
#if ALL(HAS_X_AXIS, TOUCH_SCREEN)
add_control(TFT_WIDTH / 2 - Images[imgHome].width / 2, y - (Images[imgHome].width - BTN_HEIGHT) / 2, BUTTON, (intptr_t)do_home, imgHome, !busy);
#endif
x += BTN_WIDTH + spacing; x += BTN_WIDTH + spacing;
uint16_t xplus_x = x; uint16_t xplus_x = x;
drawBtn(x, y, "X+", (intptr_t)x_plus, imgRight, X_BTN_COLOR, !busy);
TERN_(HAS_X_AXIS, drawBtn(x, y, "X+", (intptr_t)x_plus, imgRight, X_BTN_COLOR, !busy));
x += BTN_WIDTH + spacing; x += BTN_WIDTH + spacing;
motionAxisState.zTypePos.x = x;
motionAxisState.zTypePos.y = y; #if HAS_Z_AXIS
TERN_(HAS_Z_AXIS, drawCurZSelection()); motionAxisState.zTypePos.set(x, y);
drawCurZSelection();
#endif
#if ALL(HAS_BED_PROBE, TOUCH_SCREEN) #if ALL(HAS_BED_PROBE, TOUCH_SCREEN)
if (!busy) touch.add_control(BUTTON, x, y, BTN_WIDTH, 34 * 2, (intptr_t)z_select); if (!busy) touch.add_control(BUTTON, x, y, BTN_WIDTH, 34 * 2, (intptr_t)z_select);
#endif #endif
@ -1138,36 +1152,36 @@ void MarlinUI::move_axis_screen() {
x = X_MARGIN; x = X_MARGIN;
spacing = (TFT_WIDTH - X_MARGIN * 2 - 3 * BTN_WIDTH) / 2; spacing = (TFT_WIDTH - X_MARGIN * 2 - 3 * BTN_WIDTH) / 2;
TERN_(HAS_EXTRUDERS, drawBtn(x, y, "E-", (intptr_t)e_minus, imgDown, E_BTN_COLOR, !busy)); #if HAS_EXTRUDERS
drawBtn(x, y, "E-", (intptr_t)e_minus, imgDown, E_BTN_COLOR, !busy);
// Cur E motionAxisState.eValuePos.set(x, y + BTN_HEIGHT + 2);
motionAxisState.eValuePos.x = x;
motionAxisState.eValuePos.y = y + BTN_HEIGHT + 2;
TERN_(HAS_EXTRUDERS, drawAxisValue(E_AXIS)); TERN_(HAS_EXTRUDERS, drawAxisValue(E_AXIS));
#endif
// Cur X #if HAS_X_AXIS
motionAxisState.xValuePos.x = BTN_WIDTH + (TFT_WIDTH - X_MARGIN * 2 - 5 * BTN_WIDTH) / 4; //X- pos motionAxisState.xValuePos.set(BTN_WIDTH + (TFT_WIDTH - X_MARGIN * 2 - 5 * BTN_WIDTH) / 4, y - 10);
motionAxisState.xValuePos.y = y - 10;
drawAxisValue(X_AXIS); drawAxisValue(X_AXIS);
#endif
x += BTN_WIDTH + spacing; x += BTN_WIDTH + spacing;
drawBtn(x, y, "Y-", (intptr_t)y_minus, imgDown, Y_BTN_COLOR, !busy);
TERN_(HAS_Y_AXIS, drawBtn(x, y, "Y-", (intptr_t)y_minus, imgDown, Y_BTN_COLOR, !busy));
x += BTN_WIDTH + spacing; x += BTN_WIDTH + spacing;
#if HAS_Z_AXIS #if HAS_Z_AXIS
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 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
#endif #endif
// Cur Z #if HAS_Z_AXIS
motionAxisState.zValuePos.x = x; motionAxisState.zValuePos.set(x, y + BTN_HEIGHT + 2);
motionAxisState.zValuePos.y = y + BTN_HEIGHT + 2; drawAxisValue(Z_AXIS);
TERN_(HAS_Z_AXIS, drawAxisValue(Z_AXIS)); #endif
// ROW 4 -> step_size disable steppers back // ROW 4 -> step_size disable steppers back
y = TFT_HEIGHT - Y_MARGIN - BTN_HEIGHT; // y = TFT_HEIGHT - Y_MARGIN - BTN_HEIGHT;
x = xplus_x - CUR_STEP_VALUE_WIDTH - 10; x = xplus_x - CUR_STEP_VALUE_WIDTH - 10;
motionAxisState.stepValuePos.x = yplus_x + BTN_WIDTH - CUR_STEP_VALUE_WIDTH; motionAxisState.stepValuePos.set(yplus_x + BTN_WIDTH - CUR_STEP_VALUE_WIDTH, y);
motionAxisState.stepValuePos.y = TFT_HEIGHT - Y_MARGIN - BTN_HEIGHT;
if (!busy) { if (!busy) {
drawCurStepValue(); drawCurStepValue();
TERN_(TOUCH_SCREEN, touch.add_control(BUTTON, motionAxisState.stepValuePos.x, motionAxisState.stepValuePos.y, CUR_STEP_VALUE_WIDTH, BTN_HEIGHT, (intptr_t)step_size)); TERN_(TOUCH_SCREEN, touch.add_control(BUTTON, motionAxisState.stepValuePos.x, motionAxisState.stepValuePos.y, CUR_STEP_VALUE_WIDTH, BTN_HEIGHT, (intptr_t)step_size));

View file

@ -651,12 +651,16 @@ static void drawCurStepValue() {
tft.canvas(motionAxisState.zTypePos.x, motionAxisState.zTypePos.y, tft_string.width(), 34); tft.canvas(motionAxisState.zTypePos.x, motionAxisState.zTypePos.y, tft_string.width(), 34);
tft.set_background(COLOR_BACKGROUND); tft.set_background(COLOR_BACKGROUND);
tft.add_text(0, 0, Z_BTN_COLOR, tft_string); tft.add_text(0, 0, Z_BTN_COLOR, tft_string);
tft.queue.sync(); tft.queue.sync();
tft_string.set(F("Offset")); tft_string.set(F("Offset"));
tft.canvas(motionAxisState.zTypePos.x, motionAxisState.zTypePos.y + Y_OFFSET, tft_string.width(), Y_OFFSET TERN_(HAS_UI_480x272, - 10)); tft.canvas(motionAxisState.zTypePos.x, motionAxisState.zTypePos.y + Y_OFFSET, tft_string.width(), Y_OFFSET TERN_(HAS_UI_480x272, - 10));
tft.set_background(COLOR_BACKGROUND); tft.set_background(COLOR_BACKGROUND);
#if HAS_BED_PROBE
if (motionAxisState.z_selection == Z_SELECTION_Z_PROBE) if (motionAxisState.z_selection == Z_SELECTION_Z_PROBE)
tft.add_text(0, 0, Z_BTN_COLOR, tft_string); tft.add_text(0, 0, Z_BTN_COLOR, tft_string);
#endif
} }
#endif #endif
@ -718,7 +722,8 @@ static void moveAxis(const AxisEnum axis, const int8_t direction) {
const float diff = motionAxisState.currentStepSize * direction; const float diff = motionAxisState.currentStepSize * direction;
#if HAS_Z_AXIS #if HAS_BED_PROBE
if (axis == Z_AXIS && motionAxisState.z_selection == Z_SELECTION_Z_PROBE) { if (axis == Z_AXIS && motionAxisState.z_selection == Z_SELECTION_Z_PROBE) {
#if ENABLED(BABYSTEP_ZPROBE_OFFSET) #if ENABLED(BABYSTEP_ZPROBE_OFFSET)
const int16_t babystep_increment = direction * BABYSTEP_SIZE_Z; const int16_t babystep_increment = direction * BABYSTEP_SIZE_Z;
@ -738,10 +743,10 @@ static void moveAxis(const AxisEnum axis, const int8_t direction) {
drawMessage(NUL_STR); // clear the error drawMessage(NUL_STR); // clear the error
drawAxisValue(axis); drawAxisValue(axis);
} }
else { else
drawMessage(GET_TEXT_F(MSG_LCD_SOFT_ENDSTOPS)); drawMessage(GET_TEXT_F(MSG_LCD_SOFT_ENDSTOPS));
}
#elif HAS_BED_PROBE #else
// only change probe.offset.z // only change probe.offset.z
probe.offset.z += diff; probe.offset.z += diff;
if (direction < 0 && current_position[axis] < Z_PROBE_OFFSET_RANGE_MIN) { if (direction < 0 && current_position[axis] < Z_PROBE_OFFSET_RANGE_MIN) {
@ -752,14 +757,15 @@ static void moveAxis(const AxisEnum axis, const int8_t direction) {
current_position[axis] = Z_PROBE_OFFSET_RANGE_MAX; current_position[axis] = Z_PROBE_OFFSET_RANGE_MAX;
drawMessage(GET_TEXT_F(MSG_LCD_SOFT_ENDSTOPS)); drawMessage(GET_TEXT_F(MSG_LCD_SOFT_ENDSTOPS));
} }
else { else
drawMessage(NUL_STR); // clear the error drawMessage(NUL_STR); // clear the error
}
drawAxisValue(axis); drawAxisValue(axis);
#endif #endif
return; return;
} }
#endif // HAS_Z_AXIS
#endif // HAS_BED_PROBE
if (!ui.manual_move.processing) { if (!ui.manual_move.processing) {
// Get motion limit from software endstops, if any // Get motion limit from software endstops, if any
@ -853,7 +859,7 @@ static void disable_steppers() {
} }
static void drawBtn(int x, int y, const char *label, intptr_t data, MarlinImage img, uint16_t bgColor, bool enabled = true) { static void drawBtn(int x, int y, const char *label, intptr_t data, MarlinImage img, uint16_t bgColor, bool enabled = true) {
uint16_t width = Images[imgBtn52Rounded].width, const uint16_t width = Images[imgBtn52Rounded].width,
height = Images[imgBtn52Rounded].height; height = Images[imgBtn52Rounded].height;
if (!enabled) bgColor = COLOR_CONTROL_DISABLED; if (!enabled) bgColor = COLOR_CONTROL_DISABLED;
@ -888,9 +894,9 @@ void MarlinUI::move_axis_screen() {
const bool busy = printingIsActive(); const bool busy = printingIsActive();
// Babysteps during printing? Select babystep for Z probe offset // Babysteps during printing? Select babystep for Z probe offset
if (busy && ENABLED(BABYSTEP_ZPROBE_OFFSET)) #if ENABLED(BABYSTEP_ZPROBE_OFFSET)
if (busy) motionAxisState.z_selection = Z_SELECTION_Z_PROBE;
TERN_(HAS_Z_AXIS, motionAxisState.z_selection = Z_SELECTION_Z_PROBE); #endif
// ROW 1 -> E+ Y+ CurY Z+ // ROW 1 -> E+ Y+ CurY Z+
int x = X_MARGIN, y = Y_MARGIN, spacing = 0; int x = X_MARGIN, y = Y_MARGIN, spacing = 0;
@ -902,11 +908,11 @@ void MarlinUI::move_axis_screen() {
TERN_(HAS_Y_AXIS, drawBtn(x, y, "Y+", (intptr_t)y_plus, imgUp, Y_BTN_COLOR, !busy)); TERN_(HAS_Y_AXIS, drawBtn(x, y, "Y+", (intptr_t)y_plus, imgUp, Y_BTN_COLOR, !busy));
// Cur Y
x += BTN_WIDTH; x += BTN_WIDTH;
// Cur Y
#if HAS_Y_AXIS #if HAS_Y_AXIS
motionAxisState.yValuePos.x = x + 2; motionAxisState.yValuePos.set(x + 2, y);
motionAxisState.yValuePos.y = y;
drawAxisValue(Y_AXIS); drawAxisValue(Y_AXIS);
#endif #endif
@ -920,50 +926,55 @@ void MarlinUI::move_axis_screen() {
x = X_MARGIN; x = X_MARGIN;
spacing = (TFT_WIDTH - X_MARGIN * 2 - 5 * BTN_WIDTH) / 4; spacing = (TFT_WIDTH - X_MARGIN * 2 - 5 * BTN_WIDTH) / 4;
motionAxisState.eNamePos.x = x;
motionAxisState.eNamePos.y = y;
#if HAS_EXTRUDERS #if HAS_EXTRUDERS
motionAxisState.eNamePos.set(x, y);
drawCurESelection(); drawCurESelection();
TERN_(TOUCH_SCREEN, if (!busy) touch.add_control(BUTTON, x, y, BTN_WIDTH, BTN_HEIGHT, (intptr_t)e_select)); TERN_(TOUCH_SCREEN, if (!busy) touch.add_control(BUTTON, x, y, BTN_WIDTH, BTN_HEIGHT, (intptr_t)e_select));
#endif #endif
x += BTN_WIDTH + spacing; x += BTN_WIDTH + spacing;
drawBtn(x, y, "X-", (intptr_t)x_minus, imgLeft, X_BTN_COLOR, !busy);
TERN_(HAS_X_AXIS, drawBtn(x, y, "X-", (intptr_t)x_minus, imgLeft, X_BTN_COLOR, !busy));
x += BTN_WIDTH + spacing; //imgHome is 64x64 x += BTN_WIDTH + spacing; //imgHome is 64x64
TERN_(TOUCH_SCREEN, add_control(TFT_WIDTH / 2 - Images[imgHome].width / 2, y - (Images[imgHome].width - BTN_HEIGHT) / 2, BUTTON, (intptr_t)do_home, imgHome, !busy));
#if ALL(HAS_X_AXIS, TOUCH_SCREEN)
add_control(TFT_WIDTH / 2 - Images[imgHome].width / 2, y - (Images[imgHome].width - BTN_HEIGHT) / 2, BUTTON, (intptr_t)do_home, imgHome, !busy);
#endif
x += BTN_WIDTH + spacing; x += BTN_WIDTH + spacing;
uint16_t xplus_x = x; uint16_t xplus_x = x;
drawBtn(x, y, "X+", (intptr_t)x_plus, imgRight, X_BTN_COLOR, !busy);
TERN_(HAS_X_AXIS, drawBtn(x, y, "X+", (intptr_t)x_plus, imgRight, X_BTN_COLOR, !busy));
x += BTN_WIDTH + spacing; x += BTN_WIDTH + spacing;
motionAxisState.zTypePos.x = x;
motionAxisState.zTypePos.y = y; #if HAS_Z_AXIS
TERN_(HAS_Z_AXIS, drawCurZSelection()); motionAxisState.zTypePos.set(x, y);
drawCurZSelection();
#if ALL(HAS_BED_PROBE, TOUCH_SCREEN) #if ALL(HAS_BED_PROBE, TOUCH_SCREEN)
if (!busy) touch.add_control(BUTTON, x, y, BTN_WIDTH, Y_OFFSET * 2, (intptr_t)z_select); if (!busy) touch.add_control(BUTTON, x, y, BTN_WIDTH, Y_OFFSET * 2, (intptr_t)z_select);
#endif #endif
#endif
// ROW 3 -> E- CurX Y- Z- // ROW 3 -> E- CurX Y- Z-
y += BTN_HEIGHT + (TFT_HEIGHT - Y_MARGIN * 2 - 4 * BTN_HEIGHT) / 3; y += BTN_HEIGHT + (TFT_HEIGHT - Y_MARGIN * 2 - 4 * BTN_HEIGHT) / 3;
x = X_MARGIN; x = X_MARGIN;
spacing = (TFT_WIDTH - X_MARGIN * 2 - 3 * BTN_WIDTH) / 2; spacing = (TFT_WIDTH - X_MARGIN * 2 - 3 * BTN_WIDTH) / 2;
TERN_(HAS_EXTRUDERS, drawBtn(x, y, "E-", (intptr_t)e_minus, imgDown, E_BTN_COLOR, !busy)); #if HAS_EXTRUDERS
drawBtn(x, y, "E-", (intptr_t)e_minus, imgDown, E_BTN_COLOR, !busy);
motionAxisState.eValuePos.set(x, y + BTN_HEIGHT + 2);
drawAxisValue(E_AXIS);
#endif
// Cur E #if HAS_X_AXIS
motionAxisState.eValuePos.x = x; motionAxisState.xValuePos.set(BTN_WIDTH + (TFT_WIDTH - X_MARGIN * 2 - 5 * BTN_WIDTH) / 4, y - 10);
motionAxisState.eValuePos.y = y + BTN_HEIGHT + 2;
TERN_(HAS_EXTRUDERS, drawAxisValue(E_AXIS));
// Cur X
motionAxisState.xValuePos.x = BTN_WIDTH + (TFT_WIDTH - X_MARGIN * 2 - 5 * BTN_WIDTH) / 4; //X- pos
motionAxisState.xValuePos.y = y - 10;
TERN_(HAS_X_AXIS, drawAxisValue(X_AXIS)); TERN_(HAS_X_AXIS, drawAxisValue(X_AXIS));
#endif
x += BTN_WIDTH + spacing; x += BTN_WIDTH + spacing;
drawBtn(x, y, "Y-", (intptr_t)y_minus, imgDown, Y_BTN_COLOR, !busy); TERN_(HAS_Y_AXIS, drawBtn(x, y, "Y-", (intptr_t)y_minus, imgDown, Y_BTN_COLOR, !busy));
x += BTN_WIDTH + spacing; x += BTN_WIDTH + spacing;
#if HAS_Z_AXIS #if HAS_Z_AXIS
@ -971,15 +982,15 @@ void MarlinUI::move_axis_screen() {
#endif #endif
// Cur Z // Cur Z
motionAxisState.zValuePos.x = x; #if HAS_Z_AXIS
motionAxisState.zValuePos.y = y + BTN_HEIGHT + 2; motionAxisState.zValuePos.set(x, y + BTN_HEIGHT + 2);
TERN_(HAS_Z_AXIS, drawAxisValue(Z_AXIS)); drawAxisValue(Z_AXIS);
#endif
// ROW 4 -> step_size disable steppers back // ROW 4 -> step_size disable steppers back
y = TFT_HEIGHT - Y_MARGIN - TERN(HAS_UI_480x272, BTN_WIDTH / 2, 32); y = TFT_HEIGHT - Y_MARGIN - TERN(HAS_UI_480x272, BTN_WIDTH / 2, 32);
x = TFT_WIDTH / 2 - CUR_STEP_VALUE_WIDTH / 2; x = TFT_WIDTH / 2 - CUR_STEP_VALUE_WIDTH / 2;
motionAxisState.stepValuePos.x = x; motionAxisState.stepValuePos.set(x, y);
motionAxisState.stepValuePos.y = y;
if (!busy) { if (!busy) {
drawCurStepValue(); drawCurStepValue();
TERN_(TOUCH_SCREEN, touch.add_control(BUTTON, motionAxisState.stepValuePos.x, motionAxisState.stepValuePos.y, CUR_STEP_VALUE_WIDTH, BTN_HEIGHT, (intptr_t)step_size)); TERN_(TOUCH_SCREEN, touch.add_control(BUTTON, motionAxisState.stepValuePos.x, motionAxisState.stepValuePos.y, CUR_STEP_VALUE_WIDTH, BTN_HEIGHT, (intptr_t)step_size));

View file

@ -103,7 +103,7 @@
* - Rows count: 6 * - Rows count: 6
* - Margins count: 7 * - Margins count: 7
*/ */
#ifdef TFT_COLOR_UI_PORTRAIT #if ENABLED(TFT_COLOR_UI_PORTRAIT)
#if ENABLED(TOUCH_SCREEN) #if ENABLED(TOUCH_SCREEN)
#define STATUS_TOTAL_ROWS_HEIGHT (2 * FONT_LINE_HEIGHT + 120 + 32 + 64 + 29 + 7) #define STATUS_TOTAL_ROWS_HEIGHT (2 * FONT_LINE_HEIGHT + 120 + 32 + 64 + 29 + 7)
#define STATUS_MARGINS_REGIONS 8 #define STATUS_MARGINS_REGIONS 8

View file

@ -307,7 +307,7 @@
#define TFT_CS_PIN FSMC_CS_PIN #define TFT_CS_PIN FSMC_CS_PIN
#define TFT_RS_PIN FSMC_RS_PIN #define TFT_RS_PIN FSMC_RS_PIN
#ifdef TFT_CLASSIC_UI #if ENABLED(TFT_CLASSIC_UI)
#define TFT_MARLINBG_COLOR 0x3186 // Grey #define TFT_MARLINBG_COLOR 0x3186 // Grey
#define TFT_MARLINUI_COLOR 0xC7B6 // Green #define TFT_MARLINUI_COLOR 0xC7B6 // Green
#define TFT_BTARROWS_COLOR 0xDEE6 // Yellow #define TFT_BTARROWS_COLOR 0xDEE6 // Yellow