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 <jtrulson@ics.com>
This commit is contained in:
Jon Trulson 2017-03-13 12:00:16 -06:00
parent c4a506f5a3
commit cc0174910b

View File

@ -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)
{