1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-24 16:55:20 +03:00

PPM polarity was inverted in Companion PrintDialog and CompareDialog

This commit is contained in:
bsongis 2014-07-05 23:13:14 +02:00
parent 50122d4ee1
commit 58f81b193b
3 changed files with 6 additions and 5 deletions

View file

@ -257,7 +257,7 @@ void CompareDialog::printSetup()
color=getColor1(getProtocol(g_model1),getProtocol(g_model2));
str.append(fv(tr("Protocol"), getProtocol(g_model1), color)); //proto, numch, delay,
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);
str.append(fv(tr("Throttle Trim"), g_model1->thrTrim ? tr("Enabled") : tr("Disabled"), color));
color=getColor1(g_model1->thrExpo,g_model2->thrExpo);
@ -280,7 +280,7 @@ void CompareDialog::printSetup()
color=getColor2(getProtocol(g_model1),getProtocol(g_model2));
str.append(fv(tr("Protocol"), getProtocol(g_model2), color)); //proto, numch, delay,
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);
str.append(fv(tr("Throttle Trim"), g_model2->thrTrim ? tr("Enabled") : tr("Disabled"), color));
color=getColor2(g_model1->thrExpo,g_model2->thrExpo);

View file

@ -954,6 +954,7 @@ class ModuleData {
bool ppmPulsePol; // false = positive
int ppmFrameLength;
void clear() { memset(this, 0, sizeof(ModuleData)); }
QString polarityToString() { return ppmPulsePol ? QObject::tr("Positive") : QObject::tr("Negative"); }
};
#define C9X_MAX_SCRIPTS 7

View file

@ -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("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("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 Expo"), g_model->thrExpo ? tr("Enabled") : tr("Disabled")));
// TODO str.append(fv(tr("Trim Switch"), getSWName(g_model->trimSw)));