Kaynağa Gözat

Cleanup of comments & spacing

Scott Lahteine 9 yıl önce
ebeveyn
işleme
42465ee444
4 değiştirilmiş dosya ile 48 ekleme ve 51 silme
  1. 27
    27
      Marlin/Marlin.ino
  2. 1
    1
      Marlin/language_ru.h
  3. 6
    9
      Marlin/pins_SANGUINOLOLU_11.h
  4. 14
    14
      Marlin/servo.cpp

+ 27
- 27
Marlin/Marlin.ino Dosyayı Görüntüle

@@ -1,30 +1,30 @@
1
-/* -*- c++ -*- */
2
-
3
-/*
4
-    Reprap firmware based on Sprinter and grbl.
5
- Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
6
-
7
- This program is free software: you can redistribute it and/or modify
8
- it under the terms of the GNU General Public License as published by
9
- the Free Software Foundation, either version 3 of the License, or
10
- (at your option) any later version.
11
-
12
- This program is distributed in the hope that it will be useful,
13
- but WITHOUT ANY WARRANTY; without even the implied warranty of
14
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
- GNU General Public License for more details.
16
-
17
- You should have received a copy of the GNU General Public License
18
- along with this program.  If not, see <http://www.gnu.org/licenses/>.
19
- */
20
-
21
-/*
22
- This firmware is a mashup between Sprinter and grbl.
23
-  (https://github.com/kliment/Sprinter)
24
-  (https://github.com/simen/grbl/tree)
25
-
26
- It has preliminary support for Matthew Roberts advance algorithm
27
-    http://reprap.org/pipermail/reprap-dev/2011-May/003323.html
1
+/**
2
+ * Marlin Firmware
3
+ *
4
+ * Based on Sprinter and grbl.
5
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
6
+ *
7
+ * This program is free software: you can redistribute it and/or modify
8
+ * it under the terms of the GNU General Public License as published by
9
+ * the Free Software Foundation, either version 3 of the License, or
10
+ * (at your option) any later version.
11
+ *
12
+ * This program is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
+ * GNU General Public License for more details.
16
+ *
17
+ * You should have received a copy of the GNU General Public License
18
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
19
+ *
20
+ * About Marlin
21
+ *
22
+ * This firmware is a mashup between Sprinter and grbl.
23
+ *  - https://github.com/kliment/Sprinter
24
+ *  - https://github.com/simen/grbl/tree
25
+ *
26
+ * It has preliminary support for Matthew Roberts advance algorithm
27
+ *  - http://reprap.org/pipermail/reprap-dev/2011-May/003323.html
28 28
  */
29 29
 
30 30
 /* All the implementation is done in *.cpp files to get better compatibility with avr-gcc without the Arduino IDE */

+ 1
- 1
Marlin/language_ru.h Dosyayı Görüntüle

@@ -135,4 +135,4 @@
135 135
     #define MSG_DELTA_CALIBRATE_CENTER      "Калибровать Center"
136 136
 #endif // DELTA_CALIBRATION_MENU
137 137
 
138
-#endif // LANGUAGE_RU_H
138
+#endif // LANGUAGE_RU_H

+ 6
- 9
Marlin/pins_SANGUINOLOLU_11.h Dosyayı Görüntüle

@@ -50,17 +50,14 @@
50 50
 
51 51
 #ifdef NUM_SERVOS
52 52
   #define SERVO0_PIN          -1
53
-
54 53
   #if NUM_SERVOS > 1
55 54
     #define SERVO1_PIN        -1
56
-  #endif
57
-
58
-  #if NUM_SERVOS > 2
59
-    #define SERVO2_PIN        -1
60
-  #endif
61
-
62
-  #if NUM_SERVOS > 3
63
-    #define SERVO3_PIN        -1
55
+    #if NUM_SERVOS > 2
56
+      #define SERVO2_PIN      -1
57
+      #if NUM_SERVOS > 3
58
+        #define SERVO3_PIN    -1
59
+      #endif
60
+    #endif
64 61
   #endif
65 62
 #endif
66 63
 

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

@@ -101,29 +101,29 @@ static inline void handle_interrupts(timer16_Sequence_t timer, volatile uint16_t
101 101
 #ifndef WIRING // Wiring pre-defines signal handlers so don't define any if compiling for the Wiring platform
102 102
 
103 103
   // Interrupt handlers for Arduino
104
-  #if defined(_useTimer1)
104
+  #ifdef _useTimer1
105 105
     SIGNAL (TIMER1_COMPA_vect) { handle_interrupts(_timer1, &TCNT1, &OCR1A); }
106 106
   #endif
107 107
 
108
-  #if defined(_useTimer3)
108
+  #ifdef _useTimer3
109 109
     SIGNAL (TIMER3_COMPA_vect) { handle_interrupts(_timer3, &TCNT3, &OCR3A); }
110 110
   #endif
111 111
 
112
-  #if defined(_useTimer4)
112
+  #ifdef _useTimer4
113 113
     SIGNAL (TIMER4_COMPA_vect) { handle_interrupts(_timer4, &TCNT4, &OCR4A); }
114 114
   #endif
115 115
 
116
-  #if defined(_useTimer5)
116
+  #ifdef _useTimer5
117 117
     SIGNAL (TIMER5_COMPA_vect) { handle_interrupts(_timer5, &TCNT5, &OCR5A); }
118 118
   #endif
119 119
 
120 120
 #else //!WIRING
121 121
 
122 122
   // Interrupt handlers for Wiring
123
-  #if defined(_useTimer1)
123
+  #ifdef _useTimer1
124 124
     void Timer1Service() { handle_interrupts(_timer1, &TCNT1, &OCR1A); }
125 125
   #endif
126
-  #if defined(_useTimer3)
126
+  #ifdef _useTimer3
127 127
     void Timer3Service() { handle_interrupts(_timer3, &TCNT3, &OCR3A); }
128 128
   #endif
129 129
 
@@ -131,7 +131,7 @@ static inline void handle_interrupts(timer16_Sequence_t timer, volatile uint16_t
131 131
 
132 132
 
133 133
 static void initISR(timer16_Sequence_t timer) {
134
-  #if defined(_useTimer1)
134
+  #ifdef _useTimer1
135 135
     if (timer == _timer1) {
136 136
       TCCR1A = 0;             // normal counting mode
137 137
       TCCR1B = _BV(CS11);     // set prescaler of 8
@@ -144,31 +144,31 @@ static void initISR(timer16_Sequence_t timer) {
144 144
         TIFR1 |= _BV(OCF1A);     // clear any pending interrupts;
145 145
         TIMSK1 |= _BV(OCIE1A);   // enable the output compare interrupt
146 146
       #endif
147
-      #if defined(WIRING)
147
+      #ifdef WIRING
148 148
         timerAttach(TIMER1OUTCOMPAREA_INT, Timer1Service);
149 149
       #endif
150 150
     }
151 151
   #endif
152 152
 
153
-  #if defined(_useTimer3)
153
+  #ifdef _useTimer3
154 154
     if (timer == _timer3) {
155 155
       TCCR3A = 0;             // normal counting mode
156 156
       TCCR3B = _BV(CS31);     // set prescaler of 8
157 157
       TCNT3 = 0;              // clear the timer count
158
-      #if defined(__AVR_ATmega128__)
158
+      #ifdef __AVR_ATmega128__
159 159
         TIFR |= _BV(OCF3A);     // clear any pending interrupts;
160 160
       	ETIMSK |= _BV(OCIE3A);  // enable the output compare interrupt
161 161
       #else
162 162
         TIFR3 = _BV(OCF3A);     // clear any pending interrupts;
163 163
         TIMSK3 =  _BV(OCIE3A) ; // enable the output compare interrupt
164 164
       #endif
165
-      #if defined(WIRING)
165
+      #ifdef WIRING
166 166
         timerAttach(TIMER3OUTCOMPAREA_INT, Timer3Service);  // for Wiring platform only
167 167
       #endif
168 168
     }
169 169
   #endif
170 170
 
171
-  #if defined(_useTimer4)
171
+  #ifdef _useTimer4
172 172
     if (timer == _timer4) {
173 173
       TCCR4A = 0;             // normal counting mode
174 174
       TCCR4B = _BV(CS41);     // set prescaler of 8
@@ -178,7 +178,7 @@ static void initISR(timer16_Sequence_t timer) {
178 178
     }
179 179
   #endif
180 180
 
181
-  #if defined(_useTimer5)
181
+  #ifdef _useTimer5
182 182
     if (timer == _timer5) {
183 183
       TCCR5A = 0;             // normal counting mode
184 184
       TCCR5B = _BV(CS51);     // set prescaler of 8
@@ -191,7 +191,7 @@ static void initISR(timer16_Sequence_t timer) {
191 191
 
192 192
 static void finISR(timer16_Sequence_t timer) {
193 193
   // Disable use of the given timer
194
-  #if defined(WIRING)
194
+  #ifdef WIRING
195 195
     if (timer == _timer1) {
196 196
       #if defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__)
197 197
         TIMSK1

Loading…
İptal
Kaydet