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
d626b626
Commit
d626b626
authored
Jul 03, 2010
by
lm
Browse files
Added update of current waypoint indicator
parent
52e8d9bf
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/ui/uas/UASControlWidget.cc
View file @
d626b626
...
...
@@ -201,16 +201,14 @@ void UASControlWidget::cycleContextButton()
if
(
!
engineOn
)
{
ui
.
controlButton
->
setText
(
tr
(
"Stop Engine"
));
mav
->
setMode
(
MAV_MODE_MANUAL
);
mav
->
enable_motors
();
ui
.
lastActionLabel
->
setText
(
QString
(
"
E
nable
d
motors on %1"
).
arg
(
uas
->
getUASName
()));
ui
.
lastActionLabel
->
setText
(
QString
(
"
Attempted to e
nable motors on %1"
).
arg
(
uas
->
getUASName
()));
}
else
{
ui
.
controlButton
->
setText
(
tr
(
"Activate Engine"
));
mav
->
setMode
(
MAV_MODE_LOCKED
);
mav
->
disable_motors
();
ui
.
lastActionLabel
->
setText
(
QString
(
"
D
isable
d
motors on %1"
).
arg
(
uas
->
getUASName
()));
ui
.
lastActionLabel
->
setText
(
QString
(
"
Attempted to d
isable motors on %1"
).
arg
(
uas
->
getUASName
()));
}
//ui.controlButton->setText(tr("Force Landing"));
//ui.controlButton->setText(tr("KILL VEHICLE"));
...
...
src/ui/uas/UASView.cc
View file @
d626b626
...
...
@@ -36,6 +36,7 @@ This file is part of the PIXHAWK project
#include
"MG.h"
#include
"UASManager.h"
#include
"UASView.h"
#include
"UASWaypointManager.h"
#include
"ui_UASView.h"
UASView
::
UASView
(
UASInterface
*
uas
,
QWidget
*
parent
)
:
...
...
@@ -75,6 +76,7 @@ UASView::UASView(UASInterface* uas, QWidget *parent) :
connect
(
uas
,
SIGNAL
(
loadChanged
(
UASInterface
*
,
double
)),
this
,
SLOT
(
updateLoad
(
UASInterface
*
,
double
)));
//connect(uas, SIGNAL(waypointUpdated(int,int,double,double,double,double,bool,bool)), this, SLOT(setWaypoint(int,int,double,double,double,double,bool,bool)));
connect
(
uas
,
SIGNAL
(
waypointSelected
(
int
,
int
)),
this
,
SLOT
(
selectWaypoint
(
int
,
int
)));
connect
(
&
(
uas
->
getWaypointManager
()),
SIGNAL
(
currentWaypointChanged
(
quint16
)),
this
,
SLOT
(
currentWaypointUpdated
(
quint16
)));
connect
(
uas
,
SIGNAL
(
systemTypeSet
(
UASInterface
*
,
uint
)),
this
,
SLOT
(
setSystemType
(
UASInterface
*
,
uint
)));
// Setup UAS selection
...
...
@@ -251,6 +253,11 @@ void UASView::updateSpeed(UASInterface*, double x, double y, double z, quint64 u
totalSpeed
=
sqrt
((
pow
(
x
,
2
)
+
pow
(
y
,
2
)
+
pow
(
z
,
2
)));
}
void
UASView
::
currentWaypointUpdated
(
quint16
waypoint
)
{
m_ui
->
waypointLabel
->
setText
(
tr
(
"WP"
)
+
QString
::
number
(
waypoint
));
}
void
UASView
::
setWaypoint
(
int
uasId
,
int
id
,
double
x
,
double
y
,
double
z
,
double
yaw
,
bool
autocontinue
,
bool
current
)
{
Q_UNUSED
(
x
);
...
...
src/ui/uas/UASView.h
View file @
d626b626
...
...
@@ -63,6 +63,8 @@ public slots:
void
refresh
();
/** @brief Receive new waypoint information */
void
setWaypoint
(
int
uasId
,
int
id
,
double
x
,
double
y
,
double
z
,
double
yaw
,
bool
autocontinue
,
bool
current
);
/** @brief Update the current active waypoint */
void
currentWaypointUpdated
(
quint16
waypoint
);
/** @brief Set waypoint as current target */
void
selectWaypoint
(
int
uasId
,
int
id
);
/** @brief Set the current system type */
...
...
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