Skip to content

Commit

Permalink
Idle during long arcs
Browse files Browse the repository at this point in the history
Idle during long arcs
to prevent from watchdog resets during high segmented fast arcs.
  • Loading branch information
AnHardt committed May 13, 2016
1 parent b74af78 commit 8a4376d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Marlin/Marlin_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6488,7 +6488,7 @@ void process_next_command() {
break;

// G2, G3
#if ENABLED(ARC_SUPPORT) & DISABLED(SCARA)
#if ENABLED(ARC_SUPPORT) && DISABLED(SCARA)
case 2: // G2 - CW ARC
case 3: // G3 - CCW ARC
gcode_G2_G3(codenum == 2);
Expand Down Expand Up @@ -7514,8 +7514,16 @@ void prepare_move() {

float feed_rate = feedrate * feedrate_multiplier / 60 / 100.0;

millis_t previous_ms = millis();

for (i = 1; i < segments; i++) { // Iterate (segments-1) times

millis_t now = millis();
if (now - previous_ms > 200UL) {
previous_ms = now;
idle();
}

if (++count < N_ARC_CORRECTION) {
// Apply vector rotation matrix to previous r_X / 1
r_new_Y = r_X * sin_T + r_Y * cos_T;
Expand Down

0 comments on commit 8a4376d

Please sign in to comment.