From 917d656f2a0b1aa87fb713fef79de2f5413a11f5 Mon Sep 17 00:00:00 2001 From: lfierz Date: Tue, 21 May 2024 15:07:40 +0200 Subject: [PATCH 1/3] Fix sample size for T_RH_CO2_ALT fixes issue #36 for arduino-gadget-ble describing gaps in downloaded data on MyAmbience, which was due to mismatch of sample size defined in this lib and MyAmbience sample size of 8 bytes for T_RH_CO2_ALT complies with Sample Type 7 in specification on https://github.com/Sensirion/arduino-ble-gadget/blob/master/documents/00-Sensirion_BLE_communication_protocol.pdf --- src/BLEProtocol.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/BLEProtocol.cpp b/src/BLEProtocol.cpp index 2535eb5..ca73573 100644 --- a/src/BLEProtocol.cpp +++ b/src/BLEProtocol.cpp @@ -83,7 +83,7 @@ std::map sampleConfigSelector = { {.dataType = DataType::T_RH_CO2_ALT, .downloadType = 7, .sampleType = 8, - .sampleSizeBytes = 6, // ALT is not being sent + .sampleSizeBytes = 8, .sampleCountPerPacket = 2, .sensirionAdvertisementSampleType = 0, .sampleSlots = {{SignalType::TEMPERATURE_DEGREES_CELSIUS, @@ -100,7 +100,9 @@ std::map sampleConfigSelector = { {.signalType = SignalType::CO2_PARTS_PER_MILLION, .offset = 4, .encodingFunction = &encodeSimple, - .decodingFunction = &decodeSimple}}}}}, + .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 e679f2b4122db7c7ea3747bdc3c4af0d9e91675a Mon Sep 17 00:00:00 2001 From: lfierz Date: Tue, 21 May 2024 15:14:48 +0200 Subject: [PATCH 2/3] bump to version 0.3.1 --- CHANGELOG.md | 6 ++++++ library.properties | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a3e11d..108aaea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased + +### Fixed +- Sample size for type RH_CO2_ALT resp Sample type 2 changed from 6 to 8 Bytes as specified in + https://github.com/Sensirion/arduino-ble-gadget/blob/master/documents/00-Sensirion_BLE_communication_protocol.pdf + ## [0.3.0] - Breaking Changes ### Added diff --git a/library.properties b/library.properties index a4f4423..4334cd8 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=Sensirion UPT Core -version=0.3.0 +version=0.3.1 author=Jonas Stolle, Maximilian Paulsen maintainer=Sensirion AG sentence=Library for definitions and configurations used by other Sensirion Unified Prototyping Toolkit (UPT) libraries. From 9870915def17b5f52587e010b940af7a51190a0e Mon Sep 17 00:00:00 2001 From: lfierz Date: Tue, 21 May 2024 15:33:02 +0200 Subject: [PATCH 3/3] prepare bugfix 0.3.1 --- CHANGELOG.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 108aaea..2a1909a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +## [0.3.1] - 2024-05-21 + ### Fixed - Sample size for type RH_CO2_ALT resp Sample type 2 changed from 6 to 8 Bytes as specified in https://github.com/Sensirion/arduino-ble-gadget/blob/master/documents/00-Sensirion_BLE_communication_protocol.pdf @@ -75,3 +77,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Sensirion BLE Protocol - SignalType with matching String methods + + +[Unreleased]: https://github.com/sensirion/arduino-upt-core/compare/v0.3.1...HEAD +[0.3.1]: https://github.com/sensirion/arduino-upt-core/compare/v0.3.0...v0.3.1 +[0.3.0]: https://github.com/sensirion/arduino-upt-core/compare/v0.2.0...v0.3.0 +[0.2.0]: https://github.com/sensirion/arduino-upt-core/compare/v0.1.5...v0.2.0 +[0.1.5]: https://github.com/sensirion/arduino-upt-core/compare/v0.1.4...v0.1.5 +[0.1.4]: https://github.com/sensirion/arduino-upt-core/compare/v0.1.3...v0.1.4 +[0.1.3]: https://github.com/sensirion/arduino-upt-core/compare/v0.1.2...v0.1.3 +[0.1.2]: https://github.com/sensirion/arduino-upt-core/compare/v0.1.1...v0.1.2 +[0.1.1]: https://github.com/sensirion/arduino-upt-core/compare/v0.1.0...v0.1.1 +[0.1.0]: https://github.com/sensirion/arduino-upt-core/releases/tag/v0.1.0