From 4769055c4a896644850dc2929926e24a4201cbe7 Mon Sep 17 00:00:00 2001 From: "pierre-louis.k" Date: Fri, 3 Aug 2018 16:42:02 +0200 Subject: [PATCH] AP_RangeFinder: Give back semaphore on whoami error --- libraries/AP_RangeFinder/AP_RangeFinder_TeraRangerI2C.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/AP_RangeFinder/AP_RangeFinder_TeraRangerI2C.cpp b/libraries/AP_RangeFinder/AP_RangeFinder_TeraRangerI2C.cpp index 648635c2d6..969ff7e3cf 100644 --- a/libraries/AP_RangeFinder/AP_RangeFinder_TeraRangerI2C.cpp +++ b/libraries/AP_RangeFinder/AP_RangeFinder_TeraRangerI2C.cpp @@ -80,6 +80,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; }