Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a built-in function to the grblController to check if a number is within tolerance in a macro. #792

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

skasti
Copy link

@skasti skasti commented Dec 5, 2022

Add a built-in function to check if a number is within tolerance, and pause if not. Had to refactor the datafilters a bit to make it output properly, but I think that was desirable in any case, as it allows using [mposx] etc in comments for pause and tool change commands to give customized massages to operator

example macro to test:

%probedDiff = 0.075 ; this would come from your probing macro
%looseTolerance = 0.1
%tightTolerance = 0.05

[toleranceCheck(probedDiff, looseTolerance)] 
[toleranceCheck(probedDiff, tightTolerance)]

The first check should not trigger a pause, since looseTolerance is > 0.075, but the second should, since tightTolerance is < 0.075

… pause if not. Had to refactor the datafilters a bit to make it output properly
@skasti
Copy link
Author

skasti commented Dec 6, 2022

seems like the node version I selected is not supported for the npm version. trying to find a better combination of versions :)

@selbekk
Copy link

selbekk commented Dec 7, 2022

Is there something wacko with the AppVeyor build? It fails on something it shouldn't fail on.

@cheton
Copy link
Collaborator

cheton commented Jan 18, 2023

Thank you for the PR. I will consider adding a generic function that allows users to write their own, rather than making it a built-in feature.

@cheton cheton force-pushed the master branch 3 times, most recently from 0c2fce0 to 0469fe0 Compare January 22, 2023 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants