Browse Source

Fix FRAME_TYPE/CLASS setup

QGC4.4
DonLakeFlyer 4 years ago committed by Don Gagne
parent
commit
0e1a02fd28
  1. 4
      src/AutoPilotPlugins/APM/APMAirframeComponent.qml
  2. 2
      src/AutoPilotPlugins/APM/APMAirframeComponentController.cc

4
src/AutoPilotPlugins/APM/APMAirframeComponent.qml

@ -37,7 +37,7 @@ SetupPage { @@ -37,7 +37,7 @@ SetupPage {
property real _margins: ScreenTools.defaultFontPixelWidth
property Fact _frameClass: controller.getParameterFact(-1, "FRAME_CLASS")
property Fact _frameType: controller.getParameterFact(-1, "FRAME_TYPE", false) // FRAME_TYPE is not available on all Rover versions
property bool _frameTypeAvailable: controller.parameterExists(-1, "FRAME_TYPE")
property bool _frameTypeAvailable: controller.vehicle.multiRotor
readonly property real spacerHeight: ScreenTools.defaultFontPixelHeight
@ -72,7 +72,7 @@ SetupPage { @@ -72,7 +72,7 @@ SetupPage {
qsTr("Currently set to frame class '%1'").arg(_frameClass.enumStringValue) +
(_frameTypeAvailable ? qsTr(" and frame type '%2'").arg(_frameType.enumStringValue) : "") +
qsTr(".", "period for end of sentence")) +
qsTr(" To change this configuration, select the desired frame class below and frame type.")
qsTr(" To change this configuration, select the desired frame class below.")
font.family: ScreenTools.demiboldFontFamily
wrapMode: Text.WordWrap
}

2
src/AutoPilotPlugins/APM/APMAirframeComponentController.cc

@ -308,6 +308,8 @@ APMFrameClass::APMFrameClass(const QString& name, bool copter, int frameClass, F @@ -308,6 +308,8 @@ APMFrameClass::APMFrameClass(const QString& name, bool copter, int frameClass, F
_frameTypeEnumStrings.append(frameTypeFact->enumStrings()[index]);
}
}
} else {
_imageResourceDefault = imageResource();
}
// If the frameClass is not in the list then frame type is not supported

Loading…
Cancel
Save