From 8862e76284aba515db819e67a01e73e71ac0df1d Mon Sep 17 00:00:00 2001 From: davidaroyer Date: Thu, 17 Aug 2017 17:41:28 -0500 Subject: [PATCH] AP_HAL: add support for Aerotenna OcPoC-Zynq hardware --- libraries/AP_HAL/AP_HAL_Boards.h | 2 ++ libraries/AP_HAL/board/linux.h | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/libraries/AP_HAL/AP_HAL_Boards.h b/libraries/AP_HAL/AP_HAL_Boards.h index 9c663b959f..bea7ef13ea 100644 --- a/libraries/AP_HAL/AP_HAL_Boards.h +++ b/libraries/AP_HAL/AP_HAL_Boards.h @@ -37,6 +37,7 @@ #define HAL_BOARD_SUBTYPE_LINUX_DARK 1016 #define HAL_BOARD_SUBTYPE_LINUX_URUS 1017 #define HAL_BOARD_SUBTYPE_LINUX_BLUE 1018 +#define HAL_BOARD_SUBTYPE_LINUX_OCPOC_ZYNQ 1019 /* HAL PX4 sub-types, starting at 2000 */ #define HAL_BOARD_SUBTYPE_PX4_V1 2000 @@ -105,6 +106,7 @@ #define HAL_COMPASS_NAVIO2 14 #define HAL_COMPASS_NAVIO 15 #define HAL_COMPASS_AERO 16 +#define HAL_COMPASS_OCPOC_ZYNQ 17 /* Heat Types */ #define HAL_LINUX_HEAT_PWM 1 diff --git a/libraries/AP_HAL/board/linux.h b/libraries/AP_HAL/board/linux.h index 81ab285f10..aa9efb77e5 100644 --- a/libraries/AP_HAL/board/linux.h +++ b/libraries/AP_HAL/board/linux.h @@ -211,6 +211,20 @@ #define HAL_INS_DEFAULT HAL_INS_HIL #define HAL_BARO_DEFAULT HAL_BARO_HIL #define HAL_COMPASS_DEFAULT HAL_COMPASS_HIL +#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_OCPOC_ZYNQ +#define HAL_BOARD_LOG_DIRECTORY "/var/APM/logs" +#define HAL_BOARD_TERRAIN_DIRECTORY "/var/APM/terrain" +#define HAL_INS_DEFAULT HAL_INS_MPU9250_SPI +#define HAL_INS_DEFAULT_ROTATION ROTATION_NONE +#define HAL_INS_MPU9250_NAME "mpu9250" +#define HAL_BARO_DEFAULT HAL_BARO_MS5611_SPI +#define HAL_BARO_MS5611_NAME "ms5611" +#define HAL_COMPASS_DEFAULT HAL_COMPASS_OCPOC_ZYNQ +#define OCPOC_DEFAULT_RCIN_SBUS 1 +/* HMC5843 can be an external compass */ +#define HAL_COMPASS_HMC5843_I2C_BUS 4 +#define HAL_COMPASS_HMC5843_I2C_ADDR 0x1E +#define AP_COMPASS_OFFSETS_MAX_DEFAULT 1000 #elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_BBBMINI #define HAL_BOARD_LOG_DIRECTORY "/var/APM/logs" #define HAL_BOARD_TERRAIN_DIRECTORY "/var/APM/terrain"