Power Loss Recovery
Configuration Method
-
Supports power loss recovery and selection of power loss recovery mode, you can choose to recover by layer or recover from the power loss point
-
Add the following code in
Configuration.h
#define FLY_POWER
#define FLY_POWER_LOSS_PING PB11
#define FLY_POWER_LOSS_STATE HIGH
- Add the following code in
Marlin\src\MarlinCore.cpp
#if ENABLED(FLY_POWER)
// if (printJobOngoing() && (READ(FLY_POWER_LOSS_PING) == FLY_POWER_LOSS_STATE)){
if ( (READ(FLY_POWER_LOSS_PING) == FLY_POWER_LOSS_STATE)){
WRITE( FLY_BEEP_PING , HIGH );
// thermalManager.;
static millis_t send_power_ms = 0;
const millis_t power_ms = millis();
if((power_ms - send_power_ms ) >= 200){
thermalManager.setTargetBed(0);
SERIAL_ECHOLNPGM("power_LOSS");
//queue.inject_P(PSTR("M81"));
send_power_ms = millis();
}
}
#endif
Loading...