27
27
*/
28
28
/* *************************************************************************/
29
29
class WipperSnapper_I2C_Driver_D6T1A : public WipperSnapper_I2C_Driver {
30
- public:
30
+ public:
31
31
/* ******************************************************************************/
32
32
/* !
33
33
@brief Constructor for an D6T1A sensor.
@@ -59,7 +59,8 @@ class WipperSnapper_I2C_Driver_D6T1A : public WipperSnapper_I2C_Driver {
59
59
bool begin () {
60
60
_d6t1a = new OmronD6T (OmronD6T::D6T_1A, _i2c);
61
61
// attempt to initialize D6T1A
62
- if (!_d6t1a->begin (_sensorAddress)) return false ;
62
+ if (!_d6t1a->begin (_sensorAddress))
63
+ return false ;
63
64
return true ;
64
65
}
65
66
@@ -107,7 +108,7 @@ class WipperSnapper_I2C_Driver_D6T1A : public WipperSnapper_I2C_Driver {
107
108
tempEvent->temperature = _deviceTemp;
108
109
return true ;
109
110
}
110
- return false ; // sensor not read recently, return false
111
+ return false ; // sensor not read recently, return false
111
112
}
112
113
113
114
/* ******************************************************************************/
@@ -125,14 +126,14 @@ class WipperSnapper_I2C_Driver_D6T1A : public WipperSnapper_I2C_Driver {
125
126
tempEvent->temperature = _objectTemp;
126
127
return true ;
127
128
}
128
- return false ; // sensor not read recently, return false
129
+ return false ; // sensor not read recently, return false
129
130
}
130
131
131
- protected:
132
- float _deviceTemp = NAN; // /< Device temperature in Celsius
133
- float _objectTemp = NAN; // /< Object temperature in Celsius
134
- uint32_t _lastRead = 0 ; // /< Last time the sensor was read in milliseconds
135
- OmronD6T *_d6t1a = nullptr ; // /< D6T1A object
132
+ protected:
133
+ float _deviceTemp = NAN; // /< Device temperature in Celsius
134
+ float _objectTemp = NAN; // /< Object temperature in Celsius
135
+ uint32_t _lastRead = 0 ; // /< Last time the sensor was read in milliseconds
136
+ OmronD6T *_d6t1a = nullptr ; // /< D6T1A object
136
137
};
137
138
138
- #endif // WipperSnapper_I2C_Driver_D6T1A
139
+ #endif // WipperSnapper_I2C_Driver_D6T1A
0 commit comments