Skip to content

Commit 8a1d2dc

Browse files
committed
Fix Clang formatting
1 parent bed8e27 commit 8a1d2dc

File tree

2 files changed

+11
-14
lines changed

2 files changed

+11
-14
lines changed

Adafruit_BME280.cpp

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -449,36 +449,34 @@ float Adafruit_BME280::readAltitude(float seaLevel) {
449449

450450
/*!
451451
* Computes Heat Index based on https://byjus.com/heat-index-formula/
452-
*
453-
* @param isCelcius - if true return Heat Index in degrees celcius else return in Farenheit
452+
* @param isCelcius - if true return Heat Index in degrees celcius else return
453+
* in Farenheit
454454
*/
455-
float Adafruit_BME280::readHeatIndex(bool isCelcius){
455+
float Adafruit_BME280::readHeatIndex(bool isCelcius) {
456456
float tempF = readTemperature() * 1.8 + 32;
457457
float humidity = readHumidity();
458458
float hi = 0.5 * (tempF + 61.0 + ((tempF - 68.0) * 1.2) + (humidity * 0.094));
459459

460460
if (hi > 79) {
461461
hi = -42.379 + 2.04901523 * tempF + 10.14333127 * humidity +
462-
-0.22475541 * tempF * humidity +
463-
-0.00683783 * pow(tempF, 2) +
462+
-0.22475541 * tempF * humidity + -0.00683783 * pow(tempF, 2) +
464463
-0.05481717 * pow(humidity, 2) +
465464
0.00122874 * pow(tempF, 2) * humidity +
466465
0.00085282 * tempF * pow(humidity, 2) +
467466
-0.00000199 * pow(tempF, 2) * pow(humidity, 2);
468467

469-
if ((humidity < 13) && (tempF >= 80.0) &&
470-
(tempF <= 112.0))
468+
if ((humidity < 13) && (tempF >= 80.0) && (tempF <= 112.0))
471469
hi -= ((13.0 - humidity) * 0.25) *
472470
sqrt((17.0 - abs(tempF - 95.0)) * 0.05882);
473471

474-
else if ((humidity > 85.0) && (tempF >= 80.0) &&
475-
(tempF <= 87.0))
472+
else if ((humidity > 85.0) && (tempF >= 80.0) && (tempF <= 87.0))
476473
hi += ((humidity - 85.0) * 0.1) * ((87.0 - tempF) * 0.2);
477-
}
478-
479-
if(isCelcius) return (hi - 32) * 0.5556; //convert back to celcius
480-
else return hi;
474+
}
481475

476+
if (isCelcius)
477+
return (hi - 32) * 0.5556; // convert back to celcius
478+
else
479+
return hi;
482480
}
483481

484482
/*!

Adafruit_BME280.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,6 @@ class Adafruit_BME280 {
231231
float readHumidity(void);
232232
float readHeatIndex(bool isCelcius);
233233

234-
235234
float readAltitude(float seaLevel);
236235
float seaLevelForAltitude(float altitude, float pressure);
237236
uint32_t sensorID(void);

0 commit comments

Comments
 (0)