Unverified Commit 3e6a08b3 authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #6952 from DonLakeFlyer/CompassAutoRot

ArduPilot: Compass auto rot support
parents bbf7f098 801aa5d0
...@@ -43,7 +43,7 @@ FactPanel { ...@@ -43,7 +43,7 @@ FactPanel {
VehicleSummaryRow { VehicleSummaryRow {
labelText: qsTr("Throttle failsafe:") labelText: qsTr("Throttle failsafe:")
valueText: Fact.enumStringValue valueText: fact.enumStringValue
visible: controller.vehicle.multiRotor visible: controller.vehicle.multiRotor
property Fact fact: controller.getParameterFact(-1, "FS_THR_ENABLE", false /* reportMissing */) property Fact fact: controller.getParameterFact(-1, "FS_THR_ENABLE", false /* reportMissing */)
......
...@@ -79,6 +79,9 @@ SetupPage { ...@@ -79,6 +79,9 @@ SetupPage {
property int _orientationDialogCalType property int _orientationDialogCalType
property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
property real _margins: ScreenTools.defaultFontPixelHeight / 2 property real _margins: ScreenTools.defaultFontPixelHeight / 2
property bool _compassAutoRotAvailable: controller.parameterExists(-1, "COMPASS_AUTO_ROT")
property Fact _compassAutoRotFact: controller.getParameterFact(-1, "COMPASS_AUTO_ROT", false /* reportMissing */)
property bool _compassAutoRot: _compassAutoRotAvailable ? _compassAutoRotFact.rawValue == 2 : false
function showOrientationsDialog(calType) { function showOrientationsDialog(calType) {
var dialogTitle var dialogTitle
...@@ -346,7 +349,7 @@ SetupPage { ...@@ -346,7 +349,7 @@ SetupPage {
} }
Column { Column {
visible: sensorParams.rgCompassExternal[index] && sensorParams.rgCompassRotParamAvailable[index] visible: !_compassAutoRot && sensorParams.rgCompassExternal[index] && sensorParams.rgCompassRotParamAvailable[index]
QGCLabel { text: qsTr("Orientation:") } QGCLabel { text: qsTr("Orientation:") }
......
...@@ -371,7 +371,6 @@ void FirmwareUpgradeController::_initFirmwareHash() ...@@ -371,7 +371,6 @@ void FirmwareUpgradeController::_initFirmwareHash()
QString vehicleTypeDir = apmMapVehicleTypeToDir[vehicleType]; QString vehicleTypeDir = apmMapVehicleTypeToDir[vehicleType];
QString px4Dir = apmMapVehicleTypeToPX4Dir[vehicleType]; QString px4Dir = apmMapVehicleTypeToPX4Dir[vehicleType];
QString filename = apmMapVehicleTypeToFilename[vehicleType]; QString filename = apmMapVehicleTypeToFilename[vehicleType];
qDebug() << firmwareTypeDir << vehicleTypeDir << px4Dir << filename;
_rgPX4FMUV5Firmware.insert (FirmwareIdentifier(AutoPilotStackAPM, firmwareType, vehicleType), apmUrl.arg(vehicleTypeDir).arg(firmwareTypeDir).arg(px4Dir).arg(filename).arg("5")); _rgPX4FMUV5Firmware.insert (FirmwareIdentifier(AutoPilotStackAPM, firmwareType, vehicleType), apmUrl.arg(vehicleTypeDir).arg(firmwareTypeDir).arg(px4Dir).arg(filename).arg("5"));
_rgPX4FMUV4Firmware.insert (FirmwareIdentifier(AutoPilotStackAPM, firmwareType, vehicleType), apmUrl.arg(vehicleTypeDir).arg(firmwareTypeDir).arg(px4Dir).arg(filename).arg("4")); _rgPX4FMUV4Firmware.insert (FirmwareIdentifier(AutoPilotStackAPM, firmwareType, vehicleType), apmUrl.arg(vehicleTypeDir).arg(firmwareTypeDir).arg(px4Dir).arg(filename).arg("4"));
_rgPX4FMUV3Firmware.insert (FirmwareIdentifier(AutoPilotStackAPM, firmwareType, vehicleType), apmUrl.arg(vehicleTypeDir).arg(firmwareTypeDir).arg(px4Dir).arg(filename).arg("3")); _rgPX4FMUV3Firmware.insert (FirmwareIdentifier(AutoPilotStackAPM, firmwareType, vehicleType), apmUrl.arg(vehicleTypeDir).arg(firmwareTypeDir).arg(px4Dir).arg(filename).arg("3"));
...@@ -388,7 +387,6 @@ void FirmwareUpgradeController::_initFirmwareHash() ...@@ -388,7 +387,6 @@ void FirmwareUpgradeController::_initFirmwareHash()
QString vehicleTypeDir = apmChibiOSMapVehicleTypeToDir[vehicleType]; QString vehicleTypeDir = apmChibiOSMapVehicleTypeToDir[vehicleType];
QString fmuDir = apmChibiOSMapVehicleTypeToFmuDir[vehicleType]; QString fmuDir = apmChibiOSMapVehicleTypeToFmuDir[vehicleType];
QString filename = apmChibiOSMapVehicleTypeToFilename[vehicleType]; QString filename = apmChibiOSMapVehicleTypeToFilename[vehicleType];
qDebug() << firmwareTypeDir << vehicleTypeDir << fmuDir << filename;
_rgPX4FMUV5Firmware.insert (FirmwareIdentifier(AutoPilotStackAPM, firmwareType, vehicleType), apmChibiOSUrl.arg(vehicleTypeDir).arg(firmwareTypeDir).arg("5").arg(fmuDir).arg(filename)); _rgPX4FMUV5Firmware.insert (FirmwareIdentifier(AutoPilotStackAPM, firmwareType, vehicleType), apmChibiOSUrl.arg(vehicleTypeDir).arg(firmwareTypeDir).arg("5").arg(fmuDir).arg(filename));
_rgPX4FMUV4Firmware.insert (FirmwareIdentifier(AutoPilotStackAPM, firmwareType, vehicleType), apmChibiOSUrl.arg(vehicleTypeDir).arg(firmwareTypeDir).arg("4").arg(fmuDir).arg(filename)); _rgPX4FMUV4Firmware.insert (FirmwareIdentifier(AutoPilotStackAPM, firmwareType, vehicleType), apmChibiOSUrl.arg(vehicleTypeDir).arg(firmwareTypeDir).arg("4").arg(fmuDir).arg(filename));
_rgPX4FMUV3Firmware.insert (FirmwareIdentifier(AutoPilotStackAPM, firmwareType, vehicleType), apmChibiOSUrl.arg(vehicleTypeDir).arg(firmwareTypeDir).arg("3").arg(fmuDir).arg(filename)); _rgPX4FMUV3Firmware.insert (FirmwareIdentifier(AutoPilotStackAPM, firmwareType, vehicleType), apmChibiOSUrl.arg(vehicleTypeDir).arg(firmwareTypeDir).arg("3").arg(fmuDir).arg(filename));
......
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