Kaynağa Gözat

Syntax tweaks

Scott Lahteine 7 yıl önce
ebeveyn
işleme
737cee4b8c
2 değiştirilmiş dosya ile 9 ekleme ve 6 silme
  1. 8
    5
      Marlin/Marlin_main.cpp
  2. 1
    1
      Marlin/planner.cpp

+ 8
- 5
Marlin/Marlin_main.cpp Dosyayı Görüntüle

@@ -13305,11 +13305,14 @@ void prepare_move_to_destination() {
13305 13305
         case TIMER1A: case TIMER1B:             //_SET_CS(1, val);
13306 13306
                                                   break;
13307 13307
       #endif
13308
-      #ifdef TCCR2
13309
-        case TIMER2: case TIMER2:                 _SET_CS(2, val); break;
13310
-      #endif
13311
-      #ifdef TCCR2A
13312
-        case TIMER2A: case TIMER2B:               _SET_CS(2, val); break;
13308
+      #if defined(TCCR2) || defined(TCCR2A)
13309
+        #ifdef TCCR2
13310
+          case TIMER2:
13311
+        #endif
13312
+        #ifdef TCCR2A
13313
+          case TIMER2A: case TIMER2B:
13314
+        #endif
13315
+                                                  _SET_CS(2, val); break;
13313 13316
       #endif
13314 13317
       #ifdef TCCR3A
13315 13318
         case TIMER3A: case TIMER3B: case TIMER3C: _SET_CS(3, val); break;

+ 1
- 1
Marlin/planner.cpp Dosyayı Görüntüle

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

Loading…
İptal
Kaydet