projects
/
apps
/
native
/
st-things-co2-meter.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
342df53
)
add more logs
author
Jeonghoon Park
<jh1979.park@samsung.com>
Mon, 27 Aug 2018 10:52:51 +0000
(19:52 +0900)
committer
Jeonghoon Park
<jh1979.park@samsung.com>
Mon, 27 Aug 2018 10:52:51 +0000
(19:52 +0900)
src/co2-sensor.c
patch
|
blob
|
history
diff --git
a/src/co2-sensor.c
b/src/co2-sensor.c
index
5c58667
..
dba015a
100644
(file)
--- 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;