Tweak powerloss info

This commit is contained in:
Scott Lahteine 2020-05-04 16:37:20 -05:00
parent b8947ac8a5
commit 9fe781ccaf
2 changed files with 3 additions and 7 deletions

View File

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

View File

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