From 1fcc13b01162c2a59fcb4867cab4256a7bf6a42e Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 23 Nov 2018 21:05:59 -0600 Subject: [PATCH] Allow Serial Overrun Protection to be disabled --- Marlin/Configuration_adv.h | 4 ++ Marlin/src/config/default/Configuration_adv.h | 4 ++ .../AlephObjects/TAZ4/Configuration_adv.h | 4 ++ .../examples/Anet/A2/Configuration_adv.h | 4 ++ .../examples/Anet/A2plus/Configuration_adv.h | 4 ++ .../examples/Anet/A6/Configuration_adv.h | 4 ++ .../examples/Anet/A8/Configuration_adv.h | 4 ++ .../config/examples/ArmEd/Configuration_adv.h | 4 ++ .../BIBO/TouchX/cyclops/Configuration_adv.h | 4 ++ .../BIBO/TouchX/default/Configuration_adv.h | 4 ++ .../examples/BQ/Hephestos/Configuration_adv.h | 4 ++ .../BQ/Hephestos_2/Configuration_adv.h | 4 ++ .../examples/BQ/WITBOX/Configuration_adv.h | 4 ++ .../examples/Cartesio/Configuration_adv.h | 4 ++ .../Creality/CR-10/Configuration_adv.h | 4 ++ .../Creality/CR-10S/Configuration_adv.h | 4 ++ .../Creality/CR-10mini/Configuration_adv.h | 4 ++ .../Creality/CR-8/Configuration_adv.h | 4 ++ .../Creality/Ender-2/Configuration_adv.h | 4 ++ .../Creality/Ender-3/Configuration_adv.h | 4 ++ .../Creality/Ender-4/Configuration_adv.h | 4 ++ .../examples/Einstart-S/Configuration_adv.h | 4 ++ .../config/examples/Felix/Configuration_adv.h | 4 ++ .../FolgerTech/i3-2020/Configuration_adv.h | 4 ++ .../Formbot/Raptor/Configuration_adv.h | 4 ++ .../Formbot/T_Rex_2+/Configuration_adv.h | 4 ++ .../Formbot/T_Rex_3/Configuration_adv.h | 4 ++ .../Geeetech/MeCreator2/Configuration_adv.h | 4 ++ .../Prusa i3 Pro C/Configuration_adv.h | 4 ++ .../Prusa i3 Pro W/Configuration_adv.h | 4 ++ .../Infitary/i3-M508/Configuration_adv.h | 4 ++ .../examples/JGAurora/A5/Configuration_adv.h | 4 ++ .../examples/MakerParts/Configuration_adv.h | 4 ++ .../examples/Malyan/M150/Configuration_adv.h | 4 ++ .../examples/Malyan/M200/Configuration_adv.h | 4 ++ .../Micromake/C1/enhanced/Configuration_adv.h | 4 ++ .../examples/Mks/Sbase/Configuration_adv.h | 4 ++ .../examples/RigidBot/Configuration_adv.h | 4 ++ .../config/examples/SCARA/Configuration_adv.h | 4 ++ .../examples/Sanguinololu/Configuration_adv.h | 4 ++ .../examples/TheBorg/Configuration_adv.h | 4 ++ .../examples/TinyBoy2/Configuration_adv.h | 4 ++ .../examples/Tronxy/X3A/Configuration_adv.h | 4 ++ .../UltiMachine/Archim1/Configuration_adv.h | 4 ++ .../UltiMachine/Archim2/Configuration_adv.h | 4 ++ .../Velleman/K8200/Configuration_adv.h | 4 ++ .../Velleman/K8400/Configuration_adv.h | 4 ++ .../Wanhao/Duplicator 6/Configuration_adv.h | 4 ++ .../delta/Anycubic/Kossel/Configuration_adv.h | 4 ++ .../FLSUN/auto_calibrate/Configuration_adv.h | 4 ++ .../delta/FLSUN/kossel/Configuration_adv.h | 4 ++ .../FLSUN/kossel_mini/Configuration_adv.h | 4 ++ .../Geeetech/Rostock 301/Configuration_adv.h | 4 ++ .../Tevo Little Monster/Configuration_adv.h | 4 ++ .../delta/generic/Configuration_adv.h | 4 ++ .../delta/kossel_mini/Configuration_adv.h | 4 ++ .../delta/kossel_xl/Configuration_adv.h | 4 ++ .../gCreate/gMax1.5+/Configuration_adv.h | 4 ++ .../examples/makibox/Configuration_adv.h | 4 ++ .../tvrrug/Round2/Configuration_adv.h | 4 ++ .../config/examples/wt150/Configuration_adv.h | 4 ++ Marlin/src/core/utility.h | 10 +++++ Marlin/src/feature/bedlevel/ubl/ubl.cpp | 8 ++-- Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp | 44 +++++++++---------- Marlin/src/gcode/calibrate/M100.cpp | 6 +-- 65 files changed, 283 insertions(+), 29 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 0ee9c854e..5a97ba436 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -1049,6 +1049,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** diff --git a/Marlin/src/config/default/Configuration_adv.h b/Marlin/src/config/default/Configuration_adv.h index 0ee9c854e..5a97ba436 100755 --- a/Marlin/src/config/default/Configuration_adv.h +++ b/Marlin/src/config/default/Configuration_adv.h @@ -1049,6 +1049,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** diff --git a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h index 54824f627..78ac7c1a0 100644 --- a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h +++ b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h @@ -1048,6 +1048,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** diff --git a/Marlin/src/config/examples/Anet/A2/Configuration_adv.h b/Marlin/src/config/examples/Anet/A2/Configuration_adv.h index 023994790..f32008ed7 100644 --- a/Marlin/src/config/examples/Anet/A2/Configuration_adv.h +++ b/Marlin/src/config/examples/Anet/A2/Configuration_adv.h @@ -1048,6 +1048,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** diff --git a/Marlin/src/config/examples/Anet/A2plus/Configuration_adv.h b/Marlin/src/config/examples/Anet/A2plus/Configuration_adv.h index 023994790..f32008ed7 100644 --- a/Marlin/src/config/examples/Anet/A2plus/Configuration_adv.h +++ b/Marlin/src/config/examples/Anet/A2plus/Configuration_adv.h @@ -1048,6 +1048,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** diff --git a/Marlin/src/config/examples/Anet/A6/Configuration_adv.h b/Marlin/src/config/examples/Anet/A6/Configuration_adv.h index 6a409bde9..700ee7b98 100644 --- a/Marlin/src/config/examples/Anet/A6/Configuration_adv.h +++ b/Marlin/src/config/examples/Anet/A6/Configuration_adv.h @@ -1047,6 +1047,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** diff --git a/Marlin/src/config/examples/Anet/A8/Configuration_adv.h b/Marlin/src/config/examples/Anet/A8/Configuration_adv.h index 4112b095d..291fc18fb 100644 --- a/Marlin/src/config/examples/Anet/A8/Configuration_adv.h +++ b/Marlin/src/config/examples/Anet/A8/Configuration_adv.h @@ -1048,6 +1048,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** diff --git a/Marlin/src/config/examples/ArmEd/Configuration_adv.h b/Marlin/src/config/examples/ArmEd/Configuration_adv.h index fadfb2410..403545448 100644 --- a/Marlin/src/config/examples/ArmEd/Configuration_adv.h +++ b/Marlin/src/config/examples/ArmEd/Configuration_adv.h @@ -1021,6 +1021,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** diff --git a/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h b/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h index 972833df1..11ccd5783 100644 --- a/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h +++ b/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h @@ -1047,6 +1047,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** diff --git a/Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h b/Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h index 2beff941b..0375fd4e8 100644 --- a/Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h +++ b/Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h @@ -1048,6 +1048,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** diff --git a/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h b/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h index 0d12cf960..1d70bc6ea 100644 --- a/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h @@ -1048,6 +1048,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** 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 80166dab3..8b122a3f5 100644 --- a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h @@ -1056,6 +1056,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. #define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** diff --git a/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h b/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h index 0d12cf960..1d70bc6ea 100644 --- a/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h @@ -1048,6 +1048,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** diff --git a/Marlin/src/config/examples/Cartesio/Configuration_adv.h b/Marlin/src/config/examples/Cartesio/Configuration_adv.h index 44c60d31e..dee756e19 100644 --- a/Marlin/src/config/examples/Cartesio/Configuration_adv.h +++ b/Marlin/src/config/examples/Cartesio/Configuration_adv.h @@ -1048,6 +1048,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** 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 2159fab01..30bfab551 100755 --- a/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h @@ -1048,6 +1048,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** diff --git a/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h b/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h index 3efbde50f..9d026abf4 100644 --- a/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h @@ -1048,6 +1048,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. #define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** diff --git a/Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h b/Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h index e083d95a4..ea2c27e6d 100644 --- a/Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h @@ -1048,6 +1048,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** diff --git a/Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h b/Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h index 5d91d855e..ac0309aaf 100644 --- a/Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h @@ -1048,6 +1048,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** diff --git a/Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h b/Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h index 89ffa9ae4..347397a86 100644 --- a/Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h @@ -1048,6 +1048,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** diff --git a/Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h b/Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h index 6a078af8f..463474cfe 100644 --- a/Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h @@ -1048,6 +1048,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** diff --git a/Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h b/Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h index 6443c0ad3..c0154c98e 100644 --- a/Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h @@ -1048,6 +1048,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** diff --git a/Marlin/src/config/examples/Einstart-S/Configuration_adv.h b/Marlin/src/config/examples/Einstart-S/Configuration_adv.h index 721632634..23e58f7af 100644 --- a/Marlin/src/config/examples/Einstart-S/Configuration_adv.h +++ b/Marlin/src/config/examples/Einstart-S/Configuration_adv.h @@ -1048,6 +1048,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** diff --git a/Marlin/src/config/examples/Felix/Configuration_adv.h b/Marlin/src/config/examples/Felix/Configuration_adv.h index ea7d191d7..e5e64dfc2 100644 --- a/Marlin/src/config/examples/Felix/Configuration_adv.h +++ b/Marlin/src/config/examples/Felix/Configuration_adv.h @@ -1048,6 +1048,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** diff --git a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h index 68229ec7a..74703ef42 100644 --- a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h +++ b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h @@ -1048,6 +1048,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** diff --git a/Marlin/src/config/examples/Formbot/Raptor/Configuration_adv.h b/Marlin/src/config/examples/Formbot/Raptor/Configuration_adv.h index 9cedd8215..b15520503 100644 --- a/Marlin/src/config/examples/Formbot/Raptor/Configuration_adv.h +++ b/Marlin/src/config/examples/Formbot/Raptor/Configuration_adv.h @@ -1050,6 +1050,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. #define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** diff --git a/Marlin/src/config/examples/Formbot/T_Rex_2+/Configuration_adv.h b/Marlin/src/config/examples/Formbot/T_Rex_2+/Configuration_adv.h index 34d95af95..8b20f4af2 100644 --- a/Marlin/src/config/examples/Formbot/T_Rex_2+/Configuration_adv.h +++ b/Marlin/src/config/examples/Formbot/T_Rex_2+/Configuration_adv.h @@ -1053,6 +1053,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** diff --git a/Marlin/src/config/examples/Formbot/T_Rex_3/Configuration_adv.h b/Marlin/src/config/examples/Formbot/T_Rex_3/Configuration_adv.h index a8e0f0f79..405df3e04 100644 --- a/Marlin/src/config/examples/Formbot/T_Rex_3/Configuration_adv.h +++ b/Marlin/src/config/examples/Formbot/T_Rex_3/Configuration_adv.h @@ -1053,6 +1053,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** diff --git a/Marlin/src/config/examples/Geeetech/MeCreator2/Configuration_adv.h b/Marlin/src/config/examples/Geeetech/MeCreator2/Configuration_adv.h index e126a7373..1b9056efd 100644 --- a/Marlin/src/config/examples/Geeetech/MeCreator2/Configuration_adv.h +++ b/Marlin/src/config/examples/Geeetech/MeCreator2/Configuration_adv.h @@ -1049,6 +1049,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** diff --git a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h index 45760e53d..a829dab2b 100644 --- a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h +++ b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h @@ -1048,6 +1048,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** diff --git a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h index 45760e53d..a829dab2b 100644 --- a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h +++ b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h @@ -1048,6 +1048,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** 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 5a1af5472..b6c27d460 100644 --- a/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h +++ b/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h @@ -1048,6 +1048,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** diff --git a/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h b/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h index 9b1e77b3f..117a8ad5c 100644 --- a/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h +++ b/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h @@ -1048,6 +1048,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** diff --git a/Marlin/src/config/examples/MakerParts/Configuration_adv.h b/Marlin/src/config/examples/MakerParts/Configuration_adv.h index a61dad124..bab00ac19 100644 --- a/Marlin/src/config/examples/MakerParts/Configuration_adv.h +++ b/Marlin/src/config/examples/MakerParts/Configuration_adv.h @@ -1048,6 +1048,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** diff --git a/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h b/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h index e00411671..44994bb8d 100644 --- a/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h +++ b/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h @@ -1048,6 +1048,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** diff --git a/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h b/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h index 43ef9baa2..4fbee1b0e 100644 --- a/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h +++ b/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h @@ -1048,6 +1048,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** diff --git a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h index c52576d86..f2c043fb4 100644 --- a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h +++ b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h @@ -1048,6 +1048,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** diff --git a/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h b/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h index 52ce76c2e..5da77c21f 100644 --- a/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h +++ b/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h @@ -1056,6 +1056,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** diff --git a/Marlin/src/config/examples/RigidBot/Configuration_adv.h b/Marlin/src/config/examples/RigidBot/Configuration_adv.h index bbffe91bf..2a4ca5bf8 100644 --- a/Marlin/src/config/examples/RigidBot/Configuration_adv.h +++ b/Marlin/src/config/examples/RigidBot/Configuration_adv.h @@ -1048,6 +1048,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** diff --git a/Marlin/src/config/examples/SCARA/Configuration_adv.h b/Marlin/src/config/examples/SCARA/Configuration_adv.h index 69e626a4c..dbf24ccd0 100644 --- a/Marlin/src/config/examples/SCARA/Configuration_adv.h +++ b/Marlin/src/config/examples/SCARA/Configuration_adv.h @@ -1048,6 +1048,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** diff --git a/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h b/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h index dbb6e35a2..fb9f8fd27 100644 --- a/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h +++ b/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h @@ -1048,6 +1048,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** diff --git a/Marlin/src/config/examples/TheBorg/Configuration_adv.h b/Marlin/src/config/examples/TheBorg/Configuration_adv.h index 3edd7a091..8f5cf05c0 100644 --- a/Marlin/src/config/examples/TheBorg/Configuration_adv.h +++ b/Marlin/src/config/examples/TheBorg/Configuration_adv.h @@ -1048,6 +1048,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** diff --git a/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h b/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h index 0ba72fcf8..ab0b39ef6 100644 --- a/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h +++ b/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h @@ -1048,6 +1048,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** diff --git a/Marlin/src/config/examples/Tronxy/X3A/Configuration_adv.h b/Marlin/src/config/examples/Tronxy/X3A/Configuration_adv.h index 275daa415..d60b06148 100644 --- a/Marlin/src/config/examples/Tronxy/X3A/Configuration_adv.h +++ b/Marlin/src/config/examples/Tronxy/X3A/Configuration_adv.h @@ -1048,6 +1048,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** diff --git a/Marlin/src/config/examples/UltiMachine/Archim1/Configuration_adv.h b/Marlin/src/config/examples/UltiMachine/Archim1/Configuration_adv.h index 3c4134cc6..c2fe57b56 100644 --- a/Marlin/src/config/examples/UltiMachine/Archim1/Configuration_adv.h +++ b/Marlin/src/config/examples/UltiMachine/Archim1/Configuration_adv.h @@ -1049,6 +1049,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** diff --git a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h index 17cbf3a57..b41a354d8 100644 --- a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h +++ b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h @@ -1048,6 +1048,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** diff --git a/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h b/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h index 0616319a3..9ef5a7eaa 100644 --- a/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h +++ b/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h @@ -1061,6 +1061,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** diff --git a/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h b/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h index 282fc4061..b9dda373f 100644 --- a/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h +++ b/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h @@ -1048,6 +1048,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** diff --git a/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h b/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h index 058803b21..c73089f57 100644 --- a/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h +++ b/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h @@ -1050,6 +1050,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** diff --git a/Marlin/src/config/examples/delta/Anycubic/Kossel/Configuration_adv.h b/Marlin/src/config/examples/delta/Anycubic/Kossel/Configuration_adv.h index de38bdbc9..a3a94bcc9 100644 --- a/Marlin/src/config/examples/delta/Anycubic/Kossel/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/Anycubic/Kossel/Configuration_adv.h @@ -1050,6 +1050,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** 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 92dbc4998..e83701a0e 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 @@ -1050,6 +1050,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h b/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h index 92dbc4998..e83701a0e 100644 --- a/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h @@ -1050,6 +1050,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** 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 e28e67dda..44592f561 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 @@ -1050,6 +1050,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** diff --git a/Marlin/src/config/examples/delta/Geeetech/Rostock 301/Configuration_adv.h b/Marlin/src/config/examples/delta/Geeetech/Rostock 301/Configuration_adv.h index 773582e80..67805e300 100644 --- a/Marlin/src/config/examples/delta/Geeetech/Rostock 301/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/Geeetech/Rostock 301/Configuration_adv.h @@ -1050,6 +1050,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** diff --git a/Marlin/src/config/examples/delta/Tevo Little Monster/Configuration_adv.h b/Marlin/src/config/examples/delta/Tevo Little Monster/Configuration_adv.h index 4bbf8210e..c3cc903b1 100644 --- a/Marlin/src/config/examples/delta/Tevo Little Monster/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/Tevo Little Monster/Configuration_adv.h @@ -1050,6 +1050,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** diff --git a/Marlin/src/config/examples/delta/generic/Configuration_adv.h b/Marlin/src/config/examples/delta/generic/Configuration_adv.h index e28e67dda..44592f561 100644 --- a/Marlin/src/config/examples/delta/generic/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/generic/Configuration_adv.h @@ -1050,6 +1050,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** 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 e28e67dda..44592f561 100644 --- a/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h @@ -1050,6 +1050,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** 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 4eefea7cc..5551a6b2a 100644 --- a/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h @@ -1050,6 +1050,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** 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 e4a526f73..daaac68ce 100644 --- a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h +++ b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h @@ -1048,6 +1048,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** diff --git a/Marlin/src/config/examples/makibox/Configuration_adv.h b/Marlin/src/config/examples/makibox/Configuration_adv.h index 53a9ca9c6..07d1877f4 100644 --- a/Marlin/src/config/examples/makibox/Configuration_adv.h +++ b/Marlin/src/config/examples/makibox/Configuration_adv.h @@ -1048,6 +1048,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** diff --git a/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h b/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h index 887bce5b9..58d1c38f1 100644 --- a/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h @@ -1048,6 +1048,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** diff --git a/Marlin/src/config/examples/wt150/Configuration_adv.h b/Marlin/src/config/examples/wt150/Configuration_adv.h index b9db322e2..5f275e9f9 100644 --- a/Marlin/src/config/examples/wt150/Configuration_adv.h +++ b/Marlin/src/config/examples/wt150/Configuration_adv.h @@ -1049,6 +1049,10 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + // @section extras /** diff --git a/Marlin/src/core/utility.h b/Marlin/src/core/utility.h index 324028a96..da3a065ea 100644 --- a/Marlin/src/core/utility.h +++ b/Marlin/src/core/utility.h @@ -25,8 +25,18 @@ constexpr char axis_codes[XYZE] = { 'X', 'Y', 'Z', 'E' }; +// Delay that ensures heaters and watchdog are kept alive void safe_delay(millis_t ms); +// A delay to provide brittle hosts time to receive bytes +inline void serial_delay(const millis_t ms) { + #if ENABLED(SERIAL_OVERRUN_PROTECTION) + safe_delay(ms); + #else + UNUSED(ms); + #endif +} + #if ENABLED(EEPROM_SETTINGS) || ENABLED(SD_FIRMWARE_UPDATE) void crc16(uint16_t *crc, const void * const data, uint16_t cnt); #endif diff --git a/Marlin/src/feature/bedlevel/ubl/ubl.cpp b/Marlin/src/feature/bedlevel/ubl/ubl.cpp index c5ff87466..8178ee132 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl.cpp +++ b/Marlin/src/feature/bedlevel/ubl/ubl.cpp @@ -59,7 +59,7 @@ SERIAL_ECHOPGM_P(port, " Z"); SERIAL_ECHO_F_P(port, z_values[x][y], 2); SERIAL_EOL_P(port); - safe_delay(75); // Prevent Printrun from exploding + serial_delay(75); // Prevent Printrun from exploding } } @@ -76,7 +76,7 @@ SERIAL_PROTOCOLPGM_P(port, " System v" UBL_VERSION " "); if (!planner.leveling_active) SERIAL_PROTOCOLPGM_P(port, "in"); SERIAL_PROTOCOLLNPGM_P(port, "active."); - safe_delay(50); + serial_delay(50); } #if ENABLED(UBL_DEVEL_DEBUGGING) @@ -173,7 +173,7 @@ if (y < 100) { SERIAL_CHAR(' '); if (y < 10) SERIAL_CHAR(' '); } SERIAL_ECHO(y); SERIAL_CHAR(')'); - safe_delay(5); + serial_delay(5); } static void serial_echo_column_labels(const uint8_t sp) { @@ -183,7 +183,7 @@ SERIAL_ECHO(i); SERIAL_ECHO_SP(sp); } - safe_delay(10); + serial_delay(10); } /** diff --git a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp index 3e03dd0fd..11aec9345 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp +++ b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp @@ -780,7 +780,7 @@ } } } - safe_delay(15); + serial_delay(15); return false; } @@ -999,13 +999,13 @@ SERIAL_FLUSH(); // Prevent host M105 buffer overrun. } while (!ui.button_pressed()); - if (!lcd_map_control) ui.return_to_status(); // Just editing a single point? Return to status + if (!lcd_map_control) ui.return_to_status(); // Just editing a single point? Return to status if (click_and_hold(abort_fine_tune)) goto FINE_TUNE_EXIT; // If the click is held down, abort editing z_values[location.x_index][location.y_index] = new_z; // Save the updated Z value - safe_delay(20); // No switch noise + serial_delay(20); // No switch noise ui.refresh(); } while (location.x_index >= 0 && --g29_repetition_cnt > 0); @@ -1509,7 +1509,7 @@ SERIAL_PROTOCOLCHAR(','); SERIAL_PROTOCOL_F(z_tmp, 7); SERIAL_ECHOPGM("] ---> "); - safe_delay(20); + serial_delay(20); } #endif @@ -1524,7 +1524,7 @@ SERIAL_PROTOCOLCHAR(','); SERIAL_PROTOCOL_F(z_tmp, 7); SERIAL_ECHOLNPGM("]"); - safe_delay(55); + serial_delay(55); } #endif @@ -1542,7 +1542,7 @@ SERIAL_ECHOPGM(" D="); SERIAL_PROTOCOL_F(lsf_results.D, 7); SERIAL_EOL(); - safe_delay(55); + serial_delay(55); SERIAL_ECHOPGM("bed plane normal = ["); SERIAL_PROTOCOL_F(normal.x, 7); @@ -1681,7 +1681,7 @@ SERIAL_PROTOCOLPGM(" Loaded."); } SERIAL_EOL(); - safe_delay(50); + serial_delay(50); #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) SERIAL_PROTOCOLPGM("planner.z_fade_height : "); @@ -1697,20 +1697,20 @@ SERIAL_EOL(); #endif - SERIAL_ECHOLNPAIR("MESH_MIN_X " STRINGIFY(MESH_MIN_X) "=", MESH_MIN_X); safe_delay(50); - SERIAL_ECHOLNPAIR("MESH_MIN_Y " STRINGIFY(MESH_MIN_Y) "=", MESH_MIN_Y); safe_delay(50); - SERIAL_ECHOLNPAIR("MESH_MAX_X " STRINGIFY(MESH_MAX_X) "=", MESH_MAX_X); safe_delay(50); - SERIAL_ECHOLNPAIR("MESH_MAX_Y " STRINGIFY(MESH_MAX_Y) "=", MESH_MAX_Y); safe_delay(50); - SERIAL_ECHOLNPAIR("GRID_MAX_POINTS_X ", GRID_MAX_POINTS_X); safe_delay(50); - SERIAL_ECHOLNPAIR("GRID_MAX_POINTS_Y ", GRID_MAX_POINTS_Y); safe_delay(50); + SERIAL_ECHOLNPAIR("MESH_MIN_X " STRINGIFY(MESH_MIN_X) "=", MESH_MIN_X); serial_delay(50); + SERIAL_ECHOLNPAIR("MESH_MIN_Y " STRINGIFY(MESH_MIN_Y) "=", MESH_MIN_Y); serial_delay(50); + SERIAL_ECHOLNPAIR("MESH_MAX_X " STRINGIFY(MESH_MAX_X) "=", MESH_MAX_X); serial_delay(50); + SERIAL_ECHOLNPAIR("MESH_MAX_Y " STRINGIFY(MESH_MAX_Y) "=", MESH_MAX_Y); serial_delay(50); + SERIAL_ECHOLNPAIR("GRID_MAX_POINTS_X ", GRID_MAX_POINTS_X); serial_delay(50); + SERIAL_ECHOLNPAIR("GRID_MAX_POINTS_Y ", GRID_MAX_POINTS_Y); serial_delay(50); SERIAL_ECHOLNPAIR("MESH_X_DIST ", MESH_X_DIST); - SERIAL_ECHOLNPAIR("MESH_Y_DIST ", MESH_Y_DIST); safe_delay(50); + SERIAL_ECHOLNPAIR("MESH_Y_DIST ", MESH_Y_DIST); serial_delay(50); SERIAL_PROTOCOLPGM("X-Axis Mesh Points at: "); for (uint8_t i = 0; i < GRID_MAX_POINTS_X; i++) { SERIAL_PROTOCOL_F(LOGICAL_X_POSITION(mesh_index_to_xpos(i)), 3); SERIAL_PROTOCOLPGM(" "); - safe_delay(25); + serial_delay(25); } SERIAL_EOL(); @@ -1718,7 +1718,7 @@ for (uint8_t i = 0; i < GRID_MAX_POINTS_Y; i++) { SERIAL_PROTOCOL_F(LOGICAL_Y_POSITION(mesh_index_to_ypos(i)), 3); SERIAL_PROTOCOLPGM(" "); - safe_delay(25); + serial_delay(25); } SERIAL_EOL(); @@ -1727,27 +1727,27 @@ SERIAL_PROTOCOLLNPAIR(" state:", READ(KILL_PIN)); #endif SERIAL_EOL(); - safe_delay(50); + serial_delay(50); #if ENABLED(UBL_DEVEL_DEBUGGING) SERIAL_PROTOCOLLNPAIR("ubl_state_at_invocation :", ubl_state_at_invocation); SERIAL_EOL(); SERIAL_PROTOCOLLNPAIR("ubl_state_recursion_chk :", ubl_state_recursion_chk); SERIAL_EOL(); - safe_delay(50); + serial_delay(50); SERIAL_PROTOCOLPAIR("Meshes go from ", hex_address((void*)settings.meshes_start_index())); SERIAL_PROTOCOLLNPAIR(" to ", hex_address((void*)settings.meshes_end_index())); - safe_delay(50); + serial_delay(50); SERIAL_PROTOCOLLNPAIR("sizeof(ubl) : ", (int)sizeof(ubl)); SERIAL_EOL(); SERIAL_PROTOCOLLNPAIR("z_value[][] size: ", (int)sizeof(z_values)); SERIAL_EOL(); - safe_delay(25); + serial_delay(25); SERIAL_PROTOCOLLNPAIR("EEPROM free for UBL: ", hex_address((void*)(settings.meshes_end_index() - settings.meshes_start_index()))); - safe_delay(50); + serial_delay(50); SERIAL_PROTOCOLPAIR("EEPROM can hold ", settings.calc_num_meshes()); SERIAL_PROTOCOLLNPGM(" meshes.\n"); - safe_delay(25); + serial_delay(25); #endif // UBL_DEVEL_DEBUGGING if (!sanity_check()) { diff --git a/Marlin/src/gcode/calibrate/M100.cpp b/Marlin/src/gcode/calibrate/M100.cpp index e24c2c23d..075004b01 100644 --- a/Marlin/src/gcode/calibrate/M100.cpp +++ b/Marlin/src/gcode/calibrate/M100.cpp @@ -117,7 +117,7 @@ inline int32_t count_test_bytes(const char * const ptr) { print_hex_byte(ptr[i]); SERIAL_CHAR(' '); } - safe_delay(25); + serial_delay(25); SERIAL_CHAR('|'); // Point out non test bytes for (uint8_t i = 0; i < 16; i++) { char ccc = (char)ptr[i]; // cast to char before automatically casting to char on assignment, in case the compiler is broken @@ -131,7 +131,7 @@ inline int32_t count_test_bytes(const char * const ptr) { } SERIAL_EOL(); ptr += 16; - safe_delay(25); + serial_delay(25); idle(); } } @@ -170,7 +170,7 @@ inline int check_for_free_memory_corruption(PGM_P const title) { // safe_delay(20); // boards. // while ( !READ(63)) // idle(); - safe_delay(20); + serial_delay(20); #if ENABLED(M100_FREE_MEMORY_DUMPER) M100_dump_routine(PSTR(" Memory corruption detected with sp