Closed Gabriel-Lacatus closed 8 years ago
:+1: please merge
I ran into this tonight. Before this gets merged, I have two questions about this:
pulseIn
, I fear that we don't know for certain that our function will be called. Instead of casting and hoping it disambiguates properly, how about changing the function to pingPulseIn
or something... that way we are disambiguating by name, not by casted parameters?pulseIn
any longer? Can we just delete our implementation of pulseIn
and use the system version, if it exists? It might require a #define
so it works with old firmwares.The naming collision is a bit unfortunate. From looking at the code of both functions it looks like they are doing fairly similar things but I notice at least two differences that have external effect:
I guess the timeout discrepancy is not terribly problematic but the second difference might cause slightly different outcomes in some cases?
Knowing this, I'd prefer to just change the name of pulseIn
to pingPulseIn
to avoid the name collision completely, but maintain compatibility with the ping command. It would be awesome if we can get this merged soon. We have to flash 110 chips pretty soon here... it would help if we can use an official drop of the firmware.
@rwaldron Do you agree with this?
@BrianGenisio yeah, pingPulseIn
is legit. I'll land this and then change the name entirely. Thanks everyone.
Fixes #54