Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an attempt to fix a problem with jog cancel on multiple small jog commands. It will cause the machine to abruptly stop, not taking the deceleration into account. The same problem does not exist on classic GRBL or grblHAL.
I have tried debugging the jog cancel by adding extra logging to these functions:
When canceling a long jog command such as this, the deceleration works as intended:
However when canceling multiple commands it doesn't see the planning block and will therefore set the
endMotion=true
which will cause the abrupt halt:My interpretation is that when doing a jog cancel we never want to do a
endMotion
, this PR has therefore collected the cancel logic to its own jog-cancel-function.There is another problem where trying to issue a feed hold command while jogging which will make the controller unresponsive. This PR will not fix that problem, but it will at least not get worse.