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
837d909f
Commit
837d909f
authored
Feb 14, 2014
by
Lorenz Meier
Browse files
Bugfix imageready slot
parent
98fb2cbf
Changes
2
Hide whitespace changes
Inline
Side-by-side
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
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