Browse Source

Tweak some else clauses

Scott Lahteine 7 years ago
parent
commit
57a51fd5db
4 changed files with 14 additions and 13 deletions
  1. 5
    2
      Marlin/G26_Mesh_Validation_Tool.cpp
  2. 2
    1
      Marlin/MarlinSerial.cpp
  3. 4
    2
      Marlin/nozzle.cpp
  4. 3
    8
      Marlin/planner.cpp

+ 5
- 2
Marlin/G26_Mesh_Validation_Tool.cpp View File

@@ -684,7 +684,8 @@
684 684
           SERIAL_PROTOCOLLNPGM("?Prime length must be specified when not using an LCD.");
685 685
           return UBL_ERR;
686 686
         #endif
687
-      } else {
687
+      }
688
+      else {
688 689
         g26_prime_flag++;
689 690
         g26_prime_length = parser.value_linear_units();
690 691
         if (!WITHIN(g26_prime_length, 0.0, 25.0)) {
@@ -727,7 +728,9 @@
727 728
       if (!parser.seen('R')) {
728 729
         SERIAL_PROTOCOLLNPGM("?(R)epeat must be specified when not using an LCD.");
729 730
         return UBL_ERR;
730
-      } else g26_repeats = parser.has_value() ? parser.value_int() : GRID_MAX_POINTS + 1;
731
+      }
732
+      else
733
+        g26_repeats = parser.has_value() ? parser.value_int() : GRID_MAX_POINTS + 1;
731 734
     #endif
732 735
     if (g26_repeats < 1) {
733 736
       SERIAL_PROTOCOLLNPGM("?(R)epeat value not plausible; must be at least 1.");

+ 2
- 1
Marlin/MarlinSerial.cpp View File

@@ -320,7 +320,8 @@
320 320
           // space for us.
321 321
           if (TEST(M_UCSRxA, M_UDREx))
322 322
             _tx_udr_empty_irq();
323
-        } else {
323
+        }
324
+        else {
324 325
           // nop, the interrupt handler will free up space for us
325 326
         }
326 327
       }

+ 4
- 2
Marlin/nozzle.cpp View File

@@ -136,7 +136,8 @@ void Nozzle::circle(
136 136
       // Order of movement is pretty darn important here
137 137
       do_blocking_move_to_xy(start.x, start.y);
138 138
       do_blocking_move_to_z(start.z);
139
-    } else {
139
+    }
140
+    else {
140 141
       do_blocking_move_to_z(start.z);
141 142
       do_blocking_move_to_xy(start.x, start.y);
142 143
     }
@@ -160,7 +161,8 @@ void Nozzle::circle(
160 161
         // As above order is important
161 162
         do_blocking_move_to_z(initial.z);
162 163
         do_blocking_move_to_xy(initial.x, initial.y);
163
-      } else {
164
+      }
165
+      else {
164 166
         do_blocking_move_to_xy(initial.x, initial.y);
165 167
         do_blocking_move_to_z(initial.z);
166 168
       }

+ 3
- 8
Marlin/planner.cpp View File

@@ -470,14 +470,9 @@ void Planner::check_axes_activity() {
470 470
           if (fan_kick_end[f] == 0) { \
471 471
             fan_kick_end[f] = ms + FAN_KICKSTART_TIME; \
472 472
             tail_fan_speed[f] = 255; \
473
-          } else { \
474
-            if (PENDING(ms, fan_kick_end[f])) { \
475
-              tail_fan_speed[f] = 255; \
476
-            } \
477
-          } \
478
-        } else { \
479
-          fan_kick_end[f] = 0; \
480
-        }
473
+          } else if (PENDING(ms, fan_kick_end[f])) \
474
+            tail_fan_speed[f] = 255; \
475
+        } else fan_kick_end[f] = 0
481 476
 
482 477
       #if HAS_FAN0
483 478
         KICKSTART_FAN(0);

Loading…
Cancel
Save