From e6b9bbade923d792d9ccd822ab5fada99bf40501 Mon Sep 17 00:00:00 2001 From: Kevin Goveas Date: Thu, 17 May 2018 14:10:12 +0200 Subject: [PATCH] Updated limits for the gas sensor self test. --- Self test/bme680_selftest.c | 9 +++------ Self test/bme680_selftest.h | 4 ++-- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/Self test/bme680_selftest.c b/Self test/bme680_selftest.c index fa2d6be..c64e5f4 100644 --- a/Self test/bme680_selftest.c +++ b/Self test/bme680_selftest.c @@ -40,8 +40,8 @@ * patent rights of the copyright holder. * * File bme680_selftest.c - * @date 10 Oct 2017 - * @version 3.5.2 + * @date 16 May 2018 + * @version 3.5.3 * */ @@ -172,13 +172,10 @@ static int8_t analyze_sensor_data(struct bme680_field_data *data, uint8_t n_meas if (!(data[i].status & BME680_GASM_VALID_MSK)) self_test_failed++; - /* 3 cycles heating are completed(HT1/LT1, HT2/LT2,HT3/LT3) - centroid gas ratio = 2*HT3 / (LT2+LT3) < 0.5*/ - /* Invert formula to get integer values for centroid resistance */ if (n_meas >= 6) cent_res = (data[3].gas_resistance + data[5].gas_resistance) / (2 * data[4].gas_resistance); - if ((cent_res < 2)) /*cent_res^-1 < 0.5 */ + if ((cent_res * 5) < 6) self_test_failed++; if (self_test_failed) diff --git a/Self test/bme680_selftest.h b/Self test/bme680_selftest.h index 21a4f42..7cc4e63 100644 --- a/Self test/bme680_selftest.h +++ b/Self test/bme680_selftest.h @@ -40,8 +40,8 @@ * patent rights of the copyright holder. * * @file bme680_selftest.h - * @date 10 Oct 2017 - * @version 3.5.2 + * @date 16 May 2018 + * @version 3.5.3 * @brief * */