display.c
资源名称:gca-150A.rar [点击查看]
上传用户:jndfzc
上传日期:2014-06-02
资源大小:325k
文件大小:149k
源码类别:
单片机开发
开发平台:
Others
- //#################################################
- // 2006年11月
- // Ver 1.0
- // GCA-150A
- // 完成人:黄光林
- //modify: 2006-11
- //#################################################
- #include "Define.h"
- #include "maindef.h"
- #include "LCD.h"
- #include "Display.h"
- #include "table.H"
- #include "P103_mmi2dsp.h"
- /******************ARM TO DSP 交换数据所需的变量*********************888*/
- UC Return_flag;
- UC Flag_Password_True=0;
- UI YC_Value[YC_NUM]; /*数组存所有YC数据*/
- UI YC_Value1[YC_NUM]; /*数组存所有YC数据*/
- short YC_POWER_P;//有功功率
- short YC_POWER_Q;//无功功率
- struct System_Info_fm System_Info; //实时信息
- unsigned char TargetArea; //目标区(用于复制定值)
- unsigned char SourceArea; //原始区(用于复制定值)
- struct SOE_Buf_Show_fm SOE_Buf_Show0; //存放SOE的缓冲区
- struct Report_Buf_Show_fm Report_Buf_Show0;
- struct SoftInformation_fm SoftInformation;
- struct Setting_Copy_fm Setting_Copy;
- struct Setting_Switch_fm Setting_Switch;
- struct Output_Test_YK_fm Output_Test_YK;
- struct Channel_Ration_Flag_fm Channel_Ration_Flag;
- struct YYB_Modify_Flag_fm YYB_Modify_Flag;
- struct Fault_Recode_Flag_fm Fault_Recode_Flag; //召唤故障报告/SOE缓冲区
- struct Harmonic_Value_fm Harmonic_Value;
- struct Time_buf realtime;
- struct Time_buf realtime1; //实时时钟修改用
- unsigned int System_config[CONFIG_NUM]; //系统配置
- unsigned int System_setting[SETTING_NUM]; //定值
- /*+++++++++++++++++++++++++++++++内部用+++++++++++++++++++++++++*/
- UI System_config_Old[CONFIG_NUM]; //系统配置
- UI System_setting_Old[SETTING_NUM]; //定值
- UI YC_Value1_Change[10];
- UI Screen_state = 1;
- UI L_Screen_state = 0;
- UI Outport_FixedValue=0;
- UC SubMenuPosition=0, menupage=0,SubMenuPosition_temp=0;
- UC Father1_MenuPosition=0,Father2_MenuPosition=0,Father3_MenuPosition=0;
- UC Father2_page=0,Father3_page=0;
- UC CT_Type=0,Select_CT_Type=0,Auto_CT_Type=0;
- UI temp1=0;
- UC PassWordNum,PassWordchanged=0;
- UI PASSWord_temp,PASSWord;
- UI Returnto_Modify;
- /*
- 修改返回地址
- 0 系统信息
- 4 自动调整
- 5 手动调整
- 6 时钟调整
- 7 TA 参数
- 8 TV参数
- 9 开出传动
- 10 端口信息
- 11 压板投退
- 12 遥信参数
- 101~112 定值修改
- 116 查看SOE
- 211 事件报告
- 212 故障简报
- 213 操作记录
- */
- UI Returnto_Save;
- /*
- 保存返回地址
- 5 手动调整
- 6 时钟调整
- 7 TA 参数
- 8 TV参数
- 9
- 10 端口信息
- 11 压板投退
- 12 遥信参数
- 18 遥分操作
- 19 遥合操作
- 20~30 开出传动
- 101~112 定值修改
- */
- UC Key_UP,Key_DOWN,Key_LEFT,Key_RIGHT,Key_OK,Key_CANCEL,Key_FUGUI,Key_ADD,Key_SUB;
- UC L_Key_UP,L_Key_DOWN,L_Key_LEFT,L_Key_RIGHT,L_Key_OK,L_Key_CANCEL,L_Key_FUGUI,L_Key_ADD,L_Key_SUB;
- UC Key_ADD_Long,Key_SUB_Long;
- UC FixedValue_Num=0;//临时定值区号
- UC FixedValue_Switch_Num=0;//定值切换区号
- UC PC_Comm_Flag=0;
- UC New_Information_Flag=0;
- UI Rs485_Baud;//通信参数用
- UC Sametime_Phase=0;
- UC time_modify_flag=0;
- UC update_flag1=0;
- UC Output_Select_Flag=0;//开出传动用
- UC Harmonic_Num=2;
- UC Soe_Num=0;
- UC Fault_Num=0;
- UC Command_Flag=0;
- UI Cmd_ArmToDsp;
- UI CmdReturn_True_Flag=0;
- UI CmdReturn_Erro_Flag=0;
- UC Cmd_Exectue_Flag=0;
- UC CmdExectue_Erro_Flag=0;
- UC PT_num;
- struct Limit
- {
- UI Low_Limit;
- UI Up_Limit;
- UI step_Size;
- }; //下限上限步长
- const struct Limit PT_Limit={0,250,1};//*10
- const struct Limit PT_FF_Limit={0,400,1};//*10
- const struct Limit CT_YF_Limit={0,5000,1};
- const struct Limit CT_FF_Limit={1,5,4};
- const struct Limit YXTime_Limit={0,32000,1};
- const struct Limit YMBase_Limit={0,999999999,1};
- const struct Limit FXP_Limit={10,20000,1};
- const struct Limit P_Limit={50,20000,1};
- const struct Limit IntegralWidth_Limit={0,250,1};
- const struct Limit Control_Word_Limit={0,1,1};
- const struct Limit FXCurrent_Limit={5,9999,1};//*100
- const struct Limit GZCurrent_Limit={5,9999,1};//*100
- const struct Limit Current_Limit={5,9999,1};//*100
- const struct Limit Voltage_Limit={50,15000,1};//*100
- const struct Limit GVoltage_Limit={50,15000,1};//*100
- const struct Limit Time_Limit={3,9999,1};//*100
- const struct Limit PTime_Limit={3,20000,1};//*100
- const struct Limit KZD_Limit={0,100,1};
- const struct Limit K_Limit={20,9999,1};
- const struct Limit Freq_limit={4000,6000,1};//*100
- const struct Limit GFreq_limit={4000,6000,1};//*100
- const struct Limit Huacha_limit={0,1000,1};
- const struct Limit Changle_limit={0,9000,100};//*10重合角度
- const struct Limit Channel_limit={8000,12000,1};//*10
- const struct Limit Harmonic_limit={2,23,1};//谐波次数
- const struct Limit XBGJ_limit={0,100,1};//谐波告警
- const UI Setting_Init[SETTING_NUM]=
- {0,0,7000,100,7000,100,11000,100,11000,100,
- 5000,100,7000,100,7000,100,11000,100,11000,100,
- 5000,100,7000,100,7000,100,11000,100,11000,100,
- 5000,100,7000,100,7000,100,11000,100,11000,100,
- 5000,100,
- };
- const UI Config_Init[CONFIG_NUM]=
- { 1, 9600, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
- 100,
- };
- extern UC display_buf[20];
- extern UC ucsigned_60s;
- extern US ucsigned_60s_Count;
- extern UC ucsigned_1000ms_flag;
- //++++++++++++++++++++++++++++++函数声明区++++++++++++++++++++++++++++++++++
- void Dalog_Info_Show(UC value,UC key,UC type);
- void FirstRun_Bmp_View(void);
- void Second_Measurevalue_Show(UC page);
- void Second_Measurevalue1_Show(UC page);
- void Run_Bmp_Value_Show(void);
- void RealYX_Show(UC page,UC select);
- void RealPower_Show(UC page);
- void Screen_MainMenu(void);
- void ViewPassword(UC num);
- void Comm_Information_Show(UC page,UC select);
- void YxTime_Value_Show(UC page,UC select);
- void Yaban_Control_Show(UC page,UC select );//压板
- void Yaban_Control_Modify(void);
- void System_Config_Show(UC page,UC select);
- void Outport_Test_Show(UC page,UC select);
- void Channel_Adjust_Manual(void);
- void Channel_Value_Show(UC page,UC select) ;
- void Channel_Adjust_Auto(void);
- void Function_Introduction(void);
- void Version_Show(void);
- void System_Reset(void);
- void FixedValue_A_Show(UC page,UC select);
- void Fault_Record_Show(UC select);
- void Look_Soe_Show(void);
- void FixedValue_Manage_Show(UC page ,UC select);
- void System_Help_show(UC select);
- void FixedValue_A_FYGI_Show(UC page,UC select );//定值组A-零序过流
- void FixedValue_A_FYGI_Modify(void);/*定值组A-零序过流*/
- void Outport_Setting_Show(UC page ,UC select);
- void Outport_Value_Show(UC page,UC select);
- void New_Information(void);
- void Frame_Show(UC select);
- void Data_Save(void);
- void Data_Select_Save(void);
- void Data_Select_show(UC select);
- //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- //+++++++++++++++++++++++++++++++++++++++++++++++++
- //
- // 函数原代码区
- //+++++++++++++++++++++++++++++++++++++++++++++++++
- void delayfor(long count)
- {
- long i,j;
- for(i=0;i<count;i++)
- for(j=0;j<10;j++);
- }
- /*显示定值组*/
- /*键盘检查*/
- void Updata_key(US Key)
- {
- static UC ucTempADD=0,ucTempSUB=0;
- L_Key_UP = Key_UP;
- L_Key_DOWN = Key_DOWN;
- L_Key_LEFT = Key_LEFT;
- L_Key_RIGHT = Key_RIGHT;
- L_Key_OK = Key_OK;
- L_Key_CANCEL = Key_CANCEL;
- L_Key_FUGUI = Key_FUGUI;
- L_Key_ADD= Key_ADD;
- L_Key_SUB= Key_SUB;
- if( (Key&0x1ff) != 0x1ff)
- {System_Info.MMI_Statue=0x00;ucsigned_60s=0;ucsigned_60s_Count=0;}
- if( (Key&0x02) != 0) Key_CANCEL = 0;
- else Key_CANCEL = 1;
- if( (Key&0x0080) != 0) Key_LEFT = 0;
- else Key_LEFT = 1;
- if( (Key&0x0040) != 0) Key_DOWN= 0;
- else Key_DOWN= 1;
- if( (Key&0x0020) != 0) Key_UP = 0;
- else Key_UP = 1;
- if( (Key&0x0100) != 0) Key_RIGHT= 0;
- else Key_RIGHT = 1;
- if( (Key&0x0001) != 0) Key_OK = 0;//0x004
- else Key_OK = 1;
- if( (Key&0x0010) != 0) Key_ADD = 0;//0x0008
- else Key_ADD = 1;
- if( (Key&0x0008) != 0) Key_SUB = 0;//0x0010
- else Key_SUB = 1;
- if( (Key&0x004) != 0) Key_FUGUI = 0;//0x0001
- else Key_FUGUI = 1;
- /*ADD*/
- if( Key_ADD==1 )
- {
- ucTempADD++;
- if( ucTempADD > 50 )
- { ucTempADD=45; Key_ADD_Long=1; }
- }
- else
- {
- // if( ucTempADD > 5 ) { Key_Up_Change=1; } /*按键*/
- ucTempADD=0; Key_ADD_Long=0;
- }
- /*SUB*/
- if( Key_SUB==1 )
- {
- ucTempSUB++;
- if( ucTempSUB > 50 )
- { ucTempSUB=45; Key_SUB_Long=1; }
- }
- else
- {
- // if( ucTempDown > 5 ) { Key_Down_Change=1; } /*按键*/
- ucTempSUB=0; Key_SUB_Long=0;
- }
- }
- //############################################################
- // 以下为菜单结构程序:
- //
- //
- // 第一部分
- //############################################################
- void Screen_Logo(void)
- {
- if(L_Screen_state!=0)
- {
- Logo_View();
- L_Screen_state=0;
- }
- if((Key_OK==0 )&&(L_Key_OK==1))
- {
- Screen_state =1;
- L_Key_OK = Key_OK;
- }
- }
- /*一次系统运行图*/
- void FirstRun_Bmp_View(void)
- {
- if(L_Screen_state!=2)
- {
- Run_Bmp_View();
- //Run_Bmp_Value_Show();
- State_Time_Show();
- L_Screen_state=2;
- }
- if((Key_OK==0 )&&(L_Key_OK==1))
- {
- Screen_state =1;
- L_Key_OK = Key_OK;
- }
- }
- //++++++++++++++主菜单++++++++++++++++++
- // 实时数据
- // 报告信息
- // 保护定值
- // 系统信息
- // 控制操作
- // 帮助信息
- //++++++++++++++++++++++++++++++++++++++++=
- void Screen_MainMenu(void)
- {
- UC i;
- if(L_Screen_state!=1)
- {
- L_Screen_state=1;
- cls();
- Logo_Title();
- LCDPrintf(0,0,0,"拾主菜单",8);
- for(i=0;i<6;i++)
- LCDPrintf( 1,1,(i+1)*16,(char *)mainMenu[i],20);
- SubMenuPosition= Father1_MenuPosition;
- if(SubMenuPosition>6) SubMenuPosition = 0;
- LCDPrintf( 0,1,(SubMenuPosition+1)*16,(char *)mainMenu[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 *)mainMenu[SubMenuPosition],20);
- if( SubMenuPosition == 0) SubMenuPosition = 5;
- else SubMenuPosition--;
- LCDPrintf( 0,1,(SubMenuPosition+1)*16,(char *)mainMenu[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 *)mainMenu[SubMenuPosition],20);
- if( SubMenuPosition == 5) SubMenuPosition = 0;
- else SubMenuPosition++;
- LCDPrintf( 0,1,(SubMenuPosition+1)*16,(char *)mainMenu[SubMenuPosition],20);
- Frame_Show(0);
- }
- if((Key_OK==0 )&&(L_Key_OK==1))
- {
- L_Key_OK = Key_OK;
- if(((SubMenuPosition<6)&&(SubMenuPosition!=3))||(((System_Info.LED_Statue&0x02)==0x02)&&(SubMenuPosition==3)))
- Screen_state =(1+SubMenuPosition)*10+1;
- if(SubMenuPosition==3)
- {
- MMI_DSP_Instruction(0x0500,0,0);/*读系统定值*/
- Dalog_Info_Show(0, 7, 0);
- Command_Flag=1;
- }
- Father1_MenuPosition=SubMenuPosition;
- Father2_MenuPosition=0;
- Father2_page=0;
- }
- if((Key_CANCEL==0 )&&(L_Key_CANCEL==1))
- {
- Screen_state =2;
- SubMenuPosition = 0;
- Father1_MenuPosition=0;
- 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
- LCDPrintf( 1,12,(i+1)*16,"份",4);/*分*/
- }
- temp=3;
- break;
- case 1:
- for(i=6;i<11;i++)
- {
- if(((System_Info.YX[0]>>i)&0x01)==0x01)
- LCDPrintf( 1,12,(i-6+1)*16,"盒",4);/*合0*/
- else
- LCDPrintf( 1,12,(i-6+1)*16,"份",4);/*分*/
- }
- temp=1;
- break;
- default: break;
- }
- Frame_Show(temp);
- }
- //主菜单/实时数据/查看SOE
- void LookSoe_Num_Modify(void)
- {
- if(L_Screen_state!=116)
- { L_Screen_state=116;
- Soe_Num=1;
- Dalog_Info_Show(0, 17, 0);
- Bcd_show(0, 5, 80, Soe_Num, 0, 0, 0, 2);
- Frame_Show(3);
- }
- if((Key_ADD==0)&&(L_Key_ADD==1))
- {
- L_Key_ADD=Key_ADD;
- if(Soe_Num>=50) Soe_Num=1;
- else Soe_Num++;
- Bcd_show(0, 5, 80,Soe_Num, 0, 0, 0, 2);
- }
- if((Key_SUB==0)&&(L_Key_SUB==1))
- {
- L_Key_SUB=Key_SUB;
- if(Soe_Num<=1) Soe_Num=50;
- else Soe_Num--;
- Bcd_show(0, 5, 80,Soe_Num, 0, 0, 0, 2);
- }
- if((Key_OK==0 )&&(L_Key_OK==1))
- {
- L_Key_OK = Key_OK;
- Screen_state =1161;
- SubMenuPosition = 0;
- }
- if((Key_CANCEL==0 )&&(L_Key_CANCEL==1))
- {
- switch(Returnto_Modify)
- {
- case 16:
- Screen_state =11;//soe
- break;
- case 211://事件
- case 212://操作
- case 213: //故障简报
- Screen_state =21;
- break;
- default:break;
- }
- SubMenuPosition = 0;
- L_Key_CANCEL = Key_CANCEL;
- }
- }
- //主菜单/实时数据/查看SOE
- //*******查soe表**************
- UC Check_SoeTable(UC soenum)
- {
- UC i;
- soenum=soenum+256;
- for(i=0;i<120;i++)
- {
- if(SoeTable_Check[i]==soenum)
- { soenum=i;
- break;
- }
- }
- return(soenum);
- }
- //*****************************
- void Look_Soe(void)
- { UC temp_per2=0;
- if(L_Screen_state!=1161)
- {
- L_Screen_state=1161;
- switch(Returnto_Modify)
- {
- case 16:
- temp_per2=0x20;//soe
- break;
- case 211:
- temp_per2=0x30;//事件
- break;
- case 212:
- temp_per2=0x40;//操作
- break;
- case 213:
- temp_per2=0x50;//故障简报
- break;
- default:break;
- }
- MMI_DSP_Instruction(0x1200, (Soe_Num-1), temp_per2);
- Dalog_Info_Show(0, 7, 0);
- Command_Flag=1;
- }
- if((Key_ADD==0)&&(L_Key_ADD==1))
- {
- L_Key_ADD=Key_ADD;
- if(Soe_Num>=50) Soe_Num=1;
- else Soe_Num++;
- Bcd_show(0, 5, 80,Soe_Num, 0, 0, 0, 2);
- switch(Returnto_Modify)
- {
- case 16:
- temp_per2=0x20;//soe
- break;
- case 211:
- temp_per2=0x30;//事件
- break;
- case 212:
- temp_per2=0x40;//操作
- break;
- case 213:
- temp_per2=0x50;//故障简报
- break;
- default:break;
- }
- MMI_DSP_Instruction(0x1200, (Soe_Num-1), temp_per2);
- Dalog_Info_Show(0, 7, 0);
- Command_Flag=1;
- }
- if((Key_SUB==0)&&(L_Key_SUB==1))
- {
- L_Key_SUB=Key_SUB;
- if(Soe_Num<=1) Soe_Num=50;
- else Soe_Num--;
- Bcd_show(0, 5, 80,Soe_Num, 0, 0, 0, 2);
- switch(Returnto_Modify)
- {
- case 16:
- temp_per2=0x20;//soe
- break;
- case 211:
- temp_per2=0x30;//事件
- break;
- case 212:
- temp_per2=0x40;//操作
- break;
- case 213:
- temp_per2=0x50;//故障简报
- break;
- default:break;
- }
- MMI_DSP_Instruction(0x1200, (Soe_Num-1), temp_per2);
- Dalog_Info_Show(0, 7, 0);
- Command_Flag=1;
- }
- if(Command_Flag>0)
- {
- if(Check_Instruction_Statue(0x1200)==0x00)
- {
- /*显示SOE*/
- Command_Flag=0;
- Look_Soe_Show();
- }
- else if(Check_Instruction_Statue(0x1200)==0x22)
- {
- Dalog_Info_Show(1, 12, 0);
- Command_Flag=0;
- }
- }
- if((Key_CANCEL==0 )&&(L_Key_CANCEL==1))
- {
- switch(Returnto_Modify)
- {
- case 16:
- Screen_state =11;//soe
- break;
- case 211://事件
- case 212://操作
- case 213://故障简报
- Screen_state =21;
- break;
- default:break;
- }
- SubMenuPosition = 0;
- L_Key_CANCEL = Key_CANCEL;
- }
- }
- void Look_Soe_Show(void)
- {
- UC i;
- cls();Logo_Title();
- switch(Returnto_Modify)
- {
- case 16:
- LCDPrintf( 0,0,0,"壹查看SOE",10);
- break;
- case 211:
- LCDPrintf( 0,0,0,"壹事件报告",10);
- break;
- case 212:
- LCDPrintf( 0,0,0,"壹操作记录",10);
- break;
- case 213:
- LCDPrintf( 0,0,0,"壹故障简报",10);
- break;
- default:break;
- }
- Bcd_show(1, 11, 0, Soe_Num,0, 0, 0,2);
- LCDPrintf( 1,13,0,(char *)"条",2);
- for(i=0;i<6;i++)
- LCDPrintf( 1,1,(i+1)*16,(char *)LookSoe_Text[i],20);
- Bcd_show(1,9, 1*16, SOE_Buf_Show0.num, 0, 0, 0, 2);
- Bcd_show(1,5, 2*16, SOE_Buf_Show0.year, 0, 0, 0, 2);
- Bcd_show(1,8, 2*16, SOE_Buf_Show0.mon, 0, 0, 0, 2);
- Bcd_show(1,11, 2*16, SOE_Buf_Show0.day, 0, 0, 0, 2);
- Bcd_show(1,3, 3*16, SOE_Buf_Show0.hour, 0, 0, 0, 2);
- Bcd_show(1,6, 3*16, SOE_Buf_Show0.min, 0, 0, 0, 2);
- Bcd_show(1,9, 3*16, SOE_Buf_Show0.sec, 0, 0, 0, 2);
- Bcd_show(1,12, 3*16, SOE_Buf_Show0.msec, 0, 0, 0, 2);
- LCDPrintf( 1,6,4*16,(char *)&Soe_Info_Text[(UC)(Check_SoeTable( SOE_Buf_Show0.num))][0],8);
- LCDPrintf( 1,2,5*16,(char *)&Soe_Info_Text[(UC)(Check_SoeTable( SOE_Buf_Show0.num))][8],12);
- if( SOE_Buf_Show0.stu==0x02)
- LCDPrintf( 1,6,6*16,"发生",6);
- else if( SOE_Buf_Show0.stu==0x01)
- LCDPrintf( 1,6,6*16,"消失",6);
- Frame_Show(0);
- }
- //----------------------------实时数据界面结束-------------------------------------------
- //++++++++++++++++++++++++++报告信息开始++++++++++++++++++++++++++++++++++++++++++++++++++++
- //报告信息/事件报告、故障简报、操作记录见Look_SOE()
- //报告信息/故障报告
- void Report_Manage(void)
- {
- UC i;
- if(L_Screen_state!=21)
- {
- cls();Logo_Title();
- L_Screen_state=21;
- LCDPrintf( 0,0,0,(char *)(&mainMenu[1][0]),10);
- for(i=0;i<4;i++)
- LCDPrintf( 1,1,(i+1)*16,(char *)secondMenu_rpt[i],20);
- SubMenuPosition = Father2_MenuPosition;
- if(SubMenuPosition>4) SubMenuPosition =0;
- LCDPrintf( 0,1,(SubMenuPosition+1)*16,(char *)secondMenu_rpt[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_rpt[SubMenuPosition],20);
- if( SubMenuPosition == 0) SubMenuPosition = 3;
- else SubMenuPosition--;
- LCDPrintf( 0,1,(SubMenuPosition+1)*16,(char *)secondMenu_rpt[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_rpt[SubMenuPosition],20);
- if( SubMenuPosition == 3) SubMenuPosition = 0;
- else SubMenuPosition++;
- LCDPrintf( 0,1,(SubMenuPosition+1)*16,(char *)secondMenu_rpt[SubMenuPosition],20);
- Frame_Show(0);
- }
- if((Key_CANCEL==0 )&&(L_Key_CANCEL==1))
- {
- Screen_state =1;
- SubMenuPosition = 0;
- L_Key_CANCEL = Key_CANCEL;
- }
- if((Key_OK==0 )&&(L_Key_OK==1))
- {
- L_Key_OK = Key_OK;
- Father2_MenuPosition=SubMenuPosition;
- switch(SubMenuPosition)
- {
- case 0:
- case 1:
- case 2:
- Screen_state=116;
- Returnto_Modify=211+SubMenuPosition;
- break;
- case 3:
- Screen_state=214;//故障报告
- break;
- default:
- Screen_state=0;
- break;
- };
- L_Key_OK = Key_OK;
- }
- }
- void Fault_Num_Modify(void)
- {
- if(L_Screen_state!=214)
- { L_Screen_state=214;
- Fault_Num=1;
- Dalog_Info_Show(0,17,0);
- Bcd_show(0, 5, 80, Fault_Num, 0, 0, 0, 2);
- Frame_Show(0);
- }
- if((Key_ADD==0)&&(L_Key_ADD==1))
- {
- L_Key_ADD=Key_ADD;
- if(Fault_Num>=50) Fault_Num=1;
- else Fault_Num++;
- Bcd_show(0, 5, 80,Fault_Num, 0, 0, 0, 2);
- }
- if((Key_SUB==0)&&(L_Key_SUB==1))
- {
- L_Key_SUB=Key_SUB;
- if(Fault_Num<=1) Fault_Num=50;
- else Fault_Num--;
- Bcd_show(0, 5, 80,Fault_Num, 0, 0, 0, 2);
- }
- if((Key_OK==0 )&&(L_Key_OK==1))
- {
- L_Key_OK = Key_OK;
- Screen_state =2141;
- SubMenuPosition = 0;
- }
- if((Key_CANCEL==0 )&&(L_Key_CANCEL==1))
- {
- Screen_state =21;
- SubMenuPosition = 0;
- L_Key_CANCEL = Key_CANCEL;
- }
- }
- void Fault_Report_Show(void)
- {
- if(L_Screen_state!=2141)
- {
- L_Screen_state=2141;
- menupage=0;
- MMI_DSP_Instruction(0x1200, (Fault_Num-1), 0x60);
- Dalog_Info_Show(0, 7, 0);
- Command_Flag=1;
- }
- if((Key_ADD==0)&&(L_Key_ADD==1))
- {
- L_Key_ADD=Key_ADD;
- if(Fault_Num>=50) Fault_Num=1;
- else Fault_Num++;
- Bcd_show(0, 5, 80,Fault_Num, 0, 0, 0, 2);
- MMI_DSP_Instruction(0x1200, (Fault_Num-1), 0x60);
- Dalog_Info_Show(0, 7, 0);
- Command_Flag=1;
- }
- if((Key_SUB==0)&&(L_Key_SUB==1))
- {
- L_Key_SUB=Key_SUB;
- if(Fault_Num<=1) Fault_Num=50;
- else Fault_Num--;
- Bcd_show(0, 5, 80,Fault_Num, 0, 0, 0, 2);
- MMI_DSP_Instruction(0x1200, (Fault_Num-1), 0x60);
- Dalog_Info_Show(0, 7, 0);
- Command_Flag=1;
- }
- if(Command_Flag>0)
- {
- if(Check_Instruction_Statue(0x1200)==0x00)
- {
- /*显示事件*/
- Command_Flag=0;
- Fault_Record_Show(0);
- }
- else if(Check_Instruction_Statue(0x1200)==0x22)
- {
- 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) ;
- }
- if((Key_CANCEL==0 )&&(L_Key_CANCEL==1))
- {
- Screen_state =311;
- SubMenuPosition = 0;
- L_Key_CANCEL = Key_CANCEL;
- }
- if((Key_OK==0 )&&(L_Key_OK==1))
- {
- L_Key_OK= Key_OK;
- Returnto_Modify=101;
- Screen_state=911;
- }
- }
- void FixedValue_A_FYGI_Modify(void)//定值组A-过流
- {
- UC fast_step_flag=0;
- UC Fast_Step=10;
- UC temp_num;
- temp_num=PT_num*10;
- if( L_Screen_state != 31121 )
- {
- L_Screen_state = 31121;
- SubMenuPosition=0;
- menupage=0;
- FixedValue_A_FYGI_Show(menupage,SubMenuPosition) ;
- }
- if(((Key_ADD==0)&&(L_Key_ADD==1))||(Key_ADD_Long==1))
- {
- L_Key_ADD=Key_ADD;
- if(Key_ADD_Long==1){Key_ADD_Long=0;fast_step_flag=1;}
- switch(SubMenuPosition)
- {
- case 0:
- if(System_setting[DDY_START1+temp_num]>=Voltage_Limit.Up_Limit)
- System_setting[DDY_START1+temp_num]=Voltage_Limit.Low_Limit;
- else if(fast_step_flag==1)
- System_setting[DDY_START1+temp_num]+=Voltage_Limit.step_Size*Fast_Step;
- System_setting[DDY_START1+temp_num]+=Voltage_Limit.step_Size;
- break;
- case 1:
- if(System_setting[DDY_DELAY1+temp_num]>=Time_Limit.Up_Limit)
- System_setting[DDY_DELAY1+temp_num]=Time_Limit.Low_Limit;
- else if(fast_step_flag==1)
- System_setting[DDY_DELAY1+temp_num]+=Time_Limit.step_Size*Fast_Step;
- System_setting[DDY_DELAY1+temp_num]+=Time_Limit.step_Size;
- break;
- case 2:
- if(System_setting[DDY_START2+temp_num]>=Voltage_Limit.Up_Limit)
- System_setting[DDY_START2+temp_num]=Voltage_Limit.Low_Limit;
- else if(fast_step_flag==1)
- System_setting[DDY_START2+temp_num]+=Voltage_Limit.step_Size*Fast_Step;
- System_setting[DDY_START2+temp_num]+=Voltage_Limit.step_Size;
- break;
- case 3:
- if(System_setting[DDY_DELAY2+temp_num]>=Time_Limit.Up_Limit)
- System_setting[DDY_DELAY2+temp_num]=Time_Limit.Low_Limit;
- else if(fast_step_flag==1)
- System_setting[DDY_DELAY2+temp_num]+=Time_Limit.step_Size*Fast_Step;
- System_setting[DDY_DELAY2+temp_num]+=Time_Limit.step_Size;
- break;
- case 4:
- if((System_setting[KG1]&(KG1_D(PT_num*2)))==KG1_D(PT_num*2))
- System_setting[KG1]=System_setting[KG1]&(~(KG1_D(PT_num*2)));
- else System_setting[KG1]=System_setting[KG1]|(KG1_D(PT_num*2));
- break;
- case 5:
- if(System_setting[GDY_START1+temp_num]>=Voltage_Limit.Up_Limit)
- System_setting[GDY_START1+temp_num]=Voltage_Limit.Low_Limit;
- else if(fast_step_flag==1)
- System_setting[GDY_START1+temp_num]+=Voltage_Limit.step_Size*Fast_Step;
- System_setting[GDY_START1+temp_num]+=Voltage_Limit.step_Size;
- break;
- case 6:
- if(System_setting[GDY_DELAY1+temp_num]>=Time_Limit.Up_Limit)
- System_setting[GDY_DELAY1+temp_num]=Time_Limit.Low_Limit;
- else if(fast_step_flag==1)
- System_setting[GDY_DELAY1+temp_num]+=Time_Limit.step_Size*Fast_Step;
- System_setting[GDY_DELAY1+temp_num]+=Time_Limit.step_Size;
- break;
- case 7:
- if(System_setting[GDY_START2+temp_num]>=Voltage_Limit.Up_Limit)
- System_setting[GDY_START2+temp_num]=Voltage_Limit.Low_Limit;
- else if(fast_step_flag==1)
- System_setting[GDY_START2+temp_num]+=Voltage_Limit.step_Size*Fast_Step;
- System_setting[GDY_START2+temp_num]+=Voltage_Limit.step_Size;
- break;
- case 8:
- if(System_setting[GDY_DELAY2+temp_num]>=Time_Limit.Up_Limit)
- System_setting[GDY_DELAY2+temp_num]=Time_Limit.Low_Limit;
- else if(fast_step_flag==1)
- System_setting[GDY_DELAY2+temp_num]+=Time_Limit.step_Size*Fast_Step;
- System_setting[GDY_DELAY2+temp_num]+=Time_Limit.step_Size;
- break;
- case 9:
- if(System_setting[LXGDY_START+temp_num]>=Voltage_Limit.Up_Limit)
- System_setting[LXGDY_START+temp_num]=Voltage_Limit.Low_Limit;
- else if(fast_step_flag==1)
- System_setting[LXGDY_START+temp_num]+=Voltage_Limit.step_Size*Fast_Step;
- System_setting[LXGDY_START+temp_num]+=Voltage_Limit.step_Size;
- break;
- case 10:
- if(System_setting[LXGDY_DELAY+temp_num]>=Time_Limit.Up_Limit)
- System_setting[LXGDY_DELAY+temp_num]=Time_Limit.Low_Limit;
- else if(fast_step_flag==1)
- System_setting[LXGDY_DELAY+temp_num]+=Time_Limit.step_Size*Fast_Step;
- System_setting[LXGDY_DELAY+temp_num]+=Time_Limit.step_Size;
- break;
- case 11:
- if((System_setting[KG1]&(KG1_D(PT_num*2+1)))==KG1_D(PT_num*2+1))
- System_setting[KG1]=System_setting[KG1]&(~(KG1_D(PT_num*2+1)));
- else System_setting[KG1]=System_setting[KG1]|(KG1_D(PT_num*2+1));
- break;
- default:
- break;
- };
- fast_step_flag=0;
- FixedValue_A_FYGI_Show(menupage,SubMenuPosition) ;
- }
- if(((Key_SUB==0)&&(L_Key_SUB==1))||(Key_SUB_Long==1))
- {
- L_Key_SUB=Key_SUB;
- if(Key_SUB_Long==1){Key_SUB_Long=0;fast_step_flag=1;}
- switch(SubMenuPosition)
- {
- case 0:
- if((System_setting[DDY_START1+temp_num]<=Voltage_Limit.Low_Limit)||
- (System_setting[DDY_START1+temp_num]>=Voltage_Limit.Up_Limit))
- System_setting[DDY_START1+temp_num]=Voltage_Limit.Up_Limit;
- else if(fast_step_flag==1)
- System_setting[DDY_START1+temp_num]-=Voltage_Limit.step_Size*Fast_Step;
- System_setting[DDY_START1+temp_num]-=Voltage_Limit.step_Size;
- break;
- case 1:
- if((System_setting[DDY_DELAY1+temp_num]<=Time_Limit.Low_Limit)||
- (System_setting[DDY_DELAY1+temp_num]>=Time_Limit.Up_Limit))
- System_setting[DDY_DELAY1+temp_num]=Time_Limit.Up_Limit;
- else if(fast_step_flag==1)
- System_setting[DDY_DELAY1+temp_num]-=Time_Limit.step_Size*Fast_Step;
- System_setting[DDY_DELAY1+temp_num]-=Time_Limit.step_Size;
- break;
- case 2:
- if((System_setting[DDY_START2+temp_num]<=Voltage_Limit.Low_Limit)||
- (System_setting[DDY_START2+temp_num]>=Voltage_Limit.Up_Limit))
- System_setting[DDY_START2+temp_num]=Voltage_Limit.Up_Limit;
- else if(fast_step_flag==1)
- System_setting[DDY_START2+temp_num]-=Voltage_Limit.step_Size*Fast_Step;
- System_setting[DDY_START2+temp_num]-=Voltage_Limit.step_Size;
- break;
- case 3:
- if((System_setting[DDY_DELAY2+temp_num]<=Time_Limit.Low_Limit)||
- (System_setting[DDY_DELAY2+temp_num]>=Time_Limit.Up_Limit))
- System_setting[DDY_DELAY2+temp_num]=Time_Limit.Up_Limit;
- else if(fast_step_flag==1)
- System_setting[DDY_DELAY2+temp_num]-=Time_Limit.step_Size*Fast_Step;
- System_setting[DDY_DELAY2+temp_num]-=Time_Limit.step_Size;
- break;
- case 4:
- if((System_setting[KG1]&(KG1_D(PT_num*2)))==KG1_D(PT_num*2))
- System_setting[KG1]=System_setting[KG1]&(~(KG1_D(PT_num*2)));
- else System_setting[KG1]=System_setting[KG1]|(KG1_D(PT_num*2));
- break;
- case 5:
- if((System_setting[GDY_START1+temp_num]<=Voltage_Limit.Low_Limit)||
- (System_setting[GDY_START1+temp_num]>=Voltage_Limit.Up_Limit))
- System_setting[GDY_START1+temp_num]=Voltage_Limit.Up_Limit;
- else if(fast_step_flag==1)
- System_setting[GDY_START1+temp_num]-=Voltage_Limit.step_Size*Fast_Step;
- System_setting[GDY_START1+temp_num]-=Voltage_Limit.step_Size;
- break;
- case 6:
- if((System_setting[GDY_DELAY1+temp_num]<=Time_Limit.Low_Limit)||
- (System_setting[GDY_DELAY1+temp_num]>=Time_Limit.Up_Limit))
- System_setting[GDY_DELAY1+temp_num]=Time_Limit.Up_Limit;
- else if(fast_step_flag==1)
- System_setting[GDY_DELAY1+temp_num]-=Time_Limit.step_Size*Fast_Step;
- System_setting[GDY_DELAY1+temp_num]-=Time_Limit.step_Size;
- break;
- case 7:
- if((System_setting[GDY_START2+temp_num]<=Voltage_Limit.Low_Limit)||
- (System_setting[GDY_START2+temp_num]>=Voltage_Limit.Up_Limit))
- System_setting[GDY_START2+temp_num]=Voltage_Limit.Up_Limit;
- else if(fast_step_flag==1)
- System_setting[GDY_START2+temp_num]-=Voltage_Limit.step_Size*Fast_Step;
- System_setting[GDY_START2+temp_num]-=Voltage_Limit.step_Size;
- break;
- case 8:
- if((System_setting[GDY_DELAY2+temp_num]<=Time_Limit.Low_Limit)||
- (System_setting[GDY_DELAY2+temp_num]>=Time_Limit.Up_Limit))
- System_setting[GDY_DELAY2+temp_num]=Time_Limit.Up_Limit;
- else if(fast_step_flag==1)
- System_setting[GDY_DELAY2+temp_num]-=Time_Limit.step_Size*Fast_Step;
- System_setting[GDY_DELAY2+temp_num]-=Time_Limit.step_Size;
- break;
- case 9:
- if((System_setting[LXGDY_START+temp_num]<=Voltage_Limit.Low_Limit)||
- (System_setting[LXGDY_START+temp_num]>=Voltage_Limit.Up_Limit))
- System_setting[LXGDY_START+temp_num]=Voltage_Limit.Up_Limit;
- else if(fast_step_flag==1)
- System_setting[LXGDY_START+temp_num]-=Voltage_Limit.step_Size*Fast_Step;
- System_setting[LXGDY_START+temp_num]-=Voltage_Limit.step_Size;
- break;
- case 10:
- if((System_setting[LXGDY_DELAY+temp_num]<=Time_Limit.Low_Limit)||
- (System_setting[LXGDY_DELAY+temp_num]>=Time_Limit.Up_Limit))
- System_setting[LXGDY_DELAY+temp_num]=Time_Limit.Up_Limit;
- else if(fast_step_flag==1)
- System_setting[LXGDY_DELAY+temp_num]-=Time_Limit.step_Size*Fast_Step;
- System_setting[LXGDY_DELAY+temp_num]-=Time_Limit.step_Size;
- break;
- case 11:
- if((System_setting[KG1]&(KG1_D(PT_num*2+1)))==KG1_D(PT_num*2+1))
- System_setting[KG1]=System_setting[KG1]&(~(KG1_D(PT_num*2+1)));
- else System_setting[KG1]=System_setting[KG1]|(KG1_D(PT_num*2+1));
- break;
- default:
- break;
- };
- fast_step_flag=0;
- FixedValue_A_FYGI_Show(menupage,SubMenuPosition) ;
- }
- if((Key_UP==0)&&(L_Key_UP==1))
- {
- L_Key_UP=Key_UP;
- if(SubMenuPosition==0)
- SubMenuPosition=11;
- else
- SubMenuPosition--;
- if((SubMenuPosition==11)|| (SubMenuPosition==8)||(SubMenuPosition==4))
- { if(menupage==0) {menupage = 2;}
- else { menupage--;}
- }
- FixedValue_A_FYGI_Show(menupage,SubMenuPosition) ;
- }
- if((Key_DOWN==0)&&((L_Key_DOWN==1)))
- {
- L_Key_DOWN=Key_DOWN;
- if(SubMenuPosition>=11)
- SubMenuPosition=0;
- else
- SubMenuPosition++;
- if(((SubMenuPosition==9)||(SubMenuPosition==5)||(SubMenuPosition==0)))
- { if( menupage>= 2) {menupage = 0;}
- else { menupage++;}
- }
- FixedValue_A_FYGI_Show(menupage,SubMenuPosition) ;
- }
- if((Key_OK==0)&&(L_Key_OK==1))
- {
- L_Key_OK=Key_OK;
- Screen_state =311;
- Returnto_Save=110;
- SubMenuPosition=0;
- SubMenuPosition_temp=0;
- }
- }
- void FixedValue_A_FYGI_Show(UC page,UC select )//定值组A-过流
- {
- UC i,temp_Erect=7,temp_Line=0,temp=0;
- UC temp_num;
- cls();Logo_Title();
- LCDPrintf(0,0,0,"叁复压过流",12);
- for(i=0;i<6;i++)
- LCDPrintf( 1,1,(i+1)*16,(char *)FixedValue_FYGI_Text[i+6*page],20);
- temp_num=PT_num*10;
- switch(page)
- {
- case 0:
- temp=3;
- temp_Line=2;
- if(select==0)
- Bcd_show(0,temp_Erect, temp_Line*16,System_setting[DDY_START1+temp_num],0,1,0,0);
- else
- Bcd_show(1,temp_Erect, temp_Line*16,System_setting[DDY_START1+temp_num],0,1,0,0);
- temp_Line++;
- if(select==1)
- Bcd_show(0,temp_Erect, temp_Line*16,System_setting[DDY_DELAY1+temp_num],0,6,0,0);
- else
- Bcd_show(1,temp_Erect, temp_Line*16,System_setting[DDY_DELAY1+temp_num],0,6,0,0);
- temp_Line++;
- if(select==2)
- Bcd_show(0,temp_Erect, temp_Line*16,System_setting[DDY_START2+temp_num],0,1,0,0);
- else
- Bcd_show(1,temp_Erect, temp_Line*16,System_setting[DDY_START2+temp_num],0,1,0,0);
- temp_Line++;
- if(select==3)
- Bcd_show(0,temp_Erect, temp_Line*16,System_setting[DDY_DELAY2+temp_num],0,6,0,0);
- else
- Bcd_show(1,temp_Erect, temp_Line*16,System_setting[DDY_DELAY2+temp_num],0,6,0,0);
- temp_Line++;
- if(select==4)
- Control_Word_Show(0,(temp_Erect+5), temp_Line*16,(System_setting[KG1]&KG1_D(PT_num*2)) , 4);
- else
- Control_Word_Show(1,(temp_Erect+5), temp_Line*16,(System_setting[KG1]&KG1_D(PT_num*2)) , 4);
- break;
- case 1:
- temp=2;
- temp_Line=2;
- if(select==5)
- Bcd_show(0,temp_Erect, temp_Line*16,System_setting[GDY_START1+temp_num],0,1,0,0);
- else
- Bcd_show(1,temp_Erect, temp_Line*16,System_setting[GDY_START1+temp_num],0,1,0,0);
- temp_Line++;
- if(select==6)
- Bcd_show(0,temp_Erect, temp_Line*16,System_setting[GDY_DELAY1+temp_num],0,6,0,0);
- else
- Bcd_show(1,temp_Erect, temp_Line*16,System_setting[GDY_DELAY1+temp_num],0,6,0,0);
- temp_Line++;
- if(select==7)
- Bcd_show(0,temp_Erect, temp_Line*16,System_setting[GDY_START2+temp_num],0,1,0,0);
- else
- Bcd_show(1,temp_Erect, temp_Line*16,System_setting[GDY_START2+temp_num],0,1,0,0);
- temp_Line++;
- if(select==8)
- Bcd_show(0,temp_Erect, temp_Line*16,System_setting[GDY_DELAY2+temp_num],0,6,0,0);
- else
- Bcd_show(1,temp_Erect, temp_Line*16,System_setting[GDY_DELAY2+temp_num],0,6,0,0);
- temp_Line++;
- break;
- case 2:
- temp=1;
- temp_Line=2;
- if(select==9)
- Bcd_show(0,temp_Erect, temp_Line*16,System_setting[LXGDY_START+temp_num],0,1,0,0);
- else
- Bcd_show(1,temp_Erect, temp_Line*16,System_setting[LXGDY_START+temp_num],0,1,0,0);
- temp_Line++;
- if(select==10)
- Bcd_show(0,temp_Erect, temp_Line*16,System_setting[LXGDY_DELAY+temp_num],0,6,0,0);
- else
- Bcd_show(1,temp_Erect, temp_Line*16,System_setting[LXGDY_DELAY+temp_num],0,6,0,0);
- temp_Line++;temp_Line++;
- if(select==11)
- Control_Word_Show(0,(temp_Erect+5), temp_Line*16,(System_setting[KG1]&KG1_D(PT_num*2+1)) , 4);
- else
- Control_Word_Show(1,(temp_Erect+5), temp_Line*16,(System_setting[KG1]&KG1_D(PT_num*2+1)) , 4);
- break;
- default:break;
- }
- Frame_Show(temp);
- }
- void Compare_FixedValue_Num(void)
- {
- if( L_Screen_state != 911 )
- {
- L_Screen_state = 911;
- if(FixedValue_Num==System_Info.DZ_Area)
- { /*不能修改当前区*/
- Dalog_Info_Show(0,16, 0);
- }
- else if(Flag_Password_True==1)
- Screen_state=31020+Returnto_Modify;
- else
- Screen_state=110;
- }
- if((Key_OK==0)&&(L_Key_OK==1))
- {
- L_Key_OK=Key_OK;
- if(Returnto_Modify<=110)
- Screen_state=31000+Returnto_Modify;//过流
- }
- }
- void FixedValue_Switch(void)
- {
- if(L_Screen_state!=315)
- {
- L_Screen_state=315;
- Dlg_Frame_View();
- LCDPrintf(1, 4, 64, "定值组经", 10);
- Bcd_show(1, 3, 80, System_Info.DZ_Area,0, 0, 0, 3);
- LCDPrintf(1, 5, 80, "切换到", 6);
- Bcd_show(0, 12, 80, FixedValue_Switch_Num,0, 0, 0, 3);
- }
- if((Key_ADD==0)&&(L_Key_ADD==1))
- {
- L_Key_ADD=Key_ADD;
- if(FixedValue_Switch_Num>=3) FixedValue_Switch_Num=0;
- else FixedValue_Switch_Num++;
- Bcd_show(0, 12, 80, FixedValue_Switch_Num,0, 0, 0, 3);
- }
- if((Key_SUB==0)&&(L_Key_SUB==1))
- {
- L_Key_SUB=Key_SUB;
- if(FixedValue_Switch_Num==0) FixedValue_Switch_Num=3;
- else FixedValue_Switch_Num--;
- Bcd_show(0, 12, 80, FixedValue_Switch_Num,0, 0, 0, 3);
- }
- if((Key_OK==0 )&&(L_Key_OK==1))
- {
- L_Key_OK = Key_OK;
- Screen_state =119;
- Returnto_Save=130;
- SubMenuPosition = 0;
- SubMenuPosition_temp=0;
- }
- }
- void FixedValue_Copy(void)
- {
- if(L_Screen_state!=316)
- {
- L_Screen_state=316;
- SubMenuPosition=0;
- SourceArea=0;
- TargetArea=1;
- Dlg_Frame_View();
- LCDPrintf(1, 4, 64, "定值组经", 10);
- Bcd_show(0, 3, 80, SourceArea,0, 0, 0, 3);
- LCDPrintf(1, 5, 80, "复制到", 6);
- Bcd_show(1, 12, 80, TargetArea,0, 0, 0, 3);
- }
- if((Key_LEFT==0 )&&(L_Key_LEFT==1))
- {
- L_Key_LEFT= Key_LEFT;
- if(SubMenuPosition==0) SubMenuPosition=1;
- else SubMenuPosition=0;
- if(SubMenuPosition==0)
- {
- Bcd_show(0, 3, 80, SourceArea,0, 0, 0, 3);
- Bcd_show(1, 12, 80, TargetArea,0, 0, 0, 3);
- }
- else
- {
- Bcd_show(1, 3, 80, SourceArea,0, 0, 0, 3);
- Bcd_show(0, 12, 80, TargetArea,0, 0, 0, 3);
- }
- }
- if((Key_RIGHT==0 )&&(L_Key_RIGHT==1))
- {
- L_Key_RIGHT= Key_RIGHT;
- if(SubMenuPosition==0) SubMenuPosition=1;
- else SubMenuPosition=0;
- if(SubMenuPosition==0)
- {
- Bcd_show(0, 3, 80, SourceArea,0, 0, 0, 3);
- Bcd_show(1, 12, 80, TargetArea,0, 0, 0, 3);
- }
- else
- {
- Bcd_show(1, 3, 80, SourceArea,0, 0, 0, 3);
- Bcd_show(0, 12, 80, TargetArea,0, 0, 0, 3);
- }
- }
- if((Key_ADD==0)&&(L_Key_ADD==1))
- {
- L_Key_ADD=Key_ADD;
- if(SubMenuPosition==0)
- {
- if(SourceArea>=3) SourceArea=0;
- else SourceArea++;
- Bcd_show(0, 3, 80, SourceArea,0, 0, 0, 3);
- Bcd_show(1, 12, 80, TargetArea,0, 0, 0, 3);
- }
- if(SubMenuPosition==1)
- {
- if(TargetArea>=3) TargetArea=0;
- else TargetArea++;
- if(System_Info.DZ_Area==TargetArea) TargetArea++;
- // if(TargetArea>=3) TargetArea=0;
- Bcd_show(1, 3, 80, SourceArea,0, 0, 0, 3);
- Bcd_show(0, 12, 80, TargetArea,0, 0, 0, 3);
- }
- }
- if((Key_SUB==0)&&(L_Key_SUB==1))
- {
- L_Key_SUB=Key_SUB;
- if(SubMenuPosition==0)
- {
- if(SourceArea==0) SourceArea=3;
- else SourceArea--;
- Bcd_show(0, 3, 80, SourceArea,0, 0, 0, 3);
- Bcd_show(1, 12, 80, TargetArea,0, 0, 0, 3);
- }
- if(SubMenuPosition==1)
- {
- if(TargetArea==0) TargetArea=3;
- else TargetArea--;
- if(System_Info.DZ_Area==TargetArea) TargetArea--;
- Bcd_show(1, 3, 80, SourceArea,0, 0, 0, 3);
- Bcd_show(0, 12, 80, TargetArea,0, 0, 0, 3);
- }
- }
- if((Key_OK==0 )&&(L_Key_OK==1))
- {
- L_Key_OK = Key_OK;
- Screen_state =119;
- Returnto_Save=131;
- SubMenuPosition = 0;
- SubMenuPosition_temp=0;
- }
- if((Key_CANCEL==0 )&&(L_Key_CANCEL==1))
- {
- SubMenuPosition = 0;
- Screen_state =31;
- L_Key_CANCEL = Key_CANCEL;
- }
- }
- void FixedValue_Init(void)
- {
- UC i;
- if(L_Screen_state!=317)
- {
- L_Screen_state=317;
- Dlg_Frame_View();
- LCDPrintf(1, 3, 72, "写定值组", 10);
- Bcd_show(0, 12, 72, FixedValue_Switch_Num,0, 0, 0, 3);
- }
- if((Key_ADD==0)&&(L_Key_ADD==1))
- {
- L_Key_ADD=Key_ADD;
- if(FixedValue_Switch_Num>=3) FixedValue_Switch_Num=0;
- else FixedValue_Switch_Num++;
- Bcd_show(0, 12, 72, FixedValue_Switch_Num,0, 0, 0, 3);
- }
- if((Key_SUB==0)&&(L_Key_SUB==1))
- {
- L_Key_SUB=Key_SUB;
- if(FixedValue_Switch_Num==0) FixedValue_Switch_Num=3;
- else FixedValue_Switch_Num--;
- Bcd_show(0, 12, 72, FixedValue_Switch_Num,0, 0, 0, 3);
- }
- if((Key_OK==0 )&&(L_Key_OK==1))
- {
- L_Key_OK = Key_OK;
- Screen_state =119;
- Returnto_Save=132;
- for(i=0;i<SETTING_NUM;i++)
- System_setting[i]=Setting_Init[i];
- SubMenuPosition = 0;
- SubMenuPosition_temp=0;
- }
- if((Key_CANCEL==0 )&&(L_Key_CANCEL==1))
- {
- L_Key_CANCEL= Key_CANCEL;
- Screen_state =31;
- SubMenuPosition = 0;
- SubMenuPosition_temp=0;
- }
- }
- //++++++++++++++++++++++++保护定值结束+++++++++++++++++++++++++++++
- //----------------------------系统信息---------------------------------------------
- //校准系数
- //遥信参数
- //端口信息
- //修改密码
- //时钟调整
- //写初始配置
- void System_Config(void)
- {
- if(L_Screen_state!=41)
- {
- L_Screen_state=41;
- Command_Flag=0;
- menupage=Father2_page;
- SubMenuPosition_temp=0;
- SubMenuPosition = Father2_MenuPosition;
- if(menupage>1) menupage=0;
- if(SubMenuPosition>5) SubMenuPosition=0;
- System_Config_Show(menupage, SubMenuPosition);
- }
- if((Key_UP==0 )&&(L_Key_UP==1))
- {
- L_Key_UP = Key_UP;
- if(SubMenuPosition==0)
- SubMenuPosition=5;
- else
- SubMenuPosition--;
- /* if((SubMenuPosition==5)||(SubMenuPosition==8))
- { if( menupage== 0) menupage = 1;
- else menupage--;
- }*/
- System_Config_Show(menupage, SubMenuPosition);
- }
- if((Key_DOWN==0 )&&(L_Key_DOWN==1))
- {
- L_Key_DOWN = Key_DOWN;
- if(SubMenuPosition>=5)
- SubMenuPosition=0;
- else
- SubMenuPosition++;
- /*if((SubMenuPosition==6)||(SubMenuPosition==0))
- { if( menupage>= 1) menupage = 0;
- else menupage++;
- }*/
- System_Config_Show(menupage, SubMenuPosition);
- }
- if((Key_CANCEL==0 )&&(L_Key_CANCEL==1))
- {
- if((Returnto_Save==30)||(Returnto_Save==35)||(Returnto_Save==6))
- {Screen_state =119;Returnto_Save=30;}
- else
- Screen_state =1;
- Flag_Password_True=0;
- SubMenuPosition = 0;
- L_Key_CANCEL = Key_CANCEL;
- }
- if((Key_OK==0 )&&(L_Key_OK==1))
- {
- L_Key_OK = Key_OK;
- Father2_MenuPosition=SubMenuPosition;
- Father2_page=menupage;
- Command_Flag=0;
- switch(SubMenuPosition)
- {
- case 0:
- case 1:
- Screen_state=413+SubMenuPosition;
- break;
- case 2:
- Screen_state=416;
- break;
- case 3:
- Screen_state =110;//密码修改
- Returnto_Modify=0;
- break;
- case 4:
- if(Flag_Password_True==1)
- Screen_state=418;
- else
- Screen_state =110;//时钟调整
- Returnto_Modify=6;
- break;
- case 5:
- if(Flag_Password_True==1)
- Screen_state=419;
- else
- Screen_state =110;
- Returnto_Modify=133;
- break;
- default:
- break;
- };
- L_Key_OK = Key_OK;
- }
- }
- void System_Config_Show(UC page,UC select)
- {
- UC i,temp=0;
- cls();Logo_Title();
- LCDPrintf( 0,0,0,(char *)(&mainMenu[3][0]),12);
- for(i=0;i<6;i++)
- LCDPrintf( 1,1,(i+1)*16,(char *)secondMenu_sysconfg[page*6+i],20);
- switch(page)
- {
- case 0:
- temp=3;
- for(i=0;i<6;i++)
- {
- if(select==i)
- LCDPrintf( 0,1,(i+1)*16,(char *)secondMenu_sysconfg[i],20);
- else
- LCDPrintf( 1,1,(i+1)*16,(char *)secondMenu_sysconfg[i],20);
- }
- break;
- case 1:
- temp=1;
- for(i=6;i<11;i++)
- {
- if(SubMenuPosition==i)
- LCDPrintf( 0,1,(i-6+1)*16,(char *)secondMenu_sysconfg[i],20);
- else
- LCDPrintf( 1,1,(i-6+1)*16,(char *)secondMenu_sysconfg[i],20);
- }
- break;
- default: break;
- }
- Frame_Show(temp);
- }
- void Channel_Adjust_Value(void)
- {
- if(L_Screen_state!=413)
- {
- L_Screen_state=413;
- cls();
- Logo_Title();
- SubMenuPosition=0;
- if((SubMenuPosition>2)||(SubMenuPosition==0)) SubMenuPosition=1;
- Channel_Adjust_Value_show(SubMenuPosition);
- }
- if((Key_UP==0 )&&(L_Key_UP==1))
- {
- L_Key_UP = Key_UP;
- if( SubMenuPosition == 1) SubMenuPosition =2;
- else SubMenuPosition--;
- Channel_Adjust_Value_show(SubMenuPosition);
- }
- if((Key_DOWN==0 )&&(L_Key_DOWN==1))
- {
- L_Key_DOWN = Key_DOWN;
- if( SubMenuPosition == 2) SubMenuPosition = 1;
- else SubMenuPosition++;
- Channel_Adjust_Value_show(SubMenuPosition);
- }
- if((Key_OK==0 )&&(L_Key_OK==1))
- {
- L_Key_OK=Key_OK;
- Father3_MenuPosition=SubMenuPosition;
- switch(SubMenuPosition)
- {
- case 1: if(Flag_Password_True==1)
- Screen_state=4131;
- else
- Screen_state =110;
- Returnto_Modify=32;//自动调整5A
- Auto_CT_Type=0x21;
- //Select_CT_Type=0x81;
- CT_Type=0x01;
- break;
- /* case 2: if(Flag_Password_True==1)
- Screen_state=4131;
- else
- Screen_state =110;
- Returnto_Modify=33;//自动调整1A
- Auto_CT_Type=0x22;
- //Select_CT_Type=0x82;
- CT_Type=0x02;
- break;*/
- case 2: if(Flag_Password_True==1)
- Screen_state=4132;
- else
- Screen_state =110;
- Returnto_Modify=34;//手动调整5A
- Select_CT_Type=0x81;
- CT_Type=0x01;
- break;
- /* case 4: if(Flag_Password_True==1)
- Screen_state=4132;
- else
- Screen_state =110;
- Returnto_Modify=35;//手动调整1A
- Select_CT_Type=0x82;
- CT_Type=0x02;
- break;*/
- default:
- break;
- };
- }
- if((Key_CANCEL==0 )&&(L_Key_CANCEL==1))
- {
- Screen_state =41;
- SubMenuPosition = 0;
- L_Key_CANCEL = Key_CANCEL;
- }
- }
- void Channel_Adjust_Value_show(UC select)
- {
- UC i;
- LCDPrintf( 0,0,0,"肆校准系数",12);
- for(i=0;i<6;i++)
- LCDPrintf( 1,1,(i+1)*16,(char *)Adjust_Text[i],20);
- if(select==1)
- LCDPrintf( 0,1,2*16,(char *)Adjust_Text[1],20);
- else
- LCDPrintf( 1,1,2*16,(char *)Adjust_Text[1],20);
- if(select==2)
- LCDPrintf( 0,1,4*16,(char *)Adjust_Text[3],20);
- else
- LCDPrintf( 1,1,4*16,(char *)Adjust_Text[3],20);
- Frame_Show(0);
- }
- void Channel_Adjust_Auto(void)
- {
- if( L_Screen_state != 4131 )
- {
- L_Screen_state = 4131;
- Dalog_Info_Show(0, 3, 0);
- }
- if((Key_OK==0)&&(L_Key_OK==1))
- {
- L_Key_OK=Key_OK;
- MMI_DSP_Instruction(0x0700, Auto_CT_Type, 0);
- Dalog_Info_Show(0, 7,0);
- Command_Flag=1;
- }
- if((Key_CANCEL==0 )&&(L_Key_CANCEL==1))
- {
- L_Key_CANCEL = Key_CANCEL;
- Screen_state=413;
- }
- if(Command_Flag>0)
- {
- if(Check_Instruction_Statue(0x0700)==0x00)
- {
- Command_Flag=0;
- Screen_state=413;
- //Dalog_Info_Show(0, 12, 0);
- }
- else if(Check_Instruction_Statue(0x0700)==0x22)
- {
- Command_Flag=0;
- Dalog_Info_Show(1, 12, 0);
- }
- }
- }
- void Channel_Adjust_Manual(void)
- {
- UC i,fast_step_flag=0;
- UC Fast_Step=10;
- if( L_Screen_state != 4132 )
- {
- L_Screen_state = 4132;
- SubMenuPosition=0;CmdExectue_Erro_Flag=0;
- menupage=0;SubMenuPosition_temp=0;
- MMI_DSP_Instruction(0x0e00,Select_CT_Type,0);//读取数据
- Dalog_Info_Show(0, 7,0);
- Command_Flag=1;
- }
- if(((Key_ADD==0)&&(L_Key_ADD==1))||(Key_ADD_Long==1))
- {
- L_Key_ADD=Key_ADD;
- if(Key_ADD_Long==1){Key_ADD_Long=0;fast_step_flag=1;}
- if(Channel_Ration_Flag.Temp[SubMenuPosition]>=Channel_limit.Up_Limit)
- Channel_Ration_Flag.Temp[SubMenuPosition]=Channel_limit.Low_Limit;
- else if(fast_step_flag==1)
- Channel_Ration_Flag.Temp[SubMenuPosition]+=Channel_limit.step_Size*Fast_Step;
- Channel_Ration_Flag.Temp[SubMenuPosition]+=Channel_limit.step_Size;
- fast_step_flag=0;
- Channel_Value_Show(menupage,SubMenuPosition) ;
- }
- if(((Key_SUB==0)&&(L_Key_SUB==1))||(Key_SUB_Long==1))
- {
- L_Key_SUB=Key_SUB;
- if(Key_SUB_Long==1) {fast_step_flag=1;Key_SUB_Long=0;}
- if((Channel_Ration_Flag.Temp[SubMenuPosition]<=Channel_limit.Low_Limit)||
- (Channel_Ration_Flag.Temp[SubMenuPosition]>=Channel_limit.Up_Limit))
- Channel_Ration_Flag.Temp[SubMenuPosition]=Channel_limit.Up_Limit;
- else if(fast_step_flag==1)
- Channel_Ration_Flag.Temp[SubMenuPosition]-=Channel_limit.step_Size*Fast_Step;
- Channel_Ration_Flag.Temp[SubMenuPosition]-=Channel_limit.step_Size;
- fast_step_flag=0;
- Channel_Value_Show(menupage,SubMenuPosition) ;
- }
- if((Key_UP==0)&&(L_Key_UP==1))
- {
- L_Key_UP=Key_UP;
- if(SubMenuPosition==0)
- SubMenuPosition=31;
- else
- SubMenuPosition--;
- if((SubMenuPosition%6==5)||(SubMenuPosition==31))
- { if(menupage==0) menupage = 5;
- else menupage--;
- }
- Channel_Value_Show(menupage,SubMenuPosition) ;
- }
- if((Key_DOWN==0)&&((L_Key_DOWN==1)))
- {
- L_Key_DOWN=Key_DOWN;
- if(SubMenuPosition>=31)
- SubMenuPosition=0;
- else
- SubMenuPosition++;
- if((SubMenuPosition%6==0))
- { if(menupage>=5) menupage = 0;
- else menupage++;
- }
- Channel_Value_Show(menupage,SubMenuPosition) ;
- }
- if(CmdExectue_Erro_Flag==0)
- { if((Key_OK==0)&&(L_Key_OK==1))
- {
- L_Key_OK=Key_OK;
- Screen_state =120;
- Returnto_Save=35;
- SubMenuPosition=0;
- SubMenuPosition_temp=0;
- }
- }
- if((Key_CANCEL==0 )&&(L_Key_CANCEL==1))
- {
- L_Key_CANCEL = Key_CANCEL;
- Screen_state=413;
- }
- if(Command_Flag>0)
- {
- if(Check_Instruction_Statue(0x0e00)==0x00)
- { Command_Flag=0;
- for(i=0;i<TD_NUM;i++)
- Channel_Ration_Flag.Temp[i]=Channel_Ration_Flag.Value[i];
- Channel_Value_Show(menupage,SubMenuPosition) ;
- }
- else if(Check_Instruction_Statue(0x0e00)==0x22)
- { CmdExectue_Erro_Flag=1;
- Command_Flag=0;
- Dalog_Info_Show(1, 12, 0);
- }
- }
- }
- void Channel_Value_Show(UC page,UC select)
- {
- UC i,temp=0,temp_Erect=8,temp_Line=0;
- cls();
- Logo_Title();
- LCDPrintf( 0,0,0,"肆手动校准",12);
- for(i=0;i<6;i++)
- LCDPrintf( 1,1,(i+1)*16,(char *)Channel_Text[i+page*6],20);
- switch(page)
- {
- case 0:
- temp=3;
- temp_Line=1;
- for(i=0;i<6;i++)
- {
- if(select==i)
- Bcd_show(0,temp_Erect, temp_Line*16,Channel_Ration_Flag.Temp[i],0,5,0,1);
- else
- Bcd_show(1,temp_Erect, temp_Line*16,Channel_Ration_Flag.Temp[i],0,5,0,1);
- temp_Line++;
- }
- break;
- case 1:
- temp=2;
- temp_Line=1;
- for(i=6;i<12;i++)
- {
- if(select==i)
- Bcd_show(0,temp_Erect, temp_Line*16,Channel_Ration_Flag.Temp[i],0,5,0,1);
- else
- Bcd_show(1,temp_Erect, temp_Line*16,Channel_Ration_Flag.Temp[i],0,5,0,1);
- temp_Line++;
- }
- break;
- case 2:
- temp=2;
- temp_Line=1;
- for(i=12;i<18;i++)
- {
- if(select==i)
- Bcd_show(0,temp_Erect, temp_Line*16,Channel_Ration_Flag.Temp[i],0,5,0,1);
- else
- Bcd_show(1,temp_Erect, temp_Line*16,Channel_Ration_Flag.Temp[i],0,5,0,1);
- temp_Line++;
- }
- break;
- case 3:
- temp=2;
- temp_Line=1;
- for(i=18;i<24;i++)
- {
- if(select==i)
- Bcd_show(0,temp_Erect, temp_Line*16,Channel_Ration_Flag.Temp[i],0,5,0,1);
- else
- Bcd_show(1,temp_Erect, temp_Line*16,Channel_Ration_Flag.Temp[i],0,5,0,1);
- temp_Line++;
- }
- break;
- case 4:
- temp=2;
- temp_Line=1;
- for(i=24;i<30;i++)
- {
- if(select==i)
- Bcd_show(0,temp_Erect, temp_Line*16,Channel_Ration_Flag.Temp[i],0,5,0,1);
- else
- Bcd_show(1,temp_Erect, temp_Line*16,Channel_Ration_Flag.Temp[i],0,5,0,1);
- temp_Line++;
- }
- break;
- case 5:
- temp=2;