From 29bc07f410df065d276d4205d735c2643eee1ea8 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 10 Dec 2016 18:01:49 +1100 Subject: [PATCH] AP_HAL: setup for building ucavcan on FMUv3 but not FMUv2 save a lot of flash space on FMUv2 --- libraries/AP_HAL/AP_HAL_Boards.h | 4 ++++ libraries/AP_HAL/board/px4.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/libraries/AP_HAL/AP_HAL_Boards.h b/libraries/AP_HAL/AP_HAL_Boards.h index fd12e46fc1..bb52cc8c76 100644 --- a/libraries/AP_HAL/AP_HAL_Boards.h +++ b/libraries/AP_HAL/AP_HAL_Boards.h @@ -169,3 +169,7 @@ #define HAL_COMPASS_HMC5843_I2C_ADDR 0x1E #endif +#ifndef HAL_WITH_UAVCAN +#define HAL_WITH_UAVCAN 0 +#endif + diff --git a/libraries/AP_HAL/board/px4.h b/libraries/AP_HAL/board/px4.h index f0e3b2d8a4..50321db639 100644 --- a/libraries/AP_HAL/board/px4.h +++ b/libraries/AP_HAL/board/px4.h @@ -24,9 +24,11 @@ #define HAL_STORAGE_SIZE 16384 #define HAL_HAVE_IMU_HEATER 1 // for Pixhawk2 #define HAL_IMU_TEMP_DEFAULT -1 // disabled +#define HAL_WITH_UAVCAN 1 #elif defined(CONFIG_ARCH_BOARD_PX4FMU_V4) #define CONFIG_HAL_BOARD_SUBTYPE HAL_BOARD_SUBTYPE_PX4_V4 #define HAL_STORAGE_SIZE 16384 +#define HAL_WITH_UAVCAN 1 #else #error "Unknown PX4 board type" #endif