Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

a and b with origin_axis #110

Merged
merged 3 commits into from
Jan 14, 2023
Merged

a and b with origin_axis #110

merged 3 commits into from
Jan 14, 2023

Conversation

paukstelis
Copy link
Contributor

cleaned PR for a and b now in origin_axis

@synman
Copy link
Owner

synman commented Jan 9, 2023

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.

@paukstelis
Copy link
Contributor Author

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?

@synman
Copy link
Owner

synman commented Jan 9, 2023

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.

@synman
Copy link
Owner

synman commented Jan 9, 2023

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:

response = 'X:{1} Y:{2} Z:{3} E:0 {original}'.format(*match.groups(), original=msg)

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}.

@synman
Copy link
Owner

synman commented Jan 9, 2023

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.

@paukstelis
Copy link
Contributor Author

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.

@synman synman merged commit 7a8a9ad into synman:devel Jan 14, 2023
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