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
837d909f
Commit
837d909f
authored
Feb 14, 2014
by
Lorenz Meier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugfix imageready slot
parent
98fb2cbf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
9 deletions
+6
-9
HUD.cc
src/ui/HUD.cc
+5
-8
HUD.h
src/ui/HUD.h
+1
-1
No files found.
src/ui/HUD.cc
View file @
837d909f
...
...
@@ -292,8 +292,7 @@ void HUD::setActiveUAS(UASInterface* uas)
// Try to disconnect the image link
UAS
*
u
=
dynamic_cast
<
UAS
*>
(
this
->
uas
);
if
(
u
)
{
disconnect
(
u
,
SIGNAL
(
imageStarted
(
quint64
)),
this
,
SLOT
(
startImage
(
quint64
)));
disconnect
(
u
,
SIGNAL
(
imageReady
(
UASInterface
*
)),
this
,
SLOT
(
copyImage
()));
disconnect
(
u
,
SIGNAL
(
imageReady
(
UASInterface
*
)),
this
,
SLOT
(
copyImage
(
UASInterface
*
)));
}
}
...
...
@@ -313,10 +312,9 @@ void HUD::setActiveUAS(UASInterface* uas)
connect
(
uas
,
SIGNAL
(
waypointSelected
(
int
,
int
)),
this
,
SLOT
(
selectWaypoint
(
int
,
int
)));
// Try to connect the image link
UAS
*
u
=
dynamic
_cast
<
UAS
*>
(
uas
);
UAS
*
u
=
qobject
_cast
<
UAS
*>
(
uas
);
if
(
u
)
{
connect
(
u
,
SIGNAL
(
imageStarted
(
quint64
)),
this
,
SLOT
(
startImage
(
quint64
)));
connect
(
u
,
SIGNAL
(
imageReady
(
UASInterface
*
)),
this
,
SLOT
(
copyImage
()));
connect
(
u
,
SIGNAL
(
imageReady
(
UASInterface
*
)),
this
,
SLOT
(
copyImage
(
UASInterface
*
)));
}
}
...
...
@@ -1371,13 +1369,12 @@ void HUD::setPixels(int imgid, const unsigned char* imageData, int length, int s
}
}
void
HUD
::
copyImage
()
void
HUD
::
copyImage
(
UASInterface
*
uas
)
{
UAS
*
u
=
dynamic_cast
<
UAS
*>
(
this
->
uas
);
UAS
*
u
=
qobject_cast
<
UAS
*>
(
uas
);
if
(
u
)
{
this
->
glImage
=
u
->
getImage
();
qDebug
()
<<
"IMG:"
<<
&
this
->
glImage
;
// Save to directory if logging is enabled
if
(
imageLoggingEnabled
)
...
...
src/ui/HUD.h
View file @
837d909f
...
...
@@ -94,7 +94,7 @@ public slots:
/** @brief Enable Video */
void
enableVideo
(
bool
enabled
);
/** @brief Copy an image from the current active UAS */
void
copyImage
();
void
copyImage
(
UASInterface
*
uas
);
protected
slots
:
...
...
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