Skip to content
Permalink
Browse files

Merge pull request #39 from cyberman54/patch-1

Update bsec.cpp for compatibilty with BSEC v1.4.7.1
  • Loading branch information...
BoschSensortec committed Feb 4, 2019
2 parents 0255bd1 + c165600 commit e9a10fe23739bb95650d2ab89ed37764a4ba3caf
Showing with 11 additions and 3 deletions.
  1. +11 −3 src/bsec.cpp
@@ -255,7 +255,11 @@ bool Bsec::readProcessData(int64_t currTimeNs, bsec_bme_settings_t bme680Setting
if (_data.status & BME680_NEW_DATA_MSK) {
if (bme680Settings.process_data & BSEC_PROCESS_TEMPERATURE) {
inputs[nInputs].sensor_id = BSEC_INPUT_TEMPERATURE;
inputs[nInputs].signal = _data.temperature;
#ifdef BME680_FLOAT_POINT_COMPENSATION
inputs[nInputs].signal = _data.temperature;
#else
inputs[nInputs].signal = _data.temperature / 100.0f;
#endif
inputs[nInputs].time_stamp = currTimeNs;
nInputs++;
/* Temperature offset from the real temperature due to external heat sources */
@@ -266,7 +270,11 @@ bool Bsec::readProcessData(int64_t currTimeNs, bsec_bme_settings_t bme680Setting
}
if (bme680Settings.process_data & BSEC_PROCESS_HUMIDITY) {
inputs[nInputs].sensor_id = BSEC_INPUT_HUMIDITY;
inputs[nInputs].signal = _data.humidity;
#ifdef BME680_FLOAT_POINT_COMPENSATION
inputs[nInputs].signal = _data.humidity;
#else
inputs[nInputs].signal = _data.humidity / 1000.0f;
#endif
inputs[nInputs].time_stamp = currTimeNs;
nInputs++;
}
@@ -460,4 +468,4 @@ int8_t Bsec::spiTransfer(uint8_t devId, uint8_t regAddr, uint8_t *regData, uint1
}

return rslt;;
}
}

0 comments on commit e9a10fe

Please sign in to comment.
You can’t perform that action at this time.