From 4671cf2d0e3ec864e72766cb1f6e24f1a308f794 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Fri, 13 Jan 2023 11:19:07 -0500 Subject: [PATCH] docs: Improve SET_PIN documentation in G-Codes.md Signed-off-by: Kevin O'Connor --- docs/G-Codes.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/docs/G-Codes.md b/docs/G-Codes.md index 137d14ba..04efdbf2 100644 --- a/docs/G-Codes.md +++ b/docs/G-Codes.md @@ -811,9 +811,17 @@ The following command is available when an enabled. #### SET_PIN -`SET_PIN PIN=config_name VALUE= CYCLE_TIME=`: -Note - hardware PWM does not currently support the CYCLE_TIME -parameter and will use the cycle time defined in the config. +`SET_PIN PIN=config_name VALUE= [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). ### [palette2]