Skip to content

Commit f2b1656

Browse files
committed
Update switch_round.py
1 parent a634e50 commit f2b1656

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

adafruit_displayio_layout/widgets/switch_round.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,7 @@ def _animate_switch(self):
761761
else:
762762
position = 0
763763
self._draw_position(0)
764-
else: #animate over time
764+
else: # animate over time
765765
# constrain the elapsed time
766766
elapsed_time = time.monotonic() - start_time
767767
if elapsed_time > self._animation_time:
@@ -773,10 +773,10 @@ def _animate_switch(self):
773773
) # fraction from 0 to 1
774774
else:
775775
# fraction from 0 to 1
776-
position = (elapsed_time) / self._animation_time
776+
position = (elapsed_time) / self._animation_time
777777

778-
# Update the moving elements based on the current position
779-
# apply the "easing" function to the requested position to adjust motion
778+
# Update the moving elements based on the current position
779+
# apply the "easing" function to the requested position to adjust motion
780780
self._draw_position(easing(position)) # update the switch position
781781

782782
# update the switch value once the motion is complete

0 commit comments

Comments
 (0)