Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
49a761e5
Commit
49a761e5
authored
May 09, 2016
by
Lorenz Meier
Browse files
Clean PX4 autopilot plugin
parent
2b645760
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/AutoPilotPlugins/PX4/PX4AutoPilotPlugin.cc
View file @
49a761e5
...
...
@@ -35,39 +35,6 @@
/// @brief This is the AutoPilotPlugin implementatin for the MAV_AUTOPILOT_PX4 type.
/// @author Don Gagne <don@thegagnes.com>
enum
PX4_CUSTOM_MAIN_MODE
{
PX4_CUSTOM_MAIN_MODE_MANUAL
=
1
,
PX4_CUSTOM_MAIN_MODE_ALTCTL
,
PX4_CUSTOM_MAIN_MODE_POSCTL
,
PX4_CUSTOM_MAIN_MODE_AUTO
,
PX4_CUSTOM_MAIN_MODE_ACRO
,
PX4_CUSTOM_MAIN_MODE_OFFBOARD
,
PX4_CUSTOM_MAIN_MODE_STABILIZED
,
PX4_CUSTOM_MAIN_MODE_RATTITUDE
};
enum
PX4_CUSTOM_SUB_MODE_AUTO
{
PX4_CUSTOM_SUB_MODE_AUTO_READY
=
1
,
PX4_CUSTOM_SUB_MODE_AUTO_TAKEOFF
,
PX4_CUSTOM_SUB_MODE_AUTO_LOITER
,
PX4_CUSTOM_SUB_MODE_AUTO_MISSION
,
PX4_CUSTOM_SUB_MODE_AUTO_RTL
,
PX4_CUSTOM_SUB_MODE_AUTO_LAND
,
PX4_CUSTOM_SUB_MODE_AUTO_RTGS
,
PX4_CUSTOM_SUB_MODE_AUTO_FOLLOW_ME
};
union
px4_custom_mode
{
struct
{
uint16_t
reserved
;
uint8_t
main_mode
;
uint8_t
sub_mode
;
};
uint32_t
data
;
float
data_float
;
};
PX4AutoPilotPlugin
::
PX4AutoPilotPlugin
(
Vehicle
*
vehicle
,
QObject
*
parent
)
:
AutoPilotPlugin
(
vehicle
,
parent
),
_airframeComponent
(
NULL
),
...
...
@@ -153,7 +120,8 @@ void PX4AutoPilotPlugin::_parametersReadyPreChecks(bool missingParameters)
// Check for older parameter version set
// FIXME: Firmware is moving to version stamp parameter set. Once that is complete the version stamp
// should be used instead.
if
(
parameterExists
(
FactSystem
::
defaultComponentId
,
"SENS_GYRO_XOFF"
))
{
if
(
parameterExists
(
FactSystem
::
defaultComponentId
,
"SENS_GYRO_XOFF"
)
||
parameterExists
(
FactSystem
::
defaultComponentId
,
"COM_DL_LOSS_EN"
))
{
_incorrectParameterVersion
=
true
;
qgcApp
()
->
showMessage
(
"This version of GroundControl can only perform vehicle setup on a newer version of firmware. "
"Please perform a Firmware Upgrade if you wish to use Vehicle Setup."
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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