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

BMP280_I2C_ADDR constant is not used anywhere in the code #5215

Closed
marianomd opened this issue Nov 21, 2019 · 3 comments
Closed

BMP280_I2C_ADDR constant is not used anywhere in the code #5215

marianomd opened this issue Nov 21, 2019 · 3 comments
Labels

Comments

@marianomd
Copy link
Contributor

marianomd commented Nov 21, 2019

I have a faulty onboard BMP280 barometer, and I added an external BMP280 to the i2c bus.

These BMP280 barometers allow to change the default 0x76 address to 0x77, applying VCC to SDO pin.

In lack of configurable baro_i2c_address (It would be nice to port from Betaflight), I tried to change the default address in the code, but found that it is ignored.

I had to add the following line to barometer_bmp280.c: (last line)

`
bool bmp280Detect(baroDev_t *baro)
{
baro->busDev = busDeviceInit(BUSTYPE_ANY, DEVHW_BMP280, 0, OWNER_BARO);
if (baro->busDev == NULL) {
return false;
}

busSetSpeed(baro->busDev, BUS_SPEED_STANDARD);
baro->busDev->busdev.i2c.address = BMP280_I2C_ADDR;

`
This way I can use the external one without having to desolder the faulty one.

If there is interest I could try to make it configurable.

@issue-label-bot
Copy link

Issue Label Bot is not confident enough to auto-label this issue. See dashboard for more details.

@stale
Copy link

stale bot commented Jan 20, 2020

This issue / pull request has been automatically marked as stale because it has not had any activity in 60 days. The resources of the INAV team are limited, and so we are asking for your help.
This issue / pull request will be closed if no further activity occurs within two weeks.

@stale stale bot added the Inactive label Jan 20, 2020
@stale
Copy link

stale bot commented Feb 3, 2020

Automatically closing as inactive.

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

No branches or pull requests

1 participant