mcu: Remove support for set_pwm() cycle_time parameter

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2023-01-15 17:14:14 -05:00
parent fd2feff67d
commit 43a9685c58
4 changed files with 13 additions and 32 deletions

View file

@ -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)

View file

@ -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

View file

@ -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)