Skip to content

Commit

Permalink
Merge pull request #788 from Paciente8159/canned-cycle-feed-spindle-u…
Browse files Browse the repository at this point in the history
…pdate

fixed canned cycle command feed and spindle update
  • Loading branch information
Paciente8159 authored Nov 27, 2024
2 parents 04ad6f7 + be98501 commit 4b33eac
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions uCNC/src/core/parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -1193,6 +1193,13 @@ static uint8_t parser_validate_command(parser_state_t *new_state, parser_words_t
}
}

// https://linuxcnc.org/docs/html/gcode/g-code.html#gcode:g80
// any axis word with active G80 command is invalid
if (CHECKFLAG(cmd->words, GCODE_ALL_AXIS) && new_state->groups.motion == G80)
{
return STATUS_GCODE_AXIS_WORDS_EXIST;
}

// group 2 - plane selection (nothing to be checked)
// group 3 - distance mode (nothing to be checked)

Expand Down Expand Up @@ -3215,6 +3222,10 @@ uint8_t parser_exec_command_block(parser_state_t *new_state, parser_words_t *wor
}
}

// set possible feed and spindle changes embedded in the canned command
new_state->feedrate = canned_state.feedrate;
new_state->spindle = canned_state.spindle;

return error;
}
#endif
Expand Down

0 comments on commit 4b33eac

Please sign in to comment.