📄 display.c
字号:
Flag_Password_True=0;
L_Key_CANCEL = Key_CANCEL;
}
if(Command_Flag>0)
{
if(Check_Instruction_Statue(0x0500)==0x00)
{
/*系统配置备份*/
for(i=0;i<CONFIG_NUM;i++)
System_config_Old[i]=System_config[i];
//Screen_state =CmdReturn_True_Flag;
Dalog_Info_Show(0, 12, 0);
Command_Flag=0;
Screen_state =41;
}
else if(Check_Instruction_Statue(0x0500)==0x22)
{
Command_Flag=0;
Dalog_Info_Show(1, 12, 0);
}
}
}
//+++++++++++主菜单/实时数据++++++++++++++++++
// 二次测量值
// 一次测量值
// 实时遥信
// 实时电度
// 谐波分量
// 查看SOE
//+++++++++++++++++++++++++++++++++++++++++++++++++++
void Sample_Information_Menu(void)
{
UC i;
if(L_Screen_state!=11)
{
L_Screen_state=11;
cls();
Logo_Title();
LCDPrintf( 0,0,0,(char *)(&mainMenu[0][0]),10);
for(i=0;i<6;i++)
LCDPrintf( 1,1,(i+1)*16,(char *)secondMenu_sample[i],20);
SubMenuPosition=Father2_MenuPosition;
if(SubMenuPosition>3) SubMenuPosition = 0;
LCDPrintf( 0,1,(SubMenuPosition+1)*16,(char *)secondMenu_sample[SubMenuPosition],20);
Frame_Show(0);
}
if((Key_UP==0 )&&(L_Key_UP==1))
{
L_Key_UP = Key_UP;
LCDPrintf( 1,1,(SubMenuPosition+1)*16,(char *)secondMenu_sample[SubMenuPosition],20);
if( SubMenuPosition == 0) SubMenuPosition = 3;
else SubMenuPosition--;
LCDPrintf( 0,1,(SubMenuPosition+1)*16,(char *)secondMenu_sample[SubMenuPosition],20);
Frame_Show(0);
}
if((Key_DOWN==0 )&&(L_Key_DOWN==1))
{
L_Key_DOWN = Key_DOWN;
LCDPrintf( 1,1,(SubMenuPosition+1)*16,(char *)secondMenu_sample[SubMenuPosition],20);
if( SubMenuPosition == 3) SubMenuPosition = 0;
else SubMenuPosition++;
LCDPrintf( 0,1,(SubMenuPosition+1)*16,(char *)secondMenu_sample[SubMenuPosition],20);
Frame_Show(0);
}
if((Key_OK==0 )&&(L_Key_OK==1))
{
L_Key_OK=Key_OK;
Father2_MenuPosition=SubMenuPosition;
switch(SubMenuPosition)
{
case 0:
Screen_state =111;
break;
case 1:
Screen_state =112;
break;
case 2:
Screen_state =113;
break;
case 3:
Screen_state =116;//查看SOE
Returnto_Modify=16;
break;
default:
Screen_state=0;
break;
};
}
if((Key_CANCEL==0 )&&(L_Key_CANCEL==1))
{
Screen_state =1;
SubMenuPosition = 0;
L_Key_CANCEL = Key_CANCEL;
}
}
//主菜单/实时数据/二次测量值
void Second_Measurevalue(void)
{
if(L_Screen_state!=111)
{
L_Screen_state=111;
menupage= 0;
cls();
Logo_Title();
Second_Measurevalue_Show(menupage);
}
if((Key_UP==0 )&&(L_Key_UP==1))
{
L_Key_UP = Key_UP;
if( menupage == 0) menupage = 5;
else menupage--;
cls();
Logo_Title();
Second_Measurevalue_Show(menupage);
}
if((Key_DOWN==0 )&&(L_Key_DOWN==1))
{
L_Key_DOWN = Key_DOWN;
if( menupage == 5) menupage = 0;
else menupage++;
cls();
Logo_Title();
Second_Measurevalue_Show(menupage);
}
if(update_flag1==1)
{
update_flag1=0;
Second_Measurevalue_Show(menupage);
}
if((Key_CANCEL==0 )&&(L_Key_CANCEL==1))
{
Screen_state =11;
menupage = 0;
L_Key_CANCEL = Key_CANCEL;
}
}
void Second_Measurevalue_Show(UC page)
{ UC i,temp=0;
LCDPrintf( 0,0,0,"壹PT遥测值",12);
for(i=0;i<6;i++)
LCDPrintf( 1,1,(i+1)*16,(char *)Secondvalue1_Text[i+6*page],20);
switch(page)
{
case 0:
Bcd_show(1, 6, 16, YC_Value[Ua1],0, 1, 0,0);
//Angle_Show(1,6,32, YC_Value[Ua1_ANGLE],1,1);
Bcd_show(1, 6, 32, YC_Value[Ua1+1],0, 1, 0,0);
//Angle_Show(1,6,64,YC_Value[Ua1_ANGLE+2],1,1);
Bcd_show(1, 6, 48, YC_Value[Ua1+2],0, 1, 0,0);
//Angle_Show(1,6,96,YC_Value[Ua1_ANGLE+4],1,1);
Bcd_show(1, 6, 4*16, YC_Value[Ua1+3],0, 1, 0,0);
//Angle_Show(1,6,32,YC_Value[Ua1_ANGLE+6],1,1);
Bcd_show(1, 6, 5*16, YC_Value[Ua1+4],0, 1, 0,0);
//Angle_Show(1,6,64,YC_Value[Ua1_ANGLE+8],1,1);
Bcd_show(1, 6, 6*16, YC_Value[Ua1+5],0, 1, 0,0);
//Angle_Show(1,6,96,YC_Value[Ua1_ANGLE+10],1,1);
temp=3;
break;
case 1:
Bcd_show(1, 6, 16, YC_Value[Ua1+6],0, 1, 0,0);
//Angle_Show(1, 6, 32, YC_Value[Ua1_ANGLE+12],1, 1);
Bcd_show(1, 7, 32, YC_Value[Ua1+7],0, 1, 0,0);
//Angle_Show(1, 6, 64, YC_Value[Ua1_ANGLE+14],1, 1);
Bcd_show(1, 6, 48, YC_Value[Ua1+8],0, 1, 0,0);
//Angle_Show(1,6,96,YC_Value1[Ua3_ANGLE],1,1);
Bcd_show(1, 6, 4*16, YC_Value[Ua1+9],0, 1, 0,0);
//Angle_Show(1,6,32,YC_Value[Ua1_ANGLE+6],1,1);
Bcd_show(1, 6, 5*16, YC_Value[Ua1+10],0, 1, 0,0);
//Angle_Show(1,6,64,YC_Value[Ua1_ANGLE+8],1,1);
Bcd_show(1, 6, 6*16, YC_Value[Ua1+11],0, 1, 0,0);
//Angle_Show(1,6,96,YC_Value[Ua1_ANGLE+10],1,1);
temp=2;
break;
case 2:
Bcd_show(1, 6, 16, YC_Value[Ua1+12],0, 1, 0,0);
//Angle_Show(1, 6, 32, YC_Value[Ua1_ANGLE+12],1, 1);
Bcd_show(1, 6, 32, YC_Value[Ua1+13],0, 1, 0,0);
//Angle_Show(1, 6, 64, YC_Value[Ua1_ANGLE+14],1, 1);
Bcd_show(1, 6, 48, YC_Value[Ua1+14],0, 1, 0,0);
//Angle_Show(1,6,96,YC_Value1[Ua3_ANGLE],1,1);
Bcd_show(1, 7, 4*16, YC_Value[Ua1+15],0, 1, 0,0);
//Angle_Show(1,6,32,YC_Value[Ua1_ANGLE+6],1,1);
Bcd_show(1, 6, 5*16, YC_Value1[Ua3+0],0, 1, 0,0);
//Angle_Show(1,6,64,YC_Value[Ua1_ANGLE+8],1,1);
Bcd_show(1, 6, 6*16, YC_Value1[Ua3+1],0, 1, 0,0);
//Angle_Show(1,6,96,YC_Value[Ua1_ANGLE+10],1,1);
temp=2;
break;
case 3:
Bcd_show(1, 6, 16, YC_Value1[Ua3+2],0, 1, 0,0);
//Angle_Show(1, 6, 32, YC_Value1[Ua3_ANGLE+2],1, 1);
Bcd_show(1, 7, 32, YC_Value1[Ua3+3],0, 1, 0,0);
//Angle_Show(1, 6, 64, YC_Value1[Ua3_ANGLE+4],1, 1);
Bcd_show(1, 6, 48, YC_Value1[Ua3+4],0, 1, 0,0);
//Angle_Show(1,6,96,YC_Value1[Ua3_ANGLE+6],1,1);
Bcd_show(1, 6, 4*16, YC_Value1[Ua3+5],0, 1, 0,0);
//Angle_Show(1,6,32,YC_Value[Ua1_ANGLE+6],1,1);
Bcd_show(1, 6, 5*16, YC_Value1[Ua3+6],0, 1, 0,0);
//Angle_Show(1,6,64,YC_Value[Ua1_ANGLE+8],1,1);
Bcd_show(1, 7, 6*16, YC_Value1[Ua3+7],0, 1, 0,0);
//Angle_Show(1,6,96,YC_Value[Ua1_ANGLE+10],1,1);
temp=2;
break;
case 4:
Bcd_show(1, 6, 16, YC_Value1[Ua3+8],0, 1, 0,0);
//Angle_Show(1, 6, 32, YC_Value1[Ua3_ANGLE+8],1, 1);
Bcd_show(1, 6, 32, YC_Value1[Ua3+9],0, 1, 0,0);
//Angle_Show(1, 6, 64, YC_Value1[Ua3_ANGLE+10],1, 1);
Bcd_show(1, 6, 48, YC_Value1[Ua3+10],0, 1, 0,0);
//Angle_Show(1,6,96,YC_Value1[Ua3_ANGLE+12],1,1);
Bcd_show(1, 7, 4*16, YC_Value1[Ua3+11],0, 1, 0,0);
//Angle_Show(1,6,32,YC_Value[Ua1_ANGLE+6],1,1);
Bcd_show(1, 6, 5*16, YC_Value1[Ua3+12],0, 1, 0,0);
//Angle_Show(1,6,64,YC_Value[Ua1_ANGLE+8],1,1);
Bcd_show(1, 6, 6*16, YC_Value1[Ua3+13],0, 1, 0,0);
//Angle_Show(1,6,96,YC_Value[Ua1_ANGLE+10],1,1);
temp=2;
break;
case 5:
Bcd_show(1, 6, 16, YC_Value1[Ua3+14],0, 1, 0,0);
//Angle_Show(1, 6, 32, YC_Value1[Ua3_ANGLE+14],1, 1);
Bcd_show(1, 7, 32, YC_Value1[Ua3+15],0, 1, 0,0);
temp=1;
break;
default:break;
}
Frame_Show(temp);
}
//主菜单/实时数据/二次测量值
void Second_Measurevalue1(void)
{
if(L_Screen_state!=112)
{
L_Screen_state=112;
menupage= 0;
cls();
Logo_Title();
Second_Measurevalue1_Show(menupage);
}
if((Key_UP==0 )&&(L_Key_UP==1))
{
L_Key_UP = Key_UP;
if( menupage == 0) menupage = 3;
else menupage--;
cls();
Logo_Title();
Second_Measurevalue1_Show(menupage);
}
if((Key_DOWN==0 )&&(L_Key_DOWN==1))
{
L_Key_DOWN = Key_DOWN;
if( menupage == 3) menupage = 0;
else menupage++;
cls();
Logo_Title();
Second_Measurevalue1_Show(menupage);
}
if(update_flag1==1)
{
update_flag1=0;
Second_Measurevalue1_Show(menupage);
}
if((Key_CANCEL==0 )&&(L_Key_CANCEL==1))
{
Screen_state =11;
menupage = 0;
L_Key_CANCEL = Key_CANCEL;
}
}
void Second_Measurevalue1_Show(UC page)
{ UC i,temp=0;
LCDPrintf( 0,0,0,"壹站变遥测值",12);
for(i=0;i<6;i++)
LCDPrintf( 1,1,(i+1)*16,(char *)Secondvalue2_Text[i+6*page],20);
switch(page)
{
case 0:
Bcd_show(1, 6, 16, YC_Value[Ua_1],0, 1, 0,0);
//Angle_Show(1,6,32, YC_Value[Ua_1_ANGLE],1,1);
Bcd_show(1, 6, 2*16, YC_Value[Ua_1+1],0, 1, 0,0);
//Angle_Show(1,6,64,YC_Value[Ua_1_ANGLE+2],1,1);
Bcd_show(1, 6, 3*16, YC_Value[Ua_1+2],0, 1, 0,0);
//Angle_Show(1,6,96,YC_Value[Ua_1_ANGLE+4],1,1);
Bcd_show(1, 6, 4*16, YC_Value[Ia_1],0, 0, 0,0);
//Angle_Show(1,6,32,YC_Value[Ia_1_ANGLE],1,1);
Bcd_show(1, 6, 5*16, YC_Value[Ia_1+1],0, 0, 0,0);
//Angle_Show(1,6,64,YC_Value[Ia_1_ANGLE+2],1,1);
Bcd_show(1, 6, 6*16, YC_Value[Ia_1+2],0, 0, 0,0);
//Angle_Show(1,6,96,YC_Value[Ia_1_ANGLE+4],1,1);
temp=3;
break;
case 1:
temp=2;
Bcd_show(1, 6, 16, YC_Value1[Ua_2],0, 1, 0,0);
//Angle_Show(1,6,32, YC_Value1[Ua_2_ANGLE],1,1);
Bcd_show(1, 6, 2*16, YC_Value1[Ua_2+1],0, 1, 0,0);
//Angle_Show(1,6,64,YC_Value1[Ua_2_ANGLE+2],1,1);
Bcd_show(1, 6, 3*16, YC_Value1[Ua_2+2],0, 1, 0,0);
//Angle_Show(1,6,96,YC_Value1[Ua_2_ANGLE+4],1,1);
Bcd_show(1, 6, 4*16, YC_Value1[Ia_2],0, 0, 0,0);
//Angle_Show(1,6,32,YC_Value1[Ia_2_ANGLE],1,1);
Bcd_show(1, 6, 5*16, YC_Value1[Ia_2+1],0, 0, 0,0);
//Angle_Show(1,6,64,YC_Value1[Ia_2_ANGLE+2],1,1);
Bcd_show(1, 6, 6*16, YC_Value1[Ia_2+2],0, 0, 0,0);
//Angle_Show(1,6,96,YC_Value1[Ia_2_ANGLE+4],1,1);
break;
case 2:
Bcd_show(1, 6, 16, YC_Value[P_1],0, 2, 0,0);
Bcd_show(1, 6, 32, YC_Value[Q_1],0, 3, 0,0);
Bcd_show(1, 6, 48, YC_Value[Q_1+1],0, 2, 0,0);
Bcd_show(1, 6, 64, YC_Value[Q_1+2],0, 5, 0,0);
Bcd_show(1, 6, 80, YC_Value1[P_2],0, 2, 0,0);
Bcd_show(1, 6, 96, YC_Value1[Q_2],0, 3, 0,0);
temp=2;
break;
case 3:
Bcd_show(1, 6, 16, YC_Value1[Q_2+1],0, 2, 0,0);
Bcd_show(1, 6, 32, YC_Value1[Q_2+2],0, 5, 0,0);
temp=1;
break;
default:break;
}
Frame_Show(temp);
}
//主菜单/实时数据/实时遥信
void RealYX(void)
{
if(L_Screen_state!=113)
{
L_Screen_state=113;
SubMenuPosition = 0;menupage=0;
cls();
Logo_Title();
RealYX_Show(menupage, 100);
}
if(update_flag1==1)
{
update_flag1=0;
RealYX_Show(menupage, 100);
}
if((Key_UP==0 )&&(L_Key_UP==1))
{
L_Key_UP = Key_UP;
if( menupage== 0) menupage = 1;
else menupage--;
cls();
Logo_Title();
RealYX_Show(menupage, 100);
}
if((Key_DOWN==0 )&&(L_Key_DOWN==1))
{
L_Key_DOWN = Key_DOWN;
if( menupage== 1) menupage = 0;
else menupage++;
cls();
Logo_Title();
RealYX_Show(menupage, 100);
}
if((Key_CANCEL==0 )&&(L_Key_CANCEL==1))
{
Screen_state =11;
SubMenuPosition = 0;
L_Key_CANCEL = Key_CANCEL;
}
}
void RealYX_Show(UC page,UC select)
{ UC i,temp=0;
LCDPrintf( 0,0,0,"壹实时遥信",12);
for(i=0;i<6;i++)
LCDPrintf( 1,1,(i+1)*16,(char *)RealYX_Text[i+6*page],20);
switch(page)
{
case 0:
for(i=0;i<6;i++)
{
if(((System_Info.YX[0]>>i)&0x01)==0x01)
LCDPrintf( 1,12,(i+1)*16,"盒",4);/*合0*/
else
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -