mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 10:03:34 +08:00
libtunes: allow custom tune (id 0) to be used to stop playback.
Override flag must still be set to true!
This commit is contained in:
committed by
Beat Küng
parent
2cf93df918
commit
34836a2b21
@@ -94,6 +94,7 @@ int Tunes::set_control(const tune_control_s &tune_control)
|
||||
switch (tune_control.tune_id) {
|
||||
case static_cast<int>(TuneID::CUSTOM):
|
||||
if (_tune == nullptr || tune_control.tune_override) {
|
||||
_tune = nullptr; // remove tune in case of override
|
||||
_frequency = (unsigned)tune_control.frequency;
|
||||
_duration = (unsigned)tune_control.duration;
|
||||
_silence = (unsigned)tune_control.silence;
|
||||
|
||||
Reference in New Issue
Block a user