diff --git a/companion/src/firmwares/eeprominterface.h b/companion/src/firmwares/eeprominterface.h index b3680b4ba..6cd62f287 100644 --- a/companion/src/firmwares/eeprominterface.h +++ b/companion/src/firmwares/eeprominterface.h @@ -151,6 +151,7 @@ enum Capability { DangerousFunctions, HasModelCategories, HasSwitchableJack, + HasSportConnector, PwrButtonPress, Sensors }; diff --git a/companion/src/firmwares/generalsettings.h b/companion/src/firmwares/generalsettings.h index cdb72d9c8..f7b28931d 100644 --- a/companion/src/firmwares/generalsettings.h +++ b/companion/src/firmwares/generalsettings.h @@ -103,6 +103,7 @@ class GeneralSettings { bool disableRssiPoweroffAlarm; unsigned int usbMode; unsigned int jackMode; + bool sportPower; BeeperMode hapticMode; unsigned int stickMode; // TODO enum int timezone; diff --git a/companion/src/firmwares/opentx/opentxeeprom.cpp b/companion/src/firmwares/opentx/opentxeeprom.cpp index 579c3da8e..5f02afee6 100644 --- a/companion/src/firmwares/opentx/opentxeeprom.cpp +++ b/companion/src/firmwares/opentx/opentxeeprom.cpp @@ -2720,7 +2720,7 @@ OpenTxGeneralData::OpenTxGeneralData(GeneralSettings & generalData, Board::Type internalField.Append(new BoolField<1>(this, generalData.disableRssiPoweroffAlarm)); internalField.Append(new UnsignedField<2>(this, generalData.usbMode)); internalField.Append(new UnsignedField<2>(this, generalData.jackMode)); - internalField.Append(new SpareBitsField<1>(this)); + internalField.Append(new BoolField<1>(this, generalData.sportPower)); } else { internalField.Append(new SpareBitsField<7>(this)); diff --git a/companion/src/firmwares/opentx/opentxinterface.cpp b/companion/src/firmwares/opentx/opentxinterface.cpp index 68c4daada..005a29c40 100644 --- a/companion/src/firmwares/opentx/opentxinterface.cpp +++ b/companion/src/firmwares/opentx/opentxinterface.cpp @@ -696,6 +696,8 @@ int OpenTxFirmware::getCapability(::Capability capability) return IS_FAMILY_HORUS_OR_T16(board); case HasSwitchableJack: return IS_TARANIS_XLITES(board); + case HasSportConnector: + return IS_ACCESS_RADIO(board, id) || IS_TARANIS_X7(board) || IS_HORUS_X10(board) || IS_TARANIS_XLITE(board); case PwrButtonPress: return IS_HORUS_OR_TARANIS(board) && (board!=Board::BOARD_TARANIS_X9D) && (board!=Board::BOARD_TARANIS_X9DP); case Sensors: diff --git a/companion/src/generaledit/hardware.cpp b/companion/src/generaledit/hardware.cpp index 78d0ec75d..00d0e13dd 100644 --- a/companion/src/generaledit/hardware.cpp +++ b/companion/src/generaledit/hardware.cpp @@ -127,6 +127,14 @@ HardwarePanel::HardwarePanel(QWidget * parent, GeneralSettings & generalSettings ui->potsTypeSeparator_1->hide(); ui->potsTypeSeparator_2->hide(); } + + if(firmware->getCapability(HasSportConnector)) { + ui->sportPower->setChecked(generalSettings.sportPower); + } + else { + ui->sportPower->hide(); + ui->sportPowerLabel->hide(); + } setupPotType(0, ui->pot1Label, ui->pot1Name, ui->pot1Type); setupPotType(1, ui->pot2Label, ui->pot2Name, ui->pot2Type); @@ -232,6 +240,11 @@ void HardwarePanel::on_filterEnable_stateChanged() generalSettings.jitterFilter = !ui->filterEnable->isChecked(); } +void HardwarePanel::on_sportPower_stateChanged() +{ + generalSettings.sportPower = ui->sportPower->isChecked(); +} + void HardwarePanel::on_rtcCheckDisable_stateChanged() { generalSettings.rtcCheckDisable = !ui->rtcCheckDisable->isChecked(); diff --git a/companion/src/generaledit/hardware.h b/companion/src/generaledit/hardware.h index 8101b784c..39d3fcd53 100644 --- a/companion/src/generaledit/hardware.h +++ b/companion/src/generaledit/hardware.h @@ -50,6 +50,7 @@ class HardwarePanel : public GeneralPanel void on_txVoltageCalibration_editingFinished(); void on_filterEnable_stateChanged(); void on_rtcCheckDisable_stateChanged(); + void on_sportPower_stateChanged(); void on_serialPortMode_currentIndexChanged(int index); diff --git a/companion/src/generaledit/hardware.ui b/companion/src/generaledit/hardware.ui index 45e8e8da6..5224ed785 100644 --- a/companion/src/generaledit/hardware.ui +++ b/companion/src/generaledit/hardware.ui @@ -23,6 +23,315 @@ 6 + + + + + + + + + + + + + + + + + + OFF + + + + + S-Port Mirror + + + + + Telemetry + + + + + SBUS Trainer + + + + + Debug + + + + + + + + + + + + + + + + + + + + + Thr + + + + + + + + + + + + + + + + + + + + 3 + + + + + + + + + + 3 + + + + + + + SD + + + + + + + 3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 10 + + + + Qt::Horizontal + + + + + + + SO + + + + + + + -49 + + + 49 + + + + + + + 3 + + + + + + + RS + + + + + + + 3 + + + + + + + Ail + + + + + + + S4 + + + + + + + + + + + + + + + + -9999 + + + 9999 + + + + + + + LS2 + + + + + + + Antenna + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + + + + + PPM 1 + + + + + + + LS + + + + + + + Rud + + + + + + + Serial Port + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + SP + + + + + + + 3 + + + + + + + RS2 + + + + + + + + + + + + + + + + + SH + + + + + + + + + + + + + @@ -30,6 +339,13 @@ + + + + SE + + + @@ -43,22 +359,35 @@ - - - - SC + + + + 1 + + + 5.000000000000000 + + + 1.000000000000000 - - + + + + S2 + + + + + 3 - - + + @@ -76,6 +405,463 @@ + + + + SJ + + + + + + + PPM 2 + + + + + + + 3 + + + + + + + SG + + + + + + + S5 + + + + + + + + + + + + + + + + + + + + 3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 10 + + + + Qt::Horizontal + + + + + + + Current Offset + + + + + + + SK + + + + + + + 3 + + + + + + + + + + + + + + + + + + + + + + + + + + + ADC Filter + + + + + + + 3 + + + + + + + 3 + + + + + + + SF + + + + + + + + + + + + + + + + + + + + + + + + + + + S3 + + + + + + + 3 + + + + + + + + + + + + + + + + + + + + 3 + + + + + + + SB + + + + + + + + + + + + + + + + + + + + SI + + + + + + + SQ + + + + + + + Ele + + + + + + + 3 + + + + + + + 3 + + + + + + + + + + + + + + + + + 3 + + + + + + + + + + + + + + + + + + + + 3 + + + + + + + 3 + + + + + + + + + + SA + + + + + + + 3 + + + + + + + + + + + + + + SR + + + + + + + 3 + + + + + + + PPM Multiplier + + + + + + + S1 + + + + + + + + 0 + 0 + + + + Bluetooth + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + + + + + PPM 4 + + + + + + + + + + + + + + + + + v + + + 1 + + + -9.900000000000000 + + + 9.900000000000000 + + + 0.100000000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3 + + + + + + + 3 + + + @@ -134,31 +920,76 @@ - - - - 3 - - - - - + + - SR + PPM 3 - - + + - S4 + RTC Batt Check - - - - 3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SL + + + + + + + + + + + + + @@ -169,26 +1000,50 @@ - - - - -49 - - - 49 + + + + 3 - - - - - 0 - 10 - + + + + - - Qt::Horizontal + + + + + + + + -9999 + + + 9999 + + + + + + + 3 + + + + + + + SC + + + + + + + 3 @@ -211,26 +1066,6 @@ - - - - - 0 - 10 - - - - Qt::Horizontal - - - - - - - RS2 - - - @@ -244,778 +1079,6 @@ - - - - 3 - - - - - - - - 0 - 0 - - - - Bluetooth - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - - - - - Current Offset - - - - - - - - - - - - - - - - - PPM 2 - - - - - - - 3 - - - - - - - SD - - - - - - - 3 - - - - - - - - - - 3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SJ - - - - - - - SA - - - - - - - S1 - - - - - - - S3 - - - - - - - SP - - - - - - - SF - - - - - - - LS - - - - - - - 3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 3 - - - - - - - 3 - - - - - - - - - - - - - - - - - - - - - - - - - - - 3 - - - - - - - 3 - - - - - - - 1 - - - 5.000000000000000 - - - 1.000000000000000 - - - - - - - - - - - - - - - - - - - - 3 - - - - - - - - - - - - - - - - - - - - Battery Offset - - - - - - - Serial Port - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - SG - - - - - - - S2 - - - - - - - Ele - - - - - - - SI - - - - - - - 3 - - - - - - - 3 - - - - - - - SL - - - - - - - SQ - - - - - - - 3 - - - - - - - - - - - - - - - - - 3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SO - - - - - - - - - - - - - - - - -9999 - - - 9999 - - - - - - - PPM 1 - - - - - - - - - - - - - - - - - - - - PPM 4 - - - - - - - - - - - - - - - - -9999 - - - 9999 - - - - - - - - - - - - - - - - - - - - SB - - - - - - - 3 - - - - - - - - - - v - - - 1 - - - -9.900000000000000 - - - 9.900000000000000 - - - 0.100000000000000 - - - - - - - PPM Multiplier - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 3 - - - - - - - - - - - - - - - - - - - - - - - Rud - - - - - - - - - - - - - - - - - ADC Filter - - - - - - - 3 - - - - - - - 3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - S5 - - - - - - - Antenna - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - - - - - PPM 3 - - - - - - - Ail - - - - - - - SK - - - - - - - SE - - - - - - - LS2 - - - - - - - 3 - - - - - - - - - - - - - - - - - - - - 3 - - - - - - - Thr - - - - - - - 3 - - - - - - - SH - - - @@ -1029,64 +1092,8 @@ - - - - 3 - - - - - - - - - - - - - - - - - - - - - OFF - - - - - S-Port Mirror - - - - - Telemetry - - - - - SBUS Trainer - - - - - Debug - - - - - - - - RS - - - - - + + 3 @@ -1099,10 +1106,10 @@ - - - - 3 + + + + Battery Offset @@ -1113,17 +1120,24 @@ - - - - + + + + 3 - - + + - RTC Batt Check + S.Port Power + + + + + + +