Skip to content

Reload tool 330#410

Merged
SebKuzminsky merged 3 commits into
2.7from
reload-tool-330
Feb 22, 2018
Merged

Reload tool 330#410
SebKuzminsky merged 3 commits into
2.7from
reload-tool-330

Conversation

@SebKuzminsky

Copy link
Copy Markdown
Collaborator

This adds some tests for #330, then fixes the bug.

These tests verify the behavior when the user tries to prepare ("T")
and change to ("M6") the tool that's currently loaded in the spindle.

These tests reproduce #330 and #409.
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.
@SebKuzminsky SebKuzminsky merged commit 0bbeabc into 2.7 Feb 22, 2018
@SebKuzminsky SebKuzminsky deleted the reload-tool-330 branch February 22, 2018 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant