mirror of
https://github.com/suchmememanyskill/CYD-Klipper.git
synced 2026-03-21 05:33:24 +00:00
Fix macros tab controlling other printers
This commit is contained in:
@@ -40,9 +40,14 @@ void macros_add_power_devices_to_panel(lv_obj_t * root_panel, POWERQUERY query)
|
||||
}
|
||||
}
|
||||
|
||||
void macros_draw_power_fullscreen(PRINTER_CONFIG * config)
|
||||
void macros_set_current_config(PRINTER_CONFIG * config)
|
||||
{
|
||||
curernt_config = config;
|
||||
}
|
||||
|
||||
void macros_draw_power_fullscreen(PRINTER_CONFIG * config)
|
||||
{
|
||||
macros_set_current_config(config);
|
||||
|
||||
lv_obj_t * parent = lv_create_empty_panel(lv_scr_act());
|
||||
lv_obj_set_style_bg_opa(parent, LV_OPA_100, 0);
|
||||
|
||||
@@ -5,5 +5,6 @@
|
||||
|
||||
void macros_add_macros_to_panel(lv_obj_t * root_panel, MACROSQUERY query);
|
||||
void macros_add_power_devices_to_panel(lv_obj_t * root_panel, POWERQUERY query);
|
||||
void macros_set_current_config(PRINTER_CONFIG * config);
|
||||
void macros_draw_power_fullscreen(PRINTER_CONFIG * config);
|
||||
void macros_draw_power_fullscreen();
|
||||
@@ -11,6 +11,8 @@ static void btn_goto_settings(lv_event_t * e){
|
||||
}
|
||||
|
||||
void macros_panel_init(lv_obj_t* panel) {
|
||||
macros_set_current_config(get_current_printer_config());
|
||||
|
||||
lv_obj_t * btn = lv_btn_create(panel);
|
||||
lv_obj_add_event_cb(btn, btn_goto_settings, LV_EVENT_CLICKED, NULL);
|
||||
lv_obj_set_size(btn, CYD_SCREEN_PANEL_WIDTH_PX - CYD_SCREEN_GAP_PX * 2, CYD_SCREEN_MIN_BUTTON_HEIGHT_PX);
|
||||
|
||||
Reference in New Issue
Block a user