📄 display.c
字号:
Dalog_Info_Show(1, 12, 0);
Command_Flag=0;
}
}
if((Key_CANCEL==0 )&&(L_Key_CANCEL==1))
{
Screen_state =21;
SubMenuPosition = 0;
L_Key_CANCEL = Key_CANCEL;
}
if((Key_UP==0 )&&(L_Key_UP==1))
{
L_Key_UP = Key_UP;
if(menupage==0) menupage=4;
else menupage--;
Fault_Record_Show(menupage);
}
if((Key_DOWN==0 )&&(L_Key_DOWN==1))
{
L_Key_DOWN = Key_DOWN;
if(menupage>=4) menupage=0;
else menupage++;
Fault_Record_Show(menupage);
}
}
void Fault_Record_Show(UC select)
{ UC i,temp=0,temp_erect=6;
cls();
Logo_Title();
LCDPrintf( 0,0,0,"壹故障报告",10);
Bcd_show(1, 11, 0, Fault_Num,0, 0, 0,2);
LCDPrintf( 1,13,0,(char *)"条",2);
switch(select)
{
case 0:
{ temp=3;
for(i=0;i<6;i++)
LCDPrintf( 1,1,(i+1)*16,(char *)LookSoe_Text[i],20);
Bcd_show(1,9, 1*16, Report_Buf_Show0.num, 0, 0, 0, 2);
Bcd_show(1,5, 2*16, Report_Buf_Show0.year, 0, 0, 0, 2);
Bcd_show(1,8, 2*16, Report_Buf_Show0.mon, 0, 0, 0, 2);
Bcd_show(1,11, 2*16, Report_Buf_Show0.day, 0, 0, 0, 2);
Bcd_show(1,3, 3*16, Report_Buf_Show0.hour, 0, 0, 0, 2);
Bcd_show(1,6, 3*16, Report_Buf_Show0.min, 0, 0, 0, 2);
Bcd_show(1,9, 3*16, Report_Buf_Show0.sec, 0, 0, 0, 2);
Bcd_show(1,12, 3*16, Report_Buf_Show0.msec, 0, 0, 0, 2);
LCDPrintf( 1,6,4*16,(char *)&Soe_Info_Text[(UC)(Check_SoeTable( Report_Buf_Show0.num))][0],8);
LCDPrintf( 1,2,5*16,(char *)&Soe_Info_Text[(UC)(Check_SoeTable( Report_Buf_Show0.num))][8],12);
if( Report_Buf_Show0.stu==0x02)
LCDPrintf( 1,6,6*16,"发生",6);
else if( Report_Buf_Show0.stu==0x01)
LCDPrintf( 1,6,6*16,"消失",6);
break;
}
case 1:
temp=2;
for(i=0;i<6;i++)
LCDPrintf( 1,1,(i+1)*16,(char *)Faultreport_Text[i],20);
Bcd_show(1,temp_erect, 1*16, (Report_Buf_Show0.Value[0]), 0, 1, 0, 0);
Bcd_show(1,temp_erect, 2*16, (Report_Buf_Show0.Value[1]), 0, 1, 0, 0);
Bcd_show(1,temp_erect, 3*16, (Report_Buf_Show0.Value[2]), 0, 1, 0, 0);
Bcd_show(1,temp_erect, 4*16, (Report_Buf_Show0.Value[3]), 0, 1, 0, 0);
Bcd_show(1,(temp_erect+1), 5*16, (Report_Buf_Show0.Value[4]), 0, 1, 0, 0);
Bcd_show(1,temp_erect, 6*16, (Report_Buf_Show0.Value[5]), 0, 1, 0, 0);
break;
case 2:
temp=2;
for(i=6;i<12;i++)
LCDPrintf( 1,1,((i-6+1)*16),(char *)Faultreport_Text[i],20);
Bcd_show(1,temp_erect, 1*16, (Report_Buf_Show0.Value[6]), 0, 1, 0, 0);
Bcd_show(1,temp_erect, 2*16, (Report_Buf_Show0.Value[7]), 0, 1, 0, 0);
Bcd_show(1,temp_erect, 3*16, (Report_Buf_Show0.Value[8]), 0, 1, 0, 0);
Bcd_show(1,(temp_erect+1), 4*16, (Report_Buf_Show0.Value[9]), 0, 1, 0, 0);
Bcd_show(1,temp_erect, 5*16, (Report_Buf_Show0.Value[10]), 0, 1, 0, 0);
Bcd_show(1,temp_erect, 6*16, (Report_Buf_Show0.Value[11]), 0, 1, 0, 0);
break;
case 3:
temp=2;
for(i=12;i<18;i++)
LCDPrintf( 1,1,((i-12+1)*16),(char *)Faultreport_Text[i],20);
Bcd_show(1,temp_erect, 1*16, (Report_Buf_Show0.Value[12]), 0, 1, 0, 0);
Bcd_show(1,temp_erect, 2*16, (Report_Buf_Show0.Value[13]), 0, 1, 0, 0);
Bcd_show(1,(temp_erect+1), 3*16, (Report_Buf_Show0.Value[14]), 0, 1, 0, 0);
Bcd_show(1,temp_erect, 4*16, (Report_Buf_Show0.Value[15]), 0, 1, 0, 0);
Bcd_show(1,temp_erect, 5*16, (Report_Buf_Show0.Value[16]), 0, 1, 0, 0);
Bcd_show(1,temp_erect, 6*16, (Report_Buf_Show0.Value[17]), 0, 1, 0, 0);
break;
case 4:
temp=1;
for(i=18;i<24;i++)
LCDPrintf( 1,1,((i-18+1)*16),(char *)Faultreport_Text[i],20);
Bcd_show(1,temp_erect, 1*16, (Report_Buf_Show0.Value[18]), 0, 1, 0, 0);
Bcd_show(1,(temp_erect+1), 2*16, (Report_Buf_Show0.Value[19]), 0, 1, 0, 0);
break;
default:
break;
}
Frame_Show(temp);
}
//--------------------------------------报告信息结束----------------------------------------
//++++++++++++++++++++++++++++++++++保护定值开始++++++++++++++++++++++++++++++++++++++++++++++++++++
// 定值组A
// 定值组B
// 定值组C
// 定值组D
// 切换定值组
// 复制定值组
// 写初始定值
//
//+++++++++++++++++++++++++++++++++
void FixedValue_Manage(void)
{
UC i;
if(L_Screen_state!=31)
{
L_Screen_state=31;
cls();
Logo_Title();
Command_Flag=0;menupage=Father2_page; ;
SubMenuPosition=Father2_MenuPosition;
if(SubMenuPosition>6) SubMenuPosition = 0;
FixedValue_Manage_Show(menupage, SubMenuPosition);
}
if(update_flag1==1) {update_flag1=0; Bcd_show(0,12,0,System_Info.DZ_Area, 0, 0,0, 3);}
if((Key_UP==0 )&&(L_Key_UP==1))
{
L_Key_UP = Key_UP;
if( SubMenuPosition == 0) SubMenuPosition = 6;
else SubMenuPosition--;
if((SubMenuPosition==6)||(SubMenuPosition==5))
{ if( menupage== 0) {menupage = 1;}
else { menupage--;}
cls();
Logo_Title();
}
FixedValue_Manage_Show(menupage, SubMenuPosition);
}
if((Key_DOWN==0 )&&(L_Key_DOWN==1))
{
L_Key_DOWN = Key_DOWN;
if( SubMenuPosition == 6) SubMenuPosition = 0;
else SubMenuPosition++;
if((SubMenuPosition==6)||(SubMenuPosition==0))
{ if( menupage>= 1) {menupage = 0;}
else { menupage++;}
cls();
Logo_Title();
}
FixedValue_Manage_Show(menupage, SubMenuPosition);
}
if((Key_CANCEL==0 )&&(L_Key_CANCEL==1))
{
Screen_state =1;
SubMenuPosition = 0;
Flag_Password_True=0;
L_Key_CANCEL = Key_CANCEL;
}
if((Key_OK==0 )&&(L_Key_OK==1))
{
L_Key_OK = Key_OK;
Father2_page =menupage;
Father2_MenuPosition=SubMenuPosition;
Father3_MenuPosition=0;
Father3_page=0;
switch(SubMenuPosition)
{
case 0: /*读定值及区号*/
case 1:
case 2:
case 3:
FixedValue_Num=SubMenuPosition;
MMI_DSP_Instruction(0x0600, FixedValue_Num, 0);
Dalog_Info_Show(0, 7, 0);
Command_Flag=1;
break;
case 4:
if(Flag_Password_True==1)
Screen_state=315;
else
Screen_state =110;//先检验密码
Returnto_Modify=130;
break;
case 5:
if(Flag_Password_True==1)
Screen_state=316;
else
Screen_state =110;
Returnto_Modify=131;
break;
case 6:
if(Flag_Password_True==1)
Screen_state=317;
else
Screen_state =110;
Returnto_Modify=132;
break;
default:
break;
};
L_Key_OK = Key_OK;
}
if(Command_Flag>0)
{
if(Check_Instruction_Statue(0x0600)==0x00)
{
Screen_state =311;
Command_Flag=0;
for(i=0;i<SETTING_NUM;i++)
System_setting_Old[i]=System_setting[i];
}
else if(Check_Instruction_Statue(0x0600)==0x22)
{ Dalog_Info_Show(1, 12, 0);
Command_Flag=0;
}
}
}
void FixedValue_Manage_Show(UC page ,UC select)
{
UC i,temp=0;
LCDPrintf( 0,0,0,(char *)(&mainMenu[2][0]),10);
for(i=0;i<6;i++)
LCDPrintf( 1,1,(i+1)*16,(char *)secondMenu_fixedvalue[i+page*6],20);
Bcd_show(0,12,0,System_Info.DZ_Area, 0, 0,0, 3);
LCDPrintf( 0,13,0,(char *)"组",2);
switch(page)
{
case 0:
temp=3;
for(i=0;i<6;i++)
{
if(select==i)
LCDPrintf( 0,1,(i-page*6+1)*16,(char *)secondMenu_fixedvalue[i],20);
else
LCDPrintf( 1,1,(i-page*6+1)*16,(char *)secondMenu_fixedvalue[i],20);
}
break;
case 1:
temp=1;
for(i=6;i<12;i++)
{
if(select==i)
LCDPrintf( 0,1,(i-page*6+1)*16,(char *)secondMenu_fixedvalue[i],20);
else
LCDPrintf( 1,1,(i-page*6+1)*16,(char *)secondMenu_fixedvalue[i],20);
}
break;
}
Frame_Show(temp);
}
void FixedValue_A(void)
{
if(L_Screen_state!=311)
{
L_Screen_state=311;
cls();Logo_Title();
menupage=Father3_page;
SubMenuPosition_temp=0;
SubMenuPosition = Father3_MenuPosition;
if(menupage>2) menupage=0;
if(SubMenuPosition>3) SubMenuPosition=0;
FixedValue_A_Show(menupage, SubMenuPosition);
}
if((Key_UP==0 )&&(L_Key_UP==1))
{
L_Key_UP = Key_UP;
if(SubMenuPosition==0)
SubMenuPosition=3;
else
SubMenuPosition--;
/* if((SubMenuPosition==5)||(SubMenuPosition==11))
{ if( menupage== 0) menupage = 1;
else menupage--;
}*/
FixedValue_A_Show(menupage, SubMenuPosition);
}
if((Key_DOWN==0 )&&(L_Key_DOWN==1))
{
L_Key_DOWN = Key_DOWN;
if(SubMenuPosition>=3)
SubMenuPosition=0;
else
SubMenuPosition++;
/* if((SubMenuPosition==6)||(SubMenuPosition==0))
{ if( menupage>= 1) menupage = 0;
else menupage++;
}*/
FixedValue_A_Show(menupage, SubMenuPosition);
}
if((Key_OK==0 )&&(L_Key_OK==1))
{
L_Key_OK = Key_OK;
Father3_MenuPosition=SubMenuPosition;
Father3_page=menupage;
if(SubMenuPosition<13)
Screen_state =31101;
PT_num=SubMenuPosition;
}
if((Key_CANCEL==0 )&&(L_Key_CANCEL==1))
{
if(Returnto_Save==110)
Screen_state =119;
else Screen_state =31;
SubMenuPosition = 0;
L_Key_CANCEL = Key_CANCEL;
}
}
void FixedValue_A_Show(UC page,UC select)
{ UC i,temp=0;
LCDPrintf(0,0,0,"叁定值组",10);
Bcd_show(0, 8, 0, FixedValue_Num, 0,0, 0, 3);
for(i=0;i<6;i++)
LCDPrintf( 1,1,(i+1)*16,(char *)FixedValue_index[page*6+i],20);
switch(page)
{
case 0:
temp=0;
for(i=0;i<6;i++)
{
if(select==i)
LCDPrintf( 0,1,(i+1)*16,(char *)FixedValue_index[i],20);
else
LCDPrintf( 1,1,(i+1)*16,(char *)FixedValue_index[i],20);
}
break;
case 1:
temp=1;
for(i=6;i<12;i++)
{
if(select==i)
LCDPrintf( 0,1,(i-6+1)*16,(char *)FixedValue_index[i],20);
else
LCDPrintf( 1,1,(i-6+1)*16,(char *)FixedValue_index[i],20);
}
break;
default:
break;
};
Frame_Show(temp);
}
//********************定值组A-突变量启动******************************
void FixedValue_A_FYGI(void)
{
if(L_Screen_state!=31101)
{
L_Screen_state=31101;
SubMenuPosition = 0; menupage=0;
FixedValue_A_FYGI_Show(menupage,100) ;
}
if((Key_UP==0 )&&(L_Key_UP==1))
{
L_Key_UP = Key_UP;
if( menupage== 0) {menupage = 2;}
else { menupage--;}
FixedValue_A_FYGI_Show(menupage,100) ;
}
if((Key_DOWN==0 )&&(L_Key_DOWN==1))
{
L_Key_DOWN = Key_DOWN;
if( menupage>= 2) {menupage = 0;}
else {menupage++;}
FixedValue_A_FYGI_Show(menupage,100) ;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -