Skip to content

Commit

Permalink
Merge pull request #9 from Sensirion/fix_rh_co2_alt_sample_size
Browse files Browse the repository at this point in the history
Fix RH_CO2_ALT sample size
  • Loading branch information
LeonieFierz authored May 21, 2024
2 parents e8d47ab + 9870915 commit cce91ed
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 3 deletions.
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ 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

## [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

## [0.3.0] - Breaking Changes

### Added
Expand Down Expand Up @@ -69,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
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=Sensirion UPT Core
version=0.3.0
version=0.3.1
author=Jonas Stolle, Maximilian Paulsen
maintainer=Sensirion AG <sensirion.com>
sentence=Library for definitions and configurations used by other Sensirion Unified Prototyping Toolkit (UPT) libraries.
Expand Down
6 changes: 4 additions & 2 deletions src/BLEProtocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ std::map<DataType, SampleConfig> 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,
Expand All @@ -100,7 +100,9 @@ std::map<DataType, SampleConfig> 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,
Expand Down

0 comments on commit cce91ed

Please sign in to comment.