From 82c057ef38de487b4e2853fcd1f54f3ec5827d1d Mon Sep 17 00:00:00 2001 From: G6EJD Date: Thu, 25 Oct 2018 11:55:34 +0100 Subject: [PATCH] Update ESP32_bme680_CC_demo_02.ino --- ESP32_bme680_CC_demo_02.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ESP32_bme680_CC_demo_02.ino b/ESP32_bme680_CC_demo_02.ino index 89d9b6a..7d6d8ab 100644 --- a/ESP32_bme680_CC_demo_02.ino +++ b/ESP32_bme680_CC_demo_02.ino @@ -111,8 +111,8 @@ void loop() { } //Calculate gas contribution to IAQ index - int gas_lower_limit = 5000; // Bad air quality limit - int gas_upper_limit = 50000; // Good air quality limit + float gas_lower_limit = 5000; // Bad air quality limit + float gas_upper_limit = 50000; // Good air quality limit   if (gas_reference > gas_upper_limit) gas_reference = gas_upper_limit;  if (gas_reference < gas_lower_limit) gas_reference = gas_lower_limit; gas_score = (0.75/(gas_upper_limit-gas_lower_limit)*gas_reference -(gas_lower_limit*(0.75/(gas_upper_limit-gas_lower_limit))))*100;