Browse Source

Merge pull request #6773 from DonLakeFlyer/CompassCalReboot

Prompt for Reboot after compass cal
QGC4.4
Don Gagne 7 years ago committed by GitHub
parent
commit
9d68581c08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/AutoPilotPlugins/PX4/SensorsComponentController.cc
  2. 2
      src/AutoPilotPlugins/PX4/SensorsComponentController.h
  3. 22
      src/AutoPilotPlugins/PX4/SensorsSetup.qml

2
src/AutoPilotPlugins/PX4/SensorsComponentController.cc

@ -167,7 +167,7 @@ void SensorsComponentController::_stopCalibration(SensorsComponentController::St @@ -167,7 +167,7 @@ void SensorsComponentController::_stopCalibration(SensorsComponentController::St
emit resetStatusTextArea();
}
if (_magCalInProgress) {
emit setCompassRotations();
emit magCalComplete();
}
break;

2
src/AutoPilotPlugins/PX4/SensorsComponentController.h

@ -92,7 +92,7 @@ signals: @@ -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);

22
src/AutoPilotPlugins/PX4/SensorsSetup.qml

@ -131,11 +131,11 @@ Item { @@ -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: {
@ -255,6 +255,20 @@ Item { @@ -255,6 +255,20 @@ Item {
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
text: boardRotationText
}

Loading…
Cancel
Save