grbl-streamer
grbl-streamer copied to clipboard
GRBL version
Which version of GRBL is this intended for?
I tried running on the latest 1.1h release and the status messages are not interpreted correctly.
This is the section where the regex fails.
def _update_state(self, line):
m = re.match("<(.*?),MPos:(.*?),WPos:(.*?)>", line)
self.cmode = m.group(1)
mpos_parts = m.group(2).split(",")
wpos_parts = m.group(3).split(",")
@benknight135 I noticed this issue as well. It's definitely a GRBL v1.1 issue...you can find more information about the changes here: https://github.com/gnea/grbl/blob/master/doc/markdown/settings.md#10---status-report-mask
I was able to work around this by doing the following:
Make sure you're only reporting machine position by issuing the following command:
$10=1
I also changed the lines of code you posted above as follows:
def _update_state(self, line):
# <Idle|MPos:0.0000,0.0000,0.0000|Bf:15,128|FS:0.0,0|WCO:0.0000,0.0000,0.0000> CXA
m = re.match("<(.*?)\|MPos:(.*?)\|", line) #CXA
self.cmode = m.group(1)
mpos_parts = m.group(2).split(",")
self.cmpos = (float(mpos_parts[0]), float(mpos_parts[1]), float(mpos_parts[2]))
This essentially removes the "work position" reporting but hopefully that isn't a huge issue for you.
Target grbl is v0.9.
@arsinio Thanks for documenting a workaround for grbl v1.1.
Pull requests to prevent the regular expression from failing, are welcome. But gerbil should support both grbl v0.9 and v1.1.
I’ll play with it a little more and put together a PR which fixes MPos and WPos hopefully sometime this week.
Michael- thanks for all of your fantastic work on this library!
On Sat, Apr 10, 2021 at 5:57 AM Michael Franzl @.***> wrote:
Target grbl is v0.9.
@arsinio https://github.com/arsinio Thanks for documenting a workaround for grbl v1.1.
Pull requests to prevent the regular expression from failing, are welcome. But gerbil should support both grbl v0.9 and v1.1.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/michaelfranzl/gerbil/issues/2#issuecomment-817110626, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABUPXOV3FRZJIBWF2KM2AODTIAOHNANCNFSM42OXU2UA .