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));
#if AP_AHRS_NAVEKF_AVAILABLE
OpticalFlow optflow{ahrs};
OpticalFlow optflow = OpticalFlow::create(ahrs);
#endif
// RSSI

View File

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

View File

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

View File

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

View File

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