Page 1 of 1

trouble with repeat code from remote controller to USB-UIRT

PostPosted: Fri Jul 14, 2006 7:48 am
by Kim
I am developing the program which records user IR operation and plays the recorded action later.
But I can't do that because the given APIs don't provide enough functionality.

First, given LEARN process can only records user action during limited time which I can't adjust.
And ReceiveCallback(registered using UUIRTSetReceiveCallback) doesn't tell me whether user is holding a button or not. Currently, ReceiveCallback is called only when user press a button.

If ReceiveCallback is called when user's holding a button or when user releases a button, I can use ReceiveCallback for recording.

For example, ReceiveCallback's prototype may be like this;

void WINAPI IRReceiveCallback (char *IREventStr, void *userData, BOOL pressed)

Normally callback is called with pressed = TRUE.
And when user releases a button it is called with pressed = FALSE so that I can handle the key-holding user action.

There may be other ways to handle this problem.

I hope you will help us by modifying current library as I described or in other ways.
I'm worried whether you don't have time to modify, but I'm so desperate frustrated. ;(



How I get to know the method of accepting repeat code from Remote controller?
I know that repeat code is being sent by time interval of 108ms,
but I can't control the timing of receiving repeat code from remote controller..
Finally, Continuous IR transmitting is no problem,
but continuous IR receiving from remote controller to USB-UIRT is impossible in my situation I think, Is there any solution of my problem?

HELP ME PLEASE

PostPosted: Mon Jul 17, 2006 2:35 pm
by jrhees
When you press and hold a button on your remote, does ReceiveCallback get called once or does it get called repeatedly until the button is released?

PostPosted: Tue Jul 18, 2006 12:53 am
by Kim
Second case is right. ReceiveCallback get called repeatedly until the button is released. So I can't control the repeat code from Remote controller. What can i do for? :cry:

PostPosted: Fri Jul 28, 2006 8:45 pm
by jrhees
If the ReceiveCallback gets called repeatedly, you can easily determine if the user is holding the button or has released it by implementing a debounce timer in your ReceiveCallback handler.

-Jon