Browse Source

Replace extrudemultiply by extruder_multiply[active_extruder]

Fix for #1460.

Seems to work with only one extruder. Can't test this myself with more.
AnHardt 9 years ago
parent
commit
50a732360a
5 changed files with 6 additions and 8 deletions
  1. 0
    1
      Marlin/Marlin.h
  2. 2
    3
      Marlin/Marlin_main.cpp
  3. 1
    1
      Marlin/dogm_lcd_implementation.h
  4. 2
    2
      Marlin/planner.cpp
  5. 1
    1
      Marlin/ultralcd.cpp

+ 0
- 1
Marlin/Marlin.h View File

@@ -229,7 +229,6 @@ void refresh_cmd_timeout(void);
229 229
 extern float homing_feedrate[];
230 230
 extern bool axis_relative_modes[];
231 231
 extern int feedmultiply;
232
-extern int extrudemultiply; // Sets extrude multiply factor (in percent) for all extruders
233 232
 extern bool volumetric_enabled;
234 233
 extern int extruder_multiply[EXTRUDERS]; // sets extrude multiply factor (in percent) for each extruder individually
235 234
 extern float filament_size[EXTRUDERS]; // cross-sectional area of filament (in millimeters), typically around 1.75 or 2.85, 0 disables the volumetric calculations for the extruder.

+ 2
- 3
Marlin/Marlin_main.cpp View File

@@ -210,7 +210,6 @@ int homing_bump_divisor[] = HOMING_BUMP_DIVISOR;
210 210
 bool axis_relative_modes[] = AXIS_RELATIVE_MODES;
211 211
 int feedmultiply = 100; //100->1 200->2
212 212
 int saved_feedmultiply;
213
-int extrudemultiply = 100; //100->1 200->2
214 213
 int extruder_multiply[EXTRUDERS] = ARRAY_BY_EXTRUDERS(100, 100, 100, 100);
215 214
 bool volumetric_enabled = false;
216 215
 float filament_size[EXTRUDERS] = ARRAY_BY_EXTRUDERS(DEFAULT_NOMINAL_FILAMENT_DIA, DEFAULT_NOMINAL_FILAMENT_DIA, DEFAULT_NOMINAL_FILAMENT_DIA, DEFAULT_NOMINAL_FILAMENT_DIA);
@@ -3776,7 +3775,7 @@ inline void gcode_M221() {
3776 3775
       extruder_multiply[tmp_extruder] = sval;
3777 3776
     }
3778 3777
     else {
3779
-      extrudemultiply = sval;
3778
+      extruder_multiply[active_extruder] = sval;
3780 3779
     }
3781 3780
   }
3782 3781
 }
@@ -4213,7 +4212,7 @@ inline void gcode_M400() { st_synchronize(); }
4213 4212
     //SERIAL_PROTOCOLPGM("Filament dia (measured mm):");
4214 4213
     //SERIAL_PROTOCOL(filament_width_meas);
4215 4214
     //SERIAL_PROTOCOLPGM("Extrusion ratio(%):");
4216
-    //SERIAL_PROTOCOL(extrudemultiply);
4215
+    //SERIAL_PROTOCOL(extruder_multiply[active_extruder]);
4217 4216
   }
4218 4217
 
4219 4218
   /**

+ 1
- 1
Marlin/dogm_lcd_implementation.h View File

@@ -369,7 +369,7 @@ static void lcd_implementation_status_screen() {
369 369
       lcd_printPGM(PSTR("dia:"));
370 370
       lcd_print(ftostr12ns(filament_width_meas));
371 371
       lcd_printPGM(PSTR(" factor:"));
372
-      lcd_print(itostr3(extrudemultiply));
372
+      lcd_print(itostr3(extruder_multiply[active_extruder]));
373 373
       lcd_print('%');
374 374
     }
375 375
   #endif

+ 2
- 2
Marlin/planner.cpp View File

@@ -545,7 +545,7 @@ float junction_deviation = 0.1;
545 545
   block->steps[Z_AXIS] = labs(dz);
546 546
   block->steps[E_AXIS] = labs(de);
547 547
   block->steps[E_AXIS] *= volumetric_multiplier[active_extruder];
548
-  block->steps[E_AXIS] *= extrudemultiply;
548
+  block->steps[E_AXIS] *= extruder_multiply[active_extruder];
549 549
   block->steps[E_AXIS] /= 100;
550 550
   block->step_event_count = max(block->steps[X_AXIS], max(block->steps[Y_AXIS], max(block->steps[Z_AXIS], block->steps[E_AXIS])));
551 551
 
@@ -679,7 +679,7 @@ float junction_deviation = 0.1;
679 679
     delta_mm[Y_AXIS] = dy / axis_steps_per_unit[Y_AXIS];
680 680
   #endif
681 681
   delta_mm[Z_AXIS] = dz / axis_steps_per_unit[Z_AXIS];
682
-  delta_mm[E_AXIS] = (de / axis_steps_per_unit[E_AXIS]) * volumetric_multiplier[active_extruder] * extrudemultiply / 100.0;
682
+  delta_mm[E_AXIS] = (de / axis_steps_per_unit[E_AXIS]) * volumetric_multiplier[active_extruder] * extruder_multiply[active_extruder] / 100.0;
683 683
 
684 684
   if (block->steps[X_AXIS] <= dropsegments && block->steps[Y_AXIS] <= dropsegments && block->steps[Z_AXIS] <= dropsegments) {
685 685
     block->millimeters = fabs(delta_mm[E_AXIS]);

+ 1
- 1
Marlin/ultralcd.cpp View File

@@ -485,7 +485,7 @@ static void lcd_tune_menu() {
485 485
     MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_BED, &target_temperature_bed, 0, BED_MAXTEMP - 15);
486 486
   #endif
487 487
   MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_FAN_SPEED, &fanSpeed, 0, 255);
488
-  MENU_ITEM_EDIT(int3, MSG_FLOW, &extrudemultiply, 10, 999);
488
+  MENU_ITEM_EDIT(int3, MSG_FLOW, &extruder_multiply[active_extruder], 10, 999);
489 489
   MENU_ITEM_EDIT(int3, MSG_FLOW MSG_F0, &extruder_multiply[0], 10, 999);
490 490
   #if TEMP_SENSOR_1 != 0
491 491
     MENU_ITEM_EDIT(int3, MSG_FLOW MSG_F1, &extruder_multiply[1], 10, 999);

Loading…
Cancel
Save