From 93c7cf9a8fa88928dc23b47c6ec0c9a18bd14e8b Mon Sep 17 00:00:00 2001 From: Pascal Sachs Date: Wed, 19 Jun 2024 12:29:22 +0200 Subject: [PATCH 1/3] Add missing string import to headers Add string import to BLEProtocol and Measurement header that are defining strings in their API. --- src/BLEProtocol.h | 1 + src/Measurement.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/BLEProtocol.h b/src/BLEProtocol.h index 4063596..76652fc 100644 --- a/src/BLEProtocol.h +++ b/src/BLEProtocol.h @@ -4,6 +4,7 @@ #include "Arduino.h" #include "SignalType.h" #include +#include /** * Refer to diff --git a/src/Measurement.h b/src/Measurement.h index 168967a..eae09e4 100644 --- a/src/Measurement.h +++ b/src/Measurement.h @@ -5,6 +5,7 @@ #include "SensorType.h" #include "SignalType.h" #include +#include struct DataPoint { unsigned long t_offset = 0; From 5fa98fd375f5e0d98db6956ce2c3f991237026f2 Mon Sep 17 00:00:00 2001 From: Pascal Sachs Date: Wed, 19 Jun 2024 12:30:07 +0200 Subject: [PATCH 2/3] Fix formatting in BLEProtocol.cpp --- src/BLEProtocol.cpp | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/src/BLEProtocol.cpp b/src/BLEProtocol.cpp index ca73573..e4bbe3a 100644 --- a/src/BLEProtocol.cpp +++ b/src/BLEProtocol.cpp @@ -83,26 +83,29 @@ std::map sampleConfigSelector = { {.dataType = DataType::T_RH_CO2_ALT, .downloadType = 7, .sampleType = 8, - .sampleSizeBytes = 8, + .sampleSizeBytes = 8, .sampleCountPerPacket = 2, .sensirionAdvertisementSampleType = 0, - .sampleSlots = {{SignalType::TEMPERATURE_DEGREES_CELSIUS, - {.signalType = SignalType::TEMPERATURE_DEGREES_CELSIUS, - .offset = 0, - .encodingFunction = &encodeTemperatureV1, - .decodingFunction = &decodeTemperatureV1}}, - {SignalType::RELATIVE_HUMIDITY_PERCENTAGE, - {.signalType = SignalType::RELATIVE_HUMIDITY_PERCENTAGE, - .offset = 2, - .encodingFunction = &encodeHumidityV1, - .decodingFunction = &decodeHumidityV1}}, - {SignalType::CO2_PARTS_PER_MILLION, - {.signalType = SignalType::CO2_PARTS_PER_MILLION, - .offset = 4, - .encodingFunction = &encodeSimple, - .decodingFunction = &decodeSimple}} - // 2 Bytes reserved (ALT), not used, but bytes must be sent for proper decoding of samples - }}}, + .sampleSlots = + { + {SignalType::TEMPERATURE_DEGREES_CELSIUS, + {.signalType = SignalType::TEMPERATURE_DEGREES_CELSIUS, + .offset = 0, + .encodingFunction = &encodeTemperatureV1, + .decodingFunction = &decodeTemperatureV1}}, + {SignalType::RELATIVE_HUMIDITY_PERCENTAGE, + {.signalType = SignalType::RELATIVE_HUMIDITY_PERCENTAGE, + .offset = 2, + .encodingFunction = &encodeHumidityV1, + .decodingFunction = &decodeHumidityV1}}, + {SignalType::CO2_PARTS_PER_MILLION, + {.signalType = SignalType::CO2_PARTS_PER_MILLION, + .offset = 4, + .encodingFunction = &encodeSimple, + .decodingFunction = &decodeSimple}} + // 2 Bytes reserved (ALT), not used, but bytes must be sent for + // proper decoding of samples + }}}, {T_RH_CO2_PM25, {.dataType = DataType::T_RH_CO2_PM25, .downloadType = 11, From 9046606d80f586ad62bde3b6d5d34d6873118ef5 Mon Sep 17 00:00:00 2001 From: Pascal Sachs Date: Wed, 19 Jun 2024 12:31:43 +0200 Subject: [PATCH 3/3] Bump version for 0.3.2 release Update version and changelog for bugfix release. --- CHANGELOG.md | 5 +++++ library.properties | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a1909a..90d547b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +## [0.3.2] - 2024-06-19 + +### Fixed +- Add missing string import to BLEProtocol.h and Measurement.h + ## [0.3.1] - 2024-05-21 ### Fixed diff --git a/library.properties b/library.properties index 4334cd8..fd4b4d7 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=Sensirion UPT Core -version=0.3.1 +version=0.3.2 author=Jonas Stolle, Maximilian Paulsen maintainer=Sensirion AG sentence=Library for definitions and configurations used by other Sensirion Unified Prototyping Toolkit (UPT) libraries.