From 46c3308964a0e0799b6150e949ea040151b4ff3c Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 15 Feb 2018 17:22:35 +1100 Subject: [PATCH] HAL_ChibiOS: enable mag on crazyflie2 --- .../AP_HAL_ChibiOS/hwdef/crazyflie2/hwdef.dat | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/libraries/AP_HAL_ChibiOS/hwdef/crazyflie2/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/crazyflie2/hwdef.dat index ab857c82a9..40a739b7d2 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/crazyflie2/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/crazyflie2/hwdef.dat @@ -77,12 +77,12 @@ PB8 E_CS3 CS PB6 I2C1_SCL I2C1 # E_SCL PB7 I2C1_SDA I2C1 # E_SCL -# radio pins disabled for now -#PA4 NRF_FLOW_CTRL +# radio setup +PA4 NRF_FLOW_CTRL INPUT # goes low when we can write to uart #PB13 NRF_SWCLK #PB15 NRF_SWIO -#PC6 NRF_RX -#PC7 NRF_TX +PC6 USART6_TX USART6 # NRF_RT +PC7 USART6_RX USART6 # NRF_RX # USART3 for telemetry PC10 USART3_TX USART3 # E_TX1 @@ -95,7 +95,7 @@ I2C_ORDER I2C3 I2C1 define HAL_I2C_MAX_CLOCK 400000 # order of UARTs (and USB) -UART_ORDER OTG1 USART2 USART3 +UART_ORDER OTG1 USART2 USART3 USART6 define HAL_STORAGE_SIZE 8192 define STORAGE_FLASH_PAGE 1 @@ -104,7 +104,7 @@ define STORAGE_FLASH_PAGE 1 FLASH_RESERVE_START_KB 64 define HAL_INS_DEFAULT HAL_INS_MPU60XX_I2C -define HAL_INS_DEFAULT_ROTATION ROTATION_NONE +define HAL_INS_DEFAULT_ROTATION ROTATION_YAW_180 define HAL_INS_MPU60x0_I2C_BUS 0 define HAL_INS_MPU60x0_I2C_ADDR 0x69 @@ -113,6 +113,10 @@ define HAL_BARO_LPS25H_I2C_BUS 0 define HAL_BARO_LPS25H_I2C_ADDR 0x5D define HAL_BARO_LPS25H_I2C_IMU_ADDR HAL_INS_MPU60x0_I2C_ADDR -define HAL_COMPASS_DEFAULT HAL_COMPASS_AK8963_MPU9250 +define HAL_COMPASS_DEFAULT HAL_COMPASS_AK8963_I2C +define HAL_COMPASS_AK8963_I2C_BUS 0 +define HAL_COMPASS_AK8963_I2C_ADDR 0x0c define ALLOW_ARM_NO_COMPASS + +define MAG_BOARD_ORIENTATION ROTATION_YAW_180