Changed
- Updated the buffer size in "get_calib_data" API - Updated the set/get gas profile duration logic
This commit is contained in:
parent
94fd057adf
commit
494b3bb26b
@ -7,9 +7,9 @@ The sensor driver package includes bme680.h, bme680.c and bme680_defs.h files
|
||||
## Version
|
||||
File | Version | Date
|
||||
--------------|---------|-------------
|
||||
bme680.c | 3.5.3 | 30 Oct 2017
|
||||
bme680.h | 3.5.3 | 30 Oct 2017
|
||||
bme680_defs.h | 3.5.3 | 30 Oct 2017
|
||||
bme680.c | 3.5.5 | 20 Nov 2017
|
||||
bme680.h | 3.5.5 | 20 Nov 2017
|
||||
bme680_defs.h | 3.5.5 | 20 Nov 2017
|
||||
|
||||
## Integration details
|
||||
* Integrate bme680.h, bme680_defs.h and bme680.c file in to your project.
|
||||
|
20
bme680.c
20
bme680.c
@ -40,8 +40,8 @@
|
||||
* patent rights of the copyright holder.
|
||||
*
|
||||
* File bme680.c
|
||||
* @date 30 Oct 2017
|
||||
* @version 3.5.3
|
||||
* @date 20 Nov 2017
|
||||
* @version 3.5.5
|
||||
*
|
||||
*/
|
||||
|
||||
@ -596,9 +596,15 @@ int8_t bme680_get_sensor_mode(struct bme680_dev *dev)
|
||||
void bme680_set_profile_dur(uint16_t duration, struct bme680_dev *dev)
|
||||
{
|
||||
uint32_t tph_dur; /* Calculate in us */
|
||||
uint32_t meas_cycles;
|
||||
uint8_t os_to_meas_cycles[6] = {0, 1, 2, 4, 8, 16};
|
||||
|
||||
meas_cycles = os_to_meas_cycles[dev->tph_sett.os_temp];
|
||||
meas_cycles += os_to_meas_cycles[dev->tph_sett.os_pres];
|
||||
meas_cycles += os_to_meas_cycles[dev->tph_sett.os_hum];
|
||||
|
||||
/* TPH measurement duration */
|
||||
tph_dur = ((uint32_t) (dev->tph_sett.os_temp + dev->tph_sett.os_pres + dev->tph_sett.os_hum) * UINT32_C(1963));
|
||||
tph_dur = meas_cycles * UINT32_C(1963);
|
||||
tph_dur += UINT32_C(477 * 4); /* TPH switching duration */
|
||||
tph_dur += UINT32_C(477 * 5); /* Gas measurement duration */
|
||||
tph_dur += UINT32_C(500); /* Get it to the closest whole number.*/
|
||||
@ -615,9 +621,15 @@ void bme680_set_profile_dur(uint16_t duration, struct bme680_dev *dev)
|
||||
void bme680_get_profile_dur(uint16_t *duration, const struct bme680_dev *dev)
|
||||
{
|
||||
uint32_t tph_dur; /* Calculate in us */
|
||||
uint32_t meas_cycles;
|
||||
uint8_t os_to_meas_cycles[6] = {0, 1, 2, 4, 8, 16};
|
||||
|
||||
meas_cycles = os_to_meas_cycles[dev->tph_sett.os_temp];
|
||||
meas_cycles += os_to_meas_cycles[dev->tph_sett.os_pres];
|
||||
meas_cycles += os_to_meas_cycles[dev->tph_sett.os_hum];
|
||||
|
||||
/* TPH measurement duration */
|
||||
tph_dur = ((uint32_t) (dev->tph_sett.os_temp + dev->tph_sett.os_pres + dev->tph_sett.os_hum) * UINT32_C(1963));
|
||||
tph_dur = meas_cycles * UINT32_C(1963);
|
||||
tph_dur += UINT32_C(477 * 4); /* TPH switching duration */
|
||||
tph_dur += UINT32_C(477 * 5); /* Gas measurement duration */
|
||||
tph_dur += UINT32_C(500); /* Get it to the closest whole number.*/
|
||||
|
4
bme680.h
4
bme680.h
@ -40,8 +40,8 @@
|
||||
* patent rights of the copyright holder.
|
||||
*
|
||||
* @file bme680.h
|
||||
* @date 30 Oct 2017
|
||||
* @version 3.5.3
|
||||
* @date 20 Nov 2017
|
||||
* @version 3.5.5
|
||||
* @brief
|
||||
*
|
||||
*/
|
||||
|
@ -39,9 +39,9 @@
|
||||
* No license is granted by implication or otherwise under any patent or
|
||||
* patent rights of the copyright holder.
|
||||
*
|
||||
* @file bme680_defs.h
|
||||
* @date 30 Oct 2017
|
||||
* @version 3.5.3
|
||||
* @file bme680_defs.h
|
||||
* @date 20 Nov 2017
|
||||
* @version 3.5.5
|
||||
* @brief
|
||||
*
|
||||
*/
|
||||
@ -111,7 +111,7 @@
|
||||
#define BME680_CHIP_ID UINT8_C(0x61)
|
||||
|
||||
/** BME680 coefficients related defines */
|
||||
#define BME680_COEFF_SIZE UINT8_C(0x41)
|
||||
#define BME680_COEFF_SIZE UINT8_C(41)
|
||||
#define BME680_COEFF_ADDR1_LEN UINT8_C(25)
|
||||
#define BME680_COEFF_ADDR2_LEN UINT8_C(16)
|
||||
|
||||
|
14
changelog.md
14
changelog.md
@ -1,5 +1,14 @@
|
||||
# Change Log
|
||||
All notable changes to the BME680 Sensor API will be documented in this file.
|
||||
|
||||
## v3.5.5, 20 Nov 2017
|
||||
### Changed
|
||||
- Updated the buffer size in "get_calib_data" API
|
||||
|
||||
## v3.5.4, 16 Nov 2017
|
||||
### Changed
|
||||
- Updated the set/get gas profile duration logic
|
||||
|
||||
## v3.5.3, 30 Oct 2017
|
||||
### Changed
|
||||
- Changed the compensation equation formulae to use shifting operation
|
||||
@ -21,14 +30,12 @@ All notable changes to the BME680 Sensor API will be documented in this file.
|
||||
- Updated documentation for the type definitions
|
||||
- Removed mode check for get sensor data and setting and getting profile dur
|
||||
|
||||
|
||||
## v3.5.0, 28 Jun 2017
|
||||
### Changed
|
||||
- Fixed bug with getting and setting mem pages
|
||||
- Changed initialization sequence to be more robust
|
||||
- Added additional tries while reading data in case of inadequate delay
|
||||
|
||||
|
||||
## v3.4.0, 8 Jun 2017
|
||||
### Changed
|
||||
- Modified the bme680_get_sensor_data API. User has to now pass the struct that stores the data rather than retrieving from the bme680_dev structure.
|
||||
@ -47,5 +54,4 @@ All notable changes to the BME680 Sensor API will be documented in this file.
|
||||
|
||||
## v3.2.1, 17 May 2017
|
||||
### Added
|
||||
- Took the reference as base version 3.2.1 of BME680 sensor and added.
|
||||
|
||||
- Took the reference as base version 3.2.1 of BME680 sensor and added.
|
Loading…
Reference in New Issue
Block a user