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
1fe2818b
Commit
1fe2818b
authored
Jul 09, 2013
by
dongfang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PrimaryFlightDisplay now receiving UAS added/removed signals
parent
bbc987bc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
5 deletions
+27
-5
qgroundcontrol.pro
qgroundcontrol.pro
+1
-1
PrimaryFlightDisplay.cc
src/ui/PrimaryFlightDisplay.cc
+23
-3
PrimaryFlightDisplay.h
src/ui/PrimaryFlightDisplay.h
+3
-1
No files found.
qgroundcontrol.pro
View file @
1fe2818b
...
...
@@ -572,7 +572,7 @@ SOURCES += src/main.cc \
src
/
ui
/
QGCTabbedInfoView
.
cpp
\
src
/
ui
/
UASRawStatusView
.
cpp
\
src
/
ui
/
PrimaryFlightDisplay
.
cc
\
src
/
ui
/
uas
/
QGCMessageView
.
cc
src
/
ui
/
uas
/
QGCMessageView
.
cc
\
src
/
ui
/
JoystickButton
.
cc
\
src
/
ui
/
JoystickAxis
.
cc
...
...
src/ui/PrimaryFlightDisplay.cc
View file @
1fe2818b
...
...
@@ -163,14 +163,23 @@ PrimaryFlightDisplay::PrimaryFlightDisplay(int width, int height, QWidget *paren
font
(
"Bitstream Vera Sans"
),
refreshTimer
(
new
QTimer
(
this
))
{
Q_UNUSED
(
width
)
Q_UNUSED
(
height
)
Q_UNUSED
(
width
)
;
Q_UNUSED
(
height
)
;
setMinimumSize
(
120
,
80
);
setSizePolicy
(
QSizePolicy
::
Expanding
,
QSizePolicy
::
Expanding
);
// Connect with UAS
// Connect with UAS signal
connect
(
UASManager
::
instance
(),
SIGNAL
(
UASCreated
(
UASInterface
*
)),
this
,
SLOT
(
addUAS
(
UASInterface
*
)));
// connect(UASManager::instance(), SIGNAL(UASDeleted(UASInterface*)), this, SLOT(forgetUAS(UASInterface*)));
connect
(
UASManager
::
instance
(),
SIGNAL
(
activeUASSet
(
UASInterface
*
)),
this
,
SLOT
(
setActiveUAS
(
UASInterface
*
)));
// Get a list of all existing UAS and - well attach to one of them. The first one.
foreach
(
UASInterface
*
uas
,
UASManager
::
instance
()
->
getUASList
())
{
addUAS
(
uas
);
}
if
(
UASManager
::
instance
()
->
getActiveUAS
()
!=
NULL
)
setActiveUAS
(
UASManager
::
instance
()
->
getActiveUAS
());
// Refresh timer
...
...
@@ -244,6 +253,17 @@ void PrimaryFlightDisplay::paintEvent(QPaintEvent *event)
/*
* Interface towards qgroundcontrol
*/
void
PrimaryFlightDisplay
::
addUAS
(
UASInterface
*
uas
)
{
if
(
uas
)
{
if
(
!
this
->
uas
)
{
setActiveUAS
(
uas
);
}
}
}
/**
*
* @param uas the UAS/MAV to monitor/display with the HUD
...
...
src/ui/PrimaryFlightDisplay.h
View file @
1fe2818b
...
...
@@ -26,7 +26,9 @@ public slots:
void
updateNavigationControllerErrors
(
UASInterface
*
uas
,
double
altitudeError
,
double
speedError
,
double
xtrackError
);
/** @brief Set the currently monitored UAS */
virtual
void
setActiveUAS
(
UASInterface
*
uas
);
void
addUAS
(
UASInterface
*
uas
);
//void forgetUAS(UASInterface* uas);
void
setActiveUAS
(
UASInterface
*
uas
);
protected:
enum
Layout
{
...
...
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