|
@@ -138,6 +138,7 @@ void SFM(void)
|
|
|
static boolean_T sfmd_flg_Tup;
|
|
|
static boolean_T sfmd_flg_modTOpenFlt_keep;
|
|
|
static uint16_T CntB;
|
|
|
+ static boolean_T ihd_flg_urtRecFlt_Delay = false;
|
|
|
|
|
|
int32_T SumR;
|
|
|
int32_T SumRR;
|
|
@@ -153,9 +154,15 @@ void SFM(void)
|
|
|
uint16_T j;
|
|
|
uint16_T k;
|
|
|
|
|
|
+ if (ihd_flg_urtRecFlt_Delay)
|
|
|
+ {
|
|
|
+ FirstRun_SFM = true;
|
|
|
+ }
|
|
|
+ ihd_flg_urtRecFlt_Delay = ihd_flg_urtRecFlt;
|
|
|
//初值
|
|
|
if (FirstRun_SFM)
|
|
|
{
|
|
|
+
|
|
|
memset(&DiagThr, 0, sizeof(DiagThr));
|
|
|
memset(&DiagTime, 0, sizeof(DiagTime));
|
|
|
Cntl = 10;
|
|
@@ -211,7 +218,6 @@ void SFM(void)
|
|
|
sfmd_flg_Tup = false;
|
|
|
sfmd_flg_modTOpenFlt_keep = false;
|
|
|
CntB = 0;
|
|
|
- ;
|
|
|
|
|
|
ihd_T_mosT_Delay = ihd_T_mosT;
|
|
|
ihd_T_DCPlugT_Delay = ihd_T_DCPlugT;
|
|
@@ -244,7 +250,6 @@ void SFM(void)
|
|
|
if (ihd_flg_urtRecFlt)
|
|
|
{
|
|
|
sfmd_flg_interComFlt = true;
|
|
|
- FirstRun_SFM = true;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -457,9 +462,9 @@ void SFM(void)
|
|
|
{
|
|
|
modTArr[i] = ihv_T_modT[i];
|
|
|
}
|
|
|
- for (i = 0; i < cmnc_num_modTNum; i++)
|
|
|
+ for (i = 0; i < cmnc_num_modTNum ; i++)
|
|
|
{
|
|
|
- if (!sfmv_flg_modTOpenFlt[i] && ((int16_T)(modTArr[i] - ihv_T_modT[i]) > 10 || (int16_T)(modTArr[i] - ihv_T_modT[i]) < -20)&& !sfmd_flg_interComFlt)
|
|
|
+ if (!sfmv_flg_modTOpenFlt[i] && ((int16_T)(modTArr[i] - ihv_T_modT[i]) > 10 || (int16_T)(modTArr[i] - ihv_T_modT[i]) < -20) && !sfmd_flg_interComFlt)
|
|
|
{
|
|
|
modTRationNr[i] = (modTRationNr[i] + 1) > 200 ? 200 : (modTRationNr[i] + 1);
|
|
|
}
|
|
@@ -480,6 +485,7 @@ void SFM(void)
|
|
|
sfmd_flg_modTRationFlt = sfmd_flg_modTRationFlt || sfmv_flg_modTRationFlt[i];
|
|
|
}
|
|
|
|
|
|
+ //printf("%d,%d,%d,%d\n",ihd_T_mosT_Delay,ihd_T_mosT,FirstRun_SFM,ihd_flg_urtRecFlt);
|
|
|
//62 充电Mos 温度合理性故障
|
|
|
sfmd_flg_chrgMosTRationFltOnce = !sfmd_flg_interComFlt && !sfmd_flg_chrgMosTOpenFlt && ((int16_T)(ihd_T_mosT - ihd_T_mosT_Delay) < -10 ||(int16_T)(ihd_T_mosT - ihd_T_mosT_Delay) > 20);
|
|
|
if (!sfmd_flg_chrgMosTRationFltOnce)
|
|
@@ -1711,14 +1717,14 @@ void SFM(void)
|
|
|
sfmd_st_fltAct = sfmd_st_fltAct | FltActArr[i];
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- /* for(i=0;i < 20;i++)
|
|
|
+ /*
|
|
|
+ for(i=0;i < 20;i++)
|
|
|
{
|
|
|
printf("%d ",sfmv_idx_fltCode[i]);
|
|
|
}
|
|
|
printf("\n");
|
|
|
-
|
|
|
-*/
|
|
|
+ */
|
|
|
+
|
|
|
///=====================================================================
|
|
|
//======================================================================
|
|
|
|