2016-09-24 07:42:22 -03:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#define HAL_BOARD_NAME "Linux"
|
|
|
|
#define HAL_CPU_CLASS HAL_CPU_CLASS_1000
|
|
|
|
#define HAL_OS_POSIX_IO 1
|
|
|
|
#define HAL_OS_SOCKETS 1
|
|
|
|
#define HAL_STORAGE_SIZE 16384
|
|
|
|
#define HAL_STORAGE_SIZE_AVAILABLE HAL_STORAGE_SIZE
|
|
|
|
|
|
|
|
#if CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_NONE
|
|
|
|
#define HAL_BOARD_LOG_DIRECTORY "logs"
|
|
|
|
#define HAL_BOARD_TERRAIN_DIRECTORY "terrain"
|
2018-03-28 02:48:54 -03:00
|
|
|
#define HAL_BOARD_STORAGE_DIRECTORY "."
|
2016-09-24 07:42:22 -03:00
|
|
|
#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_PXF || CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_ERLEBOARD
|
|
|
|
#define HAL_INS_DEFAULT HAL_INS_MPU9250_SPI
|
2016-11-05 02:03:13 -03:00
|
|
|
#if CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_PXF
|
|
|
|
#define HAL_INS_DEFAULT_ROTATION ROTATION_ROLL_180_YAW_270
|
|
|
|
#else
|
|
|
|
#define HAL_INS_DEFAULT_ROTATION ROTATION_ROLL_180_YAW_90
|
|
|
|
#endif
|
2016-09-24 07:42:22 -03:00
|
|
|
#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_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
|
|
|
|
#define HAL_GPIO_LED_ON LOW
|
|
|
|
#define HAL_GPIO_LED_OFF HIGH
|
|
|
|
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_BEBOP
|
2017-01-18 11:56:56 -04:00
|
|
|
#define HAL_BOARD_LOG_DIRECTORY "/data/ftp/internal_000/ardupilot/logs"
|
|
|
|
#define HAL_BOARD_TERRAIN_DIRECTORY "/data/ftp/internal_000/ardupilot/terrain"
|
2017-10-30 03:58:06 -03:00
|
|
|
#define HAL_BOARD_STORAGE_DIRECTORY "/data/ftp/internal_000/ardupilot"
|
2016-09-24 07:42:22 -03:00
|
|
|
#define HAL_INS_DEFAULT HAL_INS_MPU60XX_I2C
|
2016-11-08 21:36:23 -04:00
|
|
|
#define HAL_INS_DEFAULT_ROTATION ROTATION_YAW_270
|
2016-09-24 07:42:22 -03:00
|
|
|
#define HAL_INS_MPU60x0_I2C_BUS 2
|
|
|
|
#define HAL_INS_MPU60x0_I2C_ADDR 0x68
|
|
|
|
#define HAL_COMPASS_DEFAULT HAL_COMPASS_AK8963_I2C
|
|
|
|
#define HAL_COMPASS_AK8963_I2C_BUS 1
|
|
|
|
#define HAL_COMPASS_AK8963_I2C_ADDR 0x0d
|
|
|
|
#define HAL_BARO_DEFAULT HAL_BARO_MS5607_I2C
|
|
|
|
#define HAL_BARO_MS5607_I2C_BUS 1
|
|
|
|
#define HAL_BARO_MS5607_I2C_ADDR 0x77
|
|
|
|
#define HAL_HAVE_IMU_HEATER 1
|
|
|
|
#define HAL_IMU_TEMP_DEFAULT 55
|
|
|
|
#define HAL_UTILS_HEAT HAL_LINUX_HEAT_PWM
|
|
|
|
#define HAL_LINUX_HEAT_PWM_NUM 6
|
|
|
|
#define HAL_LINUX_HEAT_KP 20000
|
|
|
|
#define HAL_LINUX_HEAT_KI 6
|
|
|
|
#define HAL_LINUX_HEAT_PERIOD_NS 125000
|
|
|
|
#define HAL_LINUX_HEAT_TARGET_TEMP 50
|
|
|
|
#define BEBOP_CAMV_PWM 9
|
|
|
|
#define BEBOP_CAMV_PWM_FREQ 43333333
|
|
|
|
#define HAL_OPTFLOW_ONBOARD_VDEV_PATH "/dev/video0"
|
|
|
|
#define HAL_OPTFLOW_ONBOARD_SUBDEV_PATH "/dev/v4l-subdev0"
|
|
|
|
#define HAL_OPTFLOW_ONBOARD_SENSOR_WIDTH 320
|
|
|
|
#define HAL_OPTFLOW_ONBOARD_SENSOR_HEIGHT 240
|
|
|
|
#define HAL_OPTFLOW_ONBOARD_OUTPUT_WIDTH 64
|
|
|
|
#define HAL_OPTFLOW_ONBOARD_OUTPUT_HEIGHT 64
|
|
|
|
#define HAL_OPTFLOW_ONBOARD_CROP_WIDTH 240
|
|
|
|
#define HAL_OPTFLOW_ONBOARD_CROP_HEIGHT 240
|
|
|
|
#define HAL_OPTFLOW_ONBOARD_NBUFS 8
|
|
|
|
#define HAL_FLOW_PX4_MAX_FLOW_PIXEL 4
|
|
|
|
#define HAL_FLOW_PX4_BOTTOM_FLOW_FEATURE_THRESHOLD 30
|
|
|
|
#define HAL_FLOW_PX4_BOTTOM_FLOW_VALUE_THRESHOLD 5000
|
2017-01-18 12:04:30 -04:00
|
|
|
#define HAL_PARAM_DEFAULTS_PATH "/data/ftp/internal_000/ardupilot/bebop.parm"
|
2016-09-24 07:42:22 -03:00
|
|
|
#define HAL_RCOUT_BEBOP_BLDC_I2C_BUS 1
|
|
|
|
#define HAL_RCOUT_BEBOP_BLDC_I2C_ADDR 0x08
|
2017-01-17 14:24:06 -04:00
|
|
|
/* focal length 2.21mm pixel size 3.6 um, 2x binning in each direction
|
2016-09-24 07:42:22 -03:00
|
|
|
* 240x240 crop rescaled to 64x64 */
|
2017-01-17 14:24:06 -04:00
|
|
|
#define HAL_FLOW_PX4_FOCAL_LENGTH_MILLIPX (2.21 / (3.6 * 2.0 * 240 / 64))
|
2016-09-24 07:42:22 -03:00
|
|
|
#define HAL_RANGEFINDER_LIGHTWARE_I2C_BUS 0
|
|
|
|
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_DISCO
|
2017-01-18 11:56:56 -04:00
|
|
|
#define HAL_BOARD_LOG_DIRECTORY "/data/ftp/internal_000/ardupilot/logs"
|
|
|
|
#define HAL_BOARD_TERRAIN_DIRECTORY "/data/ftp/internal_000/ardupilot/terrain"
|
2017-10-30 03:58:06 -03:00
|
|
|
#define HAL_BOARD_STORAGE_DIRECTORY "/data/ftp/internal_000/ardupilot"
|
2016-09-24 07:42:22 -03:00
|
|
|
#define HAL_INS_DEFAULT HAL_INS_MPU60XX_I2C
|
2016-11-08 21:36:23 -04:00
|
|
|
#define HAL_INS_DEFAULT_ROTATION ROTATION_PITCH_180_YAW_90
|
2016-09-24 07:42:22 -03:00
|
|
|
#define HAL_INS_MPU60x0_I2C_BUS 2
|
|
|
|
#define HAL_INS_MPU60x0_I2C_ADDR 0x68
|
|
|
|
#define HAL_COMPASS_DEFAULT HAL_COMPASS_AK8963_I2C
|
|
|
|
#define HAL_COMPASS_AK8963_I2C_BUS 1
|
|
|
|
#define HAL_COMPASS_AK8963_I2C_ADDR 0x0d
|
|
|
|
#define HAL_BARO_DEFAULT HAL_BARO_MS5607_I2C
|
|
|
|
#define HAL_BARO_MS5607_I2C_BUS 1
|
|
|
|
#define HAL_BARO_MS5607_I2C_ADDR 0x77
|
|
|
|
#define HAL_UTILS_HEAT HAL_LINUX_HEAT_PWM
|
|
|
|
#define HAL_LINUX_HEAT_PWM_NUM 10
|
|
|
|
#define HAL_LINUX_HEAT_KP 20000
|
|
|
|
#define HAL_LINUX_HEAT_KI 6
|
|
|
|
#define HAL_LINUX_HEAT_PERIOD_NS 125000
|
|
|
|
#define HAL_LINUX_HEAT_TARGET_TEMP 50
|
|
|
|
#define BEBOP_CAMV_PWM 9
|
|
|
|
#define BEBOP_CAMV_PWM_FREQ 43333333
|
|
|
|
#define HAL_OPTFLOW_ONBOARD_VDEV_PATH "/dev/video0"
|
|
|
|
#define HAL_OPTFLOW_ONBOARD_SUBDEV_PATH "/dev/v4l-subdev0"
|
|
|
|
#define HAL_OPTFLOW_ONBOARD_SENSOR_WIDTH 320
|
|
|
|
#define HAL_OPTFLOW_ONBOARD_SENSOR_HEIGHT 240
|
|
|
|
#define HAL_OPTFLOW_ONBOARD_OUTPUT_WIDTH 64
|
|
|
|
#define HAL_OPTFLOW_ONBOARD_OUTPUT_HEIGHT 64
|
|
|
|
#define HAL_OPTFLOW_ONBOARD_CROP_WIDTH 240
|
|
|
|
#define HAL_OPTFLOW_ONBOARD_CROP_HEIGHT 240
|
|
|
|
#define HAL_OPTFLOW_ONBOARD_NBUFS 8
|
|
|
|
#define HAL_FLOW_PX4_MAX_FLOW_PIXEL 4
|
|
|
|
#define HAL_FLOW_PX4_BOTTOM_FLOW_FEATURE_THRESHOLD 30
|
|
|
|
#define HAL_FLOW_PX4_BOTTOM_FLOW_VALUE_THRESHOLD 5000
|
|
|
|
#define HAL_RCOUT_DISCO_BLDC_I2C_BUS 1
|
|
|
|
#define HAL_RCOUT_DISCO_BLDC_I2C_ADDR 0x08
|
2017-01-18 12:04:30 -04:00
|
|
|
#define HAL_PARAM_DEFAULTS_PATH "/data/ftp/internal_000/ardupilot/disco.parm"
|
2017-01-17 14:24:06 -04:00
|
|
|
/* focal length 2.21mm pixel size 3.6 um, 2x binning in each direction
|
2016-09-24 07:42:22 -03:00
|
|
|
* 240x240 crop rescaled to 64x64 */
|
2017-01-17 14:24:06 -04:00
|
|
|
#define HAL_FLOW_PX4_FOCAL_LENGTH_MILLIPX (2.21 / (3.6 * 2.0 * 240 / 64))
|
2016-09-24 07:42:22 -03:00
|
|
|
#define HAL_RANGEFINDER_LIGHTWARE_I2C_BUS 0
|
|
|
|
// the disco has challenges with its magnetic setup
|
2017-03-31 04:53:29 -03:00
|
|
|
#define AP_COMPASS_OFFSETS_MAX_DEFAULT 2200
|
2016-09-24 07:42:22 -03:00
|
|
|
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_MINLURE
|
|
|
|
#define HAL_INS_DEFAULT HAL_INS_MPU60XX_SPI
|
2016-11-08 21:36:23 -04:00
|
|
|
#define HAL_INS_DEFAULT_ROTATION ROTATION_YAW_90
|
2016-09-24 07:42:22 -03:00
|
|
|
#define HAL_INS_MPU60x0_NAME "mpu6000"
|
|
|
|
#define HAL_BARO_DEFAULT HAL_BARO_MS5611_I2C
|
2018-03-26 02:21:54 -03:00
|
|
|
#define HAL_BARO_MS5611_I2C_BUS { "platform/80860F41:06", }
|
2016-09-24 07:42:22 -03:00
|
|
|
#define HAL_BARO_MS5611_I2C_ADDR 0x77
|
|
|
|
/* Internal and external compasses */
|
|
|
|
#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
|
|
|
|
#define HAL_OPTFLOW_ONBOARD_OUTPUT_WIDTH 64
|
|
|
|
#define HAL_OPTFLOW_ONBOARD_OUTPUT_HEIGHT 64
|
|
|
|
#define HAL_OPTFLOW_ONBOARD_CROP_WIDTH 240
|
|
|
|
#define HAL_OPTFLOW_ONBOARD_CROP_HEIGHT 240
|
|
|
|
#define HAL_OPTFLOW_ONBOARD_NBUFS 8
|
|
|
|
#define HAL_FLOW_PX4_MAX_FLOW_PIXEL 4
|
|
|
|
#define HAL_FLOW_PX4_BOTTOM_FLOW_FEATURE_THRESHOLD 30
|
|
|
|
#define HAL_FLOW_PX4_BOTTOM_FLOW_VALUE_THRESHOLD 5000
|
|
|
|
/* ELP-USBFHD01M-L21
|
|
|
|
* focal length 2.1 mm, pixel size 3 um
|
|
|
|
* 240x240 crop rescaled to 64x64 */
|
2017-01-17 14:24:06 -04:00
|
|
|
#define HAL_FLOW_PX4_FOCAL_LENGTH_MILLIPX (2.1 / (3.0 * 2.0 * 240 / 64))
|
2016-09-24 07:42:22 -03:00
|
|
|
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_NAVIO
|
2017-11-02 10:40:14 -03:00
|
|
|
#define HAL_GPIO_A_LED_PIN 0
|
|
|
|
#define HAL_GPIO_B_LED_PIN 1
|
|
|
|
#define HAL_GPIO_C_LED_PIN 2
|
|
|
|
#define HAL_GPIO_LED_ON HIGH
|
|
|
|
#define HAL_GPIO_LED_OFF LOW
|
2016-09-24 07:42:22 -03:00
|
|
|
#define HAL_INS_DEFAULT HAL_INS_MPU9250_SPI
|
2016-11-05 02:03:13 -03:00
|
|
|
#define HAL_INS_DEFAULT_ROTATION ROTATION_NONE
|
2016-09-24 07:42:22 -03:00
|
|
|
#define HAL_INS_MPU9250_NAME "mpu9250"
|
|
|
|
#define HAL_BARO_DEFAULT HAL_BARO_MS5611_I2C
|
|
|
|
#define HAL_BARO_MS5611_I2C_BUS 1
|
|
|
|
#define HAL_BARO_MS5611_I2C_ADDR 0x77
|
|
|
|
#define HAL_COMPASS_DEFAULT HAL_COMPASS_NAVIO
|
|
|
|
/* 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_INS_DEFAULT HAL_INS_MPU9250_SPI
|
2016-11-05 02:03:13 -03:00
|
|
|
#define HAL_INS_DEFAULT_ROTATION ROTATION_NONE
|
2016-09-24 07:42:22 -03:00
|
|
|
#define HAL_INS_MPU9250_NAME "mpu9250"
|
2017-10-26 11:34:46 -03:00
|
|
|
#define HAL_INS_LSM9DS1_NAME "lsm9ds1"
|
2016-09-24 07:42:22 -03:00
|
|
|
#define HAL_BARO_DEFAULT HAL_BARO_MS5611_I2C
|
|
|
|
#define HAL_BARO_MS5611_I2C_BUS 1
|
|
|
|
#define HAL_BARO_MS5611_I2C_ADDR 0x77
|
|
|
|
#define HAL_COMPASS_DEFAULT HAL_COMPASS_NAVIO2
|
|
|
|
/* 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
|
|
|
|
#define HAL_GPIO_LED_ON LOW
|
|
|
|
#define HAL_GPIO_LED_OFF HIGH
|
|
|
|
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_ERLEBRAIN2
|
|
|
|
#define HAL_INS_DEFAULT HAL_INS_MPU9250_SPI
|
2016-11-05 02:03:13 -03:00
|
|
|
#define HAL_INS_DEFAULT_ROTATION ROTATION_YAW_270
|
2016-09-24 07:42:22 -03:00
|
|
|
#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_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
|
|
|
|
#define HAL_GPIO_LED_ON LOW
|
|
|
|
#define HAL_GPIO_LED_OFF HIGH
|
|
|
|
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_ZYNQ
|
|
|
|
// 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
|
|
|
|
#define HAL_COMPASS_DEFAULT HAL_COMPASS_HIL
|
2017-08-17 19:41:28 -03:00
|
|
|
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_OCPOC_ZYNQ
|
|
|
|
#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
|
|
|
|
/* 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
|
2016-09-24 07:42:22 -03:00
|
|
|
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_BBBMINI
|
2016-07-19 23:23:20 -03:00
|
|
|
#define HAL_GPIO_A_LED_PIN 69
|
|
|
|
#define HAL_GPIO_B_LED_PIN 68
|
|
|
|
#define HAL_GPIO_C_LED_PIN 45
|
|
|
|
#define HAL_GPIO_LED_ON LOW
|
|
|
|
#define HAL_GPIO_LED_OFF HIGH
|
2018-05-10 03:59:17 -03:00
|
|
|
#define HAL_BUZZER_PIN 11
|
2016-09-24 07:42:22 -03:00
|
|
|
#define HAL_INS_DEFAULT HAL_INS_BBBMINI
|
2016-11-05 02:03:13 -03:00
|
|
|
#define HAL_INS_DEFAULT_ROTATION ROTATION_NONE
|
2016-09-24 07:42:22 -03:00
|
|
|
#define HAL_INS_MPU9250_NAME "mpu9250"
|
|
|
|
#define HAL_INS_MPU9250_NAME_EXT "mpu9250ext"
|
|
|
|
#define HAL_BARO_DEFAULT HAL_BARO_MS5611_SPI
|
|
|
|
#define HAL_BARO_MS5611_NAME "ms5611"
|
|
|
|
#define HAL_COMPASS_DEFAULT HAL_COMPASS_BBBMINI
|
|
|
|
/* HMC5843 can be an external compass */
|
|
|
|
#define HAL_COMPASS_HMC5843_I2C_BUS 2
|
|
|
|
#define HAL_COMPASS_HMC5843_I2C_ADDR 0x1E
|
2016-12-03 04:04:34 -04:00
|
|
|
#define HAL_OPTFLOW_PX4FLOW_I2C_BUS 2
|
2016-09-24 07:42:22 -03:00
|
|
|
#define HAL_RANGEFINDER_LIGHTWARE_I2C_BUS 2
|
2016-12-29 10:52:56 -04:00
|
|
|
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_BLUE
|
|
|
|
#define HAL_GPIO_A_LED_PIN 66
|
|
|
|
#define HAL_GPIO_B_LED_PIN 67
|
|
|
|
#define HAL_GPIO_C_LED_PIN 67
|
|
|
|
#define HAL_GPIO_LED_ON HIGH
|
|
|
|
#define HAL_GPIO_LED_OFF LOW
|
|
|
|
#define HAL_INS_DEFAULT HAL_INS_MPU9250_I2C
|
|
|
|
#define HAL_INS_MPU9250_I2C_BUS 2
|
|
|
|
#define HAL_INS_MPU9250_I2C_ADDR 0x68
|
|
|
|
#define HAL_INS_DEFAULT_ROTATION ROTATION_NONE
|
|
|
|
#define HAL_BARO_DEFAULT HAL_BARO_BMP280_I2C
|
|
|
|
#define HAL_BARO_BMP280_BUS 2
|
|
|
|
#define HAL_BARO_BMP280_I2C_ADDR 0x76
|
|
|
|
#define HAL_COMPASS_DEFAULT HAL_COMPASS_AK8963_MPU9250_I2C
|
|
|
|
#define HAL_COMPASS_AK8963_I2C_BUS 2
|
|
|
|
#define HAL_COMPASS_AK8963_I2C_ADDR 0x0C
|
|
|
|
/* HMC5843 can be an external compass */
|
2017-05-30 16:39:40 -03:00
|
|
|
#define HAL_COMPASS_HMC5843_I2C_BUS 1
|
2016-12-29 10:52:56 -04:00
|
|
|
#define HAL_COMPASS_HMC5843_I2C_ADDR 0x1E
|
2018-02-11 17:06:56 -04:00
|
|
|
#define HAL_OPTFLOW_PX4FLOW_I2C_BUS 1
|
|
|
|
#define HAL_RANGEFINDER_LIGHTWARE_I2C_BUS 1
|
2017-12-13 15:35:00 -04:00
|
|
|
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_POCKET
|
2018-05-08 18:26:03 -03:00
|
|
|
#define HAL_GPIO_A_LED_PIN 59
|
|
|
|
#define HAL_GPIO_B_LED_PIN 58
|
|
|
|
#define HAL_GPIO_C_LED_PIN 57
|
2017-12-13 15:35:00 -04:00
|
|
|
#define HAL_GPIO_LED_ON HIGH
|
|
|
|
#define HAL_GPIO_LED_OFF LOW
|
2018-05-10 03:59:17 -03:00
|
|
|
#define HAL_BUZZER_PIN 28
|
2017-12-13 15:35:00 -04:00
|
|
|
#define HAL_INS_DEFAULT HAL_INS_MPU9250_SPI
|
|
|
|
#define HAL_INS_MPU9250_NAME "mpu9250"
|
|
|
|
#define HAL_INS_DEFAULT_ROTATION ROTATION_NONE
|
2018-04-28 18:33:29 -03:00
|
|
|
#define HAL_BARO_DEFAULT HAL_BARO_BMP280_SPI
|
|
|
|
#define HAL_BARO_BMP280_NAME "bmp280"
|
2017-12-13 15:35:00 -04:00
|
|
|
#define HAL_COMPASS_DEFAULT HAL_COMPASS_AK8963_MPU9250
|
|
|
|
/* HMC5843 can be an external compass */
|
2018-05-11 12:46:54 -03:00
|
|
|
#define HAL_COMPASS_HMC5843_I2C_BUS 2
|
2017-12-13 15:35:00 -04:00
|
|
|
#define HAL_COMPASS_HMC5843_I2C_ADDR 0x1E
|
|
|
|
#define HAL_OPTFLOW_PX4FLOW_I2C_BUS 2
|
|
|
|
#define HAL_RANGEFINDER_LIGHTWARE_I2C_BUS 2
|
2016-09-24 07:42:22 -03:00
|
|
|
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_BH
|
|
|
|
#define HAL_BARO_DEFAULT HAL_BARO_MS5611_I2C
|
|
|
|
#define HAL_BARO_MS5611_I2C_BUS 1
|
|
|
|
#define HAL_BARO_MS5611_I2C_ADDR 0x77
|
|
|
|
#define HAL_INS_DEFAULT HAL_INS_BH
|
|
|
|
#define HAL_INS_MPU9250_NAME "mpu9250"
|
|
|
|
#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
|
|
|
|
#define HAL_GPIO_LED_ON LOW
|
|
|
|
#define HAL_GPIO_LED_OFF HIGH
|
|
|
|
#define HAL_RCOUT_RGBLED_RED 13
|
|
|
|
#define HAL_RCOUT_RGBLED_GREEN 14
|
|
|
|
#define HAL_RCOUT_RGBLED_BLUE 15
|
|
|
|
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_PXFMINI
|
|
|
|
#define HAL_INS_DEFAULT HAL_INS_MPU9250_SPI
|
2016-11-05 02:03:13 -03:00
|
|
|
#define HAL_INS_DEFAULT_ROTATION ROTATION_YAW_270
|
2016-09-24 07:42:22 -03:00
|
|
|
#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_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
|
|
|
|
#define HAL_GPIO_LED_ON LOW
|
|
|
|
#define HAL_GPIO_LED_OFF HIGH
|
|
|
|
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_AERO
|
|
|
|
#define HAL_INS_DEFAULT HAL_INS_AERO
|
|
|
|
#define HAL_BARO_DEFAULT HAL_BARO_MS5611_I2C
|
|
|
|
#define HAL_BARO_MS5611_I2C_BUS 2
|
|
|
|
#define HAL_BARO_MS5611_I2C_ADDR 0x76
|
|
|
|
#define HAL_COMPASS_DEFAULT HAL_COMPASS_AERO
|
|
|
|
#define HAL_COMPASS_BMM150_I2C_BUS 2
|
|
|
|
#define HAL_COMPASS_BMM150_I2C_ADDR 0x12
|
2017-09-25 20:41:58 -03:00
|
|
|
#define HAL_COMPASS_IST8310_I2C_BUS 4
|
|
|
|
#define HAL_COMPASS_IST8310_I2C_ADDR 0x0E
|
|
|
|
#define HAL_COMPASS_HMC5843_I2C_BUS 4
|
|
|
|
#define HAL_COMPASS_HMC5843_I2C_ADDR 0x1E
|
2017-05-19 02:57:10 -03:00
|
|
|
#define HAL_RCOUTPUT_TAP_DEVICE "/dev/ttyS1"
|
2018-03-09 11:35:12 -04:00
|
|
|
#define HAL_WITH_UAVCAN 1
|
2016-10-17 14:11:03 -03:00
|
|
|
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_DARK
|
|
|
|
#define HAL_INS_DEFAULT HAL_INS_MPU9250_SPI
|
2016-11-05 02:03:13 -03:00
|
|
|
#define HAL_INS_DEFAULT_ROTATION ROTATION_NONE
|
2016-10-17 14:11:03 -03:00
|
|
|
#define HAL_INS_MPU9250_NAME "mpu9250"
|
|
|
|
#define HAL_COMPASS_DEFAULT HAL_COMPASS_AK8963_MPU9250
|
|
|
|
#define HAL_BARO_DEFAULT HAL_BARO_MS5611_I2C
|
|
|
|
#define HAL_BARO_MS5611_I2C_BUS 1
|
|
|
|
#define HAL_BARO_MS5611_I2C_ADDR 0x77
|
|
|
|
#define HAL_BARO_MS5611_USE_TIMER false
|
|
|
|
#define HAL_GPIO_A_LED_PIN 24
|
|
|
|
#define HAL_GPIO_B_LED_PIN 25
|
|
|
|
#define HAL_GPIO_C_LED_PIN 16
|
|
|
|
#define HAL_GPIO_LED_ON LOW
|
|
|
|
#define HAL_GPIO_LED_OFF HIGH
|
2017-10-19 06:53:36 -03:00
|
|
|
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_EDGE
|
2018-04-03 13:40:14 -03:00
|
|
|
#define HAL_BOARD_LOG_DIRECTORY "/edge/ardupilot/logs"
|
|
|
|
#define HAL_BOARD_TERRAIN_DIRECTORY "/edge/ardupilot/terrain"
|
|
|
|
#define HAL_BOARD_STORAGE_DIRECTORY "/edge/ardupilot"
|
2017-10-19 06:53:36 -03:00
|
|
|
#define HAL_INS_DEFAULT HAL_INS_EDGE
|
|
|
|
#define HAL_INS_MPU60x0_NAME "mpu60x0"
|
|
|
|
#define HAL_INS_MPU60x0_NAME_EXT "mpu60x0ext"
|
|
|
|
#define HAL_BARO_DEFAULT HAL_BARO_MS5611_SPI
|
|
|
|
#define HAL_BARO_MS5611_NAME "ms5611"
|
2017-05-25 12:40:18 -03:00
|
|
|
#define HAL_COMPASS_HMC5843_I2C_BUS 1
|
|
|
|
#define HAL_COMPASS_HMC5843_I2C_ADDR 0x1E
|
|
|
|
#define HAL_COMPASS_DEFAULT HAL_COMPASS_EDGE
|
2018-02-09 09:10:58 -04:00
|
|
|
#define HAL_WITH_UAVCAN 1
|
2017-10-19 06:53:36 -03:00
|
|
|
/* HMC5843 can be an external compass */
|
|
|
|
#define HAL_COMPASS_HMC5843_I2C_BUS 1
|
|
|
|
#define HAL_COMPASS_HMC5843_I2C_ADDR 0x1E
|
2017-10-17 15:10:05 -03:00
|
|
|
#define HAL_IMU_TEMP_DEFAULT 55
|
|
|
|
#define HAL_HAVE_IMU_HEATER 1
|
|
|
|
#define HAL_UTILS_HEAT HAL_LINUX_HEAT_PWM
|
|
|
|
#define HAL_LINUX_HEAT_PWM_NUM 15
|
|
|
|
#define HAL_LINUX_HEAT_KP 20000
|
|
|
|
#define HAL_LINUX_HEAT_KI 6
|
|
|
|
#define HAL_LINUX_HEAT_PERIOD_NS 2040816
|
2018-02-12 23:08:57 -04:00
|
|
|
#define HAL_GPS_TYPE_DEFAULT 9
|
|
|
|
#define HAL_CAN_DRIVER_DEFAULT 1
|
2017-10-30 06:03:04 -03:00
|
|
|
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_RST_ZYNQ
|
|
|
|
#define HAL_INS_DEFAULT HAL_INS_RST
|
|
|
|
#define HAL_INS_DEFAULT_G_ROTATION ROTATION_ROLL_180_YAW_90
|
|
|
|
#define HAL_INS_DEFAULT_A_ROTATION ROTATION_ROLL_180_YAW_90
|
|
|
|
#define HAL_INS_RST_G_NAME "rst_g" //gyro
|
|
|
|
#define HAL_INS_RST_A_NAME "rst_a" //accel
|
|
|
|
#define HAL_BARO_DEFAULT HAL_BARO_MS5611_SPI
|
|
|
|
#define HAL_BARO_MS5611_NAME "ms5611"
|
|
|
|
#define HAL_COMPASS_DEFAULT HAL_COMPASS_LIS3MDL
|
|
|
|
#define HAL_COMPASS_LIS3MDL_NAME "lis3mdl"
|
|
|
|
#define HAL_OPTFLOW_PX4FLOW_I2C_BUS 0
|
|
|
|
|
2016-09-24 07:42:22 -03:00
|
|
|
#else
|
|
|
|
#error "no Linux board subtype set"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef HAL_COMPASS_DEFAULT
|
|
|
|
#define HAL_COMPASS_DEFAULT -1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef HAL_OPTFLOW_PX4FLOW_I2C_ADDRESS
|
|
|
|
#define HAL_OPTFLOW_PX4FLOW_I2C_ADDRESS 0x42
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef HAL_OPTFLOW_PX4FLOW_I2C_BUS
|
|
|
|
#define HAL_OPTFLOW_PX4FLOW_I2C_BUS 1
|
|
|
|
#endif
|
|
|
|
|
2017-03-20 14:57:14 -03:00
|
|
|
#define HAL_HAVE_BOARD_VOLTAGE 1
|
2017-03-20 15:58:26 -03:00
|
|
|
#define HAL_HAVE_SAFETY_SWITCH 1
|
2017-10-20 17:08:09 -03:00
|
|
|
|
2018-03-28 02:48:54 -03:00
|
|
|
#ifndef AP_STATEDIR
|
|
|
|
#define HAL_BOARD_STATE_DIRECTORY "/var/lib/ardupilot"
|
|
|
|
#else
|
|
|
|
#define HAL_BOARD_STATE_DIRECTORY AP_STATEDIR
|
|
|
|
#endif
|
|
|
|
|
2017-10-20 17:08:09 -03:00
|
|
|
#ifndef HAL_BOARD_LOG_DIRECTORY
|
2018-03-28 02:48:54 -03:00
|
|
|
#define HAL_BOARD_LOG_DIRECTORY HAL_BOARD_STATE_DIRECTORY "/logs"
|
2017-10-20 17:08:09 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef HAL_BOARD_TERRAIN_DIRECTORY
|
2018-03-28 02:48:54 -03:00
|
|
|
#define HAL_BOARD_TERRAIN_DIRECTORY HAL_BOARD_STATE_DIRECTORY "/terrain"
|
2017-10-20 17:08:09 -03:00
|
|
|
#endif
|
2017-10-30 03:58:06 -03:00
|
|
|
|
|
|
|
#ifndef HAL_BOARD_STORAGE_DIRECTORY
|
2018-03-28 02:48:54 -03:00
|
|
|
#define HAL_BOARD_STORAGE_DIRECTORY HAL_BOARD_STATE_DIRECTORY
|
2017-10-30 03:58:06 -03:00
|
|
|
#endif
|
2017-12-28 04:56:29 -04:00
|
|
|
|
|
|
|
#ifndef HAL_BOARD_CAN_IFACE_NAME
|
|
|
|
#define HAL_BOARD_CAN_IFACE_NAME "can0"
|
|
|
|
#endif
|