diff --git a/qgroundcontrol.pro b/qgroundcontrol.pro
index 657073d83defa01b2381f4efe714c6b90ae88e58..c7329a7914fec6568f58173c07c5127e9be6c858 100644
--- a/qgroundcontrol.pro
+++ b/qgroundcontrol.pro
@@ -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 \
diff --git a/src/FirmwarePlugin/APM/APMParameterFactMetaData.Sub.3.4.xml b/src/FirmwarePlugin/APM/APMParameterFactMetaData.Sub.3.4.xml
index dd3f193cf6fb2e1bab41555b9d7905fbd3585a37..9c884ba4d947447cb813eb9b9aa50f4b621d6fea 100644
--- a/src/FirmwarePlugin/APM/APMParameterFactMetaData.Sub.3.4.xml
+++ b/src/FirmwarePlugin/APM/APMParameterFactMetaData.Sub.3.4.xml
@@ -47,10 +47,13 @@
0.0 500.0
10
-
+
+0:Feedback from mid stick,1:High throttle cancels landing,2:Disarm on land detection
None
-FeedbackFromMid
+Feedback from mid stick
+High throttle cancels landing
+Disarm on land detection
@@ -232,11 +235,6 @@
10
cm/s/s
-
-0 300
-1
-Percent*10
-
Disabled
@@ -250,11 +248,6 @@
1
pwm
-
-300 700
-10
-Percent*10
-
0 300
1
@@ -263,121 +256,43 @@
Stabilize
-Acro
-AltHold
-Auto
-Guided
-Loiter
-RTL
-Circle
-Land
-Drift
-Sport
-Flip
-AutoTune
-PosHold
-Brake
-Throw
+DepthHold
+Manual
Stabilize
-Acro
-AltHold
-Auto
-Guided
-Loiter
-RTL
-Circle
-Land
-Drift
-Sport
-Flip
-AutoTune
-PosHold
-Brake
-Throw
+DepthHold
+Manual
Stabilize
-Acro
-AltHold
-Auto
-Guided
-Loiter
-RTL
-Circle
-Land
-Drift
-Sport
-Flip
-AutoTune
-PosHold
-Brake
-Throw
+DepthHold
+Manual
Stabilize
-Acro
-AltHold
-Auto
-Guided
-Loiter
-RTL
-Circle
-Land
-Drift
-Sport
-Flip
-AutoTune
-PosHold
-Brake
-Throw
+DepthHold
+Manual
Stabilize
-Acro
-AltHold
-Auto
-Guided
-Loiter
-RTL
-Circle
-Land
-Drift
-Sport
-Flip
-AutoTune
-PosHold
-Brake
-Throw
+DepthHold
+Manual
Stabilize
-Acro
-AltHold
-Auto
-Guided
-Loiter
-RTL
-Circle
-Land
-Drift
-Sport
-Flip
-AutoTune
-PosHold
-Brake
-Throw
+DepthHold
+Manual
@@ -687,7 +602,7 @@
-0:All,1:Baro,2:Compass,3:GPS,4:INS,5:Parameters+Sonar,6:RC,7:Voltage
+0:All,1:Baro,2:Compass,3:GPS,4:INS,5:Parameters+Rangefinder,6:RC,7:Voltage
Disabled
Enabled
@@ -695,7 +610,7 @@
Skip Compass
Skip GPS
Skip INS
-Skip Params/Sonar
+Skip Params/Rangefinder
Skip RC
Skip Voltage
@@ -798,9 +713,6 @@
10
cm/s/s
-
-Hz
-
1.000 8.000
@@ -818,7 +730,7 @@
0.000 0.400
-
+
1.000 100.000
Hz
@@ -828,16 +740,6 @@
0.500 2.000
-
-0.100 5.000
-
-
-0.100 5.000
-
-
-0 1000
-cm/s
-
0:Roll,1:Pitch,2:Yaw
@@ -864,7 +766,8 @@
-Do Not Use in RTL and Land 1
+Do Not Use in RTL and Land
+Use in RTL and Land
@@ -885,10 +788,17 @@
1500000
+
+
+MAVlink1
+MAVLink2
+
+
None
-GCS Mavlink
+MAVlink1
+MAVLink2
Frsky D-PORT
Frsky S-PORT
GPS
@@ -916,7 +826,8 @@
None
-GCS Mavlink
+MAVlink1
+MAVLink2
Frsky D-PORT
Frsky S-PORT
GPS
@@ -944,7 +855,8 @@
None
-GCS Mavlink
+MAVlink1
+MAVLink2
Frsky D-PORT
Frsky S-PORT
GPS
@@ -972,7 +884,8 @@
None
-GCS Mavlink
+MAVlink1
+MAVLink2
Frsky D-PORT
Frsky S-PORT
GPS
@@ -1000,7 +913,8 @@
None
-GCS Mavlink
+MAVlink1
+MAVLink2
Frsky D-PORT
Frsky S-PORT
GPS
@@ -3692,13 +3606,13 @@
Unknown
-APM1-1280
-APM1-2560
-APM2
+unused
+unused
+unused
SITL
PX4v1
PX4v2
-Flymaple
+unused
Linux
@@ -3907,6 +3821,68 @@
+
+500 18000
+100
+Centi-Degrees/Sec
+
+
+0 72000
+
+Disabled
+Slow
+Medium
+Fast
+
+1000
+Centi-Degrees/Sec/Sec
+
+
+
+Disabled
+Enabled
+
+
+
+0 180000
+
+Disabled
+Slow
+Medium
+Fast
+
+1000
+Centi-Degrees/Sec/Sec
+
+
+0 180000
+
+Disabled
+Slow
+Medium
+Fast
+
+1000
+Centi-Degrees/Sec/Sec
+
+
+
+Disabled
+Enabled
+
+
+
+3.000 12.000
+
+
+3.000 12.000
+
+
+3.000 6.000
+
+
+0.5 10.0
+
0.08 0.30
0.005
@@ -3973,68 +3949,15 @@
1
Hz
-
-500 18000
-100
-Centi-Degrees/Sec
+
+0.1 0.25
-
-0 72000
-
-Disabled
-Slow
-Medium
-Fast
-
-1000
-Centi-Degrees/Sec/Sec
-
-
-
-Disabled
-Enabled
-
-
-
-0 180000
-
-Disabled
-Slow
-Medium
-Fast
-
-1000
-Centi-Degrees/Sec/Sec
-
-
-0 180000
-
-Disabled
-Slow
-Medium
-Fast
-
-1000
-Centi-Degrees/Sec/Sec
-
-
-
-Disabled
-Enabled
-
-
-
-3.000 12.000
-
-
-3.000 12.000
-
-
-3.000 6.000
+
+0.5 0.9
-
-
+
+
0.5 5
0.1
Hz
@@ -4086,6 +4009,11 @@
1
Hz
+
+0 50
+1
+Hz
+
@@ -4133,6 +4061,11 @@
1
Hz
+
+0 50
+1
+Hz
+
@@ -4180,6 +4113,11 @@
1
Hz
+
+0 50
+1
+Hz
+
@@ -4227,6 +4165,11 @@
1
Hz
+
+0 50
+1
+Hz
+
@@ -4741,7 +4684,7 @@
-
+
No PWMs
Two PWMs
@@ -4749,6 +4692,7 @@
Six PWMs
Three PWMs and One Capture
+True
@@ -4756,6 +4700,7 @@
Enabled
Auto
+True
@@ -4763,12 +4708,14 @@
Enabled
Auto
+True
-
+
Disabled
Enabled
+True
@@ -4781,6 +4728,7 @@
250Hz
300Hz
+True
-32767 32768
@@ -4791,6 +4739,18 @@
Enabled
+
+0:Ch1,1:Ch2,2:Ch3,3:Ch4,4:Ch5,5:Ch6,6:Ch7,7:Ch8
+
+Disabled
+Enabled
+
+True
+
+
+degreesC
+-1 80
+
@@ -5020,11 +4980,16 @@
+0:Altitude,1:Circle,2:Polygon
None
Altitude
Circle
Altitude and Circle
+Polygon
+Altitude and Polygon
+Circle and Polygon
+All
@@ -5046,12 +5011,23 @@
1 10
Meters
+
+1 20
+
10 1000
1
Meters
+
+
+
+None
+StopAtFence
+
+
+
@@ -5119,6 +5095,18 @@
0.0 1.5
0.1
+
+0.1 1.0
+0.01
+
+
+0.1 1.0
+0.01
+
+
+1 10
+1
+
@@ -5159,11 +5147,11 @@
Enabled
-
+
0.05 5.0
0.05
-
+
0.05 5.0
0.05
@@ -5275,7 +5263,7 @@
5
meters
-
+
1 50
1
@@ -5307,7 +5295,7 @@
Trust DCM more
-
+
Use Baro
Use Range Finder
@@ -5332,26 +5320,26 @@
No GPS use optical flow
-
+
0.05 5.0
0.05
m/s
-
+
0.05 5.0
0.05
m/s
-
+
100 1000
25
-
+
0.1 10.0
0.1
m
-
+
100 1000
25
@@ -5372,12 +5360,12 @@
Use GPS
-
+
0.1 10.0
0.1
m
-
+
100 1000
25
@@ -5386,7 +5374,7 @@
10
msec
-
+
0.01 0.5
0.01
gauss
@@ -5400,25 +5388,25 @@
Always
-
+
100 1000
25
-
+
0.5 5.0
0.1
m/s
-
+
100 1000
25
-
+
0.1 10.0
0.1
m
-
+
100 1000
25
@@ -5427,12 +5415,12 @@
0.1
rad/s
-
+
0.05 1.0
0.05
rad/s
-
+
100 1000
25
@@ -5441,33 +5429,29 @@
10
msec
-
-0.0001 0.01
+
+0.0001 0.1
0.0001
rad/s
-
+
0.01 1.0
0.01
m/s/s
-
-0.0000001 0.00001
-rad/s
+
+0.00001 0.001
+rad/s/s
-
-0.0000001 0.00001
+
+0.000001 0.001
1/s
-
+
0.00001 0.001
-m/s/s
+m/s/s/s
-
-0.0001 0.01
-gauss/s
-
-
+
0.01 1.0
0.1
m/s/s
@@ -5486,7 +5470,7 @@
50 200
%
-
+
0.5 50.0
m/s
@@ -5498,6 +5482,27 @@
AllIMUs
+
+0.05 1.0
+0.05
+gauss
+
+
+100 1000
+25
+
+
+-1 100
+10
+
+
+0.00001 0.01
+gauss/s
+
+
+0.00001 0.01
+gauss/s
+
@@ -5959,15 +5964,15 @@
1
-
-
+
+
Disabled
Enabled Always Land
Enabled Strict
-
+
None
CompanionComputer
@@ -6005,7 +6010,7 @@
-
+
Disabled
Enabled
@@ -6018,6 +6023,9 @@
LoiterAndDescend
+
+1 100
+
diff --git a/src/FirmwarePlugin/APM/ArduSubFirmwarePlugin.cc b/src/FirmwarePlugin/APM/ArduSubFirmwarePlugin.cc
new file mode 100644
index 0000000000000000000000000000000000000000..e6fad43ea24d8abd36b2a6f1cb382fc2d6c25d81
--- /dev/null
+++ b/src/FirmwarePlugin/APM/ArduSubFirmwarePlugin.cc
@@ -0,0 +1,49 @@
+/*=====================================================================
+
+ QGroundControl Open Source Ground Control Station
+
+ (c) 2009 - 2015 QGROUNDCONTROL PROJECT
+
+ 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 .
+
+ ======================================================================*/
+
+/// @file
+/// @author Rustom Jehangir
+
+#include "ArduSubFirmwarePlugin.h"
+#include "QGCApplication.h"
+#include "MissionManager.h"
+
+APMSubMode::APMSubMode(uint32_t mode, bool settable) :
+ APMCustomMode(mode, settable)
+{
+ QMap enumToString;
+ enumToString.insert(MANUAL, "Manual");
+ enumToString.insert(STABILIZE, "Stabilize");
+ enumToString.insert(ALT_HOLD, "Depth Hold");
+
+ setEnumToStringMapping(enumToString);
+}
+
+ArduSubFirmwarePlugin::ArduSubFirmwarePlugin(void)
+{
+ QList supportedFlightModes;
+ supportedFlightModes << APMSubMode(APMSubMode::MANUAL ,true);
+ supportedFlightModes << APMSubMode(APMSubMode::STABILIZE ,true);
+ supportedFlightModes << APMSubMode(APMSubMode::ALT_HOLD ,true);
+ setSupportedModes(supportedFlightModes);
+}
diff --git a/src/FirmwarePlugin/APM/ArduSubFirmwarePlugin.h b/src/FirmwarePlugin/APM/ArduSubFirmwarePlugin.h
new file mode 100644
index 0000000000000000000000000000000000000000..1030a459dc7ad9227f8aacd9370014a3c37591b2
--- /dev/null
+++ b/src/FirmwarePlugin/APM/ArduSubFirmwarePlugin.h
@@ -0,0 +1,73 @@
+/*=====================================================================
+
+ QGroundControl Open Source Ground Control Station
+
+ (c) 2009 - 2014 QGROUNDCONTROL PROJECT
+
+ 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 .
+
+ ======================================================================*/
+
+/// @file
+/// @author Rustom Jehangir
+
+#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
diff --git a/src/FirmwarePlugin/FirmwarePluginManager.cc b/src/FirmwarePlugin/FirmwarePluginManager.cc
index bf6a514a4d064769465f346f87d229b95eb699f5..7efe0e260d2e2ebbe426bde7d81779ef6156f3af 100644
--- a/src/FirmwarePlugin/FirmwarePluginManager.cc
+++ b/src/FirmwarePlugin/FirmwarePluginManager.cc
@@ -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;
}
diff --git a/src/FirmwarePlugin/FirmwarePluginManager.h b/src/FirmwarePlugin/FirmwarePluginManager.h
index 0c020812a07a180079b7591b1d91388a21b9f9b2..2c14292e8042e19929b03f580ac0ae1a4a7504ed 100644
--- a/src/FirmwarePlugin/FirmwarePluginManager.h
+++ b/src/FirmwarePlugin/FirmwarePluginManager.h
@@ -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;
};