From f8bce994b5dd9e141e7f324f367b7dc21a73706e Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 1 Jan 2015 11:02:43 +1100 Subject: [PATCH] AP_OpticalFlow: don't write an error message if no flow sensor most users have no flow sensor --- libraries/AP_OpticalFlow/AP_OpticalFlow_PX4.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libraries/AP_OpticalFlow/AP_OpticalFlow_PX4.cpp b/libraries/AP_OpticalFlow/AP_OpticalFlow_PX4.cpp index 266e69e680..7c6d656f8a 100644 --- a/libraries/AP_OpticalFlow/AP_OpticalFlow_PX4.cpp +++ b/libraries/AP_OpticalFlow/AP_OpticalFlow_PX4.cpp @@ -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; }