OctoPrint-BedLevelVisualizer icon indicating copy to clipboard operation
OctoPrint-BedLevelVisualizer copied to clipboard

Probe a single point

Open cmontgo opened this issue 4 years ago • 18 comments

Is there a way to pull code from the terminal to interact with the custom buttons? I've set up a button to use G30 and probe a point, after selecting it from the visualizer, but the point locations that come back in terminal are for the "wrong point" (probe offset) and I have to manually pull that information from the terminal. Thoughts?

cmontgo avatar Jul 16 '20 16:07 cmontgo

Currently no, there is no way to do that unfortunately. What you're describing is similar to the custom controls implementation of reading data from terminal using regular expression extraction, but even then I don't think that is able to update parameters for buttons, but I may be wrong. I doubt I'll get to this any time soon, but will flag it for a potential future update.

jneilliii avatar Jul 16 '20 16:07 jneilliii

I was thinking maybe it would work the same way as the "Get Mesh" button. Granted I have no idea how you're doing that.

cmontgo avatar Jul 16 '20 17:07 cmontgo

Yeah, it's very similar. The only difference I think is that the Get Mesh button is instructing the plugin to start recording what's coming through on the terminal tab and comparing those lines against a regular expression until an OK is received.

jneilliii avatar Jul 16 '20 17:07 jneilliii

So this would be very similar. There's a return of Bed X: 0.00 Y: 110.00 Z: 2.00 (or similar, sorry printing and can't test), so we just need the piece after the Z, since I've already used the visualizer to select that point and could use that information. Then I would use G29 W1 X## Y## Z## to set the new point. If we wanted to use the X and Y coordinates it spits back, we would need to compensate for the probe offset as well.

cmontgo avatar Jul 16 '20 17:07 cmontgo

This should work. Will report back. https://github.com/Salandora/octoprint-customControl/issues/7

cmontgo avatar Jul 17 '20 11:07 cmontgo

That plugin has a pretty big bug. Once you get the buttons working the way you want disable it in plugin manager or your buttons will get wiped out. Once disabled your buttons will still work because that's a core octoprint feature, and was what I was referring to before.

jneilliii avatar Jul 17 '20 11:07 jneilliii

Good to know, thanks. I was kind of hoping if I could get it to work, we could port the read option over to the visualizer, is that possible?

cmontgo avatar Jul 17 '20 11:07 cmontgo

Anything is possible with enough time.

jneilliii avatar Jul 17 '20 12:07 jneilliii

Looks like even disabling the custom controls, before a restart wipes them for me. I guess I'll just watch the terminal for now. So in the end, what I need actually is a "Use Output" command, like the cons tom controls plugin, that would solve this issue.

cmontgo avatar Jul 17 '20 13:07 cmontgo

You could try my patched version by using the URL below in plugin manager > Get More > at the bottom.

https://github.com/jneilliii/octoprint-customControl/archive/devel.zip

jneilliii avatar Jul 17 '20 13:07 jneilliii

or add them manually to config.yaml...

https://docs.octoprint.org/en/master/features/custom_controls.html#sec-features-custom-controls

jneilliii avatar Jul 17 '20 13:07 jneilliii

This is how I made the custom buttons and get the data from the terminal;

2022-06-30_19-36 2022-06-30_19-38 2022-06-30_19-43

hansvanlin avatar Jun 30 '22 17:06 hansvanlin

This is the nice thing about custom controls. You can have a text value displayed from printer response automatically in the UI and not have to rely on the M117 messages. Would go hand-in-hand with #315

jneilliii avatar Jun 30 '22 17:06 jneilliii

I have tried that but could not figure out how to do it. The manual has not enough examples for me to see how it works.

hansvanlin avatar Jun 30 '22 19:06 hansvanlin

Here's an example of z-offset: https://community.octoprint.org/t/custom-control-z-offset/4412/4?u=jneilliii

jneilliii avatar Jun 30 '22 19:06 jneilliii

Thank you I will try. Not sure what default: ' ' and width: '5' does. Last time I crashed octoprint server with it. But found out that youre plugin also has the add button options. Is it also possible to use the regex function there?

2022-06-30_22-02

hansvanlin avatar Jun 30 '22 20:06 hansvanlin

Is it also possible to use the regex function there?

No, that's what #315 was requesting.

jneilliii avatar Jun 30 '22 20:06 jneilliii

Indeed...it's getting late. Thanks.

Op do 30 jun. 2022 22:10 schreef jneilliii @.***>:

Is it also possible to use the regex function there?

No, that's what #315 https://github.com/jneilliii/OctoPrint-BedLevelVisualizer/issues/315 was requesting.

— Reply to this email directly, view it on GitHub https://github.com/jneilliii/OctoPrint-BedLevelVisualizer/issues/272#issuecomment-1171630516, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZYBRMOMQLUZNQJN6P26NK3VRX5LTANCNFSM4O4QGXNA . You are receiving this because you commented.Message ID: @.***>

hansvanlin avatar Jun 30 '22 20:06 hansvanlin