Merge upstream changes from Marlin 2.1.2.2

This commit is contained in:
Stefan Kalscheuer
2024-02-13 20:32:22 +01:00
parent e466309bfb
commit 752476dc8f
1367 changed files with 41601 additions and 31124 deletions

View File

@@ -67,16 +67,15 @@ uint32_t PrintJobRecovery::cmd_sdpos, // = 0
PrintJobRecovery recovery;
#ifndef POWER_LOSS_PURGE_LEN
#define POWER_LOSS_PURGE_LEN 0
#endif
#if DISABLED(BACKUP_POWER_SUPPLY)
#undef POWER_LOSS_RETRACT_LEN // No retract at outage without backup power
#endif
#ifndef POWER_LOSS_RETRACT_LEN
#define POWER_LOSS_RETRACT_LEN 0
#endif
#ifndef POWER_LOSS_PURGE_LEN
#define POWER_LOSS_PURGE_LEN 0
#endif
// Allow power-loss recovery to be aborted
#define PLR_CAN_ABORT
@@ -109,6 +108,7 @@ void PrintJobRecovery::changed() {
purge();
else if (IS_SD_PRINTING())
save(true);
TERN_(EXTENSIBLE_UI, ExtUI::onSetPowerLoss(enabled));
}
/**
@@ -215,15 +215,13 @@ void PrintJobRecovery::save(const bool force/*=false*/, const float zraise/*=POW
#endif
#endif
#if HAS_EXTRUDERS
#if HAS_HOTEND
HOTEND_LOOP() info.target_temperature[e] = thermalManager.degTargetHotend(e);
#endif
TERN_(HAS_HEATED_BED, info.target_temperature_bed = thermalManager.degTargetBed());
#if HAS_FAN
COPY(info.fan_speed, thermalManager.fan_speed);
#endif
TERN_(HAS_FAN, COPY(info.fan_speed, thermalManager.fan_speed));
#if HAS_LEVELING
info.flag.leveling = planner.leveling_active;
@@ -313,6 +311,9 @@ void PrintJobRecovery::save(const bool force/*=false*/, const float zraise/*=POW
// and a flag whether the raise was already done here.
if (IS_SD_PRINTING()) save(true, zraise, ENABLED(BACKUP_POWER_SUPPLY));
// Tell the LCD about the outage, even though it is about to die
TERN_(EXTENSIBLE_UI, ExtUI::onPowerLoss());
// Disable all heaters to reduce power loss
thermalManager.disable_all_heaters();
@@ -622,7 +623,7 @@ void PrintJobRecovery::resume() {
#if ENABLED(GCODE_REPEAT_MARKERS)
DEBUG_ECHOLNPGM("repeat index: ", info.stored_repeat.index);
LOOP_L_N(i, info.stored_repeat.index)
for (uint8_t i = 0; i < info.stored_repeat.index; ++i)
DEBUG_ECHOLNPGM("..... sdpos: ", info.stored_repeat.marker.sdpos, " count: ", info.stored_repeat.marker.counter);
#endif
@@ -691,7 +692,7 @@ void PrintJobRecovery::resume() {
#endif
// Mixing extruder and gradient
#if BOTH(MIXING_EXTRUDER, GRADIENT_MIX)
#if ALL(MIXING_EXTRUDER, GRADIENT_MIX)
DEBUG_ECHOLNPGM("gradient: ", info.gradient.enabled ? "ON" : "OFF");
#endif
@@ -710,7 +711,9 @@ void PrintJobRecovery::resume() {
DEBUG_ECHOLNPGM("flag.dryrun: ", AS_DIGIT(info.flag.dryrun));
DEBUG_ECHOLNPGM("flag.allow_cold_extrusion: ", AS_DIGIT(info.flag.allow_cold_extrusion));
DEBUG_ECHOLNPGM("flag.volumetric_enabled: ", AS_DIGIT(info.flag.volumetric_enabled));
#if DISABLED(NO_VOLUMETRICS)
DEBUG_ECHOLNPGM("flag.volumetric_enabled: ", AS_DIGIT(info.flag.volumetric_enabled));
#endif
}
else
DEBUG_ECHOLNPGM("INVALID DATA");