chore(radio): Move const data from RAM to FLASH. (#4098)
Co-authored-by: philmoz <phil.a.mitchell@gmail.com>
This commit is contained in:
@@ -63,7 +63,7 @@ enum GVarFields {
|
||||
|
||||
#define GVAR_2ND_COLUMN (12*FW)
|
||||
|
||||
static const char* _str_units[] = { "-", "%" };
|
||||
static const char* const _str_units[] = { "-", "%" };
|
||||
|
||||
void menuModelGVarOne(event_t event)
|
||||
{
|
||||
|
||||
@@ -65,7 +65,7 @@ enum GVarFields {
|
||||
|
||||
#define GVAR_2ND_COLUMN (12*FW)
|
||||
|
||||
static const char* _str_units[] = { "-", "%" };
|
||||
static const char* const _str_units[] = { "-", "%" };
|
||||
|
||||
void menuModelGVarOne(event_t event)
|
||||
{
|
||||
|
||||
@@ -29,11 +29,11 @@ static const lv_coord_t row_dsc[] = {LV_GRID_CONTENT,
|
||||
|
||||
#define SET_DIRTY()
|
||||
|
||||
static const char* _analog_outputs[] = { "PWM", "PPM" };
|
||||
static const char* _bus_types[] = { "iBUS OUT", "iBUS IN", "SBUS" };
|
||||
static const char* _v1_bus_types[] = { "PWM", "PPM", "SBUS", "iBUS IN", "iBUS OUT" };
|
||||
static const char* _v1_pwmfreq_types[] = { STR_ANALOG_SERVO, STR_DIGITAL_SERVO, "SR833HZ", "SFR1000HZ", STR_MULTI_CUSTOM };
|
||||
static const char* _v0_pwmfreq_types[] = { STR_ANALOG_SERVO, STR_DIGITAL_SERVO, STR_MULTI_CUSTOM };
|
||||
static const char* const _analog_outputs[] = { "PWM", "PPM" };
|
||||
static const char* const _bus_types[] = { "iBUS OUT", "iBUS IN", "SBUS" };
|
||||
static const char* const _v1_bus_types[] = { "PWM", "PPM", "SBUS", "iBUS IN", "iBUS OUT" };
|
||||
static const char* const _v1_pwmfreq_types[] = { STR_ANALOG_SERVO, STR_DIGITAL_SERVO, "SR833HZ", "SFR1000HZ", STR_MULTI_CUSTOM };
|
||||
static const char* const _v0_pwmfreq_types[] = { STR_ANALOG_SERVO, STR_DIGITAL_SERVO, STR_MULTI_CUSTOM };
|
||||
|
||||
static const uint16_t _v1_index2pwmvalue[] = {50, 333, 2, 1, 50};
|
||||
static const uint16_t _v0_index2pwmvalue[] = {50, 333, 50};
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
#include "afhds3_options.h"
|
||||
#include "opentx.h"
|
||||
|
||||
static const char* _afhds3_region[] = { "CE", "FCC" };
|
||||
static const char* const _afhds3_region[] = { "CE", "FCC" };
|
||||
|
||||
static const char* _afhds3_phy_mode[] = {
|
||||
static const char* const _afhds3_phy_mode[] = {
|
||||
// V0
|
||||
"Classic 18ch",
|
||||
"C-Fast 10ch",
|
||||
|
||||
@@ -26,8 +26,8 @@ constexpr int BAR_MARGIN = 5;
|
||||
constexpr int BAR_TOP_MARGIN = 5;
|
||||
constexpr int BAR_HEIGHT_OFFSET = BAR_TOP_MARGIN + 25;
|
||||
|
||||
static const char *RGBChars[MAX_BARS] = { "R", "G", "B" };
|
||||
static const char *HSVChars[MAX_BARS] = { "H", "S", "V" };
|
||||
static const char * const RGBChars[MAX_BARS] = { "R", "G", "B" };
|
||||
static const char * const HSVChars[MAX_BARS] = { "H", "S", "V" };
|
||||
|
||||
void ColorBar::pressing(lv_event_t* e)
|
||||
{
|
||||
@@ -276,7 +276,7 @@ uint32_t HSVColorType::getRGB()
|
||||
return HSVtoRGB(bars[0]->value, bars[1]->value, bars[2]->value);
|
||||
}
|
||||
|
||||
const char** HSVColorType::getLabelChars()
|
||||
const char* const* HSVColorType::getLabelChars()
|
||||
{
|
||||
return HSVChars;
|
||||
}
|
||||
@@ -306,7 +306,7 @@ uint32_t RGBColorType::getRGB()
|
||||
return RGB(bars[0]->value, bars[1]->value, bars[2]->value);
|
||||
}
|
||||
|
||||
const char** RGBColorType::getLabelChars()
|
||||
const char* const* RGBColorType::getLabelChars()
|
||||
{
|
||||
return RGBChars;
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ protected:
|
||||
lv_obj_t* barLabels[MAX_BARS];
|
||||
lv_obj_t* barValLabels[MAX_BARS];
|
||||
|
||||
virtual const char** getLabelChars() { return nullptr; };
|
||||
virtual const char* const* getLabelChars() { return nullptr; };
|
||||
|
||||
lv_obj_t* create_bar_label(lv_obj_t* parent, lv_coord_t x, lv_coord_t y);
|
||||
lv_obj_t* create_bar_value_label(lv_obj_t* parent, lv_coord_t x, lv_coord_t y);
|
||||
@@ -88,7 +88,7 @@ public:
|
||||
uint32_t getRGB() override;
|
||||
|
||||
protected:
|
||||
const char** getLabelChars() override;
|
||||
const char* const* getLabelChars() override;
|
||||
};
|
||||
|
||||
// Color editor for RGB color input
|
||||
@@ -98,7 +98,7 @@ public:
|
||||
uint32_t getRGB() override;
|
||||
|
||||
protected:
|
||||
const char** getLabelChars() override;
|
||||
const char* const* getLabelChars() override;
|
||||
};
|
||||
|
||||
// Color editor that shows the system theme colors as buttons
|
||||
|
||||
@@ -187,7 +187,7 @@ class TSStyle
|
||||
|
||||
static TSStyle tsStyle;
|
||||
|
||||
static uint8_t freshBitmap[] = {
|
||||
static uint8_t const freshBitmap[] = {
|
||||
0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00,
|
||||
0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00,
|
||||
0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00,
|
||||
@@ -290,7 +290,7 @@ class SensorButton : public Button {
|
||||
|
||||
box = tsStyle.newFreshCont(lvobj);
|
||||
fresh = tsStyle.newFreshIcon(box);
|
||||
lv_canvas_set_buffer(fresh, freshBitmap, 8, 8, LV_IMG_CF_ALPHA_8BIT);
|
||||
lv_canvas_set_buffer(fresh, (void*)freshBitmap, 8, 8, LV_IMG_CF_ALPHA_8BIT);
|
||||
lv_obj_add_flag(fresh, LV_OBJ_FLAG_HIDDEN);
|
||||
|
||||
valLabel = tsStyle.newValue(lvobj);
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
// TODO: format for LCD_WIDTH > LCD_HEIGHT
|
||||
|
||||
// TODO: translation
|
||||
const char* RFSCAN_TITLE = "MPM: Scanning protocols...";
|
||||
const char* const RFSCAN_TITLE = "MPM: Scanning protocols...";
|
||||
|
||||
RfScanDialog::RfScanDialog(Window* parent, MultiRfProtocols* protos,
|
||||
std::function<void()> onClose) :
|
||||
|
||||
@@ -128,7 +128,7 @@ static const struct YamlNode r_struct_YAMLTheme[] = {
|
||||
YAML_END
|
||||
};
|
||||
|
||||
static const char *colorNames[COLOR_COUNT] = {
|
||||
static const char * const colorNames[COLOR_COUNT] = {
|
||||
STR_THEME_COLOR_DEFAULT, STR_THEME_COLOR_PRIMARY1, STR_THEME_COLOR_PRIMARY2, STR_THEME_COLOR_PRIMARY3,
|
||||
STR_THEME_COLOR_SECONDARY1, STR_THEME_COLOR_SECONDARY2, STR_THEME_COLOR_SECONDARY3, STR_THEME_COLOR_FOCUS,
|
||||
STR_THEME_COLOR_EDIT, STR_THEME_COLOR_ACTIVE, STR_THEME_COLOR_WARNING, STR_THEME_COLOR_DISABLED, STR_THEME_COLOR_CUSTOM,
|
||||
|
||||
@@ -839,7 +839,7 @@ const lv_obj_class_t etx_bar_class = {
|
||||
.destructor_cb = nullptr,
|
||||
.user_data = nullptr,
|
||||
.event_cb = nullptr,
|
||||
.width_def = lv_pct(100),
|
||||
.width_def = LV_PCT(100),
|
||||
.height_def = 32,
|
||||
.editable = LV_OBJ_CLASS_EDITABLE_INHERIT,
|
||||
.group_def = LV_OBJ_CLASS_GROUP_DEF_INHERIT,
|
||||
@@ -852,8 +852,8 @@ const lv_obj_class_t etx_checkbox_class = {
|
||||
.destructor_cb = nullptr,
|
||||
.user_data = nullptr,
|
||||
.event_cb = nullptr,
|
||||
.width_def = lv_pct(100),
|
||||
.height_def = lv_pct(100),
|
||||
.width_def = LV_PCT(100),
|
||||
.height_def = LV_PCT(100),
|
||||
.editable = LV_OBJ_CLASS_EDITABLE_INHERIT,
|
||||
.group_def = LV_OBJ_CLASS_GROUP_DEF_INHERIT,
|
||||
.instance_size = sizeof(lv_checkbox_t),
|
||||
|
||||
Reference in New Issue
Block a user