浏览代码

Cleanup before MKS changes

Scott Lahteine 5 年前
父节点
当前提交
60ab7a1ddb
共有 66 个文件被更改,包括 296 次插入320 次删除
  1. 19
    20
      Marlin/src/HAL/DUE/usb/compiler.h
  2. 1
    1
      Marlin/src/HAL/STM32/tft/tft_fsmc.cpp
  3. 5
    7
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/archim2-flash/flash_storage.cpp
  4. 1
    2
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/dl_cache.cpp
  5. 2
    2
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/grid_layout.h
  6. 2
    3
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/screen_types.cpp
  7. 4
    4
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_box.cpp
  8. 3
    3
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_ellipsis.cpp
  9. 2
    2
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bed_mesh_screen.cpp
  10. 1
    1
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/files_screen.cpp
  11. 2
    2
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/interface_settings_screen.cpp
  12. 1
    1
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/interface_sounds_screen.cpp
  13. 3
    10
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/status_screen.cpp
  14. 2
    2
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/stress_test_screen.cpp
  15. 2
    2
      Marlin/src/lcd/extui/lib/mks_ui/draw_about.cpp
  16. 2
    2
      Marlin/src/lcd/extui/lib/mks_ui/draw_about.h
  17. 2
    2
      Marlin/src/lcd/extui/lib/mks_ui/draw_acceleration_settings.h
  18. 2
    2
      Marlin/src/lcd/extui/lib/mks_ui/draw_advance_settings.h
  19. 12
    12
      Marlin/src/lcd/extui/lib/mks_ui/draw_change_speed.cpp
  20. 2
    2
      Marlin/src/lcd/extui/lib/mks_ui/draw_change_speed.h
  21. 2
    2
      Marlin/src/lcd/extui/lib/mks_ui/draw_dialog.h
  22. 2
    2
      Marlin/src/lcd/extui/lib/mks_ui/draw_eeprom_settings.h
  23. 2
    2
      Marlin/src/lcd/extui/lib/mks_ui/draw_error_message.h
  24. 10
    11
      Marlin/src/lcd/extui/lib/mks_ui/draw_extrusion.cpp
  25. 2
    2
      Marlin/src/lcd/extui/lib/mks_ui/draw_extrusion.h
  26. 14
    13
      Marlin/src/lcd/extui/lib/mks_ui/draw_fan.cpp
  27. 2
    2
      Marlin/src/lcd/extui/lib/mks_ui/draw_fan.h
  28. 0
    1
      Marlin/src/lcd/extui/lib/mks_ui/draw_home.cpp
  29. 2
    2
      Marlin/src/lcd/extui/lib/mks_ui/draw_home.h
  30. 2
    2
      Marlin/src/lcd/extui/lib/mks_ui/draw_jerk_settings.h
  31. 11
    10
      Marlin/src/lcd/extui/lib/mks_ui/draw_language.cpp
  32. 2
    2
      Marlin/src/lcd/extui/lib/mks_ui/draw_language.h
  33. 2
    2
      Marlin/src/lcd/extui/lib/mks_ui/draw_machine_para.h
  34. 2
    2
      Marlin/src/lcd/extui/lib/mks_ui/draw_machine_settings.h
  35. 8
    8
      Marlin/src/lcd/extui/lib/mks_ui/draw_manuaLevel.cpp
  36. 2
    2
      Marlin/src/lcd/extui/lib/mks_ui/draw_manuaLevel.h
  37. 2
    2
      Marlin/src/lcd/extui/lib/mks_ui/draw_max_feedrate_settings.h
  38. 2
    2
      Marlin/src/lcd/extui/lib/mks_ui/draw_motor_settings.h
  39. 10
    10
      Marlin/src/lcd/extui/lib/mks_ui/draw_move_motor.cpp
  40. 2
    2
      Marlin/src/lcd/extui/lib/mks_ui/draw_move_motor.h
  41. 2
    13
      Marlin/src/lcd/extui/lib/mks_ui/draw_number_key.cpp
  42. 2
    2
      Marlin/src/lcd/extui/lib/mks_ui/draw_number_key.h
  43. 2
    2
      Marlin/src/lcd/extui/lib/mks_ui/draw_operation.h
  44. 2
    2
      Marlin/src/lcd/extui/lib/mks_ui/draw_pause_message.h
  45. 2
    2
      Marlin/src/lcd/extui/lib/mks_ui/draw_pause_position.h
  46. 5
    8
      Marlin/src/lcd/extui/lib/mks_ui/draw_preHeat.cpp
  47. 2
    2
      Marlin/src/lcd/extui/lib/mks_ui/draw_preHeat.h
  48. 2
    2
      Marlin/src/lcd/extui/lib/mks_ui/draw_print_file.cpp
  49. 2
    2
      Marlin/src/lcd/extui/lib/mks_ui/draw_print_file.h
  50. 2
    2
      Marlin/src/lcd/extui/lib/mks_ui/draw_printing.h
  51. 5
    5
      Marlin/src/lcd/extui/lib/mks_ui/draw_ready_print.cpp
  52. 2
    2
      Marlin/src/lcd/extui/lib/mks_ui/draw_ready_print.h
  53. 2
    2
      Marlin/src/lcd/extui/lib/mks_ui/draw_set.h
  54. 2
    2
      Marlin/src/lcd/extui/lib/mks_ui/draw_step_settings.h
  55. 1
    0
      Marlin/src/lcd/extui/lib/mks_ui/draw_tmc_current_settings.cpp
  56. 2
    2
      Marlin/src/lcd/extui/lib/mks_ui/draw_tmc_current_settings.h
  57. 2
    2
      Marlin/src/lcd/extui/lib/mks_ui/draw_tmc_step_mode_settings.h
  58. 2
    2
      Marlin/src/lcd/extui/lib/mks_ui/draw_tool.cpp
  59. 2
    2
      Marlin/src/lcd/extui/lib/mks_ui/draw_tool.h
  60. 1
    1
      Marlin/src/lcd/extui/lib/mks_ui/draw_ui.h
  61. 2
    2
      Marlin/src/lcd/extui/lib/mks_ui/pic_manager.h
  62. 1
    0
      Marlin/src/lcd/extui/lib/mks_ui/printer_operation.cpp
  63. 2
    2
      Marlin/src/lcd/extui/lib/mks_ui/printer_operation.h
  64. 2
    2
      Marlin/src/lcd/extui/lib/mks_ui/tft_fsmc.h
  65. 84
    84
      Marlin/src/lcd/tft/st7796s.h
  66. 10
    10
      Marlin/src/pins/pins.h

+ 19
- 20
Marlin/src/HAL/DUE/usb/compiler.h 查看文件

173
 #   define __always_inline   __forceinline
173
 #   define __always_inline   __forceinline
174
 #elif (defined __GNUC__)
174
 #elif (defined __GNUC__)
175
 #ifdef __always_inline
175
 #ifdef __always_inline
176
-#	undef __always_inline
176
+# undef __always_inline
177
 #endif
177
 #endif
178
-#	define __always_inline   inline __attribute__((__always_inline__))
178
+# define __always_inline   inline __attribute__((__always_inline__))
179
 #elif (defined __ICCARM__)
179
 #elif (defined __ICCARM__)
180
-#	define __always_inline   _Pragma("inline=forced")
180
+# define __always_inline   _Pragma("inline=forced")
181
 #endif
181
 #endif
182
 
182
 
183
 /**
183
 /**
188
  * heuristics and not inline the function.
188
  * heuristics and not inline the function.
189
  */
189
  */
190
 #ifdef __CC_ARM
190
 #ifdef __CC_ARM
191
-#   define __no_inline   __attribute__((noinline))
191
+# define __no_inline   __attribute__((noinline))
192
 #elif (defined __GNUC__)
192
 #elif (defined __GNUC__)
193
-#	define __no_inline   __attribute__((__noinline__))
193
+# define __no_inline   __attribute__((__noinline__))
194
 #elif (defined __ICCARM__)
194
 #elif (defined __ICCARM__)
195
-#	define __no_inline   _Pragma("inline=never")
195
+# define __no_inline   _Pragma("inline=never")
196
 #endif
196
 #endif
197
 
197
 
198
 /*! \brief This macro is used to test fatal errors.
198
 /*! \brief This macro is used to test fatal errors.
211
 #  else
211
 #  else
212
 #undef TEST_SUITE_DEFINE_ASSERT_MACRO
212
 #undef TEST_SUITE_DEFINE_ASSERT_MACRO
213
 #    define Assert(expr) \
213
 #    define Assert(expr) \
214
-	{\
215
-		if (!(expr)) while (true);\
216
-	}
214
+  {\
215
+    if (!(expr)) while (true);\
216
+  }
217
 #  endif
217
 #  endif
218
 #else
218
 #else
219
 #  define Assert(expr) ((void) 0)
219
 #  define Assert(expr) ((void) 0)
1106
 /* Converts a 8 Byte array into a 32-Bit value */
1106
 /* Converts a 8 Byte array into a 32-Bit value */
1107
 static inline uint32_t convert_byte_array_to_32_bit(uint8_t *data)
1107
 static inline uint32_t convert_byte_array_to_32_bit(uint8_t *data)
1108
 {
1108
 {
1109
-	union
1110
-	{
1111
-		uint32_t u32;
1112
-		uint8_t u8[8];
1113
-	}long_addr;
1114
-	uint8_t index;
1115
-	for (index = 0; index < 4; index++)
1116
-	{
1117
-		long_addr.u8[index] = *data++;
1118
-	}
1119
-	return long_addr.u32;
1109
+  union
1110
+  {
1111
+    uint32_t u32;
1112
+    uint8_t u8[8];
1113
+  }long_addr;
1114
+  uint8_t index;
1115
+  for (index = 0; index < 4; index++) {
1116
+    long_addr.u8[index] = *data++;
1117
+  }
1118
+  return long_addr.u32;
1120
 }
1119
 }
1121
 
1120
 
1122
 /**
1121
 /**

+ 1
- 1
Marlin/src/HAL/STM32/tft/tft_fsmc.cpp 查看文件

87
 
87
 
88
   __HAL_RCC_FSMC_CLK_ENABLE();
88
   __HAL_RCC_FSMC_CLK_ENABLE();
89
 
89
 
90
-  for(uint16_t i = 0; PinMap_FSMC[i].pin != NC; i++)
90
+  for (uint16_t i = 0; PinMap_FSMC[i].pin != NC; i++)
91
     pinmap_pinout(PinMap_FSMC[i].pin, PinMap_FSMC);
91
     pinmap_pinout(PinMap_FSMC[i].pin, PinMap_FSMC);
92
   pinmap_pinout(digitalPinToPinName(TFT_CS_PIN), PinMap_FSMC_CS);
92
   pinmap_pinout(digitalPinToPinName(TFT_CS_PIN), PinMap_FSMC_CS);
93
   pinmap_pinout(digitalPinToPinName(TFT_RS_PIN), PinMap_FSMC_RS);
93
   pinmap_pinout(digitalPinToPinName(TFT_RS_PIN), PinMap_FSMC_RS);

+ 5
- 7
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/archim2-flash/flash_storage.cpp 查看文件

188
   }
188
   }
189
 
189
 
190
   void UIFlashStorage::initialize() {
190
   void UIFlashStorage::initialize() {
191
-    for(uint8_t i = 0; i < 10; i++) {
191
+    for (uint8_t i = 0; i < 10; i++) {
192
       if (check_known_device()) {
192
       if (check_known_device()) {
193
         is_present = true;
193
         is_present = true;
194
         break;
194
         break;
239
     uint16_t stride = 4 + block_size;
239
     uint16_t stride = 4 + block_size;
240
     int32_t read_offset = -1;
240
     int32_t read_offset = -1;
241
 
241
 
242
-    for(uint32_t offset = 0; offset < (data_storage_area_size - stride); offset += stride) {
242
+    for (uint32_t offset = 0; offset < (data_storage_area_size - stride); offset += stride) {
243
       uint32_t delim;
243
       uint32_t delim;
244
       spi_read_begin(offset);
244
       spi_read_begin(offset);
245
       spi_read_bulk (&delim, sizeof(delim));
245
       spi_read_bulk (&delim, sizeof(delim));
395
   uint32_t UIFlashStorage::get_media_file_start(uint8_t slot) {
395
   uint32_t UIFlashStorage::get_media_file_start(uint8_t slot) {
396
     uint32_t addr = media_storage_addr + sizeof(uint32_t) * media_storage_slots;
396
     uint32_t addr = media_storage_addr + sizeof(uint32_t) * media_storage_slots;
397
     spi_read_begin(media_storage_addr);
397
     spi_read_begin(media_storage_addr);
398
-    for(uint8_t i = 0; i < slot; i++) {
398
+    for (uint8_t i = 0; i < slot; i++)
399
       addr += spi_read_32();
399
       addr += spi_read_32();
400
-    }
401
     spi_read_end();
400
     spi_read_end();
402
     return addr;
401
     return addr;
403
   }
402
   }
442
       addr = get_media_file_start(slot);
441
       addr = get_media_file_start(slot);
443
 
442
 
444
       // Write out the file itself
443
       // Write out the file itself
445
-      for(;;) {
444
+      for (;;) {
446
         const int16_t nBytes = reader.read(buff, write_page_size);
445
         const int16_t nBytes = reader.read(buff, write_page_size);
447
         if (nBytes == -1) {
446
         if (nBytes == -1) {
448
           SERIAL_ECHOLNPGM("Failed to read from file");
447
           SERIAL_ECHOLNPGM("Failed to read from file");
450
         }
449
         }
451
 
450
 
452
         addr = write(addr, buff, nBytes);
451
         addr = write(addr, buff, nBytes);
453
-        if (nBytes != write_page_size)
454
-          break;
452
+        if (nBytes != write_page_size) break;
455
 
453
 
456
         TERN_(EXTENSIBLE_UI, ExtUI::yield());
454
         TERN_(EXTENSIBLE_UI, ExtUI::yield());
457
       }
455
       }

+ 1
- 2
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/dl_cache.cpp 查看文件

69
 
69
 
70
 void DLCache::init() {
70
 void DLCache::init() {
71
   CLCD::mem_write_32(DL_FREE_ADDR, DL_FREE_ADDR + 4);
71
   CLCD::mem_write_32(DL_FREE_ADDR, DL_FREE_ADDR + 4);
72
-  for(uint8_t slot = 0; slot < DL_CACHE_SLOTS; slot++) {
72
+  for (uint8_t slot = 0; slot < DL_CACHE_SLOTS; slot++)
73
     save_slot(slot, 0, 0, 0);
73
     save_slot(slot, 0, 0, 0);
74
-  }
75
 }
74
 }
76
 
75
 
77
 bool DLCache::has_data() {
76
 bool DLCache::has_data() {

+ 2
- 2
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/grid_layout.h 查看文件

74
 #define DRAW_LAYOUT_GRID \
74
 #define DRAW_LAYOUT_GRID \
75
   { \
75
   { \
76
     cmd.cmd(LINE_WIDTH(4)); \
76
     cmd.cmd(LINE_WIDTH(4)); \
77
-    for(int i = 1; i <= GRID_COLS; i++) { \
77
+    for (int i = 1; i <= GRID_COLS; i++) { \
78
       cmd.cmd(BEGIN(LINES)); \
78
       cmd.cmd(BEGIN(LINES)); \
79
       cmd.cmd(VERTEX2F(GRID_X(i) *16, 0             *16)); \
79
       cmd.cmd(VERTEX2F(GRID_X(i) *16, 0             *16)); \
80
       cmd.cmd(VERTEX2F(GRID_X(i) *16, FTDI::display_height *16)); \
80
       cmd.cmd(VERTEX2F(GRID_X(i) *16, FTDI::display_height *16)); \
81
     } \
81
     } \
82
-    for(int i = 1; i < GRID_ROWS; i++) { \
82
+    for (int i = 1; i < GRID_ROWS; i++) { \
83
       cmd.cmd(BEGIN(LINES)); \
83
       cmd.cmd(BEGIN(LINES)); \
84
       cmd.cmd(VERTEX2F(0                       *16, GRID_Y(i) *16)); \
84
       cmd.cmd(VERTEX2F(0                       *16, GRID_Y(i) *16)); \
85
       cmd.cmd(VERTEX2F(FTDI::display_width     *16, GRID_Y(i) *16)); \
85
       cmd.cmd(VERTEX2F(FTDI::display_width     *16, GRID_Y(i) *16)); \

+ 2
- 3
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/screen_types.cpp 查看文件

26
 /********************** VIRTUAL DISPATCH DATA TYPE  ******************************/
26
 /********************** VIRTUAL DISPATCH DATA TYPE  ******************************/
27
 
27
 
28
 uint8_t ScreenRef::lookupScreen(onRedraw_func_t onRedraw_ptr) {
28
 uint8_t ScreenRef::lookupScreen(onRedraw_func_t onRedraw_ptr) {
29
-  for(uint8_t type = 0; type < functionTableSize; type++) {
29
+  for (uint8_t type = 0; type < functionTableSize; type++) {
30
     if (GET_METHOD(type, onRedraw) == onRedraw_ptr) {
30
     if (GET_METHOD(type, onRedraw) == onRedraw_ptr) {
31
       return type;
31
       return type;
32
     }
32
     }
50
 }
50
 }
51
 
51
 
52
 void ScreenRef::initializeAll() {
52
 void ScreenRef::initializeAll() {
53
-  for(uint8_t type = 0; type < functionTableSize; type++) {
53
+  for (uint8_t type = 0; type < functionTableSize; type++)
54
     GET_METHOD(type, onStartup)();
54
     GET_METHOD(type, onStartup)();
55
-  }
56
 }
55
 }
57
 
56
 
58
 /********************** SCREEN STACK  ******************************/
57
 /********************** SCREEN STACK  ******************************/

+ 4
- 4
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_box.cpp 查看文件

34
     const char *p = str;
34
     const char *p = str;
35
     end = str;
35
     end = str;
36
     uint16_t lw = 0, result = 0;
36
     uint16_t lw = 0, result = 0;
37
-    for(;;) {
37
+    for (;;) {
38
       utf8_char_t c = get_utf8_char_and_inc(p);
38
       utf8_char_t c = get_utf8_char_and_inc(p);
39
       if (c == ' ' || c == '\n' || c == '\0') {
39
       if (c == ' ' || c == '\n' || c == '\0') {
40
         if (lw < w || end == str) {
40
         if (lw < w || end == str) {
60
     const char *line_end;
60
     const char *line_end;
61
     const uint16_t wrap_width = width;
61
     const uint16_t wrap_width = width;
62
     width = height = 0;
62
     width = height = 0;
63
-    for(;;) {
63
+    for (;;) {
64
       uint16_t line_width = find_line_break(fm, wrap_width, line_start, line_end);
64
       uint16_t line_width = find_line_break(fm, wrap_width, line_start, line_end);
65
       if (line_end == line_start) break;
65
       if (line_end == line_start) break;
66
       width  = max(width, line_width);
66
       width  = max(width, line_width);
78
     FontMetrics fm(font);
78
     FontMetrics fm(font);
79
 
79
 
80
     // Shrink the font until we find a font that fits
80
     // Shrink the font until we find a font that fits
81
-    for(;;) {
81
+    for (;;) {
82
       box_width = w;
82
       box_width = w;
83
       measure_text_box(fm, str, box_width, box_height);
83
       measure_text_box(fm, str, box_width, box_height);
84
       if (box_width <= (uint16_t)w && box_height <= (uint16_t)h) break;
84
       if (box_width <= (uint16_t)w && box_height <= (uint16_t)h) break;
91
 
91
 
92
     const char *line_start = str;
92
     const char *line_start = str;
93
     const char *line_end;
93
     const char *line_end;
94
-    for(;;) {
94
+    for (;;) {
95
       find_line_break(fm, w, line_start, line_end);
95
       find_line_break(fm, w, line_start, line_end);
96
       if (line_end == line_start) break;
96
       if (line_end == line_start) break;
97
 
97
 

+ 3
- 3
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_ellipsis.cpp 查看文件

37
     // split and still allow the ellipsis to fit.
37
     // split and still allow the ellipsis to fit.
38
     int16_t lineWidth = 0;
38
     int16_t lineWidth = 0;
39
     char *breakPoint   = str;
39
     char *breakPoint   = str;
40
-    for(char* c = str; *c; c++) {
40
+    for (char* c = str; *c; c++) {
41
       lineWidth += fm.get_char_width(*c);
41
       lineWidth += fm.get_char_width(*c);
42
-      if(lineWidth + ellipsisWidth < w)
42
+      if (lineWidth + ellipsisWidth < w)
43
         breakPoint = c;
43
         breakPoint = c;
44
     }
44
     }
45
 
45
 
46
-    if(lineWidth > w) {
46
+    if (lineWidth > w) {
47
       *breakPoint = '\0';
47
       *breakPoint = '\0';
48
       strcpy_P(breakPoint,PSTR("..."));
48
       strcpy_P(breakPoint,PSTR("..."));
49
     }
49
     }

+ 2
- 2
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bed_mesh_screen.cpp 查看文件

253
      .tag(1).button( OKAY_POS, GET_TEXT_F(MSG_BUTTON_OKAY))
253
      .tag(1).button( OKAY_POS, GET_TEXT_F(MSG_BUTTON_OKAY))
254
      .tag(0);
254
      .tag(0);
255
 
255
 
256
-  switch(screen_data.BedMeshScreen.message) {
256
+  switch (screen_data.BedMeshScreen.message) {
257
     case screen_data.BedMeshScreen.MSG_MESH_COMPLETE:   cmd.text(MESSAGE_POS, GET_TEXT_F(MSG_BED_MAPPING_DONE)); break;
257
     case screen_data.BedMeshScreen.MSG_MESH_COMPLETE:   cmd.text(MESSAGE_POS, GET_TEXT_F(MSG_BED_MAPPING_DONE)); break;
258
     case screen_data.BedMeshScreen.MSG_MESH_INCOMPLETE: cmd.text(MESSAGE_POS, GET_TEXT_F(MSG_BED_MAPPING_INCOMPLETE)); break;
258
     case screen_data.BedMeshScreen.MSG_MESH_INCOMPLETE: cmd.text(MESSAGE_POS, GET_TEXT_F(MSG_BED_MAPPING_INCOMPLETE)); break;
259
     default: break;
259
     default: break;
321
 }
321
 }
322
 
322
 
323
 void BedMeshScreen::onMeshUpdate(const int8_t x, const int8_t y, const ExtUI::probe_state_t state) {
323
 void BedMeshScreen::onMeshUpdate(const int8_t x, const int8_t y, const ExtUI::probe_state_t state) {
324
-  switch(state) {
324
+  switch (state) {
325
     case ExtUI::MESH_START:
325
     case ExtUI::MESH_START:
326
       screen_data.BedMeshScreen.count = 0;
326
       screen_data.BedMeshScreen.count = 0;
327
       screen_data.BedMeshScreen.message = screen_data.BedMeshScreen.MSG_NONE;
327
       screen_data.BedMeshScreen.message = screen_data.BedMeshScreen.MSG_NONE;

+ 1
- 1
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/files_screen.cpp 查看文件

115
   #define MARGIN_T 0
115
   #define MARGIN_T 0
116
   #define MARGIN_B 0
116
   #define MARGIN_B 0
117
   uint16_t fileIndex = screen_data.FilesScreen.cur_page * files_per_page;
117
   uint16_t fileIndex = screen_data.FilesScreen.cur_page * files_per_page;
118
-  for(uint8_t i = 0; i < files_per_page; i++, fileIndex++) {
118
+  for (uint8_t i = 0; i < files_per_page; i++, fileIndex++) {
119
     if (files.seek(fileIndex)) {
119
     if (files.seek(fileIndex)) {
120
       drawFileButton(files.filename(), getTagForLine(i), files.isDir(), false);
120
       drawFileButton(files.filename(), getTagForLine(i), files.isDir(), false);
121
     }
121
     }

+ 2
- 2
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/interface_settings_screen.cpp 查看文件

222
   eeprom.touch_transform_f    = CLCD::mem_read_32(CLCD::REG::TOUCH_TRANSFORM_F);
222
   eeprom.touch_transform_f    = CLCD::mem_read_32(CLCD::REG::TOUCH_TRANSFORM_F);
223
   eeprom.display_h_offset_adj = CLCD::mem_read_16(CLCD::REG::HOFFSET) - FTDI::Hoffset;
223
   eeprom.display_h_offset_adj = CLCD::mem_read_16(CLCD::REG::HOFFSET) - FTDI::Hoffset;
224
   eeprom.display_v_offset_adj = CLCD::mem_read_16(CLCD::REG::VOFFSET) - FTDI::Voffset;
224
   eeprom.display_v_offset_adj = CLCD::mem_read_16(CLCD::REG::VOFFSET) - FTDI::Voffset;
225
-  for(uint8_t i = 0; i < InterfaceSoundsScreen::NUM_EVENTS; i++)
225
+  for (uint8_t i = 0; i < InterfaceSoundsScreen::NUM_EVENTS; i++)
226
     eeprom.event_sounds[i] = InterfaceSoundsScreen::event_sounds[i];
226
     eeprom.event_sounds[i] = InterfaceSoundsScreen::event_sounds[i];
227
 
227
 
228
   memcpy(buff, &eeprom, sizeof(eeprom));
228
   memcpy(buff, &eeprom, sizeof(eeprom));
251
   CLCD::mem_write_32(CLCD::REG::TOUCH_TRANSFORM_F, eeprom.touch_transform_f);
251
   CLCD::mem_write_32(CLCD::REG::TOUCH_TRANSFORM_F, eeprom.touch_transform_f);
252
   CLCD::mem_write_16(CLCD::REG::HOFFSET,           eeprom.display_h_offset_adj + FTDI::Hoffset);
252
   CLCD::mem_write_16(CLCD::REG::HOFFSET,           eeprom.display_h_offset_adj + FTDI::Hoffset);
253
   CLCD::mem_write_16(CLCD::REG::VOFFSET,           eeprom.display_v_offset_adj + FTDI::Voffset);
253
   CLCD::mem_write_16(CLCD::REG::VOFFSET,           eeprom.display_v_offset_adj + FTDI::Voffset);
254
-  for(uint8_t i = 0; i < InterfaceSoundsScreen::NUM_EVENTS; i++)
254
+  for (uint8_t i = 0; i < InterfaceSoundsScreen::NUM_EVENTS; i++)
255
     InterfaceSoundsScreen::event_sounds[i] = eeprom.event_sounds[i];
255
     InterfaceSoundsScreen::event_sounds[i] = eeprom.event_sounds[i];
256
 
256
 
257
   TERN_(TOUCH_UI_DEVELOPER_MENU, StressTestScreen::startupCheck());
257
   TERN_(TOUCH_UI_DEVELOPER_MENU, StressTestScreen::startupCheck());

+ 1
- 1
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/interface_sounds_screen.cpp 查看文件

43
 }
43
 }
44
 
44
 
45
 void InterfaceSoundsScreen::setSoundSelection(event_t event, const SoundPlayer::sound_t* sound) {
45
 void InterfaceSoundsScreen::setSoundSelection(event_t event, const SoundPlayer::sound_t* sound) {
46
-  for(uint8_t i = 0; i < SoundList::n; i++)
46
+  for (uint8_t i = 0; i < SoundList::n; i++)
47
     if (SoundList::data(i) == sound)
47
     if (SoundList::data(i) == sound)
48
       event_sounds[event] = i;
48
       event_sounds[event] = i;
49
 }
49
 }

+ 3
- 10
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/status_screen.cpp 查看文件

176
     char bed_str[20];
176
     char bed_str[20];
177
     char fan_str[20];
177
     char fan_str[20];
178
 
178
 
179
-    sprintf_P(
180
-      fan_str,
181
-      PSTR("%-3d %%"),
182
-      int8_t(getActualFan_percent(FAN0))
183
-    );
179
+    sprintf_P(fan_str, PSTR("%-3d %%"), int8_t(getActualFan_percent(FAN0)));
184
 
180
 
185
     if (isHeaterIdle(BED))
181
     if (isHeaterIdle(BED))
186
       format_temp_and_idle(bed_str, getActualTemp_celsius(BED));
182
       format_temp_and_idle(bed_str, getActualTemp_celsius(BED));
193
       format_temp_and_temp(e0_str, getActualTemp_celsius(H0), getTargetTemp_celsius(H0));
189
       format_temp_and_temp(e0_str, getActualTemp_celsius(H0), getTargetTemp_celsius(H0));
194
 
190
 
195
 
191
 
196
-    #if EXTRUDERS == 2
192
+    #if HAS_MULTI_EXTRUDER
197
       if (isHeaterIdle(H1))
193
       if (isHeaterIdle(H1))
198
         format_temp_and_idle(e1_str, getActualTemp_celsius(H1));
194
         format_temp_and_idle(e1_str, getActualTemp_celsius(H1));
199
       else
195
       else
200
         format_temp_and_temp(e1_str, getActualTemp_celsius(H1), getTargetTemp_celsius(H1));
196
         format_temp_and_temp(e1_str, getActualTemp_celsius(H1), getTargetTemp_celsius(H1));
201
     #else
197
     #else
202
-      strcpy_P(
203
-        e1_str,
204
-        PSTR("-")
205
-      );
198
+      strcpy_P(e1_str, PSTR("-"));
206
     #endif
199
     #endif
207
 
200
 
208
     cmd.tag(5)
201
     cmd.tag(5)

+ 2
- 2
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/stress_test_screen.cpp 查看文件

38
 
38
 
39
 void StressTestScreen::drawDots(uint16_t x, uint16_t y, uint16_t w, uint16_t h) {
39
 void StressTestScreen::drawDots(uint16_t x, uint16_t y, uint16_t w, uint16_t h) {
40
   CommandProcessor cmd;
40
   CommandProcessor cmd;
41
-  for(uint8_t i = 0; i < 100; i++) {
41
+  for (uint8_t i = 0; i < 100; i++) {
42
     cmd.cmd(BEGIN(POINTS))
42
     cmd.cmd(BEGIN(POINTS))
43
        .cmd(POINT_SIZE(20*16))
43
        .cmd(POINT_SIZE(20*16))
44
        .cmd(COLOR_RGB(random(0xFFFFFF)))
44
        .cmd(COLOR_RGB(random(0xFFFFFF)))
111
 
111
 
112
 void StressTestScreen::iterativeLockup() {
112
 void StressTestScreen::iterativeLockup() {
113
   screen_data.StressTestScreen.message = PSTR("Test 3: Printer will restart.");
113
   screen_data.StressTestScreen.message = PSTR("Test 3: Printer will restart.");
114
-  for(;;) current_screen.onRefresh();
114
+  for (;;) current_screen.onRefresh();
115
 }
115
 }
116
 
116
 
117
 void StressTestScreen::onIdle() {
117
 void StressTestScreen::onIdle() {

+ 2
- 2
Marlin/src/lcd/extui/lib/mks_ui/draw_about.cpp 查看文件

75
 
75
 
76
   LV_IMG_DECLARE(bmp_pic);
76
   LV_IMG_DECLARE(bmp_pic);
77
 
77
 
78
-  /*Create an Image button*/
78
+  // Create an Image button
79
   buttonBack = lv_imgbtn_create(scr, NULL);
79
   buttonBack = lv_imgbtn_create(scr, NULL);
80
 
80
 
81
   #if 1
81
   #if 1
88
 
88
 
89
   lv_obj_set_pos(buttonBack, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
89
   lv_obj_set_pos(buttonBack, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
90
   lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
90
   lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
91
-  /*Create a label on the Image button*/
92
 
91
 
92
+  // Create a label on the image button
93
   label_Back = lv_label_create(buttonBack, NULL);
93
   label_Back = lv_label_create(buttonBack, NULL);
94
 
94
 
95
   if (gCfgItems.multiple_language != 0) {
95
   if (gCfgItems.multiple_language != 0) {

+ 2
- 2
Marlin/src/lcd/extui/lib/mks_ui/draw_about.h 查看文件

22
 #pragma once
22
 #pragma once
23
 
23
 
24
 #ifdef __cplusplus
24
 #ifdef __cplusplus
25
-extern "C" { /* C-declarations for C++ */
25
+  extern "C" { /* C-declarations for C++ */
26
 #endif
26
 #endif
27
 
27
 
28
 extern void lv_draw_about(void);
28
 extern void lv_draw_about(void);
30
 
30
 
31
 //extern void disp_temp_ready_print();
31
 //extern void disp_temp_ready_print();
32
 #ifdef __cplusplus
32
 #ifdef __cplusplus
33
-} /* C-declarations for C++ */
33
+  } /* C-declarations for C++ */
34
 #endif
34
 #endif

+ 2
- 2
Marlin/src/lcd/extui/lib/mks_ui/draw_acceleration_settings.h 查看文件

22
 #pragma once
22
 #pragma once
23
 
23
 
24
 #ifdef __cplusplus
24
 #ifdef __cplusplus
25
-extern "C" { /* C-declarations for C++ */
25
+  extern "C" { /* C-declarations for C++ */
26
 #endif
26
 #endif
27
 
27
 
28
 extern void lv_draw_acceleration_settings(void);
28
 extern void lv_draw_acceleration_settings(void);
29
 extern void lv_clear_acceleration_settings();
29
 extern void lv_clear_acceleration_settings();
30
 
30
 
31
 #ifdef __cplusplus
31
 #ifdef __cplusplus
32
-} /* C-declarations for C++ */
32
+  } /* C-declarations for C++ */
33
 #endif
33
 #endif

+ 2
- 2
Marlin/src/lcd/extui/lib/mks_ui/draw_advance_settings.h 查看文件

22
 #pragma once
22
 #pragma once
23
 
23
 
24
 #ifdef __cplusplus
24
 #ifdef __cplusplus
25
-extern "C" { /* C-declarations for C++ */
25
+  extern "C" { /* C-declarations for C++ */
26
 #endif
26
 #endif
27
 
27
 
28
 extern void lv_draw_advance_settings(void);
28
 extern void lv_draw_advance_settings(void);
29
 extern void lv_clear_advance_settings();
29
 extern void lv_clear_advance_settings();
30
 
30
 
31
 #ifdef __cplusplus
31
 #ifdef __cplusplus
32
-} /* C-declarations for C++ */
32
+  } /* C-declarations for C++ */
33
 #endif
33
 #endif

+ 12
- 12
Marlin/src/lcd/extui/lib/mks_ui/draw_change_speed.cpp 查看文件

73
           #if HAS_MULTI_EXTRUDER
73
           #if HAS_MULTI_EXTRUDER
74
             planner.flow_percentage[1] = planner.flow_percentage[0];
74
             planner.flow_percentage[1] = planner.flow_percentage[0];
75
             planner.refresh_e_factor(1);
75
             planner.refresh_e_factor(1);
76
-          }
76
+          #endif
77
         }
77
         }
78
         disp_print_speed();
78
         disp_print_speed();
79
       }
79
       }
98
           //planner.flow_percentage[1] = planner.flow_percentage[0];
98
           //planner.flow_percentage[1] = planner.flow_percentage[0];
99
           //planner.e_factor[1]= planner.flow_percentage[1] * 0.01;
99
           //planner.e_factor[1]= planner.flow_percentage[1] * 0.01;
100
           planner.refresh_e_factor(0);
100
           planner.refresh_e_factor(0);
101
-          if (EXTRUDERS == 2) {
101
+          #if HAS_MULTI_EXTRUDER
102
             planner.flow_percentage[1] = planner.flow_percentage[0];
102
             planner.flow_percentage[1] = planner.flow_percentage[0];
103
             planner.refresh_e_factor(1);
103
             planner.refresh_e_factor(1);
104
-          }
104
+          #endif
105
         }
105
         }
106
         disp_print_speed();
106
         disp_print_speed();
107
       }
107
       }
177
 
177
 
178
   LV_IMG_DECLARE(bmp_pic);
178
   LV_IMG_DECLARE(bmp_pic);
179
 
179
 
180
-  /*Create an Image button*/
180
+  // Create an Image button
181
   buttonAdd  = lv_imgbtn_create(scr, NULL);
181
   buttonAdd  = lv_imgbtn_create(scr, NULL);
182
   buttonDec  = lv_imgbtn_create(scr, NULL);
182
   buttonDec  = lv_imgbtn_create(scr, NULL);
183
   buttonMov  = lv_imgbtn_create(scr, NULL);
183
   buttonMov  = lv_imgbtn_create(scr, NULL);
228
   lv_obj_set_pos(buttonStep, BTN_X_PIXEL * 2 + INTERVAL_V * 3, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
228
   lv_obj_set_pos(buttonStep, BTN_X_PIXEL * 2 + INTERVAL_V * 3, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
229
   lv_obj_set_pos(buttonBack, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
229
   lv_obj_set_pos(buttonBack, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
230
 
230
 
231
-  /*Create a label on the Image button*/
231
+  // Create labels on the image buttons
232
   lv_btn_set_layout(buttonAdd, LV_LAYOUT_OFF);
232
   lv_btn_set_layout(buttonAdd, LV_LAYOUT_OFF);
233
   lv_btn_set_layout(buttonDec, LV_LAYOUT_OFF);
233
   lv_btn_set_layout(buttonDec, LV_LAYOUT_OFF);
234
   lv_btn_set_layout(buttonMov, LV_LAYOUT_OFF);
234
   lv_btn_set_layout(buttonMov, LV_LAYOUT_OFF);
236
   lv_btn_set_layout(buttonStep, LV_LAYOUT_OFF);
236
   lv_btn_set_layout(buttonStep, LV_LAYOUT_OFF);
237
   lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
237
   lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
238
 
238
 
239
-  lv_obj_t * labelAdd = lv_label_create(buttonAdd, NULL);
240
-  lv_obj_t * labelDec = lv_label_create(buttonDec, NULL);
241
-  labelMov  = lv_label_create(buttonMov, NULL);
242
-  labelExt  = lv_label_create(buttonExt, NULL);
243
-  labelStep = lv_label_create(buttonStep, NULL);
244
-  lv_obj_t * label_Back = lv_label_create(buttonBack, NULL);
239
+  lv_obj_t *labelAdd    = lv_label_create(buttonAdd, NULL);
240
+  lv_obj_t *labelDec    = lv_label_create(buttonDec, NULL);
241
+  labelMov              = lv_label_create(buttonMov, NULL);
242
+  labelExt              = lv_label_create(buttonExt, NULL);
243
+  labelStep             = lv_label_create(buttonStep, NULL);
244
+  lv_obj_t *label_Back  = lv_label_create(buttonBack, NULL);
245
 
245
 
246
   if (gCfgItems.multiple_language != 0) {
246
   if (gCfgItems.multiple_language != 0) {
247
     lv_label_set_text(labelAdd, speed_menu.add);
247
     lv_label_set_text(labelAdd, speed_menu.add);
286
 }
286
 }
287
 
287
 
288
 void disp_print_speed() {
288
 void disp_print_speed() {
289
-  char buf[30] = {0};
289
+  char buf[30] = { 0 };
290
 
290
 
291
   public_buf_l[0] = '\0';
291
   public_buf_l[0] = '\0';
292
 
292
 

+ 2
- 2
Marlin/src/lcd/extui/lib/mks_ui/draw_change_speed.h 查看文件

22
 #pragma once
22
 #pragma once
23
 
23
 
24
 #ifdef __cplusplus
24
 #ifdef __cplusplus
25
-extern "C" { /* C-declarations for C++ */
25
+  extern "C" { /* C-declarations for C++ */
26
 #endif
26
 #endif
27
 
27
 
28
 #define MIN_EXT_SPEED_PERCENT    10
28
 #define MIN_EXT_SPEED_PERCENT    10
36
 
36
 
37
 //extern void disp_temp_ready_print();
37
 //extern void disp_temp_ready_print();
38
 #ifdef __cplusplus
38
 #ifdef __cplusplus
39
-} /* C-declarations for C++ */
39
+  } /* C-declarations for C++ */
40
 #endif
40
 #endif

+ 2
- 2
Marlin/src/lcd/extui/lib/mks_ui/draw_dialog.h 查看文件

22
 #pragma once
22
 #pragma once
23
 
23
 
24
 #ifdef __cplusplus
24
 #ifdef __cplusplus
25
-extern "C" { /* C-declarations for C++ */
25
+  extern "C" { /* C-declarations for C++ */
26
 #endif
26
 #endif
27
 
27
 
28
 #define DIALOG_TYPE_STOP                             0
28
 #define DIALOG_TYPE_STOP                             0
79
 
79
 
80
 //extern void disp_temp_ready_print();
80
 //extern void disp_temp_ready_print();
81
 #ifdef __cplusplus
81
 #ifdef __cplusplus
82
-} /* C-declarations for C++ */
82
+  } /* C-declarations for C++ */
83
 #endif
83
 #endif

+ 2
- 2
Marlin/src/lcd/extui/lib/mks_ui/draw_eeprom_settings.h 查看文件

22
 #pragma once
22
 #pragma once
23
 
23
 
24
 #ifdef __cplusplus
24
 #ifdef __cplusplus
25
-extern "C" { /* C-declarations for C++ */
25
+  extern "C" { /* C-declarations for C++ */
26
 #endif
26
 #endif
27
 
27
 
28
 extern void lv_draw_eeprom_settings(void);
28
 extern void lv_draw_eeprom_settings(void);
29
 extern void lv_clear_eeprom_settings();
29
 extern void lv_clear_eeprom_settings();
30
 
30
 
31
 #ifdef __cplusplus
31
 #ifdef __cplusplus
32
-} /* C-declarations for C++ */
32
+  } /* C-declarations for C++ */
33
 #endif
33
 #endif

+ 2
- 2
Marlin/src/lcd/extui/lib/mks_ui/draw_error_message.h 查看文件

22
 #pragma once
22
 #pragma once
23
 
23
 
24
 #ifdef __cplusplus
24
 #ifdef __cplusplus
25
-extern "C" { /* C-declarations for C++ */
25
+  extern "C" { /* C-declarations for C++ */
26
 #endif
26
 #endif
27
 
27
 
28
 #ifndef PGM_P
28
 #ifndef PGM_P
34
 
34
 
35
 //extern void disp_temp_ready_print();
35
 //extern void disp_temp_ready_print();
36
 #ifdef __cplusplus
36
 #ifdef __cplusplus
37
-} /* C-declarations for C++ */
37
+  } /* C-declarations for C++ */
38
 #endif
38
 #endif

+ 10
- 11
Marlin/src/lcd/extui/lib/mks_ui/draw_extrusion.cpp 查看文件

100
             queue.inject_P(PSTR("T0"));
100
             queue.inject_P(PSTR("T0"));
101
           }
101
           }
102
         }
102
         }
103
-        else {
103
+        else
104
           uiCfg.curSprayerChoose = 0;
104
           uiCfg.curSprayerChoose = 0;
105
-        }
105
+
106
         extructAmount = 0;
106
         extructAmount = 0;
107
         disp_hotend_temp();
107
         disp_hotend_temp();
108
         disp_ext_type();
108
         disp_ext_type();
149
   }
149
   }
150
 }
150
 }
151
 
151
 
152
-
153
 void lv_draw_extrusion(void) {
152
 void lv_draw_extrusion(void) {
154
   lv_obj_t *buttonAdd, *buttonDec, *buttonBack;
153
   lv_obj_t *buttonAdd, *buttonDec, *buttonBack;
155
 
154
 
174
 
173
 
175
   LV_IMG_DECLARE(bmp_pic);
174
   LV_IMG_DECLARE(bmp_pic);
176
 
175
 
177
-  /*Create an Image button*/
176
+  // Create image buttons
178
   buttonAdd   = lv_imgbtn_create(scr, NULL);
177
   buttonAdd   = lv_imgbtn_create(scr, NULL);
179
   buttonDec   = lv_imgbtn_create(scr, NULL);
178
   buttonDec   = lv_imgbtn_create(scr, NULL);
180
   buttoType   = lv_imgbtn_create(scr, NULL);
179
   buttoType   = lv_imgbtn_create(scr, NULL);
224
   lv_obj_set_pos(buttonSpeed, BTN_X_PIXEL * 2 + INTERVAL_V * 3, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
223
   lv_obj_set_pos(buttonSpeed, BTN_X_PIXEL * 2 + INTERVAL_V * 3, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
225
   lv_obj_set_pos(buttonBack, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
224
   lv_obj_set_pos(buttonBack, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
226
 
225
 
227
-  /*Create a label on the Image button*/
226
+  // Create labels on the image buttons
228
   lv_btn_set_layout(buttonAdd, LV_LAYOUT_OFF);
227
   lv_btn_set_layout(buttonAdd, LV_LAYOUT_OFF);
229
   lv_btn_set_layout(buttonDec, LV_LAYOUT_OFF);
228
   lv_btn_set_layout(buttonDec, LV_LAYOUT_OFF);
230
   lv_btn_set_layout(buttoType, LV_LAYOUT_OFF);
229
   lv_btn_set_layout(buttoType, LV_LAYOUT_OFF);
232
   lv_btn_set_layout(buttonSpeed, LV_LAYOUT_OFF);
231
   lv_btn_set_layout(buttonSpeed, LV_LAYOUT_OFF);
233
   lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
232
   lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
234
 
233
 
235
-  lv_obj_t * labelAdd = lv_label_create(buttonAdd, NULL);
236
-  lv_obj_t * labelDec = lv_label_create(buttonDec, NULL);
237
-  labelType  = lv_label_create(buttoType, NULL);
238
-  labelStep  = lv_label_create(buttonStep, NULL);
239
-  labelSpeed = lv_label_create(buttonSpeed, NULL);
240
-  lv_obj_t * label_Back = lv_label_create(buttonBack, NULL);
234
+  lv_obj_t *labelAdd   = lv_label_create(buttonAdd, NULL);
235
+  lv_obj_t *labelDec   = lv_label_create(buttonDec, NULL);
236
+  labelType             = lv_label_create(buttoType, NULL);
237
+  labelStep             = lv_label_create(buttonStep, NULL);
238
+  labelSpeed            = lv_label_create(buttonSpeed, NULL);
239
+  lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
241
 
240
 
242
   if (gCfgItems.multiple_language != 0) {
241
   if (gCfgItems.multiple_language != 0) {
243
     lv_label_set_text(labelAdd, extrude_menu.in);
242
     lv_label_set_text(labelAdd, extrude_menu.in);

+ 2
- 2
Marlin/src/lcd/extui/lib/mks_ui/draw_extrusion.h 查看文件

22
 #pragma once
22
 #pragma once
23
 
23
 
24
 #ifdef __cplusplus
24
 #ifdef __cplusplus
25
-extern "C" { /* C-declarations for C++ */
25
+  extern "C" { /* C-declarations for C++ */
26
 #endif
26
 #endif
27
 
27
 
28
 extern void lv_draw_extrusion(void);
28
 extern void lv_draw_extrusion(void);
35
 
35
 
36
 //extern void disp_temp_ready_print();
36
 //extern void disp_temp_ready_print();
37
 #ifdef __cplusplus
37
 #ifdef __cplusplus
38
-} /* C-declarations for C++ */
38
+  } /* C-declarations for C++ */
39
 #endif
39
 #endif

+ 14
- 13
Marlin/src/lcd/extui/lib/mks_ui/draw_fan.cpp 查看文件

140
 
140
 
141
   LV_IMG_DECLARE(bmp_pic);
141
   LV_IMG_DECLARE(bmp_pic);
142
 
142
 
143
-  /*Create an Image button*/
144
-  buttonAdd = lv_imgbtn_create(scr, NULL);
145
-  buttonDec = lv_imgbtn_create(scr, NULL);
143
+  // Create an Image button
144
+  buttonAdd  = lv_imgbtn_create(scr, NULL);
145
+  buttonDec  = lv_imgbtn_create(scr, NULL);
146
   buttonHigh = lv_imgbtn_create(scr, NULL);
146
   buttonHigh = lv_imgbtn_create(scr, NULL);
147
-  buttonMid = lv_imgbtn_create(scr, NULL);
148
-  buttonOff = lv_imgbtn_create(scr, NULL);
147
+  buttonMid  = lv_imgbtn_create(scr, NULL);
148
+  buttonOff  = lv_imgbtn_create(scr, NULL);
149
   buttonBack = lv_imgbtn_create(scr, NULL);
149
   buttonBack = lv_imgbtn_create(scr, NULL);
150
 
150
 
151
   lv_obj_set_event_cb_mks(buttonAdd, event_handler, ID_F_ADD, "bmp_Add.bin", 0);
151
   lv_obj_set_event_cb_mks(buttonAdd, event_handler, ID_F_ADD, "bmp_Add.bin", 0);
154
   lv_imgbtn_set_style(buttonAdd, LV_BTN_STATE_PR, &tft_style_label_pre);
154
   lv_imgbtn_set_style(buttonAdd, LV_BTN_STATE_PR, &tft_style_label_pre);
155
   lv_imgbtn_set_style(buttonAdd, LV_BTN_STATE_REL, &tft_style_label_rel);
155
   lv_imgbtn_set_style(buttonAdd, LV_BTN_STATE_REL, &tft_style_label_rel);
156
   lv_obj_clear_protect(buttonAdd, LV_PROTECT_FOLLOW);
156
   lv_obj_clear_protect(buttonAdd, LV_PROTECT_FOLLOW);
157
+
157
   #if 1
158
   #if 1
158
     lv_obj_set_event_cb_mks(buttonDec, event_handler, ID_F_DEC, "bmp_Dec.bin", 0);
159
     lv_obj_set_event_cb_mks(buttonDec, event_handler, ID_F_DEC, "bmp_Dec.bin", 0);
159
     lv_imgbtn_set_src(buttonDec, LV_BTN_STATE_REL, &bmp_pic);
160
     lv_imgbtn_set_src(buttonDec, LV_BTN_STATE_REL, &bmp_pic);
184
     lv_imgbtn_set_src(buttonBack, LV_BTN_STATE_PR, &bmp_pic);
185
     lv_imgbtn_set_src(buttonBack, LV_BTN_STATE_PR, &bmp_pic);
185
     lv_imgbtn_set_style(buttonBack, LV_BTN_STATE_PR, &tft_style_label_pre);
186
     lv_imgbtn_set_style(buttonBack, LV_BTN_STATE_PR, &tft_style_label_pre);
186
     lv_imgbtn_set_style(buttonBack, LV_BTN_STATE_REL, &tft_style_label_rel);
187
     lv_imgbtn_set_style(buttonBack, LV_BTN_STATE_REL, &tft_style_label_rel);
188
+
187
   #endif
189
   #endif
188
 
190
 
189
   lv_obj_set_pos(buttonAdd, INTERVAL_V, titleHeight);
191
   lv_obj_set_pos(buttonAdd, INTERVAL_V, titleHeight);
193
   lv_obj_set_pos(buttonOff, BTN_X_PIXEL * 2 + INTERVAL_V * 3, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
195
   lv_obj_set_pos(buttonOff, BTN_X_PIXEL * 2 + INTERVAL_V * 3, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
194
   lv_obj_set_pos(buttonBack, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
196
   lv_obj_set_pos(buttonBack, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
195
 
197
 
196
-  /*Create a label on the Image button*/
198
+  // Create labels on the image buttons
197
   lv_btn_set_layout(buttonAdd, LV_LAYOUT_OFF);
199
   lv_btn_set_layout(buttonAdd, LV_LAYOUT_OFF);
198
   lv_btn_set_layout(buttonDec, LV_LAYOUT_OFF);
200
   lv_btn_set_layout(buttonDec, LV_LAYOUT_OFF);
199
   lv_btn_set_layout(buttonHigh, LV_LAYOUT_OFF);
201
   lv_btn_set_layout(buttonHigh, LV_LAYOUT_OFF);
201
   lv_btn_set_layout(buttonOff, LV_LAYOUT_OFF);
203
   lv_btn_set_layout(buttonOff, LV_LAYOUT_OFF);
202
   lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
204
   lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
203
 
205
 
204
-  lv_obj_t * labelAdd = lv_label_create(buttonAdd, NULL);
205
-  lv_obj_t * labelDec = lv_label_create(buttonDec, NULL);
206
-  lv_obj_t * labelHigh = lv_label_create(buttonHigh, NULL);
207
-  lv_obj_t * labelMid = lv_label_create(buttonMid, NULL);
208
-  lv_obj_t * labelOff = lv_label_create(buttonOff, NULL);
209
-  lv_obj_t * label_Back = lv_label_create(buttonBack, NULL);
210
-
206
+  lv_obj_t *labelAdd = lv_label_create(buttonAdd, NULL);
207
+  lv_obj_t *labelDec = lv_label_create(buttonDec, NULL);
208
+  lv_obj_t *labelHigh = lv_label_create(buttonHigh, NULL);
209
+  lv_obj_t *labelMid = lv_label_create(buttonMid, NULL);
210
+  lv_obj_t *labelOff = lv_label_create(buttonOff, NULL);
211
+  lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
211
 
212
 
212
   if (gCfgItems.multiple_language != 0) {
213
   if (gCfgItems.multiple_language != 0) {
213
     lv_label_set_text(labelAdd, fan_menu.add);
214
     lv_label_set_text(labelAdd, fan_menu.add);

+ 2
- 2
Marlin/src/lcd/extui/lib/mks_ui/draw_fan.h 查看文件

22
 #pragma once
22
 #pragma once
23
 
23
 
24
 #ifdef __cplusplus
24
 #ifdef __cplusplus
25
-extern "C" { /* C-declarations for C++ */
25
+  extern "C" { /* C-declarations for C++ */
26
 #endif
26
 #endif
27
 
27
 
28
 extern void lv_draw_fan(void);
28
 extern void lv_draw_fan(void);
31
 
31
 
32
 //extern void disp_temp_ready_print();
32
 //extern void disp_temp_ready_print();
33
 #ifdef __cplusplus
33
 #ifdef __cplusplus
34
-} /* C-declarations for C++ */
34
+  } /* C-declarations for C++ */
35
 #endif
35
 #endif

+ 0
- 1
Marlin/src/lcd/extui/lib/mks_ui/draw_home.cpp 查看文件

96
         lv_draw_tool();
96
         lv_draw_tool();
97
       }
97
       }
98
       break;
98
       break;
99
-
100
   }
99
   }
101
 }
100
 }
102
 
101
 

+ 2
- 2
Marlin/src/lcd/extui/lib/mks_ui/draw_home.h 查看文件

22
 #pragma once
22
 #pragma once
23
 
23
 
24
 #ifdef __cplusplus
24
 #ifdef __cplusplus
25
-extern "C" { /* C-declarations for C++ */
25
+  extern "C" { /* C-declarations for C++ */
26
 #endif
26
 #endif
27
 
27
 
28
 extern void lv_draw_home(void);
28
 extern void lv_draw_home(void);
30
 
30
 
31
 //extern void disp_temp_ready_print();
31
 //extern void disp_temp_ready_print();
32
 #ifdef __cplusplus
32
 #ifdef __cplusplus
33
-} /* C-declarations for C++ */
33
+  } /* C-declarations for C++ */
34
 #endif
34
 #endif

+ 2
- 2
Marlin/src/lcd/extui/lib/mks_ui/draw_jerk_settings.h 查看文件

22
 #pragma once
22
 #pragma once
23
 
23
 
24
 #ifdef __cplusplus
24
 #ifdef __cplusplus
25
-extern "C" { /* C-declarations for C++ */
25
+  extern "C" { /* C-declarations for C++ */
26
 #endif
26
 #endif
27
 
27
 
28
 extern void lv_draw_jerk_settings(void);
28
 extern void lv_draw_jerk_settings(void);
29
 extern void lv_clear_jerk_settings();
29
 extern void lv_clear_jerk_settings();
30
 
30
 
31
 #ifdef __cplusplus
31
 #ifdef __cplusplus
32
-} /* C-declarations for C++ */
32
+  } /* C-declarations for C++ */
33
 #endif
33
 #endif

+ 11
- 10
Marlin/src/lcd/extui/lib/mks_ui/draw_language.cpp 查看文件

246
 
246
 
247
   LV_IMG_DECLARE(bmp_pic);
247
   LV_IMG_DECLARE(bmp_pic);
248
 
248
 
249
-  /*Create an Image button*/
249
+  // Create image buttons
250
   buttonCN   = lv_imgbtn_create(scr, NULL);
250
   buttonCN   = lv_imgbtn_create(scr, NULL);
251
   buttonT_CN = lv_imgbtn_create(scr, NULL);
251
   buttonT_CN = lv_imgbtn_create(scr, NULL);
252
   buttonEN   = lv_imgbtn_create(scr, NULL);
252
   buttonEN   = lv_imgbtn_create(scr, NULL);
304
     lv_imgbtn_set_src(buttonBack, LV_BTN_STATE_PR, &bmp_pic);
304
     lv_imgbtn_set_src(buttonBack, LV_BTN_STATE_PR, &bmp_pic);
305
     lv_imgbtn_set_style(buttonBack, LV_BTN_STATE_PR, &tft_style_label_pre);
305
     lv_imgbtn_set_style(buttonBack, LV_BTN_STATE_PR, &tft_style_label_pre);
306
     lv_imgbtn_set_style(buttonBack, LV_BTN_STATE_REL, &tft_style_label_rel);
306
     lv_imgbtn_set_style(buttonBack, LV_BTN_STATE_REL, &tft_style_label_rel);
307
+
307
   #endif // if 1
308
   #endif // if 1
308
 
309
 
309
   lv_obj_set_pos(buttonCN, INTERVAL_V, titleHeight);
310
   lv_obj_set_pos(buttonCN, INTERVAL_V, titleHeight);
315
   lv_obj_set_pos(buttonIT, BTN_X_PIXEL * 2 + INTERVAL_V * 3, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
316
   lv_obj_set_pos(buttonIT, BTN_X_PIXEL * 2 + INTERVAL_V * 3, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
316
   lv_obj_set_pos(buttonBack, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
317
   lv_obj_set_pos(buttonBack, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
317
 
318
 
318
-  /*Create a label on the Image button*/
319
+  // Create labels on the image buttons
319
   lv_btn_set_layout(buttonCN, LV_LAYOUT_OFF);
320
   lv_btn_set_layout(buttonCN, LV_LAYOUT_OFF);
320
   lv_btn_set_layout(buttonT_CN, LV_LAYOUT_OFF);
321
   lv_btn_set_layout(buttonT_CN, LV_LAYOUT_OFF);
321
   lv_btn_set_layout(buttonEN, LV_LAYOUT_OFF);
322
   lv_btn_set_layout(buttonEN, LV_LAYOUT_OFF);
325
   lv_btn_set_layout(buttonIT, LV_LAYOUT_OFF);
326
   lv_btn_set_layout(buttonIT, LV_LAYOUT_OFF);
326
   lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
327
   lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
327
 
328
 
328
-  lv_obj_t * label_CN   = lv_label_create(buttonCN, NULL);
329
-  lv_obj_t * label_T_CN = lv_label_create(buttonT_CN, NULL);
330
-  lv_obj_t * label_EN   = lv_label_create(buttonEN, NULL);
331
-  lv_obj_t * label_RU   = lv_label_create(buttonRU, NULL);
332
-  lv_obj_t * label_ES   = lv_label_create(buttonES, NULL);
333
-  lv_obj_t * label_FR   = lv_label_create(buttonFR, NULL);
334
-  lv_obj_t * label_IT   = lv_label_create(buttonIT, NULL);
335
-  lv_obj_t * label_Back = lv_label_create(buttonBack, NULL);
329
+  lv_obj_t *label_CN   = lv_label_create(buttonCN, NULL);
330
+  lv_obj_t *label_T_CN = lv_label_create(buttonT_CN, NULL);
331
+  lv_obj_t *label_EN   = lv_label_create(buttonEN, NULL);
332
+  lv_obj_t *label_RU   = lv_label_create(buttonRU, NULL);
333
+  lv_obj_t *label_ES   = lv_label_create(buttonES, NULL);
334
+  lv_obj_t *label_FR   = lv_label_create(buttonFR, NULL);
335
+  lv_obj_t *label_IT   = lv_label_create(buttonIT, NULL);
336
+  lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
336
 
337
 
337
   disp_language(gCfgItems.language, SELECTED);
338
   disp_language(gCfgItems.language, SELECTED);
338
 
339
 

+ 2
- 2
Marlin/src/lcd/extui/lib/mks_ui/draw_language.h 查看文件

22
 #pragma once
22
 #pragma once
23
 
23
 
24
 #ifdef __cplusplus
24
 #ifdef __cplusplus
25
-extern "C" { /* C-declarations for C++ */
25
+  extern "C" { /* C-declarations for C++ */
26
 #endif
26
 #endif
27
 
27
 
28
 extern void lv_draw_language(void);
28
 extern void lv_draw_language(void);
30
 
30
 
31
 //extern void disp_temp_ready_print();
31
 //extern void disp_temp_ready_print();
32
 #ifdef __cplusplus
32
 #ifdef __cplusplus
33
-} /* C-declarations for C++ */
33
+  } /* C-declarations for C++ */
34
 #endif
34
 #endif

+ 2
- 2
Marlin/src/lcd/extui/lib/mks_ui/draw_machine_para.h 查看文件

22
 #pragma once
22
 #pragma once
23
 
23
 
24
 #ifdef __cplusplus
24
 #ifdef __cplusplus
25
-extern "C" { /* C-declarations for C++ */
25
+  extern "C" { /* C-declarations for C++ */
26
 #endif
26
 #endif
27
 
27
 
28
 extern void lv_draw_machine_para(void);
28
 extern void lv_draw_machine_para(void);
29
 extern void lv_clear_machine_para();
29
 extern void lv_clear_machine_para();
30
 
30
 
31
 #ifdef __cplusplus
31
 #ifdef __cplusplus
32
-} /* C-declarations for C++ */
32
+  } /* C-declarations for C++ */
33
 #endif
33
 #endif

+ 2
- 2
Marlin/src/lcd/extui/lib/mks_ui/draw_machine_settings.h 查看文件

22
 #pragma once
22
 #pragma once
23
 
23
 
24
 #ifdef __cplusplus
24
 #ifdef __cplusplus
25
-extern "C" { /* C-declarations for C++ */
25
+  extern "C" { /* C-declarations for C++ */
26
 #endif
26
 #endif
27
 
27
 
28
 extern void lv_draw_machine_settings(void);
28
 extern void lv_draw_machine_settings(void);
29
 extern void lv_clear_machine_settings();
29
 extern void lv_clear_machine_settings();
30
 
30
 
31
 #ifdef __cplusplus
31
 #ifdef __cplusplus
32
-} /* C-declarations for C++ */
32
+  } /* C-declarations for C++ */
33
 #endif
33
 #endif

+ 8
- 8
Marlin/src/lcd/extui/lib/mks_ui/draw_manuaLevel.cpp 查看文件

187
 
187
 
188
   LV_IMG_DECLARE(bmp_pic);
188
   LV_IMG_DECLARE(bmp_pic);
189
 
189
 
190
-  /*Create an Image button*/
190
+  // Create an Image button
191
   buttonPoint1 = lv_imgbtn_create(scr, NULL);
191
   buttonPoint1 = lv_imgbtn_create(scr, NULL);
192
   buttonPoint2 = lv_imgbtn_create(scr, NULL);
192
   buttonPoint2 = lv_imgbtn_create(scr, NULL);
193
   buttonPoint3 = lv_imgbtn_create(scr, NULL);
193
   buttonPoint3 = lv_imgbtn_create(scr, NULL);
240
   lv_obj_set_pos(buttonPoint5, INTERVAL_V, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
240
   lv_obj_set_pos(buttonPoint5, INTERVAL_V, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
241
   lv_obj_set_pos(buttonBack, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
241
   lv_obj_set_pos(buttonBack, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
242
 
242
 
243
-  /*Create a label on the Image button*/
243
+  // Create labels on the image buttons
244
   lv_btn_set_layout(buttonPoint1, LV_LAYOUT_OFF);
244
   lv_btn_set_layout(buttonPoint1, LV_LAYOUT_OFF);
245
   lv_btn_set_layout(buttonPoint2, LV_LAYOUT_OFF);
245
   lv_btn_set_layout(buttonPoint2, LV_LAYOUT_OFF);
246
   lv_btn_set_layout(buttonPoint3, LV_LAYOUT_OFF);
246
   lv_btn_set_layout(buttonPoint3, LV_LAYOUT_OFF);
248
   lv_btn_set_layout(buttonPoint5, LV_LAYOUT_OFF);
248
   lv_btn_set_layout(buttonPoint5, LV_LAYOUT_OFF);
249
   lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
249
   lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
250
 
250
 
251
-  lv_obj_t * label_Point1 = lv_label_create(buttonPoint1, NULL);
252
-  lv_obj_t * label_Point2 = lv_label_create(buttonPoint2, NULL);
253
-  lv_obj_t * label_Point3 = lv_label_create(buttonPoint3, NULL);
254
-  lv_obj_t * label_Point4 = lv_label_create(buttonPoint4, NULL);
255
-  lv_obj_t * label_Point5 = lv_label_create(buttonPoint5, NULL);
256
-  lv_obj_t * label_Back   = lv_label_create(buttonBack, NULL);
251
+  lv_obj_t *label_Point1 = lv_label_create(buttonPoint1, NULL);
252
+  lv_obj_t *label_Point2 = lv_label_create(buttonPoint2, NULL);
253
+  lv_obj_t *label_Point3 = lv_label_create(buttonPoint3, NULL);
254
+  lv_obj_t *label_Point4 = lv_label_create(buttonPoint4, NULL);
255
+  lv_obj_t *label_Point5 = lv_label_create(buttonPoint5, NULL);
256
+  lv_obj_t *label_Back   = lv_label_create(buttonBack, NULL);
257
 
257
 
258
   if (gCfgItems.multiple_language != 0) {
258
   if (gCfgItems.multiple_language != 0) {
259
     lv_label_set_text(label_Point1, leveling_menu.position1);
259
     lv_label_set_text(label_Point1, leveling_menu.position1);

+ 2
- 2
Marlin/src/lcd/extui/lib/mks_ui/draw_manuaLevel.h 查看文件

22
 #pragma once
22
 #pragma once
23
 
23
 
24
 #ifdef __cplusplus
24
 #ifdef __cplusplus
25
-extern "C" { /* C-declarations for C++ */
25
+  extern "C" { /* C-declarations for C++ */
26
 #endif
26
 #endif
27
 
27
 
28
 extern void lv_draw_manualLevel(void);
28
 extern void lv_draw_manualLevel(void);
30
 
30
 
31
 //extern void disp_temp_ready_print();
31
 //extern void disp_temp_ready_print();
32
 #ifdef __cplusplus
32
 #ifdef __cplusplus
33
-} /* C-declarations for C++ */
33
+  } /* C-declarations for C++ */
34
 #endif
34
 #endif

+ 2
- 2
Marlin/src/lcd/extui/lib/mks_ui/draw_max_feedrate_settings.h 查看文件

22
 #pragma once
22
 #pragma once
23
 
23
 
24
 #ifdef __cplusplus
24
 #ifdef __cplusplus
25
-extern "C" { /* C-declarations for C++ */
25
+  extern "C" { /* C-declarations for C++ */
26
 #endif
26
 #endif
27
 
27
 
28
 extern void lv_draw_max_feedrate_settings(void);
28
 extern void lv_draw_max_feedrate_settings(void);
29
 extern void lv_clear_max_feedrate_settings();
29
 extern void lv_clear_max_feedrate_settings();
30
 
30
 
31
 #ifdef __cplusplus
31
 #ifdef __cplusplus
32
-} /* C-declarations for C++ */
32
+  } /* C-declarations for C++ */
33
 #endif
33
 #endif

+ 2
- 2
Marlin/src/lcd/extui/lib/mks_ui/draw_motor_settings.h 查看文件

22
 #pragma once
22
 #pragma once
23
 
23
 
24
 #ifdef __cplusplus
24
 #ifdef __cplusplus
25
-extern "C" { /* C-declarations for C++ */
25
+  extern "C" { /* C-declarations for C++ */
26
 #endif
26
 #endif
27
 
27
 
28
 extern void lv_draw_motor_settings(void);
28
 extern void lv_draw_motor_settings(void);
29
 extern void lv_clear_motor_settings();
29
 extern void lv_clear_motor_settings();
30
 
30
 
31
 #ifdef __cplusplus
31
 #ifdef __cplusplus
32
-} /* C-declarations for C++ */
32
+  } /* C-declarations for C++ */
33
 #endif
33
 #endif

+ 10
- 10
Marlin/src/lcd/extui/lib/mks_ui/draw_move_motor.cpp 查看文件

34
 
34
 
35
 static lv_obj_t * scr;
35
 static lv_obj_t * scr;
36
 
36
 
37
-static lv_obj_t * labelV, *buttonV;
37
+static lv_obj_t *labelV, *buttonV;
38
 
38
 
39
 #define ID_M_X_P    1
39
 #define ID_M_X_P    1
40
 #define ID_M_X_N    2
40
 #define ID_M_X_N    2
181
 
181
 
182
   LV_IMG_DECLARE(bmp_pic);
182
   LV_IMG_DECLARE(bmp_pic);
183
 
183
 
184
-  /*Create an Image button*/
184
+  // Create an Image button
185
   buttonXI   = lv_imgbtn_create(scr, NULL);
185
   buttonXI   = lv_imgbtn_create(scr, NULL);
186
   buttonXD   = lv_imgbtn_create(scr, NULL);
186
   buttonXD   = lv_imgbtn_create(scr, NULL);
187
   buttonYI   = lv_imgbtn_create(scr, NULL);
187
   buttonYI   = lv_imgbtn_create(scr, NULL);
249
   lv_obj_set_pos(buttonZD, BTN_X_PIXEL * 2 + INTERVAL_V * 3, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
249
   lv_obj_set_pos(buttonZD, BTN_X_PIXEL * 2 + INTERVAL_V * 3, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
250
   lv_obj_set_pos(buttonBack, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
250
   lv_obj_set_pos(buttonBack, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
251
 
251
 
252
-  /*Create a label on the Image button*/
252
+  // Create labels on the image buttons
253
   lv_btn_set_layout(buttonXI, LV_LAYOUT_OFF);
253
   lv_btn_set_layout(buttonXI, LV_LAYOUT_OFF);
254
   lv_btn_set_layout(buttonXD, LV_LAYOUT_OFF);
254
   lv_btn_set_layout(buttonXD, LV_LAYOUT_OFF);
255
   lv_btn_set_layout(buttonYI, LV_LAYOUT_OFF);
255
   lv_btn_set_layout(buttonYI, LV_LAYOUT_OFF);
259
   lv_btn_set_layout(buttonV, LV_LAYOUT_OFF);
259
   lv_btn_set_layout(buttonV, LV_LAYOUT_OFF);
260
   lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
260
   lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
261
 
261
 
262
-  lv_obj_t * labelXI = lv_label_create(buttonXI, NULL);
263
-  lv_obj_t * labelXD = lv_label_create(buttonXD, NULL);
264
-  lv_obj_t * labelYI = lv_label_create(buttonYI, NULL);
265
-  lv_obj_t * labelYD = lv_label_create(buttonYD, NULL);
266
-  lv_obj_t * labelZI = lv_label_create(buttonZI, NULL);
267
-  lv_obj_t * labelZD = lv_label_create(buttonZD, NULL);
262
+  lv_obj_t *labelXI = lv_label_create(buttonXI, NULL);
263
+  lv_obj_t *labelXD = lv_label_create(buttonXD, NULL);
264
+  lv_obj_t *labelYI = lv_label_create(buttonYI, NULL);
265
+  lv_obj_t *labelYD = lv_label_create(buttonYD, NULL);
266
+  lv_obj_t *labelZI = lv_label_create(buttonZI, NULL);
267
+  lv_obj_t *labelZD = lv_label_create(buttonZD, NULL);
268
   labelV = lv_label_create(buttonV, NULL);
268
   labelV = lv_label_create(buttonV, NULL);
269
-  lv_obj_t * label_Back = lv_label_create(buttonBack, NULL);
269
+  lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
270
 
270
 
271
   if (gCfgItems.multiple_language != 0) {
271
   if (gCfgItems.multiple_language != 0) {
272
     lv_label_set_text(labelXI, move_menu.x_add);
272
     lv_label_set_text(labelXI, move_menu.x_add);

+ 2
- 2
Marlin/src/lcd/extui/lib/mks_ui/draw_move_motor.h 查看文件

22
 #pragma once
22
 #pragma once
23
 
23
 
24
 #ifdef __cplusplus
24
 #ifdef __cplusplus
25
-extern "C" { /* C-declarations for C++ */
25
+  extern "C" { /* C-declarations for C++ */
26
 #endif
26
 #endif
27
 
27
 
28
 extern void lv_draw_move_motor(void);
28
 extern void lv_draw_move_motor(void);
31
 
31
 
32
 //extern void disp_temp_ready_print();
32
 //extern void disp_temp_ready_print();
33
 #ifdef __cplusplus
33
 #ifdef __cplusplus
34
-} /* C-declarations for C++ */
34
+  } /* C-declarations for C++ */
35
 #endif
35
 #endif

+ 2
- 13
Marlin/src/lcd/extui/lib/mks_ui/draw_number_key.cpp 查看文件

34
 #include "../../../../MarlinCore.h"
34
 #include "../../../../MarlinCore.h"
35
 #include "../../../../module/temperature.h"
35
 #include "../../../../module/temperature.h"
36
 #include "../../../../gcode/queue.h"
36
 #include "../../../../gcode/queue.h"
37
+
37
 #if ENABLED(POWER_LOSS_RECOVERY)
38
 #if ENABLED(POWER_LOSS_RECOVERY)
38
-  #include "../../../../../feature/powerloss.h"
39
+  #include "../../../../feature/powerloss.h"
39
 #endif
40
 #endif
40
 
41
 
41
 #include "../../../../gcode/gcode.h"
42
 #include "../../../../gcode/gcode.h"
253
   switch (value) {
254
   switch (value) {
254
     case PrintAcceleration:
255
     case PrintAcceleration:
255
       planner.settings.acceleration = atof(key_value);
256
       planner.settings.acceleration = atof(key_value);
256
-
257
       break;
257
       break;
258
     case RetractAcceleration:
258
     case RetractAcceleration:
259
       planner.settings.retract_acceleration = atof(key_value);
259
       planner.settings.retract_acceleration = atof(key_value);
260
-
261
       break;
260
       break;
262
     case TravelAcceleration:
261
     case TravelAcceleration:
263
       planner.settings.travel_acceleration = atof(key_value);
262
       planner.settings.travel_acceleration = atof(key_value);
264
-
265
       break;
263
       break;
266
     case XAcceleration:
264
     case XAcceleration:
267
       planner.settings.max_acceleration_mm_per_s2[X_AXIS] = atof(key_value);
265
       planner.settings.max_acceleration_mm_per_s2[X_AXIS] = atof(key_value);
293
     case E1MaxFeedRate:
291
     case E1MaxFeedRate:
294
       planner.settings.max_feedrate_mm_s[E_AXIS_N(1)] = atof(key_value);
292
       planner.settings.max_feedrate_mm_s[E_AXIS_N(1)] = atof(key_value);
295
       break;
293
       break;
296
-
297
     case XJerk:
294
     case XJerk:
298
       #if HAS_CLASSIC_JERK
295
       #if HAS_CLASSIC_JERK
299
         planner.max_jerk[X_AXIS] = atof(key_value);
296
         planner.max_jerk[X_AXIS] = atof(key_value);
314
         planner.max_jerk[E_AXIS] = atof(key_value);
311
         planner.max_jerk[E_AXIS] = atof(key_value);
315
       #endif
312
       #endif
316
       break;
313
       break;
317
-
318
     case Xstep:
314
     case Xstep:
319
       planner.settings.axis_steps_per_mm[X_AXIS] = atof(key_value);
315
       planner.settings.axis_steps_per_mm[X_AXIS] = atof(key_value);
320
       break;
316
       break;
330
     case E1step:
326
     case E1step:
331
       planner.settings.axis_steps_per_mm[E_AXIS_N(1)] = atof(key_value);
327
       planner.settings.axis_steps_per_mm[E_AXIS_N(1)] = atof(key_value);
332
       break;
328
       break;
333
-
334
     case Xcurrent:
329
     case Xcurrent:
335
       #if AXIS_IS_TMC(X)
330
       #if AXIS_IS_TMC(X)
336
         current_mA = atoi(key_value);
331
         current_mA = atoi(key_value);
337
         stepperX.rms_current(current_mA);
332
         stepperX.rms_current(current_mA);
338
       #endif
333
       #endif
339
       break;
334
       break;
340
-
341
     case Ycurrent:
335
     case Ycurrent:
342
       #if AXIS_IS_TMC(Y)
336
       #if AXIS_IS_TMC(Y)
343
         current_mA = atoi(key_value);
337
         current_mA = atoi(key_value);
344
         stepperY.rms_current(current_mA);
338
         stepperY.rms_current(current_mA);
345
       #endif
339
       #endif
346
       break;
340
       break;
347
-
348
     case Zcurrent:
341
     case Zcurrent:
349
       #if AXIS_IS_TMC(Z)
342
       #if AXIS_IS_TMC(Z)
350
         current_mA = atoi(key_value);
343
         current_mA = atoi(key_value);
351
         stepperZ.rms_current(current_mA);
344
         stepperZ.rms_current(current_mA);
352
       #endif
345
       #endif
353
       break;
346
       break;
354
-
355
     case E0current:
347
     case E0current:
356
       #if AXIS_IS_TMC(E0)
348
       #if AXIS_IS_TMC(E0)
357
         current_mA = atoi(key_value);
349
         current_mA = atoi(key_value);
358
         stepperE0.rms_current(current_mA);
350
         stepperE0.rms_current(current_mA);
359
       #endif
351
       #endif
360
       break;
352
       break;
361
-
362
     case E1current:
353
     case E1current:
363
       #if AXIS_IS_TMC(E1)
354
       #if AXIS_IS_TMC(E1)
364
         current_mA = atoi(key_value);
355
         current_mA = atoi(key_value);
365
         stepperE1.rms_current(current_mA);
356
         stepperE1.rms_current(current_mA);
366
       #endif
357
       #endif
367
       break;
358
       break;
368
-
369
-      break;
370
     case pause_pos_x:
359
     case pause_pos_x:
371
       gCfgItems.pausePosX = atof(key_value);
360
       gCfgItems.pausePosX = atof(key_value);
372
       update_spi_flash();
361
       update_spi_flash();

+ 2
- 2
Marlin/src/lcd/extui/lib/mks_ui/draw_number_key.h 查看文件

22
 #pragma once
22
 #pragma once
23
 
23
 
24
 #ifdef __cplusplus
24
 #ifdef __cplusplus
25
-extern "C" { /* C-declarations for C++ */
25
+  extern "C" { /* C-declarations for C++ */
26
 #endif
26
 #endif
27
 
27
 
28
 extern void lv_draw_number_key(void);
28
 extern void lv_draw_number_key(void);
29
 extern void lv_clear_number_key();
29
 extern void lv_clear_number_key();
30
 
30
 
31
 #ifdef __cplusplus
31
 #ifdef __cplusplus
32
-} /* C-declarations for C++ */
32
+  } /* C-declarations for C++ */
33
 #endif
33
 #endif

+ 2
- 2
Marlin/src/lcd/extui/lib/mks_ui/draw_operation.h 查看文件

22
 #pragma once
22
 #pragma once
23
 
23
 
24
 #ifdef __cplusplus
24
 #ifdef __cplusplus
25
-extern "C" { /* C-declarations for C++ */
25
+  extern "C" { /* C-declarations for C++ */
26
 #endif
26
 #endif
27
 
27
 
28
 extern void lv_draw_operation(void);
28
 extern void lv_draw_operation(void);
30
 
30
 
31
 //extern void disp_temp_ready_print();
31
 //extern void disp_temp_ready_print();
32
 #ifdef __cplusplus
32
 #ifdef __cplusplus
33
-} /* C-declarations for C++ */
33
+  } /* C-declarations for C++ */
34
 #endif
34
 #endif

+ 2
- 2
Marlin/src/lcd/extui/lib/mks_ui/draw_pause_message.h 查看文件

22
 #pragma once
22
 #pragma once
23
 
23
 
24
 #ifdef __cplusplus
24
 #ifdef __cplusplus
25
-extern "C" { /* C-declarations for C++ */
25
+  extern "C" { /* C-declarations for C++ */
26
 #endif
26
 #endif
27
 
27
 
28
 extern void lv_draw_pause_message(const PauseMessage msg);
28
 extern void lv_draw_pause_message(const PauseMessage msg);
29
 
29
 
30
 //extern void disp_temp_ready_print();
30
 //extern void disp_temp_ready_print();
31
 #ifdef __cplusplus
31
 #ifdef __cplusplus
32
-} /* C-declarations for C++ */
32
+  } /* C-declarations for C++ */
33
 #endif
33
 #endif

+ 2
- 2
Marlin/src/lcd/extui/lib/mks_ui/draw_pause_position.h 查看文件

22
 #pragma once
22
 #pragma once
23
 
23
 
24
 #ifdef __cplusplus
24
 #ifdef __cplusplus
25
-extern "C" { /* C-declarations for C++ */
25
+  extern "C" { /* C-declarations for C++ */
26
 #endif
26
 #endif
27
 
27
 
28
 extern void lv_draw_pause_position(void);
28
 extern void lv_draw_pause_position(void);
29
 extern void lv_clear_pause_position();
29
 extern void lv_clear_pause_position();
30
 
30
 
31
 #ifdef __cplusplus
31
 #ifdef __cplusplus
32
-} /* C-declarations for C++ */
32
+  } /* C-declarations for C++ */
33
 #endif
33
 #endif

+ 5
- 8
Marlin/src/lcd/extui/lib/mks_ui/draw_preHeat.cpp 查看文件

267
   lv_obj_set_pos(buttonOff, BTN_X_PIXEL * 2 + INTERVAL_V * 3, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
267
   lv_obj_set_pos(buttonOff, BTN_X_PIXEL * 2 + INTERVAL_V * 3, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
268
   lv_obj_set_pos(buttonBack, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
268
   lv_obj_set_pos(buttonBack, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
269
 
269
 
270
-  /*Create a label on the Image button*/
270
+  // Create labels on the image buttons
271
   lv_btn_set_layout(buttonAdd, LV_LAYOUT_OFF);
271
   lv_btn_set_layout(buttonAdd, LV_LAYOUT_OFF);
272
   lv_btn_set_layout(buttonDec, LV_LAYOUT_OFF);
272
   lv_btn_set_layout(buttonDec, LV_LAYOUT_OFF);
273
   lv_btn_set_layout(buttoType, LV_LAYOUT_OFF);
273
   lv_btn_set_layout(buttoType, LV_LAYOUT_OFF);
275
   lv_btn_set_layout(buttonOff, LV_LAYOUT_OFF);
275
   lv_btn_set_layout(buttonOff, LV_LAYOUT_OFF);
276
   lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
276
   lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
277
 
277
 
278
-  lv_obj_t * labelAdd = lv_label_create(buttonAdd, NULL);
279
-  lv_obj_t * labelDec = lv_label_create(buttonDec, NULL);
278
+  lv_obj_t *labelAdd = lv_label_create(buttonAdd, NULL);
279
+  lv_obj_t *labelDec = lv_label_create(buttonDec, NULL);
280
   labelType = lv_label_create(buttoType, NULL);
280
   labelType = lv_label_create(buttoType, NULL);
281
   labelStep = lv_label_create(buttonStep, NULL);
281
   labelStep = lv_label_create(buttonStep, NULL);
282
-  lv_obj_t * labelOff   = lv_label_create(buttonOff, NULL);
283
-  lv_obj_t * label_Back = lv_label_create(buttonBack, NULL);
284
-
282
+  lv_obj_t *labelOff   = lv_label_create(buttonOff, NULL);
283
+  lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
285
 
284
 
286
   if (gCfgItems.multiple_language != 0) {
285
   if (gCfgItems.multiple_language != 0) {
287
     lv_label_set_text(labelAdd, preheat_menu.add);
286
     lv_label_set_text(labelAdd, preheat_menu.add);
306
 }
305
 }
307
 
306
 
308
 void disp_temp_type() {
307
 void disp_temp_type() {
309
-
310
   if (uiCfg.curTempType == 0) {
308
   if (uiCfg.curTempType == 0) {
311
     if (uiCfg.curSprayerChoose == 1) {
309
     if (uiCfg.curSprayerChoose == 1) {
312
       lv_obj_set_event_cb_mks(buttoType, event_handler, ID_P_TYPE, "bmp_extru2.bin", 0);
310
       lv_obj_set_event_cb_mks(buttoType, event_handler, ID_P_TYPE, "bmp_extru2.bin", 0);
331
       lv_obj_align(labelType, buttoType, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
329
       lv_obj_align(labelType, buttoType, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
332
     }
330
     }
333
   }
331
   }
334
-
335
 }
332
 }
336
 
333
 
337
 void disp_desire_temp() {
334
 void disp_desire_temp() {

+ 2
- 2
Marlin/src/lcd/extui/lib/mks_ui/draw_preHeat.h 查看文件

22
 #pragma once
22
 #pragma once
23
 
23
 
24
 #ifdef __cplusplus
24
 #ifdef __cplusplus
25
-extern "C" { /* C-declarations for C++ */
25
+  extern "C" { /* C-declarations for C++ */
26
 #endif
26
 #endif
27
 
27
 
28
 extern void lv_draw_preHeat(void);
28
 extern void lv_draw_preHeat(void);
33
 
33
 
34
 //extern void disp_temp_ready_print();
34
 //extern void disp_temp_ready_print();
35
 #ifdef __cplusplus
35
 #ifdef __cplusplus
36
-} /* C-declarations for C++ */
36
+  } /* C-declarations for C++ */
37
 #endif
37
 #endif

+ 2
- 2
Marlin/src/lcd/extui/lib/mks_ui/draw_print_file.cpp 查看文件

305
 
305
 
306
   lv_refr_now(lv_refr_get_disp_refreshing());
306
   lv_refr_now(lv_refr_get_disp_refreshing());
307
 
307
 
308
+  // Create image buttons
308
   buttonPageUp   = lv_imgbtn_create(scr, NULL);
309
   buttonPageUp   = lv_imgbtn_create(scr, NULL);
309
   buttonPageDown = lv_imgbtn_create(scr, NULL);
310
   buttonPageDown = lv_imgbtn_create(scr, NULL);
310
   buttonBack     = lv_imgbtn_create(scr, NULL);
311
   buttonBack     = lv_imgbtn_create(scr, NULL);
334
   lv_obj_set_pos(buttonPageDown, OTHER_BTN_XPIEL * 3 + INTERVAL_V * 4, titleHeight + OTHER_BTN_YPIEL + INTERVAL_H);
335
   lv_obj_set_pos(buttonPageDown, OTHER_BTN_XPIEL * 3 + INTERVAL_V * 4, titleHeight + OTHER_BTN_YPIEL + INTERVAL_H);
335
   lv_obj_set_pos(buttonBack, OTHER_BTN_XPIEL * 3 + INTERVAL_V * 4, titleHeight + OTHER_BTN_YPIEL * 2 + INTERVAL_H * 2);
336
   lv_obj_set_pos(buttonBack, OTHER_BTN_XPIEL * 3 + INTERVAL_V * 4, titleHeight + OTHER_BTN_YPIEL * 2 + INTERVAL_H * 2);
336
 
337
 
337
-  /*Create a label on the Image button*/
338
-
338
+  // Create labels on the image buttons
339
   lv_btn_set_layout(buttonPageUp, LV_LAYOUT_OFF);
339
   lv_btn_set_layout(buttonPageUp, LV_LAYOUT_OFF);
340
   lv_btn_set_layout(buttonPageDown, LV_LAYOUT_OFF);
340
   lv_btn_set_layout(buttonPageDown, LV_LAYOUT_OFF);
341
   lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
341
   lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);

+ 2
- 2
Marlin/src/lcd/extui/lib/mks_ui/draw_print_file.h 查看文件

22
 #pragma once
22
 #pragma once
23
 
23
 
24
 #ifdef __cplusplus
24
 #ifdef __cplusplus
25
-extern "C" { /* C-declarations for C++ */
25
+  extern "C" { /* C-declarations for C++ */
26
 #endif
26
 #endif
27
 
27
 
28
 typedef struct {
28
 typedef struct {
61
 
61
 
62
 //extern void disp_temp_ready_print();
62
 //extern void disp_temp_ready_print();
63
 #ifdef __cplusplus
63
 #ifdef __cplusplus
64
-} /* C-declarations for C++ */
64
+  } /* C-declarations for C++ */
65
 #endif
65
 #endif

+ 2
- 2
Marlin/src/lcd/extui/lib/mks_ui/draw_printing.h 查看文件

22
 #pragma once
22
 #pragma once
23
 
23
 
24
 #ifdef __cplusplus
24
 #ifdef __cplusplus
25
-extern "C" { /* C-declarations for C++ */
25
+  extern "C" { /* C-declarations for C++ */
26
 #endif
26
 #endif
27
 
27
 
28
 #define IDLE        0
28
 #define IDLE        0
48
 
48
 
49
 //extern void disp_temp_ready_print();
49
 //extern void disp_temp_ready_print();
50
 #ifdef __cplusplus
50
 #ifdef __cplusplus
51
-} /* C-declarations for C++ */
51
+  } /* C-declarations for C++ */
52
 #endif
52
 #endif

+ 5
- 5
Marlin/src/lcd/extui/lib/mks_ui/draw_ready_print.cpp 查看文件

159
     //lv_obj_set_pos(title,TITLE_XPOS,TITLE_YPOS);
159
     //lv_obj_set_pos(title,TITLE_XPOS,TITLE_YPOS);
160
     //lv_label_set_text(title, creat_title_text());
160
     //lv_label_set_text(title, creat_title_text());
161
 
161
 
162
-    /*Create an Image button*/
162
+    // Create image buttons
163
     //buttonPrint = lv_imgbtn_create(scr, NULL);
163
     //buttonPrint = lv_imgbtn_create(scr, NULL);
164
     buttonTool = lv_imgbtn_create(scr, NULL);
164
     buttonTool = lv_imgbtn_create(scr, NULL);
165
     //buttonSet = lv_imgbtn_create(scr, NULL);
165
     //buttonSet = lv_imgbtn_create(scr, NULL);
196
     //lv_obj_set_pos(buttonSet,BTN_X_PIXEL+SIMPLE_FIRST_PAGE_GRAP*2+1,(TFT_HEIGHT-BTN_Y_PIXEL)/2+2);
196
     //lv_obj_set_pos(buttonSet,BTN_X_PIXEL+SIMPLE_FIRST_PAGE_GRAP*2+1,(TFT_HEIGHT-BTN_Y_PIXEL)/2+2);
197
     //lv_obj_set_pos(buttonPrint,BTN_X_PIXEL*2+SIMPLE_FIRST_PAGE_GRAP*3+1,(TFT_HEIGHT-BTN_Y_PIXEL)/2+2);
197
     //lv_obj_set_pos(buttonPrint,BTN_X_PIXEL*2+SIMPLE_FIRST_PAGE_GRAP*3+1,(TFT_HEIGHT-BTN_Y_PIXEL)/2+2);
198
 
198
 
199
-    /*Create a label on the Image button*/
199
+    // Create labels on the image buttons
200
     //lv_btn_set_layout(buttonPrint, LV_LAYOUT_OFF);
200
     //lv_btn_set_layout(buttonPrint, LV_LAYOUT_OFF);
201
     //lv_btn_set_layout(buttonSet, LV_LAYOUT_OFF);
201
     //lv_btn_set_layout(buttonSet, LV_LAYOUT_OFF);
202
     lv_btn_set_layout(buttonTool, LV_LAYOUT_OFF);
202
     lv_btn_set_layout(buttonTool, LV_LAYOUT_OFF);
203
 
203
 
204
-    //lv_obj_t * label_print = lv_label_create(buttonPrint, NULL);
205
-    //lv_obj_t * label_set = lv_label_create(buttonSet, NULL);
206
-    lv_obj_t * label_tool = lv_label_create(buttonTool, NULL);
204
+    //lv_obj_t *label_print = lv_label_create(buttonPrint, NULL);
205
+    //lv_obj_t *label_set = lv_label_create(buttonSet, NULL);
206
+    lv_obj_t *label_tool = lv_label_create(buttonTool, NULL);
207
     if (gCfgItems.multiple_language != 0) {
207
     if (gCfgItems.multiple_language != 0) {
208
       //lv_label_set_text(label_print, main_menu.print);
208
       //lv_label_set_text(label_print, main_menu.print);
209
       //lv_obj_align(label_print, buttonPrint, LV_ALIGN_IN_BOTTOM_MID,0, BUTTON_TEXT_Y_OFFSET);
209
       //lv_obj_align(label_print, buttonPrint, LV_ALIGN_IN_BOTTOM_MID,0, BUTTON_TEXT_Y_OFFSET);

+ 2
- 2
Marlin/src/lcd/extui/lib/mks_ui/draw_ready_print.h 查看文件

22
 #pragma once
22
 #pragma once
23
 
23
 
24
 #ifdef __cplusplus
24
 #ifdef __cplusplus
25
-extern "C" { /* C-declarations for C++ */
25
+  extern "C" { /* C-declarations for C++ */
26
 #endif
26
 #endif
27
 
27
 
28
 extern void lv_draw_ready_print(void);
28
 extern void lv_draw_ready_print(void);
35
 
35
 
36
 //extern void disp_temp_ready_print();
36
 //extern void disp_temp_ready_print();
37
 #ifdef __cplusplus
37
 #ifdef __cplusplus
38
-} /* C-declarations for C++ */
38
+  } /* C-declarations for C++ */
39
 #endif
39
 #endif

+ 2
- 2
Marlin/src/lcd/extui/lib/mks_ui/draw_set.h 查看文件

22
 #pragma once
22
 #pragma once
23
 
23
 
24
 #ifdef __cplusplus
24
 #ifdef __cplusplus
25
-extern "C" { /* C-declarations for C++ */
25
+  extern "C" { /* C-declarations for C++ */
26
 #endif
26
 #endif
27
 
27
 
28
 extern void lv_draw_set(void);
28
 extern void lv_draw_set(void);
30
 
30
 
31
 //extern void disp_temp_ready_print();
31
 //extern void disp_temp_ready_print();
32
 #ifdef __cplusplus
32
 #ifdef __cplusplus
33
-} /* C-declarations for C++ */
33
+  } /* C-declarations for C++ */
34
 #endif
34
 #endif

+ 2
- 2
Marlin/src/lcd/extui/lib/mks_ui/draw_step_settings.h 查看文件

22
 #pragma once
22
 #pragma once
23
 
23
 
24
 #ifdef __cplusplus
24
 #ifdef __cplusplus
25
-extern "C" { /* C-declarations for C++ */
25
+  extern "C" { /* C-declarations for C++ */
26
 #endif
26
 #endif
27
 
27
 
28
 extern void lv_draw_step_settings(void);
28
 extern void lv_draw_step_settings(void);
29
 extern void lv_clear_step_settings();
29
 extern void lv_clear_step_settings();
30
 
30
 
31
 #ifdef __cplusplus
31
 #ifdef __cplusplus
32
-} /* C-declarations for C++ */
32
+  } /* C-declarations for C++ */
33
 #endif
33
 #endif

+ 1
- 0
Marlin/src/lcd/extui/lib/mks_ui/draw_tmc_current_settings.cpp 查看文件

25
 
25
 
26
 #include "lv_conf.h"
26
 #include "lv_conf.h"
27
 #include "draw_ui.h"
27
 #include "draw_ui.h"
28
+
28
 #include "../../../../MarlinCore.h"
29
 #include "../../../../MarlinCore.h"
29
 #include "../../../../module/planner.h"
30
 #include "../../../../module/planner.h"
30
 #include "../../../../module/stepper/indirection.h"
31
 #include "../../../../module/stepper/indirection.h"

+ 2
- 2
Marlin/src/lcd/extui/lib/mks_ui/draw_tmc_current_settings.h 查看文件

22
 #pragma once
22
 #pragma once
23
 
23
 
24
 #ifdef __cplusplus
24
 #ifdef __cplusplus
25
-extern "C" { /* C-declarations for C++ */
25
+  extern "C" { /* C-declarations for C++ */
26
 #endif
26
 #endif
27
 
27
 
28
 extern void lv_draw_tmc_current_settings(void);
28
 extern void lv_draw_tmc_current_settings(void);
29
 extern void lv_clear_tmc_current_settings();
29
 extern void lv_clear_tmc_current_settings();
30
 
30
 
31
 #ifdef __cplusplus
31
 #ifdef __cplusplus
32
-} /* C-declarations for C++ */
32
+  } /* C-declarations for C++ */
33
 #endif
33
 #endif
34
 
34
 

+ 2
- 2
Marlin/src/lcd/extui/lib/mks_ui/draw_tmc_step_mode_settings.h 查看文件

22
 #pragma once
22
 #pragma once
23
 
23
 
24
 #ifdef __cplusplus
24
 #ifdef __cplusplus
25
-extern "C" { /* C-declarations for C++ */
25
+  extern "C" { /* C-declarations for C++ */
26
 #endif
26
 #endif
27
 
27
 
28
 extern void lv_draw_tmc_step_mode_settings(void);
28
 extern void lv_draw_tmc_step_mode_settings(void);
29
 extern void lv_clear_tmc_step_mode_settings();
29
 extern void lv_clear_tmc_step_mode_settings();
30
 
30
 
31
 #ifdef __cplusplus
31
 #ifdef __cplusplus
32
-} /* C-declarations for C++ */
32
+  } /* C-declarations for C++ */
33
 #endif
33
 #endif

+ 2
- 2
Marlin/src/lcd/extui/lib/mks_ui/draw_tool.cpp 查看文件

140
 
140
 
141
   LV_IMG_DECLARE(bmp_pic);
141
   LV_IMG_DECLARE(bmp_pic);
142
 
142
 
143
-  /*Create an Image button*/
143
+  // Create image buttons
144
   buttonPreHeat   = lv_imgbtn_create(scr, NULL);
144
   buttonPreHeat   = lv_imgbtn_create(scr, NULL);
145
   buttonExtrusion = lv_imgbtn_create(scr, NULL);
145
   buttonExtrusion = lv_imgbtn_create(scr, NULL);
146
   buttonMove      = lv_imgbtn_create(scr, NULL);
146
   buttonMove      = lv_imgbtn_create(scr, NULL);
210
   //lv_obj_set_pos(buttonMore,BTN_X_PIXEL*2+INTERVAL_V*3, BTN_Y_PIXEL+INTERVAL_H+titleHeight);
210
   //lv_obj_set_pos(buttonMore,BTN_X_PIXEL*2+INTERVAL_V*3, BTN_Y_PIXEL+INTERVAL_H+titleHeight);
211
   lv_obj_set_pos(buttonBack, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
211
   lv_obj_set_pos(buttonBack, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
212
 
212
 
213
-  /*Create a label on the Image button*/
213
+  // Create labels on the image buttons
214
   lv_btn_set_layout(buttonPreHeat, LV_LAYOUT_OFF);
214
   lv_btn_set_layout(buttonPreHeat, LV_LAYOUT_OFF);
215
   lv_btn_set_layout(buttonExtrusion, LV_LAYOUT_OFF);
215
   lv_btn_set_layout(buttonExtrusion, LV_LAYOUT_OFF);
216
   lv_btn_set_layout(buttonMove, LV_LAYOUT_OFF);
216
   lv_btn_set_layout(buttonMove, LV_LAYOUT_OFF);

+ 2
- 2
Marlin/src/lcd/extui/lib/mks_ui/draw_tool.h 查看文件

22
 #pragma once
22
 #pragma once
23
 
23
 
24
 #ifdef __cplusplus
24
 #ifdef __cplusplus
25
-extern "C" { /* C-declarations for C++ */
25
+  extern "C" { /* C-declarations for C++ */
26
 #endif
26
 #endif
27
 
27
 
28
 extern void lv_draw_tool(void);
28
 extern void lv_draw_tool(void);
30
 
30
 
31
 //extern void disp_temp_ready_print();
31
 //extern void disp_temp_ready_print();
32
 #ifdef __cplusplus
32
 #ifdef __cplusplus
33
-} /* C-declarations for C++ */
33
+  } /* C-declarations for C++ */
34
 #endif
34
 #endif

+ 1
- 1
Marlin/src/lcd/extui/lib/mks_ui/draw_ui.h 查看文件

328
 extern void lv_ex_line(lv_obj_t * line, lv_point_t *points);
328
 extern void lv_ex_line(lv_obj_t * line, lv_point_t *points);
329
 
329
 
330
 #ifdef __cplusplus
330
 #ifdef __cplusplus
331
-} /* C-declarations for C++ */
331
+  } /* C-declarations for C++ */
332
 #endif
332
 #endif

+ 2
- 2
Marlin/src/lcd/extui/lib/mks_ui/pic_manager.h 查看文件

124
 #define VAR_INF_ADDR                    0x000000
124
 #define VAR_INF_ADDR                    0x000000
125
 
125
 
126
 #ifdef __cplusplus
126
 #ifdef __cplusplus
127
-extern "C" { /* C-declarations for C++ */
127
+  extern "C" { /* C-declarations for C++ */
128
 #endif
128
 #endif
129
 
129
 
130
 union union32 {
130
 union union32 {
157
 extern void flash_view_Read(uint8_t *flash_view_Rbuff, uint32_t flash_view_Readsize);
157
 extern void flash_view_Read(uint8_t *flash_view_Rbuff, uint32_t flash_view_Readsize);
158
 
158
 
159
 #ifdef __cplusplus
159
 #ifdef __cplusplus
160
-} /* C-declarations for C++ */
160
+  } /* C-declarations for C++ */
161
 #endif
161
 #endif

+ 1
- 0
Marlin/src/lcd/extui/lib/mks_ui/printer_operation.cpp 查看文件

51
       if (uiCfg.waitEndMoves > 20) {
51
       if (uiCfg.waitEndMoves > 20) {
52
         uiCfg.waitEndMoves = 0;
52
         uiCfg.waitEndMoves = 0;
53
         planner.synchronize();
53
         planner.synchronize();
54
+
54
         gcode.process_subcommands_now_P(PSTR("M25"));
55
         gcode.process_subcommands_now_P(PSTR("M25"));
55
         if (gCfgItems.pausePosZ != (float)-1) {
56
         if (gCfgItems.pausePosZ != (float)-1) {
56
           gcode.process_subcommands_now_P(PSTR("G91"));
57
           gcode.process_subcommands_now_P(PSTR("G91"));

+ 2
- 2
Marlin/src/lcd/extui/lib/mks_ui/printer_operation.h 查看文件

22
 #pragma once
22
 #pragma once
23
 
23
 
24
 #ifdef __cplusplus
24
 #ifdef __cplusplus
25
-extern "C" { /* C-declarations for C++ */
25
+  extern "C" { /* C-declarations for C++ */
26
 #endif
26
 #endif
27
 
27
 
28
 #define MIN_FILE_PRINTED   100 //5000
28
 #define MIN_FILE_PRINTED   100 //5000
32
 extern void filament_check();
32
 extern void filament_check();
33
 
33
 
34
 #ifdef __cplusplus
34
 #ifdef __cplusplus
35
-} /* C-declarations for C++ */
35
+  } /* C-declarations for C++ */
36
 #endif
36
 #endif

+ 2
- 2
Marlin/src/lcd/extui/lib/mks_ui/tft_fsmc.h 查看文件

22
 #pragma once
22
 #pragma once
23
 
23
 
24
 #ifdef __cplusplus
24
 #ifdef __cplusplus
25
-extern "C" { /* C-declarations for C++ */
25
+  extern "C" { /* C-declarations for C++ */
26
 #endif
26
 #endif
27
 
27
 
28
 #ifdef __cplusplus
28
 #ifdef __cplusplus
29
-} /* C-declarations for C++ */
29
+  } /* C-declarations for C++ */
30
 #endif
30
 #endif

+ 84
- 84
Marlin/src/lcd/tft/st7796s.h 查看文件

25
 
25
 
26
 #include "../../inc/MarlinConfig.h"
26
 #include "../../inc/MarlinConfig.h"
27
 
27
 
28
-#define ST7796S_MADCTL_MY         0x80 // Row Address Order
29
-#define ST7796S_MADCTL_MX         0x40 // Column Address Order
30
-#define ST7796S_MADCTL_MV         0x20 // Row/Column Exchange
31
-#define ST7796S_MADCTL_ML         0x10 // Vertical Refresh Order
32
-#define ST7796S_MADCTL_BGR        0x08 // RGB-BGR ORDER
33
-#define ST7796S_MADCTL_RGB        0x00
34
-#define ST7796S_MADCTL_MH         0x04 // Horizontal Refresh Order
28
+#define ST7796S_MADCTL_MY  0x80 // Row Address Order
29
+#define ST7796S_MADCTL_MX  0x40 // Column Address Order
30
+#define ST7796S_MADCTL_MV  0x20 // Row/Column Exchange
31
+#define ST7796S_MADCTL_ML  0x10 // Vertical Refresh Order
32
+#define ST7796S_MADCTL_BGR 0x08 // RGB-BGR ORDER
33
+#define ST7796S_MADCTL_RGB 0x00
34
+#define ST7796S_MADCTL_MH  0x04 // Horizontal Refresh Order
35
 
35
 
36
 #define ST7796S_COLOR_BGR
36
 #define ST7796S_COLOR_BGR
37
-#define ST7796S_ORIENTATION       ST7796S_MADCTL_MV
38
-#define ST7796S_MADCTL_DATA      (ST7796S_ORIENTATION | TERN(ST7796S_COLOR_BGR, ST7796S_MADCTL_BGR, ST7796S_MADCTL_RGB))
39
-
40
-#define ST7796S_NOP               0x00 // No Operation
41
-#define ST7796S_SWRESET           0x01 // Software reset
42
-#define ST7796S_RDDID             0x04 // Read Display ID
43
-#define ST7796S_RDNUMED           0x05 // Read Number of the Errors on DSI
44
-#define ST7796S_RDDST             0x09 // Read Display Status
45
-#define ST7796S_RDDPM             0x0A // Read Display Power Mode
46
-#define ST7796S_RDDMADCTL         0x0B // Read Display MADCTL
47
-#define ST7796S_RDDCOLMOD         0x0C // Read Display Pixel Format
48
-#define ST7796S_RDDIM             0x0D // Read Display Image Mode
49
-#define ST7796S_RDDSM             0x0E // Read Display Signal Status
50
-#define ST7796S_RDDSDR            0x0F // Read Display Self-Diagnostic Result
51
-#define ST7796S_SLPIN             0x10 // Sleep In
52
-#define ST7796S_SLPOUT            0x11 // Sleep Out
53
-#define ST7796S_PTLON             0x12 // Partial Display Mode On
54
-#define ST7796S_NORON             0x13 // Normal Display Mode On
55
-#define ST7796S_INVOFF            0x20 // Display Inversion Off
56
-#define ST7796S_INVON             0x21 // Display Inversion On
57
-#define ST7796S_DISPOFF           0x28 // Display Off
58
-#define ST7796S_DISPON            0x29 // Display On
59
-#define ST7796S_CASET             0x2A // Column Address Set
60
-#define ST7796S_RASET             0x2B // Row Address Set
61
-#define ST7796S_RAMWR             0x2C // Memory Write
62
-#define ST7796S_RAMRD             0x2E // Memory Read
63
-#define ST7796S_PTLAR             0x30 // Partial Area
64
-#define ST7796S_VSCRDEF           0x33 // Vertical Scrolling Definition
65
-#define ST7796S_TEOFF             0x34 // Tearing Effect Line OFF
66
-#define ST7796S_TEON              0x35 // Tearing Effect Line On
67
-#define ST7796S_MADCTL            0x36 // Memory Data Access Control
68
-#define ST7796S_VSCSAD            0x37 // Vertical Scroll Start Address of RAM
69
-#define ST7796S_IDMOFF            0x38 // Idle Mode Off
70
-#define ST7796S_IDMON             0x39 // Idle Mode On
71
-#define ST7796S_COLMOD            0x3A // Interface Pixel Format
72
-#define ST7796S_WRMEMC            0x3C // Write Memory Continue
73
-#define ST7796S_RDMEMC            0x3E // Read Memory Continue
74
-#define ST7796S_STE               0x44 // Set Tear ScanLine
75
-#define ST7796S_GSCAN             0x45 // Get ScanLine
76
-#define ST7796S_WRDISBV           0x51 // Write Display Brightness
77
-#define ST7796S_RDDISBV           0x52 // Read Display Brightness Value
78
-#define ST7796S_WRCTRLD           0x53 // Write CTRL Display
79
-#define ST7796S_RDCTRLD           0x54 // Read CTRL value Display
80
-#define ST7796S_WRCABC            0x55 // Write Adaptive Brightness Control
81
-#define ST7796S_RDCABC            0x56 // Read Content Adaptive Brightness Control
82
-#define ST7796S_WRCABCMB          0x5E // Write CABC Minimum Brightness
83
-#define ST7796S_RDCABCMB          0x5F // Read CABC Minimum Brightness
84
-#define ST7796S_RDFCS             0xAA // Read First Checksum
85
-#define ST7796S_RDCFCS            0xAF // Read Continue Checksum
86
-#define ST7796S_RDID1             0xDA // Read ID1
87
-#define ST7796S_RDID2             0xDB // Read ID2
88
-#define ST7796S_RDID3             0xDC // Read ID3
89
-
90
-#define ST7796S_IFMODE            0xB0 // Interface Mode Control
91
-#define ST7796S_FRMCTR1           0xB1 // Frame Rate Control (In Normal Mode/Full Colors)
92
-#define ST7796S_FRMCTR2           0xB2 // Frame Rate Control 2 (In Idle Mode/8 colors)
93
-#define ST7796S_FRMCTR3           0xB3 // Frame Rate Control 3(In Partial Mode/Full Colors)
94
-#define ST7796S_DIC               0xB4 // Display Inversion Control
95
-#define ST7796S_BPC               0xB5 // Blanking Porch Control
96
-#define ST7796S_DFC               0xB6 // Display Function Control
97
-#define ST7796S_EM                0xB7 // Entry Mode Set
98
-#define ST7796S_PWR1              0xC0 // Power Control 1
99
-#define ST7796S_PWR2              0xC1 // Power Control 2
100
-#define ST7796S_PWR3              0xC2 // Power Control 3
101
-#define ST7796S_VCMPCTL           0xC5 // VCOM Control
102
-#define ST7796S_VCMOST            0xC6 // VCOM Offset Register
103
-#define ST7796S_NVMADW            0xD0 // NVM Address/Data Write
104
-#define ST7796S_NVMBPROG          0xD1 // NVM Byte Program
105
-#define ST7796S_NVMSTRD           0xD2 // NVM Status Read
106
-#define ST7796S_RDID4             0xD3 // Read ID4
107
-#define ST7796S_PGC               0xE0 // Positive Gamma Control
108
-#define ST7796S_NGC               0xE1 // Negative Gamma Control
109
-#define ST7796S_DGC1              0xE2 // Digital Gamma Control 1
110
-#define ST7796S_DGC2              0xE3 // Digital Gamma Control 2
111
-#define ST7796S_DOCA              0xE8 // Display Output Ctrl Adjust
112
-#define ST7796S_CSCON             0xF0 // Command Set Control
113
-#define ST7796S_SPIRC             0xFB // SPI Read Control
37
+#define ST7796S_ORIENTATION  ST7796S_MADCTL_MV
38
+#define ST7796S_MADCTL_DATA (ST7796S_ORIENTATION | TERN(ST7796S_COLOR_BGR, ST7796S_MADCTL_BGR, ST7796S_MADCTL_RGB))
39
+
40
+#define ST7796S_NOP        0x00 // No Operation
41
+#define ST7796S_SWRESET    0x01 // Software reset
42
+#define ST7796S_RDDID      0x04 // Read Display ID
43
+#define ST7796S_RDNUMED    0x05 // Read Number of the Errors on DSI
44
+#define ST7796S_RDDST      0x09 // Read Display Status
45
+#define ST7796S_RDDPM      0x0A // Read Display Power Mode
46
+#define ST7796S_RDDMADCTL  0x0B // Read Display MADCTL
47
+#define ST7796S_RDDCOLMOD  0x0C // Read Display Pixel Format
48
+#define ST7796S_RDDIM      0x0D // Read Display Image Mode
49
+#define ST7796S_RDDSM      0x0E // Read Display Signal Status
50
+#define ST7796S_RDDSDR     0x0F // Read Display Self-Diagnostic Result
51
+#define ST7796S_SLPIN      0x10 // Sleep In
52
+#define ST7796S_SLPOUT     0x11 // Sleep Out
53
+#define ST7796S_PTLON      0x12 // Partial Display Mode On
54
+#define ST7796S_NORON      0x13 // Normal Display Mode On
55
+#define ST7796S_INVOFF     0x20 // Display Inversion Off
56
+#define ST7796S_INVON      0x21 // Display Inversion On
57
+#define ST7796S_DISPOFF    0x28 // Display Off
58
+#define ST7796S_DISPON     0x29 // Display On
59
+#define ST7796S_CASET      0x2A // Column Address Set
60
+#define ST7796S_RASET      0x2B // Row Address Set
61
+#define ST7796S_RAMWR      0x2C // Memory Write
62
+#define ST7796S_RAMRD      0x2E // Memory Read
63
+#define ST7796S_PTLAR      0x30 // Partial Area
64
+#define ST7796S_VSCRDEF    0x33 // Vertical Scrolling Definition
65
+#define ST7796S_TEOFF      0x34 // Tearing Effect Line OFF
66
+#define ST7796S_TEON       0x35 // Tearing Effect Line On
67
+#define ST7796S_MADCTL     0x36 // Memory Data Access Control
68
+#define ST7796S_VSCSAD     0x37 // Vertical Scroll Start Address of RAM
69
+#define ST7796S_IDMOFF     0x38 // Idle Mode Off
70
+#define ST7796S_IDMON      0x39 // Idle Mode On
71
+#define ST7796S_COLMOD     0x3A // Interface Pixel Format
72
+#define ST7796S_WRMEMC     0x3C // Write Memory Continue
73
+#define ST7796S_RDMEMC     0x3E // Read Memory Continue
74
+#define ST7796S_STE        0x44 // Set Tear ScanLine
75
+#define ST7796S_GSCAN      0x45 // Get ScanLine
76
+#define ST7796S_WRDISBV    0x51 // Write Display Brightness
77
+#define ST7796S_RDDISBV    0x52 // Read Display Brightness Value
78
+#define ST7796S_WRCTRLD    0x53 // Write CTRL Display
79
+#define ST7796S_RDCTRLD    0x54 // Read CTRL value Display
80
+#define ST7796S_WRCABC     0x55 // Write Adaptive Brightness Control
81
+#define ST7796S_RDCABC     0x56 // Read Content Adaptive Brightness Control
82
+#define ST7796S_WRCABCMB   0x5E // Write CABC Minimum Brightness
83
+#define ST7796S_RDCABCMB   0x5F // Read CABC Minimum Brightness
84
+#define ST7796S_RDFCS      0xAA // Read First Checksum
85
+#define ST7796S_RDCFCS     0xAF // Read Continue Checksum
86
+#define ST7796S_RDID1      0xDA // Read ID1
87
+#define ST7796S_RDID2      0xDB // Read ID2
88
+#define ST7796S_RDID3      0xDC // Read ID3
89
+
90
+#define ST7796S_IFMODE     0xB0 // Interface Mode Control
91
+#define ST7796S_FRMCTR1    0xB1 // Frame Rate Control (In Normal Mode/Full Colors)
92
+#define ST7796S_FRMCTR2    0xB2 // Frame Rate Control 2 (In Idle Mode/8 colors)
93
+#define ST7796S_FRMCTR3    0xB3 // Frame Rate Control 3(In Partial Mode/Full Colors)
94
+#define ST7796S_DIC        0xB4 // Display Inversion Control
95
+#define ST7796S_BPC        0xB5 // Blanking Porch Control
96
+#define ST7796S_DFC        0xB6 // Display Function Control
97
+#define ST7796S_EM         0xB7 // Entry Mode Set
98
+#define ST7796S_PWR1       0xC0 // Power Control 1
99
+#define ST7796S_PWR2       0xC1 // Power Control 2
100
+#define ST7796S_PWR3       0xC2 // Power Control 3
101
+#define ST7796S_VCMPCTL    0xC5 // VCOM Control
102
+#define ST7796S_VCMOST     0xC6 // VCOM Offset Register
103
+#define ST7796S_NVMADW     0xD0 // NVM Address/Data Write
104
+#define ST7796S_NVMBPROG   0xD1 // NVM Byte Program
105
+#define ST7796S_NVMSTRD    0xD2 // NVM Status Read
106
+#define ST7796S_RDID4      0xD3 // Read ID4
107
+#define ST7796S_PGC        0xE0 // Positive Gamma Control
108
+#define ST7796S_NGC        0xE1 // Negative Gamma Control
109
+#define ST7796S_DGC1       0xE2 // Digital Gamma Control 1
110
+#define ST7796S_DGC2       0xE3 // Digital Gamma Control 2
111
+#define ST7796S_DOCA       0xE8 // Display Output Ctrl Adjust
112
+#define ST7796S_CSCON      0xF0 // Command Set Control
113
+#define ST7796S_SPIRC      0xFB // SPI Read Control
114
 
114
 
115
 static const uint16_t st7796s_init[] = {
115
 static const uint16_t st7796s_init[] = {
116
   DATASIZE_8BIT,
116
   DATASIZE_8BIT,

+ 10
- 10
Marlin/src/pins/pins.h 查看文件

498
   #include "stm32f1/pins_STM3R_MINI.h"          // STM32F1                                env:STM32F103RE
498
   #include "stm32f1/pins_STM3R_MINI.h"          // STM32F1                                env:STM32F103RE
499
 #elif MB(GTM32_PRO_VB)
499
 #elif MB(GTM32_PRO_VB)
500
   #include "stm32f1/pins_GTM32_PRO_VB.h"        // STM32F1                                env:STM32F103RE
500
   #include "stm32f1/pins_GTM32_PRO_VB.h"        // STM32F1                                env:STM32F103RE
501
-#elif MB(GTM32_MINI_A30)
502
-  #include "stm32f1/pins_GTM32_MINI_A30.h"      // STM32F1                                env:STM32F103RE
503
 #elif MB(GTM32_MINI)
501
 #elif MB(GTM32_MINI)
504
   #include "stm32f1/pins_GTM32_MINI.h"          // STM32F1                                env:STM32F103RE
502
   #include "stm32f1/pins_GTM32_MINI.h"          // STM32F1                                env:STM32F103RE
503
+#elif MB(GTM32_MINI_A30)
504
+  #include "stm32f1/pins_GTM32_MINI_A30.h"      // STM32F1                                env:STM32F103RE
505
 #elif MB(GTM32_REV_B)
505
 #elif MB(GTM32_REV_B)
506
   #include "stm32f1/pins_GTM32_REV_B.h"         // STM32F1                                env:STM32F103RE
506
   #include "stm32f1/pins_GTM32_REV_B.h"         // STM32F1                                env:STM32F103RE
507
 #elif MB(MORPHEUS)
507
 #elif MB(MORPHEUS)
518
   #include "stm32f1/pins_MKS_ROBIN_NANO_V2.h"   // STM32F1                                env:mks_robin_nano35
518
   #include "stm32f1/pins_MKS_ROBIN_NANO_V2.h"   // STM32F1                                env:mks_robin_nano35
519
 #elif MB(MKS_ROBIN_LITE)
519
 #elif MB(MKS_ROBIN_LITE)
520
   #include "stm32f1/pins_MKS_ROBIN_LITE.h"      // STM32F1                                env:mks_robin_lite
520
   #include "stm32f1/pins_MKS_ROBIN_LITE.h"      // STM32F1                                env:mks_robin_lite
521
+#elif MB(MKS_ROBIN_LITE3)
522
+  #include "stm32f1/pins_MKS_ROBIN_LITE3.h"     // STM32F1                                env:mks_robin_lite3
523
+#elif MB(MKS_ROBIN_PRO)
524
+  #include "stm32f1/pins_MKS_ROBIN_PRO.h"       // STM32F1                                env:mks_robin_pro
525
+#elif MB(MKS_ROBIN_E3)
526
+  #include "stm32f1/pins_MKS_ROBIN_E3.h"        // STM32F1                                env:mks_robin_e3
527
+#elif MB(MKS_ROBIN_E3D)
528
+  #include "stm32f1/pins_MKS_ROBIN_E3D.h"       // STM32F1                                env:mks_robin_e3
521
 #elif MB(BTT_SKR_MINI_V1_1)
529
 #elif MB(BTT_SKR_MINI_V1_1)
522
   #include "stm32f1/pins_BTT_SKR_MINI_V1_1.h"   // STM32F1                                env:STM32F103RC_btt env:STM32F103RC_btt_512K env:STM32F103RC_btt_USB env:STM32F103RC_btt_512K_USB
530
   #include "stm32f1/pins_BTT_SKR_MINI_V1_1.h"   // STM32F1                                env:STM32F103RC_btt env:STM32F103RC_btt_512K env:STM32F103RC_btt_USB env:STM32F103RC_btt_512K_USB
523
 #elif MB(BTT_SKR_MINI_E3_V1_0)
531
 #elif MB(BTT_SKR_MINI_E3_V1_0)
538
   #include "stm32f1/pins_FYSETC_CHEETAH_V12.h"  // STM32F1                                env:STM32F103RC_fysetc
546
   #include "stm32f1/pins_FYSETC_CHEETAH_V12.h"  // STM32F1                                env:STM32F103RC_fysetc
539
 #elif MB(LONGER3D_LK)
547
 #elif MB(LONGER3D_LK)
540
   #include "stm32f1/pins_LONGER3D_LK.h"         // STM32F1                                env:STM32F103VE_longer
548
   #include "stm32f1/pins_LONGER3D_LK.h"         // STM32F1                                env:STM32F103VE_longer
541
-#elif MB(MKS_ROBIN_LITE3)
542
-  #include "stm32f1/pins_MKS_ROBIN_LITE3.h"     // STM32F1                                env:mks_robin_lite3
543
-#elif MB(MKS_ROBIN_PRO)
544
-  #include "stm32f1/pins_MKS_ROBIN_PRO.h"       // STM32F1                                env:mks_robin_pro
545
-#elif MB(MKS_ROBIN_E3D)
546
-  #include "stm32f1/pins_MKS_ROBIN_E3D.h"       // STM32F1                                env:mks_robin_e3
547
-#elif MB(MKS_ROBIN_E3)
548
-  #include "stm32f1/pins_MKS_ROBIN_E3.h"        // STM32F1                                env:mks_robin_e3
549
 #elif MB(CCROBOT_MEEB_3DP)
549
 #elif MB(CCROBOT_MEEB_3DP)
550
   #include "stm32f1/pins_CCROBOT_MEEB_3DP.h"    // STM32F1                                env:STM32F103RC_meeb
550
   #include "stm32f1/pins_CCROBOT_MEEB_3DP.h"    // STM32F1                                env:STM32F103RC_meeb
551
 #elif MB(CHITU3D_V5)
551
 #elif MB(CHITU3D_V5)

正在加载...
取消
保存