Switching Video modes
David_w
Posts: 23
What kind of command would I use to switch Video modes, video to s-video back to video using the same button. I have try the below code but it stays in S-video mode. It will go from Video to S-video but remain there inless I go to RGB and start over.
IF (!Video_Input)
{
send_string dvPlasma,"'@G',13"
wait 20 send_string dvPlasma,"'%A1012',13"
SEND_STRING 0, "'%A1012',13"
Off [RGB_Input]
On [Video_Input]
}
Else IF(Video_Input)
{
send_string dvPlasma,"'@G',13"
wait 20 send_string dvPlasma,"'%A1014',13"
SEND_STRING 0, "'%A1014',13"
On[Video_Input]
Off [RGB_Input]
}
Else IF(Video_Input)
{
send_string dvPlasma,"'@G',13"
wait 20 send_string dvPlasma,"'%A1012',13"
SEND_STRING 0, "'%A1012',13"
On[Video_Input]
Off [RGB_Input]
}
}
IF (!Video_Input)
{
send_string dvPlasma,"'@G',13"
wait 20 send_string dvPlasma,"'%A1012',13"
SEND_STRING 0, "'%A1012',13"
Off [RGB_Input]
On [Video_Input]
}
Else IF(Video_Input)
{
send_string dvPlasma,"'@G',13"
wait 20 send_string dvPlasma,"'%A1014',13"
SEND_STRING 0, "'%A1014',13"
On[Video_Input]
Off [RGB_Input]
}
Else IF(Video_Input)
{
send_string dvPlasma,"'@G',13"
wait 20 send_string dvPlasma,"'%A1012',13"
SEND_STRING 0, "'%A1012',13"
On[Video_Input]
Off [RGB_Input]
}
}
0
Comments
IF ( NOT A ) { }
ELSE IF ( A ) { }
ELSE IF ( A ) { }
I'm not 100% sure what you're trying to do or what all those variables are for, but you should rethink your logic.
Button press 1:
Goes to Video mode
Button Press 2
Goes to S-Video mode
Button Press 3
Goes back to Video mode.
and the cycle repeats every time I hit the button.
You are using "Video_Input" as a test. You are turning it on, but not off. So the code block for Video will run only the first time, but not after. You need to change "Video_Input" to off when you are going to S-Video. Also as mpullin says, you don't need the last block of code.
Hey, I am really confused on where the nRGB_Val 1,2,3 are set at. I dont understand how do define it. I believe it to be a Variable because it would change cause of RS-232 codes that need to be sent. Is that correct? Are the cases going to look like this:
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,"'%A1000',13"
SEND_STRING 0, "'%A1000',13"
off [RGB_Input]
break
}
}
Hey it works, Thank you so much... I figured something out with help of course. Thanks again.