From bc44ca9118ec3e5a3918147c70027151b5a3c62b Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Tue, 12 May 2015 09:51:18 -0700 Subject: [PATCH] VTOL must report as fixed wing --- src/AutoPilotPlugins/PX4/SensorsComponent.cc | 8 ++++++-- src/AutoPilotPlugins/PX4/SensorsComponentController.cc | 4 +++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/AutoPilotPlugins/PX4/SensorsComponent.cc b/src/AutoPilotPlugins/PX4/SensorsComponent.cc index 60caa2492..1f1c30afa 100644 --- a/src/AutoPilotPlugins/PX4/SensorsComponent.cc +++ b/src/AutoPilotPlugins/PX4/SensorsComponent.cc @@ -87,7 +87,9 @@ QStringList SensorsComponent::setupCompleteChangedTriggerList(void) const QStringList triggers; triggers << "CAL_MAG0_ID" << "CAL_GYRO0_ID" << "CAL_ACC0_ID"; - if (_uas->getSystemType() == MAV_TYPE_FIXED_WING) { + if (_uas->getSystemType() == MAV_TYPE_FIXED_WING || + _uas->getSystemType() == MAV_TYPE_VTOL_DUOROTOR || + _uas->getSystemType() == MAV_TYPE_VTOL_QUADROTOR) { triggers << "SENS_DPRES_OFF"; } @@ -123,7 +125,9 @@ QUrl SensorsComponent::summaryQmlSource(void) const QString summaryQml; qDebug() << _uas->getSystemType(); - if (_uas->getSystemType() == MAV_TYPE_FIXED_WING) { + if (_uas->getSystemType() == MAV_TYPE_FIXED_WING || + _uas->getSystemType() == MAV_TYPE_VTOL_DUOROTOR || + _uas->getSystemType() == MAV_TYPE_VTOL_QUADROTOR) { summaryQml = "qrc:/qml/SensorsComponentSummaryFixedWing.qml"; } else { summaryQml = "qrc:/qml/SensorsComponentSummary.qml"; diff --git a/src/AutoPilotPlugins/PX4/SensorsComponentController.cc b/src/AutoPilotPlugins/PX4/SensorsComponentController.cc index c3d8ac757..c8e258f59 100644 --- a/src/AutoPilotPlugins/PX4/SensorsComponentController.cc +++ b/src/AutoPilotPlugins/PX4/SensorsComponentController.cc @@ -408,7 +408,9 @@ bool SensorsComponentController::fixedWing(void) { UASInterface* uas = _autopilot->uas(); Q_ASSERT(uas); - return uas->getSystemType() == MAV_TYPE_FIXED_WING; + return uas->getSystemType() == MAV_TYPE_FIXED_WING || + uas->getSystemType() == MAV_TYPE_VTOL_DUOROTOR || + uas->getSystemType() == MAV_TYPE_VTOL_QUADROTOR; } void SensorsComponentController::_updateAndEmitShowOrientationCalArea(bool show) -- 2.22.0