From aed1e656e56487a7ac03a8955f6457fc20b3b0ef Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Wed, 12 May 2021 13:04:33 +1000 Subject: [PATCH] AP_SmartRTL: add accessor to get the path semaphore --- libraries/AP_SmartRTL/AP_SmartRTL.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libraries/AP_SmartRTL/AP_SmartRTL.h b/libraries/AP_SmartRTL/AP_SmartRTL.h index a83cad692a034..0879d5be82ff9 100644 --- a/libraries/AP_SmartRTL/AP_SmartRTL.h +++ b/libraries/AP_SmartRTL/AP_SmartRTL.h @@ -47,6 +47,11 @@ class AP_SmartRTL { // this may fail if the IO thread has taken the path semaphore bool peek_point(Vector3f& point); + // returns the semaphore responsible for path protection: + HAL_Semaphore &path_semaphore(void) { + return _path_sem; + } + // clear return path and set return location if position_ok is true. This should be called as part of the arming procedure // if position_ok is false, SmartRTL will not be available. // example sketches use the method that allows providing vehicle position directly