Commit 9f16ce0e authored by 高士达's avatar 高士达

Merge branch 'CJL' into 'dev'

Cjl

See merge request !118
parents 4c7695d4 bab91c00
...@@ -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 = 16099; /* 英里最大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;
} }
...@@ -371,7 +375,7 @@ void Unit_Convert_Service(void) ...@@ -371,7 +375,7 @@ void Unit_Convert_Service(void)
{ {
if (Data_Read_Trip(EM_TRIP_A) > 9999) /* 当前单位在KM时,里程大于999.9KM进行清零 */ if (Data_Read_Trip(EM_TRIP_A) > 9999) /* 当前单位在KM时,里程大于999.9KM进行清零 */
{ {
Data_Write_Trip(EM_TRIP_A, 9999); Data_Write_Trip(EM_TRIP_A, 0);
} }
} }
......
...@@ -312,13 +312,13 @@ ...@@ -312,13 +312,13 @@
#define CheckSumErr 7 // Checksum Error #define CheckSumErr 7 // Checksum Error
#define UnknownPartID 8 // Unknown Part ID #define UnknownPartID 8 // Unknown Part ID
#define SWV 0x126 // 0x100 = 1.00 software version 软件版本号 #define SWV 0x127 // 0x100 = 1.00 software version 软件版本号
#define HWV 0x103 // 0x100 = 1.00 hardware version 硬件版本号 #define HWV 0x103 // 0x100 = 1.00 hardware version 硬件版本号
#define BTV 0x100 // 0x100 = 1.00 bootloader version boot程序版本号 #define BTV 0x100 // 0x100 = 1.00 bootloader version boot程序版本号
#define INTLV 0x126 // 0x100 = 1.00 internal version 内部版本号 #define INTLV 0x127 // 0x100 = 1.00 internal version 内部版本号
#define PROG_Y 0x24 // 0x24 = 2024年, program year #define PROG_Y 0x24 // 0x24 = 2024年, program year
#define PROG_M 0x10 // 0x03 = 3月, program month #define PROG_M 0x11 // 0x03 = 3月, program month
#define PROG_D 0x09 // 0x19 = 19日, program day #define PROG_D 0x07 // 0x19 = 19日, program day
/****************************************************************************** /******************************************************************************
Bootloader Variable Bootloader Variable
......
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