Fixed: AudioQueue::playTone() with 0 frequency caused radio reboot (divide by zero)

This commit is contained in:
Damjan Adamic
2017-03-26 19:16:08 +02:00
parent 8c52e57c46
commit 2bbb704c3e
+1 -3
View File
@@ -833,9 +833,7 @@ void AudioQueue::playTone(uint16_t freq, uint16_t len, uint16_t pause, uint8_t f
CoEnterMutexSection(audioMutex);
if (freq && freq < BEEP_MIN_FREQ) {
freq = BEEP_MIN_FREQ;
}
freq = limit<uint16_t>(BEEP_MIN_FREQ, freq, BEEP_MAX_FREQ);
if (flags & PLAY_BACKGROUND) {
varioContext.setFragment(freq, len, pause, 0, 0, (flags & PLAY_NOW));