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
ab7a7c85
Commit
ab7a7c85
authored
Feb 27, 2012
by
hengli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modified Pixhawk3DWidget.cc to remove compiler warnings about unused variables.
parent
80ad3802
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
11 deletions
+30
-11
Pixhawk3DWidget.cc
src/ui/map3D/Pixhawk3DWidget.cc
+30
-11
No files found.
src/ui/map3D/Pixhawk3DWidget.cc
View file @
ab7a7c85
...
@@ -161,6 +161,8 @@ Pixhawk3DWidget::localPositionChanged(UASInterface* uas, int component,
...
@@ -161,6 +161,8 @@ Pixhawk3DWidget::localPositionChanged(UASInterface* uas, int component,
double
x
,
double
y
,
double
z
,
double
x
,
double
y
,
double
z
,
quint64
time
)
quint64
time
)
{
{
Q_UNUSED
(
time
);
int
systemId
=
uas
->
getUASID
();
int
systemId
=
uas
->
getUASID
();
if
(
!
mSystemContainerMap
.
contains
(
systemId
))
if
(
!
mSystemContainerMap
.
contains
(
systemId
))
...
@@ -303,6 +305,8 @@ Pixhawk3DWidget::localPositionChanged(UASInterface* uas,
...
@@ -303,6 +305,8 @@ Pixhawk3DWidget::localPositionChanged(UASInterface* uas,
double
x
,
double
y
,
double
z
,
double
x
,
double
y
,
double
z
,
quint64
time
)
quint64
time
)
{
{
Q_UNUSED
(
time
);
int
systemId
=
uas
->
getUASID
();
int
systemId
=
uas
->
getUASID
();
if
(
!
mSystemContainerMap
.
contains
(
systemId
))
if
(
!
mSystemContainerMap
.
contains
(
systemId
))
...
@@ -310,13 +314,13 @@ Pixhawk3DWidget::localPositionChanged(UASInterface* uas,
...
@@ -310,13 +314,13 @@ Pixhawk3DWidget::localPositionChanged(UASInterface* uas,
return
;
return
;
}
}
// Add offset
//
// Add offset
UAS
*
mav
=
qobject_cast
<
UAS
*>
(
uas
);
//
UAS* mav = qobject_cast<UAS*>(uas);
float
offX
=
mav
->
getNedPosGlobalOffset
().
x
();
//
float offX = mav->getNedPosGlobalOffset().x();
float
offY
=
mav
->
getNedPosGlobalOffset
().
y
();
//
float offY = mav->getNedPosGlobalOffset().y();
float
offZ
=
mav
->
getNedPosGlobalOffset
().
z
();
//
float offZ = mav->getNedPosGlobalOffset().z();
float
offYaw
=
mav
->
getNedAttGlobalOffset
().
z
();
//
float offYaw = mav->getNedAttGlobalOffset().z();
// update system position
// update system position
m3DWidget
->
systemGroup
(
systemId
)
->
position
()
->
setPosition
(
osg
::
Vec3d
(
y
,
x
,
-
z
));
m3DWidget
->
systemGroup
(
systemId
)
->
position
()
->
setPosition
(
osg
::
Vec3d
(
y
,
x
,
-
z
));
...
@@ -327,6 +331,10 @@ Pixhawk3DWidget::attitudeChanged(UASInterface* uas, int component,
...
@@ -327,6 +331,10 @@ Pixhawk3DWidget::attitudeChanged(UASInterface* uas, int component,
double
roll
,
double
pitch
,
double
yaw
,
double
roll
,
double
pitch
,
double
yaw
,
quint64
time
)
quint64
time
)
{
{
Q_UNUSED
(
roll
);
Q_UNUSED
(
pitch
);
Q_UNUSED
(
time
);
int
systemId
=
uas
->
getUASID
();
int
systemId
=
uas
->
getUASID
();
if
(
!
mSystemContainerMap
.
contains
(
systemId
))
if
(
!
mSystemContainerMap
.
contains
(
systemId
))
...
@@ -357,6 +365,8 @@ Pixhawk3DWidget::attitudeChanged(UASInterface* uas,
...
@@ -357,6 +365,8 @@ Pixhawk3DWidget::attitudeChanged(UASInterface* uas,
double
roll
,
double
pitch
,
double
yaw
,
double
roll
,
double
pitch
,
double
yaw
,
quint64
time
)
quint64
time
)
{
{
Q_UNUSED
(
time
);
int
systemId
=
uas
->
getUASID
();
int
systemId
=
uas
->
getUASID
();
if
(
!
mSystemContainerMap
.
contains
(
systemId
))
if
(
!
mSystemContainerMap
.
contains
(
systemId
))
...
@@ -423,7 +433,7 @@ Pixhawk3DWidget::setpointChanged(int uasId, float x, float y, float z,
...
@@ -423,7 +433,7 @@ Pixhawk3DWidget::setpointChanged(int uasId, float x, float y, float z,
osg
::
ref_ptr
<
osg
::
Group
>&
setpointGroupNode
=
mSystemContainerMap
[
uasId
].
setpointGroupNode
();
osg
::
ref_ptr
<
osg
::
Group
>&
setpointGroupNode
=
mSystemContainerMap
[
uasId
].
setpointGroupNode
();
setpointGroupNode
->
addChild
(
pat
);
setpointGroupNode
->
addChild
(
pat
);
if
(
setpointGroupNode
->
getNumChildren
()
>
s
ystemViewParams
->
setpointHistoryLength
(
))
if
(
setpointGroupNode
->
getNumChildren
()
>
s
tatic_cast
<
unsigned
int
>
(
systemViewParams
->
setpointHistoryLength
()
))
{
{
setpointGroupNode
->
removeChildren
(
0
,
setpointGroupNode
->
getNumChildren
()
-
systemViewParams
->
setpointHistoryLength
());
setpointGroupNode
->
removeChildren
(
0
,
setpointGroupNode
->
getNumChildren
()
-
systemViewParams
->
setpointHistoryLength
());
}
}
...
@@ -1184,7 +1194,6 @@ Pixhawk3DWidget::update(void)
...
@@ -1184,7 +1194,6 @@ Pixhawk3DWidget::update(void)
UASInterface
*
uas
=
UASManager
::
instance
()
->
getUASForId
(
systemId
);
UASInterface
*
uas
=
UASManager
::
instance
()
->
getUASForId
(
systemId
);
osg
::
ref_ptr
<
SystemGroupNode
>&
systemNode
=
m3DWidget
->
systemGroup
(
systemId
);
SystemContainer
&
systemData
=
mSystemContainerMap
[
systemId
];
SystemContainer
&
systemData
=
mSystemContainerMap
[
systemId
];
SystemViewParamsPtr
&
systemViewParams
=
it
.
value
();
SystemViewParamsPtr
&
systemViewParams
=
it
.
value
();
...
@@ -1581,12 +1590,16 @@ Pixhawk3DWidget::wheelEvent(QWheelEvent* event)
...
@@ -1581,12 +1590,16 @@ Pixhawk3DWidget::wheelEvent(QWheelEvent* event)
void
void
Pixhawk3DWidget
::
showEvent
(
QShowEvent
*
event
)
Pixhawk3DWidget
::
showEvent
(
QShowEvent
*
event
)
{
{
Q_UNUSED
(
event
);
emit
visibilityChanged
(
true
);
emit
visibilityChanged
(
true
);
}
}
void
void
Pixhawk3DWidget
::
hideEvent
(
QHideEvent
*
event
)
Pixhawk3DWidget
::
hideEvent
(
QHideEvent
*
event
)
{
{
Q_UNUSED
(
event
);
emit
visibilityChanged
(
false
);
emit
visibilityChanged
(
false
);
}
}
...
@@ -2347,6 +2360,9 @@ Pixhawk3DWidget::updateTarget(UASInterface* uas, MAV_FRAME frame,
...
@@ -2347,6 +2360,9 @@ Pixhawk3DWidget::updateTarget(UASInterface* uas, MAV_FRAME frame,
QVector4D
&
target
,
QVector4D
&
target
,
osg
::
ref_ptr
<
osg
::
Node
>&
targetNode
)
osg
::
ref_ptr
<
osg
::
Node
>&
targetNode
)
{
{
Q_UNUSED
(
uas
);
Q_UNUSED
(
frame
);
osg
::
PositionAttitudeTransform
*
pat
=
osg
::
PositionAttitudeTransform
*
pat
=
dynamic_cast
<
osg
::
PositionAttitudeTransform
*>
(
targetNode
.
get
());
dynamic_cast
<
osg
::
PositionAttitudeTransform
*>
(
targetNode
.
get
());
...
@@ -2356,9 +2372,6 @@ Pixhawk3DWidget::updateTarget(UASInterface* uas, MAV_FRAME frame,
...
@@ -2356,9 +2372,6 @@ Pixhawk3DWidget::updateTarget(UASInterface* uas, MAV_FRAME frame,
pat
->
setAttitude
(
osg
::
Quat
(
target
.
w
()
-
M_PI_2
,
osg
::
Vec3d
(
1.0
f
,
0.0
f
,
0.0
f
),
pat
->
setAttitude
(
osg
::
Quat
(
target
.
w
()
-
M_PI_2
,
osg
::
Vec3d
(
1.0
f
,
0.0
f
,
0.0
f
),
M_PI_2
,
osg
::
Vec3d
(
0.0
f
,
1.0
f
,
0.0
f
),
M_PI_2
,
osg
::
Vec3d
(
0.0
f
,
1.0
f
,
0.0
f
),
0.0
,
osg
::
Vec3d
(
0.0
f
,
0.0
f
,
1.0
f
)));
0.0
,
osg
::
Vec3d
(
0.0
f
,
0.0
f
,
1.0
f
)));
osg
::
Geode
*
geode
=
dynamic_cast
<
osg
::
Geode
*>
(
pat
->
getChild
(
0
));
osg
::
ShapeDrawable
*
sd
=
dynamic_cast
<
osg
::
ShapeDrawable
*>
(
geode
->
getDrawable
(
0
));
}
}
void
void
...
@@ -2399,6 +2412,8 @@ Pixhawk3DWidget::updatePlannedPath(UASInterface* uas, MAV_FRAME frame,
...
@@ -2399,6 +2412,8 @@ Pixhawk3DWidget::updatePlannedPath(UASInterface* uas, MAV_FRAME frame,
double
robotX
,
double
robotY
,
double
robotZ
,
double
robotX
,
double
robotY
,
double
robotZ
,
osg
::
ref_ptr
<
osg
::
Geode
>&
plannedPathNode
)
osg
::
ref_ptr
<
osg
::
Geode
>&
plannedPathNode
)
{
{
Q_UNUSED
(
frame
);
qreal
receivedTimestamp
;
qreal
receivedTimestamp
;
px
::
Path
path
=
uas
->
getPath
(
receivedTimestamp
);
px
::
Path
path
=
uas
->
getPath
(
receivedTimestamp
);
...
@@ -2476,6 +2491,8 @@ Pixhawk3DWidget::updateRGBD(UASInterface* uas, MAV_FRAME frame,
...
@@ -2476,6 +2491,8 @@ Pixhawk3DWidget::updateRGBD(UASInterface* uas, MAV_FRAME frame,
osg
::
ref_ptr
<
ImageWindowGeode
>&
rgbImageNode
,
osg
::
ref_ptr
<
ImageWindowGeode
>&
rgbImageNode
,
osg
::
ref_ptr
<
ImageWindowGeode
>&
depthImageNode
)
osg
::
ref_ptr
<
ImageWindowGeode
>&
depthImageNode
)
{
{
Q_UNUSED
(
frame
);
qreal
receivedTimestamp
;
qreal
receivedTimestamp
;
px
::
RGBDImage
rgbdImage
=
uas
->
getRGBDImage
(
receivedTimestamp
);
px
::
RGBDImage
rgbdImage
=
uas
->
getRGBDImage
(
receivedTimestamp
);
...
@@ -2525,6 +2542,8 @@ Pixhawk3DWidget::updatePointCloud(UASInterface* uas, MAV_FRAME frame,
...
@@ -2525,6 +2542,8 @@ Pixhawk3DWidget::updatePointCloud(UASInterface* uas, MAV_FRAME frame,
osg
::
ref_ptr
<
osg
::
Geode
>&
pointCloudNode
,
osg
::
ref_ptr
<
osg
::
Geode
>&
pointCloudNode
,
bool
colorPointCloudByDistance
)
bool
colorPointCloudByDistance
)
{
{
Q_UNUSED
(
frame
);
qreal
receivedTimestamp
;
qreal
receivedTimestamp
;
px
::
PointCloudXYZRGB
pointCloud
=
uas
->
getPointCloud
(
receivedTimestamp
);
px
::
PointCloudXYZRGB
pointCloud
=
uas
->
getPointCloud
(
receivedTimestamp
);
...
...
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