Skip to content

Commit

Permalink
Update ENVIV.cpp - Fixing bracket error
Browse files Browse the repository at this point in the history
  • Loading branch information
dxmnkd316 authored Sep 25, 2024
1 parent cbc48f5 commit 1a8249d
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions src/ENVIV.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,6 @@ namespace ENVIV
Serial.println(BMP280_I2c + " on bus " + BMP280_I2c_Bus);
}

bool SendDiscovery()
{
//Serial.println("env IV send discovery");
//if (BMP280_I2c.isEmpty()) return true;
return sendSensorDiscovery("ENV IV Temperature", EC_NONE, "temperature", "°C")
&& sendSensorDiscovery("ENV IV Pressure", EC_NONE, "pressure", "hPa")
&& sendSensorDiscovery("SHT40 Temperature", EC_NONE, "temperature", "°C")
&& sendSensorDiscovery("SHT40 Humidity", EC_NONE, "humidity", "%");
}

void Loop()
{
if (!I2C_Bus_1_Started && !I2C_Bus_2_Started) return;
Expand All @@ -96,6 +86,17 @@ namespace ENVIV
BMP280PreviousMillis = millis();
}
}

bool SendDiscovery()
{
//Serial.println("env IV send discovery");
//if (BMP280_I2c.isEmpty()) return true;
return sendSensorDiscovery("ENV IV Temperature", EC_NONE, "temperature", "°C")
&& sendSensorDiscovery("ENV IV Pressure", EC_NONE, "pressure", "hPa")
&& sendSensorDiscovery("SHT40 Temperature", EC_NONE, "temperature", "°C")
&& sendSensorDiscovery("SHT40 Humidity", EC_NONE, "humidity", "%");
}

}

#endif

0 comments on commit 1a8249d

Please sign in to comment.