When emulating a remote control, I think one needs the ability to know three things:
- When a button is pushed
- When it is released
- when it’s repeating
Let’s take a Volume UP command.
In some cases it might be desireable to not do anything just when the button is pressed, but to wait for a HELD/Let go event.
Pushed my have to start some sort of timer for say 50 mS as an example. If a button released code is received, then the system should know that a “one event” message been generated.
If it is held, then the repeat event is generated.
It would be wise, I think to include an ESC Key or event, which can cancels what’s in progress.
In some of the remote API’s I’ve seen they don;t really address what usually happens within an IR remote control.
The cludge is to have:
Volume up +1
Continuouls Volume up when held
So, what I would liek to see is some sort of API documentation whether it;s AJAX, JAVA, HTML or whatever that shows what it takes to deal with these events.
It isn’t as simple as a button controlling the ON/OFF state.
This is a “Head up” for the developers to be aware of how one might implement events of the type suggested.
I can see this platform being used a lot for remote control applications.
As an example for one remote.
A data word is dent twice with a certain space for a volume up. Before the next command can be accepted, a certain minimum time must elapse.
I am currently under the assumption that repeat is the continuation.
In this case, a single push includes up to t2, t2 can also be thought of as the minimum time that must elapse before a different command is accepted. Two pieces of the same DATA is required fo +1.
Until I do some more analysis, I don;t know if t2 must be present.
t1 would have to be extended to t2 before another key is accepted.
So, it isn’t qute realtime to figure out what to actually do.
It’s sort of like a click event sends two pieces of data and if it’s sustained, it keeps sending the data.
A processor that has direct control, such as the core may be able to distinguish between the events needed.
This is again an awareness issue and someting to brainstorm and think about, If it works now, then it should be part of a “remote control” starter suite of an example.
I could also be barking up the wrong tree too.