diff --git a/.travis.yml b/.travis.yml index 127faef4964df94f3d1f4d6d317f9747ec09555a..c5cdf4b70c9ae799fd543b33604651c08c03deeb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -245,10 +245,11 @@ script: - opt_set_adv SDSORT_CACHE_NAMES true - build_marlin # - # REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER + # REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER with SDCARD_SORT_ALPHA and STATUS_MESSAGE_SCROLLING # - restore_configs - opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER SDSUPPORT + - opt_enable_adv SDCARD_SORT_ALPHA STATUS_MESSAGE_SCROLLING - build_marlin # # REPRAPWORLD_KEYPAD diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index c8e30fffecf273056f9c83a18f0377d9db299eec..088554ebb8e690d1dee785b8e173548b21c23ad2 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -807,6 +807,7 @@ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change #endif // @section tmc diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 69296edda2e455782e94fff2b84754fe276d8725..a15145d31bd1583f5d674fd0860c1e665dba1831 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -9265,10 +9265,10 @@ inline void gcode_M503() { */ inline void gcode_M600() { - // Don't allow filament change without homing first - if (axis_unhomed_error()) { - home_all_axes(); - } + #if ENABLED(HOME_BEFORE_FILAMENT_CHANGE) + // Don't allow filament change without homing first + if (axis_unhomed_error()) home_all_axes(); + #endif // Initial retract before move to filament change position const float retract = parser.seen('E') ? parser.value_axis_units(E_AXIS) : 0 @@ -12702,10 +12702,10 @@ void setup() { // Check startup - does nothing if bootloader sets MCUSR to 0 byte mcu = MCUSR; - if (mcu & 1) SERIAL_ECHOLNPGM(MSG_POWERUP); - if (mcu & 2) SERIAL_ECHOLNPGM(MSG_EXTERNAL_RESET); - if (mcu & 4) SERIAL_ECHOLNPGM(MSG_BROWNOUT_RESET); - if (mcu & 8) SERIAL_ECHOLNPGM(MSG_WATCHDOG_RESET); + if (mcu & 1) SERIAL_ECHOLNPGM(MSG_POWERUP); + if (mcu & 2) SERIAL_ECHOLNPGM(MSG_EXTERNAL_RESET); + if (mcu & 4) SERIAL_ECHOLNPGM(MSG_BROWNOUT_RESET); + if (mcu & 8) SERIAL_ECHOLNPGM(MSG_WATCHDOG_RESET); if (mcu & 32) SERIAL_ECHOLNPGM(MSG_SOFTWARE_RESET); MCUSR = 0; diff --git a/Marlin/SanityCheck.h b/Marlin/SanityCheck.h index de4f550d2bb3adb76b9b906e518c5670e2791370..ee25709af36026d80217ac47f7592fa527197f6a 100644 --- a/Marlin/SanityCheck.h +++ b/Marlin/SanityCheck.h @@ -321,6 +321,8 @@ #error "EXTRUDER_RUNOUT_PREVENT is incompatible with ADVANCED_PAUSE_FEATURE." #elif ENABLED(PARK_HEAD_ON_PAUSE) && DISABLED(SDSUPPORT) && DISABLED(NEWPANEL) && DISABLED(EMERGENCY_PARSER) #error "PARK_HEAD_ON_PAUSE requires SDSUPPORT, EMERGENCY_PARSER, or an LCD controller." + #elif ENABLED(HOME_BEFORE_FILAMENT_CHANGE) && DISABLED(PAUSE_PARK_NO_STEPPER_TIMEOUT) + #error "HOME_BEFORE_FILAMENT_CHANGE requires PAUSE_PARK_NO_STEPPER_TIMEOUT" #endif #endif diff --git a/Marlin/example_configurations/Cartesio/Configuration_adv.h b/Marlin/example_configurations/Cartesio/Configuration_adv.h index 8dfb65a36de636c4e920cc5ebea55937021ccda2..81cf8e290aeeca93668f6d1e7e4497db086d3708 100644 --- a/Marlin/example_configurations/Cartesio/Configuration_adv.h +++ b/Marlin/example_configurations/Cartesio/Configuration_adv.h @@ -800,6 +800,7 @@ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change #endif // @section tmc diff --git a/Marlin/example_configurations/Felix/Configuration_adv.h b/Marlin/example_configurations/Felix/Configuration_adv.h index a5940d45661b40a2e17c8e2dc9888d94a2abb57a..ac5bdb51ce6d257cdd9b968fe0807492fd5c9cd6 100644 --- a/Marlin/example_configurations/Felix/Configuration_adv.h +++ b/Marlin/example_configurations/Felix/Configuration_adv.h @@ -800,6 +800,7 @@ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change #endif // @section tmc diff --git a/Marlin/example_configurations/FolgerTech-i3-2020/Configuration_adv.h b/Marlin/example_configurations/FolgerTech-i3-2020/Configuration_adv.h index 4174cba825efddb97093f87d22f8154a4a78f344..282fdf006f0bcc30115a4996b3627c8e54ca33b0 100644 --- a/Marlin/example_configurations/FolgerTech-i3-2020/Configuration_adv.h +++ b/Marlin/example_configurations/FolgerTech-i3-2020/Configuration_adv.h @@ -809,6 +809,7 @@ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. #define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change #endif // @section tmc diff --git a/Marlin/example_configurations/Hephestos/Configuration_adv.h b/Marlin/example_configurations/Hephestos/Configuration_adv.h index 3e7f6416d15e14df9a6295d6c9277d9ebef5acc6..e2ed21f47d46f189a635083d3722c27e24a49093 100644 --- a/Marlin/example_configurations/Hephestos/Configuration_adv.h +++ b/Marlin/example_configurations/Hephestos/Configuration_adv.h @@ -800,6 +800,7 @@ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change #endif // @section tmc diff --git a/Marlin/example_configurations/Hephestos_2/Configuration_adv.h b/Marlin/example_configurations/Hephestos_2/Configuration_adv.h index 26af260c3e919b8b0fdd8589b1771aa1001d7de4..c70eb7c28a4d16f002a7848a41819e6d386bdc6e 100644 --- a/Marlin/example_configurations/Hephestos_2/Configuration_adv.h +++ b/Marlin/example_configurations/Hephestos_2/Configuration_adv.h @@ -783,6 +783,7 @@ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change #endif // @section tmc diff --git a/Marlin/example_configurations/K8200/Configuration_adv.h b/Marlin/example_configurations/K8200/Configuration_adv.h index 4cad884b7108e853bacefd4ede99332ce5b1cafb..82d8adbadfd038cee91c662222a667d3f9c6afde 100644 --- a/Marlin/example_configurations/K8200/Configuration_adv.h +++ b/Marlin/example_configurations/K8200/Configuration_adv.h @@ -813,6 +813,7 @@ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change #endif // @section tmc diff --git a/Marlin/example_configurations/K8400/Configuration_adv.h b/Marlin/example_configurations/K8400/Configuration_adv.h index 34ccc3aeb3278f27abf99192f7b331ec3c522714..a49c7d51bd0988da3d27e33a9f0f677171d3f20d 100644 --- a/Marlin/example_configurations/K8400/Configuration_adv.h +++ b/Marlin/example_configurations/K8400/Configuration_adv.h @@ -800,6 +800,7 @@ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change #endif // @section tmc diff --git a/Marlin/example_configurations/M150/Configuration_adv.h b/Marlin/example_configurations/M150/Configuration_adv.h index c2c1c0c3fb2adddf95abbf06a261e3d276c3017c..a8379526fdd03328dc37dcaa65d27392153833dd 100644 --- a/Marlin/example_configurations/M150/Configuration_adv.h +++ b/Marlin/example_configurations/M150/Configuration_adv.h @@ -807,6 +807,7 @@ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change #endif // @section tmc diff --git a/Marlin/example_configurations/RigidBot/Configuration_adv.h b/Marlin/example_configurations/RigidBot/Configuration_adv.h index 027e633189e669bdd7c4412a3b96e97cd67dede0..2bfdef25f03c899da7f177a71f0d6ba588b665ea 100644 --- a/Marlin/example_configurations/RigidBot/Configuration_adv.h +++ b/Marlin/example_configurations/RigidBot/Configuration_adv.h @@ -800,6 +800,7 @@ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change #endif // @section tmc diff --git a/Marlin/example_configurations/SCARA/Configuration_adv.h b/Marlin/example_configurations/SCARA/Configuration_adv.h index 9ea1a60bd76ff5393ed8a3644bb36fa3d6c0ccb8..14fb68220f4c95786a109914b15e5e16eac68062 100644 --- a/Marlin/example_configurations/SCARA/Configuration_adv.h +++ b/Marlin/example_configurations/SCARA/Configuration_adv.h @@ -800,6 +800,7 @@ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change #endif // @section tmc diff --git a/Marlin/example_configurations/TAZ4/Configuration_adv.h b/Marlin/example_configurations/TAZ4/Configuration_adv.h index 23b616ad532aeca53a2149005708382cde622b69..c11677a8bd9de3f03a0ddf67a98518916d5069be 100644 --- a/Marlin/example_configurations/TAZ4/Configuration_adv.h +++ b/Marlin/example_configurations/TAZ4/Configuration_adv.h @@ -800,6 +800,7 @@ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change #endif // @section tmc diff --git a/Marlin/example_configurations/TinyBoy2/Configuration_adv.h b/Marlin/example_configurations/TinyBoy2/Configuration_adv.h index ba0eae98a7c821aebc62806278b0987dba061207..20c2e79f857fb954e866a3d704e73cc82adf0423 100644 --- a/Marlin/example_configurations/TinyBoy2/Configuration_adv.h +++ b/Marlin/example_configurations/TinyBoy2/Configuration_adv.h @@ -803,6 +803,7 @@ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change #endif // @section tmc diff --git a/Marlin/example_configurations/WITBOX/Configuration_adv.h b/Marlin/example_configurations/WITBOX/Configuration_adv.h index 3e7f6416d15e14df9a6295d6c9277d9ebef5acc6..e2ed21f47d46f189a635083d3722c27e24a49093 100644 --- a/Marlin/example_configurations/WITBOX/Configuration_adv.h +++ b/Marlin/example_configurations/WITBOX/Configuration_adv.h @@ -800,6 +800,7 @@ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change #endif // @section tmc diff --git a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h index 1ca156d9b353352941ff3e3f025f1286c935aad0..a8a30eabd4ec610f8619904c81aa44a7ad7282ad 100644 --- a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h +++ b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h @@ -805,6 +805,7 @@ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change #endif // @section tmc diff --git a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h index dc5c04e2e0174944f566a0f5745391fd5e11c5e5..3e27eab9d92096e7497bf1b0c38413136a1ca7c6 100644 --- a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h +++ b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h @@ -804,6 +804,7 @@ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change #endif // @section tmc diff --git a/Marlin/example_configurations/delta/generic/Configuration_adv.h b/Marlin/example_configurations/delta/generic/Configuration_adv.h index 49a550faee4c825f1a77693cf6d7d45ce208d554..f7d78f310ed35c7d128fb1c2ccde56f76e58626d 100644 --- a/Marlin/example_configurations/delta/generic/Configuration_adv.h +++ b/Marlin/example_configurations/delta/generic/Configuration_adv.h @@ -802,6 +802,7 @@ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change #endif // @section tmc diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h index 49a550faee4c825f1a77693cf6d7d45ce208d554..f7d78f310ed35c7d128fb1c2ccde56f76e58626d 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h @@ -802,6 +802,7 @@ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change #endif // @section tmc diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h index 3922a31a7a0741c53d2083b1c6880d07739dda23..7f524811716d66c06b6e3668a8a564a28e01482b 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h @@ -807,6 +807,7 @@ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change #endif // @section tmc diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h index 9b403edb19e629340501ae89781aa6e51c55ab6c..41ceff38268812ebdeef0624972c0a3082a6af09 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h @@ -802,6 +802,7 @@ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change #endif // @section tmc diff --git a/Marlin/example_configurations/gCreate_gMax1.5+/Configuration_adv.h b/Marlin/example_configurations/gCreate_gMax1.5+/Configuration_adv.h index ba963dd06d73c73f94b46443733aedb6ec298008..4354d717ac206abea7a1cb10e885dc4ba080edf0 100644 --- a/Marlin/example_configurations/gCreate_gMax1.5+/Configuration_adv.h +++ b/Marlin/example_configurations/gCreate_gMax1.5+/Configuration_adv.h @@ -809,6 +809,7 @@ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. #define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change #endif // @section tmc diff --git a/Marlin/example_configurations/makibox/Configuration_adv.h b/Marlin/example_configurations/makibox/Configuration_adv.h index c16680356aa2c38d7c302a603028938e588c21de..f6517a6c15237969f2be6e46974e708845abaac6 100644 --- a/Marlin/example_configurations/makibox/Configuration_adv.h +++ b/Marlin/example_configurations/makibox/Configuration_adv.h @@ -800,6 +800,7 @@ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change #endif // @section tmc diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h index e218c85ca8e916696791fb0d8ea7aafc339f1683..a6ab735e58643893dc1655adcf5faadf1c03b707 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h @@ -800,6 +800,7 @@ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change #endif // @section tmc diff --git a/Marlin/example_configurations/wt150/Configuration_adv.h b/Marlin/example_configurations/wt150/Configuration_adv.h index 09f94b2260e5dc89a3118dba50e7c8ceed254ccd..171f4c3b7718d843d040215adb06cd689693489a 100644 --- a/Marlin/example_configurations/wt150/Configuration_adv.h +++ b/Marlin/example_configurations/wt150/Configuration_adv.h @@ -803,6 +803,7 @@ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change #endif // @section tmc diff --git a/Marlin/language_en.h b/Marlin/language_en.h index dfad170a7a2cc2bb823b39c2438c69ae90980e2e..17d7e77d20a66de1d3011670493033933f766537 100644 --- a/Marlin/language_en.h +++ b/Marlin/language_en.h @@ -280,9 +280,9 @@ #ifndef MSG_UBL_OUTPUT_MAP_CSV #define MSG_UBL_OUTPUT_MAP_CSV _UxGT("Output for CSV") #endif - #ifndef MSG_UBL_OUTPUT_MAP_BACKUP - #define MSG_UBL_OUTPUT_MAP_BACKUP _UxGT("Off Printer Backup") - #endif +#ifndef MSG_UBL_OUTPUT_MAP_BACKUP + #define MSG_UBL_OUTPUT_MAP_BACKUP _UxGT("Off Printer Backup") +#endif #ifndef MSG_UBL_INFO_UBL #define MSG_UBL_INFO_UBL _UxGT("Output UBL Info") #endif diff --git a/Marlin/ubl.cpp b/Marlin/ubl.cpp index 14d411e5c6f72bc3731445ac695ca1121a7b1d34..9805aff3fc38e6f5651f95a9be4f30b799643bb9 100644 --- a/Marlin/ubl.cpp +++ b/Marlin/ubl.cpp @@ -115,8 +115,9 @@ void unified_bed_leveling::display_map(const int map_type) { constexpr uint8_t spaces = 8 * (GRID_MAX_POINTS_X - 2); + SERIAL_PROTOCOLPGM("\nBed Topography Report"); if (map_type == 0) { - SERIAL_PROTOCOLLNPGM("\nBed Topography Report:\n"); + SERIAL_PROTOCOLPGM(":\n\n"); serial_echo_xy(0, GRID_MAX_POINTS_Y - 1); SERIAL_ECHO_SP(spaces + 3); serial_echo_xy(GRID_MAX_POINTS_X - 1, GRID_MAX_POINTS_Y - 1); @@ -126,9 +127,10 @@ serial_echo_xy(UBL_MESH_MAX_X, UBL_MESH_MAX_Y); SERIAL_EOL(); } - - if (map_type == 1) { SERIAL_PROTOCOLLNPGM("\nBed Topography Report for CSV:"); SERIAL_EOL(); } - if (map_type == 2) { SERIAL_PROTOCOLLNPGM("\nBed Topography Report for LCD:"); SERIAL_EOL(); } + else { + SERIAL_PROTOCOLPGM(" for "); + serialprintPGM(map_type == 1 ? PSTR("CSV:\n\n") : PSTR("LCD:\n\n")); + } const float current_xi = get_cell_index_x(current_position[X_AXIS] + (MESH_X_DIST) / 2.0), current_yi = get_cell_index_y(current_position[Y_AXIS] + (MESH_Y_DIST) / 2.0); @@ -142,14 +144,14 @@ const float f = z_values[i][j]; if (isnan(f)) { - serialprintPGM((map_type == 0) ? PSTR(" . ") : PSTR("NAN")); + serialprintPGM(map_type == 0 ? PSTR(" . ") : PSTR("NAN")); } - else { + else if (map_type <= 1) { // if we don't do this, the columns won't line up nicely - if ((map_type == 0) && f >= 0.0) SERIAL_CHAR(' '); - if (map_type <= 1) SERIAL_PROTOCOL_F(f, 3); - idle(); + if (map_type == 0 && f >= 0.0) SERIAL_CHAR(' '); + SERIAL_PROTOCOL_F(f, 3); } + idle(); if (map_type == 1 && i < GRID_MAX_POINTS_X - 1) SERIAL_CHAR(','); #if TX_BUFFER_SIZE > 0 @@ -162,7 +164,7 @@ } } SERIAL_EOL(); - if (j && (map_type == 0)) { // we want the (0,0) up tight against the block of numbers + if (j && map_type == 0) { // we want the (0,0) up tight against the block of numbers SERIAL_CHAR(' '); SERIAL_EOL(); } @@ -183,8 +185,7 @@ bool unified_bed_leveling::sanity_check() { uint8_t error_flag = 0; - const int a = settings.calc_num_meshes(); - if (a < 1) { + if (settings.calc_num_meshes() < 1) { SERIAL_PROTOCOLLNPGM("?Insufficient EEPROM storage for a mesh of this size."); error_flag++; } diff --git a/Marlin/ubl_G29.cpp b/Marlin/ubl_G29.cpp index e15c8d772818938632bffa861904ae5e16586127..8e047defb5d910575a134ce5ee2910dbb5c2f9d0 100644 --- a/Marlin/ubl_G29.cpp +++ b/Marlin/ubl_G29.cpp @@ -1576,7 +1576,7 @@ if (ubl_lcd_map_control) { #if ENABLED(DOGLCD) - lcd_goto_screen(_lcd_ubl_output_map_lcd); + lcd_goto_screen(_lcd_ubl_output_map_lcd); #endif } else lcd_return_to_status(); diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index 749274486fe3b04deff32ac3c1164951e5e7544c..71deaa1ee7fbace0e297a321dec0061e47d0eca7 100644 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -2094,11 +2094,11 @@ void kill_screen(const char* lcd_msg) { /*********************************************************/ /************ Scale the box pixels appropriately *********/ /*********************************************************/ - x_map_pixels = ((MAP_MAX_PIXELS_X - 4) / GRID_MAX_POINTS_X) * GRID_MAX_POINTS_X; - y_map_pixels = ((MAP_MAX_PIXELS_Y - 4) / GRID_MAX_POINTS_Y) * GRID_MAX_POINTS_Y; + x_map_pixels = ((MAP_MAX_PIXELS_X - 4) / (GRID_MAX_POINTS_X)) * (GRID_MAX_POINTS_X); + y_map_pixels = ((MAP_MAX_PIXELS_Y - 4) / (GRID_MAX_POINTS_Y)) * (GRID_MAX_POINTS_Y); - pixels_per_X_mesh_pnt = x_map_pixels / GRID_MAX_POINTS_X; - pixels_per_Y_mesh_pnt = y_map_pixels / GRID_MAX_POINTS_Y; + pixels_per_X_mesh_pnt = x_map_pixels / (GRID_MAX_POINTS_X); + pixels_per_Y_mesh_pnt = y_map_pixels / (GRID_MAX_POINTS_Y); x_offset = MAP_UPPER_LEFT_CORNER_X + 1 + (MAP_MAX_PIXELS_X - x_map_pixels - 2) / 2; y_offset = MAP_UPPER_LEFT_CORNER_Y + 1 + (MAP_MAX_PIXELS_Y - y_map_pixels - 2) / 2; @@ -2184,7 +2184,7 @@ void kill_screen(const char* lcd_msg) { void sync_plan_position(); void _lcd_ubl_output_map_lcd() { - static int step_scaler=0; + static int16_t step_scaler = 0; int32_t signed_enc_pos; defer_return_to_status = true; @@ -2194,11 +2194,10 @@ void kill_screen(const char* lcd_msg) { if (lcd_clicked) { return _lcd_ubl_map_lcd_edit_cmd(); } ENCODER_DIRECTION_NORMAL(); - if (encoderPosition != 0) { + if (encoderPosition) { signed_enc_pos = (int32_t)encoderPosition; step_scaler += signed_enc_pos; - x_plot = (x_plot + step_scaler / ENCODER_STEPS_PER_MENU_ITEM); - + x_plot += step_scaler / (ENCODER_STEPS_PER_MENU_ITEM); if (abs(step_scaler) >= ENCODER_STEPS_PER_MENU_ITEM) step_scaler = 0; refresh_cmd_timeout(); @@ -2240,7 +2239,7 @@ void kill_screen(const char* lcd_msg) { ubl_map_move_to_xy(); // Move to current location - if (planner.movesplanned()>1) { // if the nozzle is moving, cancel the move. There is a new location + if (planner.movesplanned() > 1) { // if the nozzle is moving, cancel the move. There is a new location #define ENABLE_STEPPER_DRIVER_INTERRUPT() SBI(TIMSK1, OCIE1A) #define DISABLE_STEPPER_DRIVER_INTERRUPT() CBI(TIMSK1, OCIE1A) DISABLE_STEPPER_DRIVER_INTERRUPT(); @@ -4393,11 +4392,11 @@ void pad_message_string() { // pad with spaces to fill up the line while (j++ < LCD_WIDTH) lcd_status_message[i++] = ' '; // chop off at the edge - lcd_status_message[--i] = '\0'; + lcd_status_message[i] = '\0'; } } -void lcd_finishstatus(bool persist=false) { +void lcd_finishstatus(const bool persist=false) { pad_message_string(); diff --git a/Marlin/ultralcd_impl_DOGM.h b/Marlin/ultralcd_impl_DOGM.h index 295e27676036c7af1a6a41c5f763af928198acea..af862e02b9a31483f3651a18b79af5d4e5ff5b28 100644 --- a/Marlin/ultralcd_impl_DOGM.h +++ b/Marlin/ultralcd_impl_DOGM.h @@ -408,7 +408,7 @@ FORCE_INLINE void _draw_axis_label(const AxisEnum axis, const char* const pstr, } } -inline void lcd_implementation_status_message() { +inline void lcd_implementation_status_message(const bool blink) { #if ENABLED(STATUS_MESSAGE_SCROLLING) static bool last_blink = false; const uint8_t slen = lcd_strlen(lcd_status_message); @@ -693,7 +693,7 @@ static void lcd_implementation_status_screen() { #if ENABLED(FILAMENT_LCD_DISPLAY) && ENABLED(SDSUPPORT) if (PENDING(millis(), previous_lcd_status_ms + 5000UL)) { //Display both Status message line and Filament display on the last line - lcd_implementation_status_message(); + lcd_implementation_status_message(blink); } else { lcd_printPGM(PSTR(LCD_STR_FILAM_DIA)); @@ -705,7 +705,7 @@ static void lcd_implementation_status_screen() { u8g.print('%'); } #else - lcd_implementation_status_message(); + lcd_implementation_status_message(blink); #endif } }