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
c88d83e8
Commit
c88d83e8
authored
Dec 19, 2010
by
pixhawk
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'experimental' into dev
parents
6a455039
315dbba9
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
94 additions
and
52 deletions
+94
-52
qgroundcontrol.pro
qgroundcontrol.pro
+4
-2
MAVLinkSimulationLink.h
src/comm/MAVLinkSimulationLink.h
+1
-1
MAVLinkSwarmSimulationLink.cc
src/comm/MAVLinkSwarmSimulationLink.cc
+12
-0
MAVLinkSwarmSimulationLink.h
src/comm/MAVLinkSwarmSimulationLink.h
+19
-0
MapWidget.cc
src/ui/MapWidget.cc
+0
-9
MAV2DIcon.cc
src/ui/map/MAV2DIcon.cc
+49
-40
Pixhawk3DWidget.cc
src/ui/map3D/Pixhawk3DWidget.cc
+9
-0
No files found.
qgroundcontrol.pro
View file @
c88d83e8
...
@@ -250,7 +250,8 @@ HEADERS += src/MG.h \
...
@@ -250,7 +250,8 @@ HEADERS += src/MG.h \
src
/
ui
/
SlugsPIDControl
.
h
\
src
/
ui
/
SlugsPIDControl
.
h
\
src
/
ui
/
SlugsVideoCamControl
.
h
\
src
/
ui
/
SlugsVideoCamControl
.
h
\
src
/
ui
/
SlugsPadCameraControl
.
h
\
src
/
ui
/
SlugsPadCameraControl
.
h
\
src
/
ui
/
QGCMainWindowAPConfigurator
.
h
src
/
ui
/
QGCMainWindowAPConfigurator
.
h
\
src
/
comm
/
MAVLinkSwarmSimulationLink
.
h
contains
(
DEPENDENCIES_PRESENT
,
osg
)
{
contains
(
DEPENDENCIES_PRESENT
,
osg
)
{
message
(
"Including headers for OpenSceneGraph"
)
message
(
"Including headers for OpenSceneGraph"
)
...
@@ -361,7 +362,8 @@ SOURCES += src/main.cc \
...
@@ -361,7 +362,8 @@ SOURCES += src/main.cc \
src
/
ui
/
SlugsPIDControl
.
cpp
\
src
/
ui
/
SlugsPIDControl
.
cpp
\
src
/
ui
/
SlugsVideoCamControl
.
cpp
\
src
/
ui
/
SlugsVideoCamControl
.
cpp
\
src
/
ui
/
SlugsPadCameraControl
.
cpp
\
src
/
ui
/
SlugsPadCameraControl
.
cpp
\
src
/
ui
/
QGCMainWindowAPConfigurator
.
cc
src
/
ui
/
QGCMainWindowAPConfigurator
.
cc
\
src
/
comm
/
MAVLinkSwarmSimulationLink
.
cc
contains
(
DEPENDENCIES_PRESENT
,
osg
)
{
contains
(
DEPENDENCIES_PRESENT
,
osg
)
{
message
(
"Including sources for OpenSceneGraph"
)
message
(
"Including sources for OpenSceneGraph"
)
...
...
src/comm/MAVLinkSimulationLink.h
View file @
c88d83e8
...
@@ -85,7 +85,7 @@ public:
...
@@ -85,7 +85,7 @@ public:
public
slots
:
public
slots
:
void
writeBytes
(
const
char
*
data
,
qint64
size
);
void
writeBytes
(
const
char
*
data
,
qint64
size
);
void
readBytes
();
void
readBytes
();
void
mainloop
();
v
irtual
v
oid
mainloop
();
bool
connectLink
(
bool
connect
);
bool
connectLink
(
bool
connect
);
...
...
src/comm/MAVLinkSwarmSimulationLink.cc
0 → 100644
View file @
c88d83e8
#include "MAVLinkSwarmSimulationLink.h"
MAVLinkSwarmSimulationLink
::
MAVLinkSwarmSimulationLink
(
QObject
*
parent
)
:
MAVLinkSimulationLink
()
{
}
void
MAVLinkSwarmSimulationLink
::
mainloop
()
{
}
src/comm/MAVLinkSwarmSimulationLink.h
0 → 100644
View file @
c88d83e8
#ifndef MAVLINKSWARMSIMULATIONLINK_H
#define MAVLINKSWARMSIMULATIONLINK_H
#include "MAVLinkSimulationLink.h"
class
MAVLinkSwarmSimulationLink
:
public
MAVLinkSimulationLink
{
Q_OBJECT
public:
explicit
MAVLinkSwarmSimulationLink
(
QObject
*
parent
=
0
);
signals:
public
slots
:
void
mainloop
();
};
#endif // MAVLINKSWARMSIMULATIONLINK_H
src/ui/MapWidget.cc
View file @
c88d83e8
...
@@ -593,21 +593,12 @@ void MapWidget::updateGlobalPosition(UASInterface* uas, double lat, double lon,
...
@@ -593,21 +593,12 @@ void MapWidget::updateGlobalPosition(UASInterface* uas, double lat, double lon,
uasTrails
.
value
(
uas
->
getUASID
())
->
addPoint
(
new
qmapcontrol
::
Point
(
lat
,
lon
,
QString
(
"lat: %1 lon: %2"
).
arg
(
lat
,
lon
)));
uasTrails
.
value
(
uas
->
getUASID
())
->
addPoint
(
new
qmapcontrol
::
Point
(
lat
,
lon
,
QString
(
"lat: %1 lon: %2"
).
arg
(
lat
,
lon
)));
}
}
// points.append(new CirclePoint(8.275145, 50.016992, 15, "Wiesbaden-Mainz-Kastel, Johannes-Goßner-Straße", Point::Middle, pointpen));
// points.append(new CirclePoint(8.270476, 50.021426, 15, "Wiesbaden-Mainz-Kastel, Ruthof", Point::Middle, pointpen));
// // "Blind" Points
// points.append(new Point(8.266445, 50.025913, "Wiesbaden-Mainz-Kastel, Mudra Kaserne"));
// points.append(new Point(8.260378, 50.030345, "Wiesbaden-Mainz-Amoneburg, Dyckerhoffstraße"));
// Connect click events of the layer to this object
// Connect click events of the layer to this object
// connect(osmLayer, SIGNAL(geometryClicked(Geometry*, QPoint)),
// connect(osmLayer, SIGNAL(geometryClicked(Geometry*, QPoint)),
// this, SLOT(geometryClicked(Geometry*, QPoint)));
// this, SLOT(geometryClicked(Geometry*, QPoint)));
// Sets the view to the interesting area
// Sets the view to the interesting area
//QList<QPointF> view;
//view.append(QPointF(8.24764, 50.0319));
//view.append(QPointF(8.28412, 49.9998));
// mc->setView(view);
updatePosition
(
0
,
lat
,
lon
);
updatePosition
(
0
,
lat
,
lon
);
}
}
}
}
...
...
src/ui/map/MAV2DIcon.cc
View file @
c88d83e8
...
@@ -14,7 +14,10 @@ MAV2DIcon::MAV2DIcon(qreal x, qreal y, QString name, Alignment alignment, QPen*
...
@@ -14,7 +14,10 @@ MAV2DIcon::MAV2DIcon(qreal x, qreal y, QString name, Alignment alignment, QPen*
{
{
int
radius
=
10
;
int
radius
=
10
;
size
=
QSize
(
radius
,
radius
);
size
=
QSize
(
radius
,
radius
);
drawIcon
(
pen
);
if
(
pen
)
{
drawIcon
(
pen
);
}
}
}
MAV2DIcon
::~
MAV2DIcon
()
MAV2DIcon
::~
MAV2DIcon
()
...
@@ -24,8 +27,11 @@ MAV2DIcon::~MAV2DIcon()
...
@@ -24,8 +27,11 @@ MAV2DIcon::~MAV2DIcon()
void
MAV2DIcon
::
setPen
(
QPen
*
pen
)
void
MAV2DIcon
::
setPen
(
QPen
*
pen
)
{
{
mypen
=
pen
;
if
(
pen
)
drawIcon
(
pen
);
{
mypen
=
pen
;
drawIcon
(
pen
);
}
}
}
/**
/**
...
@@ -38,46 +44,49 @@ void MAV2DIcon::setYaw(float yaw)
...
@@ -38,46 +44,49 @@ void MAV2DIcon::setYaw(float yaw)
void
MAV2DIcon
::
drawIcon
(
QPen
*
pen
)
void
MAV2DIcon
::
drawIcon
(
QPen
*
pen
)
{
{
mypixmap
=
new
QPixmap
(
radius
+
1
,
radius
+
1
);
if
(
pen
)
mypixmap
->
fill
(
Qt
::
transparent
);
{
QPainter
painter
(
mypixmap
);
mypixmap
=
new
QPixmap
(
radius
+
1
,
radius
+
1
);
mypixmap
->
fill
(
Qt
::
transparent
);
QPainter
painter
(
mypixmap
);
// DRAW MICRO AIR VEHICLE
// DRAW MICRO AIR VEHICLE
QPointF
p
(
radius
/
2
,
radius
/
2
);
QPointF
p
(
radius
/
2
,
radius
/
2
);
float
waypointSize
=
radius
;
float
waypointSize
=
radius
;
QPolygonF
poly
(
3
);
QPolygonF
poly
(
3
);
// Top point
// Top point
poly
.
replace
(
0
,
QPointF
(
p
.
x
(),
p
.
y
()
+
waypointSize
/
2.0
f
));
poly
.
replace
(
0
,
QPointF
(
p
.
x
(),
p
.
y
()
+
waypointSize
/
2.0
f
));
// Right point
// Right point
poly
.
replace
(
1
,
QPointF
(
p
.
x
()
-
waypointSize
/
2.0
f
,
p
.
y
()
-
waypointSize
/
2.0
f
));
poly
.
replace
(
1
,
QPointF
(
p
.
x
()
-
waypointSize
/
2.0
f
,
p
.
y
()
-
waypointSize
/
2.0
f
));
// Left point
// Left point
poly
.
replace
(
2
,
QPointF
(
p
.
x
()
+
waypointSize
/
2.0
f
,
p
.
y
()
+
waypointSize
/
2.0
f
));
poly
.
replace
(
2
,
QPointF
(
p
.
x
()
+
waypointSize
/
2.0
f
,
p
.
y
()
+
waypointSize
/
2.0
f
));
// // Select color based on if this is the current waypoint
// // Select color based on if this is the current waypoint
// if (list.at(i)->getCurrent())
// if (list.at(i)->getCurrent())
// {
// {
// color = QGC::colorCyan;//uas->getColor();
// color = QGC::colorCyan;//uas->getColor();
// pen.setWidthF(refLineWidthToPen(0.8f));
// pen.setWidthF(refLineWidthToPen(0.8f));
// }
// }
// else
// else
// {
// {
// color = uas->getColor();
// color = uas->getColor();
// pen.setWidthF(refLineWidthToPen(0.4f));
// pen.setWidthF(refLineWidthToPen(0.4f));
// }
// }
//pen.setColor(color);
//pen.setColor(color);
if
(
pen
)
if
(
pen
)
{
{
pen
->
setWidthF
(
2
);
pen
->
setWidthF
(
2
);
painter
.
setPen
(
*
pen
);
painter
.
setPen
(
*
pen
);
}
}
else
else
{
{
QPen
pen2
(
Qt
::
yellow
);
QPen
pen2
(
Qt
::
yellow
);
pen2
.
setWidth
(
2
);
pen2
.
setWidth
(
2
);
painter
.
setPen
(
pen2
);
painter
.
setPen
(
pen2
);
}
painter
.
setBrush
(
Qt
::
NoBrush
);
painter
.
drawPolygon
(
poly
);
}
}
painter
.
setBrush
(
Qt
::
NoBrush
);
painter
.
drawPolygon
(
poly
);
}
}
src/ui/map3D/Pixhawk3DWidget.cc
View file @
c88d83e8
...
@@ -393,6 +393,15 @@ Pixhawk3DWidget::findVehicleModels(void)
...
@@ -393,6 +393,15 @@ Pixhawk3DWidget::findVehicleModels(void)
// add Pixhawk Bravo model
// add Pixhawk Bravo model
nodes
.
push_back
(
PixhawkCheetahGeode
::
instance
());
nodes
.
push_back
(
PixhawkCheetahGeode
::
instance
());
// add sphere of 0.05m radius
osg
::
ref_ptr
<
osg
::
Sphere
>
sphere
=
new
osg
::
Sphere
(
osg
::
Vec3f
(
0.0
f
,
0.0
f
,
0.0
f
),
0.05
f
);
osg
::
ref_ptr
<
osg
::
ShapeDrawable
>
sphereDrawable
=
new
osg
::
ShapeDrawable
(
sphere
);
sphereDrawable
->
setColor
(
osg
::
Vec4f
(
0.5
f
,
0.0
f
,
0.5
f
,
1.0
f
));
osg
::
ref_ptr
<
osg
::
Geode
>
sphereGeode
=
new
osg
::
Geode
;
sphereGeode
->
addDrawable
(
sphereDrawable
);
sphereGeode
->
setName
(
"Sphere (0.1m)"
);
nodes
.
push_back
(
sphereGeode
);
// add all other models in folder
// add all other models in folder
for
(
int
i
=
0
;
i
<
files
.
size
();
++
i
)
for
(
int
i
=
0
;
i
<
files
.
size
();
++
i
)
{
{
...
...
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