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
5a79d777
Unverified
Commit
5a79d777
authored
May 02, 2018
by
Don Gagne
Committed by
GitHub
May 02, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6406 from DonLakeFlyer/SensorCalLog
Don't clear results for airspeed/level calibration
parents
bc17fe15
0556fad5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
72 additions
and
49 deletions
+72
-49
SensorsComponentController.cc
src/AutoPilotPlugins/PX4/SensorsComponentController.cc
+50
-45
SensorsComponentController.h
src/AutoPilotPlugins/PX4/SensorsComponentController.h
+3
-1
SensorsSetup.qml
src/AutoPilotPlugins/PX4/SensorsSetup.qml
+19
-3
No files found.
src/AutoPilotPlugins/PX4/SensorsComponentController.cc
View file @
5a79d777
...
...
@@ -7,10 +7,6 @@
*
****************************************************************************/
/// @file
/// @author Don Gagne <don@thegagnes.com>
#include "SensorsComponentController.h"
#include "QGCMAVLink.h"
#include "UAS.h"
...
...
@@ -22,46 +18,48 @@
QGC_LOGGING_CATEGORY
(
SensorsComponentControllerLog
,
"SensorsComponentControllerLog"
)
SensorsComponentController
::
SensorsComponentController
(
void
)
:
_statusLog
(
NULL
),
_progressBar
(
NULL
),
_compassButton
(
NULL
),
_gyroButton
(
NULL
),
_accelButton
(
NULL
),
_airspeedButton
(
NULL
),
_levelButton
(
NULL
),
_cancelButton
(
NULL
),
_setOrientationsButton
(
NULL
),
_showOrientationCalArea
(
false
),
_gyroCalInProgress
(
false
),
_magCalInProgress
(
false
),
_accelCalInProgress
(
false
),
_orientationCalDownSideDone
(
false
),
_orientationCalUpsideDownSideDone
(
false
),
_orientationCalLeftSideDone
(
false
),
_orientationCalRightSideDone
(
false
),
_orientationCalNoseDownSideDone
(
false
),
_orientationCalTailDownSideDone
(
false
),
_orientationCalDownSideVisible
(
false
),
_orientationCalUpsideDownSideVisible
(
false
),
_orientationCalLeftSideVisible
(
false
),
_orientationCalRightSideVisible
(
false
),
_orientationCalNoseDownSideVisible
(
false
),
_orientationCalTailDownSideVisible
(
false
),
_orientationCalDownSideInProgress
(
false
),
_orientationCalUpsideDownSideInProgress
(
false
),
_orientationCalLeftSideInProgress
(
false
),
_orientationCalRightSideInProgress
(
false
),
_orientationCalNoseDownSideInProgress
(
false
),
_orientationCalTailDownSideInProgress
(
false
),
_orientationCalDownSideRotate
(
false
),
_orientationCalUpsideDownSideRotate
(
false
),
_orientationCalLeftSideRotate
(
false
),
_orientationCalRightSideRotate
(
false
),
_orientationCalNoseDownSideRotate
(
false
),
_orientationCalTailDownSideRotate
(
false
),
_unknownFirmwareVersion
(
false
),
_waitingForCancel
(
false
)
SensorsComponentController
::
SensorsComponentController
(
void
)
:
_statusLog
(
NULL
)
,
_progressBar
(
NULL
)
,
_compassButton
(
NULL
)
,
_gyroButton
(
NULL
)
,
_accelButton
(
NULL
)
,
_airspeedButton
(
NULL
)
,
_levelButton
(
NULL
)
,
_cancelButton
(
NULL
)
,
_setOrientationsButton
(
NULL
)
,
_showOrientationCalArea
(
false
)
,
_gyroCalInProgress
(
false
)
,
_magCalInProgress
(
false
)
,
_accelCalInProgress
(
false
)
,
_airspeedCalInProgress
(
false
)
,
_levelCalInProgress
(
false
)
,
_orientationCalDownSideDone
(
false
)
,
_orientationCalUpsideDownSideDone
(
false
)
,
_orientationCalLeftSideDone
(
false
)
,
_orientationCalRightSideDone
(
false
)
,
_orientationCalNoseDownSideDone
(
false
)
,
_orientationCalTailDownSideDone
(
false
)
,
_orientationCalDownSideVisible
(
false
)
,
_orientationCalUpsideDownSideVisible
(
false
)
,
_orientationCalLeftSideVisible
(
false
)
,
_orientationCalRightSideVisible
(
false
)
,
_orientationCalNoseDownSideVisible
(
false
)
,
_orientationCalTailDownSideVisible
(
false
)
,
_orientationCalDownSideInProgress
(
false
)
,
_orientationCalUpsideDownSideInProgress
(
false
)
,
_orientationCalLeftSideInProgress
(
false
)
,
_orientationCalRightSideInProgress
(
false
)
,
_orientationCalNoseDownSideInProgress
(
false
)
,
_orientationCalTailDownSideInProgress
(
false
)
,
_orientationCalDownSideRotate
(
false
)
,
_orientationCalUpsideDownSideRotate
(
false
)
,
_orientationCalLeftSideRotate
(
false
)
,
_orientationCalRightSideRotate
(
false
)
,
_orientationCalNoseDownSideRotate
(
false
)
,
_orientationCalTailDownSideRotate
(
false
)
,
_unknownFirmwareVersion
(
false
)
,
_waitingForCancel
(
false
)
{
}
...
...
@@ -165,7 +163,9 @@ void SensorsComponentController::_stopCalibration(SensorsComponentController::St
switch
(
code
)
{
case
StopCalibrationSuccess
:
_orientationCalAreaHelpText
->
setProperty
(
"text"
,
tr
(
"Calibration complete"
));
emit
resetStatusTextArea
();
if
(
!
_airspeedCalInProgress
&&
!
_levelCalInProgress
)
{
emit
resetStatusTextArea
();
}
if
(
_magCalInProgress
)
{
emit
setCompassRotations
();
}
...
...
@@ -186,6 +186,7 @@ void SensorsComponentController::_stopCalibration(SensorsComponentController::St
_magCalInProgress
=
false
;
_accelCalInProgress
=
false
;
_gyroCalInProgress
=
false
;
_airspeedCalInProgress
=
false
;
}
void
SensorsComponentController
::
calibrateGyro
(
void
)
...
...
@@ -336,6 +337,10 @@ void SensorsComponentController::_handleUASTextMessage(int uasId, int compId, in
emit
orientationCalSidesVisibleChanged
();
emit
orientationCalSidesInProgressChanged
();
_updateAndEmitShowOrientationCalArea
(
true
);
}
else
if
(
text
==
"airspeed"
)
{
_airspeedCalInProgress
=
true
;
}
else
if
(
text
==
"level"
)
{
_levelCalInProgress
=
true
;
}
return
;
}
...
...
src/AutoPilotPlugins/PX4/SensorsComponentController.h
View file @
5a79d777
...
...
@@ -131,7 +131,9 @@ private:
bool
_gyroCalInProgress
;
bool
_magCalInProgress
;
bool
_accelCalInProgress
;
bool
_airspeedCalInProgress
;
bool
_levelCalInProgress
;
bool
_orientationCalDownSideDone
;
bool
_orientationCalUpsideDownSideDone
;
bool
_orientationCalLeftSideDone
;
...
...
src/AutoPilotPlugins/PX4/SensorsSetup.qml
View file @
5a79d777
...
...
@@ -140,9 +140,7 @@ Item {
onWaitingForCancelChanged
:
{
if
(
controller
.
waitingForCancel
)
{
showMessage
(
qsTr
(
"
Calibration Cancel
"
),
qsTr
(
"
Waiting for Vehicle to response to Cancel. This may take a few seconds.
"
),
0
)
}
else
{
hideDialog
()
showDialog
(
waitForCancelDialogComponent
,
qsTr
(
"
Calibration Cancel
"
),
qgcView
.
showDialogDefaultWidth
,
0
)
}
}
}
...
...
@@ -154,6 +152,24 @@ Item {
}
}
Component
{
id
:
waitForCancelDialogComponent
QGCViewMessage
{
message
:
qsTr
(
"
Waiting for Vehicle to response to Cancel. This may take a few seconds.
"
)
Connections
{
target
:
controller
onWaitingForCancelChanged
:
{
if
(
!
controller
.
waitingForCancel
)
{
hideDialog
()
}
}
}
}
}
Component
{
id
:
preCalibrationDialogComponent
...
...
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