|
@@ -160,13 +160,13 @@ static void UartTask(void* arg)
|
|
battSOCDisplay();
|
|
battSOCDisplay();
|
|
battErrorStateDisplay();
|
|
battErrorStateDisplay();
|
|
}
|
|
}
|
|
- else
|
|
|
|
- {
|
|
|
|
- #ifdef USING_PRINTF
|
|
|
|
- printf("battWarningStateDisplay\n");
|
|
|
|
- #endif
|
|
|
|
- battWarningStateDisplay();
|
|
|
|
- }
|
|
|
|
|
|
+ // else
|
|
|
|
+ // {
|
|
|
|
+ // #ifdef USING_PRINTF
|
|
|
|
+ // printf("battWarningStateDisplay\n");
|
|
|
|
+ // #endif
|
|
|
|
+ // battWarningStateDisplay();
|
|
|
|
+ // }
|
|
}
|
|
}
|
|
currentTimerCount = Timer_count;
|
|
currentTimerCount = Timer_count;
|
|
if(BMS_Fota_update_flag)
|
|
if(BMS_Fota_update_flag)
|
|
@@ -179,6 +179,7 @@ static void UartTask(void* arg)
|
|
UartWriteData.Data[0] = 0x00;
|
|
UartWriteData.Data[0] = 0x00;
|
|
UartWriteData.Data[1] = 0x00;
|
|
UartWriteData.Data[1] = 0x00;
|
|
osMessageQueuePut(UartWriteCmdHandle,&UartWriteData,0,1000);
|
|
osMessageQueuePut(UartWriteCmdHandle,&UartWriteData,0,1000);
|
|
|
|
+ PROC_UART_STATE_SWITCH(PROCESS_UART_STATE_READ);
|
|
}
|
|
}
|
|
else if (AppNVMData.isBattLocked==FALSE && ((UartReadMsg.data[(0x09+BATT_CELL_VOL_NUM+BATT_TEMP_NUM+2)*2+1])>>1)&0x03==0x00)
|
|
else if (AppNVMData.isBattLocked==FALSE && ((UartReadMsg.data[(0x09+BATT_CELL_VOL_NUM+BATT_TEMP_NUM+2)*2+1])>>1)&0x03==0x00)
|
|
{
|
|
{
|
|
@@ -186,6 +187,7 @@ static void UartTask(void* arg)
|
|
UartWriteData.Data[0] = 0x00;
|
|
UartWriteData.Data[0] = 0x00;
|
|
UartWriteData.Data[1] = 0x03;
|
|
UartWriteData.Data[1] = 0x03;
|
|
osMessageQueuePut(UartWriteCmdHandle,&UartWriteData,0,1000);
|
|
osMessageQueuePut(UartWriteCmdHandle,&UartWriteData,0,1000);
|
|
|
|
+ PROC_UART_STATE_SWITCH(PROCESS_UART_STATE_READ);
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
@@ -503,7 +505,7 @@ UINT8 Uart_DataRecv_func(UINT8* Uart_Read_Msg,UINT8* Uart_Recv_Buffer)
|
|
*(Uart_Read_Msg+6) = CRC_chk_buffer;
|
|
*(Uart_Read_Msg+6) = CRC_chk_buffer;
|
|
*(Uart_Read_Msg+7) = CRC_chk_buffer>>8;
|
|
*(Uart_Read_Msg+7) = CRC_chk_buffer>>8;
|
|
USARTdrv->Send(Uart_Read_Msg,8);
|
|
USARTdrv->Send(Uart_Read_Msg,8);
|
|
- #ifdef USING_PRINTF1
|
|
|
|
|
|
+ #ifdef USING_PRINTF
|
|
printf("Uart_Send_buffer: ");
|
|
printf("Uart_Send_buffer: ");
|
|
for(int i=0;i<8;i++)
|
|
for(int i=0;i<8;i++)
|
|
{
|
|
{
|
|
@@ -529,7 +531,7 @@ UINT8 Uart_DataRecv_func(UINT8* Uart_Read_Msg,UINT8* Uart_Recv_Buffer)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- #ifdef USING_PRINTF1
|
|
|
|
|
|
+ #ifdef USING_PRINTF
|
|
printf("Uart_Rece_buffer1: ");
|
|
printf("Uart_Rece_buffer1: ");
|
|
for(int i=0;i<Data_Len;i++)
|
|
for(int i=0;i<Data_Len;i++)
|
|
{
|
|
{
|