Browse Source

Tweak powerloss info

Scott Lahteine 4 years ago
parent
commit
9fe781ccaf
2 changed files with 3 additions and 7 deletions
  1. 2
    2
      Marlin/src/feature/powerloss.cpp
  2. 1
    5
      Marlin/src/feature/powerloss.h

+ 2
- 2
Marlin/src/feature/powerloss.cpp View File

185
       #if EXTRUDERS > 1
185
       #if EXTRUDERS > 1
186
         for (int8_t e = 0; e < EXTRUDERS; e++) info.filament_size[e] = planner.filament_size[e];
186
         for (int8_t e = 0; e < EXTRUDERS; e++) info.filament_size[e] = planner.filament_size[e];
187
       #else
187
       #else
188
-        if (parser.volumetric_enabled) info.filament_size = planner.filament_size[active_extruder];
188
+        if (parser.volumetric_enabled) info.filament_size[0] = planner.filament_size[active_extruder];
189
       #endif
189
       #endif
190
     #endif
190
     #endif
191
 
191
 
331
       }
331
       }
332
     #else
332
     #else
333
       if (info.volumetric_enabled) {
333
       if (info.volumetric_enabled) {
334
-        dtostrf(info.filament_size, 1, 3, str_1);
334
+        dtostrf(info.filament_size[0], 1, 3, str_1);
335
         sprintf_P(cmd, PSTR("M200 D%s"), str_1);
335
         sprintf_P(cmd, PSTR("M200 D%s"), str_1);
336
         gcode.process_subcommands_now(cmd);
336
         gcode.process_subcommands_now(cmd);
337
       }
337
       }

+ 1
- 5
Marlin/src/feature/powerloss.h View File

61
 
61
 
62
   #if DISABLED(NO_VOLUMETRICS)
62
   #if DISABLED(NO_VOLUMETRICS)
63
     bool volumetric_enabled;
63
     bool volumetric_enabled;
64
-    #if EXTRUDERS > 1
65
-      float filament_size[EXTRUDERS];
66
-    #else
67
-      float filament_size;
68
-    #endif
64
+    float filament_size[EXTRUDERS];
69
   #endif
65
   #endif
70
 
66
 
71
   #if HAS_HOTEND
67
   #if HAS_HOTEND

Loading…
Cancel
Save