Commit c6486f56 authored by Don Gagne's avatar Don Gagne

APM 3.2 support

parent 52e1760e
......@@ -35,8 +35,10 @@ QGCView {
id: rootQGCView
viewPanel: panel
property real _margins: ScreenTools.defaultFontPixelHeight
property bool _channelOptionsAvailable: controller.parameterExists(-1, "CH7_OPT") // Not available in all firmware types
property real _margins: ScreenTools.defaultFontPixelHeight
property bool _channel7OptionsAvailable: controller.parameterExists(-1, "CH7_OPT") // Not available in all firmware types
property bool _channel9OptionsAvailable: controller.parameterExists(-1, "CH9_OPT") // Not available in all firmware types
property int _channelOptionCount: _channel7OptionsAvailable ? (_channel9OptionsAvailable ? 6 : 2) : 0
QGCPalette { id: qgcPal; colorGroupEnabled: panel.enabled }
......@@ -117,7 +119,7 @@ QGCView {
anchors.left: flightModeSettings.right
text: "Channel Options"
font.weight: Font.DemiBold
visible: _channelOptionsAvailable
visible: _channelOptionCount != 0
}
Rectangle {
......@@ -128,7 +130,7 @@ QGCView {
width: channelOptColumn.width + (_margins * 2)
height: channelOptColumn.height + ScreenTools.defaultFontPixelHeight
color: qgcPal.windowShade
visible: _channelOptionsAvailable
visible: _channelOptionCount != 0
Column {
id: channelOptColumn
......@@ -138,7 +140,7 @@ QGCView {
spacing: ScreenTools.defaultFontPixelHeight
Repeater {
model: 6
model: _channelOptionCount
Row {
spacing: ScreenTools.defaultFontPixelWidth
......@@ -155,7 +157,7 @@ QGCView {
FactComboBox {
id: optCombo
width: ScreenTools.defaultFontPixelWidth * 15
fact: _channelOptionsAvailable ? controller.getParameterFact(-1, "CH" + index + "_OPT") : nullFact
fact: controller.getParameterFact(-1, "CH" + index + "_OPT")
indexModel: false
}
}
......
......@@ -72,7 +72,10 @@ QUrl APMTuningComponent::setupSource(void) const
case MAV_TYPE_HEXAROTOR:
case MAV_TYPE_OCTOROTOR:
case MAV_TYPE_TRICOPTER:
qmlFile = "qrc:/qml/APMTuningComponentCopter.qml";
// Older firmwares do not have CH9_OPT, we don't support Tuning on older firmwares
if (_autopilot->parameterExists(-1, "CH9_OPT")) {
qmlFile = "qrc:/qml/APMTuningComponentCopter.qml";
}
break;
default:
// No tuning panel
......
......@@ -320,7 +320,7 @@ void APMFirmwarePlugin::adjustMavlinkMessage(Vehicle* vehicle, mavlink_message_t
switch (vehicle->vehicleType()) {
case MAV_TYPE_FIXED_WING:
supportedMajorNumber = 3;
supportedMinorNumber = 4;
supportedMinorNumber = 2;
break;
case MAV_TYPE_QUADROTOR:
case MAV_TYPE_COAXIAL:
......@@ -330,7 +330,7 @@ void APMFirmwarePlugin::adjustMavlinkMessage(Vehicle* vehicle, mavlink_message_t
case MAV_TYPE_OCTOROTOR:
case MAV_TYPE_TRICOPTER:
supportedMajorNumber = 3;
supportedMinorNumber = 3;
supportedMinorNumber = 2;
break;
default:
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment