From d79fa92e6c1d3324d8c3b0d20e778a510b1020cd Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Wed, 10 May 2023 17:12:48 +0200 Subject: [PATCH] SHT usermod added to MM "XL" config ... but commented out (experimental) --- platformio.ini | 2 ++ usermods/sht/usermod_sht.h | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index f1fece17..fbb0ba8f 100644 --- a/platformio.ini +++ b/platformio.ini @@ -868,6 +868,7 @@ build_flags_XL = -D USERMOD_SN_PHOTORESISTOR -D USERMOD_BME280 -D USERMOD_DHT + ; -D USERMOD_SHT ;; experimental -D USERMOD_VL53L0X_GESTURES -D WLED_ENABLE_PIXART @@ -878,6 +879,7 @@ lib_deps_XL = ; adafruit/Adafruit Si7021 Library @ 1.4.0 ;; experimental for usermod USERMOD_SENSORSTOMQTT BME280@~3.0.0 ; for usermod USERMOD_BME280 https://github.com/alwynallan/DHT_nonblocking ; for usermod USERMOD_DHT + ; robtillaart/SHT85 @ ~0.4.0 ;; for usermod USERMOD_SHT pololu/VL53L0X @ ^1.3.0 ; for usermod USERMOD_VL53L0X_GESTURES ; end of common diff --git a/usermods/sht/usermod_sht.h b/usermods/sht/usermod_sht.h index ab0ab677..118d2d32 100644 --- a/usermods/sht/usermod_sht.h +++ b/usermods/sht/usermod_sht.h @@ -100,7 +100,7 @@ void ShtUsermod::initShtTempHumiditySensor() shtTempHumidSensor->begin((uint8_t)shtI2cAddress); // WLEDMM this connects to an existing Wire (I2C) object, instead starting a new driver #endif if (shtTempHumidSensor->readStatus() == 0xFFFF) { - DEBUG_PRINTF("[%s] SHT init failed!\n", _name); + USER_PRINTF("[%s] SHT init failed, Sensor not found!\n", _name); cleanup(); return; } @@ -282,6 +282,12 @@ void ShtUsermod::setup() } firstRunDone = true; + + if (enabled && initDone && pinAllocDone && isShtReady()) { + USER_PRINTF(PSTR("[%s] SHT sensor ready.\n"), _name); + } else { + USER_PRINTF(PSTR("[%s] SHT sensor not ready.\n"), _name); + } } /**