瀏覽代碼

Cleanup before MKS changes

Scott Lahteine 3 年之前
父節點
當前提交
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,11 +173,11 @@
173 173
 #   define __always_inline   __forceinline
174 174
 #elif (defined __GNUC__)
175 175
 #ifdef __always_inline
176
-#	undef __always_inline
176
+# undef __always_inline
177 177
 #endif
178
-#	define __always_inline   inline __attribute__((__always_inline__))
178
+# define __always_inline   inline __attribute__((__always_inline__))
179 179
 #elif (defined __ICCARM__)
180
-#	define __always_inline   _Pragma("inline=forced")
180
+# define __always_inline   _Pragma("inline=forced")
181 181
 #endif
182 182
 
183 183
 /**
@@ -188,11 +188,11 @@
188 188
  * heuristics and not inline the function.
189 189
  */
190 190
 #ifdef __CC_ARM
191
-#   define __no_inline   __attribute__((noinline))
191
+# define __no_inline   __attribute__((noinline))
192 192
 #elif (defined __GNUC__)
193
-#	define __no_inline   __attribute__((__noinline__))
193
+# define __no_inline   __attribute__((__noinline__))
194 194
 #elif (defined __ICCARM__)
195
-#	define __no_inline   _Pragma("inline=never")
195
+# define __no_inline   _Pragma("inline=never")
196 196
 #endif
197 197
 
198 198
 /*! \brief This macro is used to test fatal errors.
@@ -211,9 +211,9 @@
211 211
 #  else
212 212
 #undef TEST_SUITE_DEFINE_ASSERT_MACRO
213 213
 #    define Assert(expr) \
214
-	{\
215
-		if (!(expr)) while (true);\
216
-	}
214
+  {\
215
+    if (!(expr)) while (true);\
216
+  }
217 217
 #  endif
218 218
 #else
219 219
 #  define Assert(expr) ((void) 0)
@@ -1106,17 +1106,16 @@ static inline uint16_t convert_byte_array_to_16_bit(uint8_t *data)
1106 1106
 /* Converts a 8 Byte array into a 32-Bit value */
1107 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,7 +87,7 @@ void TFT_FSMC::Init() {
87 87
 
88 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 91
     pinmap_pinout(PinMap_FSMC[i].pin, PinMap_FSMC);
92 92
   pinmap_pinout(digitalPinToPinName(TFT_CS_PIN), PinMap_FSMC_CS);
93 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,7 +188,7 @@ bool UIFlashStorage::is_present = false;
188 188
   }
189 189
 
190 190
   void UIFlashStorage::initialize() {
191
-    for(uint8_t i = 0; i < 10; i++) {
191
+    for (uint8_t i = 0; i < 10; i++) {
192 192
       if (check_known_device()) {
193 193
         is_present = true;
194 194
         break;
@@ -239,7 +239,7 @@ bool UIFlashStorage::is_present = false;
239 239
     uint16_t stride = 4 + block_size;
240 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 243
       uint32_t delim;
244 244
       spi_read_begin(offset);
245 245
       spi_read_bulk (&delim, sizeof(delim));
@@ -395,9 +395,8 @@ bool UIFlashStorage::is_present = false;
395 395
   uint32_t UIFlashStorage::get_media_file_start(uint8_t slot) {
396 396
     uint32_t addr = media_storage_addr + sizeof(uint32_t) * media_storage_slots;
397 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 399
       addr += spi_read_32();
400
-    }
401 400
     spi_read_end();
402 401
     return addr;
403 402
   }
@@ -442,7 +441,7 @@ bool UIFlashStorage::is_present = false;
442 441
       addr = get_media_file_start(slot);
443 442
 
444 443
       // Write out the file itself
445
-      for(;;) {
444
+      for (;;) {
446 445
         const int16_t nBytes = reader.read(buff, write_page_size);
447 446
         if (nBytes == -1) {
448 447
           SERIAL_ECHOLNPGM("Failed to read from file");
@@ -450,8 +449,7 @@ bool UIFlashStorage::is_present = false;
450 449
         }
451 450
 
452 451
         addr = write(addr, buff, nBytes);
453
-        if (nBytes != write_page_size)
454
-          break;
452
+        if (nBytes != write_page_size) break;
455 453
 
456 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,9 +69,8 @@ using namespace FTDI;
69 69
 
70 70
 void DLCache::init() {
71 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 73
     save_slot(slot, 0, 0, 0);
74
-  }
75 74
 }
76 75
 
77 76
 bool DLCache::has_data() {

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

@@ -74,12 +74,12 @@
74 74
 #define DRAW_LAYOUT_GRID \
75 75
   { \
76 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 78
       cmd.cmd(BEGIN(LINES)); \
79 79
       cmd.cmd(VERTEX2F(GRID_X(i) *16, 0             *16)); \
80 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 83
       cmd.cmd(BEGIN(LINES)); \
84 84
       cmd.cmd(VERTEX2F(0                       *16, GRID_Y(i) *16)); \
85 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,7 +26,7 @@
26 26
 /********************** VIRTUAL DISPATCH DATA TYPE  ******************************/
27 27
 
28 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 30
     if (GET_METHOD(type, onRedraw) == onRedraw_ptr) {
31 31
       return type;
32 32
     }
@@ -50,9 +50,8 @@ void ScreenRef::setScreen(onRedraw_func_t onRedraw_ptr) {
50 50
 }
51 51
 
52 52
 void ScreenRef::initializeAll() {
53
-  for(uint8_t type = 0; type < functionTableSize; type++) {
53
+  for (uint8_t type = 0; type < functionTableSize; type++)
54 54
     GET_METHOD(type, onStartup)();
55
-  }
56 55
 }
57 56
 
58 57
 /********************** SCREEN STACK  ******************************/

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

@@ -34,7 +34,7 @@ namespace FTDI {
34 34
     const char *p = str;
35 35
     end = str;
36 36
     uint16_t lw = 0, result = 0;
37
-    for(;;) {
37
+    for (;;) {
38 38
       utf8_char_t c = get_utf8_char_and_inc(p);
39 39
       if (c == ' ' || c == '\n' || c == '\0') {
40 40
         if (lw < w || end == str) {
@@ -60,7 +60,7 @@ namespace FTDI {
60 60
     const char *line_end;
61 61
     const uint16_t wrap_width = width;
62 62
     width = height = 0;
63
-    for(;;) {
63
+    for (;;) {
64 64
       uint16_t line_width = find_line_break(fm, wrap_width, line_start, line_end);
65 65
       if (line_end == line_start) break;
66 66
       width  = max(width, line_width);
@@ -78,7 +78,7 @@ namespace FTDI {
78 78
     FontMetrics fm(font);
79 79
 
80 80
     // Shrink the font until we find a font that fits
81
-    for(;;) {
81
+    for (;;) {
82 82
       box_width = w;
83 83
       measure_text_box(fm, str, box_width, box_height);
84 84
       if (box_width <= (uint16_t)w && box_height <= (uint16_t)h) break;
@@ -91,7 +91,7 @@ namespace FTDI {
91 91
 
92 92
     const char *line_start = str;
93 93
     const char *line_end;
94
-    for(;;) {
94
+    for (;;) {
95 95
       find_line_break(fm, w, line_start, line_end);
96 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,13 +37,13 @@ namespace FTDI {
37 37
     // split and still allow the ellipsis to fit.
38 38
     int16_t lineWidth = 0;
39 39
     char *breakPoint   = str;
40
-    for(char* c = str; *c; c++) {
40
+    for (char* c = str; *c; c++) {
41 41
       lineWidth += fm.get_char_width(*c);
42
-      if(lineWidth + ellipsisWidth < w)
42
+      if (lineWidth + ellipsisWidth < w)
43 43
         breakPoint = c;
44 44
     }
45 45
 
46
-    if(lineWidth > w) {
46
+    if (lineWidth > w) {
47 47
       *breakPoint = '\0';
48 48
       strcpy_P(breakPoint,PSTR("..."));
49 49
     }

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

@@ -253,7 +253,7 @@ void BedMeshScreen::drawHighlightedPointValue() {
253 253
      .tag(1).button( OKAY_POS, GET_TEXT_F(MSG_BUTTON_OKAY))
254 254
      .tag(0);
255 255
 
256
-  switch(screen_data.BedMeshScreen.message) {
256
+  switch (screen_data.BedMeshScreen.message) {
257 257
     case screen_data.BedMeshScreen.MSG_MESH_COMPLETE:   cmd.text(MESSAGE_POS, GET_TEXT_F(MSG_BED_MAPPING_DONE)); break;
258 258
     case screen_data.BedMeshScreen.MSG_MESH_INCOMPLETE: cmd.text(MESSAGE_POS, GET_TEXT_F(MSG_BED_MAPPING_INCOMPLETE)); break;
259 259
     default: break;
@@ -321,7 +321,7 @@ bool BedMeshScreen::isMeshComplete(ExtUI::bed_mesh_t data) {
321 321
 }
322 322
 
323 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 325
     case ExtUI::MESH_START:
326 326
       screen_data.BedMeshScreen.count = 0;
327 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,7 +115,7 @@ void FilesScreen::drawFileList() {
115 115
   #define MARGIN_T 0
116 116
   #define MARGIN_B 0
117 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 119
     if (files.seek(fileIndex)) {
120 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,7 +222,7 @@ void InterfaceSettingsScreen::saveSettings(char *buff) {
222 222
   eeprom.touch_transform_f    = CLCD::mem_read_32(CLCD::REG::TOUCH_TRANSFORM_F);
223 223
   eeprom.display_h_offset_adj = CLCD::mem_read_16(CLCD::REG::HOFFSET) - FTDI::Hoffset;
224 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 226
     eeprom.event_sounds[i] = InterfaceSoundsScreen::event_sounds[i];
227 227
 
228 228
   memcpy(buff, &eeprom, sizeof(eeprom));
@@ -251,7 +251,7 @@ void InterfaceSettingsScreen::loadSettings(const char *buff) {
251 251
   CLCD::mem_write_32(CLCD::REG::TOUCH_TRANSFORM_F, eeprom.touch_transform_f);
252 252
   CLCD::mem_write_16(CLCD::REG::HOFFSET,           eeprom.display_h_offset_adj + FTDI::Hoffset);
253 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 255
     InterfaceSoundsScreen::event_sounds[i] = eeprom.event_sounds[i];
256 256
 
257 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,7 +43,7 @@ void InterfaceSoundsScreen::toggleSoundSelection(event_t event) {
43 43
 }
44 44
 
45 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 47
     if (SoundList::data(i) == sound)
48 48
       event_sounds[event] = i;
49 49
 }

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

@@ -176,11 +176,7 @@ void StatusScreen::draw_temperature(draw_mode_t what) {
176 176
     char bed_str[20];
177 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 181
     if (isHeaterIdle(BED))
186 182
       format_temp_and_idle(bed_str, getActualTemp_celsius(BED));
@@ -193,16 +189,13 @@ void StatusScreen::draw_temperature(draw_mode_t what) {
193 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 193
       if (isHeaterIdle(H1))
198 194
         format_temp_and_idle(e1_str, getActualTemp_celsius(H1));
199 195
       else
200 196
         format_temp_and_temp(e1_str, getActualTemp_celsius(H1), getTargetTemp_celsius(H1));
201 197
     #else
202
-      strcpy_P(
203
-        e1_str,
204
-        PSTR("-")
205
-      );
198
+      strcpy_P(e1_str, PSTR("-"));
206 199
     #endif
207 200
 
208 201
     cmd.tag(5)

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

@@ -38,7 +38,7 @@ using namespace ExtUI;
38 38
 
39 39
 void StressTestScreen::drawDots(uint16_t x, uint16_t y, uint16_t w, uint16_t h) {
40 40
   CommandProcessor cmd;
41
-  for(uint8_t i = 0; i < 100; i++) {
41
+  for (uint8_t i = 0; i < 100; i++) {
42 42
     cmd.cmd(BEGIN(POINTS))
43 43
        .cmd(POINT_SIZE(20*16))
44 44
        .cmd(COLOR_RGB(random(0xFFFFFF)))
@@ -111,7 +111,7 @@ void StressTestScreen::recursiveLockup() {
111 111
 
112 112
 void StressTestScreen::iterativeLockup() {
113 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 117
 void StressTestScreen::onIdle() {

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

@@ -75,7 +75,7 @@ void lv_draw_about(void) {
75 75
 
76 76
   LV_IMG_DECLARE(bmp_pic);
77 77
 
78
-  /*Create an Image button*/
78
+  // Create an Image button
79 79
   buttonBack = lv_imgbtn_create(scr, NULL);
80 80
 
81 81
   #if 1
@@ -88,8 +88,8 @@ void lv_draw_about(void) {
88 88
 
89 89
   lv_obj_set_pos(buttonBack, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
90 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 93
   label_Back = lv_label_create(buttonBack, NULL);
94 94
 
95 95
   if (gCfgItems.multiple_language != 0) {

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

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

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

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

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

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

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

@@ -73,7 +73,7 @@ static void event_handler(lv_obj_t * obj, lv_event_t event) {
73 73
           #if HAS_MULTI_EXTRUDER
74 74
             planner.flow_percentage[1] = planner.flow_percentage[0];
75 75
             planner.refresh_e_factor(1);
76
-          }
76
+          #endif
77 77
         }
78 78
         disp_print_speed();
79 79
       }
@@ -98,10 +98,10 @@ static void event_handler(lv_obj_t * obj, lv_event_t event) {
98 98
           //planner.flow_percentage[1] = planner.flow_percentage[0];
99 99
           //planner.e_factor[1]= planner.flow_percentage[1] * 0.01;
100 100
           planner.refresh_e_factor(0);
101
-          if (EXTRUDERS == 2) {
101
+          #if HAS_MULTI_EXTRUDER
102 102
             planner.flow_percentage[1] = planner.flow_percentage[0];
103 103
             planner.refresh_e_factor(1);
104
-          }
104
+          #endif
105 105
         }
106 106
         disp_print_speed();
107 107
       }
@@ -177,7 +177,7 @@ void lv_draw_change_speed(void) {
177 177
 
178 178
   LV_IMG_DECLARE(bmp_pic);
179 179
 
180
-  /*Create an Image button*/
180
+  // Create an Image button
181 181
   buttonAdd  = lv_imgbtn_create(scr, NULL);
182 182
   buttonDec  = lv_imgbtn_create(scr, NULL);
183 183
   buttonMov  = lv_imgbtn_create(scr, NULL);
@@ -228,7 +228,7 @@ void lv_draw_change_speed(void) {
228 228
   lv_obj_set_pos(buttonStep, BTN_X_PIXEL * 2 + INTERVAL_V * 3, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
229 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 232
   lv_btn_set_layout(buttonAdd, LV_LAYOUT_OFF);
233 233
   lv_btn_set_layout(buttonDec, LV_LAYOUT_OFF);
234 234
   lv_btn_set_layout(buttonMov, LV_LAYOUT_OFF);
@@ -236,12 +236,12 @@ void lv_draw_change_speed(void) {
236 236
   lv_btn_set_layout(buttonStep, LV_LAYOUT_OFF);
237 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 246
   if (gCfgItems.multiple_language != 0) {
247 247
     lv_label_set_text(labelAdd, speed_menu.add);
@@ -286,7 +286,7 @@ void disp_speed_step() {
286 286
 }
287 287
 
288 288
 void disp_print_speed() {
289
-  char buf[30] = {0};
289
+  char buf[30] = { 0 };
290 290
 
291 291
   public_buf_l[0] = '\0';
292 292
 

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

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

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

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

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

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

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

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

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

@@ -100,9 +100,9 @@ static void event_handler(lv_obj_t * obj, lv_event_t event) {
100 100
             queue.inject_P(PSTR("T0"));
101 101
           }
102 102
         }
103
-        else {
103
+        else
104 104
           uiCfg.curSprayerChoose = 0;
105
-        }
105
+
106 106
         extructAmount = 0;
107 107
         disp_hotend_temp();
108 108
         disp_ext_type();
@@ -149,7 +149,6 @@ static void event_handler(lv_obj_t * obj, lv_event_t event) {
149 149
   }
150 150
 }
151 151
 
152
-
153 152
 void lv_draw_extrusion(void) {
154 153
   lv_obj_t *buttonAdd, *buttonDec, *buttonBack;
155 154
 
@@ -174,7 +173,7 @@ void lv_draw_extrusion(void) {
174 173
 
175 174
   LV_IMG_DECLARE(bmp_pic);
176 175
 
177
-  /*Create an Image button*/
176
+  // Create image buttons
178 177
   buttonAdd   = lv_imgbtn_create(scr, NULL);
179 178
   buttonDec   = lv_imgbtn_create(scr, NULL);
180 179
   buttoType   = lv_imgbtn_create(scr, NULL);
@@ -224,7 +223,7 @@ void lv_draw_extrusion(void) {
224 223
   lv_obj_set_pos(buttonSpeed, BTN_X_PIXEL * 2 + INTERVAL_V * 3, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
225 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 227
   lv_btn_set_layout(buttonAdd, LV_LAYOUT_OFF);
229 228
   lv_btn_set_layout(buttonDec, LV_LAYOUT_OFF);
230 229
   lv_btn_set_layout(buttoType, LV_LAYOUT_OFF);
@@ -232,12 +231,12 @@ void lv_draw_extrusion(void) {
232 231
   lv_btn_set_layout(buttonSpeed, LV_LAYOUT_OFF);
233 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 241
   if (gCfgItems.multiple_language != 0) {
243 242
     lv_label_set_text(labelAdd, extrude_menu.in);

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

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

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

@@ -140,12 +140,12 @@ void lv_draw_fan(void) {
140 140
 
141 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 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 149
   buttonBack = lv_imgbtn_create(scr, NULL);
150 150
 
151 151
   lv_obj_set_event_cb_mks(buttonAdd, event_handler, ID_F_ADD, "bmp_Add.bin", 0);
@@ -154,6 +154,7 @@ void lv_draw_fan(void) {
154 154
   lv_imgbtn_set_style(buttonAdd, LV_BTN_STATE_PR, &tft_style_label_pre);
155 155
   lv_imgbtn_set_style(buttonAdd, LV_BTN_STATE_REL, &tft_style_label_rel);
156 156
   lv_obj_clear_protect(buttonAdd, LV_PROTECT_FOLLOW);
157
+
157 158
   #if 1
158 159
     lv_obj_set_event_cb_mks(buttonDec, event_handler, ID_F_DEC, "bmp_Dec.bin", 0);
159 160
     lv_imgbtn_set_src(buttonDec, LV_BTN_STATE_REL, &bmp_pic);
@@ -184,6 +185,7 @@ void lv_draw_fan(void) {
184 185
     lv_imgbtn_set_src(buttonBack, LV_BTN_STATE_PR, &bmp_pic);
185 186
     lv_imgbtn_set_style(buttonBack, LV_BTN_STATE_PR, &tft_style_label_pre);
186 187
     lv_imgbtn_set_style(buttonBack, LV_BTN_STATE_REL, &tft_style_label_rel);
188
+
187 189
   #endif
188 190
 
189 191
   lv_obj_set_pos(buttonAdd, INTERVAL_V, titleHeight);
@@ -193,7 +195,7 @@ void lv_draw_fan(void) {
193 195
   lv_obj_set_pos(buttonOff, BTN_X_PIXEL * 2 + INTERVAL_V * 3, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
194 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 199
   lv_btn_set_layout(buttonAdd, LV_LAYOUT_OFF);
198 200
   lv_btn_set_layout(buttonDec, LV_LAYOUT_OFF);
199 201
   lv_btn_set_layout(buttonHigh, LV_LAYOUT_OFF);
@@ -201,13 +203,12 @@ void lv_draw_fan(void) {
201 203
   lv_btn_set_layout(buttonOff, LV_LAYOUT_OFF);
202 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 213
   if (gCfgItems.multiple_language != 0) {
213 214
     lv_label_set_text(labelAdd, fan_menu.add);

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

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

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

@@ -96,7 +96,6 @@ static void event_handler(lv_obj_t * obj, lv_event_t event) {
96 96
         lv_draw_tool();
97 97
       }
98 98
       break;
99
-
100 99
   }
101 100
 }
102 101
 

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

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

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

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

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

@@ -246,7 +246,7 @@ void lv_draw_language(void) {
246 246
 
247 247
   LV_IMG_DECLARE(bmp_pic);
248 248
 
249
-  /*Create an Image button*/
249
+  // Create image buttons
250 250
   buttonCN   = lv_imgbtn_create(scr, NULL);
251 251
   buttonT_CN = lv_imgbtn_create(scr, NULL);
252 252
   buttonEN   = lv_imgbtn_create(scr, NULL);
@@ -304,6 +304,7 @@ void lv_draw_language(void) {
304 304
     lv_imgbtn_set_src(buttonBack, LV_BTN_STATE_PR, &bmp_pic);
305 305
     lv_imgbtn_set_style(buttonBack, LV_BTN_STATE_PR, &tft_style_label_pre);
306 306
     lv_imgbtn_set_style(buttonBack, LV_BTN_STATE_REL, &tft_style_label_rel);
307
+
307 308
   #endif // if 1
308 309
 
309 310
   lv_obj_set_pos(buttonCN, INTERVAL_V, titleHeight);
@@ -315,7 +316,7 @@ void lv_draw_language(void) {
315 316
   lv_obj_set_pos(buttonIT, BTN_X_PIXEL * 2 + INTERVAL_V * 3, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
316 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 320
   lv_btn_set_layout(buttonCN, LV_LAYOUT_OFF);
320 321
   lv_btn_set_layout(buttonT_CN, LV_LAYOUT_OFF);
321 322
   lv_btn_set_layout(buttonEN, LV_LAYOUT_OFF);
@@ -325,14 +326,14 @@ void lv_draw_language(void) {
325 326
   lv_btn_set_layout(buttonIT, LV_LAYOUT_OFF);
326 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 338
   disp_language(gCfgItems.language, SELECTED);
338 339
 

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

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

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

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

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

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

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

@@ -187,7 +187,7 @@ void lv_draw_manualLevel(void) {
187 187
 
188 188
   LV_IMG_DECLARE(bmp_pic);
189 189
 
190
-  /*Create an Image button*/
190
+  // Create an Image button
191 191
   buttonPoint1 = lv_imgbtn_create(scr, NULL);
192 192
   buttonPoint2 = lv_imgbtn_create(scr, NULL);
193 193
   buttonPoint3 = lv_imgbtn_create(scr, NULL);
@@ -240,7 +240,7 @@ void lv_draw_manualLevel(void) {
240 240
   lv_obj_set_pos(buttonPoint5, INTERVAL_V, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
241 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 244
   lv_btn_set_layout(buttonPoint1, LV_LAYOUT_OFF);
245 245
   lv_btn_set_layout(buttonPoint2, LV_LAYOUT_OFF);
246 246
   lv_btn_set_layout(buttonPoint3, LV_LAYOUT_OFF);
@@ -248,12 +248,12 @@ void lv_draw_manualLevel(void) {
248 248
   lv_btn_set_layout(buttonPoint5, LV_LAYOUT_OFF);
249 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 258
   if (gCfgItems.multiple_language != 0) {
259 259
     lv_label_set_text(label_Point1, leveling_menu.position1);

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

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

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

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

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

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

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

@@ -34,7 +34,7 @@
34 34
 
35 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 39
 #define ID_M_X_P    1
40 40
 #define ID_M_X_N    2
@@ -181,7 +181,7 @@ void lv_draw_move_motor(void) {
181 181
 
182 182
   LV_IMG_DECLARE(bmp_pic);
183 183
 
184
-  /*Create an Image button*/
184
+  // Create an Image button
185 185
   buttonXI   = lv_imgbtn_create(scr, NULL);
186 186
   buttonXD   = lv_imgbtn_create(scr, NULL);
187 187
   buttonYI   = lv_imgbtn_create(scr, NULL);
@@ -249,7 +249,7 @@ void lv_draw_move_motor(void) {
249 249
   lv_obj_set_pos(buttonZD, BTN_X_PIXEL * 2 + INTERVAL_V * 3, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
250 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 253
   lv_btn_set_layout(buttonXI, LV_LAYOUT_OFF);
254 254
   lv_btn_set_layout(buttonXD, LV_LAYOUT_OFF);
255 255
   lv_btn_set_layout(buttonYI, LV_LAYOUT_OFF);
@@ -259,14 +259,14 @@ void lv_draw_move_motor(void) {
259 259
   lv_btn_set_layout(buttonV, LV_LAYOUT_OFF);
260 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 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 271
   if (gCfgItems.multiple_language != 0) {
272 272
     lv_label_set_text(labelXI, move_menu.x_add);

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

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

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

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

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

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

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

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

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

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

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

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

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

@@ -267,7 +267,7 @@ void lv_draw_preHeat(void) {
267 267
   lv_obj_set_pos(buttonOff, BTN_X_PIXEL * 2 + INTERVAL_V * 3, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
268 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 271
   lv_btn_set_layout(buttonAdd, LV_LAYOUT_OFF);
272 272
   lv_btn_set_layout(buttonDec, LV_LAYOUT_OFF);
273 273
   lv_btn_set_layout(buttoType, LV_LAYOUT_OFF);
@@ -275,13 +275,12 @@ void lv_draw_preHeat(void) {
275 275
   lv_btn_set_layout(buttonOff, LV_LAYOUT_OFF);
276 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 280
   labelType = lv_label_create(buttoType, NULL);
281 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 285
   if (gCfgItems.multiple_language != 0) {
287 286
     lv_label_set_text(labelAdd, preheat_menu.add);
@@ -306,7 +305,6 @@ void lv_draw_preHeat(void) {
306 305
 }
307 306
 
308 307
 void disp_temp_type() {
309
-
310 308
   if (uiCfg.curTempType == 0) {
311 309
     if (uiCfg.curSprayerChoose == 1) {
312 310
       lv_obj_set_event_cb_mks(buttoType, event_handler, ID_P_TYPE, "bmp_extru2.bin", 0);
@@ -331,7 +329,6 @@ void disp_temp_type() {
331 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 334
 void disp_desire_temp() {

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

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

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

@@ -305,6 +305,7 @@ void disp_gcode_icon(uint8_t file_num) {
305 305
 
306 306
   lv_refr_now(lv_refr_get_disp_refreshing());
307 307
 
308
+  // Create image buttons
308 309
   buttonPageUp   = lv_imgbtn_create(scr, NULL);
309 310
   buttonPageDown = lv_imgbtn_create(scr, NULL);
310 311
   buttonBack     = lv_imgbtn_create(scr, NULL);
@@ -334,8 +335,7 @@ void disp_gcode_icon(uint8_t file_num) {
334 335
   lv_obj_set_pos(buttonPageDown, OTHER_BTN_XPIEL * 3 + INTERVAL_V * 4, titleHeight + OTHER_BTN_YPIEL + INTERVAL_H);
335 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 339
   lv_btn_set_layout(buttonPageUp, LV_LAYOUT_OFF);
340 340
   lv_btn_set_layout(buttonPageDown, LV_LAYOUT_OFF);
341 341
   lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);

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

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

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

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

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

@@ -159,7 +159,7 @@ void lv_draw_ready_print(void) {
159 159
     //lv_obj_set_pos(title,TITLE_XPOS,TITLE_YPOS);
160 160
     //lv_label_set_text(title, creat_title_text());
161 161
 
162
-    /*Create an Image button*/
162
+    // Create image buttons
163 163
     //buttonPrint = lv_imgbtn_create(scr, NULL);
164 164
     buttonTool = lv_imgbtn_create(scr, NULL);
165 165
     //buttonSet = lv_imgbtn_create(scr, NULL);
@@ -196,14 +196,14 @@ void lv_draw_ready_print(void) {
196 196
     //lv_obj_set_pos(buttonSet,BTN_X_PIXEL+SIMPLE_FIRST_PAGE_GRAP*2+1,(TFT_HEIGHT-BTN_Y_PIXEL)/2+2);
197 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 200
     //lv_btn_set_layout(buttonPrint, LV_LAYOUT_OFF);
201 201
     //lv_btn_set_layout(buttonSet, LV_LAYOUT_OFF);
202 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 207
     if (gCfgItems.multiple_language != 0) {
208 208
       //lv_label_set_text(label_print, main_menu.print);
209 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,7 +22,7 @@
22 22
 #pragma once
23 23
 
24 24
 #ifdef __cplusplus
25
-extern "C" { /* C-declarations for C++ */
25
+  extern "C" { /* C-declarations for C++ */
26 26
 #endif
27 27
 
28 28
 extern void lv_draw_ready_print(void);
@@ -35,5 +35,5 @@ extern void lv_clear_ready_print();
35 35
 
36 36
 //extern void disp_temp_ready_print();
37 37
 #ifdef __cplusplus
38
-} /* C-declarations for C++ */
38
+  } /* C-declarations for C++ */
39 39
 #endif

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

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

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

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

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

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

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

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

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

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

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

@@ -140,7 +140,7 @@ void lv_draw_tool(void) {
140 140
 
141 141
   LV_IMG_DECLARE(bmp_pic);
142 142
 
143
-  /*Create an Image button*/
143
+  // Create image buttons
144 144
   buttonPreHeat   = lv_imgbtn_create(scr, NULL);
145 145
   buttonExtrusion = lv_imgbtn_create(scr, NULL);
146 146
   buttonMove      = lv_imgbtn_create(scr, NULL);
@@ -210,7 +210,7 @@ void lv_draw_tool(void) {
210 210
   //lv_obj_set_pos(buttonMore,BTN_X_PIXEL*2+INTERVAL_V*3, BTN_Y_PIXEL+INTERVAL_H+titleHeight);
211 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 214
   lv_btn_set_layout(buttonPreHeat, LV_LAYOUT_OFF);
215 215
   lv_btn_set_layout(buttonExtrusion, LV_LAYOUT_OFF);
216 216
   lv_btn_set_layout(buttonMove, LV_LAYOUT_OFF);

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

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

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

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

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

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

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

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

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

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

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

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

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

@@ -25,92 +25,92 @@
25 25
 
26 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 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 115
 static const uint16_t st7796s_init[] = {
116 116
   DATASIZE_8BIT,

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

@@ -498,10 +498,10 @@
498 498
   #include "stm32f1/pins_STM3R_MINI.h"          // STM32F1                                env:STM32F103RE
499 499
 #elif MB(GTM32_PRO_VB)
500 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 501
 #elif MB(GTM32_MINI)
504 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 505
 #elif MB(GTM32_REV_B)
506 506
   #include "stm32f1/pins_GTM32_REV_B.h"         // STM32F1                                env:STM32F103RE
507 507
 #elif MB(MORPHEUS)
@@ -518,6 +518,14 @@
518 518
   #include "stm32f1/pins_MKS_ROBIN_NANO_V2.h"   // STM32F1                                env:mks_robin_nano35
519 519
 #elif MB(MKS_ROBIN_LITE)
520 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 529
 #elif MB(BTT_SKR_MINI_V1_1)
522 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 531
 #elif MB(BTT_SKR_MINI_E3_V1_0)
@@ -538,14 +546,6 @@
538 546
   #include "stm32f1/pins_FYSETC_CHEETAH_V12.h"  // STM32F1                                env:STM32F103RC_fysetc
539 547
 #elif MB(LONGER3D_LK)
540 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 549
 #elif MB(CCROBOT_MEEB_3DP)
550 550
   #include "stm32f1/pins_CCROBOT_MEEB_3DP.h"    // STM32F1                                env:STM32F103RC_meeb
551 551
 #elif MB(CHITU3D_V5)

Loading…
取消
儲存