mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-08-08 06:24:03 -06:00
docs: Prefer Jinja2 "set" directive to default_parameter_xxx in examples
The "set" directive is more flexible and easier to understand. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
61a25d2fb2
commit
d36dbfebd1
4 changed files with 32 additions and 60 deletions
|
@ -30,13 +30,13 @@ i2c_bus: i2c.1
|
|||
htu21d_hold_master: False
|
||||
|
||||
[gcode_macro QUERY_ENCLOSURE]
|
||||
default_parameter_SENSOR: htu21d enclosure_temp
|
||||
gcode:
|
||||
{% set sensor = printer["htu21d enclosure_temp"] %}
|
||||
{action_respond_info(
|
||||
"Temperature: %.2f C\n"
|
||||
"Humidity: %.2f%%" % (
|
||||
printer[SENSOR].temperature,
|
||||
printer[SENSOR].humidity))}
|
||||
sensor.temperature,
|
||||
sensor.humidity))}
|
||||
|
||||
# Example 3:Using a pin on another gpiochip connected to the RPi
|
||||
# (in this case on an MCP23017)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue