From e1a936e729c5a6f0ca3ca9c211d41e42b60171af Mon Sep 17 00:00:00 2001 From: Gus Grubba Date: Wed, 19 Jul 2017 15:13:46 -0400 Subject: [PATCH] Remove test URL --- src/Camera/QGCCameraControl.cc | 24 ++++++++++++++++-------- src/Camera/QGCCameraControl.h | 1 + 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/src/Camera/QGCCameraControl.cc b/src/Camera/QGCCameraControl.cc index 14c418caf..f94a6dda1 100644 --- a/src/Camera/QGCCameraControl.cc +++ b/src/Camera/QGCCameraControl.cc @@ -115,14 +115,7 @@ QGCCameraControl::QGCCameraControl(const mavlink_camera_information_t *info, Veh , _cameraMode(CAMERA_MODE_UNDEFINED) , _video_status(VIDEO_CAPTURE_STATUS_UNDEFINED) { - memcpy(&_info, &info, sizeof(mavlink_camera_information_t)); - connect(this, &QGCCameraControl::dataReady, this, &QGCCameraControl::_dataReady); - if(1 /*_info.cam_definition_uri[0]*/) { - //-- Process camera definition file - _httpRequest("http://www.grubba.com/e90.xml"); - } else { - _initWhenReady(); - } + _processCameraInfo(info); } //----------------------------------------------------------------------------- @@ -139,6 +132,21 @@ 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() diff --git a/src/Camera/QGCCameraControl.h b/src/Camera/QGCCameraControl.h index 41c337521..a6bdcde59 100644 --- a/src/Camera/QGCCameraControl.h +++ b/src/Camera/QGCCameraControl.h @@ -155,6 +155,7 @@ 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 (); -- 2.22.0