⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 key.#3

📁 基于MST-G240128点阵液晶的 状态机机制 人机界面四级滚屏菜单 源代码 ,带时间片机制模拟操作系统
💻 #3
📖 第 1 页 / 共 5 页
字号:
			   default:break;
			   }
			   hunt=hunt-1;
			   break;
		case 3:switch(hunt)
		       {
			   case 11:LCD_Seek11(EM_PwrFactMaxCMD,0);
			           break;
			   case 21:LCD_Seek11(EM_PwrFactMinCMD,0);
			           break;
			   case 31:LCD_Seek11(EM_NulPwrMaxCMD,0);
			           break;
			   case 41:LCD_Seek11(EM_NulPwrMinCMD,0);
			           break;
			   case 51:LCD_Seek11(TransFormSubVoltCMD,0);
			           break;
			   case 61:LCD_Seek11(EM_TimCntEnCMD,0);
			           break;
			   default:break;
			   }
			   hunt=hunt-1;
			   break;
		case 4:if(hunt<60)
		       {
			      switch(hunt)
		          {
			      case 11:LCD_Seek11(EM_ENH_ModeCMD,0);
			              break;
			      case 21:LCD_Seek11(EM_ENH_VoltCMD,0);
			              break;
			      case 31:LCD_Seek11(EM_ENH_CurrCMD,0);
			              break;
			      case 41:LCD_Seek11(EM_ENH_AnglCMD,0);
			              break;
			      case 51:LCD_Seek11(EM_ENH_TimeCMD,0);
			              break;
			      default:break;
			      }
			      hunt=hunt-1;
			   }
			   else if(hunt>60)
			      LCD_PassWord(2);
			   break;
		case 5:switch(hunt)
		       {
			   case 11:LCD_Seek11(EM_ModeCMD,0);
			           break;
			   case 21:LCD_Seek11(EM_VoltCMD,0);
			           break;
			   case 31:LCD_Seek11(EM_CurrCMD,0);
			           break;
			   case 41:LCD_Seek11(EM_AnglCMD,0);
			           break;
			   case 51:LCD_Seek11(EM_PwrFactCMD,0);
			           break;
			   case 61:LCD_Seek11(EM_NulPwrCMD,0);
			           break;
			   default:break;
			   }
			   hunt=hunt-1;
			   break;
		default:break;
		}
		}
	 }
	 //////////////////////
	 else if(seek==12)
	 {
	    if(hunt%10==0)
		{
	    LCD_ClearAll();
	    Menue(1);
        hunt=20;
	    LCD_CAstr(8,4,">",0,0);
		 
		 Stc_to_CFlash();
		 Flash_64K_Write(0xFA02,CFlash,100,0);
		}
		else
		{
		switch(page)
		{
		case 1:switch(hunt)
		       {
			   case 11:LCD_Seek12(BakPrttTimCMD,0);
			           break;
			   case 21:LCD_Seek12(AsyncDetEnDelayCMD,0);
			           break;
			   case 31:LCD_Seek12(RemoteTestCMD,0);
			           break;
			   case 41:LCD_Seek12(ExValueIncPercentCMD,0);
			           break;
			   case 51:LCD_Seek12(KQPulseLastCMD,0);
			           break;
			   case 61:LCD_Seek12(RevsTrigOutAngle,0);
			           break;
			   default:break;
			   }
			   hunt=hunt-1;
			   break;
		case 2:switch(hunt)
		       {
			   case 11:LCD_Seek12(PID_VoltKP,0);
			           break;
			   case 21:LCD_Seek12(PID_VoltKI,0);
			           break;
			   case 31:LCD_Seek12(PID_CurrKP,0);
			           break;
			   case 41:LCD_Seek12(PID_CurrKI,0);
			           break;
			   case 51:LCD_Seek12(PID_PwrFactKP,0);
			           break;
			   case 61:LCD_Seek12(PID_PwrFactKI,0);
			           break;
			   default:break;
			   }
			   hunt=hunt-1;
			   break;
		case 3:switch(hunt)
		       {
			   case 11:LCD_Seek12(EMDelayTimeCMD,0);
			           break;
			   case 21:LCD_Seek12(RFJTestCMD,0);
			           break;
			   case 31:LCD_Seek12(FastRemMagneticDelayCMD,0);
			           break;
			   case 41:LCD_Seek12(SlideTestDelayTimCMD,0);
			           break;
			   case 51:LCD_Seek12(OutOfCtrAlarmDelayCMD,0);
			           break;
			   case 61:LCD_Seek12(ClosePulseDelayCMD,0);
			           break;
			   default:break;
			   }
			   hunt=hunt-1;
			   break;
		case 4:switch(hunt)
		       {
			   case 11:LCD_Seek12(OutOfCtrOnTimCMD,0);
			           break;
			   case 21:LCD_Seek12(LowLimitTrigOutAngle,0);
			           break;
			   case 31:LCD_Seek12(AttenuationPercentCMD,0);
			           break;
			   case 41:LCD_Seek12(IFCO_HighLevlTimCMD,0);
			           break;
			   case 51:LCD_Seek12(IFCO_LowLevlTimCMD,0);
			           break;
			   case 61:LCD_Seek12(UF_LowLevlTimCMD,0);
			           break;
			   default:break;
			   }
			   hunt=hunt-1;
			   break;
		case 5:if(hunt<60)
		       {
		          switch(hunt)
		          {
			      case 11:LCD_Seek12(EM_PwrFreqCMD,0);
			              break;
			      case 21:LCD_Seek12(EM_RegBrdgMode,0);
			              break;
			      case 31:LCD_Seek12(RegulateAftAsyncFuncEN,0);
			              break;
			      case 41:LCD_Seek12(LCJ_OnTimCMD,0);
			              break;
			      case 51:LCD_Seek12(AsyncAftSyncTimCMD,0);
			              break;
			      default:break;
				  }
				  hunt=hunt-1;
			   }
			   else
			      LCD_PassWord(2);
			   break;
		default:break;
		}
		}
	 }
	 ////////////////////////////
	 else if(seek==14)
	 {
        LCD_ClearAll();
	    Menue(0);
		hunt=4;
	    LCD_CAstr(8,8,">",0,0);
     }
	////////////////////////////
	 else if(seek==15)
	 {
        LCD_ClearAll();
	    Menue(0);
		hunt=1;
	    LCD_CAstr(8,2,">",0,0);
     }
	 //////////////////////////
	 CancelKeyEvt=0;
  }
/////////////////////////////////////////////////////////////////////////////////////////     
/////////////////////////////////////////////////////////////////////////////////////////  
/////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////
  if(UpKeyEvt)//up
  {
     HI_Bell=1;
	  LCD_BLED=1;
	  DmsNum=0;
	  PressKeyEvt=1;

     if(seek==0)
     {
     LCD_CAstr(8,2*hunt," ",0,0);
	 hunt=hunt-1;
	 if(hunt==0)
	 hunt=7;
     LCD_CAstr(8,2*hunt,">",0,0);
	 }
	 /////////////////
     else if(seek==1)
     {
        LCD_CAstr(8,2*hunt/10," ",0,0);
	    hunt=hunt-10;
		if(hunt==0)
		hunt=20;
		LCD_CAstr(8,2*hunt/10,">",0,0);
     }
     /////////////////
     else if(seek==2)
     {
	    if(hunt%10==0)
        {
		   LCD_CAstr(8,2*hunt/10," ",0,0);
	       hunt=hunt-10;
	       if(hunt==0)
	       hunt=60;
           LCD_CAstr(8,2*hunt/10,">",0,0);
		}
		else
		{
		   temp=temp+1;
		   switch(hunt)
		   {
		   case 11:if(temp>4)
			       temp=0;
                   break;
		   case 21:if(temp>EM_VoltMaxCMD)
			       temp=EM_VoltMinCMD;
			       break;
		   case 31:if(temp>EM_CurrMaxCMD)
			       temp=EM_CurrMinCMD;
			       break;
		   case 41:if(temp>EM_AnglMaxCMD)
			       temp=EM_AnglMinCMD;
			       break;
		   case 51:if(temp>EM_PwrFactMaxCMD)
			       temp=EM_PwrFactMinCMD;
			       break;
		   case 61:if(temp>EM_NulPwrMaxCMD)
				   temp=EM_NulPwrMinCMD;
				   break;
		   default:break;
		   }
		   LCD_Seek2(temp,1);
		}
     }
	 ////////////////
	 else if(seek==3)
	 {
	    if(hunt%10==0)
	    {
		LCD_CAstr(8,2*hunt/10," ",0,0);
	    hunt=hunt-10;
	    if(hunt==0)
	    hunt=60;
        LCD_CAstr(8,2*hunt/10,">",0,0);
		}
		else
		{
		temp=temp+1;
		switch(hunt)
		{
		case 11:if(temp==100)
			    temp=1;
				LCD_Seek3(temp,1);
			    break;
		case 21:if(temp==10)
			    temp=0;
				LCD_Seek3(temp,1);
			    break;
		case 31:if(temp==4)
			    temp=1;
				LCD_Seek3(temp,1);
			    break;
		case 41:if(temp==4)
			    temp=1;
				LCD_Seek3(temp,1);
			    break;
		case 51:if(temp==2)
				temp=0;
				if(temp)
                LCD_CAstr(152,10,"开",1,0);
				else
				LCD_CAstr(152,10,"关",1,0);
				break;
		default:break;
		}
		}
	 }
	 ///////////////
	 else if(seek==4)
	 {
	    if(hunt%10==0)
		{
		LCD_CAstr(8,2*hunt/10," ",0,0);
	    hunt=hunt-10;
	    if(hunt==0)
	    hunt=70;
        LCD_CAstr(8,2*hunt/10,">",0,0);
		}
		else
		{
		switch(hunt)
		{
		case 11:
					temp=temp+1;
					if(temp==3)
					temp=4;
					if(temp==5)
					temp=1;
					LCD_Seek4(temp,1);
					break;
        case 21:temp=temp+1;
		        if(temp>1)
			    temp=0;
	            LCD_Seek4(temp,1);
			    break;
        case 31:temp=temp+1;
		        if(temp>1)
			    temp=0;
	            LCD_Seek4(temp,1);
			    break;
        case 41:temp=temp+1;
		        if(temp>1)
			    temp=0;
	            LCD_Seek4(temp,1);
			    break;
		case 51:temp=temp+1;
	            if(temp==6)
			    temp=1;
			    LCD_Seek4(temp,1);
			    break;
		case 61:temp=temp+1;
	            if(temp==6)
			    temp=1;
			    LCD_Seek4(temp,1);
			    break;
		case 71:temp=temp+1;
	            if(temp==8)
			    temp=1;
			    LCD_Seek4(temp,1);
			    break;
		case 73:
				switch(temp)
				{
				case 1:
						EM_k1=EM_k1+0.1;
						if(EM_k1>7)
						EM_k1=7;
						break;
				case 2:
						EM_k2=EM_k2+0.1;
						if(EM_k2>7)
						EM_k2=7;
						break;
				case 3:
						EM_b1=EM_b1-1;
						break;
				case 4:
						EM_b2=EM_b2-1;
						break;
				default:break;
				}
				break;
		default:break;
		}
		}
	 }
     //////////////////
	 else if(seek==7)
	 {
			if(hunt%10==0)
			{
				if(hunt == 10)
				   LCD_CAstr(8,2," ",0,0);
            else
				   LCD_CAstr(8,2*hunt/10+4," ",0,0);

				hunt=hunt-10;
				if(hunt==0)
				hunt=40;

				if(hunt == 10)
				   LCD_CAstr(8,2,">",0,0);
            else
				   LCD_CAstr(8,2*hunt/10+4,">",0,0);
			}
	    switch(hunt)
		{
		case 11:CH1[0]=CH1[0]+1;
		        if(CH1[0]>99)
				CH1[0]=0;
				LCD_Seek7(0,1);
		        break;
		case 12:CH1[1]=CH1[1]+1;
		        if(CH1[1]>12)
				CH1[1]=1;
				LCD_Seek7(0,1);
		        break;
		case 13:CH1[2]=CH1[2]+1;
		        if(CH1[2]>31)
				CH1[2]=1;
				LCD_Seek7(0,1);
		        break;
		case 14:CH1[3]=CH1[3]+1;
		        if(CH1[3]>23)
				CH1[3]=0;
				LCD_Seek7(0,1);
		        break;
		case 15:CH1[4]=CH1[4]+1;
		        if(CH1[4]>59)
				CH1[4]=0;
				LCD_Seek7(0,1);
		        break;
		case 16:CH1[5]=CH1[5]+1;
		        if(CH1[5]>59)
				CH1[5]=0;
				LCD_Seek7(0,1);
		        break;
      case 21:temp=temp+1;
		        if(temp+5>AlarmTemper)
				  temp=AlarmTemper-5;
				  LCD_Seek7(temp,1);
		        break;
		case 31:temp=temp+1;
		        if(temp+5>StartTemper)
				  temp=StartTemper-5;
				  LCD_Seek7(temp,1);
		        break;
		case 41:temp=temp+1;
		        if(temp>100)
				  temp=100;
				  LCD_Seek7(temp,1);
		        break;
		default:break;
		}
		
	 }
	 ///////////////////
	 else if(seek==8)
	 {
	    switch(hunt)
		{
		case 1:CH1[0]=CH1[0]+1;
		       if(CH1[0]>9)
			   CH1[0]=0;
			   LCD_math(64,8,CH1[0],1);
		       break;
		case 2:CH1[1]=CH1[1]+1;
		       if(CH1[1]>9)
			   CH1[1]=0;
			   LCD_math(80,8,CH1[1],1);
		       break;
		case 3:CH1[2]=CH1[2]+1;
		       if(CH1[2]>9)
			   CH1[2]=0;
			   LCD_math(96,8,CH1[2],1);
		       break;
		case 4:CH1[3]=CH1[3]+1;
		       if(CH1[3]>9)
			   CH1[3]=0;
			   LCD_math(112,8,CH1[3],1);
		       break;
		case 5:CH1[4]=CH1[4]+1;
		       if(CH1[4]>9)
			   CH1[4]=0;
			   LCD_math(128,8,CH1[4],1);
		       break;
		case 6:CH1[5]=CH1[5]+1;
		       if(CH1[5]>9)
			   CH1[5]=0;
			   LCD_math(144,8,CH1[5],1);
		       break;
		default:break;
		}
	 }
	 ///////////////////
	 else if(seek==11)
	 {
	    if(hunt%10==0)
		{
	       LCD_CAstr(8,2*hunt/10," ",0,0);
	       hunt=hunt-10;
		   if(hunt==0)
           hunt=60;
           LCD_CAstr(8,2*hunt/10,">",0,0);
		}
		else
		{
		   switch(page)
		   {
		   case 1:temp=temp+1;
		          switch(hunt)
		          {
				  case 11:if(temp>10)
						  temp=1;
				          break;
				  case 21:if(temp>20)
						  temp=5;
				          break;
				  case 31:if(temp>120)
                          temp=EM_TimCMD+2;
                          break;
				  case 41:if(temp+2>AsyncTimOutCMD)
						  temp=2;
				          break;
				  case 51:if(temp>500)
						  temp=10;
				          break;
				  case 61:if(temp>1000)
						  temp=1;
				          break;
				  default:break;
				  }
				  LCD_Seek11(temp,1);
		          break;
		   case 2:temp=temp+1;
		          switch(hunt)
		          {
				  case 11:if(temp>330)
						  temp=0;
				          break;
				  case 21:if(temp>330)
						  temp=0;
				          break;
				  case 31:if(temp>3000)
                          temp=0;
                          break;
				  case 41:if(temp>3000)
						  temp=0;
				          break;
				  case 51:if(temp>120)
						  temp=0;
				          break;
				  case 61:if(temp>120)
						  temp=0;
				          break;
				  default:break;
				  }
				  LCD_Seek11(temp,1);
		          break;
		   case 3:temp=temp+1;
		          switch(hunt)
		          {
				  case 11:if(temp>999)
						  temp=500;
				          break;
				  case 21:if(temp>999)
						  temp=500;
				          break;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -