Skip to content

Commit

Permalink
[Spinal][Imu] workaround to support spinalF7
Browse files Browse the repository at this point in the history
  • Loading branch information
sugihara-16 committed Jun 21, 2024
1 parent b06b03f commit 1b59aa1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,11 +233,7 @@ int main(void)
FlashMemory::read();
#endif

#if IMU_MPU
imu_.init(&hspi1, &hi2c3, &nh_, IMUCS_GPIO_Port, IMUCS_Pin, LED0_GPIO_Port, LED0_Pin);
#elif IMU_ICM
imu_.init(&hspi1, &hi2c3, &nh_, IMUCS_GPIO_Port, IMUCS_Pin, LED0_GPIO_Port, LED0_Pin);
#endif
IMU_ROS_CMD::init(&nh_);
IMU_ROS_CMD::addImu(&imu_);
baro_.init(&hi2c1, &nh_, BAROCS_GPIO_Port, BAROCS_Pin);
Expand Down

0 comments on commit 1b59aa1

Please sign in to comment.