Pārlūkot izejas kodu

save last extruder and set stepper directions too in case the extruder changed

fixes MarlinFirmware/Marlin#3144 and MarlinFirmware/Marlin#3083
Alexander Leisentritt 8 gadus atpakaļ
vecāks
revīzija
4338813814
1 mainītis faili ar 4 papildinājumiem un 1 dzēšanām
  1. 4
    1
      Marlin/stepper.cpp

+ 4
- 1
Marlin/stepper.cpp Parādīt failu

@@ -574,8 +574,11 @@ void set_stepper_direction() {
574 574
 // block begins.
575 575
 FORCE_INLINE void trapezoid_generator_reset() {
576 576
 
577
-  if (current_block->direction_bits != out_bits) {
577
+  static int8_t last_extruder = -1;
578
+
579
+  if (current_block->direction_bits != out_bits || current_block->active_extruder != last_extruder) {
578 580
     out_bits = current_block->direction_bits;
581
+    last_extruder = current_block->active_extruder;
579 582
     set_stepper_direction();
580 583
   }
581 584
 

Notiek ielāde…
Atcelt
Saglabāt