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
b5b1d616
Commit
b5b1d616
authored
Dec 25, 2015
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
APM Stack Camera Config
parent
09e505e2
Changes
13
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
694 additions
and
2 deletions
+694
-2
qgcresources.qrc
qgcresources.qrc
+2
-0
qgroundcontrol.pro
qgroundcontrol.pro
+2
-0
qgroundcontrol.qrc
qgroundcontrol.qrc
+2
-0
APMAutoPilotPlugin.cc
src/AutoPilotPlugins/APM/APMAutoPilotPlugin.cc
+6
-0
APMAutoPilotPlugin.h
src/AutoPilotPlugins/APM/APMAutoPilotPlugin.h
+4
-1
APMCameraComponent.cc
src/AutoPilotPlugins/APM/APMCameraComponent.cc
+88
-0
APMCameraComponent.h
src/AutoPilotPlugins/APM/APMCameraComponent.h
+53
-0
APMCameraComponent.qml
src/AutoPilotPlugins/APM/APMCameraComponent.qml
+490
-0
APMCameraComponentSummary.qml
src/AutoPilotPlugins/APM/APMCameraComponentSummary.qml
+46
-0
APMTuningComponent.cc
src/AutoPilotPlugins/APM/APMTuningComponent.cc
+1
-1
CameraComponentIcon.png
src/AutoPilotPlugins/PX4/Images/CameraComponentIcon.png
+0
-0
PowerComponentIcon.png
src/AutoPilotPlugins/PX4/Images/PowerComponentIcon.png
+0
-0
TuningComponentIcon.png
src/AutoPilotPlugins/PX4/Images/TuningComponentIcon.png
+0
-0
No files found.
qgcresources.qrc
View file @
b5b1d616
...
...
@@ -14,6 +14,7 @@
<file alias="arrow-down.png">src/QmlControls/arrow-down.png</file>
<file alias="FirmwareUpgradeIcon.png">src/VehicleSetup/FirmwareUpgradeIcon.png</file>
<file alias="FlightModesComponentIcon.png">src/AutoPilotPlugins/PX4/Images/FlightModesComponentIcon.png</file>
<file alias="CameraComponentIcon.png">src/AutoPilotPlugins/PX4/Images/CameraComponentIcon.png</file>
<file alias="PowerComponentBattery_01cell.svg">src/AutoPilotPlugins/PX4/Images/PowerComponentBattery_01cell.svg</file>
<file alias="PowerComponentBattery_02cell.svg">src/AutoPilotPlugins/PX4/Images/PowerComponentBattery_02cell.svg</file>
<file alias="PowerComponentBattery_03cell.svg">src/AutoPilotPlugins/PX4/Images/PowerComponentBattery_03cell.svg</file>
...
...
@@ -25,6 +26,7 @@
<file alias="ReturnToHomeAltitude.svg">src/AutoPilotPlugins/PX4/Images/ReturnToHomeAltitude.svg</file>
<file alias="SafetyComponentIcon.png">src/AutoPilotPlugins/PX4/Images/SafetyComponentIcon.png</file>
<file alias="SensorsComponentIcon.png">src/AutoPilotPlugins/PX4/Images/SensorsComponentIcon.png</file>
<file alias="TuningComponentIcon.png">src/AutoPilotPlugins/PX4/Images/TuningComponentIcon.png</file>
<file alias="subMenuButtonImage.png">resources/CogWheels.png</file>
<file alias="VehicleDown.png">src/AutoPilotPlugins/PX4/Images/VehicleDown.png</file>
<file alias="VehicleDownRotate.png">src/AutoPilotPlugins/PX4/Images/VehicleDownRotate.png</file>
...
...
qgroundcontrol.pro
View file @
b5b1d616
...
...
@@ -560,6 +560,7 @@ HEADERS+= \
src
/
AutoPilotPlugins
/
APM
/
APMAirframeComponent
.
h
\
src
/
AutoPilotPlugins
/
APM
/
APMAirframeComponentController
.
h
\
src
/
AutoPilotPlugins
/
APM
/
APMAirframeComponentAirframes
.
h
\
src
/
AutoPilotPlugins
/
APM
/
APMCameraComponent
.
h
\
src
/
AutoPilotPlugins
/
APM
/
APMCompassCal
.
h
\
src
/
AutoPilotPlugins
/
APM
/
APMComponent
.
h
\
src
/
AutoPilotPlugins
/
APM
/
APMFlightModesComponent
.
h
\
...
...
@@ -614,6 +615,7 @@ SOURCES += \
src
/
AutoPilotPlugins
/
APM
/
APMAutoPilotPlugin
.
cc
\
src
/
AutoPilotPlugins
/
APM
/
APMAirframeComponent
.
cc
\
src
/
AutoPilotPlugins
/
APM
/
APMAirframeComponentController
.
cc
\
src
/
AutoPilotPlugins
/
APM
/
APMCameraComponent
.
cc
\
src
/
AutoPilotPlugins
/
APM
/
APMCompassCal
.
cc
\
src
/
AutoPilotPlugins
/
APM
/
APMComponent
.
cc
\
src
/
AutoPilotPlugins
/
APM
/
APMFlightModesComponent
.
cc
\
...
...
qgroundcontrol.qrc
View file @
b5b1d616
...
...
@@ -106,6 +106,8 @@
<file alias="RadioComponent.qml">src/AutoPilotPlugins/Common/RadioComponent.qml</file>
<file alias="PX4RadioComponentSummary.qml">src/AutoPilotPlugins/PX4/PX4RadioComponentSummary.qml</file>
<file alias="APMNotSupported.qml">src/AutoPilotPlugins/APM/APMNotSupported.qml</file>
<file alias="APMCameraComponent.qml">src/AutoPilotPlugins/APM/APMCameraComponent.qml</file>
<file alias="APMCameraComponentSummary.qml">src/AutoPilotPlugins/APM/APMCameraComponentSummary.qml</file>
<file alias="APMPowerComponent.qml">src/AutoPilotPlugins/APM/APMPowerComponent.qml</file>
<file alias="APMPowerComponentSummary.qml">src/AutoPilotPlugins/APM/APMPowerComponentSummary.qml</file>
<file alias="APMRadioComponentSummary.qml">src/AutoPilotPlugins/APM/APMRadioComponentSummary.qml</file>
...
...
src/AutoPilotPlugins/APM/APMAutoPilotPlugin.cc
View file @
b5b1d616
...
...
@@ -39,12 +39,14 @@
#include "APMTuningComponent.h"
#include "APMSensorsComponent.h"
#include "APMPowerComponent.h"
#include "APMCameraComponent.h"
/// This is the AutoPilotPlugin implementatin for the MAV_AUTOPILOT_ARDUPILOT type.
APMAutoPilotPlugin
::
APMAutoPilotPlugin
(
Vehicle
*
vehicle
,
QObject
*
parent
)
:
AutoPilotPlugin
(
vehicle
,
parent
)
,
_incorrectParameterVersion
(
false
)
,
_airframeComponent
(
NULL
)
,
_cameraComponent
(
NULL
)
,
_flightModesComponent
(
NULL
)
,
_powerComponent
(
NULL
)
,
_radioComponent
(
NULL
)
...
...
@@ -75,6 +77,10 @@ const QVariantList& APMAutoPilotPlugin::vehicleComponents(void)
qWarning
()
<<
"new APMAirframeComponent failed"
;
}
_cameraComponent
=
new
APMCameraComponent
(
_vehicle
,
this
);
_cameraComponent
->
setupTriggerSignals
();
_components
.
append
(
QVariant
::
fromValue
((
VehicleComponent
*
)
_cameraComponent
));
_flightModesComponent
=
new
APMFlightModesComponent
(
_vehicle
,
this
);
if
(
_flightModesComponent
)
{
_flightModesComponent
->
setupTriggerSignals
();
...
...
src/AutoPilotPlugins/APM/APMAutoPilotPlugin.h
View file @
b5b1d616
...
...
@@ -35,6 +35,7 @@ class APMTuningComponent;
class
APMSafetyComponent
;
class
APMSensorsComponent
;
class
APMPowerComponent
;
class
APMCameraComponent
;
/// This is the APM specific implementation of the AutoPilot class.
class
APMAutoPilotPlugin
:
public
AutoPilotPlugin
...
...
@@ -49,6 +50,7 @@ public:
virtual
const
QVariantList
&
vehicleComponents
(
void
);
APMAirframeComponent
*
airframeComponent
(
void
)
{
return
_airframeComponent
;
}
APMCameraComponent
*
cameraComponent
(
void
)
{
return
_cameraComponent
;
}
APMFlightModesComponent
*
flightModesComponent
(
void
)
{
return
_flightModesComponent
;
}
APMPowerComponent
*
powerComponent
(
void
)
{
return
_powerComponent
;
}
APMRadioComponent
*
radioComponent
(
void
)
{
return
_radioComponent
;
}
...
...
@@ -65,13 +67,14 @@ private:
QVariantList
_components
;
APMAirframeComponent
*
_airframeComponent
;
APMCameraComponent
*
_cameraComponent
;
APMFlightModesComponent
*
_flightModesComponent
;
APMPowerComponent
*
_powerComponent
;
APMRadioComponent
*
_radioComponent
;
APMSafetyComponent
*
_safetyComponent
;
APMSensorsComponent
*
_sensorsComponent
;
APMTuningComponent
*
_tuningComponent
;
APMAirframeLoader
*
_airframeFacts
;
APMAirframeLoader
*
_airframeFacts
;
};
#endif
src/AutoPilotPlugins/APM/APMCameraComponent.cc
0 → 100644
View file @
b5b1d616
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009 - 2014 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QGROUNDCONTROL is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
======================================================================*/
/// @file
/// @author Don Gagne <don@thegagnes.com>
#include "APMCameraComponent.h"
#include "QGCQmlWidgetHolder.h"
#include "APMAutoPilotPlugin.h"
#include "APMAirframeComponent.h"
APMCameraComponent
::
APMCameraComponent
(
Vehicle
*
vehicle
,
AutoPilotPlugin
*
autopilot
,
QObject
*
parent
)
:
APMComponent
(
vehicle
,
autopilot
,
parent
)
,
_name
(
tr
(
"Camera"
))
{
}
QString
APMCameraComponent
::
name
(
void
)
const
{
return
_name
;
}
QString
APMCameraComponent
::
description
(
void
)
const
{
return
tr
(
"The Camera Component is used to setup camera and gimbal settings."
);
}
QString
APMCameraComponent
::
iconResource
(
void
)
const
{
return
"/qmlimages/CameraComponentIcon.png"
;
}
bool
APMCameraComponent
::
requiresSetup
(
void
)
const
{
return
false
;
}
bool
APMCameraComponent
::
setupComplete
(
void
)
const
{
return
true
;
}
QStringList
APMCameraComponent
::
setupCompleteChangedTriggerList
(
void
)
const
{
return
QStringList
();
}
QUrl
APMCameraComponent
::
setupSource
(
void
)
const
{
return
QUrl
::
fromUserInput
(
"qrc:/qml/APMCameraComponent.qml"
);
}
QUrl
APMCameraComponent
::
summaryQmlSource
(
void
)
const
{
return
QUrl
::
fromUserInput
(
"qrc:/qml/APMCameraComponentSummary.qml"
);
}
QString
APMCameraComponent
::
prerequisiteSetup
(
void
)
const
{
APMAutoPilotPlugin
*
plugin
=
dynamic_cast
<
APMAutoPilotPlugin
*>
(
_autopilot
);
Q_ASSERT
(
plugin
);
if
(
!
plugin
->
airframeComponent
()
->
setupComplete
())
{
return
plugin
->
airframeComponent
()
->
name
();
}
return
QString
();
}
src/AutoPilotPlugins/APM/APMCameraComponent.h
0 → 100644
View file @
b5b1d616
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009 - 2014 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QGROUNDCONTROL is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
======================================================================*/
#ifndef APMCameraComponent_H
#define APMCameraComponent_H
#include "APMComponent.h"
class
APMCameraComponent
:
public
APMComponent
{
Q_OBJECT
public:
APMCameraComponent
(
Vehicle
*
vehicle
,
AutoPilotPlugin
*
autopilot
,
QObject
*
parent
=
NULL
);
// Virtuals from PX4Component
virtual
QStringList
setupCompleteChangedTriggerList
(
void
)
const
;
// Virtuals from VehicleComponent
virtual
QString
name
(
void
)
const
;
virtual
QString
description
(
void
)
const
;
virtual
QString
iconResource
(
void
)
const
;
virtual
bool
requiresSetup
(
void
)
const
;
virtual
bool
setupComplete
(
void
)
const
;
virtual
QUrl
setupSource
(
void
)
const
;
virtual
QUrl
summaryQmlSource
(
void
)
const
;
virtual
QString
prerequisiteSetup
(
void
)
const
;
private:
const
QString
_name
;
};
#endif
src/AutoPilotPlugins/APM/APMCameraComponent.qml
0 → 100644
View file @
b5b1d616
This diff is collapsed.
Click to expand it.
src/AutoPilotPlugins/APM/APMCameraComponentSummary.qml
0 → 100644
View file @
b5b1d616
import
QtQuick
2.5
import
QtQuick
.
Controls
1.2
import
QGroundControl
.
FactSystem
1.0
import
QGroundControl
.
FactControls
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
Palette
1.0
FactPanel
{
id
:
panel
anchors.fill
:
parent
color
:
qgcPal
.
windowShadeDark
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
enabled
}
FactPanelController
{
id
:
controller
;
factPanel
:
panel
}
property
Fact
_mountRCInTilt
:
controller
.
getParameterFact
(
-
1
,
"
MNT_RC_IN_TILT
"
)
property
Fact
_mountRCInRoll
:
controller
.
getParameterFact
(
-
1
,
"
MNT_RC_IN_ROLL
"
)
property
Fact
_mountRCInPan
:
controller
.
getParameterFact
(
-
1
,
"
MNT_RC_IN_PAN
"
)
property
Fact
_mountType
:
controller
.
getParameterFact
(
-
1
,
"
MNT_TYPE
"
)
Column
{
anchors.fill
:
parent
anchors.margins
:
8
VehicleSummaryRow
{
labelText
:
"
Gimbal type:
"
valueText
:
_mountType
.
enumStringValue
}
VehicleSummaryRow
{
labelText
:
"
Tilt input channel:
"
valueText
:
_mountRCInTilt
.
enumStringValue
}
VehicleSummaryRow
{
labelText
:
"
Pan input channel:
"
valueText
:
_mountRCInPan
.
enumStringValue
}
VehicleSummaryRow
{
labelText
:
"
Roll input channel:
"
valueText
:
_mountRCInRoll
.
enumStringValue
}
}
}
src/AutoPilotPlugins/APM/APMTuningComponent.cc
View file @
b5b1d616
...
...
@@ -43,7 +43,7 @@ QString APMTuningComponent::description(void) const
QString
APMTuningComponent
::
iconResource
(
void
)
const
{
return
"/qmlimages/
subMenuButtonImage
.png"
;
return
"/qmlimages/
TuningComponentIcon
.png"
;
}
bool
APMTuningComponent
::
requiresSetup
(
void
)
const
...
...
src/AutoPilotPlugins/PX4/Images/CameraComponentIcon.png
0 → 100644
View file @
b5b1d616
1.99 KB
src/AutoPilotPlugins/PX4/Images/PowerComponentIcon.png
View replaced file @
09e505e2
View file @
b5b1d616
18.7 KB
|
W:
|
H:
684 Bytes
|
W:
|
H:
2-up
Swipe
Onion skin
src/AutoPilotPlugins/PX4/Images/TuningComponentIcon.png
0 → 100644
View file @
b5b1d616
15.1 KB
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