From 1a8249d8c6385350b39b37d7d361b97300fd5013 Mon Sep 17 00:00:00 2001 From: dxmnkd316 <46753733+dxmnkd316@users.noreply.github.com> Date: Wed, 25 Sep 2024 14:54:14 -0500 Subject: [PATCH] Update ENVIV.cpp - Fixing bracket error --- src/ENVIV.cpp | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/ENVIV.cpp b/src/ENVIV.cpp index 69027422..f1b31753 100644 --- a/src/ENVIV.cpp +++ b/src/ENVIV.cpp @@ -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; @@ -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