Initialize i2c_dev to nullptr in constructor
This alleviates the issue on initialisation and particularly on destruction and reinitialization of the driver.
This commit is contained in:
parent
25ae7b4997
commit
dd363596d7
1 changed files with 2 additions and 1 deletions
|
|
@ -25,6 +25,7 @@
|
||||||
Adafruit_MLX90632::Adafruit_MLX90632() {
|
Adafruit_MLX90632::Adafruit_MLX90632() {
|
||||||
TO0 = 25.0; // Initialize previous object temperature
|
TO0 = 25.0; // Initialize previous object temperature
|
||||||
TA0 = 25.0; // Initialize previous ambient temperature
|
TA0 = 25.0; // Initialize previous ambient temperature
|
||||||
|
i2c_dev = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue