mirror of https://github.com/ArduPilot/ardupilot
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;
|
||||
}
|
||||
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue