Commit c167fd00 authored by 张金硕's avatar 张金硕

🐞 fix:增加小计最大值,英制时小计大于999.9时清小计

parent 27c6e2fa
...@@ -97,7 +97,7 @@ void Data_User_Mileage_KL30Init(void) ...@@ -97,7 +97,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 = 16100; /* 最大999.9Mile 进行复位 */ TripInit[EM_TRIP_A].MaxValue = 16200; /* 最大999.9Mile 进行复位 */
TripInit[EM_TRIP_A].IsRestart = 1u; TripInit[EM_TRIP_A].IsRestart = 1u;
// TripInit[EM_TRIP_B].Stamp = 0xFFFFFFFFu; // TripInit[EM_TRIP_B].Stamp = 0xFFFFFFFFu;
...@@ -261,6 +261,14 @@ void Trip_Clear_Km_Service(void) ...@@ -261,6 +261,14 @@ void Trip_Clear_Km_Service(void)
Data_Clear_Trip_All(); Data_Clear_Trip_All();
} }
} }
else
{
Millib_uint32_t mile_data = Data_Km_To_Mile(Data_Read_Trip(EM_TRIP_A));
if (mile_data > 9999) /* 当前单位在Mile时,里程大于999.9KM进行清零 */
{
Data_Clear_Trip_All();
}
}
} }
......
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