From 10e828b2b47f97a32c42252d28bb96d75d07809a Mon Sep 17 00:00:00 2001 From: ChristopherOlson Date: Wed, 13 Nov 2019 07:46:52 -0600 Subject: [PATCH] APMHeliComponent - update for Copter 4.0 --- src/AutoPilotPlugins/APM/APMHeliComponent.qml | 115 +++++++++++++----- 1 file changed, 82 insertions(+), 33 deletions(-) diff --git a/src/AutoPilotPlugins/APM/APMHeliComponent.qml b/src/AutoPilotPlugins/APM/APMHeliComponent.qml index cb559db75..6d1e5ac93 100644 --- a/src/AutoPilotPlugins/APM/APMHeliComponent.qml +++ b/src/AutoPilotPlugins/APM/APMHeliComponent.qml @@ -37,35 +37,43 @@ SetupPage { property real _margins: ScreenTools.defaultFontPixelHeight property bool _showIcon: !ScreenTools.isTinyScreen - property Fact _hSvMan: controller.getParameterFact(-1, "H_SV_MAN") - property Fact _hSv1Pos: controller.getParameterFact(-1, "H_SV1_POS") - property Fact _hSv2Pos: controller.getParameterFact(-1, "H_SV2_POS") - property Fact _hSv3Pos: controller.getParameterFact(-1, "H_SV3_POS") - property Fact _hSwashType: controller.getParameterFact(-1, "H_SWASH_TYPE") - property Fact _hColCtrlDir: controller.getParameterFact(-1, "H_COL_CTRL_DIR") - property Fact _hFlybarMode: controller.getParameterFact(-1, "H_FLYBAR_MODE") - property Fact _hColMax: controller.getParameterFact(-1, "H_COL_MAX") - property Fact _hColMid: controller.getParameterFact(-1, "H_COL_MID") - property Fact _hColMin: controller.getParameterFact(-1, "H_COL_MIN") - property Fact _hCycMax: controller.getParameterFact(-1, "H_CYC_MAX") + property Fact _hSvMan: controller.getParameterFact(-1, "H_SV_MAN") + property Fact _hSwType: controller.getParameterFact(-1, "H_SW_TYPE") + property Fact _hSwColDir: controller.getParameterFact(-1, "H_SW_COL_DIR") + property Fact _hSwLinSvo: controller.getParameterFact(-1, "H_SW_LIN_SVO") + property Fact _hFlybarMode: controller.getParameterFact(-1, "H_FLYBAR_MODE") + property Fact _hColMax: controller.getParameterFact(-1, "H_COL_MAX") + property Fact _hColMid: controller.getParameterFact(-1, "H_COL_MID") + property Fact _hColMin: controller.getParameterFact(-1, "H_COL_MIN") + property Fact _hCycMax: controller.getParameterFact(-1, "H_CYC_MAX") property Fact _hRscMode: controller.getParameterFact(-1, "H_RSC_MODE") property Fact _hRscCritical: controller.getParameterFact(-1, "H_RSC_CRITICAL") - property Fact _hRscIdle: controller.getParameterFact(-1, "H_RSC_IDLE") property Fact _hRscRampTime: controller.getParameterFact(-1, "H_RSC_RAMP_TIME") property Fact _hRscRunupTime: controller.getParameterFact(-1, "H_RSC_RUNUP_TIME") property Fact _hRscSetpoint: controller.getParameterFact(-1, "H_RSC_SETPOINT") + property Fact _hRscIdle: controller.getParameterFact(-1, "H_RSC_IDLE") property Fact _hRscThrcrv0: controller.getParameterFact(-1, "H_RSC_THRCRV_0") property Fact _hRscThrcrv25: controller.getParameterFact(-1, "H_RSC_THRCRV_25") property Fact _hRscThrcrv50: controller.getParameterFact(-1, "H_RSC_THRCRV_50") property Fact _hRscThrcrv75: controller.getParameterFact(-1, "H_RSC_THRCRV_75") property Fact _hRscThrcrv100: controller.getParameterFact(-1, "H_RSC_THRCRV_100") - property Fact _hLandColMin: controller.getParameterFact(-1, "H_LAND_COL_MIN") + property Fact _hRscGovSetpnt: controller.getParameterFact(-1, "H_RSC_GOV_SETPNT") + property Fact _hRscGovDisgag: controller.getParameterFact(-1, "H_RSC_GOV_DISGAG") + property Fact _hRscGovDroop: controller.getParameterFact(-1, "H_RSC_GOV_DROOP") + property Fact _hRscGovTcgain: controller.getParameterFact(-1, "H_RSC_GOV_TCGAIN") + property Fact _hRscGovRange: controller.getParameterFact(-1, "H_RSC_GOV_RANGE") + property Fact _imStabCol1: controller.getParameterFact(-1, "IM_STAB_COL_1") property Fact _imStabCol2: controller.getParameterFact(-1, "IM_STAB_COL_2") property Fact _imStabCol3: controller.getParameterFact(-1, "IM_STAB_COL_3") property Fact _imStabCol4: controller.getParameterFact(-1, "IM_STAB_COL_4") + property Fact _hTailType: controller.getParameterFact(-1, "H_TAIL_TYPE") + property Fact _hTailSpeed: controller.getParameterFact(-1, "H_TAIL_SPEED") + property Fact _hGyrGain: controller.getParameterFact(-1, "H_GYR_GAIN") + property Fact _hGyrGainAcro: controller.getParameterFact(-1, "H_GYR_GAIN_ACRO") + property Fact _hColYaw: controller.getParameterFact(-1, "H_COLYAW") QGCGroupBox { title: qsTr("Servo Setup") @@ -267,7 +275,7 @@ SetupPage { } QGCGroupBox { - title: qsTr("Swash Setup") + title: qsTr("Swashplate Setup") GridLayout { columns: 2 @@ -278,24 +286,21 @@ SetupPage { indexModel: false } - QGCLabel { text: _hSv1Pos.shortDescription } - FactTextField { fact: _hSv1Pos } - - QGCLabel { text: _hSv2Pos.shortDescription } - FactTextField { fact: _hSv2Pos } - - QGCLabel { text: _hSv3Pos.shortDescription } - FactTextField { fact: _hSv3Pos } + QGCLabel { text: _hSwType.shortDescription } + FactComboBox { + fact: _hSwType + indexModel: false + } - QGCLabel { text: _hSwashType.shortDescription } + QGCLabel { text: _hSwColDir.shortDescription } FactComboBox { - fact: _hSwashType + fact: _hSwColDir indexModel: false } - QGCLabel { text: _hColCtrlDir.shortDescription } + QGCLabel { text: _hSwLinSvo.shortDescription } FactComboBox { - fact: _hColCtrlDir + fact: _hSwLinSvo indexModel: false } @@ -320,7 +325,7 @@ SetupPage { } QGCGroupBox { - title: qsTr("Throttle Setup") + title: qsTr("Throttle Settings") GridLayout { columns: 2 @@ -334,9 +339,6 @@ SetupPage { QGCLabel { text: _hRscCritical.shortDescription } FactTextField { fact: _hRscCritical } - QGCLabel { text: _hRscIdle.shortDescription } - FactTextField { fact: _hRscIdle } - QGCLabel { text: _hRscRampTime.shortDescription } FactTextField { fact: _hRscRampTime } @@ -346,6 +348,9 @@ SetupPage { QGCLabel { text: _hRscSetpoint.shortDescription } FactTextField { fact: _hRscSetpoint } + QGCLabel { text: _hRscIdle.shortDescription } + FactTextField { fact: _hRscIdle } + QGCLabel { text: _hRscThrcrv0.shortDescription } FactTextField { fact: _hRscThrcrv0 } @@ -364,13 +369,36 @@ SetupPage { } QGCGroupBox { - title: qsTr("Collective Curve Setup") + title: qsTr("Governor Settings") GridLayout { columns: 2 - QGCLabel { text: _hLandColMin.shortDescription } - FactTextField { fact: _hLandColMin } + QGCLabel { text: _hRscGovSetpnt.shortDescription } + FactTextField { fact: _hRscGovSetpnt } + + QGCLabel { text: _hRscGovDisgag.shortDescription } + FactTextField { fact: _hRscGovDisgag } + + QGCLabel { text: _hRscGovDroop.shortDescription } + FactTextField { fact: _hRscGovDroop } + + QGCLabel { text: _hRscGovTcgain.shortDescription } + FactTextField { fact: _hRscGovTcgain } + + QGCLabel { text: _hRscGovRange.shortDescription } + FactTextField { fact: _hRscGovRange } + } + } + + QGCGroupBox { + title: qsTr("Miscellaneous Settings") + + GridLayout { + columns: 2 + + QGCLabel { text: qsTr("* Stabilize Collective Curve *") } + QGCLabel { text: qsTr("") } QGCLabel { text: _imStabCol1.shortDescription } FactTextField { fact: _imStabCol1 } @@ -383,6 +411,27 @@ SetupPage { QGCLabel { text: _imStabCol4.shortDescription } FactTextField { fact: _imStabCol4 } + + QGCLabel { text: qsTr("* Tail & Gyros *") } + QGCLabel { text: qsTr("") } + + QGCLabel { text: _hTailType.shortDescription } + FactComboBox { + fact: _hTailType + indexModel: false + } + + QGCLabel { text: _hTailSpeed.shortDescription } + FactTextField { fact: _hTailSpeed } + + QGCLabel { text: _hGyrGain.shortDescription } + FactTextField { fact: _hGyrGain } + + QGCLabel { text: _hGyrGainAcro.shortDescription } + FactTextField { fact: _hGyrGainAcro } + + QGCLabel { text: _hColYaw.shortDescription } + FactTextField { fact: _hColYaw } } } } // Flow -- 2.22.0