From 4f57467aa5b24d09133d2a032ebd14e92670b54f Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 8 Aug 2014 13:30:51 +1000 Subject: [PATCH] Plane: build AFS (formerly known as OBC) failsafe on Pixhawk this gives an advanced failsafe system which may be useful for other than OBC use --- ArduPlane/Parameters.pde | 4 +++- ArduPlane/config.h | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ArduPlane/Parameters.pde b/ArduPlane/Parameters.pde index d31099c10f..7158c7ce4f 100644 --- a/ArduPlane/Parameters.pde +++ b/ArduPlane/Parameters.pde @@ -1073,7 +1073,9 @@ const AP_Param::Info var_info[] PROGMEM = { #endif #if OBC_FAILSAFE == ENABLED - GOBJECT(obc, "FS_", APM_OBC), + // @Group: AFS_ + // @Path: ../libraries/APM_OBC/APM_OBC.cpp + GOBJECT(obc, "AFS_", APM_OBC), #endif #if AP_AHRS_NAVEKF_AVAILABLE diff --git a/ArduPlane/config.h b/ArduPlane/config.h index fb46b66f0f..27f621f44a 100644 --- a/ArduPlane/config.h +++ b/ArduPlane/config.h @@ -138,7 +138,6 @@ #endif #endif - ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// // RADIO CONFIGURATION @@ -488,8 +487,12 @@ // OBC Failsafe enable #ifndef OBC_FAILSAFE +#if HAL_CPU_CLASS >= HAL_CPU_CLASS_75 + # define OBC_FAILSAFE ENABLED +#else # define OBC_FAILSAFE DISABLED #endif +#endif #ifndef SERIAL_BUFSIZE # define SERIAL_BUFSIZE 512