Browse Source

Fix PID autotune timeout (#18352)

Giuliano Zaro 4 years ago
parent
commit
88e4dffe88
No account linked to committer's email address
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      Marlin/src/module/temperature.cpp

+ 1
- 1
Marlin/src/module/temperature.cpp View File

568
       #ifndef MAX_CYCLE_TIME_PID_AUTOTUNE
568
       #ifndef MAX_CYCLE_TIME_PID_AUTOTUNE
569
         #define MAX_CYCLE_TIME_PID_AUTOTUNE 20L
569
         #define MAX_CYCLE_TIME_PID_AUTOTUNE 20L
570
       #endif
570
       #endif
571
-      if (((ms - t1) + (ms - t2)) > (MAX_CYCLE_TIME_PID_AUTOTUNE * 60L * 1000L)) {
571
+      if ((ms - _MIN(t1, t2)) > (MAX_CYCLE_TIME_PID_AUTOTUNE * 60L * 1000L)) {
572
         TERN_(DWIN_CREALITY_LCD, Popup_Window_Temperature(0));
572
         TERN_(DWIN_CREALITY_LCD, Popup_Window_Temperature(0));
573
         TERN_(EXTENSIBLE_UI, ExtUI::onPidTuning(ExtUI::result_t::PID_TUNING_TIMEOUT));
573
         TERN_(EXTENSIBLE_UI, ExtUI::onPidTuning(ExtUI::result_t::PID_TUNING_TIMEOUT));
574
         SERIAL_ECHOLNPGM(STR_PID_TIMEOUT);
574
         SERIAL_ECHOLNPGM(STR_PID_TIMEOUT);

Loading…
Cancel
Save