From cc0174910bd8ee62c4f99bc477ee5fbc4ca18f1a Mon Sep 17 00:00:00 2001 From: Jon Trulson Date: Mon, 13 Mar 2017 12:00:16 -0600 Subject: [PATCH] ds18b20: fix delay timing error in ds18b20_update() Due to the change of using upm_delay_ms() instead of usleep(), but failing to adjust the delay time accordingly, ds18b20_update() was waiting for 750000ms (12 minutes) before reading the result of a measurement, instead of the more appropriate 750ms. This should fix Issue #530. Signed-off-by: Jon Trulson --- src/ds18b20/ds18b20.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ds18b20/ds18b20.c b/src/ds18b20/ds18b20.c index 8b458bb2..872c50c0 100644 --- a/src/ds18b20/ds18b20.c +++ b/src/ds18b20/ds18b20.c @@ -215,7 +215,7 @@ void ds18b20_update(const ds18b20_context dev, int index) mraa_uart_ow_command(dev->ow, DS18B20_CMD_CONVERT, dev->devices[index].id); // wait for conversion(s) to finish - upm_delay_ms(750000); // 750ms max + upm_delay_ms(750); // 750ms max if (doAll) {