Browse Source

Tweak powerloss info

vanilla_fb_2.0.x
Scott Lahteine 5 years ago
parent
commit
9fe781ccaf
  1. 4
      Marlin/src/feature/powerloss.cpp
  2. 6
      Marlin/src/feature/powerloss.h

4
Marlin/src/feature/powerloss.cpp

@ -185,7 +185,7 @@ void PrintJobRecovery::save(const bool force/*=false*/) {
#if EXTRUDERS > 1
for (int8_t e = 0; e < EXTRUDERS; e++) info.filament_size[e] = planner.filament_size[e];
#else
if (parser.volumetric_enabled) info.filament_size = planner.filament_size[active_extruder];
if (parser.volumetric_enabled) info.filament_size[0] = planner.filament_size[active_extruder];
#endif
#endif
@ -331,7 +331,7 @@ void PrintJobRecovery::resume() {
}
#else
if (info.volumetric_enabled) {
dtostrf(info.filament_size, 1, 3, str_1);
dtostrf(info.filament_size[0], 1, 3, str_1);
sprintf_P(cmd, PSTR("M200 D%s"), str_1);
gcode.process_subcommands_now(cmd);
}

6
Marlin/src/feature/powerloss.h

@ -61,11 +61,7 @@ typedef struct {
#if DISABLED(NO_VOLUMETRICS)
bool volumetric_enabled;
#if EXTRUDERS > 1
float filament_size[EXTRUDERS];
#else
float filament_size;
#endif
float filament_size[EXTRUDERS];
#endif
#if HAS_HOTEND

Loading…
Cancel
Save