6import QGroundControl.FactControls
7import QGroundControl.Controls
10 implicitWidth: mainLayout.implicitWidth
11 implicitHeight: mainLayout.implicitHeight
14 FactPanelController { id: controller; }
16 property bool _isQuadPlane: !controller.parameterExists(-1, "MOT_PWM_TYPE") && controller.parameterExists(-1, "Q_M_PWM_TYPE")
17 property string _escPrefix: _isQuadPlane ? "Q_M_" : "MOT_"
19 property bool _motPwmTypeAvailable: controller.parameterExists(-1, _escPrefix + "PWM_TYPE")
20 property Fact _motPwmType: controller.getParameterFact(-1, _escPrefix + "PWM_TYPE", false /* reportMissing */)
22 property bool _isDshot: _motPwmTypeAvailable && _motPwmType && _motPwmType.rawValue >= 4
23 property bool _servoDshotEscAvailable: controller.parameterExists(-1, "SERVO_DSHOT_ESC")
24 property Fact _servoDshotEsc: controller.getParameterFact(-1, "SERVO_DSHOT_ESC", false /* reportMissing */)
25 property bool _servoDshotRateAvailable: controller.parameterExists(-1, "SERVO_DSHOT_RATE")
26 property Fact _servoDshotRate: controller.getParameterFact(-1, "SERVO_DSHOT_RATE", false /* reportMissing */)
33 labelText: qsTr("Output type")
34 valueText: _motPwmTypeAvailable ? _motPwmType.enumStringValue : ""
35 visible: _motPwmTypeAvailable
39 labelText: qsTr("DShot ESC type")
40 valueText: _servoDshotEscAvailable ? _servoDshotEsc.enumStringValue : ""
41 visible: _isDshot && _servoDshotEscAvailable
45 labelText: qsTr("DShot output rate")
46 valueText: _servoDshotRateAvailable ? _servoDshotRate.enumStringValue : ""
47 visible: _isDshot && _servoDshotRateAvailable