One-Wire Component - GetDeviceCount

Any bugs you encounter with Flowcode should be discussed here.
Post Reply
Brendan
Posts: 43
http://meble-kuchenne.info.pl
Joined: Tue Dec 08, 2020 2:12 pm
Has thanked: 35 times
Been thanked: 10 times

One-Wire Component - GetDeviceCount

Post 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

BenR
Matrix Staff
Posts: 1739
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 440 times
Been thanked: 603 times

Re: One-Wire Component - GetDeviceCount

Post 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.

Brendan
Posts: 43
Joined: Tue Dec 08, 2020 2:12 pm
Has thanked: 35 times
Been thanked: 10 times

Re: One-Wire Component - GetDeviceCount

Post by Brendan »

That's great - Thank you Ben :)

All the best,
Brendan

Post Reply