fix(B&W): Avoid having constants in SRAM (#2993)
fix constness to avoid having constants in data segment .... and thus free some precious RAM
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user