diff --git a/aerial_robot_nerve/spinal/mcu_project/boards/stm32F7/Src/main.c b/aerial_robot_nerve/spinal/mcu_project/boards/stm32F7/Src/main.c index 0f0b45c79..436a63f0a 100644 --- a/aerial_robot_nerve/spinal/mcu_project/boards/stm32F7/Src/main.c +++ b/aerial_robot_nerve/spinal/mcu_project/boards/stm32F7/Src/main.c @@ -42,7 +42,8 @@ /* Sensors */ #if IMU_FLAG #include "sensors/imu/imu_ros_cmd.h" -#include "sensors/imu/imu_mpu9250.h" +#include "sensors/imu/drivers/mpu9250/imu_mpu9250.h" +#include "sensors/imu/drivers/icm20948/icm_20948.h" #endif #if BARO_FLAG @@ -98,8 +99,10 @@ bool start_processing_flag_ = false; //to prevent systick_callback starting bef ros::NodeHandle nh_; -#if IMU_FLAG +#if IMU_MPU IMUOnboard imu_; +#elif IMU_ICM +ICM20948 imu_; #endif #if BARO_FLAG diff --git a/aerial_robot_nerve/spinal/mcu_project/boards/stm32H7/Inc/main.h b/aerial_robot_nerve/spinal/mcu_project/boards/stm32H7/Inc/main.h index d8f1012c0..7e5cf72a7 100644 --- a/aerial_robot_nerve/spinal/mcu_project/boards/stm32H7/Inc/main.h +++ b/aerial_robot_nerve/spinal/mcu_project/boards/stm32H7/Inc/main.h @@ -86,6 +86,8 @@ void Error_Handler(void); #define RMII_TXD1_GPIO_Port GPIOB #define IMUCS_Pin GPIO_PIN_6 #define IMUCS_GPIO_Port GPIOB +#define SPI1_CS_Pin GPIO_PIN_7 +#define SPI1_CS_GPIO_Port GPIOB #define BAROCS_Pin GPIO_PIN_1 #define BAROCS_GPIO_Port GPIOE /* USER CODE BEGIN Private defines */ diff --git a/aerial_robot_nerve/spinal/mcu_project/boards/stm32H7/STM32CubeIDE/.cproject b/aerial_robot_nerve/spinal/mcu_project/boards/stm32H7/STM32CubeIDE/.cproject index a83aeedc7..771decefa 100644 --- a/aerial_robot_nerve/spinal/mcu_project/boards/stm32H7/STM32CubeIDE/.cproject +++ b/aerial_robot_nerve/spinal/mcu_project/boards/stm32H7/STM32CubeIDE/.cproject @@ -25,7 +25,7 @@