Skip to content

Commit

Permalink
chore: fix constness to avoid having constants in data segment
Browse files Browse the repository at this point in the history
.... and thus free some precious RAM
  • Loading branch information
raphaelcoeffic committed Jan 6, 2023
1 parent e1a8066 commit 3ee5a7b
Show file tree
Hide file tree
Showing 19 changed files with 182 additions and 178 deletions.
2 changes: 1 addition & 1 deletion radio/src/gui/128x64/gui.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ void title(const char * s);
title(name)

typedef int choice_t;
choice_t editChoice(coord_t x, coord_t y, const char * label, const char** values, choice_t value, choice_t min, choice_t max, LcdFlags attr, event_t event, IsValueAvailable isValueAvailable = nullptr);
choice_t editChoice(coord_t x, coord_t y, const char * label, const char *const *values, choice_t value, choice_t min, choice_t max, LcdFlags attr, event_t event, IsValueAvailable isValueAvailable = nullptr);
uint8_t editCheckBox(uint8_t value, coord_t x, coord_t y, const char * label, LcdFlags attr, event_t event);
swsrc_t editSwitch(coord_t x, coord_t y, swsrc_t value, LcdFlags attr, event_t event);

Expand Down
2 changes: 1 addition & 1 deletion radio/src/gui/128x64/lcd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ void lcdDrawTextAlignedLeft(coord_t y, const char * s)
}

#if !defined(BOOT)
void lcdDrawTextAtIndex(coord_t x, coord_t y, const char** s,uint8_t idx, LcdFlags flags)
void lcdDrawTextAtIndex(coord_t x, coord_t y, const char *const *s,uint8_t idx, LcdFlags flags)
{
lcdDrawSizedText(x, y, s[idx], UINT8_MAX, flags);
}
Expand Down
2 changes: 1 addition & 1 deletion radio/src/gui/128x64/lcd.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ void lcdDrawChar(coord_t x, coord_t y, uint8_t c);
void lcdDrawChar(coord_t x, coord_t y, uint8_t c, LcdFlags flags);
void lcdDrawCenteredText(coord_t y, const char * s, LcdFlags flags = 0);
void lcdDrawText(coord_t x, coord_t y, const char * s, LcdFlags flags);
void lcdDrawTextAtIndex(coord_t x, coord_t y, const char** s, uint8_t idx, LcdFlags flags);
void lcdDrawTextAtIndex(coord_t x, coord_t y, const char *const *s, uint8_t idx, LcdFlags flags);
void lcdDrawSizedText(coord_t x, coord_t y, const char * s, unsigned char len, LcdFlags flags);
void lcdDrawText(coord_t x, coord_t y, const char * s);
void lcdDrawSizedText(coord_t x, coord_t y, const char * s, unsigned char len);
Expand Down
2 changes: 1 addition & 1 deletion radio/src/gui/128x64/widgets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ void title(const char * s)
lcdDrawText(0, 0, s, INVERS);
}

choice_t editChoice(coord_t x, coord_t y, const char * label, const char** values, choice_t value, choice_t min, choice_t max, LcdFlags attr, event_t event, IsValueAvailable isValueAvailable)
choice_t editChoice(coord_t x, coord_t y, const char * label, const char *const *values, choice_t value, choice_t min, choice_t max, LcdFlags attr, event_t event, IsValueAvailable isValueAvailable)
{
if (label) {
drawFieldLabel(x, y, label);
Expand Down
2 changes: 1 addition & 1 deletion radio/src/gui/212x64/gui.h
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ void title(const char * s);

typedef int choice_t;

choice_t editChoice(coord_t x, coord_t y, const char *label, const char** values, choice_t value, choice_t min, choice_t max, LcdFlags attr, event_t event, IsValueAvailable isValueAvailable = nullptr);
choice_t editChoice(coord_t x, coord_t y, const char *label, const char* const* values, choice_t value, choice_t min, choice_t max, LcdFlags attr, event_t event, IsValueAvailable isValueAvailable = nullptr);
uint8_t editCheckBox(uint8_t value, coord_t x, coord_t y, const char *label, LcdFlags attr, event_t event);
swsrc_t editSwitch(coord_t x, coord_t y, swsrc_t value, LcdFlags attr, event_t event);

Expand Down
2 changes: 1 addition & 1 deletion radio/src/gui/212x64/lcd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ void lcdDrawTextAlignedLeft(coord_t y, const char * s)
}

#if !defined(BOOT)
void lcdDrawTextAtIndex(coord_t x, coord_t y, const char** s,uint8_t idx, LcdFlags flags)
void lcdDrawTextAtIndex(coord_t x, coord_t y, const char *const *s,uint8_t idx, LcdFlags flags)
{
lcdDrawSizedText(x, y, s[idx], UINT8_MAX, flags);
}
Expand Down
2 changes: 1 addition & 1 deletion radio/src/gui/212x64/lcd.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ void lcdDrawChar(coord_t x, coord_t y, uint8_t c);
void lcdDrawChar(coord_t x, coord_t y, uint8_t c, LcdFlags mode);
void lcdDrawCenteredText(coord_t y, const char * s, LcdFlags flags = 0);
void lcdDrawText(coord_t x, coord_t y, const char * s, LcdFlags mode);
void lcdDrawTextAtIndex(coord_t x, coord_t y, const char** s,uint8_t idx, LcdFlags mode);
void lcdDrawTextAtIndex(coord_t x, coord_t y, const char *const *s,uint8_t idx, LcdFlags mode);
void lcdDrawSizedText(coord_t x, coord_t y, const char * s, unsigned char len, LcdFlags mode);
void lcdDrawText(coord_t x, coord_t y, const char * s);
void lcdDrawSizedText(coord_t x, coord_t y, const char * s, unsigned char len);
Expand Down
2 changes: 1 addition & 1 deletion radio/src/gui/212x64/splash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#if defined(SPLASH)
#define MAXIMUM_SPLASH_IMAGE_SIZE 3072
struct {
const struct {
const uint8_t __magic_prefix[4] = { 'S','P','S',0 };
const uint8_t splashdata[MAXIMUM_SPLASH_IMAGE_SIZE] = {
#include "bitmaps/212x64/splash.lbm"
Expand Down
2 changes: 1 addition & 1 deletion radio/src/gui/212x64/widgets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ void title(const char * s)
lcdDrawText(0, 0, s, INVERS);
}

choice_t editChoice(coord_t x, coord_t y, const char * label, const char** values, choice_t value, choice_t min, choice_t max, LcdFlags attr, event_t event, IsValueAvailable isValueAvailable)
choice_t editChoice(coord_t x, coord_t y, const char * label, const char* const* values, choice_t value, choice_t min, choice_t max, LcdFlags attr, event_t event, IsValueAvailable isValueAvailable)
{
if (label) {
drawFieldLabel(x, y, label);
Expand Down
124 changes: 62 additions & 62 deletions radio/src/gui/gui_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1164,68 +1164,68 @@ int convertMultiToOtx(int type)
// we don't need the special eeprom/flash string handling, just define them as
// local strings

const char* STR_SUBTYPE_FLYSKY[] = {"Std","V9x9","V6x6","V912","CX20"};
const char* STR_SUBTYPE_HUBSAN[] = {"H107","H301","H501"};
const char* STR_SUBTYPE_FRSKY[] = {"D16","D8","D16 8ch","V8","LBT(EU)","LBT 8ch","D8Cloned","D16Cloned"};
const char* STR_SUBTYPE_HISKY[] = {"Std","HK310"};
const char* STR_SUBTYPE_V2X2[] = {"Std","JXD506","MR101"};
const char* STR_SUBTYPE_DSM[] = {"2 1F","2 2F","X 1F","X 2F","Auto","R 1F"};
const char* STR_SUBTYPE_DEVO[] = {"8ch","10ch","12ch","6ch","7ch"};
const char* STR_SUBTYPE_YD717[] = {"Std","SkyWlkr","Syma X4","XINXUN","NIHUI"};
const char* STR_SUBTYPE_KN[] = {"WLtoys","FeiLun"};
const char* STR_SUBTYPE_SYMAX[] = {"Std","X5C"};
const char* STR_SUBTYPE_SLT[] = {"V1_6ch","V2_8ch","Q100","Q200","MR100"};
const char* STR_SUBTYPE_CX10[] = {"Green","Blue","DM007","-","JC3015a","JC3015b","MK33041"};
const char* STR_SUBTYPE_CG023[] = {"Std","YD829"};
const char* STR_SUBTYPE_BAYANG[] = {"Std","H8S3D","X16 AH","IRDrone","DHD D4","QX100"};
const char* STR_SUBTYPE_ESky[] = {"Std","ET4"};
const char* STR_SUBTYPE_MT99[] = {"MT99","H7","YZ","LS","FY805","A180","Dragon","F949G"};
const char* STR_SUBTYPE_MJXQ[] = {"WLH08","X600","X800","H26D","E010","H26WH","Phoenix"};
const char* STR_SUBTYPE_FY326[] = {"Std","FY319"};
const char* STR_SUBTYPE_FUTABA[] = {"SFHSS"};
const char* STR_SUBTYPE_HONTAI[] = {"Std","JJRC X1","X5C1","FQ_951"};
const char* STR_SUBTYPE_AFHDS2A[] = {"PWM,IBUS","PPM,IBUS","PWM,SBUS","PPM,SBUS","PWM,IB16","PPM,IB16"};
const char* STR_SUBTYPE_Q2X2[] = {"Q222","Q242","Q282"};
const char* STR_SUBTYPE_WK2x01[] = {"WK2801","WK2401","W6_5_1","W6_6_1","W6_HeL","W6_HeI"};
const char* STR_SUBTYPE_Q303[] = {"Std","CX35","CX10D","CX10WD"};
const char* STR_SUBTYPE_CABELL[] = {"V3","V3 Telm","-","-","-","-","F-Safe","Unbind"};
const char* STR_SUBTYPE_ESKY150[] = {"4ch","7ch"};
const char* STR_SUBTYPE_H83D[] = {"Std","H20H","H20Mini","H30Mini"};
const char* STR_SUBTYPE_CORONA[] = {"V1","V2","FD V3"};
const char* STR_SUBTYPE_HITEC[] = {"Optima","Opt Hub","Minima"};
const char* STR_SUBTYPE_WFLY[] = {"WFR0x"};
const char* STR_SUBTYPE_BUGS_MINI[] = {"Std","Bugs3H"};
const char* STR_SUBTYPE_TRAXXAS[] = {"6519"};
const char* STR_SUBTYPE_E01X[] = {"E012","E015"};
const char* STR_SUBTYPE_V911S[] = {"Std","E119"};
const char* STR_SUBTYPE_GD00X[] = {"GD_V1","GD_V2"};
const char* STR_SUBTYPE_V761[] = {"3ch","4ch"};
const char* STR_SUBTYPE_KF606[] = {"KF606","MIG320"};
const char* STR_SUBTYPE_REDPINE[] = {"Fast","Slow"};
const char* STR_SUBTYPE_POTENSIC[] = {"A20"};
const char* STR_SUBTYPE_ZSX[] = {"280JJRC"};
const char* STR_SUBTYPE_HEIGHT[] = {"5ch","8ch"};
const char* STR_SUBTYPE_FRSKYX_RX[] = {"RX","CloneTX"};
const char* STR_SUBTYPE_HOTT[] = {"Sync","No_Sync"};
const char* STR_SUBTYPE_FX816[] = {"P38"};
const char* STR_SUBTYPE_PELIKAN[] = {"Pro","Lite","SCX24"};
const char* STR_SUBTYPE_XK[] = {"X450","X420"};
const char* STR_SUBTYPE_XN297DUMP[] = {"250K","1M","2M","AUTO","NRF","CC2500"};
const char* STR_SUBTYPE_FRSKYX2[] = {"D16","D16 8ch","LBT(EU)","LBT 8ch","Cloned","Clone8ch"};
const char* STR_SUBTYPE_FRSKYR9[] = {"915MHz","868MHz","915 8ch","868 8ch","FCC","---","FCC 8ch"};
const char* STR_SUBTYPE_PROPEL[] = {"74-Z"};
const char* STR_SUBTYPE_FRSKYL[] = {"LR12","LR12 6ch"};
const char* STR_SUBTYPE_ESKY150V2[] = {"150 V2"};
const char* STR_SUBTYPE_JJRC345[] = {"Std","SkyTmbr"};
const char* STR_SUBTYPE_KYOSHO[] = {"FHSS","Hype"};
const char* STR_SUBTYPE_RLINK[] = {"Surface","Air","DumboRC"};
const char* STR_SUBTYPE_ELRS[] = {"N/A WIP"};
const char* STR_SUBTYPE_REALACC[] = {"R11"};
const char* STR_SUBTYPE_WFLY2[] = {"RF20x"};
const char* STR_SUBTYPE_MOULDKG[] = {"Analog","Digital"};
const char* STR_SUBTYPE_MT992[] = {"PA18"};

const char* mm_options_strings::options[] = {
const char* const STR_SUBTYPE_FLYSKY[] = {"Std","V9x9","V6x6","V912","CX20"};
const char* const STR_SUBTYPE_HUBSAN[] = {"H107","H301","H501"};
const char* const STR_SUBTYPE_FRSKY[] = {"D16","D8","D16 8ch","V8","LBT(EU)","LBT 8ch","D8Cloned","D16Cloned"};
const char* const STR_SUBTYPE_HISKY[] = {"Std","HK310"};
const char* const STR_SUBTYPE_V2X2[] = {"Std","JXD506","MR101"};
const char* const STR_SUBTYPE_DSM[] = {"2 1F","2 2F","X 1F","X 2F","Auto","R 1F"};
const char* const STR_SUBTYPE_DEVO[] = {"8ch","10ch","12ch","6ch","7ch"};
const char* const STR_SUBTYPE_YD717[] = {"Std","SkyWlkr","Syma X4","XINXUN","NIHUI"};
const char* const STR_SUBTYPE_KN[] = {"WLtoys","FeiLun"};
const char* const STR_SUBTYPE_SYMAX[] = {"Std","X5C"};
const char* const STR_SUBTYPE_SLT[] = {"V1_6ch","V2_8ch","Q100","Q200","MR100"};
const char* const STR_SUBTYPE_CX10[] = {"Green","Blue","DM007","-","JC3015a","JC3015b","MK33041"};
const char* const STR_SUBTYPE_CG023[] = {"Std","YD829"};
const char* const STR_SUBTYPE_BAYANG[] = {"Std","H8S3D","X16 AH","IRDrone","DHD D4","QX100"};
const char* const STR_SUBTYPE_ESky[] = {"Std","ET4"};
const char* const STR_SUBTYPE_MT99[] = {"MT99","H7","YZ","LS","FY805","A180","Dragon","F949G"};
const char* const STR_SUBTYPE_MJXQ[] = {"WLH08","X600","X800","H26D","E010","H26WH","Phoenix"};
const char* const STR_SUBTYPE_FY326[] = {"Std","FY319"};
const char* const STR_SUBTYPE_FUTABA[] = {"SFHSS"};
const char* const STR_SUBTYPE_HONTAI[] = {"Std","JJRC X1","X5C1","FQ_951"};
const char* const STR_SUBTYPE_AFHDS2A[] = {"PWM,IBUS","PPM,IBUS","PWM,SBUS","PPM,SBUS","PWM,IB16","PPM,IB16"};
const char* const STR_SUBTYPE_Q2X2[] = {"Q222","Q242","Q282"};
const char* const STR_SUBTYPE_WK2x01[] = {"WK2801","WK2401","W6_5_1","W6_6_1","W6_HeL","W6_HeI"};
const char* const STR_SUBTYPE_Q303[] = {"Std","CX35","CX10D","CX10WD"};
const char* const STR_SUBTYPE_CABELL[] = {"V3","V3 Telm","-","-","-","-","F-Safe","Unbind"};
const char* const STR_SUBTYPE_ESKY150[] = {"4ch","7ch"};
const char* const STR_SUBTYPE_H83D[] = {"Std","H20H","H20Mini","H30Mini"};
const char* const STR_SUBTYPE_CORONA[] = {"V1","V2","FD V3"};
const char* const STR_SUBTYPE_HITEC[] = {"Optima","Opt Hub","Minima"};
const char* const STR_SUBTYPE_WFLY[] = {"WFR0x"};
const char* const STR_SUBTYPE_BUGS_MINI[] = {"Std","Bugs3H"};
const char* const STR_SUBTYPE_TRAXXAS[] = {"6519"};
const char* const STR_SUBTYPE_E01X[] = {"E012","E015"};
const char* const STR_SUBTYPE_V911S[] = {"Std","E119"};
const char* const STR_SUBTYPE_GD00X[] = {"GD_V1","GD_V2"};
const char* const STR_SUBTYPE_V761[] = {"3ch","4ch"};
const char* const STR_SUBTYPE_KF606[] = {"KF606","MIG320"};
const char* const STR_SUBTYPE_REDPINE[] = {"Fast","Slow"};
const char* const STR_SUBTYPE_POTENSIC[] = {"A20"};
const char* const STR_SUBTYPE_ZSX[] = {"280JJRC"};
const char* const STR_SUBTYPE_HEIGHT[] = {"5ch","8ch"};
const char* const STR_SUBTYPE_FRSKYX_RX[] = {"RX","CloneTX"};
const char* const STR_SUBTYPE_HOTT[] = {"Sync","No_Sync"};
const char* const STR_SUBTYPE_FX816[] = {"P38"};
const char* const STR_SUBTYPE_PELIKAN[] = {"Pro","Lite","SCX24"};
const char* const STR_SUBTYPE_XK[] = {"X450","X420"};
const char* const STR_SUBTYPE_XN297DUMP[] = {"250K","1M","2M","AUTO","NRF","CC2500"};
const char* const STR_SUBTYPE_FRSKYX2[] = {"D16","D16 8ch","LBT(EU)","LBT 8ch","Cloned","Clone8ch"};
const char* const STR_SUBTYPE_FRSKYR9[] = {"915MHz","868MHz","915 8ch","868 8ch","FCC","---","FCC 8ch"};
const char* const STR_SUBTYPE_PROPEL[] = {"74-Z"};
const char* const STR_SUBTYPE_FRSKYL[] = {"LR12","LR12 6ch"};
const char* const STR_SUBTYPE_ESKY150V2[] = {"150 V2"};
const char* const STR_SUBTYPE_JJRC345[] = {"Std","SkyTmbr"};
const char* const STR_SUBTYPE_KYOSHO[] = {"FHSS","Hype"};
const char* const STR_SUBTYPE_RLINK[] = {"Surface","Air","DumboRC"};
const char* const STR_SUBTYPE_ELRS[] = {"N/A WIP"};
const char* const STR_SUBTYPE_REALACC[] = {"R11"};
const char* const STR_SUBTYPE_WFLY2[] = {"RF20x"};
const char* const STR_SUBTYPE_MOULDKG[] = {"Analog","Digital"};
const char* const STR_SUBTYPE_MT992[] = {"PA18"};

const char* const mm_options_strings::options[] = {
nullptr,
STR_MULTI_OPTION,
STR_MULTI_RFTUNE,
Expand Down
5 changes: 3 additions & 2 deletions radio/src/pulses/crossfire.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include "intmodule_serial_driver.h"
#endif

#include "crossfire.h"
#include "telemetry/crossfire.h"

#define CROSSFIRE_CH_BITS 11
Expand Down Expand Up @@ -283,7 +284,7 @@ static void crossfireDeInitInternal(void* context)
state->deinit();
}

etx_module_driver_t CrossfireInternalDriver = {
const etx_module_driver_t CrossfireInternalDriver = {
.protocol = PROTOCOL_CHANNELS_CROSSFIRE,
.init = crossfireInitInternal,
.deinit = crossfireDeInitInternal,
Expand Down Expand Up @@ -323,7 +324,7 @@ static void crossfireDeInitExternal(void* context)
mixerSchedulerSetPeriod(EXTERNAL_MODULE, 0);
}

etx_module_driver_t CrossfireExternalDriver = {
const etx_module_driver_t CrossfireExternalDriver = {
.protocol = PROTOCOL_CHANNELS_CROSSFIRE,
.init = crossfireInitExternal,
.deinit = crossfireDeInitExternal,
Expand Down
4 changes: 2 additions & 2 deletions radio/src/pulses/crossfire.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@

#include "hal/module_driver.h"

extern etx_module_driver_t CrossfireInternalDriver;
extern etx_module_driver_t CrossfireExternalDriver;
extern const etx_module_driver_t CrossfireInternalDriver;
extern const etx_module_driver_t CrossfireExternalDriver;
4 changes: 2 additions & 2 deletions radio/src/pulses/modules_helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ extern uint32_t NV14internalModuleFwVersion;
// When using packed, the pointer in here end up not being aligned, which clang and gcc complain about
// Keep the order of the fields that the so that the size stays small
struct mm_options_strings {
static const char* options[];
static const char* const options[];
};

const uint8_t getMaxMultiOptions();
Expand All @@ -118,7 +118,7 @@ struct mm_protocol_definition {
uint8_t maxSubtype;
bool failsafe;
bool disable_ch_mapping;
const char** subTypeString;
const char* const* subTypeString;
const char* optionsstr;
};

Expand Down
2 changes: 1 addition & 1 deletion radio/src/strhelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ char *strcat_zchar(char *dest, const char *name, uint8_t size,
#endif

#if !defined(BOOT)
char *getStringAtIndex(char *dest, const char **s, int idx)
char *getStringAtIndex(char *dest, const char *const *s, int idx)
{
strcpy(dest, s[idx]);
return dest;
Expand Down
2 changes: 1 addition & 1 deletion radio/src/strhelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ char *strAppendFilename(char *dest, const char *filename, const int size);
std::string formatNumberAsString(int32_t val, LcdFlags flags = 0, uint8_t len = 0, const char * prefix = nullptr, const char * suffix = nullptr);

#if !defined(BOOT)
char *getStringAtIndex(char *dest, const char **s, int idx);
char *getStringAtIndex(char *dest, const char *const *s, int idx);
char *strAppendStringWithIndex(char *dest, const char *s, int idx);
#define LEN_TIMER_STRING 10 // "-00:00:00"
char *getTimerString(char *dest, int32_t tme, TimerOptions timerOptions = {.options = 0});
Expand Down
8 changes: 5 additions & 3 deletions radio/src/targets/taranis/stm32f2_flash.ld
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,10 @@ SECTIONS

KEEP(*(.bootloader)) /* Bootloader code */

. = 32768; /* Set the start of the main program */
. = 0x8000; /* Set the start of the main program */
_stext = .; /* Provide the name for the start of this section */
. = ALIGN(4);

. = ALIGN(4);
KEEP(*(.isr_vector)) /* Startup code */
KEEP(*(.fwversiondata))
*(.text) /* .text sections (code) */
Expand All @@ -63,7 +64,8 @@ SECTIONS
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
*(.glue_7) /* glue arm to thumb code */
*(.glue_7t) /* glue thumb to arm code */
*(.eh_frame)
*(.eh_frame)
*(.data.__global_locale)

KEEP (*(.init))
KEEP (*(.fini))
Expand Down
1 change: 1 addition & 0 deletions radio/src/targets/taranis/stm32f4_flash.ld
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ SECTIONS
*(.glue_7) /* glue arm to thumb code */
*(.glue_7t) /* glue thumb to arm code */
*(.eh_frame)
*(.data.__global_locale)

KEEP (*(.init))
KEEP (*(.fini))
Expand Down
6 changes: 3 additions & 3 deletions radio/src/translations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#define CENTER
#endif

#define ISTR(x) const char* STR_##x[] = { TR_##x }
#define ISTR(x) const char* const STR_##x[] = { TR_##x }

#if defined(COLORLCD)
ISTR(FONT_SIZES);
Expand Down Expand Up @@ -784,8 +784,8 @@ const char STR_SPORT_UPDATE_POWER_MODE[] = TR_SPORT_UPDATE_POWER_MODE;
const char STR_TOUCH_PANEL[] = TR_TOUCH_PANEL;
const char STR_FILE_SIZE[] = TR_FILE_SIZE;
const char STR_FILE_OPEN[] = TR_FILE_OPEN;
const char* STR_TIMER_MODES[] = TR_TIMER_MODES;
const char* STR_MONTHS[] = TR_MONTHS;
const char* const STR_TIMER_MODES[] = TR_TIMER_MODES;
const char* const STR_MONTHS[] = TR_MONTHS;
const char STR_LIMITS_HEADERS_DIRECTION[] = TR_LIMITS_HEADERS_DIRECTION;

#if defined(COLORLCD)
Expand Down
Loading

0 comments on commit 3ee5a7b

Please sign in to comment.