Browse Source

Merge branch 'Marlin_v1' of https://github.com/ErikZalm/Marlin into update_menu_plan

Cylindric 11 years ago
parent
commit
3cc7626d1f

+ 29
- 22
Marlin/Configuration.h View File

8
 //===========================================================================
8
 //===========================================================================
9
 //============================= DELTA Printer ===============================
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
 // example_configurations/delta directory.
12
 // example_configurations/delta directory.
13
 //
13
 //
14
 
14
 
55
 // 68 = Azteeg X3 Pro
55
 // 68 = Azteeg X3 Pro
56
 // 7  = Ultimaker
56
 // 7  = Ultimaker
57
 // 71 = Ultimaker (Older electronics. Pre 1.5.4. This is rare)
57
 // 71 = Ultimaker (Older electronics. Pre 1.5.4. This is rare)
58
+// 72 = Ultimainboard 2.x (Uses TEMP_SENSOR 20)
58
 // 77 = 3Drag Controller
59
 // 77 = 3Drag Controller
59
 // 8  = Teensylu
60
 // 8  = Teensylu
60
 // 80 = Rumba
61
 // 80 = Rumba
67
 // 702= Minitronics v1.0
68
 // 702= Minitronics v1.0
68
 // 90 = Alpha OMCA board
69
 // 90 = Alpha OMCA board
69
 // 91 = Final OMCA board
70
 // 91 = Final OMCA board
70
-// 301 = Rambo
71
+// 301= Rambo
71
 // 21 = Elefu Ra Board (v3)
72
 // 21 = Elefu Ra Board (v3)
72
 
73
 
73
 #ifndef MOTHERBOARD
74
 #ifndef MOTHERBOARD
90
 
91
 
91
 #define POWER_SUPPLY 1
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
 // #define PS_DEFAULT_OFF
95
 // #define PS_DEFAULT_OFF
95
 
96
 
96
 //===========================================================================
97
 //===========================================================================
105
 // 0 is not used
106
 // 0 is not used
106
 // 1 is 100k thermistor - best choice for EPCOS 100k (4.7k pullup)
107
 // 1 is 100k thermistor - best choice for EPCOS 100k (4.7k pullup)
107
 // 2 is 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup)
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
 // 4 is 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
110
 // 4 is 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
110
 // 5 is 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (4.7k pullup)
111
 // 5 is 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (4.7k pullup)
111
 // 6 is 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup)
112
 // 6 is 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup)
114
 // 8 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup)
115
 // 8 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup)
115
 // 9 is 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup)
116
 // 9 is 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup)
116
 // 10 is 100k RS thermistor 198-961 (4.7k pullup)
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
 //    1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k
121
 //    1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k
120
 //                          (but gives greater accuracy and more stable PID)
122
 //                          (but gives greater accuracy and more stable PID)
121
 // 51 is 100k thermistor - EPCOS (1k pullup)
123
 // 51 is 100k thermistor - EPCOS (1k pullup)
122
 // 52 is 200k thermistor - ATC Semitec 204GT-2 (1k pullup)
124
 // 52 is 200k thermistor - ATC Semitec 204GT-2 (1k pullup)
123
 // 55 is 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup)
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
 #define TEMP_SENSOR_0 -1
132
 #define TEMP_SENSOR_0 -1
126
 #define TEMP_SENSOR_1 -1
133
 #define TEMP_SENSOR_1 -1
175
   #define K1 0.95 //smoothing factor within the PID
182
   #define K1 0.95 //smoothing factor within the PID
176
   #define PID_dT ((OVERSAMPLENR * 8.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine
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
 // Ultimaker
186
 // Ultimaker
180
     #define  DEFAULT_Kp 22.2
187
     #define  DEFAULT_Kp 22.2
181
     #define  DEFAULT_Ki 1.08
188
     #define  DEFAULT_Ki 1.08
182
     #define  DEFAULT_Kd 114
189
     #define  DEFAULT_Kd 114
183
 
190
 
184
-// Makergear
191
+// MakerGear
185
 //    #define  DEFAULT_Kp 7.0
192
 //    #define  DEFAULT_Kp 7.0
186
 //    #define  DEFAULT_Ki 0.1
193
 //    #define  DEFAULT_Ki 0.1
187
 //    #define  DEFAULT_Kd 12
194
 //    #define  DEFAULT_Kd 12
250
 #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
257
 #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
251
 
258
 
252
 #ifndef ENDSTOPPULLUPS
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
   // #define ENDSTOPPULLUP_XMAX
261
   // #define ENDSTOPPULLUP_XMAX
255
   // #define ENDSTOPPULLUP_YMAX
262
   // #define ENDSTOPPULLUP_YMAX
256
   // #define ENDSTOPPULLUP_ZMAX
263
   // #define ENDSTOPPULLUP_ZMAX
334
   #define BACK_PROBE_BED_POSITION 180
341
   #define BACK_PROBE_BED_POSITION 180
335
   #define FRONT_PROBE_BED_POSITION 20
342
   #define FRONT_PROBE_BED_POSITION 20
336
 
343
 
337
-  // these are the offsets to the prob relative to the extruder tip (Hotend - Probe)
344
+  // these are the offsets to the probe relative to the extruder tip (Hotend - Probe)
338
   #define X_PROBE_OFFSET_FROM_EXTRUDER -25
345
   #define X_PROBE_OFFSET_FROM_EXTRUDER -25
339
   #define Y_PROBE_OFFSET_FROM_EXTRUDER -29
346
   #define Y_PROBE_OFFSET_FROM_EXTRUDER -29
340
   #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35
347
   #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35
355
 //  #define PROBE_SERVO_DEACTIVATION_DELAY 300
362
 //  #define PROBE_SERVO_DEACTIVATION_DELAY 300
356
 
363
 
357
 
364
 
358
-//If you have enabled the Bed Auto Levelling and are using the same Z Probe for Z Homing,
365
+//If you have enabled the Bed Auto Leveling and are using the same Z Probe for Z Homing,
359
 //it is highly recommended you let this Z_SAFE_HOMING enabled!!!
366
 //it is highly recommended you let this Z_SAFE_HOMING enabled!!!
360
 
367
 
361
   #define Z_SAFE_HOMING   // This feature is meant to avoid Z homing with probe outside the bed area.
368
   #define Z_SAFE_HOMING   // This feature is meant to avoid Z homing with probe outside the bed area.
389
 //#define BED_CENTER_AT_0_0  // If defined, the center of the bed is at (X=0, Y=0)
396
 //#define BED_CENTER_AT_0_0  // If defined, the center of the bed is at (X=0, Y=0)
390
 
397
 
391
 //Manual homing switch locations:
398
 //Manual homing switch locations:
392
-// For deltabots this means top and center of the cartesian print volume.
399
+// For deltabots this means top and center of the Cartesian print volume.
393
 #define MANUAL_X_HOME_POS 0
400
 #define MANUAL_X_HOME_POS 0
394
 #define MANUAL_Y_HOME_POS 0
401
 #define MANUAL_Y_HOME_POS 0
395
 #define MANUAL_Z_HOME_POS 0
402
 #define MANUAL_Z_HOME_POS 0
403
 
410
 
404
 #define DEFAULT_AXIS_STEPS_PER_UNIT   {78.7402,78.7402,200.0*8/3,760*1.1}  // default steps per unit for Ultimaker
411
 #define DEFAULT_AXIS_STEPS_PER_UNIT   {78.7402,78.7402,200.0*8/3,760*1.1}  // default steps per unit for Ultimaker
405
 #define DEFAULT_MAX_FEEDRATE          {500, 500, 5, 25}    // (mm/sec)
412
 #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.
413
+#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
 
414
 
408
 #define DEFAULT_ACCELERATION          3000    // X, Y, Z and E max acceleration in mm/s^2 for printing moves
415
 #define DEFAULT_ACCELERATION          3000    // X, Y, Z and E max acceleration in mm/s^2 for printing moves
409
 #define DEFAULT_RETRACT_ACCELERATION  3000   // X, Y, Z and E max acceleration in mm/s^2 for retracts
416
 #define DEFAULT_RETRACT_ACCELERATION  3000   // X, Y, Z and E max acceleration in mm/s^2 for retracts
424
 //===========================================================================
431
 //===========================================================================
425
 
432
 
426
 // EEPROM
433
 // EEPROM
427
-// the microcontroller can store settings in the EEPROM, e.g. max velocity...
428
-// M500 - stores paramters in EEPROM
434
+// The microcontroller can store settings in the EEPROM, e.g. max velocity...
435
+// M500 - stores parameters in EEPROM
429
 // M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
436
 // M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
430
 // M502 - reverts to the default "factory settings".  You still need to store them in EEPROM afterwards if you want to.
437
 // 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
438
+//define this to enable EEPROM support
432
 //#define EEPROM_SETTINGS
439
 //#define EEPROM_SETTINGS
433
 //to disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
440
 //to disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
434
 // please keep turned on if you can.
441
 // please keep turned on if you can.
444
 #define ABS_PREHEAT_FAN_SPEED 255   // Insert Value between 0 and 255
451
 #define ABS_PREHEAT_FAN_SPEED 255   // Insert Value between 0 and 255
445
 
452
 
446
 //LCD and SD support
453
 //LCD and SD support
447
-//#define ULTRA_LCD  //general lcd support, also 16x2
454
+//#define ULTRA_LCD  //general LCD support, also 16x2
448
 //#define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
455
 //#define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
449
 //#define SDSUPPORT // Enable SD Card Support in Hardware Console
456
 //#define SDSUPPORT // Enable SD Card Support in Hardware Console
450
 //#define SDSLOW // Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
457
 //#define SDSLOW // Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
451
 //#define ENCODER_PULSES_PER_STEP 1 // Increase if you have a high resolution encoder
458
 //#define ENCODER_PULSES_PER_STEP 1 // Increase if you have a high resolution encoder
452
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
459
 //#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
460
+//#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
461
+//#define ULTIPANEL  //the UltiPanel as on Thingiverse
455
 //#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
462
 //#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
456
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
463
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
457
 
464
 
576
 // https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
583
 // https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
577
 //#define SR_LCD
584
 //#define SR_LCD
578
 #ifdef SR_LCD
585
 #ifdef SR_LCD
579
-   #define SR_LCD_2W_NL    // Non latching 2 wire shiftregister
586
+   #define SR_LCD_2W_NL    // Non latching 2 wire shift register
580
    //#define NEWPANEL
587
    //#define NEWPANEL
581
 #endif
588
 #endif
582
 
589
 
592
     #define LCD_WIDTH 20
599
     #define LCD_WIDTH 20
593
     #define LCD_HEIGHT 4
600
     #define LCD_HEIGHT 4
594
   #endif
601
   #endif
595
-#else //no panel but just lcd
602
+#else //no panel but just LCD
596
   #ifdef ULTRA_LCD
603
   #ifdef ULTRA_LCD
597
   #ifdef DOGLCD // Change number of lines to match the 128x64 graphics display
604
   #ifdef DOGLCD // Change number of lines to match the 128x64 graphics display
598
     #define LCD_WIDTH 20
605
     #define LCD_WIDTH 20
614
 // Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
621
 // Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
615
 //#define FAST_PWM_FAN
622
 //#define FAST_PWM_FAN
616
 
623
 
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.
624
+// Temperature status LEDs that display the hotend and bet temperature.
625
+// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
619
 // Otherwise the RED led is on. There is 1C hysteresis.
626
 // Otherwise the RED led is on. There is 1C hysteresis.
620
 //#define TEMP_STAT_LEDS
627
 //#define TEMP_STAT_LEDS
621
 
628
 

+ 22
- 16
Marlin/Configuration_adv.h View File

11
 #define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control
11
 #define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control
12
 
12
 
13
 //// Heating sanity check:
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
 // If the temperature has not increased at the end of that period, the target temperature is set to zero.
15
 // If the temperature has not increased at the end of that period, the target temperature is set to zero.
16
 // It can be reset with another M104/M109. This check is also only triggered if the target temperature and the current temperature
16
 // It can be reset with another M104/M109. This check is also only triggered if the target temperature and the current temperature
17
 //  differ by at least 2x WATCH_TEMP_INCREASE
17
 //  differ by at least 2x WATCH_TEMP_INCREASE
19
 //#define WATCH_TEMP_INCREASE 10  //Heat up at least 10 degree in 20 seconds
19
 //#define WATCH_TEMP_INCREASE 10  //Heat up at least 10 degree in 20 seconds
20
 
20
 
21
 #ifdef PIDTEMP
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
   #define PID_ADD_EXTRUSION_RATE
24
   #define PID_ADD_EXTRUSION_RATE
25
   #ifdef PID_ADD_EXTRUSION_RATE
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
   #endif
27
   #endif
28
 #endif
28
 #endif
29
 
29
 
34
 // the target temperature is set to mintemp+factor*se[steps/sec] and limited by mintemp and maxtemp
34
 // the target temperature is set to mintemp+factor*se[steps/sec] and limited by mintemp and maxtemp
35
 // you exit the value by any M109 without F*
35
 // you exit the value by any M109 without F*
36
 // Also, if the temperature is set to a value <mintemp, it is not changed by autotemp.
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
 #define AUTOTEMP
38
 #define AUTOTEMP
39
 #ifdef AUTOTEMP
39
 #ifdef AUTOTEMP
40
   #define AUTOTEMP_OLDWEIGHT 0.98
40
   #define AUTOTEMP_OLDWEIGHT 0.98
282
 #define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
282
 #define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
283
 #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
283
 #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
284
 
284
 
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.
285
+#define SDCARD_RATHERRECENTFIRST  //reverse file order of sd card menu display. Its sorted practically after the file system block order.
286
+// 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
 // using:
287
 // using:
288
 //#define MENU_ADDAUTOSTART
288
 //#define MENU_ADDAUTOSTART
289
 
289
 
290
-// The hardware watchdog should reset the Microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
290
+// The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
291
 //#define USE_WATCHDOG
291
 //#define USE_WATCHDOG
292
 
292
 
293
 #ifdef USE_WATCHDOG
293
 #ifdef USE_WATCHDOG
301
 //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
301
 //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
302
 
302
 
303
 // Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process
303
 // 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
304
+// it can e.g. be used to change z-positions in the print startup phase in real-time
305
 // does not respect endstops!
305
 // does not respect endstops!
306
 //#define BABYSTEPPING
306
 //#define BABYSTEPPING
307
 #ifdef BABYSTEPPING
307
 #ifdef BABYSTEPPING
324
 //
324
 //
325
 // advance (steps) = STEPS_PER_CUBIC_MM_E * EXTUDER_ADVANCE_K * cubic mm per second ^ 2
325
 // advance (steps) = STEPS_PER_CUBIC_MM_E * EXTUDER_ADVANCE_K * cubic mm per second ^ 2
326
 //
326
 //
327
-// hooke's law says:		force = k * distance
328
-// bernoulli's priniciple says:	v ^ 2 / 2 + g . h + pressure / density = constant
327
+// Hooke's law says:		force = k * distance
328
+// Bernoulli's principle says:	v ^ 2 / 2 + g . h + pressure / density = constant
329
 // so: v ^ 2 is proportional to number of steps we advance the extruder
329
 // so: v ^ 2 is proportional to number of steps we advance the extruder
330
 //#define ADVANCE
330
 //#define ADVANCE
331
 
331
 
379
 //===========================================================================
379
 //===========================================================================
380
 
380
 
381
 // The number of linear motions that can be in the plan at any give time.
381
 // 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.
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 ring-buffering.
383
 #if defined SDSUPPORT
383
 #if defined SDSUPPORT
384
   #define BLOCK_BUFFER_SIZE 16   // SD,LCD,Buttons take more memory, block buffer needs to be smaller
384
   #define BLOCK_BUFFER_SIZE 16   // SD,LCD,Buttons take more memory, block buffer needs to be smaller
385
 #else
385
 #else
387
 #endif
387
 #endif
388
 
388
 
389
 
389
 
390
-//The ASCII buffer for recieving from the serial:
390
+//The ASCII buffer for receiving from the serial:
391
 #define MAX_CMD_SIZE 96
391
 #define MAX_CMD_SIZE 96
392
 #define BUFSIZE 4
392
 #define BUFSIZE 4
393
 
393
 
394
 
394
 
395
-// Firmware based and LCD controled retract
395
+// Firmware based and LCD controlled retract
396
 // M207 and M208 can be used to define parameters for the retraction.
396
 // M207 and M208 can be used to define parameters for the retraction.
397
 // The retraction can be called by the slicer using G10 and G11
397
 // The retraction can be called by the slicer using G10 and G11
398
 // until then, intended retractions can be detected by moves that only extrude and the direction.
398
 // until then, intended retractions can be detected by moves that only extrude and the direction.
399
 // the moves are than replaced by the firmware controlled ones.
399
 // the moves are than replaced by the firmware controlled ones.
400
 
400
 
401
 // #define FWRETRACT  //ONLY PARTIALLY TESTED
401
 // #define FWRETRACT  //ONLY PARTIALLY TESTED
402
-#define MIN_RETRACT 0.1 //minimum extruded mm to accept a automatic gcode retraction attempt
403
-
402
+#ifdef FWRETRACT
403
+  #define MIN_RETRACT 0.1                //minimum extruded mm to accept a automatic gcode retraction attempt
404
+  #define RETRACT_LENGTH 3               //default retract length (positive mm)
405
+  #define RETRACT_FEEDRATE 80*60         //default feedrate for retracting
406
+  #define RETRACT_ZLIFT 0                //default retract Z-lift
407
+  #define RETRACT_RECOVER_LENGTH 0       //default additional recover length (mm, added to retract length when recovering)
408
+  #define RETRACT_RECOVER_FEEDRATE 8*60  //default feedrate for recovering from retraction
409
+#endif
404
 
410
 
405
 //adds support for experimental filament exchange support M600; requires display
411
 //adds support for experimental filament exchange support M600; requires display
406
 #ifdef ULTIPANEL
412
 #ifdef ULTIPANEL

+ 5
- 5
Marlin/LiquidCrystalRus.cpp View File

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

+ 3
- 2
Marlin/Makefile View File

236
 VPATH += $(HARDWARE_DIR)/libraries/Wire/utility
236
 VPATH += $(HARDWARE_DIR)/libraries/Wire/utility
237
 VPATH += $(HARDWARE_DIR)/libraries/LiquidTWI2
237
 VPATH += $(HARDWARE_DIR)/libraries/LiquidTWI2
238
 endif
238
 endif
239
-ifeq ($(WIRE, 1)
239
+ifeq ($(WIRE), 1)
240
 VPATH += $(HARDWARE_DIR)/libraries/Wire
240
 VPATH += $(HARDWARE_DIR)/libraries/Wire
241
 VPATH += $(HARDWARE_DIR)/libraries/Wire/utility
241
 VPATH += $(HARDWARE_DIR)/libraries/Wire/utility
242
 endif
242
 endif
260
 	MarlinSerial.cpp Sd2Card.cpp SdBaseFile.cpp SdFatUtil.cpp	\
260
 	MarlinSerial.cpp Sd2Card.cpp SdBaseFile.cpp SdFatUtil.cpp	\
261
 	SdFile.cpp SdVolume.cpp motion_control.cpp planner.cpp		\
261
 	SdFile.cpp SdVolume.cpp motion_control.cpp planner.cpp		\
262
 	stepper.cpp temperature.cpp cardreader.cpp ConfigurationStore.cpp \
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
 ifeq ($(LIQUID_TWI2), 0)
265
 ifeq ($(LIQUID_TWI2), 0)
265
 CXXSRC += LiquidCrystal.cpp
266
 CXXSRC += LiquidCrystal.cpp
266
 else
267
 else

+ 2
- 0
Marlin/Marlin.h View File

189
 void prepare_arc_move(char isclockwise);
189
 void prepare_arc_move(char isclockwise);
190
 void clamp_to_software_endstops(float target[3]);
190
 void clamp_to_software_endstops(float target[3]);
191
 
191
 
192
+void refresh_cmd_timeout(void);
193
+
192
 #ifdef FAST_PWM_FAN
194
 #ifdef FAST_PWM_FAN
193
 void setPwmFrequency(uint8_t pin, int val);
195
 void setPwmFrequency(uint8_t pin, int val);
194
 #endif
196
 #endif

+ 2
- 2
Marlin/MarlinSerial.cpp View File

25
 
25
 
26
 #ifndef AT90USB
26
 #ifndef AT90USB
27
 // this next line disables the entire HardwareSerial.cpp, 
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
 #if defined(UBRRH) || defined(UBRR0H) || defined(UBRR1H) || defined(UBRR2H) || defined(UBRR3H)
29
 #if defined(UBRRH) || defined(UBRR0H) || defined(UBRR1H) || defined(UBRR2H) || defined(UBRR3H)
30
 
30
 
31
 #if UART_PRESENT(SERIAL_PORT)
31
 #if UART_PRESENT(SERIAL_PORT)
73
   bool useU2X = true;
73
   bool useU2X = true;
74
 
74
 
75
 #if F_CPU == 16000000UL && SERIAL_PORT == 0
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
   // with the Duemilanove and previous boards and the firmware on the 8U2
77
   // with the Duemilanove and previous boards and the firmware on the 8U2
78
   // on the Uno and Mega 2560.
78
   // on the Uno and Mega 2560.
79
   if (baud == 57600) {
79
   if (baud == 57600) {

+ 111
- 135
Marlin/Marlin_main.cpp View File

76
 // G10 - retract filament according to settings of M207
76
 // G10 - retract filament according to settings of M207
77
 // G11 - retract recover filament according to settings of M208
77
 // G11 - retract recover filament according to settings of M208
78
 // G28 - Home all Axis
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
 // G30 - Single Z Probe, probes bed at current XY location.
80
 // G30 - Single Z Probe, probes bed at current XY location.
81
 // G90 - Use Absolute Coordinates
81
 // G90 - Use Absolute Coordinates
82
 // G91 - Use Relative Coordinates
82
 // G91 - Use Relative Coordinates
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) im mm/sec^2  also sets minimum segment time in ms (B20000) to prevent buffer underruns and M20 minimum feedrate
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
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
139
 // M206 - set additional homeing offset
140
-// M207 - set retract length S[positive mm] F[feedrate mm/sec] Z[additional zlift/hop]
141
-// M208 - set recover=unretract length S[positive mm surplus to the M207 S*] F[feedrate mm/sec]
140
+// M207 - set retract length S[positive mm] F[feedrate mm/min] Z[additional zlift/hop], stays in mm regardless of M200 setting
141
+// M208 - set recover=unretract length S[positive mm surplus to the M207 S*] F[feedrate mm/min]
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.
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
 // M218 - set hotend offset (in mm): T<extruder_number> X<offset_on_X> Y<offset_on_Y>
143
 // M218 - set hotend offset (in mm): T<extruder_number> X<offset_on_X> Y<offset_on_Y>
144
 // M220 S<factor in percent>- set speed factor override percentage
144
 // M220 S<factor in percent>- set speed factor override percentage
231
 #endif
231
 #endif
232
 
232
 
233
 #ifdef FWRETRACT
233
 #ifdef FWRETRACT
234
-  bool autoretract_enabled=true;
234
+  bool autoretract_enabled=false;
235
   bool retracted=false;
235
   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;
236
+  float retract_length = RETRACT_LENGTH;
237
+  float retract_feedrate = RETRACT_FEEDRATE;
238
+  float retract_zlift = RETRACT_ZLIFT;
239
+  float retract_recover_length = RETRACT_RECOVER_LENGTH;
240
+  float retract_recover_feedrate = RETRACT_RECOVER_FEEDRATE;
238
 #endif
241
 #endif
239
 
242
 
240
 #ifdef ULTIPANEL
243
 #ifdef ULTIPANEL
978
     #endif
981
     #endif
979
 }
982
 }
980
 
983
 
984
+/// Probe bed height at position (x,y), returns the measured z value
985
+static float probe_pt(float x, float y, float z_before) {
986
+  // move to right place
987
+  do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], z_before);
988
+  do_blocking_move_to(x - X_PROBE_OFFSET_FROM_EXTRUDER, y - Y_PROBE_OFFSET_FROM_EXTRUDER, current_position[Z_AXIS]);
989
+
990
+  engage_z_probe();   // Engage Z Servo endstop if available
991
+  run_z_probe();
992
+  float measured_z = current_position[Z_AXIS];
993
+  retract_z_probe();
994
+
995
+  SERIAL_PROTOCOLPGM(MSG_BED);
996
+  SERIAL_PROTOCOLPGM(" x: ");
997
+  SERIAL_PROTOCOL(x);
998
+  SERIAL_PROTOCOLPGM(" y: ");
999
+  SERIAL_PROTOCOL(y);
1000
+  SERIAL_PROTOCOLPGM(" z: ");
1001
+  SERIAL_PROTOCOL(measured_z);
1002
+  SERIAL_PROTOCOLPGM("\n");
1003
+  return measured_z;
1004
+}
1005
+
981
 #endif // #ifdef ENABLE_AUTO_BED_LEVELING
1006
 #endif // #ifdef ENABLE_AUTO_BED_LEVELING
982
 
1007
 
983
 static void homeaxis(int axis) {
1008
 static void homeaxis(int axis) {
1058
   }
1083
   }
1059
 }
1084
 }
1060
 #define HOMEAXIS(LETTER) homeaxis(LETTER##_AXIS)
1085
 #define HOMEAXIS(LETTER) homeaxis(LETTER##_AXIS)
1086
+void refresh_cmd_timeout(void)
1087
+{
1088
+  previous_millis_cmd = millis();
1089
+}
1090
+
1091
+#ifdef FWRETRACT
1092
+  void retract(bool retracting) {
1093
+    if(retracting && !retracted) {
1094
+      destination[X_AXIS]=current_position[X_AXIS];
1095
+      destination[Y_AXIS]=current_position[Y_AXIS];
1096
+      destination[Z_AXIS]=current_position[Z_AXIS];
1097
+      destination[E_AXIS]=current_position[E_AXIS];
1098
+      current_position[E_AXIS]+=retract_length/volumetric_multiplier[active_extruder];
1099
+      plan_set_e_position(current_position[E_AXIS]);
1100
+      float oldFeedrate = feedrate;
1101
+      feedrate=retract_feedrate;
1102
+      retracted=true;
1103
+      prepare_move();
1104
+      current_position[Z_AXIS]-=retract_zlift;
1105
+      plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
1106
+      prepare_move();
1107
+      feedrate = oldFeedrate;
1108
+    } else if(!retracting && retracted) {
1109
+      destination[X_AXIS]=current_position[X_AXIS];
1110
+      destination[Y_AXIS]=current_position[Y_AXIS];
1111
+      destination[Z_AXIS]=current_position[Z_AXIS];
1112
+      destination[E_AXIS]=current_position[E_AXIS];
1113
+      current_position[Z_AXIS]+=retract_zlift;
1114
+      plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
1115
+      //prepare_move();
1116
+      current_position[E_AXIS]-=(retract_length+retract_recover_length)/volumetric_multiplier[active_extruder]; 
1117
+      plan_set_e_position(current_position[E_AXIS]);
1118
+      float oldFeedrate = feedrate;
1119
+      feedrate=retract_recover_feedrate;
1120
+      retracted=false;
1121
+      prepare_move();
1122
+      feedrate = oldFeedrate;
1123
+    }
1124
+  } //retract
1125
+#endif //FWRETRACT
1061
 
1126
 
1062
 void process_commands()
1127
 void process_commands()
1063
 {
1128
 {
1074
     case 1: // G1
1139
     case 1: // G1
1075
       if(Stopped == false) {
1140
       if(Stopped == false) {
1076
         get_coordinates(); // For X Y Z E F
1141
         get_coordinates(); // For X Y Z E F
1142
+          #ifdef FWRETRACT
1143
+            if(autoretract_enabled)
1144
+            if( !(code_seen(X_AXIS) || code_seen(Y_AXIS) || code_seen(Z_AXIS)) && code_seen(E_AXIS)) {
1145
+              float echange=destination[E_AXIS]-current_position[E_AXIS];
1146
+              if((echange<-MIN_RETRACT && !retracted) || (echange>MIN_RETRACT && retracted)) { //move appears to be an attempt to attract or recover
1147
+                  current_position[E_AXIS] = destination[E_AXIS]; //hide the slicer-generated retract/recover from calculations
1148
+                  plan_set_e_position(current_position[E_AXIS]); //AND from the planner
1149
+                  retract(!retracted);
1150
+                  return;
1151
+              }
1152
+            }
1153
+          #endif //FWRETRACT
1077
         prepare_move();
1154
         prepare_move();
1078
         //ClearToSend();
1155
         //ClearToSend();
1079
         return;
1156
         return;
1108
       break;
1185
       break;
1109
       #ifdef FWRETRACT
1186
       #ifdef FWRETRACT
1110
       case 10: // G10 retract
1187
       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
-
1188
+        retract(true);
1123
       break;
1189
       break;
1124
       case 11: // G11 retract_recover
1190
       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
-      }
1191
+        retract(false);
1136
       break;
1192
       break;
1137
       #endif //FWRETRACT
1193
       #endif //FWRETRACT
1138
     case 28: //G28 Home all Axis one at a time
1194
     case 28: //G28 Home all Axis one at a time
1185
 
1241
 
1186
 #else // NOT DELTA
1242
 #else // NOT DELTA
1187
 
1243
 
1188
-      home_all_axis = !((code_seen(axis_codes[0])) || (code_seen(axis_codes[1])) || (code_seen(axis_codes[2])));
1244
+      home_all_axis = !((code_seen(axis_codes[X_AXIS])) || (code_seen(axis_codes[Y_AXIS])) || (code_seen(axis_codes[Z_AXIS])));
1189
 
1245
 
1190
       #if Z_HOME_DIR > 0                      // If homing away from BED do Z first
1246
       #if Z_HOME_DIR > 0                      // If homing away from BED do Z first
1191
       if((home_all_axis) || (code_seen(axis_codes[Z_AXIS]))) {
1247
       if((home_all_axis) || (code_seen(axis_codes[Z_AXIS]))) {
1353
             #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."
1409
             #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
             #endif
1410
             #endif
1355
 
1411
 
1412
+            // Prevent user from running a G29 without first homing in X and Y
1413
+            if (! (axis_known_position[X_AXIS] && axis_known_position[Y_AXIS]) )
1414
+            {
1415
+                LCD_MESSAGEPGM(MSG_POSITION_UNKNOWN);
1416
+                SERIAL_ECHO_START;
1417
+                SERIAL_ECHOLNPGM(MSG_POSITION_UNKNOWN);
1418
+                break; // abort G29, since we don't know where we are
1419
+            }
1420
+
1356
             st_synchronize();
1421
             st_synchronize();
1357
             // make sure the bed_level_rotation_matrix is identity or the planner will get it incorectly
1422
             // make sure the bed_level_rotation_matrix is identity or the planner will get it incorectly
1358
             //vector_3 corrected_position = plan_get_position_mm();
1423
             //vector_3 corrected_position = plan_get_position_mm();
1407
 
1472
 
1408
               for (int xCount=0; xCount < ACCURATE_BED_LEVELING_POINTS; xCount++)
1473
               for (int xCount=0; xCount < ACCURATE_BED_LEVELING_POINTS; xCount++)
1409
               {
1474
               {
1475
+                float z_before;
1410
                 if (probePointCounter == 0)
1476
                 if (probePointCounter == 0)
1411
                 {
1477
                 {
1412
                   // raise before probing
1478
                   // raise before probing
1413
-                  do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], Z_RAISE_BEFORE_PROBING);
1479
+                  z_before = Z_RAISE_BEFORE_PROBING;
1414
                 } else
1480
                 } else
1415
                 {
1481
                 {
1416
                   // raise extruder
1482
                   // raise extruder
1417
-                  do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS] + Z_RAISE_BETWEEN_PROBINGS);
1483
+                  z_before = current_position[Z_AXIS] + Z_RAISE_BETWEEN_PROBINGS;
1418
                 }
1484
                 }
1419
 
1485
 
1486
+                float measured_z = probe_pt(xProbe, yProbe, z_before);
1420
 
1487
 
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();
1427
-
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");
1488
+                eqnBVector[probePointCounter] = measured_z;
1435
 
1489
 
1436
                 eqnAMatrix[probePointCounter + 0*ACCURATE_BED_LEVELING_POINTS*ACCURATE_BED_LEVELING_POINTS] = xProbe;
1490
                 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;
1491
                 eqnAMatrix[probePointCounter + 1*ACCURATE_BED_LEVELING_POINTS*ACCURATE_BED_LEVELING_POINTS] = yProbe;
1461
 
1515
 
1462
 
1516
 
1463
             // prob 1
1517
             // 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]);
1466
-
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");
1518
+            float z_at_xLeft_yBack = probe_pt(LEFT_PROBE_BED_POSITION, BACK_PROBE_BED_POSITION, Z_RAISE_BEFORE_PROBING);
1479
 
1519
 
1480
             // prob 2
1520
             // 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]);
1483
-
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");
1521
+            float z_at_xLeft_yFront = probe_pt(LEFT_PROBE_BED_POSITION, FRONT_PROBE_BED_POSITION, current_position[Z_AXIS] + Z_RAISE_BETWEEN_PROBINGS);
1496
 
1522
 
1497
             // prob 3
1523
             // 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");
1524
+            float z_at_xRight_yFront = probe_pt(RIGHT_PROBE_BED_POSITION, FRONT_PROBE_BED_POSITION, current_position[Z_AXIS] + Z_RAISE_BETWEEN_PROBINGS);
1514
 
1525
 
1515
             clean_up_after_endstop_move();
1526
             clean_up_after_endstop_move();
1516
 
1527
 
1545
             feedrate = homing_feedrate[Z_AXIS];
1556
             feedrate = homing_feedrate[Z_AXIS];
1546
 
1557
 
1547
             run_z_probe();
1558
             run_z_probe();
1548
-            SERIAL_PROTOCOLPGM("Bed Position X: ");
1559
+            SERIAL_PROTOCOLPGM(MSG_BED);
1560
+            SERIAL_PROTOCOLPGM(" X: ");
1549
             SERIAL_PROTOCOL(current_position[X_AXIS]);
1561
             SERIAL_PROTOCOL(current_position[X_AXIS]);
1550
             SERIAL_PROTOCOLPGM(" Y: ");
1562
             SERIAL_PROTOCOLPGM(" Y: ");
1551
             SERIAL_PROTOCOL(current_position[Y_AXIS]);
1563
             SERIAL_PROTOCOL(current_position[Y_AXIS]);
2085
       }
2097
       }
2086
       else
2098
       else
2087
       {
2099
       {
2088
-        bool all_axis = !((code_seen(axis_codes[0])) || (code_seen(axis_codes[1])) || (code_seen(axis_codes[2]))|| (code_seen(axis_codes[3])));
2100
+        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
         if(all_axis)
2101
         if(all_axis)
2090
         {
2102
         {
2091
           st_synchronize();
2103
           st_synchronize();
2147
     case 114: // M114
2159
     case 114: // M114
2148
       SERIAL_PROTOCOLPGM("X:");
2160
       SERIAL_PROTOCOLPGM("X:");
2149
       SERIAL_PROTOCOL(current_position[X_AXIS]);
2161
       SERIAL_PROTOCOL(current_position[X_AXIS]);
2150
-      SERIAL_PROTOCOLPGM("Y:");
2162
+      SERIAL_PROTOCOLPGM(" Y:");
2151
       SERIAL_PROTOCOL(current_position[Y_AXIS]);
2163
       SERIAL_PROTOCOL(current_position[Y_AXIS]);
2152
-      SERIAL_PROTOCOLPGM("Z:");
2164
+      SERIAL_PROTOCOLPGM(" Z:");
2153
       SERIAL_PROTOCOL(current_position[Z_AXIS]);
2165
       SERIAL_PROTOCOL(current_position[Z_AXIS]);
2154
-      SERIAL_PROTOCOLPGM("E:");
2166
+      SERIAL_PROTOCOLPGM(" E:");
2155
       SERIAL_PROTOCOL(current_position[E_AXIS]);
2167
       SERIAL_PROTOCOL(current_position[E_AXIS]);
2156
 
2168
 
2157
       SERIAL_PROTOCOLPGM(MSG_COUNT_X);
2169
       SERIAL_PROTOCOLPGM(MSG_COUNT_X);
2158
       SERIAL_PROTOCOL(float(st_get_position(X_AXIS))/axis_steps_per_unit[X_AXIS]);
2170
       SERIAL_PROTOCOL(float(st_get_position(X_AXIS))/axis_steps_per_unit[X_AXIS]);
2159
-      SERIAL_PROTOCOLPGM("Y:");
2171
+      SERIAL_PROTOCOLPGM(" Y:");
2160
       SERIAL_PROTOCOL(float(st_get_position(Y_AXIS))/axis_steps_per_unit[Y_AXIS]);
2172
       SERIAL_PROTOCOL(float(st_get_position(Y_AXIS))/axis_steps_per_unit[Y_AXIS]);
2161
-      SERIAL_PROTOCOLPGM("Z:");
2173
+      SERIAL_PROTOCOLPGM(" Z:");
2162
       SERIAL_PROTOCOL(float(st_get_position(Z_AXIS))/axis_steps_per_unit[Z_AXIS]);
2174
       SERIAL_PROTOCOL(float(st_get_position(Z_AXIS))/axis_steps_per_unit[Z_AXIS]);
2163
 
2175
 
2164
       SERIAL_PROTOCOLLN("");
2176
       SERIAL_PROTOCOLLN("");
3041
     next_feedrate = code_value();
3053
     next_feedrate = code_value();
3042
     if(next_feedrate > 0.0) feedrate = next_feedrate;
3054
     if(next_feedrate > 0.0) feedrate = next_feedrate;
3043
   }
3055
   }
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
 }
3056
 }
3081
 
3057
 
3082
 void get_arc_coordinates()
3058
 void get_arc_coordinates()

+ 3
- 3
Marlin/cardreader.cpp View File

22
    file_subcall_ctr=0;
22
    file_subcall_ctr=0;
23
    memset(workDirParents, 0, sizeof(workDirParents));
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
    lastnr=0;
26
    lastnr=0;
27
   //power to SD reader
27
   //power to SD reader
28
   #if SDPOWER > -1
28
   #if SDPOWER > -1
245
 {
245
 {
246
   if(!cardOK)
246
   if(!cardOK)
247
     return;
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
     if(!replace_current)
250
     if(!replace_current)
251
     {
251
     {
544
   
544
   
545
   if(store_location)
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
     // so one can unplug the printer and continue printing the next day.
548
     // so one can unplug the printer and continue printing the next day.
549
     
549
     
550
   }
550
   }

+ 491
- 287
Marlin/language.h
File diff suppressed because it is too large
View File


+ 1
- 1
Marlin/pins.h View File

1381
 #define SDSS               53
1381
 #define SDSS               53
1382
 #define LED_PIN            8
1382
 #define LED_PIN            8
1383
 #define FAN_PIN            7
1383
 #define FAN_PIN            7
1384
-#define PS_ON_PIN          12
1384
+#define PS_ON_PIN          -1
1385
 #define KILL_PIN           -1
1385
 #define KILL_PIN           -1
1386
 #define SUICIDE_PIN        -1  //PIN that has to be turned on right after start, to keep power flowing.
1386
 #define SUICIDE_PIN        -1  //PIN that has to be turned on right after start, to keep power flowing.
1387
 #define SAFETY_TRIGGERED_PIN     28 //PIN to detect the safety circuit has triggered
1387
 #define SAFETY_TRIGGERED_PIN     28 //PIN to detect the safety circuit has triggered

+ 64
- 0
Marlin/thermistortables.h View File

857
 };
857
 };
858
 #endif
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
 #define _TT_NAME(_N) temptable_ ## _N
925
 #define _TT_NAME(_N) temptable_ ## _N
862
 #define TT_NAME(_N) _TT_NAME(_N)
926
 #define TT_NAME(_N) _TT_NAME(_N)

+ 7
- 2
Marlin/ultralcd.cpp View File

460
 {
460
 {
461
     if (encoderPosition != 0)
461
     if (encoderPosition != 0)
462
     {
462
     {
463
+        refresh_cmd_timeout();
463
         current_position[X_AXIS] += float((int)encoderPosition) * move_menu_scale;
464
         current_position[X_AXIS] += float((int)encoderPosition) * move_menu_scale;
464
         if (min_software_endstops && current_position[X_AXIS] < X_MIN_POS)
465
         if (min_software_endstops && current_position[X_AXIS] < X_MIN_POS)
465
             current_position[X_AXIS] = X_MIN_POS;
466
             current_position[X_AXIS] = X_MIN_POS;
489
 {
490
 {
490
     if (encoderPosition != 0)
491
     if (encoderPosition != 0)
491
     {
492
     {
493
+        refresh_cmd_timeout();
492
         current_position[Y_AXIS] += float((int)encoderPosition) * move_menu_scale;
494
         current_position[Y_AXIS] += float((int)encoderPosition) * move_menu_scale;
493
         if (min_software_endstops && current_position[Y_AXIS] < Y_MIN_POS)
495
         if (min_software_endstops && current_position[Y_AXIS] < Y_MIN_POS)
494
             current_position[Y_AXIS] = Y_MIN_POS;
496
             current_position[Y_AXIS] = Y_MIN_POS;
518
 {
520
 {
519
     if (encoderPosition != 0)
521
     if (encoderPosition != 0)
520
     {
522
     {
523
+        refresh_cmd_timeout();
521
         current_position[Z_AXIS] += float((int)encoderPosition) * move_menu_scale;
524
         current_position[Z_AXIS] += float((int)encoderPosition) * move_menu_scale;
522
         if (min_software_endstops && current_position[Z_AXIS] < Z_MIN_POS)
525
         if (min_software_endstops && current_position[Z_AXIS] < Z_MIN_POS)
523
             current_position[Z_AXIS] = Z_MIN_POS;
526
             current_position[Z_AXIS] = Z_MIN_POS;
705
 static void lcd_control_motion_menu()
708
 static void lcd_control_motion_menu()
706
 {
709
 {
707
     START_MENU();
710
     START_MENU();
708
-    MENU_ITEM(back, MSG_CONTROL, lcd_control_menu);
709
-    MENU_ITEM_EDIT(float32, MSG_ZPROBE_ZOFFSET, &zprobe_zoffset, 0.5, 50);
711
+    MENU_ITEM(back, MSG_CONTROL, lcd_control_menu);
712
+#ifdef ENABLE_AUTO_BED_LEVELING
713
+    MENU_ITEM_EDIT(float32, MSG_ZPROBE_ZOFFSET, &zprobe_zoffset, 0.5, 50);
714
+#endif
710
     MENU_ITEM_EDIT(float5, MSG_ACC, &acceleration, 500, 99000);
715
     MENU_ITEM_EDIT(float5, MSG_ACC, &acceleration, 500, 99000);
711
     MENU_ITEM_EDIT(float3, MSG_VXY_JERK, &max_xy_jerk, 1, 990);
716
     MENU_ITEM_EDIT(float3, MSG_VXY_JERK, &max_xy_jerk, 1, 990);
712
     MENU_ITEM_EDIT(float52, MSG_VZ_JERK, &max_z_jerk, 0.1, 990);
717
     MENU_ITEM_EDIT(float52, MSG_VZ_JERK, &max_z_jerk, 0.1, 990);

+ 11
- 1
Marlin/ultralcd_implementation_hitachi_HD44780.h View File

718
 	#endif
718
 	#endif
719
 #elif defined(BEEPER) && BEEPER > -1
719
 #elif defined(BEEPER) && BEEPER > -1
720
     SET_OUTPUT(BEEPER);
720
     SET_OUTPUT(BEEPER);
721
+	#if !defined(LCD_FEEDBACK_FREQUENCY_HZ) || !defined(LCD_FEEDBACK_FREQUENCY_DURATION_MS)
721
     for(int8_t i=0;i<10;i++)
722
     for(int8_t i=0;i<10;i++)
722
     {
723
     {
723
       WRITE(BEEPER,HIGH);
724
       WRITE(BEEPER,HIGH);
724
       delayMicroseconds(100);
725
       delayMicroseconds(100);
725
       WRITE(BEEPER,LOW);
726
       WRITE(BEEPER,LOW);
726
       delayMicroseconds(100);
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
 #endif
738
 #endif
729
 }
739
 }
730
 
740
 

+ 4
- 4
Marlin/ultralcd_st7920_u8glib_rrd.h View File

12
 #define ST7920_DAT_PIN  LCD_PINS_ENABLE
12
 #define ST7920_DAT_PIN  LCD_PINS_ENABLE
13
 #define ST7920_CS_PIN   LCD_PINS_RS
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
 #define PAGE_HEIGHT 32  //512 byte framebuffer
17
 #define PAGE_HEIGHT 32  //512 byte framebuffer
18
 
18
 
19
 #define WIDTH 128
19
 #define WIDTH 128
59
         ST7920_SET_CMD();
59
         ST7920_SET_CMD();
60
         ST7920_WRITE_BYTE(0x08);       //display off, cursor+blink off
60
         ST7920_WRITE_BYTE(0x08);       //display off, cursor+blink off
61
         ST7920_WRITE_BYTE(0x01);       //clear CGRAM ram
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
         for(y=0;y<HEIGHT/2;y++)        //clear GDRAM
64
         for(y=0;y<HEIGHT/2;y++)        //clear GDRAM
65
         {
65
         {
66
           ST7920_WRITE_BYTE(0x80|y);   //set y
66
           ST7920_WRITE_BYTE(0x80|y);   //set y

+ 3
- 13
Marlin/vector_3.cpp View File

22
 #ifdef ENABLE_AUTO_BED_LEVELING
22
 #ifdef ENABLE_AUTO_BED_LEVELING
23
 #include "vector_3.h"
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
 vector_3 vector_3::cross(vector_3 left, vector_3 right)
29
 vector_3 vector_3::cross(vector_3 left, vector_3 right)
40
 {
30
 {
62
 
52
 
63
 float vector_3::get_length() 
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
 	return length;
56
 	return length;
67
 }
57
 }
68
  
58
  

+ 2
- 2
Marlin/watchdog.h View File

4
 #include "Marlin.h"
4
 #include "Marlin.h"
5
 
5
 
6
 #ifdef USE_WATCHDOG
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
   void watchdog_init();
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
   void watchdog_reset();
10
   void watchdog_reset();
11
 #else
11
 #else
12
   //If we do not have a watchdog, then we can have empty functions which are optimized away.
12
   //If we do not have a watchdog, then we can have empty functions which are optimized away.

Loading…
Cancel
Save