From 1bfb582a348f18e8565bbfcd4562ed3fed472c6d Mon Sep 17 00:00:00 2001 From: Jeonghoon Park Date: Mon, 27 Aug 2018 19:52:51 +0900 Subject: add more logs --- src/co2-sensor.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/co2-sensor.c b/src/co2-sensor.c index 5c58667..dba015a 100644 --- a/src/co2-sensor.c +++ b/src/co2-sensor.c @@ -117,8 +117,10 @@ unsigned int co2_sensor_voltage_to_ppm(double voltage) return 400; ppm = pow(10, (voltage - co2_zp_volt)/slope_value + log400); -// if (ppm > 10000) -// ppm = 10000; + if (ppm > 10000) { + _W("ppm value[%lf] is too large - limiting to 10000ppm", ppm); + ppm = 10000; + } #endif /* USE_EXAMPLE_CODE */ return (unsigned int)ppm; -- cgit v1.2.3