Next probelm (RGB)
David_w
Posts: 23
I am trying to figure out how and where to place the RGB_Select() in the case section of the program. That will allow RGB1 to come up first when coming from Video mode every time. Then after RGB1 is selected when I hit the button again it will cycle through RGB2 and RGB3. I tried to add it various places in the case part of the program and nothing seems to work. Any help would be appericated.
Define Subroute
Define_Function RGB_Select()
{
IF (!RGB_Input)
{
send_string dvPlasma,"'@G',13"
wait 20 send_string dvPlasma,"'%A1002',13"
SEND_STRING 0, "'%A1002',13"
On [RGB_Input]
Off[Video_Input]
}
}
DEFINE PROGRAM
BUTTON_EVENT[dvTP,302]
{
PUSH:
switch(nRGB_Val)
{
case 1:
// set input to RGB2
{
nRGB_VAL = 2
send_string dvPlasma,"'@G',13"
wait 20 send_string dvPlasma,"'%A1000',13"
SEND_STRING 0, "'%A1000',13"
On [RGB_Input]
break
}
case 2:
// set input to RGB3
{
nRGB_VAL = 3
send_string dvPlasma,"'@G',13"
wait 20 send_string dvPlasma,"'%A1001',13"
SEND_STRING 0, "'%A1001',13"
On [RGB_Input]
break
}
case 3:
// set input to RGB1
{
nRGB_VAL = 1
send_string dvPlasma,"'@G',13"
wait 20 send_string dvPlasma,"'%A1002',13"
SEND_STRING 0, "'%A1002',13"
On [RGB_Input]
break
}
default:
{
nRGB_VAL = 1 // so it doesn't get stuck
send_string dvPlasma,"'@G',13"
wait 20 send_string dvPlasma,"'%A1002',13"
SEND_STRING 0, "'%A1002',13"
off [RGB_Input]
break
}
}
}
Define Subroute
Define_Function RGB_Select()
{
IF (!RGB_Input)
{
send_string dvPlasma,"'@G',13"
wait 20 send_string dvPlasma,"'%A1002',13"
SEND_STRING 0, "'%A1002',13"
On [RGB_Input]
Off[Video_Input]
}
}
DEFINE PROGRAM
BUTTON_EVENT[dvTP,302]
{
PUSH:
switch(nRGB_Val)
{
case 1:
// set input to RGB2
{
nRGB_VAL = 2
send_string dvPlasma,"'@G',13"
wait 20 send_string dvPlasma,"'%A1000',13"
SEND_STRING 0, "'%A1000',13"
On [RGB_Input]
break
}
case 2:
// set input to RGB3
{
nRGB_VAL = 3
send_string dvPlasma,"'@G',13"
wait 20 send_string dvPlasma,"'%A1001',13"
SEND_STRING 0, "'%A1001',13"
On [RGB_Input]
break
}
case 3:
// set input to RGB1
{
nRGB_VAL = 1
send_string dvPlasma,"'@G',13"
wait 20 send_string dvPlasma,"'%A1002',13"
SEND_STRING 0, "'%A1002',13"
On [RGB_Input]
break
}
default:
{
nRGB_VAL = 1 // so it doesn't get stuck
send_string dvPlasma,"'@G',13"
wait 20 send_string dvPlasma,"'%A1002',13"
SEND_STRING 0, "'%A1002',13"
off [RGB_Input]
break
}
}
}
0
Comments
Not trying to be rude, but I didn't (attempt to) read your code. I'm assuming you have a "video" button somewhere along with your "rgb" button. When you press "rgb" and the system was currently displaying video, you want it to default to rgb 1, correct? Presses after that will step through rgb=2 -> rgb=3 -> rgb=1 -> rgb=2 -> etc., correct?
How about this:
Make sense? Anytime you go into video mode, the RGB variable gets set to 3 - we can do this since we don't care what RGB input we were on. The next time the rgb button is hit, the variable will be reset to 1. If you're already in rgb mode, the variable gets increased with each button press, then wraps back to 1 if it had been 3.
- Chip
Hey it to late for my recent code post but I do that from now on. Thank you for your help.