diff --git a/Marlin/src/lcd/tft/bitmaps/time_elapsed.bmp b/Marlin/src/lcd/tft/bitmaps/time_elapsed.bmp new file mode 100644 index 0000000000000..6bb4b1a43949a Binary files /dev/null and b/Marlin/src/lcd/tft/bitmaps/time_elapsed.bmp differ diff --git a/Marlin/src/lcd/tft/bitmaps/time_elapsed.svg b/Marlin/src/lcd/tft/bitmaps/time_elapsed.svg new file mode 100644 index 0000000000000..da2d37b56b6f4 --- /dev/null +++ b/Marlin/src/lcd/tft/bitmaps/time_elapsed.svg @@ -0,0 +1,190 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Marlin/src/lcd/tft/bitmaps/time_remaining.bmp b/Marlin/src/lcd/tft/bitmaps/time_remaining.bmp new file mode 100644 index 0000000000000..36e40c9c57355 Binary files /dev/null and b/Marlin/src/lcd/tft/bitmaps/time_remaining.bmp differ diff --git a/Marlin/src/lcd/tft/bitmaps/time_remaining.svg b/Marlin/src/lcd/tft/bitmaps/time_remaining.svg new file mode 100644 index 0000000000000..ff4cdb8e24d46 --- /dev/null +++ b/Marlin/src/lcd/tft/bitmaps/time_remaining.svg @@ -0,0 +1,189 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Marlin/src/lcd/tft/images/time_elapsed_32x32x4.cpp b/Marlin/src/lcd/tft/images/time_elapsed_32x32x4.cpp new file mode 100644 index 0000000000000..e6626f4c876bc --- /dev/null +++ b/Marlin/src/lcd/tft/images/time_elapsed_32x32x4.cpp @@ -0,0 +1,57 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * 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 time_elapsed_32x32x4[512] = { + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0xad, 0xca, 0x98, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x8a, 0xff, 0xff, 0xfe, 0xb8, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0xce, 0xc8, 0x8d, 0xff, 0xff, 0xff, 0xff, 0xd8, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x8a, 0xff, 0xfa, 0x6a, 0xff, 0xff, 0xff, 0xff, 0xff, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x8a, 0xff, 0xfa, 0x58, 0x9d, 0xcd, 0xff, 0xff, 0xff, 0xf9, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0xdf, 0xe6, 0x58, 0x85, 0x55, 0x69, 0xff, 0xff, 0xff, 0x88, 0x88, 0x88, + 0x88, 0x88, 0xbb, 0x88, 0x66, 0x55, 0x68, 0x88, 0x88, 0x76, 0x6b, 0xff, 0xff, 0xf6, 0x88, 0x88, + 0x88, 0x8c, 0xff, 0xe6, 0x87, 0x67, 0x88, 0x88, 0x88, 0x88, 0x86, 0x9f, 0xff, 0xfd, 0x68, 0x88, + 0x88, 0x8e, 0xff, 0xf7, 0x68, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x8b, 0xff, 0xff, 0x67, 0x88, + 0x88, 0x8b, 0xff, 0xd5, 0x68, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0xff, 0xff, 0xb6, 0x88, + 0x88, 0x88, 0x89, 0x65, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0xaf, 0xff, 0xe5, 0x88, + 0x88, 0x88, 0x76, 0x56, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x8f, 0xff, 0xf7, 0x78, + 0x88, 0x9c, 0x98, 0x88, 0x88, 0x88, 0x88, 0x9e, 0xdb, 0x98, 0x88, 0x88, 0x8d, 0xff, 0xf8, 0x68, + 0x89, 0xff, 0xf8, 0x88, 0x88, 0x88, 0x89, 0xff, 0xff, 0xff, 0xec, 0xa9, 0x8d, 0xff, 0xfa, 0x68, + 0x8b, 0xff, 0xfa, 0x68, 0x88, 0x88, 0x8c, 0xff, 0xff, 0xff, 0xff, 0xff, 0xad, 0xff, 0xfd, 0x58, + 0x89, 0xff, 0xf7, 0x58, 0x88, 0x88, 0x89, 0xff, 0xff, 0xff, 0xeb, 0x96, 0x59, 0xff, 0xf9, 0x58, + 0x88, 0x89, 0x75, 0x68, 0x88, 0x88, 0x88, 0x8d, 0xda, 0x86, 0x55, 0x55, 0x67, 0x9c, 0x95, 0x58, + 0x88, 0x86, 0x56, 0x88, 0x88, 0x88, 0x88, 0x86, 0x55, 0x56, 0x67, 0x88, 0x88, 0x75, 0x55, 0x78, + 0x88, 0x88, 0xbb, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x8b, 0xa8, 0x88, 0x88, + 0x88, 0x8c, 0xff, 0xe6, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0xef, 0xfb, 0x78, 0x88, + 0x88, 0x8e, 0xff, 0xf6, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0xff, 0xfd, 0x58, 0x88, + 0x88, 0x8b, 0xff, 0xd5, 0x68, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0xef, 0xfa, 0x57, 0x88, + 0x88, 0x88, 0x89, 0x65, 0x79, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x89, 0x95, 0x58, 0x88, + 0x88, 0x88, 0x76, 0x58, 0xef, 0xe8, 0x88, 0x88, 0x88, 0x88, 0xef, 0xd8, 0x86, 0x55, 0x78, 0x88, + 0x88, 0x88, 0x88, 0x8b, 0xff, 0xf9, 0x68, 0x9b, 0x98, 0x8b, 0xff, 0xf9, 0x68, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x8a, 0xff, 0xf8, 0x59, 0xff, 0xf8, 0x8b, 0xff, 0xf8, 0x58, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0xad, 0xa5, 0x5b, 0xff, 0xf9, 0x68, 0xbe, 0xa5, 0x68, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x75, 0x55, 0x79, 0xff, 0xf7, 0x58, 0x75, 0x55, 0x78, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x78, 0x88, 0x8a, 0x75, 0x68, 0x88, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x86, 0x56, 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/images/time_remaining_32x32x4.cpp b/Marlin/src/lcd/tft/images/time_remaining_32x32x4.cpp new file mode 100644 index 0000000000000..8c64403a2bb30 --- /dev/null +++ b/Marlin/src/lcd/tft/images/time_remaining_32x32x4.cpp @@ -0,0 +1,57 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * 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 time_remaining_32x32x4[512] = { + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x9a, 0xbd, 0xb8, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x89, 0xce, 0xff, 0xff, 0xf9, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0xef, 0xff, 0xff, 0xff, 0xfd, 0x58, 0xbe, 0xb8, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x9f, 0xff, 0xff, 0xff, 0xff, 0xf9, 0x5a, 0xff, 0xf9, 0x78, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x8a, 0xff, 0xff, 0xff, 0xfd, 0xcd, 0x95, 0x5b, 0xff, 0xfa, 0x58, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x9f, 0xff, 0xff, 0xf9, 0x65, 0x55, 0x55, 0x78, 0xef, 0xe6, 0x58, 0x88, 0x88, 0x88, + 0x88, 0x88, 0xff, 0xff, 0xfb, 0x55, 0x56, 0x78, 0x88, 0x88, 0x67, 0x55, 0x6a, 0x98, 0x88, 0x88, + 0x88, 0x8e, 0xff, 0xff, 0x95, 0x56, 0x88, 0x88, 0x88, 0x88, 0x86, 0x66, 0xdf, 0xfa, 0x78, 0x88, + 0x88, 0x9f, 0xff, 0xfb, 0x55, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0xff, 0xfe, 0x58, 0x88, + 0x88, 0xcf, 0xff, 0xf5, 0x57, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0xef, 0xfc, 0x57, 0x88, + 0x88, 0xef, 0xff, 0x95, 0x68, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x8b, 0xa6, 0x57, 0x88, + 0x89, 0xff, 0xff, 0x65, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x86, 0x55, 0x68, 0x88, + 0x8a, 0xff, 0xfd, 0x56, 0x88, 0x88, 0xac, 0xdd, 0x88, 0x88, 0x88, 0x88, 0x88, 0x9b, 0x98, 0x88, + 0x8c, 0xff, 0xfc, 0x58, 0xbd, 0xef, 0xff, 0xff, 0xf7, 0x88, 0x88, 0x88, 0x89, 0xff, 0xf8, 0x88, + 0x8d, 0xff, 0xfd, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xf9, 0x68, 0x88, 0x88, 0x8b, 0xff, 0xfa, 0x68, + 0x8a, 0xff, 0xf9, 0x57, 0x9c, 0xef, 0xff, 0xff, 0xf6, 0x58, 0x88, 0x88, 0x89, 0xff, 0xf8, 0x58, + 0x88, 0x9c, 0x85, 0x57, 0x65, 0x56, 0x8a, 0xdd, 0x75, 0x68, 0x88, 0x88, 0x88, 0x8a, 0x85, 0x68, + 0x88, 0x75, 0x55, 0x88, 0x88, 0x87, 0x66, 0x55, 0x56, 0x88, 0x88, 0x88, 0x88, 0x86, 0x56, 0x88, + 0x88, 0x88, 0xbb, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x8b, 0xa8, 0x88, 0x88, + 0x88, 0x8c, 0xff, 0xe6, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0xef, 0xfb, 0x78, 0x88, + 0x88, 0x8e, 0xff, 0xf6, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0xff, 0xfd, 0x58, 0x88, + 0x88, 0x8b, 0xff, 0xd5, 0x68, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0xef, 0xfa, 0x57, 0x88, + 0x88, 0x88, 0x89, 0x65, 0x79, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x89, 0x95, 0x58, 0x88, + 0x88, 0x88, 0x76, 0x58, 0xef, 0xe8, 0x88, 0x88, 0x88, 0x88, 0xef, 0xd8, 0x86, 0x55, 0x78, 0x88, + 0x88, 0x88, 0x88, 0x8b, 0xff, 0xf9, 0x68, 0x9b, 0x98, 0x8b, 0xff, 0xf9, 0x68, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x8a, 0xff, 0xf8, 0x59, 0xff, 0xf8, 0x8b, 0xff, 0xf8, 0x58, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0xad, 0xa5, 0x5b, 0xff, 0xf9, 0x68, 0xbe, 0xa5, 0x68, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x75, 0x55, 0x79, 0xff, 0xf7, 0x58, 0x75, 0x55, 0x78, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x78, 0x88, 0x8a, 0x75, 0x68, 0x88, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x86, 0x56, 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_image.cpp b/Marlin/src/lcd/tft/tft_image.cpp index 3651899dd717f..fb5196a042031 100644 --- a/Marlin/src/lcd/tft/tft_image.cpp +++ b/Marlin/src/lcd/tft/tft_image.cpp @@ -72,6 +72,8 @@ const tImage Left_32x32x4 = { (void *)left_32x32x4, 32, 32, GREYSCALE4 const tImage Right_32x32x4 = { (void *)right_32x32x4, 32, 32, GREYSCALE4 }; const tImage Refresh_32x32x4 = { (void *)refresh_32x32x4, 32, 32, GREYSCALE4 }; const tImage Leveling_32x32x4 = { (void *)leveling_32x32x4, 32, 32, GREYSCALE4 }; +const tImage Time_Elapsed_32x32x4 = { (void *)time_elapsed_32x32x4, 32, 32, GREYSCALE4 }; +const tImage Time_Remaining_32x32x4 = { (void *)time_remaining_32x32x4, 32, 32, GREYSCALE4 }; const tImage Slider8x16x4 = { (void *)slider_8x16x4, 8, 16, GREYSCALE4 }; @@ -108,6 +110,8 @@ const tImage Images[imgCount] = { Home_64x64x4, BtnRounded_64x52x4, BtnRounded_42x39x4, + Time_Elapsed_32x32x4, + Time_Remaining_32x32x4, }; #endif // HAS_GRAPHICAL_TFT diff --git a/Marlin/src/lcd/tft/tft_image.h b/Marlin/src/lcd/tft/tft_image.h index aeb1ca2bf5594..0fe249354e23d 100644 --- a/Marlin/src/lcd/tft/tft_image.h +++ b/Marlin/src/lcd/tft/tft_image.h @@ -61,6 +61,8 @@ extern const uint8_t left_32x32x4[]; extern const uint8_t right_32x32x4[]; extern const uint8_t refresh_32x32x4[]; extern const uint8_t leveling_32x32x4[]; +extern const uint8_t time_elapsed_32x32x4[]; +extern const uint8_t time_remaining_32x32x4[]; extern const uint8_t slider_8x16x4[]; @@ -97,6 +99,9 @@ enum MarlinImage : uint8_t { imgHome, imgBtn52Rounded, imgBtn39Rounded, + imgTimeElapsed, + imgTimeRemaining, + // Special values - must be at the end! imgCount, noImage = imgCount, imgPageUp = imgLeft, @@ -172,7 +177,10 @@ extern const tImage Left_32x32x4; extern const tImage Right_32x32x4; extern const tImage Refresh_32x32x4; extern const tImage Leveling_32x32x4; +extern const tImage Time_Elapsed_32x32x4; +extern const tImage Time_Remaining_32x32x4; extern const tImage Slider8x16x4; extern const tImage Images[imgCount]; + diff --git a/Marlin/src/lcd/tft/ui_480x320.cpp b/Marlin/src/lcd/tft/ui_480x320.cpp index 992fef46dfd66..3d0da95b4d9e5 100644 --- a/Marlin/src/lcd/tft/ui_480x320.cpp +++ b/Marlin/src/lcd/tft/ui_480x320.cpp @@ -342,7 +342,7 @@ void MarlinUI::draw_status_screen() { tft.set_background(COLOR_BACKGROUND); tft_string.set(elapsed_str); uint16_t text_pos_x = tft_string.center(time_str_width - image_width); - tft.add_image(text_pos_x, 0, imgFeedRate, COLOR_PRINT_TIME); + tft.add_image(text_pos_x, 0, imgTimeElapsed, COLOR_PRINT_TIME); tft.add_text(text_pos_x + image_width, 1, COLOR_PRINT_TIME, tft_string); #else // Print duration so far (time elapsed) - aligned under feed rate @@ -352,7 +352,7 @@ void MarlinUI::draw_status_screen() { tft.canvas(96, y, 144, 32); tft.set_background(COLOR_BACKGROUND); - tft.add_image(0, 0, imgFeedRate, COLOR_PRINT_TIME); + tft.add_image(0, 0, imgTimeElapsed, COLOR_PRINT_TIME); tft_string.set(elapsed_str); tft.add_text(36, 1, COLOR_PRINT_TIME, tft_string); @@ -384,7 +384,7 @@ void MarlinUI::draw_status_screen() { tft.canvas(256, y, 144, 32); tft.set_background(COLOR_BACKGROUND); color = printingIsActive() ? COLOR_PRINT_TIME : COLOR_INACTIVE; - tft.add_image(0, 0, imgFeedRate, color); + tft.add_image(0, 0, imgTimeRemaining, color); tft.add_text(36, 1, color, tft_string); #endif