You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In WaitForOneWireReady(), a new Stopwatch() is created, but never started. As a result, the if-test (stopWatch.ElapsedMilliseconds > 5000) will never evaluate to true:
There are some fundamental issues with the error handling that should be addressed and this is for sure one of them, thanks for the report!
Also the status handling in the chip is not handled in a good way. As long as I find the time I am planning a new release later this year or in the beginning of next.
In
WaitForOneWireReady()
, anew Stopwatch()
is created, but never started. As a result, the if-test(stopWatch.ElapsedMilliseconds > 5000)
will never evaluate to true:OneWire/src/Rinsen.IoT.OneWire/DS2482_100.cs
Lines 329 to 337 in a102c23
This can easily be fixed by changing line 329 to
var stopWatch = Stopwatch.StartNew();
The same issue can be found in this piece of code in
ReadStatus(bool setReadPointerToStatus = false)
:OneWire/src/Rinsen.IoT.OneWire/DS2482_100.cs
Lines 313 to 321 in a102c23
Also, is the 1 millisecond time-out here not way too short? Or is there a specific reason for this?
Regards
The text was updated successfully, but these errors were encountered: