Closed paukstelis closed 1 year ago
made some observations. we probably want to keep {original} in there. I don't think octoprint cares what comes after the position update message it recognizes... this is may be why you're not seeing any errors when adding A and B. I'm on the fence atm on how to handle this.
the original message is retained in the response, but I have simply concatenated it after the rest of the response is generated: response = response+msg
, which I think works OK. msg is just a string so this should work?
the original message is retained in the response, but I have simply concatenated it after the rest of the response is generated:
response = response+msg
, which I think works OK. msg is just a string so this should work?
yeah, I think that would cover it.....
response = response + " " + msg
I'm still not sure if any of this even matters. octoprint is likely going to ignore A and B anyway. A way to test this would be to check the position update event and see what is coming in its payload. that's what this does behind the scenes.
I have a couple free minutes so I can dabble:
2023-01-08 21:49:38,363 - octoprint.plugins.bettergrblsupport - DEBUG - event [PositionUpdate] payload [{'reason': None, 'z': 0.0, 'e': 0.0, 'f': None, 'y': -50.0, 'x': -50.0, 't': 0}] received but not subscribed - discarding
That's this code after I moved x -50 / y -50 after homing: https://github.com/synman/Octoprint-Bettergrblsupport/blob/41640fe3aa538133aec696e0789b85dee7b65586/octoprint_bettergrblsupport/_bgs.py#L594
See how octoprint emits z,x, y, e, f, and t? e is your extrusion rate, f is feedrate, and t is tool number. I'm going to dummy up this response to include A and B but my gut tells me Octoprint is going to ignore it.
And we don't have to worry about it getting lost because it is still included in {original}.
Yeah, this isn't good.
response = 'X:{1} Y:{2} Z:{3} A:50 B:50 E:0 {original}'.format(*match.groups(), original=msg)
When I dummy up A and B, octoprint stops firing its PositionUpdate event.
OK. Makes sense. So remove the A and B modifications to the response. Unfortunately, it was part of a larger commit, so I can't roll that one back, so it will have to be a corrective commit.
I have also included A and B for the Home
button function.
cleaned PR for a and b now in origin_axis