Renaming started ... who wants to continue?

This commit is contained in:
Bertrand Songis
2014-02-08 08:38:06 +01:00
parent afc3b61232
commit 08a37b77e7
40 changed files with 577 additions and 563 deletions
+5 -5
View File
@@ -269,22 +269,22 @@ RawSource er9xToSource(int8_t value)
}
}
Er9xCustomSwData::operator CustomSwData ()
Er9xLogicalSwitchData::operator LogicalSwitchData ()
{
CustomSwData c9x;
LogicalSwitchData c9x;
c9x.func = func;
c9x.val1 = v1;
c9x.val2 = v2;
if ((c9x.func >= CS_FN_VPOS && c9x.func <= CS_FN_ANEG) || c9x.func >= CS_FN_EQUAL) {
if ((c9x.func >= LS_FN_VPOS && c9x.func <= LS_FN_ANEG) || c9x.func >= LS_FN_EQUAL) {
c9x.val1 = er9xToSource(v1).toValue();
}
if (c9x.func >= CS_FN_EQUAL) {
if (c9x.func >= LS_FN_EQUAL) {
c9x.val2 = er9xToSource(v2).toValue();
}
if (c9x.func >= CS_FN_AND && c9x.func <= CS_FN_XOR) {
if (c9x.func >= LS_FN_AND && c9x.func <= LS_FN_XOR) {
c9x.val1 = er9xToSwitch(v1).toValue();
c9x.val2 = er9xToSwitch(v2).toValue();
}
+5 -5
View File
@@ -154,15 +154,15 @@ PACK(typedef struct t_Er9xMixData {
}) Er9xMixData;
PACK(typedef struct t_Er9xCustomSwData { // Custom Switches data
PACK(typedef struct t_Er9xLogicalSwitchData { // Custom Switches data
int8_t v1; //input
int8_t v2; //offset
uint8_t func:4;
uint8_t andsw:4;
operator CustomSwData();
t_Er9xCustomSwData() { memset(this, 0, sizeof(t_Er9xCustomSwData)); }
}) Er9xCustomSwData;
operator LogicalSwitchData();
t_Er9xLogicalSwitchData() { memset(this, 0, sizeof(t_Er9xLogicalSwitchData)); }
}) Er9xLogicalSwitchData;
PACK(typedef struct t_Er9xSafetySwData { // Custom Switches data
int8_t swtch;
@@ -241,7 +241,7 @@ PACK(typedef struct t_Er9xModelData {
int8_t trim[4];
int8_t curves5[ER9X_MAX_CURVE5][5];
int8_t curves9[ER9X_MAX_CURVE9][9];
Er9xCustomSwData customSw[ER9X_NUM_CSW];
Er9xLogicalSwitchData customSw[ER9X_NUM_CSW];
uint8_t frSkyVoltThreshold ;
int8_t tmrModeB;
uint8_t numVoice;
@@ -75,11 +75,11 @@ inline void applyStickModeToModel(Er9xModelData & model, unsigned int mode)
for (int i=0; i<ER9X_MAX_MIXERS; i++)
model.mixData[i].srcRaw = applyStickMode(model.mixData[i].srcRaw, mode);
for (int i=0; i<ER9X_NUM_CSW; i++) {
switch (CustomSwData(model.customSw[i].func).getFunctionFamily()) {
case CS_FAMILY_VCOMP:
switch (LogicalSwitchData(model.customSw[i].func).getFunctionFamily()) {
case LS_FAMILY_VCOMP:
model.customSw[i].v2 = applyStickMode(model.customSw[i].v2, mode);
// no break
case CS_FAMILY_VOFS:
case LS_FAMILY_VOFS:
model.customSw[i].v1 = applyStickMode(model.customSw[i].v1, mode);
break;
default:
@@ -239,7 +239,7 @@ int Er9xInterface::getCapability(const Capability capability)
return 9;
case CustomFunctions:
return 0;
case CustomSwitches:
case LogicalSwitches:
return 12;
case CustomAndSwitches:
return 5;