mirror of
https://github.com/eclipse/upm.git
synced 2025-03-24 01:10:22 +03:00
mlx90614: set i2c bus speed to 100 kHz on init to match sensor specs
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
parent
baec9966f0
commit
e7394217b1
@ -42,6 +42,12 @@ MLX90614::MLX90614 (int bus, int devAddr) : m_i2Ctx(bus) {
|
|||||||
throw std::invalid_argument(std::string(__FUNCTION__) +
|
throw std::invalid_argument(std::string(__FUNCTION__) +
|
||||||
": address() failed");
|
": address() failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((ret = m_i2Ctx.frequency(mraa::I2C_STD)) != mraa::SUCCESS ) {
|
||||||
|
throw std::invalid_argument(std::string(__FUNCTION__) +
|
||||||
|
": I2c.frequency(I2C_STD) failed");
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
float
|
float
|
||||||
|
Loading…
x
Reference in New Issue
Block a user