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
8fdd2a38
Commit
8fdd2a38
authored
Jul 25, 2016
by
Don Gagne
Committed by
GitHub
Jul 25, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3840 from bluerobotics/ardusubPluginWithXML
ArduSub Plugin: Basic Files + XML Update
parents
c2b0c085
e9702e6f
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
370 additions
and
229 deletions
+370
-229
qgroundcontrol.pro
qgroundcontrol.pro
+2
-0
APMParameterFactMetaData.Sub.3.4.xml
src/FirmwarePlugin/APM/APMParameterFactMetaData.Sub.3.4.xml
+236
-228
ArduSubFirmwarePlugin.cc
src/FirmwarePlugin/APM/ArduSubFirmwarePlugin.cc
+49
-0
ArduSubFirmwarePlugin.h
src/FirmwarePlugin/APM/ArduSubFirmwarePlugin.h
+73
-0
FirmwarePluginManager.cc
src/FirmwarePlugin/FirmwarePluginManager.cc
+8
-1
FirmwarePluginManager.h
src/FirmwarePlugin/FirmwarePluginManager.h
+2
-0
No files found.
qgroundcontrol.pro
View file @
8fdd2a38
...
...
@@ -665,6 +665,7 @@ HEADERS+= \
src/FirmwarePlugin/APM/ArduCopterFirmwarePlugin.h \
src/FirmwarePlugin/APM/ArduPlaneFirmwarePlugin.h \
src/FirmwarePlugin/APM/ArduRoverFirmwarePlugin.h \
src/FirmwarePlugin/APM/ArduSubFirmwarePlugin.h \
src/FirmwarePlugin/PX4/px4_custom_mode.h \
src/FirmwarePlugin/PX4/PX4FirmwarePlugin.h \
src/FirmwarePlugin/PX4/PX4ParameterMetaData.h \
...
...
@@ -723,6 +724,7 @@ SOURCES += \
src/FirmwarePlugin/APM/ArduCopterFirmwarePlugin.cc \
src/FirmwarePlugin/APM/ArduPlaneFirmwarePlugin.cc \
src/FirmwarePlugin/APM/ArduRoverFirmwarePlugin.cc \
src/FirmwarePlugin/APM/ArduSubFirmwarePlugin.cc \
src/FirmwarePlugin/FirmwarePlugin.cc \
src/FirmwarePlugin/FirmwarePluginManager.cc \
src/FirmwarePlugin/PX4/PX4FirmwarePlugin.cc \
...
...
src/FirmwarePlugin/APM/APMParameterFactMetaData.Sub.3.4.xml
View file @
8fdd2a38
This diff is collapsed.
Click to expand it.
src/FirmwarePlugin/APM/ArduSubFirmwarePlugin.cc
0 → 100644
View file @
8fdd2a38
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009 - 2015 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 Rustom Jehangir <rusty@bluerobotics.com>
#include "ArduSubFirmwarePlugin.h"
#include "QGCApplication.h"
#include "MissionManager.h"
APMSubMode
::
APMSubMode
(
uint32_t
mode
,
bool
settable
)
:
APMCustomMode
(
mode
,
settable
)
{
QMap
<
uint32_t
,
QString
>
enumToString
;
enumToString
.
insert
(
MANUAL
,
"Manual"
);
enumToString
.
insert
(
STABILIZE
,
"Stabilize"
);
enumToString
.
insert
(
ALT_HOLD
,
"Depth Hold"
);
setEnumToStringMapping
(
enumToString
);
}
ArduSubFirmwarePlugin
::
ArduSubFirmwarePlugin
(
void
)
{
QList
<
APMCustomMode
>
supportedFlightModes
;
supportedFlightModes
<<
APMSubMode
(
APMSubMode
::
MANUAL
,
true
);
supportedFlightModes
<<
APMSubMode
(
APMSubMode
::
STABILIZE
,
true
);
supportedFlightModes
<<
APMSubMode
(
APMSubMode
::
ALT_HOLD
,
true
);
setSupportedModes
(
supportedFlightModes
);
}
src/FirmwarePlugin/APM/ArduSubFirmwarePlugin.h
0 → 100644
View file @
8fdd2a38
/*=====================================================================
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 Rustom Jehangir <rusty@bluerobotics.com>
#ifndef ArduSubFirmwarePlugin_H
#define ArduSubFirmwarePlugin_H
#include "APMFirmwarePlugin.h"
class
APMSubMode
:
public
APMCustomMode
{
public:
enum
Mode
{
STABILIZE
=
0
,
// Hold level position
RESERVED_1
=
1
,
ALT_HOLD
=
2
,
// Depth hold
RESERVED_3
=
3
,
RESERVED_4
=
4
,
RESERVED_5
=
5
,
RESERVED_6
=
6
,
RESERVED_7
=
7
,
RESERVED_8
=
8
,
RESERVED_9
=
9
,
RESERVED_10
=
10
,
RESERVED_11
=
11
,
RESERVED_12
=
12
,
RESERVED_13
=
13
,
RESERVED_14
=
14
,
RESERVED_15
=
15
,
RESERVED_16
=
16
,
RESERVED_17
=
17
,
RESERVED_18
=
18
,
MANUAL
=
19
};
static
const
int
modeCount
=
20
;
APMSubMode
(
uint32_t
mode
,
bool
settable
);
};
class
ArduSubFirmwarePlugin
:
public
APMFirmwarePlugin
{
Q_OBJECT
public:
ArduSubFirmwarePlugin
(
void
);
// Overrides from FirmwarePlugin
};
#endif
src/FirmwarePlugin/FirmwarePluginManager.cc
View file @
8fdd2a38
...
...
@@ -15,6 +15,7 @@
#include "APM/ArduCopterFirmwarePlugin.h"
#include "APM/ArduPlaneFirmwarePlugin.h"
#include "APM/ArduRoverFirmwarePlugin.h"
#include "APM/ArduSubFirmwarePlugin.h"
#include "PX4/PX4FirmwarePlugin.h"
FirmwarePluginManager
::
FirmwarePluginManager
(
QGCApplication
*
app
)
...
...
@@ -22,6 +23,7 @@ FirmwarePluginManager::FirmwarePluginManager(QGCApplication* app)
,
_arduCopterFirmwarePlugin
(
NULL
)
,
_arduPlaneFirmwarePlugin
(
NULL
)
,
_arduRoverFirmwarePlugin
(
NULL
)
,
_arduSubFirmwarePlugin
(
NULL
)
,
_genericFirmwarePlugin
(
NULL
)
,
_px4FirmwarePlugin
(
NULL
)
{
...
...
@@ -33,6 +35,7 @@ FirmwarePluginManager::~FirmwarePluginManager()
delete
_arduCopterFirmwarePlugin
;
delete
_arduPlaneFirmwarePlugin
;
delete
_arduRoverFirmwarePlugin
;
delete
_arduSubFirmwarePlugin
;
delete
_genericFirmwarePlugin
;
delete
_px4FirmwarePlugin
;
}
...
...
@@ -59,11 +62,15 @@ FirmwarePlugin* FirmwarePluginManager::firmwarePluginForAutopilot(MAV_AUTOPILOT
return
_arduPlaneFirmwarePlugin
;
case
MAV_TYPE_GROUND_ROVER
:
case
MAV_TYPE_SURFACE_BOAT
:
case
MAV_TYPE_SUBMARINE
:
if
(
!
_arduRoverFirmwarePlugin
)
{
_arduRoverFirmwarePlugin
=
new
ArduRoverFirmwarePlugin
;
}
return
_arduRoverFirmwarePlugin
;
case
MAV_TYPE_SUBMARINE
:
if
(
!
_arduSubFirmwarePlugin
)
{
_arduSubFirmwarePlugin
=
new
ArduSubFirmwarePlugin
;
}
return
_arduSubFirmwarePlugin
;
default:
break
;
}
...
...
src/FirmwarePlugin/FirmwarePluginManager.h
View file @
8fdd2a38
...
...
@@ -24,6 +24,7 @@ class QGCApplication;
class
ArduCopterFirmwarePlugin
;
class
ArduPlaneFirmwarePlugin
;
class
ArduRoverFirmwarePlugin
;
class
ArduSubFirmwarePlugin
;
class
PX4FirmwarePlugin
;
/// FirmwarePluginManager is a singleton which is used to return the correct FirmwarePlugin for a MAV_AUTOPILOT type.
...
...
@@ -49,6 +50,7 @@ private:
ArduCopterFirmwarePlugin
*
_arduCopterFirmwarePlugin
;
ArduPlaneFirmwarePlugin
*
_arduPlaneFirmwarePlugin
;
ArduRoverFirmwarePlugin
*
_arduRoverFirmwarePlugin
;
ArduSubFirmwarePlugin
*
_arduSubFirmwarePlugin
;
FirmwarePlugin
*
_genericFirmwarePlugin
;
PX4FirmwarePlugin
*
_px4FirmwarePlugin
;
};
...
...
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