Sfoglia il codice sorgente

Merge pull request #1 from ErikZalm/Marlin_v1

Update on 140315
Dim3nsioneer 11 anni fa
parent
commit
8613a74443

+ 73
- 37
Marlin/Configuration.h Vedi File

@@ -8,7 +8,7 @@
8 8
 //===========================================================================
9 9
 //============================= DELTA Printer ===============================
10 10
 //===========================================================================
11
-// For a Delta printer rplace the configuration files wilth the files in the
11
+// For a Delta printer replace the configuration files with the files in the
12 12
 // example_configurations/delta directory.
13 13
 //
14 14
 
@@ -55,6 +55,7 @@
55 55
 // 68 = Azteeg X3 Pro
56 56
 // 7  = Ultimaker
57 57
 // 71 = Ultimaker (Older electronics. Pre 1.5.4. This is rare)
58
+// 72 = Ultimainboard 2.x (Uses TEMP_SENSOR 20)
58 59
 // 77 = 3Drag Controller
59 60
 // 8  = Teensylu
60 61
 // 80 = Rumba
@@ -67,7 +68,7 @@
67 68
 // 702= Minitronics v1.0
68 69
 // 90 = Alpha OMCA board
69 70
 // 91 = Final OMCA board
70
-// 301 = Rambo
71
+// 301= Rambo
71 72
 // 21 = Elefu Ra Board (v3)
72 73
 
73 74
 #ifndef MOTHERBOARD
@@ -90,7 +91,7 @@
90 91
 
91 92
 #define POWER_SUPPLY 1
92 93
 
93
-// Define this to have the electronics keep the powersupply off on startup. If you don't know what this is leave it.
94
+// Define this to have the electronics keep the power supply off on startup. If you don't know what this is leave it.
94 95
 // #define PS_DEFAULT_OFF
95 96
 
96 97
 //===========================================================================
@@ -105,7 +106,7 @@
105 106
 // 0 is not used
106 107
 // 1 is 100k thermistor - best choice for EPCOS 100k (4.7k pullup)
107 108
 // 2 is 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup)
108
-// 3 is mendel-parts thermistor (4.7k pullup)
109
+// 3 is Mendel-parts thermistor (4.7k pullup)
109 110
 // 4 is 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
110 111
 // 5 is 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (4.7k pullup)
111 112
 // 6 is 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup)
@@ -114,13 +115,19 @@
114 115
 // 8 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup)
115 116
 // 9 is 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup)
116 117
 // 10 is 100k RS thermistor 198-961 (4.7k pullup)
117
-// 60 is 100k Maker's Tool Works Kapton Bed Thermister
118
+// 20 is the PT100 circuit found in the Ultimainboard V2.x
119
+// 60 is 100k Maker's Tool Works Kapton Bed Thermistor
118 120
 //
119 121
 //    1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k
120 122
 //                          (but gives greater accuracy and more stable PID)
121 123
 // 51 is 100k thermistor - EPCOS (1k pullup)
122 124
 // 52 is 200k thermistor - ATC Semitec 204GT-2 (1k pullup)
123 125
 // 55 is 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup)
126
+//
127
+// 1047 is Pt1000 with 4k7 pullup
128
+// 1010 is Pt1000 with 1k pullup (non standard)
129
+// 147 is Pt100 with 4k7 pullup
130
+// 110 is Pt100 with 1k pullup (non standard)
124 131
 
125 132
 #define TEMP_SENSOR_0 -1
126 133
 #define TEMP_SENSOR_1 -1
@@ -175,13 +182,13 @@
175 182
   #define K1 0.95 //smoothing factor within the PID
176 183
   #define PID_dT ((OVERSAMPLENR * 8.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine
177 184
 
178
-// If you are using a preconfigured hotend then you can use one of the value sets by uncommenting it
185
+// If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
179 186
 // Ultimaker
180 187
     #define  DEFAULT_Kp 22.2
181 188
     #define  DEFAULT_Ki 1.08
182 189
     #define  DEFAULT_Kd 114
183 190
 
184
-// Makergear
191
+// MakerGear
185 192
 //    #define  DEFAULT_Kp 7.0
186 193
 //    #define  DEFAULT_Ki 0.1
187 194
 //    #define  DEFAULT_Kd 12
@@ -250,7 +257,7 @@
250 257
 #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
251 258
 
252 259
 #ifndef ENDSTOPPULLUPS
253
-  // fine Enstop settings: Individual Pullups. will be ignored if ENDSTOPPULLUPS is defined
260
+  // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
254 261
   // #define ENDSTOPPULLUP_XMAX
255 262
   // #define ENDSTOPPULLUP_YMAX
256 263
   // #define ENDSTOPPULLUP_ZMAX
@@ -328,13 +335,51 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
328 335
 
329 336
 #ifdef ENABLE_AUTO_BED_LEVELING
330 337
 
331
-  // these are the positions on the bed to do the probing
332
-  #define LEFT_PROBE_BED_POSITION 15
333
-  #define RIGHT_PROBE_BED_POSITION 170
334
-  #define BACK_PROBE_BED_POSITION 180
335
-  #define FRONT_PROBE_BED_POSITION 20
338
+// There are 2 different ways to pick the X and Y locations to probe:
339
+
340
+//  - "grid" mode
341
+//    Probe every point in a rectangular grid
342
+//    You must specify the rectangle, and the density of sample points
343
+//    This mode is preferred because there are more measurements.
344
+//    It used to be called ACCURATE_BED_LEVELING but "grid" is more descriptive
345
+
346
+//  - "3-point" mode
347
+//    Probe 3 arbitrary points on the bed (that aren't colinear)
348
+//    You must specify the X & Y coordinates of all 3 points
349
+
350
+  #define AUTO_BED_LEVELING_GRID
351
+  // with AUTO_BED_LEVELING_GRID, the bed is sampled in a
352
+  // AUTO_BED_LEVELING_GRID_POINTSxAUTO_BED_LEVELING_GRID_POINTS grid
353
+  // and least squares solution is calculated
354
+  // Note: this feature occupies 10'206 byte
355
+  #ifdef AUTO_BED_LEVELING_GRID
356
+
357
+    // set the rectangle in which to probe
358
+    #define LEFT_PROBE_BED_POSITION 15
359
+    #define RIGHT_PROBE_BED_POSITION 170
360
+    #define BACK_PROBE_BED_POSITION 180
361
+    #define FRONT_PROBE_BED_POSITION 20
362
+
363
+     // set the number of grid points per dimension
364
+     // I wouldn't see a reason to go above 3 (=9 probing points on the bed)
365
+    #define AUTO_BED_LEVELING_GRID_POINTS 2
366
+
367
+
368
+  #else  // not AUTO_BED_LEVELING_GRID
369
+    // with no grid, just probe 3 arbitrary points.  A simple cross-product
370
+    // is used to esimate the plane of the print bed
336 371
 
337
-  // these are the offsets to the prob relative to the extruder tip (Hotend - Probe)
372
+      #define ABL_PROBE_PT_1_X 15
373
+      #define ABL_PROBE_PT_1_Y 180
374
+      #define ABL_PROBE_PT_2_X 15
375
+      #define ABL_PROBE_PT_2_Y 20
376
+      #define ABL_PROBE_PT_3_X 170
377
+      #define ABL_PROBE_PT_3_Y 20
378
+
379
+  #endif // AUTO_BED_LEVELING_GRID
380
+
381
+
382
+  // these are the offsets to the probe relative to the extruder tip (Hotend - Probe)
338 383
   #define X_PROBE_OFFSET_FROM_EXTRUDER -25
339 384
   #define Y_PROBE_OFFSET_FROM_EXTRUDER -29
340 385
   #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35
@@ -355,7 +400,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
355 400
 //  #define PROBE_SERVO_DEACTIVATION_DELAY 300
356 401
 
357 402
 
358
-//If you have enabled the Bed Auto Levelling and are using the same Z Probe for Z Homing,
403
+//If you have enabled the Bed Auto Leveling and are using the same Z Probe for Z Homing,
359 404
 //it is highly recommended you let this Z_SAFE_HOMING enabled!!!
360 405
 
361 406
   #define Z_SAFE_HOMING   // This feature is meant to avoid Z homing with probe outside the bed area.
@@ -372,16 +417,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
372 417
 
373 418
   #endif
374 419
 
375
-  // with accurate bed leveling, the bed is sampled in a ACCURATE_BED_LEVELING_POINTSxACCURATE_BED_LEVELING_POINTS grid and least squares solution is calculated
376
-  // Note: this feature occupies 10'206 byte
377
-  #define ACCURATE_BED_LEVELING
378
-
379
-  #ifdef ACCURATE_BED_LEVELING
380
-     // I wouldn't see a reason to go above 3 (=9 probing points on the bed)
381
-    #define ACCURATE_BED_LEVELING_POINTS 2
382
-  #endif
383
-
384
-#endif
420
+#endif // ENABLE_AUTO_BED_LEVELING
385 421
 
386 422
 
387 423
 // The position of the homing switches
@@ -389,7 +425,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
389 425
 //#define BED_CENTER_AT_0_0  // If defined, the center of the bed is at (X=0, Y=0)
390 426
 
391 427
 //Manual homing switch locations:
392
-// For deltabots this means top and center of the cartesian print volume.
428
+// For deltabots this means top and center of the Cartesian print volume.
393 429
 #define MANUAL_X_HOME_POS 0
394 430
 #define MANUAL_Y_HOME_POS 0
395 431
 #define MANUAL_Z_HOME_POS 0
@@ -403,7 +439,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
403 439
 
404 440
 #define DEFAULT_AXIS_STEPS_PER_UNIT   {78.7402,78.7402,200.0*8/3,760*1.1}  // default steps per unit for Ultimaker
405 441
 #define DEFAULT_MAX_FEEDRATE          {500, 500, 5, 25}    // (mm/sec)
406
-#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.
442
+#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.
407 443
 
408 444
 #define DEFAULT_ACCELERATION          3000    // X, Y, Z and E max acceleration in mm/s^2 for printing moves
409 445
 #define DEFAULT_RETRACT_ACCELERATION  3000   // X, Y, Z and E max acceleration in mm/s^2 for retracts
@@ -424,11 +460,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
424 460
 //===========================================================================
425 461
 
426 462
 // EEPROM
427
-// the microcontroller can store settings in the EEPROM, e.g. max velocity...
428
-// M500 - stores paramters in EEPROM
463
+// The microcontroller can store settings in the EEPROM, e.g. max velocity...
464
+// M500 - stores parameters in EEPROM
429 465
 // M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
430 466
 // M502 - reverts to the default "factory settings".  You still need to store them in EEPROM afterwards if you want to.
431
-//define this to enable eeprom support
467
+//define this to enable EEPROM support
432 468
 //#define EEPROM_SETTINGS
433 469
 //to disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
434 470
 // please keep turned on if you can.
@@ -444,14 +480,14 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
444 480
 #define ABS_PREHEAT_FAN_SPEED 255   // Insert Value between 0 and 255
445 481
 
446 482
 //LCD and SD support
447
-//#define ULTRA_LCD  //general lcd support, also 16x2
483
+//#define ULTRA_LCD  //general LCD support, also 16x2
448 484
 //#define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
449 485
 //#define SDSUPPORT // Enable SD Card Support in Hardware Console
450 486
 //#define SDSLOW // Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
451 487
 //#define ENCODER_PULSES_PER_STEP 1 // Increase if you have a high resolution encoder
452 488
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
453
-//#define ULTIMAKERCONTROLLER //as available from the ultimaker online store.
454
-//#define ULTIPANEL  //the ultipanel as on thingiverse
489
+//#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
490
+//#define ULTIPANEL  //the UltiPanel as on Thingiverse
455 491
 //#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
456 492
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
457 493
 
@@ -576,7 +612,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
576 612
 // https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
577 613
 //#define SR_LCD
578 614
 #ifdef SR_LCD
579
-   #define SR_LCD_2W_NL    // Non latching 2 wire shiftregister
615
+   #define SR_LCD_2W_NL    // Non latching 2 wire shift register
580 616
    //#define NEWPANEL
581 617
 #endif
582 618
 
@@ -592,7 +628,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
592 628
     #define LCD_WIDTH 20
593 629
     #define LCD_HEIGHT 4
594 630
   #endif
595
-#else //no panel but just lcd
631
+#else //no panel but just LCD
596 632
   #ifdef ULTRA_LCD
597 633
   #ifdef DOGLCD // Change number of lines to match the 128x64 graphics display
598 634
     #define LCD_WIDTH 20
@@ -614,8 +650,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
614 650
 // Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
615 651
 //#define FAST_PWM_FAN
616 652
 
617
-// Temperature status leds that display the hotend and bet temperature.
618
-// If alle hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
653
+// Temperature status LEDs that display the hotend and bet temperature.
654
+// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
619 655
 // Otherwise the RED led is on. There is 1C hysteresis.
620 656
 //#define TEMP_STAT_LEDS
621 657
 

+ 24
- 3
Marlin/ConfigurationStore.cpp Vedi File

@@ -37,7 +37,11 @@ void _EEPROM_readData(int &pos, uint8_t* value, uint8_t size)
37 37
 // the default values are used whenever there is a change to the data, to prevent
38 38
 // wrong data being written to the variables.
39 39
 // ALSO:  always make sure the variables in the Store and retrieve sections are in the same order.
40
+#ifdef DELTA
41
+#define EEPROM_VERSION "V11"
42
+#else
40 43
 #define EEPROM_VERSION "V10"
44
+#endif
41 45
 
42 46
 #ifdef EEPROM_SETTINGS
43 47
 void Config_StoreSettings() 
@@ -59,6 +63,9 @@ void Config_StoreSettings()
59 63
   EEPROM_WRITE_VAR(i,add_homeing);
60 64
   #ifdef DELTA
61 65
   EEPROM_WRITE_VAR(i,endstop_adj);
66
+  EEPROM_WRITE_VAR(i,delta_radius);
67
+  EEPROM_WRITE_VAR(i,delta_diagonal_rod);
68
+  EEPROM_WRITE_VAR(i,delta_segments_per_second);
62 69
   #endif
63 70
   #ifndef ULTIPANEL
64 71
   int plaPreheatHotendTemp = PLA_PREHEAT_HOTEND_TEMP, plaPreheatHPBTemp = PLA_PREHEAT_HPB_TEMP, plaPreheatFanSpeed = PLA_PREHEAT_FAN_SPEED;
@@ -156,7 +163,14 @@ void Config_PrintSettings()
156 163
     SERIAL_ECHOPAIR("  M666 X",endstop_adj[0] );
157 164
     SERIAL_ECHOPAIR(" Y" ,endstop_adj[1] );
158 165
     SERIAL_ECHOPAIR(" Z" ,endstop_adj[2] );
159
-    SERIAL_ECHOLN("");
166
+	SERIAL_ECHOLN("");
167
+	SERIAL_ECHO_START;
168
+	SERIAL_ECHOLNPGM("Delta settings: L=delta_diagonal_rod, R=delta_radius, S=delta_segments_per_second");
169
+	SERIAL_ECHO_START;
170
+	SERIAL_ECHOPAIR("  M665 L",delta_diagonal_rod );
171
+	SERIAL_ECHOPAIR(" R" ,delta_radius );
172
+	SERIAL_ECHOPAIR(" S" ,delta_segments_per_second );
173
+	SERIAL_ECHOLN("");
160 174
 #endif
161 175
 #ifdef PIDTEMP
162 176
     SERIAL_ECHO_START;
@@ -199,7 +213,10 @@ void Config_RetrieveSettings()
199 213
         EEPROM_READ_VAR(i,max_e_jerk);
200 214
         EEPROM_READ_VAR(i,add_homeing);
201 215
         #ifdef DELTA
202
-        EEPROM_READ_VAR(i,endstop_adj);
216
+		EEPROM_READ_VAR(i,endstop_adj);
217
+		EEPROM_READ_VAR(i,delta_radius);
218
+		EEPROM_READ_VAR(i,delta_diagonal_rod);
219
+		EEPROM_READ_VAR(i,delta_segments_per_second);
203 220
         #endif
204 221
         #ifndef ULTIPANEL
205 222
         int plaPreheatHotendTemp, plaPreheatHPBTemp, plaPreheatFanSpeed;
@@ -264,7 +281,11 @@ void Config_ResetDefault()
264 281
     max_e_jerk=DEFAULT_EJERK;
265 282
     add_homeing[0] = add_homeing[1] = add_homeing[2] = 0;
266 283
 #ifdef DELTA
267
-    endstop_adj[0] = endstop_adj[1] = endstop_adj[2] = 0;
284
+	endstop_adj[0] = endstop_adj[1] = endstop_adj[2] = 0;
285
+	delta_radius= DELTA_RADIUS;
286
+	delta_diagonal_rod= DELTA_DIAGONAL_ROD;
287
+	delta_segments_per_second= DELTA_SEGMENTS_PER_SECOND;
288
+	recalc_delta_settings(delta_radius, delta_diagonal_rod);
268 289
 #endif
269 290
 #ifdef ULTIPANEL
270 291
     plaPreheatHotendTemp = PLA_PREHEAT_HOTEND_TEMP;

+ 30
- 16
Marlin/Configuration_adv.h Vedi File

@@ -11,7 +11,7 @@
11 11
 #define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control
12 12
 
13 13
 //// Heating sanity check:
14
-// This waits for the watchperiod in milliseconds whenever an M104 or M109 increases the target temperature
14
+// This waits for the watch period in milliseconds whenever an M104 or M109 increases the target temperature
15 15
 // If the temperature has not increased at the end of that period, the target temperature is set to zero.
16 16
 // It can be reset with another M104/M109. This check is also only triggered if the target temperature and the current temperature
17 17
 //  differ by at least 2x WATCH_TEMP_INCREASE
@@ -19,11 +19,11 @@
19 19
 //#define WATCH_TEMP_INCREASE 10  //Heat up at least 10 degree in 20 seconds
20 20
 
21 21
 #ifdef PIDTEMP
22
-  // this adds an experimental additional term to the heatingpower, proportional to the extrusion speed.
23
-  // if Kc is choosen well, the additional required power due to increased melting should be compensated.
22
+  // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
23
+  // if Kc is chosen well, the additional required power due to increased melting should be compensated.
24 24
   #define PID_ADD_EXTRUSION_RATE
25 25
   #ifdef PID_ADD_EXTRUSION_RATE
26
-    #define  DEFAULT_Kc (1) //heatingpower=Kc*(e_speed)
26
+    #define  DEFAULT_Kc (1) //heating power=Kc*(e_speed)
27 27
   #endif
28 28
 #endif
29 29
 
@@ -34,7 +34,7 @@
34 34
 // the target temperature is set to mintemp+factor*se[steps/sec] and limited by mintemp and maxtemp
35 35
 // you exit the value by any M109 without F*
36 36
 // Also, if the temperature is set to a value <mintemp, it is not changed by autotemp.
37
-// on an ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
37
+// on an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
38 38
 #define AUTOTEMP
39 39
 #ifdef AUTOTEMP
40 40
   #define AUTOTEMP_OLDWEIGHT 0.98
@@ -239,6 +239,11 @@
239 239
 #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60}  // set the speeds for manual moves (mm/min)
240 240
 #endif
241 241
 
242
+//Comment to disable setting feedrate multiplier via encoder
243
+#ifdef ULTIPANEL
244
+    #define ULTIPANEL_FEEDMULTIPLY
245
+#endif
246
+
242 247
 // minimum time in microseconds that a movement needs to take if the buffer is emptied.
243 248
 #define DEFAULT_MINSEGMENTTIME        20000
244 249
 
@@ -279,15 +284,18 @@
279 284
 //=============================Additional Features===========================
280 285
 //===========================================================================
281 286
 
287
+//#define CHDK 4        //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
288
+#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
289
+
282 290
 #define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
283 291
 #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
284 292
 
285
-#define SDCARD_RATHERRECENTFIRST  //reverse file order of sd card menu display. Its sorted practically after the filesystem block order.
286
-// if a file is deleted, it frees a block. hence, the order is not purely cronological. To still have auto0.g accessible, there is again the option to do that.
293
+#define SDCARD_RATHERRECENTFIRST  //reverse file order of sd card menu display. Its sorted practically after the file system block order.
294
+// if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that.
287 295
 // using:
288 296
 //#define MENU_ADDAUTOSTART
289 297
 
290
-// The hardware watchdog should reset the Microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
298
+// The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
291 299
 //#define USE_WATCHDOG
292 300
 
293 301
 #ifdef USE_WATCHDOG
@@ -301,7 +309,7 @@
301 309
 //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
302 310
 
303 311
 // Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process
304
-// it can e.g. be used to change z-positions in the print startup phase in realtime
312
+// it can e.g. be used to change z-positions in the print startup phase in real-time
305 313
 // does not respect endstops!
306 314
 //#define BABYSTEPPING
307 315
 #ifdef BABYSTEPPING
@@ -324,8 +332,8 @@
324 332
 //
325 333
 // advance (steps) = STEPS_PER_CUBIC_MM_E * EXTUDER_ADVANCE_K * cubic mm per second ^ 2
326 334
 //
327
-// hooke's law says:		force = k * distance
328
-// bernoulli's priniciple says:	v ^ 2 / 2 + g . h + pressure / density = constant
335
+// Hooke's law says:		force = k * distance
336
+// Bernoulli's principle says:	v ^ 2 / 2 + g . h + pressure / density = constant
329 337
 // so: v ^ 2 is proportional to number of steps we advance the extruder
330 338
 //#define ADVANCE
331 339
 
@@ -379,7 +387,7 @@ const unsigned int dropsegments=5; //everything with less than this number of st
379 387
 //===========================================================================
380 388
 
381 389
 // The number of linear motions that can be in the plan at any give time.
382
-// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2, i.g. 8,16,32 because shifts and ors are used to do the ringbuffering.
390
+// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2, i.g. 8,16,32 because shifts and ors are used to do the ring-buffering.
383 391
 #if defined SDSUPPORT
384 392
   #define BLOCK_BUFFER_SIZE 16   // SD,LCD,Buttons take more memory, block buffer needs to be smaller
385 393
 #else
@@ -387,20 +395,26 @@ const unsigned int dropsegments=5; //everything with less than this number of st
387 395
 #endif
388 396
 
389 397
 
390
-//The ASCII buffer for recieving from the serial:
398
+//The ASCII buffer for receiving from the serial:
391 399
 #define MAX_CMD_SIZE 96
392 400
 #define BUFSIZE 4
393 401
 
394 402
 
395
-// Firmware based and LCD controled retract
403
+// Firmware based and LCD controlled retract
396 404
 // M207 and M208 can be used to define parameters for the retraction.
397 405
 // The retraction can be called by the slicer using G10 and G11
398 406
 // until then, intended retractions can be detected by moves that only extrude and the direction.
399 407
 // the moves are than replaced by the firmware controlled ones.
400 408
 
401 409
 // #define FWRETRACT  //ONLY PARTIALLY TESTED
402
-#define MIN_RETRACT 0.1 //minimum extruded mm to accept a automatic gcode retraction attempt
403
-
410
+#ifdef FWRETRACT
411
+  #define MIN_RETRACT 0.1                //minimum extruded mm to accept a automatic gcode retraction attempt
412
+  #define RETRACT_LENGTH 3               //default retract length (positive mm)
413
+  #define RETRACT_FEEDRATE 80*60         //default feedrate for retracting
414
+  #define RETRACT_ZLIFT 0                //default retract Z-lift
415
+  #define RETRACT_RECOVER_LENGTH 0       //default additional recover length (mm, added to retract length when recovering)
416
+  #define RETRACT_RECOVER_FEEDRATE 8*60  //default feedrate for recovering from retraction
417
+#endif
404 418
 
405 419
 //adds support for experimental filament exchange support M600; requires display
406 420
 #ifdef ULTIPANEL

BIN
Marlin/LCD Menu Tree.pdf Vedi File


+ 5
- 5
Marlin/LiquidCrystalRus.cpp Vedi File

@@ -11,7 +11,7 @@
11 11
   #include "WProgram.h"
12 12
 #endif
13 13
 
14
-// it is a russian alphabet translation
14
+// it is a Russian alphabet translation
15 15
 // except 0401 --> 0xa2 = ╗, 0451 --> 0xb5
16 16
 const PROGMEM uint8_t utf_recode[] = 
17 17
        { 0x41,0xa0,0x42,0xa1,0xe0,0x45,0xa3,0xa4,0xa5,0xa6,0x4b,0xa7,0x4d,0x48,0x4f,
@@ -115,7 +115,7 @@ void LiquidCrystalRus::begin(uint8_t cols, uint8_t lines, uint8_t dotsize) {
115 115
 
116 116
   // SEE PAGE 45/46 FOR INITIALIZATION SPECIFICATION!
117 117
   // according to datasheet, we need at least 40ms after power rises above 2.7V
118
-  // before sending commands. Arduino can turn on way befer 4.5V so we'll wait 50
118
+  // before sending commands. Arduino can turn on way before 4.5V so we'll wait 50
119 119
   delayMicroseconds(50000); 
120 120
   // Now we pull both RS and R/W low to begin commands
121 121
   digitalWrite(_rs_pin, LOW);
@@ -126,7 +126,7 @@ void LiquidCrystalRus::begin(uint8_t cols, uint8_t lines, uint8_t dotsize) {
126 126
   
127 127
   //put the LCD into 4 bit or 8 bit mode
128 128
   if (! (_displayfunction & LCD_8BITMODE)) {
129
-    // this is according to the hitachi HD44780 datasheet
129
+    // this is according to the Hitachi HD44780 datasheet
130 130
     // figure 24, pg 46
131 131
 
132 132
     // we start in 8bit mode, try to set 4 bit mode
@@ -144,7 +144,7 @@ void LiquidCrystalRus::begin(uint8_t cols, uint8_t lines, uint8_t dotsize) {
144 144
     // finally, set to 8-bit interface
145 145
     writeNbits(0x02,4); 
146 146
   } else {
147
-    // this is according to the hitachi HD44780 datasheet
147
+    // this is according to the Hitachi HD44780 datasheet
148 148
     // page 45 figure 23
149 149
 
150 150
     // Send function set command sequence
@@ -308,7 +308,7 @@ inline void LiquidCrystalRus::command(uint8_t value) {
308 308
     }    
309 309
   } else send(out_char, HIGH);
310 310
 #if defined(ARDUINO) && ARDUINO >= 100
311
-  return 1; // assume sucess 
311
+  return 1; // assume success 
312 312
 #endif
313 313
 }
314 314
 

+ 3
- 2
Marlin/Makefile Vedi File

@@ -236,7 +236,7 @@ VPATH += $(HARDWARE_DIR)/libraries/Wire
236 236
 VPATH += $(HARDWARE_DIR)/libraries/Wire/utility
237 237
 VPATH += $(HARDWARE_DIR)/libraries/LiquidTWI2
238 238
 endif
239
-ifeq ($(WIRE, 1)
239
+ifeq ($(WIRE), 1)
240 240
 VPATH += $(HARDWARE_DIR)/libraries/Wire
241 241
 VPATH += $(HARDWARE_DIR)/libraries/Wire/utility
242 242
 endif
@@ -260,7 +260,8 @@ CXXSRC = WMath.cpp WString.cpp Print.cpp Marlin_main.cpp	\
260 260
 	MarlinSerial.cpp Sd2Card.cpp SdBaseFile.cpp SdFatUtil.cpp	\
261 261
 	SdFile.cpp SdVolume.cpp motion_control.cpp planner.cpp		\
262 262
 	stepper.cpp temperature.cpp cardreader.cpp ConfigurationStore.cpp \
263
-	watchdog.cpp SPI.cpp Servo.cpp Tone.cpp ultralcd.cpp digipot_mcp4451.cpp
263
+	watchdog.cpp SPI.cpp Servo.cpp Tone.cpp ultralcd.cpp digipot_mcp4451.cpp \
264
+	vector_3.cpp qr_solve.cpp
264 265
 ifeq ($(LIQUID_TWI2), 0)
265 266
 CXXSRC += LiquidCrystal.cpp
266 267
 else

+ 11
- 5
Marlin/Marlin.h Vedi File

@@ -1,5 +1,5 @@
1 1
 // Tonokip RepRap firmware rewrite based off of Hydra-mmm firmware.
2
-// Licence: GPL
2
+// License: GPL
3 3
 
4 4
 #ifndef MARLIN_H
5 5
 #define MARLIN_H
@@ -30,7 +30,7 @@
30 30
 # include "Arduino.h"
31 31
 #else
32 32
 # include "WProgram.h"
33
-  //Arduino < 1.0.0 does not define this, so we need to do it ourselfs
33
+  //Arduino < 1.0.0 does not define this, so we need to do it ourselves
34 34
 # define analogInputToDigitalPin(p) ((p) + A0)
35 35
 #endif
36 36
 
@@ -87,7 +87,7 @@ void serial_echopair_P(const char *s_P, double v);
87 87
 void serial_echopair_P(const char *s_P, unsigned long v);
88 88
 
89 89
 
90
-//things to write to serial from Programmemory. saves 400 to 2k of RAM.
90
+//Things to write to serial from Program memory. Saves 400 to 2k of RAM.
91 91
 FORCE_INLINE void serialprintPGM(const char *str)
92 92
 {
93 93
   char ch=pgm_read_byte(str);
@@ -184,11 +184,13 @@ void Stop();
184 184
 
185 185
 bool IsStopped();
186 186
 
187
-void enquecommand(const char *cmd); //put an ascii command at the end of the current buffer.
188
-void enquecommand_P(const char *cmd); //put an ascii command at the end of the current buffer, read from flash
187
+void enquecommand(const char *cmd); //put an ASCII command at the end of the current buffer.
188
+void enquecommand_P(const char *cmd); //put an ASCII command at the end of the current buffer, read from flash
189 189
 void prepare_arc_move(char isclockwise);
190 190
 void clamp_to_software_endstops(float target[3]);
191 191
 
192
+void refresh_cmd_timeout(void);
193
+
192 194
 #ifdef FAST_PWM_FAN
193 195
 void setPwmFrequency(uint8_t pin, int val);
194 196
 #endif
@@ -207,6 +209,10 @@ extern float current_position[NUM_AXIS] ;
207 209
 extern float add_homeing[3];
208 210
 #ifdef DELTA
209 211
 extern float endstop_adj[3];
212
+extern float delta_radius;
213
+extern float delta_diagonal_rod;
214
+extern float delta_segments_per_second;
215
+void recalc_delta_settings(float radius, float diagonal_rod);
210 216
 #endif
211 217
 extern float min_pos[3];
212 218
 extern float max_pos[3];

+ 2
- 2
Marlin/MarlinSerial.cpp Vedi File

@@ -25,7 +25,7 @@
25 25
 
26 26
 #ifndef AT90USB
27 27
 // this next line disables the entire HardwareSerial.cpp, 
28
-// this is so I can support Attiny series and any other chip without a uart
28
+// this is so I can support Attiny series and any other chip without a UART
29 29
 #if defined(UBRRH) || defined(UBRR0H) || defined(UBRR1H) || defined(UBRR2H) || defined(UBRR3H)
30 30
 
31 31
 #if UART_PRESENT(SERIAL_PORT)
@@ -73,7 +73,7 @@ void MarlinSerial::begin(long baud)
73 73
   bool useU2X = true;
74 74
 
75 75
 #if F_CPU == 16000000UL && SERIAL_PORT == 0
76
-  // hardcoded exception for compatibility with the bootloader shipped
76
+  // hard coded exception for compatibility with the bootloader shipped
77 77
   // with the Duemilanove and previous boards and the firmware on the 8U2
78 78
   // on the Uno and Mega 2560.
79 79
   if (baud == 57600) {

+ 253
- 219
Marlin/Marlin_main.cpp Vedi File

@@ -31,7 +31,7 @@
31 31
 
32 32
 #ifdef ENABLE_AUTO_BED_LEVELING
33 33
 #include "vector_3.h"
34
-  #ifdef ACCURATE_BED_LEVELING
34
+  #ifdef AUTO_BED_LEVELING_GRID
35 35
     #include "qr_solve.h"
36 36
   #endif
37 37
 #endif // ENABLE_AUTO_BED_LEVELING
@@ -63,7 +63,7 @@
63 63
 
64 64
 #define VERSION_STRING  "1.0.0"
65 65
 
66
-// look here for descriptions of gcodes: http://linuxcnc.org/handbook/gcode/g-code.html
66
+// look here for descriptions of G-codes: http://linuxcnc.org/handbook/gcode/g-code.html
67 67
 // http://objects.reprap.org/wiki/Mendel_User_Manual:_RepRapGCodes
68 68
 
69 69
 //Implemented Codes
@@ -76,11 +76,11 @@
76 76
 // G10 - retract filament according to settings of M207
77 77
 // G11 - retract recover filament according to settings of M208
78 78
 // G28 - Home all Axis
79
-// G29 - Detailed Z-Probe, probes the bed at 3 points.  You must de at the home position for this to work correctly.
79
+// G29 - Detailed Z-Probe, probes the bed at 3 or more points.  Will fail if you haven't homed yet.
80 80
 // G30 - Single Z Probe, probes bed at current XY location.
81 81
 // G90 - Use Absolute Coordinates
82 82
 // G91 - Use Relative Coordinates
83
-// G92 - Set current position to cordinates given
83
+// G92 - Set current position to coordinates given
84 84
 
85 85
 // M Codes
86 86
 // M0   - Unconditional stop - Wait for user to press a button on the LCD (Only if ULTRA_LCD is enabled)
@@ -101,7 +101,7 @@
101 101
 // M31  - Output time since last M109 or SD card start to serial
102 102
 // M32  - Select file and start SD print (Can be used _while_ printing from SD card files):
103 103
 //        syntax "M32 /path/filename#", or "M32 S<startpos bytes> !filename#"
104
-//        Call gcode file : "M32 P !filename#" and return to caller file after finishing (simiarl to #include).
104
+//        Call gcode file : "M32 P !filename#" and return to caller file after finishing (similar to #include).
105 105
 //        The '#' is necessary when calling from within sd files, as it stops buffer prereading
106 106
 // M42  - Change pin status via gcode Use M42 Px Sy to set pin x to value y, when omitting Px the onboard led will be used.
107 107
 // M80  - Turn on Power Supply
@@ -127,17 +127,17 @@
127 127
 // M128 - EtoP Open (BariCUDA EtoP = electricity to air pressure transducer by jmil)
128 128
 // M129 - EtoP Closed (BariCUDA EtoP = electricity to air pressure transducer by jmil)
129 129
 // M140 - Set bed target temp
130
-// M150 - Set BlinkM Colour Output R: Red<0-255> U(!): Green<0-255> B: Blue<0-255> over i2c, G for green does not work.
130
+// M150 - Set BlinkM Color Output R: Red<0-255> U(!): Green<0-255> B: Blue<0-255> over i2c, G for green does not work.
131 131
 // M190 - Sxxx Wait for bed current temp to reach target temp. Waits only when heating
132 132
 //        Rxxx Wait for bed current temp to reach target temp. Waits when heating and cooling
133 133
 // M200 D<millimeters>- set filament diameter and set E axis units to cubic millimeters (use S0 to set back to millimeters).
134 134
 // M201 - Set max acceleration in units/s^2 for print moves (M201 X1000 Y1000)
135 135
 // M202 - Set max acceleration in units/s^2 for travel moves (M202 X1000 Y1000) Unused in Marlin!!
136 136
 // M203 - Set maximum feedrate that your machine can sustain (M203 X200 Y200 Z300 E10000) in mm/sec
137
-// M204 - Set default acceleration: S normal moves T filament only moves (M204 S3000 T7000) im mm/sec^2  also sets minimum segment time in ms (B20000) to prevent buffer underruns and M20 minimum feedrate
137
+// M204 - Set default acceleration: S normal moves T filament only moves (M204 S3000 T7000) in mm/sec^2  also sets minimum segment time in ms (B20000) to prevent buffer under-runs and M20 minimum feedrate
138 138
 // M205 -  advanced settings:  minimum travel speed S=while printing T=travel only,  B=minimum segment time X= maximum xy jerk, Z=maximum Z jerk, E=maximum E jerk
139
-// M206 - set additional homeing offset
140
-// M207 - set retract length S[positive mm] F[feedrate mm/sec] Z[additional zlift/hop]
139
+// M206 - set additional homing offset
140
+// M207 - set retract length S[positive mm] F[feedrate mm/min] Z[additional zlift/hop], stays in mm regardless of M200 setting
141 141
 // M208 - set recover=unretract length S[positive mm surplus to the M207 S*] F[feedrate mm/sec]
142 142
 // M209 - S<1=true/0=false> enable automatic retract detect if the slicer did not support G10/11: every normal extrude-only move will be classified as retract depending on the direction.
143 143
 // M218 - set hotend offset (in mm): T<extruder_number> X<offset_on_X> Y<offset_on_Y>
@@ -147,7 +147,7 @@
147 147
 // M240 - Trigger a camera to take a photograph
148 148
 // M250 - Set LCD contrast C<contrast value> (value 0..63)
149 149
 // M280 - set servo position absolute. P: servo index, S: angle or microseconds
150
-// M300 - Play beepsound S<frequency Hz> P<duration ms>
150
+// M300 - Play beep sound S<frequency Hz> P<duration ms>
151 151
 // M301 - Set PID parameters P I and D
152 152
 // M302 - Allow cold extrudes, or set the minimum extrude S<temperature>.
153 153
 // M303 - PID relay autotune S<temperature> sets the target temperature. (default target temperature = 150C)
@@ -155,13 +155,14 @@
155 155
 // M400 - Finish all moves
156 156
 // M401 - Lower z-probe if present
157 157
 // M402 - Raise z-probe if present
158
-// M500 - stores paramters in EEPROM
158
+// M500 - stores parameters in EEPROM
159 159
 // M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
160 160
 // M502 - reverts to the default "factory settings".  You still need to store them in EEPROM afterwards if you want to.
161
-// M503 - print the current settings (from memory not from eeprom)
161
+// M503 - print the current settings (from memory not from EEPROM)
162 162
 // M540 - Use S[0|1] to enable or disable the stop SD card print on endstop hit (requires ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED)
163 163
 // M600 - Pause for filament change X[pos] Y[pos] Z[relative lift] E[initial retract] L[later retract distance for removal]
164
-// M666 - set delta endstop adjustemnt
164
+// M665 - set delta configurations
165
+// M666 - set delta endstop adjustment
165 166
 // M605 - Set dual x-carriage movement mode: S<mode> [ X<duplication x-offset> R<duplication temp offset> ]
166 167
 // M907 - Set digital trimpot motor current using axis codes.
167 168
 // M908 - Control digital trimpot directly.
@@ -231,10 +232,13 @@ int EtoPPressure=0;
231 232
 #endif
232 233
 
233 234
 #ifdef FWRETRACT
234
-  bool autoretract_enabled=true;
235
+  bool autoretract_enabled=false;
235 236
   bool retracted=false;
236
-  float retract_length=3, retract_feedrate=17*60, retract_zlift=0.8;
237
-  float retract_recover_length=0, retract_recover_feedrate=8*60;
237
+  float retract_length = RETRACT_LENGTH;
238
+  float retract_feedrate = RETRACT_FEEDRATE;
239
+  float retract_zlift = RETRACT_ZLIFT;
240
+  float retract_recover_length = RETRACT_RECOVER_LENGTH;
241
+  float retract_recover_feedrate = RETRACT_RECOVER_FEEDRATE;
238 242
 #endif
239 243
 
240 244
 #ifdef ULTIPANEL
@@ -246,12 +250,24 @@ int EtoPPressure=0;
246 250
 #endif
247 251
 
248 252
 #ifdef DELTA
249
-float delta[3] = {0.0, 0.0, 0.0};
250
-#endif
251
-
253
+  float delta[3] = {0.0, 0.0, 0.0};
254
+  #define SIN_60 0.8660254037844386
255
+  #define COS_60 0.5
256
+  // these are the default values, can be overriden with M665
257
+  float delta_radius= DELTA_RADIUS;
258
+  float delta_tower1_x= -SIN_60*delta_radius; // front left tower
259
+  float delta_tower1_y= -COS_60*delta_radius;	   
260
+  float delta_tower2_x=  SIN_60*delta_radius; // front right tower
261
+  float delta_tower2_y= -COS_60*delta_radius;	   
262
+  float delta_tower3_x= 0.0;                  // back middle tower
263
+  float delta_tower3_y= delta_radius;
264
+  float delta_diagonal_rod= DELTA_DIAGONAL_ROD;
265
+  float delta_diagonal_rod_2= sq(delta_diagonal_rod);
266
+  float delta_segments_per_second= DELTA_SEGMENTS_PER_SECOND;
267
+#endif					
252 268
 
253 269
 //===========================================================================
254
-//=============================private variables=============================
270
+//=============================Private Variables=============================
255 271
 //===========================================================================
256 272
 const char axis_codes[NUM_AXIS] = {'X', 'Y', 'Z', 'E'};
257 273
 static float destination[NUM_AXIS] = {  0.0, 0.0, 0.0, 0.0};
@@ -271,7 +287,7 @@ static int buflen = 0;
271 287
 static char serial_char;
272 288
 static int serial_count = 0;
273 289
 static boolean comment_mode = false;
274
-static char *strchr_pointer; // just a pointer to find chars in the cmd string like X, Y, Z, E, etc
290
+static char *strchr_pointer; // just a pointer to find chars in the command string like X, Y, Z, E, etc
275 291
 
276 292
 const int sensitive_pins[] = SENSITIVE_PINS; // Sensitive pin list for M42
277 293
 
@@ -298,8 +314,14 @@ bool Stopped=false;
298 314
 bool CooldownNoWait = true;
299 315
 bool target_direction;
300 316
 
317
+//Insert variables if CHDK is defined
318
+#ifdef CHDK
319
+unsigned long chdkHigh = 0;
320
+boolean chdkActive = false;
321
+#endif
322
+
301 323
 //===========================================================================
302
-//=============================ROUTINES=============================
324
+//=============================Routines======================================
303 325
 //===========================================================================
304 326
 
305 327
 void get_arc_coordinates();
@@ -336,7 +358,7 @@ void enquecommand(const char *cmd)
336 358
 {
337 359
   if(buflen < BUFSIZE)
338 360
   {
339
-    //this is dangerous if a mixing of serial and this happsens
361
+    //this is dangerous if a mixing of serial and this happens
340 362
     strcpy(&(cmdbuffer[bufindw][0]),cmd);
341 363
     SERIAL_ECHO_START;
342 364
     SERIAL_ECHOPGM("enqueing \"");
@@ -351,7 +373,7 @@ void enquecommand_P(const char *cmd)
351 373
 {
352 374
   if(buflen < BUFSIZE)
353 375
   {
354
-    //this is dangerous if a mixing of serial and this happsens
376
+    //this is dangerous if a mixing of serial and this happens
355 377
     strcpy_P(&(cmdbuffer[bufindw][0]),cmd);
356 378
     SERIAL_ECHO_START;
357 379
     SERIAL_ECHOPGM("enqueing \"");
@@ -658,9 +680,9 @@ void get_command()
658 680
     return;
659 681
   }
660 682
 
661
-  //'#' stops reading from sd to the buffer prematurely, so procedural macro calls are possible
662
-  // if it occures, stop_buffering is triggered and the buffer is ran dry.
663
-  // this character _can_ occure in serial com, due to checksums. however, no checksums are used in sd printing
683
+  //'#' stops reading from SD to the buffer prematurely, so procedural macro calls are possible
684
+  // if it occurs, stop_buffering is triggered and the buffer is ran dry.
685
+  // this character _can_ occur in serial com, due to checksums. however, no checksums are used in SD printing
664 686
 
665 687
   static bool stop_buffering=false;
666 688
   if(buflen==0) stop_buffering=false;
@@ -819,7 +841,7 @@ static void axis_is_at_home(int axis) {
819 841
 }
820 842
 
821 843
 #ifdef ENABLE_AUTO_BED_LEVELING
822
-#ifdef ACCURATE_BED_LEVELING
844
+#ifdef AUTO_BED_LEVELING_GRID
823 845
 static void set_bed_level_equation_lsq(double *plane_equation_coefficients)
824 846
 {
825 847
     vector_3 planeNormal = vector_3(-plane_equation_coefficients[0], -plane_equation_coefficients[1], 1);
@@ -843,42 +865,36 @@ static void set_bed_level_equation_lsq(double *plane_equation_coefficients)
843 865
     plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
844 866
 }
845 867
 
846
-#else
847
-static void set_bed_level_equation(float z_at_xLeft_yFront, float z_at_xRight_yFront, float z_at_xLeft_yBack) {
848
-    plan_bed_level_matrix.set_to_identity();
868
+#else // not AUTO_BED_LEVELING_GRID
849 869
 
850
-    vector_3 xLeftyFront = vector_3(LEFT_PROBE_BED_POSITION, FRONT_PROBE_BED_POSITION, z_at_xLeft_yFront);
851
-    vector_3 xLeftyBack = vector_3(LEFT_PROBE_BED_POSITION, BACK_PROBE_BED_POSITION, z_at_xLeft_yBack);
852
-    vector_3 xRightyFront = vector_3(RIGHT_PROBE_BED_POSITION, FRONT_PROBE_BED_POSITION, z_at_xRight_yFront);
870
+static void set_bed_level_equation_3pts(float z_at_pt_1, float z_at_pt_2, float z_at_pt_3) {
853 871
 
854
-    vector_3 xPositive = (xRightyFront - xLeftyFront).get_normal();
855
-    vector_3 yPositive = (xLeftyBack - xLeftyFront).get_normal();
856
-    vector_3 planeNormal = vector_3::cross(xPositive, yPositive).get_normal();
872
+    plan_bed_level_matrix.set_to_identity();
857 873
 
858
-    //planeNormal.debug("planeNormal");
859
-    //yPositive.debug("yPositive");
860
-    plan_bed_level_matrix = matrix_3x3::create_look_at(planeNormal);
861
-    //bedLevel.debug("bedLevel");
874
+    vector_3 pt1 = vector_3(ABL_PROBE_PT_1_X, ABL_PROBE_PT_1_Y, z_at_pt_1);
875
+    vector_3 pt2 = vector_3(ABL_PROBE_PT_2_X, ABL_PROBE_PT_2_Y, z_at_pt_2);
876
+    vector_3 pt3 = vector_3(ABL_PROBE_PT_3_X, ABL_PROBE_PT_3_Y, z_at_pt_3);
862 877
 
863
-    //plan_bed_level_matrix.debug("bed level before");
864
-    //vector_3 uncorrected_position = plan_get_position_mm();
865
-    //uncorrected_position.debug("position before");
878
+    vector_3 from_2_to_1 = (pt1 - pt2).get_normal();
879
+    vector_3 from_2_to_3 = (pt3 - pt2).get_normal();
880
+    vector_3 planeNormal = vector_3::cross(from_2_to_1, from_2_to_3).get_normal();
881
+    planeNormal = vector_3(planeNormal.x, planeNormal.y, abs(planeNormal.z));
866 882
 
867
-    // and set our bed level equation to do the right thing
868
-    //plan_bed_level_matrix.debug("bed level after");
883
+    plan_bed_level_matrix = matrix_3x3::create_look_at(planeNormal);
869 884
 
870 885
     vector_3 corrected_position = plan_get_position();
871
-    //corrected_position.debug("position after");
872 886
     current_position[X_AXIS] = corrected_position.x;
873 887
     current_position[Y_AXIS] = corrected_position.y;
874 888
     current_position[Z_AXIS] = corrected_position.z;
875 889
 
876
-    // but the bed at 0 so we don't go below it.
890
+    // put the bed at 0 so we don't go below it.
877 891
     current_position[Z_AXIS] = zprobe_zoffset;
878 892
 
879 893
     plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
894
+
880 895
 }
881
-#endif // ACCURATE_BED_LEVELING
896
+
897
+#endif // AUTO_BED_LEVELING_GRID
882 898
 
883 899
 static void run_z_probe() {
884 900
     plan_bed_level_matrix.set_to_identity();
@@ -978,6 +994,28 @@ static void retract_z_probe() {
978 994
     #endif
979 995
 }
980 996
 
997
+/// Probe bed height at position (x,y), returns the measured z value
998
+static float probe_pt(float x, float y, float z_before) {
999
+  // move to right place
1000
+  do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], z_before);
1001
+  do_blocking_move_to(x - X_PROBE_OFFSET_FROM_EXTRUDER, y - Y_PROBE_OFFSET_FROM_EXTRUDER, current_position[Z_AXIS]);
1002
+
1003
+  engage_z_probe();   // Engage Z Servo endstop if available
1004
+  run_z_probe();
1005
+  float measured_z = current_position[Z_AXIS];
1006
+  retract_z_probe();
1007
+
1008
+  SERIAL_PROTOCOLPGM(MSG_BED);
1009
+  SERIAL_PROTOCOLPGM(" x: ");
1010
+  SERIAL_PROTOCOL(x);
1011
+  SERIAL_PROTOCOLPGM(" y: ");
1012
+  SERIAL_PROTOCOL(y);
1013
+  SERIAL_PROTOCOLPGM(" z: ");
1014
+  SERIAL_PROTOCOL(measured_z);
1015
+  SERIAL_PROTOCOLPGM("\n");
1016
+  return measured_z;
1017
+}
1018
+
981 1019
 #endif // #ifdef ENABLE_AUTO_BED_LEVELING
982 1020
 
983 1021
 static void homeaxis(int axis) {
@@ -1058,6 +1096,46 @@ static void homeaxis(int axis) {
1058 1096
   }
1059 1097
 }
1060 1098
 #define HOMEAXIS(LETTER) homeaxis(LETTER##_AXIS)
1099
+void refresh_cmd_timeout(void)
1100
+{
1101
+  previous_millis_cmd = millis();
1102
+}
1103
+
1104
+#ifdef FWRETRACT
1105
+  void retract(bool retracting) {
1106
+    if(retracting && !retracted) {
1107
+      destination[X_AXIS]=current_position[X_AXIS];
1108
+      destination[Y_AXIS]=current_position[Y_AXIS];
1109
+      destination[Z_AXIS]=current_position[Z_AXIS];
1110
+      destination[E_AXIS]=current_position[E_AXIS];
1111
+      current_position[E_AXIS]+=retract_length/volumetric_multiplier[active_extruder];
1112
+      plan_set_e_position(current_position[E_AXIS]);
1113
+      float oldFeedrate = feedrate;
1114
+      feedrate=retract_feedrate;
1115
+      retracted=true;
1116
+      prepare_move();
1117
+      current_position[Z_AXIS]-=retract_zlift;
1118
+      plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
1119
+      prepare_move();
1120
+      feedrate = oldFeedrate;
1121
+    } else if(!retracting && retracted) {
1122
+      destination[X_AXIS]=current_position[X_AXIS];
1123
+      destination[Y_AXIS]=current_position[Y_AXIS];
1124
+      destination[Z_AXIS]=current_position[Z_AXIS];
1125
+      destination[E_AXIS]=current_position[E_AXIS];
1126
+      current_position[Z_AXIS]+=retract_zlift;
1127
+      plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
1128
+      //prepare_move();
1129
+      current_position[E_AXIS]-=(retract_length+retract_recover_length)/volumetric_multiplier[active_extruder]; 
1130
+      plan_set_e_position(current_position[E_AXIS]);
1131
+      float oldFeedrate = feedrate;
1132
+      feedrate=retract_recover_feedrate;
1133
+      retracted=false;
1134
+      prepare_move();
1135
+      feedrate = oldFeedrate;
1136
+    }
1137
+  } //retract
1138
+#endif //FWRETRACT
1061 1139
 
1062 1140
 void process_commands()
1063 1141
 {
@@ -1074,6 +1152,18 @@ void process_commands()
1074 1152
     case 1: // G1
1075 1153
       if(Stopped == false) {
1076 1154
         get_coordinates(); // For X Y Z E F
1155
+          #ifdef FWRETRACT
1156
+            if(autoretract_enabled)
1157
+            if( !(code_seen('X') || code_seen('Y') || code_seen('Z')) && code_seen('E')) {
1158
+              float echange=destination[E_AXIS]-current_position[E_AXIS];
1159
+              if((echange<-MIN_RETRACT && !retracted) || (echange>MIN_RETRACT && retracted)) { //move appears to be an attempt to retract or recover
1160
+                  current_position[E_AXIS] = destination[E_AXIS]; //hide the slicer-generated retract/recover from calculations
1161
+                  plan_set_e_position(current_position[E_AXIS]); //AND from the planner
1162
+                  retract(!retracted);
1163
+                  return;
1164
+              }
1165
+            }
1166
+          #endif //FWRETRACT
1077 1167
         prepare_move();
1078 1168
         //ClearToSend();
1079 1169
         return;
@@ -1108,31 +1198,10 @@ void process_commands()
1108 1198
       break;
1109 1199
       #ifdef FWRETRACT
1110 1200
       case 10: // G10 retract
1111
-      if(!retracted)
1112
-      {
1113
-        destination[X_AXIS]=current_position[X_AXIS];
1114
-        destination[Y_AXIS]=current_position[Y_AXIS];
1115
-        destination[Z_AXIS]=current_position[Z_AXIS];
1116
-        current_position[Z_AXIS]+=-retract_zlift;
1117
-        destination[E_AXIS]=current_position[E_AXIS]-retract_length;
1118
-        feedrate=retract_feedrate;
1119
-        retracted=true;
1120
-        prepare_move();
1121
-      }
1122
-
1201
+        retract(true);
1123 1202
       break;
1124 1203
       case 11: // G11 retract_recover
1125
-      if(retracted)
1126
-      {
1127
-        destination[X_AXIS]=current_position[X_AXIS];
1128
-        destination[Y_AXIS]=current_position[Y_AXIS];
1129
-        destination[Z_AXIS]=current_position[Z_AXIS];
1130
-        current_position[Z_AXIS]+=retract_zlift;
1131
-        destination[E_AXIS]=current_position[E_AXIS]+retract_length+retract_recover_length;
1132
-        feedrate=retract_recover_feedrate;
1133
-        retracted=false;
1134
-        prepare_move();
1135
-      }
1204
+        retract(false);
1136 1205
       break;
1137 1206
       #endif //FWRETRACT
1138 1207
     case 28: //G28 Home all Axis one at a time
@@ -1185,7 +1254,7 @@ void process_commands()
1185 1254
 
1186 1255
 #else // NOT DELTA
1187 1256
 
1188
-      home_all_axis = !((code_seen(axis_codes[0])) || (code_seen(axis_codes[1])) || (code_seen(axis_codes[2])));
1257
+      home_all_axis = !((code_seen(axis_codes[X_AXIS])) || (code_seen(axis_codes[Y_AXIS])) || (code_seen(axis_codes[Z_AXIS])));
1189 1258
 
1190 1259
       #if Z_HOME_DIR > 0                      // If homing away from BED do Z first
1191 1260
       if((home_all_axis) || (code_seen(axis_codes[Z_AXIS]))) {
@@ -1347,12 +1416,21 @@ void process_commands()
1347 1416
       break;
1348 1417
 
1349 1418
 #ifdef ENABLE_AUTO_BED_LEVELING
1350
-    case 29: // G29 Detailed Z-Probe, probes the bed at 3 points.
1419
+    case 29: // G29 Detailed Z-Probe, probes the bed at 3 or more points.
1351 1420
         {
1352 1421
             #if Z_MIN_PIN == -1
1353 1422
             #error "You must have a Z_MIN endstop in order to enable Auto Bed Leveling feature!!! Z_MIN_PIN must point to a valid hardware pin."
1354 1423
             #endif
1355 1424
 
1425
+            // Prevent user from running a G29 without first homing in X and Y
1426
+            if (! (axis_known_position[X_AXIS] && axis_known_position[Y_AXIS]) )
1427
+            {
1428
+                LCD_MESSAGEPGM(MSG_POSITION_UNKNOWN);
1429
+                SERIAL_ECHO_START;
1430
+                SERIAL_ECHOLNPGM(MSG_POSITION_UNKNOWN);
1431
+                break; // abort G29, since we don't know where we are
1432
+            }
1433
+
1356 1434
             st_synchronize();
1357 1435
             // make sure the bed_level_rotation_matrix is identity or the planner will get it incorectly
1358 1436
             //vector_3 corrected_position = plan_get_position_mm();
@@ -1367,10 +1445,11 @@ void process_commands()
1367 1445
             setup_for_endstop_move();
1368 1446
 
1369 1447
             feedrate = homing_feedrate[Z_AXIS];
1370
-#ifdef ACCURATE_BED_LEVELING
1448
+#ifdef AUTO_BED_LEVELING_GRID
1449
+            // probe at the points of a lattice grid
1371 1450
 
1372
-            int xGridSpacing = (RIGHT_PROBE_BED_POSITION - LEFT_PROBE_BED_POSITION) / (ACCURATE_BED_LEVELING_POINTS-1);
1373
-            int yGridSpacing = (BACK_PROBE_BED_POSITION - FRONT_PROBE_BED_POSITION) / (ACCURATE_BED_LEVELING_POINTS-1);
1451
+            int xGridSpacing = (RIGHT_PROBE_BED_POSITION - LEFT_PROBE_BED_POSITION) / (AUTO_BED_LEVELING_GRID_POINTS-1);
1452
+            int yGridSpacing = (BACK_PROBE_BED_POSITION - FRONT_PROBE_BED_POSITION) / (AUTO_BED_LEVELING_GRID_POINTS-1);
1374 1453
 
1375 1454
 
1376 1455
             // solve the plane equation ax + by + d = z
@@ -1380,9 +1459,9 @@ void process_commands()
1380 1459
             // so Vx = -a Vy = -b Vz = 1 (we want the vector facing towards positive Z
1381 1460
 
1382 1461
             // "A" matrix of the linear system of equations
1383
-            double eqnAMatrix[ACCURATE_BED_LEVELING_POINTS*ACCURATE_BED_LEVELING_POINTS*3];
1462
+            double eqnAMatrix[AUTO_BED_LEVELING_GRID_POINTS*AUTO_BED_LEVELING_GRID_POINTS*3];
1384 1463
             // "B" vector of Z points
1385
-            double eqnBVector[ACCURATE_BED_LEVELING_POINTS*ACCURATE_BED_LEVELING_POINTS];
1464
+            double eqnBVector[AUTO_BED_LEVELING_GRID_POINTS*AUTO_BED_LEVELING_GRID_POINTS];
1386 1465
 
1387 1466
 
1388 1467
             int probePointCounter = 0;
@@ -1405,37 +1484,26 @@ void process_commands()
1405 1484
                 zig = true;
1406 1485
               }
1407 1486
 
1408
-              for (int xCount=0; xCount < ACCURATE_BED_LEVELING_POINTS; xCount++)
1487
+              for (int xCount=0; xCount < AUTO_BED_LEVELING_GRID_POINTS; xCount++)
1409 1488
               {
1489
+                float z_before;
1410 1490
                 if (probePointCounter == 0)
1411 1491
                 {
1412 1492
                   // raise before probing
1413
-                  do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], Z_RAISE_BEFORE_PROBING);
1493
+                  z_before = Z_RAISE_BEFORE_PROBING;
1414 1494
                 } else
1415 1495
                 {
1416 1496
                   // raise extruder
1417
-                  do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS] + Z_RAISE_BETWEEN_PROBINGS);
1497
+                  z_before = current_position[Z_AXIS] + Z_RAISE_BETWEEN_PROBINGS;
1418 1498
                 }
1419 1499
 
1500
+                float measured_z = probe_pt(xProbe, yProbe, z_before);
1420 1501
 
1421
-                do_blocking_move_to(xProbe - X_PROBE_OFFSET_FROM_EXTRUDER, yProbe - Y_PROBE_OFFSET_FROM_EXTRUDER, current_position[Z_AXIS]);
1422
-
1423
-                engage_z_probe();   // Engage Z Servo endstop if available
1424
-                run_z_probe();
1425
-                eqnBVector[probePointCounter] = current_position[Z_AXIS];
1426
-                retract_z_probe();
1502
+                eqnBVector[probePointCounter] = measured_z;
1427 1503
 
1428
-                SERIAL_PROTOCOLPGM("Bed x: ");
1429
-                SERIAL_PROTOCOL(xProbe);
1430
-                SERIAL_PROTOCOLPGM(" y: ");
1431
-                SERIAL_PROTOCOL(yProbe);
1432
-                SERIAL_PROTOCOLPGM(" z: ");
1433
-                SERIAL_PROTOCOL(current_position[Z_AXIS]);
1434
-                SERIAL_PROTOCOLPGM("\n");
1435
-
1436
-                eqnAMatrix[probePointCounter + 0*ACCURATE_BED_LEVELING_POINTS*ACCURATE_BED_LEVELING_POINTS] = xProbe;
1437
-                eqnAMatrix[probePointCounter + 1*ACCURATE_BED_LEVELING_POINTS*ACCURATE_BED_LEVELING_POINTS] = yProbe;
1438
-                eqnAMatrix[probePointCounter + 2*ACCURATE_BED_LEVELING_POINTS*ACCURATE_BED_LEVELING_POINTS] = 1;
1504
+                eqnAMatrix[probePointCounter + 0*AUTO_BED_LEVELING_GRID_POINTS*AUTO_BED_LEVELING_GRID_POINTS] = xProbe;
1505
+                eqnAMatrix[probePointCounter + 1*AUTO_BED_LEVELING_GRID_POINTS*AUTO_BED_LEVELING_GRID_POINTS] = yProbe;
1506
+                eqnAMatrix[probePointCounter + 2*AUTO_BED_LEVELING_GRID_POINTS*AUTO_BED_LEVELING_GRID_POINTS] = 1;
1439 1507
                 probePointCounter++;
1440 1508
                 xProbe += xInc;
1441 1509
               }
@@ -1443,7 +1511,7 @@ void process_commands()
1443 1511
             clean_up_after_endstop_move();
1444 1512
 
1445 1513
             // solve lsq problem
1446
-            double *plane_equation_coefficients = qr_solve(ACCURATE_BED_LEVELING_POINTS*ACCURATE_BED_LEVELING_POINTS, 3, eqnAMatrix, eqnBVector);
1514
+            double *plane_equation_coefficients = qr_solve(AUTO_BED_LEVELING_GRID_POINTS*AUTO_BED_LEVELING_GRID_POINTS, 3, eqnAMatrix, eqnBVector);
1447 1515
 
1448 1516
             SERIAL_PROTOCOLPGM("Eqn coefficients: a: ");
1449 1517
             SERIAL_PROTOCOL(plane_equation_coefficients[0]);
@@ -1457,67 +1525,24 @@ void process_commands()
1457 1525
 
1458 1526
             free(plane_equation_coefficients);
1459 1527
 
1460
-#else // ACCURATE_BED_LEVELING not defined
1461
-
1462
-
1463
-            // prob 1
1464
-            do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], Z_RAISE_BEFORE_PROBING);
1465
-            do_blocking_move_to(LEFT_PROBE_BED_POSITION - X_PROBE_OFFSET_FROM_EXTRUDER, BACK_PROBE_BED_POSITION - Y_PROBE_OFFSET_FROM_EXTRUDER, current_position[Z_AXIS]);
1528
+#else // AUTO_BED_LEVELING_GRID not defined
1466 1529
 
1467
-            engage_z_probe();   // Engage Z Servo endstop if available
1468
-            run_z_probe();
1469
-            float z_at_xLeft_yBack = current_position[Z_AXIS];
1470
-            retract_z_probe();
1471
-
1472
-            SERIAL_PROTOCOLPGM("Bed x: ");
1473
-            SERIAL_PROTOCOL(LEFT_PROBE_BED_POSITION);
1474
-            SERIAL_PROTOCOLPGM(" y: ");
1475
-            SERIAL_PROTOCOL(BACK_PROBE_BED_POSITION);
1476
-            SERIAL_PROTOCOLPGM(" z: ");
1477
-            SERIAL_PROTOCOL(current_position[Z_AXIS]);
1478
-            SERIAL_PROTOCOLPGM("\n");
1530
+            // Probe at 3 arbitrary points
1531
+            // probe 1
1532
+            float z_at_pt_1 = probe_pt(ABL_PROBE_PT_1_X, ABL_PROBE_PT_1_Y, Z_RAISE_BEFORE_PROBING);
1479 1533
 
1480
-            // prob 2
1481
-            do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS] + Z_RAISE_BETWEEN_PROBINGS);
1482
-            do_blocking_move_to(LEFT_PROBE_BED_POSITION - X_PROBE_OFFSET_FROM_EXTRUDER, FRONT_PROBE_BED_POSITION - Y_PROBE_OFFSET_FROM_EXTRUDER, current_position[Z_AXIS]);
1534
+            // probe 2
1535
+            float z_at_pt_2 = probe_pt(ABL_PROBE_PT_2_X, ABL_PROBE_PT_2_Y, current_position[Z_AXIS] + Z_RAISE_BETWEEN_PROBINGS);
1483 1536
 
1484
-            engage_z_probe();   // Engage Z Servo endstop if available
1485
-            run_z_probe();
1486
-            float z_at_xLeft_yFront = current_position[Z_AXIS];
1487
-            retract_z_probe();
1488
-
1489
-            SERIAL_PROTOCOLPGM("Bed x: ");
1490
-            SERIAL_PROTOCOL(LEFT_PROBE_BED_POSITION);
1491
-            SERIAL_PROTOCOLPGM(" y: ");
1492
-            SERIAL_PROTOCOL(FRONT_PROBE_BED_POSITION);
1493
-            SERIAL_PROTOCOLPGM(" z: ");
1494
-            SERIAL_PROTOCOL(current_position[Z_AXIS]);
1495
-            SERIAL_PROTOCOLPGM("\n");
1496
-
1497
-            // prob 3
1498
-            do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS] + Z_RAISE_BETWEEN_PROBINGS);
1499
-            // the current position will be updated by the blocking move so the head will not lower on this next call.
1500
-            do_blocking_move_to(RIGHT_PROBE_BED_POSITION - X_PROBE_OFFSET_FROM_EXTRUDER, FRONT_PROBE_BED_POSITION - Y_PROBE_OFFSET_FROM_EXTRUDER, current_position[Z_AXIS]);
1501
-
1502
-            engage_z_probe();   // Engage Z Servo endstop if available
1503
-            run_z_probe();
1504
-            float z_at_xRight_yFront = current_position[Z_AXIS];
1505
-            retract_z_probe(); // Retract Z Servo endstop if available
1506
-
1507
-            SERIAL_PROTOCOLPGM("Bed x: ");
1508
-            SERIAL_PROTOCOL(RIGHT_PROBE_BED_POSITION);
1509
-            SERIAL_PROTOCOLPGM(" y: ");
1510
-            SERIAL_PROTOCOL(FRONT_PROBE_BED_POSITION);
1511
-            SERIAL_PROTOCOLPGM(" z: ");
1512
-            SERIAL_PROTOCOL(current_position[Z_AXIS]);
1513
-            SERIAL_PROTOCOLPGM("\n");
1537
+            // probe 3
1538
+            float z_at_pt_3 = probe_pt(ABL_PROBE_PT_3_X, ABL_PROBE_PT_3_Y, current_position[Z_AXIS] + Z_RAISE_BETWEEN_PROBINGS);
1514 1539
 
1515 1540
             clean_up_after_endstop_move();
1516 1541
 
1517
-            set_bed_level_equation(z_at_xLeft_yFront, z_at_xRight_yFront, z_at_xLeft_yBack);
1542
+            set_bed_level_equation_3pts(z_at_pt_1, z_at_pt_2, z_at_pt_3);
1518 1543
 
1519 1544
 
1520
-#endif // ACCURATE_BED_LEVELING
1545
+#endif // AUTO_BED_LEVELING_GRID
1521 1546
             st_synchronize();
1522 1547
 
1523 1548
             // The following code correct the Z height difference from z-probe position and hotend tip position.
@@ -1545,7 +1570,8 @@ void process_commands()
1545 1570
             feedrate = homing_feedrate[Z_AXIS];
1546 1571
 
1547 1572
             run_z_probe();
1548
-            SERIAL_PROTOCOLPGM("Bed Position X: ");
1573
+            SERIAL_PROTOCOLPGM(MSG_BED);
1574
+            SERIAL_PROTOCOLPGM(" X: ");
1549 1575
             SERIAL_PROTOCOL(current_position[X_AXIS]);
1550 1576
             SERIAL_PROTOCOLPGM(" Y: ");
1551 1577
             SERIAL_PROTOCOL(current_position[Y_AXIS]);
@@ -2085,7 +2111,7 @@ void process_commands()
2085 2111
       }
2086 2112
       else
2087 2113
       {
2088
-        bool all_axis = !((code_seen(axis_codes[0])) || (code_seen(axis_codes[1])) || (code_seen(axis_codes[2]))|| (code_seen(axis_codes[3])));
2114
+        bool all_axis = !((code_seen(axis_codes[X_AXIS])) || (code_seen(axis_codes[Y_AXIS])) || (code_seen(axis_codes[Z_AXIS]))|| (code_seen(axis_codes[E_AXIS])));
2089 2115
         if(all_axis)
2090 2116
         {
2091 2117
           st_synchronize();
@@ -2147,18 +2173,18 @@ void process_commands()
2147 2173
     case 114: // M114
2148 2174
       SERIAL_PROTOCOLPGM("X:");
2149 2175
       SERIAL_PROTOCOL(current_position[X_AXIS]);
2150
-      SERIAL_PROTOCOLPGM("Y:");
2176
+      SERIAL_PROTOCOLPGM(" Y:");
2151 2177
       SERIAL_PROTOCOL(current_position[Y_AXIS]);
2152
-      SERIAL_PROTOCOLPGM("Z:");
2178
+      SERIAL_PROTOCOLPGM(" Z:");
2153 2179
       SERIAL_PROTOCOL(current_position[Z_AXIS]);
2154
-      SERIAL_PROTOCOLPGM("E:");
2180
+      SERIAL_PROTOCOLPGM(" E:");
2155 2181
       SERIAL_PROTOCOL(current_position[E_AXIS]);
2156 2182
 
2157 2183
       SERIAL_PROTOCOLPGM(MSG_COUNT_X);
2158 2184
       SERIAL_PROTOCOL(float(st_get_position(X_AXIS))/axis_steps_per_unit[X_AXIS]);
2159
-      SERIAL_PROTOCOLPGM("Y:");
2185
+      SERIAL_PROTOCOLPGM(" Y:");
2160 2186
       SERIAL_PROTOCOL(float(st_get_position(Y_AXIS))/axis_steps_per_unit[Y_AXIS]);
2161
-      SERIAL_PROTOCOLPGM("Z:");
2187
+      SERIAL_PROTOCOLPGM(" Z:");
2162 2188
       SERIAL_PROTOCOL(float(st_get_position(Z_AXIS))/axis_steps_per_unit[Z_AXIS]);
2163 2189
 
2164 2190
       SERIAL_PROTOCOLLN("");
@@ -2286,6 +2312,19 @@ void process_commands()
2286 2312
       }
2287 2313
       break;
2288 2314
     #ifdef DELTA
2315
+	case 665: // M665 set delta configurations L<diagonal_rod> R<delta_radius> S<segments_per_sec>
2316
+		if(code_seen('L')) {
2317
+			delta_diagonal_rod= code_value();
2318
+		}
2319
+		if(code_seen('R')) {
2320
+			delta_radius= code_value();
2321
+		}
2322
+		if(code_seen('S')) {
2323
+			delta_segments_per_second= code_value();
2324
+		}
2325
+		
2326
+		recalc_delta_settings(delta_radius, delta_diagonal_rod);
2327
+		break;
2289 2328
     case 666: // M666 set delta endstop adjustemnt
2290 2329
       for(int8_t i=0; i < 3; i++)
2291 2330
       {
@@ -2555,23 +2594,33 @@ void process_commands()
2555 2594
     #endif //PIDTEMP
2556 2595
     case 240: // M240  Triggers a camera by emulating a Canon RC-1 : http://www.doc-diy.net/photo/rc-1_hacked/
2557 2596
      {
2558
-      #if defined(PHOTOGRAPH_PIN) && PHOTOGRAPH_PIN > -1
2559
-        const uint8_t NUM_PULSES=16;
2560
-        const float PULSE_LENGTH=0.01524;
2561
-        for(int i=0; i < NUM_PULSES; i++) {
2562
-          WRITE(PHOTOGRAPH_PIN, HIGH);
2563
-          _delay_ms(PULSE_LENGTH);
2564
-          WRITE(PHOTOGRAPH_PIN, LOW);
2565
-          _delay_ms(PULSE_LENGTH);
2597
+     	#ifdef CHDK
2598
+       
2599
+         SET_OUTPUT(CHDK);
2600
+         WRITE(CHDK, HIGH);
2601
+         chdkHigh = millis();
2602
+         chdkActive = true;
2603
+       
2604
+       #else
2605
+     	
2606
+      	#if defined(PHOTOGRAPH_PIN) && PHOTOGRAPH_PIN > -1
2607
+	const uint8_t NUM_PULSES=16;
2608
+	const float PULSE_LENGTH=0.01524;
2609
+	for(int i=0; i < NUM_PULSES; i++) {
2610
+        WRITE(PHOTOGRAPH_PIN, HIGH);
2611
+        _delay_ms(PULSE_LENGTH);
2612
+        WRITE(PHOTOGRAPH_PIN, LOW);
2613
+        _delay_ms(PULSE_LENGTH);
2566 2614
         }
2567 2615
         delay(7.33);
2568 2616
         for(int i=0; i < NUM_PULSES; i++) {
2569
-          WRITE(PHOTOGRAPH_PIN, HIGH);
2570
-          _delay_ms(PULSE_LENGTH);
2571
-          WRITE(PHOTOGRAPH_PIN, LOW);
2572
-          _delay_ms(PULSE_LENGTH);
2617
+        WRITE(PHOTOGRAPH_PIN, HIGH);
2618
+        _delay_ms(PULSE_LENGTH);
2619
+        WRITE(PHOTOGRAPH_PIN, LOW);
2620
+        _delay_ms(PULSE_LENGTH);
2573 2621
         }
2574
-      #endif
2622
+      	#endif
2623
+      #endif //chdk end if
2575 2624
      }
2576 2625
     break;
2577 2626
 #ifdef DOGLCD
@@ -3041,42 +3090,6 @@ void get_coordinates()
3041 3090
     next_feedrate = code_value();
3042 3091
     if(next_feedrate > 0.0) feedrate = next_feedrate;
3043 3092
   }
3044
-  #ifdef FWRETRACT
3045
-  if(autoretract_enabled)
3046
-  if( !(seen[X_AXIS] || seen[Y_AXIS] || seen[Z_AXIS]) && seen[E_AXIS])
3047
-  {
3048
-    float echange=destination[E_AXIS]-current_position[E_AXIS];
3049
-    if(echange<-MIN_RETRACT) //retract
3050
-    {
3051
-      if(!retracted)
3052
-      {
3053
-
3054
-      destination[Z_AXIS]+=retract_zlift; //not sure why chaninging current_position negatively does not work.
3055
-      //if slicer retracted by echange=-1mm and you want to retract 3mm, corrrectede=-2mm additionally
3056
-      float correctede=-echange-retract_length;
3057
-      //to generate the additional steps, not the destination is changed, but inversely the current position
3058
-      current_position[E_AXIS]+=-correctede;
3059
-      feedrate=retract_feedrate;
3060
-      retracted=true;
3061
-      }
3062
-
3063
-    }
3064
-    else
3065
-      if(echange>MIN_RETRACT) //retract_recover
3066
-    {
3067
-      if(retracted)
3068
-      {
3069
-      //current_position[Z_AXIS]+=-retract_zlift;
3070
-      //if slicer retracted_recovered by echange=+1mm and you want to retract_recover 3mm, corrrectede=2mm additionally
3071
-      float correctede=-echange+1*retract_length+retract_recover_length; //total unretract=retract_length+retract_recover_length[surplus]
3072
-      current_position[E_AXIS]+=correctede; //to generate the additional steps, not the destination is changed, but inversely the current position
3073
-      feedrate=retract_recover_feedrate;
3074
-      retracted=false;
3075
-      }
3076
-    }
3077
-
3078
-  }
3079
-  #endif //FWRETRACT
3080 3093
 }
3081 3094
 
3082 3095
 void get_arc_coordinates()
@@ -3120,19 +3133,30 @@ void clamp_to_software_endstops(float target[3])
3120 3133
 }
3121 3134
 
3122 3135
 #ifdef DELTA
3136
+void recalc_delta_settings(float radius, float diagonal_rod)
3137
+{
3138
+	 delta_tower1_x= -SIN_60*radius; // front left tower
3139
+	 delta_tower1_y= -COS_60*radius;	   
3140
+	 delta_tower2_x=  SIN_60*radius; // front right tower
3141
+	 delta_tower2_y= -COS_60*radius;	   
3142
+	 delta_tower3_x= 0.0;                  // back middle tower
3143
+	 delta_tower3_y= radius;
3144
+	 delta_diagonal_rod_2= sq(diagonal_rod);
3145
+}
3146
+
3123 3147
 void calculate_delta(float cartesian[3])
3124 3148
 {
3125
-  delta[X_AXIS] = sqrt(DELTA_DIAGONAL_ROD_2
3126
-                       - sq(DELTA_TOWER1_X-cartesian[X_AXIS])
3127
-                       - sq(DELTA_TOWER1_Y-cartesian[Y_AXIS])
3149
+  delta[X_AXIS] = sqrt(delta_diagonal_rod_2
3150
+                       - sq(delta_tower1_x-cartesian[X_AXIS])
3151
+                       - sq(delta_tower1_y-cartesian[Y_AXIS])
3128 3152
                        ) + cartesian[Z_AXIS];
3129
-  delta[Y_AXIS] = sqrt(DELTA_DIAGONAL_ROD_2
3130
-                       - sq(DELTA_TOWER2_X-cartesian[X_AXIS])
3131
-                       - sq(DELTA_TOWER2_Y-cartesian[Y_AXIS])
3153
+  delta[Y_AXIS] = sqrt(delta_diagonal_rod_2
3154
+                       - sq(delta_tower2_x-cartesian[X_AXIS])
3155
+                       - sq(delta_tower2_y-cartesian[Y_AXIS])
3132 3156
                        ) + cartesian[Z_AXIS];
3133
-  delta[Z_AXIS] = sqrt(DELTA_DIAGONAL_ROD_2
3134
-                       - sq(DELTA_TOWER3_X-cartesian[X_AXIS])
3135
-                       - sq(DELTA_TOWER3_Y-cartesian[Y_AXIS])
3157
+  delta[Z_AXIS] = sqrt(delta_diagonal_rod_2
3158
+                       - sq(delta_tower3_x-cartesian[X_AXIS])
3159
+                       - sq(delta_tower3_y-cartesian[Y_AXIS])
3136 3160
                        ) + cartesian[Z_AXIS];
3137 3161
   /*
3138 3162
   SERIAL_ECHOPGM("cartesian x="); SERIAL_ECHO(cartesian[X_AXIS]);
@@ -3162,7 +3186,7 @@ void prepare_move()
3162 3186
   if (cartesian_mm < 0.000001) { cartesian_mm = abs(difference[E_AXIS]); }
3163 3187
   if (cartesian_mm < 0.000001) { return; }
3164 3188
   float seconds = 6000 * cartesian_mm / feedrate / feedmultiply;
3165
-  int steps = max(1, int(DELTA_SEGMENTS_PER_SECOND * seconds));
3189
+  int steps = max(1, int(delta_segments_per_second * seconds));
3166 3190
   // SERIAL_ECHOPGM("mm="); SERIAL_ECHO(cartesian_mm);
3167 3191
   // SERIAL_ECHOPGM(" seconds="); SERIAL_ECHO(seconds);
3168 3192
   // SERIAL_ECHOPGM(" steps="); SERIAL_ECHOLN(steps);
@@ -3345,6 +3369,16 @@ void manage_inactivity()
3345 3369
       }
3346 3370
     }
3347 3371
   }
3372
+  
3373
+  #ifdef CHDK //Check if pin should be set to LOW after M240 set it to HIGH
3374
+    if (chdkActive)
3375
+    {
3376
+      chdkActive = false;
3377
+      if (millis()-chdkHigh < CHDK_DELAY) return;
3378
+      WRITE(CHDK, LOW);
3379
+    }
3380
+  #endif
3381
+  
3348 3382
   #if defined(KILL_PIN) && KILL_PIN > -1
3349 3383
     if( 0 == READ(KILL_PIN) )
3350 3384
       kill();

BIN
Marlin/Menu Plans.xlsx Vedi File


+ 6
- 6
Marlin/Servo.h Vedi File

@@ -24,7 +24,7 @@
24 24
 
25 25
   Note that analogWrite of PWM on pins associated with the timer are disabled when the first servo is attached.
26 26
   Timers are seized as needed in groups of 12 servos - 24 servos use two timers, 48 servos will use four.
27
-  The sequence used to sieze timers is defined in timers.h
27
+  The sequence used to seize timers is defined in timers.h
28 28
 
29 29
   The methods are:
30 30
 
@@ -50,7 +50,7 @@
50 50
 /*
51 51
  * Defines for 16 bit timers used with  Servo library
52 52
  *
53
- * If _useTimerX is defined then TimerX is a 16 bit timer on the curent board
53
+ * If _useTimerX is defined then TimerX is a 16 bit timer on the current board
54 54
  * timer16_Sequence_t enumerates the sequence that the timers should be allocated
55 55
  * _Nbr_16timers indicates how many 16 bit timers are available.
56 56
  *
@@ -89,12 +89,12 @@ typedef enum { _timer3, _Nbr_16timers } timer16_Sequence_t ;
89 89
 typedef enum { _Nbr_16timers } timer16_Sequence_t ;
90 90
 #endif
91 91
 
92
-#define Servo_VERSION           2      // software version of this library
92
+#define Servo_VERSION           2     // software version of this library
93 93
 
94 94
 #define MIN_PULSE_WIDTH       544     // the shortest pulse sent to a servo
95 95
 #define MAX_PULSE_WIDTH      2400     // the longest pulse sent to a servo
96 96
 #define DEFAULT_PULSE_WIDTH  1500     // default pulse width when servo is attached
97
-#define REFRESH_INTERVAL    20000     // minumim time to refresh servos in microseconds
97
+#define REFRESH_INTERVAL    20000     // minimum time to refresh servos in microseconds
98 98
 
99 99
 #define SERVOS_PER_TIMER       12     // the maximum number of servos controlled by one timer
100 100
 #define MAX_SERVOS   (_Nbr_16timers  * SERVOS_PER_TIMER)
@@ -118,13 +118,13 @@ public:
118 118
   uint8_t attach(int pin);           // attach the given pin to the next free channel, sets pinMode, returns channel number or 0 if failure
119 119
   uint8_t attach(int pin, int min, int max); // as above but also sets min and max values for writes.
120 120
   void detach();
121
-  void write(int value);             // if value is < 200 its treated as an angle, otherwise as pulse width in microseconds
121
+  void write(int value);             // if value is < 200 it is treated as an angle, otherwise as pulse width in microseconds
122 122
   void writeMicroseconds(int value); // Write pulse width in microseconds
123 123
   int read();                        // returns current pulse width as an angle between 0 and 180 degrees
124 124
   int readMicroseconds();            // returns current pulse width in microseconds for this servo (was read_us() in first release)
125 125
   bool attached();                   // return true if this servo is attached, otherwise false
126 126
 #if defined (ENABLE_AUTO_BED_LEVELING) && (PROBE_SERVO_DEACTIVATION_DELAY > 0)
127
-  int pin;                           // store the hw pin of the servo
127
+  int pin;                           // store the hardware pin of the servo
128 128
 #endif
129 129
 private:
130 130
    uint8_t servoIndex;               // index into the channel data for this servo

+ 3
- 3
Marlin/cardreader.cpp Vedi File

@@ -22,7 +22,7 @@ CardReader::CardReader()
22 22
    file_subcall_ctr=0;
23 23
    memset(workDirParents, 0, sizeof(workDirParents));
24 24
 
25
-   autostart_stilltocheck=true; //the sd start is delayed, because otherwise the serial cannot answer fast enought to make contact with the hostsoftware.
25
+   autostart_stilltocheck=true; //the SD start is delayed, because otherwise the serial cannot answer fast enough to make contact with the host software.
26 26
    lastnr=0;
27 27
   //power to SD reader
28 28
   #if SDPOWER > -1
@@ -245,7 +245,7 @@ void CardReader::openFile(char* name,bool read, bool replace_current/*=true*/)
245 245
 {
246 246
   if(!cardOK)
247 247
     return;
248
-  if(file.isOpen())  //replaceing current file by new file, or subfile call
248
+  if(file.isOpen())  //replacing current file by new file, or subfile call
249 249
   {
250 250
     if(!replace_current)
251 251
     {
@@ -544,7 +544,7 @@ void CardReader::closefile(bool store_location)
544 544
   
545 545
   if(store_location)
546 546
   {
547
-    //future: store printer state, filename and position for continueing a stoped print
547
+    //future: store printer state, filename and position for continuing a stopped print
548 548
     // so one can unplug the printer and continue printing the next day.
549 549
     
550 550
   }

+ 5
- 4
Marlin/createTemperatureLookupMarlin.py Vedi File

@@ -16,9 +16,9 @@ Usage: python createTemperatureLookup.py [options]
16 16
 Options:
17 17
   -h, --help        show this help
18 18
   --rp=...          pull-up resistor
19
-  --t0=ttt:rrr      low temperature temperature:resistance point (around 25C)
20
-  --t1=ttt:rrr      middle temperature temperature:resistance point (around 150C)
21
-  --t2=ttt:rrr      high temperature temperature:resistance point (around 250C)
19
+  --t1=ttt:rrr      low temperature temperature:resistance point (around 25C)
20
+  --t2=ttt:rrr      middle temperature temperature:resistance point (around 150C)
21
+  --t3=ttt:rrr      high temperature temperature:resistance point (around 250C)
22 22
   --num-temps=...   the number of temperature points to calculate (default: 20)
23 23
 """
24 24
 
@@ -98,7 +98,8 @@ def main(argv):
98 98
     
99 99
     try:
100 100
         opts, args = getopt.getopt(argv, "h", ["help", "rp=", "t1=", "t2=", "t3=", "num-temps="])
101
-    except getopt.GetoptError:
101
+    except getopt.GetoptError as err:
102
+        print  str(err)
102 103
         usage()
103 104
         sys.exit(2)
104 105
         

+ 1
- 12
Marlin/example_configurations/delta/Configuration.h Vedi File

@@ -51,6 +51,7 @@
51 51
 // 65 = Azteeg X1
52 52
 // 66 = Melzi with ATmega1284 (MaKr3d version)
53 53
 // 67 = Azteeg X3
54
+// 68 = Azteeg X3 Pro
54 55
 // 7  = Ultimaker
55 56
 // 71 = Ultimaker (Older electronics. Pre 1.5.4. This is rare)
56 57
 // 77 = 3Drag Controller
@@ -119,18 +120,6 @@
119 120
 // Effective horizontal distance bridged by diagonal push rods.
120 121
 #define DELTA_RADIUS (DELTA_SMOOTH_ROD_OFFSET-DELTA_EFFECTOR_OFFSET-DELTA_CARRIAGE_OFFSET)
121 122
 
122
-#define DELTA_DIAGONAL_ROD_2 sq(DELTA_DIAGONAL_ROD)
123
-
124
-// Effective X/Y positions of the three vertical towers.
125
-#define SIN_60 0.8660254037844386
126
-#define COS_60 0.5
127
-#define DELTA_TOWER1_X -SIN_60*DELTA_RADIUS // front left tower
128
-#define DELTA_TOWER1_Y -COS_60*DELTA_RADIUS
129
-#define DELTA_TOWER2_X SIN_60*DELTA_RADIUS // front right tower
130
-#define DELTA_TOWER2_Y -COS_60*DELTA_RADIUS
131
-#define DELTA_TOWER3_X 0.0 // back middle tower
132
-#define DELTA_TOWER3_Y DELTA_RADIUS
133
-
134 123
 //===========================================================================
135 124
 //=============================Thermal Settings  ============================
136 125
 //===========================================================================

+ 6
- 0
Marlin/example_configurations/delta/Configuration_adv.h Vedi File

@@ -270,6 +270,12 @@
270 270
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
271 271
 #define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
272 272
 
273
+// uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
274
+//#define DIGIPOT_I2C
275
+// Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8
276
+#define DIGIPOT_I2C_NUM_CHANNELS 8
277
+// actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
278
+#define DIGIPOT_I2C_MOTOR_CURRENTS {1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0}
273 279
 
274 280
 //===========================================================================
275 281
 //=============================Additional Features===========================

+ 1
- 1
Marlin/fastio.h Vedi File

@@ -1,5 +1,5 @@
1 1
 /*
2
-  This code contibuted by Triffid_Hunter and modified by Kliment
2
+  This code contributed by Triffid_Hunter and modified by Kliment
3 3
   why double up on these macros? see http://gcc.gnu.org/onlinedocs/cpp/Stringification.html
4 4
 */
5 5
 

+ 488
- 289
Marlin/language.h
File diff soppresso perché troppo grande
Vedi File


+ 7
- 6
Marlin/pins.h Vedi File

@@ -1381,7 +1381,7 @@
1381 1381
 #define SDSS               53
1382 1382
 #define LED_PIN            8
1383 1383
 #define FAN_PIN            7
1384
-#define PS_ON_PIN          12
1384
+#define PS_ON_PIN          -1
1385 1385
 #define KILL_PIN           -1
1386 1386
 #define SUICIDE_PIN        -1  //PIN that has to be turned on right after start, to keep power flowing.
1387 1387
 #define SAFETY_TRIGGERED_PIN     28 //PIN to detect the safety circuit has triggered
@@ -1781,8 +1781,8 @@
1781 1781
 #define Z_DIR_PIN          28
1782 1782
 #define Z_STOP_PIN         30
1783 1783
 
1784
-#define E_STEP_PIN         17
1785
-#define E_DIR_PIN          21
1784
+#define E0_STEP_PIN         17
1785
+#define E0_DIR_PIN          21
1786 1786
 
1787 1787
 #define LED_PIN            -1
1788 1788
 
@@ -1793,15 +1793,16 @@
1793 1793
 
1794 1794
 #define HEATER_0_PIN       12 // (extruder)
1795 1795
 
1796
-#define HEATER_1_PIN       16 // (bed)
1796
+#define HEATER_BED_PIN     16 // (bed)
1797 1797
 #define X_ENABLE_PIN       19
1798 1798
 #define Y_ENABLE_PIN       24
1799 1799
 #define Z_ENABLE_PIN       29
1800
-#define E_ENABLE_PIN       13
1800
+#define E0_ENABLE_PIN      13
1801 1801
 
1802 1802
 #define TEMP_0_PIN          0   // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 33 extruder)
1803
-#define TEMP_1_PIN          5   // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
1803
+#define TEMP_1_PIN         -1   
1804 1804
 #define TEMP_2_PIN         -1
1805
+#define TEMP_BED_PIN        5   // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)  
1805 1806
 #define SDPOWER            -1
1806 1807
 #define SDSS               4
1807 1808
 #define HEATER_2_PIN       -1

+ 4
- 6
Marlin/qr_solve.cpp Vedi File

@@ -1,11 +1,9 @@
1 1
 #include "qr_solve.h"
2 2
 
3
-#ifdef ACCURATE_BED_LEVELING
3
+#ifdef AUTO_BED_LEVELING_GRID
4 4
 
5 5
 #include <stdlib.h>
6 6
 #include <math.h>
7
-#include <time.h>
8
-
9 7
 
10 8
 //# include "r8lib.h"
11 9
 
@@ -1173,7 +1171,7 @@ void dqrlss ( double a[], int lda, int m, int n, int kr, double b[], double x[],
1173 1171
 
1174 1172
   Discussion:
1175 1173
 
1176
-    DQRLSS must be preceeded by a call to DQRANK.
1174
+    DQRLSS must be preceded by a call to DQRANK.
1177 1175
 
1178 1176
     The system is to be solved is
1179 1177
       A * X = B
@@ -1225,7 +1223,7 @@ void dqrlss ( double a[], int lda, int m, int n, int kr, double b[], double x[],
1225 1223
     linear system.
1226 1224
 
1227 1225
     Output, double RSD[M], the residual, B - A*X.  RSD may
1228
-    overwite B.
1226
+    overwrite B.
1229 1227
 
1230 1228
     Input, int JPVT[N], the pivot information from DQRANK.
1231 1229
     Columns JPVT[0], ..., JPVT[KR-1] of the original matrix are linearly
@@ -1314,7 +1312,7 @@ int dqrsl ( double a[], int lda, int n, int k, double qraux[], double y[],
1314 1312
     can be replaced by dummy variables in the calling program.
1315 1313
     To save storage, the user may in some cases use the same
1316 1314
     array for different parameters in the calling sequence.  A
1317
-    frequently occuring example is when one wishes to compute
1315
+    frequently occurring example is when one wishes to compute
1318 1316
     any of B, RSD, or AB and does not need Y or QTY.  In this
1319 1317
     case one may identify Y, QTY, and one of B, RSD, or AB, while
1320 1318
     providing separate arrays for anything else that is to be

+ 1
- 1
Marlin/qr_solve.h Vedi File

@@ -1,6 +1,6 @@
1 1
 #include "Configuration.h"
2 2
 
3
-#ifdef ACCURATE_BED_LEVELING
3
+#ifdef AUTO_BED_LEVELING_GRID
4 4
 
5 5
 void daxpy ( int n, double da, double dx[], int incx, double dy[], int incy );
6 6
 double ddot ( int n, double dx[], int incx, double dy[], int incy );

+ 2
- 2
Marlin/stepper.h Vedi File

@@ -71,8 +71,8 @@ float st_get_position_mm(uint8_t axis);
71 71
 void st_wake_up();
72 72
 
73 73
   
74
-void checkHitEndstops(); //call from somwhere to create an serial error message with the locations the endstops where hit, in case they were triggered
75
-void endstops_hit_on_purpose(); //avoid creation of the message, i.e. after homeing and before a routine call of checkHitEndstops();
74
+void checkHitEndstops(); //call from somewhere to create an serial error message with the locations the endstops where hit, in case they were triggered
75
+void endstops_hit_on_purpose(); //avoid creation of the message, i.e. after homing and before a routine call of checkHitEndstops();
76 76
 
77 77
 void enable_endstops(bool check); // Enable/disable endstop checking
78 78
 

+ 4
- 3
Marlin/temperature.cpp Vedi File

@@ -250,7 +250,7 @@ void PID_autotune(float temp, int extruder, int ncycles)
250 250
               Kp = 0.6*Ku;
251 251
               Ki = 2*Kp/Tu;
252 252
               Kd = Kp*Tu/8;
253
-              SERIAL_PROTOCOLLNPGM(" Clasic PID ");
253
+              SERIAL_PROTOCOLLNPGM(" Classic PID ");
254 254
               SERIAL_PROTOCOLPGM(" Kp: "); SERIAL_PROTOCOLLN(Kp);
255 255
               SERIAL_PROTOCOLPGM(" Ki: "); SERIAL_PROTOCOLLN(Ki);
256 256
               SERIAL_PROTOCOLPGM(" Kd: "); SERIAL_PROTOCOLLN(Kd);
@@ -306,7 +306,7 @@ void PID_autotune(float temp, int extruder, int ncycles)
306 306
       return;
307 307
     }
308 308
     if(cycles > ncycles) {
309
-      SERIAL_PROTOCOLLNPGM("PID Autotune finished! Put the Kp, Ki and Kd constants into Configuration.h");
309
+      SERIAL_PROTOCOLLNPGM("PID Autotune finished! Put the last Kp, Ki and Kd constants from above into Configuration.h");
310 310
       return;
311 311
     }
312 312
     lcd_update();
@@ -449,7 +449,8 @@ void manage_heater()
449 449
           pid_output = constrain(target_temperature[e], 0, PID_MAX);
450 450
     #endif //PID_OPENLOOP
451 451
     #ifdef PID_DEBUG
452
-    SERIAL_ECHO_START(" PIDDEBUG ");
452
+    SERIAL_ECHO_START;
453
+    SERIAL_ECHO(" PID_DEBUG ");
453 454
     SERIAL_ECHO(e);
454 455
     SERIAL_ECHO(": Input ");
455 456
     SERIAL_ECHO(pid_input);

+ 1
- 1
Marlin/temperature.h Vedi File

@@ -28,7 +28,7 @@
28 28
 #endif
29 29
 
30 30
 // public functions
31
-void tp_init();  //initialise the heating
31
+void tp_init();  //initialize the heating
32 32
 void manage_heater(); //it is critical that this is called periodically.
33 33
 
34 34
 // low level conversion routines

+ 64
- 0
Marlin/thermistortables.h Vedi File

@@ -857,6 +857,70 @@ const short temptable_60[][2] PROGMEM = {
857 857
 };
858 858
 #endif
859 859
 
860
+// Pt1000 and Pt100 handling
861
+// 
862
+// Rt=R0*(1+a*T+b*T*T) [for T>0]
863
+// a=3.9083E-3, b=-5.775E-7
864
+
865
+#define PtA 3.9083E-3
866
+#define PtB -5.775E-7
867
+#define PtRt(T,R0) ((R0)*(1.0+(PtA)*(T)+(PtB)*(T)*(T)))
868
+#define PtAdVal(T,R0,Rup) (short)(1024/(Rup/PtRt(T,R0)+1))
869
+#define PtLine(T,R0,Rup) { PtAdVal(T,R0,Rup)*OVERSAMPLENR, T },
870
+
871
+#if (THERMISTORHEATER_0 == 110) || (THERMISTORHEATER_1 == 110) || (THERMISTORHEATER_2 == 110) || (THERMISTORBED == 110) // Pt100 with 1k0 pullup
872
+const short temptable_110[][2] PROGMEM = {
873
+// only few values are needed as the curve is very flat  
874
+  PtLine(0,100,1000)
875
+  PtLine(50,100,1000)
876
+  PtLine(100,100,1000)
877
+  PtLine(150,100,1000)
878
+  PtLine(200,100,1000)
879
+  PtLine(250,100,1000)
880
+  PtLine(300,100,1000)
881
+};
882
+#endif
883
+#if (THERMISTORHEATER_0 == 147) || (THERMISTORHEATER_1 == 147) || (THERMISTORHEATER_2 == 147) || (THERMISTORBED == 147) // Pt100 with 4k7 pullup
884
+const short temptable_147[][2] PROGMEM = {
885
+// only few values are needed as the curve is very flat  
886
+  PtLine(0,100,4700)
887
+  PtLine(50,100,4700)
888
+  PtLine(100,100,4700)
889
+  PtLine(150,100,4700)
890
+  PtLine(200,100,4700)
891
+  PtLine(250,100,4700)
892
+  PtLine(300,100,4700)
893
+};
894
+#endif
895
+#if (THERMISTORHEATER_0 == 1010) || (THERMISTORHEATER_1 == 1010) || (THERMISTORHEATER_2 == 1010) || (THERMISTORBED == 1010) // Pt1000 with 1k0 pullup
896
+const short temptable_1010[][2] PROGMEM = {
897
+  PtLine(0,1000,1000)
898
+  PtLine(25,1000,1000)
899
+  PtLine(50,1000,1000)
900
+  PtLine(75,1000,1000)
901
+  PtLine(100,1000,1000)
902
+  PtLine(125,1000,1000)
903
+  PtLine(150,1000,1000)
904
+  PtLine(175,1000,1000)
905
+  PtLine(200,1000,1000)
906
+  PtLine(225,1000,1000)
907
+  PtLine(250,1000,1000)
908
+  PtLine(275,1000,1000)
909
+  PtLine(300,1000,1000)
910
+};
911
+#endif
912
+#if (THERMISTORHEATER_0 == 1047) || (THERMISTORHEATER_1 == 1047) || (THERMISTORHEATER_2 == 1047) || (THERMISTORBED == 1047) // Pt1000 with 4k7 pullup
913
+const short temptable_1047[][2] PROGMEM = {
914
+// only few values are needed as the curve is very flat  
915
+  PtLine(0,1000,4700)
916
+  PtLine(50,1000,4700)
917
+  PtLine(100,1000,4700)
918
+  PtLine(150,1000,4700)
919
+  PtLine(200,1000,4700)
920
+  PtLine(250,1000,4700)
921
+  PtLine(300,1000,4700)
922
+};
923
+#endif
860 924
 
861 925
 #define _TT_NAME(_N) temptable_ ## _N
862 926
 #define TT_NAME(_N) _TT_NAME(_N)

+ 18
- 11
Marlin/ultralcd.cpp Vedi File

@@ -38,7 +38,7 @@ char lcd_status_message[LCD_WIDTH+1] = WELCOME_MSG;
38 38
 #include "ultralcd_implementation_hitachi_HD44780.h"
39 39
 #endif
40 40
 
41
-/** forward declerations **/
41
+/** forward declarations **/
42 42
 
43 43
 void copy_and_scalePID_i();
44 44
 void copy_and_scalePID_d();
@@ -62,9 +62,9 @@ static void lcd_set_contrast();
62 62
 static void lcd_control_retract_menu();
63 63
 static void lcd_sdcard_menu();
64 64
 
65
-static void lcd_quick_feedback();//Cause an LCD refresh, and give the user visual or audiable feedback that something has happend
65
+static void lcd_quick_feedback();//Cause an LCD refresh, and give the user visual or audible feedback that something has happened
66 66
 
67
-/* Different types of actions that can be used in menuitems. */
67
+/* Different types of actions that can be used in menu items. */
68 68
 static void menu_action_back(menuFunc_t data);
69 69
 static void menu_action_submenu(menuFunc_t data);
70 70
 static void menu_action_gcode(const char* pgcode);
@@ -145,7 +145,7 @@ static void menu_action_setting_edit_callback_long5(const char* pstr, unsigned l
145 145
 #ifndef REPRAPWORLD_KEYPAD
146 146
 volatile uint8_t buttons;//Contains the bits of the currently pressed buttons.
147 147
 #else
148
-volatile uint8_t buttons_reprapworld_keypad; // to store the reprapworld_keypad shiftregister values
148
+volatile uint8_t buttons_reprapworld_keypad; // to store the reprapworld_keypad shift register values
149 149
 #endif
150 150
 #ifdef LCD_HAS_SLOW_BUTTONS
151 151
 volatile uint8_t slow_buttons;//Contains the bits of the currently pressed buttons.
@@ -162,7 +162,7 @@ bool lcd_oldcardstatus;
162 162
 menuFunc_t currentMenu = lcd_status_screen; /* function pointer to the currently active menu */
163 163
 uint32_t lcd_next_update_millis;
164 164
 uint8_t lcd_status_update_delay;
165
-uint8_t lcdDrawUpdate = 2;                  /* Set to none-zero when the LCD needs to draw, decreased after every draw. Set to 2 in LCD routines so the LCD gets atleast 1 full redraw (first redraw is partial) */
165
+uint8_t lcdDrawUpdate = 2;                  /* Set to none-zero when the LCD needs to draw, decreased after every draw. Set to 2 in LCD routines so the LCD gets at least 1 full redraw (first redraw is partial) */
166 166
 
167 167
 //prevMenu and prevEncoderPosition are used to store the previous menu location when editing settings.
168 168
 menuFunc_t prevMenu = NULL;
@@ -173,10 +173,10 @@ void* editValue;
173 173
 int32_t minEditValue, maxEditValue;
174 174
 menuFunc_t callbackFunc;
175 175
 
176
-// placeholders for Ki and Kd edits
176
+// place-holders for Ki and Kd edits
177 177
 float raw_Ki, raw_Kd;
178 178
 
179
-/* Main status screen. It's up to the implementation specific part to show what is needed. As this is very display dependend */
179
+/* Main status screen. It's up to the implementation specific part to show what is needed. As this is very display dependent */
180 180
 static void lcd_status_screen()
181 181
 {
182 182
     if (lcd_status_update_delay)
@@ -196,6 +196,7 @@ static void lcd_status_screen()
196 196
         lcd_quick_feedback();
197 197
     }
198 198
 
199
+#ifdef ULTIPANEL_FEEDMULTIPLY
199 200
     // Dead zone at 100% feedrate
200 201
     if ((feedmultiply < 100 && (feedmultiply + int(encoderPosition)) > 100) ||
201 202
             (feedmultiply > 100 && (feedmultiply + int(encoderPosition)) < 100))
@@ -219,6 +220,7 @@ static void lcd_status_screen()
219 220
         feedmultiply += int(encoderPosition);
220 221
         encoderPosition = 0;
221 222
     }
223
+#endif//ULTIPANEL_FEEDMULTIPLY
222 224
 
223 225
     if (feedmultiply < 10)
224 226
         feedmultiply = 10;
@@ -460,6 +462,7 @@ static void lcd_move_x()
460 462
 {
461 463
     if (encoderPosition != 0)
462 464
     {
465
+        refresh_cmd_timeout();
463 466
         current_position[X_AXIS] += float((int)encoderPosition) * move_menu_scale;
464 467
         if (min_software_endstops && current_position[X_AXIS] < X_MIN_POS)
465 468
             current_position[X_AXIS] = X_MIN_POS;
@@ -489,6 +492,7 @@ static void lcd_move_y()
489 492
 {
490 493
     if (encoderPosition != 0)
491 494
     {
495
+        refresh_cmd_timeout();
492 496
         current_position[Y_AXIS] += float((int)encoderPosition) * move_menu_scale;
493 497
         if (min_software_endstops && current_position[Y_AXIS] < Y_MIN_POS)
494 498
             current_position[Y_AXIS] = Y_MIN_POS;
@@ -518,6 +522,7 @@ static void lcd_move_z()
518 522
 {
519 523
     if (encoderPosition != 0)
520 524
     {
525
+        refresh_cmd_timeout();
521 526
         current_position[Z_AXIS] += float((int)encoderPosition) * move_menu_scale;
522 527
         if (min_software_endstops && current_position[Z_AXIS] < Z_MIN_POS)
523 528
             current_position[Z_AXIS] = Z_MIN_POS;
@@ -706,7 +711,9 @@ static void lcd_control_motion_menu()
706 711
 {
707 712
     START_MENU();
708 713
     MENU_ITEM(back, MSG_CONTROL, lcd_control_menu);
714
+#ifdef ENABLE_AUTO_BED_LEVELING
709 715
     MENU_ITEM_EDIT(float32, MSG_ZPROBE_ZOFFSET, &zprobe_zoffset, 0.5, 50);
716
+#endif
710 717
     MENU_ITEM_EDIT(float5, MSG_ACC, &acceleration, 500, 99000);
711 718
     MENU_ITEM_EDIT(float3, MSG_VXY_JERK, &max_xy_jerk, 1, 990);
712 719
     MENU_ITEM_EDIT(float52, MSG_VZ_JERK, &max_z_jerk, 0.1, 990);
@@ -1003,7 +1010,7 @@ void lcd_init()
1003 1010
     WRITE(SHIFT_LD,HIGH);
1004 1011
   #endif
1005 1012
 #else  // Not NEWPANEL
1006
-  #ifdef SR_LCD_2W_NL // Non latching 2 wire shiftregister
1013
+  #ifdef SR_LCD_2W_NL // Non latching 2 wire shift register
1007 1014
      pinMode (SR_DATA_PIN, OUTPUT);
1008 1015
      pinMode (SR_CLK_PIN, OUTPUT);
1009 1016
   #elif defined(SHIFT_CLK) 
@@ -1050,7 +1057,7 @@ void lcd_update()
1050 1057
     {
1051 1058
         lcdDrawUpdate = 2;
1052 1059
         lcd_oldcardstatus = IS_SD_INSERTED;
1053
-        lcd_implementation_init(); // to maybe revive the lcd if static electricty killed it.
1060
+        lcd_implementation_init(); // to maybe revive the LCD if static electricity killed it.
1054 1061
 
1055 1062
         if(lcd_oldcardstatus)
1056 1063
         {
@@ -1465,7 +1472,7 @@ char *ftostr52(const float &x)
1465 1472
 }
1466 1473
 
1467 1474
 // Callback for after editing PID i value
1468
-// grab the pid i value out of the temp variable; scale it; then update the PID driver
1475
+// grab the PID i value out of the temp variable; scale it; then update the PID driver
1469 1476
 void copy_and_scalePID_i()
1470 1477
 {
1471 1478
 #ifdef PIDTEMP
@@ -1475,7 +1482,7 @@ void copy_and_scalePID_i()
1475 1482
 }
1476 1483
 
1477 1484
 // Callback for after editing PID d value
1478
-// grab the pid d value out of the temp variable; scale it; then update the PID driver
1485
+// grab the PID d value out of the temp variable; scale it; then update the PID driver
1479 1486
 void copy_and_scalePID_d()
1480 1487
 {
1481 1488
 #ifdef PIDTEMP

+ 4
- 4
Marlin/ultralcd.h Vedi File

@@ -17,7 +17,7 @@
17 17
   void lcd_setcontrast(uint8_t value);
18 18
 #endif
19 19
 
20
-  static unsigned char blink = 0;	// Variable for visualisation of fan rotation in GLCD
20
+  static unsigned char blink = 0;	// Variable for visualization of fan rotation in GLCD
21 21
 
22 22
   #define LCD_MESSAGEPGM(x) lcd_setstatuspgm(PSTR(x))
23 23
   #define LCD_ALERTMESSAGEPGM(x) lcd_setalertstatuspgm(PSTR(x))
@@ -29,7 +29,7 @@
29 29
   void lcd_buttons_update();
30 30
   extern volatile uint8_t buttons;  //the last checked buttons in a bit array.
31 31
   #ifdef REPRAPWORLD_KEYPAD
32
-    extern volatile uint8_t buttons_reprapworld_keypad; // to store the keypad shiftregister values
32
+    extern volatile uint8_t buttons_reprapworld_keypad; // to store the keypad shift register values
33 33
   #endif
34 34
   #else
35 35
   FORCE_INLINE void lcd_buttons_update() {}
@@ -72,7 +72,7 @@
72 72
   	  #define REPRAPWORLD_KEYPAD_MOVE_HOME (buttons_reprapworld_keypad&EN_REPRAPWORLD_KEYPAD_MIDDLE)
73 73
     #endif //REPRAPWORLD_KEYPAD
74 74
   #else
75
-    //atomatic, do not change
75
+    //atomic, do not change
76 76
     #define B_LE (1<<BL_LE)
77 77
     #define B_UP (1<<BL_UP)
78 78
     #define B_MI (1<<BL_MI)
@@ -85,7 +85,7 @@
85 85
     #define LCD_CLICKED ((buttons&B_MI)||(buttons&B_ST))
86 86
   #endif//NEWPANEL
87 87
 
88
-#else //no lcd
88
+#else //no LCD
89 89
   FORCE_INLINE void lcd_update() {}
90 90
   FORCE_INLINE void lcd_init() {}
91 91
   FORCE_INLINE void lcd_setstatus(const char* message) {}

+ 13
- 3
Marlin/ultralcd_implementation_hitachi_HD44780.h Vedi File

@@ -2,8 +2,8 @@
2 2
 #define ULTRA_LCD_IMPLEMENTATION_HITACHI_HD44780_H
3 3
 
4 4
 /**
5
-* Implementation of the LCD display routines for a hitachi HD44780 display. These are common LCD character displays.
6
-* When selecting the rusian language, a slightly different LCD implementation is used to handle UTF8 characters.
5
+* Implementation of the LCD display routines for a Hitachi HD44780 display. These are common LCD character displays.
6
+* When selecting the Russian language, a slightly different LCD implementation is used to handle UTF8 characters.
7 7
 **/
8 8
 
9 9
 #ifndef REPRAPWORLD_KEYPAD
@@ -20,7 +20,7 @@ extern volatile uint16_t buttons;  //an extended version of the last checked but
20 20
 // via a shift/i2c register.
21 21
 
22 22
 #ifdef ULTIPANEL
23
-// All Ultipanels might have an encoder - so this is always be mapped onto first two bits
23
+// All UltiPanels might have an encoder - so this is always be mapped onto first two bits
24 24
 #define BLEN_B 1
25 25
 #define BLEN_A 0
26 26
 
@@ -718,6 +718,7 @@ static void lcd_implementation_quick_feedback()
718 718
 	#endif
719 719
 #elif defined(BEEPER) && BEEPER > -1
720 720
     SET_OUTPUT(BEEPER);
721
+	#if !defined(LCD_FEEDBACK_FREQUENCY_HZ) || !defined(LCD_FEEDBACK_FREQUENCY_DURATION_MS)
721 722
     for(int8_t i=0;i<10;i++)
722 723
     {
723 724
       WRITE(BEEPER,HIGH);
@@ -725,6 +726,15 @@ static void lcd_implementation_quick_feedback()
725 726
       WRITE(BEEPER,LOW);
726 727
       delayMicroseconds(100);
727 728
     }
729
+    #else
730
+    for(int8_t i=0;i<(LCD_FEEDBACK_FREQUENCY_DURATION_MS / (1000 / LCD_FEEDBACK_FREQUENCY_HZ));i++)
731
+    {
732
+      WRITE(BEEPER,HIGH);
733
+      delayMicroseconds(1000000 / LCD_FEEDBACK_FREQUENCY_HZ / 2);
734
+      WRITE(BEEPER,LOW);
735
+      delayMicroseconds(1000000 / LCD_FEEDBACK_FREQUENCY_HZ / 2);
736
+    }
737
+    #endif
728 738
 #endif
729 739
 }
730 740
 

+ 4
- 4
Marlin/ultralcd_st7920_u8glib_rrd.h Vedi File

@@ -12,8 +12,8 @@
12 12
 #define ST7920_DAT_PIN  LCD_PINS_ENABLE
13 13
 #define ST7920_CS_PIN   LCD_PINS_RS
14 14
 
15
-//#define PAGE_HEIGHT 8   //128 byte frambuffer
16
-//#define PAGE_HEIGHT 16  //256 byte frambuffer
15
+//#define PAGE_HEIGHT 8   //128 byte framebuffer
16
+//#define PAGE_HEIGHT 16  //256 byte framebuffer
17 17
 #define PAGE_HEIGHT 32  //512 byte framebuffer
18 18
 
19 19
 #define WIDTH 128
@@ -59,8 +59,8 @@ uint8_t u8g_dev_rrd_st7920_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, vo
59 59
         ST7920_SET_CMD();
60 60
         ST7920_WRITE_BYTE(0x08);       //display off, cursor+blink off
61 61
         ST7920_WRITE_BYTE(0x01);       //clear CGRAM ram
62
-        u8g_Delay(10);                 //delay for cgram clear
63
-        ST7920_WRITE_BYTE(0x3E);       //extended mode + gdram active
62
+        u8g_Delay(10);                 //delay for CGRAM clear
63
+        ST7920_WRITE_BYTE(0x3E);       //extended mode + GDRAM active
64 64
         for(y=0;y<HEIGHT/2;y++)        //clear GDRAM
65 65
         {
66 66
           ST7920_WRITE_BYTE(0x80|y);   //set y

+ 3
- 13
Marlin/vector_3.cpp Vedi File

@@ -22,19 +22,9 @@
22 22
 #ifdef ENABLE_AUTO_BED_LEVELING
23 23
 #include "vector_3.h"
24 24
 
25
-vector_3::vector_3()
26
-{
27
-  this->x = 0;
28
-  this->y = 0;
29
-  this->z = 0;
30
-}
25
+vector_3::vector_3() : x(0), y(0), z(0) { }
31 26
 
32
-vector_3::vector_3(float x, float y, float z)
33
-{
34
-	this->x = x;
35
-	this->y = y;
36
-	this->z = z;
37
-}
27
+vector_3::vector_3(float x_, float y_, float z_) : x(x_), y(y_), z(z_) { }
38 28
 
39 29
 vector_3 vector_3::cross(vector_3 left, vector_3 right)
40 30
 {
@@ -62,7 +52,7 @@ vector_3 vector_3::get_normal()
62 52
 
63 53
 float vector_3::get_length() 
64 54
 {
65
-        float length = sqrt((x * x) + (y * y) + (z * z));
55
+	float length = sqrt((x * x) + (y * y) + (z * z));
66 56
 	return length;
67 57
 }
68 58
  

+ 2
- 2
Marlin/watchdog.h Vedi File

@@ -4,9 +4,9 @@
4 4
 #include "Marlin.h"
5 5
 
6 6
 #ifdef USE_WATCHDOG
7
-  // intialise watch dog with a 1 sec interrupt time
7
+  // initialize watch dog with a 1 sec interrupt time
8 8
   void watchdog_init();
9
-  // pad the dog/reset watchdog. MUST be called at least every second after the first watchdog_init or avr will go into emergency procedures..
9
+  // pad the dog/reset watchdog. MUST be called at least every second after the first watchdog_init or AVR will go into emergency procedures..
10 10
   void watchdog_reset();
11 11
 #else
12 12
   //If we do not have a watchdog, then we can have empty functions which are optimized away.

+ 1
- 1
README.md Vedi File

@@ -85,7 +85,7 @@ AutoTemp:
85 85
 If your gcode contains a wide spread of extruder velocities, or you realtime change the building speed, the temperature should be changed accordingly.
86 86
 Usually, higher speed requires higher temperature.
87 87
 This can now be performed by the AutoTemp function
88
-By calling M109 S<mintemp> T<maxtemp> F<factor> you enter the autotemp mode.
88
+By calling M109 S<mintemp> B<maxtemp> F<factor> you enter the autotemp mode.
89 89
 
90 90
 You can leave it by calling M109 without any F.
91 91
 If active, the maximal extruder stepper rate of all buffered moves will be calculated, and named "maxerate" [steps/sec].

Loading…
Annulla
Salva