ardupilot/libraries/AP_OpticalFlow
Lucas De Marchi 388a6683ad AP_OpticalFlow: fix optical flow initialization
This fixes the initialization for Linux boards using the PX4Flow module.
The problem is that after the conversion to use I2CDevice we now need to
use I2CDeviceManager, which is statically constructed after the vehicle
object.

So, if we try to call hal.i2c_mgr->get_device(), it will call the
get_device() method before the constructor is called and receive a
SIGSEGV:

Program received signal SIGSEGV, Segmentation fault.
0x000b06c0 in OpticalFlow::OpticalFlow (this=0x140914 <copter+4980>, ahrs=...)
    at ../../libraries/AP_OpticalFlow/OpticalFlow.cpp:54
54      ../../libraries/AP_OpticalFlow/OpticalFlow.cpp: No such file or directory.
2016-05-13 11:22:12 -03:00
..
examples/AP_OpticalFlow_test waf: ardupilotwaf: prefix build context methods with ap_ 2016-01-22 20:10:29 -02:00
AP_OpticalFlow.h AP_OpticalFlow: split library into frontend/backend 2015-01-03 14:16:33 +11:00
AP_OpticalFlow_HIL.cpp AP_OpticalFlow: standardize inclusion of libaries headers 2015-08-11 16:38:21 +10:00
AP_OpticalFlow_HIL.h AP_OpticalFlow: replace header guard with pragma once 2016-02-18 14:52:35 -02:00
AP_OpticalFlow_Linux.cpp AP_OpticalFlow: use I2CDevice interface 2016-04-29 12:01:04 -03:00
AP_OpticalFlow_Linux.h AP_OpticalFlow: use I2CDevice interface 2016-04-29 12:01:04 -03:00
AP_OpticalFlow_Onboard.cpp AP_OpticalFlow: fix use of undefined variable 2016-03-03 18:37:15 -03:00
AP_OpticalFlow_Onboard.h AP_OpticalFlow: follow coding style 2015-12-18 17:56:05 +11:00
AP_OpticalFlow_PX4.cpp AP_OpticalFlow: standardize inclusion of libaries headers 2015-08-11 16:38:21 +10:00
AP_OpticalFlow_PX4.h AP_OpticalFlow: replace header guard with pragma once 2016-02-18 14:52:35 -02:00
OpticalFlow.cpp AP_OpticalFlow: fix optical flow initialization 2016-05-13 11:22:12 -03:00
OpticalFlow.h AP_OpticalFlow: replace header guard with pragma once 2016-02-18 14:52:35 -02:00
OpticalFlow_backend.cpp AP_OpticalFlow: use millis/micros/panic functions 2015-11-20 12:33:19 +09:00
OpticalFlow_backend.h AP_OpticalFlow: replace header guard with pragma once 2016-02-18 14:52:35 -02:00
keywords.txt OptFlow: fixup line endings 2014-04-15 15:57:33 +09:00