mirror of https://github.com/ArduPilot/ardupilot
AP_RangeFinder: Give back semaphore on whoami error
This commit is contained in:
parent
b0acac0f55
commit
b9af00e7dd
|
@ -76,6 +76,7 @@ bool AP_RangeFinder_TeraRangerI2C::init(void)
|
|||
uint8_t whoami;
|
||||
if (!dev->read_registers(TR_WHOAMI, &whoami, 1) ||
|
||||
whoami != TR_WHOAMI_VALUE) {
|
||||
dev->get_semaphore()->give();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue