]> Repositories - Adafruit_Blinka-hackapet.git/commitdiff
generic_linux: pwmout: Remove duty-cycle reset in deinit flow
authorSteve Jeong <steve@how2flow.net>
Fri, 15 Dec 2023 01:45:11 +0000 (01:45 +0000)
committerSteve Jeong <steve@how2flow.net>
Fri, 15 Dec 2023 01:45:11 +0000 (01:45 +0000)
The 'deinit' function is called each time a property value is read and written.
However, the duty cycle continues to reset, so the sysfs PWM does not work properly.

Signed-off-by: Steve Jeong <steve@how2flow.net>
src/adafruit_blinka/microcontroller/generic_linux/sysfs_pwmout.py

index 4aca0a2785911a376aad30958b85e96f09458789..9bf26025d76406c3ae27f12e0a943583c6a9b5c8 100644 (file)
@@ -158,7 +158,6 @@ class PWMOut:
     def deinit(self):
         """Deinit the sysfs PWM."""
         if self._channel is not None:
-            self.duty_cycle = 0
             try:
                 channel_path = os.path.join(
                     self._sysfs_path, self._channel_path.format(self._channel)