Add the ability to use parenthesis comments, as well as shorthand functions for machine stops #75
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.
Effectively the title.
LinuxCNC (and Tormach, as a result) have some fancy gcode features that REQUIRE parenthesis comments. This patch lets you use parenthesis by moving the comment formatting into it's own function.
Also, there are shorthand functions for emitting
M00 (optional comment)andM01 (optional comment)gcode, as well as just inserting a comment as it's own line.Tests are mostly passing. The
test_printercalls seem to require a device to be connected (even withmockinstalled).One of the matrix tests is also failing:
but that just looks like a floating point weirdness that's not /really/ a problem, probably some vague difference in platform math libraries. It does mean that it'd probably be best to allow a epsilon error on the matrix test results, but implementing that would be a major pain (you'd have to parse the generated gcode to extract the actual values).
I also ran into the fact that
efd_pico_pulse.pyhad mixed indentation (spaces/tabs) when trying to run the tests (sidenote:python setup.py testtries to import everything, but didn't actually run any tests). I'm assuming that file hasn't been touched since python 2. Anyways, I fixed that.