From faf09f849a02be18b36ee359b709a547db3af8d6 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 144762e512839d..251589f85278c3 100644 --- a/libraries/AP_SmartRTL/AP_SmartRTL.h +++ b/libraries/AP_SmartRTL/AP_SmartRTL.h @@ -48,6 +48,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