AP_HAL: define compass locations for linux boards

This commit is contained in:
Lucas De Marchi 2016-03-04 16:11:09 -03:00
parent 6e658452ec
commit 0ed3a93142
1 changed files with 27 additions and 0 deletions

View File

@ -150,6 +150,8 @@
#define HAL_BARO_BMP085_BUS 1
#define HAL_BARO_BMP085_I2C_ADDR 0x77
#define HAL_COMPASS_DEFAULT HAL_COMPASS_HMC5843
#define HAL_COMPASS_HMC5843_I2C_BUS 1
#define HAL_COMPASS_HMC5843_I2C_ADDR 0x1E
#define HAL_SERIAL0_BAUD_DEFAULT 115200
#define CONFIG_HAL_BOARD_SUBTYPE HAL_BOARD_SUBTYPE_NONE
#define HAL_GPIO_A_LED_PIN 13
@ -204,6 +206,8 @@
#define HAL_BARO_DEFAULT HAL_BARO_MS5611_SPI
#define HAL_BARO_MS5611_NAME "ms5611"
#define HAL_COMPASS_DEFAULT HAL_COMPASS_AK8963_MPU9250
#define HAL_COMPASS_HMC5843_I2C_BUS 1
#define HAL_COMPASS_HMC5843_I2C_ADDR 0x1E
#define HAL_GPIO_A_LED_PIN 61
#define HAL_GPIO_B_LED_PIN 48
#define HAL_GPIO_C_LED_PIN 117
@ -255,6 +259,8 @@
#define HAL_BARO_MS5611_I2C_ADDR 0x77
#define HAL_BARO_MS5611_USE_TIMER true
#define HAL_COMPASS_DEFAULT HAL_COMPASS_HMC5843_MPU6000
/* Internal compass */
#define HAL_COMPASS_HMC5843_I2C_ADDR 0x1E
#define HAL_OPTFLOW_ONBOARD_VDEV_PATH "/dev/video0"
#define HAL_OPTFLOW_ONBOARD_SENSOR_WIDTH 320
#define HAL_OPTFLOW_ONBOARD_SENSOR_HEIGHT 240
@ -281,6 +287,9 @@
#define HAL_BARO_MS5611_I2C_ADDR 0x77
#define HAL_BARO_MS5611_USE_TIMER false
#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
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_NAVIO2
#define HAL_BOARD_LOG_DIRECTORY "/var/APM/logs"
#define HAL_BOARD_TERRAIN_DIRECTORY "/var/APM/terrain"
@ -291,6 +300,9 @@
#define HAL_BARO_MS5611_I2C_ADDR 0x77
#define HAL_BARO_MS5611_USE_TIMER false
#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_GPIO_A_LED_PIN 16
#define HAL_GPIO_B_LED_PIN 16
#define HAL_GPIO_C_LED_PIN 16
@ -306,6 +318,9 @@
#define HAL_BARO_DEFAULT HAL_BARO_MS5611_SPI
#define HAL_BARO_MS5611_NAME "ms5611"
#define HAL_COMPASS_DEFAULT HAL_COMPASS_RASPILOT
/* HMC5843 can be an external compass */
#define HAL_COMPASS_HMC5843_I2C_BUS 1
#define HAL_COMPASS_HMC5843_I2C_ADDR 0x1E
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_ERLEBRAIN2
#define HAL_BOARD_LOG_DIRECTORY "/var/APM/logs"
#define HAL_BOARD_TERRAIN_DIRECTORY "/var/APM/terrain"
@ -314,6 +329,9 @@
#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_GPIO_A_LED_PIN 24
#define HAL_GPIO_B_LED_PIN 25
#define HAL_GPIO_C_LED_PIN 16
@ -334,6 +352,9 @@
#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 2
#define HAL_COMPASS_HMC5843_I2C_ADDR 0x1E
#define HAL_OPTFLOW_ONBOARD_VDEV_PATH "/dev/video0"
#define HAL_OPTFLOW_ONBOARD_SENSOR_WIDTH 320
#define HAL_OPTFLOW_ONBOARD_SENSOR_HEIGHT 240
@ -361,6 +382,9 @@
#define HAL_INS_MPU60x0_I2C_BUS 1
#define HAL_INS_MPU60x0_I2C_ADDR 0x69
#define HAL_COMPASS_DEFAULT HAL_COMPASS_BH
/* HMC5843 can be an external compass */
#define HAL_COMPASS_HMC5843_I2C_BUS 1
#define HAL_COMPASS_HMC5843_I2C_ADDR 0x1E
#define HAL_GPIO_A_LED_PIN 17
#define HAL_GPIO_B_LED_PIN 18
#define HAL_GPIO_C_LED_PIN 22
@ -384,6 +408,9 @@
#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_GPIO_A_LED_PIN 24
#define HAL_GPIO_B_LED_PIN 25
#define HAL_GPIO_C_LED_PIN 16