AP_OpticalFlow: allow to search on I2C bus 2

This commit is contained in:
mirkix 2017-03-07 22:01:42 +01:00 committed by Lucas De Marchi
parent ad208cab56
commit ac60ddfdde

View File

@ -55,7 +55,7 @@ AP_OpticalFlow_PX4Flow *AP_OpticalFlow_PX4Flow::detect(OpticalFlow &_frontend)
*/
bool AP_OpticalFlow_PX4Flow::scan_buses(void)
{
for (uint8_t bus=0; bus<2; bus++) {
for (uint8_t bus = 0; bus < 3; bus++) {
#ifdef HAL_OPTFLOW_PX4FLOW_I2C_BUS
// only one bus from HAL
if (bus != HAL_OPTFLOW_PX4FLOW_I2C_BUS) {