diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2024-09-21 15:29:47 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2024-09-30 12:23:24 -0400 |
commit | 1c0adb9af88411116a4980636e8070ae1decd457 (patch) | |
tree | 4220acf59bb34fe80ef14dc0b6e029aecebe77c1 /docs/G-Codes.md | |
parent | 8a7a39530ee7bc7acfbe8bb30e5ff5189dac0f3f (diff) | |
download | kutter-1c0adb9af88411116a4980636e8070ae1decd457.tar.gz kutter-1c0adb9af88411116a4980636e8070ae1decd457.tar.xz kutter-1c0adb9af88411116a4980636e8070ae1decd457.zip |
output_pin: Support setting a TEMPLATE on SET_PIN commands
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'docs/G-Codes.md')
-rw-r--r-- | docs/G-Codes.md | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/G-Codes.md b/docs/G-Codes.md index 2444c53b..f855f364 100644 --- a/docs/G-Codes.md +++ b/docs/G-Codes.md @@ -857,6 +857,20 @@ output `VALUE`. VALUE should be 0 or 1 for "digital" output pins. For PWM pins, set to a value between 0.0 and 1.0, or between 0.0 and `scale` if a scale is configured in the output_pin config section. +`SET_PIN PIN=config_name TEMPLATE=<template_name> [<param_x>=<literal>]`: +If `TEMPLATE` is specified then it assigns a +[display_template](Config_Reference.md#display_template) to the given +pin. For example, if one defined a `[display_template +my_pin_template]` config section then one could assign +`TEMPLATE=my_pin_template` here. The display_template should produce a +string containing a floating point number with the desired value. The +template will be continuously evaluated and the pin will be +automatically set to the resulting value. One may set display_template +parameters to use during template evaluation (parameters will be +parsed as Python literals). If TEMPLATE is an empty string then this +command will clear any previous template assigned to the pin (one can +then use `SET_PIN` commands to manage the values directly). + ### [palette2] The following commands are available when the |