Quellcode durchsuchen

Use the extruder argument in plan_buffer_line

Scott Lahteine vor 9 Jahren
Ursprung
Commit
8857b9e921
2 geänderte Dateien mit 5 neuen und 8 gelöschten Zeilen
  1. 4
    4
      Marlin/planner.cpp
  2. 1
    4
      Marlin/stepper.cpp

+ 4
- 4
Marlin/planner.cpp Datei anzeigen

@@ -504,7 +504,7 @@ float junction_deviation = 0.1;
504 504
 
505 505
   #ifdef PREVENT_DANGEROUS_EXTRUDE
506 506
     if (de) {
507
-      if (degHotend(active_extruder) < extrude_min_temp) {
507
+      if (degHotend(extruder) < extrude_min_temp) {
508 508
         position[E_AXIS] = target[E_AXIS]; // Behave as if the move really took place, but ignore E part
509 509
         de = 0; // no difference
510 510
         SERIAL_ECHO_START;
@@ -541,8 +541,8 @@ float junction_deviation = 0.1;
541 541
 
542 542
   block->steps[Z_AXIS] = labs(dz);
543 543
   block->steps[E_AXIS] = labs(de);
544
-  block->steps[E_AXIS] *= volumetric_multiplier[active_extruder];
545
-  block->steps[E_AXIS] *= extruder_multiply[active_extruder];
544
+  block->steps[E_AXIS] *= volumetric_multiplier[extruder];
545
+  block->steps[E_AXIS] *= extruder_multiply[extruder];
546 546
   block->steps[E_AXIS] /= 100;
547 547
   block->step_event_count = max(block->steps[X_AXIS], max(block->steps[Y_AXIS], max(block->steps[Z_AXIS], block->steps[E_AXIS])));
548 548
 
@@ -676,7 +676,7 @@ float junction_deviation = 0.1;
676 676
     delta_mm[Y_AXIS] = dy / axis_steps_per_unit[Y_AXIS];
677 677
   #endif
678 678
   delta_mm[Z_AXIS] = dz / axis_steps_per_unit[Z_AXIS];
679
-  delta_mm[E_AXIS] = (de / axis_steps_per_unit[E_AXIS]) * volumetric_multiplier[active_extruder] * extruder_multiply[active_extruder] / 100.0;
679
+  delta_mm[E_AXIS] = (de / axis_steps_per_unit[E_AXIS]) * volumetric_multiplier[extruder] * extruder_multiply[extruder] / 100.0;
680 680
 
681 681
   if (block->steps[X_AXIS] <= dropsegments && block->steps[Y_AXIS] <= dropsegments && block->steps[Z_AXIS] <= dropsegments) {
682 682
     block->millimeters = fabs(delta_mm[E_AXIS]);

+ 1
- 4
Marlin/stepper.cpp Datei anzeigen

@@ -1072,10 +1072,7 @@ void st_init() {
1072 1072
       TCCR0A &= ~BIT(WGM01);
1073 1073
       TCCR0A &= ~BIT(WGM00);
1074 1074
     #endif
1075
-    e_steps[0] = 0;
1076
-    e_steps[1] = 0;
1077
-    e_steps[2] = 0;
1078
-    e_steps[3] = 0;
1075
+    e_steps[0] = e_steps[1] = e_steps[2] = e_steps[3] = 0;
1079 1076
     TIMSK0 |= BIT(OCIE0A);
1080 1077
   #endif //ADVANCE
1081 1078
 

Laden…
Abbrechen
Speichern