Compilation fixes after rebase
This commit is contained in:
@@ -44,19 +44,29 @@ struct LayoutPersistentData {
|
|||||||
|
|
||||||
class LayoutFactory
|
class LayoutFactory
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
LayoutFactory(const char * id, const char * name);
|
LayoutFactory(const char* id, const char* name);
|
||||||
const char * getId() const { return id; }
|
|
||||||
const char * getName() const { return name; }
|
|
||||||
virtual void drawThumb(BitmapBuffer * dc, uint16_t x, uint16_t y, LcdFlags flags) const = 0;
|
|
||||||
virtual const ZoneOption * getOptions() const = 0;
|
|
||||||
virtual WidgetsContainer * create(LayoutPersistentData * persistentData) const = 0;
|
|
||||||
virtual WidgetsContainer * load(LayoutPersistentData * persistentData) const = 0;
|
|
||||||
virtual void initPersistentData(LayoutPersistentData * persistentData) const = 0;
|
|
||||||
|
|
||||||
protected:
|
const char* getId() const { return id; }
|
||||||
const char * id;
|
const char* getName() const { return name; }
|
||||||
const char * name;
|
|
||||||
|
virtual void drawThumb(BitmapBuffer* dc, uint16_t x, uint16_t y,
|
||||||
|
LcdFlags flags) const = 0;
|
||||||
|
|
||||||
|
virtual const ZoneOption* getOptions() const = 0;
|
||||||
|
|
||||||
|
virtual WidgetsContainer* create(
|
||||||
|
LayoutPersistentData* persistentData) const = 0;
|
||||||
|
|
||||||
|
virtual WidgetsContainer* load(
|
||||||
|
LayoutPersistentData* persistentData) const = 0;
|
||||||
|
|
||||||
|
virtual void initPersistentData(LayoutPersistentData* persistentData,
|
||||||
|
bool setDefault) const = 0;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
const char* id;
|
||||||
|
const char* name;
|
||||||
};
|
};
|
||||||
|
|
||||||
WidgetsContainer * loadLayout(const char * name, LayoutPersistentData * persistentData);
|
WidgetsContainer * loadLayout(const char * name, LayoutPersistentData * persistentData);
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
#include "opentx.h"
|
#include "opentx.h"
|
||||||
#include "conversions.h"
|
#include "conversions.h"
|
||||||
|
|
||||||
#if defined(COLORLCD)
|
#if defined(COLORLCD) && !defined(SDCARD_YAML)
|
||||||
#include "storage/modelslist.h"
|
#include "storage/modelslist.h"
|
||||||
#include "storage/sdcard_common.h"
|
#include "storage/sdcard_common.h"
|
||||||
|
|
||||||
|
|||||||
@@ -213,7 +213,7 @@ void convertModelData_219_to_220(ModelData &model)
|
|||||||
|
|
||||||
if (defaultLayout) {
|
if (defaultLayout) {
|
||||||
strcpy(newModel.screenData[0].LayoutId, defaultLayout->getId());
|
strcpy(newModel.screenData[0].LayoutId, defaultLayout->getId());
|
||||||
defaultLayout->initPersistentData(&newModel.screenData[0].layoutData);
|
defaultLayout->initPersistentData(&newModel.screenData[0].layoutData, true);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
free(oldModelAllocated);
|
free(oldModelAllocated);
|
||||||
|
|||||||
Reference in New Issue
Block a user