static void ws_event_handler(lv_obj_t * obj, lv_event_t event)
{
static uint8_t ws_test;
if (event == LV_EVENT_VALUE_CHANGED)
{
lv_switch_get_state(obj)? (ws_test=1) : (ws_test=0);
if (!strcmp(obj->qmsd_id, "fulizi_ws"))
{
store_data.flz_ws = ws_test;
printf("input g flz\n");
}
else if (!strcmp(obj->qmsd_id, "jiashi_ws"))
{
store_data.js_ws = ws_test;
printf("input g jiashi\n");
}
else if (!strcmp(obj->qmsd_id, "chishi_ws"))
{
store_data.cs_ws = ws_test;
}
else if (!strcmp(obj->qmsd_id, "fengqu_ws"))
{
store_data.fq_ws = ws_test;
}
else if (!strcmp(obj->qmsd_id, "neixunhuan_ws"))
{
store_data.nxh_ws = ws_test;
}
else if (!strcmp(obj->qmsd_id, "hunfeng_ws"))
{
store_data.hf_ws = ws_test;
}
else{
}
START_STORE_TIME();
//printf("State: %s obj: %s\n", lv_switch_get_state(obj) ? "On" : "Off", obj->qmsd_id);
}
}
static void wind_choose_handler(lv_obj_t * obj, lv_event_t event)
{
if(event == LV_EVENT_SHORT_CLICKED) {
if(!strcmp(obj->qmsd_id,"wind3_choose"))
{
lv_img_set_src(wind3_choose, &img_face_choose);
lv_img_set_src(wind6_choose, &img_face_no_choose);
store_data.wind = 0;
}
else if(!strcmp(obj->qmsd_id,"wind6_choose"))
{
lv_img_set_src(wind6_choose, &img_face_choose);
lv_img_set_src(wind3_choose, &img_face_no_choose);
store_data.wind = 1;
}
else if(!strcmp(obj->qmsd_id,"dangfengji_choose"))
{
lv_img_set_src(dangfengji_choose, &img_face_choose);
lv_img_set_src(shuanfengji_choose, &img_face_no_choose);
store_data.motor = 0;
}
else if(!strcmp(obj->qmsd_id,"shuanfengji_choose"))
{
lv_img_set_src(shuanfengji_choose , &img_face_choose);
lv_img_set_src(dangfengji_choose, &img_face_no_choose);
store_data.motor = 1;
}
else{
printf("face choose error\n");
}
}
}
static void set_interface_context(void)
{
if(set_interface_mask) return;
set_interface_mask = lv_obj_create(screen_set, NULL);
lv_obj_set_style_local_bg_opa(set_interface_mask,LV_OBJ_PART_MAIN,LV_STATE_DEFAULT,LV_OPA_0);
lv_obj_set_pos(set_interface_mask,0,0);
lv_obj_set_size(set_interface_mask,480,480);
lv_obj_set_style_local_border_opa(set_interface_mask, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, LV_OPA_0);
lv_obj_move_background(set_interface_mask);
face_static_lable();
lv_obj_t *fulizi_ws = lv_switch_create(set_interface_mask, NULL);
lv_obj_set_style_local_bg_color(fulizi_ws,0,0,LV_COLOR_MAKE(0x78,0x78,0x80));
lv_obj_set_style_local_bg_color(fulizi_ws,1,0,LV_COLOR_MAKE(0x47,0x97,0xff));
lv_obj_set_style_local_border_width(fulizi_ws,0,0,0);
lv_obj_set_pos(fulizi_ws,408,69);
lv_obj_set_size(fulizi_ws,47,28);
qmsd_obj_set_id(fulizi_ws, "fulizi_ws");
store_data.flz_ws? lv_switch_on(fulizi_ws,LV_ANIM_OFF) : lv_switch_off(fulizi_ws,LV_ANIM_OFF) ;
lv_obj_set_event_cb(fulizi_ws, ws_event_handler);
lv_obj_t *jiashi_ws = lv_switch_create(set_interface_mask, NULL);
lv_obj_set_style_local_bg_color(jiashi_ws,0,0,LV_COLOR_MAKE(0x78,0x78,0x80));
lv_obj_set_style_local_bg_color(jiashi_ws,1,0,LV_COLOR_MAKE(0x47,0x97,0xff));
lv_obj_set_style_local_border_width(jiashi_ws,0,0,0);
lv_obj_set_pos(jiashi_ws,409,114);
lv_obj_set_size(jiashi_ws,47,28);
qmsd_obj_set_id(jiashi_ws, "jiashi_ws");
store_data.js_ws? lv_switch_on(jiashi_ws,LV_ANIM_OFF) : lv_switch_off(jiashi_ws,LV_ANIM_OFF) ;
lv_obj_set_event_cb(jiashi_ws, ws_event_handler);
lv_obj_t *chishi_ws = lv_switch_create(set_interface_mask, NULL);
lv_obj_set_style_local_bg_color(chishi_ws,0,0,LV_COLOR_MAKE(0x78,0x78,0x80));
lv_obj_set_style_local_bg_color(chishi_ws,1,0,LV_COLOR_MAKE(0x47,0x97,0xff));
lv_obj_set_style_local_border_width(chishi_ws,0,0,0);
lv_obj_set_pos(chishi_ws,409,159);
lv_obj_set_size(chishi_ws,47,28);
qmsd_obj_set_id(chishi_ws, "chishi_ws");
store_data.cs_ws ? lv_switch_on(chishi_ws,LV_ANIM_OFF) : lv_switch_off(chishi_ws,LV_ANIM_OFF) ;
lv_obj_set_event_cb(chishi_ws, ws_event_handler);
lv_obj_t *fengqu_ws = lv_switch_create(set_interface_mask, NULL);
lv_obj_set_style_local_bg_color(fengqu_ws,0,0,LV_COLOR_MAKE(0x78,0x78,0x80));
lv_obj_set_style_local_bg_color(fengqu_ws,1,0,LV_COLOR_MAKE(0x47,0x97,0xff));
lv_obj_set_style_local_border_width(fengqu_ws,0,0,0);
lv_obj_set_pos(fengqu_ws,409,204);
lv_obj_set_size(fengqu_ws,47,28);
qmsd_obj_set_id(fengqu_ws, "fengqu_ws");
store_data.fq_ws? lv_switch_on(fengqu_ws,LV_ANIM_OFF) : lv_switch_off(fengqu_ws,LV_ANIM_OFF) ;
lv_obj_set_event_cb(fengqu_ws, ws_event_handler);
lv_obj_t *neixunhuan_ws = lv_switch_create(set_interface_mask, NULL);
lv_obj_set_style_local_bg_color(neixunhuan_ws,0,0,LV_COLOR_MAKE(0x78,0x78,0x80));
lv_obj_set_style_local_bg_color(neixunhuan_ws,1,0,LV_COLOR_MAKE(0x47,0x97,0xff));
lv_obj_set_style_local_border_width(neixunhuan_ws,0,0,0);
lv_obj_set_pos(neixunhuan_ws,252,320);
lv_obj_set_size(neixunhuan_ws,47,28);
qmsd_obj_set_id(neixunhuan_ws, "neixunhuan_ws");
store_data.nxh_ws? lv_switch_on(neixunhuan_ws,LV_ANIM_OFF) : lv_switch_off(neixunhuan_ws,LV_ANIM_OFF) ;
lv_obj_set_event_cb(neixunhuan_ws, ws_event_handler);
lv_obj_t *hunfeng_ws = lv_switch_create(set_interface_mask, NULL);
lv_obj_set_style_local_bg_color(hunfeng_ws,0,0,LV_COLOR_MAKE(0x78,0x78,0x80));
lv_obj_set_style_local_bg_color(hunfeng_ws,1,0,LV_COLOR_MAKE(0x47,0x97,0xff));
lv_obj_set_style_local_border_width(hunfeng_ws,0,0,0);
lv_obj_set_pos(hunfeng_ws,413,320);
lv_obj_set_size(hunfeng_ws,47,28);
qmsd_obj_set_id(hunfeng_ws, "hunfeng_ws");
store_data.hf_ws? lv_switch_on(hunfeng_ws,LV_ANIM_OFF) : lv_switch_off(hunfeng_ws,LV_ANIM_OFF) ;
lv_obj_set_event_cb(hunfeng_ws, ws_event_handler);
wind3_choose = lv_img_create(set_interface_mask,NULL);
store_data.wind? lv_img_set_src(wind3_choose, &img_face_no_choose):lv_img_set_src(wind3_choose, &img_face_choose);
lv_obj_set_pos(wind3_choose,256,366);
lv_obj_set_click(wind3_choose,true);
qmsd_obj_set_id(wind3_choose,"wind3_choose");
lv_obj_set_ext_click_area(wind3_choose,20,20,15,20);
lv_obj_set_event_cb(wind3_choose, wind_choose_handler);
wind6_choose = lv_img_create(set_interface_mask,NULL);
store_data.wind? lv_img_set_src(wind6_choose, &img_face_choose):lv_img_set_src(wind6_choose, &img_face_no_choose);
lv_obj_set_pos(wind6_choose,416,366);
lv_obj_set_click(wind6_choose,true);
qmsd_obj_set_id(wind6_choose,"wind6_choose");
lv_obj_set_ext_click_area(wind6_choose,20,20,15,20);
lv_obj_set_event_cb(wind6_choose, wind_choose_handler);
dangfengji_choose = lv_img_create(set_interface_mask,NULL);
store_data.motor? lv_img_set_src(dangfengji_choose, &img_face_no_choose):lv_img_set_src(dangfengji_choose, &img_face_choose);
lv_obj_set_pos(dangfengji_choose,256,416);
lv_obj_set_click(dangfengji_choose,true);
lv_obj_set_ext_click_area(dangfengji_choose,20,20,15,20);
lv_obj_set_event_cb(dangfengji_choose, wind_choose_handler);
qmsd_obj_set_id(dangfengji_choose,"dangfengji_choose");
shuanfengji_choose = lv_img_create(set_interface_mask,NULL);
store_data.motor? lv_img_set_src(shuanfengji_choose, &img_face_choose):lv_img_set_src(shuanfengji_choose, &img_face_no_choose);
lv_obj_set_pos(shuanfengji_choose,416,416);
lv_obj_set_click(shuanfengji_choose,true);
lv_obj_set_ext_click_area(shuanfengji_choose,20,20,15,20);
lv_obj_set_event_cb(shuanfengji_choose, wind_choose_handler);
qmsd_obj_set_id(shuanfengji_choose,"shuanfengji_choose");
}
lv_obj_t* filter_ta;
lv_obj_t *filter_senyu_lable;
lv_obj_t *bar1;
static int16_t filter_time;
static void filter_kb_event_cb(lv_obj_t* keyboard, lv_event_t e)
{
lv_keyboard_def_event_cb(filter_kb, e);
if (e == LV_EVENT_CANCEL) {
lv_keyboard_set_textarea(filter_kb, NULL);
lv_obj_del(filter_kb);
filter_kb = NULL;
}
if(e == LV_EVENT_APPLY)
{
filter_time = atoi(lv_textarea_get_text(filter_ta));
if(filter_time>8000)
filter_time = 8000;
if(filter_time<0)
filter_time = 0;
printf("filter_kb_event_cb...filter_time:%d\n", filter_time);
sys_info.bar_lvwang = 1;
sys_info.lvwang_time = filter_time;
lv_label_set_text_fmt(filter_senyu_lable,"剩余%dh",filter_time);
lv_bar_set_range(bar1, 0, filter_time);
lv_bar_set_value(bar1, filter_time, LV_ANIM_OFF);
qmsd_storage_set_i16("set_screen","filter_time",filter_time);
qmsd_storage_set_i16("set_screen","cur_filter_time",filter_time);
}
}
static void filter_kb_create(void)
{
filter_kb = lv_keyboard_create(set_filter_mask, NULL);
lv_keyboard_set_cursor_manage(filter_kb, true);
lv_obj_set_pos(filter_kb,140,230);
lv_obj_set_size(filter_kb,320,180);
lv_keyboard_set_mode(filter_kb, LV_KEYBOARD_MODE_NUM);
lv_keyboard_set_textarea(filter_kb, filter_ta);
lv_obj_set_event_cb(filter_kb, filter_kb_event_cb);
}
static void filter_ta_event_cb(lv_obj_t* ta_local, lv_event_t e)
{
if (e == LV_EVENT_CLICKED && filter_kb == NULL) {
filter_kb_create();
}
}
static void filter_chang_event_handler(lv_obj_t * obj, lv_event_t event)
{
if(event == LV_EVENT_CLICKED) {
int16_t re_filter_time;
qmsd_storage_get_i16("set_screen", "filter_time", &re_filter_time);
qmsd_storage_set_i16("set_screen","cur_filter_time",re_filter_time);
lv_label_set_text_fmt(filter_senyu_lable,"剩余%dh",re_filter_time);
lv_bar_set_range(bar1, 0, re_filter_time);
lv_bar_set_value(bar1, re_filter_time, LV_ANIM_OFF);
printf("filter_chang_event_handler...lvwangfuwei...:%d\n", re_filter_time);
sys_info.bar_lvwang = 1;
sys_info.lvwang_time = re_filter_time;
}
}
static void set_filter_context(void)
{
if(set_filter_mask) return;
set_filter_mask = lv_obj_create(screen_set,NULL);
lv_obj_set_style_local_bg_opa(set_filter_mask, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, LV_OPA_0);
lv_obj_set_pos(set_filter_mask, 0, 0);
lv_obj_set_size(set_filter_mask, 480, 480);
lv_obj_set_style_local_border_opa(set_filter_mask, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, LV_OPA_0);
lv_obj_move_background(set_filter_mask);
lv_obj_t* filter_time_lable = lv_label_create(set_filter_mask,NULL);
set_lable_16_white(filter_time_lable,166,80,128,19,"滤网时间(小时)");
int16_t re_filter_time;
int16_t cur_filter_time;
esp_err_t err;
err = qmsd_storage_get_i16("set_screen","filter_time",&re_filter_time);
if(err == ESP_ERR_NVS_NOT_FOUND)
{
re_filter_time = 3000;
qmsd_storage_set_i16("set_screen","filter_time",re_filter_time);
}
err = qmsd_storage_get_i16("set_screen", "cur_filter_time", &cur_filter_time);
if(err == ESP_ERR_NVS_NOT_FOUND)
{
cur_filter_time = 3000;
qmsd_storage_set_i16("set_screen","cur_filter_time",cur_filter_time);
}
filter_senyu_lable = lv_label_create(set_filter_mask,NULL);
lv_obj_set_pos(filter_senyu_lable, 284, 111);
lv_obj_set_size(filter_senyu_lable, 67, 16);
lv_label_set_text_fmt(filter_senyu_lable, "剩余%dh",cur_filter_time);
lv_obj_set_style_local_text_font(filter_senyu_lable, 0, 0, &ali_font_14);
lv_obj_set_style_local_text_color(filter_senyu_lable, 0, 0, LV_COLOR_WHITE);
bar1 = lv_bar_create(set_filter_mask, NULL);
lv_obj_set_pos(bar1,166,143);
lv_obj_set_size(bar1, 280, 20);
lv_bar_set_range(bar1, 0, re_filter_time);
lv_bar_set_value(bar1, cur_filter_time, LV_ANIM_OFF);
lv_obj_set_style_local_bg_opa(bar1,LV_OBJ_PART_MAIN,LV_STATE_DEFAULT,LV_OPA_0);
lv_obj_set_style_local_border_color(bar1,0,0,LV_COLOR_MAKE(0x4f,0x97,0xff));
lv_obj_set_style_local_bg_color(bar1,1,0, LV_COLOR_MAKE(0x4f, 0x97, 0xff));
lv_obj_set_style_local_border_width(bar1,0,0,1);
filter_ta = lv_textarea_create(set_filter_mask, NULL);
lv_obj_set_size(filter_ta, 183, 40);
lv_obj_set_pos(filter_ta, 203, 180);
lv_obj_set_event_cb(filter_ta, filter_ta_event_cb);
lv_textarea_set_text(filter_ta, "");
lv_obj_set_style_local_text_font(filter_ta, 0, 0, &ali_font_20);
lv_textarea_set_accepted_chars(filter_ta,"1234567890");
lv_coord_t max_h = LV_VER_RES / 2 - LV_DPI / 8;
if (lv_obj_get_height(filter_ta) > max_h) lv_obj_set_height(filter_ta, max_h);
lv_obj_t * btn1 = lv_btn_create(set_filter_mask, NULL);
lv_obj_set_event_cb(btn1, filter_chang_event_handler);
lv_obj_align(btn1, filter_ta, LV_ALIGN_OUT_BOTTOM_MID, 0, 100);
lv_obj_set_size(btn1,148,40);
lv_obj_set_style_local_border_width(btn1,0,0,0);
lv_obj_set_style_local_bg_color(btn1, 0, 0, LV_COLOR_MAKE(0x4f, 0x97, 0xff));
lv_obj_t *label = lv_label_create(btn1, NULL);
lv_label_set_text(label, "滤网复位");
lv_obj_set_style_local_text_font(label, 0, 0, &ali_font_16);
}
lv_obj_t *temp_set_value;
lv_obj_t *temp_hold_value;
lv_obj_t *humi_set_value;
lv_obj_t *humi_hold_value;
uint8_t temp_set;
uint8_t temp_hold;
uint8_t humi_set;
uint8_t humi_hold;
static void th_set_handle(lv_obj_t * obj, lv_event_t event)
{
if(event == LV_EVENT_CLICKED) {
if(!strcmp(obj->qmsd_id,"set_temp_add"))
{
temp_set++;
if(temp_set >= 80){temp_set = 80;}
lv_label_set_text_fmt(temp_set_value,"%d %%",temp_set);
}
else if(!strcmp(obj->qmsd_id,"set_temp_sub"))
{
temp_set--;
if(temp_set <= 35){temp_set = 35;}
lv_label_set_text_fmt(temp_set_value,"%d %%",temp_set);
}
else if(!strcmp(obj->qmsd_id,"temp_hold_add_img"))
{
temp_hold++;
if(temp_hold >= 20){
temp_hold = 20;
}
lv_label_set_text_fmt(temp_hold_value,"%d %%",temp_hold);
}
else if(!strcmp(obj->qmsd_id,"temp_hold_sub_img"))
{
temp_hold--;
if(temp_hold == 255){
temp_hold = 0;
}
lv_label_set_text_fmt(temp_hold_value,"%d %%",temp_hold);
}
else if(!strcmp(obj->qmsd_id,"set_humi_add"))
{
humi_set++;
if(humi_set >= 30){humi_set = 30;}
lv_label_set_text_fmt(humi_set_value,"%d ℃",humi_set);
}
else if(!strcmp(obj->qmsd_id,"set_humi_sub"))
{
humi_set--;
if(humi_set <= 16){humi_set = 16;}
lv_label_set_text_fmt(humi_set_value,"%d ℃",humi_set);
}
else if(!strcmp(obj->qmsd_id,"humi_hold_add_img"))
{
humi_hold++;
if(humi_hold >= 8){
humi_hold = 8;
}
lv_label_set_text_fmt(humi_hold_value,"%d ℃",humi_hold);
}
else if(!strcmp(obj->qmsd_id,"humi_hold_sub_img"))
{
humi_hold--;
if(humi_hold == 255){
humi_hold = 0;
}
lv_label_set_text_fmt(humi_hold_value,"%d ℃",humi_hold);
}
}
}
static void set_th_context(void)
{
if(set_th_mask) return;
esp_err_t err;
err = qmsd_storage_get_u8("set_screen", "temp_set", &temp_set);
if(err == ESP_ERR_NVS_NOT_FOUND)
{
temp_set = 60;
qmsd_storage_set_u8("set_screen", "temp_set", temp_set);
}
err = qmsd_storage_get_u8("set_screen", "temp_hold", &temp_hold);
if(err == ESP_ERR_NVS_NOT_FOUND)
{
temp_hold = 15;
qmsd_storage_set_u8("set_screen", "temp_hold", temp_hold);
}
err = qmsd_storage_get_u8("set_screen", "humi_set", &humi_set);
if(err == ESP_ERR_NVS_NOT_FOUND)
{
humi_set = 20;
qmsd_storage_set_u8("set_screen", "humi_set", humi_set);
}
err = qmsd_storage_get_u8("set_screen", "humi_hold", &humi_hold);
if(err == ESP_ERR_NVS_NOT_FOUND)
{
humi_hold = 5;
qmsd_storage_set_u8("set_screen", "humi_hold", humi_hold);
}
set_th_mask = lv_obj_create(screen_set,NULL);
lv_obj_set_style_local_bg_opa(set_th_mask, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, LV_OPA_0);
lv_obj_set_pos(set_th_mask, 0, 0);
lv_obj_set_size(set_th_mask, 480, 480);
lv_obj_set_style_local_border_opa(set_th_mask, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, LV_OPA_0);
lv_obj_move_background(set_th_mask);
lv_obj_t* set_temp_mask = lv_obj_create(set_th_mask, NULL);
lv_obj_set_style_local_bg_opa(set_temp_mask, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, 15);
lv_obj_set_style_local_border_opa(set_temp_mask, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, LV_OPA_0);
lv_obj_set_pos(set_temp_mask, 144, 61);
lv_obj_set_size(set_temp_mask, 324, 184);
lv_obj_t* temp_bg_obj = lv_obj_create(set_temp_mask, NULL);
lv_obj_set_style_local_border_opa(temp_bg_obj, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, LV_OPA_0);
lv_obj_set_style_local_bg_color(temp_bg_obj, 0, 0, LV_COLOR_MAKE(0x4f, 0x97, 0xff));
lv_obj_set_style_local_radius(temp_bg_obj,0,0,4);
lv_obj_set_pos(temp_bg_obj, 78, 50);
lv_obj_set_size(temp_bg_obj, 167, 33);
lv_obj_t* temp_set_lable = lv_label_create(set_temp_mask,NULL);
set_lable_16_white(temp_set_lable,87,18,150,20,"湿度设定");
lv_obj_align(temp_set_lable,temp_bg_obj,LV_ALIGN_CENTER,0,-35);
temp_set_value = lv_label_create(temp_bg_obj, NULL);
set_lable_16_white(temp_set_value, 61, 8, 54, 22, "60%");
lv_label_set_text_fmt(temp_set_value,"%d%%",temp_set);
lv_obj_align(temp_set_value, temp_bg_obj, LV_ALIGN_CENTER, 0, 0);
lv_obj_t* temp_add_img = lv_img_create(set_temp_mask,NULL);
lv_obj_set_pos(temp_add_img, 19, 50);
lv_img_set_src(temp_add_img, &img_th_add);
lv_obj_set_click(temp_add_img,true);
qmsd_obj_set_id(temp_add_img,"set_temp_add");
lv_obj_set_event_cb(temp_add_img,th_set_handle);
lv_obj_t* temp_sub_img = lv_img_create(set_temp_mask, NULL);
lv_obj_set_pos(temp_sub_img, 255, 50);
lv_img_set_src(temp_sub_img, &img_th_sub);
lv_obj_set_click(temp_sub_img,true);
qmsd_obj_set_id(temp_sub_img,"set_temp_sub");
lv_obj_set_event_cb(temp_sub_img,th_set_handle);
lv_obj_t* temp_bg_hold = lv_obj_create(set_temp_mask, NULL);
lv_obj_set_style_local_border_opa(temp_bg_hold, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, LV_OPA_0);
lv_obj_set_style_local_bg_color(temp_bg_hold, 0, 0, LV_COLOR_MAKE(0x4f, 0x97, 0xff));
lv_obj_set_style_local_radius(temp_bg_hold,0,0,4);
lv_obj_set_pos(temp_bg_hold, 78, 137);
lv_obj_set_size(temp_bg_hold, 167, 33);
lv_obj_t* temp_hold_lable = lv_label_create(set_temp_mask, NULL);
set_lable_16_white(temp_hold_lable, 87, 105, 150, 20, "湿度阀值");
lv_obj_align(temp_hold_lable,temp_bg_hold,LV_ALIGN_CENTER,0,-35);
temp_hold_value = lv_label_create(temp_bg_hold, NULL);
set_lable_16_white(temp_hold_value, 61, 8, 54, 22, "15%");
lv_label_set_text_fmt(temp_hold_value,"%d%%",temp_hold);
lv_obj_align(temp_hold_value, temp_bg_hold, LV_ALIGN_CENTER, 0, 0);
lv_obj_t* temp_hold_add_img = lv_img_create(set_temp_mask,NULL);
lv_obj_align(temp_hold_add_img, temp_bg_hold, LV_ALIGN_OUT_LEFT_MID, 19, 5);
lv_img_set_src(temp_hold_add_img, &img_th_add);
lv_obj_set_click(temp_hold_add_img,true);
qmsd_obj_set_id(temp_hold_add_img,"temp_hold_add_img");
lv_obj_set_event_cb(temp_hold_add_img,th_set_handle);
lv_obj_t* temp_hold_sub_img = lv_img_create(set_temp_mask, NULL);
lv_obj_align(temp_hold_sub_img, temp_bg_hold, LV_ALIGN_OUT_RIGHT_MID, 8, 5);
lv_img_set_src(temp_hold_sub_img, &img_th_sub);
lv_obj_set_click(temp_hold_sub_img,true);
qmsd_obj_set_id(temp_hold_sub_img,"temp_hold_sub_img");
lv_obj_set_event_cb(temp_hold_sub_img,th_set_handle);
lv_obj_t* set_humi_mask = lv_obj_create(set_th_mask, NULL);
lv_obj_set_style_local_bg_opa(set_humi_mask, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, 15);
lv_obj_set_style_local_border_opa(set_humi_mask, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, LV_OPA_0);
lv_obj_set_pos(set_humi_mask, 144, 265);
lv_obj_set_size(set_humi_mask, 324, 184);
lv_obj_t* humi_bg_obj = lv_obj_create(set_humi_mask, NULL);
lv_obj_set_style_local_border_opa(humi_bg_obj, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, LV_OPA_0);
lv_obj_set_style_local_bg_color(humi_bg_obj, 0, 0, LV_COLOR_MAKE(0x4f, 0x97, 0xff));
lv_obj_set_style_local_radius(humi_bg_obj,0,0,4);
lv_obj_set_pos(humi_bg_obj, 78, 50);
lv_obj_set_size(humi_bg_obj, 167, 33);
lv_obj_t* humi_set_lable = lv_label_create(set_humi_mask,NULL);
set_lable_16_white(humi_set_lable,87,18,150,20,"温度设定");
lv_obj_align(humi_set_lable,humi_bg_obj,LV_ALIGN_CENTER,0,-35);
humi_set_value = lv_label_create(humi_bg_obj, NULL);
set_lable_16_white(humi_set_value, 61, 8, 54, 22, "20℃");
lv_label_set_text_fmt(humi_set_value,"%d℃",humi_set);
lv_obj_align(humi_set_value, humi_bg_obj, LV_ALIGN_CENTER, 0, 0);
lv_obj_t* humi_add_img = lv_img_create(set_humi_mask,NULL);
lv_obj_align(humi_add_img, humi_bg_obj, LV_ALIGN_OUT_LEFT_MID, 19, 5);
lv_img_set_src(humi_add_img, &img_th_add);
lv_obj_set_click(humi_add_img,true);
qmsd_obj_set_id(humi_add_img,"set_humi_add");
lv_obj_set_event_cb(humi_add_img,th_set_handle);
lv_obj_t* humi_sub_img = lv_img_create(set_humi_mask, NULL);
lv_obj_align(humi_sub_img, humi_bg_obj, LV_ALIGN_OUT_RIGHT_MID, 8, 5);
lv_img_set_src(humi_sub_img, &img_th_sub);
lv_obj_set_click(humi_sub_img,true);
qmsd_obj_set_id(humi_sub_img,"set_humi_sub");
lv_obj_set_event_cb(humi_sub_img,th_set_handle);
lv_obj_t* humi_bg_hold = lv_obj_create(set_humi_mask, NULL);
lv_obj_set_style_local_border_opa(humi_bg_hold, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, LV_OPA_0);
lv_obj_set_style_local_bg_color(humi_bg_hold, 0, 0, LV_COLOR_MAKE(0x4f, 0x97, 0xff));
lv_obj_set_style_local_radius(humi_bg_hold,0,0,4);
lv_obj_set_pos(humi_bg_hold, 78, 137);
lv_obj_set_size(humi_bg_hold, 167, 33);
lv_obj_t* humi_hold_lable = lv_label_create(set_humi_mask, NULL);
set_lable_16_white(humi_hold_lable, 87, 105, 150, 20, "温度阀值");
lv_obj_align(humi_hold_lable,humi_bg_hold,LV_ALIGN_CENTER,0,-35);
humi_hold_value = lv_label_create(humi_bg_hold, NULL);
set_lable_16_white(humi_hold_value, 61, 8, 54, 22, "5℃");
lv_label_set_text_fmt(humi_hold_value,"%d℃",humi_hold);
lv_obj_align(humi_hold_value, humi_bg_hold, LV_ALIGN_CENTER, 0, 0);
lv_obj_t* humi_hold_add_img = lv_img_create(set_humi_mask,NULL);
lv_obj_align(humi_hold_add_img, humi_bg_hold, LV_ALIGN_OUT_LEFT_MID, 19, 5);
lv_img_set_src(humi_hold_add_img, &img_th_add);
lv_obj_set_click(humi_hold_add_img,true);
qmsd_obj_set_id(humi_hold_add_img,"humi_hold_add_img");
lv_obj_set_event_cb(humi_hold_add_img,th_set_handle);
lv_obj_t* humi_hold_sub_img = lv_img_create(set_humi_mask, NULL);
lv_obj_align(humi_hold_sub_img, humi_bg_hold, LV_ALIGN_OUT_RIGHT_MID, 8, 5);
lv_img_set_src(humi_hold_sub_img, &img_th_sub);
lv_obj_set_click(humi_hold_sub_img,true);
qmsd_obj_set_id(humi_hold_sub_img,"humi_hold_sub_img");
lv_obj_set_event_cb(humi_hold_sub_img,th_set_handle);
// lv_obj_set_hidden(set_th_mask,true);
}
lv_obj_t *wifi_down_icon;
lv_obj_t *sys_add_icon;
lv_obj_t *sys_add_lable;
lv_obj_t *add_down_icon;
lv_obj_t *sys_icon;
lv_obj_t *sys_config_lable;
lv_obj_t *sys_cur_config_lable;
lv_obj_t *sys_down_icon;