Commit 50993e08 authored by hu's avatar hu

修改水温上升一个BUG

parent 68bcac1a
...@@ -83,9 +83,9 @@ void Coolant_Processing_Service(void) ...@@ -83,9 +83,9 @@ void Coolant_Processing_Service(void)
if (CanStatus == CAN_SIG_LOST) if (CanStatus == CAN_SIG_LOST)
{ {
CoolantVariable.Valid = 0 ; CoolantVariable.Valid = 0u;
CoolantVariable.Value = 0u; CoolantVariable.Value = 0u;
Timer2s = 0 ; Timer2s = 0u;
} }
else else
{ {
...@@ -94,6 +94,7 @@ void Coolant_Processing_Service(void) ...@@ -94,6 +94,7 @@ void Coolant_Processing_Service(void)
if (Msg_CoolTemp > 0xFAu) if (Msg_CoolTemp > 0xFAu)
{ {
CoolantVariable.Valid = 0u ; CoolantVariable.Valid = 0u ;
CoolantVariable.Value = 0u;
TargetSeg = 0u; TargetSeg = 0u;
} }
else else
...@@ -115,17 +116,17 @@ void Coolant_Processing_Service(void) ...@@ -115,17 +116,17 @@ void Coolant_Processing_Service(void)
TempCurSeg = CalCoolant_CurSeg(CoolantVariable.Valid, CoolantVariable.Value); TempCurSeg = CalCoolant_CurSeg(CoolantVariable.Valid, CoolantVariable.Value);
if ( if (
(GetGaugesDirec(TempGauges) == 1) && (GetGaugesDirec(TempGauges) == 1u) &&
(TempCurSeg == DestPostion[TempGauges] / 10) (TempCurSeg == DestPostion[TempGauges] / 10u)
) )
{ {
if (DestPostionOld != DestPostion[TempGauges] / 10) if (DestPostionOld != DestPostion[TempGauges] / 10u)
{ {
DestPostionOld = DestPostion[TempGauges] / 10; DestPostionOld = DestPostion[TempGauges] / 10u;
TempCurSegTime = 0; TempCurSegTime = 0u;
} }
if (TempCurSegTime < 200) if (TempCurSegTime < 200u)
{ {
TempCurSegTime ++; TempCurSegTime ++;
} }
...@@ -136,7 +137,7 @@ void Coolant_Processing_Service(void) ...@@ -136,7 +137,7 @@ void Coolant_Processing_Service(void)
} }
else else
{ {
TempCurSegTime = 0; TempCurSegTime = 0u;
CoolantVariable.CurSeg = TempCurSeg; CoolantVariable.CurSeg = TempCurSeg;
} }
} }
......
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