From b1af141af557e46a2086863e3a16ddbbaf2bc270 Mon Sep 17 00:00:00 2001 From: Alden Hart Date: Thu, 26 Jan 2017 14:02:05 -0500 Subject: [PATCH] =?UTF-8?q?Added=20=E2=80=9Cno=20parameters=E2=80=9D=20tes?= =?UTF-8?q?t=20to=20arc=20moves?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- g2core/g2core.cppproj | 12 +++++------- g2core/plan_arc.cpp | 9 +++++++++ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/g2core/g2core.cppproj b/g2core/g2core.cppproj index 5ce23b64..4e9ca4ea 100644 --- a/g2core/g2core.cppproj +++ b/g2core/g2core.cppproj @@ -21,10 +21,8 @@ exception_table 1 3.5.0 - - - - + SWD + com.atmel.avrdbg.tool.atmelice com.atmel.avrdbg.tool.samice J-Link @@ -70,7 +68,7 @@ - 10000000 + 2000000 SWD @@ -103,8 +101,8 @@ true J41800036434 - 0x284E0A60 - 10000000 + 0x285E0A60 + 2000000 diff --git a/g2core/plan_arc.cpp b/g2core/plan_arc.cpp index 6ee047e3..8fb63422 100644 --- a/g2core/plan_arc.cpp +++ b/g2core/plan_arc.cpp @@ -133,6 +133,15 @@ stat_t cm_arc_feed(const float target[], const bool target_f[], // target en // Some things you might think are errors but are not: // - offset specified for linear axis (i.e. not one of the plane axes). Ignored // - rotary axes are present. Ignored + // - no parameters are specified. This can happen when G2 or G3 motion mode persists but + // a non-arc, non-motion command is entered afterwards, such as M3 or T. Trapped here: + + // Trap if no parameters were specified while in CW or CCW arc motion mode. This is OK + if (!(target_f[AXIS_X] | target_f[AXIS_Y] | target_f[AXIS_Z] | + offset_f[AXIS_X] | offset_f[AXIS_Y] | offset_f[AXIS_Z] | + radius_f | P_word_f)) { + return(STAT_OK); + } // trap missing feed rate if (fp_ZERO(cm.gm.feed_rate)) {