Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
14a59a98
Commit
14a59a98
authored
Apr 03, 2015
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mag Cal UI
parent
a2e9481b
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
180 additions
and
140 deletions
+180
-140
SensorsComponent.qml
src/AutoPilotPlugins/PX4/SensorsComponent.qml
+26
-34
SensorsComponentController.cc
src/AutoPilotPlugins/PX4/SensorsComponentController.cc
+106
-70
SensorsComponentController.h
src/AutoPilotPlugins/PX4/SensorsComponentController.h
+41
-32
VehicleRotationCal.qml
src/QmlControls/VehicleRotationCal.qml
+7
-4
No files found.
src/AutoPilotPlugins/PX4/SensorsComponent.qml
View file @
14a59a98
...
...
@@ -195,8 +195,6 @@ Rectangle {
}
VehicleRotationCal
{
width
:
200
height
:
200
calValid
:
true
calInProgress
:
controller
.
gyroCalInProgress
imageSource
:
"
qrc:///qml/VehicleDown.png
"
...
...
@@ -206,10 +204,10 @@ Rectangle {
}
Rectangle
{
id
:
accel
CalArea
id
:
orientation
CalArea
width
:
parent
.
calDisplayAreaWidth
height
:
parent
.
height
visible
:
controller
.
show
Accel
CalArea
visible
:
controller
.
show
Orientation
CalArea
color
:
qgcPal
.
windowShade
QGCLabel
{
...
...
@@ -227,46 +225,40 @@ Rectangle {
spacing
:
5
VehicleRotationCal
{
width
:
200
height
:
200
calValid
:
controller
.
accelCalDownSideDone
calInProgress
:
controller
.
accelCalDownSideInProgress
imageSource
:
"
qrc:///qml/VehicleDown.png
"
calValid
:
controller
.
orientationCalDownSideDone
calInProgress
:
controller
.
orientationCalDownSideInProgress
calInProgressText
:
controller
.
calInProgressText
imageSource
:
"
qrc:///qml/VehicleDown.png
"
}
VehicleRotationCal
{
width
:
200
height
:
200
calValid
:
controller
.
accelCalUpsideDownSideDone
calInProgress
:
controller
.
accelCalUpsideDownSideInProgress
imageSource
:
"
qrc:///qml/VehicleUpsideDown.png
"
calValid
:
controller
.
orientationCalUpsideDownSideDone
calInProgress
:
controller
.
orientationCalUpsideDownSideInProgress
calInProgressText
:
controller
.
calInProgressText
imageSource
:
"
qrc:///qml/VehicleUpsideDown.png
"
}
VehicleRotationCal
{
width
:
200
height
:
200
calValid
:
controller
.
accelCalNoseDownSideDone
calInProgress
:
controller
.
accelCalNoseDownSideInProgress
imageSource
:
"
qrc:///qml/VehicleNoseDown.png
"
calValid
:
controller
.
orientationCalNoseDownSideDone
calInProgress
:
controller
.
orientationCalNoseDownSideInProgress
calInProgressText
:
controller
.
calInProgressText
imageSource
:
"
qrc:///qml/VehicleNoseDown.png
"
}
VehicleRotationCal
{
width
:
200
height
:
200
calValid
:
controller
.
accelCalTailDownSideDone
calInProgress
:
controller
.
accelCalTailDownSideInProgress
imageSource
:
"
qrc:///qml/VehicleTailDown.png
"
calValid
:
controller
.
orientationCalTailDownSideDone
calInProgress
:
controller
.
orientationCalTailDownSideInProgress
calInProgressText
:
controller
.
calInProgressText
imageSource
:
"
qrc:///qml/VehicleTailDown.png
"
}
VehicleRotationCal
{
width
:
200
height
:
200
calValid
:
controller
.
accelCalLeftSideDone
calInProgress
:
controller
.
accelCalLeftSideInProgress
imageSource
:
"
qrc:///qml/VehicleLeft.png
"
calValid
:
controller
.
orientationCalLeftSideDone
calInProgress
:
controller
.
orientationCalLeftSideInProgress
calInProgressText
:
controller
.
calInProgressText
imageSource
:
"
qrc:///qml/VehicleLeft.png
"
}
VehicleRotationCal
{
width
:
200
height
:
200
calValid
:
controller
.
accelCalRightSideDone
calInProgress
:
controller
.
accelCalRightSideInProgress
imageSource
:
"
qrc:///qml/VehicleRight.png
"
calValid
:
controller
.
orientationCalRightSideDone
calInProgress
:
controller
.
orientationCalRightSideInProgress
calInProgressText
:
controller
.
calInProgressText
imageSource
:
"
qrc:///qml/VehicleRight.png
"
}
}
}
...
...
src/AutoPilotPlugins/PX4/SensorsComponentController.cc
View file @
14a59a98
This diff is collapsed.
Click to expand it.
src/AutoPilotPlugins/PX4/SensorsComponentController.h
View file @
14a59a98
...
...
@@ -56,23 +56,25 @@ public:
Q_PROPERTY
(
bool
showCompass2
MEMBER
_showCompass2
CONSTANT
)
Q_PROPERTY
(
bool
showGyroCalArea
MEMBER
_showGyroCalArea
NOTIFY
showGyroCalAreaChanged
)
Q_PROPERTY
(
bool
show
AccelCalArea
MEMBER
_showAccelCalArea
NOTIFY
showAccel
CalAreaChanged
)
Q_PROPERTY
(
bool
show
OrientationCalArea
MEMBER
_showOrientationCalArea
NOTIFY
showOrientation
CalAreaChanged
)
Q_PROPERTY
(
bool
gyroCalInProgress
MEMBER
_gyroCalInProgress
NOTIFY
gyroCalInProgressChanged
)
Q_PROPERTY
(
bool
accelCalDownSideDone
MEMBER
_accelCalDownSideDone
NOTIFY
accelCalSidesDoneChanged
)
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
(
QString
calInProgressText
MEMBER
_calInProgressText
NOTIFY
calInProgressTextChanged
)
Q_PROPERTY
(
bool
accelCalDownSideInProgress
MEMBER
_accelCalDownSideInProgress
NOTIFY
accelCalSidesInProgressChanged
)
Q_PROPERTY
(
bool
accelCalUpsideDownSideInProgress
MEMBER
_accelCalUpsideDownSideInProgress
NOTIFY
accelCalSidesInProgressChanged
)
Q_PROPERTY
(
bool
accelCalLeftSideInProgress
MEMBER
_accelCalLeftSideInProgress
NOTIFY
accelCalSidesInProgressChanged
)
Q_PROPERTY
(
bool
accelCalRightSideInProgress
MEMBER
_accelCalRightSideInProgress
NOTIFY
accelCalSidesInProgressChanged
)
Q_PROPERTY
(
bool
accelCalNoseDownSideInProgress
MEMBER
_accelCalNoseDownSideInProgress
NOTIFY
accelCalSidesInProgressChanged
)
Q_PROPERTY
(
bool
accelCalTailDownSideInProgress
MEMBER
_accelCalTailDownSideInProgress
NOTIFY
accelCalSidesInProgressChanged
)
Q_PROPERTY
(
bool
orientationCalDownSideDone
MEMBER
_orientationCalDownSideDone
NOTIFY
orientationCalSidesDoneChanged
)
Q_PROPERTY
(
bool
orientationCalUpsideDownSideDone
MEMBER
_orientationCalUpsideDownSideDone
NOTIFY
orientationCalSidesDoneChanged
)
Q_PROPERTY
(
bool
orientationCalLeftSideDone
MEMBER
_orientationCalLeftSideDone
NOTIFY
orientationCalSidesDoneChanged
)
Q_PROPERTY
(
bool
orientationCalRightSideDone
MEMBER
_orientationCalRightSideDone
NOTIFY
orientationCalSidesDoneChanged
)
Q_PROPERTY
(
bool
orientationCalNoseDownSideDone
MEMBER
_orientationCalNoseDownSideDone
NOTIFY
orientationCalSidesDoneChanged
)
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
calibrateGyro
(
void
);
...
...
@@ -83,10 +85,11 @@ public:
signals:
void
showGyroCalAreaChanged
(
void
);
void
show
Accel
CalAreaChanged
(
void
);
void
show
Orientation
CalAreaChanged
(
void
);
void
gyroCalInProgressChanged
(
void
);
void
accelCalSidesDoneChanged
(
void
);
void
accelCalSidesInProgressChanged
(
void
);
void
orientationCalSidesDoneChanged
(
void
);
void
orientationCalSidesInProgressChanged
(
void
);
void
calInProgressTextChanged
(
const
QString
&
newText
);
private
slots
:
void
_handleUASTextMessage
(
int
uasId
,
int
compId
,
int
severity
,
QString
text
);
...
...
@@ -101,8 +104,10 @@ private:
void
_updateAndEmitGyroCalInProgress
(
bool
inProgress
);
void
_updateAndEmitCalInProgressText
(
const
QString
&
text
);
void
_updateAndEmitShowGyroCalArea
(
bool
show
);
void
_updateAndEmitShow
Accel
CalArea
(
bool
show
);
void
_updateAndEmitShow
Orientation
CalArea
(
bool
show
);
QQuickItem
*
_statusLog
;
QQuickItem
*
_progressBar
;
...
...
@@ -112,27 +117,31 @@ private:
QQuickItem
*
_airspeedButton
;
bool
_showGyroCalArea
;
bool
_show
Accel
CalArea
;
bool
_show
Orientation
CalArea
;
bool
_showCompass0
;
bool
_showCompass1
;
bool
_showCompass2
;
bool
_gyroCalInProgress
;
bool
_accelCalDownSideDone
;
bool
_accelCalUpsideDownSideDone
;
bool
_accelCalLeftSideDone
;
bool
_accelCalRightSideDone
;
bool
_accelCalNoseDownSideDone
;
bool
_accelCalTailDownSideDone
;
bool
_accelCalDownSideInProgress
;
bool
_accelCalUpsideDownSideInProgress
;
bool
_accelCalLeftSideInProgress
;
bool
_accelCalRightSideInProgress
;
bool
_accelCalNoseDownSideInProgress
;
bool
_accelCalTailDownSideInProgress
;
bool
_magCalInProgress
;
bool
_accelCalInProgress
;
QString
_calInProgressText
;
bool
_orientationCalDownSideDone
;
bool
_orientationCalUpsideDownSideDone
;
bool
_orientationCalLeftSideDone
;
bool
_orientationCalRightSideDone
;
bool
_orientationCalNoseDownSideDone
;
bool
_orientationCalTailDownSideDone
;
bool
_orientationCalDownSideInProgress
;
bool
_orientationCalUpsideDownSideInProgress
;
bool
_orientationCalLeftSideInProgress
;
bool
_orientationCalRightSideInProgress
;
bool
_orientationCalNoseDownSideInProgress
;
bool
_orientationCalTailDownSideInProgress
;
bool
_textLoggingStarted
;
...
...
src/QmlControls/VehicleRotationCal.qml
View file @
14a59a98
...
...
@@ -29,25 +29,28 @@ import QGroundControl.Palette 1.0
import
QGroundControl
.
ScreenTools
1.0
Rectangle
{
property
var
__qgcPal
:
QGCPalette
{
colorGroupEnabled
:
enabled
}
property
ScreenTools
__screenTools
:
ScreenTools
{
}
// Indicates whether calibration is valid for this control
property
bool
calValid
:
false
// Indicates whether the control is currently being calibrated
property
bool
calInProgress
:
false
// Text to show while calibration is in progress
property
string
calInProgressText
:
"
Hold Still
"
// Image source
property
var
imageSource
:
""
property
var
__qgcPal
:
QGCPalette
{
colorGroupEnabled
:
enabled
}
property
ScreenTools
__screenTools
:
ScreenTools
{
}
width
:
200
height
:
200
color
:
calInProgress
?
"
yellow
"
:
(
calValid
?
"
green
"
:
"
red
"
)
Rectangle
{
readonly
property
int
inset
:
5
property
string
calText
:
calInProgress
?
"
Hold Still
"
:
(
calValid
?
"
Completed
"
:
"
Incomplete
"
)
property
string
calText
:
calInProgress
?
calInProgressText
:
(
calValid
?
"
Completed
"
:
"
Incomplete
"
)
x
:
inset
y
:
inset
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment