Browse Source

AP_OpticalFlow: run PX4 flow sensor at 10Hz

Pair-Programmed-With: Paul Riseborough <p_riseborough@live.com.au>
master
Andrew Tridgell 10 years ago
parent
commit
ed510d4f87
  1. 5
      libraries/AP_OpticalFlow/AP_OpticalFlow_PX4.cpp

5
libraries/AP_OpticalFlow/AP_OpticalFlow_PX4.cpp

@ -47,6 +47,11 @@ void AP_OpticalFlow_PX4::init(void) @@ -47,6 +47,11 @@ void AP_OpticalFlow_PX4::init(void)
return;
}
// change to 10Hz update
if (ioctl(_fd, SENSORIOCSPOLLRATE, 10) != 0) {
hal.console->printf("Unable to set flow rate to 10Hz\n");
}
// if we got this far, the sensor must be healthy
_flags.healthy = true;
}

Loading…
Cancel
Save