Inav: OMNIBUSF4V3 (Banggood clone) external BARO not working

Created on 13 Jan 2020  路  4Comments  路  Source: iNavFlight/inav

on the latest inav (2.3.0) OMNIBUSF4V3 target,the BMP280 I2C external BARO is not working.
There is a SPI /I2C conflict, on the target.h
see here:
https://github.com/iNavFlight/inav/blob/debe8ab772dc7e13d6cecd162ae107760adfd90c/src/main/target/OMNIBUSF4/target.h#L116
and here:
https://github.com/iNavFlight/inav/blob/debe8ab772dc7e13d6cecd162ae107760adfd90c/src/main/target/OMNIBUSF4/target.h#L119

In my case i wanted a I2C BARO, so had to recompile inav with #define BMP280_SPI_BUS commented out:
// #define BMP280_SPI_BUS

This is the FC used:
https://www.banggood.com/9_4g-30_5x30_5mm-Omnibus-F4-Flight-Controller-AIO-OSD-5V-BEC-and-Current-Sensor-p-1226610.html?rmmds=buy&cur_warehouse=CN

BUG

All 4 comments

Issue-Label Bot is automatically applying the label BUG to this issue, with a confidence of 0.92. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

as i can see, no the #5187 is not going to fix this.
the SPI/I2C conflict for the BMP280 is still there.
i had to comment out the following defines in order for the I2C BMP280 BARO to work.
`

define BMP280_SPI_BUS BUS_SPI3

define BMP280_CS_PIN PB3 // v1

`

I found that if baro on spi is defined then baro on i2c is ignored:
common_hardware.c

#if defined(BMP280_SPI_BUS)
  BUSDEV_REGISTER_SPI(busdev_bmp280, DEVHW_BMP280, BMP280_SPI_BUS, BMP280_CS_PIN, NONE, DEVFLAGS_NONE);
  #elif defined(BMP280_I2C_BUS) || defined(BARO_I2C_BUS)
    ...
    BUSDEV_REGISTER_I2C(busdev_bmp280, DEVHW_BMP280, BMP280_I2C_BUS, 0x76, NONE, DEVFLAGS_NONE);
#endif
Was this page helpful?
0 / 5 - 0 ratings

Related issues

Ralfde picture Ralfde  路  4Comments

digitalentity picture digitalentity  路  4Comments

Painless360 picture Painless360  路  4Comments

tadamox picture tadamox  路  3Comments

seriousrob picture seriousrob  路  3Comments