Bladeren bron

MKS UI prelim. cleanup (#20763)

Scott Lahteine 3 jaren geleden
bovenliggende
commit
44c57ab05a
No account linked to committer's email address
78 gewijzigde bestanden met toevoegingen van 301 en 942 verwijderingen
  1. 0
    2
      Marlin/src/lcd/extui/lib/mks_ui/SPIFlashStorage.cpp
  2. 0
    2
      Marlin/src/lcd/extui/lib/mks_ui/SPI_TFT.cpp
  3. 1
    8
      Marlin/src/lcd/extui/lib/mks_ui/draw_about.cpp
  4. 0
    1
      Marlin/src/lcd/extui/lib/mks_ui/draw_about.h
  5. 1
    2
      Marlin/src/lcd/extui/lib/mks_ui/draw_baby_stepping.cpp
  6. 0
    1
      Marlin/src/lcd/extui/lib/mks_ui/draw_baby_stepping.h
  7. 3
    13
      Marlin/src/lcd/extui/lib/mks_ui/draw_change_speed.cpp
  8. 0
    1
      Marlin/src/lcd/extui/lib/mks_ui/draw_change_speed.h
  9. 7
    25
      Marlin/src/lcd/extui/lib/mks_ui/draw_dialog.cpp
  10. 1
    2
      Marlin/src/lcd/extui/lib/mks_ui/draw_dialog.h
  11. 0
    23
      Marlin/src/lcd/extui/lib/mks_ui/draw_error_message.cpp
  12. 0
    1
      Marlin/src/lcd/extui/lib/mks_ui/draw_error_message.h
  13. 0
    4
      Marlin/src/lcd/extui/lib/mks_ui/draw_extrusion.cpp
  14. 0
    1
      Marlin/src/lcd/extui/lib/mks_ui/draw_extrusion.h
  15. 9
    18
      Marlin/src/lcd/extui/lib/mks_ui/draw_fan.cpp
  16. 0
    1
      Marlin/src/lcd/extui/lib/mks_ui/draw_fan.h
  17. 1
    5
      Marlin/src/lcd/extui/lib/mks_ui/draw_filament_change.cpp
  18. 0
    1
      Marlin/src/lcd/extui/lib/mks_ui/draw_filament_change.h
  19. 0
    4
      Marlin/src/lcd/extui/lib/mks_ui/draw_home.cpp
  20. 0
    1
      Marlin/src/lcd/extui/lib/mks_ui/draw_home.h
  21. 4
    15
      Marlin/src/lcd/extui/lib/mks_ui/draw_keyboard.cpp
  22. 0
    4
      Marlin/src/lcd/extui/lib/mks_ui/draw_language.cpp
  23. 0
    1
      Marlin/src/lcd/extui/lib/mks_ui/draw_language.h
  24. 1
    4
      Marlin/src/lcd/extui/lib/mks_ui/draw_level_settings.cpp
  25. 0
    4
      Marlin/src/lcd/extui/lib/mks_ui/draw_manuaLevel.cpp
  26. 0
    1
      Marlin/src/lcd/extui/lib/mks_ui/draw_manuaLevel.h
  27. 5
    23
      Marlin/src/lcd/extui/lib/mks_ui/draw_manual_level_pos_settings.cpp
  28. 6
    16
      Marlin/src/lcd/extui/lib/mks_ui/draw_max_feedrate_settings.cpp
  29. 1
    5
      Marlin/src/lcd/extui/lib/mks_ui/draw_motor_settings.cpp
  30. 1
    5
      Marlin/src/lcd/extui/lib/mks_ui/draw_move_motor.cpp
  31. 0
    1
      Marlin/src/lcd/extui/lib/mks_ui/draw_move_motor.h
  32. 0
    4
      Marlin/src/lcd/extui/lib/mks_ui/draw_number_key.cpp
  33. 0
    7
      Marlin/src/lcd/extui/lib/mks_ui/draw_operation.cpp
  34. 0
    1
      Marlin/src/lcd/extui/lib/mks_ui/draw_operation.h
  35. 0
    4
      Marlin/src/lcd/extui/lib/mks_ui/draw_pause_message.cpp
  36. 0
    1
      Marlin/src/lcd/extui/lib/mks_ui/draw_pause_message.h
  37. 3
    8
      Marlin/src/lcd/extui/lib/mks_ui/draw_pause_position.cpp
  38. 0
    4
      Marlin/src/lcd/extui/lib/mks_ui/draw_preHeat.cpp
  39. 0
    1
      Marlin/src/lcd/extui/lib/mks_ui/draw_preHeat.h
  40. 1
    1
      Marlin/src/lcd/extui/lib/mks_ui/draw_print_file.cpp
  41. 4
    6
      Marlin/src/lcd/extui/lib/mks_ui/draw_print_file.h
  42. 0
    25
      Marlin/src/lcd/extui/lib/mks_ui/draw_printing.cpp
  43. 0
    1
      Marlin/src/lcd/extui/lib/mks_ui/draw_printing.h
  44. 2
    44
      Marlin/src/lcd/extui/lib/mks_ui/draw_ready_print.cpp
  45. 0
    1
      Marlin/src/lcd/extui/lib/mks_ui/draw_ready_print.h
  46. 8
    28
      Marlin/src/lcd/extui/lib/mks_ui/draw_set.cpp
  47. 0
    1
      Marlin/src/lcd/extui/lib/mks_ui/draw_set.h
  48. 5
    16
      Marlin/src/lcd/extui/lib/mks_ui/draw_step_settings.cpp
  49. 6
    17
      Marlin/src/lcd/extui/lib/mks_ui/draw_tmc_current_settings.cpp
  50. 1
    3
      Marlin/src/lcd/extui/lib/mks_ui/draw_tmc_step_mode_settings.cpp
  51. 6
    13
      Marlin/src/lcd/extui/lib/mks_ui/draw_tool.cpp
  52. 0
    1
      Marlin/src/lcd/extui/lib/mks_ui/draw_tool.h
  53. 0
    1
      Marlin/src/lcd/extui/lib/mks_ui/draw_touch_calibration.h
  54. 52
    101
      Marlin/src/lcd/extui/lib/mks_ui/draw_ui.cpp
  55. 1
    1
      Marlin/src/lcd/extui/lib/mks_ui/draw_ui.h
  56. 2
    3
      Marlin/src/lcd/extui/lib/mks_ui/draw_wifi.cpp
  57. 3
    0
      Marlin/src/lcd/extui/lib/mks_ui/draw_wifi_list.cpp
  58. 0
    10
      Marlin/src/lcd/extui/lib/mks_ui/gb2312_puhui16.cpp
  59. 1
    19
      Marlin/src/lcd/extui/lib/mks_ui/mks_hardware_test.cpp
  60. 1
    15
      Marlin/src/lcd/extui/lib/mks_ui/pic_manager.cpp
  61. 0
    2
      Marlin/src/lcd/extui/lib/mks_ui/pic_manager.h
  62. 0
    3
      Marlin/src/lcd/extui/lib/mks_ui/printer_operation.cpp
  63. 3
    42
      Marlin/src/lcd/extui/lib/mks_ui/tft_Language_en.h
  64. 4
    26
      Marlin/src/lcd/extui/lib/mks_ui/tft_Language_fr.h
  65. 0
    20
      Marlin/src/lcd/extui/lib/mks_ui/tft_Language_it.h
  66. 2
    21
      Marlin/src/lcd/extui/lib/mks_ui/tft_Language_ru.h
  67. 54
    60
      Marlin/src/lcd/extui/lib/mks_ui/tft_Language_s_cn.h
  68. 14
    35
      Marlin/src/lcd/extui/lib/mks_ui/tft_Language_sp.h
  69. 4
    12
      Marlin/src/lcd/extui/lib/mks_ui/tft_Language_t_cn.h
  70. 4
    23
      Marlin/src/lcd/extui/lib/mks_ui/tft_lvgl_configuration.cpp
  71. 3
    0
      Marlin/src/lcd/extui/lib/mks_ui/tft_lvgl_configuration.h
  72. 28
    83
      Marlin/src/lcd/extui/lib/mks_ui/tft_multi_language.cpp
  73. 5
    18
      Marlin/src/lcd/extui/lib/mks_ui/tft_multi_language.h
  74. 1
    1
      Marlin/src/lcd/extui/lib/mks_ui/wifiSerial.h
  75. 28
    32
      Marlin/src/lcd/extui/lib/mks_ui/wifi_module.cpp
  76. 8
    8
      Marlin/src/lcd/extui/lib/mks_ui/wifi_module.h
  77. 6
    23
      Marlin/src/lcd/extui/lib/mks_ui/wifi_upload.cpp
  78. 0
    1
      Marlin/src/lcd/extui/lib/mks_ui/wifi_upload.h

+ 0
- 2
Marlin/src/lcd/extui/lib/mks_ui/SPIFlashStorage.cpp Bestand weergeven

@@ -169,7 +169,6 @@ void SPIFlashStorage::endWrite() {
169 169
 
170 170
 void SPIFlashStorage::savePage(uint8_t* buffer) {
171 171
   W25QXX.SPI_FLASH_BufferWrite(buffer, m_startAddress + (SPI_FLASH_PageSize * m_currentPage), SPI_FLASH_PageSize);
172
-
173 172
   // Test env
174 173
   // char fname[256];
175 174
   // snprintf(fname, sizeof(fname), "./pages/page-%03d.data", m_currentPage);
@@ -180,7 +179,6 @@ void SPIFlashStorage::savePage(uint8_t* buffer) {
180 179
 
181 180
 void SPIFlashStorage::loadPage(uint8_t* buffer) {
182 181
   W25QXX.SPI_FLASH_BufferRead(buffer, m_startAddress + (SPI_FLASH_PageSize * m_currentPage), SPI_FLASH_PageSize);
183
-
184 182
   // Test env
185 183
   // char fname[256];
186 184
   // snprintf(fname, sizeof(fname), "./pages/page-%03d.data", m_currentPage);

+ 0
- 2
Marlin/src/lcd/extui/lib/mks_ui/SPI_TFT.cpp Bestand weergeven

@@ -73,8 +73,6 @@ void TFT::LCD_clear(uint16_t color) {
73 73
   tftio.WriteMultiple(color, (uint32_t)(TFT_WIDTH) * (TFT_HEIGHT));
74 74
 }
75 75
 
76
-extern unsigned char bmp_public_buf[17 * 1024];
77
-
78 76
 void TFT::LCD_Draw_Logo() {
79 77
   #if HAS_LOGO_IN_FLASH
80 78
     setWindow(0, 0, TFT_WIDTH, TFT_HEIGHT);

+ 1
- 8
Marlin/src/lcd/extui/lib/mks_ui/draw_about.cpp Bestand weergeven

@@ -25,16 +25,12 @@
25 25
 
26 26
 #include "draw_ui.h"
27 27
 #include <lv_conf.h>
28
-//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
29
-//#include "../lvgl/src/lv_objx/lv_img.h"
30
-//#include "../lvgl/src/lv_core/lv_disp.h"
31
-//#include "../lvgl/src/lv_core/lv_refr.h"
32 28
 
33 29
 #include "../../../../inc/MarlinConfig.h"
34 30
 
35 31
 extern lv_group_t *g;
36 32
 static lv_obj_t *scr;
37
-static lv_obj_t *fw_type, *board; //*fw_version;
33
+static lv_obj_t *fw_type, *board;
38 34
 
39 35
 enum { ID_A_RETURN = 1 };
40 36
 
@@ -52,9 +48,6 @@ void lv_draw_about(void) {
52 48
   scr = lv_screen_create(ABOUT_UI);
53 49
   lv_big_button_create(scr, "F:/bmp_return.bin", common_menu.text_back, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight, event_handler, ID_A_RETURN);
54 50
 
55
-  //fw_version = lv_label_create(scr, SHORT_BUILD_VERSION);
56
-  //lv_obj_align(fw_version, nullptr, LV_ALIGN_CENTER, 0, -60);
57
-
58 51
   fw_type = lv_label_create(scr, "Firmware: Marlin " SHORT_BUILD_VERSION);
59 52
   lv_obj_align(fw_type, nullptr, LV_ALIGN_CENTER, 0, -20);
60 53
 

+ 0
- 1
Marlin/src/lcd/extui/lib/mks_ui/draw_about.h Bestand weergeven

@@ -28,7 +28,6 @@
28 28
 extern void lv_draw_about(void);
29 29
 extern void lv_clear_about();
30 30
 
31
-//extern void disp_temp_ready_print();
32 31
 #ifdef __cplusplus
33 32
   } /* C-declarations for C++ */
34 33
 #endif

+ 1
- 2
Marlin/src/lcd/extui/lib/mks_ui/draw_baby_stepping.cpp Bestand weergeven

@@ -87,7 +87,7 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) {
87 87
       has_adjust_z = 1;
88 88
       break;
89 89
     case ID_BABY_STEP_Z_N:
90
-      sprintf_P(baby_buf, PSTR("M290 Z%.3f"), babystep_dist);
90
+      sprintf_P(baby_buf, PSTR("M290 Z%.3f"), -babystep_dist);
91 91
       gcode.process_subcommands_now_P(PSTR(baby_buf));
92 92
       has_adjust_z = 1;
93 93
       break;
@@ -136,7 +136,6 @@ void lv_draw_baby_stepping(void) {
136 136
 }
137 137
 
138 138
 void disp_baby_step_dist() {
139
-  // char buf[30] = {0};
140 139
   if ((int)(100 * babystep_dist) == 1)
141 140
     lv_imgbtn_set_src_both(buttonV, "F:/bmp_baby_move0_01.bin");
142 141
   else if ((int)(100 * babystep_dist) == 5)

+ 0
- 1
Marlin/src/lcd/extui/lib/mks_ui/draw_baby_stepping.h Bestand weergeven

@@ -30,7 +30,6 @@ extern void lv_clear_baby_stepping();
30 30
 extern void disp_baby_step_dist();
31 31
 extern void disp_z_offset_value();
32 32
 
33
-//extern void disp_temp_ready_print();
34 33
 #ifdef __cplusplus
35 34
   } /* C-declarations for C++ */
36 35
 #endif

+ 3
- 13
Marlin/src/lcd/extui/lib/mks_ui/draw_change_speed.cpp Bestand weergeven

@@ -25,10 +25,6 @@
25 25
 
26 26
 #include "draw_ui.h"
27 27
 #include <lv_conf.h>
28
-//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
29
-//#include "../lvgl/src/lv_objx/lv_img.h"
30
-//#include "../lvgl/src/lv_core/lv_disp.h"
31
-//#include "../lvgl/src/lv_core/lv_refr.h"
32 28
 
33 29
 #include "../../../../module/planner.h"
34 30
 #include "../../../../inc/MarlinConfig.h"
@@ -65,9 +61,6 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) {
65 61
           planner.flow_percentage[0] += uiCfg.stepPrintSpeed;
66 62
         else
67 63
           planner.flow_percentage[0] = MAX_EXT_SPEED_PERCENT;
68
-        //planner.e_factor[0]= planner.flow_percentage[0]*0.01;
69
-        //planner.flow_percentage[1] = planner.flow_percentage[0];
70
-        //planner.e_factor[1]= planner.flow_percentage[1]*0.01;
71 64
         planner.refresh_e_factor(0);
72 65
         #if HAS_MULTI_EXTRUDER
73 66
           planner.flow_percentage[1] = planner.flow_percentage[0];
@@ -88,9 +81,6 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) {
88 81
           planner.flow_percentage[0] -= uiCfg.stepPrintSpeed;
89 82
         else
90 83
           planner.flow_percentage[0] = MIN_EXT_SPEED_PERCENT;
91
-        //planner.e_factor[0]= planner.flow_percentage[0] * 0.01;
92
-        //planner.flow_percentage[1] = planner.flow_percentage[0];
93
-        //planner.e_factor[1]= planner.flow_percentage[1] * 0.01;
94 84
         planner.refresh_e_factor(0);
95 85
         #if HAS_MULTI_EXTRUDER
96 86
           planner.flow_percentage[1] = planner.flow_percentage[0];
@@ -143,9 +133,9 @@ void lv_draw_change_speed(void) {
143 133
   lv_big_button_create(scr, "F:/bmp_return.bin", common_menu.text_back, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight, event_handler, ID_C_RETURN);
144 134
 
145 135
   // Create labels on the image buttons
146
-  labelMov              = lv_label_create_empty(buttonMov);
147
-  labelExt              = lv_label_create_empty(buttonExt);
148
-  labelStep             = lv_label_create_empty(buttonStep);
136
+  labelMov  = lv_label_create_empty(buttonMov);
137
+  labelExt  = lv_label_create_empty(buttonExt);
138
+  labelStep = lv_label_create_empty(buttonStep);
149 139
 
150 140
   #if HAS_ROTARY_ENCODER
151 141
     if (gCfgItems.encoder_enable) {

+ 0
- 1
Marlin/src/lcd/extui/lib/mks_ui/draw_change_speed.h Bestand weergeven

@@ -34,7 +34,6 @@ extern void disp_speed_step();
34 34
 extern void disp_print_speed();
35 35
 extern void disp_speed_type();
36 36
 
37
-//extern void disp_temp_ready_print();
38 37
 #ifdef __cplusplus
39 38
   } /* C-declarations for C++ */
40 39
 #endif

+ 7
- 25
Marlin/src/lcd/extui/lib/mks_ui/draw_dialog.cpp Bestand weergeven

@@ -31,11 +31,6 @@
31 31
 #include "draw_ui.h"
32 32
 #include <lv_conf.h>
33 33
 
34
-//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
35
-//#include "../lvgl/src/lv_objx/lv_img.h"
36
-//#include "../lvgl/src/lv_core/lv_disp.h"
37
-//#include "../lvgl/src/lv_core/lv_refr.h"
38
-
39 34
 #include "../../../../sd/cardreader.h"
40 35
 #include "../../../../gcode/queue.h"
41 36
 #include "../../../../module/temperature.h"
@@ -100,7 +95,6 @@ static void btn_ok_event_cb(lv_obj_t *btn, lv_event_t event) {
100 95
         card.openFileRead(cur_name);
101 96
         if (card.isFileOpen()) {
102 97
           feedrate_percentage = 100;
103
-          //saved_feedrate_percentage = feedrate_percentage;
104 98
           planner.flow_percentage[0] = 100;
105 99
           planner.e_factor[0]        = planner.flow_percentage[0] * 0.01f;
106 100
           #if HAS_MULTI_EXTRUDER
@@ -123,20 +117,8 @@ static void btn_ok_event_cb(lv_obj_t *btn, lv_event_t event) {
123 117
     lv_draw_ready_print();
124 118
 
125 119
     #if ENABLED(SDSUPPORT)
126
-      //card.endFilePrint();
127
-      //wait_for_heatup = false;
128 120
       uiCfg.print_state           = IDLE;
129 121
       card.flag.abort_sd_printing = true;
130
-      //queue.clear();
131
-      //quickstop_stepper();
132
-      //print_job_timer.stop();
133
-      //thermalManager.disable_all_heaters();
134
-
135
-      //#if ENABLED(POWER_LOSS_RECOVERY)
136
-      //  recovery.purge();
137
-      //#endif
138
-      //queue.enqueue_now_P(PSTR("G91\nG1 Z10\nG90\nG28 X0 Y0"));
139
-      //queue.inject_P(PSTR("G91\nG1 Z10\nG90\nG28 X0 Y0\nM84\nM107"));
140 122
     #endif
141 123
   }
142 124
   else if (DIALOG_IS(TYPE_FINISH_PRINT)) {
@@ -244,19 +226,19 @@ void lv_draw_dialog(uint8_t type) {
244 226
   else if (DIALOG_IS(WIFI_ENABLE_TIPS)) {
245 227
     btnCancel = lv_button_btn_create(scr, BTN_OK_X + 90, BTN_OK_Y, 100, 50, btn_cancel_event_cb);
246 228
     lv_obj_t *labelCancel = lv_label_create_empty(btnCancel);
247
-    lv_label_set_text(labelCancel, print_file_dialog_menu.cancle);
229
+    lv_label_set_text(labelCancel, print_file_dialog_menu.cancel);
248 230
   }
249 231
   else if (DIALOG_IS(TRANSFER_NO_DEVICE)) {
250 232
     btnCancel = lv_button_btn_create(scr, BTN_OK_X + 90, BTN_OK_Y, 100, 50, btn_cancel_event_cb);
251 233
     lv_obj_t *labelCancel = lv_label_create_empty(btnCancel);
252
-    lv_label_set_text(labelCancel, print_file_dialog_menu.cancle);
234
+    lv_label_set_text(labelCancel, print_file_dialog_menu.cancel);
253 235
   }
254 236
   #if ENABLED(MKS_WIFI_MODULE)
255 237
     else if (DIALOG_IS(TYPE_UPLOAD_FILE)) {
256 238
       if (upload_result == 2) {
257 239
         btnCancel = lv_button_btn_create(scr, BTN_OK_X + 90, BTN_OK_Y, 100, 50, btn_cancel_event_cb);
258 240
         lv_obj_t *labelCancel = lv_label_create_empty(btnCancel);
259
-        lv_label_set_text(labelCancel, print_file_dialog_menu.cancle);
241
+        lv_label_set_text(labelCancel, print_file_dialog_menu.cancel);
260 242
       }
261 243
       else if (upload_result == 3) {
262 244
         btnOk = lv_button_btn_create(scr, BTN_OK_X + 90, BTN_OK_Y, 100, 50, btn_ok_event_cb);
@@ -268,7 +250,7 @@ void lv_draw_dialog(uint8_t type) {
268 250
   else if (DIALOG_IS(TYPE_FILAMENT_LOAD_HEAT, TYPE_FILAMENT_UNLOAD_HEAT)) {
269 251
     btnCancel = lv_button_btn_create(scr, BTN_OK_X+90, BTN_OK_Y, 100, 50, btn_cancel_event_cb);
270 252
     lv_obj_t *labelCancel = lv_label_create_empty(btnCancel);
271
-    lv_label_set_text(labelCancel, print_file_dialog_menu.cancle);
253
+    lv_label_set_text(labelCancel, print_file_dialog_menu.cancel);
272 254
 
273 255
     tempText1 = lv_label_create_empty(scr);
274 256
     filament_sprayer_temp();
@@ -281,7 +263,7 @@ void lv_draw_dialog(uint8_t type) {
281 263
   else if (DIALOG_IS(TYPE_FILAMENT_LOADING, TYPE_FILAMENT_UNLOADING)) {
282 264
     btnCancel = lv_button_btn_create(scr, BTN_OK_X + 90, BTN_OK_Y, 100, 50, btn_cancel_event_cb);
283 265
     lv_obj_t *labelCancel = lv_label_create_empty(btnCancel);
284
-    lv_label_set_text(labelCancel, print_file_dialog_menu.cancle);
266
+    lv_label_set_text(labelCancel, print_file_dialog_menu.cancel);
285 267
 
286 268
     filament_bar = lv_bar_create(scr, nullptr);
287 269
     lv_obj_set_pos(filament_bar, (TFT_WIDTH-400)/2, ((TFT_HEIGHT - titleHeight)-40)/2);
@@ -303,7 +285,7 @@ void lv_draw_dialog(uint8_t type) {
303 285
     }
304 286
     else {
305 287
       lv_label_set_text(labelOk, print_file_dialog_menu.confirm);  // Set the labels text
306
-      lv_label_set_text(labelCancel, print_file_dialog_menu.cancle);
288
+      lv_label_set_text(labelCancel, print_file_dialog_menu.cancel);
307 289
     }
308 290
   }
309 291
   if (DIALOG_IS(TYPE_PRINT_FILE)) {
@@ -314,7 +296,7 @@ void lv_draw_dialog(uint8_t type) {
314 296
     lv_obj_align(labelFile, nullptr, LV_ALIGN_CENTER, 0, -60);
315 297
   }
316 298
   else if (DIALOG_IS(TYPE_STOP)) {
317
-    lv_label_set_text(labelDialog, print_file_dialog_menu.cancle_print);
299
+    lv_label_set_text(labelDialog, print_file_dialog_menu.cancel_print);
318 300
     lv_obj_align(labelDialog, nullptr, LV_ALIGN_CENTER, 0, -20);
319 301
   }
320 302
   else if (DIALOG_IS(TYPE_FINISH_PRINT)) {

+ 1
- 2
Marlin/src/lcd/extui/lib/mks_ui/draw_dialog.h Bestand weergeven

@@ -33,7 +33,7 @@ enum {
33 33
   DIALOG_TYPE_M80_FAIL,
34 34
   DIALOG_TYPE_MESSAGE_ERR1,
35 35
 
36
-  DIALOG_TYPE_UPDATE_ESP_FIRMARE,
36
+  DIALOG_TYPE_UPDATE_ESP_FIRMWARE,
37 37
   DIALOG_TYPE_UPDATE_ESP_DATA,
38 38
   DIALOG_TYPE_UPLOAD_FILE,
39 39
   DIALOG_TYPE_UNBIND,
@@ -85,7 +85,6 @@ extern void filament_sprayer_temp();
85 85
 extern void filament_dialog_handle();
86 86
 extern void lv_filament_setbar();
87 87
 
88
-//extern void disp_temp_ready_print();
89 88
 #ifdef __cplusplus
90 89
   } /* C-declarations for C++ */
91 90
 #endif

+ 0
- 23
Marlin/src/lcd/extui/lib/mks_ui/draw_error_message.cpp Bestand weergeven

@@ -27,10 +27,6 @@
27 27
 #include <lv_conf.h>
28 28
 
29 29
 #include "tft_lvgl_configuration.h"
30
-//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
31
-//#include "../lvgl/src/lv_objx/lv_img.h"
32
-//#include "../lvgl/src/lv_core/lv_disp.h"
33
-//#include "../lvgl/src/lv_core/lv_refr.h"
34 30
 
35 31
 #include "SPI_TFT.h"
36 32
 #include "mks_hardware_test.h"
@@ -39,25 +35,6 @@
39 35
 static lv_obj_t *scr;
40 36
 
41 37
 void lv_draw_error_message(PGM_P const msg) {
42
-  #if 0
43
-    static lv_obj_t *message = nullptr, *kill_message = nullptr, *reset_tips = nullptr;
44
-
45
-    scr = lv_screen_create(ERROR_MESSAGE_UI, "");
46
-
47
-    if (msg) {
48
-      message = lv_label_create(scr, msg);
49
-      lv_obj_align(message, nullptr, LV_ALIGN_CENTER, 0, -50);
50
-    }
51
-
52
-    kill_message = lv_label_create(scr, "PRINTER HALTED");
53
-    lv_obj_align(kill_message, nullptr, LV_ALIGN_CENTER, 0, -10);
54
-
55
-    reset_tips = lv_label_create(scr, "Please Reset");
56
-    lv_obj_align(reset_tips, nullptr, LV_ALIGN_CENTER, 0, 30);
57
-
58
-    lv_task_handler();
59
-  #endif
60
-
61 38
   SPI_TFT.LCD_clear(0x0000);
62 39
   if (msg) disp_string((TFT_WIDTH - strlen(msg) * 16) / 2, 100, msg, 0xFFFF, 0x0000);
63 40
   disp_string((TFT_WIDTH - strlen("PRINTER HALTED") * 16) / 2, 140, "PRINTER HALTED", 0xFFFF, 0x0000);

+ 0
- 1
Marlin/src/lcd/extui/lib/mks_ui/draw_error_message.h Bestand weergeven

@@ -32,7 +32,6 @@
32 32
 extern void lv_draw_error_message(PGM_P const msg);
33 33
 extern void lv_clear_error_message();
34 34
 
35
-//extern void disp_temp_ready_print();
36 35
 #ifdef __cplusplus
37 36
   } /* C-declarations for C++ */
38 37
 #endif

+ 0
- 4
Marlin/src/lcd/extui/lib/mks_ui/draw_extrusion.cpp Bestand weergeven

@@ -25,10 +25,6 @@
25 25
 
26 26
 #include "draw_ui.h"
27 27
 #include <lv_conf.h>
28
-//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
29
-//#include "../lvgl/src/lv_objx/lv_img.h"
30
-//#include "../lvgl/src/lv_core/lv_disp.h"
31
-//#include "../lvgl/src/lv_core/lv_refr.h"
32 28
 
33 29
 #include "../../../../module/temperature.h"
34 30
 #include "../../../../gcode/queue.h"

+ 0
- 1
Marlin/src/lcd/extui/lib/mks_ui/draw_extrusion.h Bestand weergeven

@@ -33,7 +33,6 @@ extern void disp_ext_speed();
33 33
 extern void disp_hotend_temp();
34 34
 extern void disp_extru_amount();
35 35
 
36
-//extern void disp_temp_ready_print();
37 36
 #ifdef __cplusplus
38 37
   } /* C-declarations for C++ */
39 38
 #endif

+ 9
- 18
Marlin/src/lcd/extui/lib/mks_ui/draw_fan.cpp Bestand weergeven

@@ -25,10 +25,6 @@
25 25
 
26 26
 #include "draw_ui.h"
27 27
 #include <lv_conf.h>
28
-//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
29
-//#include "../lvgl/src/lv_objx/lv_img.h"
30
-//#include "../lvgl/src/lv_core/lv_disp.h"
31
-//#include "../lvgl/src/lv_core/lv_refr.h"
32 28
 
33 29
 #include "../../../../module/temperature.h"
34 30
 #include "../../../../gcode/queue.h"
@@ -52,35 +48,30 @@ static uint8_t fanSpeed;
52 48
 
53 49
 static void event_handler(lv_obj_t *obj, lv_event_t event) {
54 50
   if (event != LV_EVENT_RELEASED) return;
51
+
55 52
   switch (obj->mks_obj_id) {
56 53
     case ID_F_ADD:
57
-      if (fanSpeed + 1 <= 255) {
58
-        fanSpeed++;
59
-        sprintf_P(public_buf_l, PSTR("M106 S%d"), fanSpeed);
60
-        gcode.process_subcommands_now(public_buf_l);
61
-      }
54
+      if (fanSpeed < 254) fanSpeed++;
62 55
       break;
63 56
     case ID_F_DEC:
64
-      if (fanSpeed > 0) {
65
-        fanSpeed--;
66
-        sprintf_P(public_buf_l, PSTR("M106 S%d"), fanSpeed);
67
-        gcode.process_subcommands_now(public_buf_l);
68
-      }
57
+      if (fanSpeed > 0) fanSpeed--;
69 58
       break;
70 59
     case ID_F_HIGH:
71
-      gcode.process_subcommands_now_P(PSTR("M106 S255"));
60
+      fanSpeed = 255;
72 61
       break;
73 62
     case ID_F_MID:
74
-      gcode.process_subcommands_now_P(PSTR("M106 S127"));
63
+      fanSpeed = 127;
75 64
       break;
76 65
     case ID_F_OFF:
77 66
       gcode.process_subcommands_now_P(PSTR("M107"));
78
-      break;
67
+      return;
79 68
     case ID_F_RETURN:
80 69
       clear_cur_ui();
81 70
       draw_return_ui();
82
-      break;
71
+      return;
83 72
   }
73
+  sprintf_P(public_buf_l, PSTR("M106 S%d"), fanSpeed);
74
+  gcode.process_subcommands_now(public_buf_l);
84 75
 }
85 76
 
86 77
 void lv_draw_fan(void) {

+ 0
- 1
Marlin/src/lcd/extui/lib/mks_ui/draw_fan.h Bestand weergeven

@@ -29,7 +29,6 @@ extern void lv_draw_fan(void);
29 29
 extern void lv_clear_fan();
30 30
 extern void disp_fan_value();
31 31
 
32
-//extern void disp_temp_ready_print();
33 32
 #ifdef __cplusplus
34 33
   } /* C-declarations for C++ */
35 34
 #endif

+ 1
- 5
Marlin/src/lcd/extui/lib/mks_ui/draw_filament_change.cpp Bestand weergeven

@@ -85,10 +85,7 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) {
85 85
       break;
86 86
     case ID_FILAMNT_TYPE:
87 87
       #if HAS_MULTI_EXTRUDER
88
-        if (uiCfg.curSprayerChoose == 0)
89
-          uiCfg.curSprayerChoose = 1;
90
-        else if (uiCfg.curSprayerChoose == 1)
91
-          uiCfg.curSprayerChoose = 0;
88
+        uiCfg.curSprayerChoose = !uiCfg.curSprayerChoose;
92 89
       #endif
93 90
       disp_filament_type();
94 91
       break;
@@ -100,7 +97,6 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) {
100 97
       feedrate_mm_s = (float)uiCfg.moveSpeed_bak;
101 98
       if (uiCfg.print_state == PAUSED)
102 99
         planner.set_e_position_mm((destination.e = current_position.e = uiCfg.current_e_position_bak));
103
-        //current_position.e = destination.e = uiCfg.current_e_position_bak;
104 100
       thermalManager.temp_hotend[uiCfg.curSprayerChoose].target = uiCfg.desireSprayerTempBak;
105 101
 
106 102
       clear_cur_ui();

+ 0
- 1
Marlin/src/lcd/extui/lib/mks_ui/draw_filament_change.h Bestand weergeven

@@ -30,7 +30,6 @@ extern void lv_clear_filament_change();
30 30
 extern void disp_filament_type();
31 31
 extern void disp_filament_temp();
32 32
 
33
-//extern void disp_temp_ready_print();
34 33
 #ifdef __cplusplus
35 34
   } /* C-declarations for C++ */
36 35
 #endif

+ 0
- 4
Marlin/src/lcd/extui/lib/mks_ui/draw_home.cpp Bestand weergeven

@@ -27,10 +27,6 @@
27 27
 #include "draw_set.h"
28 28
 #include "draw_ui.h"
29 29
 #include <lv_conf.h>
30
-//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
31
-//#include "../lvgl/src/lv_objx/lv_img.h"
32
-//#include "../lvgl/src/lv_core/lv_disp.h"
33
-//#include "../lvgl/src/lv_core/lv_refr.h"
34 30
 
35 31
 #include "../../../../gcode/queue.h"
36 32
 #include "../../../../inc/MarlinConfig.h"

+ 0
- 1
Marlin/src/lcd/extui/lib/mks_ui/draw_home.h Bestand weergeven

@@ -28,7 +28,6 @@
28 28
 extern void lv_draw_home(void);
29 29
 extern void lv_clear_home();
30 30
 
31
-//extern void disp_temp_ready_print();
32 31
 #ifdef __cplusplus
33 32
   } /* C-declarations for C++ */
34 33
 #endif

+ 4
- 15
Marlin/src/lcd/extui/lib/mks_ui/draw_keyboard.cpp Bestand weergeven

@@ -73,8 +73,6 @@ static const lv_btnm_ctrl_t kb_ctrl_num_map[] = {
73 73
         1, 1, 1, 1, 1};
74 74
 
75 75
 static void lv_kb_event_cb(lv_obj_t *kb, lv_event_t event) {
76
-  //LV_ASSERT_OBJ(kb, LV_OBJX_NAME);
77
-
78 76
   if (event != LV_EVENT_VALUE_CHANGED) return;
79 77
 
80 78
   lv_kb_ext_t * ext = (lv_kb_ext_t * )lv_obj_get_ext_attr(kb);
@@ -104,22 +102,18 @@ static void lv_kb_event_cb(lv_obj_t *kb, lv_event_t event) {
104 102
   }
105 103
   else if (strcmp(txt, LV_SYMBOL_CLOSE) == 0) {
106 104
     if (kb->event_cb != lv_kb_def_event_cb) {
107
-      //lv_res_t res = lv_event_send(kb, LV_EVENT_CANCEL, nullptr);
108
-      //if (res != LV_RES_OK) return;
109 105
       lv_clear_keyboard();
110 106
       draw_return_ui();
111 107
     }
112 108
     else {
113
-      lv_kb_set_ta(kb, nullptr); // De-assign the text area  to hide it cursor if needed
109
+      lv_kb_set_ta(kb, nullptr); // De-assign the text area to hide its cursor if needed
114 110
       lv_obj_del(kb);
115 111
       return;
116 112
     }
117
-  return;
113
+    return;
118 114
   }
119 115
   else if (strcmp(txt, LV_SYMBOL_OK) == 0) {
120 116
     if (kb->event_cb != lv_kb_def_event_cb) {
121
-      //lv_res_t res = lv_event_send(kb, LV_EVENT_APPLY, nullptr);
122
-      //if (res != LV_RES_OK) return;
123 117
       const char * ret_ta_txt = lv_ta_get_text(ext->ta);
124 118
       switch (keyboard_value) {
125 119
         #if ENABLED(MKS_WIFI_MODULE)
@@ -142,7 +136,7 @@ static void lv_kb_event_cb(lv_obj_t *kb, lv_event_t event) {
142 136
 
143 137
             gCfgItems.wifi_mode_sel = STA_MODEL;
144 138
 
145
-            package_to_wifi(WIFI_PARA_SET, (char *)0, 0);
139
+            package_to_wifi(WIFI_PARA_SET, (uint8_t *)0, 0);
146 140
 
147 141
             public_buf_l[0] = 0xA5;
148 142
             public_buf_l[1] = 0x09;
@@ -151,7 +145,7 @@ static void lv_kb_event_cb(lv_obj_t *kb, lv_event_t event) {
151 145
             public_buf_l[4] = 0x01;
152 146
             public_buf_l[5] = 0xFC;
153 147
             public_buf_l[6] = 0x00;
154
-            raw_send_to_wifi(public_buf_l, 6);
148
+            raw_send_to_wifi((uint8_t*)public_buf_l, 6);
155 149
 
156 150
             last_disp_state = KEY_BOARD_UI;
157 151
             lv_clear_keyboard();
@@ -238,8 +232,6 @@ void lv_draw_keyboard() {
238 232
   lv_kb_set_style(kb, LV_KB_STYLE_BTN_PR, &pr_style);
239 233
   #if HAS_ROTARY_ENCODER
240 234
     if (gCfgItems.encoder_enable) {
241
-      //lv_group_add_obj(g, kb);
242
-      //lv_group_set_editing(g, true);
243 235
     }
244 236
   #endif
245 237
 
@@ -260,9 +252,6 @@ void lv_draw_keyboard() {
260 252
 }
261 253
 
262 254
 void lv_clear_keyboard() {
263
-  #if HAS_ROTARY_ENCODER
264
-    if (gCfgItems.encoder_enable) { /* lv_group_remove_all_objs(g); */ }
265
-  #endif
266 255
   lv_obj_del(scr);
267 256
 }
268 257
 

+ 0
- 4
Marlin/src/lcd/extui/lib/mks_ui/draw_language.cpp Bestand weergeven

@@ -25,10 +25,6 @@
25 25
 
26 26
 #include "draw_ui.h"
27 27
 #include <lv_conf.h>
28
-//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
29
-//#include "../lvgl/src/lv_objx/lv_img.h"
30
-//#include "../lvgl/src/lv_core/lv_disp.h"
31
-//#include "../lvgl/src/lv_core/lv_refr.h"
32 28
 
33 29
 #include "../../../../inc/MarlinConfig.h"
34 30
 #include <string.h>

+ 0
- 1
Marlin/src/lcd/extui/lib/mks_ui/draw_language.h Bestand weergeven

@@ -28,7 +28,6 @@
28 28
 extern void lv_draw_language(void);
29 29
 extern void lv_clear_language();
30 30
 
31
-//extern void disp_temp_ready_print();
32 31
 #ifdef __cplusplus
33 32
   } /* C-declarations for C++ */
34 33
 #endif

+ 1
- 4
Marlin/src/lcd/extui/lib/mks_ui/draw_level_settings.cpp Bestand weergeven

@@ -40,23 +40,20 @@ enum {
40 40
 
41 41
 static void event_handler(lv_obj_t *obj, lv_event_t event) {
42 42
   if (event != LV_EVENT_RELEASED) return;
43
+  lv_clear_level_settings();
43 44
   switch (obj->mks_obj_id) {
44 45
     case ID_LEVEL_RETURN:
45
-      lv_clear_level_settings();
46 46
       draw_return_ui();
47 47
       break;
48 48
     case ID_LEVEL_POSITION:
49
-      lv_clear_level_settings();
50 49
       lv_draw_manual_level_pos_settings();
51 50
       break;
52 51
     case ID_LEVEL_COMMAND:
53 52
       keyboard_value = gcodeCommand;
54
-      lv_clear_level_settings();
55 53
       lv_draw_keyboard();
56 54
       break;
57 55
     #if HAS_BED_PROBE
58 56
       case ID_LEVEL_ZOFFSET:
59
-        lv_clear_level_settings();
60 57
         lv_draw_auto_level_offset_settings();
61 58
         break;
62 59
     #endif

+ 0
- 4
Marlin/src/lcd/extui/lib/mks_ui/draw_manuaLevel.cpp Bestand weergeven

@@ -25,10 +25,6 @@
25 25
 
26 26
 #include "draw_ui.h"
27 27
 #include <lv_conf.h>
28
-//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
29
-//#include "../lvgl/src/lv_objx/lv_img.h"
30
-//#include "../lvgl/src/lv_core/lv_disp.h"
31
-//#include "../lvgl/src/lv_core/lv_refr.h"
32 28
 
33 29
 #include "../../../../gcode/queue.h"
34 30
 #include "../../../../inc/MarlinConfig.h"

+ 0
- 1
Marlin/src/lcd/extui/lib/mks_ui/draw_manuaLevel.h Bestand weergeven

@@ -28,7 +28,6 @@
28 28
 extern void lv_draw_manualLevel(void);
29 29
 extern void lv_clear_manualLevel();
30 30
 
31
-//extern void disp_temp_ready_print();
32 31
 #ifdef __cplusplus
33 32
   } /* C-declarations for C++ */
34 33
 #endif

+ 5
- 23
Marlin/src/lcd/extui/lib/mks_ui/draw_manual_level_pos_settings.cpp Bestand weergeven

@@ -55,68 +55,50 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) {
55 55
       uiCfg.para_ui_page = 0;
56 56
       lv_clear_manual_level_pos_settings();
57 57
       draw_return_ui();
58
-      break;
58
+      return;
59 59
     case ID_MANUAL_POS_X1:
60 60
       value = level_pos_x1;
61
-      lv_clear_manual_level_pos_settings();
62
-      lv_draw_number_key();
63 61
       break;
64 62
     case ID_MANUAL_POS_Y1:
65 63
       value = level_pos_y1;
66
-      lv_clear_manual_level_pos_settings();
67
-      lv_draw_number_key();
68 64
       break;
69 65
     case ID_MANUAL_POS_X2:
70 66
       value = level_pos_x2;
71
-      lv_clear_manual_level_pos_settings();
72
-      lv_draw_number_key();
73 67
       break;
74 68
     case ID_MANUAL_POS_Y2:
75 69
       value = level_pos_y2;
76
-      lv_clear_manual_level_pos_settings();
77
-      lv_draw_number_key();
78 70
       break;
79 71
     case ID_MANUAL_POS_X3:
80 72
       value = level_pos_x3;
81
-      lv_clear_manual_level_pos_settings();
82
-      lv_draw_number_key();
83 73
       break;
84 74
     case ID_MANUAL_POS_Y3:
85 75
       value = level_pos_y3;
86
-      lv_clear_manual_level_pos_settings();
87
-      lv_draw_number_key();
88 76
       break;
89 77
     case ID_MANUAL_POS_X4:
90 78
       value = level_pos_x4;
91
-      lv_clear_manual_level_pos_settings();
92
-      lv_draw_number_key();
93 79
       break;
94 80
     case ID_MANUAL_POS_Y4:
95 81
       value = level_pos_y4;
96
-      lv_clear_manual_level_pos_settings();
97
-      lv_draw_number_key();
98 82
       break;
99 83
     case ID_MANUAL_POS_X5:
100 84
       value = level_pos_y5;
101
-      lv_clear_manual_level_pos_settings();
102
-      lv_draw_number_key();
103 85
       break;
104 86
     case ID_MANUAL_POS_Y5:
105 87
       value = level_pos_y5;
106
-      lv_clear_manual_level_pos_settings();
107
-      lv_draw_number_key();
108 88
       break;
109 89
     case ID_MANUAL_POS_UP:
110 90
       uiCfg.para_ui_page = 0;
111 91
       lv_clear_manual_level_pos_settings();
112 92
       lv_draw_manual_level_pos_settings();
113
-      break;
93
+      return;
114 94
     case ID_MANUAL_POS_DOWN:
115 95
       uiCfg.para_ui_page = 1;
116 96
       lv_clear_manual_level_pos_settings();
117 97
       lv_draw_manual_level_pos_settings();
118
-      break;
98
+      return;
119 99
   }
100
+  lv_clear_manual_level_pos_settings();
101
+  lv_draw_number_key();
120 102
 }
121 103
 
122 104
 void lv_draw_manual_level_pos_settings(void) {

+ 6
- 16
Marlin/src/lcd/extui/lib/mks_ui/draw_max_feedrate_settings.cpp Bestand weergeven

@@ -45,48 +45,38 @@ enum {
45 45
 
46 46
 static void event_handler(lv_obj_t *obj, lv_event_t event) {
47 47
   if (event != LV_EVENT_RELEASED) return;
48
+
49
+  lv_clear_max_feedrate_settings();
48 50
   switch (obj->mks_obj_id) {
49 51
     case ID_FEED_RETURN:
50 52
       uiCfg.para_ui_page = 0;
51
-      lv_clear_max_feedrate_settings();
52 53
       draw_return_ui();
53
-      break;
54
+      return;
54 55
     case ID_FEED_X:
55 56
       value = XMaxFeedRate;
56
-      lv_clear_max_feedrate_settings();
57
-      lv_draw_number_key();
58 57
       break;
59 58
     case ID_FEED_Y:
60 59
       value = YMaxFeedRate;
61
-      lv_clear_max_feedrate_settings();
62
-      lv_draw_number_key();
63 60
       break;
64 61
     case ID_FEED_Z:
65 62
       value = ZMaxFeedRate;
66
-      lv_clear_max_feedrate_settings();
67
-      lv_draw_number_key();
68 63
       break;
69 64
     case ID_FEED_E0:
70 65
       value = E0MaxFeedRate;
71
-      lv_clear_max_feedrate_settings();
72
-      lv_draw_number_key();
73 66
       break;
74 67
     case ID_FEED_E1:
75 68
       value = E1MaxFeedRate;
76
-      lv_clear_max_feedrate_settings();
77
-      lv_draw_number_key();
78 69
       break;
79 70
     case ID_FEED_UP:
80 71
       uiCfg.para_ui_page = 0;
81
-      lv_clear_max_feedrate_settings();
82 72
       lv_draw_max_feedrate_settings();
83
-      break;
73
+      return;
84 74
     case ID_FEED_DOWN:
85 75
       uiCfg.para_ui_page = 1;
86
-      lv_clear_max_feedrate_settings();
87 76
       lv_draw_max_feedrate_settings();
88
-      break;
77
+      return;
89 78
   }
79
+  lv_draw_number_key();
90 80
 }
91 81
 
92 82
 void lv_draw_max_feedrate_settings(void) {

+ 1
- 5
Marlin/src/lcd/extui/lib/mks_ui/draw_motor_settings.cpp Bestand weergeven

@@ -41,30 +41,26 @@ enum {
41 41
 
42 42
 static void event_handler(lv_obj_t *obj, lv_event_t event) {
43 43
   if (event != LV_EVENT_RELEASED) return;
44
+  lv_clear_motor_settings();
44 45
   switch (obj->mks_obj_id) {
45 46
     case ID_MOTOR_RETURN:
46
-      lv_clear_motor_settings();
47 47
       draw_return_ui();
48 48
       break;
49 49
     case ID_MOTOR_STEPS:
50
-      lv_clear_motor_settings();
51 50
       lv_draw_step_settings();
52 51
       break;
53 52
     #if USE_SENSORLESS
54 53
       case ID_HOME_SENSE:
55
-        lv_clear_motor_settings();
56 54
         lv_draw_homing_sensitivity_settings();
57 55
         break;
58 56
     #endif
59 57
 
60 58
     #if HAS_TRINAMIC_CONFIG
61 59
       case ID_MOTOR_TMC_CURRENT:
62
-        lv_clear_motor_settings();
63 60
         lv_draw_tmc_current_settings();
64 61
         break;
65 62
       #if HAS_STEALTHCHOP
66 63
         case ID_MOTOR_STEP_MODE:
67
-          lv_clear_motor_settings();
68 64
           lv_draw_tmc_step_mode_settings();
69 65
           break;
70 66
       #endif

+ 1
- 5
Marlin/src/lcd/extui/lib/mks_ui/draw_move_motor.cpp Bestand weergeven

@@ -25,10 +25,6 @@
25 25
 
26 26
 #include "draw_ui.h"
27 27
 #include <lv_conf.h>
28
-//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
29
-//#include "../lvgl/src/lv_objx/lv_img.h"
30
-//#include "../lvgl/src/lv_core/lv_disp.h"
31
-//#include "../lvgl/src/lv_core/lv_refr.h"
32 28
 
33 29
 #include "../../../../gcode/queue.h"
34 30
 #include "../../../../inc/MarlinConfig.h"
@@ -124,7 +120,7 @@ void lv_draw_move_motor(void) {
124 120
   lv_big_button_create(scr, "F:/bmp_zAdd.bin", move_menu.z_add, BTN_X_PIXEL * 2 + INTERVAL_V * 3, titleHeight, event_handler, ID_M_Z_P);
125 121
   lv_big_button_create(scr, "F:/bmp_zDec.bin", move_menu.z_dec, BTN_X_PIXEL * 2 + INTERVAL_V * 3, BTN_Y_PIXEL + INTERVAL_H + titleHeight, event_handler, ID_M_Z_N);
126 122
 
127
-  // button with image and label changed dinamycally by disp_move_dist
123
+  // button with image and label changed dynamically by disp_move_dist
128 124
   buttonV = lv_imgbtn_create(scr, nullptr, BTN_X_PIXEL * 3 + INTERVAL_V * 4, titleHeight, event_handler, ID_M_STEP);
129 125
   labelV = lv_label_create_empty(buttonV);
130 126
   #if HAS_ROTARY_ENCODER

+ 0
- 1
Marlin/src/lcd/extui/lib/mks_ui/draw_move_motor.h Bestand weergeven

@@ -29,7 +29,6 @@ extern void lv_draw_move_motor(void);
29 29
 extern void lv_clear_move_motor();
30 30
 extern void disp_move_dist();
31 31
 
32
-//extern void disp_temp_ready_print();
33 32
 #ifdef __cplusplus
34 33
   } /* C-declarations for C++ */
35 34
 #endif

+ 0
- 4
Marlin/src/lcd/extui/lib/mks_ui/draw_number_key.cpp Bestand weergeven

@@ -25,10 +25,6 @@
25 25
 
26 26
 #include "draw_ui.h"
27 27
 #include <lv_conf.h>
28
-//#include "../../lvgl/src/lv_objx/lv_imgbtn.h"
29
-//#include "../../lvgl/src/lv_objx/lv_img.h"
30
-//#include "../../lvgl/src/lv_core/lv_disp.h"
31
-//#include "../../lvgl/src/lv_core/lv_refr.h"
32 28
 
33 29
 #include "../../../../gcode/gcode.h"
34 30
 #include "../../../../gcode/queue.h"

+ 0
- 7
Marlin/src/lcd/extui/lib/mks_ui/draw_operation.cpp Bestand weergeven

@@ -25,10 +25,6 @@
25 25
 
26 26
 #include "draw_ui.h"
27 27
 #include <lv_conf.h>
28
-//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
29
-//#include "../lvgl/src/lv_objx/lv_img.h"
30
-//#include "../lvgl/src/lv_core/lv_disp.h"
31
-//#include "../lvgl/src/lv_core/lv_refr.h"
32 28
 
33 29
 #include "../../../../module/temperature.h"
34 30
 #include "../../../../module/motion.h"
@@ -178,7 +174,6 @@ void lv_draw_operation(void) {
178 174
   label_PowerOff = lv_label_create_empty(buttonPowerOff);
179 175
 
180 176
   if (uiCfg.print_state != WORKING) {
181
-    //label_Filament = lv_label_create_empty(buttonFilament);
182 177
     labelExtrusion = lv_label_create_empty(buttonExtrusion);
183 178
     label_Move = lv_label_create_empty(buttonMove);
184 179
   }
@@ -205,8 +200,6 @@ void lv_draw_operation(void) {
205 200
     lv_obj_align(label_PowerOff, buttonPowerOff, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
206 201
 
207 202
     if (uiCfg.print_state != WORKING) {
208
-      //lv_label_set_text(label_Filament, operation_menu.filament);
209
-      //lv_obj_align(label_Filament, buttonFilament, LV_ALIGN_IN_BOTTOM_MID,0, BUTTON_TEXT_Y_OFFSET);
210 203
       lv_label_set_text(labelExtrusion, operation_menu.extr);
211 204
       lv_obj_align(labelExtrusion, buttonExtrusion, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
212 205
 

+ 0
- 1
Marlin/src/lcd/extui/lib/mks_ui/draw_operation.h Bestand weergeven

@@ -28,7 +28,6 @@
28 28
 extern void lv_draw_operation(void);
29 29
 extern void lv_clear_operation();
30 30
 
31
-//extern void disp_temp_ready_print();
32 31
 #ifdef __cplusplus
33 32
   } /* C-declarations for C++ */
34 33
 #endif

+ 0
- 4
Marlin/src/lcd/extui/lib/mks_ui/draw_pause_message.cpp Bestand weergeven

@@ -25,10 +25,6 @@
25 25
 
26 26
 #include "draw_ui.h"
27 27
 #include <lv_conf.h>
28
-//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
29
-//#include "../lvgl/src/lv_objx/lv_img.h"
30
-//#include "../lvgl/src/lv_core/lv_disp.h"
31
-//#include "../lvgl/src/lv_core/lv_refr.h"
32 28
 
33 29
 #include "../../../../feature/pause.h"
34 30
 #include "../../../../inc/MarlinConfig.h"

+ 0
- 1
Marlin/src/lcd/extui/lib/mks_ui/draw_pause_message.h Bestand weergeven

@@ -27,7 +27,6 @@
27 27
 
28 28
 extern void lv_draw_pause_message(const PauseMessage msg);
29 29
 
30
-//extern void disp_temp_ready_print();
31 30
 #ifdef __cplusplus
32 31
   } /* C-declarations for C++ */
33 32
 #endif

+ 3
- 8
Marlin/src/lcd/extui/lib/mks_ui/draw_pause_position.cpp Bestand weergeven

@@ -41,27 +41,22 @@ enum {
41 41
 
42 42
 static void event_handler(lv_obj_t *obj, lv_event_t event) {
43 43
   if (event != LV_EVENT_RELEASED) return;
44
+  lv_clear_pause_position();
44 45
   switch (obj->mks_obj_id) {
45 46
     case ID_PAUSE_RETURN:
46
-      lv_clear_pause_position();
47 47
       draw_return_ui();
48
-      break;
48
+      return;
49 49
     case ID_PAUSE_X:
50 50
       value = pause_pos_x;
51
-      lv_clear_pause_position();
52
-      lv_draw_number_key();
53 51
       break;
54 52
     case ID_PAUSE_Y:
55 53
       value = pause_pos_y;
56
-      lv_clear_pause_position();
57
-      lv_draw_number_key();
58 54
       break;
59 55
     case ID_PAUSE_Z:
60 56
       value = pause_pos_z;
61
-      lv_clear_pause_position();
62
-      lv_draw_number_key();
63 57
       break;
64 58
   }
59
+  lv_draw_number_key();
65 60
 }
66 61
 
67 62
 void lv_draw_pause_position(void) {

+ 0
- 4
Marlin/src/lcd/extui/lib/mks_ui/draw_preHeat.cpp Bestand weergeven

@@ -25,10 +25,6 @@
25 25
 
26 26
 #include "draw_ui.h"
27 27
 #include <lv_conf.h>
28
-//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
29
-//#include "../lvgl/src/lv_objx/lv_img.h"
30
-//#include "../lvgl/src/lv_core/lv_disp.h"
31
-//#include "../lvgl/src/lv_core/lv_refr.h"
32 28
 
33 29
 #include "../../../../module/temperature.h"
34 30
 #include "../../../../inc/MarlinConfig.h"

+ 0
- 1
Marlin/src/lcd/extui/lib/mks_ui/draw_preHeat.h Bestand weergeven

@@ -31,7 +31,6 @@ extern void disp_temp_type();
31 31
 extern void disp_step_heat();
32 32
 extern void disp_desire_temp();
33 33
 
34
-//extern void disp_temp_ready_print();
35 34
 #ifdef __cplusplus
36 35
   } /* C-declarations for C++ */
37 36
 #endif

+ 1
- 1
Marlin/src/lcd/extui/lib/mks_ui/draw_print_file.cpp Bestand weergeven

@@ -49,7 +49,7 @@ int8_t curDirLever = 0;
49 49
 LIST_FILE list_file;
50 50
 DIR_OFFSET dir_offset[10];
51 51
 
52
-extern uint8_t public_buf[512];
52
+extern uint8_t public_buf[513];
53 53
 extern char public_buf_m[100];
54 54
 
55 55
 uint8_t sel_id = 0;

+ 4
- 6
Marlin/src/lcd/extui/lib/mks_ui/draw_print_file.h Bestand weergeven

@@ -33,16 +33,15 @@ typedef struct {
33 33
 extern DIR_OFFSET dir_offset[10];
34 34
 
35 35
 #define FILE_NUM 6
36
-#define SHORT_NEME_LEN 13
36
+#define SHORT_NAME_LEN 13
37 37
 #define NAME_CUT_LEN 23
38 38
 
39 39
 #define MAX_DIR_LEVEL  10
40 40
 
41 41
 typedef struct {
42
-  //char longName[FILE_NUM][LONG_FILENAME_LENGTH];
43
-  char file_name[FILE_NUM][SHORT_NEME_LEN * MAX_DIR_LEVEL + 1];
44
-  char curDirPath[SHORT_NEME_LEN * MAX_DIR_LEVEL + 1];
45
-  char long_name[FILE_NUM][SHORT_NEME_LEN * 2 + 1];
42
+  char file_name[FILE_NUM][SHORT_NAME_LEN * MAX_DIR_LEVEL + 1];
43
+  char curDirPath[SHORT_NAME_LEN * MAX_DIR_LEVEL + 1];
44
+  char long_name[FILE_NUM][SHORT_NAME_LEN * 2 + 1];
46 45
   bool IsFolder[FILE_NUM];
47 46
   char Sd_file_cnt;
48 47
   char sd_file_index;
@@ -60,7 +59,6 @@ extern int ascii2dec_test(char *ascii);
60 59
 extern void lv_clear_print_file();
61 60
 extern void lv_gcode_file_seek(uint32_t pos);
62 61
 
63
-//extern void disp_temp_ready_print();
64 62
 #ifdef __cplusplus
65 63
   } /* C-declarations for C++ */
66 64
 #endif

+ 0
- 25
Marlin/src/lcd/extui/lib/mks_ui/draw_printing.cpp Bestand weergeven

@@ -25,10 +25,6 @@
25 25
 
26 26
 #include "draw_ui.h"
27 27
 #include <lv_conf.h>
28
-//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
29
-//#include "../lvgl/src/lv_objx/lv_img.h"
30
-//#include "../lvgl/src/lv_core/lv_disp.h"
31
-//#include "../lvgl/src/lv_core/lv_refr.h"
32 28
 
33 29
 #include "../../../../MarlinCore.h" // for marlin_state
34 30
 #include "../../../../module/temperature.h"
@@ -75,10 +71,7 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) {
75 71
   switch (obj->mks_obj_id) {
76 72
     case ID_PAUSE:
77 73
       if (uiCfg.print_state == WORKING) {
78
-        // #if ENABLED(PARK_HEAD_ON_PAUSE)
79
-        // queue.inject_P(PSTR("M25 P\nM24"));
80 74
         #if ENABLED(SDSUPPORT)
81
-          // queue.inject_P(PSTR("M25\nG91\nG1 Z10\nG90"));
82 75
           card.pauseSDPrint();
83 76
           stop_print_time();
84 77
           uiCfg.print_state = PAUSING;
@@ -99,7 +92,6 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) {
99 92
           lv_imgbtn_set_src_both(obj, "F:/bmp_pause.bin");
100 93
           lv_label_set_text(labelPause, printing_menu.pause);
101 94
           lv_obj_align(labelPause, buttonPause, LV_ALIGN_CENTER, 30, 0);
102
-          // recovery.resume();
103 95
           print_time.minutes = recovery.info.print_job_elapsed / 60;
104 96
           print_time.seconds = recovery.info.print_job_elapsed % 60;
105 97
           print_time.hours   = print_time.minutes / 60;
@@ -164,20 +156,6 @@ void lv_draw_printing(void) {
164 156
     }
165 157
   #endif
166 158
 
167
-  // Create labels on the image buttons
168
-  //lv_btn_set_layout(buttonExt1, LV_LAYOUT_OFF);
169
-  //#if HAS_MULTI_EXTRUDER
170
-  //  lv_btn_set_layout(buttonExt2, LV_LAYOUT_OFF);
171
-  //#endif
172
-
173
-  //#if HAS_HEATED_BED
174
-  //  lv_btn_set_layout(buttonBedstate, LV_LAYOUT_OFF);
175
-  //#endif
176
-
177
-  //lv_btn_set_layout(buttonFanstate, LV_LAYOUT_OFF);
178
-  //lv_btn_set_layout(buttonTime, LV_LAYOUT_OFF);
179
-  //lv_btn_set_layout(buttonZpos, LV_LAYOUT_OFF);
180
-
181 159
   labelExt1 = lv_label_create(scr, 250, 146, nullptr);
182 160
 
183 161
   #if HAS_MULTI_EXTRUDER
@@ -262,12 +240,10 @@ void disp_fan_Zpos() {
262 240
 }
263 241
 
264 242
 void reset_print_time() {
265
-  // print_time.days = 0;
266 243
   print_time.hours   = 0;
267 244
   print_time.minutes = 0;
268 245
   print_time.seconds = 0;
269 246
   print_time.ms_10   = 0;
270
-  // print_time.start = 1;
271 247
 }
272 248
 
273 249
 void start_print_time() { print_time.start = 1; }
@@ -290,7 +266,6 @@ void setProBarRate() {
290 266
     #endif
291 267
     rate = (rate_tmp_r - (PREVIEW_SIZE + To_pre_view)) * 100 / (gCfgItems.curFilesize - (PREVIEW_SIZE + To_pre_view));
292 268
   }
293
-  // gCurFileState.totalSend = rate;
294 269
 
295 270
   if (rate <= 0) return;
296 271
 

+ 0
- 1
Marlin/src/lcd/extui/lib/mks_ui/draw_printing.h Bestand weergeven

@@ -48,7 +48,6 @@ extern void start_print_time();
48 48
 extern void stop_print_time();
49 49
 extern void setProBarRate();
50 50
 
51
-//extern void disp_temp_ready_print();
52 51
 #ifdef __cplusplus
53 52
   } /* C-declarations for C++ */
54 53
 #endif

+ 2
- 44
Marlin/src/lcd/extui/lib/mks_ui/draw_ready_print.cpp Bestand weergeven

@@ -26,10 +26,6 @@
26 26
 #include "draw_ready_print.h"
27 27
 #include "draw_tool.h"
28 28
 #include <lv_conf.h>
29
-//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
30
-//#include "../lvgl/src/lv_objx/lv_img.h"
31
-//#include "../lvgl/src/lv_core/lv_disp.h"
32
-//#include "../lvgl/src/lv_core/lv_refr.h"
33 29
 #include "tft_lvgl_configuration.h"
34 30
 #include "mks_hardware_test.h"
35 31
 #include "draw_ui.h"
@@ -46,7 +42,6 @@
46 42
 
47 43
 #include <stdio.h>
48 44
 
49
-//static lv_obj_t *buttonPrint, *buttonTool, *buttonSet;
50 45
 extern lv_group_t*  g;
51 46
 static lv_obj_t *scr;
52 47
 #if ENABLED(MKS_TEST)
@@ -61,17 +56,16 @@ enum {
61 56
 
62 57
 static void event_handler(lv_obj_t *obj, lv_event_t event) {
63 58
   if (event != LV_EVENT_RELEASED) return;
59
+  lv_clear_ready_print();
60
+
64 61
   switch (obj->mks_obj_id) {
65 62
     case ID_TOOL:
66
-      lv_clear_ready_print();
67 63
       lv_draw_tool();
68 64
       break;
69 65
     case ID_SET:
70
-      lv_clear_ready_print();
71 66
       lv_draw_set();
72 67
       break;
73 68
     case ID_PRINT:
74
-      lv_clear_ready_print();
75 69
       lv_draw_print_file();
76 70
       break;
77 71
   }
@@ -104,17 +98,12 @@ void disp_det_error() {
104 98
 lv_obj_t *e1, *e2, *e3, *bed;
105 99
 void mks_disp_test() {
106 100
   char buf[30] = {0};
107
-  //lv_obj_t *label_tool2 = lv_label_create_empty(scr);
108
-  //lv_obj_set_pos(label_tool, 20, 50);
109 101
   sprintf_P(buf, PSTR("e1:%d"), (int)thermalManager.temp_hotend[0].celsius);
110 102
   lv_label_set_text(e1, buf);
111 103
   #if HAS_MULTI_HOTEND
112 104
     sprintf_P(buf, PSTR("e2:%d"), (int)thermalManager.temp_hotend[1].celsius);
113 105
     lv_label_set_text(e2, buf);
114 106
   #endif
115
-
116
-  //sprintf_P(buf, PSTR("e3:%d"), (int)thermalManager.temp_hotend[2].celsius);
117
-  //lv_label_set_text(e3, buf);
118 107
   #if HAS_HEATED_BED
119 108
     sprintf_P(buf, PSTR("bed:%d"), (int)thermalManager.temp_bed.celsius);
120 109
     lv_label_set_text(bed, buf);
@@ -128,41 +117,15 @@ void lv_draw_ready_print(void) {
128 117
   disp_state_stack._disp_index = 0;
129 118
   ZERO(disp_state_stack._disp_state);
130 119
   scr = lv_screen_create(PRINT_READY_UI, "");
131
-  //lv_obj_set_hidden(scr, true);
132 120
 
133 121
   if (mks_test_flag == 0x1E) {
134
-    //(void)lv_label_create(scr, TITLE_XPOS, TITLE_YPOS, creat_title_text());
135
-
136 122
     // Create image buttons
137
-    //buttonPrint = lv_imgbtn_create(scr, nullptr);
138 123
     buttonTool = lv_imgbtn_create(scr, "F:/bmp_tool.bin", event_handler, ID_TOOL);
139 124
 
140 125
     lv_obj_set_pos(buttonTool, 360, 180);
141 126
 
142
-    //buttonSet = lv_imgbtn_create(scr, nullptr);
143
-    //lv_obj_set_pos(buttonSet, 180, 90);
144
-    //lv_obj_set_pos(buttonPrint, 340, 90);
145
-
146
-    //lv_obj_set_pos(buttonTool, SIMPLE_FIRST_PAGE_GRAP+1, (TFT_HEIGHT-BTN_Y_PIXEL)/2+2);
147
-    //lv_obj_set_pos(buttonSet, BTN_X_PIXEL+SIMPLE_FIRST_PAGE_GRAP*2+1, (TFT_HEIGHT-BTN_Y_PIXEL)/2+2);
148
-    //lv_obj_set_pos(buttonPrint, BTN_X_PIXEL*2+SIMPLE_FIRST_PAGE_GRAP*3+1, (TFT_HEIGHT-BTN_Y_PIXEL)/2+2);
149
-
150
-    // Create labels on the image buttons
151
-    //lv_btn_set_layout(buttonPrint, LV_LAYOUT_OFF);
152
-    //lv_btn_set_layout(buttonSet, LV_LAYOUT_OFF);
153
-
154
-    //lv_obj_t *label_print = lv_label_create_empty(buttonPrint);
155
-    //lv_obj_t *label_set = lv_label_create_empty(buttonSet);
156 127
     lv_obj_t *label_tool = lv_label_create_empty(buttonTool);
157 128
     if (gCfgItems.multiple_language) {
158
-      //lv_label_set_text(label_print, main_menu.print);
159
-      //lv_obj_align(label_print, buttonPrint, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
160
-
161
-      //lv_label_set_text(label_set, main_menu.set);
162
-      //lv_obj_align(label_set, buttonSet, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
163
-
164
-      //lv_label_set_style(label_tool, LV_BTN_STATE_PR, &tft_style_label_pre);
165
-      //lv_label_set_style(label_tool, LV_BTN_STATE_REL, &tft_style_label_rel);
166 129
       lv_label_set_text(label_tool, main_menu.tool);
167 130
       lv_obj_align(label_tool, buttonTool, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
168 131
     }
@@ -179,11 +142,6 @@ void lv_draw_ready_print(void) {
179 142
         lv_label_set_text(e2, buf);
180 143
       #endif
181 144
 
182
-      //e3 = lv_label_create_empty(scr);
183
-      //lv_obj_set_pos(e3, 20, 70);
184
-      //sprintf_P(buf, PSTR("e1:  %d"), (int)thermalManager.temp_hotend[2].celsius);
185
-      //lv_label_set_text(e3, buf);
186
-
187 145
       #if HAS_HEATED_BED
188 146
         bed = lv_label_create_empty(scr);
189 147
         lv_obj_set_pos(bed, 20, 95);

+ 0
- 1
Marlin/src/lcd/extui/lib/mks_ui/draw_ready_print.h Bestand weergeven

@@ -33,7 +33,6 @@ extern void disp_det_error();
33 33
 extern void disp_det_ok();
34 34
 extern void lv_clear_ready_print();
35 35
 
36
-//extern void disp_temp_ready_print();
37 36
 #ifdef __cplusplus
38 37
   } /* C-declarations for C++ */
39 38
 #endif

+ 8
- 28
Marlin/src/lcd/extui/lib/mks_ui/draw_set.cpp Bestand weergeven

@@ -27,10 +27,6 @@
27 27
 #include "draw_set.h"
28 28
 #include "draw_ui.h"
29 29
 #include <lv_conf.h>
30
-//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
31
-//#include "../lvgl/src/lv_objx/lv_img.h"
32
-//#include "../lvgl/src/lv_core/lv_disp.h"
33
-//#include "../lvgl/src/lv_core/lv_refr.h"
34 30
 
35 31
 #include "pic_manager.h"
36 32
 
@@ -58,36 +54,29 @@ enum {
58 54
 
59 55
 static void event_handler(lv_obj_t *obj, lv_event_t event) {
60 56
   if (event != LV_EVENT_RELEASED) return;
61
-  #if ENABLED(MKS_WIFI_MODULE)
62
-    char buf[6] = { 0 };
63
-  #endif
57
+  if (obj->mks_obj_id == ID_S_CONTINUE) return;
58
+  if (obj->mks_obj_id == ID_S_MOTOR_OFF) {
59
+    TERN(HAS_SUICIDE, suicide(), queue.enqueue_now_P(PSTR("M84")));
60
+    return;
61
+  }
62
+  lv_clear_set();
64 63
   switch (obj->mks_obj_id) {
65 64
     case ID_S_FAN:
66
-      lv_clear_set();
67 65
       lv_draw_fan();
68 66
       break;
69 67
     case ID_S_ABOUT:
70
-      lv_clear_set();
71 68
       lv_draw_about();
72 69
       break;
73
-    case ID_S_CONTINUE: break;
74
-    case ID_S_MOTOR_OFF:
75
-      TERN(HAS_SUICIDE, suicide(), queue.enqueue_now_P(PSTR("M84")));
76
-      break;
77 70
     case ID_S_LANGUAGE:
78
-      lv_clear_set();
79 71
       lv_draw_language();
80 72
       break;
81 73
     case ID_S_MACHINE_PARA:
82
-      lv_clear_set();
83 74
       lv_draw_machine_para();
84 75
       break;
85 76
     case ID_S_EEPROM_SET:
86
-      lv_clear_set();
87 77
       lv_draw_eeprom_settings();
88 78
       break;
89 79
     case ID_S_RETURN:
90
-      lv_clear_set();
91 80
       lv_draw_ready_print();
92 81
       break;
93 82
 
@@ -96,32 +85,23 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) {
96 85
         if (gCfgItems.wifi_mode_sel == STA_MODEL) {
97 86
           if (wifi_link_state == WIFI_CONNECTED) {
98 87
             last_disp_state = SET_UI;
99
-            lv_clear_set();
100 88
             lv_draw_wifi();
101 89
           }
102 90
           else {
103 91
             if (uiCfg.command_send == 1) {
104
-              buf[0] = 0xA5;
105
-              buf[1] = 0x07;
106
-              buf[2] = 0x00;
107
-              buf[3] = 0x00;
108
-              buf[4] = 0xFC;
109
-              raw_send_to_wifi(buf, 5);
110
-
92
+              uint8_t cmd_wifi_list[] = { 0xA5, 0x07, 0x00, 0x00, 0xFC };
93
+              raw_send_to_wifi(cmd_wifi_list, COUNT(cmd_wifi_list));
111 94
               last_disp_state = SET_UI;
112
-              lv_clear_set();
113 95
               lv_draw_wifi_list();
114 96
             }
115 97
             else {
116 98
               last_disp_state = SET_UI;
117
-              lv_clear_set();
118 99
               lv_draw_dialog(DIALOG_WIFI_ENABLE_TIPS);
119 100
             }
120 101
           }
121 102
         }
122 103
         else {
123 104
           last_disp_state = SET_UI;
124
-          lv_clear_set();
125 105
           lv_draw_wifi();
126 106
         }
127 107
         break;

+ 0
- 1
Marlin/src/lcd/extui/lib/mks_ui/draw_set.h Bestand weergeven

@@ -28,7 +28,6 @@
28 28
 extern void lv_draw_set(void);
29 29
 extern void lv_clear_set();
30 30
 
31
-//extern void disp_temp_ready_print();
32 31
 #ifdef __cplusplus
33 32
   } /* C-declarations for C++ */
34 33
 #endif

+ 5
- 16
Marlin/src/lcd/extui/lib/mks_ui/draw_step_settings.cpp Bestand weergeven

@@ -45,48 +45,37 @@ enum {
45 45
 
46 46
 static void event_handler(lv_obj_t *obj, lv_event_t event) {
47 47
   if (event != LV_EVENT_RELEASED) return;
48
+  lv_clear_step_settings();
48 49
   switch (obj->mks_obj_id) {
49 50
     case ID_STEP_RETURN:
50 51
       uiCfg.para_ui_page = 0;
51
-      lv_clear_step_settings();
52 52
       draw_return_ui();
53
-      break;
53
+      return;
54 54
     case ID_STEP_X:
55 55
       value = Xstep;
56
-      lv_clear_step_settings();
57
-      lv_draw_number_key();
58 56
       break;
59 57
     case ID_STEP_Y:
60 58
       value = Ystep;
61
-      lv_clear_step_settings();
62
-      lv_draw_number_key();
63 59
       break;
64 60
     case ID_STEP_Z:
65 61
       value = Zstep;
66
-      lv_clear_step_settings();
67
-      lv_draw_number_key();
68 62
       break;
69 63
     case ID_STEP_E0:
70 64
       value = E0step;
71
-      lv_clear_step_settings();
72
-      lv_draw_number_key();
73 65
       break;
74 66
     case ID_STEP_E1:
75 67
       value = E1step;
76
-      lv_clear_step_settings();
77
-      lv_draw_number_key();
78 68
       break;
79 69
     case ID_STEP_UP:
80 70
       uiCfg.para_ui_page = 0;
81
-      lv_clear_step_settings();
82 71
       lv_draw_step_settings();
83
-      break;
72
+      return;
84 73
     case ID_STEP_DOWN:
85 74
       uiCfg.para_ui_page = 1;
86
-      lv_clear_step_settings();
87 75
       lv_draw_step_settings();
88
-      break;
76
+      return;
89 77
   }
78
+  lv_draw_number_key();
90 79
 }
91 80
 
92 81
 void lv_draw_step_settings(void) {

+ 6
- 17
Marlin/src/lcd/extui/lib/mks_ui/draw_tmc_current_settings.cpp Bestand weergeven

@@ -46,60 +46,49 @@ enum {
46 46
 
47 47
 static void event_handler(lv_obj_t *obj, lv_event_t event) {
48 48
   if (event != LV_EVENT_RELEASED) return;
49
+  lv_clear_tmc_current_settings();
49 50
   switch (obj->mks_obj_id) {
50 51
     case ID_TMC_CURRENT_RETURN:
51 52
       uiCfg.para_ui_page = 0;
52
-      lv_clear_tmc_current_settings();
53 53
       draw_return_ui();
54
-      break;
55
-
54
+      return;
56 55
     #if AXIS_IS_TMC(X)
57 56
       case ID_TMC_CURRENT_X:
58 57
         value = Xcurrent;
59
-        lv_clear_tmc_current_settings();
60
-        lv_draw_number_key();
61 58
         break;
62 59
     #endif
63 60
     #if AXIS_IS_TMC(Y)
64 61
       case ID_TMC_CURRENT_Y:
65 62
         value = Ycurrent;
66
-        lv_clear_tmc_current_settings();
67
-        lv_draw_number_key();
68 63
         break;
69 64
     #endif
70 65
     #if AXIS_IS_TMC(Z)
71 66
       case ID_TMC_CURRENT_Z:
72 67
         value = Zcurrent;
73
-        lv_clear_tmc_current_settings();
74
-        lv_draw_number_key();
75 68
         break;
76 69
     #endif
77 70
     #if AXIS_IS_TMC(E0)
78 71
       case ID_TMC_CURRENT_E0:
79 72
         value = E0current;
80
-        lv_clear_tmc_current_settings();
81
-        lv_draw_number_key();
82 73
         break;
83 74
     #endif
84 75
     #if AXIS_IS_TMC(E1)
85 76
       case ID_TMC_CURRENT_E1:
86 77
         value = E1current;
87
-        lv_clear_tmc_current_settings();
88
-        lv_draw_number_key();
89 78
         break;
90 79
     #endif
91 80
 
92 81
     case ID_TMC_CURRENT_UP:
93 82
       uiCfg.para_ui_page = 0;
94
-      lv_clear_tmc_current_settings();
95 83
       lv_draw_tmc_current_settings();
96
-      break;
84
+      return;
97 85
     case ID_TMC_CURRENT_DOWN:
98 86
       uiCfg.para_ui_page = 1;
99
-      lv_clear_tmc_current_settings();
100 87
       lv_draw_tmc_current_settings();
101
-      break;
88
+      return;
102 89
   }
90
+  lv_draw_number_key();
91
+
103 92
 }
104 93
 
105 94
 void lv_draw_tmc_current_settings(void) {

+ 1
- 3
Marlin/src/lcd/extui/lib/mks_ui/draw_tmc_step_mode_settings.cpp Bestand weergeven

@@ -50,9 +50,7 @@ enum {
50 50
 
51 51
 static lv_obj_t *buttonXState = nullptr, *buttonYState = nullptr, *buttonZState = nullptr, *buttonE0State = nullptr;
52 52
 
53
-//#if AXIS_HAS_STEALTHCHOP(E1)
54
-  static lv_obj_t *buttonE1State = nullptr;
55
-//#endif
53
+static lv_obj_t *buttonE1State = nullptr;
56 54
 
57 55
 static void event_handler(lv_obj_t *obj, lv_event_t event) {
58 56
   if (event != LV_EVENT_RELEASED) return;

+ 6
- 13
Marlin/src/lcd/extui/lib/mks_ui/draw_tool.cpp Bestand weergeven

@@ -25,10 +25,6 @@
25 25
 
26 26
 #include "draw_ui.h"
27 27
 #include <lv_conf.h>
28
-//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
29
-//#include "../lvgl/src/lv_objx/lv_img.h"
30
-//#include "../lvgl/src/lv_core/lv_disp.h"
31
-//#include "../lvgl/src/lv_core/lv_refr.h"
32 28
 
33 29
 #include "../../../../gcode/queue.h"
34 30
 #include "../../../../module/temperature.h"
@@ -54,45 +50,42 @@ enum {
54 50
 
55 51
 static void event_handler(lv_obj_t *obj, lv_event_t event) {
56 52
   if (event != LV_EVENT_RELEASED) return;
53
+  #if ENABLED(AUTO_BED_LEVELING_BILINEAR)
54
+    bool clear = (obj->mks_obj_id != ID_T_LEVELING);
55
+  #else
56
+    constexpr bool clear = true;
57
+  #endif
58
+  if (clear) lv_clear_tool();
57 59
   switch (obj->mks_obj_id) {
58 60
     case ID_T_PRE_HEAT:
59
-      lv_clear_tool();
60 61
       lv_draw_preHeat();
61 62
       break;
62 63
     case ID_T_EXTRUCT:
63
-      lv_clear_tool();
64 64
       lv_draw_extrusion();
65 65
       break;
66 66
     case ID_T_MOV:
67
-      lv_clear_tool();
68 67
       lv_draw_move_motor();
69 68
       break;
70 69
     case ID_T_HOME:
71
-      lv_clear_tool();
72 70
       lv_draw_home();
73 71
       break;
74 72
     case ID_T_LEVELING:
75 73
       #if ENABLED(AUTO_BED_LEVELING_BILINEAR)
76
-        //queue.enqueue_one_P(PSTR("G28"));
77
-        //queue.enqueue_one_P(PSTR("G29"));
78 74
         get_gcode_command(AUTO_LEVELING_COMMAND_ADDR,(uint8_t *)public_buf_m);
79 75
         public_buf_m[sizeof(public_buf_m)-1] = 0;
80 76
         queue.inject_P(PSTR(public_buf_m));
81 77
       #else
82 78
         uiCfg.leveling_first_time = 1;
83
-        lv_clear_tool();
84 79
         lv_draw_manualLevel();
85 80
       #endif
86 81
       break;
87 82
     case ID_T_FILAMENT:
88 83
       uiCfg.desireSprayerTempBak = thermalManager.temp_hotend[uiCfg.curSprayerChoose].target;
89
-      lv_clear_tool();
90 84
       lv_draw_filament_change();
91 85
       break;
92 86
     case ID_T_MORE: break;
93 87
     case ID_T_RETURN:
94 88
       TERN_(MKS_TEST, curent_disp_ui = 1);
95
-      lv_clear_tool();
96 89
       lv_draw_ready_print();
97 90
       break;
98 91
   }

+ 0
- 1
Marlin/src/lcd/extui/lib/mks_ui/draw_tool.h Bestand weergeven

@@ -28,7 +28,6 @@
28 28
 extern void lv_draw_tool(void);
29 29
 extern void lv_clear_tool();
30 30
 
31
-//extern void disp_temp_ready_print();
32 31
 #ifdef __cplusplus
33 32
   } /* C-declarations for C++ */
34 33
 #endif

+ 0
- 1
Marlin/src/lcd/extui/lib/mks_ui/draw_touch_calibration.h Bestand weergeven

@@ -29,7 +29,6 @@ extern void lv_draw_touch_calibration_screen();
29 29
 extern void lv_clear_touch_calibration_screen();
30 30
 extern void lv_update_touch_calibration_screen();
31 31
 
32
-//extern void disp_temp_ready_print();
33 32
 #ifdef __cplusplus
34 33
   } /* C-declarations for C++ */
35 34
 #endif

+ 52
- 101
Marlin/src/lcd/extui/lib/mks_ui/draw_ui.cpp Bestand weergeven

@@ -70,10 +70,11 @@ uint8_t printing_rate_update_flag;
70 70
 
71 71
 extern bool once_flag;
72 72
 extern uint8_t sel_id;
73
-extern uint8_t public_buf[512];
74
-extern uint8_t bmp_public_buf[17 * 1024];
75 73
 extern lv_group_t *g;
76 74
 
75
+extern uint8_t bmp_public_buf[14 * 1024];
76
+extern uint8_t public_buf[513];
77
+
77 78
 extern void LCD_IO_WriteData(uint16_t RegValue);
78 79
 
79 80
 static const char custom_gcode_command[][100] = {
@@ -568,11 +569,7 @@ char *creat_title_text() {
568 569
 
569 570
   ZERO(tmpCurFileStr);
570 571
 
571
-  #if _LFN_UNICODE
572
-    //cutFileName((TCHAR *)curFileName, 16, 16, (TCHAR *)tmpCurFileStr);
573
-  #else
574
-    cutFileName(list_file.long_name[sel_id], 16, 16, tmpCurFileStr);
575
-  #endif
572
+  cutFileName(list_file.long_name[sel_id], 16, 16, tmpCurFileStr);
576 573
 
577 574
   ZERO(public_buf_m);
578 575
 
@@ -589,10 +586,7 @@ char *creat_title_text() {
589 586
     index++;
590 587
   }
591 588
 
592
-  if (disp_state_stack._disp_state[disp_state_stack._disp_index] == PRINTING_UI
593
-    /*|| disp_state_stack._disp_state[disp_state_stack._disp_index] == OPERATE_UI
594
-    || disp_state_stack._disp_state[disp_state_stack._disp_index] == PAUSE_UI*/
595
-  ) {
589
+  if (disp_state_stack._disp_state[disp_state_stack._disp_index] == PRINTING_UI) {
596 590
     titleText_cat(public_buf_m, sizeof(public_buf_m), (char *)":");
597 591
     titleText_cat(public_buf_m, sizeof(public_buf_m), tmpCurFileStr);
598 592
   }
@@ -617,8 +611,6 @@ char *creat_title_text() {
617 611
 
618 612
   void preview_gcode_prehandle(char *path) {
619 613
     #if ENABLED(SDSUPPORT)
620
-      //uint8_t re;
621
-      //uint32_t read;
622 614
       uint32_t pre_read_cnt = 0;
623 615
       uint32_t *p1;
624 616
       char *cur_name;
@@ -957,7 +949,6 @@ void GUI_RefreshPage() {
957 949
 
958 950
   switch (disp_state) {
959 951
     case MAIN_UI:
960
-      //lv_draw_ready_print();
961 952
       break;
962 953
     case EXTRUSION_UI:
963 954
       if (temps_update_flag) {
@@ -972,14 +963,6 @@ void GUI_RefreshPage() {
972 963
       }
973 964
       break;
974 965
     case PRINT_READY_UI:
975
-      /*
976
-      if (gCfgItems.display_style == 2) {
977
-        if (temps_update_flag) {
978
-          temps_update_flag = false;
979
-          disp_restro_state();
980
-        }
981
-      }
982
-      */
983 966
       break;
984 967
 
985 968
     case PRINT_FILE_UI: break;
@@ -1000,23 +983,9 @@ void GUI_RefreshPage() {
1000 983
       break;
1001 984
 
1002 985
     case OPERATE_UI:
1003
-      /*
1004
-      if (temps_update_flag) {
1005
-        temps_update_flag = false;
1006
-        disp_temp_operate();
1007
-      }
1008
-
1009
-      setProBarRateOpera();
1010
-      */
1011 986
       break;
1012 987
 
1013 988
     case PAUSE_UI:
1014
-      /*
1015
-      if (temps_update_flag) {
1016
-        temps_update_flag = false;
1017
-        disp_temp_pause();
1018
-      }
1019
-      */
1020 989
       break;
1021 990
 
1022 991
     case FAN_UI:
@@ -1027,17 +996,6 @@ void GUI_RefreshPage() {
1027 996
       break;
1028 997
 
1029 998
     case MOVE_MOTOR_UI:
1030
-      /*
1031
-      if (mksReprint.mks_printer_state == MKS_IDLE) {
1032
-        if (z_high_count == 1 && temper_error_flg != 1) {
1033
-          z_high_count = 0;
1034
-          memset((char *)gCfgItems.move_z_coordinate, ' ', sizeof(gCfgItems.move_z_coordinate));
1035
-          GUI_DispStringAt((const char *)gCfgItems.move_z_coordinate, 380, TITLE_YPOS);
1036
-          sprintf_P((char *)gCfgItems.move_z_coordinate, PSTR("Z: %.3f"), current_position[Z_AXIS]);
1037
-          GUI_DispStringAt((const char *)gCfgItems.move_z_coordinate, 380, TITLE_YPOS);
1038
-        }
1039
-      }
1040
-      */
1041 999
       break;
1042 1000
 
1043 1001
     #if ENABLED(MKS_WIFI_MODULE)
@@ -1064,7 +1022,6 @@ void GUI_RefreshPage() {
1064 1022
       TERN_(MKS_WIFI_MODULE, wifi_scan_handle());
1065 1023
       break;
1066 1024
     case MESHLEVELING_UI:
1067
-      /*disp_zpos();*/
1068 1025
       break;
1069 1026
     case HARDWARE_TEST_UI:
1070 1027
       break;
@@ -1077,8 +1034,6 @@ void GUI_RefreshPage() {
1077 1034
       #endif
1078 1035
       break;
1079 1036
     case KEY_BOARD_UI:
1080
-      /*update_password_disp();
1081
-      update_join_state_disp();*/
1082 1037
       break;
1083 1038
     #if ENABLED(MKS_WIFI_MODULE)
1084 1039
       case WIFI_TIPS_UI:
@@ -1142,33 +1097,33 @@ void clear_cur_ui() {
1142 1097
   last_disp_state = disp_state_stack._disp_state[disp_state_stack._disp_index];
1143 1098
 
1144 1099
   switch (disp_state_stack._disp_state[disp_state_stack._disp_index]) {
1145
-    case PRINT_READY_UI:              //Get_Temperature_Flg = 0;
1100
+    case PRINT_READY_UI:
1146 1101
                                       lv_clear_ready_print(); break;
1147 1102
     case PRINT_FILE_UI:               lv_clear_print_file(); break;
1148 1103
     case PRINTING_UI:                 lv_clear_printing(); break;
1149 1104
     case MOVE_MOTOR_UI:               lv_clear_move_motor(); break;
1150 1105
     case OPERATE_UI:                  lv_clear_operation(); break;
1151
-    case PAUSE_UI:                    /* Clear_pause(); */ break;
1106
+    case PAUSE_UI:                    break;
1152 1107
     case EXTRUSION_UI:                lv_clear_extrusion(); break;
1153 1108
     case PRE_HEAT_UI:                 lv_clear_preHeat(); break;
1154 1109
     case CHANGE_SPEED_UI:             lv_clear_change_speed(); break;
1155 1110
     case FAN_UI:                      lv_clear_fan(); break;
1156 1111
     case SET_UI:                      lv_clear_set(); break;
1157 1112
     case ZERO_UI:                     lv_clear_home(); break;
1158
-    case SPRAYER_UI:                  /* Clear_Sprayer(); */ break;
1159
-    case MACHINE_UI:                  /* Clear_Machine(); */ break;
1113
+    case SPRAYER_UI:                  break;
1114
+    case MACHINE_UI:                  break;
1160 1115
     case LANGUAGE_UI:                 lv_clear_language(); break;
1161 1116
     case ABOUT_UI:                    lv_clear_about(); break;
1162
-    case LOG_UI:                      /* Clear_Connect(); */ break;
1163
-    case DISK_UI:                     /* Clear_Disk(); */ break;
1117
+    case LOG_UI:                      break;
1118
+    case DISK_UI:                     break;
1164 1119
     #if ENABLED(MKS_WIFI_MODULE)
1165 1120
       case WIFI_UI:                   lv_clear_wifi(); break;
1166 1121
     #endif
1167 1122
     case MORE_UI:                     /* Clear_more(); */ break;
1168
-    case FILETRANSFER_UI:             /* Clear_fileTransfer(); */ break;
1123
+    case FILETRANSFER_UI:             break;
1169 1124
     case DIALOG_UI:                   lv_clear_dialog(); break;
1170
-    case FILETRANSFERSTATE_UI:        /* Clear_WifiFileTransferdialog(); */ break;
1171
-    case PRINT_MORE_UI:               /* Clear_Printmore(); */ break;
1125
+    case FILETRANSFERSTATE_UI:        break;
1126
+    case PRINT_MORE_UI:               break;
1172 1127
     case FILAMENTCHANGE_UI:           lv_clear_filament_change(); break;
1173 1128
     case LEVELING_UI:                 lv_clear_manualLevel(); break;
1174 1129
     case BIND_UI:                     /* Clear_Bind(); */ break;
@@ -1176,8 +1131,8 @@ void clear_cur_ui() {
1176 1131
       case NOZZLE_PROBE_OFFSET_UI:    lv_clear_auto_level_offset_settings(); break;
1177 1132
     #endif
1178 1133
     case TOOL_UI:                     lv_clear_tool(); break;
1179
-    case MESHLEVELING_UI:             /* Clear_MeshLeveling(); */ break;
1180
-    case HARDWARE_TEST_UI:            /* Clear_Hardwaretest(); */ break;
1134
+    case MESHLEVELING_UI:             break;
1135
+    case HARDWARE_TEST_UI:            break;
1181 1136
     #if ENABLED(MKS_WIFI_MODULE)
1182 1137
       case WIFI_LIST_UI:              lv_clear_wifi_list(); break;
1183 1138
     #endif
@@ -1187,28 +1142,28 @@ void clear_cur_ui() {
1187 1142
     #endif
1188 1143
     case MACHINE_PARA_UI:             lv_clear_machine_para(); break;
1189 1144
     case MACHINE_SETTINGS_UI:         lv_clear_machine_settings(); break;
1190
-    case TEMPERATURE_SETTINGS_UI:     /* Clear_TemperatureSettings(); */ break;
1145
+    case TEMPERATURE_SETTINGS_UI:     break;
1191 1146
     case MOTOR_SETTINGS_UI:           lv_clear_motor_settings(); break;
1192
-    case MACHINETYPE_UI:              /* Clear_MachineType(); */ break;
1193
-    case STROKE_UI:                   /* Clear_Stroke(); */ break;
1194
-    case HOME_DIR_UI:                 /* Clear_HomeDir(); */ break;
1195
-    case ENDSTOP_TYPE_UI:             /* Clear_EndstopType(); */ break;
1196
-    case FILAMENT_SETTINGS_UI:        lv_clear_filament_settings(); break;
1197
-    case LEVELING_SETTIGNS_UI:        /* Clear_LevelingSettings(); */ break;
1147
+    case MACHINETYPE_UI:              break;
1148
+    case STROKE_UI:                   break;
1149
+    case HOME_DIR_UI:                 break;
1150
+    case ENDSTOP_TYPE_UI:             break;
1151
+    case FILAMENT_SETTINGS_UI:        break;
1152
+    case LEVELING_SETTIGNS_UI:        break;
1198 1153
     case LEVELING_PARA_UI:            lv_clear_level_settings(); break;
1199
-    case DELTA_LEVELING_PARA_UI:      /* Clear_DeltaLevelPara(); */ break;
1154
+    case DELTA_LEVELING_PARA_UI:      break;
1200 1155
     case MANUAL_LEVELING_POSIGION_UI: lv_clear_manual_level_pos_settings(); break;
1201 1156
     case MAXFEEDRATE_UI:              lv_clear_max_feedrate_settings(); break;
1202 1157
     case STEPS_UI:                    lv_clear_step_settings(); break;
1203 1158
     case ACCELERATION_UI:             lv_clear_acceleration_settings(); break;
1204 1159
     case JERK_UI:                     TERN_(HAS_CLASSIC_JERK, lv_clear_jerk_settings()); break;
1205
-    case MOTORDIR_UI:                 /* Clear_MotorDir(); */ break;
1206
-    case HOMESPEED_UI:                /* Clear_HomeSpeed(); */ break;
1207
-    case NOZZLE_CONFIG_UI:            /* Clear_NozzleConfig(); */ break;
1208
-    case HOTBED_CONFIG_UI:            /* Clear_HotbedConfig(); */ break;
1160
+    case MOTORDIR_UI:                 break;
1161
+    case HOMESPEED_UI:                break;
1162
+    case NOZZLE_CONFIG_UI:            break;
1163
+    case HOTBED_CONFIG_UI:            break;
1209 1164
     case ADVANCED_UI:                 lv_clear_advance_settings(); break;
1210
-    case DOUBLE_Z_UI:                 /* Clear_DoubleZ(); */ break;
1211
-    case ENABLE_INVERT_UI:            /* Clear_EnableInvert(); */ break;
1165
+    case DOUBLE_Z_UI:                 break;
1166
+    case ENABLE_INVERT_UI:            break;
1212 1167
     case NUMBER_KEY_UI:               lv_clear_number_key(); break;
1213 1168
     case BABY_STEP_UI:                lv_clear_baby_stepping(); break;
1214 1169
     case PAUSE_POS_UI:                lv_clear_pause_position(); break;
@@ -1233,7 +1188,6 @@ void clear_cur_ui() {
1233 1188
     #endif
1234 1189
     default: break;
1235 1190
   }
1236
-  //GUI_Clear();
1237 1191
 }
1238 1192
 
1239 1193
 void draw_return_ui() {
@@ -1253,25 +1207,25 @@ void draw_return_ui() {
1253 1207
 
1254 1208
       case MOVE_MOTOR_UI:               lv_draw_move_motor(); break;
1255 1209
       case OPERATE_UI:                  lv_draw_operation(); break;
1256
-      case PAUSE_UI:                    /* draw_pause(); */ break;
1210
+      case PAUSE_UI:                    break;
1257 1211
       case EXTRUSION_UI:                lv_draw_extrusion(); break;
1258 1212
       case PRE_HEAT_UI:                 lv_draw_preHeat(); break;
1259 1213
       case CHANGE_SPEED_UI:             lv_draw_change_speed(); break;
1260 1214
       case FAN_UI:                      lv_draw_fan(); break;
1261 1215
       case SET_UI:                      lv_draw_set(); break;
1262 1216
       case ZERO_UI:                     lv_draw_home(); break;
1263
-      case SPRAYER_UI:                  /* draw_Sprayer(); */ break;
1264
-      case MACHINE_UI:                  /* draw_Machine(); */ break;
1217
+      case SPRAYER_UI:                  break;
1218
+      case MACHINE_UI:                  break;
1265 1219
       case LANGUAGE_UI:                 lv_draw_language(); break;
1266 1220
       case ABOUT_UI:                    lv_draw_about(); break;
1267 1221
 
1268
-      case CALIBRATE_UI:                /* draw_calibrate(); */ break;
1269
-      case DISK_UI:                     /* draw_Disk(); */ break;
1222
+      case CALIBRATE_UI:                break;
1223
+      case DISK_UI:                     break;
1270 1224
       #if ENABLED(MKS_WIFI_MODULE)
1271 1225
         case WIFI_UI:                   lv_draw_wifi(); break;
1272 1226
       #endif
1273
-      case MORE_UI:                     /* draw_More(); */ break;
1274 1227
       case PRINT_MORE_UI:               /* draw_printmore(); */ break;
1228
+      case MORE_UI:                     break;
1275 1229
       case FILAMENTCHANGE_UI:           lv_draw_filament_change(); break;
1276 1230
       case LEVELING_UI:                 lv_draw_manualLevel(); break;
1277 1231
       case BIND_UI:                     /* draw_bind(); */ break;
@@ -1279,8 +1233,8 @@ void draw_return_ui() {
1279 1233
         case NOZZLE_PROBE_OFFSET_UI:    lv_draw_auto_level_offset_settings(); break;
1280 1234
       #endif
1281 1235
       case TOOL_UI:                     lv_draw_tool(); break;
1282
-      case MESHLEVELING_UI:             /* draw_meshleveling(); */ break;
1283
-      case HARDWARE_TEST_UI:            /* draw_Hardwaretest(); */ break;
1236
+      case MESHLEVELING_UI:             break;
1237
+      case HARDWARE_TEST_UI:            break;
1284 1238
       #if ENABLED(MKS_WIFI_MODULE)
1285 1239
         case WIFI_LIST_UI:              lv_draw_wifi_list(); break;
1286 1240
       #endif
@@ -1290,16 +1244,16 @@ void draw_return_ui() {
1290 1244
       #endif
1291 1245
       case MACHINE_PARA_UI:             lv_draw_machine_para(); break;
1292 1246
       case MACHINE_SETTINGS_UI:         lv_draw_machine_settings(); break;
1293
-      case TEMPERATURE_SETTINGS_UI:     /* draw_TemperatureSettings(); */ break;
1247
+      case TEMPERATURE_SETTINGS_UI:     break;
1294 1248
       case MOTOR_SETTINGS_UI:           lv_draw_motor_settings(); break;
1295
-      case MACHINETYPE_UI:              /* draw_MachineType(); */ break;
1296
-      case STROKE_UI:                   /* draw_Stroke(); */ break;
1297
-      case HOME_DIR_UI:                 /* draw_HomeDir(); */ break;
1298
-      case ENDSTOP_TYPE_UI:             /* draw_EndstopType(); */ break;
1249
+      case MACHINETYPE_UI:              break;
1250
+      case STROKE_UI:                   break;
1251
+      case HOME_DIR_UI:                 break;
1252
+      case ENDSTOP_TYPE_UI:             break;
1299 1253
       case FILAMENT_SETTINGS_UI:        lv_draw_filament_settings(); break;
1300
-      case LEVELING_SETTIGNS_UI:        /* draw_LevelingSettings(); */ break;
1254
+      case LEVELING_SETTIGNS_UI:        break;
1301 1255
       case LEVELING_PARA_UI:            lv_draw_level_settings(); break;
1302
-      case DELTA_LEVELING_PARA_UI:      /* draw_DeltaLevelPara(); */ break;
1256
+      case DELTA_LEVELING_PARA_UI:      break;
1303 1257
       case MANUAL_LEVELING_POSIGION_UI: lv_draw_manual_level_pos_settings(); break;
1304 1258
       case MAXFEEDRATE_UI:              lv_draw_max_feedrate_settings(); break;
1305 1259
       case STEPS_UI:                    lv_draw_step_settings(); break;
@@ -1307,15 +1261,15 @@ void draw_return_ui() {
1307 1261
       #if HAS_CLASSIC_JERK
1308 1262
         case JERK_UI:                   lv_draw_jerk_settings(); break;
1309 1263
       #endif
1310
-      case MOTORDIR_UI:                 /* draw_MotorDir(); */ break;
1311
-      case HOMESPEED_UI:                /* draw_HomeSpeed(); */ break;
1312
-      case NOZZLE_CONFIG_UI:            /* draw_NozzleConfig(); */ break;
1313
-      case HOTBED_CONFIG_UI:            /* draw_HotbedConfig(); */ break;
1264
+      case MOTORDIR_UI:                 break;
1265
+      case HOMESPEED_UI:                break;
1266
+      case NOZZLE_CONFIG_UI:            break;
1267
+      case HOTBED_CONFIG_UI:            break;
1314 1268
       case ADVANCED_UI:                 lv_draw_advance_settings(); break;
1315
-      case DOUBLE_Z_UI:                 /* draw_DoubleZ(); */ break;
1316
-      case ENABLE_INVERT_UI:            /* draw_EnableInvert(); */ break;
1269
+      case DOUBLE_Z_UI:                 break;
1270
+      case ENABLE_INVERT_UI:            break;
1317 1271
       case NUMBER_KEY_UI:               lv_draw_number_key(); break;
1318
-      case DIALOG_UI:                   /* draw_dialog(uiCfg.dialogType); */ break;
1272
+      case DIALOG_UI:                   break;
1319 1273
       case BABY_STEP_UI:                lv_draw_baby_stepping(); break;
1320 1274
       case PAUSE_POS_UI:                lv_draw_pause_position(); break;
1321 1275
       #if HAS_TRINAMIC_CONFIG
@@ -1612,7 +1566,6 @@ void print_time_count() {
1612 1566
 }
1613 1567
 
1614 1568
 void LV_TASK_HANDLER() {
1615
-  //lv_tick_inc(1);
1616 1569
   lv_task_handler();
1617 1570
   if (mks_test_flag == 0x1E) mks_hardware_test();
1618 1571
 
@@ -1622,8 +1575,6 @@ void LV_TASK_HANDLER() {
1622 1575
 
1623 1576
   TERN_(MKS_WIFI_MODULE, get_wifi_commands());
1624 1577
 
1625
-  //sd_detection();
1626
-
1627 1578
   #if HAS_ROTARY_ENCODER
1628 1579
     if (gCfgItems.encoder_enable) lv_update_encoder();
1629 1580
   #endif

+ 1
- 1
Marlin/src/lcd/extui/lib/mks_ui/draw_ui.h Bestand weergeven

@@ -28,7 +28,7 @@
28 28
 
29 29
 // the colors of the last MKS Ui
30 30
 #undef LV_COLOR_BACKGROUND
31
-#define LV_COLOR_BACKGROUND LV_COLOR_MAKE(0x1A, 0x1A, 0x1A) // LV_COLOR_MAKE(0x00, 0x00, 0x00)
31
+#define LV_COLOR_BACKGROUND LV_COLOR_MAKE(0x1A, 0x1A, 0x1A)
32 32
 
33 33
 #define TFT_LV_PARA_BACK_BODY_COLOR  LV_COLOR_MAKE(0x4A, 0x52, 0xFF)
34 34
 

+ 2
- 3
Marlin/src/lcd/extui/lib/mks_ui/draw_wifi.cpp Bestand weergeven

@@ -153,9 +153,8 @@ void disp_wifi_state() {
153 153
 }
154 154
 
155 155
 void lv_clear_wifi() {
156
-  #if HAS_ROTARY_ENCODER
157
-    if (gCfgItems.encoder_enable) lv_group_remove_all_objs(g);
158
-  #endif
156
+  if (TERN0(HAS_ROTARY_ENCODER, gCfgItems.encoder_enable))
157
+    lv_group_remove_all_objs(g);
159 158
   lv_obj_del(scr);
160 159
 }
161 160
 

+ 3
- 0
Marlin/src/lcd/extui/lib/mks_ui/draw_wifi_list.cpp Bestand weergeven

@@ -122,6 +122,9 @@ void lv_draw_wifi_list(void) {
122 122
       lv_group_add_obj(g, buttonDown);
123 123
       lv_group_add_obj(g, buttonBack);
124 124
     }
125
+  #else
126
+    UNUSED(buttonDown);
127
+    UNUSED(buttonBack);
125 128
   #endif
126 129
 
127 130
   disp_wifi_list();

+ 0
- 10
Marlin/src/lcd/extui/lib/mks_ui/gb2312_puhui16.cpp Bestand weergeven

@@ -50,10 +50,8 @@ static x_header_t __g_xbf_hd = { .min = 0, .max = 0, .bpp = 0 };
50 50
 static uint8_t __g_font_buf[63];
51 51
 
52 52
 static uint8_t *__user_font_getdata(int offset, int size) {
53
-  //ZERO(__g_font_buf);
54 53
   get_spi_flash_data((char *)__g_font_buf, offset, size);
55 54
   return __g_font_buf;
56
-  //return &buf_test[offset];
57 55
 }
58 56
 
59 57
 static const uint8_t * __user_font_get_bitmap(const lv_font_t * font, uint32_t unicode_letter) {
@@ -67,9 +65,7 @@ static const uint8_t * __user_font_get_bitmap(const lv_font_t * font, uint32_t u
67 65
   uint32_t *p_pos = (uint32_t *)__user_font_getdata(unicode_offset, 4);
68 66
   if (p_pos[0] != 0) {
69 67
     uint32_t pos = p_pos[0];
70
-    //glyph_dsc_t * gdsc = (glyph_dsc_t*)__user_font_getdata(pos, 2);
71 68
     __user_font_getdata(pos, 2);
72
-    //return __user_font_getdata(pos+2, gdsc->box_w*__g_xbf_hd.bpp/8);
73 69
     return __user_font_getdata(pos + 2, sizeof(__g_font_buf));
74 70
   }
75 71
   return nullptr;
@@ -97,12 +93,6 @@ static bool __user_font_get_glyph_dsc(const lv_font_t * font, lv_font_glyph_dsc_
97 93
   return false;
98 94
 }
99 95
 
100
-/*lv_font_t gb2312_puhui32 = {
101
-.get_glyph_bitmap = __user_font_get_bitmap,
102
-.get_glyph_dsc = __user_font_get_glyph_dsc,
103
-.line_height = 25,
104
-.base_line = 0,
105
-};*/
106 96
 lv_font_t gb2312_puhui32;
107 97
 void init_gb2312_font() {
108 98
   gb2312_puhui32.get_glyph_bitmap = __user_font_get_bitmap;

+ 1
- 19
Marlin/src/lcd/extui/lib/mks_ui/mks_hardware_test.cpp Bestand weergeven

@@ -53,11 +53,8 @@ void test_gpio_readlevel_L() {
53 53
     #if PIN_EXISTS(MT_DET_2)
54 54
       mt_det2_sta = (READ(MT_DET_2_PIN) == 0);
55 55
     #endif
56
-    //mt_det3_sta = (READ(FIL_RUNOUT_3_PIN) == 0);
57 56
     endstopx1_sta = (READ(X_MIN_PIN) == 0);
58
-    //endstopx2_sta = (READ(X_MAX_PIN) == 0);
59 57
     endstopy1_sta = (READ(Y_MIN_PIN) == 0);
60
-    //endstopy2_sta = (READ(Y_MAX_PIN) == 0);
61 58
     endstopz1_sta = (READ(Z_MIN_PIN) == 0);
62 59
     endstopz2_sta = (READ(Z_MAX_PIN) == 0);
63 60
   #endif
@@ -75,11 +72,8 @@ void test_gpio_readlevel_H() {
75 72
     #if PIN_EXISTS(MT_DET_2)
76 73
       mt_det2_sta = (READ(MT_DET_2_PIN) == 1);
77 74
     #endif
78
-    //mt_det3_sta = (READ(MT_DET_3_PIN) == 1);
79 75
     endstopx1_sta = (READ(X_MIN_PIN) == 1);
80
-    //endstopx2_sta = (READ(X_MAX_PIN) == 1);
81 76
     endstopy1_sta = (READ(Y_MIN_PIN) == 1);
82
-    //endstopy2_sta = (READ(Y_MAX_PIN) == 1);
83 77
     endstopz1_sta = (READ(Z_MIN_PIN) == 1);
84 78
     endstopz2_sta = (READ(Z_MAX_PIN) == 1);
85 79
   #endif
@@ -88,9 +82,7 @@ void test_gpio_readlevel_H() {
88 82
 void init_test_gpio() {
89 83
   #ifdef MKS_TEST
90 84
     SET_INPUT_PULLUP(X_MIN_PIN);
91
-    //SET_INPUT_PULLUP(X_MAX_PIN);
92 85
     SET_INPUT_PULLUP(Y_MIN_PIN);
93
-    //SET_INPUT_PULLUP(Y_MAX_PIN);
94 86
     SET_INPUT_PULLUP(Z_MIN_PIN);
95 87
     SET_INPUT_PULLUP(Z_MAX_PIN);
96 88
 
@@ -100,7 +92,6 @@ void init_test_gpio() {
100 92
     #if PIN_EXISTS(MT_DET_2)
101 93
       SET_INPUT_PULLUP(MT_DET_2_PIN);
102 94
     #endif
103
-    //SET_INPUT_PULLUP(MT_DET_3_PIN);
104 95
 
105 96
     SET_INPUT_PULLUP(MKS_TEST_POWER_LOSS_PIN);
106 97
     SET_INPUT_PULLUP(MKS_TEST_PS_ON_PIN);
@@ -122,7 +113,6 @@ void init_test_gpio() {
122 113
     #if !MB(MKS_ROBIN_E3P)
123 114
       WRITE(E1_ENABLE_PIN, LOW);
124 115
     #endif
125
-    //WRITE(E2_ENABLE_PIN, LOW);
126 116
 
127 117
     #if MB(MKS_ROBIN_E3P)
128 118
       SET_INPUT_PULLUP(PA1);
@@ -167,15 +157,13 @@ void mks_gpio_test() {
167 157
         && (READ(PE6) == 0)
168 158
         && (READ(PE7) == 0)
169 159
       #endif
170
-    ) // &&(mt_det3_sta == 1))
160
+    ) 
171 161
       disp_det_ok();
172 162
     else
173 163
       disp_det_error();
174 164
 
175 165
     if ( (endstopx1_sta == 1)
176
-      //&& (endstopx2_sta == 1)
177 166
       && (endstopy1_sta == 1)
178
-      //&& (endstopy2_sta == 1)
179 167
       && (endstopz1_sta == 1)
180 168
       && (endstopz2_sta == 1)
181 169
     )
@@ -195,9 +183,7 @@ void mks_hardware_test() {
195 183
       #if !MB(MKS_ROBIN_E3P)
196 184
         WRITE(E1_DIR_PIN, LOW);
197 185
       #endif
198
-      //WRITE(E2_DIR_PIN, LOW);
199 186
       thermalManager.fan_speed[0] = 255;
200
-      //WRITE(HEATER_2_PIN, HIGH); // HE2
201 187
       #if !MB(MKS_ROBIN_E3P)
202 188
         WRITE(HEATER_1_PIN, HIGH); // HE1
203 189
       #endif
@@ -212,9 +198,7 @@ void mks_hardware_test() {
212 198
       #if !MB(MKS_ROBIN_E3P)
213 199
         WRITE(E1_DIR_PIN, HIGH);
214 200
       #endif
215
-      //WRITE(E2_DIR_PIN, HIGH);
216 201
       thermalManager.fan_speed[0] = 0;
217
-      //WRITE(HEATER_2_PIN, LOW); // HE2
218 202
       #if !MB(MKS_ROBIN_E3P)
219 203
         WRITE(HEATER_1_PIN, LOW); // HE1
220 204
       #endif
@@ -229,7 +213,6 @@ void mks_hardware_test() {
229 213
       // nothing here
230 214
     }
231 215
     else {
232
-      //mks_test_beeper();
233 216
     }
234 217
 
235 218
     if (disp_state == PRINT_READY_UI)
@@ -637,7 +620,6 @@ void disp_string(uint16_t x, uint16_t y, const char * string, uint16_t charColor
637 620
   }
638 621
 }
639 622
 
640
-//static lv_obj_t *scr_test;
641 623
 void disp_assets_update() {
642 624
   SPI_TFT.LCD_clear(0x0000);
643 625
   disp_string(100, 140, "Assets Updating...", 0xFFFF, 0x0000);

+ 1
- 15
Marlin/src/lcd/extui/lib/mks_ui/pic_manager.cpp Bestand weergeven

@@ -36,7 +36,6 @@
36 36
 #include "../../../../MarlinCore.h"
37 37
 
38 38
 extern uint16_t DeviceCode;
39
-extern unsigned char bmp_public_buf[17 * 1024];
40 39
 
41 40
 #if ENABLED(SDSUPPORT)
42 41
   extern char *createFilename(char * const buffer, const dir_t &p);
@@ -55,7 +54,6 @@ static const char assets[][LONG_FILENAME_LENGTH] = {
55 54
   "bmp_preHeat.bin",
56 55
   "bmp_extruct.bin",
57 56
   "bmp_mov.bin",
58
-  // "bmp_Zero.bin",
59 57
   "bmp_leveling.bin",
60 58
   "bmp_filamentchange.bin",
61 59
 
@@ -65,13 +63,8 @@ static const char assets[][LONG_FILENAME_LENGTH] = {
65 63
   "bmp_speed255.bin",
66 64
   "bmp_speed127.bin",
67 65
   "bmp_speed0.bin",
68
-
69
-  //preheat screen
70
-  // "bmp_Add.bin",
71
-  // "bmp_Dec.bin",
72 66
   "bmp_speed0.bin",
73
-  // "bmp_Extru2.bin",
74
-  // "bmp_Extru1.bin",
67
+
75 68
   "bmp_bed.bin",
76 69
   "bmp_step1_degree.bin",
77 70
   "bmp_step5_degree.bin",
@@ -113,7 +106,6 @@ static const char assets[][LONG_FILENAME_LENGTH] = {
113 106
   //operation screen
114 107
   "bmp_auto_off.bin",
115 108
   "bmp_speed.bin",
116
-  //"bmp_Mamual.bin", //TODO: didn't find it.. changed to bmp_manual_off.bin
117 109
   "bmp_fan.bin",
118 110
   "bmp_temp.bin",
119 111
   "bmp_extrude_opr.bin",
@@ -125,7 +117,6 @@ static const char assets[][LONG_FILENAME_LENGTH] = {
125 117
   "bmp_step10_percent.bin",
126 118
   "bmp_extruct_sel.bin",
127 119
   "bmp_mov_changespeed.bin",
128
-  // "bmp_extrude_opr.bin", equal to "bmp_Extruct.bin"
129 120
   "bmp_mov_sel.bin",
130 121
   "bmp_speed_extruct.bin",
131 122
 
@@ -182,9 +173,6 @@ static const char assets[][LONG_FILENAME_LENGTH] = {
182 173
 
183 174
   // settings screen
184 175
   "bmp_about.bin",
185
-  //"bmp_Language.bin",
186
-  //"bmp_Fan.bin",
187
-  //"bmp_manual_off.bin",
188 176
 
189 177
   //start screen
190 178
   "bmp_printing.bin",
@@ -373,8 +361,6 @@ uint32_t Pic_Info_Write(uint8_t *P_name, uint32_t P_size) {
373 361
   return Pic_SaveAddr;
374 362
 }
375 363
 
376
-uint8_t public_buf[512];
377
-
378 364
 #if ENABLED(SDSUPPORT)
379 365
 
380 366
   static void dosName2LongName(const char dosName[11], char* longName) {

+ 0
- 2
Marlin/src/lcd/extui/lib/mks_ui/pic_manager.h Bestand weergeven

@@ -95,9 +95,7 @@
95 95
   #define PIC_NAME_ADDR                 0x003000      // Pic information addr
96 96
   #define PIC_SIZE_ADDR                 0x007000      // Pic size information addr
97 97
   #define PIC_COUNTER_ADDR              0x008000      // Pic total number
98
-  //#define PER_PIC_SAVE_ADDR           0x009000      // Storage address of each picture
99 98
   #define PIC_LOGO_ADDR                 0x009000      // Logo addr
100
-  //#define PIC_DATA_ADDR               0x02F000      //
101 99
 
102 100
   // TFT35
103 101
   #define DEFAULT_VIEW_ADDR_TFT35       0xC5800

+ 0
- 3
Marlin/src/lcd/extui/lib/mks_ui/printer_operation.cpp Bestand weergeven

@@ -69,9 +69,6 @@ void printer_state_polling() {
69 69
         uiCfg.print_state = PAUSED;
70 70
         uiCfg.current_e_position_bak = current_position.e;
71 71
 
72
-        // #if ENABLED(POWER_LOSS_RECOVERY)
73
-        //  if (recovery.enabled) recovery.save(true);
74
-        // #endif
75 72
         gCfgItems.pause_reprint = true;
76 73
         update_spi_flash();
77 74
       }

+ 3
- 42
Marlin/src/lcd/extui/lib/mks_ui/tft_Language_en.h Bestand weergeven

@@ -381,28 +381,12 @@
381 381
 #define FILAMENT_EXT1_TEXT_EN         "Extrusion2"
382 382
 #define FILAMENT_HEAT_TEXT_EN         "Preheat"
383 383
 #define FILAMENT_STOP_TEXT_EN         "Stop"
384
-//#define FILAMENT_CHANGE_TEXT_EN       "Filament replace"
385 384
 #define FILAMENT_TIPS2_TEXT_EN        "T:"
386 385
 #define FILAMENT_TIPS3_TEXT_EN        "Loading..."
387 386
 #define FILAMENT_TIPS4_TEXT_EN        "Unloading..."
388 387
 #define FILAMENT_TIPS5_TEXT_EN        "Temp is too low to go,please heat"
389 388
 #define FILAMENT_TIPS6_TEXT_EN        "Completed"
390 389
 
391
-#if 0
392
-  #define FILAMENT_REPLAYS_IDLE_TEXT_EN           "Please click <Load> or <unload> \nto replace filament!"
393
-  #define FILAMENT_CHANGE_TEXT_EN                 "Please click <Load> or <unload>,\nAfter pinter pause."
394
-  #define FILAMENT_DIALOG_LOAD_HEAT_TIPS_EN       "Heating up the nozzle,please wait..."
395
-  #define FILAMENT_DIALOG_UNLOAD_HEAT_TIPS_EN     "Heating up the nozzle,please wait..."
396
-  #define FILAMENT_DIALOG_LOAD_CONFIRM1_TIPS_EN   "Heat completed,please load filament to extruder,and click <confirm> for start loading."
397
-  #define FILAMENT_DIALOG_LOAD_CONFIRM2_TIPS_EN   "Please load filament to extruder,and click <confirm> for start loading."
398
-  #define FILAMENT_DIALOG_UNLOAD_CONFIRM_TIPS_EN  "Heat completed,please click <confirm> for start unloading.!"
399
-  #define FILAMENT_DIALOG_LOADING_TIPS_EN         "Is loading ,please wait!"
400
-  #define FILAMENT_DIALOG_UNLOADING_TIPS_EN       "Is unloading,please wait!"
401
-  #define FILAMENT_DIALOG_LOAD_COMPLETE_TIPS_EN   "Load filament completed,click <confirm> for return!"
402
-  #define FILAMENT_DIALOG_UNLOAD_COMPLETE_TIPS_EN "Unload filament completed,click <confirm> for return!"
403
-#endif
404
-
405
-
406 390
 #define FILAMENT_CHANGE_TEXT_EN                 "Please click <Load> \nor <unload>,After \npinter pause."
407 391
 #define FILAMENT_DIALOG_LOAD_HEAT_TIPS_EN       "Heating up the nozzle,\nplease wait..."
408 392
 #define FILAMENT_DIALOG_UNLOAD_HEAT_TIPS_EN     "Heating up the nozzle,\nplease wait..."
@@ -419,11 +403,7 @@
419 403
 #define PRE_HEAT_BED_TEXT_EN            "Bed"
420 404
 
421 405
 #define FILE_LOADING_EN                 "Loading......"
422
-#if 0
423
-  #define NO_FILE_AND_CHECK_EN          "No files found!Please insert SD card or U disk!"
424
-#else
425
-  #define NO_FILE_AND_CHECK_EN          "  No files found!\n            Check the file system configuration!"
426
-#endif
406
+#define NO_FILE_AND_CHECK_EN          "  No files found!\n            Check the file system configuration!"
427 407
 
428 408
 #define NO_FILE_EN                          "No files found!"
429 409
 
@@ -491,7 +471,6 @@
491 471
 #define DIALOG_RETRY_EN                     "Retry"
492 472
 #define DIALOG_STOP_EN                      "Stop"
493 473
 #define DIALOG_REPRINT_FROM_BREAKPOINT_EN   "Reprint from breakpoint?"
494
-//#define DIALOG_UNBIND_PRINTER_EN          "Unbind the printer?"
495 474
 #define DIALOG_ERROR_TIPS1_EN               "Error:no file,please check it again."
496 475
 #define DIALOG_ERROR_TIPS2_EN               "Error:transaction failed.please check display baudrate \nwhether as the same as mainboard!"
497 476
 #define DIALOG_ERROR_TIPS3_EN               "Error:file name or path is too long!"
@@ -691,34 +670,16 @@
691 670
 
692 671
 //manual ip
693 672
 #define MANUAL_IP_TITLE_EN          "Manual IP"
694
-#define MANUAL_IP_CANCEL_EN          "< Cancel"
673
+#define MANUAL_IP_CANCEL_EN         "< Cancel"
695 674
 #define MANUAL_IP_APPLY_EN          "Join >"
696 675
 #define MANUAL_IP_ADDRESS_EN        "IP Address"
697 676
 #define MANUAL_IP_MASK_EN           "Subnet Mask"
698 677
 #define MANUAL_IP_GATEWAY_EN        "Default Gateway"
699 678
 #define MANUAL_IP_SERVER_EN         "Name Server"
700 679
 #define MANUAL_IP_INIT_DATA_EN      "0.0.0.0"
701
-#define MANUAL_TEXT_POINT_EN         "."
680
+#define MANUAL_TEXT_POINT_EN        "."
702 681
 #define MANUAL_TEXT_ENTER_EN        "enter"
703 682
 
704
-//Wifi name
705
-//#define TEXT_WIFI_MENU_TITLE_EN "WI-FI"
706
-//#define TEXT_WIFI_SAPCE_EN  "space"
707
-//#define TEXT_WIFI_LETTER_EN  "abc"
708
-//#define TEXT_WIFI_DIGITAL_EN  "123"
709
-//#define TEXT_WIFI_SYMBOL_EN  "#+="
710
-//#define TEXT_WIFI_PASSWORD_EN "Password"
711
-
712
-//#define TEXT_WIFI_POINT_BOLD_EN "`"
713
-
714
-//#define TEXT_WIFI_JOINING_EN  "Joining\nNetwork..."
715
-//#define TEXT_WIFI_FAILED_JOIN_EN  "Failed to\nJoin Wi-Fi"
716
-//#define TEXT_WIFI_WIFI_CONECTED_EN "Wi-Fi\nConnected"
717
-
718
-//#define TEXT_BUTTON_DISCONECTED_EN "Disconnect"
719
-//#define TEXT_WIFI_FORGET_EN "Forget Network"
720
-//#define TEXT_DISCONECTED_EN "Wi-Fi Connected"
721
-
722 683
 #define TEXT_FORGET_TIPS_TITLE_EN "Forget Network"
723 684
 #define TEXT_FORGET_NETWORK_TIPS1_EN "Are you sure you want to\nforget this network?"
724 685
 #define TEXT_FORGET_NETWORK_TIPS2_EN "This machine will no longer\njoin this Wi-Fi Network."

+ 4
- 26
Marlin/src/lcd/extui/lib/mks_ui/tft_Language_fr.h Bestand weergeven

@@ -135,26 +135,12 @@
135 135
 #define FILAMENT_EXT1_TEXT_FR         "Extr2"
136 136
 #define FILAMENT_HEAT_TEXT_FR         "Preheat"
137 137
 #define FILAMENT_STOP_TEXT_FR         "Arrêter"
138
-//#define FILAMENT_CHANGE_TEXT_FR     "Filament remplacer"
139 138
 #define FILAMENT_TIPS2_TEXT_FR        "T:"
140 139
 #define FILAMENT_TIPS3_TEXT_FR        "Insérer le filament..."
141 140
 #define FILAMENT_TIPS4_TEXT_FR        "éjecter le filament..."
142 141
 #define FILAMENT_TIPS5_TEXT_FR        "Température trop basse pour démarrer, chauffez svp"
143 142
 #define FILAMENT_TIPS6_TEXT_FR        "Terminé"
144 143
 
145
-#if 0
146
-  #define FILAMENT_REPLAYS_IDLE_TEXT_FR             "Please click <Insérer> or <éjecter> \nto replace filament!"
147
-  #define FILAMENT_CHANGE_TEXT_FR                   "Please click <Insérer> or <éjecter>,\nAfter pinter pause."
148
-  #define FILAMENT_DIALOG_LOAD_HEAT_TIPS_FR         "Heating up the nozzle,please wait..."
149
-  #define FILAMENT_DIALOG_UNLOAD_HEAT_TIPS_FR       "Heating up the nozzle,please wait..."
150
-  #define FILAMENT_DIALOG_LOAD_CONFIRM1_TIPS_FR     "Heat completed,please load filament to extruder,and click <Confirmer> for start loading."
151
-  #define FILAMENT_DIALOG_LOAD_CONFIRM2_TIPS_FR     "Please load filament to extruder,and click <Confirmer> for start loading."
152
-  #define FILAMENT_DIALOG_UNLOAD_CONFIRM_TIPS_FR    "Heat completed,please click <Confirmer> for start unloading.!"
153
-  #define FILAMENT_DIALOG_LOADING_TIPS_FR           "Is loading ,please wait!"
154
-  #define FILAMENT_DIALOG_UNLOADING_TIPS_FR         "Is unloading,please wait!"
155
-  #define FILAMENT_DIALOG_LOAD_COMPLETE_TIPS_FR     "Load filament completed,click <Confirmer> for return!"
156
-  #define FILAMENT_DIALOG_UNLOAD_COMPLETE_TIPS_FR   "Unload filament completed,click <Confirmer> for return!"
157
-#endif
158 144
 #define FILAMENT_CHANGE_TEXT_FR                   "Please click <Load> \nor <unload>,After \npinter pause."
159 145
 #define FILAMENT_DIALOG_LOAD_HEAT_TIPS_FR         "Heating up the nozzle,\nplease wait..."
160 146
 #define FILAMENT_DIALOG_UNLOAD_HEAT_TIPS_FR       "Heating up the nozzle,\nplease wait..."
@@ -171,16 +157,9 @@
171 157
 #define PRE_HEAT_BED_TEXT_FR          "Bed"
172 158
 
173 159
 #define FILE_LOADING_FR               "Chargement......"
174
-#if 0
175
-  #define NO_FILE_AND_CHECK_FR        "Aucun fichier trouvé! Insérez une carte SD ou un disque U!"
176
-#else
177
-  #define NO_FILE_AND_CHECK_FR        "Aucun fichier,vérifiez à nouveau!"
178
-#endif
179
-
160
+#define NO_FILE_AND_CHECK_FR          "Aucun fichier, vérifiez à nouveau!"
180 161
 #define NO_FILE_FR                    "Pas de fichier!"
181 162
 
182
-
183
-
184 163
 #define EXTRUDER_TEMP_TEXT_FR         "Temper"
185 164
 #define EXTRUDER_E_LENGTH1_TEXT_FR    "Extruder1"
186 165
 #define EXTRUDER_E_LENGTH2_TEXT_FR    "Extruder2"
@@ -222,7 +201,7 @@
222 201
 #define TITLE_ADJUST_FR               "Réglage"
223 202
 #define TITLE_WIRELESS_FR             "Sans fil"
224 203
 #define TITLE_FILAMENT_FR             "Remplacer"
225
-#define TITLE_ABOUT_FR                "A propos"
204
+#define TITLE_ABOUT_FR                "À propos"
226 205
 #define TITLE_FAN_FR                  "Ventilateur"
227 206
 #define TITLE_LANGUAGE_FR             "Langue"
228 207
 #define TITLE_PAUSE_FR                "Pause"
@@ -247,7 +226,6 @@
247 226
 
248 227
 #define DIALOG_STOP_FR                "Arrêter"
249 228
 #define DIALOG_REPRINT_FROM_BREAKPOINT_FR "Continuer?"
250
-//#define DIALOG_UNBIND_PRINTER_FR    "Non lié?"
251 229
 #define DIALOG_ERROR_TIPS1_FR         "Erreur:error:Aucun fichier, \nvérifiez à nouveau."
252 230
 #define DIALOG_ERROR_TIPS2_FR         "Erreur:La opération a échoué. \nVerifiez que le baudrate de l'écran et de \nla carte mère soient identique!"
253 231
 #define DIALOG_ERROR_TIPS3_FR         "Erreur: le nom du fichier ou le \nchemin d'accès est trop long."
@@ -261,10 +239,10 @@
261 239
 #define MESSAGE_PAUSING_FR        "Parking..."
262 240
 #define MESSAGE_CHANGING_FR       "Attente filament pour démarrer"
263 241
 #define MESSAGE_UNLOAD_FR         "Attente retrait du filament"
264
-#define MESSAGE_WAITING_FR        "Presser bouton,pour reprendre"
242
+#define MESSAGE_WAITING_FR        "Presser bouton, pour reprendre"
265 243
 #define MESSAGE_INSERT_FR         "Insérer filament et app. bouton pour continuer..."
266 244
 #define MESSAGE_LOAD_FR           "Attente chargement filament"
267
-#define MESSAGE_PURGE_FR          "Attente Purge filament"
245
+#define MESSAGE_PURGE_FR          "Attente purge filament"
268 246
 #define MESSAGE_RESUME_FR         "Attente reprise impression"
269 247
 #define MESSAGE_HEAT_FR           "Presser le bouton pour chauffer..."
270 248
 #define MESSAGE_HEATING_FR        "Buse en chauffe Patienter SVP..."

+ 0
- 20
Marlin/src/lcd/extui/lib/mks_ui/tft_Language_it.h Bestand weergeven

@@ -135,26 +135,12 @@
135 135
 #define FILAMENT_EXT1_TEXT_IT         "Estrude2"
136 136
 #define FILAMENT_HEAT_TEXT_IT         "Preriscaldamento"
137 137
 #define FILAMENT_STOP_TEXT_IT         "Stop"
138
-//#define FILAMENT_CHANGE_TEXT_IT     "Filamento"
139 138
 #define FILAMENT_TIPS2_TEXT_IT        "T:"
140 139
 #define FILAMENT_TIPS3_TEXT_IT        "Inserimento del filamento..."
141 140
 #define FILAMENT_TIPS4_TEXT_IT        "Estrazione del filamento..."
142 141
 #define FILAMENT_TIPS5_TEXT_IT        "Temp is too low to go,please heat"
143 142
 #define FILAMENT_TIPS6_TEXT_IT        "Completato"
144 143
 
145
-#if 0
146
-  #define FILAMENT_REPLAYS_IDLE_TEXT_IT           "Please click <Estru> or <Ritra> \nto replace filament!"
147
-  #define FILAMENT_CHANGE_TEXT_IT                 "Please click <Estru> or <Ritra>,\nAfter pinter pause."
148
-  #define FILAMENT_DIALOG_LOAD_HEAT_TIPS_IT       "Heating up the nozzle,please wait..."
149
-  #define FILAMENT_DIALOG_UNLOAD_HEAT_TIPS_IT     "Heating up the nozzle,please wait..."
150
-  #define FILAMENT_DIALOG_LOAD_CONFIRM1_TIPS_IT   "Heat completed,please load filament to extruder,and click <Conferma> for start loading."
151
-  #define FILAMENT_DIALOG_LOAD_CONFIRM2_TIPS_IT   "Please load filament to extruder,and click <Conferma> for start loading."
152
-  #define FILAMENT_DIALOG_UNLOAD_CONFIRM_TIPS_IT  "Heat completed,please click <Conferma> for start unloading.!"
153
-  #define FILAMENT_DIALOG_LOADING_TIPS_IT         "Is loading ,please wait!"
154
-  #define FILAMENT_DIALOG_UNLOADING_TIPS_IT       "Is unloading,please wait!"
155
-  #define FILAMENT_DIALOG_LOAD_COMPLETE_TIPS_IT   "Load filament completed,click <Conferma> for return!"
156
-  #define FILAMENT_DIALOG_UNLOAD_COMPLETE_TIPS_IT "Unload filament completed,click <Conferma> for return!"
157
-#endif
158 144
 #define FILAMENT_CHANGE_TEXT_IT                 "Please click <Load> \nor <unload>,After \npinter pause."
159 145
 #define FILAMENT_DIALOG_LOAD_HEAT_TIPS_IT       "Heating up the nozzle,please wait..."
160 146
 #define FILAMENT_DIALOG_UNLOAD_HEAT_TIPS_IT     "Heating up the nozzle,please wait..."
@@ -166,16 +152,11 @@
166 152
 #define FILAMENT_DIALOG_LOAD_COMPLETE_TIPS_IT   "Load filament completed,\nclick <confirm> for return!"
167 153
 #define FILAMENT_DIALOG_UNLOAD_COMPLETE_TIPS_IT "Unload filament completed,\nclick <confirm> for return!"
168 154
 
169
-
170 155
 #define PRE_HEAT_EXT_TEXT_IT              "E"
171 156
 #define PRE_HEAT_BED_TEXT_IT              "Piano"
172 157
 
173 158
 #define FILE_LOADING_IT                   "Caricamento......"
174
-#if 0
175
-  #define NO_FILE_AND_CHECK_IT              "Nessun file trovato! Inserisci la scheda SD o il disco U!"
176
-#endif
177 159
 #define NO_FILE_AND_CHECK_IT              "Nessun file,\n          per favore controllare di nuovo!"
178
-
179 160
 #define NO_FILE_IT                        "Nessun file!"
180 161
 
181 162
 #define EXTRUDER_TEMP_TEXT_IT             "Temper"
@@ -241,7 +222,6 @@
241 222
 #define DIALOG_CANCEL_PRINT_IT            "Stop stampa?"
242 223
 #define DIALOG_STOP_IT                    "Stop"
243 224
 #define DIALOG_REPRINT_FROM_BREAKPOINT_IT "Continua a stampare dal \npunto di interruzione?"
244
-//#define DIALOG_UNBIND_PRINTER_IT        "Libero?"
245 225
 #define DIALOG_ERROR_TIPS1_IT             "Errore: nessun file, \nper favore controllare di nuovo."
246 226
 #define DIALOG_ERROR_TIPS2_IT             "Errore: operazione non riuscita, \nsi prega di controllare se il baudrate del \ndisplay è lo stesso scheda madre"
247 227
 #define DIALOG_ERROR_TIPS3_IT             "Errore: il nome del file o il \npercorso è troppo lungo!"

+ 2
- 21
Marlin/src/lcd/extui/lib/mks_ui/tft_Language_ru.h Bestand weergeven

@@ -135,26 +135,12 @@
135 135
 #define FILAMENT_EXT1_TEXT_RU           "экструдер2"
136 136
 #define FILAMENT_HEAT_TEXT_RU           "нагрев"
137 137
 #define FILAMENT_STOP_TEXT_RU           "стоп"
138
-//#define FILAMENT_CHANGE_TEXT_RU           "замена"
139 138
 #define FILAMENT_TIPS2_TEXT_RU          "T:"
140 139
 #define FILAMENT_TIPS3_TEXT_RU          "втянуть..."
141 140
 #define FILAMENT_TIPS4_TEXT_RU          "вядавить..."
142 141
 #define FILAMENT_TIPS5_TEXT_RU          "Низкая температура, \nнеобходим нагрев"
143 142
 #define FILAMENT_TIPS6_TEXT_RU          "завершено"
144 143
 
145
-#if 0
146
-  #define FILAMENT_REPLAYS_IDLE_TEXT_RU                 "Please click <втянуть> or <выдавить> \nto replace filament!"
147
-  #define FILAMENT_CHANGE_TEXT_RU                       "Please click <втянуть> or <выдавить>,\nAfter pinter pause."
148
-  #define FILAMENT_DIALOG_LOAD_HEAT_TIPS_RU             "Heating up the nozzle,please wait..."
149
-  #define FILAMENT_DIALOG_UNLOAD_HEAT_TIPS_RU           "Heating up the nozzle,please wait..."
150
-  #define FILAMENT_DIALOG_LOAD_CONFIRM1_TIPS_RU         "Heat completed,please load filament to extruder,and click <да> for start loading."
151
-  #define FILAMENT_DIALOG_LOAD_CONFIRM2_TIPS_RU         "Please load filament to extruder,and click <да> for start loading."
152
-  #define FILAMENT_DIALOG_UNLOAD_CONFIRM_TIPS_RU        "Heat completed,please click <да> for start unloading.!"
153
-  #define FILAMENT_DIALOG_LOADING_TIPS_RU               "Is loading ,please wait!"
154
-  #define FILAMENT_DIALOG_UNLOADING_TIPS_RU             "Is unloading,please wait!"
155
-  #define FILAMENT_DIALOG_LOAD_COMPLETE_TIPS_RU         "Load filament completed,click <да> for return!"
156
-  #define FILAMENT_DIALOG_UNLOAD_COMPLETE_TIPS_RU       "Unload filament completed,click <да> for return!"
157
-#endif
158 144
 #define FILAMENT_CHANGE_TEXT_RU                       "Please click <Load> \nor <unload>,After \npinter pause."
159 145
 #define FILAMENT_DIALOG_LOAD_HEAT_TIPS_RU             "Heating up the nozzle,\nplease wait..."
160 146
 #define FILAMENT_DIALOG_UNLOAD_HEAT_TIPS_RU           "Heating up the nozzle,\nplease wait..."
@@ -166,14 +152,10 @@
166 152
 #define FILAMENT_DIALOG_LOAD_COMPLETE_TIPS_RU         "Load filament completed,\nclick <confirm> for return!"
167 153
 #define FILAMENT_DIALOG_UNLOAD_COMPLETE_TIPS_RU       "Unload filament completed,\nclick <confirm> for return!"
168 154
 
169
-
170 155
 #define PRE_HEAT_EXT_TEXT_RU                "E"
171 156
 #define PRE_HEAT_BED_TEXT_RU                "стол"
172 157
 
173 158
 #define FILE_LOADING_RU                     "загрузка......"
174
-#if 0
175
-  #define NO_FILE_AND_CHECK_RU                "Файлы не найдены! Вставьте SD-карту или диск U!"
176
-#endif
177 159
 #define NO_FILE_AND_CHECK_RU                "нет файла,попробуйте ещё раз!"
178 160
 
179 161
 #define NO_FILE_RU                          "нет файла!"
@@ -242,7 +224,6 @@
242 224
 #define DIALOG_CANCEL_PRINT_RU              "стоп?"
243 225
 #define DIALOG_STOP_RU                      "стоп"
244 226
 #define DIALOG_REPRINT_FROM_BREAKPOINT_RU   "продолжить?"
245
-//#define DIALOG_UNBIND_PRINTER_RU          "разрыв?"
246 227
 #define DIALOG_ERROR_TIPS1_RU               "ошибка:нет файла, попробуйте ещё раз."
247 228
 #define DIALOG_ERROR_TIPS2_RU               "ошибка:сбой передачи. установите скорость \nпередачи данных как на плате управления!"
248 229
 #define DIALOG_ERROR_TIPS3_RU               "ошибка: имя файла слишком длинное!"
@@ -268,9 +249,9 @@
268 249
 #define MESSAGE_PURGE_MORE_RU         "чистка"
269 250
 #define MESSAGE_CONTINUE_PRINT_RU     "Распечатать"
270 251
 #define EEPROM_SETTINGS_TITLE_RU      "Настройки EEPROM"
271
-#define EEPROM_SETTINGS_STORE_RU      "Сохранение настроек в EEPROM"
252
+#define EEPROM_SETTINGS_STORE_RU      "Cохранение настроек в EEPROM"
272 253
 #define EEPROM_SETTINGS_READ_RU       "Чтение настроек из EEPROM"
273
-#define EEPROM_SETTINGS_REVERT_RU     "Восстановить заводские настройки по умолчанию"
254
+#define EEPROM_SETTINGS_REVERT_RU     "Bосстановить заводские настройки по умолчанию"
274 255
 
275 256
 #define EEPROM_STORE_TIPS_RU          "Сохранить настройки в EEPROM?"
276 257
 #define EEPROM_READ_TIPS_RU           "Читать настройки из EEPROM?"

+ 54
- 60
Marlin/src/lcd/extui/lib/mks_ui/tft_Language_s_cn.h Bestand weergeven

@@ -177,42 +177,42 @@
177 177
 #define E0_STEPS_CN                   "E0轴脉冲"
178 178
 #define E1_STEPS_CN                   "E1轴脉冲"
179 179
 
180
-#define TMC_CURRENT_CONF_TITLE_CN   "机器参数>TMC电流设置"
181
-#define X_TMC_CURRENT_CN            "X轴电流(毫安)"
182
-#define Y_TMC_CURRENT_CN            "Y轴电流(毫安)"
183
-#define Z_TMC_CURRENT_CN            "Z轴电流(毫安)"
184
-#define E0_TMC_CURRENT_CN           "E0轴电流(毫安)"
185
-#define E1_TMC_CURRENT_CN           "E1轴电流(毫安)"
186
-
187
-#define TMC_MODE_CONF_TITLE_CN  "机器参数>TMC模式设置"
188
-#define X_TMC_MODE_CN           "X轴是否使能静音模式"
189
-#define Y_TMC_MODE_CN           "Y轴是否使能静音模式"
190
-#define Z_TMC_MODE_CN           "Z轴是否使能静音模式"
191
-#define E0_TMC_MODE_CN          "E0轴是否使能静音模式"
192
-#define E1_TMC_MODE_CN          "E1轴是否使能静音模式"
193
-
194
-#define MOTORDIR_CONF_TITLE_CN          "机器参数>电机方向"
195
-#define X_MOTORDIR_CN                   "X轴电机方向"
196
-#define Y_MOTORDIR_CN                   "Y轴电机方向"
197
-#define Z_MOTORDIR_CN                   "Z轴电机方向"
198
-#define E0_MOTORDIR_CN                  "E0轴电机方向"
199
-#define E1_MOTORDIR_CN                  "E1轴电机方向"
200
-#define INVERT_P_CN                     "正向"
201
-#define INVERT_N_CN                     "反向"
202
-
203
-#define HOMEFEEDRATE_CONF_TITLE_CN      "机器参数>归零速度"
204
-#define X_HOMESPEED_CN                  "XY轴归零速度"
205
-#define Y_HOMESPEED_CN                  "Y轴归零速度"
206
-#define Z_HOMESPEED_CN                  "Z轴归零速度"
207
-
208
-#define ADVANCED_CONF_TITLE_CN          "机器参数>高级设置"
209
-#define PWROFF_DECTION_CN               "断电检测模块"
210
-#define PWROFF_AFTER_PRINT_CN           "启动打完关机功能"
211
-#define HAVE_UPS_CN                     "机器配备UPS电源"
212
-#define Z2_AND_Z2ENDSTOP_CONF_CN        "双Z轴双限位功能设置"
213
-#define ENABLE_PINS_CONF_CN             "电机使能脚电平设置"
214
-#define WIFI_SETTINGS_CN                "Wi-Fi参数设置"
215
-#define ENCODER_SETTINGS_CN             "旋钮设置"
180
+#define TMC_CURRENT_CONF_TITLE_CN     "机器参数>TMC电流设置"
181
+#define X_TMC_CURRENT_CN              "X轴电流(毫安)"
182
+#define Y_TMC_CURRENT_CN              "Y轴电流(毫安)"
183
+#define Z_TMC_CURRENT_CN              "Z轴电流(毫安)"
184
+#define E0_TMC_CURRENT_CN             "E0轴电流(毫安)"
185
+#define E1_TMC_CURRENT_CN             "E1轴电流(毫安)"
186
+
187
+#define TMC_MODE_CONF_TITLE_CN        "机器参数>TMC模式设置"
188
+#define X_TMC_MODE_CN                 "X轴是否使能静音模式"
189
+#define Y_TMC_MODE_CN                 "Y轴是否使能静音模式"
190
+#define Z_TMC_MODE_CN                 "Z轴是否使能静音模式"
191
+#define E0_TMC_MODE_CN                "E0轴是否使能静音模式"
192
+#define E1_TMC_MODE_CN                "E1轴是否使能静音模式"
193
+
194
+#define MOTORDIR_CONF_TITLE_CN        "机器参数>电机方向"
195
+#define X_MOTORDIR_CN                 "X轴电机方向"
196
+#define Y_MOTORDIR_CN                 "Y轴电机方向"
197
+#define Z_MOTORDIR_CN                 "Z轴电机方向"
198
+#define E0_MOTORDIR_CN                "E0轴电机方向"
199
+#define E1_MOTORDIR_CN                "E1轴电机方向"
200
+#define INVERT_P_CN                   "正向"
201
+#define INVERT_N_CN                   "反向"
202
+
203
+#define HOMEFEEDRATE_CONF_TITLE_CN    "机器参数>归零速度"
204
+#define X_HOMESPEED_CN                "XY轴归零速度"
205
+#define Y_HOMESPEED_CN                "Y轴归零速度"
206
+#define Z_HOMESPEED_CN                "Z轴归零速度"
207
+
208
+#define ADVANCED_CONF_TITLE_CN        "机器参数>高级设置"
209
+#define PWROFF_DECTION_CN             "断电检测模块"
210
+#define PWROFF_AFTER_PRINT_CN         "启动打完关机功能"
211
+#define HAVE_UPS_CN                   "机器配备UPS电源"
212
+#define Z2_AND_Z2ENDSTOP_CONF_CN      "双Z轴双限位功能设置"
213
+#define ENABLE_PINS_CONF_CN           "电机使能脚电平设置"
214
+#define WIFI_SETTINGS_CN              "Wi-Fi参数设置"
215
+#define ENCODER_SETTINGS_CN           "旋钮设置"
216 216
 
217 217
 #define Z2_AND_Z2ENDSTOP_CONF_TITLE_CN  "双z双限位设置"
218 218
 #define Z2_ENABLE_CN                    "启用Z2轴"
@@ -225,23 +225,23 @@
225 225
 #define Z_ENABLE_PINS_INVERT_CN         "Z轴电机使能电平"
226 226
 #define E_ENABLE_PINS_INVERT_CN         "E轴电机使能电平"
227 227
 
228
-#define PAUSE_POSITION_CN         "打印暂停位置设置"
229
-#define PAUSE_POSITION_X_CN       "X轴暂停位置(绝对位置,-1无效)"
230
-#define PAUSE_POSITION_Y_CN       "Y轴暂停位置(绝对位置,-1无效)"
231
-#define PAUSE_POSITION_Z_CN       "Z轴暂停位置(相对位置,-1无效)"
232
-#define WIFI_SETTINGS_TITLE_CN    "机器参数>Wi-Fi设置"
233
-#define WIFI_SETTINGS_MODE_CN     "Wi-Fi 模式"
234
-#define WIFI_SETTINGS_NAME_CN     "Wi-Fi 名称: "
235
-#define WIFI_SETTINGS_PASSWORD_CN "Wi-Fi 密码: "
236
-#define WIFI_SETTINGS_CLOUD_CN    "是否使用云服务?"
237
-#define WIFI_SETTINGS_CONFIG_CN   "配置"
238
-#define WIFI_SETTINGS_EDIT_CN     "编辑"
239
-#define WIFI_CONFIG_TIPS_CN       "进行Wi-Fi配置?"
240
-
241
-#define OFFSET_TITLE_CN  "机器参数>偏移设置"
242
-#define OFFSET_X_CN      "X轴与调平开关偏移"
243
-#define OFFSET_Y_CN      "Y轴与调平开关偏移"
244
-#define OFFSET_Z_CN      "Z轴与调平开关偏移"
228
+#define PAUSE_POSITION_CN               "打印暂停位置设置"
229
+#define PAUSE_POSITION_X_CN             "X轴暂停位置(绝对位置,-1无效)"
230
+#define PAUSE_POSITION_Y_CN             "Y轴暂停位置(绝对位置,-1无效)"
231
+#define PAUSE_POSITION_Z_CN             "Z轴暂停位置(相对位置,-1无效)"
232
+#define WIFI_SETTINGS_TITLE_CN          "机器参数>Wi-Fi设置"
233
+#define WIFI_SETTINGS_MODE_CN           "Wi-Fi 模式"
234
+#define WIFI_SETTINGS_NAME_CN           "Wi-Fi 名称: "
235
+#define WIFI_SETTINGS_PASSWORD_CN       "Wi-Fi 密码: "
236
+#define WIFI_SETTINGS_CLOUD_CN          "是否使用云服务?"
237
+#define WIFI_SETTINGS_CONFIG_CN         "配置"
238
+#define WIFI_SETTINGS_EDIT_CN           "编辑"
239
+#define WIFI_CONFIG_TIPS_CN             "进行Wi-Fi配置?"
240
+
241
+#define OFFSET_TITLE_CN                 "机器参数>偏移设置"
242
+#define OFFSET_X_CN                     "X轴与调平开关偏移"
243
+#define OFFSET_Y_CN                     "Y轴与调平开关偏移"
244
+#define OFFSET_Z_CN                     "Z轴与调平开关偏移"
245 245
 
246 246
 #define HOMING_SENSITIVITY_CONF_TITLE_CN      "机器参数>灵敏度调节"
247 247
 #define X_SENSITIVITY_CN                      "X轴灵敏度"
@@ -364,12 +364,7 @@
364 364
 #define FILAMENT_EXT1_TEXT_CN     "喷头2"
365 365
 #define FILAMENT_HEAT_TEXT_CN     "预热"
366 366
 #define FILAMENT_STOP_TEXT_CN     "停止"
367
-#if 0
368
-  #define FILAMENT_REPLAYS_IDLE_TEXT_CN "请按<进料>或<退料>进行换料!"
369
-  #define FILAMENT_CHANGE_TEXT_CN   "待打印机暂停后,请按<进料>或<退料>进行换料!"
370
-#else
371
-  #define FILAMENT_CHANGE_TEXT_CN   "待打印机暂停后,\n请按<进料>或<退料>"
372
-#endif
367
+#define FILAMENT_CHANGE_TEXT_CN   "待打印机暂停后,\n请按<进料>或<退料>"
373 368
 
374 369
 #define FILAMENT_DIALOG_LOAD_HEAT_TIPS_CN       "准备进料,正在加热,请稍等!"
375 370
 #define FILAMENT_DIALOG_UNLOAD_HEAT_TIPS_CN     "准备退料,正在加热,请稍等!"
@@ -456,7 +451,6 @@
456 451
 #define DIALOG_RETRY_CN             "重试"
457 452
 #define DIALOG_STOP_CN              "停止"
458 453
 #define DIALOG_REPRINT_FROM_BREAKPOINT_CN   "从断点续打?"
459
-//#define DIALOG_UNBIND_PRINTER_CN  "解除绑定 ?"
460 454
 #define DIALOG_ERROR_TIPS1_CN       "错误:找不到文件,请插入sd卡/u盘!"
461 455
 #define DIALOG_ERROR_TIPS2_CN       "错误:通信失败,请检查波特率或主板硬件!"
462 456
 #define DIALOG_ERROR_TIPS3_CN       "错误:文件名或文件路径太长 !"

+ 14
- 35
Marlin/src/lcd/extui/lib/mks_ui/tft_Language_sp.h Bestand weergeven

@@ -23,13 +23,13 @@
23 23
 
24 24
 //****************西班牙语***************************
25 25
 #define TOOL_TEXT_SP            "Ajustes"
26
-#define PREHEAT_TEXT_SP         "Precalentar"//"precalent\nar"
26
+#define PREHEAT_TEXT_SP         "Precalentar"
27 27
 #define MOVE_TEXT_SP            "Mover"
28 28
 #define HOME_TEXT_SP            "Origen"
29 29
 #define PRINT_TEXT_SP           "Imprimir"
30 30
 #define EXTRUDE_TEXT_SP         "Extrusor"
31
-#define LEVELING_TEXT_SP        "Leveling"//"nivelac\nión"
32
-#define AUTO_LEVELING_TEXT_SP   "Autolevel"//"auto\nnivelación"
31
+#define LEVELING_TEXT_SP        "Leveling"
32
+#define AUTO_LEVELING_TEXT_SP   "Autolevel"
33 33
 #define SET_TEXT_SP             "Config"
34 34
 #define MORE_TEXT_SP            "Más"
35 35
 
@@ -135,50 +135,30 @@
135 135
 #define FILAMENT_EXT1_TEXT_SP       "Extrusor2"
136 136
 #define FILAMENT_HEAT_TEXT_SP       "Precalentar"
137 137
 #define FILAMENT_STOP_TEXT_SP       "Parar"
138
-//#define FILAMENT_CHANGE_TEXT_SP   "Filamento"
139 138
 #define FILAMENT_TIPS2_TEXT_SP      "T:"
140 139
 #define FILAMENT_TIPS3_TEXT_SP      "Dentro..."
141 140
 #define FILAMENT_TIPS4_TEXT_SP      "Fuera..."
142 141
 #define FILAMENT_TIPS5_TEXT_SP      "Temperatura demasiado baja, por favor calentar"
143 142
 #define FILAMENT_TIPS6_TEXT_SP      "Completado"
144
-#if 0
145
-  #define FILAMENT_REPLAYS_IDLE_TEXT_SP           "Please click <Dentro> or <Fuera> \nto replace filament!"
146
-  #define FILAMENT_CHANGE_TEXT_SP                 "Please click <Dentro> or <Fuera>,\nAfter pinter pause."
147
-  #define FILAMENT_DIALOG_LOAD_HEAT_TIPS_SP       "Calentando el extrusor, por favor espere..."
148
-  #define FILAMENT_DIALOG_UNLOAD_HEAT_TIPS_SP     "Calentando el extrusor, por favor espere..."
149
-  #define FILAMENT_DIALOG_LOAD_CONFIRM1_TIPS_SP   "Temperatura alcanzada.Inserte el filamento y luego presione\"Confirmar\"para comenzar la carga."
150
-  #define FILAMENT_DIALOG_LOAD_CONFIRM2_TIPS_SP   "Inserte el filamento y luego presione\"Confirmar\"para comenzar la carga."
151
-  #define FILAMENT_DIALOG_UNLOAD_CONFIRM_TIPS_SP  "Temperatura alcanzada.Presione\"Confirmar\"para retirar el filamento."
152
-  #define FILAMENT_DIALOG_LOADING_TIPS_SP         "Cargando filamento,por favor espere."
153
-  #define FILAMENT_DIALOG_UNLOADING_TIPS_SP       "Retirando filamento,por favor espere."
154
-  #define FILAMENT_DIALOG_LOAD_COMPLETE_TIPS_SP   "Filamento cargado,presione\"Confirmar\"."
155
-  #define FILAMENT_DIALOG_UNLOAD_COMPLETE_TIPS_SP "Filamento retirado,presione\"Confirmar\"."
156
-#else
157
-  #define FILAMENT_CHANGE_TEXT_SP                 "Please click <Load> \nor <unload>,After \npinter pause."
158
-  #define FILAMENT_DIALOG_LOAD_HEAT_TIPS_SP       "Calentando el extrusor,\npor favor espere..."
159
-  #define FILAMENT_DIALOG_UNLOAD_HEAT_TIPS_SP     "Calentando el extrusor,\npor favor espere..."
160
-  #define FILAMENT_DIALOG_LOAD_CONFIRM1_TIPS_SP   "Temperatura alcanzada.Inserte el \nfilamento y luego presione\"Confirmar\"\npara comenzar la carga."
161
-  #define FILAMENT_DIALOG_LOAD_CONFIRM2_TIPS_SP   "Inserte el filamento y \nluego presione\"Confirmar\"para \ncomenzar la carga."
162
-  #define FILAMENT_DIALOG_UNLOAD_CONFIRM_TIPS_SP  "Temperatura alcanzada.\nPresione\"Confirmar\"para retirar \nel filamento."
163
-  #define FILAMENT_DIALOG_LOADING_TIPS_SP         "Cargando filamento,\npor favor espere."
164
-  #define FILAMENT_DIALOG_UNLOADING_TIPS_SP       "Retirando filamento,\npor favor espere."
165
-  #define FILAMENT_DIALOG_LOAD_COMPLETE_TIPS_SP   "Filamento cargado,\npresione\"Confirmar\"."
166
-  #define FILAMENT_DIALOG_UNLOAD_COMPLETE_TIPS_SP "Filamento retirado,\npresione\"Confirmar\"."
167
-#endif
143
+
144
+#define FILAMENT_CHANGE_TEXT_SP                 "Please click <Load> \nor <unload>,After \npinter pause."
145
+#define FILAMENT_DIALOG_LOAD_HEAT_TIPS_SP       "Calentando el extrusor,\npor favor espere..."
146
+#define FILAMENT_DIALOG_UNLOAD_HEAT_TIPS_SP     "Calentando el extrusor,\npor favor espere..."
147
+#define FILAMENT_DIALOG_LOAD_CONFIRM1_TIPS_SP   "Temperatura alcanzada.Inserte el \nfilamento y luego presione\"Confirmar\"\npara comenzar la carga."
148
+#define FILAMENT_DIALOG_LOAD_CONFIRM2_TIPS_SP   "Inserte el filamento y \nluego presione\"Confirmar\"para \ncomenzar la carga."
149
+#define FILAMENT_DIALOG_UNLOAD_CONFIRM_TIPS_SP  "Temperatura alcanzada.\nPresione\"Confirmar\"para retirar \nel filamento."
150
+#define FILAMENT_DIALOG_LOADING_TIPS_SP         "Cargando filamento,\npor favor espere."
151
+#define FILAMENT_DIALOG_UNLOADING_TIPS_SP       "Retirando filamento,\npor favor espere."
152
+#define FILAMENT_DIALOG_LOAD_COMPLETE_TIPS_SP   "Filamento cargado,\npresione\"Confirmar\"."
153
+#define FILAMENT_DIALOG_UNLOAD_COMPLETE_TIPS_SP "Filamento retirado,\npresione\"Confirmar\"."
168 154
 
169 155
 #define PRE_HEAT_EXT_TEXT_SP        "Extrusor"
170 156
 #define PRE_HEAT_BED_TEXT_SP        "cama"
171 157
 
172 158
 #define FILE_LOADING_SP             "Cargando......"
173
-#if 0
174
-  #define NO_FILE_AND_CHECK_SP        "No se encontraron archivos! Por favor, inserte la tarjeta SD o el disco U!"
175
-#endif
176 159
 #define NO_FILE_AND_CHECK_SP        "Archivo no encontrado,\n         por favor insertar SD o disco USB!"
177
-
178 160
 #define NO_FILE_SP                  "Sin archivo!"
179 161
 
180
-
181
-
182 162
 #define EXTRUDER_TEMP_TEXT_SP       "Temper"
183 163
 #define EXTRUDER_E_LENGTH1_TEXT_SP  "Extrusor1"
184 164
 #define EXTRUDER_E_LENGTH2_TEXT_SP  "Extrusor2"
@@ -245,7 +225,6 @@
245 225
 #define DIALOG_RETRY_SP             "Reintentar"
246 226
 #define DIALOG_STOP_SP              "Stop"
247 227
 #define DIALOG_REPRINT_FROM_BREAKPOINT_SP "Reprint from breakpoint?"
248
-//#define DIALOG_UNBIND_PRINTER_SP    "Unbind the printer?"
249 228
 #define DIALOG_ERROR_TIPS1_SP         "Error:archivo no encontrado, \npor favor insertar SD o disco USB."
250 229
 #define DIALOG_ERROR_TIPS2_SP         "error:transacción fallida, \nconfigurar  baudrate del \ndisplay para la placa base!"
251 230
 #define DIALOG_ERROR_TIPS3_SP         "Error : nombre de archivo o \nruta demasiado largo!"

+ 4
- 12
Marlin/src/lcd/extui/lib/mks_ui/tft_Language_t_cn.h Bestand weergeven

@@ -254,7 +254,7 @@
254 254
 
255 255
 #define TOOL_TEXT_T_CN                  "工具"
256 256
 #define PREHEAT_TEXT_T_CN               "預熱"
257
-#define  MOVE_TEXT_T_CN                 "移動"
257
+#define MOVE_TEXT_T_CN                  "移動"
258 258
 #define HOME_TEXT_T_CN                  "回零"
259 259
 #define PRINT_TEXT_T_CN                 "打印"
260 260
 #define EXTRUDE_TEXT_T_CN               "擠出"
@@ -364,19 +364,12 @@
364 364
 #define FILAMENT_EXT1_TEXT_T_CN         "噴頭2"
365 365
 #define FILAMENT_HEAT_TEXT_T_CN         "預熱"
366 366
 #define FILAMENT_STOP_TEXT_T_CN         "停止"
367
-//#define FILAMENT_CHANGE_TEXT_T_CN     "準備換料"
368 367
 #define FILAMENT_TIPS2_TEXT_T_CN        "T:"
369 368
 #define FILAMENT_TIPS3_TEXT_T_CN        "正在進料"
370 369
 #define FILAMENT_TIPS4_TEXT_T_CN        "正在退料"
371 370
 #define FILAMENT_TIPS5_TEXT_T_CN        "溫度太低,請先預熱"
372 371
 #define FILAMENT_TIPS6_TEXT_T_CN        "換料完成"
373
-
374
-#if 0
375
-  #define FILAMENT_REPLAYS_IDLE_TEXT_T_CN "請按<進料>或<退料>進行換料!"
376
-  #define FILAMENT_CHANGE_TEXT_T_CN       "待打印機暫停后,請按<進料>或<退料>進行換料!"
377
-#endif
378
-
379
-  #define FILAMENT_CHANGE_TEXT_T_CN       "待打印機暫停后,\n請按<進料>或<退料>"
372
+#define FILAMENT_CHANGE_TEXT_T_CN       "待打印機暫停后,\n請按<進料>或<退料>"
380 373
 
381 374
 #define FILAMENT_DIALOG_LOAD_HEAT_TIPS_T_CN       "準備進料,正在加熱,請稍等"
382 375
 #define FILAMENT_DIALOG_UNLOAD_HEAT_TIPS_T_CN     "準備退料,正在加熱,請稍等"
@@ -434,8 +427,8 @@
434 427
 #define TITLE_PRINTING_T_CN           "正在打印"
435 428
 #define TITLE_OPERATION_T_CN          "操作"
436 429
 #define TITLE_ADJUST_T_CN             "調整"
437
-#define  TITLE_WIRELESS_T_CN          "無線網絡"
438
-#define  TITLE_FILAMENT_T_CN          "換料"
430
+#define TITLE_WIRELESS_T_CN           "無線網絡"
431
+#define TITLE_FILAMENT_T_CN           "換料"
439 432
 #define TITLE_ABOUT_T_CN              "關於"
440 433
 #define TITLE_FAN_T_CN                "風扇"
441 434
 #define TITLE_LANGUAGE_T_CN           "語言"
@@ -459,7 +452,6 @@
459 452
 #define DIALOG_RETRY_T_CN             "重試"
460 453
 #define DIALOG_STOP_T_CN              "停止"
461 454
 #define DIALOG_REPRINT_FROM_BREAKPOINT_T_CN "從斷點續打?"
462
-//#define DIALOG_UNBIND_PRINTER_T_CN    "解除綁定?"
463 455
 #define DIALOG_ERROR_TIPS1_T_CN       "錯誤:找不到文件,請插入sd卡/u盤!"
464 456
 #define DIALOG_ERROR_TIPS2_T_CN       "錯誤:通信失敗,請檢查波特率或主板硬件!"
465 457
 #define DIALOG_ERROR_TIPS3_T_CN       "錯誤:文件名或文件路徑太長!"

+ 4
- 23
Marlin/src/lcd/extui/lib/mks_ui/tft_lvgl_configuration.cpp Bestand weergeven

@@ -77,9 +77,10 @@ lv_group_t*  g;
77 77
 uint16_t DeviceCode = 0x9488;
78 78
 extern uint8_t sel_id;
79 79
 
80
-extern bool flash_preview_begin, default_preview_flg, gcode_preview_over;
80
+uint8_t bmp_public_buf[14 * 1024];
81
+uint8_t public_buf[513];
81 82
 
82
-uint8_t bmp_public_buf[17 * 1024];
83
+extern bool flash_preview_begin, default_preview_flg, gcode_preview_over;
83 84
 
84 85
 void SysTick_Callback() {
85 86
   lv_tick_inc(1);
@@ -109,13 +110,9 @@ void SysTick_Callback() {
109 110
   }
110 111
 }
111 112
 
112
-extern uint8_t bmp_public_buf[17 * 1024];
113
-
114 113
 void tft_lvgl_init() {
115 114
 
116
-  //uint16_t test_id=0;
117 115
   W25QXX.init(SPI_QUARTER_SPEED);
118
-  //test_id=W25QXX.W25QXX_ReadID();
119 116
 
120 117
   gCfgItems_init();
121 118
   ui_cfg_init();
@@ -129,7 +126,6 @@ void tft_lvgl_init() {
129 126
 
130 127
   watchdog_refresh();     // LVGL init takes time
131 128
 
132
-  //spi_flash_read_test();
133 129
   #if ENABLED(SDSUPPORT)
134 130
     UpdateAssets();
135 131
     watchdog_refresh();   // LVGL init takes time
@@ -141,7 +137,7 @@ void tft_lvgl_init() {
141 137
 
142 138
   lv_init();
143 139
 
144
-  lv_disp_buf_init(&disp_buf, bmp_public_buf, nullptr, LV_HOR_RES_MAX * 18); /*Initialize the display buffer*/
140
+  lv_disp_buf_init(&disp_buf, bmp_public_buf, nullptr, LV_HOR_RES_MAX * 14); /*Initialize the display buffer*/
145 141
 
146 142
   lv_disp_drv_t disp_drv;     /*Descriptor of a display driver*/
147 143
   lv_disp_drv_init(&disp_drv);    /*Basic initialization*/
@@ -273,11 +269,6 @@ bool my_touchpad_read(lv_indev_drv_t * indev_driver, lv_indev_data_t * data) {
273 269
 
274 270
   tmpTime = millis();
275 271
   diffTime = getTickDiff(tmpTime, touch_time1);
276
-  /*Save the state and save the pressed coordinate*/
277
-  //data->state = TOUCH_PressValid(last_x, last_y) ? LV_INDEV_STATE_PR : LV_INDEV_STATE_REL;
278
-  //if (data->state == LV_INDEV_STATE_PR)  ADS7843_Rd_Addata((u16 *)&last_x, (u16 *)&last_y);
279
-  //touchpad_get_xy(&last_x, &last_y);
280
-  /*Save the pressed coordinates and the state*/
281 272
   if (diffTime > 20) {
282 273
     if (get_point(&last_x, &last_y)) {
283 274
 
@@ -285,7 +276,6 @@ bool my_touchpad_read(lv_indev_drv_t * indev_driver, lv_indev_data_t * data) {
285 276
       data->state = LV_INDEV_STATE_PR;
286 277
 
287 278
       // Set the coordinates (if released use the last-pressed coordinates)
288
-
289 279
       data->point.x = last_x;
290 280
       data->point.y = last_y;
291 281
 
@@ -369,11 +359,9 @@ lv_fs_res_t spi_flash_tell_cb(lv_fs_drv_t * drv, void * file_p, uint32_t * pos_p
369 359
 }
370 360
 
371 361
 //sd
372
-extern uint8_t public_buf[512];
373 362
 char *cur_namefff;
374 363
 uint32_t sd_read_base_addr = 0, sd_read_addr_offset = 0, small_image_size = 409;
375 364
 lv_fs_res_t sd_open_cb (lv_fs_drv_t * drv, void * file_p, const char * path, lv_fs_mode_t mode) {
376
-  //cur_namefff = strrchr(path, '/');
377 365
   char name_buf[100];
378 366
   *name_buf = '/';
379 367
   strcpy(name_buf + 1, path);
@@ -405,7 +393,6 @@ lv_fs_res_t sd_read_cb (lv_fs_drv_t * drv, void * file_p, void * buf, uint32_t b
405 393
   else if (btr == 4) {
406 394
     uint8_t header_pic[4] = { 0x04, 0x90, 0x81, 0x0C };
407 395
     memcpy(buf, header_pic, 4);
408
-    //pic_read_addr_offset += 4;
409 396
     *br = 4;
410 397
   }
411 398
   return LV_FS_RES_OK;
@@ -453,9 +440,6 @@ void lv_encoder_pin_init() {
453 440
 }
454 441
 
455 442
 #if 1 // HAS_ENCODER_ACTION
456
-
457
-  //static const int8_t encoderDirection = 1;
458
-  //static int16_t enc_Direction;
459 443
   void lv_update_encoder() {
460 444
     static uint32_t encoder_time1;
461 445
     uint32_t tmpTime, diffTime = 0;
@@ -487,9 +471,6 @@ void lv_encoder_pin_init() {
487 471
         #define encrot1 1
488 472
         #define encrot2 2
489 473
 
490
-        // Manage encoder rotation
491
-        //#define ENCODER_SPIN(_E1, _E2) switch (lastEncoderBits) { case _E1: enc_Direction += encoderDirection; break; case _E2: enc_Direction -= encoderDirection; }
492
-
493 474
         uint8_t enc = 0;
494 475
         if (buttons & EN_A) enc |= B01;
495 476
         if (buttons & EN_B) enc |= B10;

+ 3
- 0
Marlin/src/lcd/extui/lib/mks_ui/tft_lvgl_configuration.h Bestand weergeven

@@ -35,6 +35,9 @@
35 35
 //#define TFT_ROTATION TFT_ROTATE_180
36 36
 #define MKS_WIFI_MODULE 0
37 37
 
38
+extern uint8_t bmp_public_buf[14 * 1024];
39
+extern uint8_t public_buf[513];
40
+
38 41
 extern void tft_lvgl_init();
39 42
 extern void my_disp_flush(lv_disp_drv_t * disp, const lv_area_t * area, lv_color_t * color_p);
40 43
 extern bool my_touchpad_read(lv_indev_drv_t * indev_driver, lv_indev_data_t * data);

+ 28
- 83
Marlin/src/lcd/extui/lib/mks_ui/tft_multi_language.cpp Bestand weergeven

@@ -149,10 +149,6 @@ void machine_setting_disp() {
149 149
     machine_menu.CalibrationRadius         = CALIBRATION_RADIUS_CN;
150 150
 
151 151
     machine_menu.LevelingSubXYZConfTitle = XYZ_LEVEL_CONF_TITLE_CN;
152
-    // machine_menu.ProbeMaxLeft=PROBE_REACH_MAX_LEFT_CN;
153
-    // machine_menu.ProbeMaxRigh=PROBE_REACH_MAX_RIGHT_CN;
154
-    // machine_menu.ProbeMaxfront=PROBE_REACH_MAX_FRONT_CN;
155
-    // machine_menu.ProbeMaxback=PROBE_REACH_MAX_BACK_CN;
156 152
 
157 153
     machine_menu.TemperatureConfTitle = TEMPERATURE_CONF_TITLE_CN;
158 154
     machine_menu.NozzleConf           = NOZZLE_CONF_CN;
@@ -167,7 +163,6 @@ void machine_setting_disp() {
167 163
     machine_menu.NozzleMaxTemperature = NOZZLE_MAX_TEMPERATURE_CN;
168 164
     machine_menu.Extrude_Min_Temper   = EXTRUD_MIN_TEMPER_CN;
169 165
 
170
-    // machine_menu.HotbedEnable=HOTBED_ENABLE_CN;
171 166
     machine_menu.HotbedConfTitle      = HOTBED_CONF_TITLE_CN;
172 167
     machine_menu.HotbedAjustType      = HOTBED_ADJUST_CN;
173 168
     machine_menu.HotbedMinTemperature = HOTBED_MIN_TEMPERATURE_CN;
@@ -242,7 +237,6 @@ void machine_setting_disp() {
242 237
 
243 238
     machine_menu.HomeFeedRateConfTitle = HOMEFEEDRATE_CONF_TITLE_CN;
244 239
     machine_menu.XY_HomeFeedRate       = X_HOMESPEED_CN;
245
-    // machine_menu.Y_HomeFeedRate=Y_HOMESPEED_CN;
246 240
     machine_menu.Z_HomeFeedRate = Z_HOMESPEED_CN;
247 241
 
248 242
     machine_menu.AdvancedConfTitle = ADVANCED_CONF_TITLE_CN;
@@ -382,10 +376,6 @@ void machine_setting_disp() {
382 376
     machine_menu.CalibrationRadius         = CALIBRATION_RADIUS_T_CN;
383 377
 
384 378
     machine_menu.LevelingSubXYZConfTitle = XYZ_LEVEL_CONF_TITLE_T_CN;
385
-    // machine_menu.ProbeMaxLeft=PROBE_REACH_MAX_LEFT_T_CN;
386
-    // machine_menu.ProbeMaxRigh=PROBE_REACH_MAX_RIGHT_T_CN;
387
-    // machine_menu.ProbeMaxfront=PROBE_REACH_MAX_FRONT_T_CN;
388
-    // machine_menu.ProbeMaxback=PROBE_REACH_MAX_BACK_T_CN;
389 379
 
390 380
     machine_menu.TemperatureConfTitle = TEMPERATURE_CONF_TITLE_T_CN;
391 381
     machine_menu.NozzleConf           = NOZZLE_CONF_T_CN;
@@ -400,7 +390,6 @@ void machine_setting_disp() {
400 390
     machine_menu.NozzleMaxTemperature = NOZZLE_MAX_TEMPERATURE_T_CN;
401 391
     machine_menu.Extrude_Min_Temper   = EXTRUD_MIN_TEMPER_T_CN;
402 392
 
403
-    // machine_menu.HotbedEnable=HOTBED_ENABLE_T_CN;
404 393
     machine_menu.HotbedConfTitle      = HOTBED_CONF_TITLE_T_CN;
405 394
     machine_menu.HotbedAjustType      = HOTBED_ADJUST_T_CN;
406 395
     machine_menu.HotbedMinTemperature = HOTBED_MIN_TEMPERATURE_T_CN;
@@ -475,7 +464,6 @@ void machine_setting_disp() {
475 464
 
476 465
     machine_menu.HomeFeedRateConfTitle = HOMEFEEDRATE_CONF_TITLE_T_CN;
477 466
     machine_menu.XY_HomeFeedRate       = X_HOMESPEED_T_CN;
478
-    // machine_menu.Y_HomeFeedRate=Y_HOMESPEED_T_CN;
479 467
     machine_menu.Z_HomeFeedRate = Z_HOMESPEED_T_CN;
480 468
 
481 469
     machine_menu.AdvancedConfTitle = ADVANCED_CONF_TITLE_T_CN;
@@ -499,8 +487,6 @@ void machine_setting_disp() {
499 487
     machine_menu.key_back    = KEY_BACK_T_CN;
500 488
     machine_menu.key_reset   = KEY_REST_T_CN;
501 489
     machine_menu.key_confirm = KEY_CONFIRM_T_CN;
502
-    // machine_menu.high_level = MOTOR_EN_HIGH_LEVEL_T_CN;
503
-    // machine_menu.low_level = MOTOR_EN_LOW_LEVEL_T_CN;
504 490
 
505 491
     machine_menu.PausePosText = PAUSE_POSITION_T_CN;
506 492
     machine_menu.xPos         = PAUSE_POSITION_X_T_CN;
@@ -618,10 +604,6 @@ void machine_setting_disp() {
618 604
     machine_menu.CalibrationRadius         = CALIBRATION_RADIUS_EN;
619 605
 
620 606
     machine_menu.LevelingSubXYZConfTitle = XYZ_LEVEL_CONF_TITLE_EN;
621
-    // machine_menu.Level_positon=PROBE_REACH_MAX_LEFT_EN;
622
-    // machine_menu.ProbeMaxRigh=PROBE_REACH_MAX_RIGHT_EN;
623
-    // machine_menu.ProbeMaxfront=PROBE_REACH_MAX_FRONT_EN;
624
-    // machine_menu.ProbeMaxback=PROBE_REACH_MAX_BACK_EN;
625 607
 
626 608
     machine_menu.TemperatureConfTitle = TEMPERATURE_CONF_TITLE_EN;
627 609
     machine_menu.NozzleConf           = NOZZLE_CONF_EN;
@@ -711,7 +693,6 @@ void machine_setting_disp() {
711 693
 
712 694
     machine_menu.HomeFeedRateConfTitle = HOMEFEEDRATE_CONF_TITLE_EN;
713 695
     machine_menu.XY_HomeFeedRate       = X_HOMESPEED_EN;
714
-    // machine_menu.Y_HomeFeedRate=Y_HOMESPEED_EN;
715 696
     machine_menu.Z_HomeFeedRate = Z_HOMESPEED_EN;
716 697
 
717 698
     machine_menu.AdvancedConfTitle = ADVANCED_CONF_TITLE_EN;
@@ -823,7 +804,6 @@ void disp_language_init() {
823 804
 
824 805
   about_menu.type_name  = ABOUT_TYPE_TEXT;
825 806
   about_menu.firmware_v = ABOUT_VERSION_TEXT;
826
-  // about_menu.wifi = ABOUT_WIFI_TEXT;
827 807
 
828 808
   wifi_menu.ip           = WIFI_IP_TEXT;
829 809
   wifi_menu.wifi         = WIFI_NAME_TEXT;
@@ -861,7 +841,7 @@ void disp_language_init() {
861 841
     tips_menu.joining      = TEXT_WIFI_JOINING_EN;
862 842
     tips_menu.failedJoin   = TEXT_WIFI_FAILED_JOIN_EN;
863 843
     tips_menu.wifiConected = TEXT_WIFI_WIFI_CONECTED_EN;
864
-  #endif  //MKS_WIFI_MODULE
844
+  #endif
865 845
   machine_setting_disp();
866 846
 
867 847
   operation_menu.babystep = TEXT_BABY_STEP_EN;
@@ -923,7 +903,7 @@ void disp_language_init() {
923 903
       file_menu.page_down         = PAGE_DOWN_TEXT_CN;
924 904
       file_menu.file_loading      = FILE_LOADING_CN;
925 905
       file_menu.no_file           = NO_FILE_CN;
926
-      file_menu.no_file_and_check = NO_FILE_CN;// NO_FILE_AND_CHECK_CN;
906
+      file_menu.no_file_and_check = NO_FILE_CN;
927 907
       //
928 908
       extrude_menu.title       = TITLE_EXTRUDE_CN;
929 909
       extrude_menu.in          = EXTRUDER_IN_TEXT_CN;
@@ -961,12 +941,9 @@ void disp_language_init() {
961 941
       filesys_menu.sd_sys  = SD_CARD_TEXT_CN;
962 942
       filesys_menu.usb_sys = U_DISK_TEXT_CN;
963 943
       //
964
-      more_menu.title   = TITLE_MORE_CN;
944
+      more_menu.title       = TITLE_MORE_CN;
965 945
       // WIFI
966 946
       wifi_menu.title = WIFI_TEXT;
967
-      // wifi_menu.key = WIFI_KEY_TEXT_CN;
968
-      // wifi_menu.ip = WIFI_IP_TEXT_CN;
969
-      // wifi_menu.state = WIFI_STA_TEXT_CN;
970 947
       wifi_menu.cloud     = CLOUD_TEXT_CN;
971 948
       wifi_menu.reconnect = WIFI_RECONNECT_TEXT_CN;
972 949
       // CLOUD
@@ -1055,11 +1032,10 @@ void disp_language_init() {
1055 1032
       printing_more_menu.speed      = PRINTING_CHANGESPEED_CN;
1056 1033
       printing_more_menu.temp       = PRINTING_TEMP_CN;
1057 1034
 
1058
-      // print_file_dialog_menu.title = TITLE_DIALOG_CONFIRM_CN;
1059 1035
       print_file_dialog_menu.confirm               = DIALOG_CONFIRM_CN;
1060
-      print_file_dialog_menu.cancle                = DIALOG_CANCLE_CN;
1036
+      print_file_dialog_menu.cancel                = DIALOG_CANCLE_CN;
1061 1037
       print_file_dialog_menu.print_file            = DIALOG_PRINT_MODEL_CN;
1062
-      print_file_dialog_menu.cancle_print          = DIALOG_CANCEL_PRINT_CN;
1038
+      print_file_dialog_menu.cancel_print          = DIALOG_CANCEL_PRINT_CN;
1063 1039
       print_file_dialog_menu.retry                 = DIALOG_RETRY_CN;
1064 1040
       print_file_dialog_menu.stop                  = DIALOG_STOP_CN;
1065 1041
       print_file_dialog_menu.no_file_print_tips    = DIALOG_ERROR_TIPS1_CN;
@@ -1153,7 +1129,7 @@ void disp_language_init() {
1153 1129
             file_menu.page_down         = PAGE_DOWN_TEXT_T_CN;
1154 1130
             file_menu.file_loading      = FILE_LOADING_T_CN;
1155 1131
             file_menu.no_file           = NO_FILE_T_CN;
1156
-            file_menu.no_file_and_check = NO_FILE_T_CN;// NO_FILE_AND_CHECK_T_CN;
1132
+            file_menu.no_file_and_check = NO_FILE_T_CN;
1157 1133
             //
1158 1134
             extrude_menu.title       = TITLE_EXTRUDE_T_CN;
1159 1135
             extrude_menu.in          = EXTRUDER_IN_TEXT_T_CN;
@@ -1190,12 +1166,9 @@ void disp_language_init() {
1190 1166
             filesys_menu.sd_sys   = SD_CARD_TEXT_T_CN;
1191 1167
             filesys_menu.usb_sys  = U_DISK_TEXT_T_CN;
1192 1168
             //
1193
-            more_menu.title = TITLE_MORE_T_CN;
1169
+            more_menu.title       = TITLE_MORE_T_CN;
1194 1170
             // WIFI
1195 1171
             wifi_menu.title = WIFI_TEXT;
1196
-            // wifi_menu.key = WIFI_KEY_TEXT_CN;
1197
-            // wifi_menu.ip = WIFI_IP_TEXT_CN;
1198
-            // wifi_menu.state= WIFI_STA_TEXT_CN;
1199 1172
             wifi_menu.cloud     = CLOUD_TEXT_T_CN;
1200 1173
             wifi_menu.reconnect = WIFI_RECONNECT_TEXT_T_CN;
1201 1174
             // CLOUD
@@ -1233,7 +1206,6 @@ void disp_language_init() {
1233 1206
             filament_menu.filament_dialog_unloading           = FILAMENT_DIALOG_UNLOADING_TIPS_T_CN;
1234 1207
             filament_menu.filament_dialog_unload_completed    = FILAMENT_DIALOG_UNLOAD_COMPLETE_TIPS_T_CN;
1235 1208
 
1236
-
1237 1209
             //
1238 1210
             language_menu.title = TITLE_LANGUAGE_T_CN;
1239 1211
             language_menu.next  = PAGE_DOWN_TEXT_T_CN;
@@ -1284,11 +1256,10 @@ void disp_language_init() {
1284 1256
             printing_more_menu.speed      = PRINTING_CHANGESPEED_T_CN;
1285 1257
             printing_more_menu.temp       = PRINTING_TEMP_T_CN;
1286 1258
 
1287
-            // print_file_dialog_menu.title = TITLE_DIALOG_CONFIRM_CN;
1288 1259
             print_file_dialog_menu.confirm               = DIALOG_CONFIRM_T_CN;
1289
-            print_file_dialog_menu.cancle                = DIALOG_CANCLE_T_CN;
1260
+            print_file_dialog_menu.cancel                = DIALOG_CANCLE_T_CN;
1290 1261
             print_file_dialog_menu.print_file            = DIALOG_PRINT_MODEL_T_CN;
1291
-            print_file_dialog_menu.cancle_print          = DIALOG_CANCEL_PRINT_T_CN;
1262
+            print_file_dialog_menu.cancel_print          = DIALOG_CANCEL_PRINT_T_CN;
1292 1263
             print_file_dialog_menu.retry                 = DIALOG_RETRY_T_CN;
1293 1264
             print_file_dialog_menu.stop                  = DIALOG_STOP_T_CN;
1294 1265
             print_file_dialog_menu.no_file_print_tips    = DIALOG_ERROR_TIPS1_T_CN;
@@ -1373,7 +1344,7 @@ void disp_language_init() {
1373 1344
             file_menu.page_down         = PAGE_DOWN_TEXT_EN;
1374 1345
             file_menu.file_loading      = FILE_LOADING_EN;
1375 1346
             file_menu.no_file           = NO_FILE_EN;
1376
-            file_menu.no_file_and_check = NO_FILE_EN;// NO_FILE_AND_CHECK_EN;
1347
+            file_menu.no_file_and_check = NO_FILE_EN;
1377 1348
             //
1378 1349
             extrude_menu.title       = TITLE_EXTRUDE_EN;
1379 1350
             extrude_menu.in          = EXTRUDER_IN_TEXT_EN;
@@ -1412,9 +1383,6 @@ void disp_language_init() {
1412 1383
             filesys_menu.usb_sys = U_DISK_TEXT_EN;
1413 1384
             // WIFI
1414 1385
             wifi_menu.title = WIFI_TEXT;
1415
-            // wifi_menu.key = WIFI_KEY_TEXT_EN;
1416
-            // wifi_menu.ip = WIFI_IP_TEXT_EN;
1417
-            // wifi_menu.state = WIFI_STA_TEXT_EN;
1418 1386
             wifi_menu.cloud     = CLOUD_TEXT_EN;
1419 1387
             wifi_menu.reconnect = WIFI_RECONNECT_TEXT_EN;
1420 1388
 
@@ -1500,11 +1468,10 @@ void disp_language_init() {
1500 1468
             printing_more_menu.speed      = PRINTING_CHANGESPEED_EN;
1501 1469
             printing_more_menu.temp       = PRINTING_TEMP_EN;
1502 1470
 
1503
-            // print_file_dialog_menu.title = TITLE_DIALOG_CONFIRM_EN;
1504 1471
             print_file_dialog_menu.confirm               = DIALOG_CONFIRM_EN;
1505
-            print_file_dialog_menu.cancle                = DIALOG_CANCLE_EN;
1472
+            print_file_dialog_menu.cancel                = DIALOG_CANCLE_EN;
1506 1473
             print_file_dialog_menu.print_file            = DIALOG_PRINT_MODEL_EN;
1507
-            print_file_dialog_menu.cancle_print          = DIALOG_CANCEL_PRINT_EN;
1474
+            print_file_dialog_menu.cancel_print          = DIALOG_CANCEL_PRINT_EN;
1508 1475
             print_file_dialog_menu.retry                 = DIALOG_RETRY_EN;
1509 1476
             print_file_dialog_menu.stop                  = DIALOG_STOP_EN;
1510 1477
             print_file_dialog_menu.no_file_print_tips    = DIALOG_ERROR_TIPS1_EN;
@@ -1588,7 +1555,7 @@ void disp_language_init() {
1588 1555
             file_menu.page_down         = PAGE_DOWN_TEXT_RU;
1589 1556
             file_menu.file_loading      = FILE_LOADING_RU;
1590 1557
             file_menu.no_file           = NO_FILE_RU;
1591
-            file_menu.no_file_and_check = NO_FILE_RU;// NO_FILE_AND_CHECK_RU;
1558
+            file_menu.no_file_and_check = NO_FILE_RU;
1592 1559
             //
1593 1560
             extrude_menu.title       = TITLE_EXTRUDE_RU;
1594 1561
             extrude_menu.in          = EXTRUDER_IN_TEXT_RU;
@@ -1627,13 +1594,9 @@ void disp_language_init() {
1627 1594
             filesys_menu.usb_sys = U_DISK_TEXT_RU;
1628 1595
             // WIFI
1629 1596
             wifi_menu.title = WIFI_TEXT;
1630
-            // wifi_menu.key = WIFI_KEY_TEXT_RU;
1631
-            // wifi_menu.ip = WIFI_IP_TEXT_RU;
1632
-            // wifi_menu.state = WIFI_STA_TEXT_RU;
1633 1597
             wifi_menu.cloud     = CLOUD_TEXT_RU;
1634 1598
             wifi_menu.reconnect = WIFI_RECONNECT_TEXT_RU;
1635 1599
 
1636
-
1637 1600
             cloud_menu.title        = TITLE_CLOUD_TEXT_RU;
1638 1601
             cloud_menu.bind         = CLOUD_BINDED_RU;
1639 1602
             cloud_menu.binded       = CLOUD_BINDED_RU;
@@ -1715,11 +1678,10 @@ void disp_language_init() {
1715 1678
             printing_more_menu.manual     = MANUAL_SHUTDOWN_RU;
1716 1679
             printing_more_menu.speed      = PRINTING_CHANGESPEED_RU;
1717 1680
             printing_more_menu.temp       = PRINTING_TEMP_RU;
1718
-            // print_file_dialog_menu.title = TITLE_DIALOG_CONFIRM_RU;
1719 1681
             print_file_dialog_menu.confirm               = DIALOG_CONFIRM_RU;
1720
-            print_file_dialog_menu.cancle                = DIALOG_CANCLE_RU;
1682
+            print_file_dialog_menu.cancel                = DIALOG_CANCLE_RU;
1721 1683
             print_file_dialog_menu.print_file            = DIALOG_PRINT_MODEL_RU;
1722
-            print_file_dialog_menu.cancle_print          = DIALOG_CANCEL_PRINT_RU;
1684
+            print_file_dialog_menu.cancel_print          = DIALOG_CANCEL_PRINT_RU;
1723 1685
             print_file_dialog_menu.retry                 = DIALOG_RETRY_RU;
1724 1686
             print_file_dialog_menu.stop                  = DIALOG_STOP_RU;
1725 1687
             print_file_dialog_menu.no_file_print_tips    = DIALOG_ERROR_TIPS1_RU;
@@ -1807,7 +1769,7 @@ void disp_language_init() {
1807 1769
             file_menu.page_down         = PAGE_DOWN_TEXT_SP;
1808 1770
             file_menu.file_loading      = FILE_LOADING_SP;
1809 1771
             file_menu.no_file           = NO_FILE_SP;
1810
-            file_menu.no_file_and_check = NO_FILE_SP;// NO_FILE_AND_CHECK_SP;
1772
+            file_menu.no_file_and_check = NO_FILE_SP;
1811 1773
             //
1812 1774
             extrude_menu.title       = TITLE_EXTRUDE_SP;
1813 1775
             extrude_menu.in          = EXTRUDER_IN_TEXT_SP;
@@ -1847,9 +1809,6 @@ void disp_language_init() {
1847 1809
 
1848 1810
             // WIFI
1849 1811
             wifi_menu.title = WIFI_TEXT;
1850
-            // wifi_menu.key = WIFI_KEY_TEXT_SP;
1851
-            // wifi_menu.ip = WIFI_IP_TEXT_SP;
1852
-            // wifi_menu.state = WIFI_STA_TEXT_SP;
1853 1812
             wifi_menu.cloud     = CLOUD_TEXT_SP;
1854 1813
             wifi_menu.reconnect = WIFI_RECONNECT_TEXT_SP;
1855 1814
 
@@ -1935,11 +1894,10 @@ void disp_language_init() {
1935 1894
             printing_more_menu.speed      = PRINTING_CHANGESPEED_SP;
1936 1895
             printing_more_menu.temp       = PRINTING_TEMP_SP;
1937 1896
 
1938
-            // print_file_dialog_menu.title = TITLE_DIALOG_CONFIRM_SP;
1939 1897
             print_file_dialog_menu.confirm               = DIALOG_CONFIRM_SP;
1940
-            print_file_dialog_menu.cancle                = DIALOG_CANCLE_SP;
1898
+            print_file_dialog_menu.cancel                = DIALOG_CANCLE_SP;
1941 1899
             print_file_dialog_menu.print_file            = DIALOG_PRINT_MODEL_SP;
1942
-            print_file_dialog_menu.cancle_print          = DIALOG_CANCEL_PRINT_SP;
1900
+            print_file_dialog_menu.cancel_print          = DIALOG_CANCEL_PRINT_SP;
1943 1901
             print_file_dialog_menu.retry                 = DIALOG_RETRY_SP;
1944 1902
             print_file_dialog_menu.stop                  = DIALOG_STOP_SP;
1945 1903
             print_file_dialog_menu.no_file_print_tips    = DIALOG_ERROR_TIPS1_SP;
@@ -2063,13 +2021,9 @@ void disp_language_init() {
2063 2021
           filesys_menu.usb_sys        = U_DISK_TEXT_FR;
2064 2022
           file_menu.file_loading      = FILE_LOADING_FR;
2065 2023
           file_menu.no_file           = NO_FILE_FR;
2066
-          file_menu.no_file_and_check = NO_FILE_FR;// NO_FILE_AND_CHECK_FR;
2024
+          file_menu.no_file_and_check = NO_FILE_FR;
2067 2025
           // WIFI
2068 2026
           wifi_menu.title = WIFI_NAME_TEXT_FR;
2069
-          // wifi_menu.key = WIFI_KEY_TEXT_FR;
2070
-          // wifi_menu.ip = WIFI_IP_TEXT_FR;
2071
-          // wifi_menu.state = WIFI_STA_TEXT_FR;
2072
-          // wifi_menu.cloud = CLOSE_TEXT_FR;
2073 2027
           wifi_menu.cloud     = CLOUD_TEXT_FR;
2074 2028
           wifi_menu.reconnect = WIFI_RECONNECT_TEXT_FR;
2075 2029
 
@@ -2153,11 +2107,10 @@ void disp_language_init() {
2153 2107
           printing_more_menu.speed      = PRINTING_CHANGESPEED_FR;
2154 2108
           printing_more_menu.temp       = PRINTING_TEMP_FR;
2155 2109
 
2156
-          // print_file_dialog_menu.title = TITLE_DIALOG_CONFIRM_SP;
2157 2110
           print_file_dialog_menu.confirm               = DIALOG_CONFIRM_FR;
2158
-          print_file_dialog_menu.cancle                = DIALOG_CANCLE_FR;
2111
+          print_file_dialog_menu.cancel                = DIALOG_CANCLE_FR;
2159 2112
           print_file_dialog_menu.print_file            = DIALOG_PRINT_MODEL_FR;
2160
-          print_file_dialog_menu.cancle_print          = DIALOG_CANCEL_PRINT_FR;
2113
+          print_file_dialog_menu.cancel_print          = DIALOG_CANCEL_PRINT_FR;
2161 2114
           print_file_dialog_menu.retry                 = DIALOG_RETRY_FR;
2162 2115
           print_file_dialog_menu.stop                  = DIALOG_STOP_FR;
2163 2116
           print_file_dialog_menu.no_file_print_tips    = DIALOG_ERROR_TIPS1_FR;
@@ -2243,7 +2196,7 @@ void disp_language_init() {
2243 2196
           file_menu.page_down         = PAGE_DOWN_TEXT_IT;
2244 2197
           file_menu.file_loading      = FILE_LOADING_IT;
2245 2198
           file_menu.no_file           = NO_FILE_IT;
2246
-          file_menu.no_file_and_check = NO_FILE_IT;// NO_FILE_AND_CHECK_IT;
2199
+          file_menu.no_file_and_check = NO_FILE_IT;
2247 2200
           //
2248 2201
           extrude_menu.title       = TITLE_EXTRUDE_IT;
2249 2202
           extrude_menu.in          = EXTRUDER_IN_TEXT_IT;
@@ -2283,9 +2236,6 @@ void disp_language_init() {
2283 2236
 
2284 2237
           // WIFI
2285 2238
           wifi_menu.title = WIFI_NAME_TEXT_IT;
2286
-          // wifi_menu.key = WIFI_KEY_TEXT_IT;
2287
-          // wifi_menu.ip = WIFI_IP_TEXT_IT;
2288
-          // wifi_menu.state = WIFI_STA_TEXT_IT;
2289 2239
           wifi_menu.cloud     = CLOSE_TEXT_IT;
2290 2240
           wifi_menu.reconnect = WIFI_RECONNECT_TEXT_IT;
2291 2241
 
@@ -2369,11 +2319,10 @@ void disp_language_init() {
2369 2319
           printing_more_menu.temp       = PRINTING_TEMP_IT;
2370 2320
           printing_more_menu.speed      = PRINTING_CHANGESPEED_IT;
2371 2321
 
2372
-          // print_file_dialog_menu.title = TITLE_DIALOG_CONFIRM_SP;
2373 2322
           print_file_dialog_menu.confirm               = DIALOG_CONFIRM_IT;
2374
-          print_file_dialog_menu.cancle                = DIALOG_CANCLE_IT;
2323
+          print_file_dialog_menu.cancel                = DIALOG_CANCLE_IT;
2375 2324
           print_file_dialog_menu.print_file            = DIALOG_PRINT_MODEL_IT;
2376
-          print_file_dialog_menu.cancle_print          = DIALOG_CANCEL_PRINT_IT;
2325
+          print_file_dialog_menu.cancel_print          = DIALOG_CANCEL_PRINT_IT;
2377 2326
           print_file_dialog_menu.retry                 = DIALOG_RETRY_IT;
2378 2327
           print_file_dialog_menu.stop                  = DIALOG_STOP_IT;
2379 2328
           print_file_dialog_menu.no_file_print_tips    = DIALOG_ERROR_TIPS1_IT;
@@ -2460,7 +2409,7 @@ void disp_language_init() {
2460 2409
       file_menu.page_down         = PAGE_DOWN_TEXT_EN;
2461 2410
       file_menu.file_loading      = FILE_LOADING_EN;
2462 2411
       file_menu.no_file           = NO_FILE_EN;
2463
-      file_menu.no_file_and_check = NO_FILE_EN;// NO_FILE_AND_CHECK_EN;
2412
+      file_menu.no_file_and_check = NO_FILE_EN;
2464 2413
       //
2465 2414
       extrude_menu.title       = TITLE_EXTRUDE_EN;
2466 2415
       extrude_menu.in          = EXTRUDER_IN_TEXT_EN;
@@ -2493,16 +2442,13 @@ void disp_language_init() {
2493 2442
       set_menu.machine_para = MACHINE_PARA_EN;
2494 2443
       set_menu.eepromSet    = EEPROM_SETTINGS_EN;
2495 2444
       //
2496
-      more_menu.title   = TITLE_MORE_EN;
2445
+      more_menu.title       = TITLE_MORE_EN;
2497 2446
       //
2498 2447
       filesys_menu.title   = TITLE_FILESYS_EN;
2499 2448
       filesys_menu.sd_sys  = SD_CARD_TEXT_EN;
2500 2449
       filesys_menu.usb_sys = U_DISK_TEXT_EN;
2501 2450
       // WIFI
2502 2451
       wifi_menu.title = WIFI_TEXT;
2503
-      // wifi_menu.key = WIFI_KEY_TEXT_EN;
2504
-      // wifi_menu.ip = WIFI_IP_TEXT_EN;
2505
-      // wifi_menu.state = WIFI_STA_TEXT_EN;
2506 2452
       wifi_menu.cloud     = CLOUD_TEXT_EN;
2507 2453
       wifi_menu.reconnect = WIFI_RECONNECT_TEXT_EN;
2508 2454
 
@@ -2588,11 +2534,10 @@ void disp_language_init() {
2588 2534
       printing_more_menu.speed      = PRINTING_CHANGESPEED_EN;
2589 2535
       printing_more_menu.temp       = PRINTING_TEMP_EN;
2590 2536
 
2591
-      // print_file_dialog_menu.title = TITLE_DIALOG_CONFIRM_EN;
2592 2537
       print_file_dialog_menu.confirm               = DIALOG_CONFIRM_EN;
2593
-      print_file_dialog_menu.cancle                = DIALOG_CANCLE_EN;
2538
+      print_file_dialog_menu.cancel                = DIALOG_CANCLE_EN;
2594 2539
       print_file_dialog_menu.print_file            = DIALOG_PRINT_MODEL_EN;
2595
-      print_file_dialog_menu.cancle_print          = DIALOG_CANCEL_PRINT_EN;
2540
+      print_file_dialog_menu.cancel_print          = DIALOG_CANCEL_PRINT_EN;
2596 2541
       print_file_dialog_menu.retry                 = DIALOG_RETRY_EN;
2597 2542
       print_file_dialog_menu.stop                  = DIALOG_STOP_EN;
2598 2543
       print_file_dialog_menu.no_file_print_tips    = DIALOG_ERROR_TIPS1_EN;

+ 5
- 18
Marlin/src/lcd/extui/lib/mks_ui/tft_multi_language.h Bestand weergeven

@@ -131,10 +131,6 @@ typedef struct machine_common_disp{
131 131
   const char *CalibrationRadius;
132 132
 
133 133
   const char *LevelingSubXYZConfTitle;
134
-  //const char *Level_positon1;
135
-  //const char *Level_positon2;
136
-  //const char *Level_positon3;
137
-  //const char *Level_positon4;
138 134
 
139 135
   const char *TemperatureConfTitle;
140 136
   const char *NozzleConf;
@@ -667,9 +663,9 @@ extern dialog_menu_def dialog_menu;
667 663
 typedef struct print_file_dialog_disp {
668 664
   const char *title;
669 665
   const char *confirm;
670
-  const char *cancle;
666
+  const char *cancel;
671 667
   const char *print_file;
672
-  const char *cancle_print;
668
+  const char *cancel_print;
673 669
   const char *retry;
674 670
   const char *stop;
675 671
   const char *no_file_print_tips;
@@ -740,12 +736,8 @@ typedef struct eeprom_disp{
740 736
 
741 737
 extern eeprom_def eeprom_menu;
742 738
 /*****************************************/
743
-//********************************************//
744
-//#if defined(TFT70)
745 739
 //
746
-//#elif defined(TFT35)
747 740
 #define TEXT_VALUE          "%d/%d"
748
-//#endif
749 741
 
750 742
 #define TEXT_VALUE_T        ": %d℃"
751 743
 #define TEXT_VALUE_mm       ": %dmm"
@@ -796,19 +788,14 @@ extern eeprom_def eeprom_menu;
796 788
 #define HOME_Y_TEXT         "Y"
797 789
 #define HOME_Z_TEXT         "Z"
798 790
 #define HOME_ALL_TEXT       "All"
799
-//#if defined(MKS_ROBIN_NANO)
791
+
800 792
 #define ABOUT_TYPE_TEXT     "MKS Robin Pro"
801
-//#elif defined(MKS_ROBIN_MINI)
802
-//#define ABOUT_TYPE_TEXT       "MKS Robin Mini"
803
-//#endif
793
+
804 794
 #define ABOUT_VERSION_TEXT  "1.0.0"
805
-//#define ABOUT_WIFI_TEXT   "WiFi:"
806 795
 
807 796
 #define FAN_OPEN_TEXT       "100%"
808 797
 #define FAN_HALF_TEXT       "50%"
809 798
 #define FAN_CLOSE_TEXT      "0%"
810
-//#define FAN_TIPS1_TEXT      "FAN"
811
-//#define FAN_TIPS2_TEXT      "FAN\nClose"
812 799
 
813 800
 #define WIFI_TEXT                       "WIFI"
814 801
 #define WIFI_IP_TEXT                    "IP: "
@@ -830,7 +817,7 @@ extern eeprom_def eeprom_menu;
830 817
 #define DIALOG_UPLOAD_SPEED_EN          "Speed"
831 818
 #define DIALOG_UPDATE_WIFI_FIRMWARE_EN  "Updating wifi model firmware"
832 819
 #define DIALOG_UPDATE_WIFI_WEB_EN       "Updating wifi model web data"
833
-#define DIALOG_UPDATE_NO_DEVICE_EN      "please check \nwether memory device insert!"
820
+#define DIALOG_UPDATE_NO_DEVICE_EN      "Please check whether\nmemory device inserted!"
834 821
 
835 822
 #define ZOFFSET_STEP001                 "0.01mm"
836 823
 #define ZOFFSET_STEP01                  "0.1mm"

+ 1
- 1
Marlin/src/lcd/extui/lib/mks_ui/wifiSerial.h Bestand weergeven

@@ -26,7 +26,7 @@
26 26
 #if ENABLED(MKS_WIFI_MODULE)
27 27
 
28 28
 #ifdef SERIAL_PORT_2
29
-  #error "SERIAL_PORT_2 must be disabled with HAS_TFT_LVGL_UI and MKS_WIFI_MODULE."
29
+  #error "SERIAL_PORT_2 must be disabled with TFT_LVGL_UI* and MKS_WIFI_MODULE."
30 30
 #endif
31 31
 
32 32
 #define WIFI_BAUDRATE          115200

+ 28
- 32
Marlin/src/lcd/extui/lib/mks_ui/wifi_module.cpp Bestand weergeven

@@ -110,8 +110,6 @@ extern CLOUD_PARA cloud_para;
110 110
 
111 111
 extern bool once_flag, flash_preview_begin, default_preview_flg, gcode_preview_over;
112 112
 
113
-extern uint8_t bmp_public_buf[17 * 1024];
114
-
115 113
 uint32_t getWifiTick() {
116 114
   return millis();
117 115
 }
@@ -126,8 +124,10 @@ uint32_t getWifiTickDiff(int32_t lastTick, int32_t curTick) {
126 124
 void wifi_delay(int n) {
127 125
   uint32_t begin = getWifiTick();
128 126
   uint32_t end = begin;
129
-  while (getWifiTickDiff(begin, end) < (uint32_t)n)
127
+  while (getWifiTickDiff(begin, end) < (uint32_t)n) {
128
+    watchdog_refresh();
130 129
     end = getWifiTick();
130
+  }
131 131
 }
132 132
 
133 133
 void wifi_reset() {
@@ -304,7 +304,7 @@ void esp_port_begin(uint8_t interrupt) {
304 304
 
305 305
 #if ENABLED(MKS_WIFI_MODULE)
306 306
 
307
-  int raw_send_to_wifi(char *buf, int len) {
307
+  int raw_send_to_wifi(uint8_t *buf, int len) {
308 308
     if (buf == 0 || len <= 0) return 0;
309 309
     for (int i = 0; i < len; i++)
310 310
       WIFISERIAL.write(*(buf + i));
@@ -315,11 +315,11 @@ void esp_port_begin(uint8_t interrupt) {
315 315
 
316 316
 void wifi_ret_ack() {}
317 317
 
318
-char buf_to_wifi[256];
318
+uint8_t buf_to_wifi[256];
319 319
 int index_to_wifi = 0;
320
-int package_to_wifi(WIFI_RET_TYPE type,char *buf, int len) {
321
-  char wifi_ret_head = 0xA5;
322
-  char wifi_ret_tail = 0xFC;
320
+int package_to_wifi(WIFI_RET_TYPE type, uint8_t *buf, int len) {
321
+  uint8_t wifi_ret_head = 0xA5;
322
+  uint8_t wifi_ret_tail = 0xFC;
323 323
 
324 324
   if (type == WIFI_PARA_SET) {
325 325
     int data_offset = 4;
@@ -331,9 +331,9 @@ int package_to_wifi(WIFI_RET_TYPE type,char *buf, int len) {
331 331
 
332 332
     buf_to_wifi[data_offset] = gCfgItems.wifi_mode_sel;
333 333
     buf_to_wifi[data_offset + 1]  = apLen;
334
-    strncpy(&buf_to_wifi[data_offset + 2], (const char *)uiCfg.wifi_name, apLen);
334
+    memcpy(&buf_to_wifi[data_offset + 2], (const char *)uiCfg.wifi_name, apLen);
335 335
     buf_to_wifi[data_offset + apLen + 2]  = keyLen;
336
-    strncpy(&buf_to_wifi[data_offset + apLen + 3], (const char *)uiCfg.wifi_key, keyLen);
336
+    memcpy(&buf_to_wifi[data_offset + apLen + 3], (const char *)uiCfg.wifi_key, keyLen);
337 337
     buf_to_wifi[data_offset + apLen + keyLen + 3] = wifi_ret_tail;
338 338
 
339 339
     index_to_wifi = apLen + keyLen + 3;
@@ -410,7 +410,7 @@ int package_to_wifi(WIFI_RET_TYPE type,char *buf, int len) {
410 410
 
411 411
     buf_to_wifi[data_offset] = gCfgItems.cloud_enable ? 0x0A : 0x05;
412 412
     buf_to_wifi[data_offset + 1]  = urlLen;
413
-    strncpy(&buf_to_wifi[data_offset + 2], (const char *)uiCfg.cloud_hostUrl, urlLen);
413
+    memcpy(&buf_to_wifi[data_offset + 2], (const char *)uiCfg.cloud_hostUrl, urlLen);
414 414
     buf_to_wifi[data_offset + urlLen + 2] = uiCfg.cloud_port & 0xFF;
415 415
     buf_to_wifi[data_offset + urlLen + 3] = (uiCfg.cloud_port >> 8) & 0xFF;
416 416
     buf_to_wifi[data_offset + urlLen + 4] = wifi_ret_tail;
@@ -555,7 +555,7 @@ uint8_t Explore_Disk(char* path , uint8_t recu_level) {
555 555
       strcat(Fstream, ".DIR");
556 556
 
557 557
     strcat(Fstream, "\r\n");
558
-    send_to_wifi(Fstream, strlen(Fstream));
558
+    send_to_wifi((uint8_t*)Fstream, strlen(Fstream));
559 559
   }
560 560
 
561 561
   return fileCnt;
@@ -589,7 +589,7 @@ static void wifi_gcode_exec(uint8_t *cmd_line) {
589 589
 
590 590
             if (tmpStr == 0) {
591 591
               gCfgItems.fileSysType = FILE_SYS_SD;
592
-              send_to_wifi((char *)"Begin file list\r\n", strlen("Begin file list\r\n"));
592
+              send_to_wifi((uint8_t *)"Begin file list\r\n", strlen("Begin file list\r\n"));
593 593
               get_file_list((char *)"0:/");
594 594
               send_to_wifi((char *)"End file list\r\n", strlen("End file list\r\n"));
595 595
               send_to_wifi((char *)"ok\r\n", strlen("ok\r\n"));
@@ -602,7 +602,7 @@ static void wifi_gcode_exec(uint8_t *cmd_line) {
602 602
               char *path = (char *)tempBuf;
603 603
 
604 604
               if (strlen((char *)&tmpStr[index]) < 80) {
605
-                send_to_wifi((char *)"Begin file list\r\n", strlen("Begin file list\r\n"));
605
+                send_to_wifi((uint8_t *)"Begin file list\r\n", strlen("Begin file list\r\n"));
606 606
 
607 607
                 if (strncmp((char *)&tmpStr[index], "1:", 2) == 0)
608 608
                   gCfgItems.fileSysType = FILE_SYS_SD;
@@ -611,7 +611,7 @@ static void wifi_gcode_exec(uint8_t *cmd_line) {
611 611
 
612 612
                 strcpy((char *)path, (char *)&tmpStr[index]);
613 613
                 get_file_list(path);
614
-                send_to_wifi((char *)"End file list\r\n", strlen("End file list\r\n"));
614
+                send_to_wifi((uint8_t *)"End file list\r\n", strlen("End file list\r\n"));
615 615
               }
616 616
               send_to_wifi((char *)"ok\r\n", strlen("ok\r\n"));
617 617
             }
@@ -651,9 +651,9 @@ static void wifi_gcode_exec(uint8_t *cmd_line) {
651 651
                 card.openFileRead(cur_name);
652 652
 
653 653
                 if (card.isFileOpen())
654
-                  send_to_wifi((char *)"File selected\r\n", strlen("File selected\r\n"));
654
+                  send_to_wifi((uint8_t *)"File selected\r\n", strlen("File selected\r\n"));
655 655
                 else {
656
-                  send_to_wifi((char *)"file.open failed\r\n", strlen("file.open failed\r\n"));
656
+                  send_to_wifi((uint8_t *)"file.open failed\r\n", strlen("file.open failed\r\n"));
657 657
                   strcpy(list_file.file_name[sel_id], "notValid");
658 658
                 }
659 659
                 send_to_wifi((char *)"ok\r\n", strlen("ok\r\n"));
@@ -772,7 +772,7 @@ static void wifi_gcode_exec(uint8_t *cmd_line) {
772 772
             print_rate = uiCfg.totalSend;
773 773
             ZERO(tempBuf);
774 774
             sprintf((char *)tempBuf, "M27 %d\r\n", print_rate);
775
-            send_to_wifi((char *)tempBuf, strlen((char *)tempBuf));
775
+            send_to_wifi((uint8_t *)tempBuf, strlen((char *)tempBuf));
776 776
           }
777 777
           break;
778 778
 
@@ -857,7 +857,7 @@ static void wifi_gcode_exec(uint8_t *cmd_line) {
857 857
             );
858 858
           }
859 859
 
860
-          send_to_wifi((char *)tempBuf, strlen((char *)tempBuf));
860
+          send_to_wifi((uint8_t *)tempBuf, strlen((char *)tempBuf));
861 861
           queue.enqueue_one_P(PSTR("M105"));
862 862
           break;
863 863
 
@@ -866,7 +866,7 @@ static void wifi_gcode_exec(uint8_t *cmd_line) {
866 866
             ZERO(tempBuf);
867 867
             sprintf((char *)tempBuf, "M992 %d%d:%d%d:%d%d\r\n", print_time.hours/10, print_time.hours%10, print_time.minutes/10, print_time.minutes%10, print_time.seconds/10, print_time.seconds%10);
868 868
             wifi_ret_ack();
869
-            send_to_wifi((char *)tempBuf, strlen((char *)tempBuf));
869
+            send_to_wifi((uint8_t *)tempBuf, strlen((char *)tempBuf));
870 870
           }
871 871
           break;
872 872
 
@@ -876,18 +876,18 @@ static void wifi_gcode_exec(uint8_t *cmd_line) {
876 876
             if (strlen((char *)list_file.file_name[sel_id]) > (100 - 1)) return;
877 877
             sprintf((char *)tempBuf, "M994 %s;%d\n", list_file.file_name[sel_id],(int)gCfgItems.curFilesize);
878 878
             wifi_ret_ack();
879
-            send_to_wifi((char *)tempBuf, strlen((char *)tempBuf));
879
+            send_to_wifi((uint8_t *)tempBuf, strlen((char *)tempBuf));
880 880
           }
881 881
           break;
882 882
 
883 883
         case 997:
884 884
           if (uiCfg.print_state == IDLE) {
885 885
             wifi_ret_ack();
886
-            send_to_wifi((char *)"M997 IDLE\r\n", strlen("M997 IDLE\r\n"));
886
+            send_to_wifi((uint8_t *)"M997 IDLE\r\n", strlen("M997 IDLE\r\n"));
887 887
           }
888 888
           else if (uiCfg.print_state == WORKING) {
889 889
             wifi_ret_ack();
890
-            send_to_wifi((char *)"M997 PRINTING\r\n", strlen("M997 PRINTING\r\n"));
890
+            send_to_wifi((uint8_t *)"M997 PRINTING\r\n", strlen("M997 PRINTING\r\n"));
891 891
           }
892 892
           else if (uiCfg.print_state == PAUSED) {
893 893
             wifi_ret_ack();
@@ -895,7 +895,7 @@ static void wifi_gcode_exec(uint8_t *cmd_line) {
895 895
           }
896 896
           else if (uiCfg.print_state == REPRINTING) {
897 897
             wifi_ret_ack();
898
-            send_to_wifi((char *)"M997 PAUSE\r\n", strlen("M997 PAUSE\r\n"));
898
+            send_to_wifi((uint8_t *)"M997 PAUSE\r\n", strlen("M997 PAUSE\r\n"));
899 899
           }
900 900
           if (uiCfg.command_send == 0) get_wifi_list_command_send();
901 901
           break;
@@ -977,8 +977,8 @@ static int32_t charAtArray(const uint8_t *_array, uint32_t _arrayLen, uint8_t _c
977 977
 }
978 978
 
979 979
 void get_wifi_list_command_send() {
980
-  char buf[] = { 0xA5, 0x07, 0x00, 0x00, 0xFC };
981
-  raw_send_to_wifi(buf, 5);
980
+  uint8_t cmd_wifi_list[] = { 0xA5, 0x07, 0x00, 0x00, 0xFC };
981
+  raw_send_to_wifi(cmd_wifi_list, COUNT(cmd_wifi_list));
982 982
 }
983 983
 
984 984
 static void net_msg_handle(uint8_t * msg, uint16_t msgLen) {
@@ -1043,7 +1043,7 @@ static void net_msg_handle(uint8_t * msg, uint16_t msgLen) {
1043 1043
     if ((wifiPara.mode != gCfgItems.wifi_mode_sel)
1044 1044
       || (strncmp(wifiPara.ap_name, (const char *)uiCfg.wifi_name, 32) != 0)
1045 1045
       || (strncmp(wifiPara.keyCode, (const char *)uiCfg.wifi_key, 64) != 0)) {
1046
-      package_to_wifi(WIFI_PARA_SET, (char *)0, 0);
1046
+      package_to_wifi(WIFI_PARA_SET, (uint8_t *)0, 0);
1047 1047
     }
1048 1048
     else uiCfg.configWifi = 0;
1049 1049
   }
@@ -1051,7 +1051,7 @@ static void net_msg_handle(uint8_t * msg, uint16_t msgLen) {
1051 1051
     if (((cloud_para.state >> 4) != (char)gCfgItems.cloud_enable)
1052 1052
       || (strncmp(cloud_para.hostUrl, (const char *)uiCfg.cloud_hostUrl, 96) != 0)
1053 1053
       || (cloud_para.port != uiCfg.cloud_port)) {
1054
-      package_to_wifi(WIFI_CLOUD_CFG, (char *)0, 0);
1054
+      package_to_wifi(WIFI_CLOUD_CFG, (uint8_t *)0, 0);
1055 1055
     }
1056 1056
     else cfg_cloud_flag = 0;
1057 1057
   }
@@ -1091,17 +1091,13 @@ static void wifi_list_msg_handle(uint8_t * msg, uint16_t msgLen) {
1091 1091
           }
1092 1092
         }
1093 1093
         if (wifi_name_is_same != 1) {
1094
-          //for (j=0;j<wifiNameLen;j++) {
1095 1094
             if (str[0] > 0x80) {
1096 1095
               wifi_name_is_same = 1;
1097
-              //break;
1098 1096
             }
1099
-          //}
1100 1097
         }
1101 1098
         if (wifi_name_is_same == 1) {
1102 1099
           wifi_name_is_same = 0;
1103 1100
           wifiMsgIdex  +=  wifiNameLen;
1104
-          //wifi_list.RSSI[i] = msg[wifiMsgIdex];
1105 1101
           wifiMsgIdex  +=  1;
1106 1102
           wifi_name_num--;
1107 1103
           //i--;

+ 8
- 8
Marlin/src/lcd/extui/lib/mks_ui/wifi_module.h Bestand weergeven

@@ -170,10 +170,10 @@ typedef struct {
170 170
 #define WIFI_GCODE_BUFFER_LEAST_SIZE    96
171 171
 #define WIFI_GCODE_BUFFER_SIZE  (WIFI_GCODE_BUFFER_LEAST_SIZE * 3)
172 172
 typedef struct {
173
-    uint8_t wait_tick;
174
-    uint8_t Buffer[WIFI_GCODE_BUFFER_SIZE];
175
-    uint32_t r;
176
-    uint32_t w;
173
+  uint8_t wait_tick;
174
+  uint8_t Buffer[WIFI_GCODE_BUFFER_SIZE];
175
+  uint32_t r;
176
+  uint32_t w;
177 177
 } WIFI_GCODE_BUFFER;
178 178
 
179 179
 extern volatile WIFI_STATE wifi_link_state;
@@ -184,14 +184,14 @@ extern CLOUD_PARA cloud_para;
184 184
 extern WIFI_GCODE_BUFFER espGcodeFifo;
185 185
 
186 186
 extern uint32_t  getWifiTick();
187
-extern uint32_t  getWifiTickDiff(int32_t lastTick, int32_t  curTick);
187
+extern uint32_t  getWifiTickDiff(int32_t lastTick, int32_t curTick);
188 188
 
189 189
 extern void mks_esp_wifi_init();
190 190
 extern int  cfg_cloud_flag;
191
-extern int  send_to_wifi(char *buf, int len);
191
+extern int  send_to_wifi(uint8_t *buf, int len);
192 192
 extern void wifi_looping();
193
-extern int  raw_send_to_wifi(char *buf, int len);
194
-extern int  package_to_wifi(WIFI_RET_TYPE type,char *buf, int len);
193
+extern int  raw_send_to_wifi(uint8_t *buf, int len);
194
+extern int  package_to_wifi(WIFI_RET_TYPE type, uint8_t *buf, int len);
195 195
 extern void get_wifi_list_command_send();
196 196
 extern void get_wifi_commands();
197 197
 extern int  readWifiBuf(int8_t *buf, int32_t len);

+ 6
- 23
Marlin/src/lcd/extui/lib/mks_ui/wifi_upload.cpp Bestand weergeven

@@ -75,7 +75,6 @@ const uint32_t ESP_UNKNOWN_ADDR = 0x40001121;   // not used
75 75
 const uint32_t ESP_USER_DATA_RAM_ADDR = 0x3FFE8000; // &user data ram
76 76
 const uint32_t ESP_IRAM_ADDR = 0x40100000;      // instruction RAM
77 77
 const uint32_t ESP_FLASH_ADDR = 0x40200000;     // address of start of Flash
78
-//const uint32_t ESP_FLASH_READ_STUB_BEGIN = IRAM_ADDR + 0x18;
79 78
 
80 79
 UPLOAD_STRUCT esp_upload;
81 80
 
@@ -316,15 +315,11 @@ EspUploadResult readPacket(uint8_t op, uint32_t *valp, size_t *bodyLen, uint32_t
316 315
         }
317 316
         state = header;
318 317
         needBytes = 2;
319
-
320 318
         break;
321 319
       case end:   // expecting frame end
322 320
         c = uploadPort_read();
323
-        if (c != (uint8_t)0xC0) {
324
-          return slipFrame;
325
-        }
321
+        if (c != (uint8_t)0xC0) return slipFrame;
326 322
         state = done;
327
-
328 323
         break;
329 324
 
330 325
       case header:  // reading an 8-byte header
@@ -373,8 +368,7 @@ EspUploadResult readPacket(uint8_t op, uint32_t *valp, size_t *bodyLen, uint32_t
373 368
         }
374 369
         break;
375 370
 
376
-      default:    // this shouldn't happen
377
-        return slipState;
371
+      default: return slipState;  // this shouldn't happen
378 372
     }
379 373
   }
380 374
 
@@ -383,7 +377,6 @@ EspUploadResult readPacket(uint8_t op, uint32_t *valp, size_t *bodyLen, uint32_t
383 377
   opRet = (uint8_t)getData(1, hdr, 1);
384 378
   // Sync packets often provoke a response with a zero opcode instead of ESP_SYNC
385 379
   if (resp != 0x01 || opRet != op) {
386
-    //printf("resp %02x %02x\n", resp, opRet); //debug
387 380
     return respHeader;
388 381
   }
389 382
 
@@ -405,7 +398,6 @@ void _writePacket(const uint8_t *data, size_t len) {
405 398
     }
406 399
     else {
407 400
       outBuf[outIndex++] = *data;
408
-
409 401
     }
410 402
     data++;
411 403
     --len;
@@ -444,7 +436,6 @@ void sendCommand(uint8_t op, uint32_t checkVal, const uint8_t *data, size_t data
444 436
   putData(checkVal, 4, hdr, 4);
445 437
 
446 438
   // send the packet
447
-  //flushInput();
448 439
   if (op == ESP_SYNC)
449 440
     writePacketRaw(hdr, sizeof(hdr), data, dataLen);
450 441
   else
@@ -492,9 +483,7 @@ EspUploadResult Sync(uint16_t timeout) {
492 483
     for (;;) {
493 484
       size_t bodyLen;
494 485
       EspUploadResult rc = readPacket(ESP_SYNC, 0, &bodyLen, defaultTimeout);
495
-      if (rc != success || bodyLen != 2) {
496
-        break;
497
-      }
486
+      if (rc != success || bodyLen != 2) break;
498 487
     }
499 488
   }
500 489
   //DEBUG
@@ -580,14 +569,9 @@ EspUploadResult flashWriteBlock(uint16_t flashParmVal, uint16_t flashParmMask) {
580 569
   // Calculate the block checksum
581 570
   cksum = checksum(blkBuf + dataOfst, blkSize, ESP_CHECKSUM_MAGIC);
582 571
 
583
-  for (i = 0; i < 3; i++) {
584
-    if ((stat = doCommand(ESP_FLASH_DATA, blkBuf, blkBufSize, cksum, 0, blockWriteTimeout)) == success) {
572
+  for (i = 0; i < 3; i++)
573
+    if ((stat = doCommand(ESP_FLASH_DATA, blkBuf, blkBufSize, cksum, 0, blockWriteTimeout)) == success)
585 574
       break;
586
-    }
587
-  }
588
-
589
-  //printf("Upload %d\%\n", ftell(&esp_upload.uploadFile) * 100 / esp_upload.fileSize);
590
-
591 575
   return stat;
592 576
   #else
593 577
     return success;
@@ -720,8 +704,7 @@ void upload_spin() {
720 704
     esp_upload.state = upload_idle;//idle;
721 705
     break;
722 706
 
723
-  default:
724
-    break;
707
+    default: break;
725 708
   }
726 709
   #endif
727 710
 }

+ 0
- 1
Marlin/src/lcd/extui/lib/mks_ui/wifi_upload.h Bestand weergeven

@@ -52,7 +52,6 @@ typedef enum {
52 52
 } EspUploadResult;
53 53
 
54 54
 typedef struct {
55
-  //FIL  uploadFile;
56 55
   uint32_t fileSize;
57 56
 
58 57
   uint32_t uploadAddress;

Laden…
Annuleren
Opslaan