mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-01 02:55:07 +08:00
libtunes: (bugfix) sending a custom msg tune overrides everything
Custom msg tune can override any tune playing, regardless of the tune_override flag.
This commit is contained in:
committed by
Beat Küng
parent
2acd431fcb
commit
f47443f283
@@ -92,10 +92,13 @@ int Tunes::set_control(const tune_control_s &tune_control)
|
|||||||
if (tune_control.tune_id < _default_tunes_size) {
|
if (tune_control.tune_id < _default_tunes_size) {
|
||||||
switch (tune_control.tune_id) {
|
switch (tune_control.tune_id) {
|
||||||
case static_cast<int>(TuneID::CUSTOM):
|
case static_cast<int>(TuneID::CUSTOM):
|
||||||
_frequency = (unsigned)tune_control.frequency;
|
if (_tune == nullptr || tune_control.tune_override) {
|
||||||
_duration = (unsigned)tune_control.duration;
|
_frequency = (unsigned)tune_control.frequency;
|
||||||
_silence = (unsigned)tune_control.silence;
|
_duration = (unsigned)tune_control.duration;
|
||||||
_using_custom_msg = true;
|
_silence = (unsigned)tune_control.silence;
|
||||||
|
_using_custom_msg = true;
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// tunes that have a high priority
|
// tunes that have a high priority
|
||||||
|
|||||||
Reference in New Issue
Block a user