Commit 63829cb3 authored by 李俭双's avatar 李俭双

🐞 fix:43591,43588,解决时间设置不保存问题,以及设置界面下电后重新上电回到主界面

parent 1b0ae904
...@@ -10,6 +10,7 @@ _Menu_Data MenuData; ...@@ -10,6 +10,7 @@ _Menu_Data MenuData;
uint8_t PageType = 0; uint8_t PageType = 0;
uint8_t PageMenu = 0; uint8_t PageMenu = 0;
RTC_TimeTypeDef RTC_TimeStruct; RTC_TimeTypeDef RTC_TimeStruct;
RTC_DateTypeDef RTC_DateStruct; RTC_DateTypeDef RTC_DateStruct;
RTC_CounterTypeDef counter_val; RTC_CounterTypeDef counter_val;
...@@ -234,6 +235,7 @@ void Key_Left_Short_Press(void) ...@@ -234,6 +235,7 @@ void Key_Left_Short_Press(void)
datmax = 23u; datmax = 23u;
datmin = 0u; datmin = 0u;
Menu_u8Data_Updata_Process(updataDir, datmax, datmin, 1u, (uint8_t*)&(counter_val.time.RTC_Hours)); Menu_u8Data_Updata_Process(updataDir, datmax, datmin, 1u, (uint8_t*)&(counter_val.time.RTC_Hours));
RTC_SetTime(&counter_val.time);
} }
else if(PageType == Page_Time_Minute) else if(PageType == Page_Time_Minute)
{ {
...@@ -241,9 +243,12 @@ void Key_Left_Short_Press(void) ...@@ -241,9 +243,12 @@ void Key_Left_Short_Press(void)
datmax = 59u; datmax = 59u;
datmin = 0u; datmin = 0u;
Menu_u8Data_Updata_Process(updataDir, datmax, datmin, 1u, (uint8_t*)&(counter_val.time.RTC_Minutes)); Menu_u8Data_Updata_Process(updataDir, datmax, datmin, 1u, (uint8_t*)&(counter_val.time.RTC_Minutes));
RTC_SetTime(&counter_val.time);
} }
else if(PageType == Page_Km_Unit) else if(PageType == Page_Km_Unit)
{ {
if(Get_Dis_KM_Unit() == 0) if(Get_Dis_KM_Unit() == 0)
{ {
MenuData.KM_Unit = 1;//mile MenuData.KM_Unit = 1;//mile
...@@ -371,10 +376,12 @@ void MenuData_Unit_Init(void) ...@@ -371,10 +376,12 @@ void MenuData_Unit_Init(void)
MenuData.KM_Unit = 0; MenuData.KM_Unit = 0;
MenuData.Tpms_Unit = 0; MenuData.Tpms_Unit = 0;
MenuData.Tcs_Val = 1; MenuData.Tcs_Val = 1;
} }
void MenuData_TCS_Init(void) void MenuData_TCS_Init(void)
{ {
MenuData.Tcs_Val = 1; MenuData.Tcs_Val = 1;
PageType = Page_Menu;
} }
uint8_t ClearODO_Flag = 0; uint8_t ClearODO_Flag = 0;
......
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