mirror of
https://github.com/eclipse/upm.git
synced 2025-03-15 04:57:30 +03:00
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:
parent
c4a506f5a3
commit
cc0174910b
@ -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);
|
mraa_uart_ow_command(dev->ow, DS18B20_CMD_CONVERT, dev->devices[index].id);
|
||||||
|
|
||||||
// wait for conversion(s) to finish
|
// wait for conversion(s) to finish
|
||||||
upm_delay_ms(750000); // 750ms max
|
upm_delay_ms(750); // 750ms max
|
||||||
|
|
||||||
if (doAll)
|
if (doAll)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user