Reload tool 330#410
Merged
Merged
Conversation
This fixes #330. Before this commit, this sequence of G-code commands led to incorrect behavior: N1 T1 N2 M6 N3 T2 N4 T1 N5 M6 The T2 on N3 would set io's .tool-prep-number and .tool-prep-pocket pins, but the T1 on N4 would not, so the pins would keep their old T2 values. The M6 on N5 would incorrectly load T2 instead of T1. The same problem would arise in a program without N4, if the program was aborted after N3 and before N5. This commit fixes the problem by setting io's hal pins even for the tool in P0.
Before this commit, prepping the loaded tool would fail to update the prepped pocket field of the Status buffer, thus presenting incorrect information to Task and the GUIs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 adds some tests for #330, then fixes the bug.