feat(color): use dynamic memory allocation for screen & widget data (#6782)
This commit is contained in:
@@ -141,8 +141,7 @@ void RadioLayout::init(const char* layoutId, CustomScreens& customScreens)
|
||||
|
||||
for (int i = 0; i < MAX_CUSTOM_SCREENS; i++) {
|
||||
if (i == 0)
|
||||
memcpy(&customScreens.customScreenData[i].layoutId, layoutId,
|
||||
LAYOUT_ID_LEN);
|
||||
strncpy(customScreens.customScreenData[i].layoutId, layoutId, LAYOUT_ID_LEN);
|
||||
|
||||
LayoutPersistentData& persistentData =
|
||||
customScreens.customScreenData[i].layoutPersistentData;
|
||||
|
||||
@@ -33,14 +33,14 @@
|
||||
|
||||
constexpr int MAX_CUSTOM_SCREENS {10};
|
||||
constexpr int MAX_THEME_OPTIONS {5};
|
||||
constexpr int LEN_ZONE_OPTION_STRING {12};
|
||||
constexpr int LEN_ZONE_OPTION_STRING {255}; // TODO: use std::string instead of fixed length char array
|
||||
constexpr int MAX_LAYOUT_ZONES {10};
|
||||
constexpr int MAX_LAYOUT_OPTIONS {10};
|
||||
constexpr int WIDGET_NAME_LEN {20};
|
||||
constexpr int MAX_WIDGET_OPTIONS {10};
|
||||
constexpr int WIDGET_NAME_LEN {255}; // TODO: use std::string instead of fixed length char array
|
||||
constexpr int MAX_WIDGET_OPTIONS {50};
|
||||
constexpr int MAX_TOPBAR_ZONES {6}; // max 4 used for portrait
|
||||
constexpr int MAX_TOPBAR_OPTIONS {1};
|
||||
constexpr int LAYOUT_ID_LEN {12};
|
||||
constexpr int LAYOUT_ID_LEN {255}; // TODO: use std::string instead of fixed length char array
|
||||
|
||||
// Common 'ZoneOptionValue's among all layouts
|
||||
enum {
|
||||
|
||||
Reference in New Issue
Block a user