Global functions (only Firmware) - saves 20bytes flash on 9X stock
This commit is contained in:
@@ -339,9 +339,9 @@ Open9xGruvin9xLogicalSwitchData_v209::operator LogicalSwitchData ()
|
||||
return c9x;
|
||||
}
|
||||
|
||||
t_Open9xGruvin9xFuncSwData_v203::operator FuncSwData ()
|
||||
t_Open9xGruvin9xCustomFunctionData_v203::operator CustomFunctionData ()
|
||||
{
|
||||
FuncSwData c9x;
|
||||
CustomFunctionData c9x;
|
||||
c9x.swtch = open9xStockToSwitch(swtch);
|
||||
if (func < 16) {
|
||||
c9x.func = (AssignFunc)(func);
|
||||
@@ -378,9 +378,9 @@ t_Open9xGruvin9xFuncSwData_v203::operator FuncSwData ()
|
||||
return c9x;
|
||||
}
|
||||
|
||||
t_Open9xGruvin9xFuncSwData_v210::operator FuncSwData ()
|
||||
t_Open9xGruvin9xCustomFunctionData_v210::operator CustomFunctionData ()
|
||||
{
|
||||
FuncSwData c9x;
|
||||
CustomFunctionData c9x;
|
||||
c9x.swtch = open9xStockToSwitch(swtch);
|
||||
c9x.param = param;
|
||||
if (func < 22) {
|
||||
@@ -494,9 +494,9 @@ t_Open9xGruvin9xModelData_v207::operator ModelData ()
|
||||
}
|
||||
|
||||
for (int i=0; i<12; i++)
|
||||
c9x.customSw[i] = customSw[i];
|
||||
c9x.logicalSw[i] = logicalSw[i];
|
||||
for (int i=0; i<16; i++)
|
||||
c9x.funcSw[i] = funcSw[i];
|
||||
c9x.customFn[i] = customFn[i];
|
||||
c9x.swashRingData = swashR;
|
||||
c9x.frsky = frsky;
|
||||
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
|
||||
@@ -577,9 +577,9 @@ t_Open9xGruvin9xModelData_v208::operator ModelData ()
|
||||
}
|
||||
}
|
||||
for (int i=0; i<12; i++)
|
||||
c9x.customSw[i] = customSw[i];
|
||||
c9x.logicalSw[i] = logicalSw[i];
|
||||
for (int i=0; i<16; i++)
|
||||
c9x.funcSw[i] = funcSw[i];
|
||||
c9x.customFn[i] = customFn[i];
|
||||
c9x.swashRingData = swashR;
|
||||
c9x.frsky = frsky;
|
||||
c9x.frsky.varioSource = varioSource;
|
||||
@@ -666,9 +666,9 @@ t_Open9xGruvin9xModelData_v209::operator ModelData ()
|
||||
}
|
||||
}
|
||||
for (int i=0; i<12; i++)
|
||||
c9x.customSw[i] = customSw[i];
|
||||
c9x.logicalSw[i] = logicalSw[i];
|
||||
for (int i=0; i<16; i++)
|
||||
c9x.funcSw[i] = funcSw[i];
|
||||
c9x.customFn[i] = customFn[i];
|
||||
c9x.swashRingData = swashR;
|
||||
c9x.frsky = frsky;
|
||||
c9x.frsky.varioSource = varioSource;
|
||||
@@ -759,9 +759,9 @@ t_Open9xGruvin9xModelData_v210::operator ModelData ()
|
||||
}
|
||||
}
|
||||
for (int i=0; i<12; i++)
|
||||
c9x.customSw[i] = customSw[i];
|
||||
c9x.logicalSw[i] = logicalSw[i];
|
||||
for (int i=0; i<16; i++)
|
||||
c9x.funcSw[i] = funcSw[i];
|
||||
c9x.customFn[i] = customFn[i];
|
||||
c9x.swashRingData = swashR;
|
||||
c9x.frsky = frsky;
|
||||
c9x.switchWarningStates = switchWarningStates;
|
||||
@@ -846,9 +846,9 @@ t_Open9xGruvin9xModelData_v211::operator ModelData ()
|
||||
}
|
||||
}
|
||||
for (int i=0; i<12; i++)
|
||||
c9x.customSw[i] = customSw[i];
|
||||
c9x.logicalSw[i] = logicalSw[i];
|
||||
for (int i=0; i<16; i++)
|
||||
c9x.funcSw[i] = funcSw[i];
|
||||
c9x.customFn[i] = customFn[i];
|
||||
c9x.swashRingData = swashR;
|
||||
c9x.frsky = frsky;
|
||||
c9x.switchWarningStates = switchWarningStates;
|
||||
|
||||
@@ -132,24 +132,24 @@ PACK(typedef struct t_Open9xGruvin9xLogicalSwitchData_v209 { // Custom Switches
|
||||
RawSource toSource(int8_t value);
|
||||
}) Open9xGruvin9xLogicalSwitchData_v209;
|
||||
|
||||
PACK(typedef struct t_Open9xGruvin9xFuncSwData_v203 { // Function Switches data
|
||||
PACK(typedef struct t_Open9xGruvin9xCustomFunctionData_v203 { // Function Switches data
|
||||
int8_t swtch; // input
|
||||
uint8_t func;
|
||||
uint8_t param;
|
||||
|
||||
operator FuncSwData();
|
||||
t_Open9xGruvin9xFuncSwData_v203() { memset(this, 0, sizeof(t_Open9xGruvin9xFuncSwData_v203)); }
|
||||
}) Open9xGruvin9xFuncSwData_v203;
|
||||
operator CustomFunctionData();
|
||||
t_Open9xGruvin9xCustomFunctionData_v203() { memset(this, 0, sizeof(t_Open9xGruvin9xCustomFunctionData_v203)); }
|
||||
}) Open9xGruvin9xCustomFunctionData_v203;
|
||||
|
||||
PACK(typedef struct t_Open9xGruvin9xFuncSwData_v210 { // Function Switches data
|
||||
PACK(typedef struct t_Open9xGruvin9xCustomFunctionData_v210 { // Function Switches data
|
||||
int8_t swtch; // input
|
||||
uint8_t func:5;
|
||||
uint8_t delay:3;
|
||||
uint8_t param;
|
||||
|
||||
operator FuncSwData();
|
||||
t_Open9xGruvin9xFuncSwData_v210() { memset(this, 0, sizeof(t_Open9xGruvin9xFuncSwData_v210)); }
|
||||
}) Open9xGruvin9xFuncSwData_v210;
|
||||
operator CustomFunctionData();
|
||||
t_Open9xGruvin9xCustomFunctionData_v210() { memset(this, 0, sizeof(t_Open9xGruvin9xCustomFunctionData_v210)); }
|
||||
}) Open9xGruvin9xCustomFunctionData_v210;
|
||||
|
||||
PACK(typedef struct t_Open9xGruvin9xSwashRingData_v208 { // Swash Ring data
|
||||
uint8_t invertELE:1;
|
||||
@@ -194,8 +194,8 @@ PACK(typedef struct t_Open9xGruvin9xModelData_v207 {
|
||||
Open9xExpoData_v201 expoData[14];
|
||||
int8_t curves5[8][5];
|
||||
int8_t curves9[8][9];
|
||||
Open9xGruvin9xLogicalSwitchData_v207 customSw[12];
|
||||
Open9xFuncSwData_v203 funcSw[16];
|
||||
Open9xGruvin9xLogicalSwitchData_v207 logicalSw[12];
|
||||
Open9xCustomFunctionData_v203 customFn[16];
|
||||
Open9xGruvin9xSwashRingData_v208 swashR;
|
||||
Open9xGruvin9xFlightModeData_v207 flightModeData[5];
|
||||
Open9xFrSkyData_v205 frsky;
|
||||
@@ -228,8 +228,8 @@ PACK(typedef struct t_Open9xGruvin9xModelData_v208 {
|
||||
Open9xExpoData_v201 expoData[14];
|
||||
int8_t curves5[8][5];
|
||||
int8_t curves9[8][9];
|
||||
Open9xGruvin9xLogicalSwitchData_v207 customSw[12];
|
||||
Open9xGruvin9xFuncSwData_v203 funcSw[16];
|
||||
Open9xGruvin9xLogicalSwitchData_v207 logicalSw[12];
|
||||
Open9xGruvin9xCustomFunctionData_v203 customFn[16];
|
||||
Open9xGruvin9xSwashRingData_v208 swashR;
|
||||
Open9xGruvin9xFlightModeData_v208 flightModeData[5];
|
||||
Open9xFrSkyData_v208 frsky;
|
||||
@@ -267,8 +267,8 @@ PACK(typedef struct t_Open9xGruvin9xModelData_v209 {
|
||||
Open9xExpoData_v201 expoData[14];
|
||||
int8_t curves5[8][5];
|
||||
int8_t curves9[8][9];
|
||||
Open9xGruvin9xLogicalSwitchData_v209 customSw[12];
|
||||
Open9xGruvin9xFuncSwData_v203 funcSw[16];
|
||||
Open9xGruvin9xLogicalSwitchData_v209 logicalSw[12];
|
||||
Open9xGruvin9xCustomFunctionData_v203 customFn[16];
|
||||
Open9xGruvin9xSwashRingData_v209 swashR;
|
||||
Open9xGruvin9xFlightModeData_v208 flightModeData[5];
|
||||
Open9xFrSkyData_v208 frsky;
|
||||
@@ -307,8 +307,8 @@ PACK(typedef struct t_Open9xGruvin9xModelData_v210 {
|
||||
Open9xExpoData_v201 expoData[14];
|
||||
int8_t curves[8];
|
||||
int8_t points[112-8];
|
||||
Open9xGruvin9xLogicalSwitchData_v209 customSw[12];
|
||||
Open9xGruvin9xFuncSwData_v210 funcSw[16];
|
||||
Open9xGruvin9xLogicalSwitchData_v209 logicalSw[12];
|
||||
Open9xGruvin9xCustomFunctionData_v210 customFn[16];
|
||||
Open9xGruvin9xSwashRingData_v209 swashR;
|
||||
Open9xGruvin9xFlightModeData_v208 flightModeData[5];
|
||||
|
||||
@@ -345,8 +345,8 @@ PACK(typedef struct t_Open9xGruvin9xModelData_v211 {
|
||||
Open9xExpoData_v211 expoData[14];
|
||||
int8_t curves[8];
|
||||
int8_t points[112-8];
|
||||
Open9xGruvin9xLogicalSwitchData_v209 customSw[12];
|
||||
Open9xGruvin9xFuncSwData_v210 funcSw[16];
|
||||
Open9xGruvin9xLogicalSwitchData_v209 logicalSw[12];
|
||||
Open9xGruvin9xCustomFunctionData_v210 customFn[16];
|
||||
Open9xGruvin9xSwashRingData_v209 swashR;
|
||||
Open9xGruvin9xFlightModeData_v208 flightModeData[5];
|
||||
|
||||
|
||||
@@ -571,9 +571,9 @@ t_Open9xArmLogicalSwitchData_v210::operator LogicalSwitchData ()
|
||||
return c9x;
|
||||
}
|
||||
|
||||
t_Open9xArmFuncSwData_v208::operator FuncSwData ()
|
||||
t_Open9xArmCustomFunctionData_v208::operator CustomFunctionData ()
|
||||
{
|
||||
FuncSwData c9x;
|
||||
CustomFunctionData c9x;
|
||||
c9x.swtch = open9xArmToSwitch(swtch);
|
||||
c9x.func = (AssignFunc)(func);
|
||||
if (c9x.func <= FuncOverrideCH32) {
|
||||
@@ -589,9 +589,9 @@ t_Open9xArmFuncSwData_v208::operator FuncSwData ()
|
||||
return c9x;
|
||||
}
|
||||
|
||||
t_Open9xArmFuncSwData_v210::operator FuncSwData ()
|
||||
t_Open9xArmCustomFunctionData_v210::operator CustomFunctionData ()
|
||||
{
|
||||
FuncSwData c9x;
|
||||
CustomFunctionData c9x;
|
||||
c9x.swtch = open9xArmToSwitch(swtch);
|
||||
c9x.func = (AssignFunc)(func);
|
||||
uint32_t value = *((uint32_t *)param);
|
||||
@@ -613,9 +613,9 @@ t_Open9xArmFuncSwData_v210::operator FuncSwData ()
|
||||
return c9x;
|
||||
}
|
||||
|
||||
t_Open9xArmFuncSwData_v211::operator FuncSwData ()
|
||||
t_Open9xArmCustomFunctionData_v211::operator CustomFunctionData ()
|
||||
{
|
||||
FuncSwData c9x;
|
||||
CustomFunctionData c9x;
|
||||
c9x.swtch = open9xArmToSwitch(swtch);
|
||||
c9x.func = (AssignFunc)(func);
|
||||
uint32_t value = *((uint32_t *)param);
|
||||
@@ -798,9 +798,9 @@ t_Open9xArmModelData_v208::operator ModelData ()
|
||||
}
|
||||
}
|
||||
for (int i=0; i<32; i++)
|
||||
c9x.customSw[i] = customSw[i];
|
||||
c9x.logicalSw[i] = logicalSw[i];
|
||||
for (int i=0; i<32; i++)
|
||||
c9x.funcSw[i] = funcSw[i];
|
||||
c9x.customFn[i] = customFn[i];
|
||||
c9x.swashRingData = swashR;
|
||||
c9x.frsky = frsky;
|
||||
c9x.frsky.varioSource = varioSource;
|
||||
@@ -887,9 +887,9 @@ t_Open9xArmModelData_v209::operator ModelData ()
|
||||
}
|
||||
}
|
||||
for (int i=0; i<32; i++)
|
||||
c9x.customSw[i] = customSw[i];
|
||||
c9x.logicalSw[i] = logicalSw[i];
|
||||
for (int i=0; i<32; i++)
|
||||
c9x.funcSw[i] = funcSw[i];
|
||||
c9x.customFn[i] = customFn[i];
|
||||
c9x.swashRingData = swashR;
|
||||
c9x.frsky = frsky;
|
||||
c9x.frsky.varioSource = varioSource;
|
||||
@@ -977,9 +977,9 @@ t_Open9xArmModelData_v210::operator ModelData ()
|
||||
}
|
||||
}
|
||||
for (int i=0; i<32; i++)
|
||||
c9x.customSw[i] = customSw[i];
|
||||
c9x.logicalSw[i] = logicalSw[i];
|
||||
for (int i=0; i<32; i++)
|
||||
c9x.funcSw[i] = funcSw[i];
|
||||
c9x.customFn[i] = customFn[i];
|
||||
c9x.swashRingData = swashR;
|
||||
c9x.frsky = frsky;
|
||||
c9x.frsky.varioSource = varioSource;
|
||||
@@ -1064,9 +1064,9 @@ t_Open9xArmModelData_v211::operator ModelData ()
|
||||
}
|
||||
}
|
||||
for (int i=0; i<32; i++)
|
||||
c9x.customSw[i] = customSw[i];
|
||||
c9x.logicalSw[i] = logicalSw[i];
|
||||
for (int i=0; i<32; i++)
|
||||
c9x.funcSw[i] = funcSw[i];
|
||||
c9x.customFn[i] = customFn[i];
|
||||
c9x.swashRingData = swashR;
|
||||
c9x.frsky = frsky;
|
||||
c9x.switchWarningStates = switchWarningStates;
|
||||
@@ -1151,9 +1151,9 @@ t_Open9xArmModelData_v212::operator ModelData ()
|
||||
}
|
||||
}
|
||||
for (int i=0; i<32; i++)
|
||||
c9x.customSw[i] = customSw[i];
|
||||
c9x.logicalSw[i] = logicalSw[i];
|
||||
for (int i=0; i<32; i++)
|
||||
c9x.funcSw[i] = funcSw[i];
|
||||
c9x.customFn[i] = customFn[i];
|
||||
c9x.swashRingData = swashR;
|
||||
c9x.frsky = frsky;
|
||||
c9x.switchWarningStates = switchWarningStates;
|
||||
|
||||
@@ -208,34 +208,34 @@ PACK(typedef struct t_Open9xArmLogicalSwitchData_v210 { // Custom Switches data
|
||||
t_Open9xArmLogicalSwitchData_v210() { memset(this, 0, sizeof(t_Open9xArmLogicalSwitchData_v210)); }
|
||||
}) Open9xArmLogicalSwitchData_v210;
|
||||
|
||||
PACK(typedef struct t_Open9xArmFuncSwData_v208 { // Function Switches data
|
||||
PACK(typedef struct t_Open9xArmCustomFunctionData_v208 { // Function Switches data
|
||||
int8_t swtch; // input
|
||||
uint8_t func;
|
||||
uint8_t param;
|
||||
|
||||
operator FuncSwData();
|
||||
t_Open9xArmFuncSwData_v208() { memset(this, 0, sizeof(t_Open9xArmFuncSwData_v208)); }
|
||||
}) Open9xArmFuncSwData_v208;
|
||||
operator CustomFunctionData();
|
||||
t_Open9xArmCustomFunctionData_v208() { memset(this, 0, sizeof(t_Open9xArmCustomFunctionData_v208)); }
|
||||
}) Open9xArmCustomFunctionData_v208;
|
||||
|
||||
PACK(typedef struct t_Open9xArmFuncSwData_v210 { // Function Switches data
|
||||
PACK(typedef struct t_Open9xArmCustomFunctionData_v210 { // Function Switches data
|
||||
int8_t swtch; // input
|
||||
uint8_t func;
|
||||
char param[6];
|
||||
|
||||
operator FuncSwData();
|
||||
t_Open9xArmFuncSwData_v210() { memset(this, 0, sizeof(t_Open9xArmFuncSwData_v210)); }
|
||||
}) Open9xArmFuncSwData_v210;
|
||||
operator CustomFunctionData();
|
||||
t_Open9xArmCustomFunctionData_v210() { memset(this, 0, sizeof(t_Open9xArmCustomFunctionData_v210)); }
|
||||
}) Open9xArmCustomFunctionData_v210;
|
||||
|
||||
PACK(typedef struct t_Open9xArmFuncSwData_v211 { // Function Switches data
|
||||
PACK(typedef struct t_Open9xArmCustomFunctionData_v211 { // Function Switches data
|
||||
int8_t swtch; // input
|
||||
uint8_t func;
|
||||
char param[6];
|
||||
uint8_t delay;
|
||||
uint8_t spare;
|
||||
|
||||
operator FuncSwData();
|
||||
t_Open9xArmFuncSwData_v211() { memset(this, 0, sizeof(t_Open9xArmFuncSwData_v211)); }
|
||||
}) Open9xArmFuncSwData_v211;
|
||||
operator CustomFunctionData();
|
||||
t_Open9xArmCustomFunctionData_v211() { memset(this, 0, sizeof(t_Open9xArmCustomFunctionData_v211)); }
|
||||
}) Open9xArmCustomFunctionData_v211;
|
||||
|
||||
PACK(typedef struct t_Open9xArmSwashRingData_v208 { // Swash Ring data
|
||||
uint8_t invertELE:1;
|
||||
@@ -332,8 +332,8 @@ PACK(typedef struct t_Open9xArmModelData_v208 {
|
||||
Open9xArmExpoData_v208 expoData[32];
|
||||
int8_t curves5[8][5];
|
||||
int8_t curves9[8][9];
|
||||
Open9xArmLogicalSwitchData_v208 customSw[32];
|
||||
Open9xArmFuncSwData_v208 funcSw[32];
|
||||
Open9xArmLogicalSwitchData_v208 logicalSw[32];
|
||||
Open9xArmCustomFunctionData_v208 customFn[32];
|
||||
Open9xArmSwashRingData_v208 swashR;
|
||||
Open9xArmFlightModeData_v208 flightModeData[9];
|
||||
Open9xFrSkyData_v208 frsky;
|
||||
@@ -371,8 +371,8 @@ PACK(typedef struct t_Open9xArmModelData_v209 {
|
||||
Open9xArmExpoData_v208 expoData[32];
|
||||
int8_t curves5[8][5];
|
||||
int8_t curves9[8][9];
|
||||
Open9xArmLogicalSwitchData_v209 customSw[32];
|
||||
Open9xArmFuncSwData_v208 funcSw[32];
|
||||
Open9xArmLogicalSwitchData_v209 logicalSw[32];
|
||||
Open9xArmCustomFunctionData_v208 customFn[32];
|
||||
Open9xArmSwashRingData_v209 swashR;
|
||||
Open9xArmFlightModeData_v208 flightModeData[9];
|
||||
Open9xFrSkyData_v208 frsky;
|
||||
@@ -411,8 +411,8 @@ PACK(typedef struct t_Open9xArmModelData_v210 {
|
||||
Open9xArmExpoData_v210 expoData[32];
|
||||
int8_t curves5[8][5];
|
||||
int8_t curves9[8][9];
|
||||
Open9xArmLogicalSwitchData_v210 customSw[32];
|
||||
Open9xArmFuncSwData_v210 funcSw[32];
|
||||
Open9xArmLogicalSwitchData_v210 logicalSw[32];
|
||||
Open9xArmCustomFunctionData_v210 customFn[32];
|
||||
Open9xArmSwashRingData_v209 swashR;
|
||||
Open9xArmFlightModeData_v208 flightModeData[9];
|
||||
Open9xArmFrSkyData_v210 frsky;
|
||||
@@ -450,8 +450,8 @@ PACK(typedef struct t_Open9xArmModelData_v211 {
|
||||
Open9xArmExpoData_v210 expoData[32];
|
||||
int16_t curves[16];
|
||||
int8_t points[512];
|
||||
Open9xArmLogicalSwitchData_v210 customSw[32];
|
||||
Open9xArmFuncSwData_v211 funcSw[32];
|
||||
Open9xArmLogicalSwitchData_v210 logicalSw[32];
|
||||
Open9xArmCustomFunctionData_v211 customFn[32];
|
||||
Open9xArmSwashRingData_v209 swashR;
|
||||
Open9xArmFlightModeData_v208 flightModeData[9];
|
||||
|
||||
@@ -488,8 +488,8 @@ PACK(typedef struct t_Open9xArmModelData_v212 {
|
||||
Open9xArmExpoData_v212 expoData[32];
|
||||
int16_t curves[16];
|
||||
int8_t points[512];
|
||||
Open9xArmLogicalSwitchData_v210 customSw[32];
|
||||
Open9xArmFuncSwData_v211 funcSw[32];
|
||||
Open9xArmLogicalSwitchData_v210 logicalSw[32];
|
||||
Open9xArmCustomFunctionData_v211 customFn[32];
|
||||
Open9xArmSwashRingData_v210 swashR;
|
||||
Open9xArmFlightModeData_v212 flightModeData[9];
|
||||
|
||||
|
||||
@@ -564,9 +564,9 @@ Open9xLogicalSwitchData_v209::operator LogicalSwitchData ()
|
||||
return c9x;
|
||||
}
|
||||
|
||||
t_Open9xFuncSwData_v201::operator FuncSwData ()
|
||||
t_Open9xCustomFunctionData_v201::operator CustomFunctionData ()
|
||||
{
|
||||
FuncSwData c9x;
|
||||
CustomFunctionData c9x;
|
||||
c9x.swtch = open9xStockToSwitch(swtch);
|
||||
c9x.func = (AssignFunc)(func+16);
|
||||
return c9x;
|
||||
@@ -598,9 +598,9 @@ enum Functions {
|
||||
FUNC_MAX
|
||||
};
|
||||
|
||||
t_Open9xFuncSwData_v203::operator FuncSwData ()
|
||||
t_Open9xCustomFunctionData_v203::operator CustomFunctionData ()
|
||||
{
|
||||
FuncSwData c9x;
|
||||
CustomFunctionData c9x;
|
||||
c9x.swtch = open9xStockToSwitch(swtch);
|
||||
if (func < 16) {
|
||||
c9x.enabled=param & 0x01;
|
||||
@@ -628,9 +628,9 @@ t_Open9xFuncSwData_v203::operator FuncSwData ()
|
||||
return c9x;
|
||||
}
|
||||
|
||||
t_Open9xFuncSwData_v210::operator FuncSwData ()
|
||||
t_Open9xCustomFunctionData_v210::operator CustomFunctionData ()
|
||||
{
|
||||
FuncSwData c9x;
|
||||
CustomFunctionData c9x;
|
||||
c9x.swtch = open9xStockToSwitch(swtch);
|
||||
c9x.param = param;
|
||||
if (func < 22) {
|
||||
@@ -977,9 +977,9 @@ t_Open9xModelData_v201::operator ModelData ()
|
||||
}
|
||||
|
||||
for (int i=0; i<12; i++)
|
||||
c9x.customSw[i] = customSw[i];
|
||||
c9x.logicalSw[i] = logicalSw[i];
|
||||
for (int i=0; i<12; i++)
|
||||
c9x.funcSw[i] = funcSw[i];
|
||||
c9x.customFn[i] = customFn[i];
|
||||
// for (int i=0; i<16; i++)
|
||||
// c9x.safetySw[i] = safetySw[i];
|
||||
c9x.swashRingData = swashR;
|
||||
@@ -1051,9 +1051,9 @@ t_Open9xModelData_v202::operator ModelData ()
|
||||
}
|
||||
|
||||
for (int i=0; i<12; i++)
|
||||
c9x.customSw[i] = customSw[i];
|
||||
c9x.logicalSw[i] = logicalSw[i];
|
||||
for (int i=0; i<12; i++)
|
||||
c9x.funcSw[i] = funcSw[i];
|
||||
c9x.customFn[i] = customFn[i];
|
||||
// for (int i=0; i<16; i++)
|
||||
// c9x.safetySw[i] = safetySw[i];
|
||||
c9x.swashRingData = swashR;
|
||||
@@ -1127,9 +1127,9 @@ t_Open9xModelData_v203::operator ModelData ()
|
||||
}
|
||||
|
||||
for (int i=0; i<12; i++)
|
||||
c9x.customSw[i] = customSw[i];
|
||||
c9x.logicalSw[i] = logicalSw[i];
|
||||
for (int i=0; i<16; i++)
|
||||
c9x.funcSw[i] = funcSw[i];
|
||||
c9x.customFn[i] = customFn[i];
|
||||
c9x.swashRingData = swashR;
|
||||
c9x.frsky = frsky;
|
||||
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
|
||||
@@ -1201,9 +1201,9 @@ t_Open9xModelData_v204::operator ModelData ()
|
||||
}
|
||||
|
||||
for (int i=0; i<12; i++)
|
||||
c9x.customSw[i] = customSw[i];
|
||||
c9x.logicalSw[i] = logicalSw[i];
|
||||
for (int i=0; i<16; i++)
|
||||
c9x.funcSw[i] = funcSw[i];
|
||||
c9x.customFn[i] = customFn[i];
|
||||
c9x.swashRingData = swashR;
|
||||
c9x.frsky = frsky;
|
||||
c9x.frsky.rssiAlarms[0] = frskyRssiAlarms[0].get(0);
|
||||
@@ -1280,9 +1280,9 @@ t_Open9xModelData_v205::operator ModelData ()
|
||||
}
|
||||
|
||||
for (int i=0; i<12; i++)
|
||||
c9x.customSw[i] = customSw[i];
|
||||
c9x.logicalSw[i] = logicalSw[i];
|
||||
for (int i=0; i<16; i++)
|
||||
c9x.funcSw[i] = funcSw[i];
|
||||
c9x.customFn[i] = customFn[i];
|
||||
c9x.swashRingData = swashR;
|
||||
c9x.frsky = frsky;
|
||||
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
|
||||
@@ -1366,9 +1366,9 @@ t_Open9xModelData_v208::operator ModelData ()
|
||||
}
|
||||
|
||||
for (int i=0; i<12; i++)
|
||||
c9x.customSw[i] = customSw[i];
|
||||
c9x.logicalSw[i] = logicalSw[i];
|
||||
for (int i=0; i<16; i++)
|
||||
c9x.funcSw[i] = funcSw[i];
|
||||
c9x.customFn[i] = customFn[i];
|
||||
c9x.swashRingData = swashR;
|
||||
c9x.frsky = frsky;
|
||||
c9x.frsky.varioSource = varioSource;
|
||||
@@ -1459,9 +1459,9 @@ t_Open9xModelData_v209::operator ModelData ()
|
||||
}
|
||||
|
||||
for (int i=0; i<12; i++)
|
||||
c9x.customSw[i] = customSw[i];
|
||||
c9x.logicalSw[i] = logicalSw[i];
|
||||
for (int i=0; i<16; i++)
|
||||
c9x.funcSw[i] = funcSw[i];
|
||||
c9x.customFn[i] = customFn[i];
|
||||
c9x.swashRingData = swashR;
|
||||
c9x.frsky = frsky;
|
||||
c9x.frsky.varioSource = varioSource;
|
||||
@@ -1556,9 +1556,9 @@ t_Open9xModelData_v210::operator ModelData ()
|
||||
}
|
||||
|
||||
for (int i=0; i<12; i++)
|
||||
c9x.customSw[i] = customSw[i];
|
||||
c9x.logicalSw[i] = logicalSw[i];
|
||||
for (int i=0; i<16; i++)
|
||||
c9x.funcSw[i] = funcSw[i];
|
||||
c9x.customFn[i] = customFn[i];
|
||||
c9x.swashRingData = swashR;
|
||||
c9x.frsky = frsky;
|
||||
c9x.switchWarningStates = switchWarningStates;
|
||||
@@ -1644,9 +1644,9 @@ t_Open9xModelData_v211::operator ModelData ()
|
||||
}
|
||||
|
||||
for (int i=0; i<12; i++)
|
||||
c9x.customSw[i] = customSw[i];
|
||||
c9x.logicalSw[i] = logicalSw[i];
|
||||
for (int i=0; i<16; i++)
|
||||
c9x.funcSw[i] = funcSw[i];
|
||||
c9x.customFn[i] = customFn[i];
|
||||
c9x.swashRingData = swashR;
|
||||
c9x.frsky = frsky;
|
||||
c9x.switchWarningStates = switchWarningStates;
|
||||
|
||||
@@ -247,32 +247,32 @@ PACK(typedef struct t_Open9xSafetySwData { // Safety Switches data
|
||||
t_Open9xSafetySwData() { memset(this, 0, sizeof(t_Open9xSafetySwData)); }
|
||||
}) Open9xSafetySwData;
|
||||
|
||||
PACK(typedef struct t_Open9xFuncSwData_v201 { // Function Switches data
|
||||
PACK(typedef struct t_Open9xCustomFunctionData_v201 { // Function Switches data
|
||||
int8_t swtch; // input
|
||||
uint8_t func;
|
||||
|
||||
operator FuncSwData();
|
||||
t_Open9xFuncSwData_v201() { memset(this, 0, sizeof(t_Open9xFuncSwData_v201)); }
|
||||
}) Open9xFuncSwData_v201;
|
||||
operator CustomFunctionData();
|
||||
t_Open9xCustomFunctionData_v201() { memset(this, 0, sizeof(t_Open9xCustomFunctionData_v201)); }
|
||||
}) Open9xCustomFunctionData_v201;
|
||||
|
||||
PACK(typedef struct t_Open9xFuncSwData_v203 { // Function Switches data
|
||||
PACK(typedef struct t_Open9xCustomFunctionData_v203 { // Function Switches data
|
||||
int8_t swtch; // input
|
||||
uint8_t func;
|
||||
uint8_t param;
|
||||
|
||||
operator FuncSwData();
|
||||
t_Open9xFuncSwData_v203() { memset(this, 0, sizeof(t_Open9xFuncSwData_v203)); }
|
||||
}) Open9xFuncSwData_v203;
|
||||
operator CustomFunctionData();
|
||||
t_Open9xCustomFunctionData_v203() { memset(this, 0, sizeof(t_Open9xCustomFunctionData_v203)); }
|
||||
}) Open9xCustomFunctionData_v203;
|
||||
|
||||
PACK(typedef struct t_Open9xFuncSwData_v210 { // Function Switches data
|
||||
PACK(typedef struct t_Open9xCustomFunctionData_v210 { // Function Switches data
|
||||
int8_t swtch; // input
|
||||
uint8_t func:5;
|
||||
uint8_t delay:3;
|
||||
uint8_t param;
|
||||
|
||||
operator FuncSwData();
|
||||
t_Open9xFuncSwData_v210() { memset(this, 0, sizeof(t_Open9xFuncSwData_v210)); }
|
||||
}) Open9xFuncSwData_v210;
|
||||
operator CustomFunctionData();
|
||||
t_Open9xCustomFunctionData_v210() { memset(this, 0, sizeof(t_Open9xCustomFunctionData_v210)); }
|
||||
}) Open9xCustomFunctionData_v210;
|
||||
|
||||
PACK(typedef struct t_Open9xFrSkyChannelData_v201 {
|
||||
uint8_t ratio; // 0.0 means not used, 0.1V steps EG. 6.6 Volts = 66. 25.1V = 251, etc.
|
||||
@@ -502,9 +502,9 @@ PACK(typedef struct t_Open9xModelData_v201 {
|
||||
Open9xExpoData_v201 expoData[14];
|
||||
int8_t curves5[8][5];
|
||||
int8_t curves9[8][9];
|
||||
Open9xLogicalSwitchData_v208 customSw[12];
|
||||
Open9xLogicalSwitchData_v208 logicalSw[12];
|
||||
Open9xSafetySwData safetySw[16];
|
||||
Open9xFuncSwData_v201 funcSw[12];
|
||||
Open9xCustomFunctionData_v201 customFn[12];
|
||||
Open9xSwashRingData_v208 swashR;
|
||||
Open9xFlightModeData_v201 flightModeData[5];
|
||||
Open9xFrSkyData_v201 frsky;
|
||||
@@ -533,9 +533,9 @@ PACK(typedef struct t_Open9xModelData_v202 {
|
||||
Open9xExpoData_v201 expoData[14];
|
||||
int8_t curves5[8][5];
|
||||
int8_t curves9[8][9];
|
||||
Open9xLogicalSwitchData_v208 customSw[12];
|
||||
Open9xLogicalSwitchData_v208 logicalSw[12];
|
||||
Open9xSafetySwData safetySw[16];
|
||||
Open9xFuncSwData_v201 funcSw[12];
|
||||
Open9xCustomFunctionData_v201 customFn[12];
|
||||
Open9xSwashRingData_v208 swashR;
|
||||
Open9xFlightModeData_v201 flightModeData[5];
|
||||
Open9xFrSkyData_v202 frsky;
|
||||
@@ -567,8 +567,8 @@ PACK(typedef struct t_Open9xModelData_v203 {
|
||||
Open9xExpoData_v201 expoData[14];
|
||||
int8_t curves5[8][5];
|
||||
int8_t curves9[8][9];
|
||||
Open9xLogicalSwitchData_v208 customSw[12];
|
||||
Open9xFuncSwData_v203 funcSw[16];
|
||||
Open9xLogicalSwitchData_v208 logicalSw[12];
|
||||
Open9xCustomFunctionData_v203 customFn[16];
|
||||
Open9xSwashRingData_v208 swashR;
|
||||
Open9xFlightModeData_v201 flightModeData[5];
|
||||
Open9xFrSkyData_v202 frsky;
|
||||
@@ -600,8 +600,8 @@ PACK(typedef struct t_Open9xModelData_v204 {
|
||||
Open9xExpoData_v201 expoData[14];
|
||||
int8_t curves5[8][5];
|
||||
int8_t curves9[8][9];
|
||||
Open9xLogicalSwitchData_v208 customSw[12];
|
||||
Open9xFuncSwData_v203 funcSw[16];
|
||||
Open9xLogicalSwitchData_v208 logicalSw[12];
|
||||
Open9xCustomFunctionData_v203 customFn[16];
|
||||
Open9xSwashRingData_v208 swashR;
|
||||
Open9xFlightModeData_v201 flightModeData[5];
|
||||
Open9xFrSkyData_v204 frsky;
|
||||
@@ -633,8 +633,8 @@ PACK(typedef struct t_Open9xModelData_v205 {
|
||||
Open9xExpoData_v201 expoData[14];
|
||||
int8_t curves5[8][5];
|
||||
int8_t curves9[8][9];
|
||||
Open9xLogicalSwitchData_v208 customSw[12];
|
||||
Open9xFuncSwData_v203 funcSw[16];
|
||||
Open9xLogicalSwitchData_v208 logicalSw[12];
|
||||
Open9xCustomFunctionData_v203 customFn[16];
|
||||
Open9xSwashRingData_v208 swashR;
|
||||
Open9xFlightModeData_v201 flightModeData[5];
|
||||
Open9xFrSkyData_v205 frsky;
|
||||
@@ -668,8 +668,8 @@ PACK(typedef struct t_Open9xModelData_v208 {
|
||||
Open9xExpoData_v201 expoData[14];
|
||||
int8_t curves5[8][5];
|
||||
int8_t curves9[8][9];
|
||||
Open9xLogicalSwitchData_v208 customSw[12];
|
||||
Open9xFuncSwData_v203 funcSw[16];
|
||||
Open9xLogicalSwitchData_v208 logicalSw[12];
|
||||
Open9xCustomFunctionData_v203 customFn[16];
|
||||
Open9xSwashRingData_v208 swashR;
|
||||
Open9xFlightModeData_v201 flightModeData[5];
|
||||
Open9xFrSkyData_v208 frsky;
|
||||
@@ -707,8 +707,8 @@ PACK(typedef struct t_Open9xModelData_v209 {
|
||||
Open9xExpoData_v201 expoData[14];
|
||||
int8_t curves5[8][5];
|
||||
int8_t curves9[8][9];
|
||||
Open9xLogicalSwitchData_v209 customSw[12];
|
||||
Open9xFuncSwData_v203 funcSw[16];
|
||||
Open9xLogicalSwitchData_v209 logicalSw[12];
|
||||
Open9xCustomFunctionData_v203 customFn[16];
|
||||
Open9xSwashRingData_v209 swashR;
|
||||
Open9xFlightModeData_v201 flightModeData[5];
|
||||
Open9xFrSkyData_v208 frsky;
|
||||
@@ -747,8 +747,8 @@ PACK(typedef struct t_Open9xModelData_v210 {
|
||||
Open9xExpoData_v201 expoData[14];
|
||||
int8_t curves[8];
|
||||
int8_t points[112-8];
|
||||
Open9xLogicalSwitchData_v209 customSw[12];
|
||||
Open9xFuncSwData_v210 funcSw[16];
|
||||
Open9xLogicalSwitchData_v209 logicalSw[12];
|
||||
Open9xCustomFunctionData_v210 customFn[16];
|
||||
Open9xSwashRingData_v209 swashR;
|
||||
Open9xFlightModeData_v201 flightModeData[5];
|
||||
|
||||
@@ -785,8 +785,8 @@ PACK(typedef struct t_Open9xModelData_v211 {
|
||||
Open9xExpoData_v211 expoData[14];
|
||||
int8_t curves[8];
|
||||
int8_t points[112-8];
|
||||
Open9xLogicalSwitchData_v209 customSw[12];
|
||||
Open9xFuncSwData_v210 funcSw[16];
|
||||
Open9xLogicalSwitchData_v209 logicalSw[12];
|
||||
Open9xCustomFunctionData_v210 customFn[16];
|
||||
Open9xSwashRingData_v209 swashR;
|
||||
Open9xFlightModeData_v201 flightModeData[5];
|
||||
|
||||
|
||||
@@ -65,6 +65,7 @@ namespace Open9xGruvin9x {
|
||||
#include "radio/src/opentx.cpp"
|
||||
#include "radio/src/strhelpers.cpp"
|
||||
#include "radio/src/switches.cpp"
|
||||
#include "radio/src/functions.cpp"
|
||||
#include "radio/src/curves.cpp"
|
||||
#include "radio/src/mixer.cpp"
|
||||
#include "radio/src/pulses/pulses_avr.cpp"
|
||||
|
||||
@@ -66,6 +66,7 @@ namespace OpenTxM128 {
|
||||
#include "radio/src/opentx.cpp"
|
||||
#include "radio/src/strhelpers.cpp"
|
||||
#include "radio/src/switches.cpp"
|
||||
#include "radio/src/functions.cpp"
|
||||
#include "radio/src/curves.cpp"
|
||||
#include "radio/src/mixer.cpp"
|
||||
#include "radio/src/pulses/pulses_avr.cpp"
|
||||
|
||||
@@ -71,6 +71,7 @@ namespace OpenTxM64 {
|
||||
#include "radio/src/opentx.cpp"
|
||||
#include "radio/src/strhelpers.cpp"
|
||||
#include "radio/src/switches.cpp"
|
||||
#include "radio/src/functions.cpp"
|
||||
#include "radio/src/curves.cpp"
|
||||
#include "radio/src/mixer.cpp"
|
||||
#include "radio/src/pulses/pulses_avr.cpp"
|
||||
|
||||
@@ -78,6 +78,7 @@ namespace Open9xSky9x {
|
||||
#include "radio/src/opentx.cpp"
|
||||
#include "radio/src/strhelpers.cpp"
|
||||
#include "radio/src/switches.cpp"
|
||||
#include "radio/src/functions.cpp"
|
||||
#include "radio/src/mixer.cpp"
|
||||
#include "radio/src/curves.cpp"
|
||||
#include "radio/src/targets/sky9x/pulses_driver.cpp"
|
||||
|
||||
@@ -81,6 +81,7 @@ inline int geteepromsize() {
|
||||
#include "radio/src/opentx.cpp"
|
||||
#include "radio/src/strhelpers.cpp"
|
||||
#include "radio/src/switches.cpp"
|
||||
#include "radio/src/functions.cpp"
|
||||
#include "radio/src/curves.cpp"
|
||||
#include "radio/src/mixer.cpp"
|
||||
#include "radio/src/targets/taranis/pulses_driver.cpp"
|
||||
|
||||
@@ -1879,7 +1879,7 @@ class SwitchesWarningField: public TransformedField {
|
||||
|
||||
class ArmCustomFunctionField: public TransformedField {
|
||||
public:
|
||||
ArmCustomFunctionField(FuncSwData & fn, BoardEnum board, unsigned int version, unsigned int variant):
|
||||
ArmCustomFunctionField(CustomFunctionData & fn, BoardEnum board, unsigned int version, unsigned int variant):
|
||||
TransformedField(internalField),
|
||||
internalField("CustomFunction"),
|
||||
fn(fn),
|
||||
@@ -2073,7 +2073,7 @@ class ArmCustomFunctionField: public TransformedField {
|
||||
|
||||
protected:
|
||||
StructField internalField;
|
||||
FuncSwData & fn;
|
||||
CustomFunctionData & fn;
|
||||
BoardEnum board;
|
||||
unsigned int version;
|
||||
unsigned int variant;
|
||||
@@ -2086,7 +2086,7 @@ class ArmCustomFunctionField: public TransformedField {
|
||||
|
||||
class AvrCustomFunctionField: public TransformedField {
|
||||
public:
|
||||
AvrCustomFunctionField(FuncSwData & fn, BoardEnum board, unsigned int version, unsigned int variant):
|
||||
AvrCustomFunctionField(CustomFunctionData & fn, BoardEnum board, unsigned int version, unsigned int variant):
|
||||
TransformedField(internalField),
|
||||
internalField("CustomFunction"),
|
||||
fn(fn),
|
||||
@@ -2237,7 +2237,7 @@ class AvrCustomFunctionField: public TransformedField {
|
||||
|
||||
protected:
|
||||
StructField internalField;
|
||||
FuncSwData & fn;
|
||||
CustomFunctionData & fn;
|
||||
BoardEnum board;
|
||||
unsigned int version;
|
||||
unsigned int variant;
|
||||
@@ -2645,12 +2645,12 @@ OpenTxModelData::OpenTxModelData(ModelData & modelData, BoardEnum board, unsigne
|
||||
internalField.Append(new InputField(modelData.expoData[i], board, version));
|
||||
internalField.Append(new CurvesField(modelData.curves, board, version));
|
||||
for (int i=0; i<MAX_CUSTOM_SWITCHES(board, version); i++)
|
||||
internalField.Append(new LogicalSwitchField(modelData.customSw[i], board, version, variant, &modelData));
|
||||
internalField.Append(new LogicalSwitchField(modelData.logicalSw[i], board, version, variant, &modelData));
|
||||
for (int i=0; i<MAX_CUSTOM_FUNCTIONS(board, version); i++) {
|
||||
if (IS_ARM(board))
|
||||
internalField.Append(new ArmCustomFunctionField(modelData.funcSw[i], board, version, variant));
|
||||
internalField.Append(new ArmCustomFunctionField(modelData.customFn[i], board, version, variant));
|
||||
else
|
||||
internalField.Append(new AvrCustomFunctionField(modelData.funcSw[i], board, version, variant));
|
||||
internalField.Append(new AvrCustomFunctionField(modelData.customFn[i], board, version, variant));
|
||||
}
|
||||
internalField.Append(new HeliField(modelData.swashRingData, board, version, variant));
|
||||
for (int i=0; i<MAX_FLIGHT_MODES(board, version); i++)
|
||||
|
||||
Reference in New Issue
Block a user