Skip to content

Commit

Permalink
AP_AHRS: control for IMUs
Browse files Browse the repository at this point in the history
  • Loading branch information
andyp1per committed Sep 12, 2024
1 parent c652680 commit eda3cb6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libraries/AP_AHRS/AP_AHRS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ void AP_AHRS::update_state(void)
{
const uint8_t primary_gyro = _get_primary_gyro_index();
const uint8_t primary_accel = _get_primary_accel_index();

#if AP_INERTIALSENSOR_ENABLED
// tell the IMUS about primary changes
if (primary_gyro != state.primary_gyro) {
AP::ins().set_primary_gyro(primary_gyro);
Expand All @@ -351,7 +351,7 @@ void AP_AHRS::update_state(void)
if (primary_accel != state.primary_accel) {
AP::ins().set_primary_accel(primary_accel);
}

#endif
state.primary_IMU = _get_primary_IMU_index();
state.primary_gyro = primary_gyro;
state.primary_accel = primary_accel;
Expand Down

0 comments on commit eda3cb6

Please sign in to comment.