From 6faa93d787d16d2ec545cb9126ca281df4533cc0 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 19 Apr 2018 19:23:08 -0500 Subject: [PATCH] Add G29_RETRY_AND_RECOVER to example configs --- .../AlephObjects/TAZ4/Configuration_adv.h | 24 +++++++++++++++++++ .../examples/Anet/A6/Configuration_adv.h | 24 +++++++++++++++++++ .../examples/Anet/A8/Configuration_adv.h | 24 +++++++++++++++++++ .../examples/Azteeg/X5GT/Configuration_adv.h | 24 +++++++++++++++++++ .../BIBO/TouchX/cyclops/Configuration_adv.h | 24 +++++++++++++++++++ .../BIBO/TouchX/default/Configuration_adv.h | 24 +++++++++++++++++++ .../examples/BQ/Hephestos/Configuration_adv.h | 24 +++++++++++++++++++ .../BQ/Hephestos_2/Configuration_adv.h | 24 +++++++++++++++++++ .../examples/BQ/WITBOX/Configuration_adv.h | 24 +++++++++++++++++++ .../examples/Cartesio/Configuration_adv.h | 24 +++++++++++++++++++ .../Creality/CR-10/Configuration_adv.h | 24 +++++++++++++++++++ .../Creality/CR-10S/Configuration_adv.h | 24 +++++++++++++++++++ .../Creality/CR-10mini/Configuration_adv.h | 24 +++++++++++++++++++ .../Creality/CR-8/Configuration_adv.h | 24 +++++++++++++++++++ .../Creality/Ender-2/Configuration_adv.h | 24 +++++++++++++++++++ .../Creality/Ender-4/Configuration_adv.h | 24 +++++++++++++++++++ .../config/examples/Felix/Configuration_adv.h | 24 +++++++++++++++++++ .../FolgerTech/i3-2020/Configuration_adv.h | 24 +++++++++++++++++++ .../Infitary/i3-M508/Configuration_adv.h | 24 +++++++++++++++++++ .../examples/JGAurora/A5/Configuration_adv.h | 24 +++++++++++++++++++ .../examples/MakerParts/Configuration_adv.h | 24 +++++++++++++++++++ .../examples/Malyan/M150/Configuration_adv.h | 24 +++++++++++++++++++ .../examples/Malyan/M200/Configuration_adv.h | 24 +++++++++++++++++++ .../Micromake/C1/enhanced/Configuration_adv.h | 24 +++++++++++++++++++ .../examples/Mks/Sbase/Configuration_adv.h | 24 +++++++++++++++++++ .../examples/RigidBot/Configuration_adv.h | 24 +++++++++++++++++++ .../config/examples/SCARA/Configuration_adv.h | 24 +++++++++++++++++++ .../examples/Sanguinololu/Configuration_adv.h | 24 +++++++++++++++++++ .../examples/TheBorg/Configuration_adv.h | 24 +++++++++++++++++++ .../examples/TinyBoy2/Configuration_adv.h | 24 +++++++++++++++++++ .../UltiMachine/Archim2/Configuration_adv.h | 24 +++++++++++++++++++ .../Velleman/K8200/Configuration_adv.h | 24 +++++++++++++++++++ .../Velleman/K8400/Configuration_adv.h | 24 +++++++++++++++++++ .../Wanhao/Duplicator 6/Configuration_adv.h | 24 +++++++++++++++++++ .../FLSUN/auto_calibrate/Configuration_adv.h | 24 +++++++++++++++++++ .../delta/FLSUN/kossel/Configuration_adv.h | 24 +++++++++++++++++++ .../FLSUN/kossel_mini/Configuration_adv.h | 24 +++++++++++++++++++ .../delta/generic/Configuration_adv.h | 24 +++++++++++++++++++ .../delta/kossel_mini/Configuration_adv.h | 24 +++++++++++++++++++ .../delta/kossel_pro/Configuration_adv.h | 24 +++++++++++++++++++ .../delta/kossel_xl/Configuration_adv.h | 24 +++++++++++++++++++ .../gCreate/gMax1.5+/Configuration_adv.h | 24 +++++++++++++++++++ .../examples/makibox/Configuration_adv.h | 24 +++++++++++++++++++ .../tvrrug/Round2/Configuration_adv.h | 24 +++++++++++++++++++ .../config/examples/wt150/Configuration_adv.h | 24 +++++++++++++++++++ 45 files changed, 1080 insertions(+) diff --git a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h index 6468fecdbd..6acdde3da8 100644 --- a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h +++ b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h @@ -746,6 +746,30 @@ //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) #endif +/** + * Repeatedly attempt G29 leveling until it succeeds. + * Stop after G29_MAX_RETRIES attempts. + */ +//#define G29_RETRY_AND_RECOVER +#if ENABLED(G29_RETRY_AND_RECOVER) + #define G29_MAX_RETRIES 3 + #define G29_HALT_ON_FAILURE + /** + * Specify the GCODE commands that will be executed when leveling succeeds, + * between attempts, and after the maximum number of retries have been tried. + */ + #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." + #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" + #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1" + /** + * Specify an action command to send to the host on a recovery attempt or failure. + * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. + * The host must be configured to handle the action command. + */ + #define G29_ACTION_ON_RECOVER "probe_rewipe" + #define G29_ACTION_ON_FAILURE "probe_failed" +#endif + // @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 3c583e99a6..2634b8c5d9 100644 --- a/Marlin/src/config/examples/Anet/A6/Configuration_adv.h +++ b/Marlin/src/config/examples/Anet/A6/Configuration_adv.h @@ -746,6 +746,30 @@ //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) #endif +/** + * Repeatedly attempt G29 leveling until it succeeds. + * Stop after G29_MAX_RETRIES attempts. + */ +//#define G29_RETRY_AND_RECOVER +#if ENABLED(G29_RETRY_AND_RECOVER) + #define G29_MAX_RETRIES 3 + #define G29_HALT_ON_FAILURE + /** + * Specify the GCODE commands that will be executed when leveling succeeds, + * between attempts, and after the maximum number of retries have been tried. + */ + #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." + #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" + #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1" + /** + * Specify an action command to send to the host on a recovery attempt or failure. + * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. + * The host must be configured to handle the action command. + */ + #define G29_ACTION_ON_RECOVER "probe_rewipe" + #define G29_ACTION_ON_FAILURE "probe_failed" +#endif + // @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 a956ed5578..ad00302991 100644 --- a/Marlin/src/config/examples/Anet/A8/Configuration_adv.h +++ b/Marlin/src/config/examples/Anet/A8/Configuration_adv.h @@ -746,6 +746,30 @@ //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) #endif +/** + * Repeatedly attempt G29 leveling until it succeeds. + * Stop after G29_MAX_RETRIES attempts. + */ +//#define G29_RETRY_AND_RECOVER +#if ENABLED(G29_RETRY_AND_RECOVER) + #define G29_MAX_RETRIES 3 + #define G29_HALT_ON_FAILURE + /** + * Specify the GCODE commands that will be executed when leveling succeeds, + * between attempts, and after the maximum number of retries have been tried. + */ + #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." + #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" + #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1" + /** + * Specify an action command to send to the host on a recovery attempt or failure. + * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. + * The host must be configured to handle the action command. + */ + #define G29_ACTION_ON_RECOVER "probe_rewipe" + #define G29_ACTION_ON_FAILURE "probe_failed" +#endif + // @section extras // diff --git a/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h b/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h index 7aab802c54..1cc2bdc4ec 100644 --- a/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h +++ b/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h @@ -746,6 +746,30 @@ //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) #endif +/** + * Repeatedly attempt G29 leveling until it succeeds. + * Stop after G29_MAX_RETRIES attempts. + */ +//#define G29_RETRY_AND_RECOVER +#if ENABLED(G29_RETRY_AND_RECOVER) + #define G29_MAX_RETRIES 3 + #define G29_HALT_ON_FAILURE + /** + * Specify the GCODE commands that will be executed when leveling succeeds, + * between attempts, and after the maximum number of retries have been tried. + */ + #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." + #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" + #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1" + /** + * Specify an action command to send to the host on a recovery attempt or failure. + * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. + * The host must be configured to handle the action command. + */ + #define G29_ACTION_ON_RECOVER "probe_rewipe" + #define G29_ACTION_ON_FAILURE "probe_failed" +#endif + // @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 feb4e1afe5..6269446a6b 100644 --- a/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h +++ b/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h @@ -746,6 +746,30 @@ //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) #endif +/** + * Repeatedly attempt G29 leveling until it succeeds. + * Stop after G29_MAX_RETRIES attempts. + */ +//#define G29_RETRY_AND_RECOVER +#if ENABLED(G29_RETRY_AND_RECOVER) + #define G29_MAX_RETRIES 3 + #define G29_HALT_ON_FAILURE + /** + * Specify the GCODE commands that will be executed when leveling succeeds, + * between attempts, and after the maximum number of retries have been tried. + */ + #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." + #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" + #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1" + /** + * Specify an action command to send to the host on a recovery attempt or failure. + * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. + * The host must be configured to handle the action command. + */ + #define G29_ACTION_ON_RECOVER "probe_rewipe" + #define G29_ACTION_ON_FAILURE "probe_failed" +#endif + // @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 faf55b9b5b..a9e198fc6d 100644 --- a/Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h +++ b/Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h @@ -746,6 +746,30 @@ //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) #endif +/** + * Repeatedly attempt G29 leveling until it succeeds. + * Stop after G29_MAX_RETRIES attempts. + */ +//#define G29_RETRY_AND_RECOVER +#if ENABLED(G29_RETRY_AND_RECOVER) + #define G29_MAX_RETRIES 3 + #define G29_HALT_ON_FAILURE + /** + * Specify the GCODE commands that will be executed when leveling succeeds, + * between attempts, and after the maximum number of retries have been tried. + */ + #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." + #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" + #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1" + /** + * Specify an action command to send to the host on a recovery attempt or failure. + * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. + * The host must be configured to handle the action command. + */ + #define G29_ACTION_ON_RECOVER "probe_rewipe" + #define G29_ACTION_ON_FAILURE "probe_failed" +#endif + // @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 40661a358f..13abc50004 100644 --- a/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h @@ -746,6 +746,30 @@ //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) #endif +/** + * Repeatedly attempt G29 leveling until it succeeds. + * Stop after G29_MAX_RETRIES attempts. + */ +//#define G29_RETRY_AND_RECOVER +#if ENABLED(G29_RETRY_AND_RECOVER) + #define G29_MAX_RETRIES 3 + #define G29_HALT_ON_FAILURE + /** + * Specify the GCODE commands that will be executed when leveling succeeds, + * between attempts, and after the maximum number of retries have been tried. + */ + #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." + #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" + #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1" + /** + * Specify an action command to send to the host on a recovery attempt or failure. + * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. + * The host must be configured to handle the action command. + */ + #define G29_ACTION_ON_RECOVER "probe_rewipe" + #define G29_ACTION_ON_FAILURE "probe_failed" +#endif + // @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 9cc2bf8747..e900d95896 100644 --- a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h @@ -746,6 +746,30 @@ //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) #endif +/** + * Repeatedly attempt G29 leveling until it succeeds. + * Stop after G29_MAX_RETRIES attempts. + */ +//#define G29_RETRY_AND_RECOVER +#if ENABLED(G29_RETRY_AND_RECOVER) + #define G29_MAX_RETRIES 3 + #define G29_HALT_ON_FAILURE + /** + * Specify the GCODE commands that will be executed when leveling succeeds, + * between attempts, and after the maximum number of retries have been tried. + */ + #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." + #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" + #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1" + /** + * Specify an action command to send to the host on a recovery attempt or failure. + * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. + * The host must be configured to handle the action command. + */ + #define G29_ACTION_ON_RECOVER "probe_rewipe" + #define G29_ACTION_ON_FAILURE "probe_failed" +#endif + // @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 40661a358f..13abc50004 100644 --- a/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h @@ -746,6 +746,30 @@ //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) #endif +/** + * Repeatedly attempt G29 leveling until it succeeds. + * Stop after G29_MAX_RETRIES attempts. + */ +//#define G29_RETRY_AND_RECOVER +#if ENABLED(G29_RETRY_AND_RECOVER) + #define G29_MAX_RETRIES 3 + #define G29_HALT_ON_FAILURE + /** + * Specify the GCODE commands that will be executed when leveling succeeds, + * between attempts, and after the maximum number of retries have been tried. + */ + #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." + #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" + #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1" + /** + * Specify an action command to send to the host on a recovery attempt or failure. + * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. + * The host must be configured to handle the action command. + */ + #define G29_ACTION_ON_RECOVER "probe_rewipe" + #define G29_ACTION_ON_FAILURE "probe_failed" +#endif + // @section extras // diff --git a/Marlin/src/config/examples/Cartesio/Configuration_adv.h b/Marlin/src/config/examples/Cartesio/Configuration_adv.h index d632feba0d..5f1461a1b3 100644 --- a/Marlin/src/config/examples/Cartesio/Configuration_adv.h +++ b/Marlin/src/config/examples/Cartesio/Configuration_adv.h @@ -746,6 +746,30 @@ //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) #endif +/** + * Repeatedly attempt G29 leveling until it succeeds. + * Stop after G29_MAX_RETRIES attempts. + */ +//#define G29_RETRY_AND_RECOVER +#if ENABLED(G29_RETRY_AND_RECOVER) + #define G29_MAX_RETRIES 3 + #define G29_HALT_ON_FAILURE + /** + * Specify the GCODE commands that will be executed when leveling succeeds, + * between attempts, and after the maximum number of retries have been tried. + */ + #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." + #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" + #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1" + /** + * Specify an action command to send to the host on a recovery attempt or failure. + * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. + * The host must be configured to handle the action command. + */ + #define G29_ACTION_ON_RECOVER "probe_rewipe" + #define G29_ACTION_ON_FAILURE "probe_failed" +#endif + // @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 45992cce41..6e97c0b835 100755 --- a/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h @@ -746,6 +746,30 @@ //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) #endif +/** + * Repeatedly attempt G29 leveling until it succeeds. + * Stop after G29_MAX_RETRIES attempts. + */ +//#define G29_RETRY_AND_RECOVER +#if ENABLED(G29_RETRY_AND_RECOVER) + #define G29_MAX_RETRIES 3 + #define G29_HALT_ON_FAILURE + /** + * Specify the GCODE commands that will be executed when leveling succeeds, + * between attempts, and after the maximum number of retries have been tried. + */ + #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." + #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" + #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1" + /** + * Specify an action command to send to the host on a recovery attempt or failure. + * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. + * The host must be configured to handle the action command. + */ + #define G29_ACTION_ON_RECOVER "probe_rewipe" + #define G29_ACTION_ON_FAILURE "probe_failed" +#endif + // @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 b8c1b5620f..b77f7cbbe6 100644 --- a/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h @@ -746,6 +746,30 @@ //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) #endif +/** + * Repeatedly attempt G29 leveling until it succeeds. + * Stop after G29_MAX_RETRIES attempts. + */ +//#define G29_RETRY_AND_RECOVER +#if ENABLED(G29_RETRY_AND_RECOVER) + #define G29_MAX_RETRIES 3 + #define G29_HALT_ON_FAILURE + /** + * Specify the GCODE commands that will be executed when leveling succeeds, + * between attempts, and after the maximum number of retries have been tried. + */ + #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." + #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" + #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1" + /** + * Specify an action command to send to the host on a recovery attempt or failure. + * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. + * The host must be configured to handle the action command. + */ + #define G29_ACTION_ON_RECOVER "probe_rewipe" + #define G29_ACTION_ON_FAILURE "probe_failed" +#endif + // @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 24aa8b1aea..4b461a812c 100644 --- a/Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h @@ -746,6 +746,30 @@ //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) #endif +/** + * Repeatedly attempt G29 leveling until it succeeds. + * Stop after G29_MAX_RETRIES attempts. + */ +//#define G29_RETRY_AND_RECOVER +#if ENABLED(G29_RETRY_AND_RECOVER) + #define G29_MAX_RETRIES 3 + #define G29_HALT_ON_FAILURE + /** + * Specify the GCODE commands that will be executed when leveling succeeds, + * between attempts, and after the maximum number of retries have been tried. + */ + #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." + #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" + #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1" + /** + * Specify an action command to send to the host on a recovery attempt or failure. + * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. + * The host must be configured to handle the action command. + */ + #define G29_ACTION_ON_RECOVER "probe_rewipe" + #define G29_ACTION_ON_FAILURE "probe_failed" +#endif + // @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 eb9818aeac..efe2a65dcf 100644 --- a/Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h @@ -746,6 +746,30 @@ //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) #endif +/** + * Repeatedly attempt G29 leveling until it succeeds. + * Stop after G29_MAX_RETRIES attempts. + */ +//#define G29_RETRY_AND_RECOVER +#if ENABLED(G29_RETRY_AND_RECOVER) + #define G29_MAX_RETRIES 3 + #define G29_HALT_ON_FAILURE + /** + * Specify the GCODE commands that will be executed when leveling succeeds, + * between attempts, and after the maximum number of retries have been tried. + */ + #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." + #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" + #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1" + /** + * Specify an action command to send to the host on a recovery attempt or failure. + * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. + * The host must be configured to handle the action command. + */ + #define G29_ACTION_ON_RECOVER "probe_rewipe" + #define G29_ACTION_ON_FAILURE "probe_failed" +#endif + // @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 e7befc7672..00f32b35ba 100644 --- a/Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h @@ -746,6 +746,30 @@ //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) #endif +/** + * Repeatedly attempt G29 leveling until it succeeds. + * Stop after G29_MAX_RETRIES attempts. + */ +//#define G29_RETRY_AND_RECOVER +#if ENABLED(G29_RETRY_AND_RECOVER) + #define G29_MAX_RETRIES 3 + #define G29_HALT_ON_FAILURE + /** + * Specify the GCODE commands that will be executed when leveling succeeds, + * between attempts, and after the maximum number of retries have been tried. + */ + #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." + #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" + #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1" + /** + * Specify an action command to send to the host on a recovery attempt or failure. + * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. + * The host must be configured to handle the action command. + */ + #define G29_ACTION_ON_RECOVER "probe_rewipe" + #define G29_ACTION_ON_FAILURE "probe_failed" +#endif + // @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 eb9818aeac..efe2a65dcf 100644 --- a/Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h @@ -746,6 +746,30 @@ //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) #endif +/** + * Repeatedly attempt G29 leveling until it succeeds. + * Stop after G29_MAX_RETRIES attempts. + */ +//#define G29_RETRY_AND_RECOVER +#if ENABLED(G29_RETRY_AND_RECOVER) + #define G29_MAX_RETRIES 3 + #define G29_HALT_ON_FAILURE + /** + * Specify the GCODE commands that will be executed when leveling succeeds, + * between attempts, and after the maximum number of retries have been tried. + */ + #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." + #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" + #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1" + /** + * Specify an action command to send to the host on a recovery attempt or failure. + * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. + * The host must be configured to handle the action command. + */ + #define G29_ACTION_ON_RECOVER "probe_rewipe" + #define G29_ACTION_ON_FAILURE "probe_failed" +#endif + // @section extras // diff --git a/Marlin/src/config/examples/Felix/Configuration_adv.h b/Marlin/src/config/examples/Felix/Configuration_adv.h index 205f9b2be3..55fdd9253c 100644 --- a/Marlin/src/config/examples/Felix/Configuration_adv.h +++ b/Marlin/src/config/examples/Felix/Configuration_adv.h @@ -746,6 +746,30 @@ //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) #endif +/** + * Repeatedly attempt G29 leveling until it succeeds. + * Stop after G29_MAX_RETRIES attempts. + */ +//#define G29_RETRY_AND_RECOVER +#if ENABLED(G29_RETRY_AND_RECOVER) + #define G29_MAX_RETRIES 3 + #define G29_HALT_ON_FAILURE + /** + * Specify the GCODE commands that will be executed when leveling succeeds, + * between attempts, and after the maximum number of retries have been tried. + */ + #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." + #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" + #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1" + /** + * Specify an action command to send to the host on a recovery attempt or failure. + * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. + * The host must be configured to handle the action command. + */ + #define G29_ACTION_ON_RECOVER "probe_rewipe" + #define G29_ACTION_ON_FAILURE "probe_failed" +#endif + // @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 217676fe43..11e3e23e7a 100644 --- a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h +++ b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h @@ -746,6 +746,30 @@ //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) #endif +/** + * Repeatedly attempt G29 leveling until it succeeds. + * Stop after G29_MAX_RETRIES attempts. + */ +//#define G29_RETRY_AND_RECOVER +#if ENABLED(G29_RETRY_AND_RECOVER) + #define G29_MAX_RETRIES 3 + #define G29_HALT_ON_FAILURE + /** + * Specify the GCODE commands that will be executed when leveling succeeds, + * between attempts, and after the maximum number of retries have been tried. + */ + #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." + #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" + #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1" + /** + * Specify an action command to send to the host on a recovery attempt or failure. + * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. + * The host must be configured to handle the action command. + */ + #define G29_ACTION_ON_RECOVER "probe_rewipe" + #define G29_ACTION_ON_FAILURE "probe_failed" +#endif + // @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 1f4dfd5f91..d2c14372ba 100644 --- a/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h +++ b/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h @@ -746,6 +746,30 @@ //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) #endif +/** + * Repeatedly attempt G29 leveling until it succeeds. + * Stop after G29_MAX_RETRIES attempts. + */ +//#define G29_RETRY_AND_RECOVER +#if ENABLED(G29_RETRY_AND_RECOVER) + #define G29_MAX_RETRIES 3 + #define G29_HALT_ON_FAILURE + /** + * Specify the GCODE commands that will be executed when leveling succeeds, + * between attempts, and after the maximum number of retries have been tried. + */ + #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." + #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" + #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1" + /** + * Specify an action command to send to the host on a recovery attempt or failure. + * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. + * The host must be configured to handle the action command. + */ + #define G29_ACTION_ON_RECOVER "probe_rewipe" + #define G29_ACTION_ON_FAILURE "probe_failed" +#endif + // @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 bc41b990f4..0ee2c9146b 100644 --- a/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h +++ b/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h @@ -746,6 +746,30 @@ //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) #endif +/** + * Repeatedly attempt G29 leveling until it succeeds. + * Stop after G29_MAX_RETRIES attempts. + */ +//#define G29_RETRY_AND_RECOVER +#if ENABLED(G29_RETRY_AND_RECOVER) + #define G29_MAX_RETRIES 3 + #define G29_HALT_ON_FAILURE + /** + * Specify the GCODE commands that will be executed when leveling succeeds, + * between attempts, and after the maximum number of retries have been tried. + */ + #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." + #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" + #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1" + /** + * Specify an action command to send to the host on a recovery attempt or failure. + * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. + * The host must be configured to handle the action command. + */ + #define G29_ACTION_ON_RECOVER "probe_rewipe" + #define G29_ACTION_ON_FAILURE "probe_failed" +#endif + // @section extras // diff --git a/Marlin/src/config/examples/MakerParts/Configuration_adv.h b/Marlin/src/config/examples/MakerParts/Configuration_adv.h index 7aebd01bda..c3608c8d55 100644 --- a/Marlin/src/config/examples/MakerParts/Configuration_adv.h +++ b/Marlin/src/config/examples/MakerParts/Configuration_adv.h @@ -746,6 +746,30 @@ //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) #endif +/** + * Repeatedly attempt G29 leveling until it succeeds. + * Stop after G29_MAX_RETRIES attempts. + */ +//#define G29_RETRY_AND_RECOVER +#if ENABLED(G29_RETRY_AND_RECOVER) + #define G29_MAX_RETRIES 3 + #define G29_HALT_ON_FAILURE + /** + * Specify the GCODE commands that will be executed when leveling succeeds, + * between attempts, and after the maximum number of retries have been tried. + */ + #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." + #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" + #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1" + /** + * Specify an action command to send to the host on a recovery attempt or failure. + * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. + * The host must be configured to handle the action command. + */ + #define G29_ACTION_ON_RECOVER "probe_rewipe" + #define G29_ACTION_ON_FAILURE "probe_failed" +#endif + // @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 7c65ff6990..27f5ed9d70 100644 --- a/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h +++ b/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h @@ -746,6 +746,30 @@ //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) #endif +/** + * Repeatedly attempt G29 leveling until it succeeds. + * Stop after G29_MAX_RETRIES attempts. + */ +//#define G29_RETRY_AND_RECOVER +#if ENABLED(G29_RETRY_AND_RECOVER) + #define G29_MAX_RETRIES 3 + #define G29_HALT_ON_FAILURE + /** + * Specify the GCODE commands that will be executed when leveling succeeds, + * between attempts, and after the maximum number of retries have been tried. + */ + #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." + #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" + #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1" + /** + * Specify an action command to send to the host on a recovery attempt or failure. + * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. + * The host must be configured to handle the action command. + */ + #define G29_ACTION_ON_RECOVER "probe_rewipe" + #define G29_ACTION_ON_FAILURE "probe_failed" +#endif + // @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 e55d1d8917..c9cf0e883a 100644 --- a/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h +++ b/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h @@ -746,6 +746,30 @@ //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) #endif +/** + * Repeatedly attempt G29 leveling until it succeeds. + * Stop after G29_MAX_RETRIES attempts. + */ +//#define G29_RETRY_AND_RECOVER +#if ENABLED(G29_RETRY_AND_RECOVER) + #define G29_MAX_RETRIES 3 + #define G29_HALT_ON_FAILURE + /** + * Specify the GCODE commands that will be executed when leveling succeeds, + * between attempts, and after the maximum number of retries have been tried. + */ + #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." + #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" + #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1" + /** + * Specify an action command to send to the host on a recovery attempt or failure. + * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. + * The host must be configured to handle the action command. + */ + #define G29_ACTION_ON_RECOVER "probe_rewipe" + #define G29_ACTION_ON_FAILURE "probe_failed" +#endif + // @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 72917b9141..d94d77dd05 100644 --- a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h +++ b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h @@ -746,6 +746,30 @@ //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) #endif +/** + * Repeatedly attempt G29 leveling until it succeeds. + * Stop after G29_MAX_RETRIES attempts. + */ +//#define G29_RETRY_AND_RECOVER +#if ENABLED(G29_RETRY_AND_RECOVER) + #define G29_MAX_RETRIES 3 + #define G29_HALT_ON_FAILURE + /** + * Specify the GCODE commands that will be executed when leveling succeeds, + * between attempts, and after the maximum number of retries have been tried. + */ + #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." + #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" + #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1" + /** + * Specify an action command to send to the host on a recovery attempt or failure. + * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. + * The host must be configured to handle the action command. + */ + #define G29_ACTION_ON_RECOVER "probe_rewipe" + #define G29_ACTION_ON_FAILURE "probe_failed" +#endif + // @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 484e52cd64..08c606f713 100644 --- a/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h +++ b/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h @@ -754,6 +754,30 @@ //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) #endif +/** + * Repeatedly attempt G29 leveling until it succeeds. + * Stop after G29_MAX_RETRIES attempts. + */ +//#define G29_RETRY_AND_RECOVER +#if ENABLED(G29_RETRY_AND_RECOVER) + #define G29_MAX_RETRIES 3 + #define G29_HALT_ON_FAILURE + /** + * Specify the GCODE commands that will be executed when leveling succeeds, + * between attempts, and after the maximum number of retries have been tried. + */ + #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." + #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" + #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1" + /** + * Specify an action command to send to the host on a recovery attempt or failure. + * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. + * The host must be configured to handle the action command. + */ + #define G29_ACTION_ON_RECOVER "probe_rewipe" + #define G29_ACTION_ON_FAILURE "probe_failed" +#endif + // @section extras // diff --git a/Marlin/src/config/examples/RigidBot/Configuration_adv.h b/Marlin/src/config/examples/RigidBot/Configuration_adv.h index 52c2fafd28..b9b8052f6f 100644 --- a/Marlin/src/config/examples/RigidBot/Configuration_adv.h +++ b/Marlin/src/config/examples/RigidBot/Configuration_adv.h @@ -746,6 +746,30 @@ //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) #endif +/** + * Repeatedly attempt G29 leveling until it succeeds. + * Stop after G29_MAX_RETRIES attempts. + */ +//#define G29_RETRY_AND_RECOVER +#if ENABLED(G29_RETRY_AND_RECOVER) + #define G29_MAX_RETRIES 3 + #define G29_HALT_ON_FAILURE + /** + * Specify the GCODE commands that will be executed when leveling succeeds, + * between attempts, and after the maximum number of retries have been tried. + */ + #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." + #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" + #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1" + /** + * Specify an action command to send to the host on a recovery attempt or failure. + * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. + * The host must be configured to handle the action command. + */ + #define G29_ACTION_ON_RECOVER "probe_rewipe" + #define G29_ACTION_ON_FAILURE "probe_failed" +#endif + // @section extras // diff --git a/Marlin/src/config/examples/SCARA/Configuration_adv.h b/Marlin/src/config/examples/SCARA/Configuration_adv.h index ed6290d1a2..70c7f35501 100644 --- a/Marlin/src/config/examples/SCARA/Configuration_adv.h +++ b/Marlin/src/config/examples/SCARA/Configuration_adv.h @@ -746,6 +746,30 @@ //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) #endif +/** + * Repeatedly attempt G29 leveling until it succeeds. + * Stop after G29_MAX_RETRIES attempts. + */ +//#define G29_RETRY_AND_RECOVER +#if ENABLED(G29_RETRY_AND_RECOVER) + #define G29_MAX_RETRIES 3 + #define G29_HALT_ON_FAILURE + /** + * Specify the GCODE commands that will be executed when leveling succeeds, + * between attempts, and after the maximum number of retries have been tried. + */ + #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." + #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" + #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1" + /** + * Specify an action command to send to the host on a recovery attempt or failure. + * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. + * The host must be configured to handle the action command. + */ + #define G29_ACTION_ON_RECOVER "probe_rewipe" + #define G29_ACTION_ON_FAILURE "probe_failed" +#endif + // @section extras // diff --git a/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h b/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h index db81014192..1007df1bf6 100644 --- a/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h +++ b/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h @@ -746,6 +746,30 @@ //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) #endif +/** + * Repeatedly attempt G29 leveling until it succeeds. + * Stop after G29_MAX_RETRIES attempts. + */ +//#define G29_RETRY_AND_RECOVER +#if ENABLED(G29_RETRY_AND_RECOVER) + #define G29_MAX_RETRIES 3 + #define G29_HALT_ON_FAILURE + /** + * Specify the GCODE commands that will be executed when leveling succeeds, + * between attempts, and after the maximum number of retries have been tried. + */ + #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." + #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" + #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1" + /** + * Specify an action command to send to the host on a recovery attempt or failure. + * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. + * The host must be configured to handle the action command. + */ + #define G29_ACTION_ON_RECOVER "probe_rewipe" + #define G29_ACTION_ON_FAILURE "probe_failed" +#endif + // @section extras // diff --git a/Marlin/src/config/examples/TheBorg/Configuration_adv.h b/Marlin/src/config/examples/TheBorg/Configuration_adv.h index 6d72365f55..fb5d0048a6 100644 --- a/Marlin/src/config/examples/TheBorg/Configuration_adv.h +++ b/Marlin/src/config/examples/TheBorg/Configuration_adv.h @@ -746,6 +746,30 @@ //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) #endif +/** + * Repeatedly attempt G29 leveling until it succeeds. + * Stop after G29_MAX_RETRIES attempts. + */ +//#define G29_RETRY_AND_RECOVER +#if ENABLED(G29_RETRY_AND_RECOVER) + #define G29_MAX_RETRIES 3 + #define G29_HALT_ON_FAILURE + /** + * Specify the GCODE commands that will be executed when leveling succeeds, + * between attempts, and after the maximum number of retries have been tried. + */ + #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." + #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" + #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1" + /** + * Specify an action command to send to the host on a recovery attempt or failure. + * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. + * The host must be configured to handle the action command. + */ + #define G29_ACTION_ON_RECOVER "probe_rewipe" + #define G29_ACTION_ON_FAILURE "probe_failed" +#endif + // @section extras // diff --git a/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h b/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h index 932a4d2587..037d2cfd7c 100644 --- a/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h +++ b/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h @@ -746,6 +746,30 @@ //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) #endif +/** + * Repeatedly attempt G29 leveling until it succeeds. + * Stop after G29_MAX_RETRIES attempts. + */ +//#define G29_RETRY_AND_RECOVER +#if ENABLED(G29_RETRY_AND_RECOVER) + #define G29_MAX_RETRIES 3 + #define G29_HALT_ON_FAILURE + /** + * Specify the GCODE commands that will be executed when leveling succeeds, + * between attempts, and after the maximum number of retries have been tried. + */ + #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." + #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" + #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1" + /** + * Specify an action command to send to the host on a recovery attempt or failure. + * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. + * The host must be configured to handle the action command. + */ + #define G29_ACTION_ON_RECOVER "probe_rewipe" + #define G29_ACTION_ON_FAILURE "probe_failed" +#endif + // @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 d387726ecb..aef9570d18 100644 --- a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h +++ b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h @@ -746,6 +746,30 @@ //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) #endif +/** + * Repeatedly attempt G29 leveling until it succeeds. + * Stop after G29_MAX_RETRIES attempts. + */ +//#define G29_RETRY_AND_RECOVER +#if ENABLED(G29_RETRY_AND_RECOVER) + #define G29_MAX_RETRIES 3 + #define G29_HALT_ON_FAILURE + /** + * Specify the GCODE commands that will be executed when leveling succeeds, + * between attempts, and after the maximum number of retries have been tried. + */ + #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." + #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" + #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1" + /** + * Specify an action command to send to the host on a recovery attempt or failure. + * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. + * The host must be configured to handle the action command. + */ + #define G29_ACTION_ON_RECOVER "probe_rewipe" + #define G29_ACTION_ON_FAILURE "probe_failed" +#endif + // @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 da3717be45..890a3fd267 100644 --- a/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h +++ b/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h @@ -759,6 +759,30 @@ //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) #endif +/** + * Repeatedly attempt G29 leveling until it succeeds. + * Stop after G29_MAX_RETRIES attempts. + */ +//#define G29_RETRY_AND_RECOVER +#if ENABLED(G29_RETRY_AND_RECOVER) + #define G29_MAX_RETRIES 3 + #define G29_HALT_ON_FAILURE + /** + * Specify the GCODE commands that will be executed when leveling succeeds, + * between attempts, and after the maximum number of retries have been tried. + */ + #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." + #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" + #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1" + /** + * Specify an action command to send to the host on a recovery attempt or failure. + * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. + * The host must be configured to handle the action command. + */ + #define G29_ACTION_ON_RECOVER "probe_rewipe" + #define G29_ACTION_ON_FAILURE "probe_failed" +#endif + // @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 04ca9efebf..bd5f2641fb 100644 --- a/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h +++ b/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h @@ -746,6 +746,30 @@ //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) #endif +/** + * Repeatedly attempt G29 leveling until it succeeds. + * Stop after G29_MAX_RETRIES attempts. + */ +//#define G29_RETRY_AND_RECOVER +#if ENABLED(G29_RETRY_AND_RECOVER) + #define G29_MAX_RETRIES 3 + #define G29_HALT_ON_FAILURE + /** + * Specify the GCODE commands that will be executed when leveling succeeds, + * between attempts, and after the maximum number of retries have been tried. + */ + #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." + #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" + #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1" + /** + * Specify an action command to send to the host on a recovery attempt or failure. + * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. + * The host must be configured to handle the action command. + */ + #define G29_ACTION_ON_RECOVER "probe_rewipe" + #define G29_ACTION_ON_FAILURE "probe_failed" +#endif + // @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 a17c692093..e863cfd882 100644 --- a/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h +++ b/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h @@ -748,6 +748,30 @@ //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) #endif +/** + * Repeatedly attempt G29 leveling until it succeeds. + * Stop after G29_MAX_RETRIES attempts. + */ +//#define G29_RETRY_AND_RECOVER +#if ENABLED(G29_RETRY_AND_RECOVER) + #define G29_MAX_RETRIES 3 + #define G29_HALT_ON_FAILURE + /** + * Specify the GCODE commands that will be executed when leveling succeeds, + * between attempts, and after the maximum number of retries have been tried. + */ + #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." + #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" + #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1" + /** + * Specify an action command to send to the host on a recovery attempt or failure. + * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. + * The host must be configured to handle the action command. + */ + #define G29_ACTION_ON_RECOVER "probe_rewipe" + #define G29_ACTION_ON_FAILURE "probe_failed" +#endif + // @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 4fc0e364ec..bf875efe07 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 @@ -748,6 +748,30 @@ //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) #endif +/** + * Repeatedly attempt G29 leveling until it succeeds. + * Stop after G29_MAX_RETRIES attempts. + */ +//#define G29_RETRY_AND_RECOVER +#if ENABLED(G29_RETRY_AND_RECOVER) + #define G29_MAX_RETRIES 3 + #define G29_HALT_ON_FAILURE + /** + * Specify the GCODE commands that will be executed when leveling succeeds, + * between attempts, and after the maximum number of retries have been tried. + */ + #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." + #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" + #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1" + /** + * Specify an action command to send to the host on a recovery attempt or failure. + * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. + * The host must be configured to handle the action command. + */ + #define G29_ACTION_ON_RECOVER "probe_rewipe" + #define G29_ACTION_ON_FAILURE "probe_failed" +#endif + // @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 bf4ec5dba1..6c6f18c66d 100644 --- a/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h @@ -748,6 +748,30 @@ //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) #endif +/** + * Repeatedly attempt G29 leveling until it succeeds. + * Stop after G29_MAX_RETRIES attempts. + */ +//#define G29_RETRY_AND_RECOVER +#if ENABLED(G29_RETRY_AND_RECOVER) + #define G29_MAX_RETRIES 3 + #define G29_HALT_ON_FAILURE + /** + * Specify the GCODE commands that will be executed when leveling succeeds, + * between attempts, and after the maximum number of retries have been tried. + */ + #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." + #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" + #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1" + /** + * Specify an action command to send to the host on a recovery attempt or failure. + * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. + * The host must be configured to handle the action command. + */ + #define G29_ACTION_ON_RECOVER "probe_rewipe" + #define G29_ACTION_ON_FAILURE "probe_failed" +#endif + // @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 eb471b709d..aa14fe3908 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 @@ -748,6 +748,30 @@ //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) #endif +/** + * Repeatedly attempt G29 leveling until it succeeds. + * Stop after G29_MAX_RETRIES attempts. + */ +//#define G29_RETRY_AND_RECOVER +#if ENABLED(G29_RETRY_AND_RECOVER) + #define G29_MAX_RETRIES 3 + #define G29_HALT_ON_FAILURE + /** + * Specify the GCODE commands that will be executed when leveling succeeds, + * between attempts, and after the maximum number of retries have been tried. + */ + #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." + #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" + #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1" + /** + * Specify an action command to send to the host on a recovery attempt or failure. + * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. + * The host must be configured to handle the action command. + */ + #define G29_ACTION_ON_RECOVER "probe_rewipe" + #define G29_ACTION_ON_FAILURE "probe_failed" +#endif + // @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 eb471b709d..aa14fe3908 100644 --- a/Marlin/src/config/examples/delta/generic/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/generic/Configuration_adv.h @@ -748,6 +748,30 @@ //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) #endif +/** + * Repeatedly attempt G29 leveling until it succeeds. + * Stop after G29_MAX_RETRIES attempts. + */ +//#define G29_RETRY_AND_RECOVER +#if ENABLED(G29_RETRY_AND_RECOVER) + #define G29_MAX_RETRIES 3 + #define G29_HALT_ON_FAILURE + /** + * Specify the GCODE commands that will be executed when leveling succeeds, + * between attempts, and after the maximum number of retries have been tried. + */ + #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." + #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" + #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1" + /** + * Specify an action command to send to the host on a recovery attempt or failure. + * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. + * The host must be configured to handle the action command. + */ + #define G29_ACTION_ON_RECOVER "probe_rewipe" + #define G29_ACTION_ON_FAILURE "probe_failed" +#endif + // @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 eb471b709d..aa14fe3908 100644 --- a/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h @@ -748,6 +748,30 @@ //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) #endif +/** + * Repeatedly attempt G29 leveling until it succeeds. + * Stop after G29_MAX_RETRIES attempts. + */ +//#define G29_RETRY_AND_RECOVER +#if ENABLED(G29_RETRY_AND_RECOVER) + #define G29_MAX_RETRIES 3 + #define G29_HALT_ON_FAILURE + /** + * Specify the GCODE commands that will be executed when leveling succeeds, + * between attempts, and after the maximum number of retries have been tried. + */ + #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." + #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" + #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1" + /** + * Specify an action command to send to the host on a recovery attempt or failure. + * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. + * The host must be configured to handle the action command. + */ + #define G29_ACTION_ON_RECOVER "probe_rewipe" + #define G29_ACTION_ON_FAILURE "probe_failed" +#endif + // @section extras // 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 ea5c5da504..373b3d453b 100644 --- a/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h @@ -753,6 +753,30 @@ //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) #endif +/** + * Repeatedly attempt G29 leveling until it succeeds. + * Stop after G29_MAX_RETRIES attempts. + */ +//#define G29_RETRY_AND_RECOVER +#if ENABLED(G29_RETRY_AND_RECOVER) + #define G29_MAX_RETRIES 3 + #define G29_HALT_ON_FAILURE + /** + * Specify the GCODE commands that will be executed when leveling succeeds, + * between attempts, and after the maximum number of retries have been tried. + */ + #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." + #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" + #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1" + /** + * Specify an action command to send to the host on a recovery attempt or failure. + * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. + * The host must be configured to handle the action command. + */ + #define G29_ACTION_ON_RECOVER "probe_rewipe" + #define G29_ACTION_ON_FAILURE "probe_failed" +#endif + // @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 c35d5dfb56..a0a82a177f 100644 --- a/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h @@ -748,6 +748,30 @@ //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) #endif +/** + * Repeatedly attempt G29 leveling until it succeeds. + * Stop after G29_MAX_RETRIES attempts. + */ +//#define G29_RETRY_AND_RECOVER +#if ENABLED(G29_RETRY_AND_RECOVER) + #define G29_MAX_RETRIES 3 + #define G29_HALT_ON_FAILURE + /** + * Specify the GCODE commands that will be executed when leveling succeeds, + * between attempts, and after the maximum number of retries have been tried. + */ + #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." + #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" + #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1" + /** + * Specify an action command to send to the host on a recovery attempt or failure. + * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. + * The host must be configured to handle the action command. + */ + #define G29_ACTION_ON_RECOVER "probe_rewipe" + #define G29_ACTION_ON_FAILURE "probe_failed" +#endif + // @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 96f21ce3ca..810e5857c7 100644 --- a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h +++ b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h @@ -746,6 +746,30 @@ //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) #endif +/** + * Repeatedly attempt G29 leveling until it succeeds. + * Stop after G29_MAX_RETRIES attempts. + */ +//#define G29_RETRY_AND_RECOVER +#if ENABLED(G29_RETRY_AND_RECOVER) + #define G29_MAX_RETRIES 3 + #define G29_HALT_ON_FAILURE + /** + * Specify the GCODE commands that will be executed when leveling succeeds, + * between attempts, and after the maximum number of retries have been tried. + */ + #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." + #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" + #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1" + /** + * Specify an action command to send to the host on a recovery attempt or failure. + * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. + * The host must be configured to handle the action command. + */ + #define G29_ACTION_ON_RECOVER "probe_rewipe" + #define G29_ACTION_ON_FAILURE "probe_failed" +#endif + // @section extras // diff --git a/Marlin/src/config/examples/makibox/Configuration_adv.h b/Marlin/src/config/examples/makibox/Configuration_adv.h index 9db0c55591..6d1b38c945 100644 --- a/Marlin/src/config/examples/makibox/Configuration_adv.h +++ b/Marlin/src/config/examples/makibox/Configuration_adv.h @@ -746,6 +746,30 @@ //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) #endif +/** + * Repeatedly attempt G29 leveling until it succeeds. + * Stop after G29_MAX_RETRIES attempts. + */ +//#define G29_RETRY_AND_RECOVER +#if ENABLED(G29_RETRY_AND_RECOVER) + #define G29_MAX_RETRIES 3 + #define G29_HALT_ON_FAILURE + /** + * Specify the GCODE commands that will be executed when leveling succeeds, + * between attempts, and after the maximum number of retries have been tried. + */ + #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." + #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" + #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1" + /** + * Specify an action command to send to the host on a recovery attempt or failure. + * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. + * The host must be configured to handle the action command. + */ + #define G29_ACTION_ON_RECOVER "probe_rewipe" + #define G29_ACTION_ON_FAILURE "probe_failed" +#endif + // @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 fc8b2af43f..60a28b09bb 100644 --- a/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h @@ -746,6 +746,30 @@ //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) #endif +/** + * Repeatedly attempt G29 leveling until it succeeds. + * Stop after G29_MAX_RETRIES attempts. + */ +//#define G29_RETRY_AND_RECOVER +#if ENABLED(G29_RETRY_AND_RECOVER) + #define G29_MAX_RETRIES 3 + #define G29_HALT_ON_FAILURE + /** + * Specify the GCODE commands that will be executed when leveling succeeds, + * between attempts, and after the maximum number of retries have been tried. + */ + #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." + #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" + #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1" + /** + * Specify an action command to send to the host on a recovery attempt or failure. + * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. + * The host must be configured to handle the action command. + */ + #define G29_ACTION_ON_RECOVER "probe_rewipe" + #define G29_ACTION_ON_FAILURE "probe_failed" +#endif + // @section extras // diff --git a/Marlin/src/config/examples/wt150/Configuration_adv.h b/Marlin/src/config/examples/wt150/Configuration_adv.h index e7ce5cc26e..f84a0691f5 100644 --- a/Marlin/src/config/examples/wt150/Configuration_adv.h +++ b/Marlin/src/config/examples/wt150/Configuration_adv.h @@ -747,6 +747,30 @@ //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) #endif +/** + * Repeatedly attempt G29 leveling until it succeeds. + * Stop after G29_MAX_RETRIES attempts. + */ +//#define G29_RETRY_AND_RECOVER +#if ENABLED(G29_RETRY_AND_RECOVER) + #define G29_MAX_RETRIES 3 + #define G29_HALT_ON_FAILURE + /** + * Specify the GCODE commands that will be executed when leveling succeeds, + * between attempts, and after the maximum number of retries have been tried. + */ + #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." + #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" + #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1" + /** + * Specify an action command to send to the host on a recovery attempt or failure. + * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. + * The host must be configured to handle the action command. + */ + #define G29_ACTION_ON_RECOVER "probe_rewipe" + #define G29_ACTION_ON_FAILURE "probe_failed" +#endif + // @section extras //