From: Joseph Coffland Date: Mon, 12 Sep 2016 03:59:38 +0000 (-0700) Subject: Fixed arcs X-Git-Url: https://git.buildbotics.com/?a=commitdiff_plain;h=4d64887b0917fa5e9cc2b97fae77e63a48f5d982;p=bbctrl-firmware Fixed arcs --- diff --git a/src/gcode_parser.c b/src/gcode_parser.c index 0e38257..5a7feee 100644 --- a/src/gcode_parser.c +++ b/src/gcode_parser.c @@ -173,11 +173,13 @@ static stat_t _get_next_gcode_word(char **pstr, char *letter, float *value) { static uint8_t _point(float value) {return value * 10 - trunc(value) * 10;} +#if 0 static bool _axis_changed() { for (int axis = 0; axis < AXES; axis++) if (parser.gf.target[axis]) return true; return false; } +#endif /// Check for some gross Gcode block semantic violations @@ -194,9 +196,11 @@ static stat_t _validate_gcode_block() { if (modals[MODAL_GROUP_G0] && modals[MODAL_GROUP_G1]) return STAT_MODAL_GROUP_VIOLATION; +#if 0 // This check fails for arcs which may have offsets but no axis word // look for commands that require an axis word to be present if (modals[MODAL_GROUP_G0] || modals[MODAL_GROUP_G1]) if (!_axis_changed()) return STAT_GCODE_AXIS_IS_MISSING; +#endif return STAT_OK; }