Skip to content

Commit 623195a

Browse files
committed
allow tone frequency of zero
1 parent b961bce commit 623195a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

adafruit_funhouse/peripherals.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ def play_tone(frequency, duration):
9696
It will attempt to play the sound up to 3 times in the case of
9797
an error.
9898
"""
99-
if frequency <= 0:
100-
raise ValueError("The frequency has to be greater than 0.")
99+
if frequency < 0:
100+
raise ValueError("Negative frequencies are not allowed.")
101101
attempt = 0
102102
# Try up to 3 times to play the sound
103103
while attempt < 3:

0 commit comments

Comments
 (0)