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
a4e55db2
Commit
a4e55db2
authored
Aug 22, 2015
by
Lorenz Meier
Browse files
Merge pull request #1780 from DonLakeFlyer/NoRC
Respect COM_RC_IN_MODE setting
parents
93cbdea2
eb69c87a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/AutoPilotPlugins/PX4/PX4AutoPilotPlugin.cc
View file @
a4e55db2
...
@@ -273,35 +273,47 @@ const QVariantList& PX4AutoPilotPlugin::vehicleComponents(void)
...
@@ -273,35 +273,47 @@ const QVariantList& PX4AutoPilotPlugin::vehicleComponents(void)
if
(
_components
.
count
()
==
0
&&
!
_incorrectParameterVersion
)
{
if
(
_components
.
count
()
==
0
&&
!
_incorrectParameterVersion
)
{
Q_ASSERT
(
_uas
);
Q_ASSERT
(
_uas
);
_airframeComponent
=
new
AirframeComponent
(
_uas
,
this
);
if
(
pluginReady
())
{
Q_CHECK_PTR
(
_airframeComponent
);
bool
noRCTransmitter
=
false
;
_airframeComponent
->
setupTriggerSignals
();
if
(
parameterExists
(
FactSystem
::
defaultComponentId
,
"COM_RC_IN_MODE"
))
{
_components
.
append
(
QVariant
::
fromValue
((
VehicleComponent
*
)
_airframeComponent
));
Fact
*
rcFact
=
getParameterFact
(
FactSystem
::
defaultComponentId
,
"COM_RC_IN_MODE"
);
noRCTransmitter
=
rcFact
->
value
().
toInt
()
==
1
;
_radioComponent
=
new
RadioComponent
(
_uas
,
this
);
}
Q_CHECK_PTR
(
_radioComponent
);
_radioComponent
->
setupTriggerSignals
();
_components
.
append
(
QVariant
::
fromValue
((
VehicleComponent
*
)
_radioComponent
));
_flightModesComponent
=
new
FlightModesComponent
(
_uas
,
this
);
Q_CHECK_PTR
(
_flightModesComponent
);
_flightModesComponent
->
setupTriggerSignals
();
_components
.
append
(
QVariant
::
fromValue
((
VehicleComponent
*
)
_flightModesComponent
));
_sensorsComponent
=
new
SensorsComponent
(
_uas
,
this
);
Q_CHECK_PTR
(
_sensorsComponent
);
_sensorsComponent
->
setupTriggerSignals
();
_components
.
append
(
QVariant
::
fromValue
((
VehicleComponent
*
)
_sensorsComponent
));
_powerComponent
=
new
PowerComponent
(
_uas
,
this
);
Q_CHECK_PTR
(
_powerComponent
);
_powerComponent
->
setupTriggerSignals
();
_components
.
append
(
QVariant
::
fromValue
((
VehicleComponent
*
)
_powerComponent
));
_safetyComponent
=
new
SafetyComponent
(
_uas
,
this
);
_airframeComponent
=
new
AirframeComponent
(
_uas
,
this
);
Q_CHECK_PTR
(
_safetyComponent
);
Q_CHECK_PTR
(
_airframeComponent
);
_safetyComponent
->
setupTriggerSignals
();
_airframeComponent
->
setupTriggerSignals
();
_components
.
append
(
QVariant
::
fromValue
((
VehicleComponent
*
)
_safetyComponent
));
_components
.
append
(
QVariant
::
fromValue
((
VehicleComponent
*
)
_airframeComponent
));
if
(
!
noRCTransmitter
)
{
_radioComponent
=
new
RadioComponent
(
_uas
,
this
);
Q_CHECK_PTR
(
_radioComponent
);
_radioComponent
->
setupTriggerSignals
();
_components
.
append
(
QVariant
::
fromValue
((
VehicleComponent
*
)
_radioComponent
));
_flightModesComponent
=
new
FlightModesComponent
(
_uas
,
this
);
Q_CHECK_PTR
(
_flightModesComponent
);
_flightModesComponent
->
setupTriggerSignals
();
_components
.
append
(
QVariant
::
fromValue
((
VehicleComponent
*
)
_flightModesComponent
));
}
_sensorsComponent
=
new
SensorsComponent
(
_uas
,
this
);
Q_CHECK_PTR
(
_sensorsComponent
);
_sensorsComponent
->
setupTriggerSignals
();
_components
.
append
(
QVariant
::
fromValue
((
VehicleComponent
*
)
_sensorsComponent
));
_powerComponent
=
new
PowerComponent
(
_uas
,
this
);
Q_CHECK_PTR
(
_powerComponent
);
_powerComponent
->
setupTriggerSignals
();
_components
.
append
(
QVariant
::
fromValue
((
VehicleComponent
*
)
_powerComponent
));
_safetyComponent
=
new
SafetyComponent
(
_uas
,
this
);
Q_CHECK_PTR
(
_safetyComponent
);
_safetyComponent
->
setupTriggerSignals
();
_components
.
append
(
QVariant
::
fromValue
((
VehicleComponent
*
)
_safetyComponent
));
}
else
{
qWarning
()
<<
"Call to vehicleCompenents prior to pluginReady"
;
}
}
}
return
_components
;
return
_components
;
...
...
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