diff --git a/libraries/AP_HAL/AP_HAL_Boards.h b/libraries/AP_HAL/AP_HAL_Boards.h index 99c22072c5..94cd9d7a87 100644 --- a/libraries/AP_HAL/AP_HAL_Boards.h +++ b/libraries/AP_HAL/AP_HAL_Boards.h @@ -36,6 +36,7 @@ #define HAL_BOARD_SUBTYPE_LINUX_DARK 1016 #define HAL_BOARD_SUBTYPE_LINUX_BLUE 1018 #define HAL_BOARD_SUBTYPE_LINUX_OCPOC_ZYNQ 1019 +#define HAL_BOARD_SUBTYPE_LINUX_EDGE 1020 /* HAL PX4 sub-types, starting at 2000 */ #define HAL_BOARD_SUBTYPE_PX4_V1 2000 @@ -71,6 +72,7 @@ #define HAL_INS_BBBMINI 17 #define HAL_INS_AERO 18 #define HAL_INS_MPU6500 19 +#define HAL_INS_EDGE 20 /* Barometer driver types */ #define HAL_BARO_BMP085 1 diff --git a/libraries/AP_HAL/board/linux.h b/libraries/AP_HAL/board/linux.h index fa79cd2512..31c40f027e 100644 --- a/libraries/AP_HAL/board/linux.h +++ b/libraries/AP_HAL/board/linux.h @@ -332,6 +332,18 @@ #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_EDGE +#define HAL_BOARD_LOG_DIRECTORY "/var/lib/ardupilot/logs" +#define HAL_BOARD_TERRAIN_DIRECTORY "/var/lib/ardupilot/terrain" +#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" +#define HAL_COMPASS_DEFAULT HAL_COMPASS_HIL +/* HMC5843 can be an external compass */ +#define HAL_COMPASS_HMC5843_I2C_BUS 1 +#define HAL_COMPASS_HMC5843_I2C_ADDR 0x1E #else #error "no Linux board subtype set" #endif diff --git a/libraries/AP_HAL_Linux/Storage.cpp b/libraries/AP_HAL_Linux/Storage.cpp index c966c2db90..34b2054bd6 100644 --- a/libraries/AP_HAL_Linux/Storage.cpp +++ b/libraries/AP_HAL_Linux/Storage.cpp @@ -22,6 +22,8 @@ using namespace Linux; // card for ArduCopter and ArduPlane #if CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_BEBOP || CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_DISCO #define STORAGE_DIR "/data/ftp/internal_000/ardupilot" +#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_EDGE +#define STORAGE_DIR "/var/lib/ardupilot" #elif APM_BUILD_TYPE(APM_BUILD_Replay) #define STORAGE_DIR "." #else