Re: Why the 0xFFFF?
Reply #19 –
don't you have an idea about the IR signal protocol and the data you expect?
If you're talking about the IR Toy, then no, it has no idea. It just tries to time things as well as possible.
If you're talking about your software, then I might be seeing what you're getting at.
Is this the idea:
1. Program gets data
2. program sees the expected signal and decodes it
3. program is ready for another signal starting with a pulse
In that case you know the signal, know when it is done, and can reset your state machine to be ready for more data. Is that kinda what you're saying?
In this scenario I would add 3b) if data== 0xffff while waiting for the next signal, flush any stored samples and stay in state 3.
That's a MCU perspective in my opinion, my code only works when there's data to process, it does nothing when there is none.
In .NET it probably works like this, but in C or another lower-level language it could be very helpful.
Again, I'm happy to add it as an option or make it adjustable. I've already spent more time defending the choice than it will take to implement an alternative setting for you in the next firmware. I'm sorry, for backwards compatibility reasons I won't remove it totally at this point, and I can't really discuss it more.