mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-17 16:17:36 +08:00
tunes: fix constness for _default_tunes
_default_tunes was marked as 'const char *' array, which means the data of the array was not actually const and thus landed in the data section (so in RAM instead of FLASH). The size of the array is 64 bytes.
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
#include "tunes.h"
|
||||
|
||||
// initialise default tunes
|
||||
const char *Tunes::_default_tunes[] = {
|
||||
const char *const Tunes::_default_tunes[] = {
|
||||
"", // empty to align with the index
|
||||
"MFT240L8 O4aO5dc O4aO5dc O4aO5dc L16dcdcdcdc", // startup tune
|
||||
"MBT200a8a8a8PaaaP", // ERROR tone
|
||||
|
||||
@@ -126,7 +126,7 @@ public:
|
||||
unsigned int get_maximum_update_interval() {return (unsigned int)TUNE_MAX_UPDATE_INTERVAL_US;}
|
||||
|
||||
private:
|
||||
static const char *_default_tunes[];
|
||||
static const char *const _default_tunes[];
|
||||
static const uint8_t _note_tab[];
|
||||
static const unsigned int _default_tunes_size;
|
||||
bool _repeat = false; ///< if true, tune restarts at end
|
||||
|
||||
Reference in New Issue
Block a user