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
d46cdc93
Commit
d46cdc93
authored
Aug 20, 2020
by
DonLakeFlyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parent
9d4088b0
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
126 additions
and
307 deletions
+126
-307
APMSensorsComponent.qml
src/AutoPilotPlugins/APM/APMSensorsComponent.qml
+28
-1
APMSensorsComponentController.cc
src/AutoPilotPlugins/APM/APMSensorsComponentController.cc
+17
-223
APMSensorsComponentController.h
src/AutoPilotPlugins/APM/APMSensorsComponentController.h
+81
-83
No files found.
src/AutoPilotPlugins/APM/APMSensorsComponent.qml
View file @
d46cdc93
...
...
@@ -569,6 +569,26 @@ SetupPage {
}
// QGCViewDialog
}
// Component - calibratePressureDialogComponent
Component
{
id
:
calibrateGyroDialogComponent
QGCViewDialog
{
id
:
calibrateGyroDialog
function
accept
()
{
controller
.
calibrateGyro
()
calibrateGyroDialog
.
hideDialog
()
}
QGCLabel
{
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
wrapMode
:
Text
.
WordWrap
text
:
qsTr
(
"
For Gyroscope calibration you will need to place your vehicle on a surface and leave it still.
\n\n
Click Ok to start calibration.
"
)
}
}
}
QGCFlickable
{
id
:
buttonFlickable
anchors.left
:
parent
.
left
...
...
@@ -621,12 +641,19 @@ SetupPage {
}
}
QGCButton
{
width
:
_buttonWidth
text
:
qsTr
(
"
Gyro
"
)
visible
:
activeVehicle
&&
(
activeVehicle
.
multiRotor
|
activeVehicle
.
rover
)
onClicked
:
mainWindow
.
showComponentDialog
(
calibrateGyroDialogComponent
,
qsTr
(
"
Calibrate Gyro
"
),
mainWindow
.
showDialogDefaultWidth
,
StandardButton
.
Cancel
|
StandardButton
.
Ok
)
}
QGCButton
{
width
:
_buttonWidth
text
:
_calibratePressureText
onClicked
:
mainWindow
.
showComponentDialog
(
calibratePressureDialogComponent
,
_calibratePressureText
,
mainWindow
.
showDialogDefaultWidth
,
StandardButton
.
Cancel
|
StandardButton
.
Ok
)
readonly
property
string
_calibratePressureText
:
activeVehicle
.
fixedWing
?
qsTr
(
"
Cal Baro/Airspeed
"
)
:
qsTr
(
"
Calibrate
Pressure
"
)
readonly
property
string
_calibratePressureText
:
activeVehicle
.
fixedWing
?
qsTr
(
"
Baro/Airspeed
"
)
:
qsTr
(
"
Pressure
"
)
}
QGCButton
{
...
...
src/AutoPilotPlugins/APM/APMSensorsComponentController.cc
View file @
d46cdc93
This diff is collapsed.
Click to expand it.
src/AutoPilotPlugins/APM/APMSensorsComponentController.h
View file @
d46cdc93
...
...
@@ -7,9 +7,7 @@
*
****************************************************************************/
#ifndef APMSensorsComponentController_H
#define APMSensorsComponentController_H
#pragma once
#include <QObject>
...
...
@@ -81,20 +79,22 @@ public:
Q_PROPERTY
(
double
compass2CalFitness
READ
compass2CalFitness
NOTIFY
compass2CalFitnessChanged
)
Q_PROPERTY
(
double
compass3CalFitness
READ
compass3CalFitness
NOTIFY
compass3CalFitnessChanged
)
Q_INVOKABLE
void
calibrateCompass
(
void
);
Q_INVOKABLE
void
calibrateAccel
(
void
);
Q_INVOKABLE
void
calibrateMotorInterference
(
void
);
Q_INVOKABLE
void
levelHorizon
(
void
);
Q_INVOKABLE
void
calibratePressure
(
void
);
Q_INVOKABLE
void
cancelCalibration
(
void
);
Q_INVOKABLE
void
nextClicked
(
void
);
Q_INVOKABLE
bool
usingUDPLink
(
void
);
Q_INVOKABLE
void
calibrateCompass
(
void
);
Q_INVOKABLE
void
calibrateAccel
(
void
);
Q_INVOKABLE
void
calibrateGyro
(
void
);
Q_INVOKABLE
void
calibrateMotorInterference
(
void
);
Q_INVOKABLE
void
levelHorizon
(
void
);
Q_INVOKABLE
void
calibratePressure
(
void
);
Q_INVOKABLE
void
cancelCalibration
(
void
);
Q_INVOKABLE
void
nextClicked
(
void
);
Q_INVOKABLE
bool
usingUDPLink
(
void
);
bool
compassSetupNeeded
(
void
)
const
;
bool
accelSetupNeeded
(
void
)
const
;
bool
compassSetupNeeded
(
void
)
const
;
bool
accelSetupNeeded
(
void
)
const
;
typedef
enum
{
CalTypeAccel
,
CalTypeGyro
,
CalTypeOnboardCompass
,
CalTypeOffboardCompass
,
CalTypeLevelHorizon
,
...
...
@@ -113,40 +113,40 @@ public:
double
compass3CalFitness
(
void
)
const
{
return
_rgCompassCalFitness
[
2
];
}
signals:
void
showGyroCalAreaChanged
(
void
);
void
showOrientationCalAreaChanged
(
void
);
void
orientationCalSidesDoneChanged
(
void
);
void
orientationCalSidesVisibleChanged
(
void
);
void
orientationCalSidesInProgressChanged
(
void
);
void
orientationCalSidesRotateChanged
(
void
);
void
resetStatusTextArea
(
void
);
void
waitingForCancelChanged
(
void
);
void
setupNeededChanged
(
void
);
void
calibrationComplete
(
CalType_t
calType
);
void
compass1CalSucceededChanged
(
bool
compass1CalSucceeded
);
void
compass2CalSucceededChanged
(
bool
compass2CalSucceeded
);
void
compass3CalSucceededChanged
(
bool
compass3CalSucceeded
);
void
compass1CalFitnessChanged
(
double
compass1CalFitness
);
void
compass2CalFitnessChanged
(
double
compass2CalFitness
);
void
compass3CalFitnessChanged
(
double
compass3CalFitness
);
void
setAllCalButtonsEnabled
(
bool
enabled
);
void
showGyroCalAreaChanged
(
void
);
void
showOrientationCalAreaChanged
(
void
);
void
orientationCalSidesDoneChanged
(
void
);
void
orientationCalSidesVisibleChanged
(
void
);
void
orientationCalSidesInProgressChanged
(
void
);
void
orientationCalSidesRotateChanged
(
void
);
void
resetStatusTextArea
(
void
);
void
waitingForCancelChanged
(
void
);
void
setupNeededChanged
(
void
);
void
calibrationComplete
(
CalType_t
calType
);
void
compass1CalSucceededChanged
(
bool
compass1CalSucceeded
);
void
compass2CalSucceededChanged
(
bool
compass2CalSucceeded
);
void
compass3CalSucceededChanged
(
bool
compass3CalSucceeded
);
void
compass1CalFitnessChanged
(
double
compass1CalFitness
);
void
compass2CalFitnessChanged
(
double
compass2CalFitness
);
void
compass3CalFitnessChanged
(
double
compass3CalFitness
);
void
setAllCalButtonsEnabled
(
bool
enabled
);
private
slots
:
void
_handleUASTextMessage
(
int
uasId
,
int
compId
,
int
severity
,
QString
text
);
void
_handleUASTextMessage
(
int
uasId
,
int
compId
,
int
severity
,
QString
text
);
void
_mavlinkMessageReceived
(
LinkInterface
*
link
,
mavlink_message_t
message
);
void
_mavCommandResult
(
int
vehicleId
,
int
component
,
int
command
,
int
result
,
bool
noReponseFromVehicle
);
void
_mavCommandResult
(
int
vehicleId
,
int
component
,
int
command
,
int
result
,
bool
noReponseFromVehicle
);
private:
void
_startLogCalibration
(
void
);
void
_startVisualCalibration
(
void
);
void
_appendStatusLog
(
const
QString
&
text
);
void
_refreshParams
(
void
);
void
_hideAllCalAreas
(
void
);
void
_resetInternalState
(
void
);
void
_handleCommandAck
(
mavlink_message_t
&
message
);
void
_handleMagCalProgress
(
mavlink_message_t
&
message
);
void
_handleMagCalReport
(
mavlink_message_t
&
message
);
void
_restorePreviousCompassCalFitness
(
void
);
void
_startLogCalibration
(
void
);
void
_startVisualCalibration
(
void
);
void
_appendStatusLog
(
const
QString
&
text
);
void
_refreshParams
(
void
);
void
_hideAllCalAreas
(
void
);
void
_resetInternalState
(
void
);
void
_handleCommandAck
(
mavlink_message_t
&
message
);
void
_handleMagCalProgress
(
mavlink_message_t
&
message
);
void
_handleMagCalReport
(
mavlink_message_t
&
message
);
void
_restorePreviousCompassCalFitness
(
void
);
enum
StopCalibrationCode
{
StopCalibrationSuccess
,
...
...
@@ -212,5 +212,3 @@ private:
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