1.修复date time

This commit is contained in:
payton 2023-11-29 09:50:38 +08:00
parent 5729c01deb
commit 054b0e9aac
2 changed files with 5 additions and 5 deletions

View File

@ -1372,7 +1372,7 @@ void UIFlowLVGL(){
UIFlowMenuCommonOption = UIFlowMenuCommonOption_create();
UIFlowMenuCommonConfirm = UIFlowMenuCommonConfirm_create();
UIFlowWaitMoment = UIFlowWaitMoment_create();
UIFlowSetupDateTime = UIFlowSetupDateTime_create();
//UIFlowSetupDateTime = UIFlowSetupDateTime_create();
UIFlowPlayThumb = UIFlowPlayThumb_create();
UIFlowUSB = UIFlowUSB_create();
UIFlowUSBMenu = UIFlowUSBMenu_create();

View File

@ -1235,14 +1235,14 @@ void Option_DateTime_Key(lv_obj_t* obj, uint32_t key)
case LV_USER_KEY_NEXT:
if(DateTimeIndex == 0)
{
if(gDateTime.Mon > 0 && gDateTime.Mon <= 12)
if(gDateTime.Mon > 1 && gDateTime.Mon <= 12)
gDateTime.Mon--;
else
gDateTime.Mon = 12;
}
else if(DateTimeIndex == 2)
{
if(gDateTime.Day > 0 && gDateTime.Day <= 31)
if(gDateTime.Day > 1 && gDateTime.Day <= 31)
gDateTime.Day--;
else
gDateTime.Day = 31;
@ -1281,14 +1281,14 @@ void Option_DateTime_Key(lv_obj_t* obj, uint32_t key)
if(DateTimeIndex == 0)
{
if(gDateTime.Mon >= 12)
gDateTime.Mon = 0;
gDateTime.Mon = 1;
else
gDateTime.Mon++;
}
else if(DateTimeIndex == 2)
{
if(gDateTime.Day >= 31)
gDateTime.Day = 0;
gDateTime.Day = 1;
else
gDateTime.Day++;
}