From 77039f38f689638f4d49d9cb9a3d46a05efc0080 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Tue, 7 Feb 2023 13:17:39 +1100 Subject: [PATCH] ArduSub: add and use AP_ADVANCEDFAILSAFE_ENABLED --- ArduSub/system.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ArduSub/system.cpp b/ArduSub/system.cpp index f3639b96ca..55d571e553 100644 --- a/ArduSub/system.cpp +++ b/ArduSub/system.cpp @@ -275,8 +275,11 @@ bool Sub::should_log(uint32_t mask) #include // dummy method to avoid linking AFS +#if AP_ADVANCEDFAILSAFE_ENABLED bool AP_AdvancedFailsafe::gcs_terminate(bool should_terminate, const char *reason) { return false; } AP_AdvancedFailsafe *AP::advancedfailsafe() { return nullptr; } +#endif + #if HAL_ADSB_ENABLED // dummy method to avoid linking AP_Avoidance AP_Avoidance *AP::ap_avoidance() { return nullptr; }