Quellcode durchsuchen

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 vor 7 Jahren
Ursprung
Commit
02aa93a6ad
1 geänderte Dateien mit 8 neuen und 0 gelöschten Zeilen
  1. 8
    0
      Marlin/src/module/motion.cpp

+ 8
- 0
Marlin/src/module/motion.cpp Datei anzeigen

594
 
594
 
595
     // Calculate and execute the segments
595
     // Calculate and execute the segments
596
     for (uint16_t s = segments + 1; --s;) {
596
     for (uint16_t s = segments + 1; --s;) {
597
+
598
+      static millis_t next_idle_ms = millis() + 200UL;
599
+      thermalManager.manage_heater();  // This returns immediately if not really needed.
600
+      if (ELAPSED(millis(), next_idle_ms)) {
601
+        next_idle_ms = millis() + 200UL;
602
+        idle();
603
+      }
604
+
597
       LOOP_XYZE(i) raw[i] += segment_distance[i];
605
       LOOP_XYZE(i) raw[i] += segment_distance[i];
598
       #if ENABLED(DELTA)
606
       #if ENABLED(DELTA)
599
         DELTA_RAW_IK(); // Delta can inline its kinematics
607
         DELTA_RAW_IK(); // Delta can inline its kinematics

Laden…
Abbrechen
Speichern