From 9736c962fe7980283f29c204408c8c6bd1d3391d Mon Sep 17 00:00:00 2001 From: GMagician Date: Tue, 17 Oct 2017 23:43:22 +0200 Subject: [PATCH 01/20] gitignore update This is needed by thirdy part extension This extension automatically regenerate filters to get a layout divided by folders and not by "sources" and "headers" --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 85223c87b9..cc62436997 100755 --- a/.gitignore +++ b/.gitignore @@ -154,6 +154,7 @@ Release/ Debug/ __vm/ .vs/ +vc-fileutils.settings #Visual Studio Code .vscode From 9e5cbf019856e76f29bed8dd2a4e193f94e2c177 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 18 Oct 2017 22:16:08 -0500 Subject: [PATCH 02/20] BQ should set this in its config, and does --- Marlin/src/inc/Conditionals_LCD.h | 1 - 1 file changed, 1 deletion(-) diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index 099b80e601..3653396bb7 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -62,7 +62,6 @@ #elif ENABLED(BQ_LCD_SMART_CONTROLLER) #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER - #define LONG_FILENAME_HOST_SUPPORT #elif ENABLED(miniVIKI) || ENABLED(VIKI2) || ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) || ENABLED(AZSMZ_12864) From 783ddf9691f425dc1c1bd5c4e4df4461ca717a06 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 18 Oct 2017 22:15:33 -0500 Subject: [PATCH 03/20] Add SCROLL_LONG_FILENAMES option --- .travis.yml | 4 +- Marlin/Configuration_adv.h | 3 + Marlin/src/config/default/Configuration_adv.h | 3 + .../AlephObjects/TAZ4/Configuration_adv.h | 3 + .../examples/Anet/A6/Configuration_adv.h | 3 + .../examples/Anet/A8/Configuration_adv.h | 3 + .../examples/BQ/Hephestos/Configuration_adv.h | 3 + .../BQ/Hephestos_2/Configuration_adv.h | 3 + .../examples/BQ/WITBOX/Configuration_adv.h | 3 + .../examples/Cartesio/Configuration_adv.h | 3 + .../Creality/CR-10/Configuration_adv.h | 3 + .../config/examples/Felix/Configuration_adv.h | 3 + .../Folger Tech/i3-2020/Configuration_adv.h | 3 + .../Infitary/i3-M508/Configuration_adv.h | 3 + .../examples/Malyan/M150/Configuration_adv.h | 3 + .../examples/Mks/Sbase/Configuration_adv.h | 3 + .../examples/RigidBot/Configuration_adv.h | 3 + .../config/examples/SCARA/Configuration_adv.h | 3 + .../examples/Sanguinololu/Configuration_adv.h | 3 + .../examples/TinyBoy2/Configuration_adv.h | 3 + .../Velleman/K8200/Configuration_adv.h | 3 + .../Velleman/K8400/Configuration_adv.h | 3 + .../FLSUN/auto_calibrate/Configuration_adv.h | 3 + .../FLSUN/kossel_mini/Configuration_adv.h | 3 + .../delta/generic/Configuration_adv.h | 3 + .../delta/kossel_mini/Configuration_adv.h | 3 + .../delta/kossel_pro/Configuration_adv.h | 3 + .../delta/kossel_xl/Configuration_adv.h | 3 + .../gCreate/gMax1.5+/Configuration_adv.h | 3 + .../examples/makibox/Configuration_adv.h | 3 + .../tvrrug/Round2/Configuration_adv.h | 3 + .../config/examples/wt150/Configuration_adv.h | 3 + Marlin/src/lcd/ultralcd.cpp | 20 +++++- Marlin/src/lcd/ultralcd_impl_DOGM.h | 29 ++++++-- Marlin/src/lcd/ultralcd_impl_HD44780.h | 31 ++++++-- Marlin/src/sd/SdBaseFile.cpp | 2 +- Marlin/src/sd/SdFatConfig.h | 70 ++++++++++++------- 37 files changed, 204 insertions(+), 45 deletions(-) diff --git a/.travis.yml b/.travis.yml index 46b3560b5c..b9ef8e1e24 100644 --- a/.travis.yml +++ b/.travis.yml @@ -230,7 +230,7 @@ script: # - restore_configs - opt_enable G3D_PANEL SDSUPPORT - - opt_enable_adv SDCARD_SORT_ALPHA STATUS_MESSAGE_SCROLLING + - opt_enable_adv SDCARD_SORT_ALPHA STATUS_MESSAGE_SCROLLING SCROLL_LONG_FILENAMES - opt_set_adv SDSORT_GCODE true - opt_set_adv SDSORT_USES_RAM true - opt_set_adv SDSORT_USES_STACK true @@ -241,7 +241,7 @@ script: # - restore_configs - opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER SDSUPPORT - - opt_enable_adv SDCARD_SORT_ALPHA STATUS_MESSAGE_SCROLLING + - opt_enable_adv SDCARD_SORT_ALPHA STATUS_MESSAGE_SCROLLING SCROLL_LONG_FILENAMES - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM} # # REPRAPWORLD_KEYPAD diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 25048f304d..03195e458a 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -555,6 +555,9 @@ // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT + // Enable this option to scroll long filenames in the SD card menu + //#define SCROLL_LONG_FILENAMES + // This option allows you to abort SD printing when any endstop is triggered. // This feature must be enabled with "M540 S1" or from the LCD menu. // To have any effect, endstops must be enabled during SD printing. diff --git a/Marlin/src/config/default/Configuration_adv.h b/Marlin/src/config/default/Configuration_adv.h index 25048f304d..03195e458a 100644 --- a/Marlin/src/config/default/Configuration_adv.h +++ b/Marlin/src/config/default/Configuration_adv.h @@ -555,6 +555,9 @@ // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT + // Enable this option to scroll long filenames in the SD card menu + //#define SCROLL_LONG_FILENAMES + // This option allows you to abort SD printing when any endstop is triggered. // This feature must be enabled with "M540 S1" or from the LCD menu. // To have any effect, endstops must be enabled during SD printing. diff --git a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h index bdca7c3bd9..11dc33cdfb 100644 --- a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h +++ b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h @@ -555,6 +555,9 @@ // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT + // Enable this option to scroll long filenames in the SD card menu + //#define SCROLL_LONG_FILENAMES + // This option allows you to abort SD printing when any endstop is triggered. // This feature must be enabled with "M540 S1" or from the LCD menu. // To have any effect, endstops must be enabled during SD printing. diff --git a/Marlin/src/config/examples/Anet/A6/Configuration_adv.h b/Marlin/src/config/examples/Anet/A6/Configuration_adv.h index f1e61eb7cd..33502d6592 100644 --- a/Marlin/src/config/examples/Anet/A6/Configuration_adv.h +++ b/Marlin/src/config/examples/Anet/A6/Configuration_adv.h @@ -555,6 +555,9 @@ // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT + // Enable this option to scroll long filenames in the SD card menu + //#define SCROLL_LONG_FILENAMES + // This option allows you to abort SD printing when any endstop is triggered. // This feature must be enabled with "M540 S1" or from the LCD menu. // To have any effect, endstops must be enabled during SD printing. diff --git a/Marlin/src/config/examples/Anet/A8/Configuration_adv.h b/Marlin/src/config/examples/Anet/A8/Configuration_adv.h index 6f84d700c1..84aa1ed96a 100644 --- a/Marlin/src/config/examples/Anet/A8/Configuration_adv.h +++ b/Marlin/src/config/examples/Anet/A8/Configuration_adv.h @@ -555,6 +555,9 @@ // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT + // Enable this option to scroll long filenames in the SD card menu + //#define SCROLL_LONG_FILENAMES + // This option allows you to abort SD printing when any endstop is triggered. // This feature must be enabled with "M540 S1" or from the LCD menu. // To have any effect, endstops must be enabled during SD printing. diff --git a/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h b/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h index 882995f091..878194bbef 100644 --- a/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h @@ -555,6 +555,9 @@ // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT + // Enable this option to scroll long filenames in the SD card menu + //#define SCROLL_LONG_FILENAMES + // This option allows you to abort SD printing when any endstop is triggered. // This feature must be enabled with "M540 S1" or from the LCD menu. // To have any effect, endstops must be enabled during SD printing. diff --git a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h index 108d091966..370accc94c 100644 --- a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h @@ -552,6 +552,9 @@ // This allows hosts to request long names for files and folders with M33 #define LONG_FILENAME_HOST_SUPPORT + // Enable this option to scroll long filenames in the SD card menu + //#define SCROLL_LONG_FILENAMES + // This option allows you to abort SD printing when any endstop is triggered. // This feature must be enabled with "M540 S1" or from the LCD menu. // To have any effect, endstops must be enabled during SD printing. diff --git a/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h b/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h index 882995f091..878194bbef 100644 --- a/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h @@ -555,6 +555,9 @@ // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT + // Enable this option to scroll long filenames in the SD card menu + //#define SCROLL_LONG_FILENAMES + // This option allows you to abort SD printing when any endstop is triggered. // This feature must be enabled with "M540 S1" or from the LCD menu. // To have any effect, endstops must be enabled during SD printing. diff --git a/Marlin/src/config/examples/Cartesio/Configuration_adv.h b/Marlin/src/config/examples/Cartesio/Configuration_adv.h index cda6da7726..fe056678c4 100644 --- a/Marlin/src/config/examples/Cartesio/Configuration_adv.h +++ b/Marlin/src/config/examples/Cartesio/Configuration_adv.h @@ -555,6 +555,9 @@ // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT + // Enable this option to scroll long filenames in the SD card menu + //#define SCROLL_LONG_FILENAMES + // This option allows you to abort SD printing when any endstop is triggered. // This feature must be enabled with "M540 S1" or from the LCD menu. // To have any effect, endstops must be enabled during SD printing. diff --git a/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h b/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h index 72605e8a46..503e54f27a 100644 --- a/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h @@ -555,6 +555,9 @@ // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT + // Enable this option to scroll long filenames in the SD card menu + //#define SCROLL_LONG_FILENAMES + // This option allows you to abort SD printing when any endstop is triggered. // This feature must be enabled with "M540 S1" or from the LCD menu. // To have any effect, endstops must be enabled during SD printing. diff --git a/Marlin/src/config/examples/Felix/Configuration_adv.h b/Marlin/src/config/examples/Felix/Configuration_adv.h index b5b21c341c..e451aa55d2 100644 --- a/Marlin/src/config/examples/Felix/Configuration_adv.h +++ b/Marlin/src/config/examples/Felix/Configuration_adv.h @@ -555,6 +555,9 @@ // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT + // Enable this option to scroll long filenames in the SD card menu + //#define SCROLL_LONG_FILENAMES + // This option allows you to abort SD printing when any endstop is triggered. // This feature must be enabled with "M540 S1" or from the LCD menu. // To have any effect, endstops must be enabled during SD printing. diff --git a/Marlin/src/config/examples/Folger Tech/i3-2020/Configuration_adv.h b/Marlin/src/config/examples/Folger Tech/i3-2020/Configuration_adv.h index 1119045dcd..664cb146db 100644 --- a/Marlin/src/config/examples/Folger Tech/i3-2020/Configuration_adv.h +++ b/Marlin/src/config/examples/Folger Tech/i3-2020/Configuration_adv.h @@ -555,6 +555,9 @@ // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT + // Enable this option to scroll long filenames in the SD card menu + //#define SCROLL_LONG_FILENAMES + // This option allows you to abort SD printing when any endstop is triggered. // This feature must be enabled with "M540 S1" or from the LCD menu. // To have any effect, endstops must be enabled during SD printing. diff --git a/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h b/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h index ddebb35eb3..ae63616eac 100644 --- a/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h +++ b/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h @@ -555,6 +555,9 @@ // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT + // Enable this option to scroll long filenames in the SD card menu + //#define SCROLL_LONG_FILENAMES + // This option allows you to abort SD printing when any endstop is triggered. // This feature must be enabled with "M540 S1" or from the LCD menu. // To have any effect, endstops must be enabled during SD printing. diff --git a/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h b/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h index cc9a5242ad..0aea72bcad 100644 --- a/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h +++ b/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h @@ -552,6 +552,9 @@ // This allows hosts to request long names for files and folders with M33 #define LONG_FILENAME_HOST_SUPPORT + // Enable this option to scroll long filenames in the SD card menu + //#define SCROLL_LONG_FILENAMES + // This option allows you to abort SD printing when any endstop is triggered. // This feature must be enabled with "M540 S1" or from the LCD menu. // To have any effect, endstops must be enabled during SD printing. diff --git a/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h b/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h index 832dc49436..28d7b1ef46 100644 --- a/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h +++ b/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h @@ -555,6 +555,9 @@ // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT + // Enable this option to scroll long filenames in the SD card menu + //#define SCROLL_LONG_FILENAMES + // This option allows you to abort SD printing when any endstop is triggered. // This feature must be enabled with "M540 S1" or from the LCD menu. // To have any effect, endstops must be enabled during SD printing. diff --git a/Marlin/src/config/examples/RigidBot/Configuration_adv.h b/Marlin/src/config/examples/RigidBot/Configuration_adv.h index d7e5078fb7..942dc66aeb 100644 --- a/Marlin/src/config/examples/RigidBot/Configuration_adv.h +++ b/Marlin/src/config/examples/RigidBot/Configuration_adv.h @@ -555,6 +555,9 @@ // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT + // Enable this option to scroll long filenames in the SD card menu + //#define SCROLL_LONG_FILENAMES + // This option allows you to abort SD printing when any endstop is triggered. // This feature must be enabled with "M540 S1" or from the LCD menu. // To have any effect, endstops must be enabled during SD printing. diff --git a/Marlin/src/config/examples/SCARA/Configuration_adv.h b/Marlin/src/config/examples/SCARA/Configuration_adv.h index 42269860f9..e0ca067db2 100644 --- a/Marlin/src/config/examples/SCARA/Configuration_adv.h +++ b/Marlin/src/config/examples/SCARA/Configuration_adv.h @@ -555,6 +555,9 @@ // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT + // Enable this option to scroll long filenames in the SD card menu + //#define SCROLL_LONG_FILENAMES + // This option allows you to abort SD printing when any endstop is triggered. // This feature must be enabled with "M540 S1" or from the LCD menu. // To have any effect, endstops must be enabled during SD printing. diff --git a/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h b/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h index 981d67c9a1..fa0e0fd681 100644 --- a/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h +++ b/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h @@ -544,6 +544,9 @@ // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT + // Enable this option to scroll long filenames in the SD card menu + //#define SCROLL_LONG_FILENAMES + // This option allows you to abort SD printing when any endstop is triggered. // This feature must be enabled with "M540 S1" or from the LCD menu. // To have any effect, endstops must be enabled during SD printing. diff --git a/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h b/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h index f98f847beb..08ac52debb 100644 --- a/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h +++ b/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h @@ -555,6 +555,9 @@ // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT + // Enable this option to scroll long filenames in the SD card menu + //#define SCROLL_LONG_FILENAMES + // This option allows you to abort SD printing when any endstop is triggered. // This feature must be enabled with "M540 S1" or from the LCD menu. // To have any effect, endstops must be enabled during SD printing. diff --git a/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h b/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h index e9348dfc38..4e386dc61c 100644 --- a/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h +++ b/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h @@ -565,6 +565,9 @@ // This allows hosts to request long names for files and folders with M33 #define LONG_FILENAME_HOST_SUPPORT + // Enable this option to scroll long filenames in the SD card menu + //#define SCROLL_LONG_FILENAMES + // This option allows you to abort SD printing when any endstop is triggered. // This feature must be enabled with "M540 S1" or from the LCD menu. // To have any effect, endstops must be enabled during SD printing. diff --git a/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h b/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h index 17a73a6ee2..f28591864c 100644 --- a/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h +++ b/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h @@ -555,6 +555,9 @@ // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT + // Enable this option to scroll long filenames in the SD card menu + //#define SCROLL_LONG_FILENAMES + // This option allows you to abort SD printing when any endstop is triggered. // This feature must be enabled with "M540 S1" or from the LCD menu. // To have any effect, endstops must be enabled during SD printing. diff --git a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h index 65dead1a86..5cee85df28 100644 --- a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h @@ -557,6 +557,9 @@ // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT + // Enable this option to scroll long filenames in the SD card menu + //#define SCROLL_LONG_FILENAMES + // This option allows you to abort SD printing when any endstop is triggered. // This feature must be enabled with "M540 S1" or from the LCD menu. // To have any effect, endstops must be enabled during SD printing. diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h index 84e9998605..04b93b2a37 100644 --- a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h @@ -557,6 +557,9 @@ // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT + // Enable this option to scroll long filenames in the SD card menu + //#define SCROLL_LONG_FILENAMES + // This option allows you to abort SD printing when any endstop is triggered. // This feature must be enabled with "M540 S1" or from the LCD menu. // To have any effect, endstops must be enabled during SD printing. diff --git a/Marlin/src/config/examples/delta/generic/Configuration_adv.h b/Marlin/src/config/examples/delta/generic/Configuration_adv.h index 84e9998605..04b93b2a37 100644 --- a/Marlin/src/config/examples/delta/generic/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/generic/Configuration_adv.h @@ -557,6 +557,9 @@ // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT + // Enable this option to scroll long filenames in the SD card menu + //#define SCROLL_LONG_FILENAMES + // This option allows you to abort SD printing when any endstop is triggered. // This feature must be enabled with "M540 S1" or from the LCD menu. // To have any effect, endstops must be enabled during SD printing. diff --git a/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h b/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h index 84e9998605..04b93b2a37 100644 --- a/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h @@ -557,6 +557,9 @@ // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT + // Enable this option to scroll long filenames in the SD card menu + //#define SCROLL_LONG_FILENAMES + // This option allows you to abort SD printing when any endstop is triggered. // This feature must be enabled with "M540 S1" or from the LCD menu. // To have any effect, endstops must be enabled during SD printing. diff --git a/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h b/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h index fb92763fc8..cc4dc46d67 100644 --- a/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h @@ -562,6 +562,9 @@ // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT + // Enable this option to scroll long filenames in the SD card menu + //#define SCROLL_LONG_FILENAMES + // This option allows you to abort SD printing when any endstop is triggered. // This feature must be enabled with "M540 S1" or from the LCD menu. // To have any effect, endstops must be enabled during SD printing. diff --git a/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h b/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h index b72d5d3fde..093d6d9931 100644 --- a/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h @@ -557,6 +557,9 @@ // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT + // Enable this option to scroll long filenames in the SD card menu + //#define SCROLL_LONG_FILENAMES + // This option allows you to abort SD printing when any endstop is triggered. // This feature must be enabled with "M540 S1" or from the LCD menu. // To have any effect, endstops must be enabled during SD printing. diff --git a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h index 19c88458e6..f1527d4346 100644 --- a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h +++ b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h @@ -555,6 +555,9 @@ // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT + // Enable this option to scroll long filenames in the SD card menu + //#define SCROLL_LONG_FILENAMES + // This option allows you to abort SD printing when any endstop is triggered. // This feature must be enabled with "M540 S1" or from the LCD menu. // To have any effect, endstops must be enabled during SD printing. diff --git a/Marlin/src/config/examples/makibox/Configuration_adv.h b/Marlin/src/config/examples/makibox/Configuration_adv.h index 1d40e2d13b..82cc6e0245 100644 --- a/Marlin/src/config/examples/makibox/Configuration_adv.h +++ b/Marlin/src/config/examples/makibox/Configuration_adv.h @@ -555,6 +555,9 @@ // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT + // Enable this option to scroll long filenames in the SD card menu + //#define SCROLL_LONG_FILENAMES + // This option allows you to abort SD printing when any endstop is triggered. // This feature must be enabled with "M540 S1" or from the LCD menu. // To have any effect, endstops must be enabled during SD printing. diff --git a/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h b/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h index b6630e7cbe..df75fd7567 100644 --- a/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h @@ -555,6 +555,9 @@ // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT + // Enable this option to scroll long filenames in the SD card menu + //#define SCROLL_LONG_FILENAMES + // This option allows you to abort SD printing when any endstop is triggered. // This feature must be enabled with "M540 S1" or from the LCD menu. // To have any effect, endstops must be enabled during SD printing. diff --git a/Marlin/src/config/examples/wt150/Configuration_adv.h b/Marlin/src/config/examples/wt150/Configuration_adv.h index fdec2631cf..73f1025604 100644 --- a/Marlin/src/config/examples/wt150/Configuration_adv.h +++ b/Marlin/src/config/examples/wt150/Configuration_adv.h @@ -555,6 +555,9 @@ // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT + // Enable this option to scroll long filenames in the SD card menu + //#define SCROLL_LONG_FILENAMES + // This option allows you to abort SD printing when any endstop is triggered. // This feature must be enabled with "M540 S1" or from the LCD menu. // To have any effect, endstops must be enabled during SD printing. diff --git a/Marlin/src/lcd/ultralcd.cpp b/Marlin/src/lcd/ultralcd.cpp index c1e71f7cec..bff5142b54 100644 --- a/Marlin/src/lcd/ultralcd.cpp +++ b/Marlin/src/lcd/ultralcd.cpp @@ -76,12 +76,16 @@ int16_t lcd_preheat_hotend_temp[2], lcd_preheat_bed_temp[2], lcd_preheat_fan_spe #endif #endif -uint8_t lcd_status_message_level; +uint8_t lcd_status_update_delay = 1, // First update one loop delayed + lcd_status_message_level; // Higher level overrides lower char lcd_status_message[3 * (LCD_WIDTH) + 1] = WELCOME_MSG; // worst case is kana with up to 3*LCD_WIDTH+1 #if ENABLED(STATUS_MESSAGE_SCROLLING) uint8_t status_scroll_pos = 0; #endif +#if ENABLED(SCROLL_LONG_FILENAMES) + uint8_t filename_scroll_pos, filename_scroll_max, filename_scroll_hash; +#endif #if ENABLED(LCD_SET_PROGRESS_MANUALLY) uint8_t progress_bar_percent; @@ -4665,7 +4669,6 @@ void lcd_update() { // We arrive here every ~100ms when idling often enough. // Instead of tracking the changes simply redraw the Info Screen ~1 time a second. - static int8_t lcd_status_update_delay = 1; // first update one loop delayed if ( #if ENABLED(ULTIPANEL) currentScreen == lcd_status_screen && @@ -4681,6 +4684,17 @@ void lcd_update() { lcdDrawUpdate = LCDVIEW_REDRAW_NOW; } + #if ENABLED(SCROLL_LONG_FILENAMES) + // If scrolling of long file names is enabled and we are in the sd card menu, + // cause a refresh to occur until all the text has scrolled into view. + if (currentScreen == lcd_sdcard_menu && filename_scroll_pos < filename_scroll_max && !lcd_status_update_delay--) { + lcd_status_update_delay = 6; + lcdDrawUpdate = LCDVIEW_REDRAW_NOW; + filename_scroll_pos++; + return_to_status_ms = ms + LCD_TIMEOUT_TO_STATUS; + } + #endif + // then we want to use 1/2 of the time only. uint16_t bbr2 = planner.block_buffer_runtime() >> 1; @@ -4765,7 +4779,7 @@ void lcd_update() { } // ELAPSED(ms, next_lcd_update_ms) } -void pad_message_string() { +inline void pad_message_string() { uint8_t i = 0, j = 0; char c; while ((c = lcd_status_message[i]) && j < LCD_WIDTH) { diff --git a/Marlin/src/lcd/ultralcd_impl_DOGM.h b/Marlin/src/lcd/ultralcd_impl_DOGM.h index 7e38127c15..c1b868c55c 100644 --- a/Marlin/src/lcd/ultralcd_impl_DOGM.h +++ b/Marlin/src/lcd/ultralcd_impl_DOGM.h @@ -935,19 +935,36 @@ static void lcd_implementation_status_screen() { if (!PAGE_CONTAINS(row_y1, row_y2)) return; - uint8_t n = LCD_WIDTH - (START_COL) - 1; + constexpr uint8_t maxlen = LCD_WIDTH - (START_COL) - 1; + const char *outstr = longFilename[0] ? longFilename : filename; if (longFilename[0]) { - filename = longFilename; - longFilename[n] = '\0'; // cutoff at screen edge + #if ENABLED(SCROLL_LONG_FILENAMES) + if (isSelected) { + uint8_t name_hash = row; + for (uint8_t l = FILENAME_LENGTH; l--;) + name_hash = ((name_hash << 1) | (name_hash >> 7)) ^ filename[l]; // rotate, xor + if (filename_scroll_hash != name_hash) { // If the hash changed... + filename_scroll_hash = name_hash; // Save the new hash + filename_scroll_max = max(0, lcd_strlen(longFilename) - maxlen); // Update the scroll limit + filename_scroll_pos = 0; // Reset scroll to the start + lcd_status_update_delay = 8; // Don't scroll right away + } + outstr += filename_scroll_pos; + } + #else + longFilename[maxlen] = '\0'; // cutoff at screen edge + #endif } if (isDir) lcd_print(LCD_STR_FOLDER[0]); - while (char c = *filename) { + char c; + uint8_t n = maxlen; + while (n && (c = *outstr)) { n -= lcd_print_and_count(c); - filename++; + ++outstr; } - while (n--) u8g.print(' '); + while (n) { --n; u8g.print(' '); } } #define lcd_implementation_drawmenu_sdfile(sel, row, pstr, filename, longFilename) _drawmenu_sd(sel, row, pstr, filename, longFilename, false) diff --git a/Marlin/src/lcd/ultralcd_impl_HD44780.h b/Marlin/src/lcd/ultralcd_impl_HD44780.h index adfa5b8fa3..b9b14cc1bb 100644 --- a/Marlin/src/lcd/ultralcd_impl_HD44780.h +++ b/Marlin/src/lcd/ultralcd_impl_HD44780.h @@ -991,18 +991,37 @@ static void lcd_implementation_status_screen() { static void lcd_implementation_drawmenu_sd(const bool sel, const uint8_t row, const char* const pstr, const char* filename, char* const longFilename, const uint8_t concat, const char post_char) { UNUSED(pstr); - uint8_t n = LCD_WIDTH - concat; lcd.setCursor(0, row); lcd.print(sel ? '>' : ' '); + + uint8_t n = LCD_WIDTH - concat; + const char *outstr = longFilename[0] ? longFilename : filename; if (longFilename[0]) { - filename = longFilename; - longFilename[n] = '\0'; + #if ENABLED(SCROLL_LONG_FILENAMES) + if (sel) { + uint8_t name_hash = row; + for (uint8_t l = FILENAME_LENGTH; l--;) + name_hash = ((name_hash << 1) | (name_hash >> 7)) ^ filename[l]; // rotate, xor + if (filename_scroll_hash != name_hash) { // If the hash changed... + filename_scroll_hash = name_hash; // Save the new hash + filename_scroll_max = max(0, lcd_strlen(longFilename) - n); // Update the scroll limit + filename_scroll_pos = 0; // Reset scroll to the start + lcd_status_update_delay = 8; // Don't scroll right away + } + outstr += filename_scroll_pos; + } + #else + longFilename[n] = '\0'; // cutoff at screen edge + #endif } - while (char c = *filename) { + + char c; + while (n && (c = *outstr)) { n -= charset_mapper(c); - filename++; + ++outstr; } - while (n--) lcd.write(' '); + while (n) { --n; lcd.write(' '); } + lcd.print(post_char); } diff --git a/Marlin/src/sd/SdBaseFile.cpp b/Marlin/src/sd/SdBaseFile.cpp index b5356c0674..b6d98542e8 100644 --- a/Marlin/src/sd/SdBaseFile.cpp +++ b/Marlin/src/sd/SdBaseFile.cpp @@ -1146,7 +1146,7 @@ int8_t SdBaseFile::readDir(dir_t* dir, char* longFilename) { vfat_t* VFAT = (vfat_t*)dir; // Sanity-check the VFAT entry. The first cluster is always set to zero. And the sequence number should be higher than 0 if (VFAT->firstClusterLow == 0 && (VFAT->sequenceNumber & 0x1F) > 0 && (VFAT->sequenceNumber & 0x1F) <= MAX_VFAT_ENTRIES) { - // TODO: Store the filename checksum to verify if a none-long filename aware system modified the file table. + // TODO: Store the filename checksum to verify if a long-filename-unaware system modified the file table. n = ((VFAT->sequenceNumber & 0x1F) - 1) * (FILENAME_LENGTH); for (uint8_t i = 0; i < FILENAME_LENGTH; i++) longFilename[n + i] = (i < 5) ? VFAT->name1[i] : (i < 11) ? VFAT->name2[i - 5] : VFAT->name3[i - 11]; diff --git a/Marlin/src/sd/SdFatConfig.h b/Marlin/src/sd/SdFatConfig.h index 8f30f5b7b4..e4e81255d1 100644 --- a/Marlin/src/sd/SdFatConfig.h +++ b/Marlin/src/sd/SdFatConfig.h @@ -21,20 +21,20 @@ */ /** + * SdFatConfig.h * Arduino SdFat Library * Copyright (C) 2009 by William Greiman * * This file is part of the Arduino Sd2Card Library */ -/** - * \file - * \brief configuration definitions - */ -#ifndef SDFATCONFIG_H -#define SDFATCONFIG_H +#ifndef _SDFATCONFIG_H_ +#define _SDFATCONFIG_H_ + +#include "../inc/MarlinConfig.h" //------------------------------------------------------------------------------ + /** * To use multiple SD cards set USE_MULTIPLE_CARDS nonzero. * @@ -43,7 +43,9 @@ * Each card requires about 550 bytes of SRAM so use of a Mega is recommended. */ #define USE_MULTIPLE_CARDS 0 + //------------------------------------------------------------------------------ + /** * Call flush for endl if ENDL_CALLS_FLUSH is nonzero * @@ -62,30 +64,40 @@ * all data to be written to the SD. */ #define ENDL_CALLS_FLUSH 0 + //------------------------------------------------------------------------------ + /** * Allow use of deprecated functions if ALLOW_DEPRECATED_FUNCTIONS is nonzero */ #define ALLOW_DEPRECATED_FUNCTIONS 1 + //------------------------------------------------------------------------------ + /** * Allow FAT12 volumes if FAT12_SUPPORT is nonzero. * FAT12 has not been well tested. */ #define FAT12_SUPPORT 0 + //------------------------------------------------------------------------------ + /** * SPI init rate for SD initialization commands. Must be 5 (F_CPU/64) * or 6 (F_CPU/128). */ #define SPI_SD_INIT_RATE 5 + //------------------------------------------------------------------------------ + /** * Set the SS pin high for hardware SPI. If SS is chip select for another SPI * device this will disable that device during the SD init phase. */ #define SET_SPI_SS_HIGH 1 + //------------------------------------------------------------------------------ + /** * Define MEGA_SOFT_SPI nonzero to use software SPI on Mega Arduinos. * Pins used are SS 10, MOSI 11, MISO 12, and SCK 13. @@ -95,36 +107,40 @@ * but many SD cards will fail with GPS Shield V1.0. */ #define MEGA_SOFT_SPI 0 + //------------------------------------------------------------------------------ -/** - * Set USE_SOFTWARE_SPI nonzero to always use software SPI. - */ + +// Set USE_SOFTWARE_SPI nonzero to ALWAYS use Software SPI. #define USE_SOFTWARE_SPI 0 -// define software SPI pins so Mega can use unmodified 168/328 shields -/** Software SPI chip select pin for the SD */ -#define SOFT_SPI_CS_PIN 10 -/** Software SPI Master Out Slave In pin */ -#define SOFT_SPI_MOSI_PIN 11 -/** Software SPI Master In Slave Out pin */ -#define SOFT_SPI_MISO_PIN 12 -/** Software SPI Clock pin */ -#define SOFT_SPI_SCK_PIN 13 + +// Define software SPI pins so Mega can use unmodified 168/328 shields +#define SOFT_SPI_CS_PIN 10 // Software SPI chip select pin for the SD +#define SOFT_SPI_MOSI_PIN 11 // Software SPI Master Out Slave In pin +#define SOFT_SPI_MISO_PIN 12 // Software SPI Master In Slave Out pin +#define SOFT_SPI_SCK_PIN 13 // Software SPI Clock pin + //------------------------------------------------------------------------------ + /** * The __cxa_pure_virtual function is an error handler that is invoked when * a pure virtual function is called. */ #define USE_CXA_PURE_VIRTUAL 1 -/** Number of UTF-16 characters per entry */ -#define FILENAME_LENGTH 13 - /** - * Defines for long (vfat) filenames + * Defines for 8.3 and long (vfat) filenames */ -/** Number of VFAT entries used. Every entry has 13 UTF-16 characters */ -#define MAX_VFAT_ENTRIES (2) -/** Total size of the buffer used to store the long filenames */ -#define LONG_FILENAME_LENGTH (FILENAME_LENGTH*MAX_VFAT_ENTRIES+1) -#endif // SDFATCONFIG_H +#define FILENAME_LENGTH 13 // Number of UTF-16 characters per entry + +// Number of VFAT entries used. Each entry has 13 UTF-16 characters +#if ENABLED(SCROLL_LONG_FILENAMES) + #define MAX_VFAT_ENTRIES (5) +#else + #define MAX_VFAT_ENTRIES (2) +#endif + +// Total bytes needed to store a single long filename +#define LONG_FILENAME_LENGTH (FILENAME_LENGTH * MAX_VFAT_ENTRIES + 1) + +#endif // _SDFATCONFIG_H_ From 3d2b2eb1ca16b576b8138668b74f022654a0664a Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 18 Oct 2017 22:18:51 -0500 Subject: [PATCH 04/20] Prevent SDCARD_SORT_ALPHA from exploding --- Marlin/Configuration_adv.h | 2 ++ Marlin/src/config/default/Configuration_adv.h | 2 ++ .../AlephObjects/TAZ4/Configuration_adv.h | 2 ++ .../examples/Anet/A6/Configuration_adv.h | 4 ++- .../examples/Anet/A8/Configuration_adv.h | 2 ++ .../examples/BQ/Hephestos/Configuration_adv.h | 2 ++ .../BQ/Hephestos_2/Configuration_adv.h | 2 ++ .../examples/BQ/WITBOX/Configuration_adv.h | 2 ++ .../examples/Cartesio/Configuration_adv.h | 2 ++ .../Creality/CR-10/Configuration_adv.h | 10 ++++--- .../config/examples/Felix/Configuration_adv.h | 2 ++ .../Folger Tech/i3-2020/Configuration_adv.h | 2 ++ .../Infitary/i3-M508/Configuration_adv.h | 2 ++ .../examples/Malyan/M150/Configuration_adv.h | 2 ++ .../examples/Mks/Sbase/Configuration_adv.h | 2 ++ .../examples/RigidBot/Configuration_adv.h | 2 ++ .../config/examples/SCARA/Configuration_adv.h | 2 ++ .../examples/Sanguinololu/Configuration_adv.h | 2 ++ .../examples/TinyBoy2/Configuration_adv.h | 2 ++ .../Velleman/K8200/Configuration_adv.h | 2 ++ .../Velleman/K8400/Configuration_adv.h | 2 ++ .../FLSUN/auto_calibrate/Configuration_adv.h | 2 ++ .../FLSUN/kossel_mini/Configuration_adv.h | 2 ++ .../delta/generic/Configuration_adv.h | 2 ++ .../delta/kossel_mini/Configuration_adv.h | 2 ++ .../delta/kossel_pro/Configuration_adv.h | 2 ++ .../delta/kossel_xl/Configuration_adv.h | 2 ++ .../gCreate/gMax1.5+/Configuration_adv.h | 2 ++ .../examples/makibox/Configuration_adv.h | 2 ++ .../tvrrug/Round2/Configuration_adv.h | 2 ++ .../config/examples/wt150/Configuration_adv.h | 2 ++ Marlin/src/inc/SanityCheck.h | 10 +++++++ Marlin/src/sd/cardreader.cpp | 26 ++++++++++++++----- Marlin/src/sd/cardreader.h | 10 +++++-- 34 files changed, 105 insertions(+), 13 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 03195e458a..0773e7d5de 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -531,6 +531,8 @@ #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. #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use! + #define SDSORT_CACHE_VFATS 2 // Maximum number of 13-byte VFAT entries to use for sorting. + // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM. #endif // Show a progress bar on HD44780 LCDs for SD printing diff --git a/Marlin/src/config/default/Configuration_adv.h b/Marlin/src/config/default/Configuration_adv.h index 03195e458a..0773e7d5de 100644 --- a/Marlin/src/config/default/Configuration_adv.h +++ b/Marlin/src/config/default/Configuration_adv.h @@ -531,6 +531,8 @@ #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. #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use! + #define SDSORT_CACHE_VFATS 2 // Maximum number of 13-byte VFAT entries to use for sorting. + // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM. #endif // Show a progress bar on HD44780 LCDs for SD printing diff --git a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h index 11dc33cdfb..6ef81166f9 100644 --- a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h +++ b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h @@ -531,6 +531,8 @@ #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. #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use! + #define SDSORT_CACHE_VFATS 2 // Maximum number of 13-byte VFAT entries to use for sorting. + // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM. #endif // Show a progress bar on HD44780 LCDs for SD printing diff --git a/Marlin/src/config/examples/Anet/A6/Configuration_adv.h b/Marlin/src/config/examples/Anet/A6/Configuration_adv.h index 33502d6592..3476f84654 100644 --- a/Marlin/src/config/examples/Anet/A6/Configuration_adv.h +++ b/Marlin/src/config/examples/Anet/A6/Configuration_adv.h @@ -531,6 +531,8 @@ #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. #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use! + #define SDSORT_CACHE_VFATS 2 // Maximum number of 13-byte VFAT entries to use for sorting. + // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM. #endif // Show a progress bar on HD44780 LCDs for SD printing @@ -621,7 +623,7 @@ */ //#define BABYSTEPPING #if ENABLED(BABYSTEPPING) - //#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA! + //#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA! #define BABYSTEP_INVERT_Z false // Change if Z babysteps should go the other way #define BABYSTEP_MULTIPLICATOR 100 // Babysteps are very small. Increase for faster motion. //#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping diff --git a/Marlin/src/config/examples/Anet/A8/Configuration_adv.h b/Marlin/src/config/examples/Anet/A8/Configuration_adv.h index 84aa1ed96a..9e141d3c32 100644 --- a/Marlin/src/config/examples/Anet/A8/Configuration_adv.h +++ b/Marlin/src/config/examples/Anet/A8/Configuration_adv.h @@ -531,6 +531,8 @@ #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. #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use! + #define SDSORT_CACHE_VFATS 2 // Maximum number of 13-byte VFAT entries to use for sorting. + // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM. #endif // Show a progress bar on HD44780 LCDs for SD printing diff --git a/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h b/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h index 878194bbef..d272e77883 100644 --- a/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h @@ -531,6 +531,8 @@ #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. #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use! + #define SDSORT_CACHE_VFATS 2 // Maximum number of 13-byte VFAT entries to use for sorting. + // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM. #endif // Show a progress bar on HD44780 LCDs for SD printing diff --git a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h index 370accc94c..71a9d27954 100644 --- a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h @@ -531,6 +531,8 @@ #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. #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use! + #define SDSORT_CACHE_VFATS 2 // Maximum number of 13-byte VFAT entries to use for sorting. + // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM. #endif // Show a progress bar on HD44780 LCDs for SD printing diff --git a/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h b/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h index 878194bbef..d272e77883 100644 --- a/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h @@ -531,6 +531,8 @@ #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. #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use! + #define SDSORT_CACHE_VFATS 2 // Maximum number of 13-byte VFAT entries to use for sorting. + // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM. #endif // Show a progress bar on HD44780 LCDs for SD printing diff --git a/Marlin/src/config/examples/Cartesio/Configuration_adv.h b/Marlin/src/config/examples/Cartesio/Configuration_adv.h index fe056678c4..4acef5bab8 100644 --- a/Marlin/src/config/examples/Cartesio/Configuration_adv.h +++ b/Marlin/src/config/examples/Cartesio/Configuration_adv.h @@ -531,6 +531,8 @@ #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. #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use! + #define SDSORT_CACHE_VFATS 2 // Maximum number of 13-byte VFAT entries to use for sorting. + // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM. #endif // Show a progress bar on HD44780 LCDs for SD printing diff --git a/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h b/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h index 503e54f27a..ea5992d9d0 100644 --- a/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h @@ -531,6 +531,8 @@ #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 true // Keep sorted items in RAM longer for speedy performance. Most expensive option. #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use! + #define SDSORT_CACHE_VFATS 2 // Maximum number of 13-byte VFAT entries to use for sorting. + // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM. #endif // Show a progress bar on HD44780 LCDs for SD printing @@ -621,10 +623,10 @@ */ #define BABYSTEPPING #if ENABLED(BABYSTEPPING) - //#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA! - #define BABYSTEP_INVERT_Z false // Change if Z babysteps should go the other way - #define BABYSTEP_MULTIPLICATOR 10 // Babysteps are very small. Increase for faster motion. - //#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping + //#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA! + #define BABYSTEP_INVERT_Z false // Change if Z babysteps should go the other way + #define BABYSTEP_MULTIPLICATOR 10 // Babysteps are very small. Increase for faster motion. + //#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping #define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping. #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds. // Note: Extra time may be added to mitigate controller latency. diff --git a/Marlin/src/config/examples/Felix/Configuration_adv.h b/Marlin/src/config/examples/Felix/Configuration_adv.h index e451aa55d2..27610083c9 100644 --- a/Marlin/src/config/examples/Felix/Configuration_adv.h +++ b/Marlin/src/config/examples/Felix/Configuration_adv.h @@ -531,6 +531,8 @@ #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. #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use! + #define SDSORT_CACHE_VFATS 2 // Maximum number of 13-byte VFAT entries to use for sorting. + // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM. #endif // Show a progress bar on HD44780 LCDs for SD printing diff --git a/Marlin/src/config/examples/Folger Tech/i3-2020/Configuration_adv.h b/Marlin/src/config/examples/Folger Tech/i3-2020/Configuration_adv.h index 664cb146db..91117bd4f8 100644 --- a/Marlin/src/config/examples/Folger Tech/i3-2020/Configuration_adv.h +++ b/Marlin/src/config/examples/Folger Tech/i3-2020/Configuration_adv.h @@ -531,6 +531,8 @@ #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. #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use! + #define SDSORT_CACHE_VFATS 2 // Maximum number of 13-byte VFAT entries to use for sorting. + // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM. #endif // Show a progress bar on HD44780 LCDs for SD printing diff --git a/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h b/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h index ae63616eac..2b40851365 100644 --- a/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h +++ b/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h @@ -531,6 +531,8 @@ #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. #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use! + #define SDSORT_CACHE_VFATS 2 // Maximum number of 13-byte VFAT entries to use for sorting. + // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM. #endif // Show a progress bar on HD44780 LCDs for SD printing diff --git a/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h b/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h index 0aea72bcad..7293c0f6c2 100644 --- a/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h +++ b/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h @@ -531,6 +531,8 @@ #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. #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use! + #define SDSORT_CACHE_VFATS 2 // Maximum number of 13-byte VFAT entries to use for sorting. + // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM. #endif // Show a progress bar on HD44780 LCDs for SD printing diff --git a/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h b/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h index 28d7b1ef46..1f45a38799 100644 --- a/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h +++ b/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h @@ -531,6 +531,8 @@ #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. #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use! + #define SDSORT_CACHE_VFATS 2 // Maximum number of 13-byte VFAT entries to use for sorting. + // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM. #endif // Show a progress bar on HD44780 LCDs for SD printing diff --git a/Marlin/src/config/examples/RigidBot/Configuration_adv.h b/Marlin/src/config/examples/RigidBot/Configuration_adv.h index 942dc66aeb..9b9f7c3474 100644 --- a/Marlin/src/config/examples/RigidBot/Configuration_adv.h +++ b/Marlin/src/config/examples/RigidBot/Configuration_adv.h @@ -531,6 +531,8 @@ #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. #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use! + #define SDSORT_CACHE_VFATS 2 // Maximum number of 13-byte VFAT entries to use for sorting. + // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM. #endif // Show a progress bar on HD44780 LCDs for SD printing diff --git a/Marlin/src/config/examples/SCARA/Configuration_adv.h b/Marlin/src/config/examples/SCARA/Configuration_adv.h index e0ca067db2..150a10a1c6 100644 --- a/Marlin/src/config/examples/SCARA/Configuration_adv.h +++ b/Marlin/src/config/examples/SCARA/Configuration_adv.h @@ -531,6 +531,8 @@ #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. #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use! + #define SDSORT_CACHE_VFATS 2 // Maximum number of 13-byte VFAT entries to use for sorting. + // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM. #endif // Show a progress bar on HD44780 LCDs for SD printing diff --git a/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h b/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h index fa0e0fd681..74315aa322 100644 --- a/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h +++ b/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h @@ -520,6 +520,8 @@ #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. #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use! + #define SDSORT_CACHE_VFATS 2 // Maximum number of 13-byte VFAT entries to use for sorting. + // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM. #endif // Show a progress bar on HD44780 LCDs for SD printing diff --git a/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h b/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h index 08ac52debb..3ae501a301 100644 --- a/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h +++ b/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h @@ -531,6 +531,8 @@ #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. #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use! + #define SDSORT_CACHE_VFATS 2 // Maximum number of 13-byte VFAT entries to use for sorting. + // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM. #endif // Show a progress bar on HD44780 LCDs for SD printing diff --git a/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h b/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h index 4e386dc61c..c57a8765ff 100644 --- a/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h +++ b/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h @@ -544,6 +544,8 @@ #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. #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use! + #define SDSORT_CACHE_VFATS 2 // Maximum number of 13-byte VFAT entries to use for sorting. + // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM. #endif // Show a progress bar on HD44780 LCDs for SD printing diff --git a/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h b/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h index f28591864c..e5b96e6ae9 100644 --- a/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h +++ b/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h @@ -531,6 +531,8 @@ #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. #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use! + #define SDSORT_CACHE_VFATS 2 // Maximum number of 13-byte VFAT entries to use for sorting. + // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM. #endif // Show a progress bar on HD44780 LCDs for SD printing diff --git a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h index 5cee85df28..8c2e7fc953 100644 --- a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h @@ -533,6 +533,8 @@ #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. #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use! + #define SDSORT_CACHE_VFATS 2 // Maximum number of 13-byte VFAT entries to use for sorting. + // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM. #endif // Show a progress bar on HD44780 LCDs for SD printing diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h index 04b93b2a37..a039abc464 100644 --- a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h @@ -533,6 +533,8 @@ #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. #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use! + #define SDSORT_CACHE_VFATS 2 // Maximum number of 13-byte VFAT entries to use for sorting. + // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM. #endif // Show a progress bar on HD44780 LCDs for SD printing diff --git a/Marlin/src/config/examples/delta/generic/Configuration_adv.h b/Marlin/src/config/examples/delta/generic/Configuration_adv.h index 04b93b2a37..a039abc464 100644 --- a/Marlin/src/config/examples/delta/generic/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/generic/Configuration_adv.h @@ -533,6 +533,8 @@ #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. #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use! + #define SDSORT_CACHE_VFATS 2 // Maximum number of 13-byte VFAT entries to use for sorting. + // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM. #endif // Show a progress bar on HD44780 LCDs for SD printing diff --git a/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h b/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h index 04b93b2a37..a039abc464 100644 --- a/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h @@ -533,6 +533,8 @@ #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. #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use! + #define SDSORT_CACHE_VFATS 2 // Maximum number of 13-byte VFAT entries to use for sorting. + // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM. #endif // Show a progress bar on HD44780 LCDs for SD printing diff --git a/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h b/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h index cc4dc46d67..9c5e1ab8f5 100644 --- a/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h @@ -538,6 +538,8 @@ #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. #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use! + #define SDSORT_CACHE_VFATS 2 // Maximum number of 13-byte VFAT entries to use for sorting. + // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM. #endif // Show a progress bar on HD44780 LCDs for SD printing diff --git a/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h b/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h index 093d6d9931..c2bbd7efc5 100644 --- a/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h @@ -533,6 +533,8 @@ #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. #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use! + #define SDSORT_CACHE_VFATS 2 // Maximum number of 13-byte VFAT entries to use for sorting. + // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM. #endif // Show a progress bar on HD44780 LCDs for SD printing diff --git a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h index f1527d4346..32d7b410eb 100644 --- a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h +++ b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h @@ -531,6 +531,8 @@ #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. #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use! + #define SDSORT_CACHE_VFATS 2 // Maximum number of 13-byte VFAT entries to use for sorting. + // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM. #endif // Show a progress bar on HD44780 LCDs for SD printing diff --git a/Marlin/src/config/examples/makibox/Configuration_adv.h b/Marlin/src/config/examples/makibox/Configuration_adv.h index 82cc6e0245..8e9e1fb720 100644 --- a/Marlin/src/config/examples/makibox/Configuration_adv.h +++ b/Marlin/src/config/examples/makibox/Configuration_adv.h @@ -531,6 +531,8 @@ #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. #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use! + #define SDSORT_CACHE_VFATS 2 // Maximum number of 13-byte VFAT entries to use for sorting. + // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM. #endif // Show a progress bar on HD44780 LCDs for SD printing diff --git a/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h b/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h index df75fd7567..9e702d9e65 100644 --- a/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h @@ -531,6 +531,8 @@ #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. #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use! + #define SDSORT_CACHE_VFATS 2 // Maximum number of 13-byte VFAT entries to use for sorting. + // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM. #endif // Show a progress bar on HD44780 LCDs for SD printing diff --git a/Marlin/src/config/examples/wt150/Configuration_adv.h b/Marlin/src/config/examples/wt150/Configuration_adv.h index 73f1025604..eadd8f330a 100644 --- a/Marlin/src/config/examples/wt150/Configuration_adv.h +++ b/Marlin/src/config/examples/wt150/Configuration_adv.h @@ -531,6 +531,8 @@ #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. #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use! + #define SDSORT_CACHE_VFATS 2 // Maximum number of 13-byte VFAT entries to use for sorting. + // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM. #endif // Show a progress bar on HD44780 LCDs for SD printing diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index c4a0755c70..36fc2efa21 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -301,6 +301,16 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE, #error "SDSORT_CACHE_NAMES requires SDSORT_USES_RAM (which reads the directory into RAM)." #endif #endif + + #if ENABLED(SDSORT_CACHE_NAMES) && DISABLED(SDSORT_DYNAMIC_RAM) + #if SDSORT_CACHE_VFATS < 2 + #error "SDSORT_CACHE_VFATS must be 2 or greater!" + #elif SDSORT_CACHE_VFATS > MAX_VFAT_ENTRIES + #undef SDSORT_CACHE_VFATS + #define SDSORT_CACHE_VFATS MAX_VFAT_ENTRIES + #warning "SDSORT_CACHE_VFATS was reduced to MAX_VFAT_ENTRIES!" + #endif + #endif #endif /** diff --git a/Marlin/src/sd/cardreader.cpp b/Marlin/src/sd/cardreader.cpp index 54840006ef..cfa7b513f5 100644 --- a/Marlin/src/sd/cardreader.cpp +++ b/Marlin/src/sd/cardreader.cpp @@ -704,7 +704,7 @@ void CardReader::updir() { sortnames = new char*[fileCnt]; #endif #elif ENABLED(SDSORT_USES_STACK) - char sortnames[fileCnt][LONG_FILENAME_LENGTH]; + char sortnames[fileCnt][SORTED_LONGNAME_MAXLEN]; #endif // Folder sorting needs 1 bit per entry for flags. @@ -743,7 +743,12 @@ void CardReader::updir() { #endif #else // Copy filenames into the static array - strcpy(sortnames[i], LONGEST_FILENAME); + #if SORTED_LONGNAME_MAXLEN != LONG_FILENAME_LENGTH + strncpy(sortnames[i], LONGEST_FILENAME, SORTED_LONGNAME_MAXLEN); + sortnames[i][SORTED_LONGNAME_MAXLEN - 1] = '\0'; + #else + strcpy(sortnames[i], SORTED_LONGNAME_MAXLEN); + #endif #if ENABLED(SDSORT_CACHE_NAMES) strcpy(sortshort[i], filename); #endif @@ -834,12 +839,21 @@ void CardReader::updir() { #if ENABLED(SDSORT_DYNAMIC_RAM) sortnames = new char*[1]; sortnames[0] = strdup(LONGEST_FILENAME); // malloc - sortshort = new char*[1]; - sortshort[0] = strdup(filename); // malloc + #if ENABLED(SDSORT_CACHE_NAMES) + sortshort = new char*[1]; + sortshort[0] = strdup(filename); // malloc + #endif isDir = new uint8_t[1]; #else - strcpy(sortnames[0], LONGEST_FILENAME); - strcpy(sortshort[0], filename); + #if SORTED_LONGNAME_MAXLEN != LONG_FILENAME_LENGTH + strncpy(sortnames[0], LONGEST_FILENAME, SORTED_LONGNAME_MAXLEN); + sortnames[0][SORTED_LONGNAME_MAXLEN - 1] = '\0'; + #else + strcpy(sortnames[0], SORTED_LONGNAME_MAXLEN); + #endif + #if ENABLED(SDSORT_CACHE_NAMES) + strcpy(sortshort[0], filename); + #endif #endif isDir[0] = filenameIsDir ? 0x01 : 0x00; #endif diff --git a/Marlin/src/sd/cardreader.h b/Marlin/src/sd/cardreader.h index f663ca8b47..25a1daff12 100644 --- a/Marlin/src/sd/cardreader.h +++ b/Marlin/src/sd/cardreader.h @@ -108,6 +108,12 @@ private: uint8_t sort_order[SDSORT_LIMIT]; #endif + #if ENABLED(SDSORT_USES_RAM) && ENABLED(SDSORT_CACHE_NAMES) && DISABLED(SDSORT_DYNAMIC_RAM) + #define SORTED_LONGNAME_MAXLEN ((SDSORT_CACHE_VFATS) * (FILENAME_LENGTH) + 1) + #else + #define SORTED_LONGNAME_MAXLEN LONG_FILENAME_LENGTH + #endif + // Cache filenames to speed up SD menus. #if ENABLED(SDSORT_USES_RAM) @@ -117,10 +123,10 @@ private: char **sortshort, **sortnames; #else char sortshort[SDSORT_LIMIT][FILENAME_LENGTH]; - char sortnames[SDSORT_LIMIT][LONG_FILENAME_LENGTH]; + char sortnames[SDSORT_LIMIT][SORTED_LONGNAME_MAXLEN]; #endif #elif DISABLED(SDSORT_USES_STACK) - char sortnames[SDSORT_LIMIT][LONG_FILENAME_LENGTH]; + char sortnames[SDSORT_LIMIT][SORTED_LONGNAME_MAXLEN]; #endif // Folder sorting uses an isDir array when caching items. From 8c78f8f79084aee2000cba0761db4ba4e0d39b9c Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 21 Oct 2017 00:31:07 -0500 Subject: [PATCH 05/20] Add Makeboard MINI for Micromake C1 --- .../Micromake/C1/basic/Configuration.h | 55 +- .../Micromake/C1/enhanced/Configuration.h | 79 +- .../Micromake/C1/enhanced/Configuration_adv.h | 1445 +++++++++++++++++ Marlin/src/core/boards.h | 1 + Marlin/src/pins/pins.h | 2 + 5 files changed, 1520 insertions(+), 62 deletions(-) create mode 100644 Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h diff --git a/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h b/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h index 31ef9e5c28..a1661e5cf5 100644 --- a/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h +++ b/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h @@ -119,7 +119,7 @@ // The following define selects which electronics board you have. // Please choose the name from boards.h that matches your setup #ifndef MOTHERBOARD - #define MOTHERBOARD BOARD_RAMPS_14_EFB + #define MOTHERBOARD BOARD_MAKEBOARD_MINI #endif // Optional custom name for your RepStrap or other custom machine @@ -498,7 +498,7 @@ // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. -#define ENDSTOP_INTERRUPTS_FEATURE +//#define ENDSTOP_INTERRUPTS_FEATURE //============================================================================= //============================== Movement Settings ============================ @@ -525,14 +525,18 @@ * Override with M92 * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ -#define DEFAULT_AXIS_STEPS_PER_UNIT { 100, 100, 100, 150 } // MicroMake 128 Steps +// choose your micro step per step configuration ( 16 factory settings ) +#define DEFAULT_AXIS_STEPS_PER_UNIT { 100, 100, 100, 150 } // 16 steps per unit for Micromake C1 - Factory Settings - ( MS1 : closed ; MS2 : closed on MAKEBOARD Mini) +//#define DEFAULT_AXIS_STEPS_PER_UNIT { 200, 200, 200, 300 } // 32 steps per unit for Micromake C1 - Custom Settings - ( MS1 : closed ; MS2 : open on MAKEBOARD Mini) +//#define DEFAULT_AXIS_STEPS_PER_UNIT { 400, 400, 400, 600 } // 64 steps per unit for Micromake C1 - Custom Settings - ( MS1 : open ; MS2 : closed on MAKEBOARD Mini) +//#define DEFAULT_AXIS_STEPS_PER_UNIT { 800, 800, 800, 1200 } // 128 steps per unit for Micromake C1 - Custom Settings - ( MS1 : open ; MS2 : open on MAKEBOARD Mini) /** * Default Max Feed Rate (mm/s) * Override with M203 * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ -#define DEFAULT_MAX_FEEDRATE { 200, 200, 200, 30 } // MicroMake 128 Steps +#define DEFAULT_MAX_FEEDRATE { 200, 200, 200, 30 } /** * Default Max Acceleration (change/s) change = mm/s @@ -540,7 +544,7 @@ * Override with M201 * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ -#define DEFAULT_MAX_ACCELERATION { 3000, 3000, 3000, 4000 } // MicroMake 128 Steps + #define DEFAULT_MAX_ACCELERATION { 3000, 3000, 3000, 4000 } /** * Default Acceleration (change/s) change = mm/s @@ -550,9 +554,9 @@ * M204 R Retract Acceleration * M204 T Travel Acceleration */ -#define DEFAULT_ACCELERATION 1000 // X, Y, Z and E acceleration for printing moves -#define DEFAULT_RETRACT_ACCELERATION 1000 // E acceleration for retracts -#define DEFAULT_TRAVEL_ACCELERATION 1000 // X, Y, Z acceleration for travel (non printing) moves +#define DEFAULT_ACCELERATION 3000 // X, Y, Z and E acceleration for printing moves +#define DEFAULT_RETRACT_ACCELERATION 3000 // E acceleration for retracts +#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration for travel (non printing) moves /** * Default Jerk (mm/s) @@ -562,10 +566,10 @@ * When changing speed and direction, if the difference is less than the * value set here, it may happen instantaneously. */ -#define DEFAULT_XJERK 20.0 // (mm/sec) -#define DEFAULT_YJERK 20.0 // (mm/sec) -#define DEFAULT_ZJERK 20.0 // (mm/sec) -#define DEFAULT_EJERK 5.0 // (mm/sec) +#define DEFAULT_XJERK 20.0 +#define DEFAULT_YJERK 20.0 +#define DEFAULT_ZJERK 20.0 +#define DEFAULT_EJERK 5.0 //=========================================================================== //============================= Z Probe Options ============================= @@ -774,15 +778,16 @@ // @section machine // The size of the print bed -#define X_BED_SIZE 245 -#define Y_BED_SIZE 245 +#define X_BED_SIZE 240 +#define Y_BED_SIZE 240 +// Travel limits (mm) after homing, corresponding to endstop positions. #define X_MIN_POS 0 #define Y_MIN_POS 0 #define Z_MIN_POS 0 #define X_MAX_POS X_BED_SIZE #define Y_MAX_POS Y_BED_SIZE -#define Z_MAX_POS 263 +#define Z_MAX_POS 260 /** * Software Endstops @@ -890,9 +895,9 @@ // Set the boundaries for probing (where the probe can reach). #define LEFT_PROBE_BED_POSITION 15 - #define RIGHT_PROBE_BED_POSITION 140 + #define RIGHT_PROBE_BED_POSITION 170 #define FRONT_PROBE_BED_POSITION 20 - #define BACK_PROBE_BED_POSITION 200 + #define BACK_PROBE_BED_POSITION 170 // The Z probe minimum outer margin (to validate G29 parameters). #define MIN_PROBE_EDGE 10 @@ -923,10 +928,10 @@ // 3 arbitrary points to probe. // A simple cross-product is used to estimate the plane of the bed. #define ABL_PROBE_PT_1_X 15 - #define ABL_PROBE_PT_1_Y 140 + #define ABL_PROBE_PT_1_Y 180 #define ABL_PROBE_PT_2_X 15 #define ABL_PROBE_PT_2_Y 20 - #define ABL_PROBE_PT_3_X 200 + #define ABL_PROBE_PT_3_X 170 #define ABL_PROBE_PT_3_Y 20 #elif ENABLED(AUTO_BED_LEVELING_UBL) @@ -1051,12 +1056,12 @@ // // G20/G21 Inch mode support // -//#define INCH_MODE_SUPPORT +#define INCH_MODE_SUPPORT // // M149 Set temperature units support // -//#define TEMPERATURE_UNITS_SUPPORT +#define TEMPERATURE_UNITS_SUPPORT // @section temperature @@ -1080,7 +1085,7 @@ * P1 Raise the nozzle always to Z-park height. * P2 Raise the nozzle by Z-park amount, limited to Z_MAX_POS. */ -//#define NOZZLE_PARK_FEATURE +#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) // Specify a park position as { X, Y, Z } @@ -1125,7 +1130,7 @@ * Attention: EXPERIMENTAL. G-code arguments may change. * */ -//#define NOZZLE_CLEAN_FEATURE +#define NOZZLE_CLEAN_FEATURE #if ENABLED(NOZZLE_CLEAN_FEATURE) // Default number of pattern repetitions @@ -1178,7 +1183,7 @@ * * View the current statistics with M78. */ -//#define PRINTCOUNTER +#define PRINTCOUNTER //============================================================================= //============================= LCD and SD support ============================ @@ -1260,7 +1265,7 @@ * * Use CRC checks and retries on the SD communication. */ -//#define SD_CHECK_AND_RETRY +#define SD_CHECK_AND_RETRY // // ENCODER SETTINGS diff --git a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h index 53a15f2b73..6de13c6a1d 100644 --- a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h +++ b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h @@ -119,7 +119,7 @@ // The following define selects which electronics board you have. // Please choose the name from boards.h that matches your setup #ifndef MOTHERBOARD - #define MOTHERBOARD BOARD_RAMPS_14_EFB + #define MOTHERBOARD BOARD_MAKEBOARD_MINI #endif // Optional custom name for your RepStrap or other custom machine @@ -474,17 +474,17 @@ //#define USE_ZMAX_PLUG // coarse Endstop Settings -//#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors +#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors #if DISABLED(ENDSTOPPULLUPS) // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX - #define ENDSTOPPULLUP_XMIN - #define ENDSTOPPULLUP_YMIN - #define ENDSTOPPULLUP_ZMIN - #define ENDSTOPPULLUP_ZMIN_PROBE + //#define ENDSTOPPULLUP_XMIN + //#define ENDSTOPPULLUP_YMIN + //#define ENDSTOPPULLUP_ZMIN + //#define ENDSTOPPULLUP_ZMIN_PROBE #endif // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). @@ -498,7 +498,7 @@ // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. -#define ENDSTOP_INTERRUPTS_FEATURE +//#define ENDSTOP_INTERRUPTS_FEATURE //============================================================================= //============================== Movement Settings ============================ @@ -525,14 +525,18 @@ * Override with M92 * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ -#define DEFAULT_AXIS_STEPS_PER_UNIT {800,800,800,1200} // MicroMake 128 Steps +// choose your micro step per step configuration ( 16 factory settings ) +//#define DEFAULT_AXIS_STEPS_PER_UNIT { 100, 100, 100, 150 } // 16 steps per unit for Micromake C1 - Factory Settings - ( MS1 : closed ; MS2 : closed on MAKEBOARD Mini) +//#define DEFAULT_AXIS_STEPS_PER_UNIT { 200, 200, 200, 300 } // 32 steps per unit for Micromake C1 - Custom Settings - ( MS1 : closed ; MS2 : open on MAKEBOARD Mini) +//#define DEFAULT_AXIS_STEPS_PER_UNIT { 400, 400, 400, 600 } // 64 steps per unit for Micromake C1 - Custom Settings - ( MS1 : open ; MS2 : closed on MAKEBOARD Mini) +#define DEFAULT_AXIS_STEPS_PER_UNIT { 800, 800, 800, 1200 } // 128 steps per unit for Micromake C1 - Custom Settings - ( MS1 : open ; MS2 : open on MAKEBOARD Mini) /** * Default Max Feed Rate (mm/s) * Override with M203 * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ -#define DEFAULT_MAX_FEEDRATE {200, 200, 200, 30} // MicroMake 128 Steps + #define DEFAULT_MAX_FEEDRATE { 200, 200, 200, 30 } /** * Default Max Acceleration (change/s) change = mm/s @@ -540,7 +544,7 @@ * Override with M201 * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ -#define DEFAULT_MAX_ACCELERATION {3000,3000,3000,4000} // MicroMake 128 Steps + #define DEFAULT_MAX_ACCELERATION { 3000, 3000, 3000, 4000 } /** * Default Acceleration (change/s) change = mm/s @@ -550,9 +554,9 @@ * M204 R Retract Acceleration * M204 T Travel Acceleration */ -#define DEFAULT_ACCELERATION 1000 // X, Y, Z and E acceleration for printing moves -#define DEFAULT_RETRACT_ACCELERATION 1000 // E acceleration for retracts -#define DEFAULT_TRAVEL_ACCELERATION 1000 // X, Y, Z acceleration for travel (non printing) moves +#define DEFAULT_ACCELERATION 3000 // X, Y, Z and E acceleration for printing moves +#define DEFAULT_RETRACT_ACCELERATION 3000 // E acceleration for retracts +#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration for travel (non printing) moves /** * Default Jerk (mm/s) @@ -562,10 +566,10 @@ * When changing speed and direction, if the difference is less than the * value set here, it may happen instantaneously. */ -#define DEFAULT_XJERK 20.0 // (mm/sec) -#define DEFAULT_YJERK 20.0 // (mm/sec) -#define DEFAULT_ZJERK 20.0 // (mm/sec) -#define DEFAULT_EJERK 5.0 // (mm/sec) +#define DEFAULT_XJERK 20.0 +#define DEFAULT_YJERK 20.0 +#define DEFAULT_ZJERK 0.4 +#define DEFAULT_EJERK 5.0 //=========================================================================== //============================= Z Probe Options ============================= @@ -679,8 +683,8 @@ * O-- FRONT --+ * (0,0) */ -#define X_PROBE_OFFSET_FROM_EXTRUDER -50 // X offset: -left +right [of the nozzle] -#define Y_PROBE_OFFSET_FROM_EXTRUDER -20 // Y offset: -front +behind [the nozzle] +#define X_PROBE_OFFSET_FROM_EXTRUDER 0 // X offset: -left +right [of the nozzle] +#define Y_PROBE_OFFSET_FROM_EXTRUDER 0 // Y offset: -front +behind [the nozzle] #define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle] // X and Y axis travel speed (mm/m) between probes @@ -693,7 +697,7 @@ #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2) // Use double touch for probing -//#define PROBE_DOUBLE_TOUCH +#define PROBE_DOUBLE_TOUCH /** * Z probes require clearance when deploying, stowing, and moving between @@ -774,15 +778,16 @@ // @section machine // The size of the print bed -#define X_BED_SIZE 245 -#define Y_BED_SIZE 245 +#define X_BED_SIZE 240 +#define Y_BED_SIZE 240 +// Travel limits (mm) after homing, corresponding to endstop positions. #define X_MIN_POS 0 #define Y_MIN_POS 0 #define Z_MIN_POS 0 #define X_MAX_POS X_BED_SIZE #define Y_MAX_POS Y_BED_SIZE -#define Z_MAX_POS 263 +#define Z_MAX_POS 260 /** * Software Endstops @@ -890,9 +895,9 @@ // Set the boundaries for probing (where the probe can reach). #define LEFT_PROBE_BED_POSITION 15 - #define RIGHT_PROBE_BED_POSITION 140 + #define RIGHT_PROBE_BED_POSITION 170 #define FRONT_PROBE_BED_POSITION 20 - #define BACK_PROBE_BED_POSITION 200 + #define BACK_PROBE_BED_POSITION 170 // The Z probe minimum outer margin (to validate G29 parameters). #define MIN_PROBE_EDGE 10 @@ -923,10 +928,10 @@ // 3 arbitrary points to probe. // A simple cross-product is used to estimate the plane of the bed. #define ABL_PROBE_PT_1_X 15 - #define ABL_PROBE_PT_1_Y 140 + #define ABL_PROBE_PT_1_Y 180 #define ABL_PROBE_PT_2_X 15 #define ABL_PROBE_PT_2_Y 20 - #define ABL_PROBE_PT_3_X 200 + #define ABL_PROBE_PT_3_X 170 #define ABL_PROBE_PT_3_Y 20 #elif ENABLED(AUTO_BED_LEVELING_UBL) @@ -1029,7 +1034,7 @@ // M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). // M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. // -//#define EEPROM_SETTINGS // Enable for M500 and M501 commands +#define EEPROM_SETTINGS // Enable for M500 and M501 commands //#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! #define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. @@ -1051,12 +1056,12 @@ // // G20/G21 Inch mode support // -//#define INCH_MODE_SUPPORT +#define INCH_MODE_SUPPORT // // M149 Set temperature units support // -//#define TEMPERATURE_UNITS_SUPPORT +#define TEMPERATURE_UNITS_SUPPORT // @section temperature @@ -1080,7 +1085,7 @@ * P1 Raise the nozzle always to Z-park height. * P2 Raise the nozzle by Z-park amount, limited to Z_MAX_POS. */ -//#define NOZZLE_PARK_FEATURE +#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) // Specify a park position as { X, Y, Z } @@ -1125,7 +1130,7 @@ * Attention: EXPERIMENTAL. G-code arguments may change. * */ -//#define NOZZLE_CLEAN_FEATURE +#define NOZZLE_CLEAN_FEATURE #if ENABLED(NOZZLE_CLEAN_FEATURE) // Default number of pattern repetitions @@ -1178,7 +1183,7 @@ * * View the current statistics with M78. */ -//#define PRINTCOUNTER +#define PRINTCOUNTER //============================================================================= //============================= LCD and SD support ============================ @@ -1260,7 +1265,7 @@ * * Use CRC checks and retries on the SD communication. */ -//#define SD_CHECK_AND_RETRY +#define SD_CHECK_AND_RETRY // // ENCODER SETTINGS @@ -1314,7 +1319,7 @@ // If you have a speaker that can produce tones, enable it here. // By default Marlin assumes you have a buzzer with a fixed frequency. // -//#define SPEAKER +#define SPEAKER // // The duration and frequency for the UI feedback sound. @@ -1323,8 +1328,8 @@ // Note: Test audio output with the G-Code: // M300 S P // -//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 -//#define LCD_FEEDBACK_FREQUENCY_HZ 1000 +#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 +#define LCD_FEEDBACK_FREQUENCY_HZ 1000 // // CONTROLLER TYPE: Standard diff --git a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h new file mode 100644 index 0000000000..e4f77d3070 --- /dev/null +++ b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h @@ -0,0 +1,1445 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (C) 2016 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 . + * + */ + +/** + * Configuration_adv.h + * + * Advanced settings. + * Only change these if you know exactly what you're doing. + * Some of these settings can damage your printer if improperly set! + * + * Basic settings can be found in Configuration.h + * + */ +#ifndef CONFIGURATION_ADV_H +#define CONFIGURATION_ADV_H +#define CONFIGURATION_ADV_H_VERSION 020000 + +// @section temperature + +//=========================================================================== +//=============================Thermal Settings ============================ +//=========================================================================== + +#if DISABLED(PIDTEMPBED) + #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control + #if ENABLED(BED_LIMIT_SWITCHING) + #define BED_HYSTERESIS 2 // Only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS + #endif +#endif + +/** + * Thermal Protection protects your printer from damage and fire if a + * thermistor falls out or temperature sensors fail in any way. + * + * The issue: If a thermistor falls out or a temperature sensor fails, + * Marlin can no longer sense the actual temperature. Since a disconnected + * thermistor reads as a low temperature, the firmware will keep the heater on. + * + * The solution: Once the temperature reaches the target, start observing. + * If the temperature stays too far below the target (hysteresis) for too long (period), + * the firmware will halt the machine as a safety precaution. + * + * If you get false positives for "Thermal Runaway" increase THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD + */ +#if ENABLED(THERMAL_PROTECTION_HOTENDS) + #define THERMAL_PROTECTION_PERIOD 40 // Seconds + #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius + + /** + * Whenever an M104 or M109 increases the target temperature the firmware will wait for the + * WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE + * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, + * but only if the current temperature is far enough below the target for a reliable test. + * + * If you get false positives for "Heating failed" increase WATCH_TEMP_PERIOD and/or decrease WATCH_TEMP_INCREASE + * WATCH_TEMP_INCREASE should not be below 2. + */ + #define WATCH_TEMP_PERIOD 20 // Seconds + #define WATCH_TEMP_INCREASE 2 // Degrees Celsius +#endif + +/** + * Thermal Protection parameters for the bed are just as above for hotends. + */ +#if ENABLED(THERMAL_PROTECTION_BED) + #define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds + #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius + + /** + * Whenever an M140 or M190 increases the target temperature the firmware will wait for the + * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE + * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190, + * but only if the current temperature is far enough below the target for a reliable test. + * + * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease + * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.) + */ + #define WATCH_BED_TEMP_PERIOD 60 // Seconds + #define WATCH_BED_TEMP_INCREASE 2 // Degrees Celsius +#endif + +#if ENABLED(PIDTEMP) + // this adds an experimental additional term to the heating power, proportional to the extrusion speed. + // if Kc is chosen well, the additional required power due to increased melting should be compensated. + //#define PID_EXTRUSION_SCALING + #if ENABLED(PID_EXTRUSION_SCALING) + #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) + #define LPQ_MAX_LEN 50 + #endif +#endif + +/** + * Automatic Temperature: + * The hotend target temperature is calculated by all the buffered lines of gcode. + * The maximum buffered steps/sec of the extruder motor is called "se". + * Start autotemp mode with M109 S B F + * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by + * mintemp and maxtemp. Turn this off by executing M109 without F* + * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp. + * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode + */ +#define AUTOTEMP +#if ENABLED(AUTOTEMP) + #define AUTOTEMP_OLDWEIGHT 0.98 +#endif + +// Show Temperature ADC value +// Enable for M105 to include ADC values read from temperature sensors. +//#define SHOW_TEMP_ADC_VALUES + +/** + * High Temperature Thermistor Support + * + * Thermistors able to support high temperature tend to have a hard time getting + * good readings at room and lower temperatures. This means HEATER_X_RAW_LO_TEMP + * will probably be caught when the heating element first turns on during the + * preheating process, which will trigger a min_temp_error as a safety measure + * and force stop everything. + * To circumvent this limitation, we allow for a preheat time (during which, + * min_temp_error won't be triggered) and add a min_temp buffer to handle + * aberrant readings. + * + * If you want to enable this feature for your hotend thermistor(s) + * uncomment and set values > 0 in the constants below + */ + +// The number of consecutive low temperature errors that can occur +// before a min_temp_error is triggered. (Shouldn't be more than 10.) +//#define MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED 0 + +// The number of milliseconds a hotend will preheat before starting to check +// the temperature. This value should NOT be set to the time it takes the +// hot end to reach the target temperature, but the time it takes to reach +// the minimum temperature your thermistor can read. The lower the better/safer. +// This shouldn't need to be more than 30 seconds (30000) +//#define MILLISECONDS_PREHEAT_TIME 0 + +// @section extruder + +// Extruder runout prevention. +// If the machine is idle and the temperature over MINTEMP +// then extrude some filament every couple of SECONDS. +//#define EXTRUDER_RUNOUT_PREVENT +#if ENABLED(EXTRUDER_RUNOUT_PREVENT) + #define EXTRUDER_RUNOUT_MINTEMP 190 + #define EXTRUDER_RUNOUT_SECONDS 30 + #define EXTRUDER_RUNOUT_SPEED 1500 // mm/m + #define EXTRUDER_RUNOUT_EXTRUDE 5 // mm +#endif + +// @section temperature + +//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements. +//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET" +#define TEMP_SENSOR_AD595_OFFSET 0.0 +#define TEMP_SENSOR_AD595_GAIN 1.0 + +/** + * Controller Fan + * To cool down the stepper drivers and MOSFETs. + * + * The fan will turn on automatically whenever any stepper is enabled + * and turn off after a set period after all steppers are turned off. + */ +//#define USE_CONTROLLER_FAN +#if ENABLED(USE_CONTROLLER_FAN) + //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed +#endif + +// When first starting the main fan, run it at full speed for the +// given number of milliseconds. This gets the fan spinning reliably +// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu) +//#define FAN_KICKSTART_TIME 100 + +// This defines the minimal speed for the main fan, run in PWM mode +// to enable uncomment and set minimal PWM speed for reliable running (1-255) +// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM +//#define FAN_MIN_PWM 50 + +// @section extruder + +/** + * Extruder cooling fans + * + * Extruder auto fans automatically turn on when their extruders' + * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE. + * + * Your board's pins file specifies the recommended pins. Override those here + * or set to -1 to disable completely. + * + * Multiple extruders can be assigned to the same pin in which case + * the fan will turn on when any selected extruder is above the threshold. + */ +#define E0_AUTO_FAN_PIN -1 +#define E1_AUTO_FAN_PIN -1 +#define E2_AUTO_FAN_PIN -1 +#define E3_AUTO_FAN_PIN -1 +#define E4_AUTO_FAN_PIN -1 +#define EXTRUDER_AUTO_FAN_TEMPERATURE 50 +#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed + +/** + * Part-Cooling Fan Multiplexer + * + * This feature allows you to digitally multiplex the fan output. + * The multiplexer is automatically switched at tool-change. + * Set FANMUX[012]_PINs below for up to 2, 4, or 8 multiplexed fans. + */ +#define FANMUX0_PIN -1 +#define FANMUX1_PIN -1 +#define FANMUX2_PIN -1 + +/** + * M355 Case Light on-off / brightness + */ +//#define CASE_LIGHT_ENABLE +#if ENABLED(CASE_LIGHT_ENABLE) + //#define CASE_LIGHT_PIN 4 // Override the default pin if needed + #define INVERT_CASE_LIGHT false // Set true if Case Light is ON when pin is LOW + #define CASE_LIGHT_DEFAULT_ON true // Set default power-up state on + #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // Set default power-up brightness (0-255, requires PWM pin) + //#define MENU_ITEM_CASE_LIGHT // Add a Case Light option to the LCD main menu +#endif + +//=========================================================================== +//============================ Mechanical Settings ========================== +//=========================================================================== + +// @section homing + +// If you want endstops to stay on (by default) even when not homing +// enable this option. Override at any time with M120, M121. +#define ENDSTOPS_ALWAYS_ON_DEFAULT + +// @section extras + +//#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats. + +// Dual X Steppers +// Uncomment this option to drive two X axis motors. +// The next unused E driver will be assigned to the second X stepper. +//#define X_DUAL_STEPPER_DRIVERS +#if ENABLED(X_DUAL_STEPPER_DRIVERS) + // Set true if the two X motors need to rotate in opposite directions + #define INVERT_X2_VS_X_DIR true +#endif + +// Dual Y Steppers +// Uncomment this option to drive two Y axis motors. +// The next unused E driver will be assigned to the second Y stepper. +//#define Y_DUAL_STEPPER_DRIVERS +#if ENABLED(Y_DUAL_STEPPER_DRIVERS) + // Set true if the two Y motors need to rotate in opposite directions + #define INVERT_Y2_VS_Y_DIR true +#endif + +// A single Z stepper driver is usually used to drive 2 stepper motors. +// Uncomment this option to use a separate stepper driver for each Z axis motor. +// The next unused E driver will be assigned to the second Z stepper. +//#define Z_DUAL_STEPPER_DRIVERS + +#if ENABLED(Z_DUAL_STEPPER_DRIVERS) + + // Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper. + // That way the machine is capable to align the bed during home, since both Z steppers are homed. + // There is also an implementation of M666 (software endstops adjustment) to this feature. + // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed. + // One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2. + // If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive. + // Play a little bit with small adjustments (0.5mm) and check the behaviour. + // The M119 (endstops report) will start reporting the Z2 Endstop as well. + + //#define Z_DUAL_ENDSTOPS + + #if ENABLED(Z_DUAL_ENDSTOPS) + #define Z2_USE_ENDSTOP _XMAX_ + #define Z_DUAL_ENDSTOPS_ADJUSTMENT 0 // Use M666 to determine/test this value + #endif + +#endif // Z_DUAL_STEPPER_DRIVERS + +// Enable this for dual x-carriage printers. +// A dual x-carriage design has the advantage that the inactive extruder can be parked which +// prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage +// allowing faster printing speeds. Connect your X2 stepper to the first unused E plug. +//#define DUAL_X_CARRIAGE +#if ENABLED(DUAL_X_CARRIAGE) + // Configuration for second X-carriage + // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; + // the second x-carriage always homes to the maximum endstop. + #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage + #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed + #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position + #define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position + // However: In this mode the HOTEND_OFFSET_X value for the second extruder provides a software + // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops + // without modifying the firmware (through the "M218 T1 X???" command). + // Remember: you should set the second extruder x-offset to 0 in your slicer. + + // There are a few selectable movement modes for dual x-carriages using M605 S + // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results + // as long as it supports dual x-carriages. (M605 S0) + // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so + // that additional slicer support is not required. (M605 S1) + // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all + // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at + // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm]) + + // This is the default power-up mode which can be later using M605. + #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE + + // Default settings in "Auto-park Mode" + #define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder + #define TOOLCHANGE_UNPARK_ZLIFT 1 // the distance to raise Z axis when unparking an extruder + + // Default x offset in duplication mode (typically set to half print bed width) + #define DEFAULT_DUPLICATION_X_OFFSET 100 + +#endif // DUAL_X_CARRIAGE + +// Activate a solenoid on the active extruder with M380. Disable all with M381. +// Define SOL0_PIN, SOL1_PIN, etc., for each extruder that has a solenoid. +//#define EXT_SOLENOID + +// @section homing + +//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again: +#define X_HOME_BUMP_MM 5 +#define Y_HOME_BUMP_MM 5 +#define Z_HOME_BUMP_MM 2 +#define HOMING_BUMP_DIVISOR {2, 2, 4} // Re-Bump Speed Divisor (Divides the Homing Feedrate) +//#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially. + +// When G28 is called, this option will make Y home before X +//#define HOME_Y_BEFORE_X + +// @section machine + +#define AXIS_RELATIVE_MODES {false, false, false, false} + +// Allow duplication mode with a basic dual-nozzle extruder +//#define DUAL_NOZZLE_DUPLICATION_MODE + +// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. +#define INVERT_X_STEP_PIN false +#define INVERT_Y_STEP_PIN false +#define INVERT_Z_STEP_PIN false +#define INVERT_E_STEP_PIN false + +// Default stepper release if idle. Set to 0 to deactivate. +// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true. +// Time can be set by M18 and M84. +#define DEFAULT_STEPPER_DEACTIVE_TIME 120 +#define DISABLE_INACTIVE_X true +#define DISABLE_INACTIVE_Y true +#define DISABLE_INACTIVE_Z true // set to false if the nozzle will fall down on your printed part when print has finished. +#define DISABLE_INACTIVE_E true + +#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate +#define DEFAULT_MINTRAVELFEEDRATE 0.0 + +//#define HOME_AFTER_DEACTIVATE // Require rehoming after steppers are deactivated + +// @section lcd + +#if ENABLED(ULTIPANEL) + #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel + #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder +#endif + +// @section extras + +// minimum time in microseconds that a movement needs to take if the buffer is emptied. +#define DEFAULT_MINSEGMENTTIME 20000 + +// If defined the movements slow down when the look ahead buffer is only half full +#define SLOWDOWN + +// Frequency limit +// See nophead's blog for more info +// Not working O +//#define XY_FREQUENCY_LIMIT 15 + +// Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end +// of the buffer and all stops. This should not be much greater than zero and should only be changed +// if unwanted behavior is observed on a user's machine when running at very slow speeds. +#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec) + +// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. +#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16] + +/** + * @section stepper motor current + * + * Some boards have a means of setting the stepper motor current via firmware. + * + * The power on motor currents are set by: + * PWM_MOTOR_CURRENT - used by MINIRAMBO & ULTIMAIN_2 + * known compatible chips: A4982 + * DIGIPOT_MOTOR_CURRENT - used by BQ_ZUM_MEGA_3D, RAMBO & SCOOVO_X9H + * known compatible chips: AD5206 + * DAC_MOTOR_CURRENT_DEFAULT - used by PRINTRBOARD_REVF & RIGIDBOARD_V2 + * known compatible chips: MCP4728 + * DIGIPOT_I2C_MOTOR_CURRENTS - used by 5DPRINT, AZTEEG_X3_PRO, MIGHTYBOARD_REVE + * known compatible chips: MCP4451, MCP4018 + * + * Motor currents can also be set by M907 - M910 and by the LCD. + * M907 - applies to all. + * M908 - BQ_ZUM_MEGA_3D, RAMBO, PRINTRBOARD_REVF, RIGIDBOARD_V2 & SCOOVO_X9H + * M909, M910 & LCD - only PRINTRBOARD_REVF & RIGIDBOARD_V2 + */ +//#define PWM_MOTOR_CURRENT { 1300, 1300, 1250 } // Values in milliamps +//#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 } // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A) +//#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 } // Default drive percent - X, Y, Z, E axis + +// Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro +//#define DIGIPOT_I2C + +#if (defined(DIGIPOT_I2C) && !defined(DIGIPOT_I2C_ADDRESS_A)) //default to settings in pins_XXXX.h files + #define DIGIPOT_I2C_ADDRESS_A 0x2C // unshifted slave address for first DIGIPOT + #define DIGIPOT_I2C_ADDRESS_B 0x2D // unshifted slave address for second DIGIPOT +#endif +/** + * common slave addresses + * + * board A (A shifted) B (B shifted) IC + * Smoothie 0x2C (0x58) 0x2D (0x5A) MCP4451 + * AZTEEG_X3_PRO 0x2C (0x58) 0x2E (0x5C) MCP4451 + * MIGHTYBOARD_REVE 0x2F (0x5E) MCP4018 + */ + +//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster +#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 +// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS +#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO + +//=========================================================================== +//=============================Additional Features=========================== +//=========================================================================== + +#define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly +#define ENCODER_10X_STEPS_PER_SEC 75 // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value +#define ENCODER_100X_STEPS_PER_SEC 160 // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value + +//#define CHDK 4 //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/ +#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again + +// @section lcd + +// Include a page of printer information in the LCD Main Menu +//#define LCD_INFO_MENU + +// Scroll a longer status message into view +//#define STATUS_MESSAGE_SCROLLING + +// On the Info Screen, display XY with one decimal place when possible +//#define LCD_DECIMAL_SMALL_XY + +// The timeout (in ms) to return to the status screen from sub-menus +//#define LCD_TIMEOUT_TO_STATUS 15000 + +#if ENABLED(SDSUPPORT) + + // Some RAMPS and other boards don't detect when an SD card is inserted. You can work + // around this by connecting a push button or single throw switch to the pin defined + // as SD_DETECT_PIN in your board's pins definitions. + // This setting should be disabled unless you are using a push button, pulling the pin to ground. + // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). + #define SD_DETECT_INVERTED + + #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished + + #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. + + // Reverse SD sort to show "more recent" files first, according to the card's FAT. + // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. + #define SDCARD_RATHERRECENTFIRST + + // Add an option in the menu to run all auto#.g files + //#define MENU_ADDAUTOSTART + + /** + * Sort SD file listings in alphabetical order. + * + * With this option enabled, items on SD cards will be sorted + * by name for easier navigation. + * + * By default... + * + * - Use the slowest -but safest- method for sorting. + * - Folders are sorted to the top. + * - The sort key is statically allocated. + * - No added G-code (M34) support. + * - 40 item sorting limit. (Items after the first 40 are unsorted.) + * + * SD sorting uses static allocation (as set by SDSORT_LIMIT), allowing the + * compiler to calculate the worst-case usage and throw an error if the SRAM + * limit is exceeded. + * + * - SDSORT_USES_RAM provides faster sorting via a static directory buffer. + * - SDSORT_USES_STACK does the same, but uses a local stack-based buffer. + * - SDSORT_CACHE_NAMES will retain the sorted file listing in RAM. (Expensive!) + * - SDSORT_DYNAMIC_RAM only uses RAM when the SD menu is visible. (Use with caution!) + */ + //#define SDCARD_SORT_ALPHA + + // SD Card Sorting options + #if ENABLED(SDCARD_SORT_ALPHA) + #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_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. + #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use! + #define SDSORT_CACHE_VFATS 2 // Maximum number of 13-byte VFAT entries to use for sorting. + // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM. + #endif + + // Show a progress bar on HD44780 LCDs for SD printing + //#define LCD_PROGRESS_BAR + + #if ENABLED(LCD_PROGRESS_BAR) + // Amount of time (ms) to show the bar + #define PROGRESS_BAR_BAR_TIME 2000 + // Amount of time (ms) to show the status message + #define PROGRESS_BAR_MSG_TIME 3000 + // Amount of time (ms) to retain the status message (0=forever) + #define PROGRESS_MSG_EXPIRE 0 + // Enable this to show messages for MSG_TIME then hide them + //#define PROGRESS_MSG_ONCE + // Add a menu item to test the progress bar: + //#define LCD_PROGRESS_BAR_TEST + #endif + + // Add an 'M73' G-code to set the current percentage + //#define LCD_SET_PROGRESS_MANUALLY + + // This allows hosts to request long names for files and folders with M33 + //#define LONG_FILENAME_HOST_SUPPORT + + // Enable this option to scroll long filenames in the SD card menu + //#define SCROLL_LONG_FILENAMES + + // This option allows you to abort SD printing when any endstop is triggered. + // This feature must be enabled with "M540 S1" or from the LCD menu. + // To have any effect, endstops must be enabled during SD printing. + //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED + +#endif // SDSUPPORT + +/** + * Additional options for Graphical Displays + * + * Use the optimizations here to improve printing performance, + * which can be adversely affected by graphical display drawing, + * especially when doing several short moves, and when printing + * on DELTA and SCARA machines. + * + * Some of these options may result in the display lagging behind + * controller events, as there is a trade-off between reliable + * printing performance versus fast display updates. + */ +#if ENABLED(DOGLCD) + // Enable to save many cycles by drawing a hollow frame on the Info Screen + #define XYZ_HOLLOW_FRAME + + // Enable to save many cycles by drawing a hollow frame on Menu Screens + #define MENU_HOLLOW_FRAME + + // A bigger font is available for edit items. Costs 3120 bytes of PROGMEM. + // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese. + //#define USE_BIG_EDIT_FONT + + // A smaller font may be used on the Info Screen. Costs 2300 bytes of PROGMEM. + // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese. + //#define USE_SMALL_INFOFONT + + // Enable this option and reduce the value to optimize screen updates. + // The normal delay is 10µs. Use the lowest value that still gives a reliable display. + //#define DOGM_SPI_DELAY_US 5 +#endif // DOGLCD + +// @section safety + +// The hardware watchdog should reset the microcontroller disabling all outputs, +// in case the firmware gets stuck and doesn't do temperature regulation. +#define USE_WATCHDOG + +#if ENABLED(USE_WATCHDOG) + // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. + // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. + // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. + //#define WATCHDOG_RESET_MANUAL +#endif + +// @section lcd + +/** + * Babystepping enables movement of the axes by tiny increments without changing + * the current position values. This feature is used primarily to adjust the Z + * axis in the first layer of a print in real-time. + * + * Warning: Does not respect endstops! + */ +//#define BABYSTEPPING +#if ENABLED(BABYSTEPPING) + //#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA! + #define BABYSTEP_INVERT_Z false // Change if Z babysteps should go the other way + #define BABYSTEP_MULTIPLICATOR 100 // Babysteps are very small. Increase for faster motion. + //#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping + //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping. + #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds. + // Note: Extra time may be added to mitigate controller latency. + //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor + //#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators +#endif + +// @section extruder + +/** + * Implementation of linear pressure control + * + * Assumption: advance = k * (delta velocity) + * K=0 means advance disabled. + * See Marlin documentation for calibration instructions. + */ +//#define LIN_ADVANCE + +#if ENABLED(LIN_ADVANCE) + #define LIN_ADVANCE_K 75 + + /** + * Some Slicers produce Gcode with randomly jumping extrusion widths occasionally. + * For example within a 0.4mm perimeter it may produce a single segment of 0.05mm width. + * While this is harmless for normal printing (the fluid nature of the filament will + * close this very, very tiny gap), it throws off the LIN_ADVANCE pressure adaption. + * + * For this case LIN_ADVANCE_E_D_RATIO can be used to set the extrusion:distance ratio + * to a fixed value. Note that using a fixed ratio will lead to wrong nozzle pressures + * if the slicer is using variable widths or layer heights within one print! + * + * This option sets the default E:D ratio at startup. Use `M900` to override this value. + * + * Example: `M900 W0.4 H0.2 D1.75`, where: + * - W is the extrusion width in mm + * - H is the layer height in mm + * - D is the filament diameter in mm + * + * Example: `M900 R0.0458` to set the ratio directly. + * + * Set to 0 to auto-detect the ratio based on given Gcode G1 print moves. + * + * Slic3r (including Průša Control) produces Gcode compatible with the automatic mode. + * Cura (as of this writing) may produce Gcode incompatible with the automatic mode. + */ + #define LIN_ADVANCE_E_D_RATIO 0 // The calculated ratio (or 0) according to the formula W * H / ((D / 2) ^ 2 * PI) + // Example: 0.4 * 0.2 / ((1.75 / 2) ^ 2 * PI) = 0.033260135 +#endif + +// @section leveling + +#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS) + #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS +#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS) + #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2) +#endif + +#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) + // Override the mesh area if the automatic (max) area is too large + //#define MESH_MIN_X MESH_INSET + //#define MESH_MIN_Y MESH_INSET + //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) + //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) + + #if ENABLED(AUTO_BED_LEVELING_UBL) + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 +#endif + +// @section extras + +// +// G2/G3 Arc Support +// +#define ARC_SUPPORT // Disable this feature to save ~3226 bytes +#if ENABLED(ARC_SUPPORT) + #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment + #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles + //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes +#endif + +// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes. +//#define BEZIER_CURVE_SUPPORT + +// G38.2 and G38.3 Probe Target +// Enable PROBE_DOUBLE_TOUCH if you want G38 to double touch +//#define G38_PROBE_TARGET +#if ENABLED(G38_PROBE_TARGET) + #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move) +#endif + +// Moves (or segments) with fewer steps than this will be joined with the next move +#define MIN_STEPS_PER_SEGMENT 6 + +// The minimum pulse width (in µs) for stepping a stepper. +// Set this if you find stepping unreliable, or if using a very fast CPU. +#define MINIMUM_STEPPER_PULSE 0 // (µs) The smallest stepper pulse allowed + +// @section temperature + +// Control heater 0 and heater 1 in parallel. +//#define HEATERS_PARALLEL + +//=========================================================================== +//================================= Buffers ================================= +//=========================================================================== + +// @section hidden + +// The number of linear motions that can be in the plan at any give time. +// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2, i.g. 8,16,32 because shifts and ors are used to do the ring-buffering. +#if ENABLED(SDSUPPORT) + #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller +#else + #define BLOCK_BUFFER_SIZE 16 // maximize block buffer +#endif + +// @section serial + +// The ASCII buffer for serial input +#define MAX_CMD_SIZE 96 +#define BUFSIZE 4 + +// Transmission to Host Buffer Size +// To save 386 bytes of PROGMEM (and TX_BUFFER_SIZE+3 bytes of RAM) set to 0. +// To buffer a simple "ok" you need 4 bytes. +// For ADVANCED_OK (M105) you need 32 bytes. +// For debug-echo: 128 bytes for the optimal speed. +// Other output doesn't need to be that speedy. +// :[0, 2, 4, 8, 16, 32, 64, 128, 256] +#define TX_BUFFER_SIZE 0 + +// Host Receive Buffer Size +// Without XON/XOFF flow control (see SERIAL_XON_XOFF below) 32 bytes should be enough. +// To use flow control, set this buffer size to at least 1024 bytes. +// :[0, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048] +//#define RX_BUFFER_SIZE 1024 + +#if RX_BUFFER_SIZE >= 1024 + // Enable to have the controller send XON/XOFF control characters to + // the host to signal the RX buffer is becoming full. + //#define SERIAL_XON_XOFF +#endif + +#if ENABLED(SDSUPPORT) + // Enable this option to collect and display the maximum + // RX queue usage after transferring a file to SD. + //#define SERIAL_STATS_MAX_RX_QUEUED + + // Enable this option to collect and display the number + // of dropped bytes after a file transfer to SD. + //#define SERIAL_STATS_DROPPED_RX +#endif + +// Enable an emergency-command parser to intercept certain commands as they +// enter the serial receive buffer, so they cannot be blocked. +// Currently handles M108, M112, M410 +// Does not work on boards using AT90USB (USBCON) processors! +//#define EMERGENCY_PARSER + +// Bad Serial-connections can miss a received command by sending an 'ok' +// Therefore some clients abort after 30 seconds in a timeout. +// Some other clients start sending commands while receiving a 'wait'. +// This "wait" is only sent when the buffer is empty. 1 second is a good value here. +//#define NO_TIMEOUTS 1000 // Milliseconds + +// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. +//#define ADVANCED_OK + +// @section extras + +/** + * Firmware-based and LCD-controlled retract + * + * Add G10 / G11 commands for automatic firmware-based retract / recover. + * Use M207 and M208 to define parameters for retract / recover. + * + * Use M209 to enable or disable auto-retract. + * With auto-retract enabled, all G1 E moves within the set range + * will be converted to firmware-based retract/recover moves. + * + * Be sure to turn off auto-retract during filament change. + * + * Note that M207 / M208 / M209 settings are saved to EEPROM. + * + */ +//#define FWRETRACT // ONLY PARTIALLY TESTED +#if ENABLED(FWRETRACT) + #define MIN_AUTORETRACT 0.1 // When auto-retract is on, convert E moves of this length and over + #define MAX_AUTORETRACT 10.0 // Upper limit for auto-retract conversion + #define RETRACT_LENGTH 3 // Default retract length (positive mm) + #define RETRACT_LENGTH_SWAP 13 // Default swap retract length (positive mm), for extruder change + #define RETRACT_FEEDRATE 45 // Default feedrate for retracting (mm/s) + #define RETRACT_ZLIFT 0 // Default retract Z-lift + #define RETRACT_RECOVER_LENGTH 0 // Default additional recover length (mm, added to retract length when recovering) + #define RETRACT_RECOVER_LENGTH_SWAP 0 // Default additional swap recover length (mm, added to retract length when recovering from extruder change) + #define RETRACT_RECOVER_FEEDRATE 8 // Default feedrate for recovering from retraction (mm/s) + #define RETRACT_RECOVER_FEEDRATE_SWAP 8 // Default feedrate for recovering from swap retraction (mm/s) +#endif + +/** + * Extra Fan Speed + * Adds a secondary fan speed for each print-cooling fan. + * 'M106 P T3-255' : Set a secondary speed for + * 'M106 P T2' : Use the set secondary speed + * 'M106 P T1' : Restore the previous fan speed + */ +//#define EXTRA_FAN_SPEED + +/** + * Advanced Pause + * Experimental feature for filament change support and for parking the nozzle when paused. + * Adds the GCode M600 for initiating filament change. + * If PARK_HEAD_ON_PAUSE enabled, adds the GCode M125 to pause printing and park the nozzle. + * + * Requires an LCD display. + * This feature is required for the default FILAMENT_RUNOUT_SCRIPT. + */ +//#define ADVANCED_PAUSE_FEATURE +#if ENABLED(ADVANCED_PAUSE_FEATURE) + #define PAUSE_PARK_X_POS 3 // X position of hotend + #define PAUSE_PARK_Y_POS 3 // Y position of hotend + #define PAUSE_PARK_Z_ADD 10 // Z addition of hotend (lift) + #define PAUSE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis) + #define PAUSE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers) + #define PAUSE_PARK_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s + #define PAUSE_PARK_RETRACT_LENGTH 2 // Initial retract in mm + // It is a short retract used immediately after print interrupt before move to filament exchange position + #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast + #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm + // Longer length for bowden printers to unload filament from whole bowden tube, + // shorter length for printers without bowden to unload filament from extruder only, + // 0 to disable unloading for manual unloading + #define FILAMENT_CHANGE_LOAD_FEEDRATE 6 // Load filament feedrate in mm/s - filament loading into the bowden tube can be fast + #define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm + // Longer length for bowden printers to fast load filament into whole bowden tube over the hotend, + // Short or zero length for printers without bowden where loading is not used + #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate + #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is loaded over the hotend, + // 0 to disable for manual extrusion + // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend, + // or until outcoming filament color is not clear for filament color change + #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // Turn off nozzle if user doesn't change filament within this time limit in seconds + #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet + #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 + +/** + * Enable this section if you have TMC26X motor drivers. + * You will need to import the TMC26XStepper library into the Arduino IDE for this + * (https://github.com/trinamic/TMC26XStepper.git) + */ +//#define HAVE_TMCDRIVER + +#if ENABLED(HAVE_TMCDRIVER) + + //#define X_IS_TMC + //#define X2_IS_TMC + //#define Y_IS_TMC + //#define Y2_IS_TMC + //#define Z_IS_TMC + //#define Z2_IS_TMC + //#define E0_IS_TMC + //#define E1_IS_TMC + //#define E2_IS_TMC + //#define E3_IS_TMC + //#define E4_IS_TMC + + #define X_MAX_CURRENT 1000 // in mA + #define X_SENSE_RESISTOR 91 // in mOhms + #define X_MICROSTEPS 16 // number of microsteps + + #define X2_MAX_CURRENT 1000 + #define X2_SENSE_RESISTOR 91 + #define X2_MICROSTEPS 16 + + #define Y_MAX_CURRENT 1000 + #define Y_SENSE_RESISTOR 91 + #define Y_MICROSTEPS 16 + + #define Y2_MAX_CURRENT 1000 + #define Y2_SENSE_RESISTOR 91 + #define Y2_MICROSTEPS 16 + + #define Z_MAX_CURRENT 1000 + #define Z_SENSE_RESISTOR 91 + #define Z_MICROSTEPS 16 + + #define Z2_MAX_CURRENT 1000 + #define Z2_SENSE_RESISTOR 91 + #define Z2_MICROSTEPS 16 + + #define E0_MAX_CURRENT 1000 + #define E0_SENSE_RESISTOR 91 + #define E0_MICROSTEPS 16 + + #define E1_MAX_CURRENT 1000 + #define E1_SENSE_RESISTOR 91 + #define E1_MICROSTEPS 16 + + #define E2_MAX_CURRENT 1000 + #define E2_SENSE_RESISTOR 91 + #define E2_MICROSTEPS 16 + + #define E3_MAX_CURRENT 1000 + #define E3_SENSE_RESISTOR 91 + #define E3_MICROSTEPS 16 + + #define E4_MAX_CURRENT 1000 + #define E4_SENSE_RESISTOR 91 + #define E4_MICROSTEPS 16 + +#endif + +// @section TMC2130 + +/** + * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2130 stepper drivers in SPI mode connect your SPI2130 pins to + * the hardware SPI interface on your board and define the required CS pins + * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). + */ +//#define HAVE_TMC2130 + +#if ENABLED(HAVE_TMC2130) + + // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY + //#define X_IS_TMC2130 + //#define X2_IS_TMC2130 + //#define Y_IS_TMC2130 + //#define Y2_IS_TMC2130 + //#define Z_IS_TMC2130 + //#define Z2_IS_TMC2130 + //#define E0_IS_TMC2130 + //#define E1_IS_TMC2130 + //#define E2_IS_TMC2130 + //#define E3_IS_TMC2130 + //#define E4_IS_TMC2130 + + /** + * Stepper driver settings + */ + + #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 + #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current + #define INTERPOLATE 1 // Interpolate X/Y/Z_MICROSTEPS to 256 + + #define X_CURRENT 1000 // rms current in mA. Multiply by 1.41 for peak current. + #define X_MICROSTEPS 16 // 0..256 + + #define Y_CURRENT 1000 + #define Y_MICROSTEPS 16 + + #define Z_CURRENT 1000 + #define Z_MICROSTEPS 16 + + //#define X2_CURRENT 1000 + //#define X2_MICROSTEPS 16 + + //#define Y2_CURRENT 1000 + //#define Y2_MICROSTEPS 16 + + //#define Z2_CURRENT 1000 + //#define Z2_MICROSTEPS 16 + + //#define E0_CURRENT 1000 + //#define E0_MICROSTEPS 16 + + //#define E1_CURRENT 1000 + //#define E1_MICROSTEPS 16 + + //#define E2_CURRENT 1000 + //#define E2_MICROSTEPS 16 + + //#define E3_CURRENT 1000 + //#define E3_MICROSTEPS 16 + + //#define E4_CURRENT 1000 + //#define E4_MICROSTEPS 16 + + /** + * Use Trinamic's ultra quiet stepping mode. + * When disabled, Marlin will use spreadCycle stepping mode. + */ + #define STEALTHCHOP + + /** + * Let Marlin automatically control stepper current. + * This is still an experimental feature. + * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered, + * then decrease current by CURRENT_STEP until temperature prewarn is cleared. + * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX + * Relevant g-codes: + * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given. + * M906 S1 - Start adjusting current + * M906 S0 - Stop adjusting current + * M911 - Report stepper driver overtemperature pre-warn condition. + * M912 - Clear stepper driver overtemperature pre-warn condition flag. + */ + //#define AUTOMATIC_CURRENT_CONTROL + + #if ENABLED(AUTOMATIC_CURRENT_CONTROL) + #define CURRENT_STEP 50 // [mA] + #define AUTO_ADJUST_MAX 1300 // [mA], 1300mA_rms = 1840mA_peak + #define REPORT_CURRENT_CHANGE + #endif + + /** + * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD. + * This mode allows for faster movements at the expense of higher noise levels. + * STEALTHCHOP needs to be enabled. + * M913 X/Y/Z/E to live tune the setting + */ + //#define HYBRID_THRESHOLD + + #define X_HYBRID_THRESHOLD 100 // [mm/s] + #define X2_HYBRID_THRESHOLD 100 + #define Y_HYBRID_THRESHOLD 100 + #define Y2_HYBRID_THRESHOLD 100 + #define Z_HYBRID_THRESHOLD 4 + #define Z2_HYBRID_THRESHOLD 4 + #define E0_HYBRID_THRESHOLD 30 + #define E1_HYBRID_THRESHOLD 30 + #define E2_HYBRID_THRESHOLD 30 + #define E3_HYBRID_THRESHOLD 30 + #define E4_HYBRID_THRESHOLD 30 + + /** + * Use stallGuard2 to sense an obstacle and trigger an endstop. + * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin. + * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal. + * + * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity. + * Higher values make the system LESS sensitive. + * Lower value make the system MORE sensitive. + * Too low values can lead to false positives, while too high values will collide the axis without triggering. + * It is advised to set X/Y_HOME_BUMP_MM to 0. + * M914 X/Y to live tune the setting + */ + //#define SENSORLESS_HOMING + + #if ENABLED(SENSORLESS_HOMING) + #define X_HOMING_SENSITIVITY 19 + #define Y_HOMING_SENSITIVITY 19 + #endif + + /** + * You can set your own advanced settings by filling in predefined functions. + * A list of available functions can be found on the library github page + * https://github.com/teemuatlut/TMC2130Stepper + * + * Example: + * #define TMC2130_ADV() { \ + * stepperX.diag0_temp_prewarn(1); \ + * stepperX.interpolate(0); \ + * } + */ + #define TMC2130_ADV() { } + +#endif // HAVE_TMC2130 + +// @section L6470 + +/** + * Enable this section if you have L6470 motor drivers. + * You need to import the L6470 library into the Arduino IDE for this. + * (https://github.com/ameyer/Arduino-L6470) + */ + +//#define HAVE_L6470DRIVER +#if ENABLED(HAVE_L6470DRIVER) + + //#define X_IS_L6470 + //#define X2_IS_L6470 + //#define Y_IS_L6470 + //#define Y2_IS_L6470 + //#define Z_IS_L6470 + //#define Z2_IS_L6470 + //#define E0_IS_L6470 + //#define E1_IS_L6470 + //#define E2_IS_L6470 + //#define E3_IS_L6470 + //#define E4_IS_L6470 + + #define X_MICROSTEPS 16 // number of microsteps + #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off + #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall + + #define X2_MICROSTEPS 16 + #define X2_OVERCURRENT 2000 + #define X2_STALLCURRENT 1500 + + #define Y_MICROSTEPS 16 + #define Y_OVERCURRENT 2000 + #define Y_STALLCURRENT 1500 + + #define Y2_MICROSTEPS 16 + #define Y2_OVERCURRENT 2000 + #define Y2_STALLCURRENT 1500 + + #define Z_MICROSTEPS 16 + #define Z_OVERCURRENT 2000 + #define Z_STALLCURRENT 1500 + + #define Z2_MICROSTEPS 16 + #define Z2_OVERCURRENT 2000 + #define Z2_STALLCURRENT 1500 + + #define E0_MICROSTEPS 16 + #define E0_OVERCURRENT 2000 + #define E0_STALLCURRENT 1500 + + #define E1_MICROSTEPS 16 + #define E1_OVERCURRENT 2000 + #define E1_STALLCURRENT 1500 + + #define E2_MICROSTEPS 16 + #define E2_OVERCURRENT 2000 + #define E2_STALLCURRENT 1500 + + #define E3_MICROSTEPS 16 + #define E3_OVERCURRENT 2000 + #define E3_STALLCURRENT 1500 + + #define E4_MICROSTEPS 16 + #define E4_OVERCURRENT 2000 + #define E4_STALLCURRENT 1500 + +#endif + +/** + * TWI/I2C BUS + * + * This feature is an EXPERIMENTAL feature so it shall not be used on production + * machines. Enabling this will allow you to send and receive I2C data from slave + * devices on the bus. + * + * ; Example #1 + * ; This macro send the string "Marlin" to the slave device with address 0x63 (99) + * ; It uses multiple M260 commands with one B arg + * M260 A99 ; Target slave address + * M260 B77 ; M + * M260 B97 ; a + * M260 B114 ; r + * M260 B108 ; l + * M260 B105 ; i + * M260 B110 ; n + * M260 S1 ; Send the current buffer + * + * ; Example #2 + * ; Request 6 bytes from slave device with address 0x63 (99) + * M261 A99 B5 + * + * ; Example #3 + * ; Example serial output of a M261 request + * echo:i2c-reply: from:99 bytes:5 data:hello + */ + +// @section i2cbus + +//#define EXPERIMENTAL_I2CBUS +#define I2C_SLAVE_ADDRESS 0 // Set a value from 8 to 127 to act as a slave + +// @section extras + +/** + * Spindle & Laser control + * + * Add the M3, M4, and M5 commands to turn the spindle/laser on and off, and + * to set spindle speed, spindle direction, and laser power. + * + * SuperPid is a router/spindle speed controller used in the CNC milling community. + * Marlin can be used to turn the spindle on and off. It can also be used to set + * the spindle speed from 5,000 to 30,000 RPM. + * + * You'll need to select a pin for the ON/OFF function and optionally choose a 0-5V + * hardware PWM pin for the speed control and a pin for the rotation direction. + * + * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. + */ +//#define SPINDLE_LASER_ENABLE +#if ENABLED(SPINDLE_LASER_ENABLE) + + #define SPINDLE_LASER_ENABLE_INVERT false // set to "true" if the on/off function is reversed + #define SPINDLE_LASER_PWM true // set to true if your controller supports setting the speed/power + #define SPINDLE_LASER_PWM_INVERT true // set to "true" if the speed/power goes up when you want it to go slower + #define SPINDLE_LASER_POWERUP_DELAY 5000 // delay in milliseconds to allow the spindle/laser to come up to speed/power + #define SPINDLE_LASER_POWERDOWN_DELAY 5000 // delay in milliseconds to allow the spindle to stop + #define SPINDLE_DIR_CHANGE true // set to true if your spindle controller supports changing spindle direction + #define SPINDLE_INVERT_DIR false + #define SPINDLE_STOP_ON_DIR_CHANGE true // set to true if Marlin should stop the spindle before changing rotation direction + + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + + //#define SPEED_POWER_SLOPE 0.3922 + //#define SPEED_POWER_INTERCEPT 0 + //#define SPEED_POWER_MIN 10 + //#define SPEED_POWER_MAX 100 // 0-100% +#endif + +/** + * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins + */ +//#define PINS_DEBUGGING + +/** + * Auto-report temperatures with M155 S + */ +#define AUTO_REPORT_TEMPERATURES + +/** + * Include capabilities in M115 output + */ +#define EXTENDED_CAPABILITIES_REPORT + +/** + * Volumetric extrusion default state + * Activate to make volumetric extrusion the default method, + * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter. + * + * M200 D0 to disable, M200 Dn to set a new diameter. + */ +//#define VOLUMETRIC_DEFAULT_ON + +/** + * Enable this option for a leaner build of Marlin that removes all + * workspace offsets, simplifying coordinate transformations, leveling, etc. + * + * - M206 and M428 are disabled. + * - G92 will revert to its behavior from Marlin 1.0. + */ +//#define NO_WORKSPACE_OFFSETS + +/** + * Set the number of proportional font spaces required to fill up a typical character space. + * This can help to better align the output of commands like `G29 O` Mesh Output. + * + * For clients that use a fixed-width font (like OctoPrint), leave this set to 1.0. + * Otherwise, adjust according to your client and font. + */ +#define PROPORTIONAL_FONT_RATIO 1.0 + +/** + * Spend 28 bytes of SRAM to optimize the GCode parser + */ +#define FASTER_GCODE_PARSER + +/** + * User-defined menu items that execute custom GCode + */ +//#define CUSTOM_USER_MENUS +#if ENABLED(CUSTOM_USER_MENUS) + #define USER_SCRIPT_DONE "M117 User Script Done" + #define USER_SCRIPT_AUDIBLE_FEEDBACK + //#define USER_SCRIPT_RETURN // Return to status screen after a script + + #define USER_DESC_1 "Home & UBL Info" + #define USER_GCODE_1 "G28\nG29 W" + + #define USER_DESC_2 "Preheat for PLA" + #define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND) + + #define USER_DESC_3 "Preheat for ABS" + #define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND) + + #define USER_DESC_4 "Heat Bed/Home/Level" + #define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29" + + #define USER_DESC_5 "Home & Info" + #define USER_GCODE_5 "G28\nM503" +#endif + +/** + * Specify an action command to send to the host when the printer is killed. + * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. + * The host must be configured to handle the action command. + */ +//#define ACTION_ON_KILL "poweroff" + +//=========================================================================== +//====================== I2C Position Encoder Settings ====================== +//=========================================================================== + +/** + * I2C position encoders for closed loop control. + * Developed by Chris Barr at Aus3D. + * + * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder + * Github: https://github.com/Aus3D/MagneticEncoder + * + * Supplier: http://aus3d.com.au/magnetic-encoder-module + * Alternative Supplier: http://reliabuild3d.com/ + * + * Reilabuild encoders have been modified to improve reliability. + */ + +//#define I2C_POSITION_ENCODERS +#if ENABLED(I2C_POSITION_ENCODERS) + + #define I2CPE_ENCODER_CNT 1 // The number of encoders installed; max of 5 + // encoders supported currently. + + #define I2CPE_ENC_1_ADDR I2CPE_PRESET_ADDR_X // I2C address of the encoder. 30-200. + #define I2CPE_ENC_1_AXIS X_AXIS // Axis the encoder module is installed on. _AXIS. + #define I2CPE_ENC_1_TYPE I2CPE_ENC_TYPE_LINEAR // Type of encoder: I2CPE_ENC_TYPE_LINEAR -or- + // I2CPE_ENC_TYPE_ROTARY. + #define I2CPE_ENC_1_TICKS_UNIT 2048 // 1024 for magnetic strips with 2mm poles; 2048 for + // 1mm poles. For linear encoders this is ticks / mm, + // for rotary encoders this is ticks / revolution. + //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper + // steps per full revolution (motor steps/rev * microstepping) + //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel. + #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_NONE // Type of error error correction. + #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the + // printer will attempt to correct the error; errors + // smaller than this are ignored to minimize effects of + // measurement noise / latency (filter). + + #define I2CPE_ENC_2_ADDR I2CPE_PRESET_ADDR_Y // Same as above, but for encoder 2. + #define I2CPE_ENC_2_AXIS Y_AXIS + #define I2CPE_ENC_2_TYPE I2CPE_ENC_TYPE_LINEAR + #define I2CPE_ENC_2_TICKS_UNIT 2048 + //#define I2CPE_ENC_2_TICKS_REV (16 * 200) + //#define I2CPE_ENC_2_INVERT + #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_NONE + #define I2CPE_ENC_2_EC_THRESH 0.10 + + #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options + #define I2CPE_ENC_3_AXIS Z_AXIS // as above, or use defaults below. + + #define I2CPE_ENC_4_ADDR I2CPE_PRESET_ADDR_E // Encoder 4. + #define I2CPE_ENC_4_AXIS E_AXIS + + #define I2CPE_ENC_5_ADDR 34 // Encoder 5. + #define I2CPE_ENC_5_AXIS E_AXIS + + // Default settings for encoders which are enabled, but without settings configured above. + #define I2CPE_DEF_TYPE I2CPE_ENC_TYPE_LINEAR + #define I2CPE_DEF_ENC_TICKS_UNIT 2048 + #define I2CPE_DEF_TICKS_REV (16 * 200) + #define I2CPE_DEF_EC_METHOD I2CPE_ECM_NONE + #define I2CPE_DEF_EC_THRESH 0.1 + + //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given + // axis after which the printer will abort. Comment out to + // disable abort behaviour. + + #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault + // for this amount of time (in ms) before the encoder + // is trusted again. + + /** + * Position is checked every time a new command is executed from the buffer but during long moves, + * this setting determines the minimum update time between checks. A value of 100 works well with + * error rolling average when attempting to correct only for skips and not for vibration. + */ + #define I2CPE_MIN_UPD_TIME_MS 100 // Minimum time in miliseconds between encoder checks. + + // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise. + #define I2CPE_ERR_ROLLING_AVERAGE + +#endif // I2C_POSITION_ENCODERS + +/** + * MAX7219 Debug Matrix + * + * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status + * display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage. + * + * Fully assembled MAX7219 boards can be found on the internet for under $2(US). + * For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049 + */ +//#define MAX7219_DEBUG +#if ENABLED(MAX7219_DEBUG) + #define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display + #define MAX7219_DIN_PIN 57 // 78 on Re-ARM + #define MAX7219_LOAD_PIN 44 // 79 on Re-ARM + + /** + * Sample debug features + * If you add more debug displays, be careful to avoid conflicts! + */ + #define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning + #define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row + #define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row + + #define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper queue depth on this and the next LED matrix row + // If you experience stuttering, reboots, etc. this option can reveal how + // tweaks made to the configuration are affecting the printer in real-time. +#endif + +#endif // CONFIGURATION_ADV_H diff --git a/Marlin/src/core/boards.h b/Marlin/src/core/boards.h index 71c55785e7..f766316e41 100644 --- a/Marlin/src/core/boards.h +++ b/Marlin/src/core/boards.h @@ -101,6 +101,7 @@ #define BOARD_BAM_DICE_DUE 402 // 2PrintBeta BAM&DICE Due with STK drivers #define BOARD_BQ_ZUM_MEGA_3D 503 // bq ZUM Mega 3D #define BOARD_ZRIB_V20 504 // zrib V2.0 control board (Chinese knock off RAMPS replica) +#define BOARD_MAKEBOARD_MINI 431 // MakeBoard Mini v2.1.2 is a control board sold by MicroMake //ARM 32 #define BOARD_DUE3DOM 1411 // DUE3DOM for Arduino DUE #define BOARD_DUE3DOM_MINI 1412 // DUE3DOM MINI for Arduino DUE diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index 3829051335..69cae36d09 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -118,6 +118,8 @@ #include "pins_RUMBA.h" // ATmega2560 #elif MB(BQ_ZUM_MEGA_3D) #include "pins_BQ_ZUM_MEGA_3D.h" // ATmega2560 +#elif MB(MAKEBOARD_MINI) + #include "pins_MAKEBOARD_MINI.h" // ATmega2560 // // Other ATmega1280, ATmega2560 From 0cb423b5b3c18f6afbd94af96ed6695542d974fb Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 21 Oct 2017 00:41:32 -0500 Subject: [PATCH 06/20] Apply consistency for other configs --- Marlin/src/config/examples/BQ/Hephestos/Configuration.h | 2 +- Marlin/src/config/examples/BQ/WITBOX/Configuration.h | 2 +- Marlin/src/config/examples/Felix/Configuration.h | 2 +- Marlin/src/config/examples/Felix/DUAL/Configuration.h | 2 +- Marlin/src/config/examples/SCARA/Configuration.h | 2 +- Marlin/src/config/examples/makibox/Configuration.h | 2 +- Marlin/src/config/examples/tvrrug/Round2/Configuration.h | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Marlin/src/config/examples/BQ/Hephestos/Configuration.h b/Marlin/src/config/examples/BQ/Hephestos/Configuration.h index d6f3d46c07..709b8e0481 100644 --- a/Marlin/src/config/examples/BQ/Hephestos/Configuration.h +++ b/Marlin/src/config/examples/BQ/Hephestos/Configuration.h @@ -1189,7 +1189,7 @@ * * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' } */ -//#define LCD_LANGUAGE en +#define LCD_LANGUAGE en /** * LCD Character Set diff --git a/Marlin/src/config/examples/BQ/WITBOX/Configuration.h b/Marlin/src/config/examples/BQ/WITBOX/Configuration.h index 4f20f1aff2..2c99bbe909 100644 --- a/Marlin/src/config/examples/BQ/WITBOX/Configuration.h +++ b/Marlin/src/config/examples/BQ/WITBOX/Configuration.h @@ -1189,7 +1189,7 @@ * * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' } */ -//#define LCD_LANGUAGE en +#define LCD_LANGUAGE en /** * LCD Character Set diff --git a/Marlin/src/config/examples/Felix/Configuration.h b/Marlin/src/config/examples/Felix/Configuration.h index 2af759131f..e9a09a7cb7 100644 --- a/Marlin/src/config/examples/Felix/Configuration.h +++ b/Marlin/src/config/examples/Felix/Configuration.h @@ -1180,7 +1180,7 @@ * * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' } */ -//#define LCD_LANGUAGE en +#define LCD_LANGUAGE en /** * LCD Character Set diff --git a/Marlin/src/config/examples/Felix/DUAL/Configuration.h b/Marlin/src/config/examples/Felix/DUAL/Configuration.h index 88942b7a24..47b7bd5bcd 100644 --- a/Marlin/src/config/examples/Felix/DUAL/Configuration.h +++ b/Marlin/src/config/examples/Felix/DUAL/Configuration.h @@ -1180,7 +1180,7 @@ * * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' } */ -//#define LCD_LANGUAGE en +#define LCD_LANGUAGE en /** * LCD Character Set diff --git a/Marlin/src/config/examples/SCARA/Configuration.h b/Marlin/src/config/examples/SCARA/Configuration.h index ca568d2071..9f270e06c8 100644 --- a/Marlin/src/config/examples/SCARA/Configuration.h +++ b/Marlin/src/config/examples/SCARA/Configuration.h @@ -1210,7 +1210,7 @@ * * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' } */ -//#define LCD_LANGUAGE en +#define LCD_LANGUAGE en /** * LCD Character Set diff --git a/Marlin/src/config/examples/makibox/Configuration.h b/Marlin/src/config/examples/makibox/Configuration.h index 12e7aa398a..e1a51c5531 100644 --- a/Marlin/src/config/examples/makibox/Configuration.h +++ b/Marlin/src/config/examples/makibox/Configuration.h @@ -1201,7 +1201,7 @@ * * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' } */ -//#define LCD_LANGUAGE en +#define LCD_LANGUAGE en /** * LCD Character Set diff --git a/Marlin/src/config/examples/tvrrug/Round2/Configuration.h b/Marlin/src/config/examples/tvrrug/Round2/Configuration.h index 934f165dcd..12498fa705 100644 --- a/Marlin/src/config/examples/tvrrug/Round2/Configuration.h +++ b/Marlin/src/config/examples/tvrrug/Round2/Configuration.h @@ -1193,7 +1193,7 @@ * * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' } */ -//#define LCD_LANGUAGE en +#define LCD_LANGUAGE en /** * LCD Character Set From 72156a2029d329c7dc251f5e576103fda691372d Mon Sep 17 00:00:00 2001 From: Roxy-3D Date: Sat, 21 Oct 2017 11:42:26 -0500 Subject: [PATCH 07/20] change to better (more clear) names (#8050) set_destination_to_current() changed to set_destination_from_current() set_current_to_destination() changed to set_current_from_destination() --- Marlin/src/Marlin.cpp | 2 +- Marlin/src/feature/bedlevel/abl/abl.cpp | 4 ++-- .../bedlevel/mbl/mesh_bed_leveling.cpp | 4 ++-- .../bedlevel/ubl/G26_Mesh_Validation_Tool.cpp | 16 ++++++------- .../src/feature/bedlevel/ubl/ubl_motion.cpp | 18 +++++++------- Marlin/src/feature/fwretract.cpp | 2 +- Marlin/src/feature/pause.cpp | 6 ++--- Marlin/src/gcode/bedlevel/G42.cpp | 2 +- Marlin/src/gcode/bedlevel/mbl/G29.cpp | 2 +- Marlin/src/gcode/calibrate/G28.cpp | 2 +- Marlin/src/gcode/motion/G2_G3.cpp | 2 +- Marlin/src/gcode/motion/G5.cpp | 2 +- Marlin/src/gcode/probe/G38.cpp | 2 +- Marlin/src/lcd/ultralcd.cpp | 4 ++-- Marlin/src/module/motion.cpp | 24 +++++++++---------- Marlin/src/module/motion.h | 4 ++-- Marlin/src/module/tool_change.cpp | 2 +- 17 files changed, 49 insertions(+), 49 deletions(-) diff --git a/Marlin/src/Marlin.cpp b/Marlin/src/Marlin.cpp index 94518681cc..75f10d0b83 100644 --- a/Marlin/src/Marlin.cpp +++ b/Marlin/src/Marlin.cpp @@ -502,7 +502,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) { if (delayed_move_time && ELAPSED(ms, delayed_move_time + 1000UL) && IsRunning()) { // travel moves have been received so enact them delayed_move_time = 0xFFFFFFFFUL; // force moves to be done - set_destination_to_current(); + set_destination_from_current(); prepare_move_to_destination(); } #endif diff --git a/Marlin/src/feature/bedlevel/abl/abl.cpp b/Marlin/src/feature/bedlevel/abl/abl.cpp index bb5c817d09..b257784fe6 100644 --- a/Marlin/src/feature/bedlevel/abl/abl.cpp +++ b/Marlin/src/feature/bedlevel/abl/abl.cpp @@ -378,7 +378,7 @@ float bilinear_z_offset(const float logical[XYZ]) { if (cx1 == cx2 && cy1 == cy2) { // Start and end on same mesh square line_to_destination(fr_mm_s); - set_current_to_destination(); + set_current_from_destination(); return; } @@ -405,7 +405,7 @@ float bilinear_z_offset(const float logical[XYZ]) { else { // Already split on a border line_to_destination(fr_mm_s); - set_current_to_destination(); + set_current_from_destination(); return; } diff --git a/Marlin/src/feature/bedlevel/mbl/mesh_bed_leveling.cpp b/Marlin/src/feature/bedlevel/mbl/mesh_bed_leveling.cpp index d0678e7514..5a62fbf7af 100644 --- a/Marlin/src/feature/bedlevel/mbl/mesh_bed_leveling.cpp +++ b/Marlin/src/feature/bedlevel/mbl/mesh_bed_leveling.cpp @@ -69,7 +69,7 @@ if (cx1 == cx2 && cy1 == cy2) { // Start and end on same mesh square line_to_destination(fr_mm_s); - set_current_to_destination(); + set_current_from_destination(); return; } @@ -96,7 +96,7 @@ else { // Already split on a border line_to_destination(fr_mm_s); - set_current_to_destination(); + set_current_from_destination(); return; } diff --git a/Marlin/src/feature/bedlevel/ubl/G26_Mesh_Validation_Tool.cpp b/Marlin/src/feature/bedlevel/ubl/G26_Mesh_Validation_Tool.cpp index 52b37e6a1b..333b7a93dc 100644 --- a/Marlin/src/feature/bedlevel/ubl/G26_Mesh_Validation_Tool.cpp +++ b/Marlin/src/feature/bedlevel/ubl/G26_Mesh_Validation_Tool.cpp @@ -222,7 +222,7 @@ void unified_bed_leveling::G26() { if (current_position[Z_AXIS] < Z_CLEARANCE_BETWEEN_PROBES) { do_blocking_move_to_z(Z_CLEARANCE_BETWEEN_PROBES); stepper.synchronize(); - set_current_to_destination(); + set_current_from_destination(); } if (turn_on_heaters()) goto LEAVE; @@ -247,7 +247,7 @@ void unified_bed_leveling::G26() { ZERO(vertical_mesh_line_flags); // Move nozzle to the specified height for the first layer - set_destination_to_current(); + set_destination_from_current(); destination[Z_AXIS] = g26_layer_height; move_to(destination, 0.0); move_to(destination, g26_ooze_amount); @@ -531,7 +531,7 @@ void unified_bed_leveling::move_to(const float &x, const float &y, const float & G26_line_to_destination(feed_value); stepper.synchronize(); - set_destination_to_current(); + set_destination_from_current(); } // Check if X or Y is involved in the movement. @@ -547,7 +547,7 @@ void unified_bed_leveling::move_to(const float &x, const float &y, const float & G26_line_to_destination(feed_value); stepper.synchronize(); - set_destination_to_current(); + set_destination_from_current(); } @@ -829,7 +829,7 @@ bool unified_bed_leveling::prime_nozzle() { lcd_setstatusPGM(PSTR("User-Controlled Prime"), 99); chirp_at_user(); - set_destination_to_current(); + set_destination_from_current(); recover_filament(destination); // Make sure G26 doesn't think the filament is retracted(). @@ -846,7 +846,7 @@ bool unified_bed_leveling::prime_nozzle() { // but because the planner has a buffer, we won't be able // to stop as quickly. So we put up with the less smooth // action to give the user a more responsive 'Stop'. - set_destination_to_current(); + set_destination_from_current(); idle(); } @@ -870,11 +870,11 @@ bool unified_bed_leveling::prime_nozzle() { lcd_setstatusPGM(PSTR("Fixed Length Prime."), 99); lcd_quick_feedback(); #endif - set_destination_to_current(); + set_destination_from_current(); destination[E_AXIS] += g26_prime_length; G26_line_to_destination(planner.max_feedrate_mm_s[E_AXIS] / 15.0); stepper.synchronize(); - set_destination_to_current(); + set_destination_from_current(); retract_filament(destination); } diff --git a/Marlin/src/feature/bedlevel/ubl/ubl_motion.cpp b/Marlin/src/feature/bedlevel/ubl/ubl_motion.cpp index 977f2a865e..376c077b82 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl_motion.cpp +++ b/Marlin/src/feature/bedlevel/ubl/ubl_motion.cpp @@ -39,9 +39,9 @@ extern float destination[XYZE]; #if AVR_AT90USB1286_FAMILY // Teensyduino & Printrboard IDE extensions have compile errors without this - inline void set_current_to_destination() { COPY(current_position, destination); } + inline void set_current_from_destination() { COPY(current_position, destination); } #else - extern void set_current_to_destination(); + extern void set_current_from_destination(); #endif static void debug_echo_axis(const AxisEnum axis) { @@ -141,7 +141,7 @@ // a reasonable correction would be. planner._buffer_line(end[X_AXIS], end[Y_AXIS], end[Z_AXIS], end[E_AXIS], feed_rate, extruder); - set_current_to_destination(); + set_current_from_destination(); if (g26_debug_flag) debug_current_and_destination(PSTR("out of bounds in ubl.line_to_destination()")); @@ -189,7 +189,7 @@ if (g26_debug_flag) debug_current_and_destination(PSTR("FINAL_MOVE in ubl.line_to_destination()")); - set_current_to_destination(); + set_current_from_destination(); return; } @@ -301,7 +301,7 @@ if (current_position[X_AXIS] != end[X_AXIS] || current_position[Y_AXIS] != end[Y_AXIS]) goto FINAL_MOVE; - set_current_to_destination(); + set_current_from_destination(); return; } @@ -362,7 +362,7 @@ if (current_position[X_AXIS] != end[X_AXIS] || current_position[Y_AXIS] != end[Y_AXIS]) goto FINAL_MOVE; - set_current_to_destination(); + set_current_from_destination(); return; } @@ -456,7 +456,7 @@ if (current_position[X_AXIS] != end[X_AXIS] || current_position[Y_AXIS] != end[Y_AXIS]) goto FINAL_MOVE; - set_current_to_destination(); + set_current_from_destination(); } #if UBL_DELTA @@ -598,7 +598,7 @@ } while (segments); - return false; // moved but did not set_current_to_destination(); + return false; // moved but did not set_current_from_destination(); } // Otherwise perform per-segment leveling @@ -681,7 +681,7 @@ ubl_buffer_segment_raw( seg_rx, seg_ry, seg_rz + z_cxcy, seg_le, feedrate ); if (segments == 0 ) // done with last segment - return false; // did not set_current_to_destination() + return false; // did not set_current_from_destination() seg_rx += seg_dx; seg_ry += seg_dy; diff --git a/Marlin/src/feature/fwretract.cpp b/Marlin/src/feature/fwretract.cpp index 6e063896ee..a6093205f3 100644 --- a/Marlin/src/feature/fwretract.cpp +++ b/Marlin/src/feature/fwretract.cpp @@ -129,7 +129,7 @@ void FWRetract::retract(const bool retracting planner.flow_percentage[active_extruder] = 100; // The current position will be the destination for E and Z moves - set_destination_to_current(); + set_destination_from_current(); stepper.synchronize(); // Wait for buffered moves to complete diff --git a/Marlin/src/feature/pause.cpp b/Marlin/src/feature/pause.cpp index 6f5e32ab08..c1bc4057f9 100644 --- a/Marlin/src/feature/pause.cpp +++ b/Marlin/src/feature/pause.cpp @@ -146,7 +146,7 @@ bool pause_print(const float &retract, const float &z_lift, const float &x_pos, if (retract) { // Initial retract before move to filament change position - set_destination_to_current(); + set_destination_from_current(); destination[E_AXIS] += retract; RUNPLAN(PAUSE_PARK_RETRACT_FEEDRATE); stepper.synchronize(); @@ -168,7 +168,7 @@ bool pause_print(const float &retract, const float &z_lift, const float &x_pos, } // Unload filament - set_destination_to_current(); + set_destination_from_current(); destination[E_AXIS] += unload_length; RUNPLAN(FILAMENT_CHANGE_UNLOAD_FEEDRATE); stepper.synchronize(); @@ -272,7 +272,7 @@ void resume_print(const float &load_length/*=0*/, const float &initial_extrude_l filament_change_beep(max_beep_count, true); #endif - set_destination_to_current(); + set_destination_from_current(); if (load_length != 0) { #if ENABLED(ULTIPANEL) diff --git a/Marlin/src/gcode/bedlevel/G42.cpp b/Marlin/src/gcode/bedlevel/G42.cpp index f734fa8c86..ba905e51c3 100644 --- a/Marlin/src/gcode/bedlevel/G42.cpp +++ b/Marlin/src/gcode/bedlevel/G42.cpp @@ -55,7 +55,7 @@ void GcodeSuite::G42() { #define _GET_MESH_Y(J) mbl.index_to_ypos[J] #endif - set_destination_to_current(); + set_destination_from_current(); if (hasI) destination[X_AXIS] = LOGICAL_X_POSITION(_GET_MESH_X(ix)); if (hasJ) destination[Y_AXIS] = LOGICAL_Y_POSITION(_GET_MESH_Y(iy)); if (parser.boolval('P')) { diff --git a/Marlin/src/gcode/bedlevel/mbl/G29.cpp b/Marlin/src/gcode/bedlevel/mbl/G29.cpp index 58128aee76..674c7ce8a7 100644 --- a/Marlin/src/gcode/bedlevel/mbl/G29.cpp +++ b/Marlin/src/gcode/bedlevel/mbl/G29.cpp @@ -47,7 +47,7 @@ void mesh_probing_done() { set_bed_leveling_enabled(true); #if ENABLED(MESH_G28_REST_ORIGIN) current_position[Z_AXIS] = LOGICAL_Z_POSITION(Z_MIN_POS); - set_destination_to_current(); + set_destination_from_current(); line_to_destination(homing_feedrate(Z_AXIS)); stepper.synchronize(); #endif diff --git a/Marlin/src/gcode/calibrate/G28.cpp b/Marlin/src/gcode/calibrate/G28.cpp index effa484d2b..b3fefd4c4e 100644 --- a/Marlin/src/gcode/calibrate/G28.cpp +++ b/Marlin/src/gcode/calibrate/G28.cpp @@ -194,7 +194,7 @@ void GcodeSuite::G28(const bool always_home_all) { homeZ = always_home_all || parser.seen('Z'), home_all = (!homeX && !homeY && !homeZ) || (homeX && homeY && homeZ); - set_destination_to_current(); + set_destination_from_current(); #if Z_HOME_DIR > 0 // If homing away from BED do Z first diff --git a/Marlin/src/gcode/motion/G2_G3.cpp b/Marlin/src/gcode/motion/G2_G3.cpp index 15fd7f7b9e..96655b62c9 100644 --- a/Marlin/src/gcode/motion/G2_G3.cpp +++ b/Marlin/src/gcode/motion/G2_G3.cpp @@ -181,7 +181,7 @@ void plan_arc( // As far as the parser is concerned, the position is now == target. In reality the // motion control system might still be processing the action and the real tool position // in any intermediate location. - set_current_to_destination(); + set_current_from_destination(); } // plan_arc /** diff --git a/Marlin/src/gcode/motion/G5.cpp b/Marlin/src/gcode/motion/G5.cpp index 9df590b029..78cc748be4 100644 --- a/Marlin/src/gcode/motion/G5.cpp +++ b/Marlin/src/gcode/motion/G5.cpp @@ -33,7 +33,7 @@ void plan_cubic_move(const float offset[4]) { // As far as the parser is concerned, the position is now == destination. In reality the // motion control system might still be processing the action and the real tool position // in any intermediate location. - set_current_to_destination(); + set_current_from_destination(); } /** diff --git a/Marlin/src/gcode/probe/G38.cpp b/Marlin/src/gcode/probe/G38.cpp index 71e022cd83..105085a146 100644 --- a/Marlin/src/gcode/probe/G38.cpp +++ b/Marlin/src/gcode/probe/G38.cpp @@ -64,7 +64,7 @@ static bool G38_run_probe() { #if ENABLED(PROBE_DOUBLE_TOUCH) // Move away by the retract distance - set_destination_to_current(); + set_destination_from_current(); LOOP_XYZ(i) destination[i] += retract_mm[i]; endstops.enable(false); prepare_move_to_destination(); diff --git a/Marlin/src/lcd/ultralcd.cpp b/Marlin/src/lcd/ultralcd.cpp index bff5142b54..42feaced47 100644 --- a/Marlin/src/lcd/ultralcd.cpp +++ b/Marlin/src/lcd/ultralcd.cpp @@ -2810,7 +2810,7 @@ void kill_screen(const char* lcd_msg) { #endif // Set movement on a single axis - set_destination_to_current(); + set_destination_from_current(); destination[manual_move_axis] += manual_move_offset; // Reset for the next move @@ -2819,7 +2819,7 @@ void kill_screen(const char* lcd_msg) { // Set a blocking flag so no new moves can be added until all segments are done processing_manual_move = true; - prepare_move_to_destination(); // will call set_current_to_destination + prepare_move_to_destination(); // will call set_current_from_destination() processing_manual_move = false; feedrate_mm_s = old_feedrate; diff --git a/Marlin/src/module/motion.cpp b/Marlin/src/module/motion.cpp index 74fbfc1a6e..f887429b83 100644 --- a/Marlin/src/module/motion.cpp +++ b/Marlin/src/module/motion.cpp @@ -82,7 +82,7 @@ float current_position[XYZE] = { 0.0 }; /** * Cartesian Destination * A temporary position, usually applied to 'current_position'. - * Set with 'get_destination_from_command' or 'set_destination_to_current'. + * Set with 'get_destination_from_command' or 'set_destination_from_current'. * 'line_to_destination' sets 'current_position' to 'destination'. */ float destination[XYZE] = { 0.0 }; @@ -279,7 +279,7 @@ void line_to_destination(const float fr_mm_s) { planner.buffer_line_kinematic(destination, MMS_SCALED(fr_mm_s ? fr_mm_s : feedrate_mm_s), active_extruder); #endif - set_current_to_destination(); + set_current_from_destination(); } #endif // IS_KINEMATIC @@ -301,10 +301,10 @@ void do_blocking_move_to(const float &lx, const float &ly, const float &lz, cons feedrate_mm_s = fr_mm_s ? fr_mm_s : XY_PROBE_FEEDRATE_MM_S; - set_destination_to_current(); // sync destination at the start + set_destination_from_current(); // sync destination at the start #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) DEBUG_POS("set_destination_to_current", destination); + if (DEBUGGING(LEVELING)) DEBUG_POS("set_destination_from_current", destination); #endif // when in the danger zone @@ -313,7 +313,7 @@ void do_blocking_move_to(const float &lx, const float &ly, const float &lz, cons destination[X_AXIS] = lx; // move directly (uninterpolated) destination[Y_AXIS] = ly; destination[Z_AXIS] = lz; - prepare_uninterpolated_move_to_destination(); // set_current_to_destination + prepare_uninterpolated_move_to_destination(); // set_current_from_destination() #if ENABLED(DEBUG_LEVELING_FEATURE) if (DEBUGGING(LEVELING)) DEBUG_POS("danger zone move", current_position); #endif @@ -321,7 +321,7 @@ void do_blocking_move_to(const float &lx, const float &ly, const float &lz, cons } else { destination[Z_AXIS] = delta_clip_start_height; - prepare_uninterpolated_move_to_destination(); // set_current_to_destination + prepare_uninterpolated_move_to_destination(); // set_current_from_destination() #if ENABLED(DEBUG_LEVELING_FEATURE) if (DEBUGGING(LEVELING)) DEBUG_POS("zone border move", current_position); #endif @@ -330,7 +330,7 @@ void do_blocking_move_to(const float &lx, const float &ly, const float &lz, cons if (lz > current_position[Z_AXIS]) { // raising? destination[Z_AXIS] = lz; - prepare_uninterpolated_move_to_destination(); // set_current_to_destination + prepare_uninterpolated_move_to_destination(); // set_current_from_destination() #if ENABLED(DEBUG_LEVELING_FEATURE) if (DEBUGGING(LEVELING)) DEBUG_POS("z raise move", current_position); #endif @@ -338,14 +338,14 @@ void do_blocking_move_to(const float &lx, const float &ly, const float &lz, cons destination[X_AXIS] = lx; destination[Y_AXIS] = ly; - prepare_move_to_destination(); // set_current_to_destination + prepare_move_to_destination(); // set_current_from_destination() #if ENABLED(DEBUG_LEVELING_FEATURE) if (DEBUGGING(LEVELING)) DEBUG_POS("xy move", current_position); #endif if (lz < current_position[Z_AXIS]) { // lowering? destination[Z_AXIS] = lz; - prepare_uninterpolated_move_to_destination(); // set_current_to_destination + prepare_uninterpolated_move_to_destination(); // set_current_from_destination() #if ENABLED(DEBUG_LEVELING_FEATURE) if (DEBUGGING(LEVELING)) DEBUG_POS("z lower move", current_position); #endif @@ -355,7 +355,7 @@ void do_blocking_move_to(const float &lx, const float &ly, const float &lz, cons if (!position_is_reachable_xy(lx, ly)) return; - set_destination_to_current(); + set_destination_from_current(); // If Z needs to raise, do it before moving XY if (destination[Z_AXIS] < lz) { @@ -701,7 +701,7 @@ float soft_endstop_min[XYZ] = { X_MIN_BED, Y_MIN_BED, Z_MIN_POS }, // Skip it, but keep track of the current position // (so it can be used as the start of the next non-travel move) if (delayed_move_time != 0xFFFFFFFFUL) { - set_current_to_destination(); + set_current_from_destination(); NOLESS(raised_parked_position[Z_AXIS], destination[Z_AXIS]); delayed_move_time = millis(); return true; @@ -807,7 +807,7 @@ void prepare_move_to_destination() { #endif ) return; - set_current_to_destination(); + set_current_from_destination(); } #if HAS_AXIS_UNHOMED_ERR diff --git a/Marlin/src/module/motion.h b/Marlin/src/module/motion.h index 5da373354b..2a2449ef34 100644 --- a/Marlin/src/module/motion.h +++ b/Marlin/src/module/motion.h @@ -106,8 +106,8 @@ XYZ_DEFS(signed char, home_dir, HOME_DIR); void report_current_position(); -inline void set_current_to_destination() { COPY(current_position, destination); } -inline void set_destination_to_current() { COPY(destination, current_position); } +inline void set_current_from_destination() { COPY(current_position, destination); } +inline void set_destination_from_current() { COPY(destination, current_position); } void get_cartesian_from_steppers(); void set_current_from_steppers_for_axis(const AxisEnum axis); diff --git a/Marlin/src/module/tool_change.cpp b/Marlin/src/module/tool_change.cpp index 75fba3d94b..6c9d72a623 100644 --- a/Marlin/src/module/tool_change.cpp +++ b/Marlin/src/module/tool_change.cpp @@ -176,7 +176,7 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool n } // Save current position to destination, for use later - set_destination_to_current(); + set_destination_from_current(); #if ENABLED(DUAL_X_CARRIAGE) From 6296ab2173b50200b48a4f9c5d8d6319eb5af695 Mon Sep 17 00:00:00 2001 From: cdedwards Date: Tue, 24 Oct 2017 13:14:03 -0600 Subject: [PATCH 08/20] Add GFX overlay to UBL mesh edit (#8038) * Add GFX overlay to UBL mesh edit Fixed misplaced HAS_TEMP_BED in dogm_bitmaps.h rename _lcd_babystep_zoffset_overlay to _lcd_zoffset_overlay_gfx and move it out of BABYSTEP_ZPROBE_OFFSET to we can use it for over things. Add this function into UBL mesh edit screen. update all Configuration.h to add ENABLE_MESH_EDIT_GFX_OVERLAY * Add Sanity to UBL insanity Need to check for DOGLCD otherwise error out. --- Marlin/Configuration.h | 3 +- Marlin/src/config/default/Configuration.h | 1 + .../AlephObjects/TAZ4/Configuration.h | 1 + .../AliExpress/CL-260/Configuration.h | 1 + .../config/examples/Anet/A6/Configuration.h | 1 + .../config/examples/Anet/A8/Configuration.h | 1 + .../examples/BQ/Hephestos/Configuration.h | 1 + .../examples/BQ/Hephestos_2/Configuration.h | 1 + .../config/examples/BQ/WITBOX/Configuration.h | 1 + .../config/examples/Cartesio/Configuration.h | 1 + .../examples/Creality/CR-10/Configuration.h | 1 + .../src/config/examples/Felix/Configuration.h | 1 + .../examples/Felix/DUAL/Configuration.h | 1 + .../Folger Tech/i3-2020/Configuration.h | 1 + .../examples/Geeetech/GT2560/Configuration.h | 1 + .../Geeetech/I3_Pro_X-GT2560/Configuration.h | 1 + .../examples/Infitary/i3-M508/Configuration.h | 1 + .../examples/Malyan/M150/Configuration.h | 1 + .../Micromake/C1/basic/Configuration.h | 1 + .../Micromake/C1/enhanced/Configuration.h | 1 + .../config/examples/Mks/Sbase/Configuration.h | 1 + .../RepRapWorld/Megatronics/Configuration.h | 1 + .../config/examples/RigidBot/Configuration.h | 1 + .../src/config/examples/SCARA/Configuration.h | 1 + .../examples/Sanguinololu/Configuration.h | 1 + .../config/examples/TinyBoy2/Configuration.h | 1 + .../examples/Velleman/K8200/Configuration.h | 1 + .../examples/Velleman/K8400/Configuration.h | 1 + .../Velleman/K8400/Dual-head/Configuration.h | 1 + .../examples/adafruit/ST7565/Configuration.h | 1 + .../FLSUN/auto_calibrate/Configuration.h | 1 + .../delta/FLSUN/kossel_mini/Configuration.h | 1 + .../examples/delta/generic/Configuration.h | 1 + .../delta/kossel_mini/Configuration.h | 1 + .../examples/delta/kossel_pro/Configuration.h | 1 + .../examples/delta/kossel_xl/Configuration.h | 1 + .../examples/gCreate/gMax1.5+/Configuration.h | 1 + .../config/examples/makibox/Configuration.h | 1 + .../examples/stm32f103ret6/Configuration.h | 1 + .../examples/tvrrug/Round2/Configuration.h | 1 + .../src/config/examples/wt150/Configuration.h | 1 + Marlin/src/inc/SanityCheck.h | 4 +- Marlin/src/lcd/dogm/dogm_bitmaps.h | 184 +++++++++--------- Marlin/src/lcd/ultralcd.cpp | 81 ++++---- 44 files changed, 178 insertions(+), 134 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 7781008aca..8739e626a7 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -854,7 +854,7 @@ * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling) * A comprehensive bed leveling system combining the features and benefits * of other systems. UBL also includes integrated Mesh Generation, Mesh - * Validation and Mesh Editing systems. + * Validation and Mesh Editing systems. * * - MESH_BED_LEVELING * Probe a grid manually @@ -875,6 +875,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/default/Configuration.h b/Marlin/src/config/default/Configuration.h index 7781008aca..20556e064d 100644 --- a/Marlin/src/config/default/Configuration.h +++ b/Marlin/src/config/default/Configuration.h @@ -875,6 +875,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h index d9d725b959..69a3c1e8ac 100644 --- a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h +++ b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h @@ -895,6 +895,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h b/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h index c85b0b01dc..4f6ac38ea3 100644 --- a/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h +++ b/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h @@ -875,6 +875,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/Anet/A6/Configuration.h b/Marlin/src/config/examples/Anet/A6/Configuration.h index 2affc1ad91..c745c0f31f 100644 --- a/Marlin/src/config/examples/Anet/A6/Configuration.h +++ b/Marlin/src/config/examples/Anet/A6/Configuration.h @@ -994,6 +994,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/Anet/A8/Configuration.h b/Marlin/src/config/examples/Anet/A8/Configuration.h index d3fa860dd9..36d9164863 100644 --- a/Marlin/src/config/examples/Anet/A8/Configuration.h +++ b/Marlin/src/config/examples/Anet/A8/Configuration.h @@ -881,6 +881,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/BQ/Hephestos/Configuration.h b/Marlin/src/config/examples/BQ/Hephestos/Configuration.h index 709b8e0481..84e7d5a052 100644 --- a/Marlin/src/config/examples/BQ/Hephestos/Configuration.h +++ b/Marlin/src/config/examples/BQ/Hephestos/Configuration.h @@ -866,6 +866,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h index d79e965322..f5621c3572 100644 --- a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h +++ b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h @@ -876,6 +876,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/BQ/WITBOX/Configuration.h b/Marlin/src/config/examples/BQ/WITBOX/Configuration.h index 2c99bbe909..fba10b149c 100644 --- a/Marlin/src/config/examples/BQ/WITBOX/Configuration.h +++ b/Marlin/src/config/examples/BQ/WITBOX/Configuration.h @@ -866,6 +866,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/Cartesio/Configuration.h b/Marlin/src/config/examples/Cartesio/Configuration.h index 6ebf0afdff..7b94aa253f 100644 --- a/Marlin/src/config/examples/Cartesio/Configuration.h +++ b/Marlin/src/config/examples/Cartesio/Configuration.h @@ -874,6 +874,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/Creality/CR-10/Configuration.h b/Marlin/src/config/examples/Creality/CR-10/Configuration.h index 3b2029017d..49cb146f45 100755 --- a/Marlin/src/config/examples/Creality/CR-10/Configuration.h +++ b/Marlin/src/config/examples/Creality/CR-10/Configuration.h @@ -885,6 +885,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/Felix/Configuration.h b/Marlin/src/config/examples/Felix/Configuration.h index e9a09a7cb7..b86d47b58c 100644 --- a/Marlin/src/config/examples/Felix/Configuration.h +++ b/Marlin/src/config/examples/Felix/Configuration.h @@ -857,6 +857,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/Felix/DUAL/Configuration.h b/Marlin/src/config/examples/Felix/DUAL/Configuration.h index 47b7bd5bcd..397f59e8f2 100644 --- a/Marlin/src/config/examples/Felix/DUAL/Configuration.h +++ b/Marlin/src/config/examples/Felix/DUAL/Configuration.h @@ -857,6 +857,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/Folger Tech/i3-2020/Configuration.h b/Marlin/src/config/examples/Folger Tech/i3-2020/Configuration.h index 3306873190..0d5d0ebc21 100644 --- a/Marlin/src/config/examples/Folger Tech/i3-2020/Configuration.h +++ b/Marlin/src/config/examples/Folger Tech/i3-2020/Configuration.h @@ -872,6 +872,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h b/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h index 72b4bf5d2d..11792c6356 100644 --- a/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h +++ b/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h @@ -890,6 +890,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h b/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h index 7494ebb541..b571715ec4 100644 --- a/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h +++ b/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h @@ -875,6 +875,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h b/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h index fb4442d431..59d4b07f4b 100644 --- a/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h +++ b/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h @@ -879,6 +879,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/Malyan/M150/Configuration.h b/Marlin/src/config/examples/Malyan/M150/Configuration.h index 6f15182045..0e44acf4a7 100644 --- a/Marlin/src/config/examples/Malyan/M150/Configuration.h +++ b/Marlin/src/config/examples/Malyan/M150/Configuration.h @@ -903,6 +903,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h b/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h index a1661e5cf5..f9d6dadbd6 100644 --- a/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h +++ b/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h @@ -879,6 +879,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h index 6de13c6a1d..4e6ff500c0 100644 --- a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h +++ b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h @@ -879,6 +879,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/Mks/Sbase/Configuration.h b/Marlin/src/config/examples/Mks/Sbase/Configuration.h index 3775a46bc4..603fc568a5 100644 --- a/Marlin/src/config/examples/Mks/Sbase/Configuration.h +++ b/Marlin/src/config/examples/Mks/Sbase/Configuration.h @@ -877,6 +877,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h b/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h index 876b0ba565..57930875e7 100644 --- a/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h +++ b/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h @@ -875,6 +875,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/RigidBot/Configuration.h b/Marlin/src/config/examples/RigidBot/Configuration.h index 54b0baad8a..86bb17a534 100644 --- a/Marlin/src/config/examples/RigidBot/Configuration.h +++ b/Marlin/src/config/examples/RigidBot/Configuration.h @@ -873,6 +873,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/SCARA/Configuration.h b/Marlin/src/config/examples/SCARA/Configuration.h index 9f270e06c8..f5f16c6232 100644 --- a/Marlin/src/config/examples/SCARA/Configuration.h +++ b/Marlin/src/config/examples/SCARA/Configuration.h @@ -887,6 +887,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/Sanguinololu/Configuration.h b/Marlin/src/config/examples/Sanguinololu/Configuration.h index 0cfe682f49..f040c6874a 100644 --- a/Marlin/src/config/examples/Sanguinololu/Configuration.h +++ b/Marlin/src/config/examples/Sanguinololu/Configuration.h @@ -906,6 +906,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/TinyBoy2/Configuration.h b/Marlin/src/config/examples/TinyBoy2/Configuration.h index 1ea7d07a41..edef583f37 100644 --- a/Marlin/src/config/examples/TinyBoy2/Configuration.h +++ b/Marlin/src/config/examples/TinyBoy2/Configuration.h @@ -931,6 +931,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/Velleman/K8200/Configuration.h b/Marlin/src/config/examples/Velleman/K8200/Configuration.h index d3e991860c..3f1d7a1ec1 100644 --- a/Marlin/src/config/examples/Velleman/K8200/Configuration.h +++ b/Marlin/src/config/examples/Velleman/K8200/Configuration.h @@ -905,6 +905,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/Velleman/K8400/Configuration.h b/Marlin/src/config/examples/Velleman/K8400/Configuration.h index 2a2bd761df..92bc153d51 100644 --- a/Marlin/src/config/examples/Velleman/K8400/Configuration.h +++ b/Marlin/src/config/examples/Velleman/K8400/Configuration.h @@ -875,6 +875,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h b/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h index f04b1b69d6..c0bdfe32e4 100644 --- a/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h +++ b/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h @@ -875,6 +875,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/adafruit/ST7565/Configuration.h b/Marlin/src/config/examples/adafruit/ST7565/Configuration.h index 90df7ea01e..41102242ff 100644 --- a/Marlin/src/config/examples/adafruit/ST7565/Configuration.h +++ b/Marlin/src/config/examples/adafruit/ST7565/Configuration.h @@ -875,6 +875,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h index ebfbd4c12c..752adfa849 100644 --- a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h +++ b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h @@ -999,6 +999,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h index 2c30878dc6..72fb786a0f 100644 --- a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h +++ b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h @@ -999,6 +999,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/delta/generic/Configuration.h b/Marlin/src/config/examples/delta/generic/Configuration.h index 8b4d542288..d4d181d495 100644 --- a/Marlin/src/config/examples/delta/generic/Configuration.h +++ b/Marlin/src/config/examples/delta/generic/Configuration.h @@ -986,6 +986,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/delta/kossel_mini/Configuration.h b/Marlin/src/config/examples/delta/kossel_mini/Configuration.h index a997293726..34d2a6c0af 100644 --- a/Marlin/src/config/examples/delta/kossel_mini/Configuration.h +++ b/Marlin/src/config/examples/delta/kossel_mini/Configuration.h @@ -989,6 +989,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/delta/kossel_pro/Configuration.h b/Marlin/src/config/examples/delta/kossel_pro/Configuration.h index 9753ea1e6d..993d8635c6 100644 --- a/Marlin/src/config/examples/delta/kossel_pro/Configuration.h +++ b/Marlin/src/config/examples/delta/kossel_pro/Configuration.h @@ -989,6 +989,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/delta/kossel_xl/Configuration.h b/Marlin/src/config/examples/delta/kossel_xl/Configuration.h index 9720fac4cf..b2088193be 100644 --- a/Marlin/src/config/examples/delta/kossel_xl/Configuration.h +++ b/Marlin/src/config/examples/delta/kossel_xl/Configuration.h @@ -998,6 +998,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h index a487f47549..a9c3beea57 100644 --- a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h +++ b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h @@ -889,6 +889,7 @@ * NOTE: Requires a lot of PROGMEM! */ #define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/makibox/Configuration.h b/Marlin/src/config/examples/makibox/Configuration.h index e1a51c5531..6522bb60f8 100644 --- a/Marlin/src/config/examples/makibox/Configuration.h +++ b/Marlin/src/config/examples/makibox/Configuration.h @@ -878,6 +878,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/stm32f103ret6/Configuration.h b/Marlin/src/config/examples/stm32f103ret6/Configuration.h index 474403cef3..5a2fb16966 100644 --- a/Marlin/src/config/examples/stm32f103ret6/Configuration.h +++ b/Marlin/src/config/examples/stm32f103ret6/Configuration.h @@ -862,6 +862,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/tvrrug/Round2/Configuration.h b/Marlin/src/config/examples/tvrrug/Round2/Configuration.h index 12498fa705..19d25e8f42 100644 --- a/Marlin/src/config/examples/tvrrug/Round2/Configuration.h +++ b/Marlin/src/config/examples/tvrrug/Round2/Configuration.h @@ -870,6 +870,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/wt150/Configuration.h b/Marlin/src/config/examples/wt150/Configuration.h index 95d99a6286..1a13d485ca 100644 --- a/Marlin/src/config/examples/wt150/Configuration.h +++ b/Marlin/src/config/examples/wt150/Configuration.h @@ -880,6 +880,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 36fc2efa21..f75be67e96 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -736,7 +736,9 @@ static_assert(1 >= 0 static_assert(WITHIN(UBL_PROBE_PT_2_Y, MIN_PROBE_Y, MAX_PROBE_Y), "UBL_PROBE_PT_2_Y can't be reached by the Z probe."); static_assert(WITHIN(UBL_PROBE_PT_3_Y, MIN_PROBE_Y, MAX_PROBE_Y), "UBL_PROBE_PT_3_Y can't be reached by the Z probe."); #endif - + #if ENABLED(ENABLE_MESH_EDIT_GFX_OVERLAY) && !ENABLED(DOGLCD) + #error "ENABLE_MESH_EDIT_GFX_OVERLAY requires a DOGLCD." + #endif #elif HAS_ABL /** diff --git a/Marlin/src/lcd/dogm/dogm_bitmaps.h b/Marlin/src/lcd/dogm/dogm_bitmaps.h index 3068e6ee86..1f61f026bd 100644 --- a/Marlin/src/lcd/dogm/dogm_bitmaps.h +++ b/Marlin/src/lcd/dogm/dogm_bitmaps.h @@ -419,97 +419,95 @@ 0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; #endif // Extruders - - #if ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY) - const unsigned char cw_bmp[] PROGMEM = { //AVR-GCC, WinAVR - 0x07,0xf8,0x00, // 000001111111100000000000 - 0x0c,0x0c,0x00, // 000011000000110000000000 - 0x10,0x02,0x00, // 000100000000001000000000 - 0x20,0x01,0x00, // 001000000000000100000000 - 0x60,0x01,0x80, // 011000000000000100000000 - 0x40,0x00,0x80, // 010000000000000010000000 - 0x40,0x03,0xe0, // 010000000000001111100000 - 0x40,0x01,0xc0, // 010000000000000111000000 - 0x40,0x00,0x80, // 010000000000000010000000 - 0x40,0x00,0x00, // 010000000000000000000000 - 0x40,0x00,0x00, // 010000000000000000000000 - 0x60,0x00,0x00, // 011000000000000000000000 - 0x20,0x00,0x00, // 001000000000000000000000 - 0x10,0x00,0x00, // 000100000000000000000000 - 0x0c,0x0c,0x00, // 000011000000110000000000 - 0x07,0xf8,0x00 // 000001111111100000000000 - }; - - const unsigned char ccw_bmp[] PROGMEM = { //AVR-GCC, WinAVR - 0x01,0xfe,0x00, // 000000011111111000000000 - 0x03,0x03,0x00, // 000000110000001100000000 - 0x04,0x00,0x80, // 000001000000000010000000 - 0x08,0x00,0x40, // 000010000000000001000000 - 0x18,0x00,0x60, // 000110000000000001100000 - 0x10,0x00,0x20, // 000100000000000000100000 - 0x7c,0x00,0x20, // 011111000000000000100000 - 0x38,0x00,0x20, // 001110000000000000100000 - 0x10,0x00,0x20, // 000100000000000000100000 - 0x00,0x00,0x20, // 000000000000000000100000 - 0x00,0x00,0x20, // 000000000000000000100000 - 0x00,0x00,0x60, // 000000000000000001100000 - 0x00,0x00,0x40, // 000000000000000001000000 - 0x00,0x00,0x80, // 000000000000000010000000 - 0x03,0x03,0x00, // 000000110000001100000000 - 0x01,0xfe,0x00 // 000000011111111000000000 - }; - - - const unsigned char up_arrow_bmp[] PROGMEM = { //AVR-GCC, WinAVR - 0x06,0x00, // 000001100000 - 0x0F,0x00, // 000011110000 - 0x1F,0x80, // 000111111000 - 0x3F,0xC0, // 001111111100 - 0x06,0x00, // 000001100000 - 0x06,0x00, // 000001100000 - 0x06,0x00, // 000001100000 - 0x06,0x00, // 000001100000 - 0x06,0x00, // 000001100000 - 0x06,0x00, // 000001100000 - 0x06,0x00, // 000001100000 - 0x06,0x00, // 000001100000 - 0x06,0x00 // 000001100000 - }; - - const unsigned char down_arrow_bmp[] PROGMEM = { //AVR-GCC, WinAVR - 0x06,0x00, // 000001100000 - 0x06,0x00, // 000001100000 - 0x06,0x00, // 000001100000 - 0x06,0x00, // 000001100000 - 0x06,0x00, // 000001100000 - 0x06,0x00, // 000001100000 - 0x06,0x00, // 000001100000 - 0x06,0x00, // 000001100000 - 0x06,0x00, // 000001100000 - 0x3F,0xC0, // 001111111100 - 0x1F,0x80, // 000111111000 - 0x0F,0x00, // 000011110000 - 0x06,0x00 // 000001100000 - }; - - const unsigned char offset_bedline_bmp[] PROGMEM = { //AVR-GCC, WinAVR - 0xFF,0xFF,0xFF // 111111111111111111111111 - }; - - const unsigned char nozzle_bmp[] PROGMEM = { //AVR-GCC, WinAVR - 0x7F,0x80, // 0111111110000000 - 0xFF,0xC0, // 1111111111000000 - 0xFF,0xC0, // 1111111111000000 - 0xFF,0xC0, // 1111111111000000 - 0x7F,0x80, // 0111111110000000 - 0x7F,0x80, // 0111111110000000 - 0xFF,0xC0, // 1111111111000000 - 0xFF,0xC0, // 1111111111000000 - 0xFF,0xC0, // 1111111111000000 - 0x3F,0x00, // 0011111100000000 - 0x1E,0x00, // 0001111000000000 - 0x0C,0x00 // 0000110000000000 - }; - #endif // BABYSTEP_ZPROBE_GFX_OVERLAY - #endif // HAS_TEMP_BED +#if ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY) || ENABLED(ENABLE_MESH_EDIT_GFX_OVERLAY) + const unsigned char cw_bmp[] PROGMEM = { //AVR-GCC, WinAVR + 0x07,0xf8,0x00, // 000001111111100000000000 + 0x0c,0x0c,0x00, // 000011000000110000000000 + 0x10,0x02,0x00, // 000100000000001000000000 + 0x20,0x01,0x00, // 001000000000000100000000 + 0x60,0x01,0x80, // 011000000000000100000000 + 0x40,0x00,0x80, // 010000000000000010000000 + 0x40,0x03,0xe0, // 010000000000001111100000 + 0x40,0x01,0xc0, // 010000000000000111000000 + 0x40,0x00,0x80, // 010000000000000010000000 + 0x40,0x00,0x00, // 010000000000000000000000 + 0x40,0x00,0x00, // 010000000000000000000000 + 0x60,0x00,0x00, // 011000000000000000000000 + 0x20,0x00,0x00, // 001000000000000000000000 + 0x10,0x00,0x00, // 000100000000000000000000 + 0x0c,0x0c,0x00, // 000011000000110000000000 + 0x07,0xf8,0x00 // 000001111111100000000000 + }; + + const unsigned char ccw_bmp[] PROGMEM = { //AVR-GCC, WinAVR + 0x01,0xfe,0x00, // 000000011111111000000000 + 0x03,0x03,0x00, // 000000110000001100000000 + 0x04,0x00,0x80, // 000001000000000010000000 + 0x08,0x00,0x40, // 000010000000000001000000 + 0x18,0x00,0x60, // 000110000000000001100000 + 0x10,0x00,0x20, // 000100000000000000100000 + 0x7c,0x00,0x20, // 011111000000000000100000 + 0x38,0x00,0x20, // 001110000000000000100000 + 0x10,0x00,0x20, // 000100000000000000100000 + 0x00,0x00,0x20, // 000000000000000000100000 + 0x00,0x00,0x20, // 000000000000000000100000 + 0x00,0x00,0x60, // 000000000000000001100000 + 0x00,0x00,0x40, // 000000000000000001000000 + 0x00,0x00,0x80, // 000000000000000010000000 + 0x03,0x03,0x00, // 000000110000001100000000 + 0x01,0xfe,0x00 // 000000011111111000000000 + }; + + + const unsigned char up_arrow_bmp[] PROGMEM = { //AVR-GCC, WinAVR + 0x06,0x00, // 000001100000 + 0x0F,0x00, // 000011110000 + 0x1F,0x80, // 000111111000 + 0x3F,0xC0, // 001111111100 + 0x06,0x00, // 000001100000 + 0x06,0x00, // 000001100000 + 0x06,0x00, // 000001100000 + 0x06,0x00, // 000001100000 + 0x06,0x00, // 000001100000 + 0x06,0x00, // 000001100000 + 0x06,0x00, // 000001100000 + 0x06,0x00, // 000001100000 + 0x06,0x00 // 000001100000 + }; + + const unsigned char down_arrow_bmp[] PROGMEM = { //AVR-GCC, WinAVR + 0x06,0x00, // 000001100000 + 0x06,0x00, // 000001100000 + 0x06,0x00, // 000001100000 + 0x06,0x00, // 000001100000 + 0x06,0x00, // 000001100000 + 0x06,0x00, // 000001100000 + 0x06,0x00, // 000001100000 + 0x06,0x00, // 000001100000 + 0x06,0x00, // 000001100000 + 0x3F,0xC0, // 001111111100 + 0x1F,0x80, // 000111111000 + 0x0F,0x00, // 000011110000 + 0x06,0x00 // 000001100000 + }; + + const unsigned char offset_bedline_bmp[] PROGMEM = { //AVR-GCC, WinAVR + 0xFF,0xFF,0xFF // 111111111111111111111111 + }; + + const unsigned char nozzle_bmp[] PROGMEM = { //AVR-GCC, WinAVR + 0x7F,0x80, // 0111111110000000 + 0xFF,0xC0, // 1111111111000000 + 0xFF,0xC0, // 1111111111000000 + 0xFF,0xC0, // 1111111111000000 + 0x7F,0x80, // 0111111110000000 + 0x7F,0x80, // 0111111110000000 + 0xFF,0xC0, // 1111111111000000 + 0xFF,0xC0, // 1111111111000000 + 0xFF,0xC0, // 1111111111000000 + 0x3F,0x00, // 0011111100000000 + 0x1E,0x00, // 0001111000000000 + 0x0C,0x00 // 0000110000000000 + }; +#endif // BABYSTEP_ZPROBE_GFX_OVERLAY || ENABLE_MESH_EDIT_GFX_OVERLAY diff --git a/Marlin/src/lcd/ultralcd.cpp b/Marlin/src/lcd/ultralcd.cpp index 42feaced47..37c6a61eca 100644 --- a/Marlin/src/lcd/ultralcd.cpp +++ b/Marlin/src/lcd/ultralcd.cpp @@ -1057,47 +1057,47 @@ void kill_screen(const char* lcd_msg) { void lcd_babystep_y() { lcd_goto_screen(_lcd_babystep_y); babysteps_done = 0; defer_return_to_status = true; } #endif - #if ENABLED(BABYSTEP_ZPROBE_OFFSET) + #if ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY) || ENABLED(ENABLE_MESH_EDIT_GFX_OVERLAY) - #if ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY) - - void _lcd_babystep_zoffset_overlay(const float in_zoffset) { - // Determine whether the user is raising or lowering the nozzle. - int8_t dir = 0; - static float old_zprobe_zoffset = 0; - if (in_zoffset != old_zprobe_zoffset) { - dir = (in_zoffset > old_zprobe_zoffset) ? 1 : -1; - old_zprobe_zoffset = in_zoffset; - } - - #if ENABLED(BABYSTEP_ZPROBE_GFX_REVERSE) - const unsigned char *rot_up = ccw_bmp; - const unsigned char *rot_down = cw_bmp; - #else - const unsigned char *rot_up = cw_bmp; - const unsigned char *rot_down = ccw_bmp; - #endif - - #if ENABLED(USE_BIG_EDIT_FONT) - const int left = 0, right = 45, nozzle = 95; - #else - const int left = 5, right = 90, nozzle = 60; - #endif - - // Draw a representation of the nozzle - if (PAGE_CONTAINS(3, 16)) u8g.drawBitmapP(nozzle + 6, 4 - dir, 2, 12, nozzle_bmp); - if (PAGE_CONTAINS(20, 20)) u8g.drawBitmapP(nozzle + 0, 20, 3, 1, offset_bedline_bmp); - - // Draw cw/ccw indicator and up/down arrows. - if (PAGE_CONTAINS(47,62)) { - u8g.drawBitmapP(left + 0, 47, 3, 16, rot_down); - u8g.drawBitmapP(right + 0, 47, 3, 16, rot_up); - u8g.drawBitmapP(right + 20, 48 - dir, 2, 13, up_arrow_bmp); - u8g.drawBitmapP(left + 20, 49 - dir, 2, 13, down_arrow_bmp); - } + void _lcd_zoffset_overlay_gfx(const float in_zoffset) { + // Determine whether the user is raising or lowering the nozzle. + int8_t dir = 0; + static float old_zprobe_zoffset = 0; + if (in_zoffset != old_zprobe_zoffset) { + dir = (in_zoffset > old_zprobe_zoffset) ? 1 : (in_zoffset == 0) ? 0 : -1; + old_zprobe_zoffset = in_zoffset; } - #endif // BABYSTEP_ZPROBE_GFX_OVERLAY + #if ENABLED(BABYSTEP_ZPROBE_GFX_REVERSE) + const unsigned char *rot_up = ccw_bmp; + const unsigned char *rot_down = cw_bmp; + #else + const unsigned char *rot_up = cw_bmp; + const unsigned char *rot_down = ccw_bmp; + #endif + + #if ENABLED(USE_BIG_EDIT_FONT) + const int left = 0, right = 45, nozzle = 95; + #else + const int left = 5, right = 90, nozzle = 60; + #endif + + // Draw a representation of the nozzle + if (PAGE_CONTAINS(3, 16)) u8g.drawBitmapP(nozzle + 6, 4 - dir, 2, 12, nozzle_bmp); + if (PAGE_CONTAINS(20, 20)) u8g.drawBitmapP(nozzle + 0, 20, 3, 1, offset_bedline_bmp); + + // Draw cw/ccw indicator and up/down arrows. + if (PAGE_CONTAINS(47,62)) { + u8g.drawBitmapP(left + 0, 47, 3, 16, rot_down); + u8g.drawBitmapP(right + 0, 47, 3, 16, rot_up); + u8g.drawBitmapP(right + 20, 48 - dir, 2, 13, up_arrow_bmp); + u8g.drawBitmapP(left + 20, 49 - dir, 2, 13, down_arrow_bmp); + } + } + + #endif // BABYSTEP_ZPROBE_GFX_OVERLAY || ENABLE_MESH_EDIT_GFX_OVERLAY + + #if ENABLED(BABYSTEP_ZPROBE_OFFSET) void lcd_babystep_zoffset() { if (lcd_clicked) { return lcd_goto_previous_menu_no_defer(); } @@ -1121,7 +1121,7 @@ void kill_screen(const char* lcd_msg) { if (lcdDrawUpdate) { lcd_implementation_drawedit(PSTR(MSG_ZPROBE_ZOFFSET), ftostr43sign(zprobe_zoffset)); #if ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY) - _lcd_babystep_zoffset_overlay(zprobe_zoffset); + _lcd_zoffset_overlay_gfx(zprobe_zoffset); #endif } } @@ -1158,6 +1158,9 @@ void kill_screen(const char* lcd_msg) { if (lcdDrawUpdate) lcd_implementation_drawedit(msg, ftostr43sign(mesh_edit_value)); + #if ENABLED(ENABLE_MESH_EDIT_GFX_OVERLAY) + _lcd_zoffset_overlay_gfx(mesh_edit_value); + #endif } void _lcd_mesh_edit_NOP() { From 8181220bfd82884288a94376245c957fcd73bc3c Mon Sep 17 00:00:00 2001 From: studiodyne Date: Mon, 23 Oct 2017 16:34:16 +0200 Subject: [PATCH 09/20] Fix position sync in M600 pause/resume --- Marlin/src/feature/pause.cpp | 49 ++++++++++++++---------------------- 1 file changed, 19 insertions(+), 30 deletions(-) diff --git a/Marlin/src/feature/pause.cpp b/Marlin/src/feature/pause.cpp index c1bc4057f9..54ac5488b3 100644 --- a/Marlin/src/feature/pause.cpp +++ b/Marlin/src/feature/pause.cpp @@ -93,16 +93,21 @@ static void ensure_safe_temperature() { } } +void do_pause_e_move(const float &length, const float fr) { + current_position[E_AXIS] += length; + set_destination_from_current(); + #if IS_KINEMATIC + planner.buffer_line_kinematic(destination, fr, active_extruder); + #else + line_to_destination(fr); + #endif + stepper.synchronize(); +} + // public: bool move_away_flag = false; -#if IS_KINEMATIC - #define RUNPLAN(RATE_MM_S) planner.buffer_line_kinematic(destination, RATE_MM_S, active_extruder) -#else - #define RUNPLAN(RATE_MM_S) line_to_destination(RATE_MM_S) -#endif - bool pause_print(const float &retract, const float &z_lift, const float &x_pos, const float &y_pos, const float &unload_length/*=0*/ , const int8_t max_beep_count/*=0*/, const bool show_lcd/*=false*/ ) { @@ -140,17 +145,11 @@ bool pause_print(const float &retract, const float &z_lift, const float &x_pos, #endif } - // Save current position stepper.synchronize(); - COPY(resume_position, current_position); + COPY(resume_position, current_position); // Save current position for later - if (retract) { - // Initial retract before move to filament change position - set_destination_from_current(); - destination[E_AXIS] += retract; - RUNPLAN(PAUSE_PARK_RETRACT_FEEDRATE); - stepper.synchronize(); - } + // Initial retract before move to filament change position + if (retract) do_pause_e_move(retract, PAUSE_PARK_RETRACT_FEEDRATE); // Lift Z axis if (z_lift > 0) @@ -168,10 +167,7 @@ bool pause_print(const float &retract, const float &z_lift, const float &x_pos, } // Unload filament - set_destination_from_current(); - destination[E_AXIS] += unload_length; - RUNPLAN(FILAMENT_CHANGE_UNLOAD_FEEDRATE); - stepper.synchronize(); + do_pause_e_move(unload_length, FILAMENT_CHANGE_UNLOAD_FEEDRATE); } if (show_lcd) { @@ -272,8 +268,6 @@ void resume_print(const float &load_length/*=0*/, const float &initial_extrude_l filament_change_beep(max_beep_count, true); #endif - set_destination_from_current(); - if (load_length != 0) { #if ENABLED(ULTIPANEL) // Show "insert filament" @@ -297,9 +291,7 @@ void resume_print(const float &load_length/*=0*/, const float &initial_extrude_l #endif // Load filament - destination[E_AXIS] += load_length; - RUNPLAN(FILAMENT_CHANGE_LOAD_FEEDRATE); - stepper.synchronize(); + do_pause_e_move(load_length, FILAMENT_CHANGE_LOAD_FEEDRATE); } #if ENABLED(ULTIPANEL) && ADVANCED_PAUSE_EXTRUDE_LENGTH > 0 @@ -312,9 +304,7 @@ void resume_print(const float &load_length/*=0*/, const float &initial_extrude_l lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_EXTRUDE); // Extrude filament to get into hotend - destination[E_AXIS] += extrude_length; - RUNPLAN(ADVANCED_PAUSE_EXTRUDE_FEEDRATE); - stepper.synchronize(); + do_pause_e_move(extrude_length, ADVANCED_PAUSE_EXTRUDE_FEEDRATE); } // Show "Extrude More" / "Resume" menu and wait for reply @@ -337,8 +327,7 @@ void resume_print(const float &load_length/*=0*/, const float &initial_extrude_l #endif // Set extruder to saved position - destination[E_AXIS] = current_position[E_AXIS] = resume_position[E_AXIS]; - planner.set_e_position_mm(current_position[E_AXIS]); + planner.set_e_position_mm((current_position[E_AXIS] = resume_position[E_AXIS])); // Move XY to starting position, then Z do_blocking_move_to_xy(resume_position[X_AXIS], resume_position[Y_AXIS], PAUSE_PARK_XY_FEEDRATE); @@ -349,7 +338,7 @@ void resume_print(const float &load_length/*=0*/, const float &initial_extrude_l #endif #if ENABLED(ULTIPANEL) - // Show status screen + // Show pause status screen lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_STATUS); #endif From 272f9f65dce0218fdd8344612fdc000d7d46247e Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 24 Oct 2017 14:13:42 -0500 Subject: [PATCH 10/20] Fix some typos --- Marlin/src/lcd/ultralcd_impl_HD44780.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/src/lcd/ultralcd_impl_HD44780.h b/Marlin/src/lcd/ultralcd_impl_HD44780.h index b9b14cc1bb..b835583e99 100644 --- a/Marlin/src/lcd/ultralcd_impl_HD44780.h +++ b/Marlin/src/lcd/ultralcd_impl_HD44780.h @@ -713,10 +713,10 @@ static void lcd_implementation_status_screen() { lcd.setCursor(8, 0); #if HOTENDS > 1 - lcd.print((CHAR)LCD_STR_THERMOMETER[0]); + lcd.print((char)LCD_STR_THERMOMETER[0]); _draw_heater_status(1, -1, blink); #else - lcd.print((CHAR)LCD_BEDTEMP_CHAR); + lcd.print((char)LCD_BEDTEMP_CHAR); _draw_heater_status(-1, -1, blink); #endif From 5f8732453634c8201b16d3cbb44a94c57a0c45bb Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 22 Oct 2017 16:15:29 -0500 Subject: [PATCH 11/20] Fix some config verbiage --- Marlin/Configuration.h | 36 ++++++++-------- Marlin/src/config/default/Configuration.h | 36 ++++++++-------- .../AlephObjects/TAZ4/Configuration.h | 36 ++++++++-------- .../AliExpress/CL-260/Configuration.h | 36 ++++++++-------- .../config/examples/Anet/A6/Configuration.h | 36 ++++++++-------- .../config/examples/Anet/A8/Configuration.h | 36 ++++++++-------- .../examples/BQ/Hephestos/Configuration.h | 36 ++++++++-------- .../examples/BQ/Hephestos_2/Configuration.h | 36 ++++++++-------- .../config/examples/BQ/WITBOX/Configuration.h | 36 ++++++++-------- .../config/examples/Cartesio/Configuration.h | 36 ++++++++-------- .../examples/Creality/CR-10/Configuration.h | 36 ++++++++-------- .../src/config/examples/Felix/Configuration.h | 36 ++++++++-------- .../examples/Felix/DUAL/Configuration.h | 36 ++++++++-------- .../Folger Tech/i3-2020/Configuration.h | 36 ++++++++-------- .../examples/Geeetech/GT2560/Configuration.h | 36 ++++++++-------- .../Geeetech/I3_Pro_X-GT2560/Configuration.h | 36 ++++++++-------- .../examples/Infitary/i3-M508/Configuration.h | 36 ++++++++-------- .../examples/Malyan/M150/Configuration.h | 36 ++++++++-------- .../Micromake/C1/basic/Configuration.h | 36 ++++++++-------- .../Micromake/C1/enhanced/Configuration.h | 36 ++++++++-------- .../config/examples/Mks/Sbase/Configuration.h | 41 +++++++++++-------- .../RepRapWorld/Megatronics/Configuration.h | 36 ++++++++-------- .../config/examples/RigidBot/Configuration.h | 36 ++++++++-------- .../src/config/examples/SCARA/Configuration.h | 36 ++++++++-------- .../examples/Sanguinololu/Configuration.h | 36 ++++++++-------- .../config/examples/TinyBoy2/Configuration.h | 36 ++++++++-------- .../examples/Velleman/K8200/Configuration.h | 36 ++++++++-------- .../examples/Velleman/K8400/Configuration.h | 36 ++++++++-------- .../Velleman/K8400/Dual-head/Configuration.h | 36 ++++++++-------- .../examples/adafruit/ST7565/Configuration.h | 36 ++++++++-------- .../FLSUN/auto_calibrate/Configuration.h | 36 ++++++++-------- .../delta/FLSUN/kossel_mini/Configuration.h | 36 ++++++++-------- .../examples/delta/generic/Configuration.h | 36 ++++++++-------- .../delta/kossel_mini/Configuration.h | 36 ++++++++-------- .../examples/delta/kossel_pro/Configuration.h | 36 ++++++++-------- .../examples/delta/kossel_xl/Configuration.h | 36 ++++++++-------- .../examples/gCreate/gMax1.5+/Configuration.h | 36 ++++++++-------- .../config/examples/makibox/Configuration.h | 36 ++++++++-------- .../examples/stm32f103ret6/Configuration.h | 28 ++++++------- .../examples/tvrrug/Round2/Configuration.h | 36 ++++++++-------- .../src/config/examples/wt150/Configuration.h | 36 ++++++++-------- 41 files changed, 741 insertions(+), 732 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 8739e626a7..001bf84f10 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -1610,17 +1610,17 @@ * Adds the M150 command to set the LED (or LED strip) color. * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of * luminance values can be set from 0 to 255. - * For Neopixel LED overall brightness parameters is also available + * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** * LED Strips require a MOFSET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! - * Neopixel LED is 5V powered, but linear 5V regulator on Arduino - * cannot handle the current, separate 5V power supply must be used + * NOTE: A separate 5V power supply is required! The Neopixel LED needs + * more current than the Arduino 5V linear regulator can produce. * *** CAUTION *** * - * LED type. This options are mutualy exclusive. Uncomment only one. + * LED Type. Enable only one of the following two options. * */ @@ -1636,10 +1636,10 @@ // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) - #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h) + #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) - #define NEOPIXEL_PIXELS 30 // Number of LEDs on strip - #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Comment out for all LEDs to change at once. + #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip + #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 255 // Initial brightness 0-255 //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup #endif @@ -1659,18 +1659,18 @@ #define PRINTER_EVENT_LEDS #endif -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ +/** + * R/C SERVO support + * Sponsored by TrinityLabs, Reworked by codexmas + */ -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// +/** + * Number of servos + * + * For some servo-related options NUM_SERVOS will be set automatically. + * Set this manually if there are extra servos needing manual control. + * Leave undefined or set to 0 to entirely disable the servo subsystem. + */ //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle. diff --git a/Marlin/src/config/default/Configuration.h b/Marlin/src/config/default/Configuration.h index 20556e064d..a3332428e2 100644 --- a/Marlin/src/config/default/Configuration.h +++ b/Marlin/src/config/default/Configuration.h @@ -1610,17 +1610,17 @@ * Adds the M150 command to set the LED (or LED strip) color. * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of * luminance values can be set from 0 to 255. - * For Neopixel LED overall brightness parameters is also available + * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** * LED Strips require a MOFSET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! - * Neopixel LED is 5V powered, but linear 5V regulator on Arduino - * cannot handle the current, separate 5V power supply must be used + * NOTE: A separate 5V power supply is required! The Neopixel LED needs + * more current than the Arduino 5V linear regulator can produce. * *** CAUTION *** * - * LED type. This options are mutualy exclusive. Uncomment only one. + * LED Type. Enable only one of the following two options. * */ @@ -1636,10 +1636,10 @@ // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) - #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h) + #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) - #define NEOPIXEL_PIXELS 30 // Number of LEDs on strip - #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Comment out for all LEDs to change at once. + #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip + #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 255 // Initial brightness 0-255 //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup #endif @@ -1659,18 +1659,18 @@ #define PRINTER_EVENT_LEDS #endif -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ +/** + * R/C SERVO support + * Sponsored by TrinityLabs, Reworked by codexmas + */ -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// +/** + * Number of servos + * + * For some servo-related options NUM_SERVOS will be set automatically. + * Set this manually if there are extra servos needing manual control. + * Leave undefined or set to 0 to entirely disable the servo subsystem. + */ //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle. diff --git a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h index 69a3c1e8ac..e0cf752e47 100644 --- a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h +++ b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h @@ -1630,17 +1630,17 @@ * Adds the M150 command to set the LED (or LED strip) color. * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of * luminance values can be set from 0 to 255. - * For Neopixel LED overall brightness parameters is also available + * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** * LED Strips require a MOFSET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! - * Neopixel LED is 5V powered, but linear 5V regulator on Arduino - * cannot handle the current, separate 5V power supply must be used + * NOTE: A separate 5V power supply is required! The Neopixel LED needs + * more current than the Arduino 5V linear regulator can produce. * *** CAUTION *** * - * LED type. This options are mutualy exclusive. Uncomment only one. + * LED Type. Enable only one of the following two options. * */ @@ -1656,10 +1656,10 @@ // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) - #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h) + #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) - #define NEOPIXEL_PIXELS 30 // Number of LEDs on strip - #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Comment out for all LEDs to change at once. + #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip + #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 255 // Initial brightness 0-255 //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup #endif @@ -1679,18 +1679,18 @@ #define PRINTER_EVENT_LEDS #endif -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ +/** + * R/C SERVO support + * Sponsored by TrinityLabs, Reworked by codexmas + */ -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// +/** + * Number of servos + * + * For some servo-related options NUM_SERVOS will be set automatically. + * Set this manually if there are extra servos needing manual control. + * Leave undefined or set to 0 to entirely disable the servo subsystem. + */ //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle. diff --git a/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h b/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h index 4f6ac38ea3..c542d9edea 100644 --- a/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h +++ b/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h @@ -1610,17 +1610,17 @@ * Adds the M150 command to set the LED (or LED strip) color. * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of * luminance values can be set from 0 to 255. - * For Neopixel LED overall brightness parameters is also available + * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** * LED Strips require a MOFSET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! - * Neopixel LED is 5V powered, but linear 5V regulator on Arduino - * cannot handle the current, separate 5V power supply must be used + * NOTE: A separate 5V power supply is required! The Neopixel LED needs + * more current than the Arduino 5V linear regulator can produce. * *** CAUTION *** * - * LED type. This options are mutualy exclusive. Uncomment only one. + * LED Type. Enable only one of the following two options. * */ @@ -1636,10 +1636,10 @@ // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) - #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h) + #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) - #define NEOPIXEL_PIXELS 30 // Number of LEDs on strip - #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Comment out for all LEDs to change at once. + #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip + #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 255 // Initial brightness 0-255 //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup #endif @@ -1659,18 +1659,18 @@ #define PRINTER_EVENT_LEDS #endif -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ +/** + * R/C SERVO support + * Sponsored by TrinityLabs, Reworked by codexmas + */ -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// +/** + * Number of servos + * + * For some servo-related options NUM_SERVOS will be set automatically. + * Set this manually if there are extra servos needing manual control. + * Leave undefined or set to 0 to entirely disable the servo subsystem. + */ //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle. diff --git a/Marlin/src/config/examples/Anet/A6/Configuration.h b/Marlin/src/config/examples/Anet/A6/Configuration.h index c745c0f31f..cf58375fb3 100644 --- a/Marlin/src/config/examples/Anet/A6/Configuration.h +++ b/Marlin/src/config/examples/Anet/A6/Configuration.h @@ -1769,17 +1769,17 @@ * Adds the M150 command to set the LED (or LED strip) color. * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of * luminance values can be set from 0 to 255. - * For Neopixel LED overall brightness parameters is also available + * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** * LED Strips require a MOFSET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! - * Neopixel LED is 5V powered, but linear 5V regulator on Arduino - * cannot handle the current, separate 5V power supply must be used + * NOTE: A separate 5V power supply is required! The Neopixel LED needs + * more current than the Arduino 5V linear regulator can produce. * *** CAUTION *** * - * LED type. This options are mutualy exclusive. Uncomment only one. + * LED Type. Enable only one of the following two options. * */ @@ -1795,10 +1795,10 @@ // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) - #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h) + #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) - #define NEOPIXEL_PIXELS 30 // Number of LEDs on strip - #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Comment out for all LEDs to change at once. + #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip + #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 255 // Initial brightness 0-255 //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup #endif @@ -1818,18 +1818,18 @@ #define PRINTER_EVENT_LEDS #endif -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ +/** + * R/C SERVO support + * Sponsored by TrinityLabs, Reworked by codexmas + */ -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// +/** + * Number of servos + * + * For some servo-related options NUM_SERVOS will be set automatically. + * Set this manually if there are extra servos needing manual control. + * Leave undefined or set to 0 to entirely disable the servo subsystem. + */ //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle. diff --git a/Marlin/src/config/examples/Anet/A8/Configuration.h b/Marlin/src/config/examples/Anet/A8/Configuration.h index 36d9164863..b9dc8deb41 100644 --- a/Marlin/src/config/examples/Anet/A8/Configuration.h +++ b/Marlin/src/config/examples/Anet/A8/Configuration.h @@ -1618,17 +1618,17 @@ * Adds the M150 command to set the LED (or LED strip) color. * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of * luminance values can be set from 0 to 255. - * For Neopixel LED overall brightness parameters is also available + * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** * LED Strips require a MOFSET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! - * Neopixel LED is 5V powered, but linear 5V regulator on Arduino - * cannot handle the current, separate 5V power supply must be used + * NOTE: A separate 5V power supply is required! The Neopixel LED needs + * more current than the Arduino 5V linear regulator can produce. * *** CAUTION *** * - * LED type. This options are mutualy exclusive. Uncomment only one. + * LED Type. Enable only one of the following two options. * */ @@ -1644,10 +1644,10 @@ // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) - #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h) + #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) - #define NEOPIXEL_PIXELS 30 // Number of LEDs on strip - #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Comment out for all LEDs to change at once. + #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip + #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 255 // Initial brightness 0-255 //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup #endif @@ -1667,18 +1667,18 @@ #define PRINTER_EVENT_LEDS #endif -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ +/** + * R/C SERVO support + * Sponsored by TrinityLabs, Reworked by codexmas + */ -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// +/** + * Number of servos + * + * For some servo-related options NUM_SERVOS will be set automatically. + * Set this manually if there are extra servos needing manual control. + * Leave undefined or set to 0 to entirely disable the servo subsystem. + */ //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle. diff --git a/Marlin/src/config/examples/BQ/Hephestos/Configuration.h b/Marlin/src/config/examples/BQ/Hephestos/Configuration.h index 84e7d5a052..bde9a8c9c4 100644 --- a/Marlin/src/config/examples/BQ/Hephestos/Configuration.h +++ b/Marlin/src/config/examples/BQ/Hephestos/Configuration.h @@ -1601,17 +1601,17 @@ * Adds the M150 command to set the LED (or LED strip) color. * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of * luminance values can be set from 0 to 255. - * For Neopixel LED overall brightness parameters is also available + * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** * LED Strips require a MOFSET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! - * Neopixel LED is 5V powered, but linear 5V regulator on Arduino - * cannot handle the current, separate 5V power supply must be used + * NOTE: A separate 5V power supply is required! The Neopixel LED needs + * more current than the Arduino 5V linear regulator can produce. * *** CAUTION *** * - * LED type. This options are mutualy exclusive. Uncomment only one. + * LED Type. Enable only one of the following two options. * */ @@ -1627,10 +1627,10 @@ // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) - #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h) + #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) - #define NEOPIXEL_PIXELS 30 // Number of LEDs on strip - #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Comment out for all LEDs to change at once. + #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip + #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 255 // Initial brightness 0-255 //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup #endif @@ -1650,18 +1650,18 @@ #define PRINTER_EVENT_LEDS #endif -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ +/** + * R/C SERVO support + * Sponsored by TrinityLabs, Reworked by codexmas + */ -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// +/** + * Number of servos + * + * For some servo-related options NUM_SERVOS will be set automatically. + * Set this manually if there are extra servos needing manual control. + * Leave undefined or set to 0 to entirely disable the servo subsystem. + */ //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle. diff --git a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h index f5621c3572..960e8c5190 100644 --- a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h +++ b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h @@ -1611,17 +1611,17 @@ * Adds the M150 command to set the LED (or LED strip) color. * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of * luminance values can be set from 0 to 255. - * For Neopixel LED overall brightness parameters is also available + * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** * LED Strips require a MOFSET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! - * Neopixel LED is 5V powered, but linear 5V regulator on Arduino - * cannot handle the current, separate 5V power supply must be used + * NOTE: A separate 5V power supply is required! The Neopixel LED needs + * more current than the Arduino 5V linear regulator can produce. * *** CAUTION *** * - * LED type. This options are mutualy exclusive. Uncomment only one. + * LED Type. Enable only one of the following two options. * */ @@ -1637,10 +1637,10 @@ // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) - #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h) + #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) - #define NEOPIXEL_PIXELS 30 // Number of LEDs on strip - #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Comment out for all LEDs to change at once. + #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip + #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 255 // Initial brightness 0-255 //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup #endif @@ -1660,18 +1660,18 @@ #define PRINTER_EVENT_LEDS #endif -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ +/** + * R/C SERVO support + * Sponsored by TrinityLabs, Reworked by codexmas + */ -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// +/** + * Number of servos + * + * For some servo-related options NUM_SERVOS will be set automatically. + * Set this manually if there are extra servos needing manual control. + * Leave undefined or set to 0 to entirely disable the servo subsystem. + */ //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle. diff --git a/Marlin/src/config/examples/BQ/WITBOX/Configuration.h b/Marlin/src/config/examples/BQ/WITBOX/Configuration.h index fba10b149c..5f4a9680d5 100644 --- a/Marlin/src/config/examples/BQ/WITBOX/Configuration.h +++ b/Marlin/src/config/examples/BQ/WITBOX/Configuration.h @@ -1601,17 +1601,17 @@ * Adds the M150 command to set the LED (or LED strip) color. * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of * luminance values can be set from 0 to 255. - * For Neopixel LED overall brightness parameters is also available + * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** * LED Strips require a MOFSET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! - * Neopixel LED is 5V powered, but linear 5V regulator on Arduino - * cannot handle the current, separate 5V power supply must be used + * NOTE: A separate 5V power supply is required! The Neopixel LED needs + * more current than the Arduino 5V linear regulator can produce. * *** CAUTION *** * - * LED type. This options are mutualy exclusive. Uncomment only one. + * LED Type. Enable only one of the following two options. * */ @@ -1627,10 +1627,10 @@ // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) - #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h) + #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) - #define NEOPIXEL_PIXELS 30 // Number of LEDs on strip - #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Comment out for all LEDs to change at once. + #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip + #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 255 // Initial brightness 0-255 //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup #endif @@ -1650,18 +1650,18 @@ #define PRINTER_EVENT_LEDS #endif -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ +/** + * R/C SERVO support + * Sponsored by TrinityLabs, Reworked by codexmas + */ -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// +/** + * Number of servos + * + * For some servo-related options NUM_SERVOS will be set automatically. + * Set this manually if there are extra servos needing manual control. + * Leave undefined or set to 0 to entirely disable the servo subsystem. + */ //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle. diff --git a/Marlin/src/config/examples/Cartesio/Configuration.h b/Marlin/src/config/examples/Cartesio/Configuration.h index 7b94aa253f..553186f714 100644 --- a/Marlin/src/config/examples/Cartesio/Configuration.h +++ b/Marlin/src/config/examples/Cartesio/Configuration.h @@ -1609,17 +1609,17 @@ * Adds the M150 command to set the LED (or LED strip) color. * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of * luminance values can be set from 0 to 255. - * For Neopixel LED overall brightness parameters is also available + * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** * LED Strips require a MOFSET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! - * Neopixel LED is 5V powered, but linear 5V regulator on Arduino - * cannot handle the current, separate 5V power supply must be used + * NOTE: A separate 5V power supply is required! The Neopixel LED needs + * more current than the Arduino 5V linear regulator can produce. * *** CAUTION *** * - * LED type. This options are mutualy exclusive. Uncomment only one. + * LED Type. Enable only one of the following two options. * */ @@ -1635,10 +1635,10 @@ // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) - #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h) + #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) - #define NEOPIXEL_PIXELS 30 // Number of LEDs on strip - #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Comment out for all LEDs to change at once. + #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip + #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 255 // Initial brightness 0-255 //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup #endif @@ -1658,18 +1658,18 @@ #define PRINTER_EVENT_LEDS #endif -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ +/** + * R/C SERVO support + * Sponsored by TrinityLabs, Reworked by codexmas + */ -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// +/** + * Number of servos + * + * For some servo-related options NUM_SERVOS will be set automatically. + * Set this manually if there are extra servos needing manual control. + * Leave undefined or set to 0 to entirely disable the servo subsystem. + */ //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle. diff --git a/Marlin/src/config/examples/Creality/CR-10/Configuration.h b/Marlin/src/config/examples/Creality/CR-10/Configuration.h index 49cb146f45..617a289ccd 100755 --- a/Marlin/src/config/examples/Creality/CR-10/Configuration.h +++ b/Marlin/src/config/examples/Creality/CR-10/Configuration.h @@ -1620,17 +1620,17 @@ * Adds the M150 command to set the LED (or LED strip) color. * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of * luminance values can be set from 0 to 255. - * For Neopixel LED overall brightness parameters is also available + * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** * LED Strips require a MOFSET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! - * Neopixel LED is 5V powered, but linear 5V regulator on Arduino - * cannot handle the current, separate 5V power supply must be used + * NOTE: A separate 5V power supply is required! The Neopixel LED needs + * more current than the Arduino 5V linear regulator can produce. * *** CAUTION *** * - * LED type. This options are mutualy exclusive. Uncomment only one. + * LED Type. Enable only one of the following two options. * */ @@ -1646,10 +1646,10 @@ // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) - #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h) + #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) - #define NEOPIXEL_PIXELS 30 // Number of LEDs on strip - #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Comment out for all LEDs to change at once. + #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip + #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 255 // Initial brightness 0-255 //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup #endif @@ -1669,18 +1669,18 @@ #define PRINTER_EVENT_LEDS #endif -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ +/** + * R/C SERVO support + * Sponsored by TrinityLabs, Reworked by codexmas + */ -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// +/** + * Number of servos + * + * For some servo-related options NUM_SERVOS will be set automatically. + * Set this manually if there are extra servos needing manual control. + * Leave undefined or set to 0 to entirely disable the servo subsystem. + */ //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle. diff --git a/Marlin/src/config/examples/Felix/Configuration.h b/Marlin/src/config/examples/Felix/Configuration.h index b86d47b58c..b902b58258 100644 --- a/Marlin/src/config/examples/Felix/Configuration.h +++ b/Marlin/src/config/examples/Felix/Configuration.h @@ -1592,17 +1592,17 @@ * Adds the M150 command to set the LED (or LED strip) color. * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of * luminance values can be set from 0 to 255. - * For Neopixel LED overall brightness parameters is also available + * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** * LED Strips require a MOFSET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! - * Neopixel LED is 5V powered, but linear 5V regulator on Arduino - * cannot handle the current, separate 5V power supply must be used + * NOTE: A separate 5V power supply is required! The Neopixel LED needs + * more current than the Arduino 5V linear regulator can produce. * *** CAUTION *** * - * LED type. This options are mutualy exclusive. Uncomment only one. + * LED Type. Enable only one of the following two options. * */ @@ -1618,10 +1618,10 @@ // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) - #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h) + #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) - #define NEOPIXEL_PIXELS 30 // Number of LEDs on strip - #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Comment out for all LEDs to change at once. + #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip + #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 255 // Initial brightness 0-255 //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup #endif @@ -1641,18 +1641,18 @@ #define PRINTER_EVENT_LEDS #endif -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ +/** + * R/C SERVO support + * Sponsored by TrinityLabs, Reworked by codexmas + */ -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// +/** + * Number of servos + * + * For some servo-related options NUM_SERVOS will be set automatically. + * Set this manually if there are extra servos needing manual control. + * Leave undefined or set to 0 to entirely disable the servo subsystem. + */ //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle. diff --git a/Marlin/src/config/examples/Felix/DUAL/Configuration.h b/Marlin/src/config/examples/Felix/DUAL/Configuration.h index 397f59e8f2..0f61b9b8cd 100644 --- a/Marlin/src/config/examples/Felix/DUAL/Configuration.h +++ b/Marlin/src/config/examples/Felix/DUAL/Configuration.h @@ -1592,17 +1592,17 @@ * Adds the M150 command to set the LED (or LED strip) color. * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of * luminance values can be set from 0 to 255. - * For Neopixel LED overall brightness parameters is also available + * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** * LED Strips require a MOFSET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! - * Neopixel LED is 5V powered, but linear 5V regulator on Arduino - * cannot handle the current, separate 5V power supply must be used + * NOTE: A separate 5V power supply is required! The Neopixel LED needs + * more current than the Arduino 5V linear regulator can produce. * *** CAUTION *** * - * LED type. This options are mutualy exclusive. Uncomment only one. + * LED Type. Enable only one of the following two options. * */ @@ -1618,10 +1618,10 @@ // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) - #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h) + #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) - #define NEOPIXEL_PIXELS 30 // Number of LEDs on strip - #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Comment out for all LEDs to change at once. + #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip + #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 255 // Initial brightness 0-255 //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup #endif @@ -1641,18 +1641,18 @@ #define PRINTER_EVENT_LEDS #endif -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ +/** + * R/C SERVO support + * Sponsored by TrinityLabs, Reworked by codexmas + */ -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// +/** + * Number of servos + * + * For some servo-related options NUM_SERVOS will be set automatically. + * Set this manually if there are extra servos needing manual control. + * Leave undefined or set to 0 to entirely disable the servo subsystem. + */ //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle. diff --git a/Marlin/src/config/examples/Folger Tech/i3-2020/Configuration.h b/Marlin/src/config/examples/Folger Tech/i3-2020/Configuration.h index 0d5d0ebc21..063c522bc2 100644 --- a/Marlin/src/config/examples/Folger Tech/i3-2020/Configuration.h +++ b/Marlin/src/config/examples/Folger Tech/i3-2020/Configuration.h @@ -1607,17 +1607,17 @@ * Adds the M150 command to set the LED (or LED strip) color. * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of * luminance values can be set from 0 to 255. - * For Neopixel LED overall brightness parameters is also available + * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** * LED Strips require a MOFSET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! - * Neopixel LED is 5V powered, but linear 5V regulator on Arduino - * cannot handle the current, separate 5V power supply must be used + * NOTE: A separate 5V power supply is required! The Neopixel LED needs + * more current than the Arduino 5V linear regulator can produce. * *** CAUTION *** * - * LED type. This options are mutualy exclusive. Uncomment only one. + * LED Type. Enable only one of the following two options. * */ @@ -1633,10 +1633,10 @@ // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) - #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h) + #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) - #define NEOPIXEL_PIXELS 30 // Number of LEDs on strip - #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Comment out for all LEDs to change at once. + #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip + #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 255 // Initial brightness 0-255 //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup #endif @@ -1656,18 +1656,18 @@ #define PRINTER_EVENT_LEDS #endif -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ +/** + * R/C SERVO support + * Sponsored by TrinityLabs, Reworked by codexmas + */ -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// +/** + * Number of servos + * + * For some servo-related options NUM_SERVOS will be set automatically. + * Set this manually if there are extra servos needing manual control. + * Leave undefined or set to 0 to entirely disable the servo subsystem. + */ #define NUM_SERVOS 1 // Servo index starts with 0 for M280 command // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle. diff --git a/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h b/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h index 11792c6356..a710ff1bdd 100644 --- a/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h +++ b/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h @@ -1625,17 +1625,17 @@ * Adds the M150 command to set the LED (or LED strip) color. * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of * luminance values can be set from 0 to 255. - * For Neopixel LED overall brightness parameters is also available + * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** * LED Strips require a MOFSET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! - * Neopixel LED is 5V powered, but linear 5V regulator on Arduino - * cannot handle the current, separate 5V power supply must be used + * NOTE: A separate 5V power supply is required! The Neopixel LED needs + * more current than the Arduino 5V linear regulator can produce. * *** CAUTION *** * - * LED type. This options are mutualy exclusive. Uncomment only one. + * LED Type. Enable only one of the following two options. * */ @@ -1651,10 +1651,10 @@ // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) - #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h) + #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) - #define NEOPIXEL_PIXELS 30 // Number of LEDs on strip - #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Comment out for all LEDs to change at once. + #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip + #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 255 // Initial brightness 0-255 //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup #endif @@ -1674,18 +1674,18 @@ #define PRINTER_EVENT_LEDS #endif -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ +/** + * R/C SERVO support + * Sponsored by TrinityLabs, Reworked by codexmas + */ -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// +/** + * Number of servos + * + * For some servo-related options NUM_SERVOS will be set automatically. + * Set this manually if there are extra servos needing manual control. + * Leave undefined or set to 0 to entirely disable the servo subsystem. + */ //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle. diff --git a/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h b/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h index b571715ec4..b70cc39fe0 100644 --- a/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h +++ b/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h @@ -1610,17 +1610,17 @@ * Adds the M150 command to set the LED (or LED strip) color. * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of * luminance values can be set from 0 to 255. - * For Neopixel LED overall brightness parameters is also available + * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** * LED Strips require a MOFSET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! - * Neopixel LED is 5V powered, but linear 5V regulator on Arduino - * cannot handle the current, separate 5V power supply must be used + * NOTE: A separate 5V power supply is required! The Neopixel LED needs + * more current than the Arduino 5V linear regulator can produce. * *** CAUTION *** * - * LED type. This options are mutualy exclusive. Uncomment only one. + * LED Type. Enable only one of the following two options. * */ @@ -1636,10 +1636,10 @@ // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) - #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h) + #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) - #define NEOPIXEL_PIXELS 30 // Number of LEDs on strip - #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Comment out for all LEDs to change at once. + #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip + #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 255 // Initial brightness 0-255 //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup #endif @@ -1659,18 +1659,18 @@ #define PRINTER_EVENT_LEDS #endif -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ +/** + * R/C SERVO support + * Sponsored by TrinityLabs, Reworked by codexmas + */ -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// +/** + * Number of servos + * + * For some servo-related options NUM_SERVOS will be set automatically. + * Set this manually if there are extra servos needing manual control. + * Leave undefined or set to 0 to entirely disable the servo subsystem. + */ #define NUM_SERVOS 1 // Servo index starts with 0 for M280 command // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle. diff --git a/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h b/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h index 59d4b07f4b..c590ba8de2 100644 --- a/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h +++ b/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h @@ -1614,17 +1614,17 @@ * Adds the M150 command to set the LED (or LED strip) color. * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of * luminance values can be set from 0 to 255. - * For Neopixel LED overall brightness parameters is also available + * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** * LED Strips require a MOFSET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! - * Neopixel LED is 5V powered, but linear 5V regulator on Arduino - * cannot handle the current, separate 5V power supply must be used + * NOTE: A separate 5V power supply is required! The Neopixel LED needs + * more current than the Arduino 5V linear regulator can produce. * *** CAUTION *** * - * LED type. This options are mutualy exclusive. Uncomment only one. + * LED Type. Enable only one of the following two options. * */ @@ -1640,10 +1640,10 @@ // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) - #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h) + #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) - #define NEOPIXEL_PIXELS 30 // Number of LEDs on strip - #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Comment out for all LEDs to change at once. + #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip + #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 255 // Initial brightness 0-255 //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup #endif @@ -1663,18 +1663,18 @@ #define PRINTER_EVENT_LEDS #endif -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ +/** + * R/C SERVO support + * Sponsored by TrinityLabs, Reworked by codexmas + */ -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// +/** + * Number of servos + * + * For some servo-related options NUM_SERVOS will be set automatically. + * Set this manually if there are extra servos needing manual control. + * Leave undefined or set to 0 to entirely disable the servo subsystem. + */ //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle. diff --git a/Marlin/src/config/examples/Malyan/M150/Configuration.h b/Marlin/src/config/examples/Malyan/M150/Configuration.h index 0e44acf4a7..a0fb50dd59 100644 --- a/Marlin/src/config/examples/Malyan/M150/Configuration.h +++ b/Marlin/src/config/examples/Malyan/M150/Configuration.h @@ -1638,17 +1638,17 @@ * Adds the M150 command to set the LED (or LED strip) color. * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of * luminance values can be set from 0 to 255. - * For Neopixel LED overall brightness parameters is also available + * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** * LED Strips require a MOFSET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! - * Neopixel LED is 5V powered, but linear 5V regulator on Arduino - * cannot handle the current, separate 5V power supply must be used + * NOTE: A separate 5V power supply is required! The Neopixel LED needs + * more current than the Arduino 5V linear regulator can produce. * *** CAUTION *** * - * LED type. This options are mutualy exclusive. Uncomment only one. + * LED Type. Enable only one of the following two options. * */ @@ -1664,10 +1664,10 @@ // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) - #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h) + #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) - #define NEOPIXEL_PIXELS 30 // Number of LEDs on strip - #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Comment out for all LEDs to change at once. + #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip + #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 255 // Initial brightness 0-255 //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup #endif @@ -1687,18 +1687,18 @@ #define PRINTER_EVENT_LEDS #endif -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ +/** + * R/C SERVO support + * Sponsored by TrinityLabs, Reworked by codexmas + */ -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// +/** + * Number of servos + * + * For some servo-related options NUM_SERVOS will be set automatically. + * Set this manually if there are extra servos needing manual control. + * Leave undefined or set to 0 to entirely disable the servo subsystem. + */ //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle. diff --git a/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h b/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h index f9d6dadbd6..91c6374887 100644 --- a/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h +++ b/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h @@ -1614,17 +1614,17 @@ * Adds the M150 command to set the LED (or LED strip) color. * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of * luminance values can be set from 0 to 255. - * For Neopixel LED overall brightness parameters is also available + * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** * LED Strips require a MOFSET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! - * The Neopixel LED is 5V powered, but linear 5V regulator on Arduino - * cannot handle such current, separate 5V power supply must be used + * NOTE: A separate 5V power supply is required! The Neopixel LED needs + * more current than the Arduino 5V linear regulator can produce. * *** CAUTION *** * - * LED type. This options are mutualy exclusive. Uncomment only one. + * LED Type. Enable only one of the following two options. * */ //#define RGB_LED @@ -1640,10 +1640,10 @@ // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) - #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h) + #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) - #define NEOPIXEL_PIXELS 30 // Number of LEDs on strip - #define NEOPIXEL_IS_SEQUENTIAL // Sequent display for temperature change - LED by LED. Comment out for change all LED at time + #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip + #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness 0-255 //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup #endif @@ -1663,18 +1663,18 @@ #define PRINTER_EVENT_LEDS #endif -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ +/** + * R/C SERVO support + * Sponsored by TrinityLabs, Reworked by codexmas + */ -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// +/** + * Number of servos + * + * For some servo-related options NUM_SERVOS will be set automatically. + * Set this manually if there are extra servos needing manual control. + * Leave undefined or set to 0 to entirely disable the servo subsystem. + */ //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle. diff --git a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h index 4e6ff500c0..6e6f091f65 100644 --- a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h +++ b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h @@ -1614,17 +1614,17 @@ * Adds the M150 command to set the LED (or LED strip) color. * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of * luminance values can be set from 0 to 255. - * For Neopixel LED overall brightness parameters is also available + * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** * LED Strips require a MOFSET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! - * The Neopixel LED is 5V powered, but linear 5V regulator on Arduino - * cannot handle such current, separate 5V power supply must be used + * NOTE: A separate 5V power supply is required! The Neopixel LED needs + * more current than the Arduino 5V linear regulator can produce. * *** CAUTION *** * - * LED type. This options are mutualy exclusive. Uncomment only one. + * LED Type. Enable only one of the following two options. * */ //#define RGB_LED @@ -1640,10 +1640,10 @@ // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) - #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h) + #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) - #define NEOPIXEL_PIXELS 30 // Number of LEDs on strip - #define NEOPIXEL_IS_SEQUENTIAL // Sequent display for temperature change - LED by LED. Comment out for change all LED at time + #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip + #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness 0-255 //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup #endif @@ -1663,18 +1663,18 @@ #define PRINTER_EVENT_LEDS #endif -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ +/** + * R/C SERVO support + * Sponsored by TrinityLabs, Reworked by codexmas + */ -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// +/** + * Number of servos + * + * For some servo-related options NUM_SERVOS will be set automatically. + * Set this manually if there are extra servos needing manual control. + * Leave undefined or set to 0 to entirely disable the servo subsystem. + */ //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle. diff --git a/Marlin/src/config/examples/Mks/Sbase/Configuration.h b/Marlin/src/config/examples/Mks/Sbase/Configuration.h index 603fc568a5..32bd88ba9d 100644 --- a/Marlin/src/config/examples/Mks/Sbase/Configuration.h +++ b/Marlin/src/config/examples/Mks/Sbase/Configuration.h @@ -1586,14 +1586,20 @@ * Adds the M150 command to set the LED (or LED strip) color. * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of * luminance values can be set from 0 to 255. + * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** * LED Strips require a MOFSET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! + * NOTE: A separate 5V power supply is required! The Neopixel LED needs + * more current than the Arduino 5V linear regulator can produce. * *** CAUTION *** * + * LED Type. Enable only one of the following two options. + * */ + //#define RGB_LED //#define RGBW_LED #if ENABLED(RGB_LED) || ENABLED(RGBW_LED) @@ -1604,11 +1610,14 @@ #endif // Support for Adafruit Neopixel LED driver -//#define NEOPIXEL_RGBW_LED -#if ENABLED(NEOPIXEL_RGBW_LED) - #define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard) - #define NEOPIXEL_PIXELS 3 - //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup +//#define NEOPIXEL_LED +#if ENABLED(NEOPIXEL_LED) + #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) + #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip + #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. + #define NEOPIXEL_BRIGHTNESS 255 // Initial brightness 0-255 + //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup #endif /** @@ -1626,18 +1635,18 @@ #define PRINTER_EVENT_LEDS #endif -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ +/** + * R/C SERVO support + * Sponsored by TrinityLabs, Reworked by codexmas + */ -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// +/** + * Number of servos + * + * For some servo-related options NUM_SERVOS will be set automatically. + * Set this manually if there are extra servos needing manual control. + * Leave undefined or set to 0 to entirely disable the servo subsystem. + */ //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle. diff --git a/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h b/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h index 57930875e7..b32f8006c0 100644 --- a/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h +++ b/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h @@ -1610,17 +1610,17 @@ * Adds the M150 command to set the LED (or LED strip) color. * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of * luminance values can be set from 0 to 255. - * For Neopixel LED overall brightness parameters is also available + * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** * LED Strips require a MOFSET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! - * Neopixel LED is 5V powered, but linear 5V regulator on Arduino - * cannot handle the current, separate 5V power supply must be used + * NOTE: A separate 5V power supply is required! The Neopixel LED needs + * more current than the Arduino 5V linear regulator can produce. * *** CAUTION *** * - * LED type. This options are mutualy exclusive. Uncomment only one. + * LED Type. Enable only one of the following two options. * */ @@ -1636,10 +1636,10 @@ // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) - #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h) + #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) - #define NEOPIXEL_PIXELS 30 // Number of LEDs on strip - #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Comment out for all LEDs to change at once. + #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip + #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 255 // Initial brightness 0-255 //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup #endif @@ -1659,18 +1659,18 @@ #define PRINTER_EVENT_LEDS #endif -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ +/** + * R/C SERVO support + * Sponsored by TrinityLabs, Reworked by codexmas + */ -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// +/** + * Number of servos + * + * For some servo-related options NUM_SERVOS will be set automatically. + * Set this manually if there are extra servos needing manual control. + * Leave undefined or set to 0 to entirely disable the servo subsystem. + */ //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle. diff --git a/Marlin/src/config/examples/RigidBot/Configuration.h b/Marlin/src/config/examples/RigidBot/Configuration.h index 86bb17a534..5c64a53572 100644 --- a/Marlin/src/config/examples/RigidBot/Configuration.h +++ b/Marlin/src/config/examples/RigidBot/Configuration.h @@ -1610,17 +1610,17 @@ * Adds the M150 command to set the LED (or LED strip) color. * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of * luminance values can be set from 0 to 255. - * For Neopixel LED overall brightness parameters is also available + * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** * LED Strips require a MOFSET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! - * Neopixel LED is 5V powered, but linear 5V regulator on Arduino - * cannot handle the current, separate 5V power supply must be used + * NOTE: A separate 5V power supply is required! The Neopixel LED needs + * more current than the Arduino 5V linear regulator can produce. * *** CAUTION *** * - * LED type. This options are mutualy exclusive. Uncomment only one. + * LED Type. Enable only one of the following two options. * */ @@ -1636,10 +1636,10 @@ // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) - #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h) + #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) - #define NEOPIXEL_PIXELS 30 // Number of LEDs on strip - #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Comment out for all LEDs to change at once. + #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip + #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 255 // Initial brightness 0-255 //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup #endif @@ -1659,18 +1659,18 @@ #define PRINTER_EVENT_LEDS #endif -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ +/** + * R/C SERVO support + * Sponsored by TrinityLabs, Reworked by codexmas + */ -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// +/** + * Number of servos + * + * For some servo-related options NUM_SERVOS will be set automatically. + * Set this manually if there are extra servos needing manual control. + * Leave undefined or set to 0 to entirely disable the servo subsystem. + */ //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle. diff --git a/Marlin/src/config/examples/SCARA/Configuration.h b/Marlin/src/config/examples/SCARA/Configuration.h index f5f16c6232..e2251f4f7e 100644 --- a/Marlin/src/config/examples/SCARA/Configuration.h +++ b/Marlin/src/config/examples/SCARA/Configuration.h @@ -1622,17 +1622,17 @@ * Adds the M150 command to set the LED (or LED strip) color. * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of * luminance values can be set from 0 to 255. - * For Neopixel LED overall brightness parameters is also available + * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** * LED Strips require a MOFSET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! - * Neopixel LED is 5V powered, but linear 5V regulator on Arduino - * cannot handle the current, separate 5V power supply must be used + * NOTE: A separate 5V power supply is required! The Neopixel LED needs + * more current than the Arduino 5V linear regulator can produce. * *** CAUTION *** * - * LED type. This options are mutualy exclusive. Uncomment only one. + * LED Type. Enable only one of the following two options. * */ @@ -1648,10 +1648,10 @@ // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) - #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h) + #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) - #define NEOPIXEL_PIXELS 30 // Number of LEDs on strip - #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Comment out for all LEDs to change at once. + #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip + #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 255 // Initial brightness 0-255 //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup #endif @@ -1671,18 +1671,18 @@ #define PRINTER_EVENT_LEDS #endif -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ +/** + * R/C SERVO support + * Sponsored by TrinityLabs, Reworked by codexmas + */ -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// +/** + * Number of servos + * + * For some servo-related options NUM_SERVOS will be set automatically. + * Set this manually if there are extra servos needing manual control. + * Leave undefined or set to 0 to entirely disable the servo subsystem. + */ //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle. diff --git a/Marlin/src/config/examples/Sanguinololu/Configuration.h b/Marlin/src/config/examples/Sanguinololu/Configuration.h index f040c6874a..467d2c4582 100644 --- a/Marlin/src/config/examples/Sanguinololu/Configuration.h +++ b/Marlin/src/config/examples/Sanguinololu/Configuration.h @@ -1641,17 +1641,17 @@ * Adds the M150 command to set the LED (or LED strip) color. * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of * luminance values can be set from 0 to 255. - * For Neopixel LED overall brightness parameters is also available + * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** * LED Strips require a MOFSET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! - * Neopixel LED is 5V powered, but linear 5V regulator on Arduino - * cannot handle the current, separate 5V power supply must be used + * NOTE: A separate 5V power supply is required! The Neopixel LED needs + * more current than the Arduino 5V linear regulator can produce. * *** CAUTION *** * - * LED type. This options are mutualy exclusive. Uncomment only one. + * LED Type. Enable only one of the following two options. * */ @@ -1667,10 +1667,10 @@ // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) - #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h) + #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) - #define NEOPIXEL_PIXELS 30 // Number of LEDs on strip - #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Comment out for all LEDs to change at once. + #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip + #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 255 // Initial brightness 0-255 //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup #endif @@ -1690,18 +1690,18 @@ #define PRINTER_EVENT_LEDS #endif -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ +/** + * R/C SERVO support + * Sponsored by TrinityLabs, Reworked by codexmas + */ -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// +/** + * Number of servos + * + * For some servo-related options NUM_SERVOS will be set automatically. + * Set this manually if there are extra servos needing manual control. + * Leave undefined or set to 0 to entirely disable the servo subsystem. + */ //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle. diff --git a/Marlin/src/config/examples/TinyBoy2/Configuration.h b/Marlin/src/config/examples/TinyBoy2/Configuration.h index edef583f37..8cc92f15ae 100644 --- a/Marlin/src/config/examples/TinyBoy2/Configuration.h +++ b/Marlin/src/config/examples/TinyBoy2/Configuration.h @@ -1666,17 +1666,17 @@ * Adds the M150 command to set the LED (or LED strip) color. * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of * luminance values can be set from 0 to 255. - * For Neopixel LED overall brightness parameters is also available + * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** * LED Strips require a MOFSET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! - * Neopixel LED is 5V powered, but linear 5V regulator on Arduino - * cannot handle the current, separate 5V power supply must be used + * NOTE: A separate 5V power supply is required! The Neopixel LED needs + * more current than the Arduino 5V linear regulator can produce. * *** CAUTION *** * - * LED type. This options are mutualy exclusive. Uncomment only one. + * LED Type. Enable only one of the following two options. * */ @@ -1692,10 +1692,10 @@ // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) - #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h) + #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) - #define NEOPIXEL_PIXELS 30 // Number of LEDs on strip - #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Comment out for all LEDs to change at once. + #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip + #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 255 // Initial brightness 0-255 //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup #endif @@ -1715,18 +1715,18 @@ #define PRINTER_EVENT_LEDS #endif -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ +/** + * R/C SERVO support + * Sponsored by TrinityLabs, Reworked by codexmas + */ -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// +/** + * Number of servos + * + * For some servo-related options NUM_SERVOS will be set automatically. + * Set this manually if there are extra servos needing manual control. + * Leave undefined or set to 0 to entirely disable the servo subsystem. + */ //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle. diff --git a/Marlin/src/config/examples/Velleman/K8200/Configuration.h b/Marlin/src/config/examples/Velleman/K8200/Configuration.h index 3f1d7a1ec1..b8c42cc65c 100644 --- a/Marlin/src/config/examples/Velleman/K8200/Configuration.h +++ b/Marlin/src/config/examples/Velleman/K8200/Configuration.h @@ -1645,17 +1645,17 @@ * Adds the M150 command to set the LED (or LED strip) color. * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of * luminance values can be set from 0 to 255. - * For Neopixel LED overall brightness parameters is also available + * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** * LED Strips require a MOFSET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! - * Neopixel LED is 5V powered, but linear 5V regulator on Arduino - * cannot handle the current, separate 5V power supply must be used + * NOTE: A separate 5V power supply is required! The Neopixel LED needs + * more current than the Arduino 5V linear regulator can produce. * *** CAUTION *** * - * LED type. This options are mutualy exclusive. Uncomment only one. + * LED Type. Enable only one of the following two options. * */ @@ -1671,10 +1671,10 @@ // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) - #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h) + #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) - #define NEOPIXEL_PIXELS 30 // Number of LEDs on strip - #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Comment out for all LEDs to change at once. + #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip + #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 255 // Initial brightness 0-255 //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup #endif @@ -1694,18 +1694,18 @@ #define PRINTER_EVENT_LEDS #endif -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ +/** + * R/C SERVO support + * Sponsored by TrinityLabs, Reworked by codexmas + */ -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// +/** + * Number of servos + * + * For some servo-related options NUM_SERVOS will be set automatically. + * Set this manually if there are extra servos needing manual control. + * Leave undefined or set to 0 to entirely disable the servo subsystem. + */ //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle. diff --git a/Marlin/src/config/examples/Velleman/K8400/Configuration.h b/Marlin/src/config/examples/Velleman/K8400/Configuration.h index 92bc153d51..c99b7de2d2 100644 --- a/Marlin/src/config/examples/Velleman/K8400/Configuration.h +++ b/Marlin/src/config/examples/Velleman/K8400/Configuration.h @@ -1610,17 +1610,17 @@ * Adds the M150 command to set the LED (or LED strip) color. * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of * luminance values can be set from 0 to 255. - * For Neopixel LED overall brightness parameters is also available + * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** * LED Strips require a MOFSET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! - * Neopixel LED is 5V powered, but linear 5V regulator on Arduino - * cannot handle the current, separate 5V power supply must be used + * NOTE: A separate 5V power supply is required! The Neopixel LED needs + * more current than the Arduino 5V linear regulator can produce. * *** CAUTION *** * - * LED type. This options are mutualy exclusive. Uncomment only one. + * LED Type. Enable only one of the following two options. * */ @@ -1636,10 +1636,10 @@ // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) - #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h) + #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) - #define NEOPIXEL_PIXELS 30 // Number of LEDs on strip - #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Comment out for all LEDs to change at once. + #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip + #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 255 // Initial brightness 0-255 //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup #endif @@ -1659,18 +1659,18 @@ #define PRINTER_EVENT_LEDS #endif -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ +/** + * R/C SERVO support + * Sponsored by TrinityLabs, Reworked by codexmas + */ -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// +/** + * Number of servos + * + * For some servo-related options NUM_SERVOS will be set automatically. + * Set this manually if there are extra servos needing manual control. + * Leave undefined or set to 0 to entirely disable the servo subsystem. + */ //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle. diff --git a/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h b/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h index c0bdfe32e4..cae1f43521 100644 --- a/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h +++ b/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h @@ -1610,17 +1610,17 @@ * Adds the M150 command to set the LED (or LED strip) color. * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of * luminance values can be set from 0 to 255. - * For Neopixel LED overall brightness parameters is also available + * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** * LED Strips require a MOFSET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! - * Neopixel LED is 5V powered, but linear 5V regulator on Arduino - * cannot handle the current, separate 5V power supply must be used + * NOTE: A separate 5V power supply is required! The Neopixel LED needs + * more current than the Arduino 5V linear regulator can produce. * *** CAUTION *** * - * LED type. This options are mutualy exclusive. Uncomment only one. + * LED Type. Enable only one of the following two options. * */ @@ -1636,10 +1636,10 @@ // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) - #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h) + #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) - #define NEOPIXEL_PIXELS 30 // Number of LEDs on strip - #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Comment out for all LEDs to change at once. + #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip + #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 255 // Initial brightness 0-255 //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup #endif @@ -1659,18 +1659,18 @@ #define PRINTER_EVENT_LEDS #endif -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ +/** + * R/C SERVO support + * Sponsored by TrinityLabs, Reworked by codexmas + */ -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// +/** + * Number of servos + * + * For some servo-related options NUM_SERVOS will be set automatically. + * Set this manually if there are extra servos needing manual control. + * Leave undefined or set to 0 to entirely disable the servo subsystem. + */ //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle. diff --git a/Marlin/src/config/examples/adafruit/ST7565/Configuration.h b/Marlin/src/config/examples/adafruit/ST7565/Configuration.h index 41102242ff..ae1bd7535c 100644 --- a/Marlin/src/config/examples/adafruit/ST7565/Configuration.h +++ b/Marlin/src/config/examples/adafruit/ST7565/Configuration.h @@ -1610,17 +1610,17 @@ * Adds the M150 command to set the LED (or LED strip) color. * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of * luminance values can be set from 0 to 255. - * For Neopixel LED overall brightness parameters is also available + * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** * LED Strips require a MOFSET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! - * Neopixel LED is 5V powered, but linear 5V regulator on Arduino - * cannot handle the current, separate 5V power supply must be used + * NOTE: A separate 5V power supply is required! The Neopixel LED needs + * more current than the Arduino 5V linear regulator can produce. * *** CAUTION *** * - * LED type. This options are mutualy exclusive. Uncomment only one. + * LED Type. Enable only one of the following two options. * */ @@ -1636,10 +1636,10 @@ // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) - #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h) + #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) - #define NEOPIXEL_PIXELS 30 // Number of LEDs on strip - #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Comment out for all LEDs to change at once. + #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip + #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 255 // Initial brightness 0-255 //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup #endif @@ -1659,18 +1659,18 @@ #define PRINTER_EVENT_LEDS #endif -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ +/** + * R/C SERVO support + * Sponsored by TrinityLabs, Reworked by codexmas + */ -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// +/** + * Number of servos + * + * For some servo-related options NUM_SERVOS will be set automatically. + * Set this manually if there are extra servos needing manual control. + * Leave undefined or set to 0 to entirely disable the servo subsystem. + */ //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle. diff --git a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h index 752adfa849..e49b160d65 100644 --- a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h +++ b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h @@ -1738,17 +1738,17 @@ * Adds the M150 command to set the LED (or LED strip) color. * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of * luminance values can be set from 0 to 255. - * For Neopixel LED overall brightness parameters is also available + * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** * LED Strips require a MOFSET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! - * Neopixel LED is 5V powered, but linear 5V regulator on Arduino - * cannot handle the current, separate 5V power supply must be used + * NOTE: A separate 5V power supply is required! The Neopixel LED needs + * more current than the Arduino 5V linear regulator can produce. * *** CAUTION *** * - * LED type. This options are mutualy exclusive. Uncomment only one. + * LED Type. Enable only one of the following two options. * */ @@ -1764,10 +1764,10 @@ // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) - #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h) + #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) - #define NEOPIXEL_PIXELS 30 // Number of LEDs on strip - #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Comment out for all LEDs to change at once. + #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip + #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 255 // Initial brightness 0-255 //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup #endif @@ -1787,18 +1787,18 @@ #define PRINTER_EVENT_LEDS #endif -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ +/** + * R/C SERVO support + * Sponsored by TrinityLabs, Reworked by codexmas + */ -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// +/** + * Number of servos + * + * For some servo-related options NUM_SERVOS will be set automatically. + * Set this manually if there are extra servos needing manual control. + * Leave undefined or set to 0 to entirely disable the servo subsystem. + */ //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle. diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h index 72fb786a0f..ce740f0119 100644 --- a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h +++ b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h @@ -1731,17 +1731,17 @@ * Adds the M150 command to set the LED (or LED strip) color. * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of * luminance values can be set from 0 to 255. - * For Neopixel LED overall brightness parameters is also available + * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** * LED Strips require a MOFSET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! - * Neopixel LED is 5V powered, but linear 5V regulator on Arduino - * cannot handle the current, separate 5V power supply must be used + * NOTE: A separate 5V power supply is required! The Neopixel LED needs + * more current than the Arduino 5V linear regulator can produce. * *** CAUTION *** * - * LED type. This options are mutualy exclusive. Uncomment only one. + * LED Type. Enable only one of the following two options. * */ @@ -1757,10 +1757,10 @@ // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) - #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h) + #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) - #define NEOPIXEL_PIXELS 30 // Number of LEDs on strip - #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Comment out for all LEDs to change at once. + #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip + #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 255 // Initial brightness 0-255 //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup #endif @@ -1780,18 +1780,18 @@ #define PRINTER_EVENT_LEDS #endif -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ +/** + * R/C SERVO support + * Sponsored by TrinityLabs, Reworked by codexmas + */ -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// +/** + * Number of servos + * + * For some servo-related options NUM_SERVOS will be set automatically. + * Set this manually if there are extra servos needing manual control. + * Leave undefined or set to 0 to entirely disable the servo subsystem. + */ //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle. diff --git a/Marlin/src/config/examples/delta/generic/Configuration.h b/Marlin/src/config/examples/delta/generic/Configuration.h index d4d181d495..857cb4c129 100644 --- a/Marlin/src/config/examples/delta/generic/Configuration.h +++ b/Marlin/src/config/examples/delta/generic/Configuration.h @@ -1726,17 +1726,17 @@ * Adds the M150 command to set the LED (or LED strip) color. * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of * luminance values can be set from 0 to 255. - * For Neopixel LED overall brightness parameters is also available + * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** * LED Strips require a MOFSET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! - * Neopixel LED is 5V powered, but linear 5V regulator on Arduino - * cannot handle the current, separate 5V power supply must be used + * NOTE: A separate 5V power supply is required! The Neopixel LED needs + * more current than the Arduino 5V linear regulator can produce. * *** CAUTION *** * - * LED type. This options are mutualy exclusive. Uncomment only one. + * LED Type. Enable only one of the following two options. * */ @@ -1752,10 +1752,10 @@ // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) - #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h) + #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) - #define NEOPIXEL_PIXELS 30 // Number of LEDs on strip - #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Comment out for all LEDs to change at once. + #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip + #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 255 // Initial brightness 0-255 //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup #endif @@ -1775,18 +1775,18 @@ #define PRINTER_EVENT_LEDS #endif -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ +/** + * R/C SERVO support + * Sponsored by TrinityLabs, Reworked by codexmas + */ -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// +/** + * Number of servos + * + * For some servo-related options NUM_SERVOS will be set automatically. + * Set this manually if there are extra servos needing manual control. + * Leave undefined or set to 0 to entirely disable the servo subsystem. + */ //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle. diff --git a/Marlin/src/config/examples/delta/kossel_mini/Configuration.h b/Marlin/src/config/examples/delta/kossel_mini/Configuration.h index 34d2a6c0af..81a499b6e1 100644 --- a/Marlin/src/config/examples/delta/kossel_mini/Configuration.h +++ b/Marlin/src/config/examples/delta/kossel_mini/Configuration.h @@ -1729,17 +1729,17 @@ * Adds the M150 command to set the LED (or LED strip) color. * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of * luminance values can be set from 0 to 255. - * For Neopixel LED overall brightness parameters is also available + * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** * LED Strips require a MOFSET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! - * Neopixel LED is 5V powered, but linear 5V regulator on Arduino - * cannot handle the current, separate 5V power supply must be used + * NOTE: A separate 5V power supply is required! The Neopixel LED needs + * more current than the Arduino 5V linear regulator can produce. * *** CAUTION *** * - * LED type. This options are mutualy exclusive. Uncomment only one. + * LED Type. Enable only one of the following two options. * */ @@ -1755,10 +1755,10 @@ // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) - #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h) + #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) - #define NEOPIXEL_PIXELS 30 // Number of LEDs on strip - #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Comment out for all LEDs to change at once. + #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip + #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 255 // Initial brightness 0-255 //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup #endif @@ -1778,18 +1778,18 @@ #define PRINTER_EVENT_LEDS #endif -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ +/** + * R/C SERVO support + * Sponsored by TrinityLabs, Reworked by codexmas + */ -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// +/** + * Number of servos + * + * For some servo-related options NUM_SERVOS will be set automatically. + * Set this manually if there are extra servos needing manual control. + * Leave undefined or set to 0 to entirely disable the servo subsystem. + */ //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle. diff --git a/Marlin/src/config/examples/delta/kossel_pro/Configuration.h b/Marlin/src/config/examples/delta/kossel_pro/Configuration.h index 993d8635c6..911b50e499 100644 --- a/Marlin/src/config/examples/delta/kossel_pro/Configuration.h +++ b/Marlin/src/config/examples/delta/kossel_pro/Configuration.h @@ -1729,17 +1729,17 @@ * Adds the M150 command to set the LED (or LED strip) color. * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of * luminance values can be set from 0 to 255. - * For Neopixel LED overall brightness parameters is also available + * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** * LED Strips require a MOFSET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! - * Neopixel LED is 5V powered, but linear 5V regulator on Arduino - * cannot handle the current, separate 5V power supply must be used + * NOTE: A separate 5V power supply is required! The Neopixel LED needs + * more current than the Arduino 5V linear regulator can produce. * *** CAUTION *** * - * LED type. This options are mutualy exclusive. Uncomment only one. + * LED Type. Enable only one of the following two options. * */ @@ -1755,10 +1755,10 @@ // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) - #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h) + #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) - #define NEOPIXEL_PIXELS 30 // Number of LEDs on strip - #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Comment out for all LEDs to change at once. + #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip + #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 255 // Initial brightness 0-255 //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup #endif @@ -1778,18 +1778,18 @@ #define PRINTER_EVENT_LEDS #endif -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ +/** + * R/C SERVO support + * Sponsored by TrinityLabs, Reworked by codexmas + */ -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// +/** + * Number of servos + * + * For some servo-related options NUM_SERVOS will be set automatically. + * Set this manually if there are extra servos needing manual control. + * Leave undefined or set to 0 to entirely disable the servo subsystem. + */ //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle. diff --git a/Marlin/src/config/examples/delta/kossel_xl/Configuration.h b/Marlin/src/config/examples/delta/kossel_xl/Configuration.h index b2088193be..2deb49db34 100644 --- a/Marlin/src/config/examples/delta/kossel_xl/Configuration.h +++ b/Marlin/src/config/examples/delta/kossel_xl/Configuration.h @@ -1738,17 +1738,17 @@ * Adds the M150 command to set the LED (or LED strip) color. * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of * luminance values can be set from 0 to 255. - * For Neopixel LED overall brightness parameters is also available + * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** * LED Strips require a MOFSET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! - * Neopixel LED is 5V powered, but linear 5V regulator on Arduino - * cannot handle the current, separate 5V power supply must be used + * NOTE: A separate 5V power supply is required! The Neopixel LED needs + * more current than the Arduino 5V linear regulator can produce. * *** CAUTION *** * - * LED type. This options are mutualy exclusive. Uncomment only one. + * LED Type. Enable only one of the following two options. * */ @@ -1764,10 +1764,10 @@ // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) - #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h) + #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) - #define NEOPIXEL_PIXELS 30 // Number of LEDs on strip - #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Comment out for all LEDs to change at once. + #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip + #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 255 // Initial brightness 0-255 //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup #endif @@ -1787,18 +1787,18 @@ #define PRINTER_EVENT_LEDS #endif -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ +/** + * R/C SERVO support + * Sponsored by TrinityLabs, Reworked by codexmas + */ -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// +/** + * Number of servos + * + * For some servo-related options NUM_SERVOS will be set automatically. + * Set this manually if there are extra servos needing manual control. + * Leave undefined or set to 0 to entirely disable the servo subsystem. + */ //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle. diff --git a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h index a9c3beea57..9ac72b031c 100644 --- a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h +++ b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h @@ -1624,17 +1624,17 @@ * Adds the M150 command to set the LED (or LED strip) color. * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of * luminance values can be set from 0 to 255. - * For Neopixel LED overall brightness parameters is also available + * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** * LED Strips require a MOFSET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! - * Neopixel LED is 5V powered, but linear 5V regulator on Arduino - * cannot handle the current, separate 5V power supply must be used + * NOTE: A separate 5V power supply is required! The Neopixel LED needs + * more current than the Arduino 5V linear regulator can produce. * *** CAUTION *** * - * LED type. This options are mutualy exclusive. Uncomment only one. + * LED Type. Enable only one of the following two options. * */ @@ -1650,10 +1650,10 @@ // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) - #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h) + #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) - #define NEOPIXEL_PIXELS 30 // Number of LEDs on strip - #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Comment out for all LEDs to change at once. + #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip + #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 255 // Initial brightness 0-255 //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup #endif @@ -1673,18 +1673,18 @@ #define PRINTER_EVENT_LEDS #endif -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ +/** + * R/C SERVO support + * Sponsored by TrinityLabs, Reworked by codexmas + */ -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// +/** + * Number of servos + * + * For some servo-related options NUM_SERVOS will be set automatically. + * Set this manually if there are extra servos needing manual control. + * Leave undefined or set to 0 to entirely disable the servo subsystem. + */ #define NUM_SERVOS 2 // Servo index starts with 0 for M280 command // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle. diff --git a/Marlin/src/config/examples/makibox/Configuration.h b/Marlin/src/config/examples/makibox/Configuration.h index 6522bb60f8..8a7230c15c 100644 --- a/Marlin/src/config/examples/makibox/Configuration.h +++ b/Marlin/src/config/examples/makibox/Configuration.h @@ -1613,17 +1613,17 @@ * Adds the M150 command to set the LED (or LED strip) color. * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of * luminance values can be set from 0 to 255. - * For Neopixel LED overall brightness parameters is also available + * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** * LED Strips require a MOFSET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! - * Neopixel LED is 5V powered, but linear 5V regulator on Arduino - * cannot handle the current, separate 5V power supply must be used + * NOTE: A separate 5V power supply is required! The Neopixel LED needs + * more current than the Arduino 5V linear regulator can produce. * *** CAUTION *** * - * LED type. This options are mutualy exclusive. Uncomment only one. + * LED Type. Enable only one of the following two options. * */ @@ -1639,10 +1639,10 @@ // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) - #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h) + #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) - #define NEOPIXEL_PIXELS 30 // Number of LEDs on strip - #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Comment out for all LEDs to change at once. + #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip + #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 255 // Initial brightness 0-255 //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup #endif @@ -1662,18 +1662,18 @@ #define PRINTER_EVENT_LEDS #endif -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ +/** + * R/C SERVO support + * Sponsored by TrinityLabs, Reworked by codexmas + */ -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// +/** + * Number of servos + * + * For some servo-related options NUM_SERVOS will be set automatically. + * Set this manually if there are extra servos needing manual control. + * Leave undefined or set to 0 to entirely disable the servo subsystem. + */ //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle. diff --git a/Marlin/src/config/examples/stm32f103ret6/Configuration.h b/Marlin/src/config/examples/stm32f103ret6/Configuration.h index 5a2fb16966..9a7a46b07a 100644 --- a/Marlin/src/config/examples/stm32f103ret6/Configuration.h +++ b/Marlin/src/config/examples/stm32f103ret6/Configuration.h @@ -1585,10 +1585,10 @@ // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) - #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h) + #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) - #define NEOPIXEL_PIXELS 30 // Number of LEDs on strip - #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Comment out for all LEDs to change at once. + #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip + #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 255 // Initial brightness 0-255 //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup #endif @@ -1608,18 +1608,18 @@ #define PRINTER_EVENT_LEDS #endif -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ +/** + * R/C SERVO support + * Sponsored by TrinityLabs, Reworked by codexmas + */ -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// +/** + * Number of servos + * + * For some servo-related options NUM_SERVOS will be set automatically. + * Set this manually if there are extra servos needing manual control. + * Leave undefined or set to 0 to entirely disable the servo subsystem. + */ //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle. diff --git a/Marlin/src/config/examples/tvrrug/Round2/Configuration.h b/Marlin/src/config/examples/tvrrug/Round2/Configuration.h index 19d25e8f42..6ca0d5c5fb 100644 --- a/Marlin/src/config/examples/tvrrug/Round2/Configuration.h +++ b/Marlin/src/config/examples/tvrrug/Round2/Configuration.h @@ -1605,17 +1605,17 @@ * Adds the M150 command to set the LED (or LED strip) color. * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of * luminance values can be set from 0 to 255. - * For Neopixel LED overall brightness parameters is also available + * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** * LED Strips require a MOFSET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! - * Neopixel LED is 5V powered, but linear 5V regulator on Arduino - * cannot handle the current, separate 5V power supply must be used + * NOTE: A separate 5V power supply is required! The Neopixel LED needs + * more current than the Arduino 5V linear regulator can produce. * *** CAUTION *** * - * LED type. This options are mutualy exclusive. Uncomment only one. + * LED Type. Enable only one of the following two options. * */ @@ -1631,10 +1631,10 @@ // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) - #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h) + #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) - #define NEOPIXEL_PIXELS 30 // Number of LEDs on strip - #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Comment out for all LEDs to change at once. + #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip + #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 255 // Initial brightness 0-255 //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup #endif @@ -1654,18 +1654,18 @@ #define PRINTER_EVENT_LEDS #endif -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ +/** + * R/C SERVO support + * Sponsored by TrinityLabs, Reworked by codexmas + */ -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// +/** + * Number of servos + * + * For some servo-related options NUM_SERVOS will be set automatically. + * Set this manually if there are extra servos needing manual control. + * Leave undefined or set to 0 to entirely disable the servo subsystem. + */ //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle. diff --git a/Marlin/src/config/examples/wt150/Configuration.h b/Marlin/src/config/examples/wt150/Configuration.h index 1a13d485ca..98b4959553 100644 --- a/Marlin/src/config/examples/wt150/Configuration.h +++ b/Marlin/src/config/examples/wt150/Configuration.h @@ -1615,17 +1615,17 @@ * Adds the M150 command to set the LED (or LED strip) color. * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of * luminance values can be set from 0 to 255. - * For Neopixel LED overall brightness parameters is also available + * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** * LED Strips require a MOFSET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! - * Neopixel LED is 5V powered, but linear 5V regulator on Arduino - * cannot handle the current, separate 5V power supply must be used + * NOTE: A separate 5V power supply is required! The Neopixel LED needs + * more current than the Arduino 5V linear regulator can produce. * *** CAUTION *** * - * LED type. This options are mutualy exclusive. Uncomment only one. + * LED Type. Enable only one of the following two options. * */ @@ -1641,10 +1641,10 @@ // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) - #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h) + #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) - #define NEOPIXEL_PIXELS 30 // Number of LEDs on strip - #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Comment out for all LEDs to change at once. + #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip + #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 255 // Initial brightness 0-255 //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup #endif @@ -1664,18 +1664,18 @@ #define PRINTER_EVENT_LEDS #endif -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ +/** + * R/C SERVO support + * Sponsored by TrinityLabs, Reworked by codexmas + */ -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// +/** + * Number of servos + * + * For some servo-related options NUM_SERVOS will be set automatically. + * Set this manually if there are extra servos needing manual control. + * Leave undefined or set to 0 to entirely disable the servo subsystem. + */ //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle. From 60af705e6d68bc972fbdcd232e78a775efe53128 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 19 Oct 2017 00:42:16 -0500 Subject: [PATCH 12/20] Relocate SPI.h to the HAL folder --- Marlin/src/HAL/HAL.h | 2 +- .../src/HAL/HAL_STM32F1/HAL_spi_Stm32f1.cpp | 2 +- Marlin/src/HAL/SPI.h | 78 +++++++++++++++++++ Marlin/src/inc/MarlinConfig.h | 2 +- Marlin/src/inc/SPI.h | 52 ------------- 5 files changed, 81 insertions(+), 55 deletions(-) create mode 100644 Marlin/src/HAL/SPI.h delete mode 100644 Marlin/src/inc/SPI.h diff --git a/Marlin/src/HAL/HAL.h b/Marlin/src/HAL/HAL.h index 60e0df6f2d..bc7d285e81 100644 --- a/Marlin/src/HAL/HAL.h +++ b/Marlin/src/HAL/HAL.h @@ -29,7 +29,7 @@ #ifndef _HAL_H #define _HAL_H -#include "../inc/SPI.h" +#include "SPI.h" #ifdef __AVR__ #include "HAL_AVR/HAL_AVR.h" diff --git a/Marlin/src/HAL/HAL_STM32F1/HAL_spi_Stm32f1.cpp b/Marlin/src/HAL/HAL_STM32F1/HAL_spi_Stm32f1.cpp index 3b4109f0c3..fc1bfb7550 100644 --- a/Marlin/src/HAL/HAL_STM32F1/HAL_spi_Stm32f1.cpp +++ b/Marlin/src/HAL/HAL_STM32F1/HAL_spi_Stm32f1.cpp @@ -37,7 +37,7 @@ // -------------------------------------------------------------------------- #include "../HAL.h" -#include "SPI.h" +#include "../SPI.h" #include "pins_arduino.h" #include "spi_pins.h" #include "../../core/macros.h" diff --git a/Marlin/src/HAL/SPI.h b/Marlin/src/HAL/SPI.h new file mode 100644 index 0000000000..78e867a1fa --- /dev/null +++ b/Marlin/src/HAL/SPI.h @@ -0,0 +1,78 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (C) 2016 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 . + * + */ + +/** + * HAL/SPI.h + * Core Marlin definitions for SPI, implemented in the HALs + */ + +#ifndef _SPI_H_ +#define _SPI_H_ + +//#include "../inc/MarlinConfig.h" + +#include + +#ifndef SPI_FULL_SPEED + +/** + * SPI speed where 0 <= index <= 6 + * + * Approximate rates : + * + * 0 : 8 - 10 MHz + * 1 : 4 - 5 MHz + * 2 : 2 - 2.5 MHz + * 3 : 1 - 1.25 MHz + * 4 : 500 - 625 kHz + * 5 : 250 - 312 kHz + * 6 : 125 - 156 kHz + * + * On AVR, actual speed is F_CPU/2^(1 + index). + * On other platforms, speed should be in range given above where possible. + */ + +#define SPI_FULL_SPEED 0 // Set SCK to max rate +#define SPI_HALF_SPEED 1 // Set SCK rate to half of max rate +#define SPI_QUARTER_SPEED 2 // Set SCK rate to quarter of max rate +#define SPI_EIGHTH_SPEED 3 // Set SCK rate to 1/8 of max rate +#define SPI_SIXTEENTH_SPEED 4 // Set SCK rate to 1/16 of max rate +#define SPI_SPEED_5 5 // Set SCK rate to 1/32 of max rate +#define SPI_SPEED_6 6 // Set SCK rate to 1/64 of max rate + +// Standard SPI functions +/** Initialise SPI bus */ +void spiBegin(void); +/** Configure SPI for specified SPI speed */ +void spiInit(uint8_t spiRate); +/** Write single byte to SPI */ +void spiSend(uint8_t b); +/** Read single byte from SPI */ +uint8_t spiRec(void); +/** Read from SPI into buffer */ +void spiRead(uint8_t* buf, uint16_t nbyte); +/** Write token and then write from 512 byte buffer to SPI (for SD card) */ +void spiSendBlock(uint8_t token, const uint8_t* buf); + +#endif // SPI_FULL_SPEED + +#endif // _SPI_H_ diff --git a/Marlin/src/inc/MarlinConfig.h b/Marlin/src/inc/MarlinConfig.h index 25d56cf006..ea542fcda3 100644 --- a/Marlin/src/inc/MarlinConfig.h +++ b/Marlin/src/inc/MarlinConfig.h @@ -26,7 +26,7 @@ #include "../core/boards.h" #include "../core/macros.h" #include "Version.h" -#include "SPI.h" +#include "../HAL/SPI.h" #include "../../Configuration.h" #include "Conditionals_LCD.h" #include "../../Configuration_adv.h" diff --git a/Marlin/src/inc/SPI.h b/Marlin/src/inc/SPI.h deleted file mode 100644 index 3fa0cecceb..0000000000 --- a/Marlin/src/inc/SPI.h +++ /dev/null @@ -1,52 +0,0 @@ -#include - - -#ifndef SPI_FULL_SPEED - -/** - * SPI speed where 0 <= index <= 6 - * - * Approximate rates : - * - * 0 : 8 - 10 MHz - * 1 : 4 - 5 MHz - * 2 : 2 - 2.5 MHz - * 3 : 1 - 1.25 MHz - * 4 : 500 - 625 kHz - * 5 : 250 - 312 kHz - * 6 : 125 - 156 kHz - * - * On AVR, actual speed is F_CPU/2^(1 + index). - * On other platforms, speed should be in range given above where possible. - */ - -/** Set SCK to max rate */ -#define SPI_FULL_SPEED 0 -/** Set SCK rate to half max rate. */ -#define SPI_HALF_SPEED 1 -/** Set SCK rate to quarter max rate. */ -#define SPI_QUARTER_SPEED 2 -/** Set SCK rate to 1/8 max rate. */ -#define SPI_EIGHTH_SPEED 3 -/** Set SCK rate to 1/16 of max rate. */ -#define SPI_SIXTEENTH_SPEED 4 -/** Set SCK rate to 1/32 of max rate. */ -#define SPI_SPEED_5 5 -/** Set SCK rate to 1/64 of max rate. */ -#define SPI_SPEED_6 6 - -// Standard SPI functions -/** Initialise SPI bus */ -void spiBegin(void); -/** Configure SPI for specified SPI speed */ -void spiInit(uint8_t spiRate); -/** Write single byte to SPI */ -void spiSend(uint8_t b); -/** Read single byte from SPI */ -uint8_t spiRec(void); -/** Read from SPI into buffer */ -void spiRead(uint8_t* buf, uint16_t nbyte); -/** Write token and then write from 512 byte buffer to SPI (for SD card) */ -void spiSendBlock(uint8_t token, const uint8_t* buf); - -#endif From 4e2baeb3e146d60e50367b829a055e7f4198c554 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 19 Oct 2017 00:43:07 -0500 Subject: [PATCH 13/20] Update indentation, file-wrapping for Marlin 2.0.x --- Marlin/src/inc/Conditionals_LCD.h | 830 ++++++------- Marlin/src/inc/Conditionals_post.h | 1861 ++++++++++++++-------------- Marlin/src/inc/SanityCheck.h | 6 +- Marlin/src/inc/Version.h | 9 +- 4 files changed, 1359 insertions(+), 1347 deletions(-) diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index 3653396bb7..d3d08dd144 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -28,467 +28,467 @@ #ifndef CONDITIONALS_LCD_H // Get the LCD defines which are needed first #define CONDITIONALS_LCD_H - #define LCD_HAS_DIRECTIONAL_BUTTONS (BUTTON_EXISTS(UP) || BUTTON_EXISTS(DWN) || BUTTON_EXISTS(LFT) || BUTTON_EXISTS(RT)) +#define LCD_HAS_DIRECTIONAL_BUTTONS (BUTTON_EXISTS(UP) || BUTTON_EXISTS(DWN) || BUTTON_EXISTS(LFT) || BUTTON_EXISTS(RT)) - #if ENABLED(CARTESIO_UI) +#if ENABLED(CARTESIO_UI) - #define DOGLCD - #define ULTIPANEL - #define DEFAULT_LCD_CONTRAST 90 - #define LCD_CONTRAST_MIN 60 - #define LCD_CONTRAST_MAX 140 + #define DOGLCD + #define ULTIPANEL + #define DEFAULT_LCD_CONTRAST 90 + #define LCD_CONTRAST_MIN 60 + #define LCD_CONTRAST_MAX 140 - #elif ENABLED(MAKRPANEL) +#elif ENABLED(MAKRPANEL) + #define U8GLIB_ST7565_64128N + +#elif ENABLED(ANET_KEYPAD_LCD) + + #define REPRAPWORLD_KEYPAD + #define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 + #define ADC_KEYPAD + #define ADC_KEY_NUM 8 + #define ULTIPANEL + + // this helps to implement ADC_KEYPAD menus + #define ENCODER_PULSES_PER_STEP 1 + #define ENCODER_STEPS_PER_MENU_ITEM 1 + #define REVERSE_MENU_DIRECTION + +#elif ENABLED(ANET_FULL_GRAPHICS_LCD) + + #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER + +#elif ENABLED(BQ_LCD_SMART_CONTROLLER) + + #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER + +#elif ENABLED(miniVIKI) || ENABLED(VIKI2) || ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) || ENABLED(AZSMZ_12864) + + #define ULTRA_LCD //general LCD support, also 16x2 + #define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family) + #define ULTIMAKERCONTROLLER //as available from the Ultimaker online store. + + #if ENABLED(miniVIKI) + #define LCD_CONTRAST_MIN 75 + #define LCD_CONTRAST_MAX 115 + #define DEFAULT_LCD_CONTRAST 95 + #define U8GLIB_ST7565_64128N + #elif ENABLED(VIKI2) + #define LCD_CONTRAST_MIN 0 + #define LCD_CONTRAST_MAX 255 + #define DEFAULT_LCD_CONTRAST 140 + #define U8GLIB_ST7565_64128N + #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) + #define LCD_CONTRAST_MIN 90 + #define LCD_CONTRAST_MAX 130 + #define DEFAULT_LCD_CONTRAST 110 + #define U8GLIB_LM6059_AF + #define SD_DETECT_INVERTED + #elif ENABLED(AZSMZ_12864) + #define LCD_CONTRAST_MIN 120 + #define LCD_CONTRAST_MAX 255 + #define DEFAULT_LCD_CONTRAST 190 #define U8GLIB_ST7565_64128N - - #elif ENABLED(ANET_KEYPAD_LCD) - - #define REPRAPWORLD_KEYPAD - #define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 - #define ADC_KEYPAD - #define ADC_KEY_NUM 8 - #define ULTIPANEL - - // this helps to implement ADC_KEYPAD menus - #define ENCODER_PULSES_PER_STEP 1 - #define ENCODER_STEPS_PER_MENU_ITEM 1 - #define REVERSE_MENU_DIRECTION - - #elif ENABLED(ANET_FULL_GRAPHICS_LCD) - - #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER - - #elif ENABLED(BQ_LCD_SMART_CONTROLLER) - - #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER - - #elif ENABLED(miniVIKI) || ENABLED(VIKI2) || ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) || ENABLED(AZSMZ_12864) - - #define ULTRA_LCD //general LCD support, also 16x2 - #define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family) - #define ULTIMAKERCONTROLLER //as available from the Ultimaker online store. - - #if ENABLED(miniVIKI) - #define LCD_CONTRAST_MIN 75 - #define LCD_CONTRAST_MAX 115 - #define DEFAULT_LCD_CONTRAST 95 - #define U8GLIB_ST7565_64128N - #elif ENABLED(VIKI2) - #define LCD_CONTRAST_MIN 0 - #define LCD_CONTRAST_MAX 255 - #define DEFAULT_LCD_CONTRAST 140 - #define U8GLIB_ST7565_64128N - #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) - #define LCD_CONTRAST_MIN 90 - #define LCD_CONTRAST_MAX 130 - #define DEFAULT_LCD_CONTRAST 110 - #define U8GLIB_LM6059_AF - #define SD_DETECT_INVERTED - #elif ENABLED(AZSMZ_12864) - #define LCD_CONTRAST_MIN 120 - #define LCD_CONTRAST_MAX 255 - #define DEFAULT_LCD_CONTRAST 190 - #define U8GLIB_ST7565_64128N - #endif - - #elif ENABLED(OLED_PANEL_TINYBOY2) - - #define U8GLIB_SSD1306 - #define ULTIPANEL - #define REVERSE_ENCODER_DIRECTION - #define REVERSE_MENU_DIRECTION - - #elif ENABLED(RA_CONTROL_PANEL) - - #define LCD_I2C_TYPE_PCA8574 - #define LCD_I2C_ADDRESS 0x27 // I2C Address of the port expander - #define ULTIPANEL - - #elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD) - - #define DOGLCD - #define U8GLIB_ST7920 - #define ULTIPANEL - - #elif ENABLED(CR10_STOCKDISPLAY) - - #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER - #ifndef ST7920_DELAY_1 - #define ST7920_DELAY_1 DELAY_2_NOP - #endif - #ifndef ST7920_DELAY_2 - #define ST7920_DELAY_2 DELAY_2_NOP - #endif - #ifndef ST7920_DELAY_3 - #define ST7920_DELAY_3 DELAY_2_NOP - #endif - - #elif ENABLED(MKS_12864OLED) - - #define REPRAP_DISCOUNT_SMART_CONTROLLER - #define U8GLIB_SH1106 - - #elif ENABLED(MKS_MINI_12864) - - #define MINIPANEL - #endif - #if ENABLED(MAKRPANEL) || ENABLED(MINIPANEL) - #define DOGLCD - #define ULTIPANEL - #define DEFAULT_LCD_CONTRAST 17 +#elif ENABLED(OLED_PANEL_TINYBOY2) + + #define U8GLIB_SSD1306 + #define ULTIPANEL + #define REVERSE_ENCODER_DIRECTION + #define REVERSE_MENU_DIRECTION + +#elif ENABLED(RA_CONTROL_PANEL) + + #define LCD_I2C_TYPE_PCA8574 + #define LCD_I2C_ADDRESS 0x27 // I2C Address of the port expander + #define ULTIPANEL + +#elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD) + + #define DOGLCD + #define U8GLIB_ST7920 + #define ULTIPANEL + +#elif ENABLED(CR10_STOCKDISPLAY) + + #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER + #ifndef ST7920_DELAY_1 + #define ST7920_DELAY_1 DELAY_2_NOP + #endif + #ifndef ST7920_DELAY_2 + #define ST7920_DELAY_2 DELAY_2_NOP + #endif + #ifndef ST7920_DELAY_3 + #define ST7920_DELAY_3 DELAY_2_NOP #endif - // Generic support for SSD1306 / SH1106 OLED based LCDs. - #if ENABLED(U8GLIB_SSD1306) || ENABLED(U8GLIB_SH1106) - #define ULTRA_LCD //general LCD support, also 16x2 - #define DOGLCD // Support for I2C LCD 128x64 (Controller SSD1306 / SH1106 graphic Display Family) +#elif ENABLED(MKS_12864OLED) + + #define REPRAP_DISCOUNT_SMART_CONTROLLER + #define U8GLIB_SH1106 + +#elif ENABLED(MKS_MINI_12864) + + #define MINIPANEL + +#endif + +#if ENABLED(MAKRPANEL) || ENABLED(MINIPANEL) + #define DOGLCD + #define ULTIPANEL + #define DEFAULT_LCD_CONTRAST 17 +#endif + +// Generic support for SSD1306 / SH1106 OLED based LCDs. +#if ENABLED(U8GLIB_SSD1306) || ENABLED(U8GLIB_SH1106) + #define ULTRA_LCD //general LCD support, also 16x2 + #define DOGLCD // Support for I2C LCD 128x64 (Controller SSD1306 / SH1106 graphic Display Family) +#endif + +#if ENABLED(PANEL_ONE) || ENABLED(U8GLIB_SH1106) + + #define ULTIMAKERCONTROLLER + +#elif ENABLED(MAKEBOARD_MINI_2_LINE_DISPLAY_1602) + + #define REPRAP_DISCOUNT_SMART_CONTROLLER + #define LCD_WIDTH 16 + #define LCD_HEIGHT 2 + +#endif + +#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) || ENABLED(LCD_FOR_MELZI) + #define DOGLCD + #define U8GLIB_ST7920 + #define REPRAP_DISCOUNT_SMART_CONTROLLER +#endif + +#if ENABLED(ULTIMAKERCONTROLLER) \ + || ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) \ + || ENABLED(G3D_PANEL) \ + || ENABLED(RIGIDBOT_PANEL) + #define ULTIPANEL +#endif + +#if ENABLED(REPRAPWORLD_KEYPAD) + #define NEWPANEL + #if ENABLED(ULTIPANEL) && !defined(REPRAPWORLD_KEYPAD_MOVE_STEP) + #define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0 #endif +#endif - #if ENABLED(PANEL_ONE) || ENABLED(U8GLIB_SH1106) +/** + * I2C PANELS + */ - #define ULTIMAKERCONTROLLER +#if ENABLED(LCD_I2C_SAINSMART_YWROBOT) - #elif ENABLED(MAKEBOARD_MINI_2_LINE_DISPLAY_1602) + // Note: This controller requires F.Malpartida's LiquidCrystal_I2C library + // https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home - #define REPRAP_DISCOUNT_SMART_CONTROLLER + #define LCD_I2C_TYPE_PCF8575 + #define LCD_I2C_ADDRESS 0x27 // I2C Address of the port expander + #define ULTIPANEL + +#elif ENABLED(LCD_I2C_PANELOLU2) + + // PANELOLU2 LCD with status LEDs, separate encoder and click inputs + + #define LCD_I2C_TYPE_MCP23017 + #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander + #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD + #define ULTIPANEL + +#elif ENABLED(LCD_I2C_VIKI) + + /** + * Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs + * + * This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 ) + * Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory. + * Note: The pause/stop/resume LCD button pin should be connected to the Arduino + * BTN_ENC pin (or set BTN_ENC to -1 if not used) + */ + #define LCD_I2C_TYPE_MCP23017 + #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander + #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD (requires LiquidTWI2 v1.2.3 or later) + #define ULTIPANEL + + #define ENCODER_FEEDRATE_DEADZONE 4 + + #define STD_ENCODER_PULSES_PER_STEP 1 + #define STD_ENCODER_STEPS_PER_MENU_ITEM 2 + +#elif ENABLED(G3D_PANEL) + + #define STD_ENCODER_PULSES_PER_STEP 2 + #define STD_ENCODER_STEPS_PER_MENU_ITEM 1 + +#elif ENABLED(miniVIKI) || ENABLED(VIKI2) \ + || ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) \ + || ENABLED(AZSMZ_12864) \ + || ENABLED(OLED_PANEL_TINYBOY2) \ + || ENABLED(BQ_LCD_SMART_CONTROLLER) \ + || ENABLED(LCD_I2C_PANELOLU2) \ + || ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) + #define STD_ENCODER_PULSES_PER_STEP 4 + #define STD_ENCODER_STEPS_PER_MENU_ITEM 1 +#endif + +#ifndef STD_ENCODER_PULSES_PER_STEP + #define STD_ENCODER_PULSES_PER_STEP 5 +#endif +#ifndef STD_ENCODER_STEPS_PER_MENU_ITEM + #define STD_ENCODER_STEPS_PER_MENU_ITEM 1 +#endif +#ifndef ENCODER_PULSES_PER_STEP + #define ENCODER_PULSES_PER_STEP STD_ENCODER_PULSES_PER_STEP +#endif +#ifndef ENCODER_STEPS_PER_MENU_ITEM + #define ENCODER_STEPS_PER_MENU_ITEM STD_ENCODER_STEPS_PER_MENU_ITEM +#endif +#ifndef ENCODER_FEEDRATE_DEADZONE + #define ENCODER_FEEDRATE_DEADZONE 6 +#endif + +// Shift register panels +// --------------------- +// 2 wire Non-latching LCD SR from: +// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection + +#if ENABLED(SAV_3DLCD) + #define SR_LCD_2W_NL // Non latching 2 wire shift register + #define ULTIPANEL +#endif + +#if ENABLED(DOGLCD) // Change number of lines to match the DOG graphic display + #ifndef LCD_WIDTH + #define LCD_WIDTH 22 + #endif + #ifndef LCD_HEIGHT + #define LCD_HEIGHT 5 + #endif +#endif + +#if ENABLED(ULTIPANEL) + #define NEWPANEL // Disable this if you actually have no click-encoder panel + #define ULTRA_LCD + #ifndef LCD_WIDTH + #define LCD_WIDTH 20 + #endif + #ifndef LCD_HEIGHT + #define LCD_HEIGHT 4 + #endif +#elif ENABLED(ULTRA_LCD) // no panel but just LCD + #ifndef LCD_WIDTH #define LCD_WIDTH 16 + #endif + #ifndef LCD_HEIGHT #define LCD_HEIGHT 2 - #endif +#endif - #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) || ENABLED(LCD_FOR_MELZI) - #define DOGLCD - #define U8GLIB_ST7920 - #define REPRAP_DISCOUNT_SMART_CONTROLLER - #endif +#if ENABLED(DOGLCD) + /* Custom characters defined in font dogm_font_data_Marlin_symbols.h / Marlin_symbols.fon */ + // \x00 intentionally skipped to avoid problems in strings + #define LCD_STR_REFRESH "\x01" + #define LCD_STR_FOLDER "\x02" + #define LCD_STR_ARROW_RIGHT "\x03" + #define LCD_STR_UPLEVEL "\x04" + #define LCD_STR_CLOCK "\x05" + #define LCD_STR_FEEDRATE "\x06" + #define LCD_STR_BEDTEMP "\x07" + #define LCD_STR_THERMOMETER "\x08" + #define LCD_STR_DEGREE "\x09" - #if ENABLED(ULTIMAKERCONTROLLER) \ - || ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) \ - || ENABLED(G3D_PANEL) \ - || ENABLED(RIGIDBOT_PANEL) - #define ULTIPANEL - #endif + #define LCD_STR_SPECIAL_MAX '\x09' + // Maximum here is 0x1F because 0x20 is ' ' (space) and the normal charsets begin. + // Better stay below 0x10 because DISPLAY_CHARSET_HD44780_WESTERN begins here. - #if ENABLED(REPRAPWORLD_KEYPAD) - #define NEWPANEL - #if ENABLED(ULTIPANEL) && !defined(REPRAPWORLD_KEYPAD_MOVE_STEP) - #define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0 + // Symbol characters + #define LCD_STR_FILAM_DIA "\xf8" + #define LCD_STR_FILAM_MUL "\xa4" +#else + /* Custom characters defined in the first 8 characters of the LCD */ + #define LCD_BEDTEMP_CHAR 0x00 // Print only as a char. This will have 'unexpected' results when used in a string! + #define LCD_DEGREE_CHAR 0x01 + #define LCD_STR_THERMOMETER "\x02" // Still used with string concatenation + #define LCD_UPLEVEL_CHAR 0x03 + #define LCD_STR_REFRESH "\x04" + #define LCD_STR_FOLDER "\x05" + #define LCD_FEEDRATE_CHAR 0x06 + #define LCD_CLOCK_CHAR 0x07 + #define LCD_STR_ARROW_RIGHT ">" /* from the default character set */ +#endif + +/** + * Default LCD contrast for dogm-like LCD displays + */ +#if ENABLED(DOGLCD) + + #define HAS_LCD_CONTRAST ( \ + ENABLED(MAKRPANEL) \ + || ENABLED(CARTESIO_UI) \ + || ENABLED(VIKI2) \ + || ENABLED(AZSMZ_12864) \ + || ENABLED(miniVIKI) \ + || ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) \ + ) + + #if HAS_LCD_CONTRAST + #ifndef LCD_CONTRAST_MIN + #define LCD_CONTRAST_MIN 0 + #endif + #ifndef LCD_CONTRAST_MAX + #define LCD_CONTRAST_MAX 63 + #endif + #ifndef DEFAULT_LCD_CONTRAST + #define DEFAULT_LCD_CONTRAST 32 #endif #endif +#endif - /** - * I2C PANELS - */ +// Boot screens +#if DISABLED(ULTRA_LCD) + #undef SHOW_BOOTSCREEN +#elif !defined(BOOTSCREEN_TIMEOUT) + #define BOOTSCREEN_TIMEOUT 2500 +#endif - #if ENABLED(LCD_I2C_SAINSMART_YWROBOT) +#define HAS_DEBUG_MENU ENABLED(LCD_PROGRESS_BAR_TEST) - // Note: This controller requires F.Malpartida's LiquidCrystal_I2C library - // https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home +// MK2 Multiplexer forces SINGLENOZZLE to be enabled +#if ENABLED(MK2_MULTIPLEXER) + #define SINGLENOZZLE +#endif - #define LCD_I2C_TYPE_PCF8575 - #define LCD_I2C_ADDRESS 0x27 // I2C Address of the port expander - #define ULTIPANEL - - #elif ENABLED(LCD_I2C_PANELOLU2) - - // PANELOLU2 LCD with status LEDs, separate encoder and click inputs - - #define LCD_I2C_TYPE_MCP23017 - #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander - #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD - #define ULTIPANEL - - #elif ENABLED(LCD_I2C_VIKI) - - /** - * Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs - * - * This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 ) - * Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory. - * Note: The pause/stop/resume LCD button pin should be connected to the Arduino - * BTN_ENC pin (or set BTN_ENC to -1 if not used) - */ - #define LCD_I2C_TYPE_MCP23017 - #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander - #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD (requires LiquidTWI2 v1.2.3 or later) - #define ULTIPANEL - - #define ENCODER_FEEDRATE_DEADZONE 4 - - #define STD_ENCODER_PULSES_PER_STEP 1 - #define STD_ENCODER_STEPS_PER_MENU_ITEM 2 - - #elif ENABLED(G3D_PANEL) - - #define STD_ENCODER_PULSES_PER_STEP 2 - #define STD_ENCODER_STEPS_PER_MENU_ITEM 1 - - #elif ENABLED(miniVIKI) || ENABLED(VIKI2) \ - || ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) \ - || ENABLED(AZSMZ_12864) \ - || ENABLED(OLED_PANEL_TINYBOY2) \ - || ENABLED(BQ_LCD_SMART_CONTROLLER) \ - || ENABLED(LCD_I2C_PANELOLU2) \ - || ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) - #define STD_ENCODER_PULSES_PER_STEP 4 - #define STD_ENCODER_STEPS_PER_MENU_ITEM 1 +/** + * Extruders have some combination of stepper motors and hotends + * so we separate these concepts into the defines: + * + * EXTRUDERS - Number of Selectable Tools + * HOTENDS - Number of hotends, whether connected or separate + * E_STEPPERS - Number of actual E stepper motors + * E_MANUAL - Number of E steppers for LCD move options + * TOOL_E_INDEX - Index to use when getting/setting the tool state + * + */ +#if ENABLED(SINGLENOZZLE) || ENABLED(MIXING_EXTRUDER) // One hotend, one thermistor, no XY offset + #define HOTENDS 1 + #undef TEMP_SENSOR_1_AS_REDUNDANT + #undef HOTEND_OFFSET_X + #undef HOTEND_OFFSET_Y +#else // Two hotends + #define HOTENDS EXTRUDERS + #if ENABLED(SWITCHING_NOZZLE) && !defined(HOTEND_OFFSET_Z) + #define HOTEND_OFFSET_Z { 0 } #endif +#endif - #ifndef STD_ENCODER_PULSES_PER_STEP - #define STD_ENCODER_PULSES_PER_STEP 5 - #endif - #ifndef STD_ENCODER_STEPS_PER_MENU_ITEM - #define STD_ENCODER_STEPS_PER_MENU_ITEM 1 - #endif - #ifndef ENCODER_PULSES_PER_STEP - #define ENCODER_PULSES_PER_STEP STD_ENCODER_PULSES_PER_STEP - #endif - #ifndef ENCODER_STEPS_PER_MENU_ITEM - #define ENCODER_STEPS_PER_MENU_ITEM STD_ENCODER_STEPS_PER_MENU_ITEM - #endif - #ifndef ENCODER_FEEDRATE_DEADZONE - #define ENCODER_FEEDRATE_DEADZONE 6 - #endif +#define HOTEND_LOOP() for (int8_t e = 0; e < HOTENDS; e++) - // Shift register panels - // --------------------- - // 2 wire Non-latching LCD SR from: - // https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection +#if HOTENDS == 1 + #define HOTEND_INDEX 0 +#else + #define HOTEND_INDEX e +#endif - #if ENABLED(SAV_3DLCD) - #define SR_LCD_2W_NL // Non latching 2 wire shift register - #define ULTIPANEL - #endif - - #if ENABLED(DOGLCD) // Change number of lines to match the DOG graphic display - #ifndef LCD_WIDTH - #define LCD_WIDTH 22 - #endif - #ifndef LCD_HEIGHT - #define LCD_HEIGHT 5 - #endif - #endif - - #if ENABLED(ULTIPANEL) - #define NEWPANEL // Disable this if you actually have no click-encoder panel - #define ULTRA_LCD - #ifndef LCD_WIDTH - #define LCD_WIDTH 20 - #endif - #ifndef LCD_HEIGHT - #define LCD_HEIGHT 4 - #endif - #elif ENABLED(ULTRA_LCD) // no panel but just LCD - #ifndef LCD_WIDTH - #define LCD_WIDTH 16 - #endif - #ifndef LCD_HEIGHT - #define LCD_HEIGHT 2 - #endif - #endif - - #if ENABLED(DOGLCD) - /* Custom characters defined in font dogm_font_data_Marlin_symbols.h / Marlin_symbols.fon */ - // \x00 intentionally skipped to avoid problems in strings - #define LCD_STR_REFRESH "\x01" - #define LCD_STR_FOLDER "\x02" - #define LCD_STR_ARROW_RIGHT "\x03" - #define LCD_STR_UPLEVEL "\x04" - #define LCD_STR_CLOCK "\x05" - #define LCD_STR_FEEDRATE "\x06" - #define LCD_STR_BEDTEMP "\x07" - #define LCD_STR_THERMOMETER "\x08" - #define LCD_STR_DEGREE "\x09" - - #define LCD_STR_SPECIAL_MAX '\x09' - // Maximum here is 0x1F because 0x20 is ' ' (space) and the normal charsets begin. - // Better stay below 0x10 because DISPLAY_CHARSET_HD44780_WESTERN begins here. - - // Symbol characters - #define LCD_STR_FILAM_DIA "\xf8" - #define LCD_STR_FILAM_MUL "\xa4" +#if ENABLED(SWITCHING_EXTRUDER) || ENABLED(MIXING_EXTRUDER) // Unified E axis + #if ENABLED(MIXING_EXTRUDER) + #define E_STEPPERS MIXING_STEPPERS #else - /* Custom characters defined in the first 8 characters of the LCD */ - #define LCD_BEDTEMP_CHAR 0x00 // Print only as a char. This will have 'unexpected' results when used in a string! - #define LCD_DEGREE_CHAR 0x01 - #define LCD_STR_THERMOMETER "\x02" // Still used with string concatenation - #define LCD_UPLEVEL_CHAR 0x03 - #define LCD_STR_REFRESH "\x04" - #define LCD_STR_FOLDER "\x05" - #define LCD_FEEDRATE_CHAR 0x06 - #define LCD_CLOCK_CHAR 0x07 - #define LCD_STR_ARROW_RIGHT ">" /* from the default character set */ + #define E_STEPPERS 1 // One E stepper #endif + #define E_MANUAL 1 + #define TOOL_E_INDEX 0 +#else + #define E_STEPPERS EXTRUDERS + #define E_MANUAL EXTRUDERS + #define TOOL_E_INDEX current_block->active_extruder +#endif - /** - * Default LCD contrast for dogm-like LCD displays - */ - #if ENABLED(DOGLCD) +/** + * DISTINCT_E_FACTORS affects how some E factors are accessed + */ +#if ENABLED(DISTINCT_E_FACTORS) && E_STEPPERS > 1 + #define XYZE_N (XYZ + E_STEPPERS) + #define E_AXIS_N (E_AXIS + extruder) +#else + #undef DISTINCT_E_FACTORS + #define XYZE_N XYZE + #define E_AXIS_N E_AXIS +#endif - #define HAS_LCD_CONTRAST ( \ - ENABLED(MAKRPANEL) \ - || ENABLED(CARTESIO_UI) \ - || ENABLED(VIKI2) \ - || ENABLED(AZSMZ_12864) \ - || ENABLED(miniVIKI) \ - || ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) \ - ) - - #if HAS_LCD_CONTRAST - #ifndef LCD_CONTRAST_MIN - #define LCD_CONTRAST_MIN 0 - #endif - #ifndef LCD_CONTRAST_MAX - #define LCD_CONTRAST_MAX 63 - #endif - #ifndef DEFAULT_LCD_CONTRAST - #define DEFAULT_LCD_CONTRAST 32 - #endif - #endif +/** + * The BLTouch Probe emulates a servo probe + * and uses "special" angles for its state. + */ +#if ENABLED(BLTOUCH) + #ifndef Z_ENDSTOP_SERVO_NR + #define Z_ENDSTOP_SERVO_NR 0 #endif - - // Boot screens - #if DISABLED(ULTRA_LCD) - #undef SHOW_BOOTSCREEN - #elif !defined(BOOTSCREEN_TIMEOUT) - #define BOOTSCREEN_TIMEOUT 2500 + #ifndef NUM_SERVOS + #define NUM_SERVOS (Z_ENDSTOP_SERVO_NR + 1) #endif - - #define HAS_DEBUG_MENU ENABLED(LCD_PROGRESS_BAR_TEST) - - // MK2 Multiplexer forces SINGLENOZZLE to be enabled - #if ENABLED(MK2_MULTIPLEXER) - #define SINGLENOZZLE + #undef DEACTIVATE_SERVOS_AFTER_MOVE + #if NUM_SERVOS == 1 + #undef SERVO_DELAY + #define SERVO_DELAY { 50 } #endif - - /** - * Extruders have some combination of stepper motors and hotends - * so we separate these concepts into the defines: - * - * EXTRUDERS - Number of Selectable Tools - * HOTENDS - Number of hotends, whether connected or separate - * E_STEPPERS - Number of actual E stepper motors - * E_MANUAL - Number of E steppers for LCD move options - * TOOL_E_INDEX - Index to use when getting/setting the tool state - * - */ - #if ENABLED(SINGLENOZZLE) || ENABLED(MIXING_EXTRUDER) // One hotend, one thermistor, no XY offset - #define HOTENDS 1 - #undef TEMP_SENSOR_1_AS_REDUNDANT - #undef HOTEND_OFFSET_X - #undef HOTEND_OFFSET_Y - #else // Two hotends - #define HOTENDS EXTRUDERS - #if ENABLED(SWITCHING_NOZZLE) && !defined(HOTEND_OFFSET_Z) - #define HOTEND_OFFSET_Z { 0 } - #endif + #ifndef BLTOUCH_DELAY + #define BLTOUCH_DELAY 375 #endif + #undef Z_SERVO_ANGLES + #define Z_SERVO_ANGLES { BLTOUCH_DEPLOY, BLTOUCH_STOW } - #define HOTEND_LOOP() for (int8_t e = 0; e < HOTENDS; e++) + #define BLTOUCH_DEPLOY 10 + #define BLTOUCH_STOW 90 + #define BLTOUCH_SELFTEST 120 + #define BLTOUCH_RESET 160 + #define _TEST_BLTOUCH(P) (READ(P##_PIN) != P##_ENDSTOP_INVERTING) - #if HOTENDS == 1 - #define HOTEND_INDEX 0 + // Always disable probe pin inverting for BLTouch + #undef Z_MIN_PROBE_ENDSTOP_INVERTING + #define Z_MIN_PROBE_ENDSTOP_INVERTING false + + #if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) + #undef Z_MIN_ENDSTOP_INVERTING + #define Z_MIN_ENDSTOP_INVERTING false + #define TEST_BLTOUCH() _TEST_BLTOUCH(Z_MIN) #else - #define HOTEND_INDEX e + #define TEST_BLTOUCH() _TEST_BLTOUCH(Z_MIN_PROBE) #endif +#endif - #if ENABLED(SWITCHING_EXTRUDER) || ENABLED(MIXING_EXTRUDER) // Unified E axis - #if ENABLED(MIXING_EXTRUDER) - #define E_STEPPERS MIXING_STEPPERS - #else - #define E_STEPPERS 1 // One E stepper - #endif - #define E_MANUAL 1 - #define TOOL_E_INDEX 0 - #else - #define E_STEPPERS EXTRUDERS - #define E_MANUAL EXTRUDERS - #define TOOL_E_INDEX current_block->active_extruder - #endif +/** + * Set a flag for a servo probe + */ +#define HAS_Z_SERVO_ENDSTOP (defined(Z_ENDSTOP_SERVO_NR) && Z_ENDSTOP_SERVO_NR >= 0) - /** - * DISTINCT_E_FACTORS affects how some E factors are accessed - */ - #if ENABLED(DISTINCT_E_FACTORS) && E_STEPPERS > 1 - #define XYZE_N (XYZ + E_STEPPERS) - #define E_AXIS_N (E_AXIS + extruder) - #else - #undef DISTINCT_E_FACTORS - #define XYZE_N XYZE - #define E_AXIS_N E_AXIS - #endif +/** + * UBL has its own manual probing, so this just causes trouble. + */ +#if ENABLED(AUTO_BED_LEVELING_UBL) + #undef PROBE_MANUALLY +#endif - /** - * The BLTouch Probe emulates a servo probe - * and uses "special" angles for its state. - */ - #if ENABLED(BLTOUCH) - #ifndef Z_ENDSTOP_SERVO_NR - #define Z_ENDSTOP_SERVO_NR 0 - #endif - #ifndef NUM_SERVOS - #define NUM_SERVOS (Z_ENDSTOP_SERVO_NR + 1) - #endif - #undef DEACTIVATE_SERVOS_AFTER_MOVE - #if NUM_SERVOS == 1 - #undef SERVO_DELAY - #define SERVO_DELAY { 50 } - #endif - #ifndef BLTOUCH_DELAY - #define BLTOUCH_DELAY 375 - #endif - #undef Z_SERVO_ANGLES - #define Z_SERVO_ANGLES { BLTOUCH_DEPLOY, BLTOUCH_STOW } +/** + * Set a flag for any enabled probe + */ +#define PROBE_SELECTED (ENABLED(PROBE_MANUALLY) || ENABLED(FIX_MOUNTED_PROBE) || ENABLED(Z_PROBE_ALLEN_KEY) || HAS_Z_SERVO_ENDSTOP || ENABLED(Z_PROBE_SLED) || ENABLED(SOLENOID_PROBE)) - #define BLTOUCH_DEPLOY 10 - #define BLTOUCH_STOW 90 - #define BLTOUCH_SELFTEST 120 - #define BLTOUCH_RESET 160 - #define _TEST_BLTOUCH(P) (READ(P##_PIN) != P##_ENDSTOP_INVERTING) +/** + * Clear probe pin settings when no probe is selected + */ +#if !PROBE_SELECTED || ENABLED(PROBE_MANUALLY) + #undef Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN + #undef Z_MIN_PROBE_ENDSTOP +#endif - // Always disable probe pin inverting for BLTouch - #undef Z_MIN_PROBE_ENDSTOP_INVERTING - #define Z_MIN_PROBE_ENDSTOP_INVERTING false - - #if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) - #undef Z_MIN_ENDSTOP_INVERTING - #define Z_MIN_ENDSTOP_INVERTING false - #define TEST_BLTOUCH() _TEST_BLTOUCH(Z_MIN) - #else - #define TEST_BLTOUCH() _TEST_BLTOUCH(Z_MIN_PROBE) - #endif - #endif - - /** - * Set a flag for a servo probe - */ - #define HAS_Z_SERVO_ENDSTOP (defined(Z_ENDSTOP_SERVO_NR) && Z_ENDSTOP_SERVO_NR >= 0) - - /** - * UBL has its own manual probing, so this just causes trouble. - */ - #if ENABLED(AUTO_BED_LEVELING_UBL) - #undef PROBE_MANUALLY - #endif - - /** - * Set a flag for any enabled probe - */ - #define PROBE_SELECTED (ENABLED(PROBE_MANUALLY) || ENABLED(FIX_MOUNTED_PROBE) || ENABLED(Z_PROBE_ALLEN_KEY) || HAS_Z_SERVO_ENDSTOP || ENABLED(Z_PROBE_SLED) || ENABLED(SOLENOID_PROBE)) - - /** - * Clear probe pin settings when no probe is selected - */ - #if !PROBE_SELECTED || ENABLED(PROBE_MANUALLY) - #undef Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN - #undef Z_MIN_PROBE_ENDSTOP - #endif - - #define HAS_SOFTWARE_ENDSTOPS (ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)) - #define HAS_RESUME_CONTINUE (ENABLED(NEWPANEL) || ENABLED(EMERGENCY_PARSER)) - #define HAS_COLOR_LEDS (ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)) +#define HAS_SOFTWARE_ENDSTOPS (ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)) +#define HAS_RESUME_CONTINUE (ENABLED(NEWPANEL) || ENABLED(EMERGENCY_PARSER)) +#define HAS_COLOR_LEDS (ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)) #endif // CONDITIONALS_LCD_H diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index b9f5e7db15..b37cc5792b 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -28,1001 +28,1002 @@ #ifndef CONDITIONALS_POST_H #define CONDITIONALS_POST_H - #define AVR_ATmega2560_FAMILY_PLUS_70 ( \ - MB(BQ_ZUM_MEGA_3D) \ - || MB(MIGHTYBOARD_REVE) \ - || MB(MINIRAMBO) \ - || MB(SCOOVO_X9H) \ - ) +#define AVR_ATmega2560_FAMILY_PLUS_70 ( \ + MB(BQ_ZUM_MEGA_3D) \ + || MB(MIGHTYBOARD_REVE) \ + || MB(MINIRAMBO) \ + || MB(SCOOVO_X9H) \ +) - #define IS_SCARA (ENABLED(MORGAN_SCARA) || ENABLED(MAKERARM_SCARA)) - #define IS_KINEMATIC (ENABLED(DELTA) || IS_SCARA) - #define IS_CARTESIAN !IS_KINEMATIC +#define IS_SCARA (ENABLED(MORGAN_SCARA) || ENABLED(MAKERARM_SCARA)) +#define IS_KINEMATIC (ENABLED(DELTA) || IS_SCARA) +#define IS_CARTESIAN !IS_KINEMATIC - /** - * Axis lengths and center - */ - #define X_MAX_LENGTH (X_MAX_POS - (X_MIN_POS)) - #define Y_MAX_LENGTH (Y_MAX_POS - (Y_MIN_POS)) - #define Z_MAX_LENGTH (Z_MAX_POS - (Z_MIN_POS)) +/** + * Axis lengths and center + */ +#define X_MAX_LENGTH (X_MAX_POS - (X_MIN_POS)) +#define Y_MAX_LENGTH (Y_MAX_POS - (Y_MIN_POS)) +#define Z_MAX_LENGTH (Z_MAX_POS - (Z_MIN_POS)) - // Defined only if the sanity-check is bypassed - #ifndef X_BED_SIZE - #define X_BED_SIZE X_MAX_LENGTH +// Defined only if the sanity-check is bypassed +#ifndef X_BED_SIZE + #define X_BED_SIZE X_MAX_LENGTH +#endif +#ifndef Y_BED_SIZE + #define Y_BED_SIZE Y_MAX_LENGTH +#endif + +// Require 0,0 bed center for Delta and SCARA +#if IS_KINEMATIC + #define BED_CENTER_AT_0_0 +#endif + +// Define center values for future use +#if ENABLED(BED_CENTER_AT_0_0) + #define X_CENTER 0 + #define Y_CENTER 0 +#else + #define X_CENTER ((X_BED_SIZE) / 2) + #define Y_CENTER ((Y_BED_SIZE) / 2) +#endif +#define Z_CENTER ((Z_MIN_POS + Z_MAX_POS) / 2) + +// Get the linear boundaries of the bed +#define X_MIN_BED (X_CENTER - (X_BED_SIZE) / 2) +#define X_MAX_BED (X_CENTER + (X_BED_SIZE) / 2) +#define Y_MIN_BED (Y_CENTER - (Y_BED_SIZE) / 2) +#define Y_MAX_BED (Y_CENTER + (Y_BED_SIZE) / 2) + +/** + * CoreXY, CoreXZ, and CoreYZ - and their reverse + */ +#define CORE_IS_XY (ENABLED(COREXY) || ENABLED(COREYX)) +#define CORE_IS_XZ (ENABLED(COREXZ) || ENABLED(COREZX)) +#define CORE_IS_YZ (ENABLED(COREYZ) || ENABLED(COREZY)) +#define IS_CORE (CORE_IS_XY || CORE_IS_XZ || CORE_IS_YZ) +#if IS_CORE + #if CORE_IS_XY + #define CORE_AXIS_1 A_AXIS + #define CORE_AXIS_2 B_AXIS + #define NORMAL_AXIS Z_AXIS + #elif CORE_IS_XZ + #define CORE_AXIS_1 A_AXIS + #define NORMAL_AXIS Y_AXIS + #define CORE_AXIS_2 C_AXIS + #elif CORE_IS_YZ + #define NORMAL_AXIS X_AXIS + #define CORE_AXIS_1 B_AXIS + #define CORE_AXIS_2 C_AXIS #endif - #ifndef Y_BED_SIZE - #define Y_BED_SIZE Y_MAX_LENGTH - #endif - - // Require 0,0 bed center for Delta and SCARA - #if IS_KINEMATIC - #define BED_CENTER_AT_0_0 - #endif - - // Define center values for future use - #if ENABLED(BED_CENTER_AT_0_0) - #define X_CENTER 0 - #define Y_CENTER 0 + #if (ENABLED(COREYX) || ENABLED(COREZX) || ENABLED(COREZY)) + #define CORESIGN(n) (-(n)) #else - #define X_CENTER ((X_BED_SIZE) / 2) - #define Y_CENTER ((Y_BED_SIZE) / 2) + #define CORESIGN(n) (n) #endif - #define Z_CENTER ((Z_MIN_POS + Z_MAX_POS) / 2) +#endif - // Get the linear boundaries of the bed - #define X_MIN_BED (X_CENTER - (X_BED_SIZE) / 2) - #define X_MAX_BED (X_CENTER + (X_BED_SIZE) / 2) - #define Y_MIN_BED (Y_CENTER - (Y_BED_SIZE) / 2) - #define Y_MAX_BED (Y_CENTER + (Y_BED_SIZE) / 2) +/** + * No adjustable bed on non-cartesians + */ +#if IS_KINEMATIC + #undef LEVEL_BED_CORNERS +#endif - /** - * CoreXY, CoreXZ, and CoreYZ - and their reverse - */ - #define CORE_IS_XY (ENABLED(COREXY) || ENABLED(COREYX)) - #define CORE_IS_XZ (ENABLED(COREXZ) || ENABLED(COREZX)) - #define CORE_IS_YZ (ENABLED(COREYZ) || ENABLED(COREZY)) - #define IS_CORE (CORE_IS_XY || CORE_IS_XZ || CORE_IS_YZ) - #if IS_CORE - #if CORE_IS_XY - #define CORE_AXIS_1 A_AXIS - #define CORE_AXIS_2 B_AXIS - #define NORMAL_AXIS Z_AXIS - #elif CORE_IS_XZ - #define CORE_AXIS_1 A_AXIS - #define NORMAL_AXIS Y_AXIS - #define CORE_AXIS_2 C_AXIS - #elif CORE_IS_YZ - #define NORMAL_AXIS X_AXIS - #define CORE_AXIS_1 B_AXIS - #define CORE_AXIS_2 C_AXIS - #endif - #if (ENABLED(COREYX) || ENABLED(COREZX) || ENABLED(COREZY)) - #define CORESIGN(n) (-(n)) - #else - #define CORESIGN(n) (n) - #endif - #endif +/** + * SCARA cannot use SLOWDOWN and requires QUICKHOME + */ +#if IS_SCARA + #undef SLOWDOWN + #define QUICK_HOME +#endif - /** - * No adjustable bed on non-cartesians - */ - #if IS_KINEMATIC - #undef LEVEL_BED_CORNERS - #endif - - /** - * SCARA cannot use SLOWDOWN and requires QUICKHOME - */ - #if IS_SCARA - #undef SLOWDOWN - #define QUICK_HOME - #endif - - /** - * Set the home position based on settings or manual overrides - */ - #ifdef MANUAL_X_HOME_POS - #define X_HOME_POS MANUAL_X_HOME_POS - #elif ENABLED(BED_CENTER_AT_0_0) - #if ENABLED(DELTA) - #define X_HOME_POS 0 - #else - #define X_HOME_POS ((X_BED_SIZE) * (X_HOME_DIR) * 0.5) - #endif - #else - #if ENABLED(DELTA) - #define X_HOME_POS (X_MIN_POS + (X_BED_SIZE) * 0.5) - #else - #define X_HOME_POS (X_HOME_DIR < 0 ? X_MIN_POS : X_MAX_POS) - #endif - #endif - - #ifdef MANUAL_Y_HOME_POS - #define Y_HOME_POS MANUAL_Y_HOME_POS - #elif ENABLED(BED_CENTER_AT_0_0) - #if ENABLED(DELTA) - #define Y_HOME_POS 0 - #else - #define Y_HOME_POS ((Y_BED_SIZE) * (Y_HOME_DIR) * 0.5) - #endif - #else - #if ENABLED(DELTA) - #define Y_HOME_POS (Y_MIN_POS + (Y_BED_SIZE) * 0.5) - #else - #define Y_HOME_POS (Y_HOME_DIR < 0 ? Y_MIN_POS : Y_MAX_POS) - #endif - #endif - - #ifdef MANUAL_Z_HOME_POS - #define Z_HOME_POS MANUAL_Z_HOME_POS - #else - #define Z_HOME_POS (Z_HOME_DIR < 0 ? Z_MIN_POS : Z_MAX_POS) - #endif - - /** - * If DELTA_HEIGHT isn't defined use the old setting - */ - #if ENABLED(DELTA) && !defined(DELTA_HEIGHT) - #define DELTA_HEIGHT Z_HOME_POS - #endif - - /** - * Auto Bed Leveling and Z Probe Repeatability Test - */ - #define HOMING_Z_WITH_PROBE (HAS_BED_PROBE && Z_HOME_DIR < 0 && ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)) - - /** - * Z Sled Probe requires Z_SAFE_HOMING - */ - #if ENABLED(Z_PROBE_SLED) - #define Z_SAFE_HOMING - #endif - - /** - * DELTA should ignore Z_SAFE_HOMING and SLOWDOWN - */ +/** + * Set the home position based on settings or manual overrides + */ +#ifdef MANUAL_X_HOME_POS + #define X_HOME_POS MANUAL_X_HOME_POS +#elif ENABLED(BED_CENTER_AT_0_0) #if ENABLED(DELTA) - #undef Z_SAFE_HOMING - #undef SLOWDOWN - #endif - - /** - * Safe Homing Options - */ - #if ENABLED(Z_SAFE_HOMING) - #ifndef Z_SAFE_HOMING_X_POINT - #define Z_SAFE_HOMING_X_POINT X_CENTER - #endif - #ifndef Z_SAFE_HOMING_Y_POINT - #define Z_SAFE_HOMING_Y_POINT Y_CENTER - #endif - #define X_TILT_FULCRUM Z_SAFE_HOMING_X_POINT - #define Y_TILT_FULCRUM Z_SAFE_HOMING_Y_POINT + #define X_HOME_POS 0 #else - #define X_TILT_FULCRUM X_HOME_POS - #define Y_TILT_FULCRUM Y_HOME_POS + #define X_HOME_POS ((X_BED_SIZE) * (X_HOME_DIR) * 0.5) #endif +#else + #if ENABLED(DELTA) + #define X_HOME_POS (X_MIN_POS + (X_BED_SIZE) * 0.5) + #else + #define X_HOME_POS (X_HOME_DIR < 0 ? X_MIN_POS : X_MAX_POS) + #endif +#endif +#ifdef MANUAL_Y_HOME_POS + #define Y_HOME_POS MANUAL_Y_HOME_POS +#elif ENABLED(BED_CENTER_AT_0_0) + #if ENABLED(DELTA) + #define Y_HOME_POS 0 + #else + #define Y_HOME_POS ((Y_BED_SIZE) * (Y_HOME_DIR) * 0.5) + #endif +#else + #if ENABLED(DELTA) + #define Y_HOME_POS (Y_MIN_POS + (Y_BED_SIZE) * 0.5) + #else + #define Y_HOME_POS (Y_HOME_DIR < 0 ? Y_MIN_POS : Y_MAX_POS) + #endif +#endif + +#ifdef MANUAL_Z_HOME_POS + #define Z_HOME_POS MANUAL_Z_HOME_POS +#else + #define Z_HOME_POS (Z_HOME_DIR < 0 ? Z_MIN_POS : Z_MAX_POS) +#endif + +/** + * If DELTA_HEIGHT isn't defined use the old setting + */ +#if ENABLED(DELTA) && !defined(DELTA_HEIGHT) + #define DELTA_HEIGHT Z_HOME_POS +#endif + +/** + * Auto Bed Leveling and Z Probe Repeatability Test + */ +#define HOMING_Z_WITH_PROBE (HAS_BED_PROBE && Z_HOME_DIR < 0 && ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)) + +/** + * Z Sled Probe requires Z_SAFE_HOMING + */ +#if ENABLED(Z_PROBE_SLED) + #define Z_SAFE_HOMING +#endif + +/** + * DELTA should ignore Z_SAFE_HOMING and SLOWDOWN + */ +#if ENABLED(DELTA) + #undef Z_SAFE_HOMING + #undef SLOWDOWN +#endif + +/** + * Safe Homing Options + */ +#if ENABLED(Z_SAFE_HOMING) + #ifndef Z_SAFE_HOMING_X_POINT + #define Z_SAFE_HOMING_X_POINT X_CENTER + #endif + #ifndef Z_SAFE_HOMING_Y_POINT + #define Z_SAFE_HOMING_Y_POINT Y_CENTER + #endif + #define X_TILT_FULCRUM Z_SAFE_HOMING_X_POINT + #define Y_TILT_FULCRUM Z_SAFE_HOMING_Y_POINT +#else + #define X_TILT_FULCRUM X_HOME_POS + #define Y_TILT_FULCRUM Y_HOME_POS +#endif + +/** + * Host keep alive + */ +#ifndef DEFAULT_KEEPALIVE_INTERVAL + #define DEFAULT_KEEPALIVE_INTERVAL 2 +#endif + +#ifdef CPU_32_BIT /** - * Host keep alive + * Hidden options for developer */ - #ifndef DEFAULT_KEEPALIVE_INTERVAL - #define DEFAULT_KEEPALIVE_INTERVAL 2 + // Double stepping starts at STEP_DOUBLER_FREQUENCY + 1, quad stepping starts at STEP_DOUBLER_FREQUENCY * 2 + 1 + #ifndef STEP_DOUBLER_FREQUENCY + #if ENABLED(LIN_ADVANCE) + #define STEP_DOUBLER_FREQUENCY 60000 // Hz + #else + #define STEP_DOUBLER_FREQUENCY 80000 // Hz + #endif #endif + // Disable double / quad stepping + //#define DISABLE_MULTI_STEPPING +#endif +/** + * Provide a MAX_AUTORETRACT for older configs + */ +#if ENABLED(FWRETRACT) && !defined(MAX_AUTORETRACT) + #define MAX_AUTORETRACT 99 +#endif + +/** + * MAX_STEP_FREQUENCY differs for TOSHIBA + */ +#if ENABLED(CONFIG_STEPPERS_TOSHIBA) #ifdef CPU_32_BIT - /** - * Hidden options for developer - */ - // Double stepping starts at STEP_DOUBLER_FREQUENCY + 1, quad stepping starts at STEP_DOUBLER_FREQUENCY * 2 + 1 - #ifndef STEP_DOUBLER_FREQUENCY - #if ENABLED(LIN_ADVANCE) - #define STEP_DOUBLER_FREQUENCY 60000 // Hz - #else - #define STEP_DOUBLER_FREQUENCY 80000 // Hz - #endif - #endif - // Disable double / quad stepping - //#define DISABLE_MULTI_STEPPING - #endif - - /** - * Provide a MAX_AUTORETRACT for older configs - */ - #if ENABLED(FWRETRACT) && !defined(MAX_AUTORETRACT) - #define MAX_AUTORETRACT 99 - #endif - - /** - * MAX_STEP_FREQUENCY differs for TOSHIBA - */ - #if ENABLED(CONFIG_STEPPERS_TOSHIBA) - #ifdef CPU_32_BIT - #define MAX_STEP_FREQUENCY STEP_DOUBLER_FREQUENCY // Max step frequency for Toshiba Stepper Controllers, 96kHz is close to maximum for an Arduino Due - #else - #define MAX_STEP_FREQUENCY 10000 // Max step frequency for Toshiba Stepper Controllers - #endif + #define MAX_STEP_FREQUENCY STEP_DOUBLER_FREQUENCY // Max step frequency for Toshiba Stepper Controllers, 96kHz is close to maximum for an Arduino Due #else - #ifdef CPU_32_BIT - #define MAX_STEP_FREQUENCY (STEP_DOUBLER_FREQUENCY * 4) // Max step frequency for the Due is approx. 330kHz - #else - #define MAX_STEP_FREQUENCY 40000 // Max step frequency for Ultimaker (5000 pps / half step) - #endif + #define MAX_STEP_FREQUENCY 10000 // Max step frequency for Toshiba Stepper Controllers #endif - - // MS1 MS2 Stepper Driver Microstepping mode table - #define MICROSTEP1 LOW,LOW - #define MICROSTEP2 HIGH,LOW - #define MICROSTEP4 LOW,HIGH - #define MICROSTEP8 HIGH,HIGH - #ifdef __SAM3X8E__ - #if MB(ALLIGATOR) - #define MICROSTEP16 LOW,LOW - #define MICROSTEP32 HIGH,HIGH - #else - #define MICROSTEP16 HIGH,HIGH - #endif +#else + #ifdef CPU_32_BIT + #define MAX_STEP_FREQUENCY (STEP_DOUBLER_FREQUENCY * 4) // Max step frequency for the Due is approx. 330kHz #else - #define MICROSTEP16 HIGH,HIGH + #define MAX_STEP_FREQUENCY 40000 // Max step frequency for Ultimaker (5000 pps / half step) #endif +#endif - /** - * Override here because this is set in Configuration_adv.h - */ - #if ENABLED(ULTIPANEL) && DISABLED(ELB_FULL_GRAPHIC_CONTROLLER) - #undef SD_DETECT_INVERTED +// MS1 MS2 Stepper Driver Microstepping mode table +#define MICROSTEP1 LOW,LOW +#define MICROSTEP2 HIGH,LOW +#define MICROSTEP4 LOW,HIGH +#define MICROSTEP8 HIGH,HIGH +#ifdef __SAM3X8E__ + #if MB(ALLIGATOR) + #define MICROSTEP16 LOW,LOW + #define MICROSTEP32 HIGH,HIGH + #else + #define MICROSTEP16 HIGH,HIGH #endif +#else +#define MICROSTEP16 HIGH,HIGH +#endif - /** - * Set defaults for missing (newer) options - */ - #ifndef DISABLE_INACTIVE_X - #define DISABLE_INACTIVE_X DISABLE_X - #endif - #ifndef DISABLE_INACTIVE_Y - #define DISABLE_INACTIVE_Y DISABLE_Y - #endif - #ifndef DISABLE_INACTIVE_Z - #define DISABLE_INACTIVE_Z DISABLE_Z - #endif - #ifndef DISABLE_INACTIVE_E - #define DISABLE_INACTIVE_E DISABLE_E - #endif +/** + * Override here because this is set in Configuration_adv.h + */ +#if ENABLED(ULTIPANEL) && DISABLED(ELB_FULL_GRAPHIC_CONTROLLER) + #undef SD_DETECT_INVERTED +#endif - // Power Signal Control Definitions - // By default use ATX definition - #ifndef POWER_SUPPLY - #define POWER_SUPPLY 1 +/** + * Set defaults for missing (newer) options + */ +#ifndef DISABLE_INACTIVE_X + #define DISABLE_INACTIVE_X DISABLE_X +#endif +#ifndef DISABLE_INACTIVE_Y + #define DISABLE_INACTIVE_Y DISABLE_Y +#endif +#ifndef DISABLE_INACTIVE_Z + #define DISABLE_INACTIVE_Z DISABLE_Z +#endif +#ifndef DISABLE_INACTIVE_E + #define DISABLE_INACTIVE_E DISABLE_E +#endif + +// Power Signal Control Definitions +// By default use ATX definition +#ifndef POWER_SUPPLY + #define POWER_SUPPLY 1 +#endif +#if (POWER_SUPPLY == 1) // 1 = ATX + #define PS_ON_AWAKE LOW + #define PS_ON_ASLEEP HIGH +#elif (POWER_SUPPLY == 2) // 2 = X-Box 360 203W + #define PS_ON_AWAKE HIGH + #define PS_ON_ASLEEP LOW +#endif +#define HAS_POWER_SWITCH (POWER_SUPPLY > 0 && PIN_EXISTS(PS_ON)) + +/** + * Temp Sensor defines + */ +#if TEMP_SENSOR_0 == -3 + #define HEATER_0_USES_MAX6675 + #define MAX6675_IS_MAX31855 + #define MAX6675_TMIN -270 + #define MAX6675_TMAX 1800 +#elif TEMP_SENSOR_0 == -2 + #define HEATER_0_USES_MAX6675 + #define MAX6675_TMIN 0 + #define MAX6675_TMAX 1024 +#elif TEMP_SENSOR_0 == -1 + #define HEATER_0_USES_AD595 +#elif TEMP_SENSOR_0 == 0 + #undef HEATER_0_MINTEMP + #undef HEATER_0_MAXTEMP +#elif TEMP_SENSOR_0 > 0 + #define THERMISTORHEATER_0 TEMP_SENSOR_0 + #define HEATER_0_USES_THERMISTOR +#endif + +#if TEMP_SENSOR_1 <= -2 + #error "MAX6675 / MAX31855 Thermocouples not supported for TEMP_SENSOR_1" +#elif TEMP_SENSOR_1 == -1 + #define HEATER_1_USES_AD595 +#elif TEMP_SENSOR_1 == 0 + #undef HEATER_1_MINTEMP + #undef HEATER_1_MAXTEMP +#elif TEMP_SENSOR_1 > 0 + #define THERMISTORHEATER_1 TEMP_SENSOR_1 + #define HEATER_1_USES_THERMISTOR +#endif + +#if TEMP_SENSOR_2 <= -2 + #error "MAX6675 / MAX31855 Thermocouples not supported for TEMP_SENSOR_2" +#elif TEMP_SENSOR_2 == -1 + #define HEATER_2_USES_AD595 +#elif TEMP_SENSOR_2 == 0 + #undef HEATER_2_MINTEMP + #undef HEATER_2_MAXTEMP +#elif TEMP_SENSOR_2 > 0 + #define THERMISTORHEATER_2 TEMP_SENSOR_2 + #define HEATER_2_USES_THERMISTOR +#endif + +#if TEMP_SENSOR_3 <= -2 + #error "MAX6675 / MAX31855 Thermocouples not supported for TEMP_SENSOR_3" +#elif TEMP_SENSOR_3 == -1 + #define HEATER_3_USES_AD595 +#elif TEMP_SENSOR_3 == 0 + #undef HEATER_3_MINTEMP + #undef HEATER_3_MAXTEMP +#elif TEMP_SENSOR_3 > 0 + #define THERMISTORHEATER_3 TEMP_SENSOR_3 + #define HEATER_3_USES_THERMISTOR +#endif + +#if TEMP_SENSOR_4 <= -2 + #error "MAX6675 / MAX31855 Thermocouples not supported for TEMP_SENSOR_4" +#elif TEMP_SENSOR_4 == -1 + #define HEATER_4_USES_AD595 +#elif TEMP_SENSOR_4 == 0 + #undef HEATER_4_MINTEMP + #undef HEATER_4_MAXTEMP +#elif TEMP_SENSOR_4 > 0 + #define THERMISTORHEATER_4 TEMP_SENSOR_4 + #define HEATER_4_USES_THERMISTOR +#endif + +#if TEMP_SENSOR_BED <= -2 + #error "MAX6675 / MAX31855 Thermocouples not supported for TEMP_SENSOR_BED" +#elif TEMP_SENSOR_BED == -1 + #define BED_USES_AD595 +#elif TEMP_SENSOR_BED == 0 + #undef BED_MINTEMP + #undef BED_MAXTEMP +#elif TEMP_SENSOR_BED > 0 + #define THERMISTORBED TEMP_SENSOR_BED + #define BED_USES_THERMISTOR +#endif + +#ifdef __SAM3X8E__ + #define HEATER_USES_AD595 (ENABLED(HEATER_0_USES_AD595) || ENABLED(HEATER_1_USES_AD595) || ENABLED(HEATER_2_USES_AD595) || ENABLED(HEATER_3_USES_AD595)) +#endif + +/** + * Flags for PID handling + */ +#define HAS_PID_HEATING (ENABLED(PIDTEMP) || ENABLED(PIDTEMPBED)) +#define HAS_PID_FOR_BOTH (ENABLED(PIDTEMP) && ENABLED(PIDTEMPBED)) + +/** + * Default hotend offsets, if not defined + */ +#if HOTENDS > 1 + #ifndef HOTEND_OFFSET_X + #define HOTEND_OFFSET_X { 0 } // X offsets for each extruder #endif - #if (POWER_SUPPLY == 1) // 1 = ATX - #define PS_ON_AWAKE LOW - #define PS_ON_ASLEEP HIGH - #elif (POWER_SUPPLY == 2) // 2 = X-Box 360 203W - #define PS_ON_AWAKE HIGH - #define PS_ON_ASLEEP LOW + #ifndef HOTEND_OFFSET_Y + #define HOTEND_OFFSET_Y { 0 } // Y offsets for each extruder #endif - #define HAS_POWER_SWITCH (POWER_SUPPLY > 0 && PIN_EXISTS(PS_ON)) - - /** - * Temp Sensor defines - */ - #if TEMP_SENSOR_0 == -3 - #define HEATER_0_USES_MAX6675 - #define MAX6675_IS_MAX31855 - #define MAX6675_TMIN -270 - #define MAX6675_TMAX 1800 - #elif TEMP_SENSOR_0 == -2 - #define HEATER_0_USES_MAX6675 - #define MAX6675_TMIN 0 - #define MAX6675_TMAX 1024 - #elif TEMP_SENSOR_0 == -1 - #define HEATER_0_USES_AD595 - #elif TEMP_SENSOR_0 == 0 - #undef HEATER_0_MINTEMP - #undef HEATER_0_MAXTEMP - #elif TEMP_SENSOR_0 > 0 - #define THERMISTORHEATER_0 TEMP_SENSOR_0 - #define HEATER_0_USES_THERMISTOR + #if !defined(HOTEND_OFFSET_Z) && (ENABLED(DUAL_X_CARRIAGE) || ENABLED(SWITCHING_NOZZLE)) + #define HOTEND_OFFSET_Z { 0 } #endif +#endif - #if TEMP_SENSOR_1 <= -2 - #error "MAX6675 / MAX31855 Thermocouples not supported for TEMP_SENSOR_1" - #elif TEMP_SENSOR_1 == -1 - #define HEATER_1_USES_AD595 - #elif TEMP_SENSOR_1 == 0 - #undef HEATER_1_MINTEMP - #undef HEATER_1_MAXTEMP - #elif TEMP_SENSOR_1 > 0 - #define THERMISTORHEATER_1 TEMP_SENSOR_1 - #define HEATER_1_USES_THERMISTOR +/** + * ARRAY_BY_EXTRUDERS based on EXTRUDERS + */ +#define ARRAY_BY_EXTRUDERS(...) ARRAY_N(EXTRUDERS, __VA_ARGS__) +#define ARRAY_BY_EXTRUDERS1(v1) ARRAY_BY_EXTRUDERS(v1, v1, v1, v1, v1, v1) + +/** + * ARRAY_BY_HOTENDS based on HOTENDS + */ +#define ARRAY_BY_HOTENDS(...) ARRAY_N(HOTENDS, __VA_ARGS__) +#define ARRAY_BY_HOTENDS1(v1) ARRAY_BY_HOTENDS(v1, v1, v1, v1, v1, v1) + +/** + * Z_DUAL_ENDSTOPS endstop reassignment + */ +#if ENABLED(Z_DUAL_ENDSTOPS) + #define _XMIN_ 100 + #define _YMIN_ 200 + #define _ZMIN_ 300 + #define _XMAX_ 101 + #define _YMAX_ 201 + #define _ZMAX_ 301 + #if Z2_USE_ENDSTOP == _XMIN_ + #define USE_XMIN_PLUG + #elif Z2_USE_ENDSTOP == _XMAX_ + #define USE_XMAX_PLUG + #elif Z2_USE_ENDSTOP == _YMIN_ + #define USE_YMIN_PLUG + #elif Z2_USE_ENDSTOP == _YMAX_ + #define USE_YMAX_PLUG + #elif Z2_USE_ENDSTOP == _ZMIN_ + #define USE_ZMIN_PLUG + #elif Z2_USE_ENDSTOP == _ZMAX_ + #define USE_ZMAX_PLUG #endif - - #if TEMP_SENSOR_2 <= -2 - #error "MAX6675 / MAX31855 Thermocouples not supported for TEMP_SENSOR_2" - #elif TEMP_SENSOR_2 == -1 - #define HEATER_2_USES_AD595 - #elif TEMP_SENSOR_2 == 0 - #undef HEATER_2_MINTEMP - #undef HEATER_2_MAXTEMP - #elif TEMP_SENSOR_2 > 0 - #define THERMISTORHEATER_2 TEMP_SENSOR_2 - #define HEATER_2_USES_THERMISTOR - #endif - - #if TEMP_SENSOR_3 <= -2 - #error "MAX6675 / MAX31855 Thermocouples not supported for TEMP_SENSOR_3" - #elif TEMP_SENSOR_3 == -1 - #define HEATER_3_USES_AD595 - #elif TEMP_SENSOR_3 == 0 - #undef HEATER_3_MINTEMP - #undef HEATER_3_MAXTEMP - #elif TEMP_SENSOR_3 > 0 - #define THERMISTORHEATER_3 TEMP_SENSOR_3 - #define HEATER_3_USES_THERMISTOR - #endif - - #if TEMP_SENSOR_4 <= -2 - #error "MAX6675 / MAX31855 Thermocouples not supported for TEMP_SENSOR_4" - #elif TEMP_SENSOR_4 == -1 - #define HEATER_4_USES_AD595 - #elif TEMP_SENSOR_4 == 0 - #undef HEATER_4_MINTEMP - #undef HEATER_4_MAXTEMP - #elif TEMP_SENSOR_4 > 0 - #define THERMISTORHEATER_4 TEMP_SENSOR_4 - #define HEATER_4_USES_THERMISTOR - #endif - - #if TEMP_SENSOR_BED <= -2 - #error "MAX6675 / MAX31855 Thermocouples not supported for TEMP_SENSOR_BED" - #elif TEMP_SENSOR_BED == -1 - #define BED_USES_AD595 - #elif TEMP_SENSOR_BED == 0 - #undef BED_MINTEMP - #undef BED_MAXTEMP - #elif TEMP_SENSOR_BED > 0 - #define THERMISTORBED TEMP_SENSOR_BED - #define BED_USES_THERMISTOR - #endif - - #ifdef __SAM3X8E__ - #define HEATER_USES_AD595 (ENABLED(HEATER_0_USES_AD595) || ENABLED(HEATER_1_USES_AD595) || ENABLED(HEATER_2_USES_AD595) || ENABLED(HEATER_3_USES_AD595)) - #endif - - /** - * Flags for PID handling - */ - #define HAS_PID_HEATING (ENABLED(PIDTEMP) || ENABLED(PIDTEMPBED)) - #define HAS_PID_FOR_BOTH (ENABLED(PIDTEMP) && ENABLED(PIDTEMPBED)) - - /** - * Default hotend offsets, if not defined - */ - #if HOTENDS > 1 - #ifndef HOTEND_OFFSET_X - #define HOTEND_OFFSET_X { 0 } // X offsets for each extruder - #endif - #ifndef HOTEND_OFFSET_Y - #define HOTEND_OFFSET_Y { 0 } // Y offsets for each extruder - #endif - #if !defined(HOTEND_OFFSET_Z) && (ENABLED(DUAL_X_CARRIAGE) || ENABLED(SWITCHING_NOZZLE)) - #define HOTEND_OFFSET_Z { 0 } - #endif - #endif - - /** - * ARRAY_BY_EXTRUDERS based on EXTRUDERS - */ - #define ARRAY_BY_EXTRUDERS(...) ARRAY_N(EXTRUDERS, __VA_ARGS__) - #define ARRAY_BY_EXTRUDERS1(v1) ARRAY_BY_EXTRUDERS(v1, v1, v1, v1, v1, v1) - - /** - * ARRAY_BY_HOTENDS based on HOTENDS - */ - #define ARRAY_BY_HOTENDS(...) ARRAY_N(HOTENDS, __VA_ARGS__) - #define ARRAY_BY_HOTENDS1(v1) ARRAY_BY_HOTENDS(v1, v1, v1, v1, v1, v1) - - /** - * Z_DUAL_ENDSTOPS endstop reassignment - */ - #if ENABLED(Z_DUAL_ENDSTOPS) - #define _XMIN_ 100 - #define _YMIN_ 200 - #define _ZMIN_ 300 - #define _XMAX_ 101 - #define _YMAX_ 201 - #define _ZMAX_ 301 + #if Z_HOME_DIR > 0 #if Z2_USE_ENDSTOP == _XMIN_ - #define USE_XMIN_PLUG + #define Z2_MAX_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING + #define Z2_MAX_PIN X_MIN_PIN #elif Z2_USE_ENDSTOP == _XMAX_ - #define USE_XMAX_PLUG + #define Z2_MAX_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING + #define Z2_MAX_PIN X_MAX_PIN #elif Z2_USE_ENDSTOP == _YMIN_ - #define USE_YMIN_PLUG + #define Z2_MAX_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING + #define Z2_MAX_PIN Y_MIN_PIN #elif Z2_USE_ENDSTOP == _YMAX_ - #define USE_YMAX_PLUG + #define Z2_MAX_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING + #define Z2_MAX_PIN Y_MAX_PIN #elif Z2_USE_ENDSTOP == _ZMIN_ - #define USE_ZMIN_PLUG + #define Z2_MAX_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING + #define Z2_MAX_PIN Z_MIN_PIN #elif Z2_USE_ENDSTOP == _ZMAX_ - #define USE_ZMAX_PLUG - #endif - #if Z_HOME_DIR > 0 - #if Z2_USE_ENDSTOP == _XMIN_ - #define Z2_MAX_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING - #define Z2_MAX_PIN X_MIN_PIN - #elif Z2_USE_ENDSTOP == _XMAX_ - #define Z2_MAX_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING - #define Z2_MAX_PIN X_MAX_PIN - #elif Z2_USE_ENDSTOP == _YMIN_ - #define Z2_MAX_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING - #define Z2_MAX_PIN Y_MIN_PIN - #elif Z2_USE_ENDSTOP == _YMAX_ - #define Z2_MAX_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING - #define Z2_MAX_PIN Y_MAX_PIN - #elif Z2_USE_ENDSTOP == _ZMIN_ - #define Z2_MAX_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING - #define Z2_MAX_PIN Z_MIN_PIN - #elif Z2_USE_ENDSTOP == _ZMAX_ - #define Z2_MAX_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING - #define Z2_MAX_PIN Z_MAX_PIN - #else - #define Z2_MAX_ENDSTOP_INVERTING false - #endif + #define Z2_MAX_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING + #define Z2_MAX_PIN Z_MAX_PIN #else - #if Z2_USE_ENDSTOP == _XMIN_ - #define Z2_MIN_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING - #define Z2_MIN_PIN X_MIN_PIN - #elif Z2_USE_ENDSTOP == _XMAX_ - #define Z2_MIN_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING - #define Z2_MIN_PIN X_MAX_PIN - #elif Z2_USE_ENDSTOP == _YMIN_ - #define Z2_MIN_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING - #define Z2_MIN_PIN Y_MIN_PIN - #elif Z2_USE_ENDSTOP == _YMAX_ - #define Z2_MIN_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING - #define Z2_MIN_PIN Y_MAX_PIN - #elif Z2_USE_ENDSTOP == _ZMIN_ - #define Z2_MIN_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING - #define Z2_MIN_PIN Z_MIN_PIN - #elif Z2_USE_ENDSTOP == _ZMAX_ - #define Z2_MIN_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING - #define Z2_MIN_PIN Z_MAX_PIN - #else - #define Z2_MIN_ENDSTOP_INVERTING false - #endif + #define Z2_MAX_ENDSTOP_INVERTING false #endif - #endif - - // Is an endstop plug used for the Z2 endstop or the bed probe? - #define IS_Z2_OR_PROBE(A,M) ( \ - (ENABLED(Z_DUAL_ENDSTOPS) && Z2_USE_ENDSTOP == _##A##M##_) \ - || (ENABLED(Z_MIN_PROBE_ENDSTOP) && Z_MIN_PROBE_PIN == A##_##M##_PIN ) ) - - /** - * Set ENDSTOPPULLUPS for active endstop switches - */ - #if ENABLED(ENDSTOPPULLUPS) - #if ENABLED(USE_XMAX_PLUG) - #define ENDSTOPPULLUP_XMAX - #endif - #if ENABLED(USE_YMAX_PLUG) - #define ENDSTOPPULLUP_YMAX - #endif - #if ENABLED(USE_ZMAX_PLUG) - #define ENDSTOPPULLUP_ZMAX - #endif - #if ENABLED(USE_XMIN_PLUG) - #define ENDSTOPPULLUP_XMIN - #endif - #if ENABLED(USE_YMIN_PLUG) - #define ENDSTOPPULLUP_YMIN - #endif - #if ENABLED(USE_ZMIN_PLUG) - #define ENDSTOPPULLUP_ZMIN - #endif - #endif - - /** - * Shorthand for pin tests, used wherever needed - */ - - // Steppers - #define HAS_X_ENABLE (PIN_EXISTS(X_ENABLE)) - #define HAS_X_DIR (PIN_EXISTS(X_DIR)) - #define HAS_X_STEP (PIN_EXISTS(X_STEP)) - #define HAS_X_MICROSTEPS (PIN_EXISTS(X_MS1)) - - #define HAS_X2_ENABLE (PIN_EXISTS(X2_ENABLE)) - #define HAS_X2_DIR (PIN_EXISTS(X2_DIR)) - #define HAS_X2_STEP (PIN_EXISTS(X2_STEP)) - #define HAS_Y_MICROSTEPS (PIN_EXISTS(Y_MS1)) - - #define HAS_Y_ENABLE (PIN_EXISTS(Y_ENABLE)) - #define HAS_Y_DIR (PIN_EXISTS(Y_DIR)) - #define HAS_Y_STEP (PIN_EXISTS(Y_STEP)) - #define HAS_Z_MICROSTEPS (PIN_EXISTS(Z_MS1)) - - #define HAS_Y2_ENABLE (PIN_EXISTS(Y2_ENABLE)) - #define HAS_Y2_DIR (PIN_EXISTS(Y2_DIR)) - #define HAS_Y2_STEP (PIN_EXISTS(Y2_STEP)) - - #define HAS_Z_ENABLE (PIN_EXISTS(Z_ENABLE)) - #define HAS_Z_DIR (PIN_EXISTS(Z_DIR)) - #define HAS_Z_STEP (PIN_EXISTS(Z_STEP)) - - #define HAS_Z2_ENABLE (PIN_EXISTS(Z2_ENABLE)) - #define HAS_Z2_DIR (PIN_EXISTS(Z2_DIR)) - #define HAS_Z2_STEP (PIN_EXISTS(Z2_STEP)) - - // Extruder steppers and solenoids - #define HAS_E0_ENABLE (PIN_EXISTS(E0_ENABLE)) - #define HAS_E0_DIR (PIN_EXISTS(E0_DIR)) - #define HAS_E0_STEP (PIN_EXISTS(E0_STEP)) - #define HAS_E0_MICROSTEPS (PIN_EXISTS(E0_MS1)) - #define HAS_SOLENOID_0 (PIN_EXISTS(SOL0)) - - #define HAS_E1_ENABLE (PIN_EXISTS(E1_ENABLE)) - #define HAS_E1_DIR (PIN_EXISTS(E1_DIR)) - #define HAS_E1_STEP (PIN_EXISTS(E1_STEP)) - #define HAS_E1_MICROSTEPS (PIN_EXISTS(E1_MS1)) - #define HAS_SOLENOID_1 (PIN_EXISTS(SOL1)) - - #define HAS_E2_ENABLE (PIN_EXISTS(E2_ENABLE)) - #define HAS_E2_DIR (PIN_EXISTS(E2_DIR)) - #define HAS_E2_STEP (PIN_EXISTS(E2_STEP)) - #define HAS_E2_MICROSTEPS (PIN_EXISTS(E2_MS1)) - #define HAS_SOLENOID_2 (PIN_EXISTS(SOL2)) - - #define HAS_E3_ENABLE (PIN_EXISTS(E3_ENABLE)) - #define HAS_E3_DIR (PIN_EXISTS(E3_DIR)) - #define HAS_E3_STEP (PIN_EXISTS(E3_STEP)) - #define HAS_E3_MICROSTEPS (PIN_EXISTS(E3_MS1)) - #define HAS_SOLENOID_3 (PIN_EXISTS(SOL3)) - - #define HAS_E4_ENABLE (PIN_EXISTS(E4_ENABLE)) - #define HAS_E4_DIR (PIN_EXISTS(E4_DIR)) - #define HAS_E4_STEP (PIN_EXISTS(E4_STEP)) - #define HAS_E4_MICROSTEPS (PIN_EXISTS(E4_MS1)) - #define HAS_SOLENOID_4 (PIN_EXISTS(SOL4)) - - // Endstops and bed probe - #define HAS_X_MIN (PIN_EXISTS(X_MIN) && !IS_Z2_OR_PROBE(X,MIN)) - #define HAS_X_MAX (PIN_EXISTS(X_MAX) && !IS_Z2_OR_PROBE(X,MAX)) - #define HAS_Y_MIN (PIN_EXISTS(Y_MIN) && !IS_Z2_OR_PROBE(Y,MIN)) - #define HAS_Y_MAX (PIN_EXISTS(Y_MAX) && !IS_Z2_OR_PROBE(Y,MAX)) - #define HAS_Z_MIN (PIN_EXISTS(Z_MIN) && !IS_Z2_OR_PROBE(Z,MIN)) - #define HAS_Z_MAX (PIN_EXISTS(Z_MAX) && !IS_Z2_OR_PROBE(Z,MAX)) - #define HAS_Z2_MIN (PIN_EXISTS(Z2_MIN)) - #define HAS_Z2_MAX (PIN_EXISTS(Z2_MAX)) - #define HAS_Z_MIN_PROBE_PIN (PIN_EXISTS(Z_MIN_PROBE)) - - // Thermistors - #define HAS_TEMP_0 (PIN_EXISTS(TEMP_0) && TEMP_SENSOR_0 != 0 && TEMP_SENSOR_0 > -2) - #define HAS_TEMP_1 (PIN_EXISTS(TEMP_1) && TEMP_SENSOR_1 != 0 && TEMP_SENSOR_1 > -2) - #define HAS_TEMP_2 (PIN_EXISTS(TEMP_2) && TEMP_SENSOR_2 != 0 && TEMP_SENSOR_2 > -2) - #define HAS_TEMP_3 (PIN_EXISTS(TEMP_3) && TEMP_SENSOR_3 != 0 && TEMP_SENSOR_3 > -2) - #define HAS_TEMP_4 (PIN_EXISTS(TEMP_4) && TEMP_SENSOR_4 != 0 && TEMP_SENSOR_4 > -2) - #define HAS_TEMP_HOTEND (HAS_TEMP_0 || ENABLED(HEATER_0_USES_MAX6675)) - #define HAS_TEMP_BED (PIN_EXISTS(TEMP_BED) && TEMP_SENSOR_BED != 0 && TEMP_SENSOR_BED > -2) - - // Heaters - #define HAS_HEATER_0 (PIN_EXISTS(HEATER_0)) - #define HAS_HEATER_1 (PIN_EXISTS(HEATER_1)) - #define HAS_HEATER_2 (PIN_EXISTS(HEATER_2)) - #define HAS_HEATER_3 (PIN_EXISTS(HEATER_3)) - #define HAS_HEATER_4 (PIN_EXISTS(HEATER_4)) - #define HAS_HEATER_BED (PIN_EXISTS(HEATER_BED)) - - // Thermal protection - #define HAS_THERMALLY_PROTECTED_BED (ENABLED(THERMAL_PROTECTION_BED) && HAS_TEMP_BED && HAS_HEATER_BED) - #define WATCH_HOTENDS (ENABLED(THERMAL_PROTECTION_HOTENDS) && WATCH_TEMP_PERIOD > 0) - #define WATCH_THE_BED (HAS_THERMALLY_PROTECTED_BED && WATCH_BED_TEMP_PERIOD > 0) - - // Auto fans - #define HAS_AUTO_FAN_0 (PIN_EXISTS(E0_AUTO_FAN)) - #define HAS_AUTO_FAN_1 (HOTENDS > 1 && PIN_EXISTS(E1_AUTO_FAN)) - #define HAS_AUTO_FAN_2 (HOTENDS > 2 && PIN_EXISTS(E2_AUTO_FAN)) - #define HAS_AUTO_FAN_3 (HOTENDS > 3 && PIN_EXISTS(E3_AUTO_FAN)) - #define HAS_AUTO_FAN_4 (HOTENDS > 4 && PIN_EXISTS(E4_AUTO_FAN)) - #define HAS_AUTO_FAN (HAS_AUTO_FAN_0 || HAS_AUTO_FAN_1 || HAS_AUTO_FAN_2 || HAS_AUTO_FAN_3) - #define AUTO_1_IS_0 (E1_AUTO_FAN_PIN == E0_AUTO_FAN_PIN) - #define AUTO_2_IS_0 (E2_AUTO_FAN_PIN == E0_AUTO_FAN_PIN) - #define AUTO_2_IS_1 (E2_AUTO_FAN_PIN == E1_AUTO_FAN_PIN) - #define AUTO_3_IS_0 (E3_AUTO_FAN_PIN == E0_AUTO_FAN_PIN) - #define AUTO_3_IS_1 (E3_AUTO_FAN_PIN == E1_AUTO_FAN_PIN) - #define AUTO_3_IS_2 (E3_AUTO_FAN_PIN == E2_AUTO_FAN_PIN) - #define AUTO_4_IS_0 (E4_AUTO_FAN_PIN == E0_AUTO_FAN_PIN) - #define AUTO_4_IS_1 (E4_AUTO_FAN_PIN == E1_AUTO_FAN_PIN) - #define AUTO_4_IS_2 (E4_AUTO_FAN_PIN == E2_AUTO_FAN_PIN) - #define AUTO_4_IS_3 (E4_AUTO_FAN_PIN == E3_AUTO_FAN_PIN) - - // Other fans - #define HAS_FAN0 (PIN_EXISTS(FAN)) - #define HAS_FAN1 (PIN_EXISTS(FAN1) && CONTROLLER_FAN_PIN != FAN1_PIN && E0_AUTO_FAN_PIN != FAN1_PIN && E1_AUTO_FAN_PIN != FAN1_PIN && E2_AUTO_FAN_PIN != FAN1_PIN && E3_AUTO_FAN_PIN != FAN1_PIN) - #define HAS_FAN2 (PIN_EXISTS(FAN2) && CONTROLLER_FAN_PIN != FAN2_PIN && E0_AUTO_FAN_PIN != FAN2_PIN && E1_AUTO_FAN_PIN != FAN2_PIN && E2_AUTO_FAN_PIN != FAN2_PIN && E3_AUTO_FAN_PIN != FAN2_PIN) - #define HAS_CONTROLLER_FAN (PIN_EXISTS(CONTROLLER_FAN)) - - // Servos - #define HAS_SERVOS (defined(NUM_SERVOS) && NUM_SERVOS > 0) - #define HAS_SERVO_0 (PIN_EXISTS(SERVO0)) - #define HAS_SERVO_1 (PIN_EXISTS(SERVO1)) - #define HAS_SERVO_2 (PIN_EXISTS(SERVO2)) - #define HAS_SERVO_3 (PIN_EXISTS(SERVO3)) - - // Sensors - #define HAS_FILAMENT_WIDTH_SENSOR (PIN_EXISTS(FILWIDTH)) - #define HAS_FIL_RUNOUT (PIN_EXISTS(FIL_RUNOUT)) - - // User Interface - #define HAS_HOME (PIN_EXISTS(HOME)) - #define HAS_KILL (PIN_EXISTS(KILL)) - #define HAS_SUICIDE (PIN_EXISTS(SUICIDE)) - #define HAS_PHOTOGRAPH (PIN_EXISTS(PHOTOGRAPH)) - #define HAS_BUZZER (PIN_EXISTS(BEEPER) || ENABLED(LCD_USE_I2C_BUZZER)) - #define HAS_CASE_LIGHT (PIN_EXISTS(CASE_LIGHT) && ENABLED(CASE_LIGHT_ENABLE)) - - // Digital control - #define HAS_MICROSTEPS (HAS_X_MICROSTEPS || HAS_Y_MICROSTEPS || HAS_Z_MICROSTEPS || HAS_E0_MICROSTEPS || HAS_E1_MICROSTEPS || HAS_E2_MICROSTEPS || HAS_E3_MICROSTEPS || HAS_E4_MICROSTEPS) - #define HAS_STEPPER_RESET (PIN_EXISTS(STEPPER_RESET)) - #define HAS_DIGIPOTSS (PIN_EXISTS(DIGIPOTSS)) - #define HAS_MOTOR_CURRENT_PWM (PIN_EXISTS(MOTOR_CURRENT_PWM_XY) || PIN_EXISTS(MOTOR_CURRENT_PWM_Z) || PIN_EXISTS(MOTOR_CURRENT_PWM_E)) - - /** - * This setting is also used by M109 when trying to calculate - * a ballpark safe margin to prevent wait-forever situation. - */ - #ifndef EXTRUDE_MINTEMP - #define EXTRUDE_MINTEMP 170 - #endif - - /** - * Helper Macros for heaters and extruder fan - */ - #define WRITE_HEATER_0P(v) WRITE(HEATER_0_PIN, v) - #if HOTENDS > 1 || ENABLED(HEATERS_PARALLEL) - #define WRITE_HEATER_1(v) WRITE(HEATER_1_PIN, v) - #if HOTENDS > 2 - #define WRITE_HEATER_2(v) WRITE(HEATER_2_PIN, v) - #if HOTENDS > 3 - #define WRITE_HEATER_3(v) WRITE(HEATER_3_PIN, v) - #if HOTENDS > 4 - #define WRITE_HEATER_4(v) WRITE(HEATER_4_PIN, v) - #endif // HOTENDS > 4 - #endif // HOTENDS > 3 - #endif // HOTENDS > 2 - #endif // HOTENDS > 1 - #if ENABLED(HEATERS_PARALLEL) - #define WRITE_HEATER_0(v) { WRITE_HEATER_0P(v); WRITE_HEATER_1(v); } #else - #define WRITE_HEATER_0(v) WRITE_HEATER_0P(v) - #endif - - /** - * Heated bed requires settings - */ - #if HAS_HEATER_BED - #ifndef MAX_BED_POWER - #define MAX_BED_POWER 255 - #endif - #ifndef HEATER_BED_INVERTING - #define HEATER_BED_INVERTING false - #endif - #define WRITE_HEATER_BED(v) WRITE(HEATER_BED_PIN, (v) ^ HEATER_BED_INVERTING) - #endif - - /** - * Up to 3 PWM fans - */ - #if HAS_FAN2 - #define FAN_COUNT 3 - #elif HAS_FAN1 - #define FAN_COUNT 2 - #elif HAS_FAN0 - #define FAN_COUNT 1 - #else - #define FAN_COUNT 0 - #endif - - #if HAS_FAN0 - #define WRITE_FAN(v) WRITE(FAN_PIN, v) - #define WRITE_FAN0(v) WRITE_FAN(v) - #endif - #if HAS_FAN1 - #define WRITE_FAN1(v) WRITE(FAN1_PIN, v) - #endif - #if HAS_FAN2 - #define WRITE_FAN2(v) WRITE(FAN2_PIN, v) - #endif - #define WRITE_FAN_N(n, v) WRITE_FAN##n(v) - - /** - * Part Cooling fan multipliexer - */ - #define HAS_FANMUX PIN_EXISTS(FANMUX0) - - /** - * Servos and probes - */ - - #if HAS_SERVOS - #ifndef Z_ENDSTOP_SERVO_NR - #define Z_ENDSTOP_SERVO_NR -1 - #endif - #endif - - #define PROBE_PIN_CONFIGURED (HAS_Z_MIN_PROBE_PIN || (HAS_Z_MIN && ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN))) - #define HAS_BED_PROBE (PROBE_SELECTED && PROBE_PIN_CONFIGURED && DISABLED(PROBE_MANUALLY)) - - #if ENABLED(Z_PROBE_ALLEN_KEY) - #define PROBE_IS_TRIGGERED_WHEN_STOWED_TEST - #endif - - /** - * Bed Probe dependencies - */ - #if HAS_BED_PROBE - #if ENABLED(ENDSTOPPULLUPS) && HAS_Z_MIN_PROBE_PIN - #define ENDSTOPPULLUP_ZMIN_PROBE - #endif - #ifndef Z_PROBE_OFFSET_RANGE_MIN - #define Z_PROBE_OFFSET_RANGE_MIN -20 - #endif - #ifndef Z_PROBE_OFFSET_RANGE_MAX - #define Z_PROBE_OFFSET_RANGE_MAX 20 - #endif - #ifndef XY_PROBE_SPEED - #ifdef HOMING_FEEDRATE_XY - #define XY_PROBE_SPEED HOMING_FEEDRATE_XY - #else - #define XY_PROBE_SPEED 4000 - #endif - #endif - #if Z_CLEARANCE_BETWEEN_PROBES > Z_CLEARANCE_DEPLOY_PROBE - #define _Z_CLEARANCE_DEPLOY_PROBE Z_CLEARANCE_BETWEEN_PROBES + #if Z2_USE_ENDSTOP == _XMIN_ + #define Z2_MIN_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING + #define Z2_MIN_PIN X_MIN_PIN + #elif Z2_USE_ENDSTOP == _XMAX_ + #define Z2_MIN_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING + #define Z2_MIN_PIN X_MAX_PIN + #elif Z2_USE_ENDSTOP == _YMIN_ + #define Z2_MIN_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING + #define Z2_MIN_PIN Y_MIN_PIN + #elif Z2_USE_ENDSTOP == _YMAX_ + #define Z2_MIN_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING + #define Z2_MIN_PIN Y_MAX_PIN + #elif Z2_USE_ENDSTOP == _ZMIN_ + #define Z2_MIN_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING + #define Z2_MIN_PIN Z_MIN_PIN + #elif Z2_USE_ENDSTOP == _ZMAX_ + #define Z2_MIN_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING + #define Z2_MIN_PIN Z_MAX_PIN #else - #define _Z_CLEARANCE_DEPLOY_PROBE Z_CLEARANCE_DEPLOY_PROBE - #endif - #else - #undef X_PROBE_OFFSET_FROM_EXTRUDER - #undef Y_PROBE_OFFSET_FROM_EXTRUDER - #undef Z_PROBE_OFFSET_FROM_EXTRUDER - #define X_PROBE_OFFSET_FROM_EXTRUDER 0 - #define Y_PROBE_OFFSET_FROM_EXTRUDER 0 - #define Z_PROBE_OFFSET_FROM_EXTRUDER 0 - #endif - - /** - * Heater & Fan Pausing - */ - #if FAN_COUNT == 0 - #undef PROBING_FANS_OFF - #endif - #define QUIET_PROBING (HAS_BED_PROBE && (ENABLED(PROBING_HEATERS_OFF) || ENABLED(PROBING_FANS_OFF) || DELAY_BEFORE_PROBING > 0)) - #define HEATER_IDLE_HANDLER (ENABLED(ADVANCED_PAUSE_FEATURE) || ENABLED(PROBING_HEATERS_OFF)) - - /** - * Only constrain Z on DELTA / SCARA machines - */ - #if IS_KINEMATIC - #undef MIN_SOFTWARE_ENDSTOP_X - #undef MIN_SOFTWARE_ENDSTOP_Y - #undef MAX_SOFTWARE_ENDSTOP_X - #undef MAX_SOFTWARE_ENDSTOP_Y - #endif - - /** - * Delta endstops, radius/rod trimmers, angle trimmers - */ - #if ENABLED(DELTA) - #ifndef DELTA_CALIBRATION_RADIUS - #define DELTA_CALIBRATION_RADIUS DELTA_PRINTABLE_RADIUS - 10 - #endif - #ifndef DELTA_ENDSTOP_ADJ - #define DELTA_ENDSTOP_ADJ { 0, 0, 0 } - #endif - #ifndef DELTA_TOWER_ANGLE_TRIM - #define DELTA_TOWER_ANGLE_TRIM {0, 0, 0} - #endif - #ifndef DELTA_RADIUS_TRIM_TOWER - #define DELTA_RADIUS_TRIM_TOWER {0, 0, 0} - #endif - #ifndef DELTA_DIAGONAL_ROD_TRIM_TOWER - #define DELTA_DIAGONAL_ROD_TRIM_TOWER {0, 0, 0} + #define Z2_MIN_ENDSTOP_INVERTING false #endif #endif +#endif - /** - * Set granular options based on the specific type of leveling - */ +// Is an endstop plug used for the Z2 endstop or the bed probe? +#define IS_Z2_OR_PROBE(A,M) ( \ + (ENABLED(Z_DUAL_ENDSTOPS) && Z2_USE_ENDSTOP == _##A##M##_) \ + || (ENABLED(Z_MIN_PROBE_ENDSTOP) && Z_MIN_PROBE_PIN == A##_##M##_PIN ) ) - #define UBL_DELTA (ENABLED(AUTO_BED_LEVELING_UBL) && (ENABLED(DELTA) || ENABLED(UBL_GRANULAR_SEGMENTATION_FOR_CARTESIAN))) - #define ABL_PLANAR (ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_3POINT)) - #define ABL_GRID (ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)) - #define OLDSCHOOL_ABL (ABL_PLANAR || ABL_GRID) - #define HAS_ABL (OLDSCHOOL_ABL || ENABLED(AUTO_BED_LEVELING_UBL)) - #define HAS_LEVELING (HAS_ABL || ENABLED(MESH_BED_LEVELING)) - #define HAS_AUTOLEVEL (HAS_ABL && DISABLED(PROBE_MANUALLY)) - #define HAS_MESH (ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(MESH_BED_LEVELING)) - #define PLANNER_LEVELING (OLDSCHOOL_ABL || ENABLED(MESH_BED_LEVELING) || UBL_DELTA) - #define HAS_PROBING_PROCEDURE (HAS_ABL || ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST)) - #if HAS_PROBING_PROCEDURE - #define PROBE_BED_WIDTH abs(RIGHT_PROBE_BED_POSITION - (LEFT_PROBE_BED_POSITION)) - #define PROBE_BED_HEIGHT abs(BACK_PROBE_BED_POSITION - (FRONT_PROBE_BED_POSITION)) +/** + * Set ENDSTOPPULLUPS for active endstop switches + */ +#if ENABLED(ENDSTOPPULLUPS) + #if ENABLED(USE_XMAX_PLUG) + #define ENDSTOPPULLUP_XMAX #endif - - /** - * Buzzer/Speaker - */ - #if ENABLED(LCD_USE_I2C_BUZZER) - #ifndef LCD_FEEDBACK_FREQUENCY_HZ - #define LCD_FEEDBACK_FREQUENCY_HZ 1000 - #endif - #ifndef LCD_FEEDBACK_FREQUENCY_DURATION_MS - #define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 - #endif - #else - #ifndef LCD_FEEDBACK_FREQUENCY_HZ - #define LCD_FEEDBACK_FREQUENCY_HZ 5000 - #endif - #ifndef LCD_FEEDBACK_FREQUENCY_DURATION_MS - #define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2 - #endif + #if ENABLED(USE_YMAX_PLUG) + #define ENDSTOPPULLUP_YMAX #endif - - /** - * VIKI2, miniVIKI, and AZSMZ_12864 require DOGLCD_SCK and DOGLCD_MOSI to be defined. - */ - #if ENABLED(VIKI2) || ENABLED(miniVIKI) || ENABLED(AZSMZ_12864) - #ifndef DOGLCD_SCK - #define DOGLCD_SCK SCK_PIN - #endif - #ifndef DOGLCD_MOSI - #define DOGLCD_MOSI MOSI_PIN - #endif + #if ENABLED(USE_ZMAX_PLUG) + #define ENDSTOPPULLUP_ZMAX #endif + #if ENABLED(USE_XMIN_PLUG) + #define ENDSTOPPULLUP_XMIN + #endif + #if ENABLED(USE_YMIN_PLUG) + #define ENDSTOPPULLUP_YMIN + #endif + #if ENABLED(USE_ZMIN_PLUG) + #define ENDSTOPPULLUP_ZMIN + #endif +#endif - /** - * Z_HOMING_HEIGHT / Z_CLEARANCE_BETWEEN_PROBES - */ - #ifndef Z_HOMING_HEIGHT - #ifndef Z_CLEARANCE_BETWEEN_PROBES - #define Z_HOMING_HEIGHT 0 +/** + * Shorthand for pin tests, used wherever needed + */ + +// Steppers +#define HAS_X_ENABLE (PIN_EXISTS(X_ENABLE)) +#define HAS_X_DIR (PIN_EXISTS(X_DIR)) +#define HAS_X_STEP (PIN_EXISTS(X_STEP)) +#define HAS_X_MICROSTEPS (PIN_EXISTS(X_MS1)) + +#define HAS_X2_ENABLE (PIN_EXISTS(X2_ENABLE)) +#define HAS_X2_DIR (PIN_EXISTS(X2_DIR)) +#define HAS_X2_STEP (PIN_EXISTS(X2_STEP)) +#define HAS_Y_MICROSTEPS (PIN_EXISTS(Y_MS1)) + +#define HAS_Y_ENABLE (PIN_EXISTS(Y_ENABLE)) +#define HAS_Y_DIR (PIN_EXISTS(Y_DIR)) +#define HAS_Y_STEP (PIN_EXISTS(Y_STEP)) +#define HAS_Z_MICROSTEPS (PIN_EXISTS(Z_MS1)) + +#define HAS_Y2_ENABLE (PIN_EXISTS(Y2_ENABLE)) +#define HAS_Y2_DIR (PIN_EXISTS(Y2_DIR)) +#define HAS_Y2_STEP (PIN_EXISTS(Y2_STEP)) + +#define HAS_Z_ENABLE (PIN_EXISTS(Z_ENABLE)) +#define HAS_Z_DIR (PIN_EXISTS(Z_DIR)) +#define HAS_Z_STEP (PIN_EXISTS(Z_STEP)) + +#define HAS_Z2_ENABLE (PIN_EXISTS(Z2_ENABLE)) +#define HAS_Z2_DIR (PIN_EXISTS(Z2_DIR)) +#define HAS_Z2_STEP (PIN_EXISTS(Z2_STEP)) + +// Extruder steppers and solenoids +#define HAS_E0_ENABLE (PIN_EXISTS(E0_ENABLE)) +#define HAS_E0_DIR (PIN_EXISTS(E0_DIR)) +#define HAS_E0_STEP (PIN_EXISTS(E0_STEP)) +#define HAS_E0_MICROSTEPS (PIN_EXISTS(E0_MS1)) +#define HAS_SOLENOID_0 (PIN_EXISTS(SOL0)) + +#define HAS_E1_ENABLE (PIN_EXISTS(E1_ENABLE)) +#define HAS_E1_DIR (PIN_EXISTS(E1_DIR)) +#define HAS_E1_STEP (PIN_EXISTS(E1_STEP)) +#define HAS_E1_MICROSTEPS (PIN_EXISTS(E1_MS1)) +#define HAS_SOLENOID_1 (PIN_EXISTS(SOL1)) + +#define HAS_E2_ENABLE (PIN_EXISTS(E2_ENABLE)) +#define HAS_E2_DIR (PIN_EXISTS(E2_DIR)) +#define HAS_E2_STEP (PIN_EXISTS(E2_STEP)) +#define HAS_E2_MICROSTEPS (PIN_EXISTS(E2_MS1)) +#define HAS_SOLENOID_2 (PIN_EXISTS(SOL2)) + +#define HAS_E3_ENABLE (PIN_EXISTS(E3_ENABLE)) +#define HAS_E3_DIR (PIN_EXISTS(E3_DIR)) +#define HAS_E3_STEP (PIN_EXISTS(E3_STEP)) +#define HAS_E3_MICROSTEPS (PIN_EXISTS(E3_MS1)) +#define HAS_SOLENOID_3 (PIN_EXISTS(SOL3)) + +#define HAS_E4_ENABLE (PIN_EXISTS(E4_ENABLE)) +#define HAS_E4_DIR (PIN_EXISTS(E4_DIR)) +#define HAS_E4_STEP (PIN_EXISTS(E4_STEP)) +#define HAS_E4_MICROSTEPS (PIN_EXISTS(E4_MS1)) +#define HAS_SOLENOID_4 (PIN_EXISTS(SOL4)) + +// Endstops and bed probe +#define HAS_X_MIN (PIN_EXISTS(X_MIN) && !IS_Z2_OR_PROBE(X,MIN)) +#define HAS_X_MAX (PIN_EXISTS(X_MAX) && !IS_Z2_OR_PROBE(X,MAX)) +#define HAS_Y_MIN (PIN_EXISTS(Y_MIN) && !IS_Z2_OR_PROBE(Y,MIN)) +#define HAS_Y_MAX (PIN_EXISTS(Y_MAX) && !IS_Z2_OR_PROBE(Y,MAX)) +#define HAS_Z_MIN (PIN_EXISTS(Z_MIN) && !IS_Z2_OR_PROBE(Z,MIN)) +#define HAS_Z_MAX (PIN_EXISTS(Z_MAX) && !IS_Z2_OR_PROBE(Z,MAX)) +#define HAS_Z2_MIN (PIN_EXISTS(Z2_MIN)) +#define HAS_Z2_MAX (PIN_EXISTS(Z2_MAX)) +#define HAS_Z_MIN_PROBE_PIN (PIN_EXISTS(Z_MIN_PROBE)) + +// Thermistors +#define HAS_TEMP_0 (PIN_EXISTS(TEMP_0) && TEMP_SENSOR_0 != 0 && TEMP_SENSOR_0 > -2) +#define HAS_TEMP_1 (PIN_EXISTS(TEMP_1) && TEMP_SENSOR_1 != 0 && TEMP_SENSOR_1 > -2) +#define HAS_TEMP_2 (PIN_EXISTS(TEMP_2) && TEMP_SENSOR_2 != 0 && TEMP_SENSOR_2 > -2) +#define HAS_TEMP_3 (PIN_EXISTS(TEMP_3) && TEMP_SENSOR_3 != 0 && TEMP_SENSOR_3 > -2) +#define HAS_TEMP_4 (PIN_EXISTS(TEMP_4) && TEMP_SENSOR_4 != 0 && TEMP_SENSOR_4 > -2) +#define HAS_TEMP_HOTEND (HAS_TEMP_0 || ENABLED(HEATER_0_USES_MAX6675)) +#define HAS_TEMP_BED (PIN_EXISTS(TEMP_BED) && TEMP_SENSOR_BED != 0 && TEMP_SENSOR_BED > -2) + +// Heaters +#define HAS_HEATER_0 (PIN_EXISTS(HEATER_0)) +#define HAS_HEATER_1 (PIN_EXISTS(HEATER_1)) +#define HAS_HEATER_2 (PIN_EXISTS(HEATER_2)) +#define HAS_HEATER_3 (PIN_EXISTS(HEATER_3)) +#define HAS_HEATER_4 (PIN_EXISTS(HEATER_4)) +#define HAS_HEATER_BED (PIN_EXISTS(HEATER_BED)) + +// Thermal protection +#define HAS_THERMALLY_PROTECTED_BED (ENABLED(THERMAL_PROTECTION_BED) && HAS_TEMP_BED && HAS_HEATER_BED) +#define WATCH_HOTENDS (ENABLED(THERMAL_PROTECTION_HOTENDS) && WATCH_TEMP_PERIOD > 0) +#define WATCH_THE_BED (HAS_THERMALLY_PROTECTED_BED && WATCH_BED_TEMP_PERIOD > 0) + +// Auto fans +#define HAS_AUTO_FAN_0 (PIN_EXISTS(E0_AUTO_FAN)) +#define HAS_AUTO_FAN_1 (HOTENDS > 1 && PIN_EXISTS(E1_AUTO_FAN)) +#define HAS_AUTO_FAN_2 (HOTENDS > 2 && PIN_EXISTS(E2_AUTO_FAN)) +#define HAS_AUTO_FAN_3 (HOTENDS > 3 && PIN_EXISTS(E3_AUTO_FAN)) +#define HAS_AUTO_FAN_4 (HOTENDS > 4 && PIN_EXISTS(E4_AUTO_FAN)) +#define HAS_AUTO_FAN (HAS_AUTO_FAN_0 || HAS_AUTO_FAN_1 || HAS_AUTO_FAN_2 || HAS_AUTO_FAN_3) +#define AUTO_1_IS_0 (E1_AUTO_FAN_PIN == E0_AUTO_FAN_PIN) +#define AUTO_2_IS_0 (E2_AUTO_FAN_PIN == E0_AUTO_FAN_PIN) +#define AUTO_2_IS_1 (E2_AUTO_FAN_PIN == E1_AUTO_FAN_PIN) +#define AUTO_3_IS_0 (E3_AUTO_FAN_PIN == E0_AUTO_FAN_PIN) +#define AUTO_3_IS_1 (E3_AUTO_FAN_PIN == E1_AUTO_FAN_PIN) +#define AUTO_3_IS_2 (E3_AUTO_FAN_PIN == E2_AUTO_FAN_PIN) +#define AUTO_4_IS_0 (E4_AUTO_FAN_PIN == E0_AUTO_FAN_PIN) +#define AUTO_4_IS_1 (E4_AUTO_FAN_PIN == E1_AUTO_FAN_PIN) +#define AUTO_4_IS_2 (E4_AUTO_FAN_PIN == E2_AUTO_FAN_PIN) +#define AUTO_4_IS_3 (E4_AUTO_FAN_PIN == E3_AUTO_FAN_PIN) + +// Other fans +#define HAS_FAN0 (PIN_EXISTS(FAN)) +#define HAS_FAN1 (PIN_EXISTS(FAN1) && CONTROLLER_FAN_PIN != FAN1_PIN && E0_AUTO_FAN_PIN != FAN1_PIN && E1_AUTO_FAN_PIN != FAN1_PIN && E2_AUTO_FAN_PIN != FAN1_PIN && E3_AUTO_FAN_PIN != FAN1_PIN) +#define HAS_FAN2 (PIN_EXISTS(FAN2) && CONTROLLER_FAN_PIN != FAN2_PIN && E0_AUTO_FAN_PIN != FAN2_PIN && E1_AUTO_FAN_PIN != FAN2_PIN && E2_AUTO_FAN_PIN != FAN2_PIN && E3_AUTO_FAN_PIN != FAN2_PIN) +#define HAS_CONTROLLER_FAN (PIN_EXISTS(CONTROLLER_FAN)) + +// Servos +#define HAS_SERVOS (defined(NUM_SERVOS) && NUM_SERVOS > 0) +#define HAS_SERVO_0 (PIN_EXISTS(SERVO0)) +#define HAS_SERVO_1 (PIN_EXISTS(SERVO1)) +#define HAS_SERVO_2 (PIN_EXISTS(SERVO2)) +#define HAS_SERVO_3 (PIN_EXISTS(SERVO3)) + +// Sensors +#define HAS_FILAMENT_WIDTH_SENSOR (PIN_EXISTS(FILWIDTH)) +#define HAS_FIL_RUNOUT (PIN_EXISTS(FIL_RUNOUT)) + +// User Interface +#define HAS_HOME (PIN_EXISTS(HOME)) +#define HAS_KILL (PIN_EXISTS(KILL)) +#define HAS_SUICIDE (PIN_EXISTS(SUICIDE)) +#define HAS_PHOTOGRAPH (PIN_EXISTS(PHOTOGRAPH)) +#define HAS_BUZZER (PIN_EXISTS(BEEPER) || ENABLED(LCD_USE_I2C_BUZZER)) +#define HAS_CASE_LIGHT (PIN_EXISTS(CASE_LIGHT) && ENABLED(CASE_LIGHT_ENABLE)) + +// Digital control +#define HAS_MICROSTEPS (HAS_X_MICROSTEPS || HAS_Y_MICROSTEPS || HAS_Z_MICROSTEPS || HAS_E0_MICROSTEPS || HAS_E1_MICROSTEPS || HAS_E2_MICROSTEPS || HAS_E3_MICROSTEPS || HAS_E4_MICROSTEPS) +#define HAS_STEPPER_RESET (PIN_EXISTS(STEPPER_RESET)) +#define HAS_DIGIPOTSS (PIN_EXISTS(DIGIPOTSS)) +#define HAS_MOTOR_CURRENT_PWM (PIN_EXISTS(MOTOR_CURRENT_PWM_XY) || PIN_EXISTS(MOTOR_CURRENT_PWM_Z) || PIN_EXISTS(MOTOR_CURRENT_PWM_E)) + +/** + * This setting is also used by M109 when trying to calculate + * a ballpark safe margin to prevent wait-forever situation. + */ +#ifndef EXTRUDE_MINTEMP + #define EXTRUDE_MINTEMP 170 +#endif + +/** + * Helper Macros for heaters and extruder fan + */ +#define WRITE_HEATER_0P(v) WRITE(HEATER_0_PIN, v) +#if HOTENDS > 1 || ENABLED(HEATERS_PARALLEL) + #define WRITE_HEATER_1(v) WRITE(HEATER_1_PIN, v) + #if HOTENDS > 2 + #define WRITE_HEATER_2(v) WRITE(HEATER_2_PIN, v) + #if HOTENDS > 3 + #define WRITE_HEATER_3(v) WRITE(HEATER_3_PIN, v) + #if HOTENDS > 4 + #define WRITE_HEATER_4(v) WRITE(HEATER_4_PIN, v) + #endif // HOTENDS > 4 + #endif // HOTENDS > 3 + #endif // HOTENDS > 2 +#endif // HOTENDS > 1 +#if ENABLED(HEATERS_PARALLEL) + #define WRITE_HEATER_0(v) { WRITE_HEATER_0P(v); WRITE_HEATER_1(v); } +#else + #define WRITE_HEATER_0(v) WRITE_HEATER_0P(v) +#endif + +/** + * Heated bed requires settings + */ +#if HAS_HEATER_BED + #ifndef MAX_BED_POWER + #define MAX_BED_POWER 255 + #endif + #ifndef HEATER_BED_INVERTING + #define HEATER_BED_INVERTING false + #endif + #define WRITE_HEATER_BED(v) WRITE(HEATER_BED_PIN, (v) ^ HEATER_BED_INVERTING) +#endif + +/** + * Up to 3 PWM fans + */ +#if HAS_FAN2 + #define FAN_COUNT 3 +#elif HAS_FAN1 + #define FAN_COUNT 2 +#elif HAS_FAN0 + #define FAN_COUNT 1 +#else + #define FAN_COUNT 0 +#endif + +#if HAS_FAN0 + #define WRITE_FAN(v) WRITE(FAN_PIN, v) + #define WRITE_FAN0(v) WRITE_FAN(v) +#endif +#if HAS_FAN1 + #define WRITE_FAN1(v) WRITE(FAN1_PIN, v) +#endif +#if HAS_FAN2 + #define WRITE_FAN2(v) WRITE(FAN2_PIN, v) +#endif +#define WRITE_FAN_N(n, v) WRITE_FAN##n(v) + +/** + * Part Cooling fan multipliexer + */ +#define HAS_FANMUX PIN_EXISTS(FANMUX0) + +/** + * Servos and probes + */ + +#if HAS_SERVOS + #ifndef Z_ENDSTOP_SERVO_NR + #define Z_ENDSTOP_SERVO_NR -1 + #endif +#endif + +#define PROBE_PIN_CONFIGURED (HAS_Z_MIN_PROBE_PIN || (HAS_Z_MIN && ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN))) +#define HAS_BED_PROBE (PROBE_SELECTED && PROBE_PIN_CONFIGURED && DISABLED(PROBE_MANUALLY)) + +#if ENABLED(Z_PROBE_ALLEN_KEY) + #define PROBE_IS_TRIGGERED_WHEN_STOWED_TEST +#endif + +/** + * Bed Probe dependencies + */ +#if HAS_BED_PROBE + #if ENABLED(ENDSTOPPULLUPS) && HAS_Z_MIN_PROBE_PIN + #define ENDSTOPPULLUP_ZMIN_PROBE + #endif + #ifndef Z_PROBE_OFFSET_RANGE_MIN + #define Z_PROBE_OFFSET_RANGE_MIN -20 + #endif + #ifndef Z_PROBE_OFFSET_RANGE_MAX + #define Z_PROBE_OFFSET_RANGE_MAX 20 + #endif + #ifndef XY_PROBE_SPEED + #ifdef HOMING_FEEDRATE_XY + #define XY_PROBE_SPEED HOMING_FEEDRATE_XY #else - #define Z_HOMING_HEIGHT Z_CLEARANCE_BETWEEN_PROBES + #define XY_PROBE_SPEED 4000 #endif #endif + #if Z_CLEARANCE_BETWEEN_PROBES > Z_CLEARANCE_DEPLOY_PROBE + #define _Z_CLEARANCE_DEPLOY_PROBE Z_CLEARANCE_BETWEEN_PROBES + #else + #define _Z_CLEARANCE_DEPLOY_PROBE Z_CLEARANCE_DEPLOY_PROBE + #endif +#else + #undef X_PROBE_OFFSET_FROM_EXTRUDER + #undef Y_PROBE_OFFSET_FROM_EXTRUDER + #undef Z_PROBE_OFFSET_FROM_EXTRUDER + #define X_PROBE_OFFSET_FROM_EXTRUDER 0 + #define Y_PROBE_OFFSET_FROM_EXTRUDER 0 + #define Z_PROBE_OFFSET_FROM_EXTRUDER 0 +#endif + +/** + * Heater & Fan Pausing + */ +#if FAN_COUNT == 0 + #undef PROBING_FANS_OFF +#endif +#define QUIET_PROBING (HAS_BED_PROBE && (ENABLED(PROBING_HEATERS_OFF) || ENABLED(PROBING_FANS_OFF) || DELAY_BEFORE_PROBING > 0)) +#define HEATER_IDLE_HANDLER (ENABLED(ADVANCED_PAUSE_FEATURE) || ENABLED(PROBING_HEATERS_OFF)) + +/** + * Only constrain Z on DELTA / SCARA machines + */ +#if IS_KINEMATIC + #undef MIN_SOFTWARE_ENDSTOP_X + #undef MIN_SOFTWARE_ENDSTOP_Y + #undef MAX_SOFTWARE_ENDSTOP_X + #undef MAX_SOFTWARE_ENDSTOP_Y +#endif + +/** + * Delta endstops, radius/rod trimmers, angle trimmers + */ +#if ENABLED(DELTA) + #ifndef DELTA_CALIBRATION_RADIUS + #define DELTA_CALIBRATION_RADIUS DELTA_PRINTABLE_RADIUS - 10 + #endif + #ifndef DELTA_ENDSTOP_ADJ + #define DELTA_ENDSTOP_ADJ { 0, 0, 0 } + #endif + #ifndef DELTA_TOWER_ANGLE_TRIM + #define DELTA_TOWER_ANGLE_TRIM {0, 0, 0} + #endif + #ifndef DELTA_RADIUS_TRIM_TOWER + #define DELTA_RADIUS_TRIM_TOWER {0, 0, 0} + #endif + #ifndef DELTA_DIAGONAL_ROD_TRIM_TOWER + #define DELTA_DIAGONAL_ROD_TRIM_TOWER {0, 0, 0} + #endif +#endif + +/** + * Set granular options based on the specific type of leveling + */ + +#define UBL_DELTA (ENABLED(AUTO_BED_LEVELING_UBL) && (ENABLED(DELTA) || ENABLED(UBL_GRANULAR_SEGMENTATION_FOR_CARTESIAN))) +#define ABL_PLANAR (ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_3POINT)) +#define ABL_GRID (ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)) +#define OLDSCHOOL_ABL (ABL_PLANAR || ABL_GRID) +#define HAS_ABL (OLDSCHOOL_ABL || ENABLED(AUTO_BED_LEVELING_UBL)) +#define HAS_LEVELING (HAS_ABL || ENABLED(MESH_BED_LEVELING)) +#define HAS_AUTOLEVEL (HAS_ABL && DISABLED(PROBE_MANUALLY)) +#define HAS_MESH (ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(MESH_BED_LEVELING)) +#define PLANNER_LEVELING (OLDSCHOOL_ABL || ENABLED(MESH_BED_LEVELING) || UBL_DELTA) +#define HAS_PROBING_PROCEDURE (HAS_ABL || ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST)) +#if HAS_PROBING_PROCEDURE + #define PROBE_BED_WIDTH abs(RIGHT_PROBE_BED_POSITION - (LEFT_PROBE_BED_POSITION)) + #define PROBE_BED_HEIGHT abs(BACK_PROBE_BED_POSITION - (FRONT_PROBE_BED_POSITION)) +#endif + +/** + * Buzzer/Speaker + */ +#if ENABLED(LCD_USE_I2C_BUZZER) + #ifndef LCD_FEEDBACK_FREQUENCY_HZ + #define LCD_FEEDBACK_FREQUENCY_HZ 1000 + #endif + #ifndef LCD_FEEDBACK_FREQUENCY_DURATION_MS + #define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 + #endif +#else + #ifndef LCD_FEEDBACK_FREQUENCY_HZ + #define LCD_FEEDBACK_FREQUENCY_HZ 5000 + #endif + #ifndef LCD_FEEDBACK_FREQUENCY_DURATION_MS + #define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2 + #endif +#endif + +/** + * VIKI2, miniVIKI, and AZSMZ_12864 require DOGLCD_SCK and DOGLCD_MOSI to be defined. + */ +#if ENABLED(VIKI2) || ENABLED(miniVIKI) || ENABLED(AZSMZ_12864) + #ifndef DOGLCD_SCK + #define DOGLCD_SCK SCK_PIN + #endif + #ifndef DOGLCD_MOSI + #define DOGLCD_MOSI MOSI_PIN + #endif +#endif + +/** + * Z_HOMING_HEIGHT / Z_CLEARANCE_BETWEEN_PROBES + */ +#ifndef Z_HOMING_HEIGHT #ifndef Z_CLEARANCE_BETWEEN_PROBES - #define Z_CLEARANCE_BETWEEN_PROBES Z_HOMING_HEIGHT - #endif - #if Z_CLEARANCE_BETWEEN_PROBES > Z_HOMING_HEIGHT - #define MANUAL_PROBE_HEIGHT Z_CLEARANCE_BETWEEN_PROBES + #define Z_HOMING_HEIGHT 0 #else - #define MANUAL_PROBE_HEIGHT Z_HOMING_HEIGHT + #define Z_HOMING_HEIGHT Z_CLEARANCE_BETWEEN_PROBES #endif +#endif +#ifndef Z_CLEARANCE_BETWEEN_PROBES + #define Z_CLEARANCE_BETWEEN_PROBES Z_HOMING_HEIGHT +#endif +#if Z_CLEARANCE_BETWEEN_PROBES > Z_HOMING_HEIGHT + #define MANUAL_PROBE_HEIGHT Z_CLEARANCE_BETWEEN_PROBES +#else + #define MANUAL_PROBE_HEIGHT Z_HOMING_HEIGHT +#endif - /** - * Bed Probing rectangular bounds - * These can be further constrained in code for Delta and SCARA - */ - #if ENABLED(DELTA) - #ifndef DELTA_PROBEABLE_RADIUS - #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS - #endif - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define MIN_PROBE_X (X_CENTER - (DELTA_PROBEABLE_RADIUS)) - #define MIN_PROBE_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS)) - #define MAX_PROBE_X (X_CENTER + DELTA_PROBEABLE_RADIUS) - #define MAX_PROBE_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS) - #elif IS_SCARA - #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2) - #define MIN_PROBE_X (X_CENTER - (SCARA_PRINTABLE_RADIUS)) - #define MIN_PROBE_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS)) - #define MAX_PROBE_X (X_CENTER + SCARA_PRINTABLE_RADIUS) - #define MAX_PROBE_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS) - #else - // Boundaries for Cartesian probing based on bed limits - #define MIN_PROBE_X (max(X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER, X_MIN_BED)) - #define MIN_PROBE_Y (max(Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER, Y_MIN_BED)) - #define MAX_PROBE_X (min(X_MAX_POS + X_PROBE_OFFSET_FROM_EXTRUDER, X_MAX_BED)) - #define MAX_PROBE_Y (min(Y_MAX_POS + Y_PROBE_OFFSET_FROM_EXTRUDER, Y_MAX_BED)) +/** + * Bed Probing rectangular bounds + * These can be further constrained in code for Delta and SCARA + */ +#if ENABLED(DELTA) + #ifndef DELTA_PROBEABLE_RADIUS + #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS #endif + // Probing points may be verified at compile time within the radius + // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") + // so that may be added to SanityCheck.h in the future. + #define MIN_PROBE_X (X_CENTER - (DELTA_PROBEABLE_RADIUS)) + #define MIN_PROBE_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS)) + #define MAX_PROBE_X (X_CENTER + DELTA_PROBEABLE_RADIUS) + #define MAX_PROBE_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS) +#elif IS_SCARA + #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2) + #define MIN_PROBE_X (X_CENTER - (SCARA_PRINTABLE_RADIUS)) + #define MIN_PROBE_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS)) + #define MAX_PROBE_X (X_CENTER + SCARA_PRINTABLE_RADIUS) + #define MAX_PROBE_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS) +#else + // Boundaries for Cartesian probing based on bed limits + #define MIN_PROBE_X (max(X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER, X_MIN_BED)) + #define MIN_PROBE_Y (max(Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER, Y_MIN_BED)) + #define MAX_PROBE_X (min(X_MAX_POS + X_PROBE_OFFSET_FROM_EXTRUDER, X_MAX_BED)) + #define MAX_PROBE_Y (min(Y_MAX_POS + Y_PROBE_OFFSET_FROM_EXTRUDER, Y_MAX_BED)) +#endif - // Stepper pulse duration, in cycles - #define STEP_PULSE_CYCLES ((MINIMUM_STEPPER_PULSE) * CYCLES_PER_MICROSECOND) - #ifdef CPU_32_BIT - // Add additional delay for between direction signal and pulse signal of stepper - #ifndef STEPPER_DIRECTION_DELAY - #define STEPPER_DIRECTION_DELAY 0 // time in microseconds +// Stepper pulse duration, in cycles +#define STEP_PULSE_CYCLES ((MINIMUM_STEPPER_PULSE) * CYCLES_PER_MICROSECOND) +#ifdef CPU_32_BIT + // Add additional delay for between direction signal and pulse signal of stepper + #ifndef STEPPER_DIRECTION_DELAY + #define STEPPER_DIRECTION_DELAY 0 // time in microseconds + #endif +#endif + +#ifndef __SAM3X8E__ //todo: hal: broken hal encapsulation + #undef UI_VOLTAGE_LEVEL + #undef RADDS_DISPLAY + #undef MOTOR_CURRENT +#endif + +#if ENABLED(SDCARD_SORT_ALPHA) + #define HAS_FOLDER_SORTING (FOLDER_SORTING || ENABLED(SDSORT_GCODE)) +#endif + +// Updated G92 behavior shifts the workspace +#define HAS_POSITION_SHIFT DISABLED(NO_WORKSPACE_OFFSETS) +// The home offset also shifts the coordinate space +#define HAS_HOME_OFFSET (DISABLED(NO_WORKSPACE_OFFSETS) || ENABLED(DELTA)) +// Either offset yields extra calculations on all moves +#define HAS_WORKSPACE_OFFSET (HAS_POSITION_SHIFT || HAS_HOME_OFFSET) +// M206 doesn't apply to DELTA +#define HAS_M206_COMMAND (HAS_HOME_OFFSET && DISABLED(DELTA)) + +// LCD timeout to status screen default is 15s +#ifndef LCD_TIMEOUT_TO_STATUS + #define LCD_TIMEOUT_TO_STATUS 15000 +#endif + +/** + * DELTA_SEGMENT_MIN_LENGTH for UBL_DELTA + */ +#if UBL_DELTA + #ifndef DELTA_SEGMENT_MIN_LENGTH + #if IS_SCARA + #define DELTA_SEGMENT_MIN_LENGTH 0.25 // SCARA minimum segment size is 0.25mm + #elif ENABLED(DELTA) + #define DELTA_SEGMENT_MIN_LENGTH 0.10 // mm (still subject to DELTA_SEGMENTS_PER_SECOND) + #else // CARTESIAN + #define DELTA_SEGMENT_MIN_LENGTH 1.00 // mm (similar to G2/G3 arc segmentation) #endif #endif +#endif - #ifndef __SAM3X8E__ //todo: hal: broken hal encapsulation - #undef UI_VOLTAGE_LEVEL - #undef RADDS_DISPLAY - #undef MOTOR_CURRENT +// Shorthand +#define GRID_MAX_POINTS ((GRID_MAX_POINTS_X) * (GRID_MAX_POINTS_Y)) + +// Add commands that need sub-codes to this list +#define USE_GCODE_SUBCODES ENABLED(G38_PROBE_TARGET) + +// MESH_BED_LEVELING overrides PROBE_MANUALLY +#if ENABLED(MESH_BED_LEVELING) + #undef PROBE_MANUALLY +#endif + +// Parking Extruder +#if ENABLED(PARKING_EXTRUDER) + #ifndef PARKING_EXTRUDER_GRAB_DISTANCE + #define PARKING_EXTRUDER_GRAB_DISTANCE 0 #endif - - #if ENABLED(SDCARD_SORT_ALPHA) - #define HAS_FOLDER_SORTING (FOLDER_SORTING || ENABLED(SDSORT_GCODE)) + #ifndef PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE + #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE HIGH #endif +#endif - // Updated G92 behavior shifts the workspace - #define HAS_POSITION_SHIFT DISABLED(NO_WORKSPACE_OFFSETS) - // The home offset also shifts the coordinate space - #define HAS_HOME_OFFSET (DISABLED(NO_WORKSPACE_OFFSETS) || ENABLED(DELTA)) - // Either offset yields extra calculations on all moves - #define HAS_WORKSPACE_OFFSET (HAS_POSITION_SHIFT || HAS_HOME_OFFSET) - // M206 doesn't apply to DELTA - #define HAS_M206_COMMAND (HAS_HOME_OFFSET && DISABLED(DELTA)) +// Use float instead of double. Needs profiling. +#if defined(ARDUINO_ARCH_SAM) && ENABLED(DELTA_FAST_SQRT) + #undef ATAN2 + #undef FABS + #undef POW + #undef SQRT + #undef CEIL + #undef FLOOR + #undef LROUND + #undef FMOD + #define ATAN2(y, x) atan2f(y, x) + #define FABS(x) fabsf(x) + #define POW(x, y) powf(x, y) + #define SQRT(x) sqrtf(x) + #define CEIL(x) ceilf(x) + #define FLOOR(x) floorf(x) + #define LROUND(x) lroundf(x) + #define FMOD(x, y) fmodf(x, y) +#endif - // LCD timeout to status screen default is 15s - #ifndef LCD_TIMEOUT_TO_STATUS - #define LCD_TIMEOUT_TO_STATUS 15000 - #endif +#ifdef TEENSYDUINO + #undef max + #define max(a,b) ((a)>(b)?(a):(b)) + #undef min + #define min(a,b) ((a)<(b)?(a):(b)) - /** - * DELTA_SEGMENT_MIN_LENGTH for UBL_DELTA - */ - #if UBL_DELTA - #ifndef DELTA_SEGMENT_MIN_LENGTH - #if IS_SCARA - #define DELTA_SEGMENT_MIN_LENGTH 0.25 // SCARA minimum segment size is 0.25mm - #elif ENABLED(DELTA) - #define DELTA_SEGMENT_MIN_LENGTH 0.10 // mm (still subject to DELTA_SEGMENTS_PER_SECOND) - #else // CARTESIAN - #define DELTA_SEGMENT_MIN_LENGTH 1.00 // mm (similar to G2/G3 arc segmentation) - #endif - #endif - #endif + #define NOT_A_PIN 0 // For PINS_DEBUGGING +#endif - // Shorthand - #define GRID_MAX_POINTS ((GRID_MAX_POINTS_X) * (GRID_MAX_POINTS_Y)) - - // Add commands that need sub-codes to this list - #define USE_GCODE_SUBCODES ENABLED(G38_PROBE_TARGET) - - // MESH_BED_LEVELING overrides PROBE_MANUALLY - #if ENABLED(MESH_BED_LEVELING) - #undef PROBE_MANUALLY - #endif - - // Parking Extruder - #if ENABLED(PARKING_EXTRUDER) - #ifndef PARKING_EXTRUDER_GRAB_DISTANCE - #define PARKING_EXTRUDER_GRAB_DISTANCE 0 - #endif - #ifndef PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE - #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE HIGH - #endif - #endif - - // Use float instead of double. Needs profiling. - #if defined(ARDUINO_ARCH_SAM) && ENABLED(DELTA_FAST_SQRT) - #undef ATAN2 - #undef FABS - #undef POW - #undef SQRT - #undef CEIL - #undef FLOOR - #undef LROUND - #undef FMOD - #define ATAN2(y, x) atan2f(y, x) - #define FABS(x) fabsf(x) - #define POW(x, y) powf(x, y) - #define SQRT(x) sqrtf(x) - #define CEIL(x) ceilf(x) - #define FLOOR(x) floorf(x) - #define LROUND(x) lroundf(x) - #define FMOD(x, y) fmodf(x, y) - #endif - - #ifdef TEENSYDUINO - #undef max - #define max(a,b) ((a)>(b)?(a):(b)) - #undef min - #define min(a,b) ((a)<(b)?(a):(b)) - - #define NOT_A_PIN 0 // For PINS_DEBUGGING - #endif #endif // CONDITIONALS_POST_H diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index f75be67e96..4b667f0c74 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -26,6 +26,9 @@ * Test configuration values for errors at compile-time. */ +#ifndef _SANITYCHECK_H_ +#define _SANITYCHECK_H_ + /** * Require gcc 4.7 or newer (first included with Arduino 1.6.8) for C++11 features. */ @@ -1361,5 +1364,6 @@ static_assert(COUNT(sanity_arr_1) <= XYZE_N, "DEFAULT_AXIS_STEPS_PER_UNIT has to static_assert(COUNT(sanity_arr_2) <= XYZE_N, "DEFAULT_MAX_FEEDRATE has too many elements."); static_assert(COUNT(sanity_arr_3) <= XYZE_N, "DEFAULT_MAX_ACCELERATION has too many elements."); - #include "../HAL/HAL_SanityCheck.h" // get CPU specific checks + +#endif // _SANITYCHECK_H_ diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index fa628f4216..3731b476fe 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -20,6 +20,11 @@ * */ +#ifndef _VERSION_H_ +#define _VERSION_H_ + +#include "MarlinConfig.h" + /** * This file is the standard Marlin version identifier file, all fields can be * overriden by the ones defined on _Version.h by using the Configuration.h @@ -48,7 +53,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ - #define STRING_DISTRIBUTION_DATE "2017-07-27 12:00" + #define STRING_DISTRIBUTION_DATE "2017-10-19 12:00" /** * Required minimum Configuration.h and Configuration_adv.h file versions. @@ -92,3 +97,5 @@ #define WEBSITE_URL "http://marlinfw.org" #endif // USE_AUTOMATIC_VERSIONING + +#endif // _VERSION_H_ From 580b6e9089cefa7cf85c33ef53af4d02a6b59f37 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 19 Oct 2017 01:39:39 -0500 Subject: [PATCH 14/20] Apply physical limits to mesh bounds --- Marlin/Configuration.h | 2 +- Marlin/Configuration_adv.h | 81 +++------------ Marlin/src/config/default/Configuration.h | 2 +- Marlin/src/config/default/Configuration_adv.h | 81 +++------------ .../AlephObjects/TAZ4/Configuration.h | 2 +- .../AlephObjects/TAZ4/Configuration_adv.h | 81 +++------------ .../AliExpress/CL-260/Configuration.h | 2 +- .../config/examples/Anet/A6/Configuration.h | 2 +- .../examples/Anet/A6/Configuration_adv.h | 81 +++------------ .../config/examples/Anet/A8/Configuration.h | 2 +- .../examples/Anet/A8/Configuration_adv.h | 81 +++------------ .../examples/BQ/Hephestos/Configuration.h | 2 +- .../examples/BQ/Hephestos/Configuration_adv.h | 81 +++------------ .../examples/BQ/Hephestos_2/Configuration.h | 2 +- .../BQ/Hephestos_2/Configuration_adv.h | 81 +++------------ .../config/examples/BQ/WITBOX/Configuration.h | 2 +- .../examples/BQ/WITBOX/Configuration_adv.h | 81 +++------------ .../config/examples/Cartesio/Configuration.h | 2 +- .../examples/Cartesio/Configuration_adv.h | 81 +++------------ .../examples/Creality/CR-10/Configuration.h | 2 +- .../Creality/CR-10/Configuration_adv.h | 81 +++------------ .../src/config/examples/Felix/Configuration.h | 2 +- .../config/examples/Felix/Configuration_adv.h | 81 +++------------ .../examples/Felix/DUAL/Configuration.h | 2 +- .../Folger Tech/i3-2020/Configuration.h | 2 +- .../Folger Tech/i3-2020/Configuration_adv.h | 81 +++------------ .../examples/Geeetech/GT2560/Configuration.h | 2 +- .../Geeetech/I3_Pro_X-GT2560/Configuration.h | 2 +- .../examples/Infitary/i3-M508/Configuration.h | 2 +- .../Infitary/i3-M508/Configuration_adv.h | 81 +++------------ .../examples/Malyan/M150/Configuration.h | 2 +- .../examples/Malyan/M150/Configuration_adv.h | 81 +++------------ .../Micromake/C1/basic/Configuration.h | 2 +- .../Micromake/C1/enhanced/Configuration.h | 2 +- .../config/examples/Mks/Sbase/Configuration.h | 2 +- .../examples/Mks/Sbase/Configuration_adv.h | 81 +++------------ .../RepRapWorld/Megatronics/Configuration.h | 2 +- .../config/examples/RigidBot/Configuration.h | 2 +- .../examples/RigidBot/Configuration_adv.h | 81 +++------------ .../src/config/examples/SCARA/Configuration.h | 2 +- .../config/examples/SCARA/Configuration_adv.h | 81 +++------------ .../examples/Sanguinololu/Configuration.h | 2 +- .../examples/Sanguinololu/Configuration_adv.h | 81 +++------------ .../config/examples/TinyBoy2/Configuration.h | 2 +- .../examples/TinyBoy2/Configuration_adv.h | 81 +++------------ .../examples/Velleman/K8200/Configuration.h | 2 +- .../Velleman/K8200/Configuration_adv.h | 73 ++------------ .../examples/Velleman/K8400/Configuration.h | 2 +- .../Velleman/K8400/Configuration_adv.h | 81 +++------------ .../Velleman/K8400/Dual-head/Configuration.h | 2 +- .../examples/adafruit/ST7565/Configuration.h | 2 +- .../FLSUN/auto_calibrate/Configuration.h | 2 +- .../FLSUN/auto_calibrate/Configuration_adv.h | 81 +++------------ .../delta/FLSUN/kossel_mini/Configuration.h | 2 +- .../FLSUN/kossel_mini/Configuration_adv.h | 81 +++------------ .../examples/delta/generic/Configuration.h | 2 +- .../delta/generic/Configuration_adv.h | 81 +++------------ .../delta/kossel_mini/Configuration.h | 2 +- .../delta/kossel_mini/Configuration_adv.h | 81 +++------------ .../examples/delta/kossel_pro/Configuration.h | 2 +- .../delta/kossel_pro/Configuration_adv.h | 81 +++------------ .../examples/delta/kossel_xl/Configuration.h | 2 +- .../delta/kossel_xl/Configuration_adv.h | 81 +++------------ .../examples/gCreate/gMax1.5+/Configuration.h | 2 +- .../gCreate/gMax1.5+/Configuration_adv.h | 81 +++------------ .../config/examples/makibox/Configuration.h | 2 +- .../examples/makibox/Configuration_adv.h | 81 +++------------ .../examples/stm32f103ret6/Configuration.h | 2 +- .../examples/tvrrug/Round2/Configuration.h | 2 +- .../tvrrug/Round2/Configuration_adv.h | 81 +++------------ .../src/config/examples/wt150/Configuration.h | 2 +- .../config/examples/wt150/Configuration_adv.h | 81 +++------------ Marlin/src/feature/bedlevel/ubl/ubl.cpp | 8 +- Marlin/src/feature/bedlevel/ubl/ubl.h | 48 ++++----- Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp | 24 ++--- .../src/feature/bedlevel/ubl/ubl_motion.cpp | 4 +- Marlin/src/inc/Conditionals_post.h | 99 +++++++++++++------ Marlin/src/inc/SanityCheck.h | 4 + 78 files changed, 615 insertions(+), 2157 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 001bf84f10..792a5115a7 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -937,7 +937,7 @@ //========================= Unified Bed Leveling ============================ //=========================================================================== - #define UBL_MESH_INSET 1 // Mesh inset margin on print area + #define MESH_INSET 1 // Mesh inset margin on print area #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 0773e7d5de..3160e3034d 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -489,12 +489,14 @@ // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). #define SD_DETECT_INVERTED - #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? + #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. - #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. - // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that. - // using: + // Reverse SD sort to show "more recent" files first, according to the card's FAT. + // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. + #define SDCARD_RATHERRECENTFIRST + + // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART /** @@ -685,69 +687,16 @@ #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2) #endif -// Default mesh area is an area with an inset margin on the print area. -// Below are the macros that are used to define the borders for the mesh area, -// made available here for specialized needs, ie dual extruder setup. -#if ENABLED(MESH_BED_LEVELING) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #elif IS_SCARA - #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0)) - #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0)) - #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE)) - #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE)) - #endif - #endif -#elif ENABLED(AUTO_BED_LEVELING_UBL) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #elif IS_SCARA - #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE)) - #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE)) - #endif - #endif +#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) + // Override the mesh area if the automatic (max) area is too large + //#define MESH_MIN_X MESH_INSET + //#define MESH_MIN_Y MESH_INSET + //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) + //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - // If this is defined, the currently active mesh will be saved in the - // current slot on M500. - #define UBL_SAVE_ACTIVE_ON_M500 + #if ENABLED(AUTO_BED_LEVELING_UBL) + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + #endif #endif // @section extras diff --git a/Marlin/src/config/default/Configuration.h b/Marlin/src/config/default/Configuration.h index a3332428e2..f610a22e23 100644 --- a/Marlin/src/config/default/Configuration.h +++ b/Marlin/src/config/default/Configuration.h @@ -937,7 +937,7 @@ //========================= Unified Bed Leveling ============================ //=========================================================================== - #define UBL_MESH_INSET 1 // Mesh inset margin on print area + #define MESH_INSET 1 // Mesh inset margin on print area #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X diff --git a/Marlin/src/config/default/Configuration_adv.h b/Marlin/src/config/default/Configuration_adv.h index 0773e7d5de..3160e3034d 100644 --- a/Marlin/src/config/default/Configuration_adv.h +++ b/Marlin/src/config/default/Configuration_adv.h @@ -489,12 +489,14 @@ // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). #define SD_DETECT_INVERTED - #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? + #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. - #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. - // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that. - // using: + // Reverse SD sort to show "more recent" files first, according to the card's FAT. + // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. + #define SDCARD_RATHERRECENTFIRST + + // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART /** @@ -685,69 +687,16 @@ #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2) #endif -// Default mesh area is an area with an inset margin on the print area. -// Below are the macros that are used to define the borders for the mesh area, -// made available here for specialized needs, ie dual extruder setup. -#if ENABLED(MESH_BED_LEVELING) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #elif IS_SCARA - #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0)) - #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0)) - #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE)) - #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE)) - #endif - #endif -#elif ENABLED(AUTO_BED_LEVELING_UBL) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #elif IS_SCARA - #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE)) - #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE)) - #endif - #endif +#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) + // Override the mesh area if the automatic (max) area is too large + //#define MESH_MIN_X MESH_INSET + //#define MESH_MIN_Y MESH_INSET + //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) + //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - // If this is defined, the currently active mesh will be saved in the - // current slot on M500. - #define UBL_SAVE_ACTIVE_ON_M500 + #if ENABLED(AUTO_BED_LEVELING_UBL) + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + #endif #endif // @section extras diff --git a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h index e0cf752e47..62b708a3e8 100644 --- a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h +++ b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h @@ -957,7 +957,7 @@ //========================= Unified Bed Leveling ============================ //=========================================================================== - #define UBL_MESH_INSET 1 // Mesh inset margin on print area + #define MESH_INSET 1 // Mesh inset margin on print area #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X diff --git a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h index 6ef81166f9..1fd4fff4fe 100644 --- a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h +++ b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h @@ -489,12 +489,14 @@ // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). #define SD_DETECT_INVERTED - #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? + #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. - #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. - // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that. - // using: + // Reverse SD sort to show "more recent" files first, according to the card's FAT. + // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. + #define SDCARD_RATHERRECENTFIRST + + // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART /** @@ -684,69 +686,16 @@ #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2) #endif -// Default mesh area is an area with an inset margin on the print area. -// Below are the macros that are used to define the borders for the mesh area, -// made available here for specialized needs, ie dual extruder setup. -#if ENABLED(MESH_BED_LEVELING) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #elif IS_SCARA - #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0)) - #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0)) - #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE)) - #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE)) - #endif - #endif -#elif ENABLED(AUTO_BED_LEVELING_UBL) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #elif IS_SCARA - #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE)) - #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE)) - #endif - #endif +#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) + // Override the mesh area if the automatic (max) area is too large + //#define MESH_MIN_X MESH_INSET + //#define MESH_MIN_Y MESH_INSET + //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) + //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - // If this is defined, the currently active mesh will be saved in the - // current slot on M500. - #define UBL_SAVE_ACTIVE_ON_M500 + #if ENABLED(AUTO_BED_LEVELING_UBL) + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + #endif #endif // @section extras diff --git a/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h b/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h index c542d9edea..7f9031c30a 100644 --- a/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h +++ b/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h @@ -937,7 +937,7 @@ //========================= Unified Bed Leveling ============================ //=========================================================================== - #define UBL_MESH_INSET 1 // Mesh inset margin on print area + #define MESH_INSET 1 // Mesh inset margin on print area #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X diff --git a/Marlin/src/config/examples/Anet/A6/Configuration.h b/Marlin/src/config/examples/Anet/A6/Configuration.h index cf58375fb3..60da71c789 100644 --- a/Marlin/src/config/examples/Anet/A6/Configuration.h +++ b/Marlin/src/config/examples/Anet/A6/Configuration.h @@ -1080,7 +1080,7 @@ //========================= Unified Bed Leveling ============================ //=========================================================================== - #define UBL_MESH_INSET 1 // Mesh inset margin on print area + #define MESH_INSET 1 // Mesh inset margin on print area #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X diff --git a/Marlin/src/config/examples/Anet/A6/Configuration_adv.h b/Marlin/src/config/examples/Anet/A6/Configuration_adv.h index 3476f84654..1dd657c738 100644 --- a/Marlin/src/config/examples/Anet/A6/Configuration_adv.h +++ b/Marlin/src/config/examples/Anet/A6/Configuration_adv.h @@ -489,12 +489,14 @@ // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). //#define SD_DETECT_INVERTED - #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? + #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. - #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. - // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that. - // using: + // Reverse SD sort to show "more recent" files first, according to the card's FAT. + // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. + #define SDCARD_RATHERRECENTFIRST + + // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART /** @@ -684,69 +686,16 @@ #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2) #endif -// Default mesh area is an area with an inset margin on the print area. -// Below are the macros that are used to define the borders for the mesh area, -// made available here for specialized needs, ie dual extruder setup. -#if ENABLED(MESH_BED_LEVELING) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #elif IS_SCARA - #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0)) - #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0)) - #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE)) - #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE)) - #endif - #endif -#elif ENABLED(AUTO_BED_LEVELING_UBL) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #elif IS_SCARA - #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE)) - #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE)) - #endif - #endif +#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) + // Override the mesh area if the automatic (max) area is too large + //#define MESH_MIN_X MESH_INSET + //#define MESH_MIN_Y MESH_INSET + //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) + //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - // If this is defined, the currently active mesh will be saved in the - // current slot on M500. - #define UBL_SAVE_ACTIVE_ON_M500 + #if ENABLED(AUTO_BED_LEVELING_UBL) + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + #endif #endif // @section extras diff --git a/Marlin/src/config/examples/Anet/A8/Configuration.h b/Marlin/src/config/examples/Anet/A8/Configuration.h index b9dc8deb41..901f24bdda 100644 --- a/Marlin/src/config/examples/Anet/A8/Configuration.h +++ b/Marlin/src/config/examples/Anet/A8/Configuration.h @@ -943,7 +943,7 @@ //========================= Unified Bed Leveling ============================ //=========================================================================== - #define UBL_MESH_INSET 1 // Mesh inset margin on print area + #define MESH_INSET 1 // Mesh inset margin on print area #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X diff --git a/Marlin/src/config/examples/Anet/A8/Configuration_adv.h b/Marlin/src/config/examples/Anet/A8/Configuration_adv.h index 9e141d3c32..7ce6f42d5e 100644 --- a/Marlin/src/config/examples/Anet/A8/Configuration_adv.h +++ b/Marlin/src/config/examples/Anet/A8/Configuration_adv.h @@ -489,12 +489,14 @@ // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). //#define SD_DETECT_INVERTED - #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? + #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. - #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. - // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that. - // using: + // Reverse SD sort to show "more recent" files first, according to the card's FAT. + // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. + #define SDCARD_RATHERRECENTFIRST + + // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART /** @@ -684,69 +686,16 @@ #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2) #endif -// Default mesh area is an area with an inset margin on the print area. -// Below are the macros that are used to define the borders for the mesh area, -// made available here for specialized needs, ie dual extruder setup. -#if ENABLED(MESH_BED_LEVELING) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #elif IS_SCARA - #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0)) - #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0)) - #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE)) - #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE)) - #endif - #endif -#elif ENABLED(AUTO_BED_LEVELING_UBL) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #elif IS_SCARA - #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE)) - #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE)) - #endif - #endif +#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) + // Override the mesh area if the automatic (max) area is too large + //#define MESH_MIN_X MESH_INSET + //#define MESH_MIN_Y MESH_INSET + //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) + //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - // If this is defined, the currently active mesh will be saved in the - // current slot on M500. - #define UBL_SAVE_ACTIVE_ON_M500 + #if ENABLED(AUTO_BED_LEVELING_UBL) + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + #endif #endif // @section extras diff --git a/Marlin/src/config/examples/BQ/Hephestos/Configuration.h b/Marlin/src/config/examples/BQ/Hephestos/Configuration.h index bde9a8c9c4..6a0c9fb390 100644 --- a/Marlin/src/config/examples/BQ/Hephestos/Configuration.h +++ b/Marlin/src/config/examples/BQ/Hephestos/Configuration.h @@ -928,7 +928,7 @@ //========================= Unified Bed Leveling ============================ //=========================================================================== - #define UBL_MESH_INSET 1 // Mesh inset margin on print area + #define MESH_INSET 1 // Mesh inset margin on print area #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X diff --git a/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h b/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h index d272e77883..2bb9b8ce34 100644 --- a/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h @@ -489,12 +489,14 @@ // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). #define SD_DETECT_INVERTED - #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? + #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. - #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. - // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that. - // using: + // Reverse SD sort to show "more recent" files first, according to the card's FAT. + // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. + #define SDCARD_RATHERRECENTFIRST + + // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART /** @@ -684,69 +686,16 @@ #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2) #endif -// Default mesh area is an area with an inset margin on the print area. -// Below are the macros that are used to define the borders for the mesh area, -// made available here for specialized needs, ie dual extruder setup. -#if ENABLED(MESH_BED_LEVELING) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #elif IS_SCARA - #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0)) - #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0)) - #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE)) - #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE)) - #endif - #endif -#elif ENABLED(AUTO_BED_LEVELING_UBL) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #elif IS_SCARA - #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE)) - #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE)) - #endif - #endif +#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) + // Override the mesh area if the automatic (max) area is too large + //#define MESH_MIN_X MESH_INSET + //#define MESH_MIN_Y MESH_INSET + //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) + //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - // If this is defined, the currently active mesh will be saved in the - // current slot on M500. - #define UBL_SAVE_ACTIVE_ON_M500 + #if ENABLED(AUTO_BED_LEVELING_UBL) + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + #endif #endif // @section extras diff --git a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h index 960e8c5190..2263a06fbd 100644 --- a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h +++ b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h @@ -938,7 +938,7 @@ //========================= Unified Bed Leveling ============================ //=========================================================================== - #define UBL_MESH_INSET 1 // Mesh inset margin on print area + #define MESH_INSET 1 // Mesh inset margin on print area #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X diff --git a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h index 71a9d27954..ff006819d1 100644 --- a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h @@ -489,12 +489,14 @@ // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). #define SD_DETECT_INVERTED - #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? + #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished #define SD_FINISHED_RELEASECOMMAND "M104 S0\nM84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. - #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. - // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that. - // using: + // Reverse SD sort to show "more recent" files first, according to the card's FAT. + // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. + #define SDCARD_RATHERRECENTFIRST + + // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART /** @@ -681,69 +683,16 @@ #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2) #endif -// Default mesh area is an area with an inset margin on the print area. -// Below are the macros that are used to define the borders for the mesh area, -// made available here for specialized needs, ie dual extruder setup. -#if ENABLED(MESH_BED_LEVELING) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #elif IS_SCARA - #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0)) - #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0)) - #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE)) - #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE)) - #endif - #endif -#elif ENABLED(AUTO_BED_LEVELING_UBL) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #elif IS_SCARA - #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE)) - #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE)) - #endif - #endif +#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) + // Override the mesh area if the automatic (max) area is too large + //#define MESH_MIN_X MESH_INSET + //#define MESH_MIN_Y MESH_INSET + //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) + //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - // If this is defined, the currently active mesh will be saved in the - // current slot on M500. - #define UBL_SAVE_ACTIVE_ON_M500 + #if ENABLED(AUTO_BED_LEVELING_UBL) + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + #endif #endif // @section extras diff --git a/Marlin/src/config/examples/BQ/WITBOX/Configuration.h b/Marlin/src/config/examples/BQ/WITBOX/Configuration.h index 5f4a9680d5..3fbfb4e325 100644 --- a/Marlin/src/config/examples/BQ/WITBOX/Configuration.h +++ b/Marlin/src/config/examples/BQ/WITBOX/Configuration.h @@ -928,7 +928,7 @@ //========================= Unified Bed Leveling ============================ //=========================================================================== - #define UBL_MESH_INSET 1 // Mesh inset margin on print area + #define MESH_INSET 1 // Mesh inset margin on print area #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X diff --git a/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h b/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h index d272e77883..2bb9b8ce34 100644 --- a/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h @@ -489,12 +489,14 @@ // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). #define SD_DETECT_INVERTED - #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? + #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. - #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. - // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that. - // using: + // Reverse SD sort to show "more recent" files first, according to the card's FAT. + // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. + #define SDCARD_RATHERRECENTFIRST + + // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART /** @@ -684,69 +686,16 @@ #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2) #endif -// Default mesh area is an area with an inset margin on the print area. -// Below are the macros that are used to define the borders for the mesh area, -// made available here for specialized needs, ie dual extruder setup. -#if ENABLED(MESH_BED_LEVELING) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #elif IS_SCARA - #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0)) - #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0)) - #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE)) - #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE)) - #endif - #endif -#elif ENABLED(AUTO_BED_LEVELING_UBL) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #elif IS_SCARA - #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE)) - #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE)) - #endif - #endif +#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) + // Override the mesh area if the automatic (max) area is too large + //#define MESH_MIN_X MESH_INSET + //#define MESH_MIN_Y MESH_INSET + //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) + //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - // If this is defined, the currently active mesh will be saved in the - // current slot on M500. - #define UBL_SAVE_ACTIVE_ON_M500 + #if ENABLED(AUTO_BED_LEVELING_UBL) + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + #endif #endif // @section extras diff --git a/Marlin/src/config/examples/Cartesio/Configuration.h b/Marlin/src/config/examples/Cartesio/Configuration.h index 553186f714..20650986fd 100644 --- a/Marlin/src/config/examples/Cartesio/Configuration.h +++ b/Marlin/src/config/examples/Cartesio/Configuration.h @@ -936,7 +936,7 @@ //========================= Unified Bed Leveling ============================ //=========================================================================== - #define UBL_MESH_INSET 1 // Mesh inset margin on print area + #define MESH_INSET 1 // Mesh inset margin on print area #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X diff --git a/Marlin/src/config/examples/Cartesio/Configuration_adv.h b/Marlin/src/config/examples/Cartesio/Configuration_adv.h index 4acef5bab8..2272b1e81b 100644 --- a/Marlin/src/config/examples/Cartesio/Configuration_adv.h +++ b/Marlin/src/config/examples/Cartesio/Configuration_adv.h @@ -489,12 +489,14 @@ // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). #define SD_DETECT_INVERTED - #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? + #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. - #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. - // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that. - // using: + // Reverse SD sort to show "more recent" files first, according to the card's FAT. + // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. + #define SDCARD_RATHERRECENTFIRST + + // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART /** @@ -684,69 +686,16 @@ #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2) #endif -// Default mesh area is an area with an inset margin on the print area. -// Below are the macros that are used to define the borders for the mesh area, -// made available here for specialized needs, ie dual extruder setup. -#if ENABLED(MESH_BED_LEVELING) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #elif IS_SCARA - #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0)) - #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0)) - #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE)) - #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE)) - #endif - #endif -#elif ENABLED(AUTO_BED_LEVELING_UBL) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #elif IS_SCARA - #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE)) - #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE)) - #endif - #endif +#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) + // Override the mesh area if the automatic (max) area is too large + //#define MESH_MIN_X MESH_INSET + //#define MESH_MIN_Y MESH_INSET + //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) + //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - // If this is defined, the currently active mesh will be saved in the - // current slot on M500. - #define UBL_SAVE_ACTIVE_ON_M500 + #if ENABLED(AUTO_BED_LEVELING_UBL) + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + #endif #endif // @section extras diff --git a/Marlin/src/config/examples/Creality/CR-10/Configuration.h b/Marlin/src/config/examples/Creality/CR-10/Configuration.h index 617a289ccd..cdde77f625 100755 --- a/Marlin/src/config/examples/Creality/CR-10/Configuration.h +++ b/Marlin/src/config/examples/Creality/CR-10/Configuration.h @@ -947,7 +947,7 @@ //========================= Unified Bed Leveling ============================ //=========================================================================== - #define UBL_MESH_INSET 1 // Mesh inset margin on print area + #define MESH_INSET 1 // Mesh inset margin on print area #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X diff --git a/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h b/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h index ea5992d9d0..3bd984791c 100644 --- a/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h @@ -489,12 +489,14 @@ // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). #define SD_DETECT_INVERTED - #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? + #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. - #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. - // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that. - // using: + // Reverse SD sort to show "more recent" files first, according to the card's FAT. + // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. + #define SDCARD_RATHERRECENTFIRST + + // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART /** @@ -684,69 +686,16 @@ #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2) #endif -// Default mesh area is an area with an inset margin on the print area. -// Below are the macros that are used to define the borders for the mesh area, -// made available here for specialized needs, ie dual extruder setup. -#if ENABLED(MESH_BED_LEVELING) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #elif IS_SCARA - #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0)) - #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0)) - #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE)) - #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE)) - #endif - #endif -#elif ENABLED(AUTO_BED_LEVELING_UBL) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #elif IS_SCARA - #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE)) - #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE)) - #endif - #endif +#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) + // Override the mesh area if the automatic (max) area is too large + //#define MESH_MIN_X MESH_INSET + //#define MESH_MIN_Y MESH_INSET + //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) + //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - // If this is defined, the currently active mesh will be saved in the - // current slot on M500. - #define UBL_SAVE_ACTIVE_ON_M500 + #if ENABLED(AUTO_BED_LEVELING_UBL) + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + #endif #endif // @section extras diff --git a/Marlin/src/config/examples/Felix/Configuration.h b/Marlin/src/config/examples/Felix/Configuration.h index b902b58258..e321c7e797 100644 --- a/Marlin/src/config/examples/Felix/Configuration.h +++ b/Marlin/src/config/examples/Felix/Configuration.h @@ -919,7 +919,7 @@ //========================= Unified Bed Leveling ============================ //=========================================================================== - #define UBL_MESH_INSET 1 // Mesh inset margin on print area + #define MESH_INSET 1 // Mesh inset margin on print area #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X diff --git a/Marlin/src/config/examples/Felix/Configuration_adv.h b/Marlin/src/config/examples/Felix/Configuration_adv.h index 27610083c9..b26a95a81e 100644 --- a/Marlin/src/config/examples/Felix/Configuration_adv.h +++ b/Marlin/src/config/examples/Felix/Configuration_adv.h @@ -489,12 +489,14 @@ // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). #define SD_DETECT_INVERTED - #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? + #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. - #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. - // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that. - // using: + // Reverse SD sort to show "more recent" files first, according to the card's FAT. + // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. + #define SDCARD_RATHERRECENTFIRST + + // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART /** @@ -684,69 +686,16 @@ #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2) #endif -// Default mesh area is an area with an inset margin on the print area. -// Below are the macros that are used to define the borders for the mesh area, -// made available here for specialized needs, ie dual extruder setup. -#if ENABLED(MESH_BED_LEVELING) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #elif IS_SCARA - #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0)) - #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0)) - #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE)) - #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE)) - #endif - #endif -#elif ENABLED(AUTO_BED_LEVELING_UBL) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #elif IS_SCARA - #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE)) - #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE)) - #endif - #endif +#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) + // Override the mesh area if the automatic (max) area is too large + //#define MESH_MIN_X MESH_INSET + //#define MESH_MIN_Y MESH_INSET + //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) + //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - // If this is defined, the currently active mesh will be saved in the - // current slot on M500. - #define UBL_SAVE_ACTIVE_ON_M500 + #if ENABLED(AUTO_BED_LEVELING_UBL) + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + #endif #endif // @section extras diff --git a/Marlin/src/config/examples/Felix/DUAL/Configuration.h b/Marlin/src/config/examples/Felix/DUAL/Configuration.h index 0f61b9b8cd..628972228c 100644 --- a/Marlin/src/config/examples/Felix/DUAL/Configuration.h +++ b/Marlin/src/config/examples/Felix/DUAL/Configuration.h @@ -919,7 +919,7 @@ //========================= Unified Bed Leveling ============================ //=========================================================================== - #define UBL_MESH_INSET 1 // Mesh inset margin on print area + #define MESH_INSET 1 // Mesh inset margin on print area #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X diff --git a/Marlin/src/config/examples/Folger Tech/i3-2020/Configuration.h b/Marlin/src/config/examples/Folger Tech/i3-2020/Configuration.h index 063c522bc2..6fbe8eb6e6 100644 --- a/Marlin/src/config/examples/Folger Tech/i3-2020/Configuration.h +++ b/Marlin/src/config/examples/Folger Tech/i3-2020/Configuration.h @@ -934,7 +934,7 @@ //========================= Unified Bed Leveling ============================ //=========================================================================== - #define UBL_MESH_INSET 1 // Mesh inset margin on print area + #define MESH_INSET 1 // Mesh inset margin on print area #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_Y 10 diff --git a/Marlin/src/config/examples/Folger Tech/i3-2020/Configuration_adv.h b/Marlin/src/config/examples/Folger Tech/i3-2020/Configuration_adv.h index 160188d4b4..8d606714fd 100644 --- a/Marlin/src/config/examples/Folger Tech/i3-2020/Configuration_adv.h +++ b/Marlin/src/config/examples/Folger Tech/i3-2020/Configuration_adv.h @@ -489,12 +489,14 @@ // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). #define SD_DETECT_INVERTED - #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? + #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. - #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. - // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that. - // using: + // Reverse SD sort to show "more recent" files first, according to the card's FAT. + // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. + #define SDCARD_RATHERRECENTFIRST + + // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART /** @@ -685,69 +687,16 @@ #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2) #endif -// Default mesh area is an area with an inset margin on the print area. -// Below are the macros that are used to define the borders for the mesh area, -// made available here for specialized needs, ie dual extruder setup. -#if ENABLED(MESH_BED_LEVELING) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #elif IS_SCARA - #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0)) - #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0)) - #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE)) - #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE)) - #endif - #endif -#elif ENABLED(AUTO_BED_LEVELING_UBL) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #elif IS_SCARA - #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE)) - #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE)) - #endif - #endif +#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) + // Override the mesh area if the automatic (max) area is too large + //#define MESH_MIN_X MESH_INSET + //#define MESH_MIN_Y MESH_INSET + //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) + //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - // If this is defined, the currently active mesh will be saved in the - // current slot on M500. - #define UBL_SAVE_ACTIVE_ON_M500 + #if ENABLED(AUTO_BED_LEVELING_UBL) + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + #endif #endif // @section extras diff --git a/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h b/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h index a710ff1bdd..bca733c72d 100644 --- a/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h +++ b/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h @@ -952,7 +952,7 @@ //========================= Unified Bed Leveling ============================ //=========================================================================== - #define UBL_MESH_INSET 1 // Mesh inset margin on print area + #define MESH_INSET 1 // Mesh inset margin on print area #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X diff --git a/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h b/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h index b70cc39fe0..372627b63f 100644 --- a/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h +++ b/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h @@ -937,7 +937,7 @@ //========================= Unified Bed Leveling ============================ //=========================================================================== - #define UBL_MESH_INSET 1 // Mesh inset margin on print area + #define MESH_INSET 1 // Mesh inset margin on print area #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X diff --git a/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h b/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h index c590ba8de2..60a8b371f1 100644 --- a/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h +++ b/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h @@ -941,7 +941,7 @@ //========================= Unified Bed Leveling ============================ //=========================================================================== - #define UBL_MESH_INSET 1 // Mesh inset margin on print area + #define MESH_INSET 1 // Mesh inset margin on print area #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X diff --git a/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h b/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h index 2b40851365..44aabe99c2 100644 --- a/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h +++ b/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h @@ -489,12 +489,14 @@ // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). #define SD_DETECT_INVERTED - #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? + #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. - #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. - // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that. - // using: + // Reverse SD sort to show "more recent" files first, according to the card's FAT. + // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. + #define SDCARD_RATHERRECENTFIRST + + // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART /** @@ -684,69 +686,16 @@ #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2) #endif -// Default mesh area is an area with an inset margin on the print area. -// Below are the macros that are used to define the borders for the mesh area, -// made available here for specialized needs, ie dual extruder setup. -#if ENABLED(MESH_BED_LEVELING) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #elif IS_SCARA - #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0)) - #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0)) - #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE)) - #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE)) - #endif - #endif -#elif ENABLED(AUTO_BED_LEVELING_UBL) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #elif IS_SCARA - #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE)) - #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE)) - #endif - #endif +#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) + // Override the mesh area if the automatic (max) area is too large + //#define MESH_MIN_X MESH_INSET + //#define MESH_MIN_Y MESH_INSET + //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) + //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - // If this is defined, the currently active mesh will be saved in the - // current slot on M500. - #define UBL_SAVE_ACTIVE_ON_M500 + #if ENABLED(AUTO_BED_LEVELING_UBL) + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + #endif #endif // @section extras diff --git a/Marlin/src/config/examples/Malyan/M150/Configuration.h b/Marlin/src/config/examples/Malyan/M150/Configuration.h index a0fb50dd59..5dae0a8cf7 100644 --- a/Marlin/src/config/examples/Malyan/M150/Configuration.h +++ b/Marlin/src/config/examples/Malyan/M150/Configuration.h @@ -965,7 +965,7 @@ //========================= Unified Bed Leveling ============================ //=========================================================================== - #define UBL_MESH_INSET 1 // Mesh inset margin on print area + #define MESH_INSET 1 // Mesh inset margin on print area #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X diff --git a/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h b/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h index 7293c0f6c2..351991833f 100644 --- a/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h +++ b/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h @@ -489,12 +489,14 @@ // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). #define SD_DETECT_INVERTED - #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? + #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. - #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. - // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that. - // using: + // Reverse SD sort to show "more recent" files first, according to the card's FAT. + // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. + #define SDCARD_RATHERRECENTFIRST + + // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART /** @@ -681,69 +683,16 @@ #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2) #endif -// Default mesh area is an area with an inset margin on the print area. -// Below are the macros that are used to define the borders for the mesh area, -// made available here for specialized needs, ie dual extruder setup. -#if ENABLED(MESH_BED_LEVELING) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #elif IS_SCARA - #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0)) - #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0)) - #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE)) - #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE)) - #endif - #endif -#elif ENABLED(AUTO_BED_LEVELING_UBL) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #elif IS_SCARA - #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE)) - #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE)) - #endif - #endif +#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) + // Override the mesh area if the automatic (max) area is too large + //#define MESH_MIN_X MESH_INSET + //#define MESH_MIN_Y MESH_INSET + //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) + //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - // If this is defined, the currently active mesh will be saved in the - // current slot on M500. - #define UBL_SAVE_ACTIVE_ON_M500 + #if ENABLED(AUTO_BED_LEVELING_UBL) + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + #endif #endif // @section extras diff --git a/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h b/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h index 91c6374887..fa21539ea2 100644 --- a/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h +++ b/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h @@ -941,7 +941,7 @@ //========================= Unified Bed Leveling ============================ //=========================================================================== - #define UBL_MESH_INSET 1 // Mesh inset margin on print area + #define MESH_INSET 1 // Mesh inset margin on print area #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X diff --git a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h index 6e6f091f65..e83a87e9dc 100644 --- a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h +++ b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h @@ -941,7 +941,7 @@ //========================= Unified Bed Leveling ============================ //=========================================================================== - #define UBL_MESH_INSET 1 // Mesh inset margin on print area + #define MESH_INSET 1 // Mesh inset margin on print area #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X diff --git a/Marlin/src/config/examples/Mks/Sbase/Configuration.h b/Marlin/src/config/examples/Mks/Sbase/Configuration.h index 32bd88ba9d..b96eb63881 100644 --- a/Marlin/src/config/examples/Mks/Sbase/Configuration.h +++ b/Marlin/src/config/examples/Mks/Sbase/Configuration.h @@ -939,7 +939,7 @@ //========================= Unified Bed Leveling ============================ //=========================================================================== - #define UBL_MESH_INSET 1 // Mesh inset margin on print area + #define MESH_INSET 1 // Mesh inset margin on print area #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X diff --git a/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h b/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h index 1f45a38799..9b5eaad8d0 100644 --- a/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h +++ b/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h @@ -489,12 +489,14 @@ // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). #define SD_DETECT_INVERTED - #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? + #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. - #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. - // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that. - // using: + // Reverse SD sort to show "more recent" files first, according to the card's FAT. + // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. + #define SDCARD_RATHERRECENTFIRST + + // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART /** @@ -705,69 +707,16 @@ #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2) #endif -// Default mesh area is an area with an inset margin on the print area. -// Below are the macros that are used to define the borders for the mesh area, -// made available here for specialized needs, ie dual extruder setup. -#if ENABLED(MESH_BED_LEVELING) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #elif IS_SCARA - #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0)) - #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0)) - #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE)) - #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE)) - #endif - #endif -#elif ENABLED(AUTO_BED_LEVELING_UBL) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #elif IS_SCARA - #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE)) - #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE)) - #endif - #endif +#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) + // Override the mesh area if the automatic (max) area is too large + //#define MESH_MIN_X MESH_INSET + //#define MESH_MIN_Y MESH_INSET + //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) + //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - // If this is defined, the currently active mesh will be saved in the - // current slot on M500. - #define UBL_SAVE_ACTIVE_ON_M500 + #if ENABLED(AUTO_BED_LEVELING_UBL) + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + #endif #endif // @section extras diff --git a/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h b/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h index b32f8006c0..b1f729e152 100644 --- a/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h +++ b/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h @@ -937,7 +937,7 @@ //========================= Unified Bed Leveling ============================ //=========================================================================== - #define UBL_MESH_INSET 1 // Mesh inset margin on print area + #define MESH_INSET 1 // Mesh inset margin on print area #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X diff --git a/Marlin/src/config/examples/RigidBot/Configuration.h b/Marlin/src/config/examples/RigidBot/Configuration.h index 5c64a53572..41f536bbce 100644 --- a/Marlin/src/config/examples/RigidBot/Configuration.h +++ b/Marlin/src/config/examples/RigidBot/Configuration.h @@ -935,7 +935,7 @@ //========================= Unified Bed Leveling ============================ //=========================================================================== - #define UBL_MESH_INSET 1 // Mesh inset margin on print area + #define MESH_INSET 1 // Mesh inset margin on print area #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X diff --git a/Marlin/src/config/examples/RigidBot/Configuration_adv.h b/Marlin/src/config/examples/RigidBot/Configuration_adv.h index 9b9f7c3474..b0cf04156c 100644 --- a/Marlin/src/config/examples/RigidBot/Configuration_adv.h +++ b/Marlin/src/config/examples/RigidBot/Configuration_adv.h @@ -489,12 +489,14 @@ // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). #define SD_DETECT_INVERTED - #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? + #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. - #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. - // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that. - // using: + // Reverse SD sort to show "more recent" files first, according to the card's FAT. + // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. + #define SDCARD_RATHERRECENTFIRST + + // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART /** @@ -684,69 +686,16 @@ #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2) #endif -// Default mesh area is an area with an inset margin on the print area. -// Below are the macros that are used to define the borders for the mesh area, -// made available here for specialized needs, ie dual extruder setup. -#if ENABLED(MESH_BED_LEVELING) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #elif IS_SCARA - #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0)) - #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0)) - #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE)) - #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE)) - #endif - #endif -#elif ENABLED(AUTO_BED_LEVELING_UBL) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #elif IS_SCARA - #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE)) - #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE)) - #endif - #endif +#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) + // Override the mesh area if the automatic (max) area is too large + //#define MESH_MIN_X MESH_INSET + //#define MESH_MIN_Y MESH_INSET + //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) + //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - // If this is defined, the currently active mesh will be saved in the - // current slot on M500. - #define UBL_SAVE_ACTIVE_ON_M500 + #if ENABLED(AUTO_BED_LEVELING_UBL) + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + #endif #endif // @section extras diff --git a/Marlin/src/config/examples/SCARA/Configuration.h b/Marlin/src/config/examples/SCARA/Configuration.h index e2251f4f7e..e1cad825d5 100644 --- a/Marlin/src/config/examples/SCARA/Configuration.h +++ b/Marlin/src/config/examples/SCARA/Configuration.h @@ -949,7 +949,7 @@ //========================= Unified Bed Leveling ============================ //=========================================================================== - #define UBL_MESH_INSET 1 // Mesh inset margin on print area + #define MESH_INSET 1 // Mesh inset margin on print area #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X diff --git a/Marlin/src/config/examples/SCARA/Configuration_adv.h b/Marlin/src/config/examples/SCARA/Configuration_adv.h index 150a10a1c6..eac62904f0 100644 --- a/Marlin/src/config/examples/SCARA/Configuration_adv.h +++ b/Marlin/src/config/examples/SCARA/Configuration_adv.h @@ -489,12 +489,14 @@ // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). #define SD_DETECT_INVERTED - #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? + #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. - #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. - // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that. - // using: + // Reverse SD sort to show "more recent" files first, according to the card's FAT. + // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. + #define SDCARD_RATHERRECENTFIRST + + // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART /** @@ -684,69 +686,16 @@ #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2) #endif -// Default mesh area is an area with an inset margin on the print area. -// Below are the macros that are used to define the borders for the mesh area, -// made available here for specialized needs, ie dual extruder setup. -#if ENABLED(MESH_BED_LEVELING) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #elif IS_SCARA - #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0)) - #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0)) - #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE)) - #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE)) - #endif - #endif -#elif ENABLED(AUTO_BED_LEVELING_UBL) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #elif IS_SCARA - #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE)) - #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE)) - #endif - #endif +#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) + // Override the mesh area if the automatic (max) area is too large + //#define MESH_MIN_X MESH_INSET + //#define MESH_MIN_Y MESH_INSET + //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) + //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - // If this is defined, the currently active mesh will be saved in the - // current slot on M500. - #define UBL_SAVE_ACTIVE_ON_M500 + #if ENABLED(AUTO_BED_LEVELING_UBL) + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + #endif #endif // @section extras diff --git a/Marlin/src/config/examples/Sanguinololu/Configuration.h b/Marlin/src/config/examples/Sanguinololu/Configuration.h index 467d2c4582..923533edb0 100644 --- a/Marlin/src/config/examples/Sanguinololu/Configuration.h +++ b/Marlin/src/config/examples/Sanguinololu/Configuration.h @@ -968,7 +968,7 @@ //========================= Unified Bed Leveling ============================ //=========================================================================== - #define UBL_MESH_INSET 1 // Mesh inset margin on print area + #define MESH_INSET 1 // Mesh inset margin on print area #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X diff --git a/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h b/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h index 74315aa322..37340d1471 100644 --- a/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h +++ b/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h @@ -478,12 +478,14 @@ // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). #define SD_DETECT_INVERTED - #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? + #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. - #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. - // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that. - // using: + // Reverse SD sort to show "more recent" files first, according to the card's FAT. + // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. + #define SDCARD_RATHERRECENTFIRST + + // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART /** @@ -673,69 +675,16 @@ #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2) #endif -// Default mesh area is an area with an inset margin on the print area. -// Below are the macros that are used to define the borders for the mesh area, -// made available here for specialized needs, ie dual extruder setup. -#if ENABLED(MESH_BED_LEVELING) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #elif IS_SCARA - #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0)) - #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0)) - #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE)) - #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE)) - #endif - #endif -#elif ENABLED(AUTO_BED_LEVELING_UBL) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #elif IS_SCARA - #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE)) - #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE)) - #endif - #endif +#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) + // Override the mesh area if the automatic (max) area is too large + //#define MESH_MIN_X MESH_INSET + //#define MESH_MIN_Y MESH_INSET + //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) + //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - // If this is defined, the currently active mesh will be saved in the - // current slot on M500. - #define UBL_SAVE_ACTIVE_ON_M500 + #if ENABLED(AUTO_BED_LEVELING_UBL) + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + #endif #endif // @section extras diff --git a/Marlin/src/config/examples/TinyBoy2/Configuration.h b/Marlin/src/config/examples/TinyBoy2/Configuration.h index 8cc92f15ae..8df03edc36 100644 --- a/Marlin/src/config/examples/TinyBoy2/Configuration.h +++ b/Marlin/src/config/examples/TinyBoy2/Configuration.h @@ -993,7 +993,7 @@ //========================= Unified Bed Leveling ============================ //=========================================================================== - #define UBL_MESH_INSET 1 // Mesh inset margin on print area + #define MESH_INSET 1 // Mesh inset margin on print area #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X diff --git a/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h b/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h index 3ae501a301..7767baaba1 100644 --- a/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h +++ b/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h @@ -489,12 +489,14 @@ // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). #define SD_DETECT_INVERTED - #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? + #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. - #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. - // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that. - // using: + // Reverse SD sort to show "more recent" files first, according to the card's FAT. + // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. + #define SDCARD_RATHERRECENTFIRST + + // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART /** @@ -684,69 +686,16 @@ #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2) #endif -// Default mesh area is an area with an inset margin on the print area. -// Below are the macros that are used to define the borders for the mesh area, -// made available here for specialized needs, ie dual extruder setup. -#if ENABLED(MESH_BED_LEVELING) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #elif IS_SCARA - #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0)) - #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0)) - #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE)) - #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE)) - #endif - #endif -#elif ENABLED(AUTO_BED_LEVELING_UBL) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #elif IS_SCARA - #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE)) - #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE)) - #endif - #endif +#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) + // Override the mesh area if the automatic (max) area is too large + //#define MESH_MIN_X MESH_INSET + //#define MESH_MIN_Y MESH_INSET + //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) + //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - // If this is defined, the currently active mesh will be saved in the - // current slot on M500. - #define UBL_SAVE_ACTIVE_ON_M500 + #if ENABLED(AUTO_BED_LEVELING_UBL) + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + #endif #endif // @section extras diff --git a/Marlin/src/config/examples/Velleman/K8200/Configuration.h b/Marlin/src/config/examples/Velleman/K8200/Configuration.h index b8c42cc65c..15731acb36 100644 --- a/Marlin/src/config/examples/Velleman/K8200/Configuration.h +++ b/Marlin/src/config/examples/Velleman/K8200/Configuration.h @@ -967,7 +967,7 @@ //========================= Unified Bed Leveling ============================ //=========================================================================== - #define UBL_MESH_INSET 1 // Mesh inset margin on print area + #define MESH_INSET 1 // Mesh inset margin on print area #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X diff --git a/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h b/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h index c57a8765ff..b50290057a 100644 --- a/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h +++ b/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h @@ -502,7 +502,7 @@ // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). #define SD_DETECT_INVERTED - #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? + #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. @@ -694,69 +694,16 @@ #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2) #endif -// Default mesh area is an area with an inset margin on the print area. -// Below are the macros that are used to define the borders for the mesh area, -// made available here for specialized needs, ie dual extruder setup. -#if ENABLED(MESH_BED_LEVELING) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #elif IS_SCARA - #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0)) - #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0)) - #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE)) - #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE)) - #endif - #endif -#elif ENABLED(AUTO_BED_LEVELING_UBL) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #elif IS_SCARA - #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE)) - #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE)) - #endif - #endif +#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) + // Override the mesh area if the automatic (max) area is too large + //#define MESH_MIN_X MESH_INSET + //#define MESH_MIN_Y MESH_INSET + //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) + //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - // If this is defined, the currently active mesh will be saved in the - // current slot on M500. - #define UBL_SAVE_ACTIVE_ON_M500 + #if ENABLED(AUTO_BED_LEVELING_UBL) + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + #endif #endif // @section extras diff --git a/Marlin/src/config/examples/Velleman/K8400/Configuration.h b/Marlin/src/config/examples/Velleman/K8400/Configuration.h index c99b7de2d2..3e8598facb 100644 --- a/Marlin/src/config/examples/Velleman/K8400/Configuration.h +++ b/Marlin/src/config/examples/Velleman/K8400/Configuration.h @@ -937,7 +937,7 @@ //========================= Unified Bed Leveling ============================ //=========================================================================== - #define UBL_MESH_INSET 1 // Mesh inset margin on print area + #define MESH_INSET 1 // Mesh inset margin on print area #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X diff --git a/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h b/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h index e5b96e6ae9..219181db37 100644 --- a/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h +++ b/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h @@ -489,12 +489,14 @@ // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). #define SD_DETECT_INVERTED - #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? + #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. - #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. - // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that. - // using: + // Reverse SD sort to show "more recent" files first, according to the card's FAT. + // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. + #define SDCARD_RATHERRECENTFIRST + + // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART /** @@ -684,69 +686,16 @@ #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2) #endif -// Default mesh area is an area with an inset margin on the print area. -// Below are the macros that are used to define the borders for the mesh area, -// made available here for specialized needs, ie dual extruder setup. -#if ENABLED(MESH_BED_LEVELING) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #elif IS_SCARA - #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0)) - #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0)) - #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE)) - #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE)) - #endif - #endif -#elif ENABLED(AUTO_BED_LEVELING_UBL) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #elif IS_SCARA - #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE)) - #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE)) - #endif - #endif +#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) + // Override the mesh area if the automatic (max) area is too large + //#define MESH_MIN_X MESH_INSET + //#define MESH_MIN_Y MESH_INSET + //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) + //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - // If this is defined, the currently active mesh will be saved in the - // current slot on M500. - #define UBL_SAVE_ACTIVE_ON_M500 + #if ENABLED(AUTO_BED_LEVELING_UBL) + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + #endif #endif // @section extras diff --git a/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h b/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h index cae1f43521..5e44cd377d 100644 --- a/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h +++ b/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h @@ -937,7 +937,7 @@ //========================= Unified Bed Leveling ============================ //=========================================================================== - #define UBL_MESH_INSET 1 // Mesh inset margin on print area + #define MESH_INSET 1 // Mesh inset margin on print area #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X diff --git a/Marlin/src/config/examples/adafruit/ST7565/Configuration.h b/Marlin/src/config/examples/adafruit/ST7565/Configuration.h index ae1bd7535c..6ce3ad4ef8 100644 --- a/Marlin/src/config/examples/adafruit/ST7565/Configuration.h +++ b/Marlin/src/config/examples/adafruit/ST7565/Configuration.h @@ -937,7 +937,7 @@ //========================= Unified Bed Leveling ============================ //=========================================================================== - #define UBL_MESH_INSET 1 // Mesh inset margin on print area + #define MESH_INSET 1 // Mesh inset margin on print area #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X diff --git a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h index e49b160d65..3bedf52d16 100644 --- a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h +++ b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h @@ -1063,7 +1063,7 @@ //========================= Unified Bed Leveling ============================ //=========================================================================== - #define UBL_MESH_INSET 1 // Mesh inset margin on print area + #define MESH_INSET 1 // Mesh inset margin on print area #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X diff --git a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h index 8c2e7fc953..ea0b246e10 100644 --- a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h @@ -491,12 +491,14 @@ // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). #define SD_DETECT_INVERTED - #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? + #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. - #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. - // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that. - // using: + // Reverse SD sort to show "more recent" files first, according to the card's FAT. + // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. + #define SDCARD_RATHERRECENTFIRST + + // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART /** @@ -686,69 +688,16 @@ #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2) #endif -// Default mesh area is an area with an inset margin on the print area. -// Below are the macros that are used to define the borders for the mesh area, -// made available here for specialized needs, ie dual extruder setup. -#if ENABLED(MESH_BED_LEVELING) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #elif IS_SCARA - #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0)) - #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0)) - #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE)) - #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE)) - #endif - #endif -#elif ENABLED(AUTO_BED_LEVELING_UBL) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #elif IS_SCARA - #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE)) - #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE)) - #endif - #endif +#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) + // Override the mesh area if the automatic (max) area is too large + //#define MESH_MIN_X MESH_INSET + //#define MESH_MIN_Y MESH_INSET + //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) + //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - // If this is defined, the currently active mesh will be saved in the - // current slot on M500. - #define UBL_SAVE_ACTIVE_ON_M500 + #if ENABLED(AUTO_BED_LEVELING_UBL) + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + #endif #endif // @section extras diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h index ce740f0119..58c3e3e209 100644 --- a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h +++ b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h @@ -1057,7 +1057,7 @@ //========================= Unified Bed Leveling ============================ //=========================================================================== - #define UBL_MESH_INSET 1 // Mesh inset margin on print area + #define MESH_INSET 1 // Mesh inset margin on print area #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h index a039abc464..cfc4d23c7c 100644 --- a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h @@ -491,12 +491,14 @@ // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). #define SD_DETECT_INVERTED - #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? + #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. - #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. - // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that. - // using: + // Reverse SD sort to show "more recent" files first, according to the card's FAT. + // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. + #define SDCARD_RATHERRECENTFIRST + + // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART /** @@ -686,69 +688,16 @@ #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2) #endif -// Default mesh area is an area with an inset margin on the print area. -// Below are the macros that are used to define the borders for the mesh area, -// made available here for specialized needs, ie dual extruder setup. -#if ENABLED(MESH_BED_LEVELING) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #elif IS_SCARA - #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0)) - #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0)) - #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE)) - #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE)) - #endif - #endif -#elif ENABLED(AUTO_BED_LEVELING_UBL) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #elif IS_SCARA - #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE)) - #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE)) - #endif - #endif +#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) + // Override the mesh area if the automatic (max) area is too large + //#define MESH_MIN_X MESH_INSET + //#define MESH_MIN_Y MESH_INSET + //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) + //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - // If this is defined, the currently active mesh will be saved in the - // current slot on M500. - #define UBL_SAVE_ACTIVE_ON_M500 + #if ENABLED(AUTO_BED_LEVELING_UBL) + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + #endif #endif // @section extras diff --git a/Marlin/src/config/examples/delta/generic/Configuration.h b/Marlin/src/config/examples/delta/generic/Configuration.h index 857cb4c129..7fb6e5e912 100644 --- a/Marlin/src/config/examples/delta/generic/Configuration.h +++ b/Marlin/src/config/examples/delta/generic/Configuration.h @@ -1052,7 +1052,7 @@ //========================= Unified Bed Leveling ============================ //=========================================================================== - #define UBL_MESH_INSET 1 // Mesh inset margin on print area + #define MESH_INSET 1 // Mesh inset margin on print area #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X diff --git a/Marlin/src/config/examples/delta/generic/Configuration_adv.h b/Marlin/src/config/examples/delta/generic/Configuration_adv.h index a039abc464..cfc4d23c7c 100644 --- a/Marlin/src/config/examples/delta/generic/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/generic/Configuration_adv.h @@ -491,12 +491,14 @@ // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). #define SD_DETECT_INVERTED - #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? + #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. - #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. - // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that. - // using: + // Reverse SD sort to show "more recent" files first, according to the card's FAT. + // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. + #define SDCARD_RATHERRECENTFIRST + + // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART /** @@ -686,69 +688,16 @@ #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2) #endif -// Default mesh area is an area with an inset margin on the print area. -// Below are the macros that are used to define the borders for the mesh area, -// made available here for specialized needs, ie dual extruder setup. -#if ENABLED(MESH_BED_LEVELING) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #elif IS_SCARA - #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0)) - #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0)) - #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE)) - #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE)) - #endif - #endif -#elif ENABLED(AUTO_BED_LEVELING_UBL) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #elif IS_SCARA - #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE)) - #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE)) - #endif - #endif +#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) + // Override the mesh area if the automatic (max) area is too large + //#define MESH_MIN_X MESH_INSET + //#define MESH_MIN_Y MESH_INSET + //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) + //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - // If this is defined, the currently active mesh will be saved in the - // current slot on M500. - #define UBL_SAVE_ACTIVE_ON_M500 + #if ENABLED(AUTO_BED_LEVELING_UBL) + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + #endif #endif // @section extras diff --git a/Marlin/src/config/examples/delta/kossel_mini/Configuration.h b/Marlin/src/config/examples/delta/kossel_mini/Configuration.h index 81a499b6e1..3b362b7baa 100644 --- a/Marlin/src/config/examples/delta/kossel_mini/Configuration.h +++ b/Marlin/src/config/examples/delta/kossel_mini/Configuration.h @@ -1055,7 +1055,7 @@ //========================= Unified Bed Leveling ============================ //=========================================================================== - #define UBL_MESH_INSET 1 // Mesh inset margin on print area + #define MESH_INSET 1 // Mesh inset margin on print area #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X diff --git a/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h b/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h index a039abc464..cfc4d23c7c 100644 --- a/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h @@ -491,12 +491,14 @@ // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). #define SD_DETECT_INVERTED - #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? + #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. - #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. - // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that. - // using: + // Reverse SD sort to show "more recent" files first, according to the card's FAT. + // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. + #define SDCARD_RATHERRECENTFIRST + + // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART /** @@ -686,69 +688,16 @@ #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2) #endif -// Default mesh area is an area with an inset margin on the print area. -// Below are the macros that are used to define the borders for the mesh area, -// made available here for specialized needs, ie dual extruder setup. -#if ENABLED(MESH_BED_LEVELING) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #elif IS_SCARA - #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0)) - #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0)) - #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE)) - #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE)) - #endif - #endif -#elif ENABLED(AUTO_BED_LEVELING_UBL) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #elif IS_SCARA - #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE)) - #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE)) - #endif - #endif +#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) + // Override the mesh area if the automatic (max) area is too large + //#define MESH_MIN_X MESH_INSET + //#define MESH_MIN_Y MESH_INSET + //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) + //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - // If this is defined, the currently active mesh will be saved in the - // current slot on M500. - #define UBL_SAVE_ACTIVE_ON_M500 + #if ENABLED(AUTO_BED_LEVELING_UBL) + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + #endif #endif // @section extras diff --git a/Marlin/src/config/examples/delta/kossel_pro/Configuration.h b/Marlin/src/config/examples/delta/kossel_pro/Configuration.h index 911b50e499..b5842ac684 100644 --- a/Marlin/src/config/examples/delta/kossel_pro/Configuration.h +++ b/Marlin/src/config/examples/delta/kossel_pro/Configuration.h @@ -1055,7 +1055,7 @@ //========================= Unified Bed Leveling ============================ //=========================================================================== - #define UBL_MESH_INSET 1 // Mesh inset margin on print area + #define MESH_INSET 1 // Mesh inset margin on print area #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X diff --git a/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h b/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h index 9c5e1ab8f5..c299ec9cd1 100644 --- a/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h @@ -496,12 +496,14 @@ // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). #define SD_DETECT_INVERTED - #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? + #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. - #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. - // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that. - // using: + // Reverse SD sort to show "more recent" files first, according to the card's FAT. + // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. + #define SDCARD_RATHERRECENTFIRST + + // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART /** @@ -691,69 +693,16 @@ #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2) #endif -// Default mesh area is an area with an inset margin on the print area. -// Below are the macros that are used to define the borders for the mesh area, -// made available here for specialized needs, ie dual extruder setup. -#if ENABLED(MESH_BED_LEVELING) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #elif IS_SCARA - #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0)) - #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0)) - #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE)) - #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE)) - #endif - #endif -#elif ENABLED(AUTO_BED_LEVELING_UBL) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #elif IS_SCARA - #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE)) - #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE)) - #endif - #endif +#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) + // Override the mesh area if the automatic (max) area is too large + //#define MESH_MIN_X MESH_INSET + //#define MESH_MIN_Y MESH_INSET + //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) + //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - // If this is defined, the currently active mesh will be saved in the - // current slot on M500. - #define UBL_SAVE_ACTIVE_ON_M500 + #if ENABLED(AUTO_BED_LEVELING_UBL) + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + #endif #endif // @section extras diff --git a/Marlin/src/config/examples/delta/kossel_xl/Configuration.h b/Marlin/src/config/examples/delta/kossel_xl/Configuration.h index 2deb49db34..b3e18476c9 100644 --- a/Marlin/src/config/examples/delta/kossel_xl/Configuration.h +++ b/Marlin/src/config/examples/delta/kossel_xl/Configuration.h @@ -1064,7 +1064,7 @@ //========================= Unified Bed Leveling ============================ //=========================================================================== - #define UBL_MESH_INSET 1 // Mesh inset margin on print area + #define MESH_INSET 1 // Mesh inset margin on print area #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X diff --git a/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h b/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h index c2bbd7efc5..fceae7557f 100644 --- a/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h @@ -491,12 +491,14 @@ // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). #define SD_DETECT_INVERTED - #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? + #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. - #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. - // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that. - // using: + // Reverse SD sort to show "more recent" files first, according to the card's FAT. + // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. + #define SDCARD_RATHERRECENTFIRST + + // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART /** @@ -686,69 +688,16 @@ #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2) #endif -// Default mesh area is an area with an inset margin on the print area. -// Below are the macros that are used to define the borders for the mesh area, -// made available here for specialized needs, ie dual extruder setup. -#if ENABLED(MESH_BED_LEVELING) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #elif IS_SCARA - #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0)) - #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0)) - #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE)) - #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE)) - #endif - #endif -#elif ENABLED(AUTO_BED_LEVELING_UBL) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #elif IS_SCARA - #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE)) - #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE)) - #endif - #endif +#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) + // Override the mesh area if the automatic (max) area is too large + //#define MESH_MIN_X MESH_INSET + //#define MESH_MIN_Y MESH_INSET + //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) + //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - // If this is defined, the currently active mesh will be saved in the - // current slot on M500. - #define UBL_SAVE_ACTIVE_ON_M500 + #if ENABLED(AUTO_BED_LEVELING_UBL) + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + #endif #endif // @section extras diff --git a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h index 9ac72b031c..fb70669454 100644 --- a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h +++ b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h @@ -951,7 +951,7 @@ //========================= Unified Bed Leveling ============================ //=========================================================================== - #define UBL_MESH_INSET 45 // Mesh inset margin on print area + #define MESH_INSET 45 // Mesh inset margin on print area #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X diff --git a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h index 32d7b410eb..f5e7c3b6a1 100644 --- a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h +++ b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h @@ -489,12 +489,14 @@ // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). #define SD_DETECT_INVERTED - #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? + #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. - #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. - // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that. - // using: + // Reverse SD sort to show "more recent" files first, according to the card's FAT. + // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. + #define SDCARD_RATHERRECENTFIRST + + // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART /** @@ -684,69 +686,16 @@ #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2) #endif -// Default mesh area is an area with an inset margin on the print area. -// Below are the macros that are used to define the borders for the mesh area, -// made available here for specialized needs, ie dual extruder setup. -#if ENABLED(MESH_BED_LEVELING) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #elif IS_SCARA - #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0)) - #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0)) - #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE)) - #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE)) - #endif - #endif -#elif ENABLED(AUTO_BED_LEVELING_UBL) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #elif IS_SCARA - #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE)) - #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE)) - #endif - #endif +#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) + // Override the mesh area if the automatic (max) area is too large + //#define MESH_MIN_X MESH_INSET + //#define MESH_MIN_Y MESH_INSET + //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) + //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - // If this is defined, the currently active mesh will be saved in the - // current slot on M500. - #define UBL_SAVE_ACTIVE_ON_M500 + #if ENABLED(AUTO_BED_LEVELING_UBL) + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + #endif #endif // @section extras diff --git a/Marlin/src/config/examples/makibox/Configuration.h b/Marlin/src/config/examples/makibox/Configuration.h index 8a7230c15c..f7f937e1cc 100644 --- a/Marlin/src/config/examples/makibox/Configuration.h +++ b/Marlin/src/config/examples/makibox/Configuration.h @@ -940,7 +940,7 @@ //========================= Unified Bed Leveling ============================ //=========================================================================== - #define UBL_MESH_INSET 1 // Mesh inset margin on print area + #define MESH_INSET 1 // Mesh inset margin on print area #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X diff --git a/Marlin/src/config/examples/makibox/Configuration_adv.h b/Marlin/src/config/examples/makibox/Configuration_adv.h index 8e9e1fb720..75502fad78 100644 --- a/Marlin/src/config/examples/makibox/Configuration_adv.h +++ b/Marlin/src/config/examples/makibox/Configuration_adv.h @@ -489,12 +489,14 @@ // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). //#define SD_DETECT_INVERTED - #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? + #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. - #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. - // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that. - // using: + // Reverse SD sort to show "more recent" files first, according to the card's FAT. + // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. + #define SDCARD_RATHERRECENTFIRST + + // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART /** @@ -684,69 +686,16 @@ #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2) #endif -// Default mesh area is an area with an inset margin on the print area. -// Below are the macros that are used to define the borders for the mesh area, -// made available here for specialized needs, ie dual extruder setup. -#if ENABLED(MESH_BED_LEVELING) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #elif IS_SCARA - #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0)) - #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0)) - #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE)) - #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE)) - #endif - #endif -#elif ENABLED(AUTO_BED_LEVELING_UBL) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #elif IS_SCARA - #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE)) - #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE)) - #endif - #endif +#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) + // Override the mesh area if the automatic (max) area is too large + //#define MESH_MIN_X MESH_INSET + //#define MESH_MIN_Y MESH_INSET + //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) + //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - // If this is defined, the currently active mesh will be saved in the - // current slot on M500. - #define UBL_SAVE_ACTIVE_ON_M500 + #if ENABLED(AUTO_BED_LEVELING_UBL) + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + #endif #endif // @section extras diff --git a/Marlin/src/config/examples/stm32f103ret6/Configuration.h b/Marlin/src/config/examples/stm32f103ret6/Configuration.h index 9a7a46b07a..1ae3973c9d 100644 --- a/Marlin/src/config/examples/stm32f103ret6/Configuration.h +++ b/Marlin/src/config/examples/stm32f103ret6/Configuration.h @@ -924,7 +924,7 @@ //========================= Unified Bed Leveling ============================ //=========================================================================== - #define UBL_MESH_INSET 1 // Mesh inset margin on print area + #define MESH_INSET 1 // Mesh inset margin on print area #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X diff --git a/Marlin/src/config/examples/tvrrug/Round2/Configuration.h b/Marlin/src/config/examples/tvrrug/Round2/Configuration.h index 6ca0d5c5fb..c38f4bb114 100644 --- a/Marlin/src/config/examples/tvrrug/Round2/Configuration.h +++ b/Marlin/src/config/examples/tvrrug/Round2/Configuration.h @@ -932,7 +932,7 @@ //========================= Unified Bed Leveling ============================ //=========================================================================== - #define UBL_MESH_INSET 1 // Mesh inset margin on print area + #define MESH_INSET 1 // Mesh inset margin on print area #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X diff --git a/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h b/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h index 9e702d9e65..09098c7b54 100644 --- a/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h @@ -489,12 +489,14 @@ // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). #define SD_DETECT_INVERTED - #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? + #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. - #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. - // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that. - // using: + // Reverse SD sort to show "more recent" files first, according to the card's FAT. + // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. + #define SDCARD_RATHERRECENTFIRST + + // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART /** @@ -684,69 +686,16 @@ #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2) #endif -// Default mesh area is an area with an inset margin on the print area. -// Below are the macros that are used to define the borders for the mesh area, -// made available here for specialized needs, ie dual extruder setup. -#if ENABLED(MESH_BED_LEVELING) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #elif IS_SCARA - #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0)) - #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0)) - #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE)) - #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE)) - #endif - #endif -#elif ENABLED(AUTO_BED_LEVELING_UBL) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #elif IS_SCARA - #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE)) - #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE)) - #endif - #endif +#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) + // Override the mesh area if the automatic (max) area is too large + //#define MESH_MIN_X MESH_INSET + //#define MESH_MIN_Y MESH_INSET + //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) + //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - // If this is defined, the currently active mesh will be saved in the - // current slot on M500. - #define UBL_SAVE_ACTIVE_ON_M500 + #if ENABLED(AUTO_BED_LEVELING_UBL) + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + #endif #endif // @section extras diff --git a/Marlin/src/config/examples/wt150/Configuration.h b/Marlin/src/config/examples/wt150/Configuration.h index 98b4959553..f0ff8d3da6 100644 --- a/Marlin/src/config/examples/wt150/Configuration.h +++ b/Marlin/src/config/examples/wt150/Configuration.h @@ -942,7 +942,7 @@ //========================= Unified Bed Leveling ============================ //=========================================================================== - #define UBL_MESH_INSET 1 // Mesh inset margin on print area + #define MESH_INSET 1 // Mesh inset margin on print area #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X diff --git a/Marlin/src/config/examples/wt150/Configuration_adv.h b/Marlin/src/config/examples/wt150/Configuration_adv.h index eadd8f330a..70e4cc554e 100644 --- a/Marlin/src/config/examples/wt150/Configuration_adv.h +++ b/Marlin/src/config/examples/wt150/Configuration_adv.h @@ -489,12 +489,14 @@ // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). #define SD_DETECT_INVERTED - #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? + #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. - #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. - // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that. - // using: + // Reverse SD sort to show "more recent" files first, according to the card's FAT. + // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. + #define SDCARD_RATHERRECENTFIRST + + // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART /** @@ -684,69 +686,16 @@ #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2) #endif -// Default mesh area is an area with an inset margin on the print area. -// Below are the macros that are used to define the borders for the mesh area, -// made available here for specialized needs, ie dual extruder setup. -#if ENABLED(MESH_BED_LEVELING) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (MESH_INSET)) - #elif IS_SCARA - #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET) - #define MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #define MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0)) - #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0)) - #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE)) - #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE)) - #endif - #endif -#elif ENABLED(AUTO_BED_LEVELING_UBL) - #if ENABLED(DELTA) - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET)) - #elif IS_SCARA - #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET) - #define UBL_MESH_MAX_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #define UBL_MESH_MAX_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET)) - #else - // Boundaries for Cartesian probing based on set limits - #if ENABLED(BED_CENTER_AT_0_0) - #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2) - #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2) - #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2) - #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2) - #else - #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0)) - #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE)) - #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE)) - #endif - #endif +#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) + // Override the mesh area if the automatic (max) area is too large + //#define MESH_MIN_X MESH_INSET + //#define MESH_MIN_Y MESH_INSET + //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) + //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - // If this is defined, the currently active mesh will be saved in the - // current slot on M500. - #define UBL_SAVE_ACTIVE_ON_M500 + #if ENABLED(AUTO_BED_LEVELING_UBL) + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + #endif #endif // @section extras diff --git a/Marlin/src/feature/bedlevel/ubl/ubl.cpp b/Marlin/src/feature/bedlevel/ubl/ubl.cpp index ff7d2e72dd..9f4a33f19b 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl.cpp +++ b/Marlin/src/feature/bedlevel/ubl/ubl.cpp @@ -125,9 +125,9 @@ SERIAL_ECHO_SP(spaces + 3); serial_echo_xy(GRID_MAX_POINTS_X - 1, GRID_MAX_POINTS_Y - 1); SERIAL_EOL(); - serial_echo_xy(UBL_MESH_MIN_X, UBL_MESH_MAX_Y); + serial_echo_xy(MESH_MIN_X, MESH_MAX_Y); SERIAL_ECHO_SP(spaces); - serial_echo_xy(UBL_MESH_MAX_X, UBL_MESH_MAX_Y); + serial_echo_xy(MESH_MAX_X, MESH_MAX_Y); SERIAL_EOL(); } else { @@ -174,9 +174,9 @@ } if (map_type == 0) { - serial_echo_xy(UBL_MESH_MIN_X, UBL_MESH_MIN_Y); + serial_echo_xy(MESH_MIN_X, MESH_MIN_Y); SERIAL_ECHO_SP(spaces + 4); - serial_echo_xy(UBL_MESH_MAX_X, UBL_MESH_MIN_Y); + serial_echo_xy(MESH_MAX_X, MESH_MIN_Y); SERIAL_EOL(); serial_echo_xy(0, 0); SERIAL_ECHO_SP(spaces + 5); diff --git a/Marlin/src/feature/bedlevel/ubl/ubl.h b/Marlin/src/feature/bedlevel/ubl/ubl.h index 20333895f4..6709a8f1bc 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl.h +++ b/Marlin/src/feature/bedlevel/ubl/ubl.h @@ -67,8 +67,8 @@ extern uint8_t ubl_cnt; void lcd_quick_feedback(); #endif -#define MESH_X_DIST (float(UBL_MESH_MAX_X - (UBL_MESH_MIN_X)) / float(GRID_MAX_POINTS_X - 1)) -#define MESH_Y_DIST (float(UBL_MESH_MAX_Y - (UBL_MESH_MIN_Y)) / float(GRID_MAX_POINTS_Y - 1)) +#define MESH_X_DIST (float(MESH_MAX_X - (MESH_MIN_X)) / float(GRID_MAX_POINTS_X - 1)) +#define MESH_Y_DIST (float(MESH_MAX_Y - (MESH_MIN_Y)) / float(GRID_MAX_POINTS_Y - 1)) class unified_bed_leveling { private: @@ -162,25 +162,25 @@ class unified_bed_leveling { // 15 is the maximum nubmer of grid points supported + 1 safety margin for now, // until determinism prevails constexpr static float _mesh_index_to_xpos[16] PROGMEM = { - UBL_MESH_MIN_X + 0 * (MESH_X_DIST), UBL_MESH_MIN_X + 1 * (MESH_X_DIST), - UBL_MESH_MIN_X + 2 * (MESH_X_DIST), UBL_MESH_MIN_X + 3 * (MESH_X_DIST), - UBL_MESH_MIN_X + 4 * (MESH_X_DIST), UBL_MESH_MIN_X + 5 * (MESH_X_DIST), - UBL_MESH_MIN_X + 6 * (MESH_X_DIST), UBL_MESH_MIN_X + 7 * (MESH_X_DIST), - UBL_MESH_MIN_X + 8 * (MESH_X_DIST), UBL_MESH_MIN_X + 9 * (MESH_X_DIST), - UBL_MESH_MIN_X + 10 * (MESH_X_DIST), UBL_MESH_MIN_X + 11 * (MESH_X_DIST), - UBL_MESH_MIN_X + 12 * (MESH_X_DIST), UBL_MESH_MIN_X + 13 * (MESH_X_DIST), - UBL_MESH_MIN_X + 14 * (MESH_X_DIST), UBL_MESH_MIN_X + 15 * (MESH_X_DIST) + MESH_MIN_X + 0 * (MESH_X_DIST), MESH_MIN_X + 1 * (MESH_X_DIST), + MESH_MIN_X + 2 * (MESH_X_DIST), MESH_MIN_X + 3 * (MESH_X_DIST), + MESH_MIN_X + 4 * (MESH_X_DIST), MESH_MIN_X + 5 * (MESH_X_DIST), + MESH_MIN_X + 6 * (MESH_X_DIST), MESH_MIN_X + 7 * (MESH_X_DIST), + MESH_MIN_X + 8 * (MESH_X_DIST), MESH_MIN_X + 9 * (MESH_X_DIST), + MESH_MIN_X + 10 * (MESH_X_DIST), MESH_MIN_X + 11 * (MESH_X_DIST), + MESH_MIN_X + 12 * (MESH_X_DIST), MESH_MIN_X + 13 * (MESH_X_DIST), + MESH_MIN_X + 14 * (MESH_X_DIST), MESH_MIN_X + 15 * (MESH_X_DIST) }; constexpr static float _mesh_index_to_ypos[16] PROGMEM = { - UBL_MESH_MIN_Y + 0 * (MESH_Y_DIST), UBL_MESH_MIN_Y + 1 * (MESH_Y_DIST), - UBL_MESH_MIN_Y + 2 * (MESH_Y_DIST), UBL_MESH_MIN_Y + 3 * (MESH_Y_DIST), - UBL_MESH_MIN_Y + 4 * (MESH_Y_DIST), UBL_MESH_MIN_Y + 5 * (MESH_Y_DIST), - UBL_MESH_MIN_Y + 6 * (MESH_Y_DIST), UBL_MESH_MIN_Y + 7 * (MESH_Y_DIST), - UBL_MESH_MIN_Y + 8 * (MESH_Y_DIST), UBL_MESH_MIN_Y + 9 * (MESH_Y_DIST), - UBL_MESH_MIN_Y + 10 * (MESH_Y_DIST), UBL_MESH_MIN_Y + 11 * (MESH_Y_DIST), - UBL_MESH_MIN_Y + 12 * (MESH_Y_DIST), UBL_MESH_MIN_Y + 13 * (MESH_Y_DIST), - UBL_MESH_MIN_Y + 14 * (MESH_Y_DIST), UBL_MESH_MIN_Y + 15 * (MESH_Y_DIST) + MESH_MIN_Y + 0 * (MESH_Y_DIST), MESH_MIN_Y + 1 * (MESH_Y_DIST), + MESH_MIN_Y + 2 * (MESH_Y_DIST), MESH_MIN_Y + 3 * (MESH_Y_DIST), + MESH_MIN_Y + 4 * (MESH_Y_DIST), MESH_MIN_Y + 5 * (MESH_Y_DIST), + MESH_MIN_Y + 6 * (MESH_Y_DIST), MESH_MIN_Y + 7 * (MESH_Y_DIST), + MESH_MIN_Y + 8 * (MESH_Y_DIST), MESH_MIN_Y + 9 * (MESH_Y_DIST), + MESH_MIN_Y + 10 * (MESH_Y_DIST), MESH_MIN_Y + 11 * (MESH_Y_DIST), + MESH_MIN_Y + 12 * (MESH_Y_DIST), MESH_MIN_Y + 13 * (MESH_Y_DIST), + MESH_MIN_Y + 14 * (MESH_Y_DIST), MESH_MIN_Y + 15 * (MESH_Y_DIST) }; static bool g26_debug_flag, has_control_of_lcd_panel; @@ -196,14 +196,14 @@ class unified_bed_leveling { FORCE_INLINE static void set_z(const int8_t px, const int8_t py, const float &z) { z_values[px][py] = z; } static int8_t get_cell_index_x(const float &x) { - const int8_t cx = (x - (UBL_MESH_MIN_X)) * (1.0 / (MESH_X_DIST)); + const int8_t cx = (x - (MESH_MIN_X)) * (1.0 / (MESH_X_DIST)); return constrain(cx, 0, (GRID_MAX_POINTS_X) - 1); // -1 is appropriate if we want all movement to the X_MAX } // position. But with this defined this way, it is possible // to extrapolate off of this point even further out. Probably // that is OK because something else should be keeping that from // happening and should not be worried about at this level. static int8_t get_cell_index_y(const float &y) { - const int8_t cy = (y - (UBL_MESH_MIN_Y)) * (1.0 / (MESH_Y_DIST)); + const int8_t cy = (y - (MESH_MIN_Y)) * (1.0 / (MESH_Y_DIST)); return constrain(cy, 0, (GRID_MAX_POINTS_Y) - 1); // -1 is appropriate if we want all movement to the Y_MAX } // position. But with this defined this way, it is possible // to extrapolate off of this point even further out. Probably @@ -211,12 +211,12 @@ class unified_bed_leveling { // happening and should not be worried about at this level. static int8_t find_closest_x_index(const float &x) { - const int8_t px = (x - (UBL_MESH_MIN_X) + (MESH_X_DIST) * 0.5) * (1.0 / (MESH_X_DIST)); + const int8_t px = (x - (MESH_MIN_X) + (MESH_X_DIST) * 0.5) * (1.0 / (MESH_X_DIST)); return WITHIN(px, 0, GRID_MAX_POINTS_X - 1) ? px : -1; } static int8_t find_closest_y_index(const float &y) { - const int8_t py = (y - (UBL_MESH_MIN_Y) + (MESH_Y_DIST) * 0.5) * (1.0 / (MESH_Y_DIST)); + const int8_t py = (y - (MESH_MIN_Y) + (MESH_Y_DIST) * 0.5) * (1.0 / (MESH_Y_DIST)); return WITHIN(py, 0, GRID_MAX_POINTS_Y - 1) ? py : -1; } @@ -362,11 +362,11 @@ class unified_bed_leveling { } FORCE_INLINE static float mesh_index_to_xpos(const uint8_t i) { - return i < GRID_MAX_POINTS_X ? pgm_read_float(&_mesh_index_to_xpos[i]) : UBL_MESH_MIN_X + i * (MESH_X_DIST); + return i < GRID_MAX_POINTS_X ? pgm_read_float(&_mesh_index_to_xpos[i]) : MESH_MIN_X + i * (MESH_X_DIST); } FORCE_INLINE static float mesh_index_to_ypos(const uint8_t i) { - return i < GRID_MAX_POINTS_Y ? pgm_read_float(&_mesh_index_to_ypos[i]) : UBL_MESH_MIN_Y + i * (MESH_Y_DIST); + return i < GRID_MAX_POINTS_Y ? pgm_read_float(&_mesh_index_to_ypos[i]) : MESH_MIN_Y + i * (MESH_Y_DIST); } static bool prepare_segmented_line_to(const float ltarget[XYZE], const float &feedrate); diff --git a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp index f1eb6b7f00..edb862ce11 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp +++ b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp @@ -415,7 +415,7 @@ z2 -= get_z_correction(LOGICAL_X_POSITION(UBL_PROBE_PT_2_X), LOGICAL_Y_POSITION(UBL_PROBE_PT_2_Y)) /* + zprobe_zoffset */ ; z3 -= get_z_correction(LOGICAL_X_POSITION(UBL_PROBE_PT_3_X), LOGICAL_Y_POSITION(UBL_PROBE_PT_3_Y)) /* + zprobe_zoffset */ ; - do_blocking_move_to_xy(0.5 * (UBL_MESH_MAX_X - (UBL_MESH_MIN_X)), 0.5 * (UBL_MESH_MAX_Y - (UBL_MESH_MIN_Y))); + do_blocking_move_to_xy(0.5 * (MESH_MAX_X - (MESH_MIN_X)), 0.5 * (MESH_MAX_Y - (MESH_MIN_Y))); tilt_mesh_based_on_3pts(z1, z2, z3); restore_ubl_active_state_and_leave(); } @@ -778,8 +778,8 @@ restore_ubl_active_state_and_leave(); do_blocking_move_to_xy( - constrain(lx - (X_PROBE_OFFSET_FROM_EXTRUDER), UBL_MESH_MIN_X, UBL_MESH_MAX_X), - constrain(ly - (Y_PROBE_OFFSET_FROM_EXTRUDER), UBL_MESH_MIN_Y, UBL_MESH_MAX_Y) + constrain(lx - (X_PROBE_OFFSET_FROM_EXTRUDER), MESH_MIN_X, MESH_MAX_X), + constrain(ly - (Y_PROBE_OFFSET_FROM_EXTRUDER), MESH_MIN_Y, MESH_MAX_Y) ); } @@ -915,7 +915,7 @@ save_ubl_active_state_and_disable(); // Disable bed level correction for probing do_blocking_move_to_z(in_height); - do_blocking_move_to_xy(0.5 * (UBL_MESH_MAX_X - (UBL_MESH_MIN_X)), 0.5 * (UBL_MESH_MAX_Y - (UBL_MESH_MIN_Y))); + do_blocking_move_to_xy(0.5 * (MESH_MAX_X - (MESH_MIN_X)), 0.5 * (MESH_MAX_Y - (MESH_MIN_Y))); //, min(planner.max_feedrate_mm_s[X_AXIS], planner.max_feedrate_mm_s[Y_AXIS]) / 2.0); stepper.synchronize(); @@ -1221,11 +1221,11 @@ SERIAL_EOL(); #endif - SERIAL_ECHOLNPAIR("UBL_MESH_MIN_X " STRINGIFY(UBL_MESH_MIN_X) "=", UBL_MESH_MIN_X); - SERIAL_ECHOLNPAIR("UBL_MESH_MIN_Y " STRINGIFY(UBL_MESH_MIN_Y) "=", UBL_MESH_MIN_Y); + SERIAL_ECHOLNPAIR("MESH_MIN_X " STRINGIFY(MESH_MIN_X) "=", MESH_MIN_X); + SERIAL_ECHOLNPAIR("MESH_MIN_Y " STRINGIFY(MESH_MIN_Y) "=", MESH_MIN_Y); safe_delay(25); - SERIAL_ECHOLNPAIR("UBL_MESH_MAX_X " STRINGIFY(UBL_MESH_MAX_X) "=", UBL_MESH_MAX_X); - SERIAL_ECHOLNPAIR("UBL_MESH_MAX_Y " STRINGIFY(UBL_MESH_MAX_Y) "=", UBL_MESH_MAX_Y); + SERIAL_ECHOLNPAIR("MESH_MAX_X " STRINGIFY(MESH_MAX_X) "=", MESH_MAX_X); + SERIAL_ECHOLNPAIR("MESH_MAX_Y " STRINGIFY(MESH_MAX_Y) "=", MESH_MAX_Y); safe_delay(25); SERIAL_ECHOLNPAIR("GRID_MAX_POINTS_X ", GRID_MAX_POINTS_X); SERIAL_ECHOLNPAIR("GRID_MAX_POINTS_Y ", GRID_MAX_POINTS_Y); @@ -1641,10 +1641,10 @@ #if HAS_BED_PROBE void unified_bed_leveling::tilt_mesh_based_on_probed_grid(const bool do_ubl_mesh_map) { - constexpr int16_t x_min = max(MIN_PROBE_X, UBL_MESH_MIN_X), - x_max = min(MAX_PROBE_X, UBL_MESH_MAX_X), - y_min = max(MIN_PROBE_Y, UBL_MESH_MIN_Y), - y_max = min(MAX_PROBE_Y, UBL_MESH_MAX_Y); + constexpr int16_t x_min = max(MIN_PROBE_X, MESH_MIN_X), + x_max = min(MAX_PROBE_X, MESH_MAX_X), + y_min = max(MIN_PROBE_Y, MESH_MIN_Y), + y_max = min(MAX_PROBE_Y, MESH_MAX_Y); const float dx = float(x_max - x_min) / (g29_grid_size - 1.0), dy = float(y_max - y_min) / (g29_grid_size - 1.0); diff --git a/Marlin/src/feature/bedlevel/ubl/ubl_motion.cpp b/Marlin/src/feature/bedlevel/ubl/ubl_motion.cpp index 376c077b82..41c11e4c69 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl_motion.cpp +++ b/Marlin/src/feature/bedlevel/ubl/ubl_motion.cpp @@ -622,8 +622,8 @@ // in top of loop and again re-find same adjacent cell and use it, just less efficient // for mesh inset area. - int8_t cell_xi = (seg_rx - (UBL_MESH_MIN_X)) * (1.0 / (MESH_X_DIST)), - cell_yi = (seg_ry - (UBL_MESH_MIN_Y)) * (1.0 / (MESH_X_DIST)); + int8_t cell_xi = (seg_rx - (MESH_MIN_X)) * (1.0 / (MESH_X_DIST)), + cell_yi = (seg_ry - (MESH_MIN_Y)) * (1.0 / (MESH_X_DIST)); cell_xi = constrain(cell_xi, 0, (GRID_MAX_POINTS_X) - 1); cell_yi = constrain(cell_yi, 0, (GRID_MAX_POINTS_Y) - 1); diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index b37cc5792b..8a71a9d4a6 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -810,9 +810,12 @@ #endif /** - * Delta endstops, radius/rod trimmers, angle trimmers + * Delta radius/rod trimmers/angle trimmers */ #if ENABLED(DELTA) + #ifndef DELTA_PROBEABLE_RADIUS + #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS + #endif #ifndef DELTA_CALIBRATION_RADIUS #define DELTA_CALIBRATION_RADIUS DELTA_PRINTABLE_RADIUS - 10 #endif @@ -833,7 +836,6 @@ /** * Set granular options based on the specific type of leveling */ - #define UBL_DELTA (ENABLED(AUTO_BED_LEVELING_UBL) && (ENABLED(DELTA) || ENABLED(UBL_GRANULAR_SEGMENTATION_FOR_CARTESIAN))) #define ABL_PLANAR (ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_3POINT)) #define ABL_GRID (ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)) @@ -849,6 +851,70 @@ #define PROBE_BED_HEIGHT abs(BACK_PROBE_BED_POSITION - (FRONT_PROBE_BED_POSITION)) #endif +/** + * Bed Probing rectangular bounds + * These can be further constrained in code for Delta and SCARA + */ +#if ENABLED(DELTA) + // Probing points may be verified at compile time within the radius + // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") + // so that may be added to SanityCheck.h in the future. + #define MIN_PROBE_X (X_CENTER - (DELTA_PROBEABLE_RADIUS)) + #define MIN_PROBE_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS)) + #define MAX_PROBE_X (X_CENTER + DELTA_PROBEABLE_RADIUS) + #define MAX_PROBE_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS) +#elif IS_SCARA + #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2) + #define MIN_PROBE_X (X_CENTER - (SCARA_PRINTABLE_RADIUS)) + #define MIN_PROBE_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS)) + #define MAX_PROBE_X (X_CENTER + SCARA_PRINTABLE_RADIUS) + #define MAX_PROBE_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS) +#else + // Boundaries for Cartesian probing based on bed limits + #define MIN_PROBE_X (max(X_MIN_BED, X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER)) + #define MIN_PROBE_Y (max(Y_MIN_BED, Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER)) + #define MAX_PROBE_X (min(X_MAX_BED, X_MAX_POS + X_PROBE_OFFSET_FROM_EXTRUDER)) + #define MAX_PROBE_Y (min(Y_MAX_BED, Y_MAX_POS + Y_PROBE_OFFSET_FROM_EXTRUDER)) +#endif + +/** + * Default mesh area is an area with an inset margin on the print area. + */ +#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) + #if IS_KINEMATIC + // Probing points may be verified at compile time within the radius + // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") + // so that may be added to SanityCheck.h in the future. + #define _MESH_MIN_X (MIN_PROBE_X + MESH_INSET) + #define _MESH_MIN_Y (MIN_PROBE_Y + MESH_INSET) + #define _MESH_MAX_X (MAX_PROBE_X - (MESH_INSET)) + #define _MESH_MAX_Y (MAX_PROBE_Y - (MESH_INSET)) + #else + // Boundaries for Cartesian probing based on set limits + #define _MESH_MIN_X (max(X_MIN_BED + MESH_INSET, X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER)) + #define _MESH_MIN_Y (max(Y_MIN_BED + MESH_INSET, Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER)) + #define _MESH_MAX_X (min(X_MAX_BED - (MESH_INSET), X_MAX_POS + X_PROBE_OFFSET_FROM_EXTRUDER)) + #define _MESH_MAX_Y (min(Y_MAX_BED - (MESH_INSET), Y_MAX_POS + Y_PROBE_OFFSET_FROM_EXTRUDER)) + #endif + /** + * These may be overridden in Configuration if a smaller area is wanted + */ + #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) + #ifndef MESH_MIN_X + #define MESH_MIN_X _MESH_MIN_X + #endif + #ifndef MESH_MIN_Y + #define MESH_MIN_Y _MESH_MIN_Y + #endif + #ifndef MESH_MAX_X + #define MESH_MAX_X _MESH_MAX_X + #endif + #ifndef MESH_MAX_Y + #define MESH_MAX_Y _MESH_MAX_Y + #endif + #endif +#endif // MESH_BED_LEVELING || AUTO_BED_LEVELING_UBL + /** * Buzzer/Speaker */ @@ -899,35 +965,6 @@ #define MANUAL_PROBE_HEIGHT Z_HOMING_HEIGHT #endif -/** - * Bed Probing rectangular bounds - * These can be further constrained in code for Delta and SCARA - */ -#if ENABLED(DELTA) - #ifndef DELTA_PROBEABLE_RADIUS - #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS - #endif - // Probing points may be verified at compile time within the radius - // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") - // so that may be added to SanityCheck.h in the future. - #define MIN_PROBE_X (X_CENTER - (DELTA_PROBEABLE_RADIUS)) - #define MIN_PROBE_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS)) - #define MAX_PROBE_X (X_CENTER + DELTA_PROBEABLE_RADIUS) - #define MAX_PROBE_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS) -#elif IS_SCARA - #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2) - #define MIN_PROBE_X (X_CENTER - (SCARA_PRINTABLE_RADIUS)) - #define MIN_PROBE_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS)) - #define MAX_PROBE_X (X_CENTER + SCARA_PRINTABLE_RADIUS) - #define MAX_PROBE_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS) -#else - // Boundaries for Cartesian probing based on bed limits - #define MIN_PROBE_X (max(X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER, X_MIN_BED)) - #define MIN_PROBE_Y (max(Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER, Y_MIN_BED)) - #define MAX_PROBE_X (min(X_MAX_POS + X_PROBE_OFFSET_FROM_EXTRUDER, X_MAX_BED)) - #define MAX_PROBE_Y (min(Y_MAX_POS + Y_PROBE_OFFSET_FROM_EXTRUDER, Y_MAX_BED)) -#endif - // Stepper pulse duration, in cycles #define STEP_PULSE_CYCLES ((MINIMUM_STEPPER_PULSE) * CYCLES_PER_MICROSECOND) #ifdef CPU_32_BIT diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 4b667f0c74..3696d2de4c 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -215,6 +215,10 @@ #error "ADVANCE was removed in Marlin 1.1.6. Please use LIN_ADVANCE." #elif defined(NEOPIXEL_RGBW_LED) #error "NEOPIXEL_RGBW_LED is now NEOPIXEL_LED. Please update your configuration." +#elif defined(UBL_MESH_INSET) + #error "UBL_MESH_INSET is now just MESH_INSET. Please update your configuration." +#elif defined(UBL_MESH_MIN_X) || defined(UBL_MESH_MIN_Y) || defined(UBL_MESH_MAX_X) || defined(UBL_MESH_MAX_Y) + #error "UBL_MESH_(MIN|MAX)_[XY] is now just MESH_(MIN|MAX)_[XY]. Please update your configuration." #endif /** From 51fafccc16f4e58814b1e6e601a3e8f449f54f89 Mon Sep 17 00:00:00 2001 From: Thomas Moore Date: Tue, 24 Oct 2017 17:28:33 -0500 Subject: [PATCH 15/20] [2.0.x] Enable hardware serial ports on LPC1768 (#8004) * Enable hardware serial ports on LPC1768 * Fix compilation errors with other HALs * FIx order of includes in LPC1768 HAL main.cpp * Add support for RX_BUFFER_SIZE and TX_BUFFER_SIZE options in Configuration_adv.h --- Marlin/src/HAL/HAL_AVR/MarlinSerial.h | 27 +- Marlin/src/HAL/HAL_LPC1768/HAL.cpp | 9 +- Marlin/src/HAL/HAL_LPC1768/HAL.h | 19 +- Marlin/src/HAL/HAL_LPC1768/HAL_timers.cpp | 2 +- Marlin/src/HAL/HAL_LPC1768/HardwareSerial.cpp | 797 ++++++------------ Marlin/src/HAL/HAL_LPC1768/HardwareSerial.h | 67 +- Marlin/src/HAL/HAL_LPC1768/SoftwareSerial.cpp | 3 +- Marlin/src/HAL/HAL_LPC1768/WInterrupts.cpp | 3 +- Marlin/src/HAL/HAL_LPC1768/arduino.cpp | 7 +- .../HAL/HAL_LPC1768/lpc1768_flag_script.py | 1 + Marlin/src/HAL/HAL_LPC1768/main.cpp | 21 +- Marlin/src/HAL/HAL_LPC1768/pinmap_re_arm.h | 54 +- Marlin/src/gcode/feature/pause/M125.cpp | 4 + Marlin/src/gcode/parser.h | 2 +- Marlin/src/inc/Conditionals_LCD.h | 8 + Marlin/src/inc/Conditionals_adv.h | 42 + Marlin/src/inc/MarlinConfig.h | 1 + Marlin/src/inc/SanityCheck.h | 18 + .../CMSIS/LPC1768/driver/debug_frmwrk.c | 72 +- frameworks/CMSIS/LPC1768/lib/Print.h | 4 +- frameworks/CMSIS/LPC1768/lib/Printable.h | 4 +- 21 files changed, 498 insertions(+), 667 deletions(-) create mode 100644 Marlin/src/inc/Conditionals_adv.h diff --git a/Marlin/src/HAL/HAL_AVR/MarlinSerial.h b/Marlin/src/HAL/HAL_AVR/MarlinSerial.h index e289e7cf1f..6a9fd776fa 100644 --- a/Marlin/src/HAL/HAL_AVR/MarlinSerial.h +++ b/Marlin/src/HAL/HAL_AVR/MarlinSerial.h @@ -78,30 +78,9 @@ #define BYTE 0 #ifndef USBCON - // Define constants and variables for buffering incoming serial data. We're - // using a ring buffer (I think), in which rx_buffer_head is the index of the - // location to which to write the next incoming character and rx_buffer_tail - // is the index of the location from which to read. - // 256 is the max limit due to uint8_t head and tail. Use only powers of 2. (...,16,32,64,128,256) - #ifndef RX_BUFFER_SIZE - #define RX_BUFFER_SIZE 128 - #endif - #ifndef TX_BUFFER_SIZE - #define TX_BUFFER_SIZE 32 - #endif - - #if ENABLED(SERIAL_XON_XOFF) && RX_BUFFER_SIZE < 1024 - #error "XON/XOFF requires RX_BUFFER_SIZE >= 1024 for reliable transfers without drops." - #endif - - #if !IS_POWER_OF_2(RX_BUFFER_SIZE) || RX_BUFFER_SIZE < 2 - #error "RX_BUFFER_SIZE must be a power of 2 greater than 1." - #endif - - #if TX_BUFFER_SIZE && (TX_BUFFER_SIZE < 2 || TX_BUFFER_SIZE > 256 || !IS_POWER_OF_2(TX_BUFFER_SIZE)) - #error "TX_BUFFER_SIZE must be 0 or a power of 2 greater than 1." - #endif - + // We're using a ring buffer (I think), in which rx_buffer_head is the index of the + // location to which to write the next incoming character and rx_buffer_tail is the + // index of the location from which to read. #if RX_BUFFER_SIZE > 256 typedef uint16_t ring_buffer_pos_t; #else diff --git a/Marlin/src/HAL/HAL_LPC1768/HAL.cpp b/Marlin/src/HAL/HAL_LPC1768/HAL.cpp index 037899675f..29c0964e9b 100644 --- a/Marlin/src/HAL/HAL_LPC1768/HAL.cpp +++ b/Marlin/src/HAL/HAL_LPC1768/HAL.cpp @@ -20,10 +20,7 @@ #ifdef TARGET_LPC1768 -#include "../../core/macros.h" -#include "../HAL.h" - -#include +#include "../../inc/MarlinConfig.h" extern "C" { //#include @@ -86,7 +83,7 @@ extern const char errormagic[]; void HAL_adc_enable_channel(int pin) { if (!WITHIN(pin, 0, NUM_ANALOG_INPUTS - 1)) { - usb_serial.printf("%sINVALID ANALOG PORT:%d\n", errormagic, pin); + MYSERIAL.printf("%sINVALID ANALOG PORT:%d\n", errormagic, pin); kill(MSG_KILLED); } @@ -116,7 +113,7 @@ void HAL_adc_enable_channel(int pin) { uint8_t active_adc = 0; void HAL_adc_start_conversion(const uint8_t adc_pin) { if (adc_pin >= (NUM_ANALOG_INPUTS) || adc_pin_map[adc_pin].port == 0xFF) { - usb_serial.printf("HAL: HAL_adc_start_conversion: no pinmap for %d\n", adc_pin); + MYSERIAL.printf("HAL: HAL_adc_start_conversion: no pinmap for %d\n", adc_pin); return; } LPC_ADC->ADCR &= ~0xFF; // Reset diff --git a/Marlin/src/HAL/HAL_LPC1768/HAL.h b/Marlin/src/HAL/HAL_LPC1768/HAL.h index e1b52a6819..907b550c3c 100644 --- a/Marlin/src/HAL/HAL_LPC1768/HAL.h +++ b/Marlin/src/HAL/HAL_LPC1768/HAL.h @@ -41,9 +41,7 @@ void _printf (const char *format, ...); void _putc(uint8_t c); uint8_t _getc(); -extern volatile uint32_t _millis; - -#define USBCON +extern "C" volatile uint32_t _millis; //arduino: Print.h #define DEC 10 @@ -60,7 +58,7 @@ extern volatile uint32_t _millis; #include "watchdog.h" #include "serial.h" #include "HAL_timers.h" - +#include "HardwareSerial.h" #define ST7920_DELAY_1 DELAY_5_NOP;DELAY_5_NOP;DELAY_5_NOP;DELAY_5_NOP;DELAY_5_NOP;DELAY_5_NOP;DELAY_5_NOP;DELAY_5_NOP;DELAY_5_NOP;DELAY_5_NOP;DELAY_5_NOP;DELAY_5_NOP #define ST7920_DELAY_2 DELAY_5_NOP;DELAY_5_NOP;DELAY_5_NOP;DELAY_5_NOP;DELAY_5_NOP;DELAY_5_NOP;DELAY_5_NOP;DELAY_5_NOP;DELAY_5_NOP;DELAY_5_NOP;DELAY_5_NOP;DELAY_5_NOP;DELAY_5_NOP;DELAY_5_NOP;DELAY_5_NOP @@ -68,7 +66,18 @@ extern volatile uint32_t _millis; //Serial override extern HalSerial usb_serial; -#define MYSERIAL usb_serial + +#if SERIAL_PORT == -1 + #define MYSERIAL usb_serial +#elif SERIAL_PORT == 0 + #define MYSERIAL Serial +#elif SERIAL_PORT == 1 + #define MYSERIAL Serial1 +#elif SERIAL_PORT == 2 + #define MYSERIAL Serial2 +#elif SERIAL_PORT == 3 + #define MYSERIAL Serial3 +#endif #define CRITICAL_SECTION_START uint32_t primask = __get_PRIMASK(); __disable_irq(); #define CRITICAL_SECTION_END if (!primask) __enable_irq(); diff --git a/Marlin/src/HAL/HAL_LPC1768/HAL_timers.cpp b/Marlin/src/HAL/HAL_LPC1768/HAL_timers.cpp index c46e80f4b8..c9e25693e2 100644 --- a/Marlin/src/HAL/HAL_LPC1768/HAL_timers.cpp +++ b/Marlin/src/HAL/HAL_LPC1768/HAL_timers.cpp @@ -28,7 +28,7 @@ #ifdef TARGET_LPC1768 -#include "../HAL.h" +#include "../../inc/MarlinConfig.h" #include "HAL_timers.h" void HAL_timer_init(void) { diff --git a/Marlin/src/HAL/HAL_LPC1768/HardwareSerial.cpp b/Marlin/src/HAL/HAL_LPC1768/HardwareSerial.cpp index 6438acd228..cd76e8f704 100644 --- a/Marlin/src/HAL/HAL_LPC1768/HardwareSerial.cpp +++ b/Marlin/src/HAL/HAL_LPC1768/HardwareSerial.cpp @@ -22,313 +22,280 @@ #ifdef TARGET_LPC1768 -#include "../../core/macros.h" -#include "../HAL.h" +#include "../../inc/MarlinConfig.h" #include "HardwareSerial.h" -#define UART3 3 -HardwareSerial Serial3 = HardwareSerial(UART3); -volatile uint32_t UART0Status, UART1Status, UART2Status, UART3Status; -volatile uint8_t UART0TxEmpty = 1, UART1TxEmpty = 1, UART2TxEmpty=1, UART3TxEmpty=1; -volatile uint8_t UART0Buffer[UARTRXQUEUESIZE], UART1Buffer[UARTRXQUEUESIZE], UART2Buffer[UARTRXQUEUESIZE], UART3Buffer[UARTRXQUEUESIZE]; -volatile uint32_t UART0RxQueueWritePos = 0, UART1RxQueueWritePos = 0, UART2RxQueueWritePos = 0, UART3RxQueueWritePos = 0; -volatile uint32_t UART0RxQueueReadPos = 0, UART1RxQueueReadPos = 0, UART2RxQueueReadPos = 0, UART3RxQueueReadPos = 0; -volatile uint8_t dummy; +HardwareSerial Serial = HardwareSerial(LPC_UART0); +HardwareSerial Serial1 = HardwareSerial((LPC_UART_TypeDef *) LPC_UART1); +HardwareSerial Serial2 = HardwareSerial(LPC_UART2); +HardwareSerial Serial3 = HardwareSerial(LPC_UART3); - void HardwareSerial::begin(uint32_t baudrate) { - uint32_t Fdiv; - uint32_t pclkdiv, pclk; +void HardwareSerial::begin(uint32_t baudrate) { - if ( PortNum == 0 ) - { - LPC_PINCON->PINSEL0 &= ~0x000000F0; - LPC_PINCON->PINSEL0 |= 0x00000050; /* RxD0 is P0.3 and TxD0 is P0.2 */ - /* By default, the PCLKSELx value is zero, thus, the PCLK for - all the peripherals is 1/4 of the SystemFrequency. */ - /* Bit 6~7 is for UART0 */ - pclkdiv = (LPC_SC->PCLKSEL0 >> 6) & 0x03; - switch ( pclkdiv ) - { - case 0x00: - default: - pclk = SystemCoreClock/4; - break; - case 0x01: - pclk = SystemCoreClock; - break; - case 0x02: - pclk = SystemCoreClock/2; - break; - case 0x03: - pclk = SystemCoreClock/8; - break; - } + UART_CFG_Type UARTConfigStruct; + PINSEL_CFG_Type PinCfg; + UART_FIFO_CFG_Type FIFOConfig; - LPC_UART0->LCR = 0x83; /* 8 bits, no Parity, 1 Stop bit */ - Fdiv = ( pclk / 16 ) / baudrate ; /*baud rate */ - LPC_UART0->DLM = Fdiv / 256; - LPC_UART0->DLL = Fdiv % 256; - LPC_UART0->LCR = 0x03; /* DLAB = 0 */ - LPC_UART0->FCR = 0x07; /* Enable and reset TX and RX FIFO. */ - - NVIC_EnableIRQ(UART0_IRQn); - - LPC_UART0->IER = IER_RBR | IER_THRE | IER_RLS; /* Enable UART0 interrupt */ - } - else if ( PortNum == 1 ) - { - LPC_PINCON->PINSEL4 &= ~0x0000000F; - LPC_PINCON->PINSEL4 |= 0x0000000A; /* Enable RxD1 P2.1, TxD1 P2.0 */ - - /* By default, the PCLKSELx value is zero, thus, the PCLK for - all the peripherals is 1/4 of the SystemFrequency. */ - /* Bit 8,9 are for UART1 */ - pclkdiv = (LPC_SC->PCLKSEL0 >> 8) & 0x03; - switch ( pclkdiv ) - { - case 0x00: - default: - pclk = SystemCoreClock/4; - break; - case 0x01: - pclk = SystemCoreClock; - break; - case 0x02: - pclk = SystemCoreClock/2; - break; - case 0x03: - pclk = SystemCoreClock/8; - break; - } - - LPC_UART1->LCR = 0x83; /* 8 bits, no Parity, 1 Stop bit */ - Fdiv = ( pclk / 16 ) / baudrate ; /*baud rate */ - LPC_UART1->DLM = Fdiv / 256; - LPC_UART1->DLL = Fdiv % 256; - LPC_UART1->LCR = 0x03; /* DLAB = 0 */ - LPC_UART1->FCR = 0x07; /* Enable and reset TX and RX FIFO. */ - - NVIC_EnableIRQ(UART1_IRQn); - - LPC_UART1->IER = IER_RBR | IER_THRE | IER_RLS; /* Enable UART1 interrupt */ - } - else if ( PortNum == 2 ) - { - //LPC_PINCON->PINSEL4 &= ~0x000F0000; /*Pinsel4 Bits 16-19*/ - //LPC_PINCON->PINSEL4 |= 0x000A0000; /* RxD2 is P2.9 and TxD2 is P2.8, value 10*/ - LPC_PINCON->PINSEL0 &= ~0x00F00000; /*Pinsel0 Bits 20-23*/ - LPC_PINCON->PINSEL0 |= 0x00500000; /* RxD2 is P0.11 and TxD2 is P0.10, value 01*/ - - LPC_SC->PCONP |= 1<<24; //Enable PCUART2 - /* By default, the PCLKSELx value is zero, thus, the PCLK for - all the peripherals is 1/4 of the SystemFrequency. */ - /* Bit 6~7 is for UART3 */ - pclkdiv = (LPC_SC->PCLKSEL1 >> 16) & 0x03; - switch ( pclkdiv ) - { - case 0x00: - default: - pclk = SystemCoreClock/4; - break; - case 0x01: - pclk = SystemCoreClock; - break; - case 0x02: - pclk = SystemCoreClock/2; - break; - case 0x03: - pclk = SystemCoreClock/8; - break; - } - LPC_UART2->LCR = 0x83; /* 8 bits, no Parity, 1 Stop bit */ - Fdiv = ( pclk / 16 ) / baudrate ; /*baud rate */ - LPC_UART2->DLM = Fdiv / 256; - LPC_UART2->DLL = Fdiv % 256; - LPC_UART2->LCR = 0x03; /* DLAB = 0 */ - LPC_UART2->FCR = 0x07; /* Enable and reset TX and RX FIFO. */ - - NVIC_EnableIRQ(UART2_IRQn); - - LPC_UART2->IER = IER_RBR | IER_THRE | IER_RLS; /* Enable UART3 interrupt */ - } - else if ( PortNum == 3 ) - { - LPC_PINCON->PINSEL0 &= ~0x0000000F; - LPC_PINCON->PINSEL0 |= 0x0000000A; /* RxD3 is P0.1 and TxD3 is P0.0 */ - LPC_SC->PCONP |= 1<<4 | 1<<25; //Enable PCUART1 - /* By default, the PCLKSELx value is zero, thus, the PCLK for - all the peripherals is 1/4 of the SystemFrequency. */ - /* Bit 6~7 is for UART3 */ - pclkdiv = (LPC_SC->PCLKSEL1 >> 18) & 0x03; - switch ( pclkdiv ) - { - case 0x00: - default: - pclk = SystemCoreClock/4; - break; - case 0x01: - pclk = SystemCoreClock; - break; - case 0x02: - pclk = SystemCoreClock/2; - break; - case 0x03: - pclk = SystemCoreClock/8; - break; - } - LPC_UART3->LCR = 0x83; /* 8 bits, no Parity, 1 Stop bit */ - Fdiv = ( pclk / 16 ) / baudrate ; /*baud rate */ - LPC_UART3->DLM = Fdiv / 256; - LPC_UART3->DLL = Fdiv % 256; - LPC_UART3->LCR = 0x03; /* DLAB = 0 */ - LPC_UART3->FCR = 0x07; /* Enable and reset TX and RX FIFO. */ - - NVIC_EnableIRQ(UART3_IRQn); - - LPC_UART3->IER = IER_RBR | IER_THRE | IER_RLS; /* Enable UART3 interrupt */ - } + if (UARTx == LPC_UART0) { + /* + * Initialize UART0 pin connect + */ + PinCfg.Funcnum = 1; + PinCfg.OpenDrain = 0; + PinCfg.Pinmode = 0; + PinCfg.Pinnum = 2; + PinCfg.Portnum = 0; + PINSEL_ConfigPin(&PinCfg); + PinCfg.Pinnum = 3; + PINSEL_ConfigPin(&PinCfg); + } + else if ((LPC_UART1_TypeDef *) UARTx == LPC_UART1) { + /* + * Initialize UART1 pin connect + */ + PinCfg.Funcnum = 1; + PinCfg.OpenDrain = 0; + PinCfg.Pinmode = 0; + PinCfg.Pinnum = 15; + PinCfg.Portnum = 0; + PINSEL_ConfigPin(&PinCfg); + PinCfg.Pinnum = 16; + PINSEL_ConfigPin(&PinCfg); + } + else if (UARTx == LPC_UART2) { + /* + * Initialize UART2 pin connect + */ + PinCfg.Funcnum = 1; + PinCfg.OpenDrain = 0; + PinCfg.Pinmode = 0; + PinCfg.Pinnum = 10; + PinCfg.Portnum = 0; + PINSEL_ConfigPin(&PinCfg); + PinCfg.Pinnum = 11; + PINSEL_ConfigPin(&PinCfg); + } + else if (UARTx == LPC_UART3) { + /* + * Initialize UART2 pin connect + */ + PinCfg.Funcnum = 1; + PinCfg.OpenDrain = 0; + PinCfg.Pinmode = 0; + PinCfg.Pinnum = 0; + PinCfg.Portnum = 0; + PINSEL_ConfigPin(&PinCfg); + PinCfg.Pinnum = 1; + PINSEL_ConfigPin(&PinCfg); } - int HardwareSerial::read() { - uint8_t rx; - if ( PortNum == 0 ) - { - if (UART0RxQueueReadPos == UART0RxQueueWritePos) - return -1; + /* Initialize UART Configuration parameter structure to default state: + * Baudrate = 9600bps + * 8 data bit + * 1 Stop bit + * None parity + */ + UART_ConfigStructInit(&UARTConfigStruct); - // Read from "head" - rx = UART0Buffer[UART0RxQueueReadPos]; // grab next byte - UART0RxQueueReadPos = (UART0RxQueueReadPos + 1) % UARTRXQUEUESIZE; - return rx; - } - if ( PortNum == 1 ) - { - if (UART1RxQueueReadPos == UART1RxQueueWritePos) - return -1; + // Re-configure baudrate + UARTConfigStruct.Baud_rate = baudrate; - // Read from "head" - rx = UART1Buffer[UART1RxQueueReadPos]; // grab next byte - UART1RxQueueReadPos = (UART1RxQueueReadPos + 1) % UARTRXQUEUESIZE; - return rx; - } - if ( PortNum == 2 ) - { - if (UART2RxQueueReadPos == UART2RxQueueWritePos) - return -1; + // Initialize eripheral with given to corresponding parameter + UART_Init(UARTx, &UARTConfigStruct); + + // Enable and reset the TX and RX FIFOs + UART_FIFOConfigStructInit(&FIFOConfig); + UART_FIFOConfig(UARTx, &FIFOConfig); - // Read from "head" - rx = UART2Buffer[UART2RxQueueReadPos]; // grab next byte - UART2RxQueueReadPos = (UART2RxQueueReadPos + 1) % UARTRXQUEUESIZE; - return rx; - } - if ( PortNum == 3 ) - { - if (UART3RxQueueReadPos == UART3RxQueueWritePos) - return -1; + // Enable UART Transmit + UART_TxCmd(UARTx, ENABLE); - // Read from "head" - rx = UART3Buffer[UART3RxQueueReadPos]; // grab next byte - UART3RxQueueReadPos = (UART3RxQueueReadPos + 1) % UARTRXQUEUESIZE; - return rx; - } - return 0; + // Configure Interrupts + UART_IntConfig(UARTx, UART_INTCFG_RBR, ENABLE); + UART_IntConfig(UARTx, UART_INTCFG_RLS, ENABLE); + + if (UARTx == LPC_UART0) + NVIC_EnableIRQ(UART0_IRQn); + else if ((LPC_UART1_TypeDef *) UARTx == LPC_UART1) + NVIC_EnableIRQ(UART1_IRQn); + else if (UARTx == LPC_UART2) + NVIC_EnableIRQ(UART2_IRQn); + else if (UARTx == LPC_UART3) + NVIC_EnableIRQ(UART3_IRQn); + + RxQueueWritePos = RxQueueReadPos = 0; + #if TX_BUFFER_SIZE > 0 + TxQueueWritePos = TxQueueReadPos = 0; + #endif +} + +int HardwareSerial::peek() { + int byte = -1; + + /* Temporarily lock out UART receive interrupts during this read so the UART receive + interrupt won't cause problems with the index values */ + UART_IntConfig(UARTx, UART_INTCFG_RBR, DISABLE); + + if (RxQueueReadPos != RxQueueWritePos) + byte = RxBuffer[RxQueueReadPos]; + + /* Re-enable UART interrupts */ + UART_IntConfig(UARTx, UART_INTCFG_RBR, ENABLE); + + return byte; +} + +int HardwareSerial::read() { + int byte = -1; + + /* Temporarily lock out UART receive interrupts during this read so the UART receive + interrupt won't cause problems with the index values */ + UART_IntConfig(UARTx, UART_INTCFG_RBR, DISABLE); + + if (RxQueueReadPos != RxQueueWritePos) { + byte = RxBuffer[RxQueueReadPos]; + RxQueueReadPos = (RxQueueReadPos + 1) % RX_BUFFER_SIZE; } - size_t HardwareSerial::write(uint8_t send) { - if ( PortNum == 0 ) - { - /* THRE status, contain valid data */ - while ( !(UART0TxEmpty & 0x01) ); - LPC_UART0->THR = send; - UART0TxEmpty = 0; /* not empty in the THR until it shifts out */ - } - else if (PortNum == 1) - { - - /* THRE status, contain valid data */ - while ( !(UART1TxEmpty & 0x01) ); - LPC_UART1->THR = send; - UART1TxEmpty = 0; /* not empty in the THR until it shifts out */ - - - } - else if ( PortNum == 2 ) - { - /* THRE status, contain valid data */ - while ( !(UART2TxEmpty & 0x01) ); - LPC_UART2->THR = send; - UART2TxEmpty = 0; /* not empty in the THR until it shifts out */ - - } - else if ( PortNum == 3 ) - { - /* THRE status, contain valid data */ - while ( !(UART3TxEmpty & 0x01) ); - LPC_UART3->THR = send; - UART3TxEmpty = 0; /* not empty in the THR until it shifts out */ - - } - return 0; - } - - int HardwareSerial::available() { - if ( PortNum == 0 ) -{ - return (UART0RxQueueWritePos + UARTRXQUEUESIZE - UART0RxQueueReadPos) % UARTRXQUEUESIZE; + /* Re-enable UART interrupts */ + UART_IntConfig(UARTx, UART_INTCFG_RBR, ENABLE); + + return byte; } -if ( PortNum == 1 ) -{ - return (UART1RxQueueWritePos + UARTRXQUEUESIZE - UART1RxQueueReadPos) % UARTRXQUEUESIZE; -} -if ( PortNum == 2 ) -{ - return (UART2RxQueueWritePos + UARTRXQUEUESIZE - UART2RxQueueReadPos) % UARTRXQUEUESIZE; -} -if ( PortNum == 3 ) -{ - return (UART3RxQueueWritePos + UARTRXQUEUESIZE - UART3RxQueueReadPos) % UARTRXQUEUESIZE; -} -return 0; - } - void HardwareSerial::flush() { - if ( PortNum == 0 ) -{ - UART0RxQueueWritePos = 0; - UART0RxQueueReadPos = 0; +size_t HardwareSerial::write(uint8_t send) { + #if TX_BUFFER_SIZE > 0 + size_t bytes = 0; + uint32_t fifolvl = 0; -} -if ( PortNum == 1 ) -{ - UART1RxQueueWritePos = 0; - UART1RxQueueReadPos = 0; -} -if ( PortNum == 2 ) -{ - UART2RxQueueWritePos = 0; - UART2RxQueueReadPos = 0; -} -if ( PortNum == 3 ) -{ - UART3RxQueueWritePos = 0; - UART3RxQueueReadPos = 0; -} -return; - } + /* If the Tx Buffer is full, wait for space to clear */ + if ((TxQueueWritePos+1) % TX_BUFFER_SIZE == TxQueueReadPos) flushTX(); + + /* Temporarily lock out UART transmit interrupts during this read so the UART transmit interrupt won't + cause problems with the index values */ + UART_IntConfig(UARTx, UART_INTCFG_THRE, DISABLE); - void HardwareSerial::printf(const char *format, ...) { - static char buffer[256]; - va_list vArgs; - va_start(vArgs, format); - int length = vsnprintf((char *) buffer, 256, (char const *) format, vArgs); - va_end(vArgs); - if (length > 0 && length < 256) { - for (int i = 0; i < length;) { - write(buffer[i]); - ++i; - } - } + /* LPC17xx.h incorrectly defines FIFOLVL as a uint8_t, when it's actually a 32-bit register */ + if ((LPC_UART1_TypeDef *) UARTx == LPC_UART1) + fifolvl = *(reinterpret_cast(&((LPC_UART1_TypeDef *) UARTx)->FIFOLVL)); + else + fifolvl = *(reinterpret_cast(&UARTx->FIFOLVL)); + + /* If the queue is empty and there's space in the FIFO, immediately send the byte */ + if (TxQueueWritePos == TxQueueReadPos && fifolvl < UART_TX_FIFO_SIZE) { + bytes = UART_Send(UARTx, &send, 1, BLOCKING); } + /* Otherwiise, write the byte to the transmit buffer */ + else if ((TxQueueWritePos+1) % TX_BUFFER_SIZE != TxQueueReadPos) { + TxBuffer[TxQueueWritePos] = send; + TxQueueWritePos = (TxQueueWritePos+1) % TX_BUFFER_SIZE; + bytes++; + } + + /* Re-enable the TX Interrupt */ + UART_IntConfig(UARTx, UART_INTCFG_THRE, ENABLE); + + return bytes; + #else + return UART_Send(UARTx, &send, 1, BLOCKING); + #endif +} + +#if TX_BUFFER_SIZE > 0 + void HardwareSerial::flushTX() { + /* Wait for the tx buffer and FIFO to drain */ + while (TxQueueWritePos != TxQueueReadPos && UART_CheckBusy(UARTx) == SET); + } +#endif + +int HardwareSerial::available() { + return (RxQueueWritePos + RX_BUFFER_SIZE - RxQueueReadPos) % RX_BUFFER_SIZE; +} + +void HardwareSerial::flush() { + RxQueueWritePos = 0; + RxQueueReadPos = 0; +} + +void HardwareSerial::printf(const char *format, ...) { + char RxBuffer[256]; + va_list vArgs; + va_start(vArgs, format); + int length = vsnprintf(RxBuffer, 256, format, vArgs); + va_end(vArgs); + if (length > 0 && length < 256) { + for (int i = 0; i < length; ++i) + write(RxBuffer[i]); + } +} + +void HardwareSerial::IRQHandler() { + uint32_t IIRValue; + uint8_t LSRValue, byte; + + IIRValue = UART_GetIntId(UARTx); + IIRValue &= UART_IIR_INTID_MASK; /* check bit 1~3, interrupt identification */ + + if ( IIRValue == UART_IIR_INTID_RLS ) /* Receive Line Status */ + { + LSRValue = UART_GetLineStatus(UARTx); + + /* Receive Line Status */ + if ( LSRValue & (UART_LSR_OE|UART_LSR_PE|UART_LSR_FE|UART_LSR_RXFE|UART_LSR_BI) ) + { + /* There are errors or break interrupt */ + /* Read LSR will clear the interrupt */ + Status = LSRValue; + byte = UART_ReceiveByte(UARTx); /* Dummy read on RX to clear + interrupt, then bail out */ + return; + } + } + + if ( IIRValue == UART_IIR_INTID_RDA ) /* Receive Data Available */ + { + /* Clear the FIFO */ + while ( UART_Receive(UARTx, &byte, 1, NONE_BLOCKING) ) { + if ((RxQueueWritePos+1) % RX_BUFFER_SIZE != RxQueueReadPos) + { + RxBuffer[RxQueueWritePos] = byte; + RxQueueWritePos = (RxQueueWritePos+1) % RX_BUFFER_SIZE; + } + else + break; + } + } + else if ( IIRValue == UART_IIR_INTID_CTI ) /* Character timeout indicator */ + { + /* Character Time-out indicator */ + Status |= 0x100; /* Bit 9 as the CTI error */ + } + + #if TX_BUFFER_SIZE > 0 + if (IIRValue == UART_IIR_INTID_THRE) { + /* Disable THRE interrupt */ + UART_IntConfig(UARTx, UART_INTCFG_THRE, DISABLE); + + /* Wait for FIFO buffer empty */ + while (UART_CheckBusy(UARTx) == SET); + + /* Transfer up to UART_TX_FIFO_SIZE bytes of data */ + for (int i = 0; i < UART_TX_FIFO_SIZE && TxQueueWritePos != TxQueueReadPos; i++) { + /* Move a piece of data into the transmit FIFO */ + if (UART_Send(UARTx, &TxBuffer[TxQueueReadPos], 1, NONE_BLOCKING)) + TxQueueReadPos = (TxQueueReadPos+1) % TX_BUFFER_SIZE; + else + break; + } + + /* If there is no more data to send, disable the transmit interrupt - else enable it or keep it enabled */ + if (TxQueueWritePos == TxQueueReadPos) + UART_IntConfig(UARTx, UART_INTCFG_THRE, DISABLE); + else + UART_IntConfig(UARTx, UART_INTCFG_THRE, ENABLE); + } + #endif +} #ifdef __cplusplus extern "C" { @@ -345,68 +312,7 @@ extern "C" { *****************************************************************************/ void UART0_IRQHandler (void) { - uint8_t IIRValue, LSRValue; - - IIRValue = LPC_UART0->IIR; - - IIRValue >>= 1; /* skip pending bit in IIR */ - IIRValue &= 0x07; /* check bit 1~3, interrupt identification */ - if ( IIRValue == IIR_RLS ) /* Receive Line Status */ - { - LSRValue = LPC_UART0->LSR; - /* Receive Line Status */ - if ( LSRValue & (LSR_OE|LSR_PE|LSR_FE|LSR_RXFE|LSR_BI) ) - { - /* There are errors or break interrupt */ - /* Read LSR will clear the interrupt */ - UART0Status = LSRValue; - dummy = LPC_UART0->RBR; /* Dummy read on RX to clear - interrupt, then bail out */ - return; - } - if ( LSRValue & LSR_RDR ) /* Receive Data Ready */ - { - /* If no error on RLS, normal ready, save into the data buffer. */ - /* Note: read RBR will clear the interrupt */ - if ((UART0RxQueueWritePos+1) % UARTRXQUEUESIZE != UART0RxQueueReadPos) - { - UART0Buffer[UART0RxQueueWritePos] = LPC_UART0->RBR; - UART0RxQueueWritePos = (UART0RxQueueWritePos+1) % UARTRXQUEUESIZE; - } - else - dummy = LPC_UART0->RBR; - } - } - else if ( IIRValue == IIR_RDA ) /* Receive Data Available */ - { - /* Receive Data Available */ - if ((UART0RxQueueWritePos+1) % UARTRXQUEUESIZE != UART0RxQueueReadPos) - { - UART0Buffer[UART0RxQueueWritePos] = LPC_UART0->RBR; - UART0RxQueueWritePos = (UART0RxQueueWritePos+1) % UARTRXQUEUESIZE; - } - else - dummy = LPC_UART1->RBR; - } - else if ( IIRValue == IIR_CTI ) /* Character timeout indicator */ - { - /* Character Time-out indicator */ - UART0Status |= 0x100; /* Bit 9 as the CTI error */ - } - else if ( IIRValue == IIR_THRE ) /* THRE, transmit holding register empty */ - { - /* THRE interrupt */ - LSRValue = LPC_UART0->LSR; /* Check status in the LSR to see if - valid data in U0THR or not */ - if ( LSRValue & LSR_THRE ) - { - UART0TxEmpty = 1; - } - else - { - UART0TxEmpty = 0; - } - } + Serial.IRQHandler(); } /***************************************************************************** @@ -420,69 +326,9 @@ void UART0_IRQHandler (void) *****************************************************************************/ void UART1_IRQHandler (void) { - uint8_t IIRValue, LSRValue; - - IIRValue = LPC_UART1->IIR; - - IIRValue >>= 1; /* skip pending bit in IIR */ - IIRValue &= 0x07; /* check bit 1~3, interrupt identification */ - if ( IIRValue == IIR_RLS ) /* Receive Line Status */ - { - LSRValue = LPC_UART1->LSR; - /* Receive Line Status */ - if ( LSRValue & (LSR_OE|LSR_PE|LSR_FE|LSR_RXFE|LSR_BI) ) - { - /* There are errors or break interrupt */ - /* Read LSR will clear the interrupt */ - UART1Status = LSRValue; - dummy = LPC_UART1->RBR; /* Dummy read on RX to clear - interrupt, then bail out */ - return; - } - if ( LSRValue & LSR_RDR ) /* Receive Data Ready */ - { - /* If no error on RLS, normal ready, save into the data buffer. */ - /* Note: read RBR will clear the interrupt */ - if ((UART1RxQueueWritePos+1) % UARTRXQUEUESIZE != UART1RxQueueReadPos) - { - UART1Buffer[UART1RxQueueWritePos] = LPC_UART1->RBR; - UART1RxQueueWritePos =(UART1RxQueueWritePos+1) % UARTRXQUEUESIZE; - } - else - dummy = LPC_UART1->RBR; - } - } - else if ( IIRValue == IIR_RDA ) /* Receive Data Available */ - { - /* Receive Data Available */ - if ((UART1RxQueueWritePos+1) % UARTRXQUEUESIZE != UART1RxQueueReadPos) - { - UART1Buffer[UART1RxQueueWritePos] = LPC_UART1->RBR; - UART1RxQueueWritePos = (UART1RxQueueWritePos+1) % UARTRXQUEUESIZE; - } - else - dummy = LPC_UART1->RBR; - } - else if ( IIRValue == IIR_CTI ) /* Character timeout indicator */ - { - /* Character Time-out indicator */ - UART1Status |= 0x100; /* Bit 9 as the CTI error */ - } - else if ( IIRValue == IIR_THRE ) /* THRE, transmit holding register empty */ - { - /* THRE interrupt */ - LSRValue = LPC_UART1->LSR; /* Check status in the LSR to see if - valid data in U0THR or not */ - if ( LSRValue & LSR_THRE ) - { - UART1TxEmpty = 1; - } - else - { - UART1TxEmpty = 0; - } - } + Serial1.IRQHandler(); } + /***************************************************************************** ** Function name: UART2_IRQHandler ** @@ -494,71 +340,13 @@ void UART1_IRQHandler (void) *****************************************************************************/ void UART2_IRQHandler (void) { - uint8_t IIRValue, LSRValue; - - IIRValue = LPC_UART2->IIR; - - IIRValue >>= 1; /* skip pending bit in IIR */ - IIRValue &= 0x07; /* check bit 1~3, interrupt identification */ - if ( IIRValue == IIR_RLS ) /* Receive Line Status */ - { - LSRValue = LPC_UART2->LSR; - /* Receive Line Status */ - if ( LSRValue & (LSR_OE|LSR_PE|LSR_FE|LSR_RXFE|LSR_BI) ) - { - /* There are errors or break interrupt */ - /* Read LSR will clear the interrupt */ - UART2Status = LSRValue; - dummy = LPC_UART2->RBR; /* Dummy read on RX to clear - interrupt, then bail out */ - return; - } - if ( LSRValue & LSR_RDR ) /* Receive Data Ready */ - { - /* If no error on RLS, normal ready, save into the data buffer. */ - /* Note: read RBR will clear the interrupt */ - if ((UART2RxQueueWritePos+1) % UARTRXQUEUESIZE != UART2RxQueueReadPos) - { - UART2Buffer[UART2RxQueueWritePos] = LPC_UART2->RBR; - UART2RxQueueWritePos = (UART2RxQueueWritePos+1) % UARTRXQUEUESIZE; - } - } - } - else if ( IIRValue == IIR_RDA ) /* Receive Data Available */ - { - /* Receive Data Available */ - if ((UART2RxQueueWritePos+1) % UARTRXQUEUESIZE != UART2RxQueueReadPos) - { - UART2Buffer[UART2RxQueueWritePos] = LPC_UART2->RBR; - UART2RxQueueWritePos = (UART2RxQueueWritePos+1) % UARTRXQUEUESIZE; - } - else - dummy = LPC_UART2->RBR; - } - else if ( IIRValue == IIR_CTI ) /* Character timeout indicator */ - { - /* Character Time-out indicator */ - UART2Status |= 0x100; /* Bit 9 as the CTI error */ - } - else if ( IIRValue == IIR_THRE ) /* THRE, transmit holding register empty */ - { - /* THRE interrupt */ - LSRValue = LPC_UART2->LSR; /* Check status in the LSR to see if - valid data in U0THR or not */ - if ( LSRValue & LSR_THRE ) - { - UART2TxEmpty = 1; - } - else - { - UART2TxEmpty = 0; - } - } + Serial2.IRQHandler(); } + /***************************************************************************** ** Function name: UART3_IRQHandler ** -** Descriptions: UART0 interrupt handler +** Descriptions: UART3 interrupt handler ** ** parameters: None ** Returned value: None @@ -566,66 +354,7 @@ void UART2_IRQHandler (void) *****************************************************************************/ void UART3_IRQHandler (void) { - uint8_t IIRValue, LSRValue; - - IIRValue = LPC_UART3->IIR; - - IIRValue >>= 1; /* skip pending bit in IIR */ - IIRValue &= 0x07; /* check bit 1~3, interrupt identification */ - if ( IIRValue == IIR_RLS ) /* Receive Line Status */ - { - LSRValue = LPC_UART3->LSR; - /* Receive Line Status */ - if ( LSRValue & (LSR_OE|LSR_PE|LSR_FE|LSR_RXFE|LSR_BI) ) - { - /* There are errors or break interrupt */ - /* Read LSR will clear the interrupt */ - UART3Status = LSRValue; - dummy = LPC_UART3->RBR; /* Dummy read on RX to clear - interrupt, then bail out */ - return; - } - if ( LSRValue & LSR_RDR ) /* Receive Data Ready */ - { - /* If no error on RLS, normal ready, save into the data buffer. */ - /* Note: read RBR will clear the interrupt */ - if ((UART3RxQueueWritePos+1) % UARTRXQUEUESIZE != UART3RxQueueReadPos) - { - UART3Buffer[UART3RxQueueWritePos] = LPC_UART3->RBR; - UART3RxQueueWritePos = (UART3RxQueueWritePos+1) % UARTRXQUEUESIZE; - } - } - } - else if ( IIRValue == IIR_RDA ) /* Receive Data Available */ - { - /* Receive Data Available */ - if ((UART3RxQueueWritePos+1) % UARTRXQUEUESIZE != UART3RxQueueReadPos) - { - UART3Buffer[UART3RxQueueWritePos] = LPC_UART3->RBR; - UART3RxQueueWritePos = (UART3RxQueueWritePos+1) % UARTRXQUEUESIZE; - } - else - dummy = LPC_UART3->RBR; - } - else if ( IIRValue == IIR_CTI ) /* Character timeout indicator */ - { - /* Character Time-out indicator */ - UART3Status |= 0x100; /* Bit 9 as the CTI error */ - } - else if ( IIRValue == IIR_THRE ) /* THRE, transmit holding register empty */ - { - /* THRE interrupt */ - LSRValue = LPC_UART3->LSR; /* Check status in the LSR to see if - valid data in U0THR or not */ - if ( LSRValue & LSR_THRE ) - { - UART3TxEmpty = 1; - } - else - { - UART3TxEmpty = 0; - } - } + Serial3.IRQHandler(); } #ifdef __cplusplus diff --git a/Marlin/src/HAL/HAL_LPC1768/HardwareSerial.h b/Marlin/src/HAL/HAL_LPC1768/HardwareSerial.h index b40597b3ec..8507396223 100644 --- a/Marlin/src/HAL/HAL_LPC1768/HardwareSerial.h +++ b/Marlin/src/HAL/HAL_LPC1768/HardwareSerial.h @@ -28,54 +28,51 @@ #include extern "C" { - #include - //#include + #include + #include "lpc17xx_pinsel.h" } -#define IER_RBR 0x01 -#define IER_THRE 0x02 -#define IER_RLS 0x04 - -#define IIR_PEND 0x01 -#define IIR_RLS 0x03 -#define IIR_RDA 0x02 -#define IIR_CTI 0x06 -#define IIR_THRE 0x01 - -#define LSR_RDR 0x01 -#define LSR_OE 0x02 -#define LSR_PE 0x04 -#define LSR_FE 0x08 -#define LSR_BI 0x10 -#define LSR_THRE 0x20 -#define LSR_TEMT 0x40 -#define LSR_RXFE 0x80 - -#define UARTRXQUEUESIZE 0x10 - class HardwareSerial : public Stream { private: -uint8_t PortNum; -uint32_t baudrate; + LPC_UART_TypeDef *UARTx; + + uint32_t Status; + uint8_t RxBuffer[RX_BUFFER_SIZE]; + uint32_t RxQueueWritePos; + uint32_t RxQueueReadPos; + #if TX_BUFFER_SIZE > 0 + uint8_t TxBuffer[TX_BUFFER_SIZE]; + uint32_t TxQueueWritePos; + uint32_t TxQueueReadPos; + #endif public: - HardwareSerial(uint32_t uart) : - PortNum(uart) - { - } + HardwareSerial(LPC_UART_TypeDef *UARTx) + : UARTx(UARTx) + , RxQueueWritePos(0) + , RxQueueReadPos(0) + #if TX_BUFFER_SIZE > 0 + , TxQueueWritePos(0) + , TxQueueReadPos(0) + #endif + { + } void begin(uint32_t baudrate); + int peek(); int read(); size_t write(uint8_t send); + #if TX_BUFFER_SIZE > 0 + void flushTX(); + #endif int available(); void flush(); void printf(const char *format, ...); - int peek() { - return 0; - }; operator bool() { return true; } + void IRQHandler(); + void print(const char value[]) { printf("%s" , value); } void print(char value, int = 0) { printf("%c" , value); } void print(unsigned char value, int = 0) { printf("%u" , value); } @@ -100,9 +97,9 @@ public: }; -//extern HardwareSerial Serial0; -//extern HardwareSerial Serial1; -//extern HardwareSerial Serial2; +extern HardwareSerial Serial; +extern HardwareSerial Serial1; +extern HardwareSerial Serial2; extern HardwareSerial Serial3; #endif // MARLIN_SRC_HAL_HAL_SERIAL_H_ diff --git a/Marlin/src/HAL/HAL_LPC1768/SoftwareSerial.cpp b/Marlin/src/HAL/HAL_LPC1768/SoftwareSerial.cpp index 51883a4002..bfc5fbebb3 100644 --- a/Marlin/src/HAL/HAL_LPC1768/SoftwareSerial.cpp +++ b/Marlin/src/HAL/HAL_LPC1768/SoftwareSerial.cpp @@ -35,8 +35,7 @@ http://arduiniana.org. // Includes // //#include -#include "../../core/macros.h" -#include "../HAL.h" +#include "../../inc/MarlinConfig.h" #include #include #include "arduino.h" diff --git a/Marlin/src/HAL/HAL_LPC1768/WInterrupts.cpp b/Marlin/src/HAL/HAL_LPC1768/WInterrupts.cpp index 8c2ca1d5e4..d3e91ce553 100644 --- a/Marlin/src/HAL/HAL_LPC1768/WInterrupts.cpp +++ b/Marlin/src/HAL/HAL_LPC1768/WInterrupts.cpp @@ -18,8 +18,7 @@ #ifdef TARGET_LPC1768 -#include "../../core/macros.h" -#include "../HAL.h" +#include "../../inc/MarlinConfig.h" #include "arduino.h" #include "pinmapping.h" //#include "HAL_timers.h" diff --git a/Marlin/src/HAL/HAL_LPC1768/arduino.cpp b/Marlin/src/HAL/HAL_LPC1768/arduino.cpp index 810a557af7..32c4341660 100644 --- a/Marlin/src/HAL/HAL_LPC1768/arduino.cpp +++ b/Marlin/src/HAL/HAL_LPC1768/arduino.cpp @@ -22,10 +22,9 @@ #ifdef TARGET_LPC1768 +#include "../../inc/MarlinConfig.h" + #include -#include "HAL.h" -#include "../../core/macros.h" -#include "../../core/types.h" // Interrupts void cli(void) { __disable_irq(); } // Disable @@ -147,7 +146,7 @@ void analogWrite(uint8_t pin, int pwm_value) { // 1 - 254: pwm_value, 0: LOW, 2 if (LPC1768_PWM_attach_pin(pin, 1, (LPC_PWM1->MR0 - MR0_MARGIN), 0xff)) // locks up if get too close to MR0 value LPC1768_PWM_write(pin, map(value, 1, 254, 1, (LPC_PWM1->MR0 - MR0_MARGIN))); // map 1-254 onto PWM range else { // out of PWM channels - if (!out_of_PWM_slots) usb_serial.printf(".\nWARNING - OUT OF PWM CHANNELS\n.\n"); //only warn once + if (!out_of_PWM_slots) MYSERIAL.printf(".\nWARNING - OUT OF PWM CHANNELS\n.\n"); //only warn once out_of_PWM_slots = true; digitalWrite(pin, value); // treat as a digital pin if out of channels } diff --git a/Marlin/src/HAL/HAL_LPC1768/lpc1768_flag_script.py b/Marlin/src/HAL/HAL_LPC1768/lpc1768_flag_script.py index 30781e99d3..a3138dfc07 100644 --- a/Marlin/src/HAL/HAL_LPC1768/lpc1768_flag_script.py +++ b/Marlin/src/HAL/HAL_LPC1768/lpc1768_flag_script.py @@ -12,6 +12,7 @@ if __name__ == "__main__": "-ffreestanding", "-fsigned-char", "-fno-move-loop-invariants", + "-fno-strict-aliasing", "--specs=nano.specs", "--specs=nosys.specs", diff --git a/Marlin/src/HAL/HAL_LPC1768/main.cpp b/Marlin/src/HAL/HAL_LPC1768/main.cpp index eebac4a2cc..788193c5b1 100644 --- a/Marlin/src/HAL/HAL_LPC1768/main.cpp +++ b/Marlin/src/HAL/HAL_LPC1768/main.cpp @@ -24,6 +24,8 @@ extern "C" { #include } +#include "../../inc/MarlinConfig.h" +#include "HAL.h" #include "fastio.h" #include "HAL_timers.h" #include @@ -69,21 +71,32 @@ extern "C" void SystemPostInit() { } extern uint32_t MSC_SD_Init(uint8_t pdrv); -extern HalSerial usb_serial; + int main(void) { (void)MSC_SD_Init(0); + USB_Init(); // USB Initialization USB_Connect(TRUE); // USB Connect volatile uint32_t usb_timeout = millis() + 2000; while (!USB_Configuration && millis() < usb_timeout) { delay(50); - TOGGLE(13); // Flash fast while USB initialisation completes + + #if PIN_EXISTS(LED) + TOGGLE(LED_PIN); // Flash fast while USB initialisation completes + #endif } - debug_frmwrk_init(); - usb_serial.printf("\n\nRe-ARM (LPC1768 @ %dMhz) UART0 Initialised\n", SystemCoreClock / 1000000); + // Only initialize the debug framework if using the USB emulated serial port + if ((HalSerial*) &MYSERIAL == &usb_serial) + debug_frmwrk_init(); + + MYSERIAL.begin(BAUDRATE); + MYSERIAL.printf("\n\nLPC1768 (%dMhz) UART0 Initialised\n", SystemCoreClock / 1000000); + #if TX_BUFFER_SIZE > 0 + MYSERIAL.flushTX(); + #endif HAL_timer_init(); diff --git a/Marlin/src/HAL/HAL_LPC1768/pinmap_re_arm.h b/Marlin/src/HAL/HAL_LPC1768/pinmap_re_arm.h index 6fefcc128f..dad9a5735b 100644 --- a/Marlin/src/HAL/HAL_LPC1768/pinmap_re_arm.h +++ b/Marlin/src/HAL/HAL_LPC1768/pinmap_re_arm.h @@ -27,7 +27,11 @@ // Runtime pinmapping // ****************** -#define NUM_ANALOG_INPUTS 8 +#if SERIAL_PORT == 0 + #define NUM_ANALOG_INPUTS 6 +#else + #define NUM_ANALOG_INPUTS 8 +#endif const adc_pin_data adc_pin_map[] = { {0, 23, 0}, //A0 (T0) - D67 - TEMP_0_PIN @@ -36,27 +40,39 @@ const adc_pin_data adc_pin_map[] = { {0, 26, 3}, //A3 - D63 {1, 30, 4}, //A4 - D37 - BUZZER_PIN {1, 31, 5}, //A5 - D49 - SD_DETECT_PIN - {0, 3, 6}, //A6 - D0 - RXD0 - {0, 2, 7} //A7 - D1 - TXD0 + #if SERIAL_PORT != 0 + {0, 3, 6}, //A6 - D0 - RXD0 + {0, 2, 7} //A7 - D1 - TXD0 + #endif }; -#define analogInputToDigitalPin(p) (p == 0 ? 67: \ - p == 1 ? 68: \ - p == 2 ? 69: \ - p == 3 ? 63: \ - p == 4 ? 37: \ - p == 5 ? 49: \ - p == 6 ? 0: \ - p == 7 ? 1: -1) +constexpr FORCE_INLINE int8_t analogInputToDigitalPin(int8_t p) { + return (p == 0 ? 67: + p == 1 ? 68: + p == 2 ? 69: + p == 3 ? 63: + p == 4 ? 37: + p == 5 ? 49: + #if SERIAL_PORT != 0 + p == 6 ? 0: + p == 7 ? 1: + #endif + -1); +} -#define DIGITAL_PIN_TO_ANALOG_PIN(p) (p == 67 ? 0: \ - p == 68 ? 1: \ - p == 69 ? 2: \ - p == 63 ? 3: \ - p == 37 ? 4: \ - p == 49 ? 5: \ - p == 0 ? 6: \ - p == 1 ? 7: -1) +constexpr FORCE_INLINE int8_t DIGITAL_PIN_TO_ANALOG_PIN(int8_t p) { + return (p == 67 ? 0: + p == 68 ? 1: + p == 69 ? 2: + p == 63 ? 3: + p == 37 ? 4: + p == 49 ? 5: + #if SERIAL_PORT != 0 + p == 0 ? 6: + p == 1 ? 7: + #endif + -1); +} #define NUM_DIGITAL_PINS 84 diff --git a/Marlin/src/gcode/feature/pause/M125.cpp b/Marlin/src/gcode/feature/pause/M125.cpp index 06e3895e8d..bbaf4d3b90 100644 --- a/Marlin/src/gcode/feature/pause/M125.cpp +++ b/Marlin/src/gcode/feature/pause/M125.cpp @@ -29,6 +29,10 @@ #include "../../../feature/pause.h" #include "../../../module/motion.h" +#if DISABLED(SDSUPPORT) + #include "../../../module/printcounter.h" +#endif + /** * M125: Store current position and move to filament change position. * Called on pause (by M25) to prevent material leaking onto the diff --git a/Marlin/src/gcode/parser.h b/Marlin/src/gcode/parser.h index a8b7a54e8d..dcd019a99c 100644 --- a/Marlin/src/gcode/parser.h +++ b/Marlin/src/gcode/parser.h @@ -135,7 +135,7 @@ public: // Code is found in the string. If not found, value_ptr is unchanged. // This allows "if (seen('A')||seen('B'))" to use the last-found value. static bool seen(const char c) { - const char *p = strchr(command_args, c); + char *p = strchr(command_args, c); const bool b = !!p; if (b) value_ptr = DECIMAL_SIGNED(p[1]) ? &p[1] : (char*)NULL; return b; diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index 3653396bb7..f50d2f0075 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -491,4 +491,12 @@ #define HAS_RESUME_CONTINUE (ENABLED(NEWPANEL) || ENABLED(EMERGENCY_PARSER)) #define HAS_COLOR_LEDS (ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)) + // For Re-ARM boards, always use the USB Emulated Serial Port unless RE_ARM_FORCE_SERIAL_PORT is defined + #if MB(RAMPS_14_RE_ARM_EFB) || MB(RAMPS_14_RE_ARM_EEB) || MB(RAMPS_14_RE_ARM_EFF) || MB(RAMPS_14_RE_ARM_EEF) || MB(RAMPS_14_RE_ARM_SF) + #ifndef RE_ARM_FORCE_SERIAL_PORT + #undef SERIAL_PORT + #define SERIAL_PORT -1 + #endif + #endif + #endif // CONDITIONALS_LCD_H diff --git a/Marlin/src/inc/Conditionals_adv.h b/Marlin/src/inc/Conditionals_adv.h new file mode 100644 index 0000000000..8799d22d54 --- /dev/null +++ b/Marlin/src/inc/Conditionals_adv.h @@ -0,0 +1,42 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (C) 2016 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 . + * + */ + +/** + * Conditionals_adv.h + * Defines that depend on advanced onfiguration. + */ + +#ifndef CONDITIONALS_ADV_H +#define CONDITIONALS_ADV_H + + #ifndef USBCON + // Define constants and variables for buffering incoming serial data. + // 256 is the max limit due to uint8_t head and tail. Use only powers of 2. (...,16,32,64,128,256) + #ifndef RX_BUFFER_SIZE + #define RX_BUFFER_SIZE 128 + #endif + #ifndef TX_BUFFER_SIZE + #define TX_BUFFER_SIZE 32 + #endif + #endif + +#endif // CONDITIONALS_ADV_H diff --git a/Marlin/src/inc/MarlinConfig.h b/Marlin/src/inc/MarlinConfig.h index 25d56cf006..1b471051e6 100644 --- a/Marlin/src/inc/MarlinConfig.h +++ b/Marlin/src/inc/MarlinConfig.h @@ -30,6 +30,7 @@ #include "../../Configuration.h" #include "Conditionals_LCD.h" #include "../../Configuration_adv.h" +#include "Conditionals_adv.h" #include "../HAL/HAL.h" #include "../pins/pins.h" #if defined(__AVR__) && !defined(USBCON) diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index f75be67e96..f2e9d20633 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -235,6 +235,24 @@ #error "WEBSITE_URL must be specified." #endif +/** + * Serial + */ +#ifndef USBCON + #if ENABLED(SERIAL_XON_XOFF) && RX_BUFFER_SIZE < 1024 + #error "XON/XOFF requires RX_BUFFER_SIZE >= 1024 for reliable transfers without drops." + #endif + + #if !IS_POWER_OF_2(RX_BUFFER_SIZE) || RX_BUFFER_SIZE < 2 + #error "RX_BUFFER_SIZE must be a power of 2 greater than 1." + #endif + + // 256 is the max limit due to uint8_t head and tail. Use only powers of 2. (...,16,32,64,128,256) + #if TX_BUFFER_SIZE && (TX_BUFFER_SIZE < 2 || TX_BUFFER_SIZE > 256 || !IS_POWER_OF_2(TX_BUFFER_SIZE)) + #error "TX_BUFFER_SIZE must be 0 or a power of 2 greater than 1." + #endif +#endif + /** * Dual Stepper Drivers */ diff --git a/frameworks/CMSIS/LPC1768/driver/debug_frmwrk.c b/frameworks/CMSIS/LPC1768/driver/debug_frmwrk.c index 972e80611a..7d7bae4b86 100644 --- a/frameworks/CMSIS/LPC1768/driver/debug_frmwrk.c +++ b/frameworks/CMSIS/LPC1768/driver/debug_frmwrk.c @@ -44,17 +44,18 @@ #ifdef _DBGFWK /* Debug framework */ +static Bool debug_frmwrk_initialized = FALSE; -void (*_db_msg)(LPC_UART_TypeDef *UARTx, const void *s); -void (*_db_msg_)(LPC_UART_TypeDef *UARTx, const void *s); -void (*_db_char)(LPC_UART_TypeDef *UARTx, uint8_t ch); -void (*_db_dec)(LPC_UART_TypeDef *UARTx, uint8_t decn); -void (*_db_dec_16)(LPC_UART_TypeDef *UARTx, uint16_t decn); -void (*_db_dec_32)(LPC_UART_TypeDef *UARTx, uint32_t decn); -void (*_db_hex)(LPC_UART_TypeDef *UARTx, uint8_t hexn); -void (*_db_hex_16)(LPC_UART_TypeDef *UARTx, uint16_t hexn); -void (*_db_hex_32)(LPC_UART_TypeDef *UARTx, uint32_t hexn); -uint8_t (*_db_get_char)(LPC_UART_TypeDef *UARTx); +void (*_db_msg)(LPC_UART_TypeDef *UARTx, const void *s) = UARTPuts; +void (*_db_msg_)(LPC_UART_TypeDef *UARTx, const void *s) = UARTPuts_; +void (*_db_char)(LPC_UART_TypeDef *UARTx, uint8_t ch) = UARTPutChar; +void (*_db_dec)(LPC_UART_TypeDef *UARTx, uint8_t decn) = UARTPutHex; +void (*_db_dec_16)(LPC_UART_TypeDef *UARTx, uint16_t decn) = UARTPutHex16; +void (*_db_dec_32)(LPC_UART_TypeDef *UARTx, uint32_t decn) = UARTPutHex32; +void (*_db_hex)(LPC_UART_TypeDef *UARTx, uint8_t hexn) = UARTPutDec; +void (*_db_hex_16)(LPC_UART_TypeDef *UARTx, uint16_t hexn) = UARTPutDec16; +void (*_db_hex_32)(LPC_UART_TypeDef *UARTx, uint32_t hexn) = UARTPutDec32; +uint8_t (*_db_get_char)(LPC_UART_TypeDef *UARTx) = UARTGetChar; /*********************************************************************//** @@ -65,7 +66,8 @@ uint8_t (*_db_get_char)(LPC_UART_TypeDef *UARTx); **********************************************************************/ void UARTPutChar (LPC_UART_TypeDef *UARTx, uint8_t ch) { - UART_Send(UARTx, &ch, 1, BLOCKING); + if (debug_frmwrk_initialized) + UART_Send(UARTx, &ch, 1, BLOCKING); } @@ -76,8 +78,11 @@ void UARTPutChar (LPC_UART_TypeDef *UARTx, uint8_t ch) **********************************************************************/ uint8_t UARTGetChar (LPC_UART_TypeDef *UARTx) { - uint8_t tmp = 0; - UART_Receive(UARTx, &tmp, 1, BLOCKING); + uint8_t tmp = 0; + + if (debug_frmwrk_initialized) + UART_Receive(UARTx, &tmp, 1, BLOCKING); + return(tmp); } @@ -90,7 +95,10 @@ uint8_t UARTGetChar (LPC_UART_TypeDef *UARTx) **********************************************************************/ void UARTPuts(LPC_UART_TypeDef *UARTx, const void *str) { - uint8_t *s = (uint8_t *) str; + uint8_t *s = (uint8_t *) str; + + if (!debug_frmwrk_initialized) + return; while (*s) { @@ -107,6 +115,9 @@ void UARTPuts(LPC_UART_TypeDef *UARTx, const void *str) **********************************************************************/ void UARTPuts_(LPC_UART_TypeDef *UARTx, const void *str) { + if (!debug_frmwrk_initialized) + return; + UARTPuts (UARTx, str); UARTPuts (UARTx, "\n\r"); } @@ -120,6 +131,9 @@ void UARTPuts_(LPC_UART_TypeDef *UARTx, const void *str) **********************************************************************/ void UARTPutDec(LPC_UART_TypeDef *UARTx, uint8_t decnum) { + if (!debug_frmwrk_initialized) + return; + uint8_t c1=decnum%10; uint8_t c2=(decnum/10)%10; uint8_t c3=(decnum/100)%10; @@ -135,7 +149,10 @@ void UARTPutDec(LPC_UART_TypeDef *UARTx, uint8_t decnum) * @return None **********************************************************************/ void UARTPutDec16(LPC_UART_TypeDef *UARTx, uint16_t decnum) -{ +{ + if (!debug_frmwrk_initialized) + return; + uint8_t c1=decnum%10; uint8_t c2=(decnum/10)%10; uint8_t c3=(decnum/100)%10; @@ -156,6 +173,9 @@ void UARTPutDec16(LPC_UART_TypeDef *UARTx, uint16_t decnum) **********************************************************************/ void UARTPutDec32(LPC_UART_TypeDef *UARTx, uint32_t decnum) { + if (!debug_frmwrk_initialized) + return; + uint8_t c1=decnum%10; uint8_t c2=(decnum/10)%10; uint8_t c3=(decnum/100)%10; @@ -187,6 +207,9 @@ void UARTPutDec32(LPC_UART_TypeDef *UARTx, uint32_t decnum) void UARTPutHex (LPC_UART_TypeDef *UARTx, uint8_t hexnum) { uint8_t nibble, i; + + if (!debug_frmwrk_initialized) + return; UARTPuts(UARTx, "0x"); i = 1; @@ -206,6 +229,9 @@ void UARTPutHex (LPC_UART_TypeDef *UARTx, uint8_t hexnum) void UARTPutHex16 (LPC_UART_TypeDef *UARTx, uint16_t hexnum) { uint8_t nibble, i; + + if (!debug_frmwrk_initialized) + return; UARTPuts(UARTx, "0x"); i = 3; @@ -223,7 +249,10 @@ void UARTPutHex16 (LPC_UART_TypeDef *UARTx, uint16_t hexnum) **********************************************************************/ void UARTPutHex32 (LPC_UART_TypeDef *UARTx, uint32_t hexnum) { - uint8_t nibble, i; + uint8_t nibble, i; + + if (!debug_frmwrk_initialized) + return; UARTPuts(UARTx, "0x"); i = 7; @@ -305,16 +334,7 @@ void debug_frmwrk_init(void) // Enable UART Transmit UART_TxCmd((LPC_UART_TypeDef *)DEBUG_UART_PORT, ENABLE); - _db_msg = UARTPuts; - _db_msg_ = UARTPuts_; - _db_char = UARTPutChar; - _db_hex = UARTPutHex; - _db_hex_16 = UARTPutHex16; - _db_hex_32 = UARTPutHex32; - _db_dec = UARTPutDec; - _db_dec_16 = UARTPutDec16; - _db_dec_32 = UARTPutDec32; - _db_get_char = UARTGetChar; + debug_frmwrk_initialized = TRUE; } #endif /*_DBGFWK */ diff --git a/frameworks/CMSIS/LPC1768/lib/Print.h b/frameworks/CMSIS/LPC1768/lib/Print.h index f27fbb0777..b18c2d3113 100644 --- a/frameworks/CMSIS/LPC1768/lib/Print.h +++ b/frameworks/CMSIS/LPC1768/lib/Print.h @@ -17,8 +17,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef Print_h -#define Print_h +#ifndef CMSIS_Print_h +#define CMSIS_Print_h #include diff --git a/frameworks/CMSIS/LPC1768/lib/Printable.h b/frameworks/CMSIS/LPC1768/lib/Printable.h index 4284e992b4..590fb78399 100644 --- a/frameworks/CMSIS/LPC1768/lib/Printable.h +++ b/frameworks/CMSIS/LPC1768/lib/Printable.h @@ -17,8 +17,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef Printable_h -#define Printable_h +#ifndef CMSIS_Printable_h +#define CMSIS_Printable_h #include #include From 90a14b4f5be5dea76728181d28b5647c9fb62c46 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 24 Oct 2017 17:55:23 -0500 Subject: [PATCH 16/20] Clean up HAL trailing spaces, MKS SBASE pins --- .../HAL/HAL_LPC1768/persistent_store_impl.cpp | 126 ++++++++-------- Marlin/src/HAL/HAL_LPC1768/pinmap_re_arm.h | 2 +- .../config/examples/Mks/Sbase/Configuration.h | 2 +- Marlin/src/pins/pins_MKS_SBASE.h | 134 ++++++------------ 4 files changed, 115 insertions(+), 149 deletions(-) diff --git a/Marlin/src/HAL/HAL_LPC1768/persistent_store_impl.cpp b/Marlin/src/HAL/HAL_LPC1768/persistent_store_impl.cpp index c8aaa0f315..5bcd3576e3 100644 --- a/Marlin/src/HAL/HAL_LPC1768/persistent_store_impl.cpp +++ b/Marlin/src/HAL/HAL_LPC1768/persistent_store_impl.cpp @@ -1,3 +1,24 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (C) 2016, 2017 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 . + * + */ #ifdef TARGET_LPC1768 #include "../../inc/MarlinConfig.h" @@ -19,8 +40,6 @@ FATFS fat_fs; FIL eeprom_file; bool access_start() { - UINT file_size = 0, - bytes_written = 0; const char eeprom_erase_value = 0xFF; MSC_Aquire_Lock(); if (f_mount(&fat_fs, "", 1)) { @@ -30,9 +49,8 @@ bool access_start() { FRESULT res = f_open(&eeprom_file, "eeprom.dat", FA_OPEN_ALWAYS | FA_WRITE | FA_READ); if (res) MSC_Release_Lock(); - if (res == FR_OK) file_size = f_size(&eeprom_file); - if (res == FR_OK) { + uint16_t bytes_written, file_size = f_size(&eeprom_file); f_lseek(&eeprom_file, file_size); while (file_size <= E2END && res == FR_OK) { res = f_write(&eeprom_file, &eeprom_erase_value, 1, &bytes_written); @@ -56,53 +74,52 @@ bool access_finish() { // File function return codes for type FRESULT This goes away soon. But it is helpful right now to see // the different errors the read_data() and write_data() functions are seeing. // -//typedef enum { -// FR_OK = 0, /* (0) Succeeded */ -// FR_DISK_ERR, /* (1) A hard error occurred in the low level disk I/O layer */ -// FR_INT_ERR, /* (2) Assertion failed */ -// FR_NOT_READY, /* (3) The physical drive cannot work */ -// FR_NO_FILE, /* (4) Could not find the file */ -// FR_NO_PATH, /* (5) Could not find the path */ -// FR_INVALID_NAME, /* (6) The path name format is invalid */ -// FR_DENIED, /* (7) Access denied due to prohibited access or directory full */ -// FR_EXIST, /* (8) Access denied due to prohibited access */ -// FR_INVALID_OBJECT, /* (9) The file/directory object is invalid */ -// FR_WRITE_PROTECTED, /* (10) The physical drive is write protected */ -// FR_INVALID_DRIVE, /* (11) The logical drive number is invalid */ -// FR_NOT_ENABLED, /* (12) The volume has no work area */ -// FR_NO_FILESYSTEM, /* (13) There is no valid FAT volume */ -// FR_MKFS_ABORTED, /* (14) The f_mkfs() aborted due to any problem */ -// FR_TIMEOUT, /* (15) Could not get a grant to access the volume within defined period */ -// FR_LOCKED, /* (16) The operation is rejected according to the file sharing policy */ -// FR_NOT_ENOUGH_CORE, /* (17) LFN working buffer could not be allocated */ -// FR_TOO_MANY_OPEN_FILES, /* (18) Number of open files > FF_FS_LOCK */ -// FR_INVALID_PARAMETER /* (19) Given parameter is invalid */ -//} FRESULT; +// typedef enum { +// FR_OK = 0, /* (0) Succeeded */ +// FR_DISK_ERR, /* (1) A hard error occurred in the low level disk I/O layer */ +// FR_INT_ERR, /* (2) Assertion failed */ +// FR_NOT_READY, /* (3) The physical drive cannot work */ +// FR_NO_FILE, /* (4) Could not find the file */ +// FR_NO_PATH, /* (5) Could not find the path */ +// FR_INVALID_NAME, /* (6) The path name format is invalid */ +// FR_DENIED, /* (7) Access denied due to prohibited access or directory full */ +// FR_EXIST, /* (8) Access denied due to prohibited access */ +// FR_INVALID_OBJECT, /* (9) The file/directory object is invalid */ +// FR_WRITE_PROTECTED, /* (10) The physical drive is write protected */ +// FR_INVALID_DRIVE, /* (11) The logical drive number is invalid */ +// FR_NOT_ENABLED, /* (12) The volume has no work area */ +// FR_NO_FILESYSTEM, /* (13) There is no valid FAT volume */ +// FR_MKFS_ABORTED, /* (14) The f_mkfs() aborted due to any problem */ +// FR_TIMEOUT, /* (15) Could not get a grant to access the volume within defined period */ +// FR_LOCKED, /* (16) The operation is rejected according to the file sharing policy */ +// FR_NOT_ENOUGH_CORE, /* (17) LFN working buffer could not be allocated */ +// FR_TOO_MANY_OPEN_FILES, /* (18) Number of open files > FF_FS_LOCK */ +// FR_INVALID_PARAMETER /* (19) Given parameter is invalid */ +// } FRESULT; bool write_data(int &pos, const uint8_t *value, uint16_t size, uint16_t *crc) { FRESULT s; - UINT bytes_written = 0; + uint16_t bytes_written = 0; + s = f_lseek(&eeprom_file, pos); - if ( s ) { + if (s) { SERIAL_PROTOCOLPAIR(" write_data(", pos); // This extra chit-chat goes away soon. But it is helpful - SERIAL_PROTOCOLPAIR(",", (int) value); // right now to see errors that are happening in the - SERIAL_PROTOCOLPAIR(",", (int) size); // read_data() and write_data() functions + SERIAL_PROTOCOLPAIR(",", (int)value); // right now to see errors that are happening in the + SERIAL_PROTOCOLPAIR(",", (int)size); // read_data() and write_data() functions SERIAL_PROTOCOL("...)\n"); - SERIAL_PROTOCOLPAIR(" f_lseek()=", (int) s); - SERIAL_PROTOCOL("\n"); + SERIAL_PROTOCOLLNPAIR(" f_lseek()=", (int)s); return s; } + s = f_write(&eeprom_file, (void *)value, size, &bytes_written); - if ( s ) { + if (s) { SERIAL_PROTOCOLPAIR(" write_data(", pos); // This extra chit-chat goes away soon. But it is helpful - SERIAL_PROTOCOLPAIR(",", (int) value); // right now to see errors that are happening in the - SERIAL_PROTOCOLPAIR(",", (int) size); // read_data() and write_data() functions - SERIAL_PROTOCOL("...)\n"); - SERIAL_PROTOCOLPAIR(" f_write()=", (int) s); - SERIAL_PROTOCOL("\n"); - SERIAL_PROTOCOLPAIR(" size=", (int) size); - SERIAL_PROTOCOLPAIR("\n bytes_written=", (int) bytes_written); - SERIAL_PROTOCOL("\n"); + SERIAL_PROTOCOLPAIR(",", (int)value); // right now to see errors that are happening in the + SERIAL_PROTOCOLPAIR(",", size); // read_data() and write_data() functions + SERIAL_PROTOCOLLN("...)"); + SERIAL_PROTOCOLLNPAIR(" f_write()=", (int)s); + SERIAL_PROTOCOLPAIR(" size=", size); + SERIAL_PROTOCOLLNPAIR("\n bytes_written=", bytes_written); return s; } crc16(crc, value, size); @@ -111,29 +128,26 @@ bool write_data(int &pos, const uint8_t *value, uint16_t size, uint16_t *crc) { } bool read_data(int &pos, uint8_t* value, uint16_t size, uint16_t *crc) { - UINT bytes_read = 0; + uint16_t bytes_read = 0; FRESULT s; s = f_lseek(&eeprom_file, pos); if ( s ) { SERIAL_PROTOCOLPAIR(" read_data(", pos); // This extra chit-chat goes away soon. But it is helpful - SERIAL_PROTOCOLPAIR(",", (int) value); // right now to see errors that are happening in the - SERIAL_PROTOCOLPAIR(",", (int) size); // read_data() and write_data() functions - SERIAL_PROTOCOL("...)\n"); - SERIAL_PROTOCOLPAIR(" f_lseek()=", (int) s); - SERIAL_PROTOCOL("\n"); + SERIAL_PROTOCOLPAIR(",", (int)value); // right now to see errors that are happening in the + SERIAL_PROTOCOLPAIR(",", size); // read_data() and write_data() functions + SERIAL_PROTOCOLLN("...)"); + SERIAL_PROTOCOLLNPAIR(" f_lseek()=", (int)s); return true; } s = f_read(&eeprom_file, (void *)value, size, &bytes_read); - if ( s ) { + if (s) { SERIAL_PROTOCOLPAIR(" read_data(", pos); // This extra chit-chat goes away soon. But it is helpful - SERIAL_PROTOCOLPAIR(",", (int) value); // right now to see errors that are happening in the - SERIAL_PROTOCOLPAIR(",", (int) size); // read_data() and write_data() functions - SERIAL_PROTOCOL("...)\n"); - SERIAL_PROTOCOLPAIR(" f_write()=", (int) s); - SERIAL_PROTOCOL("\n"); - SERIAL_PROTOCOLPAIR(" size=", (int) size); - SERIAL_PROTOCOLPAIR("\n bytes_read=", (int) bytes_read); - SERIAL_PROTOCOL("\n"); + SERIAL_PROTOCOLPAIR(",", (int)value); // right now to see errors that are happening in the + SERIAL_PROTOCOLPAIR(",", size); // read_data() and write_data() functions + SERIAL_PROTOCOLLN("...)"); + SERIAL_PROTOCOLLNPAIR(" f_write()=", (int)s); + SERIAL_PROTOCOLPAIR(" size=", size); + SERIAL_PROTOCOLLNPAIR("\n bytes_read=", bytes_read); return true; } crc16(crc, value, size); diff --git a/Marlin/src/HAL/HAL_LPC1768/pinmap_re_arm.h b/Marlin/src/HAL/HAL_LPC1768/pinmap_re_arm.h index 6fefcc128f..efe861d70e 100644 --- a/Marlin/src/HAL/HAL_LPC1768/pinmap_re_arm.h +++ b/Marlin/src/HAL/HAL_LPC1768/pinmap_re_arm.h @@ -220,7 +220,7 @@ const pin_data pin_map[] = { // pin map for variable pin function {1,4}, // DIO77 J12-10 ENET_TX_EN {1,0}, // DIO78 J12-11 ENET_TXD0 {1,1}, // DIO79 J12-12 ENET_TXD1 - {0,14}, // DIO80 MKS-SBASE J7-6 & EXP1-5 + {0,14}, // DIO80 MKS-SBASE J7-6 & EXP1-5 {0,7}, // DIO81 SD-SCK MKS-SBASE on board SD card and EXP2-2 {0,8}, // DIO82 SD-MISO MKS-SBASE on board SD card and EXP2-1 {0,9}, // DIO83 SD-MOSI MKS-SBASE n board SD card and EXP2-6 diff --git a/Marlin/src/config/examples/Mks/Sbase/Configuration.h b/Marlin/src/config/examples/Mks/Sbase/Configuration.h index 32bd88ba9d..9fdf995b88 100644 --- a/Marlin/src/config/examples/Mks/Sbase/Configuration.h +++ b/Marlin/src/config/examples/Mks/Sbase/Configuration.h @@ -1255,7 +1255,7 @@ * Enable one of the following items for a slower SPI transfer speed. * This may be required to resolve "volume init" errors or LCD issues. */ - + //#define SPI_SPEED SPI_HALF_SPEED //#define SPI_SPEED SPI_QUARTER_SPEED //#define SPI_SPEED SPI_EIGHTH_SPEED diff --git a/Marlin/src/pins/pins_MKS_SBASE.h b/Marlin/src/pins/pins_MKS_SBASE.h index 8ef5373af0..1d576f4acc 100644 --- a/Marlin/src/pins/pins_MKS_SBASE.h +++ b/Marlin/src/pins/pins_MKS_SBASE.h @@ -43,12 +43,6 @@ #define D58 58 */ - -// -// Servos -// - - // // Limit Switches // @@ -59,8 +53,6 @@ #define Z_MIN_PIN 19 //The original Mks Sbase DIO19 has a 10k pullup to 3.3V or 5V, 1K series, so when using a Zprobe we must use DIO41 (J8 P1.22) #define Z_MAX_PIN 18 //10k pullup to 3.3V, 1K series - - // // Steppers // @@ -84,35 +76,32 @@ #define E1_DIR_PIN 34 #define E1_ENABLE_PIN 30 - #define X2_STEP_PIN 36 #define X2_DIR_PIN 34 #define X2_ENABLE_PIN 30 - // // Temperature Sensors -// 3.3V max when defined as an analog input +// 3.3V max when defined as an analog input // - -#define TEMP_0_PIN 0 //A0 (TH1) -#define TEMP_BED_PIN 1 //A1 (TH2) -#define TEMP_1_PIN 2 //A2 (TH3) -#define TEMP_2_PIN 3 //A3 (TH4) +#define TEMP_0_PIN 0 // A0 (TH1) +#define TEMP_BED_PIN 1 // A1 (TH2) +#define TEMP_1_PIN 2 // A2 (TH3) +#define TEMP_2_PIN 3 // A3 (TH4) // // Heaters / Fans // -#define HEATER_BED_PIN 10 +#define HEATER_BED_PIN 10 #define HEATER_0_PIN 8 -#define HEATER_1_PIN 59 +#define HEATER_1_PIN 59 #define FAN_PIN 9 -#define PS_ON_PIN 69 +#define PS_ON_PIN 69 // @@ -122,9 +111,9 @@ // 5V // NC // GND -#define PIN_P0_17 50 -#define PIN_P0_16 16 -#define PIN_P0_14 80 +#define PIN_P0_17 50 +#define PIN_P0_16 16 +#define PIN_P0_14 80 // @@ -132,21 +121,19 @@ // // GND -#define PIN_P1_22 41 -#define PIN_P1_23 53 -#define PIN_P2_12 12 -#define PIN_P2_11 35 -#define PIN_P4_28 13 - +#define PIN_P1_22 41 +#define PIN_P1_23 53 +#define PIN_P2_12 12 +#define PIN_P2_11 35 +#define PIN_P4_28 13 // // Prusa i3 MK2 Multi Material Multiplexer Support // - -#define E_MUX0_PIN 50 // J7-4 -#define E_MUX1_PIN 16 // J7-5 -#define E_MUX2_PIN 80 // J7-6 +#define E_MUX0_PIN 50 // J7-4 +#define E_MUX1_PIN 16 // J7-5 +#define E_MUX2_PIN 80 // J7-6 /** @@ -162,72 +149,38 @@ * that the garbage/lines are erased immediately after the SD card accesses are completed. */ -#if ENABLED(ULTRA_LCD) // - - #define BEEPER_PIN 49 // EXP1.1 - - #define BTN_ENC 37 // EXP1.2 - #define BTN_EN1 31 // EXP2.5 - #define BTN_EN2 33 // EXP2.3 - - #define SD_DETECT_PIN 57 // EXP2.7 - #define KILL_PIN -1 // Not connected - #define LCD_PINS_RS 16 // EXP1.4 - #define LCD_SDSS 58 // EXP2.4 - #define LCD_BACKLIGHT_PIN -1 // Not connected - #define LCD_PINS_ENABLE 51 // EXP1.3 - #define LCD_PINS_D4 80 // EXP1.5 - - #define DOGLCD_A0 -1 // Not connected - #define DOGLCD_CS -1 // Not connected - -#ifdef ULTIPANEL - - #define LCD_PINS_D5 -1 // EXP1.6 Not connected - #define LCD_PINS_D6 -1 // EXP1.7 Not connected - #define LCD_PINS_D7 -1 // EXP1.8 Not connected -#endif - - - #if ENABLED(SDSUPPORT) - #define SDCARD_SORT_ALPHA // Using SORT feature to keep one directory level in RAM - // When going up/down directory levels the SD card is - // accessed but the garbage/lines are removed when the - // LCD updates - - // SD Card Sorting options - #if ENABLED(SDCARD_SORT_ALPHA) - #define SDSORT_LIMIT 255 // Maximum number of sorted items (10-256). - #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_USES_RAM true // 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 true // Keep sorted items in RAM longer for speedy performance. Most expensive option. - #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use! - #endif - #endif +#if ENABLED(ULTRA_LCD) + #define BEEPER_PIN 49 // EXP1.1 + #define BTN_ENC 37 // EXP1.2 + #define BTN_EN1 31 // EXP2.5 + #define BTN_EN2 33 // EXP2.3 + #define SD_DETECT_PIN 57 // EXP2.7 + #define LCD_PINS_RS 16 // EXP1.4 + #define LCD_SDSS 58 // EXP2.4 + #define LCD_PINS_ENABLE 51 // EXP1.3 + #define LCD_PINS_D4 80 // EXP1.5 #endif // ULTRA_LCD // // Ethernet pins // #ifndef ULTIPANEL -#define ENET_MDIO 71 // J12-4 -#define ENET_RX_ER 73 // J12-6 -#define ENET_RXD1 75 // J12-8 + #define ENET_MDIO 71 // J12-4 + #define ENET_RX_ER 73 // J12-6 + #define ENET_RXD1 75 // J12-8 #endif -#define ENET_MOC 70 // J12-3 -#define REF_CLK 72 // J12-5 -#define ENET_RXD0 74 // J12-7 -#define ENET_CRS 76 // J12-9 -#define ENET_TX_EN 77 // J12-10 -#define ENET_TXD0 78 // J12-11 -#define ENET_TXD1 79 // J12-12 +#define ENET_MOC 70 // J12-3 +#define REF_CLK 72 // J12-5 +#define ENET_RXD0 74 // J12-7 +#define ENET_CRS 76 // J12-9 +#define ENET_TX_EN 77 // J12-10 +#define ENET_TXD0 78 // J12-11 +#define ENET_TXD1 79 // J12-12 /** - * PWMS + * PWMs * - * There are 6 PWMS. Each PWM can be assigned to one of two pins. + * There are 6 PWMs. Each PWM can be assigned to one of two pins. * * SERVO2 does NOT have a PWM assigned to it. * @@ -245,12 +198,11 @@ * PWM1.6 DIO10 RAMPS_D10_PIN */ - /** - * special pins + * Special pins * D37 - not 5V tolerant * D49 - not 5V tolerant * D57 - open collector * D58 - open collector * - */ + */ From 7f55d82fd1f15487926b727dfbf87e323fad8555 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 24 Oct 2017 18:26:43 -0500 Subject: [PATCH 17/20] Move UBL_SAVE_ACTIVE_ON_M500 to Configuration.h --- Marlin/Configuration.h | 1 + Marlin/Configuration_adv.h | 4 ---- Marlin/src/config/default/Configuration.h | 1 + Marlin/src/config/default/Configuration_adv.h | 4 ---- Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h | 1 + .../src/config/examples/AlephObjects/TAZ4/Configuration_adv.h | 4 ---- Marlin/src/config/examples/AliExpress/CL-260/Configuration.h | 1 + Marlin/src/config/examples/Anet/A6/Configuration.h | 1 + Marlin/src/config/examples/Anet/A6/Configuration_adv.h | 4 ---- Marlin/src/config/examples/Anet/A8/Configuration.h | 1 + Marlin/src/config/examples/Anet/A8/Configuration_adv.h | 4 ---- Marlin/src/config/examples/BQ/Hephestos/Configuration.h | 1 + Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h | 4 ---- Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h | 1 + Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h | 4 ---- Marlin/src/config/examples/BQ/WITBOX/Configuration.h | 1 + Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h | 4 ---- Marlin/src/config/examples/Cartesio/Configuration.h | 1 + Marlin/src/config/examples/Cartesio/Configuration_adv.h | 4 ---- Marlin/src/config/examples/Creality/CR-10/Configuration.h | 1 + Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h | 4 ---- Marlin/src/config/examples/Felix/Configuration.h | 1 + Marlin/src/config/examples/Felix/Configuration_adv.h | 4 ---- Marlin/src/config/examples/Felix/DUAL/Configuration.h | 1 + .../src/config/examples/Folger Tech/i3-2020/Configuration.h | 1 + .../config/examples/Folger Tech/i3-2020/Configuration_adv.h | 4 ---- Marlin/src/config/examples/Geeetech/GT2560/Configuration.h | 1 + .../config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h | 1 + Marlin/src/config/examples/Infitary/i3-M508/Configuration.h | 1 + .../src/config/examples/Infitary/i3-M508/Configuration_adv.h | 4 ---- Marlin/src/config/examples/Malyan/M150/Configuration.h | 1 + Marlin/src/config/examples/Malyan/M150/Configuration_adv.h | 4 ---- Marlin/src/config/examples/Micromake/C1/basic/Configuration.h | 1 + .../src/config/examples/Micromake/C1/enhanced/Configuration.h | 1 + Marlin/src/config/examples/Mks/Sbase/Configuration.h | 1 + Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h | 4 ---- .../config/examples/RepRapWorld/Megatronics/Configuration.h | 1 + Marlin/src/config/examples/RigidBot/Configuration.h | 1 + Marlin/src/config/examples/RigidBot/Configuration_adv.h | 4 ---- Marlin/src/config/examples/SCARA/Configuration.h | 1 + Marlin/src/config/examples/SCARA/Configuration_adv.h | 4 ---- Marlin/src/config/examples/Sanguinololu/Configuration.h | 1 + Marlin/src/config/examples/Sanguinololu/Configuration_adv.h | 4 ---- Marlin/src/config/examples/TinyBoy2/Configuration.h | 1 + Marlin/src/config/examples/TinyBoy2/Configuration_adv.h | 4 ---- Marlin/src/config/examples/Velleman/K8200/Configuration.h | 1 + Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h | 4 ---- Marlin/src/config/examples/Velleman/K8400/Configuration.h | 1 + Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h | 4 ---- .../config/examples/Velleman/K8400/Dual-head/Configuration.h | 1 + Marlin/src/config/examples/adafruit/ST7565/Configuration.h | 1 + .../examples/delta/FLSUN/auto_calibrate/Configuration.h | 1 + .../examples/delta/FLSUN/auto_calibrate/Configuration_adv.h | 4 ---- .../config/examples/delta/FLSUN/kossel_mini/Configuration.h | 1 + .../examples/delta/FLSUN/kossel_mini/Configuration_adv.h | 4 ---- Marlin/src/config/examples/delta/generic/Configuration.h | 1 + Marlin/src/config/examples/delta/generic/Configuration_adv.h | 4 ---- Marlin/src/config/examples/delta/kossel_mini/Configuration.h | 1 + .../src/config/examples/delta/kossel_mini/Configuration_adv.h | 4 ---- Marlin/src/config/examples/delta/kossel_pro/Configuration.h | 1 + .../src/config/examples/delta/kossel_pro/Configuration_adv.h | 4 ---- Marlin/src/config/examples/delta/kossel_xl/Configuration.h | 1 + .../src/config/examples/delta/kossel_xl/Configuration_adv.h | 4 ---- Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h | 1 + .../src/config/examples/gCreate/gMax1.5+/Configuration_adv.h | 4 ---- Marlin/src/config/examples/makibox/Configuration.h | 1 + Marlin/src/config/examples/makibox/Configuration_adv.h | 4 ---- Marlin/src/config/examples/stm32f103ret6/Configuration.h | 1 + Marlin/src/config/examples/tvrrug/Round2/Configuration.h | 1 + Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h | 4 ---- Marlin/src/config/examples/wt150/Configuration.h | 1 + Marlin/src/config/examples/wt150/Configuration_adv.h | 4 ---- 72 files changed, 41 insertions(+), 124 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 792a5115a7..e02f120420 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -950,6 +950,7 @@ //#define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 #elif ENABLED(MESH_BED_LEVELING) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 3160e3034d..14c0fd8208 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -693,10 +693,6 @@ //#define MESH_MIN_Y MESH_INSET //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - - #if ENABLED(AUTO_BED_LEVELING_UBL) - #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 - #endif #endif // @section extras diff --git a/Marlin/src/config/default/Configuration.h b/Marlin/src/config/default/Configuration.h index f610a22e23..16ec71367a 100644 --- a/Marlin/src/config/default/Configuration.h +++ b/Marlin/src/config/default/Configuration.h @@ -950,6 +950,7 @@ //#define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 #elif ENABLED(MESH_BED_LEVELING) diff --git a/Marlin/src/config/default/Configuration_adv.h b/Marlin/src/config/default/Configuration_adv.h index 3160e3034d..14c0fd8208 100644 --- a/Marlin/src/config/default/Configuration_adv.h +++ b/Marlin/src/config/default/Configuration_adv.h @@ -693,10 +693,6 @@ //#define MESH_MIN_Y MESH_INSET //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - - #if ENABLED(AUTO_BED_LEVELING_UBL) - #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 - #endif #endif // @section extras diff --git a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h index 62b708a3e8..2633c5a2f9 100644 --- a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h +++ b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h @@ -970,6 +970,7 @@ #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 #elif ENABLED(MESH_BED_LEVELING) diff --git a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h index 1fd4fff4fe..d190904f12 100644 --- a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h +++ b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h @@ -692,10 +692,6 @@ //#define MESH_MIN_Y MESH_INSET //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - - #if ENABLED(AUTO_BED_LEVELING_UBL) - #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 - #endif #endif // @section extras diff --git a/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h b/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h index 7f9031c30a..9215f39ecb 100644 --- a/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h +++ b/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h @@ -950,6 +950,7 @@ #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 #elif ENABLED(MESH_BED_LEVELING) diff --git a/Marlin/src/config/examples/Anet/A6/Configuration.h b/Marlin/src/config/examples/Anet/A6/Configuration.h index 60da71c789..52ba8bf25b 100644 --- a/Marlin/src/config/examples/Anet/A6/Configuration.h +++ b/Marlin/src/config/examples/Anet/A6/Configuration.h @@ -1093,6 +1093,7 @@ #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 #elif ENABLED(MESH_BED_LEVELING) diff --git a/Marlin/src/config/examples/Anet/A6/Configuration_adv.h b/Marlin/src/config/examples/Anet/A6/Configuration_adv.h index 1dd657c738..209311e2c1 100644 --- a/Marlin/src/config/examples/Anet/A6/Configuration_adv.h +++ b/Marlin/src/config/examples/Anet/A6/Configuration_adv.h @@ -692,10 +692,6 @@ //#define MESH_MIN_Y MESH_INSET //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - - #if ENABLED(AUTO_BED_LEVELING_UBL) - #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 - #endif #endif // @section extras diff --git a/Marlin/src/config/examples/Anet/A8/Configuration.h b/Marlin/src/config/examples/Anet/A8/Configuration.h index 901f24bdda..082671d0e5 100644 --- a/Marlin/src/config/examples/Anet/A8/Configuration.h +++ b/Marlin/src/config/examples/Anet/A8/Configuration.h @@ -956,6 +956,7 @@ #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 #elif ENABLED(MESH_BED_LEVELING) diff --git a/Marlin/src/config/examples/Anet/A8/Configuration_adv.h b/Marlin/src/config/examples/Anet/A8/Configuration_adv.h index 7ce6f42d5e..70675f3558 100644 --- a/Marlin/src/config/examples/Anet/A8/Configuration_adv.h +++ b/Marlin/src/config/examples/Anet/A8/Configuration_adv.h @@ -692,10 +692,6 @@ //#define MESH_MIN_Y MESH_INSET //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - - #if ENABLED(AUTO_BED_LEVELING_UBL) - #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 - #endif #endif // @section extras diff --git a/Marlin/src/config/examples/BQ/Hephestos/Configuration.h b/Marlin/src/config/examples/BQ/Hephestos/Configuration.h index 6a0c9fb390..018aca9239 100644 --- a/Marlin/src/config/examples/BQ/Hephestos/Configuration.h +++ b/Marlin/src/config/examples/BQ/Hephestos/Configuration.h @@ -941,6 +941,7 @@ #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 #elif ENABLED(MESH_BED_LEVELING) diff --git a/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h b/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h index 2bb9b8ce34..f045bdd4cb 100644 --- a/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h @@ -692,10 +692,6 @@ //#define MESH_MIN_Y MESH_INSET //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - - #if ENABLED(AUTO_BED_LEVELING_UBL) - #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 - #endif #endif // @section extras diff --git a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h index 2263a06fbd..f5e9e1d6f3 100644 --- a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h +++ b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h @@ -951,6 +951,7 @@ #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 #elif ENABLED(MESH_BED_LEVELING) diff --git a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h index ff006819d1..ce8b341bec 100644 --- a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h @@ -689,10 +689,6 @@ //#define MESH_MIN_Y MESH_INSET //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - - #if ENABLED(AUTO_BED_LEVELING_UBL) - #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 - #endif #endif // @section extras diff --git a/Marlin/src/config/examples/BQ/WITBOX/Configuration.h b/Marlin/src/config/examples/BQ/WITBOX/Configuration.h index 3fbfb4e325..4d06dfa1a5 100644 --- a/Marlin/src/config/examples/BQ/WITBOX/Configuration.h +++ b/Marlin/src/config/examples/BQ/WITBOX/Configuration.h @@ -941,6 +941,7 @@ #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 #elif ENABLED(MESH_BED_LEVELING) diff --git a/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h b/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h index 2bb9b8ce34..f045bdd4cb 100644 --- a/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h @@ -692,10 +692,6 @@ //#define MESH_MIN_Y MESH_INSET //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - - #if ENABLED(AUTO_BED_LEVELING_UBL) - #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 - #endif #endif // @section extras diff --git a/Marlin/src/config/examples/Cartesio/Configuration.h b/Marlin/src/config/examples/Cartesio/Configuration.h index 20650986fd..5f5552c8ea 100644 --- a/Marlin/src/config/examples/Cartesio/Configuration.h +++ b/Marlin/src/config/examples/Cartesio/Configuration.h @@ -949,6 +949,7 @@ #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 #elif ENABLED(MESH_BED_LEVELING) diff --git a/Marlin/src/config/examples/Cartesio/Configuration_adv.h b/Marlin/src/config/examples/Cartesio/Configuration_adv.h index 2272b1e81b..31ad3fac39 100644 --- a/Marlin/src/config/examples/Cartesio/Configuration_adv.h +++ b/Marlin/src/config/examples/Cartesio/Configuration_adv.h @@ -692,10 +692,6 @@ //#define MESH_MIN_Y MESH_INSET //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - - #if ENABLED(AUTO_BED_LEVELING_UBL) - #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 - #endif #endif // @section extras diff --git a/Marlin/src/config/examples/Creality/CR-10/Configuration.h b/Marlin/src/config/examples/Creality/CR-10/Configuration.h index cdde77f625..a5c7346f58 100755 --- a/Marlin/src/config/examples/Creality/CR-10/Configuration.h +++ b/Marlin/src/config/examples/Creality/CR-10/Configuration.h @@ -960,6 +960,7 @@ //#define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 #elif ENABLED(MESH_BED_LEVELING) diff --git a/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h b/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h index 3bd984791c..dda5ec9866 100644 --- a/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h @@ -692,10 +692,6 @@ //#define MESH_MIN_Y MESH_INSET //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - - #if ENABLED(AUTO_BED_LEVELING_UBL) - #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 - #endif #endif // @section extras diff --git a/Marlin/src/config/examples/Felix/Configuration.h b/Marlin/src/config/examples/Felix/Configuration.h index e321c7e797..f590ba29ff 100644 --- a/Marlin/src/config/examples/Felix/Configuration.h +++ b/Marlin/src/config/examples/Felix/Configuration.h @@ -932,6 +932,7 @@ #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 #elif ENABLED(MESH_BED_LEVELING) diff --git a/Marlin/src/config/examples/Felix/Configuration_adv.h b/Marlin/src/config/examples/Felix/Configuration_adv.h index b26a95a81e..30c41ebd07 100644 --- a/Marlin/src/config/examples/Felix/Configuration_adv.h +++ b/Marlin/src/config/examples/Felix/Configuration_adv.h @@ -692,10 +692,6 @@ //#define MESH_MIN_Y MESH_INSET //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - - #if ENABLED(AUTO_BED_LEVELING_UBL) - #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 - #endif #endif // @section extras diff --git a/Marlin/src/config/examples/Felix/DUAL/Configuration.h b/Marlin/src/config/examples/Felix/DUAL/Configuration.h index 628972228c..f7c42928ab 100644 --- a/Marlin/src/config/examples/Felix/DUAL/Configuration.h +++ b/Marlin/src/config/examples/Felix/DUAL/Configuration.h @@ -932,6 +932,7 @@ #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 #elif ENABLED(MESH_BED_LEVELING) diff --git a/Marlin/src/config/examples/Folger Tech/i3-2020/Configuration.h b/Marlin/src/config/examples/Folger Tech/i3-2020/Configuration.h index 6fbe8eb6e6..2eca0a5915 100644 --- a/Marlin/src/config/examples/Folger Tech/i3-2020/Configuration.h +++ b/Marlin/src/config/examples/Folger Tech/i3-2020/Configuration.h @@ -947,6 +947,7 @@ #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 #elif ENABLED(MESH_BED_LEVELING) diff --git a/Marlin/src/config/examples/Folger Tech/i3-2020/Configuration_adv.h b/Marlin/src/config/examples/Folger Tech/i3-2020/Configuration_adv.h index 8d606714fd..8c84c683fc 100644 --- a/Marlin/src/config/examples/Folger Tech/i3-2020/Configuration_adv.h +++ b/Marlin/src/config/examples/Folger Tech/i3-2020/Configuration_adv.h @@ -693,10 +693,6 @@ //#define MESH_MIN_Y MESH_INSET //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - - #if ENABLED(AUTO_BED_LEVELING_UBL) - #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 - #endif #endif // @section extras diff --git a/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h b/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h index bca733c72d..e8ee64e979 100644 --- a/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h +++ b/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h @@ -965,6 +965,7 @@ #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 #elif ENABLED(MESH_BED_LEVELING) diff --git a/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h b/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h index 372627b63f..ed2b4bdaea 100644 --- a/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h +++ b/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h @@ -950,6 +950,7 @@ #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 #elif ENABLED(MESH_BED_LEVELING) diff --git a/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h b/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h index 60a8b371f1..26de7f4d93 100644 --- a/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h +++ b/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h @@ -954,6 +954,7 @@ #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 #elif ENABLED(MESH_BED_LEVELING) diff --git a/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h b/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h index 44aabe99c2..6c7f2c3d20 100644 --- a/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h +++ b/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h @@ -692,10 +692,6 @@ //#define MESH_MIN_Y MESH_INSET //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - - #if ENABLED(AUTO_BED_LEVELING_UBL) - #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 - #endif #endif // @section extras diff --git a/Marlin/src/config/examples/Malyan/M150/Configuration.h b/Marlin/src/config/examples/Malyan/M150/Configuration.h index 5dae0a8cf7..226042a7dc 100644 --- a/Marlin/src/config/examples/Malyan/M150/Configuration.h +++ b/Marlin/src/config/examples/Malyan/M150/Configuration.h @@ -978,6 +978,7 @@ #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 #elif ENABLED(MESH_BED_LEVELING) diff --git a/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h b/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h index 351991833f..764b58e361 100644 --- a/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h +++ b/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h @@ -689,10 +689,6 @@ //#define MESH_MIN_Y MESH_INSET //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - - #if ENABLED(AUTO_BED_LEVELING_UBL) - #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 - #endif #endif // @section extras diff --git a/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h b/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h index fa21539ea2..1e65243237 100644 --- a/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h +++ b/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h @@ -954,6 +954,7 @@ //#define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 #elif ENABLED(MESH_BED_LEVELING) diff --git a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h index e83a87e9dc..d1fc92549a 100644 --- a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h +++ b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h @@ -954,6 +954,7 @@ //#define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 #elif ENABLED(MESH_BED_LEVELING) diff --git a/Marlin/src/config/examples/Mks/Sbase/Configuration.h b/Marlin/src/config/examples/Mks/Sbase/Configuration.h index b96eb63881..65555edcf8 100644 --- a/Marlin/src/config/examples/Mks/Sbase/Configuration.h +++ b/Marlin/src/config/examples/Mks/Sbase/Configuration.h @@ -952,6 +952,7 @@ //#define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 #elif ENABLED(MESH_BED_LEVELING) diff --git a/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h b/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h index 9b5eaad8d0..fae5ea1ccf 100644 --- a/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h +++ b/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h @@ -713,10 +713,6 @@ //#define MESH_MIN_Y MESH_INSET //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - - #if ENABLED(AUTO_BED_LEVELING_UBL) - #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 - #endif #endif // @section extras diff --git a/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h b/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h index b1f729e152..277ddc8c7e 100644 --- a/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h +++ b/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h @@ -950,6 +950,7 @@ #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 #elif ENABLED(MESH_BED_LEVELING) diff --git a/Marlin/src/config/examples/RigidBot/Configuration.h b/Marlin/src/config/examples/RigidBot/Configuration.h index 41f536bbce..8af196eba4 100644 --- a/Marlin/src/config/examples/RigidBot/Configuration.h +++ b/Marlin/src/config/examples/RigidBot/Configuration.h @@ -948,6 +948,7 @@ #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 #elif ENABLED(MESH_BED_LEVELING) diff --git a/Marlin/src/config/examples/RigidBot/Configuration_adv.h b/Marlin/src/config/examples/RigidBot/Configuration_adv.h index b0cf04156c..5ad95c98cc 100644 --- a/Marlin/src/config/examples/RigidBot/Configuration_adv.h +++ b/Marlin/src/config/examples/RigidBot/Configuration_adv.h @@ -692,10 +692,6 @@ //#define MESH_MIN_Y MESH_INSET //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - - #if ENABLED(AUTO_BED_LEVELING_UBL) - #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 - #endif #endif // @section extras diff --git a/Marlin/src/config/examples/SCARA/Configuration.h b/Marlin/src/config/examples/SCARA/Configuration.h index e1cad825d5..44432618f7 100644 --- a/Marlin/src/config/examples/SCARA/Configuration.h +++ b/Marlin/src/config/examples/SCARA/Configuration.h @@ -962,6 +962,7 @@ #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 #elif ENABLED(MESH_BED_LEVELING) diff --git a/Marlin/src/config/examples/SCARA/Configuration_adv.h b/Marlin/src/config/examples/SCARA/Configuration_adv.h index eac62904f0..de89cc7e57 100644 --- a/Marlin/src/config/examples/SCARA/Configuration_adv.h +++ b/Marlin/src/config/examples/SCARA/Configuration_adv.h @@ -692,10 +692,6 @@ //#define MESH_MIN_Y MESH_INSET //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - - #if ENABLED(AUTO_BED_LEVELING_UBL) - #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 - #endif #endif // @section extras diff --git a/Marlin/src/config/examples/Sanguinololu/Configuration.h b/Marlin/src/config/examples/Sanguinololu/Configuration.h index 923533edb0..6267b43111 100644 --- a/Marlin/src/config/examples/Sanguinololu/Configuration.h +++ b/Marlin/src/config/examples/Sanguinololu/Configuration.h @@ -981,6 +981,7 @@ //#define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 #elif ENABLED(MESH_BED_LEVELING) diff --git a/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h b/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h index 37340d1471..2ecd9ef447 100644 --- a/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h +++ b/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h @@ -681,10 +681,6 @@ //#define MESH_MIN_Y MESH_INSET //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - - #if ENABLED(AUTO_BED_LEVELING_UBL) - #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 - #endif #endif // @section extras diff --git a/Marlin/src/config/examples/TinyBoy2/Configuration.h b/Marlin/src/config/examples/TinyBoy2/Configuration.h index 8df03edc36..194e73aecf 100644 --- a/Marlin/src/config/examples/TinyBoy2/Configuration.h +++ b/Marlin/src/config/examples/TinyBoy2/Configuration.h @@ -1006,6 +1006,7 @@ #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 #elif ENABLED(MESH_BED_LEVELING) diff --git a/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h b/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h index 7767baaba1..f75e352137 100644 --- a/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h +++ b/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h @@ -692,10 +692,6 @@ //#define MESH_MIN_Y MESH_INSET //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - - #if ENABLED(AUTO_BED_LEVELING_UBL) - #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 - #endif #endif // @section extras diff --git a/Marlin/src/config/examples/Velleman/K8200/Configuration.h b/Marlin/src/config/examples/Velleman/K8200/Configuration.h index 15731acb36..d085210a7f 100644 --- a/Marlin/src/config/examples/Velleman/K8200/Configuration.h +++ b/Marlin/src/config/examples/Velleman/K8200/Configuration.h @@ -980,6 +980,7 @@ #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 #elif ENABLED(MESH_BED_LEVELING) diff --git a/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h b/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h index b50290057a..d63595d1a3 100644 --- a/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h +++ b/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h @@ -700,10 +700,6 @@ //#define MESH_MIN_Y MESH_INSET //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - - #if ENABLED(AUTO_BED_LEVELING_UBL) - #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 - #endif #endif // @section extras diff --git a/Marlin/src/config/examples/Velleman/K8400/Configuration.h b/Marlin/src/config/examples/Velleman/K8400/Configuration.h index 3e8598facb..cb80eba1f3 100644 --- a/Marlin/src/config/examples/Velleman/K8400/Configuration.h +++ b/Marlin/src/config/examples/Velleman/K8400/Configuration.h @@ -950,6 +950,7 @@ #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 #elif ENABLED(MESH_BED_LEVELING) diff --git a/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h b/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h index 219181db37..6428a21194 100644 --- a/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h +++ b/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h @@ -692,10 +692,6 @@ //#define MESH_MIN_Y MESH_INSET //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - - #if ENABLED(AUTO_BED_LEVELING_UBL) - #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 - #endif #endif // @section extras diff --git a/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h b/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h index 5e44cd377d..9ed95be6ad 100644 --- a/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h +++ b/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h @@ -950,6 +950,7 @@ #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 #elif ENABLED(MESH_BED_LEVELING) diff --git a/Marlin/src/config/examples/adafruit/ST7565/Configuration.h b/Marlin/src/config/examples/adafruit/ST7565/Configuration.h index 6ce3ad4ef8..efe6373b59 100644 --- a/Marlin/src/config/examples/adafruit/ST7565/Configuration.h +++ b/Marlin/src/config/examples/adafruit/ST7565/Configuration.h @@ -950,6 +950,7 @@ #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 #elif ENABLED(MESH_BED_LEVELING) diff --git a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h index 3bedf52d16..a8bc014842 100644 --- a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h +++ b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h @@ -1078,6 +1078,7 @@ #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 #elif ENABLED(MESH_BED_LEVELING) diff --git a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h index ea0b246e10..6a6379658a 100644 --- a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h @@ -694,10 +694,6 @@ //#define MESH_MIN_Y MESH_INSET //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - - #if ENABLED(AUTO_BED_LEVELING_UBL) - #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 - #endif #endif // @section extras diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h index 58c3e3e209..6d536475c1 100644 --- a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h +++ b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h @@ -1072,6 +1072,7 @@ #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 #elif ENABLED(MESH_BED_LEVELING) diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h index cfc4d23c7c..04ae683d0d 100644 --- a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h @@ -694,10 +694,6 @@ //#define MESH_MIN_Y MESH_INSET //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - - #if ENABLED(AUTO_BED_LEVELING_UBL) - #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 - #endif #endif // @section extras diff --git a/Marlin/src/config/examples/delta/generic/Configuration.h b/Marlin/src/config/examples/delta/generic/Configuration.h index 7fb6e5e912..ed859f6c81 100644 --- a/Marlin/src/config/examples/delta/generic/Configuration.h +++ b/Marlin/src/config/examples/delta/generic/Configuration.h @@ -1067,6 +1067,7 @@ #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 #elif ENABLED(MESH_BED_LEVELING) diff --git a/Marlin/src/config/examples/delta/generic/Configuration_adv.h b/Marlin/src/config/examples/delta/generic/Configuration_adv.h index cfc4d23c7c..04ae683d0d 100644 --- a/Marlin/src/config/examples/delta/generic/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/generic/Configuration_adv.h @@ -694,10 +694,6 @@ //#define MESH_MIN_Y MESH_INSET //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - - #if ENABLED(AUTO_BED_LEVELING_UBL) - #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 - #endif #endif // @section extras diff --git a/Marlin/src/config/examples/delta/kossel_mini/Configuration.h b/Marlin/src/config/examples/delta/kossel_mini/Configuration.h index 3b362b7baa..7d15cdeb23 100644 --- a/Marlin/src/config/examples/delta/kossel_mini/Configuration.h +++ b/Marlin/src/config/examples/delta/kossel_mini/Configuration.h @@ -1070,6 +1070,7 @@ #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 #elif ENABLED(MESH_BED_LEVELING) diff --git a/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h b/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h index cfc4d23c7c..04ae683d0d 100644 --- a/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h @@ -694,10 +694,6 @@ //#define MESH_MIN_Y MESH_INSET //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - - #if ENABLED(AUTO_BED_LEVELING_UBL) - #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 - #endif #endif // @section extras diff --git a/Marlin/src/config/examples/delta/kossel_pro/Configuration.h b/Marlin/src/config/examples/delta/kossel_pro/Configuration.h index b5842ac684..d88cdb51ac 100644 --- a/Marlin/src/config/examples/delta/kossel_pro/Configuration.h +++ b/Marlin/src/config/examples/delta/kossel_pro/Configuration.h @@ -1070,6 +1070,7 @@ #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 #elif ENABLED(MESH_BED_LEVELING) diff --git a/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h b/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h index c299ec9cd1..75a918e647 100644 --- a/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h @@ -699,10 +699,6 @@ //#define MESH_MIN_Y MESH_INSET //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - - #if ENABLED(AUTO_BED_LEVELING_UBL) - #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 - #endif #endif // @section extras diff --git a/Marlin/src/config/examples/delta/kossel_xl/Configuration.h b/Marlin/src/config/examples/delta/kossel_xl/Configuration.h index b3e18476c9..d17a5735ab 100644 --- a/Marlin/src/config/examples/delta/kossel_xl/Configuration.h +++ b/Marlin/src/config/examples/delta/kossel_xl/Configuration.h @@ -1079,6 +1079,7 @@ #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 #elif ENABLED(MESH_BED_LEVELING) diff --git a/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h b/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h index fceae7557f..aa05d414fc 100644 --- a/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h @@ -694,10 +694,6 @@ //#define MESH_MIN_Y MESH_INSET //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - - #if ENABLED(AUTO_BED_LEVELING_UBL) - #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 - #endif #endif // @section extras diff --git a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h index fb70669454..e6578f5b3a 100644 --- a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h +++ b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h @@ -964,6 +964,7 @@ #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 #elif ENABLED(MESH_BED_LEVELING) diff --git a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h index f5e7c3b6a1..54ae9d1c92 100644 --- a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h +++ b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h @@ -692,10 +692,6 @@ //#define MESH_MIN_Y MESH_INSET //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - - #if ENABLED(AUTO_BED_LEVELING_UBL) - #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 - #endif #endif // @section extras diff --git a/Marlin/src/config/examples/makibox/Configuration.h b/Marlin/src/config/examples/makibox/Configuration.h index f7f937e1cc..13414e4f3c 100644 --- a/Marlin/src/config/examples/makibox/Configuration.h +++ b/Marlin/src/config/examples/makibox/Configuration.h @@ -953,6 +953,7 @@ #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 #elif ENABLED(MESH_BED_LEVELING) diff --git a/Marlin/src/config/examples/makibox/Configuration_adv.h b/Marlin/src/config/examples/makibox/Configuration_adv.h index 75502fad78..68782035ae 100644 --- a/Marlin/src/config/examples/makibox/Configuration_adv.h +++ b/Marlin/src/config/examples/makibox/Configuration_adv.h @@ -692,10 +692,6 @@ //#define MESH_MIN_Y MESH_INSET //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - - #if ENABLED(AUTO_BED_LEVELING_UBL) - #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 - #endif #endif // @section extras diff --git a/Marlin/src/config/examples/stm32f103ret6/Configuration.h b/Marlin/src/config/examples/stm32f103ret6/Configuration.h index 1ae3973c9d..e9292e3880 100644 --- a/Marlin/src/config/examples/stm32f103ret6/Configuration.h +++ b/Marlin/src/config/examples/stm32f103ret6/Configuration.h @@ -937,6 +937,7 @@ #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 #elif ENABLED(MESH_BED_LEVELING) diff --git a/Marlin/src/config/examples/tvrrug/Round2/Configuration.h b/Marlin/src/config/examples/tvrrug/Round2/Configuration.h index c38f4bb114..32369f40bb 100644 --- a/Marlin/src/config/examples/tvrrug/Round2/Configuration.h +++ b/Marlin/src/config/examples/tvrrug/Round2/Configuration.h @@ -945,6 +945,7 @@ #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 #elif ENABLED(MESH_BED_LEVELING) diff --git a/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h b/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h index 09098c7b54..2bb64edf34 100644 --- a/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h @@ -692,10 +692,6 @@ //#define MESH_MIN_Y MESH_INSET //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - - #if ENABLED(AUTO_BED_LEVELING_UBL) - #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 - #endif #endif // @section extras diff --git a/Marlin/src/config/examples/wt150/Configuration.h b/Marlin/src/config/examples/wt150/Configuration.h index f0ff8d3da6..baa2953c6d 100644 --- a/Marlin/src/config/examples/wt150/Configuration.h +++ b/Marlin/src/config/examples/wt150/Configuration.h @@ -955,6 +955,7 @@ #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 #elif ENABLED(MESH_BED_LEVELING) diff --git a/Marlin/src/config/examples/wt150/Configuration_adv.h b/Marlin/src/config/examples/wt150/Configuration_adv.h index 70e4cc554e..3d840dbb79 100644 --- a/Marlin/src/config/examples/wt150/Configuration_adv.h +++ b/Marlin/src/config/examples/wt150/Configuration_adv.h @@ -692,10 +692,6 @@ //#define MESH_MIN_Y MESH_INSET //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) - - #if ENABLED(AUTO_BED_LEVELING_UBL) - #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 - #endif #endif // @section extras From ee9b8bf0f14758d0c196610a6a42f4a7238f5cfe Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 24 Oct 2017 19:15:41 -0500 Subject: [PATCH 18/20] Add MKS MINI 12864 support to GT2560 --- Marlin/src/pins/pins_GT2560_REV_A.h | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/Marlin/src/pins/pins_GT2560_REV_A.h b/Marlin/src/pins/pins_GT2560_REV_A.h index 0c420cfaa2..9ce02c4123 100644 --- a/Marlin/src/pins/pins_GT2560_REV_A.h +++ b/Marlin/src/pins/pins_GT2560_REV_A.h @@ -98,18 +98,23 @@ #if ENABLED(NEWPANEL) - #define LCD_PINS_RS 20 - #define LCD_PINS_ENABLE 17 - #define LCD_PINS_D4 16 - #define LCD_PINS_D5 21 - #define LCD_PINS_D6 5 - #define LCD_PINS_D7 6 + #if ENABLED(MKS_MINI_12864) + #define DOGLCD_A0 5 + #define DOGLCD_CS 21 + #define BTN_EN1 40 + #define BTN_EN2 42 + #else + #define LCD_PINS_RS 20 + #define LCD_PINS_ENABLE 17 + #define LCD_PINS_D4 16 + #define LCD_PINS_D5 21 + #define LCD_PINS_D6 5 + #define LCD_PINS_D7 6 + #define BTN_EN1 42 + #define BTN_EN2 40 + #endif - // Buttons are directly attached - #define BTN_EN1 42 - #define BTN_EN2 40 #define BTN_ENC 19 - #define SD_DETECT_PIN 38 #else // !NEWPANEL From e00ed10c4c4f152445566cdff7aba7fc13ed0614 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 25 Oct 2017 01:12:48 -0500 Subject: [PATCH 19/20] GT2560 config MKS_MINI_12864 => SDSUPPORT --- Marlin/src/config/examples/Geeetech/GT2560/Configuration.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h b/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h index e8ee64e979..a182ceb06b 100644 --- a/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h +++ b/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h @@ -1738,7 +1738,7 @@ /** * Customize common displays for GT2560 */ -#if ENABLED(ULTIMAKERCONTROLLER) || ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) || ENABLED(G3D_PANEL) +#if ENABLED(ULTIMAKERCONTROLLER) || ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) || ENABLED(G3D_PANEL) || ENABLED(MKS_MINI_12864) #define SDSUPPORT // Force SD Card support on for these displays #elif ENABLED(ULTRA_LCD) && ENABLED(DOGLCD) // No panel, just graphical LCD? #define LCD_WIDTH 20 // Default is 22. For this Geeetech use 20 From 7b3098bbd5cd45878bce14dedbbf394182859b38 Mon Sep 17 00:00:00 2001 From: jeffyl Date: Tue, 24 Oct 2017 23:16:54 -0700 Subject: [PATCH 20/20] Add AZSMZ Mini (#8005) * Add AZSMZ Mini * Remove tabs, adjust spacing * Renumber boards to group by family * Patch up spacing * Tweak --- Marlin/src/core/boards.h | 16 ++-- Marlin/src/pins/pins.h | 4 +- Marlin/src/pins/pins_AZSMZ_MINI.h | 143 ++++++++++++++++++++++++++++++ 3 files changed, 154 insertions(+), 9 deletions(-) create mode 100644 Marlin/src/pins/pins_AZSMZ_MINI.h diff --git a/Marlin/src/core/boards.h b/Marlin/src/core/boards.h index f766316e41..7924a6909d 100644 --- a/Marlin/src/core/boards.h +++ b/Marlin/src/core/boards.h @@ -124,14 +124,14 @@ #define BOARD_RAMPS4DUE_EEF 1546 // RAMPS4DUE (Power outputs: Hotend0, Hotend1, Fan) #define BOARD_RAMPS4DUE_SF 1548 // RAMPS4DUE (Power outputs: Spindle, Controller Fan) #define BOARD_ALLIGATOR 1602 // Alligator Board R2 -#define BOARD_RAMPS_14_RE_ARM_EFB 1743 // Re-ARM with RAMPS 1.4 (Power outputs: Hotend, Fan, Bed) -#define BOARD_RAMPS_14_RE_ARM_EEB 1744 // Re-ARM with RAMPS 1.4 (Power outputs: Hotend0, Hotend1, Bed) -#define BOARD_RAMPS_14_RE_ARM_EFF 1745 // Re-ARM with RAMPS 1.4 (Power outputs: Hotend, Fan0, Fan1) -#define BOARD_RAMPS_14_RE_ARM_EEF 1746 // Re-ARM with RAMPS 1.4 (Power outputs: Hotend0, Hotend1, Fan) -#define BOARD_RAMPS_14_RE_ARM_SF 1748 // Re-ARM with RAMPS 1.4 (Power outputs: Spindle, Controller Fan) -#define BOARD_STM32F1R 1800 // STM3R Libmaple based stm32f1 controller -#define BOARD_MKS_SBASE 1850 // MKS-Sbase (Power outputs: Hotend0, Hotend1, Bed, Fan) - +#define BOARD_RAMPS_14_RE_ARM_EFB 1743 // Re-ARM with RAMPS 1.4 (Power outputs: Hotend, Fan, Bed) +#define BOARD_RAMPS_14_RE_ARM_EEB 1744 // Re-ARM with RAMPS 1.4 (Power outputs: Hotend0, Hotend1, Bed) +#define BOARD_RAMPS_14_RE_ARM_EFF 1745 // Re-ARM with RAMPS 1.4 (Power outputs: Hotend, Fan0, Fan1) +#define BOARD_RAMPS_14_RE_ARM_EEF 1746 // Re-ARM with RAMPS 1.4 (Power outputs: Hotend0, Hotend1, Fan) +#define BOARD_RAMPS_14_RE_ARM_SF 1748 // Re-ARM with RAMPS 1.4 (Power outputs: Spindle, Controller Fan) +#define BOARD_MKS_SBASE 1750 // MKS-Sbase (Power outputs: Hotend0, Hotend1, Bed, Fan) +#define BOARD_AZSMZ_MINI 1751 // AZSMZ Mini +#define BOARD_STM32F1R 1800 // STM3R Libmaple based STM32F1 controller #define MB(board) (MOTHERBOARD==BOARD_##board) diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index 69cae36d09..09a0d4e817 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -302,8 +302,10 @@ #include "pins_ALLIGATOR_R2.h" #elif MB(STM32F1R) #include "pins_STM32F1R.h" - #elif MB(MKS_SBASE) +#elif MB(MKS_SBASE) #include "pins_MKS_SBASE.h" +#elif MB(AZSMZ_MINI) + #include "pins_AZSMZ_MINI.h" #else #error "Unknown MOTHERBOARD value set in Configuration.h" #endif diff --git a/Marlin/src/pins/pins_AZSMZ_MINI.h b/Marlin/src/pins/pins_AZSMZ_MINI.h new file mode 100644 index 0000000000..39dedd8f4a --- /dev/null +++ b/Marlin/src/pins/pins_AZSMZ_MINI.h @@ -0,0 +1,143 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (C) 2017 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 . + * + */ + +/** + * AZSMZ MINI pin assignments + */ + +//#if !defined(TARGET_LPC1768) +#if DISABLED(IS_REARM) + #error "Oops! Make sure you have Re-Arm selected." +#endif + +#ifndef BOARD_NAME + #define BOARD_NAME "AZSMZ MINI" +#endif + +#define LARGE_FLASH true + +// +// Servos +// +#define SERVO0_PIN 53 + +// +// Limit Switches +// +#define X_MIN_PIN 3 +#define Y_MIN_PIN 14 +#define Z_MIN_PIN 18 +#define Z_MAX_PIN 19 + +// +// Steppers +// +#define X_STEP_PIN 26 +#define X_DIR_PIN 28 +#define X_ENABLE_PIN 24 + +#define Y_STEP_PIN 54 +#define Y_DIR_PIN 55 +#define Y_ENABLE_PIN 38 + +#define Z_STEP_PIN 60 +#define Z_DIR_PIN 61 +#define Z_ENABLE_PIN 56 + +#define E0_STEP_PIN 46 +#define E0_DIR_PIN 48 +#define E0_ENABLE_PIN 62 + +#define E1_STEP_PIN 36 +#define E1_DIR_PIN 34 +#define E1_ENABLE_PIN 30 + +// +// Temperature Sensors +// 3.3V max when defined as an analog input +// +#define TEMP_0_PIN 0 // A0 (TH1) +#define TEMP_BED_PIN 1 // A1 (TH2) +#define TEMP_1_PIN 2 // A2 (TH3) + +// +// Heaters / Fans +// +// EFB +#define HEATER_0_PIN 8 +#define HEATER_BED_PIN 10 +#define FAN_PIN 9 +#define FAN1_PIN 63 + +#if ENABLED(AZSMZ_12864) + #define BEEPER_PIN 37 + #define DOGLCD_A0 59 + #define DOGLCD_CS 41 + #define BTN_EN1 13 + #define BTN_EN2 15 + #define BTN_ENC 31 + #define LCD_SDSS 16 + #define SD_DETECT_PIN 33 +#endif + +// +// Ethernet pins +// +#define ENET_MDIO 71 +#define ENET_RX_ER 73 +#define ENET_RXD1 75 +#define ENET_MOC 70 +#define REF_CLK 72 +#define ENET_RXD0 74 +#define ENET_CRS 76 +#define ENET_TX_EN 77 +#define ENET_TXD0 78 +#define ENET_TXD1 79 + +/** + * PWMs + * + * There are 6 PWMs. Each PWM can be assigned to one of two pins. + * + * SERVO2 does NOT have a PWM assigned to it. + * + * PWM1.1 DIO4 SERVO3_PIN FIL_RUNOUT_PIN 5V output, PWM + * PWM1.1 DIO26 E0_STEP_PIN + * PWM1.2 DIO11 SERVO0_PIN + * PWM1.2 DIO54 X_STEP_PIN + * PWM1.3 DIO6 SERVO1_PIN J5-1 + * PWM1.3 DIO60 Y_STEP_PIN + * PWM1.4 DIO53 SDSS(SSEL0) J3-5 AUX-3 + * PWM1.4 DIO46 Z_STEP_PIN + * PWM1.5 DIO3 X_MIN_PIN 10K PULLUP TO 3.3v, 1K SERIES + * PWM1.5 DIO9 RAMPS_D9_PIN + * PWM1.6 DIO14 Y_MIN_PIN 10K PULLUP TO 3.3v, 1K SERIES + * PWM1.6 DIO10 RAMPS_D10_PIN + */ + + /** + * Special pins + * D37 - not 5V tolerant + * D49 - not 5V tolerant + * D57 - open collector + * D58 - open collector + */