mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-08-08 22:35:17 -06:00
mcu: Remove support for set_pwm() cycle_time parameter
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
fd2feff67d
commit
43a9685c58
4 changed files with 13 additions and 32 deletions
|
@ -46,9 +46,9 @@ class PrinterMultiPin:
|
|||
def set_digital(self, print_time, value):
|
||||
for mcu_pin in self.mcu_pins:
|
||||
mcu_pin.set_digital(print_time, value)
|
||||
def set_pwm(self, print_time, value, cycle_time=None):
|
||||
def set_pwm(self, print_time, value):
|
||||
for mcu_pin in self.mcu_pins:
|
||||
mcu_pin.set_pwm(print_time, value, cycle_time)
|
||||
mcu_pin.set_pwm(print_time, value)
|
||||
|
||||
def load_config_prefix(config):
|
||||
return PrinterMultiPin(config)
|
||||
|
|
|
@ -67,7 +67,7 @@ class pca9685_pwm:
|
|||
cmd_queue = self._mcu.alloc_command_queue()
|
||||
self._set_cmd = self._mcu.lookup_command(
|
||||
"queue_pca9685_out oid=%c clock=%u value=%hu", cq=cmd_queue)
|
||||
def set_pwm(self, print_time, value, cycle_time=None):
|
||||
def set_pwm(self, print_time, value):
|
||||
clock = self._mcu.print_time_to_clock(print_time)
|
||||
if self._invert:
|
||||
value = 1. - value
|
||||
|
|
|
@ -183,7 +183,7 @@ class SX1509_pwm(object):
|
|||
shutdown_value = 1. - shutdown_value
|
||||
self._start_value = max(0., min(1., start_value))
|
||||
self._shutdown_value = max(0., min(1., shutdown_value))
|
||||
def set_pwm(self, print_time, value, cycle_time=None):
|
||||
def set_pwm(self, print_time, value):
|
||||
self._sx1509.set_register(self._i_on_reg, ~int(255 * value)
|
||||
if not self._invert
|
||||
else int(255 * value) & 0xFF)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue