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
77863043
Unverified
Commit
77863043
authored
Feb 24, 2018
by
Gus Grubba
Committed by
GitHub
Feb 24, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6079 from mavlink/pr-plugin-control
Finer control for plugins
parents
67118103
0790eb2a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
38 deletions
+43
-38
QGCCameraControl.h
src/Camera/QGCCameraControl.h
+10
-10
QGCCameraManager.h
src/Camera/QGCCameraManager.h
+14
-14
PlanMasterController.cc
src/MissionManager/PlanMasterController.cc
+17
-14
PlanMasterController.h
src/MissionManager/PlanMasterController.h
+2
-0
No files found.
src/Camera/QGCCameraControl.h
View file @
77863043
...
@@ -202,16 +202,16 @@ protected:
...
@@ -202,16 +202,16 @@ protected:
virtual
void
_setCameraMode
(
CameraMode
mode
);
virtual
void
_setCameraMode
(
CameraMode
mode
);
protected
slots
:
protected
slots
:
v
oid
_initWhenReady
();
v
irtual
void
_initWhenReady
();
v
oid
_requestCameraSettings
();
v
irtual
void
_requestCameraSettings
();
v
oid
_requestAllParameters
();
v
irtual
void
_requestAllParameters
();
v
oid
_requestParamUpdates
();
v
irtual
void
_requestParamUpdates
();
v
oid
_requestCaptureStatus
();
v
irtual
void
_requestCaptureStatus
();
v
oid
_requestStorageInfo
();
v
irtual
void
_requestStorageInfo
();
v
oid
_downloadFinished
();
v
irtual
void
_downloadFinished
();
v
oid
_mavCommandResult
(
int
vehicleId
,
int
component
,
int
command
,
int
result
,
bool
noReponseFromVehicle
);
v
irtual
void
_mavCommandResult
(
int
vehicleId
,
int
component
,
int
command
,
int
result
,
bool
noReponseFromVehicle
);
v
oid
_dataReady
(
QByteArray
data
);
v
irtual
void
_dataReady
(
QByteArray
data
);
v
oid
_paramDone
();
v
irtual
void
_paramDone
();
private:
private:
bool
_handleLocalization
(
QByteArray
&
bytes
);
bool
_handleLocalization
(
QByteArray
&
bytes
);
...
...
src/Camera/QGCCameraManager.h
View file @
77863043
...
@@ -25,28 +25,28 @@ public:
...
@@ -25,28 +25,28 @@ public:
QGCCameraManager
(
Vehicle
*
vehicle
);
QGCCameraManager
(
Vehicle
*
vehicle
);
virtual
~
QGCCameraManager
();
virtual
~
QGCCameraManager
();
Q_PROPERTY
(
QmlObjectListModel
*
cameras
READ
cameras
NOTIFY
camerasChanged
)
Q_PROPERTY
(
QmlObjectListModel
*
cameras
READ
cameras
NOTIFY
camerasChanged
)
//-- Return a list of cameras provided by this vehicle
//-- Return a list of cameras provided by this vehicle
virtual
QmlObjectListModel
*
cameras
()
{
return
&
_cameras
;
}
virtual
QmlObjectListModel
*
cameras
()
{
return
&
_cameras
;
}
signals:
signals:
void
camerasChanged
();
void
camerasChanged
();
protected
slots
:
protected
slots
:
void
_vehicleReady
(
bool
ready
);
v
irtual
v
oid
_vehicleReady
(
bool
ready
);
void
_mavlinkMessageReceived
(
const
mavlink_message_t
&
message
);
v
irtual
v
oid
_mavlinkMessageReceived
(
const
mavlink_message_t
&
message
);
protected:
protected:
QGCCameraControl
*
_findCamera
(
int
id
);
virtual
QGCCameraControl
*
_findCamera
(
int
id
);
void
_requestCameraInfo
(
int
compID
);
v
irtual
v
oid
_requestCameraInfo
(
int
compID
);
void
_handleHeartbeat
(
const
mavlink_message_t
&
message
);
v
irtual
v
oid
_handleHeartbeat
(
const
mavlink_message_t
&
message
);
void
_handleCameraInfo
(
const
mavlink_message_t
&
message
);
v
irtual
v
oid
_handleCameraInfo
(
const
mavlink_message_t
&
message
);
void
_handleStorageInfo
(
const
mavlink_message_t
&
message
);
v
irtual
v
oid
_handleStorageInfo
(
const
mavlink_message_t
&
message
);
void
_handleCameraSettings
(
const
mavlink_message_t
&
message
);
v
irtual
v
oid
_handleCameraSettings
(
const
mavlink_message_t
&
message
);
void
_handleParamAck
(
const
mavlink_message_t
&
message
);
v
irtual
v
oid
_handleParamAck
(
const
mavlink_message_t
&
message
);
void
_handleParamValue
(
const
mavlink_message_t
&
message
);
v
irtual
v
oid
_handleParamValue
(
const
mavlink_message_t
&
message
);
void
_handleCaptureStatus
(
const
mavlink_message_t
&
message
);
v
irtual
v
oid
_handleCaptureStatus
(
const
mavlink_message_t
&
message
);
protected:
protected:
Vehicle
*
_vehicle
;
Vehicle
*
_vehicle
;
...
...
src/MissionManager/PlanMasterController.cc
View file @
77863043
...
@@ -345,6 +345,22 @@ void PlanMasterController::loadFromFile(const QString& filename)
...
@@ -345,6 +345,22 @@ void PlanMasterController::loadFromFile(const QString& filename)
}
}
}
}
QJsonDocument
PlanMasterController
::
saveToJson
()
{
QJsonObject
planJson
;
QJsonObject
missionJson
;
QJsonObject
fenceJson
;
QJsonObject
rallyJson
;
JsonHelper
::
saveQGCJsonFileHeader
(
planJson
,
_planFileType
,
_planFileVersion
);
_missionController
.
save
(
missionJson
);
_geoFenceController
.
save
(
fenceJson
);
_rallyPointController
.
save
(
rallyJson
);
planJson
[
_jsonMissionObjectKey
]
=
missionJson
;
planJson
[
_jsonGeoFenceObjectKey
]
=
fenceJson
;
planJson
[
_jsonRallyPointsObjectKey
]
=
rallyJson
;
return
QJsonDocument
(
planJson
);
}
void
PlanMasterController
::
saveToFile
(
const
QString
&
filename
)
void
PlanMasterController
::
saveToFile
(
const
QString
&
filename
)
{
{
if
(
filename
.
isEmpty
())
{
if
(
filename
.
isEmpty
())
{
...
@@ -361,20 +377,7 @@ void PlanMasterController::saveToFile(const QString& filename)
...
@@ -361,20 +377,7 @@ void PlanMasterController::saveToFile(const QString& filename)
if
(
!
file
.
open
(
QIODevice
::
WriteOnly
|
QIODevice
::
Text
))
{
if
(
!
file
.
open
(
QIODevice
::
WriteOnly
|
QIODevice
::
Text
))
{
qgcApp
()
->
showMessage
(
tr
(
"Plan save error %1 : %2"
).
arg
(
filename
).
arg
(
file
.
errorString
()));
qgcApp
()
->
showMessage
(
tr
(
"Plan save error %1 : %2"
).
arg
(
filename
).
arg
(
file
.
errorString
()));
}
else
{
}
else
{
QJsonObject
planJson
;
QJsonDocument
saveDoc
=
saveToJson
();
QJsonObject
missionJson
;
QJsonObject
fenceJson
;
QJsonObject
rallyJson
;
JsonHelper
::
saveQGCJsonFileHeader
(
planJson
,
_planFileType
,
_planFileVersion
);
_missionController
.
save
(
missionJson
);
_geoFenceController
.
save
(
fenceJson
);
_rallyPointController
.
save
(
rallyJson
);
planJson
[
_jsonMissionObjectKey
]
=
missionJson
;
planJson
[
_jsonGeoFenceObjectKey
]
=
fenceJson
;
planJson
[
_jsonRallyPointsObjectKey
]
=
rallyJson
;
QJsonDocument
saveDoc
(
planJson
);
file
.
write
(
saveDoc
.
toJson
());
file
.
write
(
saveDoc
.
toJson
());
}
}
...
...
src/MissionManager/PlanMasterController.h
View file @
77863043
...
@@ -80,6 +80,8 @@ public:
...
@@ -80,6 +80,8 @@ public:
QStringList
saveNameFilters
(
void
)
const
;
QStringList
saveNameFilters
(
void
)
const
;
QStringList
saveKmlFilters
(
void
)
const
;
QStringList
saveKmlFilters
(
void
)
const
;
QJsonDocument
saveToJson
();
Vehicle
*
controllerVehicle
(
void
)
{
return
_controllerVehicle
;
}
Vehicle
*
controllerVehicle
(
void
)
{
return
_controllerVehicle
;
}
Vehicle
*
managerVehicle
(
void
)
{
return
_managerVehicle
;
}
Vehicle
*
managerVehicle
(
void
)
{
return
_managerVehicle
;
}
...
...
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