mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-22 22:32:11 +08:00
libtunes: _repeat was uninitialized. Defaulting to false now.
Bugfix: This fixes a bug where libtunes might indicate that there are more tones to play even after the last note of a tune.
This commit is contained in:
committed by
Beat Küng
parent
f47443f283
commit
2cf93df918
@@ -88,6 +88,7 @@ void Tunes::config_tone(bool repeat_flag)
|
||||
int Tunes::set_control(const tune_control_s &tune_control)
|
||||
{
|
||||
bool reset_playing_tune = false;
|
||||
_repeat = false;
|
||||
|
||||
if (tune_control.tune_id < _default_tunes_size) {
|
||||
switch (tune_control.tune_id) {
|
||||
|
||||
@@ -96,7 +96,7 @@ private:
|
||||
static const char *_default_tunes[];
|
||||
static const uint8_t _note_tab[];
|
||||
static const unsigned int _default_tunes_size;
|
||||
bool _repeat; ///< if true, tune restarts at end
|
||||
bool _repeat = false; ///< if true, tune restarts at end
|
||||
|
||||
const char *_tune = nullptr; ///< current tune string
|
||||
const char *_next = nullptr; ///< next note in the string
|
||||
|
||||
Reference in New Issue
Block a user