Browse Source

Merge remote-tracking branch 'Marlin8bit/Development' into serial_wait

Wurstnase 10 years ago
parent
commit
182e0d99c9
64 changed files with 3889 additions and 1231 deletions
  1. 17
    0
      Documentation/GCodes.md
  2. 206
    0
      Documentation/Hardware.md
  3. 5
    4
      Documentation/LCDLanguageFont.md
  4. 42
    46
      Marlin/Configuration.h
  5. 4
    2
      Marlin/Configuration_adv.h
  6. 2
    2
      Marlin/Makefile
  7. 12
    0
      Marlin/Marlin.h
  8. 386
    155
      Marlin/Marlin_main.cpp
  9. 2
    2
      Marlin/SanityCheck.h
  10. 2
    2
      Marlin/blinkm.cpp
  11. 1
    1
      Marlin/blinkm.h
  12. 224
    153
      Marlin/configuration_store.cpp
  13. 3
    3
      Marlin/configuration_store.h
  14. 36
    40
      Marlin/configurator/config/Configuration.h
  15. 4
    2
      Marlin/configurator/config/Configuration_adv.h
  16. 15
    10
      Marlin/configurator/config/language.h
  17. 0
    0
      Marlin/dogm_bitmaps.h
  18. 270
    0
      Marlin/dogm_font_data_ISO10646_CN.h
  19. 31
    11
      Marlin/dogm_lcd_implementation.h
  20. 38
    42
      Marlin/example_configurations/Felix/Configuration.h
  21. 37
    41
      Marlin/example_configurations/Felix/Configuration_DUAL.h
  22. 4
    2
      Marlin/example_configurations/Felix/Configuration_adv.h
  23. 38
    42
      Marlin/example_configurations/Hephestos/Configuration.h
  24. 4
    2
      Marlin/example_configurations/Hephestos/Configuration_adv.h
  25. 42
    41
      Marlin/example_configurations/K8200/Configuration.h
  26. 4
    2
      Marlin/example_configurations/K8200/Configuration_adv.h
  27. 7
    7
      Marlin/example_configurations/K8200/readme.md
  28. 38
    42
      Marlin/example_configurations/SCARA/Configuration.h
  29. 4
    2
      Marlin/example_configurations/SCARA/Configuration_adv.h
  30. 38
    42
      Marlin/example_configurations/WITBOX/Configuration.h
  31. 4
    2
      Marlin/example_configurations/WITBOX/Configuration_adv.h
  32. 816
    0
      Marlin/example_configurations/delta/biv2.5/Configuration.h
  33. 552
    0
      Marlin/example_configurations/delta/biv2.5/Configuration_adv.h
  34. 38
    42
      Marlin/example_configurations/delta/generic/Configuration.h
  35. 4
    2
      Marlin/example_configurations/delta/generic/Configuration_adv.h
  36. 38
    42
      Marlin/example_configurations/delta/kossel_mini/Configuration.h
  37. 4
    2
      Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h
  38. 37
    42
      Marlin/example_configurations/makibox/Configuration.h
  39. 4
    2
      Marlin/example_configurations/makibox/Configuration_adv.h
  40. 37
    41
      Marlin/example_configurations/tvrrug/Round2/Configuration.h
  41. 4
    2
      Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h
  42. BIN
      Marlin/fonts/ISO10646_CN.fon
  43. 21
    1
      Marlin/fonts/README.fonts
  44. 1
    0
      Marlin/fonts/make_fonts.bat
  45. 14
    9
      Marlin/language.h
  46. 159
    0
      Marlin/language_cn.h
  47. 7
    7
      Marlin/language_de.h
  48. 1
    1
      Marlin/language_en.h
  49. 2
    0
      Marlin/pins.h
  50. 1
    3
      Marlin/pins_AZTEEG_X3.h
  51. 63
    0
      Marlin/pins_BRAINWAVE_PRO.h
  52. 1
    1
      Marlin/pins_SAV_MKI.h
  53. 73
    74
      Marlin/planner.cpp
  54. 9
    5
      Marlin/planner.h
  55. 2
    2
      Marlin/servo.cpp
  56. 3
    3
      Marlin/servo.h
  57. 92
    60
      Marlin/stepper.cpp
  58. 7
    2
      Marlin/temperature.cpp
  59. 358
    170
      Marlin/ultralcd.cpp
  60. 5
    3
      Marlin/ultralcd.h
  61. 5
    4
      Marlin/ultralcd_implementation_hitachi_HD44780.h
  62. 7
    7
      Marlin/ultralcd_st7920_u8glib_rrd.h
  63. 3
    3
      Marlin/watchdog.cpp
  64. 1
    1
      README.md

+ 17
- 0
Documentation/GCodes.md View File

1
 ## Implemented G Codes
1
 ## Implemented G Codes
2
 
2
 
3
+- [Movement F and M Codes](#movement-g-and-m-codes)
4
+- [SD Card M Codes](#sd-card-m-codes)
5
+- [Hardware Control](#hardware-control)
6
+- [Temperature M Codes](#temperature-m-codes)
7
+- [Message M Codes](#message-m-codes)
8
+- [Endstops M Codes](#endstops-m-codes)
9
+- [Special Features M Codes](#special-features-m-codes)
10
+- [Units and Measures G and M Codes](#units-and-measures-g-and-m-codes)
11
+- [Firmware Retraction G and M Codes](#firmware-retraction-g-and-m-codes)
12
+- [Z Probe G and M Codes](#z-probe-g-and-m-codes)
13
+- [Filament Diameter M Codes](#filament-diameter-m-codes)
14
+- [EEPROM Settings M Codes](#eeprom-settings-m-codes)
15
+- [Delta M Codes](#delta-m-codes)
16
+- [Stepper Driver M Codes](#stepper-driver-m-codes)
17
+- [SCARA M Codes](#scara-m-codes)
18
+- [GCode Comments](#comments)
19
+
3
 ### Movement G and M Codes
20
 ### Movement G and M Codes
4
 ```
21
 ```
5
 G0   -> G1
22
 G0   -> G1

+ 206
- 0
Documentation/Hardware.md View File

1
+## Marlin Supported Hardware
2
+
3
+- [Gen 7 Custom](#10-board_gen7_custom)
4
+- [Gen 7 <=1.2](#11-board_gen7_12)
5
+- [Gen 7 v1.3](#12-board_gen7_13)
6
+- [Gen 7 v1.4](#13-board_gen7_14)
7
+- [Cheaptronic v1.0](#2-board_cheaptronic)
8
+- [Sethi 3D_1](#20-board_sethi)
9
+- [RAMPS <=1.2](#3-board_ramps_old)
10
+- [RAMPS 1.3 Extruder-Fan-Bed](#33-board_ramps_13_efb)
11
+- [RAMPS 1.3 Extruder-Extruder-Bed](#34-board_ramps_13_eeb)
12
+- [RAMPS 1.3 Extruder-Fan-Fan](#35-board_ramps_13_eff)
13
+- [RAMPS 1.3 Extruder-Extruder-Fan](#36-board_ramps_13_eef)
14
+- [Felix 2](#37-board_felix2)
15
+- [Duemilanove 328P](#4-board_duemilanove_328p)
16
+- [Gen 6](#5-board_gen6)
17
+- [Gen 6 Deluxe](#51-board_gen6_deluxe)
18
+- [Sanguinololu <=1.1](#6-board_sanguinololu_11)
19
+- [Sanguinololu 1.2](#62-board_sanguinololu_12)
20
+- [Melzi](#63-board_melzi)
21
+- [STB v1.1](#64-board_stb_11)
22
+- [Azteeg X1](#65-board_azteeg_x1)
23
+- [Melzi 1284](#66-board_melzi_1284)
24
+- [Azteeg X3](#67-board_azteeg_x3)
25
+- [Azteeg X3 Pro](#68-board_azteeg_x3_pro)
26
+- [Ultimaker](#7-board_ultimaker)
27
+- [Legacy Ultimaker](#71-board_ultimaker_old)
28
+- [Ultimainboard 2.x](#72-board_ultimain_2)
29
+- [3DRAG](#77-board_3drag)
30
+- [Vellemann K8200](#78-board_k8200)
31
+- [Teensylu](#8-board_teensylu)
32
+- [Rumba](#80-board_rumba)
33
+- [Printrboard](#81-board_printrboard)
34
+- [Brainwave](#82-board_brainwave)
35
+- [SAV Mk-I](#83-board_sav_mki)
36
+- [Teensy++2.0](#84-board_teensy2)
37
+- [Brainwave Pro](#85-board_brainwave_pro)
38
+- [Gen3+](#9-board_gen3_plus)
39
+- [Gen3 Monolithic](#22-board_gen3_monolithic)
40
+- [Megatronics](#70-board_megatronics)
41
+- [Megatronics 2.0](#701-board_megatronics_2)
42
+- [Minitronics 1.0](#702-board_megatronics_1)
43
+- [Megatronics 3.0](#703-board_megatronics_3)
44
+- [OMCA Alpha](#90-board_omca_a)
45
+- [OMCA Final](#91-board_omca)
46
+- [RAMBo](#301-board_rambo)
47
+- [Elefu Ra](#21-board_elefu_3)
48
+- [5DPrint D8](#88-board_5dprint)
49
+- [Leapfrog](#999-board_leapfrog)
50
+- [bq Witbox](#41-board_witbox)
51
+- [bq Prusa i3 Hephestos](#42-board_hephestos)
52
+- [2PrintBeta BAM&DICE](#401-board_bam_dice)
53
+- [2PrintBeta BAM&DICE DUE](#402-board_bam_dice_due)
54
+
55
+#### 10 BOARD_GEN7_CUSTOM
56
+Gen7 custom (Alfons3 Version) "https://github.com/Alfons3/Generation_7_Electronics"
57
+
58
+#### 11 BOARD_GEN7_12
59
+Gen7 v1.1, v1.2
60
+
61
+#### 12 BOARD_GEN7_13
62
+Gen7 v1.3
63
+
64
+#### 13 BOARD_GEN7_14
65
+Gen7 v1.4
66
+
67
+#### 2 BOARD_CHEAPTRONIC
68
+Cheaptronic v1.0
69
+
70
+#### 20 BOARD_SETHI
71
+Sethi 3D_1
72
+
73
+#### 3 BOARD_RAMPS_OLD
74
+MEGA/RAMPS up to 1.2
75
+
76
+#### 33 BOARD_RAMPS_13_EFB
77
+RAMPS 1.3 / 1.4 (Power outputs: Extruder, Fan, Bed)
78
+
79
+#### 34 BOARD_RAMPS_13_EEB
80
+RAMPS 1.3 / 1.4 (Power outputs: Extruder0, Extruder1, Bed)
81
+
82
+#### 35 BOARD_RAMPS_13_EFF
83
+RAMPS 1.3 / 1.4 (Power outputs: Extruder, Fan, Fan)
84
+
85
+#### 36 BOARD_RAMPS_13_EEF
86
+RAMPS 1.3 / 1.4 (Power outputs: Extruder0, Extruder1, Fan)
87
+
88
+#### 37 BOARD_FELIX2
89
+Felix 2.0+ Electronics Board (RAMPS like)
90
+
91
+#### 4 BOARD_DUEMILANOVE_328P
92
+Duemilanove w/ ATMega328P pin assignments
93
+
94
+#### 5 BOARD_GEN6
95
+Gen6
96
+
97
+#### 51 BOARD_GEN6_DELUXE
98
+Gen6 deluxe
99
+
100
+#### 6 BOARD_SANGUINOLOLU_11
101
+Sanguinololu < 1.2
102
+
103
+#### 62 BOARD_SANGUINOLOLU_12
104
+Sanguinololu 1.2 and above
105
+
106
+#### 63 BOARD_MELZI
107
+Melzi
108
+
109
+#### 64 BOARD_STB_11
110
+STB V1.1
111
+
112
+#### 65 BOARD_AZTEEG_X1
113
+Azteeg X1
114
+
115
+#### 66 BOARD_MELZI_1284
116
+Melzi with ATmega1284 (MaKr3d version)
117
+
118
+#### 67 BOARD_AZTEEG_X3
119
+Azteeg X3
120
+
121
+#### 68 BOARD_AZTEEG_X3_PRO
122
+Azteeg X3 Pro
123
+
124
+#### 7 BOARD_ULTIMAKER
125
+Ultimaker
126
+
127
+#### 71 BOARD_ULTIMAKER_OLD
128
+Ultimaker (Older electronics. Pre 1.5.4. This is rare)
129
+
130
+#### 72 BOARD_ULTIMAIN_2
131
+Ultimainboard 2.x (Uses TEMP_SENSOR 20)
132
+
133
+#### 77 BOARD_3DRAG
134
+3Drag Controller
135
+
136
+#### 78 BOARD_K8200
137
+Vellemann K8200 Controller (derived from 3Drag Controller)
138
+
139
+#### 8 BOARD_TEENSYLU
140
+Teensylu
141
+
142
+#### 80 BOARD_RUMBA
143
+Rumba
144
+
145
+#### 81 BOARD_PRINTRBOARD
146
+Printrboard (AT90USB1286)
147
+
148
+#### 82 BOARD_BRAINWAVE
149
+Brainwave (AT90USB646)
150
+
151
+#### 83 BOARD_SAV_MKI
152
+SAV Mk-I (AT90USB1286)
153
+
154
+#### 84 BOARD_TEENSY2
155
+Teensy++2.0 (AT90USB1286) - CLI compile: DEFINES=AT90USBxx_TEENSYPP_ASSIGNMENTS HARDWARE_MOTHERBOARD=84  make
156
+
157
+#### 85 BOARD_BRAINWAVE_PRO
158
+Brainwave Pro (AT90USB1286)
159
+
160
+#### 9 BOARD_GEN3_PLUS
161
+Gen3+
162
+
163
+#### 22 BOARD_GEN3_MONOLITHIC
164
+Gen3 Monolithic Electronics
165
+
166
+#### 70 BOARD_MEGATRONICS
167
+Megatronics
168
+
169
+#### 701 BOARD_MEGATRONICS_2
170
+Megatronics v2.0
171
+
172
+#### 702 BOARD_MEGATRONICS_1
173
+Minitronics v1.0
174
+
175
+#### 703 BOARD_MEGATRONICS_3
176
+Megatronics v3.0
177
+
178
+#### 90 BOARD_OMCA_A
179
+Alpha OMCA board
180
+
181
+#### 91 BOARD_OMCA
182
+Final OMCA board
183
+
184
+#### 301 BOARD_RAMBO
185
+Rambo
186
+
187
+#### 21 BOARD_ELEFU_3
188
+Elefu Ra Board (v3)
189
+
190
+#### 88 BOARD_5DPRINT
191
+5DPrint D8 Driver Board
192
+
193
+#### 999 BOARD_LEAPFROG
194
+Leapfrog
195
+
196
+#### 41 BOARD_WITBOX
197
+bq WITBOX
198
+
199
+#### 42 BOARD_HEPHESTOS
200
+bq Prusa i3 Hephestos
201
+
202
+#### 401 BOARD_BAM_DICE
203
+2PrintBeta BAM&DICE with STK drivers
204
+
205
+#### 402 BOARD_BAM_DICE_DUE
206
+2PrintBeta BAM&DICE Due with STK drivers

+ 5
- 4
Documentation/LCDLanguageFont.md View File

46
   * nl    Dutch
46
   * nl    Dutch
47
   * ca    Catalan
47
   * ca    Catalan
48
   * eu    Basque-Euskera
48
   * eu    Basque-Euskera
49
+  * cn    Chinese
50
+  * jp    Japanese (Katakana)
49
 
51
 
50
-  and recently on [Thingiverse](http://www.thingiverse.com/) a new port to
51
-  * jp    [Japanese](http://www.thingiverse.com/thing:664397)
52
-
53
- appeared.
54
 
52
 
55
 ## The Problem
53
 ## The Problem
56
   All of this languages, except the English, normally use extended symbol sets, not contained in US-ASCII.
54
   All of this languages, except the English, normally use extended symbol sets, not contained in US-ASCII.
132
 
130
 
133
   You'll find all translatable strings in 'language_en.h'. Please don't translate any strings from 'language.h', this may break the serial protocol.
131
   You'll find all translatable strings in 'language_en.h'. Please don't translate any strings from 'language.h', this may break the serial protocol.
134
 
132
 
133
+  For information about fonts see: Marlin\fonts\README.fonts
134
+
135
+
135
 ## User Instructions
136
 ## User Instructions
136
    Define your hardware and the wanted language in 'Configuration.h'.
137
    Define your hardware and the wanted language in 'Configuration.h'.
137
    To find out what charset your hardware is, define language 'test' and compile. In the menu you will see two lines from the upper half of the charset.
138
    To find out what charset your hardware is, define language 'test' and compile. In the menu you will see two lines from the upper half of the charset.

+ 42
- 46
Marlin/Configuration.h View File

41
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
41
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
42
 // build by the user have been successfully uploaded into firmware.
42
 // build by the user have been successfully uploaded into firmware.
43
 #define STRING_VERSION "1.0.3 dev"
43
 #define STRING_VERSION "1.0.3 dev"
44
-#define STRING_URL "reprap.org"
45
 #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
44
 #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
46
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
45
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
47
 #define STRING_SPLASH_LINE1 "v" STRING_VERSION // will be shown during bootup in line 1
46
 #define STRING_SPLASH_LINE1 "v" STRING_VERSION // will be shown during bootup in line 1
271
 #define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
270
 #define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
272
 
271
 
273
 //===========================================================================
272
 //===========================================================================
274
-//============================= Thermal Runaway Protection ==================
273
+//======================== Thermal Runaway Protection =======================
275
 //===========================================================================
274
 //===========================================================================
276
-/*
277
-This is a feature to protect your printer from burn up in flames if it has
278
-a thermistor coming off place (this happened to a friend of mine recently and
279
-motivated me writing this feature).
280
-
281
-The issue: If a thermistor come off, it will read a lower temperature than actual.
282
-The system will turn the heater on forever, burning up the filament and anything
283
-else around.
284
-
285
-After the temperature reaches the target for the first time, this feature will
286
-start measuring for how long the current temperature stays below the target
287
-minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS).
288
-
289
-If it stays longer than _PERIOD, it means the thermistor temperature
290
-cannot catch up with the target, so something *may be* wrong. Then, to be on the
291
-safe side, the system will he halt.
292
 
275
 
293
-Bear in mind the count down will just start AFTER the first time the
294
-thermistor temperature is over the target, so you will have no problem if
295
-your extruder heater takes 2 minutes to hit the target on heating.
296
-
297
-*/
298
-// If you want to enable this feature for all your extruder heaters,
299
-// uncomment the 2 defines below:
276
+/**
277
+ * Thermal Runaway Protection protects your printer from damage and fire if a
278
+ * thermistor falls out or temperature sensors fail in any way.
279
+ *
280
+ * The issue: If a thermistor falls out or a temperature sensor fails,
281
+ * Marlin can no longer sense the actual temperature. Since a disconnected
282
+ * thermistor reads as a low temperature, the firmware will keep the heater on.
283
+ *
284
+ * The solution: Once the temperature reaches the target, start observing.
285
+ * If the temperature stays too far below the target (hysteresis) for too long,
286
+ * the firmware will halt as a safety precaution.
287
+ *
288
+ * Note that because the countdown starts only AFTER the temperature reaches
289
+ * the target, this will not catch a thermistor that is already disconnected
290
+ * when the print starts!
291
+ *
292
+ * To enable for all extruder heaters, uncomment the two defines below:
293
+ */
300
 
294
 
301
 // Parameters for all extruder heaters
295
 // Parameters for all extruder heaters
302
-//#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds
303
-//#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius
296
+#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 // in seconds
297
+#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius
304
 
298
 
305
-// If you want to enable this feature for your bed heater,
306
-// uncomment the 2 defines below:
299
+// To enable for the bed heater, uncomment the two defines below:
307
 
300
 
308
 // Parameters for the bed heater
301
 // Parameters for the bed heater
309
-//#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds
310
-//#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius
302
+#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 // in seconds
303
+#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius
311
 
304
 
312
 
305
 
313
 //===========================================================================
306
 //===========================================================================
364
 #define E_ENABLE_ON 0 // For all extruders
357
 #define E_ENABLE_ON 0 // For all extruders
365
 
358
 
366
 // Disables axis when it's not being used.
359
 // Disables axis when it's not being used.
360
+// WARNING: When motors turn off there is a chance of losing position accuracy!
367
 #define DISABLE_X false
361
 #define DISABLE_X false
368
 #define DISABLE_Y false
362
 #define DISABLE_Y false
369
 #define DISABLE_Z false
363
 #define DISABLE_Z false
411
 #define Z_MAX_POS 200
405
 #define Z_MAX_POS 200
412
 
406
 
413
 //===========================================================================
407
 //===========================================================================
414
-//============================= Filament Runout Sensor ======================
408
+//========================= Filament Runout Sensor ==========================
415
 //===========================================================================
409
 //===========================================================================
416
 //#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament
410
 //#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament
417
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
411
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
418
                                  // It is assumed that when logic high = filament available
412
                                  // It is assumed that when logic high = filament available
419
                                  //                    when logic  low = filament ran out
413
                                  //                    when logic  low = filament ran out
420
-//const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
421
-//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
414
+#ifdef FILAMENT_RUNOUT_SENSOR
415
+  const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
416
+  #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
417
+  #define FILAMENT_RUNOUT_SCRIPT "M600"
418
+#endif 
422
 
419
 
423
 //===========================================================================
420
 //===========================================================================
424
-//============================ Mesh Bed Leveling ============================
421
+//=========================== Manual Bed Leveling ===========================
425
 //===========================================================================
422
 //===========================================================================
426
 
423
 
427
 // #define MANUAL_BED_LEVELING  // Add display menu option for bed leveling
424
 // #define MANUAL_BED_LEVELING  // Add display menu option for bed leveling
442
 #endif  // MESH_BED_LEVELING
439
 #endif  // MESH_BED_LEVELING
443
 
440
 
444
 //===========================================================================
441
 //===========================================================================
445
-//============================= Bed Auto Leveling ===========================
442
+//============================ Bed Auto Leveling ============================
446
 //===========================================================================
443
 //===========================================================================
447
 
444
 
448
 // @section bedlevel
445
 // @section bedlevel
641
 // @section lcd
638
 // @section lcd
642
 
639
 
643
 // Define your display language below. Replace (en) with your language code and uncomment.
640
 // Define your display language below. Replace (en) with your language code and uncomment.
644
-// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
641
+// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, cn, test
645
 // See also language.h
642
 // See also language.h
646
 #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
643
 #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
647
 
644
 
661
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
658
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
662
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
659
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
663
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
660
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
664
-//#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
665
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
661
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
666
-                                               // 0 to disable buzzer feedback  
667
-
662
+//#define LCD_FEEDBACK_FREQUENCY_HZ 1000         // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
663
+                                                 // 0 to disable buzzer feedback. Test with M300 S<frequency Hz> P<duration ms>
668
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
664
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
669
 // http://reprap.org/wiki/PanelOne
665
 // http://reprap.org/wiki/PanelOne
670
 //#define PANEL_ONE
666
 //#define PANEL_ONE
792
 // Uncomment below to enable
788
 // Uncomment below to enable
793
 //#define FILAMENT_SENSOR
789
 //#define FILAMENT_SENSOR
794
 
790
 
795
-#define FILAMENT_SENSOR_EXTRUDER_NUM	0  //The number of the extruder that has the filament sensor (0,1,2)
796
-#define MEASUREMENT_DELAY_CM			14  //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
791
+#define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
792
+#define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
797
 
793
 
798
-#define DEFAULT_NOMINAL_FILAMENT_DIA  3.0  //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software.  Used for sensor reading validation
799
-#define MEASURED_UPPER_LIMIT          3.30  //upper limit factor used for sensor reading validation in mm
800
-#define MEASURED_LOWER_LIMIT          1.90  //lower limit factor for sensor reading validation in mm
801
-#define MAX_MEASUREMENT_DELAY			20  //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM  and lower number saves RAM)
794
+#define DEFAULT_NOMINAL_FILAMENT_DIA 3.0 //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software.  Used for sensor reading validation
795
+#define MEASURED_UPPER_LIMIT         3.3 //upper limit factor used for sensor reading validation in mm
796
+#define MEASURED_LOWER_LIMIT         1.9 //lower limit factor for sensor reading validation in mm
797
+#define MAX_MEASUREMENT_DELAY       20   //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM  and lower number saves RAM)
802
 
798
 
803
 //defines used in the code
799
 //defines used in the code
804
 #define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially
800
 #define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially

+ 4
- 2
Marlin/Configuration_adv.h View File

195
 #define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
195
 #define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
197
 
197
 
198
+// When G28 is called, this option will make Y home before X
199
+// #define HOME_Y_BEFORE_X
200
+
198
 // @section machine
201
 // @section machine
199
 
202
 
200
 #define AXIS_RELATIVE_MODES {false, false, false, false}
203
 #define AXIS_RELATIVE_MODES {false, false, false, false}
258
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
261
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
259
 #define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
262
 #define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
260
 #define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
263
 #define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
261
-//#define ENCODER_RATE_MULTIPLIER_DEBUG  // If defined, output the encoder steps per second value
262
 
264
 
263
 //#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/
265
 //#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/
264
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
266
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
355
 //#define HEATERS_PARALLEL
357
 //#define HEATERS_PARALLEL
356
 
358
 
357
 //===========================================================================
359
 //===========================================================================
358
-//=============================Buffers           ============================
360
+//================================= Buffers =================================
359
 //===========================================================================
361
 //===========================================================================
360
 
362
 
361
 // @section hidden
363
 // @section hidden

+ 2
- 2
Marlin/Makefile View File

267
 CXXSRC = WMath.cpp WString.cpp Print.cpp Marlin_main.cpp	\
267
 CXXSRC = WMath.cpp WString.cpp Print.cpp Marlin_main.cpp	\
268
 	MarlinSerial.cpp Sd2Card.cpp SdBaseFile.cpp SdFatUtil.cpp	\
268
 	MarlinSerial.cpp Sd2Card.cpp SdBaseFile.cpp SdFatUtil.cpp	\
269
 	SdFile.cpp SdVolume.cpp motion_control.cpp planner.cpp		\
269
 	SdFile.cpp SdVolume.cpp motion_control.cpp planner.cpp		\
270
-	stepper.cpp temperature.cpp cardreader.cpp ConfigurationStore.cpp \
271
-	watchdog.cpp SPI.cpp Servo.cpp Tone.cpp ultralcd.cpp digipot_mcp4451.cpp \
270
+	stepper.cpp temperature.cpp cardreader.cpp configuration_store.cpp \
271
+	watchdog.cpp SPI.cpp servo.cpp Tone.cpp ultralcd.cpp digipot_mcp4451.cpp \
272
 	vector_3.cpp qr_solve.cpp
272
 	vector_3.cpp qr_solve.cpp
273
 ifeq ($(LIQUID_TWI2), 0)
273
 ifeq ($(LIQUID_TWI2), 0)
274
 CXXSRC += LiquidCrystal.cpp
274
 CXXSRC += LiquidCrystal.cpp

+ 12
- 0
Marlin/Marlin.h View File

223
   void filrunout();
223
   void filrunout();
224
 #endif
224
 #endif
225
 
225
 
226
+/**
227
+ * Debug flags - not yet widely applied
228
+ */
229
+enum DebugFlags {
230
+  DEBUG_ECHO          = BIT(0),
231
+  DEBUG_INFO          = BIT(1),
232
+  DEBUG_ERRORS        = BIT(2),
233
+  DEBUG_DRYRUN        = BIT(3),
234
+  DEBUG_COMMUNICATION = BIT(4)
235
+};
236
+extern uint8_t marlin_debug_flags;
237
+
226
 extern bool Running;
238
 extern bool Running;
227
 inline bool IsRunning() { return  Running; }
239
 inline bool IsRunning() { return  Running; }
228
 inline bool IsStopped() { return !Running; }
240
 inline bool IsStopped() { return !Running; }

+ 386
- 155
Marlin/Marlin_main.cpp
File diff suppressed because it is too large
View File


+ 2
- 2
Marlin/SanityCheck.h View File

87
   /**
87
   /**
88
    * Required LCD language
88
    * Required LCD language
89
    */
89
    */
90
-  #if !defined(DOGLCD) && defined(ULTRA_LCD) && !defined(DISPLAY_CHARSET_HD44780_JAPAN) && !defined(DISPLAY_CHARSET_HD44780_WESTERN)
91
-    #error You must enable either DISPLAY_CHARSET_HD44780_JAPAN or DISPLAY_CHARSET_HD44780_WESTERN for your LCD controller.
90
+  #if !defined(DOGLCD) && defined(ULTRA_LCD) && !defined(DISPLAY_CHARSET_HD44780_JAPAN) && !defined(DISPLAY_CHARSET_HD44780_WESTERN)&& !defined(DISPLAY_CHARSET_HD44780_CYRILLIC)
91
+    #error You must enable either DISPLAY_CHARSET_HD44780_JAPAN or DISPLAY_CHARSET_HD44780_WESTERN  or DISPLAY_CHARSET_HD44780_CYRILLIC for your LCD controller.
92
   #endif
92
   #endif
93
 
93
 
94
   /**
94
   /**

Marlin/BlinkM.cpp → Marlin/blinkm.cpp View File

1
 /*
1
 /*
2
-  BlinkM.cpp - Library for controlling a BlinkM over i2c
2
+  blinkm.cpp - Library for controlling a BlinkM over i2c
3
   Created by Tim Koster, August 21 2013.
3
   Created by Tim Koster, August 21 2013.
4
 */
4
 */
5
 #include "Marlin.h"
5
 #include "Marlin.h"
6
 #ifdef BLINKM
6
 #ifdef BLINKM
7
 
7
 
8
-#include "BlinkM.h"
8
+#include "blinkm.h"
9
 
9
 
10
 void SendColors(byte red, byte grn, byte blu) {
10
 void SendColors(byte red, byte grn, byte blu) {
11
   Wire.begin(); 
11
   Wire.begin(); 

Marlin/BlinkM.h → Marlin/blinkm.h View File

1
 /*
1
 /*
2
-  BlinkM.h
2
+  blinkm.h
3
   Library header file for BlinkM library
3
   Library header file for BlinkM library
4
  */
4
  */
5
 #if ARDUINO >= 100
5
 #if ARDUINO >= 100

Marlin/ConfigurationStore.cpp → Marlin/configuration_store.cpp View File

1
 /**
1
 /**
2
- * ConfigurationStore.cpp
2
+ * configuration_store.cpp
3
  *
3
  *
4
  * Configuration and EEPROM storage
4
  * Configuration and EEPROM storage
5
  *
5
  *
20
  * V19 EEPROM Layout:
20
  * V19 EEPROM Layout:
21
  *
21
  *
22
  *  ver
22
  *  ver
23
- *  axis_steps_per_unit (x4)
24
- *  max_feedrate (x4)
25
- *  max_acceleration_units_per_sq_second (x4)
26
- *  acceleration
27
- *  retract_acceleration
28
- *  travel_acceleration
29
- *  minimumfeedrate
30
- *  mintravelfeedrate
31
- *  minsegmenttime
32
- *  max_xy_jerk
33
- *  max_z_jerk
34
- *  max_e_jerk
35
- *  home_offset (x3)
23
+ *  M92 XYZE  axis_steps_per_unit (x4)
24
+ *  M203 XYZE max_feedrate (x4)
25
+ *  M201 XYZE max_acceleration_units_per_sq_second (x4)
26
+ *  M204 P    acceleration
27
+ *  M204 R    retract_acceleration
28
+ *  M204 T    travel_acceleration
29
+ *  M205 S    minimumfeedrate
30
+ *  M205 T    mintravelfeedrate
31
+ *  M205 B    minsegmenttime
32
+ *  M205 X    max_xy_jerk
33
+ *  M205 Z    max_z_jerk
34
+ *  M205 E    max_e_jerk
35
+ *  M206 XYZ  home_offset (x3)
36
  *
36
  *
37
  * Mesh bed leveling:
37
  * Mesh bed leveling:
38
- *  active
39
- *  mesh_num_x
40
- *  mesh_num_y
41
- *  z_values[][]
42
- *  zprobe_zoffset
38
+ *  M420 S    active
39
+ *            mesh_num_x (set in firmware)
40
+ *            mesh_num_y (set in firmware)
41
+ *  M421 XYZ  z_values[][]
42
+ *  M851      zprobe_zoffset
43
  *
43
  *
44
  * DELTA:
44
  * DELTA:
45
- *  endstop_adj (x3)
46
- *  delta_radius
47
- *  delta_diagonal_rod
48
- *  delta_segments_per_second
45
+ *  M666 XYZ  endstop_adj (x3)
46
+ *  M665 R    delta_radius
47
+ *  M665 L    delta_diagonal_rod
48
+ *  M665 S    delta_segments_per_second
49
  *
49
  *
50
  * ULTIPANEL:
50
  * ULTIPANEL:
51
- *  plaPreheatHotendTemp
52
- *  plaPreheatHPBTemp
53
- *  plaPreheatFanSpeed
54
- *  absPreheatHotendTemp
55
- *  absPreheatHPBTemp
56
- *  absPreheatFanSpeed
51
+ *  M145 S0 H plaPreheatHotendTemp
52
+ *  M145 S0 B plaPreheatHPBTemp
53
+ *  M145 S0 F plaPreheatFanSpeed
54
+ *  M145 S1 H absPreheatHotendTemp
55
+ *  M145 S1 B absPreheatHPBTemp
56
+ *  M145 S1 F absPreheatFanSpeed
57
  *
57
  *
58
  * PIDTEMP:
58
  * PIDTEMP:
59
- *  Kp[0], Ki[0], Kd[0], Kc[0]
60
- *  Kp[1], Ki[1], Kd[1], Kc[1]
61
- *  Kp[2], Ki[2], Kd[2], Kc[2]
62
- *  Kp[3], Ki[3], Kd[3], Kc[3]
59
+ *  M301 E0 PIDC  Kp[0], Ki[0], Kd[0], Kc[0]
60
+ *  M301 E1 PIDC  Kp[1], Ki[1], Kd[1], Kc[1]
61
+ *  M301 E2 PIDC  Kp[2], Ki[2], Kd[2], Kc[2]
62
+ *  M301 E3 PIDC  Kp[3], Ki[3], Kd[3], Kc[3]
63
  *
63
  *
64
  * PIDTEMPBED:
64
  * PIDTEMPBED:
65
- *  bedKp, bedKi, bedKd
65
+ *  M304 PID  bedKp, bedKi, bedKd
66
  *
66
  *
67
  * DOGLCD:
67
  * DOGLCD:
68
- *  lcd_contrast
68
+ *  M250 C    lcd_contrast
69
  *
69
  *
70
  * SCARA:
70
  * SCARA:
71
- *  axis_scaling (x3)
71
+ *  M365 XYZ  axis_scaling (x3)
72
  *
72
  *
73
  * FWRETRACT:
73
  * FWRETRACT:
74
- *  autoretract_enabled
75
- *  retract_length
76
- *  retract_length_swap
77
- *  retract_feedrate
78
- *  retract_zlift
79
- *  retract_recover_length
80
- *  retract_recover_length_swap
81
- *  retract_recover_feedrate
74
+ *  M209 S    autoretract_enabled
75
+ *  M207 S    retract_length
76
+ *  M207 W    retract_length_swap
77
+ *  M207 F    retract_feedrate
78
+ *  M207 Z    retract_zlift
79
+ *  M208 S    retract_recover_length
80
+ *  M208 W    retract_recover_length_swap
81
+ *  M208 F    retract_recover_feedrate
82
  *
82
  *
83
- *  volumetric_enabled
83
+ *  M200 D    volumetric_enabled (D>0 makes this enabled)
84
  *
84
  *
85
- *  filament_size (x4)
85
+ *  M200 T D  filament_size (x4) (T0..3)
86
  *
86
  *
87
- * Z_DUAL_ENDSTOPS
88
- *  z_endstop_adj
87
+ * Z_DUAL_ENDSTOPS:
88
+ *  M666 Z    z_endstop_adj
89
  *
89
  *
90
  */
90
  */
91
 #include "Marlin.h"
91
 #include "Marlin.h"
93
 #include "planner.h"
93
 #include "planner.h"
94
 #include "temperature.h"
94
 #include "temperature.h"
95
 #include "ultralcd.h"
95
 #include "ultralcd.h"
96
-#include "ConfigurationStore.h"
96
+#include "configuration_store.h"
97
 
97
 
98
 #ifdef MESH_BED_LEVELING
98
 #ifdef MESH_BED_LEVELING
99
-   #include "mesh_bed_leveling.h"
100
-#endif  // MESH_BED_LEVELING
99
+  #include "mesh_bed_leveling.h"
100
+#endif
101
 
101
 
102
 void _EEPROM_writeData(int &pos, uint8_t* value, uint8_t size) {
102
 void _EEPROM_writeData(int &pos, uint8_t* value, uint8_t size) {
103
   uint8_t c;
103
   uint8_t c;
122
 #define EEPROM_WRITE_VAR(pos, value) _EEPROM_writeData(pos, (uint8_t*)&value, sizeof(value))
122
 #define EEPROM_WRITE_VAR(pos, value) _EEPROM_writeData(pos, (uint8_t*)&value, sizeof(value))
123
 #define EEPROM_READ_VAR(pos, value) _EEPROM_readData(pos, (uint8_t*)&value, sizeof(value))
123
 #define EEPROM_READ_VAR(pos, value) _EEPROM_readData(pos, (uint8_t*)&value, sizeof(value))
124
 
124
 
125
-//======================================================================================
125
+/**
126
+ * Store Configuration Settings - M500
127
+ */
126
 
128
 
127
 #define DUMMY_PID_VALUE 3000.0f
129
 #define DUMMY_PID_VALUE 3000.0f
128
 
130
 
166
     EEPROM_WRITE_VAR(i, mesh_num_x);
168
     EEPROM_WRITE_VAR(i, mesh_num_x);
167
     EEPROM_WRITE_VAR(i, mesh_num_y);
169
     EEPROM_WRITE_VAR(i, mesh_num_y);
168
     dummy = 0.0f;
170
     dummy = 0.0f;
169
-    for (int q=0; q<mesh_num_x*mesh_num_y; q++) {
170
-      EEPROM_WRITE_VAR(i, dummy);
171
-    }
171
+    for (int q=0; q<mesh_num_x*mesh_num_y; q++) EEPROM_WRITE_VAR(i, dummy);
172
   #endif // MESH_BED_LEVELING
172
   #endif // MESH_BED_LEVELING
173
 
173
 
174
   #ifndef ENABLE_AUTO_BED_LEVELING
174
   #ifndef ENABLE_AUTO_BED_LEVELING
235
   EEPROM_WRITE_VAR(i, bedKi);
235
   EEPROM_WRITE_VAR(i, bedKi);
236
   EEPROM_WRITE_VAR(i, bedKd);
236
   EEPROM_WRITE_VAR(i, bedKd);
237
 
237
 
238
-  #ifndef DOGLCD
238
+  #ifndef HAS_LCD_CONTRAST
239
     int lcd_contrast = 32;
239
     int lcd_contrast = 32;
240
   #endif
240
   #endif
241
   EEPROM_WRITE_VAR(i, lcd_contrast);
241
   EEPROM_WRITE_VAR(i, lcd_contrast);
286
   SERIAL_ECHOLNPGM(" bytes)");
286
   SERIAL_ECHOLNPGM(" bytes)");
287
 }
287
 }
288
 
288
 
289
+/**
290
+ * Retrieve Configuration Settings - M501
291
+ */
292
+
289
 void Config_RetrieveSettings() {
293
 void Config_RetrieveSettings() {
290
 
294
 
291
   int i = EEPROM_OFFSET;
295
   int i = EEPROM_OFFSET;
319
     EEPROM_READ_VAR(i, max_e_jerk);
323
     EEPROM_READ_VAR(i, max_e_jerk);
320
     EEPROM_READ_VAR(i, home_offset);
324
     EEPROM_READ_VAR(i, home_offset);
321
 
325
 
322
-    uint8_t mesh_num_x = 0;
323
-    uint8_t mesh_num_y = 0;
326
+    uint8_t dummy_uint8 = 0, mesh_num_x = 0, mesh_num_y = 0;
327
+    EEPROM_READ_VAR(i, dummy_uint8);
328
+    EEPROM_READ_VAR(i, mesh_num_x);
329
+    EEPROM_READ_VAR(i, mesh_num_y);
324
     #ifdef MESH_BED_LEVELING
330
     #ifdef MESH_BED_LEVELING
325
-      EEPROM_READ_VAR(i, mbl.active);
326
-      EEPROM_READ_VAR(i, mesh_num_x);
327
-      EEPROM_READ_VAR(i, mesh_num_y);
328
-      if (mesh_num_x != MESH_NUM_X_POINTS ||
329
-          mesh_num_y != MESH_NUM_Y_POINTS) {
330
-        mbl.reset();
331
-        for (int q=0; q<mesh_num_x*mesh_num_y; q++) {
332
-          EEPROM_READ_VAR(i, dummy);
333
-        }
334
-      } else {
331
+      mbl.active = dummy_uint8;
332
+      if (mesh_num_x == MESH_NUM_X_POINTS && mesh_num_y == MESH_NUM_Y_POINTS) {
335
         EEPROM_READ_VAR(i, mbl.z_values);
333
         EEPROM_READ_VAR(i, mbl.z_values);
334
+      } else {
335
+        mbl.reset();
336
+        for (int q = 0; q < mesh_num_x * mesh_num_y; q++) EEPROM_READ_VAR(i, dummy);
336
       }
337
       }
337
     #else
338
     #else
338
-      uint8_t dummy_uint8 = 0;
339
-      EEPROM_READ_VAR(i, dummy_uint8);
340
-      EEPROM_READ_VAR(i, mesh_num_x);
341
-      EEPROM_READ_VAR(i, mesh_num_y);
342
-      for (int q=0; q<mesh_num_x*mesh_num_y; q++) {
343
-        EEPROM_READ_VAR(i, dummy);
344
-      }
345
-    #endif  // MESH_BED_LEVELING
339
+      for (int q = 0; q < mesh_num_x * mesh_num_y; q++) EEPROM_READ_VAR(i, dummy);
340
+    #endif // MESH_BED_LEVELING
346
 
341
 
347
     #ifndef ENABLE_AUTO_BED_LEVELING
342
     #ifndef ENABLE_AUTO_BED_LEVELING
348
       float zprobe_zoffset = 0;
343
       float zprobe_zoffset = 0;
412
       for (int q=2; q--;) EEPROM_READ_VAR(i, dummy); // bedKi, bedKd
407
       for (int q=2; q--;) EEPROM_READ_VAR(i, dummy); // bedKi, bedKd
413
     }
408
     }
414
 
409
 
415
-    #ifndef DOGLCD
410
+    #ifndef HAS_LCD_CONTRAST
416
       int lcd_contrast;
411
       int lcd_contrast;
417
     #endif
412
     #endif
418
     EEPROM_READ_VAR(i, lcd_contrast);
413
     EEPROM_READ_VAR(i, lcd_contrast);
467
 
462
 
468
 #endif // EEPROM_SETTINGS
463
 #endif // EEPROM_SETTINGS
469
 
464
 
465
+/**
466
+ * Reset Configuration Settings - M502
467
+ */
468
+
470
 void Config_ResetDefault() {
469
 void Config_ResetDefault() {
471
   float tmp1[] = DEFAULT_AXIS_STEPS_PER_UNIT;
470
   float tmp1[] = DEFAULT_AXIS_STEPS_PER_UNIT;
472
   float tmp2[] = DEFAULT_MAX_FEEDRATE;
471
   float tmp2[] = DEFAULT_MAX_FEEDRATE;
522
     absPreheatFanSpeed = ABS_PREHEAT_FAN_SPEED;
521
     absPreheatFanSpeed = ABS_PREHEAT_FAN_SPEED;
523
   #endif
522
   #endif
524
 
523
 
525
-  #ifdef DOGLCD
524
+  #ifdef HAS_LCD_CONTRAST
526
     lcd_contrast = DEFAULT_LCD_CONTRAST;
525
     lcd_contrast = DEFAULT_LCD_CONTRAST;
527
   #endif
526
   #endif
528
 
527
 
584
 
583
 
585
 #ifndef DISABLE_M503
584
 #ifndef DISABLE_M503
586
 
585
 
586
+/**
587
+ * Print Configuration Settings - M503
588
+ */
589
+
590
+#define CONFIG_ECHO_START do{ if (!forReplay) SERIAL_ECHO_START; }while(0)
591
+
587
 void Config_PrintSettings(bool forReplay) {
592
 void Config_PrintSettings(bool forReplay) {
588
   // Always have this function, even with EEPROM_SETTINGS disabled, the current values will be shown
593
   // Always have this function, even with EEPROM_SETTINGS disabled, the current values will be shown
589
 
594
 
590
-  SERIAL_ECHO_START;
595
+  CONFIG_ECHO_START;
591
 
596
 
592
   if (!forReplay) {
597
   if (!forReplay) {
593
     SERIAL_ECHOLNPGM("Steps per unit:");
598
     SERIAL_ECHOLNPGM("Steps per unit:");
594
-    SERIAL_ECHO_START;
599
+    CONFIG_ECHO_START;
595
   }
600
   }
596
   SERIAL_ECHOPAIR("  M92 X", axis_steps_per_unit[X_AXIS]);
601
   SERIAL_ECHOPAIR("  M92 X", axis_steps_per_unit[X_AXIS]);
597
   SERIAL_ECHOPAIR(" Y", axis_steps_per_unit[Y_AXIS]);
602
   SERIAL_ECHOPAIR(" Y", axis_steps_per_unit[Y_AXIS]);
599
   SERIAL_ECHOPAIR(" E", axis_steps_per_unit[E_AXIS]);
604
   SERIAL_ECHOPAIR(" E", axis_steps_per_unit[E_AXIS]);
600
   SERIAL_EOL;
605
   SERIAL_EOL;
601
 
606
 
602
-  SERIAL_ECHO_START;
607
+  CONFIG_ECHO_START;
603
 
608
 
604
   #ifdef SCARA
609
   #ifdef SCARA
605
     if (!forReplay) {
610
     if (!forReplay) {
606
       SERIAL_ECHOLNPGM("Scaling factors:");
611
       SERIAL_ECHOLNPGM("Scaling factors:");
607
-      SERIAL_ECHO_START;
612
+      CONFIG_ECHO_START;
608
     }
613
     }
609
     SERIAL_ECHOPAIR("  M365 X", axis_scaling[X_AXIS]);
614
     SERIAL_ECHOPAIR("  M365 X", axis_scaling[X_AXIS]);
610
     SERIAL_ECHOPAIR(" Y", axis_scaling[Y_AXIS]);
615
     SERIAL_ECHOPAIR(" Y", axis_scaling[Y_AXIS]);
611
     SERIAL_ECHOPAIR(" Z", axis_scaling[Z_AXIS]);
616
     SERIAL_ECHOPAIR(" Z", axis_scaling[Z_AXIS]);
612
     SERIAL_EOL;
617
     SERIAL_EOL;
613
-    SERIAL_ECHO_START;
618
+    CONFIG_ECHO_START;
614
   #endif // SCARA
619
   #endif // SCARA
615
 
620
 
616
   if (!forReplay) {
621
   if (!forReplay) {
617
     SERIAL_ECHOLNPGM("Maximum feedrates (mm/s):");
622
     SERIAL_ECHOLNPGM("Maximum feedrates (mm/s):");
618
-    SERIAL_ECHO_START;
623
+    CONFIG_ECHO_START;
619
   }
624
   }
620
   SERIAL_ECHOPAIR("  M203 X", max_feedrate[X_AXIS]);
625
   SERIAL_ECHOPAIR("  M203 X", max_feedrate[X_AXIS]);
621
   SERIAL_ECHOPAIR(" Y", max_feedrate[Y_AXIS]);
626
   SERIAL_ECHOPAIR(" Y", max_feedrate[Y_AXIS]);
623
   SERIAL_ECHOPAIR(" E", max_feedrate[E_AXIS]);
628
   SERIAL_ECHOPAIR(" E", max_feedrate[E_AXIS]);
624
   SERIAL_EOL;
629
   SERIAL_EOL;
625
 
630
 
626
-  SERIAL_ECHO_START;
631
+  CONFIG_ECHO_START;
627
   if (!forReplay) {
632
   if (!forReplay) {
628
     SERIAL_ECHOLNPGM("Maximum Acceleration (mm/s2):");
633
     SERIAL_ECHOLNPGM("Maximum Acceleration (mm/s2):");
629
-    SERIAL_ECHO_START;
634
+    CONFIG_ECHO_START;
630
   }
635
   }
631
-  SERIAL_ECHOPAIR("  M201 X", max_acceleration_units_per_sq_second[X_AXIS] );
632
-  SERIAL_ECHOPAIR(" Y", max_acceleration_units_per_sq_second[Y_AXIS] );
633
-  SERIAL_ECHOPAIR(" Z", max_acceleration_units_per_sq_second[Z_AXIS] );
636
+  SERIAL_ECHOPAIR("  M201 X", max_acceleration_units_per_sq_second[X_AXIS]);
637
+  SERIAL_ECHOPAIR(" Y", max_acceleration_units_per_sq_second[Y_AXIS]);
638
+  SERIAL_ECHOPAIR(" Z", max_acceleration_units_per_sq_second[Z_AXIS]);
634
   SERIAL_ECHOPAIR(" E", max_acceleration_units_per_sq_second[E_AXIS]);
639
   SERIAL_ECHOPAIR(" E", max_acceleration_units_per_sq_second[E_AXIS]);
635
   SERIAL_EOL;
640
   SERIAL_EOL;
636
-  SERIAL_ECHO_START;
641
+  CONFIG_ECHO_START;
637
   if (!forReplay) {
642
   if (!forReplay) {
638
     SERIAL_ECHOLNPGM("Accelerations: P=printing, R=retract and T=travel");
643
     SERIAL_ECHOLNPGM("Accelerations: P=printing, R=retract and T=travel");
639
-    SERIAL_ECHO_START;
644
+    CONFIG_ECHO_START;
640
   }
645
   }
641
-  SERIAL_ECHOPAIR("  M204 P", acceleration );
646
+  SERIAL_ECHOPAIR("  M204 P", acceleration);
642
   SERIAL_ECHOPAIR(" R", retract_acceleration);
647
   SERIAL_ECHOPAIR(" R", retract_acceleration);
643
   SERIAL_ECHOPAIR(" T", travel_acceleration);
648
   SERIAL_ECHOPAIR(" T", travel_acceleration);
644
   SERIAL_EOL;
649
   SERIAL_EOL;
645
 
650
 
646
-  SERIAL_ECHO_START;
651
+  CONFIG_ECHO_START;
647
   if (!forReplay) {
652
   if (!forReplay) {
648
     SERIAL_ECHOLNPGM("Advanced variables: S=Min feedrate (mm/s), T=Min travel feedrate (mm/s), B=minimum segment time (ms), X=maximum XY jerk (mm/s),  Z=maximum Z jerk (mm/s),  E=maximum E jerk (mm/s)");
653
     SERIAL_ECHOLNPGM("Advanced variables: S=Min feedrate (mm/s), T=Min travel feedrate (mm/s), B=minimum segment time (ms), X=maximum XY jerk (mm/s),  Z=maximum Z jerk (mm/s),  E=maximum E jerk (mm/s)");
649
-    SERIAL_ECHO_START;
654
+    CONFIG_ECHO_START;
650
   }
655
   }
651
-  SERIAL_ECHOPAIR("  M205 S", minimumfeedrate );
652
-  SERIAL_ECHOPAIR(" T", mintravelfeedrate );
653
-  SERIAL_ECHOPAIR(" B", minsegmenttime );
654
-  SERIAL_ECHOPAIR(" X", max_xy_jerk );
656
+  SERIAL_ECHOPAIR("  M205 S", minimumfeedrate);
657
+  SERIAL_ECHOPAIR(" T", mintravelfeedrate);
658
+  SERIAL_ECHOPAIR(" B", minsegmenttime);
659
+  SERIAL_ECHOPAIR(" X", max_xy_jerk);
655
   SERIAL_ECHOPAIR(" Z", max_z_jerk);
660
   SERIAL_ECHOPAIR(" Z", max_z_jerk);
656
   SERIAL_ECHOPAIR(" E", max_e_jerk);
661
   SERIAL_ECHOPAIR(" E", max_e_jerk);
657
   SERIAL_EOL;
662
   SERIAL_EOL;
658
 
663
 
659
-  SERIAL_ECHO_START;
664
+  CONFIG_ECHO_START;
660
   if (!forReplay) {
665
   if (!forReplay) {
661
     SERIAL_ECHOLNPGM("Home offset (mm):");
666
     SERIAL_ECHOLNPGM("Home offset (mm):");
662
-    SERIAL_ECHO_START;
667
+    CONFIG_ECHO_START;
663
   }
668
   }
664
-  SERIAL_ECHOPAIR("  M206 X", home_offset[X_AXIS] );
665
-  SERIAL_ECHOPAIR(" Y", home_offset[Y_AXIS] );
666
-  SERIAL_ECHOPAIR(" Z", home_offset[Z_AXIS] );
669
+  SERIAL_ECHOPAIR("  M206 X", home_offset[X_AXIS]);
670
+  SERIAL_ECHOPAIR(" Y", home_offset[Y_AXIS]);
671
+  SERIAL_ECHOPAIR(" Z", home_offset[Z_AXIS]);
667
   SERIAL_EOL;
672
   SERIAL_EOL;
668
 
673
 
674
+  #ifdef MESH_BED_LEVELING
675
+    if (!forReplay) {
676
+      SERIAL_ECHOLNPGM("Mesh bed leveling:");
677
+      CONFIG_ECHO_START;
678
+    }
679
+    SERIAL_ECHOPAIR("  M420 S", (unsigned long)mbl.active);
680
+    SERIAL_ECHOPAIR(" X", (unsigned long)MESH_NUM_X_POINTS);
681
+    SERIAL_ECHOPAIR(" Y", (unsigned long)MESH_NUM_Y_POINTS);
682
+    SERIAL_EOL;
683
+    for (int y=0; y<MESH_NUM_Y_POINTS; y++) {
684
+      for (int x=0; x<MESH_NUM_X_POINTS; x++) {
685
+        CONFIG_ECHO_START;
686
+        SERIAL_ECHOPAIR("  M421 X", mbl.get_x(x));
687
+        SERIAL_ECHOPAIR(" Y", mbl.get_y(y));
688
+        SERIAL_ECHOPAIR(" Z", mbl.z_values[y][x]);
689
+        SERIAL_EOL;
690
+      }
691
+    }
692
+  #endif
693
+
669
   #ifdef DELTA
694
   #ifdef DELTA
670
-    SERIAL_ECHO_START;
695
+    CONFIG_ECHO_START;
671
     if (!forReplay) {
696
     if (!forReplay) {
672
       SERIAL_ECHOLNPGM("Endstop adjustment (mm):");
697
       SERIAL_ECHOLNPGM("Endstop adjustment (mm):");
673
-      SERIAL_ECHO_START;
698
+      CONFIG_ECHO_START;
674
     }
699
     }
675
-    SERIAL_ECHOPAIR("  M666 X", endstop_adj[X_AXIS] );
676
-    SERIAL_ECHOPAIR(" Y", endstop_adj[Y_AXIS] );
677
-    SERIAL_ECHOPAIR(" Z", endstop_adj[Z_AXIS] );
700
+    SERIAL_ECHOPAIR("  M666 X", endstop_adj[X_AXIS]);
701
+    SERIAL_ECHOPAIR(" Y", endstop_adj[Y_AXIS]);
702
+    SERIAL_ECHOPAIR(" Z", endstop_adj[Z_AXIS]);
678
     SERIAL_EOL;
703
     SERIAL_EOL;
679
-    SERIAL_ECHO_START;
704
+    CONFIG_ECHO_START;
680
     SERIAL_ECHOLNPGM("Delta settings: L=delta_diagonal_rod, R=delta_radius, S=delta_segments_per_second");
705
     SERIAL_ECHOLNPGM("Delta settings: L=delta_diagonal_rod, R=delta_radius, S=delta_segments_per_second");
681
-    SERIAL_ECHO_START;
682
-    SERIAL_ECHOPAIR("  M665 L", delta_diagonal_rod );
683
-    SERIAL_ECHOPAIR(" R", delta_radius );
684
-    SERIAL_ECHOPAIR(" S", delta_segments_per_second );
706
+    CONFIG_ECHO_START;
707
+    SERIAL_ECHOPAIR("  M665 L", delta_diagonal_rod);
708
+    SERIAL_ECHOPAIR(" R", delta_radius);
709
+    SERIAL_ECHOPAIR(" S", delta_segments_per_second);
685
     SERIAL_EOL;
710
     SERIAL_EOL;
686
   #elif defined(Z_DUAL_ENDSTOPS)
711
   #elif defined(Z_DUAL_ENDSTOPS)
687
-    SERIAL_ECHO_START;
712
+    CONFIG_ECHO_START;
688
     if (!forReplay) {
713
     if (!forReplay) {
689
       SERIAL_ECHOLNPGM("Z2 Endstop adjustment (mm):");
714
       SERIAL_ECHOLNPGM("Z2 Endstop adjustment (mm):");
690
-      SERIAL_ECHO_START;
715
+      CONFIG_ECHO_START;
691
     }
716
     }
692
-    SERIAL_ECHOPAIR("  M666 Z", z_endstop_adj );
717
+    SERIAL_ECHOPAIR("  M666 Z", z_endstop_adj);
693
     SERIAL_EOL;  
718
     SERIAL_EOL;  
694
   #endif // DELTA
719
   #endif // DELTA
695
 
720
 
721
+  #ifdef ULTIPANEL
722
+    CONFIG_ECHO_START;
723
+    if (!forReplay) {
724
+      SERIAL_ECHOLNPGM("Material heatup parameters:");
725
+      CONFIG_ECHO_START;
726
+    }
727
+    SERIAL_ECHOPAIR("  M145 M0 H", (unsigned long)plaPreheatHotendTemp);
728
+    SERIAL_ECHOPAIR(" B", (unsigned long)plaPreheatHPBTemp);
729
+    SERIAL_ECHOPAIR(" F", (unsigned long)plaPreheatFanSpeed);
730
+    SERIAL_EOL;
731
+    CONFIG_ECHO_START;
732
+    SERIAL_ECHOPAIR("  M145 M1 H", (unsigned long)absPreheatHotendTemp);
733
+    SERIAL_ECHOPAIR(" B", (unsigned long)absPreheatHPBTemp);
734
+    SERIAL_ECHOPAIR(" F", (unsigned long)absPreheatFanSpeed);
735
+    SERIAL_EOL;
736
+  #endif // ULTIPANEL
737
+
696
   #if defined(PIDTEMP) || defined(PIDTEMPBED)
738
   #if defined(PIDTEMP) || defined(PIDTEMPBED)
697
-    SERIAL_ECHO_START;
739
+
740
+    CONFIG_ECHO_START;
698
     if (!forReplay) {
741
     if (!forReplay) {
699
       SERIAL_ECHOLNPGM("PID settings:");
742
       SERIAL_ECHOLNPGM("PID settings:");
700
-      SERIAL_ECHO_START;
701
     }
743
     }
702
-    #if defined(PIDTEMP) && defined(PIDTEMPBED)
703
-      SERIAL_EOL;
704
-    #endif
705
     #ifdef PIDTEMP
744
     #ifdef PIDTEMP
706
-      SERIAL_ECHOPAIR("  M301 P", PID_PARAM(Kp, 0)); // for compatibility with hosts, only echos values for E0
707
-      SERIAL_ECHOPAIR(" I", unscalePID_i(PID_PARAM(Ki, 0)));
708
-      SERIAL_ECHOPAIR(" D", unscalePID_d(PID_PARAM(Kd, 0)));
709
-      SERIAL_EOL;
710
-    #endif
745
+      #if EXTRUDERS > 1
746
+        if (forReplay) {
747
+          for (uint8_t i = 0; i < EXTRUDERS; i++) {
748
+            CONFIG_ECHO_START;
749
+            SERIAL_ECHOPAIR("  M301 E", (unsigned long)i);
750
+            SERIAL_ECHOPAIR(" P", PID_PARAM(Kp, i));
751
+            SERIAL_ECHOPAIR(" I", unscalePID_i(PID_PARAM(Ki, i)));
752
+            SERIAL_ECHOPAIR(" D", unscalePID_d(PID_PARAM(Kd, i)));
753
+            #ifdef PID_ADD_EXTRUSION_RATE
754
+              SERIAL_ECHOPAIR(" C", PID_PARAM(Kc, i));
755
+            #endif      
756
+            SERIAL_EOL;
757
+          }
758
+        }
759
+        else
760
+      #endif // EXTRUDERS > 1
761
+      // !forReplay || EXTRUDERS == 1
762
+      {
763
+        CONFIG_ECHO_START;
764
+        SERIAL_ECHOPAIR("  M301 P", PID_PARAM(Kp, 0)); // for compatibility with hosts, only echo values for E0
765
+        SERIAL_ECHOPAIR(" I", unscalePID_i(PID_PARAM(Ki, 0)));
766
+        SERIAL_ECHOPAIR(" D", unscalePID_d(PID_PARAM(Kd, 0)));
767
+        #ifdef PID_ADD_EXTRUSION_RATE
768
+          SERIAL_ECHOPAIR(" C", PID_PARAM(Kc, 0));
769
+        #endif      
770
+        SERIAL_EOL;
771
+      }
772
+    #endif // PIDTEMP
773
+
711
     #ifdef PIDTEMPBED
774
     #ifdef PIDTEMPBED
712
-      SERIAL_ECHOPAIR("  M304 P", bedKp); // for compatibility with hosts, only echos values for E0
775
+      CONFIG_ECHO_START;
776
+      SERIAL_ECHOPAIR("  M304 P", bedKp);
713
       SERIAL_ECHOPAIR(" I", unscalePID_i(bedKi));
777
       SERIAL_ECHOPAIR(" I", unscalePID_i(bedKi));
714
       SERIAL_ECHOPAIR(" D", unscalePID_d(bedKd));
778
       SERIAL_ECHOPAIR(" D", unscalePID_d(bedKd));
715
       SERIAL_EOL;
779
       SERIAL_EOL;
716
     #endif
780
     #endif
781
+
782
+  #endif // PIDTEMP || PIDTEMPBED
783
+
784
+  #ifdef HAS_LCD_CONTRAST
785
+    CONFIG_ECHO_START;
786
+    if (!forReplay) {
787
+      SERIAL_ECHOLNPGM("LCD Contrast:");
788
+      CONFIG_ECHO_START;
789
+    }
790
+    SERIAL_ECHOPAIR("  M250 C", (unsigned long)lcd_contrast);
791
+    SERIAL_EOL;
717
   #endif
792
   #endif
718
 
793
 
719
   #ifdef FWRETRACT
794
   #ifdef FWRETRACT
720
 
795
 
721
-    SERIAL_ECHO_START;
796
+    CONFIG_ECHO_START;
722
     if (!forReplay) {
797
     if (!forReplay) {
723
       SERIAL_ECHOLNPGM("Retract: S=Length (mm) F:Speed (mm/m) Z: ZLift (mm)");
798
       SERIAL_ECHOLNPGM("Retract: S=Length (mm) F:Speed (mm/m) Z: ZLift (mm)");
724
-      SERIAL_ECHO_START;
799
+      CONFIG_ECHO_START;
725
     }
800
     }
726
     SERIAL_ECHOPAIR("  M207 S", retract_length);
801
     SERIAL_ECHOPAIR("  M207 S", retract_length);
802
+    #if EXTRUDERS > 1
803
+      SERIAL_ECHOPAIR(" W", retract_length_swap);
804
+    #endif
727
     SERIAL_ECHOPAIR(" F", retract_feedrate*60);
805
     SERIAL_ECHOPAIR(" F", retract_feedrate*60);
728
     SERIAL_ECHOPAIR(" Z", retract_zlift);
806
     SERIAL_ECHOPAIR(" Z", retract_zlift);
729
     SERIAL_EOL;
807
     SERIAL_EOL;
730
-    SERIAL_ECHO_START;
808
+    CONFIG_ECHO_START;
731
     if (!forReplay) {
809
     if (!forReplay) {
732
       SERIAL_ECHOLNPGM("Recover: S=Extra length (mm) F:Speed (mm/m)");
810
       SERIAL_ECHOLNPGM("Recover: S=Extra length (mm) F:Speed (mm/m)");
733
-      SERIAL_ECHO_START;
811
+      CONFIG_ECHO_START;
734
     }
812
     }
735
     SERIAL_ECHOPAIR("  M208 S", retract_recover_length);
813
     SERIAL_ECHOPAIR("  M208 S", retract_recover_length);
814
+    #if EXTRUDERS > 1
815
+      SERIAL_ECHOPAIR(" W", retract_recover_length_swap);
816
+    #endif
736
     SERIAL_ECHOPAIR(" F", retract_recover_feedrate*60);
817
     SERIAL_ECHOPAIR(" F", retract_recover_feedrate*60);
737
     SERIAL_EOL;
818
     SERIAL_EOL;
738
-    SERIAL_ECHO_START;
819
+    CONFIG_ECHO_START;
739
     if (!forReplay) {
820
     if (!forReplay) {
740
       SERIAL_ECHOLNPGM("Auto-Retract: S=0 to disable, 1 to interpret extrude-only moves as retracts or recoveries");
821
       SERIAL_ECHOLNPGM("Auto-Retract: S=0 to disable, 1 to interpret extrude-only moves as retracts or recoveries");
741
-      SERIAL_ECHO_START;
822
+      CONFIG_ECHO_START;
742
     }
823
     }
743
     SERIAL_ECHOPAIR("  M209 S", (unsigned long)(autoretract_enabled ? 1 : 0));
824
     SERIAL_ECHOPAIR("  M209 S", (unsigned long)(autoretract_enabled ? 1 : 0));
744
     SERIAL_EOL;
825
     SERIAL_EOL;
745
 
826
 
746
-    #if EXTRUDERS > 1
747
-      if (!forReplay) {
748
-        SERIAL_ECHO_START;
749
-        SERIAL_ECHOLNPGM("Multi-extruder settings:");
750
-        SERIAL_ECHO_START;
751
-        SERIAL_ECHOPAIR("   Swap retract length (mm):    ", retract_length_swap);
752
-        SERIAL_EOL;
753
-        SERIAL_ECHO_START;
754
-        SERIAL_ECHOPAIR("   Swap rec. addl. length (mm): ", retract_recover_length_swap);
755
-        SERIAL_EOL;
756
-      }
757
-    #endif // EXTRUDERS > 1
758
-
759
   #endif // FWRETRACT
827
   #endif // FWRETRACT
760
 
828
 
761
-  SERIAL_ECHO_START;
762
   if (volumetric_enabled) {
829
   if (volumetric_enabled) {
763
     if (!forReplay) {
830
     if (!forReplay) {
831
+      CONFIG_ECHO_START;
764
       SERIAL_ECHOLNPGM("Filament settings:");
832
       SERIAL_ECHOLNPGM("Filament settings:");
765
-      SERIAL_ECHO_START;
766
     }
833
     }
834
+
835
+    CONFIG_ECHO_START;
767
     SERIAL_ECHOPAIR("  M200 D", filament_size[0]);
836
     SERIAL_ECHOPAIR("  M200 D", filament_size[0]);
768
     SERIAL_EOL;
837
     SERIAL_EOL;
769
 
838
 
770
     #if EXTRUDERS > 1
839
     #if EXTRUDERS > 1
771
-      SERIAL_ECHO_START;
840
+      CONFIG_ECHO_START;
772
       SERIAL_ECHOPAIR("  M200 T1 D", filament_size[1]);
841
       SERIAL_ECHOPAIR("  M200 T1 D", filament_size[1]);
773
       SERIAL_EOL;
842
       SERIAL_EOL;
774
       #if EXTRUDERS > 2
843
       #if EXTRUDERS > 2
775
-        SERIAL_ECHO_START;
844
+        CONFIG_ECHO_START;
776
         SERIAL_ECHOPAIR("  M200 T2 D", filament_size[2]);
845
         SERIAL_ECHOPAIR("  M200 T2 D", filament_size[2]);
777
         SERIAL_EOL;
846
         SERIAL_EOL;
778
         #if EXTRUDERS > 3
847
         #if EXTRUDERS > 3
779
-          SERIAL_ECHO_START;
848
+          CONFIG_ECHO_START;
780
           SERIAL_ECHOPAIR("  M200 T3 D", filament_size[3]);
849
           SERIAL_ECHOPAIR("  M200 T3 D", filament_size[3]);
781
           SERIAL_EOL;
850
           SERIAL_EOL;
782
         #endif
851
         #endif
785
 
854
 
786
   } else {
855
   } else {
787
     if (!forReplay) {
856
     if (!forReplay) {
857
+      CONFIG_ECHO_START;
788
       SERIAL_ECHOLNPGM("Filament settings: Disabled");
858
       SERIAL_ECHOLNPGM("Filament settings: Disabled");
789
     }
859
     }
790
   }
860
   }
791
 
861
 
792
   #ifdef ENABLE_AUTO_BED_LEVELING
862
   #ifdef ENABLE_AUTO_BED_LEVELING
793
-    SERIAL_ECHO_START;
794
     #ifdef CUSTOM_M_CODES
863
     #ifdef CUSTOM_M_CODES
795
       if (!forReplay) {
864
       if (!forReplay) {
865
+        CONFIG_ECHO_START;
796
         SERIAL_ECHOLNPGM("Z-Probe Offset (mm):");
866
         SERIAL_ECHOLNPGM("Z-Probe Offset (mm):");
797
-        SERIAL_ECHO_START;
798
       }
867
       }
868
+      CONFIG_ECHO_START;
799
       SERIAL_ECHOPAIR("  M", (unsigned long)CUSTOM_M_CODE_SET_Z_PROBE_OFFSET);
869
       SERIAL_ECHOPAIR("  M", (unsigned long)CUSTOM_M_CODE_SET_Z_PROBE_OFFSET);
800
       SERIAL_ECHOPAIR(" Z", -zprobe_zoffset);
870
       SERIAL_ECHOPAIR(" Z", -zprobe_zoffset);
801
     #else
871
     #else
802
       if (!forReplay) {
872
       if (!forReplay) {
873
+        CONFIG_ECHO_START;
803
         SERIAL_ECHOPAIR("Z-Probe Offset (mm):", -zprobe_zoffset);
874
         SERIAL_ECHOPAIR("Z-Probe Offset (mm):", -zprobe_zoffset);
804
       }
875
       }
805
     #endif
876
     #endif

Marlin/ConfigurationStore.h → Marlin/configuration_store.h View File

1
-#ifndef CONFIGURATIONSTORE_H
2
-#define CONFIGURATIONSTORE_H
1
+#ifndef CONFIGURATION_STORE_H
2
+#define CONFIGURATION_STORE_H
3
 
3
 
4
 #include "Configuration.h"
4
 #include "Configuration.h"
5
 
5
 
19
   FORCE_INLINE void Config_RetrieveSettings() { Config_ResetDefault(); Config_PrintSettings(); }
19
   FORCE_INLINE void Config_RetrieveSettings() { Config_ResetDefault(); Config_PrintSettings(); }
20
 #endif
20
 #endif
21
 
21
 
22
-#endif //CONFIGURATIONSTORE_H
22
+#endif //CONFIGURATION_STORE_H

+ 36
- 40
Marlin/configurator/config/Configuration.h View File

41
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
41
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
42
 // build by the user have been successfully uploaded into firmware.
42
 // build by the user have been successfully uploaded into firmware.
43
 #define STRING_VERSION "1.0.3 dev"
43
 #define STRING_VERSION "1.0.3 dev"
44
-#define STRING_URL "reprap.org"
45
 #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
44
 #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
46
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
45
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
47
 #define STRING_SPLASH_LINE1 "v" STRING_VERSION // will be shown during bootup in line 1
46
 #define STRING_SPLASH_LINE1 "v" STRING_VERSION // will be shown during bootup in line 1
271
 #define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
270
 #define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
272
 
271
 
273
 //===========================================================================
272
 //===========================================================================
274
-//============================= Thermal Runaway Protection ==================
273
+//======================== Thermal Runaway Protection =======================
275
 //===========================================================================
274
 //===========================================================================
276
-/*
277
-This is a feature to protect your printer from burn up in flames if it has
278
-a thermistor coming off place (this happened to a friend of mine recently and
279
-motivated me writing this feature).
280
-
281
-The issue: If a thermistor come off, it will read a lower temperature than actual.
282
-The system will turn the heater on forever, burning up the filament and anything
283
-else around.
284
-
285
-After the temperature reaches the target for the first time, this feature will
286
-start measuring for how long the current temperature stays below the target
287
-minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS).
288
-
289
-If it stays longer than _PERIOD, it means the thermistor temperature
290
-cannot catch up with the target, so something *may be* wrong. Then, to be on the
291
-safe side, the system will he halt.
292
 
275
 
293
-Bear in mind the count down will just start AFTER the first time the
294
-thermistor temperature is over the target, so you will have no problem if
295
-your extruder heater takes 2 minutes to hit the target on heating.
296
-
297
-*/
298
-// If you want to enable this feature for all your extruder heaters,
299
-// uncomment the 2 defines below:
276
+/**
277
+ * Thermal Runaway Protection protects your printer from damage and fire if a
278
+ * thermistor falls out or temperature sensors fail in any way.
279
+ *
280
+ * The issue: If a thermistor falls out or a temperature sensor fails,
281
+ * Marlin can no longer sense the actual temperature. Since a disconnected
282
+ * thermistor reads as a low temperature, the firmware will keep the heater on.
283
+ *
284
+ * The solution: Once the temperature reaches the target, start observing.
285
+ * If the temperature stays too far below the target (hysteresis) for too long,
286
+ * the firmware will halt as a safety precaution.
287
+ *
288
+ * Note that because the countdown starts only AFTER the temperature reaches
289
+ * the target, this will not catch a thermistor that is already disconnected
290
+ * when the print starts!
291
+ *
292
+ * To enable for all extruder heaters, uncomment the two defines below:
293
+ */
300
 
294
 
301
 // Parameters for all extruder heaters
295
 // Parameters for all extruder heaters
302
-//#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds
303
-//#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius
296
+#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 // in seconds
297
+#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius
304
 
298
 
305
-// If you want to enable this feature for your bed heater,
306
-// uncomment the 2 defines below:
299
+// To enable for the bed heater, uncomment the two defines below:
307
 
300
 
308
 // Parameters for the bed heater
301
 // Parameters for the bed heater
309
-//#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds
310
-//#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius
311
-
302
+#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 // in seconds
303
+#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius
312
 
304
 
313
 //===========================================================================
305
 //===========================================================================
314
 //============================= Mechanical Settings =========================
306
 //============================= Mechanical Settings =========================
364
 #define E_ENABLE_ON 0 // For all extruders
356
 #define E_ENABLE_ON 0 // For all extruders
365
 
357
 
366
 // Disables axis when it's not being used.
358
 // Disables axis when it's not being used.
359
+// WARNING: When motors turn off there is a chance of losing position accuracy!
367
 #define DISABLE_X false
360
 #define DISABLE_X false
368
 #define DISABLE_Y false
361
 #define DISABLE_Y false
369
 #define DISABLE_Z false
362
 #define DISABLE_Z false
411
 #define Z_MAX_POS 200
404
 #define Z_MAX_POS 200
412
 
405
 
413
 //===========================================================================
406
 //===========================================================================
414
-//============================= Filament Runout Sensor ======================
407
+//========================= Filament Runout Sensor ==========================
415
 //===========================================================================
408
 //===========================================================================
416
 //#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament
409
 //#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament
417
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
410
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
418
                                  // It is assumed that when logic high = filament available
411
                                  // It is assumed that when logic high = filament available
419
                                  //                    when logic  low = filament ran out
412
                                  //                    when logic  low = filament ran out
420
-//const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
421
-//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
413
+#ifdef FILAMENT_RUNOUT_SENSOR
414
+  const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
415
+  #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
416
+  #define FILAMENT_RUNOUT_SCRIPT "M600"
417
+#endif
422
 
418
 
423
 //===========================================================================
419
 //===========================================================================
424
-//============================ Manual Bed Leveling ==========================
420
+//=========================== Manual Bed Leveling ===========================
425
 //===========================================================================
421
 //===========================================================================
426
 
422
 
427
 // #define MANUAL_BED_LEVELING  // Add display menu option for bed leveling
423
 // #define MANUAL_BED_LEVELING  // Add display menu option for bed leveling
442
 #endif  // MESH_BED_LEVELING
438
 #endif  // MESH_BED_LEVELING
443
 
439
 
444
 //===========================================================================
440
 //===========================================================================
445
-//============================= Bed Auto Leveling ===========================
441
+//============================ Bed Auto Leveling ============================
446
 //===========================================================================
442
 //===========================================================================
447
 
443
 
448
 // @section bedlevel
444
 // @section bedlevel
640
 // @section lcd
636
 // @section lcd
641
 
637
 
642
 // Define your display language below. Replace (en) with your language code and uncomment.
638
 // Define your display language below. Replace (en) with your language code and uncomment.
643
-// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
639
+// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, cn, test
644
 // See also language.h
640
 // See also language.h
645
 #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
641
 #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
646
 
642
 
660
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
656
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
661
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
657
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
662
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
658
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
663
-//#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
664
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
659
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
665
-                                               // 0 to disable buzzer feedback  
660
+//#define LCD_FEEDBACK_FREQUENCY_HZ 1000         // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
661
+                                                 // 0 to disable buzzer feedback. Test with M300 S<frequency Hz> P<duration ms>
666
 
662
 
667
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
663
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
668
 // http://reprap.org/wiki/PanelOne
664
 // http://reprap.org/wiki/PanelOne

+ 4
- 2
Marlin/configurator/config/Configuration_adv.h View File

195
 #define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
195
 #define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
197
 
197
 
198
+// When G28 is called, this option will make Y home before X
199
+// #define HOME_Y_BEFORE_X
200
+
198
 // @section machine
201
 // @section machine
199
 
202
 
200
 #define AXIS_RELATIVE_MODES {false, false, false, false}
203
 #define AXIS_RELATIVE_MODES {false, false, false, false}
258
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
261
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
259
 #define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
262
 #define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
260
 #define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
263
 #define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
261
-//#define ENCODER_RATE_MULTIPLIER_DEBUG  // If defined, output the encoder steps per second value
262
 
264
 
263
 //#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/
265
 //#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/
264
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
266
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
355
 //#define HEATERS_PARALLEL
357
 //#define HEATERS_PARALLEL
356
 
358
 
357
 //===========================================================================
359
 //===========================================================================
358
-//=============================Buffers           ============================
360
+//================================= Buffers =================================
359
 //===========================================================================
361
 //===========================================================================
360
 
362
 
361
 // @section hidden
363
 // @section hidden

+ 15
- 10
Marlin/configurator/config/language.h View File

30
 // eu       Basque-Euskera
30
 // eu       Basque-Euskera
31
 // kana     Japanese
31
 // kana     Japanese
32
 // kana_utf Japanese
32
 // kana_utf Japanese
33
+// cn       Chinese
33
 
34
 
34
 #ifndef LANGUAGE_INCLUDE
35
 #ifndef LANGUAGE_INCLUDE
35
   // pick your language from the list above
36
   // pick your language from the list above
70
   #endif
71
   #endif
71
 #else
72
 #else
72
   #ifndef MACHINE_NAME
73
   #ifndef MACHINE_NAME
73
-    #define MACHINE_NAME "Mendel"
74
+    #define MACHINE_NAME "3D Printer"
74
   #endif
75
   #endif
75
 #endif
76
 #endif
76
 
77
 
129
 #define MSG_FILE_PRINTED                    "Done printing file"
130
 #define MSG_FILE_PRINTED                    "Done printing file"
130
 #define MSG_BEGIN_FILE_LIST                 "Begin file list"
131
 #define MSG_BEGIN_FILE_LIST                 "Begin file list"
131
 #define MSG_END_FILE_LIST                   "End file list"
132
 #define MSG_END_FILE_LIST                   "End file list"
132
-#define MSG_M104_INVALID_EXTRUDER           "M104 Invalid extruder "
133
-#define MSG_M105_INVALID_EXTRUDER           "M105 Invalid extruder "
134
-#define MSG_M200_INVALID_EXTRUDER           "M200 Invalid extruder "
135
-#define MSG_M218_INVALID_EXTRUDER           "M218 Invalid extruder "
136
-#define MSG_M221_INVALID_EXTRUDER           "M221 Invalid extruder "
133
+#define MSG_INVALID_EXTRUDER                "Invalid extruder"
134
+#define MSG_INVALID_SOLENOID                "Invalid solenoid"
135
+#define MSG_M104_INVALID_EXTRUDER           "M104 " MSG_INVALID_EXTRUDER " "
136
+#define MSG_M105_INVALID_EXTRUDER           "M105 " MSG_INVALID_EXTRUDER " "
137
+#define MSG_M109_INVALID_EXTRUDER           "M109 " MSG_INVALID_EXTRUDER " "
138
+#define MSG_M200_INVALID_EXTRUDER           "M200 " MSG_INVALID_EXTRUDER " "
139
+#define MSG_M218_INVALID_EXTRUDER           "M218 " MSG_INVALID_EXTRUDER " "
140
+#define MSG_M221_INVALID_EXTRUDER           "M221 " MSG_INVALID_EXTRUDER " "
137
 #define MSG_ERR_NO_THERMISTORS              "No thermistors - no temperature"
141
 #define MSG_ERR_NO_THERMISTORS              "No thermistors - no temperature"
138
-#define MSG_M109_INVALID_EXTRUDER           "M109 Invalid extruder "
139
 #define MSG_HEATING                         "Heating..."
142
 #define MSG_HEATING                         "Heating..."
140
 #define MSG_HEATING_COMPLETE                "Heating done."
143
 #define MSG_HEATING_COMPLETE                "Heating done."
141
 #define MSG_BED_HEATING                     "Bed Heating."
144
 #define MSG_BED_HEATING                     "Bed Heating."
147
 #define MSG_RESEND                          "Resend: "
150
 #define MSG_RESEND                          "Resend: "
148
 #define MSG_UNKNOWN_COMMAND                 "Unknown command: \""
151
 #define MSG_UNKNOWN_COMMAND                 "Unknown command: \""
149
 #define MSG_ACTIVE_EXTRUDER                 "Active Extruder: "
152
 #define MSG_ACTIVE_EXTRUDER                 "Active Extruder: "
150
-#define MSG_INVALID_EXTRUDER                "Invalid extruder"
151
-#define MSG_INVALID_SOLENOID                "Invalid solenoid"
152
 #define MSG_X_MIN                           "x_min: "
153
 #define MSG_X_MIN                           "x_min: "
153
 #define MSG_X_MAX                           "x_max: "
154
 #define MSG_X_MAX                           "x_max: "
154
 #define MSG_Y_MIN                           "y_min: "
155
 #define MSG_Y_MIN                           "y_min: "
157
 #define MSG_Z_MAX                           "z_max: "
158
 #define MSG_Z_MAX                           "z_max: "
158
 #define MSG_Z2_MAX                          "z2_max: "
159
 #define MSG_Z2_MAX                          "z2_max: "
159
 #define MSG_Z_PROBE                         "z_probe: "
160
 #define MSG_Z_PROBE                         "z_probe: "
161
+#define MSG_ERR_MATERIAL_INDEX              "M145 S<index> out of range (0-1)"
162
+#define MSG_ERR_M421_REQUIRES_XYZ           "M421 requires XYZ parameters"
163
+#define MSG_ERR_MESH_INDEX_OOB              "Mesh XY index is out of bounds"
164
+#define MSG_ERR_M428_TOO_FAR                "Too far from reference point"
160
 #define MSG_M119_REPORT                     "Reporting endstop status"
165
 #define MSG_M119_REPORT                     "Reporting endstop status"
161
 #define MSG_ENDSTOP_HIT                     "TRIGGERED"
166
 #define MSG_ENDSTOP_HIT                     "TRIGGERED"
162
 #define MSG_ENDSTOP_OPEN                    "open"
167
 #define MSG_ENDSTOP_OPEN                    "open"
209
 #define MSG_OK_B                            "ok B:"
214
 #define MSG_OK_B                            "ok B:"
210
 #define MSG_OK_T                            "ok T:"
215
 #define MSG_OK_T                            "ok T:"
211
 #define MSG_AT                              " @:"
216
 #define MSG_AT                              " @:"
212
-#define MSG_PID_AUTOTUNE_FINISHED           MSG_PID_AUTOTUNE " finished! Put the last Kp, Ki and Kd constants from above into Configuration.h"
217
+#define MSG_PID_AUTOTUNE_FINISHED           MSG_PID_AUTOTUNE " finished! Put the last Kp, Ki and Kd constants from below into Configuration.h"
213
 #define MSG_PID_DEBUG                       " PID_DEBUG "
218
 #define MSG_PID_DEBUG                       " PID_DEBUG "
214
 #define MSG_PID_DEBUG_INPUT                 ": Input "
219
 #define MSG_PID_DEBUG_INPUT                 ": Input "
215
 #define MSG_PID_DEBUG_OUTPUT                " Output "
220
 #define MSG_PID_DEBUG_OUTPUT                " Output "

Marlin/DOGMbitmaps.h → Marlin/dogm_bitmaps.h View File


+ 270
- 0
Marlin/dogm_font_data_ISO10646_CN.h View File

1
+/*
2
+  Fontname: ISO10646_CN
3
+  Copyright: A. Hardtung, public domain
4
+  Capital A Height: 7, '1' Height: 7
5
+  Calculated Max Values w=11 h=11 x= 2 y=10 dx=12 dy= 0 ascent=10 len=22
6
+  Font Bounding box     w=12 h=11 x= 0 y=-2
7
+  Calculated Min Values           x= 0 y=-1 dx= 0 dy= 0
8
+  Pure Font   ascent = 7 descent=-1
9
+  X Font      ascent = 7 descent=-1
10
+  Max Font    ascent =10 descent=-1
11
+*/
12
+#include <utility/u8g.h>
13
+const u8g_fntpgm_uint8_t ISO10646_CN[4105] U8G_SECTION(".progmem.ISO10646_CN") = {
14
+  0,12,11,0,254,7,1,146,3,33,32,255,255,10,255,7,
15
+  255,0,0,0,6,0,10,1,7,7,6,2,0,128,128,128,
16
+  128,128,0,128,3,2,2,6,1,5,160,160,5,7,7,6,
17
+  0,0,80,80,248,80,248,80,80,5,7,7,6,0,0,32,
18
+  120,160,112,40,240,32,5,7,7,6,0,0,192,200,16,32,
19
+  64,152,24,5,7,7,6,0,0,96,144,160,64,168,144,104,
20
+  2,3,3,6,1,4,192,64,128,3,7,7,6,1,0,32,
21
+  64,128,128,128,64,32,3,7,7,6,1,0,128,64,32,32,
22
+  32,64,128,5,5,5,6,0,1,32,168,112,168,32,5,5,
23
+  5,6,0,1,32,32,248,32,32,2,3,3,6,2,255,192,
24
+  64,128,5,1,1,6,0,3,248,2,2,2,6,2,0,192,
25
+  192,5,5,5,6,0,1,8,16,32,64,128,5,7,7,6,
26
+  0,0,112,136,152,168,200,136,112,3,7,7,6,1,0,64,
27
+  192,64,64,64,64,224,5,7,7,6,0,0,112,136,8,112,
28
+  128,128,248,5,7,7,6,0,0,248,16,32,16,8,8,240,
29
+  5,7,7,6,0,0,16,48,80,144,248,16,16,5,7,7,
30
+  6,0,0,248,128,240,8,8,136,112,5,7,7,6,0,0,
31
+  112,128,128,240,136,136,112,5,7,7,6,0,0,248,8,16,
32
+  32,32,32,32,5,7,7,6,0,0,112,136,136,112,136,136,
33
+  112,5,7,7,6,0,0,112,136,136,120,8,8,112,2,5,
34
+  5,6,2,0,192,192,0,192,192,2,6,6,6,2,255,192,
35
+  192,0,192,64,128,4,7,7,6,0,0,16,32,64,128,64,
36
+  32,16,5,3,3,6,0,2,248,0,248,4,7,7,6,0,
37
+  0,128,64,32,16,32,64,128,5,7,7,6,0,0,112,136,
38
+  8,16,32,0,32,5,7,7,6,0,0,112,136,8,104,168,
39
+  168,112,5,7,7,6,0,0,112,136,136,248,136,136,136,5,
40
+  7,7,6,0,0,240,136,136,240,136,136,240,5,7,7,6,
41
+  0,0,112,136,128,128,128,136,112,5,7,7,6,0,0,240,
42
+  136,136,136,136,136,240,5,7,7,6,0,0,248,128,128,240,
43
+  128,128,248,5,7,7,6,0,0,248,128,128,240,128,128,128,
44
+  5,7,7,6,0,0,112,136,128,184,136,136,112,5,7,7,
45
+  6,0,0,136,136,136,248,136,136,136,1,7,7,6,2,0,
46
+  128,128,128,128,128,128,128,5,7,7,6,0,0,56,16,16,
47
+  16,16,144,96,5,7,7,6,0,0,136,144,160,192,160,144,
48
+  136,5,7,7,6,0,0,128,128,128,128,128,128,248,5,7,
49
+  7,6,0,0,136,216,168,136,136,136,136,5,7,7,6,0,
50
+  0,136,136,200,168,152,136,136,5,7,7,6,0,0,112,136,
51
+  136,136,136,136,112,5,7,7,6,0,0,240,136,136,240,128,
52
+  128,128,5,7,7,6,0,0,112,136,136,136,168,144,104,5,
53
+  7,7,6,0,0,240,136,136,240,160,144,136,5,7,7,6,
54
+  0,0,120,128,128,112,8,8,240,5,7,7,6,0,0,248,
55
+  32,32,32,32,32,32,5,7,7,6,0,0,136,136,136,136,
56
+  136,136,112,5,7,7,6,0,0,136,136,136,136,136,80,32,
57
+  5,7,7,6,0,0,136,136,136,136,136,168,80,5,7,7,
58
+  6,0,0,136,136,80,32,80,136,136,5,7,7,6,0,0,
59
+  136,136,136,80,32,32,32,5,7,7,6,0,0,248,8,16,
60
+  32,64,128,248,3,7,7,6,0,0,224,128,128,128,128,128,
61
+  224,5,5,5,6,0,1,128,64,32,16,8,3,7,7,6,
62
+  0,0,224,32,32,32,32,32,224,5,3,3,6,0,4,32,
63
+  80,136,5,1,1,6,0,0,248,2,2,2,6,2,5,128,
64
+  64,5,5,5,6,0,0,112,8,120,136,120,5,7,7,6,
65
+  0,0,128,128,176,200,136,136,240,5,5,5,6,0,0,112,
66
+  128,128,136,112,5,7,7,6,0,0,8,8,104,152,136,136,
67
+  120,5,5,5,6,0,0,112,136,248,128,112,5,7,7,6,
68
+  0,0,48,72,224,64,64,64,64,5,6,6,6,0,255,112,
69
+  136,136,120,8,112,5,7,7,6,0,0,128,128,176,200,136,
70
+  136,136,1,7,7,6,2,0,128,0,128,128,128,128,128,3,
71
+  8,8,6,1,255,32,0,32,32,32,32,160,64,4,7,7,
72
+  6,1,0,128,128,144,160,192,160,144,3,7,7,6,1,0,
73
+  192,64,64,64,64,64,224,5,5,5,6,0,0,208,168,168,
74
+  168,168,5,5,5,6,0,0,176,200,136,136,136,5,5,5,
75
+  6,0,0,112,136,136,136,112,5,6,6,6,0,255,240,136,
76
+  136,240,128,128,5,6,6,6,0,255,120,136,136,120,8,8,
77
+  5,5,5,6,0,0,176,200,128,128,128,5,5,5,6,0,
78
+  0,112,128,112,8,240,4,7,7,6,0,0,64,64,224,64,
79
+  64,64,48,5,5,5,6,0,0,136,136,136,152,104,5,5,
80
+  5,6,0,0,136,136,136,80,32,5,5,5,6,0,0,136,
81
+  136,168,168,80,5,5,5,6,0,0,136,80,32,80,136,5,
82
+  6,6,6,0,255,136,136,136,120,8,112,5,5,5,6,0,
83
+  0,248,16,32,64,248,3,7,7,6,1,0,32,64,64,128,
84
+  64,64,32,1,7,7,6,2,0,128,128,128,128,128,128,128,
85
+  3,7,7,6,1,0,128,64,64,32,64,64,128,5,2,2,
86
+  6,0,3,104,144,0,0,0,6,0,10,0,0,0,12,0,
87
+  10,0,0,0,12,0,10,0,0,0,12,0,10,0,0,0,
88
+  12,0,10,0,0,0,12,0,10,0,0,0,12,0,10,0,
89
+  0,0,12,0,10,0,0,0,12,0,10,0,0,0,12,0,
90
+  10,0,0,0,12,0,10,0,0,0,12,0,10,0,0,0,
91
+  12,0,10,0,0,0,12,0,10,0,0,0,12,0,10,0,
92
+  0,0,12,0,10,0,0,0,12,0,10,0,0,0,12,0,
93
+  10,0,0,0,12,0,10,0,0,0,12,0,10,0,0,0,
94
+  12,0,10,0,0,0,12,0,10,0,0,0,12,0,10,0,
95
+  0,0,12,0,10,0,0,0,12,0,10,0,0,0,12,0,
96
+  10,0,0,0,12,0,10,0,0,0,12,0,10,0,0,0,
97
+  12,0,10,0,0,0,12,0,10,11,11,22,12,0,255,255,
98
+  224,2,0,2,0,4,0,13,0,20,128,36,64,196,32,4,
99
+  0,4,0,4,0,11,11,22,12,0,255,249,0,138,0,171,
100
+  224,172,64,170,64,170,64,170,64,170,128,33,0,82,128,140,
101
+  96,11,11,22,12,0,255,36,0,36,0,63,128,68,0,132,
102
+  0,4,0,255,224,10,0,17,0,32,128,192,96,11,11,22,
103
+  12,0,255,36,0,36,0,63,192,68,0,4,0,255,224,9,
104
+  0,9,0,17,32,33,32,64,224,11,11,22,12,0,255,32,
105
+  0,61,224,81,32,145,32,17,32,255,32,17,32,41,32,37,
106
+  224,69,32,128,0,11,11,22,12,0,255,32,128,127,192,8,
107
+  64,255,224,17,0,32,128,95,64,128,32,63,128,0,0,127,
108
+  192,11,11,22,12,0,255,34,64,71,224,148,128,228,128,47,
109
+  224,68,128,244,128,7,224,52,128,196,128,7,224,11,11,22,
110
+  12,0,255,4,128,143,224,73,0,25,0,47,192,9,0,9,
111
+  0,47,192,73,0,137,0,15,224,11,11,22,12,0,255,16,
112
+  0,63,128,81,0,14,0,49,128,192,96,63,128,36,128,63,
113
+  128,36,128,63,128,11,11,22,12,0,255,34,128,250,64,7,
114
+  224,250,128,138,128,138,128,250,128,34,128,178,128,170,160,100,
115
+  224,11,11,22,12,0,255,34,32,71,64,146,128,239,224,34,
116
+  0,71,192,236,64,7,192,52,64,199,192,4,64,11,11,22,
117
+  12,0,255,8,0,15,192,8,0,8,0,255,224,8,0,14,
118
+  0,9,128,8,64,8,0,8,0,10,11,22,12,0,255,255,
119
+  128,0,128,0,128,128,128,128,128,255,128,128,0,128,0,128,
120
+  64,128,64,127,192,11,11,22,12,0,255,71,192,65,0,239,
121
+  224,65,0,69,0,105,96,201,32,77,96,73,32,79,224,200,
122
+  32,11,11,22,12,0,255,8,0,4,0,4,0,10,0,10,
123
+  0,10,0,17,0,17,0,32,128,64,64,128,32,11,11,22,
124
+  12,0,255,34,64,34,0,247,224,34,0,35,224,53,32,229,
125
+  32,37,64,40,128,41,64,114,32,11,10,20,12,0,0,68,
126
+  64,68,64,68,64,127,192,4,0,4,0,132,32,132,32,132,
127
+  32,255,224,11,11,22,12,0,255,4,0,0,0,127,192,4,
128
+  0,4,0,4,0,127,192,4,0,4,0,4,0,255,224,11,
129
+  11,22,12,0,255,255,224,17,0,1,192,254,0,72,128,37,
130
+  0,4,0,255,224,21,0,36,128,196,96,11,11,22,12,0,
131
+  255,17,0,127,192,68,64,127,192,68,64,127,192,4,0,255,
132
+  224,4,0,4,0,4,0,9,11,22,12,0,255,16,0,255,
133
+  128,128,128,128,128,255,128,128,128,128,128,255,128,128,128,128,
134
+  128,255,128,11,11,22,12,0,255,113,0,1,0,3,224,249,
135
+  32,33,32,65,32,81,32,137,32,250,32,2,32,4,192,11,
136
+  11,22,12,0,255,127,192,17,0,17,0,17,0,17,0,255,
137
+  224,17,0,17,0,33,0,33,0,65,0,11,11,22,12,0,
138
+  255,33,0,34,0,244,64,87,224,80,32,87,192,148,64,84,
139
+  64,36,64,87,192,148,64,11,11,22,12,0,255,17,0,10,
140
+  0,127,192,4,0,4,0,255,224,4,0,10,0,17,0,32,
141
+  128,192,96,10,11,22,12,0,255,95,192,0,64,132,64,132,
142
+  64,191,64,132,64,140,64,148,64,164,64,140,64,129,192,11,
143
+  11,22,12,0,255,36,0,39,192,36,0,36,0,255,224,0,
144
+  0,20,64,36,128,71,0,12,0,112,0,11,11,22,12,0,
145
+  255,36,128,4,128,15,192,228,128,36,128,63,224,36,128,36,
146
+  128,40,128,80,0,143,224,11,11,22,12,0,255,8,0,8,
147
+  0,255,128,136,128,136,128,255,128,136,128,136,128,255,160,136,
148
+  32,7,224,11,11,22,12,0,255,39,128,36,128,244,128,36,
149
+  128,116,128,108,128,164,128,36,128,36,160,40,160,48,96,10,
150
+  11,22,12,0,255,255,192,128,64,128,64,158,64,146,64,146,
151
+  64,158,64,128,64,128,64,255,192,128,64,11,11,22,12,0,
152
+  255,127,192,68,0,95,192,80,64,95,192,80,64,95,192,66,
153
+  0,74,128,82,64,166,32,11,11,22,12,0,255,4,0,7,
154
+  224,4,0,127,192,64,64,64,64,64,64,127,192,0,0,82,
155
+  64,137,32,11,11,22,12,0,255,71,128,36,128,4,128,4,
156
+  128,232,96,32,0,47,192,36,64,34,128,49,0,38,192,11,
157
+  11,22,12,0,255,127,192,74,64,127,192,4,0,255,224,4,
158
+  0,63,128,32,128,36,128,36,128,255,224,11,11,22,12,0,
159
+  255,34,0,79,224,72,32,79,224,200,0,79,224,74,160,90,
160
+  160,111,224,74,160,72,96,11,11,22,12,0,255,243,192,36,
161
+  64,42,128,241,0,34,128,101,224,114,32,165,64,32,128,35,
162
+  0,44,0,11,11,22,12,0,255,4,0,255,224,128,32,0,
163
+  0,255,224,4,0,36,0,39,192,36,0,84,0,143,224,11,
164
+  11,22,12,0,255,115,224,16,128,81,0,35,224,250,32,42,
165
+  160,34,160,34,160,32,128,33,64,98,32,11,11,22,12,0,
166
+  255,34,0,247,128,34,128,54,128,226,160,37,160,36,96,104,
167
+  32,0,0,82,64,137,32,11,11,22,12,0,255,115,192,66,
168
+  0,66,0,123,224,74,64,74,64,122,64,74,64,66,64,68,
169
+  64,136,64,11,11,22,12,0,255,8,0,255,224,8,0,31,
170
+  192,48,64,95,192,144,64,31,192,16,64,16,64,16,192,11,
171
+  11,22,12,0,255,2,0,127,224,66,0,66,0,95,192,66,
172
+  0,71,0,74,128,82,64,98,32,130,0,11,11,22,12,0,
173
+  255,243,192,150,64,145,128,166,96,161,0,151,192,145,0,149,
174
+  0,231,224,129,0,129,0,11,11,22,12,0,255,15,128,136,
175
+  128,79,128,8,128,143,128,64,0,31,192,53,64,85,64,149,
176
+  64,63,224,11,11,22,12,0,255,39,224,32,128,248,128,32,
177
+  128,32,128,56,128,224,128,32,128,32,128,32,128,97,128,11,
178
+  11,22,12,0,255,31,224,145,0,87,192,20,64,23,192,148,
179
+  64,87,192,17,0,85,64,153,32,35,0,11,11,22,12,0,
180
+  255,32,128,39,224,242,64,33,128,34,64,52,32,226,64,34,
181
+  64,34,64,34,64,100,64,11,11,22,12,0,255,65,0,65,
182
+  0,79,224,233,32,73,32,73,32,111,224,201,32,73,32,73,
183
+  32,207,224,11,11,22,12,0,255,33,0,241,0,79,224,169,
184
+  32,249,32,47,224,57,32,233,32,41,32,47,224,40,32,11,
185
+  11,22,12,0,255,143,224,73,32,9,32,203,160,73,32,79,
186
+  224,72,32,75,160,74,160,107,160,80,224,11,11,22,12,0,
187
+  255,127,192,4,0,68,64,36,64,36,128,4,0,255,224,4,
188
+  0,4,0,4,0,4,0,11,11,22,12,0,255,130,0,66,
189
+  0,31,224,194,0,95,192,82,64,95,192,71,0,74,128,82,
190
+  64,191,224,11,11,22,12,0,255,4,0,127,224,72,128,127,
191
+  224,72,128,79,128,64,0,95,192,72,64,71,128,152,96,11,
192
+  11,22,12,0,255,1,0,239,224,161,0,164,64,175,224,164,
193
+  64,175,224,169,32,233,32,2,128,12,96,11,11,22,12,0,
194
+  255,20,192,246,160,188,96,167,128,168,128,191,224,169,32,239,
195
+  224,9,32,15,224,9,32,11,11,22,12,0,255,127,128,64,
196
+  128,66,128,98,128,84,128,72,128,72,128,84,160,98,160,64,
197
+  96,128,32,11,11,22,12,0,255,4,0,127,224,64,32,127,
198
+  224,64,0,125,224,84,32,76,160,84,96,100,160,141,96,11,
199
+  11,22,12,0,255,130,0,95,224,4,0,8,64,159,224,64,
200
+  32,10,128,10,128,74,160,146,160,34,96,11,11,22,12,0,
201
+  255,65,0,79,224,232,32,66,128,68,64,104,32,199,192,65,
202
+  0,65,0,65,0,207,224,11,11,22,12,0,255,80,32,125,
203
+  32,145,32,255,32,17,32,125,32,85,32,85,32,84,32,92,
204
+  32,16,224,11,11,22,12,0,255,63,128,32,128,63,128,32,
205
+  128,255,224,72,0,123,192,73,64,121,64,72,128,251,96,11,
206
+  11,22,12,0,255,4,0,4,0,4,0,36,128,36,64,68,
207
+  64,68,32,132,32,4,0,4,0,28,0,11,11,22,12,0,
208
+  255,4,0,4,0,4,0,255,224,4,0,10,0,10,0,17,
209
+  0,17,0,32,128,192,96,9,10,20,10,0,0,136,128,73,
210
+  0,8,0,255,128,0,128,0,128,127,128,0,128,0,128,255,
211
+  128,11,11,22,12,0,255,33,0,18,0,255,224,0,0,120,
212
+  128,74,128,122,128,74,128,122,128,72,128,89,128,11,11,22,
213
+  12,0,255,39,192,0,0,0,0,239,224,33,0,34,0,36,
214
+  64,47,224,32,32,80,0,143,224,11,11,22,12,0,255,32,
215
+  128,39,0,249,0,33,192,119,0,33,0,249,224,39,0,113,
216
+  32,169,32,32,224,11,11,22,12,0,255,16,64,16,64,253,
217
+  224,16,64,56,192,53,64,82,64,148,64,16,64,16,64,16,
218
+  192,11,11,22,12,0,255,0,64,248,64,11,224,8,64,136,
219
+  64,82,64,81,64,33,64,80,64,72,64,137,192,10,11,22,
220
+  12,0,255,132,0,132,64,132,128,245,0,134,0,132,0,132,
221
+  0,148,0,164,64,196,64,131,192,11,11,22,12,0,255,17,
222
+  32,125,0,17,0,255,224,41,0,253,64,73,64,124,128,8,
223
+  160,253,96,10,32,11,11,22,12,0,255,23,192,36,64,36,
224
+  64,103,192,161,0,47,224,33,0,35,128,37,64,41,32,33,
225
+  0,11,11,22,12,0,255,8,0,255,224,16,0,39,192,32,
226
+  128,97,0,175,224,33,0,33,0,33,0,35,0,11,11,22,
227
+  12,0,255,36,0,47,224,180,0,164,128,164,160,170,192,42,
228
+  128,40,128,41,64,50,64,36,32,11,11,22,12,0,255,127,
229
+  224,128,0,63,192,32,64,63,192,16,0,31,192,16,64,40,
230
+  128,71,0,56,224,11,11,22,12,0,255,127,224,64,0,64,
231
+  0,64,0,64,0,64,0,64,0,64,0,64,0,64,0,128,
232
+  0,11,11,22,12,0,255,255,224,4,0,127,192,68,64,127,
233
+  192,68,64,127,192,68,0,36,0,24,0,231,224,11,11,22,
234
+  12,0,255,17,224,253,0,69,0,41,224,253,64,17,64,125,
235
+  64,17,64,85,64,146,64,52,64,11,11,22,12,0,255,33,
236
+  0,95,224,64,0,207,192,64,0,79,192,64,0,79,192,72,
237
+  64,79,192,72,64,11,11,22,12,0,255,4,0,127,192,64,
238
+  64,127,192,64,64,127,192,64,64,127,192,4,64,82,32,191,
239
+  160,11,11,22,12,0,255,127,192,68,64,127,192,68,64,127,
240
+  192,4,0,27,0,224,224,17,0,17,0,97,0,11,11,22,
241
+  12,0,255,255,224,4,0,8,0,127,224,73,32,79,32,73,
242
+  32,79,32,73,32,73,32,127,224,11,11,22,12,0,255,253,
243
+  224,86,64,121,64,56,128,85,64,146,32,255,224,4,0,39,
244
+  192,36,0,255,224,11,11,22,12,0,255,251,128,82,0,123,
245
+  224,18,64,250,64,20,64,63,128,32,128,63,128,32,128,63,
246
+  128,11,11,22,12,0,255,31,224,32,0,39,192,100,64,167,
247
+  192,32,0,47,224,40,32,39,192,33,0,35,0,11,11,22,
248
+  12,0,255,243,224,130,32,130,32,250,32,130,32,130,32,138,
249
+  32,178,32,194,224,2,0,2,0,11,11,22,12,0,255,36,
250
+  128,70,160,149,192,228,128,39,224,68,128,245,192,6,160,52,
251
+  128,196,128,7,224,11,11,22,12,0,255,39,192,65,0,135,
252
+  224,224,32,34,128,69,128,242,128,15,224,48,128,193,64,2,
253
+  32,11,11,22,12,0,255,2,0,2,0,34,0,35,192,34,
254
+  0,34,0,34,0,34,0,34,0,34,0,255,224,9,11,22,
255
+  12,0,255,8,0,8,0,255,128,136,128,136,128,136,128,255,
256
+  128,136,128,136,128,136,128,255,128,11,11,22,12,0,255,33,
257
+  0,83,160,65,0,247,224,81,0,83,192,86,64,83,192,90,
258
+  64,83,192,66,64,11,11,22,12,0,255,127,192,4,0,4,
259
+  0,4,0,255,224,10,0,10,0,18,0,34,32,66,32,129,
260
+  224,11,11,22,12,0,255,17,0,33,0,47,224,97,0,163,
261
+  128,35,128,37,64,37,64,41,32,33,0,33,0,11,11,22,
262
+  12,0,255,247,224,148,32,244,32,151,224,148,128,244,128,151,
263
+  224,148,128,244,160,150,96,4,32,11,11,22,12,0,255,123,
264
+  224,148,128,4,0,127,192,4,0,255,224,1,0,255,224,33,
265
+  0,17,0,7,0,11,11,22,12,0,255,33,0,71,192,145,
266
+  0,47,224,96,128,175,224,32,128,36,128,34,128,32,128,35,
267
+  128,11,11,22,12,0,255,39,192,36,64,247,192,46,224,42,
268
+  160,62,224,225,0,47,224,35,128,37,64,105,32,11,11,22,
269
+  12,0,255,20,0,39,224,42,0,98,0,163,192,34,0,34,
270
+  0,35,224,34,0,34,0,34,0};

+ 31
- 11
Marlin/dogm_lcd_implementation.h View File

29
 #endif
29
 #endif
30
 
30
 
31
 #include <U8glib.h>
31
 #include <U8glib.h>
32
-#include "DOGMbitmaps.h"
32
+#include "dogm_bitmaps.h"
33
 
33
 
34
 #include "ultralcd.h"
34
 #include "ultralcd.h"
35
 #include "ultralcd_st7920_u8glib_rrd.h"
35
 #include "ultralcd_st7920_u8glib_rrd.h"
64
   #elif defined( DISPLAY_CHARSET_ISO10646_KANA )
64
   #elif defined( DISPLAY_CHARSET_ISO10646_KANA )
65
     #include "dogm_font_data_ISO10646_Kana.h"
65
     #include "dogm_font_data_ISO10646_Kana.h"
66
     #define FONT_MENU_NAME ISO10646_Kana_5x7
66
     #define FONT_MENU_NAME ISO10646_Kana_5x7
67
+  #elif defined( DISPLAY_CHARSET_ISO10646_CN )
68
+    #include "dogm_font_data_ISO10646_CN.h"
69
+    #define FONT_MENU_NAME ISO10646_CN
70
+    #define TALL_FONT_CORRECTION 1
67
   #else // fall-back
71
   #else // fall-back
68
     #include "dogm_font_data_ISO10646_1.h"
72
     #include "dogm_font_data_ISO10646_1.h"
69
     #define FONT_MENU_NAME ISO10646_1_5x7
73
     #define FONT_MENU_NAME ISO10646_1_5x7
106
   #define LCD_WIDTH_EDIT       22
110
   #define LCD_WIDTH_EDIT       22
107
 #endif
111
 #endif
108
 
112
 
113
+#ifndef TALL_FONT_CORRECTION
114
+  #define TALL_FONT_CORRECTION 0
115
+#endif
116
+
109
 #define START_ROW              0
117
 #define START_ROW              0
110
 
118
 
111
 // LCD selection
119
 // LCD selection
123
   U8GLIB_DOGM128 u8g(DOGLCD_CS, DOGLCD_A0);  // HW-SPI Com: CS, A0
131
   U8GLIB_DOGM128 u8g(DOGLCD_CS, DOGLCD_A0);  // HW-SPI Com: CS, A0
124
 #endif
132
 #endif
125
 
133
 
134
+#ifndef LCD_PIXEL_WIDTH
135
+  #define LCD_PIXEL_WIDTH 128
136
+#endif
137
+#ifndef LCD_PIXEL_HEIGHT
138
+  #define LCD_PIXEL_HEIGHT 64
139
+#endif
140
+
126
 #include "utf_mapper.h"
141
 #include "utf_mapper.h"
127
 
142
 
128
 int lcd_contrast;
143
 int lcd_contrast;
172
 
187
 
173
 static bool show_splashscreen = true;
188
 static bool show_splashscreen = true;
174
 
189
 
190
+/* Warning: This function is called from interrupt context */
175
 static void lcd_implementation_init() {
191
 static void lcd_implementation_init() {
176
 
192
 
177
   #ifdef LCD_PIN_BL // Enable LCD backlight
193
   #ifdef LCD_PIN_BL // Enable LCD backlight
252
  
268
  
253
   #ifdef SDSUPPORT
269
   #ifdef SDSUPPORT
254
     // SD Card Symbol
270
     // SD Card Symbol
255
-    u8g.drawBox(42,42,8,7);
256
-    u8g.drawBox(50,44,2,5);
257
-    u8g.drawFrame(42,49,10,4);
258
-    u8g.drawPixel(50,43);
271
+    u8g.drawBox(42, 42 - TALL_FONT_CORRECTION, 8, 7);
272
+    u8g.drawBox(50, 44 - TALL_FONT_CORRECTION, 2, 5);
273
+    u8g.drawFrame(42, 49 - TALL_FONT_CORRECTION, 10, 4);
274
+    u8g.drawPixel(50, 43 - TALL_FONT_CORRECTION);
275
+
259
 
276
 
260
     // Progress bar frame
277
     // Progress bar frame
261
-    u8g.drawFrame(54,49,73,4);
278
+    u8g.drawFrame(54, 49, 73, 4 - TALL_FONT_CORRECTION);
262
 
279
 
263
     // SD Card Progress bar and clock
280
     // SD Card Progress bar and clock
264
     lcd_setFont(FONT_STATUSMENU);
281
     lcd_setFont(FONT_STATUSMENU);
265
  
282
  
266
     if (IS_SD_PRINTING) {
283
     if (IS_SD_PRINTING) {
267
       // Progress bar solid part
284
       // Progress bar solid part
268
-      u8g.drawBox(55, 50, (unsigned int)(71.f * card.percentDone() / 100.f), 2);
285
+      u8g.drawBox(55, 50, (unsigned int)(71.f * card.percentDone() / 100.f), 2 - TALL_FONT_CORRECTION);
269
     }
286
     }
270
 
287
 
271
     u8g.setPrintPos(80,48);
288
     u8g.setPrintPos(80,48);
306
   lcd_setFont(FONT_STATUSMENU);
323
   lcd_setFont(FONT_STATUSMENU);
307
 
324
 
308
   #ifdef USE_SMALL_INFOFONT
325
   #ifdef USE_SMALL_INFOFONT
309
-    u8g.drawBox(0,30,128,10);
326
+    u8g.drawBox(0,30,LCD_PIXEL_WIDTH,10);
310
   #else
327
   #else
311
-    u8g.drawBox(0,30,128,9);
328
+    u8g.drawBox(0,30,LCD_PIXEL_WIDTH,9);
312
   #endif
329
   #endif
313
   u8g.setColorIndex(0); // white on black
330
   u8g.setColorIndex(0); // white on black
314
   u8g.setPrintPos(2,XYZ_BASELINE);
331
   u8g.setPrintPos(2,XYZ_BASELINE);
366
 static void lcd_implementation_mark_as_selected(uint8_t row, bool isSelected) {
383
 static void lcd_implementation_mark_as_selected(uint8_t row, bool isSelected) {
367
   if (isSelected) {
384
   if (isSelected) {
368
     u8g.setColorIndex(1);  // black on white
385
     u8g.setColorIndex(1);  // black on white
369
-    u8g.drawBox(0, row * DOG_CHAR_HEIGHT + 3, 128, DOG_CHAR_HEIGHT);
386
+    u8g.drawBox(0, row * DOG_CHAR_HEIGHT + 3 - TALL_FONT_CORRECTION, LCD_PIXEL_WIDTH, DOG_CHAR_HEIGHT);
370
     u8g.setColorIndex(0);  // following text must be white on black
387
     u8g.setColorIndex(0);  // following text must be white on black
371
   }
388
   }
372
   else {
389
   else {
386
     pstr++;
403
     pstr++;
387
   }
404
   }
388
   while (n--) lcd_print(' ');
405
   while (n--) lcd_print(' ');
406
+    u8g.setPrintPos(LCD_PIXEL_WIDTH - DOG_CHAR_WIDTH, (row + 1) * DOG_CHAR_HEIGHT);
389
   lcd_print(post_char);
407
   lcd_print(post_char);
390
   lcd_print(' ');
408
   lcd_print(' ');
391
 }
409
 }
392
 
410
 
393
 static void _drawmenu_setting_edit_generic(bool isSelected, uint8_t row, const char* pstr, const char* data, bool pgm) {
411
 static void _drawmenu_setting_edit_generic(bool isSelected, uint8_t row, const char* pstr, const char* data, bool pgm) {
394
   char c;
412
   char c;
395
-  uint8_t n = LCD_WIDTH - 2 - (pgm ? lcd_strlen_P(data) : (lcd_strlen((char*)data)));
413
+  uint8_t vallen = (pgm ? lcd_strlen_P(data) : (lcd_strlen((char*)data)));
414
+  uint8_t n = LCD_WIDTH - 2 - vallen;
396
 
415
 
397
   lcd_implementation_mark_as_selected(row, isSelected);
416
   lcd_implementation_mark_as_selected(row, isSelected);
398
 
417
 
402
   }
421
   }
403
   lcd_print(':');
422
   lcd_print(':');
404
   while (n--) lcd_print(' ');
423
   while (n--) lcd_print(' ');
424
+  u8g.setPrintPos(LCD_PIXEL_WIDTH - DOG_CHAR_WIDTH * vallen, (row + 1) * DOG_CHAR_HEIGHT);
405
   if (pgm) { lcd_printPGM(data); } else { lcd_print((char *)data); }
425
   if (pgm) { lcd_printPGM(data); } else { lcd_print((char *)data); }
406
 }
426
 }
407
 
427
 

+ 38
- 42
Marlin/example_configurations/Felix/Configuration.h View File

1
-#ifndef CONFIGURATION_H
1
+#ifndef CONFIGURATION_H
2
 #define CONFIGURATION_H
2
 #define CONFIGURATION_H
3
 
3
 
4
 #include "boards.h"
4
 #include "boards.h"
39
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
39
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
40
 // build by the user have been successfully uploaded into firmware.
40
 // build by the user have been successfully uploaded into firmware.
41
 #define STRING_VERSION "1.0.3 dev"
41
 #define STRING_VERSION "1.0.3 dev"
42
-#define STRING_URL "reprap.org"
43
 #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
42
 #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
44
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
43
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
45
 #define STRING_SPLASH_LINE1 "v" STRING_VERSION // will be shown during bootup in line 1
44
 #define STRING_SPLASH_LINE1 "v" STRING_VERSION // will be shown during bootup in line 1
237
 #define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
236
 #define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
238
 
237
 
239
 //===========================================================================
238
 //===========================================================================
240
-//============================= Thermal Runaway Protection ==================
239
+//======================== Thermal Runaway Protection =======================
241
 //===========================================================================
240
 //===========================================================================
242
-/*
243
-This is a feature to protect your printer from burn up in flames if it has
244
-a thermistor coming off place (this happened to a friend of mine recently and
245
-motivated me writing this feature).
246
-
247
-The issue: If a thermistor come off, it will read a lower temperature than actual.
248
-The system will turn the heater on forever, burning up the filament and anything
249
-else around.
250
-
251
-After the temperature reaches the target for the first time, this feature will
252
-start measuring for how long the current temperature stays below the target
253
-minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS).
254
-
255
-If it stays longer than _PERIOD, it means the thermistor temperature
256
-cannot catch up with the target, so something *may be* wrong. Then, to be on the
257
-safe side, the system will he halt.
258
 
241
 
259
-Bear in mind the count down will just start AFTER the first time the
260
-thermistor temperature is over the target, so you will have no problem if
261
-your extruder heater takes 2 minutes to hit the target on heating.
262
-
263
-*/
264
-// If you want to enable this feature for all your extruder heaters,
265
-// uncomment the 2 defines below:
242
+/**
243
+ * Thermal Runaway Protection protects your printer from damage and fire if a
244
+ * thermistor falls out or temperature sensors fail in any way.
245
+ *
246
+ * The issue: If a thermistor falls out or a temperature sensor fails,
247
+ * Marlin can no longer sense the actual temperature. Since a disconnected
248
+ * thermistor reads as a low temperature, the firmware will keep the heater on.
249
+ *
250
+ * The solution: Once the temperature reaches the target, start observing.
251
+ * If the temperature stays too far below the target (hysteresis) for too long,
252
+ * the firmware will halt as a safety precaution.
253
+ *
254
+ * Note that because the countdown starts only AFTER the temperature reaches
255
+ * the target, this will not catch a thermistor that is already disconnected
256
+ * when the print starts!
257
+ *
258
+ * To enable for all extruder heaters, uncomment the two defines below:
259
+ */
266
 
260
 
267
 // Parameters for all extruder heaters
261
 // Parameters for all extruder heaters
268
-//#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds
269
-//#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius
262
+#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 // in seconds
263
+#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius
270
 
264
 
271
-// If you want to enable this feature for your bed heater,
272
-// uncomment the 2 defines below:
265
+// To enable for the bed heater, uncomment the two defines below:
273
 
266
 
274
 // Parameters for the bed heater
267
 // Parameters for the bed heater
275
-//#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds
276
-//#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius
277
-
268
+#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 // in seconds
269
+#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius
278
 
270
 
279
 //===========================================================================
271
 //===========================================================================
280
 //============================= Mechanical Settings =========================
272
 //============================= Mechanical Settings =========================
317
 #define E_ENABLE_ON 0 // For all extruders
309
 #define E_ENABLE_ON 0 // For all extruders
318
 
310
 
319
 // Disables axis when it's not being used.
311
 // Disables axis when it's not being used.
312
+// WARNING: When motors turn off there is a chance of losing position accuracy!
320
 #define DISABLE_X false
313
 #define DISABLE_X false
321
 #define DISABLE_Y false
314
 #define DISABLE_Y false
322
 #define DISABLE_Z false
315
 #define DISABLE_Z false
350
 #define Z_MAX_POS 235
343
 #define Z_MAX_POS 235
351
 
344
 
352
 //===========================================================================
345
 //===========================================================================
353
-//============================= Filament Runout Sensor ======================
346
+//========================= Filament Runout Sensor ==========================
354
 //===========================================================================
347
 //===========================================================================
355
 //#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament
348
 //#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament
356
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
349
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
357
                                  // It is assumed that when logic high = filament available
350
                                  // It is assumed that when logic high = filament available
358
                                  //                    when logic  low = filament ran out
351
                                  //                    when logic  low = filament ran out
359
-//const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
360
-//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
361
-
352
+#ifdef FILAMENT_RUNOUT_SENSOR
353
+  const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
354
+  #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
355
+  #define FILAMENT_RUNOUT_SCRIPT "M600"
356
+#endif 
357
+  
362
 //===========================================================================
358
 //===========================================================================
363
-//============================ Manual Bed Leveling ==========================
359
+//=========================== Manual Bed Leveling ===========================
364
 //===========================================================================
360
 //===========================================================================
365
 
361
 
366
 // #define MANUAL_BED_LEVELING  // Add display menu option for bed leveling
362
 // #define MANUAL_BED_LEVELING  // Add display menu option for bed leveling
381
 #endif  // MESH_BED_LEVELING
377
 #endif  // MESH_BED_LEVELING
382
 
378
 
383
 //===========================================================================
379
 //===========================================================================
384
-//============================= Bed Auto Leveling ===========================
380
+//============================ Bed Auto Leveling ============================
385
 //===========================================================================
381
 //===========================================================================
386
 
382
 
387
 //#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line)
383
 //#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line)
574
 //==============================LCD and SD support=============================
570
 //==============================LCD and SD support=============================
575
 
571
 
576
 // Define your display language below. Replace (en) with your language code and uncomment.
572
 // Define your display language below. Replace (en) with your language code and uncomment.
577
-// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
573
+// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, cn, test
578
 // See also language.h
574
 // See also language.h
579
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
575
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
580
 
576
 
594
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
590
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
595
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
591
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
596
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
592
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
597
-//#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
598
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
593
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
599
-                                               // 0 to disable buzzer feedback  
594
+//#define LCD_FEEDBACK_FREQUENCY_HZ 1000         // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
595
+                                                 // 0 to disable buzzer feedback. Test with M300 S<frequency Hz> P<duration ms>
600
 
596
 
601
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
597
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
602
 // http://reprap.org/wiki/PanelOne
598
 // http://reprap.org/wiki/PanelOne

+ 37
- 41
Marlin/example_configurations/Felix/Configuration_DUAL.h View File

39
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
39
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
40
 // build by the user have been successfully uploaded into firmware.
40
 // build by the user have been successfully uploaded into firmware.
41
 #define STRING_VERSION "1.0.3 dev"
41
 #define STRING_VERSION "1.0.3 dev"
42
-#define STRING_URL "reprap.org"
43
 #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
42
 #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
44
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
43
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
45
 #define STRING_SPLASH_LINE1 "v" STRING_VERSION // will be shown during bootup in line 1
44
 #define STRING_SPLASH_LINE1 "v" STRING_VERSION // will be shown during bootup in line 1
237
 #define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
236
 #define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
238
 
237
 
239
 //===========================================================================
238
 //===========================================================================
240
-//============================= Thermal Runaway Protection ==================
239
+//======================== Thermal Runaway Protection =======================
241
 //===========================================================================
240
 //===========================================================================
242
-/*
243
-This is a feature to protect your printer from burn up in flames if it has
244
-a thermistor coming off place (this happened to a friend of mine recently and
245
-motivated me writing this feature).
246
-
247
-The issue: If a thermistor come off, it will read a lower temperature than actual.
248
-The system will turn the heater on forever, burning up the filament and anything
249
-else around.
250
-
251
-After the temperature reaches the target for the first time, this feature will
252
-start measuring for how long the current temperature stays below the target
253
-minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS).
254
-
255
-If it stays longer than _PERIOD, it means the thermistor temperature
256
-cannot catch up with the target, so something *may be* wrong. Then, to be on the
257
-safe side, the system will he halt.
258
 
241
 
259
-Bear in mind the count down will just start AFTER the first time the
260
-thermistor temperature is over the target, so you will have no problem if
261
-your extruder heater takes 2 minutes to hit the target on heating.
262
-
263
-*/
264
-// If you want to enable this feature for all your extruder heaters,
265
-// uncomment the 2 defines below:
242
+/**
243
+ * Thermal Runaway Protection protects your printer from damage and fire if a
244
+ * thermistor falls out or temperature sensors fail in any way.
245
+ *
246
+ * The issue: If a thermistor falls out or a temperature sensor fails,
247
+ * Marlin can no longer sense the actual temperature. Since a disconnected
248
+ * thermistor reads as a low temperature, the firmware will keep the heater on.
249
+ *
250
+ * The solution: Once the temperature reaches the target, start observing.
251
+ * If the temperature stays too far below the target (hysteresis) for too long,
252
+ * the firmware will halt as a safety precaution.
253
+ *
254
+ * Note that because the countdown starts only AFTER the temperature reaches
255
+ * the target, this will not catch a thermistor that is already disconnected
256
+ * when the print starts!
257
+ *
258
+ * To enable for all extruder heaters, uncomment the two defines below:
259
+ */
266
 
260
 
267
 // Parameters for all extruder heaters
261
 // Parameters for all extruder heaters
268
-//#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds
269
-//#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius
262
+#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 // in seconds
263
+#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius
270
 
264
 
271
-// If you want to enable this feature for your bed heater,
272
-// uncomment the 2 defines below:
265
+// To enable for the bed heater, uncomment the two defines below:
273
 
266
 
274
 // Parameters for the bed heater
267
 // Parameters for the bed heater
275
-//#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds
276
-//#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius
277
-
268
+#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 // in seconds
269
+#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius
278
 
270
 
279
 //===========================================================================
271
 //===========================================================================
280
 //============================= Mechanical Settings =========================
272
 //============================= Mechanical Settings =========================
317
 #define E_ENABLE_ON 0 // For all extruders
309
 #define E_ENABLE_ON 0 // For all extruders
318
 
310
 
319
 // Disables axis when it's not being used.
311
 // Disables axis when it's not being used.
312
+// WARNING: When motors turn off there is a chance of losing position accuracy!
320
 #define DISABLE_X false
313
 #define DISABLE_X false
321
 #define DISABLE_Y false
314
 #define DISABLE_Y false
322
 #define DISABLE_Z false
315
 #define DISABLE_Z false
350
 #define Z_MAX_POS 235
343
 #define Z_MAX_POS 235
351
 
344
 
352
 //===========================================================================
345
 //===========================================================================
353
-//============================= Filament Runout Sensor ======================
346
+//========================= Filament Runout Sensor ==========================
354
 //===========================================================================
347
 //===========================================================================
355
 //#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament
348
 //#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament
356
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
349
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
357
                                  // It is assumed that when logic high = filament available
350
                                  // It is assumed that when logic high = filament available
358
                                  //                    when logic  low = filament ran out
351
                                  //                    when logic  low = filament ran out
359
-//const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
360
-//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
361
-
352
+#ifdef FILAMENT_RUNOUT_SENSOR
353
+  const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
354
+  #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
355
+  #define FILAMENT_RUNOUT_SCRIPT "M600"
356
+#endif 
357
+  
362
 //===========================================================================
358
 //===========================================================================
363
-//============================ Manual Bed Leveling ==========================
359
+//=========================== Manual Bed Leveling ===========================
364
 //===========================================================================
360
 //===========================================================================
365
 
361
 
366
 // #define MANUAL_BED_LEVELING  // Add display menu option for bed leveling
362
 // #define MANUAL_BED_LEVELING  // Add display menu option for bed leveling
377
 #endif  // MESH_BED_LEVELING
373
 #endif  // MESH_BED_LEVELING
378
 
374
 
379
 //===========================================================================
375
 //===========================================================================
380
-//============================= Bed Auto Leveling ===========================
376
+//============================ Bed Auto Leveling ============================
381
 //===========================================================================
377
 //===========================================================================
382
 
378
 
383
 //#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line)
379
 //#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line)
570
 //==============================LCD and SD support=============================
566
 //==============================LCD and SD support=============================
571
 
567
 
572
 // Define your display language below. Replace (en) with your language code and uncomment.
568
 // Define your display language below. Replace (en) with your language code and uncomment.
573
-// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
569
+// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, cn, test
574
 // See also language.h
570
 // See also language.h
575
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
571
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
576
 
572
 
590
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
586
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
591
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
587
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
592
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
588
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
593
-//#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
594
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
589
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
595
-                                               // 0 to disable buzzer feedback  
590
+//#define LCD_FEEDBACK_FREQUENCY_HZ 1000         // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
591
+                                                 // 0 to disable buzzer feedback. Test with M300 S<frequency Hz> P<duration ms>
596
 
592
 
597
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
593
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
598
 // http://reprap.org/wiki/PanelOne
594
 // http://reprap.org/wiki/PanelOne

+ 4
- 2
Marlin/example_configurations/Felix/Configuration_adv.h View File

195
 #define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
195
 #define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
197
 
197
 
198
+// When G28 is called, this option will make Y home before X
199
+// #define HOME_Y_BEFORE_X
200
+
198
 // @section machine
201
 // @section machine
199
 
202
 
200
 #define AXIS_RELATIVE_MODES {false, false, false, false}
203
 #define AXIS_RELATIVE_MODES {false, false, false, false}
258
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
261
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
259
 #define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
262
 #define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
260
 #define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
263
 #define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
261
-//#define ENCODER_RATE_MULTIPLIER_DEBUG  // If defined, output the encoder steps per second value
262
 
264
 
263
 //#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/
265
 //#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/
264
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
266
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
355
 //#define HEATERS_PARALLEL
357
 //#define HEATERS_PARALLEL
356
 
358
 
357
 //===========================================================================
359
 //===========================================================================
358
-//=============================Buffers           ============================
360
+//================================= Buffers =================================
359
 //===========================================================================
361
 //===========================================================================
360
 
362
 
361
 // @section hidden
363
 // @section hidden

+ 38
- 42
Marlin/example_configurations/Hephestos/Configuration.h View File

1
-#ifndef CONFIGURATION_H
1
+#ifndef CONFIGURATION_H
2
 #define CONFIGURATION_H
2
 #define CONFIGURATION_H
3
 
3
 
4
 #include "boards.h"
4
 #include "boards.h"
39
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
39
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
40
 // build by the user have been successfully uploaded into firmware.
40
 // build by the user have been successfully uploaded into firmware.
41
 #define STRING_VERSION "1.0.3 dev"
41
 #define STRING_VERSION "1.0.3 dev"
42
-#define STRING_URL "reprap.org"
43
 #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
42
 #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
44
 #define STRING_CONFIG_H_AUTHOR "(bq Hephestos)" // Who made the changes.
43
 #define STRING_CONFIG_H_AUTHOR "(bq Hephestos)" // Who made the changes.
45
 #define STRING_SPLASH_LINE1 "v" STRING_VERSION // will be shown during bootup in line 1
44
 #define STRING_SPLASH_LINE1 "v" STRING_VERSION // will be shown during bootup in line 1
258
 #define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
257
 #define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
259
 
258
 
260
 //===========================================================================
259
 //===========================================================================
261
-//============================= Thermal Runaway Protection ==================
260
+//======================== Thermal Runaway Protection =======================
262
 //===========================================================================
261
 //===========================================================================
263
-/*
264
-This is a feature to protect your printer from burn up in flames if it has
265
-a thermistor coming off place (this happened to a friend of mine recently and
266
-motivated me writing this feature).
267
-
268
-The issue: If a thermistor come off, it will read a lower temperature than actual.
269
-The system will turn the heater on forever, burning up the filament and anything
270
-else around.
271
-
272
-After the temperature reaches the target for the first time, this feature will
273
-start measuring for how long the current temperature stays below the target
274
-minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS).
275
-
276
-If it stays longer than _PERIOD, it means the thermistor temperature
277
-cannot catch up with the target, so something *may be* wrong. Then, to be on the
278
-safe side, the system will he halt.
279
 
262
 
280
-Bear in mind the count down will just start AFTER the first time the
281
-thermistor temperature is over the target, so you will have no problem if
282
-your extruder heater takes 2 minutes to hit the target on heating.
283
-
284
-*/
285
-// If you want to enable this feature for all your extruder heaters,
286
-// uncomment the 2 defines below:
263
+/**
264
+ * Thermal Runaway Protection protects your printer from damage and fire if a
265
+ * thermistor falls out or temperature sensors fail in any way.
266
+ *
267
+ * The issue: If a thermistor falls out or a temperature sensor fails,
268
+ * Marlin can no longer sense the actual temperature. Since a disconnected
269
+ * thermistor reads as a low temperature, the firmware will keep the heater on.
270
+ *
271
+ * The solution: Once the temperature reaches the target, start observing.
272
+ * If the temperature stays too far below the target (hysteresis) for too long,
273
+ * the firmware will halt as a safety precaution.
274
+ *
275
+ * Note that because the countdown starts only AFTER the temperature reaches
276
+ * the target, this will not catch a thermistor that is already disconnected
277
+ * when the print starts!
278
+ *
279
+ * To enable for all extruder heaters, uncomment the two defines below:
280
+ */
287
 
281
 
288
 // Parameters for all extruder heaters
282
 // Parameters for all extruder heaters
289
-//#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds
290
-//#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius
283
+#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 // in seconds
284
+#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius
291
 
285
 
292
-// If you want to enable this feature for your bed heater,
293
-// uncomment the 2 defines below:
286
+// To enable for the bed heater, uncomment the two defines below:
294
 
287
 
295
 // Parameters for the bed heater
288
 // Parameters for the bed heater
296
-//#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds
297
-//#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius
298
-
289
+#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 // in seconds
290
+#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius
299
 
291
 
300
 //===========================================================================
292
 //===========================================================================
301
 //============================= Mechanical Settings =========================
293
 //============================= Mechanical Settings =========================
338
 #define E_ENABLE_ON 0 // For all extruders
330
 #define E_ENABLE_ON 0 // For all extruders
339
 
331
 
340
 // Disables axis when it's not being used.
332
 // Disables axis when it's not being used.
333
+// WARNING: When motors turn off there is a chance of losing position accuracy!
341
 #define DISABLE_X false
334
 #define DISABLE_X false
342
 #define DISABLE_Y false
335
 #define DISABLE_Y false
343
 #define DISABLE_Z false
336
 #define DISABLE_Z false
371
 #define Z_MAX_POS 180
364
 #define Z_MAX_POS 180
372
 
365
 
373
 //===========================================================================
366
 //===========================================================================
374
-//============================= Filament Runout Sensor ======================
367
+//========================= Filament Runout Sensor ==========================
375
 //===========================================================================
368
 //===========================================================================
376
 //#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament
369
 //#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament
377
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
370
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
378
                                  // It is assumed that when logic high = filament available
371
                                  // It is assumed that when logic high = filament available
379
                                  //                    when logic  low = filament ran out
372
                                  //                    when logic  low = filament ran out
380
-//const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
381
-//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
382
-
373
+#ifdef FILAMENT_RUNOUT_SENSOR
374
+  const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
375
+  #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
376
+  #define FILAMENT_RUNOUT_SCRIPT "M600"
377
+#endif 
378
+  
383
 //===========================================================================
379
 //===========================================================================
384
-//============================ Manual Bed Leveling ==========================
380
+//=========================== Manual Bed Leveling ===========================
385
 //===========================================================================
381
 //===========================================================================
386
 
382
 
387
 // #define MANUAL_BED_LEVELING  // Add display menu option for bed leveling
383
 // #define MANUAL_BED_LEVELING  // Add display menu option for bed leveling
402
 #endif  // MESH_BED_LEVELING
398
 #endif  // MESH_BED_LEVELING
403
 
399
 
404
 //===========================================================================
400
 //===========================================================================
405
-//============================= Bed Auto Leveling ===========================
401
+//============================ Bed Auto Leveling ============================
406
 //===========================================================================
402
 //===========================================================================
407
 
403
 
408
 //#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line)
404
 //#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line)
594
 //==============================LCD and SD support=============================
590
 //==============================LCD and SD support=============================
595
 
591
 
596
 // Define your display language below. Replace (en) with your language code and uncomment.
592
 // Define your display language below. Replace (en) with your language code and uncomment.
597
-// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
593
+// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, cn, test
598
 // See also language.h
594
 // See also language.h
599
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
595
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
600
 
596
 
614
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
610
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
615
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
611
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
616
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
612
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
617
-//#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
618
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
613
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
619
-                                               // 0 to disable buzzer feedback  
614
+//#define LCD_FEEDBACK_FREQUENCY_HZ 1000         // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
615
+                                                 // 0 to disable buzzer feedback. Test with M300 S<frequency Hz> P<duration ms>
620
 
616
 
621
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
617
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
622
 // http://reprap.org/wiki/PanelOne
618
 // http://reprap.org/wiki/PanelOne

+ 4
- 2
Marlin/example_configurations/Hephestos/Configuration_adv.h View File

195
 #define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
195
 #define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
197
 
197
 
198
+// When G28 is called, this option will make Y home before X
199
+// #define HOME_Y_BEFORE_X
200
+
198
 // @section machine
201
 // @section machine
199
 
202
 
200
 #define AXIS_RELATIVE_MODES {false, false, false, false}
203
 #define AXIS_RELATIVE_MODES {false, false, false, false}
258
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
261
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
259
 #define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
262
 #define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
260
 #define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
263
 #define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
261
-//#define ENCODER_RATE_MULTIPLIER_DEBUG  // If defined, output the encoder steps per second value
262
 
264
 
263
 //#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/
265
 //#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/
264
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
266
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
355
 //#define HEATERS_PARALLEL
357
 //#define HEATERS_PARALLEL
356
 
358
 
357
 //===========================================================================
359
 //===========================================================================
358
-//=============================Buffers           ============================
360
+//================================= Buffers =================================
359
 //===========================================================================
361
 //===========================================================================
360
 
362
 
361
 // @section hidden
363
 // @section hidden

+ 42
- 41
Marlin/example_configurations/K8200/Configuration.h View File

1
-#ifndef CONFIGURATION_H
1
+// Example configuration file for Vellemann K8200
2
+// tested on K8200 with VM8201 (Display)
3
+// and Arduino 1.6.1 (Win) by @CONSULitAS, 2015-04-14
4
+// https://github.com/CONSULitAS/Marlin-K8200/archive/K8200_stable_2015-04-14.zip
5
+
6
+#ifndef CONFIGURATION_H
2
 #define CONFIGURATION_H
7
 #define CONFIGURATION_H
3
 
8
 
4
 #include "boards.h"
9
 #include "boards.h"
41
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
46
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
42
 // build by the user have been successfully uploaded into firmware.
47
 // build by the user have been successfully uploaded into firmware.
43
 #define STRING_VERSION "1.0.3 dev"
48
 #define STRING_VERSION "1.0.3 dev"
44
-#define STRING_URL "reprap.org"
45
 #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
49
 #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
46
 #define STRING_CONFIG_H_AUTHOR "(K8200, CONSULitAS)" // Who made the changes.
50
 #define STRING_CONFIG_H_AUTHOR "(K8200, CONSULitAS)" // Who made the changes.
47
 #define STRING_SPLASH_LINE1 "v" STRING_VERSION // will be shown during bootup in line 1
51
 #define STRING_SPLASH_LINE1 "v" STRING_VERSION // will be shown during bootup in line 1
282
 #define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
286
 #define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
283
 
287
 
284
 //===========================================================================
288
 //===========================================================================
285
-//============================= Thermal Runaway Protection ==================
289
+//======================== Thermal Runaway Protection =======================
286
 //===========================================================================
290
 //===========================================================================
287
-/*
288
-This is a feature to protect your printer from burn up in flames if it has
289
-a thermistor coming off place (this happened to a friend of mine recently and
290
-motivated me writing this feature).
291
-
292
-The issue: If a thermistor come off, it will read a lower temperature than actual.
293
-The system will turn the heater on forever, burning up the filament and anything
294
-else around.
295
-
296
-After the temperature reaches the target for the first time, this feature will
297
-start measuring for how long the current temperature stays below the target
298
-minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS).
299
 
291
 
300
-If it stays longer than _PERIOD, it means the thermistor temperature
301
-cannot catch up with the target, so something *may be* wrong. Then, to be on the
302
-safe side, the system will he halt.
303
-
304
-Bear in mind the count down will just start AFTER the first time the
305
-thermistor temperature is over the target, so you will have no problem if
306
-your extruder heater takes 2 minutes to hit the target on heating.
307
-
308
-*/
309
-// If you want to enable this feature for all your extruder heaters,
310
-// uncomment the 2 defines below:
292
+/**
293
+ * Thermal Runaway Protection protects your printer from damage and fire if a
294
+ * thermistor falls out or temperature sensors fail in any way.
295
+ *
296
+ * The issue: If a thermistor falls out or a temperature sensor fails,
297
+ * Marlin can no longer sense the actual temperature. Since a disconnected
298
+ * thermistor reads as a low temperature, the firmware will keep the heater on.
299
+ *
300
+ * The solution: Once the temperature reaches the target, start observing.
301
+ * If the temperature stays too far below the target (hysteresis) for too long,
302
+ * the firmware will halt as a safety precaution.
303
+ *
304
+ * Note that because the countdown starts only AFTER the temperature reaches
305
+ * the target, this will not catch a thermistor that is already disconnected
306
+ * when the print starts!
307
+ *
308
+ * To enable for all extruder heaters, uncomment the two defines below:
309
+ */
311
 
310
 
312
 // Parameters for all extruder heaters
311
 // Parameters for all extruder heaters
313
-//#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds
314
-//#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius
312
+#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 // in seconds
313
+#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius
315
 
314
 
316
-// If you want to enable this feature for your bed heater,
317
-// uncomment the 2 defines below:
315
+// To enable for the bed heater, uncomment the two defines below:
318
 
316
 
319
 // Parameters for the bed heater
317
 // Parameters for the bed heater
320
-//#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds
321
-//#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius
322
-
318
+#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 // in seconds
319
+#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius
323
 
320
 
324
 //===========================================================================
321
 //===========================================================================
325
 //============================= Mechanical Settings =========================
322
 //============================= Mechanical Settings =========================
375
 #define E_ENABLE_ON 0 // For all extruders
372
 #define E_ENABLE_ON 0 // For all extruders
376
 
373
 
377
 // Disables axis when it's not being used.
374
 // Disables axis when it's not being used.
375
+// WARNING: When motors turn off there is a chance of losing position accuracy!
378
 #define DISABLE_X false
376
 #define DISABLE_X false
379
 #define DISABLE_Y false
377
 #define DISABLE_Y false
380
 #define DISABLE_Z true
378
 #define DISABLE_Z true
422
 #define Z_MAX_POS 200
420
 #define Z_MAX_POS 200
423
 
421
 
424
 //===========================================================================
422
 //===========================================================================
425
-//============================= Filament Runout Sensor ======================
423
+//========================= Filament Runout Sensor ==========================
426
 //===========================================================================
424
 //===========================================================================
427
 //#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament
425
 //#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament
428
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
426
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
429
                                  // It is assumed that when logic high = filament available
427
                                  // It is assumed that when logic high = filament available
430
                                  //                    when logic  low = filament ran out
428
                                  //                    when logic  low = filament ran out
431
-//const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
432
-//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
429
+#ifdef FILAMENT_RUNOUT_SENSOR
430
+  const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
431
+  #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
432
+  #define FILAMENT_RUNOUT_SCRIPT "M600"
433
+#endif 
433
 
434
 
434
 //===========================================================================
435
 //===========================================================================
435
-//============================ Mesh Bed Leveling ============================
436
+//=========================== Manual Bed Leveling ===========================
436
 //===========================================================================
437
 //===========================================================================
437
 
438
 
438
 // #define MANUAL_BED_LEVELING  // Add display menu option for bed leveling
439
 // #define MANUAL_BED_LEVELING  // Add display menu option for bed leveling
453
 #endif  // MESH_BED_LEVELING
454
 #endif  // MESH_BED_LEVELING
454
 
455
 
455
 //===========================================================================
456
 //===========================================================================
456
-//============================= Bed Auto Leveling ===========================
457
+//============================ Bed Auto Leveling ============================
457
 //===========================================================================
458
 //===========================================================================
458
 
459
 
459
 // @section bedlevel
460
 // @section bedlevel
652
 // @section lcd
653
 // @section lcd
653
 
654
 
654
 // Define your display language below. Replace (en) with your language code and uncomment.
655
 // Define your display language below. Replace (en) with your language code and uncomment.
655
-// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
656
+// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, cn, test
656
 // See also language.h
657
 // See also language.h
657
 #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
658
 #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
658
 
659
 
672
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
673
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
673
 #define ULTIMAKERCONTROLLER // K8200: for Display VM8201 // as available from the Ultimaker online store.
674
 #define ULTIMAKERCONTROLLER // K8200: for Display VM8201 // as available from the Ultimaker online store.
674
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
675
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
675
-//#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
676
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
676
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
677
-                                               // 0 to disable buzzer feedback  
677
+//#define LCD_FEEDBACK_FREQUENCY_HZ 1000         // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
678
+                                                 // 0 to disable buzzer feedback. Test with M300 S<frequency Hz> P<duration ms>
678
 
679
 
679
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
680
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
680
 // http://reprap.org/wiki/PanelOne
681
 // http://reprap.org/wiki/PanelOne

+ 4
- 2
Marlin/example_configurations/K8200/Configuration_adv.h View File

195
 #define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
195
 #define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
197
 
197
 
198
+// When G28 is called, this option will make Y home before X
199
+// #define HOME_Y_BEFORE_X
200
+
198
 // @section machine
201
 // @section machine
199
 
202
 
200
 #define AXIS_RELATIVE_MODES {false, false, false, false}
203
 #define AXIS_RELATIVE_MODES {false, false, false, false}
258
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
261
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
259
 #define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
262
 #define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
260
 #define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
263
 #define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
261
-//#define ENCODER_RATE_MULTIPLIER_DEBUG  // If defined, output the encoder steps per second value
262
 
264
 
263
 //#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/
265
 //#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/
264
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
266
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
355
 //#define HEATERS_PARALLEL
357
 //#define HEATERS_PARALLEL
356
 
358
 
357
 //===========================================================================
359
 //===========================================================================
358
-//=============================Buffers           ============================
360
+//================================= Buffers =================================
359
 //===========================================================================
361
 //===========================================================================
360
 
362
 
361
 // @section hidden
363
 // @section hidden

+ 7
- 7
Marlin/example_configurations/K8200/readme.md View File

1
-# Example Configuration for Vellemann K8200
2
-* Configuration files for **Vellemann K8200** (with VM8201 - LCD Option for K8200)
1
+# Example Configuration for Vellemann [K8200](http://www.k8200.eu/)
2
+* Configuration files for **Vellemann K8200** (with [VM8201](http://www.vellemanprojects.eu/products/view/?id=416158) - LCD Option for K8200)
3
 * K8200 is a 3Drag clone - configuration should work with 3Drag http://reprap.org/wiki/3drag, too. Please report.
3
 * K8200 is a 3Drag clone - configuration should work with 3Drag http://reprap.org/wiki/3drag, too. Please report.
4
 
4
 
5
 * updated manually with parameters from genuine Vellemann Firmware "firmware_k8200_marlinv2" based on the recent development branch
5
 * updated manually with parameters from genuine Vellemann Firmware "firmware_k8200_marlinv2" based on the recent development branch
7
 * VM8201 uses "DISPLAY_CHARSET_HD44870_JAPAN" and "ULTIMAKERCONTROLLER"
7
 * VM8201 uses "DISPLAY_CHARSET_HD44870_JAPAN" and "ULTIMAKERCONTROLLER"
8
 * german (de) translation with umlaut is supported now - thanks to @AnHardt for the great hardware based umlaut support
8
 * german (de) translation with umlaut is supported now - thanks to @AnHardt for the great hardware based umlaut support
9
 
9
 
10
-I (@CONSULitAS) tested the changes on my K8200 with 20x4-LCD and Arduino 1.0.5 for Windows (SD library added to IDE manually) - everything works well.
10
+I [@CONSULitAS](https://github.com/CONSULitAS) tested the changes on my K8200 with 20x4-LCD and Arduino 1.6.1 for Windows (SD library added to IDE manually) - everything works well.
11
 
11
 
12
-**Source for genuine Vellemann Firmware V2 (with LCD/SD-Support):**
13
-* [firmware_k8200_v2.1.1.zip](http://www.k8200.eu/downloads/files/downloads/firmware_k8200_v2.1.1.zip)
12
+**Source for genuine [Vellemann Firmware](http://www.k8200.eu/support/downloads/)**
13
+* V2.1.1 (for z axis upgrade, date branched: 2013-06-05): [firmware_k8200_v2.1.1.zip](http://www.k8200.eu/downloads/files/downloads/firmware_k8200_v2.1.1.zip)
14
   * see also https://github.com/CONSULitAS/Marlin-K8200/tree/Vellemann_firmware_k8200_v2.1.1.zip
14
   * see also https://github.com/CONSULitAS/Marlin-K8200/tree/Vellemann_firmware_k8200_v2.1.1.zip
15
 
15
 
16
-* [firmware_k8200_marlinv2.zip](http://www.k8200.eu/downloads/files/downloads/firmware_k8200_marlinv2.zip)
16
+* V2 (with LCD/SD-Support, date branched: 2013-06-05): [firmware_k8200_marlinv2.zip](http://www.k8200.eu/downloads/files/downloads/firmware_k8200_marlinv2.zip)
17
   * see also https://github.com/CONSULitAS/Marlin-K8200/tree/Vellemann_firmware_k8200_marlinv2.zip
17
   * see also https://github.com/CONSULitAS/Marlin-K8200/tree/Vellemann_firmware_k8200_marlinv2.zip
18
 
18
 
19
-* [firmware_k8200_marlinv1.zip](http://www.k8200.eu/downloads/files/downloads/firmware_k8200_marlinv1.zip)
19
+* V1 (without LCD/SD-Support, date branched: 2012-10-02): [firmware_k8200_marlinv1.zip](http://www.k8200.eu/downloads/files/downloads/firmware_k8200_marlinv1.zip)
20
   * see also https://github.com/CONSULitAS/Marlin-K8200/tree/Vellemann_firmware_k8200_marlinv1.zip
20
   * see also https://github.com/CONSULitAS/Marlin-K8200/tree/Vellemann_firmware_k8200_marlinv1.zip

+ 38
- 42
Marlin/example_configurations/SCARA/Configuration.h View File

1
-#ifndef CONFIGURATION_H
1
+#ifndef CONFIGURATION_H
2
 #define CONFIGURATION_H
2
 #define CONFIGURATION_H
3
 
3
 
4
 #include "boards.h"
4
 #include "boards.h"
57
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
57
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
58
 // build by the user have been successfully uploaded into firmware.
58
 // build by the user have been successfully uploaded into firmware.
59
 #define STRING_VERSION "1.0.3 dev"
59
 #define STRING_VERSION "1.0.3 dev"
60
-#define STRING_URL "reprap.org"
61
 #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
60
 #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
62
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
61
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
63
 #define STRING_SPLASH_LINE1 "v" STRING_VERSION // will be shown during bootup in line 1
62
 #define STRING_SPLASH_LINE1 "v" STRING_VERSION // will be shown during bootup in line 1
289
 #define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
288
 #define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
290
 
289
 
291
 //===========================================================================
290
 //===========================================================================
292
-//============================= Thermal Runaway Protection ==================
291
+//======================== Thermal Runaway Protection =======================
293
 //===========================================================================
292
 //===========================================================================
294
-/*
295
-This is a feature to protect your printer from burn up in flames if it has
296
-a thermistor coming off place (this happened to a friend of mine recently and
297
-motivated me writing this feature).
298
-
299
-The issue: If a thermistor come off, it will read a lower temperature than actual.
300
-The system will turn the heater on forever, burning up the filament and anything
301
-else around.
302
-
303
-After the temperature reaches the target for the first time, this feature will
304
-start measuring for how long the current temperature stays below the target
305
-minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS).
306
-
307
-If it stays longer than _PERIOD, it means the thermistor temperature
308
-cannot catch up with the target, so something *may be* wrong. Then, to be on the
309
-safe side, the system will he halt.
310
 
293
 
311
-Bear in mind the count down will just start AFTER the first time the
312
-thermistor temperature is over the target, so you will have no problem if
313
-your extruder heater takes 2 minutes to hit the target on heating.
314
-
315
-*/
316
-// If you want to enable this feature for all your extruder heaters,
317
-// uncomment the 2 defines below:
294
+/**
295
+ * Thermal Runaway Protection protects your printer from damage and fire if a
296
+ * thermistor falls out or temperature sensors fail in any way.
297
+ *
298
+ * The issue: If a thermistor falls out or a temperature sensor fails,
299
+ * Marlin can no longer sense the actual temperature. Since a disconnected
300
+ * thermistor reads as a low temperature, the firmware will keep the heater on.
301
+ *
302
+ * The solution: Once the temperature reaches the target, start observing.
303
+ * If the temperature stays too far below the target (hysteresis) for too long,
304
+ * the firmware will halt as a safety precaution.
305
+ *
306
+ * Note that because the countdown starts only AFTER the temperature reaches
307
+ * the target, this will not catch a thermistor that is already disconnected
308
+ * when the print starts!
309
+ *
310
+ * To enable for all extruder heaters, uncomment the two defines below:
311
+ */
318
 
312
 
319
 // Parameters for all extruder heaters
313
 // Parameters for all extruder heaters
320
-//#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds
321
-//#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius
314
+#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 // in seconds
315
+#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius
322
 
316
 
323
-// If you want to enable this feature for your bed heater,
324
-// uncomment the 2 defines below:
317
+// To enable for the bed heater, uncomment the two defines below:
325
 
318
 
326
 // Parameters for the bed heater
319
 // Parameters for the bed heater
327
-//#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds
328
-//#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius
329
-
320
+#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 // in seconds
321
+#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius
330
 
322
 
331
 //===========================================================================
323
 //===========================================================================
332
 //============================= Mechanical Settings =========================
324
 //============================= Mechanical Settings =========================
369
 #define E_ENABLE_ON 0 // For all extruders
361
 #define E_ENABLE_ON 0 // For all extruders
370
 
362
 
371
 // Disables axis when it's not being used.
363
 // Disables axis when it's not being used.
364
+// WARNING: When motors turn off there is a chance of losing position accuracy!
372
 #define DISABLE_X false
365
 #define DISABLE_X false
373
 #define DISABLE_Y false
366
 #define DISABLE_Y false
374
 #define DISABLE_Z false
367
 #define DISABLE_Z false
402
 #define Z_MAX_POS 225
395
 #define Z_MAX_POS 225
403
 
396
 
404
 //===========================================================================
397
 //===========================================================================
405
-//============================= Filament Runout Sensor ======================
398
+//========================= Filament Runout Sensor ==========================
406
 //===========================================================================
399
 //===========================================================================
407
 //#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament
400
 //#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament
408
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
401
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
409
                                  // It is assumed that when logic high = filament available
402
                                  // It is assumed that when logic high = filament available
410
                                  //                    when logic  low = filament ran out
403
                                  //                    when logic  low = filament ran out
411
-//const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
412
-//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
413
-
404
+#ifdef FILAMENT_RUNOUT_SENSOR
405
+  const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
406
+  #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
407
+  #define FILAMENT_RUNOUT_SCRIPT "M600"
408
+#endif 
409
+  
414
 //===========================================================================
410
 //===========================================================================
415
-//============================ Manual Bed Leveling ==========================
411
+//=========================== Manual Bed Leveling ===========================
416
 //===========================================================================
412
 //===========================================================================
417
 
413
 
418
 // #define MANUAL_BED_LEVELING  // Add display menu option for bed leveling
414
 // #define MANUAL_BED_LEVELING  // Add display menu option for bed leveling
433
 #endif  // MESH_BED_LEVELING
429
 #endif  // MESH_BED_LEVELING
434
 
430
 
435
 //===========================================================================
431
 //===========================================================================
436
-//============================= Bed Auto Leveling ===========================
432
+//============================ Bed Auto Leveling ============================
437
 //===========================================================================
433
 //===========================================================================
438
 
434
 
439
 //#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line)
435
 //#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line)
625
 //==============================LCD and SD support=============================
621
 //==============================LCD and SD support=============================
626
 
622
 
627
 // Define your display language below. Replace (en) with your language code and uncomment.
623
 // Define your display language below. Replace (en) with your language code and uncomment.
628
-// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
624
+// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, cn, test
629
 // See also language.h
625
 // See also language.h
630
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
626
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
631
 
627
 
645
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
641
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
646
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
642
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
647
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
643
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
648
-//#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
649
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
644
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
650
-                                               // 0 to disable buzzer feedback  
645
+//#define LCD_FEEDBACK_FREQUENCY_HZ 1000         // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
646
+                                                 // 0 to disable buzzer feedback. Test with M300 S<frequency Hz> P<duration ms>
651
 
647
 
652
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
648
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
653
 // http://reprap.org/wiki/PanelOne
649
 // http://reprap.org/wiki/PanelOne

+ 4
- 2
Marlin/example_configurations/SCARA/Configuration_adv.h View File

195
 #define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
195
 #define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
197
 
197
 
198
+// When G28 is called, this option will make Y home before X
199
+// #define HOME_Y_BEFORE_X
200
+
198
 // @section machine
201
 // @section machine
199
 
202
 
200
 #define AXIS_RELATIVE_MODES {false, false, false, false}
203
 #define AXIS_RELATIVE_MODES {false, false, false, false}
258
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
261
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
259
 #define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
262
 #define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
260
 #define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
263
 #define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
261
-//#define ENCODER_RATE_MULTIPLIER_DEBUG  // If defined, output the encoder steps per second value
262
 
264
 
263
 //#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/
265
 //#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/
264
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
266
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
355
 //#define HEATERS_PARALLEL
357
 //#define HEATERS_PARALLEL
356
 
358
 
357
 //===========================================================================
359
 //===========================================================================
358
-//=============================Buffers           ============================
360
+//================================= Buffers =================================
359
 //===========================================================================
361
 //===========================================================================
360
 
362
 
361
 // @section hidden
363
 // @section hidden

+ 38
- 42
Marlin/example_configurations/WITBOX/Configuration.h View File

1
-#ifndef CONFIGURATION_H
1
+#ifndef CONFIGURATION_H
2
 #define CONFIGURATION_H
2
 #define CONFIGURATION_H
3
 
3
 
4
 #include "boards.h"
4
 #include "boards.h"
39
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
39
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
40
 // build by the user have been successfully uploaded into firmware.
40
 // build by the user have been successfully uploaded into firmware.
41
 #define STRING_VERSION "1.0.3 dev"
41
 #define STRING_VERSION "1.0.3 dev"
42
-#define STRING_URL "reprap.org"
43
 #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
42
 #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
44
 #define STRING_CONFIG_H_AUTHOR "(bq Witbox)" // Who made the changes.
43
 #define STRING_CONFIG_H_AUTHOR "(bq Witbox)" // Who made the changes.
45
 #define STRING_SPLASH_LINE1 "v" STRING_VERSION // will be shown during bootup in line 1
44
 #define STRING_SPLASH_LINE1 "v" STRING_VERSION // will be shown during bootup in line 1
257
 #define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
256
 #define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
258
 
257
 
259
 //===========================================================================
258
 //===========================================================================
260
-//============================= Thermal Runaway Protection ==================
259
+//======================== Thermal Runaway Protection =======================
261
 //===========================================================================
260
 //===========================================================================
262
-/*
263
-This is a feature to protect your printer from burn up in flames if it has
264
-a thermistor coming off place (this happened to a friend of mine recently and
265
-motivated me writing this feature).
266
-
267
-The issue: If a thermistor come off, it will read a lower temperature than actual.
268
-The system will turn the heater on forever, burning up the filament and anything
269
-else around.
270
-
271
-After the temperature reaches the target for the first time, this feature will
272
-start measuring for how long the current temperature stays below the target
273
-minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS).
274
-
275
-If it stays longer than _PERIOD, it means the thermistor temperature
276
-cannot catch up with the target, so something *may be* wrong. Then, to be on the
277
-safe side, the system will he halt.
278
 
261
 
279
-Bear in mind the count down will just start AFTER the first time the
280
-thermistor temperature is over the target, so you will have no problem if
281
-your extruder heater takes 2 minutes to hit the target on heating.
282
-
283
-*/
284
-// If you want to enable this feature for all your extruder heaters,
285
-// uncomment the 2 defines below:
262
+/**
263
+ * Thermal Runaway Protection protects your printer from damage and fire if a
264
+ * thermistor falls out or temperature sensors fail in any way.
265
+ *
266
+ * The issue: If a thermistor falls out or a temperature sensor fails,
267
+ * Marlin can no longer sense the actual temperature. Since a disconnected
268
+ * thermistor reads as a low temperature, the firmware will keep the heater on.
269
+ *
270
+ * The solution: Once the temperature reaches the target, start observing.
271
+ * If the temperature stays too far below the target (hysteresis) for too long,
272
+ * the firmware will halt as a safety precaution.
273
+ *
274
+ * Note that because the countdown starts only AFTER the temperature reaches
275
+ * the target, this will not catch a thermistor that is already disconnected
276
+ * when the print starts!
277
+ *
278
+ * To enable for all extruder heaters, uncomment the two defines below:
279
+ */
286
 
280
 
287
 // Parameters for all extruder heaters
281
 // Parameters for all extruder heaters
288
-//#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds
289
-//#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius
282
+#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 // in seconds
283
+#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius
290
 
284
 
291
-// If you want to enable this feature for your bed heater,
292
-// uncomment the 2 defines below:
285
+// To enable for the bed heater, uncomment the two defines below:
293
 
286
 
294
 // Parameters for the bed heater
287
 // Parameters for the bed heater
295
-//#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds
296
-//#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius
297
-
288
+#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 // in seconds
289
+#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius
298
 
290
 
299
 //===========================================================================
291
 //===========================================================================
300
 //============================= Mechanical Settings =========================
292
 //============================= Mechanical Settings =========================
337
 #define E_ENABLE_ON 0 // For all extruders
329
 #define E_ENABLE_ON 0 // For all extruders
338
 
330
 
339
 // Disables axis when it's not being used.
331
 // Disables axis when it's not being used.
332
+// WARNING: When motors turn off there is a chance of losing position accuracy!
340
 #define DISABLE_X false
333
 #define DISABLE_X false
341
 #define DISABLE_Y false
334
 #define DISABLE_Y false
342
 #define DISABLE_Z true
335
 #define DISABLE_Z true
370
 #define Z_MAX_POS 200
363
 #define Z_MAX_POS 200
371
 
364
 
372
 //===========================================================================
365
 //===========================================================================
373
-//============================= Filament Runout Sensor ======================
366
+//========================= Filament Runout Sensor ==========================
374
 //===========================================================================
367
 //===========================================================================
375
 //#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament
368
 //#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament
376
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
369
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
377
                                  // It is assumed that when logic high = filament available
370
                                  // It is assumed that when logic high = filament available
378
                                  //                    when logic  low = filament ran out
371
                                  //                    when logic  low = filament ran out
379
-//const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
380
-//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
381
-
372
+#ifdef FILAMENT_RUNOUT_SENSOR
373
+  const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
374
+  #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
375
+  #define FILAMENT_RUNOUT_SCRIPT "M600"
376
+#endif 
377
+  
382
 //===========================================================================
378
 //===========================================================================
383
-//============================ Manual Bed Leveling ==========================
379
+//=========================== Manual Bed Leveling ===========================
384
 //===========================================================================
380
 //===========================================================================
385
 
381
 
386
 // #define MANUAL_BED_LEVELING  // Add display menu option for bed leveling
382
 // #define MANUAL_BED_LEVELING  // Add display menu option for bed leveling
401
 #endif  // MESH_BED_LEVELING
397
 #endif  // MESH_BED_LEVELING
402
 
398
 
403
 //===========================================================================
399
 //===========================================================================
404
-//============================= Bed Auto Leveling ===========================
400
+//============================ Bed Auto Leveling ============================
405
 //===========================================================================
401
 //===========================================================================
406
 
402
 
407
 //#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line)
403
 //#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line)
593
 //==============================LCD and SD support=============================
589
 //==============================LCD and SD support=============================
594
 
590
 
595
 // Define your display language below. Replace (en) with your language code and uncomment.
591
 // Define your display language below. Replace (en) with your language code and uncomment.
596
-// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
592
+// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, cn, test
597
 // See also language.h
593
 // See also language.h
598
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
594
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
599
 
595
 
613
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
609
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
614
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
610
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
615
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
611
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
616
-//#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
617
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
612
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
618
-                                               // 0 to disable buzzer feedback  
613
+//#define LCD_FEEDBACK_FREQUENCY_HZ 1000         // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
614
+                                                 // 0 to disable buzzer feedback. Test with M300 S<frequency Hz> P<duration ms>
619
 
615
 
620
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
616
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
621
 // http://reprap.org/wiki/PanelOne
617
 // http://reprap.org/wiki/PanelOne

+ 4
- 2
Marlin/example_configurations/WITBOX/Configuration_adv.h View File

195
 #define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
195
 #define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
197
 
197
 
198
+// When G28 is called, this option will make Y home before X
199
+// #define HOME_Y_BEFORE_X
200
+
198
 // @section machine
201
 // @section machine
199
 
202
 
200
 #define AXIS_RELATIVE_MODES {false, false, false, false}
203
 #define AXIS_RELATIVE_MODES {false, false, false, false}
258
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
261
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
259
 #define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
262
 #define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
260
 #define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
263
 #define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
261
-//#define ENCODER_RATE_MULTIPLIER_DEBUG  // If defined, output the encoder steps per second value
262
 
264
 
263
 //#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/
265
 //#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/
264
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
266
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
355
 //#define HEATERS_PARALLEL
357
 //#define HEATERS_PARALLEL
356
 
358
 
357
 //===========================================================================
359
 //===========================================================================
358
-//=============================Buffers           ============================
360
+//================================= Buffers =================================
359
 //===========================================================================
361
 //===========================================================================
360
 
362
 
361
 // @section hidden
363
 // @section hidden

+ 816
- 0
Marlin/example_configurations/delta/biv2.5/Configuration.h View File

1
+#ifndef CONFIGURATION_H
2
+#define CONFIGURATION_H
3
+
4
+#include "boards.h"
5
+
6
+//===========================================================================
7
+//============================= Getting Started =============================
8
+//===========================================================================
9
+/*
10
+Here are some standard links for getting your machine calibrated:
11
+ * http://reprap.org/wiki/Calibration
12
+ * http://youtu.be/wAL9d7FgInk
13
+ * http://calculator.josefprusa.cz
14
+ * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide
15
+ * http://www.thingiverse.com/thing:5573
16
+ * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap
17
+ * http://www.thingiverse.com/thing:298812
18
+*/
19
+
20
+// This configuration file contains the basic settings.
21
+// Advanced settings can be found in Configuration_adv.h
22
+// BASIC SETTINGS: select your board type, temperature sensor type, axis scaling, and endstop configuration
23
+
24
+//===========================================================================
25
+//============================= DELTA Printer ===============================
26
+//===========================================================================
27
+// For a Delta printer replace the configuration files with the files in the
28
+// example_configurations/delta directory.
29
+//
30
+
31
+//===========================================================================
32
+//============================= SCARA Printer ===============================
33
+//===========================================================================
34
+// For a Delta printer replace the configuration files with the files in the
35
+// example_configurations/SCARA directory.
36
+//
37
+
38
+// User-specified version info of this build to display in [Pronterface, etc] terminal window during
39
+// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
40
+// build by the user have been successfully uploaded into firmware.
41
+#define STRING_VERSION "1.0.3 dev"
42
+#define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
43
+#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
44
+#define STRING_SPLASH_LINE1 "v" STRING_VERSION // will be shown during bootup in line 1
45
+//#define STRING_SPLASH_LINE2 STRING_VERSION_CONFIG_H // will be shown during bootup in line2
46
+
47
+// SERIAL_PORT selects which serial port should be used for communication with the host.
48
+// This allows the connection of wireless adapters (for instance) to non-default port pins.
49
+// Serial port 0 is still used by the Arduino bootloader regardless of this setting.
50
+#define SERIAL_PORT 0
51
+
52
+// This determines the communication speed of the printer
53
+#define BAUDRATE 250000
54
+
55
+// This enables the serial port associated to the Bluetooth interface
56
+//#define BTENABLED              // Enable BT interface on AT90USB devices
57
+
58
+// The following define selects which electronics board you have.
59
+// Please choose the name from boards.h that matches your setup
60
+#ifndef MOTHERBOARD
61
+  #define MOTHERBOARD BOARD_RUMBA
62
+#endif
63
+
64
+// Optional custom name for your RepStrap or other custom machine
65
+// Displayed in the LCD "Ready" message
66
+#define CUSTOM_MACHINE_NAME "BI V2.5"
67
+
68
+// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines)
69
+// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4)
70
+// #define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
71
+
72
+// This defines the number of extruders
73
+#define EXTRUDERS 2
74
+
75
+//// The following define selects which power supply you have. Please choose the one that matches your setup
76
+// 1 = ATX
77
+// 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC)
78
+
79
+#define POWER_SUPPLY 1
80
+
81
+// Define this to have the electronics keep the power supply off on startup. If you don't know what this is leave it.
82
+// #define PS_DEFAULT_OFF
83
+
84
+
85
+//===========================================================================
86
+//============================== Delta Settings =============================
87
+//===========================================================================
88
+// Enable DELTA kinematics and most of the default configuration for Deltas
89
+#define DELTA
90
+
91
+// Make delta curves from many straight lines (linear interpolation).
92
+// This is a trade-off between visible corners (not enough segments)
93
+// and processor overload (too many expensive sqrt calls).
94
+#define DELTA_SEGMENTS_PER_SECOND 100
95
+
96
+// NOTE NB all values for DELTA_* values MUST be floating point, so always have a decimal point in them
97
+
98
+// Center-to-center distance of the holes in the diagonal push rods.
99
+#define DELTA_DIAGONAL_ROD 440.0 // mm
100
+
101
+// Horizontal offset from middle of printer to smooth rod center.
102
+#define DELTA_SMOOTH_ROD_OFFSET 330.0 // mm
103
+
104
+// Horizontal offset of the universal joints on the end effector.
105
+#define DELTA_EFFECTOR_OFFSET 50.0 // mm
106
+
107
+// Horizontal offset of the universal joints on the carriages.
108
+#define DELTA_CARRIAGE_OFFSET 20.0 // mm
109
+
110
+// Horizontal distance bridged by diagonal push rods when effector is centered.
111
+#define DELTA_RADIUS (DELTA_SMOOTH_ROD_OFFSET-DELTA_EFFECTOR_OFFSET-DELTA_CARRIAGE_OFFSET)
112
+
113
+// Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers).
114
+#define DELTA_PRINTABLE_RADIUS 160
115
+
116
+
117
+//===========================================================================
118
+//============================= Thermal Settings ============================
119
+//===========================================================================
120
+//
121
+//--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table
122
+//
123
+//// Temperature sensor settings:
124
+// -2 is thermocouple with MAX6675 (only for sensor 0)
125
+// -1 is thermocouple with AD595
126
+// 0 is not used
127
+// 1 is 100k thermistor - best choice for EPCOS 100k (4.7k pullup)
128
+// 2 is 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup)
129
+// 3 is Mendel-parts thermistor (4.7k pullup)
130
+// 4 is 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
131
+// 5 is 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (4.7k pullup)
132
+// 6 is 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup)
133
+// 7 is 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup)
134
+// 71 is 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup)
135
+// 8 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup)
136
+// 9 is 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup)
137
+// 10 is 100k RS thermistor 198-961 (4.7k pullup)
138
+// 11 is 100k beta 3950 1% thermistor (4.7k pullup)
139
+// 12 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed)
140
+// 13 is 100k Hisens 3950  1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
141
+// 20 is the PT100 circuit found in the Ultimainboard V2.x
142
+// 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
143
+//
144
+//    1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k
145
+//                          (but gives greater accuracy and more stable PID)
146
+// 51 is 100k thermistor - EPCOS (1k pullup)
147
+// 52 is 200k thermistor - ATC Semitec 204GT-2 (1k pullup)
148
+// 55 is 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup)
149
+//
150
+// 1047 is Pt1000 with 4k7 pullup
151
+// 1010 is Pt1000 with 1k pullup (non standard)
152
+// 147 is Pt100 with 4k7 pullup
153
+// 110 is Pt100 with 1k pullup (non standard)
154
+// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below.
155
+//     Use it for Testing or Development purposes. NEVER for production machine.
156
+//     #define DUMMY_THERMISTOR_998_VALUE 25
157
+//     #define DUMMY_THERMISTOR_999_VALUE 100
158
+// :{ '0': "Not used", '4': "10k !! do not use for a hotend. Bad resolution at high temp. !!", '1': "100k / 4.7k - EPCOS", '51': "100k / 1k - EPCOS", '6': "100k / 4.7k EPCOS - Not as accurate as Table 1", '5': "100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '7': "100k / 4.7k Honeywell 135-104LAG-J01", '71': "100k / 4.7k Honeywell 135-104LAF-J01", '8': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9': "100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10': "100k / 4.7k RS 198-961", '11': "100k / 4.7k beta 3950 1%", '12': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13': "100k Hisens 3950  1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '60': "100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '55': "100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '2': "200k / 4.7k - ATC Semitec 204GT-2", '52': "200k / 1k - ATC Semitec 204GT-2", '-2': "Thermocouple + MAX6675 (only for sensor 0)", '-1': "Thermocouple + AD595", '3': "Mendel-parts / 4.7k", '1047': "Pt1000 / 4.7k", '1010': "Pt1000 / 1k (non standard)", '20': "PT100 (Ultimainboard V2.x)", '147': "Pt100 / 4.7k", '110': "Pt100 / 1k (non-standard)", '998': "Dummy 1", '999': "Dummy 2" }
159
+#define TEMP_SENSOR_0 5
160
+#define TEMP_SENSOR_1 5
161
+#define TEMP_SENSOR_2 0
162
+#define TEMP_SENSOR_3 0
163
+#define TEMP_SENSOR_BED 1
164
+
165
+// This makes temp sensor 1 a redundant sensor for sensor 0. If the temperatures difference between these sensors is to high the print will be aborted.
166
+//#define TEMP_SENSOR_1_AS_REDUNDANT
167
+#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10
168
+
169
+// Actual temperature must be close to target for this long before M109 returns success
170
+#define TEMP_RESIDENCY_TIME 10  // (seconds)
171
+#define TEMP_HYSTERESIS 3       // (degC) range of +/- temperatures considered "close" to the target one
172
+#define TEMP_WINDOW     1       // (degC) Window around target to start the residency timer x degC early.
173
+
174
+// The minimal temperature defines the temperature below which the heater will not be enabled It is used
175
+// to check that the wiring to the thermistor is not broken.
176
+// Otherwise this would lead to the heater being powered on all the time.
177
+#define HEATER_0_MINTEMP 5
178
+#define HEATER_1_MINTEMP 5
179
+#define HEATER_2_MINTEMP 5
180
+#define HEATER_3_MINTEMP 5
181
+#define BED_MINTEMP 5
182
+
183
+// When temperature exceeds max temp, your heater will be switched off.
184
+// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure!
185
+// You should use MINTEMP for thermistor short/failure protection.
186
+#define HEATER_0_MAXTEMP 275
187
+#define HEATER_1_MAXTEMP 275
188
+#define HEATER_2_MAXTEMP 275
189
+#define HEATER_3_MAXTEMP 275
190
+#define BED_MAXTEMP 150
191
+
192
+// If your bed has low resistance e.g. .6 ohm and throws the fuse you can duty cycle it to reduce the
193
+// average current. The value should be an integer and the heat bed will be turned on for 1 interval of
194
+// HEATER_BED_DUTY_CYCLE_DIVIDER intervals.
195
+//#define HEATER_BED_DUTY_CYCLE_DIVIDER 4
196
+
197
+// If you want the M105 heater power reported in watts, define the BED_WATTS, and (shared for all extruders) EXTRUDER_WATTS
198
+//#define EXTRUDER_WATTS (12.0*12.0/6.7) //  P=I^2/R
199
+//#define BED_WATTS (12.0*12.0/1.1)      // P=I^2/R
200
+
201
+//===========================================================================
202
+//============================= PID Settings ================================
203
+//===========================================================================
204
+// PID Tuning Guide here: http://reprap.org/wiki/PID_Tuning
205
+
206
+// Comment the following line to disable PID and enable bang-bang.
207
+#define PIDTEMP
208
+#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
209
+#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
210
+#ifdef PIDTEMP
211
+  //#define PID_DEBUG // Sends debug data to the serial port.
212
+  //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
213
+  //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
214
+  //#define PID_PARAMS_PER_EXTRUDER // Uses separate PID parameters for each extruder (useful for mismatched extruders)
215
+                                    // Set/get with gcode: M301 E[extruder number, 0-2]
216
+  #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
217
+                                  // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
218
+  #define PID_INTEGRAL_DRIVE_MAX PID_MAX  //limit for the integral term
219
+  #define K1 0.95 //smoothing factor within the PID
220
+
221
+// If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
222
+// Ultimaker
223
+    #define  DEFAULT_Kp 22.2
224
+    #define  DEFAULT_Ki 1.08
225
+    #define  DEFAULT_Kd 114
226
+
227
+// MakerGear
228
+//    #define  DEFAULT_Kp 7.0
229
+//    #define  DEFAULT_Ki 0.1
230
+//    #define  DEFAULT_Kd 12
231
+
232
+// Mendel Parts V9 on 12V
233
+//    #define  DEFAULT_Kp 63.0
234
+//    #define  DEFAULT_Ki 2.25
235
+//    #define  DEFAULT_Kd 440
236
+#endif // PIDTEMP
237
+
238
+//===========================================================================
239
+//============================= PID > Bed Temperature Control ===============
240
+//===========================================================================
241
+// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
242
+//
243
+// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder.
244
+// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz,
245
+// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
246
+// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
247
+// If your configuration is significantly different than this and you don't understand the issues involved, you probably
248
+// shouldn't use bed PID until someone else verifies your hardware works.
249
+// If this is enabled, find your own PID constants below.
250
+//#define PIDTEMPBED
251
+//
252
+//#define BED_LIMIT_SWITCHING
253
+
254
+// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option.
255
+// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis)
256
+// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did,
257
+// so you shouldn't use it unless you are OK with PWM on your bed.  (see the comment on enabling PIDTEMPBED)
258
+#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
259
+
260
+//#define PID_BED_DEBUG // Sends debug data to the serial port.
261
+
262
+#ifdef PIDTEMPBED
263
+//120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
264
+//from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
265
+    #define  DEFAULT_bedKp 10.00
266
+    #define  DEFAULT_bedKi .023
267
+    #define  DEFAULT_bedKd 305.4
268
+
269
+//120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
270
+//from pidautotune
271
+//    #define  DEFAULT_bedKp 97.1
272
+//    #define  DEFAULT_bedKi 1.41
273
+//    #define  DEFAULT_bedKd 1675.16
274
+
275
+// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
276
+#endif // PIDTEMPBED
277
+
278
+
279
+//this prevents dangerous Extruder moves, i.e. if the temperature is under the limit
280
+//can be software-disabled for whatever purposes by
281
+#define PREVENT_DANGEROUS_EXTRUDE
282
+//if PREVENT_DANGEROUS_EXTRUDE is on, you can still disable (uncomment) very long bits of extrusion separately.
283
+#define PREVENT_LENGTHY_EXTRUDE
284
+
285
+#define EXTRUDE_MINTEMP 170
286
+#define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
287
+
288
+//===========================================================================
289
+//======================== Thermal Runaway Protection =======================
290
+//===========================================================================
291
+
292
+/**
293
+ * Thermal Runaway Protection protects your printer from damage and fire if a
294
+ * thermistor falls out or temperature sensors fail in any way.
295
+ *
296
+ * The issue: If a thermistor falls out or a temperature sensor fails,
297
+ * Marlin can no longer sense the actual temperature. Since a disconnected
298
+ * thermistor reads as a low temperature, the firmware will keep the heater on.
299
+ *
300
+ * The solution: Once the temperature reaches the target, start observing.
301
+ * If the temperature stays too far below the target (hysteresis) for too long,
302
+ * the firmware will halt as a safety precaution.
303
+ *
304
+ * Note that because the countdown starts only AFTER the temperature reaches
305
+ * the target, this will not catch a thermistor that is already disconnected
306
+ * when the print starts!
307
+ *
308
+ * To enable for all extruder heaters, uncomment the two defines below:
309
+ */
310
+
311
+// Parameters for all extruder heaters
312
+#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 // in seconds
313
+#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius
314
+
315
+// To enable for the bed heater, uncomment the two defines below:
316
+
317
+// Parameters for the bed heater
318
+#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 120 // in seconds
319
+#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 4 // in degree Celsius
320
+
321
+//===========================================================================
322
+//============================= Mechanical Settings =========================
323
+//===========================================================================
324
+
325
+// Uncomment this option to enable CoreXY kinematics
326
+// #define COREXY
327
+
328
+// Enable this option for Toshiba steppers
329
+// #define CONFIG_STEPPERS_TOSHIBA
330
+
331
+// coarse Endstop Settings
332
+#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
333
+
334
+#ifndef ENDSTOPPULLUPS
335
+  // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
336
+  // #define ENDSTOPPULLUP_XMAX
337
+  // #define ENDSTOPPULLUP_YMAX
338
+  // #define ENDSTOPPULLUP_ZMAX
339
+  // #define ENDSTOPPULLUP_XMIN
340
+  // #define ENDSTOPPULLUP_YMIN
341
+  // #define ENDSTOPPULLUP_ZMIN
342
+#endif
343
+
344
+// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
345
+const bool X_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
346
+const bool Y_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
347
+const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
348
+const bool X_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
349
+const bool Y_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
350
+const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
351
+const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
352
+//#define DISABLE_MAX_ENDSTOPS
353
+#define DISABLE_MIN_ENDSTOPS // Deltas only use min endstops for probing
354
+
355
+// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
356
+#define X_ENABLE_ON 0
357
+#define Y_ENABLE_ON 0
358
+#define Z_ENABLE_ON 0
359
+#define E_ENABLE_ON 0 // For all extruders
360
+
361
+// Disables axis when it's not being used.
362
+// WARNING: When motors turn off there is a chance of losing position accuracy!
363
+#define DISABLE_X false
364
+#define DISABLE_Y false
365
+#define DISABLE_Z false
366
+#define DISABLE_E false // For all extruders
367
+#define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled
368
+
369
+// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
370
+#define INVERT_X_DIR false // DELTA does not invert
371
+#define INVERT_Y_DIR false
372
+#define INVERT_Z_DIR false
373
+#define INVERT_E0_DIR false
374
+#define INVERT_E1_DIR false
375
+#define INVERT_E2_DIR false
376
+#define INVERT_E3_DIR false
377
+
378
+// ENDSTOP SETTINGS:
379
+// Sets direction of endstops when homing; 1=MAX, -1=MIN
380
+#define X_HOME_DIR 1 // deltas always home to max
381
+#define Y_HOME_DIR 1
382
+#define Z_HOME_DIR 1
383
+
384
+#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
385
+#define max_software_endstops true  // If true, axis won't move to coordinates greater than the defined lengths below.
386
+
387
+// Travel limits after homing (units are in mm)
388
+#define X_MIN_POS -DELTA_PRINTABLE_RADIUS
389
+#define Y_MIN_POS -DELTA_PRINTABLE_RADIUS
390
+#define Z_MIN_POS 0
391
+#define X_MAX_POS DELTA_PRINTABLE_RADIUS
392
+#define Y_MAX_POS DELTA_PRINTABLE_RADIUS
393
+#define Z_MAX_POS MANUAL_Z_HOME_POS
394
+
395
+//===========================================================================
396
+//========================= Filament Runout Sensor ==========================
397
+//===========================================================================
398
+//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament
399
+                                 // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
400
+                                 // It is assumed that when logic high = filament available
401
+                                 //                    when logic  low = filament ran out
402
+//const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
403
+//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
404
+
405
+//===========================================================================
406
+//=========================== Manual Bed Leveling ===========================
407
+//===========================================================================
408
+
409
+// #define MANUAL_BED_LEVELING  // Add display menu option for bed leveling
410
+// #define MESH_BED_LEVELING    // Enable mesh bed leveling
411
+
412
+#ifdef MANUAL_BED_LEVELING
413
+  #define MBL_Z_STEP 0.025
414
+#endif  // MANUAL_BED_LEVELING
415
+
416
+#ifdef MESH_BED_LEVELING
417
+  #define MESH_MIN_X 10
418
+  #define MESH_MAX_X (X_MAX_POS - MESH_MIN_X)
419
+  #define MESH_MIN_Y 10
420
+  #define MESH_MAX_Y (Y_MAX_POS - MESH_MIN_Y)
421
+  #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited
422
+  #define MESH_NUM_Y_POINTS 3
423
+  #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0
424
+#endif  // MESH_BED_LEVELING
425
+
426
+//===========================================================================
427
+//============================ Bed Auto Leveling ============================
428
+//===========================================================================
429
+
430
+//#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line)
431
+//#define Z_PROBE_REPEATABILITY_TEST // Z-Probe Repeatability test is not supported in Deltas yet.
432
+
433
+#ifdef ENABLE_AUTO_BED_LEVELING
434
+
435
+  // There are 2 different ways to specify probing locations
436
+  //
437
+  // - "grid" mode
438
+  //   Probe several points in a rectangular grid.
439
+  //   You specify the rectangle and the density of sample points.
440
+  //   This mode is preferred because there are more measurements.
441
+  //
442
+  // - "3-point" mode
443
+  //   Probe 3 arbitrary points on the bed (that aren't colinear)
444
+  //   You specify the XY coordinates of all 3 points.
445
+
446
+  // Enable this to sample the bed in a grid (least squares solution)
447
+  // Note: this feature generates 10KB extra code size
448
+  #define AUTO_BED_LEVELING_GRID  // Deltas only support grid mode
449
+
450
+  #ifdef AUTO_BED_LEVELING_GRID
451
+
452
+    #define DELTA_PROBABLE_RADIUS (DELTA_PRINTABLE_RADIUS - 10)
453
+
454
+    #define LEFT_PROBE_BED_POSITION -DELTA_PROBABLE_RADIUS
455
+    #define RIGHT_PROBE_BED_POSITION DELTA_PROBABLE_RADIUS
456
+    #define FRONT_PROBE_BED_POSITION -DELTA_PROBABLE_RADIUS
457
+    #define BACK_PROBE_BED_POSITION DELTA_PROBABLE_RADIUS
458
+    
459
+    #define MIN_PROBE_EDGE 10 // The probe square sides can be no smaller than this
460
+
461
+    // Non-linear bed leveling will be used.
462
+    // Compensate by interpolating between the nearest four Z probe values for each point.
463
+    // Useful for deltas where the print surface may appear like a bowl or dome shape.
464
+    // Works best with ACCURATE_BED_LEVELING_POINTS 5 or higher.
465
+    #define AUTO_BED_LEVELING_GRID_POINTS 9
466
+
467
+  #else  // !AUTO_BED_LEVELING_GRID
468
+
469
+      // Arbitrary points to probe. A simple cross-product
470
+      // is used to estimate the plane of the bed.
471
+      #define ABL_PROBE_PT_1_X 15
472
+      #define ABL_PROBE_PT_1_Y 180
473
+      #define ABL_PROBE_PT_2_X 15
474
+      #define ABL_PROBE_PT_2_Y 20
475
+      #define ABL_PROBE_PT_3_X 170
476
+      #define ABL_PROBE_PT_3_Y 20
477
+
478
+  #endif // AUTO_BED_LEVELING_GRID
479
+
480
+  // Offsets to the probe relative to the extruder tip (Hotend - Probe)
481
+  // X and Y offsets must be integers
482
+  #define X_PROBE_OFFSET_FROM_EXTRUDER 0     // Probe on: -left  +right
483
+  #define Y_PROBE_OFFSET_FROM_EXTRUDER -10   // Probe on: -front +behind
484
+  #define Z_PROBE_OFFSET_FROM_EXTRUDER -3.5  // -below (always!)
485
+
486
+  #define Z_RAISE_BEFORE_HOMING 4       // (in mm) Raise Z before homing (G28) for Probe Clearance.
487
+                                        // Be sure you have this distance over your Z_MAX_POS in case
488
+
489
+  #define XY_TRAVEL_SPEED 4000         // X and Y axis travel speed between probes, in mm/min
490
+
491
+  #define Z_RAISE_BEFORE_PROBING 15   //How much the extruder will be raised before traveling to the first probing point.
492
+  #define Z_RAISE_BETWEEN_PROBINGS 5  //How much the extruder will be raised when traveling from between next probing points
493
+  #define Z_RAISE_AFTER_PROBING 50    //How much the extruder will be raised after the last probing point.
494
+
495
+//   #define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" //These commands will be executed in the end of G29 routine.
496
+                                                                            //Useful to retract a deployable probe.
497
+                                                                           
498
+  //#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell
499
+  //#define SLED_DOCKING_OFFSET 5 // the extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
500
+
501
+  // Allen key retractable z-probe as seen on many Kossel delta printers - http://reprap.org/wiki/Kossel#Automatic_bed_leveling_probe
502
+  // Deploys by touching z-axis belt. Retracts by pushing the probe down. Uses Z_MIN_PIN.
503
+  //#define Z_PROBE_ALLEN_KEY
504
+  #ifdef Z_PROBE_ALLEN_KEY
505
+    #define Z_PROBE_ALLEN_KEY_DEPLOY_X 30
506
+    #define Z_PROBE_ALLEN_KEY_DEPLOY_Y DELTA_PRINTABLE_RADIUS
507
+    #define Z_PROBE_ALLEN_KEY_DEPLOY_Z 100
508
+    
509
+    #define Z_PROBE_ALLEN_KEY_STOW_X     -64
510
+    #define Z_PROBE_ALLEN_KEY_STOW_Y     56
511
+    #define Z_PROBE_ALLEN_KEY_STOW_Z     23
512
+    #define Z_PROBE_ALLEN_KEY_STOW_DEPTH 20
513
+  #endif
514
+  
515
+  //If defined, the Probe servo will be turned on only during movement and then turned off to avoid jerk
516
+  //The value is the delay to turn the servo off after powered on - depends on the servo speed; 300ms is good value, but you can try lower it.
517
+  // You MUST HAVE the SERVO_ENDSTOPS defined to use here a value higher than zero otherwise your code will not compile.
518
+
519
+//  #define PROBE_SERVO_DEACTIVATION_DELAY 300
520
+
521
+
522
+//If you have enabled the Bed Auto Leveling and are using the same Z Probe for Z Homing,
523
+//it is highly recommended you let this Z_SAFE_HOMING enabled!!!
524
+
525
+  #define Z_SAFE_HOMING   // This feature is meant to avoid Z homing with probe outside the bed area.
526
+                          // When defined, it will:
527
+                          // - Allow Z homing only after X and Y homing AND stepper drivers still enabled
528
+                          // - If stepper drivers timeout, it will need X and Y homing again before Z homing
529
+                          // - Position the probe in a defined XY point before Z Homing when homing all axis (G28)
530
+                          // - Block Z homing only when the probe is outside bed area.
531
+
532
+  #ifdef Z_SAFE_HOMING
533
+
534
+    #define Z_SAFE_HOMING_X_POINT (X_MAX_LENGTH/2)    // X point for Z homing when homing all axis (G28)
535
+    #define Z_SAFE_HOMING_Y_POINT (Y_MAX_LENGTH/2)    // Y point for Z homing when homing all axis (G28)
536
+
537
+  #endif
538
+
539
+  // Support for a dedicated Z PROBE endstop separate from the Z MIN endstop.
540
+  // If you would like to use both a Z PROBE and a Z MIN endstop together or just a Z PROBE with a custom pin, uncomment #define Z_PROBE_ENDSTOP and read the instructions below.
541
+  // If you want to still use the Z min endstop for homing, disable Z_SAFE_HOMING above. Eg; to park the head outside the bed area when homing with G28.
542
+  // WARNING: The Z MIN endstop will need to set properly as it would without a Z PROBE to prevent head crashes and premature stopping during a print.
543
+  // To use a separate Z PROBE endstop, you must have a Z_PROBE_PIN defined in the pins.h file for your control board.
544
+  // If you are using a servo based Z PROBE, you will need to enable NUM_SERVOS, SERVO_ENDSTOPS and SERVO_ENDSTOPS_ANGLES in the R/C Servo below.
545
+  // RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin in the Aux 4 section of the RAMPS board. Use 5V for powered sensors, otherwise connect to ground and D32
546
+  // for normally closed configuration and 5V and D32 for normally open configurations. Normally closed configuration is advised and assumed.
547
+  // The D32 pin in Aux 4 on RAMPS maps to the Arduino D32 pin. Z_PROBE_PIN is setting the pin to use on the Arduino. Since the D32 pin on the RAMPS maps to D32 on Arduino, this works.
548
+  // D32 is currently selected in the RAMPS 1.3/1.4 pin file. All other boards will need changes to the respective pins_XXXXX.h file.
549
+  // WARNING: Setting the wrong pin may have unexpected and potentially disastrous outcomes. Use with caution and do your homework.
550
+
551
+  //#define Z_PROBE_ENDSTOP
552
+
553
+#endif // ENABLE_AUTO_BED_LEVELING
554
+
555
+
556
+// The position of the homing switches
557
+#define MANUAL_HOME_POSITIONS  // If defined, MANUAL_*_HOME_POS below will be used
558
+//#define BED_CENTER_AT_0_0  // If defined, the center of the bed is at (X=0, Y=0)
559
+
560
+// Manual homing switch locations:
561
+// For deltabots this means top and center of the Cartesian print volume.
562
+#ifdef MANUAL_HOME_POSITIONS
563
+  #define MANUAL_X_HOME_POS 0
564
+  #define MANUAL_Y_HOME_POS 0
565
+  #define MANUAL_Z_HOME_POS 405 // For delta: Distance between nozzle and print surface after homing.
566
+#endif
567
+
568
+/**
569
+ * MOVEMENT SETTINGS
570
+ */
571
+
572
+
573
+// delta homing speeds must be the same on xyz
574
+#define HOMING_FEEDRATE {200*30, 200*30, 200*30, 0}  // set the homing speeds (mm/min)
575
+
576
+// default settings
577
+// delta speeds must be the same on xyz
578
+#define DEFAULT_AXIS_STEPS_PER_UNIT   {72.9, 72.9, 72.9, 291}  // default steps per unit for BI v2.5 (cable drive)
579
+#define DEFAULT_MAX_FEEDRATE          {500, 500, 500, 150}    // (mm/sec)
580
+#define DEFAULT_MAX_ACCELERATION      {9000,9000,9000,10000}    // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for skeinforge 40+, for older versions raise them a lot.
581
+
582
+#define DEFAULT_ACCELERATION          3000    // X, Y, Z and E acceleration in mm/s^2 for printing moves
583
+#define DEFAULT_RETRACT_ACCELERATION  3000   // E acceleration in mm/s^2 for retracts
584
+#define DEFAULT_TRAVEL_ACCELERATION   3000    // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves
585
+
586
+// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
587
+// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).
588
+// For the other hotends it is their distance from the extruder 0 hotend.
589
+// #define EXTRUDER_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis
590
+// #define EXTRUDER_OFFSET_Y {0.0, 5.00}  // (in mm) for each extruder, offset of the hotend on the Y axis
591
+
592
+// The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously)
593
+#define DEFAULT_XYJERK                15.0    // (mm/sec)
594
+#define DEFAULT_ZJERK                 15.0    // (mm/sec) Must be same as XY for delta
595
+#define DEFAULT_EJERK                 5.0    // (mm/sec)
596
+
597
+
598
+//=============================================================================
599
+//============================= Additional Features ===========================
600
+//=============================================================================
601
+
602
+// Custom M code points
603
+#define CUSTOM_M_CODES
604
+#ifdef CUSTOM_M_CODES
605
+  #ifdef ENABLE_AUTO_BED_LEVELING
606
+    #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
607
+    #define Z_PROBE_OFFSET_RANGE_MIN -20
608
+    #define Z_PROBE_OFFSET_RANGE_MAX 20
609
+  #endif
610
+#endif
611
+
612
+
613
+// EEPROM
614
+// The microcontroller can store settings in the EEPROM, e.g. max velocity...
615
+// M500 - stores parameters in EEPROM
616
+// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
617
+// M502 - reverts to the default "factory settings".  You still need to store them in EEPROM afterwards if you want to.
618
+//define this to enable EEPROM support
619
+//#define EEPROM_SETTINGS
620
+
621
+#ifdef EEPROM_SETTINGS
622
+  // To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
623
+  #define EEPROM_CHITCHAT // please keep turned on if you can.
624
+#endif
625
+
626
+// Preheat Constants
627
+#define PLA_PREHEAT_HOTEND_TEMP 180
628
+#define PLA_PREHEAT_HPB_TEMP 70
629
+#define PLA_PREHEAT_FAN_SPEED 255   // Insert Value between 0 and 255
630
+
631
+#define ABS_PREHEAT_HOTEND_TEMP 240
632
+#define ABS_PREHEAT_HPB_TEMP 100
633
+#define ABS_PREHEAT_FAN_SPEED 255   // Insert Value between 0 and 255
634
+
635
+//==============================LCD and SD support=============================
636
+
637
+// Define your display language below. Replace (en) with your language code and uncomment.
638
+// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, cn, test
639
+// See also language.h
640
+#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
641
+
642
+// Choose ONE of these 3 charsets. This has to match your hardware. Ignored for full graphic display.
643
+// To find out what type you have - compile with (test) - upload - click to get the menu. You'll see two typical lines from the upper half of the charset.
644
+// See also documentation/LCDLanguageFont.md
645
+  #define DISPLAY_CHARSET_HD44780_JAPAN        // this is the most common hardware
646
+  //#define DISPLAY_CHARSET_HD44780_WESTERN
647
+  //#define DISPLAY_CHARSET_HD44780_CYRILLIC
648
+
649
+//#define ULTRA_LCD  //general LCD support, also 16x2
650
+//#define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
651
+//#define SDSUPPORT // Enable SD Card Support in Hardware Console
652
+//#define SDSLOW // Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
653
+//#define SD_CHECK_AND_RETRY // Use CRC checks and retries on the SD communication
654
+//#define ENCODER_PULSES_PER_STEP 1 // Increase if you have a high resolution encoder
655
+//#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
656
+//#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
657
+//#define ULTIPANEL  //the UltiPanel as on Thingiverse
658
+//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
659
+//#define LCD_FEEDBACK_FREQUENCY_HZ 1000         // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
660
+                                                 // 0 to disable buzzer feedback. Test with M300 S<frequency Hz> P<duration ms>
661
+
662
+// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
663
+// http://reprap.org/wiki/PanelOne
664
+//#define PANEL_ONE
665
+
666
+// The MaKr3d Makr-Panel with graphic controller and SD support
667
+// http://reprap.org/wiki/MaKr3d_MaKrPanel
668
+//#define MAKRPANEL
669
+
670
+// The Panucatt Devices Viki 2.0 and mini Viki with Graphic LCD
671
+// http://panucatt.com
672
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
673
+//#define VIKI2
674
+//#define miniVIKI
675
+
676
+// The RepRapDiscount Smart Controller (white PCB)
677
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
678
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
679
+
680
+// The GADGETS3D G3D LCD/SD Controller (blue PCB)
681
+// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
682
+//#define G3D_PANEL
683
+
684
+// The RepRapDiscount FULL GRAPHIC Smart Controller (quadratic white PCB)
685
+// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
686
+//
687
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
688
+#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
689
+
690
+// The RepRapWorld REPRAPWORLD_KEYPAD v1.1
691
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
692
+//#define REPRAPWORLD_KEYPAD
693
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 // how much should be moved when a key is pressed, eg 10.0 means 10mm per click
694
+
695
+// The Elefu RA Board Control Panel
696
+// http://www.elefu.com/index.php?route=product/product&product_id=53
697
+// REMEMBER TO INSTALL LiquidCrystal_I2C.h in your ARDUINO library folder: https://github.com/kiyoshigawa/LiquidCrystal_I2C
698
+//#define RA_CONTROL_PANEL
699
+
700
+// Delta calibration menu
701
+// uncomment to add three points calibration menu option.
702
+// See http://minow.blogspot.com/index.html#4918805519571907051
703
+// If needed, adjust the X, Y, Z calibration coordinates
704
+// in ultralcd.cpp@lcd_delta_calibrate_menu()
705
+// #define DELTA_CALIBRATION_MENU
706
+
707
+/**
708
+ * I2C Panels
709
+ */
710
+
711
+//#define LCD_I2C_SAINSMART_YWROBOT
712
+
713
+// PANELOLU2 LCD with status LEDs, separate encoder and click inputs
714
+//#define LCD_I2C_PANELOLU2
715
+
716
+// Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs
717
+//#define LCD_I2C_VIKI
718
+
719
+// Shift register panels
720
+// ---------------------
721
+// 2 wire Non-latching LCD SR from:
722
+// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
723
+
724
+//#define SAV_3DLCD
725
+
726
+// Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
727
+//#define FAST_PWM_FAN
728
+
729
+// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
730
+// which is not as annoying as with the hardware PWM. On the other hand, if this frequency
731
+// is too low, you should also increment SOFT_PWM_SCALE.
732
+//#define FAN_SOFT_PWM
733
+
734
+// Incrementing this by 1 will double the software PWM frequency,
735
+// affecting heaters, and the fan if FAN_SOFT_PWM is enabled.
736
+// However, control resolution will be halved for each increment;
737
+// at zero value, there are 128 effective control positions.
738
+#define SOFT_PWM_SCALE 0
739
+
740
+// Temperature status LEDs that display the hotend and bet temperature.
741
+// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
742
+// Otherwise the RED led is on. There is 1C hysteresis.
743
+//#define TEMP_STAT_LEDS
744
+
745
+// M240  Triggers a camera by emulating a Canon RC-1 Remote
746
+// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
747
+// #define PHOTOGRAPH_PIN     23
748
+
749
+// SF send wrong arc g-codes when using Arc Point as fillet procedure
750
+//#define SF_ARC_FIX
751
+
752
+// Support for the BariCUDA Paste Extruder.
753
+//#define BARICUDA
754
+
755
+//define BlinkM/CyzRgb Support
756
+//#define BLINKM
757
+
758
+/*********************************************************************\
759
+* R/C SERVO support
760
+* Sponsored by TrinityLabs, Reworked by codexmas
761
+**********************************************************************/
762
+
763
+// Number of servos
764
+//
765
+// If you select a configuration below, this will receive a default value and does not need to be set manually
766
+// set it manually if you have more servos than extruders and wish to manually control some
767
+// leaving it undefined or defining as 0 will disable the servo subsystem
768
+// If unsure, leave commented / disabled
769
+//
770
+//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
771
+
772
+// Servo Endstops
773
+//
774
+// This allows for servo actuated endstops, primary usage is for the Z Axis to eliminate calibration or bed height changes.
775
+// Use M851 to set the z-probe vertical offset from the nozzle. Store that setting with M500.
776
+//
777
+//#define SERVO_ENDSTOPS {-1, -1, 0} // Servo index for X, Y, Z. Disable with -1
778
+//#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles
779
+
780
+/**********************************************************************\
781
+ * Support for a filament diameter sensor
782
+ * Also allows adjustment of diameter at print time (vs  at slicing)
783
+ * Single extruder only at this point (extruder 0)
784
+ *
785
+ * Motherboards
786
+ * 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector
787
+ * 81 - Printrboard - Uses Analog input 2 on the Exp1 connector (version B,C,D,E)
788
+ * 301 - Rambo  - uses Analog input 3
789
+ * Note may require analog pins to be defined for different motherboards
790
+ **********************************************************************/
791
+// Uncomment below to enable
792
+//#define FILAMENT_SENSOR
793
+
794
+#define FILAMENT_SENSOR_EXTRUDER_NUM	0  //The number of the extruder that has the filament sensor (0,1,2)
795
+#define MEASUREMENT_DELAY_CM			14  //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
796
+
797
+#define DEFAULT_NOMINAL_FILAMENT_DIA  1.75  //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software.  Used for sensor reading validation
798
+#define MEASURED_UPPER_LIMIT          3.30  //upper limit factor used for sensor reading validation in mm
799
+#define MEASURED_LOWER_LIMIT          1.90  //lower limit factor for sensor reading validation in mm
800
+#define MAX_MEASUREMENT_DELAY			20  //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM  and lower number saves RAM)
801
+
802
+//defines used in the code
803
+#define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially
804
+
805
+//When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status.  Status will appear for 5 sec.
806
+//#define FILAMENT_LCD_DISPLAY
807
+
808
+
809
+
810
+
811
+
812
+
813
+#include "Configuration_adv.h"
814
+#include "thermistortables.h"
815
+
816
+#endif //CONFIGURATION_H

+ 552
- 0
Marlin/example_configurations/delta/biv2.5/Configuration_adv.h View File

1
+#ifndef CONFIGURATION_ADV_H
2
+#define CONFIGURATION_ADV_H
3
+
4
+#include "Conditionals.h"
5
+
6
+// @section temperature
7
+
8
+//===========================================================================
9
+//=============================Thermal Settings  ============================
10
+//===========================================================================
11
+
12
+#ifdef BED_LIMIT_SWITCHING
13
+  #define BED_HYSTERESIS 2 //only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS
14
+#endif
15
+#define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control
16
+
17
+//// Heating sanity check:
18
+// This waits for the watch period in milliseconds whenever an M104 or M109 increases the target temperature
19
+// If the temperature has not increased at the end of that period, the target temperature is set to zero.
20
+// It can be reset with another M104/M109. This check is also only triggered if the target temperature and the current temperature
21
+//  differ by at least 2x WATCH_TEMP_INCREASE
22
+#define WATCH_TEMP_PERIOD 40000 //40 seconds
23
+#define WATCH_TEMP_INCREASE 10  //Heat up at least 10 degree in 20 seconds
24
+
25
+#ifdef PIDTEMP
26
+  // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
27
+  // if Kc is chosen well, the additional required power due to increased melting should be compensated.
28
+  #define PID_ADD_EXTRUSION_RATE
29
+  #ifdef PID_ADD_EXTRUSION_RATE
30
+    #define  DEFAULT_Kc (1) //heating power=Kc*(e_speed)
31
+  #endif
32
+#endif
33
+
34
+
35
+//automatic temperature: The hot end target temperature is calculated by all the buffered lines of gcode.
36
+//The maximum buffered steps/sec of the extruder motor are called "se".
37
+//You enter the autotemp mode by a M109 S<mintemp> B<maxtemp> F<factor>
38
+// the target temperature is set to mintemp+factor*se[steps/sec] and limited by mintemp and maxtemp
39
+// you exit the value by any M109 without F*
40
+// Also, if the temperature is set to a value <mintemp, it is not changed by autotemp.
41
+// on an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
42
+#define AUTOTEMP
43
+#ifdef AUTOTEMP
44
+  #define AUTOTEMP_OLDWEIGHT 0.98
45
+#endif
46
+
47
+//Show Temperature ADC value
48
+//The M105 command return, besides traditional information, the ADC value read from temperature sensors.
49
+//#define SHOW_TEMP_ADC_VALUES
50
+
51
+// @section extruder
52
+
53
+//  extruder run-out prevention.
54
+//if the machine is idle, and the temperature over MINTEMP, every couple of SECONDS some filament is extruded
55
+//#define EXTRUDER_RUNOUT_PREVENT
56
+#define EXTRUDER_RUNOUT_MINTEMP 190
57
+#define EXTRUDER_RUNOUT_SECONDS 30.
58
+#define EXTRUDER_RUNOUT_ESTEPS 14. //mm filament
59
+#define EXTRUDER_RUNOUT_SPEED 1500.  //extrusion speed
60
+#define EXTRUDER_RUNOUT_EXTRUDE 100
61
+
62
+// @section temperature
63
+
64
+//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
65
+//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
66
+#define TEMP_SENSOR_AD595_OFFSET 0.0
67
+#define TEMP_SENSOR_AD595_GAIN   1.0
68
+
69
+//This is for controlling a fan to cool down the stepper drivers
70
+//it will turn on when any driver is enabled
71
+//and turn off after the set amount of seconds from last driver being disabled again
72
+#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable)
73
+#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run
74
+#define CONTROLLERFAN_SPEED 255  // == full speed
75
+
76
+// When first starting the main fan, run it at full speed for the
77
+// given number of milliseconds.  This gets the fan spinning reliably
78
+// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
79
+//#define FAN_KICKSTART_TIME 100
80
+
81
+// @section extruder
82
+
83
+// Extruder cooling fans
84
+// Configure fan pin outputs to automatically turn on/off when the associated
85
+// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE.
86
+// Multiple extruders can be assigned to the same pin in which case
87
+// the fan will turn on when any selected extruder is above the threshold.
88
+#define EXTRUDER_0_AUTO_FAN_PIN -1
89
+#define EXTRUDER_1_AUTO_FAN_PIN -1
90
+#define EXTRUDER_2_AUTO_FAN_PIN -1
91
+#define EXTRUDER_3_AUTO_FAN_PIN -1
92
+#define EXTRUDER_AUTO_FAN_TEMPERATURE 50
93
+#define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
94
+
95
+
96
+//===========================================================================
97
+//=============================Mechanical Settings===========================
98
+//===========================================================================
99
+
100
+// @section homing
101
+
102
+#define ENDSTOPS_ONLY_FOR_HOMING // If defined the endstops will only be used for homing
103
+
104
+// @section extras
105
+
106
+//#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
107
+
108
+// A single Z stepper driver is usually used to drive 2 stepper motors.
109
+// Uncomment this define to utilize a separate stepper driver for each Z axis motor.
110
+// Only a few motherboards support this, like RAMPS, which have dual extruder support (the 2nd, often unused, extruder driver is used
111
+// to control the 2nd Z axis stepper motor). The pins are currently only defined for a RAMPS motherboards.
112
+// On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder.
113
+//#define Z_DUAL_STEPPER_DRIVERS
114
+
115
+#ifdef Z_DUAL_STEPPER_DRIVERS
116
+
117
+  // Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper.
118
+  // That way the machine is capable to align the bed during home, since both Z steppers are homed. 
119
+  // There is also an implementation of M666 (software endstops adjustment) to this feature.
120
+  // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed.
121
+  // One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2.
122
+  // If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive.
123
+  // Play a little bit with small adjustments (0.5mm) and check the behaviour.
124
+  // The M119 (endstops report) will start reporting the Z2 Endstop as well.
125
+
126
+  #define Z_DUAL_ENDSTOPS
127
+
128
+  #ifdef Z_DUAL_ENDSTOPS
129
+    #define Z2_STEP_PIN E2_STEP_PIN           // Stepper to be used to Z2 axis.
130
+    #define Z2_DIR_PIN E2_DIR_PIN
131
+    #define Z2_ENABLE_PIN E2_ENABLE_PIN
132
+    #define Z2_MAX_PIN 36                     //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36)
133
+    const bool Z2_MAX_ENDSTOP_INVERTING = false;
134
+    #define DISABLE_XMAX_ENDSTOP              //Better to disable the XMAX to avoid conflict. Just rename "XMAX_ENDSTOP" by the endstop you are using for Z2 axis.
135
+  #endif
136
+
137
+#endif // Z_DUAL_STEPPER_DRIVERS
138
+
139
+// Same again but for Y Axis.
140
+//#define Y_DUAL_STEPPER_DRIVERS
141
+
142
+// Define if the two Y drives need to rotate in opposite directions
143
+#define INVERT_Y2_VS_Y_DIR true
144
+
145
+// Enable this for dual x-carriage printers.
146
+// A dual x-carriage design has the advantage that the inactive extruder can be parked which
147
+// prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
148
+// allowing faster printing speeds.
149
+//#define DUAL_X_CARRIAGE
150
+#ifdef DUAL_X_CARRIAGE
151
+  // Configuration for second X-carriage
152
+  // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop;
153
+  // the second x-carriage always homes to the maximum endstop.
154
+  #define X2_MIN_POS 80     // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
155
+  #define X2_MAX_POS 353    // set maximum to the distance between toolheads when both heads are homed
156
+  #define X2_HOME_DIR 1     // the second X-carriage always homes to the maximum endstop position
157
+  #define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position
158
+      // However: In this mode the EXTRUDER_OFFSET_X value for the second extruder provides a software
159
+      // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
160
+      // without modifying the firmware (through the "M218 T1 X???" command).
161
+      // Remember: you should set the second extruder x-offset to 0 in your slicer.
162
+
163
+  // Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h)
164
+  #define X2_ENABLE_PIN 29
165
+  #define X2_STEP_PIN 25
166
+  #define X2_DIR_PIN 23
167
+
168
+  // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
169
+  //    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
170
+  //                           as long as it supports dual x-carriages. (M605 S0)
171
+  //    Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
172
+  //                           that additional slicer support is not required. (M605 S1)
173
+  //    Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
174
+  //                           actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
175
+  //                           once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
176
+
177
+  // This is the default power-up mode which can be later using M605.
178
+  #define DEFAULT_DUAL_X_CARRIAGE_MODE 0
179
+
180
+  // Default settings in "Auto-park Mode"
181
+  #define TOOLCHANGE_PARK_ZLIFT   0.2      // the distance to raise Z axis when parking an extruder
182
+  #define TOOLCHANGE_UNPARK_ZLIFT 1        // the distance to raise Z axis when unparking an extruder
183
+
184
+  // Default x offset in duplication mode (typically set to half print bed width)
185
+  #define DEFAULT_DUPLICATION_X_OFFSET 100
186
+
187
+#endif //DUAL_X_CARRIAGE
188
+
189
+// @section homing
190
+
191
+//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
192
+#define X_HOME_BUMP_MM 5
193
+#define Y_HOME_BUMP_MM 5
194
+#define Z_HOME_BUMP_MM 5 // deltas need the same for all three axis
195
+#define HOMING_BUMP_DIVISOR {10, 10, 20}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
196
+//#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
197
+
198
+// When G28 is called, this option will make Y home before X
199
+// #define HOME_Y_BEFORE_X
200
+
201
+// @section machine
202
+
203
+#define AXIS_RELATIVE_MODES {false, false, false, false}
204
+
205
+// @section machine
206
+
207
+//By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step.
208
+#define INVERT_X_STEP_PIN false
209
+#define INVERT_Y_STEP_PIN false
210
+#define INVERT_Z_STEP_PIN false
211
+#define INVERT_E_STEP_PIN false
212
+
213
+// Default stepper release if idle. Set to 0 to deactivate.
214
+#define DEFAULT_STEPPER_DEACTIVE_TIME 0
215
+
216
+#define DEFAULT_MINIMUMFEEDRATE       0.0     // minimum feedrate
217
+#define DEFAULT_MINTRAVELFEEDRATE     0.0
218
+
219
+// @section lcd
220
+
221
+#ifdef ULTIPANEL
222
+  #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel
223
+  #define ULTIPANEL_FEEDMULTIPLY  // Comment to disable setting feedrate multiplier via encoder
224
+#endif
225
+
226
+// @section extras
227
+
228
+// minimum time in microseconds that a movement needs to take if the buffer is emptied.
229
+#define DEFAULT_MINSEGMENTTIME        20000
230
+
231
+// If defined the movements slow down when the look ahead buffer is only half full
232
+// (don't use SLOWDOWN with DELTA because DELTA generates hundreds of segments per second)
233
+//#define SLOWDOWN
234
+
235
+// Frequency limit
236
+// See nophead's blog for more info
237
+// Not working O
238
+//#define XY_FREQUENCY_LIMIT  15
239
+
240
+// Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end
241
+// of the buffer and all stops. This should not be much greater than zero and should only be changed
242
+// if unwanted behavior is observed on a user's machine when running at very slow speeds.
243
+#define MINIMUM_PLANNER_SPEED 0.05// (mm/sec)
244
+
245
+// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
246
+#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
247
+
248
+// Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
249
+#define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
250
+
251
+// uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
252
+//#define DIGIPOT_I2C
253
+// Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8
254
+#define DIGIPOT_I2C_NUM_CHANNELS 8
255
+// actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
256
+#define DIGIPOT_I2C_MOTOR_CURRENTS {1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0}
257
+
258
+//===========================================================================
259
+//=============================Additional Features===========================
260
+//===========================================================================
261
+
262
+#define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
263
+#define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
264
+#define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
265
+
266
+//#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/
267
+#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
268
+
269
+// @section lcd
270
+
271
+#ifdef SDSUPPORT
272
+
273
+  // If you are using a RAMPS board or cheap E-bay purchased boards that do not detect when an SD card is inserted
274
+  // You can get round this by connecting a push button or single throw switch to the pin defined as SDCARDCARDDETECT
275
+  // in the pins.h file.  When using a push button pulling the pin to ground this will need inverted.  This setting should
276
+  // be commented out otherwise
277
+  #define SDCARDDETECTINVERTED
278
+
279
+  #define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
280
+  #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
281
+
282
+  #define SDCARD_RATHERRECENTFIRST  //reverse file order of sd card menu display. Its sorted practically after the file system block order.
283
+  // 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.
284
+  // using:
285
+  //#define MENU_ADDAUTOSTART
286
+
287
+  // Show a progress bar on HD44780 LCDs for SD printing
288
+  //#define LCD_PROGRESS_BAR
289
+
290
+  #ifdef LCD_PROGRESS_BAR
291
+    // Amount of time (ms) to show the bar
292
+    #define PROGRESS_BAR_BAR_TIME 2000
293
+    // Amount of time (ms) to show the status message
294
+    #define PROGRESS_BAR_MSG_TIME 3000
295
+    // Amount of time (ms) to retain the status message (0=forever)
296
+    #define PROGRESS_MSG_EXPIRE   0
297
+    // Enable this to show messages for MSG_TIME then hide them
298
+    //#define PROGRESS_MSG_ONCE
299
+  #endif
300
+
301
+#endif // SDSUPPORT
302
+
303
+// @section more
304
+
305
+// The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
306
+//#define USE_WATCHDOG
307
+
308
+#ifdef USE_WATCHDOG
309
+// If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
310
+// The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset.
311
+//  However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled.
312
+//#define WATCHDOG_RESET_MANUAL
313
+#endif
314
+
315
+// Enable the option to stop SD printing when hitting and endstops, needs to be enabled from the LCD menu when this option is enabled.
316
+//#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
317
+
318
+// @section lcd
319
+
320
+// Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process
321
+// it can e.g. be used to change z-positions in the print startup phase in real-time
322
+// does not respect endstops!
323
+//#define BABYSTEPPING
324
+#ifdef BABYSTEPPING
325
+  #define BABYSTEP_XY  //not only z, but also XY in the menu. more clutter, more functions
326
+  #define BABYSTEP_INVERT_Z false  //true for inverse movements in Z
327
+  #define BABYSTEP_Z_MULTIPLICATOR 2 //faster z movements
328
+#endif
329
+
330
+// @section extruder
331
+
332
+// extruder advance constant (s2/mm3)
333
+//
334
+// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
335
+//
336
+// Hooke's law says:    force = k * distance
337
+// Bernoulli's principle says:  v ^ 2 / 2 + g . h + pressure / density = constant
338
+// so: v ^ 2 is proportional to number of steps we advance the extruder
339
+//#define ADVANCE
340
+
341
+#ifdef ADVANCE
342
+  #define EXTRUDER_ADVANCE_K .0
343
+  #define D_FILAMENT 2.85
344
+  #define STEPS_MM_E 836
345
+#endif
346
+
347
+// @section extras
348
+
349
+// Arc interpretation settings:
350
+#define MM_PER_ARC_SEGMENT 1
351
+#define N_ARC_CORRECTION 25
352
+
353
+const unsigned int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement
354
+
355
+// @section temperature
356
+
357
+// Control heater 0 and heater 1 in parallel.
358
+//#define HEATERS_PARALLEL
359
+
360
+//===========================================================================
361
+//================================= Buffers =================================
362
+//===========================================================================
363
+
364
+// @section hidden
365
+
366
+// The number of linear motions that can be in the plan at any give time.
367
+// 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.
368
+#ifdef SDSUPPORT
369
+  #define BLOCK_BUFFER_SIZE 16   // SD,LCD,Buttons take more memory, block buffer needs to be smaller
370
+#else
371
+  #define BLOCK_BUFFER_SIZE 16 // maximize block buffer
372
+#endif
373
+
374
+// @section more
375
+
376
+//The ASCII buffer for receiving from the serial:
377
+#define MAX_CMD_SIZE 96
378
+#define BUFSIZE 4
379
+
380
+// @section fwretract
381
+
382
+// Firmware based and LCD controlled retract
383
+// M207 and M208 can be used to define parameters for the retraction.
384
+// The retraction can be called by the slicer using G10 and G11
385
+// until then, intended retractions can be detected by moves that only extrude and the direction.
386
+// the moves are than replaced by the firmware controlled ones.
387
+
388
+#define FWRETRACT  //ONLY PARTIALLY TESTED
389
+#ifdef FWRETRACT
390
+  #define MIN_RETRACT 0.1                //minimum extruded mm to accept a automatic gcode retraction attempt
391
+  #define RETRACT_LENGTH 5               //default retract length (positive mm)
392
+  #define RETRACT_LENGTH_SWAP 13         //default swap retract length (positive mm), for extruder change
393
+  #define RETRACT_FEEDRATE 100            //default feedrate for retracting (mm/s)
394
+  #define RETRACT_ZLIFT 0                //default retract Z-lift
395
+  #define RETRACT_RECOVER_LENGTH 0       //default additional recover length (mm, added to retract length when recovering)
396
+  #define RETRACT_RECOVER_LENGTH_SWAP 0  //default additional swap recover length (mm, added to retract length when recovering from extruder change)
397
+  #define RETRACT_RECOVER_FEEDRATE 100     //default feedrate for recovering from retraction (mm/s)
398
+#endif
399
+
400
+// Add support for experimental filament exchange support M600; requires display
401
+#ifdef ULTIPANEL
402
+  //#define FILAMENTCHANGEENABLE
403
+  #ifdef FILAMENTCHANGEENABLE
404
+    #define FILAMENTCHANGE_XPOS 3
405
+    #define FILAMENTCHANGE_YPOS 3
406
+    #define FILAMENTCHANGE_ZADD 10
407
+    #define FILAMENTCHANGE_FIRSTRETRACT -2
408
+    #define FILAMENTCHANGE_FINALRETRACT -100
409
+  #endif
410
+#endif
411
+
412
+/******************************************************************************\
413
+ * enable this section if you have TMC26X motor drivers. 
414
+ * you need to import the TMC26XStepper library into the arduino IDE for this
415
+ ******************************************************************************/
416
+
417
+// @section tmc
418
+
419
+//#define HAVE_TMCDRIVER
420
+#ifdef HAVE_TMCDRIVER
421
+
422
+//  #define X_IS_TMC
423
+  #define X_MAX_CURRENT 1000  //in mA
424
+  #define X_SENSE_RESISTOR 91 //in mOhms
425
+  #define X_MICROSTEPS 16     //number of microsteps
426
+  
427
+//  #define X2_IS_TMC
428
+  #define X2_MAX_CURRENT 1000  //in mA
429
+  #define X2_SENSE_RESISTOR 91 //in mOhms
430
+  #define X2_MICROSTEPS 16     //number of microsteps
431
+  
432
+//  #define Y_IS_TMC
433
+  #define Y_MAX_CURRENT 1000  //in mA
434
+  #define Y_SENSE_RESISTOR 91 //in mOhms
435
+  #define Y_MICROSTEPS 16     //number of microsteps
436
+  
437
+//  #define Y2_IS_TMC
438
+  #define Y2_MAX_CURRENT 1000  //in mA
439
+  #define Y2_SENSE_RESISTOR 91 //in mOhms
440
+  #define Y2_MICROSTEPS 16     //number of microsteps 
441
+  
442
+//  #define Z_IS_TMC
443
+  #define Z_MAX_CURRENT 1000  //in mA
444
+  #define Z_SENSE_RESISTOR 91 //in mOhms
445
+  #define Z_MICROSTEPS 16     //number of microsteps
446
+  
447
+//  #define Z2_IS_TMC
448
+  #define Z2_MAX_CURRENT 1000  //in mA
449
+  #define Z2_SENSE_RESISTOR 91 //in mOhms
450
+  #define Z2_MICROSTEPS 16     //number of microsteps
451
+  
452
+//  #define E0_IS_TMC
453
+  #define E0_MAX_CURRENT 1000  //in mA
454
+  #define E0_SENSE_RESISTOR 91 //in mOhms
455
+  #define E0_MICROSTEPS 16     //number of microsteps
456
+  
457
+//  #define E1_IS_TMC
458
+  #define E1_MAX_CURRENT 1000  //in mA
459
+  #define E1_SENSE_RESISTOR 91 //in mOhms
460
+  #define E1_MICROSTEPS 16     //number of microsteps 
461
+  
462
+//  #define E2_IS_TMC
463
+  #define E2_MAX_CURRENT 1000  //in mA
464
+  #define E2_SENSE_RESISTOR 91 //in mOhms
465
+  #define E2_MICROSTEPS 16     //number of microsteps 
466
+  
467
+//  #define E3_IS_TMC
468
+  #define E3_MAX_CURRENT 1000  //in mA
469
+  #define E3_SENSE_RESISTOR 91 //in mOhms
470
+  #define E3_MICROSTEPS 16     //number of microsteps   
471
+
472
+#endif
473
+
474
+/******************************************************************************\
475
+ * enable this section if you have L6470  motor drivers. 
476
+ * you need to import the L6470 library into the arduino IDE for this
477
+ ******************************************************************************/
478
+
479
+// @section l6470
480
+
481
+//#define HAVE_L6470DRIVER
482
+#ifdef HAVE_L6470DRIVER
483
+
484
+//  #define X_IS_L6470
485
+  #define X_MICROSTEPS 16     //number of microsteps
486
+  #define X_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
487
+  #define X_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
488
+  #define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall
489
+  
490
+//  #define X2_IS_L6470
491
+  #define X2_MICROSTEPS 16     //number of microsteps
492
+  #define X2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
493
+  #define X2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
494
+  #define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
495
+  
496
+//  #define Y_IS_L6470
497
+  #define Y_MICROSTEPS 16     //number of microsteps
498
+  #define Y_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
499
+  #define Y_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
500
+  #define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall
501
+  
502
+//  #define Y2_IS_L6470
503
+  #define Y2_MICROSTEPS 16     //number of microsteps 
504
+  #define Y2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
505
+  #define Y2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
506
+  #define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall 
507
+  
508
+//  #define Z_IS_L6470
509
+  #define Z_MICROSTEPS 16     //number of microsteps
510
+  #define Z_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
511
+  #define Z_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
512
+  #define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall
513
+  
514
+//  #define Z2_IS_L6470
515
+  #define Z2_MICROSTEPS 16     //number of microsteps
516
+  #define Z2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
517
+  #define Z2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
518
+  #define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
519
+  
520
+//  #define E0_IS_L6470
521
+  #define E0_MICROSTEPS 16     //number of microsteps
522
+  #define E0_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
523
+  #define E0_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
524
+  #define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall
525
+  
526
+//  #define E1_IS_L6470
527
+  #define E1_MICROSTEPS 16     //number of microsteps 
528
+  #define E1_MICROSTEPS 16     //number of microsteps
529
+  #define E1_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
530
+  #define E1_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
531
+  #define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall
532
+  
533
+//  #define E2_IS_L6470
534
+  #define E2_MICROSTEPS 16     //number of microsteps 
535
+  #define E2_MICROSTEPS 16     //number of microsteps
536
+  #define E2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
537
+  #define E2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
538
+  #define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
539
+  
540
+//  #define E3_IS_L6470
541
+  #define E3_MICROSTEPS 16     //number of microsteps   
542
+  #define E3_MICROSTEPS 16     //number of microsteps
543
+  #define E3_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
544
+  #define E3_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
545
+  #define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall
546
+  
547
+#endif
548
+
549
+#include "Conditionals.h"
550
+#include "SanityCheck.h"
551
+
552
+#endif //CONFIGURATION_ADV_H

+ 38
- 42
Marlin/example_configurations/delta/generic/Configuration.h View File

1
-#ifndef CONFIGURATION_H
1
+#ifndef CONFIGURATION_H
2
 #define CONFIGURATION_H
2
 #define CONFIGURATION_H
3
 
3
 
4
 #include "boards.h"
4
 #include "boards.h"
39
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
39
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
40
 // build by the user have been successfully uploaded into firmware.
40
 // build by the user have been successfully uploaded into firmware.
41
 #define STRING_VERSION "1.0.3 dev"
41
 #define STRING_VERSION "1.0.3 dev"
42
-#define STRING_URL "reprap.org"
43
 #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
42
 #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
44
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
43
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
45
 #define STRING_SPLASH_LINE1 "v" STRING_VERSION // will be shown during bootup in line 1
44
 #define STRING_SPLASH_LINE1 "v" STRING_VERSION // will be shown during bootup in line 1
287
 #define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
286
 #define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
288
 
287
 
289
 //===========================================================================
288
 //===========================================================================
290
-//============================= Thermal Runaway Protection ==================
289
+//======================== Thermal Runaway Protection =======================
291
 //===========================================================================
290
 //===========================================================================
292
-/*
293
-This is a feature to protect your printer from burn up in flames if it has
294
-a thermistor coming off place (this happened to a friend of mine recently and
295
-motivated me writing this feature).
296
-
297
-The issue: If a thermistor come off, it will read a lower temperature than actual.
298
-The system will turn the heater on forever, burning up the filament and anything
299
-else around.
300
-
301
-After the temperature reaches the target for the first time, this feature will
302
-start measuring for how long the current temperature stays below the target
303
-minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS).
304
-
305
-If it stays longer than _PERIOD, it means the thermistor temperature
306
-cannot catch up with the target, so something *may be* wrong. Then, to be on the
307
-safe side, the system will he halt.
308
 
291
 
309
-Bear in mind the count down will just start AFTER the first time the
310
-thermistor temperature is over the target, so you will have no problem if
311
-your extruder heater takes 2 minutes to hit the target on heating.
312
-
313
-*/
314
-// If you want to enable this feature for all your extruder heaters,
315
-// uncomment the 2 defines below:
292
+/**
293
+ * Thermal Runaway Protection protects your printer from damage and fire if a
294
+ * thermistor falls out or temperature sensors fail in any way.
295
+ *
296
+ * The issue: If a thermistor falls out or a temperature sensor fails,
297
+ * Marlin can no longer sense the actual temperature. Since a disconnected
298
+ * thermistor reads as a low temperature, the firmware will keep the heater on.
299
+ *
300
+ * The solution: Once the temperature reaches the target, start observing.
301
+ * If the temperature stays too far below the target (hysteresis) for too long,
302
+ * the firmware will halt as a safety precaution.
303
+ *
304
+ * Note that because the countdown starts only AFTER the temperature reaches
305
+ * the target, this will not catch a thermistor that is already disconnected
306
+ * when the print starts!
307
+ *
308
+ * To enable for all extruder heaters, uncomment the two defines below:
309
+ */
316
 
310
 
317
 // Parameters for all extruder heaters
311
 // Parameters for all extruder heaters
318
-//#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds
319
-//#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius
312
+#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 // in seconds
313
+#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius
320
 
314
 
321
-// If you want to enable this feature for your bed heater,
322
-// uncomment the 2 defines below:
315
+// To enable for the bed heater, uncomment the two defines below:
323
 
316
 
324
 // Parameters for the bed heater
317
 // Parameters for the bed heater
325
-//#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds
326
-//#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius
327
-
318
+#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 // in seconds
319
+#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius
328
 
320
 
329
 //===========================================================================
321
 //===========================================================================
330
 //============================= Mechanical Settings =========================
322
 //============================= Mechanical Settings =========================
367
 #define E_ENABLE_ON 0 // For all extruders
359
 #define E_ENABLE_ON 0 // For all extruders
368
 
360
 
369
 // Disables axis when it's not being used.
361
 // Disables axis when it's not being used.
362
+// WARNING: When motors turn off there is a chance of losing position accuracy!
370
 #define DISABLE_X false
363
 #define DISABLE_X false
371
 #define DISABLE_Y false
364
 #define DISABLE_Y false
372
 #define DISABLE_Z false
365
 #define DISABLE_Z false
400
 #define Z_MAX_POS MANUAL_Z_HOME_POS
393
 #define Z_MAX_POS MANUAL_Z_HOME_POS
401
 
394
 
402
 //===========================================================================
395
 //===========================================================================
403
-//============================= Filament Runout Sensor ======================
396
+//========================= Filament Runout Sensor ==========================
404
 //===========================================================================
397
 //===========================================================================
405
 //#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament
398
 //#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament
406
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
399
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
407
                                  // It is assumed that when logic high = filament available
400
                                  // It is assumed that when logic high = filament available
408
                                  //                    when logic  low = filament ran out
401
                                  //                    when logic  low = filament ran out
409
-//const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
410
-//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
411
-
402
+#ifdef FILAMENT_RUNOUT_SENSOR
403
+  const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
404
+  #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
405
+  #define FILAMENT_RUNOUT_SCRIPT "M600"
406
+#endif 
407
+  
412
 //===========================================================================
408
 //===========================================================================
413
-//============================ Manual Bed Leveling ==========================
409
+//=========================== Manual Bed Leveling ===========================
414
 //===========================================================================
410
 //===========================================================================
415
 
411
 
416
 // #define MANUAL_BED_LEVELING  // Add display menu option for bed leveling
412
 // #define MANUAL_BED_LEVELING  // Add display menu option for bed leveling
431
 #endif  // MESH_BED_LEVELING
427
 #endif  // MESH_BED_LEVELING
432
 
428
 
433
 //===========================================================================
429
 //===========================================================================
434
-//============================= Bed Auto Leveling ===========================
430
+//============================ Bed Auto Leveling ============================
435
 //===========================================================================
431
 //===========================================================================
436
 
432
 
437
 //#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line)
433
 //#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line)
642
 //==============================LCD and SD support=============================
638
 //==============================LCD and SD support=============================
643
 
639
 
644
 // Define your display language below. Replace (en) with your language code and uncomment.
640
 // Define your display language below. Replace (en) with your language code and uncomment.
645
-// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
641
+// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, cn, test
646
 // See also language.h
642
 // See also language.h
647
 #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
643
 #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
648
 
644
 
662
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
658
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
663
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
659
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
664
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
660
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
665
-//#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
666
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
661
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
667
-                                               // 0 to disable buzzer feedback  
662
+//#define LCD_FEEDBACK_FREQUENCY_HZ 1000         // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
663
+                                                 // 0 to disable buzzer feedback. Test with M300 S<frequency Hz> P<duration ms>
668
 
664
 
669
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
665
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
670
 // http://reprap.org/wiki/PanelOne
666
 // http://reprap.org/wiki/PanelOne

+ 4
- 2
Marlin/example_configurations/delta/generic/Configuration_adv.h View File

195
 #define HOMING_BUMP_DIVISOR {10, 10, 20}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
195
 #define HOMING_BUMP_DIVISOR {10, 10, 20}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
197
 
197
 
198
+// When G28 is called, this option will make Y home before X
199
+// #define HOME_Y_BEFORE_X
200
+
198
 // @section machine
201
 // @section machine
199
 
202
 
200
 #define AXIS_RELATIVE_MODES {false, false, false, false}
203
 #define AXIS_RELATIVE_MODES {false, false, false, false}
259
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
262
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
260
 #define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
263
 #define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
261
 #define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
264
 #define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
262
-//#define ENCODER_RATE_MULTIPLIER_DEBUG  // If defined, output the encoder steps per second value
263
 
265
 
264
 //#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/
266
 //#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/
265
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
267
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
356
 //#define HEATERS_PARALLEL
358
 //#define HEATERS_PARALLEL
357
 
359
 
358
 //===========================================================================
360
 //===========================================================================
359
-//=============================Buffers           ============================
361
+//================================= Buffers =================================
360
 //===========================================================================
362
 //===========================================================================
361
 
363
 
362
 // @section hidden
364
 // @section hidden

+ 38
- 42
Marlin/example_configurations/delta/kossel_mini/Configuration.h View File

1
-#ifndef CONFIGURATION_H
1
+#ifndef CONFIGURATION_H
2
 #define CONFIGURATION_H
2
 #define CONFIGURATION_H
3
 
3
 
4
 #include "boards.h"
4
 #include "boards.h"
39
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
39
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
40
 // build by the user have been successfully uploaded into firmware.
40
 // build by the user have been successfully uploaded into firmware.
41
 #define STRING_VERSION "1.0.3 dev"
41
 #define STRING_VERSION "1.0.3 dev"
42
-#define STRING_URL "reprap.org"
43
 #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
42
 #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
44
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
43
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
45
 #define STRING_SPLASH_LINE1 "v" STRING_VERSION // will be shown during bootup in line 1
44
 #define STRING_SPLASH_LINE1 "v" STRING_VERSION // will be shown during bootup in line 1
287
 #define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
286
 #define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
288
 
287
 
289
 //===========================================================================
288
 //===========================================================================
290
-//============================= Thermal Runaway Protection ==================
289
+//======================== Thermal Runaway Protection =======================
291
 //===========================================================================
290
 //===========================================================================
292
-/*
293
-This is a feature to protect your printer from burn up in flames if it has
294
-a thermistor coming off place (this happened to a friend of mine recently and
295
-motivated me writing this feature).
296
-
297
-The issue: If a thermistor come off, it will read a lower temperature than actual.
298
-The system will turn the heater on forever, burning up the filament and anything
299
-else around.
300
-
301
-After the temperature reaches the target for the first time, this feature will
302
-start measuring for how long the current temperature stays below the target
303
-minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS).
304
-
305
-If it stays longer than _PERIOD, it means the thermistor temperature
306
-cannot catch up with the target, so something *may be* wrong. Then, to be on the
307
-safe side, the system will he halt.
308
 
291
 
309
-Bear in mind the count down will just start AFTER the first time the
310
-thermistor temperature is over the target, so you will have no problem if
311
-your extruder heater takes 2 minutes to hit the target on heating.
312
-
313
-*/
314
-// If you want to enable this feature for all your extruder heaters,
315
-// uncomment the 2 defines below:
292
+/**
293
+ * Thermal Runaway Protection protects your printer from damage and fire if a
294
+ * thermistor falls out or temperature sensors fail in any way.
295
+ *
296
+ * The issue: If a thermistor falls out or a temperature sensor fails,
297
+ * Marlin can no longer sense the actual temperature. Since a disconnected
298
+ * thermistor reads as a low temperature, the firmware will keep the heater on.
299
+ *
300
+ * The solution: Once the temperature reaches the target, start observing.
301
+ * If the temperature stays too far below the target (hysteresis) for too long,
302
+ * the firmware will halt as a safety precaution.
303
+ *
304
+ * Note that because the countdown starts only AFTER the temperature reaches
305
+ * the target, this will not catch a thermistor that is already disconnected
306
+ * when the print starts!
307
+ *
308
+ * To enable for all extruder heaters, uncomment the two defines below:
309
+ */
316
 
310
 
317
 // Parameters for all extruder heaters
311
 // Parameters for all extruder heaters
318
-//#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds
319
-//#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius
312
+#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 // in seconds
313
+#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius
320
 
314
 
321
-// If you want to enable this feature for your bed heater,
322
-// uncomment the 2 defines below:
315
+// To enable for the bed heater, uncomment the two defines below:
323
 
316
 
324
 // Parameters for the bed heater
317
 // Parameters for the bed heater
325
-//#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds
326
-//#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius
327
-
318
+#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 // in seconds
319
+#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius
328
 
320
 
329
 //===========================================================================
321
 //===========================================================================
330
 //============================= Mechanical Settings =========================
322
 //============================= Mechanical Settings =========================
367
 #define E_ENABLE_ON 0 // For all extruders
359
 #define E_ENABLE_ON 0 // For all extruders
368
 
360
 
369
 // Disables axis when it's not being used.
361
 // Disables axis when it's not being used.
362
+// WARNING: When motors turn off there is a chance of losing position accuracy!
370
 #define DISABLE_X false
363
 #define DISABLE_X false
371
 #define DISABLE_Y false
364
 #define DISABLE_Y false
372
 #define DISABLE_Z false
365
 #define DISABLE_Z false
400
 #define Z_MAX_POS MANUAL_Z_HOME_POS
393
 #define Z_MAX_POS MANUAL_Z_HOME_POS
401
 
394
 
402
 //===========================================================================
395
 //===========================================================================
403
-//============================= Filament Runout Sensor ======================
396
+//========================= Filament Runout Sensor ==========================
404
 //===========================================================================
397
 //===========================================================================
405
 //#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament
398
 //#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament
406
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
399
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
407
                                  // It is assumed that when logic high = filament available
400
                                  // It is assumed that when logic high = filament available
408
                                  //                    when logic  low = filament ran out
401
                                  //                    when logic  low = filament ran out
409
-//const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
410
-//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
411
-
402
+#ifdef FILAMENT_RUNOUT_SENSOR
403
+  const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
404
+  #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
405
+  #define FILAMENT_RUNOUT_SCRIPT "M600"
406
+#endif 
407
+  
412
 //===========================================================================
408
 //===========================================================================
413
-//============================ Manual Bed Leveling ==========================
409
+//=========================== Manual Bed Leveling ===========================
414
 //===========================================================================
410
 //===========================================================================
415
 
411
 
416
 // #define MANUAL_BED_LEVELING  // Add display menu option for bed leveling
412
 // #define MANUAL_BED_LEVELING  // Add display menu option for bed leveling
431
 #endif  // MESH_BED_LEVELING
427
 #endif  // MESH_BED_LEVELING
432
 
428
 
433
 //===========================================================================
429
 //===========================================================================
434
-//============================= Bed Auto Leveling ===========================
430
+//============================ Bed Auto Leveling ============================
435
 //===========================================================================
431
 //===========================================================================
436
 
432
 
437
 #define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line)
433
 #define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line)
646
 //==============================LCD and SD support=============================
642
 //==============================LCD and SD support=============================
647
 
643
 
648
 // Define your display language below. Replace (en) with your language code and uncomment.
644
 // Define your display language below. Replace (en) with your language code and uncomment.
649
-// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
645
+// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, cn, test
650
 // See also language.h
646
 // See also language.h
651
 #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
647
 #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
652
 
648
 
666
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
662
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
667
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
663
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
668
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
664
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
669
-//#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
670
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
665
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
671
-                                               // 0 to disable buzzer feedback  
666
+//#define LCD_FEEDBACK_FREQUENCY_HZ 1000         // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
667
+                                                 // 0 to disable buzzer feedback. Test with M300 S<frequency Hz> P<duration ms>
672
 
668
 
673
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
669
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
674
 // http://reprap.org/wiki/PanelOne
670
 // http://reprap.org/wiki/PanelOne

+ 4
- 2
Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h View File

195
 #define HOMING_BUMP_DIVISOR {10, 10, 20}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
195
 #define HOMING_BUMP_DIVISOR {10, 10, 20}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
197
 
197
 
198
+// When G28 is called, this option will make Y home before X
199
+// #define HOME_Y_BEFORE_X
200
+
198
 // @section machine
201
 // @section machine
199
 
202
 
200
 #define AXIS_RELATIVE_MODES {false, false, false, false}
203
 #define AXIS_RELATIVE_MODES {false, false, false, false}
258
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
261
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
259
 #define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
262
 #define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
260
 #define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
263
 #define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
261
-//#define ENCODER_RATE_MULTIPLIER_DEBUG  // If defined, output the encoder steps per second value
262
 
264
 
263
 //#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/
265
 //#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/
264
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
266
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
355
 //#define HEATERS_PARALLEL
357
 //#define HEATERS_PARALLEL
356
 
358
 
357
 //===========================================================================
359
 //===========================================================================
358
-//=============================Buffers           ============================
360
+//================================= Buffers =================================
359
 //===========================================================================
361
 //===========================================================================
360
 
362
 
361
 // @section hidden
363
 // @section hidden

+ 37
- 42
Marlin/example_configurations/makibox/Configuration.h View File

1
-#ifndef CONFIGURATION_H
1
+#ifndef CONFIGURATION_H
2
 #define CONFIGURATION_H
2
 #define CONFIGURATION_H
3
 
3
 
4
 #include "boards.h"
4
 #include "boards.h"
39
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
39
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
40
 // build by the user have been successfully uploaded into firmware.
40
 // build by the user have been successfully uploaded into firmware.
41
 #define STRING_VERSION "1.0.3 dev"
41
 #define STRING_VERSION "1.0.3 dev"
42
-#define STRING_URL "reprap.org"
43
 #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
42
 #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
44
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
43
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
45
 #define STRING_SPLASH_LINE1 "v" STRING_VERSION // will be shown during bootup in line 1
44
 #define STRING_SPLASH_LINE1 "v" STRING_VERSION // will be shown during bootup in line 1
257
 #define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
256
 #define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
258
 
257
 
259
 //===========================================================================
258
 //===========================================================================
260
-//============================= Thermal Runaway Protection ==================
259
+//======================== Thermal Runaway Protection =======================
261
 //===========================================================================
260
 //===========================================================================
262
-/*
263
-This is a feature to protect your printer from burn up in flames if it has
264
-a thermistor coming off place (this happened to a friend of mine recently and
265
-motivated me writing this feature).
266
-
267
-The issue: If a thermistor come off, it will read a lower temperature than actual.
268
-The system will turn the heater on forever, burning up the filament and anything
269
-else around.
270
-
271
-After the temperature reaches the target for the first time, this feature will
272
-start measuring for how long the current temperature stays below the target
273
-minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS).
274
-
275
-If it stays longer than _PERIOD, it means the thermistor temperature
276
-cannot catch up with the target, so something *may be* wrong. Then, to be on the
277
-safe side, the system will he halt.
278
 
261
 
279
-Bear in mind the count down will just start AFTER the first time the
280
-thermistor temperature is over the target, so you will have no problem if
281
-your extruder heater takes 2 minutes to hit the target on heating.
282
-
283
-*/
284
-// If you want to enable this feature for all your extruder heaters,
285
-// uncomment the 2 defines below:
262
+/**
263
+ * Thermal Runaway Protection protects your printer from damage and fire if a
264
+ * thermistor falls out or temperature sensors fail in any way.
265
+ *
266
+ * The issue: If a thermistor falls out or a temperature sensor fails,
267
+ * Marlin can no longer sense the actual temperature. Since a disconnected
268
+ * thermistor reads as a low temperature, the firmware will keep the heater on.
269
+ *
270
+ * The solution: Once the temperature reaches the target, start observing.
271
+ * If the temperature stays too far below the target (hysteresis) for too long,
272
+ * the firmware will halt as a safety precaution.
273
+ *
274
+ * Note that because the countdown starts only AFTER the temperature reaches
275
+ * the target, this will not catch a thermistor that is already disconnected
276
+ * when the print starts!
277
+ *
278
+ * To enable for all extruder heaters, uncomment the two defines below:
279
+ */
286
 
280
 
287
 // Parameters for all extruder heaters
281
 // Parameters for all extruder heaters
288
-//#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds
289
-//#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius
282
+#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 // in seconds
283
+#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius
290
 
284
 
291
-// If you want to enable this feature for your bed heater,
292
-// uncomment the 2 defines below:
285
+// To enable for the bed heater, uncomment the two defines below:
293
 
286
 
294
 // Parameters for the bed heater
287
 // Parameters for the bed heater
295
-//#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds
296
-//#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius
297
-
288
+#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 // in seconds
289
+#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius
298
 
290
 
299
 //===========================================================================
291
 //===========================================================================
300
 //============================= Mechanical Settings =========================
292
 //============================= Mechanical Settings =========================
337
 #define E_ENABLE_ON 0 // For all extruders
329
 #define E_ENABLE_ON 0 // For all extruders
338
 
330
 
339
 // Disables axis when it's not being used.
331
 // Disables axis when it's not being used.
332
+// WARNING: When motors turn off there is a chance of losing position accuracy!
340
 #define DISABLE_X false
333
 #define DISABLE_X false
341
 #define DISABLE_Y false
334
 #define DISABLE_Y false
342
 #define DISABLE_Z false
335
 #define DISABLE_Z false
370
 #define Z_MAX_POS 86
363
 #define Z_MAX_POS 86
371
 
364
 
372
 //===========================================================================
365
 //===========================================================================
373
-//============================= Filament Runout Sensor ======================
366
+//========================= Filament Runout Sensor ==========================
374
 //===========================================================================
367
 //===========================================================================
375
 //#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament
368
 //#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament
376
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
369
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
377
                                  // It is assumed that when logic high = filament available
370
                                  // It is assumed that when logic high = filament available
378
                                  //                    when logic  low = filament ran out
371
                                  //                    when logic  low = filament ran out
379
-//const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
380
-//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
381
-
372
+#ifdef FILAMENT_RUNOUT_SENSOR
373
+  const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
374
+  #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
375
+  #define FILAMENT_RUNOUT_SCRIPT "M600"
376
+#endif 
382
 //===========================================================================
377
 //===========================================================================
383
-//============================ Manual Bed Leveling ==========================
378
+//=========================== Manual Bed Leveling ===========================
384
 //===========================================================================
379
 //===========================================================================
385
 
380
 
386
 // #define MANUAL_BED_LEVELING  // Add display menu option for bed leveling
381
 // #define MANUAL_BED_LEVELING  // Add display menu option for bed leveling
401
 #endif  // MESH_BED_LEVELING
396
 #endif  // MESH_BED_LEVELING
402
 
397
 
403
 //===========================================================================
398
 //===========================================================================
404
-//============================= Bed Auto Leveling ===========================
399
+//============================ Bed Auto Leveling ============================
405
 //===========================================================================
400
 //===========================================================================
406
 
401
 
407
 //#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line)
402
 //#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line)
593
 //==============================LCD and SD support=============================
588
 //==============================LCD and SD support=============================
594
 
589
 
595
 // Define your display language below. Replace (en) with your language code and uncomment.
590
 // Define your display language below. Replace (en) with your language code and uncomment.
596
-// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
591
+// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, cn, test
597
 // See also language.h
592
 // See also language.h
598
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
593
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
599
 
594
 
613
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
608
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
614
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
609
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
615
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
610
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
616
-//#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
617
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
611
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
618
-                                               // 0 to disable buzzer feedback  
612
+//#define LCD_FEEDBACK_FREQUENCY_HZ 1000         // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
613
+                                                 // 0 to disable buzzer feedback. Test with M300 S<frequency Hz> P<duration ms>
619
 
614
 
620
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
615
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
621
 // http://reprap.org/wiki/PanelOne
616
 // http://reprap.org/wiki/PanelOne

+ 4
- 2
Marlin/example_configurations/makibox/Configuration_adv.h View File

195
 #define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
195
 #define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
197
 
197
 
198
+// When G28 is called, this option will make Y home before X
199
+// #define HOME_Y_BEFORE_X
200
+
198
 // @section machine
201
 // @section machine
199
 
202
 
200
 #define AXIS_RELATIVE_MODES {false, false, false, false}
203
 #define AXIS_RELATIVE_MODES {false, false, false, false}
258
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
261
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
259
 #define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
262
 #define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
260
 #define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
263
 #define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
261
-//#define ENCODER_RATE_MULTIPLIER_DEBUG  // If defined, output the encoder steps per second value
262
 
264
 
263
 //#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/
265
 //#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/
264
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
266
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
355
 //#define HEATERS_PARALLEL
357
 //#define HEATERS_PARALLEL
356
 
358
 
357
 //===========================================================================
359
 //===========================================================================
358
-//=============================Buffers           ============================
360
+//================================= Buffers =================================
359
 //===========================================================================
361
 //===========================================================================
360
 
362
 
361
 // @section hidden
363
 // @section hidden

+ 37
- 41
Marlin/example_configurations/tvrrug/Round2/Configuration.h View File

1
-#ifndef CONFIGURATION_H
1
+#ifndef CONFIGURATION_H
2
 #define CONFIGURATION_H
2
 #define CONFIGURATION_H
3
 
3
 
4
 #include "boards.h"
4
 #include "boards.h"
39
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
39
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
40
 // build by the user have been successfully uploaded into firmware.
40
 // build by the user have been successfully uploaded into firmware.
41
 #define STRING_VERSION "1.0.3 dev"
41
 #define STRING_VERSION "1.0.3 dev"
42
-#define STRING_URL "reprap.org"
43
 #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
42
 #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
44
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
43
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
45
 #define STRING_SPLASH_LINE1 "v" STRING_VERSION // will be shown during bootup in line 1
44
 #define STRING_SPLASH_LINE1 "v" STRING_VERSION // will be shown during bootup in line 1
259
 #define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
258
 #define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
260
 
259
 
261
 //===========================================================================
260
 //===========================================================================
262
-//============================= Thermal Runaway Protection ==================
261
+//======================== Thermal Runaway Protection =======================
263
 //===========================================================================
262
 //===========================================================================
264
-/*
265
-This is a feature to protect your printer from burn up in flames if it has
266
-a thermistor coming off place (this happened to a friend of mine recently and
267
-motivated me writing this feature).
268
-
269
-The issue: If a thermistor come off, it will read a lower temperature than actual.
270
-The system will turn the heater on forever, burning up the filament and anything
271
-else around.
272
-
273
-After the temperature reaches the target for the first time, this feature will
274
-start measuring for how long the current temperature stays below the target
275
-minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS).
276
-
277
-If it stays longer than _PERIOD, it means the thermistor temperature
278
-cannot catch up with the target, so something *may be* wrong. Then, to be on the
279
-safe side, the system will he halt.
280
 
263
 
281
-Bear in mind the count down will just start AFTER the first time the
282
-thermistor temperature is over the target, so you will have no problem if
283
-your extruder heater takes 2 minutes to hit the target on heating.
284
-
285
-*/
286
-// If you want to enable this feature for all your extruder heaters,
287
-// uncomment the 2 defines below:
264
+/**
265
+ * Thermal Runaway Protection protects your printer from damage and fire if a
266
+ * thermistor falls out or temperature sensors fail in any way.
267
+ *
268
+ * The issue: If a thermistor falls out or a temperature sensor fails,
269
+ * Marlin can no longer sense the actual temperature. Since a disconnected
270
+ * thermistor reads as a low temperature, the firmware will keep the heater on.
271
+ *
272
+ * The solution: Once the temperature reaches the target, start observing.
273
+ * If the temperature stays too far below the target (hysteresis) for too long,
274
+ * the firmware will halt as a safety precaution.
275
+ *
276
+ * Note that because the countdown starts only AFTER the temperature reaches
277
+ * the target, this will not catch a thermistor that is already disconnected
278
+ * when the print starts!
279
+ *
280
+ * To enable for all extruder heaters, uncomment the two defines below:
281
+ */
288
 
282
 
289
 // Parameters for all extruder heaters
283
 // Parameters for all extruder heaters
290
-//#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds
291
-//#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius
284
+#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 // in seconds
285
+#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius
292
 
286
 
293
-// If you want to enable this feature for your bed heater,
294
-// uncomment the 2 defines below:
287
+// To enable for the bed heater, uncomment the two defines below:
295
 
288
 
296
 // Parameters for the bed heater
289
 // Parameters for the bed heater
297
-//#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds
298
-//#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius
299
-
290
+#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 // in seconds
291
+#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius
300
 
292
 
301
 //===========================================================================
293
 //===========================================================================
302
 //============================= Mechanical Settings =========================
294
 //============================= Mechanical Settings =========================
339
 #define E_ENABLE_ON 1 // For all extruders
331
 #define E_ENABLE_ON 1 // For all extruders
340
 
332
 
341
 // Disables axis when it's not being used.
333
 // Disables axis when it's not being used.
334
+// WARNING: When motors turn off there is a chance of losing position accuracy!
342
 #define DISABLE_X false
335
 #define DISABLE_X false
343
 #define DISABLE_Y false
336
 #define DISABLE_Y false
344
 #define DISABLE_Z false
337
 #define DISABLE_Z false
372
 #define Z_MAX_POS 120
365
 #define Z_MAX_POS 120
373
 
366
 
374
 //===========================================================================
367
 //===========================================================================
375
-//============================= Filament Runout Sensor ======================
368
+//========================= Filament Runout Sensor ==========================
376
 //===========================================================================
369
 //===========================================================================
377
 //#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament
370
 //#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament
378
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
371
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
379
                                  // It is assumed that when logic high = filament available
372
                                  // It is assumed that when logic high = filament available
380
                                  //                    when logic  low = filament ran out
373
                                  //                    when logic  low = filament ran out
381
-//const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
382
-//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
374
+#ifdef FILAMENT_RUNOUT_SENSOR
375
+  const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
376
+  #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
377
+  #define FILAMENT_RUNOUT_SCRIPT "M600"
378
+#endif 
383
 
379
 
384
 //===========================================================================
380
 //===========================================================================
385
-//============================ Manual Bed Leveling ==========================
381
+//=========================== Manual Bed Leveling ===========================
386
 //===========================================================================
382
 //===========================================================================
387
 
383
 
388
 // #define MANUAL_BED_LEVELING  // Add display menu option for bed leveling
384
 // #define MANUAL_BED_LEVELING  // Add display menu option for bed leveling
403
 #endif  // MESH_BED_LEVELING
399
 #endif  // MESH_BED_LEVELING
404
 
400
 
405
 //===========================================================================
401
 //===========================================================================
406
-//============================= Bed Auto Leveling ===========================
402
+//============================ Bed Auto Leveling ============================
407
 //===========================================================================
403
 //===========================================================================
408
 
404
 
409
 //#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line)
405
 //#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line)
599
 //==============================LCD and SD support=============================
595
 //==============================LCD and SD support=============================
600
 
596
 
601
 // Define your display language below. Replace (en) with your language code and uncomment.
597
 // Define your display language below. Replace (en) with your language code and uncomment.
602
-// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
598
+// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, cn, test
603
 // See also language.h
599
 // See also language.h
604
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
600
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
605
 
601
 
619
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
615
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
620
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
616
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
621
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
617
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
622
-//#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
623
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
618
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
624
-                                               // 0 to disable buzzer feedback  
619
+//#define LCD_FEEDBACK_FREQUENCY_HZ 1000         // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
620
+                                                 // 0 to disable buzzer feedback. Test with M300 S<frequency Hz> P<duration ms>
625
 
621
 
626
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
622
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
627
 // http://reprap.org/wiki/PanelOne
623
 // http://reprap.org/wiki/PanelOne

+ 4
- 2
Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h View File

195
 #define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
195
 #define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
197
 
197
 
198
+// When G28 is called, this option will make Y home before X
199
+// #define HOME_Y_BEFORE_X
200
+
198
 // @section machine
201
 // @section machine
199
 
202
 
200
 #define AXIS_RELATIVE_MODES {false, false, false, false}
203
 #define AXIS_RELATIVE_MODES {false, false, false, false}
258
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
261
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
259
 #define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
262
 #define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
260
 #define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
263
 #define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
261
-//#define ENCODER_RATE_MULTIPLIER_DEBUG  // If defined, output the encoder steps per second value
262
 
264
 
263
 //#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/
265
 //#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/
264
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
266
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
355
 //#define HEATERS_PARALLEL
357
 //#define HEATERS_PARALLEL
356
 
358
 
357
 //===========================================================================
359
 //===========================================================================
358
-//=============================Buffers           ============================
360
+//================================= Buffers =================================
359
 //===========================================================================
361
 //===========================================================================
360
 
362
 
361
 // @section hidden
363
 // @section hidden

BIN
Marlin/fonts/ISO10646_CN.fon View File


+ 21
- 1
Marlin/fonts/README.fonts View File

3
 Then run make_fonts.bat what calls bdf2u8g.exe with the needed parameters to produce the .h files.
3
 Then run make_fonts.bat what calls bdf2u8g.exe with the needed parameters to produce the .h files.
4
 The .h files must be edited to replace '#include "u8g.h"' with '#include <utility/u8g.h>', replace 'U8G_FONT_SECTION' with 'U8G_SECTION', insert '.progmem.' right behind the first '"' and moved to the main directory.
4
 The .h files must be edited to replace '#include "u8g.h"' with '#include <utility/u8g.h>', replace 'U8G_FONT_SECTION' with 'U8G_SECTION', insert '.progmem.' right behind the first '"' and moved to the main directory.
5
 
5
 
6
-Especially the Kana and Cyrillic fonts should be revised by someone who knows what he/she does. I am only a west-European with very little knowledge about this scripts.
6
+How to integrate a new font:
7
+Currently we are limited to 256 symbols per font. We use a menu system with 5 lines, on a display with 64 pixel height. That means we have 12 pixel for a line. To have some space in between the lines we can't use more then 10 pixel height for the symbols. For up to 11 pixel set TALL_FONT_CORRECTION 1 when loading the font.
8
+To fit 22 Symbols on the 128 pixel wide screen, the symbols can't be wider than 5 pixel, for the first 128 symbols.
9
+For the second half of the font we now support up to 11x11 pixel. 
10
+
11
+ * Get 'Fony.exe'
12
+ * Copy one of the existing *.fon files and work with this.
13
+ * Change the pixels. Don't change width or height.
14
+ * Export as *.bdf
15
+ * Use 'bdf2u8g.exe' to produce the *.h file. Examples for the existing fonts are in 'make_fonts.bat'
16
+ * Edit the produced .h file to match our needs. See hints in 'README.fonts' or the other 'dogm_font_data_.h' files.
17
+ * Make a new entry in the font list in 'dogm_lcd_implementation.h' before the '#else // fall back'
18
+    #elif defined( DISPLAY_CHARSET_NEWNAME )
19
+      #include "dogm_font_data_yourfont.h"
20
+      #define FONT_MENU_NAME YOURFONTNAME
21
+    #else // fall-back
22
+ * Add your font to the list of permitted fonts in 'language_en.h'
23
+    ... || defined(DISPLAY_CHARSET_YOUR_NEW_FONT) ... )
24
+
25
+
26
+Especially the Kana font should be revised by someone who knows what he/she does. I am only a west-European with very little knowledge about this script.

+ 1
- 0
Marlin/fonts/make_fonts.bat View File

5
 .\bdf2u8g.exe -b 32 -e 255 ISO10646-1.bdf ISO10646_1_5x7 dogm_font_data_ISO10646_1.h
5
 .\bdf2u8g.exe -b 32 -e 255 ISO10646-1.bdf ISO10646_1_5x7 dogm_font_data_ISO10646_1.h
6
 .\bdf2u8g.exe -b 32 -e 255 ISO10646_5_Cyrillic.bdf ISO10646_5_Cyrillic_5x7 dogm_font_data_ISO10646_5_Cyrillic.h
6
 .\bdf2u8g.exe -b 32 -e 255 ISO10646_5_Cyrillic.bdf ISO10646_5_Cyrillic_5x7 dogm_font_data_ISO10646_5_Cyrillic.h
7
 .\bdf2u8g.exe -b 32 -e 255 ISO10646_Kana.bdf ISO10646_Kana_5x7 dogm_font_data_ISO10646_Kana.h
7
 .\bdf2u8g.exe -b 32 -e 255 ISO10646_Kana.bdf ISO10646_Kana_5x7 dogm_font_data_ISO10646_Kana.h
8
+.\bdf2u8g.exe -b 32 -e 255 ISO10646_CN.bdf ISO10646_CN dogm_font_data_ISO10646_CN.h

+ 14
- 9
Marlin/language.h View File

30
 // eu       Basque-Euskera
30
 // eu       Basque-Euskera
31
 // kana     Japanese
31
 // kana     Japanese
32
 // kana_utf Japanese
32
 // kana_utf Japanese
33
+// cn       Chinese
33
 
34
 
34
 #ifndef LANGUAGE_INCLUDE
35
 #ifndef LANGUAGE_INCLUDE
35
   // pick your language from the list above
36
   // pick your language from the list above
130
 #define MSG_FILE_PRINTED                    "Done printing file"
131
 #define MSG_FILE_PRINTED                    "Done printing file"
131
 #define MSG_BEGIN_FILE_LIST                 "Begin file list"
132
 #define MSG_BEGIN_FILE_LIST                 "Begin file list"
132
 #define MSG_END_FILE_LIST                   "End file list"
133
 #define MSG_END_FILE_LIST                   "End file list"
133
-#define MSG_M104_INVALID_EXTRUDER           "M104 Invalid extruder "
134
-#define MSG_M105_INVALID_EXTRUDER           "M105 Invalid extruder "
135
-#define MSG_M200_INVALID_EXTRUDER           "M200 Invalid extruder "
136
-#define MSG_M218_INVALID_EXTRUDER           "M218 Invalid extruder "
137
-#define MSG_M221_INVALID_EXTRUDER           "M221 Invalid extruder "
134
+#define MSG_INVALID_EXTRUDER                "Invalid extruder"
135
+#define MSG_INVALID_SOLENOID                "Invalid solenoid"
136
+#define MSG_M104_INVALID_EXTRUDER           "M104 " MSG_INVALID_EXTRUDER " "
137
+#define MSG_M105_INVALID_EXTRUDER           "M105 " MSG_INVALID_EXTRUDER " "
138
+#define MSG_M109_INVALID_EXTRUDER           "M109 " MSG_INVALID_EXTRUDER " "
139
+#define MSG_M200_INVALID_EXTRUDER           "M200 " MSG_INVALID_EXTRUDER " "
140
+#define MSG_M218_INVALID_EXTRUDER           "M218 " MSG_INVALID_EXTRUDER " "
141
+#define MSG_M221_INVALID_EXTRUDER           "M221 " MSG_INVALID_EXTRUDER " "
138
 #define MSG_ERR_NO_THERMISTORS              "No thermistors - no temperature"
142
 #define MSG_ERR_NO_THERMISTORS              "No thermistors - no temperature"
139
-#define MSG_M109_INVALID_EXTRUDER           "M109 Invalid extruder "
140
 #define MSG_HEATING                         "Heating..."
143
 #define MSG_HEATING                         "Heating..."
141
 #define MSG_HEATING_COMPLETE                "Heating done."
144
 #define MSG_HEATING_COMPLETE                "Heating done."
142
 #define MSG_BED_HEATING                     "Bed Heating."
145
 #define MSG_BED_HEATING                     "Bed Heating."
148
 #define MSG_RESEND                          "Resend: "
151
 #define MSG_RESEND                          "Resend: "
149
 #define MSG_UNKNOWN_COMMAND                 "Unknown command: \""
152
 #define MSG_UNKNOWN_COMMAND                 "Unknown command: \""
150
 #define MSG_ACTIVE_EXTRUDER                 "Active Extruder: "
153
 #define MSG_ACTIVE_EXTRUDER                 "Active Extruder: "
151
-#define MSG_INVALID_EXTRUDER                "Invalid extruder"
152
-#define MSG_INVALID_SOLENOID                "Invalid solenoid"
153
 #define MSG_X_MIN                           "x_min: "
154
 #define MSG_X_MIN                           "x_min: "
154
 #define MSG_X_MAX                           "x_max: "
155
 #define MSG_X_MAX                           "x_max: "
155
 #define MSG_Y_MIN                           "y_min: "
156
 #define MSG_Y_MIN                           "y_min: "
158
 #define MSG_Z_MAX                           "z_max: "
159
 #define MSG_Z_MAX                           "z_max: "
159
 #define MSG_Z2_MAX                          "z2_max: "
160
 #define MSG_Z2_MAX                          "z2_max: "
160
 #define MSG_Z_PROBE                         "z_probe: "
161
 #define MSG_Z_PROBE                         "z_probe: "
162
+#define MSG_ERR_MATERIAL_INDEX              "M145 S<index> out of range (0-1)"
163
+#define MSG_ERR_M421_REQUIRES_XYZ           "M421 requires XYZ parameters"
164
+#define MSG_ERR_MESH_INDEX_OOB              "Mesh XY index is out of bounds"
165
+#define MSG_ERR_M428_TOO_FAR                "Too far from reference point"
161
 #define MSG_M119_REPORT                     "Reporting endstop status"
166
 #define MSG_M119_REPORT                     "Reporting endstop status"
162
 #define MSG_ENDSTOP_HIT                     "TRIGGERED"
167
 #define MSG_ENDSTOP_HIT                     "TRIGGERED"
163
 #define MSG_ENDSTOP_OPEN                    "open"
168
 #define MSG_ENDSTOP_OPEN                    "open"
210
 #define MSG_OK_B                            "ok B:"
215
 #define MSG_OK_B                            "ok B:"
211
 #define MSG_OK_T                            "ok T:"
216
 #define MSG_OK_T                            "ok T:"
212
 #define MSG_AT                              " @:"
217
 #define MSG_AT                              " @:"
213
-#define MSG_PID_AUTOTUNE_FINISHED           MSG_PID_AUTOTUNE " finished! Put the last Kp, Ki and Kd constants from above into Configuration.h"
218
+#define MSG_PID_AUTOTUNE_FINISHED           MSG_PID_AUTOTUNE " finished! Put the last Kp, Ki and Kd constants from below into Configuration.h"
214
 #define MSG_PID_DEBUG                       " PID_DEBUG "
219
 #define MSG_PID_DEBUG                       " PID_DEBUG "
215
 #define MSG_PID_DEBUG_INPUT                 ": Input "
220
 #define MSG_PID_DEBUG_INPUT                 ": Input "
216
 #define MSG_PID_DEBUG_OUTPUT                " Output "
221
 #define MSG_PID_DEBUG_OUTPUT                " Output "

+ 159
- 0
Marlin/language_cn.h View File

1
+/**
2
+ * Chinese
3
+ *
4
+ * LCD Menu Messages
5
+ * Se also documentation/LCDLanguageFont.md
6
+ *
7
+ */
8
+#ifndef LANGUAGE_CN_H
9
+#define LANGUAGE_CN_H
10
+
11
+  #define MAPPER_NON         // For direct asci codes
12
+  #define DISPLAY_CHARSET_ISO10646_CN
13
+
14
+  #define WELCOME_MSG                         "\xa4\xa5\xa6\xa7"
15
+  #define MSG_SD_INSERTED                     "\xa8\xa9\xaa\xab"
16
+  #define MSG_SD_REMOVED                      "\xa8\xa9\xac\xad"
17
+  #define MSG_MAIN                            "\xae\xaf\xb0"
18
+  #define MSG_AUTOSTART                       "\xb1\xb2\xb3\xb4"
19
+  #define MSG_DISABLE_STEPPERS                "\xb5\xb6\xb7\xb8\xb9\xba"
20
+  #define MSG_AUTO_HOME                       "\xbb\xbc\xbd"
21
+  #define MSG_SET_HOME_OFFSETS                "\xbe\xbf\xbb\xbc\xbd\xc0\xc1"
22
+  #define MSG_SET_ORIGIN                      "\xbe\xbf\xbc\xbd"
23
+  #define MSG_PREHEAT_PLA                     "\xc3\xc4 PLA"
24
+  #define MSG_PREHEAT_PLA_N                   MSG_PREHEAT_PLA " "
25
+  #define MSG_PREHEAT_PLA_ALL                 MSG_PREHEAT_PLA " \xc5\xc6"
26
+  #define MSG_PREHEAT_PLA_BEDONLY             MSG_PREHEAT_PLA " \xc4\xc7"
27
+  #define MSG_PREHEAT_PLA_SETTINGS            MSG_PREHEAT_PLA " \xbe\xbf"
28
+  #define MSG_PREHEAT_ABS                     "\xc3\xc4 ABS"
29
+  #define MSG_PREHEAT_ABS_N                   MSG_PREHEAT_ABS " "
30
+  #define MSG_PREHEAT_ABS_ALL                 MSG_PREHEAT_ABS " \xc5\xc6"
31
+  #define MSG_PREHEAT_ABS_BEDONLY             MSG_PREHEAT_ABS " \xbe\xc6"
32
+  #define MSG_PREHEAT_ABS_SETTINGS            MSG_PREHEAT_ABS " \xbe\xbf"
33
+  #define MSG_H1                              "1"
34
+  #define MSG_H2                              "2"
35
+  #define MSG_H3                              "3"
36
+  #define MSG_H4                              "4"
37
+  #define MSG_COOLDOWN                        "\xc8\xc9"
38
+  #define MSG_SWITCH_PS_ON                    "\xb9\xcb\xca\xb3"
39
+  #define MSG_SWITCH_PS_OFF                   "\xb9\xcb\xb5\xb6"
40
+  #define MSG_EXTRUDE                         "\xcc\xad"
41
+  #define MSG_RETRACT                         "\xbb\xcd"
42
+  #define MSG_MOVE_AXIS                       "\xc1\xb2\xce"
43
+  #define MSG_LEVEL_BED                       "\xcf\xe0\xc4\xc7"
44
+  #define MSG_MOVE_X                          "\xc1\xb2 X"
45
+  #define MSG_MOVE_Y                          "\xc1\xb2 Y"
46
+  #define MSG_MOVE_Z                          "\xc1\xb2 Z"
47
+  #define MSG_MOVE_E                          "\xcc\xad\xba"
48
+  #define MSG_MOVE_01MM                       "\xc1\xb2 0.1mm"
49
+  #define MSG_MOVE_1MM                        "\xc1\xb2 1mm"
50
+  #define MSG_MOVE_10MM                       "\xc1\xb2 10mm"
51
+  #define MSG_SPEED                           "\xd1\xd2"
52
+  #define MSG_NOZZLE                          "\xd3\xd4"
53
+  #define MSG_N2                              " 2"
54
+  #define MSG_N3                              " 3"
55
+  #define MSG_N4                              " 4"
56
+  #define MSG_BED                             "\xc4\xc7"
57
+  #define MSG_FAN_SPEED                       "\xd5\xd6\xd1\xd2"
58
+  #define MSG_FLOW                            "\xcc\xad\xd1\xd2"
59
+  #define MSG_F0                              " 0"
60
+  #define MSG_F1                              " 1"
61
+  #define MSG_F2                              " 2"
62
+  #define MSG_F3                              " 3"
63
+  #define MSG_CONTROL                         "\xd8\xd9"
64
+  #define MSG_MIN                             LCD_STR_THERMOMETER " \xda\xdb"
65
+  #define MSG_MAX                             LCD_STR_THERMOMETER " \xda\xdc"
66
+  #define MSG_FACTOR                          LCD_STR_THERMOMETER " \xdd\xde"
67
+  #define MSG_AUTOTEMP                        "\xb1\xb2\xd8\xc9"
68
+  #define MSG_ON                              "\xb3 "  // intentional space to shift wide symbol to the left
69
+  #define MSG_OFF                             "\xb5 "  // intentional space to shift wide symbol to the left
70
+  #define MSG_PID_P                           "PID-P"
71
+  #define MSG_PID_I                           "PID-I"
72
+  #define MSG_PID_D                           "PID-D"
73
+  #define MSG_PID_C                           "PID-C"
74
+  #define MSG_E2                              " E2"
75
+  #define MSG_E3                              " E3"
76
+  #define MSG_E4                              " E4"
77
+  #define MSG_ACC                             "Accel"
78
+  #define MSG_VXY_JERK                        "Vxy-jerk"
79
+  #define MSG_VZ_JERK                         "Vz-jerk"
80
+  #define MSG_VE_JERK                         "Ve-jerk"
81
+  #define MSG_VMAX                            "Vmax "
82
+  #define MSG_X                               "x"
83
+  #define MSG_Y                               "y"
84
+  #define MSG_Z                               "z"
85
+  #define MSG_E                               "e"
86
+  #define MSG_VMIN                            "Vmin"
87
+  #define MSG_VTRAV_MIN                       "VTrav min"
88
+  #define MSG_AMAX                            "Amax "
89
+  #define MSG_A_RETRACT                       "A-retract"
90
+  #define MSG_A_TRAVEL                        "A-travel"
91
+  #define MSG_XSTEPS                          "Xsteps/mm"
92
+  #define MSG_YSTEPS                          "Ysteps/mm"
93
+  #define MSG_ZSTEPS                          "Zsteps/mm"
94
+  #define MSG_ESTEPS                          "Esteps/mm"
95
+  #define MSG_TEMPERATURE                     "\xc9\xd2"
96
+  #define MSG_MOTION                          "\xdf\xb2"
97
+  #define MSG_VOLUMETRIC                      "Filament"
98
+  #define MSG_VOLUMETRIC_ENABLED              "E in mm3"
99
+  #define MSG_FILAMENT_SIZE_EXTRUDER_0        "Fil. Dia. 1"
100
+  #define MSG_FILAMENT_SIZE_EXTRUDER_1        "Fil. Dia. 2"
101
+  #define MSG_FILAMENT_SIZE_EXTRUDER_2        "Fil. Dia. 3"
102
+  #define MSG_FILAMENT_SIZE_EXTRUDER_3        "Fil. Dia. 4"
103
+  #define MSG_CONTRAST                        "LCD contrast"
104
+  #define MSG_STORE_EPROM                     "Store memory"
105
+  #define MSG_LOAD_EPROM                      "Load memory"
106
+  #define MSG_RESTORE_FAILSAFE                "Restore failsafe"
107
+  #define MSG_REFRESH                         "Refresh"
108
+  #define MSG_WATCH                           "\xec\xed\xee\xef"
109
+  #define MSG_PREPARE                         "\xa4\xa5"
110
+  #define MSG_TUNE                            "\xcf\xf0"
111
+  #define MSG_PAUSE_PRINT                     "\xf1\xf2\xca\xf3"
112
+  #define MSG_RESUME_PRINT                    "\xf4\xf5\xca\xf3"
113
+  #define MSG_STOP_PRINT                      "\xf2\xf6\xca\xf3"
114
+  #define MSG_CARD_MENU                       "\xaf\xb0"
115
+  #define MSG_NO_CARD                         "\xf9\xa8"
116
+  #define MSG_DWELL                           "Sleep..."
117
+  #define MSG_USERWAIT                        "Wait for user..."
118
+  #define MSG_RESUMING                        "Resuming print"
119
+  #define MSG_PRINT_ABORTED                   "Print aborted"
120
+  #define MSG_NO_MOVE                         "No move."
121
+  #define MSG_KILLED                          "KILLED. "
122
+  #define MSG_STOPPED                         "STOPPED. "
123
+  #define MSG_CONTROL_RETRACT                 "Retract mm"
124
+  #define MSG_CONTROL_RETRACT_SWAP            "Swap Re.mm"
125
+  #define MSG_CONTROL_RETRACTF                "Retract  V"
126
+  #define MSG_CONTROL_RETRACT_ZLIFT           "Hop mm"
127
+  #define MSG_CONTROL_RETRACT_RECOVER         "UnRet +mm"
128
+  #define MSG_CONTROL_RETRACT_RECOVER_SWAP    "S UnRet+mm"
129
+  #define MSG_CONTROL_RETRACT_RECOVERF        "UnRet  V"
130
+  #define MSG_AUTORETRACT                     "AutoRetr."
131
+  #define MSG_FILAMENTCHANGE                  "Change filament"
132
+  #define MSG_INIT_SDCARD                     "Init. SD card"
133
+  #define MSG_CNG_SDCARD                      "Change SD card"
134
+  #define MSG_ZPROBE_OUT                      "Z probe out. bed"
135
+  #define MSG_POSITION_UNKNOWN                "Home X/Y before Z"
136
+  #define MSG_ZPROBE_ZOFFSET                  "Z Offset"
137
+  #define MSG_BABYSTEP_X                      "Babystep X"
138
+  #define MSG_BABYSTEP_Y                      "Babystep Y"
139
+  #define MSG_BABYSTEP_Z                      "Babystep Z"
140
+  #define MSG_ENDSTOP_ABORT                   "Endstop abort"
141
+  #define MSG_HEATING_FAILED_LCD              "Heating failed"
142
+  #define MSG_ERR_REDUNDANT_TEMP              "Err: REDUNDANT TEMP ERROR"
143
+  #define MSG_THERMAL_RUNAWAY                 "THERMAL RUNAWAY"
144
+  #define MSG_ERR_MAXTEMP                     "Err: MAXTEMP"
145
+  #define MSG_ERR_MINTEMP                     "Err: MINTEMP"
146
+  #define MSG_ERR_MAXTEMP_BED                 "Err: MAXTEMP BED"
147
+  #define MSG_END_HOUR                        "hours"
148
+  #define MSG_END_MINUTE                      "minutes"
149
+
150
+  #ifdef DELTA_CALIBRATION_MENU
151
+    #define MSG_DELTA_CALIBRATE             "Delta Calibration"
152
+    #define MSG_DELTA_CALIBRATE_X           "Calibrate X"
153
+    #define MSG_DELTA_CALIBRATE_Y           "Calibrate Y"
154
+    #define MSG_DELTA_CALIBRATE_Z           "Calibrate Z"
155
+    #define MSG_DELTA_CALIBRATE_CENTER      "Calibrate Center"
156
+  #endif // DELTA_CALIBRATION_MENU
157
+
158
+#endif // LANGUAGE_CN_H
159
+

+ 7
- 7
Marlin/language_de.h View File

13
 //#define SIMULATE_ROMFONT
13
 //#define SIMULATE_ROMFONT
14
 #define DISPLAY_CHARSET_ISO10646_1
14
 #define DISPLAY_CHARSET_ISO10646_1
15
 
15
 
16
-#define WELCOME_MSG                         MACHINE_NAME " Bereit."
16
+#define WELCOME_MSG                         MACHINE_NAME " bereit."
17
 #define MSG_SD_INSERTED                     "SDKarte erkannt."
17
 #define MSG_SD_INSERTED                     "SDKarte erkannt."
18
 #define MSG_SD_REMOVED                      "SDKarte entfernt."
18
 #define MSG_SD_REMOVED                      "SDKarte entfernt."
19
 #define MSG_MAIN                            "Hauptmenü"
19
 #define MSG_MAIN                            "Hauptmenü"
61
 #define MSG_PID_D                           "PID D"
61
 #define MSG_PID_D                           "PID D"
62
 #define MSG_PID_C                           "PID C"
62
 #define MSG_PID_C                           "PID C"
63
 #define MSG_ACC                             "A"
63
 #define MSG_ACC                             "A"
64
-#define MSG_VXY_JERK                        "V xy jerk"
65
-#define MSG_VZ_JERK                         "V z  jerk"
66
-#define MSG_VE_JERK                         "V e  jerk"
64
+#define MSG_VXY_JERK                        "V xy Ruck"
65
+#define MSG_VZ_JERK                         "V z  Ruck"
66
+#define MSG_VE_JERK                         "V e  Ruck"
67
 #define MSG_VMAX                            "V max " // space by purpose
67
 #define MSG_VMAX                            "V max " // space by purpose
68
 #define MSG_X                               "x"
68
 #define MSG_X                               "x"
69
 #define MSG_Y                               "y"
69
 #define MSG_Y                               "y"
84
 #define MSG_FILAMENT_SIZE_EXTRUDER_0        "Filament D 1"
84
 #define MSG_FILAMENT_SIZE_EXTRUDER_0        "Filament D 1"
85
 #define MSG_FILAMENT_SIZE_EXTRUDER_1        "Filament D 2"
85
 #define MSG_FILAMENT_SIZE_EXTRUDER_1        "Filament D 2"
86
 #define MSG_FILAMENT_SIZE_EXTRUDER_2        "Filament D 3"
86
 #define MSG_FILAMENT_SIZE_EXTRUDER_2        "Filament D 3"
87
-#define MSG_CONTRAST                        "LCD contrast"
87
+#define MSG_CONTRAST                        "LCD Kontrast"
88
 #define MSG_STORE_EPROM                     "EPROM speichern"
88
 #define MSG_STORE_EPROM                     "EPROM speichern"
89
 #define MSG_LOAD_EPROM                      "EPROM laden"
89
 #define MSG_LOAD_EPROM                      "EPROM laden"
90
 #define MSG_RESTORE_FAILSAFE                "Standardkonfig."
90
 #define MSG_RESTORE_FAILSAFE                "Standardkonfig."
116
 #define MSG_INIT_SDCARD                     "SDKarte erkennen"// Manually initialize the SD-card via user interface
116
 #define MSG_INIT_SDCARD                     "SDKarte erkennen"// Manually initialize the SD-card via user interface
117
 #define MSG_CNG_SDCARD                      "SDKarte erkennen"// SD-card changed by user. For machines with no autocarddetect. Both send "M21"
117
 #define MSG_CNG_SDCARD                      "SDKarte erkennen"// SD-card changed by user. For machines with no autocarddetect. Both send "M21"
118
 #define MSG_ZPROBE_OUT                      "Sensor ausserhalb"
118
 #define MSG_ZPROBE_OUT                      "Sensor ausserhalb"
119
-#define MSG_POSITION_UNKNOWN                "X/Y vor Z Homen."
119
+#define MSG_POSITION_UNKNOWN                "X/Y vor Z homen."
120
 #define MSG_ZPROBE_ZOFFSET                  "Z Offset"
120
 #define MSG_ZPROBE_ZOFFSET                  "Z Offset"
121
 #define MSG_BABYSTEP_X                      "Babystep X"
121
 #define MSG_BABYSTEP_X                      "Babystep X"
122
 #define MSG_BABYSTEP_Y                      "Babystep Y"
122
 #define MSG_BABYSTEP_Y                      "Babystep Y"
126
 #define MSG_END_MINUTE                      "Minuten"
126
 #define MSG_END_MINUTE                      "Minuten"
127
 
127
 
128
 #ifdef DELTA_CALIBRATION_MENU
128
 #ifdef DELTA_CALIBRATION_MENU
129
-    #define MSG_DELTA_CALIBRATE             "Delta Kalibrieren"
129
+    #define MSG_DELTA_CALIBRATE             "Delta kalibrieren"
130
     #define MSG_DELTA_CALIBRATE_X           "Kalibriere X"
130
     #define MSG_DELTA_CALIBRATE_X           "Kalibriere X"
131
     #define MSG_DELTA_CALIBRATE_Y           "Kalibriere Y"
131
     #define MSG_DELTA_CALIBRATE_Y           "Kalibriere Y"
132
     #define MSG_DELTA_CALIBRATE_Z           "Kalibriere Z"
132
     #define MSG_DELTA_CALIBRATE_Z           "Kalibriere Z"

+ 1
- 1
Marlin/language_en.h View File

13
 #endif
13
 #endif
14
 
14
 
15
 //#define SIMULATE_ROMFONT //Comment in to see what is seen on the character based displays
15
 //#define SIMULATE_ROMFONT //Comment in to see what is seen on the character based displays
16
-#if !( defined(SIMULATE_ROMFONT)|| defined(DISPLAY_CHARSET_ISO10646_1)|| defined(DISPLAY_CHARSET_ISO10646_5)|| defined(DISPLAY_CHARSET_ISO10646_KANA) )
16
+#if !( defined(SIMULATE_ROMFONT)|| defined(DISPLAY_CHARSET_ISO10646_1)|| defined(DISPLAY_CHARSET_ISO10646_5)|| defined(DISPLAY_CHARSET_ISO10646_KANA)|| defined(DISPLAY_CHARSET_ISO10646_CN) )
17
   #define DISPLAY_CHARSET_ISO10646_1 // use the better font on full graphic displays.
17
   #define DISPLAY_CHARSET_ISO10646_1 // use the better font on full graphic displays.
18
 #endif
18
 #endif
19
 
19
 

+ 2
- 0
Marlin/pins.h View File

76
   #include "pins_PRINTRBOARD.h"
76
   #include "pins_PRINTRBOARD.h"
77
 #elif MB(BRAINWAVE)
77
 #elif MB(BRAINWAVE)
78
   #include "pins_BRAINWAVE.h"
78
   #include "pins_BRAINWAVE.h"
79
+#elif MB(BRAINWAVE_PRO)
80
+  #include "pins_BRAINWAVE_PRO.h"
79
 #elif MB(SAV_MKI)
81
 #elif MB(SAV_MKI)
80
   #include "pins_SAV_MKI.h"
82
   #include "pins_SAV_MKI.h"
81
 #elif MB(TEENSY2)
83
 #elif MB(TEENSY2)

+ 1
- 3
Marlin/pins_AZTEEG_X3.h View File

28
    #define STAT_LED_RED 64
28
    #define STAT_LED_RED 64
29
    #define STAT_LED_BLUE 63
29
    #define STAT_LED_BLUE 63
30
   #endif
30
   #endif
31
-#endif
32
-
33
-#elif define TEMP_STAT_LEDS
31
+#elif defined(TEMP_STAT_LEDS)
34
   #define STAT_LED_RED       6
32
   #define STAT_LED_RED       6
35
   #define STAT_LED_BLUE     11
33
   #define STAT_LED_BLUE     11
36
 #endif
34
 #endif

+ 63
- 0
Marlin/pins_BRAINWAVE_PRO.h View File

1
+/**
2
+ * Brainwave Pro pin assignments (AT90USB186)
3
+ *
4
+ * Requires hardware bundle for Arduino:
5
+ * https://github.com/unrepentantgeek/brainwave-arduino
6
+ */
7
+
8
+#ifndef __AVR_AT90USB1286__
9
+  #error Oops!  Make sure you have 'Brainwave Pro' selected from the 'Tools -> Boards' menu.
10
+#endif
11
+
12
+#ifndef AT90USBxx_TEENSYPP_ASSIGNMENTS  // use Teensyduino Teensy++2.0 pin assignments instead of Marlin alphabetical.
13
+  #error  Uncomment #define AT90USBxx_TEENSYPP_ASSIGNMENTS in fastio.h for this config
14
+#endif
15
+
16
+#define AT90USB 1286  // Disable MarlinSerial etc.
17
+
18
+#define X_STEP_PIN         33
19
+#define X_DIR_PIN          32
20
+#define X_ENABLE_PIN       11
21
+#define X_STOP_PIN         47
22
+
23
+#define Y_STEP_PIN         31
24
+#define Y_DIR_PIN          30
25
+#define Y_ENABLE_PIN        8
26
+#define Y_STOP_PIN         18
27
+
28
+#define Z_STEP_PIN         29
29
+#define Z_DIR_PIN          28
30
+#define Z_ENABLE_PIN       37
31
+#define Z_MAX_PIN          36
32
+#define Z_MIN_PIN          17  // Bed probe
33
+
34
+#define E0_STEP_PIN        35
35
+#define E0_DIR_PIN         34
36
+#define E0_ENABLE_PIN      13
37
+
38
+#define HEATER_0_PIN       15
39
+#define HEATER_1_PIN       -1
40
+#define HEATER_2_PIN       -1
41
+#define HEATER_BED_PIN     14  // Bed
42
+#define FAN_PIN            16  // Fan, PWM
43
+
44
+#define TEMP_0_PIN          2  // Extruder / Analog pin numbering
45
+#define TEMP_1_PIN          1  // Spare / Analog pin numbering
46
+#define TEMP_2_PIN         -1
47
+#define TEMP_BED_PIN        0  // Bed / Analog pin numbering
48
+
49
+#define SDPOWER            -1
50
+#define SDSS               20
51
+#define LED_PIN            19
52
+#define PS_ON_PIN          -1
53
+#define KILL_PIN           -1
54
+#define ALARM_PIN          -1
55
+#define SDCARDDETECT       12
56
+
57
+#ifndef SDSUPPORT
58
+// these pins are defined in the SD library if building with SD support
59
+  #define SCK_PIN          21
60
+  #define MISO_PIN         23
61
+  #define MOSI_PIN         22
62
+#endif
63
+

+ 1
- 1
Marlin/pins_SAV_MKI.h View File

82
   #define HOME_PIN          -1 // A4 = marlin 44 - teensy = 42
82
   #define HOME_PIN          -1 // A4 = marlin 44 - teensy = 42
83
 
83
 
84
   #ifdef NUM_SERVOS
84
   #ifdef NUM_SERVOS
85
-    #define SERVO0_PIN       41 // In teensy's pin definition for pinMode (in Servo.cpp)
85
+    #define SERVO0_PIN       41 // In teensy's pin definition for pinMode (in servo.cpp)
86
   #endif
86
   #endif
87
 
87
 
88
 #endif // SAV_3DLCD
88
 #endif // SAV_3DLCD

+ 73
- 74
Marlin/planner.cpp View File

1
-/*
2
-  planner.c - buffers movement commands and manages the acceleration profile plan
3
- Part of Grbl
4
- 
5
- Copyright (c) 2009-2011 Simen Svale Skogsrud
6
- 
7
- Grbl is free software: you can redistribute it and/or modify
8
- it under the terms of the GNU General Public License as published by
9
- the Free Software Foundation, either version 3 of the License, or
10
- (at your option) any later version.
11
- 
12
- Grbl is distributed in the hope that it will be useful,
13
- but WITHOUT ANY WARRANTY; without even the implied warranty of
14
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
- GNU General Public License for more details.
16
- 
17
- You should have received a copy of the GNU General Public License
18
- along with Grbl.  If not, see <http://www.gnu.org/licenses/>.
19
- */
20
-
21
-/* The ring buffer implementation gleaned from the wiring_serial library by David A. Mellis. */
22
-
23
-/*  
24
- Reasoning behind the mathematics in this module (in the key of 'Mathematica'):
25
- 
26
- s == speed, a == acceleration, t == time, d == distance
27
- 
28
- Basic definitions:
29
- 
30
- Speed[s_, a_, t_] := s + (a*t) 
31
- Travel[s_, a_, t_] := Integrate[Speed[s, a, t], t]
32
- 
33
- Distance to reach a specific speed with a constant acceleration:
34
- 
35
- Solve[{Speed[s, a, t] == m, Travel[s, a, t] == d}, d, t]
36
- d -> (m^2 - s^2)/(2 a) --> estimate_acceleration_distance()
37
- 
38
- Speed after a given distance of travel with constant acceleration:
39
- 
40
- Solve[{Speed[s, a, t] == m, Travel[s, a, t] == d}, m, t]
41
- m -> Sqrt[2 a d + s^2]    
42
- 
43
- DestinationSpeed[s_, a_, d_] := Sqrt[2 a d + s^2]
44
- 
45
- When to start braking (di) to reach a specified destionation speed (s2) after accelerating
46
- from initial speed s1 without ever stopping at a plateau:
47
- 
48
- Solve[{DestinationSpeed[s1, a, di] == DestinationSpeed[s2, a, d - di]}, di]
49
- di -> (2 a d - s1^2 + s2^2)/(4 a) --> intersection_distance()
50
- 
51
- IntersectionDistance[s1_, s2_, a_, d_] := (2 a d - s1^2 + s2^2)/(4 a)
1
+/**
2
+ * planner.cpp - Buffer movement commands and manage the acceleration profile plan
3
+ * Part of Grbl
4
+ * 
5
+ * Copyright (c) 2009-2011 Simen Svale Skogsrud
6
+ *
7
+ * Grbl is free software: you can redistribute it and/or modify
8
+ * it under the terms of the GNU General Public License as published by
9
+ * the Free Software Foundation, either version 3 of the License, or
10
+ * (at your option) any later version.
11
+ *
12
+ * Grbl is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
+ * GNU General Public License for more details.
16
+ *
17
+ * You should have received a copy of the GNU General Public License
18
+ * along with Grbl.  If not, see <http://www.gnu.org/licenses/>.
19
+ *
20
+ *
21
+ * The ring buffer implementation gleaned from the wiring_serial library by David A. Mellis.
22
+ *
23
+ *
24
+ * Reasoning behind the mathematics in this module (in the key of 'Mathematica'):
25
+ *
26
+ * s == speed, a == acceleration, t == time, d == distance
27
+ *
28
+ * Basic definitions:
29
+ *   Speed[s_, a_, t_] := s + (a*t)
30
+ *   Travel[s_, a_, t_] := Integrate[Speed[s, a, t], t]
31
+ *
32
+ * Distance to reach a specific speed with a constant acceleration:
33
+ *   Solve[{Speed[s, a, t] == m, Travel[s, a, t] == d}, d, t]
34
+ *   d -> (m^2 - s^2)/(2 a) --> estimate_acceleration_distance()
35
+ *
36
+ * Speed after a given distance of travel with constant acceleration:
37
+ *   Solve[{Speed[s, a, t] == m, Travel[s, a, t] == d}, m, t]
38
+ *   m -> Sqrt[2 a d + s^2]
39
+ *
40
+ * DestinationSpeed[s_, a_, d_] := Sqrt[2 a d + s^2]
41
+ *
42
+ * When to start braking (di) to reach a specified destination speed (s2) after accelerating
43
+ * from initial speed s1 without ever stopping at a plateau:
44
+ *   Solve[{DestinationSpeed[s1, a, di] == DestinationSpeed[s2, a, d - di]}, di]
45
+ *   di -> (2 a d - s1^2 + s2^2)/(4 a) --> intersection_distance()
46
+ *
47
+ * IntersectionDistance[s1_, s2_, a_, d_] := (2 a d - s1^2 + s2^2)/(4 a)
48
+ *
52
  */
49
  */
53
 
50
 
54
 #include "Marlin.h"
51
 #include "Marlin.h"
71
 float axis_steps_per_unit[NUM_AXIS];
68
 float axis_steps_per_unit[NUM_AXIS];
72
 unsigned long max_acceleration_units_per_sq_second[NUM_AXIS]; // Use M201 to override by software
69
 unsigned long max_acceleration_units_per_sq_second[NUM_AXIS]; // Use M201 to override by software
73
 float minimumfeedrate;
70
 float minimumfeedrate;
74
-float acceleration;         // Normal acceleration mm/s^2  THIS IS THE DEFAULT ACCELERATION for all printing moves. M204 SXXXX
75
-float retract_acceleration; //  mm/s^2   filament pull-pack and push-forward  while standing still in the other axis M204 TXXXX
76
-float travel_acceleration;  // Travel acceleration mm/s^2  THIS IS THE DEFAULT ACCELERATION for all NON printing moves. M204 MXXXX
77
-float max_xy_jerk; //speed than can be stopped at once, if i understand correctly.
71
+float acceleration;         // Normal acceleration mm/s^2  DEFAULT ACCELERATION for all printing moves. M204 SXXXX
72
+float retract_acceleration; // Retract acceleration mm/s^2 filament pull-back and push-forward while standing still in the other axes M204 TXXXX
73
+float travel_acceleration;  // Travel acceleration mm/s^2  DEFAULT ACCELERATION for all NON printing moves. M204 MXXXX
74
+float max_xy_jerk;          // The largest speed change requiring no acceleration
78
 float max_z_jerk;
75
 float max_z_jerk;
79
 float max_e_jerk;
76
 float max_e_jerk;
80
 float mintravelfeedrate;
77
 float mintravelfeedrate;
81
 unsigned long axis_steps_per_sqr_second[NUM_AXIS];
78
 unsigned long axis_steps_per_sqr_second[NUM_AXIS];
82
 
79
 
83
 #ifdef ENABLE_AUTO_BED_LEVELING
80
 #ifdef ENABLE_AUTO_BED_LEVELING
84
-  // this holds the required transform to compensate for bed level
81
+  // Transform required to compensate for bed level
85
   matrix_3x3 plan_bed_level_matrix = {
82
   matrix_3x3 plan_bed_level_matrix = {
86
     1.0, 0.0, 0.0,
83
     1.0, 0.0, 0.0,
87
     0.0, 1.0, 0.0,
84
     0.0, 1.0, 0.0,
89
   };
86
   };
90
 #endif // ENABLE_AUTO_BED_LEVELING
87
 #endif // ENABLE_AUTO_BED_LEVELING
91
 
88
 
92
-// The current position of the tool in absolute steps
93
-long position[NUM_AXIS];   //rescaled from extern when axis_steps_per_unit are changed by gcode
94
-static float previous_speed[NUM_AXIS]; // Speed of previous path line segment
95
-static float previous_nominal_speed; // Nominal speed of previous path line segment
96
-
97
 #ifdef AUTOTEMP
89
 #ifdef AUTOTEMP
98
   float autotemp_max = 250;
90
   float autotemp_max = 250;
99
   float autotemp_min = 210;
91
   float autotemp_min = 210;
101
   bool autotemp_enabled = false;
93
   bool autotemp_enabled = false;
102
 #endif
94
 #endif
103
 
95
 
104
-unsigned char g_uc_extruder_last_move[4] = {0,0,0,0};
105
-
106
 //===========================================================================
96
 //===========================================================================
107
-//=================semi-private variables, used in inline  functions    =====
97
+//============ semi-private variables, used in inline functions =============
108
 //===========================================================================
98
 //===========================================================================
99
+
109
 block_t block_buffer[BLOCK_BUFFER_SIZE];            // A ring buffer for motion instfructions
100
 block_t block_buffer[BLOCK_BUFFER_SIZE];            // A ring buffer for motion instfructions
110
 volatile unsigned char block_buffer_head;           // Index of the next block to be pushed
101
 volatile unsigned char block_buffer_head;           // Index of the next block to be pushed
111
 volatile unsigned char block_buffer_tail;           // Index of the block to process now
102
 volatile unsigned char block_buffer_tail;           // Index of the block to process now
112
 
103
 
113
 //===========================================================================
104
 //===========================================================================
114
-//=============================private variables ============================
105
+//============================ private variables ============================
115
 //===========================================================================
106
 //===========================================================================
107
+
108
+// The current position of the tool in absolute steps
109
+long position[NUM_AXIS];               // Rescaled from extern when axis_steps_per_unit are changed by gcode
110
+static float previous_speed[NUM_AXIS]; // Speed of previous path line segment
111
+static float previous_nominal_speed;   // Nominal speed of previous path line segment
112
+
113
+unsigned char g_uc_extruder_last_move[4] = {0,0,0,0};
114
+
116
 #ifdef XY_FREQUENCY_LIMIT
115
 #ifdef XY_FREQUENCY_LIMIT
117
   // Used for the frequency limit
116
   // Used for the frequency limit
118
   #define MAX_FREQ_TIME (1000000.0/XY_FREQUENCY_LIMIT)
117
   #define MAX_FREQ_TIME (1000000.0/XY_FREQUENCY_LIMIT)
126
   static char meas_sample; //temporary variable to hold filament measurement sample
125
   static char meas_sample; //temporary variable to hold filament measurement sample
127
 #endif
126
 #endif
128
 
127
 
128
+//===========================================================================
129
+//================================ functions ================================
130
+//===========================================================================
131
+
129
 // Get the next / previous index of the next block in the ring buffer
132
 // Get the next / previous index of the next block in the ring buffer
130
 // NOTE: Using & here (not %) because BLOCK_BUFFER_SIZE is always a power of 2
133
 // NOTE: Using & here (not %) because BLOCK_BUFFER_SIZE is always a power of 2
131
 FORCE_INLINE int8_t next_block_index(int8_t block_index) { return BLOCK_MOD(block_index + 1); }
134
 FORCE_INLINE int8_t next_block_index(int8_t block_index) { return BLOCK_MOD(block_index + 1); }
132
 FORCE_INLINE int8_t prev_block_index(int8_t block_index) { return BLOCK_MOD(block_index - 1); }
135
 FORCE_INLINE int8_t prev_block_index(int8_t block_index) { return BLOCK_MOD(block_index - 1); }
133
 
136
 
134
-//===========================================================================
135
-//================================ Functions ================================
136
-//===========================================================================
137
-
138
 // Calculates the distance (not time) it takes to accelerate from initial_rate to target_rate using the 
137
 // Calculates the distance (not time) it takes to accelerate from initial_rate to target_rate using the 
139
 // given acceleration:
138
 // given acceleration:
140
 FORCE_INLINE float estimate_acceleration_distance(float initial_rate, float target_rate, float acceleration) {
139
 FORCE_INLINE float estimate_acceleration_distance(float initial_rate, float target_rate, float acceleration) {
960
     vector_3 position = vector_3(st_get_position_mm(X_AXIS), st_get_position_mm(Y_AXIS), st_get_position_mm(Z_AXIS));
959
     vector_3 position = vector_3(st_get_position_mm(X_AXIS), st_get_position_mm(Y_AXIS), st_get_position_mm(Z_AXIS));
961
 
960
 
962
     //position.debug("in plan_get position");
961
     //position.debug("in plan_get position");
963
-    //plan_bed_level_matrix.debug("in plan_get bed_level");
962
+    //plan_bed_level_matrix.debug("in plan_get_position");
964
     matrix_3x3 inverse = matrix_3x3::transpose(plan_bed_level_matrix);
963
     matrix_3x3 inverse = matrix_3x3::transpose(plan_bed_level_matrix);
965
     //inverse.debug("in plan_get inverse");
964
     //inverse.debug("in plan_get inverse");
966
     position.apply_rotation(inverse);
965
     position.apply_rotation(inverse);
982
       apply_rotation_xyz(plan_bed_level_matrix, x, y, z);
981
       apply_rotation_xyz(plan_bed_level_matrix, x, y, z);
983
     #endif
982
     #endif
984
 
983
 
985
-    float nx = position[X_AXIS] = lround(x * axis_steps_per_unit[X_AXIS]);
986
-    float ny = position[Y_AXIS] = lround(y * axis_steps_per_unit[Y_AXIS]);
987
-    float nz = position[Z_AXIS] = lround(z * axis_steps_per_unit[Z_AXIS]);
988
-    float ne = position[E_AXIS] = lround(e * axis_steps_per_unit[E_AXIS]);
984
+    float nx = position[X_AXIS] = lround(x * axis_steps_per_unit[X_AXIS]),
985
+          ny = position[Y_AXIS] = lround(y * axis_steps_per_unit[Y_AXIS]),
986
+          nz = position[Z_AXIS] = lround(z * axis_steps_per_unit[Z_AXIS]),
987
+          ne = position[E_AXIS] = lround(e * axis_steps_per_unit[E_AXIS]);
989
     st_set_position(nx, ny, nz, ne);
988
     st_set_position(nx, ny, nz, ne);
990
     previous_nominal_speed = 0.0; // Resets planner junction speeds. Assumes start from rest.
989
     previous_nominal_speed = 0.0; // Resets planner junction speeds. Assumes start from rest.
991
 
990
 

+ 9
- 5
Marlin/planner.h View File

115
 
115
 
116
 void plan_set_e_position(const float &e);
116
 void plan_set_e_position(const float &e);
117
 
117
 
118
+//===========================================================================
119
+//============================= public variables ============================
120
+//===========================================================================
121
+
118
 extern millis_t minsegmenttime;
122
 extern millis_t minsegmenttime;
119
-extern float max_feedrate[NUM_AXIS]; // set the max speeds
123
+extern float max_feedrate[NUM_AXIS]; // Max speeds in mm per minute
120
 extern float axis_steps_per_unit[NUM_AXIS];
124
 extern float axis_steps_per_unit[NUM_AXIS];
121
 extern unsigned long max_acceleration_units_per_sq_second[NUM_AXIS]; // Use M201 to override by software
125
 extern unsigned long max_acceleration_units_per_sq_second[NUM_AXIS]; // Use M201 to override by software
122
 extern float minimumfeedrate;
126
 extern float minimumfeedrate;
123
-extern float acceleration;         // Normal acceleration mm/s^2  THIS IS THE DEFAULT ACCELERATION for all moves. M204 SXXXX
124
-extern float retract_acceleration; //  mm/s^2   filament pull-pack and push-forward  while standing still in the other axis M204 TXXXX
125
-extern float travel_acceleration;  // Travel acceleration mm/s^2  THIS IS THE DEFAULT ACCELERATION for all NON printing moves. M204 MXXXX
126
-extern float max_xy_jerk; //speed than can be stopped at once, if i understand correctly.
127
+extern float acceleration;         // Normal acceleration mm/s^2  DEFAULT ACCELERATION for all printing moves. M204 SXXXX
128
+extern float retract_acceleration; // Retract acceleration mm/s^2 filament pull-back and push-forward while standing still in the other axes M204 TXXXX
129
+extern float travel_acceleration;  // Travel acceleration mm/s^2  DEFAULT ACCELERATION for all NON printing moves. M204 MXXXX
130
+extern float max_xy_jerk;          // The largest speed change requiring no acceleration
127
 extern float max_z_jerk;
131
 extern float max_z_jerk;
128
 extern float max_e_jerk;
132
 extern float max_e_jerk;
129
 extern float mintravelfeedrate;
133
 extern float mintravelfeedrate;

Marlin/Servo.cpp → Marlin/servo.cpp View File

1
 /*
1
 /*
2
- Servo.cpp - Interrupt driven Servo library for Arduino using 16 bit timers- Version 2
2
+ servo.cpp - Interrupt driven Servo library for Arduino using 16 bit timers- Version 2
3
  Copyright (c) 2009 Michael Margolis.  All right reserved.
3
  Copyright (c) 2009 Michael Margolis.  All right reserved.
4
 
4
 
5
  This library is free software; you can redistribute it and/or
5
  This library is free software; you can redistribute it and/or
48
 #include <avr/interrupt.h>
48
 #include <avr/interrupt.h>
49
 #include <Arduino.h>
49
 #include <Arduino.h>
50
 
50
 
51
-#include "Servo.h"
51
+#include "servo.h"
52
 
52
 
53
 #define usToTicks(_us)    (( clockCyclesPerMicrosecond()* _us) / 8)     // converts microseconds to tick (assumes prescale of 8)  // 12 Aug 2009
53
 #define usToTicks(_us)    (( clockCyclesPerMicrosecond()* _us) / 8)     // converts microseconds to tick (assumes prescale of 8)  // 12 Aug 2009
54
 #define ticksToUs(_ticks) (( (unsigned)_ticks * 8)/ clockCyclesPerMicrosecond() ) // converts from ticks back to microseconds
54
 #define ticksToUs(_ticks) (( (unsigned)_ticks * 8)/ clockCyclesPerMicrosecond() ) // converts from ticks back to microseconds

Marlin/Servo.h → Marlin/servo.h View File

1
 /*
1
 /*
2
-  Servo.h - Interrupt driven Servo library for Arduino using 16 bit timers- Version 2
2
+  servo.h - Interrupt driven Servo library for Arduino using 16 bit timers- Version 2
3
   Copyright (c) 2009 Michael Margolis.  All right reserved.
3
   Copyright (c) 2009 Michael Margolis.  All right reserved.
4
 
4
 
5
   This library is free software; you can redistribute it and/or
5
   This library is free software; you can redistribute it and/or
42
    detach()    - Stops an attached servos from pulsing its i/o pin.
42
    detach()    - Stops an attached servos from pulsing its i/o pin.
43
  */
43
  */
44
 
44
 
45
-#ifndef Servo_h
46
-#define Servo_h
45
+#ifndef servo_h
46
+#define servo_h
47
 
47
 
48
 #include <inttypes.h>
48
 #include <inttypes.h>
49
 
49
 

+ 92
- 60
Marlin/stepper.cpp View File

46
 
46
 
47
 // Variables used by The Stepper Driver Interrupt
47
 // Variables used by The Stepper Driver Interrupt
48
 static unsigned char out_bits;        // The next stepping-bits to be output
48
 static unsigned char out_bits;        // The next stepping-bits to be output
49
-static unsigned int cleaning_buffer_counter;  
49
+static unsigned int cleaning_buffer_counter;
50
 
50
 
51
 #ifdef Z_DUAL_ENDSTOPS
51
 #ifdef Z_DUAL_ENDSTOPS
52
   static bool performing_homing = false, 
52
   static bool performing_homing = false, 
54
               locked_z2_motor = false;
54
               locked_z2_motor = false;
55
 #endif
55
 #endif
56
 
56
 
57
-// Counter variables for the bresenham line tracer
57
+// Counter variables for the Bresenham line tracer
58
 static long counter_x, counter_y, counter_z, counter_e;
58
 static long counter_x, counter_y, counter_z, counter_e;
59
 volatile static unsigned long step_events_completed; // The number of step events executed in the current block
59
 volatile static unsigned long step_events_completed; // The number of step events executed in the current block
60
 
60
 
66
 
66
 
67
 static long acceleration_time, deceleration_time;
67
 static long acceleration_time, deceleration_time;
68
 //static unsigned long accelerate_until, decelerate_after, acceleration_rate, initial_rate, final_rate, nominal_rate;
68
 //static unsigned long accelerate_until, decelerate_after, acceleration_rate, initial_rate, final_rate, nominal_rate;
69
-static unsigned short acc_step_rate; // needed for deccelaration start point
69
+static unsigned short acc_step_rate; // needed for deceleration start point
70
 static char step_loops;
70
 static char step_loops;
71
 static unsigned short OCR1A_nominal;
71
 static unsigned short OCR1A_nominal;
72
 static unsigned short step_loops_nominal;
72
 static unsigned short step_loops_nominal;
205
 // intRes = longIn1 * longIn2 >> 24
205
 // intRes = longIn1 * longIn2 >> 24
206
 // uses:
206
 // uses:
207
 // r26 to store 0
207
 // r26 to store 0
208
-// r27 to store the byte 1 of the 48bit result
209
-#define MultiU24X24toH16(intRes, longIn1, longIn2) \
208
+// r27 to store bits 16-23 of the 48bit result. The top bit is used to round the two byte result.
209
+// note that the lower two bytes and the upper byte of the 48bit result are not calculated.
210
+// this can cause the result to be out by one as the lower bytes may cause carries into the upper ones.
211
+// B0 A0 are bits 24-39 and are the returned value
212
+// C1 B1 A1 is longIn1
213
+// D2 C2 B2 A2 is longIn2
214
+//
215
+#define MultiU24X32toH16(intRes, longIn1, longIn2) \
210
   asm volatile ( \
216
   asm volatile ( \
211
     "clr r26 \n\t" \
217
     "clr r26 \n\t" \
212
     "mul %A1, %B2 \n\t" \
218
     "mul %A1, %B2 \n\t" \
237
     "lsr r27 \n\t" \
243
     "lsr r27 \n\t" \
238
     "adc %A0, r26 \n\t" \
244
     "adc %A0, r26 \n\t" \
239
     "adc %B0, r26 \n\t" \
245
     "adc %B0, r26 \n\t" \
246
+    "mul %D2, %A1 \n\t" \
247
+    "add %A0, r0 \n\t" \
248
+    "adc %B0, r1 \n\t" \
249
+    "mul %D2, %B1 \n\t" \
250
+    "add %B0, r0 \n\t" \
240
     "clr r1 \n\t" \
251
     "clr r1 \n\t" \
241
     : \
252
     : \
242
     "=&r" (intRes) \
253
     "=&r" (intRes) \
274
     }
285
     }
275
     #ifdef Z_PROBE_ENDSTOP
286
     #ifdef Z_PROBE_ENDSTOP
276
     if (endstop_z_probe_hit) {
287
     if (endstop_z_probe_hit) {
277
-    	SERIAL_ECHOPAIR(" Z_PROBE:", (float)endstops_trigsteps[Z_AXIS] / axis_steps_per_unit[Z_AXIS]);
278
-    	LCD_MESSAGEPGM(MSG_ENDSTOPS_HIT "ZP");
288
+      SERIAL_ECHOPAIR(" Z_PROBE:", (float)endstops_trigsteps[Z_AXIS] / axis_steps_per_unit[Z_AXIS]);
289
+      LCD_MESSAGEPGM(MSG_ENDSTOPS_HIT "ZP");
279
     }
290
     }
280
     #endif
291
     #endif
281
     SERIAL_EOL;
292
     SERIAL_EOL;
313
 //  The trapezoid is the shape the speed curve over time. It starts at block->initial_rate, accelerates
324
 //  The trapezoid is the shape the speed curve over time. It starts at block->initial_rate, accelerates
314
 //  first block->accelerate_until step_events_completed, then keeps going at constant speed until
325
 //  first block->accelerate_until step_events_completed, then keeps going at constant speed until
315
 //  step_events_completed reaches block->decelerate_after after which it decelerates until the trapezoid generator is reset.
326
 //  step_events_completed reaches block->decelerate_after after which it decelerates until the trapezoid generator is reset.
316
-//  The slope of acceleration is calculated with the leib ramp alghorithm.
327
+//  The slope of acceleration is calculated using v = u + at where t is the accumulated timer values of the steps so far.
317
 
328
 
318
 void st_wake_up() {
329
 void st_wake_up() {
319
   //  TCNT1 = 0;
330
   //  TCNT1 = 0;
400
     OCR1A = 200;
411
     OCR1A = 200;
401
     return;
412
     return;
402
   }
413
   }
403
-  
414
+
404
   // If there is no current block, attempt to pop one from the buffer
415
   // If there is no current block, attempt to pop one from the buffer
405
   if (!current_block) {
416
   if (!current_block) {
406
     // Anything in the buffer?
417
     // Anything in the buffer?
452
       count_direction[Y_AXIS] = 1;
463
       count_direction[Y_AXIS] = 1;
453
     }
464
     }
454
 
465
 
466
+    #define _ENDSTOP(axis, minmax) axis ##_## minmax ##_endstop
467
+    #define _ENDSTOP_PIN(AXIS, MINMAX) AXIS ##_## MINMAX ##_PIN
468
+    #define _ENDSTOP_INVERTING(AXIS, MINMAX) AXIS ##_## MINMAX ##_ENDSTOP_INVERTING
469
+    #define _OLD_ENDSTOP(axis, minmax) old_## axis ##_## minmax ##_endstop
470
+    #define _AXIS(AXIS) AXIS ##_AXIS
471
+    #define _ENDSTOP_HIT(axis) endstop_## axis ##_hit
472
+
455
     #define UPDATE_ENDSTOP(axis,AXIS,minmax,MINMAX) \
473
     #define UPDATE_ENDSTOP(axis,AXIS,minmax,MINMAX) \
456
-      bool axis ##_## minmax ##_endstop = (READ(AXIS ##_## MINMAX ##_PIN) != AXIS ##_## MINMAX ##_ENDSTOP_INVERTING); \
457
-      if (axis ##_## minmax ##_endstop && old_## axis ##_## minmax ##_endstop && (current_block->steps[AXIS ##_AXIS] > 0)) { \
458
-        endstops_trigsteps[AXIS ##_AXIS] = count_position[AXIS ##_AXIS]; \
459
-        endstop_## axis ##_hit = true; \
474
+      bool _ENDSTOP(axis, minmax) = (READ(_ENDSTOP_PIN(AXIS, MINMAX)) != _ENDSTOP_INVERTING(AXIS, MINMAX)); \
475
+      if (_ENDSTOP(axis, minmax) && _OLD_ENDSTOP(axis, minmax) && (current_block->steps[_AXIS(AXIS)] > 0)) { \
476
+        endstops_trigsteps[_AXIS(AXIS)] = count_position[_AXIS(AXIS)]; \
477
+        _ENDSTOP_HIT(axis) = true; \
460
         step_events_completed = current_block->step_event_count; \
478
         step_events_completed = current_block->step_event_count; \
461
       } \
479
       } \
462
-      old_## axis ##_## minmax ##_endstop = axis ##_## minmax ##_endstop;
480
+      _OLD_ENDSTOP(axis, minmax) = _ENDSTOP(axis, minmax);
481
+
463
 
482
 
464
     // Check X and Y endstops
483
     // Check X and Y endstops
465
     if (check_endstops) {
484
     if (check_endstops) {
469
         if ((current_block->steps[A_AXIS] != current_block->steps[B_AXIS]) || (TEST(out_bits, A_AXIS) == TEST(out_bits, B_AXIS))) {
488
         if ((current_block->steps[A_AXIS] != current_block->steps[B_AXIS]) || (TEST(out_bits, A_AXIS) == TEST(out_bits, B_AXIS))) {
470
           if (TEST(out_bits, X_HEAD))
489
           if (TEST(out_bits, X_HEAD))
471
       #else
490
       #else
472
-          if (TEST(out_bits, X_AXIS))   // stepping along -X axis (regular cartesians bot)
491
+          if (TEST(out_bits, X_AXIS))   // stepping along -X axis (regular Cartesian bot)
473
       #endif
492
       #endif
474
           { // -direction
493
           { // -direction
475
             #ifdef DUAL_X_CARRIAGE
494
             #ifdef DUAL_X_CARRIAGE
476
               // with 2 x-carriages, endstops are only checked in the homing direction for the active extruder
495
               // with 2 x-carriages, endstops are only checked in the homing direction for the active extruder
477
               if ((current_block->active_extruder == 0 && X_HOME_DIR == -1) || (current_block->active_extruder != 0 && X2_HOME_DIR == -1))
496
               if ((current_block->active_extruder == 0 && X_HOME_DIR == -1) || (current_block->active_extruder != 0 && X2_HOME_DIR == -1))
478
-            #endif          
497
+            #endif
479
               {
498
               {
480
                 #if HAS_X_MIN
499
                 #if HAS_X_MIN
481
                   UPDATE_ENDSTOP(x, X, min, MIN);
500
                   UPDATE_ENDSTOP(x, X, min, MIN);
561
           z_probe_endstop=(READ(Z_PROBE_PIN) != Z_PROBE_ENDSTOP_INVERTING);
580
           z_probe_endstop=(READ(Z_PROBE_PIN) != Z_PROBE_ENDSTOP_INVERTING);
562
           if(z_probe_endstop && old_z_probe_endstop)
581
           if(z_probe_endstop && old_z_probe_endstop)
563
           {
582
           {
564
-        	  endstops_trigsteps[Z_AXIS] = count_position[Z_AXIS];
565
-        	  endstop_z_probe_hit=true;
583
+            endstops_trigsteps[Z_AXIS] = count_position[Z_AXIS];
584
+            endstop_z_probe_hit=true;
566
 
585
 
567
-//        	  if (z_probe_endstop && old_z_probe_endstop) SERIAL_ECHOLN("z_probe_endstop = true");
586
+//            if (z_probe_endstop && old_z_probe_endstop) SERIAL_ECHOLN("z_probe_endstop = true");
568
           }
587
           }
569
           old_z_probe_endstop = z_probe_endstop;
588
           old_z_probe_endstop = z_probe_endstop;
570
         #endif
589
         #endif
571
-        
590
+
572
       } // check_endstops
591
       } // check_endstops
573
 
592
 
574
     }
593
     }
614
           #endif // !Z_DUAL_ENDSTOPS
633
           #endif // !Z_DUAL_ENDSTOPS
615
 
634
 
616
         #endif // Z_MAX_PIN
635
         #endif // Z_MAX_PIN
617
-        
636
+
618
         #ifdef Z_PROBE_ENDSTOP
637
         #ifdef Z_PROBE_ENDSTOP
619
           UPDATE_ENDSTOP(z, Z, probe, PROBE);
638
           UPDATE_ENDSTOP(z, Z, probe, PROBE);
620
           z_probe_endstop=(READ(Z_PROBE_PIN) != Z_PROBE_ENDSTOP_INVERTING);
639
           z_probe_endstop=(READ(Z_PROBE_PIN) != Z_PROBE_ENDSTOP_INVERTING);
621
           if(z_probe_endstop && old_z_probe_endstop)
640
           if(z_probe_endstop && old_z_probe_endstop)
622
           {
641
           {
623
-        	  endstops_trigsteps[Z_AXIS] = count_position[Z_AXIS];
624
-        	  endstop_z_probe_hit=true;
625
-//        	  if (z_probe_endstop && old_z_probe_endstop) SERIAL_ECHOLN("z_probe_endstop = true");
642
+            endstops_trigsteps[Z_AXIS] = count_position[Z_AXIS];
643
+            endstop_z_probe_hit=true;
644
+//            if (z_probe_endstop && old_z_probe_endstop) SERIAL_ECHOLN("z_probe_endstop = true");
626
           }
645
           }
627
           old_z_probe_endstop = z_probe_endstop;
646
           old_z_probe_endstop = z_probe_endstop;
628
         #endif
647
         #endif
656
         }
675
         }
657
       #endif //ADVANCE
676
       #endif //ADVANCE
658
 
677
 
678
+      #define _COUNTER(axis) counter_## axis
679
+      #define _WRITE_STEP(AXIS, HIGHLOW) AXIS ##_STEP_WRITE(HIGHLOW)
680
+      #define _APPLY_STEP(AXIS) AXIS ##_APPLY_STEP
681
+      #define _INVERT_STEP_PIN(AXIS) INVERT_## AXIS ##_STEP_PIN
682
+
659
       #ifdef CONFIG_STEPPERS_TOSHIBA
683
       #ifdef CONFIG_STEPPERS_TOSHIBA
660
         /**
684
         /**
661
          * The Toshiba stepper controller require much longer pulses.
685
          * The Toshiba stepper controller require much longer pulses.
664
          * lag to allow it work with without needing NOPs
688
          * lag to allow it work with without needing NOPs
665
          */
689
          */
666
         #define STEP_ADD(axis, AXIS) \
690
         #define STEP_ADD(axis, AXIS) \
667
-         counter_## axis += current_block->steps[AXIS ##_AXIS]; \
668
-         if (counter_## axis > 0) { AXIS ##_STEP_WRITE(HIGH); }
691
+         _COUNTER(axis) += current_block->steps[_AXIS(AXIS)]; \
692
+         if (_COUNTER(axis) > 0) { _WRITE_STEP(AXIS, HIGH); }
669
         STEP_ADD(x,X);
693
         STEP_ADD(x,X);
670
         STEP_ADD(y,Y);
694
         STEP_ADD(y,Y);
671
         STEP_ADD(z,Z);
695
         STEP_ADD(z,Z);
674
         #endif
698
         #endif
675
 
699
 
676
         #define STEP_IF_COUNTER(axis, AXIS) \
700
         #define STEP_IF_COUNTER(axis, AXIS) \
677
-          if (counter_## axis > 0) { \
678
-            counter_## axis -= current_block->step_event_count; \
679
-            count_position[AXIS ##_AXIS] += count_direction[AXIS ##_AXIS]; \
680
-            AXIS ##_STEP_WRITE(LOW); \
701
+          if (_COUNTER(axis) > 0) { \
702
+            _COUNTER(axis) -= current_block->step_event_count; \
703
+            count_position[_AXIS(AXIS)] += count_direction[_AXIS(AXIS)]; \
704
+            _WRITE_STEP(AXIS, LOW); \
681
           }
705
           }
682
 
706
 
683
         STEP_IF_COUNTER(x, X);
707
         STEP_IF_COUNTER(x, X);
690
       #else // !CONFIG_STEPPERS_TOSHIBA
714
       #else // !CONFIG_STEPPERS_TOSHIBA
691
 
715
 
692
         #define APPLY_MOVEMENT(axis, AXIS) \
716
         #define APPLY_MOVEMENT(axis, AXIS) \
693
-          counter_## axis += current_block->steps[AXIS ##_AXIS]; \
694
-          if (counter_## axis > 0) { \
695
-            AXIS ##_APPLY_STEP(!INVERT_## AXIS ##_STEP_PIN,0); \
696
-            counter_## axis -= current_block->step_event_count; \
697
-            count_position[AXIS ##_AXIS] += count_direction[AXIS ##_AXIS]; \
698
-            AXIS ##_APPLY_STEP(INVERT_## AXIS ##_STEP_PIN,0); \
717
+          _COUNTER(axis) += current_block->steps[_AXIS(AXIS)]; \
718
+          if (_COUNTER(axis) > 0) { \
719
+            _APPLY_STEP(AXIS)(!_INVERT_STEP_PIN(AXIS),0); \
720
+            _COUNTER(axis) -= current_block->step_event_count; \
721
+            count_position[_AXIS(AXIS)] += count_direction[_AXIS(AXIS)]; \
722
+            _APPLY_STEP(AXIS)(_INVERT_STEP_PIN(AXIS),0); \
699
           }
723
           }
700
 
724
 
701
         APPLY_MOVEMENT(x, X);
725
         APPLY_MOVEMENT(x, X);
714
     unsigned short step_rate;
738
     unsigned short step_rate;
715
     if (step_events_completed <= (unsigned long)current_block->accelerate_until) {
739
     if (step_events_completed <= (unsigned long)current_block->accelerate_until) {
716
 
740
 
717
-      MultiU24X24toH16(acc_step_rate, acceleration_time, current_block->acceleration_rate);
741
+      MultiU24X32toH16(acc_step_rate, acceleration_time, current_block->acceleration_rate);
718
       acc_step_rate += current_block->initial_rate;
742
       acc_step_rate += current_block->initial_rate;
719
 
743
 
720
       // upper limit
744
       // upper limit
737
       #endif
761
       #endif
738
     }
762
     }
739
     else if (step_events_completed > (unsigned long)current_block->decelerate_after) {
763
     else if (step_events_completed > (unsigned long)current_block->decelerate_after) {
740
-      MultiU24X24toH16(step_rate, deceleration_time, current_block->acceleration_rate);
764
+      MultiU24X32toH16(step_rate, deceleration_time, current_block->acceleration_rate);
741
 
765
 
742
       if (step_rate > acc_step_rate) { // Check step_rate stays positive
766
       if (step_rate > acc_step_rate) { // Check step_rate stays positive
743
         step_rate = current_block->final_rate;
767
         step_rate = current_block->final_rate;
863
   #ifdef HAVE_L6470DRIVER
887
   #ifdef HAVE_L6470DRIVER
864
     L6470_init();
888
     L6470_init();
865
   #endif
889
   #endif
866
-  
890
+
867
   // Initialize Dir Pins
891
   // Initialize Dir Pins
868
   #if HAS_X_DIR
892
   #if HAS_X_DIR
869
     X_DIR_INIT;
893
     X_DIR_INIT;
909
   #if HAS_Y_ENABLE
933
   #if HAS_Y_ENABLE
910
     Y_ENABLE_INIT;
934
     Y_ENABLE_INIT;
911
     if (!Y_ENABLE_ON) Y_ENABLE_WRITE(HIGH);
935
     if (!Y_ENABLE_ON) Y_ENABLE_WRITE(HIGH);
912
-	
913
-	#if defined(Y_DUAL_STEPPER_DRIVERS) && HAS_Y2_ENABLE
914
-	  Y2_ENABLE_INIT;
915
-	  if (!Y_ENABLE_ON) Y2_ENABLE_WRITE(HIGH);
916
-	#endif
936
+
937
+  #if defined(Y_DUAL_STEPPER_DRIVERS) && HAS_Y2_ENABLE
938
+    Y2_ENABLE_INIT;
939
+    if (!Y_ENABLE_ON) Y2_ENABLE_WRITE(HIGH);
940
+  #endif
917
   #endif
941
   #endif
918
   #if HAS_Z_ENABLE
942
   #if HAS_Z_ENABLE
919
     Z_ENABLE_INIT;
943
     Z_ENABLE_INIT;
990
     #ifdef ENDSTOPPULLUP_ZMAX
1014
     #ifdef ENDSTOPPULLUP_ZMAX
991
       WRITE(Z2_MAX_PIN,HIGH);
1015
       WRITE(Z2_MAX_PIN,HIGH);
992
     #endif
1016
     #endif
993
-  #endif  
994
-  
1017
+  #endif
1018
+
995
 #if (defined(Z_PROBE_PIN) && Z_PROBE_PIN >= 0) && defined(Z_PROBE_ENDSTOP) // Check for Z_PROBE_ENDSTOP so we don't pull a pin high unless it's to be used.
1019
 #if (defined(Z_PROBE_PIN) && Z_PROBE_PIN >= 0) && defined(Z_PROBE_ENDSTOP) // Check for Z_PROBE_ENDSTOP so we don't pull a pin high unless it's to be used.
996
   SET_INPUT(Z_PROBE_PIN);
1020
   SET_INPUT(Z_PROBE_PIN);
997
   #ifdef ENDSTOPPULLUP_ZPROBE
1021
   #ifdef ENDSTOPPULLUP_ZPROBE
999
   #endif
1023
   #endif
1000
 #endif
1024
 #endif
1001
 
1025
 
1026
+  #define _STEP_INIT(AXIS) AXIS ##_STEP_INIT
1027
+  #define _DISABLE(axis) disable_## axis()
1028
+
1002
   #define AXIS_INIT(axis, AXIS, PIN) \
1029
   #define AXIS_INIT(axis, AXIS, PIN) \
1003
-    AXIS ##_STEP_INIT; \
1004
-    AXIS ##_STEP_WRITE(INVERT_## PIN ##_STEP_PIN); \
1005
-    disable_## axis()
1030
+    _STEP_INIT(AXIS); \
1031
+    _WRITE_STEP(AXIS, _INVERT_STEP_PIN(PIN)); \
1032
+    _DISABLE(axis)
1006
 
1033
 
1007
   #define E_AXIS_INIT(NUM) AXIS_INIT(e## NUM, E## NUM, E)
1034
   #define E_AXIS_INIT(NUM) AXIS_INIT(e## NUM, E## NUM, E)
1008
 
1035
 
1135
   // No other ISR should ever interrupt this!
1162
   // No other ISR should ever interrupt this!
1136
   void babystep(const uint8_t axis, const bool direction) {
1163
   void babystep(const uint8_t axis, const bool direction) {
1137
 
1164
 
1165
+    #define _ENABLE(axis) enable_## axis()
1166
+    #define _READ_DIR(AXIS) AXIS ##_DIR_READ
1167
+    #define _INVERT_DIR(AXIS) INVERT_## AXIS ##_DIR
1168
+    #define _APPLY_DIR(AXIS, INVERT) AXIS ##_APPLY_DIR(INVERT, true)
1169
+
1138
     #define BABYSTEP_AXIS(axis, AXIS, INVERT) { \
1170
     #define BABYSTEP_AXIS(axis, AXIS, INVERT) { \
1139
-        enable_## axis(); \
1140
-        uint8_t old_pin = AXIS ##_DIR_READ; \
1141
-        AXIS ##_APPLY_DIR(INVERT_## AXIS ##_DIR^direction^INVERT, true); \
1142
-        AXIS ##_APPLY_STEP(!INVERT_## AXIS ##_STEP_PIN, true); \
1143
-        _delay_us(1U); \
1144
-        AXIS ##_APPLY_STEP(INVERT_## AXIS ##_STEP_PIN, true); \
1145
-        AXIS ##_APPLY_DIR(old_pin, true); \
1171
+        _ENABLE(axis); \
1172
+        uint8_t old_pin = _READ_DIR(AXIS); \
1173
+        _APPLY_DIR(AXIS, _INVERT_DIR(AXIS)^direction^INVERT); \
1174
+        _APPLY_STEP(AXIS)(!_INVERT_STEP_PIN(AXIS), true); \
1175
+        delayMicroseconds(2); \
1176
+        _APPLY_STEP(AXIS)(_INVERT_STEP_PIN(AXIS), true); \
1177
+        _APPLY_DIR(AXIS, old_pin); \
1146
       }
1178
       }
1147
 
1179
 
1148
     switch(axis) {
1180
     switch(axis) {
1154
       case Y_AXIS:
1186
       case Y_AXIS:
1155
         BABYSTEP_AXIS(y, Y, false);
1187
         BABYSTEP_AXIS(y, Y, false);
1156
         break;
1188
         break;
1157
-     
1189
+ 
1158
       case Z_AXIS: {
1190
       case Z_AXIS: {
1159
 
1191
 
1160
         #ifndef DELTA
1192
         #ifndef DELTA
1179
           X_STEP_WRITE(!INVERT_X_STEP_PIN);
1211
           X_STEP_WRITE(!INVERT_X_STEP_PIN);
1180
           Y_STEP_WRITE(!INVERT_Y_STEP_PIN);
1212
           Y_STEP_WRITE(!INVERT_Y_STEP_PIN);
1181
           Z_STEP_WRITE(!INVERT_Z_STEP_PIN);
1213
           Z_STEP_WRITE(!INVERT_Z_STEP_PIN);
1182
-          _delay_us(1U);
1214
+          delayMicroseconds(2);
1183
           X_STEP_WRITE(INVERT_X_STEP_PIN); 
1215
           X_STEP_WRITE(INVERT_X_STEP_PIN); 
1184
           Y_STEP_WRITE(INVERT_Y_STEP_PIN); 
1216
           Y_STEP_WRITE(INVERT_Y_STEP_PIN); 
1185
           Z_STEP_WRITE(INVERT_Z_STEP_PIN);
1217
           Z_STEP_WRITE(INVERT_Z_STEP_PIN);
1191
         #endif
1223
         #endif
1192
 
1224
 
1193
       } break;
1225
       } break;
1194
-     
1226
+ 
1195
       default: break;
1227
       default: break;
1196
     }
1228
     }
1197
   }
1229
   }
1255
 
1287
 
1256
   #if HAS_MICROSTEPS
1288
   #if HAS_MICROSTEPS
1257
     pinMode(X_MS1_PIN,OUTPUT);
1289
     pinMode(X_MS1_PIN,OUTPUT);
1258
-    pinMode(X_MS2_PIN,OUTPUT);  
1290
+    pinMode(X_MS2_PIN,OUTPUT);
1259
     pinMode(Y_MS1_PIN,OUTPUT);
1291
     pinMode(Y_MS1_PIN,OUTPUT);
1260
     pinMode(Y_MS2_PIN,OUTPUT);
1292
     pinMode(Y_MS2_PIN,OUTPUT);
1261
     pinMode(Z_MS1_PIN,OUTPUT);
1293
     pinMode(Z_MS1_PIN,OUTPUT);

+ 7
- 2
Marlin/temperature.cpp View File

89
 #endif
89
 #endif
90
 
90
 
91
 //===========================================================================
91
 //===========================================================================
92
-//=============================private variables============================
92
+//============================ private variables ============================
93
 //===========================================================================
93
 //===========================================================================
94
+
94
 static volatile bool temp_meas_ready = false;
95
 static volatile bool temp_meas_ready = false;
95
 
96
 
96
 #ifdef PIDTEMP
97
 #ifdef PIDTEMP
187
 #endif
188
 #endif
188
 
189
 
189
 //===========================================================================
190
 //===========================================================================
190
-//=============================   functions      ============================
191
+//================================ Functions ================================
191
 //===========================================================================
192
 //===========================================================================
192
 
193
 
193
 void PID_autotune(float temp, int extruder, int ncycles)
194
 void PID_autotune(float temp, int extruder, int ncycles)
341
     }
342
     }
342
     if (cycles > ncycles) {
343
     if (cycles > ncycles) {
343
       SERIAL_PROTOCOLLNPGM(MSG_PID_AUTOTUNE_FINISHED);
344
       SERIAL_PROTOCOLLNPGM(MSG_PID_AUTOTUNE_FINISHED);
345
+      const char *estring = extruder < 0 ? "bed" : "";
346
+      SERIAL_PROTOCOLPGM("#define  DEFAULT_"); SERIAL_PROTOCOL(estring); SERIAL_PROTOCOLPGM("Kp "); SERIAL_PROTOCOLLN(Kp);
347
+      SERIAL_PROTOCOLPGM("#define  DEFAULT_"); SERIAL_PROTOCOL(estring); SERIAL_PROTOCOLPGM("Ki "); SERIAL_PROTOCOLLN(Ki);
348
+      SERIAL_PROTOCOLPGM("#define  DEFAULT_"); SERIAL_PROTOCOL(estring); SERIAL_PROTOCOLPGM("Kd "); SERIAL_PROTOCOLLN(Kd);
344
       return;
349
       return;
345
     }
350
     }
346
     lcd_update();
351
     lcd_update();

+ 358
- 170
Marlin/ultralcd.cpp View File

5
 #include "cardreader.h"
5
 #include "cardreader.h"
6
 #include "temperature.h"
6
 #include "temperature.h"
7
 #include "stepper.h"
7
 #include "stepper.h"
8
-#include "ConfigurationStore.h"
8
+#include "configuration_store.h"
9
 
9
 
10
 int8_t encoderDiff; /* encoderDiff is updated from interrupt context and added to encoderPosition every LCD update */
10
 int8_t encoderDiff; /* encoderDiff is updated from interrupt context and added to encoderPosition every LCD update */
11
 
11
 
173
   } while(0)
173
   } while(0)
174
 
174
 
175
   #ifdef ENCODER_RATE_MULTIPLIER
175
   #ifdef ENCODER_RATE_MULTIPLIER
176
+
177
+    //#define ENCODER_RATE_MULTIPLIER_DEBUG  // If defined, output the encoder steps per second value
178
+
176
     /**
179
     /**
177
      * MENU_MULTIPLIER_ITEM generates drawing and handling code for a multiplier menu item
180
      * MENU_MULTIPLIER_ITEM generates drawing and handling code for a multiplier menu item
178
      */
181
      */
246
 // place-holders for Ki and Kd edits
249
 // place-holders for Ki and Kd edits
247
 float raw_Ki, raw_Kd;
250
 float raw_Ki, raw_Kd;
248
 
251
 
252
+/**
253
+ * General function to go directly to a menu
254
+ */
249
 static void lcd_goto_menu(menuFunc_t menu, const bool feedback=false, const uint32_t encoder=0) {
255
 static void lcd_goto_menu(menuFunc_t menu, const bool feedback=false, const uint32_t encoder=0) {
250
   if (currentMenu != menu) {
256
   if (currentMenu != menu) {
251
     currentMenu = menu;
257
     currentMenu = menu;
260
   }
266
   }
261
 }
267
 }
262
 
268
 
263
-/* Main status screen. It's up to the implementation specific part to show what is needed. As this is very display dependent */
269
+/**
270
+ *
271
+ * "Info Screen"
272
+ *
273
+ * This is very display-dependent, so the lcd implementation draws this.
274
+ */
275
+
264
 static void lcd_status_screen() {
276
 static void lcd_status_screen() {
265
 	encoderRateMultiplierEnabled = false;
277
 	encoderRateMultiplierEnabled = false;
266
 
278
 
267
   #ifdef LCD_PROGRESS_BAR
279
   #ifdef LCD_PROGRESS_BAR
268
     millis_t ms = millis();
280
     millis_t ms = millis();
269
     #ifndef PROGRESS_MSG_ONCE
281
     #ifndef PROGRESS_MSG_ONCE
270
-      if (ms > progressBarTick + PROGRESS_BAR_MSG_TIME + PROGRESS_BAR_BAR_TIME) {
271
-        progressBarTick = ms;
282
+      if (ms > progress_bar_ms + PROGRESS_BAR_MSG_TIME + PROGRESS_BAR_BAR_TIME) {
283
+        progress_bar_ms = ms;
272
       }
284
       }
273
     #endif
285
     #endif
274
     #if PROGRESS_MSG_EXPIRE > 0
286
     #if PROGRESS_MSG_EXPIRE > 0
275
       // Handle message expire
287
       // Handle message expire
276
-      if (expireStatusMillis > 0) {
288
+      if (expire_status_ms > 0) {
277
         if (card.isFileOpen()) {
289
         if (card.isFileOpen()) {
278
           // Expire the message when printing is active
290
           // Expire the message when printing is active
279
           if (IS_SD_PRINTING) {
291
           if (IS_SD_PRINTING) {
280
             // Expire the message when printing is active
292
             // Expire the message when printing is active
281
-            if (ms >= expireStatusMillis) {
293
+            if (ms >= expire_status_ms) {
282
               lcd_status_message[0] = '\0';
294
               lcd_status_message[0] = '\0';
283
-              expireStatusMillis = 0;
295
+              expire_status_ms = 0;
284
             }
296
             }
285
           }
297
           }
286
           else {
298
           else {
287
-            expireStatusMillis += LCD_UPDATE_INTERVAL;
299
+            expire_status_ms += LCD_UPDATE_INTERVAL;
288
           }
300
           }
289
         }
301
         }
290
         else {
302
         else {
291
-          expireStatusMillis = 0;
303
+          expire_status_ms = 0;
292
         }
304
         }
293
       }
305
       }
294
     #endif
306
     #endif
371
   lcd_setstatus(MSG_PRINT_ABORTED, true);
383
   lcd_setstatus(MSG_PRINT_ABORTED, true);
372
 }
384
 }
373
 
385
 
374
-/* Menu implementation */
386
+/**
387
+ *
388
+ * "Main" menu
389
+ *
390
+ */
391
+
375
 static void lcd_main_menu() {
392
 static void lcd_main_menu() {
376
   START_MENU();
393
   START_MENU();
377
   MENU_ITEM(back, MSG_WATCH, lcd_status_screen);
394
   MENU_ITEM(back, MSG_WATCH, lcd_status_screen);
421
   }
438
   }
422
 #endif
439
 #endif
423
 
440
 
441
+/**
442
+ * Set the home offset based on the current_position
443
+ */
424
 void lcd_set_home_offsets() {
444
 void lcd_set_home_offsets() {
425
-  for (int8_t i=0; i < NUM_AXIS; i++) {
426
-    if (i != E_AXIS) {
427
-      home_offset[i] -= current_position[i];
428
-      current_position[i] = 0.0;
429
-    }
430
-  }
431
-  plan_set_position(0.0, 0.0, 0.0, current_position[E_AXIS]);
432
-
433
-  // Audio feedback
434
-  enqueuecommands_P(PSTR("M300 S659 P200\nM300 S698 P200"));
445
+  // M428 Command
446
+  enqueuecommands_P(PSTR("M428"));
435
   lcd_return_to_status();
447
   lcd_return_to_status();
436
 }
448
 }
437
 
449
 
453
 
465
 
454
 #endif //BABYSTEPPING
466
 #endif //BABYSTEPPING
455
 
467
 
468
+/**
469
+ *
470
+ * "Tune" submenu
471
+ *
472
+ */
473
+
456
 static void lcd_tune_menu() {
474
 static void lcd_tune_menu() {
457
   START_MENU();
475
   START_MENU();
458
   MENU_ITEM(back, MSG_MAIN, lcd_main_menu);
476
   MENU_ITEM(back, MSG_MAIN, lcd_main_menu);
594
   lcd_return_to_status();
612
   lcd_return_to_status();
595
 }
613
 }
596
 
614
 
615
+/**
616
+ *
617
+ * "Prepare" submenu
618
+ *
619
+ */
620
+
597
 static void lcd_prepare_menu() {
621
 static void lcd_prepare_menu() {
598
   START_MENU();
622
   START_MENU();
623
+
624
+  //
625
+  // ^ Main
626
+  //
599
   MENU_ITEM(back, MSG_MAIN, lcd_main_menu);
627
   MENU_ITEM(back, MSG_MAIN, lcd_main_menu);
600
-  #if defined( SDSUPPORT ) && defined( MENU_ADDAUTOSTART )
601
-    MENU_ITEM(function, MSG_AUTOSTART, lcd_autostart_sd);
602
-  #endif
603
-  MENU_ITEM(gcode, MSG_DISABLE_STEPPERS, PSTR("M84"));
628
+
629
+  //
630
+  // Auto Home
631
+  //
604
   MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28"));
632
   MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28"));
633
+
634
+  //
635
+  // Set Home Offsets
636
+  //
605
   MENU_ITEM(function, MSG_SET_HOME_OFFSETS, lcd_set_home_offsets);
637
   MENU_ITEM(function, MSG_SET_HOME_OFFSETS, lcd_set_home_offsets);
606
   //MENU_ITEM(gcode, MSG_SET_ORIGIN, PSTR("G92 X0 Y0 Z0"));
638
   //MENU_ITEM(gcode, MSG_SET_ORIGIN, PSTR("G92 X0 Y0 Z0"));
607
 
639
 
640
+  //
641
+  // Level Bed
642
+  //
643
+  #ifdef ENABLE_AUTO_BED_LEVELING
644
+    if (axis_known_position[X_AXIS] && axis_known_position[Y_AXIS])
645
+      MENU_ITEM(gcode, MSG_LEVEL_BED, PSTR("G29"));
646
+  #elif defined(MANUAL_BED_LEVELING)
647
+    MENU_ITEM(submenu, MSG_LEVEL_BED, lcd_level_bed);
648
+  #endif
649
+
650
+  //
651
+  // Move Axis
652
+  //
653
+  MENU_ITEM(submenu, MSG_MOVE_AXIS, lcd_move_menu);
654
+
655
+  //
656
+  // Disable Steppers
657
+  //
658
+  MENU_ITEM(gcode, MSG_DISABLE_STEPPERS, PSTR("M84"));
659
+
660
+  //
661
+  // Preheat PLA
662
+  // Preheat ABS
663
+  //
608
   #if TEMP_SENSOR_0 != 0
664
   #if TEMP_SENSOR_0 != 0
609
     #if TEMP_SENSOR_1 != 0 || TEMP_SENSOR_2 != 0 || TEMP_SENSOR_3 != 0 || TEMP_SENSOR_BED != 0
665
     #if TEMP_SENSOR_1 != 0 || TEMP_SENSOR_2 != 0 || TEMP_SENSOR_3 != 0 || TEMP_SENSOR_BED != 0
610
       MENU_ITEM(submenu, MSG_PREHEAT_PLA, lcd_preheat_pla_menu);
666
       MENU_ITEM(submenu, MSG_PREHEAT_PLA, lcd_preheat_pla_menu);
615
     #endif
671
     #endif
616
   #endif
672
   #endif
617
 
673
 
674
+  //
675
+  // Cooldown
676
+  //
618
   MENU_ITEM(function, MSG_COOLDOWN, lcd_cooldown);
677
   MENU_ITEM(function, MSG_COOLDOWN, lcd_cooldown);
619
 
678
 
679
+  //
680
+  // Switch power on/off
681
+  //
620
   #if HAS_POWER_SWITCH
682
   #if HAS_POWER_SWITCH
621
     if (powersupply)
683
     if (powersupply)
622
       MENU_ITEM(gcode, MSG_SWITCH_PS_OFF, PSTR("M81"));
684
       MENU_ITEM(gcode, MSG_SWITCH_PS_OFF, PSTR("M81"));
624
       MENU_ITEM(gcode, MSG_SWITCH_PS_ON, PSTR("M80"));
686
       MENU_ITEM(gcode, MSG_SWITCH_PS_ON, PSTR("M80"));
625
   #endif
687
   #endif
626
 
688
 
627
-  MENU_ITEM(submenu, MSG_MOVE_AXIS, lcd_move_menu);
628
-
629
-  #if defined(MANUAL_BED_LEVELING)
630
-    MENU_ITEM(submenu, MSG_LEVEL_BED, lcd_level_bed);
689
+  //
690
+  // Autostart
691
+  //
692
+  #if defined(SDSUPPORT) && defined(MENU_ADDAUTOSTART)
693
+    MENU_ITEM(function, MSG_AUTOSTART, lcd_autostart_sd);
631
   #endif
694
   #endif
632
-	
695
+
633
   END_MENU();
696
   END_MENU();
634
 }
697
 }
635
 
698
 
648
 
711
 
649
 #endif // DELTA_CALIBRATION_MENU
712
 #endif // DELTA_CALIBRATION_MENU
650
 
713
 
651
-inline void line_to_current() {
714
+inline void line_to_current(AxisEnum axis) {
652
   #ifdef DELTA
715
   #ifdef DELTA
653
     calculate_delta(current_position);
716
     calculate_delta(current_position);
654
-    plan_buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], current_position[E_AXIS], manual_feedrate[X_AXIS]/60, active_extruder);
717
+    plan_buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], current_position[E_AXIS], manual_feedrate[axis]/60, active_extruder);
655
   #else
718
   #else
656
-    plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], manual_feedrate[X_AXIS]/60, active_extruder);
719
+    plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], manual_feedrate[axis]/60, active_extruder);
657
   #endif
720
   #endif
658
 }
721
 }
659
 
722
 
723
+/**
724
+ *
725
+ * "Prepare" > "Move Axis" submenu
726
+ *
727
+ */
728
+
660
 float move_menu_scale;
729
 float move_menu_scale;
661
 static void lcd_move_menu_axis();
730
 static void lcd_move_menu_axis();
662
 
731
 
663
-static void _lcd_move(const char *name, int axis, int min, int max) {
732
+static void _lcd_move(const char *name, AxisEnum axis, int min, int max) {
664
   if (encoderPosition != 0) {
733
   if (encoderPosition != 0) {
665
     refresh_cmd_timeout();
734
     refresh_cmd_timeout();
666
     current_position[axis] += float((int)encoderPosition) * move_menu_scale;
735
     current_position[axis] += float((int)encoderPosition) * move_menu_scale;
667
     if (min_software_endstops && current_position[axis] < min) current_position[axis] = min;
736
     if (min_software_endstops && current_position[axis] < min) current_position[axis] = min;
668
     if (max_software_endstops && current_position[axis] > max) current_position[axis] = max;
737
     if (max_software_endstops && current_position[axis] > max) current_position[axis] = max;
669
     encoderPosition = 0;
738
     encoderPosition = 0;
670
-    line_to_current();
739
+    line_to_current(axis);
671
     lcdDrawUpdate = 1;
740
     lcdDrawUpdate = 1;
672
   }
741
   }
673
   if (lcdDrawUpdate) lcd_implementation_drawedit(name, ftostr31(current_position[axis]));
742
   if (lcdDrawUpdate) lcd_implementation_drawedit(name, ftostr31(current_position[axis]));
680
   if (encoderPosition != 0) {
749
   if (encoderPosition != 0) {
681
     current_position[E_AXIS] += float((int)encoderPosition) * move_menu_scale;
750
     current_position[E_AXIS] += float((int)encoderPosition) * move_menu_scale;
682
     encoderPosition = 0;
751
     encoderPosition = 0;
683
-    line_to_current();
752
+    line_to_current(E_AXIS);
684
     lcdDrawUpdate = 1;
753
     lcdDrawUpdate = 1;
685
   }
754
   }
686
   if (lcdDrawUpdate) lcd_implementation_drawedit(PSTR("Extruder"), ftostr31(current_position[E_AXIS]));
755
   if (lcdDrawUpdate) lcd_implementation_drawedit(PSTR("Extruder"), ftostr31(current_position[E_AXIS]));
687
   if (LCD_CLICKED) lcd_goto_menu(lcd_move_menu_axis);
756
   if (LCD_CLICKED) lcd_goto_menu(lcd_move_menu_axis);
688
 }
757
 }
689
 
758
 
759
+/**
760
+ *
761
+ * "Prepare" > "Move Xmm" > "Move XYZ" submenu
762
+ *
763
+ */
764
+
690
 static void lcd_move_menu_axis() {
765
 static void lcd_move_menu_axis() {
691
   START_MENU();
766
   START_MENU();
692
   MENU_ITEM(back, MSG_MOVE_AXIS, lcd_move_menu);
767
   MENU_ITEM(back, MSG_MOVE_AXIS, lcd_move_menu);
712
   lcd_move_menu_axis();
787
   lcd_move_menu_axis();
713
 }
788
 }
714
 
789
 
790
+/**
791
+ *
792
+ * "Prepare" > "Move Axis" submenu
793
+ *
794
+ */
795
+
715
 static void lcd_move_menu() {
796
 static void lcd_move_menu() {
716
   START_MENU();
797
   START_MENU();
717
   MENU_ITEM(back, MSG_PREPARE, lcd_prepare_menu);
798
   MENU_ITEM(back, MSG_PREPARE, lcd_prepare_menu);
722
   END_MENU();
803
   END_MENU();
723
 }
804
 }
724
 
805
 
806
+/**
807
+ *
808
+ * "Control" submenu
809
+ *
810
+ */
811
+
725
 static void lcd_control_menu() {
812
 static void lcd_control_menu() {
726
   START_MENU();
813
   START_MENU();
727
   MENU_ITEM(back, MSG_MAIN, lcd_main_menu);
814
   MENU_ITEM(back, MSG_MAIN, lcd_main_menu);
744
   END_MENU();
831
   END_MENU();
745
 }
832
 }
746
 
833
 
834
+/**
835
+ *
836
+ * "Temperature" submenu
837
+ *
838
+ */
839
+
747
 #ifdef PIDTEMP
840
 #ifdef PIDTEMP
748
 
841
 
749
   // Helpers for editing PID Ki & Kd values
842
   // Helpers for editing PID Ki & Kd values
775
 
868
 
776
 #endif //PIDTEMP
869
 #endif //PIDTEMP
777
 
870
 
871
+/**
872
+ *
873
+ * "Control" > "Temperature" submenu
874
+ *
875
+ */
876
+
778
 static void lcd_control_temperature_menu() {
877
 static void lcd_control_temperature_menu() {
779
   START_MENU();
878
   START_MENU();
780
   MENU_ITEM(back, MSG_CONTROL, lcd_control_menu);
879
   MENU_ITEM(back, MSG_CONTROL, lcd_control_menu);
863
   END_MENU();
962
   END_MENU();
864
 }
963
 }
865
 
964
 
965
+/**
966
+ *
967
+ * "Temperature" > "Preheat PLA conf" submenu
968
+ *
969
+ */
970
+
866
 static void lcd_control_temperature_preheat_pla_settings_menu() {
971
 static void lcd_control_temperature_preheat_pla_settings_menu() {
867
   START_MENU();
972
   START_MENU();
868
   MENU_ITEM(back, MSG_TEMPERATURE, lcd_control_temperature_menu);
973
   MENU_ITEM(back, MSG_TEMPERATURE, lcd_control_temperature_menu);
869
   MENU_ITEM_EDIT(int3, MSG_FAN_SPEED, &plaPreheatFanSpeed, 0, 255);
974
   MENU_ITEM_EDIT(int3, MSG_FAN_SPEED, &plaPreheatFanSpeed, 0, 255);
870
   #if TEMP_SENSOR_0 != 0
975
   #if TEMP_SENSOR_0 != 0
871
-    MENU_ITEM_EDIT(int3, MSG_NOZZLE, &plaPreheatHotendTemp, 0, HEATER_0_MAXTEMP - 15);
976
+    MENU_ITEM_EDIT(int3, MSG_NOZZLE, &plaPreheatHotendTemp, HEATER_0_MINTEMP, HEATER_0_MAXTEMP - 15);
872
   #endif
977
   #endif
873
   #if TEMP_SENSOR_BED != 0
978
   #if TEMP_SENSOR_BED != 0
874
-    MENU_ITEM_EDIT(int3, MSG_BED, &plaPreheatHPBTemp, 0, BED_MAXTEMP - 15);
979
+    MENU_ITEM_EDIT(int3, MSG_BED, &plaPreheatHPBTemp, BED_MINTEMP, BED_MAXTEMP - 15);
875
   #endif
980
   #endif
876
   #ifdef EEPROM_SETTINGS
981
   #ifdef EEPROM_SETTINGS
877
     MENU_ITEM(function, MSG_STORE_EPROM, Config_StoreSettings);
982
     MENU_ITEM(function, MSG_STORE_EPROM, Config_StoreSettings);
879
   END_MENU();
984
   END_MENU();
880
 }
985
 }
881
 
986
 
987
+/**
988
+ *
989
+ * "Temperature" > "Preheat ABS conf" submenu
990
+ *
991
+ */
992
+
882
 static void lcd_control_temperature_preheat_abs_settings_menu() {
993
 static void lcd_control_temperature_preheat_abs_settings_menu() {
883
   START_MENU();
994
   START_MENU();
884
   MENU_ITEM(back, MSG_TEMPERATURE, lcd_control_temperature_menu);
995
   MENU_ITEM(back, MSG_TEMPERATURE, lcd_control_temperature_menu);
885
   MENU_ITEM_EDIT(int3, MSG_FAN_SPEED, &absPreheatFanSpeed, 0, 255);
996
   MENU_ITEM_EDIT(int3, MSG_FAN_SPEED, &absPreheatFanSpeed, 0, 255);
886
   #if TEMP_SENSOR_0 != 0
997
   #if TEMP_SENSOR_0 != 0
887
-    MENU_ITEM_EDIT(int3, MSG_NOZZLE, &absPreheatHotendTemp, 0, HEATER_0_MAXTEMP - 15);
998
+    MENU_ITEM_EDIT(int3, MSG_NOZZLE, &absPreheatHotendTemp, HEATER_0_MINTEMP, HEATER_0_MAXTEMP - 15);
888
   #endif
999
   #endif
889
   #if TEMP_SENSOR_BED != 0
1000
   #if TEMP_SENSOR_BED != 0
890
-    MENU_ITEM_EDIT(int3, MSG_BED, &absPreheatHPBTemp, 0, BED_MAXTEMP - 15);
1001
+    MENU_ITEM_EDIT(int3, MSG_BED, &absPreheatHPBTemp, BED_MINTEMP, BED_MAXTEMP - 15);
891
   #endif
1002
   #endif
892
   #ifdef EEPROM_SETTINGS
1003
   #ifdef EEPROM_SETTINGS
893
     MENU_ITEM(function, MSG_STORE_EPROM, Config_StoreSettings);
1004
     MENU_ITEM(function, MSG_STORE_EPROM, Config_StoreSettings);
895
   END_MENU();
1006
   END_MENU();
896
 }
1007
 }
897
 
1008
 
1009
+/**
1010
+ *
1011
+ * "Control" > "Motion" submenu
1012
+ *
1013
+ */
1014
+
898
 static void lcd_control_motion_menu() {
1015
 static void lcd_control_motion_menu() {
899
   START_MENU();
1016
   START_MENU();
900
   MENU_ITEM(back, MSG_CONTROL, lcd_control_menu);
1017
   MENU_ITEM(back, MSG_CONTROL, lcd_control_menu);
931
   END_MENU();
1048
   END_MENU();
932
 }
1049
 }
933
 
1050
 
1051
+/**
1052
+ *
1053
+ * "Control" > "Filament" submenu
1054
+ *
1055
+ */
1056
+
934
 static void lcd_control_volumetric_menu() {
1057
 static void lcd_control_volumetric_menu() {
935
   START_MENU();
1058
   START_MENU();
936
   MENU_ITEM(back, MSG_CONTROL, lcd_control_menu);
1059
   MENU_ITEM(back, MSG_CONTROL, lcd_control_menu);
953
   END_MENU();
1076
   END_MENU();
954
 }
1077
 }
955
 
1078
 
1079
+/**
1080
+ *
1081
+ * "Control" > "Contrast" submenu
1082
+ *
1083
+ */
1084
+
956
 #ifdef HAS_LCD_CONTRAST
1085
 #ifdef HAS_LCD_CONTRAST
957
   static void lcd_set_contrast() {
1086
   static void lcd_set_contrast() {
958
     if (encoderPosition != 0) {
1087
     if (encoderPosition != 0) {
967
   }
1096
   }
968
 #endif // HAS_LCD_CONTRAST
1097
 #endif // HAS_LCD_CONTRAST
969
 
1098
 
1099
+/**
1100
+ *
1101
+ * "Control" > "Retract" submenu
1102
+ *
1103
+ */
1104
+
970
 #ifdef FWRETRACT
1105
 #ifdef FWRETRACT
971
   static void lcd_control_retract_menu() {
1106
   static void lcd_control_retract_menu() {
972
     START_MENU();
1107
     START_MENU();
999
   currentMenuViewOffset = 0;
1134
   currentMenuViewOffset = 0;
1000
 }
1135
 }
1001
 
1136
 
1137
+/**
1138
+ *
1139
+ * "Print from SD" submenu
1140
+ *
1141
+ */
1142
+
1002
 void lcd_sdcard_menu() {
1143
 void lcd_sdcard_menu() {
1003
   if (lcdDrawUpdate == 0 && LCD_CLICKED == 0) return;	// nothing to do (so don't thrash the SD card)
1144
   if (lcdDrawUpdate == 0 && LCD_CLICKED == 0) return;	// nothing to do (so don't thrash the SD card)
1004
   uint16_t fileCnt = card.getnrfilenames();
1145
   uint16_t fileCnt = card.getnrfilenames();
1034
   END_MENU();
1175
   END_MENU();
1035
 }
1176
 }
1036
 
1177
 
1178
+/**
1179
+ *
1180
+ * Functions for editing single values
1181
+ *
1182
+ */
1037
 #define menu_edit_type(_type, _name, _strFunc, scale) \
1183
 #define menu_edit_type(_type, _name, _strFunc, scale) \
1038
   bool _menu_edit_ ## _name () { \
1184
   bool _menu_edit_ ## _name () { \
1039
     bool isClicked = LCD_CLICKED; \
1185
     bool isClicked = LCD_CLICKED; \
1080
 menu_edit_type(float, float52, ftostr52, 100)
1226
 menu_edit_type(float, float52, ftostr52, 100)
1081
 menu_edit_type(unsigned long, long5, ftostr5, 0.01)
1227
 menu_edit_type(unsigned long, long5, ftostr5, 0.01)
1082
 
1228
 
1229
+/**
1230
+ *
1231
+ * Handlers for RepRap World Keypad input
1232
+ *
1233
+ */
1083
 #ifdef REPRAPWORLD_KEYPAD
1234
 #ifdef REPRAPWORLD_KEYPAD
1084
   static void reprapworld_keypad_move_z_up() {
1235
   static void reprapworld_keypad_move_z_up() {
1085
     encoderPosition = 1;
1236
     encoderPosition = 1;
1114
   static void reprapworld_keypad_move_home() {
1265
   static void reprapworld_keypad_move_home() {
1115
     enqueuecommands_P((PSTR("G28"))); // move all axis home
1266
     enqueuecommands_P((PSTR("G28"))); // move all axis home
1116
   }
1267
   }
1117
-#endif //REPRAPWORLD_KEYPAD
1268
+#endif // REPRAPWORLD_KEYPAD
1118
 
1269
 
1119
-/** End of menus **/
1120
 
1270
 
1271
+/**
1272
+ *
1273
+ * Audio feedback for controller clicks
1274
+ *
1275
+ */
1121
 void lcd_quick_feedback() {
1276
 void lcd_quick_feedback() {
1122
   lcdDrawUpdate = 2;
1277
   lcdDrawUpdate = 2;
1123
   next_button_update_ms = millis() + 500;
1278
   next_button_update_ms = millis() + 500;
1130
       #define LCD_FEEDBACK_FREQUENCY_DURATION_MS (1000/6)
1285
       #define LCD_FEEDBACK_FREQUENCY_DURATION_MS (1000/6)
1131
     #endif    
1286
     #endif    
1132
     lcd_buzz(LCD_FEEDBACK_FREQUENCY_DURATION_MS, LCD_FEEDBACK_FREQUENCY_HZ);
1287
     lcd_buzz(LCD_FEEDBACK_FREQUENCY_DURATION_MS, LCD_FEEDBACK_FREQUENCY_HZ);
1133
-  #elif defined(BEEPER) && BEEPER > -1
1134
-    SET_OUTPUT(BEEPER);
1288
+  #elif defined(BEEPER) && BEEPER >= 0
1135
     #ifndef LCD_FEEDBACK_FREQUENCY_HZ
1289
     #ifndef LCD_FEEDBACK_FREQUENCY_HZ
1136
       #define LCD_FEEDBACK_FREQUENCY_HZ 5000
1290
       #define LCD_FEEDBACK_FREQUENCY_HZ 5000
1137
     #endif
1291
     #endif
1138
     #ifndef LCD_FEEDBACK_FREQUENCY_DURATION_MS
1292
     #ifndef LCD_FEEDBACK_FREQUENCY_DURATION_MS
1139
       #define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
1293
       #define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
1140
     #endif
1294
     #endif
1141
-    const uint16_t delay = 1000000 / LCD_FEEDBACK_FREQUENCY_HZ / 2;
1142
-    uint16_t i = LCD_FEEDBACK_FREQUENCY_DURATION_MS * LCD_FEEDBACK_FREQUENCY_HZ / 1000;
1143
-    while (i--) {
1144
-      WRITE(BEEPER,HIGH);
1145
-      delayMicroseconds(delay);
1146
-      WRITE(BEEPER,LOW);
1147
-      delayMicroseconds(delay);
1148
-    }
1149
-    const uint16_t j = max(10000 - LCD_FEEDBACK_FREQUENCY_DURATION_MS * 1000, 0);
1150
-    if (j) delayMicroseconds(j);
1295
+    lcd_buzz(LCD_FEEDBACK_FREQUENCY_DURATION_MS, LCD_FEEDBACK_FREQUENCY_HZ);
1296
+  #else
1297
+    #ifndef LCD_FEEDBACK_FREQUENCY_DURATION_MS
1298
+      #define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
1299
+    #endif
1300
+    delay(LCD_FEEDBACK_FREQUENCY_DURATION_MS);
1151
   #endif
1301
   #endif
1152
 }
1302
 }
1153
 
1303
 
1154
-/** Menu action functions **/
1155
-static void menu_action_back(menuFunc_t data) { lcd_goto_menu(data); }
1156
-static void menu_action_submenu(menuFunc_t data) { lcd_goto_menu(data); }
1304
+/**
1305
+ *
1306
+ * Menu actions
1307
+ *
1308
+ */
1309
+static void menu_action_back(menuFunc_t func) { lcd_goto_menu(func); }
1310
+static void menu_action_submenu(menuFunc_t func) { lcd_goto_menu(func); }
1157
 static void menu_action_gcode(const char* pgcode) { enqueuecommands_P(pgcode); }
1311
 static void menu_action_gcode(const char* pgcode) { enqueuecommands_P(pgcode); }
1158
-static void menu_action_function(menuFunc_t data) { (*data)(); }
1312
+static void menu_action_function(menuFunc_t func) { (*func)(); }
1159
 static void menu_action_sdfile(const char* filename, char* longFilename) {
1313
 static void menu_action_sdfile(const char* filename, char* longFilename) {
1160
   char cmd[30];
1314
   char cmd[30];
1161
   char* c;
1315
   char* c;
1248
   return j;
1402
   return j;
1249
 }
1403
 }
1250
 
1404
 
1405
+/**
1406
+ * Update the LCD, read encoder buttons, etc.
1407
+ *   - Read button states
1408
+ *   - Check the SD Card slot state
1409
+ *   - Act on RepRap World keypad input
1410
+ *   - Update the encoder position
1411
+ *   - Apply acceleration to the encoder position
1412
+ *   - Reset the Info Screen timeout if there's any input
1413
+ *   - Update status indicators, if any
1414
+ *   - Clear the LCD if lcdDrawUpdate == 2
1415
+ *
1416
+ * Warning: This function is called from interrupt context!
1417
+ */
1251
 void lcd_update() {
1418
 void lcd_update() {
1252
   #ifdef ULTIPANEL
1419
   #ifdef ULTIPANEL
1253
     static millis_t return_to_status_ms = 0;
1420
     static millis_t return_to_status_ms = 0;
1386
 
1553
 
1387
     if (lcdDrawUpdate == 2) lcd_implementation_clear();
1554
     if (lcdDrawUpdate == 2) lcd_implementation_clear();
1388
     if (lcdDrawUpdate) lcdDrawUpdate--;
1555
     if (lcdDrawUpdate) lcdDrawUpdate--;
1389
-    next_lcd_update_ms = millis() + LCD_UPDATE_INTERVAL;
1556
+    next_lcd_update_ms = ms + LCD_UPDATE_INTERVAL;
1390
   }
1557
   }
1391
 }
1558
 }
1392
 
1559
 
1397
 
1564
 
1398
 void lcd_finishstatus(bool persist=false) {
1565
 void lcd_finishstatus(bool persist=false) {
1399
   #ifdef LCD_PROGRESS_BAR
1566
   #ifdef LCD_PROGRESS_BAR
1400
-    progressBarTick = millis();
1567
+    progress_bar_ms = millis();
1401
     #if PROGRESS_MSG_EXPIRE > 0
1568
     #if PROGRESS_MSG_EXPIRE > 0
1402
-      expireStatusMillis = persist ? 0 : progressBarTick + PROGRESS_MSG_EXPIRE;
1569
+      expire_status_ms = persist ? 0 : progress_bar_ms + PROGRESS_MSG_EXPIRE;
1403
     #endif
1570
     #endif
1404
   #endif
1571
   #endif
1405
   lcdDrawUpdate = 2;
1572
   lcdDrawUpdate = 2;
1410
 }
1577
 }
1411
 
1578
 
1412
 #if defined(LCD_PROGRESS_BAR) && PROGRESS_MSG_EXPIRE > 0
1579
 #if defined(LCD_PROGRESS_BAR) && PROGRESS_MSG_EXPIRE > 0
1413
-  void dontExpireStatus() { expireStatusMillis = 0; }
1580
+  void dontExpireStatus() { expire_status_ms = 0; }
1414
 #endif
1581
 #endif
1415
 
1582
 
1416
 void set_utf_strlen(char *s, uint8_t n) {
1583
 void set_utf_strlen(char *s, uint8_t n) {
1423
   s[i] = 0;
1590
   s[i] = 0;
1424
 }
1591
 }
1425
 
1592
 
1593
+bool lcd_hasstatus() { return (lcd_status_message[0] != '\0'); }
1594
+
1426
 void lcd_setstatus(const char* message, bool persist) {
1595
 void lcd_setstatus(const char* message, bool persist) {
1427
   if (lcd_status_message_level > 0) return;
1596
   if (lcd_status_message_level > 0) return;
1428
   strncpy(lcd_status_message, message, 3*LCD_WIDTH);
1597
   strncpy(lcd_status_message, message, 3*LCD_WIDTH);
1457
 
1626
 
1458
 #ifdef ULTIPANEL
1627
 #ifdef ULTIPANEL
1459
 
1628
 
1460
-////////////////////////
1461
-// Setup Rotary Encoder Bit Values (for two pin encoders to indicate movement)
1462
-// These values are independent of which pins are used for EN_A and EN_B indications
1463
-// The rotary encoder part is also independent to the chipset used for the LCD
1464
-#if defined(EN_A) && defined(EN_B)
1465
-  #define encrot0 0
1466
-  #define encrot1 2
1467
-  #define encrot2 3
1468
-  #define encrot3 1
1469
-#endif 
1470
-
1471
-/* Warning: This function is called from interrupt context */
1472
-void lcd_buttons_update() {
1473
-  #ifdef NEWPANEL
1474
-    uint8_t newbutton = 0;
1475
-    if (READ(BTN_EN1) == 0) newbutton |= EN_A;
1476
-    if (READ(BTN_EN2) == 0) newbutton |= EN_B;
1477
-    #if BTN_ENC > 0
1478
-      if (millis() > next_button_update_ms && READ(BTN_ENC) == 0) newbutton |= EN_C;
1479
-    #endif
1480
-    buttons = newbutton;
1481
-    #ifdef LCD_HAS_SLOW_BUTTONS
1482
-      buttons |= slow_buttons;
1483
-    #endif
1484
-    #ifdef REPRAPWORLD_KEYPAD
1485
-      // for the reprapworld_keypad
1486
-      uint8_t newbutton_reprapworld_keypad=0;
1629
+  /**
1630
+   * Setup Rotary Encoder Bit Values (for two pin encoders to indicate movement)
1631
+   * These values are independent of which pins are used for EN_A and EN_B indications
1632
+   * The rotary encoder part is also independent to the chipset used for the LCD
1633
+   */
1634
+  #if defined(EN_A) && defined(EN_B)
1635
+    #define encrot0 0
1636
+    #define encrot1 2
1637
+    #define encrot2 3
1638
+    #define encrot3 1
1639
+  #endif 
1640
+
1641
+  /**
1642
+   * Read encoder buttons from the hardware registers
1643
+   * Warning: This function is called from interrupt context!
1644
+   */
1645
+  void lcd_buttons_update() {
1646
+    #ifdef NEWPANEL
1647
+      uint8_t newbutton = 0;
1648
+      if (READ(BTN_EN1) == 0) newbutton |= EN_A;
1649
+      if (READ(BTN_EN2) == 0) newbutton |= EN_B;
1650
+      #if BTN_ENC > 0
1651
+        if (millis() > next_button_update_ms && READ(BTN_ENC) == 0) newbutton |= EN_C;
1652
+      #endif
1653
+      buttons = newbutton;
1654
+      #ifdef LCD_HAS_SLOW_BUTTONS
1655
+        buttons |= slow_buttons;
1656
+      #endif
1657
+      #ifdef REPRAPWORLD_KEYPAD
1658
+        // for the reprapworld_keypad
1659
+        uint8_t newbutton_reprapworld_keypad=0;
1660
+        WRITE(SHIFT_LD, LOW);
1661
+        WRITE(SHIFT_LD, HIGH);
1662
+        for(int8_t i = 0; i < 8; i++) {
1663
+          newbutton_reprapworld_keypad >>= 1;
1664
+          if (READ(SHIFT_OUT)) newbutton_reprapworld_keypad |= BIT(7);
1665
+          WRITE(SHIFT_CLK, HIGH);
1666
+          WRITE(SHIFT_CLK, LOW);
1667
+        }
1668
+        buttons_reprapworld_keypad=~newbutton_reprapworld_keypad; //invert it, because a pressed switch produces a logical 0
1669
+      #endif
1670
+    #else   //read it from the shift register
1671
+      uint8_t newbutton = 0;
1487
       WRITE(SHIFT_LD, LOW);
1672
       WRITE(SHIFT_LD, LOW);
1488
       WRITE(SHIFT_LD, HIGH);
1673
       WRITE(SHIFT_LD, HIGH);
1489
-      for(int8_t i = 0; i < 8; i++) {
1490
-        newbutton_reprapworld_keypad >>= 1;
1491
-        if (READ(SHIFT_OUT)) newbutton_reprapworld_keypad |= BIT(7);
1674
+      unsigned char tmp_buttons = 0;
1675
+      for(int8_t i=0; i<8; i++) {
1676
+        newbutton >>= 1;
1677
+        if (READ(SHIFT_OUT)) newbutton |= BIT(7);
1492
         WRITE(SHIFT_CLK, HIGH);
1678
         WRITE(SHIFT_CLK, HIGH);
1493
         WRITE(SHIFT_CLK, LOW);
1679
         WRITE(SHIFT_CLK, LOW);
1494
       }
1680
       }
1495
-      buttons_reprapworld_keypad=~newbutton_reprapworld_keypad; //invert it, because a pressed switch produces a logical 0
1496
-    #endif
1497
-  #else   //read it from the shift register
1498
-    uint8_t newbutton = 0;
1499
-    WRITE(SHIFT_LD, LOW);
1500
-    WRITE(SHIFT_LD, HIGH);
1501
-    unsigned char tmp_buttons = 0;
1502
-    for(int8_t i=0; i<8; i++) {
1503
-      newbutton >>= 1;
1504
-      if (READ(SHIFT_OUT)) newbutton |= BIT(7);
1505
-      WRITE(SHIFT_CLK, HIGH);
1506
-      WRITE(SHIFT_CLK, LOW);
1507
-    }
1508
-    buttons = ~newbutton; //invert it, because a pressed switch produces a logical 0
1509
-  #endif //!NEWPANEL
1510
-
1511
-  //manage encoder rotation
1512
-  uint8_t enc=0;
1513
-  if (buttons & EN_A) enc |= B01;
1514
-  if (buttons & EN_B) enc |= B10;
1515
-  if (enc != lastEncoderBits) {
1516
-    switch(enc) {
1517
-      case encrot0:
1518
-        if (lastEncoderBits==encrot3) encoderDiff++;
1519
-        else if (lastEncoderBits==encrot1) encoderDiff--;
1520
-        break;
1521
-      case encrot1:
1522
-        if (lastEncoderBits==encrot0) encoderDiff++;
1523
-        else if (lastEncoderBits==encrot2) encoderDiff--;
1524
-        break;
1525
-      case encrot2:
1526
-        if (lastEncoderBits==encrot1) encoderDiff++;
1527
-        else if (lastEncoderBits==encrot3) encoderDiff--;
1528
-        break;
1529
-      case encrot3:
1530
-        if (lastEncoderBits==encrot2) encoderDiff++;
1531
-        else if (lastEncoderBits==encrot0) encoderDiff--;
1532
-        break;
1681
+      buttons = ~newbutton; //invert it, because a pressed switch produces a logical 0
1682
+    #endif //!NEWPANEL
1683
+
1684
+    //manage encoder rotation
1685
+    uint8_t enc=0;
1686
+    if (buttons & EN_A) enc |= B01;
1687
+    if (buttons & EN_B) enc |= B10;
1688
+    if (enc != lastEncoderBits) {
1689
+      switch(enc) {
1690
+        case encrot0:
1691
+          if (lastEncoderBits==encrot3) encoderDiff++;
1692
+          else if (lastEncoderBits==encrot1) encoderDiff--;
1693
+          break;
1694
+        case encrot1:
1695
+          if (lastEncoderBits==encrot0) encoderDiff++;
1696
+          else if (lastEncoderBits==encrot2) encoderDiff--;
1697
+          break;
1698
+        case encrot2:
1699
+          if (lastEncoderBits==encrot1) encoderDiff++;
1700
+          else if (lastEncoderBits==encrot3) encoderDiff--;
1701
+          break;
1702
+        case encrot3:
1703
+          if (lastEncoderBits==encrot2) encoderDiff++;
1704
+          else if (lastEncoderBits==encrot0) encoderDiff--;
1705
+          break;
1706
+      }
1533
     }
1707
     }
1708
+    lastEncoderBits = enc;
1534
   }
1709
   }
1535
-  lastEncoderBits = enc;
1536
-}
1537
 
1710
 
1538
-bool lcd_detected(void) {
1539
-  #if (defined(LCD_I2C_TYPE_MCP23017) || defined(LCD_I2C_TYPE_MCP23008)) && defined(DETECT_DEVICE)
1540
-    return lcd.LcdDetected() == 1;
1541
-  #else
1542
-    return true;
1543
-  #endif
1544
-}
1711
+  bool lcd_detected(void) {
1712
+    #if (defined(LCD_I2C_TYPE_MCP23017) || defined(LCD_I2C_TYPE_MCP23008)) && defined(DETECT_DEVICE)
1713
+      return lcd.LcdDetected() == 1;
1714
+    #else
1715
+      return true;
1716
+    #endif
1717
+  }
1545
 
1718
 
1546
-void lcd_buzz(long duration, uint16_t freq) {
1547
-  #ifdef LCD_USE_I2C_BUZZER
1548
-    lcd.buzz(duration,freq);
1549
-  #endif
1550
-}
1719
+  void lcd_buzz(long duration, uint16_t freq) {
1720
+    if (freq > 0) {
1721
+      #ifdef LCD_USE_I2C_BUZZER
1722
+        lcd.buzz(duration, freq);
1723
+      #elif defined(BEEPER) && BEEPER >= 0
1724
+        SET_OUTPUT(BEEPER);
1725
+        tone(BEEPER, freq, duration);
1726
+        delay(duration);
1727
+      #else
1728
+        delay(duration);
1729
+      #endif
1730
+    }
1731
+    else {
1732
+      delay(duration);
1733
+    }
1734
+  }
1551
 
1735
 
1552
-bool lcd_clicked() { return LCD_CLICKED; }
1736
+  bool lcd_clicked() { return LCD_CLICKED; }
1553
 
1737
 
1554
-#endif //ULTIPANEL
1738
+#endif // ULTIPANEL
1555
 
1739
 
1556
 /*********************************/
1740
 /*********************************/
1557
 /** Number to string conversion **/
1741
 /** Number to string conversion **/
1613
 }
1797
 }
1614
 
1798
 
1615
 // Convert float to string with 1.234 format
1799
 // Convert float to string with 1.234 format
1616
-char *ftostr43(const float &x)
1617
-{
1800
+char *ftostr43(const float &x) {
1618
 	long xx = x * 1000;
1801
 	long xx = x * 1000;
1619
     if (xx >= 0)
1802
     if (xx >= 0)
1620
 		conv[0] = (xx / 1000) % 10 + '0';
1803
 		conv[0] = (xx / 1000) % 10 + '0';
1630
 }
1813
 }
1631
 
1814
 
1632
 // Convert float to string with 1.23 format
1815
 // Convert float to string with 1.23 format
1633
-char *ftostr12ns(const float &x)
1634
-{
1816
+char *ftostr12ns(const float &x) {
1635
   long xx=x*100;
1817
   long xx=x*100;
1636
   
1818
   
1637
   xx=abs(xx);
1819
   xx=abs(xx);
1791
 #ifdef MANUAL_BED_LEVELING
1973
 #ifdef MANUAL_BED_LEVELING
1792
 
1974
 
1793
   static int _lcd_level_bed_position;
1975
   static int _lcd_level_bed_position;
1976
+
1977
+  /**
1978
+   * MBL Wait for controller movement and clicks:
1979
+   *   - Movement adjusts the Z axis
1980
+   *   - Click saves the Z and goes to the next mesh point
1981
+   */
1794
   static void _lcd_level_bed() {
1982
   static void _lcd_level_bed() {
1795
     if (encoderPosition != 0) {
1983
     if (encoderPosition != 0) {
1796
       refresh_cmd_timeout();
1984
       refresh_cmd_timeout();
1798
       if (min_software_endstops && current_position[Z_AXIS] < Z_MIN_POS) current_position[Z_AXIS] = Z_MIN_POS;
1986
       if (min_software_endstops && current_position[Z_AXIS] < Z_MIN_POS) current_position[Z_AXIS] = Z_MIN_POS;
1799
       if (max_software_endstops && current_position[Z_AXIS] > Z_MAX_POS) current_position[Z_AXIS] = Z_MAX_POS;
1987
       if (max_software_endstops && current_position[Z_AXIS] > Z_MAX_POS) current_position[Z_AXIS] = Z_MAX_POS;
1800
       encoderPosition = 0;
1988
       encoderPosition = 0;
1801
-      line_to_current();
1989
+      line_to_current(Z_AXIS);
1802
       lcdDrawUpdate = 2;
1990
       lcdDrawUpdate = 2;
1803
     }
1991
     }
1804
     if (lcdDrawUpdate) lcd_implementation_drawedit(PSTR("Z"), ftostr43(current_position[Z_AXIS]));
1992
     if (lcdDrawUpdate) lcd_implementation_drawedit(PSTR("Z"), ftostr43(current_position[Z_AXIS]));
1806
     if (LCD_CLICKED) {
1994
     if (LCD_CLICKED) {
1807
       if (!debounce_click) {
1995
       if (!debounce_click) {
1808
         debounce_click = true;
1996
         debounce_click = true;
1809
-        int ix = _lcd_level_bed_position % MESH_NUM_X_POINTS;
1810
-        int iy = _lcd_level_bed_position / MESH_NUM_X_POINTS;
1811
-        if (iy&1) { // Zig zag
1812
-          ix = (MESH_NUM_X_POINTS - 1) - ix;
1813
-        }
1997
+        int ix = _lcd_level_bed_position % MESH_NUM_X_POINTS,
1998
+            iy = _lcd_level_bed_position / MESH_NUM_X_POINTS;
1999
+        if (iy & 1) ix = (MESH_NUM_X_POINTS - 1) - ix; // Zig zag
1814
         mbl.set_z(ix, iy, current_position[Z_AXIS]);
2000
         mbl.set_z(ix, iy, current_position[Z_AXIS]);
1815
         _lcd_level_bed_position++;
2001
         _lcd_level_bed_position++;
1816
         if (_lcd_level_bed_position == MESH_NUM_X_POINTS*MESH_NUM_Y_POINTS) {
2002
         if (_lcd_level_bed_position == MESH_NUM_X_POINTS*MESH_NUM_Y_POINTS) {
1817
           current_position[Z_AXIS] = MESH_HOME_SEARCH_Z;
2003
           current_position[Z_AXIS] = MESH_HOME_SEARCH_Z;
1818
-          line_to_current();
2004
+          line_to_current(Z_AXIS);
1819
           mbl.active = 1;
2005
           mbl.active = 1;
1820
           enqueuecommands_P(PSTR("G28"));
2006
           enqueuecommands_P(PSTR("G28"));
1821
           lcd_return_to_status();
2007
           lcd_return_to_status();
1822
-        } else {
2008
+        }
2009
+        else {
1823
           current_position[Z_AXIS] = MESH_HOME_SEARCH_Z;
2010
           current_position[Z_AXIS] = MESH_HOME_SEARCH_Z;
1824
-          line_to_current();
2011
+          line_to_current(Z_AXIS);
1825
           ix = _lcd_level_bed_position % MESH_NUM_X_POINTS;
2012
           ix = _lcd_level_bed_position % MESH_NUM_X_POINTS;
1826
           iy = _lcd_level_bed_position / MESH_NUM_X_POINTS;
2013
           iy = _lcd_level_bed_position / MESH_NUM_X_POINTS;
1827
-          if (iy&1) { // Zig zag
1828
-            ix = (MESH_NUM_X_POINTS - 1) - ix;
1829
-          }
2014
+          if (iy & 1) ix = (MESH_NUM_X_POINTS - 1) - ix; // Zig zag
1830
           current_position[X_AXIS] = mbl.get_x(ix);
2015
           current_position[X_AXIS] = mbl.get_x(ix);
1831
           current_position[Y_AXIS] = mbl.get_y(iy);
2016
           current_position[Y_AXIS] = mbl.get_y(iy);
1832
-          line_to_current();
2017
+          line_to_current(manual_feedrate[X_AXIS] <= manual_feedrate[Y_AXIS] ? X_AXIS : Y_AXIS);
1833
           lcdDrawUpdate = 2;
2018
           lcdDrawUpdate = 2;
1834
         }
2019
         }
1835
       }
2020
       }
1836
-    } else {
2021
+    }
2022
+    else {
1837
       debounce_click = false;
2023
       debounce_click = false;
1838
     }
2024
     }
1839
   }
2025
   }
1840
 
2026
 
2027
+  /**
2028
+   * MBL Move to mesh starting point
2029
+   */
1841
   static void _lcd_level_bed_homing() {
2030
   static void _lcd_level_bed_homing() {
1842
     if (lcdDrawUpdate) lcd_implementation_drawedit(PSTR("XYZ"), "Homing");
2031
     if (lcdDrawUpdate) lcd_implementation_drawedit(PSTR("XYZ"), "Homing");
1843
-    if (axis_known_position[X_AXIS] &&
1844
-        axis_known_position[Y_AXIS] &&
1845
-        axis_known_position[Z_AXIS]) {
2032
+    if (axis_known_position[X_AXIS] && axis_known_position[Y_AXIS] && axis_known_position[Z_AXIS]) {
1846
       current_position[Z_AXIS] = MESH_HOME_SEARCH_Z;
2033
       current_position[Z_AXIS] = MESH_HOME_SEARCH_Z;
1847
       plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
2034
       plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
1848
       current_position[X_AXIS] = MESH_MIN_X;
2035
       current_position[X_AXIS] = MESH_MIN_X;
1849
       current_position[Y_AXIS] = MESH_MIN_Y;
2036
       current_position[Y_AXIS] = MESH_MIN_Y;
1850
-      line_to_current();
2037
+      line_to_current(manual_feedrate[X_AXIS] <= manual_feedrate[Y_AXIS] ? X_AXIS : Y_AXIS);
1851
       _lcd_level_bed_position = 0;
2038
       _lcd_level_bed_position = 0;
1852
       lcd_goto_menu(_lcd_level_bed);
2039
       lcd_goto_menu(_lcd_level_bed);
1853
     }
2040
     }
1854
     lcdDrawUpdate = 2;
2041
     lcdDrawUpdate = 2;
1855
   }
2042
   }
1856
 
2043
 
2044
+  /**
2045
+   * MBL entry-point
2046
+   */
1857
   static void lcd_level_bed() {
2047
   static void lcd_level_bed() {
1858
-    axis_known_position[X_AXIS] = false;
1859
-    axis_known_position[Y_AXIS] = false;
1860
-    axis_known_position[Z_AXIS] = false;
2048
+    axis_known_position[X_AXIS] = axis_known_position[Y_AXIS] = axis_known_position[Z_AXIS] = false;
1861
     mbl.reset();
2049
     mbl.reset();
1862
     enqueuecommands_P(PSTR("G28"));
2050
     enqueuecommands_P(PSTR("G28"));
1863
     lcdDrawUpdate = 2;
2051
     lcdDrawUpdate = 2;

+ 5
- 3
Marlin/ultralcd.h View File

8
   int lcd_strlen_P(const char *s);
8
   int lcd_strlen_P(const char *s);
9
   void lcd_update();
9
   void lcd_update();
10
   void lcd_init();
10
   void lcd_init();
11
+  bool lcd_hasstatus();
11
   void lcd_setstatus(const char* message, const bool persist=false);
12
   void lcd_setstatus(const char* message, const bool persist=false);
12
   void lcd_setstatuspgm(const char* message, const uint8_t level=0);
13
   void lcd_setstatuspgm(const char* message, const uint8_t level=0);
13
   void lcd_setalertstatuspgm(const char* message);
14
   void lcd_setalertstatuspgm(const char* message);
100
 #else //no LCD
101
 #else //no LCD
101
   FORCE_INLINE void lcd_update() {}
102
   FORCE_INLINE void lcd_update() {}
102
   FORCE_INLINE void lcd_init() {}
103
   FORCE_INLINE void lcd_init() {}
104
+  FORCE_INLINE bool lcd_hasstatus() { return false; }
103
   FORCE_INLINE void lcd_setstatus(const char* message, const bool persist=false) {}
105
   FORCE_INLINE void lcd_setstatus(const char* message, const bool persist=false) {}
104
   FORCE_INLINE void lcd_setstatuspgm(const char* message, const uint8_t level=0) {}
106
   FORCE_INLINE void lcd_setstatuspgm(const char* message, const uint8_t level=0) {}
105
   FORCE_INLINE void lcd_buttons_update() {}
107
   FORCE_INLINE void lcd_buttons_update() {}
106
   FORCE_INLINE void lcd_reset_alert_level() {}
108
   FORCE_INLINE void lcd_reset_alert_level() {}
107
-  FORCE_INLINE void lcd_buzz(long duration,uint16_t freq) {}
109
+  FORCE_INLINE void lcd_buzz(long duration, uint16_t freq) {}
108
   FORCE_INLINE bool lcd_detected(void) { return true; }
110
   FORCE_INLINE bool lcd_detected(void) { return true; }
109
 
111
 
110
-  #define LCD_MESSAGEPGM(x) 
111
-  #define LCD_ALERTMESSAGEPGM(x) 
112
+  #define LCD_MESSAGEPGM(x) do{}while(0)
113
+  #define LCD_ALERTMESSAGEPGM(x) do{}while(0)
112
 
114
 
113
 #endif //ULTRA_LCD
115
 #endif //ULTRA_LCD
114
 
116
 

+ 5
- 4
Marlin/ultralcd_implementation_hitachi_HD44780.h View File

194
 #include "utf_mapper.h"
194
 #include "utf_mapper.h"
195
 
195
 
196
 #ifdef LCD_PROGRESS_BAR
196
 #ifdef LCD_PROGRESS_BAR
197
-  static uint16_t progressBarTick = 0;
197
+  static millis_t progress_bar_ms = 0;
198
   #if PROGRESS_MSG_EXPIRE > 0
198
   #if PROGRESS_MSG_EXPIRE > 0
199
-    static uint16_t expireStatusMillis = 0;
199
+    static millis_t expire_status_ms = 0;
200
   #endif
200
   #endif
201
   #define LCD_STR_PROGRESS  "\x03\x04\x05"
201
   #define LCD_STR_PROGRESS  "\x03\x04\x05"
202
 #endif
202
 #endif
588
   #ifdef LCD_PROGRESS_BAR
588
   #ifdef LCD_PROGRESS_BAR
589
 
589
 
590
     if (card.isFileOpen()) {
590
     if (card.isFileOpen()) {
591
-      if (millis() >= progressBarTick + PROGRESS_BAR_MSG_TIME || !lcd_status_message[0]) {
592
-        // draw the progress bar
591
+      // Draw the progress bar if the message has shown long enough
592
+      // or if there is no message set.
593
+      if (millis() >= progress_bar_ms + PROGRESS_BAR_MSG_TIME || !lcd_status_message[0]) {
593
         int tix = (int)(card.percentDone() * LCD_WIDTH * 3) / 100,
594
         int tix = (int)(card.percentDone() * LCD_WIDTH * 3) / 100,
594
           cel = tix / 3, rem = tix % 3, i = LCD_WIDTH;
595
           cel = tix / 3, rem = tix % 3, i = LCD_WIDTH;
595
         char msg[LCD_WIDTH+1], b = ' ';
596
         char msg[LCD_WIDTH+1], b = ' ';

+ 7
- 7
Marlin/ultralcd_st7920_u8glib_rrd.h View File

16
 //#define PAGE_HEIGHT 16  //256 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
20
-#define HEIGHT 64
19
+#define LCD_PIXEL_WIDTH 128
20
+#define LCD_PIXEL_HEIGHT 64
21
 
21
 
22
 #include <U8glib.h>
22
 #include <U8glib.h>
23
 
23
 
64
         ST7920_WRITE_BYTE(0x01);       //clear CGRAM ram
64
         ST7920_WRITE_BYTE(0x01);       //clear CGRAM ram
65
         u8g_Delay(15);                 //delay for CGRAM clear
65
         u8g_Delay(15);                 //delay for CGRAM clear
66
         ST7920_WRITE_BYTE(0x3E);       //extended mode + GDRAM active
66
         ST7920_WRITE_BYTE(0x3E);       //extended mode + GDRAM active
67
-        for(y=0;y<HEIGHT/2;y++)        //clear GDRAM
67
+        for(y=0;y<LCD_PIXEL_HEIGHT/2;y++)        //clear GDRAM
68
         {
68
         {
69
           ST7920_WRITE_BYTE(0x80|y);   //set y
69
           ST7920_WRITE_BYTE(0x80|y);   //set y
70
           ST7920_WRITE_BYTE(0x80);     //set x = 0
70
           ST7920_WRITE_BYTE(0x80);     //set x = 0
71
           ST7920_SET_DAT();
71
           ST7920_SET_DAT();
72
-          for(i=0;i<2*WIDTH/8;i++)     //2x width clears both segments
72
+          for(i=0;i<2*LCD_PIXEL_WIDTH/8;i++)     //2x width clears both segments
73
             ST7920_WRITE_BYTE(0);
73
             ST7920_WRITE_BYTE(0);
74
           ST7920_SET_CMD();
74
           ST7920_SET_CMD();
75
         }
75
         }
103
           }
103
           }
104
 
104
 
105
           ST7920_SET_DAT();
105
           ST7920_SET_DAT();
106
-          ST7920_WRITE_BYTES(ptr,WIDTH/8); //ptr is incremented inside of macro
106
+          ST7920_WRITE_BYTES(ptr,LCD_PIXEL_WIDTH/8); //ptr is incremented inside of macro
107
           y++;
107
           y++;
108
         }
108
         }
109
         ST7920_NCS();
109
         ST7920_NCS();
119
 #endif
119
 #endif
120
 }
120
 }
121
 
121
 
122
-uint8_t   u8g_dev_st7920_128x64_rrd_buf[WIDTH*(PAGE_HEIGHT/8)] U8G_NOCOMMON;
123
-u8g_pb_t  u8g_dev_st7920_128x64_rrd_pb = {{PAGE_HEIGHT,HEIGHT,0,0,0},WIDTH,u8g_dev_st7920_128x64_rrd_buf};
122
+uint8_t   u8g_dev_st7920_128x64_rrd_buf[LCD_PIXEL_WIDTH*(PAGE_HEIGHT/8)] U8G_NOCOMMON;
123
+u8g_pb_t  u8g_dev_st7920_128x64_rrd_pb = {{PAGE_HEIGHT,LCD_PIXEL_HEIGHT,0,0,0},LCD_PIXEL_WIDTH,u8g_dev_st7920_128x64_rrd_buf};
124
 u8g_dev_t u8g_dev_st7920_128x64_rrd_sw_spi = {u8g_dev_rrd_st7920_128x64_fn,&u8g_dev_st7920_128x64_rrd_pb,&u8g_com_null_fn};
124
 u8g_dev_t u8g_dev_st7920_128x64_rrd_sw_spi = {u8g_dev_rrd_st7920_128x64_fn,&u8g_dev_st7920_128x64_rrd_pb,&u8g_com_null_fn};
125
 
125
 
126
 class U8GLIB_ST7920_128X64_RRD : public U8GLIB
126
 class U8GLIB_ST7920_128X64_RRD : public U8GLIB

+ 3
- 3
Marlin/watchdog.cpp View File

7
 #include "ultralcd.h"
7
 #include "ultralcd.h"
8
 
8
 
9
 //===========================================================================
9
 //===========================================================================
10
-//=============================private variables  ============================
10
+//============================ private variables ============================
11
 //===========================================================================
11
 //===========================================================================
12
 
12
 
13
 //===========================================================================
13
 //===========================================================================
14
-//=============================functinos         ============================
14
+//================================ functions ================================
15
 //===========================================================================
15
 //===========================================================================
16
 
16
 
17
 
17
 
36
 }
36
 }
37
 
37
 
38
 //===========================================================================
38
 //===========================================================================
39
-//=============================ISR               ============================
39
+//=================================== ISR ===================================
40
 //===========================================================================
40
 //===========================================================================
41
 
41
 
42
 //Watchdog timer interrupt, called if main program blocks >1sec and manual reset is enabled.
42
 //Watchdog timer interrupt, called if main program blocks >1sec and manual reset is enabled.

+ 1
- 1
README.md View File

30
 
30
 
31
 ## Contact
31
 ## Contact
32
 
32
 
33
-__Google Hangout:__ <a href="https://plus.google.com/hangouts/_/g2wp5duzb2y6ahikg6tmwao3kua" target="_blank">Hangout</a>
33
+__Google Hangout:__ <a href="https://plus.google.com/hangouts/_/gxn3wrea5gdhoo223yimsiforia" target="_blank">Hangout</a>
34
 
34
 
35
 ## Credits
35
 ## Credits
36
 
36
 

Loading…
Cancel
Save