AP_HAL: Linux: add define for storage dir

This mantains compatibility with what the boards were already using,
except for Aero and Minlure in which I'm changing it already as this is
desired.
This commit is contained in:
Lucas De Marchi 2017-10-29 23:58:06 -07:00 committed by Lucas De Marchi
parent 3272ae2c04
commit 7fd10921c3

View File

@ -16,6 +16,7 @@
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_PXF || CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_ERLEBOARD
#define HAL_BOARD_LOG_DIRECTORY "/var/APM/logs"
#define HAL_BOARD_TERRAIN_DIRECTORY "/var/APM/terrain"
#define HAL_BOARD_STORAGE_DIRECTORY "/var/APM"
#define HAL_INS_DEFAULT HAL_INS_MPU9250_SPI
#if CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_PXF
#define HAL_INS_DEFAULT_ROTATION ROTATION_ROLL_180_YAW_270
@ -36,6 +37,7 @@
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_BEBOP
#define HAL_BOARD_LOG_DIRECTORY "/data/ftp/internal_000/ardupilot/logs"
#define HAL_BOARD_TERRAIN_DIRECTORY "/data/ftp/internal_000/ardupilot/terrain"
#define HAL_BOARD_STORAGE_DIRECTORY "/data/ftp/internal_000/ardupilot"
#define HAL_INS_DEFAULT HAL_INS_MPU60XX_I2C
#define HAL_INS_DEFAULT_ROTATION ROTATION_YAW_270
#define HAL_INS_MPU60x0_I2C_BUS 2
@ -78,6 +80,7 @@
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_DISCO
#define HAL_BOARD_LOG_DIRECTORY "/data/ftp/internal_000/ardupilot/logs"
#define HAL_BOARD_TERRAIN_DIRECTORY "/data/ftp/internal_000/ardupilot/terrain"
#define HAL_BOARD_STORAGE_DIRECTORY "/data/ftp/internal_000/ardupilot"
#define HAL_INS_DEFAULT HAL_INS_MPU60XX_I2C
#define HAL_INS_DEFAULT_ROTATION ROTATION_PITCH_180_YAW_90
#define HAL_INS_MPU60x0_I2C_BUS 2
@ -144,6 +147,7 @@
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_NAVIO
#define HAL_BOARD_LOG_DIRECTORY "/var/APM/logs"
#define HAL_BOARD_TERRAIN_DIRECTORY "/var/APM/terrain"
#define HAL_BOARD_STORAGE_DIRECTORY "/var/APM"
#define HAL_INS_DEFAULT HAL_INS_MPU9250_SPI
#define HAL_INS_DEFAULT_ROTATION ROTATION_NONE
#define HAL_INS_MPU9250_NAME "mpu9250"
@ -157,6 +161,7 @@
#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"
#define HAL_BOARD_STORAGE_DIRECTORY "/var/APM"
#define HAL_INS_DEFAULT HAL_INS_MPU9250_SPI
#define HAL_INS_DEFAULT_ROTATION ROTATION_NONE
#define HAL_INS_MPU9250_NAME "mpu9250"
@ -175,6 +180,7 @@
#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"
#define HAL_BOARD_STORAGE_DIRECTORY "/var/APM"
#define HAL_INS_DEFAULT HAL_INS_MPU9250_SPI
#define HAL_INS_DEFAULT_ROTATION ROTATION_YAW_270
#define HAL_INS_MPU9250_NAME "mpu9250"
@ -192,6 +198,7 @@
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_ZYNQ
#define HAL_BOARD_LOG_DIRECTORY "/var/APM/logs"
#define HAL_BOARD_TERRAIN_DIRECTORY "/var/APM/terrain"
#define HAL_BOARD_STORAGE_DIRECTORY "/var/APM"
// Stub the sensors out for now, at least we can build and run
#define HAL_INS_DEFAULT HAL_INS_HIL
#define HAL_BARO_DEFAULT HAL_BARO_HIL
@ -199,6 +206,7 @@
#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_BOARD_STORAGE_DIRECTORY "/var/APM"
#define HAL_INS_DEFAULT HAL_INS_MPU9250_SPI
#define HAL_INS_DEFAULT_ROTATION ROTATION_NONE
#define HAL_INS_MPU9250_NAME "mpu9250"
@ -213,6 +221,7 @@
#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"
#define HAL_BOARD_STORAGE_DIRECTORY "/var/APM"
#define HAL_GPIO_A_LED_PIN 69
#define HAL_GPIO_B_LED_PIN 68
#define HAL_GPIO_C_LED_PIN 45
@ -233,6 +242,7 @@
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_BLUE
#define HAL_BOARD_LOG_DIRECTORY "/var/APM/logs"
#define HAL_BOARD_TERRAIN_DIRECTORY "/var/APM/terrain"
#define HAL_BOARD_STORAGE_DIRECTORY "/var/APM"
#define HAL_GPIO_A_LED_PIN 66
#define HAL_GPIO_B_LED_PIN 67
#define HAL_GPIO_C_LED_PIN 67
@ -256,6 +266,7 @@
#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"
#define HAL_BOARD_STORAGE_DIRECTORY "/var/APM"
#define HAL_BARO_DEFAULT HAL_BARO_MS5611_I2C
#define HAL_BARO_MS5611_I2C_BUS 1
#define HAL_BARO_MS5611_I2C_ADDR 0x77
@ -278,6 +289,7 @@
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_QFLIGHT
#define HAL_BOARD_LOG_DIRECTORY "/var/APM/logs"
#define HAL_BOARD_TERRAIN_DIRECTORY "/var/APM/terrain"
#define HAL_BOARD_STORAGE_DIRECTORY "/var/APM"
#define HAL_INS_DEFAULT HAL_INS_QFLIGHT
#define HAL_BARO_DEFAULT HAL_BARO_QFLIGHT
#define HAL_COMPASS_DEFAULT HAL_COMPASS_QFLIGHT
@ -285,6 +297,7 @@
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_PXFMINI
#define HAL_BOARD_LOG_DIRECTORY "/var/APM/logs"
#define HAL_BOARD_TERRAIN_DIRECTORY "/var/APM/terrain"
#define HAL_BOARD_STORAGE_DIRECTORY "/var/APM"
#define HAL_INS_DEFAULT HAL_INS_MPU9250_SPI
#define HAL_INS_DEFAULT_ROTATION ROTATION_YAW_270
#define HAL_INS_MPU9250_NAME "mpu9250"
@ -315,6 +328,7 @@
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_DARK
#define HAL_BOARD_LOG_DIRECTORY "/var/APM/logs"
#define HAL_BOARD_TERRAIN_DIRECTORY "/var/APM/terrain"
#define HAL_BOARD_STORAGE_DIRECTORY "/var/APM"
#define HAL_INS_DEFAULT HAL_INS_MPU9250_SPI
#define HAL_INS_DEFAULT_ROTATION ROTATION_NONE
#define HAL_INS_MPU9250_NAME "mpu9250"
@ -377,3 +391,7 @@
#ifndef HAL_BOARD_TERRAIN_DIRECTORY
#define HAL_BOARD_TERRAIN_DIRECTORY "/var/lib/ardupilot/terrain"
#endif
#ifndef HAL_BOARD_STORAGE_DIRECTORY
#define HAL_BOARD_STORAGE_DIRECTORY "/var/lib/ardupilot"
#endif