Skip to content

Commit f3b4106

Browse files
committed
Merge branch 'rht_conversion_fix' into 'master'
fixed the RH/T conversion constant See merge request MSO-SW/drivers/raspberry-pi/raspberry-pi-i2c-scd4x!14
2 parents efe1719 + 64735d9 commit f3b4106

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## Unreleased
9+
10+
### Fixed
11+
- Fixed the RH/T conversion constant
812

913
## [0.2.2] - 2021-04-30
1014

scd4x_i2c.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ int16_t scd4x_read_measurement(uint16_t* co2, float* temperature_deg_c,
9191
if (error) {
9292
return error;
9393
}
94-
*temperature_deg_c = (float)temperature * 175.0f / 65536.0f - 45.0f;
95-
*humidity_percent_rh = (float)humidity * 100.0f / 65536.0f;
94+
*temperature_deg_c = (float)temperature * 175.0f / 65535.0f - 45.0f;
95+
*humidity_percent_rh = (float)humidity * 100.0f / 65535.0f;
9696
return NO_ERROR;
9797
}
9898

0 commit comments

Comments
 (0)