Ver código fonte

SERVO_DEACTIVATION_DELAY => SERVO_DELAY

Scott Lahteine 8 anos atrás
pai
commit
03c70c1990

+ 5
- 7
Marlin/Configuration.h Ver arquivo

@@ -1173,18 +1173,16 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
1173 1173
 //
1174 1174
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1175 1175
 
1176
+// Delay (in microseconds) before the next move will start, to give the servo time to reach its target angle.
1177
+// 300ms is a good value but you can try less delay.
1178
+// If the servo can't reach the requested position, increase it.
1179
+#define SERVO_DELAY 300
1180
+
1176 1181
 // Servo deactivation
1177 1182
 //
1178 1183
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1179 1184
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1180 1185
 
1181
-#if ENABLED(DEACTIVATE_SERVOS_AFTER_MOVE)
1182
-  // Delay (in microseconds) before turning the servo off. This depends on the servo speed.
1183
-  // 300ms is a good value but you can try less delay.
1184
-  // If the servo can't reach the requested position, increase it.
1185
-  #define SERVO_DEACTIVATION_DELAY 300
1186
-#endif
1187
-
1188 1186
 /**********************************************************************\
1189 1187
  * Support for a filament diameter sensor
1190 1188
  * Also allows adjustment of diameter at print time (vs  at slicing)

+ 4
- 2
Marlin/SanityCheck.h Ver arquivo

@@ -593,8 +593,6 @@
593 593
   #error "Z_LATE_ENABLE can't be used with COREXZ."
594 594
 #elif defined(X_HOME_RETRACT_MM)
595 595
   #error "[XYZ]_HOME_RETRACT_MM settings have been renamed [XYZ]_HOME_BUMP_MM."
596
-#elif defined(PROBE_SERVO_DEACTIVATION_DELAY)
597
-  #error "PROBE_SERVO_DEACTIVATION_DELAY has been replaced with DEACTIVATE_SERVOS_AFTER_MOVE and SERVO_DEACTIVATION_DELAY."
598 596
 #elif defined(BEEPER)
599 597
   #error "BEEPER is now BEEPER_PIN. Please update your pins definitions."
600 598
 #elif defined(SDCARDDETECT)
@@ -635,6 +633,10 @@
635 633
   #error "X_ENDSTOP_SERVO_NR and Y_ENDSTOP_SERVO_NR are deprecated and should be removed."
636 634
 #elif defined(XY_TRAVEL_SPEED)
637 635
   #error "XY_TRAVEL_SPEED is deprecated. Use XY_PROBE_SPEED instead."
636
+#elif defined(PROBE_SERVO_DEACTIVATION_DELAY)
637
+  #error "PROBE_SERVO_DEACTIVATION_DELAY is deprecated. Use DEACTIVATE_SERVOS_AFTER_MOVE instead."
638
+#elif defined(SERVO_DEACTIVATION_DELAY)
639
+  #error "SERVO_DEACTIVATION_DELAY is deprecated. Use SERVO_DELAY instead."
638 640
 #endif
639 641
 
640 642
 #endif //SANITYCHECK_H

+ 5
- 7
Marlin/example_configurations/Cartesio/Configuration.h Ver arquivo

@@ -1172,18 +1172,16 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
1172 1172
 //
1173 1173
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1174 1174
 
1175
+// Delay (in microseconds) before the next move will start, to give the servo time to reach its target angle.
1176
+// 300ms is a good value but you can try less delay.
1177
+// If the servo can't reach the requested position, increase it.
1178
+#define SERVO_DELAY 300
1179
+
1175 1180
 // Servo deactivation
1176 1181
 //
1177 1182
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1178 1183
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1179 1184
 
1180
-#if ENABLED(DEACTIVATE_SERVOS_AFTER_MOVE)
1181
-  // Delay (in microseconds) before turning the servo off. This depends on the servo speed.
1182
-  // 300ms is a good value but you can try less delay.
1183
-  // If the servo can't reach the requested position, increase it.
1184
-  #define SERVO_DEACTIVATION_DELAY 300
1185
-#endif
1186
-
1187 1185
 /**********************************************************************\
1188 1186
  * Support for a filament diameter sensor
1189 1187
  * Also allows adjustment of diameter at print time (vs  at slicing)

+ 5
- 7
Marlin/example_configurations/Felix/Configuration.h Ver arquivo

@@ -1156,18 +1156,16 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
1156 1156
 //
1157 1157
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1158 1158
 
1159
+// Delay (in microseconds) before the next move will start, to give the servo time to reach its target angle.
1160
+// 300ms is a good value but you can try less delay.
1161
+// If the servo can't reach the requested position, increase it.
1162
+#define SERVO_DELAY 300
1163
+
1159 1164
 // Servo deactivation
1160 1165
 //
1161 1166
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1162 1167
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1163 1168
 
1164
-#if ENABLED(DEACTIVATE_SERVOS_AFTER_MOVE)
1165
-  // Delay (in microseconds) before turning the servo off. This depends on the servo speed.
1166
-  // 300ms is a good value but you can try less delay.
1167
-  // If the servo can't reach the requested position, increase it.
1168
-  #define SERVO_DEACTIVATION_DELAY 300
1169
-#endif
1170
-
1171 1169
 /**********************************************************************\
1172 1170
  * Support for a filament diameter sensor
1173 1171
  * Also allows adjustment of diameter at print time (vs  at slicing)

+ 5
- 7
Marlin/example_configurations/Felix/DUAL/Configuration.h Ver arquivo

@@ -1154,18 +1154,16 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
1154 1154
 //
1155 1155
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1156 1156
 
1157
+// Delay (in microseconds) before the next move will start, to give the servo time to reach its target angle.
1158
+// 300ms is a good value but you can try less delay.
1159
+// If the servo can't reach the requested position, increase it.
1160
+#define SERVO_DELAY 300
1161
+
1157 1162
 // Servo deactivation
1158 1163
 //
1159 1164
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1160 1165
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1161 1166
 
1162
-#if ENABLED(DEACTIVATE_SERVOS_AFTER_MOVE)
1163
-  // Delay (in microseconds) before turning the servo off. This depends on the servo speed.
1164
-  // 300ms is a good value but you can try less delay.
1165
-  // If the servo can't reach the requested position, increase it.
1166
-  #define SERVO_DEACTIVATION_DELAY 300
1167
-#endif
1168
-
1169 1167
 /**********************************************************************\
1170 1168
  * Support for a filament diameter sensor
1171 1169
  * Also allows adjustment of diameter at print time (vs  at slicing)

+ 5
- 7
Marlin/example_configurations/Hephestos/Configuration.h Ver arquivo

@@ -1165,18 +1165,16 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
1165 1165
 //
1166 1166
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1167 1167
 
1168
+// Delay (in microseconds) before the next move will start, to give the servo time to reach its target angle.
1169
+// 300ms is a good value but you can try less delay.
1170
+// If the servo can't reach the requested position, increase it.
1171
+#define SERVO_DELAY 300
1172
+
1168 1173
 // Servo deactivation
1169 1174
 //
1170 1175
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1171 1176
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1172 1177
 
1173
-#if ENABLED(DEACTIVATE_SERVOS_AFTER_MOVE)
1174
-  // Delay (in microseconds) before turning the servo off. This depends on the servo speed.
1175
-  // 300ms is a good value but you can try less delay.
1176
-  // If the servo can't reach the requested position, increase it.
1177
-  #define SERVO_DEACTIVATION_DELAY 300
1178
-#endif
1179
-
1180 1178
 /**********************************************************************\
1181 1179
  * Support for a filament diameter sensor
1182 1180
  * Also allows adjustment of diameter at print time (vs  at slicing)

+ 5
- 7
Marlin/example_configurations/Hephestos_2/Configuration.h Ver arquivo

@@ -1167,18 +1167,16 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
1167 1167
 //
1168 1168
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1169 1169
 
1170
+// Delay (in microseconds) before the next move will start, to give the servo time to reach its target angle.
1171
+// 300ms is a good value but you can try less delay.
1172
+// If the servo can't reach the requested position, increase it.
1173
+#define SERVO_DELAY 300
1174
+
1170 1175
 // Servo deactivation
1171 1176
 //
1172 1177
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1173 1178
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1174 1179
 
1175
-#if ENABLED(DEACTIVATE_SERVOS_AFTER_MOVE)
1176
-  // Delay (in microseconds) before turning the servo off. This depends on the servo speed.
1177
-  // 300ms is a good value but you can try less delay.
1178
-  // If the servo can't reach the requested position, increase it.
1179
-  #define SERVO_DEACTIVATION_DELAY 300
1180
-#endif
1181
-
1182 1180
 /**********************************************************************\
1183 1181
  * Support for a filament diameter sensor
1184 1182
  * Also allows adjustment of diameter at print time (vs  at slicing)

+ 5
- 7
Marlin/example_configurations/K8200/Configuration.h Ver arquivo

@@ -1190,18 +1190,16 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
1190 1190
 //
1191 1191
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1192 1192
 
1193
+// Delay (in microseconds) before the next move will start, to give the servo time to reach its target angle.
1194
+// 300ms is a good value but you can try less delay.
1195
+// If the servo can't reach the requested position, increase it.
1196
+#define SERVO_DELAY 300
1197
+
1193 1198
 // Servo deactivation
1194 1199
 //
1195 1200
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1196 1201
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1197 1202
 
1198
-#if ENABLED(DEACTIVATE_SERVOS_AFTER_MOVE)
1199
-  // Delay (in microseconds) before turning the servo off. This depends on the servo speed.
1200
-  // 300ms is a good value but you can try less delay.
1201
-  // If the servo can't reach the requested position, increase it.
1202
-  #define SERVO_DEACTIVATION_DELAY 300
1203
-#endif
1204
-
1205 1203
 /**********************************************************************\
1206 1204
  * Support for a filament diameter sensor
1207 1205
  * Also allows adjustment of diameter at print time (vs  at slicing)

+ 5
- 7
Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h Ver arquivo

@@ -1173,18 +1173,16 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
1173 1173
 //
1174 1174
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1175 1175
 
1176
+// Delay (in microseconds) before the next move will start, to give the servo time to reach its target angle.
1177
+// 300ms is a good value but you can try less delay.
1178
+// If the servo can't reach the requested position, increase it.
1179
+#define SERVO_DELAY 300
1180
+
1176 1181
 // Servo deactivation
1177 1182
 //
1178 1183
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1179 1184
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1180 1185
 
1181
-#if ENABLED(DEACTIVATE_SERVOS_AFTER_MOVE)
1182
-  // Delay (in microseconds) before turning the servo off. This depends on the servo speed.
1183
-  // 300ms is a good value but you can try less delay.
1184
-  // If the servo can't reach the requested position, increase it.
1185
-  #define SERVO_DEACTIVATION_DELAY 300
1186
-#endif
1187
-
1188 1186
 /**********************************************************************\
1189 1187
  * Support for a filament diameter sensor
1190 1188
  * Also allows adjustment of diameter at print time (vs  at slicing)

+ 5
- 7
Marlin/example_configurations/RigidBot/Configuration.h Ver arquivo

@@ -1170,18 +1170,16 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
1170 1170
 //
1171 1171
 #define NUM_SERVOS 0 // DGlass3D - Servo index starts with 0 for M280 command
1172 1172
 
1173
+// Delay (in microseconds) before the next move will start, to give the servo time to reach its target angle.
1174
+// 300ms is a good value but you can try less delay.
1175
+// If the servo can't reach the requested position, increase it.
1176
+#define SERVO_DELAY 300
1177
+
1173 1178
 // Servo deactivation
1174 1179
 //
1175 1180
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1176 1181
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1177 1182
 
1178
-#if ENABLED(DEACTIVATE_SERVOS_AFTER_MOVE)
1179
-  // Delay (in microseconds) before turning the servo off. This depends on the servo speed.
1180
-  // 300ms is a good value but you can try less delay.
1181
-  // If the servo can't reach the requested position, increase it.
1182
-  #define SERVO_DEACTIVATION_DELAY 300
1183
-#endif
1184
-
1185 1183
 /**********************************************************************\
1186 1184
  * Support for a filament diameter sensor
1187 1185
  * Also allows adjustment of diameter at print time (vs  at slicing)

+ 5
- 7
Marlin/example_configurations/SCARA/Configuration.h Ver arquivo

@@ -1181,18 +1181,16 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
1181 1181
 //
1182 1182
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1183 1183
 
1184
+// Delay (in microseconds) before the next move will start, to give the servo time to reach its target angle.
1185
+// 300ms is a good value but you can try less delay.
1186
+// If the servo can't reach the requested position, increase it.
1187
+#define SERVO_DELAY 300
1188
+
1184 1189
 // Servo deactivation
1185 1190
 //
1186 1191
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1187 1192
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1188 1193
 
1189
-#if ENABLED(DEACTIVATE_SERVOS_AFTER_MOVE)
1190
-  // Delay (in microseconds) before turning the servo off. This depends on the servo speed.
1191
-  // 300ms is a good value but you can try less delay.
1192
-  // If the servo can't reach the requested position, increase it.
1193
-  #define SERVO_DEACTIVATION_DELAY 300
1194
-#endif
1195
-
1196 1194
 /**********************************************************************\
1197 1195
  * Support for a filament diameter sensor
1198 1196
  * Also allows adjustment of diameter at print time (vs  at slicing)

+ 5
- 7
Marlin/example_configurations/TAZ4/Configuration.h Ver arquivo

@@ -1194,18 +1194,16 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
1194 1194
 //
1195 1195
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1196 1196
 
1197
+// Delay (in microseconds) before the next move will start, to give the servo time to reach its target angle.
1198
+// 300ms is a good value but you can try less delay.
1199
+// If the servo can't reach the requested position, increase it.
1200
+#define SERVO_DELAY 300
1201
+
1197 1202
 // Servo deactivation
1198 1203
 //
1199 1204
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1200 1205
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1201 1206
 
1202
-#if ENABLED(DEACTIVATE_SERVOS_AFTER_MOVE)
1203
-  // Delay (in microseconds) before turning the servo off. This depends on the servo speed.
1204
-  // 300ms is a good value but you can try less delay.
1205
-  // If the servo can't reach the requested position, increase it.
1206
-  #define SERVO_DEACTIVATION_DELAY 300
1207
-#endif
1208
-
1209 1207
 /**********************************************************************\
1210 1208
  * Support for a filament diameter sensor
1211 1209
  * Also allows adjustment of diameter at print time (vs  at slicing)

+ 5
- 7
Marlin/example_configurations/WITBOX/Configuration.h Ver arquivo

@@ -1165,18 +1165,16 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
1165 1165
 //
1166 1166
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1167 1167
 
1168
+// Delay (in microseconds) before the next move will start, to give the servo time to reach its target angle.
1169
+// 300ms is a good value but you can try less delay.
1170
+// If the servo can't reach the requested position, increase it.
1171
+#define SERVO_DELAY 300
1172
+
1168 1173
 // Servo deactivation
1169 1174
 //
1170 1175
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1171 1176
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1172 1177
 
1173
-#if ENABLED(DEACTIVATE_SERVOS_AFTER_MOVE)
1174
-  // Delay (in microseconds) before turning the servo off. This depends on the servo speed.
1175
-  // 300ms is a good value but you can try less delay.
1176
-  // If the servo can't reach the requested position, increase it.
1177
-  #define SERVO_DEACTIVATION_DELAY 300
1178
-#endif
1179
-
1180 1178
 /**********************************************************************\
1181 1179
  * Support for a filament diameter sensor
1182 1180
  * Also allows adjustment of diameter at print time (vs  at slicing)

+ 5
- 7
Marlin/example_configurations/adafruit/ST7565/Configuration.h Ver arquivo

@@ -1173,18 +1173,16 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
1173 1173
 //
1174 1174
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1175 1175
 
1176
+// Delay (in microseconds) before the next move will start, to give the servo time to reach its target angle.
1177
+// 300ms is a good value but you can try less delay.
1178
+// If the servo can't reach the requested position, increase it.
1179
+#define SERVO_DELAY 300
1180
+
1176 1181
 // Servo deactivation
1177 1182
 //
1178 1183
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1179 1184
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1180 1185
 
1181
-#if ENABLED(DEACTIVATE_SERVOS_AFTER_MOVE)
1182
-  // Delay (in microseconds) before turning the servo off. This depends on the servo speed.
1183
-  // 300ms is a good value but you can try less delay.
1184
-  // If the servo can't reach the requested position, increase it.
1185
-  #define SERVO_DEACTIVATION_DELAY 300
1186
-#endif
1187
-
1188 1186
 /**********************************************************************\
1189 1187
  * Support for a filament diameter sensor
1190 1188
  * Also allows adjustment of diameter at print time (vs  at slicing)

+ 5
- 7
Marlin/example_configurations/delta/biv2.5/Configuration.h Ver arquivo

@@ -1258,18 +1258,16 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
1258 1258
 //
1259 1259
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1260 1260
 
1261
+// Delay (in microseconds) before the next move will start, to give the servo time to reach its target angle.
1262
+// 300ms is a good value but you can try less delay.
1263
+// If the servo can't reach the requested position, increase it.
1264
+#define SERVO_DELAY 300
1265
+
1261 1266
 // Servo deactivation
1262 1267
 //
1263 1268
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1264 1269
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1265 1270
 
1266
-#if ENABLED(DEACTIVATE_SERVOS_AFTER_MOVE)
1267
-  // Delay (in microseconds) before turning the servo off. This depends on the servo speed.
1268
-  // 300ms is a good value but you can try less delay.
1269
-  // If the servo can't reach the requested position, increase it.
1270
-  #define SERVO_DEACTIVATION_DELAY 300
1271
-#endif
1272
-
1273 1271
 /**********************************************************************\
1274 1272
  * Support for a filament diameter sensor
1275 1273
  * Also allows adjustment of diameter at print time (vs  at slicing)

+ 5
- 7
Marlin/example_configurations/delta/generic/Configuration.h Ver arquivo

@@ -1252,18 +1252,16 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
1252 1252
 //
1253 1253
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1254 1254
 
1255
+// Delay (in microseconds) before the next move will start, to give the servo time to reach its target angle.
1256
+// 300ms is a good value but you can try less delay.
1257
+// If the servo can't reach the requested position, increase it.
1258
+#define SERVO_DELAY 300
1259
+
1255 1260
 // Servo deactivation
1256 1261
 //
1257 1262
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1258 1263
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1259 1264
 
1260
-#if ENABLED(DEACTIVATE_SERVOS_AFTER_MOVE)
1261
-  // Delay (in microseconds) before turning the servo off. This depends on the servo speed.
1262
-  // 300ms is a good value but you can try less delay.
1263
-  // If the servo can't reach the requested position, increase it.
1264
-  #define SERVO_DEACTIVATION_DELAY 300
1265
-#endif
1266
-
1267 1265
 /**********************************************************************\
1268 1266
  * Support for a filament diameter sensor
1269 1267
  * Also allows adjustment of diameter at print time (vs  at slicing)

+ 5
- 7
Marlin/example_configurations/delta/kossel_mini/Configuration.h Ver arquivo

@@ -1255,18 +1255,16 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
1255 1255
 //
1256 1256
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1257 1257
 
1258
+// Delay (in microseconds) before the next move will start, to give the servo time to reach its target angle.
1259
+// 300ms is a good value but you can try less delay.
1260
+// If the servo can't reach the requested position, increase it.
1261
+#define SERVO_DELAY 300
1262
+
1258 1263
 // Servo deactivation
1259 1264
 //
1260 1265
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1261 1266
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1262 1267
 
1263
-#if ENABLED(DEACTIVATE_SERVOS_AFTER_MOVE)
1264
-  // Delay (in microseconds) before turning the servo off. This depends on the servo speed.
1265
-  // 300ms is a good value but you can try less delay.
1266
-  // If the servo can't reach the requested position, increase it.
1267
-  #define SERVO_DEACTIVATION_DELAY 300
1268
-#endif
1269
-
1270 1268
 /**********************************************************************\
1271 1269
  * Support for a filament diameter sensor
1272 1270
  * Also allows adjustment of diameter at print time (vs  at slicing)

+ 5
- 7
Marlin/example_configurations/delta/kossel_pro/Configuration.h Ver arquivo

@@ -1255,18 +1255,16 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
1255 1255
 //
1256 1256
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1257 1257
 
1258
+// Delay (in microseconds) before the next move will start, to give the servo time to reach its target angle.
1259
+// 300ms is a good value but you can try less delay.
1260
+// If the servo can't reach the requested position, increase it.
1261
+#define SERVO_DELAY 300
1262
+
1258 1263
 // Servo deactivation
1259 1264
 //
1260 1265
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1261 1266
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1262 1267
 
1263
-#if ENABLED(DEACTIVATE_SERVOS_AFTER_MOVE)
1264
-  // Delay (in microseconds) before turning the servo off. This depends on the servo speed.
1265
-  // 300ms is a good value but you can try less delay.
1266
-  // If the servo can't reach the requested position, increase it.
1267
-  #define SERVO_DEACTIVATION_DELAY 300
1268
-#endif
1269
-
1270 1268
 /**********************************************************************\
1271 1269
  * Support for a filament diameter sensor
1272 1270
  * Also allows adjustment of diameter at print time (vs  at slicing)

+ 5
- 7
Marlin/example_configurations/delta/kossel_xl/Configuration.h Ver arquivo

@@ -1257,18 +1257,16 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
1257 1257
 //
1258 1258
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1259 1259
 
1260
+// Delay (in microseconds) before the next move will start, to give the servo time to reach its target angle.
1261
+// 300ms is a good value but you can try less delay.
1262
+// If the servo can't reach the requested position, increase it.
1263
+#define SERVO_DELAY 300
1264
+
1260 1265
 // Servo deactivation
1261 1266
 //
1262 1267
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1263 1268
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1264 1269
 
1265
-#if ENABLED(DEACTIVATE_SERVOS_AFTER_MOVE)
1266
-  // Delay (in microseconds) before turning the servo off. This depends on the servo speed.
1267
-  // 300ms is a good value but you can try less delay.
1268
-  // If the servo can't reach the requested position, increase it.
1269
-  #define SERVO_DEACTIVATION_DELAY 300
1270
-#endif
1271
-
1272 1270
 /**********************************************************************\
1273 1271
  * Support for a filament diameter sensor
1274 1272
  * Also allows adjustment of diameter at print time (vs  at slicing)

+ 5
- 7
Marlin/example_configurations/makibox/Configuration.h Ver arquivo

@@ -1176,18 +1176,16 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
1176 1176
 //
1177 1177
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1178 1178
 
1179
+// Delay (in microseconds) before the next move will start, to give the servo time to reach its target angle.
1180
+// 300ms is a good value but you can try less delay.
1181
+// If the servo can't reach the requested position, increase it.
1182
+#define SERVO_DELAY 300
1183
+
1179 1184
 // Servo deactivation
1180 1185
 //
1181 1186
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1182 1187
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1183 1188
 
1184
-#if ENABLED(DEACTIVATE_SERVOS_AFTER_MOVE)
1185
-  // Delay (in microseconds) before turning the servo off. This depends on the servo speed.
1186
-  // 300ms is a good value but you can try less delay.
1187
-  // If the servo can't reach the requested position, increase it.
1188
-  #define SERVO_DEACTIVATION_DELAY 300
1189
-#endif
1190
-
1191 1189
 /**********************************************************************\
1192 1190
  * Support for a filament diameter sensor
1193 1191
  * Also allows adjustment of diameter at print time (vs  at slicing)

+ 5
- 7
Marlin/example_configurations/tvrrug/Round2/Configuration.h Ver arquivo

@@ -1167,18 +1167,16 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
1167 1167
 //
1168 1168
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1169 1169
 
1170
+// Delay (in microseconds) before the next move will start, to give the servo time to reach its target angle.
1171
+// 300ms is a good value but you can try less delay.
1172
+// If the servo can't reach the requested position, increase it.
1173
+#define SERVO_DELAY 300
1174
+
1170 1175
 // Servo deactivation
1171 1176
 //
1172 1177
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1173 1178
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1174 1179
 
1175
-#if ENABLED(DEACTIVATE_SERVOS_AFTER_MOVE)
1176
-  // Delay (in microseconds) before turning the servo off. This depends on the servo speed.
1177
-  // 300ms is a good value but you can try less delay.
1178
-  // If the servo can't reach the requested position, increase it.
1179
-  #define SERVO_DEACTIVATION_DELAY 300
1180
-#endif
1181
-
1182 1180
 /**********************************************************************\
1183 1181
  * Support for a filament diameter sensor
1184 1182
  * Also allows adjustment of diameter at print time (vs  at slicing)

+ 28
- 42
Marlin/servo.cpp Ver arquivo

@@ -21,50 +21,35 @@
21 21
  */
22 22
 
23 23
 /**
24
- servo.cpp - Interrupt driven Servo library for Arduino using 16 bit timers- Version 2
25
- Copyright (c) 2009 Michael Margolis.  All right reserved.
26
-
27
- This library is free software; you can redistribute it and/or
28
- modify it under the terms of the GNU Lesser General Public
29
- License as published by the Free Software Foundation; either
30
- version 2.1 of the License, or (at your option) any later version.
31
-
32
- This library is distributed in the hope that it will be useful,
33
- but WITHOUT ANY WARRANTY; without even the implied warranty of
34
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
35
- Lesser General Public License for more details.
36
-
37
- You should have received a copy of the GNU Lesser General Public
38
- License along with this library; if not, write to the Free Software
39
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
24
+ * servo.cpp - Interrupt driven Servo library for Arduino using 16 bit timers- Version 2
25
+ * Copyright (c) 2009 Michael Margolis.  All right reserved.
40 26
  */
41 27
 
42 28
 /**
43
-
44
- A servo is activated by creating an instance of the Servo class passing the desired pin to the attach() method.
45
- The servos are pulsed in the background using the value most recently written using the write() method
46
-
47
- Note that analogWrite of PWM on pins associated with the timer are disabled when the first servo is attached.
48
- Timers are seized as needed in groups of 12 servos - 24 servos use two timers, 48 servos will use four.
49
-
50
- The methods are:
51
-
52
- Servo - Class for manipulating servo motors connected to Arduino pins.
53
-
54
- attach(pin )  - Attaches a servo motor to an i/o pin.
55
- attach(pin, min, max  ) - Attaches to a pin setting min and max values in microseconds
56
- default min is 544, max is 2400
57
-
58
- write()     - Sets the servo angle in degrees.  (invalid angle that is valid as pulse in microseconds is treated as microseconds)
59
- writeMicroseconds() - Sets the servo pulse width in microseconds
60
- move(pin, angle) - Sequence of attach(pin), write(angle).
61
-                    With DEACTIVATE_SERVOS_AFTER_MOVE it waits SERVO_DEACTIVATION_DELAY and detaches.
62
- read()      - Gets the last written servo pulse width as an angle between 0 and 180.
63
- readMicroseconds()   - Gets the last written servo pulse width in microseconds. (was read_us() in first release)
64
- attached()  - Returns true if there is a servo attached.
65
- detach()    - Stops an attached servos from pulsing its i/o pin.
66
-
67
-*/
29
+ * A servo is activated by creating an instance of the Servo class passing the desired pin to the attach() method.
30
+ * The servos are pulsed in the background using the value most recently written using the write() method
31
+ *
32
+ * Note that analogWrite of PWM on pins associated with the timer are disabled when the first servo is attached.
33
+ * Timers are seized as needed in groups of 12 servos - 24 servos use two timers, 48 servos will use four.
34
+ *
35
+ * The methods are:
36
+ *
37
+ * Servo - Class for manipulating servo motors connected to Arduino pins.
38
+ *
39
+ * attach(pin)           - Attach a servo motor to an i/o pin.
40
+ * attach(pin, min, max) - Attach to a pin, setting min and max values in microseconds
41
+ *                         Default min is 544, max is 2400
42
+ *
43
+ * write()               - Set the servo angle in degrees. (Invalid angles —over MIN_PULSE_WIDTH— are treated as µs.)
44
+ * writeMicroseconds()   - Set the servo pulse width in microseconds.
45
+ * move(pin, angle)      - Sequence of attach(pin), write(angle), delay(SERVO_DELAY).
46
+ *                         With DEACTIVATE_SERVOS_AFTER_MOVE it detaches after SERVO_DELAY.
47
+ * read()                - Get the last-written servo pulse width as an angle between 0 and 180.
48
+ * readMicroseconds()    - Get the last-written servo pulse width in microseconds.
49
+ * attached()            - Return true if a servo is attached.
50
+ * detach()              - Stop an attached servo from pulsing its i/o pin.
51
+ *
52
+ */
68 53
 #include "Configuration.h"
69 54
 
70 55
 #if HAS_SERVOS
@@ -238,6 +223,7 @@ static void finISR(timer16_Sequence_t timer) {
238 223
     }
239 224
   #else //!WIRING
240 225
     // For arduino - in future: call here to a currently undefined function to reset the timer
226
+	UNUSED(timer);
241 227
   #endif
242 228
 }
243 229
 
@@ -324,8 +310,8 @@ bool Servo::attached() { return servo_info[this->servoIndex].Pin.isActive; }
324 310
 void Servo::move(int value) {
325 311
   if (this->attach(0) >= 0) {
326 312
     this->write(value);
313
+    delay(SERVO_DELAY);
327 314
     #if ENABLED(DEACTIVATE_SERVOS_AFTER_MOVE)
328
-      delay(SERVO_DEACTIVATION_DELAY);
329 315
       this->detach();
330 316
     #endif
331 317
   }

+ 2
- 2
Marlin/servo.h Ver arquivo

@@ -63,7 +63,7 @@
63 63
    attached()  - Returns true if there is a servo attached.
64 64
    detach()    - Stops an attached servos from pulsing its i/o pin.
65 65
    move(angle) - Sequence of attach(0), write(angle),
66
-                   With DEACTIVATE_SERVOS_AFTER_MOVE wait SERVO_DEACTIVATION_DELAY and detach.
66
+                   With DEACTIVATE_SERVOS_AFTER_MOVE wait SERVO_DELAY and detach.
67 67
  */
68 68
 
69 69
 #ifndef servo_h
@@ -147,7 +147,7 @@ class Servo {
147 147
     void writeMicroseconds(int value); // write pulse width in microseconds
148 148
     void move(int value);              // attach the servo, then move to value
149 149
                                        // if value is < 200 it is treated as an angle, otherwise as pulse width in microseconds
150
-                                       // if DEACTIVATE_SERVOS_AFTER_MOVE wait SERVO_DEACTIVATION_DELAY, then detach
150
+                                       // if DEACTIVATE_SERVOS_AFTER_MOVE wait SERVO_DELAY, then detach
151 151
     int read();                        // returns current pulse width as an angle between 0 and 180 degrees
152 152
     int readMicroseconds();            // returns current pulse width in microseconds for this servo (was read_us() in first release)
153 153
     bool attached();                   // return true if this servo is attached, otherwise false

Carregando…
Cancelar
Salvar