浏览代码

Generalized enqueue_commands_P, and moved them to Marlin_main as they should

Jérémie FRANCOIS 10 年前
父节点
当前提交
85e5aa4011

+ 145
- 169
Marlin/Configuration.h 查看文件

14
 // example_configurations/delta directory.
14
 // example_configurations/delta directory.
15
 //
15
 //
16
 
16
 
17
-//===========================================================================
18
-//============================= SCARA Printer ===============================
19
-//===========================================================================
20
-// For a Delta printer replace the configuration files with the files in the
21
-// example_configurations/SCARA directory.
22
-//
23
 
17
 
24
 // User-specified version info of this build to display in [Pronterface, etc] terminal window during
18
 // User-specified version info of this build to display in [Pronterface, etc] terminal window during
25
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
19
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
27
 #define STRING_VERSION "v1.0.2"
21
 #define STRING_VERSION "v1.0.2"
28
 #define STRING_URL "reprap.org"
22
 #define STRING_URL "reprap.org"
29
 #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
23
 #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
30
-#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
24
+#define STRING_CONFIG_H_AUTHOR "(Jeremie, Tridimake)" // JFR - Who made the changes.
31
 #define STRING_SPLASH STRING_VERSION " - " STRING_URL // will be shown during bootup
25
 #define STRING_SPLASH STRING_VERSION " - " STRING_URL // will be shown during bootup
32
 
26
 
33
 // SERIAL_PORT selects which serial port should be used for communication with the host.
27
 // SERIAL_PORT selects which serial port should be used for communication with the host.
36
 #define SERIAL_PORT 0
30
 #define SERIAL_PORT 0
37
 
31
 
38
 // This determines the communication speed of the printer
32
 // This determines the communication speed of the printer
39
-#define BAUDRATE 250000
33
+//#define BAUDRATE 250000
34
+#define BAUDRATE 115200
40
 
35
 
41
 // This enables the serial port associated to the Bluetooth interface
36
 // This enables the serial port associated to the Bluetooth interface
42
 //#define BTENABLED              // Enable BT interface on AT90USB devices
37
 //#define BTENABLED              // Enable BT interface on AT90USB devices
44
 // The following define selects which electronics board you have.
39
 // The following define selects which electronics board you have.
45
 // Please choose the name from boards.h that matches your setup
40
 // Please choose the name from boards.h that matches your setup
46
 #ifndef MOTHERBOARD
41
 #ifndef MOTHERBOARD
47
-  #define MOTHERBOARD BOARD_ULTIMAKER
42
+  #define MOTHERBOARD 33 // JFR - was BOARD_ULTIMAKER
48
 #endif
43
 #endif
49
 
44
 
50
 // Define this to set a custom name for your generic Mendel,
45
 // Define this to set a custom name for your generic Mendel,
51
-// #define CUSTOM_MENDEL_NAME "This Mendel"
46
+#define CUSTOM_MENDEL_NAME "[RMud]HP" // JFR -was "This Mendel"
52
 
47
 
53
 // Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines)
48
 // Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines)
54
 // You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4)
49
 // You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4)
67
 // #define PS_DEFAULT_OFF
62
 // #define PS_DEFAULT_OFF
68
 
63
 
69
 //===========================================================================
64
 //===========================================================================
65
+//============================== Delta Settings =============================
66
+//===========================================================================
67
+// Enable DELTA kinematics and most of the default configuration for Deltas
68
+#define DELTA
69
+
70
+// Make delta curves from many straight lines (linear interpolation).
71
+// This is a trade-off between visible corners (not enough segments)
72
+// and processor overload (too many expensive sqrt calls).
73
+#define DELTA_SEGMENTS_PER_SECOND 100 // JFR: was 200
74
+
75
+/*
76
+  Parameter essential for delta calibration:
77
+
78
+            C, Y-Axis
79
+            |                        |___| CARRIAGE_HORIZONTAL_OFFSET
80
+            |                        |   \
81
+            |_________ X-axis        |    \
82
+           / \                       |     \  DELTA_DIAGONAL_ROD
83
+          /   \                             \
84
+         /     \                             \    Carriage is at printer center!
85
+         A      B                             \_____/
86
+                                              |--| END_EFFECTOR_HORIZONTAL_OFFSET
87
+                                         |----| DELTA_RADIUS
88
+                                     |-----------| PRINTER_RADIUS
89
+
90
+  Column angles are measured from X-axis counterclockwise
91
+*/
92
+
93
+// Center-to-center distance of the holes in the diagonal push rods.
94
+#define DELTA_DIAGONAL_ROD (202.4) // mm JFR: was 202 for LABSUD
95
+
96
+// Horizontal offset from middle of printer to smooth rod center.
97
+#define DELTA_SMOOTH_ROD_OFFSET 139.5 // mm
98
+
99
+// Horizontal offset of the universal joints on the end effector.
100
+#define DELTA_EFFECTOR_OFFSET 18.0 // mm
101
+
102
+// Horizontal offset of the universal joints on the carriages.
103
+#define DELTA_CARRIAGE_OFFSET 18.0 // mm
104
+
105
+// Effective horizontal distance bridged by diagonal push rods.
106
+#define DELTA_RADIUS (DELTA_SMOOTH_ROD_OFFSET-DELTA_EFFECTOR_OFFSET-DELTA_CARRIAGE_OFFSET)
107
+
108
+//===========================================================================
70
 //=============================Thermal Settings  ============================
109
 //=============================Thermal Settings  ============================
71
 //===========================================================================
110
 //===========================================================================
72
 //
111
 //
104
 // 147 is Pt100 with 4k7 pullup
143
 // 147 is Pt100 with 4k7 pullup
105
 // 110 is Pt100 with 1k pullup (non standard)
144
 // 110 is Pt100 with 1k pullup (non standard)
106
 
145
 
107
-#define TEMP_SENSOR_0 -1
108
-#define TEMP_SENSOR_1 -1
146
+#define TEMP_SENSOR_0 1 // JFR -was -1
147
+#define TEMP_SENSOR_1 0 // JFR -was -1
109
 #define TEMP_SENSOR_2 0
148
 #define TEMP_SENSOR_2 0
110
 #define TEMP_SENSOR_BED 0
149
 #define TEMP_SENSOR_BED 0
111
 
150
 
114
 #define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10
153
 #define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10
115
 
154
 
116
 // Actual temperature must be close to target for this long before M109 returns success
155
 // Actual temperature must be close to target for this long before M109 returns success
117
-#define TEMP_RESIDENCY_TIME 10  // (seconds)
156
+#define TEMP_RESIDENCY_TIME 4  //  // JFR -was 10 (seconds)
118
 #define TEMP_HYSTERESIS 3       // (degC) range of +/- temperatures considered "close" to the target one
157
 #define TEMP_HYSTERESIS 3       // (degC) range of +/- temperatures considered "close" to the target one
119
 #define TEMP_WINDOW     1       // (degC) Window around target to start the residency timer x degC early.
158
 #define TEMP_WINDOW     1       // (degC) Window around target to start the residency timer x degC early.
120
 
159
 
146
 // PID settings:
185
 // PID settings:
147
 // Comment the following line to disable PID and enable bang-bang.
186
 // Comment the following line to disable PID and enable bang-bang.
148
 #define PIDTEMP
187
 #define PIDTEMP
149
-#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
150
-#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
188
+#define BANG_MAX 80  // JFR -was 255 // limits current to nozzle while in bang-bang mode; 255=full current
189
+#define PID_MAX 70  // JFR -was BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
151
 #ifdef PIDTEMP
190
 #ifdef PIDTEMP
152
   //#define PID_DEBUG // Sends debug data to the serial port.
191
   //#define PID_DEBUG // Sends debug data to the serial port.
153
   //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
192
   //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
154
-  //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
155
-  //#define PID_PARAMS_PER_EXTRUDER // Uses separate PID parameters for each extruder (useful for mismatched extruders)
156
-                                    // Set/get with gcode: M301 E[extruder number, 0-2]
157
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
193
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
158
                                   // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
194
                                   // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
159
   #define PID_INTEGRAL_DRIVE_MAX PID_MAX  //limit for the integral term
195
   #define PID_INTEGRAL_DRIVE_MAX PID_MAX  //limit for the integral term
160
   #define K1 0.95 //smoothing factor within the PID
196
   #define K1 0.95 //smoothing factor within the PID
161
-  #define PID_dT ((OVERSAMPLENR * 10.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine
197
+// JFR: was  #define PID_dT ((OVERSAMPLENR * 10.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine
198
+  #define PID_dT ((16.0 * 8.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine
162
 
199
 
163
 // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
200
 // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
164
 // Ultimaker
201
 // Ultimaker
165
-    #define  DEFAULT_Kp 22.2
166
-    #define  DEFAULT_Ki 1.08
167
-    #define  DEFAULT_Kd 114
202
+//    #define  DEFAULT_Kp 22.2
203
+//    #define  DEFAULT_Ki 1.08
204
+//    #define  DEFAULT_Kd 114
168
 
205
 
169
 // MakerGear
206
 // MakerGear
170
 //    #define  DEFAULT_Kp 7.0
207
 //    #define  DEFAULT_Kp 7.0
175
 //    #define  DEFAULT_Kp 63.0
212
 //    #define  DEFAULT_Kp 63.0
176
 //    #define  DEFAULT_Ki 2.25
213
 //    #define  DEFAULT_Ki 2.25
177
 //    #define  DEFAULT_Kd 440
214
 //    #define  DEFAULT_Kd 440
215
+
216
+// E3D 24v calibrée par frafa  avec buse 12v30W alimentée en 24v
217
+    #define  DEFAULT_Kp 12.48
218
+    #define  DEFAULT_Ki 1.63
219
+    #define  DEFAULT_Kd 23.93
220
+
178
 #endif // PIDTEMP
221
 #endif // PIDTEMP
179
 
222
 
180
 // Bed Temperature Control
223
 // Bed Temperature Control
217
 
260
 
218
 //this prevents dangerous Extruder moves, i.e. if the temperature is under the limit
261
 //this prevents dangerous Extruder moves, i.e. if the temperature is under the limit
219
 //can be software-disabled for whatever purposes by
262
 //can be software-disabled for whatever purposes by
220
-#define PREVENT_DANGEROUS_EXTRUDE
263
+//#define PREVENT_DANGEROUS_EXTRUDE // JFR - was enabled
221
 //if PREVENT_DANGEROUS_EXTRUDE is on, you can still disable (uncomment) very long bits of extrusion separately.
264
 //if PREVENT_DANGEROUS_EXTRUDE is on, you can still disable (uncomment) very long bits of extrusion separately.
222
 #define PREVENT_LENGTHY_EXTRUDE
265
 #define PREVENT_LENGTHY_EXTRUDE
223
 
266
 
266
 //=============================Mechanical Settings===========================
309
 //=============================Mechanical Settings===========================
267
 //===========================================================================
310
 //===========================================================================
268
 
311
 
269
-// Uncomment the following line to enable CoreXY kinematics
270
-// #define COREXY
271
-
272
 // coarse Endstop Settings
312
 // coarse Endstop Settings
273
 #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
313
 #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
274
 
314
 
295
 const bool X_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
335
 const bool X_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
296
 const bool Y_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
336
 const bool Y_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
297
 const bool Z_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
337
 const bool Z_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
298
-const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
299
-const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
300
-const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
338
+const bool X_MAX_ENDSTOP_INVERTING = false; // JFR -was true // set to true to invert the logic of the endstop.
339
+const bool Y_MAX_ENDSTOP_INVERTING = false; // JFR -was true // set to true to invert the logic of the endstop.
340
+const bool Z_MAX_ENDSTOP_INVERTING = false; // JFR -was true // set to true to invert the logic of the endstop.
301
 //#define DISABLE_MAX_ENDSTOPS
341
 //#define DISABLE_MAX_ENDSTOPS
302
-//#define DISABLE_MIN_ENDSTOPS
303
-
342
+// Deltas never have min endstops
343
+//#define DISABLE_MIN_ENDSTOPS // JFR- was not commented out!
304
 // Disable max endstops for compatibility with endstop checking routine
344
 // Disable max endstops for compatibility with endstop checking routine
305
 #if defined(COREXY) && !defined(DISABLE_MAX_ENDSTOPS)
345
 #if defined(COREXY) && !defined(DISABLE_MAX_ENDSTOPS)
306
   #define DISABLE_MAX_ENDSTOPS
346
   #define DISABLE_MAX_ENDSTOPS
319
 #define DISABLE_E false // For all extruders
359
 #define DISABLE_E false // For all extruders
320
 #define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled
360
 #define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled
321
 
361
 
322
-#define INVERT_X_DIR true    // for Mendel set to false, for Orca set to true
323
-#define INVERT_Y_DIR false    // for Mendel set to true, for Orca set to false
324
-#define INVERT_Z_DIR true     // for Mendel set to false, for Orca set to true
325
-#define INVERT_E0_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
362
+#define INVERT_X_DIR false // DELTA does not invert
363
+#define INVERT_Y_DIR false
364
+#define INVERT_Z_DIR false
365
+
366
+#define INVERT_E0_DIR true   // JFR - was false // for direct drive extruder v9 set to true, for geared extruder set to false
326
 #define INVERT_E1_DIR false    // for direct drive extruder v9 set to true, for geared extruder set to false
367
 #define INVERT_E1_DIR false    // for direct drive extruder v9 set to true, for geared extruder set to false
327
 #define INVERT_E2_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
368
 #define INVERT_E2_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
328
 
369
 
329
 // ENDSTOP SETTINGS:
370
 // ENDSTOP SETTINGS:
330
 // Sets direction of endstops when homing; 1=MAX, -1=MIN
371
 // Sets direction of endstops when homing; 1=MAX, -1=MIN
331
-#define X_HOME_DIR -1
332
-#define Y_HOME_DIR -1
333
-#define Z_HOME_DIR -1
372
+// deltas always home to max
373
+#define X_HOME_DIR 1
374
+#define Y_HOME_DIR 1
375
+#define Z_HOME_DIR 1
334
 
376
 
335
 #define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
377
 #define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
336
 #define max_software_endstops true  // If true, axis won't move to coordinates greater than the defined lengths below.
378
 #define max_software_endstops true  // If true, axis won't move to coordinates greater than the defined lengths below.
337
 
379
 
338
 // Travel limits after homing
380
 // Travel limits after homing
339
-#define X_MAX_POS 205
340
-#define X_MIN_POS 0
341
-#define Y_MAX_POS 205
342
-#define Y_MIN_POS 0
343
-#define Z_MAX_POS 200
381
+#define X_MAX_POS 85 // JFR - was 205
382
+#define X_MIN_POS -85 // JFR - was 0
383
+#define Y_MAX_POS 85 // JFR - was 205
384
+#define Y_MIN_POS -85 // JFR - was 0
385
+#define Z_MAX_POS MANUAL_Z_HOME_POS // JFR - was 200
344
 #define Z_MIN_POS 0
386
 #define Z_MIN_POS 0
345
 
387
 
346
 #define X_MAX_LENGTH (X_MAX_POS - X_MIN_POS)
388
 #define X_MAX_LENGTH (X_MAX_POS - X_MIN_POS)
347
 #define Y_MAX_LENGTH (Y_MAX_POS - Y_MIN_POS)
389
 #define Y_MAX_LENGTH (Y_MAX_POS - Y_MIN_POS)
348
 #define Z_MAX_LENGTH (Z_MAX_POS - Z_MIN_POS)
390
 #define Z_MAX_LENGTH (Z_MAX_POS - Z_MIN_POS)
349
 //============================= Bed Auto Leveling ===========================
391
 //============================= Bed Auto Leveling ===========================
392
+//Bed Auto Leveling is still not compatible with Delta Kinematics
350
 
393
 
351
-//#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line)
352
-#define Z_PROBE_REPEATABILITY_TEST  // If not commented out, Z-Probe Repeatability test will be included if Auto Bed Leveling is Enabled.
353
-
354
-#ifdef ENABLE_AUTO_BED_LEVELING
355
-
356
-// There are 2 different ways to pick the X and Y locations to probe:
357
-
358
-//  - "grid" mode
359
-//    Probe every point in a rectangular grid
360
-//    You must specify the rectangle, and the density of sample points
361
-//    This mode is preferred because there are more measurements.
362
-//    It used to be called ACCURATE_BED_LEVELING but "grid" is more descriptive
363
-
364
-//  - "3-point" mode
365
-//    Probe 3 arbitrary points on the bed (that aren't colinear)
366
-//    You must specify the X & Y coordinates of all 3 points
367
-
368
-  #define AUTO_BED_LEVELING_GRID
369
-  // with AUTO_BED_LEVELING_GRID, the bed is sampled in a
370
-  // AUTO_BED_LEVELING_GRID_POINTSxAUTO_BED_LEVELING_GRID_POINTS grid
371
-  // and least squares solution is calculated
372
-  // Note: this feature occupies 10'206 byte
373
-  #ifdef AUTO_BED_LEVELING_GRID
374
-
375
-    // set the rectangle in which to probe
376
-    #define LEFT_PROBE_BED_POSITION 15
377
-    #define RIGHT_PROBE_BED_POSITION 170
378
-    #define BACK_PROBE_BED_POSITION 180
379
-    #define FRONT_PROBE_BED_POSITION 20
380
-
381
-     // set the number of grid points per dimension
382
-     // I wouldn't see a reason to go above 3 (=9 probing points on the bed)
383
-    #define AUTO_BED_LEVELING_GRID_POINTS 2
384
-
385
-
386
-  #else  // not AUTO_BED_LEVELING_GRID
387
-    // with no grid, just probe 3 arbitrary points.  A simple cross-product
388
-    // is used to esimate the plane of the print bed
389
-
390
-      #define ABL_PROBE_PT_1_X 15
391
-      #define ABL_PROBE_PT_1_Y 180
392
-      #define ABL_PROBE_PT_2_X 15
393
-      #define ABL_PROBE_PT_2_Y 20
394
-      #define ABL_PROBE_PT_3_X 170
395
-      #define ABL_PROBE_PT_3_Y 20
396
 
394
 
397
-  #endif // AUTO_BED_LEVELING_GRID
398
-
399
-
400
-  // these are the offsets to the probe relative to the extruder tip (Hotend - Probe)
401
-  // X and Y offsets must be integers
402
-  #define X_PROBE_OFFSET_FROM_EXTRUDER -25
403
-  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29
404
-  #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35
405
-
406
-  #define Z_RAISE_BEFORE_HOMING 4       // (in mm) Raise Z before homing (G28) for Probe Clearance.
407
-                                        // Be sure you have this distance over your Z_MAX_POS in case
408
-
409
-  #define XY_TRAVEL_SPEED 8000         // X and Y axis travel speed between probes, in mm/min
410
-
411
-  #define Z_RAISE_BEFORE_PROBING 15    //How much the extruder will be raised before traveling to the first probing point.
412
-  #define Z_RAISE_BETWEEN_PROBINGS 5  //How much the extruder will be raised when traveling from between next probing points
413
-
414
-  //#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell
415
-  //#define SLED_DOCKING_OFFSET 5 // the extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
416
-
417
-  //If defined, the Probe servo will be turned on only during movement and then turned off to avoid jerk
418
-  //The value is the delay to turn the servo off after powered on - depends on the servo speed; 300ms is good value, but you can try lower it.
419
-  // You MUST HAVE the SERVO_ENDSTOPS defined to use here a value higher than zero otherwise your code will not compile.
420
-
421
-//  #define PROBE_SERVO_DEACTIVATION_DELAY 300
422
-
423
-
424
-//If you have enabled the Bed Auto Leveling and are using the same Z Probe for Z Homing,
425
-//it is highly recommended you let this Z_SAFE_HOMING enabled!!!
426
-
427
-  #define Z_SAFE_HOMING   // This feature is meant to avoid Z homing with probe outside the bed area.
428
-                          // When defined, it will:
429
-                          // - Allow Z homing only after X and Y homing AND stepper drivers still enabled
430
-                          // - If stepper drivers timeout, it will need X and Y homing again before Z homing
431
-                          // - Position the probe in a defined XY point before Z Homing when homing all axis (G28)
432
-                          // - Block Z homing only when the probe is outside bed area.
433
-
434
-  #ifdef Z_SAFE_HOMING
435
-
436
-    #define Z_SAFE_HOMING_X_POINT (X_MAX_LENGTH/2)    // X point for Z homing when homing all axis (G28)
437
-    #define Z_SAFE_HOMING_Y_POINT (Y_MAX_LENGTH/2)    // Y point for Z homing when homing all axis (G28)
438
-
439
-  #endif
440
-
441
-  #ifdef AUTO_BED_LEVELING_GRID	// Check if Probe_Offset * Grid Points is greater than Probing Range
442
-    #if X_PROBE_OFFSET_FROM_EXTRUDER < 0
443
-      #if (-(X_PROBE_OFFSET_FROM_EXTRUDER * (AUTO_BED_LEVELING_GRID_POINTS-1)) >= (RIGHT_PROBE_BED_POSITION - LEFT_PROBE_BED_POSITION))
444
-	     #error "The X axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
445
-	  #endif
446
-	#else
447
-      #if ((X_PROBE_OFFSET_FROM_EXTRUDER * (AUTO_BED_LEVELING_GRID_POINTS-1)) >= (RIGHT_PROBE_BED_POSITION - LEFT_PROBE_BED_POSITION))
448
-	     #error "The X axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
449
-	  #endif
450
-	#endif
451
-    #if Y_PROBE_OFFSET_FROM_EXTRUDER < 0
452
-      #if (-(Y_PROBE_OFFSET_FROM_EXTRUDER * (AUTO_BED_LEVELING_GRID_POINTS-1)) >= (BACK_PROBE_BED_POSITION - FRONT_PROBE_BED_POSITION))
453
-	     #error "The Y axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
454
-	  #endif
455
-	#else
456
-      #if ((Y_PROBE_OFFSET_FROM_EXTRUDER * (AUTO_BED_LEVELING_GRID_POINTS-1)) >= (BACK_PROBE_BED_POSITION - FRONT_PROBE_BED_POSITION))
457
-	     #error "The Y axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
458
-	  #endif
459
-	#endif
460
-
461
-	
462
-  #endif
463
-  
464
-#endif // ENABLE_AUTO_BED_LEVELING
465
 
395
 
466
 
396
 
467
 // The position of the homing switches
397
 // The position of the homing switches
469
 //#define BED_CENTER_AT_0_0  // If defined, the center of the bed is at (X=0, Y=0)
399
 //#define BED_CENTER_AT_0_0  // If defined, the center of the bed is at (X=0, Y=0)
470
 
400
 
471
 //Manual homing switch locations:
401
 //Manual homing switch locations:
402
+
403
+#define MANUAL_HOME_POSITIONS  // MANUAL_*_HOME_POS below will be used // JFR- was disabled
472
 // For deltabots this means top and center of the Cartesian print volume.
404
 // For deltabots this means top and center of the Cartesian print volume.
473
 #define MANUAL_X_HOME_POS 0
405
 #define MANUAL_X_HOME_POS 0
474
 #define MANUAL_Y_HOME_POS 0
406
 #define MANUAL_Y_HOME_POS 0
475
-#define MANUAL_Z_HOME_POS 0
407
+#define MANUAL_Z_HOME_POS (142.7-1)
476
 //#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing.
408
 //#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing.
477
 
409
 
478
 //// MOVEMENT SETTINGS
410
 //// MOVEMENT SETTINGS
479
 #define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
411
 #define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
480
-#define HOMING_FEEDRATE {50*60, 50*60, 4*60, 0}  // set the homing speeds (mm/min)
412
+
413
+// delta homing speeds must be the same on xyz
414
+#define HOMING_FEEDRATE {200*60, 200*60, 200*60, 0}  // set the homing speeds (mm/min)
415
+
416
+// ================>>>>> N.R. with bug fixes by JFR
417
+// Compute speed, feedrate and acceleration by means of pulley & motor specs only
481
 
418
 
482
 // default settings
419
 // default settings
420
+#define PI 3.14159265
421
+#define G  9806.65
422
+
423
+//Motors (movement)
424
+#define MVT_N        3      // g acceleration for movement (3 ok)
425
+#define MVT_SPR      200.0  // step per revolution
426
+#define MVT_MS       32     // microstep (1/32 only possible with DRV8825 -- also 2.5A)
427
+#define MVT_OMEG     900.0  // maximum number of revolutions per minute at 19V (was 600-900)
428
+#define PULLEY_TN    26.0   // number of teeth on X/Y/Z pulley
429
+#define PULLEY_STEP  3.0    // pulley tooth size (mm)
483
 
430
 
484
-#define DEFAULT_AXIS_STEPS_PER_UNIT   {78.7402,78.7402,200.0*8/3,760*1.1}  // default steps per unit for Ultimaker
485
-#define DEFAULT_MAX_FEEDRATE          {500, 500, 5, 25}    // (mm/sec)
486
-#define DEFAULT_MAX_ACCELERATION      {9000,9000,100,10000}    // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for Skeinforge 40+, for older versions raise them a lot.
431
+//Extruder motor
432
+#define XTR_N        MVT_N   // g acceleration for extruder
433
+#define XTR_SPR      (MVT_SPR*5) // step per revolution (with 5:1 reductor)
434
+#define XTR_MS       MVT_MS  // microstep
435
+#define XTR_OMEG     225.0   // maximum number of revolutions per minute // was 600-900
436
+#define MVT_DHB      10.56   // Hobbed bolt diameter
437
+
438
+#define MVT_PCIRC    ( PULLEY_TN * PULLEY_STEP ) // pulley circumference
439
+#define MVT_S        ( MVT_SPR * MVT_MS / MVT_PCIRC ) // step_per_revolution * microstepping / circumference
440
+#define MVT_V        ( MVT_OMEG * MVT_PCIRC / 60.0 ) // max velocity (mm/s)
441
+
442
+#define XTR_HBCIRC   ( PI * MVT_DHB ) // hobbed bolt circumference from diameter
443
+#define XTR_S        ( XTR_SPR * XTR_MS / XTR_HBCIRC )     //step per mm
444
+#define XTR_V        ( XTR_OMEG * XTR_HBCIRC / 60 ) // max velocity (mm/s)
445
+
446
+// the second axis sometimes needs /2 (BROKEN DRIVER??!!)
447
+#define DEFAULT_AXIS_STEPS_PER_UNIT   { MVT_S, MVT_S, MVT_S, XTR_S }
448
+#define DEFAULT_MAX_FEEDRATE          { MVT_V, MVT_V, MVT_V, XTR_V }  // (mm/sec)
449
+//JFR: is this OK?? #define DEFAULT_MAX_ACCELERATION      { MVT_N*G, MVT_N*G, MVT_N*G, XTR_N*G }  // X, Y, Z, E maximum start speed for accelerated moves.
450
+#define DEFAULT_MAX_ACCELERATION      {9000,9000,9000,10000}    // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for skeinforge 40+, for older versions raise them a lot.
451
+
452
+// JFR: do we want to multiply here by MVT_N and XTR_N ipo N ?
453
+#define DEFAULT_ACCELERATION          (MVT_N*G*3/4)   // X, Y, Z and E max acceleration in mm/s^2 for printing moves
454
+#define DEFAULT_RETRACT_ACCELERATION  (XTR_N*G*3/4)   // X, Y, Z and E max acceleration in mm/s^2 for r retracts
455
+
456
+//<<<<<================ JFR / N.R.
487
 
457
 
488
-#define DEFAULT_ACCELERATION          3000    // X, Y, Z and E max acceleration in mm/s^2 for printing moves
489
-#define DEFAULT_RETRACT_ACCELERATION  3000   // X, Y, Z and E max acceleration in mm/s^2 for retracts
490
 
458
 
491
 // Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
459
 // Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
492
 // The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).
460
 // The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).
496
 
464
 
497
 // The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously)
465
 // The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously)
498
 #define DEFAULT_XYJERK                20.0    // (mm/sec)
466
 #define DEFAULT_XYJERK                20.0    // (mm/sec)
499
-#define DEFAULT_ZJERK                 0.4     // (mm/sec)
467
+#define DEFAULT_ZJERK                 20.0    // (mm/sec) Must be same as XY for delta
500
 #define DEFAULT_EJERK                 5.0    // (mm/sec)
468
 #define DEFAULT_EJERK                 5.0    // (mm/sec)
501
 
469
 
502
 //===========================================================================
470
 //===========================================================================
521
 //#define EEPROM_SETTINGS
489
 //#define EEPROM_SETTINGS
522
 //to disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
490
 //to disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
523
 // please keep turned on if you can.
491
 // please keep turned on if you can.
524
-//#define EEPROM_CHITCHAT
492
+#define EEPROM_CHITCHAT
525
 
493
 
526
 // Preheat Constants
494
 // Preheat Constants
527
 #define PLA_PREHEAT_HOTEND_TEMP 180
495
 #define PLA_PREHEAT_HOTEND_TEMP 180
551
 
519
 
552
 // The RepRapDiscount Smart Controller (white PCB)
520
 // The RepRapDiscount Smart Controller (white PCB)
553
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
521
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
554
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
522
+#define REPRAP_DISCOUNT_SMART_CONTROLLER
555
 
523
 
556
 // The GADGETS3D G3D LCD/SD Controller (blue PCB)
524
 // The GADGETS3D G3D LCD/SD Controller (blue PCB)
557
 // http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
525
 // http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
573
 // REMEMBER TO INSTALL LiquidCrystal_I2C.h in your ARDUINO library folder: https://github.com/kiyoshigawa/LiquidCrystal_I2C
541
 // REMEMBER TO INSTALL LiquidCrystal_I2C.h in your ARDUINO library folder: https://github.com/kiyoshigawa/LiquidCrystal_I2C
574
 //#define RA_CONTROL_PANEL
542
 //#define RA_CONTROL_PANEL
575
 
543
 
544
+// Delta calibration menu
545
+// uncomment to add three points calibration menu option.
546
+// See http://minow.blogspot.com/index.html#4918805519571907051
547
+// If needed, adjust the X, Y, Z calibration coordinates
548
+// in ultralcd.cpp@lcd_delta_calibrate_menu()
549
+#define DELTA_CALIBRATION_MENU // JFR - was disabled
550
+
576
 //automatic expansion
551
 //automatic expansion
577
 #if defined (MAKRPANEL)
552
 #if defined (MAKRPANEL)
578
  #define DOGLCD
553
  #define DOGLCD
771
 // Uncomment below to enable
746
 // Uncomment below to enable
772
 //#define FILAMENT_SENSOR
747
 //#define FILAMENT_SENSOR
773
 
748
 
774
-#define FILAMENT_SENSOR_EXTRUDER_NUM	0  //The number of the extruder that has the filament sensor (0,1,2)
775
-#define MEASUREMENT_DELAY_CM			14  //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
749
+#define FILAMENT_SENSOR_EXTRUDER_NUM  0  //The number of the extruder that has the filament sensor (0,1,2)
750
+#define MEASUREMENT_DELAY_CM      14  //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
776
 
751
 
777
 #define DEFAULT_NOMINAL_FILAMENT_DIA  3.0  //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software.  Used for sensor reading validation
752
 #define DEFAULT_NOMINAL_FILAMENT_DIA  3.0  //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software.  Used for sensor reading validation
778
 #define MEASURED_UPPER_LIMIT          3.30  //upper limit factor used for sensor reading validation in mm
753
 #define MEASURED_UPPER_LIMIT          3.30  //upper limit factor used for sensor reading validation in mm
779
 #define MEASURED_LOWER_LIMIT          1.90  //lower limit factor for sensor reading validation in mm
754
 #define MEASURED_LOWER_LIMIT          1.90  //lower limit factor for sensor reading validation in mm
780
-#define MAX_MEASUREMENT_DELAY			20  //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM  and lower number saves RAM)
755
+#define MAX_MEASUREMENT_DELAY     20  //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM  and lower number saves RAM)
781
 
756
 
782
 //defines used in the code
757
 //defines used in the code
783
 #define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially 
758
 #define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially 
790
 
765
 
791
 
766
 
792
 
767
 
768
+
793
 #include "Configuration_adv.h"
769
 #include "Configuration_adv.h"
794
 #include "thermistortables.h"
770
 #include "thermistortables.h"
795
 
771
 

+ 2
- 2
Marlin/Configuration_adv.h 查看文件

213
 //homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
213
 //homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
214
 #define X_HOME_RETRACT_MM 5
214
 #define X_HOME_RETRACT_MM 5
215
 #define Y_HOME_RETRACT_MM 5
215
 #define Y_HOME_RETRACT_MM 5
216
-#define Z_HOME_RETRACT_MM 2
216
+#define Z_HOME_RETRACT_MM 5
217
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
217
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
218
 
218
 
219
 #define AXIS_RELATIVE_MODES {false, false, false, false}
219
 #define AXIS_RELATIVE_MODES {false, false, false, false}
248
 #define DEFAULT_MINSEGMENTTIME        20000
248
 #define DEFAULT_MINSEGMENTTIME        20000
249
 
249
 
250
 // If defined the movements slow down when the look ahead buffer is only half full
250
 // If defined the movements slow down when the look ahead buffer is only half full
251
-#define SLOWDOWN
251
+// #define SLOWDOWN // JFR - important, was enabled!!
252
 
252
 
253
 // Frequency limit
253
 // Frequency limit
254
 // See nophead's blog for more info
254
 // See nophead's blog for more info

+ 3
- 2
Marlin/Marlin.h 查看文件

199
 
199
 
200
 bool IsStopped();
200
 bool IsStopped();
201
 
201
 
202
-bool enquecommand(const char *cmd); //put an ASCII command at the end of the current buffer or return false when it is full
203
-void enquecommand_P(const char *cmd); //put an ASCII command at the end of the current buffer, read from flash
202
+bool enquecommand(const char *cmd); //put a single ASCII command at the end of the current buffer or return false when it is full
203
+void enquecommands_P(const char *cmd); //put one or many ASCII commands at the end of the current buffer, read from flash
204
+
204
 void prepare_arc_move(char isclockwise);
205
 void prepare_arc_move(char isclockwise);
205
 void clamp_to_software_endstops(float target[3]);
206
 void clamp_to_software_endstops(float target[3]);
206
 
207
 

+ 0
- 56
Marlin/Marlin.pde 查看文件

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
28
- */
29
-
30
-/* All the implementation is done in *.cpp files to get better compatibility with avr-gcc without the Arduino IDE */
31
-/* Use this file to help the Arduino IDE find which Arduino libraries are needed and to keep documentation on GCode */
32
-
33
-#include "Configuration.h"
34
-#include "pins.h"
35
-
36
-#ifdef ULTRA_LCD
37
-  #if defined(LCD_I2C_TYPE_PCF8575)
38
-    #include <Wire.h>
39
-    #include <LiquidCrystal_I2C.h>
40
-  #elif defined(LCD_I2C_TYPE_MCP23017) || defined(LCD_I2C_TYPE_MCP23008)
41
-    #include <Wire.h>
42
-    #include <LiquidTWI2.h>
43
-  #elif defined(DOGLCD)
44
-    #include <U8glib.h> // library for graphics LCD by Oli Kraus (https://code.google.com/p/u8glib/)
45
-  #else
46
-    #include <LiquidCrystal.h> // library for character LCD
47
-  #endif
48
-#endif
49
-
50
-#if defined(DIGIPOTSS_PIN) && DIGIPOTSS_PIN > -1
51
-#include <SPI.h>
52
-#endif
53
-
54
-#if defined(DIGIPOT_I2C)
55
-  #include <Wire.h>
56
-#endif

+ 55
- 29
Marlin/Marlin_main.cpp 查看文件

384
 static boolean comment_mode = false;
384
 static boolean comment_mode = false;
385
 static char *strchr_pointer; // just a pointer to find chars in the command string like X, Y, Z, E, etc
385
 static char *strchr_pointer; // just a pointer to find chars in the command string like X, Y, Z, E, etc
386
 
386
 
387
+const char* queued_commands_P= NULL; /* pointer to the current line in the active sequence of commands, or NULL when none */
388
+
387
 const int sensitive_pins[] = SENSITIVE_PINS; // Sensitive pin list for M42
389
 const int sensitive_pins[] = SENSITIVE_PINS; // Sensitive pin list for M42
388
 
390
 
389
 //static float tt = 0;
391
 //static float tt = 0;
451
   }
453
   }
452
 #endif //!SDSUPPORT
454
 #endif //!SDSUPPORT
453
 
455
 
454
-//adds an command to the main command buffer
455
-//thats really done in a non-safe way.
456
-//needs overworking someday
457
-//(or return false if it failed to do so)
458
-bool enquecommand(const char *cmd)
456
+//Injects the next command from the pending sequence of commands, when possible
457
+//Return false if and only if no command was pending
458
+static bool drain_queued_commands_P()
459
 {
459
 {
460
-  if(buflen >= BUFSIZE)
460
+  char cmd[30];
461
+  if(!queued_commands_P)
461
     return false;
462
     return false;
462
-  else
463
+  // Get the next 30 chars from the sequence of gcodes to run
464
+  strncpy_P(cmd, queued_commands_P, sizeof(cmd)-1);
465
+  cmd[sizeof(cmd)-1]= 0;
466
+  // Look for the end of line, or the end of sequence
467
+  size_t i= 0;
468
+  char c;
469
+  while( (c= cmd[i]) && c!='\n' )
470
+    ++i; // look for the end of this gcode command
471
+  cmd[i]= 0;
472
+  if(enquecommand(cmd)) // buffer was not full (else we will retry later)
463
   {
473
   {
464
-    //this is dangerous if a mixing of serial and this happens
465
-    strcpy(&(cmdbuffer[bufindw][0]),cmd);
466
-    SERIAL_ECHO_START;
467
-    SERIAL_ECHOPGM(MSG_Enqueing);
468
-    SERIAL_ECHO(cmdbuffer[bufindw]);
469
-    SERIAL_ECHOLNPGM("\"");
470
-    bufindw= (bufindw + 1)%BUFSIZE;
471
-    buflen += 1;
472
-    return true;
474
+    if(c)
475
+      queued_commands_P+= i+1; // move to next command
476
+    else
477
+      queued_commands_P= NULL; // will have no more commands in the sequence
473
   }
478
   }
479
+  return true;
474
 }
480
 }
475
 
481
 
476
-void enquecommand_P(const char *cmd)
482
+//Record one or many commands to run from program memory.
483
+//Aborts the current queue, if any.
484
+//Note: drain_queued_commands_P() must be called repeatedly to drain the commands afterwards
485
+void enquecommands_P(const char* pgcode)
477
 {
486
 {
478
-  if(buflen < BUFSIZE)
479
-  {
480
-    //this is dangerous if a mixing of serial and this happens
481
-    strcpy_P(&(cmdbuffer[bufindw][0]),cmd);
482
-    SERIAL_ECHO_START;
483
-    SERIAL_ECHOPGM(MSG_Enqueing);
484
-    SERIAL_ECHO(cmdbuffer[bufindw]);
485
-    SERIAL_ECHOLNPGM("\"");
486
-    bufindw= (bufindw + 1)%BUFSIZE;
487
-    buflen += 1;
488
-  }
487
+    queued_commands_P= pgcode;
488
+    drain_queued_commands_P(); // first command exectuted asap (when possible)
489
 }
489
 }
490
 
490
 
491
+//adds a single command to the main command buffer, from RAM
492
+//that is really done in a non-safe way.
493
+//needs overworking someday
494
+//Returns false if it failed to do so
495
+bool enquecommand(const char *cmd)
496
+{
497
+  if(*cmd==';')
498
+    return false;
499
+  if(buflen >= BUFSIZE)
500
+    return false;
501
+  //this is dangerous if a mixing of serial and this happens
502
+  strcpy(&(cmdbuffer[bufindw][0]),cmd);
503
+  SERIAL_ECHO_START;
504
+  SERIAL_ECHOPGM(MSG_Enqueing);
505
+  SERIAL_ECHO(cmdbuffer[bufindw]);
506
+  SERIAL_ECHOLNPGM("\"");
507
+  bufindw= (bufindw + 1)%BUFSIZE;
508
+  buflen += 1;
509
+  return true;
510
+}
511
+
512
+
513
+
491
 void setup_killpin()
514
 void setup_killpin()
492
 {
515
 {
493
   #if defined(KILL_PIN) && KILL_PIN > -1
516
   #if defined(KILL_PIN) && KILL_PIN > -1
691
 
714
 
692
 void get_command()
715
 void get_command()
693
 {
716
 {
717
+  if(drain_queued_commands_P()) // priority is given to non-serial commands
718
+    return;
719
+  
694
   while( MYSERIAL.available() > 0  && buflen < BUFSIZE) {
720
   while( MYSERIAL.available() > 0  && buflen < BUFSIZE) {
695
     serial_char = MYSERIAL.read();
721
     serial_char = MYSERIAL.read();
696
     if(serial_char == '\n' ||
722
     if(serial_char == '\n' ||
4489
     {
4515
     {
4490
        if (homeDebounceCount == 0)
4516
        if (homeDebounceCount == 0)
4491
        {
4517
        {
4492
-          enquecommand_P((PSTR("G28")));
4518
+          enquecommands_P((PSTR("G28")));
4493
           homeDebounceCount++;
4519
           homeDebounceCount++;
4494
           LCD_ALERTMESSAGEPGM(MSG_AUTO_HOME);
4520
           LCD_ALERTMESSAGEPGM(MSG_AUTO_HOME);
4495
        }
4521
        }

+ 2
- 2
Marlin/cardreader.cpp 查看文件

532
 
532
 
533
       sprintf_P(cmd, PSTR("M23 %s"), autoname);
533
       sprintf_P(cmd, PSTR("M23 %s"), autoname);
534
       enquecommand(cmd);
534
       enquecommand(cmd);
535
-      enquecommand_P(PSTR("M24"));
535
+      enquecommands_P(PSTR("M24"));
536
       found=true;
536
       found=true;
537
     }
537
     }
538
   }
538
   }
637
       if(SD_FINISHED_STEPPERRELEASE)
637
       if(SD_FINISHED_STEPPERRELEASE)
638
       {
638
       {
639
           //finishAndDisableSteppers();
639
           //finishAndDisableSteppers();
640
-          enquecommand_P(PSTR(SD_FINISHED_RELEASECOMMAND));
640
+          enquecommands_P(PSTR(SD_FINISHED_RELEASECOMMAND));
641
       }
641
       }
642
       autotempShutdown();
642
       autotempShutdown();
643
     }
643
     }

+ 0
- 2
Marlin/example_configurations/delta/Configuration.h 查看文件

67
 // and processor overload (too many expensive sqrt calls).
67
 // and processor overload (too many expensive sqrt calls).
68
 #define DELTA_SEGMENTS_PER_SECOND 200
68
 #define DELTA_SEGMENTS_PER_SECOND 200
69
 
69
 
70
-// NOTE NB all values for DELTA_* values MUST be floating point, so always have a decimal point in them
71
-
72
 // Center-to-center distance of the holes in the diagonal push rods.
70
 // Center-to-center distance of the holes in the diagonal push rods.
73
 #define DELTA_DIAGONAL_ROD 250.0 // mm
71
 #define DELTA_DIAGONAL_ROD 250.0 // mm
74
 
72
 

+ 13
- 35
Marlin/ultralcd.cpp 查看文件

10
 
10
 
11
 int8_t encoderDiff; /* encoderDiff is updated from interrupt context and added to encoderPosition every LCD update */
11
 int8_t encoderDiff; /* encoderDiff is updated from interrupt context and added to encoderPosition every LCD update */
12
 
12
 
13
-const char* pgcode_seq= NULL; /* pointer to the current line in the active sequence of commands, or NULL when none */
14
-
15
 /* Configuration settings */
13
 /* Configuration settings */
16
 int plaPreheatHotendTemp;
14
 int plaPreheatHotendTemp;
17
 int plaPreheatHPBTemp;
15
 int plaPreheatHPBTemp;
78
 static void menu_action_back(menuFunc_t data);
76
 static void menu_action_back(menuFunc_t data);
79
 static void menu_action_submenu(menuFunc_t data);
77
 static void menu_action_submenu(menuFunc_t data);
80
 static void menu_action_gcode(const char* pgcode);
78
 static void menu_action_gcode(const char* pgcode);
81
-static void menu_action_gcode_next();
82
 static void menu_action_function(menuFunc_t data);
79
 static void menu_action_function(menuFunc_t data);
83
 static void menu_action_sdfile(const char* filename, char* longFilename);
80
 static void menu_action_sdfile(const char* filename, char* longFilename);
84
 static void menu_action_sddirectory(const char* filename, char* longFilename);
81
 static void menu_action_sddirectory(const char* filename, char* longFilename);
327
     quickStop();
324
     quickStop();
328
     if(SD_FINISHED_STEPPERRELEASE)
325
     if(SD_FINISHED_STEPPERRELEASE)
329
     {
326
     {
330
-        enquecommand_P(PSTR(SD_FINISHED_RELEASECOMMAND));
327
+        enquecommands_P(PSTR(SD_FINISHED_RELEASECOMMAND));
331
     }
328
     }
332
     autotempShutdown();
329
     autotempShutdown();
333
 
330
 
350
         MENU_ITEM(submenu, MSG_DELTA_CALIBRATE, lcd_delta_calibrate_menu);
347
         MENU_ITEM(submenu, MSG_DELTA_CALIBRATE, lcd_delta_calibrate_menu);
351
 #endif // DELTA_CALIBRATION_MENU
348
 #endif // DELTA_CALIBRATION_MENU
352
     }
349
     }
350
+/*JFR TEST*/            MENU_ITEM(gcode, "test multiline", PSTR("G4 S3\nM104 S50\nG4 S1\nM104 S200\nG4 S2\nM104 S0"));  // SD-card changed by user
353
     MENU_ITEM(submenu, MSG_CONTROL, lcd_control_menu);
351
     MENU_ITEM(submenu, MSG_CONTROL, lcd_control_menu);
354
 #ifdef SDSUPPORT
352
 #ifdef SDSUPPORT
355
     if (card.cardOK)
353
     if (card.cardOK)
397
     plan_set_position(0.0, 0.0, 0.0, current_position[E_AXIS]);
395
     plan_set_position(0.0, 0.0, 0.0, current_position[E_AXIS]);
398
 
396
 
399
     // Audio feedback
397
     // Audio feedback
400
-    enquecommand_P(PSTR("M300 S659 P200"));
401
-    enquecommand_P(PSTR("M300 S698 P200"));
398
+    enquecommands_P(PSTR("M300 S659 P200\nM300 S698 P200"));
402
     lcd_return_to_status();
399
     lcd_return_to_status();
403
 }
400
 }
404
 
401
 
680
     }
677
     }
681
 #endif
678
 #endif
682
     MENU_ITEM(submenu, MSG_MOVE_AXIS, lcd_move_menu);
679
     MENU_ITEM(submenu, MSG_MOVE_AXIS, lcd_move_menu);
680
+		
681
+    // JFR for RMud delta printer
682
+    MENU_ITEM(gcode, "Calibrate bed", PSTR("M702\nG28\nG1 X-77.94 Y-45 Z36 F8000\nG4 S3\nM701 P0\nG1 X77.94 Y-45 Z36\nG4 S3\nM701 P1\nG1 X0 Y90 Z36\nG4 S3\nM701 P2\nM700\nG1 X0 Y0 Z100 F8000"));
683
+    MENU_ITEM(gcode, "Check level", PSTR("G28\nG1 X0 Y0 Z1 F4000\nG1 X-77.94 Y-45 Z1\nG1 X77.94 Y-45\nG1 X0 Y90\nG1 X-77.94 Y-45\nG4 S2\nG1 X-77.94 Y-45 Z0.3 F2000\nG1 X-77.94 Y-45\nG1 X77.94 Y-45\nG1 X0 Y90\nG1 X-77.94 Y-45\nG1 X0 Y0 Z0"));
684
+    MENU_ITEM(gcode, "Retract filament", PSTR("M302\nM82\nG92 E0\nG1 F4000 E-800"));
685
+    MENU_ITEM(gcode, "Insert filament", PSTR("M302\nM82\nG92 E0\nG1 F4000 E60"));
686
+    MENU_ITEM(gcode, "Finalize filament", PSTR("G1 F4000 E790"));
683
     END_MENU();
687
     END_MENU();
684
 }
688
 }
685
 
689
 
1151
     lcd_move_y();
1155
     lcd_move_y();
1152
 	}
1156
 	}
1153
 	static void reprapworld_keypad_move_home() {
1157
 	static void reprapworld_keypad_move_home() {
1154
-		enquecommand_P((PSTR("G28"))); // move all axis home
1158
+		enquecommands_P((PSTR("G28"))); // move all axis home
1155
 	}
1159
 	}
1156
 #endif
1160
 #endif
1157
 
1161
 
1170
 
1174
 
1171
 static void menu_action_gcode(const char* pgcode)
1175
 static void menu_action_gcode(const char* pgcode)
1172
 {
1176
 {
1173
-	// No more calling enquecommand_P(pgcode) as it allows only one command!
1174
-	pgcode_seq= pgcode;
1175
-	menu_action_gcode_next();
1176
-}
1177
-
1178
-static void menu_action_gcode_next()
1179
-{
1180
-	// Inject the next command from the pending sequence, when not empty.
1181
-	char cmd[30];
1182
-	if(!pgcode_seq) return;
1183
-        // Get the next 30 chars from the sequence of gcodes to run
1184
-        strncpy_P(cmd, pgcode_seq, sizeof(cmd)-1);
1185
-        cmd[sizeof(cmd)-1]= 0;
1186
-        // Look for the end of line, or the end of sequence
1187
-	size_t i= 0;
1188
-        char c;
1189
-        while( (c= cmd[i]) && c!='\n' )
1190
-          ++i; // look for the end of this gcode command
1191
- 	cmd[i]= 0;
1192
-        if(!enquecommand(cmd)) // buffer was full, will retry later
1193
-          return;
1194
-        if(c)
1195
-          pgcode_seq+= i+1; // move to next command
1196
-        else
1197
-          pgcode_seq= NULL; // mark the end of the sequence of gcodes
1177
+    enquecommands_P(pgcode);
1198
 }
1178
 }
1199
 
1179
 
1200
 
1180
 
1207
     for(c = &cmd[4]; *c; c++)
1187
     for(c = &cmd[4]; *c; c++)
1208
         *c = tolower(*c);
1188
         *c = tolower(*c);
1209
     enquecommand(cmd);
1189
     enquecommand(cmd);
1210
-    enquecommand_P(PSTR("M24"));
1190
+    enquecommands_P(PSTR("M24"));
1211
     lcd_return_to_status();
1191
     lcd_return_to_status();
1212
 }
1192
 }
1213
 static void menu_action_sddirectory(const char* filename, char* longFilename)
1193
 static void menu_action_sddirectory(const char* filename, char* longFilename)
1290
 
1270
 
1291
     lcd_buttons_update();
1271
     lcd_buttons_update();
1292
 
1272
 
1293
-    menu_action_gcode_next(); // inject the next pending command in the pending sequence (if any)
1294
-
1295
     #if (SDCARDDETECT > 0)
1273
     #if (SDCARDDETECT > 0)
1296
     if((IS_SD_INSERTED != lcd_oldcardstatus && lcd_detected()))
1274
     if((IS_SD_INSERTED != lcd_oldcardstatus && lcd_detected()))
1297
     {
1275
     {

正在加载...
取消
保存