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
1fe54579
Commit
1fe54579
authored
Mar 09, 2011
by
Mariano Lizarraga
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'experimental' of
git://github.com/amolinap/qgroundcontrol
into experimental
parents
5379a798
b5af9b84
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
158 additions
and
125 deletions
+158
-125
MapWidget.cc
src/ui/MapWidget.cc
+134
-99
MapWidget.h
src/ui/MapWidget.h
+9
-21
SlugsPadCameraControl.ui
src/ui/SlugsPadCameraControl.ui
+4
-1
UASControlParameters.cpp
src/ui/uas/UASControlParameters.cpp
+11
-4
No files found.
src/ui/MapWidget.cc
View file @
1fe54579
This diff is collapsed.
Click to expand it.
src/ui/MapWidget.h
View file @
1fe54579
...
...
@@ -40,8 +40,7 @@ This file is part of the QGROUNDCONTROL project
#include "QPointF"
#include <qmath.h>
#include <QSettings>
class
QMenu
;
class
Waypoint
;
...
...
@@ -76,8 +75,8 @@ public slots:
void
updateAttitude
(
UASInterface
*
uas
,
double
roll
,
double
pitch
,
double
yaw
,
quint64
usec
);
void
updateGlobalPosition
(
UASInterface
*
uas
,
double
lat
,
double
lon
,
double
alt
,
quint64
usec
);
void
updatePosition
(
float
time
,
double
lat
,
double
lon
);
void
updateCameraPosition
(
double
distance
,
double
bearing
,
QString
dir
);
QPointF
getPointxBearing_Range
(
double
lat1
,
double
lon1
,
double
bearing
,
double
distance
);
//
void updateCameraPosition(double distance, double bearing, QString dir);
//
QPointF getPointxBearing_Range(double lat1, double lon1, double bearing, double distance);
/** @brief Clear the waypoints overlay layer */
void
clearWaypoints
(
int
uas
=
0
);
...
...
@@ -93,7 +92,7 @@ public slots:
void
updateWaypoint
(
int
uas
,
Waypoint
*
wp
);
void
updateWaypoint
(
int
uas
,
Waypoint
*
wp
,
bool
updateView
);
void
drawBorderCamAtMap
(
bool
status
);
//
void drawBorderCamAtMap(bool status);
/** @brief Bring up dialog to go to a specific location */
void
goTo
();
...
...
@@ -130,8 +129,6 @@ protected:
qmapcontrol
::
Layer
*
tracks
;
///< Layer for UAV tracks
qmapcontrol
::
GeometryLayer
*
geomLayer
;
///< Layer for waypoints
qmapcontrol
::
GeometryLayer
*
homePosition
;
///< Layer for station control
//only for experiment
//qmapcontrol::GeometryLayer* camLayer; ///< Layer for camera indicator
int
zoomLevel
;
int
detailZoom
;
///< Steps zoomed in further than qMapControl allows
...
...
@@ -143,8 +140,6 @@ protected:
QMap
<
int
,
qmapcontrol
::
Point
*>
uasIcons
;
QMap
<
int
,
qmapcontrol
::
LineString
*>
uasTrails
;
QMap
<
int
,
QPen
*>
mavPens
;
//QMap<int, QList<qmapcontrol::Point*> > mavWps;
//QMap<int, qmapcontrol::LineString*> waypointPaths;
UASInterface
*
mav
;
quint64
lastUpdate
;
bool
initialized
;
...
...
@@ -158,6 +153,8 @@ protected:
void
captureGeometryDrag
(
Geometry
*
geom
,
QPointF
coordinate
);
void
captureGeometryEndDrag
(
Geometry
*
geom
,
QPointF
coordinate
);
void
captureGeometryDragHome
(
Geometry
*
geom
,
QPointF
coordinate
);
void
createPathButtonClicked
(
bool
checked
);
/** @brief Create the graphic representation of the waypoint */
...
...
@@ -165,16 +162,14 @@ protected:
void
mapproviderSelected
(
QAction
*
action
);
void
createHomePosition
(
const
QMouseEvent
*
event
,
const
QPointF
coordinate
);
void
createHomePosition
(
const
QPointF
coordinate
);
void
createHomePositionClick
(
bool
click
);
void
loadSettingsMap
(
QSettings
&
);
signals:
//void movePoint(QPointF newCoord);
//void captureMapCoordinateClick(const QPointF coordinate); //ROCA
//void createGlobalWP(bool value, QPointF centerCoordinate);
void
waypointCreated
(
Waypoint
*
wp
);
void
sendGeometryEndDrag
(
const
QPointF
coordinate
,
const
int
index
);
private:
Ui
::
MapWidget
*
m_ui
;
QList
<
qmapcontrol
::
Point
*>
wps
;
...
...
@@ -184,15 +179,8 @@ private:
QPen
*
pointPen
;
int
wpExists
(
const
QPointF
coordinate
);
bool
waypointIsDrag
;
qmapcontrol
::
LineString
*
camLine
;
QList
<
qmapcontrol
::
Point
*>
camPoints
;
QPointF
lastCamBorderPos
;
bool
drawCamBorder
;
int
radioCamera
;
QPointF
homeCoordinate
;
int8_t
index
;
};
#endif // MAPWIDGET_H
src/ui/SlugsPadCameraControl.ui
View file @
1fe54579
...
...
@@ -41,7 +41,7 @@
<bool>
true
</bool>
</property>
<property
name=
"styleSheet"
>
<string
notr=
"true"
>
background-color: rgb
a(255, 0, 0,50%
);
</string>
<string
notr=
"true"
>
background-color: rgb
(135, 206, 235
);
</string>
</property>
<property
name=
"frameShape"
>
<enum>
QFrame::StyledPanel
</enum>
...
...
@@ -67,6 +67,9 @@
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
>
<item>
<widget
class=
"QLabel"
name=
"lbPixel"
>
<property
name=
"styleSheet"
>
<string
notr=
"true"
>
font-color:rgb(0, 0, 0);
</string>
</property>
<property
name=
"text"
>
<string>
----
</string>
</property>
...
...
src/ui/uas/UASControlParameters.cpp
View file @
1fe54579
...
...
@@ -80,11 +80,11 @@ void UASControlParameters::changedMode(int mode)
if
(
modeTemp
!=
this
->
mode
)
{
ui
->
lbMode
->
setStyleSheet
(
"background-color: rgb(
255, 0, 0
)"
);
ui
->
lbMode
->
setStyleSheet
(
"background-color: rgb(
165, 42, 42
)"
);
}
else
{
ui
->
lbMode
->
setStyleSheet
(
"background-color: rgb(
0, 255, 0
)"
);
ui
->
lbMode
->
setStyleSheet
(
"background-color: rgb(
85, 107, 47
)"
);
}
}
...
...
@@ -104,12 +104,17 @@ void UASControlParameters::activeUasSet(UASInterface *uas)
void
UASControlParameters
::
updateGlobalPosition
(
UASInterface
*
a
,
double
b
,
double
c
,
double
aa
,
quint64
ab
)
{
//ui->sbHeight->setValue(aa);
Q_UNUSED
(
a
);
Q_UNUSED
(
b
);
Q_UNUSED
(
c
);
Q_UNUSED
(
ab
);
this
->
altitude
=
aa
;
}
void
UASControlParameters
::
speedChanged
(
UASInterface
*
uas
,
double
vx
,
double
vy
,
double
vz
,
quint64
time
)
{
Q_UNUSED
(
time
);
Q_UNUSED
(
uas
);
this
->
speed
=
sqrt
(
pow
(
vx
,
2.0
)
+
pow
(
vy
,
2.0
)
+
pow
(
vz
,
2.0
));
//ui->sbAirSpeed->setValue(speed);
}
...
...
@@ -117,6 +122,8 @@ void UASControlParameters::speedChanged(UASInterface* uas, double vx, double vy,
void
UASControlParameters
::
updateAttitude
(
UASInterface
*
uas
,
double
roll
,
double
pitch
,
double
yaw
,
quint64
time
)
{
Q_UNUSED
(
uas
);
Q_UNUSED
(
pitch
);
Q_UNUSED
(
yaw
);
Q_UNUSED
(
time
);
//ui->sbTurnRate->setValue(roll);
this
->
roll
=
roll
;
...
...
@@ -194,7 +201,7 @@ void UASControlParameters::updateMode(int uas,QString mode,QString description)
this
->
mode
=
mode
;
ui
->
lbMode
->
setText
(
this
->
mode
);
ui
->
lbMode
->
setStyleSheet
(
"background-color: rgb(
0, 255, 0
)"
);
ui
->
lbMode
->
setStyleSheet
(
"background-color: rgb(
85, 107, 47
)"
);
}
void
UASControlParameters
::
thrustChanged
(
UASInterface
*
uas
,
double
throttle
)
...
...
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