mirror of
https://github.com/boschsensortec/BME280_SensorAPI.git
synced 2024-10-05 20:47:48 -04:00
- Added chapter for Sensor data's units
- humidity_max value updated in "compensate_humidity" API integer version - Removed changelog
This commit is contained in:
parent
18260d616b
commit
958cef65da
27
README.md
27
README.md
@ -7,9 +7,9 @@ The sensor driver package includes bme280.c, bme280.h and bme280_defs.h files.
|
||||
## Version
|
||||
File | Version | Date
|
||||
--------------|---------|------------
|
||||
bme280.c | 3.3.2 | 22 Nov 2017
|
||||
bme280.h | 3.3.2 | 22 Nov 2017
|
||||
bme280_defs.h | 3.3.2 | 22 Nov 2017
|
||||
bme280.c | 3.3.4 | 14 Feb 2018
|
||||
bme280.h | 3.3.4 | 14 Feb 2018
|
||||
bme280_defs.h | 3.3.4 | 14 Feb 2018
|
||||
|
||||
## Integration details
|
||||
* Integrate bme280.h, bme280_defs.h and bme280.c file in to the project.
|
||||
@ -74,6 +74,27 @@ In integer compensation functions, we also have below two implementations for pr
|
||||
By default, 64 bit variant is used in the API. If the user wants 32 bit variant, the user can disable the
|
||||
macro BME280_64BIT_ENABLE in bme280_defs.h file.
|
||||
|
||||
### Sensor data units
|
||||
> The sensor data units depends on the following macros being enabled or not,
|
||||
> (in bme280_defs.h file or as compiler macros)
|
||||
> * BME280_FLOAT_ENABLE
|
||||
> * BME280_64BIT_ENABLE
|
||||
|
||||
In case of the macro "BME280_FLOAT_ENABLE" enabled,
|
||||
The outputs are in double and the units are
|
||||
|
||||
- °C for temperature
|
||||
- % relative humidity
|
||||
- Pascal for pressure
|
||||
|
||||
In case if "BME280_FLOAT_ENABLE" is not enabled, then it is
|
||||
|
||||
- int32_t for temperature with the units 100 * °C
|
||||
- uint32_t for humidity with the units 1024 * % relative humidity
|
||||
- uint32_t for pressure
|
||||
If macro "BME280_64BIT_ENABLE" is enabled, which it is by default, the unit is 100 * Pascal
|
||||
If this macro is disabled, Then the unit is in Pascal
|
||||
|
||||
### Stream sensor data
|
||||
#### Stream sensor data in forced mode
|
||||
|
||||
|
8
bme280.c
8
bme280.c
@ -40,8 +40,8 @@
|
||||
* patent rights of the copyright holder.
|
||||
*
|
||||
* File bme280.c
|
||||
* Date 22 Nov 2017
|
||||
* Version 3.3.2
|
||||
* Date 14 Feb 2018
|
||||
* Version 3.3.4
|
||||
*
|
||||
*/
|
||||
|
||||
@ -440,7 +440,7 @@ int8_t bme280_set_regs(uint8_t *reg_addr, const uint8_t *reg_data, uint8_t len,
|
||||
/* Interleave register address w.r.t data for
|
||||
burst write*/
|
||||
interleave_reg_addr(reg_addr, temp_buff, reg_data, len);
|
||||
temp_len = len * 2;
|
||||
temp_len = ((len * 2) - 1);
|
||||
} else {
|
||||
temp_len = len;
|
||||
}
|
||||
@ -1114,7 +1114,7 @@ static uint32_t compensate_humidity(const struct bme280_uncomp_data *uncomp_data
|
||||
int32_t var4;
|
||||
int32_t var5;
|
||||
uint32_t humidity;
|
||||
uint32_t humidity_max = 100000;
|
||||
uint32_t humidity_max = 102400;
|
||||
|
||||
var1 = calib_data->t_fine - ((int32_t)76800);
|
||||
var2 = (int32_t)(uncomp_data->humidity * 16384);
|
||||
|
4
bme280.h
4
bme280.h
@ -40,8 +40,8 @@
|
||||
* patent rights of the copyright holder.
|
||||
*
|
||||
* @file bme280.h
|
||||
* @date 22 Nov 2017
|
||||
* @version 3.3.2
|
||||
* @date 14 Feb 2018
|
||||
* @version 3.3.4
|
||||
* @brief
|
||||
*
|
||||
*/
|
||||
|
@ -40,8 +40,8 @@
|
||||
* patent rights of the copyright holder.
|
||||
*
|
||||
* @file bme280_defs.h
|
||||
* @date 22 Nov 2017
|
||||
* @version 3.3.2
|
||||
* @date 14 Feb 2018
|
||||
* @version 3.3.4
|
||||
* @brief
|
||||
*
|
||||
*/
|
||||
|
46
changelog.md
46
changelog.md
@ -1,46 +0,0 @@
|
||||
# Change Log
|
||||
All notable changes to BME280 Sensor API will be documented in this file.
|
||||
|
||||
## v3.3.2, 22 Nov 2017
|
||||
### Changed
|
||||
- Linux compatibility issue fixed
|
||||
|
||||
## v3.3.1, 07 Nov 2017
|
||||
### Changed
|
||||
- Created the following user APIs which were previously static
|
||||
* bme280_parse_sensor_data
|
||||
* bme280_compensate_data
|
||||
|
||||
## v3.3.0, 13 Jul 2017
|
||||
### Changed
|
||||
- Changed macro FLOATING_POINT_REPRESENTATION to BME280_FLOAT_ENABLE
|
||||
- Changed member id to dev_id in struct bme280_dev
|
||||
- Changed member interface to intf in struct bme280_dev
|
||||
- Changed variable length array in bme280_set_regs to fixed length array to allow a max of 10 registers to be written.
|
||||
- Fixed bug with shifting in parse_sensor_data
|
||||
- Changed macro MACHINE_64_BIT to BME280_64BIT_ENABLE
|
||||
- Updated example in the README.md file and added function pointer templates
|
||||
|
||||
## v3.2.0, 21 Mar 2017
|
||||
### Changed
|
||||
- API for putting sensor into sleep mode changed.
|
||||
- Pressure, Temperature out of range data clipped.
|
||||
- 64 bit pressure compensation changed.
|
||||
|
||||
## v3.1.0, 8 Mar 2017
|
||||
### Added
|
||||
- Device settings APIs.
|
||||
- Compensations functions, double datatype for Pressure, Temperature and Humidity.
|
||||
- Compensations functions, integer datatype 64bit for Pressure.
|
||||
### Changed
|
||||
- Internal functions related to power mode.
|
||||
|
||||
## v3.0.0, 17 Feb 2017
|
||||
### Added
|
||||
Below functionalities are supported
|
||||
- Init.
|
||||
- Soft reset.
|
||||
- Power mode.
|
||||
- Compensated functions, integer datatype for Pressure, Temperature and Humidity.
|
||||
- Get sensor data.
|
||||
|
Loading…
x
Reference in New Issue
Block a user