From 9c9a98dd9bcee94e9c09a705a7577ea8e6eea484 Mon Sep 17 00:00:00 2001 From: Tyeth Gundry Date: Fri, 31 Jan 2025 14:40:41 +0000 Subject: [PATCH 1/6] Update WipperSnapper_I2C_Driver_SCD4X.h - renamed include --- src/components/i2c/drivers/WipperSnapper_I2C_Driver_SCD4X.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/i2c/drivers/WipperSnapper_I2C_Driver_SCD4X.h b/src/components/i2c/drivers/WipperSnapper_I2C_Driver_SCD4X.h index dfe2c1de3..26b6220fc 100644 --- a/src/components/i2c/drivers/WipperSnapper_I2C_Driver_SCD4X.h +++ b/src/components/i2c/drivers/WipperSnapper_I2C_Driver_SCD4X.h @@ -18,7 +18,7 @@ #define WipperSnapper_I2C_Driver_SCD4X_H #include "WipperSnapper_I2C_Driver.h" -#include +#include #include /**************************************************************************/ @@ -151,4 +151,4 @@ class WipperSnapper_I2C_Driver_SCD4X : public WipperSnapper_I2C_Driver { float _humidity; ///< SCD4x humidity reading }; -#endif // WipperSnapper_I2C_Driver_SCD4X \ No newline at end of file +#endif // WipperSnapper_I2C_Driver_SCD4X From fac20289eb88981daed4c2238671826045f42964 Mon Sep 17 00:00:00 2001 From: Tyeth Gundry Date: Fri, 31 Jan 2025 14:52:38 +0000 Subject: [PATCH 2/6] Update WipperSnapper_I2C_Driver_SCD4X.h - update class name --- src/components/i2c/drivers/WipperSnapper_I2C_Driver_SCD4X.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/i2c/drivers/WipperSnapper_I2C_Driver_SCD4X.h b/src/components/i2c/drivers/WipperSnapper_I2C_Driver_SCD4X.h index 26b6220fc..67bb48fa4 100644 --- a/src/components/i2c/drivers/WipperSnapper_I2C_Driver_SCD4X.h +++ b/src/components/i2c/drivers/WipperSnapper_I2C_Driver_SCD4X.h @@ -145,7 +145,7 @@ class WipperSnapper_I2C_Driver_SCD4X : public WipperSnapper_I2C_Driver { } protected: - SensirionI2CScd4x *_scd; ///< SCD4x driver object + SensirionI2cScd4x *_scd; ///< SCD4x driver object uint16_t _co2; ///< SCD4x co2 reading float _temperature; ///< SCD4x temperature reading float _humidity; ///< SCD4x humidity reading From 417009a5647f65d0ce7fce0216e6d00afdccfbe2 Mon Sep 17 00:00:00 2001 From: Tyeth Gundry Date: Fri, 31 Jan 2025 15:07:53 +0000 Subject: [PATCH 3/6] Update WipperSnapper_I2C_Driver_SCD4X.h - update instantiation --- src/components/i2c/drivers/WipperSnapper_I2C_Driver_SCD4X.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/i2c/drivers/WipperSnapper_I2C_Driver_SCD4X.h b/src/components/i2c/drivers/WipperSnapper_I2C_Driver_SCD4X.h index 67bb48fa4..34eb8f915 100644 --- a/src/components/i2c/drivers/WipperSnapper_I2C_Driver_SCD4X.h +++ b/src/components/i2c/drivers/WipperSnapper_I2C_Driver_SCD4X.h @@ -51,7 +51,7 @@ class WipperSnapper_I2C_Driver_SCD4X : public WipperSnapper_I2C_Driver { */ /*******************************************************************************/ bool begin() { - _scd = new SensirionI2CScd4x(); + _scd = new SensirionI2cScd4x(); _scd->begin(*_i2c); // stop previously started measurement From 861d67745da2db559211cfcf7eb67461d6c8c944 Mon Sep 17 00:00:00 2001 From: tyeth Date: Fri, 31 Jan 2025 15:38:39 +0000 Subject: [PATCH 4/6] Fix multiple ifdef warning --- src/network_interfaces/Wippersnapper_ESP32.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/network_interfaces/Wippersnapper_ESP32.h b/src/network_interfaces/Wippersnapper_ESP32.h index 5e1a936c6..6d70ecc5d 100644 --- a/src/network_interfaces/Wippersnapper_ESP32.h +++ b/src/network_interfaces/Wippersnapper_ESP32.h @@ -106,10 +106,10 @@ class Wippersnapper_ESP32 : public Wippersnapper { // For boards with a "3D Antenna", we need to reduce the TX power // to prevent flaky operation. // NOTE: This is a known issue with the QT Py series of boards. -#ifdef ARDUINO_ADAFRUIT_QTPY_ESP32S2 || \ - ARDUINO_ADAFRUIT_QTPY_ESP32S3_NOPSRAM || \ - ARDUINO_ADAFRUIT_QTPY_ESP32S3_N4R2 || ARDUINO_ADAFRUIT_QTPY_ESP32C3 || \ - ARDUINO_ADAFRUIT_QTPY_ESP32_PICO +#if defined(ARDUINO_ADAFRUIT_QTPY_ESP32S2) || \ + defined(ARDUINO_ADAFRUIT_QTPY_ESP32S3_NOPSRAM) || \ + defined(ARDUINO_ADAFRUIT_QTPY_ESP32S3_N4R2) || defined(ARDUINO_ADAFRUIT_QTPY_ESP32C3) || \ + defined(ARDUINO_ADAFRUIT_QTPY_ESP32_PICO) WiFi.setTxPower(WIFI_POWER_15dBm); #endif From c2fac61aaee85c14a83b087ea54744d85eb6ba7e Mon Sep 17 00:00:00 2001 From: tyeth Date: Fri, 31 Jan 2025 15:44:43 +0000 Subject: [PATCH 5/6] Update begin and getDataReadyStatus --- src/components/i2c/drivers/WipperSnapper_I2C_Driver_SCD4X.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/i2c/drivers/WipperSnapper_I2C_Driver_SCD4X.h b/src/components/i2c/drivers/WipperSnapper_I2C_Driver_SCD4X.h index 34eb8f915..d5490568e 100644 --- a/src/components/i2c/drivers/WipperSnapper_I2C_Driver_SCD4X.h +++ b/src/components/i2c/drivers/WipperSnapper_I2C_Driver_SCD4X.h @@ -52,7 +52,7 @@ class WipperSnapper_I2C_Driver_SCD4X : public WipperSnapper_I2C_Driver { /*******************************************************************************/ bool begin() { _scd = new SensirionI2cScd4x(); - _scd->begin(*_i2c); + _scd->begin(*_i2c, _sensorAddress); // stop previously started measurement if (_scd->stopPeriodicMeasurement()) @@ -78,7 +78,7 @@ class WipperSnapper_I2C_Driver_SCD4X : public WipperSnapper_I2C_Driver { delay(100); // Check if data is ready - error = _scd->getDataReadyFlag(isDataReady); + error = _scd->getDataReadyStatus(isDataReady); if (error || !isDataReady) return false; From b91a38752a22b5184311c1da55997c2a84f82f56 Mon Sep 17 00:00:00 2001 From: tyeth Date: Fri, 31 Jan 2025 15:57:41 +0000 Subject: [PATCH 6/6] clang format ifdefs --- src/network_interfaces/Wippersnapper_ESP32.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/network_interfaces/Wippersnapper_ESP32.h b/src/network_interfaces/Wippersnapper_ESP32.h index 6d70ecc5d..81c87995c 100644 --- a/src/network_interfaces/Wippersnapper_ESP32.h +++ b/src/network_interfaces/Wippersnapper_ESP32.h @@ -106,9 +106,10 @@ class Wippersnapper_ESP32 : public Wippersnapper { // For boards with a "3D Antenna", we need to reduce the TX power // to prevent flaky operation. // NOTE: This is a known issue with the QT Py series of boards. -#if defined(ARDUINO_ADAFRUIT_QTPY_ESP32S2) || \ - defined(ARDUINO_ADAFRUIT_QTPY_ESP32S3_NOPSRAM) || \ - defined(ARDUINO_ADAFRUIT_QTPY_ESP32S3_N4R2) || defined(ARDUINO_ADAFRUIT_QTPY_ESP32C3) || \ +#if defined(ARDUINO_ADAFRUIT_QTPY_ESP32S2) || \ + defined(ARDUINO_ADAFRUIT_QTPY_ESP32S3_NOPSRAM) || \ + defined(ARDUINO_ADAFRUIT_QTPY_ESP32S3_N4R2) || \ + defined(ARDUINO_ADAFRUIT_QTPY_ESP32C3) || \ defined(ARDUINO_ADAFRUIT_QTPY_ESP32_PICO) WiFi.setTxPower(WIFI_POWER_15dBm); #endif