From fe969749996bd31024068ea25d22b1a98e71dbfe Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Wed, 17 Jan 2024 18:25:26 +0100 Subject: CCS811 setEnv: "0" means -25°c, so we have to pass temp+25, not temp-25 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/driver/ccs811.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/driver') 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() -- cgit v1.2.3