Commit a3e20da7 authored by 李俭双's avatar 李俭双

🐞 fix:43662,依据规范变更,更改响应燃油策略

parent 6635145e
...@@ -125,27 +125,25 @@ void Fuel_R_Cal(uint8_t deltaTime) ...@@ -125,27 +125,25 @@ void Fuel_R_Cal(uint8_t deltaTime)
void Fuel_State_Check(uint8_t deltaTime) void Fuel_State_Check(uint8_t deltaTime)
{ {
// if (FuelR < 20) if (FuelR < 30)
//{ /*短路 1*/ { /*短路 1*/
// FuelSensorOpenTime = 0; FuelSensorOpenTime = 0;
// FuelSensorNormalTime = 0; FuelSensorNormalTime = 0;
// if ((FuelSensorShortTime > 3000) || ((FuelStateInitFlag) && (FuelSensorShortTime > 3000))) if ((FuelSensorShortTime > 3000) || ((FuelStateInitFlag) && (FuelSensorShortTime > 3000)))
// { {
// FuelSensorState = FuelSensorShortCircuit; FuelSensorState = FuelSensorShortCircuit;
// DesFuelSetp = 0; DesFuelSetp = 0;
// CurFuelSetp = 0; CurFuelSetp = 0;
// FuelStateInitFlag = 0; FuelStateInitFlag = 0;
// FuelInitFlag = 1; FuelInitFlag = 1;
// FuelDir = FUEL_SEG_UP; FuelDir = FUEL_SEG_UP;
// } }
// else else
// { {
// FuelSensorShortTime += deltaTime; FuelSensorShortTime += deltaTime;
// } }
// } }
// else else if (FuelR >= 3100)
if (FuelR >= 10000)
{ /*断路 320*/ { /*断路 320*/
FuelSensorShortTime = 0; FuelSensorShortTime = 0;
FuelSensorNormalTime = 0; FuelSensorNormalTime = 0;
...@@ -184,7 +182,7 @@ void Fuel_Gauges_Cal(uint8_t deltaTime) ...@@ -184,7 +182,7 @@ void Fuel_Gauges_Cal(uint8_t deltaTime)
{ {
static uint32_t time = 0; static uint32_t time = 0;
if ((FuelSensorState == FuelSensorNormal) && (FuelR < 10000)) if ((FuelSensorState == FuelSensorNormal) && (FuelR < 3100))
{ // 32000 //FuelR >10 change FuelR >20 { // 32000 //FuelR >10 change FuelR >20
/*采集完第一组数据后,开始计算燃油格数*/ /*采集完第一组数据后,开始计算燃油格数*/
if (FuelADCompleteFlg) if (FuelADCompleteFlg)
...@@ -383,6 +381,18 @@ FuelSensorSts_t Get_Fuel_Sensor_State(void) ...@@ -383,6 +381,18 @@ FuelSensorSts_t Get_Fuel_Sensor_State(void)
uint16_t Get_Fuel_RES(void) uint16_t Get_Fuel_RES(void)
{ {
uint16_t Fuel_Res = 0; uint16_t Fuel_Res = 0;
Fuel_Res = FuelR / 10; if(Get_Fuel_Sensor_State() == FuelSensorShortCircuit)
{
Fuel_Res = 3;
}
else if (Get_Fuel_Sensor_State() == FuelSensorOpenCircuit)
{
Fuel_Res = 310;
}
else
{
Fuel_Res = FuelR / 10;
}
return Fuel_Res; return Fuel_Res;
} }
...@@ -979,7 +979,7 @@ void SEG_SET_FuelDial(uint8_t m_Flag, uint8_t m_SEG) ...@@ -979,7 +979,7 @@ void SEG_SET_FuelDial(uint8_t m_Flag, uint8_t m_SEG)
IC2_SEG102 = IC_SEG_GREY; IC2_SEG102 = IC_SEG_GREY;
IC2_SEG101 = IC_SEG_GREY; IC2_SEG101 = IC_SEG_GREY;
if ((Get_Fuel_Sensor_State() == 2) && (ClearODO_Flag != 1) && (Common_GetIgnOnTime() >= 3000)) if (((Get_Fuel_Sensor_State() == 2) || (Get_Fuel_Sensor_State() == 1))&& (ClearODO_Flag != 1) && (Common_GetIgnOnTime() >= 3000))
{ {
if (FLASH_SYNC_1Hz) if (FLASH_SYNC_1Hz)
{ {
......
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