Browse Source

AP_Airspeed: return when airspeed init fails

master
Andrew Tridgell 12 years ago
parent
commit
c6c59174b3
  1. 1
      libraries/AP_Airspeed/AP_Airspeed.cpp

1
libraries/AP_Airspeed/AP_Airspeed.cpp

@ -96,6 +96,7 @@ void AP_Airspeed::init() @@ -96,6 +96,7 @@ void AP_Airspeed::init()
if (_ets_fd == -1) {
hal.console->println("Failed to open ETS airspeed driver");
_enable.set(0);
return;
}
if (OK != ioctl(_ets_fd, SENSORIOCSPOLLRATE, 100) ||
OK != ioctl(_ets_fd, SENSORIOCSQUEUEDEPTH, 15)) {

Loading…
Cancel
Save