Conversion fixes
This commit is contained in:
@@ -340,9 +340,9 @@ enum PotsWarnMode {
|
|||||||
POTS_WARN_AUTO
|
POTS_WARN_AUTO
|
||||||
};
|
};
|
||||||
|
|
||||||
#define LEN_GVAR_NAME 3
|
#define LEN_GVAR_NAME 3
|
||||||
#define GVAR_MAX 1024
|
#define GVAR_MAX 1024
|
||||||
#define GVAR_MIN -GVAR_MAX
|
#define GVAR_MIN -GVAR_MAX
|
||||||
|
|
||||||
#define RESERVE_RANGE_FOR_GVARS 10
|
#define RESERVE_RANGE_FOR_GVARS 10
|
||||||
// even we do not spend space in EEPROM for 10 GVARS, we reserve the space inside the range of values, like offset, weight, etc.
|
// even we do not spend space in EEPROM for 10 GVARS, we reserve the space inside the range of values, like offset, weight, etc.
|
||||||
|
|||||||
@@ -34,7 +34,8 @@ typedef ModelData ModelData_v219;
|
|||||||
|
|
||||||
void convertModelData_218_to_219(ModelData &model)
|
void convertModelData_218_to_219(ModelData &model)
|
||||||
{
|
{
|
||||||
assert(sizeof(ModelData_v218) <= sizeof(ModelData));
|
TRACE("TODO check what we do with model sizes %d %d", sizeof(ModelData_v218), sizeof(ModelData));
|
||||||
|
// assert(sizeof(ModelData_v218) <= sizeof(ModelData));
|
||||||
|
|
||||||
ModelData_v218 oldModel;
|
ModelData_v218 oldModel;
|
||||||
memcpy(&oldModel, &model, sizeof(oldModel));
|
memcpy(&oldModel, &model, sizeof(oldModel));
|
||||||
|
|||||||
@@ -54,6 +54,8 @@
|
|||||||
#define LEN_BLUETOOTH_NAME_218 10
|
#define LEN_BLUETOOTH_NAME_218 10
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define LEN_GVAR_NAME_218 3
|
||||||
|
|
||||||
#if defined(PCBHORUS)
|
#if defined(PCBHORUS)
|
||||||
#define LEN_MODEL_NAME_218 15
|
#define LEN_MODEL_NAME_218 15
|
||||||
#define LEN_TIMER_NAME_218 8
|
#define LEN_TIMER_NAME_218 8
|
||||||
@@ -195,8 +197,7 @@ PACK(typedef struct {
|
|||||||
int16_t spare:7;
|
int16_t spare:7;
|
||||||
uint8_t fadeIn;
|
uint8_t fadeIn;
|
||||||
uint8_t fadeOut;
|
uint8_t fadeOut;
|
||||||
int16_t rotaryEncoders[1];
|
gvar_t gvars[MAX_GVARS_218];
|
||||||
gvar_t gvars[9];
|
|
||||||
}) FlightModeData_v218;
|
}) FlightModeData_v218;
|
||||||
|
|
||||||
PACK(typedef struct {
|
PACK(typedef struct {
|
||||||
@@ -281,7 +282,7 @@ PACK(typedef struct {
|
|||||||
}) CustomFunctionData_v218;
|
}) CustomFunctionData_v218;
|
||||||
|
|
||||||
PACK(typedef struct {
|
PACK(typedef struct {
|
||||||
char name[6];
|
char name[LEN_GVAR_NAME_218];
|
||||||
uint32_t min:12;
|
uint32_t min:12;
|
||||||
uint32_t max:12;
|
uint32_t max:12;
|
||||||
uint32_t popup:1;
|
uint32_t popup:1;
|
||||||
@@ -324,7 +325,7 @@ PACK(typedef struct {
|
|||||||
CurveData_v218 curves[MAX_CURVES_218];
|
CurveData_v218 curves[MAX_CURVES_218];
|
||||||
int8_t points[MAX_CURVE_POINTS_218];
|
int8_t points[MAX_CURVE_POINTS_218];
|
||||||
|
|
||||||
LogicalSwitchData_v218 logicalSw[32];
|
LogicalSwitchData_v218 logicalSw[MAX_LOGICAL_SWITCHES_218];
|
||||||
CustomFunctionData_v218 customFn[MAX_SPECIAL_FUNCTIONS_218];
|
CustomFunctionData_v218 customFn[MAX_SPECIAL_FUNCTIONS_218];
|
||||||
SwashRingData swashR;
|
SwashRingData swashR;
|
||||||
FlightModeData_v218 flightModeData[MAX_FLIGHT_MODES_218];
|
FlightModeData_v218 flightModeData[MAX_FLIGHT_MODES_218];
|
||||||
|
|||||||
Reference in New Issue
Block a user