mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-05 15:33:57 -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)
|
||||
{
|
||||
if (!AP::sitl()->tonealarm_sim.is_enabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (frequency <= 0) {
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user