aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/generic-mini-rambo.cfg6
-rw-r--r--config/generic-ultimaker-ultimainboard-v2.cfg8
-rw-r--r--config/printer-adimlab-2018.cfg6
-rw-r--r--config/printer-creality-cr30-2021.cfg1
-rw-r--r--config/printer-lulzbot-mini1-2016.cfg6
-rw-r--r--config/printer-wanhao-duplicator-6-2016.cfg6
-rw-r--r--docs/Config_Changes.md4
-rw-r--r--docs/Config_Reference.md7
-rw-r--r--klippy/extras/output_pin.py39
9 files changed, 42 insertions, 41 deletions
diff --git a/config/generic-mini-rambo.cfg b/config/generic-mini-rambo.cfg
index 61e2ac84..1a616cf8 100644
--- a/config/generic-mini-rambo.cfg
+++ b/config/generic-mini-rambo.cfg
@@ -84,7 +84,7 @@ pwm: True
scale: 2.0
cycle_time: .000030
hardware_pwm: True
-static_value: 1.3
+value: 1.3
[output_pin stepper_z_current]
pin: PL4
@@ -92,7 +92,7 @@ pwm: True
scale: 2.0
cycle_time: .000030
hardware_pwm: True
-static_value: 1.3
+value: 1.3
[output_pin stepper_e_current]
pin: PL5
@@ -100,7 +100,7 @@ pwm: True
scale: 2.0
cycle_time: .000030
hardware_pwm: True
-static_value: 1.25
+value: 1.25
[static_digital_output stepper_config]
pins:
diff --git a/config/generic-ultimaker-ultimainboard-v2.cfg b/config/generic-ultimaker-ultimainboard-v2.cfg
index 9a4d4e6d..b1ce3fa5 100644
--- a/config/generic-ultimaker-ultimainboard-v2.cfg
+++ b/config/generic-ultimaker-ultimainboard-v2.cfg
@@ -97,7 +97,7 @@ max_z_accel: 30
[output_pin case_light]
pin: PH5
-static_value: 1.0
+value: 1.0
# Motor current settings.
[output_pin stepper_xy_current]
@@ -107,7 +107,7 @@ scale: 2.000
# Max power setting.
cycle_time: .000030
hardware_pwm: True
-static_value: 1.200
+value: 1.200
# Power adjustment setting.
[output_pin stepper_z_current]
@@ -116,7 +116,7 @@ pwm: True
scale: 2.000
cycle_time: .000030
hardware_pwm: True
-static_value: 1.200
+value: 1.200
[output_pin stepper_e_current]
pin: PL3
@@ -124,4 +124,4 @@ pwm: True
scale: 2.000
cycle_time: .000030
hardware_pwm: True
-static_value: 1.250
+value: 1.250
diff --git a/config/printer-adimlab-2018.cfg b/config/printer-adimlab-2018.cfg
index 2f02173d..d810e9d7 100644
--- a/config/printer-adimlab-2018.cfg
+++ b/config/printer-adimlab-2018.cfg
@@ -89,7 +89,7 @@ pwm: True
scale: 2.0
cycle_time: .000030
hardware_pwm: True
-static_value: 1.3
+value: 1.3
[output_pin stepper_z_current]
pin: PL4
@@ -97,7 +97,7 @@ pwm: True
scale: 2.0
cycle_time: .000030
hardware_pwm: True
-static_value: 1.3
+value: 1.3
[output_pin stepper_e_current]
pin: PL3
@@ -105,7 +105,7 @@ pwm: True
scale: 2.0
cycle_time: .000030
hardware_pwm: True
-static_value: 1.25
+value: 1.25
[display]
lcd_type: st7920
diff --git a/config/printer-creality-cr30-2021.cfg b/config/printer-creality-cr30-2021.cfg
index de946920..1edc7531 100644
--- a/config/printer-creality-cr30-2021.cfg
+++ b/config/printer-creality-cr30-2021.cfg
@@ -98,7 +98,6 @@ max_temp: 100
[output_pin led]
pin: PC14
-static_value: 0
# Neopixel LED support
# [neopixel led_neopixel]
diff --git a/config/printer-lulzbot-mini1-2016.cfg b/config/printer-lulzbot-mini1-2016.cfg
index 9be60cbd..52b8061e 100644
--- a/config/printer-lulzbot-mini1-2016.cfg
+++ b/config/printer-lulzbot-mini1-2016.cfg
@@ -125,7 +125,7 @@ pwm: True
scale: 2.0
cycle_time: .000030
hardware_pwm: True
-static_value: 1.300
+value: 1.300
[output_pin stepper_z_current]
pin: PL4
@@ -133,7 +133,7 @@ pwm: True
scale: 2.0
cycle_time: .000030
hardware_pwm: True
-static_value: 1.630
+value: 1.630
[output_pin stepper_e_current]
pin: PL5
@@ -141,7 +141,7 @@ pwm: True
scale: 2.0
cycle_time: .000030
hardware_pwm: True
-static_value: 1.250
+value: 1.250
[static_digital_output stepper_config]
# Microstepping pins
diff --git a/config/printer-wanhao-duplicator-6-2016.cfg b/config/printer-wanhao-duplicator-6-2016.cfg
index b1d35fae..de8a3de8 100644
--- a/config/printer-wanhao-duplicator-6-2016.cfg
+++ b/config/printer-wanhao-duplicator-6-2016.cfg
@@ -86,7 +86,7 @@ pwm: True
scale: 2.782
cycle_time: .000030
hardware_pwm: True
-static_value: 1.2
+value: 1.2
[output_pin stepper_z_current]
pin: PL4
@@ -94,7 +94,7 @@ pwm: True
scale: 2.782
cycle_time: .000030
hardware_pwm: True
-static_value: 1.2
+value: 1.2
[output_pin stepper_e_current]
pin: PL3
@@ -102,7 +102,7 @@ pwm: True
scale: 2.782
cycle_time: .000030
hardware_pwm: True
-static_value: 1.0
+value: 1.0
[display]
lcd_type: ssd1306
diff --git a/docs/Config_Changes.md b/docs/Config_Changes.md
index 2ceb868d..bd00e3d7 100644
--- a/docs/Config_Changes.md
+++ b/docs/Config_Changes.md
@@ -8,6 +8,10 @@ All dates in this document are approximate.
## Changes
+20240123: The output_pin `static_value` parameter is deprecated.
+Replace with `value` and `shutdown_value` parameters. The option will
+be removed in the near future.
+
20231216: The `[hall_filament_width_sensor]` is changed to trigger filament runout
when the thickness of the filament exceeds `max_diameter`. The maximum diameter
defaults to `default_nominal_filament_diameter + max_difference`. See
diff --git a/docs/Config_Reference.md b/docs/Config_Reference.md
index 4b53ef26..a6964e5b 100644
--- a/docs/Config_Reference.md
+++ b/docs/Config_Reference.md
@@ -3096,11 +3096,6 @@ pin:
# 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 pin to during MCU configuration.
# The default is 0 (for low voltage).
@@ -3133,6 +3128,8 @@ pin:
# then the 'value' parameter can be specified using the desired
# amperage for the stepper. The default is to not scale the 'value'
# parameter.
+#static_value:
+# This option is deprecated and should no longer be specified.
```
### [pwm_tool]
diff --git a/klippy/extras/output_pin.py b/klippy/extras/output_pin.py
index 8b41aca7..7b78775b 100644
--- a/klippy/extras/output_pin.py
+++ b/klippy/extras/output_pin.py
@@ -12,6 +12,7 @@ class PrinterOutputPin:
def __init__(self, config):
self.printer = config.get_printer()
ppins = self.printer.lookup_object('pins')
+ # Determine pin type
self.is_pwm = config.getboolean('pwm', False)
if self.is_pwm:
self.mcu_pin = ppins.setup_pin('pwm', config.get('pin'))
@@ -26,34 +27,34 @@ class PrinterOutputPin:
self.scale = 1.
self.last_cycle_time = self.default_cycle_time = 0.
self.last_print_time = 0.
- static_value = config.getfloat('static_value', None,
- minval=0., maxval=self.scale)
+ # Support mcu checking for maximum duration
self.reactor = self.printer.get_reactor()
self.resend_timer = None
self.resend_interval = 0.
+ max_mcu_duration = config.getfloat('maximum_mcu_duration', 0.,
+ minval=0.500,
+ maxval=MAX_SCHEDULE_TIME)
+ self.mcu_pin.setup_max_duration(max_mcu_duration)
+ if max_mcu_duration:
+ self.resend_interval = max_mcu_duration - RESEND_HOST_TIME
+ # Determine start and shutdown values
+ static_value = config.getfloat('static_value', None,
+ minval=0., maxval=self.scale)
if static_value is not None:
- self.mcu_pin.setup_max_duration(0.)
- self.last_value = static_value / self.scale
- self.mcu_pin.setup_start_value(
- self.last_value, self.last_value, True)
+ config.deprecate('static_value')
+ self.last_value = self.shutdown_value = static_value / self.scale
else:
- max_mcu_duration = config.getfloat('maximum_mcu_duration', 0.,
- minval=0.500,
- maxval=MAX_SCHEDULE_TIME)
- self.mcu_pin.setup_max_duration(max_mcu_duration)
- if max_mcu_duration:
- self.resend_interval = max_mcu_duration - RESEND_HOST_TIME
-
self.last_value = config.getfloat(
'value', 0., minval=0., maxval=self.scale) / self.scale
self.shutdown_value = config.getfloat(
'shutdown_value', 0., minval=0., maxval=self.scale) / self.scale
- self.mcu_pin.setup_start_value(self.last_value, self.shutdown_value)
- pin_name = config.get_name().split()[1]
- gcode = self.printer.lookup_object('gcode')
- gcode.register_mux_command("SET_PIN", "PIN", pin_name,
- self.cmd_SET_PIN,
- desc=self.cmd_SET_PIN_help)
+ self.mcu_pin.setup_start_value(self.last_value, self.shutdown_value)
+ # Register commands
+ pin_name = config.get_name().split()[1]
+ gcode = self.printer.lookup_object('gcode')
+ gcode.register_mux_command("SET_PIN", "PIN", pin_name,
+ self.cmd_SET_PIN,
+ desc=self.cmd_SET_PIN_help)
def get_status(self, eventtime):
return {'value': self.last_value}
def _set_pin(self, print_time, value, cycle_time, is_resend=False):