To pull the mavlink libraries:
git submodule init
git submodule update
optical flow:
https://github.com/PX4/Flow/blob/master/src/modules/flow/flow.c
https://github.com/PX4/OpticalFlow/blob/master/src/px4flow.cpp
mavlink:
https://mavlink.io/en/mavgen_c/
https://github.com/mavlink/c_library_v2
https://github.com/mavlink/c_library_v2/blob/master/common/mavlink_msg_optical_flow.h
https://github.com/mavlink/c_library_v1/blob/master/common/mavlink_msg_optical_flow.h#L200
https://github.com/mavlink/c_library_v1/blob/master/mavlink_helpers.h#L620
https://github.com/PX4/Flow/blob/master/src/modules/flow/main.c#L572
i2c:
https://github.com/PX4/Flow/blob/master/src/include/i2c_frame.h
https://github.com/eschnou/arduino-px4flow-i2c
TFmini Plus (std9040):
http://en.benewake.com/product/detail/5c345cd0e5b3a844c472329b.html
https://github.com/senegalo/TFMiniPlus