Added “no parameters” test to arc moves

This commit is contained in:
Alden Hart
2017-01-26 14:02:05 -05:00
parent 20cd295a66
commit b1af141af5
2 changed files with 14 additions and 7 deletions

View File

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