Bladeren bron

Generalized enqueue_commands_P, and moved them to Marlin_main as they should

Jérémie FRANCOIS 9 jaren geleden
bovenliggende
commit
85e5aa4011

+ 145
- 169
Marlin/Configuration.h Bestand weergeven

@@ -14,12 +14,6 @@
14 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 18
 // User-specified version info of this build to display in [Pronterface, etc] terminal window during
25 19
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
@@ -27,7 +21,7 @@
27 21
 #define STRING_VERSION "v1.0.2"
28 22
 #define STRING_URL "reprap.org"
29 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 25
 #define STRING_SPLASH STRING_VERSION " - " STRING_URL // will be shown during bootup
32 26
 
33 27
 // SERIAL_PORT selects which serial port should be used for communication with the host.
@@ -36,7 +30,8 @@
36 30
 #define SERIAL_PORT 0
37 31
 
38 32
 // This determines the communication speed of the printer
39
-#define BAUDRATE 250000
33
+//#define BAUDRATE 250000
34
+#define BAUDRATE 115200
40 35
 
41 36
 // This enables the serial port associated to the Bluetooth interface
42 37
 //#define BTENABLED              // Enable BT interface on AT90USB devices
@@ -44,11 +39,11 @@
44 39
 // The following define selects which electronics board you have.
45 40
 // Please choose the name from boards.h that matches your setup
46 41
 #ifndef MOTHERBOARD
47
-  #define MOTHERBOARD BOARD_ULTIMAKER
42
+  #define MOTHERBOARD 33 // JFR - was BOARD_ULTIMAKER
48 43
 #endif
49 44
 
50 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 48
 // Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines)
54 49
 // You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4)
@@ -67,6 +62,50 @@
67 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 109
 //=============================Thermal Settings  ============================
71 110
 //===========================================================================
72 111
 //
@@ -104,8 +143,8 @@
104 143
 // 147 is Pt100 with 4k7 pullup
105 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 148
 #define TEMP_SENSOR_2 0
110 149
 #define TEMP_SENSOR_BED 0
111 150
 
@@ -114,7 +153,7 @@
114 153
 #define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10
115 154
 
116 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 157
 #define TEMP_HYSTERESIS 3       // (degC) range of +/- temperatures considered "close" to the target one
119 158
 #define TEMP_WINDOW     1       // (degC) Window around target to start the residency timer x degC early.
120 159
 
@@ -146,25 +185,23 @@
146 185
 // PID settings:
147 186
 // Comment the following line to disable PID and enable bang-bang.
148 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 190
 #ifdef PIDTEMP
152 191
   //#define PID_DEBUG // Sends debug data to the serial port.
153 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 193
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
158 194
                                   // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
159 195
   #define PID_INTEGRAL_DRIVE_MAX PID_MAX  //limit for the integral term
160 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 200
 // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
164 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 206
 // MakerGear
170 207
 //    #define  DEFAULT_Kp 7.0
@@ -175,6 +212,12 @@
175 212
 //    #define  DEFAULT_Kp 63.0
176 213
 //    #define  DEFAULT_Ki 2.25
177 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 221
 #endif // PIDTEMP
179 222
 
180 223
 // Bed Temperature Control
@@ -217,7 +260,7 @@
217 260
 
218 261
 //this prevents dangerous Extruder moves, i.e. if the temperature is under the limit
219 262
 //can be software-disabled for whatever purposes by
220
-#define PREVENT_DANGEROUS_EXTRUDE
263
+//#define PREVENT_DANGEROUS_EXTRUDE // JFR - was enabled
221 264
 //if PREVENT_DANGEROUS_EXTRUDE is on, you can still disable (uncomment) very long bits of extrusion separately.
222 265
 #define PREVENT_LENGTHY_EXTRUDE
223 266
 
@@ -266,9 +309,6 @@ your extruder heater takes 2 minutes to hit the target on heating.
266 309
 //=============================Mechanical Settings===========================
267 310
 //===========================================================================
268 311
 
269
-// Uncomment the following line to enable CoreXY kinematics
270
-// #define COREXY
271
-
272 312
 // coarse Endstop Settings
273 313
 #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
274 314
 
@@ -295,12 +335,12 @@ your extruder heater takes 2 minutes to hit the target on heating.
295 335
 const bool X_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
296 336
 const bool Y_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
297 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 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 344
 // Disable max endstops for compatibility with endstop checking routine
305 345
 #if defined(COREXY) && !defined(DISABLE_MAX_ENDSTOPS)
306 346
   #define DISABLE_MAX_ENDSTOPS
@@ -319,149 +359,39 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
319 359
 #define DISABLE_E false // For all extruders
320 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 367
 #define INVERT_E1_DIR false    // for direct drive extruder v9 set to true, for geared extruder set to false
327 368
 #define INVERT_E2_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
328 369
 
329 370
 // ENDSTOP SETTINGS:
330 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 377
 #define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
336 378
 #define max_software_endstops true  // If true, axis won't move to coordinates greater than the defined lengths below.
337 379
 
338 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 386
 #define Z_MIN_POS 0
345 387
 
346 388
 #define X_MAX_LENGTH (X_MAX_POS - X_MIN_POS)
347 389
 #define Y_MAX_LENGTH (Y_MAX_POS - Y_MIN_POS)
348 390
 #define Z_MAX_LENGTH (Z_MAX_POS - Z_MIN_POS)
349 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 397
 // The position of the homing switches
@@ -469,24 +399,62 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
469 399
 //#define BED_CENTER_AT_0_0  // If defined, the center of the bed is at (X=0, Y=0)
470 400
 
471 401
 //Manual homing switch locations:
402
+
403
+#define MANUAL_HOME_POSITIONS  // MANUAL_*_HOME_POS below will be used // JFR- was disabled
472 404
 // For deltabots this means top and center of the Cartesian print volume.
473 405
 #define MANUAL_X_HOME_POS 0
474 406
 #define MANUAL_Y_HOME_POS 0
475
-#define MANUAL_Z_HOME_POS 0
407
+#define MANUAL_Z_HOME_POS (142.7-1)
476 408
 //#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing.
477 409
 
478 410
 //// MOVEMENT SETTINGS
479 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 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 459
 // Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
492 460
 // The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).
@@ -496,7 +464,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
496 464
 
497 465
 // The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously)
498 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 468
 #define DEFAULT_EJERK                 5.0    // (mm/sec)
501 469
 
502 470
 //===========================================================================
@@ -521,7 +489,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
521 489
 //#define EEPROM_SETTINGS
522 490
 //to disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
523 491
 // please keep turned on if you can.
524
-//#define EEPROM_CHITCHAT
492
+#define EEPROM_CHITCHAT
525 493
 
526 494
 // Preheat Constants
527 495
 #define PLA_PREHEAT_HOTEND_TEMP 180
@@ -551,7 +519,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
551 519
 
552 520
 // The RepRapDiscount Smart Controller (white PCB)
553 521
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
554
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
522
+#define REPRAP_DISCOUNT_SMART_CONTROLLER
555 523
 
556 524
 // The GADGETS3D G3D LCD/SD Controller (blue PCB)
557 525
 // http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -573,6 +541,13 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
573 541
 // REMEMBER TO INSTALL LiquidCrystal_I2C.h in your ARDUINO library folder: https://github.com/kiyoshigawa/LiquidCrystal_I2C
574 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 551
 //automatic expansion
577 552
 #if defined (MAKRPANEL)
578 553
  #define DOGLCD
@@ -771,13 +746,13 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
771 746
 // Uncomment below to enable
772 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 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 753
 #define MEASURED_UPPER_LIMIT          3.30  //upper limit factor used for sensor reading validation in mm
779 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 757
 //defines used in the code
783 758
 #define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially 
@@ -790,6 +765,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
790 765
 
791 766
 
792 767
 
768
+
793 769
 #include "Configuration_adv.h"
794 770
 #include "thermistortables.h"
795 771
 

+ 2
- 2
Marlin/Configuration_adv.h Bestand weergeven

@@ -213,7 +213,7 @@
213 213
 //homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
214 214
 #define X_HOME_RETRACT_MM 5
215 215
 #define Y_HOME_RETRACT_MM 5
216
-#define Z_HOME_RETRACT_MM 2
216
+#define Z_HOME_RETRACT_MM 5
217 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 219
 #define AXIS_RELATIVE_MODES {false, false, false, false}
@@ -248,7 +248,7 @@
248 248
 #define DEFAULT_MINSEGMENTTIME        20000
249 249
 
250 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 253
 // Frequency limit
254 254
 // See nophead's blog for more info

+ 3
- 2
Marlin/Marlin.h Bestand weergeven

@@ -199,8 +199,9 @@ void Stop();
199 199
 
200 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 205
 void prepare_arc_move(char isclockwise);
205 206
 void clamp_to_software_endstops(float target[3]);
206 207
 

+ 0
- 56
Marlin/Marlin.pde Bestand weergeven

@@ -1,56 +0,0 @@
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 Bestand weergeven

@@ -384,6 +384,8 @@ static int serial_count = 0;
384 384
 static boolean comment_mode = false;
385 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 389
 const int sensitive_pins[] = SENSITIVE_PINS; // Sensitive pin list for M42
388 390
 
389 391
 //static float tt = 0;
@@ -451,43 +453,64 @@ void serial_echopair_P(const char *s_P, unsigned long v)
451 453
   }
452 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 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 514
 void setup_killpin()
492 515
 {
493 516
   #if defined(KILL_PIN) && KILL_PIN > -1
@@ -691,6 +714,9 @@ void loop()
691 714
 
692 715
 void get_command()
693 716
 {
717
+  if(drain_queued_commands_P()) // priority is given to non-serial commands
718
+    return;
719
+  
694 720
   while( MYSERIAL.available() > 0  && buflen < BUFSIZE) {
695 721
     serial_char = MYSERIAL.read();
696 722
     if(serial_char == '\n' ||
@@ -4489,7 +4515,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) //default argument s
4489 4515
     {
4490 4516
        if (homeDebounceCount == 0)
4491 4517
        {
4492
-          enquecommand_P((PSTR("G28")));
4518
+          enquecommands_P((PSTR("G28")));
4493 4519
           homeDebounceCount++;
4494 4520
           LCD_ALERTMESSAGEPGM(MSG_AUTO_HOME);
4495 4521
        }

+ 2
- 2
Marlin/cardreader.cpp Bestand weergeven

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

+ 0
- 2
Marlin/example_configurations/delta/Configuration.h Bestand weergeven

@@ -67,8 +67,6 @@
67 67
 // and processor overload (too many expensive sqrt calls).
68 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 70
 // Center-to-center distance of the holes in the diagonal push rods.
73 71
 #define DELTA_DIAGONAL_ROD 250.0 // mm
74 72
 

+ 13
- 35
Marlin/ultralcd.cpp Bestand weergeven

@@ -10,8 +10,6 @@
10 10
 
11 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 13
 /* Configuration settings */
16 14
 int plaPreheatHotendTemp;
17 15
 int plaPreheatHPBTemp;
@@ -78,7 +76,6 @@ static void lcd_quick_feedback();//Cause an LCD refresh, and give the user visua
78 76
 static void menu_action_back(menuFunc_t data);
79 77
 static void menu_action_submenu(menuFunc_t data);
80 78
 static void menu_action_gcode(const char* pgcode);
81
-static void menu_action_gcode_next();
82 79
 static void menu_action_function(menuFunc_t data);
83 80
 static void menu_action_sdfile(const char* filename, char* longFilename);
84 81
 static void menu_action_sddirectory(const char* filename, char* longFilename);
@@ -327,7 +324,7 @@ static void lcd_sdcard_stop()
327 324
     quickStop();
328 325
     if(SD_FINISHED_STEPPERRELEASE)
329 326
     {
330
-        enquecommand_P(PSTR(SD_FINISHED_RELEASECOMMAND));
327
+        enquecommands_P(PSTR(SD_FINISHED_RELEASECOMMAND));
331 328
     }
332 329
     autotempShutdown();
333 330
 
@@ -350,6 +347,7 @@ static void lcd_main_menu()
350 347
         MENU_ITEM(submenu, MSG_DELTA_CALIBRATE, lcd_delta_calibrate_menu);
351 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 351
     MENU_ITEM(submenu, MSG_CONTROL, lcd_control_menu);
354 352
 #ifdef SDSUPPORT
355 353
     if (card.cardOK)
@@ -397,8 +395,7 @@ void lcd_set_home_offsets()
397 395
     plan_set_position(0.0, 0.0, 0.0, current_position[E_AXIS]);
398 396
 
399 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 399
     lcd_return_to_status();
403 400
 }
404 401
 
@@ -680,6 +677,13 @@ static void lcd_prepare_menu()
680 677
     }
681 678
 #endif
682 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 687
     END_MENU();
684 688
 }
685 689
 
@@ -1151,7 +1155,7 @@ menu_edit_type(unsigned long, long5, ftostr5, 0.01)
1151 1155
     lcd_move_y();
1152 1156
 	}
1153 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 1160
 #endif
1157 1161
 
@@ -1170,31 +1174,7 @@ static void menu_action_submenu(menuFunc_t data) { lcd_goto_menu(data); }
1170 1174
 
1171 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,7 +1187,7 @@ static void menu_action_sdfile(const char* filename, char* longFilename)
1207 1187
     for(c = &cmd[4]; *c; c++)
1208 1188
         *c = tolower(*c);
1209 1189
     enquecommand(cmd);
1210
-    enquecommand_P(PSTR("M24"));
1190
+    enquecommands_P(PSTR("M24"));
1211 1191
     lcd_return_to_status();
1212 1192
 }
1213 1193
 static void menu_action_sddirectory(const char* filename, char* longFilename)
@@ -1290,8 +1270,6 @@ void lcd_update()
1290 1270
 
1291 1271
     lcd_buttons_update();
1292 1272
 
1293
-    menu_action_gcode_next(); // inject the next pending command in the pending sequence (if any)
1294
-
1295 1273
     #if (SDCARDDETECT > 0)
1296 1274
     if((IS_SD_INSERTED != lcd_oldcardstatus && lcd_detected()))
1297 1275
     {

Laden…
Annuleren
Opslaan