Skip to content

Commit a634e50

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

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

adafruit_displayio_layout/widgets/switch_round.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -772,10 +772,11 @@ def _animate_switch(self):
772772
1 - (elapsed_time) / self._animation_time
773773
) # fraction from 0 to 1
774774
else:
775-
position = (elapsed_time) / self._animation_time # fraction from 0 to 1
775+
# fraction from 0 to 1
776+
position = (elapsed_time) / self._animation_time
776777

777-
# Update the moving elements based on the current position
778-
# 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
779780
self._draw_position(easing(position)) # update the switch position
780781

781782
# update the switch value once the motion is complete

0 commit comments

Comments
 (0)