|
@@ -23,19 +23,10 @@
|
|
|
#include "CANTask.h"
|
|
|
#include "UDSService.h"
|
|
|
|
|
|
-<<<<<<< HEAD
|
|
|
-
|
|
|
-
|
|
|
-extern UINT32 Timer_count;
|
|
|
-extern volatile bool Sleep_flag;
|
|
|
-extern UartReadMsgType UartReadMsg;
|
|
|
-
|
|
|
-=======
|
|
|
extern osMutexId_t UartMutex;
|
|
|
extern UINT32 Timer_count;
|
|
|
extern volatile bool Sleep_flag;
|
|
|
extern UartReadMsgType UartReadMsg;
|
|
|
->>>>>>> V2版本集成
|
|
|
CAN_Msg_Type CanRxMsg[2];
|
|
|
/*线程声明*/
|
|
|
#define PROC_CAN_RX_TASK_STACK_SIZE (1024)
|
|
@@ -120,14 +111,9 @@ static void Can_Receive()
|
|
|
UDS_Service();
|
|
|
udsFlag = 0;
|
|
|
}
|
|
|
-<<<<<<< HEAD
|
|
|
- if(Timer_count%10==0&&UartReadMsg.len>0)
|
|
|
- {
|
|
|
-=======
|
|
|
if(Timer_count%10==0)
|
|
|
{
|
|
|
osMutexAcquire(UartMutex, osWaitForever);
|
|
|
->>>>>>> V2版本集成
|
|
|
CANSendBuffer.Id = 0x7A9;
|
|
|
CANSendBuffer.DLC = 8;
|
|
|
CANSendBuffer.Data[0] = UartReadMsg.data[(0x19+BATT_CELL_VOL_NUM+BATT_TEMP_NUM+BATT_OTHER_TEMP_NUM)*2+1];
|
|
@@ -138,15 +124,11 @@ static void Can_Receive()
|
|
|
CANSendBuffer.Data[5] = UartReadMsg.data[(0x0B+BATT_CELL_VOL_NUM+BATT_TEMP_NUM+BATT_OTHER_TEMP_NUM)*2];
|
|
|
CANSendBuffer.Data[6] = 0x00;
|
|
|
CANSendBuffer.Data[7] = 0x00;
|
|
|
-<<<<<<< HEAD
|
|
|
- HAL_Can_Transmit(CANSendBuffer);
|
|
|
-=======
|
|
|
if(UartReadMsg.len>0)
|
|
|
{
|
|
|
HAL_Can_Transmit(CANSendBuffer);
|
|
|
}
|
|
|
osMutexRelease(UartMutex);
|
|
|
->>>>>>> V2版本集成
|
|
|
}
|
|
|
break;
|
|
|
}
|