Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AP_InertialSensor: Fix parameter name when saving persistent accel cals for Aux IMUs #26624

Merged

Conversation

joshanne
Copy link
Contributor

@joshanne joshanne commented Mar 26, 2024

Saving Persistent Accel cals for Aux IMUs resulted in a duplicate instance and that parameter does not exist.

Without this change, you get:

  • IMU_ACCOFFS_*
  • IMU_ACC2OFFS_*
  • IMU_ACC3OFFS_*
  • IMU3_ACCOFFS_

After this change, you get:

  • IMU_ACCOFFS_*
  • IMU_ACC2OFFS_*
  • IMU_ACC3OFFS_*
  • IMU4_ACCOFFS_

…ls for Aux IMUs

Without this change, you get:
* IMU_ACCOFFS_*
* IMU_ACC2OFFS_*
* IMU_ACC3OFFS_*
* IMU3_ACCOFFS_*

After this change, you get:
* IMU_ACCOFFS_*
* IMU_ACC2OFFS_*
* IMU_ACC3OFFS_*
* IMU4_ACCOFFS_*
@joshanne joshanne requested review from tridge and peterbarker March 26, 2024 00:08
@@ -517,7 +517,7 @@ void AP_InertialSensor::get_persistent_params(ExpandingString &str) const
}
#if INS_AUX_INSTANCES
for (uint8_t i=0; i<INS_AUX_INSTANCES; i++) {
const uint8_t imu = i+(INS_MAX_INSTANCES-INS_AUX_INSTANCES);
const uint8_t imu = i+(INS_MAX_INSTANCES-INS_AUX_INSTANCES)+1;
Copy link
Contributor Author

@joshanne joshanne Mar 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already correctly account for the imu offset for the base first 3 IMUs just above:

We add the offset here for aux IMUs

@peterbarker peterbarker merged commit 9dbc61f into ArduPilot:master Apr 5, 2024
91 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants