@@ -220,6 +220,17 @@ void draw_machine(lv_obj_t *parent_screen) {
220220 lv_page_set_scrl_fit2 (machine_page , LV_FIT_FILL , LV_FIT_FILL );
221221 lv_page_set_scrl_layout (machine_page , LV_LAYOUT_COL_M );
222222
223+ lv_obj_t * home_cont = lv_cont_create (machine_page , NULL );
224+ lv_cont_set_layout (home_cont , LV_LAYOUT_ROW_M );
225+ lv_cont_set_fit (home_cont , LV_FIT_TIGHT );
226+ lv_obj_t * label_home = lv_label_create (home_cont , NULL );
227+ lv_label_set_text (label_home , "Home:" );
228+ btn_home_all = create_button (home_cont , btn_home_all , " All Axis " , _home_all_event );
229+ btn_home_x = create_button (home_cont , btn_home_x , " X " , _home_x_event );
230+ btn_home_y = create_button (home_cont , btn_home_y , " Y " , _home_y_event );
231+ btn_home_z = create_button (home_cont , btn_home_z , " Z " , _home_z_event );
232+ lv_style_copy (& not_homed_style , lv_btn_get_style (btn_home_x , LV_BTN_STYLE_REL ));
233+
223234 lv_obj_t * cont_cali = lv_cont_create (machine_page , NULL );
224235 lv_cont_set_fit (cont_cali , LV_FIT_TIGHT );
225236 lv_cont_set_layout (cont_cali , LV_LAYOUT_ROW_M );
@@ -234,16 +245,5 @@ void draw_machine(lv_obj_t *parent_screen) {
234245 static lv_obj_t * do_cali_butn ;
235246 create_button (cont_cali , do_cali_butn , "Start" , _start_cali_event );
236247
237- lv_obj_t * home_cont = lv_cont_create (machine_page , NULL );
238- lv_cont_set_layout (home_cont , LV_LAYOUT_ROW_M );
239- lv_cont_set_fit (home_cont , LV_FIT_TIGHT );
240- lv_obj_t * label_home = lv_label_create (home_cont , NULL );
241- lv_label_set_text (label_home , "Home:" );
242- btn_home_all = create_button (home_cont , btn_home_all , " All Axis " , _home_all_event );
243- btn_home_x = create_button (home_cont , btn_home_x , " X " , _home_x_event );
244- btn_home_y = create_button (home_cont , btn_home_y , " Y " , _home_y_event );
245- btn_home_z = create_button (home_cont , btn_home_z , " Z " , _home_z_event );
246- lv_style_copy (& not_homed_style , lv_btn_get_style (btn_home_x , LV_BTN_STYLE_REL ));
247-
248248 update_ui_machine ();
249249}
0 commit comments