From 2c64922a1444365130fcef157142ffc6fc1c17b6 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Sat, 16 Jul 2022 15:30:22 +1000 Subject: [PATCH] AP_BoardConfig: use HAL_GCS_ENABLED in place of periph/example check ... periphs can have GCS too... --- libraries/AP_BoardConfig/AP_BoardConfig.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/AP_BoardConfig/AP_BoardConfig.cpp b/libraries/AP_BoardConfig/AP_BoardConfig.cpp index 2a44f8a758..0d87b9c086 100644 --- a/libraries/AP_BoardConfig/AP_BoardConfig.cpp +++ b/libraries/AP_BoardConfig/AP_BoardConfig.cpp @@ -416,7 +416,7 @@ void AP_BoardConfig::throw_error(const char *err_type, const char *fmt, va_list vprintf(printfmt, arg_copy); va_end(arg_copy); } -#if !APM_BUILD_TYPE(APM_BUILD_UNKNOWN) && !defined(HAL_BUILD_AP_PERIPH) +#if HAL_GCS_ENABLED hal.util->snprintf(printfmt, sizeof(printfmt), "%s: %s", err_type, fmt); { va_list arg_copy; @@ -426,7 +426,7 @@ void AP_BoardConfig::throw_error(const char *err_type, const char *fmt, va_list } #endif } -#if !APM_BUILD_TYPE(APM_BUILD_UNKNOWN) && !defined(HAL_BUILD_AP_PERIPH) +#if HAL_GCS_ENABLED gcs().update_receive(); gcs().update_send(); #endif