From 3a148fa55dfd52784dddfdf7f96370223c18450f Mon Sep 17 00:00:00 2001 From: richonguzman Date: Tue, 14 May 2024 08:47:57 -0400 Subject: [PATCH] testing heltecv3 --- src/bme_utils.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/bme_utils.cpp b/src/bme_utils.cpp index a28130b..4ac1ecf 100644 --- a/src/bme_utils.cpp +++ b/src/bme_utils.cpp @@ -2,6 +2,7 @@ #include "configuration.h" #include "gps_utils.h" #include "display.h" +#include #define SEALEVELPRESSURE_HPA (1013.25) #define CORRECTION_FACTOR (8.2296) // for meters @@ -20,11 +21,12 @@ Adafruit_BME280 bme280; Adafruit_BMP280 bmp280(&Wire1); Adafruit_BME680 bme680(&Wire1); #else -Adafruit_BME680 bme680; Adafruit_BMP280 bmp280; +Adafruit_BME680 bme680; #endif + namespace BME_Utils { void getWxModuleAddres() { @@ -65,16 +67,16 @@ namespace BME_Utils { } #endif if (!wxModuleFound) { - if (bme680.begin(wxModuleAddress)) { - Serial.println("BME680 sensor found"); - wxModuleType = 3; + if (bmp280.begin(wxModuleAddress)) { + Serial.println("BMP280 sensor found"); + wxModuleType = 2; wxModuleFound = true; } } if (!wxModuleFound) { - if (bmp280.begin(wxModuleAddress)) { - Serial.println("BMP280 sensor found"); - wxModuleType = 2; + if (bme680.begin(wxModuleAddress)) { + Serial.println("BME680 sensor found"); + wxModuleType = 3; wxModuleFound = true; } }