Auto Veggie & Flowering Mode
This commit is contained in:
@@ -71,6 +71,7 @@ void ui_Screen4_screen_init(void);
|
||||
lv_obj_t * ui_Screen4;
|
||||
lv_obj_t * ui_wifistatus;
|
||||
lv_obj_t * ui_lblgrowmode;
|
||||
void ui_event_wifibtn(lv_event_t * e);
|
||||
lv_obj_t * ui_wifibtn;
|
||||
void ui_event_growmodebtn(lv_event_t * e);
|
||||
lv_obj_t * ui_growmodebtn;
|
||||
@@ -157,6 +158,14 @@ void ui_event_btnfanhome(lv_event_t * e)
|
||||
_ui_screen_change(&ui_Screen1, LV_SCR_LOAD_ANIM_FADE_ON, 500, 0, &ui_Screen1_screen_init);
|
||||
}
|
||||
}
|
||||
void ui_event_wifibtn(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_Screen5, LV_SCR_LOAD_ANIM_FADE_ON, 500, 0, &ui_Screen5_screen_init);
|
||||
}
|
||||
}
|
||||
void ui_event_growmodebtn(lv_event_t * e)
|
||||
{
|
||||
lv_event_code_t event_code = lv_event_get_code(e);
|
||||
|
||||
@@ -81,6 +81,7 @@ void ui_Screen4_screen_init(void);
|
||||
extern lv_obj_t * ui_Screen4;
|
||||
extern lv_obj_t * ui_wifistatus;
|
||||
extern lv_obj_t * ui_lblgrowmode;
|
||||
void ui_event_wifibtn(lv_event_t * e);
|
||||
extern lv_obj_t * ui_wifibtn;
|
||||
void ui_event_growmodebtn(lv_event_t * e);
|
||||
extern lv_obj_t * ui_growmodebtn;
|
||||
|
||||
@@ -128,7 +128,7 @@ void ui_Screen1_screen_init(void)
|
||||
lv_obj_set_align(ui_settings, LV_ALIGN_CENTER);
|
||||
|
||||
ui_growmode = lv_dropdown_create(ui_Screen1);
|
||||
lv_dropdown_set_options(ui_growmode, "Manuell\nVeggie\nFlower\n");
|
||||
lv_dropdown_set_options(ui_growmode, "Manuell\nVeggie\nFlower");
|
||||
lv_obj_set_width(ui_growmode, 150);
|
||||
lv_obj_set_height(ui_growmode, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_x(ui_growmode, 0);
|
||||
|
||||
@@ -67,6 +67,7 @@ void ui_Screen4_screen_init(void)
|
||||
lv_obj_set_y(ui_homebtn, 80);
|
||||
lv_obj_set_align(ui_homebtn, LV_ALIGN_CENTER);
|
||||
|
||||
lv_obj_add_event_cb(ui_wifibtn, ui_event_wifibtn, LV_EVENT_ALL, NULL);
|
||||
lv_obj_add_event_cb(ui_growmodebtn, ui_event_growmodebtn, LV_EVENT_ALL, NULL);
|
||||
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ void ui_Screen6_screen_init(void)
|
||||
lv_obj_set_style_text_font(ui_sunsetcheck, &lv_font_montserrat_22, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_setmode = lv_dropdown_create(ui_Screen6);
|
||||
lv_dropdown_set_options(ui_setmode, "Veggie\nFlower\n");
|
||||
lv_dropdown_set_options(ui_setmode, "Veggie\nFlower");
|
||||
lv_obj_set_width(ui_setmode, 150);
|
||||
lv_obj_set_height(ui_setmode, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_x(ui_setmode, -75);
|
||||
|
||||
Reference in New Issue
Block a user