Browse Source

General cleanup

Scott Lahteine 7 years ago
parent
commit
6131c62499
3 changed files with 15 additions and 19 deletions
  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 View File

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

+ 14
- 14
Marlin/servo.cpp View File

@@ -168,8 +168,8 @@ static void initISR(timer16_Sequence_t timer) {
168 168
         SBI(TIFR, OCF3A);     // clear any pending interrupts;
169 169
         SBI(ETIMSK, OCIE3A);  // enable the output compare interrupt
170 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 173
       #endif
174 174
       #ifdef WIRING
175 175
         timerAttach(TIMER3OUTCOMPAREA_INT, Timer3Service);  // for Wiring platform only
@@ -183,7 +183,7 @@ static void initISR(timer16_Sequence_t timer) {
183 183
       TCCR4B = _BV(CS41);     // set prescaler of 8
184 184
       TCNT4 = 0;              // clear the timer count
185 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 188
   #endif
189 189
 
@@ -193,7 +193,7 @@ static void initISR(timer16_Sequence_t timer) {
193 193
       TCCR5B = _BV(CS51);     // set prescaler of 8
194 194
       TCNT5 = 0;              // clear the timer count
195 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 198
   #endif
199 199
 }
@@ -203,21 +203,21 @@ static void finISR(timer16_Sequence_t timer) {
203 203
   #ifdef WIRING
204 204
     if (timer == _timer1) {
205 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 211
           , OCIE1A);    // disable timer 1 output compare interrupt
212 212
       timerDetach(TIMER1OUTCOMPAREA_INT);
213 213
     }
214 214
     else if (timer == _timer3) {
215 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 221
           , OCIE3A);    // disable the timer3 output compare A interrupt
222 222
       timerDetach(TIMER3OUTCOMPAREA_INT);
223 223
     }

+ 1
- 1
Marlin/stepper.cpp View File

@@ -271,7 +271,7 @@ volatile long Stepper::endstops_trigsteps[XYZ];
271 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 273
 void Stepper::wake_up() {
274
-  //  TCNT1 = 0;
274
+  // TCNT1 = 0;
275 275
   ENABLE_STEPPER_DRIVER_INTERRUPT();
276 276
 }
277 277
 

Loading…
Cancel
Save