|
@ -138,7 +138,7 @@ void gCfgItems_init() { |
|
|
gCfgItems.levelingPos[4][0] = X_BED_SIZE / 2; |
|
|
gCfgItems.levelingPos[4][0] = X_BED_SIZE / 2; |
|
|
gCfgItems.levelingPos[4][1] = Y_BED_SIZE / 2; |
|
|
gCfgItems.levelingPos[4][1] = Y_BED_SIZE / 2; |
|
|
gCfgItems.cloud_enable = true; |
|
|
gCfgItems.cloud_enable = true; |
|
|
#if ENABLED(USE_WIFI_FUNCTION) |
|
|
#if ENABLED(MKS_WIFI_MODULE) |
|
|
gCfgItems.wifi_mode_sel = STA_MODEL; |
|
|
gCfgItems.wifi_mode_sel = STA_MODEL; |
|
|
gCfgItems.fileSysType = FILE_SYS_SD; |
|
|
gCfgItems.fileSysType = FILE_SYS_SD; |
|
|
gCfgItems.wifi_type = ESP_WIFI; |
|
|
gCfgItems.wifi_type = ESP_WIFI; |
|
@ -203,7 +203,7 @@ void ui_cfg_init() { |
|
|
uiCfg.filament_unloading_time_flg = 0; |
|
|
uiCfg.filament_unloading_time_flg = 0; |
|
|
uiCfg.filament_unloading_time_cnt = 0; |
|
|
uiCfg.filament_unloading_time_cnt = 0; |
|
|
|
|
|
|
|
|
#if ENABLED(USE_WIFI_FUNCTION) |
|
|
#if ENABLED(MKS_WIFI_MODULE) |
|
|
memset(&wifiPara, 0, sizeof(wifiPara)); |
|
|
memset(&wifiPara, 0, sizeof(wifiPara)); |
|
|
memset(&ipPara, 0, sizeof(ipPara)); |
|
|
memset(&ipPara, 0, sizeof(ipPara)); |
|
|
strcpy(wifiPara.ap_name, WIFI_AP_NAME); |
|
|
strcpy(wifiPara.ap_name, WIFI_AP_NAME); |
|
@ -542,7 +542,7 @@ char *getDispText(int index) { |
|
|
strcpy(public_buf_l, tool_menu.title); |
|
|
strcpy(public_buf_l, tool_menu.title); |
|
|
break; |
|
|
break; |
|
|
case WIFI_LIST_UI: |
|
|
case WIFI_LIST_UI: |
|
|
#if ENABLED(USE_WIFI_FUNCTION) |
|
|
#if ENABLED(MKS_WIFI_MODULE) |
|
|
strcpy(public_buf_l, list_menu.title); |
|
|
strcpy(public_buf_l, list_menu.title); |
|
|
break; |
|
|
break; |
|
|
#endif |
|
|
#endif |
|
@ -1040,7 +1040,7 @@ void GUI_RefreshPage() { |
|
|
*/ |
|
|
*/ |
|
|
break; |
|
|
break; |
|
|
|
|
|
|
|
|
#if ENABLED(USE_WIFI_FUNCTION) |
|
|
#if ENABLED(MKS_WIFI_MODULE) |
|
|
case WIFI_UI: |
|
|
case WIFI_UI: |
|
|
if (temps_update_flag) { |
|
|
if (temps_update_flag) { |
|
|
disp_wifi_state(); |
|
|
disp_wifi_state(); |
|
@ -1061,7 +1061,7 @@ void GUI_RefreshPage() { |
|
|
break; |
|
|
break; |
|
|
case DIALOG_UI: |
|
|
case DIALOG_UI: |
|
|
filament_dialog_handle(); |
|
|
filament_dialog_handle(); |
|
|
TERN_(USE_WIFI_FUNCTION, wifi_scan_handle()); |
|
|
TERN_(MKS_WIFI_MODULE, wifi_scan_handle()); |
|
|
break; |
|
|
break; |
|
|
case MESHLEVELING_UI: |
|
|
case MESHLEVELING_UI: |
|
|
/*disp_zpos();*/ |
|
|
/*disp_zpos();*/ |
|
@ -1069,7 +1069,7 @@ void GUI_RefreshPage() { |
|
|
case HARDWARE_TEST_UI: |
|
|
case HARDWARE_TEST_UI: |
|
|
break; |
|
|
break; |
|
|
case WIFI_LIST_UI: |
|
|
case WIFI_LIST_UI: |
|
|
#if ENABLED(USE_WIFI_FUNCTION) |
|
|
#if ENABLED(MKS_WIFI_MODULE) |
|
|
if (printing_rate_update_flag) { |
|
|
if (printing_rate_update_flag) { |
|
|
disp_wifi_list(); |
|
|
disp_wifi_list(); |
|
|
printing_rate_update_flag = false; |
|
|
printing_rate_update_flag = false; |
|
@ -1080,7 +1080,7 @@ void GUI_RefreshPage() { |
|
|
/*update_password_disp();
|
|
|
/*update_password_disp();
|
|
|
update_join_state_disp();*/ |
|
|
update_join_state_disp();*/ |
|
|
break; |
|
|
break; |
|
|
#if ENABLED(USE_WIFI_FUNCTION) |
|
|
#if ENABLED(MKS_WIFI_MODULE) |
|
|
case WIFI_TIPS_UI: |
|
|
case WIFI_TIPS_UI: |
|
|
switch (wifi_tips_type) { |
|
|
switch (wifi_tips_type) { |
|
|
case TIPS_TYPE_JOINING: |
|
|
case TIPS_TYPE_JOINING: |
|
@ -1216,11 +1216,11 @@ void clear_cur_ui() { |
|
|
case TMC_CURRENT_UI: lv_clear_tmc_current_settings(); break; |
|
|
case TMC_CURRENT_UI: lv_clear_tmc_current_settings(); break; |
|
|
#endif |
|
|
#endif |
|
|
case EEPROM_SETTINGS_UI: lv_clear_eeprom_settings(); break; |
|
|
case EEPROM_SETTINGS_UI: lv_clear_eeprom_settings(); break; |
|
|
#if HAS_STEALTHCHOP |
|
|
#if HAS_STEALTHCHOP |
|
|
case TMC_MODE_UI: lv_clear_tmc_step_mode_settings(); break; |
|
|
case TMC_MODE_UI: lv_clear_tmc_step_mode_settings(); break; |
|
|
#endif |
|
|
#endif |
|
|
#if ENABLED(USE_WIFI_FUNCTION) |
|
|
#if ENABLED(USE_WIFI_FUNCTION) |
|
|
case WIFI_SETTINGS_UI: lv_clear_wifi_settings(); break; |
|
|
case WIFI_SETTINGS_UI: lv_clear_wifi_settings(); break; |
|
|
#endif |
|
|
#endif |
|
|
#if USE_SENSORLESS |
|
|
#if USE_SENSORLESS |
|
|
case HOMING_SENSITIVITY_UI: lv_clear_homing_sensitivity_settings(); break; |
|
|
case HOMING_SENSITIVITY_UI: lv_clear_homing_sensitivity_settings(); break; |
|
@ -1516,10 +1516,8 @@ lv_obj_t* lv_big_button_create(lv_obj_t *par, const char *img, const char *text, |
|
|
else |
|
|
else |
|
|
lv_obj_align(label, btn, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET); |
|
|
lv_obj_align(label, btn, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET); |
|
|
} |
|
|
} |
|
|
#if HAS_ROTARY_ENCODER |
|
|
if (TERN0(HAS_ROTARY_ENCODER, gCfgItems.encoder_enable)) |
|
|
if (gCfgItems.encoder_enable == true) |
|
|
lv_group_add_obj(g, btn); |
|
|
lv_group_add_obj(g, btn); |
|
|
|
|
|
#endif |
|
|
|
|
|
return btn; |
|
|
return btn; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -1535,11 +1533,8 @@ lv_obj_t* lv_screen_menu_item(lv_obj_t *par, const char *text, lv_coord_t x, lv_ |
|
|
lv_label_set_text(label, text); |
|
|
lv_label_set_text(label, text); |
|
|
lv_obj_align(label, btn, LV_ALIGN_IN_LEFT_MID, 0, 0); |
|
|
lv_obj_align(label, btn, LV_ALIGN_IN_LEFT_MID, 0, 0); |
|
|
} |
|
|
} |
|
|
#if HAS_ROTARY_ENCODER |
|
|
if (TERN0(HAS_ROTARY_ENCODER, gCfgItems.encoder_enable)) |
|
|
if (gCfgItems.encoder_enable == true) { |
|
|
lv_group_add_obj(g, btn); |
|
|
lv_group_add_obj(g, btn); |
|
|
|
|
|
} |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
if (drawArrow) (void)lv_imgbtn_create(par, "F:/bmp_arrow.bin", x + PARA_UI_SIZE_X, y + PARA_UI_ARROW_V, cb, id); |
|
|
if (drawArrow) (void)lv_imgbtn_create(par, "F:/bmp_arrow.bin", x + PARA_UI_SIZE_X, y + PARA_UI_ARROW_V, cb, id); |
|
|
|
|
|
|
|
|