Commit 14a59a98 authored by Don Gagne's avatar Don Gagne

Mag Cal UI

parent a2e9481b
...@@ -195,8 +195,6 @@ Rectangle { ...@@ -195,8 +195,6 @@ Rectangle {
} }
VehicleRotationCal { VehicleRotationCal {
width: 200
height: 200
calValid: true calValid: true
calInProgress: controller.gyroCalInProgress calInProgress: controller.gyroCalInProgress
imageSource: "qrc:///qml/VehicleDown.png" imageSource: "qrc:///qml/VehicleDown.png"
...@@ -206,10 +204,10 @@ Rectangle { ...@@ -206,10 +204,10 @@ Rectangle {
} }
Rectangle { Rectangle {
id: accelCalArea id: orientationCalArea
width: parent.calDisplayAreaWidth width: parent.calDisplayAreaWidth
height: parent.height height: parent.height
visible: controller.showAccelCalArea visible: controller.showOrientationCalArea
color: qgcPal.windowShade color: qgcPal.windowShade
QGCLabel { QGCLabel {
...@@ -227,46 +225,40 @@ Rectangle { ...@@ -227,46 +225,40 @@ Rectangle {
spacing: 5 spacing: 5
VehicleRotationCal { VehicleRotationCal {
width: 200 calValid: controller.orientationCalDownSideDone
height: 200 calInProgress: controller.orientationCalDownSideInProgress
calValid: controller.accelCalDownSideDone calInProgressText: controller.calInProgressText
calInProgress: controller.accelCalDownSideInProgress imageSource: "qrc:///qml/VehicleDown.png"
imageSource: "qrc:///qml/VehicleDown.png"
} }
VehicleRotationCal { VehicleRotationCal {
width: 200 calValid: controller.orientationCalUpsideDownSideDone
height: 200 calInProgress: controller.orientationCalUpsideDownSideInProgress
calValid: controller.accelCalUpsideDownSideDone calInProgressText: controller.calInProgressText
calInProgress: controller.accelCalUpsideDownSideInProgress imageSource: "qrc:///qml/VehicleUpsideDown.png"
imageSource: "qrc:///qml/VehicleUpsideDown.png"
} }
VehicleRotationCal { VehicleRotationCal {
width: 200 calValid: controller.orientationCalNoseDownSideDone
height: 200 calInProgress: controller.orientationCalNoseDownSideInProgress
calValid: controller.accelCalNoseDownSideDone calInProgressText: controller.calInProgressText
calInProgress: controller.accelCalNoseDownSideInProgress imageSource: "qrc:///qml/VehicleNoseDown.png"
imageSource: "qrc:///qml/VehicleNoseDown.png"
} }
VehicleRotationCal { VehicleRotationCal {
width: 200 calValid: controller.orientationCalTailDownSideDone
height: 200 calInProgress: controller.orientationCalTailDownSideInProgress
calValid: controller.accelCalTailDownSideDone calInProgressText: controller.calInProgressText
calInProgress: controller.accelCalTailDownSideInProgress imageSource: "qrc:///qml/VehicleTailDown.png"
imageSource: "qrc:///qml/VehicleTailDown.png"
} }
VehicleRotationCal { VehicleRotationCal {
width: 200 calValid: controller.orientationCalLeftSideDone
height: 200 calInProgress: controller.orientationCalLeftSideInProgress
calValid: controller.accelCalLeftSideDone calInProgressText: controller.calInProgressText
calInProgress: controller.accelCalLeftSideInProgress imageSource: "qrc:///qml/VehicleLeft.png"
imageSource: "qrc:///qml/VehicleLeft.png"
} }
VehicleRotationCal { VehicleRotationCal {
width: 200 calValid: controller.orientationCalRightSideDone
height: 200 calInProgress: controller.orientationCalRightSideInProgress
calValid: controller.accelCalRightSideDone calInProgressText: controller.calInProgressText
calInProgress: controller.accelCalRightSideInProgress imageSource: "qrc:///qml/VehicleRight.png"
imageSource: "qrc:///qml/VehicleRight.png"
} }
} }
} }
......
...@@ -56,23 +56,25 @@ public: ...@@ -56,23 +56,25 @@ public:
Q_PROPERTY(bool showCompass2 MEMBER _showCompass2 CONSTANT) Q_PROPERTY(bool showCompass2 MEMBER _showCompass2 CONSTANT)
Q_PROPERTY(bool showGyroCalArea MEMBER _showGyroCalArea NOTIFY showGyroCalAreaChanged) Q_PROPERTY(bool showGyroCalArea MEMBER _showGyroCalArea NOTIFY showGyroCalAreaChanged)
Q_PROPERTY(bool showAccelCalArea MEMBER _showAccelCalArea NOTIFY showAccelCalAreaChanged) Q_PROPERTY(bool showOrientationCalArea MEMBER _showOrientationCalArea NOTIFY showOrientationCalAreaChanged)
Q_PROPERTY(bool gyroCalInProgress MEMBER _gyroCalInProgress NOTIFY gyroCalInProgressChanged) Q_PROPERTY(bool gyroCalInProgress MEMBER _gyroCalInProgress NOTIFY gyroCalInProgressChanged)
Q_PROPERTY(bool accelCalDownSideDone MEMBER _accelCalDownSideDone NOTIFY accelCalSidesDoneChanged) Q_PROPERTY(QString calInProgressText MEMBER _calInProgressText NOTIFY calInProgressTextChanged)
Q_PROPERTY(bool accelCalUpsideDownSideDone MEMBER _accelCalUpsideDownSideDone NOTIFY accelCalSidesDoneChanged)
Q_PROPERTY(bool accelCalLeftSideDone MEMBER _accelCalLeftSideDone NOTIFY accelCalSidesDoneChanged)
Q_PROPERTY(bool accelCalRightSideDone MEMBER _accelCalRightSideDone NOTIFY accelCalSidesDoneChanged)
Q_PROPERTY(bool accelCalNoseDownSideDone MEMBER _accelCalNoseDownSideDone NOTIFY accelCalSidesDoneChanged)
Q_PROPERTY(bool accelCalTailDownSideDone MEMBER _accelCalTailDownSideDone NOTIFY accelCalSidesDoneChanged)
Q_PROPERTY(bool accelCalDownSideInProgress MEMBER _accelCalDownSideInProgress NOTIFY accelCalSidesInProgressChanged) Q_PROPERTY(bool orientationCalDownSideDone MEMBER _orientationCalDownSideDone NOTIFY orientationCalSidesDoneChanged)
Q_PROPERTY(bool accelCalUpsideDownSideInProgress MEMBER _accelCalUpsideDownSideInProgress NOTIFY accelCalSidesInProgressChanged) Q_PROPERTY(bool orientationCalUpsideDownSideDone MEMBER _orientationCalUpsideDownSideDone NOTIFY orientationCalSidesDoneChanged)
Q_PROPERTY(bool accelCalLeftSideInProgress MEMBER _accelCalLeftSideInProgress NOTIFY accelCalSidesInProgressChanged) Q_PROPERTY(bool orientationCalLeftSideDone MEMBER _orientationCalLeftSideDone NOTIFY orientationCalSidesDoneChanged)
Q_PROPERTY(bool accelCalRightSideInProgress MEMBER _accelCalRightSideInProgress NOTIFY accelCalSidesInProgressChanged) Q_PROPERTY(bool orientationCalRightSideDone MEMBER _orientationCalRightSideDone NOTIFY orientationCalSidesDoneChanged)
Q_PROPERTY(bool accelCalNoseDownSideInProgress MEMBER _accelCalNoseDownSideInProgress NOTIFY accelCalSidesInProgressChanged) Q_PROPERTY(bool orientationCalNoseDownSideDone MEMBER _orientationCalNoseDownSideDone NOTIFY orientationCalSidesDoneChanged)
Q_PROPERTY(bool accelCalTailDownSideInProgress MEMBER _accelCalTailDownSideInProgress NOTIFY accelCalSidesInProgressChanged) Q_PROPERTY(bool orientationCalTailDownSideDone MEMBER _orientationCalTailDownSideDone NOTIFY orientationCalSidesDoneChanged)
Q_PROPERTY(bool orientationCalDownSideInProgress MEMBER _orientationCalDownSideInProgress NOTIFY orientationCalSidesInProgressChanged)
Q_PROPERTY(bool orientationCalUpsideDownSideInProgress MEMBER _orientationCalUpsideDownSideInProgress NOTIFY orientationCalSidesInProgressChanged)
Q_PROPERTY(bool orientationCalLeftSideInProgress MEMBER _orientationCalLeftSideInProgress NOTIFY orientationCalSidesInProgressChanged)
Q_PROPERTY(bool orientationCalRightSideInProgress MEMBER _orientationCalRightSideInProgress NOTIFY orientationCalSidesInProgressChanged)
Q_PROPERTY(bool orientationCalNoseDownSideInProgress MEMBER _orientationCalNoseDownSideInProgress NOTIFY orientationCalSidesInProgressChanged)
Q_PROPERTY(bool orientationCalTailDownSideInProgress MEMBER _orientationCalTailDownSideInProgress NOTIFY orientationCalSidesInProgressChanged)
Q_INVOKABLE void calibrateCompass(void); Q_INVOKABLE void calibrateCompass(void);
Q_INVOKABLE void calibrateGyro(void); Q_INVOKABLE void calibrateGyro(void);
...@@ -83,10 +85,11 @@ public: ...@@ -83,10 +85,11 @@ public:
signals: signals:
void showGyroCalAreaChanged(void); void showGyroCalAreaChanged(void);
void showAccelCalAreaChanged(void); void showOrientationCalAreaChanged(void);
void gyroCalInProgressChanged(void); void gyroCalInProgressChanged(void);
void accelCalSidesDoneChanged(void); void orientationCalSidesDoneChanged(void);
void accelCalSidesInProgressChanged(void); void orientationCalSidesInProgressChanged(void);
void calInProgressTextChanged(const QString& newText);
private slots: private slots:
void _handleUASTextMessage(int uasId, int compId, int severity, QString text); void _handleUASTextMessage(int uasId, int compId, int severity, QString text);
...@@ -101,8 +104,10 @@ private: ...@@ -101,8 +104,10 @@ private:
void _updateAndEmitGyroCalInProgress(bool inProgress); void _updateAndEmitGyroCalInProgress(bool inProgress);
void _updateAndEmitCalInProgressText(const QString& text);
void _updateAndEmitShowGyroCalArea(bool show); void _updateAndEmitShowGyroCalArea(bool show);
void _updateAndEmitShowAccelCalArea(bool show); void _updateAndEmitShowOrientationCalArea(bool show);
QQuickItem* _statusLog; QQuickItem* _statusLog;
QQuickItem* _progressBar; QQuickItem* _progressBar;
...@@ -112,27 +117,31 @@ private: ...@@ -112,27 +117,31 @@ private:
QQuickItem* _airspeedButton; QQuickItem* _airspeedButton;
bool _showGyroCalArea; bool _showGyroCalArea;
bool _showAccelCalArea; bool _showOrientationCalArea;
bool _showCompass0; bool _showCompass0;
bool _showCompass1; bool _showCompass1;
bool _showCompass2; bool _showCompass2;
bool _gyroCalInProgress; bool _gyroCalInProgress;
bool _magCalInProgress;
bool _accelCalDownSideDone; bool _accelCalInProgress;
bool _accelCalUpsideDownSideDone;
bool _accelCalLeftSideDone; QString _calInProgressText;
bool _accelCalRightSideDone;
bool _accelCalNoseDownSideDone; bool _orientationCalDownSideDone;
bool _accelCalTailDownSideDone; bool _orientationCalUpsideDownSideDone;
bool _orientationCalLeftSideDone;
bool _accelCalDownSideInProgress; bool _orientationCalRightSideDone;
bool _accelCalUpsideDownSideInProgress; bool _orientationCalNoseDownSideDone;
bool _accelCalLeftSideInProgress; bool _orientationCalTailDownSideDone;
bool _accelCalRightSideInProgress;
bool _accelCalNoseDownSideInProgress; bool _orientationCalDownSideInProgress;
bool _accelCalTailDownSideInProgress; bool _orientationCalUpsideDownSideInProgress;
bool _orientationCalLeftSideInProgress;
bool _orientationCalRightSideInProgress;
bool _orientationCalNoseDownSideInProgress;
bool _orientationCalTailDownSideInProgress;
bool _textLoggingStarted; bool _textLoggingStarted;
......
...@@ -29,25 +29,28 @@ import QGroundControl.Palette 1.0 ...@@ -29,25 +29,28 @@ import QGroundControl.Palette 1.0
import QGroundControl.ScreenTools 1.0 import QGroundControl.ScreenTools 1.0
Rectangle { Rectangle {
property var __qgcPal: QGCPalette { colorGroupEnabled: enabled }
property ScreenTools __screenTools: ScreenTools { }
// Indicates whether calibration is valid for this control // Indicates whether calibration is valid for this control
property bool calValid: false property bool calValid: false
// Indicates whether the control is currently being calibrated // Indicates whether the control is currently being calibrated
property bool calInProgress: false property bool calInProgress: false
// Text to show while calibration is in progress
property string calInProgressText: "Hold Still"
// Image source // Image source
property var imageSource: "" property var imageSource: ""
property var __qgcPal: QGCPalette { colorGroupEnabled: enabled }
property ScreenTools __screenTools: ScreenTools { }
width: 200 width: 200
height: 200 height: 200
color: calInProgress ? "yellow" : (calValid ? "green" : "red") color: calInProgress ? "yellow" : (calValid ? "green" : "red")
Rectangle { Rectangle {
readonly property int inset: 5 readonly property int inset: 5
property string calText: calInProgress ? "Hold Still" : (calValid ? "Completed" : "Incomplete") property string calText: calInProgress ? calInProgressText : (calValid ? "Completed" : "Incomplete")
x: inset x: inset
y: inset y: inset
......
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