From f373e2091fd9c26aa8d9b7715366ca8f1d5ae0ad Mon Sep 17 00:00:00 2001 From: Victor Mateus Oliveira Date: Sun, 13 Sep 2020 20:20:56 -0300 Subject: [PATCH 01/15] full move axis screen for the color ui --- .../src/lcd/tft/bitmaps/btn_64x52_rounded.bmp | Bin 0 -> 10040 bytes Marlin/src/lcd/tft/bitmaps/home.bmp | Bin 0 -> 12344 bytes .../lcd/tft/images/btn_rounded_64x52x4.cpp | 82 ++++ Marlin/src/lcd/tft/images/home_64x64x4.cpp | 94 +++++ Marlin/src/lcd/tft/tft_color.h | 6 +- Marlin/src/lcd/tft/tft_image.cpp | 2 + Marlin/src/lcd/tft/tft_image.h | 6 + Marlin/src/lcd/tft/touch.cpp | 7 + Marlin/src/lcd/tft/touch.h | 2 + Marlin/src/lcd/tft/ui_320x240.cpp | 3 + Marlin/src/lcd/tft/ui_320x240.h | 2 + Marlin/src/lcd/tft/ui_480x320.cpp | 373 ++++++++++++++++++ Marlin/src/lcd/tft/ui_480x320.h | 2 + Marlin/src/lcd/ultralcd.h | 4 + 14 files changed, 581 insertions(+), 2 deletions(-) create mode 100644 Marlin/src/lcd/tft/bitmaps/btn_64x52_rounded.bmp create mode 100644 Marlin/src/lcd/tft/bitmaps/home.bmp create mode 100644 Marlin/src/lcd/tft/images/btn_rounded_64x52x4.cpp create mode 100644 Marlin/src/lcd/tft/images/home_64x64x4.cpp diff --git a/Marlin/src/lcd/tft/bitmaps/btn_64x52_rounded.bmp b/Marlin/src/lcd/tft/bitmaps/btn_64x52_rounded.bmp new file mode 100644 index 0000000000000000000000000000000000000000..04e879dbb0d8ff6406b5808f0e3cdcba32af85fb GIT binary patch literal 10040 zcmeI2OG{fp7>3jSh|)h$+8`{3Z=(1tRbAyb?WP7Gfr@bKp5=9e}B%<=JYp-`X^Spq6*ZEf{T zAfE59&HO1y*4EapudhMf*w|nTQH9_?KR+i)nXC(|LltPQ3AtT0kh0koJN0ntyGLO`m0b?eomvmyjChk8vRwM zDnF;uUtTK}BaQwlRF$98=r6C8ijhWt6{^b5`9k#9_W3zr*3;&O&!08-FaE*rbUHC* zboP&g&nxt|{3HB3k-?h86k}1axv`LhQ%}7FUDL!64B}J+V1m~2@9(`m#PC9oE_lU-e1v;&S((*q1( zK*HMvwN|TvD*S6qy;7+}^6Kh}O``Mp0S*aZ@`Ad)zHXf#5Pv(4j*iIVUvF=3W2Djo zEP*BmArK!Y9b+9lAgk3X%Cn=y`3?A4fEK_zZPUI$()k3bX@R31T4SHSfVObmiN zM7RhNo>A~3M`FT(1aA;dcpwB8O-K|Fi0&5(n@;sicTZ2x4D3<~Jyq2;e|`Voe^>qW z5AlCQ{O;H-;ao%bi{1PC$?+RChvR4N|N4vg+wI`;=+UFU4{ZVduR~t2{o&O>IF1?q zJ0^;u91}9`7z$AjFvHKJ4Gj%D0)<@+BoDd@(vYn(>kZ(WL+6$&=^LpU=w5LKI)o z0!uym{K6%|!ouR?F(~neEG685&V?X zr%z8!O_>w({mq*<7cX9v-O#2#Gm)>-Gf;a$Z6Kr)&>Oyy?XV^6|mIrFMjr~;NW0FRsuf^ zP9f|hsy}}GcxY%SL9)c@s_8HOZ{NN>e*8EsEiF4cTRE$xq@>WCpPzR{tL?YOPs~pd zF%lIE>yMViT93rP%jM*7t;BB(P!8$5cc^f1_~F5l6bN0#pWG7X>!PBf8#iw7>Kzb% zz~E<1D=aM39__I|ivwfo>gpmRBYE`*c<^4%ZX6%D>u&sG&0DnJ!he{ZRSQd|rltl4 z26DR3$jBf;Ap#QdAQ&?%F4=|oSdenCivUi+qLq&-2?x_ zhYztT>lkYnXV|5srNza?7cX9r$-y_&{2VjUZfgy*(gx~|Do{0!vFd6X9)}y7)d@v>i0pjwY8Pp{@B=b$`$;~%nYbXYD@6*AW)&8pulOWVQXuP7vEFVDX!Jbn69AD&lIfmib%1Qmqa=vZEYm-zjwLQ6{vmLDA* zb>%i%crCxbR1j{{-{0>RyiFH@wANq$8 z#j55jHu5Vfz{!S1HkBMK8NB7?WzL3VENzEpMtk{%3gl;?C0EZc4s2fJkkN>%I&Wj% z!ulg^=NHp)WZ>5j{(Fa98Oc>~g3u?icGpY%)?h4r>p#G6LF)tcmBar3^A5+qc0^VJ literal 0 HcmV?d00001 diff --git a/Marlin/src/lcd/tft/images/btn_rounded_64x52x4.cpp b/Marlin/src/lcd/tft/images/btn_rounded_64x52x4.cpp new file mode 100644 index 000000000000..69a045d85af1 --- /dev/null +++ b/Marlin/src/lcd/tft/images/btn_rounded_64x52x4.cpp @@ -0,0 +1,82 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include "../../../inc/MarlinConfigPre.h" + +#if HAS_GRAPHICAL_TFT + +extern const uint8_t btn_rounded_64x52x4[1664] = { + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x88, + 0x88, 0x88, 0x79, 0xce, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xeb, 0x87, 0x77, 0x78, + 0x88, 0x78, 0xcf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0x66, 0x78, + 0x88, 0x8d, 0xff, 0xb8, 0x54, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x45, 0x7b, 0xff, 0xc6, 0x67, + 0x87, 0xbf, 0xf7, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x6f, 0xf9, 0x56, + 0x87, 0xef, 0x84, 0x44, 0x45, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x58, 0xfd, 0x46, + 0x87, 0xff, 0x54, 0x44, 0x56, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0xff, 0x45, + 0x87, 0xff, 0x44, 0x45, 0x67, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x76, 0xff, 0x45, + 0x87, 0xff, 0x44, 0x56, 0x77, 0x77, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x77, 0x77, 0xff, 0x44, + 0x87, 0xff, 0x44, 0x56, 0x77, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x77, 0xff, 0x44, + 0x87, 0xff, 0x44, 0x56, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0xff, 0x44, + 0x87, 0xff, 0x44, 0x56, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0xff, 0x44, + 0x87, 0xff, 0x44, 0x56, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0xff, 0x44, + 0x87, 0xff, 0x44, 0x56, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0xff, 0x44, + 0x87, 0xff, 0x44, 0x56, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0xff, 0x44, + 0x87, 0xff, 0x44, 0x56, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0xff, 0x44, + 0x87, 0xff, 0x44, 0x56, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0xff, 0x44, + 0x87, 0xff, 0x44, 0x56, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0xff, 0x44, + 0x87, 0xff, 0x44, 0x56, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0xff, 0x44, + 0x87, 0xff, 0x44, 0x56, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0xff, 0x44, + 0x87, 0xff, 0x44, 0x56, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0xff, 0x44, + 0x87, 0xff, 0x44, 0x56, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0xff, 0x44, + 0x87, 0xff, 0x44, 0x56, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0xff, 0x44, + 0x87, 0xff, 0x44, 0x56, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0xff, 0x44, + 0x87, 0xff, 0x44, 0x56, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0xff, 0x44, + 0x87, 0xff, 0x44, 0x56, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0xff, 0x44, + 0x87, 0xff, 0x44, 0x56, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0xff, 0x44, + 0x87, 0xff, 0x44, 0x56, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0xff, 0x44, + 0x87, 0xff, 0x44, 0x56, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0xff, 0x44, + 0x87, 0xff, 0x44, 0x56, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0xff, 0x44, + 0x87, 0xff, 0x44, 0x56, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0xff, 0x44, + 0x87, 0xff, 0x44, 0x56, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0xff, 0x44, + 0x87, 0xff, 0x44, 0x56, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0xff, 0x44, + 0x87, 0xff, 0x44, 0x56, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0xff, 0x44, + 0x87, 0xff, 0x44, 0x56, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0xff, 0x44, + 0x87, 0xff, 0x44, 0x56, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0xff, 0x44, + 0x87, 0xff, 0x44, 0x56, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0xff, 0x44, + 0x87, 0xff, 0x44, 0x56, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0xff, 0x44, + 0x87, 0xff, 0x44, 0x56, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0xff, 0x44, + 0x87, 0xff, 0x44, 0x56, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0xff, 0x44, + 0x87, 0xff, 0x44, 0x56, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0xff, 0x44, + 0x87, 0xff, 0x44, 0x56, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0xff, 0x44, + 0x87, 0xef, 0x84, 0x56, 0x77, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x7a, 0xfe, 0x44, + 0x87, 0xaf, 0xf6, 0x56, 0x77, 0x77, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x77, 0x9f, 0xf9, 0x44, + 0x87, 0x7d, 0xff, 0xb8, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x78, 0x9c, 0xff, 0xd4, 0x45, + 0x87, 0x76, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0x54, 0x45, + 0x87, 0x76, 0x56, 0xad, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xdb, 0x64, 0x44, 0x46, + 0x87, 0x77, 0x65, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x56, + 0x88, 0x77, 0x76, 0x55, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x55, 0x67, + 0x88, 0x77, 0x77, 0x66, 0x65, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x56, 0x66, 0x78, + 0x88, 0x88, 0x77, 0x77, 0x76, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x67, 0x77, 0x78, +}; + +#endif // HAS_GRAPHICAL_TFT diff --git a/Marlin/src/lcd/tft/images/home_64x64x4.cpp b/Marlin/src/lcd/tft/images/home_64x64x4.cpp new file mode 100644 index 000000000000..107c76e54ef3 --- /dev/null +++ b/Marlin/src/lcd/tft/images/home_64x64x4.cpp @@ -0,0 +1,94 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include "../../../inc/MarlinConfigPre.h" + +#if HAS_GRAPHICAL_TFT + +extern const uint8_t home_64x64x4[2048] = { + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x67, 0x88, 0x76, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x86, 0x9d, 0xff, 0xea, 0x67, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x69, 0xff, 0xff, 0xff, 0xc6, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x86, 0x9f, 0xff, 0xff, 0xff, 0xfc, 0x67, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x69, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc6, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x86, 0x9f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x67, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x69, 0xff, 0xff, 0xff, 0xeb, 0xff, 0xff, 0xff, 0xc6, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x86, 0x9f, 0xff, 0xff, 0xff, 0x40, 0xbf, 0xff, 0xff, 0xfc, 0x67, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x69, 0xff, 0xff, 0xff, 0xf6, 0x54, 0xa, 0xff, 0xff, 0xff, 0xc6, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x86, 0x9f, 0xff, 0xff, 0xff, 0x57, 0xff, 0x80, 0xaf, 0xff, 0xff, 0xfc, 0x67, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x69, 0xff, 0xff, 0xff, 0xf5, 0x6f, 0xff, 0xf9, 0xa, 0xff, 0xff, 0xff, 0xc6, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x86, 0x9f, 0xff, 0xff, 0xff, 0x56, 0xff, 0xff, 0xff, 0x90, 0xaf, 0xff, 0xff, 0xfc, 0x67, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x69, 0xff, 0xff, 0xff, 0xf5, 0x6f, 0xff, 0xff, 0xff, 0xf9, 0xa, 0xff, 0xff, 0xff, 0xc6, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x86, 0x9f, 0xff, 0xff, 0xff, 0x56, 0xff, 0xff, 0xff, 0xff, 0xff, 0x90, 0xaf, 0xff, 0xff, 0xfc, 0x67, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x69, 0xff, 0xff, 0xff, 0xf5, 0x6f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf9, 0xa, 0xff, 0xff, 0xff, 0xc6, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x86, 0x9f, 0xff, 0xff, 0xff, 0x56, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x90, 0xaf, 0xff, 0xff, 0xfc, 0x67, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x69, 0xff, 0xff, 0xff, 0xf5, 0x6f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf9, 0xa, 0xff, 0xff, 0xff, 0xc6, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x86, 0x9f, 0xff, 0xff, 0xff, 0x56, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x90, 0xaf, 0xff, 0xff, 0xfc, 0x67, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x69, 0xff, 0xff, 0xff, 0xf5, 0x6f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf9, 0xa, 0xff, 0xff, 0xff, 0xc6, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x86, 0x9f, 0xff, 0xff, 0xff, 0x56, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x90, 0xbf, 0xff, 0xff, 0xfc, 0x67, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x69, 0xff, 0xff, 0xff, 0xf5, 0x6f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf9, 0xa, 0xff, 0xff, 0xff, 0xc6, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x86, 0x9f, 0xff, 0xff, 0xff, 0x56, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x90, 0xaf, 0xff, 0xff, 0xfc, 0x67, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x69, 0xff, 0xff, 0xff, 0xf5, 0x6f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf9, 0xa, 0xff, 0xff, 0xff, 0xc6, 0x78, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x86, 0x9f, 0xff, 0xff, 0xff, 0x56, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x90, 0xaf, 0xff, 0xff, 0xfc, 0x67, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x69, 0xff, 0xff, 0xff, 0xf5, 0x6f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf9, 0xa, 0xff, 0xff, 0xff, 0xc6, 0x78, 0x88, 0x88, + 0x88, 0x86, 0x9f, 0xff, 0xff, 0xff, 0x56, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x90, 0xaf, 0xff, 0xff, 0xfc, 0x67, 0x88, 0x88, + 0x88, 0x69, 0xff, 0xff, 0xff, 0xf5, 0x6f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf9, 0xb, 0xff, 0xff, 0xff, 0xc6, 0x78, 0x88, + 0x87, 0x7f, 0xff, 0xff, 0xff, 0x66, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x90, 0xbf, 0xff, 0xff, 0xfb, 0x68, 0x88, + 0x87, 0x7f, 0xff, 0xff, 0xf7, 0x3c, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf4, 0xb, 0xff, 0xff, 0xfd, 0x67, 0x88, + 0x87, 0x3d, 0xff, 0xff, 0x75, 0x59, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x30, 0xbf, 0xff, 0xfa, 0x68, 0x88, + 0x88, 0x44, 0xce, 0xd7, 0x58, 0x49, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x74, 0x19, 0xee, 0xa6, 0x88, 0x88, + 0x88, 0x73, 0x24, 0x56, 0x88, 0x49, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x78, 0x52, 0x35, 0x68, 0x88, 0x88, + 0x88, 0x87, 0x66, 0x78, 0x88, 0x49, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x78, 0x87, 0x67, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x49, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x49, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x49, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf9, 0x55, 0x55, 0x55, 0x5d, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x49, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x92, 0x44, 0x44, 0x44, 0x12, 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x49, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x77, 0x88, 0x88, 0x88, 0x72, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x49, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x97, 0x88, 0x88, 0x88, 0x84, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x49, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x96, 0x88, 0x88, 0x88, 0x84, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x49, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x96, 0x88, 0x88, 0x88, 0x84, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x49, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x96, 0x88, 0x88, 0x88, 0x84, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x49, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x96, 0x88, 0x88, 0x88, 0x84, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x49, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x96, 0x88, 0x88, 0x88, 0x84, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x49, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x96, 0x88, 0x88, 0x88, 0x84, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x49, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x96, 0x88, 0x88, 0x88, 0x84, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x49, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x96, 0x88, 0x88, 0x88, 0x84, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x49, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x96, 0x88, 0x88, 0x88, 0x84, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x49, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x96, 0x88, 0x88, 0x88, 0x84, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x49, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x96, 0x88, 0x88, 0x88, 0x84, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x64, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x96, 0x88, 0x88, 0x88, 0x84, 0xcf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xb6, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x83, 0x4c, 0xee, 0xee, 0xee, 0xee, 0xee, 0xff, 0x97, 0x88, 0x88, 0x88, 0x84, 0xae, 0xee, 0xee, 0xee, 0xee, 0xee, 0xea, 0x67, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0x32, 0x44, 0x44, 0x44, 0x44, 0x33, 0x57, 0x88, 0x88, 0x88, 0x88, 0x86, 0x43, 0x34, 0x44, 0x44, 0x44, 0x34, 0x55, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x76, 0x55, 0x55, 0x55, 0x55, 0x55, 0x67, 0x88, 0x88, 0x88, 0x88, 0x87, 0x65, 0x55, 0x55, 0x55, 0x55, 0x56, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88 +}; + +#endif // HAS_GRAPHICAL_TFT diff --git a/Marlin/src/lcd/tft/tft_color.h b/Marlin/src/lcd/tft/tft_color.h index d2c5d8e7db7e..0765c63136f5 100644 --- a/Marlin/src/lcd/tft/tft_color.h +++ b/Marlin/src/lcd/tft/tft_color.h @@ -42,6 +42,7 @@ #define COLOR_SCARLET 0xF904 // #FF2020 #define COLOR_LIME 0x7E00 // #00FF00 #define COLOR_BLUE 0x001F // #0000FF +#define COLOR_LIGHT_BLUE 0x061F // #00C3FF #define COLOR_YELLOW 0xFFE0 // #FFFF00 #define COLOR_MAGENTA 0xF81F // #FF00FF #define COLOR_FUCHSIA 0xF81F // #FF00FF @@ -66,8 +67,9 @@ #define COLOR_DARK_PURPLE 0x9930 // #992380 - -#define COLOR_BACKGROUND 0x20AC // #1E156E +#ifndef COLOR_BACKGROUND + #define COLOR_BACKGROUND 0x20AC // #1E156E +#endif #define COLOR_SELECTION_BG 0x9930 // #992380 #define COLOR_WEBSITE_URL 0x03B7 diff --git a/Marlin/src/lcd/tft/tft_image.cpp b/Marlin/src/lcd/tft/tft_image.cpp index ff60bee9a9df..27749cb7f3ae 100644 --- a/Marlin/src/lcd/tft/tft_image.cpp +++ b/Marlin/src/lcd/tft/tft_image.cpp @@ -45,6 +45,8 @@ const tImage Fan_Slow1_64x64x4 = { (void *)fan_slow1_64x64x4, 64, 64, GREYS const tImage Fan_Fast0_64x64x4 = { (void *)fan_fast0_64x64x4, 64, 64, GREYSCALE4 }; const tImage Fan_Fast1_64x64x4 = { (void *)fan_fast1_64x64x4, 64, 64, GREYSCALE4 }; const tImage SD_64x64x4 = { (void *)sd_64x64x4, 64, 64, GREYSCALE4 }; +const tImage Home_64x64x4 = { (void *)home_64x64x4, 64, 64, GREYSCALE4 }; +const tImage BtnRounded_64x52x4 = { (void *)btn_rounded_64x52x4, 64, 52, GREYSCALE4 }; const tImage Menu_64x64x4 = { (void *)menu_64x64x4, 64, 64, GREYSCALE4 }; const tImage Settings_64x64x4 = { (void *)settings_64x64x4, 64, 64, GREYSCALE4 }; const tImage Confirm_64x64x4 = { (void *)confirm_64x64x4, 64, 64, GREYSCALE4 }; diff --git a/Marlin/src/lcd/tft/tft_image.h b/Marlin/src/lcd/tft/tft_image.h index cf48065968b1..1f13967ba248 100644 --- a/Marlin/src/lcd/tft/tft_image.h +++ b/Marlin/src/lcd/tft/tft_image.h @@ -39,6 +39,8 @@ extern const uint8_t fan0_64x64x4[], fan1_64x64x4[]; extern const uint8_t fan_slow0_64x64x4[], fan_slow1_64x64x4[]; extern const uint8_t fan_fast0_64x64x4[], fan_fast1_64x64x4[]; extern const uint8_t sd_64x64x4[]; +extern const uint8_t home_64x64x4[]; +extern const uint8_t btn_rounded_64x52x4[]; extern const uint8_t menu_64x64x4[]; extern const uint8_t settings_64x64x4[]; extern const uint8_t confirm_64x64x4[]; @@ -90,6 +92,8 @@ enum MarlinImage : uint8_t { imgRefresh, imgLeveling, imgSlider, + imgHome, + imgBtn52Rounded, imgCount, noImage = imgCount, imgPageUp = imgLeft, @@ -136,6 +140,8 @@ extern const tImage Fan_Slow1_64x64x4; extern const tImage Fan_Fast0_64x64x4; extern const tImage Fan_Fast1_64x64x4; extern const tImage SD_64x64x4; +extern const tImage Home_64x64x4; +extern const tImage BtnRounded_64x52x4; extern const tImage Menu_64x64x4; extern const tImage Settings_64x64x4; extern const tImage Confirm_64x64x4; diff --git a/Marlin/src/lcd/tft/touch.cpp b/Marlin/src/lcd/tft/touch.cpp index d2b860ab155f..30571a1756c0 100644 --- a/Marlin/src/lcd/tft/touch.cpp +++ b/Marlin/src/lcd/tft/touch.cpp @@ -253,6 +253,13 @@ void Touch::touch(touch_control_t *control) { case UBL: hold(control, UBL_REPEAT_DELAY); ui.encoderPosition += control->data; break; #endif + case MOVE_AXIS: + ui.goto_screen((screenFunc_t)ui.move_axis); + break; + + // TODO: TOUCH could receive data to pass to the callback + case BUTTON: ((screenFunc_t)control->data)(); break; + default: break; } } diff --git a/Marlin/src/lcd/tft/touch.h b/Marlin/src/lcd/tft/touch.h index f3e53ae461c5..03fdea4184f2 100644 --- a/Marlin/src/lcd/tft/touch.h +++ b/Marlin/src/lcd/tft/touch.h @@ -79,6 +79,8 @@ enum TouchControlType : uint16_t { FEEDRATE, FLOWRATE, UBL, + MOVE_AXIS, + BUTTON, }; typedef void (*screenFunc_t)(); diff --git a/Marlin/src/lcd/tft/ui_320x240.cpp b/Marlin/src/lcd/tft/ui_320x240.cpp index a4ac1465ea25..f227a2d408a1 100644 --- a/Marlin/src/lcd/tft/ui_320x240.cpp +++ b/Marlin/src/lcd/tft/ui_320x240.cpp @@ -650,4 +650,7 @@ void menu_item(const uint8_t row, bool sel ) { TERN_(TOUCH_SCREEN, touch.add_control(sel ? CLICK : MENU_ITEM, 0, 2 + 34 * row, 320, 32, encoderTopLine + row)); } +void MarlinUI::move_axis() { +} + #endif // HAS_UI_320x240 diff --git a/Marlin/src/lcd/tft/ui_320x240.h b/Marlin/src/lcd/tft/ui_320x240.h index ed69acbcd2e9..c9822f11cc69 100644 --- a/Marlin/src/lcd/tft/ui_320x240.h +++ b/Marlin/src/lcd/tft/ui_320x240.h @@ -73,6 +73,8 @@ const tImage Images[imgCount] = { Refresh_32x32x4, Leveling_32x32x4, Slider8x16x4, + Home_64x64x4, + BtnRounded_64x52x4, }; #if HAS_TEMP_CHAMBER && HOTENDS > 1 diff --git a/Marlin/src/lcd/tft/ui_480x320.cpp b/Marlin/src/lcd/tft/ui_480x320.cpp index c9f0bfd0e9b1..79668470dfc3 100644 --- a/Marlin/src/lcd/tft/ui_480x320.cpp +++ b/Marlin/src/lcd/tft/ui_480x320.cpp @@ -291,6 +291,7 @@ void MarlinUI::draw_status_screen() { offset += 32 - tft_string.width(); } tft.add_text(455 - tft_string.width() - offset, 3, is_homed ? COLOR_AXIS_HOMED : COLOR_AXIS_NOT_HOMED, tft_string); + TERN_(TOUCH_SCREEN, touch.add_control(MOVE_AXIS, 4, 132, TFT_WIDTH - 8, 34)); // feed rate tft.canvas(96, 180, 100, 32); @@ -654,4 +655,376 @@ void menu_item(const uint8_t row, bool sel ) { TERN_(TOUCH_SCREEN, touch.add_control(sel ? CLICK : MENU_ITEM, 0, 4 + 45 * row, TFT_WIDTH, 43, encoderTopLine + row)); } +#include "../../module/probe.h" +struct MotionAxisState { + xy_int_t xValuePos, yValuePos, zValuePos, eValuePos, stepValuePos, zTypePos, eNamePos; + float currentStepSize = 10.0; + int z_selection = 1; + uint8_t e_selection = 0; + bool homming = false; + bool blocked = false; + char message[32]; +}; + +MotionAxisState motionAxisState; + +#define E_BTN_COLOR COLOR_LIGHT_BLUE //COLOR_DODGER_BLUE //COLOR_AQUA +#define X_BTN_COLOR COLOR_YELLOW +#define Y_BTN_COLOR COLOR_VIVID_GREEN //COLOR_LIME +#define Z_BTN_COLOR COLOR_CORAL_RED + +#define BTN_WIDTH 64 +#define BTN_HEIGHT 52 +#define X_MARGIN 20 +#define Y_MARGIN 15 + +static void quick_feedback() { + #if HAS_CHIRP + ui.chirp(); // Buzz and wait. Is the delay needed for buttons to settle? + #if BOTH(HAS_LCD_MENU, USE_BEEPER) + for (int8_t i = 5; i--;) { buzzer.tick(); delay(2); } + #elif HAS_LCD_MENU + delay(10); + #endif + #endif +} + +static void drawCurYValue() { + tft.canvas(motionAxisState.yValuePos.x, motionAxisState.yValuePos.y, 100, BTN_HEIGHT); + tft.set_background(COLOR_BACKGROUND); + tft_string.set(ftostr52sp(LOGICAL_Y_POSITION(current_position.y))); + tft.add_text(0, 0, Y_BTN_COLOR, tft_string); +} + +static void drawCurEValue() { + tft.canvas(motionAxisState.eValuePos.x, motionAxisState.eValuePos.y, 100, BTN_HEIGHT); + tft.set_background(COLOR_BACKGROUND); + tft_string.set(ftostr52sp(LOGICAL_X_POSITION(current_position.e))); + tft.add_text(0, 0, E_BTN_COLOR, tft_string); +} + +static void drawCurXValue() { + tft.canvas(motionAxisState.xValuePos.x, motionAxisState.xValuePos.y, 100, BTN_HEIGHT); + tft.set_background(COLOR_BACKGROUND); + tft_string.set(ftostr52sp(LOGICAL_X_POSITION(current_position.x))); + tft.add_text(0, 0, X_BTN_COLOR, tft_string); +} + +static void drawCurZValue() { + if (motionAxisState.z_selection < 0) { + tft_string.set(ftostr52sp(probe.offset.z)); + } + else { + tft_string.set(ftostr52sp(LOGICAL_Z_POSITION(current_position.z))); + } + tft.canvas(motionAxisState.zValuePos.x, motionAxisState.zValuePos.y, BTN_WIDTH + X_MARGIN, BTN_HEIGHT); + tft.set_background(COLOR_BACKGROUND); + tft.add_text(0, 0, Z_BTN_COLOR, tft_string); +} + +static void drawCurStepValue() { + tft_string.set((uint8_t *)ftostr52sp(motionAxisState.currentStepSize)); + tft_string.add("mm"); + tft.canvas(motionAxisState.stepValuePos.x, motionAxisState.stepValuePos.y, tft_string.width(), BTN_HEIGHT); + tft.set_background(COLOR_BACKGROUND); + tft.add_text(0, 0, COLOR_AXIS_HOMED, tft_string); +} + +static void drawCurZSelection() { + tft_string.set("Z"); + tft.canvas(motionAxisState.zTypePos.x, motionAxisState.zTypePos.y, tft_string.width(), 34); + tft.set_background(COLOR_BACKGROUND); + tft.add_text(0, 0, Z_BTN_COLOR, tft_string); + tft.queue.sync(); + tft_string.set("Offset"); + tft.canvas(motionAxisState.zTypePos.x, motionAxisState.zTypePos.y + 34, tft_string.width(), 34); + tft.set_background(COLOR_BACKGROUND); + if (motionAxisState.z_selection < 0) { + tft.add_text(0, 0, Z_BTN_COLOR, tft_string); + } +} + +static void drawCurESelection() { + tft.canvas(motionAxisState.eNamePos.x, motionAxisState.eNamePos.y, BTN_WIDTH, BTN_HEIGHT); + tft.set_background(COLOR_BACKGROUND); + tft_string.set("E"); + tft.add_text(0, 0, E_BTN_COLOR , tft_string); + tft.add_text(tft_string.width(), 0, E_BTN_COLOR, ui8tostr3rj(motionAxisState.e_selection)); +} + +static void drawMessage(const char *msg) { + tft.canvas(X_MARGIN, TFT_HEIGHT - Y_MARGIN - 34, (TFT_HEIGHT - X_MARGIN * 2) / 2, 34); + tft.set_background(COLOR_BACKGROUND); + tft.add_text(0, 0, COLOR_YELLOW, msg); +} + +static void e_plus() { + // maybe Touch class must have a "enable/disable" option + if (motionAxisState.blocked) { + return; + } + if (thermalManager.temp_hotend[motionAxisState.e_selection].celsius < EXTRUDE_MINTEMP) { + drawMessage("Too cold"); + return; + } + quick_feedback(); + current_position.e += motionAxisState.currentStepSize; + ui.manual_move.soon(E_AXIS); + drawCurEValue(); +} + +static void e_minus() { + if (motionAxisState.blocked) { + return; + } + if (thermalManager.temp_hotend[motionAxisState.e_selection].celsius < EXTRUDE_MINTEMP) { + drawMessage("Too cold"); + return; + } + quick_feedback(); + current_position.e -= motionAxisState.currentStepSize; + ui.manual_move.soon(E_AXIS); + drawCurEValue(); +} + +static void y_plus() { + if (motionAxisState.blocked) { + return; + } + + quick_feedback(); + current_position.y += motionAxisState.currentStepSize; + ui.manual_move.soon(Y_AXIS); + drawCurYValue(); +} + +static void y_minus() { + if (motionAxisState.blocked) { + return; + } + + quick_feedback(); + current_position.y -= motionAxisState.currentStepSize; + ui.manual_move.soon(Y_AXIS); + drawCurYValue(); +} + +static void z_plus() { + if (motionAxisState.blocked) { + return; + } + + quick_feedback(); + if (motionAxisState.z_selection < 0) { + probe.offset.z += motionAxisState.currentStepSize; + //TODO: probe + } + else { + current_position.z += motionAxisState.currentStepSize; + ui.manual_move.soon(Z_AXIS); + } + drawCurZValue(); +} + +static void z_minus() { + if (motionAxisState.blocked) { + return; + } + + quick_feedback(); + if (motionAxisState.z_selection < 0) { + probe.offset.z -= motionAxisState.currentStepSize; + } + else { + current_position.z -= motionAxisState.currentStepSize; + ui.manual_move.soon(Z_AXIS); + } + drawCurZValue(); +} + +static void e_select() { + if (motionAxisState.blocked) { + return; + } + + motionAxisState.e_selection++; + if (motionAxisState.e_selection >= EXTRUDERS) { + motionAxisState.e_selection = 0; + } + + quick_feedback(); + drawCurESelection(); + drawCurEValue(); +} + +static void do_home() { + quick_feedback(); + drawMessage("Homming..."); + queue.inject_P(G28_STR); + motionAxisState.blocked = true; + drawCurXValue(); + drawCurYValue(); + drawCurZValue(); +} + +static void x_minus() { + if (motionAxisState.blocked) { + return; + } + + quick_feedback(); + current_position.x -= motionAxisState.currentStepSize; + ui.manual_move.soon(X_AXIS); + drawCurXValue(); +} + +static void x_plus() { + if (motionAxisState.blocked) { + return; + } + + quick_feedback(); + current_position.x += motionAxisState.currentStepSize; + ui.manual_move.soon(X_AXIS); + drawCurXValue(); +} + +static void step_size() { + if (motionAxisState.blocked) { + return; + } + + motionAxisState.currentStepSize = motionAxisState.currentStepSize / 10.0; + if (motionAxisState.currentStepSize < 0.0015) motionAxisState.currentStepSize = 10.0; + quick_feedback(); + drawCurStepValue(); +} + +static void z_select() { + if (motionAxisState.blocked) { + return; + } + + motionAxisState.z_selection *= -1; + quick_feedback(); + drawCurZSelection(); + drawCurZValue(); +} + +static void drawBtn(int x, int y, const char* label, int32_t data, MarlinImage img, uint16_t bgColor, uint16_t fgColor = COLOR_BLACK) { + uint16_t width = Images[imgBtn52Rounded].width; + uint16_t height = Images[imgBtn52Rounded].height; + + tft.queue.sync(); //need sync to change font + + tft.canvas(x, y, width, height); + tft.set_background(COLOR_BACKGROUND); + tft.add_image(0, 0, imgBtn52Rounded, bgColor, COLOR_BACKGROUND, COLOR_DARKGREY); + + tft.set_font(Helvetica12Bold); + tft_string.set_font(Helvetica12Bold); + tft_string.set(label); + tft_string.trim(); + tft.add_text(tft_string.center(width), height / 2 - tft_string.font_height() / 2, bgColor, tft_string); + + tft.queue.sync(); + tft_string.set_font(Helvetica18); + tft.set_font(Helvetica18); + + touch.add_control(BUTTON, x, y, width, height, data); +} + +void MarlinUI::move_axis() { + // Reset + motionAxisState.blocked = false; + + ui.clear_lcd(); + + TERN_(TOUCH_SCREEN, touch.clear()); + + // ROW 1 -> E- Y- CurY Z+ + int x = X_MARGIN, y = Y_MARGIN, spacing = 0; + + drawBtn(x, y, "E+", (int32_t)e_plus, imgUp, E_BTN_COLOR); + + spacing = (TFT_WIDTH - X_MARGIN * 2 - 3 * BTN_WIDTH) / 2; + x += BTN_WIDTH + spacing; + drawBtn(x, y, "Y+", (int32_t)y_plus, imgUp, Y_BTN_COLOR); + + // Cur Y + x += BTN_WIDTH; + motionAxisState.yValuePos.x = x + 2; + motionAxisState.yValuePos.y = y; + drawCurYValue(); + + x += spacing; + drawBtn(x, y, "Z+", (int32_t)z_plus, imgUp, Z_BTN_COLOR); + + // ROW 2 -> "Ex" X- HOME X+ "Z" + y += BTN_HEIGHT + (TFT_HEIGHT - Y_MARGIN * 2 - 4 * BTN_HEIGHT) / 3; + x = X_MARGIN; + spacing = (TFT_WIDTH - X_MARGIN * 2 - 5 * BTN_WIDTH) / 4; + + motionAxisState.eNamePos.x = x; + motionAxisState.eNamePos.y = y; + drawCurESelection(); + touch.add_control(BUTTON, x, y, BTN_WIDTH, BTN_HEIGHT, (int32_t)e_select); + + x += BTN_WIDTH + spacing; + drawBtn(x, y, "X-", (int32_t)x_minus, imgLeft, X_BTN_COLOR); + + x += BTN_WIDTH + spacing; //imgHome is 64x64 + add_control(TFT_WIDTH / 2 - Images[imgHome].width / 2, y - (Images[imgHome].width - BTN_HEIGHT) / 2, BUTTON, (int32_t)do_home, imgHome); + + x += BTN_WIDTH + spacing; + drawBtn(x, y, "X+", (int32_t)x_plus, imgRight, X_BTN_COLOR); + + x += BTN_WIDTH + spacing; + motionAxisState.zTypePos.x = x; + motionAxisState.zTypePos.y = y; + drawCurZSelection(); + touch.add_control(BUTTON, x, y, BTN_WIDTH, 34 * 2, (int32_t)z_select); + + // ROW 3 -> E- CurX Y- Z- + y += BTN_HEIGHT + (TFT_HEIGHT - Y_MARGIN * 2 - 4 * BTN_HEIGHT) / 3; + x = X_MARGIN; + spacing = (TFT_WIDTH - X_MARGIN * 2 - 3 * BTN_WIDTH) / 2; + + drawBtn(x, y, "E-", (int32_t)e_minus, imgDown, E_BTN_COLOR); + + // Cur E + motionAxisState.eValuePos.x = x; + motionAxisState.eValuePos.y = y + BTN_HEIGHT + 2; + drawCurEValue(); + + // Cur X + motionAxisState.xValuePos.x = BTN_WIDTH + (TFT_WIDTH - X_MARGIN * 2 - 5 * BTN_WIDTH) / 4; //X- pos + motionAxisState.xValuePos.y = y - 10; + drawCurXValue(); + + x += BTN_WIDTH + spacing; + drawBtn(x, y, "Y-", (int32_t)y_minus, imgDown, Y_BTN_COLOR); + + x += BTN_WIDTH + spacing; + drawBtn(x, y, "Z-", (int32_t)z_minus, imgDown, Z_BTN_COLOR); + + // Cur Z + motionAxisState.zValuePos.x = x; + motionAxisState.zValuePos.y = y + BTN_HEIGHT + 2; + drawCurZValue(); + + // ROW 4 -> step_size Back + y = TFT_HEIGHT - Y_MARGIN - 32; // + x = (TFT_WIDTH - X_MARGIN * 2) / 2; + motionAxisState.stepValuePos.x = x; + motionAxisState.stepValuePos.y = y; + drawCurStepValue(); + touch.add_control(BUTTON, motionAxisState.stepValuePos.x, motionAxisState.stepValuePos.y, tft_string.width(), BTN_HEIGHT, (int32_t)step_size); + + add_control(TFT_WIDTH - X_MARGIN - BTN_WIDTH, y, BACK, imgBack); +} + +#undef BTN_WIDTH +#undef BTN_HEIGHT + #endif // HAS_UI_480x320 diff --git a/Marlin/src/lcd/tft/ui_480x320.h b/Marlin/src/lcd/tft/ui_480x320.h index d803df4a247d..053ee78158cb 100644 --- a/Marlin/src/lcd/tft/ui_480x320.h +++ b/Marlin/src/lcd/tft/ui_480x320.h @@ -73,6 +73,8 @@ const tImage Images[imgCount] = { Refresh_32x32x4, Leveling_32x32x4, Slider8x16x4, + Home_64x64x4, + BtnRounded_64x52x4, }; #if HAS_TEMP_CHAMBER && HOTENDS > 1 diff --git a/Marlin/src/lcd/ultralcd.h b/Marlin/src/lcd/ultralcd.h index 0200d39014c1..9f4a061b40df 100644 --- a/Marlin/src/lcd/ultralcd.h +++ b/Marlin/src/lcd/ultralcd.h @@ -682,6 +682,10 @@ class MarlinUI { static void touch_calibration(); #endif + #if HAS_GRAPHICAL_TFT + static void move_axis(); + #endif + private: #if HAS_DISPLAY From 350a085810cfc4c9836c22a6e441b8447d07d940 Mon Sep 17 00:00:00 2001 From: Victor Mateus Oliveira Date: Tue, 15 Sep 2020 21:14:29 -0300 Subject: [PATCH 02/15] touch support enable/disable --- Marlin/src/lcd/tft/touch.cpp | 4 ++++ Marlin/src/lcd/tft/touch.h | 3 +++ 2 files changed, 7 insertions(+) diff --git a/Marlin/src/lcd/tft/touch.cpp b/Marlin/src/lcd/tft/touch.cpp index 30571a1756c0..00f10b121d79 100644 --- a/Marlin/src/lcd/tft/touch.cpp +++ b/Marlin/src/lcd/tft/touch.cpp @@ -35,6 +35,7 @@ #include "tft.h" +bool Touch::enabled = true; int16_t Touch::x, Touch::y; touch_control_t Touch::controls[]; touch_control_t *Touch::current_control; @@ -54,6 +55,7 @@ void Touch::init() { calibration_reset(); reset(); io.Init(); + enable(); } void Touch::add_control(TouchControlType type, uint16_t x, uint16_t y, uint16_t width, uint16_t height, int32_t data) { @@ -72,6 +74,8 @@ void Touch::idle() { uint16_t i; int16_t _x, _y; + if (!enabled) return; + if (now == millis()) return; now = millis(); diff --git a/Marlin/src/lcd/tft/touch.h b/Marlin/src/lcd/tft/touch.h index 03fdea4184f2..7d8f222918db 100644 --- a/Marlin/src/lcd/tft/touch.h +++ b/Marlin/src/lcd/tft/touch.h @@ -134,6 +134,7 @@ class Touch { private: static TOUCH_DRIVER io; static int16_t x, y; + static bool enabled; static touch_control_t controls[MAX_CONTROLS]; static touch_control_t *current_control; @@ -164,6 +165,8 @@ class Touch { static void clear() { controls_count = 0; } static void idle(); static bool is_clicked() { return touch_control_type == CLICK; } + static void disable() { enabled = false; } + static void enable() { enabled = true; } static void add_control(TouchControlType type, uint16_t x, uint16_t y, uint16_t width, uint16_t height, int32_t data = 0); From 6af5c5f5f48c3b2fabf29cfbbb62a1d7d0fffece Mon Sep 17 00:00:00 2001 From: Victor Mateus Oliveira Date: Tue, 15 Sep 2020 21:21:13 -0300 Subject: [PATCH 03/15] colors --- Marlin/src/lcd/tft/ui_480x320.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Marlin/src/lcd/tft/ui_480x320.cpp b/Marlin/src/lcd/tft/ui_480x320.cpp index 79668470dfc3..3aaec60fa17c 100644 --- a/Marlin/src/lcd/tft/ui_480x320.cpp +++ b/Marlin/src/lcd/tft/ui_480x320.cpp @@ -668,10 +668,10 @@ struct MotionAxisState { MotionAxisState motionAxisState; -#define E_BTN_COLOR COLOR_LIGHT_BLUE //COLOR_DODGER_BLUE //COLOR_AQUA -#define X_BTN_COLOR COLOR_YELLOW -#define Y_BTN_COLOR COLOR_VIVID_GREEN //COLOR_LIME -#define Z_BTN_COLOR COLOR_CORAL_RED +#define E_BTN_COLOR COLOR_YELLOW +#define X_BTN_COLOR COLOR_CORAL_RED +#define Y_BTN_COLOR COLOR_VIVID_GREEN +#define Z_BTN_COLOR COLOR_LIGHT_BLUE #define BTN_WIDTH 64 #define BTN_HEIGHT 52 From 158381902c0ff78911dc9eba9cf0a73a43e6968a Mon Sep 17 00:00:00 2001 From: Victor Mateus Oliveira Date: Tue, 15 Sep 2020 21:21:54 -0300 Subject: [PATCH 04/15] better code; handling soft end stops --- Marlin/src/lcd/tft/ui_480x320.cpp | 256 +++++++++++++----------------- 1 file changed, 114 insertions(+), 142 deletions(-) diff --git a/Marlin/src/lcd/tft/ui_480x320.cpp b/Marlin/src/lcd/tft/ui_480x320.cpp index 3aaec60fa17c..8f7f4fedb56b 100644 --- a/Marlin/src/lcd/tft/ui_480x320.cpp +++ b/Marlin/src/lcd/tft/ui_480x320.cpp @@ -689,39 +689,6 @@ static void quick_feedback() { #endif } -static void drawCurYValue() { - tft.canvas(motionAxisState.yValuePos.x, motionAxisState.yValuePos.y, 100, BTN_HEIGHT); - tft.set_background(COLOR_BACKGROUND); - tft_string.set(ftostr52sp(LOGICAL_Y_POSITION(current_position.y))); - tft.add_text(0, 0, Y_BTN_COLOR, tft_string); -} - -static void drawCurEValue() { - tft.canvas(motionAxisState.eValuePos.x, motionAxisState.eValuePos.y, 100, BTN_HEIGHT); - tft.set_background(COLOR_BACKGROUND); - tft_string.set(ftostr52sp(LOGICAL_X_POSITION(current_position.e))); - tft.add_text(0, 0, E_BTN_COLOR, tft_string); -} - -static void drawCurXValue() { - tft.canvas(motionAxisState.xValuePos.x, motionAxisState.xValuePos.y, 100, BTN_HEIGHT); - tft.set_background(COLOR_BACKGROUND); - tft_string.set(ftostr52sp(LOGICAL_X_POSITION(current_position.x))); - tft.add_text(0, 0, X_BTN_COLOR, tft_string); -} - -static void drawCurZValue() { - if (motionAxisState.z_selection < 0) { - tft_string.set(ftostr52sp(probe.offset.z)); - } - else { - tft_string.set(ftostr52sp(LOGICAL_Z_POSITION(current_position.z))); - } - tft.canvas(motionAxisState.zValuePos.x, motionAxisState.zValuePos.y, BTN_WIDTH + X_MARGIN, BTN_HEIGHT); - tft.set_background(COLOR_BACKGROUND); - tft.add_text(0, 0, Z_BTN_COLOR, tft_string); -} - static void drawCurStepValue() { tft_string.set((uint8_t *)ftostr52sp(motionAxisState.currentStepSize)); tft_string.add("mm"); @@ -758,95 +725,127 @@ static void drawMessage(const char *msg) { tft.add_text(0, 0, COLOR_YELLOW, msg); } -static void e_plus() { - // maybe Touch class must have a "enable/disable" option - if (motionAxisState.blocked) { - return; - } - if (thermalManager.temp_hotend[motionAxisState.e_selection].celsius < EXTRUDE_MINTEMP) { +static void drawAxisValue(AxisEnum axis) { + const float value = NATIVE_TO_LOGICAL( + ui.manual_move.processing ? destination[axis] : current_position[axis] + TERN0(IS_KINEMATIC, ui.manual_move.offset), + axis + ); + xy_int_t pos; + uint16_t color; + switch (axis) { + case X_AXIS: pos = motionAxisState.xValuePos; color = X_BTN_COLOR; break; + case Y_AXIS: pos = motionAxisState.yValuePos; color = Y_BTN_COLOR; break; + case Z_AXIS: pos = motionAxisState.zValuePos; color = Z_BTN_COLOR; break; + case E_AXIS: pos = motionAxisState.eValuePos; color = E_BTN_COLOR; break; + default: return; + } + tft.canvas(pos.x, pos.y, BTN_WIDTH + X_MARGIN, BTN_HEIGHT); + tft.set_background(COLOR_BACKGROUND); + tft_string.set(ftostr52sp(value)); + tft.add_text(0, 0, color, tft_string); + + //TODO: handle draw z offset +} + +static void moveAxis(AxisEnum axis, const int8_t direction) { + quick_feedback(); + + if (axis == E_AXIS && thermalManager.temp_hotend[motionAxisState.e_selection].celsius < EXTRUDE_MINTEMP) { drawMessage("Too cold"); return; } - quick_feedback(); - current_position.e += motionAxisState.currentStepSize; - ui.manual_move.soon(E_AXIS); - drawCurEValue(); + + if (!ui.manual_move.processing) { + // Start with no limits to movement + float min = current_position[axis] - 1000, + max = current_position[axis] + 1000; + + // Limit to software endstops, if enabled + #if HAS_SOFTWARE_ENDSTOPS + if (soft_endstops_enabled) switch (axis) { + case X_AXIS: + TERN_(MIN_SOFTWARE_ENDSTOP_X, min = soft_endstop.min.x); + TERN_(MAX_SOFTWARE_ENDSTOP_X, max = soft_endstop.max.x); + break; + case Y_AXIS: + TERN_(MIN_SOFTWARE_ENDSTOP_Y, min = soft_endstop.min.y); + TERN_(MAX_SOFTWARE_ENDSTOP_Y, max = soft_endstop.max.y); + break; + case Z_AXIS: + TERN_(MIN_SOFTWARE_ENDSTOP_Z, min = soft_endstop.min.z); + TERN_(MAX_SOFTWARE_ENDSTOP_Z, max = soft_endstop.max.z); + default: break; + } + #endif // HAS_SOFTWARE_ENDSTOPS + + // Delta limits XY based on the current offset from center + // This assumes the center is 0,0 + #if ENABLED(DELTA) + if (axis != Z_AXIS && axis != E_AXIS) { + max = SQRT(sq((float)(DELTA_PRINTABLE_RADIUS)) - sq(current_position[Y_AXIS - axis])); // (Y_AXIS - axis) == the other axis + min = -max; + } + #endif + + // Get the new position + const float diff = motionAxisState.currentStepSize * direction; //float(int32_t(ui.encoderPosition)) * ui.manual_move.menu_scale; + #if IS_KINEMATIC + ui.manual_move.offset += diff; + if (direction < 0) + NOLESS(ui.manual_move.offset, min - current_position[axis]); + else + NOMORE(ui.manual_move.offset, max - current_position[axis]); + #else + current_position[axis] += diff; + if (direction < 0) + NOLESS(current_position[axis], min); + else + NOMORE(current_position[axis], max); + #endif + + ui.manual_move.soon(axis + #if MULTI_MANUAL + , motionAxisState.e_selection + #endif + ); + } + + drawAxisValue(axis); +} + +static void e_plus() { + moveAxis(E_AXIS, 1); } static void e_minus() { - if (motionAxisState.blocked) { - return; - } - if (thermalManager.temp_hotend[motionAxisState.e_selection].celsius < EXTRUDE_MINTEMP) { - drawMessage("Too cold"); - return; - } - quick_feedback(); - current_position.e -= motionAxisState.currentStepSize; - ui.manual_move.soon(E_AXIS); - drawCurEValue(); + moveAxis(E_AXIS, -1); } -static void y_plus() { - if (motionAxisState.blocked) { - return; - } +static void x_minus() { + moveAxis(X_AXIS, -1); +} - quick_feedback(); - current_position.y += motionAxisState.currentStepSize; - ui.manual_move.soon(Y_AXIS); - drawCurYValue(); +static void x_plus() { + moveAxis(X_AXIS, 1); } -static void y_minus() { - if (motionAxisState.blocked) { - return; - } +static void y_plus() { + moveAxis(Y_AXIS, 1); +} - quick_feedback(); - current_position.y -= motionAxisState.currentStepSize; - ui.manual_move.soon(Y_AXIS); - drawCurYValue(); +static void y_minus() { + moveAxis(Y_AXIS, -1); } static void z_plus() { - if (motionAxisState.blocked) { - return; - } - - quick_feedback(); - if (motionAxisState.z_selection < 0) { - probe.offset.z += motionAxisState.currentStepSize; - //TODO: probe - } - else { - current_position.z += motionAxisState.currentStepSize; - ui.manual_move.soon(Z_AXIS); - } - drawCurZValue(); + moveAxis(Z_AXIS, 1); } static void z_minus() { - if (motionAxisState.blocked) { - return; - } - - quick_feedback(); - if (motionAxisState.z_selection < 0) { - probe.offset.z -= motionAxisState.currentStepSize; - } - else { - current_position.z -= motionAxisState.currentStepSize; - ui.manual_move.soon(Z_AXIS); - } - drawCurZValue(); + moveAxis(Z_AXIS, -1); } static void e_select() { - if (motionAxisState.blocked) { - return; - } - motionAxisState.e_selection++; if (motionAxisState.e_selection >= EXTRUDERS) { motionAxisState.e_selection = 0; @@ -854,46 +853,22 @@ static void e_select() { quick_feedback(); drawCurESelection(); - drawCurEValue(); + drawAxisValue(E_AXIS); } static void do_home() { quick_feedback(); - drawMessage("Homming..."); + drawMessage(GET_TEXT(MSG_LEVEL_BED_HOMING)); queue.inject_P(G28_STR); - motionAxisState.blocked = true; - drawCurXValue(); - drawCurYValue(); - drawCurZValue(); -} - -static void x_minus() { - if (motionAxisState.blocked) { - return; - } - - quick_feedback(); - current_position.x -= motionAxisState.currentStepSize; - ui.manual_move.soon(X_AXIS); - drawCurXValue(); -} - -static void x_plus() { - if (motionAxisState.blocked) { - return; - } - - quick_feedback(); - current_position.x += motionAxisState.currentStepSize; - ui.manual_move.soon(X_AXIS); - drawCurXValue(); + // Disable touch until home is done + touch.disable(); + drawAxisValue(E_AXIS); + drawAxisValue(X_AXIS); + drawAxisValue(Y_AXIS); + drawAxisValue(Z_AXIS); } static void step_size() { - if (motionAxisState.blocked) { - return; - } - motionAxisState.currentStepSize = motionAxisState.currentStepSize / 10.0; if (motionAxisState.currentStepSize < 0.0015) motionAxisState.currentStepSize = 10.0; quick_feedback(); @@ -901,14 +876,10 @@ static void step_size() { } static void z_select() { - if (motionAxisState.blocked) { - return; - } - motionAxisState.z_selection *= -1; quick_feedback(); drawCurZSelection(); - drawCurZValue(); + drawAxisValue(Z_AXIS); } static void drawBtn(int x, int y, const char* label, int32_t data, MarlinImage img, uint16_t bgColor, uint16_t fgColor = COLOR_BLACK) { @@ -937,6 +908,7 @@ static void drawBtn(int x, int y, const char* label, int32_t data, MarlinImage i void MarlinUI::move_axis() { // Reset motionAxisState.blocked = false; + touch.enable(); ui.clear_lcd(); @@ -955,7 +927,7 @@ void MarlinUI::move_axis() { x += BTN_WIDTH; motionAxisState.yValuePos.x = x + 2; motionAxisState.yValuePos.y = y; - drawCurYValue(); + drawAxisValue(Y_AXIS); x += spacing; drawBtn(x, y, "Z+", (int32_t)z_plus, imgUp, Z_BTN_COLOR); @@ -995,12 +967,12 @@ void MarlinUI::move_axis() { // Cur E motionAxisState.eValuePos.x = x; motionAxisState.eValuePos.y = y + BTN_HEIGHT + 2; - drawCurEValue(); + 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; - drawCurXValue(); + drawAxisValue(X_AXIS); x += BTN_WIDTH + spacing; drawBtn(x, y, "Y-", (int32_t)y_minus, imgDown, Y_BTN_COLOR); @@ -1011,7 +983,7 @@ void MarlinUI::move_axis() { // Cur Z motionAxisState.zValuePos.x = x; motionAxisState.zValuePos.y = y + BTN_HEIGHT + 2; - drawCurZValue(); + drawAxisValue(Z_AXIS); // ROW 4 -> step_size Back y = TFT_HEIGHT - Y_MARGIN - 32; // From e464ddce950ce7b57d565c5be4c7bda53e68b469 Mon Sep 17 00:00:00 2001 From: Victor Mateus Oliveira Date: Wed, 16 Sep 2020 00:58:21 -0300 Subject: [PATCH 05/15] to warn the user about the software end stops --- Marlin/src/lcd/tft/ui_480x320.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/Marlin/src/lcd/tft/ui_480x320.cpp b/Marlin/src/lcd/tft/ui_480x320.cpp index 8f7f4fedb56b..2f5055ec94e0 100644 --- a/Marlin/src/lcd/tft/ui_480x320.cpp +++ b/Marlin/src/lcd/tft/ui_480x320.cpp @@ -797,10 +797,17 @@ static void moveAxis(AxisEnum axis, const int8_t direction) { NOMORE(ui.manual_move.offset, max - current_position[axis]); #else current_position[axis] += diff; - if (direction < 0) - NOLESS(current_position[axis], min); - else - NOMORE(current_position[axis], max); + if (direction < 0 && current_position[axis] < min) { + current_position[axis] = min; + drawMessage(GET_TEXT(MSG_LCD_SOFT_ENDSTOPS)); + } + else if (direction > 0 && current_position[axis] > max) { + current_position[axis] = max; + drawMessage(GET_TEXT(MSG_LCD_SOFT_ENDSTOPS)); + } + else { + drawMessage(""); // clear the error + } #endif ui.manual_move.soon(axis From decc68de315a47e25a18184585b5124c6106da17 Mon Sep 17 00:00:00 2001 From: Victor Mateus Oliveira Date: Wed, 16 Sep 2020 12:26:48 -0300 Subject: [PATCH 06/15] probe config --- Marlin/src/lcd/tft/ui_480x320.cpp | 45 ++++++++++++++++++++++++------- 1 file changed, 36 insertions(+), 9 deletions(-) diff --git a/Marlin/src/lcd/tft/ui_480x320.cpp b/Marlin/src/lcd/tft/ui_480x320.cpp index 2f5055ec94e0..f19973b66a73 100644 --- a/Marlin/src/lcd/tft/ui_480x320.cpp +++ b/Marlin/src/lcd/tft/ui_480x320.cpp @@ -656,10 +656,14 @@ void menu_item(const uint8_t row, bool sel ) { } #include "../../module/probe.h" + +#define Z_SELECTION_Z 1 +#define Z_SELECTION_Z_PROBE -1 + struct MotionAxisState { xy_int_t xValuePos, yValuePos, zValuePos, eValuePos, stepValuePos, zTypePos, eNamePos; float currentStepSize = 10.0; - int z_selection = 1; + int z_selection = Z_SELECTION_Z; uint8_t e_selection = 0; bool homming = false; bool blocked = false; @@ -706,7 +710,7 @@ static void drawCurZSelection() { tft_string.set("Offset"); tft.canvas(motionAxisState.zTypePos.x, motionAxisState.zTypePos.y + 34, tft_string.width(), 34); tft.set_background(COLOR_BACKGROUND); - if (motionAxisState.z_selection < 0) { + if (motionAxisState.z_selection == Z_SELECTION_Z_PROBE) { tft.add_text(0, 0, Z_BTN_COLOR, tft_string); } } @@ -726,10 +730,12 @@ static void drawMessage(const char *msg) { } static void drawAxisValue(AxisEnum axis) { - const float value = NATIVE_TO_LOGICAL( - ui.manual_move.processing ? destination[axis] : current_position[axis] + TERN0(IS_KINEMATIC, ui.manual_move.offset), - axis - ); + const float value = axis == Z_AXIS && motionAxisState.z_selection == Z_SELECTION_Z_PROBE ? + probe.offset.z : + NATIVE_TO_LOGICAL( + ui.manual_move.processing ? destination[axis] : current_position[axis] + TERN0(IS_KINEMATIC, ui.manual_move.offset), + axis + ); xy_int_t pos; uint16_t color; switch (axis) { @@ -743,8 +749,6 @@ static void drawAxisValue(AxisEnum axis) { tft.set_background(COLOR_BACKGROUND); tft_string.set(ftostr52sp(value)); tft.add_text(0, 0, color, tft_string); - - //TODO: handle draw z offset } static void moveAxis(AxisEnum axis, const int8_t direction) { @@ -755,6 +759,30 @@ static void moveAxis(AxisEnum axis, const int8_t direction) { return; } + const float diff = motionAxisState.currentStepSize * direction; //float(int32_t(ui.encoderPosition)) * ui.manual_move.menu_scale; + + if (axis == Z_AXIS && motionAxisState.z_selection == Z_SELECTION_Z_PROBE) { + #if ENABLED(BABYSTEP_ZPROBE_OFFSET) + //SUBMENU(MSG_ZPROBE_ZOFFSET, lcd_babystep_zoffset); + #elif HAS_BED_PROBE + // only change probe.offset.z + probe.offset.z += diff; + if (direction < 0 && current_position[axis] < Z_PROBE_OFFSET_RANGE_MIN) { + current_position[axis] = Z_PROBE_OFFSET_RANGE_MIN; + drawMessage(GET_TEXT(MSG_LCD_SOFT_ENDSTOPS)); + } + else if (direction > 0 && current_position[axis] > Z_PROBE_OFFSET_RANGE_MAX) { + current_position[axis] = Z_PROBE_OFFSET_RANGE_MAX; + drawMessage(GET_TEXT(MSG_LCD_SOFT_ENDSTOPS)); + } + else { + drawMessage(""); // clear the error + } + drawAxisValue(axis); + #endif + return; + } + if (!ui.manual_move.processing) { // Start with no limits to movement float min = current_position[axis] - 1000, @@ -788,7 +816,6 @@ static void moveAxis(AxisEnum axis, const int8_t direction) { #endif // Get the new position - const float diff = motionAxisState.currentStepSize * direction; //float(int32_t(ui.encoderPosition)) * ui.manual_move.menu_scale; #if IS_KINEMATIC ui.manual_move.offset += diff; if (direction < 0) From c31dc51cf34571d0db759950220cb53deb9c1897 Mon Sep 17 00:00:00 2001 From: Victor Mateus Oliveira Date: Wed, 16 Sep 2020 16:59:09 -0300 Subject: [PATCH 07/15] disable steppers --- Marlin/src/lcd/tft/ui_480x320.cpp | 49 +++++++++++++++++++++---------- 1 file changed, 33 insertions(+), 16 deletions(-) diff --git a/Marlin/src/lcd/tft/ui_480x320.cpp b/Marlin/src/lcd/tft/ui_480x320.cpp index f19973b66a73..dff42abfb4c8 100644 --- a/Marlin/src/lcd/tft/ui_480x320.cpp +++ b/Marlin/src/lcd/tft/ui_480x320.cpp @@ -693,12 +693,13 @@ static void quick_feedback() { #endif } +#define CUR_STEP_VALUE_WIDTH 104 static void drawCurStepValue() { tft_string.set((uint8_t *)ftostr52sp(motionAxisState.currentStepSize)); tft_string.add("mm"); - tft.canvas(motionAxisState.stepValuePos.x, motionAxisState.stepValuePos.y, tft_string.width(), BTN_HEIGHT); + tft.canvas(motionAxisState.stepValuePos.x, motionAxisState.stepValuePos.y, CUR_STEP_VALUE_WIDTH, BTN_HEIGHT); tft.set_background(COLOR_BACKGROUND); - tft.add_text(0, 0, COLOR_AXIS_HOMED, tft_string); + tft.add_text(tft_string.center(CUR_STEP_VALUE_WIDTH), 0, COLOR_AXIS_HOMED, tft_string); } static void drawCurZSelection() { @@ -724,7 +725,7 @@ static void drawCurESelection() { } static void drawMessage(const char *msg) { - tft.canvas(X_MARGIN, TFT_HEIGHT - Y_MARGIN - 34, (TFT_HEIGHT - X_MARGIN * 2) / 2, 34); + tft.canvas(X_MARGIN, TFT_HEIGHT - Y_MARGIN - 34, TFT_HEIGHT / 2 - X_MARGIN - 5, 34); tft.set_background(COLOR_BACKGROUND); tft.add_text(0, 0, COLOR_YELLOW, msg); } @@ -759,7 +760,7 @@ static void moveAxis(AxisEnum axis, const int8_t direction) { return; } - const float diff = motionAxisState.currentStepSize * direction; //float(int32_t(ui.encoderPosition)) * ui.manual_move.menu_scale; + const float diff = motionAxisState.currentStepSize * direction; if (axis == Z_AXIS && motionAxisState.z_selection == Z_SELECTION_Z_PROBE) { #if ENABLED(BABYSTEP_ZPROBE_OFFSET) @@ -916,6 +917,11 @@ static void z_select() { drawAxisValue(Z_AXIS); } +static void disable_steppers() { + quick_feedback(); + queue.inject_P(PSTR("M84")); +} + static void drawBtn(int x, int y, const char* label, int32_t data, MarlinImage img, uint16_t bgColor, uint16_t fgColor = COLOR_BLACK) { uint16_t width = Images[imgBtn52Rounded].width; uint16_t height = Images[imgBtn52Rounded].height; @@ -926,15 +932,20 @@ static void drawBtn(int x, int y, const char* label, int32_t data, MarlinImage i tft.set_background(COLOR_BACKGROUND); tft.add_image(0, 0, imgBtn52Rounded, bgColor, COLOR_BACKGROUND, COLOR_DARKGREY); - tft.set_font(Helvetica12Bold); - tft_string.set_font(Helvetica12Bold); - tft_string.set(label); - tft_string.trim(); - tft.add_text(tft_string.center(width), height / 2 - tft_string.font_height() / 2, bgColor, tft_string); + if (label != NULL) { + tft.set_font(Helvetica12Bold); + tft_string.set_font(Helvetica12Bold); + tft_string.set(label); + tft_string.trim(); + tft.add_text(tft_string.center(width), height / 2 - tft_string.font_height() / 2, bgColor, tft_string); - tft.queue.sync(); - tft_string.set_font(Helvetica18); - tft.set_font(Helvetica18); + tft.queue.sync(); + tft_string.set_font(Helvetica18); + tft.set_font(Helvetica18); + } + else { + tft.add_image(0, 0, img, bgColor, COLOR_BACKGROUND, COLOR_DARKGREY); + } touch.add_control(BUTTON, x, y, width, height, data); } @@ -983,13 +994,16 @@ void MarlinUI::move_axis() { add_control(TFT_WIDTH / 2 - Images[imgHome].width / 2, y - (Images[imgHome].width - BTN_HEIGHT) / 2, BUTTON, (int32_t)do_home, imgHome); x += BTN_WIDTH + spacing; + uint16_t xplus_x = x; drawBtn(x, y, "X+", (int32_t)x_plus, imgRight, X_BTN_COLOR); x += BTN_WIDTH + spacing; motionAxisState.zTypePos.x = x; motionAxisState.zTypePos.y = y; drawCurZSelection(); - touch.add_control(BUTTON, x, y, BTN_WIDTH, 34 * 2, (int32_t)z_select); + #if HAS_BED_PROBE + touch.add_control(BUTTON, x, y, BTN_WIDTH, 34 * 2, (int32_t)z_select); + #endif // ROW 3 -> E- CurX Y- Z- y += BTN_HEIGHT + (TFT_HEIGHT - Y_MARGIN * 2 - 4 * BTN_HEIGHT) / 3; @@ -1019,13 +1033,16 @@ void MarlinUI::move_axis() { motionAxisState.zValuePos.y = y + BTN_HEIGHT + 2; drawAxisValue(Z_AXIS); - // ROW 4 -> step_size Back + // ROW 4 -> step_size disable steppers back y = TFT_HEIGHT - Y_MARGIN - 32; // - x = (TFT_WIDTH - X_MARGIN * 2) / 2; + x = TFT_WIDTH / 2 - CUR_STEP_VALUE_WIDTH / 2; motionAxisState.stepValuePos.x = x; motionAxisState.stepValuePos.y = y; drawCurStepValue(); - touch.add_control(BUTTON, motionAxisState.stepValuePos.x, motionAxisState.stepValuePos.y, tft_string.width(), BTN_HEIGHT, (int32_t)step_size); + touch.add_control(BUTTON, motionAxisState.stepValuePos.x, motionAxisState.stepValuePos.y, CUR_STEP_VALUE_WIDTH, BTN_HEIGHT, (int32_t)step_size); + + // alinged with x+ + drawBtn(xplus_x, TFT_HEIGHT - Y_MARGIN - BTN_HEIGHT, "off", (int32_t)disable_steppers, imgCancel, COLOR_WHITE); add_control(TFT_WIDTH - X_MARGIN - BTN_WIDTH, y, BACK, imgBack); } From bae322438e96abc50247c25691ba7dc25f5e3d3c Mon Sep 17 00:00:00 2001 From: Victor Mateus Oliveira Date: Wed, 16 Sep 2020 17:57:46 -0300 Subject: [PATCH 08/15] babystep --- Marlin/src/lcd/tft/ui_480x320.cpp | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/Marlin/src/lcd/tft/ui_480x320.cpp b/Marlin/src/lcd/tft/ui_480x320.cpp index dff42abfb4c8..423de277f82c 100644 --- a/Marlin/src/lcd/tft/ui_480x320.cpp +++ b/Marlin/src/lcd/tft/ui_480x320.cpp @@ -655,7 +655,13 @@ void menu_item(const uint8_t row, bool sel ) { TERN_(TOUCH_SCREEN, touch.add_control(sel ? CLICK : MENU_ITEM, 0, 4 + 45 * row, TFT_WIDTH, 43, encoderTopLine + row)); } -#include "../../module/probe.h" +#if ENABLED(BABYSTEP_ZPROBE_OFFSET) + #include "../../feature/babystep.h" +#endif + +#if HAS_BED_PROBE + #include "../../module/probe.h" +#endif #define Z_SELECTION_Z 1 #define Z_SELECTION_Z_PROBE -1 @@ -764,7 +770,26 @@ static void moveAxis(AxisEnum axis, const int8_t direction) { if (axis == Z_AXIS && motionAxisState.z_selection == Z_SELECTION_Z_PROBE) { #if ENABLED(BABYSTEP_ZPROBE_OFFSET) - //SUBMENU(MSG_ZPROBE_ZOFFSET, lcd_babystep_zoffset); + const int16_t babystep_increment = direction * BABYSTEP_SIZE_Z; + const bool do_probe = DISABLED(BABYSTEP_HOTEND_Z_OFFSET) || active_extruder == 0; + const float bsDiff = planner.steps_to_mm[Z_AXIS] * babystep_increment, + new_probe_offset = probe.offset.z + bsDiff, + new_offs = TERN(BABYSTEP_HOTEND_Z_OFFSET + , do_probe ? new_probe_offset : hotend_offset[active_extruder].z - bsDiff + , new_probe_offset + ); + if (WITHIN(new_offs, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX)) { + babystep.add_steps(Z_AXIS, babystep_increment); + if (do_probe) + probe.offset.z = new_offs; + else + TERN(BABYSTEP_HOTEND_Z_OFFSET, hotend_offset[active_extruder].z = new_offs, NOOP); + drawMessage(""); // clear the error + drawAxisValue(axis); + } + else { + drawMessage(GET_TEXT(MSG_LCD_SOFT_ENDSTOPS)); + } #elif HAS_BED_PROBE // only change probe.offset.z probe.offset.z += diff; From 97d3459e9c08b4c33451ee33e26afce3f8b9d434 Mon Sep 17 00:00:00 2001 From: Victor Mateus Oliveira Date: Wed, 16 Sep 2020 17:59:14 -0300 Subject: [PATCH 09/15] naming --- Marlin/src/lcd/tft/touch.cpp | 2 +- Marlin/src/lcd/tft/ui_320x240.cpp | 2 +- Marlin/src/lcd/tft/ui_480x320.cpp | 2 +- Marlin/src/lcd/ultralcd.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Marlin/src/lcd/tft/touch.cpp b/Marlin/src/lcd/tft/touch.cpp index 00f10b121d79..d19cc4bf1d95 100644 --- a/Marlin/src/lcd/tft/touch.cpp +++ b/Marlin/src/lcd/tft/touch.cpp @@ -258,7 +258,7 @@ void Touch::touch(touch_control_t *control) { #endif case MOVE_AXIS: - ui.goto_screen((screenFunc_t)ui.move_axis); + ui.goto_screen((screenFunc_t)ui.move_axis_screen); break; // TODO: TOUCH could receive data to pass to the callback diff --git a/Marlin/src/lcd/tft/ui_320x240.cpp b/Marlin/src/lcd/tft/ui_320x240.cpp index f227a2d408a1..2f4c90e17083 100644 --- a/Marlin/src/lcd/tft/ui_320x240.cpp +++ b/Marlin/src/lcd/tft/ui_320x240.cpp @@ -650,7 +650,7 @@ void menu_item(const uint8_t row, bool sel ) { TERN_(TOUCH_SCREEN, touch.add_control(sel ? CLICK : MENU_ITEM, 0, 2 + 34 * row, 320, 32, encoderTopLine + row)); } -void MarlinUI::move_axis() { +void MarlinUI::move_axis_screen() { } #endif // HAS_UI_320x240 diff --git a/Marlin/src/lcd/tft/ui_480x320.cpp b/Marlin/src/lcd/tft/ui_480x320.cpp index 423de277f82c..8f885998bada 100644 --- a/Marlin/src/lcd/tft/ui_480x320.cpp +++ b/Marlin/src/lcd/tft/ui_480x320.cpp @@ -975,7 +975,7 @@ static void drawBtn(int x, int y, const char* label, int32_t data, MarlinImage i touch.add_control(BUTTON, x, y, width, height, data); } -void MarlinUI::move_axis() { +void MarlinUI::move_axis_screen() { // Reset motionAxisState.blocked = false; touch.enable(); diff --git a/Marlin/src/lcd/ultralcd.h b/Marlin/src/lcd/ultralcd.h index 9f4a061b40df..480573cd4773 100644 --- a/Marlin/src/lcd/ultralcd.h +++ b/Marlin/src/lcd/ultralcd.h @@ -683,7 +683,7 @@ class MarlinUI { #endif #if HAS_GRAPHICAL_TFT - static void move_axis(); + static void move_axis_screen(); #endif private: From f2a8a62bd68329697cf371b1af3033177723a8c5 Mon Sep 17 00:00:00 2001 From: Victor Mateus Oliveira Date: Wed, 16 Sep 2020 18:30:57 -0300 Subject: [PATCH 10/15] only babystep while printing --- Marlin/src/lcd/tft/ui_480x320.cpp | 41 +++++++++++++++++++------------ 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/Marlin/src/lcd/tft/ui_480x320.cpp b/Marlin/src/lcd/tft/ui_480x320.cpp index 8f885998bada..66699eea0691 100644 --- a/Marlin/src/lcd/tft/ui_480x320.cpp +++ b/Marlin/src/lcd/tft/ui_480x320.cpp @@ -947,12 +947,14 @@ static void disable_steppers() { queue.inject_P(PSTR("M84")); } -static void drawBtn(int x, int y, const char* label, int32_t data, MarlinImage img, uint16_t bgColor, uint16_t fgColor = COLOR_BLACK) { +static void drawBtn(int x, int y, const char* label, int32_t data, MarlinImage img, uint16_t bgColor, bool enabled = true) { uint16_t width = Images[imgBtn52Rounded].width; uint16_t height = Images[imgBtn52Rounded].height; tft.queue.sync(); //need sync to change font + if (!enabled) bgColor = COLOR_CONTROL_DISABLED; + tft.canvas(x, y, width, height); tft.set_background(COLOR_BACKGROUND); tft.add_image(0, 0, imgBtn52Rounded, bgColor, COLOR_BACKGROUND, COLOR_DARKGREY); @@ -972,7 +974,7 @@ static void drawBtn(int x, int y, const char* label, int32_t data, MarlinImage i tft.add_image(0, 0, img, bgColor, COLOR_BACKGROUND, COLOR_DARKGREY); } - touch.add_control(BUTTON, x, y, width, height, data); + if (enabled) touch.add_control(BUTTON, x, y, width, height, data); } void MarlinUI::move_axis_screen() { @@ -984,14 +986,19 @@ void MarlinUI::move_axis_screen() { TERN_(TOUCH_SCREEN, touch.clear()); + const bool busy = printingIsActive(); + + // if we have baby step and we are printing, select baby step + if (busy && ENABLED(BABYSTEP_ZPROBE_OFFSET)) motionAxisState.z_selection = Z_SELECTION_Z_PROBE; + // ROW 1 -> E- Y- CurY Z+ int x = X_MARGIN, y = Y_MARGIN, spacing = 0; - drawBtn(x, y, "E+", (int32_t)e_plus, imgUp, E_BTN_COLOR); + drawBtn(x, y, "E+", (int32_t)e_plus, imgUp, E_BTN_COLOR, !busy); spacing = (TFT_WIDTH - X_MARGIN * 2 - 3 * BTN_WIDTH) / 2; x += BTN_WIDTH + spacing; - drawBtn(x, y, "Y+", (int32_t)y_plus, imgUp, Y_BTN_COLOR); + drawBtn(x, y, "Y+", (int32_t)y_plus, imgUp, Y_BTN_COLOR, !busy); // Cur Y x += BTN_WIDTH; @@ -1000,7 +1007,7 @@ void MarlinUI::move_axis_screen() { drawAxisValue(Y_AXIS); x += spacing; - drawBtn(x, y, "Z+", (int32_t)z_plus, imgUp, Z_BTN_COLOR); + drawBtn(x, y, "Z+", (int32_t)z_plus, imgUp, Z_BTN_COLOR, !busy || ENABLED(BABYSTEP_ZPROBE_OFFSET)); //only enabled when not busy or have baby step // ROW 2 -> "Ex" X- HOME X+ "Z" y += BTN_HEIGHT + (TFT_HEIGHT - Y_MARGIN * 2 - 4 * BTN_HEIGHT) / 3; @@ -1010,24 +1017,24 @@ void MarlinUI::move_axis_screen() { motionAxisState.eNamePos.x = x; motionAxisState.eNamePos.y = y; drawCurESelection(); - touch.add_control(BUTTON, x, y, BTN_WIDTH, BTN_HEIGHT, (int32_t)e_select); + if (!busy) touch.add_control(BUTTON, x, y, BTN_WIDTH, BTN_HEIGHT, (int32_t)e_select); x += BTN_WIDTH + spacing; - drawBtn(x, y, "X-", (int32_t)x_minus, imgLeft, X_BTN_COLOR); + drawBtn(x, y, "X-", (int32_t)x_minus, imgLeft, X_BTN_COLOR, !busy); x += BTN_WIDTH + spacing; //imgHome is 64x64 - add_control(TFT_WIDTH / 2 - Images[imgHome].width / 2, y - (Images[imgHome].width - BTN_HEIGHT) / 2, BUTTON, (int32_t)do_home, imgHome); + add_control(TFT_WIDTH / 2 - Images[imgHome].width / 2, y - (Images[imgHome].width - BTN_HEIGHT) / 2, BUTTON, (int32_t)do_home, imgHome, !busy); x += BTN_WIDTH + spacing; uint16_t xplus_x = x; - drawBtn(x, y, "X+", (int32_t)x_plus, imgRight, X_BTN_COLOR); + drawBtn(x, y, "X+", (int32_t)x_plus, imgRight, X_BTN_COLOR, !busy); x += BTN_WIDTH + spacing; motionAxisState.zTypePos.x = x; motionAxisState.zTypePos.y = y; drawCurZSelection(); #if HAS_BED_PROBE - touch.add_control(BUTTON, x, y, BTN_WIDTH, 34 * 2, (int32_t)z_select); + if (!busy) touch.add_control(BUTTON, x, y, BTN_WIDTH, 34 * 2, (int32_t)z_select); #endif // ROW 3 -> E- CurX Y- Z- @@ -1035,7 +1042,7 @@ void MarlinUI::move_axis_screen() { x = X_MARGIN; spacing = (TFT_WIDTH - X_MARGIN * 2 - 3 * BTN_WIDTH) / 2; - drawBtn(x, y, "E-", (int32_t)e_minus, imgDown, E_BTN_COLOR); + drawBtn(x, y, "E-", (int32_t)e_minus, imgDown, E_BTN_COLOR, !busy); // Cur E motionAxisState.eValuePos.x = x; @@ -1048,10 +1055,10 @@ void MarlinUI::move_axis_screen() { drawAxisValue(X_AXIS); x += BTN_WIDTH + spacing; - drawBtn(x, y, "Y-", (int32_t)y_minus, imgDown, Y_BTN_COLOR); + drawBtn(x, y, "Y-", (int32_t)y_minus, imgDown, Y_BTN_COLOR, !busy); x += BTN_WIDTH + spacing; - drawBtn(x, y, "Z-", (int32_t)z_minus, imgDown, Z_BTN_COLOR); + drawBtn(x, y, "Z-", (int32_t)z_minus, imgDown, Z_BTN_COLOR, !busy || ENABLED(BABYSTEP_ZPROBE_OFFSET)); //only enabled when not busy or have baby step // Cur Z motionAxisState.zValuePos.x = x; @@ -1063,11 +1070,13 @@ void MarlinUI::move_axis_screen() { x = TFT_WIDTH / 2 - CUR_STEP_VALUE_WIDTH / 2; motionAxisState.stepValuePos.x = x; motionAxisState.stepValuePos.y = y; - drawCurStepValue(); - touch.add_control(BUTTON, motionAxisState.stepValuePos.x, motionAxisState.stepValuePos.y, CUR_STEP_VALUE_WIDTH, BTN_HEIGHT, (int32_t)step_size); + if (!busy) { + drawCurStepValue(); + touch.add_control(BUTTON, motionAxisState.stepValuePos.x, motionAxisState.stepValuePos.y, CUR_STEP_VALUE_WIDTH, BTN_HEIGHT, (int32_t)step_size); + } // alinged with x+ - drawBtn(xplus_x, TFT_HEIGHT - Y_MARGIN - BTN_HEIGHT, "off", (int32_t)disable_steppers, imgCancel, COLOR_WHITE); + drawBtn(xplus_x, TFT_HEIGHT - Y_MARGIN - BTN_HEIGHT, "off", (int32_t)disable_steppers, imgCancel, COLOR_WHITE, !busy); add_control(TFT_WIDTH - X_MARGIN - BTN_WIDTH, y, BACK, imgBack); } From feeb8dc36ca31698f8939c779979cadc8667b3b5 Mon Sep 17 00:00:00 2001 From: Victor Mateus Oliveira Date: Wed, 16 Sep 2020 18:42:54 -0300 Subject: [PATCH 11/15] message size --- Marlin/src/lcd/tft/ui_480x320.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/lcd/tft/ui_480x320.cpp b/Marlin/src/lcd/tft/ui_480x320.cpp index 66699eea0691..4d09b80162de 100644 --- a/Marlin/src/lcd/tft/ui_480x320.cpp +++ b/Marlin/src/lcd/tft/ui_480x320.cpp @@ -731,7 +731,7 @@ static void drawCurESelection() { } static void drawMessage(const char *msg) { - tft.canvas(X_MARGIN, TFT_HEIGHT - Y_MARGIN - 34, TFT_HEIGHT / 2 - X_MARGIN - 5, 34); + tft.canvas(X_MARGIN, TFT_HEIGHT - Y_MARGIN - 34, TFT_HEIGHT / 2, 34); tft.set_background(COLOR_BACKGROUND); tft.add_text(0, 0, COLOR_YELLOW, msg); } From f46af7c2310151e27c8f76baacb7842ed8e6ee9e Mon Sep 17 00:00:00 2001 From: Victor Mateus Oliveira Date: Wed, 16 Sep 2020 18:44:53 -0300 Subject: [PATCH 12/15] make optional --- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h index 1295c7c46b12..3a56c10a57e8 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h @@ -325,13 +325,21 @@ #define LCD_PINS_RS PC6 #elif ENABLED(TFT_480x320_SPI) + #ifndef XPT2046_X_CALIBRATION #define XPT2046_X_CALIBRATION -17253 + #endif + #ifndef XPT2046_Y_CALIBRATION #define XPT2046_Y_CALIBRATION 11579 + #endif + #ifndef XPT2046_X_OFFSET #define XPT2046_X_OFFSET 514 + #endif + #ifndef XPT2046_Y_OFFSET #define XPT2046_Y_OFFSET -24 + #endif - #define TFT_DRIVER ST7796 - #define TFT_BUFFER_SIZE 14400 + #define TFT_DRIVER ST7796 + #define TFT_BUFFER_SIZE 14400 #endif From 85fda4d1dee134ddf4788721775e467ea3536928 Mon Sep 17 00:00:00 2001 From: Victor Mateus Oliveira Date: Wed, 16 Sep 2020 18:54:30 -0300 Subject: [PATCH 13/15] fix when no probe --- Marlin/src/lcd/tft/ui_480x320.cpp | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/Marlin/src/lcd/tft/ui_480x320.cpp b/Marlin/src/lcd/tft/ui_480x320.cpp index 4d09b80162de..d6409c1dca7e 100644 --- a/Marlin/src/lcd/tft/ui_480x320.cpp +++ b/Marlin/src/lcd/tft/ui_480x320.cpp @@ -737,8 +737,11 @@ static void drawMessage(const char *msg) { } static void drawAxisValue(AxisEnum axis) { - const float value = axis == Z_AXIS && motionAxisState.z_selection == Z_SELECTION_Z_PROBE ? - probe.offset.z : + const float value = + #if HAS_BED_PROBE + axis == Z_AXIS && motionAxisState.z_selection == Z_SELECTION_Z_PROBE ? + probe.offset.z : + #endif NATIVE_TO_LOGICAL( ui.manual_move.processing ? destination[axis] : current_position[axis] + TERN0(IS_KINEMATIC, ui.manual_move.offset), axis @@ -935,12 +938,14 @@ static void step_size() { drawCurStepValue(); } -static void z_select() { - motionAxisState.z_selection *= -1; - quick_feedback(); - drawCurZSelection(); - drawAxisValue(Z_AXIS); -} +#if HAS_BED_PROBE + static void z_select() { + motionAxisState.z_selection *= -1; + quick_feedback(); + drawCurZSelection(); + drawAxisValue(Z_AXIS); + } +#endif static void disable_steppers() { quick_feedback(); From b53524decfce8a424f71ece90cfe7b1c478669fd Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 17 Sep 2020 06:47:49 -0500 Subject: [PATCH 14/15] Update pins_MKS_ROBIN_NANO_V2.h --- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h index 3a56c10a57e8..f9652f39348b 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h @@ -338,8 +338,8 @@ #define XPT2046_Y_OFFSET -24 #endif - #define TFT_DRIVER ST7796 - #define TFT_BUFFER_SIZE 14400 + #define TFT_DRIVER ST7796 + #define TFT_BUFFER_SIZE 14400 #endif From 154f44279860b5420594ed86f3bb1369f383d918 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 17 Sep 2020 06:50:52 -0500 Subject: [PATCH 15/15] Update tft_color.h --- Marlin/src/lcd/tft/tft_color.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Marlin/src/lcd/tft/tft_color.h b/Marlin/src/lcd/tft/tft_color.h index 0765c63136f5..14906a1bcf66 100644 --- a/Marlin/src/lcd/tft/tft_color.h +++ b/Marlin/src/lcd/tft/tft_color.h @@ -68,10 +68,10 @@ #define COLOR_DARK_PURPLE 0x9930 // #992380 #ifndef COLOR_BACKGROUND - #define COLOR_BACKGROUND 0x20AC // #1E156E + #define COLOR_BACKGROUND 0x20AC // #1E156E #endif -#define COLOR_SELECTION_BG 0x9930 // #992380 -#define COLOR_WEBSITE_URL 0x03B7 +#define COLOR_SELECTION_BG 0x9930 // #992380 +#define COLOR_WEBSITE_URL 0x03B7 #define COLOR_INACTIVE COLOR_GREY #define COLOR_COLD COLOR_AQUA