From d275e7be397f8db464b9f0f652f48756eec3672a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Lundberg?= Date: Sun, 24 Oct 2021 15:22:18 +0200 Subject: [PATCH] Update bsec.cpp The ULP_LP examples just doesn't work. Minhwan found that omitting bsec_init in run() made the example work better. I found that omitting zeroOutputs in processOutput() made the VOC parts not going to zero. Having no insight in the BSEC library source code I don't know if this is the correct solution but ULP_LP is not working as is... --- src/bsec.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bsec.cpp b/src/bsec.cpp index 6e673c4..b188808 100644 --- a/src/bsec.cpp +++ b/src/bsec.cpp @@ -199,7 +199,7 @@ bool Bsec::run(int64_t timeMilliseconds) if (callTimeMs >= nextCall) { - bsec_init(); + // bsec_init(); if (validBsecState) { @@ -388,7 +388,7 @@ bool Bsec::readProcessData(int64_t currTimeNs, bsec_bme_settings_t bme680Setting return false; } - zeroOutputs(); + // zeroOutputs(); if (nOutputs > 0) { @@ -613,4 +613,4 @@ int8_t Bsec::spiTransfer(uint8_t devId, uint8_t regAddr, uint8_t *regData, uint1 } return rslt; -} \ No newline at end of file +}