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: adjust the instance if External AHRS is enabled #28754

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rishabsingh3003
Copy link
Contributor

This allows CubeOrange Plus to be able to use 3 IMUs along with an ExternalNav sensor. Currently, the first IMU gets replaced by the ExternalNav sensor and isn't initialized.

#define ADD_BACKEND_INSTANCE(x, instance) do { \
uint8_t adjusted_instance = instance; \
if (HAL_EXTERNAL_AHRS_ENABLED) { \
if (AP::externalAHRS().get_port(AP_ExternalAHRS::AvailableSensor::IMU) >= 0) { \
Copy link
Contributor

Choose a reason for hiding this comment

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

this probably won't compile with --disable-EXTERNALAHRS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants