fix(cpn): model print flight mode trim labels (#5123)
This commit is contained in:
@@ -429,20 +429,20 @@ QString MultiModelPrinter::printFlightModes()
|
||||
MultiColumns columns(modelPrinterMap.size());
|
||||
columns.appendSectionTableStart();
|
||||
QStringList hd = QStringList() << tr("Flight mode") << tr("Switch") << tr("F.In") << tr("F.Out");
|
||||
for (int i=0; i < getBoardCapability(getCurrentBoard(), Board::NumTrims); i++) {
|
||||
hd << RawSource(SOURCE_TYPE_TRIM, i).toString();
|
||||
for (int i = 0; i < getBoardCapability(getCurrentBoard(), Board::NumTrims); i++) {
|
||||
hd << RawSource(SOURCE_TYPE_TRIM, i + 1).toString();
|
||||
}
|
||||
columns.appendRowHeader(hd);
|
||||
int wd = 80/(getBoardCapability(getCurrentBoard(), Board::NumTrims) + 3);
|
||||
for (int i=0; i<firmware->getCapability(FlightModes); i++) {
|
||||
int wd = 80 / (getBoardCapability(getCurrentBoard(), Board::NumTrims) + 3);
|
||||
for (int i = 0; i < firmware->getCapability(FlightModes); i++) {
|
||||
columns.appendRowStart();
|
||||
columns.appendCellStart(20,true);
|
||||
columns.appendCellStart(20, true);
|
||||
COMPARE(modelPrinter->printFlightModeName(i));
|
||||
columns.appendCellEnd(true);
|
||||
COMPARECELLWIDTH(modelPrinter->printFlightModeSwitch(model->flightModeData[i].swtch), wd);
|
||||
COMPARECELLWIDTH(model->flightModeData[i].fadeIn, wd);
|
||||
COMPARECELLWIDTH(model->flightModeData[i].fadeOut, wd);
|
||||
for (int k=0; k < getBoardCapability(getCurrentBoard(), Board::NumTrims); k++) {
|
||||
for (int k = 0; k < getBoardCapability(getCurrentBoard(), Board::NumTrims); k++) {
|
||||
COMPARECELLWIDTH(modelPrinter->printTrim(i, k), wd);
|
||||
}
|
||||
columns.appendRowEnd();
|
||||
@@ -459,43 +459,43 @@ QString MultiModelPrinter::printFlightModes()
|
||||
columns.appendSectionTableStart();
|
||||
QStringList hd = QStringList() << tr("Global vars");
|
||||
if (firmware->getCapability(GvarsFlightModes)) {
|
||||
for (int i=0; i<gvars; i++) {
|
||||
hd << tr("GV%1").arg(i+1);
|
||||
for (int i = 0; i < gvars; i++) {
|
||||
hd << tr("GV%1").arg(i + 1);
|
||||
}
|
||||
}
|
||||
for (int i=0; i<firmware->getCapability(RotaryEncoders); i++) {
|
||||
hd << tr("RE%1").arg(i+1);
|
||||
hd << tr("RE%1").arg(i + 1);
|
||||
}
|
||||
columns.appendRowHeader(hd);
|
||||
int wd = 80/gvars;
|
||||
int wd = 80 / gvars;
|
||||
if (firmware->getCapability(GvarsFlightModes)) {
|
||||
columns.appendRowStart(tr("Name"), 20);
|
||||
for (int i=0; i<gvars; i++) {
|
||||
for (int i = 0; i < gvars; i++) {
|
||||
COMPARECELLWIDTH(model->gvarData[i].name, wd);
|
||||
}
|
||||
columns.appendRowEnd();
|
||||
columns.appendRowStart(tr("Unit"));
|
||||
for (int i=0; i<gvars; i++) {
|
||||
for (int i = 0; i < gvars; i++) {
|
||||
COMPARECELL(modelPrinter->printGlobalVarUnit(i));
|
||||
}
|
||||
columns.appendRowEnd();
|
||||
columns.appendRowStart(tr("Prec"));
|
||||
for (int i=0; i<gvars; i++) {
|
||||
for (int i = 0; i < gvars; i++) {
|
||||
COMPARECELL(modelPrinter->printGlobalVarPrec(i));
|
||||
}
|
||||
columns.appendRowEnd();
|
||||
columns.appendRowStart(tr("Min"));
|
||||
for (int i=0; i<gvars; i++) {
|
||||
for (int i = 0; i < gvars; i++) {
|
||||
COMPARECELL(modelPrinter->printGlobalVarMin(i));
|
||||
}
|
||||
columns.appendRowEnd();
|
||||
columns.appendRowStart(tr("Max"));
|
||||
for (int i=0; i<gvars; i++) {
|
||||
for (int i = 0; i < gvars; i++) {
|
||||
COMPARECELL(modelPrinter->printGlobalVarMax(i));
|
||||
}
|
||||
columns.appendRowEnd();
|
||||
columns.appendRowStart(tr("Popup"));
|
||||
for (int i=0; i<gvars; i++) {
|
||||
for (int i = 0; i < gvars; i++) {
|
||||
COMPARECELL(modelPrinter->printGlobalVarPopup(i));
|
||||
}
|
||||
columns.appendRowEnd();
|
||||
@@ -503,17 +503,17 @@ QString MultiModelPrinter::printFlightModes()
|
||||
|
||||
columns.appendRowHeader(QStringList() << tr("Flight mode"));
|
||||
|
||||
for (int i=0; i<firmware->getCapability(FlightModes); i++) {
|
||||
for (int i = 0; i < firmware->getCapability(FlightModes); i++) {
|
||||
columns.appendRowStart();
|
||||
columns.appendCellStart(0,true);
|
||||
columns.appendCellStart(0, true);
|
||||
COMPARE(modelPrinter->printFlightModeName(i));
|
||||
columns.appendCellEnd(true);
|
||||
if (firmware->getCapability(GvarsFlightModes)) {
|
||||
for (int k=0; k<gvars; k++) {
|
||||
for (int k = 0; k < gvars; k++) {
|
||||
COMPARECELL(modelPrinter->printGlobalVar(i, k));
|
||||
}
|
||||
}
|
||||
for (int k=0; k<firmware->getCapability(RotaryEncoders); k++) {
|
||||
for (int k = 0; k < firmware->getCapability(RotaryEncoders); k++) {
|
||||
COMPARECELL(modelPrinter->printRotaryEncoder(i, k));
|
||||
}
|
||||
columns.appendRowEnd();
|
||||
|
||||
Reference in New Issue
Block a user