Browse Source

Fix no serial and android builds

QGC4.4
Don Gagne 6 years ago
parent
commit
1a963e4d04
  1. 4
      src/AutoPilotPlugins/APM/APMAutoPilotPlugin.cc
  2. 2
      src/AutoPilotPlugins/APM/APMAutoPilotPlugin.h

4
src/AutoPilotPlugins/APM/APMAutoPilotPlugin.cc

@ -54,7 +54,9 @@ APMAutoPilotPlugin::APMAutoPilotPlugin(Vehicle* vehicle, QObject* parent) @@ -54,7 +54,9 @@ APMAutoPilotPlugin::APMAutoPilotPlugin(Vehicle* vehicle, QObject* parent)
{
APMAirframeLoader::loadAirframeFactMetaData();
#if !defined(NO_SERIAL_LINK) && !defined(__android__)
connect(vehicle->parameterManager(), &ParameterManager::parametersReadyChanged, this, &APMAutoPilotPlugin::_checkForBadCubeBlack);
#endif
}
APMAutoPilotPlugin::~APMAutoPilotPlugin()
@ -176,6 +178,7 @@ QString APMAutoPilotPlugin::prerequisiteSetup(VehicleComponent* component) const @@ -176,6 +178,7 @@ QString APMAutoPilotPlugin::prerequisiteSetup(VehicleComponent* component) const
return QString();
}
#if !defined(NO_SERIAL_LINK) && !defined(__android__)
/// The following code is executed when the Vehicle is parameter ready. It checks for the service bulletin against Cube Blacks.
void APMAutoPilotPlugin::_checkForBadCubeBlack(void)
{
@ -204,3 +207,4 @@ void APMAutoPilotPlugin::_checkForBadCubeBlack(void) @@ -204,3 +207,4 @@ void APMAutoPilotPlugin::_checkForBadCubeBlack(void)
}
}
#endif

2
src/AutoPilotPlugins/APM/APMAutoPilotPlugin.h

@ -59,8 +59,10 @@ protected: @@ -59,8 +59,10 @@ protected:
ESP8266Component* _esp8266Component;
APMHeliComponent* _heliComponent;
#if !defined(NO_SERIAL_LINK) && !defined(__android__)
private slots:
void _checkForBadCubeBlack(void);
#endif
private:
QVariantList _components;

Loading…
Cancel
Save