diff --git a/src/AutoPilotPlugins/PX4/SensorsComponentController.cc b/src/AutoPilotPlugins/PX4/SensorsComponentController.cc index 032f54037a5f8b1341f736be377a8aec4bbce674..89085b8c4d37b1aa37c232ce128b8b3d861ee0ce 100644 --- a/src/AutoPilotPlugins/PX4/SensorsComponentController.cc +++ b/src/AutoPilotPlugins/PX4/SensorsComponentController.cc @@ -167,7 +167,7 @@ void SensorsComponentController::_stopCalibration(SensorsComponentController::St emit resetStatusTextArea(); } if (_magCalInProgress) { - emit setCompassRotations(); + emit magCalComplete(); } break; diff --git a/src/AutoPilotPlugins/PX4/SensorsComponentController.h b/src/AutoPilotPlugins/PX4/SensorsComponentController.h index d9cb441c21e84f301b11624c712b33ade3a6d3ea..b9de627fc1e45c8a60a1714e6217dcfa4b75c65d 100644 --- a/src/AutoPilotPlugins/PX4/SensorsComponentController.h +++ b/src/AutoPilotPlugins/PX4/SensorsComponentController.h @@ -92,7 +92,7 @@ signals: void orientationCalSidesRotateChanged(void); void resetStatusTextArea(void); void waitingForCancelChanged(void); - void setCompassRotations(void); + void magCalComplete(void); private slots: void _handleUASTextMessage(int uasId, int compId, int severity, QString text); diff --git a/src/AutoPilotPlugins/PX4/SensorsSetup.qml b/src/AutoPilotPlugins/PX4/SensorsSetup.qml index 028973fbfea8ee11644716c10752c840f4497400..6bbb20ddc5758d471d3644e3fc59c88fb5910b9c 100644 --- a/src/AutoPilotPlugins/PX4/SensorsSetup.qml +++ b/src/AutoPilotPlugins/PX4/SensorsSetup.qml @@ -131,11 +131,11 @@ Item { onResetStatusTextArea: statusLog.text = statusTextAreaDefaultText - onSetCompassRotations: { - if (!_sensorsHaveFixedOrientation && (showCompass0Rot || showCompass1Rot || showCompass2Rot)) { + onMagCalComplete: { + //if (!_sensorsHaveFixedOrientation && (showCompass0Rot || showCompass1Rot || showCompass2Rot)) { setOrientationsDialogShowBoardOrientation = false - showDialog(setOrientationsDialogComponent, qsTr("Set Compass Rotation(s)"), qgcView.showDialogDefaultWidth, StandardButton.Ok) - } + showDialog(setOrientationsDialogComponent, qsTr("Compass Calibration Complete"), qgcView.showDialogDefaultWidth, StandardButton.Ok) + //} } onWaitingForCancelChanged: { @@ -252,6 +252,20 @@ Item { anchors.top: parent.top spacing: ScreenTools.defaultFontPixelHeight + QGCLabel { + width: parent.width + wrapMode: Text.WordWrap + text: qsTr("Set your compass orientations below and the make sure to reboot the vehicle prior to flight.") + } + + QGCButton { + text: qsTr("Reboot Vehicle") + onClicked: { + controller.vehicle.rebootVehicle() + hideDialog() + } + } + QGCLabel { width: parent.width wrapMode: Text.WordWrap