Skip to content

Commit

Permalink
Fix Watchdog time out during long lasting DELTA moves
Browse files Browse the repository at this point in the history
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 MarlinFirmware#7510
  • Loading branch information
AnHardt committed Nov 28, 2017
1 parent ddab153 commit f1757f3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Marlin/Marlin_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12746,6 +12746,14 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {

// Calculate and execute the segments
for (uint16_t s = segments + 1; --s;) {

static millis_t next_idle_ms = millis() + 200UL;
thermalManager.manage_heater(); // This returns immediately if not really needed.
if (ELAPSED(millis(), next_idle_ms)) {
next_idle_ms = millis() + 200UL;
idle();
}

LOOP_XYZE(i) raw[i] += segment_distance[i];
#if ENABLED(DELTA)
DELTA_RAW_IK(); // Delta can inline its kinematics
Expand Down

0 comments on commit f1757f3

Please sign in to comment.