Click here to go to the forum index Click here for the home page
 
Author Message

<  TAP and patch development  ~  Does Toppy/TAP react to every remote controller click?

Page 1 of 1
JoeKole
Posted: Tue Sep 20, 2005 5:28 pm Reply with quote
Joined: 30 Aug 2005 Posts: 22 Location: Finland
Hi!

If you do several remote controller clicks one after another very quickly does Toppy/TAP react to every single remote controller click?

It feels at this moment a little bit so, that in basic use Toppy reacts pretty well to clicks. BUT when playing Toppy games or using TAPs some problem seems to occur and some remote controller clicks might be missed.

Is there any idea what the answer really is or how the answer could be proved?

How about the case if TAPs really miss some clicks from a set/serie of quick clicks?
How to optimize TAPs to react to remote controller clicks?
Or is it just better concentrate to plan slow click-activity based TAPs?

Regards

JoeKole
View user's profile Send private message Visit poster's website
Merlin
Posted: Wed Sep 21, 2005 11:01 am Reply with quote
Joined: 07 Sep 2005 Posts: 11
While a key is being held down, the remote control sends an infrared pulse to the unit a number of times per second, rather than sending a constant 'on' signal.

I am guessing that the delay you are experiencing is due to the delay in between the infrared pulses of the remote.

It gives the games a little bit of 'latency'. You'll just have to get used to pressing a key a little bit in advance I think. It could also be due to the game or TAP being poorly designed and not in a state ready to receive a keypress when you want to press the key.

TAPs are not sent every single pulse from the remote - only the first pulse, and every pulse after about the 0.5 second mark. But that doesn't really answer your question.

It's very easy to log the incoming key presses in a TAP to find these things out.

In my experience if you send a number of different key presses in quick succession, as long as each one is 100ms (one tenth of a second) or so the TAP should be able to receive each one. Also check the LED on the front of the unit, as that will light whenever it receives an infrared pulse from the remote (and stay lit for a short time).
View user's profile Send private message
JoeKole
Posted: Wed Sep 21, 2005 3:31 pm Reply with quote
Joined: 30 Aug 2005 Posts: 22 Location: Finland
Thanks for sharing experiences.

The good news is that Toppy/TAP can buffer remote controller clicks. BUT I did some test and I still feel that TAP_EventHandler-function doesn't necessarily get every remote controller click. Based on the comments and experiences by far it feels better to concentrate to plan TAPs where are not much risk "to suffer mentally" if the TAP doesn't follow every remote controller command.

I did some test with source code belove and the test was executed and experienced like this:
- push remote controller keys 1-9 one-by-one with (approximately) 2 seconds interval
- simultaneously look and see the LED light flashing after every 2 seconds in Toppy
- BUT still sometimes some numbers are not printed on the screen


dword TAP_EventHandler( word event, dword param1, dword param2 )
{

int iClick;

if ( event != EVT_KEY ) return 0; // or return param1

if ( param1 == RKEY_Exit) _exitFlag = TRUE;

switch (param1)
{
case RKEY_0: iClick = 0; break;
case RKEY_1: iClick = 1; break;
case RKEY_2: iClick = 2; break;
case RKEY_3: iClick = 3; break;
case RKEY_4: iClick = 4; break;
case RKEY_5: iClick = 5; break;
case RKEY_6: iClick = 6; break;
case RKEY_7: iClick = 7; break;
case RKEY_8: iClick = 8; break;
case RKEY_9: iClick = 9; break;

default: iClick = -1; break;

} // switch

TAP_SPrint( strGlobalTxt, "%s C:%d ", strGlobalTxt, iClick);
TAP_Osd_PutS(_rgn, 50, 250, 650, strGlobalTxt, COLOR_Black, COLOR_White, 0, FNT_Size_1622, 1, ALIGN_LEFT );

return 0;
}

int TAP_Main(void)
{
long i, j;

My_OSD_Start();
TAP_SPrint( strGlobalTxt, "Clicks ");

while(1)
{
for (i=0; i < 100000000; i++) {j=i;}; // This is DELAY or use e.g. TAP_Delay(400);
TAP_SystemProc();
if (_exitFlag) break;
}

My_OSD_End();
return 0; // Application mode
}


... Well of course this doesn't prove everything and maybe TSR mode manages the remote controller clicks better.


Regards

JoeKole
View user's profile Send private message Visit poster's website
Merlin
Posted: Thu Sep 22, 2005 1:31 am Reply with quote
Joined: 07 Sep 2005 Posts: 11
If clicks aren't being received even with 2 seconds between presses and the light on the front coming on, I would guess that there may be something wrong with your toppy. Either that or as you say it may be different in TSR mode as I haven't experimented with non-TSR mode.

In my experience even pressing many keys per second they are all received. This is in TSR mode.
View user's profile Send private message
deangelj
Posted: Thu Sep 22, 2005 3:41 am Reply with quote
Frequent contributor Joined: 29 Mar 2005 Posts: 316 Location: Sydney, Australia
Hi,

This was posted on the OZ forum recently : http://www.topfield-australia.com.au/frm/topic.asp?TOPIC_ID=3182

Basically on our OZ firmware, the toppy can do different things with certain keys depending on how long you hold down the key - maybe it's the same on the UK version?

cheers,
John
View user's profile Send private message
JoeKole
Posted: Thu Sep 22, 2005 8:17 pm Reply with quote
Joined: 30 Aug 2005 Posts: 22 Location: Finland
The Toppy/TAP reactions to remote controller clicks is now a little bit more clear.

First of all it is good to remember that in the basic usage Toppy reacts pretty well to remote controller clicks. The reactions seems to be also good with such TAPs which doesn't include functionality requiring a lot of CPU-time. So if TAP returns very quickly into a state where it is ready to receive a keypress (TAP_EventHandler) then remote controller clicks should be reacted in most of the cases as you expect.

The situation seems to be different if TAP includes functionality requiring a lot of CPU-time (e.g. decoding big jpg-files or loop "for (i=0; i < 100000000; i++)" ) or if TAP includes TAP_Delay-function. In these kind of cases more carefulness is needed to get the wanted remote controller "usability". It also feels like "TSR mode" and "Application mode" handle these kind of heavy CPU-load cases differently. The feeling is that

1) "TSR mode" reacts only to those remote controller clicks that are pressed during "state where TAP is ready to receive a keypress", but

2) "Application mode" buffer also the clicks done during TAP's heavy CPU-load (although "Application mode" seems to miss sometimes some clicks in these situations).

One learning for me has been that I don't use TAP_Delay anymore. More manageble way to do delay is to let TAP loop via TAP_EventHandler and in the TAP_EventHandler to follow how much time has gone from the starting point e.g. "if ( TAP_GetTick() - MyStartTick < 100) { return }" ... at least when I want to optimize the remote controller click reactions.

In the end ... I have now found the way to reach better remote controller "usability".
Thanks Smile

JoeKole
View user's profile Send private message Visit poster's website

Display posts from previous:  

All times are GMT + 1 Hour
Page 1 of 1

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum