Skip to content

Commit b885583

Browse files
BST-Github-Adminkegov
authored andcommitted
Revised versioning. Updated BSEC library to v1.4.7.4. Added idleTask parameter to BSEC::begin. Added support to include multiple configurations.
1 parent b52445e commit b885583

25 files changed

Lines changed: 57 additions & 52 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## About BSEC
44

5-
Bosch Sensortec Environmental Cluster (BSEC) Software v1.4.7.3 released on April 10th, 2019
5+
Bosch Sensortec Environmental Cluster (BSEC) Software v1.4.7.4 released on July 3rd, 2019
66

77
The BSEC fusion library has been conceptualized to provide a higher-level signal processing and fusion for the BME680. The library receives compensated sensor values from the sensor API. It processes the BME680 signals to provide the requested sensor outputs.
88

examples/basic_config_state/basic_config_state.ino

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,21 @@
11
#include <EEPROM.h>
22
#include "bsec.h"
3-
#include "bsec_serialized_configurations_iaq.h"
3+
/* Configure the BSEC library with information about the sensor
4+
* 18v/33v = Voltage at Vdd. 1.8V or 3.3V
5+
* 3s/300s = BSEC operating mode, BSEC_SAMPLE_RATE_LP or BSEC_SAMPLE_RATE_ULP
6+
* 4d/28d = Operating age of the sensor in days
7+
* generic_18v_3s_4d
8+
* generic_18v_3s_28d
9+
* generic_18v_300s_4d
10+
* generic_18v_300s_28d
11+
* generic_33v_3s_4d
12+
* generic_33v_3s_28d
13+
* generic_33v_300s_4d
14+
* generic_33v_300s_28d
15+
*/
16+
const uint8_t bsec_config_iaq[] = {
17+
#include "config/generic_33v_3s_4d/bsec_iaq.txt"
18+
};
419

520
#define STATE_SAVE_PERIOD UINT32_C(360 * 60 * 1000) // 360 minutes - 4 times a day
621

examples/basic_config_state/bsec_serialized_configurations_iaq.c

Lines changed: 0 additions & 5 deletions
This file was deleted.

examples/basic_config_state/bsec_serialized_configurations_iaq.h

Lines changed: 0 additions & 4 deletions
This file was deleted.

examples/basic_config_state_ulp_plus/basic_config_state_ulp_plus.ino

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,21 @@
11
#include <EEPROM.h>
22
#include "bsec.h"
3-
#include "bsec_serialized_configurations_iaq.h"
3+
/* Configure the BSEC library with information about the sensor
4+
* 18v/33v = Voltage at Vdd. 1.8V or 3.3V
5+
* 3s/300s = BSEC operating mode, BSEC_SAMPLE_RATE_LP or BSEC_SAMPLE_RATE_ULP
6+
* 4d/28d = Operating age of the sensor in days
7+
* generic_18v_3s_4d
8+
* generic_18v_3s_28d
9+
* generic_18v_300s_4d
10+
* generic_18v_300s_28d
11+
* generic_33v_3s_4d
12+
* generic_33v_3s_28d
13+
* generic_33v_300s_4d
14+
* generic_33v_300s_28d
15+
*/
16+
const uint8_t bsec_config_iaq[] = {
17+
#include "config/generic_33v_3s_4d/bsec_iaq.txt"
18+
};
419

520
#define STATE_SAVE_PERIOD UINT32_C(360 * 60 * 1000) // 360 minutes - 4 times a day
621

@@ -185,7 +200,7 @@ void ulp_plus_button_press()
185200
*/
186201
Serial.println("Triggering ULP plus.");
187202
bsec_virtual_sensor_t sensorList[1] = {
188-
BSEC_OUTPUT_IAQ_ESTIMATE,
203+
BSEC_OUTPUT_IAQ,
189204
};
190205

191206
iaqSensor.updateSubscription(sensorList, 1, BSEC_SAMPLE_RATE_ULP_MEASUREMENT_ON_DEMAND);

examples/basic_config_state_ulp_plus/bsec_serialized_configurations_iaq.c

Lines changed: 0 additions & 5 deletions
This file was deleted.

examples/basic_config_state_ulp_plus/bsec_serialized_configurations_iaq.h

Lines changed: 0 additions & 4 deletions
This file was deleted.

library.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
name=BSEC Software Library
2-
version=1.4.703
2+
version=1.2.1474
33
author=Bosch Sensortec
44
maintainer=Bosch Sensortec <contact@bosch-sensortec.com>
55
sentence=Bosch Sensortec Environmental Cluster (BSEC) Software library
66
url=https://www.bosch-sensortec.com/en/bst/products/all_products/bsec
77
paragraph= for use with the BME680 has been conceptualized to provide higher-level signal processing and fusion for the BME680. The library receives compensated sensor values from the sensor API. It processes the BME680 signals to provide the requested sensor outputs.
88
category=Sensors
9-
architectures=samd,sam,esp8266,nrf52,esp32
9+
architectures=samd,sam,esp8266,nrf52,esp32,avr
1010
includes=bsec.h
1111
precompiled=true
1212
ldflags=-lalgobsec

src/atmega2560/libalgobsec.a

740 Bytes
Binary file not shown.

src/bsec.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@
4040
* patent rights of the copyright holder.
4141
*
4242
* @file bsec.cpp
43-
* @date 20 May 2019
44-
* @version 1.1
43+
* @date 25 July 2019
44+
* @version 1.2.1474
4545
*
4646
*/
4747

@@ -88,13 +88,13 @@ void Bsec::begin(uint8_t devId, enum bme680_intf intf, bme680_com_fptr_t read, b
8888
/**
8989
* @brief Function to initialize the BSEC library and the BME680 sensor
9090
*/
91-
void Bsec::begin(uint8_t i2cAddr, TwoWire &i2c)
91+
void Bsec::begin(uint8_t i2cAddr, TwoWire &i2c, bme680_delay_fptr_t idleTask)
9292
{
9393
_bme680.dev_id = i2cAddr;
9494
_bme680.intf = BME680_I2C_INTF;
9595
_bme680.read = Bsec::i2cRead;
9696
_bme680.write = Bsec::i2cWrite;
97-
_bme680.delay_ms = Bsec::delay_ms;
97+
_bme680.delay_ms = idleTask;
9898
_bme680.amb_temp = 25;
9999
_bme680.power_mode = BME680_FORCED_MODE;
100100

@@ -106,13 +106,13 @@ void Bsec::begin(uint8_t i2cAddr, TwoWire &i2c)
106106
/**
107107
* @brief Function to initialize the BSEC library and the BME680 sensor
108108
*/
109-
void Bsec::begin(uint8_t chipSelect, SPIClass &spi)
109+
void Bsec::begin(uint8_t chipSelect, SPIClass &spi, bme680_delay_fptr_t idleTask)
110110
{
111111
_bme680.dev_id = chipSelect;
112112
_bme680.intf = BME680_SPI_INTF;
113113
_bme680.read = Bsec::spiTransfer;
114114
_bme680.write = Bsec::spiTransfer;
115-
_bme680.delay_ms = Bsec::delay_ms;
115+
_bme680.delay_ms = idleTask;
116116
_bme680.amb_temp = 25;
117117
_bme680.power_mode = BME680_FORCED_MODE;
118118

@@ -189,9 +189,9 @@ bool Bsec::run(void)
189189
uint16_t meas_dur = 0;
190190

191191
bme680_get_profile_dur(&meas_dur, &_bme680);
192-
delay_ms(meas_dur);
192+
_bme680.delay_ms(meas_dur);
193193

194-
newData = readProcessData(callTimeNs, bme680Settings);
194+
newData = readProcessData(callTimeNs + (meas_dur * INT64_C(1000000)), bme680Settings);
195195
}
196196

197197
return newData;

0 commit comments

Comments
 (0)