Skip to content

Commit 0181e57

Browse files
robbycandrathinkyhead
authored andcommitted
Add a minimum Z change option to power-loss recovery (MarlinFirmware#13859)
1 parent c369477 commit 0181e57

File tree

73 files changed

+295
-4
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+295
-4
lines changed

Marlin/Configuration_adv.h

+4
Original file line numberDiff line numberDiff line change
@@ -803,6 +803,10 @@
803803
#if ENABLED(POWER_LOSS_RECOVERY)
804804
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
805805
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
806+
807+
// Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card,
808+
// especially with "vase mode" printing. Set too high and vases cannot be continued.
809+
#define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data
806810
#endif
807811

808812
/**

Marlin/src/feature/power_loss_recovery.cpp

+7-4
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,10 @@ void PrintJobRecovery::save(const bool force/*=false*/, const bool save_queue/*=
126126
millis_t ms = millis();
127127
#endif
128128

129+
#ifndef POWER_LOSS_MIN_Z_CHANGE
130+
#define POWER_LOSS_MIN_Z_CHANGE 0.05 // Vase-mode-friendly out of the box
131+
#endif
132+
129133
// Did Z change since the last call?
130134
if (force
131135
#if DISABLED(SAVE_EACH_CMD_MODE) // Always save state when enabled
@@ -135,8 +139,8 @@ void PrintJobRecovery::save(const bool force/*=false*/, const bool save_queue/*=
135139
#if SAVE_INFO_INTERVAL_MS > 0 // Save if interval is elapsed
136140
|| ELAPSED(ms, next_save_ms)
137141
#endif
138-
// Save every time Z is higher than the last call
139-
|| current_position[Z_AXIS] > info.current_position[Z_AXIS]
142+
// Save if Z is above the last-saved position by some minimum height
143+
|| current_position[Z_AXIS] > info.current_position[Z_AXIS] + POWER_LOSS_MIN_Z_CHANGE
140144
#endif
141145
) {
142146

@@ -228,9 +232,8 @@ void PrintJobRecovery::write() {
228232
open(false);
229233
file.seekSet(0);
230234
const int16_t ret = file.write(&info, sizeof(info));
231-
close();
232-
233235
if (ret == -1) DEBUG_ECHOLNPGM("Power-loss file write failed.");
236+
if (!file.close()) DEBUG_ECHOLNPGM("Power-loss file close failed.");
234237
}
235238

236239
/**

config/default/Configuration_adv.h

+4
Original file line numberDiff line numberDiff line change
@@ -805,6 +805,10 @@
805805
#if ENABLED(POWER_LOSS_RECOVERY)
806806
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
807807
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
808+
809+
// Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card,
810+
// especially with "vase mode" printing. Set too high and vases cannot be continued.
811+
#define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data
808812
#endif
809813

810814
/**

config/examples/3DFabXYZ/Migbot/Configuration_adv.h

+4
Original file line numberDiff line numberDiff line change
@@ -805,6 +805,10 @@
805805
#if ENABLED(POWER_LOSS_RECOVERY)
806806
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
807807
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
808+
809+
// Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card,
810+
// especially with "vase mode" printing. Set too high and vases cannot be continued.
811+
#define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data
808812
#endif
809813

810814
/**

config/examples/AlephObjects/TAZ4/Configuration_adv.h

+4
Original file line numberDiff line numberDiff line change
@@ -805,6 +805,10 @@
805805
#if ENABLED(POWER_LOSS_RECOVERY)
806806
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
807807
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
808+
809+
// Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card,
810+
// especially with "vase mode" printing. Set too high and vases cannot be continued.
811+
#define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data
808812
#endif
809813

810814
/**

config/examples/AliExpress/UM2pExt/Configuration_adv.h

+4
Original file line numberDiff line numberDiff line change
@@ -805,6 +805,10 @@
805805
#if ENABLED(POWER_LOSS_RECOVERY)
806806
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
807807
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
808+
809+
// Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card,
810+
// especially with "vase mode" printing. Set too high and vases cannot be continued.
811+
#define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data
808812
#endif
809813

810814
/**

config/examples/Anet/A2/Configuration_adv.h

+4
Original file line numberDiff line numberDiff line change
@@ -805,6 +805,10 @@
805805
#if ENABLED(POWER_LOSS_RECOVERY)
806806
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
807807
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
808+
809+
// Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card,
810+
// especially with "vase mode" printing. Set too high and vases cannot be continued.
811+
#define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data
808812
#endif
809813

810814
/**

config/examples/Anet/A2plus/Configuration_adv.h

+4
Original file line numberDiff line numberDiff line change
@@ -805,6 +805,10 @@
805805
#if ENABLED(POWER_LOSS_RECOVERY)
806806
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
807807
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
808+
809+
// Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card,
810+
// especially with "vase mode" printing. Set too high and vases cannot be continued.
811+
#define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data
808812
#endif
809813

810814
/**

config/examples/Anet/A6/Configuration_adv.h

+4
Original file line numberDiff line numberDiff line change
@@ -805,6 +805,10 @@
805805
#if ENABLED(POWER_LOSS_RECOVERY)
806806
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
807807
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
808+
809+
// Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card,
810+
// especially with "vase mode" printing. Set too high and vases cannot be continued.
811+
#define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data
808812
#endif
809813

810814
/**

config/examples/Anet/A8/Configuration_adv.h

+4
Original file line numberDiff line numberDiff line change
@@ -805,6 +805,10 @@
805805
#if ENABLED(POWER_LOSS_RECOVERY)
806806
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
807807
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
808+
809+
// Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card,
810+
// especially with "vase mode" printing. Set too high and vases cannot be continued.
811+
#define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data
808812
#endif
809813

810814
/**

config/examples/AnyCubic/i3/Configuration_adv.h

+4
Original file line numberDiff line numberDiff line change
@@ -805,6 +805,10 @@
805805
#if ENABLED(POWER_LOSS_RECOVERY)
806806
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
807807
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
808+
809+
// Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card,
810+
// especially with "vase mode" printing. Set too high and vases cannot be continued.
811+
#define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data
808812
#endif
809813

810814
/**

config/examples/ArmEd/Configuration_adv.h

+4
Original file line numberDiff line numberDiff line change
@@ -809,6 +809,10 @@
809809
#if ENABLED(POWER_LOSS_RECOVERY)
810810
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
811811
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
812+
813+
// Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card,
814+
// especially with "vase mode" printing. Set too high and vases cannot be continued.
815+
#define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data
812816
#endif
813817

814818
/**

config/examples/BIBO/TouchX/cyclops/Configuration_adv.h

+4
Original file line numberDiff line numberDiff line change
@@ -805,6 +805,10 @@
805805
#if ENABLED(POWER_LOSS_RECOVERY)
806806
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
807807
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
808+
809+
// Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card,
810+
// especially with "vase mode" printing. Set too high and vases cannot be continued.
811+
#define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data
808812
#endif
809813

810814
/**

config/examples/BIBO/TouchX/default/Configuration_adv.h

+4
Original file line numberDiff line numberDiff line change
@@ -805,6 +805,10 @@
805805
#if ENABLED(POWER_LOSS_RECOVERY)
806806
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
807807
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
808+
809+
// Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card,
810+
// especially with "vase mode" printing. Set too high and vases cannot be continued.
811+
#define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data
808812
#endif
809813

810814
/**

config/examples/BQ/Hephestos/Configuration_adv.h

+4
Original file line numberDiff line numberDiff line change
@@ -802,6 +802,10 @@
802802
#if ENABLED(POWER_LOSS_RECOVERY)
803803
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
804804
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
805+
806+
// Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card,
807+
// especially with "vase mode" printing. Set too high and vases cannot be continued.
808+
#define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data
805809
#endif
806810

807811
/**

config/examples/BQ/Hephestos_2/Configuration_adv.h

+4
Original file line numberDiff line numberDiff line change
@@ -810,6 +810,10 @@
810810
#if ENABLED(POWER_LOSS_RECOVERY)
811811
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
812812
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
813+
814+
// Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card,
815+
// especially with "vase mode" printing. Set too high and vases cannot be continued.
816+
#define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data
813817
#endif
814818

815819
/**

config/examples/BQ/WITBOX/Configuration_adv.h

+4
Original file line numberDiff line numberDiff line change
@@ -802,6 +802,10 @@
802802
#if ENABLED(POWER_LOSS_RECOVERY)
803803
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
804804
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
805+
806+
// Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card,
807+
// especially with "vase mode" printing. Set too high and vases cannot be continued.
808+
#define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data
805809
#endif
806810

807811
/**

config/examples/Cartesio/Configuration_adv.h

+4
Original file line numberDiff line numberDiff line change
@@ -805,6 +805,10 @@
805805
#if ENABLED(POWER_LOSS_RECOVERY)
806806
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
807807
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
808+
809+
// Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card,
810+
// especially with "vase mode" printing. Set too high and vases cannot be continued.
811+
#define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data
808812
#endif
809813

810814
/**

config/examples/Creality/CR-10/Configuration_adv.h

+4
Original file line numberDiff line numberDiff line change
@@ -805,6 +805,10 @@
805805
#if ENABLED(POWER_LOSS_RECOVERY)
806806
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
807807
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
808+
809+
// Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card,
810+
// especially with "vase mode" printing. Set too high and vases cannot be continued.
811+
#define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data
808812
#endif
809813

810814
/**

config/examples/Creality/CR-10S/Configuration_adv.h

+4
Original file line numberDiff line numberDiff line change
@@ -805,6 +805,10 @@
805805
#if ENABLED(POWER_LOSS_RECOVERY)
806806
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
807807
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
808+
809+
// Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card,
810+
// especially with "vase mode" printing. Set too high and vases cannot be continued.
811+
#define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data
808812
#endif
809813

810814
/**

config/examples/Creality/CR-10_5S/Configuration_adv.h

+4
Original file line numberDiff line numberDiff line change
@@ -805,6 +805,10 @@
805805
#if ENABLED(POWER_LOSS_RECOVERY)
806806
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
807807
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
808+
809+
// Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card,
810+
// especially with "vase mode" printing. Set too high and vases cannot be continued.
811+
#define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data
808812
#endif
809813

810814
/**

config/examples/Creality/CR-10mini/Configuration_adv.h

+4
Original file line numberDiff line numberDiff line change
@@ -805,6 +805,10 @@
805805
#if ENABLED(POWER_LOSS_RECOVERY)
806806
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
807807
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
808+
809+
// Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card,
810+
// especially with "vase mode" printing. Set too high and vases cannot be continued.
811+
#define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data
808812
#endif
809813

810814
/**

config/examples/Creality/CR-8/Configuration_adv.h

+4
Original file line numberDiff line numberDiff line change
@@ -805,6 +805,10 @@
805805
#if ENABLED(POWER_LOSS_RECOVERY)
806806
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
807807
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
808+
809+
// Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card,
810+
// especially with "vase mode" printing. Set too high and vases cannot be continued.
811+
#define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data
808812
#endif
809813

810814
/**

config/examples/Creality/Ender-2/Configuration_adv.h

+4
Original file line numberDiff line numberDiff line change
@@ -802,6 +802,10 @@
802802
#if ENABLED(POWER_LOSS_RECOVERY)
803803
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
804804
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
805+
806+
// Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card,
807+
// especially with "vase mode" printing. Set too high and vases cannot be continued.
808+
#define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data
805809
#endif
806810

807811
/**

config/examples/Creality/Ender-3/Configuration_adv.h

+4
Original file line numberDiff line numberDiff line change
@@ -802,6 +802,10 @@
802802
#if ENABLED(POWER_LOSS_RECOVERY)
803803
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
804804
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
805+
806+
// Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card,
807+
// especially with "vase mode" printing. Set too high and vases cannot be continued.
808+
#define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data
805809
#endif
806810

807811
/**

config/examples/Creality/Ender-4/Configuration_adv.h

+4
Original file line numberDiff line numberDiff line change
@@ -805,6 +805,10 @@
805805
#if ENABLED(POWER_LOSS_RECOVERY)
806806
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
807807
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
808+
809+
// Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card,
810+
// especially with "vase mode" printing. Set too high and vases cannot be continued.
811+
#define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data
808812
#endif
809813

810814
/**

config/examples/Einstart-S/Configuration_adv.h

+4
Original file line numberDiff line numberDiff line change
@@ -805,6 +805,10 @@
805805
#if ENABLED(POWER_LOSS_RECOVERY)
806806
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
807807
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
808+
809+
// Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card,
810+
// especially with "vase mode" printing. Set too high and vases cannot be continued.
811+
#define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data
808812
#endif
809813

810814
/**

config/examples/Felix/Configuration_adv.h

+4
Original file line numberDiff line numberDiff line change
@@ -805,6 +805,10 @@
805805
#if ENABLED(POWER_LOSS_RECOVERY)
806806
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
807807
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
808+
809+
// Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card,
810+
// especially with "vase mode" printing. Set too high and vases cannot be continued.
811+
#define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data
808812
#endif
809813

810814
/**

config/examples/FlashForge/CreatorPro/Configuration_adv.h

+4
Original file line numberDiff line numberDiff line change
@@ -801,6 +801,10 @@
801801
#if ENABLED(POWER_LOSS_RECOVERY)
802802
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
803803
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
804+
805+
// Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card,
806+
// especially with "vase mode" printing. Set too high and vases cannot be continued.
807+
#define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data
804808
#endif
805809

806810
/**

config/examples/FolgerTech/i3-2020/Configuration_adv.h

+4
Original file line numberDiff line numberDiff line change
@@ -805,6 +805,10 @@
805805
#if ENABLED(POWER_LOSS_RECOVERY)
806806
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
807807
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
808+
809+
// Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card,
810+
// especially with "vase mode" printing. Set too high and vases cannot be continued.
811+
#define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data
808812
#endif
809813

810814
/**

config/examples/Formbot/Raptor/Configuration_adv.h

+4
Original file line numberDiff line numberDiff line change
@@ -805,6 +805,10 @@
805805
#if ENABLED(POWER_LOSS_RECOVERY)
806806
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
807807
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
808+
809+
// Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card,
810+
// especially with "vase mode" printing. Set too high and vases cannot be continued.
811+
#define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data
808812
#endif
809813

810814
/**

config/examples/Formbot/T_Rex_2+/Configuration_adv.h

+4
Original file line numberDiff line numberDiff line change
@@ -809,6 +809,10 @@
809809
#if ENABLED(POWER_LOSS_RECOVERY)
810810
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
811811
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
812+
813+
// Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card,
814+
// especially with "vase mode" printing. Set too high and vases cannot be continued.
815+
#define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data
812816
#endif
813817

814818
/**

config/examples/Formbot/T_Rex_3/Configuration_adv.h

+4
Original file line numberDiff line numberDiff line change
@@ -809,6 +809,10 @@
809809
#if ENABLED(POWER_LOSS_RECOVERY)
810810
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
811811
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
812+
813+
// Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card,
814+
// especially with "vase mode" printing. Set too high and vases cannot be continued.
815+
#define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data
812816
#endif
813817

814818
/**

config/examples/Geeetech/MeCreator2/Configuration_adv.h

+4
Original file line numberDiff line numberDiff line change
@@ -805,6 +805,10 @@
805805
#if ENABLED(POWER_LOSS_RECOVERY)
806806
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
807807
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
808+
809+
// Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card,
810+
// especially with "vase mode" printing. Set too high and vases cannot be continued.
811+
#define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data
808812
#endif
809813

810814
/**

0 commit comments

Comments
 (0)