mirror of
https://github.com/opentx/opentx.git
synced 2025-07-26 01:35:21 +03:00
PPM polarity was inverted in Companion PrintDialog and CompareDialog
This commit is contained in:
parent
50122d4ee1
commit
58f81b193b
3 changed files with 6 additions and 5 deletions
|
@ -257,7 +257,7 @@ void CompareDialog::printSetup()
|
||||||
color=getColor1(getProtocol(g_model1),getProtocol(g_model2));
|
color=getColor1(getProtocol(g_model1),getProtocol(g_model2));
|
||||||
str.append(fv(tr("Protocol"), getProtocol(g_model1), color)); //proto, numch, delay,
|
str.append(fv(tr("Protocol"), getProtocol(g_model1), color)); //proto, numch, delay,
|
||||||
color=getColor1(g_model1->moduleData[0].ppmPulsePol, g_model2->moduleData[0].ppmPulsePol);
|
color=getColor1(g_model1->moduleData[0].ppmPulsePol, g_model2->moduleData[0].ppmPulsePol);
|
||||||
str.append(fv(tr("Pulse Polarity"), g_model1->moduleData[0].ppmPulsePol ? "NEG" : "POS", color));
|
str.append(fv(tr("Pulse Polarity"), g_model1->moduleData[0].polarityToString(), color));
|
||||||
color=getColor1(g_model1->thrTrim,g_model2->thrTrim);
|
color=getColor1(g_model1->thrTrim,g_model2->thrTrim);
|
||||||
str.append(fv(tr("Throttle Trim"), g_model1->thrTrim ? tr("Enabled") : tr("Disabled"), color));
|
str.append(fv(tr("Throttle Trim"), g_model1->thrTrim ? tr("Enabled") : tr("Disabled"), color));
|
||||||
color=getColor1(g_model1->thrExpo,g_model2->thrExpo);
|
color=getColor1(g_model1->thrExpo,g_model2->thrExpo);
|
||||||
|
@ -280,7 +280,7 @@ void CompareDialog::printSetup()
|
||||||
color=getColor2(getProtocol(g_model1),getProtocol(g_model2));
|
color=getColor2(getProtocol(g_model1),getProtocol(g_model2));
|
||||||
str.append(fv(tr("Protocol"), getProtocol(g_model2), color)); //proto, numch, delay,
|
str.append(fv(tr("Protocol"), getProtocol(g_model2), color)); //proto, numch, delay,
|
||||||
color=getColor2(g_model1->moduleData[0].ppmPulsePol, g_model2->moduleData[0].ppmPulsePol);
|
color=getColor2(g_model1->moduleData[0].ppmPulsePol, g_model2->moduleData[0].ppmPulsePol);
|
||||||
str.append(fv(tr("Pulse Polarity"), g_model2->moduleData[0].ppmPulsePol ? "NEG" : "POS", color));
|
str.append(fv(tr("Pulse Polarity"), g_model2->moduleData[0].polarityToString(), color));
|
||||||
color=getColor2(g_model1->thrTrim,g_model2->thrTrim);
|
color=getColor2(g_model1->thrTrim,g_model2->thrTrim);
|
||||||
str.append(fv(tr("Throttle Trim"), g_model2->thrTrim ? tr("Enabled") : tr("Disabled"), color));
|
str.append(fv(tr("Throttle Trim"), g_model2->thrTrim ? tr("Enabled") : tr("Disabled"), color));
|
||||||
color=getColor2(g_model1->thrExpo,g_model2->thrExpo);
|
color=getColor2(g_model1->thrExpo,g_model2->thrExpo);
|
||||||
|
|
|
@ -954,6 +954,7 @@ class ModuleData {
|
||||||
bool ppmPulsePol; // false = positive
|
bool ppmPulsePol; // false = positive
|
||||||
int ppmFrameLength;
|
int ppmFrameLength;
|
||||||
void clear() { memset(this, 0, sizeof(ModuleData)); }
|
void clear() { memset(this, 0, sizeof(ModuleData)); }
|
||||||
|
QString polarityToString() { return ppmPulsePol ? QObject::tr("Positive") : QObject::tr("Negative"); }
|
||||||
};
|
};
|
||||||
|
|
||||||
#define C9X_MAX_SCRIPTS 7
|
#define C9X_MAX_SCRIPTS 7
|
||||||
|
|
|
@ -119,7 +119,7 @@ void PrintDialog::printSetup()
|
||||||
str.append(fv(tr("Timer1"), getTimerStr(g_model->timers[0]))); //value, mode, count up/down
|
str.append(fv(tr("Timer1"), getTimerStr(g_model->timers[0]))); //value, mode, count up/down
|
||||||
str.append(fv(tr("Timer2"), getTimerStr(g_model->timers[1]))); //value, mode, count up/down
|
str.append(fv(tr("Timer2"), getTimerStr(g_model->timers[1]))); //value, mode, count up/down
|
||||||
str.append(fv(tr("Protocol"), getProtocol(g_model))); //proto, numch, delay,
|
str.append(fv(tr("Protocol"), getProtocol(g_model))); //proto, numch, delay,
|
||||||
str.append(fv(tr("Pulse Polarity"), g_model->moduleData[0].ppmPulsePol ? "NEG" : "POS"));
|
str.append(fv(tr("Pulse Polarity"), g_model->moduleData[0].polarityToString()));
|
||||||
str.append(fv(tr("Throttle Trim"), g_model->thrTrim ? tr("Enabled") : tr("Disabled")));
|
str.append(fv(tr("Throttle Trim"), g_model->thrTrim ? tr("Enabled") : tr("Disabled")));
|
||||||
str.append(fv(tr("Throttle Expo"), g_model->thrExpo ? tr("Enabled") : tr("Disabled")));
|
str.append(fv(tr("Throttle Expo"), g_model->thrExpo ? tr("Enabled") : tr("Disabled")));
|
||||||
// TODO str.append(fv(tr("Trim Switch"), getSWName(g_model->trimSw)));
|
// TODO str.append(fv(tr("Trim Switch"), getSWName(g_model->trimSw)));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue