mirror of
https://gitee.com/Vancouver2017/luban-lite-t3e-pro.git
synced 2025-12-13 01:48:54 +00:00
first commit
This commit is contained in:
18
.vscode/settings.json
vendored
18
.vscode/settings.json
vendored
@@ -63,7 +63,21 @@
|
||||
"memory": "c",
|
||||
"new": "c",
|
||||
"rtc.h": "c",
|
||||
"cstdlib": "c"
|
||||
"cstdlib": "c",
|
||||
"aic_hal.h": "c",
|
||||
"stdlib.h": "c",
|
||||
"time.h": "c",
|
||||
"stdint.h": "c",
|
||||
"errno.h": "c",
|
||||
"unistd.h": "c",
|
||||
"zigbee.h": "c",
|
||||
"widgets_init.h": "c",
|
||||
"lv_dropdown.h": "c",
|
||||
"stdbool.h": "c",
|
||||
"zigbee_fun.h": "c",
|
||||
"chrono": "c",
|
||||
"random": "c",
|
||||
"aic_core.h": "c"
|
||||
},
|
||||
"cmake.sourceDirectory": "D:/ArtInChip/luban-lite-t3e-pro_v1.0.2/packages/third-party/cherryusb"
|
||||
"cmake.sourceDirectory": "D:/ArtInChip/luban-lite-t3e-pro_v1.0.5/packages/third-party/cherryusb"
|
||||
}
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# v1.0.5
|
||||
* 1.场景界面添加弹窗警告用于提醒时间对的的可以手动更新
|
||||
* 2.增加手动设置区域和时间
|
||||
|
||||
# v1.0.4
|
||||
* 1.正式出货版本
|
||||
|
||||
|
||||
@@ -89,6 +89,9 @@ const char Menu_List[LANG_MAX][MENU_LIST_MAX][80]=
|
||||
"自动设置时间",
|
||||
"日期",
|
||||
"时间 ",
|
||||
"时区 ",
|
||||
"更改",
|
||||
"取消",
|
||||
"语言",
|
||||
"网络",
|
||||
"场景",
|
||||
@@ -230,12 +233,13 @@ const char Menu_List[LANG_MAX][MENU_LIST_MAX][80]=
|
||||
"下载更新",//下载更新,
|
||||
"当前版本已经是最新版本!",
|
||||
"获取固件信息失败!",
|
||||
"固件更新成功,3s后系统将会重启!",
|
||||
"固件更新成功, 3s后系统将会重启!",
|
||||
"系统更新失败!",
|
||||
"系统升级中,请勿断电!",
|
||||
"新版本",
|
||||
"\n您将选择时钟模式?\n",
|
||||
"\n您将选择开关模式?\n",
|
||||
"\n您将选择开关模式?\n",
|
||||
"当前时间可能有误,\n您需要手动设置时间.\n",
|
||||
#elif defined(CONFIG_LANAGUAGE_CHT)
|
||||
#error "not suptort cht"
|
||||
#endif
|
||||
@@ -305,10 +309,13 @@ const char Menu_List[LANG_MAX][MENU_LIST_MAX][80]=
|
||||
"Adjust brightness to ambient light to energy saving",
|
||||
"Automatic screen",
|
||||
"10s\n30s\n45s\n1min\n2min\n5min\n10min\nnever",
|
||||
"Time",
|
||||
"Date&Time",
|
||||
"Set time Automatically",
|
||||
"Date",
|
||||
"Time",
|
||||
"Time Zone",
|
||||
"Change",
|
||||
"Cancel",
|
||||
"Language",
|
||||
"Network",
|
||||
"Scene",
|
||||
@@ -456,6 +463,7 @@ const char Menu_List[LANG_MAX][MENU_LIST_MAX][80]=
|
||||
"New Version",
|
||||
"\nAre you sure to change?\n",
|
||||
"\nAre you sure to change?\n",
|
||||
"The currt time may be wrong, \nyou need to set the time manually.\n",
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#define D_System_Storage "16MB+8MB"
|
||||
#define D_System_Hardware "1.0"
|
||||
#define D_System_Screen "480*480"
|
||||
#define D_System_Ver 104
|
||||
#define D_System_Ver 105
|
||||
|
||||
enum
|
||||
{
|
||||
@@ -83,6 +83,9 @@ enum
|
||||
MENU_LIST_SetClockauto, //自动设置时间
|
||||
MENU_LIST_SetClockDate, //日期
|
||||
MENU_LIST_SetClockTime, //时间
|
||||
MENU_LIST_SetClockZone, //时区
|
||||
MENU_LIST_SetClockChange, //时间设置的更改
|
||||
MENU_LIST_SetClockcancel, //时间设置的取消
|
||||
MENU_LIST_SetLanguange, //语言
|
||||
MENU_LIST_SetNetwork, //网络
|
||||
MENU_LIST_SetScene, //场景
|
||||
@@ -221,7 +224,7 @@ enum
|
||||
MENU_LIST_OTA_NEW_VER,//新版本
|
||||
MENU_LIST_Clockmodeselect, //时钟+开关
|
||||
MENU_LIST_switchhmodeselect, //时钟+开关
|
||||
|
||||
MENU_LIST_power_date_alarm, //上电时间警告
|
||||
MENU_LIST_MAX,
|
||||
};
|
||||
|
||||
|
||||
@@ -54,6 +54,52 @@
|
||||
* EXTERNAL FUNCTIONS
|
||||
*/
|
||||
|
||||
|
||||
int isLeapYear(int year)
|
||||
{
|
||||
return (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0);
|
||||
}
|
||||
|
||||
|
||||
int daysInMonth(int year, int month)
|
||||
{
|
||||
if (month == 2)
|
||||
{
|
||||
return isLeapYear(year) ? 29 : 28;
|
||||
}
|
||||
else if (month == 4 || month == 6 || month == 9 || month == 11)
|
||||
{
|
||||
return 30;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 31;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
long dateToEpoch(int year, int month, int day, int hour, int minute, int second)
|
||||
{
|
||||
int days = 0;
|
||||
|
||||
for (int y = 1970; y < year; y++)
|
||||
{
|
||||
days += isLeapYear(y) ? 366 : 365;
|
||||
}
|
||||
|
||||
for (int m = 1; m < month; m++)
|
||||
{
|
||||
days += daysInMonth(year, m);
|
||||
}
|
||||
|
||||
days += day - 1;
|
||||
|
||||
long seconds = days * 86400 + hour * 3600 + minute * 60 + second;
|
||||
|
||||
return seconds;
|
||||
|
||||
|
||||
}
|
||||
/*********************************************************************
|
||||
* LOCAL VARIABLES
|
||||
*/
|
||||
|
||||
@@ -132,7 +132,7 @@ typedef struct
|
||||
* tm - pointer to UTC time struct
|
||||
*/
|
||||
extern UTCTime esp32_ConvertUTCSecs( UTCTimeStruct *tm );
|
||||
|
||||
extern long dateToEpoch(int year, int month, int day, int hour, int minute, int second);
|
||||
/*
|
||||
* Update/Adjust the esp32 clock and timers
|
||||
* Msec - elapsed time in milli seconds
|
||||
|
||||
@@ -19,13 +19,11 @@
|
||||
#ifdef RT_USING_ULOG
|
||||
#include <ulog.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#include "aic_core.h"
|
||||
#include "aic_hal_gpio.h"
|
||||
@@ -40,7 +38,7 @@
|
||||
#include "zigbee_fun.h"
|
||||
// #include "cJSON.h"
|
||||
#include <drivers/rtc.h>
|
||||
|
||||
#include "ESP32_Clock.h"
|
||||
|
||||
extern rt_mutex_t xGuiSemaphore;
|
||||
|
||||
@@ -142,13 +140,14 @@ void gpio_set_level(char *name, u32 value)
|
||||
*/
|
||||
//接收消息
|
||||
rt_mq_t custom_rx_evt_queue = NULL; //定义一个队列返回变量
|
||||
|
||||
lv_timer_t * poweralarmtimer = NULL;//上电 时间错误警告
|
||||
lv_timer_t * animationtimer = NULL;//动画定时器 窗帘 纱帘 卷帘 幕布等使用
|
||||
int scenebarindex;//
|
||||
|
||||
void custom_Task(void *pvParameter);
|
||||
rt_thread_t custom_thread = RT_NULL;
|
||||
|
||||
|
||||
void custom_init(lv_ui *ui)
|
||||
{
|
||||
/* Add your codes here */
|
||||
@@ -722,6 +721,16 @@ static void custom_rollersinfo_timerclose(lv_timer_t * timer)
|
||||
}
|
||||
}
|
||||
|
||||
static void custom_power_timealarm(lv_timer_t * timer)
|
||||
{
|
||||
if(guider_ui.scene_alarmtimecont)
|
||||
{
|
||||
lv_obj_del(guider_ui.scene_alarmtimecont);
|
||||
}
|
||||
|
||||
lv_timer_del(poweralarmtimer);
|
||||
poweralarmtimer=NULL;
|
||||
}
|
||||
void custom_Task(void *pvParameter)
|
||||
{
|
||||
ZIGEvent evt;
|
||||
@@ -732,14 +741,16 @@ void custom_Task(void *pvParameter)
|
||||
time_t now;
|
||||
struct tm timeinfo;
|
||||
|
||||
// struct timeval tv;
|
||||
// tv.tv_sec=(time_t)1741335863;//用本地时间 不用处理时区了
|
||||
// tv.tv_usec=0;
|
||||
struct timeval tv;
|
||||
tv.tv_sec=(time_t)1735689600;//上电的默认时间 2025-01-01 08:00:00
|
||||
tv.tv_usec=0;
|
||||
// // int settimeofday(const struct timeval *tv , const struct timezone *tz);
|
||||
// //tz参数为时区 通常将参数tz设置为NULL,表示使用当前系统的时区
|
||||
// //输入时间戳,通过settimeofday()函数来设置系统时间,这个函数设置的精度可以精确到微秒
|
||||
// settimeofday(&tv, NULL);//不用重新设置时区
|
||||
settimeofday(&tv, NULL);//不用重新设置时区
|
||||
//开启lv_time定时3s之后删除时间警告
|
||||
|
||||
poweralarmtimer = lv_timer_create(custom_power_timealarm,5000,NULL);
|
||||
for(;;)
|
||||
{
|
||||
if(evt.buffStr)//接收到的是指针 用完释放内存
|
||||
@@ -1067,9 +1078,11 @@ void custom_Task(void *pvParameter)
|
||||
break;
|
||||
//=======================================================================
|
||||
case ZIG_STATE_RTC_CURRENT://显示
|
||||
{
|
||||
{//在RT-Thread中,使用time()函数来获取当前的系统时间。这个函数返回一个time_t类型的值,表示自1970年1月1日(UTC)以来的秒数
|
||||
/* 获取当前时间 */
|
||||
time(&now);
|
||||
localtime_r(&now, &timeinfo);
|
||||
/* 将time_t类型转换为struct tm类型 */
|
||||
localtime_r(&now, &timeinfo);//localtime_r()先加上时区值,再调用gmtime_r()转换为结构体
|
||||
// //struct tm
|
||||
// //{
|
||||
// // int tm_sec; //分后的秒(0~61)
|
||||
@@ -1083,16 +1096,18 @@ void custom_Task(void *pvParameter)
|
||||
// // int tm_isdst; //夏令时标志(大于0说明夏令时有效,等于0说明无效,小于0说明信息不可用)
|
||||
// //
|
||||
// //};
|
||||
// LOG_I("time==%d:%d:%d:%d:%02d:%02d:%02d:%02d:%02d",
|
||||
// timeinfo.tm_isdst, //是否为夏时制
|
||||
// timeinfo.tm_yday, //一年过去的天数
|
||||
// timeinfo.tm_wday, //星期,1对应星期一
|
||||
// timeinfo.tm_year, //年,距离1900年的差值,默认是70
|
||||
// timeinfo.tm_mon, //日期:月,从0开始 0~11
|
||||
// timeinfo.tm_mday, //日期:日,从1开始
|
||||
// timeinfo.tm_hour, //小时
|
||||
// timeinfo.tm_min, //分钟
|
||||
// timeinfo.tm_sec); //秒钟
|
||||
LOG_I("now=%d",now);
|
||||
LOG_I("zone:%d",tz_get());
|
||||
LOG_I("time==%d:%d:%d:%d:%02d:%02d:%02d:%02d:%02d",
|
||||
timeinfo.tm_isdst, //是否为夏时制
|
||||
timeinfo.tm_yday, //一年过去的天数
|
||||
timeinfo.tm_wday, //星期,1对应星期一
|
||||
timeinfo.tm_year+1900, //年,距离1900年的差值,默认是70
|
||||
timeinfo.tm_mon+1, //日期:月,从0开始 0~11
|
||||
timeinfo.tm_mday, //日期:日,从1开始
|
||||
timeinfo.tm_hour, //小时
|
||||
timeinfo.tm_min, //分钟
|
||||
timeinfo.tm_sec); //秒钟
|
||||
if((timeinfo.tm_min==59)&&(timeinfo.tm_sec==59))//每小时更新一次
|
||||
{
|
||||
ZIGEvent evtstate;
|
||||
@@ -1133,6 +1148,20 @@ void custom_Task(void *pvParameter)
|
||||
//printf("hh-angle:%d\r\n",angle);
|
||||
lv_img_set_angle(guider_ui.screensaver_clock_hour, angle);//
|
||||
}
|
||||
|
||||
if(guider_ui.dateinfopage)//时间开关页
|
||||
{
|
||||
lv_label_set_text_fmt(guider_ui.dateinfopage_timetxtlabel,"%02d:%02d",timeinfo.tm_hour,timeinfo.tm_min);
|
||||
|
||||
if(GET_nvs_Sys_Info_language()==LANG_CH)
|
||||
{
|
||||
lv_label_set_text_fmt(guider_ui.dateinfopage_datetxtlabel,"%d年%d月%d日",timeinfo.tm_year+1900,timeinfo.tm_mon+1,timeinfo.tm_mday);
|
||||
}
|
||||
else
|
||||
{
|
||||
lv_label_set_text_fmt(guider_ui.dateinfopage_datetxtlabel,"%s %d, %d",Menu_monList[timeinfo.tm_mon+1],timeinfo.tm_mday,timeinfo.tm_year+1900);
|
||||
}
|
||||
}
|
||||
if(guider_ui.scene)//情景页时间
|
||||
{
|
||||
lv_label_set_text_fmt(guider_ui.scene_timelabel,"%02d:%02d",timeinfo.tm_hour,timeinfo.tm_min);
|
||||
@@ -6095,6 +6124,224 @@ void custom_language_key_status(char key,lv_event_code_t code)
|
||||
// evtstate.buffStr=NULL;
|
||||
// rt_mq_send(custom_rx_evt_queue, &evtstate, sizeof(ZIGEvent));//上报给zigbee
|
||||
}
|
||||
|
||||
|
||||
static void month_erro_msgbox_callback(lv_event_t *event)
|
||||
{
|
||||
lv_event_code_t code = lv_event_get_code(event);
|
||||
lv_obj_t * msgbox = lv_event_get_current_target(event);
|
||||
|
||||
if ((code == LV_EVENT_VALUE_CHANGED) && (msgbox != NULL))
|
||||
{
|
||||
lv_msgbox_close(msgbox);
|
||||
}
|
||||
}
|
||||
|
||||
void custom_datetime_key_status(char key,lv_event_code_t code)
|
||||
{
|
||||
switch(key)
|
||||
{
|
||||
case 1://自动获取时间开关
|
||||
{
|
||||
if (lv_obj_has_state(guider_ui.dateinfopage_sw_1, LV_STATE_CHECKED))
|
||||
{//自动获取时间 禁用按钮
|
||||
printf("on\r\n");
|
||||
|
||||
//日期按键禁止按下
|
||||
lv_obj_add_state(guider_ui.dateinfopage_datebtn, LV_STATE_DISABLED);//off
|
||||
//时间禁止允许按下
|
||||
lv_obj_add_state(guider_ui.dateinfopage_timebtn, LV_STATE_DISABLED);//off
|
||||
|
||||
SET_nvs_Sys_Info_autoupdatetime(true);
|
||||
nvs_eepom_sysInfo_update();
|
||||
|
||||
//立即去更新时间
|
||||
ZIGEvent evt;
|
||||
evt.event=ZIG_STATE_RTC_UPDATE;
|
||||
evt.length=0;
|
||||
evt.buffStr=NULL;
|
||||
|
||||
rt_mq_send(zig_rx_evt_queue, &evt, sizeof(ZIGEvent));//上报给zigbee
|
||||
}
|
||||
else
|
||||
{//手动 允许按钮操作
|
||||
printf("off\r\n");
|
||||
|
||||
//日期按键允许按下
|
||||
lv_obj_clear_state(guider_ui.dateinfopage_datebtn, LV_STATE_DISABLED);//on
|
||||
//时间按键允许按下
|
||||
lv_obj_clear_state(guider_ui.dateinfopage_timebtn, LV_STATE_DISABLED);//on
|
||||
|
||||
SET_nvs_Sys_Info_autoupdatetime(false);
|
||||
nvs_eepom_sysInfo_update();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 2://更改
|
||||
{
|
||||
LOG_I("custom_datetime_key_status");
|
||||
|
||||
/*
|
||||
struct tm {
|
||||
int tm_sec; // 秒 [0-59]
|
||||
int tm_min; // 分 [0-59]
|
||||
int tm_hour; // 时 [0-23]
|
||||
int tm_mday; // 日 [1-31]
|
||||
int tm_mon; // 月 [0-11](0 代表 1 月)
|
||||
int tm_year; // 年(自 1900 年的偏移,如 2024 年为 124)
|
||||
int tm_wday; // 星期 [0-6](0 代表周日)
|
||||
int tm_yday; // 年中的第几天 [0-365]
|
||||
int tm_isdst; // 夏令时标志(UTC 时间中通常为 0)
|
||||
};
|
||||
*/
|
||||
|
||||
////timeinfo.tm_sec //秒钟
|
||||
//struct tm timeinfo = {0};
|
||||
char str[64];
|
||||
//uint16_t int year, int month, int day, int hour, int minute, int second;//
|
||||
//年
|
||||
uint16_t sel_opt_idt=lv_dropdown_get_selected(guider_ui.datesetpage_yearddlist);//0~99
|
||||
lv_dropdown_get_selected_str(guider_ui.datesetpage_yearddlist,str,sizeof(str));
|
||||
int year=sel_opt_idt+2024;//0~99-->2024~2099
|
||||
LOG_I("year:%s---%d",str,year);
|
||||
//timeinfo.tm_year=(int)((year)-1900);
|
||||
//月
|
||||
sel_opt_idt=lv_dropdown_get_selected(guider_ui.datesetpage_moonddlist);//0~11
|
||||
lv_dropdown_get_selected_str(guider_ui.datesetpage_moonddlist,str,sizeof(str));
|
||||
int month=sel_opt_idt+1;//0~11-->1~12
|
||||
LOG_I("mon:%s---%d",str,month);
|
||||
//timeinfo.tm_mon=month-1;
|
||||
//日
|
||||
sel_opt_idt=lv_dropdown_get_selected(guider_ui.datesetpage_sunddlist);//0~30
|
||||
lv_dropdown_get_selected_str(guider_ui.datesetpage_sunddlist,str,sizeof(str));
|
||||
int day=sel_opt_idt+1;//0~30-->1~31
|
||||
LOG_I("sun:%s---%d",str,sel_opt_idt+1);
|
||||
//timeinfo.tm_mday=day-1;
|
||||
//时
|
||||
sel_opt_idt=lv_dropdown_get_selected(guider_ui.datesetpage_hourddlist);//0~23
|
||||
lv_dropdown_get_selected_str(guider_ui.datesetpage_hourddlist,str,sizeof(str));
|
||||
int hour=sel_opt_idt;
|
||||
LOG_I("hour:%s---%d",str,hour);
|
||||
//timeinfo.tm_hour=hour;
|
||||
//分
|
||||
sel_opt_idt=lv_dropdown_get_selected(guider_ui.datesetpage_minuteddlist);//0~59
|
||||
lv_dropdown_get_selected_str(guider_ui.datesetpage_minuteddlist,str,sizeof(str));
|
||||
int minute=sel_opt_idt;
|
||||
LOG_I("min:%s---%d",str,minute);
|
||||
//timeinfo.tm_min=minute;
|
||||
//1 3 5 7 8 10 12 31天
|
||||
//4 6 9 11 30天
|
||||
//2 28天
|
||||
//卡月对应天 不能超过最大日
|
||||
// if(
|
||||
// (
|
||||
// (month==1)
|
||||
// ||(month==3)
|
||||
// ||(month==5)
|
||||
// ||(month==7)
|
||||
// ||(month==8)
|
||||
// ||(month==10)
|
||||
// ||(month==12)
|
||||
// )
|
||||
// &&(day<=31)
|
||||
// )
|
||||
// {
|
||||
|
||||
// }
|
||||
//警告
|
||||
if(
|
||||
( ( (month==4)||(month==6)||(month==9)||(month==11) ) && (day>30) )
|
||||
||((month==2)&&(day>28))
|
||||
)
|
||||
{
|
||||
char txtbuf[64];
|
||||
if(GET_nvs_Sys_Info_language()==LANG_CH)
|
||||
{
|
||||
sprintf(txtbuf,"%d月没有%d日",month,day);
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf(txtbuf,"There is no %dth in %s",day,Menu_monList[month-1]);
|
||||
}
|
||||
//lv_obj_t * mbox1 = lv_msgbox_create(NULL,NULL, Menu_List[GET_nvs_Sys_Info_language()][MENU_LIST_System_Restartmsgbox], btns_chs[GET_nvs_Sys_Info_language()], false);
|
||||
lv_obj_t * mbox1 = lv_msgbox_create(NULL,NULL, (const char *)txtbuf, btns_chs[GET_nvs_Sys_Info_language()], false);
|
||||
lv_msgbox_t * mbox = (lv_msgbox_t *)mbox1;
|
||||
|
||||
// lv_obj_set_style_text_font(mbox->title, &lv_font_simsun_16, LV_PART_MAIN | LV_STATE_DEFAULT);//标题字体
|
||||
// lv_obj_set_style_text_align(mbox->title, LV_TEXT_ALIGN_CENTER, 0);//标题居中显示
|
||||
|
||||
lv_obj_set_style_text_font(mbox->text, &lv_font_simsun_16, LV_PART_MAIN | LV_STATE_DEFAULT);//内容字体
|
||||
lv_obj_set_style_text_align(mbox->text, LV_TEXT_ALIGN_CENTER, 0);//内容居中显示
|
||||
|
||||
lv_obj_set_style_text_font(mbox->btns, &lv_font_simsun_16, LV_PART_ITEMS | LV_STATE_DEFAULT);//按键字体
|
||||
lv_obj_set_size(lv_msgbox_get_btns(mbox1), 250, 50);
|
||||
|
||||
lv_obj_center(mbox1);
|
||||
|
||||
lv_obj_add_event_cb((lv_obj_t *)mbox1,month_erro_msgbox_callback, LV_EVENT_ALL, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
//时区
|
||||
sel_opt_idt=lv_dropdown_get_selected(guider_ui.datesetpage_zoneddlist);//0~24
|
||||
lv_dropdown_get_selected_str(guider_ui.datesetpage_zoneddlist,str,sizeof(str));
|
||||
LOG_I("zone:%s---%d",str,sel_opt_idt-12);
|
||||
tz_set(sel_opt_idt-12);
|
||||
|
||||
LOG_I("new read zone:%d",tz_get());
|
||||
//UTC的起始时间为1970年1月1日 00:00:00(协调世界时)
|
||||
//标准时间戳通常指的是UTC( 协调世界时 )。时间戳以 1970年1月1日 零时(UTC)为起点
|
||||
//标准时间戳:格林威治时间,以 1970.01.01 00:00:00 为起点到现在的总秒数。
|
||||
//本地时间戳:考虑时区和夏令时的本地时间,即标准时间 ± 时差。一般设备以本地时间为准
|
||||
|
||||
|
||||
//UTC +时区差*3600秒=本地时间
|
||||
//zone=(Localtime-standardtime)/3600
|
||||
//UTC=本地时间-时区差*3600
|
||||
//now()显示的是 UTC标准时间
|
||||
|
||||
//设置的时间当本地时间
|
||||
|
||||
// LOG_I("dateToEpoch:%d\r\n", dateToEpoch(2025, 7, 8, 18, 20, 0));//当地时间 1970开始计算的
|
||||
// LOG_I("dateToEpoch2:%d\r\n", dateToEpoch(2025, 7, 8, 18, 20, 0)-tz_get()*3600);//utc时间
|
||||
|
||||
time_t Localtime=dateToEpoch(year, month, day, hour, minute, 0);//年月日转换为本地时间(1970开始计算的)
|
||||
LOG_I("Localtime:%d\r\n", Localtime);
|
||||
time_t standardtime=Localtime-tz_get()*3600;//本地时间转换为UTC标准时间戳
|
||||
LOG_I("standardtime:%d\r\n",standardtime);
|
||||
|
||||
//更新时间 更新的是utc时间
|
||||
struct timeval tv;
|
||||
tv.tv_sec=(time_t)standardtime;//utc时间
|
||||
tv.tv_usec=0;
|
||||
settimeofday(&tv, NULL);//不用重新设置时区
|
||||
|
||||
// SET_nvs_Sys_Info_tzzone(zone);
|
||||
// nvs_eepom_sysInfo_update();
|
||||
|
||||
//退出
|
||||
if(!guider_ui.dateinfopage)
|
||||
{
|
||||
setup_scr_dateinfopage(&guider_ui);
|
||||
}
|
||||
lv_scr_load(guider_ui.dateinfopage);
|
||||
|
||||
if(guider_ui.datesetpage)
|
||||
{
|
||||
lv_obj_del(guider_ui.datesetpage);
|
||||
guider_ui.datesetpage = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// //实现原理 top层创建arc,默认是1s是1%,100s超时退出; 根据入网进程,改变animationtimer的周期 入网成功后,定时器周期改为100ms 很快到达100%
|
||||
void custom_network_timercb(lv_timer_t * timer)
|
||||
{
|
||||
|
||||
@@ -55,6 +55,8 @@ void custom_mianinfo_key_status(char key,lv_event_code_t code);
|
||||
void custom_display_key_status(char key,lv_event_code_t code);
|
||||
//语言
|
||||
void custom_language_key_status(char key,lv_event_code_t code);
|
||||
//时间设置
|
||||
void custom_datetime_key_status(char key,lv_event_code_t code);
|
||||
//网络页
|
||||
void custom_network_key_status(char key,lv_event_code_t code);
|
||||
//首屏
|
||||
|
||||
@@ -190,6 +190,26 @@ static void setting_dispinfobtn_1_event_handler (lv_event_t *e)
|
||||
break;
|
||||
}
|
||||
}
|
||||
static void setting_dateinfobtn_1_event_handler (lv_event_t *e)
|
||||
{
|
||||
lv_event_code_t code = lv_event_get_code(e);
|
||||
|
||||
switch (code) {
|
||||
case LV_EVENT_CLICKED:
|
||||
{
|
||||
LOG_I("setting_dateinfobtn_1_event_handler");
|
||||
|
||||
if(!guider_ui.dateinfopage)
|
||||
{
|
||||
setup_scr_dateinfopage(&guider_ui);
|
||||
}
|
||||
lv_scr_load(guider_ui.dateinfopage);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
static void setting_langinfobtn_1_event_handler (lv_event_t *e)
|
||||
{
|
||||
lv_event_code_t code = lv_event_get_code(e);
|
||||
@@ -275,6 +295,7 @@ void events_init_setting(lv_ui *ui)
|
||||
lv_obj_add_event_cb(ui->setting_retrunbtn, setting_retrunbtn_event_handler, LV_EVENT_ALL, ui);
|
||||
lv_obj_add_event_cb(ui->setting_mainfobtn_1, setting_mainfobtn_1_event_handler, LV_EVENT_ALL, ui);
|
||||
lv_obj_add_event_cb(ui->setting_dispinfobtn_1, setting_dispinfobtn_1_event_handler, LV_EVENT_ALL, ui);
|
||||
lv_obj_add_event_cb(ui->setting_dateinfobtn_1, setting_dateinfobtn_1_event_handler, LV_EVENT_ALL, ui);
|
||||
lv_obj_add_event_cb(ui->setting_langinfobtn_1, setting_langinfobtn_1_event_handler, LV_EVENT_ALL, ui);
|
||||
lv_obj_add_event_cb(ui->setting_smartconfibtn_1, setting_smartconfibtn_1_event_handler, LV_EVENT_ALL, ui);
|
||||
lv_obj_add_event_cb(ui->setting_firstinfobtn_1, setting_firstinfobtn_1_event_handler, LV_EVENT_ALL, ui);
|
||||
@@ -341,6 +362,167 @@ void events_init_mianinfopage(lv_ui *ui)
|
||||
lv_obj_add_event_cb(ui->mianinfopage_restartbtn, mianinfopage_restartbtn_event_handler, LV_EVENT_ALL, NULL);
|
||||
lv_obj_add_event_cb(ui->mianinfopage_factorybtn, mianinfopage_factorybtn_event_handler, LV_EVENT_ALL, NULL);
|
||||
}
|
||||
static void dateinfopage_retrunbtn_event_handler (lv_event_t *e)
|
||||
{
|
||||
lv_event_code_t code = lv_event_get_code(e);
|
||||
|
||||
switch (code) {
|
||||
case LV_EVENT_RELEASED:
|
||||
{
|
||||
LOG_I("dateinfopage_retrunbtn_event_handler");
|
||||
|
||||
if(!guider_ui.setting)
|
||||
{
|
||||
setup_scr_setting(&guider_ui);
|
||||
}
|
||||
lv_scr_load(guider_ui.setting);
|
||||
|
||||
if(guider_ui.dateinfopage)
|
||||
{
|
||||
lv_obj_del(guider_ui.dateinfopage);
|
||||
guider_ui.dateinfopage = NULL;
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
static void dateinfopage_sw_1_event_handler (lv_event_t *e)
|
||||
{
|
||||
lv_event_code_t code = lv_event_get_code(e);
|
||||
|
||||
switch (code) {
|
||||
case LV_EVENT_VALUE_CHANGED:
|
||||
{
|
||||
LOG_I("dateinfopage_sw_1_event_handler");
|
||||
custom_datetime_key_status(1,LV_EVENT_CLICKED);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
static void dateinfopage_datebtn_event_handler (lv_event_t *e)
|
||||
{
|
||||
lv_event_code_t code = lv_event_get_code(e);
|
||||
|
||||
switch (code) {
|
||||
case LV_EVENT_RELEASED:
|
||||
{
|
||||
LOG_I("dateinfopage_datebtn_event_handler");
|
||||
|
||||
if(!guider_ui.datesetpage)
|
||||
{
|
||||
setup_scr_datesetpage(&guider_ui);
|
||||
}
|
||||
lv_scr_load(guider_ui.datesetpage);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
static void dateinfopage_timebtn_event_handler (lv_event_t *e)
|
||||
{
|
||||
lv_event_code_t code = lv_event_get_code(e);
|
||||
|
||||
switch (code) {
|
||||
case LV_EVENT_RELEASED:
|
||||
{
|
||||
LOG_I("dateinfopage_timebtn_event_handler");
|
||||
|
||||
if(!guider_ui.datesetpage)
|
||||
{
|
||||
setup_scr_datesetpage(&guider_ui);
|
||||
}
|
||||
lv_scr_load(guider_ui.datesetpage);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
void events_init_dateinfopage(lv_ui *ui)
|
||||
{
|
||||
lv_obj_add_event_cb(ui->dateinfopage_retrunbtn, dateinfopage_retrunbtn_event_handler, LV_EVENT_ALL, ui);
|
||||
lv_obj_add_event_cb(ui->dateinfopage_sw_1, dateinfopage_sw_1_event_handler, LV_EVENT_ALL, ui);
|
||||
lv_obj_add_event_cb(ui->dateinfopage_datebtn, dateinfopage_datebtn_event_handler, LV_EVENT_ALL, ui);
|
||||
lv_obj_add_event_cb(ui->dateinfopage_timebtn, dateinfopage_timebtn_event_handler, LV_EVENT_ALL, ui);
|
||||
}
|
||||
static void datesetpage_retrunbtn_event_handler (lv_event_t *e)
|
||||
{
|
||||
lv_event_code_t code = lv_event_get_code(e);
|
||||
|
||||
switch (code) {
|
||||
case LV_EVENT_CLICKED:
|
||||
{
|
||||
LOG_I("datesetpage_retrunbtn_event_handler");
|
||||
|
||||
if(!guider_ui.dateinfopage)
|
||||
{
|
||||
setup_scr_dateinfopage(&guider_ui);
|
||||
}
|
||||
lv_scr_load(guider_ui.dateinfopage);
|
||||
|
||||
if(guider_ui.datesetpage)
|
||||
{
|
||||
lv_obj_del(guider_ui.datesetpage);
|
||||
guider_ui.datesetpage = NULL;
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
static void datesetpage_changebtn_event_handler (lv_event_t *e)
|
||||
{
|
||||
lv_event_code_t code = lv_event_get_code(e);
|
||||
|
||||
switch (code) {
|
||||
case LV_EVENT_CLICKED:
|
||||
{
|
||||
LOG_I("datesetpage_changebtn_event_handler");
|
||||
custom_datetime_key_status(2,LV_EVENT_CLICKED);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
static void datesetpage_cancelbtn_event_handler (lv_event_t *e)
|
||||
{
|
||||
lv_event_code_t code = lv_event_get_code(e);
|
||||
|
||||
switch (code) {
|
||||
case LV_EVENT_CLICKED:
|
||||
{
|
||||
LOG_I("datesetpage_cancelbtn_event_handler");
|
||||
|
||||
if(!guider_ui.dateinfopage)
|
||||
{
|
||||
setup_scr_dateinfopage(&guider_ui);
|
||||
}
|
||||
lv_scr_load(guider_ui.dateinfopage);
|
||||
|
||||
if(guider_ui.datesetpage)
|
||||
{
|
||||
lv_obj_del(guider_ui.datesetpage);
|
||||
guider_ui.datesetpage = NULL;
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
void events_init_datesetpage(lv_ui *ui)
|
||||
{
|
||||
lv_obj_add_event_cb(ui->datesetpage_retrunbtn, datesetpage_retrunbtn_event_handler, LV_EVENT_ALL, ui);
|
||||
lv_obj_add_event_cb(ui->datesetpage_changebtn, datesetpage_changebtn_event_handler, LV_EVENT_ALL, ui);
|
||||
lv_obj_add_event_cb(ui->datesetpage_cancelbtn, datesetpage_cancelbtn_event_handler, LV_EVENT_ALL, ui);
|
||||
}
|
||||
static void langinfopage_retrunbtn_event_handler (lv_event_t *e)
|
||||
{
|
||||
lv_event_code_t code = lv_event_get_code(e);
|
||||
|
||||
@@ -21,8 +21,10 @@ void events_init(lv_ui *ui);
|
||||
void events_init_screen_main(lv_ui *ui);
|
||||
void events_init_setting(lv_ui *ui);
|
||||
void events_init_mianinfopage(lv_ui *ui);
|
||||
void events_init_langinfopage(lv_ui *ui);
|
||||
void events_init_displayinfopage(lv_ui *ui);
|
||||
void events_init_dateinfopage(lv_ui *ui);
|
||||
void events_init_datesetpage(lv_ui *ui);
|
||||
void events_init_langinfopage(lv_ui *ui);
|
||||
void events_init_smartinfopage(lv_ui *ui);
|
||||
void events_init_firstinfopage(lv_ui *ui);
|
||||
void events_init_relayinfopage(lv_ui *ui);
|
||||
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
After Width: | Height: | Size: 923 B |
Binary file not shown.
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 4.3 KiB |
@@ -0,0 +1,430 @@
|
||||
/*
|
||||
* Copyright 2025 NXP
|
||||
* NXP Confidential and Proprietary. This software is owned or controlled by NXP and may only be used strictly in
|
||||
* accordance with the applicable license terms. By expressly accepting such terms or by downloading, installing,
|
||||
* activating and/or otherwise using the software, you are agreeing that you have read, and that you agree to
|
||||
* comply with and are bound by, such license terms. If you do not agree to be bound by the applicable license
|
||||
* terms, then you may not retain, install, activate or otherwise use the software.
|
||||
*/
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#include "lvgl.h"
|
||||
#include "gui_guider.h"
|
||||
#include "events_init.h"
|
||||
#include "widgets_init.h"
|
||||
#include "custom.h"
|
||||
|
||||
/*
|
||||
时间界面逻辑
|
||||
1 进页面 显示最新时间 3个状态同步更新
|
||||
同步自动选择的开关状态 ok
|
||||
同步2个日期按钮的 允许/禁用状态 ok
|
||||
同步最新时间显示 ok
|
||||
2 依据是开关状态:
|
||||
选择关闭自动更新,则允许点击按钮
|
||||
如果跳转到更新时区 年月日时分界面
|
||||
1 显示最新的时间和时区
|
||||
2 如果点击更改,时间当成本地时间 通过utc+- 转为utc时间 并保存时区
|
||||
选择开启自动更新 禁用按钮点击,
|
||||
立即向zigbee查询时间,并依据zigbee下发的utc时间和当地时间计算出时区 并保存时区 ok
|
||||
*/
|
||||
|
||||
void setup_scr_dateinfopage(lv_ui *ui)
|
||||
{
|
||||
time_t now;
|
||||
struct tm timeinfo;
|
||||
|
||||
time(&now);
|
||||
localtime_r(&now, &timeinfo);
|
||||
|
||||
LOG_I("timezone utc:%d",tz_get());
|
||||
LOG_I("time==%d:%d:%d:%d:%02d:%02d:%02d:%02d:%02d",
|
||||
timeinfo.tm_isdst, //是否为夏时制
|
||||
timeinfo.tm_yday, //一年过去的天数
|
||||
timeinfo.tm_wday, //星期,1对应星期一
|
||||
timeinfo.tm_year+1900, //年,距离1900年的差值,默认是70
|
||||
timeinfo.tm_mon+1, //日期:月,从0开始 0~11
|
||||
timeinfo.tm_mday, //日期:日,从1开始
|
||||
timeinfo.tm_hour, //小时
|
||||
timeinfo.tm_min, //分钟
|
||||
timeinfo.tm_sec); //秒钟
|
||||
//Write codes dateinfopage
|
||||
ui->dateinfopage = lv_obj_create(NULL);
|
||||
lv_obj_set_size(ui->dateinfopage, 480, 480);
|
||||
lv_obj_set_scrollbar_mode(ui->dateinfopage, LV_SCROLLBAR_MODE_OFF);
|
||||
|
||||
//Write style for dateinfopage, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
lv_obj_set_style_bg_opa(ui->dateinfopage, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_color(ui->dateinfopage, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_dir(ui->dateinfopage, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
//Write codes dateinfopage_returnbg
|
||||
ui->dateinfopage_returnbg = lv_img_create(ui->dateinfopage);
|
||||
lv_obj_add_flag(ui->dateinfopage_returnbg, LV_OBJ_FLAG_CLICKABLE);
|
||||
lv_img_set_src(ui->dateinfopage_returnbg, LVGL_PATH(returnbg.png));
|
||||
lv_img_set_pivot(ui->dateinfopage_returnbg, 50,50);
|
||||
lv_img_set_angle(ui->dateinfopage_returnbg, 0);
|
||||
lv_obj_set_pos(ui->dateinfopage_returnbg, 23, 27);
|
||||
lv_obj_set_size(ui->dateinfopage_returnbg, 14, 26);
|
||||
|
||||
//Write style for dateinfopage_returnbg, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
lv_obj_set_style_img_opa(ui->dateinfopage_returnbg, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
//Write codes dateinfopage_retrunbtn
|
||||
ui->dateinfopage_retrunbtn = lv_btn_create(ui->dateinfopage);
|
||||
//ui->dateinfopage_retrunbtn_label = lv_label_create(ui->dateinfopage_retrunbtn);
|
||||
//lv_label_set_text(ui->dateinfopage_retrunbtn_label, "");
|
||||
//lv_label_set_long_mode(ui->dateinfopage_retrunbtn_label, LV_LABEL_LONG_WRAP);
|
||||
//lv_obj_align(ui->dateinfopage_retrunbtn_label, LV_ALIGN_CENTER, 0, 0);
|
||||
lv_obj_set_style_pad_all(ui->dateinfopage_retrunbtn, 0, LV_STATE_DEFAULT);
|
||||
//lv_obj_set_width(ui->displayinfopage_retrunbtn_label, LV_PCT(100));
|
||||
lv_obj_set_pos(ui->dateinfopage_retrunbtn, 8, 8);
|
||||
lv_obj_set_size(ui->dateinfopage_retrunbtn, 60, 60);
|
||||
|
||||
//Write style for displayinfopage_retrunbtn, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
lv_obj_set_style_bg_opa(ui->dateinfopage_retrunbtn, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_border_width(ui->dateinfopage_retrunbtn, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_radius(ui->dateinfopage_retrunbtn, 5, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_shadow_width(ui->dateinfopage_retrunbtn, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
// lv_obj_set_style_text_color(ui->dateinfopage_retrunbtn, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
// lv_obj_set_style_text_font(ui->dateinfopage_retrunbtn, &lv_font_albbhptR_16, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
// lv_obj_set_style_text_opa(ui->dateinfopage_retrunbtn, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
// lv_obj_set_style_text_align(ui->dateinfopage_retrunbtn, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
|
||||
//Write codes dateinfopage_sw_1
|
||||
ui->dateinfopage_sw_1 = lv_switch_create(ui->dateinfopage);
|
||||
lv_obj_set_pos(ui->dateinfopage_sw_1, 390, 78);
|
||||
lv_obj_set_size(ui->dateinfopage_sw_1, 60, 30);
|
||||
|
||||
//Write style for dateinfopage_sw_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
lv_obj_set_style_bg_opa(ui->dateinfopage_sw_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_color(ui->dateinfopage_sw_1, lv_color_hex(0x212121), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_dir(ui->dateinfopage_sw_1, LV_GRAD_DIR_VER, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_color(ui->dateinfopage_sw_1, lv_color_hex(0x212121), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_main_stop(ui->dateinfopage_sw_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_stop(ui->dateinfopage_sw_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_border_width(ui->dateinfopage_sw_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_radius(ui->dateinfopage_sw_1, 100, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_shadow_width(ui->dateinfopage_sw_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
//Write style for dateinfopage_sw_1, Part: LV_PART_INDICATOR, State: LV_STATE_CHECKED.
|
||||
lv_obj_set_style_bg_opa(ui->dateinfopage_sw_1, 255, LV_PART_INDICATOR|LV_STATE_CHECKED);
|
||||
lv_obj_set_style_bg_color(ui->dateinfopage_sw_1, lv_color_hex(0x374c69), LV_PART_INDICATOR|LV_STATE_CHECKED);
|
||||
lv_obj_set_style_bg_grad_dir(ui->dateinfopage_sw_1, LV_GRAD_DIR_VER, LV_PART_INDICATOR|LV_STATE_CHECKED);
|
||||
lv_obj_set_style_bg_grad_color(ui->dateinfopage_sw_1, lv_color_hex(0x374c69), LV_PART_INDICATOR|LV_STATE_CHECKED);
|
||||
lv_obj_set_style_bg_main_stop(ui->dateinfopage_sw_1, 0, LV_PART_INDICATOR|LV_STATE_CHECKED);
|
||||
lv_obj_set_style_bg_grad_stop(ui->dateinfopage_sw_1, 255, LV_PART_INDICATOR|LV_STATE_CHECKED);
|
||||
lv_obj_set_style_border_width(ui->dateinfopage_sw_1, 0, LV_PART_INDICATOR|LV_STATE_CHECKED);
|
||||
|
||||
//Write style for dateinfopage_sw_1, Part: LV_PART_KNOB, State: LV_STATE_DEFAULT.
|
||||
lv_obj_set_style_bg_opa(ui->dateinfopage_sw_1, 255, LV_PART_KNOB|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_color(ui->dateinfopage_sw_1, lv_color_hex(0xeb950f), LV_PART_KNOB|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_dir(ui->dateinfopage_sw_1, LV_GRAD_DIR_VER, LV_PART_KNOB|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_color(ui->dateinfopage_sw_1, lv_color_hex(0xef950f), LV_PART_KNOB|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_main_stop(ui->dateinfopage_sw_1, 0, LV_PART_KNOB|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_stop(ui->dateinfopage_sw_1, 255, LV_PART_KNOB|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_border_width(ui->dateinfopage_sw_1, 0, LV_PART_KNOB|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_radius(ui->dateinfopage_sw_1, 100, LV_PART_KNOB|LV_STATE_DEFAULT);
|
||||
if(GET_nvs_Sys_Info_autoupdatetime())
|
||||
{
|
||||
lv_obj_add_state(ui->dateinfopage_sw_1, LV_STATE_CHECKED);//on
|
||||
}
|
||||
else
|
||||
{
|
||||
lv_obj_clear_state(ui->dateinfopage_sw_1, LV_STATE_CHECKED);//off
|
||||
}
|
||||
//Write codes dateinfopage_label_2
|
||||
ui->dateinfopage_label_2 = lv_label_create(ui->dateinfopage);
|
||||
//lv_label_set_text(ui->dateinfopage_label_2, "Set time Automatically");
|
||||
lv_label_set_text(ui->dateinfopage_label_2, Menu_List[GET_nvs_Sys_Info_language()][MENU_LIST_SetClockauto]);
|
||||
lv_label_set_long_mode(ui->dateinfopage_label_2, LV_LABEL_LONG_WRAP);
|
||||
lv_obj_set_pos(ui->dateinfopage_label_2, 38, 80);
|
||||
lv_obj_set_size(ui->dateinfopage_label_2, 250, 24);
|
||||
|
||||
//Write style for dateinfopage_label_2, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
lv_obj_set_style_border_width(ui->dateinfopage_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_radius(ui->dateinfopage_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_color(ui->dateinfopage_label_2, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui->dateinfopage_label_2, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui->dateinfopage_label_2, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_letter_space(ui->dateinfopage_label_2, 2, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_line_space(ui->dateinfopage_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_align(ui->dateinfopage_label_2, LV_TEXT_ALIGN_LEFT, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_opa(ui->dateinfopage_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_top(ui->dateinfopage_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_right(ui->dateinfopage_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_bottom(ui->dateinfopage_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_left(ui->dateinfopage_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_shadow_width(ui->dateinfopage_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
//Write codes dateinfopage_datecont
|
||||
ui->dateinfopage_datecont = lv_obj_create(ui->dateinfopage);
|
||||
lv_obj_set_pos(ui->dateinfopage_datecont, 17, 127);
|
||||
lv_obj_set_size(ui->dateinfopage_datecont, 443, 50);
|
||||
lv_obj_set_scrollbar_mode(ui->dateinfopage_datecont, LV_SCROLLBAR_MODE_OFF);
|
||||
|
||||
//Write style for dateinfopage_datecont, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
lv_obj_set_style_border_width(ui->dateinfopage_datecont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_radius(ui->dateinfopage_datecont, 10, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_opa(ui->dateinfopage_datecont, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_color(ui->dateinfopage_datecont, lv_color_hex(0x212121), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_dir(ui->dateinfopage_datecont, LV_GRAD_DIR_VER, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_color(ui->dateinfopage_datecont, lv_color_hex(0x212121), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_main_stop(ui->dateinfopage_datecont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_stop(ui->dateinfopage_datecont, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_top(ui->dateinfopage_datecont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_bottom(ui->dateinfopage_datecont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_left(ui->dateinfopage_datecont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_right(ui->dateinfopage_datecont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_shadow_width(ui->dateinfopage_datecont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
//Write codes dateinfopage_img_2
|
||||
ui->dateinfopage_img_2 = lv_img_create(ui->dateinfopage_datecont);
|
||||
lv_obj_add_flag(ui->dateinfopage_img_2, LV_OBJ_FLAG_CLICKABLE);
|
||||
lv_img_set_src(ui->dateinfopage_img_2, LVGL_PATH(nextpagebg.png));
|
||||
lv_img_set_pivot(ui->dateinfopage_img_2, 0,0);
|
||||
lv_img_set_angle(ui->dateinfopage_img_2, 0);
|
||||
lv_obj_set_pos(ui->dateinfopage_img_2, 422, 17);
|
||||
lv_obj_set_size(ui->dateinfopage_img_2, 14, 22);
|
||||
|
||||
|
||||
//Write style for dateinfopage_img_2, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
lv_obj_set_style_img_opa(ui->dateinfopage_img_2, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
//Write codes dateinfopage_datelabel
|
||||
ui->dateinfopage_datelabel = lv_label_create(ui->dateinfopage_datecont);
|
||||
// lv_label_set_text(ui->dateinfopage_datelabel, "Date");
|
||||
lv_label_set_text(ui->dateinfopage_datelabel, Menu_List[GET_nvs_Sys_Info_language()][MENU_LIST_SetClockDate]);
|
||||
lv_label_set_long_mode(ui->dateinfopage_datelabel, LV_LABEL_LONG_WRAP);
|
||||
lv_obj_set_pos(ui->dateinfopage_datelabel, 21, 0);
|
||||
lv_obj_set_size(ui->dateinfopage_datelabel, 50, 24);
|
||||
|
||||
//Write style for dateinfopage_datelabel, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
lv_obj_set_style_border_width(ui->dateinfopage_datelabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_radius(ui->dateinfopage_datelabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_color(ui->dateinfopage_datelabel, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui->dateinfopage_datelabel, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui->dateinfopage_datelabel, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_letter_space(ui->dateinfopage_datelabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_line_space(ui->dateinfopage_datelabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_align(ui->dateinfopage_datelabel, LV_TEXT_ALIGN_LEFT, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_opa(ui->dateinfopage_datelabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_top(ui->dateinfopage_datelabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_right(ui->dateinfopage_datelabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_bottom(ui->dateinfopage_datelabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_left(ui->dateinfopage_datelabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_shadow_width(ui->dateinfopage_datelabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
//Write codes dateinfopage_datetxtlabel
|
||||
ui->dateinfopage_datetxtlabel = lv_label_create(ui->dateinfopage_datecont);
|
||||
//lv_label_set_text(ui->dateinfopage_datetxtlabel, "January 1, 2023");
|
||||
if(GET_nvs_Sys_Info_language()==LANG_CH)
|
||||
{
|
||||
lv_label_set_text_fmt(ui->dateinfopage_datetxtlabel,"%d年%d月%d日",timeinfo.tm_year+1900,timeinfo.tm_mon+1,timeinfo.tm_mday);
|
||||
}
|
||||
else
|
||||
{
|
||||
lv_label_set_text_fmt(ui->dateinfopage_datetxtlabel,"%s %d, %d",Menu_monList[timeinfo.tm_mon+1],timeinfo.tm_mday,timeinfo.tm_year+1900);
|
||||
}
|
||||
lv_label_set_long_mode(ui->dateinfopage_datetxtlabel, LV_LABEL_LONG_WRAP);
|
||||
lv_obj_set_pos(ui->dateinfopage_datetxtlabel, 21, 24);
|
||||
lv_obj_set_size(ui->dateinfopage_datetxtlabel, 200, 24);
|
||||
|
||||
//Write style for dateinfopage_datetxtlabel, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
lv_obj_set_style_border_width(ui->dateinfopage_datetxtlabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_radius(ui->dateinfopage_datetxtlabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_color(ui->dateinfopage_datetxtlabel, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui->dateinfopage_datetxtlabel, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui->dateinfopage_datetxtlabel, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_letter_space(ui->dateinfopage_datetxtlabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_line_space(ui->dateinfopage_datetxtlabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_align(ui->dateinfopage_datetxtlabel, LV_TEXT_ALIGN_LEFT, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_opa(ui->dateinfopage_datetxtlabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_top(ui->dateinfopage_datetxtlabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_right(ui->dateinfopage_datetxtlabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_bottom(ui->dateinfopage_datetxtlabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_left(ui->dateinfopage_datetxtlabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_shadow_width(ui->dateinfopage_datetxtlabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
//Write codes dateinfopage_datebtn
|
||||
ui->dateinfopage_datebtn = lv_btn_create(ui->dateinfopage_datecont);
|
||||
ui->dateinfopage_datebtn_label = lv_label_create(ui->dateinfopage_datebtn);
|
||||
lv_label_set_text(ui->dateinfopage_datebtn_label, "");
|
||||
lv_label_set_long_mode(ui->dateinfopage_datebtn_label, LV_LABEL_LONG_WRAP);
|
||||
lv_obj_align(ui->dateinfopage_datebtn_label, LV_ALIGN_CENTER, 0, 0);
|
||||
lv_obj_set_style_pad_all(ui->dateinfopage_datebtn, 0, LV_STATE_DEFAULT);
|
||||
lv_obj_set_width(ui->dateinfopage_datebtn_label, LV_PCT(100));
|
||||
lv_obj_set_pos(ui->dateinfopage_datebtn, 0, 0);
|
||||
lv_obj_set_size(ui->dateinfopage_datebtn, 443, 50);
|
||||
|
||||
//Write style for dateinfopage_datebtn, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
lv_obj_set_style_bg_opa(ui->dateinfopage_datebtn, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_border_width(ui->dateinfopage_datebtn, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_radius(ui->dateinfopage_datebtn, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_shadow_width(ui->dateinfopage_datebtn, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_color(ui->dateinfopage_datebtn, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui->dateinfopage_datebtn, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui->dateinfopage_datebtn, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_align(ui->dateinfopage_datebtn, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
//Write style for dateinfopage_datebtn, Part: LV_PART_MAIN, State: LV_STATE_DISABLED.
|
||||
lv_obj_set_style_bg_opa(ui->dateinfopage_datebtn, 202, LV_PART_MAIN|LV_STATE_DISABLED);
|
||||
lv_obj_set_style_bg_color(ui->dateinfopage_datebtn, lv_color_hex(0x212121), LV_PART_MAIN|LV_STATE_DISABLED);
|
||||
lv_obj_set_style_bg_grad_dir(ui->dateinfopage_datebtn, LV_GRAD_DIR_VER, LV_PART_MAIN|LV_STATE_DISABLED);
|
||||
lv_obj_set_style_bg_grad_color(ui->dateinfopage_datebtn, lv_color_hex(0x212121), LV_PART_MAIN|LV_STATE_DISABLED);
|
||||
lv_obj_set_style_bg_main_stop(ui->dateinfopage_datebtn, 0, LV_PART_MAIN|LV_STATE_DISABLED);
|
||||
lv_obj_set_style_bg_grad_stop(ui->dateinfopage_datebtn, 255, LV_PART_MAIN|LV_STATE_DISABLED);
|
||||
lv_obj_set_style_border_width(ui->dateinfopage_datebtn, 0, LV_PART_MAIN|LV_STATE_DISABLED);
|
||||
lv_obj_set_style_radius(ui->dateinfopage_datebtn, 10, LV_PART_MAIN|LV_STATE_DISABLED);
|
||||
lv_obj_set_style_shadow_width(ui->dateinfopage_datebtn, 0, LV_PART_MAIN|LV_STATE_DISABLED);
|
||||
lv_obj_set_style_text_color(ui->dateinfopage_datebtn, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DISABLED);
|
||||
lv_obj_set_style_text_font(ui->dateinfopage_datebtn, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DISABLED);
|
||||
lv_obj_set_style_text_opa(ui->dateinfopage_datebtn, 255, LV_PART_MAIN|LV_STATE_DISABLED);
|
||||
|
||||
//Write codes dateinfopage_timecont
|
||||
ui->dateinfopage_timecont = lv_obj_create(ui->dateinfopage);
|
||||
lv_obj_set_pos(ui->dateinfopage_timecont, 17, 182);
|
||||
lv_obj_set_size(ui->dateinfopage_timecont, 443, 50);
|
||||
lv_obj_set_scrollbar_mode(ui->dateinfopage_timecont, LV_SCROLLBAR_MODE_OFF);
|
||||
|
||||
//Write style for dateinfopage_timecont, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
lv_obj_set_style_border_width(ui->dateinfopage_timecont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_radius(ui->dateinfopage_timecont, 10, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_opa(ui->dateinfopage_timecont, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_color(ui->dateinfopage_timecont, lv_color_hex(0x212121), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_dir(ui->dateinfopage_timecont, LV_GRAD_DIR_VER, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_color(ui->dateinfopage_timecont, lv_color_hex(0x212121), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_main_stop(ui->dateinfopage_timecont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_stop(ui->dateinfopage_timecont, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_top(ui->dateinfopage_timecont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_bottom(ui->dateinfopage_timecont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_left(ui->dateinfopage_timecont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_right(ui->dateinfopage_timecont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_shadow_width(ui->dateinfopage_timecont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
//Write codes dateinfopage_img_3
|
||||
ui->dateinfopage_img_3 = lv_img_create(ui->dateinfopage_timecont);
|
||||
lv_obj_add_flag(ui->dateinfopage_img_3, LV_OBJ_FLAG_CLICKABLE);
|
||||
lv_img_set_src(ui->dateinfopage_img_3, LVGL_PATH(nextpagebg.png));
|
||||
lv_img_set_pivot(ui->dateinfopage_img_3, 0,0);
|
||||
lv_img_set_angle(ui->dateinfopage_img_3, 0);
|
||||
lv_obj_set_pos(ui->dateinfopage_img_3, 422, 17);
|
||||
lv_obj_set_size(ui->dateinfopage_img_3, 14, 22);
|
||||
|
||||
//Write style for dateinfopage_img_3, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
lv_obj_set_style_img_opa(ui->dateinfopage_img_3, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
//Write codes dateinfopage_timeclabel
|
||||
ui->dateinfopage_timeclabel = lv_label_create(ui->dateinfopage_timecont);
|
||||
// lv_label_set_text(ui->dateinfopage_timeclabel, "Time");
|
||||
lv_label_set_text(ui->dateinfopage_timeclabel, Menu_List[GET_nvs_Sys_Info_language()][MENU_LIST_SetClockTime]);
|
||||
lv_label_set_long_mode(ui->dateinfopage_timeclabel, LV_LABEL_LONG_WRAP);
|
||||
lv_obj_set_pos(ui->dateinfopage_timeclabel, 21, 0);
|
||||
lv_obj_set_size(ui->dateinfopage_timeclabel, 50, 24);
|
||||
|
||||
//Write style for dateinfopage_timeclabel, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
lv_obj_set_style_border_width(ui->dateinfopage_timeclabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_radius(ui->dateinfopage_timeclabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_color(ui->dateinfopage_timeclabel, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui->dateinfopage_timeclabel, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui->dateinfopage_timeclabel, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_letter_space(ui->dateinfopage_timeclabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_line_space(ui->dateinfopage_timeclabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_align(ui->dateinfopage_timeclabel, LV_TEXT_ALIGN_LEFT, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_opa(ui->dateinfopage_timeclabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_top(ui->dateinfopage_timeclabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_right(ui->dateinfopage_timeclabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_bottom(ui->dateinfopage_timeclabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_left(ui->dateinfopage_timeclabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_shadow_width(ui->dateinfopage_timeclabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
//Write codes dateinfopage_timetxtlabel
|
||||
ui->dateinfopage_timetxtlabel = lv_label_create(ui->dateinfopage_timecont);
|
||||
//lv_label_set_text(ui->dateinfopage_timetxtlabel, "09:48");
|
||||
lv_label_set_text_fmt(ui->dateinfopage_timetxtlabel,"%02d:%02d",timeinfo.tm_hour,timeinfo.tm_min);
|
||||
|
||||
lv_label_set_long_mode(ui->dateinfopage_timetxtlabel, LV_LABEL_LONG_WRAP);
|
||||
lv_obj_set_pos(ui->dateinfopage_timetxtlabel, 21, 24);
|
||||
lv_obj_set_size(ui->dateinfopage_timetxtlabel, 60, 24);
|
||||
|
||||
//Write style for dateinfopage_timetxtlabel, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
lv_obj_set_style_border_width(ui->dateinfopage_timetxtlabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_radius(ui->dateinfopage_timetxtlabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_color(ui->dateinfopage_timetxtlabel, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui->dateinfopage_timetxtlabel, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui->dateinfopage_timetxtlabel, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_letter_space(ui->dateinfopage_timetxtlabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_line_space(ui->dateinfopage_timetxtlabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_align(ui->dateinfopage_timetxtlabel, LV_TEXT_ALIGN_LEFT, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_opa(ui->dateinfopage_timetxtlabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_top(ui->dateinfopage_timetxtlabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_right(ui->dateinfopage_timetxtlabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_bottom(ui->dateinfopage_timetxtlabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_left(ui->dateinfopage_timetxtlabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_shadow_width(ui->dateinfopage_timetxtlabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
//Write codes dateinfopage_timebtn
|
||||
ui->dateinfopage_timebtn = lv_btn_create(ui->dateinfopage_timecont);
|
||||
ui->dateinfopage_timebtn_label = lv_label_create(ui->dateinfopage_timebtn);
|
||||
lv_label_set_text(ui->dateinfopage_timebtn_label, "");
|
||||
lv_label_set_long_mode(ui->dateinfopage_timebtn_label, LV_LABEL_LONG_WRAP);
|
||||
lv_obj_align(ui->dateinfopage_timebtn_label, LV_ALIGN_CENTER, 0, 0);
|
||||
lv_obj_set_style_pad_all(ui->dateinfopage_timebtn, 0, LV_STATE_DEFAULT);
|
||||
lv_obj_set_width(ui->dateinfopage_timebtn_label, LV_PCT(100));
|
||||
lv_obj_set_pos(ui->dateinfopage_timebtn, 0, 0);
|
||||
lv_obj_set_size(ui->dateinfopage_timebtn, 443, 50);
|
||||
|
||||
//Write style for dateinfopage_timebtn, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
lv_obj_set_style_bg_opa(ui->dateinfopage_timebtn, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_border_width(ui->dateinfopage_timebtn, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_radius(ui->dateinfopage_timebtn, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_shadow_width(ui->dateinfopage_timebtn, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_color(ui->dateinfopage_timebtn, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui->dateinfopage_timebtn, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui->dateinfopage_timebtn, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_align(ui->dateinfopage_timebtn, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
//Write style for dateinfopage_timebtn, Part: LV_PART_MAIN, State: LV_STATE_DISABLED.
|
||||
lv_obj_set_style_bg_opa(ui->dateinfopage_timebtn, 204, LV_PART_MAIN|LV_STATE_DISABLED);
|
||||
lv_obj_set_style_bg_color(ui->dateinfopage_timebtn, lv_color_hex(0x212121), LV_PART_MAIN|LV_STATE_DISABLED);
|
||||
lv_obj_set_style_bg_grad_dir(ui->dateinfopage_timebtn, LV_GRAD_DIR_VER, LV_PART_MAIN|LV_STATE_DISABLED);
|
||||
lv_obj_set_style_bg_grad_color(ui->dateinfopage_timebtn, lv_color_hex(0x212121), LV_PART_MAIN|LV_STATE_DISABLED);
|
||||
lv_obj_set_style_bg_main_stop(ui->dateinfopage_timebtn, 0, LV_PART_MAIN|LV_STATE_DISABLED);
|
||||
lv_obj_set_style_bg_grad_stop(ui->dateinfopage_timebtn, 255, LV_PART_MAIN|LV_STATE_DISABLED);
|
||||
lv_obj_set_style_border_width(ui->dateinfopage_timebtn, 0, LV_PART_MAIN|LV_STATE_DISABLED);
|
||||
lv_obj_set_style_radius(ui->dateinfopage_timebtn, 10, LV_PART_MAIN|LV_STATE_DISABLED);
|
||||
lv_obj_set_style_shadow_width(ui->dateinfopage_timebtn, 0, LV_PART_MAIN|LV_STATE_DISABLED);
|
||||
lv_obj_set_style_text_color(ui->dateinfopage_timebtn, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DISABLED);
|
||||
lv_obj_set_style_text_font(ui->dateinfopage_timebtn, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DISABLED);
|
||||
lv_obj_set_style_text_opa(ui->dateinfopage_timebtn, 255, LV_PART_MAIN|LV_STATE_DISABLED);
|
||||
|
||||
//The custom code of dateinfopage.
|
||||
if(GET_nvs_Sys_Info_autoupdatetime())//自动更新时间要把按钮禁用掉
|
||||
{
|
||||
//lv_obj_add_state(ui->dateinfopage_timebtn, LV_STATE_DISABLED);//off
|
||||
|
||||
//日期按键禁止按下
|
||||
lv_obj_add_state(guider_ui.dateinfopage_datebtn, LV_STATE_DISABLED);//off
|
||||
//时间禁止允许按下
|
||||
lv_obj_add_state(guider_ui.dateinfopage_timebtn, LV_STATE_DISABLED);//off
|
||||
}
|
||||
else//手动更新时间 允许按钮操作
|
||||
{
|
||||
//lv_obj_add_state(ui->dateinfopage_timebtn, LV_STATE_DEFAULT);//on
|
||||
|
||||
//日期按键允许按下
|
||||
lv_obj_clear_state(ui->dateinfopage_datebtn, LV_STATE_DISABLED);//on
|
||||
//时间按键允许按下
|
||||
lv_obj_clear_state(ui->dateinfopage_timebtn, LV_STATE_DISABLED);//on
|
||||
}
|
||||
//Update current screen layout.
|
||||
lv_obj_update_layout(ui->dateinfopage);
|
||||
|
||||
//Init events for screen.
|
||||
events_init_dateinfopage(ui);
|
||||
}
|
||||
@@ -0,0 +1,654 @@
|
||||
/*
|
||||
* Copyright 2025 NXP
|
||||
* NXP Confidential and Proprietary. This software is owned or controlled by NXP and may only be used strictly in
|
||||
* accordance with the applicable license terms. By expressly accepting such terms or by downloading, installing,
|
||||
* activating and/or otherwise using the software, you are agreeing that you have read, and that you agree to
|
||||
* comply with and are bound by, such license terms. If you do not agree to be bound by the applicable license
|
||||
* terms, then you may not retain, install, activate or otherwise use the software.
|
||||
*/
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#include "lvgl.h"
|
||||
#include "gui_guider.h"
|
||||
#include "events_init.h"
|
||||
#include "widgets_init.h"
|
||||
#include "custom.h"
|
||||
|
||||
|
||||
//显示最新的时间和时区
|
||||
void setup_scr_datesetpage(lv_ui *ui)
|
||||
{
|
||||
time_t now;
|
||||
struct tm timeinfo;
|
||||
|
||||
time(&now);
|
||||
localtime_r(&now, &timeinfo);
|
||||
|
||||
LOG_I("timezone utc:%d",tz_get());
|
||||
LOG_I("time==%d:%d:%d:%d:%02d:%02d:%02d:%02d:%02d",
|
||||
timeinfo.tm_isdst, //是否为夏时制
|
||||
timeinfo.tm_yday, //一年过去的天数
|
||||
timeinfo.tm_wday, //星期,1对应星期一
|
||||
timeinfo.tm_year+1900, //年,距离1900年的差值,默认是70
|
||||
timeinfo.tm_mon+1, //日期:月,从0开始 0~11
|
||||
timeinfo.tm_mday, //日期:日,从1开始
|
||||
timeinfo.tm_hour, //小时
|
||||
timeinfo.tm_min, //分钟
|
||||
timeinfo.tm_sec); //秒钟
|
||||
|
||||
|
||||
//Write codes datesetpage
|
||||
ui->datesetpage = lv_obj_create(NULL);
|
||||
lv_obj_set_size(ui->datesetpage, 480, 480);
|
||||
lv_obj_set_scrollbar_mode(ui->datesetpage, LV_SCROLLBAR_MODE_OFF);
|
||||
|
||||
//Write style for datesetpage, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
lv_obj_set_style_bg_opa(ui->datesetpage, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_color(ui->datesetpage, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_dir(ui->datesetpage, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
//Write codes datesetpage_returnbg
|
||||
ui->datesetpage_returnbg = lv_img_create(ui->datesetpage);
|
||||
lv_obj_add_flag(ui->datesetpage_returnbg, LV_OBJ_FLAG_CLICKABLE);
|
||||
lv_img_set_src(ui->datesetpage_returnbg, LVGL_PATH(returnbg.png));
|
||||
lv_img_set_pivot(ui->datesetpage_returnbg, 50,50);
|
||||
lv_img_set_angle(ui->datesetpage_returnbg, 0);
|
||||
lv_obj_set_pos(ui->datesetpage_returnbg, 23, 27);
|
||||
lv_obj_set_size(ui->datesetpage_returnbg, 14, 26);
|
||||
|
||||
//Write style for datesetpage_returnbg, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
lv_obj_set_style_img_opa(ui->datesetpage_returnbg, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
//Write codes datesetpage_retrunbtn
|
||||
ui->datesetpage_retrunbtn = lv_btn_create(ui->datesetpage);
|
||||
ui->datesetpage_retrunbtn_label = lv_label_create(ui->datesetpage_retrunbtn);
|
||||
lv_label_set_text(ui->datesetpage_retrunbtn_label, "");
|
||||
lv_label_set_long_mode(ui->datesetpage_retrunbtn_label, LV_LABEL_LONG_WRAP);
|
||||
lv_obj_align(ui->datesetpage_retrunbtn_label, LV_ALIGN_CENTER, 0, 0);
|
||||
lv_obj_set_style_pad_all(ui->datesetpage_retrunbtn, 0, LV_STATE_DEFAULT);
|
||||
lv_obj_set_width(ui->datesetpage_retrunbtn_label, LV_PCT(100));
|
||||
lv_obj_set_pos(ui->datesetpage_retrunbtn, 7, 10);
|
||||
lv_obj_set_size(ui->datesetpage_retrunbtn, 60, 60);
|
||||
|
||||
//Write style for datesetpage_retrunbtn, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
lv_obj_set_style_bg_opa(ui->datesetpage_retrunbtn, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_border_width(ui->datesetpage_retrunbtn, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_radius(ui->datesetpage_retrunbtn, 5, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_shadow_width(ui->datesetpage_retrunbtn, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_color(ui->datesetpage_retrunbtn, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui->datesetpage_retrunbtn, &lv_font_albbhptR_20, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui->datesetpage_retrunbtn, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_align(ui->datesetpage_retrunbtn, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
//Write codes datesetpage_label_1
|
||||
ui->datesetpage_label_1 = lv_label_create(ui->datesetpage);
|
||||
//lv_label_set_text(ui->datesetpage_label_1, "Time Zone");
|
||||
lv_label_set_text(ui->datesetpage_label_1, Menu_List[GET_nvs_Sys_Info_language()][MENU_LIST_SetClockZone]);
|
||||
lv_label_set_long_mode(ui->datesetpage_label_1, LV_LABEL_LONG_WRAP);
|
||||
lv_obj_set_pos(ui->datesetpage_label_1, 44, 82);
|
||||
lv_obj_set_size(ui->datesetpage_label_1, 180, 20);
|
||||
|
||||
//Write style for datesetpage_label_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
lv_obj_set_style_border_width(ui->datesetpage_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_radius(ui->datesetpage_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_color(ui->datesetpage_label_1, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui->datesetpage_label_1, &lv_font_albbhptR_20, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui->datesetpage_label_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_letter_space(ui->datesetpage_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_line_space(ui->datesetpage_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_align(ui->datesetpage_label_1, LV_TEXT_ALIGN_LEFT, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_opa(ui->datesetpage_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_top(ui->datesetpage_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_right(ui->datesetpage_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_bottom(ui->datesetpage_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_left(ui->datesetpage_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_shadow_width(ui->datesetpage_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
//Write codes datesetpage_zoneddlist
|
||||
ui->datesetpage_zoneddlist = lv_dropdown_create(ui->datesetpage);
|
||||
lv_dropdown_set_options(ui->datesetpage_zoneddlist, "UTC-12\nUTC-11\nUTC-10\nUTC-09\nUTC-08\nUTC-07\nUTC-06\nUTC-05\nUTC-04\nUTC-03\nUTC-02\nUTC-01\nUTC+00\nUTC+01\nUTC+02\nUTC+03\nUTC+04\nUTC+05\nUTC+06\nUTC+07\nUTC+08\nUTC+09\nUTC+10\nUTC+11\nUTC+12");
|
||||
lv_obj_set_pos(ui->datesetpage_zoneddlist, 39, 113);
|
||||
lv_obj_set_size(ui->datesetpage_zoneddlist, 403, 35);
|
||||
//0--UTC-12 ....12---UTC+0...... 关系:+12
|
||||
lv_dropdown_set_selected(ui->datesetpage_zoneddlist,tz_get()+12);//-12~+12----->0~24
|
||||
|
||||
//Write style for datesetpage_zoneddlist, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
lv_obj_set_style_text_color(ui->datesetpage_zoneddlist, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui->datesetpage_zoneddlist, &lv_font_albbhptR_20, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui->datesetpage_zoneddlist, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_border_width(ui->datesetpage_zoneddlist, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_top(ui->datesetpage_zoneddlist, 8, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_left(ui->datesetpage_zoneddlist, 6, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_right(ui->datesetpage_zoneddlist, 6, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_radius(ui->datesetpage_zoneddlist, 10, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_opa(ui->datesetpage_zoneddlist, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_color(ui->datesetpage_zoneddlist, lv_color_hex(0x00A8FF), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_dir(ui->datesetpage_zoneddlist, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_shadow_width(ui->datesetpage_zoneddlist, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
//Write style state: LV_STATE_CHECKED for &style_datesetpage_zoneddlist_extra_list_selected_checked
|
||||
static lv_style_t style_datesetpage_zoneddlist_extra_list_selected_checked;
|
||||
ui_init_style(&style_datesetpage_zoneddlist_extra_list_selected_checked);
|
||||
|
||||
lv_style_set_border_width(&style_datesetpage_zoneddlist_extra_list_selected_checked, 1);
|
||||
lv_style_set_border_opa(&style_datesetpage_zoneddlist_extra_list_selected_checked, 255);
|
||||
lv_style_set_border_color(&style_datesetpage_zoneddlist_extra_list_selected_checked, lv_color_hex(0xe1e6ee));
|
||||
lv_style_set_border_side(&style_datesetpage_zoneddlist_extra_list_selected_checked, LV_BORDER_SIDE_FULL);
|
||||
lv_style_set_radius(&style_datesetpage_zoneddlist_extra_list_selected_checked, 3);
|
||||
lv_style_set_bg_opa(&style_datesetpage_zoneddlist_extra_list_selected_checked, 255);
|
||||
lv_style_set_bg_color(&style_datesetpage_zoneddlist_extra_list_selected_checked, lv_color_hex(0x00a1b5));
|
||||
lv_style_set_bg_grad_dir(&style_datesetpage_zoneddlist_extra_list_selected_checked, LV_GRAD_DIR_NONE);
|
||||
lv_obj_add_style(lv_dropdown_get_list(ui->datesetpage_zoneddlist), &style_datesetpage_zoneddlist_extra_list_selected_checked, LV_PART_SELECTED|LV_STATE_CHECKED);
|
||||
|
||||
//Write style state: LV_STATE_DEFAULT for &style_datesetpage_zoneddlist_extra_list_main_default
|
||||
static lv_style_t style_datesetpage_zoneddlist_extra_list_main_default;
|
||||
ui_init_style(&style_datesetpage_zoneddlist_extra_list_main_default);
|
||||
|
||||
lv_style_set_max_height(&style_datesetpage_zoneddlist_extra_list_main_default, 320);
|
||||
lv_style_set_text_color(&style_datesetpage_zoneddlist_extra_list_main_default, lv_color_hex(0x0D3055));
|
||||
lv_style_set_text_font(&style_datesetpage_zoneddlist_extra_list_main_default, &lv_font_albbhptR_20);
|
||||
lv_style_set_text_opa(&style_datesetpage_zoneddlist_extra_list_main_default, 255);
|
||||
lv_style_set_border_width(&style_datesetpage_zoneddlist_extra_list_main_default, 1);
|
||||
lv_style_set_border_opa(&style_datesetpage_zoneddlist_extra_list_main_default, 255);
|
||||
lv_style_set_border_color(&style_datesetpage_zoneddlist_extra_list_main_default, lv_color_hex(0xe1e6ee));
|
||||
lv_style_set_border_side(&style_datesetpage_zoneddlist_extra_list_main_default, LV_BORDER_SIDE_FULL);
|
||||
lv_style_set_radius(&style_datesetpage_zoneddlist_extra_list_main_default, 3);
|
||||
lv_style_set_bg_opa(&style_datesetpage_zoneddlist_extra_list_main_default, 255);
|
||||
lv_style_set_bg_color(&style_datesetpage_zoneddlist_extra_list_main_default, lv_color_hex(0xffffff));
|
||||
lv_style_set_bg_grad_dir(&style_datesetpage_zoneddlist_extra_list_main_default, LV_GRAD_DIR_NONE);
|
||||
lv_obj_add_style(lv_dropdown_get_list(ui->datesetpage_zoneddlist), &style_datesetpage_zoneddlist_extra_list_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
//Write style state: LV_STATE_DEFAULT for &style_datesetpage_zoneddlist_extra_list_scrollbar_default
|
||||
static lv_style_t style_datesetpage_zoneddlist_extra_list_scrollbar_default;
|
||||
ui_init_style(&style_datesetpage_zoneddlist_extra_list_scrollbar_default);
|
||||
|
||||
lv_style_set_radius(&style_datesetpage_zoneddlist_extra_list_scrollbar_default, 3);
|
||||
lv_style_set_bg_opa(&style_datesetpage_zoneddlist_extra_list_scrollbar_default, 255);
|
||||
lv_style_set_bg_color(&style_datesetpage_zoneddlist_extra_list_scrollbar_default, lv_color_hex(0x00ff00));
|
||||
lv_style_set_bg_grad_dir(&style_datesetpage_zoneddlist_extra_list_scrollbar_default, LV_GRAD_DIR_NONE);
|
||||
lv_obj_add_style(lv_dropdown_get_list(ui->datesetpage_zoneddlist), &style_datesetpage_zoneddlist_extra_list_scrollbar_default, LV_PART_SCROLLBAR|LV_STATE_DEFAULT);
|
||||
|
||||
//Write codes datesetpage_label_2
|
||||
ui->datesetpage_label_2 = lv_label_create(ui->datesetpage);
|
||||
//lv_label_set_text(ui->datesetpage_label_2, "Date");
|
||||
lv_label_set_text(ui->datesetpage_label_2, Menu_List[GET_nvs_Sys_Info_language()][MENU_LIST_SetClockDate]);
|
||||
|
||||
lv_label_set_long_mode(ui->datesetpage_label_2, LV_LABEL_LONG_WRAP);
|
||||
lv_obj_set_pos(ui->datesetpage_label_2, 44, 179);
|
||||
lv_obj_set_size(ui->datesetpage_label_2, 180, 20);
|
||||
|
||||
//Write style for datesetpage_label_2, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
lv_obj_set_style_border_width(ui->datesetpage_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_radius(ui->datesetpage_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_color(ui->datesetpage_label_2, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui->datesetpage_label_2, &lv_font_albbhptR_20, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui->datesetpage_label_2, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_letter_space(ui->datesetpage_label_2, 2, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_line_space(ui->datesetpage_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_align(ui->datesetpage_label_2, LV_TEXT_ALIGN_LEFT, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_opa(ui->datesetpage_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_top(ui->datesetpage_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_right(ui->datesetpage_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_bottom(ui->datesetpage_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_left(ui->datesetpage_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_shadow_width(ui->datesetpage_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
//Write codes datesetpage_yearddlist
|
||||
ui->datesetpage_yearddlist = lv_dropdown_create(ui->datesetpage);
|
||||
lv_dropdown_set_options(ui->datesetpage_yearddlist, "2024\n2025\n2026\n2027\n2028\n2029\n2030\n2031\n2032\n2033\n2034\n2035\n2036\n2037\n2038\n2039\n2040\n2041\n2042\n2043\n2044\n2045\n2046\n2047\n2048\n2049\n2050\n2051\n2052\n2053\n2054\n2055\n2056\n2057\n2058\n2059\n2060\n2061\n2062\n2063\n2064\n2065\n2066\n2067\n2068\n2069\n2070\n2071\n2072\n2073\n2074\n2075\n2076\n2077\n2078\n2079\n2080\n2081\n2082\n2083\n2084\n2085\n2086\n2087\n2088\n2089\n2090\n2091\n2092\n2093\n2094\n2095\n2096\n2097\n2098\n2099");
|
||||
lv_obj_set_pos(ui->datesetpage_yearddlist, 39, 210);
|
||||
lv_obj_set_size(ui->datesetpage_yearddlist, 120, 35);
|
||||
//(timeinfo.tm_year+1900)-2004
|
||||
lv_dropdown_set_selected(ui->datesetpage_yearddlist,(timeinfo.tm_year+1900)-2024);
|
||||
|
||||
//Write style for datesetpage_yearddlist, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
lv_obj_set_style_text_color(ui->datesetpage_yearddlist, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui->datesetpage_yearddlist, &lv_font_albbhptR_20, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui->datesetpage_yearddlist, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_border_width(ui->datesetpage_yearddlist, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_top(ui->datesetpage_yearddlist, 8, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_left(ui->datesetpage_yearddlist, 6, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_right(ui->datesetpage_yearddlist, 6, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_radius(ui->datesetpage_yearddlist, 10, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_opa(ui->datesetpage_yearddlist, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_color(ui->datesetpage_yearddlist, lv_color_hex(0x00A8FF), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_dir(ui->datesetpage_yearddlist, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_shadow_width(ui->datesetpage_yearddlist, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
//Write style state: LV_STATE_CHECKED for &style_datesetpage_yearddlist_extra_list_selected_checked
|
||||
static lv_style_t style_datesetpage_yearddlist_extra_list_selected_checked;
|
||||
ui_init_style(&style_datesetpage_yearddlist_extra_list_selected_checked);
|
||||
|
||||
lv_style_set_border_width(&style_datesetpage_yearddlist_extra_list_selected_checked, 1);
|
||||
lv_style_set_border_opa(&style_datesetpage_yearddlist_extra_list_selected_checked, 255);
|
||||
lv_style_set_border_color(&style_datesetpage_yearddlist_extra_list_selected_checked, lv_color_hex(0xe1e6ee));
|
||||
lv_style_set_border_side(&style_datesetpage_yearddlist_extra_list_selected_checked, LV_BORDER_SIDE_FULL);
|
||||
lv_style_set_radius(&style_datesetpage_yearddlist_extra_list_selected_checked, 3);
|
||||
lv_style_set_bg_opa(&style_datesetpage_yearddlist_extra_list_selected_checked, 255);
|
||||
lv_style_set_bg_color(&style_datesetpage_yearddlist_extra_list_selected_checked, lv_color_hex(0x00a1b5));
|
||||
lv_style_set_bg_grad_dir(&style_datesetpage_yearddlist_extra_list_selected_checked, LV_GRAD_DIR_NONE);
|
||||
lv_obj_add_style(lv_dropdown_get_list(ui->datesetpage_yearddlist), &style_datesetpage_yearddlist_extra_list_selected_checked, LV_PART_SELECTED|LV_STATE_CHECKED);
|
||||
|
||||
//Write style state: LV_STATE_DEFAULT for &style_datesetpage_yearddlist_extra_list_main_default
|
||||
static lv_style_t style_datesetpage_yearddlist_extra_list_main_default;
|
||||
ui_init_style(&style_datesetpage_yearddlist_extra_list_main_default);
|
||||
|
||||
lv_style_set_max_height(&style_datesetpage_yearddlist_extra_list_main_default, 150);
|
||||
lv_style_set_text_color(&style_datesetpage_yearddlist_extra_list_main_default, lv_color_hex(0x0D3055));
|
||||
lv_style_set_text_font(&style_datesetpage_yearddlist_extra_list_main_default, &lv_font_albbhptR_20);
|
||||
lv_style_set_text_opa(&style_datesetpage_yearddlist_extra_list_main_default, 255);
|
||||
lv_style_set_border_width(&style_datesetpage_yearddlist_extra_list_main_default, 1);
|
||||
lv_style_set_border_opa(&style_datesetpage_yearddlist_extra_list_main_default, 255);
|
||||
lv_style_set_border_color(&style_datesetpage_yearddlist_extra_list_main_default, lv_color_hex(0xe1e6ee));
|
||||
lv_style_set_border_side(&style_datesetpage_yearddlist_extra_list_main_default, LV_BORDER_SIDE_FULL);
|
||||
lv_style_set_radius(&style_datesetpage_yearddlist_extra_list_main_default, 3);
|
||||
lv_style_set_bg_opa(&style_datesetpage_yearddlist_extra_list_main_default, 255);
|
||||
lv_style_set_bg_color(&style_datesetpage_yearddlist_extra_list_main_default, lv_color_hex(0xffffff));
|
||||
lv_style_set_bg_grad_dir(&style_datesetpage_yearddlist_extra_list_main_default, LV_GRAD_DIR_NONE);
|
||||
lv_obj_add_style(lv_dropdown_get_list(ui->datesetpage_yearddlist), &style_datesetpage_yearddlist_extra_list_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
//Write style state: LV_STATE_DEFAULT for &style_datesetpage_yearddlist_extra_list_scrollbar_default
|
||||
static lv_style_t style_datesetpage_yearddlist_extra_list_scrollbar_default;
|
||||
ui_init_style(&style_datesetpage_yearddlist_extra_list_scrollbar_default);
|
||||
|
||||
lv_style_set_radius(&style_datesetpage_yearddlist_extra_list_scrollbar_default, 3);
|
||||
lv_style_set_bg_opa(&style_datesetpage_yearddlist_extra_list_scrollbar_default, 255);
|
||||
lv_style_set_bg_color(&style_datesetpage_yearddlist_extra_list_scrollbar_default, lv_color_hex(0x00ff00));
|
||||
lv_style_set_bg_grad_dir(&style_datesetpage_yearddlist_extra_list_scrollbar_default, LV_GRAD_DIR_NONE);
|
||||
lv_obj_add_style(lv_dropdown_get_list(ui->datesetpage_yearddlist), &style_datesetpage_yearddlist_extra_list_scrollbar_default, LV_PART_SCROLLBAR|LV_STATE_DEFAULT);
|
||||
|
||||
//Write codes datesetpage_moonddlist
|
||||
ui->datesetpage_moonddlist = lv_dropdown_create(ui->datesetpage);
|
||||
lv_dropdown_set_options(ui->datesetpage_moonddlist, "01\n02\n03\n04\n05\n06\n07\n08\n09\n10\n11\n12");
|
||||
lv_obj_set_pos(ui->datesetpage_moonddlist, 200, 210);
|
||||
lv_obj_set_size(ui->datesetpage_moonddlist, 80, 35);
|
||||
//timeinfo.tm_mon //日期:月,从0开始 0~11 刚好对应
|
||||
lv_dropdown_set_selected(ui->datesetpage_moonddlist,timeinfo.tm_mon);
|
||||
|
||||
//Write style for datesetpage_moonddlist, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
lv_obj_set_style_text_color(ui->datesetpage_moonddlist, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui->datesetpage_moonddlist, &lv_font_albbhptR_20, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui->datesetpage_moonddlist, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_border_width(ui->datesetpage_moonddlist, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_top(ui->datesetpage_moonddlist, 8, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_left(ui->datesetpage_moonddlist, 6, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_right(ui->datesetpage_moonddlist, 6, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_radius(ui->datesetpage_moonddlist, 10, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_opa(ui->datesetpage_moonddlist, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_color(ui->datesetpage_moonddlist, lv_color_hex(0x00A8FF), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_dir(ui->datesetpage_moonddlist, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_shadow_width(ui->datesetpage_moonddlist, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
//Write style state: LV_STATE_CHECKED for &style_datesetpage_moonddlist_extra_list_selected_checked
|
||||
static lv_style_t style_datesetpage_moonddlist_extra_list_selected_checked;
|
||||
ui_init_style(&style_datesetpage_moonddlist_extra_list_selected_checked);
|
||||
|
||||
lv_style_set_border_width(&style_datesetpage_moonddlist_extra_list_selected_checked, 1);
|
||||
lv_style_set_border_opa(&style_datesetpage_moonddlist_extra_list_selected_checked, 255);
|
||||
lv_style_set_border_color(&style_datesetpage_moonddlist_extra_list_selected_checked, lv_color_hex(0xe1e6ee));
|
||||
lv_style_set_border_side(&style_datesetpage_moonddlist_extra_list_selected_checked, LV_BORDER_SIDE_FULL);
|
||||
lv_style_set_radius(&style_datesetpage_moonddlist_extra_list_selected_checked, 3);
|
||||
lv_style_set_bg_opa(&style_datesetpage_moonddlist_extra_list_selected_checked, 255);
|
||||
lv_style_set_bg_color(&style_datesetpage_moonddlist_extra_list_selected_checked, lv_color_hex(0x00a1b5));
|
||||
lv_style_set_bg_grad_dir(&style_datesetpage_moonddlist_extra_list_selected_checked, LV_GRAD_DIR_NONE);
|
||||
lv_obj_add_style(lv_dropdown_get_list(ui->datesetpage_moonddlist), &style_datesetpage_moonddlist_extra_list_selected_checked, LV_PART_SELECTED|LV_STATE_CHECKED);
|
||||
|
||||
//Write style state: LV_STATE_DEFAULT for &style_datesetpage_moonddlist_extra_list_main_default
|
||||
static lv_style_t style_datesetpage_moonddlist_extra_list_main_default;
|
||||
ui_init_style(&style_datesetpage_moonddlist_extra_list_main_default);
|
||||
|
||||
lv_style_set_max_height(&style_datesetpage_moonddlist_extra_list_main_default, 150);
|
||||
lv_style_set_text_color(&style_datesetpage_moonddlist_extra_list_main_default, lv_color_hex(0x0D3055));
|
||||
lv_style_set_text_font(&style_datesetpage_moonddlist_extra_list_main_default, &lv_font_albbhptR_20);
|
||||
lv_style_set_text_opa(&style_datesetpage_moonddlist_extra_list_main_default, 255);
|
||||
lv_style_set_border_width(&style_datesetpage_moonddlist_extra_list_main_default, 1);
|
||||
lv_style_set_border_opa(&style_datesetpage_moonddlist_extra_list_main_default, 255);
|
||||
lv_style_set_border_color(&style_datesetpage_moonddlist_extra_list_main_default, lv_color_hex(0xe1e6ee));
|
||||
lv_style_set_border_side(&style_datesetpage_moonddlist_extra_list_main_default, LV_BORDER_SIDE_FULL);
|
||||
lv_style_set_radius(&style_datesetpage_moonddlist_extra_list_main_default, 3);
|
||||
lv_style_set_bg_opa(&style_datesetpage_moonddlist_extra_list_main_default, 255);
|
||||
lv_style_set_bg_color(&style_datesetpage_moonddlist_extra_list_main_default, lv_color_hex(0xffffff));
|
||||
lv_style_set_bg_grad_dir(&style_datesetpage_moonddlist_extra_list_main_default, LV_GRAD_DIR_NONE);
|
||||
lv_obj_add_style(lv_dropdown_get_list(ui->datesetpage_moonddlist), &style_datesetpage_moonddlist_extra_list_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
//Write style state: LV_STATE_DEFAULT for &style_datesetpage_moonddlist_extra_list_scrollbar_default
|
||||
static lv_style_t style_datesetpage_moonddlist_extra_list_scrollbar_default;
|
||||
ui_init_style(&style_datesetpage_moonddlist_extra_list_scrollbar_default);
|
||||
|
||||
lv_style_set_radius(&style_datesetpage_moonddlist_extra_list_scrollbar_default, 3);
|
||||
lv_style_set_bg_opa(&style_datesetpage_moonddlist_extra_list_scrollbar_default, 255);
|
||||
lv_style_set_bg_color(&style_datesetpage_moonddlist_extra_list_scrollbar_default, lv_color_hex(0x00ff00));
|
||||
lv_style_set_bg_grad_dir(&style_datesetpage_moonddlist_extra_list_scrollbar_default, LV_GRAD_DIR_NONE);
|
||||
lv_obj_add_style(lv_dropdown_get_list(ui->datesetpage_moonddlist), &style_datesetpage_moonddlist_extra_list_scrollbar_default, LV_PART_SCROLLBAR|LV_STATE_DEFAULT);
|
||||
|
||||
//Write codes datesetpage_sunddlist
|
||||
ui->datesetpage_sunddlist = lv_dropdown_create(ui->datesetpage);
|
||||
|
||||
//统一用31天 保存的时候弹窗警告
|
||||
//依据月份定
|
||||
// if(
|
||||
// ((timeinfo.tm_mon+1)==1)
|
||||
// ||((timeinfo.tm_mon+1)==3)
|
||||
// ||((timeinfo.tm_mon+1)==5)
|
||||
// ||((timeinfo.tm_mon+1)==7)
|
||||
// ||((timeinfo.tm_mon+1)==8)
|
||||
// ||((timeinfo.tm_mon+1)==10)
|
||||
// ||((timeinfo.tm_mon+1)==12)
|
||||
// )
|
||||
// {
|
||||
lv_dropdown_set_options(ui->datesetpage_sunddlist, "01\n02\n03\n04\n05\n06\n07\n08\n09\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31");// 1 3 5 7 8 10 12
|
||||
// }
|
||||
// else if(
|
||||
// ((timeinfo.tm_mon+1)==4)
|
||||
// ||((timeinfo.tm_mon+1)==6)
|
||||
// ||((timeinfo.tm_mon+1)==9)
|
||||
// ||((timeinfo.tm_mon+1)==11)
|
||||
// )
|
||||
// {
|
||||
// lv_dropdown_set_options(ui->datesetpage_sunddlist, "1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30");//4 6 9 11
|
||||
// }
|
||||
// else//2月
|
||||
// {
|
||||
// lv_dropdown_set_options(ui->datesetpage_sunddlist, "1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28");//2
|
||||
// }
|
||||
|
||||
lv_obj_set_pos(ui->datesetpage_sunddlist, 310, 210);
|
||||
lv_obj_set_size(ui->datesetpage_sunddlist, 80, 35);
|
||||
|
||||
LOG_I("tm_mday:%d",timeinfo.tm_mday-1);
|
||||
//timeinfo.tm_mday//日期:日,从1开始 ;所以-1转换
|
||||
lv_dropdown_set_selected(ui->datesetpage_sunddlist,timeinfo.tm_mday-1);
|
||||
|
||||
//Write style for datesetpage_sunddlist, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
lv_obj_set_style_text_color(ui->datesetpage_sunddlist, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui->datesetpage_sunddlist, &lv_font_albbhptR_20, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui->datesetpage_sunddlist, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_border_width(ui->datesetpage_sunddlist, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_top(ui->datesetpage_sunddlist, 8, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_left(ui->datesetpage_sunddlist, 6, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_right(ui->datesetpage_sunddlist, 6, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_radius(ui->datesetpage_sunddlist, 10, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_opa(ui->datesetpage_sunddlist, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_color(ui->datesetpage_sunddlist, lv_color_hex(0x00A8FF), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_dir(ui->datesetpage_sunddlist, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_shadow_width(ui->datesetpage_sunddlist, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
//Write style state: LV_STATE_CHECKED for &style_datesetpage_sunddlist_extra_list_selected_checked
|
||||
static lv_style_t style_datesetpage_sunddlist_extra_list_selected_checked;
|
||||
ui_init_style(&style_datesetpage_sunddlist_extra_list_selected_checked);
|
||||
|
||||
lv_style_set_border_width(&style_datesetpage_sunddlist_extra_list_selected_checked, 1);
|
||||
lv_style_set_border_opa(&style_datesetpage_sunddlist_extra_list_selected_checked, 255);
|
||||
lv_style_set_border_color(&style_datesetpage_sunddlist_extra_list_selected_checked, lv_color_hex(0xe1e6ee));
|
||||
lv_style_set_border_side(&style_datesetpage_sunddlist_extra_list_selected_checked, LV_BORDER_SIDE_FULL);
|
||||
lv_style_set_radius(&style_datesetpage_sunddlist_extra_list_selected_checked, 3);
|
||||
lv_style_set_bg_opa(&style_datesetpage_sunddlist_extra_list_selected_checked, 255);
|
||||
lv_style_set_bg_color(&style_datesetpage_sunddlist_extra_list_selected_checked, lv_color_hex(0x00a1b5));
|
||||
lv_style_set_bg_grad_dir(&style_datesetpage_sunddlist_extra_list_selected_checked, LV_GRAD_DIR_NONE);
|
||||
lv_obj_add_style(lv_dropdown_get_list(ui->datesetpage_sunddlist), &style_datesetpage_sunddlist_extra_list_selected_checked, LV_PART_SELECTED|LV_STATE_CHECKED);
|
||||
|
||||
//Write style state: LV_STATE_DEFAULT for &style_datesetpage_sunddlist_extra_list_main_default
|
||||
static lv_style_t style_datesetpage_sunddlist_extra_list_main_default;
|
||||
ui_init_style(&style_datesetpage_sunddlist_extra_list_main_default);
|
||||
|
||||
lv_style_set_max_height(&style_datesetpage_sunddlist_extra_list_main_default, 150);
|
||||
lv_style_set_text_color(&style_datesetpage_sunddlist_extra_list_main_default, lv_color_hex(0x0D3055));
|
||||
lv_style_set_text_font(&style_datesetpage_sunddlist_extra_list_main_default, &lv_font_albbhptR_20);
|
||||
lv_style_set_text_opa(&style_datesetpage_sunddlist_extra_list_main_default, 255);
|
||||
lv_style_set_border_width(&style_datesetpage_sunddlist_extra_list_main_default, 1);
|
||||
lv_style_set_border_opa(&style_datesetpage_sunddlist_extra_list_main_default, 255);
|
||||
lv_style_set_border_color(&style_datesetpage_sunddlist_extra_list_main_default, lv_color_hex(0xe1e6ee));
|
||||
lv_style_set_border_side(&style_datesetpage_sunddlist_extra_list_main_default, LV_BORDER_SIDE_FULL);
|
||||
lv_style_set_radius(&style_datesetpage_sunddlist_extra_list_main_default, 3);
|
||||
lv_style_set_bg_opa(&style_datesetpage_sunddlist_extra_list_main_default, 255);
|
||||
lv_style_set_bg_color(&style_datesetpage_sunddlist_extra_list_main_default, lv_color_hex(0xffffff));
|
||||
lv_style_set_bg_grad_dir(&style_datesetpage_sunddlist_extra_list_main_default, LV_GRAD_DIR_NONE);
|
||||
lv_obj_add_style(lv_dropdown_get_list(ui->datesetpage_sunddlist), &style_datesetpage_sunddlist_extra_list_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
//Write style state: LV_STATE_DEFAULT for &style_datesetpage_sunddlist_extra_list_scrollbar_default
|
||||
static lv_style_t style_datesetpage_sunddlist_extra_list_scrollbar_default;
|
||||
ui_init_style(&style_datesetpage_sunddlist_extra_list_scrollbar_default);
|
||||
|
||||
lv_style_set_radius(&style_datesetpage_sunddlist_extra_list_scrollbar_default, 3);
|
||||
lv_style_set_bg_opa(&style_datesetpage_sunddlist_extra_list_scrollbar_default, 255);
|
||||
lv_style_set_bg_color(&style_datesetpage_sunddlist_extra_list_scrollbar_default, lv_color_hex(0x00ff00));
|
||||
lv_style_set_bg_grad_dir(&style_datesetpage_sunddlist_extra_list_scrollbar_default, LV_GRAD_DIR_NONE);
|
||||
lv_obj_add_style(lv_dropdown_get_list(ui->datesetpage_sunddlist), &style_datesetpage_sunddlist_extra_list_scrollbar_default, LV_PART_SCROLLBAR|LV_STATE_DEFAULT);
|
||||
|
||||
//Write codes datesetpage_label_3
|
||||
ui->datesetpage_label_3 = lv_label_create(ui->datesetpage);
|
||||
//lv_label_set_text(ui->datesetpage_label_3, "Time ");
|
||||
lv_label_set_text(ui->datesetpage_label_3, Menu_List[GET_nvs_Sys_Info_language()][MENU_LIST_SetClockTime]);
|
||||
|
||||
lv_label_set_long_mode(ui->datesetpage_label_3, LV_LABEL_LONG_WRAP);
|
||||
lv_obj_set_pos(ui->datesetpage_label_3, 44, 280);
|
||||
lv_obj_set_size(ui->datesetpage_label_3, 180, 20);
|
||||
|
||||
//Write style for datesetpage_label_3, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
lv_obj_set_style_border_width(ui->datesetpage_label_3, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_radius(ui->datesetpage_label_3, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_color(ui->datesetpage_label_3, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui->datesetpage_label_3, &lv_font_albbhptR_20, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui->datesetpage_label_3, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_letter_space(ui->datesetpage_label_3, 2, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_line_space(ui->datesetpage_label_3, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_align(ui->datesetpage_label_3, LV_TEXT_ALIGN_LEFT, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_opa(ui->datesetpage_label_3, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_top(ui->datesetpage_label_3, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_right(ui->datesetpage_label_3, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_bottom(ui->datesetpage_label_3, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_left(ui->datesetpage_label_3, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_shadow_width(ui->datesetpage_label_3, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
//Write codes datesetpage_hourddlist
|
||||
ui->datesetpage_hourddlist = lv_dropdown_create(ui->datesetpage);
|
||||
lv_dropdown_set_options(ui->datesetpage_hourddlist, "00\n01\n02\n03\n04\n05\n06\n07\n08\n09\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23");
|
||||
lv_obj_set_pos(ui->datesetpage_hourddlist, 39, 310);
|
||||
lv_obj_set_size(ui->datesetpage_hourddlist, 120, 35);
|
||||
//timeinfo.tm_hour 0~23
|
||||
lv_dropdown_set_selected(ui->datesetpage_hourddlist,timeinfo.tm_hour);
|
||||
|
||||
//Write style for datesetpage_hourddlist, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
lv_obj_set_style_text_color(ui->datesetpage_hourddlist, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui->datesetpage_hourddlist, &lv_font_albbhptR_20, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui->datesetpage_hourddlist, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_border_width(ui->datesetpage_hourddlist, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_top(ui->datesetpage_hourddlist, 8, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_left(ui->datesetpage_hourddlist, 6, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_right(ui->datesetpage_hourddlist, 6, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_radius(ui->datesetpage_hourddlist, 10, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_opa(ui->datesetpage_hourddlist, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_color(ui->datesetpage_hourddlist, lv_color_hex(0x00A8FF), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_dir(ui->datesetpage_hourddlist, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_shadow_width(ui->datesetpage_hourddlist, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
//Write style state: LV_STATE_CHECKED for &style_datesetpage_hourddlist_extra_list_selected_checked
|
||||
static lv_style_t style_datesetpage_hourddlist_extra_list_selected_checked;
|
||||
ui_init_style(&style_datesetpage_hourddlist_extra_list_selected_checked);
|
||||
|
||||
lv_style_set_border_width(&style_datesetpage_hourddlist_extra_list_selected_checked, 1);
|
||||
lv_style_set_border_opa(&style_datesetpage_hourddlist_extra_list_selected_checked, 255);
|
||||
lv_style_set_border_color(&style_datesetpage_hourddlist_extra_list_selected_checked, lv_color_hex(0xe1e6ee));
|
||||
lv_style_set_border_side(&style_datesetpage_hourddlist_extra_list_selected_checked, LV_BORDER_SIDE_FULL);
|
||||
lv_style_set_radius(&style_datesetpage_hourddlist_extra_list_selected_checked, 3);
|
||||
lv_style_set_bg_opa(&style_datesetpage_hourddlist_extra_list_selected_checked, 255);
|
||||
lv_style_set_bg_color(&style_datesetpage_hourddlist_extra_list_selected_checked, lv_color_hex(0x00a1b5));
|
||||
lv_style_set_bg_grad_dir(&style_datesetpage_hourddlist_extra_list_selected_checked, LV_GRAD_DIR_NONE);
|
||||
lv_obj_add_style(lv_dropdown_get_list(ui->datesetpage_hourddlist), &style_datesetpage_hourddlist_extra_list_selected_checked, LV_PART_SELECTED|LV_STATE_CHECKED);
|
||||
|
||||
//Write style state: LV_STATE_DEFAULT for &style_datesetpage_hourddlist_extra_list_main_default
|
||||
static lv_style_t style_datesetpage_hourddlist_extra_list_main_default;
|
||||
ui_init_style(&style_datesetpage_hourddlist_extra_list_main_default);
|
||||
|
||||
lv_style_set_max_height(&style_datesetpage_hourddlist_extra_list_main_default, 120);
|
||||
lv_style_set_text_color(&style_datesetpage_hourddlist_extra_list_main_default, lv_color_hex(0x0D3055));
|
||||
lv_style_set_text_font(&style_datesetpage_hourddlist_extra_list_main_default, &lv_font_albbhptR_20);
|
||||
lv_style_set_text_opa(&style_datesetpage_hourddlist_extra_list_main_default, 255);
|
||||
lv_style_set_border_width(&style_datesetpage_hourddlist_extra_list_main_default, 1);
|
||||
lv_style_set_border_opa(&style_datesetpage_hourddlist_extra_list_main_default, 255);
|
||||
lv_style_set_border_color(&style_datesetpage_hourddlist_extra_list_main_default, lv_color_hex(0xe1e6ee));
|
||||
lv_style_set_border_side(&style_datesetpage_hourddlist_extra_list_main_default, LV_BORDER_SIDE_FULL);
|
||||
lv_style_set_radius(&style_datesetpage_hourddlist_extra_list_main_default, 3);
|
||||
lv_style_set_bg_opa(&style_datesetpage_hourddlist_extra_list_main_default, 255);
|
||||
lv_style_set_bg_color(&style_datesetpage_hourddlist_extra_list_main_default, lv_color_hex(0xffffff));
|
||||
lv_style_set_bg_grad_dir(&style_datesetpage_hourddlist_extra_list_main_default, LV_GRAD_DIR_NONE);
|
||||
lv_obj_add_style(lv_dropdown_get_list(ui->datesetpage_hourddlist), &style_datesetpage_hourddlist_extra_list_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
//Write style state: LV_STATE_DEFAULT for &style_datesetpage_hourddlist_extra_list_scrollbar_default
|
||||
static lv_style_t style_datesetpage_hourddlist_extra_list_scrollbar_default;
|
||||
ui_init_style(&style_datesetpage_hourddlist_extra_list_scrollbar_default);
|
||||
|
||||
lv_style_set_radius(&style_datesetpage_hourddlist_extra_list_scrollbar_default, 3);
|
||||
lv_style_set_bg_opa(&style_datesetpage_hourddlist_extra_list_scrollbar_default, 255);
|
||||
lv_style_set_bg_color(&style_datesetpage_hourddlist_extra_list_scrollbar_default, lv_color_hex(0x00ff00));
|
||||
lv_style_set_bg_grad_dir(&style_datesetpage_hourddlist_extra_list_scrollbar_default, LV_GRAD_DIR_NONE);
|
||||
lv_obj_add_style(lv_dropdown_get_list(ui->datesetpage_hourddlist), &style_datesetpage_hourddlist_extra_list_scrollbar_default, LV_PART_SCROLLBAR|LV_STATE_DEFAULT);
|
||||
|
||||
//Write codes datesetpage_minuteddlist
|
||||
ui->datesetpage_minuteddlist = lv_dropdown_create(ui->datesetpage);
|
||||
lv_dropdown_set_options(ui->datesetpage_minuteddlist, "00\n01\n02\n03\n04\n05\n06\n07\n08\n09\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51\n52\n53\n54\n55\n56\n57\n58\n59");
|
||||
lv_obj_set_pos(ui->datesetpage_minuteddlist, 200, 310);
|
||||
lv_obj_set_size(ui->datesetpage_minuteddlist, 120, 35);
|
||||
//timeinfo.tm_min 0~59
|
||||
lv_dropdown_set_selected(ui->datesetpage_minuteddlist,timeinfo.tm_min);
|
||||
|
||||
//Write style for datesetpage_minuteddlist, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
lv_obj_set_style_text_color(ui->datesetpage_minuteddlist, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui->datesetpage_minuteddlist, &lv_font_albbhptR_20, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui->datesetpage_minuteddlist, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_border_width(ui->datesetpage_minuteddlist, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_top(ui->datesetpage_minuteddlist, 8, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_left(ui->datesetpage_minuteddlist, 6, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_right(ui->datesetpage_minuteddlist, 6, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_radius(ui->datesetpage_minuteddlist, 10, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_opa(ui->datesetpage_minuteddlist, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_color(ui->datesetpage_minuteddlist, lv_color_hex(0x00A8FF), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_dir(ui->datesetpage_minuteddlist, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_shadow_width(ui->datesetpage_minuteddlist, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
//Write style state: LV_STATE_CHECKED for &style_datesetpage_minuteddlist_extra_list_selected_checked
|
||||
static lv_style_t style_datesetpage_minuteddlist_extra_list_selected_checked;
|
||||
ui_init_style(&style_datesetpage_minuteddlist_extra_list_selected_checked);
|
||||
|
||||
lv_style_set_border_width(&style_datesetpage_minuteddlist_extra_list_selected_checked, 1);
|
||||
lv_style_set_border_opa(&style_datesetpage_minuteddlist_extra_list_selected_checked, 255);
|
||||
lv_style_set_border_color(&style_datesetpage_minuteddlist_extra_list_selected_checked, lv_color_hex(0xe1e6ee));
|
||||
lv_style_set_border_side(&style_datesetpage_minuteddlist_extra_list_selected_checked, LV_BORDER_SIDE_FULL);
|
||||
lv_style_set_radius(&style_datesetpage_minuteddlist_extra_list_selected_checked, 3);
|
||||
lv_style_set_bg_opa(&style_datesetpage_minuteddlist_extra_list_selected_checked, 255);
|
||||
lv_style_set_bg_color(&style_datesetpage_minuteddlist_extra_list_selected_checked, lv_color_hex(0x00a1b5));
|
||||
lv_style_set_bg_grad_dir(&style_datesetpage_minuteddlist_extra_list_selected_checked, LV_GRAD_DIR_NONE);
|
||||
lv_obj_add_style(lv_dropdown_get_list(ui->datesetpage_minuteddlist), &style_datesetpage_minuteddlist_extra_list_selected_checked, LV_PART_SELECTED|LV_STATE_CHECKED);
|
||||
|
||||
//Write style state: LV_STATE_DEFAULT for &style_datesetpage_minuteddlist_extra_list_main_default
|
||||
static lv_style_t style_datesetpage_minuteddlist_extra_list_main_default;
|
||||
ui_init_style(&style_datesetpage_minuteddlist_extra_list_main_default);
|
||||
|
||||
lv_style_set_max_height(&style_datesetpage_minuteddlist_extra_list_main_default, 120);
|
||||
lv_style_set_text_color(&style_datesetpage_minuteddlist_extra_list_main_default, lv_color_hex(0x0D3055));
|
||||
lv_style_set_text_font(&style_datesetpage_minuteddlist_extra_list_main_default, &lv_font_albbhptR_20);
|
||||
lv_style_set_text_opa(&style_datesetpage_minuteddlist_extra_list_main_default, 255);
|
||||
lv_style_set_border_width(&style_datesetpage_minuteddlist_extra_list_main_default, 1);
|
||||
lv_style_set_border_opa(&style_datesetpage_minuteddlist_extra_list_main_default, 255);
|
||||
lv_style_set_border_color(&style_datesetpage_minuteddlist_extra_list_main_default, lv_color_hex(0xe1e6ee));
|
||||
lv_style_set_border_side(&style_datesetpage_minuteddlist_extra_list_main_default, LV_BORDER_SIDE_FULL);
|
||||
lv_style_set_radius(&style_datesetpage_minuteddlist_extra_list_main_default, 3);
|
||||
lv_style_set_bg_opa(&style_datesetpage_minuteddlist_extra_list_main_default, 255);
|
||||
lv_style_set_bg_color(&style_datesetpage_minuteddlist_extra_list_main_default, lv_color_hex(0xffffff));
|
||||
lv_style_set_bg_grad_dir(&style_datesetpage_minuteddlist_extra_list_main_default, LV_GRAD_DIR_NONE);
|
||||
lv_obj_add_style(lv_dropdown_get_list(ui->datesetpage_minuteddlist), &style_datesetpage_minuteddlist_extra_list_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
//Write style state: LV_STATE_DEFAULT for &style_datesetpage_minuteddlist_extra_list_scrollbar_default
|
||||
static lv_style_t style_datesetpage_minuteddlist_extra_list_scrollbar_default;
|
||||
ui_init_style(&style_datesetpage_minuteddlist_extra_list_scrollbar_default);
|
||||
|
||||
lv_style_set_radius(&style_datesetpage_minuteddlist_extra_list_scrollbar_default, 3);
|
||||
lv_style_set_bg_opa(&style_datesetpage_minuteddlist_extra_list_scrollbar_default, 255);
|
||||
lv_style_set_bg_color(&style_datesetpage_minuteddlist_extra_list_scrollbar_default, lv_color_hex(0x00ff00));
|
||||
lv_style_set_bg_grad_dir(&style_datesetpage_minuteddlist_extra_list_scrollbar_default, LV_GRAD_DIR_NONE);
|
||||
lv_obj_add_style(lv_dropdown_get_list(ui->datesetpage_minuteddlist), &style_datesetpage_minuteddlist_extra_list_scrollbar_default, LV_PART_SCROLLBAR|LV_STATE_DEFAULT);
|
||||
|
||||
//Write codes datesetpage_changebtn
|
||||
ui->datesetpage_changebtn = lv_btn_create(ui->datesetpage);
|
||||
ui->datesetpage_changebtn_label = lv_label_create(ui->datesetpage_changebtn);
|
||||
//lv_label_set_text(ui->datesetpage_changebtn_label, "更改");
|
||||
lv_label_set_text(ui->datesetpage_changebtn_label,Menu_List[GET_nvs_Sys_Info_language()][MENU_LIST_SetClockChange]);
|
||||
lv_label_set_long_mode(ui->datesetpage_changebtn_label, LV_LABEL_LONG_WRAP);
|
||||
lv_obj_align(ui->datesetpage_changebtn_label, LV_ALIGN_CENTER, 0, 0);
|
||||
lv_obj_set_style_pad_all(ui->datesetpage_changebtn, 0, LV_STATE_DEFAULT);
|
||||
lv_obj_set_width(ui->datesetpage_changebtn_label, LV_PCT(100));
|
||||
lv_obj_set_pos(ui->datesetpage_changebtn, 84, 402);
|
||||
lv_obj_set_size(ui->datesetpage_changebtn, 119, 48);
|
||||
|
||||
//Write style for datesetpage_changebtn, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
lv_obj_set_style_bg_opa(ui->datesetpage_changebtn, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_color(ui->datesetpage_changebtn, lv_color_hex(0x2195f6), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_dir(ui->datesetpage_changebtn, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_border_width(ui->datesetpage_changebtn, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_radius(ui->datesetpage_changebtn, 24, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_shadow_width(ui->datesetpage_changebtn, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_color(ui->datesetpage_changebtn, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui->datesetpage_changebtn, &lv_font_albbhptR_20, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui->datesetpage_changebtn, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_align(ui->datesetpage_changebtn, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
//Write style for datesetpage_changebtn, Part: LV_PART_MAIN, State: LV_STATE_PRESSED.
|
||||
lv_obj_set_style_bg_opa(ui->datesetpage_changebtn, 255, LV_PART_MAIN|LV_STATE_PRESSED);
|
||||
lv_obj_set_style_bg_color(ui->datesetpage_changebtn, lv_color_hex(0x1F3051), LV_PART_MAIN|LV_STATE_PRESSED);
|
||||
lv_obj_set_style_bg_grad_dir(ui->datesetpage_changebtn, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_PRESSED);
|
||||
lv_obj_set_style_border_width(ui->datesetpage_changebtn, 0, LV_PART_MAIN|LV_STATE_PRESSED);
|
||||
lv_obj_set_style_radius(ui->datesetpage_changebtn, 24, LV_PART_MAIN|LV_STATE_PRESSED);
|
||||
lv_obj_set_style_shadow_width(ui->datesetpage_changebtn, 0, LV_PART_MAIN|LV_STATE_PRESSED);
|
||||
lv_obj_set_style_text_color(ui->datesetpage_changebtn, lv_color_hex(0xa8a8a8), LV_PART_MAIN|LV_STATE_PRESSED);
|
||||
lv_obj_set_style_text_font(ui->datesetpage_changebtn, &lv_font_albbhptR_20, LV_PART_MAIN|LV_STATE_PRESSED);
|
||||
lv_obj_set_style_text_opa(ui->datesetpage_changebtn, 255, LV_PART_MAIN|LV_STATE_PRESSED);
|
||||
|
||||
//Write codes datesetpage_cancelbtn
|
||||
ui->datesetpage_cancelbtn = lv_btn_create(ui->datesetpage);
|
||||
ui->datesetpage_cancelbtn_label = lv_label_create(ui->datesetpage_cancelbtn);
|
||||
//lv_label_set_text(ui->datesetpage_cancelbtn_label, "取消");
|
||||
lv_label_set_text(ui->datesetpage_cancelbtn_label,Menu_List[GET_nvs_Sys_Info_language()][MENU_LIST_SetClockcancel]);
|
||||
lv_label_set_long_mode(ui->datesetpage_cancelbtn_label, LV_LABEL_LONG_WRAP);
|
||||
lv_obj_align(ui->datesetpage_cancelbtn_label, LV_ALIGN_CENTER, 0, 0);
|
||||
lv_obj_set_style_pad_all(ui->datesetpage_cancelbtn, 0, LV_STATE_DEFAULT);
|
||||
lv_obj_set_width(ui->datesetpage_cancelbtn_label, LV_PCT(100));
|
||||
lv_obj_set_pos(ui->datesetpage_cancelbtn, 289, 402);
|
||||
lv_obj_set_size(ui->datesetpage_cancelbtn, 119, 48);
|
||||
|
||||
//Write style for datesetpage_cancelbtn, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
lv_obj_set_style_bg_opa(ui->datesetpage_cancelbtn, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_color(ui->datesetpage_cancelbtn, lv_color_hex(0x2195f6), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_dir(ui->datesetpage_cancelbtn, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_border_width(ui->datesetpage_cancelbtn, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_radius(ui->datesetpage_cancelbtn, 24, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_shadow_width(ui->datesetpage_cancelbtn, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_color(ui->datesetpage_cancelbtn, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui->datesetpage_cancelbtn, &lv_font_albbhptR_20, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui->datesetpage_cancelbtn, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_align(ui->datesetpage_cancelbtn, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
//Write style for datesetpage_cancelbtn, Part: LV_PART_MAIN, State: LV_STATE_PRESSED.
|
||||
lv_obj_set_style_bg_opa(ui->datesetpage_cancelbtn, 255, LV_PART_MAIN|LV_STATE_PRESSED);
|
||||
lv_obj_set_style_bg_color(ui->datesetpage_cancelbtn, lv_color_hex(0x1F3051), LV_PART_MAIN|LV_STATE_PRESSED);
|
||||
lv_obj_set_style_bg_grad_dir(ui->datesetpage_cancelbtn, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_PRESSED);
|
||||
lv_obj_set_style_border_width(ui->datesetpage_cancelbtn, 0, LV_PART_MAIN|LV_STATE_PRESSED);
|
||||
lv_obj_set_style_radius(ui->datesetpage_cancelbtn, 24, LV_PART_MAIN|LV_STATE_PRESSED);
|
||||
lv_obj_set_style_shadow_width(ui->datesetpage_cancelbtn, 0, LV_PART_MAIN|LV_STATE_PRESSED);
|
||||
lv_obj_set_style_text_color(ui->datesetpage_cancelbtn, lv_color_hex(0xa8a8a8), LV_PART_MAIN|LV_STATE_PRESSED);
|
||||
lv_obj_set_style_text_font(ui->datesetpage_cancelbtn, &lv_font_albbhptR_20, LV_PART_MAIN|LV_STATE_PRESSED);
|
||||
lv_obj_set_style_text_opa(ui->datesetpage_cancelbtn, 255, LV_PART_MAIN|LV_STATE_PRESSED);
|
||||
|
||||
//The custom code of datesetpage.
|
||||
|
||||
|
||||
//Update current screen layout.
|
||||
lv_obj_update_layout(ui->datesetpage);
|
||||
|
||||
//Init events for screen.
|
||||
events_init_datesetpage(ui);
|
||||
}
|
||||
@@ -976,6 +976,59 @@ void setup_scr_scene(lv_ui *ui)
|
||||
lv_img_set_src(ui->scene_scenes_page_icon, LVGL_PATH(page_sw1_42x22.png));
|
||||
}
|
||||
//The custom code of scene.
|
||||
//Write codes scene_alarmtimecont
|
||||
ui->scene_alarmtimecont = lv_obj_create(ui->scene);
|
||||
lv_obj_set_pos(ui->scene_alarmtimecont, 115, 340);
|
||||
lv_obj_set_size(ui->scene_alarmtimecont, 250, 36);
|
||||
lv_obj_set_scrollbar_mode(ui->scene_alarmtimecont, LV_SCROLLBAR_MODE_OFF);
|
||||
|
||||
//Write style for scene_alarmtimecont, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
lv_obj_set_style_border_width(ui->scene_alarmtimecont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_radius(ui->scene_alarmtimecont, 10, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_opa(ui->scene_alarmtimecont, 170, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_color(ui->scene_alarmtimecont, lv_color_hex(0x00A8FF), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_dir(ui->scene_alarmtimecont, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_top(ui->scene_alarmtimecont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_bottom(ui->scene_alarmtimecont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_left(ui->scene_alarmtimecont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_right(ui->scene_alarmtimecont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_shadow_width(ui->scene_alarmtimecont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
//Write codes scene_img_13
|
||||
ui->scene_img_13 = lv_img_create(ui->scene_alarmtimecont);
|
||||
lv_obj_add_flag(ui->scene_img_13, LV_OBJ_FLAG_CLICKABLE);
|
||||
lv_img_set_src(ui->scene_img_13, LVGL_PATH(alarmtime.png));
|
||||
lv_img_set_pivot(ui->scene_img_13, 50,50);
|
||||
lv_img_set_angle(ui->scene_img_13, 0);
|
||||
lv_obj_set_pos(ui->scene_img_13, 6, 4);
|
||||
lv_obj_set_size(ui->scene_img_13, 28, 28);
|
||||
|
||||
//Write style for scene_img_13, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
lv_obj_set_style_img_opa(ui->scene_img_13, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
//Write codes scene_label_12
|
||||
ui->scene_label_12 = lv_label_create(ui->scene_alarmtimecont);
|
||||
//lv_label_set_text(ui->scene_label_12, "The currt time may be wrong, \nyou need to set the time manually.");
|
||||
lv_label_set_text(ui->scene_label_12,Menu_List[GET_nvs_Sys_Info_language()][MENU_LIST_power_date_alarm]);
|
||||
lv_label_set_long_mode(ui->scene_label_12, LV_LABEL_LONG_WRAP);
|
||||
lv_obj_set_pos(ui->scene_label_12, 38, 6);
|
||||
lv_obj_set_size(ui->scene_label_12, 210, 28);
|
||||
|
||||
//Write style for scene_label_12, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
lv_obj_set_style_border_width(ui->scene_label_12, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_radius(ui->scene_label_12, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_color(ui->scene_label_12, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui->scene_label_12, &lv_font_albbhptR_12, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui->scene_label_12, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_letter_space(ui->scene_label_12, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_line_space(ui->scene_label_12, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_align(ui->scene_label_12, LV_TEXT_ALIGN_LEFT, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_opa(ui->scene_label_12, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_top(ui->scene_label_12, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_right(ui->scene_label_12, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_bottom(ui->scene_label_12, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_left(ui->scene_label_12, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_shadow_width(ui->scene_label_12, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
//Update current screen layout.
|
||||
lv_obj_update_layout(ui->scene);
|
||||
|
||||
Binary file not shown.
@@ -15,7 +15,6 @@
|
||||
#include "custom.h"
|
||||
|
||||
|
||||
|
||||
void setup_scr_setting(lv_ui *ui)
|
||||
{
|
||||
//Write codes setting
|
||||
@@ -65,18 +64,13 @@ void setup_scr_setting(lv_ui *ui)
|
||||
//Write codes setting_cont_1
|
||||
ui->setting_cont_1 = lv_obj_create(ui->setting);
|
||||
lv_obj_set_pos(ui->setting_cont_1, 15, 76);
|
||||
lv_obj_set_size(ui->setting_cont_1, 447, 320);
|
||||
lv_obj_set_size(ui->setting_cont_1, 447, 340);
|
||||
lv_obj_set_scrollbar_mode(ui->setting_cont_1, LV_SCROLLBAR_MODE_OFF);
|
||||
|
||||
//Write style for setting_cont_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
lv_obj_set_style_border_width(ui->setting_cont_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_radius(ui->setting_cont_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_opa(ui->setting_cont_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_color(ui->setting_cont_1, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_dir(ui->setting_cont_1, LV_GRAD_DIR_VER, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_color(ui->setting_cont_1, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_main_stop(ui->setting_cont_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_stop(ui->setting_cont_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_top(ui->setting_cont_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_bottom(ui->setting_cont_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_left(ui->setting_cont_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
@@ -138,10 +132,10 @@ void setup_scr_setting(lv_ui *ui)
|
||||
//Write codes setting_mainfolabel_1
|
||||
ui->setting_mainfolabel_1 = lv_label_create(ui->setting_cont_1);
|
||||
//lv_label_set_text(ui->setting_mainfolabel_1, "Host");
|
||||
lv_label_set_text(ui->setting_mainfolabel_1,Menu_List[GET_nvs_Sys_Info_language()][MENU_LIST_SetHost]);
|
||||
lv_label_set_text(ui->setting_mainfolabel_1,Menu_List[GET_nvs_Sys_Info_language()][MENU_LIST_SetHost]);
|
||||
lv_label_set_long_mode(ui->setting_mainfolabel_1, LV_LABEL_LONG_DOT);
|
||||
lv_obj_set_pos(ui->setting_mainfolabel_1, 50, 17);
|
||||
lv_obj_set_size(ui->setting_mainfolabel_1, 150, 24);
|
||||
lv_obj_set_size(ui->setting_mainfolabel_1, 200, 24);
|
||||
|
||||
//Write style for setting_mainfolabel_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
lv_obj_set_style_border_width(ui->setting_mainfolabel_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
@@ -175,10 +169,10 @@ void setup_scr_setting(lv_ui *ui)
|
||||
lv_obj_set_style_border_width(ui->setting_mainfobtn_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_radius(ui->setting_mainfobtn_1, 10, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_shadow_width(ui->setting_mainfobtn_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
// lv_obj_set_style_text_color(ui->setting_mainfobtn_1, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
// lv_obj_set_style_text_font(ui->setting_mainfobtn_1, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
// lv_obj_set_style_text_opa(ui->setting_mainfobtn_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
// lv_obj_set_style_text_align(ui->setting_mainfobtn_1, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
//lv_obj_set_style_text_color(ui->setting_mainfobtn_1, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
//lv_obj_set_style_text_font(ui->setting_mainfobtn_1, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
//lv_obj_set_style_text_opa(ui->setting_mainfobtn_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
//lv_obj_set_style_text_align(ui->setting_mainfobtn_1, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
//Write codes setting_dispinfo
|
||||
ui->setting_dispinfo = lv_label_create(ui->setting_cont_1);
|
||||
@@ -226,7 +220,7 @@ void setup_scr_setting(lv_ui *ui)
|
||||
lv_img_set_src(ui->setting_dispinfoimg_2, LVGL_PATH(nextpagebg.png));
|
||||
lv_img_set_pivot(ui->setting_dispinfoimg_2, 0,0);
|
||||
lv_img_set_angle(ui->setting_dispinfoimg_2, 0);
|
||||
lv_obj_set_pos(ui->setting_dispinfoimg_2, 424, 61);
|
||||
lv_obj_set_pos(ui->setting_dispinfoimg_2, 424, 65);
|
||||
lv_obj_set_size(ui->setting_dispinfoimg_2, 14, 22);
|
||||
|
||||
//Write style for setting_dispinfoimg_2, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
@@ -235,11 +229,10 @@ void setup_scr_setting(lv_ui *ui)
|
||||
//Write codes setting_dispinfolabel_1
|
||||
ui->setting_dispinfolabel_1 = lv_label_create(ui->setting_cont_1);
|
||||
//lv_label_set_text(ui->setting_dispinfolabel_1, "Display");
|
||||
lv_label_set_text(ui->setting_dispinfolabel_1,Menu_List[GET_nvs_Sys_Info_language()][MENU_LIST_SetDisplay]);
|
||||
|
||||
lv_label_set_text(ui->setting_dispinfolabel_1,Menu_List[GET_nvs_Sys_Info_language()][MENU_LIST_SetDisplay]);
|
||||
lv_label_set_long_mode(ui->setting_dispinfolabel_1, LV_LABEL_LONG_DOT);
|
||||
lv_obj_set_pos(ui->setting_dispinfolabel_1, 50, 65);
|
||||
lv_obj_set_size(ui->setting_dispinfolabel_1, 150, 24);
|
||||
lv_obj_set_size(ui->setting_dispinfolabel_1, 200, 24);
|
||||
|
||||
//Write style for setting_dispinfolabel_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
lv_obj_set_style_border_width(ui->setting_dispinfolabel_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
@@ -273,16 +266,113 @@ void setup_scr_setting(lv_ui *ui)
|
||||
lv_obj_set_style_border_width(ui->setting_dispinfobtn_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_radius(ui->setting_dispinfobtn_1, 10, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_shadow_width(ui->setting_dispinfobtn_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
// lv_obj_set_style_text_color(ui->setting_dispinfobtn_1, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
// lv_obj_set_style_text_font(ui->setting_dispinfobtn_1, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
// lv_obj_set_style_text_opa(ui->setting_dispinfobtn_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
// lv_obj_set_style_text_align(ui->setting_dispinfobtn_1, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
//lv_obj_set_style_text_color(ui->setting_dispinfobtn_1, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
//lv_obj_set_style_text_font(ui->setting_dispinfobtn_1, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
//lv_obj_set_style_text_opa(ui->setting_dispinfobtn_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
//lv_obj_set_style_text_align(ui->setting_dispinfobtn_1, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
//Write codes setting_dateinfo
|
||||
ui->setting_dateinfo = lv_label_create(ui->setting_cont_1);
|
||||
lv_label_set_text(ui->setting_dateinfo, "");
|
||||
lv_label_set_long_mode(ui->setting_dateinfo, LV_LABEL_LONG_DOT);
|
||||
lv_obj_set_pos(ui->setting_dateinfo, 2, 98);
|
||||
lv_obj_set_size(ui->setting_dateinfo, 443, 46);
|
||||
|
||||
//Write style for setting_dateinfo, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
lv_obj_set_style_border_width(ui->setting_dateinfo, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_radius(ui->setting_dateinfo, 10, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_color(ui->setting_dateinfo, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui->setting_dateinfo, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui->setting_dateinfo, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_letter_space(ui->setting_dateinfo, 2, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_line_space(ui->setting_dateinfo, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_align(ui->setting_dateinfo, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_opa(ui->setting_dateinfo, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_color(ui->setting_dateinfo, lv_color_hex(0x212121), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_dir(ui->setting_dateinfo, LV_GRAD_DIR_VER, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_color(ui->setting_dateinfo, lv_color_hex(0x212121), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_main_stop(ui->setting_dateinfo, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_stop(ui->setting_dateinfo, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_top(ui->setting_dateinfo, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_right(ui->setting_dateinfo, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_bottom(ui->setting_dateinfo, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_left(ui->setting_dateinfo, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_shadow_width(ui->setting_dateinfo, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
//Write codes setting_dateinfoimg_1
|
||||
ui->setting_dateinfoimg_1 = lv_img_create(ui->setting_cont_1);
|
||||
lv_obj_add_flag(ui->setting_dateinfoimg_1, LV_OBJ_FLAG_CLICKABLE);
|
||||
lv_img_set_src(ui->setting_dateinfoimg_1, LVGL_PATH(setdate.png));
|
||||
lv_img_set_pivot(ui->setting_dateinfoimg_1, 0,0);
|
||||
lv_img_set_angle(ui->setting_dateinfoimg_1, 0);
|
||||
lv_obj_set_pos(ui->setting_dateinfoimg_1, 14, 106);
|
||||
lv_obj_set_size(ui->setting_dateinfoimg_1, 30, 30);
|
||||
|
||||
//Write style for setting_dateinfoimg_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
lv_obj_set_style_img_opa(ui->setting_dateinfoimg_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
//Write codes setting_dateinfoimg_2
|
||||
ui->setting_dateinfoimg_2 = lv_img_create(ui->setting_cont_1);
|
||||
lv_obj_add_flag(ui->setting_dateinfoimg_2, LV_OBJ_FLAG_CLICKABLE);
|
||||
lv_img_set_src(ui->setting_dateinfoimg_2, LVGL_PATH(nextpagebg.png));
|
||||
lv_img_set_pivot(ui->setting_dateinfoimg_2, 0,0);
|
||||
lv_img_set_angle(ui->setting_dateinfoimg_2, 0);
|
||||
lv_obj_set_pos(ui->setting_dateinfoimg_2, 424, 113);
|
||||
lv_obj_set_size(ui->setting_dateinfoimg_2, 14, 22);
|
||||
|
||||
//Write style for setting_dateinfoimg_2, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
lv_obj_set_style_img_opa(ui->setting_dateinfoimg_2, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
//Write codes setting_dateinfolabel_1
|
||||
ui->setting_dateinfolabel_1 = lv_label_create(ui->setting_cont_1);
|
||||
//lv_label_set_text(ui->setting_dateinfolabel_1, "Clock & time");
|
||||
lv_label_set_text(ui->setting_dateinfolabel_1,Menu_List[GET_nvs_Sys_Info_language()][MENU_LIST_SetClock]);
|
||||
lv_label_set_long_mode(ui->setting_dateinfolabel_1, LV_LABEL_LONG_DOT);
|
||||
lv_obj_set_pos(ui->setting_dateinfolabel_1, 50, 113);
|
||||
lv_obj_set_size(ui->setting_dateinfolabel_1, 200, 24);
|
||||
|
||||
//Write style for setting_dateinfolabel_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
lv_obj_set_style_border_width(ui->setting_dateinfolabel_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_radius(ui->setting_dateinfolabel_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_color(ui->setting_dateinfolabel_1, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui->setting_dateinfolabel_1, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui->setting_dateinfolabel_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_letter_space(ui->setting_dateinfolabel_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_line_space(ui->setting_dateinfolabel_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_align(ui->setting_dateinfolabel_1, LV_TEXT_ALIGN_LEFT, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_opa(ui->setting_dateinfolabel_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_top(ui->setting_dateinfolabel_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_right(ui->setting_dateinfolabel_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_bottom(ui->setting_dateinfolabel_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_left(ui->setting_dateinfolabel_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_shadow_width(ui->setting_dateinfolabel_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
//Write codes setting_dateinfobtn_1
|
||||
ui->setting_dateinfobtn_1 = lv_btn_create(ui->setting_cont_1);
|
||||
// ui->setting_dateinfobtn_1_label = lv_label_create(ui->setting_dateinfobtn_1);
|
||||
// lv_label_set_text(ui->setting_dateinfobtn_1_label, "");
|
||||
// lv_label_set_long_mode(ui->setting_dateinfobtn_1_label, LV_LABEL_LONG_WRAP);
|
||||
// lv_obj_align(ui->setting_dateinfobtn_1_label, LV_ALIGN_CENTER, 0, 0);
|
||||
lv_obj_set_style_pad_all(ui->setting_dateinfobtn_1, 0, LV_STATE_DEFAULT);
|
||||
// lv_obj_set_width(ui->setting_dateinfobtn_1_label, LV_PCT(100));
|
||||
lv_obj_set_pos(ui->setting_dateinfobtn_1, 15, 106);
|
||||
lv_obj_set_size(ui->setting_dateinfobtn_1, 420, 30);
|
||||
|
||||
//Write style for setting_dateinfobtn_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
lv_obj_set_style_bg_opa(ui->setting_dateinfobtn_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_border_width(ui->setting_dateinfobtn_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_radius(ui->setting_dateinfobtn_1, 10, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_shadow_width(ui->setting_dateinfobtn_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
// lv_obj_set_style_text_color(ui->setting_dateinfobtn_1, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
// lv_obj_set_style_text_font(ui->setting_dateinfobtn_1, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
// lv_obj_set_style_text_opa(ui->setting_dateinfobtn_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
// lv_obj_set_style_text_align(ui->setting_dateinfobtn_1, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
//Write codes setting_langinfo
|
||||
ui->setting_langinfo = lv_label_create(ui->setting_cont_1);
|
||||
lv_label_set_text(ui->setting_langinfo, "");
|
||||
lv_label_set_long_mode(ui->setting_langinfo, LV_LABEL_LONG_DOT);
|
||||
lv_obj_set_pos(ui->setting_langinfo, 2, 98);
|
||||
lv_obj_set_pos(ui->setting_langinfo, 2, 146);
|
||||
lv_obj_set_size(ui->setting_langinfo, 443, 46);
|
||||
|
||||
//Write style for setting_langinfo, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
@@ -312,7 +402,7 @@ void setup_scr_setting(lv_ui *ui)
|
||||
lv_img_set_src(ui->setting_langinfoimg_1, LVGL_PATH(langaugebg.png));
|
||||
lv_img_set_pivot(ui->setting_langinfoimg_1, 0,0);
|
||||
lv_img_set_angle(ui->setting_langinfoimg_1, 0);
|
||||
lv_obj_set_pos(ui->setting_langinfoimg_1, 14, 106);
|
||||
lv_obj_set_pos(ui->setting_langinfoimg_1, 14, 154);
|
||||
lv_obj_set_size(ui->setting_langinfoimg_1, 30, 30);
|
||||
|
||||
//Write style for setting_langinfoimg_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
@@ -324,7 +414,7 @@ void setup_scr_setting(lv_ui *ui)
|
||||
lv_img_set_src(ui->setting_langinfoimg_2, LVGL_PATH(nextpagebg.png));
|
||||
lv_img_set_pivot(ui->setting_langinfoimg_2, 0,0);
|
||||
lv_img_set_angle(ui->setting_langinfoimg_2, 0);
|
||||
lv_obj_set_pos(ui->setting_langinfoimg_2, 424, 109);
|
||||
lv_obj_set_pos(ui->setting_langinfoimg_2, 424, 161);
|
||||
lv_obj_set_size(ui->setting_langinfoimg_2, 14, 22);
|
||||
|
||||
//Write style for setting_langinfoimg_2, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
@@ -333,10 +423,10 @@ void setup_scr_setting(lv_ui *ui)
|
||||
//Write codes setting_langinfolabel_1
|
||||
ui->setting_langinfolabel_1 = lv_label_create(ui->setting_cont_1);
|
||||
//lv_label_set_text(ui->setting_langinfolabel_1, "Language");
|
||||
lv_label_set_text(ui->setting_langinfolabel_1,Menu_List[GET_nvs_Sys_Info_language()][MENU_LIST_SetLanguange]);
|
||||
lv_label_set_text(ui->setting_langinfolabel_1,Menu_List[GET_nvs_Sys_Info_language()][MENU_LIST_SetLanguange]);
|
||||
lv_label_set_long_mode(ui->setting_langinfolabel_1, LV_LABEL_LONG_DOT);
|
||||
lv_obj_set_pos(ui->setting_langinfolabel_1, 50, 113);
|
||||
lv_obj_set_size(ui->setting_langinfolabel_1, 150, 24);
|
||||
lv_obj_set_pos(ui->setting_langinfolabel_1, 50, 161);
|
||||
lv_obj_set_size(ui->setting_langinfolabel_1, 200, 24);
|
||||
|
||||
//Write style for setting_langinfolabel_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
lv_obj_set_style_border_width(ui->setting_langinfolabel_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
@@ -362,7 +452,7 @@ void setup_scr_setting(lv_ui *ui)
|
||||
//lv_obj_align(ui->setting_langinfobtn_1_label, LV_ALIGN_CENTER, 0, 0);
|
||||
lv_obj_set_style_pad_all(ui->setting_langinfobtn_1, 0, LV_STATE_DEFAULT);
|
||||
//lv_obj_set_width(ui->setting_langinfobtn_1_label, LV_PCT(100));
|
||||
lv_obj_set_pos(ui->setting_langinfobtn_1, 15, 106);
|
||||
lv_obj_set_pos(ui->setting_langinfobtn_1, 15, 154);
|
||||
lv_obj_set_size(ui->setting_langinfobtn_1, 420, 30);
|
||||
|
||||
//Write style for setting_langinfobtn_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
@@ -379,7 +469,7 @@ void setup_scr_setting(lv_ui *ui)
|
||||
ui->setting_smartconfiginfo = lv_label_create(ui->setting_cont_1);
|
||||
lv_label_set_text(ui->setting_smartconfiginfo, "");
|
||||
lv_label_set_long_mode(ui->setting_smartconfiginfo, LV_LABEL_LONG_DOT);
|
||||
lv_obj_set_pos(ui->setting_smartconfiginfo, 2, 146);
|
||||
lv_obj_set_pos(ui->setting_smartconfiginfo, 2, 194);
|
||||
lv_obj_set_size(ui->setting_smartconfiginfo, 443, 46);
|
||||
|
||||
//Write style for setting_smartconfiginfo, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
@@ -409,7 +499,7 @@ void setup_scr_setting(lv_ui *ui)
|
||||
lv_img_set_src(ui->setting_smartconfiimg_1, LVGL_PATH(zigbeeinfo.png));
|
||||
lv_img_set_pivot(ui->setting_smartconfiimg_1, 0,0);
|
||||
lv_img_set_angle(ui->setting_smartconfiimg_1, 0);
|
||||
lv_obj_set_pos(ui->setting_smartconfiimg_1, 14, 154);
|
||||
lv_obj_set_pos(ui->setting_smartconfiimg_1, 14, 202);
|
||||
lv_obj_set_size(ui->setting_smartconfiimg_1, 30, 30);
|
||||
|
||||
//Write style for setting_smartconfiimg_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
@@ -421,7 +511,7 @@ void setup_scr_setting(lv_ui *ui)
|
||||
lv_img_set_src(ui->setting_smartconfiimg_2, LVGL_PATH(nextpagebg.png));
|
||||
lv_img_set_pivot(ui->setting_smartconfiimg_2, 0,0);
|
||||
lv_img_set_angle(ui->setting_smartconfiimg_2, 0);
|
||||
lv_obj_set_pos(ui->setting_smartconfiimg_2, 424, 157);
|
||||
lv_obj_set_pos(ui->setting_smartconfiimg_2, 424, 209);
|
||||
lv_obj_set_size(ui->setting_smartconfiimg_2, 14, 22);
|
||||
|
||||
//Write style for setting_smartconfiimg_2, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
@@ -430,10 +520,10 @@ void setup_scr_setting(lv_ui *ui)
|
||||
//Write codes setting_smartconfilabel_1
|
||||
ui->setting_smartconfilabel_1 = lv_label_create(ui->setting_cont_1);
|
||||
//lv_label_set_text(ui->setting_smartconfilabel_1, "Network");
|
||||
lv_label_set_text(ui->setting_smartconfilabel_1,Menu_List[GET_nvs_Sys_Info_language()][MENU_LIST_SetNetwork]);
|
||||
lv_label_set_text(ui->setting_smartconfilabel_1,Menu_List[GET_nvs_Sys_Info_language()][MENU_LIST_SetNetwork]);
|
||||
lv_label_set_long_mode(ui->setting_smartconfilabel_1, LV_LABEL_LONG_DOT);
|
||||
lv_obj_set_pos(ui->setting_smartconfilabel_1, 50, 161);
|
||||
lv_obj_set_size(ui->setting_smartconfilabel_1, 150, 24);
|
||||
lv_obj_set_pos(ui->setting_smartconfilabel_1, 50, 209);
|
||||
lv_obj_set_size(ui->setting_smartconfilabel_1, 200, 24);
|
||||
|
||||
//Write style for setting_smartconfilabel_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
lv_obj_set_style_border_width(ui->setting_smartconfilabel_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
@@ -459,7 +549,7 @@ void setup_scr_setting(lv_ui *ui)
|
||||
//lv_obj_align(ui->setting_smartconfibtn_1_label, LV_ALIGN_CENTER, 0, 0);
|
||||
lv_obj_set_style_pad_all(ui->setting_smartconfibtn_1, 0, LV_STATE_DEFAULT);
|
||||
//lv_obj_set_width(ui->setting_smartconfibtn_1_label, LV_PCT(100));
|
||||
lv_obj_set_pos(ui->setting_smartconfibtn_1, 15, 154);
|
||||
lv_obj_set_pos(ui->setting_smartconfibtn_1, 15, 202);
|
||||
lv_obj_set_size(ui->setting_smartconfibtn_1, 420, 30);
|
||||
|
||||
//Write style for setting_smartconfibtn_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
@@ -468,7 +558,7 @@ void setup_scr_setting(lv_ui *ui)
|
||||
lv_obj_set_style_radius(ui->setting_smartconfibtn_1, 10, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_shadow_width(ui->setting_smartconfibtn_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
// lv_obj_set_style_text_color(ui->setting_smartconfibtn_1, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
// lv_obj_set_style_text_font(ui->setting_smartconfibtn_1, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
// lv_obj_set_style_text_font(ui->setting_smartconfibtn_1, &lv_font_simsun_12, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
// lv_obj_set_style_text_opa(ui->setting_smartconfibtn_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
// lv_obj_set_style_text_align(ui->setting_smartconfibtn_1, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
@@ -476,7 +566,7 @@ void setup_scr_setting(lv_ui *ui)
|
||||
ui->setting_firstinfo = lv_label_create(ui->setting_cont_1);
|
||||
lv_label_set_text(ui->setting_firstinfo, "");
|
||||
lv_label_set_long_mode(ui->setting_firstinfo, LV_LABEL_LONG_DOT);
|
||||
lv_obj_set_pos(ui->setting_firstinfo, 2, 194);
|
||||
lv_obj_set_pos(ui->setting_firstinfo, 2, 242);
|
||||
lv_obj_set_size(ui->setting_firstinfo, 443, 46);
|
||||
|
||||
//Write style for setting_firstinfo, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
@@ -506,7 +596,7 @@ void setup_scr_setting(lv_ui *ui)
|
||||
lv_img_set_src(ui->setting_firstinfoimg_1, LVGL_PATH(setcj.png));
|
||||
lv_img_set_pivot(ui->setting_firstinfoimg_1, 0,0);
|
||||
lv_img_set_angle(ui->setting_firstinfoimg_1, 0);
|
||||
lv_obj_set_pos(ui->setting_firstinfoimg_1, 14, 202);
|
||||
lv_obj_set_pos(ui->setting_firstinfoimg_1, 14, 250);
|
||||
lv_obj_set_size(ui->setting_firstinfoimg_1, 30, 30);
|
||||
|
||||
//Write style for setting_firstinfoimg_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
@@ -518,7 +608,7 @@ void setup_scr_setting(lv_ui *ui)
|
||||
lv_img_set_src(ui->setting_firstinfoimg_2, LVGL_PATH(nextpagebg.png));
|
||||
lv_img_set_pivot(ui->setting_firstinfoimg_2, 0,0);
|
||||
lv_img_set_angle(ui->setting_firstinfoimg_2, 0);
|
||||
lv_obj_set_pos(ui->setting_firstinfoimg_2, 424, 205);
|
||||
lv_obj_set_pos(ui->setting_firstinfoimg_2, 424, 257);
|
||||
lv_obj_set_size(ui->setting_firstinfoimg_2, 14, 22);
|
||||
|
||||
//Write style for setting_firstinfoimg_2, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
@@ -527,10 +617,10 @@ void setup_scr_setting(lv_ui *ui)
|
||||
//Write codes setting_firstinfolabel_1
|
||||
ui->setting_firstinfolabel_1 = lv_label_create(ui->setting_cont_1);
|
||||
//lv_label_set_text(ui->setting_firstinfolabel_1, "First screen");
|
||||
lv_label_set_text(ui->setting_firstinfolabel_1, Menu_List[GET_nvs_Sys_Info_language()][MENU_LIST_SetFirstScreen]);
|
||||
lv_label_set_text(ui->setting_firstinfolabel_1, Menu_List[GET_nvs_Sys_Info_language()][MENU_LIST_SetFirstScreen]);
|
||||
lv_label_set_long_mode(ui->setting_firstinfolabel_1, LV_LABEL_LONG_DOT);
|
||||
lv_obj_set_pos(ui->setting_firstinfolabel_1, 50, 209);
|
||||
lv_obj_set_size(ui->setting_firstinfolabel_1, 150, 24);
|
||||
lv_obj_set_pos(ui->setting_firstinfolabel_1, 50, 257);
|
||||
lv_obj_set_size(ui->setting_firstinfolabel_1, 200, 24);
|
||||
|
||||
//Write style for setting_firstinfolabel_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
lv_obj_set_style_border_width(ui->setting_firstinfolabel_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
@@ -556,7 +646,7 @@ void setup_scr_setting(lv_ui *ui)
|
||||
//lv_obj_align(ui->setting_firstinfobtn_1_label, LV_ALIGN_CENTER, 0, 0);
|
||||
lv_obj_set_style_pad_all(ui->setting_firstinfobtn_1, 0, LV_STATE_DEFAULT);
|
||||
//lv_obj_set_width(ui->setting_firstinfobtn_1_label, LV_PCT(100));
|
||||
lv_obj_set_pos(ui->setting_firstinfobtn_1, 15, 202);
|
||||
lv_obj_set_pos(ui->setting_firstinfobtn_1, 15, 250);
|
||||
lv_obj_set_size(ui->setting_firstinfobtn_1, 420, 30);
|
||||
|
||||
//Write style for setting_firstinfobtn_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
@@ -564,23 +654,23 @@ void setup_scr_setting(lv_ui *ui)
|
||||
lv_obj_set_style_border_width(ui->setting_firstinfobtn_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_radius(ui->setting_firstinfobtn_1, 10, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_shadow_width(ui->setting_firstinfobtn_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
// lv_obj_set_style_text_color(ui->setting_firstinfobtn_1, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
// lv_obj_set_style_text_font(ui->setting_firstinfobtn_1, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
// lv_obj_set_style_text_opa(ui->setting_firstinfobtn_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
// lv_obj_set_style_text_align(ui->setting_firstinfobtn_1, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
//lv_obj_set_style_text_color(ui->setting_firstinfobtn_1, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
//lv_obj_set_style_text_font(ui->setting_firstinfobtn_1, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
//lv_obj_set_style_text_opa(ui->setting_firstinfobtn_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
//lv_obj_set_style_text_align(ui->setting_firstinfobtn_1, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
// //Write codes setting_relayinfo
|
||||
// ui->setting_relayinfo = lv_label_create(ui->setting_cont_1);
|
||||
// lv_label_set_text(ui->setting_relayinfo, "");
|
||||
// lv_label_set_long_mode(ui->setting_relayinfo, LV_LABEL_LONG_DOT);
|
||||
// lv_obj_set_pos(ui->setting_relayinfo, 2, 242);
|
||||
// lv_obj_set_pos(ui->setting_relayinfo, 2, 290);
|
||||
// lv_obj_set_size(ui->setting_relayinfo, 443, 46);
|
||||
|
||||
// //Write style for setting_relayinfo, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
// lv_obj_set_style_border_width(ui->setting_relayinfo, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
// lv_obj_set_style_radius(ui->setting_relayinfo, 10, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
// lv_obj_set_style_text_color(ui->setting_relayinfo, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
// lv_obj_set_style_text_font(ui->setting_relayinfo, &lv_font_DroidSansFallback_12, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
// lv_obj_set_style_text_font(ui->setting_relayinfo, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
// lv_obj_set_style_text_opa(ui->setting_relayinfo, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
// lv_obj_set_style_text_letter_space(ui->setting_relayinfo, 2, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
// lv_obj_set_style_text_line_space(ui->setting_relayinfo, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
@@ -600,10 +690,10 @@ void setup_scr_setting(lv_ui *ui)
|
||||
// //Write codes setting_relayinfoimg_1
|
||||
// ui->setting_relayinfoimg_1 = lv_img_create(ui->setting_cont_1);
|
||||
// lv_obj_add_flag(ui->setting_relayinfoimg_1, LV_OBJ_FLAG_CLICKABLE);
|
||||
// lv_img_set_src(ui->setting_relayinfoimg_1, LVGL_PATH(relay3icon.png));
|
||||
// lv_img_set_src(ui->setting_relayinfoimg_1, &_relay3icon_alpha_30x30);
|
||||
// lv_img_set_pivot(ui->setting_relayinfoimg_1, 0,0);
|
||||
// lv_img_set_angle(ui->setting_relayinfoimg_1, 0);
|
||||
// lv_obj_set_pos(ui->setting_relayinfoimg_1, 14, 250);
|
||||
// lv_obj_set_pos(ui->setting_relayinfoimg_1, 14, 298);
|
||||
// lv_obj_set_size(ui->setting_relayinfoimg_1, 30, 30);
|
||||
|
||||
// //Write style for setting_relayinfoimg_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
@@ -612,22 +702,21 @@ void setup_scr_setting(lv_ui *ui)
|
||||
// //Write codes setting_relayinfoimg_2
|
||||
// ui->setting_relayinfoimg_2 = lv_img_create(ui->setting_cont_1);
|
||||
// lv_obj_add_flag(ui->setting_relayinfoimg_2, LV_OBJ_FLAG_CLICKABLE);
|
||||
// lv_img_set_src(ui->setting_relayinfoimg_2, LVGL_PATH(nextpagebg.png));
|
||||
// lv_img_set_src(ui->setting_relayinfoimg_2, &_nextpagebg_alpha_15x20);
|
||||
// lv_img_set_pivot(ui->setting_relayinfoimg_2, 0,0);
|
||||
// lv_img_set_angle(ui->setting_relayinfoimg_2, 0);
|
||||
// lv_obj_set_pos(ui->setting_relayinfoimg_2, 424, 253);
|
||||
// lv_obj_set_size(ui->setting_relayinfoimg_2, 14, 22);
|
||||
// lv_obj_set_pos(ui->setting_relayinfoimg_2, 424, 305);
|
||||
// lv_obj_set_size(ui->setting_relayinfoimg_2, 15, 20);
|
||||
|
||||
// //Write style for setting_relayinfoimg_2, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
// lv_obj_set_style_img_opa(ui->setting_relayinfoimg_2, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
// //Write codes setting_relayinfolabel_1
|
||||
// ui->setting_relayinfolabel_1 = lv_label_create(ui->setting_cont_1);
|
||||
// //lv_label_set_text(ui->setting_relayinfolabel_1, "Relay select");
|
||||
// lv_label_set_text(ui->setting_relayinfolabel_1, Menu_List[GET_nvs_Sys_Info_language()][MENU_LIST_SetRelay]);
|
||||
// lv_label_set_text(ui->setting_relayinfolabel_1, "Relay select");
|
||||
// lv_label_set_long_mode(ui->setting_relayinfolabel_1, LV_LABEL_LONG_DOT);
|
||||
// lv_obj_set_pos(ui->setting_relayinfolabel_1, 50, 257);
|
||||
// lv_obj_set_size(ui->setting_relayinfolabel_1, 150, 24);
|
||||
// lv_obj_set_pos(ui->setting_relayinfolabel_1, 50, 305);
|
||||
// lv_obj_set_size(ui->setting_relayinfolabel_1, 200, 24);
|
||||
|
||||
// //Write style for setting_relayinfolabel_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
// lv_obj_set_style_border_width(ui->setting_relayinfolabel_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
@@ -647,13 +736,13 @@ void setup_scr_setting(lv_ui *ui)
|
||||
|
||||
// //Write codes setting_relayinfobtn_1
|
||||
// ui->setting_relayinfobtn_1 = lv_btn_create(ui->setting_cont_1);
|
||||
// //ui->setting_relayinfobtn_1_label = lv_label_create(ui->setting_relayinfobtn_1);
|
||||
// //lv_label_set_text(ui->setting_relayinfobtn_1_label, "");
|
||||
// //lv_label_set_long_mode(ui->setting_relayinfobtn_1_label, LV_LABEL_LONG_DOT);
|
||||
// //lv_obj_align(ui->setting_relayinfobtn_1_label, LV_ALIGN_CENTER, 0, 0);
|
||||
// ui->setting_relayinfobtn_1_label = lv_label_create(ui->setting_relayinfobtn_1);
|
||||
// lv_label_set_text(ui->setting_relayinfobtn_1_label, "");
|
||||
// lv_label_set_long_mode(ui->setting_relayinfobtn_1_label, LV_LABEL_LONG_WRAP);
|
||||
// lv_obj_align(ui->setting_relayinfobtn_1_label, LV_ALIGN_CENTER, 0, 0);
|
||||
// lv_obj_set_style_pad_all(ui->setting_relayinfobtn_1, 0, LV_STATE_DEFAULT);
|
||||
// //lv_obj_set_width(ui->setting_relayinfobtn_1_label, LV_PCT(100));
|
||||
// lv_obj_set_pos(ui->setting_relayinfobtn_1, 15, 250);
|
||||
// lv_obj_set_width(ui->setting_relayinfobtn_1_label, LV_PCT(100));
|
||||
// lv_obj_set_pos(ui->setting_relayinfobtn_1, 15, 298);
|
||||
// lv_obj_set_size(ui->setting_relayinfobtn_1, 420, 30);
|
||||
|
||||
// //Write style for setting_relayinfobtn_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
@@ -661,13 +750,13 @@ void setup_scr_setting(lv_ui *ui)
|
||||
// lv_obj_set_style_border_width(ui->setting_relayinfobtn_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
// lv_obj_set_style_radius(ui->setting_relayinfobtn_1, 10, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
// lv_obj_set_style_shadow_width(ui->setting_relayinfobtn_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
// // lv_obj_set_style_text_color(ui->setting_relayinfobtn_1, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
// // lv_obj_set_style_text_font(ui->setting_relayinfobtn_1, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
// // lv_obj_set_style_text_opa(ui->setting_relayinfobtn_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
// // lv_obj_set_style_text_align(ui->setting_relayinfobtn_1, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
// lv_obj_set_style_text_color(ui->setting_relayinfobtn_1, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
// lv_obj_set_style_text_font(ui->setting_relayinfobtn_1, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
// lv_obj_set_style_text_opa(ui->setting_relayinfobtn_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
// lv_obj_set_style_text_align(ui->setting_relayinfobtn_1, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
//The custom code of setting.
|
||||
|
||||
|
||||
#if defined(CONFIG_USER_RELAY_3)||defined(CONFIG_USER_RELAY_4)
|
||||
#endif
|
||||
//Update current screen layout.
|
||||
@@ -676,3 +765,4 @@ void setup_scr_setting(lv_ui *ui)
|
||||
//Init events for screen.
|
||||
events_init_setting(ui);
|
||||
}
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ void setup_scr_smartinfopage(lv_ui *ui)
|
||||
|
||||
lv_label_set_long_mode(ui->smartinfopage_label_1, LV_LABEL_LONG_DOT);
|
||||
lv_obj_set_pos(ui->smartinfopage_label_1, 46, 32);
|
||||
lv_obj_set_size(ui->smartinfopage_label_1, 200, 20);
|
||||
lv_obj_set_size(ui->smartinfopage_label_1, 300, 20);
|
||||
|
||||
//Write style for smartinfopage_label_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
lv_obj_set_style_border_width(ui->smartinfopage_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
@@ -388,6 +388,7 @@ void init_scr_del_flag(lv_ui *ui)
|
||||
ui->mianinfopage_del = true;
|
||||
ui->langinfopage_del = true;
|
||||
ui->displayinfopage_del = true;
|
||||
ui->dateinfopage_del = true;
|
||||
ui->smartinfopage_del = true;
|
||||
ui->firstinfopage_del = true;
|
||||
ui->relayinfopage_del = true;
|
||||
@@ -581,7 +582,22 @@ void gui_guider_init(void)
|
||||
custom_init(&guider_ui);//有custom_task任务调用初始化
|
||||
|
||||
zigbee_uart_int();
|
||||
// //setenv("TZ", "GMT-8", 1);
|
||||
// // tz_set(-8);//本地时间就是相对0时区的时间
|
||||
// if(GET_nvs_Sys_Info_autoupdatetime())//是否自动获时间
|
||||
// {
|
||||
// tz_set(0);//本地时间就是相对0时区的时间
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// tz_set(GET_nvs_Sys_Info_tzzone());
|
||||
// }
|
||||
|
||||
esp32Timeinit();
|
||||
|
||||
// SetTimeZone("UTC+00");
|
||||
// //setenv("TZ","UTC+0", 1);
|
||||
// tzset();
|
||||
#endif
|
||||
|
||||
////speech_uart_int();
|
||||
|
||||
@@ -121,6 +121,12 @@ typedef struct
|
||||
lv_obj_t *setting_dispinfolabel_1;
|
||||
lv_obj_t *setting_dispinfobtn_1;
|
||||
lv_obj_t *setting_dispinfobtn_1_label;
|
||||
lv_obj_t *setting_dateinfo;
|
||||
lv_obj_t *setting_dateinfoimg_1;
|
||||
lv_obj_t *setting_dateinfoimg_2;
|
||||
lv_obj_t *setting_dateinfolabel_1;
|
||||
lv_obj_t *setting_dateinfobtn_1;
|
||||
lv_obj_t *setting_dateinfobtn_1_label;
|
||||
lv_obj_t *setting_langinfo;
|
||||
lv_obj_t *setting_langinfoimg_1;
|
||||
lv_obj_t *setting_langinfoimg_2;
|
||||
@@ -169,6 +175,43 @@ typedef struct
|
||||
lv_obj_t *displayinfopage_autobrightsw_1;
|
||||
lv_obj_t *displayinfopage_autolocklabel;
|
||||
lv_obj_t *displayinfopage_autlockdlist_1;
|
||||
lv_obj_t *dateinfopage;
|
||||
bool dateinfopage_del;
|
||||
lv_obj_t *dateinfopage_returnbg;
|
||||
lv_obj_t *dateinfopage_retrunbtn;
|
||||
lv_obj_t *dateinfopage_retrunbtn_label;
|
||||
lv_obj_t *dateinfopage_sw_1;
|
||||
lv_obj_t *dateinfopage_label_2;
|
||||
lv_obj_t *dateinfopage_datecont;
|
||||
lv_obj_t *dateinfopage_img_2;
|
||||
lv_obj_t *dateinfopage_datelabel;
|
||||
lv_obj_t *dateinfopage_datetxtlabel;
|
||||
lv_obj_t *dateinfopage_datebtn;
|
||||
lv_obj_t *dateinfopage_datebtn_label;
|
||||
lv_obj_t *dateinfopage_timecont;
|
||||
lv_obj_t *dateinfopage_img_3;
|
||||
lv_obj_t *dateinfopage_timeclabel;
|
||||
lv_obj_t *dateinfopage_timetxtlabel;
|
||||
lv_obj_t *dateinfopage_timebtn;
|
||||
lv_obj_t *dateinfopage_timebtn_label;
|
||||
lv_obj_t *datesetpage;
|
||||
bool datesetpage_del;
|
||||
lv_obj_t *datesetpage_returnbg;
|
||||
lv_obj_t *datesetpage_retrunbtn;
|
||||
lv_obj_t *datesetpage_retrunbtn_label;
|
||||
lv_obj_t *datesetpage_label_1;
|
||||
lv_obj_t *datesetpage_zoneddlist;
|
||||
lv_obj_t *datesetpage_label_2;
|
||||
lv_obj_t *datesetpage_yearddlist;
|
||||
lv_obj_t *datesetpage_moonddlist;
|
||||
lv_obj_t *datesetpage_sunddlist;
|
||||
lv_obj_t *datesetpage_label_3;
|
||||
lv_obj_t *datesetpage_hourddlist;
|
||||
lv_obj_t *datesetpage_minuteddlist;
|
||||
lv_obj_t *datesetpage_changebtn;
|
||||
lv_obj_t *datesetpage_changebtn_label;
|
||||
lv_obj_t *datesetpage_cancelbtn;
|
||||
lv_obj_t *datesetpage_cancelbtn_label;
|
||||
lv_obj_t *langinfopage;
|
||||
bool langinfopage_del;
|
||||
lv_obj_t *langinfopage_returnbg;
|
||||
@@ -292,6 +335,9 @@ typedef struct
|
||||
lv_obj_t *scene_label_6;
|
||||
lv_obj_t *scene_btn_6;
|
||||
lv_obj_t *scene_btn_6_label;
|
||||
lv_obj_t *scene_alarmtimecont;
|
||||
lv_obj_t *scene_img_13;
|
||||
lv_obj_t *scene_label_12;
|
||||
lv_obj_t *onoff;
|
||||
bool onoff_del;
|
||||
lv_obj_t *onoff_common_cont;
|
||||
@@ -1384,6 +1430,8 @@ void setup_scr_setting(lv_ui *ui);
|
||||
void setup_scr_mianinfopage(lv_ui *ui);
|
||||
void setup_scr_langinfopage(lv_ui *ui);
|
||||
void setup_scr_displayinfopage(lv_ui *ui);
|
||||
void setup_scr_dateinfopage(lv_ui *ui);
|
||||
void setup_scr_datesetpage(lv_ui *ui);
|
||||
void setup_scr_smartinfopage(lv_ui *ui);
|
||||
void setup_scr_firstinfopage(lv_ui *ui);
|
||||
void setup_scr_relayinfopage(lv_ui *ui);
|
||||
@@ -1622,6 +1670,12 @@ LV_FONT_DECLARE(lv_font_albbhptR_30);
|
||||
|
||||
LV_FONT_DECLARE(lv_font_DroidSansFallback_60);
|
||||
LV_FONT_DECLARE(lv_font_albbhptR_100);
|
||||
|
||||
LV_FONT_DECLARE(lv_font_albbhptR_12);
|
||||
LV_FONT_DECLARE(lv_font_arial_12);
|
||||
LV_FONT_DECLARE(lv_font_arial_18);
|
||||
LV_FONT_DECLARE(lv_font_arial_20);
|
||||
LV_FONT_DECLARE(lv_font_albbhptR_20);
|
||||
// extern lv_font_t *lv_font_DroidSansFallback_12;
|
||||
// extern lv_font_t *lv_font_DroidSansFallback_14;
|
||||
// extern lv_font_t *lv_font_simsun_16;
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "zigbee.h"
|
||||
#include "zigbee_fun.h"
|
||||
#include "custom.h"
|
||||
#include <sys/time.h>
|
||||
|
||||
// static const char *TAG = "protocol";
|
||||
|
||||
@@ -3365,8 +3366,8 @@ void mcu_write_rtctime(unsigned char time[])
|
||||
time[0]~time[3]:standard time
|
||||
time[4]~time[7]: Local time
|
||||
*/
|
||||
unsigned int standardtime;
|
||||
unsigned int Localtime;
|
||||
long standardtime;
|
||||
long Localtime;
|
||||
standardtime=time[0];
|
||||
standardtime=standardtime<<8;
|
||||
standardtime|=time[1];
|
||||
@@ -3381,18 +3382,34 @@ void mcu_write_rtctime(unsigned char time[])
|
||||
Localtime|=time[6];
|
||||
Localtime=Localtime<<8;
|
||||
Localtime|=time[7];
|
||||
printf("standardtime:%d\r\n",standardtime);
|
||||
printf("Localtime:%d\r\n",Localtime);
|
||||
printf("standardtime:%ld\r\n",standardtime);
|
||||
printf("Localtime:%ld\r\n",Localtime);
|
||||
//确定时区
|
||||
//Localtime-standardtime/3600
|
||||
//=0是utc+0
|
||||
//<0是utc-
|
||||
//>0是utc+
|
||||
char zone=(char)((Localtime-standardtime)/3600);
|
||||
printf("zone:%d\r\n", zone);
|
||||
|
||||
struct timeval tv;
|
||||
//tv.tv_sec=(time_t)Localtime;//用本地时间 时区要设置0 相对0时区的时间
|
||||
|
||||
tz_set(zone);
|
||||
tv.tv_sec=(time_t)standardtime;//utc时间
|
||||
tv.tv_usec=0;
|
||||
// int settimeofday(const struct timeval *tv , const struct timezone *tz);
|
||||
//tz参数为时区 通常将参数tz设置为NULL,表示使用当前系统的时区
|
||||
//输入时间戳,通过settimeofday()函数来设置系统时间,这个函数设置的精度可以精确到微秒
|
||||
// tz_set(0);//本地时间就是相对0时区的时间
|
||||
settimeofday(&tv, NULL);//不用重新设置时区
|
||||
my_memcpy((void *)timestamp,(const char *)time,4); //get timestamp
|
||||
zigbee_timestamp_to_time();
|
||||
|
||||
SET_nvs_Sys_Info_tzzone(zone);
|
||||
nvs_eepom_sysInfo_update();
|
||||
//更新时区信息
|
||||
|
||||
struct timeval tv;
|
||||
tv.tv_sec=(time_t)standardtime;//用本地时间 不用处理时区了
|
||||
tv.tv_usec=0;
|
||||
// int settimeofday(const struct timeval *tv , const struct timezone *tz);
|
||||
//tz参数为时区 通常将参数tz设置为NULL,表示使用当前系统的时区
|
||||
//输入时间戳,通过settimeofday()函数来设置系统时间,这个函数设置的精度可以精确到微秒
|
||||
settimeofday(&tv, NULL);//不用重新设置时区
|
||||
my_memcpy((void *)timestamp,(const char *)time,4); //get timestamp
|
||||
zigbee_timestamp_to_time();
|
||||
/*
|
||||
year = _time.w_year; //year
|
||||
month = _time.w_month; //month
|
||||
@@ -3781,10 +3798,10 @@ void zigbee_net_work_state_event(unsigned char zigbee_work_state)
|
||||
break;
|
||||
|
||||
case ZIGBEE_JOIN_GATEWAY://已入网
|
||||
// if(GET_nvs_Sys_Info_autoupdatetime())//是否自动获取时间
|
||||
// {
|
||||
if(GET_nvs_Sys_Info_autoupdatetime())//是否自动获取时间
|
||||
{
|
||||
mcu_get_system_time();//入网后自动获取时间
|
||||
// }
|
||||
}
|
||||
|
||||
printf("protocol:net_work_state JOIN_GATEWAY\r\n");
|
||||
//ZIGEvent evt;
|
||||
@@ -3833,10 +3850,10 @@ void zigbee_work_state_event(unsigned char zigbee_work_state)
|
||||
break;
|
||||
|
||||
case ZIGBEE_JOIN_GATEWAY://已入网
|
||||
//if(GET_nvs_Sys_Info_autoupdatetime())//是否自动获取玩疯了时间
|
||||
//{
|
||||
if(GET_nvs_Sys_Info_autoupdatetime())//是否自动获取玩疯了时间
|
||||
{
|
||||
mcu_get_system_time();//入网后自动获取时间
|
||||
//}
|
||||
}
|
||||
|
||||
printf("protocol:work_state JOIN_GATEWAY\r\n");
|
||||
//ZIGEvent evt;
|
||||
|
||||
@@ -33,7 +33,7 @@ extern "C"
|
||||
|
||||
|
||||
///< mcu version
|
||||
#define MCU_VER "1.0.1" // MAX 3.3.15 BIT 7~0 XX.XX.XXXX 00~14
|
||||
#define MCU_VER "1.0.5" // MAX 3.3.15 BIT 7~0 XX.XX.XXXX 00~14
|
||||
|
||||
#define ZIGBEE_UART_QUEUE_LMT 768 // using to save data received from uart
|
||||
#define ZIGBEE_UART_RECV_BUF_LMT 256 //
|
||||
|
||||
@@ -171,12 +171,12 @@ static void nvs_eepom_sysInfo_factoryinfo(void)//出厂设置
|
||||
nvs_SysInfo.backlight=100;
|
||||
nvs_SysInfo.autobacklight=1;//自动亮度是否开启(功能改为屏保是否启用)
|
||||
|
||||
nvs_SysInfo.autoupdatetime=1;
|
||||
nvs_SysInfo.autoupdatetime=1;//默认开启自动更新
|
||||
nvs_SysInfo.autoScreentime=30;//默认30s
|
||||
|
||||
nvs_SysInfo.subdevice_array[3]=1; //默认显示场景开关4路
|
||||
|
||||
memcpy(nvs_SysInfo.tzzone,(const char *)"GMT-8",strlen((const char *)"GMT-8"));
|
||||
// memcpy(nvs_SysInfo.tzzone,(const char *)"GMT-8",strlen((const char *)"GMT-8"));
|
||||
}
|
||||
static void nvs_eepom_sysInfo_factory(void)//出厂设置
|
||||
{
|
||||
|
||||
@@ -123,7 +123,7 @@ typedef struct {
|
||||
// uint8_t debug;
|
||||
uint8_t language;//语言
|
||||
|
||||
uint8_t autoupdatetime;//是否自动更新时间
|
||||
uint8_t autoupdatetime;//是否自动更新时间 0手动 1自动
|
||||
|
||||
uint8_t backlight;//亮度
|
||||
uint8_t autobacklight;//是否自动亮度
|
||||
@@ -229,6 +229,8 @@ extern nvs_Sys_Info nvs_SysInfo;
|
||||
|
||||
#define SET_nvs_Sys_Info_autoupdatetime(val) (nvs_SysInfo.autoupdatetime=val)
|
||||
#define GET_nvs_Sys_Info_autoupdatetime() (nvs_SysInfo.autoupdatetime)
|
||||
#define SET_nvs_Sys_Info_tzzone(val) (nvs_SysInfo.tzzone[0]=val)
|
||||
#define GET_nvs_Sys_Info_tzzone() (nvs_SysInfo.tzzone[0])
|
||||
|
||||
#define SET_nvs_Sys_Info_backlight(val) (nvs_SysInfo.backlight=val)
|
||||
#define GET_nvs_Sys_Info_backlight() (nvs_SysInfo.backlight)
|
||||
|
||||
Binary file not shown.
@@ -131,11 +131,19 @@
|
||||
/*-------------
|
||||
* Others
|
||||
*-----------*/
|
||||
/*1: Show CPU usage and FPS count*/
|
||||
#define LV_USE_PERF_MONITOR 0
|
||||
#if LV_USE_PERF_MONITOR
|
||||
#define LV_USE_PERF_MONITOR_POS LV_ALIGN_BOTTOM_RIGHT
|
||||
#endif
|
||||
// /*1: Show CPU usage and FPS count*/
|
||||
// #define LV_USE_PERF_MONITOR 1
|
||||
// #if LV_USE_PERF_MONITOR
|
||||
// #define LV_USE_PERF_MONITOR_POS LV_ALIGN_BOTTOM_RIGHT
|
||||
// #endif
|
||||
|
||||
// /*1: Show the used memory and the memory fragmentation
|
||||
// * Requires LV_MEM_CUSTOM = 0*/
|
||||
// #define LV_USE_MEM_MONITOR 1
|
||||
// #if LV_USE_MEM_MONITOR
|
||||
// #define LV_USE_MEM_MONITOR_POS LV_ALIGN_BOTTOM_LEFT
|
||||
// #endif
|
||||
|
||||
/* 允许处理大字体或包含大量字符的字体
|
||||
* 限制取决于字体大小、字体和 bpp
|
||||
* 如果字体需要,将触发编译器错误 */
|
||||
|
||||
Binary file not shown.
BIN
t3e_pro标准版_v1.0.5.zip
Normal file
BIN
t3e_pro标准版_v1.0.5.zip
Normal file
Binary file not shown.
@@ -506,7 +506,7 @@ CONFIG_RT_IDLE_HOOK_LIST_SIZE=4
|
||||
CONFIG_IDLE_THREAD_STACK_SIZE=8192
|
||||
CONFIG_RT_USING_TIMER_SOFT=y
|
||||
CONFIG_RT_TIMER_THREAD_PRIO=4
|
||||
CONFIG_RT_TIMER_THREAD_STACK_SIZE=1024
|
||||
CONFIG_RT_TIMER_THREAD_STACK_SIZE=4096
|
||||
|
||||
#
|
||||
# kservice optimization
|
||||
@@ -550,7 +550,7 @@ CONFIG_RT_USING_HEAP=y
|
||||
# Kernel Device Object
|
||||
#
|
||||
CONFIG_RT_USING_DEVICE=y
|
||||
# CONFIG_RT_USING_DEVICE_OPS is not set
|
||||
CONFIG_RT_USING_DEVICE_OPS=y
|
||||
# CONFIG_RT_USING_INTERRUPT_INFO is not set
|
||||
CONFIG_RT_USING_CONSOLE=y
|
||||
CONFIG_RT_CONSOLEBUF_SIZE=128
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
"info": { // Header information about image
|
||||
"platform": "d12x",
|
||||
"product": "t3e-pro",
|
||||
"version": "1.0.4",
|
||||
"version": "1.0.5",
|
||||
"media": {
|
||||
"type": "spi-nor",
|
||||
"device_id": 0,
|
||||
|
||||
Binary file not shown.
@@ -15,7 +15,7 @@
|
||||
"info": { // Header information about image
|
||||
"platform": "d12x",
|
||||
"product": "t3e-pro",
|
||||
"version": "1.0.4",
|
||||
"version": "1.0.5",
|
||||
"media": {
|
||||
"type": "spi-nor",
|
||||
"device_id": 0,
|
||||
|
||||
8
tools/env/tools/ConEmu/ConEmu.xml
vendored
8
tools/env/tools/ConEmu/ConEmu.xml
vendored
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<key name="Software">
|
||||
<key name="ConEmu">
|
||||
<key name=".Vanilla" modified="2025-05-26 11:02:20" build="180206">
|
||||
<key name=".Vanilla" modified="2025-08-05 16:36:48" build="180206">
|
||||
<value name="StartType" type="hex" data="02"/>
|
||||
<value name="CmdLine" type="string" data=""/>
|
||||
<value name="StartTasksFile" type="string" data=""/>
|
||||
@@ -259,11 +259,11 @@
|
||||
<value name="Cascaded" type="hex" data="01"/>
|
||||
<value name="IntegralSize" type="hex" data="00"/>
|
||||
<value name="WindowMode" type="dword" data="0000051f"/>
|
||||
<value name="ConWnd X" type="long" data="763"/>
|
||||
<value name="ConWnd Y" type="long" data="347"/>
|
||||
<value name="ConWnd X" type="long" data="157"/>
|
||||
<value name="ConWnd Y" type="long" data="77"/>
|
||||
<value name="LastMonitor" type="string" data="0,0,1920,1040"/>
|
||||
<value name="ConWnd Width" type="dword" data="00000071"/>
|
||||
<value name="ConWnd Height" type="dword" data="0000001e"/>
|
||||
<value name="ConWnd Height" type="dword" data="00000027"/>
|
||||
<value name="16bit Height" type="ulong" data="0"/>
|
||||
<value name="StartCreateDelay" type="ulong" data="100"/>
|
||||
<value name="ExtendFonts" type="hex" data="00"/>
|
||||
|
||||
@@ -107,3 +107,38 @@ me
|
||||
me
|
||||
mc -j16
|
||||
me
|
||||
me
|
||||
me
|
||||
me
|
||||
me
|
||||
me
|
||||
me
|
||||
me
|
||||
me
|
||||
me
|
||||
me
|
||||
mc -j16
|
||||
me
|
||||
me
|
||||
me
|
||||
me
|
||||
me
|
||||
me
|
||||
me
|
||||
me
|
||||
me
|
||||
me
|
||||
me
|
||||
me
|
||||
me
|
||||
mc -j16
|
||||
me
|
||||
mc -j16
|
||||
me
|
||||
me
|
||||
me
|
||||
me
|
||||
me
|
||||
me
|
||||
bm
|
||||
me
|
||||
|
||||
Reference in New Issue
Block a user