2727*/
2828/* *************************************************************************/
2929class WipperSnapper_I2C_Driver_D6T1A : public WipperSnapper_I2C_Driver {
30- public:
30+ public:
3131 /* ******************************************************************************/
3232 /* !
3333 @brief Constructor for an D6T1A sensor.
@@ -59,7 +59,8 @@ class WipperSnapper_I2C_Driver_D6T1A : public WipperSnapper_I2C_Driver {
5959 bool begin () {
6060 _d6t1a = new OmronD6T (OmronD6T::D6T_1A, _i2c);
6161 // attempt to initialize D6T1A
62- if (!_d6t1a->begin (_sensorAddress)) return false ;
62+ if (!_d6t1a->begin (_sensorAddress))
63+ return false ;
6364 return true ;
6465 }
6566
@@ -107,7 +108,7 @@ class WipperSnapper_I2C_Driver_D6T1A : public WipperSnapper_I2C_Driver {
107108 tempEvent->temperature = _deviceTemp;
108109 return true ;
109110 }
110- return false ; // sensor not read recently, return false
111+ return false ; // sensor not read recently, return false
111112 }
112113
113114 /* ******************************************************************************/
@@ -125,14 +126,14 @@ class WipperSnapper_I2C_Driver_D6T1A : public WipperSnapper_I2C_Driver {
125126 tempEvent->temperature = _objectTemp;
126127 return true ;
127128 }
128- return false ; // sensor not read recently, return false
129+ return false ; // sensor not read recently, return false
129130 }
130131
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
136137};
137138
138- #endif // WipperSnapper_I2C_Driver_D6T1A
139+ #endif // WipperSnapper_I2C_Driver_D6T1A
0 commit comments