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
baafca2e
Commit
baafca2e
authored
Aug 25, 2013
by
Lorenz Meier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed image paths
parent
18a3503d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
25 deletions
+18
-25
QGCPX4SensorCalibration.cc
src/ui/px4_configuration/QGCPX4SensorCalibration.cc
+10
-10
QGCPX4SensorCalibration.ui
src/ui/px4_configuration/QGCPX4SensorCalibration.ui
+8
-15
No files found.
src/ui/px4_configuration/QGCPX4SensorCalibration.cc
View file @
baafca2e
...
...
@@ -32,7 +32,7 @@ QGCPX4SensorCalibration::QGCPX4SensorCalibration(QWidget *parent) :
ui
->
magButton
->
setEnabled
(
false
);
ui
->
accelButton
->
setEnabled
(
false
);
setInstructionImage
(
"
.
/files/images/px4/calibration/accel_z-.png"
);
setInstructionImage
(
"
:
/files/images/px4/calibration/accel_z-.png"
);
setObjectName
(
"PX4_SENSOR_CALIBRATION"
);
...
...
@@ -111,7 +111,7 @@ void QGCPX4SensorCalibration::handleTextMessage(int uasid, int compId, int sever
if
(
text
.
startsWith
(
"accel meas started: "
))
{
QString
axis
=
text
.
split
(
"meas started: "
).
last
().
right
(
2
);
qDebug
()
<<
"AXIS"
<<
axis
<<
"STR"
<<
text
;
setInstructionImage
(
QString
(
"
.
/files/images/px4/calibration/accel_%1.png"
).
arg
(
axis
));
setInstructionImage
(
QString
(
"
:
/files/images/px4/calibration/accel_%1.png"
).
arg
(
axis
));
}
}
...
...
@@ -128,7 +128,7 @@ void QGCPX4SensorCalibration::handleTextMessage(int uasid, int compId, int sever
accelDone
[
i
]
=
true
;
if
(
!
accelDone
[
i
])
{
setInstructionImage
(
QString
(
"
.
/files/images/px4/calibration/accel_%1.png"
).
arg
(
accelAxes
[
i
]));
setInstructionImage
(
QString
(
"
:
/files/images/px4/calibration/accel_%1.png"
).
arg
(
accelAxes
[
i
]));
ui
->
calibrationExplanationLabel
->
setText
(
tr
(
"Axis %1 completed. Please rotate to a different axis, e.g. the one shown here."
).
arg
(
axis
));
}
}
...
...
@@ -136,27 +136,27 @@ void QGCPX4SensorCalibration::handleTextMessage(int uasid, int compId, int sever
if
(
text
.
contains
(
"please rotate in a figure 8"
))
{
ui
->
calibrationExplanationLabel
->
setText
(
tr
(
"Rotate the system around all its axes, e.g. in a figure eight."
));
setInstructionImage
(
"
.
/files/images/px4/calibration/mag_calibration_figure8.png"
);
setInstructionImage
(
"
:
/files/images/px4/calibration/mag_calibration_figure8.png"
);
}
if
(
text
.
contains
(
"accel calibration done"
))
{
accelStarted
=
false
;
// XXX use a confirmation image or something
setInstructionImage
(
"
.
/files/images/px4/calibration/accel_z-.png"
);
setInstructionImage
(
"
:
/files/images/px4/calibration/accel_z-.png"
);
ui
->
calibrationExplanationLabel
->
setText
(
tr
(
"Accelerometer calibration completed. Parameters permanently stored."
));
}
if
(
text
.
contains
(
"gyro calibration done"
))
{
gyroStarted
=
false
;
// XXX use a confirmation image or something
setInstructionImage
(
"
.
/files/images/px4/calibration/accel_z-.png"
);
setInstructionImage
(
"
:
/files/images/px4/calibration/accel_z-.png"
);
ui
->
calibrationExplanationLabel
->
setText
(
tr
(
"Gyroscope calibration completed. Parameters permanently stored."
));
}
if
(
text
.
contains
(
"mag calibration done"
))
{
magStarted
=
false
;
// XXX use a confirmation image or something
setInstructionImage
(
"
.
/files/images/px4/calibration/accel_z-.png"
);
setInstructionImage
(
"
:
/files/images/px4/calibration/accel_z-.png"
);
ui
->
calibrationExplanationLabel
->
setText
(
tr
(
"Magnetometer calibration completed. Parameters permanently stored."
));
}
...
...
@@ -180,7 +180,7 @@ void QGCPX4SensorCalibration::handleTextMessage(int uasid, int compId, int sever
void
QGCPX4SensorCalibration
::
gyroButtonClicked
()
{
setInstructionImage
(
"
.
/files/images/px4/calibration/accel_z-.png"
);
setInstructionImage
(
"
:
/files/images/px4/calibration/accel_z-.png"
);
activeUAS
->
executeCommand
(
MAV_CMD_PREFLIGHT_CALIBRATION
,
1
,
1.0
f
,
0.0
f
,
0.0
f
,
0.0
f
,
0.0
f
,
0.0
f
,
0.0
f
,
0
);
ui
->
progressBar
->
setValue
(
0
);
ui
->
calibrationExplanationLabel
->
setText
(
tr
(
"Please do not move the system at all and wait for calibration to complete."
));
...
...
@@ -188,7 +188,7 @@ void QGCPX4SensorCalibration::gyroButtonClicked()
void
QGCPX4SensorCalibration
::
magButtonClicked
()
{
setInstructionImage
(
"
.
/files/images/px4/calibration/accel_z-.png"
);
setInstructionImage
(
"
:
/files/images/px4/calibration/accel_z-.png"
);
activeUAS
->
executeCommand
(
MAV_CMD_PREFLIGHT_CALIBRATION
,
1
,
0.0
f
,
1.0
f
,
0.0
f
,
0.0
f
,
0.0
f
,
0.0
f
,
0.0
f
,
0
);
ui
->
progressBar
->
setValue
(
0
);
ui
->
calibrationExplanationLabel
->
setText
(
tr
(
"Please put the system in a rest position and wait for instructions."
));
...
...
@@ -196,7 +196,7 @@ void QGCPX4SensorCalibration::magButtonClicked()
void
QGCPX4SensorCalibration
::
accelButtonClicked
()
{
setInstructionImage
(
"
.
/files/images/px4/calibration/accel_z-.png"
);
setInstructionImage
(
"
:
/files/images/px4/calibration/accel_z-.png"
);
activeUAS
->
executeCommand
(
MAV_CMD_PREFLIGHT_CALIBRATION
,
1
,
0.0
f
,
0.0
f
,
0.0
f
,
0.0
f
,
1.0
f
,
0.0
f
,
0.0
f
,
0
);
ui
->
progressBar
->
setValue
(
0
);
accelStarted
=
true
;
...
...
src/ui/px4_configuration/QGCPX4SensorCalibration.ui
View file @
baafca2e
...
...
@@ -50,13 +50,6 @@ QPushButton#gyroButton, QPushButton#accelButton {
</property>
</spacer>
</item>
<item
row=
"0"
column=
"0"
>
<widget
class=
"QLabel"
name=
"titleLabel"
>
<property
name=
"text"
>
<string>
Magnetometer Calibration
</string>
</property>
</widget>
</item>
<item
row=
"4"
column=
"0"
colspan=
"3"
>
<spacer
name=
"verticalSpacer"
>
<property
name=
"orientation"
>
...
...
@@ -124,7 +117,14 @@ QPushButton#gyroButton, QPushButton#accelButton {
</item>
</layout>
</item>
<item
row=
"1"
column=
"0"
>
<item
row=
"2"
column=
"0"
colspan=
"3"
>
<widget
class=
"QLabel"
name=
"calibrationExplanationLabel"
>
<property
name=
"text"
>
<string>
To calibrate the system, execute the three calibration steps below.
</string>
</property>
</widget>
</item>
<item
row=
"0"
column=
"0"
rowspan=
"2"
>
<widget
class=
"QLabel"
name=
"iconLabel"
>
<property
name=
"text"
>
<string/>
...
...
@@ -134,13 +134,6 @@ QPushButton#gyroButton, QPushButton#accelButton {
</property>
</widget>
</item>
<item
row=
"2"
column=
"0"
colspan=
"3"
>
<widget
class=
"QLabel"
name=
"calibrationExplanationLabel"
>
<property
name=
"text"
>
<string>
To calibrate the system, execute the three calibration steps below.
</string>
</property>
</widget>
</item>
</layout>
</widget>
<resources>
...
...
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