Commit 60856990 authored by 时昊's avatar 时昊

大改一波

parent 74bd21fb
#include "Common.h"
///////////////////////////////////////////////////////////////////
void App_SwapWord(INT32U *pData1,INT32U *pData2)
{
INT32U psw;
if((*pData1) > (*pData2))
{
psw = (*pData2);
(*pData2) = (*pData1);
(*pData1) = psw;
}
}
void App_SortNWord(INT32U *SortData,INT8U len)
{
INT8U n=0,m;
for(;n < len-1;n++)
{
for(m = n+1;m < len;m++)
{
App_SwapWord((SortData + n),(SortData + m));
}
}
}
void App_SwapWord16(INT16U *pData1,INT16U *pData2)
{
INT16U psw;
if((*pData1) > (*pData2))
{
psw = (*pData2);
(*pData2) = (*pData1);
(*pData1) = psw;
}
}
void App_SortNWord16(INT16U *SortData,INT8U len)
{
INT8U n=0,m;
for(;n < len-1;n++)
{
for(m = n+1;m < len;m++)
{
App_SwapWord16((SortData + n),(SortData + m));
}
}
}
void App_SwapWord08(INT8U *pData1,INT8U *pData2)
{
INT8U psw;
if((*pData1) > (*pData2))
{
psw = (*pData2);
(*pData2) = (*pData1);
(*pData1) = psw;
}
}
void App_SortNWord08(INT8U *SortData,INT8U len)
{
INT8U n=0,m;
for(;n < len-1;n++)
{
for(m = n+1;m < len;m++)
{
App_SwapWord08((SortData + n),(SortData + m));
}
}
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#ifndef _COMMON_H_
#define _COMMON_H_
typedef unsigned char INT8U;
typedef unsigned int INT16U;
typedef unsigned long INT32U;
///////////////////////////////////////////////////////////////////////////////////////////////////////
extern void App_SortNWord(INT32U *SortData,INT8U len);
extern void App_SortNWord16(INT16U *SortData,INT8U len);
extern void App_SortNWord08(INT8U *SortData,INT8U len);
///////////////////////////////////////////////////////////////////////////////////////////////////////
#endif
\ No newline at end of file
...@@ -387,7 +387,7 @@ void Gauges_Management_Service(void) ...@@ -387,7 +387,7 @@ void Gauges_Management_Service(void)
//App_SetMotorStep(CCC,Motor_2) ; //App_SetMotorStep(CCC,Motor_2) ;
/*ˮ��*/ /*ˮ��*/
// App_SetMotorStep(Coolant_Temperature.Value,Motor_1); App_SetMotorStep(Coolant_Temperature.Value,Motor_1);
/*����*/ /*����*/
App_SetMotorStep(DataConsPwr.u8CANSignal_InputVal,Motor_2); App_SetMotorStep(DataConsPwr.u8CANSignal_InputVal,Motor_2);
......
...@@ -77,7 +77,7 @@ void Power_On_Memory_Init(void) ...@@ -77,7 +77,7 @@ void Power_On_Memory_Init(void)
NVM_Init(); NVM_Init();
ReadAllDFlashData(); ReadAllDFlashData();
//Fuel_KL30_Read_Config_Init(); //Fuel_KL30_Read_Config_Init();
//CoolantTemp_KL30_Read_Config_Init(); CoolantTemp_KL30_Read_Config_Init();
TPMS_Config.F101 = Val_EOL_F101_TPMSType(); TPMS_Config.F101 = Val_EOL_F101_TPMSType();
TPMS_Config.F110 = Val_EOL_F110_TPMS(); TPMS_Config.F110 = Val_EOL_F110_TPMS();
BrakeType_Config.F101 = Val_EOL_F101_Break(); BrakeType_Config.F101 = Val_EOL_F101_Break();
......
...@@ -2390,8 +2390,8 @@ void Data_ChgTimeRemain_Service(void) ...@@ -2390,8 +2390,8 @@ void Data_ChgTimeRemain_Service(void)
void Data_15KL_Init(void) void Data_15KL_Init(void)
{ {
// Fuel_KL15_Change_Config_Init(); //Fuel_KL15_Change_Config_Init();
// CoolantTemp_KL15_Read_Config_Init(); CoolantTemp_KL15_Read_Config_Init();
TPMS_Config.F101 = Val_EOL_F101_TPMSType(); TPMS_Config.F101 = Val_EOL_F101_TPMSType();
TPMS_Config.F110 = Val_EOL_F110_TPMS(); TPMS_Config.F110 = Val_EOL_F110_TPMS();
...@@ -2634,23 +2634,23 @@ void Data_30KL_Init(void) ...@@ -2634,23 +2634,23 @@ void Data_30KL_Init(void)
void CoolantTemp_KL30_Read_Config_Init(void) void CoolantTemp_KL30_Read_Config_Init(void)
{ {
/* ConfFun.CoolantTem_Warning = Val_EOL_F102_WarningEngineCoolantTemperature(); ConfFun.CoolantTem_Warning = Val_EOL_F102_WarningEngineCoolantTemperature();
ConfFun.CoolantTem_H = Val_EOL_F102_HEngineCoolantTemperature(); ConfFun.CoolantTem_H = Val_EOL_F102_HEngineCoolantTemperature();
ConfFun_Backup.CoolantTem_Warning = ConfFun.CoolantTem_Warning; ConfFun_Backup.CoolantTem_Warning = ConfFun.CoolantTem_Warning;
ConfFun_Backup.CoolantTem_H = ConfFun.CoolantTem_H; ConfFun_Backup.CoolantTem_H = ConfFun.CoolantTem_H;
*/
} }
void CoolantTemp_Read_Config(void) void CoolantTemp_Read_Config(void)
{ {
/* ConfFun.CoolantTem_Warning = Val_EOL_F102_WarningEngineCoolantTemperature(); ConfFun.CoolantTem_Warning = Val_EOL_F102_WarningEngineCoolantTemperature();
ConfFun.CoolantTem_H = Val_EOL_F102_HEngineCoolantTemperature(); ConfFun.CoolantTem_H = Val_EOL_F102_HEngineCoolantTemperature();
*/
} }
void CoolantTemp_KL15_Read_Config_Init(void) void CoolantTemp_KL15_Read_Config_Init(void)
{ {
/* if ((ConfFun_Backup.CoolantTem_Warning != ConfFun.CoolantTem_Warning) || if ((ConfFun_Backup.CoolantTem_Warning != ConfFun.CoolantTem_Warning) ||
(ConfFun_Backup.CoolantTem_H != ConfFun.CoolantTem_H)) (ConfFun_Backup.CoolantTem_H != ConfFun.CoolantTem_H))
{ {
ConfFun_Backup.CoolantTem_Warning = ConfFun.CoolantTem_Warning ; ConfFun_Backup.CoolantTem_Warning = ConfFun.CoolantTem_Warning ;
...@@ -2677,7 +2677,7 @@ void CoolantTemp_KL15_Read_Config_Init(void) ...@@ -2677,7 +2677,7 @@ void CoolantTemp_KL15_Read_Config_Init(void)
MeterInfo[Motor_1].MicroStep[7] = 1270; MeterInfo[Motor_1].MicroStep[7] = 1270;
} }
*/
} }
/****************************************************************************** /******************************************************************************
...@@ -2690,15 +2690,15 @@ void CoolantTemp_KL15_Read_Config_Init(void) ...@@ -2690,15 +2690,15 @@ void CoolantTemp_KL15_Read_Config_Init(void)
******************************************************************************/ ******************************************************************************/
void Data_Coolant_Temp_Processing_Service(void) void Data_Coolant_Temp_Processing_Service(void)
{ {
/* INT8U Coolant_Temperautre ; INT8U Coolant_Temperautre ;
Coolant_Temperautre = EMS_EngCoolant_Temp; Coolant_Temperautre = Get_CAN_CH0_ID_18FA92D0_Sig_EMS_EngineCoolantTemperature();
if (SYS_OPR_STAT_IGN_ON) if (SYS_OPR_STAT_IGN_ON)
{ {
CoolantTemp_Read_Config(); CoolantTemp_Read_Config();
if((CANMsg_18FEEE00_Status.BIT.Function_Lost)||(Coolant_Temperautre > 0xFA)) if((CAN_MSG_Status(CAN_CH0, CAN_CH0_ID_EMS_18FA92D0_Msg_Count) == CAN_MSG_LOST) ||(Coolant_Temperautre > 0xFA))
{ {
Coolant_Temperature.Value = 0; Coolant_Temperature.Value = 0;
Coolant_Temperature.Valid = 0; Coolant_Temperature.Valid = 0;
...@@ -2727,15 +2727,15 @@ void Data_Coolant_Temp_Processing_Service(void) ...@@ -2727,15 +2727,15 @@ void Data_Coolant_Temp_Processing_Service(void)
Coolant_Temperature.Valid = 0; Coolant_Temperature.Valid = 0;
Coolant_Temperature.Symbol = Positive; Coolant_Temperature.Symbol = Positive;
} }
*/
} }
void Coolant_Meter_Data_Reset(void) void Coolant_Meter_Data_Reset(void)
{ {
/* Coolant_Temperature.Value = 0; Coolant_Temperature.Value = 0;
Coolant_Temperature.Valid = 0; Coolant_Temperature.Valid = 0;
Coolant_Temperature.Symbol = Positive; Coolant_Temperature.Symbol = Positive;
*/
} }
/**********************��ѹ*********************/ /**********************��ѹ*********************/
...@@ -4770,7 +4770,7 @@ void Data_TPMS_Value_Processing(void) ...@@ -4770,7 +4770,7 @@ void Data_TPMS_Value_Processing(void)
void Data_Drive_Info_Group1_Processing_Service(void) void Data_Drive_Info_Group1_Processing_Service(void)
{ {
RTC_TIME_Processing_Service(); RTC_TIME_Processing_Service();
// Data_Coolant_Temp_Processing_Service(); Data_Coolant_Temp_Processing_Service();
// Data_Instantaneous_Fuel_Service(); // Data_Instantaneous_Fuel_Service();
// Data_Avg_Fuel_Service() ; // Data_Avg_Fuel_Service() ;
......
...@@ -235,14 +235,14 @@ typedef struct{ ...@@ -235,14 +235,14 @@ typedef struct{
EXTERN _DataCruiseStruct DataCruise; EXTERN _DataCruiseStruct DataCruise;
/*typedef struct typedef struct
{ {
INT8U CoolantTem_Warning ; INT8U CoolantTem_Warning ;
INT8U CoolantTem_H ; INT8U CoolantTem_H ;
}_CoolantTemp_ConfFun; }_CoolantTemp_ConfFun;
EXTERN _CoolantTemp_ConfFun ConfFun_Backup; EXTERN _CoolantTemp_ConfFun ConfFun_Backup;
EXTERN _CoolantTemp_ConfFun ConfFun; EXTERN _CoolantTemp_ConfFun ConfFun;
*/
//������� //�������
typedef struct typedef struct
...@@ -355,7 +355,7 @@ typedef enum ...@@ -355,7 +355,7 @@ typedef enum
Negative, Negative,
}_Symbol; }_Symbol;
/*typedef struct typedef struct
{ {
INT16U Value; INT16U Value;
INT8U Symbol; INT8U Symbol;
...@@ -363,7 +363,7 @@ typedef enum ...@@ -363,7 +363,7 @@ typedef enum
}DataCoolantStruct; }DataCoolantStruct;
EXTERN DataCoolantStruct Coolant_Temperature; EXTERN DataCoolantStruct Coolant_Temperature;
*/
typedef struct typedef struct
{ {
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment