aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2023-01-13 11:20:19 -0500
committerKevin O'Connor <kevin@koconnor.net>2024-01-23 20:04:03 -0500
commitfd2feff67df65c559cafc8fc5f2fd8601355e81a (patch)
tree35001c58cddd233bf1689ef284e76a8e3d9d2a60 /docs
parent1baa45913ffd05a808d5d9ea0ae0161ebbaff247 (diff)
downloadkutter-fd2feff67df65c559cafc8fc5f2fd8601355e81a.tar.gz
kutter-fd2feff67df65c559cafc8fc5f2fd8601355e81a.tar.xz
kutter-fd2feff67df65c559cafc8fc5f2fd8601355e81a.zip
pwm_cycle_time: New module for output pins with dynamic cycle times
Remove support for changing the cycle time of pwm pins from the output_pin module. Use a new pwm_cycle_time module that supports setting dynamic cycle times. This simplifies the output_pin code and low-level pin update code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'docs')
-rw-r--r--docs/Config_Changes.md5
-rw-r--r--docs/Config_Reference.md18
-rw-r--r--docs/G-Codes.md30
-rw-r--r--docs/Status_Reference.md7
4 files changed, 49 insertions, 11 deletions
diff --git a/docs/Config_Changes.md b/docs/Config_Changes.md
index c660c42a..ae2c5f0a 100644
--- a/docs/Config_Changes.md
+++ b/docs/Config_Changes.md
@@ -8,6 +8,11 @@ All dates in this document are approximate.
## Changes
+20240123: The output_pin SET_PIN CYCLE_TIME parameter has been
+removed. Use the new
+[pwm_cycle_time](Config_Reference.md#pwm_cycle_time) module if it is
+necessary to dynamically change a pwm pin's cycle time.
+
20240123: The output_pin `maximum_mcu_duration` parameter is
deprecated. Use a [pwm_tool config section](Config_Reference.md#pwm_tool)
instead. The option will be removed in the near future.
diff --git a/docs/Config_Reference.md b/docs/Config_Reference.md
index 226b7a13..3b2f1770 100644
--- a/docs/Config_Reference.md
+++ b/docs/Config_Reference.md
@@ -3153,6 +3153,24 @@ pin:
# See the "output_pin" section for the definition of these parameters.
```
+### [pwm_cycle_time]
+
+Run-time configurable output pins with dynamic pwm cycle timing (one
+may define any number of sections with an "pwm_cycle_time" prefix).
+Pins configured here will be setup as output pins and one may modify
+them at run-time using "SET_PIN PIN=my_pin VALUE=.1 CYCLE_TIME=0.100"
+type extended [g-code commands](G-Codes.md#pwm_cycle_time).
+
+```
+[pwm_cycle_time my_pin]
+pin:
+#value:
+#shutdown_value:
+#cycle_time: 0.100
+#scale:
+# See the "output_pin" section for information on these parameters.
+```
+
### [static_digital_output]
Statically configured digital output pins (one may define any number
diff --git a/docs/G-Codes.md b/docs/G-Codes.md
index 8c70609f..92cb7660 100644
--- a/docs/G-Codes.md
+++ b/docs/G-Codes.md
@@ -839,17 +839,10 @@ The following command is available when an
enabled.
#### SET_PIN
-`SET_PIN PIN=config_name VALUE=<value> [CYCLE_TIME=<cycle_time>]`: Set
-the pin to the given 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.
-
-Some pins (currently only "soft PWM" pins) support setting an explicit
-cycle time using the CYCLE_TIME parameter (specified in seconds). Note
-that the CYCLE_TIME parameter is not stored between SET_PIN commands
-(any SET_PIN command without an explicit CYCLE_TIME parameter will use
-the `cycle_time` specified in the output_pin config section).
+`SET_PIN PIN=config_name VALUE=<value>`: Set the pin to the given
+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.
### [palette2]
@@ -978,6 +971,21 @@ babystepping), and subtract if from the probe's z_offset. This acts
to take a frequently used babystepping value, and "make it permanent".
Requires a `SAVE_CONFIG` to take effect.
+### [pwm_cycle_time]
+
+The following command is available when a
+[pwm_cycle_time config section](Config_Reference.md#pwm_cycle_time)
+is enabled.
+
+#### SET_PIN
+`SET_PIN PIN=config_name VALUE=<value> [CYCLE_TIME=<cycle_time>]`:
+This command works similarly to [output_pin](#output_pin) SET_PIN
+commands. The command here supports setting an explicit cycle time
+using the CYCLE_TIME parameter (specified in seconds). Note that the
+CYCLE_TIME parameter is not stored between SET_PIN commands (any
+SET_PIN command without an explicit CYCLE_TIME parameter will use the
+`cycle_time` specified in the pwm_cycle_time config section).
+
### [query_adc]
The query_adc module is automatically loaded.
diff --git a/docs/Status_Reference.md b/docs/Status_Reference.md
index b64108ae..055d1dc0 100644
--- a/docs/Status_Reference.md
+++ b/docs/Status_Reference.md
@@ -374,6 +374,13 @@ is defined):
template expansion, the PROBE (or similar) command must be run prior
to the macro containing this reference.
+## pwm_cycle_time
+
+The following information is available in
+[pwm_cycle_time some_name](Config_Reference.md#pwm_cycle_time)
+objects:
+- `value`: The "value" of the pin, as set by a `SET_PIN` command.
+
## quad_gantry_level
The following information is available in the `quad_gantry_level` object