Commit 03aa812a authored by 高士达's avatar 高士达

🎉 init:调整EE存储相关

parent b768d65a
......@@ -15,7 +15,7 @@
--------------------------------------------------------------------------*/
void eeprom_StoreInfo_Init(void)
{
eeprom_SetParameter(AT24C16,distance_100m);
eeprom_SetParameter(AT24C16,distance_1000m);
EE_SCL_OutConfig();
EE_SDA_OutConfig();
}
......
......@@ -81,24 +81,24 @@ void Data_User_Mileage_KL30Init(void)
{
ODOInit.Offset = TempBuf [ 2 ];
}
ODOInit.MaxValue = 9999999;
ODOInit.MaxValue = 16093439; //999999.0mile
Data_ODO_KL30_Init(DataODOBuf, &ODOInit, Func.EEPromWrite_Cbk);
( void )Data_User_EEPROM_Read(EM_TRIP_BLOCK, TempBuf + 3, 4);
TripInit [ EM_TRIP_A ].Stamp = 0xFFFFFFFFu;
TripInit [ EM_TRIP_A ].MaxValue = 99999;
TripInit [ EM_TRIP_A ].MaxValue = 1609343;//99999.9mile
TripInit [ EM_TRIP_A ].IsRestart = 1u;
TripInit [ EM_TRIP_B ].Stamp = 0xFFFFFFFFu;
TripInit [ EM_TRIP_B ].MaxValue = 99999;
TripInit [ EM_TRIP_B ].Stamp = 0xFFFFFFFFu;//99999.9mile
TripInit [ EM_TRIP_B ].MaxValue = 1609343;
TripInit [ EM_TRIP_B ].IsRestart = 1u;
TripInit [ EM_TRIP_C ].Stamp = 0xFFFFFFFFu;
TripInit [ EM_TRIP_C ].MaxValue = 99999;
TripInit [ EM_TRIP_C ].Stamp = 0xFFFFFFFFu;//99999.9mile
TripInit [ EM_TRIP_C ].MaxValue = 1609343;
TripInit [ EM_TRIP_C ].IsRestart = 1u;
TripInit [ EM_TRIP_D ].Stamp = 0xFFFFFFFFu;
TripInit [ EM_TRIP_D ].MaxValue = 99999;
TripInit [ EM_TRIP_D ].Stamp = 0xFFFFFFFFu;//99999.9mile
TripInit [ EM_TRIP_D ].MaxValue = 1609343;
TripInit [ EM_TRIP_D ].IsRestart = 1u;
Data_Trip_KL30_Init(DataTripBuf, TripInit, EM_TRIP_MAX, Func.EEPromWrite_Cbk);
......@@ -181,7 +181,7 @@ static void Data_User_EEPROM_Write(Data_EEPROM_Enum_t BlockID, uint32_t u32Data
{
while(odo_writeState != WRITE_COMPLETE)
{
odo_writeState = eeprom_WriteODO(&g_WriteMileage, distance_100m, 1);
odo_writeState = eeprom_WriteODO(&g_WriteMileage, distance_1000m, 1);
i++;
if(i > 10)
{
......
......@@ -49,9 +49,12 @@ void Power_KL30_Init ( void )
BU98R10_Init();
eeprom_StoreInfo_Init( ); //20221028
Data_User_Mileage_KL30Init();
}
......
......@@ -112,7 +112,7 @@ void Sys_Startup_Init(void)
Power_Management_Lib_Init();
Power_Management_Init(0u);
bsp_CAN_Init();
eeprom_StoreInfo_Init( ); //20221028
}
......
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