Fix CNCStatus parsing - #29
Draft
bboilot-ledger wants to merge 3 commits into
Draft
Conversation
bboilot-ledger
marked this pull request as draft
August 13, 2026 08:24
bboilot-ledger
force-pushed
the
bbo/fix_cncstatus_parsing
branch
from
August 13, 2026 08:31
c85f607 to
d31e0a0
Compare
mmouchous-ledger
self-requested a review
August 27, 2026 12:32
- Rename CNCStatus class to CNCState for clarity. - Introduce a new CNCStatus class to encapsulate state and substate. - Update CNCRouter to utilize the new CNCStatus and CNCState for improved status parsing and error handling.
- Update CNCError to include a clearer description of the exception raised for CNC alarms. - Refactor the home method in CNCRouter to handle homing completion more effectively, including a timeout parameter and improved polling for status updates. - Add detailed comments to clarify the behavior of the homing process and its interaction with Grbl.
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.
from GRBL 1.1 Interface documentation the first datafield of status (Machine states
Idle, Run, Hold, Jog, Alarm, Door, Check, Home, Sleep) can have substates (eg Hold:0)In some case, it has been observed that the firmware returns "<Run,0|...>" consequently, the code should harden this odd-behavior by: