MarkT:
bperrybap:
MarkT:
Remember it is the sister function to delay() which has no such whackiness.That is probably the best argument to fix it.
My concern is that fixing it makes some normal cases no longer work as well or not at all.
That is what happened when pulsein() was "fixed".
Resolution was lost and it still has some "gotchyas" in it.--- bill
Well that wouldn't be a fix would it? I wasn't claiming its necessarily straightforward to fix (which
is presumably the reason its incompletely implemented in the first place)
But the Arduino team is notorious for these kinds of "fixes"
because one mans "fix" is potentially another mans "bug" or loss of
functionality.
pulsein() was considered "fixed" even though some functionality was lost.
Example: accuracy of using certain ultrasonic distance finders.
There were many "fixes" put into Arduino 1.0 at the last minute.
Look at the Serial flush(), it used to work by purging the rx buffer. Now
HardwareSerial tries to wait for the transmitted characters to be transmitted
but it doesn't. It only waits for the s/w buffer to empty (there are still characters
inside the AVR) and then to make matters worse, the SoftSerial still has the old flush() functionality.
Then there is the Print class, that was "fixed" in 1.0 to return characters on write() which broke
100% of the 3rd party s/w and sketches that used write().
Then there is the changing of the wire library in 1.0 to rename send() to write()
again breaking 100% of the 3rd party s/w that used the wire library.
Several of these types of "fixes" (changes/updates) could have been implemented in other
ways that wouldn't have broken things or lost functionality, and in a few
like the write() vs send() change in the wire library, the Arduino knew about it,
knew the simple change that could be done to not break anything, and yet
stated that they wanted to blaze forward with a path
that intentionally breaks all the s/w that used wire as
a method of forcing everyone to "fix" their code.
Just saying be very careful what you wish for. You may just get it at
the expense of losing something else.
--- bill