
#include "Telltales.h"
#include "API_BD8379.h"
#include "CAN_Communication_Matrix.h"    //----hyq--20180709
#include "Menus.h"
#include "Data_Processor.h"

TelltaleLRCtrlStruct      TelltaleLRCtrl;
TelltaleLRSimulateStruct  TelltaleLSimulate;
TelltaleLRSimulateStruct  TelltaleRSimulate;

TelltaleLCD               TelltaleLCDFlag;
uint8_t HazardLightSts_Last;
INT32U  BD83790A;
INT32U  BD83790B;
INT32U  OldBD83790A;
INT32U  OldBD83790B;
uint8_t  SEATBELT_Count;
uint8_t  Break_nodown_Count;
uint8_t  BREAK_FLUID_Count;
uint8_t  BREAK_Count;
uint8_t  Break_down_count;
uint8_t  RR_HOOVES_Count;
uint8_t  RF_HOOVES_Count;
uint8_t  DoorSts_Count;
uint8_t OVER_SPEED_Count;
uint8_t  CAB_LOCK_Count ;
uint8_t  CollantAir_Count;
uint8_t Drivability_Count;
uint8_t  PTO_Count;
uint8_t  BreakLight_Count;
uint8_t  FILT_BLOCK_Count;
uint8_t  CHARGE_Count;
uint8_t  EngineSeriousFailure_Count;
uint8_t  Coolant_Temp_Count;
uint8_t  EngOilPress_Count;
uint8_t  DPF_Lamp_Count;
uint8_t   Led_DPF_Count;
uint8_t  DPF_Forbidden_Count;
uint8_t  Stop_Start_System_Count;
uint8_t  EPB_Count ;
uint8_t  AEB_Count ;
uint8_t AMT_Count;
uint8_t  LowBrakeLuidLevel_temp;
uint8_t  LowBrakeLuidLevel_timp;
uint8_t  SafetyBeltSt_temp;
uint8_t  MaintainSignal_temp;
uint8_t ParkingBrakeSwitch_temp;
uint8_t CabLockSt_temp;
uint8_t ASTL_Flag= 0 ;
uint8_t LED_T_BOX_RVM;
uint8_t TelltaleLCD_Flag33;
extern uint8_t  BlTurnOffDelay;
/******************************************************************************
  ��������Telltales_Left_Right_Management_Service
  ��  �ܣ�����ת��ƿ���
  ��  ������
  ����ֵ����
 *******************************************************************************/
void Telltales_Left_Right_Management_Service(void)      //10ms
{

}
/******************************************************************************
  ��������Telltales_Management_Service
  ��  �ܣ�ָʾ�ƹ�������
  ��  ������
  ����ֵ����
 *******************************************************************************
 ע  �⣺�÷���������ÿ50ms������һ��
 ******************************************************************************/ 
 uint8_t hyq;
 uint8_t PositionLightSts_Count;
 uint8_t DriveDoorSts_Count;
 uint8_t PositionLightSts;
 uint8_t DriveDoorSts;
 uint8_t PsngrDoorSts;
void Telltales_Management(void)
{
 	uint8_t Edge;
	Edge = 0xFF;	
  /*	if(SYS_IGN_OFF_DISP_MODE)
  {  
    PositionLightSts=0; 
    DriveDoorSts=0; 
    PsngrDoorSts=0;
    if(PositionLightSts_can==1) 
    {
      if(PositionLightSts_Count<25) 
      {
        PositionLightSts=0; 
        PositionLightSts_Count++;
      }
      else
      {
        PositionLightSts=1;
        PositionLightSts_Count=30;
      }
    }
    else 
    {
      PositionLightSts_Count=0;
      PositionLightSts= PositionLightSts_can;
    }
     
    if((DriveDoorSts_can==1)|| (PsngrDoorSts_can==1))
    {
      if(DriveDoorSts_Count<25) 
      {
        DriveDoorSts=0; 
        PsngrDoorSts=0; 
        DriveDoorSts_Count++;
      }
      else
      {
        DriveDoorSts=DriveDoorSts_can;
        PsngrDoorSts=PsngrDoorSts_can;
        DriveDoorSts_Count=30;
      }
    }
    else 
    {
      DriveDoorSts_Count=0;
      DriveDoorSts= DriveDoorSts_can;
      PsngrDoorSts=PsngrDoorSts_can;
    }
	}
	else 
	{
	  PositionLightSts_Count=0;
	  DriveDoorSts_Count=0;
	  PositionLightSts= PositionLightSts_can;
	  DriveDoorSts= DriveDoorSts_can;
    PsngrDoorSts=PsngrDoorSts_can;
	}  
	*/
 	PositionLightSts= PositionLightSts_can;
	DriveDoorSts= DriveDoorSts_can;
  PsngrDoorSts=PsngrDoorSts_can;
	
	if (IO_DISPLAY_MODE == IO_DISP_MODE_IGN_ON)   //IGON         
	{
    //��ʾ��
    if (HazardLightSts==1)
    {
      BD83790A |=  BD8379_D1;
  	  LINE_RIGHT_GREEN = 0 ;
  	  // LED_RIGHT_RED    = 1 ;
  	  LED_RIGHT_WHITE  = 1 ;
  	  
  	  BD83790A |=  BD8379_D7;
  	  LED_LEFT_GREEN = 0 ;
  	  LED_LEFT_WHITE = 1 ; 
  	  // LED_LEFT_RED   = 1 ;
  	  //Sound_Request(SND_TICK, 1);
    }
    else
    {
      //2 ��ת��                                     15       30
      if(RHTurnSignalSts == 1)
      {
      	BD83790A |=  BD8379_D1;
      	  
        LINE_RIGHT_GREEN = 0 ;
        // LED_RIGHT_RED    = 1 ;
      	LED_RIGHT_WHITE  = 1 ;
      	// Sound_Request(SND_TICK, 1);
      }
      else 
      {
      	BD83790A &=  ~BD8379_D1;
      	  
      	LINE_RIGHT_GREEN = 1;
      	// LED_RIGHT_RED    = 1 ;
      	LED_RIGHT_WHITE  = 0 ;  
      }
      	
      //1 ��ת��ָʾ��                               15       30
      if (LHTurnSignalSts == 1)
      {
      	BD83790A |=  BD8379_D7;
      	
      	LED_LEFT_GREEN = 0 ;
      	LED_LEFT_WHITE = 1 ; 
      	// LED_LEFT_RED   = 1 ;
      	// Sound_Request(SND_TICK, 1);
      }
      else 
      {
      	BD83790A &=  ~BD8379_D7;
      	
      	LED_LEFT_GREEN = 1 ;
      	LED_LEFT_WHITE = 0 ; 
      	//  LED_LEFT_RED   = 1 ;
      }
    }
    
    if ((HazardLightSts==1)||(LHTurnSignalSts==1)||(RHTurnSignalSts==1))
    {
      Sound_Request(SND_TICK, 1);
    }
    else 
    {
      Sound_Delete(SND_TICK);
    }
    /* if (TelltaleLRCtrl.LastRight != RHTurnSignalSts)
  	{
  		TelltaleLRCtrl.LastRight = RHTurnSignalSts;
  		Edge = RHTurnSignalSts;
  	}	
    if (TelltaleLRCtrl.LastLeft != LHTurnSignalSts)
  	{
  		TelltaleLRCtrl.LastLeft = LHTurnSignalSts;
  		Edge = LHTurnSignalSts;
  	}
  	if (HazardLightSts_Last != HazardLightSts)
  	{
  		HazardLightSts_Last = HazardLightSts;
  		Edge = HazardLightSts;
  	}
    //����ת����������
    if (Edge != 0xFF)
    {
      if(Edge)
      	Sound_Request(SND_TICK, 1);
      else
      	Sound_Request(SND_TOCK, 1);
    }
    else
    {
      Sound_Delete(SND_TICK);
      Sound_Delete(SND_TOCK);
    }
    */
    if (PepslcuAlarm == 13)    //  ����ʱԿ���ڳ���
    {
      Sound_Request(SND_LockWithKeyInCar, 1);
    }
    else
      Sound_Delete(SND_LockWithKeyInCar);
  	//5 Զ��ָʾ��                                 15       30
  	if(HighBeamSts == 1)
  		BD83790A |=  BD8379_D8;
  	else 
  		BD83790A &=  ~BD8379_D8;
  	
		// 
	  //	if(0)
	  //		BD83790A |=  BD8379_D0;
	  //	else 
			BD83790A &=  ~BD8379_D0;  

		//2 ��ת��                                     15          30
		//if(hyq == 1)
		//	BD83790A |=  BD8379_D1;
		//else 
		//	BD83790A &=  ~BD8379_D1;

		//27 ������ϵͳһ�����   ��ԭ SVS ָʾ�ƣ�    15
		if(NVM_CONFIG_WEI>0)    //Ϋ��
		{
    	if((EngineMalfunctionLamp_WEI==1)||(EngineMalfunctionLamp_YUN==1))
    		BD83790A |=  BD8379_D2;
    	else if (EngineMalfunctionLamp_WEI==2)
    	{
    		if ( FLASH_SYNC_1Hz)
    		 	BD83790A |=  BD8379_D2;
    		else
    			BD83790A &=  ~BD8379_D2;
    	}
    	else 
    		BD83790A &=  ~BD8379_D2;    		
		}
    else if((NVM_CONFIG_DA>0)||(NVM_CONFIG_KANG>0)||(NVM_CONFIG_XI>0))	//��񡢿���˹������
  
    {
  		if(EngineMalfunctionLamp_DAKANG==1)
  			BD83790A |=  BD8379_D2;
  		else 
  			BD83790A &=  ~BD8379_D2;
  	}
    else if(NVM_CONFIG_YUN>0)	           //�Ʋ�
    {
  		if(EngineMalfunctionLamp_YUN==1)
  			BD83790A |=  BD8379_D2;
  		else 
  			BD83790A &=  ~BD8379_D2;
  	}
    else if(NVM_CONFIG_YU>0)//���
  
    {	
  		if((EngineMalfunctionLamp1==1)&&(EngineMalfunctionLamp2==3))
  			BD83790A |=  BD8379_D2;
  		else if((EngineMalfunctionLamp1==0)&&(EngineMalfunctionLamp2==3))
  			BD83790A &=  ~BD8379_D2;
    }
		//29 ������ϵͳ���ع���   (ԭ������ͣ��)       15
	  //	#if ModVersion == Version_KANG
	  if (NVM_CONFIG_KANG>0)
	  {	
		  if (EngineSeriousFailure==1)
		  {
			  BD83790A |=  BD8379_D3;
			  if(EngineSeriousFailure_Count<=60)
			  { 
			    EngineSeriousFailure_Count++;
    			if((EngineSeriousFailure_Count<=10)|| ((EngineSeriousFailure_Count>20)&& (EngineSeriousFailure_Count<=30))|| ((EngineSeriousFailure_Count>40)&& (EngineSeriousFailure_Count<=50)))
    			{
    			  LED_RIGHT_RED   = 0 ;
    			  LED_LEFT_RED    = 0 ;
    			  LED_RIGHT_WHITE  = 1 ;
    			  LED_LEFT_WHITE  = 1 ;
    			}
    			else
    			{
    			  LED_RIGHT_RED   = 1 ;
    			  LED_LEFT_RED    = 1 ;
    			  LED_RIGHT_WHITE  = 0 ;
    			  LED_LEFT_WHITE  = 0 ;
    			}
			  }
			  else
			  {  
			    EngineSeriousFailure_Count=61;
			  }
		  }
		  else 
		  {
				if((EngineSeriousFailure_Count>0)&&(EngineSeriousFailure_Count<=60))
			  {
			    LED_RIGHT_RED   = 1 ;
    			LED_LEFT_RED    = 1 ;
    			LED_RIGHT_WHITE  = 0 ;
    			LED_LEFT_WHITE  = 0 ;
			  }
		    EngineSeriousFailure_Count=0;
			  BD83790A &=  ~BD8379_D3;
      }
		}
    // #elif ModVersion == Version_YU
    else if(NVM_CONFIG_YU>0)
    {
    	if((EngineMalfunctionLamp1==1)&&(EngineMalfunctionLamp2==1))
			{
			  BD83790A |=  BD8379_D3;
			  if(EngineSeriousFailure_Count<=60)
			  { 
			    EngineSeriousFailure_Count++;
    			if((EngineSeriousFailure_Count<=10)|| ((EngineSeriousFailure_Count>20)&& (EngineSeriousFailure_Count<=30))|| ((EngineSeriousFailure_Count>40)&& (EngineSeriousFailure_Count<=50)))
    			{
    			  LED_RIGHT_RED   = 0 ;
    			  LED_LEFT_RED    = 0 ;
    			  LED_RIGHT_WHITE  = 1 ;
    			  LED_LEFT_WHITE  = 1 ;
    			}
    			else
    			{
    			  LED_RIGHT_RED   = 1 ;
    			  LED_LEFT_RED    = 1 ;
    			  LED_RIGHT_WHITE  = 0 ;
    			  LED_LEFT_WHITE  = 0 ;
    			}
			  }
			  else
			  {  
			    EngineSeriousFailure_Count=61;
			  }
		  }
		  else if((EngineMalfunctionLamp1==0)&&(EngineMalfunctionLamp2==3))
		  {
				if((EngineSeriousFailure_Count>0)&&(EngineSeriousFailure_Count<=60))
			  {
			    LED_RIGHT_RED   = 1 ;
    			LED_LEFT_RED    = 1 ;
    			LED_RIGHT_WHITE  = 0 ;
    			LED_LEFT_WHITE  = 0 ;
			  }
		    EngineSeriousFailure_Count=0;
			  BD83790A &=  ~BD8379_D3;
      }
    }
    else
      BD83790A &=  ~BD8379_D3;
                                              
		//28 MIL �� �������ŷ���ع���                 15
		if(NVM_CONFIG_WEI>0)
		{
		  if((OBDMalfunctionindLamp_WEI==1)||(OBDMalfunctionindLamp_KANGYU==1)) 
		    BD83790A |=  BD8379_D4;
		  else if(OBDMalfunctionindLamp_WEI==2) 
		  {
		    if ( FLASH_SYNC_1Hz)
		      BD83790A |=  BD8379_D4;		     
		    else 
		      BD83790A &=  ~BD8379_D4;
		  }
		  else 
		    BD83790A &=  ~BD8379_D4;		  
		}
		else
		{
		  if(OBDMalfunctionindLamp_KANGYU==1)     //(����˹����񡢴����������)
			  BD83790A |=  BD8379_D4;
		  else 
			  BD83790A &=  ~BD8379_D4;
		}
		//
	  //	if(0)
	  //		BD83790A |=  BD8379_D5;
	  //	else 
			  BD83790A &=  ~BD8379_D5;

		//31 ����ѹ����   EngOilPress                             15

	  //	#if ModVersion == Version_KANG
		if(NVM_CONFIG_KANG>0)
		{
      if(EngOilPress==0)		
  		{
  			BD83790A |=  BD8379_D6;
  			if(EngOilPress_Count<=60)
  			{ 
  			  EngOilPress_Count++;
      		if((EngOilPress_Count<=10)|| ((EngOilPress_Count>20)&& (EngOilPress_Count<=30))|| ((EngOilPress_Count>40)&& (EngOilPress_Count<=50)))
      		{
      			LED_RIGHT_RED   = 0 ;
      			LED_LEFT_RED    = 0 ;
      			LED_RIGHT_WHITE  = 1 ;
      			LED_LEFT_WHITE  = 1 ;
      		}
      		else
      		{
      			LED_RIGHT_RED   = 1 ;
      			LED_LEFT_RED    = 1 ;
      			LED_RIGHT_WHITE  = 0 ;
      			LED_LEFT_WHITE  = 0 ;
      		}
  			}
  			else
  			{  
  			  EngOilPress_Count=61;
  			}
  		}
  		else 
  		{
  			if((EngOilPress_Count>0)&&(EngOilPress_Count<=60))
  			{
  			  LED_RIGHT_RED   = 1 ;
      		LED_LEFT_RED    = 1 ;
      		LED_RIGHT_WHITE  = 0 ;
      		LED_LEFT_WHITE  = 0 ;
  			}
  		  EngOilPress_Count=0;
  			BD83790A &=  ~BD8379_D6;
      }	
    }		 		
		else
		{
      if((EngOilPress<25)||((EngOilPress*2)>325))     //��100Kpa����650Kpa
		  {
			  BD83790A |=  BD8379_D6;
			  if(EngOilPress_Count<=60)
			  { 
			    EngOilPress_Count++;
    			if((EngOilPress_Count<=10)|| ((EngOilPress_Count>20)&& (EngOilPress_Count<=30))|| ((EngOilPress_Count>40)&& (EngOilPress_Count<=50)))
    			{
    			  LED_RIGHT_RED   = 0 ;
    			  LED_LEFT_RED    = 0 ;
    			  LED_RIGHT_WHITE  = 1 ;
    			  LED_LEFT_WHITE  = 1 ;
    			}
    			else
    			{
    			  LED_RIGHT_RED   = 1 ;
    			  LED_LEFT_RED    = 1 ;
    			  LED_RIGHT_WHITE  = 0 ;
    			  LED_LEFT_WHITE  = 0 ;
    			}
			  }
			  else
			  {  
			    EngOilPress_Count=61;
			  }
		  }
		  else 
		  {
				if((EngOilPress_Count>0)&&(EngOilPress_Count<=60))
			  {
			    LED_RIGHT_RED   = 1 ;
    			LED_LEFT_RED    = 1 ;
    			LED_RIGHT_WHITE  = 0 ;
    			LED_LEFT_WHITE  = 0 ;
			  }
		    EngOilPress_Count=0;
			  BD83790A &=  ~BD8379_D6;
      }
	  }
		//1 ��ת��ָʾ��                               15       30
		//if(hyq == 7)
		//	BD83790A |=  BD8379_D7;
		//else 
		//	BD83790A &=  ~BD8379_D7;

		//5 Զ��ָʾ��                                 15       30
		//if(hyq == 8)
		//	BD83790A |=  BD8379_D8;
		//else 
		//	BD83790A &=  ~BD8379_D8;

		//22 ��Һλ��                                  15
		if(((Fuel_Seg/10)< 2)&&(IO_DISP_TEST_OFF_TIME >= 40))
		{
		  Sound_Request(SND_LOW_FUEL_SPEED, 1);
			BD83790A |=  BD8379_D9;
		}
		else 
		{
		  Sound_Delete(SND_LOW_FUEL_SPEED);
			BD83790A &=  ~BD8379_D9;
    }                                              
		//10 פ���ƶ�ָʾ��                            15
		if((LINE_IN_BREAK_SIGNAL)||(EPB_State==1))
		{
		  Break_down_count=0;
		  Sound_Delete(SND_Break_down);	
		  ParkingBrakeSwitch_temp=1;
			BD83790A |=  BD8379_D10;
			if(BREAK_Count<=60)
			{ 
			  BREAK_Count++;
    		if((BREAK_Count<=10)|| ((BREAK_Count>20)&& (BREAK_Count<=30))|| ((BREAK_Count>40)&& (BREAK_Count<=50)))
    		{
    			LED_RIGHT_RED   = 0 ;
    			LED_LEFT_RED    = 0 ;
    			LED_RIGHT_WHITE  = 1 ;
    			LED_LEFT_WHITE  = 1 ;
    		}
    		else
    		{
    			LED_RIGHT_RED   = 1 ;
    			LED_LEFT_RED    = 1 ;
    			LED_RIGHT_WHITE  = 0 ;
    			LED_LEFT_WHITE  = 0 ;
    		}
			}
			else
			{  
			  BREAK_Count=61;
			}
		}
		else  
		{
		  ParkingBrakeSwitch_temp=0;
			if((BREAK_Count>0)&&(BREAK_Count<=60))
			{
			  LED_RIGHT_RED   = 1 ;
    		LED_LEFT_RED    = 1 ;
    		LED_RIGHT_WHITE  = 0 ;
    		LED_LEFT_WHITE  = 0 ;
			}
		  BREAK_Count=0;
		  
		  if(Brake_Switch==1)    //20200302
  		{
  	    Break_down_count=0;
  	    BD83790A &=  ~BD8379_D10;//פ���ƶ�
  	    Sound_Delete(SND_Break_down);
  		}
  		else
  		{
  		  if((DataVSpeedActual<20)&&(LINE_IN_SEATBELT_SIGNAL))
  		  {
    		  if(Break_down_count>=100)
    		  {
        		if(FLASH_SYNC_1Hz)
        		{
        		  BD83790A |=  BD8379_D10;//פ���ƶ�
        		}
        		else
        		{
        		  BD83790A &=  ~BD8379_D10;//פ���ƶ�
        		}
        		Sound_Request(SND_Break_down,1);
        		if(Break_nodown_Count<=60)
        		{ 
        			Break_nodown_Count++;
            	if((Break_nodown_Count<=10)|| ((Break_nodown_Count>20)&& (Break_nodown_Count<=30))|| ((Break_nodown_Count>40)&& (Break_nodown_Count<=50)))
            	{
            		LED_RIGHT_RED   = 0 ;
            		LED_LEFT_RED    = 0 ;
            		LED_RIGHT_WHITE  = 1 ;
            		LED_LEFT_WHITE  = 1 ;
            	}
            	else
            	{
            		LED_RIGHT_RED   = 1 ;
            		LED_LEFT_RED    = 1 ;
            		LED_RIGHT_WHITE  = 0 ;
            		LED_LEFT_WHITE  = 0 ;
            	}
        		}
        		else
        		{  
        			Break_nodown_Count=61;
        		}
    		  }
    		  else
    		  {
    		    Break_down_count++;
    		    BD83790A &=  ~BD8379_D10;//פ���ƶ�
  	    	  Sound_Delete(SND_Break_down);
  	    	  if((Break_nodown_Count>0)&&(Break_nodown_Count<=60))
        		{
        			LED_RIGHT_RED   = 1 ;
            	LED_LEFT_RED    = 1 ;
            	LED_RIGHT_WHITE  = 0 ;
            	LED_LEFT_WHITE  = 0 ;
        		}
        		Break_nodown_Count=0;
    		  }
  		  }
  		  else
  		  {
  		    Break_down_count=0;
  		    BD83790A &=  ~BD8379_D10;//פ���ƶ�
  	    	Sound_Delete(SND_Break_down);
  	    	if((Break_nodown_Count>0)&&(Break_nodown_Count<=60))
      		{
      			LED_RIGHT_RED   = 1 ;
          	LED_LEFT_RED    = 1 ;
          	LED_RIGHT_WHITE  = 0 ;
          	LED_LEFT_WHITE  = 0 ;
      		}
      		Break_nodown_Count=0;
  		  }
  		}
    }
		//7 ��ȫ��δϵ������                           15
			
	  //	if(((DataVSpeedActual>0)||(ActualGearPosition>0))&&(LINE_IN_SEATBELT_SIGNAL)&&(LINE_IN_BREAK_SIGNAL==0))
	  //	if((DataVSpeedActual>=150)&&(LINE_IN_SEATBELT_SIGNAL))         //20190721
		if(LINE_IN_SEATBELT_SIGNAL)         //20201208
		{
			BD83790A |=  BD8379_D11;
			SafetyBeltSt_temp=0;
		  //	Sound_Request(SND_SEATBELT_SPEED, 1);
			if(SEATBELT_Count<=60)
			{ 
			  SEATBELT_Count++;
    		if((SEATBELT_Count<=10)|| ((SEATBELT_Count>20)&& (SEATBELT_Count<=30))|| ((SEATBELT_Count>40)&& (SEATBELT_Count<=50)))
    		{
    			LED_RIGHT_RED   = 0 ;
    			LED_LEFT_RED    = 0 ;
    			LED_RIGHT_WHITE  = 1 ;
    			LED_LEFT_WHITE  = 1 ;
    		}
    		else
    		{
    			LED_RIGHT_RED   = 1 ;
    			LED_LEFT_RED    = 1 ;
    			LED_RIGHT_WHITE  = 0 ;
    			LED_LEFT_WHITE  = 0 ;
    		}
			}
			else
			{  
			  SEATBELT_Count=61;
			}
		}
		else 
		{
			if((SEATBELT_Count>0)&&(SEATBELT_Count<=60))
			{
			  LED_RIGHT_RED   = 1 ;
    		LED_LEFT_RED    = 1 ;
    		LED_RIGHT_WHITE  = 0 ;
    		LED_LEFT_WHITE  = 0 ;
			}
		  SEATBELT_Count=0;
			BD83790A &=  ~BD8379_D11;
			SafetyBeltSt_temp=1;
			//Sound_Delete(SND_SEATBELT_SPEED);
    }
    
    if (LINE_IN_SEATBELT_SIGNAL)         //20201208
    {
      if(DataVSpeedActual>=150)
      {
        Sound_Request(SND_SEATBELT_SPEED, 1);
      }
      else if(DataVSpeedActual==0)
      {
        Sound_Delete(SND_SEATBELT_SPEED);
      }
      else
      {
        ;/*do nothing*/
      }
    }
    else 
		{
	    Sound_Delete(SND_SEATBELT_SPEED);
		}
		//   
	  //	if(0)
	  //		BD83790B |=  BD8379_D0;
	  //	else 
			BD83790B &=  ~BD8379_D0;  

		//6  ABS ���ϵ�                                15
		if((ABS_EBS_AmberWarningSignal == 1)&&(ABS_FullyOperation == 0))
			BD83790B |=  BD8379_D1;
		else 
			BD83790B &=  ~BD8379_D1;	
		//35 ��Ҫ���� ��ɫ                             15	 
    if((NVM_CONFIG_YU>0)||(NVM_CONFIG_KANG>0))
    {
 			BD83790B &=  ~BD8379_D2;  
   	  if(DPF_Lamp_Status==1)
			  BD83790B |=  BD8379_D3;
		  else if (DPF_Lamp_Status==4)
		  { 
		    if(FLASH_SYNC_1Hz)      //20200925
		      BD83790B |=  BD8379_D3;
		    else
		      BD83790B &=  ~BD8379_D3;
		  }
		  else 
		  {
			  BD83790B &=  ~BD8379_D3;
		  }
    }
    else if((NVM_CONFIG_XI>0)||(NVM_CONFIG_DA>0))
    { 
      if(((DPF_Lamp_Status==1)||(DPF_Lamp_Status==4))&&((DPF_Need_Status==2)||(DPF_Need_Status==3)))
      {
        Led_DPF_Count++;
        if(Led_DPF_Count<=80)
        { 
          BD83790B &=  ~BD8379_D3;
          if( DPF_Need_Status==2 )
          	BD83790B |=  BD8379_D2;
          else if(DPF_Need_Status==3)
          {
            if(FLASH_SYNC_1Hz)
              BD83790B |=  BD8379_D2;
            else
            	BD83790B &=  ~BD8379_D2; 
          }
          else
            BD83790B &=  ~BD8379_D2;
        }
        else if(Led_DPF_Count<=160)
        {
          BD83790B &=  ~BD8379_D2;
          if(DPF_Lamp_Status==1)
            BD83790B |=  BD8379_D3;
          else if (DPF_Lamp_Status==4)
          {
            if(FLASH_SYNC_1Hz)      //20200925
            	BD83790B |=  BD8379_D3;
            else
              BD83790B &=  ~BD8379_D3;
          }
          else 
          {
            BD83790B &=  ~BD8379_D3;
          }
        }
        else
          Led_DPF_Count=0;
      }
      else
      {
        Led_DPF_Count=0;          //20201008
        if(DPF_Lamp_Status==1)
        	BD83790B |=  BD8379_D3;
        else if (DPF_Lamp_Status==4)
        {
        	if(FLASH_SYNC_1Hz)      //20200925
        		BD83790B |=  BD8379_D3;
        	else
        		BD83790B &=  ~BD8379_D3;
        }
        else 
        {
        	BD83790B &=  ~BD8379_D3;
        }
        if( DPF_Need_Status==2 )
        	BD83790B |=  BD8379_D2;
        else if(DPF_Need_Status==3)
        {
          if(FLASH_SYNC_1Hz)
            BD83790B |=  BD8379_D2;
          else
          	BD83790B &=  ~BD8379_D2; 
        }
        else
        	BD83790B &=  ~BD8379_D2;
      }	
      if((DPF_Need_Status==2)||(DPF_Need_Status==3))
      {
       	if(DPF_Lamp_Count<=60)
    		{ 
    			DPF_Lamp_Count++;
        	if((DPF_Lamp_Count<=10)|| ((DPF_Lamp_Count>20)&& (DPF_Lamp_Count<=30))|| ((DPF_Lamp_Count>40)&& (DPF_Lamp_Count<=50)))
        	{
        		LED_RIGHT_RED   = 0 ;
        		LED_LEFT_RED    = 0 ;
        		LED_RIGHT_WHITE  = 1 ;
        		LED_LEFT_WHITE  = 1 ;
        	}
        	else
        	{
        		LED_RIGHT_RED   = 1 ;
        		LED_LEFT_RED    = 1 ;
        		LED_RIGHT_WHITE  = 0 ;
        		LED_LEFT_WHITE  = 0 ;
        	}
    		}
    		else
			  {  
          DPF_Lamp_Count=61;
			  }
      }
      else
      {
        if((DPF_Lamp_Count>0)&&(DPF_Lamp_Count<=60))
    		{
    			LED_RIGHT_RED   = 1 ;
        	LED_LEFT_RED    = 1 ;
        	LED_RIGHT_WHITE  = 0 ;
        	LED_LEFT_WHITE  = 0 ;
    		}
    		DPF_Lamp_Count=0;
      }
    }
    else if((NVM_CONFIG_YUN>0)||(NVM_CONFIG_WEI>0))	
    {
   	  if(DPF_Lamp_Status==1)
			  BD83790B |=  BD8379_D3;
   	  else 
			  BD83790B &=  ~BD8379_D3;
		  if ((DPF_Lamp_Status==2)||(DPF_Lamp_Status==4))      		//36  ��Ҫ�������� ��ɫ                        15	
		  {
		    if (DPF_Lamp_Status==2)
      	{
      		if(FLASH_SYNC_1Hz)
      		  BD83790B |=  BD8379_D2;
      		else
      		  BD83790B &=  ~BD8379_D2;
      	}
		    if(DPF_Lamp_Status==4)
		    {
    		  BD83790B |=  BD8379_D2;
    		}
		    if(DPF_Lamp_Count<=60)
    		{ 
    			DPF_Lamp_Count++;
        	if((DPF_Lamp_Count<=10)|| ((DPF_Lamp_Count>20)&& (DPF_Lamp_Count<=30))|| ((DPF_Lamp_Count>40)&& (DPF_Lamp_Count<=50)))
        	{
        		LED_RIGHT_RED   = 0 ;
        		LED_LEFT_RED    = 0 ;
        		LED_RIGHT_WHITE = 1 ;
        		LED_LEFT_WHITE  = 1 ;
        	}
        	else
        	{
        		LED_RIGHT_RED   = 1 ;
        		LED_LEFT_RED    = 1 ;
        		LED_RIGHT_WHITE  = 0 ;
        		LED_LEFT_WHITE  = 0 ;
        	}
    		}
    		else
    		{  
          DPF_Lamp_Count=61;
    		}
		  }
		  else
		  { 
		    if((DPF_Lamp_Count>0)&&(DPF_Lamp_Count<=60))
			  {
			    LED_RIGHT_RED   = 1 ;
    			LED_LEFT_RED    = 1 ;
    			LED_RIGHT_WHITE  = 0 ;
    			LED_LEFT_WHITE  = 0 ;
			  }
		    DPF_Lamp_Count=0;
		    BD83790B &=  ~BD8379_D2;
		  }		
    }	

		//25 ����Һλ��  ��18%����   >21%������� 20201208                          15     
    #if 0	
  	if(Aftrtrtmnt1SCRCatalystTankLevel<45)
  	{
			BD83790B |=  BD8379_D4;
			ASTL_Flag=1;
		}
		else if(Aftrtrtmnt1SCRCatalystTankLevel>52)
		{
			BD83790B &=  ~BD8379_D4;
			ASTL_Flag= 0 ;
		}
		else
		{
		  if(ASTL_Flag==1)
		  {
		    BD83790B |=  BD8379_D4;
		  }
		  else
		  {
		    BD83790B &=  ~BD8379_D4;
		  }
		}
	  #endif
    /*#if ModVersion != Version_WEI
		if(Urealevelalarm==1)
			BD83790B |=  BD8379_D4;
		else if(Urealevelalarm==4)
		{
		  if(FLASH_SYNC_1Hz)
		    BD83790B |=  BD8379_D4;
		  else
		    BD83790B &=  ~BD8379_D4;
		}	
		else 
			BD83790B &=  ~BD8379_D4;
    #endif   */

		//37 ��ֹ��������                              15   
    //#if ModVersion != Version_KANG
    if((NVM_CONFIG_DA>0)||(NVM_CONFIG_XI>0))
    {
    	if(DPF_Forbidden_Lamp_DA==1)
    	{
    		BD83790B |=  BD8379_D5;
    		if(DPF_Forbidden_Count<=60)
        { 
        	DPF_Forbidden_Count++;
          if((DPF_Forbidden_Count<=10)|| ((DPF_Forbidden_Count>20)&& (DPF_Forbidden_Count<=30))|| ((DPF_Forbidden_Count>40)&& (DPF_Forbidden_Count<=50)))
          {
            LED_RIGHT_RED   = 0 ;
            LED_LEFT_RED    = 0 ;
            LED_RIGHT_WHITE  = 1 ;
            LED_LEFT_WHITE  = 1 ;
          }
          else
          {
            LED_RIGHT_RED   = 1 ;
            LED_LEFT_RED    = 1 ;
            LED_RIGHT_WHITE  = 0 ;
            LED_LEFT_WHITE  = 0 ;
          }
        }
        else
        {  
          DPF_Forbidden_Count=61;
        }
    	}
    	else 
    	{ 
    		if((DPF_Forbidden_Count>0)&&(DPF_Forbidden_Count<=60))
    		{
    			LED_RIGHT_RED   = 1 ;
        	LED_LEFT_RED    = 1 ;
        	LED_RIGHT_WHITE  = 0 ;
        	LED_LEFT_WHITE  = 0 ;
    		}
    		DPF_Forbidden_Count=0;
    		BD83790B &=  ~BD8379_D5;
    	}
		}	 	 
    //-------------------------------------------------------------------//
    else if((NVM_CONFIG_YU>0)||(NVM_CONFIG_WEI>0))
    {
    	if(DPF_Forbidden_Lamp_YUWEI==1)
    	{
    		BD83790B |=  BD8379_D5;
    		if(DPF_Forbidden_Count<=60)
        { 
        	DPF_Forbidden_Count++;
          if((DPF_Forbidden_Count<=10)|| ((DPF_Forbidden_Count>20)&& (DPF_Forbidden_Count<=30))|| ((DPF_Forbidden_Count>40)&& (DPF_Forbidden_Count<=50)))
          {
            LED_RIGHT_RED   = 0 ;
            LED_LEFT_RED    = 0 ;
            LED_RIGHT_WHITE  = 1 ;
            LED_LEFT_WHITE  = 1 ;
          }
          else
          {
            LED_RIGHT_RED   = 1 ;
            LED_LEFT_RED    = 1 ;
            LED_RIGHT_WHITE  = 0 ;
            LED_LEFT_WHITE  = 0 ;
          }
        }
        else
        {  
          DPF_Forbidden_Count=61;
        }
    	}
     	else 
      { 
      	if((DPF_Forbidden_Count>0)&&(DPF_Forbidden_Count<=60))
      	{
      		LED_RIGHT_RED   = 1 ;
          LED_LEFT_RED    = 1 ;
          LED_RIGHT_WHITE  = 0 ;
          LED_LEFT_WHITE  = 0 ;
      	}
      	DPF_Forbidden_Count=0;
      	BD83790B &=  ~BD8379_D5;
      }
		}
    //-------------------------------------------------------------------//   
    else if((NVM_CONFIG_YUN>0) || (NVM_CONFIG_KANG>0))
    {
    	if(DPF_Forbidden_Lamp_YUN==1)
    	{
    		BD83790B |=  BD8379_D5;
    		if(DPF_Forbidden_Count<=60)
        { 
        	DPF_Forbidden_Count++;
          if((DPF_Forbidden_Count<=10)|| ((DPF_Forbidden_Count>20)&& (DPF_Forbidden_Count<=30))|| ((DPF_Forbidden_Count>40)&& (DPF_Forbidden_Count<=50)))
          {
            LED_RIGHT_RED   = 0 ;
            LED_LEFT_RED    = 0 ;
            LED_RIGHT_WHITE  = 1 ;
            LED_LEFT_WHITE  = 1 ;
          }
          else
          {
            LED_RIGHT_RED   = 1 ;
            LED_LEFT_RED    = 1 ;
            LED_RIGHT_WHITE  = 0 ;
            LED_LEFT_WHITE  = 0 ;
          }
        }
        else
        {  
          DPF_Forbidden_Count=61;
        }
    	}
     	else 
      { 
      	if((DPF_Forbidden_Count>0)&&(DPF_Forbidden_Count<=60))
      	{
      		LED_RIGHT_RED   = 1 ;
          LED_LEFT_RED    = 1 ;
          LED_RIGHT_WHITE  = 0 ;
          LED_LEFT_WHITE  = 0 ;
      	}
      	DPF_Forbidden_Count=0;
      	BD83790B &=  ~BD8379_D5;
      }
		}
    /*
	  else if(NVM_CONFIG_KANG>0)//������ɾ��
	  {
		  if(DPF_Forbidden_Lamp_YUN==1)
		  {
			  BD83790B |=  BD8379_D5;
        LED_RIGHT_RED   = 0 ;
        LED_LEFT_RED    = 0 ;
        LED_RIGHT_WHITE  = 1 ;
        LED_LEFT_WHITE  = 1 ;
      }
      else
      {
			  BD83790B &=  ~BD8379_D5;
        LED_RIGHT_RED   = 1 ;
        LED_LEFT_RED    = 1 ;
        LED_RIGHT_WHITE  = 0 ;
        LED_LEFT_WHITE  = 0 ;
      }
	  }
    */	
		else
		 	BD83790B &=  ~BD8379_D5;	 
		//     
	  //	if(0)
	  //		BD83790B |=  BD8379_D6;
	  //	else 
			BD83790B &=  ~BD8379_D6;

		//3 ǰ����ָʾ��                               15 
		if(FrontFogSts == 1)
			BD83790B |=  BD8379_D7;
		else 
			BD83790B &=  ~BD8379_D7;

		//4  ������ָʾ��                              15
		if(RearFogSts == 1)
			BD83790B |=  BD8379_D8;
		else 
			BD83790B &=  ~BD8379_D8;

		//30 ������ˮ�¸�                              15
	  //	if(Engine_Coolant_Temp>144)          //����ֵͳһΪ��104��
		if(DataCoolantTempSegDisp>105)     //20200925  ���߸��Ӧ������ʱ

		{
		  BD83790B |=  BD8379_D9;
		  if(Coolant_Temp_Count<=60)
    	{ 
    		Coolant_Temp_Count++;
        if((Coolant_Temp_Count<=10)|| ((Coolant_Temp_Count>20)&& (Coolant_Temp_Count<=30))|| ((Coolant_Temp_Count>40)&& (Coolant_Temp_Count<=50)))
        {
        	LED_RIGHT_RED   = 0 ;
        	LED_LEFT_RED    = 0 ;
        	LED_RIGHT_WHITE  = 1 ;
        	LED_LEFT_WHITE  = 1 ;
        }
        else
        {
        	LED_RIGHT_RED   = 1 ;
        	LED_LEFT_RED    = 1 ;
        	LED_RIGHT_WHITE  = 0 ;
        	LED_LEFT_WHITE  = 0 ;
        }
    	}
    	else
    	{  
        Coolant_Temp_Count=61;
    	}
		}
		else
		{ 
		  if((Coolant_Temp_Count>0)&&(Coolant_Temp_Count<=60))
			{
			  LED_RIGHT_RED   = 1 ;
    		LED_LEFT_RED    = 1 ;
    		LED_RIGHT_WHITE  = 0 ;
    		LED_LEFT_WHITE  = 0 ;
			}
		  Coolant_Temp_Count=0;
		  BD83790B &=  ~BD8379_D9;
		}
		
		//22  ���ָʾϵͳ����                         15 
		if(LINE_IN_CHARGE_SIGNAL)
		{
		  BD83790B |=  BD8379_D10;
		  if(CHARGE_Count<=60)
    	{ 
    		CHARGE_Count++;
        if((CHARGE_Count<=10)|| ((CHARGE_Count>20)&& (CHARGE_Count<=30))|| ((CHARGE_Count>40)&& (CHARGE_Count<=50)))
        {
        	LED_RIGHT_RED   = 0 ;
        	LED_LEFT_RED    = 0 ;
        	LED_RIGHT_WHITE  = 1 ;
        	LED_LEFT_WHITE  = 1 ;
        }
        else
        {
          LED_RIGHT_RED   = 1 ;
          LED_LEFT_RED    = 1 ;
          LED_RIGHT_WHITE  = 0 ;
          LED_LEFT_WHITE  = 0 ;
        }
    	}
    	else
    	{  
        CHARGE_Count=61;
    	}
		}
		else
		{ 
		  if((CHARGE_Count>0)&&(CHARGE_Count<=60))
			{
			  LED_RIGHT_RED   = 1 ;
    		LED_LEFT_RED    = 1 ;
    		LED_RIGHT_WHITE  = 0 ;
    		LED_LEFT_WHITE  = 0 ;
			}
		  CHARGE_Count=0;
		  BD83790B &=  ~BD8379_D10;
		}
		//
	  //	if(0)
	  //		BD83790B |=  BD8379_D11;
	  //	else 
			BD83790B &=  ~BD8379_D11;
    		
		//----hyq--20190504--��Ļָʾ�Ʊ�־
		//��ʻԱ����ϵͳ(���)    
		if(NVM_CONFIG_YU>0)
		{
		  if(DriverAlarmSystem_YU==1)
		    TelltaleLCDFlag.Sig.LCD01 = 1;      //��������33
		  else 
		    TelltaleLCDFlag.Sig.LCD01 = 0;
		}
		 
		//��ʻԱ����ϵͳ(Ϋ��)    
		if(NVM_CONFIG_WEI>0)
		{
		  if((DriverAlarmSystem_KANGWEI==1)||( DriverAlarmSystem_KANGWEI==4 )||( DrivabilityRestrictionsystem==3 ))
		     TelltaleLCDFlag.Sig.LCD01 = 1;      //��������33
		  else if(DrivabilityRestrictionsystem==5)
		  {
		    if(FLASH_SYNC_2Hz)
		     TelltaleLCDFlag.Sig.LCD01 = 1; 
		    else
		     TelltaleLCDFlag.Sig.LCD01 = 0;
		  } 		     
		  else 
		    TelltaleLCDFlag.Sig.LCD01 = 0;
		  if(( DrivabilityRestrictionsystem==3 )||(DrivabilityRestrictionsystem==5))
		  {
  		  if(Drivability_Count<=60)
      	{ 
      		Drivability_Count++;
          if((Drivability_Count<=10)|| ((Drivability_Count>20)&& (Drivability_Count<=30))|| ((Drivability_Count>40)&& (Drivability_Count<=50)))
          {
          	LED_RIGHT_RED   = 0 ;
          	LED_LEFT_RED    = 0 ;
          	LED_RIGHT_WHITE  = 1 ;
          	LED_LEFT_WHITE  = 1 ;
          }
          else
          {
          	LED_RIGHT_RED   = 1 ;
          	LED_LEFT_RED    = 1 ;
          	LED_RIGHT_WHITE  = 0 ;
          	LED_LEFT_WHITE  = 0 ;
          }
      	}
      	else
  			{  
  			  Drivability_Count=61;
  			}
		  }
		  else
		  {
  		  if((Drivability_Count>0)&&(Drivability_Count<=60))
  			{
  			  LED_RIGHT_RED   = 1 ;
      		LED_LEFT_RED    = 1 ;
      		LED_RIGHT_WHITE  = 0 ;
      		LED_LEFT_WHITE  = 0 ;
  			}
  		  Drivability_Count=0;
		  }
		}
		//��ʻԱ����ϵͳ(����˹)
  	if(NVM_CONFIG_KANG>0)
		{
		  if(DriverAlarmSystem_KANGWEI==1)
		    TelltaleLCDFlag.Sig.LCD01 = 1;      //��������33
		  else if(DriverAlarmSystem_KANGWEI==4)
		  {
		    if(FLASH_SYNC_1Hz)
		      TelltaleLCDFlag.Sig.LCD01 = 1; 
		    else
		      TelltaleLCDFlag.Sig.LCD01 = 0;
		  }  
		  else 
		    TelltaleLCDFlag.Sig.LCD01 = 0;
		}
		//��ʻԱ����ϵͳ(���)  ����
  	if((NVM_CONFIG_DA>0)||(NVM_CONFIG_XI>0))
		{
		  if(DriverAlarmSystem_DA==1)
		    TelltaleLCDFlag.Sig.LCD01 = 1;      //��������33
		  else if(DriverAlarmSystem_DA==2)
		  {
		  	if(FLASH_SYNC_1Hz)
		      TelltaleLCDFlag.Sig.LCD01 = 1; 
		    else
		      TelltaleLCDFlag.Sig.LCD01 = 0;
		  }
		  else if(DriverAlarmSystem_DA==3)
		  {
		  	if(FLASH_SYNC_2Hz)
		      TelltaleLCDFlag.Sig.LCD01 = 1; 
		    else
		      TelltaleLCDFlag.Sig.LCD01 = 0;
		  }
		  else 
		    TelltaleLCDFlag.Sig.LCD01 = 0;
		}
		//��ʻԱ����ϵͳ ����
		if(NVM_CONFIG_YUN>0)
		{
		  if((DriverAlarmSystem_YUN>0)&&(DriverAlarmSystem_YUN<6))                //���ľ���δ��ȷ��ͬ��ֵ�������

		    TelltaleLCDFlag.Sig.LCD01 = 1;      //��������33
		  else 
		    TelltaleLCDFlag.Sig.LCD01 = 0;
		}
		//�ƶ���ѹ�ͱ�����       ��0.45Mpa����1.2Mpa �Ǳ��жϱ���
	  if(((DataHiCollantAirTWarning==1)||(DataHiCollantAirOWarning==1))&&(IO_DISP_TEST_OFF_TIME>50)) 
		{
		  TelltaleLCDFlag.Sig.LCD02 = 1;      //��������17
      #if CODEMODE==Normal
		    Sound_Request(SND_BreakPressure, 1);
      #endif
		  if(CollantAir_Count<=60)
    	{ 
    		CollantAir_Count++;
        if((CollantAir_Count<=10)|| ((CollantAir_Count>20)&& (CollantAir_Count<=30))|| ((CollantAir_Count>40)&& (CollantAir_Count<=50)))
        {
        	LED_RIGHT_RED   = 0 ;
        	LED_LEFT_RED    = 0 ;
        	LED_RIGHT_WHITE  = 1 ;
        	LED_LEFT_WHITE  = 1 ;
        }
        else
        {
        	LED_RIGHT_RED   = 1 ;
        	LED_LEFT_RED    = 1 ;
        	LED_RIGHT_WHITE  = 0 ;
        	LED_LEFT_WHITE  = 0 ;
        }
    	}
    	else
    	{  
        CollantAir_Count=61;
    	}
		}
		else
		{ 
		  if((CollantAir_Count>0)&&(CollantAir_Count<=60))
			{
			  LED_RIGHT_RED   = 1 ;
    		LED_LEFT_RED    = 1 ;
    		LED_RIGHT_WHITE  = 0 ;
    		LED_LEFT_WHITE  = 0 ;
			}
		  CollantAir_Count=0;
		  TelltaleLCDFlag.Sig.LCD02 = 0;
		  Sound_Delete(SND_BreakPressure);
		}
		 
		if (EMS_CNGLampStatus == 1)
		  TelltaleLCDFlag.Sig.LCD31 = 1; //��Ȼ��״ָ̬ʾ��
		else 
		  TelltaleLCDFlag.Sig.LCD31 = 0;
		
		if (EMS_GasLeakIndicator == 1)
		{
		  TelltaleLCDFlag.Sig.LCD32 = 1; //��Ȼ��й¶ָʾ��
		  Sound_Request(SND_CNG_GasLeak, 1);
		}
		else 
		{
		  TelltaleLCDFlag.Sig.LCD32 = 0;
		  Sound_Delete(SND_CNG_GasLeak);
		}
		
		if ((EMS_51C_STATUS & CAN_MSG_LOST) || (EMS_CylinderPressure > 64255))
		{
		  if (STEPPER_MOTOR_0_CUR_STEP <= 100)
		    TelltaleLCD_Flag33 = 1; //��Ȼ��������״ָ̬ʾ��
		} 
		else if (EMS_CylinderPressure < 3200)
		{
		   if (STEPPER_MOTOR_0_CUR_STEP <= 223)
		     TelltaleLCD_Flag33 = FLASH_SYNC_1Hz;
		} 
		else if (EMS_CylinderPressure < 5000)
		{
		  if (STEPPER_MOTOR_0_CUR_STEP <= 460)
		    TelltaleLCD_Flag33 = 1; //��Ȼ��������״ָ̬ʾ��
		}
		else if (EMS_CylinderPressure >= 6200)
		{
		  if (STEPPER_MOTOR_0_CUR_STEP >= 582)
		    TelltaleLCD_Flag33 = 0; 
		}
		//��������  Ӳ��    21
		if (LINE_IN_FILT_BLOCK_SIGNAL)
		{
		  TelltaleLCDFlag.Sig.LCD03 = 1;      //��������17
		  if(FILT_BLOCK_Count<=60)
    	{ 
    		FILT_BLOCK_Count++;
        if((FILT_BLOCK_Count<=10)|| ((FILT_BLOCK_Count>20)&& (FILT_BLOCK_Count<=30))|| ((FILT_BLOCK_Count>40)&& (FILT_BLOCK_Count<=50)))
        {
          LED_RIGHT_RED   = 0 ;
          LED_LEFT_RED    = 0 ;
          LED_RIGHT_WHITE  = 1 ;
          LED_LEFT_WHITE  = 1 ;
        }
        else
        {
          LED_RIGHT_RED   = 1 ;
          LED_LEFT_RED    = 1 ;
          LED_RIGHT_WHITE  = 0 ;
          LED_LEFT_WHITE  = 0 ;
        }
    	}
    	else
    	{  
        FILT_BLOCK_Count=61;
    	}
		}
		else
		{ 
		  if((FILT_BLOCK_Count>0)&&(FILT_BLOCK_Count<=60))
			{
			  LED_RIGHT_RED   = 1 ;
    		LED_LEFT_RED    = 1 ;
    		LED_RIGHT_WHITE  = 0 ;
    		LED_LEFT_WHITE  = 0 ;
			}
		  FILT_BLOCK_Count=0;
		  TelltaleLCDFlag.Sig.LCD03 = 0;
		}
				
		//EBS EBS��ƾ���   42
		if(NVM_CONFIG_EBS==0)          //20190808
		{
    	if(ABS_EBS_AmberWarningSignal==1)
    	  TelltaleLCDFlag.Sig.LCD04 = 1;
    	else 
    	  TelltaleLCDFlag.Sig.LCD04 = 0;	
		}
		else
		  TelltaleLCDFlag.Sig.LCD04 = 0;
		//�ƶ�ϵͳ���ϵ�   11   ������ѹ�źţ�����Ч �˴�Ϊ�г��ƶ��������ƶ���ѹ���ƶ�Һλ��ʱ���õ�ҲҪ����
	  //	if(((LINE_IN_BREAK_FLUID_SIGNAL)||(DataHiCollantAirTWarning==1)||(DataHiCollantAirOWarning==1))&&(IO_DISP_TEST_OFF_TIME>50))
	
		if(DATA_OVER_SPEED_WARNING)       //����
		{
    	TelltaleLCDFlag.Sig.LCD05 = 1;
    	Sound_Request(SND_OVER_SPEED, 1);
		  if(OVER_SPEED_Count<=60)
    	{ 
    	  OVER_SPEED_Count++;
      	if((OVER_SPEED_Count<=10)|| ((OVER_SPEED_Count>20)&& (OVER_SPEED_Count<=30))|| ((OVER_SPEED_Count>40)&& (OVER_SPEED_Count<=50)))
      	{
      	  LED_RIGHT_RED   = 0 ;
      	  LED_LEFT_RED    = 0 ;
      	  LED_RIGHT_WHITE  = 1 ;
      	  LED_LEFT_WHITE  = 1 ;
      	}
      	else
      	{
      	  LED_RIGHT_RED   = 1 ;
      	  LED_LEFT_RED    = 1 ;
      	  LED_RIGHT_WHITE  = 0 ;
      	  LED_LEFT_WHITE  = 0 ;
      	}
    	}
    	else
			{  
        OVER_SPEED_Count=61;
			}
		}
		else
		{ 
  		TelltaleLCDFlag.Sig.LCD05 = 0;
      Sound_Delete(SND_OVER_SPEED);
      if((OVER_SPEED_Count>0)&&(OVER_SPEED_Count<=60))
  		{
  		  LED_RIGHT_RED   = 1 ;
      	LED_LEFT_RED    = 1 ;
      	LED_RIGHT_WHITE  = 0 ;
      	LED_LEFT_WHITE  = 0 ;
  		}
  		OVER_SPEED_Count=0;
		}

		//RVM�� 
		if (0) //(((RMS_Fault>=1)&&(RMS_Fault<=4))||(T_BOX_RVM_STATUS&CAN_MSG_LOST))//����
		{
			LED_T_BOX_RVM = 1;
		}
		else
		{
			LED_T_BOX_RVM = 0;
		}
				
		//�ſ�������     KL30     ��������15   ����������3.0   
	  //	if(((DataVSpeedActual>0)||(ActualGearPosition>0))&&((DriveDoorSts==1)||(PsngrDoorSts==1)))
		if((DriveDoorSts==1)||(PsngrDoorSts==1))
		{
		  TelltaleLCDFlag.Sig.LCD06 = 1;
		  if(DoorSts_Count<=60)
    	{ 
    		DoorSts_Count++;
        if((DoorSts_Count<=10)|| ((DoorSts_Count>20)&& (DoorSts_Count<=30))|| ((DoorSts_Count>40)&& (DoorSts_Count<=50)))
        {
          LED_RIGHT_RED   = 0 ;
          LED_LEFT_RED    = 0 ;
          LED_RIGHT_WHITE  = 1 ;
          LED_LEFT_WHITE  = 1 ;
        }
        else
        {
        	LED_RIGHT_RED   = 1 ;
        	LED_LEFT_RED    = 1 ;
        	LED_RIGHT_WHITE  = 0 ;
        	LED_LEFT_WHITE  = 0 ;
        }
    	}
    	else
    	{  
        DoorSts_Count=61;
    	}
		}
		else
		{ 
		  if((DoorSts_Count>0)&&(DoorSts_Count<=60))
			{
			  LED_RIGHT_RED   = 1 ;
    		LED_LEFT_RED    = 1 ;
    		LED_RIGHT_WHITE  = 0 ;
    		LED_LEFT_WHITE  = 0 ;
			}
		  DoorSts_Count=0;
		  TelltaleLCDFlag.Sig.LCD06 = 0;
		}
		if((DriveDoorSts==1)||(PsngrDoorSts==1))
    {
      if(DataVSpeedActual>=3)
      {
        Sound_Request(SND_DOOR_OPENED, 1);
      }
      else if (BCM_ICM_Alarm==1)
      {
        Sound_Request(SND_DOOR_OPENED, 1);
      }
      else
        Sound_Delete(SND_DOOR_OPENED);
    }
    else
    {
      Sound_Delete(SND_DOOR_OPENED);
    }
    
		//��ʻ��δ��ֹ������ ����Ч    16
		if(LINE_IN_CAB_LOCK_SIGNAL)
		{
		  CabLockSt_temp=1;
		  TelltaleLCDFlag.Sig.LCD07 = 1;
		  if(CAB_LOCK_Count<=60)
    	{ 
    		CAB_LOCK_Count++;
        if((CAB_LOCK_Count<=10)|| ((CAB_LOCK_Count>20)&& (CAB_LOCK_Count<=30))|| ((CAB_LOCK_Count>40)&& (CAB_LOCK_Count<=50)))
        {
        	LED_RIGHT_RED   = 0 ;
        	LED_LEFT_RED    = 0 ;
        	LED_RIGHT_WHITE = 1 ;
        	LED_LEFT_WHITE  = 1 ;
        }
        else
        {
        	LED_RIGHT_RED   = 1 ;
        	LED_LEFT_RED    = 1 ;
        	LED_RIGHT_WHITE  = 0 ;
        	LED_LEFT_WHITE  = 0 ;
        }
    	}
    	else
    	{  
        CAB_LOCK_Count=61;
    	}
		}
		else
		{ 
		  CabLockSt_temp=0;
		  if((CAB_LOCK_Count>0)&&(CAB_LOCK_Count<=60))
			{
			  LED_RIGHT_RED   = 1 ;
    		LED_LEFT_RED    = 1 ;
    		LED_RIGHT_WHITE  = 0 ;
    		LED_LEFT_WHITE  = 0 ;
			}
		  CAB_LOCK_Count=0;
		  TelltaleLCDFlag.Sig.LCD07 = 0;
		}	
				
		// �������¶ȱ�����    38    
    //	#if ModVersion == Version_KANG
	  if((NVM_CONFIG_KANG>0)||(NVM_CONFIG_YUN>0))
	  {	
		  if(ExhaustHighTempLamp==1) 
		    TelltaleLCDFlag.Sig.LCD08 = 1;
		  else 
		    TelltaleLCDFlag.Sig.LCD08 = 0;
		}
	  else
		  TelltaleLCDFlag.Sig.LCD08 = 0;
	
	  // ������Ԥ��    32	
		if(EngWaitToStartLamp==1) 
		  TelltaleLCDFlag.Sig.LCD09 = 1;
		else 
		  TelltaleLCDFlag.Sig.LCD09 = 0;
	
	  //AEB ��     44
	  if(NVM_CONFIG_AEB==0)
	  {	
  		if((AEB_State==2)|| (AEB_State==3)|| (AEB_State==5)|| (AEB_State==6)|| (AEB_State==7))
  		{
  		  Sound_Request(SND_AEB, 1);
  		  TelltaleLCDFlag.Sig.LCD10 = 1;
  		  if(AEB_Count<=60)
      	{ 
      		AEB_Count++;
          if((AEB_Count<=10)|| ((AEB_Count>20)&& (AEB_Count<=30))|| ((AEB_Count>40)&& (AEB_Count<=50)))
          {
            LED_RIGHT_RED   = 0 ;
            LED_LEFT_RED    = 0 ;
            LED_RIGHT_WHITE  = 1 ;
            LED_LEFT_WHITE  = 1 ;
          }
          else
          {
          	LED_RIGHT_RED   = 1 ;
          	LED_LEFT_RED    = 1 ;
          	LED_RIGHT_WHITE  = 0 ;
          	LED_LEFT_WHITE  = 0 ;
          }
      	}
      	else
      	{  
          AEB_Count=61;
      	}
  		}
  		else
  		{ 
  		  Sound_Delete(SND_AEB);
  		  if((AEB_Count>0)&&(AEB_Count<=60))
  			{
  			  LED_RIGHT_RED   = 1 ;
      		LED_LEFT_RED    = 1 ;
      		LED_RIGHT_WHITE  = 0 ;
      		LED_LEFT_WHITE  = 0 ;
  			}
  		  AEB_Count=0;
  		  TelltaleLCDFlag.Sig.LCD10 = 0;
  		}
		}
		else
		  TelltaleLCDFlag.Sig.LCD10 = 0;
		 
		//С��     KL15��KL30        48
		if(PositionLightSts==1) 
		  TelltaleLCDFlag.Sig.LCD11 = 1;
		else 
		  TelltaleLCDFlag.Sig.LCD11 = 0;
		
		//���Ӿ���˪   KL30       39
		if(RearviewMirrorDefSts==1)
		  TelltaleLCDFlag.Sig.LCD12 = 1;
		else 
		  TelltaleLCDFlag.Sig.LCD12 = 0;
		
		//����������    41
		if(AMT_Warning_Lamp == 1 )        //20201008���Ӵ�C��˸����
		{
  		TelltaleLCDFlag.Sig.LCD13 = 1;
    	if(AMT_Count<=60)
  		{ 
  		  AMT_Count++;
      	if((AMT_Count<=10)|| ((AMT_Count>20)&& (AMT_Count<=30))|| ((AMT_Count>40)&& (AMT_Count<=50)))
      	{
      	  LED_RIGHT_RED   = 0 ;
      	  LED_LEFT_RED    = 0 ;
      	  LED_RIGHT_WHITE  = 1 ;
      	  LED_LEFT_WHITE  = 1 ;
      	}
      	else
      	{
      	  LED_RIGHT_RED   = 1 ;
      	  LED_LEFT_RED    = 1 ;
      	  LED_RIGHT_WHITE  = 0 ;
      	  LED_LEFT_WHITE  = 0 ;
      	}
  		}
  		else
  	  {  
        AMT_Count=61;
  	  }
		}
		else 
		{
		  TelltaleLCDFlag.Sig.LCD13 = 0;
		  if((AMT_Count>0)&&(AMT_Count<=60))
  		{
  			LED_RIGHT_RED   = 1 ;
      	LED_LEFT_RED    = 1 ;
      	LED_RIGHT_WHITE  = 0 ;
      	LED_LEFT_WHITE  = 0 ;
  		}
  		AMT_Count=0;
		}
		if(NVM_CONFIG_ESC==0)
		//ESC ����ָʾ��    13
		{
    	if((VDC_Information_Signal == 0X01)&& (VDC_Fully_Operational==0)&& (ASR_OffRoad_Switch==0))
    	  TelltaleLCDFlag.Sig.LCD14 = 1;
    	else if((VDC_Information_Signal == 0X01)&& (VDC_Fully_Operational==0X01))
    	{
        if(FLASH_SYNC_1Hz)
          TelltaleLCDFlag.Sig.LCD14 = 1;
        else
          TelltaleLCDFlag.Sig.LCD14 = 0;
    	}
    	else
    	  TelltaleLCDFlag.Sig.LCD14 = 0;
    		
    	//ESC OFF �ر�ָʾ��  14      
		   
		  /* if( NVM_CONFIG_EBS==0) 
		  {		     
        if(ASR_OffRoad_Switch==1)
          TelltaleLCDFlag.Sig.LCD15 = 1;
        else 
          TelltaleLCDFlag.Sig.LCD15 = 0;
  		}
  		else
  		{    
  		*/	 
        if((VDC_Information_Signal == 0X01)&& (ASR_OffRoad_Switch==1))
          TelltaleLCDFlag.Sig.LCD15 = 1;
        else 
          TelltaleLCDFlag.Sig.LCD15 = 0;
  	  //}
    }
		else
		{
  		TelltaleLCDFlag.Sig.LCD14 = 0;
  		TelltaleLCDFlag.Sig.LCD15 = 0;
		}
		
		//�����ƶ�����ָʾ 24  
		if((NVM_CONFIG_DA>0)||(NVM_CONFIG_XI>0)||(NVM_CONFIG_YUN>0))
		{
		  if (Retarder_Request_BrakeLight>=125)    //ƫ����-125     7D��125    7D��������
		  {
		    TelltaleLCDFlag.Sig.LCD16 = 0;
		  }
		  else
		    TelltaleLCDFlag.Sig.LCD16 = 1;
		}
		else if(NVM_CONFIG_KANG>0)
		{
		  if(Retarder_Request_BreakLight_KANG==1)
    	  TelltaleLCDFlag.Sig.LCD16 = 1;
    	else 
    	  TelltaleLCDFlag.Sig.LCD16 = 0;
		}
		else if(NVM_CONFIG_WEI>0)
		{
    	if(Retarder_Request_BreakLight_WEI==1)
    	  TelltaleLCDFlag.Sig.LCD16 = 1;
    	else 
    	  TelltaleLCDFlag.Sig.LCD16 = 0;		
		}
		else if(NVM_CONFIG_YU>0)
		{      
    	if(Retarder_Request_BreakLight_YU==1)
    	  TelltaleLCDFlag.Sig.LCD16 = 1;
    	else 
    	  TelltaleLCDFlag.Sig.LCD16 = 0;
	  }
  	//EPS����ָʾ��  46	
    /* if(	NVM_CONFIG_EPS==0)
    {
		  if(EPS_Status_signal==2)
		    TelltaleLCDFlag.Sig.LCD17 = 1;
		  else 
		    TelltaleLCDFlag.Sig.LCD17 = 0;
	  }
	  else
		  TelltaleLCDFlag.Sig.LCD17 = 0;
	  */
	  
	    //�����
		
	  if(LowBeamSts==1)
		  TelltaleLCDFlag.Sig.LCD17 = 1;
		else 
		  TelltaleLCDFlag.Sig.LCD17 = 0;
		//ASRָʾ��  8
		if(NVM_CONFIG_ASR==0)
		{
    	if((ASR_OffRoad_Switch==1)&&(ASR_Driver_Info_Signal==1)) 
      	TelltaleLCDFlag.Sig.LCD18 = 1;
      else if((ASR_Driver_Info_Signal==1)&&((ASR_Engine_Control_Active==1)||(ASR_BrakeControl_Active==1))) 
      {	
      	if (FLASH_SYNC_1Hz)
      		TelltaleLCDFlag.Sig.LCD18 = 1;
      	else 
      	  TelltaleLCDFlag.Sig.LCD18 = 0;    		
      }
      else 
      	TelltaleLCDFlag.Sig.LCD18 = 0;
		}
		else
		  TelltaleLCDFlag.Sig.LCD18 = 0;
		 
		//EPB ���ϵ�  45	 
		if( NVM_CONFIG_EPB==0 )
		{
		  if(EPB_Lamp_State)
		  {
		    TelltaleLCDFlag.Sig.LCD19 = 1;
		    if(EPB_Count<=60)
    		{ 
    			EPB_Count++;
        	if((EPB_Count<=10)|| ((EPB_Count>20)&& (EPB_Count<=30))|| ((EPB_Count>40)&& (EPB_Count<=50)))
        	{
        		LED_RIGHT_RED   = 0 ;
        		LED_LEFT_RED    = 0 ;
        		LED_RIGHT_WHITE  = 1 ;
        		LED_LEFT_WHITE  = 1 ;
        	}
        	else
        	{
        		LED_RIGHT_RED   = 1 ;
        		LED_LEFT_RED    = 1 ;
        		LED_RIGHT_WHITE  = 0 ;
        		LED_LEFT_WHITE  = 0 ;
        	}
    		}
    		else
    		{  
          EPB_Count=61;
    		}
		  }
		  else
		  { 
		    if((EPB_Count>0)&&(EPB_Count<=60))
			  {
			    LED_RIGHT_RED   = 1 ;
    			LED_LEFT_RED    = 1 ;
    			LED_RIGHT_WHITE  = 0 ;
    			LED_LEFT_WHITE  = 0 ;
			  }
		    EPB_Count=0;
		    TelltaleLCDFlag.Sig.LCD19 = 0;
		  }
		}
		else
		  TelltaleLCDFlag.Sig.LCD19 = 0;
		//ȼ������ˮ 23    
	  //	if(NVM_CONFIG_XI>0)     //����
	  //	{
    		  if(WaterInFuelIndicator == 1 )    //20200925
    		    TelltaleLCDFlag.Sig.LCD20 = 1;
    		  else 
    		    TelltaleLCDFlag.Sig.LCD20 = 0;
	  /*	}
		else
		{
		 	if(WaterInFuelIndicator == 1 )
    	  TelltaleLCDFlag.Sig.LCD20 = 1;
    	else 
    	  TelltaleLCDFlag.Sig.LCD20 = 0;
		}
	  */
		//����ָʾ�ƣ�����̣�47
		if(Maintain_alarm==1)
		{
    	if(Maintain_clear==1)
    	{
    		TelltaleLCDFlag.Sig.LCD21 = 0;
    	  MaintainSignal_temp=0;
    	}
    	else
    	{ 
    		TelltaleLCDFlag.Sig.LCD21 = 1;
    		MaintainSignal_temp=1;
    	}
		}
		else
		{
		  Maintain_clear=0;
		  MaintainSignal_temp=0;
		  TelltaleLCDFlag.Sig.LCD21 = 0;
		}	
	  if(NVM_CONFIG_EPB==0)
	  {
		  //Auto hold ָʾ����ɫ  Auto hold ����ָʾ��ɫ   20
		  if(AutoHold==6)
		    TelltaleLCDFlag.Sig.LCD22 = 1;
		  else if(AutoHold==5)                 //��˸
		  {
		    if(FLASH_SYNC_2Hz)
		      TelltaleLCDFlag.Sig.LCD22 = 1;
		    else
		      TelltaleLCDFlag.Sig.LCD22 = 0;
		  }
		  else
		    TelltaleLCDFlag.Sig.LCD22 = 0;
    }
		else
		  TelltaleLCDFlag.Sig.LCD22 = 0;
		// �ƶ�Һλ�ͱ�����    9
		if(LINE_IN_BREAK_FLUID_SIGNAL)    //
		{
		  if (LowBrakeLuidLevel_timp < 100)
		  {
		     LowBrakeLuidLevel_timp++;
		  } 
		  else
		  {
		    LowBrakeLuidLevel_temp=1;
		    TelltaleLCDFlag.Sig.LCD23 = 1;
		  }
		  if(BREAK_FLUID_Count<=60)
			{ 
			  BREAK_FLUID_Count++;
    		if((BREAK_FLUID_Count<=10)|| ((BREAK_FLUID_Count>20)&& (BREAK_FLUID_Count<=30))|| ((BREAK_FLUID_Count>40)&& (BREAK_FLUID_Count<=50)))
    		{
    			LED_RIGHT_RED   = 0 ;
    			LED_LEFT_RED    = 0 ;
    			LED_RIGHT_WHITE  = 1 ;
    			LED_LEFT_WHITE  = 1 ;
    		}
    		else
    		{
    			LED_RIGHT_RED   = 1 ;
    			LED_LEFT_RED    = 1 ;
    			LED_RIGHT_WHITE  = 0 ;
    			LED_LEFT_WHITE  = 0 ;
    		}
			}
			else
			{  
        BREAK_FLUID_Count=61;
			}
		}
		else
		{ 
		  LowBrakeLuidLevel_timp=0;
		  LowBrakeLuidLevel_temp=0;
		  if((BREAK_FLUID_Count>0)&&(BREAK_FLUID_Count<=60))
			{
			  LED_RIGHT_RED   = 1 ;
    		LED_LEFT_RED    = 1 ;
    		LED_RIGHT_WHITE  = 0 ;
    		LED_LEFT_WHITE  = 0 ;
			}
		  BREAK_FLUID_Count=0;
		  TelltaleLCDFlag.Sig.LCD23 = 0;
		}
		//CCS �̵�           43   
		//if((NVM_CONFIG_DA>0)||(NVM_CONFIG_XI>0)||(NVM_CONFIG_YUN>0))
		{
    	if(CruiseCtrlActive_DA == 1)
    		TelltaleLCDFlag.Sig.LCD24 = 1;
    	else //if(CruiseCtrlActive_DA==0)
    	  TelltaleLCDFlag.Sig.LCD24 = 0;
		}
	  #if 0	
		/*else*/ if(NVM_CONFIG_YU>0)   //20200907
		{
    	if((CruiseCtrlActive_FEIDA>=1)&&(CruiseCtrlActive_FEIDA<=6))
    	  TelltaleLCDFlag.Sig.LCD24 = 1;
    	else if(CruiseCtrlActive_FEIDA==0)
    	  TelltaleLCDFlag.Sig.LCD24 = 0;		
		}
		else if((NVM_CONFIG_KANG>0)||(NVM_CONFIG_WEI>0))   //20200907
		{
    	if(CruiseCtrlActive_FEIDA==1)
    	  TelltaleLCDFlag.Sig.LCD24 = 1;
    	else if(CruiseCtrlActive_FEIDA==0)
    	  TelltaleLCDFlag.Sig.LCD24 = 0;		
		}
	  #endif
    //#if ModVersion == Version_KANG			
		//������ͣ���ܿ�����ɫ   40     Ϋ��:û�У�����˹:�У����:û��
	  if(NVM_CONFIG_KANG>0)
		{
		  if(Stop_Start_System_Public==3)
		    TelltaleLCDFlag.Sig.LCD25 = 1;
		  else 
		    TelltaleLCDFlag.Sig.LCD25 = 0;
		                                                                           
		  if(Stop_Start_System_Public==9)                //��Ϊ��ɫ
		    TelltaleLCDFlag.Sig.LCD26 = 1;
		  else if(Stop_Start_System_Public==2)
		  {
		    if(FLASH_SYNC_1Hz)
		      TelltaleLCDFlag.Sig.LCD26 = 1;
		    else
		      TelltaleLCDFlag.Sig.LCD26 = 0;
		  }
		  else 
		    TelltaleLCDFlag.Sig.LCD26 = 0;		
		  //������ͣ���ܹرպ�ɫ   40     Ϋ��:û�У�����˹:�У����:û��
	  }	
    else
    {
      TelltaleLCDFlag.Sig.LCD25 = 0;
	    TelltaleLCDFlag.Sig.LCD26 = 0;	
    }		
		// PTO ����ָʾ��      18	
	  if(NVM_CONFIG_PTO==0 )
	  {
		  if(LINE_IN_PTO_SIGNAL)
		  {
		    Sound_Request(SND_PTO, 1);
		    TelltaleLCDFlag.Sig.LCD27 = 1;
		    if(PTO_Count<=60)
    		{ 
    			PTO_Count++;
        	if((PTO_Count<=10)|| ((PTO_Count>20)&& (PTO_Count<=30))|| ((PTO_Count>40)&& (PTO_Count<=50)))
        	{
        		LED_RIGHT_RED   = 0 ;
        		LED_LEFT_RED    = 0 ;
        		LED_RIGHT_WHITE  = 1 ;
        		LED_LEFT_WHITE  = 1 ;
        	}
        	else
        	{
        		LED_RIGHT_RED   = 1 ;
        		LED_LEFT_RED    = 1 ;
        		LED_RIGHT_WHITE  = 0 ;
        		LED_LEFT_WHITE  = 0 ;
        	}
    		}
    		else
    		{  
          PTO_Count=61;
    		}
		  }
		  else
		  { 
		    if((PTO_Count>0)&&(PTO_Count<=60))
			  {
			    LED_RIGHT_RED   = 1 ;
    			LED_LEFT_RED    = 1 ;
    			LED_RIGHT_WHITE  = 0 ;
    			LED_LEFT_WHITE  = 0 ;
			  }
		    PTO_Count=0;
		    Sound_Delete(SND_PTO);
		    TelltaleLCDFlag.Sig.LCD27 = 0;
		  }	
		}
		else
		{
		  Sound_Delete(SND_PTO);
		  TelltaleLCDFlag.Sig.LCD27 = 0;
		}
		//�ƶ��ƶ�˿������     19
    if(BreakLightWarning)
		{
		  TelltaleLCDFlag.Sig.LCD28 = 1;
		  if(BreakLight_Count<=60)
    	{ 
    		BreakLight_Count++;
        if((BreakLight_Count<=10)|| ((BreakLight_Count>20)&& (BreakLight_Count<=30))|| ((BreakLight_Count>40)&& (BreakLight_Count<=50)))
        {
        	LED_RIGHT_RED   = 0 ;
        	LED_LEFT_RED    = 0 ;
        	LED_RIGHT_WHITE  = 1 ;
        	LED_LEFT_WHITE  = 1 ;
        }
        else
        {
        	LED_RIGHT_RED   = 1 ;
        	LED_LEFT_RED    = 1 ;
        	LED_RIGHT_WHITE  = 0 ;
        	LED_LEFT_WHITE  = 0 ;
        }
    	}
    	else
    	{  
        BreakLight_Count=61;
    	}
		}
		else
		{ 
		  if((BreakLight_Count>0)&&(BreakLight_Count<=60))
			{
			  LED_RIGHT_RED   = 1 ;
    		LED_LEFT_RED    = 1 ;
    		LED_RIGHT_WHITE  = 0 ;
    		LED_LEFT_WHITE  = 0 ;
			}
		  BreakLight_Count=0;
		  TelltaleLCDFlag.Sig.LCD28 = 0;
		}
		
		//ǰ����Ƭ������     12
		if(LINE_IN_RF_HOOVES_SIGNAL)
		{
		  TelltaleLCDFlag.Sig.LCD29 = 1;
		  if(RF_HOOVES_Count<=60)
    	{ 
    		RF_HOOVES_Count++;
        if((RF_HOOVES_Count<=10)|| ((RF_HOOVES_Count>20)&& (RF_HOOVES_Count<=30))|| ((RF_HOOVES_Count>40)&& (RF_HOOVES_Count<=50)))
        {
        	LED_RIGHT_RED   = 0 ;
        	LED_LEFT_RED    = 0 ;
        	LED_RIGHT_WHITE  = 1 ;
        	LED_LEFT_WHITE  = 1 ;
        }
        else
        {
          LED_RIGHT_RED   = 1 ;
          LED_LEFT_RED    = 1 ;
          LED_RIGHT_WHITE  = 0 ;
          LED_LEFT_WHITE  = 0 ;
        }
    	}
    	else
    	{  
        RF_HOOVES_Count=61;
    	}
		}
		else
		{ 
		  if((RF_HOOVES_Count>0)&&(RF_HOOVES_Count<=60))
			{
			  LED_RIGHT_RED   = 1 ;
    	  LED_LEFT_RED    = 1 ;
    	  LED_RIGHT_WHITE  = 0 ;
    	  LED_LEFT_WHITE  = 0 ;
			}
		  RF_HOOVES_Count=0;
		  TelltaleLCDFlag.Sig.LCD29 = 0;
		}
		
		//������Ƭ������     12
		if(LINE_IN_RR_HOOVES_SIGNAL)
		{
		  TelltaleLCDFlag.Sig.LCD30 = 1;
		  if(RR_HOOVES_Count<=60)
    	{ 
    		RR_HOOVES_Count++;
        if((RR_HOOVES_Count<=10)|| ((RR_HOOVES_Count>20)&& (RR_HOOVES_Count<=30))|| ((RR_HOOVES_Count>40)&& (RR_HOOVES_Count<=50)))
        {
        	LED_RIGHT_RED   = 0 ;
        	LED_LEFT_RED    = 0 ;
        	LED_RIGHT_WHITE  = 1 ;
        	LED_LEFT_WHITE  = 1 ;
        }
        else
        {
        	LED_RIGHT_RED   = 1 ;
        	LED_LEFT_RED    = 1 ;
        	LED_RIGHT_WHITE  = 0 ;
        	LED_LEFT_WHITE  = 0 ;
        }
    	}
    	else
    	{  
        RR_HOOVES_Count=61;
    	}
		}
		else
		{ 
		  if((RR_HOOVES_Count>0)&&(RR_HOOVES_Count<=60))
			{
			  LED_RIGHT_RED   = 1 ;
    		LED_LEFT_RED    = 1 ;
    		LED_RIGHT_WHITE  = 0 ;
    		LED_LEFT_WHITE  = 0 ;
			}
		  RR_HOOVES_Count=0;
		  TelltaleLCDFlag.Sig.LCD30 = 0;
		}
	} 
	else if( SYS_IGN_OFF_DISP_MODE )
	{	
    ASTL_Flag= 0 ;
    TelltaleLCDFlag.Telltale =0x00000000;   
     
    if(PepslcuAlarm==13)    //  ����ʱԿ���ڳ���
    {
      Sound_Request(SND_LockWithKeyInCar, 1);
    }
    else
      Sound_Delete(SND_LockWithKeyInCar); 
    Sound_Delete(SND_BreakPressure);    
  	//5 Զ��ָʾ��                                 15       30
  	if(HighBeamSts == 1)
  		BD83790A |=  BD8379_D8;
  	else 
  		BD83790A &=  ~BD8379_D8;
  	//�����
		
  	if(LowBeamSts==1)
		  TelltaleLCDFlag.Sig.LCD17 = 1;
		else 
		  TelltaleLCDFlag.Sig.LCD17 = 0;
		
    LED_RIGHT_WHITE  = 1 ;
    LED_LEFT_WHITE  = 1 ;
		//�ſ�������     KL30     ��������15      ���٣�0 ���ߵ�λΪP ����N ����M����R ��ʱ    ????
	  //	if(((DataVSpeedActual>0)||(ActualGearPosition>0))&&((DriveDoorSts==1)||(PsngrDoorSts==1)))
		if((HazardLightSts==1)&&(BlTurnOffDelay == 0))
    {
      BD83790A |=  BD8379_D1;
  	  LINE_RIGHT_GREEN = 0 ;	  
  	  BD83790A |=  BD8379_D7;
  	  LED_LEFT_GREEN = 0 ;
  	  Sound_Request(SND_TICK, 1);
    }
    else if((RHTurnSignalSts == 1) &&(LHTurnSignalSts == 1)) 
    {
      BD83790A |=  BD8379_D1;
      LINE_RIGHT_GREEN = 0 ;	
      BD83790A |=  BD8379_D7;
      LED_LEFT_GREEN = 0 ;
      Sound_Request(SND_TICK, 1);
    }
    else
    {
  		BD83790A &=  ~BD8379_D1;
  	  LINE_RIGHT_GREEN = 1;     // 20200427fhl
  		BD83790A &=  ~BD8379_D7;
  	  LED_LEFT_GREEN = 1 ;     // 20200427fhl
      Sound_Delete(SND_TICK);
    } 		  
	  if ((DriveDoorSts==1)||(PsngrDoorSts==1))
	  {
	    TelltaleLCDFlag.Sig.LCD06 = 1;
	    if (BCM_ICM_Alarm==1)
	      Sound_Request(SND_DOOR_OPENED, 1);
	    else
	     Sound_Delete(SND_DOOR_OPENED);
      if(DoorSts_Count<=60)
			{ 
			  DoorSts_Count++;
    		if((DoorSts_Count<=10)|| ((DoorSts_Count>20)&& (DoorSts_Count<=30))|| ((DoorSts_Count>40)&& (DoorSts_Count<=50)))
    		{
    		  LED_RIGHT_RED   = 0 ;
    		  LED_LEFT_RED    = 0 ;
    		  //LED_RIGHT_WHITE  = 1 ;
          // LED_LEFT_WHITE  = 1 ;
    		}
    		else
    		{
    		  LED_RIGHT_RED   = 1 ;     // 20200427fhl
    		  LED_LEFT_RED    = 1 ;     // 20200427fhl
    		  // LED_RIGHT_WHITE  = 1 ;
          // LED_LEFT_WHITE  = 1 ;
    		}
			}
		  else
	    {  
	      DoorSts_Count=61;
	      LED_RIGHT_RED   = 1 ;     // 20200427fhl
			  LED_LEFT_RED    = 1 ;     // 20200427fhl
			  //LED_RIGHT_WHITE  = 1 ;
        // LED_LEFT_WHITE  = 1 ;
	    }
	  }
  	else
	  { 
	    TelltaleLCDFlag.Sig.LCD06 = 0;
	    if((DoorSts_Count>0)&&(DoorSts_Count<=60))
	    {
    	  LED_RIGHT_RED   = 1 ;    // 20200427fhl
    		LED_LEFT_RED    = 1 ;    // 20200427fhl
			}
  		DoorSts_Count=0;
  		Sound_Delete(SND_DOOR_OPENED);
	  } 			
		//���Ӿ���˪   KL30       39
	  //	if(RearviewMirrorDefSts)
	  //	  TelltaleLCDFlag.Sig.LCD12 = 1;
    //	else 
		  TelltaleLCDFlag.Sig.LCD12 = 0;
		
		//С��     KL15��KL30        48
		if(PositionLightSts==1) 
		  TelltaleLCDFlag.Sig.LCD11 = 1;
		else 
		  TelltaleLCDFlag.Sig.LCD11 = 0;
	  // if((DriveDoorSts==1)||(PsngrDoorSts==1)) 
    // {       
    //   TFT_LCD_Display_Sprite(LAYER_LED06,  SN_zhishideng_06_png, 265, 9, 64); //�ſ�������     KL30     ��������15     
    // }
    // if(PositionLightSts==1) 
    // { 
    //   TFT_LCD_Display_Sprite(LAYER_LED11,  SN_zhishideng_11_png, 490, 9, 64);
    // }
           	
		BD83790B &=  ~BD8379_D10;//������
	  if( NVM_CONFIG_EPB==0 )      //20200609fhl
	  {
	    BD83790A &=  ~BD8379_D10;//פ���ƶ�
	    Sound_Delete(SND_Break_down);
	  }
	  else
	  {
    	if((LINE_IN_BREAK_SIGNAL)||(Brake_Switch==1))    //20200302
    	{
    	  BD83790A &=  ~BD8379_D10;//פ���ƶ�
    	  Sound_Delete(SND_Break_down);
    	  if((Break_nodown_Count>0)&&(Break_nodown_Count<=60))
    	  {
        	LED_RIGHT_RED   = 1 ;    // 20200427fhl
        	LED_LEFT_RED    = 1 ;    // 20200427fhl
    		}
      	Break_nodown_Count=0;
    	}
    	else
    	{
    		if(FLASH_SYNC_1Hz)
    		{
    		  BD83790A |=  BD8379_D10;//פ���ƶ�
    		}
    		else
    		{
    		  BD83790A &=  ~BD8379_D10;//פ���ƶ�
    		}
    		Sound_Request(SND_Break_down,1);
    		if(Break_nodown_Count<=60)
    		{ 
    			Break_nodown_Count++;
        	if((Break_nodown_Count<=10)|| ((Break_nodown_Count>20)&& (Break_nodown_Count<=30))|| ((Break_nodown_Count>40)&& (Break_nodown_Count<=50)))
        	{
        		LED_RIGHT_RED   = 0 ;
        		LED_LEFT_RED    = 0 ;
        		//LED_RIGHT_WHITE  = 1 ;
            // LED_LEFT_WHITE  = 1 ;
        	}
        	else
        	{
        		LED_RIGHT_RED   = 1 ;     // 20200427fhl
        		LED_LEFT_RED    = 1 ;     // 20200427fhl
        		// LED_RIGHT_WHITE  = 1 ;
            // LED_LEFT_WHITE  = 1 ;
        	}
    		}
    		else
    	  {  
    	    Break_nodown_Count=61;
    	    LED_RIGHT_RED   = 1 ;     // 20200427fhl
    			LED_LEFT_RED    = 1 ;     // 20200427fhl
    			//LED_RIGHT_WHITE  = 1 ;
          // LED_LEFT_WHITE  = 1 ;
    	  }
    	}
		}
	  
	  BD83790A &=  ~BD8379_D9;//ȼ��Һλ
		BD83790A &=  ~BD8379_D2;
		BD83790A &=  ~BD8379_D3;
		BD83790A &=  ~BD8379_D4;
		BD83790A &=  ~BD8379_D5;
		BD83790A &=  ~BD8379_D6;
		BD83790A &=  ~BD8379_D11;
		BD83790B &=  ~BD8379_D0;  
		BD83790B &=  ~BD8379_D1;
		BD83790B &=  ~BD8379_D2;
		BD83790B &=  ~BD8379_D3;
		BD83790B &=  ~BD8379_D4;
		BD83790B &=  ~BD8379_D5;
		BD83790B &=  ~BD8379_D6;
		BD83790B &=  ~BD8379_D7;
		BD83790B &=  ~BD8379_D8;
		BD83790B &=  ~BD8379_D9;
		BD83790B &=  ~BD8379_D11;
		
		LowBrakeLuidLevel_timp = 0;		
		TelltaleLCDFlag.Sig.LCD32 = 0;
		Sound_Delete(SND_CNG_GasLeak);
		Sound_Delete(SND_SEATBELT_SPEED);   //��ȫ�������ر�
		Sound_Delete(SND_PTO);              //PTO�������ر�
		Sound_Delete(SND_LOW_FUEL_SPEED);  //ȼ��Һλ�ͱ������ر�
		Sound_Delete(SND_OVER_SPEED);     //����
		Sound_Delete(SND_AEB);
	}	
	else if( SYS_SELF_TEST_DISP_MODE )           //�Լ�
	{
  	Sound_Delete(SND_LockWithKeyInCar);
  	BD83790A  = 0xFFFF0000;
  	BD83790B  = 0xFFFF0000;
  	BD83790B &=  ~BD8379_D4;
    //	OldBD83790A = 0xFFFF0000;
    //	OldBD83790B = 0xFFFF0000;
    //	DB8379_WriteData(OldBD83790A, OldBD83790B);
    LED_RIGHT_WHITE  = 0 ;
    LED_LEFT_WHITE  = 0 ;

    //TelltaleLCDFlag.Telltale =0xFFFFFFFF;
    TelltaleLCDFlag.Sig.LCD24 = 1;
    
    LowBrakeLuidLevel_timp = 0;
    TelltaleLCDFlag.Sig.LCD32 = 0;
		Sound_Delete(SND_CNG_GasLeak);
  }
	else
	{
	   Sound_Delete(SND_LockWithKeyInCar);
	   TelltaleLCDFlag.Sig.LCD32 = 0;
		 Sound_Delete(SND_CNG_GasLeak);
		 LowBrakeLuidLevel_timp = 0;
	}
	
	if((OldBD83790A!=BD83790A)||(OldBD83790B!=BD83790B))
	{
	  DB8379_WriteData(BD83790A, BD83790B);
		OldBD83790A=BD83790A;
		OldBD83790B=BD83790B;
	}
}



