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
2eeee80e
Commit
2eeee80e
authored
Jul 19, 2017
by
Gus Grubba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move init to constructor
parent
e1a936e7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
17 deletions
+9
-17
QGCCameraControl.cc
src/Camera/QGCCameraControl.cc
+9
-16
QGCCameraControl.h
src/Camera/QGCCameraControl.h
+0
-1
No files found.
src/Camera/QGCCameraControl.cc
View file @
2eeee80e
...
...
@@ -115,7 +115,15 @@ QGCCameraControl::QGCCameraControl(const mavlink_camera_information_t *info, Veh
,
_cameraMode
(
CAMERA_MODE_UNDEFINED
)
,
_video_status
(
VIDEO_CAPTURE_STATUS_UNDEFINED
)
{
_processCameraInfo
(
info
);
memcpy
(
&
_info
,
&
info
,
sizeof
(
mavlink_camera_information_t
));
connect
(
this
,
&
QGCCameraControl
::
dataReady
,
this
,
&
QGCCameraControl
::
_dataReady
);
if
(
_info
.
cam_definition_uri
[
0
])
{
//-- Process camera definition file
const
char
*
url
=
(
const
char
*
)
info
->
cam_definition_uri
;
_httpRequest
(
url
);
}
else
{
_initWhenReady
();
}
}
//-----------------------------------------------------------------------------
...
...
@@ -132,21 +140,6 @@ QGCCameraControl::~QGCCameraControl()
}
}
//-----------------------------------------------------------------------------
void
QGCCameraControl
::
_processCameraInfo
(
const
mavlink_camera_information_t
*
info
)
{
memcpy
(
&
_info
,
&
info
,
sizeof
(
mavlink_camera_information_t
));
connect
(
this
,
&
QGCCameraControl
::
dataReady
,
this
,
&
QGCCameraControl
::
_dataReady
);
if
(
_info
.
cam_definition_uri
[
0
])
{
//-- Process camera definition file
const
char
*
url
=
(
const
char
*
)
info
->
cam_definition_uri
;
_httpRequest
(
url
);
}
else
{
_initWhenReady
();
}
}
//-----------------------------------------------------------------------------
void
QGCCameraControl
::
_initWhenReady
()
...
...
src/Camera/QGCCameraControl.h
View file @
2eeee80e
...
...
@@ -155,7 +155,6 @@ signals:
protected:
virtual
void
_setVideoStatus
(
VideoStatus
status
);
virtual
void
_setCameraMode
(
CameraMode
mode
);
virtual
void
_processCameraInfo
(
const
mavlink_camera_information_t
*
info
);
private
slots
:
void
_initWhenReady
();
...
...
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