diff --git a/libraries/AP_OpticalFlow/examples/AP_OpticalFlow_test/AP_OpticalFlow_test.cpp b/libraries/AP_OpticalFlow/examples/AP_OpticalFlow_test/AP_OpticalFlow_test.cpp index 1a0bf46f62..b849262eb7 100644 --- a/libraries/AP_OpticalFlow/examples/AP_OpticalFlow_test/AP_OpticalFlow_test.cpp +++ b/libraries/AP_OpticalFlow/examples/AP_OpticalFlow_test/AP_OpticalFlow_test.cpp @@ -33,7 +33,7 @@ public: }; static DummyVehicle vehicle; -static OpticalFlow optflow{vehicle.ahrs}; +static OpticalFlow optflow; void setup() { @@ -42,7 +42,7 @@ void setup() hal.scheduler->delay(1000); // flowSensor initialization - optflow.init(); + optflow.init(-1); if (!optflow.healthy()) { hal.console->printf("Failed to initialise PX4Flow ");