We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 16e7a48 commit bf9870fCopy full SHA for bf9870f
lib/pbio/drv/sound/sound_ev3.c
@@ -43,6 +43,12 @@ void pbdrv_sound_stop() {
43
}
44
45
void pbdrv_beep_start(uint32_t frequency, uint16_t sample_attenuator) {
46
+ // A frequency of 0 is equivalent to turning the sound off
47
+ if (frequency == 0) {
48
+ pbdrv_sound_stop();
49
+ return;
50
+ }
51
+
52
// Clamp the frequency into the supported range
53
if (frequency < 64) {
54
frequency = 64;
0 commit comments