aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2018-03-17 13:29:03 -0400
committerKevin O'Connor <kevin@koconnor.net>2018-03-17 13:46:36 -0400
commitef8c464d9777699dcedb0325c666d2a4b134e78a (patch)
treefec9d9d9fb580feca9f79851933cf7108d7380db /config
parent66eefa1da87cb33ee664830d33f7fcebe7ee031a (diff)
downloadkutter-ef8c464d9777699dcedb0325c666d2a4b134e78a.tar.gz
kutter-ef8c464d9777699dcedb0325c666d2a4b134e78a.tar.xz
kutter-ef8c464d9777699dcedb0325c666d2a4b134e78a.zip
output_pin: Move pwm and digital output pins to new module in extras/
Rename the digital_output, pwm_output, and static_pwm_output config sections to output_pin and move to a new module in the extras/ directory. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'config')
-rw-r--r--config/example-extras.cfg77
-rw-r--r--config/generic-mini-rambo.cfg15
2 files changed, 38 insertions, 54 deletions
diff --git a/config/example-extras.cfg b/config/example-extras.cfg
index ca57f065..3f507224 100644
--- a/config/example-extras.cfg
+++ b/config/example-extras.cfg
@@ -244,21 +244,6 @@
# seconds.
-# Run-time configurable digital output pins (one may define any number
-# of sections with a "digital_output" prefix). Pins configured here
-# will be setup as digital outputs and one may modify them at run-time
-# using the "SET_PIN PIN=my_pin VALUE=0" extended g-code command.
-#[digital_output my_pin]
-#pin:
-# The pin to configure as a digital output. This parameter must be
-# provided.
-#value:
-# The value to initially set the pin to during MCU configuration
-# (either 0 or 1). The default is 0 (for low voltage).
-#shutdown_value:
-# The value to set the pin to on an MCU shutdown event. The default
-# is 0 (for low voltage).
-
# Statically configured digital output pins (one may define any number
# of sections with a "static_digital_output" prefix). Pins configured
# here will be setup as a GPIO output during MCU configuration. They
@@ -269,52 +254,48 @@
# pin will be set to a high level unless the pin name is prefaced
# with "!". This parameter must be provided.
-# Run-time configurable PWM (pulse width modulator) output pins (one
-# may define any number of sections with a "pwm_output" prefix). Pins
-# configured here will be setup as PWM outputs and one may modify them
-# at run-time using the "SET_PIN PIN=my_pin VALUE=.1" extended g-code
-# command.
-#[pwm_output my_pin]
+
+# Run-time configurable output pins (one may define any number of
+# sections with an "output_pin" prefix). Pins configured here will be
+# setup as output pins and one may modify them at run-time using the
+# "SET_PIN PIN=my_pin VALUE=.1" extended g-code command.
+#[output_pin my_pin]
#pin:
-# The pin to configure as a PWM output. This parameter must be
+# The pin to configure as an output. This parameter must be
# provided.
+#pwm: False
+# Set if the output pin should be capable of
+# pulse-width-modulation. If this is true, the value fields should
+# be between 0 and 1; if it is false the value fields should be
+# either 0 or 1. The default is False.
+#static_value:
+# If this is set, then the pin is assigned to this value at startup
+# and the pin can not be changed during runtime. A static pin uses
+# slightly less ram in the micro-controller. The default is to use
+# runtime configuration of pins.
#value:
-# The value to initially set the PWM output to during MCU
-# configuration. This is typically set to a number between 0.0 and
-# 1.0 with 1.0 being full on and 0.0 being full off. However, the
-# range may be changed with the 'scale' parameter (see below). The
-# default is 0.
+# The value to initially set the pin to during MCU
+# configuration. The default is 0 (for low voltage).
#shutdown_value:
# The value to set the pin to on an MCU shutdown event. The default
-# is 0.
+# is 0 (for low voltage).
#cycle_time: 0.100
# The amount of time (in seconds) per PWM cycle. It is recommended
# this be 10 milliseconds or greater when using software based
-# PWM. The default is 0.100 seconds.
+# PWM. The default is 0.100 seconds for pwm pins.
#hardware_pwm: False
# Enable this to use hardware PWM instead of software PWM. The
# default is False.
#scale:
# This parameter can be used to alter how the 'value' and
-# 'shutdown_value' parameters are interpreted. If provided, then the
-# 'value' parameter should be between 0.0 and 'scale'. This may be
-# useful when configuring a PWM pin that controls a stepper voltage
-# reference. The 'scale' can be set to the equivalent stepper
-# amperage if the PWM were fully enabled, and then the 'value'
-# parameter can be specified using the desired amperage for the
-# stepper. The default is to not scale the 'value' parameter.
-
-# Statically configured PWM output pins (one may define any number of
-# sections with a "static_pwm_output" prefix). Pins configured here
-# will be setup as PWM outputs during MCU configuration. They can not
-# be changed at run-time.
-#[static_pwm_output my_output_pwm]
-#pin:
-#value:
-#cycle_time:
-#hardware_pwm:
-#scale:
-# See the 'pwm_output' section for details on these parameters.
+# 'shutdown_value' parameters are interpreted for pwm pins. If
+# provided, then the 'value' parameter should be between 0.0 and
+# 'scale'. This may be useful when configuring a PWM pin that
+# controls a stepper voltage reference. The 'scale' can be set to
+# the equivalent stepper amperage if the PWM were fully enabled, and
+# then the 'value' parameter can be specified using the desired
+# amperage for the stepper. The default is to not scale the 'value'
+# parameter.
# Multiple pin outputs (one may define any number of sections with a
diff --git a/config/generic-mini-rambo.cfg b/config/generic-mini-rambo.cfg
index 88b4672b..c0dac098 100644
--- a/config/generic-mini-rambo.cfg
+++ b/config/generic-mini-rambo.cfg
@@ -74,26 +74,29 @@ max_accel: 3000
max_z_velocity: 5
max_z_accel: 100
-[static_pwm_output stepper_xy_current]
+[output_pin stepper_xy_current]
pin: PL3
+pwm: True
scale: 2.0
-value: 1.3
cycle_time: .002
hardware_pwm: True
+static_value: 1.3
-[static_pwm_output stepper_z_current]
+[output_pin stepper_z_current]
pin: PL4
+pwm: True
scale: 2.0
-value: 1.3
cycle_time: .002
hardware_pwm: True
+static_value: 1.3
-[static_pwm_output stepper_e_current]
+[output_pin stepper_e_current]
pin: PL5
+pwm: True
scale: 2.0
-value: 1.25
cycle_time: .002
hardware_pwm: True
+static_value: 1.25
[static_digital_output stepper_config]
pins: