@@ -1036,7 +1036,7 @@ void WipperSnapper_Component_I2C::update() {
1036
1036
WS_DEBUG_PRINTLN (
1037
1037
" ERROR: Failed to get ambient temperature sensor reading!" );
1038
1038
sensorsReturningFalse = true ;
1039
- if (retries== 1 ) {
1039
+ if (retries == 1 ) {
1040
1040
(*iter)->setSensorAmbientTempPeriodPrv (curTime);
1041
1041
}
1042
1042
}
@@ -1064,7 +1064,7 @@ void WipperSnapper_Component_I2C::update() {
1064
1064
WS_DEBUG_PRINTLN (
1065
1065
" ERROR: Failed to obtain ambient temp. (°F)) sensor reading!" );
1066
1066
sensorsReturningFalse = true ;
1067
- if (retries== 1 ) {
1067
+ if (retries == 1 ) {
1068
1068
(*iter)->setSensorAmbientTempFPeriodPrv (curTime);
1069
1069
}
1070
1070
}
@@ -1093,7 +1093,7 @@ void WipperSnapper_Component_I2C::update() {
1093
1093
WS_DEBUG_PRINTLN (
1094
1094
" ERROR: Failed to get object temperature sensor (°C) reading!" );
1095
1095
sensorsReturningFalse = true ;
1096
- if (retries== 1 ) {
1096
+ if (retries == 1 ) {
1097
1097
(*iter)->setSensorObjectTempPeriodPrv (curTime);
1098
1098
}
1099
1099
}
@@ -1122,7 +1122,7 @@ void WipperSnapper_Component_I2C::update() {
1122
1122
WS_DEBUG_PRINTLN (
1123
1123
" ERROR: Failed to get object temperature sensor (°F) reading!" );
1124
1124
sensorsReturningFalse = true ;
1125
- if (retries== 1 ) {
1125
+ if (retries == 1 ) {
1126
1126
(*iter)->setSensorObjectTempFPeriodPrv (curTime);
1127
1127
}
1128
1128
}
@@ -1166,14 +1166,15 @@ void WipperSnapper_Component_I2C::update() {
1166
1166
WS_DEBUG_PRINTLN (" hPa" );
1167
1167
1168
1168
// pack event data into msg
1169
- fillEventMessage (&msgi2cResponse, event.pressure ,
1170
- wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_PRESSURE);
1169
+ fillEventMessage (
1170
+ &msgi2cResponse, event.pressure ,
1171
+ wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_PRESSURE);
1171
1172
1172
1173
(*iter)->setSensorPressurePeriodPrv (curTime);
1173
1174
} else {
1174
1175
WS_DEBUG_PRINTLN (" ERROR: Failed to get Pressure sensor reading!" );
1175
1176
sensorsReturningFalse = true ;
1176
- if (retries== 1 ) {
1177
+ if (retries == 1 ) {
1177
1178
(*iter)->setSensorPressurePeriodPrv (curTime);
1178
1179
}
1179
1180
}
@@ -1193,12 +1194,12 @@ void WipperSnapper_Component_I2C::update() {
1193
1194
WS_DEBUG_PRINTLN (" ppm" );
1194
1195
1195
1196
fillEventMessage (&msgi2cResponse, event.CO2 ,
1196
- wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_CO2);
1197
+ wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_CO2);
1197
1198
(*iter)->setSensorCO2PeriodPrv (curTime);
1198
1199
} else {
1199
1200
WS_DEBUG_PRINTLN (" ERROR: Failed to obtain CO2 sensor reading!" );
1200
1201
sensorsReturningFalse = true ;
1201
- if (retries== 1 ) {
1202
+ if (retries == 1 ) {
1202
1203
(*iter)->setSensorCO2PeriodPrv (curTime);
1203
1204
}
1204
1205
}
@@ -1218,12 +1219,12 @@ void WipperSnapper_Component_I2C::update() {
1218
1219
WS_DEBUG_PRINTLN (" ppm" );
1219
1220
1220
1221
fillEventMessage (&msgi2cResponse, event.eCO2 ,
1221
- wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_ECO2);
1222
+ wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_ECO2);
1222
1223
(*iter)->setSensorECO2PeriodPrv (curTime);
1223
1224
} else {
1224
1225
WS_DEBUG_PRINTLN (" ERROR: Failed to obtain eCO2 sensor reading!" );
1225
1226
sensorsReturningFalse = true ;
1226
- if (retries== 1 ) {
1227
+ if (retries == 1 ) {
1227
1228
(*iter)->setSensorECO2PeriodPrv (curTime);
1228
1229
}
1229
1230
}
@@ -1243,12 +1244,12 @@ void WipperSnapper_Component_I2C::update() {
1243
1244
WS_DEBUG_PRINTLN (" ppb" );
1244
1245
1245
1246
fillEventMessage (&msgi2cResponse, event.tvoc ,
1246
- wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_TVOC);
1247
+ wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_TVOC);
1247
1248
(*iter)->setSensorTVOCPeriodPrv (curTime);
1248
1249
} else {
1249
1250
WS_DEBUG_PRINTLN (" ERROR: Failed to obtain TVOC sensor reading!" );
1250
1251
sensorsReturningFalse = true ;
1251
- if (retries== 1 ) {
1252
+ if (retries == 1 ) {
1252
1253
(*iter)->setSensorTVOCPeriodPrv (curTime);
1253
1254
}
1254
1255
}
@@ -1268,14 +1269,15 @@ void WipperSnapper_Component_I2C::update() {
1268
1269
WS_DEBUG_PRINTLN (" m" );
1269
1270
1270
1271
// pack event data into msg
1271
- fillEventMessage (&msgi2cResponse, event.altitude ,
1272
- wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_ALTITUDE);
1272
+ fillEventMessage (
1273
+ &msgi2cResponse, event.altitude ,
1274
+ wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_ALTITUDE);
1273
1275
1274
1276
(*iter)->setSensorAltitudePeriodPrv (curTime);
1275
1277
} else {
1276
1278
WS_DEBUG_PRINTLN (" ERROR: Failed to get altitude sensor reading!" );
1277
1279
sensorsReturningFalse = true ;
1278
- if (retries== 1 ) {
1280
+ if (retries == 1 ) {
1279
1281
(*iter)->setSensorAltitudePeriodPrv (curTime);
1280
1282
}
1281
1283
}
@@ -1296,13 +1298,13 @@ void WipperSnapper_Component_I2C::update() {
1296
1298
1297
1299
// pack event data into msg
1298
1300
fillEventMessage (&msgi2cResponse, event.light ,
1299
- wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_LIGHT);
1301
+ wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_LIGHT);
1300
1302
1301
1303
(*iter)->setSensorLightPeriodPrv (curTime);
1302
1304
} else {
1303
1305
WS_DEBUG_PRINTLN (" ERROR: Failed to get light sensor reading!" );
1304
1306
sensorsReturningFalse = true ;
1305
- if (retries== 1 ) {
1307
+ if (retries == 1 ) {
1306
1308
(*iter)->setSensorLightPeriodPrv (curTime);
1307
1309
}
1308
1310
}
@@ -1322,14 +1324,15 @@ void WipperSnapper_Component_I2C::update() {
1322
1324
WS_DEBUG_PRINTLN (" ppm" );
1323
1325
1324
1326
// pack event data into msg
1325
- fillEventMessage (&msgi2cResponse, event.pm10_std ,
1326
- wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_PM10_STD);
1327
+ fillEventMessage (
1328
+ &msgi2cResponse, event.pm10_std ,
1329
+ wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_PM10_STD);
1327
1330
// try again in curTime seconds
1328
1331
(*iter)->setSensorPM10_STDPeriodPrv (curTime);
1329
1332
} else {
1330
1333
WS_DEBUG_PRINTLN (" ERROR: Failed to get PM1.0 sensor reading!" );
1331
1334
sensorsReturningFalse = true ;
1332
- if (retries== 1 ) {
1335
+ if (retries == 1 ) {
1333
1336
(*iter)->setSensorPM10_STDPeriodPrv (curTime);
1334
1337
}
1335
1338
}
@@ -1349,14 +1352,15 @@ void WipperSnapper_Component_I2C::update() {
1349
1352
WS_DEBUG_PRINTLN (" ppm" );
1350
1353
1351
1354
// pack event data into msg
1352
- fillEventMessage (&msgi2cResponse, event.pm25_std ,
1353
- wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_PM25_STD);
1355
+ fillEventMessage (
1356
+ &msgi2cResponse, event.pm25_std ,
1357
+ wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_PM25_STD);
1354
1358
// try again in curTime seconds
1355
1359
(*iter)->setSensorPM25_STDPeriodPrv (curTime);
1356
1360
} else {
1357
1361
WS_DEBUG_PRINTLN (" ERROR: Failed to get PM2.5 sensor reading!" );
1358
1362
sensorsReturningFalse = true ;
1359
- if (retries== 1 ) {
1363
+ if (retries == 1 ) {
1360
1364
(*iter)->setSensorPM25_STDPeriodPrv (curTime);
1361
1365
}
1362
1366
}
@@ -1376,14 +1380,15 @@ void WipperSnapper_Component_I2C::update() {
1376
1380
WS_DEBUG_PRINTLN (" ppm" );
1377
1381
1378
1382
// pack event data into msg
1379
- fillEventMessage (&msgi2cResponse, event.pm25_std ,
1380
- wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_PM100_STD);
1383
+ fillEventMessage (
1384
+ &msgi2cResponse, event.pm25_std ,
1385
+ wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_PM100_STD);
1381
1386
(*iter)->setSensorPM100_STDPeriodPrv (
1382
1387
curTime); // try again in curTime seconds
1383
1388
} else {
1384
1389
WS_DEBUG_PRINTLN (" ERROR: Failed to get PM10.0 sensor reading!" );
1385
1390
sensorsReturningFalse = true ;
1386
- if (retries== 1 ) {
1391
+ if (retries == 1 ) {
1387
1392
(*iter)->setSensorPM100_STDPeriodPrv (curTime);
1388
1393
}
1389
1394
}
@@ -1404,13 +1409,13 @@ void WipperSnapper_Component_I2C::update() {
1404
1409
1405
1410
// pack event data into msg
1406
1411
fillEventMessage (&msgi2cResponse, event.voltage ,
1407
- wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_VOLTAGE);
1412
+ wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_VOLTAGE);
1408
1413
// try again in curTime seconds
1409
1414
(*iter)->setSensorVoltagePeriodPrv (curTime);
1410
1415
} else {
1411
1416
WS_DEBUG_PRINTLN (" ERROR: Failed to get voltage sensor reading!" );
1412
1417
sensorsReturningFalse = true ;
1413
- if (retries== 1 ) {
1418
+ if (retries == 1 ) {
1414
1419
(*iter)->setSensorVoltagePeriodPrv (curTime);
1415
1420
}
1416
1421
}
@@ -1431,13 +1436,13 @@ void WipperSnapper_Component_I2C::update() {
1431
1436
1432
1437
// pack event data into msg
1433
1438
fillEventMessage (&msgi2cResponse, event.current ,
1434
- wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_CURRENT);
1439
+ wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_CURRENT);
1435
1440
// try again in curTime seconds
1436
1441
(*iter)->setSensorCurrentPeriodPrv (curTime);
1437
1442
} else {
1438
1443
WS_DEBUG_PRINTLN (" ERROR: Failed to get Current sensor reading!" );
1439
1444
sensorsReturningFalse = true ;
1440
- if (retries== 1 ) {
1445
+ if (retries == 1 ) {
1441
1446
(*iter)->setSensorCurrentPeriodPrv (curTime);
1442
1447
}
1443
1448
}
@@ -1466,7 +1471,7 @@ void WipperSnapper_Component_I2C::update() {
1466
1471
WS_DEBUG_PRINTLN (
1467
1472
" ERROR: Failed to get unitless percent sensor reading!" );
1468
1473
sensorsReturningFalse = true ;
1469
- if (retries== 1 ) {
1474
+ if (retries == 1 ) {
1470
1475
(*iter)->setSensorUnitlessPercentPeriodPrv (curTime);
1471
1476
}
1472
1477
}
@@ -1485,12 +1490,12 @@ void WipperSnapper_Component_I2C::update() {
1485
1490
WS_DEBUG_PRINTLN (event.data [0 ]);
1486
1491
1487
1492
fillEventMessage (&msgi2cResponse, event.data [0 ],
1488
- wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_RAW);
1493
+ wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_RAW);
1489
1494
(*iter)->setSensorRawPeriodPrv (curTime);
1490
1495
} else {
1491
1496
WS_DEBUG_PRINTLN (" ERROR: Failed to obtain Raw sensor reading!" );
1492
1497
sensorsReturningFalse = true ;
1493
- if (retries== 1 ) {
1498
+ if (retries == 1 ) {
1494
1499
(*iter)->setSensorRawPeriodPrv (curTime);
1495
1500
}
1496
1501
}
@@ -1517,7 +1522,7 @@ void WipperSnapper_Component_I2C::update() {
1517
1522
WS_DEBUG_PRINTLN (
1518
1523
" ERROR: Failed to obtain gas resistance sensor reading!" );
1519
1524
sensorsReturningFalse = true ;
1520
- if (retries== 1 ) {
1525
+ if (retries == 1 ) {
1521
1526
(*iter)->setSensorGasResistancePeriodPrv (curTime);
1522
1527
}
1523
1528
}
@@ -1535,13 +1540,14 @@ void WipperSnapper_Component_I2C::update() {
1535
1540
WS_DEBUG_PRINT (" \t NOx Index: " );
1536
1541
WS_DEBUG_PRINT (event.nox_index );
1537
1542
1538
- fillEventMessage (&msgi2cResponse, event.data [0 ],
1539
- wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_NOX_INDEX);
1543
+ fillEventMessage (
1544
+ &msgi2cResponse, event.data [0 ],
1545
+ wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_NOX_INDEX);
1540
1546
(*iter)->setSensorNOxIndexPeriodPrv (curTime);
1541
1547
} else {
1542
1548
WS_DEBUG_PRINTLN (" ERROR: Failed to obtain NOx index sensor reading!" );
1543
1549
sensorsReturningFalse = true ;
1544
- if (retries== 1 ) {
1550
+ if (retries == 1 ) {
1545
1551
(*iter)->setSensorNOxIndexPeriodPrv (curTime);
1546
1552
}
1547
1553
}
@@ -1559,13 +1565,14 @@ void WipperSnapper_Component_I2C::update() {
1559
1565
WS_DEBUG_PRINT (" \t VOC Index: " );
1560
1566
WS_DEBUG_PRINT (event.voc_index );
1561
1567
1562
- fillEventMessage (&msgi2cResponse, event.data [0 ],
1563
- wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_VOC_INDEX);
1568
+ fillEventMessage (
1569
+ &msgi2cResponse, event.data [0 ],
1570
+ wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_VOC_INDEX);
1564
1571
(*iter)->setSensorVOCIndexPeriodPrv (curTime);
1565
1572
} else {
1566
1573
WS_DEBUG_PRINTLN (" ERROR: Failed to obtain VOC index sensor reading!" );
1567
1574
sensorsReturningFalse = true ;
1568
- if (retries== 1 ) {
1575
+ if (retries == 1 ) {
1569
1576
(*iter)->setSensorVOCIndexPeriodPrv (curTime);
1570
1577
}
1571
1578
}
@@ -1584,14 +1591,15 @@ void WipperSnapper_Component_I2C::update() {
1584
1591
WS_DEBUG_PRINT (event.data [0 ]);
1585
1592
1586
1593
// pack event data into msg
1587
- fillEventMessage (&msgi2cResponse, event.data [0 ],
1588
- wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_PROXIMITY);
1594
+ fillEventMessage (
1595
+ &msgi2cResponse, event.data [0 ],
1596
+ wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_PROXIMITY);
1589
1597
1590
1598
(*iter)->setSensorProximityPeriodPrv (curTime);
1591
1599
} else {
1592
1600
WS_DEBUG_PRINTLN (" ERROR: Failed to get proximity sensor reading!" );
1593
1601
sensorsReturningFalse = true ;
1594
- if (retries== 1 ) {
1602
+ if (retries == 1 ) {
1595
1603
(*iter)->setSensorProximityPeriodPrv (curTime);
1596
1604
}
1597
1605
}
0 commit comments