Browse Source

misc. cleanup

Scott Lahteine 3 years ago
parent
commit
fd270ddc6c

+ 3
- 3
Marlin/src/HAL/STM32/tft/tft_spi.cpp View File

@@ -207,12 +207,12 @@ void TFT_SPI::Transmit(uint16_t Data) {
207 207
   while ((SPIx.Instance->SR & SPI_FLAG_BSY) == SPI_FLAG_BSY) {}
208 208
 
209 209
   if (TFT_MISO_PIN != TFT_MOSI_PIN)
210
-    __HAL_SPI_CLEAR_OVRFLAG(&SPIx);   /* Clear overrun flag in 2 Lines communication mode because received is not read */
210
+    __HAL_SPI_CLEAR_OVRFLAG(&SPIx);   // Clear overrun flag in 2 Lines communication mode because received is not read
211 211
 }
212 212
 
213 213
 void TFT_SPI::TransmitDMA(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Count) {
214 214
   // Wait last dma finish, to start another
215
-  while(isBusy()) { }
215
+  while (isBusy()) { /* nada */ }
216 216
 
217 217
   DMAtx.Init.MemInc = MemoryIncrease;
218 218
   HAL_DMA_Init(&DMAtx);
@@ -225,7 +225,7 @@ void TFT_SPI::TransmitDMA(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Coun
225 225
   HAL_DMA_Start(&DMAtx, (uint32_t)Data, (uint32_t)&(SPIx.Instance->DR), Count);
226 226
   __HAL_SPI_ENABLE(&SPIx);
227 227
 
228
-  SET_BIT(SPIx.Instance->CR2, SPI_CR2_TXDMAEN);   /* Enable Tx DMA Request */
228
+  SET_BIT(SPIx.Instance->CR2, SPI_CR2_TXDMAEN);   // Enable Tx DMA Request
229 229
 
230 230
   HAL_DMA_PollForTransfer(&DMAtx, HAL_DMA_FULL_TRANSFER, HAL_MAX_DELAY);
231 231
   Abort();

+ 2
- 2
Marlin/src/lcd/extui/lib/anycubic_chiron/chiron_tft.cpp View File

@@ -310,7 +310,7 @@ namespace Anycubic {
310 310
 
311 311
   bool ChironTFT::ReadTFTCommand() {
312 312
     bool command_ready = false;
313
-    while(TFTSer.available() > 0 && command_len < MAX_CMND_LEN) {
313
+    while (TFTSer.available() > 0 && command_len < MAX_CMND_LEN) {
314 314
       panel_command[command_len] = TFTSer.read();
315 315
       if (panel_command[command_len] == '\n') {
316 316
         command_ready = true;
@@ -338,7 +338,7 @@ namespace Anycubic {
338 338
 
339 339
   int8_t ChironTFT::Findcmndpos(const char * buff, char q) {
340 340
     int8_t pos = 0;
341
-    do { if (buff[pos] == q) return pos; } while(++pos < MAX_CMND_LEN);
341
+    do { if (buff[pos] == q) return pos; } while (++pos < MAX_CMND_LEN);
342 342
     return -1;
343 343
   }
344 344
 

+ 1
- 1
Marlin/src/lcd/extui/lib/dgus/mks/DGUSScreenHandler.cpp View File

@@ -264,7 +264,7 @@ void DGUSScreenHandler::DGUSLCD_SendTMCStepValue(DGUS_VP_Variable &var) {
264 264
 
265 265
   void DGUSScreenHandler::SDPrintingFinished() {
266 266
     if (DGUSAutoTurnOff) {
267
-      while(!queue.ring_buffer.empty()) queue.advance();
267
+      while (!queue.ring_buffer.empty()) queue.advance();
268 268
       gcode.process_subcommands_now_P(PSTR("M81"));
269 269
     }
270 270
     GotoScreen(MKSLCD_SCREEN_PrintDone);

+ 4
- 2
Marlin/src/lcd/extui/lib/mks_ui/draw_print_file.cpp View File

@@ -66,8 +66,10 @@ uint8_t sel_id = 0;
66 66
     //root2.rewind();
67 67
     //SERIAL_ECHOLN(list_file.curDirPath);
68 68
 
69
-    if (curDirLever != 0) card.cd(list_file.curDirPath);
70
-    else card.cdroot(); // while(card.cdup());
69
+    if (curDirLever != 0)
70
+      card.cd(list_file.curDirPath);
71
+    else
72
+      card.cdroot();
71 73
 
72 74
     const uint16_t fileCnt = card.get_num_Files();
73 75
 

+ 1
- 1
Marlin/src/lcd/menu/menu_ubl.cpp View File

@@ -476,7 +476,7 @@ void ubl_map_screen() {
476 476
         if (position_is_reachable(xy)) break; // Found a valid point
477 477
         ui.encoderPosition += step_dir;       // Test the next point
478 478
       #endif
479
-    } while(ENABLED(IS_KINEMATIC));
479
+    } while (ENABLED(IS_KINEMATIC));
480 480
 
481 481
     // Determine number of points to edit
482 482
     #if IS_KINEMATIC

Loading…
Cancel
Save