From d7655807bc6a50358d51ce85c98cd2c29a4524c7 Mon Sep 17 00:00:00 2001 From: Nathael Pajani Date: Thu, 3 Jan 2019 17:52:05 +0100 Subject: [PATCH] Temperature can be negative, use signed integer. --- extdrv/bme280_humidity_sensor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extdrv/bme280_humidity_sensor.c b/extdrv/bme280_humidity_sensor.c index 42044f0..656b569 100644 --- a/extdrv/bme280_humidity_sensor.c +++ b/extdrv/bme280_humidity_sensor.c @@ -170,7 +170,7 @@ int bme280_configure(struct bme280_sensor_config* conf) * glibc. */ #define READ_CMD_SIZE 3 -int bme280_sensor_read(struct bme280_sensor_config* conf, uint32_t* pressure, uint32_t* temp, uint16_t* hum) +int bme280_sensor_read(struct bme280_sensor_config* conf, uint32_t* pressure, int32_t* temp, uint16_t* hum) { int ret = 0; char cmd_buf[READ_CMD_SIZE] = { conf->addr, BME280_REGS(raw_data), (conf->addr | I2C_READ_BIT), }; -- 2.43.0