diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2018-01-29 12:54:06 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2018-01-29 13:08:15 -0500 |
commit | 21df21b7af2759aa577eb8d39d8215471956c25c (patch) | |
tree | 8d36f02176a2d1b817e2e2159791035d91e4282f /klippy/extras/multi_pin.py | |
parent | b7b216af7f49995f816f326c08f721b3814c9685 (diff) | |
download | kutter-21df21b7af2759aa577eb8d39d8215471956c25c.tar.gz kutter-21df21b7af2759aa577eb8d39d8215471956c25c.tar.xz kutter-21df21b7af2759aa577eb8d39d8215471956c25c.zip |
fan: Clarify hardware_pwm and allow cycle_time to be set on software pwm
Specify hardware pwm cycle times using the same method as software pwm
(in seconds, not clock ticks). Allow the fan code to be configured
with an explicit cycle time even when using software pwm.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/extras/multi_pin.py')
-rw-r--r-- | klippy/extras/multi_pin.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/klippy/extras/multi_pin.py b/klippy/extras/multi_pin.py index 3e033a86..5ffaed80 100644 --- a/klippy/extras/multi_pin.py +++ b/klippy/extras/multi_pin.py @@ -40,12 +40,9 @@ class PrinterMultiPin: def setup_start_value(self, start_value, shutdown_value): for mcu_pin in self.mcu_pins: mcu_pin.setup_start_value(start_value, shutdown_value) - def setup_cycle_time(self, cycle_time): + def setup_cycle_time(self, cycle_time, hardware_pwm=False): for mcu_pin in self.mcu_pins: - mcu_pin.setup_cycle_time(cycle_time) - def setup_hard_pwm(self, hard_cycle_ticks): - for mcu_pin in self.mcu_pins: - mcu_pin.setup_hard_pwm(hard_cycle_ticks) + mcu_pin.setup_cycle_time(cycle_time, hardware_pwm) def set_digital(self, print_time, value): for mcu_pin in self.mcu_pins: mcu_pin.set_digital(print_time, value) |