From f7846403e1f01d15d5dd792e994bcbb8ced67d43 Mon Sep 17 00:00:00 2001 From: Staroselskii Georgii Date: Mon, 25 Apr 2016 20:16:26 +0300 Subject: [PATCH] AP_HAL_Linux: enabled SPI-driven LSM9DS1 for Navio 2 --- libraries/AP_HAL_Linux/SPIDriver.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libraries/AP_HAL_Linux/SPIDriver.cpp b/libraries/AP_HAL_Linux/SPIDriver.cpp index 7542548916..d4f831ca56 100644 --- a/libraries/AP_HAL_Linux/SPIDriver.cpp +++ b/libraries/AP_HAL_Linux/SPIDriver.cpp @@ -41,6 +41,9 @@ SPIDeviceDriver SPIDeviceManager::_device[] = { /* MPU9250 is restricted to 1MHz for non-data and interrupt registers */ SPIDeviceDriver("mpu9250", 0, 1, AP_HAL::SPIDevice_MPU9250, SPI_MODE_0, 8, SPI_CS_KERNEL, 1*MHZ, 20*MHZ), SPIDeviceDriver("ublox", 0, 0, AP_HAL::SPIDevice_Ublox, SPI_MODE_0, 8, SPI_CS_KERNEL, 5*MHZ, 5*MHZ), +#if CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_NAVIO2 + SPIDeviceDriver("lsm9ds1_m", 0, 2, AP_HAL::SPIDevice_LSM9DS1_M, SPI_MODE_0, 8, SPI_CS_KERNEL, 1*MHZ, 10*MHZ), +#endif }; #elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_ERLEBRAIN2 || \ CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_PXFMINI