Pārlūkot izejas kodu

Fix de after PREVENT_DANGEROUS_EXTRUDE

- Set `de` to 0 when `position[E] = target[E]`
- Address regression mention in #1846
Scott Lahteine 10 gadus atpakaļ
vecāks
revīzija
1d291be2ba
1 mainītis faili ar 2 papildinājumiem un 0 dzēšanām
  1. 2
    0
      Marlin/planner.cpp

+ 2
- 0
Marlin/planner.cpp Parādīt failu

511
     if (de) {
511
     if (de) {
512
       if (degHotend(active_extruder) < extrude_min_temp) {
512
       if (degHotend(active_extruder) < extrude_min_temp) {
513
         position[E_AXIS] = target[E_AXIS]; //behave as if the move really took place, but ignore E part
513
         position[E_AXIS] = target[E_AXIS]; //behave as if the move really took place, but ignore E part
514
+        de = 0; // no difference
514
         SERIAL_ECHO_START;
515
         SERIAL_ECHO_START;
515
         SERIAL_ECHOLNPGM(MSG_ERR_COLD_EXTRUDE_STOP);
516
         SERIAL_ECHOLNPGM(MSG_ERR_COLD_EXTRUDE_STOP);
516
       }
517
       }
517
       #ifdef PREVENT_LENGTHY_EXTRUDE
518
       #ifdef PREVENT_LENGTHY_EXTRUDE
518
         if (labs(de) > axis_steps_per_unit[E_AXIS] * EXTRUDE_MAXLENGTH) {
519
         if (labs(de) > axis_steps_per_unit[E_AXIS] * EXTRUDE_MAXLENGTH) {
519
           position[E_AXIS] = target[E_AXIS]; // Behave as if the move really took place, but ignore E part
520
           position[E_AXIS] = target[E_AXIS]; // Behave as if the move really took place, but ignore E part
521
+          de = 0; // no difference
520
           SERIAL_ECHO_START;
522
           SERIAL_ECHO_START;
521
           SERIAL_ECHOLNPGM(MSG_ERR_LONG_EXTRUDE_STOP);
523
           SERIAL_ECHOLNPGM(MSG_ERR_LONG_EXTRUDE_STOP);
522
         }
524
         }

Notiek ielāde…
Atcelt
Saglabāt