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
16a68ab5
Commit
16a68ab5
authored
Jan 01, 2011
by
pixhawk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a whole bunch of compile warnings
parent
74c36838
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
296 additions
and
283 deletions
+296
-283
layer.cpp
lib/QMapControl/src/layer.cpp
+4
-3
Core.cc
src/Core.cc
+1
-0
MAVLinkXMLParser.cc
src/comm/MAVLinkXMLParser.cc
+2
-2
UASWaypointManager.cc
src/uas/UASWaypointManager.cc
+4
-1
MapWidget.cc
src/ui/MapWidget.cc
+269
-268
SlugsPIDControl.cpp
src/ui/SlugsPIDControl.cpp
+2
-0
SlugsPadCameraControl.cpp
src/ui/SlugsPadCameraControl.cpp
+3
-2
Imagery.cc
src/ui/map3D/Imagery.cc
+2
-2
Pixhawk3DWidget.cc
src/ui/map3D/Pixhawk3DWidget.cc
+1
-1
PixhawkCheetahGeode.cc
src/ui/map3D/PixhawkCheetahGeode.cc
+4
-3
WaypointGroupNode.cc
src/ui/map3D/WaypointGroupNode.cc
+3
-1
UASView.cc
src/ui/uas/UASView.cc
+1
-0
No files found.
lib/QMapControl/src/layer.cpp
View file @
16a68ab5
...
...
@@ -99,9 +99,10 @@ namespace qmapcontrol
Geometry
*
Layer
::
get_Geometry
(
int
index
)
{
Geometry
*
geo
=
NULL
;
if
(
geometrySelected
)
{
return
geometrySelected
;
geo
=
geometrySelected
;
}
else
{
...
...
@@ -110,7 +111,7 @@ namespace qmapcontrol
Geometry
*
geometry
=
geometries
[
i
];
if
(
geometry
->
name
()
==
QString
::
number
(
index
))
{
return
geometry
;
geo
=
geometry
;
}
}
...
...
@@ -124,7 +125,7 @@ namespace qmapcontrol
// }
}
return
geo
;
}
bool
Layer
::
isVisible
()
const
...
...
src/Core.cc
View file @
16a68ab5
...
...
@@ -122,6 +122,7 @@ Core::Core(int &argc, char* argv[]) : QApplication(argc, argv)
#endif
// MAVLinkSimulationLink* simulationLink = new MAVLinkSimulationLink(MG::DIR::getSupportFilesDirectory() + "/demo-log.txt");
MAVLinkSimulationLink
*
simulationLink
=
new
MAVLinkSimulationLink
(
":/demo-log.txt"
);
simulationLink
->
disconnect
();
//mainWindow->addLink(simulationLink);
mainWindow
=
MainWindow
::
instance
();
...
...
src/comm/MAVLinkXMLParser.cc
View file @
16a68ab5
...
...
@@ -496,7 +496,7 @@ bool MAVLinkXMLParser::generate()
if
(
fieldType
==
"uint8_t_mavlink_version"
)
{
unpackingCode
=
QString
(
"
\t
return
%1;"
).
arg
(
mavlinkVersion
);
unpackingCode
=
QString
(
"
\t
return
(%1)(msg->payload%2)[0];"
).
arg
(
"uint8_t"
,
prepends
);
}
else
if
(
fieldType
==
"uint8_t"
||
fieldType
==
"int8_t"
)
{
...
...
@@ -531,7 +531,7 @@ bool MAVLinkXMLParser::generate()
// Generate the message decoding function
if
(
fieldType
.
contains
(
"uint8_t_mavlink_version"
))
{
unpacking
+=
unpackingComment
+
QString
(
"static inline
uint8_t mavlink_msg_%1_get_%2(const mavlink_message_t* msg)
\n
{
\n\t
return %3;
\n
}
\n\n
"
).
arg
(
messageName
,
fieldName
).
arg
(
mavlinkVersion
);
unpacking
+=
unpackingComment
+
QString
(
"static inline
%1 mavlink_msg_%2_get_%3(const mavlink_message_t* msg)
\n
{
\n
%4
\n
}
\n\n
"
).
arg
(
"uint8_t"
,
messageName
,
fieldName
,
unpackingCode
);
decodeLines
+=
""
;
prepends
+=
"+sizeof(uint8_t)"
;
}
...
...
src/uas/UASWaypointManager.cc
View file @
16a68ab5
...
...
@@ -394,11 +394,14 @@ void UASWaypointManager::loadWaypoints(const QString &loadFile)
void
UASWaypointManager
::
globalAddWaypoint
(
Waypoint
*
wp
)
{
// FIXME Will be removed
Q_UNUSED
(
wp
);
}
int
UASWaypointManager
::
globalRemoveWaypoint
(
quint16
seq
)
{
// FIXME Will be removed
Q_UNUSED
(
seq
);
return
0
;
}
...
...
src/ui/MapWidget.cc
View file @
16a68ab5
/*=====================================================================
/*==================================================================
QGroundControl Open Source Ground Control Station
(c) 2009, 2010 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
...
...
@@ -88,9 +87,9 @@ MapWidget::MapWidget(QWidget *parent) :
//
// Layer* gsatLayer = new Layer("Google Satellite", gsat, Layer::MapLayer);
// mc->addLayer(gsatLayer);
//
// Layer* gsatLayer = new Layer("Google Satellite", gsat, Layer::MapLayer);
// mc->addLayer(gsatLayer);
// SET INITIAL POSITION AND ZOOM
// Set default zoom level
...
...
@@ -119,24 +118,24 @@ MapWidget::MapWidget(QWidget *parent) :
this
,
SLOT
(
mapproviderSelected
(
QAction
*
)));
// Overlay seems currently broken
// yahooActionOverlay = new QAction(tr("Yahoo: street overlay"), this);
// yahooActionOverlay->setCheckable(true);
// yahooActionOverlay->setChecked(overlay->isVisible());
// connect(yahooActionOverlay, SIGNAL(toggled(bool)),
// overlay, SLOT(setVisible(bool)));
// mapproviderGroup->addAction(googleSatAction);
// mapproviderGroup->addAction(osmAction);
// mapproviderGroup->addAction(yahooActionOverlay);
// mapproviderGroup->addAction(googleActionMap);
// mapproviderGroup->addAction(yahooActionMap);
// mapproviderGroup->addAction(yahooActionSatellite);
// yahooActionOverlay = new QAction(tr("Yahoo: street overlay"), this);
// yahooActionOverlay->setCheckable(true);
// yahooActionOverlay->setChecked(overlay->isVisible());
// connect(yahooActionOverlay, SIGNAL(toggled(bool)),
// overlay, SLOT(setVisible(bool)));
// mapproviderGroup->addAction(googleSatAction);
// mapproviderGroup->addAction(osmAction);
// mapproviderGroup->addAction(yahooActionOverlay);
// mapproviderGroup->addAction(googleActionMap);
// mapproviderGroup->addAction(yahooActionMap);
// mapproviderGroup->addAction(yahooActionSatellite);
// Create map provider selection menu
mapMenu
=
new
QMenu
(
this
);
mapMenu
->
addActions
(
mapproviderGroup
->
actions
());
mapMenu
->
addSeparator
();
// mapMenu->addAction(yahooActionOverlay);
// mapMenu->addAction(yahooActionOverlay);
mapButton
=
new
QPushButton
(
this
);
mapButton
->
setText
(
"Map Source"
);
...
...
@@ -254,9 +253,9 @@ void MapWidget::mapproviderSelected(QAction* action)
mc
->
updateRequestNew
();
mc
->
setZoom
(
zoom
);
// yahooActionOverlay->setEnabled(false);
// yahooActionOverlay->setEnabled(false);
overlay
->
setVisible
(
false
);
// yahooActionOverlay->setChecked(false);
// yahooActionOverlay->setChecked(false);
}
else
if
(
action
==
yahooActionMap
)
...
...
@@ -270,9 +269,9 @@ void MapWidget::mapproviderSelected(QAction* action)
mc
->
updateRequestNew
();
mc
->
setZoom
(
zoom
);
// yahooActionOverlay->setEnabled(false);
// yahooActionOverlay->setEnabled(false);
overlay
->
setVisible
(
false
);
// yahooActionOverlay->setChecked(false);
// yahooActionOverlay->setChecked(false);
}
else
if
(
action
==
yahooActionSatellite
)
{
...
...
@@ -285,7 +284,7 @@ void MapWidget::mapproviderSelected(QAction* action)
mc
->
updateRequestNew
();
mc
->
setZoom
(
zoom
);
// yahooActionOverlay->setEnabled(true);
// yahooActionOverlay->setEnabled(true);
}
else
if
(
action
==
googleActionMap
)
{
...
...
@@ -297,9 +296,9 @@ void MapWidget::mapproviderSelected(QAction* action)
mc
->
updateRequestNew
();
mc
->
setZoom
(
zoom
);
// yahooActionOverlay->setEnabled(false);
// yahooActionOverlay->setEnabled(false);
overlay
->
setVisible
(
false
);
// yahooActionOverlay->setChecked(false);
// yahooActionOverlay->setChecked(false);
}
else
if
(
action
==
googleSatAction
)
{
...
...
@@ -311,9 +310,9 @@ void MapWidget::mapproviderSelected(QAction* action)
mc
->
updateRequestNew
();
mc
->
setZoom
(
zoom
);
// yahooActionOverlay->setEnabled(false);
// yahooActionOverlay->setEnabled(false);
overlay
->
setVisible
(
false
);
// yahooActionOverlay->setChecked(false);
// yahooActionOverlay->setChecked(false);
}
else
{
...
...
@@ -338,13 +337,13 @@ void MapWidget::createPathButtonClicked(bool checked)
// emit signal start to create a Waypoint global
emit
createGlobalWP
(
true
,
mc
->
currentCoordinate
());
// // Clear the previous WP track
// // TODO: Move this to an actual clear track button and add a warning dialog
// mc->layer("Waypoints")->clearGeometries();
// wps.clear();
// path->setPoints(wps);
// mc->layer("Waypoints")->addGeometry(path);
// wpIndex.clear();
// // Clear the previous WP track
// // TODO: Move this to an actual clear track button and add a warning dialog
// mc->layer("Waypoints")->clearGeometries();
// wps.clear();
// path->setPoints(wps);
// mc->layer("Waypoints")->addGeometry(path);
// wpIndex.clear();
}
else
{
...
...
@@ -441,8 +440,8 @@ void MapWidget::createWaypointGraphAtMap(const QPointF coordinate)
mc
->
updateRequestNew
();
}
//// // emit signal mouse was clicked
// emit captureMapCoordinateClick(coordinate);
//// // emit signal mouse was clicked
// emit captureMapCoordinateClick(coordinate);
}
int
MapWidget
::
wpExists
(
const
QPointF
coordinate
){
...
...
@@ -498,11 +497,13 @@ void MapWidget::captureGeometryDrag(Geometry* geom, QPointF coordinate)
void
MapWidget
::
captureGeometryEndDrag
(
Geometry
*
geom
,
QPointF
coordinate
)
{
Q_UNUSED
(
geom
);
Q_UNUSED
(
coordinate
);
// TODO: Investigate why when creating the waypoint path this slot is being called
// Only change the mouse mode back to panning when not creating a WP path
if
(
!
createPath
->
isChecked
()){
if
(
!
createPath
->
isChecked
())
{
waypointIsDrag
=
false
;
mc
->
setMouseMode
(
qmapcontrol
::
MapControl
::
Panning
);
}
...
...
@@ -724,15 +725,15 @@ void MapWidget::updateCameraPosition(double radio, double bearing, QString dir)
{
//camPoints.clear();
QPointF
currentPos
=
mc
->
currentCoordinate
();
// QPointF actualPos = getPointxBearing_Range(currentPos.y(),currentPos.x(),bearing,distance);
// QPointF actualPos = getPointxBearing_Range(currentPos.y(),currentPos.x(),bearing,distance);
// qmapcontrol::Point* tempPoint1 = new qmapcontrol::Point(currentPos.x(), currentPos.y(),"inicial",qmapcontrol::Point::Middle);
// qmapcontrol::Point* tempPoint2 = new qmapcontrol::Point(actualPos.x(), actualPos.y(),"final",qmapcontrol::Point::Middle);
// qmapcontrol::Point* tempPoint1 = new qmapcontrol::Point(currentPos.x(), currentPos.y(),"inicial",qmapcontrol::Point::Middle);
// qmapcontrol::Point* tempPoint2 = new qmapcontrol::Point(actualPos.x(), actualPos.y(),"final",qmapcontrol::Point::Middle);
// camPoints.append(tempPoint1);
// camPoints.append(tempPoint2);
// camPoints.append(tempPoint1);
// camPoints.append(tempPoint2);
// camLine->setPoints(camPoints);
// camLine->setPoints(camPoints);
QPen
*
camBorderPen
=
new
QPen
(
QColor
(
255
,
0
,
0
));
camBorderPen
->
setWidth
(
2
);
...
...
src/ui/SlugsPIDControl.cpp
View file @
16a68ab5
...
...
@@ -640,6 +640,8 @@ void SlugsPIDControl::sendMessagePIDStatus(int PIDtype)
}
}
#else
Q_UNUSED
(
PIDtype
);
#endif // MAVLINK_ENABLED_SLUG
}
...
...
src/ui/SlugsPadCameraControl.cpp
View file @
16a68ab5
...
...
@@ -221,7 +221,8 @@ double SlugsPadCameraControl::getDistPixel(int x1, int y1, int x2, int y2)
*/
QPointF
SlugsPadCameraControl
::
ObtenerMarcacionDistanciaPixel
(
double
lon1
,
double
lat1
,
double
lon2
,
double
lat2
)
{
double
cateto_opuesto
,
cateto_adyacente
,
hipotenusa
,
distancia
,
marcacion
;
double
cateto_opuesto
,
cateto_adyacente
,
hipotenusa
,
distancia
;
double
marcacion
=
0.0
;
//latitude and longitude first point
...
...
@@ -234,7 +235,7 @@ QPointF SlugsPadCameraControl::ObtenerMarcacionDistanciaPixel(double lon1, doubl
cateto_adyacente
=
abs
((
lon1
-
lon2
));
hipotenusa
=
sqrt
(
pow
(
cateto_opuesto
,
2
)
+
pow
(
cateto_adyacente
,
2
));
distancia
=
hipotenusa
*
60
;
distancia
=
hipotenusa
*
60
.0
;
if
((
lat1
<
lat2
)
&&
(
lon1
>
lon2
))
//primer cuadrante
...
...
src/ui/map3D/Imagery.cc
View file @
16a68ab5
...
...
@@ -75,7 +75,7 @@ Imagery::prefetch2D(double windowWidth, double windowHeight,
return
;
}
double
tileResolution
;
double
tileResolution
=
1.0
;
if
(
currentImageryType
==
GOOGLE_SATELLITE
||
currentImageryType
==
GOOGLE_MAP
)
{
...
...
@@ -131,7 +131,7 @@ Imagery::draw2D(double windowWidth, double windowHeight,
return
;
}
double
tileResolution
;
double
tileResolution
=
1.0
;
if
(
currentImageryType
==
GOOGLE_SATELLITE
||
currentImageryType
==
GOOGLE_MAP
)
{
...
...
src/ui/map3D/Pixhawk3DWidget.cc
View file @
16a68ab5
...
...
@@ -241,7 +241,7 @@ Pixhawk3DWidget::insertWaypoint(void)
{
if
(
uas
)
{
Waypoint
*
wp
;
Waypoint
*
wp
=
NULL
;
if
(
frame
==
MAV_FRAME_GLOBAL
)
{
double
latitude
=
uas
->
getLatitude
();
...
...
src/ui/map3D/PixhawkCheetahGeode.cc
View file @
16a68ab5
...
...
@@ -59300,9 +59300,10 @@ static GLfloat normals [22155][3] = {
GLfloat textures[1][2]={{0.0f,0.0f}};
/*Material indicies*/
/*{material index,face count}*/
static int material_ref [1][2] = {
{0,77848}
};
//static int material_ref [1][2] = {
//{0,77848}
//};
void MyMaterial(GLenum mode, GLfloat * f, GLfloat alpha)
{
GLfloat d[4];
src/ui/map3D/WaypointGroupNode.cc
View file @
16a68ab5
...
...
@@ -53,7 +53,9 @@ WaypointGroupNode::update(MAV_FRAME frame, UASInterface *uas)
{
if
(
uas
)
{
double
robotX
,
robotY
,
robotZ
;
double
robotX
=
0.0
;
double
robotY
=
0.0
;
double
robotZ
=
0.0
;
if
(
frame
==
MAV_FRAME_GLOBAL
)
{
double
latitude
=
uas
->
getLatitude
();
...
...
src/ui/uas/UASView.cc
View file @
16a68ab5
...
...
@@ -215,6 +215,7 @@ void UASView::hideEvent(QHideEvent* event)
void
UASView
::
receiveHeartbeat
(
UASInterface
*
uas
)
{
Q_UNUSED
(
uas
);
QString
colorstyle
;
heartbeatColor
=
QColor
(
20
,
200
,
20
);
colorstyle
=
colorstyle
.
sprintf
(
"QGroupBox { border: 1px solid #EEEEEE; border-radius: 4px; padding: 0px; margin: 0px; background-color: #%02X%02X%02X;}"
,
...
...
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