summaryrefslogtreecommitdiff
path: root/src/driver
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2024-01-17 18:25:26 +0100
committerBirte Kristina Friesel <derf@finalrewind.org>2024-01-17 18:25:26 +0100
commitfe969749996bd31024068ea25d22b1a98e71dbfe (patch)
treefdd51fe5cdf3b0513eaf66179e2b18653029d453 /src/driver
parent7f1f4aeee136c006ae16f4207eb7589af80e9d31 (diff)
CCS811 setEnv: "0" means -25°c, so we have to pass temp+25, not temp-25
Diffstat (limited to 'src/driver')
-rw-r--r--src/driver/ccs811.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/driver/ccs811.cc b/src/driver/ccs811.cc
index cd8956c..77e3f8f 100644
--- a/src/driver/ccs811.cc
+++ b/src/driver/ccs811.cc
@@ -63,7 +63,7 @@ void CCS811::setEnv(unsigned char humi, unsigned char humi_fraction, unsigned ch
void CCS811::setEnv(float humi, float temp)
{
- setEnv(humi * 2, 0, (temp - 25) * 2, 0);
+ setEnv(humi * 2, 0, (temp + 25) * 2, 0);
}
unsigned char CCS811::getStatus()