📄 exper.c
字号:
for(i=0;i<5;i++)
{
OpenOSDWindow(j,i,0,25+i,14,j+3,1); //Move right
delay(40);
}
}
delay(80);
for(j=0;j<4;j++)
{
for(i=7;i>=0;i--)
{
OpenOSDWindow(j,15-i,7-i,21+i,7+i,j+1,1); //Zoom out
delay(40);
}
}
delay(80);
//AnyKeyExit();
}
void Frame_vhdelay()
{
uchar j;
int i;
Frame_nextflag=0;//set the flag
ClearOSD();
//InitOSD();
TurnOSD(1);
ResetKey();
OpenOSDWindow(1,0,0,27,12,blue,0);
OpenOSDWindow(0,0,1,27,8,cyan,0);
gotoxy(5,0);
PrintString(Verthortmsg,15,white);
gotoxy(3,4);
Putuserchar(UP,yellow);
gotoxy(10,4);
Putuserchar(DOWN,yellow);
gotoxy(17,4);
Putuserchar(LEFT,yellow);
gotoxy(24,4);
Putuserchar(RIGHT,yellow);
gotoxy(5,10);
PrintString(FrameSw1,18,white);
gotoxy(5,11);
PrintString(FrameSw4,12,white);
//gotoxy(5,12);
//PrintString(FrameSw6,12,white);
ResetKey();//add here ,cant add inside Frame_keycontrol
for(i=0;i<5;i++)//detect the key press in 1 second
{delay(100);
Frame_keycontrol();
}
//this programe have the function to pause,go on,goto next test ,and stop the whole test
SendOSDCmd(4,3,red);//make the up character to be red
ResetKey();//add here ,cant add inside Frame_keycontrol
for(j=VertPosition;j>0;j--) ///add the keypress function in the for
{if(Frame_nextflag==0)//judge if the nexttest key press?
{SendOSDCmd(15,12,j);//window move up
delay(30);
Frame_keycontrol();//detect the keypress
}
else break;
}
SendOSDCmd(4,3,yellow);
SendOSDCmd(4,10,red);
ResetKey();//add here ,cant add inside Frame_keycontrol
for(;j<Test_Movedown;j++)
{if(Frame_nextflag==0)
{SendOSDCmd(15,12,j);//window move down
delay(30);
Frame_keycontrol();//detect the keypress
}
else break;
}
SendOSDCmd(4,3,red);
SendOSDCmd(4,10,yellow);
ResetKey();//add here ,cant add inside Frame_keycontrol
for(;j>=VertPosition;j--)
{if(Frame_nextflag==0)
{
SendOSDCmd(15,12,j);//back to the original position
delay(30);
Frame_keycontrol();//detect the keypress
}
else break;
}
SendOSDCmd(4,17,red);
SendOSDCmd(4,3,yellow);
ResetKey();//add here ,cant add inside Frame_keycontrol
for(j=HorrPosition;j>0x12;j--)
{if(Frame_nextflag==0)
{
SendOSDCmd(15,13,j);//move left
delay(30);
Frame_keycontrol();//detect the keypress
}
else break;
}
SendOSDCmd(4,17,yellow);
SendOSDCmd(4,24,red);
ResetKey();//add here ,cant add inside Frame_keycontrol
for(;j<0x3f;j++)
{if(Frame_nextflag==0)
{
SendOSDCmd(15,13,j);//right
delay(30);
Frame_keycontrol();//detect the keypress
}
else break;
}
SendOSDCmd(4,17,red);
SendOSDCmd(4,24,yellow);
ResetKey();//add here ,cant add inside Frame_keycontrol
for(;j>=HorrPosition;j--)
{if(Frame_nextflag==0)
{
SendOSDCmd(15,13,j);//back to the original position
delay(30);
Frame_keycontrol();//detect the keypress
}
else break;
}
/* if((KeySelect6==1)&&(KeyLayer4==1))
{
//OSDBoxDemosl(0,9,9,3,0,yellow);
delay(150);
KeyLayer4=0;
KeyLayer3=1;
SecondMenuFlg=1;
ResetKey();
ClearOSD();
}*/
SecondMenuFlg=1;
}
void Frame_chheight()
{
static uchar chhx;
int i;
uchar j;//record the chheight
Frame_nextflag=0;//set the flag
ClearOSD();
//InitOSD();
TurnOSD(1);
OpenOSDWindow(1,0,0,27,12,blue,0);
OpenOSDWindow(0,0,1,27,8,cyan,0);
gotoxy(5,0);
PrintString(Chhmsg,12,white);
gotoxy(8,3);
for(i=0;i<10;i++)
Putuserchar(Chheightup[i],yellow);
//OSDBoxDemosl(1,4,9,3,0,yellow);
gotoxy(8,4);
for(i=0;i<10;i++)
Putuserchar(Chheightdown[i],yellow);
//OSDBoxDemosl(1,5,9,3,0,yellow);
gotoxy(8,5);
for(i=0;i<10;i++)
Putuserchar(Rowspaceup[i],yellow);
//OSDBoxDemosl(1,6,9,3,0,yellow);
gotoxy(8,6);
for(i=0;i<10;i++)
Putuserchar(Rowspacedown[i],yellow);
gotoxy(5,10);
PrintString(FrameSw1,18,white);
gotoxy(5,11);
PrintString(FrameSw4,12,white);
//gotoxy(5,12);
//PrintString(FrameSw6,12,white);
ResetKey();//add here ,cant add inside Frame_keycontrol
for(i=0;i<5;i++)//detect the key press in 1 second
{delay(100);
Frame_keycontrol();
}
SendOSDCmd(4,17,red);
ResetKey();//add here ,cant add inside Frame_keycontrol
for(j=ChHeight;j<Test_Chhigh;j++)//make character to be higher
{if(Frame_nextflag==0)
{
chhx=j&0x1f;
if(chhx==0x11)
j=j+14;
SendOSDCmd(15,14,j);
Frame_keycontrol();//detect the keypress
}
else break;
delay(50);
}
SendOSDCmd(3,17,red);
SendOSDCmd(4,17,yellow);
ResetKey();//add here ,cant add inside Frame_keycontrol
for(;j>0x20;j--)//lower to 20
{if(Frame_nextflag==0)
{
chhx=j&0x1f;
if(chhx==0x00)
j=j-14;
SendOSDCmd(15,14,j);
Frame_keycontrol();//detect the keypress
}
else break;
delay(50);
}
SendOSDCmd(3,17,yellow);
SendOSDCmd(6,17,red);
ResetKey();//add here ,cant add inside Frame_keycontrol
for(;rspace<Test_Rowhigh;rspace++)//row space bigger
{if(Frame_nextflag==0)
{
SendOSDCmd(15,16,rspace);
Frame_keycontrol();//detect the keypress
}
else break;
delay(50);
}
SendOSDCmd(6,17,yellow);
SendOSDCmd(5,17,red);
ResetKey();//add here ,cant add inside Frame_keycontrol
for(;rspace>0;rspace--)
{if(Frame_nextflag==0)
{
SendOSDCmd(15,16,rspace);//smaller to 0
Frame_keycontrol();//detect the keypress
}
else break;
delay(50);
}
SecondMenuFlg=1;
TurnOSD(1);
}
void Framefmat()
{
int i,j;
Frame_nextflag=0;
//InitOSD();
ClearOSD();
TurnOSD(1);
OpenOSDWindow(0,0,0,27,12,blue,0);
gotoxy(5,0);
PrintString(FontMatrix,11,white);
gotoxy(4,4);
PrintString(Font16,17,yellow);
//OSDBoxDemosl(1,4,4,3,0,yellow);
gotoxy(4,6);
PrintString(Font18,17,yellow);
ResetKey();//add here ,cant add inside Frame_keycontrol
for(i=0;i<5;i++)//detect the key press in 1 second
{delay(100);
Frame_keycontrol();
}
ResetKey();//add here ,cant add inside Frame_keycontrol
for(i=0;i<2;i++)
{if(Frame_nextflag==0)
{for(j=4;j<=21;j++)
SendOSDCmd(4,j,yellow);//make the "12*16" to be yellow
for(j=4;j<=21;j++)
SendOSDCmd(6,j,red);//make the "12*18" to be red
if (ChangeHORRflag==0)
SendOSDCmd(15,18,0x4c|VCOAddDec);/*****12*18matrix********/
else SendOSDCmd(15,18,0x4f);
}
else break;//jump out
for(j=0;j<7;j++)//detect the key press
{
delay(100);
Frame_keycontrol();
}
for(j=4;j<=21;j++)
SendOSDCmd(4,j,red);//make the "12*16" to be red
for(j=4;j<=21;j++)
SendOSDCmd(6,j,yellow);//make the "12*18" to be yellow
if(Frame_nextflag==0)
{
if(ChangeHORRflag==0)
SendOSDCmd(15,18,0x0c|VCOAddDec);/*****12*16matrix******/
else SendOSDCmd(15,18,0x0f);
}
else break;//jump out of the for()
for(j=0;j<4;j++)//detect the key press
{
delay(100);
Frame_keycontrol();
}
}
/*if((KeySelect6==1)&&(KeyLayer4==1))
{
//OSDBoxDemosl(0,9,9,3,0,yellow);
delay(150);
KeyLayer4=0;
KeyLayer3=1;
SecondMenuFlg=1;
ResetKey();
ClearOSD();
}*/
SecondMenuFlg=1;
//InitOSD();
//TurnOSD(1);
}
void SendMtv212(uchar freqselt)
{
uchar buf[4];
uchar checkout;
buf[0]=0x7c;
checkout=0xff & (buf[0]+freqselt);
buf[1]=0x0ff & freqselt;
buf[2]=checkout;
SendIIC(buf,3);
}
/*
void SelectFreq()
{
ResetKey();
ClearOSD();
InitOSD();
TurnOSD(1);
OpenOSDWindow(0,3,3,20,10,blue,0);
while(1);
}
*/
void SendHORR(uchar h_del,uchar v_del,uchar chh,uchar vco,uchar horr)
{
SendOSDCmd(15,15,horr);
SendOSDCmd(15,18,vco);
SendOSDCmd(15,12,v_del);
SendOSDCmd(15,13,h_del);
SendOSDCmd(15,14,chh);
}
void ChangeHORR(uchar hflag)
{
uchar HORRVA;
delay(250); //waiting for freq change finish
ClearOSD();
//InitOSD();
TurnOSD(1);
KeyLayer1=0;
KeyLayer2=0;
KeyLayer3=0;
KeyLayer4=1;
ResetKey();
switch(hflag)
{
case 1:
//Initmoudletest31();
//SendHORR(0x0b,0x20,0x05,0x42,0x28);
InitOSD31();
break;
case 2:
//Initmoudletest47();
//SendHORR(0x09,0x39,0x05,0x42,0x28);
InitOSD47();
break;
case 3:
//Initmoudletest63();
//SendHORR(0x09,0x55,0x05,0x42,0x28);
InitOSD63();
break;
case 4:
//Initmoudletest95();
//SendHORR(0x06,0x75,0x05,0x42,0x28);
InitOSD95();
break;
HORRVA=0x28;
}
OpenOSDWindow(0,0,0,29,14,cyan,0);
gotoxy(1,2);
PrintString(Horr28h,28,yellow);
gotoxy(1,4);
PrintString(Horr3ch,28,yellow);
gotoxy(1,6);
PrintString(Horr50h,28,yellow);
gotoxy(1,8);
PrintString(Horr68h,28,yellow);
gotoxy(1,10);
PrintString(Horr7fh,28,yellow);
gotoxy(1,12);
PrintString(Exit,8,red);
WaitKeyup();//**************
while(KeyLayer4!=0)
{
if((KeySelect1==1)&&(KeyLayer4==1))
{
delay(50);
ResetKey();
switch(hflag)
{
case 1:
SendHORR(0x0b,0x20,0x05,0x4e,0x28); /****************/
break;
case 2:
SendHORR(0x09,0x39,0x05,0x4e,0x28);
break;
case 3:
//SendHORR(0x06,0x55,0x05,0x4e,0x28);
SendHORR(0x0a,0x55,0x05,0x4e,0x28);
break;
case 4:
//SendHORR(0x06,0x65,0x05,0x4e,0x28);
SendHORR(0x0a,0x65,0x05,0x4e,0x28);
break;
HORRVA=0x28;
}
}
if((KeySelect2==1)&&(KeyLayer4==1))
{
delay(50);
ResetKey();
switch(hflag)
{
case 1:
SendHORR(0x20,0x20,0x04,0x4e,0x3c);
break;
case 2:
SendHORR(0x19,0x40,0x04,0x4e,0x3c);
break;
case 3:
//SendHORR(0x18,0x55,0x04,0x4e,0x3c);
SendHORR(0x25,0x55,0x04,0x4e,0x3c);
break;
case 4:
//SendHORR(0x17,0x65,0x04,0x4e,0x3c);
SendHORR(0x25,0x65,0x04,0x4e,0x3c);
break;
HORRVA=0x3c;
}
}
if((KeySelect3==1)&&(KeyLayer4==1))
{
delay(50);
ResetKey();
ChangeHORRflag=1;
switch(hflag)
{
case 1:
SendHORR(0x3c,0x20,0x03,0x4f,0x50);
break;
case 2:
SendHORR(0x36,0x40,0x03,0x4f,0x50);
break;
case 3:
//SendHORR(0x34,0x55,0x03,0x4f,0x50);
SendHORR(0x40,0x65,0x03,0x4f,0x50);
break;
case 4:
//SendHORR(0x30,0x75,0x03,0x4f,0x50);
SendHORR(0x40,0x75,0x03,0x4f,0x50);
break;
HORRVA=0x50;
}
}
if((KeySelect4==1)&&(KeyLayer4==1))
{
delay(50);
ResetKey();
ChangeHORRflag=1;
switch(hflag)
{
case 1:
SendHORR(0x58,0x20,0x02,0x4f,0x68);
break;
case 2:
SendHORR(0x50,0x45,0x02,0x4f,0x68);
break;
case 3:
//SendHORR(0x48,0x55,0x02,0x4f,0x68);
SendHORR(0x50,0x65,0x02,0x4f,0x68);
break;
case 4:
//SendHORR(0x45,0x65,0x02,0x4f,0x68);
SendHORR(0x50,0x75,0x02,0x4f,0x68);
break;
HORRVA=0x68;
}
}
if((KeySelect5==1)&&(KeyLayer4==1))
{
delay(50);
ResetKey();
ChangeHORRflag=1;
switch(hflag)
{
case 1:
SendHORR(0x75,0x20,0x01,0x4f,0x7f);
break;
case 2:
SendHORR(0x63,0x45,0x01,0x4f,0x7f);
break;
case 3:
//SendHORR(0x63,0x55,0x01,0x4f,0x7f);
SendHORR(0x70,0x65,0x01,0x4f,0x7f);
break;
case 4:
//SendHORR(0x60,0x65,0x01,0x4f,0x7f);
SendHORR(0x70,0x75,0x01,0x4f,0x7f);
break;
HORRVA=0x7f;
}
}
if((KeySelect6==1)&&(KeyLayer4==1))
{
delay(200);
KeyLayer4=0;
KeyLayer3=1;
KeyLayer2=0;
KeyLayer1=0;
ResetKey();
ThirdMenuFlg=1;
MainMenuFlg=0;
SecondMenuFlg=0;
WaitKeyup();//**************
ClearOSD();
//Initmoudletest31();
//break;
}
}/*
switch(hflag)
{
case 1:
Initmoudletest31();
break;
case 2:
break;
case 3:
break;
case 4:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -