|
@@ -183,6 +183,15 @@ void PrintJobRecovery::save(const bool force/*=false*/, const bool save_queue/*=
|
183
|
183
|
info.active_extruder = active_extruder;
|
184
|
184
|
#endif
|
185
|
185
|
|
|
186
|
+ #if DISABLED(NO_VOLUMETRICS)
|
|
187
|
+ info.volumetric_enabled = parser.volumetric_enabled;
|
|
188
|
+ #if EXTRUDERS > 1
|
|
189
|
+ for (int8_t e = 0; e < EXTRUDERS; e++) info.filament_size[e] = planner.filament_size[e];
|
|
190
|
+ #else
|
|
191
|
+ if (parser.volumetric_enabled) info.filament_size = planner.filament_size[active_extruder];
|
|
192
|
+ #endif
|
|
193
|
+ #endif
|
|
194
|
+
|
186
|
195
|
#if EXTRUDERS
|
187
|
196
|
HOTEND_LOOP() info.target_temperature[e] = thermalManager.temp_hotend[e].target;
|
188
|
197
|
#endif
|
|
@@ -291,6 +300,27 @@ void PrintJobRecovery::resume() {
|
291
|
300
|
gcode.process_subcommands_now(cmd);
|
292
|
301
|
#endif
|
293
|
302
|
|
|
303
|
+ // Recover volumetric extrusion state
|
|
304
|
+ #if DISABLED(NO_VOLUMETRICS)
|
|
305
|
+ #if EXTRUDERS > 1
|
|
306
|
+ for (int8_t e = 0; e < EXTRUDERS; e++) {
|
|
307
|
+ dtostrf(info.filament_size[e], 1, 3, str_1);
|
|
308
|
+ sprintf_P(cmd, PSTR("M200 T%i D%s"), e, str_1);
|
|
309
|
+ gcode.process_subcommands_now(cmd);
|
|
310
|
+ }
|
|
311
|
+ if (!info.volumetric_enabled) {
|
|
312
|
+ sprintf_P(cmd, PSTR("M200 T%i D0"), info.active_extruder);
|
|
313
|
+ gcode.process_subcommands_now(cmd);
|
|
314
|
+ }
|
|
315
|
+ #else
|
|
316
|
+ if (info.volumetric_enabled) {
|
|
317
|
+ dtostrf(info.filament_size, 1, 3, str_1);
|
|
318
|
+ sprintf_P(cmd, PSTR("M200 D%s"), str_1);
|
|
319
|
+ gcode.process_subcommands_now(cmd);
|
|
320
|
+ }
|
|
321
|
+ #endif
|
|
322
|
+ #endif
|
|
323
|
+
|
294
|
324
|
#if HAS_HEATED_BED
|
295
|
325
|
const int16_t bt = info.target_temperature_bed;
|
296
|
326
|
if (bt) {
|