minor optimization

This commit is contained in:
petrucci4prez 2017-06-18 16:11:31 -04:00
parent 4f7a862f43
commit 36ad91e0a9
1 changed files with 1 additions and 2 deletions

View File

@ -72,9 +72,8 @@ class Blinkenlights(ExceptionThread):
t = self._sleeptime*self._steps/2
pwm.ChangeDutyCycle(100)
self._triangle.wait(timeout=t)
if self._triangle.is_set() or not self._blink.is_set():
if self._triangle.wait(timeout=t) or not self._blink.is_set():
continue
pwm.ChangeDutyCycle(0)