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
cb1471a2
Commit
cb1471a2
authored
Oct 25, 2018
by
Willian Galvani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
APMMotorComponent: Create it
parent
fed7b377
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
63 additions
and
4 deletions
+63
-4
CMakeLists.txt
CMakeLists.txt
+1
-0
qgroundcontrol.pro
qgroundcontrol.pro
+2
-0
APMAutoPilotPlugin.cc
src/AutoPilotPlugins/APM/APMAutoPilotPlugin.cc
+2
-2
APMAutoPilotPlugin.h
src/AutoPilotPlugins/APM/APMAutoPilotPlugin.h
+2
-2
APMMotorComponent.cc
src/AutoPilotPlugins/APM/APMMotorComponent.cc
+27
-0
APMMotorComponent.h
src/AutoPilotPlugins/APM/APMMotorComponent.h
+29
-0
No files found.
CMakeLists.txt
View file @
cb1471a2
...
...
@@ -274,6 +274,7 @@ list(APPEND QGC_SRC
src/AutoPilotPlugins/APM/APMFlightModesComponent.cc
src/AutoPilotPlugins/APM/APMFlightModesComponentController.cc
src/AutoPilotPlugins/APM/APMLightsComponent.cc
src/AutoPilotPlugins/APM/APMMotorComponent.cc
src/AutoPilotPlugins/APM/APMPowerComponent.cc
src/AutoPilotPlugins/APM/APMRadioComponent.cc
src/AutoPilotPlugins/APM/APMSafetyComponent.cc
...
...
qgroundcontrol.pro
View file @
cb1471a2
...
...
@@ -970,6 +970,7 @@ APMFirmwarePlugin {
src
/
AutoPilotPlugins
/
APM
/
APMHeliComponent
.
h
\
src
/
AutoPilotPlugins
/
APM
/
APMLightsComponent
.
h
\
src
/
AutoPilotPlugins
/
APM
/
APMSubFrameComponent
.
h
\
src
/
AutoPilotPlugins
/
APM
/
APMMotorComponent
.
h
\
src
/
AutoPilotPlugins
/
APM
/
APMPowerComponent
.
h
\
src
/
AutoPilotPlugins
/
APM
/
APMRadioComponent
.
h
\
src
/
AutoPilotPlugins
/
APM
/
APMSafetyComponent
.
h
\
...
...
@@ -996,6 +997,7 @@ APMFirmwarePlugin {
src
/
AutoPilotPlugins
/
APM
/
APMHeliComponent
.
cc
\
src
/
AutoPilotPlugins
/
APM
/
APMLightsComponent
.
cc
\
src
/
AutoPilotPlugins
/
APM
/
APMSubFrameComponent
.
cc
\
src
/
AutoPilotPlugins
/
APM
/
APMMotorComponent
.
cc
\
src
/
AutoPilotPlugins
/
APM
/
APMPowerComponent
.
cc
\
src
/
AutoPilotPlugins
/
APM
/
APMRadioComponent
.
cc
\
src
/
AutoPilotPlugins
/
APM
/
APMSafetyComponent
.
cc
\
...
...
src/AutoPilotPlugins/APM/APMAutoPilotPlugin.cc
View file @
cb1471a2
...
...
@@ -23,7 +23,7 @@
#include "APMTuningComponent.h"
#include "APMSensorsComponent.h"
#include "APMPowerComponent.h"
#include "MotorComponent.h"
#include "
APM
MotorComponent.h"
#include "APMCameraComponent.h"
#include "APMLightsComponent.h"
#include "APMSubFrameComponent.h"
...
...
@@ -88,7 +88,7 @@ const QVariantList& APMAutoPilotPlugin::vehicleComponents(void)
int
versionInt
=
_vehicle
->
firmwareMajorVersion
()
*
100
+
_vehicle
->
firmwareMinorVersion
()
*
10
+
_vehicle
->
firmwarePatchVersion
();
if
(
_vehicle
->
sub
()
&&
versionInt
>=
353
)
{
_motorComponent
=
new
MotorComponent
(
_vehicle
,
this
);
_motorComponent
=
new
APM
MotorComponent
(
_vehicle
,
this
);
_motorComponent
->
setupTriggerSignals
();
_components
.
append
(
QVariant
::
fromValue
((
VehicleComponent
*
)
_motorComponent
));
}
...
...
src/AutoPilotPlugins/APM/APMAutoPilotPlugin.h
View file @
cb1471a2
...
...
@@ -22,7 +22,7 @@ class APMTuningComponent;
class
APMSafetyComponent
;
class
APMSensorsComponent
;
class
APMPowerComponent
;
class
MotorComponent
;
class
APM
MotorComponent
;
class
APMCameraComponent
;
class
APMLightsComponent
;
class
APMSubFrameComponent
;
...
...
@@ -50,7 +50,7 @@ protected:
APMSubFrameComponent
*
_subFrameComponent
;
APMFlightModesComponent
*
_flightModesComponent
;
APMPowerComponent
*
_powerComponent
;
MotorComponent
*
_motorComponent
;
APMMotorComponent
*
_motorComponent
;
APMRadioComponent
*
_radioComponent
;
APMSafetyComponent
*
_safetyComponent
;
APMSensorsComponent
*
_sensorsComponent
;
...
...
src/AutoPilotPlugins/APM/APMMotorComponent.cc
0 → 100644
View file @
cb1471a2
/****************************************************************************
*
* (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
*
* QGroundControl is licensed according to the terms in the file
* COPYING.md in the root of the source code directory.
*
****************************************************************************/
#include "APMMotorComponent.h"
APMMotorComponent
::
APMMotorComponent
(
Vehicle
*
vehicle
,
AutoPilotPlugin
*
autopilot
,
QObject
*
parent
)
:
MotorComponent
(
vehicle
,
autopilot
,
parent
),
_name
(
tr
(
"Motors"
))
{
}
QUrl
APMMotorComponent
::
setupSource
(
void
)
const
{
switch
(
_vehicle
->
vehicleType
())
{
case
MAV_TYPE_SUBMARINE
:
return
QUrl
::
fromUserInput
(
QStringLiteral
(
"qrc:/qml/APMSubMotorComponent.qml"
));
default:
return
QUrl
::
fromUserInput
(
QStringLiteral
(
"qrc:/qml/MotorComponent.qml"
));
}
}
src/AutoPilotPlugins/APM/APMMotorComponent.h
0 → 100644
View file @
cb1471a2
/****************************************************************************
*
* (c) 2009-2018 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
*
* QGroundControl is licensed according to the terms in the file
* COPYING.md in the root of the source code directory.
*
****************************************************************************/
#ifndef APMMotorComponent_H
#define APMMotorComponent_H
#include "MotorComponent.h"
class
APMMotorComponent
:
public
MotorComponent
{
Q_OBJECT
public:
APMMotorComponent
(
Vehicle
*
vehicle
,
AutoPilotPlugin
*
autopilot
,
QObject
*
parent
=
NULL
);
QUrl
setupSource
(
void
)
const
final
;
private:
const
QString
_name
;
};
#endif
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