mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-10 18:03:56 -04:00
AP_HAL_SITL: ToneAlarm doesn't play tones if disabled via param
This commit is contained in:
parent
47fbf70e85
commit
49687d4e5d
@ -20,6 +20,10 @@ Synth::sEnvelope envelope;
|
|||||||
|
|
||||||
void ToneAlarm_SF::set_buzzer_tone(float frequency, float volume, float duration_ms)
|
void ToneAlarm_SF::set_buzzer_tone(float frequency, float volume, float duration_ms)
|
||||||
{
|
{
|
||||||
|
if (!AP::sitl()->tonealarm_sim.is_enabled()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (frequency <= 0) {
|
if (frequency <= 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user