Re: Why the 0xFFFF?
Reply #9 –
I'm sorry, I still think I'm not understanding what you're saying.
you analyze and process data as it comes from the serial port and fills your buffer(s).
But if it is just a stream of bytes, filling your buffer, don't you need a way to tell the end of one IR pulse train and the beginning of another?
How do you propose in your system to know if the next data is a measurement of a pulse or a space? There is no end flag so any measurement can be a pulse or a space, depending on how long it's been since the last data. I don't see how you can tell without having a time out. You'll have to explain this to me with some pesudo code, because I think I'm totally missing what you're getting at.
me >>How long between IR pulses should the IR Toy wait before resetting and not measuring?
That's a MCU issue and not protocol/data related.
Well, I'm the MCU guy and I have no clue where to set it. Would you say if no more activity for 1.7s just not send the 0xffff? That's dooable, and can be added as an option. What is the optimal delay after which I shouldn't report the silence?
The time elapsed between two IR signals becomes important if the IR protocol doesn't provide a toggle bit like RC-5 does
Most don't, I believe this is generally important info to have.
If we are talking "data" at the protocol-PC level, adding extra data messes things a bit.
How so? You get 0xffff and know the receiver has been quite for a while. You could even move to a low-priority service level to save on system resources. I guess I don't understand this because the decoder 7 and I write (python), and Dukey's plugin, and everything that supports the UIRT2 (LIRC, WinLIRC, Girder, etc) all use this format. We thought it was smart to use what other people have developed through hard work, engineering, and trial and error.