Idle during long arcs

Idle during long arcs
to prevent from watchdog resets during high segmented fast arcs.
This commit is contained in:
AnHardt 2016-05-14 00:29:13 +02:00
parent b74af78736
commit 8a4376d51f

View File

@ -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);
@ -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;