projects
/
apps
/
native
/
position-finder-server.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3ad64cc
)
Reverse the out value of the gas sensor
author
Geunsun, Lee
<gs86.lee@samsung.com>
Thu, 7 Sep 2017 08:32:09 +0000
(17:32 +0900)
committer
Geunsun, Lee
<gs86.lee@samsung.com>
Thu, 7 Sep 2017 08:32:09 +0000
(17:32 +0900)
Change-Id: I02fa0b591ff320aca92df5da2cf878c4c9d42ea0
src/resource/resource_gas_detection_sensor.c
patch
|
blob
|
history
diff --git
a/src/resource/resource_gas_detection_sensor.c
b/src/resource/resource_gas_detection_sensor.c
index
ae7a97b
..
97c283c
100644
(file)
--- a/
src/resource/resource_gas_detection_sensor.c
+++ b/
src/resource/resource_gas_detection_sensor.c
@@
-51,8
+51,13
@@
int resource_read_gas_detection_sensor(int pin_num, int *out_value)
resource_get_info(pin_num)->close = resource_close_gas_detection_sensor;
}
+ /**
+ * This model(FC-22) normally outputs 1, and outputs 0 as out_value when a flame is detected.
+ */
ret = peripheral_gpio_read(resource_get_info(pin_num)->sensor_h, out_value);
retv_if(ret < 0, -1);
+ *out_value = !*out_value;
+
return 0;
}