Commit f39283e7 authored by 陈家乐's avatar 陈家乐

feat:里程最大值公英制统一

parent bb405dff
...@@ -64,7 +64,7 @@ void Data_User_Mileage_KL30Init(void) ...@@ -64,7 +64,7 @@ void Data_User_Mileage_KL30Init(void)
{ {
ODOInit.Offset = TempBuf[1]; ODOInit.Offset = TempBuf[1];
} }
ODOInit.MaxValue = 1999990; ODOInit.MaxValue = 3218672;//英里199999
Data_ODO_KL30_Init(DataODOBuf, &ODOInit, Func.EEPromWrite_Cbk); Data_ODO_KL30_Init(DataODOBuf, &ODOInit, Func.EEPromWrite_Cbk);
(void)Data_User_EEPROM_Read(EM_TRIP_BLOCK, TempBuf + 3, 2); (void)Data_User_EEPROM_Read(EM_TRIP_BLOCK, TempBuf + 3, 2);
...@@ -85,7 +85,7 @@ void Data_User_Mileage_KL30Init(void) ...@@ -85,7 +85,7 @@ void Data_User_Mileage_KL30Init(void)
TripInit[EM_TRIP_A].Offset = TempBuf[4]; TripInit[EM_TRIP_A].Offset = TempBuf[4];
} }
//TripInit[EM_TRIP_A].Offset = TempBuf[4]; //TripInit[EM_TRIP_A].Offset = TempBuf[4];
TripInit[EM_TRIP_A].MaxValue = 9999; /* 最大999.9km 进行复位 */ TripInit[EM_TRIP_A].MaxValue = 16091; /* 英里最大999.9km 进行复位 */
TripInit[EM_TRIP_A].IsRestart = 1u; TripInit[EM_TRIP_A].IsRestart = 1u;
//TripInit[EM_TRIP_B].Stamp = 0xFFFFFFFFu; //TripInit[EM_TRIP_B].Stamp = 0xFFFFFFFFu;
...@@ -297,7 +297,7 @@ void Services_Mileage_Callback(void) ...@@ -297,7 +297,7 @@ void Services_Mileage_Callback(void)
//Data_Mileage_ISR(); //Data_Mileage_ISR();
Data_ODO_Processing(); Data_ODO_Processing();
Data_Trip_Processing(); Data_Trip_Processing();
//Trip_Clear_Km_Service(); Trip_Clear_Km_Service();
} }
/** /**
...@@ -319,6 +319,10 @@ uint32_t Get_ODO_Value(void) ...@@ -319,6 +319,10 @@ uint32_t Get_ODO_Value(void)
{ {
ODO = Data_ODO_Read(); ODO = Data_ODO_Read();
} }
if(ODO >= 199999)
{
ODO = 199999;
}
return ODO; return ODO;
} }
......
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