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
   // Calculate and limit speed in mm/sec for each axis
1128
   // Calculate and limit speed in mm/sec for each axis
1129
   float current_speed[NUM_AXIS], speed_factor = 1.0; // factor <1 decreases speed
1129
   float current_speed[NUM_AXIS], speed_factor = 1.0; // factor <1 decreases speed
1130
   LOOP_XYZE(i) {
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
     #if ENABLED(DISTINCT_E_FACTORS)
1132
     #if ENABLED(DISTINCT_E_FACTORS)
1133
       if (i == E_AXIS) i += extruder;
1133
       if (i == E_AXIS) i += extruder;
1134
     #endif
1134
     #endif

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

1286
           case TIMER1A: case TIMER1B:             //_SET_CS(1, val);
1286
           case TIMER1A: case TIMER1B:             //_SET_CS(1, val);
1287
                                                     break;
1287
                                                     break;
1288
         #endif
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
         #endif
1297
         #endif
1295
         #ifdef TCCR3A
1298
         #ifdef TCCR3A
1296
           case TIMER3A: case TIMER3B: case TIMER3C: _SET_CS(3, val); break;
1299
           case TIMER3A: case TIMER3B: case TIMER3C: _SET_CS(3, val); break;

Loading…
Cancel
Save