ArduSub: add and use AP_ADVANCEDFAILSAFE_ENABLED

This commit is contained in:
Peter Barker 2023-02-07 13:17:39 +11:00 committed by Andrew Tridgell
parent 648a13d3f7
commit 77039f38f6
1 changed files with 3 additions and 0 deletions

View File

@ -275,8 +275,11 @@ bool Sub::should_log(uint32_t mask)
#include <AP_ADSB/AP_ADSB.h> #include <AP_ADSB/AP_ADSB.h>
// dummy method to avoid linking AFS // dummy method to avoid linking AFS
#if AP_ADVANCEDFAILSAFE_ENABLED
bool AP_AdvancedFailsafe::gcs_terminate(bool should_terminate, const char *reason) { return false; } bool AP_AdvancedFailsafe::gcs_terminate(bool should_terminate, const char *reason) { return false; }
AP_AdvancedFailsafe *AP::advancedfailsafe() { return nullptr; } AP_AdvancedFailsafe *AP::advancedfailsafe() { return nullptr; }
#endif
#if HAL_ADSB_ENABLED #if HAL_ADSB_ENABLED
// dummy method to avoid linking AP_Avoidance // dummy method to avoid linking AP_Avoidance
AP_Avoidance *AP::ap_avoidance() { return nullptr; } AP_Avoidance *AP::ap_avoidance() { return nullptr; }