mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-10 18:08:30 -04:00
AP_HAL_SITL: ToneAlarm doesn't play tones if disabled via param
This commit is contained in:
parent
a94b1ed65e
commit
9fde3e6297
@ -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