From 0e7ade6f0c19ffa8c5347ea3cf2d14f61b2bafb6 Mon Sep 17 00:00:00 2001 From: mirkix Date: Wed, 13 Dec 2017 20:35:00 +0100 Subject: [PATCH] AP_HAL: add new board PocketPilot --- libraries/AP_HAL/AP_HAL_Boards.h | 1 + libraries/AP_HAL/board/linux.h | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/libraries/AP_HAL/AP_HAL_Boards.h b/libraries/AP_HAL/AP_HAL_Boards.h index 19705680c3..d9f0126676 100644 --- a/libraries/AP_HAL/AP_HAL_Boards.h +++ b/libraries/AP_HAL/AP_HAL_Boards.h @@ -38,6 +38,7 @@ #define HAL_BOARD_SUBTYPE_LINUX_OCPOC_ZYNQ 1019 #define HAL_BOARD_SUBTYPE_LINUX_EDGE 1020 #define HAL_BOARD_SUBTYPE_LINUX_RST_ZYNQ 1021 +#define HAL_BOARD_SUBTYPE_LINUX_POCKET 1022 /* HAL PX4 sub-types, starting at 2000 */ #define HAL_BOARD_SUBTYPE_PX4_V1 2000 diff --git a/libraries/AP_HAL/board/linux.h b/libraries/AP_HAL/board/linux.h index 884cb2221e..501504f1a4 100644 --- a/libraries/AP_HAL/board/linux.h +++ b/libraries/AP_HAL/board/linux.h @@ -267,6 +267,23 @@ #define HAL_COMPASS_HMC5843_I2C_ADDR 0x1E #define HAL_OPTFLOW_PX4FLOW_I2C_BUS 2 #define HAL_RANGEFINDER_LIGHTWARE_I2C_BUS 2 +#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_POCKET +#define HAL_GPIO_A_LED_PIN 27 +#define HAL_GPIO_B_LED_PIN 26 +#define HAL_GPIO_C_LED_PIN 25 +#define HAL_GPIO_LED_ON HIGH +#define HAL_GPIO_LED_OFF LOW +#define HAL_INS_DEFAULT HAL_INS_MPU9250_SPI +#define HAL_INS_MPU9250_NAME "mpu9250" +#define HAL_INS_DEFAULT_ROTATION ROTATION_NONE +#define HAL_BARO_DEFAULT HAL_BARO_MS5611_SPI +#define HAL_BARO_MS5611_NAME "ms5611" +#define HAL_COMPASS_DEFAULT HAL_COMPASS_AK8963_MPU9250 +/* HMC5843 can be an external compass */ +#define HAL_COMPASS_HMC5843_I2C_BUS 1 +#define HAL_COMPASS_HMC5843_I2C_ADDR 0x1E +#define HAL_OPTFLOW_PX4FLOW_I2C_BUS 2 +#define HAL_RANGEFINDER_LIGHTWARE_I2C_BUS 2 #elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_BH #define HAL_BOARD_LOG_DIRECTORY "/var/APM/logs" #define HAL_BOARD_TERRAIN_DIRECTORY "/var/APM/terrain"