klipper icon indicating copy to clipboard operation
klipper copied to clipboard

docs: Correct extruder target temp example.

Open Jckf opened this issue 3 years ago • 3 comments
trafficstars

This fixes a mistake in the examples of how to use the "printer" variable in g-code templates, specifically related to extruder target temperature.

Signed-off-by: Jim C K Flaten [email protected]

Jckf avatar Oct 18 '22 03:10 Jckf

Please follow the guidelines for submitting PRs, you should follow the preferred format and provide a signed-off-by line

https://github.com/Klipper3d/klipper/blob/master/docs/CONTRIBUTING.md

Thanks James

JamesH1978 avatar Oct 18 '22 07:10 JamesH1978

Thanks, @JamesH1978. I added a description and sign-off. Is there anything else you need?

Jckf avatar Oct 18 '22 12:10 Jckf

I am not a reviewer, someone else will do that :) i just like to stick my oar in and get people on track ready for review

Thanks James

JamesH1978 avatar Oct 18 '22 13:10 JamesH1978

The original documentation is correct; this PR would introduce an error to the documentation. The printer.toolhead.extruder returns a string, not an object that can be directly inspected.

-Kevin

KevinOConnor avatar Oct 20 '22 02:10 KevinOConnor

Huh, right you are. I was reading through this documentation to learn how to access the other toolhead properties, and ended up trying printer[printer.toolhead.position].z because of this, when in fact the correct way is printer.toolhead.position.z.

The extruder property is the string "extruder" on my setup, and in other parts of the documentation we have been taught to simply enter the "name" of the elements to access our selves, like printer["gcode_macro MY_AMAZING_MACRO"]. Why is this done differently (and imo, confusingly)? A much more understandable example, at least for my particular setup with a single extruder that has no special name, would be printer.extruder.target, no?

Jckf avatar Oct 20 '22 08:10 Jckf

This PR is being closed because it is currently not considered a good match for the master Klipper repository.

Best regards, ~ Your friendly GitIssueBot

PS: I'm just an automated script, not a human being.

github-actions[bot] avatar Oct 27 '22 12:10 github-actions[bot]