Browse Source

Whitespace cleanup

Scott Lahteine 4 years ago
parent
commit
8e0fac897b

+ 2
- 3
Marlin/src/HAL/ESP32/WebSocketSerial.cpp View File

@@ -86,7 +86,7 @@ int RingBuffer::read() {
86 86
 ring_buffer_pos_t RingBuffer::read(uint8_t *buffer) {
87 87
    ring_buffer_pos_t len = available();
88 88
 
89
-  for(ring_buffer_pos_t i = 0; read_index != write_index; i++) {
89
+  for (ring_buffer_pos_t i = 0; read_index != write_index; i++) {
90 90
     buffer[i] = data[read_index];
91 91
     read_index = NEXT_INDEX(read_index, size);
92 92
   }
@@ -139,9 +139,8 @@ size_t WebSocketSerial::write(const uint8_t c) {
139 139
 
140 140
 size_t WebSocketSerial::write(const uint8_t* buffer, size_t size) {
141 141
   size_t written = 0;
142
-  for(size_t i = 0; i < size; i++) {
142
+  for (size_t i = 0; i < size; i++)
143 143
     written += write(buffer[i]);
144
-  }
145 144
   return written;
146 145
 }
147 146
 

+ 2
- 2
Marlin/src/HAL/STM32/tft/xpt2046.cpp View File

@@ -155,9 +155,9 @@ uint16_t XPT2046::getRawData(const XPTCoordinate coordinate) {
155 155
 
156 156
 uint16_t XPT2046::HardwareIO(uint16_t data) {
157 157
   __HAL_SPI_ENABLE(&SPIx);
158
-  while((SPIx.Instance->SR & SPI_FLAG_TXE) != SPI_FLAG_TXE) {}
158
+  while ((SPIx.Instance->SR & SPI_FLAG_TXE) != SPI_FLAG_TXE) {}
159 159
   SPIx.Instance->DR = data;
160
-  while((SPIx.Instance->SR & SPI_FLAG_RXNE) != SPI_FLAG_RXNE) {}
160
+  while ((SPIx.Instance->SR & SPI_FLAG_RXNE) != SPI_FLAG_RXNE) {}
161 161
   __HAL_SPI_DISABLE(&SPIx);
162 162
 
163 163
   return SPIx.Instance->DR;

+ 2
- 2
Marlin/src/feature/binary_stream.h View File

@@ -441,9 +441,9 @@ public:
441 441
   }
442 442
 
443 443
   void dispatch() {
444
-    switch(static_cast<Protocol>(packet.header.protocol())) {
444
+    switch (static_cast<Protocol>(packet.header.protocol())) {
445 445
       case Protocol::CONTROL:
446
-        switch(static_cast<ProtocolControl>(packet.header.type())) {
446
+        switch (static_cast<ProtocolControl>(packet.header.type())) {
447 447
           case ProtocolControl::CLOSE: // revert back to ASCII mode
448 448
             card.flag.binary_mode = false;
449 449
             break;

+ 1
- 1
Marlin/src/feature/spindle_laser.h View File

@@ -224,7 +224,7 @@ public:
224 224
      */
225 225
 
226 226
     // Force disengage planner power control
227
-    static inline void inline_disable()	{
227
+    static inline void inline_disable() {
228 228
       isReady = false;
229 229
       unitPower = 0;
230 230
       planner.laser_inline.status.isPlanned = false;

+ 1
- 1
Marlin/src/gcode/control/M993_M994.cpp View File

@@ -74,7 +74,7 @@ void GcodeSuite::M994() {
74 74
   W25QXX.init(SPI_QUARTER_SPEED);
75 75
   W25QXX.SPI_FLASH_BulkErase();
76 76
   SERIAL_ECHOPGM("Load SPI Flash");
77
-  while(addr < SPI_FLASH_SIZE) {
77
+  while (addr < SPI_FLASH_SIZE) {
78 78
     card.read(buf, COUNT(buf));
79 79
     W25QXX.SPI_FLASH_BufferWrite(buf, addr, COUNT(buf));
80 80
     addr += COUNT(buf);

+ 2
- 2
Marlin/src/lcd/dwin/e3v2/rotary_encoder.cpp View File

@@ -194,7 +194,7 @@ ENCODER_DiffState Encoder_ReceiveAnalyze(void) {
194 194
     unsigned char temp_Counter;
195 195
     for (temp_Counter = 0; temp_Counter < LED_NUM; temp_Counter++) {
196 196
       LED_DataArray[temp_Counter] = 0;
197
-      switch(RGB_Scale) {
197
+      switch (RGB_Scale) {
198 198
         case RGB_SCALE_R10_G7_B5: LED_DataArray[temp_Counter] = (luminance*10/10) << 8 | (luminance*7/10) << 16 | luminance*5/10; break;
199 199
         case RGB_SCALE_R10_G7_B4: LED_DataArray[temp_Counter] = (luminance*10/10) << 8 | (luminance*7/10) << 16 | luminance*4/10; break;
200 200
         case RGB_SCALE_R10_G8_B7: LED_DataArray[temp_Counter] = (luminance*10/10) << 8 | (luminance*8/10) << 16 | luminance*7/10; break;
@@ -213,7 +213,7 @@ ENCODER_DiffState Encoder_ReceiveAnalyze(void) {
213 213
     bool LED_R_Flag = 0, LED_G_Flag = 0, LED_B_Flag = 0;
214 214
 
215 215
     for (temp_Counter = 0; temp_Counter < LED_NUM; temp_Counter++) {
216
-      switch(RGB_Scale) {
216
+      switch (RGB_Scale) {
217 217
         case RGB_SCALE_R10_G7_B5: {
218 218
           LED_R_Data[temp_Counter] = luminance*10/10;
219 219
           LED_G_Data[temp_Counter] = luminance*7/10;

+ 2
- 2
Marlin/src/lcd/extui/lib/anycubic_i3mega/anycubic_i3mega_lcd.cpp View File

@@ -27,8 +27,8 @@
27 27
 
28 28
 #include "../../../../inc/MarlinConfig.h"
29 29
 #include "../../ui_api.h"
30
-#include "../../../../MarlinCore.h" // for quickstop_stepper and disable_steppers
31
-#include "../../../../module/motion.h"	// for A20 read printing speed feedrate_percentage
30
+#include "../../../../MarlinCore.h"     // for quickstop_stepper and disable_steppers
31
+#include "../../../../module/motion.h"  // for A20 read printing speed feedrate_percentage
32 32
 
33 33
 // command sending macro's with debugging capability
34 34
 #define SEND_PGM(x)                                 send_P(PSTR(x))

+ 1
- 1
Marlin/src/lcd/extui/lib/mks_ui/draw_ui.h View File

@@ -161,7 +161,7 @@ typedef struct {
161 161
   uint8_t waitEndMoves;
162 162
   uint16_t moveSpeed;
163 163
   float move_dist;
164
-  uint8_t	F[4];
164
+  uint8_t F[4];
165 165
 } UI_CFG;
166 166
 
167 167
 typedef enum {

+ 2
- 2
Marlin/src/lcd/tft/ili9341.h View File

@@ -33,10 +33,10 @@
33 33
 #define ILI9341_MADCTL_RGB        0x00
34 34
 #define ILI9341_MADCTL_MH         0x04 // Horizontal Refresh Order
35 35
 
36
-#define ILI9341_ORIENTATION_UP    ILI9341_MADCTL_MY	                                        // 240x320 ; Cable on the upper side
36
+#define ILI9341_ORIENTATION_UP    ILI9341_MADCTL_MY                                         // 240x320 ; Cable on the upper side
37 37
 #define ILI9341_ORIENTATION_RIGHT ILI9341_MADCTL_MV                                         // 320x240 ; Cable on the right side
38 38
 #define ILI9341_ORIENTATION_LEFT  ILI9341_MADCTL_MY | ILI9341_MADCTL_MX | ILI9341_MADCTL_MV // 320x240 ; Cable on the left side
39
-#define ILI9341_ORIENTATION_DOWN  ILI9341_MADCTL_MX	                                        // 240x320 ; Cable on the upper side
39
+#define ILI9341_ORIENTATION_DOWN  ILI9341_MADCTL_MX                                         // 240x320 ; Cable on the upper side
40 40
 
41 41
 #ifndef ILI9341_COLOR_RGB
42 42
   #define ILI9341_COLOR_BGR

+ 2
- 2
Marlin/src/lcd/tft/st7735.h View File

@@ -33,7 +33,7 @@
33 33
 #define ST7735_MADCTL_RGB         0x00
34 34
 #define ST7735_MADCTL_MH          0x04 // Horizontal Refresh Order
35 35
 
36
-#define ST7735_ORIENTATION_UP     0x00							                	// 128x160 ; Cable on the upper side
36
+#define ST7735_ORIENTATION_UP     0x00                                // 128x160 ; Cable on the upper side
37 37
 #define ST7735_ORIENTATION_RIGHT  ST7735_MADCTL_MV | ST7735_MADCTL_MY // 160x128 ; Cable on the right side
38 38
 #define ST7735_ORIENTATION_LEFT   ST7735_MADCTL_MV | ST7735_MADCTL_MX // 160x128 ; Cable on the left side
39 39
 #define ST7735_ORIENTATION_DOWN   ST7735_MADCTL_MX | ST7735_MADCTL_MY // 128x160 ; Cable on the lower side
@@ -71,7 +71,7 @@
71 71
 #define ST7735_IDMOFF             0x38 // Idle Mode Off
72 72
 #define ST7735_IDMON              0x39 // Idle Mode On
73 73
 #define ST7735_COLMOD             0x3A // Interface Pixel Format
74
-#define ST7735_RDID1              0xDA //	Read ID1 Value
74
+#define ST7735_RDID1              0xDA // Read ID1 Value
75 75
 #define ST7735_RDID2              0xDB // Read ID2 Value
76 76
 #define ST7735_RDID3              0xDC // Read ID3 Value
77 77
 

+ 1
- 1
Marlin/src/lcd/tft/st7789v.h View File

@@ -89,7 +89,7 @@
89 89
 #define ST7789V_WRCABCMB          0x5E // Write CABC Minimum Brightness
90 90
 #define ST7789V_RDCABCMB          0x5F // Read CABC Minimum Brightness
91 91
 #define ST7789V_RDABCSDR          0x68 // Read Automatic Brightness Control Self-Diagnostic Result
92
-#define ST7789V_RDID1             0xDA //	Read ID1 Value
92
+#define ST7789V_RDID1             0xDA // Read ID1 Value
93 93
 #define ST7789V_RDID2             0xDB // Read ID2 Value
94 94
 #define ST7789V_RDID3             0xDC // Read ID3 Value
95 95
 

+ 21
- 21
Marlin/src/lcd/tft/st7796s.h View File

@@ -133,8 +133,8 @@ static const uint16_t st7796s_init[] = {
133 133
   ESC_REG(ST7796S_DOCA), 0x0040, 0x008A, 0x0000, 0x0000, 0x0029, 0x0019, 0x00A5, 0x0033,
134 134
 
135 135
   /* Gamma Correction. */
136
-  ESC_REG(ST7796S_PGC), 0x00F0,	0x0004, 0x0008, 0x0009, 0x0008, 0x0015,	0x002F,	0x0042,	0x0046,	0x0028,	0x0015,	0x0016,	0x0029,	0x002D,
137
-  ESC_REG(ST7796S_NGC), 0x00F0,	0x0004,	0x0009,	0x0009,	0x0008,	0x0015,	0x002E,	0x0046,	0x0046,	0x0028,	0x0015,	0x0015,	0x0029,	0x002D,
136
+  ESC_REG(ST7796S_PGC), 0x00F0, 0x0004, 0x0008, 0x0009, 0x0008, 0x0015, 0x002F, 0x0042, 0x0046, 0x0028, 0x0015, 0x0016, 0x0029, 0x002D,
137
+  ESC_REG(ST7796S_NGC), 0x00F0, 0x0004, 0x0009, 0x0009, 0x0008, 0x0015, 0x002E, 0x0046, 0x0046, 0x0028, 0x0015, 0x0015, 0x0029, 0x002D,
138 138
 
139 139
   ESC_REG(ST7796S_NORON),
140 140
   ESC_REG(ST7796S_WRCTRLD), 0x0024,
@@ -146,30 +146,30 @@ static const uint16_t st7796s_init[] = {
146 146
 
147 147
 static const uint16_t lerdge_st7796s_init[] = {
148 148
   DATASIZE_8BIT,
149
-	ESC_REG(ST7796S_CSCON), 0x00C3,  // enable command 2 part I
150
-	ESC_REG(ST7796S_CSCON), 0x0096,  // enable command 2 part II
149
+  ESC_REG(ST7796S_CSCON), 0x00C3,  // enable command 2 part I
150
+  ESC_REG(ST7796S_CSCON), 0x0096,  // enable command 2 part II
151 151
 
152
-	ESC_REG(ST7796S_MADCTL), ST7796S_MADCTL_DATA,
152
+  ESC_REG(ST7796S_MADCTL), ST7796S_MADCTL_DATA,
153 153
   ESC_REG(ST7796S_COLMOD), 0x0055,
154 154
 
155
-	ESC_REG(ST7796S_DIC), 0x0001,  // 1-dot inversion
156
-	ESC_REG(ST7796S_EM), 0x00C6,
155
+  ESC_REG(ST7796S_DIC), 0x0001,  // 1-dot inversion
156
+  ESC_REG(ST7796S_EM), 0x00C6,
157 157
 
158
-	ESC_REG(ST7796S_PWR2), 0x0015,
159
-	ESC_REG(ST7796S_PWR3), 0x00AF,
160
-	ESC_REG(0xC3), 0x0009,       // Register not documented in datasheet
161
-	ESC_REG(ST7796S_VCMPCTL), 0x0022,
162
-	ESC_REG(ST7796S_VCMOST), 0x0000,
163
-	ESC_REG(ST7796S_DOCA), 0x0040, 0x008A, 0x0000, 0x0000, 0x0029, 0x0019, 0x00A5, 0x0033,
158
+  ESC_REG(ST7796S_PWR2), 0x0015,
159
+  ESC_REG(ST7796S_PWR3), 0x00AF,
160
+  ESC_REG(0xC3), 0x0009,       // Register not documented in datasheet
161
+  ESC_REG(ST7796S_VCMPCTL), 0x0022,
162
+  ESC_REG(ST7796S_VCMOST), 0x0000,
163
+  ESC_REG(ST7796S_DOCA), 0x0040, 0x008A, 0x0000, 0x0000, 0x0029, 0x0019, 0x00A5, 0x0033,
164 164
 
165 165
   /* Gamma Correction. */
166
-  ESC_REG(ST7796S_PGC), 0x00F0,	0x0004, 0x0008, 0x0009, 0x0008, 0x0015,	0x002F,	0x0042,	0x0046,	0x0028,	0x0015,	0x0016,	0x0029,	0x002D,
167
-	ESC_REG(ST7796S_NGC), 0x00F0,	0x0004,	0x0009,	0x0009,	0x0008,	0x0015,	0x002E,	0x0046,	0x0046,	0x0028,	0x0015,	0x0015,	0x0029,	0x002D,
168
-
169
-	ESC_REG(ST7796S_INVON),      // Display inversion ON
170
-	ESC_REG(ST7796S_WRCTRLD), 0x0024,
171
-	ESC_REG(ST7796S_CSCON), 0x003C,  // disable command 2 part I
172
-	ESC_REG(ST7796S_CSCON), 0x0069,  // disable command 2 part II
173
-	ESC_REG(ST7796S_DISPON),
166
+  ESC_REG(ST7796S_PGC), 0x00F0, 0x0004, 0x0008, 0x0009, 0x0008, 0x0015, 0x002F, 0x0042, 0x0046, 0x0028, 0x0015, 0x0016, 0x0029, 0x002D,
167
+  ESC_REG(ST7796S_NGC), 0x00F0, 0x0004, 0x0009, 0x0009, 0x0008, 0x0015, 0x002E, 0x0046, 0x0046, 0x0028, 0x0015, 0x0015, 0x0029, 0x002D,
168
+
169
+  ESC_REG(ST7796S_INVON),      // Display inversion ON
170
+  ESC_REG(ST7796S_WRCTRLD), 0x0024,
171
+  ESC_REG(ST7796S_CSCON), 0x003C,  // disable command 2 part I
172
+  ESC_REG(ST7796S_CSCON), 0x0069,  // disable command 2 part II
173
+  ESC_REG(ST7796S_DISPON),
174 174
   ESC_END
175 175
 };

+ 1
- 1
Marlin/src/lcd/tft/ui_320x240.cpp View File

@@ -603,7 +603,7 @@ void MenuItem_confirm::draw_select_screen(PGM_P const yes, PGM_P const no, const
603 603
     touch.clear();
604 604
 
605 605
     if (calibration_stage < CALIBRATION_SUCCESS) {
606
-      switch(calibration_stage) {
606
+      switch (calibration_stage) {
607 607
         case CALIBRATION_POINT_1: tft_string.set("Top Left"); break;
608 608
         case CALIBRATION_POINT_2: y = TFT_HEIGHT - 21; tft_string.set("Bottom Left"); break;
609 609
         case CALIBRATION_POINT_3: x = TFT_WIDTH  - 21; tft_string.set("Top Right"); break;

+ 1
- 1
Marlin/src/lcd/tft/ui_480x320.cpp View File

@@ -608,7 +608,7 @@ void MenuItem_confirm::draw_select_screen(PGM_P const yes, PGM_P const no, const
608 608
     touch.clear();
609 609
 
610 610
     if (calibration_stage < CALIBRATION_SUCCESS) {
611
-      switch(calibration_stage) {
611
+      switch (calibration_stage) {
612 612
         case CALIBRATION_POINT_1: tft_string.set("Top Left"); break;
613 613
         case CALIBRATION_POINT_2: y = TFT_HEIGHT - 21; tft_string.set("Bottom Left"); break;
614 614
         case CALIBRATION_POINT_3: x = TFT_WIDTH  - 21; tft_string.set("Top Right"); break;

Loading…
Cancel
Save