|
@@ -180,10 +180,10 @@ void PrintJobRecovery::save(const bool force/*=false*/, const float zraise/*=0*/
|
180
|
180
|
|
181
|
181
|
// Machine state
|
182
|
182
|
info.current_position = current_position;
|
|
183
|
+ info.feedrate = uint16_t(feedrate_mm_s * 60.0f);
|
183
|
184
|
info.zraise = zraise;
|
184
|
185
|
TERN_(HAS_HOME_OFFSET, info.home_offset = home_offset);
|
185
|
186
|
TERN_(HAS_POSITION_SHIFT, info.position_shift = position_shift);
|
186
|
|
- info.feedrate = uint16_t(feedrate_mm_s * 60.0f);
|
187
|
187
|
|
188
|
188
|
#if HAS_MULTI_EXTRUDER
|
189
|
189
|
info.active_extruder = active_extruder;
|
|
@@ -209,7 +209,7 @@ void PrintJobRecovery::save(const bool force/*=false*/, const float zraise/*=0*/
|
209
|
209
|
#endif
|
210
|
210
|
|
211
|
211
|
#if HAS_LEVELING
|
212
|
|
- info.leveling = planner.leveling_active;
|
|
212
|
+ info.flag.leveling = planner.leveling_active;
|
213
|
213
|
info.fade = TERN0(ENABLE_LEVELING_FADE_HEIGHT, planner.z_fade_height);
|
214
|
214
|
#endif
|
215
|
215
|
|
|
@@ -220,12 +220,12 @@ void PrintJobRecovery::save(const bool force/*=false*/, const float zraise/*=0*/
|
220
|
220
|
info.retract_hop = fwretract.current_hop;
|
221
|
221
|
#endif
|
222
|
222
|
|
223
|
|
- // Relative axis modes
|
224
|
|
- info.axis_relative = gcode.axis_relative;
|
225
|
|
-
|
226
|
223
|
// Elapsed print job time
|
227
|
224
|
info.print_job_elapsed = print_job_timer.duration();
|
228
|
225
|
|
|
226
|
+ // Relative axis modes
|
|
227
|
+ info.axis_relative = gcode.axis_relative;
|
|
228
|
+
|
229
|
229
|
// Misc. Marlin flags
|
230
|
230
|
info.flag.dryrun = !!(marlin_debug_flags & MARLIN_DEBUG_DRYRUN);
|
231
|
231
|
info.flag.allow_cold_extrusion = TERN0(PREVENT_COLD_EXTRUSION, thermalManager.allow_cold_extrude);
|
|
@@ -457,8 +457,8 @@ void PrintJobRecovery::resume() {
|
457
|
457
|
#if HAS_LEVELING
|
458
|
458
|
// Restore leveling state before 'G92 Z' to ensure
|
459
|
459
|
// the Z stepper count corresponds to the native Z.
|
460
|
|
- if (info.fade || info.leveling) {
|
461
|
|
- sprintf_P(cmd, PSTR("M420 S%i Z%s"), int(info.leveling), dtostrf(info.fade, 1, 1, str_1));
|
|
460
|
+ if (info.fade || info.flag.leveling) {
|
|
461
|
+ sprintf_P(cmd, PSTR("M420 S%i Z%s"), int(info.flag.leveling), dtostrf(info.fade, 1, 1, str_1));
|
462
|
462
|
gcode.process_subcommands_now(cmd);
|
463
|
463
|
}
|
464
|
464
|
#endif
|
|
@@ -507,15 +507,15 @@ void PrintJobRecovery::resume() {
|
507
|
507
|
sprintf_P(cmd, PSTR("G92.9 E%s"), dtostrf(info.current_position.e, 1, 3, str_1));
|
508
|
508
|
gcode.process_subcommands_now(cmd);
|
509
|
509
|
|
510
|
|
- // Relative axis modes
|
511
|
|
- gcode.axis_relative = info.axis_relative;
|
512
|
|
-
|
513
|
510
|
TERN_(HAS_HOME_OFFSET, home_offset = info.home_offset);
|
514
|
511
|
TERN_(HAS_POSITION_SHIFT, position_shift = info.position_shift);
|
515
|
512
|
#if HAS_HOME_OFFSET || HAS_POSITION_SHIFT
|
516
|
513
|
LOOP_XYZ(i) update_workspace_offset((AxisEnum)i);
|
517
|
514
|
#endif
|
518
|
515
|
|
|
516
|
+ // Relative axis modes
|
|
517
|
+ gcode.axis_relative = info.axis_relative;
|
|
518
|
+
|
519
|
519
|
#if ENABLED(DEBUG_POWER_LOSS_RECOVERY)
|
520
|
520
|
const uint8_t old_flags = marlin_debug_flags;
|
521
|
521
|
marlin_debug_flags |= MARLIN_DEBUG_ECHO;
|
|
@@ -598,7 +598,7 @@ void PrintJobRecovery::resume() {
|
598
|
598
|
#endif
|
599
|
599
|
|
600
|
600
|
#if HAS_LEVELING
|
601
|
|
- DEBUG_ECHOLNPAIR("leveling: ", int(info.leveling), " fade: ", info.fade);
|
|
601
|
+ DEBUG_ECHOLNPAIR("leveling: ", int(info.flag.leveling), " fade: ", info.fade);
|
602
|
602
|
#endif
|
603
|
603
|
#if ENABLED(FWRETRACT)
|
604
|
604
|
DEBUG_ECHOPGM("retract: ");
|