klipper
klipper copied to clipboard
docs: Correct extruder target temp example.
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]
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
Thanks, @JamesH1978. I added a description and sign-off. Is there anything else you need?
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
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
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?
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.