Ver código fonte

General cleanup

Scott Lahteine 4 anos atrás
pai
commit
9b78138600

+ 4
- 4
Marlin/src/HAL/LPC1768/HAL_SPI.cpp Ver arquivo

@@ -370,19 +370,19 @@ void SPIClass::updateSettings() {
370 370
   switch (_currentSetting->dataMode) {
371 371
     case SPI_MODE0:
372 372
       HW_SPI_init.CPHA = SSP_CPHA_FIRST;
373
-	    HW_SPI_init.CPOL = SSP_CPOL_HI;
373
+      HW_SPI_init.CPOL = SSP_CPOL_HI;
374 374
       break;
375 375
     case SPI_MODE1:
376 376
       HW_SPI_init.CPHA = SSP_CPHA_SECOND;
377
-	    HW_SPI_init.CPOL = SSP_CPOL_HI;
377
+      HW_SPI_init.CPOL = SSP_CPOL_HI;
378 378
       break;
379 379
     case SPI_MODE2:
380 380
       HW_SPI_init.CPHA = SSP_CPHA_FIRST;
381
-	    HW_SPI_init.CPOL = SSP_CPOL_LO;
381
+      HW_SPI_init.CPOL = SSP_CPOL_LO;
382 382
       break;
383 383
     case SPI_MODE3:
384 384
       HW_SPI_init.CPHA = SSP_CPHA_SECOND;
385
-	    HW_SPI_init.CPOL = SSP_CPOL_LO;
385
+      HW_SPI_init.CPOL = SSP_CPOL_LO;
386 386
       break;
387 387
     default:
388 388
       break;

+ 1
- 1
Marlin/src/HAL/STM32F1/sdio.cpp Ver arquivo

@@ -108,7 +108,7 @@ bool SDIO_ReadBlock_DMA(uint32_t blockAddress, uint8_t *data) {
108 108
     SDIO_CLEAR_FLAG(SDIO_ICR_CMD_FLAGS | SDIO_ICR_DATA_FLAGS);
109 109
     dma_disable(SDIO_DMA_DEV, SDIO_DMA_CHANNEL);
110 110
     return false;
111
-	}
111
+  }
112 112
 
113 113
   //Wait for DMA transaction to complete
114 114
   while ((DMA2_BASE->ISR & (DMA_ISR_TEIF4|DMA_ISR_TCIF4)) == 0 ) { /* wait */ }

+ 1
- 3
Marlin/src/gcode/motion/G2_G3.cpp Ver arquivo

@@ -115,9 +115,7 @@ void plan_arc(
115 115
   );
116 116
   // Divide total travel by nominal segment length
117 117
   uint16_t segments = FLOOR(mm_of_travel / seg_length);
118
-  if (segments < min_segments) {            // Too few segments?
119
-    segments = min_segments;                // More segments
120
-  }
118
+  NOLESS(segments, min_segments);         // At least some segments
121 119
   seg_length = mm_of_travel / segments;
122 120
 
123 121
   /**

+ 5
- 5
Marlin/src/lcd/dwin/e3v2/rotary_encoder.cpp Ver arquivo

@@ -127,15 +127,15 @@ ENCODER_DiffState Encoder_ReceiveAnalyze(void) {
127 127
 
128 128
       // if must encoder rati multiplier
129 129
       if (EncoderRate.encoderRateEnabled) {
130
-        const float abs_diff = ABS(temp_diff);
131
-        const float encoderMovementSteps = abs_diff / (ENCODER_PULSES_PER_STEP);
130
+        const float abs_diff = ABS(temp_diff),
131
+                    encoderMovementSteps = abs_diff / (ENCODER_PULSES_PER_STEP);
132 132
         if (EncoderRate.lastEncoderTime) {
133 133
           // Note that the rate is always calculated between two passes through the
134 134
           // loop and that the abs of the temp_diff value is tracked.
135 135
           const float encoderStepRate = encoderMovementSteps / float(ms - EncoderRate.lastEncoderTime) * 1000;
136
-          if (encoderStepRate >= ENCODER_100X_STEPS_PER_SEC)  encoderMultiplier = 100;
137
-          else if (encoderStepRate >= ENCODER_10X_STEPS_PER_SEC) encoderMultiplier = 10;
138
-          else if (encoderStepRate >= ENCODER_5X_STEPS_PER_SEC) encoderMultiplier = 5;
136
+               if (encoderStepRate >= ENCODER_100X_STEPS_PER_SEC) encoderMultiplier = 100;
137
+          else if (encoderStepRate >= ENCODER_10X_STEPS_PER_SEC)  encoderMultiplier = 10;
138
+          else if (encoderStepRate >= ENCODER_5X_STEPS_PER_SEC)   encoderMultiplier = 5;
139 139
         }
140 140
         EncoderRate.lastEncoderTime = ms;
141 141
       }

+ 3
- 3
Marlin/src/lcd/dwin/e3v2/rotary_encoder.h Ver arquivo

@@ -55,9 +55,9 @@ extern ENCODER_Rate EncoderRate;
55 55
 
56 56
 typedef enum {
57 57
   ENCODER_DIFF_NO    = 0,
58
-	ENCODER_DIFF_CW    = 1,
58
+  ENCODER_DIFF_CW    = 1,
59 59
   ENCODER_DIFF_CCW   = 2,
60
-	ENCODER_DIFF_ENTER = 3
60
+  ENCODER_DIFF_ENTER = 3
61 61
 } ENCODER_DiffState;
62 62
 
63 63
 /*编码器初始化 PB12:Encoder_A PB13:Encoder_B PB14:Encoder_C*/
@@ -87,7 +87,7 @@ ENCODER_DiffState Encoder_ReceiveAnalyze(void);
87 87
   /*状态LED初始化*/
88 88
   void STATE_LED_Configuration(void);
89 89
 
90
-	/*LED灯操作*/
90
+  /*LED灯操作*/
91 91
   void LED_Action(void);
92 92
 
93 93
   /*LED初始化*/

+ 4
- 4
Marlin/src/pins/stm32f1/pins_CREALITY_V4.h Ver arquivo

@@ -161,7 +161,7 @@
161 161
 
162 162
 #if ENABLED(RET6_12864_LCD)
163 163
 
164
-  /* RET6 12864 LCD */
164
+  // RET6 12864 LCD
165 165
   #define LCD_PINS_RS                       PB12
166 166
   #define LCD_PINS_ENABLE                   PB15
167 167
   #define LCD_PINS_D4                       PB13
@@ -174,7 +174,7 @@
174 174
 
175 175
 #elif ENABLED(VET6_12864_LCD)
176 176
 
177
-  /* VET6 12864 LCD */
177
+  // VET6 12864 LCD
178 178
   #define LCD_PINS_RS                       PA4
179 179
   #define LCD_PINS_ENABLE                   PA7
180 180
   #define LCD_PINS_D4                       PA5
@@ -185,7 +185,7 @@
185 185
 
186 186
 #elif ENABLED(DWIN_CREALITY_LCD)
187 187
 
188
-  /* RET6 DWIN ENCODER LCD */
188
+  // RET6 DWIN ENCODER LCD
189 189
   #define BTN_ENC                           PB14
190 190
   #define BTN_EN1                           PB15
191 191
   #define BTN_EN2                           PB12
@@ -198,7 +198,7 @@
198 198
 
199 199
 #elif ENABLED(DWIN_VET6_CREALITY_LCD)
200 200
 
201
-  /* VET6 DWIN ENCODER LCD */
201
+  // VET6 DWIN ENCODER LCD
202 202
   #define BTN_ENC                           PA6
203 203
   #define BTN_EN1                           PA7
204 204
   #define BTN_EN2                           PA4

Carregando…
Cancelar
Salvar