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:
Rotary Wheel Algorithms
This thread has 3 replies. Displaying all posts.
Post 1 made on Saturday August 7, 2010 at 04:54
MCFH
Long Time Member
Joined:
Posts:
December 2009
35
Hi,
I was wondering what algorithms people used for the rotary wheel. I have played with the simple exponential one in the Dev Guide and find that it doesn't work for me with a relatively short list of songs. I thought it would be useful to start a list of them here and see what people have used?

Any ideas?

Thanks
Mark
Post 2 made on Sunday August 8, 2010 at 10:20
alpha
Long Time Member
Joined:
Posts:
September 2003
258
I made a long list of movie names. It would display 20 names at a time.
I set it up to skip 10 lines at a time.

onRotary = function(clicks) {
if (clicks > 1) {
     // Skip 10 lines
     } ;
} ;


In my Chanel Blaster in Project Boredom 2  [Link: mediafire.com] , I did something different like . . .

if (clicks > .99) {
defaultchannel ++ ; // up one
} ;

if (clicks > 1) {
defaultchannel +=10 ; // up 10
} ;

if (clicks < -1) {
defaultchannel -- ; // down 1
} ;


It's not a algorithm , but it worked .
Project Boredom 2 is here. [Link: mediafire.com]
------------------------
Check Version 1 & 2 out in the files section.
Post 3 made on Thursday August 12, 2010 at 00:58
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,994
Note that with the above code, you are actually skipping 11 channels on a clockwise turn when clicks > 1 as both (clicks > 1) and (clicks > .99) will return true.

if (clicks > 1)
channel +=10;
else if (clicks > 0)
channel++;
else if (-1 > clicks)
channel-=10;
else if (0 > clicks)
channel--;
else
{
// do nothing as (clicks === 0)
}
Lyndel McGee
Philips Pronto Addict/Beta Tester
Post 4 made on Thursday August 12, 2010 at 13:12
darshak40
Long Time Member
Joined:
Posts:
June 2007
35
Hear is the script I use when I have a long list.

You have 3 differents speed.
- 1 by 1
- I add the click value
- I multiply by click value

So quicker you turn the rotary quicker the list go down.

I use also a cursor (an indicator of the selected line).

{
if(clicks > 0)
{
if(Selected_Item < (nbL-1))
{
CF.widget("lst_"+Selected_Item).setImage(CF.widget("btnOFF","GALLERY").getImage(0),0);
CF.widget("lst_"+Selected_Item).setImage(CF.widget("btnOFF","GALLERY").getImage(1),1);
CF.widget("lst_"+Selected_Item).stretchImage = true;
Selected_Item ++;
CF.widget("lst_"+Selected_Item).setImage(CF.widget("btnON","GALLERY").getImage(0),0);
CF.widget("lst_"+Selected_Item).setImage(CF.widget("btnON","GALLERY").getImage(1),1);
CF.widget("lst_"+Selected_Item).stretchImage = true;
}
else
{
if(clicks>0 && clicks <3) // Pas de 1
{
if(decale_a}
if(clicks>=3 && clicks <5) // Pas de Click (On ajoute click)
{
if(decale_a}
if(clicks>=5) // Fois de click (On Multiplie par click)
{
if(decale_a}
}
}
if(clicks < 0)
{
if(Selected_Item>0)
{
CF.widget("lst_"+Selected_Item).setImage(CF.widget("btnOFF","GALLERY").getImage(),0);
CF.widget("lst_"+Selected_Item).setImage(CF.widget("btnOFF","GALLERY").getImage(),1);
CF.widget("lst_"+Selected_Item).stretchImage = true;
Selected_Item --;
CF.widget("lst_"+Selected_Item).setImage(CF.widget("btnON","GALLERY").getImage(),0);
CF.widget("lst_"+Selected_Item).setImage(CF.widget("btnON","GALLERY").getImage(),1);
CF.widget("lst_"+Selected_Item).stretchImage = true;
}
else
{
if(clicks<0 && clicks>(-3)) { if((decale_a-1)>=0) { decale_a = decale_a - 1; } }
if(clicks<=(-3) && clicks>(-5)) { if((decale_a+clicks)>=0) { decale_a = decale_a + clicks; } else { if((decale_a-1)>=0) { decale_a = decale_a - 1; } } }
if(clicks<=(-5)) { if(decale_a+(clicks*nbL)>=0) { decale_a = decale_a + (clicks*nbL); } else { if((decale_a-nbL)>=0) { decale_a = decale_a - nbL; } else { decale_a = 0; } } }
}
}
if(decale_a>nbArtist-nbL) { decale_a = nbArtist - nbL }
Display_List(nbL);
break;
}


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