Browse Source

Syntax tweaks

Scott Lahteine 7 years ago
parent
commit
27c5692b13
2 changed files with 9 additions and 6 deletions
  1. 1
    1
      Marlin/src/module/planner.cpp
  2. 8
    5
      Marlin/src/module/temperature.cpp

+ 1
- 1
Marlin/src/module/planner.cpp View File

@@ -1128,7 +1128,7 @@ void Planner::_buffer_line(const float &a, const float &b, const float &c, const
1128 1128
   // Calculate and limit speed in mm/sec for each axis
1129 1129
   float current_speed[NUM_AXIS], speed_factor = 1.0; // factor <1 decreases speed
1130 1130
   LOOP_XYZE(i) {
1131
-    const float cs = FABS(current_speed[i] = delta_mm[i] * inverse_mm_s);
1131
+    const float cs = FABS((current_speed[i] = delta_mm[i] * inverse_mm_s));
1132 1132
     #if ENABLED(DISTINCT_E_FACTORS)
1133 1133
       if (i == E_AXIS) i += extruder;
1134 1134
     #endif

+ 8
- 5
Marlin/src/module/temperature.cpp View File

@@ -1286,11 +1286,14 @@ void Temperature::init() {
1286 1286
           case TIMER1A: case TIMER1B:             //_SET_CS(1, val);
1287 1287
                                                     break;
1288 1288
         #endif
1289
-        #ifdef TCCR2
1290
-          case TIMER2: case TIMER2:                 _SET_CS(2, val); break;
1291
-        #endif
1292
-        #ifdef TCCR2A
1293
-          case TIMER2A: case TIMER2B:               _SET_CS(2, val); break;
1289
+        #if defined(TCCR2) || defined(TCCR2A)
1290
+          #ifdef TCCR2
1291
+            case TIMER2:
1292
+          #endif
1293
+          #ifdef TCCR2A
1294
+            case TIMER2A: case TIMER2B:
1295
+          #endif
1296
+                                                    _SET_CS(2, val); break;
1294 1297
         #endif
1295 1298
         #ifdef TCCR3A
1296 1299
           case TIMER3A: case TIMER3B: case TIMER3C: _SET_CS(3, val); break;

Loading…
Cancel
Save