AP_HAL_ChibiOS: gate mavlink things on HAL_GCS_ENABLED, not HAL_BOOTLOADER_BUILD

This commit is contained in:
Peter Barker 2022-08-15 19:13:04 +10:00 committed by Andrew Tridgell
parent 4cd97d58d7
commit dd139a3a63
2 changed files with 4 additions and 2 deletions

View File

@ -255,12 +255,10 @@ uint64_t Util::get_hw_rtc() const
#if !defined(HAL_NO_FLASH_SUPPORT) && !defined(HAL_NO_ROMFS_SUPPORT)
#ifndef HAL_BOOTLOADER_BUILD
#include <GCS_MAVLink/GCS.h>
#if HAL_GCS_ENABLED
#define Debug(fmt, args ...) do { gcs().send_text(MAV_SEVERITY_INFO, fmt, ## args); } while (0)
#endif // HAL_GCS_ENABLED
#endif // ifndef HAL_BOOT_LOADER_BUILD
#ifndef Debug
#define Debug(fmt, args ...) do { hal.console->printf(fmt, ## args); } while (0)

View File

@ -3030,6 +3030,10 @@ def add_bootloader_defaults(f):
#ifndef HAL_ENABLE_SAVE_PERSISTENT_PARAMS
#define HAL_ENABLE_SAVE_PERSISTENT_PARAMS 0
#endif
#ifndef HAL_GCS_ENABLED
#define HAL_GCS_ENABLED 0
#endif
''')
def add_iomcu_firmware_defaults(f):