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. 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, 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;