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

2
src/AutoPilotPlugins/APM/APMAutoPilotPlugin.h

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

Loading…
Cancel
Save