Skip to content

Commit

Permalink
Add missing USE_BARO_BMP280 to SPI case
Browse files Browse the repository at this point in the history
  • Loading branch information
mmosca committed Dec 29, 2023
1 parent 4f2345a commit 4e14423
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/utils/bf2inav.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,7 @@ def writeTargetH(folder, map):
if m:
file.write("#define BARO_I2C_BUS BUS_I2C%s\n" % (m.group(1)))
if 'BARO_SPI_INSTANCE' in map['defines']:
file.write("#define USE_BARO_BMP280\n")
file.write("#define USE_BARO_SPI_BMP280\n")
file.write("#define BMP280_SPI_BUS BUS_%s\n" % (map['defines']['BARO_SPI_INSTANCE']))
file.write("#define BMP280_CS_PIN %s\n" % (findPinByFunction('BARO_CS', map)))
Expand Down

0 comments on commit 4e14423

Please sign in to comment.