From 34a328f66d2e432457a73d46931f059933c679a2 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 5 Oct 2013 15:46:35 +1000 Subject: [PATCH] AP_HAL: added safety_switch_state() function in hal.util will be used by copter to check safety switch is set --- libraries/AP_HAL/Util.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libraries/AP_HAL/Util.h b/libraries/AP_HAL/Util.h index b649413d23..927cf4c5f3 100644 --- a/libraries/AP_HAL/Util.h +++ b/libraries/AP_HAL/Util.h @@ -25,6 +25,14 @@ public: // commands virtual bool run_debug_shell(AP_HAL::BetterStream *stream) = 0; + enum safety_state { + SAFETY_NONE, SAFETY_DISARMED, SAFETY_ARMED + }; + + /* + return state of safety switch, if applicable + */ + virtual enum safety_state safety_switch_state(void) { return SAFETY_NONE; } }; #endif // __AP_HAL_UTIL_H__