Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
80f8aac3
Commit
80f8aac3
authored
May 25, 2013
by
Lorenz Meier
Browse files
Only loading port names which still are available, fixed more compile errors
parent
b94f906c
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/ui/SerialConfigurationWindow.cc
View file @
80f8aac3
...
...
@@ -218,6 +218,9 @@ void SerialConfigurationWindow::setupPortList()
// Get the ports available on this system
QVector
<
QString
>*
ports
=
link
->
getCurrentPorts
();
QString
storedName
=
this
->
link
->
getPortName
();
bool
storedFound
=
false
;
// Add the ports in reverse order, because we prepend them to the list
for
(
int
i
=
ports
->
size
()
-
1
;
i
>=
0
;
--
i
)
{
...
...
@@ -227,9 +230,14 @@ void SerialConfigurationWindow::setupPortList()
ui
.
portName
->
insertItem
(
0
,
ports
->
at
(
i
));
if
(
!
userConfigured
)
ui
.
portName
->
setEditText
(
ports
->
at
(
i
));
}
// Check if the stored link name is still present
if
(
ports
->
at
(
i
).
contains
(
storedName
)
||
storedName
.
contains
(
ports
->
at
(
i
)))
storedFound
=
true
;
}
ui
.
portName
->
setEditText
(
this
->
link
->
getPortName
());
if
(
storedFound
)
ui
.
portName
->
setEditText
(
storedName
);
}
void
SerialConfigurationWindow
::
enableFlowControl
(
bool
flow
)
...
...
src/ui/map3D/QGCGoogleEarthView.cc
View file @
80f8aac3
...
...
@@ -265,7 +265,7 @@ void QGCGoogleEarthView::updateWaypointList(int uas)
if
(
uasInstance
)
{
// Get all waypoints, including non-global waypoints
Q
Vector
<
Waypoint
*>
wpList
=
uasInstance
->
getWaypointManager
()
->
getGlobalFrameAndNavTypeWaypointList
();
Q
List
<
Waypoint
*>
wpList
=
uasInstance
->
getWaypointManager
()
->
getGlobalFrameAndNavTypeWaypointList
();
// Trim internal list to number of global waypoints in the waypoint manager list
javaScript
(
QString
(
"updateWaypointListLength(%1,%2);"
).
arg
(
uas
).
arg
(
wpList
.
count
()));
...
...
@@ -712,7 +712,7 @@ void QGCGoogleEarthView::updateState()
// Update waypoint or symbol
if
(
mav
)
{
Q
Vector
<
Waypoint
*>
wps
=
mav
->
getWaypointManager
()
->
getGlobalFrameAndNavTypeWaypointList
();
Q
List
<
Waypoint
*>
wps
=
mav
->
getWaypointManager
()
->
getGlobalFrameAndNavTypeWaypointList
();
bool
ok
;
int
index
=
idText
.
toInt
(
&
ok
);
...
...
src/ui/map3D/WaypointGroupNode.cc
View file @
80f8aac3
...
...
@@ -36,6 +36,7 @@ This file is part of the QGROUNDCONTROL project
#include
<osg/ShapeDrawable>
#include
"Imagery.h"
#include
"UASManager.h"
WaypointGroupNode
::
WaypointGroupNode
(
const
QColor
&
color
)
:
mColor
(
color
)
...
...
@@ -70,6 +71,16 @@ WaypointGroupNode::update(UASInterface* uas, MAV_FRAME frame)
Imagery
::
LLtoUTM
(
latitude
,
longitude
,
robotX
,
robotY
,
utmZone
);
robotZ
=
-
altitude
;
}
else
if
(
frame
==
MAV_FRAME_GLOBAL_RELATIVE_ALT
)
{
double
latitude
=
uas
->
getLatitude
();
double
longitude
=
uas
->
getLongitude
();
double
altitude
=
uas
->
getAltitude
()
+
UASManager
::
instance
()
->
getHomeAltitude
();
QString
utmZone
;
Imagery
::
LLtoUTM
(
latitude
,
longitude
,
robotX
,
robotY
,
utmZone
);
robotZ
=
-
altitude
;
}
else
if
(
frame
==
MAV_FRAME_LOCAL_NED
)
{
robotX
=
uas
->
getLocalX
();
...
...
@@ -82,7 +93,7 @@ WaypointGroupNode::update(UASInterface* uas, MAV_FRAME frame)
removeChild
(
0
,
getNumChildren
());
}
const
Q
Vector
<
Waypoint
*>&
list
=
uas
->
getWaypointManager
()
->
getWaypointEditableList
();
const
Q
List
<
Waypoint
*>&
list
=
uas
->
getWaypointManager
()
->
getWaypointEditableList
();
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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