Changed to clang format
Replace tabs with whitespaces. Changed indentation of function "takeForcedMeasurement"
This commit is contained in:
parent
cd435d16fd
commit
4bce9380d6
|
|
@ -345,7 +345,7 @@ uint32_t Adafruit_BME280::read24(byte reg) {
|
||||||
* @brief Take a new measurement (only possible in forced mode)
|
* @brief Take a new measurement (only possible in forced mode)
|
||||||
@returns true in case of success else false
|
@returns true in case of success else false
|
||||||
*/
|
*/
|
||||||
bool Adafruit_BME280::takeForcedMeasurement() {
|
bool Adafruit_BME280::takeForcedMeasurement(void) {
|
||||||
bool return_value = false;
|
bool return_value = false;
|
||||||
// If we are in forced mode, the BME sensor goes back to sleep after each
|
// If we are in forced mode, the BME sensor goes back to sleep after each
|
||||||
// measurement and we need to set it to forced mode once at this point, so
|
// measurement and we need to set it to forced mode once at this point, so
|
||||||
|
|
@ -357,9 +357,8 @@ bool Adafruit_BME280::takeForcedMeasurement() {
|
||||||
write8(BME280_REGISTER_CONTROL, _measReg.get());
|
write8(BME280_REGISTER_CONTROL, _measReg.get());
|
||||||
// Store current time to measure the timeout
|
// Store current time to measure the timeout
|
||||||
uint32_t timeout_start = millis();
|
uint32_t timeout_start = millis();
|
||||||
// wait until measurement has been completed, otherwise we would read
|
// wait until measurement has been completed, otherwise we would read the
|
||||||
// the values from the last measurement or the timeout occurred after 2 sec.
|
// the values from the last measurement or the timeout occurred after 2 sec.
|
||||||
|
|
||||||
while (read8(BME280_REGISTER_STATUS) & 0x08) {
|
while (read8(BME280_REGISTER_STATUS) & 0x08) {
|
||||||
// In case of a timeout, stop the while loop
|
// In case of a timeout, stop the while loop
|
||||||
if((millis() - timeout_start) > 2000) {
|
if((millis() - timeout_start) > 2000) {
|
||||||
|
|
|
||||||
|
|
@ -225,7 +225,7 @@ public:
|
||||||
sensor_filter filter = FILTER_OFF,
|
sensor_filter filter = FILTER_OFF,
|
||||||
standby_duration duration = STANDBY_MS_0_5);
|
standby_duration duration = STANDBY_MS_0_5);
|
||||||
|
|
||||||
bool takeForcedMeasurement();
|
bool takeForcedMeasurement(void);
|
||||||
float readTemperature(void);
|
float readTemperature(void);
|
||||||
float readPressure(void);
|
float readPressure(void);
|
||||||
float readHumidity(void);
|
float readHumidity(void);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue