From ba69a72af14c577f1603ac60af3fd219cbb30591 Mon Sep 17 00:00:00 2001 From: Nathael Pajani Date: Thu, 18 Sep 2014 21:53:11 +0200 Subject: [PATCH] The previous test may never come true if we do not set the flag --- drivers/tmp101_temp_sensor.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/tmp101_temp_sensor.c b/drivers/tmp101_temp_sensor.c index fef9bc5..e358c75 100644 --- a/drivers/tmp101_temp_sensor.c +++ b/drivers/tmp101_temp_sensor.c @@ -123,6 +123,7 @@ int tmp101_sensor_read(uint16_t* raw, int* deci_degrees) } else { /* Send (write) temperature register address to TMP101 internal pointer */ ret = i2c_read(cmd_buf, CMD_BUF_SIZE, ctrl_buf, (char*)&temp, 2); + last_accessed_register = TMP_REG_TEMPERATURE; } if (ret == 2) { -- 2.43.0