mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
AP_Airspeed: return when airspeed init fails
This commit is contained in:
parent
1230df8b0d
commit
c6c59174b3
@ -96,6 +96,7 @@ void AP_Airspeed::init()
|
|||||||
if (_ets_fd == -1) {
|
if (_ets_fd == -1) {
|
||||||
hal.console->println("Failed to open ETS airspeed driver");
|
hal.console->println("Failed to open ETS airspeed driver");
|
||||||
_enable.set(0);
|
_enable.set(0);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
if (OK != ioctl(_ets_fd, SENSORIOCSPOLLRATE, 100) ||
|
if (OK != ioctl(_ets_fd, SENSORIOCSPOLLRATE, 100) ||
|
||||||
OK != ioctl(_ets_fd, SENSORIOCSQUEUEDEPTH, 15)) {
|
OK != ioctl(_ets_fd, SENSORIOCSQUEUEDEPTH, 15)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user