-
Notifications
You must be signed in to change notification settings - Fork 15
Zero animation time for SwitchRound
causes ZeroDivisionError
#75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Adding this a good first issue so maybe someone will pick it up for Hacktoberfest. The fix is to make sure that if the animation time is zero that the animation process is skipped. This should look something like a check to see if I'll pick this up soon-ish if no one does soon! |
Can you specify which files are involved? |
@The-Debarghya See the file I linked in my issue description - that |
Ok thanks, I'm trying to fix this. |
Fixed via #76 |
The docs claim that it's possible to set
animation_time
to zero:However, the code doesn't actually handle that case, thus leading to a
ZeroDivisionError
here:Adafruit_CircuitPython_DisplayIO_Layout/adafruit_displayio_layout/widgets/switch_round.py
Line 767 in aa66d0f
Traceback:
The text was updated successfully, but these errors were encountered: