Merge pull request #11306 from thinkyhead/bf2_power_loss_pin
[2.0.x] Add support for power loss detect pin
This commit is contained in:
@ -589,6 +589,10 @@
|
||||
* point in the file.
|
||||
*/
|
||||
//#define POWER_LOSS_RECOVERY
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
|
||||
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sort SD file listings in alphabetical order.
|
||||
|
@ -589,6 +589,10 @@
|
||||
* point in the file.
|
||||
*/
|
||||
//#define POWER_LOSS_RECOVERY
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
|
||||
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sort SD file listings in alphabetical order.
|
||||
|
@ -589,6 +589,10 @@
|
||||
* point in the file.
|
||||
*/
|
||||
//#define POWER_LOSS_RECOVERY
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
|
||||
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sort SD file listings in alphabetical order.
|
||||
|
@ -589,6 +589,10 @@
|
||||
* point in the file.
|
||||
*/
|
||||
//#define POWER_LOSS_RECOVERY
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
|
||||
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sort SD file listings in alphabetical order.
|
||||
|
@ -589,6 +589,10 @@
|
||||
* point in the file.
|
||||
*/
|
||||
//#define POWER_LOSS_RECOVERY
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
|
||||
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sort SD file listings in alphabetical order.
|
||||
|
@ -589,6 +589,10 @@
|
||||
* point in the file.
|
||||
*/
|
||||
//#define POWER_LOSS_RECOVERY
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
|
||||
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sort SD file listings in alphabetical order.
|
||||
|
@ -589,6 +589,10 @@
|
||||
* point in the file.
|
||||
*/
|
||||
//#define POWER_LOSS_RECOVERY
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
|
||||
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sort SD file listings in alphabetical order.
|
||||
|
@ -589,6 +589,10 @@
|
||||
* point in the file.
|
||||
*/
|
||||
//#define POWER_LOSS_RECOVERY
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
|
||||
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sort SD file listings in alphabetical order.
|
||||
|
@ -589,6 +589,10 @@
|
||||
* point in the file.
|
||||
*/
|
||||
//#define POWER_LOSS_RECOVERY
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
|
||||
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sort SD file listings in alphabetical order.
|
||||
|
@ -597,6 +597,10 @@
|
||||
* point in the file.
|
||||
*/
|
||||
//#define POWER_LOSS_RECOVERY
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
|
||||
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sort SD file listings in alphabetical order.
|
||||
|
@ -589,6 +589,10 @@
|
||||
* point in the file.
|
||||
*/
|
||||
//#define POWER_LOSS_RECOVERY
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
|
||||
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sort SD file listings in alphabetical order.
|
||||
|
@ -589,6 +589,10 @@
|
||||
* point in the file.
|
||||
*/
|
||||
//#define POWER_LOSS_RECOVERY
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
|
||||
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sort SD file listings in alphabetical order.
|
||||
|
@ -589,6 +589,10 @@
|
||||
* point in the file.
|
||||
*/
|
||||
//#define POWER_LOSS_RECOVERY
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
|
||||
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sort SD file listings in alphabetical order.
|
||||
|
@ -589,6 +589,10 @@
|
||||
* point in the file.
|
||||
*/
|
||||
//#define POWER_LOSS_RECOVERY
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
|
||||
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sort SD file listings in alphabetical order.
|
||||
|
@ -589,6 +589,10 @@
|
||||
* point in the file.
|
||||
*/
|
||||
//#define POWER_LOSS_RECOVERY
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
|
||||
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sort SD file listings in alphabetical order.
|
||||
|
@ -589,6 +589,10 @@
|
||||
* point in the file.
|
||||
*/
|
||||
//#define POWER_LOSS_RECOVERY
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
|
||||
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sort SD file listings in alphabetical order.
|
||||
|
@ -589,6 +589,10 @@
|
||||
* point in the file.
|
||||
*/
|
||||
//#define POWER_LOSS_RECOVERY
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
|
||||
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sort SD file listings in alphabetical order.
|
||||
|
@ -589,6 +589,10 @@
|
||||
* point in the file.
|
||||
*/
|
||||
//#define POWER_LOSS_RECOVERY
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
|
||||
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sort SD file listings in alphabetical order.
|
||||
|
@ -589,6 +589,10 @@
|
||||
* point in the file.
|
||||
*/
|
||||
//#define POWER_LOSS_RECOVERY
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
|
||||
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sort SD file listings in alphabetical order.
|
||||
|
@ -589,6 +589,10 @@
|
||||
* point in the file.
|
||||
*/
|
||||
//#define POWER_LOSS_RECOVERY
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
|
||||
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sort SD file listings in alphabetical order.
|
||||
|
@ -589,6 +589,10 @@
|
||||
* point in the file.
|
||||
*/
|
||||
//#define POWER_LOSS_RECOVERY
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
|
||||
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sort SD file listings in alphabetical order.
|
||||
|
@ -589,6 +589,10 @@
|
||||
* point in the file.
|
||||
*/
|
||||
//#define POWER_LOSS_RECOVERY
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
|
||||
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sort SD file listings in alphabetical order.
|
||||
|
@ -589,6 +589,10 @@
|
||||
* point in the file.
|
||||
*/
|
||||
//#define POWER_LOSS_RECOVERY
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
|
||||
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sort SD file listings in alphabetical order.
|
||||
|
@ -589,6 +589,10 @@
|
||||
* point in the file.
|
||||
*/
|
||||
//#define POWER_LOSS_RECOVERY
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
|
||||
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sort SD file listings in alphabetical order.
|
||||
|
@ -589,6 +589,10 @@
|
||||
* point in the file.
|
||||
*/
|
||||
//#define POWER_LOSS_RECOVERY
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
|
||||
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sort SD file listings in alphabetical order.
|
||||
|
@ -589,6 +589,10 @@
|
||||
* point in the file.
|
||||
*/
|
||||
//#define POWER_LOSS_RECOVERY
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
|
||||
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sort SD file listings in alphabetical order.
|
||||
|
@ -589,6 +589,10 @@
|
||||
* point in the file.
|
||||
*/
|
||||
//#define POWER_LOSS_RECOVERY
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
|
||||
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sort SD file listings in alphabetical order.
|
||||
|
@ -589,6 +589,10 @@
|
||||
* point in the file.
|
||||
*/
|
||||
//#define POWER_LOSS_RECOVERY
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
|
||||
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sort SD file listings in alphabetical order.
|
||||
|
@ -589,6 +589,10 @@
|
||||
* point in the file.
|
||||
*/
|
||||
//#define POWER_LOSS_RECOVERY
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
|
||||
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sort SD file listings in alphabetical order.
|
||||
|
@ -590,6 +590,10 @@
|
||||
* point in the file.
|
||||
*/
|
||||
//#define POWER_LOSS_RECOVERY
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
|
||||
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sort SD file listings in alphabetical order.
|
||||
|
@ -589,6 +589,10 @@
|
||||
* point in the file.
|
||||
*/
|
||||
//#define POWER_LOSS_RECOVERY
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
|
||||
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sort SD file listings in alphabetical order.
|
||||
|
@ -589,6 +589,10 @@
|
||||
* point in the file.
|
||||
*/
|
||||
//#define POWER_LOSS_RECOVERY
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
|
||||
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sort SD file listings in alphabetical order.
|
||||
|
@ -589,6 +589,10 @@
|
||||
* point in the file.
|
||||
*/
|
||||
//#define POWER_LOSS_RECOVERY
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
|
||||
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sort SD file listings in alphabetical order.
|
||||
|
@ -589,6 +589,10 @@
|
||||
* point in the file.
|
||||
*/
|
||||
//#define POWER_LOSS_RECOVERY
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
|
||||
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sort SD file listings in alphabetical order.
|
||||
|
@ -589,6 +589,10 @@
|
||||
* point in the file.
|
||||
*/
|
||||
//#define POWER_LOSS_RECOVERY
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
|
||||
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sort SD file listings in alphabetical order.
|
||||
|
@ -589,6 +589,10 @@
|
||||
* point in the file.
|
||||
*/
|
||||
//#define POWER_LOSS_RECOVERY
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
|
||||
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sort SD file listings in alphabetical order.
|
||||
|
@ -589,6 +589,10 @@
|
||||
* point in the file.
|
||||
*/
|
||||
//#define POWER_LOSS_RECOVERY
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
|
||||
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sort SD file listings in alphabetical order.
|
||||
|
@ -592,6 +592,10 @@
|
||||
* point in the file.
|
||||
*/
|
||||
//#define POWER_LOSS_RECOVERY
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
|
||||
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sort SD file listings in alphabetical order.
|
||||
|
@ -589,6 +589,10 @@
|
||||
* point in the file.
|
||||
*/
|
||||
//#define POWER_LOSS_RECOVERY
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
|
||||
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sort SD file listings in alphabetical order.
|
||||
|
@ -591,6 +591,10 @@
|
||||
* point in the file.
|
||||
*/
|
||||
//#define POWER_LOSS_RECOVERY
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
|
||||
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sort SD file listings in alphabetical order.
|
||||
|
@ -591,6 +591,10 @@
|
||||
* point in the file.
|
||||
*/
|
||||
//#define POWER_LOSS_RECOVERY
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
|
||||
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sort SD file listings in alphabetical order.
|
||||
|
@ -591,6 +591,10 @@
|
||||
* point in the file.
|
||||
*/
|
||||
//#define POWER_LOSS_RECOVERY
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
|
||||
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sort SD file listings in alphabetical order.
|
||||
|
@ -591,6 +591,10 @@
|
||||
* point in the file.
|
||||
*/
|
||||
//#define POWER_LOSS_RECOVERY
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
|
||||
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sort SD file listings in alphabetical order.
|
||||
|
@ -591,6 +591,10 @@
|
||||
* point in the file.
|
||||
*/
|
||||
//#define POWER_LOSS_RECOVERY
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
|
||||
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sort SD file listings in alphabetical order.
|
||||
|
@ -591,6 +591,10 @@
|
||||
* point in the file.
|
||||
*/
|
||||
//#define POWER_LOSS_RECOVERY
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
|
||||
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sort SD file listings in alphabetical order.
|
||||
|
@ -596,6 +596,10 @@
|
||||
* point in the file.
|
||||
*/
|
||||
//#define POWER_LOSS_RECOVERY
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
|
||||
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sort SD file listings in alphabetical order.
|
||||
|
@ -591,6 +591,10 @@
|
||||
* point in the file.
|
||||
*/
|
||||
//#define POWER_LOSS_RECOVERY
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
|
||||
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sort SD file listings in alphabetical order.
|
||||
|
@ -589,6 +589,10 @@
|
||||
* point in the file.
|
||||
*/
|
||||
//#define POWER_LOSS_RECOVERY
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
|
||||
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sort SD file listings in alphabetical order.
|
||||
|
@ -589,6 +589,10 @@
|
||||
* point in the file.
|
||||
*/
|
||||
//#define POWER_LOSS_RECOVERY
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
|
||||
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sort SD file listings in alphabetical order.
|
||||
|
@ -589,6 +589,10 @@
|
||||
* point in the file.
|
||||
*/
|
||||
//#define POWER_LOSS_RECOVERY
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
|
||||
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sort SD file listings in alphabetical order.
|
||||
|
@ -590,6 +590,10 @@
|
||||
* point in the file.
|
||||
*/
|
||||
//#define POWER_LOSS_RECOVERY
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
|
||||
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sort SD file listings in alphabetical order.
|
||||
|
@ -202,12 +202,19 @@ void save_job_recovery_info() {
|
||||
millis_t ms = millis();
|
||||
#endif
|
||||
if (
|
||||
#if SAVE_INFO_INTERVAL_MS > 0
|
||||
ELAPSED(ms, next_save_ms) ||
|
||||
#endif
|
||||
// Save on every command
|
||||
#if ENABLED(SAVE_EACH_CMD_MODE)
|
||||
true
|
||||
#else
|
||||
// Save if power loss pin is triggered
|
||||
#if PIN_EXISTS(POWER_LOSS)
|
||||
READ(POWER_LOSS_PIN) == POWER_LOSS_STATE ||
|
||||
#endif
|
||||
// Save if interval is elapsed
|
||||
#if SAVE_INFO_INTERVAL_MS > 0
|
||||
ELAPSED(ms, next_save_ms) ||
|
||||
#endif
|
||||
// Save on every new Z height
|
||||
(current_position[Z_AXIS] > 0 && current_position[Z_AXIS] > job_recovery_info.current_position[Z_AXIS])
|
||||
#endif
|
||||
) {
|
||||
@ -267,6 +274,11 @@ void save_job_recovery_info() {
|
||||
|
||||
card.openJobRecoveryFile(false);
|
||||
(void)card.saveJobRecoveryInfo();
|
||||
|
||||
// If power-loss pin was triggered, write just once then kill
|
||||
#if PIN_EXISTS(POWER_LOSS)
|
||||
if (READ(POWER_LOSS_PIN) == POWER_LOSS_STATE) kill(MSG_POWER_LOSS_RECOVERY);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user