Skip to content

Commit 18c000e

Browse files
committed
AP_HAL: hwdef.py: exempt BMP280 from probe_*_dev shortcuts
the signature on the problem method is incorrect for the BMP310
1 parent 6605f13 commit 18c000e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libraries/AP_HAL/hwdef/scripts/hwdef.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,13 +392,13 @@ def write_BARO_config(self, f):
392392

393393
# look for a shortcut:
394394
m = re.match(r"hal.spi->get_device_ptr\((.+?)\)", get_device_call)
395-
if m is not None:
395+
if driver not in ["DPS280"] and m is not None:
396396
spi_device_string = m.group(1)
397397
f.write(f'#define HAL_BARO_PROBE{n} probe_spi_dev({probe_fn}, {spi_device_string});\n')
398398
continue
399399

400400
m = re.match(r"GET_I2C_DEVICE_PTR\((\d+),\s*(0x\d+)\)", get_device_call)
401-
if m is not None:
401+
if driver not in ["DPS280"] and m is not None:
402402
i2c_bus = m.group(1)
403403
i2c_addr = m.group(2)
404404
f.write(f'#define HAL_BARO_PROBE{n} probe_i2c_dev({probe_fn}, {i2c_bus}, {i2c_addr});\n')

0 commit comments

Comments
 (0)