From 8fe9bc8bda76d6f0202ae5aacc7dab6d103f89fc Mon Sep 17 00:00:00 2001 From: sommersoft Date: Fri, 31 May 2019 18:20:31 -0500 Subject: [PATCH] replace 'close()' with 'deinit()' --- .../microcontroller/generic_linux/sysfs_pwmout.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/adafruit_blinka/microcontroller/generic_linux/sysfs_pwmout.py b/src/adafruit_blinka/microcontroller/generic_linux/sysfs_pwmout.py index 4c975c3..de663e9 100644 --- a/src/adafruit_blinka/microcontroller/generic_linux/sysfs_pwmout.py +++ b/src/adafruit_blinka/microcontroller/generic_linux/sysfs_pwmout.py @@ -55,16 +55,13 @@ class PWMOut(object): self._open(pin, duty_cycle, frequency, variable_frequency) def __del__(self): - self.close() + self.deinit() def __enter__(self): return self def __exit__(self, t, value, traceback): - self.close() - - def deinit(self): - self.close() + self.deinit() def _open(self, pin, duty=0, freq=500, variable_frequency=False): self._channel = None @@ -107,8 +104,8 @@ class PWMOut(object): self._set_enabled(True) - def close(self): - """Close the sysfs PWM.""" + def deinit(self): + """Deinit the sysfs PWM.""" if self._channel is not None: self.duty_cycle = 0 try: -- 2.49.0