Sonnensimulation auf Kern 0
This commit is contained in:
@@ -1,9 +1,10 @@
|
|||||||
SET(SOURCES ui_Screen1.c
|
SET(SOURCES ui_Screen1.c
|
||||||
ui_Screen2.c
|
|
||||||
ui_Screen3.c
|
ui_Screen3.c
|
||||||
ui_Screen4.c
|
ui_Screen4.c
|
||||||
ui_Screen5.c
|
ui_Screen5.c
|
||||||
ui_Screen6.c
|
ui_Screen6.c
|
||||||
|
ui_Screen7.c
|
||||||
|
ui_Screen2.c
|
||||||
ui.c
|
ui.c
|
||||||
ui_comp_hook.c
|
ui_comp_hook.c
|
||||||
ui_helpers.c
|
ui_helpers.c
|
||||||
@@ -13,8 +14,8 @@ SET(SOURCES ui_Screen1.c
|
|||||||
ui_img_light_png.c
|
ui_img_light_png.c
|
||||||
ui_img_fan_png.c
|
ui_img_fan_png.c
|
||||||
ui_img_settings_png.c
|
ui_img_settings_png.c
|
||||||
ui_img_up_png.c
|
|
||||||
ui_img_down_png.c
|
ui_img_down_png.c
|
||||||
|
ui_img_up_png.c
|
||||||
ui_img_home_png.c
|
ui_img_home_png.c
|
||||||
ui_img_wifi_png.c
|
ui_img_wifi_png.c
|
||||||
ui_temporary_image.c)
|
ui_temporary_image.c)
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
ui_Screen1.c
|
ui_Screen1.c
|
||||||
ui_Screen2.c
|
|
||||||
ui_Screen3.c
|
ui_Screen3.c
|
||||||
ui_Screen4.c
|
ui_Screen4.c
|
||||||
ui_Screen5.c
|
ui_Screen5.c
|
||||||
ui_Screen6.c
|
ui_Screen6.c
|
||||||
|
ui_Screen7.c
|
||||||
|
ui_Screen2.c
|
||||||
ui.c
|
ui.c
|
||||||
ui_comp_hook.c
|
ui_comp_hook.c
|
||||||
ui_helpers.c
|
ui_helpers.c
|
||||||
@@ -13,8 +14,8 @@ ui_img_florist_png.c
|
|||||||
ui_img_light_png.c
|
ui_img_light_png.c
|
||||||
ui_img_fan_png.c
|
ui_img_fan_png.c
|
||||||
ui_img_settings_png.c
|
ui_img_settings_png.c
|
||||||
ui_img_up_png.c
|
|
||||||
ui_img_down_png.c
|
ui_img_down_png.c
|
||||||
|
ui_img_up_png.c
|
||||||
ui_img_home_png.c
|
ui_img_home_png.c
|
||||||
ui_img_wifi_png.c
|
ui_img_wifi_png.c
|
||||||
ui_temporary_image.c
|
ui_temporary_image.c
|
||||||
|
|||||||
@@ -29,26 +29,6 @@ lv_obj_t * ui_settings;
|
|||||||
lv_obj_t * ui_growmode;
|
lv_obj_t * ui_growmode;
|
||||||
|
|
||||||
|
|
||||||
// SCREEN: ui_Screen2
|
|
||||||
void ui_Screen2_screen_init(void);
|
|
||||||
lv_obj_t * ui_Screen2;
|
|
||||||
lv_obj_t * ui_Image3;
|
|
||||||
lv_obj_t * ui_Image4;
|
|
||||||
void ui_event_Label1(lv_event_t * e);
|
|
||||||
lv_obj_t * ui_Label1;
|
|
||||||
lv_obj_t * ui_Label2;
|
|
||||||
lv_obj_t * ui_light2statuslbl;
|
|
||||||
lv_obj_t * ui_light1statuslbl;
|
|
||||||
lv_obj_t * ui_light1switch;
|
|
||||||
lv_obj_t * ui_light2switch;
|
|
||||||
lv_obj_t * ui_light2percent;
|
|
||||||
lv_obj_t * ui_light1percent;
|
|
||||||
lv_obj_t * ui_light1up;
|
|
||||||
lv_obj_t * ui_light1down;
|
|
||||||
lv_obj_t * ui_light2up;
|
|
||||||
lv_obj_t * ui_light2down;
|
|
||||||
|
|
||||||
|
|
||||||
// SCREEN: ui_Screen3
|
// SCREEN: ui_Screen3
|
||||||
void ui_Screen3_screen_init(void);
|
void ui_Screen3_screen_init(void);
|
||||||
lv_obj_t * ui_Screen3;
|
lv_obj_t * ui_Screen3;
|
||||||
@@ -63,7 +43,6 @@ lv_obj_t * ui_Image6;
|
|||||||
void ui_event_btnfanhome(lv_event_t * e);
|
void ui_event_btnfanhome(lv_event_t * e);
|
||||||
lv_obj_t * ui_btnfanhome;
|
lv_obj_t * ui_btnfanhome;
|
||||||
lv_obj_t * ui_switchfanstatus;
|
lv_obj_t * ui_switchfanstatus;
|
||||||
lv_obj_t * ui_lblfanstatus;
|
|
||||||
|
|
||||||
|
|
||||||
// SCREEN: ui_Screen4
|
// SCREEN: ui_Screen4
|
||||||
@@ -109,6 +88,42 @@ lv_obj_t * ui_savemode;
|
|||||||
lv_obj_t * ui_lblsavemode;
|
lv_obj_t * ui_lblsavemode;
|
||||||
void ui_event_homebtngrow(lv_event_t * e);
|
void ui_event_homebtngrow(lv_event_t * e);
|
||||||
lv_obj_t * ui_homebtngrow;
|
lv_obj_t * ui_homebtngrow;
|
||||||
|
lv_obj_t * ui_led1check;
|
||||||
|
lv_obj_t * ui_led3check;
|
||||||
|
lv_obj_t * ui_led2check;
|
||||||
|
|
||||||
|
|
||||||
|
// SCREEN: ui_Screen7
|
||||||
|
void ui_Screen7_screen_init(void);
|
||||||
|
lv_obj_t * ui_Screen7;
|
||||||
|
lv_obj_t * ui_Label10;
|
||||||
|
lv_obj_t * ui_light3switch;
|
||||||
|
lv_obj_t * ui_light2switch;
|
||||||
|
lv_obj_t * ui_light1switch;
|
||||||
|
lv_obj_t * ui_light3percent;
|
||||||
|
lv_obj_t * ui_Label9;
|
||||||
|
lv_obj_t * ui_Label12;
|
||||||
|
lv_obj_t * ui_led3;
|
||||||
|
lv_obj_t * ui_led1;
|
||||||
|
lv_obj_t * ui_led2;
|
||||||
|
lv_obj_t * ui_light1percent;
|
||||||
|
lv_obj_t * ui_light2percent;
|
||||||
|
lv_obj_t * ui_lightup;
|
||||||
|
lv_obj_t * ui_lightdown;
|
||||||
|
void ui_event_ledhome(lv_event_t * e);
|
||||||
|
lv_obj_t * ui_ledhome;
|
||||||
|
|
||||||
|
|
||||||
|
// SCREEN: ui_Screen2
|
||||||
|
void ui_Screen2_screen_init(void);
|
||||||
|
lv_obj_t * ui_Screen2;
|
||||||
|
lv_obj_t * ui_sunsimspin;
|
||||||
|
lv_obj_t * ui_lblsunsim;
|
||||||
|
lv_obj_t * ui_endtime;
|
||||||
|
lv_obj_t * ui_starttime;
|
||||||
|
lv_obj_t * ui_clock;
|
||||||
|
void ui_event_simhome(lv_event_t * e);
|
||||||
|
lv_obj_t * ui_simhome;
|
||||||
lv_obj_t * ui____initial_actions0;
|
lv_obj_t * ui____initial_actions0;
|
||||||
|
|
||||||
///////////////////// TEST LVGL SETTINGS ////////////////////
|
///////////////////// TEST LVGL SETTINGS ////////////////////
|
||||||
@@ -124,7 +139,7 @@ void ui_event_btnlight(lv_event_t * e)
|
|||||||
lv_event_code_t event_code = lv_event_get_code(e);
|
lv_event_code_t event_code = lv_event_get_code(e);
|
||||||
lv_obj_t * target = lv_event_get_target(e);
|
lv_obj_t * target = lv_event_get_target(e);
|
||||||
if(event_code == LV_EVENT_CLICKED) {
|
if(event_code == LV_EVENT_CLICKED) {
|
||||||
_ui_screen_change(&ui_Screen2, LV_SCR_LOAD_ANIM_FADE_ON, 500, 0, &ui_Screen2_screen_init);
|
_ui_screen_change(&ui_Screen7, LV_SCR_LOAD_ANIM_FADE_ON, 500, 0, &ui_Screen7_screen_init);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void ui_event_btnfan(lv_event_t * e)
|
void ui_event_btnfan(lv_event_t * e)
|
||||||
@@ -143,14 +158,6 @@ void ui_event_settings(lv_event_t * e)
|
|||||||
_ui_screen_change(&ui_Screen4, LV_SCR_LOAD_ANIM_FADE_ON, 500, 0, &ui_Screen4_screen_init);
|
_ui_screen_change(&ui_Screen4, LV_SCR_LOAD_ANIM_FADE_ON, 500, 0, &ui_Screen4_screen_init);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void ui_event_Label1(lv_event_t * e)
|
|
||||||
{
|
|
||||||
lv_event_code_t event_code = lv_event_get_code(e);
|
|
||||||
lv_obj_t * target = lv_event_get_target(e);
|
|
||||||
if(event_code == LV_EVENT_CLICKED) {
|
|
||||||
_ui_screen_change(&ui_Screen1, LV_SCR_LOAD_ANIM_FADE_ON, 500, 0, &ui_Screen1_screen_init);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
void ui_event_btnfanhome(lv_event_t * e)
|
void ui_event_btnfanhome(lv_event_t * e)
|
||||||
{
|
{
|
||||||
lv_event_code_t event_code = lv_event_get_code(e);
|
lv_event_code_t event_code = lv_event_get_code(e);
|
||||||
@@ -210,6 +217,23 @@ void ui_event_homebtngrow(lv_event_t * e)
|
|||||||
_ui_screen_change(&ui_Screen1, LV_SCR_LOAD_ANIM_FADE_ON, 500, 0, &ui_Screen1_screen_init);
|
_ui_screen_change(&ui_Screen1, LV_SCR_LOAD_ANIM_FADE_ON, 500, 0, &ui_Screen1_screen_init);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
void ui_event_ledhome(lv_event_t * e)
|
||||||
|
{
|
||||||
|
lv_event_code_t event_code = lv_event_get_code(e);
|
||||||
|
lv_obj_t * target = lv_event_get_target(e);
|
||||||
|
if(event_code == LV_EVENT_CLICKED) {
|
||||||
|
_ui_screen_change(&ui_Screen1, LV_SCR_LOAD_ANIM_FADE_ON, 500, 0, &ui_Screen1_screen_init);
|
||||||
|
_ui_state_modify(ui_led1check, LV_STATE_CHECKED, _UI_MODIFY_STATE_REMOVE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void ui_event_simhome(lv_event_t * e)
|
||||||
|
{
|
||||||
|
lv_event_code_t event_code = lv_event_get_code(e);
|
||||||
|
lv_obj_t * target = lv_event_get_target(e);
|
||||||
|
if(event_code == LV_EVENT_CLICKED) {
|
||||||
|
_ui_screen_change(&ui_Screen1, LV_SCR_LOAD_ANIM_FADE_ON, 500, 0, &ui_Screen1_screen_init);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
///////////////////// SCREENS ////////////////////
|
///////////////////// SCREENS ////////////////////
|
||||||
|
|
||||||
@@ -220,11 +244,12 @@ void ui_init(void)
|
|||||||
false, LV_FONT_DEFAULT);
|
false, LV_FONT_DEFAULT);
|
||||||
lv_disp_set_theme(dispp, theme);
|
lv_disp_set_theme(dispp, theme);
|
||||||
ui_Screen1_screen_init();
|
ui_Screen1_screen_init();
|
||||||
ui_Screen2_screen_init();
|
|
||||||
ui_Screen3_screen_init();
|
ui_Screen3_screen_init();
|
||||||
ui_Screen4_screen_init();
|
ui_Screen4_screen_init();
|
||||||
ui_Screen5_screen_init();
|
ui_Screen5_screen_init();
|
||||||
ui_Screen6_screen_init();
|
ui_Screen6_screen_init();
|
||||||
|
ui_Screen7_screen_init();
|
||||||
|
ui_Screen2_screen_init();
|
||||||
ui____initial_actions0 = lv_obj_create(NULL);
|
ui____initial_actions0 = lv_obj_create(NULL);
|
||||||
lv_disp_load_scr(ui_Screen1);
|
lv_disp_load_scr(ui_Screen1);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,24 +43,6 @@ extern lv_obj_t * ui_lblfanspeed;
|
|||||||
void ui_event_settings(lv_event_t * e);
|
void ui_event_settings(lv_event_t * e);
|
||||||
extern lv_obj_t * ui_settings;
|
extern lv_obj_t * ui_settings;
|
||||||
extern lv_obj_t * ui_growmode;
|
extern lv_obj_t * ui_growmode;
|
||||||
// SCREEN: ui_Screen2
|
|
||||||
void ui_Screen2_screen_init(void);
|
|
||||||
extern lv_obj_t * ui_Screen2;
|
|
||||||
extern lv_obj_t * ui_Image3;
|
|
||||||
extern lv_obj_t * ui_Image4;
|
|
||||||
void ui_event_Label1(lv_event_t * e);
|
|
||||||
extern lv_obj_t * ui_Label1;
|
|
||||||
extern lv_obj_t * ui_Label2;
|
|
||||||
extern lv_obj_t * ui_light2statuslbl;
|
|
||||||
extern lv_obj_t * ui_light1statuslbl;
|
|
||||||
extern lv_obj_t * ui_light1switch;
|
|
||||||
extern lv_obj_t * ui_light2switch;
|
|
||||||
extern lv_obj_t * ui_light2percent;
|
|
||||||
extern lv_obj_t * ui_light1percent;
|
|
||||||
extern lv_obj_t * ui_light1up;
|
|
||||||
extern lv_obj_t * ui_light1down;
|
|
||||||
extern lv_obj_t * ui_light2up;
|
|
||||||
extern lv_obj_t * ui_light2down;
|
|
||||||
// SCREEN: ui_Screen3
|
// SCREEN: ui_Screen3
|
||||||
void ui_Screen3_screen_init(void);
|
void ui_Screen3_screen_init(void);
|
||||||
extern lv_obj_t * ui_Screen3;
|
extern lv_obj_t * ui_Screen3;
|
||||||
@@ -75,7 +57,6 @@ extern lv_obj_t * ui_Image6;
|
|||||||
void ui_event_btnfanhome(lv_event_t * e);
|
void ui_event_btnfanhome(lv_event_t * e);
|
||||||
extern lv_obj_t * ui_btnfanhome;
|
extern lv_obj_t * ui_btnfanhome;
|
||||||
extern lv_obj_t * ui_switchfanstatus;
|
extern lv_obj_t * ui_switchfanstatus;
|
||||||
extern lv_obj_t * ui_lblfanstatus;
|
|
||||||
// SCREEN: ui_Screen4
|
// SCREEN: ui_Screen4
|
||||||
void ui_Screen4_screen_init(void);
|
void ui_Screen4_screen_init(void);
|
||||||
extern lv_obj_t * ui_Screen4;
|
extern lv_obj_t * ui_Screen4;
|
||||||
@@ -115,6 +96,38 @@ extern lv_obj_t * ui_savemode;
|
|||||||
extern lv_obj_t * ui_lblsavemode;
|
extern lv_obj_t * ui_lblsavemode;
|
||||||
void ui_event_homebtngrow(lv_event_t * e);
|
void ui_event_homebtngrow(lv_event_t * e);
|
||||||
extern lv_obj_t * ui_homebtngrow;
|
extern lv_obj_t * ui_homebtngrow;
|
||||||
|
extern lv_obj_t * ui_led1check;
|
||||||
|
extern lv_obj_t * ui_led3check;
|
||||||
|
extern lv_obj_t * ui_led2check;
|
||||||
|
// SCREEN: ui_Screen7
|
||||||
|
void ui_Screen7_screen_init(void);
|
||||||
|
extern lv_obj_t * ui_Screen7;
|
||||||
|
extern lv_obj_t * ui_Label10;
|
||||||
|
extern lv_obj_t * ui_light3switch;
|
||||||
|
extern lv_obj_t * ui_light2switch;
|
||||||
|
extern lv_obj_t * ui_light1switch;
|
||||||
|
extern lv_obj_t * ui_light3percent;
|
||||||
|
extern lv_obj_t * ui_Label9;
|
||||||
|
extern lv_obj_t * ui_Label12;
|
||||||
|
extern lv_obj_t * ui_led3;
|
||||||
|
extern lv_obj_t * ui_led1;
|
||||||
|
extern lv_obj_t * ui_led2;
|
||||||
|
extern lv_obj_t * ui_light1percent;
|
||||||
|
extern lv_obj_t * ui_light2percent;
|
||||||
|
extern lv_obj_t * ui_lightup;
|
||||||
|
extern lv_obj_t * ui_lightdown;
|
||||||
|
void ui_event_ledhome(lv_event_t * e);
|
||||||
|
extern lv_obj_t * ui_ledhome;
|
||||||
|
// SCREEN: ui_Screen2
|
||||||
|
void ui_Screen2_screen_init(void);
|
||||||
|
extern lv_obj_t * ui_Screen2;
|
||||||
|
extern lv_obj_t * ui_sunsimspin;
|
||||||
|
extern lv_obj_t * ui_lblsunsim;
|
||||||
|
extern lv_obj_t * ui_endtime;
|
||||||
|
extern lv_obj_t * ui_starttime;
|
||||||
|
extern lv_obj_t * ui_clock;
|
||||||
|
void ui_event_simhome(lv_event_t * e);
|
||||||
|
extern lv_obj_t * ui_simhome;
|
||||||
extern lv_obj_t * ui____initial_actions0;
|
extern lv_obj_t * ui____initial_actions0;
|
||||||
|
|
||||||
LV_IMG_DECLARE(ui__temporary_image);
|
LV_IMG_DECLARE(ui__temporary_image);
|
||||||
@@ -124,8 +137,8 @@ LV_IMG_DECLARE(ui_img_florist_png); // assets/florist.png
|
|||||||
LV_IMG_DECLARE(ui_img_light_png); // assets/light.png
|
LV_IMG_DECLARE(ui_img_light_png); // assets/light.png
|
||||||
LV_IMG_DECLARE(ui_img_fan_png); // assets/fan.png
|
LV_IMG_DECLARE(ui_img_fan_png); // assets/fan.png
|
||||||
LV_IMG_DECLARE(ui_img_settings_png); // assets/settings.png
|
LV_IMG_DECLARE(ui_img_settings_png); // assets/settings.png
|
||||||
LV_IMG_DECLARE(ui_img_up_png); // assets/up.png
|
|
||||||
LV_IMG_DECLARE(ui_img_down_png); // assets/down.png
|
LV_IMG_DECLARE(ui_img_down_png); // assets/down.png
|
||||||
|
LV_IMG_DECLARE(ui_img_up_png); // assets/up.png
|
||||||
LV_IMG_DECLARE(ui_img_home_png); // assets/home.png
|
LV_IMG_DECLARE(ui_img_home_png); // assets/home.png
|
||||||
LV_IMG_DECLARE(ui_img_wifi_png); // assets/wifi.png
|
LV_IMG_DECLARE(ui_img_wifi_png); // assets/wifi.png
|
||||||
|
|
||||||
|
|||||||
@@ -10,155 +10,58 @@ void ui_Screen2_screen_init(void)
|
|||||||
ui_Screen2 = lv_obj_create(NULL);
|
ui_Screen2 = lv_obj_create(NULL);
|
||||||
lv_obj_remove_flag(ui_Screen2, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
lv_obj_remove_flag(ui_Screen2, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
||||||
|
|
||||||
ui_Image3 = lv_image_create(ui_Screen2);
|
ui_sunsimspin = lv_spinner_create(ui_Screen2);
|
||||||
lv_image_set_src(ui_Image3, &ui_img_light_png);
|
//lv_spinner_set_anim_params(ui_sunsimspin, 1000, 90);
|
||||||
lv_obj_set_width(ui_Image3, LV_SIZE_CONTENT); /// 64
|
lv_obj_set_width(ui_sunsimspin, 95);
|
||||||
lv_obj_set_height(ui_Image3, LV_SIZE_CONTENT); /// 64
|
lv_obj_set_height(ui_sunsimspin, 97);
|
||||||
lv_obj_set_x(ui_Image3, 30);
|
lv_obj_set_x(ui_sunsimspin, 0);
|
||||||
lv_obj_set_y(ui_Image3, -40);
|
lv_obj_set_y(ui_sunsimspin, -10);
|
||||||
lv_obj_set_align(ui_Image3, LV_ALIGN_CENTER);
|
lv_obj_set_align(ui_sunsimspin, LV_ALIGN_CENTER);
|
||||||
lv_obj_add_flag(ui_Image3, LV_OBJ_FLAG_CLICKABLE); /// Flags
|
lv_obj_remove_flag(ui_sunsimspin, LV_OBJ_FLAG_CLICKABLE); /// Flags
|
||||||
lv_obj_remove_flag(ui_Image3, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
|
||||||
|
|
||||||
ui_Image4 = lv_image_create(ui_Screen2);
|
ui_lblsunsim = lv_label_create(ui_Screen2);
|
||||||
lv_image_set_src(ui_Image4, &ui_img_light_png);
|
lv_obj_set_width(ui_lblsunsim, LV_SIZE_CONTENT); /// 1
|
||||||
lv_obj_set_width(ui_Image4, LV_SIZE_CONTENT); /// 64
|
lv_obj_set_height(ui_lblsunsim, LV_SIZE_CONTENT); /// 1
|
||||||
lv_obj_set_height(ui_Image4, LV_SIZE_CONTENT); /// 64
|
lv_obj_set_x(ui_lblsunsim, 0);
|
||||||
lv_obj_set_x(ui_Image4, -120);
|
lv_obj_set_y(ui_lblsunsim, -90);
|
||||||
lv_obj_set_y(ui_Image4, -40);
|
lv_obj_set_align(ui_lblsunsim, LV_ALIGN_CENTER);
|
||||||
lv_obj_set_align(ui_Image4, LV_ALIGN_CENTER);
|
lv_label_set_text(ui_lblsunsim, "Sonnensimulation");
|
||||||
lv_obj_add_flag(ui_Image4, LV_OBJ_FLAG_CLICKABLE); /// Flags
|
lv_obj_set_style_text_font(ui_lblsunsim, &lv_font_montserrat_22, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||||
lv_obj_remove_flag(ui_Image4, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
|
||||||
|
|
||||||
ui_Label1 = lv_label_create(ui_Screen2);
|
ui_endtime = lv_label_create(ui_Screen2);
|
||||||
lv_obj_set_width(ui_Label1, LV_SIZE_CONTENT); /// 1
|
lv_obj_set_width(ui_endtime, LV_SIZE_CONTENT); /// 1
|
||||||
lv_obj_set_height(ui_Label1, LV_SIZE_CONTENT); /// 1
|
lv_obj_set_height(ui_endtime, LV_SIZE_CONTENT); /// 1
|
||||||
lv_obj_set_x(ui_Label1, -85);
|
lv_obj_set_x(ui_endtime, 0);
|
||||||
lv_obj_set_y(ui_Label1, -90);
|
lv_obj_set_y(ui_endtime, 80);
|
||||||
lv_obj_set_align(ui_Label1, LV_ALIGN_CENTER);
|
lv_obj_set_align(ui_endtime, LV_ALIGN_CENTER);
|
||||||
lv_label_set_text(ui_Label1, "First");
|
lv_label_set_text(ui_endtime, "Sonnenuntergang: 12:00 Uhr");
|
||||||
lv_obj_add_flag(ui_Label1, LV_OBJ_FLAG_CLICKABLE); /// Flags
|
|
||||||
lv_obj_set_style_text_font(ui_Label1, &lv_font_montserrat_22, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_Label2 = lv_label_create(ui_Screen2);
|
ui_starttime = lv_label_create(ui_Screen2);
|
||||||
lv_obj_set_width(ui_Label2, LV_SIZE_CONTENT); /// 1
|
lv_obj_set_width(ui_starttime, LV_SIZE_CONTENT); /// 1
|
||||||
lv_obj_set_height(ui_Label2, LV_SIZE_CONTENT); /// 1
|
lv_obj_set_height(ui_starttime, LV_SIZE_CONTENT); /// 1
|
||||||
lv_obj_set_x(ui_Label2, 75);
|
lv_obj_set_x(ui_starttime, 0);
|
||||||
lv_obj_set_y(ui_Label2, -90);
|
lv_obj_set_y(ui_starttime, 60);
|
||||||
lv_obj_set_align(ui_Label2, LV_ALIGN_CENTER);
|
lv_obj_set_align(ui_starttime, LV_ALIGN_CENTER);
|
||||||
lv_label_set_text(ui_Label2, "Second");
|
lv_label_set_text(ui_starttime, "Sonnenaufgang: 18:00 Uhr");
|
||||||
lv_obj_set_style_text_font(ui_Label2, &lv_font_montserrat_22, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_light2statuslbl = lv_label_create(ui_Screen2);
|
ui_clock = lv_label_create(ui_Screen2);
|
||||||
lv_obj_set_width(ui_light2statuslbl, 60);
|
lv_obj_set_width(ui_clock, LV_SIZE_CONTENT); /// 1
|
||||||
lv_obj_set_height(ui_light2statuslbl, LV_SIZE_CONTENT); /// 1
|
lv_obj_set_height(ui_clock, LV_SIZE_CONTENT); /// 1
|
||||||
lv_obj_set_x(ui_light2statuslbl, 30);
|
lv_obj_set_x(ui_clock, 0);
|
||||||
lv_obj_set_y(ui_light2statuslbl, 15);
|
lv_obj_set_y(ui_clock, 101);
|
||||||
lv_obj_set_align(ui_light2statuslbl, LV_ALIGN_CENTER);
|
lv_obj_set_align(ui_clock, LV_ALIGN_CENTER);
|
||||||
lv_label_set_text(ui_light2statuslbl, "ON");
|
lv_label_set_text(ui_clock, "Uhrzeit: ");
|
||||||
lv_obj_set_style_text_align(ui_light2statuslbl, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_font(ui_light2statuslbl, &lv_font_montserrat_22, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_light1statuslbl = lv_label_create(ui_Screen2);
|
ui_simhome = lv_image_create(ui_Screen2);
|
||||||
lv_obj_set_width(ui_light1statuslbl, 60);
|
lv_image_set_src(ui_simhome, &ui_img_home_png);
|
||||||
lv_obj_set_height(ui_light1statuslbl, LV_SIZE_CONTENT); /// 1
|
lv_obj_set_width(ui_simhome, LV_SIZE_CONTENT); /// 64
|
||||||
lv_obj_set_x(ui_light1statuslbl, -120);
|
lv_obj_set_height(ui_simhome, LV_SIZE_CONTENT); /// 64
|
||||||
lv_obj_set_y(ui_light1statuslbl, 15);
|
lv_obj_set_x(ui_simhome, -120);
|
||||||
lv_obj_set_align(ui_light1statuslbl, LV_ALIGN_CENTER);
|
lv_obj_set_y(ui_simhome, -11);
|
||||||
lv_label_set_text(ui_light1statuslbl, "ON");
|
lv_obj_set_align(ui_simhome, LV_ALIGN_CENTER);
|
||||||
lv_obj_set_style_text_align(ui_light1statuslbl, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN | LV_STATE_DEFAULT);
|
lv_obj_add_flag(ui_simhome, LV_OBJ_FLAG_CLICKABLE); /// Flags
|
||||||
lv_obj_set_style_text_font(ui_light1statuslbl, &lv_font_montserrat_22, LV_PART_MAIN | LV_STATE_DEFAULT);
|
lv_obj_remove_flag(ui_simhome, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
||||||
|
|
||||||
ui_light1switch = lv_switch_create(ui_Screen2);
|
lv_obj_add_event_cb(ui_simhome, ui_event_simhome, LV_EVENT_ALL, NULL);
|
||||||
lv_obj_set_width(ui_light1switch, 50);
|
|
||||||
lv_obj_set_height(ui_light1switch, 25);
|
|
||||||
lv_obj_set_x(ui_light1switch, -45);
|
|
||||||
lv_obj_set_y(ui_light1switch, 15);
|
|
||||||
lv_obj_set_align(ui_light1switch, LV_ALIGN_CENTER);
|
|
||||||
|
|
||||||
|
|
||||||
ui_light2switch = lv_switch_create(ui_Screen2);
|
|
||||||
lv_obj_set_width(ui_light2switch, 50);
|
|
||||||
lv_obj_set_height(ui_light2switch, 25);
|
|
||||||
lv_obj_set_x(ui_light2switch, 105);
|
|
||||||
lv_obj_set_y(ui_light2switch, 15);
|
|
||||||
lv_obj_set_align(ui_light2switch, LV_ALIGN_CENTER);
|
|
||||||
|
|
||||||
|
|
||||||
ui_light2percent = lv_label_create(ui_Screen2);
|
|
||||||
lv_obj_set_width(ui_light2percent, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_light2percent, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_light2percent, 105);
|
|
||||||
lv_obj_set_y(ui_light2percent, -40);
|
|
||||||
lv_obj_set_align(ui_light2percent, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_light2percent, "0 %");
|
|
||||||
lv_obj_set_style_text_align(ui_light2percent, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_font(ui_light2percent, &lv_font_montserrat_22, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_light1percent = lv_label_create(ui_Screen2);
|
|
||||||
lv_obj_set_width(ui_light1percent, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_light1percent, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_light1percent, -45);
|
|
||||||
lv_obj_set_y(ui_light1percent, -40);
|
|
||||||
lv_obj_set_align(ui_light1percent, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_light1percent, "0 %");
|
|
||||||
lv_obj_set_style_text_align(ui_light1percent, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_font(ui_light1percent, &lv_font_montserrat_22, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_light1up = lv_imagebutton_create(ui_Screen2);
|
|
||||||
lv_imagebutton_set_src(ui_light1up, LV_IMAGEBUTTON_STATE_RELEASED, NULL, &ui_img_up_png, NULL);
|
|
||||||
lv_imagebutton_set_src(ui_light1up, LV_IMAGEBUTTON_STATE_PRESSED, NULL, &ui_img_up_png, NULL);
|
|
||||||
lv_imagebutton_set_src(ui_light1up, LV_IMAGEBUTTON_STATE_DISABLED, NULL, &ui__temporary_image, NULL);
|
|
||||||
lv_imagebutton_set_src(ui_light1up, LV_IMAGEBUTTON_STATE_CHECKED_PRESSED, NULL, &ui__temporary_image, NULL);
|
|
||||||
lv_imagebutton_set_src(ui_light1up, LV_IMAGEBUTTON_STATE_CHECKED_RELEASED, NULL, &ui__temporary_image, NULL);
|
|
||||||
lv_imagebutton_set_src(ui_light1up, LV_IMAGEBUTTON_STATE_CHECKED_DISABLED, NULL, &ui__temporary_image, NULL);
|
|
||||||
lv_obj_set_height(ui_light1up, 64);
|
|
||||||
lv_obj_set_width(ui_light1up, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_light1up, -120);
|
|
||||||
lv_obj_set_y(ui_light1up, 75);
|
|
||||||
lv_obj_set_align(ui_light1up, LV_ALIGN_CENTER);
|
|
||||||
lv_obj_set_style_bg_color(ui_light1up, lv_color_hex(0x82ADF0), LV_PART_MAIN | LV_STATE_PRESSED);
|
|
||||||
lv_obj_set_style_bg_opa(ui_light1up, 255, LV_PART_MAIN | LV_STATE_PRESSED);
|
|
||||||
|
|
||||||
ui_light1down = lv_imagebutton_create(ui_Screen2);
|
|
||||||
lv_imagebutton_set_src(ui_light1down, LV_IMAGEBUTTON_STATE_RELEASED, NULL, &ui_img_down_png, NULL);
|
|
||||||
lv_imagebutton_set_src(ui_light1down, LV_IMAGEBUTTON_STATE_PRESSED, NULL, &ui_img_down_png, NULL);
|
|
||||||
lv_imagebutton_set_src(ui_light1down, LV_IMAGEBUTTON_STATE_DISABLED, NULL, &ui__temporary_image, NULL);
|
|
||||||
lv_imagebutton_set_src(ui_light1down, LV_IMAGEBUTTON_STATE_CHECKED_PRESSED, NULL, &ui__temporary_image, NULL);
|
|
||||||
lv_imagebutton_set_src(ui_light1down, LV_IMAGEBUTTON_STATE_CHECKED_RELEASED, NULL, &ui__temporary_image, NULL);
|
|
||||||
lv_imagebutton_set_src(ui_light1down, LV_IMAGEBUTTON_STATE_CHECKED_DISABLED, NULL, &ui__temporary_image, NULL);
|
|
||||||
lv_obj_set_height(ui_light1down, 64);
|
|
||||||
lv_obj_set_width(ui_light1down, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_light1down, -45);
|
|
||||||
lv_obj_set_y(ui_light1down, 75);
|
|
||||||
lv_obj_set_align(ui_light1down, LV_ALIGN_CENTER);
|
|
||||||
|
|
||||||
ui_light2up = lv_imagebutton_create(ui_Screen2);
|
|
||||||
lv_imagebutton_set_src(ui_light2up, LV_IMAGEBUTTON_STATE_RELEASED, NULL, &ui_img_up_png, NULL);
|
|
||||||
lv_imagebutton_set_src(ui_light2up, LV_IMAGEBUTTON_STATE_PRESSED, NULL, &ui_img_up_png, NULL);
|
|
||||||
lv_imagebutton_set_src(ui_light2up, LV_IMAGEBUTTON_STATE_DISABLED, NULL, &ui__temporary_image, NULL);
|
|
||||||
lv_imagebutton_set_src(ui_light2up, LV_IMAGEBUTTON_STATE_CHECKED_PRESSED, NULL, &ui__temporary_image, NULL);
|
|
||||||
lv_imagebutton_set_src(ui_light2up, LV_IMAGEBUTTON_STATE_CHECKED_RELEASED, NULL, &ui__temporary_image, NULL);
|
|
||||||
lv_imagebutton_set_src(ui_light2up, LV_IMAGEBUTTON_STATE_CHECKED_DISABLED, NULL, &ui__temporary_image, NULL);
|
|
||||||
lv_obj_set_height(ui_light2up, 64);
|
|
||||||
lv_obj_set_width(ui_light2up, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_light2up, 30);
|
|
||||||
lv_obj_set_y(ui_light2up, 75);
|
|
||||||
lv_obj_set_align(ui_light2up, LV_ALIGN_CENTER);
|
|
||||||
|
|
||||||
ui_light2down = lv_imagebutton_create(ui_Screen2);
|
|
||||||
lv_imagebutton_set_src(ui_light2down, LV_IMAGEBUTTON_STATE_RELEASED, NULL, &ui_img_down_png, NULL);
|
|
||||||
lv_imagebutton_set_src(ui_light2down, LV_IMAGEBUTTON_STATE_PRESSED, NULL, &ui_img_down_png, NULL);
|
|
||||||
lv_imagebutton_set_src(ui_light2down, LV_IMAGEBUTTON_STATE_DISABLED, NULL, &ui__temporary_image, NULL);
|
|
||||||
lv_imagebutton_set_src(ui_light2down, LV_IMAGEBUTTON_STATE_CHECKED_PRESSED, NULL, &ui__temporary_image, NULL);
|
|
||||||
lv_imagebutton_set_src(ui_light2down, LV_IMAGEBUTTON_STATE_CHECKED_RELEASED, NULL, &ui__temporary_image, NULL);
|
|
||||||
lv_imagebutton_set_src(ui_light2down, LV_IMAGEBUTTON_STATE_CHECKED_DISABLED, NULL, &ui__temporary_image, NULL);
|
|
||||||
lv_obj_set_height(ui_light2down, 64);
|
|
||||||
lv_obj_set_width(ui_light2down, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_light2down, 105);
|
|
||||||
lv_obj_set_y(ui_light2down, 75);
|
|
||||||
lv_obj_set_align(ui_light2down, LV_ALIGN_CENTER);
|
|
||||||
|
|
||||||
lv_obj_add_event_cb(ui_Label1, ui_event_Label1, LV_EVENT_ALL, NULL);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -115,20 +115,11 @@ void ui_Screen3_screen_init(void)
|
|||||||
ui_switchfanstatus = lv_switch_create(ui_Screen3);
|
ui_switchfanstatus = lv_switch_create(ui_Screen3);
|
||||||
lv_obj_set_width(ui_switchfanstatus, 50);
|
lv_obj_set_width(ui_switchfanstatus, 50);
|
||||||
lv_obj_set_height(ui_switchfanstatus, 25);
|
lv_obj_set_height(ui_switchfanstatus, 25);
|
||||||
lv_obj_set_x(ui_switchfanstatus, 100);
|
lv_obj_set_x(ui_switchfanstatus, 40);
|
||||||
lv_obj_set_y(ui_switchfanstatus, 5);
|
lv_obj_set_y(ui_switchfanstatus, 5);
|
||||||
lv_obj_set_align(ui_switchfanstatus, LV_ALIGN_CENTER);
|
lv_obj_set_align(ui_switchfanstatus, LV_ALIGN_CENTER);
|
||||||
|
|
||||||
|
|
||||||
ui_lblfanstatus = lv_label_create(ui_Screen3);
|
|
||||||
lv_obj_set_width(ui_lblfanstatus, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_lblfanstatus, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_lblfanstatus, 30);
|
|
||||||
lv_obj_set_y(ui_lblfanstatus, 5);
|
|
||||||
lv_obj_set_align(ui_lblfanstatus, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_lblfanstatus, "ON");
|
|
||||||
lv_obj_set_style_text_font(ui_lblfanstatus, &lv_font_montserrat_22, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
lv_obj_add_event_cb(ui_btnfanhome, ui_event_btnfanhome, LV_EVENT_ALL, NULL);
|
lv_obj_add_event_cb(ui_btnfanhome, ui_event_btnfanhome, LV_EVENT_ALL, NULL);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -100,14 +100,14 @@ void ui_Screen6_screen_init(void)
|
|||||||
lv_label_set_text(ui_Label8, "Grow Mode");
|
lv_label_set_text(ui_Label8, "Grow Mode");
|
||||||
|
|
||||||
ui_sunsetcheck = lv_checkbox_create(ui_Screen6);
|
ui_sunsetcheck = lv_checkbox_create(ui_Screen6);
|
||||||
lv_checkbox_set_text(ui_sunsetcheck, "Sonne simulieren");
|
lv_checkbox_set_text(ui_sunsetcheck, "SIM");
|
||||||
lv_obj_set_width(ui_sunsetcheck, LV_SIZE_CONTENT); /// 1
|
lv_obj_set_width(ui_sunsetcheck, LV_SIZE_CONTENT); /// 1
|
||||||
lv_obj_set_height(ui_sunsetcheck, LV_SIZE_CONTENT); /// 1
|
lv_obj_set_height(ui_sunsetcheck, LV_SIZE_CONTENT); /// 1
|
||||||
lv_obj_set_x(ui_sunsetcheck, -35);
|
lv_obj_set_x(ui_sunsetcheck, 103);
|
||||||
lv_obj_set_y(ui_sunsetcheck, 40);
|
lv_obj_set_y(ui_sunsetcheck, 50);
|
||||||
lv_obj_set_align(ui_sunsetcheck, LV_ALIGN_CENTER);
|
lv_obj_set_align(ui_sunsetcheck, LV_ALIGN_CENTER);
|
||||||
lv_obj_add_flag(ui_sunsetcheck, LV_OBJ_FLAG_SCROLL_ON_FOCUS); /// Flags
|
lv_obj_add_flag(ui_sunsetcheck, LV_OBJ_FLAG_SCROLL_ON_FOCUS); /// Flags
|
||||||
lv_obj_set_style_text_font(ui_sunsetcheck, &lv_font_montserrat_22, LV_PART_MAIN | LV_STATE_DEFAULT);
|
lv_obj_set_style_text_font(ui_sunsetcheck, &lv_font_montserrat_14, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||||
|
|
||||||
ui_setmode = lv_dropdown_create(ui_Screen6);
|
ui_setmode = lv_dropdown_create(ui_Screen6);
|
||||||
lv_dropdown_set_options(ui_setmode, "Veggie\nFlower");
|
lv_dropdown_set_options(ui_setmode, "Veggie\nFlower");
|
||||||
@@ -133,7 +133,7 @@ void ui_Screen6_screen_init(void)
|
|||||||
lv_obj_set_width(ui_lblsavemode, LV_SIZE_CONTENT); /// 1
|
lv_obj_set_width(ui_lblsavemode, LV_SIZE_CONTENT); /// 1
|
||||||
lv_obj_set_height(ui_lblsavemode, LV_SIZE_CONTENT); /// 1
|
lv_obj_set_height(ui_lblsavemode, LV_SIZE_CONTENT); /// 1
|
||||||
lv_obj_set_x(ui_lblsavemode, 61);
|
lv_obj_set_x(ui_lblsavemode, 61);
|
||||||
lv_obj_set_y(ui_lblsavemode, 90);
|
lv_obj_set_y(ui_lblsavemode, 91);
|
||||||
lv_obj_set_align(ui_lblsavemode, LV_ALIGN_CENTER);
|
lv_obj_set_align(ui_lblsavemode, LV_ALIGN_CENTER);
|
||||||
lv_label_set_text(ui_lblsavemode, "Speichern");
|
lv_label_set_text(ui_lblsavemode, "Speichern");
|
||||||
lv_obj_add_flag(ui_lblsavemode, LV_OBJ_FLAG_IGNORE_LAYOUT); /// Flags
|
lv_obj_add_flag(ui_lblsavemode, LV_OBJ_FLAG_IGNORE_LAYOUT); /// Flags
|
||||||
@@ -151,6 +151,35 @@ void ui_Screen6_screen_init(void)
|
|||||||
lv_obj_set_y(ui_homebtngrow, -83);
|
lv_obj_set_y(ui_homebtngrow, -83);
|
||||||
lv_obj_set_align(ui_homebtngrow, LV_ALIGN_CENTER);
|
lv_obj_set_align(ui_homebtngrow, LV_ALIGN_CENTER);
|
||||||
|
|
||||||
|
ui_led1check = lv_checkbox_create(ui_Screen6);
|
||||||
|
lv_checkbox_set_text(ui_led1check, "LED1");
|
||||||
|
lv_obj_set_width(ui_led1check, LV_SIZE_CONTENT); /// 1
|
||||||
|
lv_obj_set_height(ui_led1check, LV_SIZE_CONTENT); /// 1
|
||||||
|
lv_obj_set_x(ui_led1check, -120);
|
||||||
|
lv_obj_set_y(ui_led1check, 50);
|
||||||
|
lv_obj_set_align(ui_led1check, LV_ALIGN_CENTER);
|
||||||
|
lv_obj_add_flag(ui_led1check, LV_OBJ_FLAG_SCROLL_ON_FOCUS); /// Flags
|
||||||
|
lv_obj_set_style_text_font(ui_led1check, &lv_font_montserrat_14, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||||
|
|
||||||
|
ui_led3check = lv_checkbox_create(ui_Screen6);
|
||||||
|
lv_checkbox_set_text(ui_led3check, "LED3");
|
||||||
|
lv_obj_set_width(ui_led3check, LV_SIZE_CONTENT); /// 1
|
||||||
|
lv_obj_set_height(ui_led3check, LV_SIZE_CONTENT); /// 1
|
||||||
|
lv_obj_set_x(ui_led3check, 30);
|
||||||
|
lv_obj_set_y(ui_led3check, 50);
|
||||||
|
lv_obj_set_align(ui_led3check, LV_ALIGN_CENTER);
|
||||||
|
lv_obj_add_flag(ui_led3check, LV_OBJ_FLAG_SCROLL_ON_FOCUS); /// Flags
|
||||||
|
|
||||||
|
ui_led2check = lv_checkbox_create(ui_Screen6);
|
||||||
|
lv_checkbox_set_text(ui_led2check, "LED2");
|
||||||
|
lv_obj_set_width(ui_led2check, LV_SIZE_CONTENT); /// 1
|
||||||
|
lv_obj_set_height(ui_led2check, LV_SIZE_CONTENT); /// 1
|
||||||
|
lv_obj_set_x(ui_led2check, -45);
|
||||||
|
lv_obj_set_y(ui_led2check, 50);
|
||||||
|
lv_obj_set_align(ui_led2check, LV_ALIGN_CENTER);
|
||||||
|
lv_obj_add_flag(ui_led2check, LV_OBJ_FLAG_SCROLL_ON_FOCUS); /// Flags
|
||||||
|
lv_obj_set_style_text_font(ui_led2check, &lv_font_montserrat_14, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||||
|
|
||||||
lv_obj_add_event_cb(ui_homebtngrow, ui_event_homebtngrow, LV_EVENT_ALL, NULL);
|
lv_obj_add_event_cb(ui_homebtngrow, ui_event_homebtngrow, LV_EVENT_ALL, NULL);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
159
libraries/ui/src/ui_Screen7.c
Normal file
159
libraries/ui/src/ui_Screen7.c
Normal file
@@ -0,0 +1,159 @@
|
|||||||
|
// This file was generated by SquareLine Studio
|
||||||
|
// SquareLine Studio version: SquareLine Studio 1.4.2
|
||||||
|
// LVGL version: 9.1.0
|
||||||
|
// Project name: SmartGrow
|
||||||
|
|
||||||
|
#include "ui.h"
|
||||||
|
|
||||||
|
void ui_Screen7_screen_init(void)
|
||||||
|
{
|
||||||
|
ui_Screen7 = lv_obj_create(NULL);
|
||||||
|
lv_obj_remove_flag(ui_Screen7, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
||||||
|
|
||||||
|
ui_Label10 = lv_label_create(ui_Screen7);
|
||||||
|
lv_obj_set_width(ui_Label10, LV_SIZE_CONTENT); /// 1
|
||||||
|
lv_obj_set_height(ui_Label10, LV_SIZE_CONTENT); /// 1
|
||||||
|
lv_obj_set_x(ui_Label10, -145);
|
||||||
|
lv_obj_set_y(ui_Label10, -80);
|
||||||
|
lv_obj_set_align(ui_Label10, LV_ALIGN_CENTER);
|
||||||
|
lv_label_set_text(ui_Label10, "1");
|
||||||
|
lv_obj_set_style_text_font(ui_Label10, &lv_font_montserrat_22, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||||
|
|
||||||
|
ui_light3switch = lv_switch_create(ui_Screen7);
|
||||||
|
lv_obj_set_width(ui_light3switch, 50);
|
||||||
|
lv_obj_set_height(ui_light3switch, 25);
|
||||||
|
lv_obj_set_x(ui_light3switch, -50);
|
||||||
|
lv_obj_set_y(ui_light3switch, 60);
|
||||||
|
lv_obj_set_align(ui_light3switch, LV_ALIGN_CENTER);
|
||||||
|
|
||||||
|
|
||||||
|
ui_light2switch = lv_switch_create(ui_Screen7);
|
||||||
|
lv_obj_set_width(ui_light2switch, 50);
|
||||||
|
lv_obj_set_height(ui_light2switch, 25);
|
||||||
|
lv_obj_set_x(ui_light2switch, -50);
|
||||||
|
lv_obj_set_y(ui_light2switch, -10);
|
||||||
|
lv_obj_set_align(ui_light2switch, LV_ALIGN_CENTER);
|
||||||
|
|
||||||
|
|
||||||
|
ui_light1switch = lv_switch_create(ui_Screen7);
|
||||||
|
lv_obj_set_width(ui_light1switch, 50);
|
||||||
|
lv_obj_set_height(ui_light1switch, 25);
|
||||||
|
lv_obj_set_x(ui_light1switch, -50);
|
||||||
|
lv_obj_set_y(ui_light1switch, -80);
|
||||||
|
lv_obj_set_align(ui_light1switch, LV_ALIGN_CENTER);
|
||||||
|
|
||||||
|
|
||||||
|
ui_light3percent = lv_label_create(ui_Screen7);
|
||||||
|
lv_obj_set_width(ui_light3percent, LV_SIZE_CONTENT); /// 1
|
||||||
|
lv_obj_set_height(ui_light3percent, LV_SIZE_CONTENT); /// 1
|
||||||
|
lv_obj_set_x(ui_light3percent, 10);
|
||||||
|
lv_obj_set_y(ui_light3percent, 60);
|
||||||
|
lv_obj_set_align(ui_light3percent, LV_ALIGN_CENTER);
|
||||||
|
lv_label_set_text(ui_light3percent, "0 %");
|
||||||
|
lv_obj_set_style_text_font(ui_light3percent, &lv_font_montserrat_22, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||||
|
|
||||||
|
ui_Label9 = lv_label_create(ui_Screen7);
|
||||||
|
lv_obj_set_width(ui_Label9, LV_SIZE_CONTENT); /// 1
|
||||||
|
lv_obj_set_height(ui_Label9, LV_SIZE_CONTENT); /// 1
|
||||||
|
lv_obj_set_x(ui_Label9, -145);
|
||||||
|
lv_obj_set_y(ui_Label9, -10);
|
||||||
|
lv_obj_set_align(ui_Label9, LV_ALIGN_CENTER);
|
||||||
|
lv_label_set_text(ui_Label9, "2");
|
||||||
|
lv_obj_set_style_text_font(ui_Label9, &lv_font_montserrat_22, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||||
|
|
||||||
|
ui_Label12 = lv_label_create(ui_Screen7);
|
||||||
|
lv_obj_set_width(ui_Label12, LV_SIZE_CONTENT); /// 1
|
||||||
|
lv_obj_set_height(ui_Label12, LV_SIZE_CONTENT); /// 1
|
||||||
|
lv_obj_set_x(ui_Label12, -145);
|
||||||
|
lv_obj_set_y(ui_Label12, 60);
|
||||||
|
lv_obj_set_align(ui_Label12, LV_ALIGN_CENTER);
|
||||||
|
lv_label_set_text(ui_Label12, "3");
|
||||||
|
lv_obj_set_style_text_font(ui_Label12, &lv_font_montserrat_22, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||||
|
|
||||||
|
ui_led3 = lv_image_create(ui_Screen7);
|
||||||
|
lv_image_set_src(ui_led3, &ui_img_light_png);
|
||||||
|
lv_obj_set_width(ui_led3, 56);
|
||||||
|
lv_obj_set_height(ui_led3, 56);
|
||||||
|
lv_obj_set_x(ui_led3, -110);
|
||||||
|
lv_obj_set_y(ui_led3, 60);
|
||||||
|
lv_obj_set_align(ui_led3, LV_ALIGN_CENTER);
|
||||||
|
lv_obj_add_flag(ui_led3, LV_OBJ_FLAG_CLICKABLE | LV_OBJ_FLAG_CHECKABLE); /// Flags
|
||||||
|
lv_obj_remove_flag(ui_led3, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
||||||
|
lv_obj_set_style_bg_color(ui_led3, lv_color_hex(0xEFF623), LV_PART_MAIN | LV_STATE_CHECKED);
|
||||||
|
lv_obj_set_style_bg_opa(ui_led3, 255, LV_PART_MAIN | LV_STATE_CHECKED);
|
||||||
|
|
||||||
|
ui_led1 = lv_image_create(ui_Screen7);
|
||||||
|
lv_image_set_src(ui_led1, &ui_img_light_png);
|
||||||
|
lv_obj_set_width(ui_led1, 56);
|
||||||
|
lv_obj_set_height(ui_led1, 56);
|
||||||
|
lv_obj_set_x(ui_led1, -110);
|
||||||
|
lv_obj_set_y(ui_led1, -80);
|
||||||
|
lv_obj_set_align(ui_led1, LV_ALIGN_CENTER);
|
||||||
|
lv_obj_add_flag(ui_led1, LV_OBJ_FLAG_CLICKABLE | LV_OBJ_FLAG_CHECKABLE); /// Flags
|
||||||
|
lv_obj_remove_flag(ui_led1, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
||||||
|
lv_obj_set_style_bg_color(ui_led1, lv_color_hex(0xEFF623), LV_PART_MAIN | LV_STATE_CHECKED);
|
||||||
|
lv_obj_set_style_bg_opa(ui_led1, 255, LV_PART_MAIN | LV_STATE_CHECKED);
|
||||||
|
|
||||||
|
ui_led2 = lv_image_create(ui_Screen7);
|
||||||
|
lv_image_set_src(ui_led2, &ui_img_light_png);
|
||||||
|
lv_obj_set_width(ui_led2, 56);
|
||||||
|
lv_obj_set_height(ui_led2, 56);
|
||||||
|
lv_obj_set_x(ui_led2, -110);
|
||||||
|
lv_obj_set_y(ui_led2, -10);
|
||||||
|
lv_obj_set_align(ui_led2, LV_ALIGN_CENTER);
|
||||||
|
lv_obj_add_flag(ui_led2, LV_OBJ_FLAG_CLICKABLE | LV_OBJ_FLAG_CHECKABLE); /// Flags
|
||||||
|
lv_obj_remove_flag(ui_led2, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
||||||
|
lv_obj_set_style_bg_color(ui_led2, lv_color_hex(0xEFF623), LV_PART_MAIN | LV_STATE_CHECKED);
|
||||||
|
lv_obj_set_style_bg_opa(ui_led2, 255, LV_PART_MAIN | LV_STATE_CHECKED);
|
||||||
|
|
||||||
|
ui_light1percent = lv_label_create(ui_Screen7);
|
||||||
|
lv_obj_set_width(ui_light1percent, LV_SIZE_CONTENT); /// 1
|
||||||
|
lv_obj_set_height(ui_light1percent, LV_SIZE_CONTENT); /// 1
|
||||||
|
lv_obj_set_x(ui_light1percent, 10);
|
||||||
|
lv_obj_set_y(ui_light1percent, -80);
|
||||||
|
lv_obj_set_align(ui_light1percent, LV_ALIGN_CENTER);
|
||||||
|
lv_label_set_text(ui_light1percent, "0 %");
|
||||||
|
lv_obj_set_style_text_font(ui_light1percent, &lv_font_montserrat_22, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||||
|
|
||||||
|
ui_light2percent = lv_label_create(ui_Screen7);
|
||||||
|
lv_obj_set_width(ui_light2percent, LV_SIZE_CONTENT); /// 1
|
||||||
|
lv_obj_set_height(ui_light2percent, LV_SIZE_CONTENT); /// 1
|
||||||
|
lv_obj_set_x(ui_light2percent, 10);
|
||||||
|
lv_obj_set_y(ui_light2percent, -10);
|
||||||
|
lv_obj_set_align(ui_light2percent, LV_ALIGN_CENTER);
|
||||||
|
lv_label_set_text(ui_light2percent, "0 %");
|
||||||
|
lv_obj_set_style_text_font(ui_light2percent, &lv_font_montserrat_22, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||||
|
|
||||||
|
ui_lightup = lv_image_create(ui_Screen7);
|
||||||
|
lv_image_set_src(ui_lightup, &ui_img_up_png);
|
||||||
|
lv_obj_set_width(ui_lightup, 56);
|
||||||
|
lv_obj_set_height(ui_lightup, 56);
|
||||||
|
lv_obj_set_x(ui_lightup, 125);
|
||||||
|
lv_obj_set_y(ui_lightup, 75);
|
||||||
|
lv_obj_set_align(ui_lightup, LV_ALIGN_CENTER);
|
||||||
|
lv_obj_add_flag(ui_lightup, LV_OBJ_FLAG_CLICKABLE); /// Flags
|
||||||
|
lv_obj_remove_flag(ui_lightup, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
||||||
|
|
||||||
|
ui_lightdown = lv_image_create(ui_Screen7);
|
||||||
|
lv_image_set_src(ui_lightdown, &ui_img_down_png);
|
||||||
|
lv_obj_set_width(ui_lightdown, 56);
|
||||||
|
lv_obj_set_height(ui_lightdown, 56);
|
||||||
|
lv_obj_set_x(ui_lightdown, 60);
|
||||||
|
lv_obj_set_y(ui_lightdown, 75);
|
||||||
|
lv_obj_set_align(ui_lightdown, LV_ALIGN_CENTER);
|
||||||
|
lv_obj_add_flag(ui_lightdown, LV_OBJ_FLAG_CLICKABLE); /// Flags
|
||||||
|
lv_obj_remove_flag(ui_lightdown, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
||||||
|
|
||||||
|
ui_ledhome = lv_image_create(ui_Screen7);
|
||||||
|
lv_image_set_src(ui_ledhome, &ui_img_home_png);
|
||||||
|
lv_obj_set_width(ui_ledhome, LV_SIZE_CONTENT); /// 64
|
||||||
|
lv_obj_set_height(ui_ledhome, LV_SIZE_CONTENT); /// 64
|
||||||
|
lv_obj_set_x(ui_ledhome, 125);
|
||||||
|
lv_obj_set_y(ui_ledhome, -80);
|
||||||
|
lv_obj_set_align(ui_ledhome, LV_ALIGN_CENTER);
|
||||||
|
lv_obj_add_flag(ui_ledhome, LV_OBJ_FLAG_CLICKABLE); /// Flags
|
||||||
|
lv_obj_remove_flag(ui_ledhome, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
||||||
|
|
||||||
|
lv_obj_add_event_cb(ui_ledhome, ui_event_ledhome, LV_EVENT_ALL, NULL);
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user