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

most users have no flow sensor
This commit is contained in:
Andrew Tridgell 2015-01-01 11:02:43 +11:00
parent 9cafe0fdc3
commit f8bce994b5

View File

@ -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;
}