Browse Source

版本号:2.3.0.9-3,加入测试的时候响蜂鸣器

CHENJIE-PC\QiXiang_CHENJIE 3 years ago
parent
commit
83a8e0dcd2
2 changed files with 4 additions and 2 deletions
  1. 3 1
      src/CANTask.c
  2. 1 1
      src/UartTask.c

+ 3 - 1
src/CANTask.c

@@ -96,7 +96,7 @@ static void Can_Receive()
 						if(CanRxMsg[i].Id == 0x7A0)
 						{	
 							udsFlag = 1;
-							BuzzerControl = TRUE;
+							relayControl(TRUE);
 							UDSService[i] =  CanRxMsg[i].Data[0];
 							UDSSubService[i] = CanRxMsg[i].Data[1];
 							UDSSubServiceActionCode[i] = CanRxMsg[i].Data[2];
@@ -110,6 +110,7 @@ static void Can_Receive()
 						}
 						else if(CanRxMsg[i].Id == 0x7A1)
 						{
+							relayControl(TRUE);
 							if(CanRxMsg[i].Data[0] != 0x00)
 							{
 								msgFlag = 1;	
@@ -142,6 +143,7 @@ static void Can_Receive()
 				}
 				if(delayconuter>100 && msgFlag ==0)
 				{
+					relayControl(FALSE);
 					delayconuter=0;
 					PROC_CAN_STATE_SWITCH(PROCESS_CAN_STATE_IDLE);
 				}

+ 1 - 1
src/UartTask.c

@@ -228,7 +228,7 @@ static void UartTask(void* arg)
 					relayControlFunc(2);
 					ret = 0x00;
 				}
-				else if(BuzzerControl==TRUE && Timer_count%20==0)
+				else if(BuzzerControl==TRUE && Timer_count%10==0)
 				{
 					relayControlFunc(1);
 				}