Skip to content

Commit

Permalink
Merge pull request mavlink#6641 from DonLakeFlyer/ArduPilotParams
Browse files Browse the repository at this point in the history
ArduPilot: Fixup Power/Safety for new/missing params
  • Loading branch information
DonLakeFlyer authored Jun 22, 2018
2 parents c489483 + 06339ea commit 5e4c477
Show file tree
Hide file tree
Showing 7 changed files with 12,999 additions and 4,631 deletions.
100 changes: 46 additions & 54 deletions src/AutoPilotPlugins/APM/APMSafetyComponent.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,20 @@ QString APMSafetyComponent::name(void) const
QString APMSafetyComponent::description(void) const
{
switch (_vehicle->vehicleType()) {
case MAV_TYPE_SUBMARINE:
return tr("Safety Setup is used to setup failsafe actions, leak detection, and arming checks.");
break;
case MAV_TYPE_GROUND_ROVER:
case MAV_TYPE_FIXED_WING:
case MAV_TYPE_QUADROTOR:
case MAV_TYPE_COAXIAL:
case MAV_TYPE_HELICOPTER:
case MAV_TYPE_HEXAROTOR:
case MAV_TYPE_OCTOROTOR:
case MAV_TYPE_TRICOPTER:
default:
return tr("Safety Setup is used to setup triggers for Return to Land as well as the settings for Return to Land itself.");
break;
case MAV_TYPE_SUBMARINE:
return tr("Safety Setup is used to setup failsafe actions, leak detection, and arming checks.");
break;
case MAV_TYPE_GROUND_ROVER:
case MAV_TYPE_FIXED_WING:
case MAV_TYPE_QUADROTOR:
case MAV_TYPE_COAXIAL:
case MAV_TYPE_HELICOPTER:
case MAV_TYPE_HEXAROTOR:
case MAV_TYPE_OCTOROTOR:
case MAV_TYPE_TRICOPTER:
default:
return tr("Safety Setup is used to setup triggers for Return to Land as well as the settings for Return to Land itself.");
break;
}
}

Expand Down Expand Up @@ -73,26 +73,22 @@ QUrl APMSafetyComponent::setupSource(void) const
QString qmlFile;

switch (_vehicle->vehicleType()) {
case MAV_TYPE_FIXED_WING:
qmlFile = QStringLiteral("qrc:/qml/APMSafetyComponentPlane.qml");
break;
case MAV_TYPE_QUADROTOR:
case MAV_TYPE_COAXIAL:
case MAV_TYPE_HELICOPTER:
case MAV_TYPE_HEXAROTOR:
case MAV_TYPE_OCTOROTOR:
case MAV_TYPE_TRICOPTER:
qmlFile = QStringLiteral("qrc:/qml/APMSafetyComponentCopter.qml");
break;
case MAV_TYPE_SUBMARINE:
qmlFile = QStringLiteral("qrc:/qml/APMSafetyComponentSub.qml");
break;
case MAV_TYPE_GROUND_ROVER:
qmlFile = QStringLiteral("qrc:/qml/APMSafetyComponentRover.qml");
break;
default:
qmlFile = QStringLiteral("qrc:/qml/APMNotSupported.qml");
break;
case MAV_TYPE_FIXED_WING:
case MAV_TYPE_QUADROTOR:
case MAV_TYPE_COAXIAL:
case MAV_TYPE_HELICOPTER:
case MAV_TYPE_HEXAROTOR:
case MAV_TYPE_OCTOROTOR:
case MAV_TYPE_TRICOPTER:
case MAV_TYPE_GROUND_ROVER:
qmlFile = QStringLiteral("qrc:/qml/APMSafetyComponent.qml");
break;
case MAV_TYPE_SUBMARINE:
qmlFile = QStringLiteral("qrc:/qml/APMSafetyComponentSub.qml");
break;
default:
qmlFile = QStringLiteral("qrc:/qml/APMNotSupported.qml");
break;
}

return QUrl::fromUserInput(qmlFile);
Expand All @@ -103,26 +99,22 @@ QUrl APMSafetyComponent::summaryQmlSource(void) const
QString qmlFile;

switch (_vehicle->vehicleType()) {
case MAV_TYPE_FIXED_WING:
qmlFile = QStringLiteral("qrc:/qml/APMSafetyComponentSummaryPlane.qml");
break;
case MAV_TYPE_QUADROTOR:
case MAV_TYPE_COAXIAL:
case MAV_TYPE_HELICOPTER:
case MAV_TYPE_HEXAROTOR:
case MAV_TYPE_OCTOROTOR:
case MAV_TYPE_TRICOPTER:
qmlFile = QStringLiteral("qrc:/qml/APMSafetyComponentSummaryCopter.qml");
break;
case MAV_TYPE_SUBMARINE:
qmlFile = QStringLiteral("qrc:/qml/APMSafetyComponentSummarySub.qml");
break;
case MAV_TYPE_GROUND_ROVER:
qmlFile = QStringLiteral("qrc:/qml/APMSafetyComponentSummaryRover.qml");
break;
default:
qmlFile = QStringLiteral("qrc:/qml/APMNotSupported.qml");
break;
case MAV_TYPE_FIXED_WING:
case MAV_TYPE_QUADROTOR:
case MAV_TYPE_COAXIAL:
case MAV_TYPE_HELICOPTER:
case MAV_TYPE_HEXAROTOR:
case MAV_TYPE_OCTOROTOR:
case MAV_TYPE_TRICOPTER:
case MAV_TYPE_GROUND_ROVER:
qmlFile = QStringLiteral("qrc:/qml/APMSafetyComponentSummary.qml");
break;
case MAV_TYPE_SUBMARINE:
qmlFile = QStringLiteral("qrc:/qml/APMSafetyComponentSummarySub.qml");
break;
default:
qmlFile = QStringLiteral("qrc:/qml/APMNotSupported.qml");
break;
}

return QUrl::fromUserInput(qmlFile);
Expand Down
Loading

0 comments on commit 5e4c477

Please sign in to comment.