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
71a4352e
Commit
71a4352e
authored
Jun 25, 2015
by
Lorenz Meier
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1679 from DonLakeFlyer/MagCal2
Change mag cal to 6 orientations
parents
42375dec
dccb2cbc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
5 deletions
+30
-5
SensorsComponent.qml
src/AutoPilotPlugins/PX4/SensorsComponent.qml
+3
-3
SensorsComponentController.cc
src/AutoPilotPlugins/PX4/SensorsComponentController.cc
+19
-2
SensorsComponentController.h
src/AutoPilotPlugins/PX4/SensorsComponentController.h
+8
-0
No files found.
src/AutoPilotPlugins/PX4/SensorsComponent.qml
View file @
71a4352e
...
...
@@ -436,7 +436,7 @@ QGCView {
visible
:
controller
.
orientationCalUpsideDownSideVisible
calValid
:
controller
.
orientationCalUpsideDownSideDone
calInProgress
:
controller
.
orientationCalUpsideDownSideInProgress
calInProgressText
:
"
Hold Still
"
calInProgressText
:
controller
.
orientationCalUpsideDownSideRotate
?
"
Rotate
"
:
"
Hold Still
"
imageSource
:
"
qrc:///qmlimages/VehicleUpsideDown.png
"
}
VehicleRotationCal
{
...
...
@@ -450,7 +450,7 @@ QGCView {
visible
:
controller
.
orientationCalTailDownSideVisible
calValid
:
controller
.
orientationCalTailDownSideDone
calInProgress
:
controller
.
orientationCalTailDownSideInProgress
calInProgressText
:
"
Hold Still
"
calInProgressText
:
controller
.
orientationCalTailDownSideRotate
?
"
Rotate
"
:
"
Hold Still
"
imageSource
:
"
qrc:///qmlimages/VehicleTailDown.png
"
}
VehicleRotationCal
{
...
...
@@ -464,7 +464,7 @@ QGCView {
visible
:
controller
.
orientationCalRightSideVisible
calValid
:
controller
.
orientationCalRightSideDone
calInProgress
:
controller
.
orientationCalRightSideInProgress
calInProgressText
:
"
Hold Still
"
calInProgressText
:
controller
.
orientationCalRightSideRotate
?
"
Rotate
"
:
"
Hold Still
"
imageSource
:
"
qrc:///qmlimages/VehicleRight.png
"
}
}
...
...
src/AutoPilotPlugins/PX4/SensorsComponentController.cc
View file @
71a4352e
...
...
@@ -64,8 +64,11 @@ SensorsComponentController::SensorsComponentController(void) :
_orientationCalNoseDownSideInProgress
(
false
),
_orientationCalTailDownSideInProgress
(
false
),
_orientationCalDownSideRotate
(
false
),
_orientationCalUpsideDownSideRotate
(
false
),
_orientationCalLeftSideRotate
(
false
),
_orientationCalRightSideRotate
(
false
),
_orientationCalNoseDownSideRotate
(
false
),
_orientationCalTailDownSideRotate
(
false
),
_unknownFirmwareVersion
(
false
),
_waitingForCancel
(
false
)
{
...
...
@@ -242,9 +245,11 @@ void SensorsComponentController::_handleUASTextMessage(int uasId, int compId, in
// Split version number and cal type
QStringList
parts
=
text
.
split
(
" "
);
if
(
parts
.
count
()
!=
2
&&
parts
[
0
].
toInt
()
!=
1
)
{
if
(
parts
.
count
()
!=
2
&&
parts
[
0
].
toInt
()
!=
_supportedFirmwareCalVersion
)
{
_unknownFirmwareVersion
=
true
;
qDebug
()
<<
"Unknown cal firmware version, using log"
;
QString
msg
=
"Unsupported calibration firmware version, using log"
;
_appendStatusLog
(
msg
);
qDebug
()
<<
msg
;
return
;
}
...
...
@@ -287,7 +292,10 @@ void SensorsComponentController::_handleUASTextMessage(int uasId, int compId, in
}
else
if
(
text
==
"mag"
)
{
_magCalInProgress
=
true
;
_orientationCalDownSideVisible
=
true
;
_orientationCalUpsideDownSideVisible
=
true
;
_orientationCalLeftSideVisible
=
true
;
_orientationCalRightSideVisible
=
true
;
_orientationCalTailDownSideVisible
=
true
;
_orientationCalNoseDownSideVisible
=
true
;
}
else
if
(
text
==
"gyro"
)
{
_gyroCalInProgress
=
true
;
...
...
@@ -314,6 +322,9 @@ void SensorsComponentController::_handleUASTextMessage(int uasId, int compId, in
}
}
else
if
(
side
==
"up"
)
{
_orientationCalUpsideDownSideInProgress
=
true
;
if
(
_magCalInProgress
)
{
_orientationCalUpsideDownSideRotate
=
true
;
}
}
else
if
(
side
==
"left"
)
{
_orientationCalLeftSideInProgress
=
true
;
if
(
_magCalInProgress
)
{
...
...
@@ -321,6 +332,9 @@ void SensorsComponentController::_handleUASTextMessage(int uasId, int compId, in
}
}
else
if
(
side
==
"right"
)
{
_orientationCalRightSideInProgress
=
true
;
if
(
_magCalInProgress
)
{
_orientationCalRightSideRotate
=
true
;
}
}
else
if
(
side
==
"front"
)
{
_orientationCalNoseDownSideInProgress
=
true
;
if
(
_magCalInProgress
)
{
...
...
@@ -328,6 +342,9 @@ void SensorsComponentController::_handleUASTextMessage(int uasId, int compId, in
}
}
else
if
(
side
==
"back"
)
{
_orientationCalTailDownSideInProgress
=
true
;
if
(
_magCalInProgress
)
{
_orientationCalTailDownSideRotate
=
true
;
}
}
if
(
_magCalInProgress
)
{
...
...
src/AutoPilotPlugins/PX4/SensorsComponentController.h
View file @
71a4352e
...
...
@@ -78,8 +78,11 @@ public:
Q_PROPERTY
(
bool
orientationCalTailDownSideInProgress
MEMBER
_orientationCalTailDownSideInProgress
NOTIFY
orientationCalSidesInProgressChanged
)
Q_PROPERTY
(
bool
orientationCalDownSideRotate
MEMBER
_orientationCalDownSideRotate
NOTIFY
orientationCalSidesRotateChanged
)
Q_PROPERTY
(
bool
orientationCalUpsideDownSideRotate
MEMBER
_orientationCalUpsideDownSideRotate
NOTIFY
orientationCalSidesRotateChanged
)
Q_PROPERTY
(
bool
orientationCalLeftSideRotate
MEMBER
_orientationCalLeftSideRotate
NOTIFY
orientationCalSidesRotateChanged
)
Q_PROPERTY
(
bool
orientationCalRightSideRotate
MEMBER
_orientationCalRightSideRotate
NOTIFY
orientationCalSidesRotateChanged
)
Q_PROPERTY
(
bool
orientationCalNoseDownSideRotate
MEMBER
_orientationCalNoseDownSideRotate
NOTIFY
orientationCalSidesRotateChanged
)
Q_PROPERTY
(
bool
orientationCalTailDownSideRotate
MEMBER
_orientationCalTailDownSideRotate
NOTIFY
orientationCalSidesRotateChanged
)
Q_PROPERTY
(
bool
waitingForCancel
MEMBER
_waitingForCancel
NOTIFY
waitingForCancelChanged
)
...
...
@@ -161,11 +164,16 @@ private:
bool
_orientationCalTailDownSideInProgress
;
bool
_orientationCalDownSideRotate
;
bool
_orientationCalUpsideDownSideRotate
;
bool
_orientationCalLeftSideRotate
;
bool
_orientationCalRightSideRotate
;
bool
_orientationCalNoseDownSideRotate
;
bool
_orientationCalTailDownSideRotate
;
bool
_unknownFirmwareVersion
;
bool
_waitingForCancel
;
static
const
int
_supportedFirmwareCalVersion
=
2
;
};
#endif
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