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
fcdf550b
Commit
fcdf550b
authored
Jan 30, 2012
by
Bryant Mairs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed some sources for warnings.
Also removed redundant code in QGCMapWidget.cc.
parent
6821ff47
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
32 deletions
+2
-32
QGCMapWidget.cc
src/ui/map/QGCMapWidget.cc
+1
-30
QGCMAVLinkMessageSender.cc
src/ui/mavlink/QGCMAVLinkMessageSender.cc
+1
-2
No files found.
src/ui/map/QGCMapWidget.cc
View file @
fcdf550b
...
...
@@ -303,9 +303,6 @@ void QGCMapWidget::updateLocalPosition()
}
// Set new lat/lon position of UAV icon
double
latitude
=
UASManager
::
instance
()
->
getHomeLatitude
();
double
longitude
=
UASManager
::
instance
()
->
getHomeLongitude
();
double
altitude
=
UASManager
::
instance
()
->
getHomeAltitude
();
internals
::
PointLatLng
pos_lat_lon
=
internals
::
PointLatLng
(
system
->
getLatitude
(),
system
->
getLongitude
());
uav
->
SetUAVPos
(
pos_lat_lon
,
system
->
getAltitude
());
// Follow status
...
...
@@ -317,33 +314,7 @@ void QGCMapWidget::updateLocalPosition()
void
QGCMapWidget
::
updateLocalPositionEstimates
()
{
QList
<
UASInterface
*>
systems
=
UASManager
::
instance
()
->
getUASList
();
foreach
(
UASInterface
*
system
,
systems
)
{
// Get reference to graphic UAV item
mapcontrol
::
UAVItem
*
uav
=
GetUAV
(
system
->
getUASID
());
// Check if reference is valid, else create a new one
if
(
uav
==
NULL
)
{
MAV2DIcon
*
newUAV
=
new
MAV2DIcon
(
map
,
this
,
system
);
AddUAV
(
system
->
getUASID
(),
newUAV
);
uav
=
newUAV
;
uav
->
SetTrailTime
(
1
);
uav
->
SetTrailDistance
(
5
);
uav
->
SetTrailType
(
mapcontrol
::
UAVTrailType
::
ByTimeElapsed
);
}
// Set new lat/lon position of UAV icon
double
latitude
=
UASManager
::
instance
()
->
getHomeLatitude
();
double
longitude
=
UASManager
::
instance
()
->
getHomeLongitude
();
double
altitude
=
UASManager
::
instance
()
->
getHomeAltitude
();
internals
::
PointLatLng
pos_lat_lon
=
internals
::
PointLatLng
(
system
->
getLatitude
(),
system
->
getLongitude
());
uav
->
SetUAVPos
(
pos_lat_lon
,
system
->
getAltitude
());
// Follow status
if
(
followUAVEnabled
&&
system
->
getUASID
()
==
followUAVID
)
SetCurrentPosition
(
pos_lat_lon
);
// Convert from radians to degrees and apply
uav
->
SetUAVHeading
((
system
->
getYaw
()
/
M_PI
)
*
180.0
f
);
}
updateLocalPosition
();
}
...
...
src/ui/mavlink/QGCMAVLinkMessageSender.cc
View file @
fcdf550b
...
...
@@ -23,7 +23,6 @@ QGCMAVLinkMessageSender::QGCMAVLinkMessageSender(MAVLinkProtocol* mavlink, QWidg
void
QGCMAVLinkMessageSender
::
refresh
()
{
unsigned
int
maxUpdateRate
=
0
;
// Send messages
foreach
(
unsigned
int
i
,
managementItems
.
keys
())
{
...
...
@@ -79,7 +78,7 @@ bool QGCMAVLinkMessageSender::sendMessage(unsigned int msgid)
uint8_t
*
nums
=
m
+
messageInfo
[
msgid
].
fields
[
fieldid
].
wire_offset
;
for
(
unsigned
int
j
=
0
;
j
<
messageInfo
[
msgid
].
fields
[
fieldid
].
array_length
;
++
j
)
{
if
(
field
->
data
(
1
,
Qt
::
DisplayRole
).
toString
().
split
(
" "
).
size
(
)
>
j
)
if
(
(
unsigned
int
)(
field
->
data
(
1
,
Qt
::
DisplayRole
).
toString
().
split
(
" "
).
size
()
)
>
j
)
{
nums
[
j
]
=
field
->
data
(
1
,
Qt
::
DisplayRole
).
toString
().
split
(
" "
).
at
(
j
).
toInt
();
}
...
...
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