Просмотр исходного кода

Fix de after PREVENT_DANGEROUS_EXTRUDE

- Set `de` to 0 when `position[E] = target[E]`
- Address regression mention in #1846
Scott Lahteine 9 лет назад
Родитель
Сommit
1d291be2ba
1 измененных файлов: 2 добавлений и 0 удалений
  1. 2
    0
      Marlin/planner.cpp

+ 2
- 0
Marlin/planner.cpp Просмотреть файл

@@ -511,12 +511,14 @@ float junction_deviation = 0.1;
511 511
     if (de) {
512 512
       if (degHotend(active_extruder) < extrude_min_temp) {
513 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 515
         SERIAL_ECHO_START;
515 516
         SERIAL_ECHOLNPGM(MSG_ERR_COLD_EXTRUDE_STOP);
516 517
       }
517 518
       #ifdef PREVENT_LENGTHY_EXTRUDE
518 519
         if (labs(de) > axis_steps_per_unit[E_AXIS] * EXTRUDE_MAXLENGTH) {
519 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 522
           SERIAL_ECHO_START;
521 523
           SERIAL_ECHOLNPGM(MSG_ERR_LONG_EXTRUDE_STOP);
522 524
         }

Загрузка…
Отмена
Сохранить