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

Fix barometer I2C address redefine issues #10555

Merged

Conversation

Minderring
Copy link
Contributor

Dear INAV developers,

PR #9902 adds configuration symbol for barometer I2C address. When defining the address in target.h with the same symbol as barometer driver files, it causes a redefined error. And this PR is to fix the issues.

Best Regard!
Minderring

@sensei-hacker
Copy link
Collaborator

I see there are currently no I2C_ADDR defines in any targets.

$ egrep -Hinr '_I2C_ADDR' src/main/target/*/
$

Is there a need to start doing that?

@Minderring
Copy link
Contributor Author

I see there are currently no I2C_ADDR defines in any targets.

$ egrep -Hinr '_I2C_ADDR' src/main/target/*/
$

Is there a need to start doing that?

Hi! I attempted to define the I2C_ADDR but encountered a redefine error. My later PR #10557 utilized the I2C_ADDR.

Currently, there are no I2C_ADDR definitions in any targets, as most boards use the default address. Others, using like BUSDEV_REGISTER_I2C(busdev_qmc5883, DEVHW_QMC5883, MAG_I2C_BUS, 0x0D, NONE, DEVFLAGS_NONE);, to specify a non-default address.

I believe it would be better to address this issue to prevent future problems.

Thank you!

@mmosca mmosca merged commit a41ba3e into iNavFlight:master Jan 10, 2025
20 checks passed
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.

3 participants