Skip to content

Commit

Permalink
Merge pull request #10 from Sensirion/fix-missing-string-import
Browse files Browse the repository at this point in the history
Fix missing string import
  • Loading branch information
psachs authored Jun 19, 2024
2 parents cce91ed + 9046606 commit 58955ac
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 19 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
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.1
version=0.3.2
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
39 changes: 21 additions & 18 deletions src/BLEProtocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,26 +83,29 @@ std::map<DataType, SampleConfig> 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,
Expand Down
1 change: 1 addition & 0 deletions src/BLEProtocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include "Arduino.h"
#include "SignalType.h"
#include <map>
#include <string>

/**
* Refer to
Expand Down
1 change: 1 addition & 0 deletions src/Measurement.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "SensorType.h"
#include "SignalType.h"
#include <Arduino.h>
#include <string>

struct DataPoint {
unsigned long t_offset = 0;
Expand Down

0 comments on commit 58955ac

Please sign in to comment.