diff --git a/libraries/AP_HAL_ChibiOS/Util.cpp b/libraries/AP_HAL_ChibiOS/Util.cpp index e7e4b2d46e..80ced9910d 100644 --- a/libraries/AP_HAL_ChibiOS/Util.cpp +++ b/libraries/AP_HAL_ChibiOS/Util.cpp @@ -153,7 +153,8 @@ bool Util::toneAlarm_init() return true; } -void Util::toneAlarm_set_buzzer_tone(float frequency, float volume) { +void Util::toneAlarm_set_buzzer_tone(float frequency, float volume, uint32_t duration_ms) +{ if (is_zero(frequency) || is_zero(volume)) { pwmDisableChannel(_toneAlarm_pwm_group.pwm_drv, _toneAlarm_pwm_group.chan); } else { diff --git a/libraries/AP_HAL_ChibiOS/Util.h b/libraries/AP_HAL_ChibiOS/Util.h index 9fb8db9c60..31b7b00867 100644 --- a/libraries/AP_HAL_ChibiOS/Util.h +++ b/libraries/AP_HAL_ChibiOS/Util.h @@ -48,7 +48,7 @@ public: #ifdef HAL_PWM_ALARM bool toneAlarm_init() override; - void toneAlarm_set_buzzer_tone(float frequency, float volume) override; + void toneAlarm_set_buzzer_tone(float frequency, float volume, uint32_t duration_ms) override; #endif private: