26
26
*/
27
27
/* *************************************************************************/
28
28
class WipperSnapper_I2C_Driver_MLX90632D : public WipperSnapper_I2C_Driver {
29
- public:
29
+ public:
30
30
/* ******************************************************************************/
31
31
/* !
32
32
@brief Constructor for an MLX90632 sensor.
@@ -71,7 +71,8 @@ class WipperSnapper_I2C_Driver_MLX90632D : public WipperSnapper_I2C_Driver {
71
71
}
72
72
_mlx90632 = new Adafruit_MLX90632 ();
73
73
// attempt to initialize MLX90632
74
- if (!_mlx90632->begin (_sensorAddress, _i2c)) return false ;
74
+ if (!_mlx90632->begin (_sensorAddress, _i2c))
75
+ return false ;
75
76
76
77
return ConfigureAndPrintSensorInfo ();
77
78
}
@@ -164,7 +165,7 @@ class WipperSnapper_I2C_Driver_MLX90632D : public WipperSnapper_I2C_Driver {
164
165
WS_DEBUG_PRINTLN (F (" Failed to start single measurement" ));
165
166
return false ;
166
167
}
167
- delay (510 ); // Wait for measurement to complete @ 2Hz
168
+ delay (510 ); // Wait for measurement to complete @ 2Hz
168
169
}
169
170
170
171
// Only check new data flag - much more efficient for continuous mode
@@ -202,7 +203,7 @@ class WipperSnapper_I2C_Driver_MLX90632D : public WipperSnapper_I2C_Driver {
202
203
tempEvent->temperature = _deviceTemp;
203
204
return true ;
204
205
}
205
- return false ; // sensor not read recently, return false
206
+ return false ; // sensor not read recently, return false
206
207
}
207
208
208
209
/* ******************************************************************************/
@@ -219,14 +220,14 @@ class WipperSnapper_I2C_Driver_MLX90632D : public WipperSnapper_I2C_Driver {
219
220
tempEvent->temperature = _objectTemp;
220
221
return true ;
221
222
}
222
- return false ; // sensor not read recently, return false
223
+ return false ; // sensor not read recently, return false
223
224
}
224
225
225
- protected:
226
- double _deviceTemp; // /< Device temperature in Celsius
227
- double _objectTemp; // /< Object temperature in Celsius
228
- uint32_t _lastRead; // /< Last time the sensor was read in milliseconds
229
- Adafruit_MLX90632 *_mlx90632 = nullptr ; // /< MLX90632 object
226
+ protected:
227
+ double _deviceTemp; // /< Device temperature in Celsius
228
+ double _objectTemp; // /< Object temperature in Celsius
229
+ uint32_t _lastRead; // /< Last time the sensor was read in milliseconds
230
+ Adafruit_MLX90632 *_mlx90632 = nullptr ; // /< MLX90632 object
230
231
};
231
232
232
- #endif // WipperSnapper_I2C_Driver_MLX90632
233
+ #endif // WipperSnapper_I2C_Driver_MLX90632
0 commit comments