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

Added Farenheit unit for temperature signals #13

Merged
merged 2 commits into from
Sep 9, 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.5.0] - 2024-09-09

### Added
- Added Farenheit unit

## [0.4.0] - 2024-07-25

### Added
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.4.0
version=0.5.0
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
1 change: 1 addition & 0 deletions src/Measurement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ void printMeasurementWithoutMetaData(const Measurement &measurement) {
Serial.printf(" Value:\t\t");
switch (measurement.signalType) {
case SignalType::TEMPERATURE_DEGREES_CELSIUS:
case SignalType::TEMPERATURE_DEGREES_FARENHEIT:
case SignalType::RELATIVE_HUMIDITY_PERCENTAGE:
case SignalType::VELOCITY_METERS_PER_SECOND:
Serial.printf("%.1f\n", measurement.dataPoint.value);
Expand Down
3 changes: 3 additions & 0 deletions src/SignalType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ const char *unitOf(SignalType signalType) {
switch (signalType) {
case SignalType::TEMPERATURE_DEGREES_CELSIUS:
return "degC";
case SignalType::TEMPERATURE_DEGREES_FARENHEIT:
return "degF";
case SignalType::RELATIVE_HUMIDITY_PERCENTAGE:
return "%";
case SignalType::CO2_PARTS_PER_MILLION:
Expand Down Expand Up @@ -38,6 +40,7 @@ const char *unitOf(SignalType signalType) {
const char *quantityOf(SignalType signalType) {
switch (signalType) {
case SignalType::TEMPERATURE_DEGREES_CELSIUS:
case SignalType::TEMPERATURE_DEGREES_FARENHEIT:
return "T";
case SignalType::RELATIVE_HUMIDITY_PERCENTAGE:
return "RH";
Expand Down
1 change: 1 addition & 0 deletions src/SignalType.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
enum class SignalType {
UNDEFINED,
TEMPERATURE_DEGREES_CELSIUS,
TEMPERATURE_DEGREES_FARENHEIT,
RELATIVE_HUMIDITY_PERCENTAGE,
CO2_PARTS_PER_MILLION,
HCHO_PARTS_PER_BILLION,
Expand Down
Loading