mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
tunes: don't let tune interrupt itself
This commit is contained in:
parent
52542f9802
commit
3d668d871b
@ -94,6 +94,12 @@ int Tunes::set_control(const tune_control_s &tune_control)
|
||||
tune_control.tune_override || // Override interrupts everything
|
||||
_default_tunes_interruptable[_current_tune_id]) {
|
||||
|
||||
// Check if this exact tune is already being played back
|
||||
if (tune_control.tune_id != static_cast<int>(TuneID::CUSTOM) &&
|
||||
_tune == _default_tunes[tune_control.tune_id]) {
|
||||
return OK; // Nothing to do
|
||||
}
|
||||
|
||||
// Reset repeat flag. Can jump to true again while tune is being parsed later
|
||||
_repeat = false;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user