New UI continued

This commit is contained in:
Bertrand Songis
2019-10-05 19:01:57 +02:00
parent f5c60a86a9
commit ae548b9814
26 changed files with 331 additions and 196 deletions
@@ -200,7 +200,7 @@ PACK(typedef struct {
uint8_t smooth:1;
uint8_t spare:4;
int8_t points;
}) CurveData_v216;
}) CurveHeader_v216;
#if defined(PCBTARANIS)
PACK(typedef struct {
@@ -586,7 +586,7 @@ PACK(typedef struct {
LimitData_v216 limitData[MAX_OUTPUT_CHANNELS_218];
ExpoData_v216 expoData[MAX_EXPOS_218];
CurveData_v216 curves[MAX_CURVES_218];
CurveHeader_v216 curves[MAX_CURVES_218];
int8_t points[MAX_CURVE_POINTS_218];
LogicalSwitchData_v216 logicalSw[32];
@@ -632,7 +632,7 @@ PACK(typedef struct {
LimitData limitData[MAX_OUTPUT_CHANNELS_218];
ExpoData_v217 expoData[MAX_EXPOS_218];
CurveData_v216 curves[MAX_CURVES_218];
CurveHeader_v216 curves[MAX_CURVES_218];
int8_t points[MAX_CURVE_POINTS_218];
LogicalSwitchData_v217 logicalSw[MAX_LOGICAL_SWITCHES_218];
@@ -164,7 +164,7 @@ void convertModelData_218_to_219(ModelData &model)
}
for (uint8_t i=0; i<MAX_CURVES_218; i++) {
memmove(&newModel.curves[i], &oldModel.curves[i], sizeof(CurveData_v218));
memmove(&newModel.curves[i], &oldModel.curves[i], sizeof(CurveHeader_v218));
}
for (uint32_t i=0; i<MAX_CURVE_POINTS_218; i++) {
@@ -249,7 +249,7 @@ PACK(typedef struct {
uint8_t smooth:1;
int8_t points:6; // describes number of points - 5
char name[LEN_CURVE_NAME_218];
}) CurveData_v218;
}) CurveHeader_v218;
PACK(typedef struct {
int16_t calib[4];
@@ -447,7 +447,7 @@ PACK(struct ModelData_v218 {
LimitData limitData[MAX_OUTPUT_CHANNELS_218];
ExpoData_v218 expoData[MAX_EXPOS_218];
CurveData_v218 curves[MAX_CURVES_218];
CurveHeader_v218 curves[MAX_CURVES_218];
int8_t points[MAX_CURVE_POINTS_218];
LogicalSwitchData_v218 logicalSw[MAX_LOGICAL_SWITCHES_218];
+2 -2
View File
@@ -102,7 +102,7 @@ void copyFlightModeData(A * dest, B * src)
}
template <class A, class B>
void copyCurveData(A * dest, B * src)
void copyCurveHeader(A * dest, B * src)
{
dest->type = src->type;
dest->smooth = src->smooth;
@@ -259,7 +259,7 @@ void copyModelData(A * dest, B * src)
copyExpoData(&dest->expoData[i], &src->expoData[i]);
}
for (int i=0; i<32; i++) {
copyCurveData(&dest->curves[i], &src->curves[i]);
copyCurveHeader(&dest->curves[i], &src->curves[i]);
}
memcpy(dest->points, src->points, sizeof(dest->points));
for (int i=0; i<64; i++) {
+1 -1
View File
@@ -157,7 +157,7 @@ void postModelLoad(bool alarms)
}
}
LOAD_MODEL_CURVES();
loadCurves();
resumeMixerCalculations();
if (pulsesStarted()) {