mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-09 09:28:31 -04:00
AP_RangeFinder: fix LightwareI2C conversion to I2CDevice
This commit is contained in:
parent
5108b4cbb6
commit
4dfb277683
@ -62,8 +62,9 @@ bool AP_RangeFinder_LightWareI2C::get_reading(uint16_t &reading_cm)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// exit immediately if we can't take the semaphore
|
// exit immediately if we can't take the semaphore
|
||||||
if (!_dev || _dev->get_semaphore()->take(1)) {
|
if (!_dev || !_dev->get_semaphore()->take(1)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user