From cf50240e82e9bf187b9d6733d9dd0aed1fe57806 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 15 Aug 2023 21:03:42 -0500 Subject: [PATCH 01/25] =?UTF-8?q?=F0=9F=93=9D=20Update=20INO=20(c)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Marlin.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/Marlin.ino b/Marlin/Marlin.ino index 744e98c2e313..81652000a8a6 100644 --- a/Marlin/Marlin.ino +++ b/Marlin/Marlin.ino @@ -2,7 +2,7 @@ Marlin Firmware - (c) 2011-2020 MarlinFirmware + (c) 2011-2023 MarlinFirmware Portions of Marlin are (c) by their respective authors. All code complies with GPLv2 and/or GPLv3 From 7e7dcb869257bb82adffbb349699560dc34a1f09 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Wed, 16 Aug 2023 06:08:59 +0000 Subject: [PATCH 02/25] [cron] Bump distribution date (2023-08-16) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index c272eeb5d15a..0db93b776dcd 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2023-08-14" +//#define STRING_DISTRIBUTION_DATE "2023-08-16" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index d9518b4ee222..f9fb01a64b0c 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2023-08-14" + #define STRING_DISTRIBUTION_DATE "2023-08-16" #endif /** From 49ead19d008dd54403b37818b21e79b8ccfa4b89 Mon Sep 17 00:00:00 2001 From: Vovodroid Date: Fri, 18 Aug 2023 02:13:10 +0300 Subject: [PATCH 03/25] =?UTF-8?q?=F0=9F=94=A7=20Reversible=20file=20alpha?= =?UTF-8?q?=20sorting=20(#26130)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- Marlin/Configuration_adv.h | 5 +-- Marlin/src/gcode/sd/M34.cpp | 12 ++++++- Marlin/src/inc/Changes.h | 2 ++ Marlin/src/inc/Conditionals_post.h | 4 +-- Marlin/src/lcd/e3v2/proui/dwin.cpp | 4 +-- Marlin/src/sd/SdBaseFile.cpp | 14 ++++---- Marlin/src/sd/cardreader.cpp | 46 ++++++++++++------------ Marlin/src/sd/cardreader.h | 16 +++++---- buildroot/tests/STM32F103VE_longer_maple | 6 ++-- 9 files changed, 65 insertions(+), 44 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 82cfc99b30ff..da9f3a66c688 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -1746,9 +1746,10 @@ // SD Card Sorting options #if ENABLED(SDCARD_SORT_ALPHA) + #define SDSORT_REVERSE false // Default to sorting file names in reverse order. #define SDSORT_LIMIT 40 // Maximum number of sorted items (10-256). Costs 27 bytes each. - #define FOLDER_SORTING -1 // -1=above 0=none 1=below - #define SDSORT_GCODE false // Allow turning sorting on/off with LCD and M34 G-code. + #define SDSORT_FOLDERS -1 // -1=above 0=none 1=below + #define SDSORT_GCODE false // Enable G-code M34 to set sorting behaviors: M34 S<-1|0|1> F<-1|0|1> #define SDSORT_USES_RAM false // Pre-allocate a static array for faster pre-sorting. #define SDSORT_USES_STACK false // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.) #define SDSORT_CACHE_NAMES false // Keep sorted items in RAM longer for speedy performance. Most expensive option. diff --git a/Marlin/src/gcode/sd/M34.cpp b/Marlin/src/gcode/sd/M34.cpp index 0a7d4d8c6221..3a7544292842 100644 --- a/Marlin/src/gcode/sd/M34.cpp +++ b/Marlin/src/gcode/sd/M34.cpp @@ -29,9 +29,19 @@ /** * M34: Set SD Card Sorting Options + * + * S - Default sorting (i.e., SDSORT_REVERSE) + * S-1 - Reverse alpha sorting + * S0 - FID Order (not always newest) + * S1 - Forward alpha sorting + * S2 - Alias for S-1 [deprecated] + * + * F-1 - Folders above files + * F0 - Sort According to 'S' + * F1 - Folders after files */ void GcodeSuite::M34() { - if (parser.seen('S')) card.setSortOn(parser.value_bool()); + if (parser.seen('S')) card.setSortOn(SortFlag(parser.ushortval('S', TERN(SDSORT_REVERSE, AS_REV, AS_FWD)))); if (parser.seenval('F')) { const int v = parser.value_long(); card.setSortFolders(v < 0 ? -1 : v > 0 ? 1 : 0); diff --git a/Marlin/src/inc/Changes.h b/Marlin/src/inc/Changes.h index b64b6a7ca766..942c5303d1fd 100644 --- a/Marlin/src/inc/Changes.h +++ b/Marlin/src/inc/Changes.h @@ -661,6 +661,8 @@ #error "Z4_USE_ENDSTOP is obsolete. Instead set Z4_STOP_PIN directly. (e.g., 'Z4_USE_ENDSTOP _ZMAX_' becomes 'Z4_STOP_PIN Z_MAX_PIN')" #elif defined(INTEGRATED_BABYSTEPPING) #error "INTEGRATED_BABYSTEPPING is no longer needed and should be removed." +#elif defined(FOLDER_SORTING) + #error "FOLDER_SORTING is now SDSORT_FOLDERS." #endif // L64xx stepper drivers have been removed diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index 8f3a2eee27b9..33b42e851195 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -3337,8 +3337,8 @@ #define SDSORT_CACHE_NAMES true #define SDSORT_CACHE_LPC1768_WARNING 1 #endif - #ifndef FOLDER_SORTING - #define FOLDER_SORTING -1 + #ifndef SDSORT_FOLDERS + #define SDSORT_FOLDERS -1 #endif #ifndef SDSORT_GCODE #define SDSORT_GCODE false diff --git a/Marlin/src/lcd/e3v2/proui/dwin.cpp b/Marlin/src/lcd/e3v2/proui/dwin.cpp index 2c52b0cabc8c..824b730019b1 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/proui/dwin.cpp @@ -850,7 +850,7 @@ bool DWIN_lcd_sd_status = false; #if ENABLED(MEDIASORT_MENU_ITEM) void setMediaSort() { toggleCheckboxLine(hmiData.mediaSort); - card.setSortOn(hmiData.mediaSort); + card.setSortOn(hmiData.mediaSort ? TERN(SDSORT_REVERSE, AS_REV, AS_FWD) : AS_OFF); } #endif @@ -1754,7 +1754,7 @@ void dwinSetDataDefaults() { #endif #if ENABLED(MEDIASORT_MENU_ITEM) hmiData.mediaSort = true; - card.setSortOn(true); + card.setSortOn(TERN(SDSORT_REVERSE, AS_REV, AS_FWD)); #endif hmiData.mediaAutoMount = ENABLED(HAS_SD_EXTENDER); #if ALL(INDIVIDUAL_AXIS_HOMING_SUBMENU, MESH_BED_LEVELING) diff --git a/Marlin/src/sd/SdBaseFile.cpp b/Marlin/src/sd/SdBaseFile.cpp index 7180b675d7fc..94c1b02e0e58 100644 --- a/Marlin/src/sd/SdBaseFile.cpp +++ b/Marlin/src/sd/SdBaseFile.cpp @@ -1422,11 +1422,13 @@ int16_t SdBaseFile::read(void * const buf, uint16_t nbyte) { * * \param[out] dir The dir_t struct that will receive the data. * - * \return For success readDir() returns the number of bytes read. - * A value of zero will be returned if end of file is reached. - * If an error occurs, readDir() returns -1. Possible errors include - * readDir() called before a directory has been opened, this is not - * a directory file or an I/O error occurred. + * \return For success return a non-zero value (number of bytes read). + * A value of zero will be returned if end of dir is reached. + * If an error occurs, readDir() returns -1. Possible errors: + * - readDir() called on unopened dir + * - not a directory file + * - bad dir entry + * - I/O error */ int8_t SdBaseFile::readDir(dir_t * const dir, char * const longFilename) { int16_t n; @@ -1488,7 +1490,7 @@ int8_t SdBaseFile::readDir(dir_t * const dir, char * const longFilename) { longFilename[idx] = utf16_ch & 0xFF; longFilename[idx + 1] = (utf16_ch >> 8) & 0xFF; #else - // Replace all multibyte characters to '_' + // Replace multibyte character with '_' longFilename[n + i] = (utf16_ch > 0xFF) ? '_' : (utf16_ch & 0xFF); #endif } diff --git a/Marlin/src/sd/cardreader.cpp b/Marlin/src/sd/cardreader.cpp index e09bc5265a38..8ec33d1f72ef 100644 --- a/Marlin/src/sd/cardreader.cpp +++ b/Marlin/src/sd/cardreader.cpp @@ -91,8 +91,8 @@ int16_t CardReader::nrItems = -1; int16_t CardReader::sort_count; #if ENABLED(SDSORT_GCODE) - bool CardReader::sort_alpha; - int CardReader::sort_folders; + SortFlag CardReader::sort_alpha; + int8_t CardReader::sort_folders; //bool CardReader::sort_reverse; #endif @@ -160,8 +160,8 @@ CardReader::CardReader() { #if ENABLED(SDCARD_SORT_ALPHA) sort_count = 0; #if ENABLED(SDSORT_GCODE) - sort_alpha = true; - sort_folders = FOLDER_SORTING; + sort_alpha = TERN(SDSORT_REVERSE, AS_REV, AS_FWD); + sort_folders = SDSORT_FOLDERS; //sort_reverse = false; #endif #endif @@ -993,7 +993,7 @@ void CardReader::selectFileByIndex(const int16_t nr) { if (nr < sort_count) { strcpy(filename, sortshort[nr]); strcpy(longFilename, sortnames[nr]); - flag.filenameIsDir = IS_DIR(nr); + TERN_(HAS_FOLDER_SORTING, flag.filenameIsDir = IS_DIR(nr)); setBinFlag(strcmp_P(strrchr(filename, '.'), PSTR(".BIN")) == 0); return; } @@ -1011,7 +1011,7 @@ void CardReader::selectFileByName(const char * const match) { if (strcasecmp(match, sortshort[nr]) == 0) { strcpy(filename, sortshort[nr]); strcpy(longFilename, sortnames[nr]); - flag.filenameIsDir = IS_DIR(nr); + TERN_(HAS_FOLDER_SORTING, flag.filenameIsDir = IS_DIR(nr)); setBinFlag(strcmp_P(strrchr(filename, '.'), PSTR(".BIN")) == 0); return; } @@ -1163,7 +1163,7 @@ void CardReader::cdroot() { * Get the name of a file in the working directory by sort-index */ void CardReader::selectFileByIndexSorted(const int16_t nr) { - selectFileByIndex(TERN1(SDSORT_GCODE, sort_alpha) && (nr < sort_count) ? sort_order[nr] : nr); + selectFileByIndex(SortFlag(TERN1(SDSORT_GCODE, sort_alpha != AS_OFF)) && (nr < sort_count) ? sort_order[nr] : nr); } #if ENABLED(SDSORT_USES_RAM) @@ -1210,7 +1210,7 @@ void CardReader::cdroot() { int16_t fileCnt = get_num_items(); // Sorting may be turned off - if (TERN0(SDSORT_GCODE, !sort_alpha)) return; + if (TERN0(SDSORT_GCODE, sort_alpha == AS_OFF)) return; // If there are files, sort up to the limit if (fileCnt > 0) { @@ -1239,9 +1239,9 @@ void CardReader::cdroot() { // Folder sorting needs 1 bit per entry for flags. #if HAS_FOLDER_SORTING #if ENABLED(SDSORT_DYNAMIC_RAM) - isDir = new uint8_t[(fileCnt + 7) >> 3]; + isDir = new uint8_t[(fileCnt + 7) >> 3]; // Allocate space with 'new' #elif ENABLED(SDSORT_USES_STACK) - uint8_t isDir[(fileCnt + 7) >> 3]; + uint8_t isDir[(fileCnt + 7) >> 3]; // Use stack in this scope #endif #endif @@ -1291,18 +1291,18 @@ void CardReader::cdroot() { const int16_t o2 = sort_order[j + 1]; // Compare names from the array or just the two buffered names - #if ENABLED(SDSORT_USES_RAM) - #define _SORT_CMP_NODIR() (strcasecmp(sortnames[o1], sortnames[o2]) > 0) - #else - #define _SORT_CMP_NODIR() (strcasecmp(name1, name2) > 0) - #endif + auto _sort_cmp_file = [](char * const n1, char * const n2) -> bool { + const bool sort = strcasecmp(n1, n2) > 0; + return (TERN(SDSORT_GCODE, card.sort_alpha == AS_REV, ENABLED(SDSORT_REVERSE))) ? !sort : sort; + }; + #define _SORT_CMP_FILE() _sort_cmp_file(TERN(SDSORT_USES_RAM, sortnames[o1], name1), TERN(SDSORT_USES_RAM, sortnames[o2], name2)) #if HAS_FOLDER_SORTING #if ENABLED(SDSORT_USES_RAM) // Folder sorting needs an index and bit to test for folder-ness. - #define _SORT_CMP_DIR(fs) (IS_DIR(o1) == IS_DIR(o2) ? _SORT_CMP_NODIR() : IS_DIR(fs > 0 ? o1 : o2)) + #define _SORT_CMP_DIR(fs) (IS_DIR(o1) == IS_DIR(o2) ? _SORT_CMP_FILE() : IS_DIR(fs > 0 ? o1 : o2)) #else - #define _SORT_CMP_DIR(fs) ((dir1 == flag.filenameIsDir) ? _SORT_CMP_NODIR() : (fs > 0 ? dir1 : !dir1)) + #define _SORT_CMP_DIR(fs) ((dir1 == flag.filenameIsDir) ? _SORT_CMP_FILE() : (fs > 0 ? dir1 : !dir1)) #endif #endif @@ -1318,12 +1318,12 @@ void CardReader::cdroot() { if ( #if HAS_FOLDER_SORTING #if ENABLED(SDSORT_GCODE) - sort_folders ? _SORT_CMP_DIR(sort_folders) : _SORT_CMP_NODIR() + sort_folders ? _SORT_CMP_DIR(sort_folders) : _SORT_CMP_FILE() #else - _SORT_CMP_DIR(FOLDER_SORTING) + _SORT_CMP_DIR(SDSORT_FOLDERS) #endif #else - _SORT_CMP_NODIR() + _SORT_CMP_FILE() #endif ) { // Reorder the index, indicate that sorting happened @@ -1357,12 +1357,14 @@ void CardReader::cdroot() { #if ENABLED(SDSORT_DYNAMIC_RAM) sortnames = new char*[1]; sortshort = new char*[1]; - isDir = new uint8_t[1]; #endif selectFileByIndex(0); SET_SORTNAME(0); SET_SORTSHORT(0); - isDir[0] = flag.filenameIsDir; + #if ALL(HAS_FOLDER_SORTING, SDSORT_DYNAMIC_RAM) + isDir = new uint8_t[1]; + isDir[0] = flag.filenameIsDir; + #endif #endif } diff --git a/Marlin/src/sd/cardreader.h b/Marlin/src/sd/cardreader.h index 80e317ebcf10..7dc140b3170e 100644 --- a/Marlin/src/sd/cardreader.h +++ b/Marlin/src/sd/cardreader.h @@ -31,7 +31,10 @@ extern const char M23_STR[], M24_STR[]; #if ENABLED(SDSORT_DYNAMIC_RAM) #define SD_RESORT 1 #endif - #if FOLDER_SORTING || ENABLED(SDSORT_GCODE) + #ifndef SDSORT_FOLDERS + #define SDSORT_FOLDERS 0 + #endif + #if SDSORT_FOLDERS || ENABLED(SDSORT_GCODE) #define HAS_FOLDER_SORTING 1 #endif #endif @@ -84,6 +87,7 @@ typedef struct { } card_flags_t; enum ListingFlags : uint8_t { LS_LONG_FILENAME, LS_ONLY_BIN, LS_TIMESTAMP }; +enum SortFlag : int8_t { AS_REV = -1, AS_OFF, AS_FWD, AS_ALSO_REV }; #if ENABLED(AUTO_REPORT_SD_STATUS) #include "../libs/autoreport.h" @@ -199,8 +203,8 @@ class CardReader { static void presort(); static void selectFileByIndexSorted(const int16_t nr); #if ENABLED(SDSORT_GCODE) - FORCE_INLINE static void setSortOn(bool b) { sort_alpha = b; presort(); } - FORCE_INLINE static void setSortFolders(int i) { sort_folders = i; presort(); } + FORCE_INLINE static void setSortOn(const SortFlag f) { sort_alpha = (f == AS_ALSO_REV) ? AS_REV : f; presort(); } + FORCE_INLINE static void setSortFolders(const int8_t i) { sort_folders = i; presort(); } //FORCE_INLINE static void setSortReverse(bool b) { sort_reverse = b; } #endif #else @@ -272,12 +276,12 @@ class CardReader { #if ENABLED(SDCARD_SORT_ALPHA) static int16_t sort_count; // Count of sorted items in the current directory #if ENABLED(SDSORT_GCODE) - static bool sort_alpha; // Flag to enable / disable the feature - static int sort_folders; // Folder sorting before/none/after + static SortFlag sort_alpha; // Sorting: REV, OFF, FWD + static int8_t sort_folders; // Folder sorting before/none/after //static bool sort_reverse; // Flag to enable / disable reverse sorting #endif - // By default the sort index is static + // By default the sort index is statically allocated #if ENABLED(SDSORT_DYNAMIC_RAM) static uint8_t *sort_order; #else diff --git a/buildroot/tests/STM32F103VE_longer_maple b/buildroot/tests/STM32F103VE_longer_maple index 4570a3214d17..9f594be61ac0 100755 --- a/buildroot/tests/STM32F103VE_longer_maple +++ b/buildroot/tests/STM32F103VE_longer_maple @@ -8,16 +8,16 @@ set -e use_example_configs Alfawise/U20 opt_enable BAUD_RATE_GCODE -exec_test $1 $2 "maple CLASSIC_UI U20 config" "$3" +exec_test $1 $2 "Maple - Alfawise U20 - CLASSIC_UI" "$3" use_example_configs Alfawise/U20 opt_enable BAUD_RATE_GCODE TFT_COLOR_UI opt_disable TFT_CLASSIC_UI CUSTOM_STATUS_SCREEN_IMAGE -exec_test $1 $2 "maple COLOR_UI U20 config" "$3" +exec_test $1 $2 "Maple - Alfawise U20 - COLOR_UI" "$3" use_example_configs Alfawise/U20-bltouch opt_enable BAUD_RATE_GCODE -exec_test $1 $2 "maple BLTouch U20 config" +exec_test $1 $2 "Maple - Alfawise U20 - BLTouch" # cleanup restore_configs From 1d17c34e123f74d820f42fcd179104c884719007 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Fri, 18 Aug 2023 00:18:38 +0000 Subject: [PATCH 04/25] [cron] Bump distribution date (2023-08-18) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 0db93b776dcd..9a8c7e9d4849 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2023-08-16" +//#define STRING_DISTRIBUTION_DATE "2023-08-18" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index f9fb01a64b0c..979359dc5484 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2023-08-16" + #define STRING_DISTRIBUTION_DATE "2023-08-18" #endif /** From f7d5188b2f0a59b752fbabf6b96ff1ed4aed8112 Mon Sep 17 00:00:00 2001 From: GHGiampy <83699429+GHGiampy@users.noreply.github.com> Date: Sat, 19 Aug 2023 22:53:45 +0200 Subject: [PATCH 05/25] =?UTF-8?q?=F0=9F=90=9B=20Fixes=20for=20ProUI,=20bui?= =?UTF-8?q?ld=20rename=20(#26177)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- Marlin/src/feature/caselight.h | 2 +- Marlin/src/lcd/e3v2/proui/dwin.cpp | 65 ++++++++++++------- Marlin/src/lcd/e3v2/proui/dwin.h | 3 + Marlin/src/lcd/e3v2/proui/dwin_defines.h | 2 +- Marlin/src/lcd/e3v2/proui/menus.cpp | 12 ++-- Marlin/src/lcd/e3v2/proui/menus.h | 6 +- Marlin/src/module/motion.h | 2 +- .../PlatformIO/scripts/offset_and_rename.py | 5 +- buildroot/share/scripts/upload.py | 3 +- 9 files changed, 61 insertions(+), 39 deletions(-) diff --git a/Marlin/src/feature/caselight.h b/Marlin/src/feature/caselight.h index 17e1222acbfa..d88b3d67bf83 100644 --- a/Marlin/src/feature/caselight.h +++ b/Marlin/src/feature/caselight.h @@ -30,7 +30,7 @@ class CaseLight { public: static bool on; - #if ENABLED(CASELIGHT_USES_BRIGHTNESS) + #if CASELIGHT_USES_BRIGHTNESS static uint8_t brightness; #endif diff --git a/Marlin/src/lcd/e3v2/proui/dwin.cpp b/Marlin/src/lcd/e3v2/proui/dwin.cpp index 824b730019b1..7c69d0f900d8 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/proui/dwin.cpp @@ -214,13 +214,13 @@ Menu *prepareMenu = nullptr; Menu *trammingMenu = nullptr; #endif Menu *moveMenu = nullptr; -Menu *ControlMenu = nullptr; -Menu *AdvancedSettings = nullptr; +Menu *controlMenu = nullptr; +Menu *advancedSettingsMenu = nullptr; #if HAS_HOME_OFFSET Menu *homeOffsetMenu = nullptr; #endif #if HAS_BED_PROBE - Menu *ProbeSetMenu = nullptr; + Menu *probeSettingsMenu = nullptr; #endif Menu *filSetMenu = nullptr; Menu *selectColorMenu = nullptr; @@ -229,7 +229,7 @@ Menu *tuneMenu = nullptr; Menu *motionMenu = nullptr; Menu *filamentMenu = nullptr; #if ENABLED(MESH_BED_LEVELING) - Menu *manualMesh = nullptr; + Menu *manualMeshMenu = nullptr; #endif #if HAS_PREHEAT Menu *preheatMenu = nullptr; @@ -251,7 +251,7 @@ Menu *stepsMenu = nullptr; #if ENABLED(PIDTEMPBED) && ANY(PID_EDIT_MENU, PID_AUTOTUNE_MENU) Menu *bedPIDMenu = nullptr; #endif -#if ENABLED(CASELIGHT_USES_BRIGHTNESS) +#if CASELIGHT_USES_BRIGHTNESS Menu *caseLightMenu = nullptr; #endif #if ENABLED(LED_CONTROL_MENU) @@ -2152,9 +2152,10 @@ void setMoveZ() { hmiValue.axis = Z_AXIS; setPFloatOnClick(Z_MIN_POS, Z_MAX_POS, toggleCheckboxLine(caselight.on); caselight.update_enabled(); } - #if ENABLED(CASELIGHT_USES_BRIGHTNESS) + #if CASELIGHT_USES_BRIGHTNESS + bool enableLiveCaseLightBrightness = true; void liveCaseLightBrightness() { caselight.brightness = menuData.value; caselight.update_brightness(); } - void setCaseLightBrightness() { setIntOnClick(0, 255, caselight.brightness, nullptr, liveCaseLightBrightness); } + void setCaseLightBrightness() { setIntOnClick(0, 255, caselight.brightness, liveCaseLightBrightness, enableLiveCaseLightBrightness ? liveCaseLightBrightness : nullptr); } #endif #endif @@ -2166,10 +2167,12 @@ void setMoveZ() { hmiValue.axis = Z_AXIS; setPFloatOnClick(Z_MIN_POS, Z_MAX_POS, } #endif #if HAS_COLOR_LEDS + bool enableLiveLedColor = true; void applyLEDColor() { hmiData.ledColor = LEDColor( {leds.color.r, leds.color.g, leds.color.b OPTARG(HAS_WHITE_LED, hmiData.ledColor.w) } ); + if (!enableLiveLedColor) leds.update(); } - void liveLEDColor(uint8_t *color) { *color = menuData.value; leds.update(); } + void liveLEDColor(uint8_t *color) { *color = menuData.value; if (enableLiveLedColor) leds.update(); } void liveLEDColorR() { liveLEDColor(&leds.color.r); } void liveLEDColorG() { liveLEDColor(&leds.color.g); } void liveLEDColorB() { liveLEDColor(&leds.color.b); } @@ -3039,35 +3042,37 @@ void drawPrepareMenu() { void drawControlMenu() { checkkey = ID_Menu; - if (SET_MENU_R(ControlMenu, selrect({103, 1, 28, 14}), MSG_CONTROL, 11)) { + if (SET_MENU_R(controlMenu, selrect({103, 1, 28, 14}), MSG_CONTROL, 11)) { BACK_ITEM(gotoMainMenu); MENU_ITEM(ICON_Temperature, MSG_TEMPERATURE, onDrawTempSubMenu, drawTemperatureMenu); MENU_ITEM(ICON_Motion, MSG_MOTION, onDrawMotionSubMenu, drawMotionMenu); - #if ENABLED(EEPROM_SETTINGS) - MENU_ITEM(ICON_WriteEEPROM, MSG_STORE_EEPROM, onDrawWriteEeprom, writeEEPROM); - MENU_ITEM(ICON_ReadEEPROM, MSG_LOAD_EEPROM, onDrawReadEeprom, readEEPROM); - MENU_ITEM(ICON_ResumeEEPROM, MSG_RESTORE_DEFAULTS, onDrawResetEeprom, resetEEPROM); - #endif - MENU_ITEM(ICON_Reboot, MSG_RESET_PRINTER, onDrawMenuItem, rebootPrinter); #if ENABLED(CASE_LIGHT_MENU) - #if ENABLED(CASELIGHT_USES_BRIGHTNESS) + #if CASELIGHT_USES_BRIGHTNESS + enableLiveCaseLightBrightness = true; // Allow live update of brightness in control menu MENU_ITEM(ICON_CaseLight, MSG_CASE_LIGHT, onDrawSubMenu, drawCaseLightMenu); #else MENU_ITEM(ICON_CaseLight, MSG_CASE_LIGHT, onDrawChkbMenu, setCaseLight, &caselight.on); #endif #endif #if ENABLED(LED_CONTROL_MENU) + enableLiveLedColor = true; // Allow live update of color in control menu MENU_ITEM(ICON_LedControl, MSG_LED_CONTROL, onDrawSubMenu, drawLedControlMenu); #endif + #if ENABLED(EEPROM_SETTINGS) + MENU_ITEM(ICON_WriteEEPROM, MSG_STORE_EEPROM, onDrawWriteEeprom, writeEEPROM); + MENU_ITEM(ICON_ReadEEPROM, MSG_LOAD_EEPROM, onDrawReadEeprom, readEEPROM); + MENU_ITEM(ICON_ResumeEEPROM, MSG_RESTORE_DEFAULTS, onDrawResetEeprom, resetEEPROM); + #endif + MENU_ITEM(ICON_Reboot, MSG_RESET_PRINTER, onDrawMenuItem, rebootPrinter); MENU_ITEM(ICON_Info, MSG_INFO_SCREEN, onDrawInfoSubMenu, gotoInfoMenu); } ui.reset_status(true); - updateMenu(ControlMenu); + updateMenu(controlMenu); } void drawAdvancedSettingsMenu() { checkkey = ID_Menu; - if (SET_MENU(AdvancedSettings, MSG_ADVANCED_SETTINGS, 23)) { + if (SET_MENU(advancedSettingsMenu, MSG_ADVANCED_SETTINGS, 23)) { BACK_ITEM(gotoMainMenu); #if ENABLED(EEPROM_SETTINGS) MENU_ITEM(ICON_WriteEEPROM, MSG_STORE_EEPROM, onDrawMenuItem, writeEEPROM); @@ -3129,7 +3134,7 @@ void drawAdvancedSettingsMenu() { #endif } ui.reset_status(true); - updateMenu(AdvancedSettings); + updateMenu(advancedSettingsMenu); } void drawMoveMenu() { @@ -3180,7 +3185,7 @@ void drawMoveMenu() { void drawProbeSetMenu() { checkkey = ID_Menu; - if (SET_MENU(ProbeSetMenu, MSG_ZPROBE_SETTINGS, 9)) { + if (SET_MENU(probeSettingsMenu, MSG_ZPROBE_SETTINGS, 9)) { BACK_ITEM(drawAdvancedSettingsMenu); #if HAS_X_AXIS EDIT_ITEM(ICON_ProbeOffsetX, MSG_ZPROBE_XOFFSET, onDrawPFloatMenu, setProbeOffsetX, &probe.offset.x); @@ -3203,7 +3208,7 @@ void drawMoveMenu() { MENU_ITEM(ICON_ProbeTest, MSG_M48_TEST, onDrawMenuItem, probeTest); #endif } - updateMenu(ProbeSetMenu); + updateMenu(probeSettingsMenu); } #endif // HAS_BED_PROBE @@ -3251,7 +3256,7 @@ void drawFilSetMenu() { void drawLedControlMenu() { checkkey = ID_Menu; if (SET_MENU(ledControlMenu, MSG_LED_CONTROL, 10)) { - BACK_ITEM(drawControlMenu); + BACK_ITEM((currentMenu == tuneMenu) ? drawTuneMenu : drawControlMenu); #if !ALL(CASE_LIGHT_MENU, CASE_LIGHT_USE_NEOPIXEL) EDIT_ITEM(ICON_LedControl, MSG_LEDS, onDrawChkbMenu, setLedStatus, &leds.lights_on); #endif @@ -3282,7 +3287,7 @@ void drawFilSetMenu() { void drawTuneMenu() { checkkey = ID_Menu; - if (SET_MENU_R(tuneMenu, selrect({73, 2, 28, 12}), MSG_TUNE, 17)) { + if (SET_MENU_R(tuneMenu, selrect({73, 2, 28, 12}), MSG_TUNE, 18)) { BACK_ITEM(gotoPrintProcess); EDIT_ITEM(ICON_Speed, MSG_SPEED, onDrawSpeedItem, setSpeed, &feedrate_percentage); #if HAS_HOTEND @@ -3327,6 +3332,16 @@ void drawTuneMenu() { #endif #if ENABLED(CASE_LIGHT_MENU) EDIT_ITEM(ICON_CaseLight, MSG_CASE_LIGHT, onDrawChkbMenu, setCaseLight, &caselight.on); + #if CASELIGHT_USES_BRIGHTNESS + // Avoid heavy interference with print job disabling live update of brightness in tune menu + enableLiveCaseLightBrightness = false; + EDIT_ITEM(ICON_Brightness, MSG_CASE_LIGHT_BRIGHTNESS, onDrawPInt8Menu, setCaseLightBrightness, &caselight.brightness); + #endif + #if ENABLED(LED_CONTROL_MENU) + // Avoid heavy interference with print job disabling live update of color in tune menu + enableLiveLedColor = false; + MENU_ITEM(ICON_LedControl, MSG_LED_CONTROL, onDrawSubMenu, drawLedControlMenu); + #endif #elif ENABLED(LED_CONTROL_MENU) && DISABLED(CASE_LIGHT_USE_NEOPIXEL) EDIT_ITEM(ICON_LedControl, MSG_LEDS, onDrawChkbMenu, setLedStatus, &leds.lights_on); #endif @@ -3478,7 +3493,7 @@ void drawMotionMenu() { void drawManualMeshMenu() { checkkey = ID_Menu; - if (SET_MENU(manualMesh, MSG_UBL_MANUAL_MESH, 6)) { + if (SET_MENU(manualMeshMenu, MSG_UBL_MANUAL_MESH, 6)) { BACK_ITEM(drawPrepareMenu); MENU_ITEM(ICON_ManualMesh, MSG_LEVEL_BED, onDrawMenuItem, manualMeshStart); mMeshMoveZItem = EDIT_ITEM(ICON_Zoffset, MSG_MOVE_Z, onDrawMMeshMoveZ, setMMeshMoveZ, ¤t_position.z); @@ -3486,7 +3501,7 @@ void drawMotionMenu() { MENU_ITEM(ICON_MeshViewer, MSG_MESH_VIEW, onDrawSubMenu, dwinMeshViewer); MENU_ITEM(ICON_MeshSave, MSG_UBL_SAVE_MESH, onDrawMenuItem, manualMeshSave); } - updateMenu(manualMesh); + updateMenu(manualMeshMenu); } #endif // MESH_BED_LEVELING diff --git a/Marlin/src/lcd/e3v2/proui/dwin.h b/Marlin/src/lcd/e3v2/proui/dwin.h index ccc90b3de608..21b72d321a60 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.h +++ b/Marlin/src/lcd/e3v2/proui/dwin.h @@ -35,6 +35,9 @@ #include "../common/encoder.h" #include "../common/limits.h" #include "../../../libs/BL24CXX.h" +#if ENABLED(LED_CONTROL_MENU) + #include "../../../feature/leds/leds.h" +#endif #if ANY(BABYSTEPPING, HAS_BED_PROBE) #define HAS_ZOFFSET_ITEM 1 diff --git a/Marlin/src/lcd/e3v2/proui/dwin_defines.h b/Marlin/src/lcd/e3v2/proui/dwin_defines.h index 8ac7c5eb6231..e3526849a808 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin_defines.h +++ b/Marlin/src/lcd/e3v2/proui/dwin_defines.h @@ -66,7 +66,7 @@ #if ALL(LED_CONTROL_MENU, HAS_COLOR_LEDS) #define defColorLeds LEDColorWhite() #endif -#if ENABLED(CASELIGHT_USES_BRIGHTNESS) +#if CASELIGHT_USES_BRIGHTNESS #define defCaseLightBrightness 255 #endif #ifdef Z_AFTER_HOMING diff --git a/Marlin/src/lcd/e3v2/proui/menus.cpp b/Marlin/src/lcd/e3v2/proui/menus.cpp index 347130743c63..d537bc5ae663 100644 --- a/Marlin/src/lcd/e3v2/proui/menus.cpp +++ b/Marlin/src/lcd/e3v2/proui/menus.cpp @@ -507,25 +507,25 @@ void initMenu() { bool setMenu(Menu* &menu, FSTR_P fTitle, int8_t totalitems) { if (!menu) menu = new Menu(); - const bool NotCurrent = (currentMenu != menu); - if (NotCurrent) { + const bool notCurrent = (currentMenu != menu); + if (notCurrent) { menu->menuTitle.setCaption(fTitle); menuItemsPrepare(totalitems); } - return NotCurrent; + return notCurrent; } bool setMenu(Menu* &menu, frame_rect_t cn, FSTR_P fTitle, int8_t totalitems) { if (!menu) menu = new Menu(); - const bool NotCurrent = (currentMenu != menu); - if (NotCurrent) { + const bool notCurrent = (currentMenu != menu); + if (notCurrent) { if (cn.w != 0) menu->menuTitle.setFrame(cn.x, cn.y, cn.w, cn.h); else menu->menuTitle.setCaption(fTitle); menuItemsPrepare(totalitems); } - return NotCurrent; + return notCurrent; } void resetMenu(Menu* &menu) { diff --git a/Marlin/src/lcd/e3v2/proui/menus.h b/Marlin/src/lcd/e3v2/proui/menus.h index 58dd92f0f6ac..be0c88176006 100644 --- a/Marlin/src/lcd/e3v2/proui/menus.h +++ b/Marlin/src/lcd/e3v2/proui/menus.h @@ -183,13 +183,13 @@ void resetMenu(Menu* &menu); // Invalidate currentMenu to prepare for full menu drawing void invalidateMenu(); -//Update the Menu and Draw if it is valid +// Update the Menu and Draw if it is valid void updateMenu(Menu* &menu); -//Redraw the current Menu if it is valid +// Redraw the current Menu if it is valid void ReDrawMenu(bool force=false); -//Redraw selected menu item +// Redraw selected menu item void ReDrawItem(); // Clear menuItems array and free menuItems elements diff --git a/Marlin/src/module/motion.h b/Marlin/src/module/motion.h index fceeffa70748..7d5d657ac735 100644 --- a/Marlin/src/module/motion.h +++ b/Marlin/src/module/motion.h @@ -407,7 +407,7 @@ void restore_feedrate_and_scaling(); #if HAS_Z_AXIS #if ALL(DWIN_LCD_PROUI, INDIVIDUAL_AXIS_HOMING_SUBMENU, MESH_BED_LEVELING) - #define Z_POST_CLEARANCE hmiData.z_after_homing + #define Z_POST_CLEARANCE hmiData.zAfterHoming #elif defined(Z_AFTER_HOMING) #define Z_POST_CLEARANCE Z_AFTER_HOMING #else diff --git a/buildroot/share/PlatformIO/scripts/offset_and_rename.py b/buildroot/share/PlatformIO/scripts/offset_and_rename.py index e9940a50d014..20f2b78024b8 100644 --- a/buildroot/share/PlatformIO/scripts/offset_and_rename.py +++ b/buildroot/share/PlatformIO/scripts/offset_and_rename.py @@ -61,6 +61,9 @@ def encrypt(source, target, env): def rename_target(source, target, env): from pathlib import Path from datetime import datetime - Path(target[0].path).replace(Path(target[0].dir.path, datetime.now().strftime(new_name.replace('{date}', '%Y%m%d').replace('{time}', '%H%M%S')))) + from os import path + _newpath = Path(target[0].dir.path, datetime.now().strftime(new_name.replace('{date}', '%Y%m%d').replace('{time}', '%H%M%S'))) + Path(target[0].path).replace(_newpath) + env['PROGNAME'] = path.splitext(_newpath)[0] marlin.add_post_action(rename_target) diff --git a/buildroot/share/scripts/upload.py b/buildroot/share/scripts/upload.py index c97605e3f4b7..ee48af6fc6de 100644 --- a/buildroot/share/scripts/upload.py +++ b/buildroot/share/scripts/upload.py @@ -157,7 +157,8 @@ def _RollbackUpload(FirmwareFile): marlin_string_config_h_author = _GetMarlinEnv(MarlinEnv, 'STRING_CONFIG_H_AUTHOR') # Get firmware upload params - upload_firmware_source_name = str(source[0]) # Source firmware filename + upload_firmware_source_name = env['PROGNAME'] + '.bin' if env['PROGNAME'] else str(source[0]) + # Source firmware filename upload_speed = env['UPLOAD_SPEED'] if 'UPLOAD_SPEED' in env else 115200 # baud rate of serial connection upload_port = _GetUploadPort(env) # Serial port to use From db5ead4230eda3e05d8beb919c8e7d5bdef960a9 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Sun, 20 Aug 2023 00:19:51 +0000 Subject: [PATCH 06/25] [cron] Bump distribution date (2023-08-20) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 9a8c7e9d4849..ff9fa03df1b3 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2023-08-18" +//#define STRING_DISTRIBUTION_DATE "2023-08-20" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 979359dc5484..e87f39d62e56 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2023-08-18" + #define STRING_DISTRIBUTION_DATE "2023-08-20" #endif /** From f2665e597f944d7a054a72302349a6edf9c4c082 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 25 Jul 2023 18:36:50 -0500 Subject: [PATCH 07/25] =?UTF-8?q?=F0=9F=8E=A8=20FTDI=20cleanup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/lcd/extui/ftdi_eve_touch_ui/generic/leveling_menu.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/leveling_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/leveling_menu.cpp index 47540b0f5519..ee9eecf742fd 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/leveling_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/leveling_menu.cpp @@ -81,7 +81,7 @@ void LevelingMenu::onRedraw(draw_mode_t what) { .text(BLTOUCH_TITLE_POS, GET_TEXT_F(MSG_BLTOUCH)) #endif .font(font_medium).colors(normal_btn) - .enabled(ANY(Z_STEPPER_AUTO_ALIGN,MECHANICAL_GANTRY_CALIBRATION)) + .enabled(ANY(Z_STEPPER_AUTO_ALIGN, MECHANICAL_GANTRY_CALIBRATION)) .tag(2).button(LEVEL_AXIS_POS, GET_TEXT_F(MSG_LEVEL_X_AXIS)) .enabled(ENABLED(HAS_BED_PROBE)) .tag(3).button(PROBE_BED_POS, GET_TEXT_F(MSG_PROBE_BED)) @@ -103,7 +103,7 @@ void LevelingMenu::onRedraw(draw_mode_t what) { bool LevelingMenu::onTouchEnd(uint8_t tag) { switch (tag) { case 1: GOTO_PREVIOUS(); break; - #if ANY(Z_STEPPER_AUTO_ALIGN,MECHANICAL_GANTRY_CALIBRATION) + #if ANY(Z_STEPPER_AUTO_ALIGN, MECHANICAL_GANTRY_CALIBRATION) case 2: SpinnerDialogBox::enqueueAndWait(F("G34")); break; #endif #if HAS_BED_PROBE From d1803ec04434a9b5a9e18c12cc392cee15d8f5c6 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Mon, 21 Aug 2023 00:19:10 +0000 Subject: [PATCH 08/25] [cron] Bump distribution date (2023-08-21) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index ff9fa03df1b3..7cb7ff8cb95d 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2023-08-20" +//#define STRING_DISTRIBUTION_DATE "2023-08-21" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index e87f39d62e56..955231be95ce 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2023-08-20" + #define STRING_DISTRIBUTION_DATE "2023-08-21" #endif /** From d69ce775032bc254bf3da67088ebdfcaad0612b5 Mon Sep 17 00:00:00 2001 From: Yuri D'Elia Date: Mon, 21 Aug 2023 21:39:49 +0200 Subject: [PATCH 09/25] =?UTF-8?q?=F0=9F=90=9B=20Fixes=20for=20G2/G3=20arcs?= =?UTF-8?q?=20(#26170)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/gcode/motion/G2_G3.cpp | 130 +++++++++++++++--------------- 1 file changed, 64 insertions(+), 66 deletions(-) diff --git a/Marlin/src/gcode/motion/G2_G3.cpp b/Marlin/src/gcode/motion/G2_G3.cpp index b3a281bcc805..c87d64d19b26 100644 --- a/Marlin/src/gcode/motion/G2_G3.cpp +++ b/Marlin/src/gcode/motion/G2_G3.cpp @@ -82,14 +82,17 @@ void plan_arc( rt_X = cart[axis_p] - center_P, rt_Y = cart[axis_q] - center_Q; - ARC_LIJKUVW_CODE( - const float start_L = current_position[axis_l], - const float start_I = current_position.i, - const float start_J = current_position.j, - const float start_K = current_position.k, - const float start_U = current_position.u, - const float start_V = current_position.v, - const float start_W = current_position.w + // Starting position of the move for all non-arc axes + // i.e., only one of X, Y, or Z, plus the rest. + ARC_LIJKUVWE_CODE( + float start_L = current_position[axis_l], + float start_I = current_position.i, + float start_J = current_position.j, + float start_K = current_position.k, + float start_U = current_position.u, + float start_V = current_position.v, + float start_W = current_position.w, + float start_E = current_position.e ); // Angle of rotation between position and target from the circle center. @@ -125,6 +128,7 @@ void plan_arc( min_segments = CEIL((MIN_CIRCLE_SEGMENTS) * portion_of_circle); // Minimum segments for the arc } + // Total travel on all the non-arc axes ARC_LIJKUVWE_CODE( float travel_L = cart[axis_l] - start_L, float travel_I = cart.i - start_I, @@ -133,7 +137,7 @@ void plan_arc( float travel_U = cart.u - start_U, float travel_V = cart.v - start_V, float travel_W = cart.w - start_W, - float travel_E = cart.e - current_position.e + float travel_E = cart.e - start_E ); // If "P" specified circles, call plan_arc recursively then continue with the rest of the arc @@ -166,15 +170,29 @@ void plan_arc( ); plan_arc(temp_position, offset, clockwise, 0); // Plan a single whole circle } + + // Get starting coordinates for the remainder from the current position + ARC_LIJKUVWE_CODE( + start_L = current_position[axis_l], + start_I = current_position.i, + start_J = current_position.j, + start_K = current_position.k, + start_U = current_position.u, + start_V = current_position.v, + start_W = current_position.w, + start_E = current_position.e + ); + + // Update travel distance for the remainder ARC_LIJKUVWE_CODE( - travel_L = cart[axis_l] - current_position[axis_l], // Linear X, Y, or Z - travel_I = cart.i - current_position.i, // The rest are also non-arc - travel_J = cart.j - current_position.j, - travel_K = cart.k - current_position.k, - travel_U = cart.u - current_position.u, - travel_V = cart.v - current_position.v, - travel_W = cart.w - current_position.w, - travel_E = cart.e - current_position.e + travel_L = cart[axis_l] - start_L, // Linear X, Y, or Z + travel_I = cart.i - start_I, // The rest are also non-arc + travel_J = cart.j - start_J, + travel_K = cart.k - start_K, + travel_U = cart.u - start_U, + travel_V = cart.v - start_V, + travel_W = cart.w - start_W, + travel_E = cart.e - start_E ); } @@ -256,7 +274,7 @@ void plan_arc( xyze_pos_t raw; - // do not calculate rotation parameters for trivial single-segment arcs + // Don't calculate rotation parameters for trivial single-segment arcs if (segments > 1) { // Vector rotation matrix values const float theta_per_segment = angular_travel / segments, @@ -264,30 +282,27 @@ void plan_arc( sin_T = theta_per_segment - sq_theta_per_segment * theta_per_segment / 6, cos_T = 1 - 0.5f * sq_theta_per_segment; // Small angle approximation - #if DISABLED(AUTO_BED_LEVELING_UBL) - ARC_LIJKUVW_CODE( - const float per_segment_L = travel_L / segments, - const float per_segment_I = travel_I / segments, - const float per_segment_J = travel_J / segments, - const float per_segment_K = travel_K / segments, - const float per_segment_U = travel_U / segments, - const float per_segment_V = travel_V / segments, - const float per_segment_W = travel_W / segments - ); - #endif - - CODE_ITEM_E(const float extruder_per_segment = travel_E / segments); + ARC_LIJKUVWE_CODE( + const float per_segment_L = travel_L / segments, + const float per_segment_I = travel_I / segments, + const float per_segment_J = travel_J / segments, + const float per_segment_K = travel_K / segments, + const float per_segment_U = travel_U / segments, + const float per_segment_V = travel_V / segments, + const float per_segment_W = travel_W / segments, + const float per_segment_E = travel_E / segments + ); // Initialize all linear axes and E ARC_LIJKUVWE_CODE( - raw[axis_l] = current_position[axis_l], - raw.i = current_position.i, - raw.j = current_position.j, - raw.k = current_position.k, - raw.u = current_position.u, - raw.v = current_position.v, - raw.w = current_position.w, - raw.e = current_position.e + raw[axis_l] = start_L, + raw.i = start_I, + raw.j = start_J, + raw.k = start_K, + raw.u = start_U, + raw.v = start_V, + raw.w = start_W, + raw.e = start_E ); millis_t next_idle_ms = millis() + 200UL; @@ -305,7 +320,6 @@ void plan_arc( const float limiting_accel = _MIN(planner.settings.max_acceleration_mm_per_s2[axis_p], planner.settings.max_acceleration_mm_per_s2[axis_q]), limiting_speed = _MIN(planner.settings.max_feedrate_mm_s[axis_p], planner.settings.max_feedrate_mm_s[axis_q]), limiting_speed_sqr = _MIN(sq(limiting_speed), limiting_accel * radius, sq(scaled_fr_mm_s)); - float arc_mm_remaining = flat_mm; for (uint16_t i = 1; i < segments; i++) { // Iterate (segments-1) times @@ -343,16 +357,14 @@ void plan_arc( raw[axis_p] = center_P + rvec.a; raw[axis_q] = center_Q + rvec.b; ARC_LIJKUVWE_CODE( - #if ENABLED(AUTO_BED_LEVELING_UBL) - raw[axis_l] = start_L, - raw.i = start_I, raw.j = start_J, raw.k = start_K, - raw.u = start_U, raw.v = start_V, raw.w = start_V - #else - raw[axis_l] += per_segment_L, - raw.i += per_segment_I, raw.j += per_segment_J, raw.k += per_segment_K, - raw.u += per_segment_U, raw.v += per_segment_V, raw.w += per_segment_W - #endif - , raw.e += extruder_per_segment + raw[axis_l] = start_L + per_segment_L * i, + raw.i = start_I + per_segment_I * i, + raw.j = start_J + per_segment_J * i, + raw.k = start_K + per_segment_K * i, + raw.u = start_U + per_segment_U * i, + raw.v = start_V + per_segment_V * i, + raw.w = start_W + per_segment_W * i, + raw.e = start_E + per_segment_E * i ); apply_motion_limits(raw); @@ -362,7 +374,7 @@ void plan_arc( #endif // calculate safe speed for stopping by the end of the arc - arc_mm_remaining -= segment_mm; + const float arc_mm_remaining = flat_mm - segment_mm * i; hints.safe_exit_speed_sqr = _MIN(limiting_speed_sqr, 2 * limiting_accel * arc_mm_remaining); if (!planner.buffer_line(raw, scaled_fr_mm_s, active_extruder, hints)) @@ -374,13 +386,6 @@ void plan_arc( // Ensure last segment arrives at target location. raw = cart; - #if ENABLED(AUTO_BED_LEVELING_UBL) - ARC_LIJKUVW_CODE( - raw[axis_l] = start_L, - raw.i = start_I, raw.j = start_J, raw.k = start_K, - raw.u = start_U, raw.v = start_V, raw.w = start_W - ); - #endif apply_motion_limits(raw); @@ -392,14 +397,7 @@ void plan_arc( hints.safe_exit_speed_sqr = 0.0f; planner.buffer_line(raw, scaled_fr_mm_s, active_extruder, hints); - #if ENABLED(AUTO_BED_LEVELING_UBL) - ARC_LIJKUVW_CODE( - raw[axis_l] = start_L, - raw.i = start_I, raw.j = start_J, raw.k = start_K, - raw.u = start_U, raw.v = start_V, raw.w = start_W - ); - #endif - current_position = raw; + current_position = cart; } // plan_arc From b02ea02dbb89892916045079423ca91532adc61c Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 21 Aug 2023 16:52:26 -0500 Subject: [PATCH 10/25] =?UTF-8?q?=E2=9C=85=20Fix=20unused=20test?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buildroot/tests/STM32F103RE | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/buildroot/tests/STM32F103RE b/buildroot/tests/STM32F103RE index 641f1fa56c80..111eb266441a 100755 --- a/buildroot/tests/STM32F103RE +++ b/buildroot/tests/STM32F103RE @@ -11,12 +11,12 @@ set -e # restore_configs opt_set MOTHERBOARD BOARD_STM32F103RE SERIAL_PORT -1 EXTRUDERS 2 \ - NOZZLE_CLEAN_START_POINT "{ { 10, 10, 3 }, { 10, 10, 3 } }" \ - NOZZLE_CLEAN_END_POINT "{ { 10, 20, 3 }, { 10, 20, 3 } }" -opt_enable EEPROM_SETTINGS EEPROM_CHITCHAT REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT \ + NOZZLE_CLEAN_START_POINT "{ { 10, 10, 3 } }" \ + NOZZLE_CLEAN_END_POINT "{ { 10, 20, 3 } }" +opt_enable EEPROM_SETTINGS EEPROM_CHITCHAT SDSUPPORT \ PAREN_COMMENTS GCODE_MOTION_MODES SINGLENOZZLE TOOLCHANGE_FILAMENT_SWAP TOOLCHANGE_PARK \ BAUD_RATE_GCODE GCODE_MACROS NOZZLE_PARK_FEATURE NOZZLE_CLEAN_FEATURE -exec_test $1 $2 "STM32F1R EEPROM_SETTINGS EEPROM_CHITCHAT REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT PAREN_COMMENTS GCODE_MOTION_MODES" "$3" +exec_test $1 $2 "STM32F1R EEPROM_SETTINGS EEPROM_CHITCHAT SDSUPPORT PAREN_COMMENTS GCODE_MOTION_MODES" "$3" # cleanup restore_configs From b5a08c251853e0b7122bc33d1c6fcd3de967e478 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Tue, 22 Aug 2023 00:18:52 +0000 Subject: [PATCH 11/25] [cron] Bump distribution date (2023-08-22) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 7cb7ff8cb95d..bd9b9ea7e577 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2023-08-21" +//#define STRING_DISTRIBUTION_DATE "2023-08-22" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 955231be95ce..6d1966575e9f 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2023-08-21" + #define STRING_DISTRIBUTION_DATE "2023-08-22" #endif /** From be91eaed2c707924cbaa8a4d79a0495b43495870 Mon Sep 17 00:00:00 2001 From: narno2202 <130909513+narno2202@users.noreply.github.com> Date: Wed, 23 Aug 2023 00:13:53 +0200 Subject: [PATCH 12/25] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20FT=20Motion=20menu?= =?UTF-8?q?=20Back=20item=20(#26175)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/menu/menu_motion.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/lcd/menu/menu_motion.cpp b/Marlin/src/lcd/menu/menu_motion.cpp index ae6e87af6585..dcabb7861e51 100644 --- a/Marlin/src/lcd/menu/menu_motion.cpp +++ b/Marlin/src/lcd/menu/menu_motion.cpp @@ -396,7 +396,7 @@ void menu_move() { #endif START_MENU(); - BACK_ITEM(MSG_ADVANCED_SETTINGS); + BACK_ITEM(MSG_MOTION); SUBMENU(MSG_FTM_MODE, menu_ftm_mode); MENU_ITEM_ADDON_START_RJ(5); lcd_put_u8str(ftmode); MENU_ITEM_ADDON_END(); From 88cdf487b433bf2187f2dad31587882ebf02cc59 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 22 Aug 2023 17:36:53 -0500 Subject: [PATCH 13/25] =?UTF-8?q?=F0=9F=9A=B8=20Avoid=20LCD=20messages=20s?= =?UTF-8?q?tarting=20with=20"Error:"=20(#26164)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/core/language.h | 4 +- Marlin/src/lcd/e3v2/proui/dwin.cpp | 2 +- .../src/lcd/extui/anycubic_vyper/dgus_tft.cpp | 10 ++-- Marlin/src/lcd/language/language_an.h | 10 ++-- Marlin/src/lcd/language/language_ca.h | 4 +- Marlin/src/lcd/language/language_cz.h | 6 +-- Marlin/src/lcd/language/language_da.h | 4 +- Marlin/src/lcd/language/language_de.h | 11 ++--- Marlin/src/lcd/language/language_el.h | 6 +-- Marlin/src/lcd/language/language_el_gr.h | 4 +- Marlin/src/lcd/language/language_en.h | 17 +++---- Marlin/src/lcd/language/language_es.h | 10 ++-- Marlin/src/lcd/language/language_eu.h | 4 +- Marlin/src/lcd/language/language_fr.h | 4 +- Marlin/src/lcd/language/language_fr_na.h | 4 +- Marlin/src/lcd/language/language_gl.h | 6 +-- Marlin/src/lcd/language/language_hr.h | 2 +- Marlin/src/lcd/language/language_hu.h | 9 ++-- Marlin/src/lcd/language/language_it.h | 11 ++--- Marlin/src/lcd/language/language_jp_kana.h | 4 +- Marlin/src/lcd/language/language_nl.h | 4 +- Marlin/src/lcd/language/language_pl.h | 6 +-- Marlin/src/lcd/language/language_pt.h | 2 +- Marlin/src/lcd/language/language_pt_br.h | 6 +-- Marlin/src/lcd/language/language_ro.h | 6 +-- Marlin/src/lcd/language/language_ru.h | 11 ++--- Marlin/src/lcd/language/language_sk.h | 11 ++--- Marlin/src/lcd/language/language_sv.h | 6 +-- Marlin/src/lcd/language/language_tr.h | 11 ++--- Marlin/src/lcd/language/language_uk.h | 11 ++--- Marlin/src/lcd/language/language_vi.h | 5 +- Marlin/src/lcd/language/language_zh_CN.h | 6 +-- Marlin/src/lcd/language/language_zh_TW.h | 6 +-- Marlin/src/module/temperature.cpp | 49 +++++++------------ 34 files changed, 107 insertions(+), 165 deletions(-) diff --git a/Marlin/src/core/language.h b/Marlin/src/core/language.h index 649f05cf69d9..9fc7e99bf565 100644 --- a/Marlin/src/core/language.h +++ b/Marlin/src/core/language.h @@ -154,7 +154,7 @@ #define STR_ERR_ARC_ARGS "G2/G3 bad parameters" #define STR_ERR_PROTECTED_PIN "Protected Pin" #define STR_ERR_M420_FAILED "Failed to enable Bed Leveling" -#define STR_ERR_M428_TOO_FAR "Too far from reference point" +#define STR_ERR_M428_TOO_FAR "Too far from MIN/MAX" #define STR_ERR_M303_DISABLED "PIDTEMP disabled" #define STR_M119_REPORT "Reporting endstop status" #define STR_ON "ON" @@ -254,7 +254,7 @@ #define STR_REDUNDANCY "Heater switched off. Temperature difference between temp sensors is too high !" #define STR_T_HEATING_FAILED "Heating failed" #define STR_T_THERMAL_RUNAWAY "Thermal Runaway" -#define STR_T_MALFUNCTION "Thermal Malfunction" +#define STR_T_THERMAL_MALFUNCTION "Thermal Malfunction" #define STR_T_MAXTEMP "MAXTEMP triggered" #define STR_T_MINTEMP "MINTEMP triggered" #define STR_ERR_PROBING_FAILED "Probing Failed" diff --git a/Marlin/src/lcd/e3v2/proui/dwin.cpp b/Marlin/src/lcd/e3v2/proui/dwin.cpp index 7c69d0f900d8..83c7eebe3812 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/proui/dwin.cpp @@ -1825,7 +1825,7 @@ void MarlinUI::refresh() { /* Nothing to see here */ } void MarlinUI::_set_brightness() { dwinLCDBrightness(backlight ? brightness : 0); } #endif -void MarlinUI::kill_screen(FSTR_P const lcd_error, FSTR_P const lcd_component) { +void MarlinUI::kill_screen(FSTR_P const lcd_error, FSTR_P const) { dwinDrawPopup(ICON_BLTouch, GET_TEXT_F(MSG_PRINTER_KILLED), lcd_error); DWINUI::drawCenteredString(hmiData.colorPopupTxt, 270, GET_TEXT_F(MSG_TURN_OFF)); dwinUpdateLCD(); diff --git a/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.cpp b/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.cpp index f27e638b3280..1aaa37870806 100644 --- a/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.cpp +++ b/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.cpp @@ -293,7 +293,7 @@ namespace Anycubic { DEBUG_ECHOLNPGM("printerKilled()\nerror: ", error, "\ncomponent: ", component); #endif - if (strcmp_P(error, PSTR("Heating Failed")) == 0) { + if (strcmp_P(error, GET_TEXT(MSG_ERR_HEATING_FAILED)) == 0) { if (strcmp_P(component, PSTR("Bed")) == 0) { changePageOfTFT(PAGE_CHS_ABNORMAL_BED_HEATER); @@ -305,7 +305,7 @@ namespace Anycubic { } } - else if (strcmp_P(error, PSTR("Err: MINTEMP")) == 0) { + else if (strcmp_P(error, GET_TEXT(MSG_ERR_MINTEMP)) == 0) { if (strcmp_P(component, PSTR("Bed")) == 0) { changePageOfTFT(PAGE_CHS_ABNORMAL_BED_NTC); @@ -317,7 +317,7 @@ namespace Anycubic { } } - else if (strcmp_P(error, PSTR("Err: MAXTEMP")) == 0) { + else if (strcmp_P(error, GET_TEXT(MSG_ERR_MAXTEMP)) == 0) { if (strcmp_P(component, PSTR("Bed")) == 0) { changePageOfTFT(PAGE_CHS_ABNORMAL_BED_NTC); @@ -329,7 +329,7 @@ namespace Anycubic { } } - else if (strcmp_P(error, PSTR("THERMAL RUNAWAY")) == 0) { + else if (strcmp_P(error, GET_TEXT(MSG_ERR_THERMAL_RUNAWAY)) == 0) { if (strcmp_P(component, PSTR("Bed")) == 0) { changePageOfTFT(PAGE_CHS_ABNORMAL_BED_HEATER); @@ -341,7 +341,7 @@ namespace Anycubic { } } - else if (strcmp_P(error, PSTR("Homing Failed")) == 0) { + else if (strcmp_P(error, GET_TEXT(MSG_KILL_HOMING_FAILED)) == 0) { if (strcmp_P(component, PSTR("X")) == 0) { changePageOfTFT(PAGE_CHS_ABNORMAL_X_ENDSTOP); diff --git a/Marlin/src/lcd/language/language_an.h b/Marlin/src/lcd/language/language_an.h index 0d2b96d5a459..d1f7a1d39160 100644 --- a/Marlin/src/lcd/language/language_an.h +++ b/Marlin/src/lcd/language/language_an.h @@ -167,11 +167,11 @@ namespace LanguageNarrow_an { LSTR MSG_BABYSTEP_Z = _UxGT("Micropaso Z"); LSTR MSG_BABYSTEP_N = _UxGT("Micropaso @"); LSTR MSG_ENDSTOP_ABORT = _UxGT("Cancelado - Endstop"); - LSTR MSG_HEATING_FAILED_LCD = _UxGT("Error: en calentar"); - LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("Error: temperatura"); - LSTR MSG_THERMAL_RUNAWAY = _UxGT("Error de temperatura"); - LSTR MSG_ERR_MAXTEMP = _UxGT("Error: Temp Max"); - LSTR MSG_ERR_MINTEMP = _UxGT("Error: Temp Min"); + LSTR MSG_ERR_HEATING_FAILED = _UxGT("Error en calentar"); + LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("Error temp adicional"); + LSTR MSG_ERR_THERMAL_RUNAWAY = _UxGT("Error de temperatura"); + LSTR MSG_ERR_MAXTEMP = _UxGT("Error Temp Max"); + LSTR MSG_ERR_MINTEMP = _UxGT("Error Temp Min"); LSTR MSG_HALTED = _UxGT("IMPRESORA ATURADA"); LSTR MSG_PLEASE_RESET = _UxGT("Per favor reinic."); LSTR MSG_HEATING = _UxGT("Calentando..."); diff --git a/Marlin/src/lcd/language/language_ca.h b/Marlin/src/lcd/language/language_ca.h index 7a83da7d4e54..b35ab4084df9 100644 --- a/Marlin/src/lcd/language/language_ca.h +++ b/Marlin/src/lcd/language/language_ca.h @@ -158,9 +158,9 @@ namespace LanguageNarrow_ca { LSTR MSG_BABYSTEP_Z = _UxGT("Micropas Z"); LSTR MSG_BABYSTEP_N = _UxGT("Micropas @"); LSTR MSG_ENDSTOP_ABORT = _UxGT("Cancel. Endstop"); - LSTR MSG_HEATING_FAILED_LCD = _UxGT("Error al escalfar"); + LSTR MSG_ERR_HEATING_FAILED = _UxGT("Error al escalfar"); LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("Err: TEMP REDUNDANT"); - LSTR MSG_THERMAL_RUNAWAY = _UxGT("THERMAL RUNAWAY"); + LSTR MSG_ERR_THERMAL_RUNAWAY = _UxGT("THERMAL RUNAWAY"); LSTR MSG_ERR_MAXTEMP = _UxGT("Err: TEMP MAXIMA"); LSTR MSG_ERR_MINTEMP = _UxGT("Err: TEMP MINIMA"); LSTR MSG_HALTED = _UxGT("IMPRESSORA PARADA"); diff --git a/Marlin/src/lcd/language/language_cz.h b/Marlin/src/lcd/language/language_cz.h index ba54eb051e29..ac1c81580df1 100644 --- a/Marlin/src/lcd/language/language_cz.h +++ b/Marlin/src/lcd/language/language_cz.h @@ -397,11 +397,9 @@ namespace LanguageNarrow_cz { LSTR MSG_BABYSTEP_N = _UxGT("Babystep @"); LSTR MSG_BABYSTEP_TOTAL = _UxGT("Celkem"); LSTR MSG_ENDSTOP_ABORT = _UxGT("Endstop abort"); - LSTR MSG_HEATING_FAILED_LCD = _UxGT("Chyba zahřívání"); + LSTR MSG_ERR_HEATING_FAILED = _UxGT("Chyba zahřívání"); LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("REDUND. TEPLOTA"); - LSTR MSG_THERMAL_RUNAWAY = _UxGT("TEPLOTNÍ ÚNIK"); - LSTR MSG_THERMAL_RUNAWAY_BED = _UxGT("TEPL. ÚNIK PODL."); - LSTR MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("TEPL. ÚNIK KOMORA"); + LSTR MSG_ERR_THERMAL_RUNAWAY = _UxGT("TEPLOTNÍ ÚNIK"); LSTR MSG_ERR_MAXTEMP = _UxGT("VYSOKÁ TEPLOTA"); LSTR MSG_ERR_MINTEMP = _UxGT("NÍZKA TEPLOTA"); LSTR MSG_HALTED = _UxGT("TISK. ZASTAVENA"); diff --git a/Marlin/src/lcd/language/language_da.h b/Marlin/src/lcd/language/language_da.h index 6a7bcad59823..89466f89e589 100644 --- a/Marlin/src/lcd/language/language_da.h +++ b/Marlin/src/lcd/language/language_da.h @@ -139,9 +139,9 @@ namespace LanguageNarrow_da { LSTR MSG_ZPROBE_OUT = _UxGT("Probe udenfor plade"); LSTR MSG_BLTOUCH_SELFTEST = _UxGT("BLTouch Selv-Test"); LSTR MSG_HOME_FIRST = _UxGT("Home %s først"); - LSTR MSG_HEATING_FAILED_LCD = _UxGT("Opvarmning fejlet"); + LSTR MSG_ERR_HEATING_FAILED = _UxGT("Opvarmning fejlet"); LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("Fejl: reserve temp"); - LSTR MSG_THERMAL_RUNAWAY = _UxGT("Temp løber løbsk"); + LSTR MSG_ERR_THERMAL_RUNAWAY = _UxGT("Temp løber løbsk"); LSTR MSG_ERR_MAXTEMP = _UxGT("Fejl: Maks temp"); LSTR MSG_ERR_MINTEMP = _UxGT("Fejl: Min temp"); LSTR MSG_HALTED = _UxGT("PRINTER STOPPET"); diff --git a/Marlin/src/lcd/language/language_de.h b/Marlin/src/lcd/language/language_de.h index 30e2521d2302..beb878631f24 100644 --- a/Marlin/src/lcd/language/language_de.h +++ b/Marlin/src/lcd/language/language_de.h @@ -546,14 +546,11 @@ namespace LanguageNarrow_de { LSTR MSG_BABYSTEP_N = _UxGT("Babystep @"); LSTR MSG_BABYSTEP_TOTAL = _UxGT("Total"); LSTR MSG_ENDSTOP_ABORT = _UxGT("Abbr. mit Endstopp"); - LSTR MSG_HEATING_FAILED_LCD = _UxGT("HEIZEN ERFOLGLOS"); + LSTR MSG_ERR_HEATING_FAILED = _UxGT("HEIZEN ERFOLGLOS"); LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("REDUND. TEMP-ABWEI."); - LSTR MSG_THERMAL_RUNAWAY = " " LCD_STR_THERMOMETER _UxGT(" NICHT ERREICHT"); - LSTR MSG_TEMP_MALFUNCTION = _UxGT("TEMP-FEHLER"); - LSTR MSG_THERMAL_RUNAWAY_BED = _UxGT("BETT") " " LCD_STR_THERMOMETER _UxGT(" NICHT ERREICHT"); - LSTR MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("GEH.") " " LCD_STR_THERMOMETER _UxGT(" NICHT ERREICHT"); - LSTR MSG_THERMAL_RUNAWAY_COOLER = _UxGT("Kühler Runaway"); - LSTR MSG_COOLING_FAILED = _UxGT("Kühlung fehlgeschla."); + LSTR MSG_ERR_THERMAL_RUNAWAY = " " LCD_STR_THERMOMETER _UxGT(" NICHT ERREICHT"); + LSTR MSG_ERR_TEMP_MALFUNCTION = _UxGT("TEMP-FEHLER"); + LSTR MSG_ERR_COOLING_FAILED = _UxGT("Kühlung fehlgeschla."); LSTR MSG_ERR_MAXTEMP = " " LCD_STR_THERMOMETER _UxGT(" ÜBERSCHRITTEN"); LSTR MSG_ERR_MINTEMP = " " LCD_STR_THERMOMETER _UxGT(" UNTERSCHRITTEN"); LSTR MSG_HALTED = _UxGT("DRUCKER GESTOPPT"); diff --git a/Marlin/src/lcd/language/language_el.h b/Marlin/src/lcd/language/language_el.h index 0a8e50109b6e..6809b72256f4 100644 --- a/Marlin/src/lcd/language/language_el.h +++ b/Marlin/src/lcd/language/language_el.h @@ -192,10 +192,10 @@ namespace LanguageNarrow_el { LSTR MSG_BABYSTEP_Y = _UxGT("Μικρό βήμα Υ"); LSTR MSG_BABYSTEP_Z = _UxGT("Μικρό βήμα Ζ"); LSTR MSG_ENDSTOP_ABORT = _UxGT("Ακύρωση endstop"); - LSTR MSG_HEATING_FAILED_LCD = _UxGT("Αποτυχία θέρμανσης"); + LSTR MSG_ERR_HEATING_FAILED = _UxGT("Αποτυχία θέρμανσης"); LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("ΠΛΕΟΝΑΖΟΥΣΑ ΘΕΡΜΟΤΗΤΑ"); - LSTR MSG_THERMAL_RUNAWAY = _UxGT("ΘΕΡΜΙΚΗ ΔΙΑΦΥΓΗ"); - LSTR MSG_TEMP_MALFUNCTION = _UxGT("ΘΕΡΜΙΚΗ ΔΥΣΛΕΙΤΟΥΡΓΙΑ"); + LSTR MSG_ERR_THERMAL_RUNAWAY = _UxGT("ΘΕΡΜΙΚΗ ΔΙΑΦΥΓΗ"); + LSTR MSG_ERR_TEMP_MALFUNCTION = _UxGT("ΘΕΡΜΙΚΗ ΔΥΣΛΕΙΤΟΥΡΓΙΑ"); LSTR MSG_ERR_MAXTEMP = _UxGT("ΠΕΡΙΤΤΗ ΘΕΡΜΟΚΡΑΣΙΑ"); LSTR MSG_ERR_MINTEMP = _UxGT("ΑΝΕΠΑΡΚΗΣ ΘΕΡΜΟΚΡΑΣΙΑ"); LSTR MSG_HALTED = _UxGT("Εκτυπωτής διεκόπη"); diff --git a/Marlin/src/lcd/language/language_el_gr.h b/Marlin/src/lcd/language/language_el_gr.h index e766ecb941d6..65d6c194e088 100644 --- a/Marlin/src/lcd/language/language_el_gr.h +++ b/Marlin/src/lcd/language/language_el_gr.h @@ -182,9 +182,9 @@ namespace LanguageNarrow_el_gr { LSTR MSG_BABYSTEP_Y = _UxGT("Μικρό βήμα Υ"); LSTR MSG_BABYSTEP_Z = _UxGT("Μικρό βήμα Ζ"); LSTR MSG_ENDSTOP_ABORT = _UxGT("Ματαίωση endstop "); - LSTR MSG_HEATING_FAILED_LCD = _UxGT("Ανεπιτυχής θέρμανση"); + LSTR MSG_ERR_HEATING_FAILED = _UxGT("Ανεπιτυχής θέρμανση"); LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("Λάθος: ΠΛΕΟΝΑΖΟΥΣΑ ΘΕΡΜΟΤΗΤΑ"); - LSTR MSG_THERMAL_RUNAWAY = _UxGT("ΔΙΑΦΥΓΗ ΘΕΡΜΟΤΗΤΑΣ"); + LSTR MSG_ERR_THERMAL_RUNAWAY = _UxGT("ΔΙΑΦΥΓΗ ΘΕΡΜΟΤΗΤΑΣ"); LSTR MSG_ERR_MAXTEMP = _UxGT("Λάθος: ΜΕΓΙΣΤΗ ΘΕΡΜΟΤΗΤΑ"); LSTR MSG_ERR_MINTEMP = _UxGT("Λάθος: ΕΛΑΧΙΣΤΗ ΘΕΡΜΟΤΗΤΑ"); LSTR MSG_HEATING = _UxGT("Θερμαίνεται…"); diff --git a/Marlin/src/lcd/language/language_en.h b/Marlin/src/lcd/language/language_en.h index 9fdc33e5f202..d6a5915dcc06 100644 --- a/Marlin/src/lcd/language/language_en.h +++ b/Marlin/src/lcd/language/language_en.h @@ -113,7 +113,7 @@ namespace LanguageNarrow_en { LSTR MSG_HOME_OFFSET_Y = _UxGT("Home Offset Y"); LSTR MSG_HOME_OFFSET_Z = _UxGT("Home Offset Z"); LSTR MSG_HOME_OFFSETS_APPLIED = _UxGT("Offsets Applied"); - LSTR MSG_ERR_M428_TOO_FAR = _UxGT("Err: Too far!"); + LSTR MSG_ERR_M428_TOO_FAR = _UxGT("MIN/MAX Too Far"); LSTR MSG_TRAMMING_WIZARD = _UxGT("Tramming Wizard"); LSTR MSG_SELECT_ORIGIN = _UxGT("Select Origin"); LSTR MSG_LAST_VALUE_SP = _UxGT("Last value "); @@ -271,8 +271,8 @@ namespace LanguageNarrow_en { LSTR MSG_MESH_SAVED = _UxGT("Mesh %i Saved"); LSTR MSG_MESH_ACTIVE = _UxGT("Mesh %i active"); LSTR MSG_UBL_NO_STORAGE = _UxGT("No Storage"); - LSTR MSG_UBL_SAVE_ERROR = _UxGT("Err: UBL Save"); - LSTR MSG_UBL_RESTORE_ERROR = _UxGT("Err: UBL Restore"); + LSTR MSG_UBL_SAVE_ERROR = _UxGT("UBL Save Error"); + LSTR MSG_UBL_RESTORE_ERROR = _UxGT("UBL Restore Error"); LSTR MSG_UBL_Z_OFFSET = _UxGT("Z-Offset: "); LSTR MSG_UBL_Z_OFFSET_STOPPED = _UxGT("Z-Offset Stopped"); LSTR MSG_UBL_STEP_BY_STEP_MENU = _UxGT("Step-By-Step UBL"); @@ -611,14 +611,11 @@ namespace LanguageNarrow_en { LSTR MSG_BABYSTEP_N = _UxGT("Babystep @"); LSTR MSG_BABYSTEP_TOTAL = _UxGT("Total"); LSTR MSG_ENDSTOP_ABORT = _UxGT("Endstop Abort"); - LSTR MSG_HEATING_FAILED_LCD = _UxGT("Heating Failed"); + LSTR MSG_ERR_HEATING_FAILED = _UxGT("Heating Failed"); LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("Err: REDUNDANT TEMP"); - LSTR MSG_THERMAL_RUNAWAY = _UxGT("THERMAL RUNAWAY"); - LSTR MSG_TEMP_MALFUNCTION = _UxGT("TEMP MALFUNCTION"); - LSTR MSG_THERMAL_RUNAWAY_BED = _UxGT("BED THERMAL RUNAWAY"); - LSTR MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("CHAMBER T. RUNAWAY"); - LSTR MSG_THERMAL_RUNAWAY_COOLER = _UxGT("Cooler Runaway"); - LSTR MSG_COOLING_FAILED = _UxGT("Cooling Failed"); + LSTR MSG_ERR_THERMAL_RUNAWAY = _UxGT("THERMAL RUNAWAY"); + LSTR MSG_ERR_TEMP_MALFUNCTION = _UxGT("TEMP MALFUNCTION"); + LSTR MSG_ERR_COOLING_FAILED = _UxGT("Cooling Failed"); LSTR MSG_ERR_MAXTEMP = _UxGT("Err: MAXTEMP"); LSTR MSG_ERR_MINTEMP = _UxGT("Err: MINTEMP"); LSTR MSG_HALTED = _UxGT("PRINTER HALTED"); diff --git a/Marlin/src/lcd/language/language_es.h b/Marlin/src/lcd/language/language_es.h index 3726e25270fb..1c2269d8d92d 100644 --- a/Marlin/src/lcd/language/language_es.h +++ b/Marlin/src/lcd/language/language_es.h @@ -187,8 +187,8 @@ namespace LanguageNarrow_es { LSTR MSG_MESH_LOADED = _UxGT("Malla %i Cargada"); LSTR MSG_MESH_SAVED = _UxGT("Malla %i Guardada"); LSTR MSG_UBL_NO_STORAGE = _UxGT("Sin guardar"); - LSTR MSG_UBL_SAVE_ERROR = _UxGT("Error: Guardar UBL"); - LSTR MSG_UBL_RESTORE_ERROR = _UxGT("Error: Restaurar UBL"); + LSTR MSG_UBL_SAVE_ERROR = _UxGT("Error Guardar UBL"); + LSTR MSG_UBL_RESTORE_ERROR = _UxGT("Error Restaurar UBL"); LSTR MSG_UBL_Z_OFFSET = _UxGT("Desfase de Z: "); LSTR MSG_UBL_Z_OFFSET_STOPPED = _UxGT("Desfase de Z Parado"); LSTR MSG_UBL_STEP_BY_STEP_MENU = _UxGT("UBL Paso a Paso"); @@ -407,11 +407,9 @@ namespace LanguageNarrow_es { LSTR MSG_BABYSTEP_N = _UxGT("Micropaso @"); LSTR MSG_BABYSTEP_TOTAL = _UxGT("Total"); LSTR MSG_ENDSTOP_ABORT = _UxGT("Cancelado - Endstop"); - LSTR MSG_HEATING_FAILED_LCD = _UxGT("Calent. fallido"); + LSTR MSG_ERR_HEATING_FAILED = _UxGT("Calent. fallido"); LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("Err: TEMP. REDUN."); - LSTR MSG_THERMAL_RUNAWAY = _UxGT("FUGA TÉRMICA"); - LSTR MSG_THERMAL_RUNAWAY_BED = _UxGT("FUGA TÉRMICA CAMA"); - LSTR MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("FUGA TÉRMICA CAMARA"); + LSTR MSG_ERR_THERMAL_RUNAWAY = _UxGT("FUGA TÉRMICA"); LSTR MSG_ERR_MAXTEMP = _UxGT("Err:TEMP. MÁX"); LSTR MSG_ERR_MINTEMP = _UxGT("Err:TEMP. MIN"); LSTR MSG_HALTED = _UxGT("IMPRESORA DETENIDA"); diff --git a/Marlin/src/lcd/language/language_eu.h b/Marlin/src/lcd/language/language_eu.h index d96b099f3e4a..5d46b14d5073 100644 --- a/Marlin/src/lcd/language/language_eu.h +++ b/Marlin/src/lcd/language/language_eu.h @@ -240,9 +240,9 @@ namespace LanguageNarrow_eu { LSTR MSG_BABYSTEP_Z = _UxGT("Mikro-urratsa Z"); LSTR MSG_BABYSTEP_N = _UxGT("Mikro-urratsa @"); LSTR MSG_ENDSTOP_ABORT = _UxGT("Endstop deusezta."); - LSTR MSG_HEATING_FAILED_LCD = _UxGT("Err: Beroketa"); + LSTR MSG_ERR_HEATING_FAILED = _UxGT("Err: Beroketa"); LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("Err: Tenperatura"); - LSTR MSG_THERMAL_RUNAWAY = _UxGT("TENP. KONTROL EZA"); + LSTR MSG_ERR_THERMAL_RUNAWAY = _UxGT("TENP. KONTROL EZA"); LSTR MSG_ERR_MAXTEMP = _UxGT("Err: Tenp Maximoa"); LSTR MSG_ERR_MINTEMP = _UxGT("Err: Tenp Minimoa"); LSTR MSG_HALTED = _UxGT("INPRIMA. GELDIRIK"); diff --git a/Marlin/src/lcd/language/language_fr.h b/Marlin/src/lcd/language/language_fr.h index c281497e9629..65b5bbc4b880 100644 --- a/Marlin/src/lcd/language/language_fr.h +++ b/Marlin/src/lcd/language/language_fr.h @@ -433,9 +433,9 @@ namespace LanguageNarrow_fr { LSTR MSG_BABYSTEP_N = _UxGT("Babystep @"); LSTR MSG_BABYSTEP_TOTAL = _UxGT("Total"); LSTR MSG_ENDSTOP_ABORT = _UxGT("Butée abandon"); - LSTR MSG_HEATING_FAILED_LCD = _UxGT("Err de chauffe"); + LSTR MSG_ERR_HEATING_FAILED = _UxGT("Err de chauffe"); LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("Err TEMP. REDONDANTE"); - LSTR MSG_THERMAL_RUNAWAY = _UxGT("Err THERMIQUE"); + LSTR MSG_ERR_THERMAL_RUNAWAY = _UxGT("Err THERMIQUE"); LSTR MSG_ERR_MAXTEMP = _UxGT("Err TEMP. MAX"); LSTR MSG_ERR_MINTEMP = _UxGT("Err TEMP. MIN"); diff --git a/Marlin/src/lcd/language/language_fr_na.h b/Marlin/src/lcd/language/language_fr_na.h index 05e5b061ddef..6ad854f14c24 100644 --- a/Marlin/src/lcd/language/language_fr_na.h +++ b/Marlin/src/lcd/language/language_fr_na.h @@ -433,9 +433,9 @@ namespace LanguageNarrow_fr_na { LSTR MSG_BABYSTEP_N = _UxGT("Babystep @"); LSTR MSG_BABYSTEP_TOTAL = _UxGT("Total"); LSTR MSG_ENDSTOP_ABORT = _UxGT("Butee abandon"); - LSTR MSG_HEATING_FAILED_LCD = _UxGT("Err de chauffe"); + LSTR MSG_ERR_HEATING_FAILED = _UxGT("Err de chauffe"); LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("Err TEMP. REDONDANTE"); - LSTR MSG_THERMAL_RUNAWAY = _UxGT("Err THERMIQUE"); + LSTR MSG_ERR_THERMAL_RUNAWAY = _UxGT("Err THERMIQUE"); LSTR MSG_ERR_MAXTEMP = _UxGT("Err TEMP. MAX"); LSTR MSG_ERR_MINTEMP = _UxGT("Err TEMP. MIN"); diff --git a/Marlin/src/lcd/language/language_gl.h b/Marlin/src/lcd/language/language_gl.h index b55a74bb171a..f1798748d411 100644 --- a/Marlin/src/lcd/language/language_gl.h +++ b/Marlin/src/lcd/language/language_gl.h @@ -422,11 +422,9 @@ namespace LanguageNarrow_gl { LSTR MSG_BABYSTEP_N = _UxGT("Micropaso @"); LSTR MSG_BABYSTEP_TOTAL = _UxGT("Total"); LSTR MSG_ENDSTOP_ABORT = _UxGT("Erro FinCarro"); - LSTR MSG_HEATING_FAILED_LCD = _UxGT("Fallo Quentando"); + LSTR MSG_ERR_HEATING_FAILED = _UxGT("Fallo Quentando"); LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("Erro:Temp Redundante"); - LSTR MSG_THERMAL_RUNAWAY = _UxGT("FUGA TÉRMICA"); - LSTR MSG_THERMAL_RUNAWAY_BED = _UxGT("FUGA TÉRMICA CAMA"); - LSTR MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("FUGA TÉRMICA CÁMARA"); + LSTR MSG_ERR_THERMAL_RUNAWAY = _UxGT("FUGA TÉRMICA"); LSTR MSG_ERR_MAXTEMP = _UxGT("Erro:TEMP MÁX"); LSTR MSG_ERR_MINTEMP = _UxGT("Erro:TEMP MÍN"); LSTR MSG_HALTED = _UxGT("IMPRESORA DETIDA"); diff --git a/Marlin/src/lcd/language/language_hr.h b/Marlin/src/lcd/language/language_hr.h index 8480708e7895..678d9c290a9b 100644 --- a/Marlin/src/lcd/language/language_hr.h +++ b/Marlin/src/lcd/language/language_hr.h @@ -120,7 +120,7 @@ namespace LanguageNarrow_hr { LSTR MSG_FILAMENTCHANGE_E = _UxGT("Promijeni filament *"); LSTR MSG_ATTACH_MEDIA = _UxGT("Init. SD karticu"); LSTR MSG_CHANGE_MEDIA = _UxGT("Promijeni SD karticu"); - LSTR MSG_HEATING_FAILED_LCD = _UxGT("Grijanje neuspješno"); + LSTR MSG_ERR_HEATING_FAILED = _UxGT("Grijanje neuspješno"); LSTR MSG_HEATING = _UxGT("Grijanje..."); LSTR MSG_BED_HEATING = _UxGT("Grijanje Bed-a..."); LSTR MSG_DELTA_CALIBRATE = _UxGT("Delta Kalibracija"); diff --git a/Marlin/src/lcd/language/language_hu.h b/Marlin/src/lcd/language/language_hu.h index 39ee0fc558a3..a371fc5a4329 100644 --- a/Marlin/src/lcd/language/language_hu.h +++ b/Marlin/src/lcd/language/language_hu.h @@ -479,13 +479,10 @@ namespace LanguageNarrow_hu { LSTR MSG_BABYSTEP_N = _UxGT("Mikrolépés @"); LSTR MSG_BABYSTEP_TOTAL = _UxGT("Teljes"); LSTR MSG_ENDSTOP_ABORT = _UxGT("Végállás megszakítva!"); - LSTR MSG_HEATING_FAILED_LCD = _UxGT("Fütés hiba!"); + LSTR MSG_ERR_HEATING_FAILED = _UxGT("Fütés hiba!"); LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("Hiba: SZÜKSÉGTELEN HÖFOK"); - LSTR MSG_THERMAL_RUNAWAY = _UxGT("FÜTÉS KIMARADÁS"); - LSTR MSG_THERMAL_RUNAWAY_BED = _UxGT("ÁGY FÜTÉS KIMARADÁS"); - LSTR MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("KAMRA FÜTÉS KIMARADÁS"); - LSTR MSG_THERMAL_RUNAWAY_COOLER = _UxGT("Hütés kimaradás"); - LSTR MSG_COOLING_FAILED = _UxGT("Hütés sikertelen"); + LSTR MSG_ERR_THERMAL_RUNAWAY = _UxGT("FÜTÉS KIMARADÁS"); + LSTR MSG_ERR_COOLING_FAILED = _UxGT("Hütés sikertelen"); LSTR MSG_ERR_MAXTEMP = _UxGT("Hiba: MAX höfok"); LSTR MSG_ERR_MINTEMP = _UxGT("Hiba: MIN höfok"); LSTR MSG_HALTED = _UxGT("A NYOMTATÓ LEÁLLT"); diff --git a/Marlin/src/lcd/language/language_it.h b/Marlin/src/lcd/language/language_it.h index 9c78918fcf23..9e3776d36b8e 100644 --- a/Marlin/src/lcd/language/language_it.h +++ b/Marlin/src/lcd/language/language_it.h @@ -591,14 +591,11 @@ namespace LanguageNarrow_it { LSTR MSG_BABYSTEP_N = _UxGT("Babystep @"); LSTR MSG_BABYSTEP_TOTAL = _UxGT("Totali"); LSTR MSG_ENDSTOP_ABORT = _UxGT("Interrompi se FC"); - LSTR MSG_HEATING_FAILED_LCD = _UxGT("Risc.Fallito"); // Max 12 characters + LSTR MSG_ERR_HEATING_FAILED = _UxGT("Risc.Fallito"); // Max 12 characters LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("Err: TEMP RIDONDANTE"); - LSTR MSG_THERMAL_RUNAWAY = _UxGT("TEMP FUORI CONTROLLO"); - LSTR MSG_TEMP_MALFUNCTION = _UxGT("MALFUNZIONAMENTO TEMP"); - LSTR MSG_THERMAL_RUNAWAY_BED = _UxGT("TEMP PIAT.FUORI CTRL"); - LSTR MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("T.CAMERA FUORI CTRL"); - LSTR MSG_THERMAL_RUNAWAY_COOLER = _UxGT("RAFFREDAM.FUORI CTRL"); - LSTR MSG_COOLING_FAILED = _UxGT("Raffreddam. fallito"); + LSTR MSG_ERR_THERMAL_RUNAWAY = _UxGT("TEMP FUORI CONTROLLO"); + LSTR MSG_ERR_TEMP_MALFUNCTION = _UxGT("MALFUNZIONAMENTO TEMP"); + LSTR MSG_ERR_COOLING_FAILED = _UxGT("Raffreddam. fallito"); LSTR MSG_ERR_MAXTEMP = _UxGT("Err: TEMP MASSIMA"); LSTR MSG_ERR_MINTEMP = _UxGT("Err: TEMP MINIMA"); LSTR MSG_HALTED = _UxGT("STAMPANTE FERMATA"); diff --git a/Marlin/src/lcd/language/language_jp_kana.h b/Marlin/src/lcd/language/language_jp_kana.h index d40b972427f0..e75ebeb1231e 100644 --- a/Marlin/src/lcd/language/language_jp_kana.h +++ b/Marlin/src/lcd/language/language_jp_kana.h @@ -181,9 +181,9 @@ namespace LanguageNarrow_jp_kana { LSTR MSG_BABYSTEP_Y = _UxGT("Yジク ビドウ"); // "Babystep Y" LSTR MSG_BABYSTEP_Z = _UxGT("Zジク ビドウ"); // "Babystep Z" LSTR MSG_ENDSTOP_ABORT = _UxGT("イドウゲンカイケンチキノウ"); // "Endstop abort" - LSTR MSG_HEATING_FAILED_LCD = _UxGT("カネツシッパイ"); // "Heating failed" + LSTR MSG_ERR_HEATING_FAILED = _UxGT("カネツシッパイ"); // "Heating failed" LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("エラー:ジョウチョウサーミスターキノウ"); // "Err: REDUNDANT TEMP" - LSTR MSG_THERMAL_RUNAWAY = _UxGT("ネツボウソウ"); // "THERMAL RUNAWAY" + LSTR MSG_ERR_THERMAL_RUNAWAY = _UxGT("ネツボウソウ"); // "THERMAL RUNAWAY" LSTR MSG_ERR_MAXTEMP = _UxGT("エラー:サイコウオンチョウカ"); // "Err: MAXTEMP" LSTR MSG_ERR_MINTEMP = _UxGT("エラー:サイテイオンミマン"); // "Err: MINTEMP" LSTR MSG_HALTED = _UxGT("プリンターハテイシシマシタ"); // "PRINTER HALTED" diff --git a/Marlin/src/lcd/language/language_nl.h b/Marlin/src/lcd/language/language_nl.h index 85b484a10050..215e5b83ba94 100644 --- a/Marlin/src/lcd/language/language_nl.h +++ b/Marlin/src/lcd/language/language_nl.h @@ -159,9 +159,9 @@ namespace LanguageNarrow_nl { LSTR MSG_BABYSTEP_Z = _UxGT("Babystap Z"); LSTR MSG_BABYSTEP_N = _UxGT("Babystap @"); LSTR MSG_ENDSTOP_ABORT = _UxGT("Endstop afbr."); - LSTR MSG_HEATING_FAILED_LCD = _UxGT("Voorverw. fout"); + LSTR MSG_ERR_HEATING_FAILED = _UxGT("Voorverw. fout"); LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("Redun. temp fout"); - LSTR MSG_THERMAL_RUNAWAY = _UxGT("Therm. wegloop"); + LSTR MSG_ERR_THERMAL_RUNAWAY = _UxGT("Therm. wegloop"); LSTR MSG_ERR_MAXTEMP = _UxGT("Err: Max. temp"); LSTR MSG_ERR_MINTEMP = _UxGT("Err: Min. temp"); LSTR MSG_HALTED = _UxGT("PRINTER GESTOPT"); diff --git a/Marlin/src/lcd/language/language_pl.h b/Marlin/src/lcd/language/language_pl.h index 4efc1720dbc2..f9f60ef37ca2 100644 --- a/Marlin/src/lcd/language/language_pl.h +++ b/Marlin/src/lcd/language/language_pl.h @@ -377,11 +377,9 @@ namespace LanguageNarrow_pl { LSTR MSG_MOVE_NOZZLE_TO_BED = _UxGT("Przesuń dyszę do stołu"); LSTR MSG_BABYSTEP_TOTAL = _UxGT("Łącznie"); LSTR MSG_ENDSTOP_ABORT = _UxGT("Błąd krańcówki"); - LSTR MSG_HEATING_FAILED_LCD = _UxGT("Rozgrz. nieudane"); + LSTR MSG_ERR_HEATING_FAILED = _UxGT("Rozgrz. nieudane"); LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("Błąd temperatury"); - LSTR MSG_THERMAL_RUNAWAY = _UxGT("ZANIK TEMPERATURY"); - LSTR MSG_THERMAL_RUNAWAY_BED = _UxGT("ZANIK TEMP. STOŁU"); - LSTR MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("ZANIK TEMP.KOMORY"); + LSTR MSG_ERR_THERMAL_RUNAWAY = _UxGT("ZANIK TEMPERATURY"); LSTR MSG_ERR_MAXTEMP = _UxGT("Błąd: MAXTEMP"); LSTR MSG_ERR_MINTEMP = _UxGT("Błąd: MINTEMP"); LSTR MSG_HALTED = _UxGT("Drukarka zatrzym."); diff --git a/Marlin/src/lcd/language/language_pt.h b/Marlin/src/lcd/language/language_pt.h index e339c8afd444..3a2329f8aed2 100644 --- a/Marlin/src/lcd/language/language_pt.h +++ b/Marlin/src/lcd/language/language_pt.h @@ -148,7 +148,7 @@ namespace LanguageNarrow_pt { LSTR MSG_ZPROBE_OUT = _UxGT("Sensor fora/base"); LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Desvio Z"); LSTR MSG_ENDSTOP_ABORT = _UxGT("Fim de curso"); - LSTR MSG_HEATING_FAILED_LCD = _UxGT("Aquecimento falhou"); + LSTR MSG_ERR_HEATING_FAILED = _UxGT("Aquecimento falhou"); LSTR MSG_ERR_MAXTEMP = _UxGT("Err: T Máxima"); LSTR MSG_ERR_MINTEMP = _UxGT("Err: T Mínima"); LSTR MSG_HEATING = _UxGT("Aquecendo..."); diff --git a/Marlin/src/lcd/language/language_pt_br.h b/Marlin/src/lcd/language/language_pt_br.h index 14b057d98021..30459454b786 100644 --- a/Marlin/src/lcd/language/language_pt_br.h +++ b/Marlin/src/lcd/language/language_pt_br.h @@ -349,11 +349,9 @@ namespace LanguageNarrow_pt_br { LSTR MSG_BABYSTEP_N = _UxGT("Passinho @"); LSTR MSG_BABYSTEP_TOTAL = _UxGT("Total"); LSTR MSG_ENDSTOP_ABORT = _UxGT("Abortar Fim de Curso"); - LSTR MSG_HEATING_FAILED_LCD = _UxGT("Aquecimento falhou"); + LSTR MSG_ERR_HEATING_FAILED = _UxGT("Aquecimento falhou"); LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("Erro:Temp Redundante"); - LSTR MSG_THERMAL_RUNAWAY = _UxGT("ESCAPE TÉRMICO"); - LSTR MSG_THERMAL_RUNAWAY_BED = _UxGT("ESCAPE TÉRMICO MESA"); - LSTR MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("ESCAPE TÉRMICO CAMARA"); + LSTR MSG_ERR_THERMAL_RUNAWAY = _UxGT("ESCAPE TÉRMICO"); LSTR MSG_ERR_MAXTEMP = _UxGT("Erro:Temp Máxima"); LSTR MSG_ERR_MINTEMP = _UxGT("Erro:Temp Mínima"); LSTR MSG_HALTED = _UxGT("IMPRESSORA PAROU"); diff --git a/Marlin/src/lcd/language/language_ro.h b/Marlin/src/lcd/language/language_ro.h index 579c7eb22467..a2a915dd77c7 100644 --- a/Marlin/src/lcd/language/language_ro.h +++ b/Marlin/src/lcd/language/language_ro.h @@ -428,11 +428,9 @@ namespace LanguageNarrow_ro { LSTR MSG_BABYSTEP_N = _UxGT("Babystep @"); LSTR MSG_BABYSTEP_TOTAL = _UxGT("Total"); LSTR MSG_ENDSTOP_ABORT = _UxGT("Endstop Abort"); - LSTR MSG_HEATING_FAILED_LCD = _UxGT("Heating Failed"); + LSTR MSG_ERR_HEATING_FAILED = _UxGT("Heating Failed"); LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("Err: REDUNDANT TEMP"); - LSTR MSG_THERMAL_RUNAWAY = _UxGT("THERMAL RUNAWAY"); - LSTR MSG_THERMAL_RUNAWAY_BED = _UxGT("BED THERMAL RUNAWAY"); - LSTR MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("CHAMBER T. RUNAWAY"); + LSTR MSG_ERR_THERMAL_RUNAWAY = _UxGT("THERMAL RUNAWAY"); LSTR MSG_ERR_MAXTEMP = _UxGT("Err: MAXTEMP"); LSTR MSG_ERR_MINTEMP = _UxGT("Err: MINTEMP"); LSTR MSG_HALTED = _UxGT("PRINTER HALTED"); diff --git a/Marlin/src/lcd/language/language_ru.h b/Marlin/src/lcd/language/language_ru.h index 46bace2ad96b..789af09ab5d2 100644 --- a/Marlin/src/lcd/language/language_ru.h +++ b/Marlin/src/lcd/language/language_ru.h @@ -484,12 +484,9 @@ namespace LanguageNarrow_ru { LSTR MSG_BABYSTEP_N = _UxGT("Микрошаг @"); LSTR MSG_BABYSTEP_TOTAL = _UxGT("Суммарно"); LSTR MSG_ENDSTOP_ABORT = _UxGT("Сработал концевик"); - LSTR MSG_HEATING_FAILED_LCD = _UxGT("Разогрев не удался"); - LSTR MSG_THERMAL_RUNAWAY = _UxGT("УТЕЧКА ТЕМПЕРАТУРЫ"); - LSTR MSG_THERMAL_RUNAWAY_BED = _UxGT("УТЕЧКА ТЕМП. СТОЛА"); - LSTR MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("УТЕЧКА ТЕМП. КАМЕРЫ"); - LSTR MSG_THERMAL_RUNAWAY_COOLER = _UxGT("УТЕЧКА ТЕМП. КУЛЕРА"); - LSTR MSG_COOLING_FAILED = _UxGT("НЕ УДАЛОСЬ ОХЛАДИТЬ"); + LSTR MSG_ERR_HEATING_FAILED = _UxGT("Разогрев не удался"); + LSTR MSG_ERR_THERMAL_RUNAWAY = _UxGT("УТЕЧКА ТЕМПЕРАТУРЫ"); + LSTR MSG_ERR_COOLING_FAILED = _UxGT("НЕ УДАЛОСЬ ОХЛАДИТЬ"); LSTR MSG_ERR_MAXTEMP = _UxGT("Ошибка: Т макс."); LSTR MSG_ERR_MINTEMP = _UxGT("Ошибка: Т мин."); LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("Ошибка: Т контр."); @@ -784,7 +781,7 @@ namespace LanguageNarrow_ru { LSTR MSG_ZPROBE_MARGIN = _UxGT("Отступы зонда"); LSTR MSG_Z_FEED_RATE = _UxGT("Скорость Z"); LSTR MSG_ENABLE_HS_MODE = _UxGT("Включить режим ВС"); - LSTR MSG_TEMP_MALFUNCTION = _UxGT("СБОЙ ТЕМПЕРАТУРЫ"); + LSTR MSG_ERR_TEMP_MALFUNCTION = _UxGT("СБОЙ ТЕМПЕРАТУРЫ"); LSTR MSG_PLEASE_WAIT = _UxGT("Ожидайте..."); LSTR MSG_PREHEATING = _UxGT("Нагреваю..."); LSTR MSG_DELTA_CALIBRATION_IN_PROGRESS = _UxGT("Делаю дельта-калибровку"); diff --git a/Marlin/src/lcd/language/language_sk.h b/Marlin/src/lcd/language/language_sk.h index 290b0cdcde29..fa353523072b 100644 --- a/Marlin/src/lcd/language/language_sk.h +++ b/Marlin/src/lcd/language/language_sk.h @@ -588,14 +588,11 @@ namespace LanguageNarrow_sk { LSTR MSG_BABYSTEP_N = _UxGT("Babystep @"); LSTR MSG_BABYSTEP_TOTAL = _UxGT("Celkom"); LSTR MSG_ENDSTOP_ABORT = _UxGT("Zastavenie Endstop"); - LSTR MSG_HEATING_FAILED_LCD = _UxGT("Chyba ohrevu"); + LSTR MSG_ERR_HEATING_FAILED = _UxGT("Chyba ohrevu"); LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("Chyba: REDUND. TEP."); - LSTR MSG_THERMAL_RUNAWAY = _UxGT("TEPLOTNÝ SKOK"); - LSTR MSG_TEMP_MALFUNCTION = _UxGT("TEPLOTNÁ PORUCHA"); - LSTR MSG_THERMAL_RUNAWAY_BED = _UxGT("TEPLOTNÝ SKOK PODL."); - LSTR MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("TEPLOTNÝ SKOK KOMO."); - LSTR MSG_THERMAL_RUNAWAY_COOLER = _UxGT("TEPLOTNÝ SKOK CHLAD."); - LSTR MSG_COOLING_FAILED = _UxGT("Ochladz. zlyhalo"); + LSTR MSG_ERR_THERMAL_RUNAWAY = _UxGT("TEPLOTNÝ SKOK"); + LSTR MSG_ERR_TEMP_MALFUNCTION = _UxGT("TEPLOTNÁ PORUCHA"); + LSTR MSG_ERR_COOLING_FAILED = _UxGT("Ochladz. zlyhalo"); LSTR MSG_ERR_MAXTEMP = _UxGT("Chyba: MAXTEMP"); LSTR MSG_ERR_MINTEMP = _UxGT("Chyba: MINTEMP"); LSTR MSG_HALTED = _UxGT("TLAČIAREŇ ZASTAVENÁ"); diff --git a/Marlin/src/lcd/language/language_sv.h b/Marlin/src/lcd/language/language_sv.h index ea3c1c61dd21..9820882b8daa 100644 --- a/Marlin/src/lcd/language/language_sv.h +++ b/Marlin/src/lcd/language/language_sv.h @@ -462,11 +462,9 @@ namespace LanguageNarrow_sv { LSTR MSG_BABYSTEP_N = _UxGT("Småsteg @"); LSTR MSG_BABYSTEP_TOTAL = _UxGT("Total"); LSTR MSG_ENDSTOP_ABORT = _UxGT("Slutstopp Avbrott"); - LSTR MSG_HEATING_FAILED_LCD = _UxGT("Värma Misslyckad"); + LSTR MSG_ERR_HEATING_FAILED = _UxGT("Värma Misslyckad"); LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("Fel: REDUNDANT TEMP"); - LSTR MSG_THERMAL_RUNAWAY = _UxGT("TERMISK ÖVERDRIFT"); - LSTR MSG_THERMAL_RUNAWAY_BED = _UxGT("BÄDD TERMISK ÖVERDRIFT"); - LSTR MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("KAMMARE T. ÖVERDRIFT"); + LSTR MSG_ERR_THERMAL_RUNAWAY = _UxGT("TERMISK ÖVERDRIFT"); LSTR MSG_ERR_MAXTEMP = _UxGT("Fel: MAXTEMP"); LSTR MSG_ERR_MINTEMP = _UxGT("Fel: MINTEMP"); LSTR MSG_HALTED = _UxGT("Utskrift stoppad"); diff --git a/Marlin/src/lcd/language/language_tr.h b/Marlin/src/lcd/language/language_tr.h index a6a75a2acef6..e912885ee894 100644 --- a/Marlin/src/lcd/language/language_tr.h +++ b/Marlin/src/lcd/language/language_tr.h @@ -566,14 +566,11 @@ namespace LanguageNarrow_tr { LSTR MSG_BABYSTEP_N = _UxGT("Miniadım @"); LSTR MSG_BABYSTEP_TOTAL = _UxGT("Toplam"); LSTR MSG_ENDSTOP_ABORT = _UxGT("Endstop iptal"); - LSTR MSG_HEATING_FAILED_LCD = _UxGT("Isınma başarısız"); + LSTR MSG_ERR_HEATING_FAILED = _UxGT("Isınma başarısız"); LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("Hata: ISI AŞIMI"); - LSTR MSG_THERMAL_RUNAWAY = _UxGT("ISI SORUNU"); - LSTR MSG_TEMP_MALFUNCTION = _UxGT("SICAKLIK ARIZASI"); - LSTR MSG_THERMAL_RUNAWAY_BED = _UxGT("TABLA ISI SORUNU"); - LSTR MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("KABİN ISI SORUNU"); - LSTR MSG_THERMAL_RUNAWAY_COOLER = _UxGT("Soğutucu Isı Sorunu"); - LSTR MSG_COOLING_FAILED = _UxGT("Soğutma Başarısız"); + LSTR MSG_ERR_THERMAL_RUNAWAY = _UxGT("ISI SORUNU"); + LSTR MSG_ERR_TEMP_MALFUNCTION = _UxGT("SICAKLIK ARIZASI"); + LSTR MSG_ERR_COOLING_FAILED = _UxGT("Soğutma Başarısız"); LSTR MSG_ERR_MAXTEMP = _UxGT("Hata: MAX.SICAKLIK"); LSTR MSG_ERR_MINTEMP = _UxGT("Hata: MIN.SICAKLIK"); LSTR MSG_HALTED = _UxGT("YAZICI DURDURULDU"); diff --git a/Marlin/src/lcd/language/language_uk.h b/Marlin/src/lcd/language/language_uk.h index 78e91b0484e3..626eb8979eb5 100644 --- a/Marlin/src/lcd/language/language_uk.h +++ b/Marlin/src/lcd/language/language_uk.h @@ -490,13 +490,10 @@ namespace LanguageNarrow_uk { LSTR MSG_BABYSTEP_N = _UxGT("Мікрокрок @"); LSTR MSG_BABYSTEP_TOTAL = _UxGT("Сумарно"); LSTR MSG_ENDSTOP_ABORT = _UxGT("Кінцевик спрацював"); - LSTR MSG_HEATING_FAILED_LCD = _UxGT("Збій нагріву"); + LSTR MSG_ERR_HEATING_FAILED = _UxGT("Збій нагріву"); LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("ЗАВИЩЕНА Т") LCD_STR_DEGREE; - LSTR MSG_THERMAL_RUNAWAY = _UxGT("ВИТІК ТЕПЛА"); - LSTR MSG_THERMAL_RUNAWAY_BED = _UxGT("ВИТІК ТЕПЛА СТОЛУ"); - LSTR MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("ВИТІК ТЕПЛА КАМЕРИ"); - LSTR MSG_THERMAL_RUNAWAY_COOLER = _UxGT("ВИТІК ОХОЛОДЖЕННЯ"); - LSTR MSG_COOLING_FAILED = _UxGT("ОХОЛОДЖ. НЕ ВДАЛОСЬ"); + LSTR MSG_ERR_THERMAL_RUNAWAY = _UxGT("ВИТІК ТЕПЛА"); + LSTR MSG_ERR_COOLING_FAILED = _UxGT("ОХОЛОДЖ. НЕ ВДАЛОСЬ"); LSTR MSG_ERR_MAXTEMP = _UxGT("МАКСИМАЛЬНА Т") LCD_STR_DEGREE; LSTR MSG_ERR_MINTEMP = _UxGT("МІНІМАЛЬНА Т") LCD_STR_DEGREE; LSTR MSG_HALTED = _UxGT("ПРИНТЕР ЗУПИНЕНО"); @@ -754,7 +751,7 @@ namespace LanguageWide_uk { LSTR MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("Швидкість втягув."); LSTR MSG_SINGLENOZZLE_FAN_SPEED = _UxGT("Оберти вентилятора"); LSTR MSG_SINGLENOZZLE_FAN_TIME = _UxGT("Час вентилятора"); - LSTR MSG_COOLING_FAILED = _UxGT("ОХОЛОДЖЕННЯ НЕ ВДАЛОСЬ"); + LSTR MSG_ERR_COOLING_FAILED = _UxGT("ОХОЛОДЖЕННЯ НЕ ВДАЛОСЬ"); LSTR MSG_BED_COOLING = _UxGT("Охолодження столу..."); LSTR MSG_PROBE_COOLING = _UxGT("Охолодження зонду..."); LSTR MSG_CHAMBER_COOLING = _UxGT("Охолодження камери..."); diff --git a/Marlin/src/lcd/language/language_vi.h b/Marlin/src/lcd/language/language_vi.h index d37358219d5d..038c6864bc17 100644 --- a/Marlin/src/lcd/language/language_vi.h +++ b/Marlin/src/lcd/language/language_vi.h @@ -331,10 +331,9 @@ namespace LanguageNarrow_vi { LSTR MSG_BABYSTEP_Z = _UxGT("Nhít Z"); LSTR MSG_BABYSTEP_N = _UxGT("Nhít @"); LSTR MSG_ENDSTOP_ABORT = _UxGT("Hủy bỏ công tắc"); // Endstop abort - LSTR MSG_HEATING_FAILED_LCD = _UxGT("Sưởi đầu phun không thành công"); // Heating failed + LSTR MSG_ERR_HEATING_FAILED = _UxGT("Sưởi đầu phun không thành công"); // Heating failed LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("Điều sai: nhiệt độ dư"); // Err: REDUNDANT TEMP - LSTR MSG_THERMAL_RUNAWAY = _UxGT("Vấn đề nhiệt"); // THERMAL RUNAWAY | problem - LSTR MSG_THERMAL_RUNAWAY_BED = _UxGT("Vấn đề nhiệt bàn"); // BED THERMAL RUNAWAY + LSTR MSG_ERR_THERMAL_RUNAWAY = _UxGT("Vấn đề nhiệt"); // THERMAL RUNAWAY | problem LSTR MSG_ERR_MAXTEMP = _UxGT("Điều sai: nhiệt độ tối đa"); // Err: MAXTEMP LSTR MSG_ERR_MINTEMP = _UxGT("Điều sai: nhiệt độ tối thiểu"); // Err: MINTEMP LSTR MSG_HALTED = _UxGT("MÁY IN ĐÃ DỪNG LẠI"); // PRINTER HALTED diff --git a/Marlin/src/lcd/language/language_zh_CN.h b/Marlin/src/lcd/language/language_zh_CN.h index 7f4d5af37456..7432044cdb50 100644 --- a/Marlin/src/lcd/language/language_zh_CN.h +++ b/Marlin/src/lcd/language/language_zh_CN.h @@ -427,11 +427,9 @@ namespace LanguageNarrow_zh_CN { LSTR MSG_BABYSTEP_Z = _UxGT("微量调整Z轴"); // "Babystep Z" LSTR MSG_BABYSTEP_TOTAL = _UxGT("总计"); LSTR MSG_ENDSTOP_ABORT = _UxGT("挡块终止"); // "Endstop abort" - LSTR MSG_HEATING_FAILED_LCD = _UxGT("加热失败"); // "Heating failed" + LSTR MSG_ERR_HEATING_FAILED = _UxGT("加热失败"); // "Heating failed" LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("错误:冗余温度"); // "Err: REDUNDANT TEMP" - LSTR MSG_THERMAL_RUNAWAY = _UxGT("温控失控"); // "THERMAL RUNAWAY" - LSTR MSG_THERMAL_RUNAWAY_BED = _UxGT("热床热量失控"); - LSTR MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("机箱热量失控"); + LSTR MSG_ERR_THERMAL_RUNAWAY = _UxGT("温控失控"); // "THERMAL RUNAWAY" LSTR MSG_ERR_MAXTEMP = _UxGT("错误:最高温度"); // "Err: MAXTEMP" LSTR MSG_ERR_MINTEMP = _UxGT("错误:最低温度"); // "Err: MINTEMP" LSTR MSG_HALTED = _UxGT("打印停机"); // "PRINTER HALTED" diff --git a/Marlin/src/lcd/language/language_zh_TW.h b/Marlin/src/lcd/language/language_zh_TW.h index b22a3cd1ac92..9106487b1459 100644 --- a/Marlin/src/lcd/language/language_zh_TW.h +++ b/Marlin/src/lcd/language/language_zh_TW.h @@ -377,11 +377,9 @@ namespace LanguageNarrow_zh_TW { LSTR MSG_BABYSTEP_Z = _UxGT("微量調整Z軸"); // "Babystep Z" LSTR MSG_BABYSTEP_TOTAL = _UxGT("總計"); // "Total" LSTR MSG_ENDSTOP_ABORT = _UxGT("擋塊終止"); // "Endstop abort" - LSTR MSG_HEATING_FAILED_LCD = _UxGT("加熱失敗"); // "Heating failed" + LSTR MSG_ERR_HEATING_FAILED = _UxGT("加熱失敗"); // "Heating failed" LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("錯誤:冗餘溫度"); // "Err: REDUNDANT TEMP" - LSTR MSG_THERMAL_RUNAWAY = _UxGT("溫度失控"); // "THERMAL RUNAWAY" - LSTR MSG_THERMAL_RUNAWAY_BED = _UxGT("熱床溫度失控"); // "BED THERMAL RUNAWAY" - LSTR MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("機箱溫度失控"); // "CHAMBER T. RUNAWAY" + LSTR MSG_ERR_THERMAL_RUNAWAY = _UxGT("溫度失控"); // "THERMAL RUNAWAY" LSTR MSG_ERR_MAXTEMP = _UxGT("錯誤:最高溫度"); // "Err: MAXTEMP" LSTR MSG_ERR_MINTEMP = _UxGT("錯誤:最低溫度"); // "Err: MINTEMP" LSTR MSG_HALTED = _UxGT("印表機停機"); // "PRINTER HALTED" diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index 6139ebe12004..b2e2915d17d0 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -207,32 +207,8 @@ Temperature thermalManager; PGMSTR(str_t_thermal_runaway, STR_T_THERMAL_RUNAWAY); -PGMSTR(str_t_temp_malfunction, STR_T_MALFUNCTION); PGMSTR(str_t_heating_failed, STR_T_HEATING_FAILED); -/** - * Macros to include the heater id in temp errors. The compiler's dead-code - * elimination should (hopefully) optimize out the unused strings. - */ - -#if HAS_HEATED_BED - #define _BED_FSTR(h) (h) == H_BED ? GET_TEXT_F(MSG_BED) : -#else - #define _BED_FSTR(h) -#endif -#if HAS_HEATED_CHAMBER - #define _CHAMBER_FSTR(h) (h) == H_CHAMBER ? GET_TEXT_F(MSG_CHAMBER) : -#else - #define _CHAMBER_FSTR(h) -#endif -#if HAS_COOLER - #define _COOLER_FSTR(h) (h) == H_COOLER ? GET_TEXT_F(MSG_COOLER) : -#else - #define _COOLER_FSTR(h) -#endif -#define _E_FSTR(h,N) ((HOTENDS) > N && (h) == N) ? F(STR_E##N) : -#define HEATER_FSTR(h) _BED_FSTR(h) _CHAMBER_FSTR(h) _COOLER_FSTR(h) _E_FSTR(h,1) _E_FSTR(h,2) _E_FSTR(h,3) _E_FSTR(h,4) _E_FSTR(h,5) _E_FSTR(h,6) _E_FSTR(h,7) F(STR_E0) - // // Initialize MAX TC objects/SPI // @@ -839,10 +815,10 @@ volatile bool Temperature::raw_temps_ready = false; if (current_temp > watch_temp_target) heated = true; // - Flag if target temperature reached } else if (ELAPSED(ms, temp_change_ms)) // Watch timer expired - _TEMP_ERROR(heater_id, FPSTR(str_t_heating_failed), MSG_HEATING_FAILED_LCD, current_temp); + _TEMP_ERROR(heater_id, FPSTR(str_t_heating_failed), MSG_ERR_HEATING_FAILED, current_temp); } else if (current_temp < target - (MAX_OVERSHOOT_PID_AUTOTUNE)) // Heated, then temperature fell too far? - _TEMP_ERROR(heater_id, FPSTR(str_t_thermal_runaway), MSG_THERMAL_RUNAWAY, current_temp); + _TEMP_ERROR(heater_id, FPSTR(str_t_thermal_runaway), MSG_ERR_THERMAL_RUNAWAY, current_temp); } #endif } // every 2 seconds @@ -1464,6 +1440,15 @@ inline void loud_kill(FSTR_P const lcd_msg, const heater_id_t heater_id) { planner.synchronize(); } #endif + + #define _FSTR_BED(h) TERN(HAS_HEATED_BED, (h) == H_BED ? GET_TEXT_F(MSG_BED) :,) + #define _FSTR_CHAMBER(h) TERN(HAS_HEATED_CHAMBER, (h) == H_CHAMBER ? GET_TEXT_F(MSG_CHAMBER) :,) + #define _FSTR_COOLER(h) TERN(HAS_COOLER, (h) == H_COOLER ? GET_TEXT_F(MSG_COOLER) :,) + #define _FSTR_E(h,N) TERN(HAS_HOTEND, ((h) == N && (HOTENDS) > N) ? F(STR_E##N) :,) + #define HEATER_FSTR(h) _FSTR_BED(h) _FSTR_CHAMBER(h) _FSTR_COOLER(h) \ + _FSTR_E(h,1) _FSTR_E(h,2) _FSTR_E(h,3) _FSTR_E(h,4) \ + _FSTR_E(h,5) _FSTR_E(h,6) _FSTR_E(h,7) F(STR_E0) + kill(lcd_msg, HEATER_FSTR(heater_id)); } @@ -1765,7 +1750,7 @@ void Temperature::mintemp_error(const heater_id_t heater_id OPTARG(ERR_INCLUDE_T start_watching_hotend(e); // If temp reached, turn off elapsed check else { TERN_(HAS_DWIN_E3V2_BASIC, dwinPopupTemperature(0)); - _TEMP_ERROR(e, FPSTR(str_t_heating_failed), MSG_HEATING_FAILED_LCD, temp); + _TEMP_ERROR(e, FPSTR(str_t_heating_failed), MSG_ERR_HEATING_FAILED, temp); } } #endif @@ -1795,7 +1780,7 @@ void Temperature::mintemp_error(const heater_id_t heater_id OPTARG(ERR_INCLUDE_T start_watching_bed(); // If temp reached, turn off elapsed check else { TERN_(HAS_DWIN_E3V2_BASIC, dwinPopupTemperature(0)); - _TEMP_ERROR(H_BED, FPSTR(str_t_heating_failed), MSG_HEATING_FAILED_LCD, deg); + _TEMP_ERROR(H_BED, FPSTR(str_t_heating_failed), MSG_ERR_HEATING_FAILED, deg); } } } @@ -1890,7 +1875,7 @@ void Temperature::mintemp_error(const heater_id_t heater_id OPTARG(ERR_INCLUDE_T if (watch_chamber.check(deg)) // Increased enough? Error below. start_watching_chamber(); // If temp reached, turn off elapsed check. else - _TEMP_ERROR(H_CHAMBER, FPSTR(str_t_heating_failed), MSG_HEATING_FAILED_LCD, deg); + _TEMP_ERROR(H_CHAMBER, FPSTR(str_t_heating_failed), MSG_ERR_HEATING_FAILED, deg); } } #endif @@ -2019,7 +2004,7 @@ void Temperature::mintemp_error(const heater_id_t heater_id OPTARG(ERR_INCLUDE_T if (watch_cooler.elapsed(ms)) { // Time to check the cooler? const auto deg = degCooler(); if (deg > watch_cooler.target) // Failed to decrease enough? - _TEMP_ERROR(H_COOLER, GET_TEXT_F(MSG_COOLING_FAILED), MSG_COOLING_FAILED, deg); + _TEMP_ERROR(H_COOLER, GET_EN_TEXT_F(MSG_ERR_COOLING_FAILED), MSG_ERR_COOLING_FAILED, deg); else start_watching_cooler(); // Start again if the target is still far off } @@ -3221,13 +3206,13 @@ void Temperature::init() { case TRRunaway: TERN_(HAS_DWIN_E3V2_BASIC, dwinPopupTemperature(0)); - _TEMP_ERROR(heater_id, FPSTR(str_t_thermal_runaway), MSG_THERMAL_RUNAWAY, current); + _TEMP_ERROR(heater_id, FPSTR(str_t_thermal_runaway), MSG_ERR_THERMAL_RUNAWAY, current); break; #if ENABLED(THERMAL_PROTECTION_VARIANCE_MONITOR) case TRMalfunction: TERN_(HAS_DWIN_E3V2_BASIC, dwinPopupTemperature(0)); - _TEMP_ERROR(heater_id, FPSTR(str_t_temp_malfunction), MSG_TEMP_MALFUNCTION, current); + _TEMP_ERROR(heater_id, F(STR_T_THERMAL_MALFUNCTION), MSG_ERR_TEMP_MALFUNCTION, current); break; #endif } From fb74caebb5d9e17c5b6c369cbc8965130e1ec93f Mon Sep 17 00:00:00 2001 From: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Tue, 22 Aug 2023 16:40:59 -0700 Subject: [PATCH 14/25] =?UTF-8?q?=F0=9F=94=A7=20Fix=20Linear=20Leveling=20?= =?UTF-8?q?grid=20size=20sanity=20check=20(#26199)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/inc/SanityCheck.h | 36 ++++++++---------------------------- 1 file changed, 8 insertions(+), 28 deletions(-) diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index cfc3b20cd501..c68f85720e9a 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -1504,46 +1504,26 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L * Bed Leveling Requirements */ -#if ENABLED(AUTO_BED_LEVELING_UBL) - - /** - * Unified Bed Leveling - */ - - #if IS_SCARA - #error "AUTO_BED_LEVELING_UBL does not yet support SCARA printers." - #elif ENABLED(POLAR) +#if IS_SCARA && ANY(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) + #error "SCARA machines can only use AUTO_BED_LEVELING_BILINEAR or MESH_BED_LEVELING leveling." +#elif ENABLED(AUTO_BED_LEVELING_LINEAR) && !(WITHIN(GRID_MAX_POINTS_X, 2, 255) && WITHIN(GRID_MAX_POINTS_Y, 2, 255)) + #error "GRID_MAX_POINTS_[XY] must be between 2 and 255 with AUTO_BED_LEVELING_LINEAR." +#elif ENABLED(AUTO_BED_LEVELING_BILINEAR) && !(WITHIN(GRID_MAX_POINTS_X, 3, 255) && WITHIN(GRID_MAX_POINTS_Y, 3, 255)) + #error "GRID_MAX_POINTS_[XY] must be between 3 and 255 with AUTO_BED_LEVELING_BILINEAR." +#elif ENABLED(AUTO_BED_LEVELING_UBL) + #if ENABLED(POLAR) #error "AUTO_BED_LEVELING_UBL does not yet support POLAR printers." #elif DISABLED(EEPROM_SETTINGS) #error "AUTO_BED_LEVELING_UBL requires EEPROM_SETTINGS." #elif !WITHIN(GRID_MAX_POINTS_X, 3, 255) || !WITHIN(GRID_MAX_POINTS_Y, 3, 255) #error "GRID_MAX_POINTS_[XY] must be between 3 and 255." #endif - -#elif HAS_ABL_NOT_UBL - - /** - * Auto Bed Leveling - */ - - /** - * Delta and SCARA have limited bed leveling options - */ - #if IS_SCARA && DISABLED(AUTO_BED_LEVELING_BILINEAR) - #error "SCARA machines can only use the AUTO_BED_LEVELING_BILINEAR leveling option." - #elif ABL_USES_GRID && !(WITHIN(GRID_MAX_POINTS_X, 3, 255) && WITHIN(GRID_MAX_POINTS_Y, 3, 255)) - #error "GRID_MAX_POINTS_[XY] must be between 3 and 255." - #endif - #elif ENABLED(MESH_BED_LEVELING) - - // Mesh Bed Leveling #if ENABLED(DELTA) #error "MESH_BED_LEVELING is not compatible with DELTA printers." #elif (GRID_MAX_POINTS_X) > 9 || (GRID_MAX_POINTS_Y) > 9 #error "GRID_MAX_POINTS_X and GRID_MAX_POINTS_Y must be less than 10 for MBL." #endif - #endif #define _POINT_COUNT (defined(PROBE_PT_1) + defined(PROBE_PT_2) + defined(PROBE_PT_3)) From ab8af7fa9cb7007ac710f62137e91f73446f8b60 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 22 Aug 2023 19:16:35 -0500 Subject: [PATCH 15/25] =?UTF-8?q?=F0=9F=94=A7=20Allow=20arbitrary=20BLOCK?= =?UTF-8?q?=5FBUFFER=5FSIZE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration_adv.h | 1 - Marlin/src/feature/max7219.cpp | 2 +- Marlin/src/module/planner.h | 10 +++++++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index da9f3a66c688..b95b0c49e0c4 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -2526,7 +2526,6 @@ // @section motion // The number of linear moves that can be in the planner at once. -// The value of BLOCK_BUFFER_SIZE must be a power of 2 (e.g., 8, 16, 32) #if ALL(HAS_MEDIA, DIRECT_STEPPING) #define BLOCK_BUFFER_SIZE 8 #elif HAS_MEDIA diff --git a/Marlin/src/feature/max7219.cpp b/Marlin/src/feature/max7219.cpp index 991f3e79db95..e27f6eb974da 100644 --- a/Marlin/src/feature/max7219.cpp +++ b/Marlin/src/feature/max7219.cpp @@ -706,7 +706,7 @@ void Max7219::idle_tasks() { #ifdef MAX7219_DEBUG_PLANNER_QUEUE static int16_t last_depth = 0; - const int16_t current_depth = (head - tail + BLOCK_BUFFER_SIZE) & (BLOCK_BUFFER_SIZE - 1) & 0xF; + const int16_t current_depth = BLOCK_MOD(head - tail + (BLOCK_BUFFER_SIZE)) & 0xF; if (current_depth != last_depth) { quantity16(MAX7219_DEBUG_PLANNER_QUEUE, last_depth, current_depth, &row_change_mask); last_depth = current_depth; diff --git a/Marlin/src/module/planner.h b/Marlin/src/module/planner.h index c45ff6ad1d1d..238657be7b36 100644 --- a/Marlin/src/module/planner.h +++ b/Marlin/src/module/planner.h @@ -310,7 +310,11 @@ typedef struct PlannerBlock { #define HAS_POSITION_FLOAT 1 #endif -#define BLOCK_MOD(n) ((n)&(BLOCK_BUFFER_SIZE-1)) +#if IS_POWER_OF_2(BLOCK_BUFFER_SIZE) + #define BLOCK_MOD(n) ((n)&((BLOCK_BUFFER_SIZE)-1)) +#else + #define BLOCK_MOD(n) ((n)%(BLOCK_BUFFER_SIZE)) +#endif #if ENABLED(LASER_FEATURE) typedef struct { @@ -366,7 +370,7 @@ typedef struct { #endif #if ENABLED(DISABLE_OTHER_EXTRUDERS) - typedef uvalue_t(BLOCK_BUFFER_SIZE * 2) last_move_t; + typedef uvalue_t((BLOCK_BUFFER_SIZE) * 2) last_move_t; #endif #if ENABLED(ARC_SUPPORT) @@ -780,7 +784,7 @@ class Planner { FORCE_INLINE static bool is_full() { return block_buffer_tail == next_block_index(block_buffer_head); } // Get count of movement slots free - FORCE_INLINE static uint8_t moves_free() { return BLOCK_BUFFER_SIZE - 1 - movesplanned(); } + FORCE_INLINE static uint8_t moves_free() { return (BLOCK_BUFFER_SIZE) - 1 - movesplanned(); } /** * Planner::get_next_free_block From edc737954653cd174c51cced37917ff4df2867e1 Mon Sep 17 00:00:00 2001 From: Anson Liu Date: Tue, 22 Aug 2023 20:21:41 -0400 Subject: [PATCH 16/25] =?UTF-8?q?=E2=9C=A8=20G-code=20'T'=20report=20curre?= =?UTF-8?q?nt=20tool=20(#26151)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- Marlin/src/gcode/control/T.cpp | 12 ++++++++++-- Marlin/src/gcode/parser.cpp | 8 +++++++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/Marlin/src/gcode/control/T.cpp b/Marlin/src/gcode/control/T.cpp index 5e1579ec123a..c5ebbcf50e7f 100644 --- a/Marlin/src/gcode/control/T.cpp +++ b/Marlin/src/gcode/control/T.cpp @@ -41,13 +41,21 @@ * S1 Don't move the tool in XY after change * * For PRUSA_MMU2(S) and EXTENDABLE_EMU_MMU2(S) - * T[n] Gcode to extrude at least 38.10 mm at feedrate 19.02 mm/s must follow immediately to load to extruder wheels. - * T? Gcode to extrude shouldn't have to follow. Load to extruder wheels is done automatically. + * T[n] G-code to extrude at least 38.10 mm at feedrate 19.02 mm/s must follow immediately to load to extruder wheels. + * T? G-code to extrude shouldn't have to follow. Load to extruder wheels is done automatically. * Tx Same as T?, but nozzle doesn't have to be preheated. Tc requires a preheated nozzle to finish filament load. * Tc Load to nozzle after filament was prepared by Tc and nozzle is already heated. */ void GcodeSuite::T(const int8_t tool_index) { + #if HAS_MULTI_EXTRUDER + // For 'T' with no parameter report the current tool. + if (parser.string_arg && *parser.string_arg == '*') { + SERIAL_ECHOLNPGM(STR_ACTIVE_EXTRUDER, active_extruder); + return; + } + #endif + DEBUG_SECTION(log_T, "T", DEBUGGING(LEVELING)); if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("...(", tool_index, ")"); diff --git a/Marlin/src/gcode/parser.cpp b/Marlin/src/gcode/parser.cpp index ccd6b4111f10..f2835f58918a 100644 --- a/Marlin/src/gcode/parser.cpp +++ b/Marlin/src/gcode/parser.cpp @@ -189,7 +189,13 @@ void GCodeParser::parse(char *p) { #endif // Bail if there's no command code number - if (!TERN(SIGNED_CODENUM, NUMERIC_SIGNED(*p), NUMERIC(*p))) return; + if (!TERN(SIGNED_CODENUM, NUMERIC_SIGNED(*p), NUMERIC(*p))) { + if (TERN0(HAS_MULTI_EXTRUDER, letter == 'T')) { + p[0] = '*'; p[1] = '\0'; string_arg = p; // Convert 'T' alone into 'T*' + command_letter = letter; + } + return; + } // Save the command letter at this point // A '?' signifies an unknown command From f6de698fc8bf284c76a2ae09b1c7b5041c74d495 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Wed, 23 Aug 2023 00:25:27 +0000 Subject: [PATCH 17/25] [cron] Bump distribution date (2023-08-23) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index bd9b9ea7e577..464217907bb8 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2023-08-22" +//#define STRING_DISTRIBUTION_DATE "2023-08-23" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 6d1966575e9f..ea3f7c984bcf 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2023-08-22" + #define STRING_DISTRIBUTION_DATE "2023-08-23" #endif /** From 86be9a85d0f819fc0f3f6cfe743906ac3309f366 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 23 Aug 2023 13:44:40 -0500 Subject: [PATCH 18/25] =?UTF-8?q?=F0=9F=93=9D=20Thermistor=20info=20update?= =?UTF-8?q?s=20(#26202)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration.h | 2 + Marlin/src/lcd/menu/menu_info.cpp | 79 +++------- Marlin/src/lcd/thermistornames.h | 56 ++++--- Marlin/src/module/thermistor/thermistors.h | 174 ++++++++++++--------- 4 files changed, 161 insertions(+), 150 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 119f81415a30..c00e59b5cd5d 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -466,6 +466,7 @@ * 13 : 100kΩ Hisens up to 300°C - for "Simple ONE" & "All In ONE" hotend - beta 3950, 1% * 14 : 100kΩ (R25), 4092K (beta25), 4.7kΩ pull-up, bed thermistor as used in Ender-5 S1 * 15 : 100kΩ Calibrated for JGAurora A5 hotend + * 17 : 100kΩ Dagoma NTC white thermistor * 18 : 200kΩ ATC Semitec 204GT-2 Dagoma.Fr - MKS_Base_DKU001327 * 22 : 100kΩ GTM32 Pro vB - hotend - 4.7kΩ pullup to 3.3V and 220Ω to analog input * 23 : 100kΩ GTM32 Pro vB - bed - 4.7kΩ pullup to 3.3v and 220Ω to analog input @@ -477,6 +478,7 @@ * 68 : PT100 Smplifier board from Dyze Design * 70 : 100kΩ bq Hephestos 2 * 75 : 100kΩ Generic Silicon Heat Pad with NTC100K MGB18-104F39050L32 + * 666 : 200kΩ Einstart S custom thermistor with 10k pullup. * 2000 : 100kΩ Ultimachine Rambo TDK NTCG104LH104KT1 NTC100K motherboard Thermistor * * ================================================================ diff --git a/Marlin/src/lcd/menu/menu_info.cpp b/Marlin/src/lcd/menu/menu_info.cpp index 59ed52e6f17b..874b7dbd59f6 100644 --- a/Marlin/src/lcd/menu/menu_info.cpp +++ b/Marlin/src/lcd/menu/menu_info.cpp @@ -100,113 +100,86 @@ void menu_info_thermistors() { START_SCREEN(); + #define THERM_ITEMS(LBL,HTR,WAT) \ + STATIC_ITEM_F(F(LBL ": " THERMISTOR_NAME), SS_INVERT); \ + PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(HTR##_MINTEMP), SS_FULL); \ + PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(HTR##_MAXTEMP), SS_FULL); \ + STATIC_ITEM(TERN(WAT, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_FULL) \ + #if HAS_EXTRUDERS #define THERMISTOR_ID TEMP_SENSOR_0 #include "../thermistornames.h" - STATIC_ITEM_F(F(STR_E0 ": " THERMISTOR_NAME), SS_INVERT); - PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(HEATER_0_MINTEMP), SS_FULL); - PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(HEATER_0_MAXTEMP), SS_FULL); - STATIC_ITEM(TERN(WATCH_HOTENDS, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_FULL); + #undef THERMISTOR_ID + THERM_ITEMS(STR_E0, HEATER_0, WATCH_HOTENDS); #endif #if TEMP_SENSOR_1 != 0 - #undef THERMISTOR_ID #define THERMISTOR_ID TEMP_SENSOR_1 #include "../thermistornames.h" - STATIC_ITEM_F(F(STR_E1 ": " THERMISTOR_NAME), SS_INVERT); - PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(HEATER_1_MINTEMP), SS_FULL); - PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(HEATER_1_MAXTEMP), SS_FULL); - STATIC_ITEM(TERN(WATCH_HOTENDS, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_FULL); + THERM_ITEMS(STR_E1, HEATER_1, WATCH_HOTENDS); #endif #if TEMP_SENSOR_2 != 0 - #undef THERMISTOR_ID #define THERMISTOR_ID TEMP_SENSOR_2 #include "../thermistornames.h" - STATIC_ITEM_F(F(STR_E2 ": " THERMISTOR_NAME), SS_INVERT); - PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(HEATER_2_MINTEMP), SS_FULL); - PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(HEATER_2_MAXTEMP), SS_FULL); - STATIC_ITEM(TERN(WATCH_HOTENDS, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_FULL); + #undef THERMISTOR_ID + THERM_ITEMS(STR_E2, HEATER_2, WATCH_HOTENDS); #endif #if TEMP_SENSOR_3 != 0 - #undef THERMISTOR_ID #define THERMISTOR_ID TEMP_SENSOR_3 #include "../thermistornames.h" - STATIC_ITEM_F(F(STR_E3 ": " THERMISTOR_NAME), SS_INVERT); - PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(HEATER_3_MINTEMP), SS_FULL); - PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(HEATER_3_MAXTEMP), SS_FULL); - STATIC_ITEM(TERN(WATCH_HOTENDS, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_FULL); + #undef THERMISTOR_ID + THERM_ITEMS(STR_E3, HEATER_3, WATCH_HOTENDS); #endif #if TEMP_SENSOR_4 != 0 - #undef THERMISTOR_ID #define THERMISTOR_ID TEMP_SENSOR_4 #include "../thermistornames.h" - STATIC_ITEM_F(F(STR_E4 ": " THERMISTOR_NAME), SS_INVERT); - PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(HEATER_4_MINTEMP), SS_FULL); - PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(HEATER_4_MAXTEMP), SS_FULL); - STATIC_ITEM(TERN(WATCH_HOTENDS, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_FULL); + #undef THERMISTOR_ID + THERM_ITEMS(STR_E4, HEATER_4, WATCH_HOTENDS); #endif #if TEMP_SENSOR_5 != 0 - #undef THERMISTOR_ID #define THERMISTOR_ID TEMP_SENSOR_5 #include "../thermistornames.h" - STATIC_ITEM_F(F(STR_E5 ": " THERMISTOR_NAME), SS_INVERT); - PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(HEATER_5_MINTEMP), SS_FULL); - PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(HEATER_5_MAXTEMP), SS_FULL); - STATIC_ITEM(TERN(WATCH_HOTENDS, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_FULL); + #undef THERMISTOR_ID + THERM_ITEMS(STR_E5, HEATER_5, WATCH_HOTENDS); #endif #if TEMP_SENSOR_6 != 0 - #undef THERMISTOR_ID #define THERMISTOR_ID TEMP_SENSOR_6 #include "../thermistornames.h" - STATIC_ITEM_F(F(STR_E6 ": " THERMISTOR_NAME), SS_INVERT); - PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(HEATER_6_MINTEMP), SS_FULL); - PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(HEATER_6_MAXTEMP), SS_FULL); - STATIC_ITEM(TERN(WATCH_HOTENDS, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_FULL); + #undef THERMISTOR_ID + THERM_ITEMS(STR_E6, HEATER_6, WATCH_HOTENDS); #endif #if TEMP_SENSOR_7 != 0 - #undef THERMISTOR_ID #define THERMISTOR_ID TEMP_SENSOR_7 #include "../thermistornames.h" - STATIC_ITEM_F(F(STR_E7 ": " THERMISTOR_NAME), SS_INVERT); - PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(HEATER_7_MINTEMP), SS_FULL); - PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(HEATER_7_MAXTEMP), SS_FULL); - STATIC_ITEM(TERN(WATCH_HOTENDS, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_FULL); + #undef THERMISTOR_ID + THERM_ITEMS(STR_E7, HEATER_7, WATCH_HOTENDS); #endif #if HAS_HEATED_BED #undef THERMISTOR_ID #define THERMISTOR_ID TEMP_SENSOR_BED #include "../thermistornames.h" - STATIC_ITEM_F(F("BED: " THERMISTOR_NAME), SS_INVERT); - PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(BED_MINTEMP), SS_FULL); - PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(BED_MAXTEMP), SS_FULL); - STATIC_ITEM(TERN(WATCH_BED, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_FULL); + THERM_ITEMS("BED", BED, WATCH_BED); #endif #if HAS_HEATED_CHAMBER - #undef THERMISTOR_ID #define THERMISTOR_ID TEMP_SENSOR_CHAMBER #include "../thermistornames.h" - STATIC_ITEM_F(F("CHAM: " THERMISTOR_NAME), SS_INVERT); - PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(CHAMBER_MINTEMP), SS_FULL); - PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(CHAMBER_MAXTEMP), SS_FULL); - STATIC_ITEM(TERN(WATCH_CHAMBER, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_FULL); + #undef THERMISTOR_ID + THERM_ITEMS("CHAM", CHAMBER, WATCH_CHAMBER); #endif #if HAS_COOLER - #undef THERMISTOR_ID #define THERMISTOR_ID TEMP_SENSOR_COOLER #include "../thermistornames.h" - STATIC_ITEM_F(F("COOL: " THERMISTOR_NAME), SS_INVERT); - PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(COOLER_MINTEMP), SS_FULL); - PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(COOLER_MAXTEMP), SS_FULL); - STATIC_ITEM(TERN(WATCH_COOLER, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_FULL); + #undef THERMISTOR_ID + THERM_ITEMS("COOL", COOLER, WATCH_COOLER); #endif END_SCREEN(); diff --git a/Marlin/src/lcd/thermistornames.h b/Marlin/src/lcd/thermistornames.h index 54542bed4ed8..71f48775bdbe 100644 --- a/Marlin/src/lcd/thermistornames.h +++ b/Marlin/src/lcd/thermistornames.h @@ -35,15 +35,17 @@ #if THERMISTOR_ID == 1000 #define THERMISTOR_NAME "User Parameters" -// Thermcouples +// SPI RTD/Thermocouple Boards #elif THERMISTOR_ID == -5 #define THERMISTOR_NAME "MAX31865" -#elif THERMISTOR_ID == -4 - #define THERMISTOR_NAME "AD8495" #elif THERMISTOR_ID == -3 #define THERMISTOR_NAME "MAX31855" #elif THERMISTOR_ID == -2 #define THERMISTOR_NAME "MAX6675" + +// Analog Thermocouple Boards +#elif THERMISTOR_ID == -4 + #define THERMISTOR_NAME "AD8495" #elif THERMISTOR_ID == -1 #define THERMISTOR_NAME "AD595" @@ -94,44 +96,54 @@ #define THERMISTOR_NAME "E3104FXT (alt)" #elif THERMISTOR_ID == 13 #define THERMISTOR_NAME "Hisens 3950" +#elif THERMISTOR_ID == 14 + #define THERMISTOR_NAME "100k Ender-5 S1" #elif THERMISTOR_ID == 15 #define THERMISTOR_NAME "100k JGAurora A5" +#elif THERMISTOR_ID == 17 + #define THERMISTOR_NAME "100k Dagoma NTC" #elif THERMISTOR_ID == 18 #define THERMISTOR_NAME "ATC Semitec 204GT-2" -#elif THERMISTOR_ID == 20 - #define THERMISTOR_NAME "Pt100 UltiMB 5v" -#elif THERMISTOR_ID == 21 - #define THERMISTOR_NAME "Pt100 UltiMB 3.3v" -#elif THERMISTOR_ID == 201 - #define THERMISTOR_NAME "Pt100 OverLord" #elif THERMISTOR_ID == 60 #define THERMISTOR_NAME "Makers Tool" #elif THERMISTOR_ID == 70 #define THERMISTOR_NAME "Hephestos 2" #elif THERMISTOR_ID == 75 #define THERMISTOR_NAME "MGB18" -#elif THERMISTOR_ID == 99 - #define THERMISTOR_NAME "100k with 10k pull-up" -// Modified thermistors -#elif THERMISTOR_ID == 30 - #define THERMISTOR_NAME "Kis3d EN AW NTC100K/3950" +// Analog Thermistors - 1kΩ pullup #elif THERMISTOR_ID == 51 #define THERMISTOR_NAME "EPCOS 1K" #elif THERMISTOR_ID == 52 #define THERMISTOR_NAME "ATC204GT-2 1K" #elif THERMISTOR_ID == 55 #define THERMISTOR_NAME "ATC104GT-2 1K" -#elif THERMISTOR_ID == 1047 - #define THERMISTOR_NAME "PT1000 4K7" -#elif THERMISTOR_ID == 1022 - #define THERMISTOR_NAME "PT1000 2K2" -#elif THERMISTOR_ID == 1010 - #define THERMISTOR_NAME "PT1000 1K" -#elif THERMISTOR_ID == 147 - #define THERMISTOR_NAME "Pt100 4K7" + +// Analog Thermistors - 10kΩ pullup - Atypical +#elif THERMISTOR_ID == 99 + #define THERMISTOR_NAME "100k with 10k pull-up" + +// Analog RTDs (Pt100/Pt1000) #elif THERMISTOR_ID == 110 #define THERMISTOR_NAME "Pt100 1K" +#elif THERMISTOR_ID == 147 + #define THERMISTOR_NAME "Pt100 4K7" +#elif THERMISTOR_ID == 1010 + #define THERMISTOR_NAME "PT1000 1K" +#elif THERMISTOR_ID == 1022 + #define THERMISTOR_NAME "PT1000 2K2" +#elif THERMISTOR_ID == 1047 + #define THERMISTOR_NAME "PT1000 4K7" +#elif THERMISTOR_ID == 20 + #define THERMISTOR_NAME "Pt100 UltiMB 5v" +#elif THERMISTOR_ID == 21 + #define THERMISTOR_NAME "Pt100 UltiMB 3.3v" +#elif THERMISTOR_ID == 201 + #define THERMISTOR_NAME "Pt100 OverLord" + +// Modified thermistors +#elif THERMISTOR_ID == 30 + #define THERMISTOR_NAME "Kis3d EN AW NTC100K/3950" #elif THERMISTOR_ID == 666 #define THERMISTOR_NAME "Einstart S" #elif THERMISTOR_ID == 2000 diff --git a/Marlin/src/module/thermistor/thermistors.h b/Marlin/src/module/thermistor/thermistors.h index 5d4a8a7c92bc..f3562d15053f 100644 --- a/Marlin/src/module/thermistor/thermistors.h +++ b/Marlin/src/module/thermistor/thermistors.h @@ -52,166 +52,190 @@ typedef struct { raw_adc_t value; celsius_t celsius; } temp_entry_t; #define PtAdVal(T,R0,Rup) (short)(1024 / (Rup / PtRt(T, R0) + 1)) #define PtLine(T,R0,Rup) { OV(PtAdVal(T, R0, Rup)), T } -#if ANY_THERMISTOR_IS(1) // beta25 = 4092 K, R25 = 100 kOhm, Pull-up = 4.7 kOhm, "EPCOS" +// +// Analog Thermistors - 4.7kΩ pullup - Normal +// + +#if ANY_THERMISTOR_IS(1) // beta25 = 4092 K, R25 = 100kΩ, Pullup = 4.7kΩ, "EPCOS" #include "thermistor_1.h" #endif -#if ANY_THERMISTOR_IS(2) // 4338 K, R25 = 200 kOhm, Pull-up = 4.7 kOhm, "ATC Semitec 204GT-2" +#if ANY_THERMISTOR_IS(331) // Like table 1, but with 3V3 as input voltage for MEGA + #include "thermistor_331.h" +#endif +#if ANY_THERMISTOR_IS(332) // Like table 1, but with 3V3 as input voltage for DUE + #include "thermistor_332.h" +#endif +#if ANY_THERMISTOR_IS(2) // 4338 K, R25 = 200kΩ, Pullup = 4.7kΩ, "ATC Semitec 204GT-2" #include "thermistor_2.h" #endif -#if ANY_THERMISTOR_IS(3) // beta25 = 4120 K, R25 = 100 kOhm, Pull-up = 4.7 kOhm, "Mendel-parts" +#if ANY_THERMISTOR_IS(202) // 200K thermistor in Copymaker3D hotend + #include "thermistor_202.h" +#endif +#if ANY_THERMISTOR_IS(3) // beta25 = 4120 K, R25 = 100kΩ, Pullup = 4.7kΩ, "Mendel-parts" #include "thermistor_3.h" #endif -#if ANY_THERMISTOR_IS(4) // beta25 = 3950 K, R25 = 10 kOhm, Pull-up = 4.7 kOhm, "Generic" +#if ANY_THERMISTOR_IS(4) // beta25 = 3950 K, R25 = 10kΩ, Pullup = 4.7kΩ, "Generic" #include "thermistor_4.h" #endif -#if ANY_THERMISTOR_IS(5) // beta25 = 4267 K, R25 = 100 kOhm, Pull-up = 4.7 kOhm, "ParCan, ATC 104GT-2" +#if ANY_THERMISTOR_IS(5) // beta25 = 4267 K, R25 = 100kΩ, Pullup = 4.7kΩ, "ParCan, ATC 104GT-2" #include "thermistor_5.h" #endif -#if ANY_THERMISTOR_IS(501) // 100K Zonestar thermistor +#if ANY_THERMISTOR_IS(501) // 100K Zonestar thermistor #include "thermistor_501.h" #endif -#if ANY_THERMISTOR_IS(502) // Unknown thermistor used by the Zonestar Průša P802M hot bed +#if ANY_THERMISTOR_IS(502) // Unknown thermistor used by the Zonestar Průša P802M hot bed #include "thermistor_502.h" #endif -#if ANY_THERMISTOR_IS(503) // Zonestar (Z8XM2) Heated Bed thermistor +#if ANY_THERMISTOR_IS(503) // Zonestar (Z8XM2) Heated Bed thermistor #include "thermistor_503.h" #endif -#if ANY_THERMISTOR_IS(504) // Zonestar (P802QR2 Hot End) thermistors +#if ANY_THERMISTOR_IS(504) // Zonestar (P802QR2 Hot End) thermistors #include "thermistor_504.h" #endif -#if ANY_THERMISTOR_IS(505) // Zonestar (P802QR2 Bed) thermistor +#if ANY_THERMISTOR_IS(505) // Zonestar (P802QR2 Bed) thermistor #include "thermistor_505.h" #endif -#if ANY_THERMISTOR_IS(512) // 100k thermistor in RPW-Ultra hotend, Pull-up = 4.7 kOhm, "unknown model" +#if ANY_THERMISTOR_IS(512) // 100k thermistor in RPW-Ultra hotend, Pullup = 4.7kΩ, "unknown model" #include "thermistor_512.h" #endif -#if ANY_THERMISTOR_IS(6) // beta25 = 4092 K, R25 = 100 kOhm, Pull-up = 8.2 kOhm, "EPCOS ?" +#if ANY_THERMISTOR_IS(6) // beta25 = 4092 K, R25 = 100kΩ, Pullup = 8.2kΩ, "EPCOS ?" #include "thermistor_6.h" #endif -#if ANY_THERMISTOR_IS(7) // beta25 = 3974 K, R25 = 100 kOhm, Pull-up = 4.7 kOhm, "Honeywell 135-104LAG-J01" +#if ANY_THERMISTOR_IS(7) // beta25 = 3974 K, R25 = 100kΩ, Pullup = 4.7kΩ, "Honeywell 135-104LAG-J01" #include "thermistor_7.h" #endif -#if ANY_THERMISTOR_IS(71) // beta25 = 3974 K, R25 = 100 kOhm, Pull-up = 4.7 kOhm, "Honeywell 135-104LAF-J01" +#if ANY_THERMISTOR_IS(71) // beta25 = 3974 K, R25 = 100kΩ, Pullup = 4.7kΩ, "Honeywell 135-104LAF-J01" #include "thermistor_71.h" #endif -#if ANY_THERMISTOR_IS(8) // beta25 = 3950 K, R25 = 100 kOhm, Pull-up = 10 kOhm, "Vishay E3104FHT" +#if ANY_THERMISTOR_IS(8) // beta25 = 3950 K, R25 = 100kΩ, Pullup = 10kΩ, "Vishay E3104FHT" #include "thermistor_8.h" #endif -#if ANY_THERMISTOR_IS(9) // beta25 = 3960 K, R25 = 100 kOhm, Pull-up = 4.7 kOhm, "GE Sensing AL03006-58.2K-97-G1" +#if ANY_THERMISTOR_IS(9) // beta25 = 3960 K, R25 = 100kΩ, Pullup = 4.7kΩ, "GE Sensing AL03006-58.2K-97-G1" #include "thermistor_9.h" #endif -#if ANY_THERMISTOR_IS(10) // beta25 = 3960 K, R25 = 100 kOhm, Pull-up = 4.7 kOhm, "RS 198-961" +#if ANY_THERMISTOR_IS(10) // beta25 = 3960 K, R25 = 100kΩ, Pullup = 4.7kΩ, "RS 198-961" #include "thermistor_10.h" #endif -#if ANY_THERMISTOR_IS(11) // beta25 = 3950 K, R25 = 100 kOhm, Pull-up = 4.7 kOhm, "QU-BD silicone bed, QWG-104F-3950" +#if ANY_THERMISTOR_IS(11) // beta25 = 3950 K, R25 = 100kΩ, Pullup = 4.7kΩ, "QU-BD silicone bed, QWG-104F-3950" #include "thermistor_11.h" #endif -#if ANY_THERMISTOR_IS(13) // beta25 = 4100 K, R25 = 100 kOhm, Pull-up = 4.7 kOhm, "Hisens" +#if ANY_THERMISTOR_IS(12) // beta25 = 4700 K, R25 = 100kΩ, Pullup = 4.7kΩ, "Personal calibration for Makibox hot bed" + #include "thermistor_12.h" +#endif +#if ANY_THERMISTOR_IS(13) // beta25 = 4100 K, R25 = 100kΩ, Pullup = 4.7kΩ, "Hisens" #include "thermistor_13.h" #endif -#if ANY_THERMISTOR_IS(14) // beta25 = 4092 K, R25 = 100 kOhm, Pull-up = 4.7 kOhm, "EPCOS" for hot bed +#if ANY_THERMISTOR_IS(14) // beta25 = 4092 K, R25 = 100kΩ, Pullup = 4.7kΩ, "EPCOS" for hot bed #include "thermistor_14.h" #endif -#if ANY_THERMISTOR_IS(15) // JGAurora A5 thermistor calibration +#if ANY_THERMISTOR_IS(15) // JGAurora A5 thermistor calibration #include "thermistor_15.h" #endif -#if ANY_THERMISTOR_IS(17) // Dagoma NTC 100k white thermistor +#if ANY_THERMISTOR_IS(17) // Dagoma NTC 100k white thermistor #include "thermistor_17.h" #endif -#if ANY_THERMISTOR_IS(18) // ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327 +#if ANY_THERMISTOR_IS(18) // ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327 #include "thermistor_18.h" #endif -#if ANY_THERMISTOR_IS(20) // Pt100 with INA826 amp on Ultimaker v2.0 electronics - #include "thermistor_20.h" -#endif -#if ANY_THERMISTOR_IS(21) // Pt100 with INA826 amp with 3.3v excitation based on "Pt100 with INA826 amp on Ultimaker v2.0 electronics" - #include "thermistor_21.h" -#endif -#if ANY_THERMISTOR_IS(22) // Thermistor in a Rostock 301 hot end, calibrated with a multimeter +#if ANY_THERMISTOR_IS(22) // Thermistor in a Rostock 301 hot end, calibrated with a multimeter #include "thermistor_22.h" #endif -#if ANY_THERMISTOR_IS(23) // By AluOne #12622. Formerly 22 above. May need calibration/checking. +#if ANY_THERMISTOR_IS(23) // By AluOne #12622. Formerly 22 above. May need calibration/checking. #include "thermistor_23.h" #endif -#if ANY_THERMISTOR_IS(30) // Kis3d Silicone mat 24V 200W/300W with 6mm Precision cast plate (EN AW 5083) +#if ANY_THERMISTOR_IS(30) // Kis3d Silicone mat 24V 200W/300W with 6mm Precision cast plate (EN AW 5083) #include "thermistor_30.h" #endif -#if ANY_THERMISTOR_IS(51) // beta25 = 4092 K, R25 = 100 kOhm, Pull-up = 1 kOhm, "EPCOS" - #include "thermistor_51.h" -#endif -#if ANY_THERMISTOR_IS(52) // beta25 = 4338 K, R25 = 200 kOhm, Pull-up = 1 kOhm, "ATC Semitec 204GT-2" - #include "thermistor_52.h" -#endif -#if ANY_THERMISTOR_IS(55) // beta25 = 4267 K, R25 = 100 kOhm, Pull-up = 1 kOhm, "ATC Semitec 104GT-2 (Used on ParCan)" - #include "thermistor_55.h" -#endif -#if ANY_THERMISTOR_IS(60) // beta25 = 3950 K, R25 = 100 kOhm, Pull-up = 4.7 kOhm, "Maker's Tool Works Kapton Bed" +#if ANY_THERMISTOR_IS(60) // beta25 = 3950 K, R25 = 100kΩ, Pullup = 4.7kΩ, "Maker's Tool Works Kapton Bed" #include "thermistor_60.h" #endif -#if ANY_THERMISTOR_IS(61) // beta25 = 3950 K, R25 = 100 kOhm, Pull-up = 4.7 kOhm, "Formbot 350°C Thermistor" +#if ANY_THERMISTOR_IS(61) // beta25 = 3950 K, R25 = 100kΩ, Pullup = 4.7kΩ, "Formbot 350°C Thermistor" #include "thermistor_61.h" #endif -#if ANY_THERMISTOR_IS(66) // beta25 = 4500 K, R25 = 2.5 MOhm, Pull-up = 4.7 kOhm, "DyzeDesign 500 °C Thermistor" +#if ANY_THERMISTOR_IS(66) // beta25 = 4500 K, R25 = 2.5MΩ, Pullup = 4.7kΩ, "DyzeDesign 500 °C Thermistor" #include "thermistor_66.h" #endif -#if ANY_THERMISTOR_IS(67) // R25 = 500 KOhm, beta25 = 3800 K, 4.7 kOhm pull-up, SliceEngineering 450 °C Thermistor +#if ANY_THERMISTOR_IS(67) // R25 = 500kΩ, beta25 = 3800 K, 4.7kΩ pull-up, SliceEngineering 450 °C Thermistor #include "thermistor_67.h" #endif -#if ANY_THERMISTOR_IS(68) // PT-100 with Dyze amplifier board +#if ANY_THERMISTOR_IS(68) // PT-100 with Dyze amplifier board #include "thermistor_68.h" #endif -#if ANY_THERMISTOR_IS(12) // beta25 = 4700 K, R25 = 100 kOhm, Pull-up = 4.7 kOhm, "Personal calibration for Makibox hot bed" - #include "thermistor_12.h" -#endif -#if ANY_THERMISTOR_IS(70) // beta25 = 4100 K, R25 = 100 kOhm, Pull-up = 4.7 kOhm, "Hephestos 2, bqh2 stock thermistor" +#if ANY_THERMISTOR_IS(70) // beta25 = 4100 K, R25 = 100kΩ, Pullup = 4.7kΩ, "Hephestos 2, bqh2 stock thermistor" #include "thermistor_70.h" #endif -#if ANY_THERMISTOR_IS(75) // beta25 = 4100 K, R25 = 100 kOhm, Pull-up = 4.7 kOhm, "MGB18-104F39050L32 thermistor" +#if ANY_THERMISTOR_IS(75) // beta25 = 4100 K, R25 = 100kΩ, Pullup = 4.7kΩ, "MGB18-104F39050L32 thermistor" #include "thermistor_75.h" #endif -#if ANY_THERMISTOR_IS(99) // 100k bed thermistor with a 10K pull-up resistor (on some Wanhao i3 models) - #include "thermistor_99.h" +#if ANY_THERMISTOR_IS(666) // beta25 = UNK, R25 = 200K, Pullup = 10kΩ, "Unidentified 200K NTC thermistor (Einstart S)" + #include "thermistor_666.h" #endif -#if ANY_THERMISTOR_IS(110) // Pt100 with 1k0 pullup - #include "thermistor_110.h" +#if ANY_THERMISTOR_IS(2000) // "Ultimachine Rambo TDK NTCG104LH104KT1 NTC100K motherboard Thermistor" https://product.tdk.com/en/search/sensor/ntc/chip-ntc-thermistor/info?part_no=NTCG104LH104KT1 + #include "thermistor_2000.h" #endif -#if ANY_THERMISTOR_IS(147) // Pt100 with 4k7 pullup - #include "thermistor_147.h" + +// +// Analog Thermistors - 1kΩ pullup +// + +#if ANY_THERMISTOR_IS(51) // beta25 = 4092 K, R25 = 100kΩ, Pullup = 1kΩ, "EPCOS" + #include "thermistor_51.h" #endif -#if ANY_THERMISTOR_IS(201) // Pt100 with LMV324 Overlord - #include "thermistor_201.h" +#if ANY_THERMISTOR_IS(52) // beta25 = 4338 K, R25 = 200kΩ, Pullup = 1kΩ, "ATC Semitec 204GT-2" + #include "thermistor_52.h" #endif -#if ANY_THERMISTOR_IS(202) // 200K thermistor in Copymaker3D hotend - #include "thermistor_202.h" +#if ANY_THERMISTOR_IS(55) // beta25 = 4267 K, R25 = 100kΩ, Pullup = 1kΩ, "ATC Semitec 104GT-2 (Used on ParCan)" + #include "thermistor_55.h" #endif -#if ANY_THERMISTOR_IS(331) // Like table 1, but with 3V3 as input voltage for MEGA - #include "thermistor_331.h" + +// +// Analog Thermistors - 10kΩ pullup - Atypical +// + +#if ANY_THERMISTOR_IS(99) // 100k bed thermistor with a 10K pull-up resistor (on some Wanhao i3 models) + #include "thermistor_99.h" #endif -#if ANY_THERMISTOR_IS(332) // Like table 1, but with 3V3 as input voltage for DUE - #include "thermistor_332.h" + +// +// Analog RTDs (Pt100/Pt1000) +// + +#if ANY_THERMISTOR_IS(110) // Pt100 with 1k0 pullup + #include "thermistor_110.h" #endif -#if ANY_THERMISTOR_IS(666) // beta25 = UNK, R25 = 200K, Pull-up = 10 kOhm, "Unidentified 200K NTC thermistor (Einstart S)" - #include "thermistor_666.h" +#if ANY_THERMISTOR_IS(147) // Pt100 with 4k7 pullup + #include "thermistor_147.h" #endif -#if ANY_THERMISTOR_IS(1010) // Pt1000 with 1k0 pullup +#if ANY_THERMISTOR_IS(1010) // Pt1000 with 1k0 pullup #include "thermistor_1010.h" #endif -#if ANY_THERMISTOR_IS(1022) // Pt1000 with 2k2 pullup +#if ANY_THERMISTOR_IS(1022) // Pt1000 with 2k2 pullup #include "thermistor_1022.h" #endif -#if ANY_THERMISTOR_IS(1047) // Pt1000 with 4k7 pullup +#if ANY_THERMISTOR_IS(1047) // Pt1000 with 4k7 pullup #include "thermistor_1047.h" #endif -#if ANY_THERMISTOR_IS(2000) // "Ultimachine Rambo TDK NTCG104LH104KT1 NTC100K motherboard Thermistor" https://product.tdk.com/en/search/sensor/ntc/chip-ntc-thermistor/info?part_no=NTCG104LH104KT1 - #include "thermistor_2000.h" +#if ANY_THERMISTOR_IS(20) // Pt100 with INA826 amp on Ultimaker v2.0 electronics + #include "thermistor_20.h" #endif -#if ANY_THERMISTOR_IS(998) // User-defined table 1 +#if ANY_THERMISTOR_IS(21) // Pt100 with INA826 amp with 3.3v excitation based on "Pt100 with INA826 amp on Ultimaker v2.0 electronics" + #include "thermistor_21.h" +#endif +#if ANY_THERMISTOR_IS(201) // Pt100 with LMV324 Overlord + #include "thermistor_201.h" +#endif + +// +// Custom/Dummy/Other Thermal Sensors +// + +#if ANY_THERMISTOR_IS(998) // User-defined table 1 #include "thermistor_998.h" #endif -#if ANY_THERMISTOR_IS(999) // User-defined table 2 +#if ANY_THERMISTOR_IS(999) // User-defined table 2 #include "thermistor_999.h" #endif -#if ANY_THERMISTOR_IS(1000) // Custom +#if ANY_THERMISTOR_IS(1000) // Custom constexpr temp_entry_t temptable_1000[] PROGMEM = { { 0, 0 } }; #endif From adfc787a45432e918f024241d5ba4387724cd6e9 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Thu, 24 Aug 2023 00:18:43 +0000 Subject: [PATCH 19/25] [cron] Bump distribution date (2023-08-24) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 464217907bb8..448dd4c1b861 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2023-08-23" +//#define STRING_DISTRIBUTION_DATE "2023-08-24" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index ea3f7c984bcf..4bdc58276fa4 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2023-08-23" + #define STRING_DISTRIBUTION_DATE "2023-08-24" #endif /** From 20fec98f70208546b90ccc0b8f6766de6f2f8230 Mon Sep 17 00:00:00 2001 From: lukasradek Date: Thu, 24 Aug 2023 19:41:30 +0200 Subject: [PATCH 20/25] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Adjus?= =?UTF-8?q?t=20LCD=20string=20draw=20(#26154)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/HD44780/marlinui_HD44780.cpp | 16 +++++++--------- Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp | 16 +++++++--------- Marlin/src/lcd/dogm/marlinui_DOGM.cpp | 18 ++++++++---------- Marlin/src/lcd/lcdprint.cpp | 4 ++-- 4 files changed, 24 insertions(+), 30 deletions(-) diff --git a/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp b/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp index 897070c4dd89..3206cb63347c 100644 --- a/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp +++ b/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp @@ -1178,11 +1178,7 @@ void MarlinUI::draw_status_screen() { if (center) for (int8_t lpad = pad / 2; lpad > 0; --lpad) { lcd_put_u8str(F(" ")); n--; } // Draw as much of the label as fits - if (plen) { - const int8_t expl = n; - n = lcd_put_u8str(fstr, itemIndex, itemStringC, itemStringF, n); - pad -= (expl - n - plen); // Reduce the padding - } + if (plen) n -= lcd_put_u8str(fstr, itemIndex, itemStringC, itemStringF, n - vlen); if (vlen && n > 0) { // SS_FULL: Pad with enough space to justify the value @@ -1203,7 +1199,8 @@ void MarlinUI::draw_status_screen() { // Draw a generic menu item with pre_char (if selected) and post_char void MenuItemBase::_draw(const bool sel, const uint8_t row, FSTR_P const ftpl, const char pre_char, const char post_char) { lcd_put_lchar(0, row, sel ? pre_char : ' '); - uint8_t n = lcd_put_u8str(ftpl, itemIndex, itemStringC, itemStringF, LCD_WIDTH - 2); + uint8_t n = LCD_WIDTH - 2; + n -= lcd_put_u8str(ftpl, itemIndex, itemStringC, itemStringF, n); for (; n; --n) lcd_put_u8str(F(" ")); lcd_put_lchar(post_char); } @@ -1224,7 +1221,8 @@ void MarlinUI::draw_status_screen() { // Low-level draw_edit_screen can be used to draw an edit screen from anyplace void MenuEditItemBase::draw_edit_screen(FSTR_P const ftpl, const char * const value/*=nullptr*/) { ui.encoder_direction_normal(); - uint8_t n = lcd_put_u8str(0, 1, ftpl, itemIndex, itemStringC, itemStringF, LCD_WIDTH - 1); + uint8_t n = LCD_WIDTH - 1; + n -= lcd_put_u8str(0, 1, ftpl, itemIndex, itemStringC, itemStringF, n); if (value) { lcd_put_u8str(F(":")); n--; const uint8_t len = utf8_strlen(value) + 1; // Plus one for a leading space @@ -1251,8 +1249,8 @@ void MarlinUI::draw_status_screen() { void MenuItem_sdbase::draw(const bool sel, const uint8_t row, FSTR_P const, CardReader &theCard, const bool isDir) { lcd_put_lchar(0, row, sel ? LCD_STR_ARROW_RIGHT[0] : ' '); - constexpr uint8_t maxlen = LCD_WIDTH - 2; - uint8_t n = maxlen - lcd_put_u8str_max(ui.scrolled_filename(theCard, maxlen, row, sel), maxlen); + uint8_t n = LCD_WIDTH - 2; + n -= lcd_put_u8str_max(ui.scrolled_filename(theCard, n, row, sel), n); for (; n; --n) lcd_put_u8str(F(" ")); lcd_put_lchar(isDir ? LCD_STR_FOLDER[0] : ' '); } diff --git a/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp b/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp index 4cec4dfa43bd..2d621d74cf2e 100644 --- a/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp +++ b/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp @@ -983,11 +983,7 @@ void MarlinUI::draw_status_screen() { if (center) for (int8_t lpad = pad / 2; lpad > 0; --lpad) { lcd.write(' '); n--; } // Draw as much of the label as fits - if (plen) { - const int8_t expl = n; - n = lcd_put_u8str(fstr, itemIndex, itemStringC, itemStringF, n); - pad -= (expl - n - plen); // Reduce the padding - } + if (plen) n -= lcd_put_u8str(fstr, itemIndex, itemStringC, itemStringF, n - vlen); if (vlen && n > 0) { // SS_FULL: Pad with enough space to justify the value @@ -1012,7 +1008,8 @@ void MarlinUI::draw_status_screen() { if (!PanelDetected) return; lcd_moveto(0, row); lcd.write(sel ? pre_char : ' '); - uint8_t n = lcd_put_u8str(fstr, itemIndex, itemStringC, itemStringF, LCD_WIDTH - 2); + uint8_t n = LCD_WIDTH - 2; + n -= lcd_put_u8str(fstr, itemIndex, itemStringC, itemStringF, n); for (; n; --n) lcd.write(' '); lcd.write(post_char); lcd.print_line(); @@ -1024,7 +1021,8 @@ void MarlinUI::draw_status_screen() { const uint8_t vlen = inStr ? (pgm ? utf8_strlen_P(inStr) : utf8_strlen(inStr)) : 0; lcd_moveto(0, row); lcd.write(sel ? LCD_STR_ARROW_RIGHT[0] : ' '); - uint8_t n = lcd_put_u8str(fstr, itemIndex, itemStringC, itemStringF, LCD_WIDTH - 2 - vlen); + uint8_t n = LCD_WIDTH - 2 - vlen; + n -= lcd_put_u8str(fstr, itemIndex, itemStringC, itemStringF, n); if (vlen) { lcd.write(':'); for (; n; --n) lcd.write(' '); @@ -1074,8 +1072,8 @@ void MarlinUI::draw_status_screen() { if (!PanelDetected) return; lcd_moveto(0, row); lcd.write(sel ? LCD_STR_ARROW_RIGHT[0] : ' '); - constexpr uint8_t maxlen = LCD_WIDTH - 2; - uint8_t n = maxlen - lcd_put_u8str_max(ui.scrolled_filename(theCard, maxlen, row, sel), maxlen); + uint8_t n = LCD_WIDTH - 2; + n -= lcd_put_u8str_max(ui.scrolled_filename(theCard, n, row, sel), n); for (; n; --n) lcd.write(' '); lcd.write(isDir ? LCD_STR_FOLDER[0] : ' '); lcd.print_line(); diff --git a/Marlin/src/lcd/dogm/marlinui_DOGM.cpp b/Marlin/src/lcd/dogm/marlinui_DOGM.cpp index 5b2db31fbbd2..c2671b1b750e 100644 --- a/Marlin/src/lcd/dogm/marlinui_DOGM.cpp +++ b/Marlin/src/lcd/dogm/marlinui_DOGM.cpp @@ -424,11 +424,7 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop if (center) for (int lpad = pad / 2; lpad > 0; --lpad) n -= lcd_put_u8str(F(" ")); // Draw as much of the label as fits - if (pwide) { - const pixel_len_t expw = n; - n = lcd_put_u8str(ftpl, itemIndex, itemStringC, itemStringF, n / (MENU_FONT_WIDTH)) * (MENU_FONT_WIDTH); - pad -= (expw - n - pwide) / (MENU_FONT_WIDTH); // Reduce the padding - } + if (pwide) n -= lcd_put_u8str(ftpl, itemIndex, itemStringC, itemStringF, n / (MENU_FONT_WIDTH)) * (MENU_FONT_WIDTH); if (vlen) { // SS_FULL: Pad with enough space to justify the value @@ -449,8 +445,9 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop // Draw a generic menu item void MenuItemBase::_draw(const bool sel, const uint8_t row, FSTR_P const ftpl, const char, const char post_char) { if (mark_as_selected(row, sel)) { - pixel_len_t n = lcd_put_u8str(ftpl, itemIndex, itemStringC, itemStringF, LCD_WIDTH - 1) * (MENU_FONT_WIDTH); - while (n > MENU_FONT_WIDTH) n -= lcd_put_u8str(F(" ")); + uint8_t n = LCD_WIDTH - 1; + n -= lcd_put_u8str(ftpl, itemIndex, itemStringC, itemStringF, n); + for (; n; --n) lcd_put_u8str(F(" ")); lcd_put_lchar(LCD_PIXEL_WIDTH - (MENU_FONT_WIDTH), row_y2, post_char); lcd_put_u8str(F(" ")); } @@ -463,10 +460,11 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop pixelwidth = (pgm ? uxg_GetUtf8StrPixelWidthP(u8g.getU8g(), inStr) : uxg_GetUtf8StrPixelWidth(u8g.getU8g(), inStr)); const u8g_uint_t prop = USE_WIDE_GLYPH ? 2 : 1; - pixel_len_t n = lcd_put_u8str(ftpl, itemIndex, itemStringC, itemStringF, LCD_WIDTH - 2 - vallen * prop) * (MENU_FONT_WIDTH); + uint8_t n = LCD_WIDTH - 2 - vallen * prop; + n -= lcd_put_u8str(ftpl, itemIndex, itemStringC, itemStringF, n); if (vallen) { lcd_put_u8str(F(":")); - while (n > MENU_FONT_WIDTH) n -= lcd_put_u8str(F(" ")); + for (; n; --n) lcd_put_u8str(F(" ")); lcd_moveto(LCD_PIXEL_WIDTH - _MAX((MENU_FONT_WIDTH) * vallen, pixelwidth + 2), row_y2); if (pgm) lcd_put_u8str_P(inStr); else lcd_put_u8str(inStr); } @@ -552,7 +550,7 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop if (isDir) lcd_put_lchar(LCD_STR_FOLDER[0]); const pixel_len_t pixw = maxlen * (MENU_FONT_WIDTH); pixel_len_t n = pixw - lcd_put_u8str_max(ui.scrolled_filename(theCard, maxlen, row, sel), pixw); - while (n > MENU_FONT_WIDTH) n -= lcd_put_u8str(F(" ")); + for (; n > MENU_FONT_WIDTH; n -= MENU_FONT_WIDTH) lcd_put_u8str(F(" ")); } } diff --git a/Marlin/src/lcd/lcdprint.cpp b/Marlin/src/lcd/lcdprint.cpp index 912344c14fc7..bdf2513121ec 100644 --- a/Marlin/src/lcd/lcdprint.cpp +++ b/Marlin/src/lcd/lcdprint.cpp @@ -42,7 +42,7 @@ * * displays 'E1'...'E11' for indexes 0 - 10 (By default. Uses LCD_FIRST_TOOL) * @ displays an axis name such as XYZUVW, or E for an extruder * - * Return the given maxlen minus the number of characters emitted, i.e., the number of unused columns + * Return the number of characters emitted */ lcd_uint_t lcd_put_u8str_P(PGM_P const ptpl, const int8_t ind, const char *cstr/*=nullptr*/, FSTR_P const fstr/*=nullptr*/, const lcd_uint_t maxlen/*=LCD_WIDTH*/) { const uint8_t prop = USE_WIDE_GLYPH ? 2 : 1; @@ -88,7 +88,7 @@ lcd_uint_t lcd_put_u8str_P(PGM_P const ptpl, const int8_t ind, const char *cstr/ n -= wc > 255 ? prop : 1; } } - return n; + return maxlen - n; } // Calculate UTF8 width with a simple check From e1121a4cd009ee447eaef2ab49a2de896e5a5eef Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Fri, 25 Aug 2023 00:19:03 +0000 Subject: [PATCH 21/25] [cron] Bump distribution date (2023-08-25) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 448dd4c1b861..ea5235f27ec1 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2023-08-24" +//#define STRING_DISTRIBUTION_DATE "2023-08-25" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 4bdc58276fa4..c6e01ed925e4 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2023-08-24" + #define STRING_DISTRIBUTION_DATE "2023-08-25" #endif /** From 4613f85bb754991b1ea4fa5218ae94e758be0e8a Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 24 Aug 2023 15:09:03 -0500 Subject: [PATCH 22/25] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Encap?= =?UTF-8?q?sulate=20ProUI=20G-code=20preview?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/e3v2/proui/dwin.cpp | 10 +- Marlin/src/lcd/e3v2/proui/gcode_preview.cpp | 227 +++++++++----------- Marlin/src/lcd/e3v2/proui/gcode_preview.h | 15 +- 3 files changed, 121 insertions(+), 131 deletions(-) diff --git a/Marlin/src/lcd/e3v2/proui/dwin.cpp b/Marlin/src/lcd/e3v2/proui/dwin.cpp index 83c7eebe3812..af69e8d3edfe 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/proui/dwin.cpp @@ -288,7 +288,7 @@ MenuItem *editZValueItem = nullptr; bool isPrinting() { return printingIsActive() || printingIsPaused(); } bool sdPrinting() { return isPrinting() && IS_SD_FILE_OPEN(); } -bool Host_Printing() { return isPrinting() && !IS_SD_FILE_OPEN(); } +bool hostPrinting() { return isPrinting() && !IS_SD_FILE_OPEN(); } #define DWIN_LANGUAGE_EEPROM_ADDRESS 0x01 // Between 0x01 and 0x63 (EEPROM_OFFSET-1) // BL24CXX::check() uses 0x00 @@ -634,9 +634,9 @@ void drawPrintDone() { DWINUI::clearMainArea(); dwinPrintHeader(nullptr); #if HAS_GCODE_PREVIEW - const bool haspreview = Preview_Valid(); + const bool haspreview = preview.valid(); if (haspreview) { - Preview_Show(); + preview.show(); DWINUI::drawButton(BTN_Continue, 86, 295); } #else @@ -1675,7 +1675,7 @@ void dwinLevelingDone() { // Started a Print Job void dwinPrintStarted() { - TERN_(HAS_GCODE_PREVIEW, if (Host_Printing()) Preview_Invalidate()); + TERN_(HAS_GCODE_PREVIEW, if (hostPrinting()) preview.invalidate()); TERN_(SET_PROGRESS_PERCENT, ui.progress_reset()); TERN_(SET_REMAINING_TIME, ui.reset_remaining_time()); hmiFlag.pause_flag = false; @@ -1960,7 +1960,7 @@ void dwinRedrawScreen() { void gotoConfirmToPrint() { #if HAS_GCODE_PREVIEW - if (hmiData.enablePreview) return gotoPopup(Preview_DrawFromSD, onClickConfirmToPrint); + if (hmiData.enablePreview) return gotoPopup(preview.drawFromSD, onClickConfirmToPrint); #endif card.openAndPrintFile(card.filename); // Direct print SD file } diff --git a/Marlin/src/lcd/e3v2/proui/gcode_preview.cpp b/Marlin/src/lcd/e3v2/proui/gcode_preview.cpp index 8017847538e4..53b38b641e70 100644 --- a/Marlin/src/lcd/e3v2/proui/gcode_preview.cpp +++ b/Marlin/src/lcd/e3v2/proui/gcode_preview.cpp @@ -31,6 +31,8 @@ #if ALL(DWIN_LCD_PROUI, HAS_GCODE_PREVIEW) +#include "gcode_preview.h" + #include "../../../core/types.h" #include "../../marlinui.h" #include "../../../sd/cardreader.h" @@ -38,78 +40,66 @@ #include "dwin.h" #include "dwin_popup.h" #include "base64.hpp" -#include "gcode_preview.h" #define THUMBWIDTH 230 #define THUMBHEIGHT 180 +Preview preview; + typedef struct { - char name[13] = ""; //8.3 + null + char name[13] = ""; // 8.3 + null uint32_t thumbstart = 0; int thumbsize = 0; - int thumbheight = 0; - int thumbwidth = 0; - uint8_t *thumbdata = nullptr; + int thumbheight = 0, thumbwidth = 0; float time = 0; float filament = 0; float layer = 0; - float width = 0; - float height = 0; - float length = 0; - void setname(const char * const fn); - void clear(); + float width = 0, height = 0, length = 0; + + void setname(const char * const fn) { + const uint8_t len = _MIN(sizeof(name) - 1, strlen(fn)); + memcpy(name, fn, len); + name[len] = '\0'; + } + + void clear() { + fileprop.name[0] = '\0'; + fileprop.thumbstart = 0; + fileprop.thumbsize = 0; + fileprop.thumbheight = fileprop.thumbwidth = 0; + fileprop.time = 0; + fileprop.filament = 0; + fileprop.layer = 0; + fileprop.height = fileprop.width = fileprop.length = 0; + } + } fileprop_t; + fileprop_t fileprop; -void fileprop_t::setname(const char * const fn) { - const uint8_t len = _MIN(sizeof(name) - 1, strlen(fn)); - memcpy(&name[0], fn, len); - name[len] = '\0'; -} +void getValue(const char * const buf, PGM_P const key, float &value) { + if (value != 0.0f) return; -void fileprop_t::clear() { - fileprop.name[0] = '\0'; - fileprop.thumbstart = 0; - fileprop.thumbsize = 0; - fileprop.thumbheight = 0; - fileprop.thumbwidth = 0; - fileprop.thumbdata = nullptr; - fileprop.time = 0; - fileprop.filament = 0; - fileprop.layer = 0; - fileprop.height = 0; - fileprop.width = 0; - fileprop.length = 0; -} + char *posptr = strstr_P(buf, key); + if (posptr == nullptr) return; -void Get_Value(char *buf, const char * const key, float &value) { char num[10] = ""; - char * posptr = 0; - uint8_t i = 0; - if (!!value) return; - posptr = strstr(buf, key); - if (posptr != nullptr) { - while (i < sizeof(num)) { - char c = posptr[0]; - if (!ISEOL(c) && (c != 0)) { - if ((c > 47 && c < 58) || (c == '.')) num[i++] = c; - posptr++; - } - else { - num[i] = '\0'; - value = atof(num); - return; - } + for (uint8_t i = 0; i < sizeof(num);) { + const char c = *posptr; + if (ISEOL(c) || c == '\0') { + num[i] = '\0'; + value = atof(num); + break; } + if (WITHIN(c, '0', '9') || c == '.') num[i++] = c; + posptr++; } } -bool Has_Preview() { - const char * tbstart = "; thumbnail begin " STRINGIFY(THUMBWIDTH) "x" STRINGIFY(THUMBHEIGHT); - char * posptr = 0; - uint8_t nbyte = 1; +bool Preview::hasPreview() { + const char * const tbstart = PSTR("; thumbnail begin " STRINGIFY(THUMBWIDTH) "x" STRINGIFY(THUMBHEIGHT)); + char *posptr = nullptr; uint32_t indx = 0; - char buf[256]; float tmp = 0; fileprop.clear(); @@ -117,30 +107,32 @@ bool Has_Preview() { card.openFileRead(fileprop.name); - while ((nbyte > 0) && (indx < 4 * sizeof(buf)) && !fileprop.thumbstart) { + char buf[256]; + uint8_t nbyte = 1; + while (!fileprop.thumbstart && nbyte > 0 && indx < 4 * sizeof(buf)) { nbyte = card.read(buf, sizeof(buf) - 1); if (nbyte > 0) { buf[nbyte] = '\0'; - Get_Value(buf, ";TIME:", fileprop.time); - Get_Value(buf, ";Filament used:", fileprop.filament); - Get_Value(buf, ";Layer height:", fileprop.layer); - Get_Value(buf, ";MINX:", tmp); - Get_Value(buf, ";MAXX:", fileprop.width); + getValue(buf, PSTR(";TIME:"), fileprop.time); + getValue(buf, PSTR(";Filament used:"), fileprop.filament); + getValue(buf, PSTR(";Layer height:"), fileprop.layer); + getValue(buf, PSTR(";MINX:"), tmp); + getValue(buf, PSTR(";MAXX:"), fileprop.width); fileprop.width -= tmp; tmp = 0; - Get_Value(buf, ";MINY:", tmp); - Get_Value(buf, ";MAXY:", fileprop.length); + getValue(buf, PSTR(";MINY:"), tmp); + getValue(buf, PSTR(";MAXY:"), fileprop.length); fileprop.length -= tmp; tmp = 0; - Get_Value(buf, ";MINZ:", tmp); - Get_Value(buf, ";MAXZ:", fileprop.height); + getValue(buf, PSTR(";MINZ:"), tmp); + getValue(buf, PSTR(";MAXZ:"), fileprop.height); fileprop.height -= tmp; - posptr = strstr(buf, tbstart); + posptr = strstr_P(buf, tbstart); if (posptr != nullptr) { fileprop.thumbstart = indx + (posptr - &buf[0]); } else { - indx += _MAX(10, nbyte - (signed)strlen(tbstart)); + indx += _MAX(10, nbyte - (signed)strlen_P(tbstart)); card.setIndex(indx); } } @@ -149,20 +141,15 @@ bool Has_Preview() { if (!fileprop.thumbstart) { card.closefile(); LCD_MESSAGE_F("Thumbnail not found"); - return 0; + return false; } // Get the size of the thumbnail - card.setIndex(fileprop.thumbstart + strlen(tbstart)); + card.setIndex(fileprop.thumbstart + strlen_P(tbstart)); for (uint8_t i = 0; i < 16; i++) { - char c = card.get(); - if (!ISEOL(c)) { - buf[i] = c; - } - else { - buf[i] = 0; - break; - } + const char c = card.get(); + if (ISEOL(c)) { buf[i] = '\0'; break; } + buf[i] = c; } fileprop.thumbsize = atoi(buf); @@ -170,77 +157,73 @@ bool Has_Preview() { if (!fileprop.thumbsize) { card.closefile(); LCD_MESSAGE_F("Invalid Thumbnail Size"); - return 0; + return false; } - uint16_t readed = 0; uint8_t buf64[fileprop.thumbsize]; - - fileprop.thumbdata = new uint8_t[3 + 3 * (fileprop.thumbsize / 4)]; // Reserve space for the JPEG thumbnail - - while (readed < fileprop.thumbsize) { - uint8_t c = card.get(); - if (!ISEOL(c) && (c != ';') && (c != ' ')) { - buf64[readed] = c; - readed++; - } + uint16_t nread = 0; + while (nread < fileprop.thumbsize) { + const uint8_t c = card.get(); + if (!ISEOL(c) && c != ';' && c != ' ') + buf64[nread++] = c; } card.closefile(); - buf64[readed] = 0; + buf64[nread] = '\0'; + + uint8_t thumbdata[3 + 3 * (fileprop.thumbsize / 4)]; // Reserve space for the JPEG thumbnail + fileprop.thumbsize = decode_base64(buf64, thumbdata); + DWINUI::writeToSRAM(0x00, fileprop.thumbsize, thumbdata); fileprop.thumbwidth = THUMBWIDTH; fileprop.thumbheight = THUMBHEIGHT; - fileprop.thumbsize = decode_base64(buf64, fileprop.thumbdata); card.closefile(); - DWINUI::WriteToSRAM(0x00, fileprop.thumbsize, fileprop.thumbdata); - delete[] fileprop.thumbdata; + return true; } -void Preview_DrawFromSD() { - if (Has_Preview()) { - MString<45> buf; - char str_1[6] = "", str_2[6] = "", str_3[6] = ""; - dwinDrawRectangle(1, hmiData.colorBackground, 0, 0, DWIN_WIDTH, STATUS_Y - 1); - if (fileprop.time) { - buf.setf(F("Estimated time: %i:%02i"), (uint16_t)fileprop.time / 3600, ((uint16_t)fileprop.time % 3600) / 60); - DWINUI::drawString(20, 10, &buf); - } - if (fileprop.filament) { - buf.setf(F("Filament used: %s m"), dtostrf(fileprop.filament, 1, 2, str_1)); - DWINUI::drawString(20, 30, &buf); - } - if (fileprop.layer) { - buf.setf(F("Layer height: %s mm"), dtostrf(fileprop.layer, 1, 2, str_1)); - DWINUI::drawString(20, 50, &buf); - } - if (fileprop.width) { - buf.setf(F("Volume: %sx%sx%s mm"), dtostrf(fileprop.width, 1, 1, str_1), dtostrf(fileprop.length, 1, 1, str_2), dtostrf(fileprop.height, 1, 1, str_3)); - DWINUI::drawString(20, 70, &buf); - } - DWINUI::drawButton(BTN_Print, 26, 290); - DWINUI::drawButton(BTN_Cancel, 146, 290); - Preview_Show(); - drawSelectHighlight(true, 290); - dwinUpdateLCD(); - } - else { +void Preview::drawFromSD() { + if (!hasPreview()) { hmiFlag.select_flag = 1; wait_for_user = false; + return; + } + + MString<45> buf; + dwinDrawRectangle(1, hmiData.colorBackground, 0, 0, DWIN_WIDTH, STATUS_Y - 1); + if (fileprop.time) { + buf.setf(F("Estimated time: %i:%02i"), (uint16_t)fileprop.time / 3600, ((uint16_t)fileprop.time % 3600) / 60); + DWINUI::drawString(20, 10, &buf); + } + if (fileprop.filament) { + buf.set(F("Filament used: "), p_float_t(fileprop.filament, 2), F(" m")); + DWINUI::drawString(20, 30, &buf); + } + if (fileprop.layer) { + buf.set(F("Layer height: "), p_float_t(fileprop.layer, 2), F(" mm")); + DWINUI::drawString(20, 50, &buf); + } + if (fileprop.width) { + buf.set(F("Volume: "), p_float_t(fileprop.width, 1), 'x', p_float_t(fileprop.length, 1), 'x', p_float_t(fileprop.height, 1), F(" mm")); + DWINUI::drawString(20, 70, &buf); } + DWINUI::drawButton(BTN_Print, 26, 290); + DWINUI::drawButton(BTN_Cancel, 146, 290); + show(); + drawSelectHighlight(true, 290); + dwinUpdateLCD(); } -void Preview_Invalidate() { +void Preview::invalidate() { fileprop.thumbsize = 0; } -bool Preview_Valid() { +bool Preview::valid() { return !!fileprop.thumbsize; } -void Preview_Show() { - const uint8_t xpos = (DWIN_WIDTH - fileprop.thumbwidth) / 2; - const uint8_t ypos = (205 - fileprop.thumbheight) / 2 + 87; +void Preview::show() { + const uint8_t xpos = ((DWIN_WIDTH) - fileprop.thumbwidth) / 2, + ypos = (205 - fileprop.thumbheight) / 2 + 87; dwinIconShow(xpos, ypos, 0x00); } -#endif // HAS_GCODE_PREVIEW && DWIN_LCD_PROUI +#endif // DWIN_LCD_PROUI && HAS_GCODE_PREVIEW diff --git a/Marlin/src/lcd/e3v2/proui/gcode_preview.h b/Marlin/src/lcd/e3v2/proui/gcode_preview.h index b90180db2912..91466424475d 100644 --- a/Marlin/src/lcd/e3v2/proui/gcode_preview.h +++ b/Marlin/src/lcd/e3v2/proui/gcode_preview.h @@ -28,7 +28,14 @@ * Date: 2022/09/03 */ -void Preview_DrawFromSD(); -void Preview_Invalidate(); -bool Preview_Valid(); -void Preview_Show(); +class Preview { +public: + static void drawFromSD(); + static void invalidate(); + static bool valid(); + static void show(); +private: + static bool hasPreview(); +}; + +extern Preview preview; From 8fa6a4da2eebc1dbe120dcac87b159e389e17dc3 Mon Sep 17 00:00:00 2001 From: Andrew <18502096+classicrocker883@users.noreply.github.com> Date: Fri, 25 Aug 2023 19:33:49 -0400 Subject: [PATCH 23/25] =?UTF-8?q?=F0=9F=9A=B8=20Fixes=20for=20ProUI,=20Jye?= =?UTF-8?q?rsUI,=20backlight,=20etc.=20(#26086)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp | 1 + Marlin/src/inc/SanityCheck.h | 6 +- Marlin/src/lcd/e3v2/common/encoder.cpp | 18 ++++- Marlin/src/lcd/e3v2/jyersui/dwin.cpp | 35 ++++---- .../lcd/e3v2/proui/{base64.hpp => base64.h} | 14 ++-- Marlin/src/lcd/e3v2/proui/bedlevel_tools.cpp | 48 ++++------- Marlin/src/lcd/e3v2/proui/dwin.cpp | 79 +++++++++++-------- Marlin/src/lcd/e3v2/proui/dwin.h | 4 +- Marlin/src/lcd/e3v2/proui/dwinui.cpp | 40 ++++------ Marlin/src/lcd/e3v2/proui/dwinui.h | 8 +- Marlin/src/lcd/e3v2/proui/gcode_preview.cpp | 4 +- Marlin/src/lcd/e3v2/proui/meshviewer.cpp | 42 ++++------ Marlin/src/lcd/e3v2/proui/plot.cpp | 29 ++++--- Marlin/src/lcd/e3v2/proui/plot.h | 6 +- Marlin/src/lcd/marlinui.cpp | 2 +- buildroot/share/cmake/CMakeLists.txt | 18 ++++- 16 files changed, 177 insertions(+), 177 deletions(-) rename Marlin/src/lcd/e3v2/proui/{base64.hpp => base64.h} (96%) diff --git a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp index ed4363acbc0a..15e36ac678f7 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp +++ b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp @@ -772,6 +772,7 @@ void unified_bed_leveling::shift_mesh_height() { const grid_count_t point_num = (GRID_MAX_POINTS - count) + 1; SERIAL_ECHOLNPGM("Probing mesh point ", point_num, "/", GRID_MAX_POINTS, "."); TERN_(HAS_STATUS_MESSAGE, ui.status_printf(0, F(S_FMT " %i/%i"), GET_TEXT(MSG_PROBING_POINT), point_num, int(GRID_MAX_POINTS))); + TERN_(LCD_BACKLIGHT_TIMEOUT_MINS, ui.refresh_backlight_timeout()); #if HAS_MARLINUI_MENU if (ui.button_pressed()) { diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index c68f85720e9a..b2b336bd17a7 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -2722,7 +2722,7 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L #endif #if LCD_BACKLIGHT_TIMEOUT_MINS - #if !HAS_ENCODER_ACTION + #if !HAS_ENCODER_ACTION && DISABLED(HAS_DWIN_E3V2) #error "LCD_BACKLIGHT_TIMEOUT_MINS requires an LCD with encoder or keypad." #elif ENABLED(NEOPIXEL_BKGD_INDEX_FIRST) #if PIN_EXISTS(LCD_BACKLIGHT) @@ -2730,8 +2730,8 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L #elif ENABLED(NEOPIXEL_BKGD_ALWAYS_ON) #error "LCD_BACKLIGHT_TIMEOUT is not compatible with NEOPIXEL_BKGD_ALWAYS_ON." #endif - #elif !PIN_EXISTS(LCD_BACKLIGHT) - #error "LCD_BACKLIGHT_TIMEOUT_MINS requires either LCD_BACKLIGHT_PIN or NEOPIXEL_BKGD_INDEX_FIRST." + #elif !PIN_EXISTS(LCD_BACKLIGHT) && DISABLED(HAS_DWIN_E3V2) + #error "LCD_BACKLIGHT_TIMEOUT_MINS requires LCD_BACKLIGHT_PIN, NEOPIXEL_BKGD_INDEX_FIRST, or an Ender-3 V2 DWIN LCD." #endif #endif diff --git a/Marlin/src/lcd/e3v2/common/encoder.cpp b/Marlin/src/lcd/e3v2/common/encoder.cpp index 2ff67059e98d..eb064950ec59 100644 --- a/Marlin/src/lcd/e3v2/common/encoder.cpp +++ b/Marlin/src/lcd/e3v2/common/encoder.cpp @@ -87,7 +87,13 @@ EncoderState encoderReceiveAnalyze() { #if PIN_EXISTS(LCD_LED) //LED_Action(); #endif - if (!ui.backlight) ui.refresh_brightness(); + #if LCD_BACKLIGHT_TIMEOUT_MINS + ui.refresh_backlight_timeout(); + #endif + if (!ui.backlight) { + ui.refresh_brightness(); + return ENCODER_DIFF_NO; + } const bool was_waiting = wait_for_user; wait_for_user = false; return was_waiting ? ENCODER_DIFF_NO : ENCODER_DIFF_ENTER; @@ -154,6 +160,12 @@ EncoderState encoderReceiveAnalyze() { temp_diff = 0; } + if (temp_diffState != ENCODER_DIFF_NO) { + #if LCD_BACKLIGHT_TIMEOUT_MINS + ui.refresh_backlight_timeout(); + #endif + if (!ui.backlight) ui.refresh_brightness(); + } return temp_diffState; } @@ -164,9 +176,9 @@ EncoderState encoderReceiveAnalyze() { // LED light operation void LED_Action() { - LED_Control(RGB_SCALE_WARM_WHITE,0x0F); + LED_Control(RGB_SCALE_WARM_WHITE, 0x0F); delay(30); - LED_Control(RGB_SCALE_WARM_WHITE,0x00); + LED_Control(RGB_SCALE_WARM_WHITE, 0x00); } // LED initialization diff --git a/Marlin/src/lcd/e3v2/jyersui/dwin.cpp b/Marlin/src/lcd/e3v2/jyersui/dwin.cpp index 5156848a436f..e6768e1ef457 100644 --- a/Marlin/src/lcd/e3v2/jyersui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/jyersui/dwin.cpp @@ -341,20 +341,14 @@ class TextScroller { } float getMaxValue() { - float max = __FLT_MIN__; - GRID_LOOP(x, y) { - if (!isnan(bedlevel.z_values[x][y]) && bedlevel.z_values[x][y] > max) - max = bedlevel.z_values[x][y]; - } + float max = -(__FLT_MAX__); + GRID_LOOP(x, y) { const float z = bedlevel.z_values[x][y]; if (!isnan(z)) NOLESS(max, z); } return max; } float getMinValue() { float min = __FLT_MAX__; - GRID_LOOP(x, y) { - if (!isnan(bedlevel.z_values[x][y]) && bedlevel.z_values[x][y] < min) - min = bedlevel.z_values[x][y]; - } + GRID_LOOP(x, y) { const float z = bedlevel.z_values[x][y]; if (!isnan(z)) NOMORE(min, z); } return min; } @@ -363,7 +357,7 @@ class TextScroller { const uint16_t total_width_px = DWIN_WIDTH - padding_x - padding_x, cell_width_px = total_width_px / (GRID_MAX_POINTS_X), cell_height_px = total_width_px / (GRID_MAX_POINTS_Y); - const float v_max = abs(getMaxValue()), v_min = abs(getMinValue()), range = _MAX(v_min, v_max); + const float v_max = abs(getMaxValue()), v_min = abs(getMinValue()), rmax = _MAX(v_min, v_max); // Clear background from previous selection and select new square dwinDrawRectangle(1, COLOR_BG_BLACK, _MAX(0, padding_x - gridline_width), _MAX(0, padding_y_top - gridline_width), padding_x + total_width_px, padding_y_top + total_width_px); @@ -381,11 +375,11 @@ class TextScroller { const auto end_x_px = start_x_px + cell_width_px - 1 - gridline_width; const auto start_y_px = padding_y_top + (GRID_MAX_POINTS_Y - y - 1) * cell_height_px; const auto end_y_px = start_y_px + cell_height_px - 1 - gridline_width; - dwinDrawRectangle(1, // RGB565 colors: http://www.barth-dev.de/online/rgb565-color-picker/ - isnan(bedlevel.z_values[x][y]) ? COLOR_GREY : ( // gray if undefined + dwinDrawRectangle(1, // RGB565 colors: http://www.barth-dev.de/online/rgb565-color-picker/ + isnan(bedlevel.z_values[x][y]) ? COLOR_GREY : ( // gray if undefined (bedlevel.z_values[x][y] < 0 ? - (uint16_t)round(0x1F * -bedlevel.z_values[x][y] / (!viewer_asymmetric_range ? range : v_min)) << 11 : // red if mesh point value is negative - (uint16_t)round(0x3F * bedlevel.z_values[x][y] / (!viewer_asymmetric_range ? range : v_max)) << 5) | // green if mesh point value is positive + (uint16_t)round(0x1F * -bedlevel.z_values[x][y] / (!viewer_asymmetric_range ? rmax : v_min)) << 11 : // red if mesh point value is negative + (uint16_t)round(0x3F * bedlevel.z_values[x][y] / (!viewer_asymmetric_range ? rmax : v_max)) << 5) | // green if mesh point value is positive _MIN(0x1F, (((uint8_t)abs(bedlevel.z_values[x][y]) / 10) * 4))), // + blue stepping for every mm start_x_px, start_y_px, end_x_px, end_y_px ); @@ -421,16 +415,17 @@ class TextScroller { v_min = abs(getMinValue()), v_max = abs(getMaxValue()); if (viewer_asymmetric_range) { - if (v_min > 3e+10F) v_min = 0.0000001; - if (v_max > 3e+10F) v_max = 0.0000001; + if (v_min > 3e+10f) v_min = 0.0000001; + if (v_max > 3e+10f) v_max = 0.0000001; v1 = -v_min; v2 = v_max; } else { - float range = _MAX(v_min, v_max); - if (range > 3e+10F) range = 0.0000001; - v1 = -range; - v2 = range; + float rmax = _MAX(v_min, v_max), rmin = _MIN(v_min, v_max); + if (rmax > 3e+10f) rmax = 0.0000001; + if (rmin > 3e+10f) rmin = 0.0000001; + v1 = -rmax; + v2 = rmin; } jyersDWIN.updateStatus(TS(F("Red "), p_float_t(v1, 3) , F("..0.."), p_float_t(v2, 3), F(" Green"))); drawing_mesh = false; diff --git a/Marlin/src/lcd/e3v2/proui/base64.hpp b/Marlin/src/lcd/e3v2/proui/base64.h similarity index 96% rename from Marlin/src/lcd/e3v2/proui/base64.hpp rename to Marlin/src/lcd/e3v2/proui/base64.h index a51cca7c52ec..520d0d7d7621 100644 --- a/Marlin/src/lcd/e3v2/proui/base64.hpp +++ b/Marlin/src/lcd/e3v2/proui/base64.h @@ -8,9 +8,7 @@ * Changed unsigned int to uint16_t for use in the professional Ender-3V2/S1 firmware * Url: https://www.arduino.cc/reference/en/libraries/base64/ */ - -#ifndef BASE64_H_INCLUDED -#define BASE64_H_INCLUDED +#pragma once /* binary_to_base64: * Description: @@ -135,11 +133,11 @@ uint16_t decode_base64_length(unsigned char input[], uint16_t input_length) { } input_length = input - start; - return input_length/4*3 + (input_length % 4 ? input_length % 4 - 1 : 0); + return input_length / 4 * 3 + (input_length % 4 ? input_length % 4 - 1 : 0); } uint16_t encode_base64(unsigned char input[], uint16_t input_length, unsigned char output[]) { - uint16_t full_sets = input_length/3; + uint16_t full_sets = input_length / 3; // While there are still full sets of 24 bits... for (uint16_t i = 0; i < full_sets; ++i) { @@ -152,7 +150,7 @@ uint16_t encode_base64(unsigned char input[], uint16_t input_length, unsigned ch output += 4; } - switch(input_length % 3) { + switch (input_length % 3) { case 0: output[0] = '\0'; break; @@ -192,7 +190,7 @@ uint16_t decode_base64(unsigned char input[], uint16_t input_length, unsigned ch output += 3; } - switch(output_length % 3) { + switch (output_length % 3) { case 1: output[0] = base64_to_binary(input[0]) << 2 | base64_to_binary(input[1]) >> 4; break; @@ -204,5 +202,3 @@ uint16_t decode_base64(unsigned char input[], uint16_t input_length, unsigned ch return output_length; } - -#endif // ifndef diff --git a/Marlin/src/lcd/e3v2/proui/bedlevel_tools.cpp b/Marlin/src/lcd/e3v2/proui/bedlevel_tools.cpp index bd2f8a88e6a6..db6c76269ca8 100644 --- a/Marlin/src/lcd/e3v2/proui/bedlevel_tools.cpp +++ b/Marlin/src/lcd/e3v2/proui/bedlevel_tools.cpp @@ -66,7 +66,6 @@ BedLevelTools bedLevelTools; #if ENABLED(USE_GRID_MESHVIEWER) - bool BedLevelTools::viewer_asymmetric_range = false; bool BedLevelTools::viewer_print_value = false; #endif bool BedLevelTools::goto_mesh_value = false; @@ -186,20 +185,14 @@ void BedLevelTools::meshReset() { // Accessors float BedLevelTools::getMaxValue() { - float max = __FLT_MAX__ * -1; - GRID_LOOP(x, y) { - if (!isnan(bedlevel.z_values[x][y]) && bedlevel.z_values[x][y] > max) - max = bedlevel.z_values[x][y]; - } + float max = -(__FLT_MAX__); + GRID_LOOP(x, y) { const float z = bedlevel.z_values[x][y]; if (!isnan(z)) NOLESS(max, z); } return max; } float BedLevelTools::getMinValue() { float min = __FLT_MAX__; - GRID_LOOP(x, y) { - if (!isnan(bedlevel.z_values[x][y]) && bedlevel.z_values[x][y] < min) - min = bedlevel.z_values[x][y]; - } + GRID_LOOP(x, y) { const float z = bedlevel.z_values[x][y]; if (!isnan(z)) NOMORE(min, z); } return min; } @@ -221,7 +214,7 @@ bool BedLevelTools::meshValidate() { const uint16_t total_width_px = DWIN_WIDTH - padding_x - padding_x; const uint16_t cell_width_px = total_width_px / (GRID_MAX_POINTS_X); const uint16_t cell_height_px = total_width_px / (GRID_MAX_POINTS_Y); - const float v_max = abs(getMaxValue()), v_min = abs(getMinValue()), range = _MAX(v_min, v_max); + const float v_max = abs(getMaxValue()), v_min = abs(getMinValue()), rmax = _MAX(v_min, v_max); // Clear background from previous selection and select new square dwinDrawRectangle(1, COLOR_BG_BLACK, _MAX(0, padding_x - gridline_width), _MAX(0, padding_y_top - gridline_width), padding_x + total_width_px, padding_y_top + total_width_px); @@ -242,8 +235,8 @@ bool BedLevelTools::meshValidate() { dwinDrawRectangle(1, // RGB565 colors: http://www.barth-dev.de/online/rgb565-color-picker/ isnan(bedlevel.z_values[x][y]) ? COLOR_GREY : ( // gray if undefined (bedlevel.z_values[x][y] < 0 ? - (uint16_t)round(0x1F * -bedlevel.z_values[x][y] / (!viewer_asymmetric_range ? range : v_min)) << 11 : // red if mesh point value is negative - (uint16_t)round(0x3F * bedlevel.z_values[x][y] / (!viewer_asymmetric_range ? range : v_max)) << 5) | // green if mesh point value is positive + (uint16_t)round(0x1F * -bedlevel.z_values[x][y] / rmax) << 11 : // red if mesh point value is negative + (uint16_t)round(0x3F * bedlevel.z_values[x][y] / rmax) << 5) | // green if mesh point value is positive _MIN(0x1F, (((uint8_t)abs(bedlevel.z_values[x][y]) / 10) * 4))), // + blue stepping for every mm start_x_px, start_y_px, end_x_px, end_y_px ); @@ -252,7 +245,6 @@ bool BedLevelTools::meshValidate() { LCD_SERIAL.flushTX(); // Draw value text on - char buf[8]; const uint8_t fs = DWINUI::fontWidth(meshfont); if (viewer_print_value) { int8_t offset_x, offset_y = cell_height_px / 2 - fs; @@ -260,14 +252,15 @@ bool BedLevelTools::meshValidate() { dwinDrawString(false, meshfont, COLOR_WHITE, COLOR_BG_BLUE, start_x_px + cell_width_px / 2 - 5, start_y_px + offset_y, F("X")); } else { // has value - if (GRID_MAX_POINTS_X < (ENABLED(TJC_DISPLAY) ? 8 : 10)) - sprintf_P(buf, PSTR("%s"), dtostrf(abs(bedlevel.z_values[x][y]), 1, 2, str_1)); + MString<12> msg; + if ((GRID_MAX_POINTS_X) < TERN(TJC_DISPLAY, 8, 10)) + msg.set(p_float_t(abs(bedlevel.z_values[x][y]), 2)); else - sprintf_P(buf, PSTR("%02i"), (uint16_t)(abs(bedlevel.z_values[x][y] - (int16_t)bedlevel.z_values[x][y]) * 100)); - offset_x = cell_width_px / 2 - (fs/2) * (strlen(buf)) - 2; - if (!(GRID_MAX_POINTS_X < (ENABLED(TJC_DISPLAY) ? 8 : 10))) + msg.setf(F("%02i"), uint16_t(abs(bedlevel.z_values[x][y] - int16_t(bedlevel.z_values[x][y])) * 100)); + offset_x = cell_width_px / 2 - (fs / 2) * msg.length() - 2; + if ((GRID_MAX_POINTS_X) >= TERN(TJC_DISPLAY, 8, 10)) dwinDrawString(false, meshfont, COLOR_WHITE, COLOR_BG_BLUE, start_x_px - 2 + offset_x, start_y_px + offset_y, F(".")); - dwinDrawString(false, meshfont, COLOR_WHITE, COLOR_BG_BLUE, start_x_px + 1 + offset_x, start_y_px + offset_y, buf); + dwinDrawString(false, meshfont, COLOR_WHITE, COLOR_BG_BLUE, start_x_px + 1 + offset_x, start_y_px + offset_y, msg); } safe_delay(10); LCD_SERIAL.flushTX(); @@ -276,17 +269,10 @@ bool BedLevelTools::meshValidate() { } void BedLevelTools::setMeshViewerStatus() { // TODO: draw gradient with values as a legend instead - float v_max = abs(getMaxValue()), v_min = abs(getMinValue()), range = _MAX(v_min, v_max); - if (v_min > 3e+10f) v_min = 0.0000001; - if (v_max > 3e+10f) v_max = 0.0000001; - if (range > 3e+10f) range = 0.0000001; - ui.set_status( - &MString<45>( - F("Red "), p_float_t(viewer_asymmetric_range ? -v_min : -range, 3), - F("..0.."), p_float_t(viewer_asymmetric_range ? v_max : range, 3), - F(" Green") - ) - ); + float v_max = abs(getMaxValue()), v_min = abs(getMinValue()), rmax = _MAX(v_min, v_max), rmin = _MIN(v_min, v_max); + if (rmax > 3e+10f) rmax = 0.0000001; + if (rmin > 3e+10f) rmin = 0.0000001; + ui.set_status(&MString<47>(F("Red "), p_float_t(-rmax, 3), F("..0.."), p_float_t(rmin, 3), F(" Green"))); drawing_mesh = false; } diff --git a/Marlin/src/lcd/e3v2/proui/dwin.cpp b/Marlin/src/lcd/e3v2/proui/dwin.cpp index af69e8d3edfe..0f038a30b214 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/proui/dwin.cpp @@ -161,8 +161,8 @@ #define MIN_BEDTEMP 0 #define MAX_BEDTEMP BED_MAX_TARGET -#define DWIN_VAR_UPDATE_INTERVAL 1024 -#define DWIN_UPDATE_INTERVAL 1024 +#define DWIN_VAR_UPDATE_INTERVAL 500 +#define DWIN_UPDATE_INTERVAL 1000 #if HAS_MESH && HAS_BED_PROBE #define BABY_Z_VAR probe.offset.z @@ -1253,6 +1253,13 @@ void eachMomentUpdate() { static millis_t next_var_update_ms = 0, next_rts_update_ms = 0, next_status_update_ms = 0; const millis_t ms = millis(); + #if LCD_BACKLIGHT_TIMEOUT_MINS + if (ui.backlight_off_ms && ELAPSED(ms, ui.backlight_off_ms)) { + turnOffBacklight(); // Backlight off + ui.backlight_off_ms = 0; + } + #endif + if (ELAPSED(ms, next_var_update_ms)) { next_var_update_ms = ms + DWIN_VAR_UPDATE_INTERVAL; blink = !blink; @@ -1276,7 +1283,7 @@ void eachMomentUpdate() { #endif if (ELAPSED(ms, next_status_update_ms)) { - next_status_update_ms = ms + 500; + next_status_update_ms = ms + DWIN_VAR_UPDATE_INTERVAL; dwinDrawStatusMessage(); #if ENABLED(SCROLL_LONG_FILENAMES) if (isMenu(fileMenu)) fileMenuIdle(); @@ -2220,6 +2227,10 @@ void setMoveZ() { hmiValue.axis = Z_AXIS; setPFloatOnClick(Z_MIN_POS, Z_MAX_POS, #endif +#if LCD_BACKLIGHT_TIMEOUT_MINS + void setTimer() { setPIntOnClick(ui.backlight_timeout_min, ui.backlight_timeout_max); } +#endif + #if HAS_FILAMENT_SENSOR void setRunoutEnable() { runout.reset(); @@ -2258,6 +2269,13 @@ void setSpeed() { setPIntOnClick(MIN_PRINT_SPEED, MAX_PRINT_SPEED); } void setFanSpeed() { setIntOnClick(0, 255, thermalManager.fan_speed[0], applyFanSpeed); } #endif +#if ENABLED(NOZZLE_PARK_FEATURE) + void parkHead() { + LCD_MESSAGE(MSG_FILAMENT_PARK_ENABLED); + queue.inject(F("G28O\nG27")); + } +#endif + #if ENABLED(ADVANCED_PAUSE_FEATURE) void changeFilament() { @@ -2265,13 +2283,6 @@ void setSpeed() { setPIntOnClick(MIN_PRINT_SPEED, MAX_PRINT_SPEED); } queue.inject(F("M600 B2")); } - #if ENABLED(NOZZLE_PARK_FEATURE) - void parkHead() { - LCD_MESSAGE(MSG_FILAMENT_PARK_ENABLED); - queue.inject(F("G28O\nG27")); - } - #endif - #if ENABLED(FILAMENT_LOAD_UNLOAD_GCODES) void unloadFilament() { LCD_MESSAGE(MSG_FILAMENTUNLOAD); @@ -2979,9 +2990,7 @@ void drawPrepareMenu() { checkkey = ID_Menu; if (SET_MENU_R(prepareMenu, selrect({133, 1, 28, 13}), MSG_PREPARE, 10 + PREHEAT_COUNT)) { BACK_ITEM(gotoMainMenu); - #if ENABLED(ADVANCED_PAUSE_FEATURE) - MENU_ITEM(ICON_FilMan, MSG_FILAMENT_MAN, onDrawSubMenu, drawFilamentManMenu); - #endif + MENU_ITEM(ICON_FilMan, MSG_FILAMENT_MAN, onDrawSubMenu, drawFilamentManMenu); MENU_ITEM(ICON_Axis, MSG_MOVE_AXIS, onDrawMoveSubMenu, drawMoveMenu); #if ENABLED(LCD_BED_TRAMMING) MENU_ITEM(ICON_Tram, MSG_BED_TRAMMING, onDrawSubMenu, drawTrammingMenu); @@ -3072,7 +3081,7 @@ void drawControlMenu() { void drawAdvancedSettingsMenu() { checkkey = ID_Menu; - if (SET_MENU(advancedSettingsMenu, MSG_ADVANCED_SETTINGS, 23)) { + if (SET_MENU(advancedSettingsMenu, MSG_ADVANCED_SETTINGS, 24)) { BACK_ITEM(gotoMainMenu); #if ENABLED(EEPROM_SETTINGS) MENU_ITEM(ICON_WriteEEPROM, MSG_STORE_EEPROM, onDrawMenuItem, writeEEPROM); @@ -3109,6 +3118,9 @@ void drawAdvancedSettingsMenu() { #if HAS_LOCKSCREEN MENU_ITEM(ICON_Lock, MSG_LOCKSCREEN, onDrawMenuItem, dwinLockScreen); #endif + #if LCD_BACKLIGHT_TIMEOUT_MINS + EDIT_ITEM(ICON_Brightness, MSG_SCREEN_TIMEOUT, onDrawPIntMenu, setTimer, &ui.backlight_timeout_minutes); + #endif #if ENABLED(SOUND_MENU_ITEM) EDIT_ITEM(ICON_Sound, MSG_SOUND_ENABLE, onDrawChkbMenu, setEnableSound, &ui.sound_on); #endif @@ -3330,6 +3342,9 @@ void drawTuneMenu() { EDIT_ITEM(ICON_Brightness, MSG_BRIGHTNESS, onDrawPInt8Menu, setBrightness, &ui.brightness); MENU_ITEM(ICON_Brightness, MSG_BRIGHTNESS_OFF, onDrawMenuItem, turnOffBacklight); #endif + #if LCD_BACKLIGHT_TIMEOUT_MINS + EDIT_ITEM(ICON_Brightness, MSG_SCREEN_TIMEOUT, onDrawPIntMenu, setTimer, &ui.backlight_timeout_minutes); + #endif #if ENABLED(CASE_LIGHT_MENU) EDIT_ITEM(ICON_CaseLight, MSG_CASE_LIGHT, onDrawChkbMenu, setCaseLight, &caselight.on); #if CASELIGHT_USES_BRIGHTNESS @@ -3452,9 +3467,7 @@ void drawMotionMenu() { updateMenu(motionMenu); } -#if ENABLED(ADVANCED_PAUSE_FEATURE) - - #if HAS_PREHEAT +#if ALL(ADVANCED_PAUSE_FEATURE, HAS_PREHEAT) void drawPreheatHotendMenu() { checkkey = ID_Menu; @@ -3466,28 +3479,28 @@ void drawMotionMenu() { updateMenu(preheatHotendMenu); } - #endif +#endif - void drawFilamentManMenu() { - checkkey = ID_Menu; - if (SET_MENU(filamentMenu, MSG_FILAMENT_MAN, 6)) { - BACK_ITEM(drawPrepareMenu); - #if ENABLED(NOZZLE_PARK_FEATURE) - MENU_ITEM(ICON_Park, MSG_FILAMENT_PARK_ENABLED, onDrawMenuItem, parkHead); - #endif +void drawFilamentManMenu() { + checkkey = ID_Menu; + if (SET_MENU(filamentMenu, MSG_FILAMENT_MAN, 6)) { + BACK_ITEM(drawPrepareMenu); + #if ENABLED(NOZZLE_PARK_FEATURE) + MENU_ITEM(ICON_Park, MSG_FILAMENT_PARK_ENABLED, onDrawMenuItem, parkHead); + #endif + #if ENABLED(ADVANCED_PAUSE_FEATURE) #if HAS_PREHEAT MENU_ITEM(ICON_SetEndTemp, MSG_PREHEAT_HOTEND, onDrawSubMenu, drawPreheatHotendMenu); #endif MENU_ITEM(ICON_FilMan, MSG_FILAMENTCHANGE, onDrawMenuItem, changeFilament); - #if ENABLED(FILAMENT_LOAD_UNLOAD_GCODES) - MENU_ITEM(ICON_FilUnload, MSG_FILAMENTUNLOAD, onDrawMenuItem, unloadFilament); - MENU_ITEM(ICON_FilLoad, MSG_FILAMENTLOAD, onDrawMenuItem, loadFilament); - #endif - } - updateMenu(filamentMenu); + #endif + #if ENABLED(FILAMENT_LOAD_UNLOAD_GCODES) + MENU_ITEM(ICON_FilUnload, MSG_FILAMENTUNLOAD, onDrawMenuItem, unloadFilament); + MENU_ITEM(ICON_FilLoad, MSG_FILAMENTLOAD, onDrawMenuItem, loadFilament); + #endif } - -#endif + updateMenu(filamentMenu); +} #if ENABLED(MESH_BED_LEVELING) diff --git a/Marlin/src/lcd/e3v2/proui/dwin.h b/Marlin/src/lcd/e3v2/proui/dwin.h index 21b72d321a60..9c11cc49167f 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.h +++ b/Marlin/src/lcd/e3v2/proui/dwin.h @@ -321,9 +321,7 @@ void drawFilSetMenu(); #endif void drawTuneMenu(); void drawMotionMenu(); -#if ENABLED(ADVANCED_PAUSE_FEATURE) - void drawFilamentManMenu(); -#endif +void drawFilamentManMenu(); #if ENABLED(MESH_BED_LEVELING) void drawManualMeshMenu(); #endif diff --git a/Marlin/src/lcd/e3v2/proui/dwinui.cpp b/Marlin/src/lcd/e3v2/proui/dwinui.cpp index 72b66fb5b3e4..7e94fc3e5633 100644 --- a/Marlin/src/lcd/e3v2/proui/dwinui.cpp +++ b/Marlin/src/lcd/e3v2/proui/dwinui.cpp @@ -263,7 +263,7 @@ void DWINUI::drawCircle(uint16_t color, uint16_t x, uint16_t y, uint8_t r) { // x: the abscissa of the center of the circle // y: ordinate of the center of the circle // r: circle radius -void DWINUI::drawFillCircle(uint16_t bcolor, uint16_t x,uint16_t y,uint8_t r) { +void DWINUI::drawFillCircle(uint16_t bcolor, uint16_t x, uint16_t y, uint8_t r) { dwinDrawLine(bcolor, x - r, y, x + r, y); uint16_t b = 1; while (b <= r) { @@ -280,12 +280,12 @@ void DWINUI::drawFillCircle(uint16_t bcolor, uint16_t x,uint16_t y,uint8_t r) { // maxv : Maximum value // color1 : Start color // color2 : End color -uint16_t DWINUI::ColorInt(int16_t val, int16_t minv, int16_t maxv, uint16_t color1, uint16_t color2) { +uint16_t DWINUI::colorInt(int16_t val, int16_t minv, int16_t maxv, uint16_t color1, uint16_t color2) { uint8_t B, G, R; - const float n = float(val - minv) / (maxv - minv); - R = (1 - n) * GetRColor(color1) + n * GetRColor(color2); - G = (1 - n) * GetGColor(color1) + n * GetGColor(color2); - B = (1 - n) * GetBColor(color1) + n * GetBColor(color2); + const float n = float(val - minv) / (maxv - minv + 1); + R = (1.0f - n) * GetRColor(color1) + n * GetRColor(color2); + G = (1.0f - n) * GetGColor(color1) + n * GetGColor(color2); + B = (1.0f - n) * GetBColor(color1) + n * GetBColor(color2); return RGB(R, G, B); } @@ -293,27 +293,17 @@ uint16_t DWINUI::ColorInt(int16_t val, int16_t minv, int16_t maxv, uint16_t colo // val : Interpolator minv..maxv // minv : Minimum value // maxv : Maximum value -uint16_t DWINUI::RainbowInt(int16_t val, int16_t minv, int16_t maxv) { - uint8_t B, G, R; - const uint8_t maxB = 28, maxR = 28, maxG = 38; +uint16_t DWINUI::rainbowInt(int16_t val, int16_t minv, int16_t maxv) { const int16_t limv = _MAX(abs(minv), abs(maxv)); - float n = minv >= 0 ? float(val - minv) / (maxv - minv) : (float)val / limv; + float n = (minv >= 0) ? float(val - minv) / (maxv - minv + 1) : (float)val / limv; LIMIT(n, -1, 1); - if (n < 0) { - R = 0; - G = (1 + n) * maxG; - B = (-n) * maxB; - } - else if (n < 0.5) { - R = maxR * n * 2; - G = maxG; - B = 0; - } - else { - R = maxR; - G = maxG * (1 - n); - B = 0; - } + + constexpr uint8_t maxB = 28, maxR = 28, maxG = 38; + uint8_t R, G, B; + if (n <= -0.5f) { R = 0; G = maxG * (1.0f + n); B = maxB; } + else if (n <= 0.0f) { R = 0; G = maxG; B = maxB * (-n) * 2; } + else if (n < 0.5f) { R = maxR * n * 2; G = maxG; B = 0; } + else { R = maxR; G = maxG * (1.0f - n); B = 0; } return RGB(R, G, B); } diff --git a/Marlin/src/lcd/e3v2/proui/dwinui.h b/Marlin/src/lcd/e3v2/proui/dwinui.h index 9f8ab70e71b3..255b7ac60139 100644 --- a/Marlin/src/lcd/e3v2/proui/dwinui.h +++ b/Marlin/src/lcd/e3v2/proui/dwinui.h @@ -564,7 +564,7 @@ namespace DWINUI { // maxv : Maximum value // color1 : Start color // color2 : End color - uint16_t ColorInt(int16_t val, int16_t minv, int16_t maxv, uint16_t color1, uint16_t color2); + uint16_t colorInt(int16_t val, int16_t minv, int16_t maxv, uint16_t color1, uint16_t color2); // ------------------------- Buttons ------------------------------// @@ -593,13 +593,13 @@ namespace DWINUI { // val : Interpolator minv..maxv // minv : Minimum value // maxv : Maximum value - uint16_t RainbowInt(int16_t val, int16_t minv, int16_t maxv); + uint16_t rainbowInt(int16_t val, int16_t minv, int16_t maxv); // Write buffer data to the SRAM // addr: SRAM start address 0x0000-0x7FFF // length: Bytes to write // data: address of the buffer with data - inline void WriteToSRAM(uint16_t addr, uint16_t length, uint8_t *data) { + inline void writeToSRAM(uint16_t addr, uint16_t length, uint8_t *data) { dwinWriteToMem(0x5A, addr, length, data); } @@ -607,7 +607,7 @@ namespace DWINUI { // addr: Flash start address 0x0000-0x3FFF // length: Bytes to write // data: address of the buffer with data - inline void WriteToFlash(uint16_t addr, uint16_t length, uint8_t *data) { + inline void writeToFlash(uint16_t addr, uint16_t length, uint8_t *data) { dwinWriteToMem(0xA5, addr, length, data); } diff --git a/Marlin/src/lcd/e3v2/proui/gcode_preview.cpp b/Marlin/src/lcd/e3v2/proui/gcode_preview.cpp index 53b38b641e70..30c6f9f1f6c2 100644 --- a/Marlin/src/lcd/e3v2/proui/gcode_preview.cpp +++ b/Marlin/src/lcd/e3v2/proui/gcode_preview.cpp @@ -39,7 +39,7 @@ #include "../../../MarlinCore.h" // for wait_for_user #include "dwin.h" #include "dwin_popup.h" -#include "base64.hpp" +#include "base64.h" #define THUMBWIDTH 230 #define THUMBHEIGHT 180 @@ -160,7 +160,7 @@ bool Preview::hasPreview() { return false; } - uint8_t buf64[fileprop.thumbsize]; + uint8_t buf64[fileprop.thumbsize + 1]; uint16_t nread = 0; while (nread < fileprop.thumbsize) { const uint8_t c = card.get(); diff --git a/Marlin/src/lcd/e3v2/proui/meshviewer.cpp b/Marlin/src/lcd/e3v2/proui/meshviewer.cpp index 2781ccaa1df7..1c5f08bb4dfa 100644 --- a/Marlin/src/lcd/e3v2/proui/meshviewer.cpp +++ b/Marlin/src/lcd/e3v2/proui/meshviewer.cpp @@ -75,37 +75,29 @@ void MeshViewer::drawMeshGrid(const uint8_t csizex, const uint8_t csizey) { void MeshViewer::drawMeshPoint(const uint8_t x, const uint8_t y, const float z) { const uint8_t fs = DWINUI::fontWidth(meshfont); const int16_t v = isnan(z) ? 0 : round(z * 100); - NOLESS(max, z); - NOMORE(min, z); - const uint16_t color = DWINUI::RainbowInt(v, zmin, zmax); - DWINUI::drawFillCircle(color, px(x), py(y), r(_MAX(_MIN(v,zmax),zmin))); + NOLESS(max, z); NOMORE(min, z); + + const uint16_t color = DWINUI::rainbowInt(v, zmin, zmax); + DWINUI::drawFillCircle(color, px(x), py(y), r(_MAX(_MIN(v, zmax), zmin))); TERN_(TJC_DISPLAY, delay(100)); - if (sizex < (ENABLED(TJC_DISPLAY) ? 8 : 9)) { - if (v == 0) DWINUI::drawFloat(meshfont, 1, 2, px(x) - 2*fs, py(y) - fs, 0); - else DWINUI::drawSignedFloat(meshfont, 1, 2, px(x) - 3*fs, py(y) - fs, z); + + const uint16_t fy = py(y) - fs; + if (sizex < TERN(TJC_DISPLAY, 8, 9)) { + if (v == 0) DWINUI::drawFloat(meshfont, 1, 2, px(x) - 2 * fs, fy, 0); + else DWINUI::drawSignedFloat(meshfont, 1, 2, px(x) - 3 * fs, fy, z); } else { - char str_1[9]; - str_1[0] = '\0'; + char msg[9]; msg[0] = '\0'; switch (v) { case -999 ... -100: - DWINUI::drawSignedFloat(meshfont, 1, 1, px(x) - 3*fs, py(y) - fs, z); - break; - case -99 ... -1: - sprintf_P(str_1, PSTR("-.%02i"), -v); - break; - case 0: - dwinDrawString(false, meshfont, DWINUI::textColor, DWINUI::backColor, px(x) - 4, py(y) - fs, "0"); - break; - case 1 ... 99: - sprintf_P(str_1, PSTR(".%02i"), v); - break; - case 100 ... 999: - DWINUI::drawSignedFloat(meshfont, 1, 1, px(x) - 3 * fs, py(y) - fs, z); - break; + case 100 ... 999: DWINUI::drawSignedFloat(meshfont, 1, 1, px(x) - 3 * fs, fy, z); break; + case -99 ... -1: sprintf_P(msg, PSTR("-.%2i"), -v); break; + case 1 ... 99: sprintf_P(msg, PSTR( ".%2i"), v); break; + default: + dwinDrawString(false, meshfont, DWINUI::textColor, DWINUI::backColor, px(x) - 4, fy, "0"); + return; } - if (str_1[0]) - dwinDrawString(false, meshfont, DWINUI::textColor, DWINUI::backColor, px(x) - 2 * fs, py(y) - fs, str_1); + dwinDrawString(false, meshfont, DWINUI::textColor, DWINUI::backColor, px(x) - 2 * fs, fy, msg); } } diff --git a/Marlin/src/lcd/e3v2/proui/plot.cpp b/Marlin/src/lcd/e3v2/proui/plot.cpp index 95d8ec291d1b..3ea0d555fe62 100644 --- a/Marlin/src/lcd/e3v2/proui/plot.cpp +++ b/Marlin/src/lcd/e3v2/proui/plot.cpp @@ -38,38 +38,41 @@ #define Plot_Bg_Color RGB( 1, 12, 8) -PlotClass plot; +Plot plot; -uint16_t grphpoints, r, x2, y2 = 0; -frame_rect_t grphframe = {0}; +uint16_t graphpoints, r, x2, y2 = 0; +frame_rect_t graphframe = {0}; float scale = 0; -void PlotClass::draw(const frame_rect_t &frame, const_float_t max, const_float_t ref/*=0*/) { - grphframe = frame; - grphpoints = 0; +void Plot::draw(const frame_rect_t &frame, const_celsius_float_t max, const_float_t ref/*=0*/) { + graphframe = frame; + graphpoints = 0; scale = frame.h / max; x2 = frame.x + frame.w - 1; y2 = frame.y + frame.h - 1; r = round((y2) - ref * scale); DWINUI::drawBox(1, Plot_Bg_Color, frame); - for (uint8_t i = 1; i < 4; i++) if (i * 50 < frame.w) dwinDrawVLine(COLOR_LINE, i * 50 + frame.x, frame.y, frame.h); + for (uint8_t i = 1; i < 4; i++) if (i * 60 < frame.w) dwinDrawVLine(COLOR_LINE, i * 60 + frame.x, frame.y, frame.h); DWINUI::drawBox(0, COLOR_WHITE, DWINUI::extendFrame(frame, 1)); dwinDrawHLine(COLOR_RED, frame.x, r, frame.w); } -void PlotClass::update(const_float_t value) { +void Plot::update(const_float_t value) { if (!scale) return; const uint16_t y = round((y2) - value * scale); - if (grphpoints < grphframe.w) { - dwinDrawPoint(COLOR_YELLOW, 1, 1, grphpoints + grphframe.x, y); + if (graphpoints < graphframe.w) { + dwinDrawPoint(COLOR_YELLOW, 1, 1, graphpoints + graphframe.x, y); } else { - dwinFrameAreaMove(1, 0, 1, Plot_Bg_Color, grphframe.x, grphframe.y, x2, y2); - if ((grphpoints % 50) == 0) dwinDrawVLine(COLOR_LINE, x2 - 1, grphframe.y + 1, grphframe.h - 2); + dwinFrameAreaMove(1, 0, 1, Plot_Bg_Color, graphframe.x, graphframe.y, x2, y2); + if ((graphpoints % 60) == 0) dwinDrawVLine(COLOR_LINE, x2 - 1, graphframe.y + 1, graphframe.h - 2); dwinDrawPoint(COLOR_RED, 1, 1, x2 - 1, r); dwinDrawPoint(COLOR_YELLOW, 1, 1, x2 - 1, y); } - grphpoints++; + graphpoints++; + #if LCD_BACKLIGHT_TIMEOUT_MINS + ui.refresh_backlight_timeout(); + #endif } #endif // DWIN_LCD_PROUI && PROUI_TUNING_GRAPH diff --git a/Marlin/src/lcd/e3v2/proui/plot.h b/Marlin/src/lcd/e3v2/proui/plot.h index bc0e3a774ccd..275f0453becc 100644 --- a/Marlin/src/lcd/e3v2/proui/plot.h +++ b/Marlin/src/lcd/e3v2/proui/plot.h @@ -30,10 +30,10 @@ #include "dwinui.h" -class PlotClass { +class Plot { public: - static void draw(const frame_rect_t &frame, const_float_t max, const_float_t ref=0); + static void draw(const frame_rect_t &frame, const_celsius_float_t max, const_float_t ref=0); static void update(const_float_t value); }; -extern PlotClass plot; +extern Plot plot; diff --git a/Marlin/src/lcd/marlinui.cpp b/Marlin/src/lcd/marlinui.cpp index 69a8e2336365..1076d40de014 100644 --- a/Marlin/src/lcd/marlinui.cpp +++ b/Marlin/src/lcd/marlinui.cpp @@ -190,7 +190,7 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP; millis_t MarlinUI::backlight_off_ms = 0; void MarlinUI::refresh_backlight_timeout() { - backlight_off_ms = backlight_timeout_minutes ? millis() + backlight_timeout_minutes * 60UL * 1000UL : 0; + backlight_off_ms = backlight_timeout_minutes ? millis() + MIN_TO_MS(backlight_timeout_minutes) : 0; #ifdef NEOPIXEL_BKGD_INDEX_FIRST neo.reset_background_color(); neo.show(); diff --git a/buildroot/share/cmake/CMakeLists.txt b/buildroot/share/cmake/CMakeLists.txt index b861f79b952b..0316c7fc0bcf 100644 --- a/buildroot/share/cmake/CMakeLists.txt +++ b/buildroot/share/cmake/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) #====================================================================# # Usage under Linux: # # # @@ -82,7 +82,7 @@ message("-- Running CMake version: " ${CMAKE_VERSION}) # Replace the CMake Ver. in the Arduino.cmake file(READ "${CMAKE_CURRENT_LIST_DIR}/marlin-cmake/Platform/Arduino.cmake" ORIGINAL_FILE_CONTENTS) -string(REPLACE "cmake_minimum_required(VERSION 2.8.5)" "cmake_minimum_required(VERSION 2.8.12)" NEW_FILE_CONTENTS "${ORIGINAL_FILE_CONTENTS}") +string(REPLACE "cmake_minimum_required(VERSION 2.8.5)" "cmake_minimum_required(VERSION 3.5)" NEW_FILE_CONTENTS "${ORIGINAL_FILE_CONTENTS}") file(WRITE "${CMAKE_CURRENT_LIST_DIR}/marlin-cmake/Platform/Arduino.cmake" "${NEW_FILE_CONTENTS}") set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_LIST_DIR}/marlin-cmake/modules) @@ -95,6 +95,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_LIST_DIR}/marlin-cma set(ARDUINO_SDK_PATH ${CMAKE_CURRENT_LIST_DIR}/arduino-1.8.19) #set(ARDUINO_SDK_PATH /Applications/Arduino.app/Contents/Java) #set(ARDUINO_SDK_PATH $HOME/ArduinoAddons/Arduino_1.6.x) + #====================================================================# # Set included cmake files # #====================================================================# @@ -108,6 +109,19 @@ set(CMAKE_TOOLCHAIN_FILE ${CMAKE_CURRENT_LIST_DIR}/marlin-cmake/toolchain/Arduin #====================================================================# # Setup Project # +# # +# If you receive this error: # +# 'Unknown CMake command "_cmake_record_install_prefix".' # +# # +# Go to the file in your CMake directory. # +# # +# For Windows: cmake\Modules\Platform\WindowsPaths.cmake # +# For Linux: cmake/Modules/Platform/UnixPaths.cmake # +# # +# Comment out "_cmake_record_install_prefix()" # +# - OR - # +# Add "include(CMakeSystemSpecificInformation)" above the line. # +# # #====================================================================# project(Marlin C CXX) From 209fadd2e6039e050e33eaed9c59465ffa5c30f0 Mon Sep 17 00:00:00 2001 From: jaysuk Date: Sat, 26 Aug 2023 00:43:57 +0100 Subject: [PATCH 24/25] =?UTF-8?q?=E2=9C=A8=20Mellow=20Fly=20E3=20V2=20(STM?= =?UTF-8?q?32F407VG)=20(#26081)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/core/boards.h | 1 + Marlin/src/pins/pins.h | 2 + Marlin/src/pins/stm32f4/pins_CREALITY_F401.h | 2 +- .../src/pins/stm32f4/pins_MELLOW_FLY_E3_V2.h | 521 ++++++++++++++++++ .../pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h | 2 +- ini/stm32f4.ini | 19 + 6 files changed, 545 insertions(+), 2 deletions(-) create mode 100644 Marlin/src/pins/stm32f4/pins_MELLOW_FLY_E3_V2.h diff --git a/Marlin/src/core/boards.h b/Marlin/src/core/boards.h index 5e404fc85041..0c27fbbe25bf 100644 --- a/Marlin/src/core/boards.h +++ b/Marlin/src/core/boards.h @@ -459,6 +459,7 @@ #define BOARD_CREALITY_F401RE 5245 // Creality CR4NS200141C13 (STM32F401RE) as found in the Ender-5 S1 #define BOARD_BLACKPILL_CUSTOM 5246 // Custom board based on STM32F401CDU6. #define BOARD_I3DBEEZ9_V1 5247 // I3DBEEZ9 V1 (STM32F407ZG) +#define BOARD_MELLOW_FLY_E3_V2 5248 // Mellow Fly E3 V2 (STM32F407VG) // // ARM Cortex-M7 diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index fe356520d8f7..48405335ef20 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -804,6 +804,8 @@ #include "stm32f4/pins_BLACKPILL_CUSTOM.h" // STM32F4 env:STM32F401CD_blackpill_stlink #elif MB(I3DBEEZ9_V1) #include "stm32f4/pins_I3DBEEZ9.h" // STM32F4 env:I3DBEEZ9_V1 +#elif MB(MELLOW_FLY_E3_V2) + #include "stm32f4/pins_MELLOW_FLY_E3_V2.h" // STM32F4 env:FLY_E3_V2 // // ARM Cortex-M7 diff --git a/Marlin/src/pins/stm32f4/pins_CREALITY_F401.h b/Marlin/src/pins/stm32f4/pins_CREALITY_F401.h index f4b5b7d96a72..b4c5bad0938a 100644 --- a/Marlin/src/pins/stm32f4/pins_CREALITY_F401.h +++ b/Marlin/src/pins/stm32f4/pins_CREALITY_F401.h @@ -140,7 +140,7 @@ //#define LED_CONTROL_PIN PA7 // -// WiFI Reset +// WiFi Reset // #ifdef MENU_RESET_WIFI #define RESET_WIFI_PIN PB12 diff --git a/Marlin/src/pins/stm32f4/pins_MELLOW_FLY_E3_V2.h b/Marlin/src/pins/stm32f4/pins_MELLOW_FLY_E3_V2.h new file mode 100644 index 000000000000..39073bffceca --- /dev/null +++ b/Marlin/src/pins/stm32f4/pins_MELLOW_FLY_E3_V2.h @@ -0,0 +1,521 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2023 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 . + * + */ +#pragma once + +#if NOT_TARGET(STM32F4) + #error "Oops! Select an STM32F4 board in 'Tools > Board.'" +#endif + +#ifndef BOARD_INFO_NAME + #define BOARD_INFO_NAME "Mellow Fly E3 V2" +#endif + +// If you have the BigTreeTech driver expansion module, enable BTT_MOTOR_EXPANSION +// https://github.com/bigtreetech/BTT-Expansion-module/tree/master/BTT%20EXP-MOT +//#define BTT_MOTOR_EXPANSION + +#if ALL(HAS_WIRED_LCD, BTT_MOTOR_EXPANSION) + #if ANY(CR10_STOCKDISPLAY, ENDER2_STOCKDISPLAY) + #define EXP_MOT_USE_EXP2_ONLY 1 + #else + #error "You can't use both an LCD and a Motor Expansion Module on EXP1/EXP2 at the same time." + #endif +#endif + +// Use one of these or SDCard-based Emulation will be used +#if NO_EEPROM_SELECTED + //#define SRAM_EEPROM_EMULATION // Use BackSRAM-based EEPROM emulation + #define FLASH_EEPROM_EMULATION // Use Flash-based EEPROM emulation +#endif + +#if ENABLED(FLASH_EEPROM_EMULATION) + // Decrease delays and flash wear by spreading writes across the + // 128 kB sector allocated for EEPROM emulation. + #define FLASH_EEPROM_LEVELING +#endif + +// +// Servos +// +#define SERVO0_PIN PE6 // SERVOS + +// +// Trinamic Stallguard pins +// +#define X_DIAG_PIN PE7 // X-STOP +#define Y_DIAG_PIN PE8 // Y-STOP +#define Z_DIAG_PIN PE9 // Z-STOP + +// +// Limit Switches +// +#ifdef X_STALL_SENSITIVITY + #define X_STOP_PIN X_DIAG_PIN +#else + #define X_STOP_PIN PE7 // X-STOP +#endif + +#ifdef Y_STALL_SENSITIVITY + #define Y_STOP_PIN Y_DIAG_PIN +#else + #define Y_STOP_PIN PE8 // Y-STOP +#endif + +#ifdef Z_STALL_SENSITIVITY + #define Z_STOP_PIN Z_DIAG_PIN +#else + #ifndef Z_STOP_PIN + #define Z_STOP_PIN PE9 // Z-STOP + #endif +#endif + +// +// Z Probe must be this pin +// +#define Z_MIN_PROBE_PIN PC2 // PROBE + +// +// Probe enable +// +#if ENABLED(PROBE_ENABLE_DISABLE) + #ifndef PROBE_ENABLE_PIN + #define PROBE_ENABLE_PIN SERVO0_PIN + #endif +#endif + +// +// Steppers +// +#define X_ENABLE_PIN PC1 +#define X_STEP_PIN PE5 +#define X_DIR_PIN PC0 +#ifndef X_CS_PIN + #define X_CS_PIN PC15 +#endif + +#define Y_ENABLE_PIN PC14 +#define Y_STEP_PIN PE4 +#define Y_DIR_PIN PC13 +#ifndef Y_CS_PIN + #define Y_CS_PIN PB6 +#endif + +#define Z_ENABLE_PIN PE3 +#define Z_STEP_PIN PE1 +#define Z_DIR_PIN PB7 +#ifndef Z_CS_PIN + #define Z_CS_PIN PD7 +#endif + +#define E0_ENABLE_PIN PD6 +#define E0_STEP_PIN PE2 +#define E0_DIR_PIN PD5 +#ifndef E0_CS_PIN + #define E0_CS_PIN PD4 +#endif + +#define E1_ENABLE_PIN PD3 +#define E1_STEP_PIN PE0 +#define E1_DIR_PIN PD1 +#ifndef E1_CS_PIN + #define E1_CS_PIN PD0 +#endif + +// +// Temperature Sensors +// +#define TEMP_BED_PIN PB1 // Analog Input "TB" +#define TEMP_0_PIN PC4 // Analog Input "TH0" +#define TEMP_1_PIN PC5 // Analog Input "TH0" + +// +// Heaters / Fans +// +#ifndef HEATER_BED_PIN + #define HEATER_BED_PIN PB0 // "HB" +#endif +#ifndef HEATER_0_PIN + #define HEATER_0_PIN PC6 // "HE0" +#endif +#ifndef HEATER_1_PIN + #define HEATER_1_PIN PC7 // "HE0" +#endif + +#ifndef FAN0_PIN + #define FAN0_PIN PA0 // "FAN0" +#endif +#ifndef FAN1_PIN + #define FAN1_PIN PA1 +#endif +#ifndef FAN2_PIN + #define FAN2_PIN PA2 +#endif +#ifndef FAN3_PIN + #define FAN3_PIN PA3 +#endif + +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI PB5 +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO PB4 +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK PB3 +#endif + +#if HAS_TMC_UART + /** + * TMC2208/TMC2209 stepper drivers + * + * Hardware serial communication ports. + * If undefined software serial is used according to the pins below + */ + //#define X_HARDWARE_SERIAL Serial1 + //#define X2_HARDWARE_SERIAL Serial1 + //#define Y_HARDWARE_SERIAL Serial1 + //#define Y2_HARDWARE_SERIAL Serial1 + //#define Z_HARDWARE_SERIAL Serial1 + //#define Z2_HARDWARE_SERIAL Serial1 + //#define E0_HARDWARE_SERIAL Serial1 + //#define E1_HARDWARE_SERIAL Serial1 + //#define E2_HARDWARE_SERIAL Serial1 + //#define E3_HARDWARE_SERIAL Serial1 + //#define E4_HARDWARE_SERIAL Serial1 + + // + // Software serial + // + #define X_SERIAL_TX_PIN PC15 + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN + + #define Y_SERIAL_TX_PIN PB6 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN + + #define Z_SERIAL_TX_PIN PD7 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN + + #define E0_SERIAL_TX_PIN PD4 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN + + #define E1_SERIAL_TX_PIN PD0 + #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN + + // Reduce baud rate to improve software serial reliability + #ifndef TMC_BAUD_RATE + #define TMC_BAUD_RATE 19200 + #endif + +#endif // HAS_TMC_UART + +#ifndef SDCARD_CONNECTION + #define SDCARD_CONNECTION ONBOARD +#endif + +/** + * Fly-E3-v2 + * ------ ------ + * (BEEPER) PD10 | 1 2 | PA9 (BTN_ENC) (MISO) PA6 | 1 2 | PA5 (SCK) + * (LCD_EN) PA8 | 3 4 | PA10 (LCD_RS) (BTN_EN1) PB11 | 3 4 | PA4 (SD_SS) + * (LCD_D4) PE15 | 5 6 PE14 (LCD_D5) (BTN_EN2) PB10 | 5 6 | PA7 (MOSI) + * (LCD_D6) PA14 | 7 8 | PA13 (LCD_D7) (SD_DETECT) PE13 | 7 8 | RESET + * GND | 9 10 | 5V GND | 9 10 | -- + * ------ ------ + * EXP1 EXP2 + */ +#define EXP1_01_PIN PD10 +#define EXP1_02_PIN PA9 +#define EXP1_03_PIN PA8 +#define EXP1_04_PIN PA10 +#define EXP1_05_PIN PE15 +#define EXP1_06_PIN PE14 +#define EXP1_07_PIN PA14 +#define EXP1_08_PIN PA13 + +#define EXP2_01_PIN PA6 +#define EXP2_02_PIN PA5 +#define EXP2_03_PIN PB11 +#define EXP2_04_PIN PA4 +#define EXP2_05_PIN PB10 +#define EXP2_06_PIN PA7 +#define EXP2_07_PIN PE13 +#define EXP2_08_PIN -1 + +// +// Onboard SD card +// Must use soft SPI because Marlin's default hardware SPI is tied to LCD's EXP2 +// +#if SD_CONNECTION_IS(LCD) + #define SDSS EXP2_04_PIN + #define SD_SS_PIN SDSS + #define SD_SCK_PIN EXP2_02_PIN + #define SD_MISO_PIN EXP2_01_PIN + #define SD_MOSI_PIN EXP2_06_PIN + #define SD_DETECT_PIN EXP2_07_PIN +#elif SD_CONNECTION_IS(ONBOARD) + #define ONBOARD_SDIO // Use SDIO for onboard SD +#elif SD_CONNECTION_IS(CUSTOM_CABLE) + #error "No custom SD drive cable defined for this board." +#endif + +#if ENABLED(BTT_MOTOR_EXPANSION) + /** ----- ----- + * -- | . . | GND -- | . . | GND + * -- | . . | M1EN M2EN | . . | M3EN + * M1STP | . . M1DIR M1RX | . . M1DIAG + * M2DIR | . . | M2STP M2RX | . . | M2DIAG + * M3DIR | . . | M3STP M3RX | . . | M3DIAG + * ----- ----- + * EXP2 EXP1 + * + * NB In EXP_MOT_USE_EXP2_ONLY mode EXP1 is not used and M2EN and M3EN need to be jumpered to M1EN + */ + + // M1 on Driver Expansion Module + #define E2_STEP_PIN EXP2_06_PIN + #define E2_DIR_PIN EXP2_05_PIN + #define E2_ENABLE_PIN EXP2_07_PIN + #if !EXP_MOT_USE_EXP2_ONLY + #define E2_DIAG_PIN EXP1_05_PIN + #define E2_CS_PIN EXP1_06_PIN + #if HAS_TMC_UART + #define E2_SERIAL_TX_PIN EXP1_06_PIN + #define E2_SERIAL_RX_PIN EXP1_06_PIN + #endif + #endif + + // M2 on Driver Expansion Module + #define E3_STEP_PIN EXP2_03_PIN + #define E3_DIR_PIN EXP2_04_PIN + #if !EXP_MOT_USE_EXP2_ONLY + #define E3_ENABLE_PIN EXP1_08_PIN + #define E3_DIAG_PIN EXP1_03_PIN + #define E3_CS_PIN EXP1_04_PIN + #if HAS_TMC_UART + #define E3_SERIAL_TX_PIN EXP1_04_PIN + #define E3_SERIAL_RX_PIN EXP1_04_PIN + #endif + #else + #define E3_ENABLE_PIN EXP2_07_PIN + #endif + + // M3 on Driver Expansion Module + #define E4_STEP_PIN EXP2_01_PIN + #define E4_DIR_PIN EXP2_02_PIN + #if !EXP_MOT_USE_EXP2_ONLY + #define E4_ENABLE_PIN EXP1_07_PIN + #define E4_DIAG_PIN EXP1_01_PIN + #define E4_CS_PIN EXP1_02_PIN + #if HAS_TMC_UART + #define E4_SERIAL_TX_PIN EXP1_02_PIN + #define E4_SERIAL_RX_PIN EXP1_02_PIN + #endif + #else + #define E4_ENABLE_PIN EXP2_07_PIN + #endif + +#endif // BTT_MOTOR_EXPANSION + +// +// LCDs and Controllers +// +#if IS_TFTGLCD_PANEL + + #if ENABLED(TFTGLCD_PANEL_SPI) + #define TFTGLCD_CS EXP2_03_PIN + #endif + +#elif HAS_WIRED_LCD + + #define BEEPER_PIN EXP1_01_PIN + #define BTN_ENC EXP1_02_PIN + + #if ENABLED(CR10_STOCKDISPLAY) + + #define LCD_PINS_RS EXP1_07_PIN + + #define BTN_EN1 EXP1_03_PIN + #define BTN_EN2 EXP1_05_PIN + + #define LCD_PINS_EN EXP1_08_PIN + #define LCD_PINS_D4 EXP1_06_PIN + + #elif ENABLED(MKS_MINI_12864) + + #define DOGLCD_A0 EXP1_07_PIN + #define DOGLCD_CS EXP1_06_PIN + #define BTN_EN1 EXP2_03_PIN + #define BTN_EN2 EXP2_05_PIN + + #else + + #define LCD_PINS_RS EXP1_04_PIN + + #define BTN_EN1 EXP2_03_PIN + #define BTN_EN2 EXP2_05_PIN + + #define LCD_PINS_EN EXP1_03_PIN + #define LCD_PINS_D4 EXP1_05_PIN + + #if ENABLED(FYSETC_MINI_12864) + #define DOGLCD_CS EXP1_03_PIN + #define DOGLCD_A0 EXP1_04_PIN + //#define LCD_BACKLIGHT_PIN -1 + #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally. + #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) + #ifndef RGB_LED_R_PIN + #define RGB_LED_R_PIN EXP1_06_PIN + #endif + #ifndef RGB_LED_G_PIN + #define RGB_LED_G_PIN EXP1_07_PIN + #endif + #ifndef RGB_LED_B_PIN + #define RGB_LED_B_PIN EXP1_08_PIN + #endif + #elif ENABLED(FYSETC_MINI_12864_2_1) + #define NEOPIXEL_PIN EXP1_06_PIN + #endif + #endif // !FYSETC_MINI_12864 + + #if IS_ULTIPANEL + #define LCD_PINS_D5 EXP1_06_PIN + #define LCD_PINS_D6 EXP1_07_PIN + #define LCD_PINS_D7 EXP1_08_PIN + + #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) + #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder + #endif + + #endif + + #endif + +#endif // HAS_WIRED_LCD + +#if HAS_SPI_TFT + + #define TFT_SCK_PIN EXP2_02_PIN + #define TFT_MISO_PIN EXP2_01_PIN + #define TFT_MOSI_PIN EXP2_06_PIN + + #define BTN_ENC EXP1_02_PIN + #define BTN_EN1 EXP2_03_PIN + #define BTN_EN2 EXP2_05_PIN + + #ifndef TFT_WIDTH + #define TFT_WIDTH 480 + #endif + #ifndef TFT_HEIGHT + #define TFT_HEIGHT 320 + #endif + + #if ENABLED(BTT_TFT35_SPI_V1_0) + // 480x320, 3.5", SPI Display with Rotary Encoder. + // Stock Display for the BIQU B1 SE. + #define TFT_CS_PIN EXP2_04_PIN + #define TFT_DC_PIN EXP2_07_PIN + #define TFT_A0_PIN TFT_DC_PIN + + #define TOUCH_CS_PIN EXP1_04_PIN + #define TOUCH_SCK_PIN EXP1_05_PIN + #define TOUCH_MISO_PIN EXP1_06_PIN + #define TOUCH_MOSI_PIN EXP1_03_PIN + #define TOUCH_INT_PIN EXP1_07_PIN + + #ifndef TOUCH_CALIBRATION_X + #define TOUCH_CALIBRATION_X 17540 + #endif + #ifndef TOUCH_CALIBRATION_Y + #define TOUCH_CALIBRATION_Y -11388 + #endif + #ifndef TOUCH_OFFSET_X + #define TOUCH_OFFSET_X -21 + #endif + #ifndef TOUCH_OFFSET_Y + #define TOUCH_OFFSET_Y 337 + #endif + #ifndef TOUCH_ORIENTATION + #define TOUCH_ORIENTATION TOUCH_LANDSCAPE + #endif + + #elif ENABLED(MKS_TS35_V2_0) + + /** ------ ------ + * BEEPER | 1 2 | BTN_ENC SPI1_MISO | 1 2 | SPI1_SCK + * TFT_BKL / LCD_EN | 3 4 | TFT_RESET / LCD_RS BTN_EN1 | 3 4 | SPI1_CS + * TOUCH_CS / LCD_D4 | 5 6 TOUCH_INT / LCD_D5 BTN_EN2 | 5 6 SPI1_MOSI + * SPI1_CS / LCD_D6 | 7 8 | SPI1_RS / LCD_D7 SPI1_RS | 7 8 | RESET + * GND | 9 10 | VCC GND | 9 10 | VCC + * ------ ------ + * EXP1 EXP2 + */ + #define TFT_CS_PIN EXP1_07_PIN // SPI1_CS + #define TFT_DC_PIN EXP1_08_PIN // SPI1_RS + #define TFT_A0_PIN TFT_DC_PIN + + #define TFT_RESET_PIN EXP1_04_PIN + + #define LCD_BACKLIGHT_PIN EXP1_03_PIN + #define TFT_BACKLIGHT_PIN LCD_BACKLIGHT_PIN + + #define TOUCH_BUTTONS_HW_SPI + #define TOUCH_BUTTONS_HW_SPI_DEVICE 1 + + #define TOUCH_CS_PIN EXP1_05_PIN // SPI1_NSS + #define TOUCH_SCK_PIN EXP2_02_PIN // SPI1_SCK + #define TOUCH_MISO_PIN EXP2_01_PIN // SPI1_MISO + #define TOUCH_MOSI_PIN EXP2_06_PIN // SPI1_MOSI + + #define LCD_READ_ID 0xD3 + #define LCD_USE_DMA_SPI + + #define TFT_BUFFER_SIZE 14400 + + #endif + +#endif // HAS_SPI_TFT + +// Alter timing for graphical display +#if IS_U8GLIB_ST7920 + #ifndef BOARD_ST7920_DELAY_1 + #define BOARD_ST7920_DELAY_1 120 + #endif + #ifndef BOARD_ST7920_DELAY_2 + #define BOARD_ST7920_DELAY_2 80 + #endif + #ifndef BOARD_ST7920_DELAY_3 + #define BOARD_ST7920_DELAY_3 580 + #endif +#endif + +//#define POWER_MONITOR_VOLTAGE_PIN PC3 + +// +// WiFi +// +#if ENABLED(WIFISUPPORT) + #define ESP_WIFI_MODULE_COM 3 // Must also set either SERIAL_PORT or SERIAL_PORT_2 to this + #define ESP_WIFI_MODULE_BAUDRATE BAUDRATE // Must use same BAUDRATE as SERIAL_PORT & SERIAL_PORT_2 + #define ESP_WIFI_MODULE_RESET_PIN PE11 + #define ESP_WIFI_MODULE_GPIO0_PIN PE10 + #define ESP_WIFI_MODULE_GPIO4_PIN PE12 +#endif diff --git a/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h b/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h index 9d30d853b5dd..ded9ec4e8913 100644 --- a/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h +++ b/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h @@ -449,7 +449,7 @@ #endif // -// WIFI +// WiFi // #if ENABLED(WIFISUPPORT) /** diff --git a/ini/stm32f4.ini b/ini/stm32f4.ini index bb594b97f909..454337295d29 100644 --- a/ini/stm32f4.ini +++ b/ini/stm32f4.ini @@ -806,3 +806,22 @@ board_build.offset = 0x8000 build_flags = ${stm32_variant.build_flags} -DSTM32F407_5ZX debug_tool = stlink upload_protocol = stlink + +# +# Mellow Fly E3 V2 (STM32F407VGT6 ARM Cortex-M4) +# +[env:FLY_E3_V2] +extends = stm32_variant +board = marlin_STM32F407VGT6_CCM +board_build.variant = MARLIN_F4x7Vx +board_build.offset = 0x8000 +board_upload.offset_address = 0x08008000 +build_flags = ${stm32_variant.build_flags} + -DHAVE_HWSERIAL1 -DHAVE_HWSERIAL3 + -DPIN_SERIAL1_RX=PA_10 -DPIN_SERIAL1_TX=PA_9 + -DPIN_SERIAL3_RX=PD_9 -DPIN_SERIAL3_TX=PD_8 + -DHAL_SD_MODULE_ENABLED + -DUSE_USBHOST_HS -DUSE_USB_HS_IN_FS + -DUSBD_IRQ_PRIO=5 -DUSBD_IRQ_SUBPRIO=6 + -DHSE_VALUE=8000000U +upload_protocol = stlink From 11f98adcce51f06a85ef0dd64e6e6b16139a34bd Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Sat, 26 Aug 2023 00:22:53 +0000 Subject: [PATCH 25/25] [cron] Bump distribution date (2023-08-26) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index ea5235f27ec1..307dd9820f8e 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2023-08-25" +//#define STRING_DISTRIBUTION_DATE "2023-08-26" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index c6e01ed925e4..dcc5e30021cc 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2023-08-25" + #define STRING_DISTRIBUTION_DATE "2023-08-26" #endif /**