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:
Mark Charlebois
2015-04-01 18:16:38 -07:00
parent 92d90f7780
commit 4780353cd8
+4 -2
View File
@@ -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)