diff --git a/companion/src/modeledit/setup.cpp b/companion/src/modeledit/setup.cpp index db6642c62..92299f161 100644 --- a/companion/src/modeledit/setup.cpp +++ b/companion/src/modeledit/setup.cpp @@ -1941,11 +1941,11 @@ void SetupPanel::populateThrottleTrimSwitchCB() for (int i=0; ithrottleTrimSwitch->addItem(trim, idx); } diff --git a/companion/src/modelprinter.cpp b/companion/src/modelprinter.cpp index 5264ecb47..a6f3e034a 100644 --- a/companion/src/modelprinter.cpp +++ b/companion/src/modelprinter.cpp @@ -429,7 +429,7 @@ QString ModelPrinter::printMixerLine(const MixData & mix, bool showMultiplex, in if (mix.carryTrim > 0) str += " " + tr("NoTrim"); else if (mix.carryTrim < 0) - str += " " + RawSource(SOURCE_TYPE_TRIM, (-(mix.carryTrim)-1)).toString(&model, &generalSettings); + str += " " + RawSource(SOURCE_TYPE_TRIM, (-(mix.carryTrim)-1) + 1).toString(&model, &generalSettings); if (firmware->getCapability(HasNoExpo) && mix.noExpo) str += " " + tr("No DR/Expo").toHtmlEscaped(); @@ -696,7 +696,7 @@ QString ModelPrinter::printOutputValueGVar(int val) if (abs(val) > 10000) { if (val < 0) result = "-"; - result.append(RawSource(SOURCE_TYPE_GVAR, abs(val)-10001).toString(&model)); + result.append(RawSource(SOURCE_TYPE_GVAR, (abs(val)-10001) + 1).toString(&model)); } else { if (val >= 0) @@ -932,6 +932,10 @@ QString ModelPrinter::printThrottle() result << printLabelValue(tr("Trim idle only"), printBoolean(model.thrTrim, BOOLEAN_YESNO)); result << printLabelValue(tr("Warning"), printBoolean(!model.disableThrottleWarning, BOOLEAN_YESNO)); result << printLabelValue(tr("Reversed"), printBoolean(model.throttleReversed, BOOLEAN_YESNO)); + int thrTrim = model.thrTrimSwitch; + if (thrTrim == 0) thrTrim = 2; + else if (thrTrim == 2) thrTrim = 0; + result << printLabelValue(tr("Trim source"), RawSource(SOURCE_TYPE_TRIM, thrTrim + 1).toString(&model, &generalSettings)); return result.join(" "); } diff --git a/companion/src/simulation/joystickdialog.cpp b/companion/src/simulation/joystickdialog.cpp index 710583a07..e2fa3b744 100644 --- a/companion/src/simulation/joystickdialog.cpp +++ b/companion/src/simulation/joystickdialog.cpp @@ -162,7 +162,7 @@ void joystickDialog::populateSourceCombo(QComboBox * cb) if (radioSettings.isInputStick(i)) wname = Boards::getAxisName(i); else - wname = RawSource(RawSourceType::SOURCE_TYPE_INPUT, i).toString(nullptr, &radioSettings); + wname = RawSource(RawSourceType::SOURCE_TYPE_INPUT, i + 1).toString(nullptr, &radioSettings); cb->addItem(wname, i); } } @@ -186,7 +186,7 @@ void joystickDialog::populateButtonCombo(QComboBox * cb) for (i = 0; i < ttlSwitches; ++i) { if (radioSettings.switchConfig[i].type != Board::SWITCH_NOT_AVAILABLE) { swtype = Board::SwitchType(radioSettings.switchConfig[i].type); - wname = RawSource(RawSourceType::SOURCE_TYPE_SWITCH, i).toString(nullptr, &radioSettings); + wname = RawSource(RawSourceType::SOURCE_TYPE_SWITCH, i + 1).toString(nullptr, &radioSettings); if (swtype == Board::SWITCH_3POS) { cb->addItem(wname + CPN_STR_SW_INDICATOR_UP, i | JS_BUTTON_3POS_UP); cb->addItem(wname + CPN_STR_SW_INDICATOR_DN, i | JS_BUTTON_3POS_DN); @@ -197,7 +197,7 @@ void joystickDialog::populateButtonCombo(QComboBox * cb) } for (i = 0; i < ttlTrims; i += 1) { - wname = RawSource(RawSourceType::SOURCE_TYPE_TRIM, i).toString(nullptr, &radioSettings); + wname = RawSource(RawSourceType::SOURCE_TYPE_TRIM, i + 1).toString(nullptr, &radioSettings); if ((i == 0) || (i == 3)) { cb->addItem(wname + " Left", (i + ttlSwitches) | JS_BUTTON_3POS_DN); cb->addItem(wname + " Right", (i + ttlSwitches) | JS_BUTTON_3POS_UP);