global: use static method to construct AP_OpticalFlow

This commit is contained in:
Lucas De Marchi 2017-08-28 14:56:03 -07:00 committed by Francisco Ferreira
parent 04c3dca3ce
commit fbe0d9761c
5 changed files with 5 additions and 5 deletions

View File

@ -185,7 +185,7 @@ private:
FUNCTOR_BIND_MEMBER(&Rover::exit_mission, void)); FUNCTOR_BIND_MEMBER(&Rover::exit_mission, void));
#if AP_AHRS_NAVEKF_AVAILABLE #if AP_AHRS_NAVEKF_AVAILABLE
OpticalFlow optflow{ahrs}; OpticalFlow optflow = OpticalFlow::create(ahrs);
#endif #endif
// RSSI // RSSI

View File

@ -233,7 +233,7 @@ private:
// Optical flow sensor // Optical flow sensor
#if OPTFLOW == ENABLED #if OPTFLOW == ENABLED
OpticalFlow optflow{ahrs}; OpticalFlow optflow = OpticalFlow::create(ahrs);
#endif #endif
// gnd speed limit required to observe optical flow sensor limits // gnd speed limit required to observe optical flow sensor limits

View File

@ -279,7 +279,7 @@ private:
#if OPTFLOW == ENABLED #if OPTFLOW == ENABLED
// Optical flow sensor // Optical flow sensor
OpticalFlow optflow{ahrs}; OpticalFlow optflow = OpticalFlow::create(ahrs);
#endif #endif
// Rally Ponints // Rally Ponints

View File

@ -200,7 +200,7 @@ private:
// Optical flow sensor // Optical flow sensor
#if OPTFLOW == ENABLED #if OPTFLOW == ENABLED
OpticalFlow optflow {ahrs}; OpticalFlow optflow = OpticalFlow::create(ahrs);
#endif #endif
// gnd speed limit required to observe optical flow sensor limits // gnd speed limit required to observe optical flow sensor limits

View File

@ -34,7 +34,7 @@ public:
}; };
static DummyVehicle vehicle; static DummyVehicle vehicle;
static OpticalFlow optflow(vehicle.ahrs); static OpticalFlow optflow = OpticalFlow::create(vehicle.ahrs);
void setup() void setup()
{ {