diff --git a/companion/src/modelprinter.cpp b/companion/src/modelprinter.cpp index 64113fc95f2..5501340990f 100644 --- a/companion/src/modelprinter.cpp +++ b/companion/src/modelprinter.cpp @@ -840,6 +840,10 @@ QString ModelPrinter::printSettingsTrim() str << printLabelValue(tr("Step"), printTrimIncrementMode()); str << printLabelValue(tr("Display"), printTrimsDisplayMode()); str << printLabelValue(tr("Extended"), printBoolean(model.extendedTrims, BOOLEAN_YESNO)); + Board::Type board = firmware->getBoard(); + if (IS_FLYSKY_EL18(board) || IS_FLYSKY_NV14(board)) { + str << printLabelValue(tr("Hats Mode"), printHatsMode()); + } return str.join(" "); } @@ -869,6 +873,22 @@ QString ModelPrinter::printTrimsDisplayMode() } } +QString ModelPrinter::printHatsMode() +{ + switch (model.hatsMode) { + case GeneralSettings::HATSMODE_TRIMS_ONLY: + return tr("Trims only"); + case GeneralSettings::HATSMODE_KEYS_ONLY: + return tr("Keys only"); + case GeneralSettings::HATSMODE_SWITCHABLE: + return tr("Switchable"); + case GeneralSettings::HATSMODE_GLOBAL: + return tr("Global"); + default: + return CPN_STR_UNKNOWN_ITEM; + } +} + QString ModelPrinter::printModuleType(int idx) { return ModuleData::indexToString(idx, firmware); diff --git a/companion/src/modelprinter.h b/companion/src/modelprinter.h index e101d24b612..a9aae03bf67 100644 --- a/companion/src/modelprinter.h +++ b/companion/src/modelprinter.h @@ -79,6 +79,7 @@ class ModelPrinter: public QObject QString printModuleType(int idx); QString printThrottleSource(int idx); QString printTrimsDisplayMode(); + QString printHatsMode(); QString printSettingsTrim(); QString printSwitchWarnings(); QString printPotWarnings();