diff options
author | Jeonghoon Park <jh1979.park@samsung.com> | 2018-08-10 13:18:39 +0900 |
---|---|---|
committer | Jeonghoon Park <jh1979.park@samsung.com> | 2018-08-10 13:18:39 +0900 |
commit | fc920bd8ab074107b6b267ffc15f4cb23b477618 (patch) | |
tree | b94be75a356167daff7382261371b8a0226186ab | |
parent | 47df5020c1e77c98413ac22ffca742c2663b4226 (diff) | |
download | st-things-co2-meter-fc920bd8ab074107b6b267ffc15f4cb23b477618.tar.gz st-things-co2-meter-fc920bd8ab074107b6b267ffc15f4cb23b477618.tar.bz2 st-things-co2-meter-fc920bd8ab074107b6b267ffc15f4cb23b477618.zip |
update calculate interval
-rw-r--r-- | src/co2.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -44,7 +44,7 @@ #define SENSOR_THRESHOLD_CO2 (650) #define SENSOR_GATHER_INTERVAL (0.05f) -#define SENSOR_GATHER_COUNT (5) +#define SENSOR_GATHER_COUNT (60) //#define USE_ST_SDK @@ -110,8 +110,7 @@ static Eina_Bool __get_co2(void *data) unsigned int avg = 0; avg = sum/SENSOR_GATHER_COUNT; - _D("co2 avg value - %u", avg); - _D("co2 avg voltage - %.2lfv", co2_sensor_value_to_voltage(avg)); + _D("co2 avg - [%u], [%u ppm]", avg, co2_sensor_value_to_ppm(avg)); sensor_data_set_uint(ad->co2_data, avg); |