Kaynağa Gözat

General cleanup

Scott Lahteine 7 yıl önce
ebeveyn
işleme
6131c62499
3 değiştirilmiş dosya ile 15 ekleme ve 19 silme
  1. 0
    4
      Marlin/Marlin_main.cpp
  2. 14
    14
      Marlin/servo.cpp
  3. 1
    1
      Marlin/stepper.cpp

+ 0
- 4
Marlin/Marlin_main.cpp Dosyayı Görüntüle

5858
 
5858
 
5859
     #else
5859
     #else
5860
 
5860
 
5861
-      #if !defined(z_servo_angle)
5862
-        const int z_servo_angle[2] = Z_SERVO_ANGLES;
5863
-      #endif
5864
-
5865
       const uint8_t probe_index = code_seen('P') ? code_value_byte() : Z_ENDSTOP_SERVO_NR;
5861
       const uint8_t probe_index = code_seen('P') ? code_value_byte() : Z_ENDSTOP_SERVO_NR;
5866
 
5862
 
5867
       SERIAL_PROTOCOLLNPGM("Servo probe test");
5863
       SERIAL_PROTOCOLLNPGM("Servo probe test");

+ 14
- 14
Marlin/servo.cpp Dosyayı Görüntüle

168
         SBI(TIFR, OCF3A);     // clear any pending interrupts;
168
         SBI(TIFR, OCF3A);     // clear any pending interrupts;
169
         SBI(ETIMSK, OCIE3A);  // enable the output compare interrupt
169
         SBI(ETIMSK, OCIE3A);  // enable the output compare interrupt
170
       #else
170
       #else
171
-        TIFR3 = _BV(OCF3A);     // clear any pending interrupts;
172
-        TIMSK3 =  _BV(OCIE3A) ; // enable the output compare interrupt
171
+        SBI(TIFR3, OCF3A);   // clear any pending interrupts;
172
+        SBI(TIMSK3, OCIE3A); // enable the output compare interrupt
173
       #endif
173
       #endif
174
       #ifdef WIRING
174
       #ifdef WIRING
175
         timerAttach(TIMER3OUTCOMPAREA_INT, Timer3Service);  // for Wiring platform only
175
         timerAttach(TIMER3OUTCOMPAREA_INT, Timer3Service);  // for Wiring platform only
183
       TCCR4B = _BV(CS41);     // set prescaler of 8
183
       TCCR4B = _BV(CS41);     // set prescaler of 8
184
       TCNT4 = 0;              // clear the timer count
184
       TCNT4 = 0;              // clear the timer count
185
       TIFR4 = _BV(OCF4A);     // clear any pending interrupts;
185
       TIFR4 = _BV(OCF4A);     // clear any pending interrupts;
186
-      TIMSK4 =  _BV(OCIE4A) ; // enable the output compare interrupt
186
+      TIMSK4 = _BV(OCIE4A);   // enable the output compare interrupt
187
     }
187
     }
188
   #endif
188
   #endif
189
 
189
 
193
       TCCR5B = _BV(CS51);     // set prescaler of 8
193
       TCCR5B = _BV(CS51);     // set prescaler of 8
194
       TCNT5 = 0;              // clear the timer count
194
       TCNT5 = 0;              // clear the timer count
195
       TIFR5 = _BV(OCF5A);     // clear any pending interrupts;
195
       TIFR5 = _BV(OCF5A);     // clear any pending interrupts;
196
-      TIMSK5 =  _BV(OCIE5A) ; // enable the output compare interrupt
196
+      TIMSK5 = _BV(OCIE5A);   // enable the output compare interrupt
197
     }
197
     }
198
   #endif
198
   #endif
199
 }
199
 }
203
   #ifdef WIRING
203
   #ifdef WIRING
204
     if (timer == _timer1) {
204
     if (timer == _timer1) {
205
       CBI(
205
       CBI(
206
-      #if defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__)
207
-        TIMSK1
208
-      #else
209
-        TIMSK
210
-      #endif
206
+        #if defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__)
207
+          TIMSK1
208
+        #else
209
+          TIMSK
210
+        #endif
211
           , OCIE1A);    // disable timer 1 output compare interrupt
211
           , OCIE1A);    // disable timer 1 output compare interrupt
212
       timerDetach(TIMER1OUTCOMPAREA_INT);
212
       timerDetach(TIMER1OUTCOMPAREA_INT);
213
     }
213
     }
214
     else if (timer == _timer3) {
214
     else if (timer == _timer3) {
215
       CBI(
215
       CBI(
216
-      #if defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__)
217
-        TIMSK3
218
-      #else
219
-        ETIMSK
220
-      #endif
216
+        #if defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__)
217
+          TIMSK3
218
+        #else
219
+          ETIMSK
220
+        #endif
221
           , OCIE3A);    // disable the timer3 output compare A interrupt
221
           , OCIE3A);    // disable the timer3 output compare A interrupt
222
       timerDetach(TIMER3OUTCOMPAREA_INT);
222
       timerDetach(TIMER3OUTCOMPAREA_INT);
223
     }
223
     }

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

271
  *  The slope of acceleration is calculated using v = u + at where t is the accumulated timer values of the steps so far.
271
  *  The slope of acceleration is calculated using v = u + at where t is the accumulated timer values of the steps so far.
272
  */
272
  */
273
 void Stepper::wake_up() {
273
 void Stepper::wake_up() {
274
-  //  TCNT1 = 0;
274
+  // TCNT1 = 0;
275
   ENABLE_STEPPER_DRIVER_INTERRUPT();
275
   ENABLE_STEPPER_DRIVER_INTERRUPT();
276
 }
276
 }
277
 
277
 

Loading…
İptal
Kaydet