瀏覽代碼

Merge https://github.com/MarlinFirmware/Marlin into Bulgarian

Conflicts:
	Marlin/Configuration.h
	Marlin/configurator/config/Configuration.h
	Marlin/example_configurations/Felix/Configuration.h
	Marlin/example_configurations/Felix/Configuration_DUAL.h
	Marlin/example_configurations/Hephestos/Configuration.h
	Marlin/example_configurations/K8200/Configuration.h
	Marlin/example_configurations/SCARA/Configuration.h
	Marlin/example_configurations/WITBOX/Configuration.h
	Marlin/example_configurations/delta/generic/Configuration.h
	Marlin/example_configurations/delta/kossel_mini/Configuration.h
	Marlin/example_configurations/makibox/Configuration.h
	Marlin/example_configurations/tvrrug/Round2/Configuration.h

Conflicts with my Chinese implementation resolved.
AnHardt 10 年之前
父節點
當前提交
b4b19a6cbd
共有 68 個檔案被更改,包括 3197 行新增1946 行删除
  1. 3
    3
      Documentation/Compilation.md
  2. 172
    104
      Documentation/GCodes.md
  3. 5
    4
      Documentation/LCDLanguageFont.md
  4. 43
    8
      Marlin/Conditionals.h
  5. 14
    14
      Marlin/Configuration.h
  6. 4
    2
      Marlin/Configuration_adv.h
  7. 2
    2
      Marlin/Makefile
  8. 27
    7
      Marlin/Marlin.h
  9. 984
    770
      Marlin/Marlin_main.cpp
  10. 6
    3
      Marlin/SanityCheck.h
  11. 1
    1
      Marlin/Servo.cpp
  12. 3
    3
      Marlin/Servo.h
  13. 2
    2
      Marlin/blinkm.cpp
  14. 1
    1
      Marlin/blinkm.h
  15. 5
    5
      Marlin/cardreader.cpp
  16. 1
    1
      Marlin/cardreader.h
  17. 226
    155
      Marlin/configuration_store.cpp
  18. 3
    3
      Marlin/configuration_store.h
  19. 8
    6
      Marlin/configurator/config/Configuration.h
  20. 4
    2
      Marlin/configurator/config/Configuration_adv.h
  21. 9
    5
      Marlin/configurator/config/language.h
  22. 1
    1
      Marlin/configurator/index.html
  23. 0
    0
      Marlin/dogm_bitmaps.h
  24. 270
    0
      Marlin/dogm_font_data_ISO10646_CN.h
  25. 35
    31
      Marlin/dogm_lcd_implementation.h
  26. 8
    6
      Marlin/example_configurations/Felix/Configuration.h
  27. 9
    7
      Marlin/example_configurations/Felix/Configuration_DUAL.h
  28. 4
    2
      Marlin/example_configurations/Felix/Configuration_adv.h
  29. 11
    11
      Marlin/example_configurations/Hephestos/Configuration.h
  30. 4
    2
      Marlin/example_configurations/Hephestos/Configuration_adv.h
  31. 85
    26
      Marlin/example_configurations/K8200/Configuration.h
  32. 4
    2
      Marlin/example_configurations/K8200/Configuration_adv.h
  33. 13
    6
      Marlin/example_configurations/K8200/readme.md
  34. 9
    7
      Marlin/example_configurations/SCARA/Configuration.h
  35. 4
    2
      Marlin/example_configurations/SCARA/Configuration_adv.h
  36. 10
    10
      Marlin/example_configurations/WITBOX/Configuration.h
  37. 4
    2
      Marlin/example_configurations/WITBOX/Configuration_adv.h
  38. 8
    6
      Marlin/example_configurations/delta/generic/Configuration.h
  39. 4
    2
      Marlin/example_configurations/delta/generic/Configuration_adv.h
  40. 8
    6
      Marlin/example_configurations/delta/kossel_mini/Configuration.h
  41. 4
    2
      Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h
  42. 10
    7
      Marlin/example_configurations/makibox/Configuration.h
  43. 4
    2
      Marlin/example_configurations/makibox/Configuration_adv.h
  44. 10
    7
      Marlin/example_configurations/tvrrug/Round2/Configuration.h
  45. 4
    2
      Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h
  46. 二進制
      Marlin/fonts/ISO10646_CN.fon
  47. 21
    1
      Marlin/fonts/README.fonts
  48. 1
    0
      Marlin/fonts/make_fonts.bat
  49. 10
    5
      Marlin/language.h
  50. 159
    0
      Marlin/language_cn.h
  51. 7
    7
      Marlin/language_de.h
  52. 1
    1
      Marlin/language_en.h
  53. 12
    12
      Marlin/language_es.h
  54. 2
    0
      Marlin/pins.h
  55. 1
    3
      Marlin/pins_AZTEEG_X3.h
  56. 63
    0
      Marlin/pins_BRAINWAVE_PRO.h
  57. 1
    1
      Marlin/pins_SAV_MKI.h
  58. 88
    94
      Marlin/planner.cpp
  59. 11
    11
      Marlin/planner.h
  60. 102
    79
      Marlin/stepper.cpp
  61. 106
    93
      Marlin/temperature.cpp
  62. 1
    1
      Marlin/temperature.h
  63. 499
    311
      Marlin/ultralcd.cpp
  64. 6
    3
      Marlin/ultralcd.h
  65. 44
    56
      Marlin/ultralcd_implementation_hitachi_HD44780.h
  66. 7
    7
      Marlin/ultralcd_st7920_u8glib_rrd.h
  67. 3
    3
      Marlin/watchdog.cpp
  68. 6
    8
      README.md

+ 3
- 3
Documentation/Compilation.md 查看文件

3
   1. Install the latest non-beta arduino software IDE/toolset: http://www.arduino.cc/en/Main/Software
3
   1. Install the latest non-beta arduino software IDE/toolset: http://www.arduino.cc/en/Main/Software
4
   2. Download the Marlin firmware
4
   2. Download the Marlin firmware
5
     - [Latest developement version](https://github.com/MarlinFirmware/Marlin/tree/Development)
5
     - [Latest developement version](https://github.com/MarlinFirmware/Marlin/tree/Development)
6
-    - [Stable version](https://github.com/MarlinFirmware/Marlin/tree/Development)
6
+    - [Stable version]()
7
   3. In both cases use the "Download Zip" button on the right.
7
   3. In both cases use the "Download Zip" button on the right.
8
   4. Some boards require special files and/or libraries from the ArduinoAddons directory. Take a look at the dedicated [README](/ArduinoAddons/README.md) for details.
8
   4. Some boards require special files and/or libraries from the ArduinoAddons directory. Take a look at the dedicated [README](/ArduinoAddons/README.md) for details.
9
   5. Start the arduino IDE.
9
   5. Start the arduino IDE.
10
-  6. Select Tools -> Board -> Arduino Mega 2560    or your microcontroller
10
+  6. Select Tools -> Board -> Arduino Mega 2560 or your microcontroller
11
   7. Select the correct serial port in Tools ->Serial Port
11
   7. Select the correct serial port in Tools ->Serial Port
12
   8. Open Marlin.pde or .ino
12
   8. Open Marlin.pde or .ino
13
   9. Click the Verify/Compile button
13
   9. Click the Verify/Compile button
14
   10. Click the Upload button. If all goes well the firmware is uploading
14
   10. Click the Upload button. If all goes well the firmware is uploading
15
 
15
 
16
-That's ok.  Enjoy Silky Smooth Printing.
16
+That's ok.  Enjoy Silky Smooth Printing.

+ 172
- 104
Documentation/GCodes.md 查看文件

1
-# Implemented G Codes
1
+## Implemented G Codes
2
 
2
 
3
-## G Codes
3
+### Movement G and M Codes
4
+```
5
+G0   -> G1
6
+G1   - Coordinated Movement X Y Z E
7
+G2   - CW ARC
8
+G3   - CCW ARC
9
+G4   - Dwell S[seconds] or P[milliseconds]
10
+G92  - Set the "current position" to coordinates: X<xpos> Y<ypos> Z<zpos> E<epos>
11
+M0   - Wait for user, with optional prompt message (requires LCD controller)
12
+       M0 Click When Ready ; show "Click When Ready" until the button is pressed.
13
+M1   - Same as M0
14
+M400 - Finish all moves
15
+M999 - Restart after being stopped by error
16
+```
17
+### SD Card M Codes
18
+```
19
+M20  - List SD card
20
+M21  - Init SD card
21
+M22  - Release SD card
22
+M23  - Select SD file (M23 filename.g)
23
+M24  - Start/resume SD print
24
+M25  - Pause SD print
25
+M26  - Set SD position in bytes (M26 S12345)
26
+M27  - Report SD print status
27
+M28  - Start SD write (M28 filename.g)
28
+M29  - Stop SD write
29
+M30  - Delete file from SD (M30 filename.g)
30
+M31  - Output time since last M109 or SD card start to serial
31
+M32  - Select file and start SD print (Can be used _while_ printing from SD card files):
32
+       syntax "M32 /path/filename#", or "M32 S<startpos bytes> !filename#"
33
+       Call gcode file : "M32 P !filename#" and return to caller file after finishing (similar to #include).
34
+       The '#' is necessary when calling from within sd files, as it stops buffer prereading
35
+M540 - Enable/Disable "Stop SD Print on Endstop Hit" (req. ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED)
36
+       M540 S<0|1>
37
+M928 - Start SD logging (M928 filename.g) - ended by M29
38
+```
39
+### Hardware Control
40
+```
41
+M42  - Change pin status via gcode: P<pin> S<value>. If P is omitted the onboard LED pin will be used.
42
+       M42 P9 S1 ; set PIN 9 to 1. 
43
+M80  - Turn on Power Supply
44
+M81  - Turn off Power Supply
45
+M84  - Disable steppers until next move,
46
+       or use S<seconds> to specify an inactivity timeout, after which the steppers will be disabled.  S0 to disable the timeout.
47
+M85  - Set inactivity shutdown timer with parameter S<seconds>. Disable with "M85" or "M85 S0".
48
+M112 - Emergency stop. Requires hardware reset!!
49
+M226 - Wait for a pin to be in some state: P<pin number> S<pin state>
50
+```
51
+### Temperature M Codes
52
+```
53
+M104 - Set extruder target temp
54
+M105 - Read current temp
55
+M106 - Fan on
56
+M107 - Fan off
57
+M109 - Sxxx Wait for extruder current temp to reach target temp. Waits only when heating
58
+       Rxxx Wait for extruder current temp to reach target temp. Waits when heating and cooling
59
+       IF AUTOTEMP is enabled, S<mintemp> B<maxtemp> F<factor>. Exit autotemp by any M109 without F
60
+M140 - Set bed target temp
61
+M190 - Sxxx Wait for bed current temp to reach target temp. Waits only when heating
62
+       Rxxx Wait for bed current temp to reach target temp. Waits when heating and cooling
63
+M301 - Set PID parameters P I and D
64
+M302 - Allow cold extrudes, or set the minimum extrude S<temperature>.
65
+M303 - PID relay autotune S<temperature> sets the target temperature. (default target temperature = 150C)
66
+M304 - Set bed PID parameters P I and D
67
+```
68
+### Message M Codes
69
+```
70
+M114 - Output current position to serial port
71
+M115 - Capabilities string
72
+M117 - Display message text on the LCD
73
+M119 - Output Endstop status to serial port
74
+```
75
+### Endstops M Codes
76
+```
77
+M120 - Enable endstop detection
78
+M121 - Disable endstop detection
79
+```
80
+### Special Features M Codes
81
+```
82
+M126 - Solenoid Air Valve Open (BariCUDA support by jmil)
83
+M127 - Solenoid Air Valve Closed (BariCUDA vent to atmospheric pressure by jmil)
84
+M128 - EtoP Open (BariCUDA EtoP = electricity to air pressure transducer by jmil)
85
+M129 - EtoP Closed (BariCUDA EtoP = electricity to air pressure transducer by jmil)
86
+M150 - Set BlinkM Color: R<red> U<green> B<blue> via I2C. Range: 0-255
87
+M240 - Trigger a camera to take a photograph. (Add to your per-layer GCode.)
88
+M250 - Set LCD contrast: C<0-63>
89
+M280 - Set servo position absolute. P<servo index> S<angle or microseconds>
90
+M300 - Play beep sound S<frequency Hz> P<duration ms>
91
+M380 - Activate solenoid on active extruder
92
+M381 - Disable all solenoids
93
+M600 - Pause for filament change X<xpos> Y<ypos> Z<lift> E<initial retract> L<later retract for removal>
94
+```
95
+### Units and Measures G and M Codes
96
+```
97
+G90  - Use Absolute Coordinates
98
+G91  - Use Relative Coordinates
99
+M82  - Set E codes absolute (default)
100
+M83  - Set E codes relative while in Absolute Coordinates (G90) mode
101
+M92  - Set axis_steps_per_unit - same syntax as G92
102
+M200 - Set filament diameter and set E axis units to mm^3 (use S0 to set back to mm).: D<mm>
103
+M201 - Set max acceleration in units/s^2 for print moves (M201 X1000 Y1000)
104
+M202 - Set max acceleration in units/s^2 for travel moves (M202 X1000 Y1000) Unused in Marlin!!
105
+M203 - Set maximum feedrate that your machine can sustain (M203 X200 Y200 Z300 E10000) in mm/sec
106
+M204 - Set default acceleration: P for Printing moves, R for Retract only (no X, Y, Z) moves and T for Travel (non printing) moves (ex. M204 P800 T3000 R9000) in mm/sec^2
107
+M205 - Advanced settings: minimum travel speed S=while printing T=travel only, B=minimum segment time X=maximum xy jerk, Z=maximum Z jerk, E=maximum E jerk
108
+M206 - Set additional homing offset
109
+M218 - Set hotend offset (in mm): T<extruder_number> X<offset_on_X> Y<offset_on_Y>
110
+M220 - Set speed factor override percentage: S<factor in percent>
111
+M221 - Set extrude factor override percentage: S<factor in percent>
112
+```
113
+### Firmware Retraction G and M Codes
114
+```
115
+G10  - Retract filament according to settings of M207
116
+G11  - Retract recover filament according to settings of M208
117
+M207 - Set retract length S[positive mm] F[feedrate mm/min] Z[additional zlift/hop], stays in mm regardless of M200 setting
118
+M208 - Set recover=unretract length S[positive mm surplus to the M207 S*] F[feedrate mm/s]
119
+M209 - S<1=true/0=false> enable automatic retract detect if the slicer did not support G10/11: every normal extrude-only move will be classified as retract depending on the direction
120
+```
121
+### Z Probe G and M Codes
122
+```
123
+G28  - Home all Axis
124
+G29  - Detailed Z-Probe, probes the bed at 3 or more points. The printer must be homed with G28 before G29.
125
+G30  - Single Z Probe, probes bed at current XY location.
126
+G31  - Dock Z Probe sled (if enabled)
127
+G32  - Undock Z Probe sled (if enabled)
128
+M48  - Measure Z_Probe repeatability: P<points> X<xpos> Y<ypos> V<verbosity> E=engage L<legs of travel>
129
+       As with G29, the E flag causes the probe to stow after each probe.
130
+M401 - Lower Z-probe (if present)
131
+M402 - Raise Z-probe (if present)
132
+```
133
+### Filament Diameter M Codes
134
+```
135
+M404 - Set (or display) Nominal Filament Diameter in mm: [N<diameter>] (e.g., 3mm or 1.75mm)
136
+M405 - Turn on Filament Sensor extrusion control: [D<distance>] to set distance (in cm) from sensor to extruder
137
+M406 - Turn off Filament Sensor extrusion control
138
+M407 - Display measured Filament Diameter
139
+```
140
+### EEPROM Settings M Codes
141
+```
142
+M500 - Store parameters in EEPROM
143
+M501 - Read parameters from EEPROM (if you need reset them after you changed them temporarily).
144
+M502 - Revert to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
145
+M503 - Print the current settings (from memory not from EEPROM). Use S0 to leave off headings.
146
+```
147
+### Delta M Codes
148
+```
149
+M665 - Set Delta configurations: L<diagonal rod> R<delta radius> S<segments/s>
150
+M666 - Set Delta endstop adjustment: X<x-adjustment> Y<y-adjustment> Z<z-adjustment>
151
+M605 - Set dual x-carriage movement mode: S<mode> [ X<duplication x-offset> R<duplication temp offset> ]
152
+```
153
+### Stepper Driver M Codes
154
+```
155
+M17  - Enable/Power all stepper motors
156
+M18  - Disable all stepper motors. (same as M84)
157
+M907 - Set digital trimpot motor current using axis codes.
158
+M908 - Control digital trimpot directly.
159
+M350 - Set microstepping mode.
160
+M351 - Toggle MS1 MS2 pins directly.
161
+```
162
+### SCARA M-Codes
163
+__May change to suit future G-code standards__
164
+```
165
+M360 - SCARA calibration: Move to cal-position ThetaA (0 deg calibration)
166
+M361 - SCARA calibration: Move to cal-position ThetaB (90 deg calibration - steps per degree)
167
+M362 - SCARA calibration: Move to cal-position PsiA (0 deg calibration)
168
+M363 - SCARA calibration: Move to cal-position PsiB (90 deg calibration - steps per degree)
169
+M364 - SCARA calibration: Move to cal-position PSIC (90 deg to Theta calibration position)
170
+M365 - SCARA calibration: Scaling factor, X, Y, Z axis
171
+```
4
 
172
 
5
-*  G0  -> G1
6
-*  G1  - Coordinated Movement X Y Z E
7
-*  G2  - CW ARC
8
-*  G3  - CCW ARC
9
-*  G4  - Dwell S[seconds] or P[milliseconds]
10
-*  G10 - retract filament according to settings of M207
11
-*  G11 - retract recover filament according to settings of M208
12
-*  G28 - Home all Axis
13
-*  G29 - Detailed Z-Probe, probes the bed at 3 points.  You must be at the home position for this to work correctly.
14
-*  G30 - Single Z Probe, probes bed at current XY location.
15
-*  G31 - Dock Z Probe sled (if enabled)
16
-*  G32 - Undock Z Probe sled (if enabled)
17
-*  G90 - Use Absolute Coordinates
18
-*  G91 - Use Relative Coordinates
19
-*  G92 - Set current position to cordinates given
20
-
21
-## M Codes
22
-*  M0   - Unconditional stop - Wait for user to press a button on the LCD (Only if ULTRA_LCD is enabled)
23
-*  M1   - Same as M0
24
-*  M17  - Enable/Power all stepper motors
25
-*  M18  - Disable all stepper motors; same as M84
26
-*  M20  - List SD card
27
-*  M21  - Init SD card
28
-*  M22  - Release SD card
29
-*  M23  - Select SD file (M23 filename.g)
30
-*  M24  - Start/resume SD print
31
-*  M25  - Pause SD print
32
-*  M26  - Set SD position in bytes (M26 S12345)
33
-*  M27  - Report SD print status
34
-*  M28  - Start SD write (M28 filename.g)
35
-*  M29  - Stop SD write
36
-*  M30  - Delete file from SD (M30 filename.g)
37
-*  M31  - Output time since last M109 or SD card start to serial
38
-*  M32  - Select file and start SD print (Can be used when printing from SD card)
39
-*  M42  - Change pin status via gcode Use M42 Px Sy to set pin x to value y, when omitting Px the onboard led will be used.
40
-*  M80  - Turn on Power Supply
41
-*  M81  - Turn off Power Supply
42
-*  M82  - Set E codes absolute (default)
43
-*  M83  - Set E codes relative while in Absolute Coordinates (G90) mode
44
-*  M84  - Disable steppers until next move, or use S[seconds] to specify an inactivity timeout, after which the steppers will be disabled.  S0 to disable the timeout.
45
-*  M85  - Set inactivity shutdown timer with parameter S[seconds]. To disable set zero (default)
46
-*  M92  - Set axis_steps_per_unit - same syntax as G92
47
-*  M104 - Set extruder target temp
48
-*  M105 - Read current temp
49
-*  M106 - Fan on
50
-*  M107 - Fan off
51
-*  M109 - Sxxx Wait for extruder current temp to reach target temp. Waits only when heating
52
-*         Rxxx Wait for extruder current temp to reach target temp. Waits when heating and cooling
53
-*  M112 - Emergency stop
54
-*  M114 - Output current position to serial port
55
-*  M115 - Capabilities string
56
-*  M117 - display message
57
-*  M119 - Output Endstop status to serial port
58
-*  M126 - Solenoid Air Valve Open (BariCUDA support by jmil)
59
-*  M127 - Solenoid Air Valve Closed (BariCUDA vent to atmospheric pressure by jmil)
60
-*  M128 - EtoP Open (BariCUDA EtoP = electricity to air pressure transducer by jmil)
61
-*  M129 - EtoP Closed (BariCUDA EtoP = electricity to air pressure transducer by jmil)
62
-*  M140 - Set bed target temp
63
-*  M190 - Sxxx Wait for bed current temp to reach target temp. Waits only when heating
64
-*         Rxxx Wait for bed current temp to reach target temp. Waits when heating and cooling
65
-*  M200 - D[millimeters]- set filament diameter and set E axis units to cubic millimeters (use S0 to set back to millimeters).
66
-*  M201 - Set max acceleration in units/s^2 for print moves (M201 X1000 Y1000)
67
-*  M202 - Set max acceleration in units/s^2 for travel moves (M202 X1000 Y1000) Unused in Marlin!!
68
-*  M203 - Set maximum feedrate that your machine can sustain (M203 X200 Y200 Z300 E10000) in mm/sec
69
-*  M204 - Set default acceleration: P for Printing moves, R for Retract only (no X, Y, Z) moves and T for Travel (non printing) moves (ex. M204 P800 T3000 R9000) in mm/sec^2
70
-*  M205 - advanced settings:  minimum travel speed S=while printing T=travel only,  B=minimum segment time X= maximum xy jerk, Z=maximum Z jerk, E=maximum E jerk
71
-*  M206 - set additional homing offset
72
-*  M207 - set retract length S[positive mm] F[feedrate mm/min] Z[additional zlift/hop], stays in mm regardless of M200 setting
73
-*  M208 - set recover=unretract length S[positive mm surplus to the M207 S*] F[feedrate mm/min]
74
-*  M209 - S[1=true/0=false] enable automatic retract detect if the slicer did not support G10/11: every normal extrude-only move will be classified as retract depending on the direction.
75
-*  M218 - set hotend offset (in mm): T[extruder_number] X[offset_on_X] Y[offset_on_Y]
76
-*  M220 - S[factor in percent] - set speed factor override percentage
77
-*  M221 - S[factor in percent] - set extrude factor override percentage
78
-*  M240 - Trigger a camera to take a photograph
79
-*  M280 - Position an RC Servo P[index] S[angle/microseconds], ommit S to report back current angle
80
-*  M300 - Play beep sound S[frequency Hz] P[duration ms]
81
-*  M301 - Set PID parameters P I and D
82
-*  M302 - Allow cold extrudes
83
-*  M303 - PID relay autotune S[temperature] sets the target temperature. (default target temperature = 150C)
84
-*  M304 - Set bed PID parameters P I and D
85
-*  M350 - Set microstepping mode.
86
-*  M351 - Toggle MS1 MS2 pins directly.
87
-*  M400 - Finish all moves
88
-*  M401 - Lower z-probe if present
89
-*  M402 - Raise z-probe if present
90
-*  M404 - N[dia in mm] Enter the nominal filament width (3mm, 1.75mm) or will display nominal filament width without parameters
91
-*  M405 - Turn on Filament Sensor extrusion control.  Optional D[delay in cm] to set delay in centimeters between sensor and extruder
92
-*  M406 - Turn off Filament Sensor extrusion control
93
-*  M407 - Displays measured filament diameter
94
-*  M500 - stores paramters in EEPROM
95
-*  M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
96
-*  M502 - reverts to the default "factory settings".  You still need to store them in EEPROM afterwards if you want to.
97
-*  M503 - print the current settings (from memory not from EEPROM)
98
-*  M540 - Use S[0|1] to enable or disable the stop SD card print on endstop hit (requires ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED)
99
-*  M600 - Pause for filament change X[pos] Y[pos] Z[relative lift] E[initial retract] L[later retract distance for removal]
100
-*  M907 - Set digital trimpot motor current using axis codes.
101
-*  M908 - Control digital trimpot directly.
102
-*  M928 - Start SD logging (M928 filename.g) - ended by M29
103
-*  M999 - Restart after being stopped by error
104
-
105
-# Comments
173
+## Comments
106
 
174
 
107
 Comments start at a `;` (semicolon) and end with the end of the line:
175
 Comments start at a `;` (semicolon) and end with the end of the line:
108
 
176
 
122
 
190
 
123
     M117 backslash: \\;and a comment
191
     M117 backslash: \\;and a comment
124
 
192
 
125
-Please note that hosts should strip any comments before sending GCODE to the printer in order to save bandwidth.
193
+Please note that hosts should strip any comments before sending GCODE to the printer in order to save bandwidth.

+ 5
- 4
Documentation/LCDLanguageFont.md 查看文件

47
   * nl    Dutch
47
   * nl    Dutch
48
   * ca    Catalan
48
   * ca    Catalan
49
   * eu    Basque-Euskera
49
   * eu    Basque-Euskera
50
+  * cn    Chinese
51
+  * jp    Japanese (Katakana)
50
 
52
 
51
-  and recently on [Thingiverse](http://www.thingiverse.com/) a new port to
52
-  * jp    [Japanese](http://www.thingiverse.com/thing:664397)
53
-
54
- appeared.
55
 
53
 
56
 ## The Problem
54
 ## The Problem
57
   All of this languages, except the English, normally use extended symbol sets, not contained in US-ASCII.
55
   All of this languages, except the English, normally use extended symbol sets, not contained in US-ASCII.
133
 
131
 
134
   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.
132
   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.
135
 
133
 
134
+  For information about fonts see: Marlin\fonts\README.fonts
135
+
136
+
136
 ## User Instructions
137
 ## User Instructions
137
    Define your hardware and the wanted language in 'Configuration.h'.
138
    Define your hardware and the wanted language in 'Configuration.h'.
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.
139
    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.

+ 43
- 8
Marlin/Conditionals.h 查看文件

130
      #define NEWPANEL
130
      #define NEWPANEL
131
   #endif
131
   #endif
132
 
132
 
133
-
134
   #ifdef ULTIPANEL
133
   #ifdef ULTIPANEL
135
     #define NEWPANEL  //enable this if you have a click-encoder panel
134
     #define NEWPANEL  //enable this if you have a click-encoder panel
136
     #define SDSUPPORT
135
     #define SDSUPPORT
144
     #endif
143
     #endif
145
   #else //no panel but just LCD
144
   #else //no panel but just LCD
146
     #ifdef ULTRA_LCD
145
     #ifdef ULTRA_LCD
147
-    #ifdef DOGLCD // Change number of lines to match the 128x64 graphics display
148
-      #define LCD_WIDTH 22
149
-      #define LCD_HEIGHT 5
150
-    #else
151
-      #define LCD_WIDTH 16
152
-      #define LCD_HEIGHT 2
153
-    #endif
146
+      #ifdef DOGLCD // Change number of lines to match the 128x64 graphics display
147
+        #define LCD_WIDTH 22
148
+        #define LCD_HEIGHT 5
149
+      #else
150
+        #define LCD_WIDTH 16
151
+        #define LCD_HEIGHT 2
152
+      #endif
154
     #endif
153
     #endif
155
   #endif
154
   #endif
156
 
155
 
156
+  #ifdef DOGLCD
157
+    /* Custom characters defined in font font_6x10_marlin_symbols */
158
+    // \x00 intentionally skipped to avoid problems in strings
159
+    #define LCD_STR_REFRESH     "\x01"
160
+    #define LCD_STR_FOLDER      "\x02"
161
+    #define LCD_STR_ARROW_RIGHT "\x03"
162
+    #define LCD_STR_UPLEVEL     "\x04"
163
+    #define LCD_STR_CLOCK       "\x05"
164
+    #define LCD_STR_FEEDRATE    "\x06"
165
+    #define LCD_STR_BEDTEMP     "\x07"
166
+    #define LCD_STR_THERMOMETER "\x08"
167
+    #define LCD_STR_DEGREE      "\x09"
168
+
169
+    #define LCD_STR_SPECIAL_MAX '\x09'
170
+    // Maximum here is 0x1f because 0x20 is ' ' (space) and the normal charsets begin.
171
+    // Better stay below 0x10 because DISPLAY_CHARSET_HD44780_WESTERN begins here.
172
+  #else
173
+    /* Custom characters defined in the first 8 characters of the LCD */
174
+    #define LCD_STR_BEDTEMP     "\x00"  // this will have 'unexpected' results when used in a string!
175
+    #define LCD_STR_DEGREE      "\x01"
176
+    #define LCD_STR_THERMOMETER "\x02"
177
+    #define LCD_STR_UPLEVEL     "\x03"
178
+    #define LCD_STR_REFRESH     "\x04"
179
+    #define LCD_STR_FOLDER      "\x05"
180
+    #define LCD_STR_FEEDRATE    "\x06"
181
+    #define LCD_STR_CLOCK       "\x07"
182
+    #define LCD_STR_ARROW_RIGHT ">"  /* from the default character set */
183
+  #endif
184
+
157
   /**
185
   /**
158
    * Default LCD contrast for dogm-like LCD displays
186
    * Default LCD contrast for dogm-like LCD displays
159
    */
187
    */
161
     #define DEFAULT_LCD_CONTRAST 32
189
     #define DEFAULT_LCD_CONTRAST 32
162
   #endif
190
   #endif
163
 
191
 
192
+  #ifdef DOGLCD
193
+    #define HAS_LCD_CONTRAST
194
+    #ifdef U8GLIB_ST7920
195
+      #undef HAS_LCD_CONTRAST
196
+    #endif
197
+  #endif
198
+
164
 #else // CONFIGURATION_LCD
199
 #else // CONFIGURATION_LCD
165
 
200
 
166
   #define CONDITIONALS_H
201
   #define CONDITIONALS_H

+ 14
- 14
Marlin/Configuration.h 查看文件

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
68
   #define MOTHERBOARD BOARD_RAMPS_13_EFB
67
   #define MOTHERBOARD BOARD_RAMPS_13_EFB
69
 #endif
68
 #endif
70
 
69
 
71
-// Define this to set a custom name for your generic Mendel,
72
-// #define CUSTOM_MENDEL_NAME "This Mendel"
70
+// Optional custom name for your RepStrap or other custom machine
71
+// Displayed in the LCD "Ready" message
72
+// #define CUSTOM_MACHINE_NAME "3D Printer"
73
 
73
 
74
 // Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines)
74
 // Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines)
75
 // You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4)
75
 // You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4)
363
 #define E_ENABLE_ON 0 // For all extruders
363
 #define E_ENABLE_ON 0 // For all extruders
364
 
364
 
365
 // Disables axis when it's not being used.
365
 // Disables axis when it's not being used.
366
+// WARNING: When motors turn off there is a chance of losing position accuracy!
366
 #define DISABLE_X false
367
 #define DISABLE_X false
367
 #define DISABLE_Y false
368
 #define DISABLE_Y false
368
 #define DISABLE_Z false
369
 #define DISABLE_Z false
420
 //#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
421
 //#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
421
 
422
 
422
 //===========================================================================
423
 //===========================================================================
423
-//============================ Manual Bed Leveling ==========================
424
+//============================ Mesh Bed Leveling ============================
424
 //===========================================================================
425
 //===========================================================================
425
 
426
 
426
 // #define MANUAL_BED_LEVELING  // Add display menu option for bed leveling
427
 // #define MANUAL_BED_LEVELING  // Add display menu option for bed leveling
640
 // @section lcd
641
 // @section lcd
641
 
642
 
642
 // Define your display language below. Replace (en) with your language code and uncomment.
643
 // Define your display language below. Replace (en) with your language code and uncomment.
643
-// en, pl, fr, de, es, ru, bg, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
644
+// en, pl, fr, de, es, ru, bg, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, cn, test
644
 // See also language.h
645
 // See also language.h
645
 #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
646
 #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
646
 
647
 
660
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
661
 //#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.
662
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
662
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
663
 //#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
664
 //#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  
666
-
665
+//#define LCD_FEEDBACK_FREQUENCY_HZ 1000         // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
666
+                                                 // 0 to disable buzzer feedback. Test with M300 S<frequency Hz> P<duration ms>
667
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
667
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
668
 // http://reprap.org/wiki/PanelOne
668
 // http://reprap.org/wiki/PanelOne
669
 //#define PANEL_ONE
669
 //#define PANEL_ONE
791
 // Uncomment below to enable
791
 // Uncomment below to enable
792
 //#define FILAMENT_SENSOR
792
 //#define FILAMENT_SENSOR
793
 
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
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
 
796
 
797
-#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
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)
797
+#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
798
+#define MEASURED_UPPER_LIMIT         3.3 //upper limit factor used for sensor reading validation in mm
799
+#define MEASURED_LOWER_LIMIT         1.9 //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
 
801
 
802
 //defines used in the code
802
 //defines used in the code
803
 #define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially
803
 #define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially

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

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 查看文件

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

+ 27
- 7
Marlin/Marlin.h 查看文件

31
 #define TEST(n,b) (((n)&BIT(b))!=0)
31
 #define TEST(n,b) (((n)&BIT(b))!=0)
32
 #define RADIANS(d) ((d)*M_PI/180.0)
32
 #define RADIANS(d) ((d)*M_PI/180.0)
33
 #define DEGREES(r) ((d)*180.0/M_PI)
33
 #define DEGREES(r) ((d)*180.0/M_PI)
34
+#define NOLESS(v,n) do{ if (v < n) v = n; }while(0)
35
+#define NOMORE(v,n) do{ if (v > n) v = n; }while(0)
36
+
37
+typedef unsigned long millis_t;
34
 
38
 
35
 // Arduino < 1.0.0 does not define this, so we need to do it ourselves
39
 // Arduino < 1.0.0 does not define this, so we need to do it ourselves
36
 #ifndef analogInputToDigitalPin
40
 #ifndef analogInputToDigitalPin
219
   void filrunout();
223
   void filrunout();
220
 #endif
224
 #endif
221
 
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
+
222
 extern bool Running;
238
 extern bool Running;
223
 inline bool IsRunning() { return  Running; }
239
 inline bool IsRunning() { return  Running; }
224
 inline bool IsStopped() { return !Running; }
240
 inline bool IsStopped() { return !Running; }
225
 
241
 
226
-bool enquecommand(const char *cmd); //put a single ASCII command at the end of the current buffer or return false when it is full
227
-void enquecommands_P(const char *cmd); //put one or many ASCII commands at the end of the current buffer, read from flash
242
+bool enqueuecommand(const char *cmd); //put a single ASCII command at the end of the current buffer or return false when it is full
243
+void enqueuecommands_P(const char *cmd); //put one or many ASCII commands at the end of the current buffer, read from flash
228
 
244
 
229
 void prepare_arc_move(char isclockwise);
245
 void prepare_arc_move(char isclockwise);
230
 void clamp_to_software_endstops(float target[3]);
246
 void clamp_to_software_endstops(float target[3]);
231
 
247
 
232
-extern unsigned long previous_millis_cmd;
233
-inline void refresh_cmd_timeout() { previous_millis_cmd = millis(); }
248
+extern millis_t previous_cmd_ms;
249
+inline void refresh_cmd_timeout() { previous_cmd_ms = millis(); }
234
 
250
 
235
 #ifdef FAST_PWM_FAN
251
 #ifdef FAST_PWM_FAN
236
   void setPwmFrequency(uint8_t pin, int val);
252
   void setPwmFrequency(uint8_t pin, int val);
243
 
259
 
244
 extern float homing_feedrate[];
260
 extern float homing_feedrate[];
245
 extern bool axis_relative_modes[];
261
 extern bool axis_relative_modes[];
246
-extern int feedmultiply;
262
+extern int feedrate_multiplier;
247
 extern bool volumetric_enabled;
263
 extern bool volumetric_enabled;
248
 extern int extruder_multiply[EXTRUDERS]; // sets extrude multiply factor (in percent) for each extruder individually
264
 extern int extruder_multiply[EXTRUDERS]; // sets extrude multiply factor (in percent) for each extruder individually
249
 extern float filament_size[EXTRUDERS]; // cross-sectional area of filament (in millimeters), typically around 1.75 or 2.85, 0 disables the volumetric calculations for the extruder.
265
 extern float filament_size[EXTRUDERS]; // cross-sectional area of filament (in millimeters), typically around 1.75 or 2.85, 0 disables the volumetric calculations for the extruder.
273
   extern float zprobe_zoffset;
289
   extern float zprobe_zoffset;
274
 #endif
290
 #endif
275
 
291
 
292
+#ifdef PREVENT_DANGEROUS_EXTRUDE
293
+  extern float extrude_min_temp;
294
+#endif
295
+
276
 extern int fanSpeed;
296
 extern int fanSpeed;
277
 
297
 
278
 #ifdef BARICUDA
298
 #ifdef BARICUDA
301
   extern float retract_recover_length, retract_recover_length_swap, retract_recover_feedrate;
321
   extern float retract_recover_length, retract_recover_length_swap, retract_recover_feedrate;
302
 #endif
322
 #endif
303
 
323
 
304
-extern unsigned long starttime;
305
-extern unsigned long stoptime;
324
+extern millis_t print_job_start_ms;
325
+extern millis_t print_job_stop_ms;
306
 
326
 
307
 // Handling multiple extruders pins
327
 // Handling multiple extruders pins
308
 extern uint8_t active_extruder;
328
 extern uint8_t active_extruder;

+ 984
- 770
Marlin/Marlin_main.cpp
文件差異過大導致無法顯示
查看文件


+ 6
- 3
Marlin/SanityCheck.h 查看文件

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
   /**
101
     #ifdef ENABLE_AUTO_BED_LEVELING
101
     #ifdef ENABLE_AUTO_BED_LEVELING
102
       #error Select ENABLE_AUTO_BED_LEVELING or MESH_BED_LEVELING, not both
102
       #error Select ENABLE_AUTO_BED_LEVELING or MESH_BED_LEVELING, not both
103
     #endif
103
     #endif
104
+    #if MESH_NUM_X_POINTS > 7 || MESH_NUM_Y_POINTS > 7
105
+      #error MESH_NUM_X_POINTS and MESH_NUM_Y_POINTS need to be less than 8
106
+    #endif
104
   #endif
107
   #endif
105
 
108
 
106
   /**
109
   /**
183
         #define Y_PROBE_ERROR
186
         #define Y_PROBE_ERROR
184
       #endif
187
       #endif
185
       #ifdef Y_PROBE_ERROR
188
       #ifdef Y_PROBE_ERROR
186
-        #error The Y axis probing range is to small to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS
189
+        #error The Y axis probing range is too small to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS
187
       #endif
190
       #endif
188
 
191
 
189
       #undef PROBE_SIZE_X
192
       #undef PROBE_SIZE_X

+ 1
- 1
Marlin/Servo.cpp 查看文件

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

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

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
 

Marlin/BlinkM.cpp → Marlin/blinkm.cpp 查看文件

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 查看文件

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

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

25
     OUT_WRITE(SDPOWER, HIGH);
25
     OUT_WRITE(SDPOWER, HIGH);
26
   #endif //SDPOWER
26
   #endif //SDPOWER
27
 
27
 
28
-  autostart_atmillis = millis() + 5000;
28
+  next_autostart_ms = millis() + 5000;
29
 }
29
 }
30
 
30
 
31
 char *createFilename(char *buffer, const dir_t &p) { //buffer > 12characters
31
 char *createFilename(char *buffer, const dir_t &p) { //buffer > 12characters
397
 }
397
 }
398
 
398
 
399
 void CardReader::checkautostart(bool force) {
399
 void CardReader::checkautostart(bool force) {
400
-  if (!force && (!autostart_stilltocheck || autostart_atmillis < millis()))
400
+  if (!force && (!autostart_stilltocheck || next_autostart_ms < millis()))
401
     return;
401
     return;
402
 
402
 
403
   autostart_stilltocheck = false;
403
   autostart_stilltocheck = false;
421
     if (p.name[9] != '~' && strncmp((char*)p.name, autoname, 5) == 0) {
421
     if (p.name[9] != '~' && strncmp((char*)p.name, autoname, 5) == 0) {
422
       char cmd[30];
422
       char cmd[30];
423
       sprintf_P(cmd, PSTR("M23 %s"), autoname);
423
       sprintf_P(cmd, PSTR("M23 %s"), autoname);
424
-      enquecommand(cmd);
425
-      enquecommands_P(PSTR("M24"));
424
+      enqueuecommand(cmd);
425
+      enqueuecommands_P(PSTR("M24"));
426
       found = true;
426
       found = true;
427
     }
427
     }
428
   }
428
   }
508
     sdprinting = false;
508
     sdprinting = false;
509
     if (SD_FINISHED_STEPPERRELEASE) {
509
     if (SD_FINISHED_STEPPERRELEASE) {
510
       //finishAndDisableSteppers();
510
       //finishAndDisableSteppers();
511
-      enquecommands_P(PSTR(SD_FINISHED_RELEASECOMMAND));
511
+      enqueuecommands_P(PSTR(SD_FINISHED_RELEASECOMMAND));
512
     }
512
     }
513
     autotempShutdown();
513
     autotempShutdown();
514
   }
514
   }

+ 1
- 1
Marlin/cardreader.h 查看文件

62
   uint32_t filespos[SD_PROCEDURE_DEPTH];
62
   uint32_t filespos[SD_PROCEDURE_DEPTH];
63
   char filenames[SD_PROCEDURE_DEPTH][MAXPATHNAMELENGTH];
63
   char filenames[SD_PROCEDURE_DEPTH][MAXPATHNAMELENGTH];
64
   uint32_t filesize;
64
   uint32_t filesize;
65
-  unsigned long autostart_atmillis;
65
+  millis_t next_autostart_ms;
66
   uint32_t sdpos;
66
   uint32_t sdpos;
67
 
67
 
68
   bool autostart_stilltocheck; //the sd start is delayed, because otherwise the serial cannot answer fast enought to make contact with the hostsoftware.
68
   bool autostart_stilltocheck; //the sd start is delayed, because otherwise the serial cannot answer fast enought to make contact with the hostsoftware.

Marlin/ConfigurationStore.cpp → Marlin/configuration_store.cpp 查看文件

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", (int32_t)mbl.active);
680
+    SERIAL_ECHOPAIR(" X", MESH_NUM_X_POINTS);
681
+    SERIAL_ECHOPAIR(" Y", 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 adjustement (mm):");
673
-      SERIAL_ECHO_START;
697
+      SERIAL_ECHOLNPGM("Endstop adjustment (mm):");
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 adjustement (mm):");
690
-      SERIAL_ECHO_START;
714
+      SERIAL_ECHOLNPGM("Z2 Endstop adjustment (mm):");
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 查看文件

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

+ 8
- 6
Marlin/configurator/config/Configuration.h 查看文件

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
68
   #define MOTHERBOARD BOARD_RAMPS_13_EFB
67
   #define MOTHERBOARD BOARD_RAMPS_13_EFB
69
 #endif
68
 #endif
70
 
69
 
71
-// Define this to set a custom name for your generic Mendel,
72
-// #define CUSTOM_MENDEL_NAME "This Mendel"
70
+// Optional custom name for your RepStrap or other custom machine
71
+// Displayed in the LCD "Ready" message
72
+// #define CUSTOM_MACHINE_NAME "3D Printer"
73
 
73
 
74
 // Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines)
74
 // Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines)
75
 // You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4)
75
 // You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4)
363
 #define E_ENABLE_ON 0 // For all extruders
363
 #define E_ENABLE_ON 0 // For all extruders
364
 
364
 
365
 // Disables axis when it's not being used.
365
 // Disables axis when it's not being used.
366
+// WARNING: When motors turn off there is a chance of losing position accuracy!
366
 #define DISABLE_X false
367
 #define DISABLE_X false
367
 #define DISABLE_Y false
368
 #define DISABLE_Y false
368
 #define DISABLE_Z false
369
 #define DISABLE_Z false
639
 // @section lcd
640
 // @section lcd
640
 
641
 
641
 // Define your display language below. Replace (en) with your language code and uncomment.
642
 // Define your display language below. Replace (en) with your language code and uncomment.
642
-// en, pl, fr, de, es, ru, bg, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
643
+
644
+// en, pl, fr, de, es, ru, bg, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, cn, test
643
 // See also language.h
645
 // See also language.h
644
 #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
646
 #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
645
 
647
 
659
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
661
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
660
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
662
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
661
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
663
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
662
-//#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
663
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
664
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
664
-                                               // 0 to disable buzzer feedback  
665
+//#define LCD_FEEDBACK_FREQUENCY_HZ 1000         // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
666
+                                                 // 0 to disable buzzer feedback. Test with M300 S<frequency Hz> P<duration ms>
665
 
667
 
666
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
668
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
667
 // http://reprap.org/wiki/PanelOne
669
 // http://reprap.org/wiki/PanelOne

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

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

+ 9
- 5
Marlin/configurator/config/language.h 查看文件

70
   #endif
70
   #endif
71
 #else
71
 #else
72
   #ifndef MACHINE_NAME
72
   #ifndef MACHINE_NAME
73
-    #define MACHINE_NAME "Mendel"
73
+    #define MACHINE_NAME "3D Printer"
74
   #endif
74
   #endif
75
 #endif
75
 #endif
76
 
76
 
77
 #ifdef CUSTOM_MENDEL_NAME
77
 #ifdef CUSTOM_MENDEL_NAME
78
-  #warning CUSTOM_MENDEL_NAME deprecated - use CUSTOM_MACHINE_NAME
78
+  #error CUSTOM_MENDEL_NAME deprecated - use CUSTOM_MACHINE_NAME
79
   #define CUSTOM_MACHINE_NAME CUSTOM_MENDEL_NAME
79
   #define CUSTOM_MACHINE_NAME CUSTOM_MENDEL_NAME
80
 #endif
80
 #endif
81
 
81
 
110
 
110
 
111
 // Serial Console Messages (do not translate those!)
111
 // Serial Console Messages (do not translate those!)
112
 
112
 
113
-#define MSG_Enqueing                        "enqueing \""
113
+#define MSG_Enqueueing                      "enqueueing \""
114
 #define MSG_POWERUP                         "PowerUp"
114
 #define MSG_POWERUP                         "PowerUp"
115
 #define MSG_EXTERNAL_RESET                  " External Reset"
115
 #define MSG_EXTERNAL_RESET                  " External Reset"
116
 #define MSG_BROWNOUT_RESET                  " Brown out Reset"
116
 #define MSG_BROWNOUT_RESET                  " Brown out Reset"
122
 #define MSG_PLANNER_BUFFER_BYTES            "  PlannerBufferBytes: "
122
 #define MSG_PLANNER_BUFFER_BYTES            "  PlannerBufferBytes: "
123
 #define MSG_OK                              "ok"
123
 #define MSG_OK                              "ok"
124
 #define MSG_FILE_SAVED                      "Done saving file."
124
 #define MSG_FILE_SAVED                      "Done saving file."
125
-#define MSG_ERR_LINE_NO                     "Line Number is not Last Line Number+1, Last Line: "
125
+#define MSG_ERR_LINE_NO1                    "Line Number out of sequence. Expected: "
126
+#define MSG_ERR_LINE_NO2                    " Got: "
126
 #define MSG_ERR_CHECKSUM_MISMATCH           "checksum mismatch, Last Line: "
127
 #define MSG_ERR_CHECKSUM_MISMATCH           "checksum mismatch, Last Line: "
127
 #define MSG_ERR_NO_CHECKSUM                 "No Checksum with line number, Last Line: "
128
 #define MSG_ERR_NO_CHECKSUM                 "No Checksum with line number, Last Line: "
128
 #define MSG_ERR_NO_LINENUMBER_WITH_CHECKSUM "No Line Number with checksum, Last Line: "
129
 #define MSG_ERR_NO_LINENUMBER_WITH_CHECKSUM "No Line Number with checksum, Last Line: "
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"
160
 #define MSG_M119_REPORT                     "Reporting endstop status"
164
 #define MSG_M119_REPORT                     "Reporting endstop status"
161
 #define MSG_ENDSTOP_HIT                     "TRIGGERED"
165
 #define MSG_ENDSTOP_HIT                     "TRIGGERED"
162
 #define MSG_ENDSTOP_OPEN                    "open"
166
 #define MSG_ENDSTOP_OPEN                    "open"
209
 #define MSG_OK_B                            "ok B:"
213
 #define MSG_OK_B                            "ok B:"
210
 #define MSG_OK_T                            "ok T:"
214
 #define MSG_OK_T                            "ok T:"
211
 #define MSG_AT                              " @:"
215
 #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"
216
+#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 "
217
 #define MSG_PID_DEBUG                       " PID_DEBUG "
214
 #define MSG_PID_DEBUG_INPUT                 ": Input "
218
 #define MSG_PID_DEBUG_INPUT                 ": Input "
215
 #define MSG_PID_DEBUG_OUTPUT                " Output "
219
 #define MSG_PID_DEBUG_OUTPUT                " Output "

+ 1
- 1
Marlin/configurator/index.html 查看文件

46
 
46
 
47
           <label class="newline">Motherboard:</label><select name="MOTHERBOARD"></select>
47
           <label class="newline">Motherboard:</label><select name="MOTHERBOARD"></select>
48
 
48
 
49
-          <label class="newline">Custom Name:</label><input name="CUSTOM_MENDEL_NAME" type="text" size="14" maxlength="12" value="" />
49
+          <label class="newline">Custom Name:</label><input name="CUSTOM_MACHINE_NAME" type="text" size="14" maxlength="12" value="" />
50
 
50
 
51
           <label class="newline">Machine UUID:</label><input name="MACHINE_UUID" type="text" size="38" maxlength="36" value="" />
51
           <label class="newline">Machine UUID:</label><input name="MACHINE_UUID" type="text" size="38" maxlength="36" value="" />
52
 
52
 

Marlin/DOGMbitmaps.h → Marlin/dogm_bitmaps.h 查看文件


+ 270
- 0
Marlin/dogm_font_data_ISO10646_CN.h 查看文件

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};

+ 35
- 31
Marlin/dogm_lcd_implementation.h 查看文件

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
 
109
-#define START_ROW              0
113
+#ifndef TALL_FONT_CORRECTION
114
+  #define TALL_FONT_CORRECTION 0
115
+#endif
110
 
116
 
111
-/* Custom characters defined in font font_6x10_marlin_symbols */
112
-// \x00 intentionally skipped to avoid problems in strings
113
-#define LCD_STR_REFRESH     "\x01"
114
-#define LCD_STR_FOLDER      "\x02"
115
-#define LCD_STR_ARROW_RIGHT "\x03"
116
-#define LCD_STR_UPLEVEL     "\x04"
117
-#define LCD_STR_CLOCK       "\x05"
118
-#define LCD_STR_FEEDRATE    "\x06"
119
-#define LCD_STR_BEDTEMP     "\x07"
120
-#define LCD_STR_THERMOMETER "\x08"
121
-#define LCD_STR_DEGREE      "\x09"
122
-
123
-#define LCD_STR_SPECIAL_MAX '\x09'
124
-// Maximum here is 0x1f because 0x20 is ' ' (space) and the normal charsets begin.
125
-// Better stay below 0x10 because DISPLAY_CHARSET_HD44780_WESTERN begins here.
117
+#define START_ROW              0
126
 
118
 
127
 // LCD selection
119
 // LCD selection
128
 #ifdef U8GLIB_ST7920
120
 #ifdef U8GLIB_ST7920
139
   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
140
 #endif
132
 #endif
141
 
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
+
142
 #include "utf_mapper.h"
141
 #include "utf_mapper.h"
143
 
142
 
144
 int lcd_contrast;
143
 int lcd_contrast;
188
 
187
 
189
 static bool show_splashscreen = true;
188
 static bool show_splashscreen = true;
190
 
189
 
190
+/* Warning: This function is called from interrupt context */
191
 static void lcd_implementation_init() {
191
 static void lcd_implementation_init() {
192
 
192
 
193
   #ifdef LCD_PIN_BL // Enable LCD backlight
193
   #ifdef LCD_PIN_BL // Enable LCD backlight
268
  
268
  
269
   #ifdef SDSUPPORT
269
   #ifdef SDSUPPORT
270
     // SD Card Symbol
270
     // SD Card Symbol
271
-    u8g.drawBox(42,42,8,7);
272
-    u8g.drawBox(50,44,2,5);
273
-    u8g.drawFrame(42,49,10,4);
274
-    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
+
275
 
276
 
276
     // Progress bar frame
277
     // Progress bar frame
277
-    u8g.drawFrame(54,49,73,4);
278
+    u8g.drawFrame(54, 49, 73, 4 - TALL_FONT_CORRECTION);
278
 
279
 
279
     // SD Card Progress bar and clock
280
     // SD Card Progress bar and clock
280
     lcd_setFont(FONT_STATUSMENU);
281
     lcd_setFont(FONT_STATUSMENU);
281
  
282
  
282
     if (IS_SD_PRINTING) {
283
     if (IS_SD_PRINTING) {
283
       // Progress bar solid part
284
       // Progress bar solid part
284
-      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);
285
     }
286
     }
286
 
287
 
287
     u8g.setPrintPos(80,48);
288
     u8g.setPrintPos(80,48);
288
-    if (starttime != 0) {
289
-      uint16_t time = (millis() - starttime) / 60000;
289
+    if (print_job_start_ms != 0) {
290
+      uint16_t time = (millis() - print_job_start_ms) / 60000;
290
       lcd_print(itostr2(time/60));
291
       lcd_print(itostr2(time/60));
291
       lcd_print(':');
292
       lcd_print(':');
292
       lcd_print(itostr2(time%60));
293
       lcd_print(itostr2(time%60));
322
   lcd_setFont(FONT_STATUSMENU);
323
   lcd_setFont(FONT_STATUSMENU);
323
 
324
 
324
   #ifdef USE_SMALL_INFOFONT
325
   #ifdef USE_SMALL_INFOFONT
325
-    u8g.drawBox(0,30,128,10);
326
+    u8g.drawBox(0,30,LCD_PIXEL_WIDTH,10);
326
   #else
327
   #else
327
-    u8g.drawBox(0,30,128,9);
328
+    u8g.drawBox(0,30,LCD_PIXEL_WIDTH,9);
328
   #endif
329
   #endif
329
   u8g.setColorIndex(0); // white on black
330
   u8g.setColorIndex(0); // white on black
330
   u8g.setPrintPos(2,XYZ_BASELINE);
331
   u8g.setPrintPos(2,XYZ_BASELINE);
353
   lcd_print(LCD_STR_FEEDRATE[0]);
354
   lcd_print(LCD_STR_FEEDRATE[0]);
354
   lcd_setFont(FONT_STATUSMENU);
355
   lcd_setFont(FONT_STATUSMENU);
355
   u8g.setPrintPos(12,49);
356
   u8g.setPrintPos(12,49);
356
-  lcd_print(itostr3(feedmultiply));
357
+  lcd_print(itostr3(feedrate_multiplier));
357
   lcd_print('%');
358
   lcd_print('%');
358
 
359
 
359
   // Status line
360
   // Status line
366
   #ifndef FILAMENT_LCD_DISPLAY
367
   #ifndef FILAMENT_LCD_DISPLAY
367
     lcd_print(lcd_status_message);
368
     lcd_print(lcd_status_message);
368
   #else
369
   #else
369
-    if (millis() < message_millis + 5000) {  //Display both Status message line and Filament display on the last line
370
+    if (millis() < previous_lcd_status_ms + 5000) {  //Display both Status message line and Filament display on the last line
370
       lcd_print(lcd_status_message);
371
       lcd_print(lcd_status_message);
371
     }
372
     }
372
     else {
373
     else {
382
 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) {
383
   if (isSelected) {
384
   if (isSelected) {
384
     u8g.setColorIndex(1);  // black on white
385
     u8g.setColorIndex(1);  // black on white
385
-    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);
386
     u8g.setColorIndex(0);  // following text must be white on black
387
     u8g.setColorIndex(0);  // following text must be white on black
387
   }
388
   }
388
   else {
389
   else {
402
     pstr++;
403
     pstr++;
403
   }
404
   }
404
   while (n--) lcd_print(' ');
405
   while (n--) lcd_print(' ');
406
+    u8g.setPrintPos(LCD_PIXEL_WIDTH - DOG_CHAR_WIDTH, (row + 1) * DOG_CHAR_HEIGHT);
405
   lcd_print(post_char);
407
   lcd_print(post_char);
406
   lcd_print(' ');
408
   lcd_print(' ');
407
 }
409
 }
408
 
410
 
409
 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) {
410
   char c;
412
   char c;
411
-  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;
412
 
415
 
413
   lcd_implementation_mark_as_selected(row, isSelected);
416
   lcd_implementation_mark_as_selected(row, isSelected);
414
 
417
 
418
   }
421
   }
419
   lcd_print(':');
422
   lcd_print(':');
420
   while (n--) lcd_print(' ');
423
   while (n--) lcd_print(' ');
424
+  u8g.setPrintPos(LCD_PIXEL_WIDTH - DOG_CHAR_WIDTH * vallen, (row + 1) * DOG_CHAR_HEIGHT);
421
   if (pgm) { lcd_printPGM(data); } else { lcd_print((char *)data); }
425
   if (pgm) { lcd_printPGM(data); } else { lcd_print((char *)data); }
422
 }
426
 }
423
 
427
 

+ 8
- 6
Marlin/example_configurations/Felix/Configuration.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
62
   #define MOTHERBOARD BOARD_FELIX2
61
   #define MOTHERBOARD BOARD_FELIX2
63
 #endif
62
 #endif
64
 
63
 
65
-// Define this to set a custom name for your generic Mendel,
66
-// #define CUSTOM_MENDEL_NAME "This Mendel"
64
+// Optional custom name for your RepStrap or other custom machine
65
+// Displayed in the LCD "Ready" message
66
+#define CUSTOM_MACHINE_NAME "Felix"
67
 
67
 
68
 // Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines)
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)
69
 // You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4)
305
 const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
305
 const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
306
 const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
306
 const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
307
 const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
307
 const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
308
+const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
308
 #define DISABLE_MAX_ENDSTOPS
309
 #define DISABLE_MAX_ENDSTOPS
309
 //#define DISABLE_MIN_ENDSTOPS
310
 //#define DISABLE_MIN_ENDSTOPS
310
 
311
 
315
 #define E_ENABLE_ON 0 // For all extruders
316
 #define E_ENABLE_ON 0 // For all extruders
316
 
317
 
317
 // Disables axis when it's not being used.
318
 // Disables axis when it's not being used.
319
+// WARNING: When motors turn off there is a chance of losing position accuracy!
318
 #define DISABLE_X false
320
 #define DISABLE_X false
319
 #define DISABLE_Y false
321
 #define DISABLE_Y false
320
 #define DISABLE_Z false
322
 #define DISABLE_Z false
572
 //==============================LCD and SD support=============================
574
 //==============================LCD and SD support=============================
573
 
575
 
574
 // Define your display language below. Replace (en) with your language code and uncomment.
576
 // Define your display language below. Replace (en) with your language code and uncomment.
575
-// en, pl, fr, de, es, ru, bg, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
577
+// en, pl, fr, de, es, ru, bg, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, cn, test
576
 // See also language.h
578
 // See also language.h
577
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
579
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
578
 
580
 
592
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
594
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
593
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
595
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
594
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
596
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
595
-//#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
596
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
597
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
597
-                                               // 0 to disable buzzer feedback  
598
+//#define LCD_FEEDBACK_FREQUENCY_HZ 1000         // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
599
+                                                 // 0 to disable buzzer feedback. Test with M300 S<frequency Hz> P<duration ms>
598
 
600
 
599
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
601
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
600
 // http://reprap.org/wiki/PanelOne
602
 // http://reprap.org/wiki/PanelOne

+ 9
- 7
Marlin/example_configurations/Felix/Configuration_DUAL.h 查看文件

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
62
   #define MOTHERBOARD BOARD_FELIX2
61
   #define MOTHERBOARD BOARD_FELIX2
63
 #endif
62
 #endif
64
 
63
 
65
-// Define this to set a custom name for your generic Mendel,
66
-// #define CUSTOM_MENDEL_NAME "This Mendel"
64
+// Optional custom name for your RepStrap or other custom machine
65
+// Displayed in the LCD "Ready" message
66
+#define CUSTOM_MACHINE_NAME "Felix Dual"
67
 
67
 
68
 // Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines)
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)
69
 // You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4)
305
 const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
305
 const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
306
 const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
306
 const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
307
 const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
307
 const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
308
+const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
308
 #define DISABLE_MAX_ENDSTOPS
309
 #define DISABLE_MAX_ENDSTOPS
309
 //#define DISABLE_MIN_ENDSTOPS
310
 //#define DISABLE_MIN_ENDSTOPS
310
 
311
 
315
 #define E_ENABLE_ON 0 // For all extruders
316
 #define E_ENABLE_ON 0 // For all extruders
316
 
317
 
317
 // Disables axis when it's not being used.
318
 // Disables axis when it's not being used.
319
+// WARNING: When motors turn off there is a chance of losing position accuracy!
318
 #define DISABLE_X false
320
 #define DISABLE_X false
319
 #define DISABLE_Y false
321
 #define DISABLE_Y false
320
 #define DISABLE_Z false
322
 #define DISABLE_Z false
568
 //==============================LCD and SD support=============================
570
 //==============================LCD and SD support=============================
569
 
571
 
570
 // 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.
571
-// en, pl, fr, de, es, ru, bg, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
573
+// en, pl, fr, de, es, ru, bg, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, cn, test
572
 // See also language.h
574
 // See also language.h
573
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
575
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
574
 
576
 
588
 //#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
589
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
591
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
590
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
592
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
591
-//#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
592
 //#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
593
-                                               // 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>
594
 
596
 
595
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
597
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
596
 // http://reprap.org/wiki/PanelOne
598
 // http://reprap.org/wiki/PanelOne

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

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

+ 11
- 11
Marlin/example_configurations/Hephestos/Configuration.h 查看文件

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
58
 
57
 
59
 // The following define selects which electronics board you have.
58
 // The following define selects which electronics board you have.
60
 // Please choose the name from boards.h that matches your setup
59
 // Please choose the name from boards.h that matches your setup
61
-#ifndef MOTHERBOARD
62
-  #define MOTHERBOARD BOARD_HEPHESTOS
63
-#endif
64
-
65
-// Define this to set a custom name for your generic Mendel,
66
-// #define CUSTOM_MENDEL_NAME "This Mendel"
60
+#define MOTHERBOARD BOARD_HEPHESTOS
67
 
61
 
62
+// Optional custom name for your RepStrap or other custom machine
63
+// Displayed in the LCD "Ready" message
64
+// #define CUSTOM_MACHINE_NAME "3D Printer"
65
+ 
68
 // Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines)
66
 // 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)
67
 // 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"
68
 // #define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
328
 const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
326
 const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
329
 const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
327
 const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
330
 const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
328
 const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
329
+const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
331
 //#define DISABLE_MAX_ENDSTOPS
330
 //#define DISABLE_MAX_ENDSTOPS
332
 //#define DISABLE_MIN_ENDSTOPS
331
 //#define DISABLE_MIN_ENDSTOPS
333
 
332
 
338
 #define E_ENABLE_ON 0 // For all extruders
337
 #define E_ENABLE_ON 0 // For all extruders
339
 
338
 
340
 // Disables axis when it's not being used.
339
 // Disables axis when it's not being used.
340
+// WARNING: When motors turn off there is a chance of losing position accuracy!
341
 #define DISABLE_X false
341
 #define DISABLE_X false
342
 #define DISABLE_Y false
342
 #define DISABLE_Y false
343
 #define DISABLE_Z false
343
 #define DISABLE_Z false
594
 //==============================LCD and SD support=============================
594
 //==============================LCD and SD support=============================
595
 
595
 
596
 // Define your display language below. Replace (en) with your language code and uncomment.
596
 // Define your display language below. Replace (en) with your language code and uncomment.
597
-// en, pl, fr, de, es, ru, bg, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
597
+// en, pl, fr, de, es, ru, bg, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, cn, test
598
 // See also language.h
598
 // See also language.h
599
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
599
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
600
 
600
 
614
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
614
 //#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.
615
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
616
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
616
 //#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
617
 //#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  
618
+//#define LCD_FEEDBACK_FREQUENCY_HZ 1000         // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
619
+                                                 // 0 to disable buzzer feedback. Test with M300 S<frequency Hz> P<duration ms>
620
 
620
 
621
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
621
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
622
 // http://reprap.org/wiki/PanelOne
622
 // http://reprap.org/wiki/PanelOne

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

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

+ 85
- 26
Marlin/example_configurations/K8200/Configuration.h 查看文件

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"
31
 //===========================================================================
36
 //===========================================================================
32
 //============================= SCARA Printer ===============================
37
 //============================= SCARA Printer ===============================
33
 //===========================================================================
38
 //===========================================================================
34
-// For a Delta printer replace the configuration files with the files in the
39
+// For a Scara printer replace the configuration files with the files in the
35
 // example_configurations/SCARA directory.
40
 // example_configurations/SCARA directory.
36
 //
41
 //
37
 
42
 
43
+// @section info
44
+
38
 // User-specified version info of this build to display in [Pronterface, etc] terminal window during
45
 // 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
46
 // 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.
47
 // build by the user have been successfully uploaded into firmware.
41
 #define STRING_VERSION "1.0.3 dev"
48
 #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
49
 #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
44
 #define STRING_CONFIG_H_AUTHOR "(K8200, CONSULitAS)" // Who made the changes.
50
 #define STRING_CONFIG_H_AUTHOR "(K8200, CONSULitAS)" // Who made the changes.
45
 #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
46
 //#define STRING_SPLASH_LINE2 STRING_VERSION_CONFIG_H // will be shown during bootup in line2
52
 //#define STRING_SPLASH_LINE2 STRING_VERSION_CONFIG_H // will be shown during bootup in line2
47
 
53
 
54
+// @section machine
55
+
48
 // SERIAL_PORT selects which serial port should be used for communication with the host.
56
 // SERIAL_PORT selects which serial port should be used for communication with the host.
49
 // This allows the connection of wireless adapters (for instance) to non-default port pins.
57
 // This allows the connection of wireless adapters (for instance) to non-default port pins.
50
 // Serial port 0 is still used by the Arduino bootloader regardless of this setting.
58
 // Serial port 0 is still used by the Arduino bootloader regardless of this setting.
59
+// :[0,1,2,3,4,5,6,7]
51
 #define SERIAL_PORT 0
60
 #define SERIAL_PORT 0
52
 
61
 
53
 // This determines the communication speed of the printer
62
 // This determines the communication speed of the printer
63
+// :[2400,9600,19200,38400,57600,115200,250000]
54
 #define BAUDRATE 250000
64
 #define BAUDRATE 250000
55
 
65
 
56
 // This enables the serial port associated to the Bluetooth interface
66
 // This enables the serial port associated to the Bluetooth interface
62
   #define MOTHERBOARD BOARD_K8200
72
   #define MOTHERBOARD BOARD_K8200
63
 #endif
73
 #endif
64
 
74
 
65
-// Define this to set a custom name for your generic Mendel,
66
-// #define CUSTOM_MENDEL_NAME "This Mendel"
75
+// Optional custom name for your RepStrap or other custom machine
76
+// Displayed in the LCD "Ready" message
77
+// #define CUSTOM_MACHINE_NAME "3D Printer"
67
 
78
 
68
 // Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines)
79
 // 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)
80
 // 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"
81
 // #define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
71
 
82
 
72
 // This defines the number of extruders
83
 // This defines the number of extruders
84
+// :[1,2,3,4]
73
 #define EXTRUDERS 1
85
 #define EXTRUDERS 1
74
 
86
 
87
+// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
88
+// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).
89
+// For the other hotends it is their distance from the extruder 0 hotend.
90
+//#define EXTRUDER_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis
91
+//#define EXTRUDER_OFFSET_Y {0.0, 5.00}  // (in mm) for each extruder, offset of the hotend on the Y axis
92
+
75
 //// The following define selects which power supply you have. Please choose the one that matches your setup
93
 //// The following define selects which power supply you have. Please choose the one that matches your setup
76
 // 1 = ATX
94
 // 1 = ATX
77
 // 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC)
95
 // 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC)
96
+// :{1:'ATX',2:'X-Box 360'}
78
 
97
 
79
 #define POWER_SUPPLY 1
98
 #define POWER_SUPPLY 1
80
 
99
 
81
 // Define this to have the electronics keep the power supply off on startup. If you don't know what this is leave it.
100
 // 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
101
 // #define PS_DEFAULT_OFF
83
 
102
 
103
+// @section temperature
104
+
84
 //===========================================================================
105
 //===========================================================================
85
 //============================= Thermal Settings ============================
106
 //============================= Thermal Settings ============================
86
 //===========================================================================
107
 //===========================================================================
244
 //    #define  DEFAULT_bedKi 1.41
265
 //    #define  DEFAULT_bedKi 1.41
245
 //    #define  DEFAULT_bedKd 1675.16
266
 //    #define  DEFAULT_bedKd 1675.16
246
 
267
 
247
-//Vellemann K8200 PCB heatbed with standard PCU - calculated with PID Autotune and tested
268
+//Vellemann K8200 PCB heatbed with standard PCU at 60 degreesC - calculated with PID Autotune and tested
248
 //from pidautotune
269
 //from pidautotune
249
    #define  DEFAULT_bedKp 341.88
270
    #define  DEFAULT_bedKp 341.88
250
    #define  DEFAULT_bedKi 25.32
271
    #define  DEFAULT_bedKi 25.32
253
    // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
274
    // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
254
 #endif // PIDTEMPBED
275
 #endif // PIDTEMPBED
255
 
276
 
277
+// @section extruder
256
 
278
 
257
 //this prevents dangerous Extruder moves, i.e. if the temperature is under the limit
279
 //this prevents dangerous Extruder moves, i.e. if the temperature is under the limit
258
 //can be software-disabled for whatever purposes by
280
 //can be software-disabled for whatever purposes by
307
 //============================= Mechanical Settings =========================
329
 //============================= Mechanical Settings =========================
308
 //===========================================================================
330
 //===========================================================================
309
 
331
 
332
+// @section machine
333
+
310
 // Uncomment this option to enable CoreXY kinematics
334
 // Uncomment this option to enable CoreXY kinematics
311
 // #define COREXY
335
 // #define COREXY
312
 
336
 
313
 // Enable this option for Toshiba steppers
337
 // Enable this option for Toshiba steppers
314
 // #define CONFIG_STEPPERS_TOSHIBA
338
 // #define CONFIG_STEPPERS_TOSHIBA
315
 
339
 
340
+// @section homing
341
+
316
 // coarse Endstop Settings
342
 // coarse Endstop Settings
317
 #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
343
 #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
318
 
344
 
324
   #define ENDSTOPPULLUP_XMIN
350
   #define ENDSTOPPULLUP_XMIN
325
   #define ENDSTOPPULLUP_YMIN
351
   #define ENDSTOPPULLUP_YMIN
326
   #define ENDSTOPPULLUP_ZMIN
352
   #define ENDSTOPPULLUP_ZMIN
353
+  // #define ENDSTOPPULLUP_ZPROBE
327
 #endif
354
 #endif
328
 
355
 
329
 // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
356
 // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
333
 const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
360
 const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
334
 const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
361
 const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
335
 const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
362
 const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
363
+const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
336
 #define DISABLE_MAX_ENDSTOPS
364
 #define DISABLE_MAX_ENDSTOPS
337
 //#define DISABLE_MIN_ENDSTOPS
365
 //#define DISABLE_MIN_ENDSTOPS
338
 
366
 
367
+// @section machine
368
+// If you want to enable the Z Probe pin, but disable its use, uncomment the line below.
369
+// This only affects a Z Probe Endstop if you have separate Z min endstop as well and have
370
+// activated Z_PROBE_ENDSTOP below. If you are using the Z Min endstop on your Z Probe,
371
+// this has no effect.
372
+//#define DISABLE_Z_PROBE_ENDSTOP
373
+
339
 // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
374
 // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
375
+// :{0:'Low',1:'High'}
340
 #define X_ENABLE_ON 0
376
 #define X_ENABLE_ON 0
341
 #define Y_ENABLE_ON 0
377
 #define Y_ENABLE_ON 0
342
 #define Z_ENABLE_ON 0
378
 #define Z_ENABLE_ON 0
343
 #define E_ENABLE_ON 0 // For all extruders
379
 #define E_ENABLE_ON 0 // For all extruders
344
 
380
 
345
 // Disables axis when it's not being used.
381
 // Disables axis when it's not being used.
382
+// WARNING: When motors turn off there is a chance of losing position accuracy!
346
 #define DISABLE_X false
383
 #define DISABLE_X false
347
 #define DISABLE_Y false
384
 #define DISABLE_Y false
348
 #define DISABLE_Z true
385
 #define DISABLE_Z true
386
+
387
+// @section extruder
388
+
349
 #define DISABLE_E false // For all extruders
389
 #define DISABLE_E false // For all extruders
350
 #define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled
390
 #define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled
351
 
391
 
392
+// @section machine
393
+
352
 // Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
394
 // Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
353
 #define INVERT_X_DIR false
395
 #define INVERT_X_DIR false
354
 #define INVERT_Y_DIR false
396
 #define INVERT_Y_DIR false
355
 #define INVERT_Z_DIR false
397
 #define INVERT_Z_DIR false
356
-#define INVERT_E0_DIR true
398
+
399
+// @section extruder
400
+
401
+// For direct drive extruder v9 set to true, for geared extruder set to false.
402
+#define INVERT_E0_DIR true // K8200: true for geared default extruder!
357
 #define INVERT_E1_DIR true
403
 #define INVERT_E1_DIR true
358
 #define INVERT_E2_DIR true
404
 #define INVERT_E2_DIR true
359
 #define INVERT_E3_DIR true
405
 #define INVERT_E3_DIR true
360
 
406
 
407
+// @section homing
408
+
361
 // ENDSTOP SETTINGS:
409
 // ENDSTOP SETTINGS:
362
 // Sets direction of endstops when homing; 1=MAX, -1=MIN
410
 // Sets direction of endstops when homing; 1=MAX, -1=MIN
411
+// :[-1,1]
363
 #define X_HOME_DIR -1
412
 #define X_HOME_DIR -1
364
 #define Y_HOME_DIR -1
413
 #define Y_HOME_DIR -1
365
 #define Z_HOME_DIR -1
414
 #define Z_HOME_DIR -1
367
 #define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
416
 #define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
368
 #define max_software_endstops true  // If true, axis won't move to coordinates greater than the defined lengths below.
417
 #define max_software_endstops true  // If true, axis won't move to coordinates greater than the defined lengths below.
369
 
418
 
419
+// @section machine
420
+
370
 // Travel limits after homing (units are in mm)
421
 // Travel limits after homing (units are in mm)
371
 #define X_MIN_POS 0
422
 #define X_MIN_POS 0
372
 #define Y_MIN_POS 0
423
 #define Y_MIN_POS 0
386
 //#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
437
 //#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
387
 
438
 
388
 //===========================================================================
439
 //===========================================================================
389
-//============================ Manual Bed Leveling ==========================
440
+//============================ Mesh Bed Leveling ============================
390
 //===========================================================================
441
 //===========================================================================
391
 
442
 
392
 // #define MANUAL_BED_LEVELING  // Add display menu option for bed leveling
443
 // #define MANUAL_BED_LEVELING  // Add display menu option for bed leveling
393
 // #define MESH_BED_LEVELING    // Enable mesh bed leveling
444
 // #define MESH_BED_LEVELING    // Enable mesh bed leveling
394
 
445
 
395
 #ifdef MANUAL_BED_LEVELING
446
 #ifdef MANUAL_BED_LEVELING
396
-  #define MBL_Z_STEP 0.025
447
+  #define MBL_Z_STEP 0.025  // Step size while manually probing Z axis
397
 #endif  // MANUAL_BED_LEVELING
448
 #endif  // MANUAL_BED_LEVELING
398
 
449
 
399
 #ifdef MESH_BED_LEVELING
450
 #ifdef MESH_BED_LEVELING
410
 //============================= Bed Auto Leveling ===========================
461
 //============================= Bed Auto Leveling ===========================
411
 //===========================================================================
462
 //===========================================================================
412
 
463
 
464
+// @section bedlevel
465
+
413
 //#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line)
466
 //#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line)
414
 #define Z_PROBE_REPEATABILITY_TEST  // If not commented out, Z-Probe Repeatability test will be included if Auto Bed Leveling is Enabled.
467
 #define Z_PROBE_REPEATABILITY_TEST  // If not commented out, Z-Probe Repeatability test will be included if Auto Bed Leveling is Enabled.
415
 
468
 
518
 #endif // ENABLE_AUTO_BED_LEVELING
571
 #endif // ENABLE_AUTO_BED_LEVELING
519
 
572
 
520
 
573
 
574
+// @section homing
575
+
521
 // The position of the homing switches
576
 // The position of the homing switches
522
 //#define MANUAL_HOME_POSITIONS  // If defined, MANUAL_*_HOME_POS below will be used
577
 //#define MANUAL_HOME_POSITIONS  // If defined, MANUAL_*_HOME_POS below will be used
523
 //#define BED_CENTER_AT_0_0  // If defined, the center of the bed is at (X=0, Y=0)
578
 //#define BED_CENTER_AT_0_0  // If defined, the center of the bed is at (X=0, Y=0)
531
   //#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing.
586
   //#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing.
532
 #endif
587
 #endif
533
 
588
 
589
+// @section movement
590
+
534
 /**
591
 /**
535
  * MOVEMENT SETTINGS
592
  * MOVEMENT SETTINGS
536
  */
593
  */
547
 #define DEFAULT_RETRACT_ACCELERATION  1000   // E acceleration in mm/s^2 for retracts
604
 #define DEFAULT_RETRACT_ACCELERATION  1000   // E acceleration in mm/s^2 for retracts
548
 #define DEFAULT_TRAVEL_ACCELERATION   1000    // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves
605
 #define DEFAULT_TRAVEL_ACCELERATION   1000    // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves
549
 
606
 
550
-
551
-// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
552
-// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).
553
-// For the other hotends it is their distance from the extruder 0 hotend.
554
-// #define EXTRUDER_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis
555
-// #define EXTRUDER_OFFSET_Y {0.0, 5.00}  // (in mm) for each extruder, offset of the hotend on the Y axis
556
-
557
 // The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously)
607
 // The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously)
558
 #define DEFAULT_XYJERK                20.0    // (mm/sec)
608
 #define DEFAULT_XYJERK                20.0    // (mm/sec)
559
 #define DEFAULT_ZJERK                 0.4     // (mm/sec)
609
 #define DEFAULT_ZJERK                 0.4     // (mm/sec)
564
 //============================= Additional Features ===========================
614
 //============================= Additional Features ===========================
565
 //=============================================================================
615
 //=============================================================================
566
 
616
 
617
+// @section more
618
+
567
 // Custom M code points
619
 // Custom M code points
568
 #define CUSTOM_M_CODES
620
 #define CUSTOM_M_CODES
569
 #ifdef CUSTOM_M_CODES
621
 #ifdef CUSTOM_M_CODES
574
   #endif
626
   #endif
575
 #endif
627
 #endif
576
 
628
 
629
+// @section extras
577
 
630
 
578
 // EEPROM
631
 // EEPROM
579
 // The microcontroller can store settings in the EEPROM, e.g. max velocity...
632
 // The microcontroller can store settings in the EEPROM, e.g. max velocity...
588
   #define EEPROM_CHITCHAT // please keep turned on if you can.
641
   #define EEPROM_CHITCHAT // please keep turned on if you can.
589
 #endif
642
 #endif
590
 
643
 
644
+
645
+// @section temperature
646
+
591
 // Preheat Constants
647
 // Preheat Constants
592
 #define PLA_PREHEAT_HOTEND_TEMP 190
648
 #define PLA_PREHEAT_HOTEND_TEMP 190
593
-#define PLA_PREHEAT_HPB_TEMP 50
649
+#define PLA_PREHEAT_HPB_TEMP 50 // K8200: set back to 70 if you have an upgraded heatbed power supply
594
 #define PLA_PREHEAT_FAN_SPEED 0   // Insert Value between 0 and 255
650
 #define PLA_PREHEAT_FAN_SPEED 0   // Insert Value between 0 and 255
595
 
651
 
596
 #define ABS_PREHEAT_HOTEND_TEMP 240
652
 #define ABS_PREHEAT_HOTEND_TEMP 240
597
-#define ABS_PREHEAT_HPB_TEMP 60
653
+#define ABS_PREHEAT_HPB_TEMP 60 // K8200: set back to 110 if you have an upgraded heatbed power supply
598
 #define ABS_PREHEAT_FAN_SPEED 0   // Insert Value between 0 and 255
654
 #define ABS_PREHEAT_FAN_SPEED 0   // Insert Value between 0 and 255
599
 
655
 
600
 //==============================LCD and SD support=============================
656
 //==============================LCD and SD support=============================
657
+// @section lcd
601
 
658
 
602
 // Define your display language below. Replace (en) with your language code and uncomment.
659
 // Define your display language below. Replace (en) with your language code and uncomment.
603
-// en, pl, fr, de, es, ru, bg, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
660
+// en, pl, fr, de, es, ru, bg, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, cn, test
604
 // See also language.h
661
 // See also language.h
605
-//#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
662
+#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
606
 
663
 
607
 // Choose ONE of these 3 charsets. This has to match your hardware. Ignored for full graphic display.
664
 // Choose ONE of these 3 charsets. This has to match your hardware. Ignored for full graphic display.
608
 // 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.
665
 // 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.
609
 // See also documentation/LCDLanguageFont.md
666
 // See also documentation/LCDLanguageFont.md
610
-  #define DISPLAY_CHARSET_HD44780_JAPAN        // this is the most common hardware
667
+  #define DISPLAY_CHARSET_HD44780_JAPAN        // K8200: for Display VM8201 // this is the most common hardware
611
   //#define DISPLAY_CHARSET_HD44780_WESTERN
668
   //#define DISPLAY_CHARSET_HD44780_WESTERN
612
   //#define DISPLAY_CHARSET_HD44780_CYRILLIC
669
   //#define DISPLAY_CHARSET_HD44780_CYRILLIC
613
 
670
 
618
 //#define SD_CHECK_AND_RETRY // Use CRC checks and retries on the SD communication
675
 //#define SD_CHECK_AND_RETRY // Use CRC checks and retries on the SD communication
619
 //#define ENCODER_PULSES_PER_STEP 1 // Increase if you have a high resolution encoder
676
 //#define ENCODER_PULSES_PER_STEP 1 // Increase if you have a high resolution encoder
620
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
677
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
621
-#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
678
+#define ULTIMAKERCONTROLLER // K8200: for Display VM8201 // as available from the Ultimaker online store.
622
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
679
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
623
-//#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
624
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
680
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
625
-                                               // 0 to disable buzzer feedback  
681
+//#define LCD_FEEDBACK_FREQUENCY_HZ 1000         // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
682
+                                                 // 0 to disable buzzer feedback. Test with M300 S<frequency Hz> P<duration ms>
626
 
683
 
627
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
684
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
628
 // http://reprap.org/wiki/PanelOne
685
 // http://reprap.org/wiki/PanelOne
681
 
738
 
682
 //#define SAV_3DLCD
739
 //#define SAV_3DLCD
683
 
740
 
741
+// @section extras
742
+
684
 // Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
743
 // Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
685
 //#define FAST_PWM_FAN
744
 //#define FAST_PWM_FAN
686
 
745
 
704
 // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
763
 // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
705
 // #define PHOTOGRAPH_PIN     23
764
 // #define PHOTOGRAPH_PIN     23
706
 
765
 
707
-// SF send wrong arc g-codes when using Arc Point as fillet procedure
766
+// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
708
 //#define SF_ARC_FIX
767
 //#define SF_ARC_FIX
709
 
768
 
710
 // Support for the BariCUDA Paste Extruder.
769
 // Support for the BariCUDA Paste Extruder.
758
 #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)
817
 #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)
759
 
818
 
760
 //defines used in the code
819
 //defines used in the code
761
-#define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially 
820
+#define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially
762
 
821
 
763
 //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.
822
 //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.
764
 //#define FILAMENT_LCD_DISPLAY
823
 //#define FILAMENT_LCD_DISPLAY

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

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

+ 13
- 6
Marlin/example_configurations/K8200/readme.md 查看文件

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 form 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
6
 
6
 
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_marlinv2.zip](http://www.k8200.eu/downloads/files/downloads/firmware_k8200_marlinv2.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
15
+
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
18
+
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

+ 9
- 7
Marlin/example_configurations/SCARA/Configuration.h 查看文件

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
80
   #define MOTHERBOARD BOARD_RAMPS_13_EFB
79
   #define MOTHERBOARD BOARD_RAMPS_13_EFB
81
 #endif
80
 #endif
82
 
81
 
83
-// Define this to set a custom name for your generic Mendel,
84
-// #define CUSTOM_MENDEL_NAME "This Mendel"
82
+// Optional custom name for your RepStrap or other custom machine
83
+// Displayed in the LCD "Ready" message
84
+// #define CUSTOM_MACHINE_NAME "3D Printer"
85
 
85
 
86
 // Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines)
86
 // Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines)
87
 // You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4)
87
 // You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4)
357
 const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
357
 const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
358
 const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
358
 const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
359
 const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
359
 const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
360
+const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
360
 //#define DISABLE_MAX_ENDSTOPS
361
 //#define DISABLE_MAX_ENDSTOPS
361
 //#define DISABLE_MIN_ENDSTOPS
362
 //#define DISABLE_MIN_ENDSTOPS
362
 
363
 
367
 #define E_ENABLE_ON 0 // For all extruders
368
 #define E_ENABLE_ON 0 // For all extruders
368
 
369
 
369
 // Disables axis when it's not being used.
370
 // Disables axis when it's not being used.
371
+// WARNING: When motors turn off there is a chance of losing position accuracy!
370
 #define DISABLE_X false
372
 #define DISABLE_X false
371
 #define DISABLE_Y false
373
 #define DISABLE_Y false
372
 #define DISABLE_Z false
374
 #define DISABLE_Z false
623
 //==============================LCD and SD support=============================
625
 //==============================LCD and SD support=============================
624
 
626
 
625
 // Define your display language below. Replace (en) with your language code and uncomment.
627
 // Define your display language below. Replace (en) with your language code and uncomment.
626
-// en, pl, fr, de, es, ru, bg, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
628
+// en, pl, fr, de, es, ru, bg, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, cn, test
627
 // See also language.h
629
 // See also language.h
628
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
630
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
629
 
631
 
643
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
645
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
644
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
646
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
645
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
647
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
646
-//#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
647
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
648
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
648
-                                               // 0 to disable buzzer feedback  
649
+//#define LCD_FEEDBACK_FREQUENCY_HZ 1000         // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
650
+                                                 // 0 to disable buzzer feedback. Test with M300 S<frequency Hz> P<duration ms>
649
 
651
 
650
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
652
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
651
 // http://reprap.org/wiki/PanelOne
653
 // http://reprap.org/wiki/PanelOne

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

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

+ 10
- 10
Marlin/example_configurations/WITBOX/Configuration.h 查看文件

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
58
 
57
 
59
 // The following define selects which electronics board you have.
58
 // The following define selects which electronics board you have.
60
 // Please choose the name from boards.h that matches your setup
59
 // Please choose the name from boards.h that matches your setup
61
-#ifndef MOTHERBOARD
62
-  #define MOTHERBOARD BOARD_WITBOX
63
-#endif
60
+#define MOTHERBOARD BOARD_WITBOX
64
 
61
 
65
-// Define this to set a custom name for your generic Mendel,
66
-// #define CUSTOM_MENDEL_NAME "This Mendel"
62
+// Optional custom name for your RepStrap or other custom machine
63
+// Displayed in the LCD "Ready" message
64
+// #define CUSTOM_MACHINE_NAME "3D Printer"
67
 
65
 
68
 // Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines)
66
 // 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)
67
 // You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4)
327
 const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
325
 const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
328
 const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
326
 const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
329
 const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
327
 const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
328
+const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
330
 //#define DISABLE_MAX_ENDSTOPS
329
 //#define DISABLE_MAX_ENDSTOPS
331
 //#define DISABLE_MIN_ENDSTOPS
330
 //#define DISABLE_MIN_ENDSTOPS
332
 
331
 
337
 #define E_ENABLE_ON 0 // For all extruders
336
 #define E_ENABLE_ON 0 // For all extruders
338
 
337
 
339
 // Disables axis when it's not being used.
338
 // Disables axis when it's not being used.
339
+// WARNING: When motors turn off there is a chance of losing position accuracy!
340
 #define DISABLE_X false
340
 #define DISABLE_X false
341
 #define DISABLE_Y false
341
 #define DISABLE_Y false
342
 #define DISABLE_Z true
342
 #define DISABLE_Z true
593
 //==============================LCD and SD support=============================
593
 //==============================LCD and SD support=============================
594
 
594
 
595
 // Define your display language below. Replace (en) with your language code and uncomment.
595
 // Define your display language below. Replace (en) with your language code and uncomment.
596
-// en, pl, fr, de, es, ru, bg, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
596
+// en, pl, fr, de, es, ru, bg, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, cn, test
597
 // See also language.h
597
 // See also language.h
598
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
598
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
599
 
599
 
613
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
613
 //#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.
614
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
615
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
615
 //#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
616
 //#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  
617
+//#define LCD_FEEDBACK_FREQUENCY_HZ 1000         // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
618
+                                                 // 0 to disable buzzer feedback. Test with M300 S<frequency Hz> P<duration ms>
619
 
619
 
620
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
620
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
621
 // http://reprap.org/wiki/PanelOne
621
 // http://reprap.org/wiki/PanelOne

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

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

+ 8
- 6
Marlin/example_configurations/delta/generic/Configuration.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
62
   #define MOTHERBOARD BOARD_RAMPS_13_EFB
61
   #define MOTHERBOARD BOARD_RAMPS_13_EFB
63
 #endif
62
 #endif
64
 
63
 
65
-// Define this to set a custom name for your generic Mendel,
66
-// #define CUSTOM_MENDEL_NAME "This Mendel"
64
+// Optional custom name for your RepStrap or other custom machine
65
+// Displayed in the LCD "Ready" message
66
+#define CUSTOM_MACHINE_NAME "Deltabot"
67
 
67
 
68
 // Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines)
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)
69
 // You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4)
355
 const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
355
 const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
356
 const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
356
 const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
357
 const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
357
 const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
358
+const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
358
 //#define DISABLE_MAX_ENDSTOPS
359
 //#define DISABLE_MAX_ENDSTOPS
359
 #define DISABLE_MIN_ENDSTOPS // Deltas only use min endstops for probing
360
 #define DISABLE_MIN_ENDSTOPS // Deltas only use min endstops for probing
360
 
361
 
365
 #define E_ENABLE_ON 0 // For all extruders
366
 #define E_ENABLE_ON 0 // For all extruders
366
 
367
 
367
 // Disables axis when it's not being used.
368
 // Disables axis when it's not being used.
369
+// WARNING: When motors turn off there is a chance of losing position accuracy!
368
 #define DISABLE_X false
370
 #define DISABLE_X false
369
 #define DISABLE_Y false
371
 #define DISABLE_Y false
370
 #define DISABLE_Z false
372
 #define DISABLE_Z false
640
 //==============================LCD and SD support=============================
642
 //==============================LCD and SD support=============================
641
 
643
 
642
 // 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.
643
-// en, pl, fr, de, es, ru, bg, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
645
+// en, pl, fr, de, es, ru, bg, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, cn, test
644
 // See also language.h
646
 // See also language.h
645
 #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
647
 #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
646
 
648
 
660
 //#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
661
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
663
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
662
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
664
 //#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
665
 //#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  
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>
666
 
668
 
667
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
669
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
668
 // http://reprap.org/wiki/PanelOne
670
 // http://reprap.org/wiki/PanelOne

+ 4
- 2
Marlin/example_configurations/delta/generic/Configuration_adv.h 查看文件

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

+ 8
- 6
Marlin/example_configurations/delta/kossel_mini/Configuration.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
62
   #define MOTHERBOARD BOARD_RAMPS_13_EFB
61
   #define MOTHERBOARD BOARD_RAMPS_13_EFB
63
 #endif
62
 #endif
64
 
63
 
65
-// Define this to set a custom name for your generic Mendel,
66
-#define CUSTOM_MENDEL_NAME "Mini Kossel"
64
+// Optional custom name for your RepStrap or other custom machine
65
+// Displayed in the LCD "Ready" message
66
+#define CUSTOM_MACHINE_NAME "Mini Kossel"
67
 
67
 
68
 // Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines)
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)
69
 // You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4)
355
 const bool X_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
355
 const bool X_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
356
 const bool Y_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
356
 const bool Y_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
357
 const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
357
 const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
358
+const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
358
 //#define DISABLE_MAX_ENDSTOPS
359
 //#define DISABLE_MAX_ENDSTOPS
359
 //#define DISABLE_MIN_ENDSTOPS // Deltas only use min endstops for probing
360
 //#define DISABLE_MIN_ENDSTOPS // Deltas only use min endstops for probing
360
 
361
 
365
 #define E_ENABLE_ON 0 // For all extruders
366
 #define E_ENABLE_ON 0 // For all extruders
366
 
367
 
367
 // Disables axis when it's not being used.
368
 // Disables axis when it's not being used.
369
+// WARNING: When motors turn off there is a chance of losing position accuracy!
368
 #define DISABLE_X false
370
 #define DISABLE_X false
369
 #define DISABLE_Y false
371
 #define DISABLE_Y false
370
 #define DISABLE_Z false
372
 #define DISABLE_Z false
644
 //==============================LCD and SD support=============================
646
 //==============================LCD and SD support=============================
645
 
647
 
646
 // Define your display language below. Replace (en) with your language code and uncomment.
648
 // Define your display language below. Replace (en) with your language code and uncomment.
647
-// en, pl, fr, de, es, ru, bg, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
649
+// en, pl, fr, de, es, ru, bg, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, cn, test
648
 // See also language.h
650
 // See also language.h
649
 #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
651
 #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
650
 
652
 
664
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
666
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
665
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
667
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
666
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
668
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
667
-//#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
668
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
669
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
669
-                                               // 0 to disable buzzer feedback  
670
+//#define LCD_FEEDBACK_FREQUENCY_HZ 1000         // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
671
+                                                 // 0 to disable buzzer feedback. Test with M300 S<frequency Hz> P<duration ms>
670
 
672
 
671
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
673
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
672
 // http://reprap.org/wiki/PanelOne
674
 // http://reprap.org/wiki/PanelOne

+ 4
- 2
Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h 查看文件

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

+ 10
- 7
Marlin/example_configurations/makibox/Configuration.h 查看文件

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
62
   #define MOTHERBOARD BOARD_5DPRINT
61
   #define MOTHERBOARD BOARD_5DPRINT
63
 #endif
62
 #endif
64
 
63
 
65
-// Define this to set a custom name for your generic Mendel,
66
-// #define CUSTOM_MENDEL_NAME "This Mendel"
64
+// Optional custom name for your RepStrap or other custom machine
65
+// Displayed in the LCD "Ready" message
66
+// #define CUSTOM_MACHINE_NAME "3D Printer"
67
 
67
 
68
 // Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines)
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)
69
 // You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4)
325
 const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
325
 const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
326
 const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
326
 const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
327
 const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
327
 const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
328
+const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
328
 //#define DISABLE_MAX_ENDSTOPS
329
 //#define DISABLE_MAX_ENDSTOPS
329
 //#define DISABLE_MIN_ENDSTOPS
330
 //#define DISABLE_MIN_ENDSTOPS
330
 
331
 
335
 #define E_ENABLE_ON 0 // For all extruders
336
 #define E_ENABLE_ON 0 // For all extruders
336
 
337
 
337
 // Disables axis when it's not being used.
338
 // Disables axis when it's not being used.
339
+// WARNING: When motors turn off there is a chance of losing position accuracy!
338
 #define DISABLE_X false
340
 #define DISABLE_X false
339
 #define DISABLE_Y false
341
 #define DISABLE_Y false
340
 #define DISABLE_Z false
342
 #define DISABLE_Z false
591
 //==============================LCD and SD support=============================
593
 //==============================LCD and SD support=============================
592
 
594
 
593
 // Define your display language below. Replace (en) with your language code and uncomment.
595
 // Define your display language below. Replace (en) with your language code and uncomment.
594
-// en, pl, fr, de, es, ru, bg, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
596
+// en, pl, fr, de, es, ru, bg, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, cn, test
597
+
595
 // See also language.h
598
 // See also language.h
596
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
599
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
597
 
600
 
611
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
614
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
612
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
615
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
613
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
616
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
614
-//#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
615
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
617
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
616
-                                               // 0 to disable buzzer feedback  
618
+//#define LCD_FEEDBACK_FREQUENCY_HZ 1000         // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
619
+                                                 // 0 to disable buzzer feedback. Test with M300 S<frequency Hz> P<duration ms>
617
 
620
 
618
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
621
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
619
 // http://reprap.org/wiki/PanelOne
622
 // http://reprap.org/wiki/PanelOne

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

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

+ 10
- 7
Marlin/example_configurations/tvrrug/Round2/Configuration.h 查看文件

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
62
   #define MOTHERBOARD BOARD_OMCA
61
   #define MOTHERBOARD BOARD_OMCA
63
 #endif
62
 #endif
64
 
63
 
65
-// Define this to set a custom name for your generic Mendel,
66
-// #define CUSTOM_MENDEL_NAME "This Mendel"
64
+// Optional custom name for your RepStrap or other custom machine
65
+// Displayed in the LCD "Ready" message
66
+// #define CUSTOM_MACHINE_NAME "3D Printer"
67
 
67
 
68
 // Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines)
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)
69
 // You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4)
327
 const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
327
 const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
328
 const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
328
 const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
329
 const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
329
 const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
330
+const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
330
 //#define DISABLE_MAX_ENDSTOPS
331
 //#define DISABLE_MAX_ENDSTOPS
331
 //#define DISABLE_MIN_ENDSTOPS
332
 //#define DISABLE_MIN_ENDSTOPS
332
 
333
 
337
 #define E_ENABLE_ON 1 // For all extruders
338
 #define E_ENABLE_ON 1 // For all extruders
338
 
339
 
339
 // Disables axis when it's not being used.
340
 // Disables axis when it's not being used.
341
+// WARNING: When motors turn off there is a chance of losing position accuracy!
340
 #define DISABLE_X false
342
 #define DISABLE_X false
341
 #define DISABLE_Y false
343
 #define DISABLE_Y false
342
 #define DISABLE_Z false
344
 #define DISABLE_Z false
597
 //==============================LCD and SD support=============================
599
 //==============================LCD and SD support=============================
598
 
600
 
599
 // Define your display language below. Replace (en) with your language code and uncomment.
601
 // Define your display language below. Replace (en) with your language code and uncomment.
600
-// en, pl, fr, de, es, ru, bg, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
602
+// en, pl, fr, de, es, ru, bg, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, cn, test
603
+
601
 // See also language.h
604
 // See also language.h
602
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
605
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
603
 
606
 
617
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
620
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
618
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
621
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
619
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
622
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
620
-//#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
621
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
623
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
622
-                                               // 0 to disable buzzer feedback  
624
+//#define LCD_FEEDBACK_FREQUENCY_HZ 1000         // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
625
+                                                 // 0 to disable buzzer feedback. Test with M300 S<frequency Hz> P<duration ms>
623
 
626
 
624
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
627
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
625
 // http://reprap.org/wiki/PanelOne
628
 // http://reprap.org/wiki/PanelOne

+ 4
- 2
Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h 查看文件

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

二進制
Marlin/fonts/ISO10646_CN.fon 查看文件


+ 21
- 1
Marlin/fonts/README.fonts 查看文件

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 查看文件

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

+ 10
- 5
Marlin/language.h 查看文件

31
 // eu       Basque-Euskera
31
 // eu       Basque-Euskera
32
 // kana     Japanese
32
 // kana     Japanese
33
 // kana_utf Japanese
33
 // kana_utf Japanese
34
+// cn       Chinese
34
 
35
 
35
 #ifndef LANGUAGE_INCLUDE
36
 #ifndef LANGUAGE_INCLUDE
36
   // pick your language from the list above
37
   // pick your language from the list above
71
   #endif
72
   #endif
72
 #else
73
 #else
73
   #ifndef MACHINE_NAME
74
   #ifndef MACHINE_NAME
74
-    #define MACHINE_NAME "Mendel"
75
+    #define MACHINE_NAME "3D Printer"
75
   #endif
76
   #endif
76
 #endif
77
 #endif
77
 
78
 
78
 #ifdef CUSTOM_MENDEL_NAME
79
 #ifdef CUSTOM_MENDEL_NAME
79
-  #warning CUSTOM_MENDEL_NAME deprecated - use CUSTOM_MACHINE_NAME
80
+  #error CUSTOM_MENDEL_NAME deprecated - use CUSTOM_MACHINE_NAME
80
   #define CUSTOM_MACHINE_NAME CUSTOM_MENDEL_NAME
81
   #define CUSTOM_MACHINE_NAME CUSTOM_MENDEL_NAME
81
 #endif
82
 #endif
82
 
83
 
111
 
112
 
112
 // Serial Console Messages (do not translate those!)
113
 // Serial Console Messages (do not translate those!)
113
 
114
 
114
-#define MSG_Enqueing                        "enqueing \""
115
+#define MSG_Enqueueing                      "enqueueing \""
115
 #define MSG_POWERUP                         "PowerUp"
116
 #define MSG_POWERUP                         "PowerUp"
116
 #define MSG_EXTERNAL_RESET                  " External Reset"
117
 #define MSG_EXTERNAL_RESET                  " External Reset"
117
 #define MSG_BROWNOUT_RESET                  " Brown out Reset"
118
 #define MSG_BROWNOUT_RESET                  " Brown out Reset"
123
 #define MSG_PLANNER_BUFFER_BYTES            "  PlannerBufferBytes: "
124
 #define MSG_PLANNER_BUFFER_BYTES            "  PlannerBufferBytes: "
124
 #define MSG_OK                              "ok"
125
 #define MSG_OK                              "ok"
125
 #define MSG_FILE_SAVED                      "Done saving file."
126
 #define MSG_FILE_SAVED                      "Done saving file."
126
-#define MSG_ERR_LINE_NO                     "Line Number is not Last Line Number+1, Last Line: "
127
+#define MSG_ERR_LINE_NO1                    "Line Number out of sequence. Expected: "
128
+#define MSG_ERR_LINE_NO2                    " Got: "
127
 #define MSG_ERR_CHECKSUM_MISMATCH           "checksum mismatch, Last Line: "
129
 #define MSG_ERR_CHECKSUM_MISMATCH           "checksum mismatch, Last Line: "
128
 #define MSG_ERR_NO_CHECKSUM                 "No Checksum with line number, Last Line: "
130
 #define MSG_ERR_NO_CHECKSUM                 "No Checksum with line number, Last Line: "
129
 #define MSG_ERR_NO_LINENUMBER_WITH_CHECKSUM "No Line Number with checksum, Last Line: "
131
 #define MSG_ERR_NO_LINENUMBER_WITH_CHECKSUM "No Line Number with checksum, Last Line: "
158
 #define MSG_Z_MAX                           "z_max: "
160
 #define MSG_Z_MAX                           "z_max: "
159
 #define MSG_Z2_MAX                          "z2_max: "
161
 #define MSG_Z2_MAX                          "z2_max: "
160
 #define MSG_Z_PROBE                         "z_probe: "
162
 #define MSG_Z_PROBE                         "z_probe: "
163
+#define MSG_ERR_MATERIAL_INDEX              "M145 S<index> out of range (0-1)"
164
+#define MSG_ERR_M421_REQUIRES_XYZ           "M421 requires XYZ parameters"
165
+#define MSG_ERR_MESH_INDEX_OOB              "Mesh XY index is out of bounds"
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 查看文件

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 查看文件

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 查看文件

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
 

+ 12
- 12
Marlin/language_es.h 查看文件

17
 #define MSG_SD_INSERTED                     "Tarjeta colocada"
17
 #define MSG_SD_INSERTED                     "Tarjeta colocada"
18
 #define MSG_SD_REMOVED                      "Tarjeta retirada"
18
 #define MSG_SD_REMOVED                      "Tarjeta retirada"
19
 #define MSG_MAIN                            "Menu principal"
19
 #define MSG_MAIN                            "Menu principal"
20
-#define MSG_AUTOSTART                       " Autostart"
20
+#define MSG_AUTOSTART                       "Autostart"
21
 #define MSG_DISABLE_STEPPERS                "Apagar motores"
21
 #define MSG_DISABLE_STEPPERS                "Apagar motores"
22
 #define MSG_AUTO_HOME                       "Llevar al origen"
22
 #define MSG_AUTO_HOME                       "Llevar al origen"
23
 #define MSG_SET_HOME_OFFSETS                "Ajustar offsets"
23
 #define MSG_SET_HOME_OFFSETS                "Ajustar offsets"
46
 #define MSG_MOVE_1MM                        "Mover 1mm"
46
 #define MSG_MOVE_1MM                        "Mover 1mm"
47
 #define MSG_MOVE_10MM                       "Mover 10mm"
47
 #define MSG_MOVE_10MM                       "Mover 10mm"
48
 #define MSG_SPEED                           "Velocidad"
48
 #define MSG_SPEED                           "Velocidad"
49
-#define MSG_NOZZLE                          "Nozzle"
49
+#define MSG_NOZZLE                          "Fusor"
50
 #define MSG_BED                             "Base"
50
 #define MSG_BED                             "Base"
51
 #define MSG_FAN_SPEED                       "Ventilador"
51
 #define MSG_FAN_SPEED                       "Ventilador"
52
 #define MSG_FLOW                            "Flujo"
52
 #define MSG_FLOW                            "Flujo"
80
 #define MSG_ESTEPS                          "E pasos/mm"
80
 #define MSG_ESTEPS                          "E pasos/mm"
81
 #define MSG_TEMPERATURE                     "Temperatura"
81
 #define MSG_TEMPERATURE                     "Temperatura"
82
 #define MSG_MOTION                          "Movimiento"
82
 #define MSG_MOTION                          "Movimiento"
83
-#define MSG_VOLUMETRIC                      "Filament"
83
+#define MSG_VOLUMETRIC                      "Filamento"
84
 #define MSG_VOLUMETRIC_ENABLED		        "E in mm3"
84
 #define MSG_VOLUMETRIC_ENABLED		        "E in mm3"
85
 #define MSG_FILAMENT_SIZE_EXTRUDER_0        "Fil. Dia. 1"
85
 #define MSG_FILAMENT_SIZE_EXTRUDER_0        "Fil. Dia. 1"
86
 #define MSG_FILAMENT_SIZE_EXTRUDER_1        "Fil. Dia. 2"
86
 #define MSG_FILAMENT_SIZE_EXTRUDER_1        "Fil. Dia. 2"
116
 #define MSG_FILAMENTCHANGE                  "Cambiar filamento"
116
 #define MSG_FILAMENTCHANGE                  "Cambiar filamento"
117
 #define MSG_INIT_SDCARD                     "Iniciando tarjeta"
117
 #define MSG_INIT_SDCARD                     "Iniciando tarjeta"
118
 #define MSG_CNG_SDCARD                      "Cambiar tarjeta"
118
 #define MSG_CNG_SDCARD                      "Cambiar tarjeta"
119
-#define MSG_ZPROBE_OUT                      "sonda Z fuera"
119
+#define MSG_ZPROBE_OUT                      "Sonda Z fuera"
120
 #define MSG_POSITION_UNKNOWN                "Reiniciar X/Y y Z"
120
 #define MSG_POSITION_UNKNOWN                "Reiniciar X/Y y Z"
121
 #define MSG_ZPROBE_ZOFFSET                  "Offset Z"
121
 #define MSG_ZPROBE_ZOFFSET                  "Offset Z"
122
-#define MSG_BABYSTEP_X                      "Babystep X"
123
-#define MSG_BABYSTEP_Y                      "Babystep Y"
124
-#define MSG_BABYSTEP_Z                      "Babystep Z"
122
+#define MSG_BABYSTEP_X                      "Micropaso X"
123
+#define MSG_BABYSTEP_Y                      "Micropaso Y"
124
+#define MSG_BABYSTEP_Z                      "Micropaso Z"
125
 #define MSG_ENDSTOP_ABORT                   "Endstop abort"
125
 #define MSG_ENDSTOP_ABORT                   "Endstop abort"
126
 #define MSG_END_HOUR                        "horas"
126
 #define MSG_END_HOUR                        "horas"
127
 #define MSG_END_MINUTE                      "minutos"
127
 #define MSG_END_MINUTE                      "minutos"
128
 
128
 
129
 #ifdef DELTA_CALIBRATION_MENU
129
 #ifdef DELTA_CALIBRATION_MENU
130
-    #define MSG_DELTA_CALIBRATE             "Delta Calibration"
131
-    #define MSG_DELTA_CALIBRATE_X           "Calibrate X"
132
-    #define MSG_DELTA_CALIBRATE_Y           "Calibrate Y"
133
-    #define MSG_DELTA_CALIBRATE_Z           "Calibrate Z"
134
-    #define MSG_DELTA_CALIBRATE_CENTER      "Calibrate Center"
130
+    #define MSG_DELTA_CALIBRATE             "Calibracion Delta"
131
+    #define MSG_DELTA_CALIBRATE_X           "Calibrar X"
132
+    #define MSG_DELTA_CALIBRATE_Y           "Calibrar Y"
133
+    #define MSG_DELTA_CALIBRATE_Z           "Calibrar Z"
134
+    #define MSG_DELTA_CALIBRATE_CENTER      "Calibrar Centro"
135
 #endif // DELTA_CALIBRATION_MENU
135
 #endif // DELTA_CALIBRATION_MENU
136
 
136
 
137
 #endif // LANGUAGE_ES_H
137
 #endif // LANGUAGE_ES_H

+ 2
- 0
Marlin/pins.h 查看文件

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 查看文件

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 查看文件

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 查看文件

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

+ 88
- 94
Marlin/planner.cpp 查看文件

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"
60
 
57
 
61
 #ifdef MESH_BED_LEVELING
58
 #ifdef MESH_BED_LEVELING
62
   #include "mesh_bed_leveling.h"
59
   #include "mesh_bed_leveling.h"
63
-#endif  // MESH_BED_LEVELING
60
+#endif
64
 
61
 
65
 //===========================================================================
62
 //===========================================================================
66
 //============================= public variables ============================
63
 //============================= public variables ============================
67
 //===========================================================================
64
 //===========================================================================
68
 
65
 
69
-unsigned long minsegmenttime;
66
+millis_t minsegmenttime;
70
 float max_feedrate[NUM_AXIS]; // Max speeds in mm per minute
67
 float max_feedrate[NUM_AXIS]; // Max speeds in mm per minute
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
 //===========================================================================
116
-#ifdef PREVENT_DANGEROUS_EXTRUDE
117
-  float extrude_min_temp = EXTRUDE_MINTEMP;
118
-#endif
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
+
119
 #ifdef XY_FREQUENCY_LIMIT
115
 #ifdef XY_FREQUENCY_LIMIT
120
   // Used for the frequency limit
116
   // Used for the frequency limit
121
   #define MAX_FREQ_TIME (1000000.0/XY_FREQUENCY_LIMIT)
117
   #define MAX_FREQ_TIME (1000000.0/XY_FREQUENCY_LIMIT)
129
   static char meas_sample; //temporary variable to hold filament measurement sample
125
   static char meas_sample; //temporary variable to hold filament measurement sample
130
 #endif
126
 #endif
131
 
127
 
128
+//===========================================================================
129
+//================================ functions ================================
130
+//===========================================================================
131
+
132
 // 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
133
 // 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
134
 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); }
135
 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); }
136
 
136
 
137
-//===========================================================================
138
-//================================ Functions ================================
139
-//===========================================================================
140
-
141
 // 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 
142
 // given acceleration:
138
 // given acceleration:
143
 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) {
162
   unsigned long final_rate = ceil(block->nominal_rate * exit_factor); // (step/min)
158
   unsigned long final_rate = ceil(block->nominal_rate * exit_factor); // (step/min)
163
 
159
 
164
   // Limit minimal step rate (Otherwise the timer will overflow.)
160
   // Limit minimal step rate (Otherwise the timer will overflow.)
165
-  if (initial_rate < 120) initial_rate = 120;
166
-  if (final_rate < 120) final_rate = 120;
161
+  NOLESS(initial_rate, 120);
162
+  NOLESS(final_rate, 120);
167
 
163
 
168
   long acceleration = block->acceleration_st;
164
   long acceleration = block->acceleration_st;
169
   int32_t accelerate_steps = ceil(estimate_acceleration_distance(initial_rate, block->nominal_rate, acceleration));
165
   int32_t accelerate_steps = ceil(estimate_acceleration_distance(initial_rate, block->nominal_rate, acceleration));
385
     }
381
     }
386
 
382
 
387
     float t = autotemp_min + high * autotemp_factor;
383
     float t = autotemp_min + high * autotemp_factor;
388
-    if (t < autotemp_min) t = autotemp_min;
389
-    if (t > autotemp_max) t = autotemp_max;
390
-    if (oldt > t) t = AUTOTEMP_OLDWEIGHT * oldt + (1 - AUTOTEMP_OLDWEIGHT) * t;
384
+    t = constrain(t, autotemp_min, autotemp_max);
385
+    if (oldt > t) {
386
+      t *= (1 - AUTOTEMP_OLDWEIGHT);
387
+      t += AUTOTEMP_OLDWEIGHT * oldt;
388
+    }
391
     oldt = t;
389
     oldt = t;
392
     setTargetHotend0(t);
390
     setTargetHotend0(t);
393
   }
391
   }
394
 #endif
392
 #endif
395
 
393
 
396
 void check_axes_activity() {
394
 void check_axes_activity() {
397
-  unsigned char axis_active[NUM_AXIS],
395
+  unsigned char axis_active[NUM_AXIS] = { 0 },
398
                 tail_fan_speed = fanSpeed;
396
                 tail_fan_speed = fanSpeed;
399
   #ifdef BARICUDA
397
   #ifdef BARICUDA
400
     unsigned char tail_valve_pressure = ValvePressure,
398
     unsigned char tail_valve_pressure = ValvePressure,
429
 
427
 
430
   #if HAS_FAN
428
   #if HAS_FAN
431
     #ifdef FAN_KICKSTART_TIME
429
     #ifdef FAN_KICKSTART_TIME
432
-      static unsigned long fan_kick_end;
430
+      static millis_t fan_kick_end;
433
       if (tail_fan_speed) {
431
       if (tail_fan_speed) {
434
         if (fan_kick_end == 0) {
432
         if (fan_kick_end == 0) {
435
           // Just starting up fan - run at full power.
433
           // Just starting up fan - run at full power.
507
 
505
 
508
   #ifdef PREVENT_DANGEROUS_EXTRUDE
506
   #ifdef PREVENT_DANGEROUS_EXTRUDE
509
     if (de) {
507
     if (de) {
510
-      if (degHotend(active_extruder) < extrude_min_temp) {
511
-        position[E_AXIS] = target[E_AXIS]; //behave as if the move really took place, but ignore E part
508
+      if (degHotend(extruder) < extrude_min_temp) {
509
+        position[E_AXIS] = target[E_AXIS]; // Behave as if the move really took place, but ignore E part
512
         de = 0; // no difference
510
         de = 0; // no difference
513
         SERIAL_ECHO_START;
511
         SERIAL_ECHO_START;
514
         SERIAL_ECHOLNPGM(MSG_ERR_COLD_EXTRUDE_STOP);
512
         SERIAL_ECHOLNPGM(MSG_ERR_COLD_EXTRUDE_STOP);
544
 
542
 
545
   block->steps[Z_AXIS] = labs(dz);
543
   block->steps[Z_AXIS] = labs(dz);
546
   block->steps[E_AXIS] = labs(de);
544
   block->steps[E_AXIS] = labs(de);
547
-  block->steps[E_AXIS] *= volumetric_multiplier[active_extruder];
548
-  block->steps[E_AXIS] *= extruder_multiply[active_extruder];
545
+  block->steps[E_AXIS] *= volumetric_multiplier[extruder];
546
+  block->steps[E_AXIS] *= extruder_multiply[extruder];
549
   block->steps[E_AXIS] /= 100;
547
   block->steps[E_AXIS] /= 100;
550
   block->step_event_count = max(block->steps[X_AXIS], max(block->steps[Y_AXIS], max(block->steps[Z_AXIS], block->steps[E_AXIS])));
548
   block->step_event_count = max(block->steps[X_AXIS], max(block->steps[Y_AXIS], max(block->steps[Z_AXIS], block->steps[E_AXIS])));
551
 
549
 
654
     }
652
     }
655
   }
653
   }
656
 
654
 
657
-  if (block->steps[E_AXIS]) {
658
-    if (feed_rate < minimumfeedrate) feed_rate = minimumfeedrate;
659
-  }
660
-  else if (feed_rate < mintravelfeedrate) feed_rate = mintravelfeedrate;
655
+  if (block->steps[E_AXIS])
656
+    NOLESS(feed_rate, minimumfeedrate);
657
+  else
658
+    NOLESS(feed_rate, mintravelfeedrate);
661
 
659
 
662
   /**
660
   /**
663
    * This part of the code calculates the total length of the movement. 
661
    * This part of the code calculates the total length of the movement. 
679
     delta_mm[Y_AXIS] = dy / axis_steps_per_unit[Y_AXIS];
677
     delta_mm[Y_AXIS] = dy / axis_steps_per_unit[Y_AXIS];
680
   #endif
678
   #endif
681
   delta_mm[Z_AXIS] = dz / axis_steps_per_unit[Z_AXIS];
679
   delta_mm[Z_AXIS] = dz / axis_steps_per_unit[Z_AXIS];
682
-  delta_mm[E_AXIS] = (de / axis_steps_per_unit[E_AXIS]) * volumetric_multiplier[active_extruder] * extruder_multiply[active_extruder] / 100.0;
680
+  delta_mm[E_AXIS] = (de / axis_steps_per_unit[E_AXIS]) * volumetric_multiplier[extruder] * extruder_multiply[extruder] / 100.0;
683
 
681
 
684
   if (block->steps[X_AXIS] <= dropsegments && block->steps[Y_AXIS] <= dropsegments && block->steps[Z_AXIS] <= dropsegments) {
682
   if (block->steps[X_AXIS] <= dropsegments && block->steps[Y_AXIS] <= dropsegments && block->steps[Z_AXIS] <= dropsegments) {
685
     block->millimeters = fabs(delta_mm[E_AXIS]);
683
     block->millimeters = fabs(delta_mm[E_AXIS]);
998
   st_set_e_position(position[E_AXIS]);
996
   st_set_e_position(position[E_AXIS]);
999
 }
997
 }
1000
 
998
 
1001
-#ifdef PREVENT_DANGEROUS_EXTRUDE
1002
-  void set_extrude_min_temp(float temp) { extrude_min_temp = temp; }
1003
-#endif
1004
-
1005
 // Calculate the steps/s^2 acceleration rates, based on the mm/s^s
999
 // Calculate the steps/s^2 acceleration rates, based on the mm/s^s
1006
 void reset_acceleration_rates() {
1000
 void reset_acceleration_rates() {
1007
   for (int i = 0; i < NUM_AXIS; i++)
1001
   for (int i = 0; i < NUM_AXIS; i++)

+ 11
- 11
Marlin/planner.h 查看文件

115
 
115
 
116
 void plan_set_e_position(const float &e);
116
 void plan_set_e_position(const float &e);
117
 
117
 
118
-extern unsigned long minsegmenttime;
119
-extern float max_feedrate[NUM_AXIS]; // set the max speeds
118
+//===========================================================================
119
+//============================= public variables ============================
120
+//===========================================================================
121
+
122
+extern millis_t minsegmenttime;
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;
161
     return NULL;
165
     return NULL;
162
 }
166
 }
163
 
167
 
164
-#ifdef PREVENT_DANGEROUS_EXTRUDE
165
-  void set_extrude_min_temp(float temp);
166
-#endif
167
-
168
 void reset_acceleration_rates();
168
 void reset_acceleration_rates();
169
 
169
 
170
-#endif //PLANNER_H
170
+#endif // PLANNER_H

+ 102
- 79
Marlin/stepper.cpp 查看文件

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;
98
 #if HAS_Y_MAX
98
 #if HAS_Y_MAX
99
   static bool old_y_max_endstop = false;
99
   static bool old_y_max_endstop = false;
100
 #endif
100
 #endif
101
-#if HAS_Z_MIN
102
-  static bool old_z_min_endstop = false;
103
-#endif
104
-#if HAS_Z_MAX
105
-  static bool old_z_max_endstop = false;
106
-#endif
101
+
102
+static bool old_z_min_endstop = false;
103
+static bool old_z_max_endstop = false;
104
+
107
 #ifdef Z_DUAL_ENDSTOPS
105
 #ifdef Z_DUAL_ENDSTOPS
108
-  // #if HAS_Z2_MIN
109
-    static bool old_z2_min_endstop = false;
110
-  // #endif
111
-  // #if HAS_Z2_MAX
112
-    static bool old_z2_max_endstop = false;
113
-  // #endif
106
+  static bool old_z2_min_endstop = false;
107
+  static bool old_z2_max_endstop = false;
114
 #endif
108
 #endif
115
 
109
 
116
 #ifdef Z_PROBE_ENDSTOP // No need to check for valid pin, SanityCheck.h already does this.
110
 #ifdef Z_PROBE_ENDSTOP // No need to check for valid pin, SanityCheck.h already does this.
211
 // intRes = longIn1 * longIn2 >> 24
205
 // intRes = longIn1 * longIn2 >> 24
212
 // uses:
206
 // uses:
213
 // r26 to store 0
207
 // r26 to store 0
214
-// r27 to store the byte 1 of the 48bit result
215
-#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) \
216
   asm volatile ( \
216
   asm volatile ( \
217
     "clr r26 \n\t" \
217
     "clr r26 \n\t" \
218
     "mul %A1, %B2 \n\t" \
218
     "mul %A1, %B2 \n\t" \
243
     "lsr r27 \n\t" \
243
     "lsr r27 \n\t" \
244
     "adc %A0, r26 \n\t" \
244
     "adc %A0, r26 \n\t" \
245
     "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" \
246
     "clr r1 \n\t" \
251
     "clr r1 \n\t" \
247
     : \
252
     : \
248
     "=&r" (intRes) \
253
     "=&r" (intRes) \
280
     }
285
     }
281
     #ifdef Z_PROBE_ENDSTOP
286
     #ifdef Z_PROBE_ENDSTOP
282
     if (endstop_z_probe_hit) {
287
     if (endstop_z_probe_hit) {
283
-    	SERIAL_ECHOPAIR(" Z_PROBE:", (float)endstops_trigsteps[Z_AXIS] / axis_steps_per_unit[Z_AXIS]);
284
-    	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");
285
     }
290
     }
286
     #endif
291
     #endif
287
     SERIAL_EOL;
292
     SERIAL_EOL;
319
 //  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
320
 //  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
321
 //  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.
322
-//  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.
323
 
328
 
324
 void st_wake_up() {
329
 void st_wake_up() {
325
   //  TCNT1 = 0;
330
   //  TCNT1 = 0;
400
     current_block = NULL;
405
     current_block = NULL;
401
     plan_discard_current_block();
406
     plan_discard_current_block();
402
     #ifdef SD_FINISHED_RELEASECOMMAND
407
     #ifdef SD_FINISHED_RELEASECOMMAND
403
-      if ((cleaning_buffer_counter == 1) && (SD_FINISHED_STEPPERRELEASE)) enquecommands_P(PSTR(SD_FINISHED_RELEASECOMMAND));
408
+      if ((cleaning_buffer_counter == 1) && (SD_FINISHED_STEPPERRELEASE)) enqueuecommands_P(PSTR(SD_FINISHED_RELEASECOMMAND));
404
     #endif
409
     #endif
405
     cleaning_buffer_counter--;
410
     cleaning_buffer_counter--;
406
     OCR1A = 200;
411
     OCR1A = 200;
407
     return;
412
     return;
408
   }
413
   }
409
-  
414
+
410
   // 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
411
   if (!current_block) {
416
   if (!current_block) {
412
     // Anything in the buffer?
417
     // Anything in the buffer?
458
       count_direction[Y_AXIS] = 1;
463
       count_direction[Y_AXIS] = 1;
459
     }
464
     }
460
 
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
+
461
     #define UPDATE_ENDSTOP(axis,AXIS,minmax,MINMAX) \
473
     #define UPDATE_ENDSTOP(axis,AXIS,minmax,MINMAX) \
462
-      bool axis ##_## minmax ##_endstop = (READ(AXIS ##_## MINMAX ##_PIN) != AXIS ##_## MINMAX ##_ENDSTOP_INVERTING); \
463
-      if (axis ##_## minmax ##_endstop && old_## axis ##_## minmax ##_endstop && (current_block->steps[AXIS ##_AXIS] > 0)) { \
464
-        endstops_trigsteps[AXIS ##_AXIS] = count_position[AXIS ##_AXIS]; \
465
-        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; \
466
         step_events_completed = current_block->step_event_count; \
478
         step_events_completed = current_block->step_event_count; \
467
       } \
479
       } \
468
-      old_## axis ##_## minmax ##_endstop = axis ##_## minmax ##_endstop;
480
+      _OLD_ENDSTOP(axis, minmax) = _ENDSTOP(axis, minmax);
481
+
469
 
482
 
470
     // Check X and Y endstops
483
     // Check X and Y endstops
471
     if (check_endstops) {
484
     if (check_endstops) {
475
         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))) {
476
           if (TEST(out_bits, X_HEAD))
489
           if (TEST(out_bits, X_HEAD))
477
       #else
490
       #else
478
-          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)
479
       #endif
492
       #endif
480
           { // -direction
493
           { // -direction
481
             #ifdef DUAL_X_CARRIAGE
494
             #ifdef DUAL_X_CARRIAGE
482
               // 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
483
               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))
484
-            #endif          
497
+            #endif
485
               {
498
               {
486
                 #if HAS_X_MIN
499
                 #if HAS_X_MIN
487
                   UPDATE_ENDSTOP(x, X, min, MIN);
500
                   UPDATE_ENDSTOP(x, X, min, MIN);
567
           z_probe_endstop=(READ(Z_PROBE_PIN) != Z_PROBE_ENDSTOP_INVERTING);
580
           z_probe_endstop=(READ(Z_PROBE_PIN) != Z_PROBE_ENDSTOP_INVERTING);
568
           if(z_probe_endstop && old_z_probe_endstop)
581
           if(z_probe_endstop && old_z_probe_endstop)
569
           {
582
           {
570
-        	  endstops_trigsteps[Z_AXIS] = count_position[Z_AXIS];
571
-        	  endstop_z_probe_hit=true;
583
+            endstops_trigsteps[Z_AXIS] = count_position[Z_AXIS];
584
+            endstop_z_probe_hit=true;
572
 
585
 
573
-//        	  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");
574
           }
587
           }
575
           old_z_probe_endstop = z_probe_endstop;
588
           old_z_probe_endstop = z_probe_endstop;
576
         #endif
589
         #endif
577
-        
590
+
578
       } // check_endstops
591
       } // check_endstops
579
 
592
 
580
     }
593
     }
620
           #endif // !Z_DUAL_ENDSTOPS
633
           #endif // !Z_DUAL_ENDSTOPS
621
 
634
 
622
         #endif // Z_MAX_PIN
635
         #endif // Z_MAX_PIN
623
-        
636
+
624
         #ifdef Z_PROBE_ENDSTOP
637
         #ifdef Z_PROBE_ENDSTOP
625
           UPDATE_ENDSTOP(z, Z, probe, PROBE);
638
           UPDATE_ENDSTOP(z, Z, probe, PROBE);
626
           z_probe_endstop=(READ(Z_PROBE_PIN) != Z_PROBE_ENDSTOP_INVERTING);
639
           z_probe_endstop=(READ(Z_PROBE_PIN) != Z_PROBE_ENDSTOP_INVERTING);
627
           if(z_probe_endstop && old_z_probe_endstop)
640
           if(z_probe_endstop && old_z_probe_endstop)
628
           {
641
           {
629
-        	  endstops_trigsteps[Z_AXIS] = count_position[Z_AXIS];
630
-        	  endstop_z_probe_hit=true;
631
-//        	  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");
632
           }
645
           }
633
           old_z_probe_endstop = z_probe_endstop;
646
           old_z_probe_endstop = z_probe_endstop;
634
         #endif
647
         #endif
662
         }
675
         }
663
       #endif //ADVANCE
676
       #endif //ADVANCE
664
 
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
+
665
       #ifdef CONFIG_STEPPERS_TOSHIBA
683
       #ifdef CONFIG_STEPPERS_TOSHIBA
666
         /**
684
         /**
667
          * The Toshiba stepper controller require much longer pulses.
685
          * The Toshiba stepper controller require much longer pulses.
670
          * lag to allow it work with without needing NOPs
688
          * lag to allow it work with without needing NOPs
671
          */
689
          */
672
         #define STEP_ADD(axis, AXIS) \
690
         #define STEP_ADD(axis, AXIS) \
673
-         counter_## axis += current_block->steps[AXIS ##_AXIS]; \
674
-         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); }
675
         STEP_ADD(x,X);
693
         STEP_ADD(x,X);
676
         STEP_ADD(y,Y);
694
         STEP_ADD(y,Y);
677
         STEP_ADD(z,Z);
695
         STEP_ADD(z,Z);
680
         #endif
698
         #endif
681
 
699
 
682
         #define STEP_IF_COUNTER(axis, AXIS) \
700
         #define STEP_IF_COUNTER(axis, AXIS) \
683
-          if (counter_## axis > 0) { \
684
-            counter_## axis -= current_block->step_event_count; \
685
-            count_position[AXIS ##_AXIS] += count_direction[AXIS ##_AXIS]; \
686
-            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); \
687
           }
705
           }
688
 
706
 
689
         STEP_IF_COUNTER(x, X);
707
         STEP_IF_COUNTER(x, X);
696
       #else // !CONFIG_STEPPERS_TOSHIBA
714
       #else // !CONFIG_STEPPERS_TOSHIBA
697
 
715
 
698
         #define APPLY_MOVEMENT(axis, AXIS) \
716
         #define APPLY_MOVEMENT(axis, AXIS) \
699
-          counter_## axis += current_block->steps[AXIS ##_AXIS]; \
700
-          if (counter_## axis > 0) { \
701
-            AXIS ##_APPLY_STEP(!INVERT_## AXIS ##_STEP_PIN,0); \
702
-            counter_## axis -= current_block->step_event_count; \
703
-            count_position[AXIS ##_AXIS] += count_direction[AXIS ##_AXIS]; \
704
-            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); \
705
           }
723
           }
706
 
724
 
707
         APPLY_MOVEMENT(x, X);
725
         APPLY_MOVEMENT(x, X);
718
     // Calculate new timer value
736
     // Calculate new timer value
719
     unsigned short timer;
737
     unsigned short timer;
720
     unsigned short step_rate;
738
     unsigned short step_rate;
721
-    if (step_events_completed <= (unsigned long int)current_block->accelerate_until) {
739
+    if (step_events_completed <= (unsigned long)current_block->accelerate_until) {
722
 
740
 
723
-      MultiU24X24toH16(acc_step_rate, acceleration_time, current_block->acceleration_rate);
741
+      MultiU24X32toH16(acc_step_rate, acceleration_time, current_block->acceleration_rate);
724
       acc_step_rate += current_block->initial_rate;
742
       acc_step_rate += current_block->initial_rate;
725
 
743
 
726
       // upper limit
744
       // upper limit
742
 
760
 
743
       #endif
761
       #endif
744
     }
762
     }
745
-    else if (step_events_completed > (unsigned long int)current_block->decelerate_after) {
746
-      MultiU24X24toH16(step_rate, deceleration_time, current_block->acceleration_rate);
763
+    else if (step_events_completed > (unsigned long)current_block->decelerate_after) {
764
+      MultiU24X32toH16(step_rate, deceleration_time, current_block->acceleration_rate);
747
 
765
 
748
       if (step_rate > acc_step_rate) { // Check step_rate stays positive
766
       if (step_rate > acc_step_rate) { // Check step_rate stays positive
749
         step_rate = current_block->final_rate;
767
         step_rate = current_block->final_rate;
869
   #ifdef HAVE_L6470DRIVER
887
   #ifdef HAVE_L6470DRIVER
870
     L6470_init();
888
     L6470_init();
871
   #endif
889
   #endif
872
-  
890
+
873
   // Initialize Dir Pins
891
   // Initialize Dir Pins
874
   #if HAS_X_DIR
892
   #if HAS_X_DIR
875
     X_DIR_INIT;
893
     X_DIR_INIT;
915
   #if HAS_Y_ENABLE
933
   #if HAS_Y_ENABLE
916
     Y_ENABLE_INIT;
934
     Y_ENABLE_INIT;
917
     if (!Y_ENABLE_ON) Y_ENABLE_WRITE(HIGH);
935
     if (!Y_ENABLE_ON) Y_ENABLE_WRITE(HIGH);
918
-	
919
-	#if defined(Y_DUAL_STEPPER_DRIVERS) && HAS_Y2_ENABLE
920
-	  Y2_ENABLE_INIT;
921
-	  if (!Y_ENABLE_ON) Y2_ENABLE_WRITE(HIGH);
922
-	#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
923
   #endif
941
   #endif
924
   #if HAS_Z_ENABLE
942
   #if HAS_Z_ENABLE
925
     Z_ENABLE_INIT;
943
     Z_ENABLE_INIT;
996
     #ifdef ENDSTOPPULLUP_ZMAX
1014
     #ifdef ENDSTOPPULLUP_ZMAX
997
       WRITE(Z2_MAX_PIN,HIGH);
1015
       WRITE(Z2_MAX_PIN,HIGH);
998
     #endif
1016
     #endif
999
-  #endif  
1000
-  
1017
+  #endif
1018
+
1001
 #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.
1002
   SET_INPUT(Z_PROBE_PIN);
1020
   SET_INPUT(Z_PROBE_PIN);
1003
   #ifdef ENDSTOPPULLUP_ZPROBE
1021
   #ifdef ENDSTOPPULLUP_ZPROBE
1005
   #endif
1023
   #endif
1006
 #endif
1024
 #endif
1007
 
1025
 
1026
+  #define _STEP_INIT(AXIS) AXIS ##_STEP_INIT
1027
+  #define _DISABLE(axis) disable_## axis()
1028
+
1008
   #define AXIS_INIT(axis, AXIS, PIN) \
1029
   #define AXIS_INIT(axis, AXIS, PIN) \
1009
-    AXIS ##_STEP_INIT; \
1010
-    AXIS ##_STEP_WRITE(INVERT_## PIN ##_STEP_PIN); \
1011
-    disable_## axis()
1030
+    _STEP_INIT(AXIS); \
1031
+    _WRITE_STEP(AXIS, _INVERT_STEP_PIN(PIN)); \
1032
+    _DISABLE(axis)
1012
 
1033
 
1013
   #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)
1014
 
1035
 
1072
       TCCR0A &= ~BIT(WGM01);
1093
       TCCR0A &= ~BIT(WGM01);
1073
       TCCR0A &= ~BIT(WGM00);
1094
       TCCR0A &= ~BIT(WGM00);
1074
     #endif
1095
     #endif
1075
-    e_steps[0] = 0;
1076
-    e_steps[1] = 0;
1077
-    e_steps[2] = 0;
1078
-    e_steps[3] = 0;
1096
+    e_steps[0] = e_steps[1] = e_steps[2] = e_steps[3] = 0;
1079
     TIMSK0 |= BIT(OCIE0A);
1097
     TIMSK0 |= BIT(OCIE0A);
1080
   #endif //ADVANCE
1098
   #endif //ADVANCE
1081
 
1099
 
1144
   // No other ISR should ever interrupt this!
1162
   // No other ISR should ever interrupt this!
1145
   void babystep(const uint8_t axis, const bool direction) {
1163
   void babystep(const uint8_t axis, const bool direction) {
1146
 
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
+
1147
     #define BABYSTEP_AXIS(axis, AXIS, INVERT) { \
1170
     #define BABYSTEP_AXIS(axis, AXIS, INVERT) { \
1148
-        enable_## axis(); \
1149
-        uint8_t old_pin = AXIS ##_DIR_READ; \
1150
-        AXIS ##_APPLY_DIR(INVERT_## AXIS ##_DIR^direction^INVERT, true); \
1151
-        AXIS ##_APPLY_STEP(!INVERT_## AXIS ##_STEP_PIN, true); \
1152
-        _delay_us(1U); \
1153
-        AXIS ##_APPLY_STEP(INVERT_## AXIS ##_STEP_PIN, true); \
1154
-        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); \
1155
       }
1178
       }
1156
 
1179
 
1157
     switch(axis) {
1180
     switch(axis) {
1163
       case Y_AXIS:
1186
       case Y_AXIS:
1164
         BABYSTEP_AXIS(y, Y, false);
1187
         BABYSTEP_AXIS(y, Y, false);
1165
         break;
1188
         break;
1166
-     
1189
+ 
1167
       case Z_AXIS: {
1190
       case Z_AXIS: {
1168
 
1191
 
1169
         #ifndef DELTA
1192
         #ifndef DELTA
1188
           X_STEP_WRITE(!INVERT_X_STEP_PIN);
1211
           X_STEP_WRITE(!INVERT_X_STEP_PIN);
1189
           Y_STEP_WRITE(!INVERT_Y_STEP_PIN);
1212
           Y_STEP_WRITE(!INVERT_Y_STEP_PIN);
1190
           Z_STEP_WRITE(!INVERT_Z_STEP_PIN);
1213
           Z_STEP_WRITE(!INVERT_Z_STEP_PIN);
1191
-          _delay_us(1U);
1214
+          delayMicroseconds(2);
1192
           X_STEP_WRITE(INVERT_X_STEP_PIN); 
1215
           X_STEP_WRITE(INVERT_X_STEP_PIN); 
1193
           Y_STEP_WRITE(INVERT_Y_STEP_PIN); 
1216
           Y_STEP_WRITE(INVERT_Y_STEP_PIN); 
1194
           Z_STEP_WRITE(INVERT_Z_STEP_PIN);
1217
           Z_STEP_WRITE(INVERT_Z_STEP_PIN);
1200
         #endif
1223
         #endif
1201
 
1224
 
1202
       } break;
1225
       } break;
1203
-     
1226
+ 
1204
       default: break;
1227
       default: break;
1205
     }
1228
     }
1206
   }
1229
   }
1264
 
1287
 
1265
   #if HAS_MICROSTEPS
1288
   #if HAS_MICROSTEPS
1266
     pinMode(X_MS1_PIN,OUTPUT);
1289
     pinMode(X_MS1_PIN,OUTPUT);
1267
-    pinMode(X_MS2_PIN,OUTPUT);  
1290
+    pinMode(X_MS2_PIN,OUTPUT);
1268
     pinMode(Y_MS1_PIN,OUTPUT);
1291
     pinMode(Y_MS1_PIN,OUTPUT);
1269
     pinMode(Y_MS2_PIN,OUTPUT);
1292
     pinMode(Y_MS2_PIN,OUTPUT);
1270
     pinMode(Z_MS1_PIN,OUTPUT);
1293
     pinMode(Z_MS1_PIN,OUTPUT);

+ 106
- 93
Marlin/temperature.cpp 查看文件

77
 #define HAS_BED_THERMAL_PROTECTION (defined(THERMAL_RUNAWAY_PROTECTION_BED_PERIOD) && THERMAL_RUNAWAY_PROTECTION_BED_PERIOD > 0 && TEMP_SENSOR_BED != 0)
77
 #define HAS_BED_THERMAL_PROTECTION (defined(THERMAL_RUNAWAY_PROTECTION_BED_PERIOD) && THERMAL_RUNAWAY_PROTECTION_BED_PERIOD > 0 && TEMP_SENSOR_BED != 0)
78
 #if HAS_HEATER_THERMAL_PROTECTION || HAS_BED_THERMAL_PROTECTION
78
 #if HAS_HEATER_THERMAL_PROTECTION || HAS_BED_THERMAL_PROTECTION
79
   enum TRState { TRReset, TRInactive, TRFirstHeating, TRStable, TRRunaway };
79
   enum TRState { TRReset, TRInactive, TRFirstHeating, TRStable, TRRunaway };
80
-  void thermal_runaway_protection(TRState *state, unsigned long *timer, float temperature, float target_temperature, int heater_id, int period_seconds, int hysteresis_degc);
80
+  void thermal_runaway_protection(TRState *state, millis_t *timer, float temperature, float target_temperature, int heater_id, int period_seconds, int hysteresis_degc);
81
   #if HAS_HEATER_THERMAL_PROTECTION
81
   #if HAS_HEATER_THERMAL_PROTECTION
82
     static TRState thermal_runaway_state_machine[4] = { TRReset, TRReset, TRReset, TRReset };
82
     static TRState thermal_runaway_state_machine[4] = { TRReset, TRReset, TRReset, TRReset };
83
-    static unsigned long thermal_runaway_timer[4]; // = {0,0,0,0};
83
+    static millis_t thermal_runaway_timer[4]; // = {0,0,0,0};
84
   #endif
84
   #endif
85
   #if HAS_BED_THERMAL_PROTECTION
85
   #if HAS_BED_THERMAL_PROTECTION
86
     static TRState thermal_runaway_bed_state_machine = TRReset;
86
     static TRState thermal_runaway_bed_state_machine = TRReset;
87
-    static unsigned long thermal_runaway_bed_timer;
87
+    static millis_t thermal_runaway_bed_timer;
88
   #endif
88
   #endif
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
118
   static float temp_iState_min_bed;
119
   static float temp_iState_min_bed;
119
   static float temp_iState_max_bed;
120
   static float temp_iState_max_bed;
120
 #else //PIDTEMPBED
121
 #else //PIDTEMPBED
121
-  static unsigned long  previous_millis_bed_heater;
122
+  static millis_t  next_bed_check_ms;
122
 #endif //PIDTEMPBED
123
 #endif //PIDTEMPBED
123
   static unsigned char soft_pwm[EXTRUDERS];
124
   static unsigned char soft_pwm[EXTRUDERS];
124
 
125
 
126
   static unsigned char soft_pwm_fan;
127
   static unsigned char soft_pwm_fan;
127
 #endif
128
 #endif
128
 #if HAS_AUTO_FAN
129
 #if HAS_AUTO_FAN
129
-  static unsigned long extruder_autofan_last_check;
130
+  static millis_t next_auto_fan_check_ms;
130
 #endif  
131
 #endif  
131
 
132
 
132
 #ifdef PIDTEMP
133
 #ifdef PIDTEMP
171
 
172
 
172
 #ifdef WATCH_TEMP_PERIOD
173
 #ifdef WATCH_TEMP_PERIOD
173
   int watch_start_temp[EXTRUDERS] = { 0 };
174
   int watch_start_temp[EXTRUDERS] = { 0 };
174
-  unsigned long watchmillis[EXTRUDERS] = { 0 };
175
+  millis_t watchmillis[EXTRUDERS] = { 0 };
175
 #endif //WATCH_TEMP_PERIOD
176
 #endif //WATCH_TEMP_PERIOD
176
 
177
 
177
 #ifndef SOFT_PWM_SCALE
178
 #ifndef SOFT_PWM_SCALE
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)
196
   int cycles = 0;
197
   int cycles = 0;
197
   bool heating = true;
198
   bool heating = true;
198
 
199
 
199
-  unsigned long temp_millis = millis(), t1 = temp_millis, t2 = temp_millis;
200
+  millis_t temp_ms = millis(), t1 = temp_ms, t2 = temp_ms;
200
   long t_high = 0, t_low = 0;
201
   long t_high = 0, t_low = 0;
201
 
202
 
202
   long bias, d;
203
   long bias, d;
205
   float max = 0, min = 10000;
206
   float max = 0, min = 10000;
206
 
207
 
207
   #if HAS_AUTO_FAN
208
   #if HAS_AUTO_FAN
208
-        unsigned long extruder_autofan_last_check = temp_millis;
209
+    millis_t next_auto_fan_check_ms = temp_ms + 2500;
209
   #endif
210
   #endif
210
 
211
 
211
   if (extruder >= EXTRUDERS
212
   if (extruder >= EXTRUDERS
219
   
220
   
220
   SERIAL_ECHOLN(MSG_PID_AUTOTUNE_START);
221
   SERIAL_ECHOLN(MSG_PID_AUTOTUNE_START);
221
 
222
 
222
-  disable_heater(); // switch off all heaters.
223
+  disable_all_heaters(); // switch off all heaters.
223
 
224
 
224
   if (extruder < 0)
225
   if (extruder < 0)
225
     soft_pwm_bed = bias = d = MAX_BED_POWER / 2;
226
     soft_pwm_bed = bias = d = MAX_BED_POWER / 2;
229
   // PID Tuning loop
230
   // PID Tuning loop
230
   for (;;) {
231
   for (;;) {
231
 
232
 
232
-    unsigned long ms = millis();
233
+    millis_t ms = millis();
233
 
234
 
234
     if (temp_meas_ready) { // temp sample ready
235
     if (temp_meas_ready) { // temp sample ready
235
       updateTemperaturesFromRawValues();
236
       updateTemperaturesFromRawValues();
240
       min = min(min, input);
241
       min = min(min, input);
241
 
242
 
242
       #if HAS_AUTO_FAN
243
       #if HAS_AUTO_FAN
243
-        if (ms > extruder_autofan_last_check + 2500) {
244
+        if (ms > next_auto_fan_check_ms) {
244
           checkExtruderAutoFans();
245
           checkExtruderAutoFans();
245
-          extruder_autofan_last_check = ms;
246
+          next_auto_fan_check_ms = ms + 2500;
246
         }
247
         }
247
       #endif
248
       #endif
248
 
249
 
317
       return;
318
       return;
318
     }
319
     }
319
     // Every 2 seconds...
320
     // Every 2 seconds...
320
-    if (ms > temp_millis + 2000) {
321
+    if (ms > temp_ms + 2000) {
321
       int p;
322
       int p;
322
       if (extruder < 0) {
323
       if (extruder < 0) {
323
         p = soft_pwm_bed;
324
         p = soft_pwm_bed;
332
       SERIAL_PROTOCOLPGM(MSG_AT);
333
       SERIAL_PROTOCOLPGM(MSG_AT);
333
       SERIAL_PROTOCOLLN(p);
334
       SERIAL_PROTOCOLLN(p);
334
 
335
 
335
-      temp_millis = ms;
336
+      temp_ms = ms;
336
     } // every 2 seconds
337
     } // every 2 seconds
337
     // Over 2 minutes?
338
     // Over 2 minutes?
338
     if (((ms - t1) + (ms - t2)) > (10L*60L*1000L*2L)) {
339
     if (((ms - t1) + (ms - t2)) > (10L*60L*1000L*2L)) {
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();
458
 }
463
 }
459
 
464
 
460
 void max_temp_error(uint8_t e) {
465
 void max_temp_error(uint8_t e) {
461
-  disable_heater();
466
+  disable_all_heaters();
462
   _temp_error(e, PSTR(MSG_MAXTEMP_EXTRUDER_OFF), PSTR(MSG_ERR_MAXTEMP));
467
   _temp_error(e, PSTR(MSG_MAXTEMP_EXTRUDER_OFF), PSTR(MSG_ERR_MAXTEMP));
463
 }
468
 }
464
 void min_temp_error(uint8_t e) {
469
 void min_temp_error(uint8_t e) {
465
-  disable_heater();
470
+  disable_all_heaters();
466
   _temp_error(e, PSTR(MSG_MINTEMP_EXTRUDER_OFF), PSTR(MSG_ERR_MINTEMP));
471
   _temp_error(e, PSTR(MSG_MINTEMP_EXTRUDER_OFF), PSTR(MSG_ERR_MINTEMP));
467
 }
472
 }
468
 void bed_max_temp_error(void) {
473
 void bed_max_temp_error(void) {
579
   }
584
   }
580
 #endif
585
 #endif
581
 
586
 
587
+/**
588
+ * Manage heating activities for extruder hot-ends and a heated bed
589
+ *  - Acquire updated temperature readings
590
+ *  - Invoke thermal runaway protection
591
+ *  - Manage extruder auto-fan
592
+ *  - Apply filament width to the extrusion rate (may move)
593
+ *  - Update the heated bed PID output value
594
+ */
582
 void manage_heater() {
595
 void manage_heater() {
583
 
596
 
584
   if (!temp_meas_ready) return;
597
   if (!temp_meas_ready) return;
592
   #endif //HEATER_0_USES_MAX6675
605
   #endif //HEATER_0_USES_MAX6675
593
 
606
 
594
   #if defined(WATCH_TEMP_PERIOD) || !defined(PIDTEMPBED) || HAS_AUTO_FAN
607
   #if defined(WATCH_TEMP_PERIOD) || !defined(PIDTEMPBED) || HAS_AUTO_FAN
595
-    unsigned long ms = millis();
608
+    millis_t ms = millis();
596
   #endif
609
   #endif
597
 
610
 
598
   // Loop through all extruders
611
   // Loop through all extruders
623
 
636
 
624
     #ifdef TEMP_SENSOR_1_AS_REDUNDANT
637
     #ifdef TEMP_SENSOR_1_AS_REDUNDANT
625
       if (fabs(current_temperature[0] - redundant_temperature) > MAX_REDUNDANT_TEMP_SENSOR_DIFF) {
638
       if (fabs(current_temperature[0] - redundant_temperature) > MAX_REDUNDANT_TEMP_SENSOR_DIFF) {
626
-        disable_heater();
639
+        disable_all_heaters();
627
         _temp_error(0, PSTR(MSG_EXTRUDER_SWITCHED_OFF), PSTR(MSG_ERR_REDUNDANT_TEMP));
640
         _temp_error(0, PSTR(MSG_EXTRUDER_SWITCHED_OFF), PSTR(MSG_ERR_REDUNDANT_TEMP));
628
       }
641
       }
629
     #endif // TEMP_SENSOR_1_AS_REDUNDANT
642
     #endif // TEMP_SENSOR_1_AS_REDUNDANT
631
   } // Extruders Loop
644
   } // Extruders Loop
632
 
645
 
633
   #if HAS_AUTO_FAN
646
   #if HAS_AUTO_FAN
634
-    if (ms > extruder_autofan_last_check + 2500) { // only need to check fan state very infrequently
647
+    if (ms > next_auto_fan_check_ms) { // only need to check fan state very infrequently
635
       checkExtruderAutoFans();
648
       checkExtruderAutoFans();
636
-      extruder_autofan_last_check = ms;
649
+      next_auto_fan_check_ms = ms + 2500;
637
     }
650
     }
638
   #endif       
651
   #endif       
639
-  
652
+
653
+  // Control the extruder rate based on the width sensor
654
+  #ifdef FILAMENT_SENSOR
655
+    if (filament_sensor) {
656
+      meas_shift_index = delay_index1 - meas_delay_cm;
657
+      if (meas_shift_index < 0) meas_shift_index += MAX_MEASUREMENT_DELAY + 1;  //loop around buffer if needed
658
+      
659
+      // Get the delayed info and add 100 to reconstitute to a percent of
660
+      // the nominal filament diameter then square it to get an area
661
+      meas_shift_index = constrain(meas_shift_index, 0, MAX_MEASUREMENT_DELAY);
662
+      float vm = pow((measurement_delay[meas_shift_index] + 100.0) / 100.0, 2);
663
+      if (vm < 0.01) vm = 0.01;
664
+      volumetric_multiplier[FILAMENT_SENSOR_EXTRUDER_NUM] = vm;
665
+    }
666
+  #endif //FILAMENT_SENSOR
667
+
640
   #ifndef PIDTEMPBED
668
   #ifndef PIDTEMPBED
641
-    if (ms < previous_millis_bed_heater + BED_CHECK_INTERVAL) return;
642
-    previous_millis_bed_heater = ms;
643
-  #endif //PIDTEMPBED
669
+    if (ms < next_bed_check_ms) return;
670
+    next_bed_check_ms = ms + BED_CHECK_INTERVAL;
671
+  #endif
644
 
672
 
645
   #if TEMP_SENSOR_BED != 0
673
   #if TEMP_SENSOR_BED != 0
646
   
674
   
653
 
681
 
654
       soft_pwm_bed = current_temperature_bed > BED_MINTEMP && current_temperature_bed < BED_MAXTEMP ? (int)pid_output >> 1 : 0;
682
       soft_pwm_bed = current_temperature_bed > BED_MINTEMP && current_temperature_bed < BED_MAXTEMP ? (int)pid_output >> 1 : 0;
655
 
683
 
656
-    #elif !defined(BED_LIMIT_SWITCHING)
657
-      // Check if temperature is within the correct range
684
+    #elif defined(BED_LIMIT_SWITCHING)
685
+      // Check if temperature is within the correct band
658
       if (current_temperature_bed > BED_MINTEMP && current_temperature_bed < BED_MAXTEMP) {
686
       if (current_temperature_bed > BED_MINTEMP && current_temperature_bed < BED_MAXTEMP) {
659
-        soft_pwm_bed = current_temperature_bed < target_temperature_bed ? MAX_BED_POWER >> 1 : 0;
687
+        if (current_temperature_bed >= target_temperature_bed + BED_HYSTERESIS)
688
+          soft_pwm_bed = 0;
689
+        else if (current_temperature_bed <= target_temperature_bed - BED_HYSTERESIS)
690
+          soft_pwm_bed = MAX_BED_POWER >> 1;
660
       }
691
       }
661
       else {
692
       else {
662
         soft_pwm_bed = 0;
693
         soft_pwm_bed = 0;
663
         WRITE_HEATER_BED(LOW);
694
         WRITE_HEATER_BED(LOW);
664
       }
695
       }
665
-    #else //#ifdef BED_LIMIT_SWITCHING
666
-      // Check if temperature is within the correct band
696
+    #else // BED_LIMIT_SWITCHING
697
+      // Check if temperature is within the correct range
667
       if (current_temperature_bed > BED_MINTEMP && current_temperature_bed < BED_MAXTEMP) {
698
       if (current_temperature_bed > BED_MINTEMP && current_temperature_bed < BED_MAXTEMP) {
668
-        if (current_temperature_bed >= target_temperature_bed + BED_HYSTERESIS)
669
-          soft_pwm_bed = 0;
670
-        else if (current_temperature_bed <= target_temperature_bed - BED_HYSTERESIS)
671
-          soft_pwm_bed = MAX_BED_POWER >> 1;
699
+        soft_pwm_bed = current_temperature_bed < target_temperature_bed ? MAX_BED_POWER >> 1 : 0;
672
       }
700
       }
673
       else {
701
       else {
674
         soft_pwm_bed = 0;
702
         soft_pwm_bed = 0;
676
       }
704
       }
677
     #endif
705
     #endif
678
   #endif //TEMP_SENSOR_BED != 0
706
   #endif //TEMP_SENSOR_BED != 0
679
-  
680
-  // Control the extruder rate based on the width sensor
681
-  #ifdef FILAMENT_SENSOR
682
-    if (filament_sensor) {
683
-      meas_shift_index = delay_index1 - meas_delay_cm;
684
-      if (meas_shift_index < 0) meas_shift_index += MAX_MEASUREMENT_DELAY + 1;  //loop around buffer if needed
685
-      
686
-      // Get the delayed info and add 100 to reconstitute to a percent of
687
-      // the nominal filament diameter then square it to get an area
688
-      meas_shift_index = constrain(meas_shift_index, 0, MAX_MEASUREMENT_DELAY);
689
-      float vm = pow((measurement_delay[meas_shift_index] + 100.0) / 100.0, 2);
690
-      if (vm < 0.01) vm = 0.01;
691
-      volumetric_multiplier[FILAMENT_SENSOR_EXTRUDER_NUM] = vm;
692
-    }
693
-  #endif //FILAMENT_SENSOR
694
 }
707
 }
695
 
708
 
696
 #define PGM_RD_W(x)   (short)pgm_read_word(&x)
709
 #define PGM_RD_W(x)   (short)pgm_read_word(&x)
697
 // Derived from RepRap FiveD extruder::getTemperature()
710
 // Derived from RepRap FiveD extruder::getTemperature()
698
 // For hot end temperature measurement.
711
 // For hot end temperature measurement.
699
 static float analog2temp(int raw, uint8_t e) {
712
 static float analog2temp(int raw, uint8_t e) {
700
-#ifdef TEMP_SENSOR_1_AS_REDUNDANT
701
-  if (e > EXTRUDERS)
702
-#else
703
-  if (e >= EXTRUDERS)
704
-#endif
705
-  {
713
+  #ifdef TEMP_SENSOR_1_AS_REDUNDANT
714
+    if (e > EXTRUDERS)
715
+  #else
716
+    if (e >= EXTRUDERS)
717
+  #endif
718
+    {
706
       SERIAL_ERROR_START;
719
       SERIAL_ERROR_START;
707
       SERIAL_ERROR((int)e);
720
       SERIAL_ERROR((int)e);
708
       SERIAL_ERRORLNPGM(MSG_INVALID_EXTRUDER_NUM);
721
       SERIAL_ERRORLNPGM(MSG_INVALID_EXTRUDER_NUM);
709
       kill();
722
       kill();
710
       return 0.0;
723
       return 0.0;
711
-  } 
724
+    } 
725
+
712
   #ifdef HEATER_0_USES_MAX6675
726
   #ifdef HEATER_0_USES_MAX6675
713
-    if (e == 0)
714
-    {
715
-      return 0.25 * raw;
716
-    }
727
+    if (e == 0) return 0.25 * raw;
717
   #endif
728
   #endif
718
 
729
 
719
-  if(heater_ttbl_map[e] != NULL)
720
-  {
730
+  if (heater_ttbl_map[e] != NULL) {
721
     float celsius = 0;
731
     float celsius = 0;
722
     uint8_t i;
732
     uint8_t i;
723
     short (*tt)[][2] = (short (*)[][2])(heater_ttbl_map[e]);
733
     short (*tt)[][2] = (short (*)[][2])(heater_ttbl_map[e]);
724
 
734
 
725
-    for (i=1; i<heater_ttbllen_map[e]; i++)
726
-    {
727
-      if (PGM_RD_W((*tt)[i][0]) > raw)
728
-      {
735
+    for (i = 1; i < heater_ttbllen_map[e]; i++) {
736
+      if (PGM_RD_W((*tt)[i][0]) > raw) {
729
         celsius = PGM_RD_W((*tt)[i-1][1]) + 
737
         celsius = PGM_RD_W((*tt)[i-1][1]) + 
730
           (raw - PGM_RD_W((*tt)[i-1][0])) * 
738
           (raw - PGM_RD_W((*tt)[i-1][0])) * 
731
           (float)(PGM_RD_W((*tt)[i][1]) - PGM_RD_W((*tt)[i-1][1])) /
739
           (float)(PGM_RD_W((*tt)[i][1]) - PGM_RD_W((*tt)[i-1][1])) /
749
     float celsius = 0;
757
     float celsius = 0;
750
     byte i;
758
     byte i;
751
 
759
 
752
-    for (i=1; i<BEDTEMPTABLE_LEN; i++)
753
-    {
754
-      if (PGM_RD_W(BEDTEMPTABLE[i][0]) > raw)
755
-      {
760
+    for (i = 1; i < BEDTEMPTABLE_LEN; i++) {
761
+      if (PGM_RD_W(BEDTEMPTABLE[i][0]) > raw) {
756
         celsius  = PGM_RD_W(BEDTEMPTABLE[i-1][1]) + 
762
         celsius  = PGM_RD_W(BEDTEMPTABLE[i-1][1]) + 
757
           (raw - PGM_RD_W(BEDTEMPTABLE[i-1][0])) * 
763
           (raw - PGM_RD_W(BEDTEMPTABLE[i-1][0])) * 
758
           (float)(PGM_RD_W(BEDTEMPTABLE[i][1]) - PGM_RD_W(BEDTEMPTABLE[i-1][1])) /
764
           (float)(PGM_RD_W(BEDTEMPTABLE[i][1]) - PGM_RD_W(BEDTEMPTABLE[i-1][1])) /
816
 #endif
822
 #endif
817
 
823
 
818
 
824
 
819
-
820
-
821
-
822
-void tp_init()
823
-{
825
+/**
826
+ * Initialize the temperature manager
827
+ * The manager is implemented by periodic calls to manage_heater()
828
+ */
829
+void tp_init() {
824
   #if MB(RUMBA) && ((TEMP_SENSOR_0==-1)||(TEMP_SENSOR_1==-1)||(TEMP_SENSOR_2==-1)||(TEMP_SENSOR_BED==-1))
830
   #if MB(RUMBA) && ((TEMP_SENSOR_0==-1)||(TEMP_SENSOR_1==-1)||(TEMP_SENSOR_2==-1)||(TEMP_SENSOR_BED==-1))
825
     //disable RUMBA JTAG in case the thermocouple extension is plugged on top of JTAG connector
831
     //disable RUMBA JTAG in case the thermocouple extension is plugged on top of JTAG connector
826
     MCUCR=BIT(JTD);
832
     MCUCR=BIT(JTD);
992
 
998
 
993
 void setWatch() {
999
 void setWatch() {
994
   #ifdef WATCH_TEMP_PERIOD
1000
   #ifdef WATCH_TEMP_PERIOD
995
-    unsigned long ms = millis();
1001
+    millis_t ms = millis();
996
     for (int e = 0; e < EXTRUDERS; e++) {
1002
     for (int e = 0; e < EXTRUDERS; e++) {
997
       if (degHotend(e) < degTargetHotend(e) - (WATCH_TEMP_INCREASE * 2)) {
1003
       if (degHotend(e) < degTargetHotend(e) - (WATCH_TEMP_INCREASE * 2)) {
998
         watch_start_temp[e] = degHotend(e);
1004
         watch_start_temp[e] = degHotend(e);
1004
 
1010
 
1005
 #if HAS_HEATER_THERMAL_PROTECTION || HAS_BED_THERMAL_PROTECTION
1011
 #if HAS_HEATER_THERMAL_PROTECTION || HAS_BED_THERMAL_PROTECTION
1006
 
1012
 
1007
-  void thermal_runaway_protection(TRState *state, unsigned long *timer, float temperature, float target_temperature, int heater_id, int period_seconds, int hysteresis_degc) {
1013
+  void thermal_runaway_protection(TRState *state, millis_t *timer, float temperature, float target_temperature, int heater_id, int period_seconds, int hysteresis_degc) {
1008
 
1014
 
1009
     static float tr_target_temperature[EXTRUDERS+1] = { 0.0 };
1015
     static float tr_target_temperature[EXTRUDERS+1] = { 0.0 };
1010
 
1016
 
1059
         SERIAL_ERRORLNPGM(MSG_THERMAL_RUNAWAY_STOP);
1065
         SERIAL_ERRORLNPGM(MSG_THERMAL_RUNAWAY_STOP);
1060
         if (heater_id < 0) SERIAL_ERRORLNPGM("bed"); else SERIAL_ERRORLN(heater_id);
1066
         if (heater_id < 0) SERIAL_ERRORLNPGM("bed"); else SERIAL_ERRORLN(heater_id);
1061
         LCD_ALERTMESSAGEPGM(MSG_THERMAL_RUNAWAY);
1067
         LCD_ALERTMESSAGEPGM(MSG_THERMAL_RUNAWAY);
1062
-        disable_heater();
1068
+        disable_all_heaters();
1063
         disable_all_steppers();
1069
         disable_all_steppers();
1064
         for (;;) {
1070
         for (;;) {
1065
           manage_heater();
1071
           manage_heater();
1070
 
1076
 
1071
 #endif // HAS_HEATER_THERMAL_PROTECTION || HAS_BED_THERMAL_PROTECTION
1077
 #endif // HAS_HEATER_THERMAL_PROTECTION || HAS_BED_THERMAL_PROTECTION
1072
 
1078
 
1073
-void disable_heater() {
1079
+void disable_all_heaters() {
1074
   for (int i=0; i<EXTRUDERS; i++) setTargetHotend(0, i);
1080
   for (int i=0; i<EXTRUDERS; i++) setTargetHotend(0, i);
1075
   setTargetBed(0);
1081
   setTargetBed(0);
1076
 
1082
 
1109
 
1115
 
1110
 #ifdef HEATER_0_USES_MAX6675
1116
 #ifdef HEATER_0_USES_MAX6675
1111
   #define MAX6675_HEAT_INTERVAL 250u
1117
   #define MAX6675_HEAT_INTERVAL 250u
1112
-  unsigned long max6675_previous_millis = MAX6675_HEAT_INTERVAL;
1118
+  static millis_t next_max6675_ms = 0;
1113
   int max6675_temp = 2000;
1119
   int max6675_temp = 2000;
1114
 
1120
 
1115
   static int read_max6675() {
1121
   static int read_max6675() {
1116
 
1122
 
1117
-    unsigned long ms = millis();
1118
-    if (ms < max6675_previous_millis + MAX6675_HEAT_INTERVAL)
1123
+    millis_t ms = millis();
1124
+
1125
+    if (ms < next_max6675_ms)
1119
       return max6675_temp;
1126
       return max6675_temp;
1120
     
1127
     
1121
-    max6675_previous_millis = ms;
1128
+    next_max6675_ms = ms + MAX6675_HEAT_INTERVAL;
1129
+
1122
     max6675_temp = 0;
1130
     max6675_temp = 0;
1123
 
1131
 
1124
     #ifdef PRR
1132
     #ifdef PRR
1206
   temp_meas_ready = true;
1214
   temp_meas_ready = true;
1207
 }
1215
 }
1208
 
1216
 
1209
-//
1210
-// Timer 0 is shared with millies
1211
-//
1217
+/**
1218
+ * Timer 0 is shared with millies
1219
+ *  - Manage PWM to all the heaters and fan
1220
+ *  - Update the raw temperature values
1221
+ *  - Check new temperature values for MIN/MAX errors
1222
+ *  - Step the babysteps value for each axis towards 0
1223
+ */
1212
 ISR(TIMER0_COMPB_vect) {
1224
 ISR(TIMER0_COMPB_vect) {
1213
-  //these variables are only accesible from the ISR, but static, so they don't lose their value
1225
+
1214
   static unsigned char temp_count = 0;
1226
   static unsigned char temp_count = 0;
1215
   static TempState temp_state = StartupDelay;
1227
   static TempState temp_state = StartupDelay;
1216
   static unsigned char pwm_count = BIT(SOFT_PWM_SCALE);
1228
   static unsigned char pwm_count = BIT(SOFT_PWM_SCALE);
1412
     #define START_ADC(pin) ADCSRB = 0; SET_ADMUX_ADCSRA(pin)
1424
     #define START_ADC(pin) ADCSRB = 0; SET_ADMUX_ADCSRA(pin)
1413
   #endif
1425
   #endif
1414
 
1426
 
1427
+  // Prepare or measure a sensor, each one every 12th frame
1415
   switch(temp_state) {
1428
   switch(temp_state) {
1416
     case PrepareTemp_0:
1429
     case PrepareTemp_0:
1417
       #if HAS_TEMP_0
1430
       #if HAS_TEMP_0
1580
   } // temp_count >= OVERSAMPLENR
1593
   } // temp_count >= OVERSAMPLENR
1581
 
1594
 
1582
   #ifdef BABYSTEPPING
1595
   #ifdef BABYSTEPPING
1583
-    for (uint8_t axis=X_AXIS; axis<=Z_AXIS; axis++) {
1584
-      int curTodo=babystepsTodo[axis]; //get rid of volatile for performance
1596
+    for (uint8_t axis = X_AXIS; axis <= Z_AXIS; axis++) {
1597
+      int curTodo = babystepsTodo[axis]; //get rid of volatile for performance
1585
      
1598
      
1586
       if (curTodo > 0) {
1599
       if (curTodo > 0) {
1587
         babystep(axis,/*fwd*/true);
1600
         babystep(axis,/*fwd*/true);
1588
-        babystepsTodo[axis]--; //less to do next time
1601
+        babystepsTodo[axis]--; //fewer to do next time
1589
       }
1602
       }
1590
-      else if(curTodo < 0) {
1603
+      else if (curTodo < 0) {
1591
         babystep(axis,/*fwd*/false);
1604
         babystep(axis,/*fwd*/false);
1592
-        babystepsTodo[axis]++; //less to do next time
1605
+        babystepsTodo[axis]++; //fewer to do next time
1593
       }
1606
       }
1594
     }
1607
     }
1595
   #endif //BABYSTEPPING
1608
   #endif //BABYSTEPPING

+ 1
- 1
Marlin/temperature.h 查看文件

129
 #endif
129
 #endif
130
 
130
 
131
 int getHeaterPower(int heater);
131
 int getHeaterPower(int heater);
132
-void disable_heater();
132
+void disable_all_heaters();
133
 void setWatch();
133
 void setWatch();
134
 void updatePID();
134
 void updatePID();
135
 
135
 

+ 499
- 311
Marlin/ultralcd.cpp
文件差異過大導致無法顯示
查看文件


+ 6
- 3
Marlin/ultralcd.h 查看文件

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);
49
   extern bool cancel_heatup;
50
   extern bool cancel_heatup;
50
   
51
   
51
   #ifdef FILAMENT_LCD_DISPLAY
52
   #ifdef FILAMENT_LCD_DISPLAY
52
-    extern unsigned long message_millis;
53
+    extern millis_t previous_lcd_status_ms;
53
   #endif
54
   #endif
54
 
55
 
55
   void lcd_buzz(long duration,uint16_t freq);
56
   void lcd_buzz(long duration,uint16_t freq);
57
+  void lcd_quick_feedback(); // Audible feedback for a button click - could also be visual
56
   bool lcd_clicked();
58
   bool lcd_clicked();
57
 
59
 
58
   void lcd_ignore_click(bool b=true);
60
   void lcd_ignore_click(bool b=true);
99
 #else //no LCD
101
 #else //no LCD
100
   FORCE_INLINE void lcd_update() {}
102
   FORCE_INLINE void lcd_update() {}
101
   FORCE_INLINE void lcd_init() {}
103
   FORCE_INLINE void lcd_init() {}
104
+  FORCE_INLINE bool lcd_hasstatus() { return false; }
102
   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) {}
103
   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) {}
104
   FORCE_INLINE void lcd_buttons_update() {}
107
   FORCE_INLINE void lcd_buttons_update() {}
106
   FORCE_INLINE void lcd_buzz(long duration,uint16_t freq) {}
109
   FORCE_INLINE void lcd_buzz(long duration,uint16_t freq) {}
107
   FORCE_INLINE bool lcd_detected(void) { return true; }
110
   FORCE_INLINE bool lcd_detected(void) { return true; }
108
 
111
 
109
-  #define LCD_MESSAGEPGM(x) 
110
-  #define LCD_ALERTMESSAGEPGM(x) 
112
+  #define LCD_MESSAGEPGM(x) do{}while(0)
113
+  #define LCD_ALERTMESSAGEPGM(x) do{}while(0)
111
 
114
 
112
 #endif //ULTRA_LCD
115
 #endif //ULTRA_LCD
113
 
116
 

+ 44
- 56
Marlin/ultralcd_implementation_hitachi_HD44780.h 查看文件

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
203
 
203
 
204
-/* Custom characters defined in the first 8 characters of the LCD */
205
-#define LCD_STR_BEDTEMP     "\x00"  // this will have 'unexpected' results when used in a string!
206
-#define LCD_STR_DEGREE      "\x01"
207
-#define LCD_STR_THERMOMETER "\x02"
208
-#define LCD_STR_UPLEVEL     "\x03"
209
-#define LCD_STR_REFRESH     "\x04"
210
-#define LCD_STR_FOLDER      "\x05"
211
-#define LCD_STR_FEEDRATE    "\x06"
212
-#define LCD_STR_CLOCK       "\x07"
213
-//#define LCD_STR_ARROW_RIGHT "\x7E"  /* from the default character set. Only available on DISPLAY_CHARSET_HD44780_JAPAN - at this place!*/
214
-#define LCD_STR_ARROW_RIGHT ">"  /* from the default character set */
215
-
216
 static void lcd_set_custom_characters(
204
 static void lcd_set_custom_characters(
217
   #ifdef LCD_PROGRESS_BAR
205
   #ifdef LCD_PROGRESS_BAR
218
     bool progress_bar_set=true
206
     bool progress_bar_set=true
562
 
550
 
563
     lcd.setCursor(0, 2);
551
     lcd.setCursor(0, 2);
564
     lcd.print(LCD_STR_FEEDRATE[0]);
552
     lcd.print(LCD_STR_FEEDRATE[0]);
565
-    lcd.print(itostr3(feedmultiply));
553
+    lcd.print(itostr3(feedrate_multiplier));
566
     lcd.print('%');
554
     lcd.print('%');
567
 
555
 
568
     #if LCD_WIDTH > 19 && defined(SDSUPPORT)
556
     #if LCD_WIDTH > 19 && defined(SDSUPPORT)
579
 
567
 
580
     lcd.setCursor(LCD_WIDTH - 6, 2);
568
     lcd.setCursor(LCD_WIDTH - 6, 2);
581
     lcd.print(LCD_STR_CLOCK[0]);
569
     lcd.print(LCD_STR_CLOCK[0]);
582
-    if (starttime != 0) {
583
-      uint16_t time = millis()/60000 - starttime/60000;
570
+    if (print_job_start_ms != 0) {
571
+      uint16_t time = millis()/60000 - print_job_start_ms/60000;
584
       lcd.print(itostr2(time/60));
572
       lcd.print(itostr2(time/60));
585
       lcd.print(':');
573
       lcd.print(':');
586
       lcd.print(itostr2(time%60));
574
       lcd.print(itostr2(time%60));
600
   #ifdef LCD_PROGRESS_BAR
588
   #ifdef LCD_PROGRESS_BAR
601
 
589
 
602
     if (card.isFileOpen()) {
590
     if (card.isFileOpen()) {
603
-      if (millis() >= progressBarTick + PROGRESS_BAR_MSG_TIME || !lcd_status_message[0]) {
604
-        // 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]) {
605
         int tix = (int)(card.percentDone() * LCD_WIDTH * 3) / 100,
594
         int tix = (int)(card.percentDone() * LCD_WIDTH * 3) / 100,
606
           cel = tix / 3, rem = tix % 3, i = LCD_WIDTH;
595
           cel = tix / 3, rem = tix % 3, i = LCD_WIDTH;
607
         char msg[LCD_WIDTH+1], b = ' ';
596
         char msg[LCD_WIDTH+1], b = ' ';
622
 
611
 
623
     // Show Filament Diameter and Volumetric Multiplier %
612
     // Show Filament Diameter and Volumetric Multiplier %
624
     // After allowing lcd_status_message to show for 5 seconds
613
     // After allowing lcd_status_message to show for 5 seconds
625
-    if (millis() >= message_millis + 5000) {
614
+    if (millis() >= previous_lcd_status_ms + 5000) {
626
       lcd_printPGM(PSTR("Dia "));
615
       lcd_printPGM(PSTR("Dia "));
627
       lcd.print(ftostr12ns(filament_width_meas));
616
       lcd.print(ftostr12ns(filament_width_meas));
628
       lcd_printPGM(PSTR(" V"));
617
       lcd_printPGM(PSTR(" V"));
736
 #define lcd_implementation_drawmenu_function(sel, row, pstr, data) lcd_implementation_drawmenu_generic(sel, row, pstr, '>', ' ')
725
 #define lcd_implementation_drawmenu_function(sel, row, pstr, data) lcd_implementation_drawmenu_generic(sel, row, pstr, '>', ' ')
737
 
726
 
738
 #ifdef LCD_HAS_STATUS_INDICATORS
727
 #ifdef LCD_HAS_STATUS_INDICATORS
739
-static void lcd_implementation_update_indicators()
740
-{
741
-  #if defined(LCD_I2C_PANELOLU2) || defined(LCD_I2C_VIKI)
742
-    //set the LEDS - referred to as backlights by the LiquidTWI2 library 
743
-    static uint8_t ledsprev = 0;
744
-    uint8_t leds = 0;
745
-    if (target_temperature_bed > 0) leds |= LED_A;
746
-    if (target_temperature[0] > 0) leds |= LED_B;
747
-    if (fanSpeed) leds |= LED_C;
748
-    #if EXTRUDERS > 1  
749
-      if (target_temperature[1] > 0) leds |= LED_C;
728
+
729
+  static void lcd_implementation_update_indicators() {
730
+    #if defined(LCD_I2C_PANELOLU2) || defined(LCD_I2C_VIKI)
731
+      //set the LEDS - referred to as backlights by the LiquidTWI2 library 
732
+      static uint8_t ledsprev = 0;
733
+      uint8_t leds = 0;
734
+      if (target_temperature_bed > 0) leds |= LED_A;
735
+      if (target_temperature[0] > 0) leds |= LED_B;
736
+      if (fanSpeed) leds |= LED_C;
737
+      #if EXTRUDERS > 1  
738
+        if (target_temperature[1] > 0) leds |= LED_C;
739
+      #endif
740
+      if (leds != ledsprev) {
741
+        lcd.setBacklight(leds);
742
+        ledsprev = leds;
743
+      }
750
     #endif
744
     #endif
751
-    if (leds != ledsprev) {
752
-      lcd.setBacklight(leds);
753
-      ledsprev = leds;
754
-    }
755
-  #endif
756
-}
757
-#endif
745
+  }
746
+
747
+#endif // LCD_HAS_STATUS_INDICATORS
758
 
748
 
759
 #ifdef LCD_HAS_SLOW_BUTTONS
749
 #ifdef LCD_HAS_SLOW_BUTTONS
760
-extern uint32_t blocking_enc;
761
 
750
 
762
-static uint8_t lcd_implementation_read_slow_buttons()
763
-{
764
-  #ifdef LCD_I2C_TYPE_MCP23017
765
-  uint8_t slow_buttons;
766
-    // Reading these buttons this is likely to be too slow to call inside interrupt context
767
-    // so they are called during normal lcd_update
768
-    slow_buttons = lcd.readButtons() << B_I2C_BTN_OFFSET; 
769
-    #if defined(LCD_I2C_VIKI)
770
-    if(slow_buttons & (B_MI|B_RI)) { //LCD clicked
771
-       if(blocking_enc > millis()) {
772
-         slow_buttons &= ~(B_MI|B_RI); // Disable LCD clicked buttons if screen is updated
773
-       }
774
-    }
751
+  extern millis_t next_button_update_ms;
752
+
753
+  static uint8_t lcd_implementation_read_slow_buttons() {
754
+    #ifdef LCD_I2C_TYPE_MCP23017
755
+      uint8_t slow_buttons;
756
+      // Reading these buttons this is likely to be too slow to call inside interrupt context
757
+      // so they are called during normal lcd_update
758
+      slow_buttons = lcd.readButtons() << B_I2C_BTN_OFFSET; 
759
+      #ifdef LCD_I2C_VIKI
760
+        if ((slow_buttons & (B_MI|B_RI)) && millis() < next_button_update_ms) // LCD clicked
761
+          slow_buttons &= ~(B_MI|B_RI); // Disable LCD clicked buttons if screen is updated
762
+      #endif
763
+      return slow_buttons;
775
     #endif
764
     #endif
776
-    return slow_buttons; 
777
-  #endif
778
-}
779
-#endif
765
+  }
766
+
767
+#endif // LCD_HAS_SLOW_BUTTONS
780
 
768
 
781
 #endif //__ULTRALCD_IMPLEMENTATION_HITACHI_HD44780_H
769
 #endif //__ULTRALCD_IMPLEMENTATION_HITACHI_HD44780_H

+ 7
- 7
Marlin/ultralcd_st7920_u8glib_rrd.h 查看文件

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 查看文件

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.

+ 6
- 8
README.md 查看文件

24
 ## Current Status: Bug Fixing
24
 ## Current Status: Bug Fixing
25
 
25
 
26
 The Marlin development is currently revived. There's a long list of reported issues and pull requests, which we are working on currently.
26
 The Marlin development is currently revived. There's a long list of reported issues and pull requests, which we are working on currently.
27
-We are actively looking for testers. So please try the current development version and report new issues and feedback.
28
 
27
 
29
 [![Coverity Scan Build Status](https://scan.coverity.com/projects/2224/badge.svg)](https://scan.coverity.com/projects/2224)
28
 [![Coverity Scan Build Status](https://scan.coverity.com/projects/2224/badge.svg)](https://scan.coverity.com/projects/2224)
30
 [![Travis Build Status](https://travis-ci.org/MarlinFirmware/Marlin.svg)](https://travis-ci.org/MarlinFirmware/Marlin)
29
 [![Travis Build Status](https://travis-ci.org/MarlinFirmware/Marlin.svg)](https://travis-ci.org/MarlinFirmware/Marlin)
31
 
30
 
32
 ## Contact
31
 ## Contact
33
 
32
 
34
-__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>
35
 
34
 
36
 ## Credits
35
 ## Credits
37
 
36
 
40
  - Scott Lahteine [@thinkyhead]
39
  - Scott Lahteine [@thinkyhead]
41
  - 
40
  - 
42
 
41
 
43
-Sprinters lead developers are Kliment and caru.
44
-Grbl's lead developer is Simen Svale Skogsrud.
45
-Sonney Jeon (Chamnit) improved some parts of grbl.
46
-A fork by bkubicek for the Ultimaker was merged.
42
+## Donation
43
+
44
+If you find our work usefull please consider donating. Donations will be used to pay for our website http://www.marlinfirmware.org/ and to pay some food or rent money for the very active Collaborators
47
 
45
 
48
 More features have been added by:
46
 More features have been added by:
49
   - Lampmaker,
47
   - Lampmaker,
52
 
50
 
53
 ## License
51
 ## License
54
 
52
 
55
-Marlin is published under the [GPL license](/Documentation/COPYING.md) because I believe in open development.
56
-Please do not use this code in products (3D printers, CNC etc) that are closed source or are crippled by a patent.
53
+Marlin is published under the [GPL license](/Documentation/COPYING.md) because We believe in open development.
54
+Do not use this code in products (3D printers, CNC etc) that are closed source or are crippled by a patent.
57
 
55
 
58
 [![Flattr this git repo](http://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=ErikZalm&url=https://github.com/MarlinFirmware/Marlin&title=Marlin&language=&tags=github&category=software)
56
 [![Flattr this git repo](http://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=ErikZalm&url=https://github.com/MarlinFirmware/Marlin&title=Marlin&language=&tags=github&category=software)

Loading…
取消
儲存