Closed nkolban closed 7 years ago
Looks like it's an error in the documentation, because pulseIn
only expects 2 parameters pin
and state
.
But it will returns 0 no state change occurred in an hardcoded timeout. https://github.com/nekuz0r/wiringpi/blob/6d98e0c87ad937849af944ae7118ce1e01ce7c91/wiringPi/wiringPi.c#L1483
Reading the documentation on the use of the
pulseIn()
function, it talks about returning 0 if no pulse is measured in the specified timeout. Unfortunately, there doesn't appear to be a parameter to supply a timeout. Would it be possible to clarify the docs to discuss the timeout (if present) is more detail?