Changeset - 645e46f4898d
[Not reviewed]
tip default
0 2 0
Ethan Zonca (ethanzonca) - 9 years ago 2017-02-08 16:32:25
e@ethanzonca.com
Update scale for bme280 to tenths of percent, disable lps25h
2 files changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
Include/config.h
Show inline comments
 
@@ -18,13 +18,13 @@
 
 
// Internal macros
 
#define hal_init HAL_Init
 
 
 
// Uncomment if using legacy LPS25h pressure sensor
 
#define LPS25H
 
//#define LPS25H
 
 
 
#define FRIENDLY_MODE
 
#define FRIENDLY_TIMEOUT  1800 // 1800 // seconds before reducing tx rate
 
#define FRIENDLY_TX_RATE 60000 // milliseconds tx rate after timeout elapsed
 
Source/bme280.c
Show inline comments
 
@@ -110,13 +110,13 @@ void bme280_update(void)
 
{
 
	uint8_t result[8];
 
	bme280_read(BME280_PRESSURE_MSB_REG, result, 8);
 
 
	pressure = bme280_convert_pressure(result[0] << 12 | result[1] << 4 | (result[2] & 0xf0) << 0) / 256 / 10; // convert to mBar/hPa
 
	temperature = bme280_convert_temperature(result[3] << 12 | result[4] << 4 | (result[5] & 0xf0) << 0); // 0.01C
 
	humidity = bme280_convert_humidity(result[6] << 8 | result[7] << 0) / 1024; // 0.01% RH
 
	humidity = bme280_convert_humidity(result[6] << 8 | result[7] << 0) / (1024/10); // 0.1% RH
 
}
 
 
 
// returns pressure in mb with 0.1mb resolution
 
int32_t bme280_get_pressure(void)
 
{
0 comments (0 inline, 0 general)