Skip to content

Fix CNCStatus parsing - #29

Draft
bboilot-ledger wants to merge 3 commits into
mainfrom
bbo/fix_cncstatus_parsing
Draft

Fix CNCStatus parsing#29
bboilot-ledger wants to merge 3 commits into
mainfrom
bbo/fix_cncstatus_parsing

Conversation

@bboilot-ledger

@bboilot-ledger bboilot-ledger commented Aug 13, 2026

Copy link
Copy Markdown

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:

  • Normalize CNC statuses/substates.
  • Add debug logging when normalization occurs.
  • Add regression tests covering suffixed and standard statuses.

@bboilot-ledger
bboilot-ledger marked this pull request as draft August 13, 2026 08:24
@bboilot-ledger
bboilot-ledger force-pushed the bbo/fix_cncstatus_parsing branch from c85f607 to d31e0a0 Compare August 13, 2026 08:31
@mmouchous-ledger
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.
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.

2 participants