Skip to content
Snippets Groups Projects
Commit 576f4e02 authored by Beat Küng's avatar Beat Küng Committed by Daniel Agar
Browse files

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.
parent d40d165b
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment