Commit 2f7f090c authored by 高士达's avatar 高士达

Merge branch 'CJL' into 'dev'

Cjl

See merge request !95
parents a4abea82 894cd94c
......@@ -20,7 +20,7 @@ void Data_TCS_Set_OnOff(uint8_t u8Data)
{
uint8_t u8Data1[1u] = {0};
u8Data1[0u] = u8Data;
eeprom_WriteRecord(EEPROM_BLOCK_08, (uint8_t *)u8Data, 1);
eeprom_WriteRecord(EEPROM_BLOCK_08, (uint8_t *)u8Data1, 1);
}
void Key_Operation_Left(Key_Event_en_t enKeyEvent)//Mode
......
......@@ -80,7 +80,7 @@ static void Power_KL30_Init(void)
Key_KL30_Init_EXample();
//Light_Sensor_Init_Example();//注意顺序1
LED_Driver_Init_Example();//注意顺序2
//LED_Driver_Service_Immediate();
LED_Driver_Service_Immediate();
Data_User_Mileage_KL30Init();
Fuel_KL30_Init();
Data_Voltage_Init();
......@@ -149,7 +149,7 @@ static void Power_Wakeup_Init(void)
MenuData_TCS_Init();
//Light_Sensor_Init_Example();//注意顺序1
LED_Driver_Init_Example();//注意顺序2
//LED_Driver_Service_Immediate();
LED_Driver_Service_Immediate();
Protocol_KL30_Wakeup_Init();
Uart0_Init(115200);
BlueTooth_KL30_KL15_Wakeup_Init();
......@@ -227,7 +227,7 @@ static void Power_Sleep_Init(void)
BU98R10_Shutdown();
Gpio_Init(Gpio_Sleep_Init);
u8LEDDriverCheckCount = 0;
//LED_Driver_Service_Immediate();
LED_Driver_Service_Immediate();
LED_Driver_Init_Sleep();
LED_Driver_Service();
Analog_Signal_Conv_Stop();
......
......@@ -28,7 +28,7 @@ typedef struct
Intlib_uint32_t Interval100m; /*设定的里程间隔 0.1km */
Intlib_uint32_t Interval1s; /*设定的时间间隔 1s */
Intlib_uint32_t MilAfterReset; /*上次复位后里程值 0.1km */
Intlib_uint32_t TotalTimer; /*已走动时间 1s */
//Intlib_uint32_t TotalTimer; /*已走动时间 1s */
} DataIntervalSave_t;
static Int_PowerSts g_PowerSts_Cbk;
......@@ -84,7 +84,7 @@ void Service_Interval_KL30_Init(Intlib_uint8_t *pMemSpace, Maintain_Init_t *pIni
DataIntervalSave.Interval100m = g_IntervalCalc->Interval100m;
DataIntervalSave.MilAfterReset = g_IntervalCalc->MilAfterReset;
DataIntervalSave.Interval1s = g_IntervalCalc->Interval1s;
DataIntervalSave.TotalTimer = g_IntervalCalc->CurTimer_1s;
//DataIntervalSave.TotalTimer = g_IntervalCalc->CurTimer_1s;
if ( g_EEPromWrite_Cbk != Intlib_NULL )
{
g_EEPromWrite_Cbk(( Intlib_uint32_t * )&DataIntervalSave, (Intlib_uint16_t)(sizeof(DataIntervalSave_t) / 4));
......@@ -95,7 +95,7 @@ void Service_Interval_KL30_Init(Intlib_uint8_t *pMemSpace, Maintain_Init_t *pIni
g_IntervalCalc->Interval100m = DataIntervalSave.Interval100m;
g_IntervalCalc->MilAfterReset = DataIntervalSave.MilAfterReset;
g_IntervalCalc->Interval1s = DataIntervalSave.Interval1s;
g_IntervalCalc->CurTimer_1s = DataIntervalSave.TotalTimer;
//g_IntervalCalc->CurTimer_1s = DataIntervalSave.TotalTimer;
}
}
else
......@@ -213,7 +213,7 @@ void Service_Interval_Processing(void)
DataIntervalSave.Interval100m = g_IntervalCalc->Interval100m;
DataIntervalSave.MilAfterReset = g_IntervalCalc->MilAfterReset;
DataIntervalSave.Interval1s = g_IntervalCalc->Interval1s;
DataIntervalSave.TotalTimer = g_IntervalCalc->CurTimer_1s;
//DataIntervalSave.TotalTimer = g_IntervalCalc->CurTimer_1s;
g_EEPromWrite_Cbk(( Intlib_uint32_t * )&DataIntervalSave, (Intlib_uint16_t)(sizeof(DataIntervalSave_t) / 4));
}
}
......@@ -291,37 +291,37 @@ void Service_Interval_SetKm(Intlib_uint32_t IntervalKm)
if (g_IntervalCalc->IntervalDayEnable)
{
DataIntervalSave.Interval1s = g_IntervalCalc->Interval1s;
DataIntervalSave.TotalTimer = g_IntervalCalc->CurTimer_1s;
//DataIntervalSave.TotalTimer = g_IntervalCalc->CurTimer_1s;
}
else
{
DataIntervalSave.Interval1s = 0u;
DataIntervalSave.TotalTimer = 0u;
//DataIntervalSave.TotalTimer = 0u;
}
while (u8Errcount < 3)
{
//while (u8Errcount < 3)
//{
if (g_EEPromWrite_Cbk != Intlib_NULL)
{
g_EEPromWrite_Cbk((Intlib_uint32_t *)&DataIntervalSave, (Intlib_uint16_t)(sizeof(DataIntervalSave_t) / 4));
}
if (g_EEPromRead_Cbk != Intlib_NULL)
{
g_EEPromRead_Cbk((Intlib_uint32_t *)&ReadDataIntervalSave, (Intlib_uint16_t)(sizeof(DataIntervalSave_t) / 4));
}
if (memcmp(&DataIntervalSave, &ReadDataIntervalSave, sizeof(DataIntervalSave_t)) == 0)
{
break;
}
u8Errcount++;
if(u8Errcount >= 3)
{
break;
}
Gen_TimeDelay(10 * 1000u, 50u);
}
// if (g_EEPromRead_Cbk != Intlib_NULL)
// {
// g_EEPromRead_Cbk((Intlib_uint32_t *)&ReadDataIntervalSave, (Intlib_uint16_t)(sizeof(DataIntervalSave_t) / 4));
// }
//
// if (memcmp(&DataIntervalSave, &ReadDataIntervalSave, sizeof(DataIntervalSave_t)) == 0)
// {
// break;
// }
// u8Errcount++;
// if(u8Errcount >= 3)
// {
// break;
// }
// Gen_TimeDelay(10 * 1000u, 50u);
//}
}
}
Intlib_uint32_t Get_Interval_SetKm(void)
......@@ -356,7 +356,7 @@ void Service_Interval_SetDay(Intlib_uint32_t IntervalDay)
DataIntervalSave.Interval100m = g_IntervalCalc->Interval100m;
DataIntervalSave.MilAfterReset = g_IntervalCalc->MilAfterReset;
DataIntervalSave.Interval1s = g_IntervalCalc->Interval1s;
DataIntervalSave.TotalTimer = g_IntervalCalc->CurTimer_1s;
//DataIntervalSave.TotalTimer = g_IntervalCalc->CurTimer_1s;
if ( g_EEPromWrite_Cbk != Intlib_NULL )
{
......
......@@ -80,14 +80,14 @@ static void Service_Interval_Read_EEProm(uint32_t u32Data [], uint16_t u16Len)
}
}
uint32_t g_ServiceMil100m = 0;
//uint32_t g_ServiceMil100m = 0;
uint8_t Get_SERVICE_WARNING_ForCan(void)
{
uint8_t Res;
uint32_t m_Condition_1;
m_Condition_1 = Service_Interval_GetMil100m();
g_ServiceMil100m = Service_Interval_GetMil100m();
//g_ServiceMil100m = Service_Interval_GetMil100m();
if (m_Condition_1 <= 0u)
{
Res = 1u; /*87606-4*/
......
......@@ -69,7 +69,7 @@ uint8_t rte_can_init(can_config_st_t *config)
GPIO_InitStruct.GPIO_Mode = GPIO_Mode_OUT;
GPIO_InitStruct.GPIO_Level = GPIO_Level_HIGH;
GPIO_InitStruct.GPIO_Ctrl = GPIO_Control_DIG;
//GPIO_InitStruct.GPIO_OType = GPIO_OType_PP;
GPIO_InitStruct.GPIO_OType = GPIO_OType_PP;
GPIO_Init(GPIO_PORT5, &GPIO_InitStruct);
/* CRXD pin init */
......
......@@ -161,7 +161,7 @@ void RTE_RTC_Init(RTC_Information_st_t g_stRTCInformation)
RTC_InitStructure.RTC_1HZ_Output = DISABLE; //RTC1HZ diable output
RTC_Init(&RTC_InitStructure);
RTC->SUBCUD = 0x1D;
RTC->SUBCUD = 0x1F;
//ISR_Register(RTC_IRQn, rtc_interrupt); //RTC????��????��??��??��
......
......@@ -137,7 +137,7 @@ void Sys_Exact_50us_Tasks(void)
if(task_100ms >= 2000)
{
task_100ms = 0u;
if(Milleage_InitFlag == 0X5AA53AA3UL)
if(Get_MileageInit_Status() == 0X5AA53AA3UL)
{
Data_Mileage_ISR();
}
......
......@@ -312,13 +312,13 @@
#define CheckSumErr 7 // Checksum Error
#define UnknownPartID 8 // Unknown Part ID
#define SWV 0x120 // 0x100 = 1.00 software version 软件版本号
#define SWV 0x121 // 0x100 = 1.00 software version 软件版本号
#define HWV 0x103 // 0x100 = 1.00 hardware version 硬件版本号
#define BTV 0x100 // 0x100 = 1.00 bootloader version boot程序版本号
#define INTLV 0x120 // 0x100 = 1.00 internal version 内部版本号
#define INTLV 0x121 // 0x100 = 1.00 internal version 内部版本号
#define PROG_Y 0x24 // 0x24 = 2024年, program year
#define PROG_M 0x09 // 0x03 = 3月, program month
#define PROG_D 0x10 // 0x19 = 19日, program day
#define PROG_D 0x14 // 0x19 = 19日, program day
/******************************************************************************
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