diff options
author | Geunsun, Lee <gs86.lee@samsung.com> | 2017-09-07 17:32:09 +0900 |
---|---|---|
committer | Geunsun, Lee <gs86.lee@samsung.com> | 2017-09-07 17:32:09 +0900 |
commit | f522f8534c05c53e7687933bf89d11a2140ab3bf (patch) | |
tree | 1e3470284ee7be77206d4f61e694b99c0272241a /src | |
parent | 3ad64ccef38f2a97892fc77096eacef5c445d1a4 (diff) | |
download | rcc-f522f8534c05c53e7687933bf89d11a2140ab3bf.tar.gz rcc-f522f8534c05c53e7687933bf89d11a2140ab3bf.tar.bz2 rcc-f522f8534c05c53e7687933bf89d11a2140ab3bf.zip |
Reverse the out value of the gas sensor
Change-Id: I02fa0b591ff320aca92df5da2cf878c4c9d42ea0
Diffstat (limited to 'src')
-rw-r--r-- | src/resource/resource_gas_detection_sensor.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/resource/resource_gas_detection_sensor.c b/src/resource/resource_gas_detection_sensor.c index ae7a97b..97c283c 100644 --- 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; } |