From 810973ce957d0991ca71f91ad7706c6c0c2108c6 Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Thu, 30 Jul 2015 15:40:36 +0900 Subject: [PATCH] HAL: define capability bitmask --- libraries/AP_HAL/Util.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libraries/AP_HAL/Util.h b/libraries/AP_HAL/Util.h index a43abdf597..1b7e0d3929 100644 --- a/libraries/AP_HAL/Util.h +++ b/libraries/AP_HAL/Util.h @@ -9,7 +9,7 @@ class AP_HAL::Util { public: // soft_armed starts out true - Util() : soft_armed(true) {} + Util() : soft_armed(true), capabilities(0) {} int snprintf(char* str, size_t size, const char *format, ...); @@ -26,6 +26,10 @@ public: void set_soft_armed(const bool b) { soft_armed = b; } bool get_soft_armed() const { return soft_armed; } + void set_capabilities(uint64_t cap) { capabilities |= cap; } + void clear_capabilities(uint64_t cap) { capabilities &= ~(cap); } + uint64_t get_capabilities() const { return capabilities; } + virtual const char* get_custom_log_directory() { return NULL; } virtual const char* get_custom_terrain_directory() const { return NULL; } @@ -82,6 +86,7 @@ public: protected: bool soft_armed; + uint64_t capabilities; }; #endif // __AP_HAL_UTIL_H__