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
ebbcd773
Commit
ebbcd773
authored
Jan 18, 2016
by
dogmaphobic
Browse files
Using proper Fact testing to test if the WiFi Bridge is present.
parent
c0393e63
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/AutoPilotPlugins/PX4/PX4AutoPilotPlugin.cc
View file @
ebbcd773
...
...
@@ -104,24 +104,11 @@ const QVariantList& PX4AutoPilotPlugin::vehicleComponents(void)
_components
.
append
(
QVariant
::
fromValue
((
VehicleComponent
*
)
_radioComponent
));
//-- Is there an ESP8266 Connected?
#ifdef QT_DEBUG
#ifndef __mobile__
//-- Unit test barfs if I ask for a parameter that does not exists. The whole poing of the
// test below is to behave differently if ESP8266 is present or not.
if
(
!
qgcApp
()
->
runningUnitTests
())
{
#endif
#endif
Fact
*
espVersion
=
getFact
(
FactSystem
::
ParameterProvider
,
MAV_COMP_ID_UDP_BRIDGE
,
"SW_VER"
);
if
(
espVersion
&&
espVersion
->
componentId
()
==
MAV_COMP_ID_UDP_BRIDGE
)
{
if
(
factExists
(
FactSystem
::
ParameterProvider
,
MAV_COMP_ID_UDP_BRIDGE
,
"SW_VER"
))
{
_esp8266Component
=
new
PX4ESP8266Component
(
_vehicle
,
this
);
_esp8266Component
->
setupTriggerSignals
();
_components
.
append
(
QVariant
::
fromValue
((
VehicleComponent
*
)
_esp8266Component
));
}
#ifdef QT_DEBUG
#ifndef __mobile__
}
#endif
#endif
_flightModesComponent
=
new
FlightModesComponent
(
_vehicle
,
this
);
_flightModesComponent
->
setupTriggerSignals
();
...
...
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