Your Universal Remote Control Center
RemoteCentral.com
Philips Pronto Professional Forum - View Post
Previous section Next section Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Topic:
Controlling repeating IR codes
This thread has 10 replies. Displaying all posts.
Post 1 made on Tuesday November 2, 2010 at 02:09
Guy Palmer
Active Member
Joined:
Posts:
June 2008
648
On my PVR (Foxtel), I sometimes want to use the Up/Down functions in repeating mode (to scroll through a list), but sometimes in non-repeating mode (to move to the next item on a list).

The obvious way to do this is to use a repeating code, pressing it only quickly if one wants to move up/down by one item only. This is how the PVR's own remote does things. The problem with this is that a quick press too often results in a double jump and this happens whatever durations are set for the code.

To rectify this, I used a non-repeating code within a prontoscript loop, effectively inserting a delay between the first invocation and subsequent invocations. For example:

c=0;
onHoldInterval = 50;
delay=3;
onHold = function()
{
if(c==0 || c>delay) {CF.widget("Down").executeActions();}
}
c++
};

Functionally, this works as intended. The problem with it, however, is that the repeating functionality is very jumpy/irregular and this compares unfavourably with the use of the repeating code (where the repeating functionality is very smooth).

Clearly, there are variables to play with here (in the database: the duration of the code and the general delay between codes; and in the prontoscript: the onHoldInterval and the 'delay' variable) but I can't find any combination which results in smooth repeating functionality.

It seems to me that there are two possible conclusions: either a) I have not found the right combination of variables yet or b) any prontoscript solution will always result in jumpy repeating.

Any thoughts?
Post 2 made on Tuesday November 2, 2010 at 05:42
buzz
Super Member
Joined:
Posts:
May 2003
4,380
Guy Palmer,

Do you have any other timers running? You could be experiencing a "beat" between timers.

In my experience the timers are somewhat erratic because the user timers are too far down on the priority list. A 50ms loop is a little tight. Also, response to user timers will be blocked while IR is being sent.

A really ugly detail is that response to button and key press is blocked while IR is being sent. There will be an acknowledge tone, but the key press will be thrown away.

I've been defining a special page accessable from the Home page via PageUp or PageDown that allows adjusting my own timers. For example, if I need to work out a delay between PowerOn and giving an Input command, this can require a number of download iterations. I start with a global default and adjust as needed. On the next download iteration, I'll update the default. Sometimes this takes a while to work out. In selected cases I'll have a user mess with this so that we can find the minimum timing based on "real world" conditions. After a few days experience, I'll hard code the result of our trials.
OP | Post 3 made on Tuesday November 2, 2010 at 05:56
Guy Palmer
Active Member
Joined:
Posts:
June 2008
648
You raise some interesting issues, Buzz.

Yes, I do have some other timers running.

Yes, I have some temporary buttons to change the two prontoscript variables and test the results (changing the onHoldInterval doesn't seem to make much difference). One issue is that I can't do the same for the two database variables (duration and general delay) and, more generally, do not really understand these two variables. More specifically:

1. What is the 'default' duration and can I change this?

2. Does the 'general delay' affect the time between any two IR codes or only particular ones (e.g. in a channel macro)? What should its value typically be?
Post 4 made on Tuesday November 2, 2010 at 06:12
Sogliphy
Long Time Member
Joined:
Posts:
July 2007
186
1. What is the 'default' duration and can I change this?

When "default" is chosen, 2 repetitions of the IR code will be sent out. This is determined based on analysis of the IR code, and cannot be changed manually.

2. Does the 'general delay' affect the time between any two IR codes or only particular ones (e.g. in a channel macro)? What should its value typically be?

This only affects channel macros (which are expanded to action lists containing IR send actions and delays, when downloading to the control panel)

Note: when an IR code is the sole action in an action list of a button not having a button script or an onPress callback, keeping that button pressed will result in "send-while-pressed", but still, at least 2 repetitions will be sent out.
OP | Post 5 made on Tuesday November 2, 2010 at 06:24
Guy Palmer
Active Member
Joined:
Posts:
June 2008
648
Thanks, Sogliphy, very helpful.

When "default" is chosen, 2 repetitions of the IR code will be sent out.

Why 2 rather than the obvious number (i.e. 1)? If I manually set the duration, does this result in just a single repetition being sent?
Post 6 made on Tuesday November 2, 2010 at 06:31
Sogliphy
Long Time Member
Joined:
Posts:
July 2007
186
On November 2, 2010 at 06:24, Guy Palmer said...
Thanks, Sogliphy, very helpful.

Why 2 rather than the obvious number (i.e. 1)? If I manually set the duration, does this result in just a single repetition being sent?

I guess mainly because this is how action lists have always been interpreted in Pronto configurations, and changing this might break existing action lists.
OP | Post 7 made on Tuesday November 2, 2010 at 08:28
Guy Palmer
Active Member
Joined:
Posts:
June 2008
648
Ok, thanks. I'll have a play and see if I get anywhere.
Post 8 made on Tuesday November 2, 2010 at 10:31
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,999
Guy,

This is a known limitation of the executeActions and was discussed thoroughly here a few years back. i.e. there is no way to send just the repeating part.

You might try and break the code apart into 2 functions and have your script send the larger one-shot part with the first executeActions() and the smaller repeating part with the subsequent calls to executeActions.

For information on how to segregate one-shot and repeating code data, see Barry Gordon's Pronto Hex IR Format document in the User Documentation subsection of the Classic Pronto Files section.
Lyndel McGee
Philips Pronto Addict/Beta Tester
OP | Post 9 made on Tuesday November 2, 2010 at 10:57
Guy Palmer
Active Member
Joined:
Posts:
June 2008
648
On November 2, 2010 at 10:31, Lyndel McGee said...
This is a known limitation of the executeActions

Which aspect precisely? Are you saying that the jumpiness when using a prontoscript loop is inevitable unless I separate the two bits of the code?
Post 10 made on Tuesday November 2, 2010 at 12:29
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,999
Yes, that is EXACTLY what I am saying.

Here is the original thread from a few years back entitled executeActions().

Found with a search of executeactions repeat ir

[Link: remotecentral.com]
Lyndel McGee
Philips Pronto Addict/Beta Tester
OP | Post 11 made on Tuesday November 2, 2010 at 12:36
Guy Palmer
Active Member
Joined:
Posts:
June 2008
648
Thanks, Lyndel.

Your memory for old threads is amazing :)


Jump to


Protected Feature Before you can reply to a message...
You must first register for a Remote Central user account - it's fast and free! Or, if you already have an account, please login now.

Please read the following: Unsolicited commercial advertisements are absolutely not permitted on this forum. Other private buy & sell messages should be posted to our Marketplace. For information on how to advertise your service or product click here. Remote Central reserves the right to remove or modify any post that is deemed inappropriate.

Hosting Services by ipHouse