Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing string import #10

Merged
merged 3 commits into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading