mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-25 16:56:25 +08:00
ms5611_i2c: don't create with nullptr for devname
I have not been able to unravel why nullptr is passed as the device path to the constructor of ms5611_i2c. This crashes the VDev code as it expects to create a virtual driver with the device path passed as devname. It causes VDev to do a strncmp with null. Using /vdev/ms5611_i2c as the name for the now. Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
@@ -116,9 +116,11 @@ MS5611_i2c_interface(ms5611::prom_u &prom_buf, uint8_t busnum)
|
||||
}
|
||||
|
||||
MS5611_I2C::MS5611_I2C(uint8_t bus, ms5611::prom_u &prom) :
|
||||
I2C("MS5611_I2C", nullptr, bus, 0
|
||||
I2C("MS5611_I2C",
|
||||
#ifdef __PX4_NUTTX
|
||||
, 400000
|
||||
nullptr, bus, 0, 400000
|
||||
#else
|
||||
"/vdev/MS5611_I2C", bus, 0
|
||||
#endif
|
||||
),
|
||||
_prom(prom)
|
||||
|
||||
Reference in New Issue
Block a user