Browse Source

AP_OpticalFlow: don't write an error message if no flow sensor

most users have no flow sensor
mission-4.1.18
Andrew Tridgell 10 years ago
parent
commit
f8bce994b5
  1. 3
      libraries/AP_OpticalFlow/AP_OpticalFlow_PX4.cpp

3
libraries/AP_OpticalFlow/AP_OpticalFlow_PX4.cpp

@ -42,8 +42,7 @@ void AP_OpticalFlow_PX4::init(void) @@ -42,8 +42,7 @@ void AP_OpticalFlow_PX4::init(void)
_fd = open(PX4FLOW_DEVICE_PATH, O_RDONLY);
// check for failure to open device
if (_fd < 0) {
hal.console->printf("Unable to open " PX4FLOW_DEVICE_PATH "\n");
if (_fd == -1) {
return;
}

Loading…
Cancel
Save