diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2021-04-26 12:44:51 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2021-04-26 12:44:51 -0400 |
commit | d36dbfebd17500f0af176abd88d8b258c7940e47 (patch) | |
tree | a1e0f558fc9754e38f1fb4fe7aabffb39ac2f20d /config/sample-raspberry-pi.cfg | |
parent | 61a25d2fb22e53c75ae37cce21c6340e46fd6481 (diff) | |
download | kutter-d36dbfebd17500f0af176abd88d8b258c7940e47.tar.gz kutter-d36dbfebd17500f0af176abd88d8b258c7940e47.tar.xz kutter-d36dbfebd17500f0af176abd88d8b258c7940e47.zip |
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>
Diffstat (limited to 'config/sample-raspberry-pi.cfg')
-rw-r--r-- | config/sample-raspberry-pi.cfg | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/config/sample-raspberry-pi.cfg b/config/sample-raspberry-pi.cfg index 92f1c20e..77e5cdf8 100644 --- a/config/sample-raspberry-pi.cfg +++ b/config/sample-raspberry-pi.cfg @@ -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) |