Power Loss Recovery with a UPS (#15943)

This commit is contained in:
BigTreeTech
2019-11-21 07:40:21 +08:00
committed by Scott Lahteine
parent ab9f0f2c4f
commit ab8b24fdba
111 changed files with 290 additions and 31 deletions

View File

@@ -168,7 +168,7 @@ class PrintJobRecovery {
#if PIN_EXISTS(POWER_LOSS)
static inline void outage() {
if (enabled && IS_SD_PRINTING() && READ(POWER_LOSS_PIN) == POWER_LOSS_STATE)
if (enabled && READ(POWER_LOSS_PIN) == POWER_LOSS_STATE)
_outage();
}
#endif
@@ -184,6 +184,10 @@ class PrintJobRecovery {
private:
static void write();
#if ENABLED(BACKUP_POWER_SUPPLY)
static void raise_z();
#endif
#if PIN_EXISTS(POWER_LOSS)
static void _outage();
#endif