mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 01:03:33 +08:00
libtunes: change variable name
This make the variable purpose more clear.
This commit is contained in:
committed by
Daniel Agar
parent
2ec5ea48a3
commit
9cb95b64ca
@@ -74,7 +74,7 @@ void Tunes::config_tone(bool repeat_flag)
|
||||
_next = nullptr;
|
||||
|
||||
} else {
|
||||
_tune = _start_tune;
|
||||
_tune = _tune_start_ptr;
|
||||
_next = _tune;
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ int Tunes::set_control(const tune_control_s &tune_control)
|
||||
// TODO: come up with a better strategy
|
||||
if (_tune == nullptr || reset_playing_tune || tune_control.tune_override) {
|
||||
_tune = _default_tunes[tune_control.tune_id];
|
||||
_start_tune = _default_tunes[tune_control.tune_id];
|
||||
_tune_start_ptr = _default_tunes[tune_control.tune_id];
|
||||
_next = _tune;
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ void Tunes::set_string(const char *string)
|
||||
// set tune string the first time
|
||||
if (_tune == nullptr) {
|
||||
_tune = string;
|
||||
_start_tune = string;
|
||||
_tune_start_ptr = string;
|
||||
_next = _tune;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ private:
|
||||
|
||||
const char *_tune = nullptr; ///< current tune string
|
||||
const char *_next = nullptr; ///< next note in the string
|
||||
const char *_start_tune = nullptr; ///< pointer to repeat tune
|
||||
const char *_tune_start_ptr = nullptr; ///< pointer to repeat tune
|
||||
|
||||
unsigned _tempo;
|
||||
unsigned _note_length;
|
||||
|
||||
Reference in New Issue
Block a user