home screen load delete option
This commit is contained in:
parent
b2011af18c
commit
654ad8baad
@ -10,6 +10,6 @@
|
|||||||
|
|
||||||
#include "PSE_unit.h"
|
#include "PSE_unit.h"
|
||||||
|
|
||||||
void Home_Screen_Gen(pse_unit* units, uint8_t pse_unit_num);
|
void Home_Screen_Gen(pse_unit* units, uint8_t pse_unit_num, uint8_t delete);
|
||||||
|
|
||||||
#endif /* INC_HOME_SCREEN_H_ */
|
#endif /* INC_HOME_SCREEN_H_ */
|
||||||
|
@ -34,9 +34,7 @@ static void back_button_handler(lv_event_t * e){
|
|||||||
pse_stepper_planer_compute_sps(c_pse_unit);
|
pse_stepper_planer_compute_sps(c_pse_unit);
|
||||||
|
|
||||||
// go back to the main menu
|
// go back to the main menu
|
||||||
lv_obj_t* curr_scr = lv_scr_act();
|
Home_Screen_Gen(c_pse_units, c_pse_units_num, true);
|
||||||
Home_Screen_Gen(c_pse_units, c_pse_units_num);
|
|
||||||
lv_obj_del(curr_scr);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -179,7 +179,7 @@ static lv_obj_t* PSE_unit_widget(lv_obj_t* parent, pse_unit* pse_unit){
|
|||||||
return cont;
|
return cont;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Home_Screen_Gen(pse_unit* pse_units, uint8_t pse_unit_num){
|
void Home_Screen_Gen(pse_unit* pse_units, uint8_t pse_unit_num, uint8_t delete){
|
||||||
// Create a new screen
|
// Create a new screen
|
||||||
lv_obj_t* scr = lv_obj_create(NULL);
|
lv_obj_t* scr = lv_obj_create(NULL);
|
||||||
screen = scr;
|
screen = scr;
|
||||||
@ -250,5 +250,5 @@ void Home_Screen_Gen(pse_unit* pse_units, uint8_t pse_unit_num){
|
|||||||
}
|
}
|
||||||
|
|
||||||
// fade in the new screen
|
// fade in the new screen
|
||||||
lv_scr_load_anim(scr, LV_SCR_LOAD_ANIM_FADE_ON, 0, 0, false);
|
lv_scr_load_anim(scr, LV_SCR_LOAD_ANIM_FADE_ON, 0, 0, delete);
|
||||||
}
|
}
|
||||||
|
@ -293,7 +293,7 @@ int main(void)
|
|||||||
load_units(pse_units, pse_syringes, pse_stepper_confs, pse_home_displays, PSE_UNITS_NUM, 0);
|
load_units(pse_units, pse_syringes, pse_stepper_confs, pse_home_displays, PSE_UNITS_NUM, 0);
|
||||||
|
|
||||||
// Load the home screen
|
// Load the home screen
|
||||||
Home_Screen_Gen(pse_units, PSE_UNITS_NUM);
|
Home_Screen_Gen(pse_units, PSE_UNITS_NUM, false);
|
||||||
/* USER CODE END 2 */
|
/* USER CODE END 2 */
|
||||||
|
|
||||||
/* Infinite loop */
|
/* Infinite loop */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user