Skip to content

Commit

Permalink
Drop the comments
Browse files Browse the repository at this point in the history
  • Loading branch information
waveform80 committed Mar 12, 2021
1 parent 39b69f6 commit 0516bc5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gpiozero/pins/pigpio.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,13 +298,13 @@ def _set_frequency(self, value):
# high, starting PWM and setting a 0 duty-cycle *doesn't* bring
# the pin low; it stays high!
self.factory.connection.write(self.number, 0)
self.factory.connection.set_PWM_frequency(self.number, int(value)) # value must be passed as int, not float
self.factory.connection.set_PWM_frequency(self.number, int(value))
self.factory.connection.set_PWM_range(self.number, 10000)
self.factory.connection.set_PWM_dutycycle(self.number, 0)
self._pwm = True
elif self._pwm and value is not None:
if value != self.factory.connection.get_PWM_frequency(self.number):
self.factory.connection.set_PWM_frequency(self.number, int(value)) # value must be passed as int, not float
self.factory.connection.set_PWM_frequency(self.number, int(value))
self.factory.connection.set_PWM_range(self.number, 10000)
elif self._pwm and value is None:
self.factory.connection.write(self.number, 0)
Expand Down

0 comments on commit 0516bc5

Please sign in to comment.