Page 1 of 1

One-Wire Component - GetDeviceCount

Posted: Mon Sep 26, 2022 2:22 pm
by Brendan
Hi everyone.

Just reporting an observation with GetDeviceCount in the generic One-Wire component.

I'm working on a project that can have anything from zero to many 1-wire devices hanging on the bus, so I originally used GetDeviceCount after a ScanBus to establish number of connected devices. The reported minimum however is '1' with zero targets connected.

My workaround uses BusReset to first detect presence on the bus and, if '1', to force the count variable to zero and ignore ScanBus/GetDeviceCount, though thought I'd flag this up.

Cheers,
Brendan

Re: One-Wire Component - GetDeviceCount

Posted: Mon Sep 26, 2022 2:56 pm
by BenR
Hi Brendan,

Many thanks for letting us know.

I beleive I have now spotted where the problem was happening in the ScanBus macro and fingers crossed it should be resolved for you now.

Re: One-Wire Component - GetDeviceCount

Posted: Mon Sep 26, 2022 10:55 pm
by Brendan
That's great - Thank you Ben :)

All the best,
Brendan