aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Gubler <thomasgubler@gmail.com>2014-08-14 17:30:05 +0200
committerThomas Gubler <thomasgubler@gmail.com>2014-08-14 17:30:05 +0200
commit9ee6ab366d2a7c6f24e2f08021da9cd861663bdc (patch)
treebf6a5c46e634ff034a0085c4df2c82a0eb693a5a
parent017f82e2b808eefedb45971e6c416b6864055769 (diff)
downloadpx4-firmware-9ee6ab366d2a7c6f24e2f08021da9cd861663bdc.tar.gz
px4-firmware-9ee6ab366d2a7c6f24e2f08021da9cd861663bdc.tar.bz2
px4-firmware-9ee6ab366d2a7c6f24e2f08021da9cd861663bdc.zip
add flighttermination circuit breaker
-rw-r--r--src/modules/systemlib/circuit_breaker.c13
-rw-r--r--src/modules/systemlib/circuit_breaker.h1
2 files changed, 14 insertions, 0 deletions
diff --git a/src/modules/systemlib/circuit_breaker.c b/src/modules/systemlib/circuit_breaker.c
index 64317a18a..8a0b51b71 100644
--- a/src/modules/systemlib/circuit_breaker.c
+++ b/src/modules/systemlib/circuit_breaker.c
@@ -95,6 +95,19 @@ PARAM_DEFINE_INT32(CBRK_IO_SAFETY, 0);
*/
PARAM_DEFINE_INT32(CBRK_AIRSPD_CHK, 0);
+/**
+ * Circuit breaker for flight termination
+ *
+ * Setting this parameter to 121212 will disable the flight termination action.
+ * --> The IO driver will not do flight termination if requested by the FMU
+ * WARNING: ENABLING THIS CIRCUIT BREAKER IS AT OWN RISK
+ *
+ * @min 0
+ * @max 121212
+ * @group Circuit Breaker
+ */
+PARAM_DEFINE_INT32(CBRK_FLIGHTTERMINATION, 0);
+
bool circuit_breaker_enabled(const char* breaker, int32_t magic)
{
int32_t val;
diff --git a/src/modules/systemlib/circuit_breaker.h b/src/modules/systemlib/circuit_breaker.h
index b60584608..54c4fced6 100644
--- a/src/modules/systemlib/circuit_breaker.h
+++ b/src/modules/systemlib/circuit_breaker.h
@@ -53,6 +53,7 @@
#define CBRK_RATE_CTRL_KEY 140253
#define CBRK_IO_SAFETY_KEY 22027
#define CBRK_AIRSPD_CHK_KEY 162128
+#define CBRK_FLIGHTTERMINATION_KEY 121212
#include <stdbool.h>