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

Login:
Pass:
 
 

Page 1 of 3
Topic:
Rotary Wheel for dummies
This thread has 30 replies. Displaying posts 1 through 15.
Post 1 made on Tuesday July 1, 2008 at 11:18
Herb Crane
Long Time Member
Joined:
Posts:
May 2005
104
I am a hobbyist not a professional programmer of Pronto. I have been lurking around the message board getting hints here and there. But realizing that this is a professional level piece of equipment, have restrained from asking hobbyist level questions. I have put together a fully functioning config file. But one thing that has always bugged me about the 9600 is the rotary wheel. I couldn’t leave it alone and just had to make it do something.

I got the Developer’s Guide (and read it) and searched the board for help. What I found is that there is no simple ProntoScript example for making the wheel do something or simple explanation of how to integrate the ProntoScript with the config file. Regardless, after a weekend of work (I could barely call programming) I made the wheel click and do something useful.

So for the benefit of the rest of you hobbyists out there, here are a few ProntoScript examples, a description of how it works, and an explanation of how to use in a config file.

First you need to make sure your firmware is up to date. You need v4.0.17. In the Files section you can download the correct version for your equipment. This version gives the wheel support. Make sure you get the correct one for your remote 9400 or 9600. It took me an hour to figure out I downloaded the wrong one.

Example 1

onRotary = function(clicks)
{
if (clicks == 1)
{CF.widget("rotaryUp","rotarypage").executeActions();}
if (clicks == -1)
{CF.widget("rotaryDown","rotarypage").executeActions();}
if (clicks > 1)
{CF.widget("pageUp","rotarypage").executeActions();}
if (clicks < -1)
{CF.widget("pageDown","rotarypage").executeActions();}
}


This ProntoScript is used for navigating a satellite box menu. One click clockwise uses the up cursor to go up one. One click counter makes the cursor go down one. More than one click clockwise uses the page up. More than one click counter uses the page down.

Here is how I made it work. (May not be the most efficient but works for me)

Under the satellite device I made a page and hid it. The page is for holding the actions of cursor up, cursor down, page up, and page down. The page needs to be tagged by giving it a ProntoScript name. This is done in the page properties advanced tab. This example uses the ProntoScript name rotarypage. Caps count in ProntoScript so be careful.

On this page I put four buttons. Each of the buttons corresponds to one of the actions and is linked to the code page like normal. Each of the buttons also needs a tag or ProntoScript name. This is done in the Button Properties under Actions tab. All the way to the right is the PS button. Click this and give it a name. In this example I use the name rotaryUp for the cursor up. You can figure out the other four.

The ProntoScript names (tags) are critical to the script finding the button.

In the Device Properties for the device to be controlled with wheel is where you put the actual script. This goes under the Advanced page in the Module Script section. So copy and paste and make sure you are consistent with your ProntoScript names.

Each time the rotary wheel moves the amount of clicks is determined and each of the If statements are reviewed for applicability. If a match is made the action that is referenced by the tags is performed.

Example 2

onRotary = function(clicks)
{
if (clicks == 1)
{CF.widget("rotaryPlay","rotarypage").executeActions();}
if (clicks == -1)
{CF.widget("rotaryPause","rotarypage").executeActions();}
if (clicks == 2)
{CF.widget("rotaryForward","rotarypage").executeActions();}
if (clicks == -2)
{CF.widget("rotaryBackward","rotarypage").executeActions();}
if (clicks > 2)
{CF.widget("rotaryChap+","rotarypage").executeActions();}
if (clicks < -2)
{CF.widget("rotaryChap-","rotarypage").executeActions();}
};

This ProntoScript is used to emulate a jog wheel for a DVD player. One click clockwise is play. One click counter is pause. Two clicks clockwise is FF. Two clicks counter is RW. Three clicks clockwise is chapter next. Three clicks counter is chapter previous. Same goes for the page with actions and tags.

Good luck to all.
Post 2 made on Tuesday July 1, 2008 at 11:55
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,999
Herb,

Very nice example and writeup.

For others who might be looking for other examples/discussions, search this forum for past 1 year looking for +onRotary.
Lyndel McGee
Philips Pronto Addict/Beta Tester
OP | Post 3 made on Tuesday July 1, 2008 at 16:31
Herb Crane
Long Time Member
Joined:
Posts:
May 2005
104
Realized that last line in first example is incomplete. Should be:

}; not }

Copy error whoops!
Post 4 made on Tuesday July 1, 2008 at 21:52
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,999
On July 1, 2008 at 16:31, Herb Crane said...
Realized that last line in first example is incomplete.
Should be:

}; not }

Copy error whoops!

Tip: You can edit your original post and change if need be...
Lyndel McGee
Philips Pronto Addict/Beta Tester
Post 5 made on Wednesday July 2, 2008 at 10:21
Barry Gordon
Founding Member
Joined:
Posts:
August 2001
2,157
Not a real error as the semicolon is a separator between statements on the same line and is not needed at the end of a line.

Last edited by Barry Gordon on July 2, 2008 11:57.
Post 6 made on Wednesday July 2, 2008 at 10:52
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,999
On July 2, 2008 at 10:21, Barry Gordon said...
Not a real error as the semicolon as a separator between
statements on the same line and is not needed at the end
of a line.

JSLint will emit a warning about this though... :)
Lyndel McGee
Philips Pronto Addict/Beta Tester
Post 7 made on Wednesday July 2, 2008 at 12:39
jdavbar
Long Time Member
Joined:
Posts:
January 2003
106
I'm running the latest firmware and have a few questions about using this to control a DirecTV HR-20.

1. If the page with the four buttons isn't hidden, will the buttons work like the scroll?
2. It is mentioned to give the buttons a corresponding Pscript name and also to link the button to the code page like normal, what does it get linked to? cursor up/down and channel up/down?
Post 8 made on Wednesday July 2, 2008 at 12:54
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,999
I don't believe you will have any problems with the above. Yes, they would be linked to Cursor Up/Down or Ch+/- as you think.

Give it a try. If it does not work, then ask questions and be prepared to post sample code.
Lyndel McGee
Philips Pronto Addict/Beta Tester
Post 9 made on Wednesday July 2, 2008 at 21:15
jdavbar
Long Time Member
Joined:
Posts:
January 2003
106
I double-checked and I'm using application 4.0.17, IR firmware 2.1.25.1, bootloader 1.2.8. I created a page under the Satellite device and called it rotarypage. I created 4 buttons and labeled them Ch+/- and Page+/- and then in the Actions tab under PS, I labeled them according to the script. Under the Device Properties Advanced I called the Prontoscript Name: rotarypage and copied the script according to Example 1 above. I did not link the buttons to anything as answered above that the buttons would work without linking them. I am also controlling the Satellite box via RS232. When pressed, the buttons do not do anything, what am I doing wrong?
Post 10 made on Thursday July 3, 2008 at 03:44
sgtoma
Long Time Member
Joined:
Posts:
December 2007
73
Say:
{CF.widget("rotaryUp","rotarypage").executeActions();}
Have you defined any actions (rs232 commands) uder your CH+/- buttons in order to execute them?

Have a look at:
[Link: remotecentral.com]

Also do a forum search for: Rotary - posted by sgtoma
Post 11 made on Thursday July 3, 2008 at 05:20
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,999
I saw that you set the Activity Tag Name but did not see where you set the page name. However, I have to assume you did because you did not indicate the rotary script was not working.

However,

There's a funny quirk with the remote. Not sure why it is this way, but it is. If a button is a UI-based button and you want to press it, you must "unpress" the PS button on the ActionList tab of the properties page to, in effect, make the ActionList visible.

If you do this, your codes will still be available for execution using widget.executeActions() under ProntoScript AND the button will also be pressable from the UI.
Lyndel McGee
Philips Pronto Addict/Beta Tester
Post 12 made on Saturday July 5, 2008 at 14:15
Stephen Coates
Long Time Member
Joined:
Posts:
June 2003
155
Thanks for this. Very simple and it works.
I will be able to put it to good use.
Post 13 made on Wednesday July 23, 2008 at 11:51
jdavbar
Long Time Member
Joined:
Posts:
January 2003
106
Can someone please help me on this. I've been messing with this for a few weeks and can't seem to get it. I'll gladly email my file (for Satellite only) to anyone???
OP | Post 14 made on Wednesday July 23, 2008 at 13:27
Herb Crane
Long Time Member
Joined:
Posts:
May 2005
104
On July 2, 2008 at 21:15, jdavbar said...
I double-checked and I'm using application 4.0.17, IR
firmware 2.1.25.1, bootloader 1.2.8. I created a page
under the Satellite device and called it rotarypage.
I created 4 buttons and labeled them Ch+/- and Page+/-
and then in the Actions tab under PS, I labeled them according
to the script. Under the Device Properties Advanced I
called the Prontoscript Name: rotarypage and copied the
script according to Example 1 above. I did not link the
buttons to anything as answered above that the buttons
would work without linking them. I am also controlling
the Satellite box via RS232. When pressed, the buttons
do not do anything, what am I doing wrong?

I read your previous mail quoted above.

Under the Device Properties Advanced I
called the Prontoscript Name: rotarypage

The ProntoScript Name: rotarypage should be the ProntoScript Name on the page containing the widget buttons linked to the activities. It should not be the name on the Device/Activity ProntoScript Name.

Good luck.
Post 15 made on Wednesday July 23, 2008 at 22:56
jdavbar
Long Time Member
Joined:
Posts:
January 2003
106
Thank You Thank You Thank You, finally got it.
Page 1 of 3


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