Переглянути джерело

Fix Watchdog time out during long lasting DELTA moves

During long lasting moves of a delta machine neither the temperatures are maintained nor buttons checked nor ... .
The fix is to call 'manage_heater()' and 'idle()' every now and then in the loop where the move is segmented. 
The code is abot the same as in G2_G3 wher we had the same problem with too large circles lasting too long.
Fixing #7510
AnHardt 7 роки тому
джерело
коміт
f1757f30cb
1 змінених файлів з 8 додано та 0 видалено
  1. 8
    0
      Marlin/Marlin_main.cpp

+ 8
- 0
Marlin/Marlin_main.cpp Переглянути файл

12746
 
12746
 
12747
     // Calculate and execute the segments
12747
     // Calculate and execute the segments
12748
     for (uint16_t s = segments + 1; --s;) {
12748
     for (uint16_t s = segments + 1; --s;) {
12749
+
12750
+      static millis_t next_idle_ms = millis() + 200UL;
12751
+      thermalManager.manage_heater();  // This returns immediately if not really needed.
12752
+      if (ELAPSED(millis(), next_idle_ms)) {
12753
+        next_idle_ms = millis() + 200UL;
12754
+        idle();
12755
+      }
12756
+
12749
       LOOP_XYZE(i) raw[i] += segment_distance[i];
12757
       LOOP_XYZE(i) raw[i] += segment_distance[i];
12750
       #if ENABLED(DELTA)
12758
       #if ENABLED(DELTA)
12751
         DELTA_RAW_IK(); // Delta can inline its kinematics
12759
         DELTA_RAW_IK(); // Delta can inline its kinematics

Завантаження…
Відмінити
Зберегти