Browse Source

AP_OpticalFlow: Make PX4FLOW work on all external I2C buses

master
Stone white 6 years ago committed by Andrew Tridgell
parent
commit
8b7b5f0db9
  1. 2
      libraries/AP_OpticalFlow/AP_OpticalFlow_PX4Flow.cpp

2
libraries/AP_OpticalFlow/AP_OpticalFlow_PX4Flow.cpp

@ -60,7 +60,7 @@ bool AP_OpticalFlow_PX4Flow::scan_buses(void) @@ -60,7 +60,7 @@ bool AP_OpticalFlow_PX4Flow::scan_buses(void)
uint8_t retry_attempt = 0;
while (!success && retry_attempt < PX4FLOW_INIT_RETRIES) {
for (uint8_t bus = 0; bus < 3; bus++) {
FOREACH_I2C_EXTERNAL(bus) {
#ifdef HAL_OPTFLOW_PX4FLOW_I2C_BUS
// only one bus from HAL
if (bus != HAL_OPTFLOW_PX4FLOW_I2C_BUS) {

Loading…
Cancel
Save