Переглянути джерело

Merge bugfix-1.1.x to 1.1.x

Scott Lahteine 6 роки тому
джерело
коміт
00adacd5dc
100 змінених файлів з 25978 додано та 10696 видалено
  1. 8
    4
      .gitignore
  2. 55
    43
      .travis.yml
  3. 4
    11
      Marlin/Conditionals_LCD.h
  4. 317
    93
      Marlin/Conditionals_post.h
  5. 156
    87
      Marlin/Configuration.h
  6. 268
    125
      Marlin/Configuration_adv.h
  7. 436
    468
      Marlin/G26_Mesh_Validation_Tool.cpp
  8. 2
    15
      Marlin/I2CPositionEncoder.h
  9. 1
    1
      Marlin/Makefile
  10. 88
    43
      Marlin/Marlin.h
  11. 1
    0
      Marlin/MarlinConfig.h
  12. 3
    3
      Marlin/MarlinSPI.h
  13. 19
    18
      Marlin/MarlinSerial.h
  14. 2749
    1848
      Marlin/Marlin_main.cpp
  15. 264
    151
      Marlin/Max7219_Debug_LEDs.cpp
  16. 33
    31
      Marlin/Max7219_Debug_LEDs.h
  17. 267
    76
      Marlin/SanityCheck.h
  18. 124
    138
      Marlin/Sd2Card.cpp
  19. 85
    132
      Marlin/Sd2Card.h
  20. 317
    414
      Marlin/SdBaseFile.cpp
  21. 229
    220
      Marlin/SdBaseFile.h
  22. 91
    104
      Marlin/SdFatConfig.h
  23. 384
    424
      Marlin/SdFatStructs.h
  24. 23
    23
      Marlin/SdFatUtil.cpp
  25. 3
    8
      Marlin/SdFatUtil.h
  26. 26
    28
      Marlin/SdFile.cpp
  27. 9
    12
      Marlin/SdFile.h
  28. 27
    49
      Marlin/SdInfo.h
  29. 75
    111
      Marlin/SdVolume.cpp
  30. 105
    121
      Marlin/SdVolume.h
  31. 3
    3
      Marlin/Version.h
  32. 38
    0
      Marlin/bitmap_flags.h
  33. 8
    8
      Marlin/blinkm.cpp
  34. 9
    5
      Marlin/blinkm.h
  35. 121
    75
      Marlin/boards.h
  36. 95
    71
      Marlin/cardreader.cpp
  37. 33
    25
      Marlin/cardreader.h
  38. 586
    299
      Marlin/configuration_store.cpp
  39. 2
    2
      Marlin/configuration_store.h
  40. 193
    144
      Marlin/dogm_bitmaps.h
  41. 252
    164
      Marlin/dogm_font_data_ISO10646_1.h
  42. 49
    9
      Marlin/endstop_interrupts.h
  43. 131
    48
      Marlin/endstops.cpp
  44. 17
    2
      Marlin/endstops.h
  45. 4
    0
      Marlin/enum.h
  46. 159
    90
      Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h
  47. 268
    125
      Marlin/example_configurations/AlephObjects/TAZ4/Configuration_adv.h
  48. 159
    90
      Marlin/example_configurations/AliExpress/CL-260/Configuration.h
  49. 163
    94
      Marlin/example_configurations/Anet/A6/Configuration.h
  50. 269
    126
      Marlin/example_configurations/Anet/A6/Configuration_adv.h
  51. 162
    92
      Marlin/example_configurations/Anet/A8/Configuration.h
  52. 268
    125
      Marlin/example_configurations/Anet/A8/Configuration_adv.h
  53. 160
    91
      Marlin/example_configurations/BQ/Hephestos/Configuration.h
  54. 268
    125
      Marlin/example_configurations/BQ/Hephestos/Configuration_adv.h
  55. 159
    90
      Marlin/example_configurations/BQ/Hephestos_2/Configuration.h
  56. 268
    125
      Marlin/example_configurations/BQ/Hephestos_2/Configuration_adv.h
  57. 160
    91
      Marlin/example_configurations/BQ/WITBOX/Configuration.h
  58. 268
    125
      Marlin/example_configurations/BQ/WITBOX/Configuration_adv.h
  59. 157
    88
      Marlin/example_configurations/Cartesio/Configuration.h
  60. 268
    125
      Marlin/example_configurations/Cartesio/Configuration_adv.h
  61. 159
    92
      Marlin/example_configurations/Creality/CR-10/Configuration.h
  62. 273
    127
      Marlin/example_configurations/Creality/CR-10/Configuration_adv.h
  63. 160
    91
      Marlin/example_configurations/Felix/Configuration.h
  64. 268
    125
      Marlin/example_configurations/Felix/Configuration_adv.h
  65. 160
    91
      Marlin/example_configurations/Felix/DUAL/Configuration.h
  66. 159
    90
      Marlin/example_configurations/FolgerTech/i3-2020/Configuration.h
  67. 271
    128
      Marlin/example_configurations/FolgerTech/i3-2020/Configuration_adv.h
  68. 160
    91
      Marlin/example_configurations/Geeetech/GT2560/Configuration.h
  69. 157
    88
      Marlin/example_configurations/Geeetech/I3_Pro_X-GT2560/Configuration.h
  70. 159
    90
      Marlin/example_configurations/Infitary/i3-M508/Configuration.h
  71. 268
    125
      Marlin/example_configurations/Infitary/i3-M508/Configuration_adv.h
  72. 159
    90
      Marlin/example_configurations/Malyan/M150/Configuration.h
  73. 268
    125
      Marlin/example_configurations/Malyan/M150/Configuration_adv.h
  74. 15
    0
      Marlin/example_configurations/Micromake/C1/README.md
  75. 1773
    0
      Marlin/example_configurations/Micromake/C1/basic/Configuration.h
  76. 1773
    0
      Marlin/example_configurations/Micromake/C1/enhanced/Configuration.h
  77. 1568
    0
      Marlin/example_configurations/Micromake/C1/enhanced/Configuration_adv.h
  78. 159
    90
      Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h
  79. 159
    90
      Marlin/example_configurations/RigidBot/Configuration.h
  80. 268
    125
      Marlin/example_configurations/RigidBot/Configuration_adv.h
  81. 160
    91
      Marlin/example_configurations/SCARA/Configuration.h
  82. 268
    125
      Marlin/example_configurations/SCARA/Configuration_adv.h
  83. 157
    88
      Marlin/example_configurations/Sanguinololu/Configuration.h
  84. 268
    125
      Marlin/example_configurations/Sanguinololu/Configuration_adv.h
  85. 159
    90
      Marlin/example_configurations/TinyBoy2/Configuration.h
  86. 268
    125
      Marlin/example_configurations/TinyBoy2/Configuration_adv.h
  87. 154
    90
      Marlin/example_configurations/Velleman/K8200/Configuration.h
  88. 263
    122
      Marlin/example_configurations/Velleman/K8200/Configuration_adv.h
  89. 159
    90
      Marlin/example_configurations/Velleman/K8400/Configuration.h
  90. 268
    125
      Marlin/example_configurations/Velleman/K8400/Configuration_adv.h
  91. 159
    90
      Marlin/example_configurations/Velleman/K8400/Dual-head/Configuration.h
  92. 1725
    0
      Marlin/example_configurations/Wanhao/Duplicator 6/Configuration.h
  93. 1569
    0
      Marlin/example_configurations/Wanhao/Duplicator 6/Configuration_adv.h
  94. 159
    90
      Marlin/example_configurations/adafruit/ST7565/Configuration.h
  95. 167
    92
      Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h
  96. 271
    128
      Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h
  97. 166
    91
      Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h
  98. 268
    125
      Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h
  99. 168
    93
      Marlin/example_configurations/delta/generic/Configuration.h
  100. 0
    0
      Marlin/example_configurations/delta/generic/Configuration_adv.h

+ 8
- 4
.gitignore Переглянути файл

118
 
118
 
119
 # PlatformIO files/dirs
119
 # PlatformIO files/dirs
120
 .pio*
120
 .pio*
121
+.pioenvs
122
+.piolibdeps
121
 lib/readme.txt
123
 lib/readme.txt
122
 
124
 
123
 #Visual Studio
125
 #Visual Studio
124
 *.sln
126
 *.sln
125
 *.vcxproj
127
 *.vcxproj
126
 *.vcxproj.filters
128
 *.vcxproj.filters
127
-Marlin/Release/
128
-Marlin/Debug/
129
-Marlin/__vm/
130
-Marlin/.vs/
129
+Release/
130
+Debug/
131
+__vm/
132
+.vs/
133
+vc-fileutils.settings
131
 
134
 
132
 #VScode
135
 #VScode
133
 .vscode
136
 .vscode
137
+.vscode/c_cpp_properties.json
134
 
138
 
135
 #cmake
139
 #cmake
136
 CMakeLists.txt
140
 CMakeLists.txt

+ 55
- 43
.travis.yml Переглянути файл

52
   - git clone https://github.com/teemuatlut/TMC2130Stepper.git
52
   - git clone https://github.com/teemuatlut/TMC2130Stepper.git
53
   - sudo mv TMC2130Stepper /usr/local/share/arduino/libraries/TMC2130Stepper
53
   - sudo mv TMC2130Stepper /usr/local/share/arduino/libraries/TMC2130Stepper
54
   #
54
   #
55
+  # Install: TMC2208 Stepper Motor Controller library
56
+  - git clone https://github.com/teemuatlut/TMC2208Stepper.git
57
+  - sudo mv TMC2208Stepper /usr/local/share/arduino/libraries/TMC2208Stepper
58
+  #
55
   # Install: Adafruit Neopixel library
59
   # Install: Adafruit Neopixel library
56
   - git clone https://github.com/adafruit/Adafruit_NeoPixel.git
60
   - git clone https://github.com/adafruit/Adafruit_NeoPixel.git
57
   - sudo mv Adafruit_NeoPixel /usr/local/share/arduino/libraries/Adafruit_NeoPixel
61
   - sudo mv Adafruit_NeoPixel /usr/local/share/arduino/libraries/Adafruit_NeoPixel
86
   - opt_set TEMP_SENSOR_0 -2
90
   - opt_set TEMP_SENSOR_0 -2
87
   - opt_set TEMP_SENSOR_1 1
91
   - opt_set TEMP_SENSOR_1 1
88
   - opt_set TEMP_SENSOR_BED 1
92
   - opt_set TEMP_SENSOR_BED 1
89
-  - opt_enable PIDTEMPBED FIX_MOUNTED_PROBE Z_SAFE_HOMING ARC_P_CIRCLES CNC_WORKSPACE_PLANES
93
+  - opt_enable PIDTEMPBED FIX_MOUNTED_PROBE Z_SAFE_HOMING ARC_P_CIRCLES CNC_WORKSPACE_PLANES CNC_COORDINATE_SYSTEMS
90
   - opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT EEPROM_SETTINGS
94
   - opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT EEPROM_SETTINGS
91
-  - opt_enable BLINKM PCA9632 RGB_LED NEOPIXEL_RGBW_LED
92
-  - opt_enable AUTO_BED_LEVELING_LINEAR Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE
93
-  - opt_enable_adv FWRETRACT MAX7219_DEBUG
95
+  - opt_enable BLINKM PCA9632 RGB_LED NEOPIXEL_LED
96
+  - opt_enable AUTO_BED_LEVELING_LINEAR Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE SKEW_CORRECTION SKEW_CORRECTION_FOR_Z SKEW_CORRECTION_GCODE
97
+  - opt_enable_adv FWRETRACT MAX7219_DEBUG LED_CONTROL_MENU
94
   - opt_set ABL_GRID_POINTS_X 16
98
   - opt_set ABL_GRID_POINTS_X 16
95
   - opt_set ABL_GRID_POINTS_Y 16
99
   - opt_set ABL_GRID_POINTS_Y 16
96
   - opt_set_adv FANMUX0_PIN 53
100
   - opt_set_adv FANMUX0_PIN 53
99
   # Test a probeless build of AUTO_BED_LEVELING_UBL
103
   # Test a probeless build of AUTO_BED_LEVELING_UBL
100
   #
104
   #
101
   - restore_configs
105
   - restore_configs
102
-  - opt_enable AUTO_BED_LEVELING_UBL UBL_G26_MESH_EDITING ENABLE_LEVELING_FADE_HEIGHT EEPROM_SETTINGS G3D_PANEL
103
-  - opt_enable_adv CUSTOM_USER_MENUS I2C_POSITION_ENCODERS BABYSTEPPING
104
-  - build_marlin
105
-  #
106
-  # And with a probe...
107
-  #
108
-  - opt_enable FIX_MOUNTED_PROBE
106
+  - opt_enable AUTO_BED_LEVELING_UBL DEBUG_LEVELING_FEATURE G26_MESH_EDITING ENABLE_LEVELING_FADE_HEIGHT EEPROM_SETTINGS EEPROM_CHITCHAT G3D_PANEL
107
+  - opt_enable_adv CUSTOM_USER_MENUS I2C_POSITION_ENCODERS BABYSTEPPING NANODLP_Z_SYNC
109
   - build_marlin
108
   - build_marlin
110
   #
109
   #
111
-  # Test a Sled Z Probe
112
-  # ...with AUTO_BED_LEVELING_LINEAR, DEBUG_LEVELING_FEATURE, EEPROM_SETTINGS, and EEPROM_CHITCHAT
110
+  # Add a Sled Z Probe, use UBL Cartesian moves
113
   #
111
   #
114
-  - restore_configs
115
-  - opt_enable Z_PROBE_SLED AUTO_BED_LEVELING_LINEAR DEBUG_LEVELING_FEATURE EEPROM_SETTINGS EEPROM_CHITCHAT
112
+  - opt_enable Z_PROBE_SLED SKEW_CORRECTION SKEW_CORRECTION_FOR_Z SKEW_CORRECTION_GCODE
113
+  - opt_disable SEGMENT_LEVELED_MOVES
114
+  - opt_enable_adv BABYSTEP_ZPROBE_OFFSET DOUBLECLICK_FOR_Z_BABYSTEPPING
116
   - build_marlin
115
   - build_marlin
117
   #
116
   #
118
   # Test a Servo Probe
117
   # Test a Servo Probe
128
   # Test MESH_BED_LEVELING feature, with LCD
127
   # Test MESH_BED_LEVELING feature, with LCD
129
   #
128
   #
130
   - restore_configs
129
   - restore_configs
131
-  - opt_enable MESH_BED_LEVELING MESH_G28_REST_ORIGIN LCD_BED_LEVELING ULTIMAKERCONTROLLER
130
+  - opt_enable MESH_BED_LEVELING G26_MESH_EDITING MESH_G28_REST_ORIGIN LCD_BED_LEVELING ULTIMAKERCONTROLLER
132
   - build_marlin
131
   - build_marlin
133
   #
132
   #
134
-  # Test PROBE_MANUALLY feature, with LCD support,
133
+  # Test MINIRAMBO for PWM_MOTOR_CURRENT
134
+  #      PROBE_MANUALLY feature, with LCD support,
135
+  #      ULTIMAKERCONTROLLER, FILAMENT_LCD_DISPLAY, FILAMENT_WIDTH_SENSOR,
136
+  #      PRINTCOUNTER, NOZZLE_PARK_FEATURE, NOZZLE_CLEAN_FEATURE, PCA9632,
137
+  #      Z_DUAL_STEPPER_DRIVERS, Z_DUAL_ENDSTOPS, BEZIER_CURVE_SUPPORT, EXPERIMENTAL_I2CBUS,
138
+  #      ADVANCED_PAUSE_FEATURE, PARK_HEAD_ON_PAUSE, LCD_INFO_MENU,
135
   #      EEPROM_SETTINGS, EEPROM_CHITCHAT, M100_FREE_MEMORY_WATCHER,
139
   #      EEPROM_SETTINGS, EEPROM_CHITCHAT, M100_FREE_MEMORY_WATCHER,
136
   #      INCH_MODE_SUPPORT, TEMPERATURE_UNITS_SUPPORT
140
   #      INCH_MODE_SUPPORT, TEMPERATURE_UNITS_SUPPORT
137
   #
141
   #
138
   - restore_configs
142
   - restore_configs
139
   - opt_set MOTHERBOARD BOARD_MINIRAMBO
143
   - opt_set MOTHERBOARD BOARD_MINIRAMBO
140
-  - opt_enable PROBE_MANUALLY AUTO_BED_LEVELING_BILINEAR LCD_BED_LEVELING ULTIMAKERCONTROLLER
144
+  - opt_enable PROBE_MANUALLY AUTO_BED_LEVELING_BILINEAR G26_MESH_EDITING LCD_BED_LEVELING ULTIMAKERCONTROLLER
141
   - opt_enable EEPROM_SETTINGS EEPROM_CHITCHAT M100_FREE_MEMORY_WATCHER M100_FREE_MEMORY_DUMPER M100_FREE_MEMORY_CORRUPTOR INCH_MODE_SUPPORT TEMPERATURE_UNITS_SUPPORT
145
   - opt_enable EEPROM_SETTINGS EEPROM_CHITCHAT M100_FREE_MEMORY_WATCHER M100_FREE_MEMORY_DUMPER M100_FREE_MEMORY_CORRUPTOR INCH_MODE_SUPPORT TEMPERATURE_UNITS_SUPPORT
146
+  - opt_enable ULTIMAKERCONTROLLER SDSUPPORT
147
+  - opt_enable PRINTCOUNTER NOZZLE_PARK_FEATURE NOZZLE_CLEAN_FEATURE PCA9632 USE_XMAX_PLUG
148
+  - opt_enable_adv BEZIER_CURVE_SUPPORT EXPERIMENTAL_I2CBUS
149
+  - opt_enable_adv ADVANCED_PAUSE_FEATURE PARK_HEAD_ON_PAUSE LCD_INFO_MENU M114_DETAIL
150
+  - opt_set_adv PWM_MOTOR_CURRENT {1300,1300,1250}
151
+  - opt_set_adv I2C_SLAVE_ADDRESS 63
142
   - build_marlin
152
   - build_marlin
143
   #
153
   #
144
   # Test 5 extruders on AZTEEG_X3_PRO (can use any board with >=5 extruders defined)
154
   # Test 5 extruders on AZTEEG_X3_PRO (can use any board with >=5 extruders defined)
191
   - opt_enable SWITCHING_EXTRUDER ULTIMAKERCONTROLLER
201
   - opt_enable SWITCHING_EXTRUDER ULTIMAKERCONTROLLER
192
   - build_marlin
202
   - build_marlin
193
   #
203
   #
194
-  # Test MINIRAMBO for PWM_MOTOR_CURRENT
195
-  #      ULTIMAKERCONTROLLER, FILAMENT_LCD_DISPLAY, FILAMENT_WIDTH_SENSOR,
196
-  #      PRINTCOUNTER, NOZZLE_PARK_FEATURE, NOZZLE_CLEAN_FEATURE, PCA9632,
197
-  #      Z_DUAL_STEPPER_DRIVERS, Z_DUAL_ENDSTOPS, BEZIER_CURVE_SUPPORT, EXPERIMENTAL_I2CBUS,
198
-  #      ADVANCED_PAUSE_FEATURE, PARK_HEAD_ON_PAUSE, LCD_INFO_MENU,
199
-  #
200
-  - restore_configs
201
-  - opt_enable ULTIMAKERCONTROLLER FILAMENT_LCD_DISPLAY FILAMENT_WIDTH_SENSOR SDSUPPORT
202
-  - opt_enable PRINTCOUNTER NOZZLE_PARK_FEATURE NOZZLE_CLEAN_FEATURE PCA9632
203
-  - opt_enable_adv Z_DUAL_STEPPER_DRIVERS Z_DUAL_ENDSTOPS BEZIER_CURVE_SUPPORT EXPERIMENTAL_I2CBUS
204
-  - opt_set_adv I2C_SLAVE_ADDRESS 63
205
-  - opt_enable_adv ADVANCED_PAUSE_FEATURE PARK_HEAD_ON_PAUSE LCD_INFO_MENU
206
-  - pins_set RAMPS X_MAX_PIN -1
207
-  - opt_set_adv Z2_MAX_PIN 2
208
-  - build_marlin
209
-  #
210
   # Enable COREXY
204
   # Enable COREXY
211
   #
205
   #
212
   - restore_configs
206
   - restore_configs
213
   - opt_enable COREXY
207
   - opt_enable COREXY
214
   - build_marlin
208
   - build_marlin
215
   #
209
   #
216
-  # Enable COREYX (swapped)
217
-  #
218
-  #- restore_configs
219
-  #- opt_enable COREYX
220
-  #- build_marlin
210
+  # Test many less common options
221
   #
211
   #
212
+  - restore_configs
213
+  - opt_enable COREYX
214
+  - opt_set_adv FAN_MIN_PWM 50
215
+  - opt_set_adv FAN_KICKSTART_TIME 100
216
+  - opt_set_adv XY_FREQUENCY_LIMIT  15
217
+  - opt_enable_adv SHOW_TEMP_ADC_VALUES HOME_Y_BEFORE_X EMERGENCY_PARSER FAN_KICKSTART_TIME
218
+  - opt_enable_adv ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED ADVANCED_OK
219
+  - opt_enable_adv VOLUMETRIC_DEFAULT_ON NO_WORKSPACE_OFFSETS ACTION_ON_KILL
220
+  - opt_enable_adv EXTRA_FAN_SPEED FWERETRACT Z_DUAL_STEPPER_DRIVERS Z_DUAL_ENDSTOPS
221
+  - opt_enable_adv MENU_ADDAUTOSTART SDCARD_SORT_ALPHA
222
+  - opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER
223
+  - opt_enable FILAMENT_LCD_DISPLAY FILAMENT_WIDTH_SENSOR
224
+  - opt_enable ENDSTOP_INTERRUPTS_FEATURE FAN_SOFT_PWM SDSUPPORT
225
+  - opt_enable USE_XMAX_PLUG
226
+  - build_marlin
222
   #
227
   #
223
   ######## Other Standard LCD/Panels ##############
228
   ######## Other Standard LCD/Panels ##############
224
   #
229
   #
252
   #
257
   #
253
   - restore_configs
258
   - restore_configs
254
   - opt_enable G3D_PANEL SDSUPPORT
259
   - opt_enable G3D_PANEL SDSUPPORT
255
-  - opt_enable_adv SDCARD_SORT_ALPHA STATUS_MESSAGE_SCROLLING
260
+  - opt_enable_adv SDCARD_SORT_ALPHA STATUS_MESSAGE_SCROLLING SCROLL_LONG_FILENAMES
256
   - opt_set_adv SDSORT_GCODE true
261
   - opt_set_adv SDSORT_GCODE true
257
   - opt_set_adv SDSORT_USES_RAM true
262
   - opt_set_adv SDSORT_USES_RAM true
258
   - opt_set_adv SDSORT_USES_STACK true
263
   - opt_set_adv SDSORT_USES_STACK true
263
   #
268
   #
264
   - restore_configs
269
   - restore_configs
265
   - opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER SDSUPPORT
270
   - opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER SDSUPPORT
266
-  - opt_enable_adv SDCARD_SORT_ALPHA STATUS_MESSAGE_SCROLLING
271
+  - opt_enable_adv SDCARD_SORT_ALPHA STATUS_MESSAGE_SCROLLING SCROLL_LONG_FILENAMES
267
   - build_marlin
272
   - build_marlin
268
   #
273
   #
269
   # REPRAPWORLD_KEYPAD
274
   # REPRAPWORLD_KEYPAD
326
   #
331
   #
327
   - use_example_configs delta/generic
332
   - use_example_configs delta/generic
328
   - opt_disable DISABLE_MIN_ENDSTOPS
333
   - opt_disable DISABLE_MIN_ENDSTOPS
329
-  - opt_enable AUTO_BED_LEVELING_UBL Z_PROBE_ALLEN_KEY EEPROM_SETTINGS EEPROM_CHITCHAT OLED_PANEL_TINYBOY2
334
+  - opt_enable AUTO_BED_LEVELING_UBL Z_PROBE_ALLEN_KEY EEPROM_SETTINGS EEPROM_CHITCHAT OLED_PANEL_TINYBOY2 MESH_EDIT_GFX_OVERLAY
330
   - build_marlin
335
   - build_marlin
331
   #
336
   #
332
   # Delta Config (FLSUN AC because it's complex)
337
   # Delta Config (FLSUN AC because it's complex)
344
   - use_example_configs SCARA
349
   - use_example_configs SCARA
345
   - opt_enable AUTO_BED_LEVELING_BILINEAR FIX_MOUNTED_PROBE USE_ZMIN_PLUG EEPROM_SETTINGS EEPROM_CHITCHAT ULTIMAKERCONTROLLER
350
   - opt_enable AUTO_BED_LEVELING_BILINEAR FIX_MOUNTED_PROBE USE_ZMIN_PLUG EEPROM_SETTINGS EEPROM_CHITCHAT ULTIMAKERCONTROLLER
346
   - opt_enable_adv HAVE_TMC2130 X_IS_TMC2130 Y_IS_TMC2130 Z_IS_TMC2130
351
   - opt_enable_adv HAVE_TMC2130 X_IS_TMC2130 Y_IS_TMC2130 Z_IS_TMC2130
347
-  - opt_enable_adv AUTOMATIC_CURRENT_CONTROL STEALTHCHOP HYBRID_THRESHOLD SENSORLESS_HOMING
352
+  - opt_enable_adv MONITOR_DRIVER_STATUS STEALTHCHOP HYBRID_THRESHOLD TMC_DEBUG SENSORLESS_HOMING
353
+  - build_marlin
354
+  #
355
+  # TMC2208 Config
356
+  #
357
+  - restore_configs
358
+  - opt_enable_adv HAVE_TMC2208 X_IS_TMC2208 Y_IS_TMC2208 Z_IS_TMC2208
359
+  - opt_enable_adv MONITOR_DRIVER_STATUS STEALTHCHOP HYBRID_THRESHOLD TMC_DEBUG
348
   - build_marlin
360
   - build_marlin
349
   #
361
   #
350
   # tvrrug Config need to check board type for sanguino atmega644p
362
   # tvrrug Config need to check board type for sanguino atmega644p

+ 4
- 11
Marlin/Conditionals_LCD.h Переглянути файл

42
 
42
 
43
     #define U8GLIB_ST7565_64128N
43
     #define U8GLIB_ST7565_64128N
44
 
44
 
45
-  #elif ENABLED(ANET_KEYPAD_LCD)
45
+  #elif ENABLED(ZONESTAR_LCD)
46
 
46
 
47
     #define REPRAPWORLD_KEYPAD
47
     #define REPRAPWORLD_KEYPAD
48
     #define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
48
     #define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
53
     // this helps to implement ADC_KEYPAD menus
53
     // this helps to implement ADC_KEYPAD menus
54
     #define ENCODER_PULSES_PER_STEP 1
54
     #define ENCODER_PULSES_PER_STEP 1
55
     #define ENCODER_STEPS_PER_MENU_ITEM 1
55
     #define ENCODER_STEPS_PER_MENU_ITEM 1
56
+    #define ENCODER_FEEDRATE_DEADZONE 2
56
     #define REVERSE_MENU_DIRECTION
57
     #define REVERSE_MENU_DIRECTION
57
 
58
 
58
   #elif ENABLED(ANET_FULL_GRAPHICS_LCD)
59
   #elif ENABLED(ANET_FULL_GRAPHICS_LCD)
62
   #elif ENABLED(BQ_LCD_SMART_CONTROLLER)
63
   #elif ENABLED(BQ_LCD_SMART_CONTROLLER)
63
 
64
 
64
     #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
65
     #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
65
-    #define LONG_FILENAME_HOST_SUPPORT
66
 
66
 
67
   #elif ENABLED(miniVIKI) || ENABLED(VIKI2) || ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
67
   #elif ENABLED(miniVIKI) || ENABLED(VIKI2) || ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
68
 
68
 
155
 
155
 
156
   #endif
156
   #endif
157
 
157
 
158
-  #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) || ENABLED(LCD_FOR_MELZI)
158
+  #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) || ENABLED(LCD_FOR_MELZI) || ENABLED(SILVER_GATE_GLCD_CONTROLLER)
159
     #define DOGLCD
159
     #define DOGLCD
160
     #define U8GLIB_ST7920
160
     #define U8GLIB_ST7920
161
     #define REPRAP_DISCOUNT_SMART_CONTROLLER
161
     #define REPRAP_DISCOUNT_SMART_CONTROLLER
306
     #define LCD_STR_FILAM_DIA   "\xf8"
306
     #define LCD_STR_FILAM_DIA   "\xf8"
307
     #define LCD_STR_FILAM_MUL   "\xa4"
307
     #define LCD_STR_FILAM_MUL   "\xa4"
308
   #else
308
   #else
309
-    /* Custom characters defined in the first 8 characters of the LCD */
309
+    // Custom characters defined in the first 8 characters of the LCD
310
     #define LCD_BEDTEMP_CHAR     0x00  // Print only as a char. This will have 'unexpected' results when used in a string!
310
     #define LCD_BEDTEMP_CHAR     0x00  // Print only as a char. This will have 'unexpected' results when used in a string!
311
     #define LCD_DEGREE_CHAR      0x01
311
     #define LCD_DEGREE_CHAR      0x01
312
     #define LCD_STR_THERMOMETER "\x02" // Still used with string concatenation
312
     #define LCD_STR_THERMOMETER "\x02" // Still used with string concatenation
454
   #define HAS_Z_SERVO_ENDSTOP (defined(Z_ENDSTOP_SERVO_NR) && Z_ENDSTOP_SERVO_NR >= 0)
454
   #define HAS_Z_SERVO_ENDSTOP (defined(Z_ENDSTOP_SERVO_NR) && Z_ENDSTOP_SERVO_NR >= 0)
455
 
455
 
456
   /**
456
   /**
457
-   * UBL has its own manual probing, so this just causes trouble.
458
-   */
459
-  #if ENABLED(AUTO_BED_LEVELING_UBL)
460
-    #undef PROBE_MANUALLY
461
-  #endif
462
-
463
-  /**
464
    * Set a flag for any enabled probe
457
    * Set a flag for any enabled probe
465
    */
458
    */
466
   #define PROBE_SELECTED (ENABLED(PROBE_MANUALLY) || ENABLED(FIX_MOUNTED_PROBE) || ENABLED(Z_PROBE_ALLEN_KEY) || HAS_Z_SERVO_ENDSTOP || ENABLED(Z_PROBE_SLED) || ENABLED(SOLENOID_PROBE))
459
   #define PROBE_SELECTED (ENABLED(PROBE_MANUALLY) || ENABLED(FIX_MOUNTED_PROBE) || ENABLED(Z_PROBE_ALLEN_KEY) || HAS_Z_SERVO_ENDSTOP || ENABLED(Z_PROBE_SLED) || ENABLED(SOLENOID_PROBE))

+ 317
- 93
Marlin/Conditionals_post.h Переглянути файл

89
       #define CORE_AXIS_1 B_AXIS
89
       #define CORE_AXIS_1 B_AXIS
90
       #define CORE_AXIS_2 C_AXIS
90
       #define CORE_AXIS_2 C_AXIS
91
     #endif
91
     #endif
92
-    #if (ENABLED(COREYX) || ENABLED(COREZX) || ENABLED(COREZY))
92
+    #if ENABLED(COREYX) || ENABLED(COREZX) || ENABLED(COREZY)
93
       #define CORESIGN(n) (-(n))
93
       #define CORESIGN(n) (-(n))
94
     #else
94
     #else
95
       #define CORESIGN(n) (n)
95
       #define CORESIGN(n) (n)
379
   #define ARRAY_BY_HOTENDS1(v1) ARRAY_BY_HOTENDS(v1, v1, v1, v1, v1, v1)
379
   #define ARRAY_BY_HOTENDS1(v1) ARRAY_BY_HOTENDS(v1, v1, v1, v1, v1, v1)
380
 
380
 
381
   /**
381
   /**
382
+   * X_DUAL_ENDSTOPS endstop reassignment
383
+   */
384
+  #if ENABLED(X_DUAL_ENDSTOPS)
385
+    #if X_HOME_DIR > 0
386
+      #if X2_USE_ENDSTOP == _XMIN_
387
+        #define X2_MAX_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
388
+        #define X2_MAX_PIN X_MIN_PIN
389
+      #elif X2_USE_ENDSTOP == _XMAX_
390
+        #define X2_MAX_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING
391
+        #define X2_MAX_PIN X_MAX_PIN
392
+      #elif X2_USE_ENDSTOP == _YMIN_
393
+        #define X2_MAX_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING
394
+        #define X2_MAX_PIN Y_MIN_PIN
395
+      #elif X2_USE_ENDSTOP == _YMAX_
396
+        #define X2_MAX_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING
397
+        #define X2_MAX_PIN Y_MAX_PIN
398
+      #elif X2_USE_ENDSTOP == _ZMIN_
399
+        #define X2_MAX_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
400
+        #define X2_MAX_PIN Z_MIN_PIN
401
+      #elif X2_USE_ENDSTOP == _ZMAX_
402
+        #define X2_MAX_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
403
+        #define X2_MAX_PIN Z_MAX_PIN
404
+      #else
405
+        #define X2_MAX_ENDSTOP_INVERTING false
406
+      #endif
407
+      #define X2_MIN_ENDSTOP_INVERTING false
408
+    #else
409
+      #if X2_USE_ENDSTOP == _XMIN_
410
+        #define X2_MIN_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
411
+        #define X2_MIN_PIN X_MIN_PIN
412
+      #elif X2_USE_ENDSTOP == _XMAX_
413
+        #define X2_MIN_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING
414
+        #define X2_MIN_PIN X_MAX_PIN
415
+      #elif X2_USE_ENDSTOP == _YMIN_
416
+        #define X2_MIN_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING
417
+        #define X2_MIN_PIN Y_MIN_PIN
418
+      #elif X2_USE_ENDSTOP == _YMAX_
419
+        #define X2_MIN_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING
420
+        #define X2_MIN_PIN Y_MAX_PIN
421
+      #elif X2_USE_ENDSTOP == _ZMIN_
422
+        #define X2_MIN_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
423
+        #define X2_MIN_PIN Z_MIN_PIN
424
+      #elif X2_USE_ENDSTOP == _ZMAX_
425
+        #define X2_MIN_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
426
+        #define X2_MIN_PIN Z_MAX_PIN
427
+      #else
428
+        #define X2_MIN_ENDSTOP_INVERTING false
429
+      #endif
430
+      #define X2_MAX_ENDSTOP_INVERTING false
431
+    #endif
432
+  #endif
433
+
434
+  // Is an endstop plug used for the X2 endstop?
435
+  #define IS_X2_ENDSTOP(A,M) (ENABLED(X_DUAL_ENDSTOPS) && X2_USE_ENDSTOP == _##A##M##_)
436
+
437
+  /**
438
+   * Y_DUAL_ENDSTOPS endstop reassignment
439
+   */
440
+  #if ENABLED(Y_DUAL_ENDSTOPS)
441
+    #if Y_HOME_DIR > 0
442
+      #if Y2_USE_ENDSTOP == _XMIN_
443
+        #define Y2_MAX_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
444
+        #define Y2_MAX_PIN X_MIN_PIN
445
+      #elif Y2_USE_ENDSTOP == _XMAX_
446
+        #define Y2_MAX_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING
447
+        #define Y2_MAX_PIN X_MAX_PIN
448
+      #elif Y2_USE_ENDSTOP == _YMIN_
449
+        #define Y2_MAX_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING
450
+        #define Y2_MAX_PIN Y_MIN_PIN
451
+      #elif Y2_USE_ENDSTOP == _YMAX_
452
+        #define Y2_MAX_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING
453
+        #define Y2_MAX_PIN Y_MAX_PIN
454
+      #elif Y2_USE_ENDSTOP == _ZMIN_
455
+        #define Y2_MAX_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
456
+        #define Y2_MAX_PIN Z_MIN_PIN
457
+      #elif Y2_USE_ENDSTOP == _ZMAX_
458
+        #define Y2_MAX_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
459
+        #define Y2_MAX_PIN Z_MAX_PIN
460
+      #else
461
+        #define Y2_MAX_ENDSTOP_INVERTING false
462
+      #endif
463
+      #define Y2_MIN_ENDSTOP_INVERTING false
464
+    #else
465
+      #if Y2_USE_ENDSTOP == _XMIN_
466
+        #define Y2_MIN_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
467
+        #define Y2_MIN_PIN X_MIN_PIN
468
+      #elif Y2_USE_ENDSTOP == _XMAX_
469
+        #define Y2_MIN_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING
470
+        #define Y2_MIN_PIN X_MAX_PIN
471
+      #elif Y2_USE_ENDSTOP == _YMIN_
472
+        #define Y2_MIN_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING
473
+        #define Y2_MIN_PIN Y_MIN_PIN
474
+      #elif Y2_USE_ENDSTOP == _YMAX_
475
+        #define Y2_MIN_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING
476
+        #define Y2_MIN_PIN Y_MAX_PIN
477
+      #elif Y2_USE_ENDSTOP == _ZMIN_
478
+        #define Y2_MIN_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
479
+        #define Y2_MIN_PIN Z_MIN_PIN
480
+      #elif Y2_USE_ENDSTOP == _ZMAX_
481
+        #define Y2_MIN_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
482
+        #define Y2_MIN_PIN Z_MAX_PIN
483
+      #else
484
+        #define Y2_MIN_ENDSTOP_INVERTING false
485
+      #endif
486
+      #define Y2_MAX_ENDSTOP_INVERTING false
487
+    #endif
488
+  #endif
489
+
490
+  // Is an endstop plug used for the Y2 endstop or the bed probe?
491
+  #define IS_Y2_ENDSTOP(A,M) (ENABLED(Y_DUAL_ENDSTOPS) && Y2_USE_ENDSTOP == _##A##M##_)
492
+
493
+  /**
382
    * Z_DUAL_ENDSTOPS endstop reassignment
494
    * Z_DUAL_ENDSTOPS endstop reassignment
383
    */
495
    */
384
   #if ENABLED(Z_DUAL_ENDSTOPS)
496
   #if ENABLED(Z_DUAL_ENDSTOPS)
385
-    #define _XMIN_ 100
386
-    #define _YMIN_ 200
387
-    #define _ZMIN_ 300
388
-    #define _XMAX_ 101
389
-    #define _YMAX_ 201
390
-    #define _ZMAX_ 301
391
-    #if Z2_USE_ENDSTOP == _XMIN_
392
-      #define USE_XMIN_PLUG
393
-    #elif Z2_USE_ENDSTOP == _XMAX_
394
-      #define USE_XMAX_PLUG
395
-    #elif Z2_USE_ENDSTOP == _YMIN_
396
-      #define USE_YMIN_PLUG
397
-    #elif Z2_USE_ENDSTOP == _YMAX_
398
-      #define USE_YMAX_PLUG
399
-    #elif Z2_USE_ENDSTOP == _ZMIN_
400
-      #define USE_ZMIN_PLUG
401
-    #elif Z2_USE_ENDSTOP == _ZMAX_
402
-      #define USE_ZMAX_PLUG
403
-    #endif
404
     #if Z_HOME_DIR > 0
497
     #if Z_HOME_DIR > 0
405
       #if Z2_USE_ENDSTOP == _XMIN_
498
       #if Z2_USE_ENDSTOP == _XMIN_
406
         #define Z2_MAX_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
499
         #define Z2_MAX_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
423
       #else
516
       #else
424
         #define Z2_MAX_ENDSTOP_INVERTING false
517
         #define Z2_MAX_ENDSTOP_INVERTING false
425
       #endif
518
       #endif
519
+      #define Z2_MIN_ENDSTOP_INVERTING false
426
     #else
520
     #else
427
       #if Z2_USE_ENDSTOP == _XMIN_
521
       #if Z2_USE_ENDSTOP == _XMIN_
428
         #define Z2_MIN_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
522
         #define Z2_MIN_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
445
       #else
539
       #else
446
         #define Z2_MIN_ENDSTOP_INVERTING false
540
         #define Z2_MIN_ENDSTOP_INVERTING false
447
       #endif
541
       #endif
542
+      #define Z2_MAX_ENDSTOP_INVERTING false
448
     #endif
543
     #endif
449
   #endif
544
   #endif
450
 
545
 
541
   #define HAS_SOLENOID_4    (PIN_EXISTS(SOL4))
636
   #define HAS_SOLENOID_4    (PIN_EXISTS(SOL4))
542
 
637
 
543
   // Endstops and bed probe
638
   // Endstops and bed probe
544
-  #define HAS_X_MIN (PIN_EXISTS(X_MIN) && !IS_Z2_OR_PROBE(X,MIN))
545
-  #define HAS_X_MAX (PIN_EXISTS(X_MAX) && !IS_Z2_OR_PROBE(X,MAX))
546
-  #define HAS_Y_MIN (PIN_EXISTS(Y_MIN) && !IS_Z2_OR_PROBE(Y,MIN))
547
-  #define HAS_Y_MAX (PIN_EXISTS(Y_MAX) && !IS_Z2_OR_PROBE(Y,MAX))
548
-  #define HAS_Z_MIN (PIN_EXISTS(Z_MIN) && !IS_Z2_OR_PROBE(Z,MIN))
549
-  #define HAS_Z_MAX (PIN_EXISTS(Z_MAX) && !IS_Z2_OR_PROBE(Z,MAX))
639
+  #define HAS_X_MIN (PIN_EXISTS(X_MIN) && !IS_X2_ENDSTOP(X,MIN) && !IS_Y2_ENDSTOP(X,MIN) && !IS_Z2_OR_PROBE(X,MIN))
640
+  #define HAS_X_MAX (PIN_EXISTS(X_MAX) && !IS_X2_ENDSTOP(X,MAX) && !IS_Y2_ENDSTOP(X,MAX) && !IS_Z2_OR_PROBE(X,MAX))
641
+  #define HAS_Y_MIN (PIN_EXISTS(Y_MIN) && !IS_X2_ENDSTOP(Y,MIN) && !IS_Y2_ENDSTOP(Y,MIN) && !IS_Z2_OR_PROBE(Y,MIN))
642
+  #define HAS_Y_MAX (PIN_EXISTS(Y_MAX) && !IS_X2_ENDSTOP(Y,MAX) && !IS_Y2_ENDSTOP(Y,MAX) && !IS_Z2_OR_PROBE(Y,MAX))
643
+  #define HAS_Z_MIN (PIN_EXISTS(Z_MIN) && !IS_X2_ENDSTOP(Z,MIN) && !IS_Y2_ENDSTOP(Z,MIN) && !IS_Z2_OR_PROBE(Z,MIN))
644
+  #define HAS_Z_MAX (PIN_EXISTS(Z_MAX) && !IS_X2_ENDSTOP(Z,MAX) && !IS_Y2_ENDSTOP(Z,MAX) && !IS_Z2_OR_PROBE(Z,MAX))
645
+  #define HAS_X2_MIN (PIN_EXISTS(X2_MIN))
646
+  #define HAS_X2_MAX (PIN_EXISTS(X2_MAX))
647
+  #define HAS_Y2_MIN (PIN_EXISTS(Y2_MIN))
648
+  #define HAS_Y2_MAX (PIN_EXISTS(Y2_MAX))
550
   #define HAS_Z2_MIN (PIN_EXISTS(Z2_MIN))
649
   #define HAS_Z2_MIN (PIN_EXISTS(Z2_MIN))
551
   #define HAS_Z2_MAX (PIN_EXISTS(Z2_MAX))
650
   #define HAS_Z2_MAX (PIN_EXISTS(Z2_MAX))
552
   #define HAS_Z_MIN_PROBE_PIN (PIN_EXISTS(Z_MIN_PROBE))
651
   #define HAS_Z_MIN_PROBE_PIN (PIN_EXISTS(Z_MIN_PROBE))
705
     #endif
804
     #endif
706
   #endif
805
   #endif
707
 
806
 
708
-  #define PROBE_PIN_CONFIGURED (HAS_Z_MIN_PROBE_PIN || (HAS_Z_MIN && ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)))
709
-  #define HAS_BED_PROBE (PROBE_SELECTED && PROBE_PIN_CONFIGURED && DISABLED(PROBE_MANUALLY))
807
+  #define HAS_BED_PROBE (PROBE_SELECTED && DISABLED(PROBE_MANUALLY))
710
 
808
 
711
   #if ENABLED(Z_PROBE_ALLEN_KEY)
809
   #if ENABLED(Z_PROBE_ALLEN_KEY)
712
     #define PROBE_IS_TRIGGERED_WHEN_STOWED_TEST
810
     #define PROBE_IS_TRIGGERED_WHEN_STOWED_TEST
747
   #endif
845
   #endif
748
 
846
 
749
   /**
847
   /**
848
+   * XYZ Bed Skew Correction
849
+   */
850
+  #if ENABLED(SKEW_CORRECTION)
851
+    #define SKEW_FACTOR_MIN -1
852
+    #define SKEW_FACTOR_MAX 1
853
+
854
+    #define _GET_SIDE(a,b,c) (SQRT(2*sq(a)+2*sq(b)-4*sq(c))*0.5)
855
+    #define _SKEW_SIDE(a,b,c) tan(M_PI*0.5-acos((sq(a)-sq(b)-sq(c))/(2*c*b)))
856
+    #define _SKEW_FACTOR(a,b,c) _SKEW_SIDE(a,_GET_SIDE(a,b,c),c)
857
+
858
+    #ifndef XY_SKEW_FACTOR
859
+      constexpr float XY_SKEW_FACTOR = (
860
+        #if defined(XY_DIAG_AC) && defined(XY_DIAG_BD) && defined(XY_SIDE_AD)
861
+          _SKEW_FACTOR(XY_DIAG_AC, XY_DIAG_BD, XY_SIDE_AD)
862
+        #else
863
+          0.0
864
+        #endif
865
+      );
866
+    #endif
867
+    #ifndef XZ_SKEW_FACTOR
868
+      #if defined(XY_SIDE_AD) && !defined(XZ_SIDE_AD)
869
+        #define XZ_SIDE_AD XY_SIDE_AD
870
+      #endif
871
+      constexpr float XZ_SKEW_FACTOR = (
872
+        #if defined(XZ_DIAG_AC) && defined(XZ_DIAG_BD) && defined(XZ_SIDE_AD)
873
+          _SKEW_FACTOR(XZ_DIAG_AC, XZ_DIAG_BD, XZ_SIDE_AD)
874
+        #else
875
+          0.0
876
+        #endif
877
+      );
878
+    #endif
879
+    #ifndef YZ_SKEW_FACTOR
880
+      constexpr float YZ_SKEW_FACTOR = (
881
+        #if defined(YZ_DIAG_AC) && defined(YZ_DIAG_BD) && defined(YZ_SIDE_AD)
882
+          _SKEW_FACTOR(YZ_DIAG_AC, YZ_DIAG_BD, YZ_SIDE_AD)
883
+        #else
884
+          0.0
885
+        #endif
886
+      );
887
+    #endif
888
+  #endif // SKEW_CORRECTION
889
+
890
+  /**
750
    * Heater & Fan Pausing
891
    * Heater & Fan Pausing
751
    */
892
    */
752
   #if FAN_COUNT == 0
893
   #if FAN_COUNT == 0
756
   #define HEATER_IDLE_HANDLER (ENABLED(ADVANCED_PAUSE_FEATURE) || ENABLED(PROBING_HEATERS_OFF))
897
   #define HEATER_IDLE_HANDLER (ENABLED(ADVANCED_PAUSE_FEATURE) || ENABLED(PROBING_HEATERS_OFF))
757
 
898
 
758
   /**
899
   /**
900
+   * Only constrain Z on DELTA / SCARA machines
901
+   */
902
+  #if IS_KINEMATIC
903
+    #undef MIN_SOFTWARE_ENDSTOP_X
904
+    #undef MIN_SOFTWARE_ENDSTOP_Y
905
+    #undef MAX_SOFTWARE_ENDSTOP_X
906
+    #undef MAX_SOFTWARE_ENDSTOP_Y
907
+  #endif
908
+
909
+  /**
759
    * Delta radius/rod trimmers/angle trimmers
910
    * Delta radius/rod trimmers/angle trimmers
760
    */
911
    */
761
   #if ENABLED(DELTA)
912
   #if ENABLED(DELTA)
913
+    #ifndef DELTA_PROBEABLE_RADIUS
914
+      #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
915
+    #endif
762
     #ifndef DELTA_CALIBRATION_RADIUS
916
     #ifndef DELTA_CALIBRATION_RADIUS
763
       #define DELTA_CALIBRATION_RADIUS DELTA_PRINTABLE_RADIUS - 10
917
       #define DELTA_CALIBRATION_RADIUS DELTA_PRINTABLE_RADIUS - 10
764
     #endif
918
     #endif
779
   /**
933
   /**
780
    * Set granular options based on the specific type of leveling
934
    * Set granular options based on the specific type of leveling
781
    */
935
    */
782
-
783
-  #define UBL_DELTA  (ENABLED(AUTO_BED_LEVELING_UBL) && (ENABLED(DELTA) || ENABLED(UBL_GRANULAR_SEGMENTATION_FOR_CARTESIAN)))
784
-  #define ABL_PLANAR (ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_3POINT))
785
-  #define ABL_GRID   (ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR))
786
-  #define HAS_ABL    (ABL_PLANAR || ABL_GRID || ENABLED(AUTO_BED_LEVELING_UBL))
787
-  #define HAS_LEVELING          (HAS_ABL || ENABLED(MESH_BED_LEVELING))
788
-  #define PLANNER_LEVELING      (ABL_PLANAR || ABL_GRID || ENABLED(MESH_BED_LEVELING) || UBL_DELTA)
936
+  #define UBL_SEGMENTED  (ENABLED(AUTO_BED_LEVELING_UBL) && (ENABLED(DELTA) || ENABLED(SEGMENT_LEVELED_MOVES)))
937
+  #define ABL_PLANAR     (ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_3POINT))
938
+  #define ABL_GRID       (ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR))
939
+  #define OLDSCHOOL_ABL  (ABL_PLANAR || ABL_GRID)
940
+  #define HAS_ABL        (OLDSCHOOL_ABL || ENABLED(AUTO_BED_LEVELING_UBL))
941
+  #define HAS_LEVELING   (HAS_ABL || ENABLED(MESH_BED_LEVELING))
942
+  #define HAS_AUTOLEVEL  (HAS_ABL && DISABLED(PROBE_MANUALLY))
943
+  #define HAS_MESH       (ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(MESH_BED_LEVELING))
944
+  #define PLANNER_LEVELING      (OLDSCHOOL_ABL || ENABLED(MESH_BED_LEVELING) || UBL_SEGMENTED || ENABLED(SKEW_CORRECTION))
789
   #define HAS_PROBING_PROCEDURE (HAS_ABL || ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST))
945
   #define HAS_PROBING_PROCEDURE (HAS_ABL || ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST))
790
   #if HAS_PROBING_PROCEDURE
946
   #if HAS_PROBING_PROCEDURE
791
     #define PROBE_BED_WIDTH abs(RIGHT_PROBE_BED_POSITION - (LEFT_PROBE_BED_POSITION))
947
     #define PROBE_BED_WIDTH abs(RIGHT_PROBE_BED_POSITION - (LEFT_PROBE_BED_POSITION))
792
     #define PROBE_BED_HEIGHT abs(BACK_PROBE_BED_POSITION - (FRONT_PROBE_BED_POSITION))
948
     #define PROBE_BED_HEIGHT abs(BACK_PROBE_BED_POSITION - (FRONT_PROBE_BED_POSITION))
793
   #endif
949
   #endif
794
 
950
 
951
+  #if ENABLED(SEGMENT_LEVELED_MOVES) && !defined(LEVELED_SEGMENT_LENGTH)
952
+    #define LEVELED_SEGMENT_LENGTH 5
953
+  #endif
954
+
955
+  /**
956
+   * Bed Probing rectangular bounds
957
+   * These can be further constrained in code for Delta and SCARA
958
+   */
959
+  #if ENABLED(DELTA)
960
+    // Probing points may be verified at compile time within the radius
961
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
962
+    // so that may be added to SanityCheck.h in the future.
963
+    #define _MIN_PROBE_X (X_CENTER - DELTA_PRINTABLE_RADIUS)
964
+    #define _MIN_PROBE_Y (Y_CENTER - DELTA_PRINTABLE_RADIUS)
965
+    #define _MAX_PROBE_X (X_CENTER + DELTA_PRINTABLE_RADIUS)
966
+    #define _MAX_PROBE_Y (Y_CENTER + DELTA_PRINTABLE_RADIUS)
967
+  #elif IS_SCARA
968
+    #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
969
+    #define _MIN_PROBE_X (X_CENTER - (SCARA_PRINTABLE_RADIUS))
970
+    #define _MIN_PROBE_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS))
971
+    #define _MAX_PROBE_X (X_CENTER +  SCARA_PRINTABLE_RADIUS)
972
+    #define _MAX_PROBE_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS)
973
+  #else
974
+    // Boundaries for Cartesian probing based on bed limits
975
+    #define _MIN_PROBE_X (max(X_MIN_BED, X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER))
976
+    #define _MIN_PROBE_Y (max(Y_MIN_BED, Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER))
977
+    #define _MAX_PROBE_X (min(X_MAX_BED, X_MAX_POS + X_PROBE_OFFSET_FROM_EXTRUDER))
978
+    #define _MAX_PROBE_Y (min(Y_MAX_BED, Y_MAX_POS + Y_PROBE_OFFSET_FROM_EXTRUDER))
979
+  #endif
980
+
981
+  // Allow configuration to override these for special purposes
982
+  #ifndef MIN_PROBE_X
983
+    #define MIN_PROBE_X _MIN_PROBE_X
984
+  #endif
985
+  #ifndef MIN_PROBE_Y
986
+    #define MIN_PROBE_Y _MIN_PROBE_Y
987
+  #endif
988
+  #ifndef MAX_PROBE_X
989
+    #define MAX_PROBE_X _MAX_PROBE_X
990
+  #endif
991
+  #ifndef MAX_PROBE_Y
992
+    #define MAX_PROBE_Y _MAX_PROBE_Y
993
+  #endif
994
+
995
+  /**
996
+   * Default mesh area is an area with an inset margin on the print area.
997
+   */
998
+  #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL)
999
+    #if IS_KINEMATIC
1000
+      // Probing points may be verified at compile time within the radius
1001
+      // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
1002
+      // so that may be added to SanityCheck.h in the future.
1003
+      #define _MESH_MIN_X (MIN_PROBE_X + MESH_INSET)
1004
+      #define _MESH_MIN_Y (MIN_PROBE_Y + MESH_INSET)
1005
+      #define _MESH_MAX_X (MAX_PROBE_X - (MESH_INSET))
1006
+      #define _MESH_MAX_Y (MAX_PROBE_Y - (MESH_INSET))
1007
+    #else
1008
+      // Boundaries for Cartesian probing based on set limits
1009
+      #define _MESH_MIN_X (max(X_MIN_BED + MESH_INSET, X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER))
1010
+      #define _MESH_MIN_Y (max(Y_MIN_BED + MESH_INSET, Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER))
1011
+      #define _MESH_MAX_X (min(X_MAX_BED - (MESH_INSET), X_MAX_POS + X_PROBE_OFFSET_FROM_EXTRUDER))
1012
+      #define _MESH_MAX_Y (min(Y_MAX_BED - (MESH_INSET), Y_MAX_POS + Y_PROBE_OFFSET_FROM_EXTRUDER))
1013
+    #endif
1014
+    /**
1015
+     * These may be overridden in Configuration if a smaller area is wanted
1016
+     */
1017
+    #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL)
1018
+      #ifndef MESH_MIN_X
1019
+        #define MESH_MIN_X _MESH_MIN_X
1020
+      #endif
1021
+      #ifndef MESH_MIN_Y
1022
+        #define MESH_MIN_Y _MESH_MIN_Y
1023
+      #endif
1024
+      #ifndef MESH_MAX_X
1025
+        #define MESH_MAX_X _MESH_MAX_X
1026
+      #endif
1027
+      #ifndef MESH_MAX_Y
1028
+        #define MESH_MAX_Y _MESH_MAX_Y
1029
+      #endif
1030
+    #endif
1031
+  #endif // MESH_BED_LEVELING || AUTO_BED_LEVELING_UBL
1032
+
795
   /**
1033
   /**
796
    * Buzzer/Speaker
1034
    * Buzzer/Speaker
797
    */
1035
    */
812
   #endif
1050
   #endif
813
 
1051
 
814
   /**
1052
   /**
1053
+   * VIKI2, miniVIKI, and AZSMZ_12864 require DOGLCD_SCK and DOGLCD_MOSI to be defined.
1054
+   */
1055
+  #if ENABLED(VIKI2) || ENABLED(miniVIKI) || ENABLED(AZSMZ_12864)
1056
+    #ifndef DOGLCD_SCK
1057
+      #define DOGLCD_SCK  SCK_PIN
1058
+    #endif
1059
+    #ifndef DOGLCD_MOSI
1060
+      #define DOGLCD_MOSI MOSI_PIN
1061
+    #endif
1062
+  #endif
1063
+
1064
+  /**
815
    * Z_HOMING_HEIGHT / Z_CLEARANCE_BETWEEN_PROBES
1065
    * Z_HOMING_HEIGHT / Z_CLEARANCE_BETWEEN_PROBES
816
    */
1066
    */
817
   #ifndef Z_HOMING_HEIGHT
1067
   #ifndef Z_HOMING_HEIGHT
830
     #define MANUAL_PROBE_HEIGHT Z_HOMING_HEIGHT
1080
     #define MANUAL_PROBE_HEIGHT Z_HOMING_HEIGHT
831
   #endif
1081
   #endif
832
 
1082
 
833
-  /**
834
-   * Bed Probing rectangular bounds
835
-   * These can be further constrained in code for Delta and SCARA
836
-   */
837
-  #if ENABLED(DELTA)
838
-    #ifndef DELTA_PROBEABLE_RADIUS
839
-      #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
840
-    #endif
841
-    // Probing points may be verified at compile time within the radius
842
-    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
843
-    // so that may be added to SanityCheck.h in the future.
844
-    #define MIN_PROBE_X (X_CENTER - (DELTA_PROBEABLE_RADIUS))
845
-    #define MIN_PROBE_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS))
846
-    #define MAX_PROBE_X (X_CENTER +  DELTA_PROBEABLE_RADIUS)
847
-    #define MAX_PROBE_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS)
848
-  #elif IS_SCARA
849
-    #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
850
-    #define MIN_PROBE_X (X_CENTER - (SCARA_PRINTABLE_RADIUS))
851
-    #define MIN_PROBE_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS))
852
-    #define MAX_PROBE_X (X_CENTER +  SCARA_PRINTABLE_RADIUS)
853
-    #define MAX_PROBE_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS)
854
-  #else
855
-    // Boundaries for Cartesian probing based on set limits
856
-    #if ENABLED(BED_CENTER_AT_0_0)
857
-      #define MIN_PROBE_X (max(X_PROBE_OFFSET_FROM_EXTRUDER, 0) - (X_BED_SIZE) / 2)
858
-      #define MIN_PROBE_Y (max(Y_PROBE_OFFSET_FROM_EXTRUDER, 0) - (Y_BED_SIZE) / 2)
859
-      #define MAX_PROBE_X (min(X_BED_SIZE + X_PROBE_OFFSET_FROM_EXTRUDER, X_BED_SIZE) - (X_BED_SIZE) / 2)
860
-      #define MAX_PROBE_Y (min(Y_BED_SIZE + Y_PROBE_OFFSET_FROM_EXTRUDER, Y_BED_SIZE) - (Y_BED_SIZE) / 2)
861
-    #else
862
-      #define MIN_PROBE_X (max(X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER, 0))
863
-      #define MIN_PROBE_Y (max(Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER, 0))
864
-      #define MAX_PROBE_X (min(X_MAX_POS + X_PROBE_OFFSET_FROM_EXTRUDER, X_BED_SIZE))
865
-      #define MAX_PROBE_Y (min(Y_MAX_POS + Y_PROBE_OFFSET_FROM_EXTRUDER, Y_BED_SIZE))
866
-    #endif
867
-  #endif
868
-
869
   // Stepper pulse duration, in cycles
1083
   // Stepper pulse duration, in cycles
870
   #define STEP_PULSE_CYCLES ((MINIMUM_STEPPER_PULSE) * CYCLES_PER_MICROSECOND)
1084
   #define STEP_PULSE_CYCLES ((MINIMUM_STEPPER_PULSE) * CYCLES_PER_MICROSECOND)
871
 
1085
 
876
   // Updated G92 behavior shifts the workspace
1090
   // Updated G92 behavior shifts the workspace
877
   #define HAS_POSITION_SHIFT DISABLED(NO_WORKSPACE_OFFSETS)
1091
   #define HAS_POSITION_SHIFT DISABLED(NO_WORKSPACE_OFFSETS)
878
   // The home offset also shifts the coordinate space
1092
   // The home offset also shifts the coordinate space
879
-  #define HAS_HOME_OFFSET (DISABLED(NO_WORKSPACE_OFFSETS) || ENABLED(DELTA))
1093
+  #define HAS_HOME_OFFSET (DISABLED(NO_WORKSPACE_OFFSETS) && DISABLED(DELTA))
880
   // Either offset yields extra calculations on all moves
1094
   // Either offset yields extra calculations on all moves
881
   #define HAS_WORKSPACE_OFFSET (HAS_POSITION_SHIFT || HAS_HOME_OFFSET)
1095
   #define HAS_WORKSPACE_OFFSET (HAS_POSITION_SHIFT || HAS_HOME_OFFSET)
882
   // M206 doesn't apply to DELTA
1096
   // M206 doesn't apply to DELTA
887
     #define LCD_TIMEOUT_TO_STATUS 15000
1101
     #define LCD_TIMEOUT_TO_STATUS 15000
888
   #endif
1102
   #endif
889
 
1103
 
890
-  /**
891
-   * DELTA_SEGMENT_MIN_LENGTH for UBL_DELTA
892
-   */
893
-  #if UBL_DELTA
894
-    #ifndef DELTA_SEGMENT_MIN_LENGTH
895
-      #if IS_SCARA
896
-        #define DELTA_SEGMENT_MIN_LENGTH 0.25 // SCARA minimum segment size is 0.25mm
897
-      #elif ENABLED(DELTA)
898
-        #define DELTA_SEGMENT_MIN_LENGTH 0.10 // mm (still subject to DELTA_SEGMENTS_PER_SECOND)
899
-      #else // CARTESIAN
900
-        #define DELTA_SEGMENT_MIN_LENGTH 1.00 // mm (similar to G2/G3 arc segmentation)
901
-      #endif
902
-    #endif
903
-  #endif
904
-
905
   // Shorthand
1104
   // Shorthand
906
   #define GRID_MAX_POINTS ((GRID_MAX_POINTS_X) * (GRID_MAX_POINTS_Y))
1105
   #define GRID_MAX_POINTS ((GRID_MAX_POINTS_X) * (GRID_MAX_POINTS_Y))
907
 
1106
 
908
   // Add commands that need sub-codes to this list
1107
   // Add commands that need sub-codes to this list
909
-  #define USE_GCODE_SUBCODES ENABLED(G38_PROBE_TARGET)
910
-
911
-  // MESH_BED_LEVELING overrides PROBE_MANUALLY
912
-  #if ENABLED(MESH_BED_LEVELING)
913
-    #undef PROBE_MANUALLY
914
-  #endif
1108
+  #define USE_GCODE_SUBCODES ENABLED(G38_PROBE_TARGET) || ENABLED(CNC_COORDINATE_SYSTEMS)
915
 
1109
 
916
   // Parking Extruder
1110
   // Parking Extruder
917
   #if ENABLED(PARKING_EXTRUDER)
1111
   #if ENABLED(PARKING_EXTRUDER)
923
     #endif
1117
     #endif
924
   #endif
1118
   #endif
925
 
1119
 
1120
+  // Number of VFAT entries used. Each entry has 13 UTF-16 characters
1121
+  #if ENABLED(SCROLL_LONG_FILENAMES)
1122
+    #define MAX_VFAT_ENTRIES (5)
1123
+  #else
1124
+    #define MAX_VFAT_ENTRIES (2)
1125
+  #endif
1126
+
1127
+  // Set defaults for unspecified LED user colors
1128
+  #if ENABLED(LED_CONTROL_MENU)
1129
+    #ifndef LED_USER_PRESET_RED
1130
+      #define LED_USER_PRESET_RED       255
1131
+    #endif
1132
+    #ifndef LED_USER_PRESET_GREEN
1133
+      #define LED_USER_PRESET_GREEN     255
1134
+    #endif
1135
+    #ifndef LED_USER_PRESET_BLUE
1136
+      #define LED_USER_PRESET_BLUE      255
1137
+    #endif
1138
+    #ifndef LED_USER_PRESET_WHITE
1139
+      #define LED_USER_PRESET_WHITE     0
1140
+    #endif
1141
+    #ifndef LED_USER_PRESET_BRIGHTNESS
1142
+      #ifdef NEOPIXEL_BRIGHTNESS
1143
+        #define LED_USER_PRESET_BRIGHTNESS NEOPIXEL_BRIGHTNESS
1144
+      #else
1145
+        #define LED_USER_PRESET_BRIGHTNESS 255
1146
+      #endif
1147
+    #endif
1148
+  #endif
1149
+
926
 #endif // CONDITIONALS_POST_H
1150
 #endif // CONDITIONALS_POST_H

+ 156
- 87
Marlin/Configuration.h Переглянути файл

37
  */
37
  */
38
 #ifndef CONFIGURATION_H
38
 #ifndef CONFIGURATION_H
39
 #define CONFIGURATION_H
39
 #define CONFIGURATION_H
40
-#define CONFIGURATION_H_VERSION 010100
40
+#define CONFIGURATION_H_VERSION 010107
41
 
41
 
42
 //===========================================================================
42
 //===========================================================================
43
 //============================= Getting Started =============================
43
 //============================= Getting Started =============================
136
 // :[1, 2, 3, 4, 5]
136
 // :[1, 2, 3, 4, 5]
137
 #define EXTRUDERS 1
137
 #define EXTRUDERS 1
138
 
138
 
139
+// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
140
+#define DEFAULT_NOMINAL_FILAMENT_DIA 3.0
141
+
139
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
142
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
140
 //#define SINGLENOZZLE
143
 //#define SINGLENOZZLE
141
 
144
 
336
 
339
 
337
 // Comment the following line to disable PID and enable bang-bang.
340
 // Comment the following line to disable PID and enable bang-bang.
338
 #define PIDTEMP
341
 #define PIDTEMP
339
-#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
340
-#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
342
+#define BANG_MAX 255     // Limits current to nozzle while in bang-bang mode; 255=full current
343
+#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
344
+#define PID_K1 0.95      // Smoothing factor within the PID
341
 #if ENABLED(PIDTEMP)
345
 #if ENABLED(PIDTEMP)
342
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
346
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
343
   //#define PID_DEBUG // Sends debug data to the serial port.
347
   //#define PID_DEBUG // Sends debug data to the serial port.
347
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
351
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
348
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
352
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
349
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
353
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
350
-  #define K1 0.95 //smoothing factor within the PID
351
 
354
 
352
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
355
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
353
 
356
 
428
 //===========================================================================
431
 //===========================================================================
429
 
432
 
430
 /**
433
 /**
431
- * Thermal Protection protects your printer from damage and fire if a
432
- * thermistor falls out or temperature sensors fail in any way.
434
+ * Thermal Protection provides additional protection to your printer from damage
435
+ * and fire. Marlin always includes safe min and max temperature ranges which
436
+ * protect against a broken or disconnected thermistor wire.
433
  *
437
  *
434
- * The issue: If a thermistor falls out or a temperature sensor fails,
435
- * Marlin can no longer sense the actual temperature. Since a disconnected
436
- * thermistor reads as a low temperature, the firmware will keep the heater on.
438
+ * The issue: If a thermistor falls out, it will report the much lower
439
+ * temperature of the air in the room, and the the firmware will keep
440
+ * the heater on.
437
  *
441
  *
438
  * If you get "Thermal Runaway" or "Heating failed" errors the
442
  * If you get "Thermal Runaway" or "Heating failed" errors the
439
  * details can be tuned in Configuration_adv.h
443
  * details can be tuned in Configuration_adv.h
573
 // @section probes
577
 // @section probes
574
 
578
 
575
 //
579
 //
576
-// See http://marlinfw.org/configuration/probes.html
580
+// See http://marlinfw.org/docs/configuration/probes.html
577
 //
581
 //
578
 
582
 
579
 /**
583
 /**
686
 // X and Y axis travel speed (mm/m) between probes
690
 // X and Y axis travel speed (mm/m) between probes
687
 #define XY_PROBE_SPEED 8000
691
 #define XY_PROBE_SPEED 8000
688
 
692
 
689
-// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH)
693
+// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
690
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
694
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
691
 
695
 
692
 // Speed for the "accurate" probe of each point
696
 // Speed for the "accurate" probe of each point
693
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
697
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
694
 
698
 
695
-// Use double touch for probing
696
-//#define PROBE_DOUBLE_TOUCH
699
+// The number of probes to perform at each point.
700
+//   Set to 2 for a fast/slow probe, using the second probe result.
701
+//   Set to 3 or more for slow probes, averaging the results.
702
+//#define MULTIPLE_PROBING 2
697
 
703
 
698
 /**
704
 /**
699
  * Z probes require clearance when deploying, stowing, and moving between
705
  * Z probes require clearance when deploying, stowing, and moving between
785
 #define Y_MAX_POS Y_BED_SIZE
791
 #define Y_MAX_POS Y_BED_SIZE
786
 #define Z_MAX_POS 200
792
 #define Z_MAX_POS 200
787
 
793
 
788
-// If enabled, axes won't move below MIN_POS in response to movement commands.
794
+/**
795
+ * Software Endstops
796
+ *
797
+ * - Prevent moves outside the set machine bounds.
798
+ * - Individual axes can be disabled, if desired.
799
+ * - X and Y only apply to Cartesian robots.
800
+ * - Use 'M211' to set software endstops on/off or report current state
801
+ */
802
+
803
+// Min software endstops curtail movement below minimum coordinate bounds
789
 #define MIN_SOFTWARE_ENDSTOPS
804
 #define MIN_SOFTWARE_ENDSTOPS
790
-// If enabled, axes won't move above MAX_POS in response to movement commands.
805
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
806
+  #define MIN_SOFTWARE_ENDSTOP_X
807
+  #define MIN_SOFTWARE_ENDSTOP_Y
808
+  #define MIN_SOFTWARE_ENDSTOP_Z
809
+#endif
810
+
811
+// Max software endstops curtail movement above maximum coordinate bounds
791
 #define MAX_SOFTWARE_ENDSTOPS
812
 #define MAX_SOFTWARE_ENDSTOPS
813
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
814
+  #define MAX_SOFTWARE_ENDSTOP_X
815
+  #define MAX_SOFTWARE_ENDSTOP_Y
816
+  #define MAX_SOFTWARE_ENDSTOP_Z
817
+#endif
792
 
818
 
793
 /**
819
 /**
794
  * Filament Runout Sensor
820
  * Filament Runout Sensor
808
 //===========================================================================
834
 //===========================================================================
809
 //=============================== Bed Leveling ==============================
835
 //=============================== Bed Leveling ==============================
810
 //===========================================================================
836
 //===========================================================================
811
-// @section bedlevel
837
+// @section calibrate
812
 
838
 
813
 /**
839
 /**
814
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
840
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
834
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
860
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
835
  *   A comprehensive bed leveling system combining the features and benefits
861
  *   A comprehensive bed leveling system combining the features and benefits
836
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
862
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
837
- *   Validation and Mesh Editing systems. Currently, UBL is only checked out
838
- *   for Cartesian Printers. That said, it was primarily designed to correct
839
- *   poor quality Delta Printers. If you feel adventurous and have a Delta,
840
- *   please post an issue if something doesn't work correctly. Initially,
841
- *   you will need to set a reduced bed size so you have a rectangular area
842
- *   to test on.
863
+ *   Validation and Mesh Editing systems.
843
  *
864
  *
844
  * - MESH_BED_LEVELING
865
  * - MESH_BED_LEVELING
845
  *   Probe a grid manually
866
  *   Probe a grid manually
866
   // at which point movement will be level to the machine's XY plane.
887
   // at which point movement will be level to the machine's XY plane.
867
   // The height can be set with M420 Z<height>
888
   // The height can be set with M420 Z<height>
868
   #define ENABLE_LEVELING_FADE_HEIGHT
889
   #define ENABLE_LEVELING_FADE_HEIGHT
890
+
891
+  // For Cartesian machines, instead of dividing moves on mesh boundaries,
892
+  // split up moves into short segments like a Delta. This follows the
893
+  // contours of the bed more closely than edge-to-edge straight moves.
894
+  #define SEGMENT_LEVELED_MOVES
895
+  #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)
896
+
897
+  /**
898
+   * Enable the G26 Mesh Validation Pattern tool.
899
+   */
900
+  #define G26_MESH_VALIDATION   // Enable G26 mesh validation
901
+  #if ENABLED(G26_MESH_VALIDATION)
902
+    #define MESH_TEST_NOZZLE_SIZE     0.4   // (mm) Diameter of primary nozzle.
903
+    #define MESH_TEST_LAYER_HEIGHT    0.2   // (mm) Default layer height for the G26 Mesh Validation Tool.
904
+    #define MESH_TEST_HOTEND_TEMP   205.0   // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
905
+    #define MESH_TEST_BED_TEMP       60.0   // (°C) Default bed temperature for the G26 Mesh Validation Tool.
906
+  #endif
907
+
869
 #endif
908
 #endif
870
 
909
 
871
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
910
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
921
   //========================= Unified Bed Leveling ============================
960
   //========================= Unified Bed Leveling ============================
922
   //===========================================================================
961
   //===========================================================================
923
 
962
 
924
-  #define UBL_MESH_INSET 1          // Mesh inset margin on print area
963
+  //#define MESH_EDIT_GFX_OVERLAY   // Display a graphics overlay while editing the mesh
964
+
965
+  #define MESH_INSET 1              // Mesh inset margin on print area
925
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
966
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
926
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
967
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
927
 
968
 
932
   #define UBL_PROBE_PT_3_X 180
973
   #define UBL_PROBE_PT_3_X 180
933
   #define UBL_PROBE_PT_3_Y 20
974
   #define UBL_PROBE_PT_3_Y 20
934
 
975
 
935
-  //#define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
936
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
976
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
977
+  #define UBL_SAVE_ACTIVE_ON_M500   // Save the currently active mesh in the current slot on M500
937
 
978
 
938
 #elif ENABLED(MESH_BED_LEVELING)
979
 #elif ENABLED(MESH_BED_LEVELING)
939
 
980
 
993
 //#define Z_SAFE_HOMING
1034
 //#define Z_SAFE_HOMING
994
 
1035
 
995
 #if ENABLED(Z_SAFE_HOMING)
1036
 #if ENABLED(Z_SAFE_HOMING)
996
-  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axis (G28).
997
-  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axis (G28).
1037
+  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axes (G28).
1038
+  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axes (G28).
998
 #endif
1039
 #endif
999
 
1040
 
1000
 // Homing speeds (mm/m)
1041
 // Homing speeds (mm/m)
1001
 #define HOMING_FEEDRATE_XY (50*60)
1042
 #define HOMING_FEEDRATE_XY (50*60)
1002
 #define HOMING_FEEDRATE_Z  (4*60)
1043
 #define HOMING_FEEDRATE_Z  (4*60)
1003
 
1044
 
1045
+// @section calibrate
1046
+
1047
+/**
1048
+ * Bed Skew Compensation
1049
+ *
1050
+ * This feature corrects for misalignment in the XYZ axes.
1051
+ *
1052
+ * Take the following steps to get the bed skew in the XY plane:
1053
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1054
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1055
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1056
+ *  4. For XY_SIDE_AD measure the edge A to D
1057
+ *
1058
+ * Marlin automatically computes skew factors from these measurements.
1059
+ * Skew factors may also be computed and set manually:
1060
+ *
1061
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1062
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1063
+ *
1064
+ * If desired, follow the same procedure for XZ and YZ.
1065
+ * Use these diagrams for reference:
1066
+ *
1067
+ *    Y                     Z                     Z
1068
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1069
+ *    |    /       /        |    /       /        |    /       /
1070
+ *    |   /       /         |   /       /         |   /       /
1071
+ *    |  A-------D          |  A-------D          |  A-------D
1072
+ *    +-------------->X     +-------------->X     +-------------->Y
1073
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1074
+ */
1075
+//#define SKEW_CORRECTION
1076
+
1077
+#if ENABLED(SKEW_CORRECTION)
1078
+  // Input all length measurements here:
1079
+  #define XY_DIAG_AC 282.8427124746
1080
+  #define XY_DIAG_BD 282.8427124746
1081
+  #define XY_SIDE_AD 200
1082
+
1083
+  // Or, set the default skew factors directly here
1084
+  // to override the above measurements:
1085
+  #define XY_SKEW_FACTOR 0.0
1086
+
1087
+  //#define SKEW_CORRECTION_FOR_Z
1088
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1089
+    #define XZ_DIAG_AC 282.8427124746
1090
+    #define XZ_DIAG_BD 282.8427124746
1091
+    #define YZ_DIAG_AC 282.8427124746
1092
+    #define YZ_DIAG_BD 282.8427124746
1093
+    #define YZ_SIDE_AD 200
1094
+    #define XZ_SKEW_FACTOR 0.0
1095
+    #define YZ_SKEW_FACTOR 0.0
1096
+  #endif
1097
+
1098
+  // Enable this option for M852 to set skew at runtime
1099
+  //#define SKEW_CORRECTION_GCODE
1100
+#endif
1101
+
1004
 //=============================================================================
1102
 //=============================================================================
1005
 //============================= Additional Features ===========================
1103
 //============================= Additional Features ===========================
1006
 //=============================================================================
1104
 //=============================================================================
1032
 //
1130
 //
1033
 // M100 Free Memory Watcher
1131
 // M100 Free Memory Watcher
1034
 //
1132
 //
1035
-//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
1133
+//#define M100_FREE_MEMORY_WATCHER    // Add M100 (Free Memory Watcher) to debug memory usage
1036
 
1134
 
1037
 //
1135
 //
1038
 // G20/G21 Inch mode support
1136
 // G20/G21 Inch mode support
1177
  *
1275
  *
1178
  * Select the language to display on the LCD. These languages are available:
1276
  * Select the language to display on the LCD. These languages are available:
1179
  *
1277
  *
1180
- *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, gl, hr,
1181
- *    it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1278
+ *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, fr_utf8, gl,
1279
+ *    hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1182
  *    tr, uk, zh_CN, zh_TW, test
1280
  *    tr, uk, zh_CN, zh_TW, test
1183
  *
1281
  *
1184
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1282
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1185
  */
1283
  */
1186
 #define LCD_LANGUAGE en
1284
 #define LCD_LANGUAGE en
1187
 
1285
 
1418
 //#define CARTESIO_UI
1516
 //#define CARTESIO_UI
1419
 
1517
 
1420
 //
1518
 //
1421
-// ANET_10 Controller supported displays.
1519
+// ANET and Tronxy Controller supported displays.
1422
 //
1520
 //
1423
-//#define ANET_KEYPAD_LCD         // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1521
+//#define ZONESTAR_LCD            // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1424
                                   // This LCD is known to be susceptible to electrical interference
1522
                                   // This LCD is known to be susceptible to electrical interference
1425
                                   // which scrambles the display.  Pressing any button clears it up.
1523
                                   // which scrambles the display.  Pressing any button clears it up.
1524
+                                  // This is a LCD2004 display with 5 analog buttons.
1525
+
1426
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1526
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1427
                                   // A clone of the RepRapDiscount full graphics display but with
1527
                                   // A clone of the RepRapDiscount full graphics display but with
1428
                                   // different pins/wiring (see pins_ANET_10.h).
1528
                                   // different pins/wiring (see pins_ANET_10.h).
1532
 //
1632
 //
1533
 //#define MKS_12864OLED
1633
 //#define MKS_12864OLED
1534
 
1634
 
1635
+// Silvergate GLCD controller
1636
+// http://github.com/android444/Silvergate
1637
+//
1638
+//#define SILVER_GATE_GLCD_CONTROLLER
1639
+
1535
 //=============================================================================
1640
 //=============================================================================
1536
 //=============================== Extra Features ==============================
1641
 //=============================== Extra Features ==============================
1537
 //=============================================================================
1642
 //=============================================================================
1588
  * Adds the M150 command to set the LED (or LED strip) color.
1693
  * Adds the M150 command to set the LED (or LED strip) color.
1589
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1694
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1590
  * luminance values can be set from 0 to 255.
1695
  * luminance values can be set from 0 to 255.
1591
- * For Neopixel LED overall brightness parameters is also available 
1696
+ * For Neopixel LED an overall brightness parameter is also available.
1592
  *
1697
  *
1593
  * *** CAUTION ***
1698
  * *** CAUTION ***
1594
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1699
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1595
  *  as the Arduino cannot handle the current the LEDs will require.
1700
  *  as the Arduino cannot handle the current the LEDs will require.
1596
  *  Failure to follow this precaution can destroy your Arduino!
1701
  *  Failure to follow this precaution can destroy your Arduino!
1597
- *  The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
1598
- *  cannot handle such current, separate 5V power supply must be used
1702
+ *  NOTE: A separate 5V power supply is required! The Neopixel LED needs
1703
+ *  more current than the Arduino 5V linear regulator can produce.
1599
  * *** CAUTION ***
1704
  * *** CAUTION ***
1600
  *
1705
  *
1601
- * LED type. This options are mutualy exclusive. Uncomment only one.
1706
+ * LED Type. Enable only one of the following two options.
1602
  *
1707
  *
1603
  */
1708
  */
1604
 //#define RGB_LED
1709
 //#define RGB_LED
1614
 // Support for Adafruit Neopixel LED driver
1719
 // Support for Adafruit Neopixel LED driver
1615
 //#define NEOPIXEL_LED
1720
 //#define NEOPIXEL_LED
1616
 #if ENABLED(NEOPIXEL_LED)
1721
 #if ENABLED(NEOPIXEL_LED)
1617
-  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
1722
+  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
1618
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1723
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1619
-  #define NEOPIXEL_PIXELS 30       // Number of LEDs on strip
1620
-  #define NEOPIXEL_IS_SEQUENTIAL   // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
1621
-  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness 0-255
1724
+  #define NEOPIXEL_PIXELS 30       // Number of LEDs in the strip
1725
+  #define NEOPIXEL_IS_SEQUENTIAL   // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
1726
+  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness (0-255)
1622
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1727
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1623
 #endif
1728
 #endif
1624
 
1729
 
1637
   #define PRINTER_EVENT_LEDS
1742
   #define PRINTER_EVENT_LEDS
1638
 #endif
1743
 #endif
1639
 
1744
 
1640
-/*********************************************************************\
1641
-* R/C SERVO support
1642
-* Sponsored by TrinityLabs, Reworked by codexmas
1643
-**********************************************************************/
1745
+/**
1746
+ * R/C SERVO support
1747
+ * Sponsored by TrinityLabs, Reworked by codexmas
1748
+ */
1644
 
1749
 
1645
-// Number of servos
1646
-//
1647
-// If you select a configuration below, this will receive a default value and does not need to be set manually
1648
-// set it manually if you have more servos than extruders and wish to manually control some
1649
-// leaving it undefined or defining as 0 will disable the servo subsystem
1650
-// If unsure, leave commented / disabled
1651
-//
1750
+/**
1751
+ * Number of servos
1752
+ *
1753
+ * For some servo-related options NUM_SERVOS will be set automatically.
1754
+ * Set this manually if there are extra servos needing manual control.
1755
+ * Leave undefined or set to 0 to entirely disable the servo subsystem.
1756
+ */
1652
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1757
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1653
 
1758
 
1654
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1759
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1661
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1766
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1662
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1767
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1663
 
1768
 
1664
-/**
1665
- * Filament Width Sensor
1666
- *
1667
- * Measures the filament width in real-time and adjusts
1668
- * flow rate to compensate for any irregularities.
1669
- *
1670
- * Also allows the measured filament diameter to set the
1671
- * extrusion rate, so the slicer only has to specify the
1672
- * volume.
1673
- *
1674
- * Only a single extruder is supported at this time.
1675
- *
1676
- *  34 RAMPS_14    : Analog input 5 on the AUX2 connector
1677
- *  81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
1678
- * 301 RAMBO       : Analog input 3
1679
- *
1680
- * Note: May require analog pins to be defined for other boards.
1681
- */
1682
-//#define FILAMENT_WIDTH_SENSOR
1683
-
1684
-#define DEFAULT_NOMINAL_FILAMENT_DIA 3.00   // (mm) Diameter of the filament generally used (3.0 or 1.75mm), also used in the slicer. Used to validate sensor reading.
1685
-
1686
-#if ENABLED(FILAMENT_WIDTH_SENSOR)
1687
-  #define FILAMENT_SENSOR_EXTRUDER_NUM 0    // Index of the extruder that has the filament sensor (0,1,2,3)
1688
-  #define MEASUREMENT_DELAY_CM        14    // (cm) The distance from the filament sensor to the melting chamber
1689
-
1690
-  #define MEASURED_UPPER_LIMIT         3.30 // (mm) Upper limit used to validate sensor reading
1691
-  #define MEASURED_LOWER_LIMIT         1.90 // (mm) Lower limit used to validate sensor reading
1692
-  #define MAX_MEASUREMENT_DELAY       20    // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
1693
-
1694
-  #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
1695
-
1696
-  // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
1697
-  //#define FILAMENT_LCD_DISPLAY
1698
-#endif
1699
-
1700
 #endif // CONFIGURATION_H
1769
 #endif // CONFIGURATION_H

+ 268
- 125
Marlin/Configuration_adv.h Переглянути файл

32
  */
32
  */
33
 #ifndef CONFIGURATION_ADV_H
33
 #ifndef CONFIGURATION_ADV_H
34
 #define CONFIGURATION_ADV_H
34
 #define CONFIGURATION_ADV_H
35
-#define CONFIGURATION_ADV_H_VERSION 010100
35
+#define CONFIGURATION_ADV_H_VERSION 010107
36
 
36
 
37
 // @section temperature
37
 // @section temperature
38
 
38
 
48
 #endif
48
 #endif
49
 
49
 
50
 /**
50
 /**
51
- * Thermal Protection protects your printer from damage and fire if a
52
- * thermistor falls out or temperature sensors fail in any way.
51
+ * Thermal Protection provides additional protection to your printer from damage
52
+ * and fire. Marlin always includes safe min and max temperature ranges which
53
+ * protect against a broken or disconnected thermistor wire.
53
  *
54
  *
54
- * The issue: If a thermistor falls out or a temperature sensor fails,
55
- * Marlin can no longer sense the actual temperature. Since a disconnected
56
- * thermistor reads as a low temperature, the firmware will keep the heater on.
55
+ * The issue: If a thermistor falls out, it will report the much lower
56
+ * temperature of the air in the room, and the the firmware will keep
57
+ * the heater on.
57
  *
58
  *
58
  * The solution: Once the temperature reaches the target, start observing.
59
  * The solution: Once the temperature reaches the target, start observing.
59
- * If the temperature stays too far below the target (hysteresis) for too long (period),
60
- * the firmware will halt the machine as a safety precaution.
60
+ * If the temperature stays too far below the target (hysteresis) for too
61
+ * long (period), the firmware will halt the machine as a safety precaution.
61
  *
62
  *
62
- * If you get false positives for "Thermal Runaway" increase THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
63
+ * If you get false positives for "Thermal Runaway", increase
64
+ * THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
63
  */
65
  */
64
 #if ENABLED(THERMAL_PROTECTION_HOTENDS)
66
 #if ENABLED(THERMAL_PROTECTION_HOTENDS)
65
   #define THERMAL_PROTECTION_PERIOD 40        // Seconds
67
   #define THERMAL_PROTECTION_PERIOD 40        // Seconds
66
   #define THERMAL_PROTECTION_HYSTERESIS 4     // Degrees Celsius
68
   #define THERMAL_PROTECTION_HYSTERESIS 4     // Degrees Celsius
67
 
69
 
68
   /**
70
   /**
69
-   * Whenever an M104 or M109 increases the target temperature the firmware will wait for the
70
-   * WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
71
-   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
72
-   * but only if the current temperature is far enough below the target for a reliable test.
71
+   * Whenever an M104, M109, or M303 increases the target temperature, the
72
+   * firmware will wait for the WATCH_TEMP_PERIOD to expire. If the temperature
73
+   * hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted and
74
+   * requires a hard reset. This test restarts with any M104/M109/M303, but only
75
+   * if the current temperature is far enough below the target for a reliable
76
+   * test.
73
    *
77
    *
74
-   * If you get false positives for "Heating failed" increase WATCH_TEMP_PERIOD and/or decrease WATCH_TEMP_INCREASE
75
-   * WATCH_TEMP_INCREASE should not be below 2.
78
+   * If you get false positives for "Heating failed", increase WATCH_TEMP_PERIOD
79
+   * and/or decrease WATCH_TEMP_INCREASE. WATCH_TEMP_INCREASE should not be set
80
+   * below 2.
76
    */
81
    */
77
   #define WATCH_TEMP_PERIOD 20                // Seconds
82
   #define WATCH_TEMP_PERIOD 20                // Seconds
78
   #define WATCH_TEMP_INCREASE 2               // Degrees Celsius
83
   #define WATCH_TEMP_INCREASE 2               // Degrees Celsius
86
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
91
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
87
 
92
 
88
   /**
93
   /**
89
-   * Whenever an M140 or M190 increases the target temperature the firmware will wait for the
90
-   * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE
91
-   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190,
92
-   * but only if the current temperature is far enough below the target for a reliable test.
93
-   *
94
-   * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease
95
-   * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.)
94
+   * As described above, except for the bed (M140/M190/M303).
96
    */
95
    */
97
   #define WATCH_BED_TEMP_PERIOD 60                // Seconds
96
   #define WATCH_BED_TEMP_PERIOD 60                // Seconds
98
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
97
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
123
   #define AUTOTEMP_OLDWEIGHT 0.98
122
   #define AUTOTEMP_OLDWEIGHT 0.98
124
 #endif
123
 #endif
125
 
124
 
125
+// Show extra position information in M114
126
+//#define M114_DETAIL
127
+
126
 // Show Temperature ADC value
128
 // Show Temperature ADC value
127
 // Enable for M105 to include ADC values read from temperature sensors.
129
 // Enable for M105 to include ADC values read from temperature sensors.
128
 //#define SHOW_TEMP_ADC_VALUES
130
 //#define SHOW_TEMP_ADC_VALUES
257
 
259
 
258
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
260
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
259
 
261
 
260
-// Dual X Steppers
261
-// Uncomment this option to drive two X axis motors.
262
-// The next unused E driver will be assigned to the second X stepper.
262
+/**
263
+ * Dual Steppers / Dual Endstops
264
+ *
265
+ * This section will allow you to use extra E drivers to drive a second motor for X, Y, or Z axes.
266
+ *
267
+ * For example, set X_DUAL_STEPPER_DRIVERS setting to use a second motor. If the motors need to
268
+ * spin in opposite directions set INVERT_X2_VS_X_DIR. If the second motor needs its own endstop
269
+ * set X_DUAL_ENDSTOPS. This can adjust for "racking." Use X2_USE_ENDSTOP to set the endstop plug
270
+ * that should be used for the second endstop. Extra endstops will appear in the output of 'M119'.
271
+ *
272
+ * Use X_DUAL_ENDSTOP_ADJUSTMENT to adjust for mechanical imperfection. After homing both motors
273
+ * this offset is applied to the X2 motor. To find the offset home the X axis, and measure the error
274
+ * in X2. Dual endstop offsets can be set at runtime with 'M666 X<offset> Y<offset> Z<offset>'.
275
+ */
276
+
263
 //#define X_DUAL_STEPPER_DRIVERS
277
 //#define X_DUAL_STEPPER_DRIVERS
264
 #if ENABLED(X_DUAL_STEPPER_DRIVERS)
278
 #if ENABLED(X_DUAL_STEPPER_DRIVERS)
265
-  // Set true if the two X motors need to rotate in opposite directions
266
-  #define INVERT_X2_VS_X_DIR true
279
+  #define INVERT_X2_VS_X_DIR true   // Set 'true' if X motors should rotate in opposite directions
280
+  //#define X_DUAL_ENDSTOPS
281
+  #if ENABLED(X_DUAL_ENDSTOPS)
282
+    #define X2_USE_ENDSTOP _XMAX_
283
+    #define X_DUAL_ENDSTOPS_ADJUSTMENT  0
284
+  #endif
267
 #endif
285
 #endif
268
 
286
 
269
-// Dual Y Steppers
270
-// Uncomment this option to drive two Y axis motors.
271
-// The next unused E driver will be assigned to the second Y stepper.
272
 //#define Y_DUAL_STEPPER_DRIVERS
287
 //#define Y_DUAL_STEPPER_DRIVERS
273
 #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
288
 #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
274
-  // Set true if the two Y motors need to rotate in opposite directions
275
-  #define INVERT_Y2_VS_Y_DIR true
289
+  #define INVERT_Y2_VS_Y_DIR true   // Set 'true' if Y motors should rotate in opposite directions
290
+  //#define Y_DUAL_ENDSTOPS
291
+  #if ENABLED(Y_DUAL_ENDSTOPS)
292
+    #define Y2_USE_ENDSTOP _YMAX_
293
+    #define Y_DUAL_ENDSTOPS_ADJUSTMENT  0
294
+  #endif
276
 #endif
295
 #endif
277
 
296
 
278
-// A single Z stepper driver is usually used to drive 2 stepper motors.
279
-// Uncomment this option to use a separate stepper driver for each Z axis motor.
280
-// The next unused E driver will be assigned to the second Z stepper.
281
 //#define Z_DUAL_STEPPER_DRIVERS
297
 //#define Z_DUAL_STEPPER_DRIVERS
282
-
283
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
298
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
284
-
285
-  // Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper.
286
-  // That way the machine is capable to align the bed during home, since both Z steppers are homed.
287
-  // There is also an implementation of M666 (software endstops adjustment) to this feature.
288
-  // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed.
289
-  // One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2.
290
-  // If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive.
291
-  // Play a little bit with small adjustments (0.5mm) and check the behaviour.
292
-  // The M119 (endstops report) will start reporting the Z2 Endstop as well.
293
-
294
   //#define Z_DUAL_ENDSTOPS
299
   //#define Z_DUAL_ENDSTOPS
295
-
296
   #if ENABLED(Z_DUAL_ENDSTOPS)
300
   #if ENABLED(Z_DUAL_ENDSTOPS)
297
     #define Z2_USE_ENDSTOP _XMAX_
301
     #define Z2_USE_ENDSTOP _XMAX_
298
-    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0  // Use M666 to determine/test this value
302
+    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0
299
   #endif
303
   #endif
300
-
301
-#endif // Z_DUAL_STEPPER_DRIVERS
304
+#endif
302
 
305
 
303
 // Enable this for dual x-carriage printers.
306
 // Enable this for dual x-carriage printers.
304
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
307
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
345
 
348
 
346
 // @section homing
349
 // @section homing
347
 
350
 
348
-//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
351
+// Homing hits each endstop, retracts by these distances, then does a slower bump.
349
 #define X_HOME_BUMP_MM 5
352
 #define X_HOME_BUMP_MM 5
350
 #define Y_HOME_BUMP_MM 5
353
 #define Y_HOME_BUMP_MM 5
351
 #define Z_HOME_BUMP_MM 2
354
 #define Z_HOME_BUMP_MM 2
352
-#define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
353
-//#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
355
+#define HOMING_BUMP_DIVISOR { 2, 2, 4 }  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
356
+//#define QUICK_HOME                     // If homing includes X and Y, do a diagonal move initially
354
 
357
 
355
 // When G28 is called, this option will make Y home before X
358
 // When G28 is called, this option will make Y home before X
356
 //#define HOME_Y_BEFORE_X
359
 //#define HOME_Y_BEFORE_X
434
 //#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 }   // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
437
 //#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 }   // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
435
 //#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 }    // Default drive percent - X, Y, Z, E axis
438
 //#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 }    // Default drive percent - X, Y, Z, E axis
436
 
439
 
437
-// Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
440
+// Use an I2C based DIGIPOT (e.g., Azteeg X3 Pro)
438
 //#define DIGIPOT_I2C
441
 //#define DIGIPOT_I2C
442
+#if ENABLED(DIGIPOT_I2C) && !defined(DIGIPOT_I2C_ADDRESS_A)
443
+  /**
444
+   * Common slave addresses:
445
+   *
446
+   *                    A   (A shifted)   B   (B shifted)  IC
447
+   * Smoothie          0x2C (0x58)       0x2D (0x5A)       MCP4451
448
+   * AZTEEG_X3_PRO     0x2C (0x58)       0x2E (0x5C)       MCP4451
449
+   * MIGHTYBOARD_REVE  0x2F (0x5E)                         MCP4018
450
+   */
451
+  #define DIGIPOT_I2C_ADDRESS_A 0x2C  // unshifted slave address for first DIGIPOT
452
+  #define DIGIPOT_I2C_ADDRESS_B 0x2D  // unshifted slave address for second DIGIPOT
453
+#endif
454
+
439
 //#define DIGIPOT_MCP4018          // Requires library from https://github.com/stawel/SlowSoftI2CMaster
455
 //#define DIGIPOT_MCP4018          // Requires library from https://github.com/stawel/SlowSoftI2CMaster
440
 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4     AZTEEG_X3_PRO: 8
456
 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4     AZTEEG_X3_PRO: 8
441
 // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
457
 // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
466
 // The timeout (in ms) to return to the status screen from sub-menus
482
 // The timeout (in ms) to return to the status screen from sub-menus
467
 //#define LCD_TIMEOUT_TO_STATUS 15000
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
468
 
484
 
485
+/**
486
+ * LED Control Menu
487
+ * Enable this feature to add LED Control to the LCD menu
488
+ */
489
+//#define LED_CONTROL_MENU
490
+#if ENABLED(LED_CONTROL_MENU)
491
+  #define LED_COLOR_PRESETS                 // Enable the Preset Color menu option
492
+  #if ENABLED(LED_COLOR_PRESETS)
493
+    #define LED_USER_PRESET_RED        255  // User defined RED value
494
+    #define LED_USER_PRESET_GREEN      128  // User defined GREEN value
495
+    #define LED_USER_PRESET_BLUE         0  // User defined BLUE value
496
+    #define LED_USER_PRESET_WHITE      255  // User defined WHITE value
497
+    #define LED_USER_PRESET_BRIGHTNESS 255  // User defined intensity
498
+    //#define LED_USER_PRESET_STARTUP       // Have the printer display the user preset color on startup
499
+  #endif
500
+#endif // LED_CONTROL_MENU
501
+
469
 #if ENABLED(SDSUPPORT)
502
 #if ENABLED(SDSUPPORT)
470
 
503
 
471
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
504
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
475
   // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
508
   // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
476
   #define SD_DETECT_INVERTED
509
   #define SD_DETECT_INVERTED
477
 
510
 
478
-  #define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
511
+  #define SD_FINISHED_STEPPERRELEASE true          // Disable steppers when SD Print is finished
479
   #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
512
   #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
480
 
513
 
481
-  #define SDCARD_RATHERRECENTFIRST  //reverse file order of sd card menu display. Its sorted practically after the file system block order.
482
-  // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that.
483
-  // using:
514
+  // Reverse SD sort to show "more recent" files first, according to the card's FAT.
515
+  // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended.
516
+  #define SDCARD_RATHERRECENTFIRST
517
+
518
+  // Add an option in the menu to run all auto#.g files
484
   //#define MENU_ADDAUTOSTART
519
   //#define MENU_ADDAUTOSTART
485
 
520
 
486
   /**
521
   /**
517
     #define SDSORT_USES_STACK  false  // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
552
     #define SDSORT_USES_STACK  false  // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
518
     #define SDSORT_CACHE_NAMES false  // Keep sorted items in RAM longer for speedy performance. Most expensive option.
553
     #define SDSORT_CACHE_NAMES false  // Keep sorted items in RAM longer for speedy performance. Most expensive option.
519
     #define SDSORT_DYNAMIC_RAM false  // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
554
     #define SDSORT_DYNAMIC_RAM false  // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
555
+    #define SDSORT_CACHE_VFATS 2      // Maximum number of 13-byte VFAT entries to use for sorting.
556
+                                      // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM.
520
   #endif
557
   #endif
521
 
558
 
522
   // Show a progress bar on HD44780 LCDs for SD printing
559
   // Show a progress bar on HD44780 LCDs for SD printing
535
     //#define LCD_PROGRESS_BAR_TEST
572
     //#define LCD_PROGRESS_BAR_TEST
536
   #endif
573
   #endif
537
 
574
 
575
+  // Add an 'M73' G-code to set the current percentage
576
+  //#define LCD_SET_PROGRESS_MANUALLY
577
+
538
   // This allows hosts to request long names for files and folders with M33
578
   // This allows hosts to request long names for files and folders with M33
539
   //#define LONG_FILENAME_HOST_SUPPORT
579
   //#define LONG_FILENAME_HOST_SUPPORT
540
 
580
 
541
-  // This option allows you to abort SD printing when any endstop is triggered.
542
-  // This feature must be enabled with "M540 S1" or from the LCD menu.
543
-  // To have any effect, endstops must be enabled during SD printing.
581
+  // Enable this option to scroll long filenames in the SD card menu
582
+  //#define SCROLL_LONG_FILENAMES
583
+
584
+  /**
585
+   * This option allows you to abort SD printing when any endstop is triggered.
586
+   * This feature must be enabled with "M540 S1" or from the LCD menu.
587
+   * To have any effect, endstops must be enabled during SD printing.
588
+   */
544
   //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
589
   //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
545
 
590
 
591
+  /**
592
+   * This option makes it easier to print the same SD Card file again.
593
+   * On print completion the LCD Menu will open with the file selected.
594
+   * You can just click to start the print, or navigate elsewhere.
595
+   */
596
+  //#define SD_REPRINT_LAST_SELECTED_FILE
597
+
546
 #endif // SDSUPPORT
598
 #endif // SDSUPPORT
547
 
599
 
548
 /**
600
 /**
575
   // Enable this option and reduce the value to optimize screen updates.
627
   // Enable this option and reduce the value to optimize screen updates.
576
   // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
628
   // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
577
   //#define DOGM_SPI_DELAY_US 5
629
   //#define DOGM_SPI_DELAY_US 5
630
+
631
+  // Swap the CW/CCW indicators in the graphics overlay
632
+  //#define OVERLAY_GFX_REVERSE
633
+
578
 #endif // DOGLCD
634
 #endif // DOGLCD
579
 
635
 
580
 // @section safety
636
 // @section safety
603
 #if ENABLED(BABYSTEPPING)
659
 #if ENABLED(BABYSTEPPING)
604
   //#define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
660
   //#define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
605
   #define BABYSTEP_INVERT_Z false    // Change if Z babysteps should go the other way
661
   #define BABYSTEP_INVERT_Z false    // Change if Z babysteps should go the other way
606
-  #define BABYSTEP_MULTIPLICATOR 100 // Babysteps are very small. Increase for faster motion.
662
+  #define BABYSTEP_MULTIPLICATOR 1   // Babysteps are very small. Increase for faster motion.
607
   //#define BABYSTEP_ZPROBE_OFFSET   // Enable to combine M851 and Babystepping
663
   //#define BABYSTEP_ZPROBE_OFFSET   // Enable to combine M851 and Babystepping
608
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
664
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
609
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
665
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
610
                                         // Note: Extra time may be added to mitigate controller latency.
666
                                         // Note: Extra time may be added to mitigate controller latency.
611
   //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
667
   //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
612
-  //#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators
613
 #endif
668
 #endif
614
 
669
 
615
 // @section extruder
670
 // @section extruder
656
 
711
 
657
 // @section leveling
712
 // @section leveling
658
 
713
 
659
-// Default mesh area is an area with an inset margin on the print area.
660
-// Below are the macros that are used to define the borders for the mesh area,
661
-// made available here for specialized needs, ie dual extruder setup.
662
-#if ENABLED(MESH_BED_LEVELING)
663
-  #define MESH_MIN_X MESH_INSET
664
-  #define MESH_MAX_X (X_BED_SIZE - (MESH_INSET))
665
-  #define MESH_MIN_Y MESH_INSET
666
-  #define MESH_MAX_Y (Y_BED_SIZE - (MESH_INSET))
667
-#elif ENABLED(AUTO_BED_LEVELING_UBL)
668
-  #define UBL_MESH_MIN_X UBL_MESH_INSET
669
-  #define UBL_MESH_MAX_X (X_BED_SIZE - (UBL_MESH_INSET))
670
-  #define UBL_MESH_MIN_Y UBL_MESH_INSET
671
-  #define UBL_MESH_MAX_Y (Y_BED_SIZE - (UBL_MESH_INSET))
672
-
673
-  // If this is defined, the currently active mesh will be saved in the
674
-  // current slot on M500.
675
-  #define UBL_SAVE_ACTIVE_ON_M500
714
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
715
+  #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
716
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
717
+  #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
718
+#endif
719
+
720
+#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL)
721
+  // Override the mesh area if the automatic (max) area is too large
722
+  //#define MESH_MIN_X MESH_INSET
723
+  //#define MESH_MIN_Y MESH_INSET
724
+  //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET)
725
+  //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
676
 #endif
726
 #endif
677
 
727
 
678
 // @section extras
728
 // @section extras
692
 //#define BEZIER_CURVE_SUPPORT
742
 //#define BEZIER_CURVE_SUPPORT
693
 
743
 
694
 // G38.2 and G38.3 Probe Target
744
 // G38.2 and G38.3 Probe Target
695
-// Enable PROBE_DOUBLE_TOUCH if you want G38 to double touch
745
+// Set MULTIPLE_PROBING if you want G38 to double touch
696
 //#define G38_PROBE_TARGET
746
 //#define G38_PROBE_TARGET
697
 #if ENABLED(G38_PROBE_TARGET)
747
 #if ENABLED(G38_PROBE_TARGET)
698
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
748
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
717
 // @section hidden
767
 // @section hidden
718
 
768
 
719
 // The number of linear motions that can be in the plan at any give time.
769
 // The number of linear motions that can be in the plan at any give time.
720
-// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2, i.g. 8,16,32 because shifts and ors are used to do the ring-buffering.
770
+// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2 (e.g. 8, 16, 32) because shifts and ors are used to do the ring-buffering.
721
 #if ENABLED(SDSUPPORT)
771
 #if ENABLED(SDSUPPORT)
722
   #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
772
   #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
723
 #else
773
 #else
808
 #endif
858
 #endif
809
 
859
 
810
 /**
860
 /**
861
+ * Extra Fan Speed
862
+ * Adds a secondary fan speed for each print-cooling fan.
863
+ *   'M106 P<fan> T3-255' : Set a secondary speed for <fan>
864
+ *   'M106 P<fan> T2'     : Use the set secondary speed
865
+ *   'M106 P<fan> T1'     : Restore the previous fan speed
866
+ */
867
+//#define EXTRA_FAN_SPEED
868
+
869
+/**
811
  * Advanced Pause
870
  * Advanced Pause
812
  * Experimental feature for filament change support and for parking the nozzle when paused.
871
  * Experimental feature for filament change support and for parking the nozzle when paused.
813
  * Adds the GCode M600 for initiating filament change.
872
  * Adds the GCode M600 for initiating filament change.
917
 
976
 
918
 #endif
977
 #endif
919
 
978
 
920
-// @section TMC2130
979
+// @section TMC2130, TMC2208
921
 
980
 
922
 /**
981
 /**
923
  * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
982
  * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
931
  */
990
  */
932
 //#define HAVE_TMC2130
991
 //#define HAVE_TMC2130
933
 
992
 
934
-#if ENABLED(HAVE_TMC2130)
993
+/**
994
+ * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
995
+ * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin.
996
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN
997
+ * to #_SERIAL_TX_PIN with a 1K resistor.
998
+ * The drivers can also be used with hardware serial.
999
+ *
1000
+ * You'll also need the TMC2208Stepper Arduino library
1001
+ * (https://github.com/teemuatlut/TMC2208Stepper).
1002
+ */
1003
+//#define HAVE_TMC2208
1004
+
1005
+#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
935
 
1006
 
936
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
1007
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
937
   //#define X_IS_TMC2130
1008
   //#define X_IS_TMC2130
946
   //#define E3_IS_TMC2130
1017
   //#define E3_IS_TMC2130
947
   //#define E4_IS_TMC2130
1018
   //#define E4_IS_TMC2130
948
 
1019
 
1020
+  //#define X_IS_TMC2208
1021
+  //#define X2_IS_TMC2208
1022
+  //#define Y_IS_TMC2208
1023
+  //#define Y2_IS_TMC2208
1024
+  //#define Z_IS_TMC2208
1025
+  //#define Z2_IS_TMC2208
1026
+  //#define E0_IS_TMC2208
1027
+  //#define E1_IS_TMC2208
1028
+  //#define E2_IS_TMC2208
1029
+  //#define E3_IS_TMC2208
1030
+  //#define E4_IS_TMC2208
1031
+
949
   /**
1032
   /**
950
    * Stepper driver settings
1033
    * Stepper driver settings
951
    */
1034
    */
952
 
1035
 
953
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1036
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
954
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1037
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
955
-  #define INTERPOLATE          1  // Interpolate X/Y/Z_MICROSTEPS to 256
1038
+  #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
956
 
1039
 
957
-  #define X_CURRENT         1000  // rms current in mA. Multiply by 1.41 for peak current.
1040
+  #define X_CURRENT          800  // rms current in mA. Multiply by 1.41 for peak current.
958
   #define X_MICROSTEPS        16  // 0..256
1041
   #define X_MICROSTEPS        16  // 0..256
959
 
1042
 
960
-  #define Y_CURRENT         1000
1043
+  #define Y_CURRENT          800
961
   #define Y_MICROSTEPS        16
1044
   #define Y_MICROSTEPS        16
962
 
1045
 
963
-  #define Z_CURRENT         1000
1046
+  #define Z_CURRENT          800
964
   #define Z_MICROSTEPS        16
1047
   #define Z_MICROSTEPS        16
965
 
1048
 
966
-  //#define X2_CURRENT      1000
967
-  //#define X2_MICROSTEPS     16
1049
+  #define X2_CURRENT         800
1050
+  #define X2_MICROSTEPS       16
968
 
1051
 
969
-  //#define Y2_CURRENT      1000
970
-  //#define Y2_MICROSTEPS     16
1052
+  #define Y2_CURRENT         800
1053
+  #define Y2_MICROSTEPS       16
971
 
1054
 
972
-  //#define Z2_CURRENT      1000
973
-  //#define Z2_MICROSTEPS     16
1055
+  #define Z2_CURRENT         800
1056
+  #define Z2_MICROSTEPS       16
974
 
1057
 
975
-  //#define E0_CURRENT      1000
976
-  //#define E0_MICROSTEPS     16
1058
+  #define E0_CURRENT         800
1059
+  #define E0_MICROSTEPS       16
977
 
1060
 
978
-  //#define E1_CURRENT      1000
979
-  //#define E1_MICROSTEPS     16
1061
+  #define E1_CURRENT         800
1062
+  #define E1_MICROSTEPS       16
980
 
1063
 
981
-  //#define E2_CURRENT      1000
982
-  //#define E2_MICROSTEPS     16
1064
+  #define E2_CURRENT         800
1065
+  #define E2_MICROSTEPS       16
983
 
1066
 
984
-  //#define E3_CURRENT      1000
985
-  //#define E3_MICROSTEPS     16
1067
+  #define E3_CURRENT         800
1068
+  #define E3_MICROSTEPS       16
986
 
1069
 
987
-  //#define E4_CURRENT      1000
988
-  //#define E4_MICROSTEPS     16
1070
+  #define E4_CURRENT         800
1071
+  #define E4_MICROSTEPS       16
989
 
1072
 
990
   /**
1073
   /**
991
    * Use Trinamic's ultra quiet stepping mode.
1074
    * Use Trinamic's ultra quiet stepping mode.
994
   #define STEALTHCHOP
1077
   #define STEALTHCHOP
995
 
1078
 
996
   /**
1079
   /**
997
-   * Let Marlin automatically control stepper current.
998
-   * This is still an experimental feature.
999
-   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
1000
-   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
1001
-   * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX
1080
+   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1081
+   * like overtemperature and short to ground. TMC2208 requires hardware serial.
1082
+   * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1083
+   * Other detected conditions can be used to stop the current print.
1002
    * Relevant g-codes:
1084
    * Relevant g-codes:
1003
    * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
1085
    * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
1004
-   * M906 S1 - Start adjusting current
1005
-   * M906 S0 - Stop adjusting current
1006
    * M911 - Report stepper driver overtemperature pre-warn condition.
1086
    * M911 - Report stepper driver overtemperature pre-warn condition.
1007
    * M912 - Clear stepper driver overtemperature pre-warn condition flag.
1087
    * M912 - Clear stepper driver overtemperature pre-warn condition flag.
1088
+   * M122 S0/1 - Report driver parameters (Requires TMC_DEBUG)
1008
    */
1089
    */
1009
-  //#define AUTOMATIC_CURRENT_CONTROL
1090
+  //#define MONITOR_DRIVER_STATUS
1010
 
1091
 
1011
-  #if ENABLED(AUTOMATIC_CURRENT_CONTROL)
1012
-    #define CURRENT_STEP          50  // [mA]
1013
-    #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
1092
+  #if ENABLED(MONITOR_DRIVER_STATUS)
1093
+    #define CURRENT_STEP_DOWN     50  // [mA]
1014
     #define REPORT_CURRENT_CHANGE
1094
     #define REPORT_CURRENT_CHANGE
1095
+    #define STOP_ON_ERROR
1015
   #endif
1096
   #endif
1016
 
1097
 
1017
   /**
1098
   /**
1026
   #define X2_HYBRID_THRESHOLD    100
1107
   #define X2_HYBRID_THRESHOLD    100
1027
   #define Y_HYBRID_THRESHOLD     100
1108
   #define Y_HYBRID_THRESHOLD     100
1028
   #define Y2_HYBRID_THRESHOLD    100
1109
   #define Y2_HYBRID_THRESHOLD    100
1029
-  #define Z_HYBRID_THRESHOLD       4
1030
-  #define Z2_HYBRID_THRESHOLD      4
1110
+  #define Z_HYBRID_THRESHOLD       3
1111
+  #define Z2_HYBRID_THRESHOLD      3
1031
   #define E0_HYBRID_THRESHOLD     30
1112
   #define E0_HYBRID_THRESHOLD     30
1032
   #define E1_HYBRID_THRESHOLD     30
1113
   #define E1_HYBRID_THRESHOLD     30
1033
   #define E2_HYBRID_THRESHOLD     30
1114
   #define E2_HYBRID_THRESHOLD     30
1037
   /**
1118
   /**
1038
    * Use stallGuard2 to sense an obstacle and trigger an endstop.
1119
    * Use stallGuard2 to sense an obstacle and trigger an endstop.
1039
    * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
1120
    * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
1040
-   * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal.
1121
+   * X and Y homing will always be done in spreadCycle mode.
1041
    *
1122
    *
1042
    * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
1123
    * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
1043
    * Higher values make the system LESS sensitive.
1124
    * Higher values make the system LESS sensitive.
1046
    * It is advised to set X/Y_HOME_BUMP_MM to 0.
1127
    * It is advised to set X/Y_HOME_BUMP_MM to 0.
1047
    * M914 X/Y to live tune the setting
1128
    * M914 X/Y to live tune the setting
1048
    */
1129
    */
1049
-  //#define SENSORLESS_HOMING
1130
+  //#define SENSORLESS_HOMING // TMC2130 only
1050
 
1131
 
1051
   #if ENABLED(SENSORLESS_HOMING)
1132
   #if ENABLED(SENSORLESS_HOMING)
1052
-    #define X_HOMING_SENSITIVITY  19
1053
-    #define Y_HOMING_SENSITIVITY  19
1133
+    #define X_HOMING_SENSITIVITY  8
1134
+    #define Y_HOMING_SENSITIVITY  8
1054
   #endif
1135
   #endif
1055
 
1136
 
1056
   /**
1137
   /**
1138
+   * Enable M122 debugging command for TMC stepper drivers.
1139
+   * M122 S0/1 will enable continous reporting.
1140
+   */
1141
+  //#define TMC_DEBUG
1142
+
1143
+  /**
1057
    * You can set your own advanced settings by filling in predefined functions.
1144
    * You can set your own advanced settings by filling in predefined functions.
1058
    * A list of available functions can be found on the library github page
1145
    * A list of available functions can be found on the library github page
1059
    * https://github.com/teemuatlut/TMC2130Stepper
1146
    * https://github.com/teemuatlut/TMC2130Stepper
1147
+   * https://github.com/teemuatlut/TMC2208Stepper
1060
    *
1148
    *
1061
    * Example:
1149
    * Example:
1062
-   * #define TMC2130_ADV() { \
1150
+   * #define TMC_ADV() { \
1063
    *   stepperX.diag0_temp_prewarn(1); \
1151
    *   stepperX.diag0_temp_prewarn(1); \
1064
-   *   stepperX.interpolate(0); \
1152
+   *   stepperY.interpolate(0); \
1065
    * }
1153
    * }
1066
    */
1154
    */
1067
-  #define  TMC2130_ADV() {  }
1155
+  #define  TMC_ADV() {  }
1068
 
1156
 
1069
-#endif // HAVE_TMC2130
1157
+#endif // TMC2130 || TMC2208
1070
 
1158
 
1071
 // @section L6470
1159
 // @section L6470
1072
 
1160
 
1231
 #endif
1319
 #endif
1232
 
1320
 
1233
 /**
1321
 /**
1322
+ * Filament Width Sensor
1323
+ *
1324
+ * Measures the filament width in real-time and adjusts
1325
+ * flow rate to compensate for any irregularities.
1326
+ *
1327
+ * Also allows the measured filament diameter to set the
1328
+ * extrusion rate, so the slicer only has to specify the
1329
+ * volume.
1330
+ *
1331
+ * Only a single extruder is supported at this time.
1332
+ *
1333
+ *  34 RAMPS_14    : Analog input 5 on the AUX2 connector
1334
+ *  81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
1335
+ * 301 RAMBO       : Analog input 3
1336
+ *
1337
+ * Note: May require analog pins to be defined for other boards.
1338
+ */
1339
+//#define FILAMENT_WIDTH_SENSOR
1340
+
1341
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
1342
+  #define FILAMENT_SENSOR_EXTRUDER_NUM 0    // Index of the extruder that has the filament sensor. :[0,1,2,3,4]
1343
+  #define MEASUREMENT_DELAY_CM        14    // (cm) The distance from the filament sensor to the melting chamber
1344
+
1345
+  #define MEASURED_UPPER_LIMIT         3.30 // (mm) Upper limit used to validate sensor reading
1346
+  #define MEASURED_LOWER_LIMIT         1.90 // (mm) Lower limit used to validate sensor reading
1347
+  #define MAX_MEASUREMENT_DELAY       20    // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
1348
+
1349
+  #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
1350
+
1351
+  // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
1352
+  //#define FILAMENT_LCD_DISPLAY
1353
+#endif
1354
+
1355
+/**
1356
+ * CNC Coordinate Systems
1357
+ *
1358
+ * Enables G53 and G54-G59.3 commands to select coordinate systems
1359
+ * and G92.1 to reset the workspace to native machine space.
1360
+ */
1361
+//#define CNC_COORDINATE_SYSTEMS
1362
+
1363
+/**
1234
  * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
1364
  * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
1235
  */
1365
  */
1236
 //#define PINS_DEBUGGING
1366
 //#define PINS_DEBUGGING
1421
                                          // tweaks made to the configuration are affecting the printer in real-time.
1551
                                          // tweaks made to the configuration are affecting the printer in real-time.
1422
 #endif
1552
 #endif
1423
 
1553
 
1554
+/**
1555
+ * NanoDLP Sync support
1556
+ *
1557
+ * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
1558
+ * string to enable synchronization with DLP projector exposure. This change will allow to use
1559
+ * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
1560
+ */
1561
+//#define NANODLP_Z_SYNC
1562
+#if ENABLED(NANODLP_Z_SYNC)
1563
+  //#define NANODLP_ALL_AXIS  // Enables "Z_move_comp" output on any axis move.
1564
+                              // Default behaviour is limited to Z axis only.
1565
+#endif
1566
+
1424
 #endif // CONFIGURATION_ADV_H
1567
 #endif // CONFIGURATION_ADV_H

+ 436
- 468
Marlin/G26_Mesh_Validation_Tool.cpp
Різницю між файлами не показано, бо вона завелика
Переглянути файл


+ 2
- 15
Marlin/I2CPositionEncoder.h Переглянути файл

127
               invert              = false,
127
               invert              = false,
128
               ec                  = true;
128
               ec                  = true;
129
 
129
 
130
-    float     axisOffset          = 0;
131
-
132
-    int32_t   axisOffsetTicks     = 0,
133
-              zeroOffset          = 0,
130
+    int32_t   zeroOffset          = 0,
134
               lastPosition        = 0,
131
               lastPosition        = 0,
135
               position;
132
               position;
136
 
133
 
168
     }
165
     }
169
 
166
 
170
     FORCE_INLINE float get_position_mm() { return mm_from_count(get_position()); }
167
     FORCE_INLINE float get_position_mm() { return mm_from_count(get_position()); }
171
-    FORCE_INLINE int32_t get_position() { return get_raw_count() - zeroOffset - axisOffsetTicks; }
168
+    FORCE_INLINE int32_t get_position() { return get_raw_count() - zeroOffset; }
172
 
169
 
173
     int32_t get_axis_error_steps(const bool report);
170
     int32_t get_axis_error_steps(const bool report);
174
     float get_axis_error_mm(const bool report);
171
     float get_axis_error_mm(const bool report);
219
 
216
 
220
     FORCE_INLINE int get_stepper_ticks() { return stepperTicks; }
217
     FORCE_INLINE int get_stepper_ticks() { return stepperTicks; }
221
     FORCE_INLINE void set_stepper_ticks(const int ticks) { stepperTicks = ticks; }
218
     FORCE_INLINE void set_stepper_ticks(const int ticks) { stepperTicks = ticks; }
222
-
223
-    FORCE_INLINE float get_axis_offset() { return axisOffset; }
224
-    FORCE_INLINE void set_axis_offset(const float newOffset) {
225
-      axisOffset = newOffset;
226
-      axisOffsetTicks = int32_t(axisOffset * get_encoder_ticks_mm());
227
-    }
228
-
229
-    FORCE_INLINE void set_current_position(const float newPositionMm) {
230
-      set_axis_offset(get_position_mm() - newPositionMm + axisOffset);
231
-    }
232
   };
219
   };
233
 
220
 
234
   class I2CPositionEncodersMgr {
221
   class I2CPositionEncodersMgr {

+ 1
- 1
Marlin/Makefile Переглянути файл

332
 
332
 
333
 ifeq ($(RELOC_WORKAROUND), 1)
333
 ifeq ($(RELOC_WORKAROUND), 1)
334
 LD_PREFIX=-nodefaultlibs
334
 LD_PREFIX=-nodefaultlibs
335
-LD_SUFFIX=-lm -lgcc -lc -lgcc
335
+LD_SUFFIX=-lm -lgcc -lc -lgcc -L$(ARDUINO_INSTALL_DIR)/hardware/tools/avr/avr/lib/avr6 -l$(MCU)
336
 endif
336
 endif
337
 
337
 
338
 #Check for Arduino 1.0.0 or higher and use the correct source files for that version
338
 #Check for Arduino 1.0.0 or higher and use the correct source files for that version

+ 88
- 43
Marlin/Marlin.h Переглянути файл

210
 /**
210
 /**
211
  * Feedrate scaling and conversion
211
  * Feedrate scaling and conversion
212
  */
212
  */
213
+extern float feedrate_mm_s;
213
 extern int16_t feedrate_percentage;
214
 extern int16_t feedrate_percentage;
214
 
215
 
215
-#define MMM_TO_MMS(MM_M) ((MM_M)/60.0)
216
-#define MMS_TO_MMM(MM_S) ((MM_S)*60.0)
217
 #define MMS_SCALED(MM_S) ((MM_S)*feedrate_percentage*0.01)
216
 #define MMS_SCALED(MM_S) ((MM_S)*feedrate_percentage*0.01)
218
 
217
 
219
 extern bool axis_relative_modes[];
218
 extern bool axis_relative_modes[];
220
-extern bool volumetric_enabled;
221
-extern int16_t flow_percentage[EXTRUDERS]; // Extrusion factor for each extruder
222
-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.
223
-extern float volumetric_multiplier[EXTRUDERS]; // reciprocal of cross-sectional area of filament (in square millimeters), stored this way to reduce computational burden in planner
224
 extern bool axis_known_position[XYZ];
219
 extern bool axis_known_position[XYZ];
225
 extern bool axis_homed[XYZ];
220
 extern bool axis_homed[XYZ];
226
 extern volatile bool wait_for_heatup;
221
 extern volatile bool wait_for_heatup;
229
   extern volatile bool wait_for_user;
224
   extern volatile bool wait_for_user;
230
 #endif
225
 #endif
231
 
226
 
232
-extern float current_position[NUM_AXIS];
227
+extern float current_position[XYZE], destination[XYZE];
233
 
228
 
234
 // Workspace offsets
229
 // Workspace offsets
235
 #if HAS_WORKSPACE_OFFSET
230
 #if HAS_WORKSPACE_OFFSET
252
   #define WORKSPACE_OFFSET(AXIS) 0
247
   #define WORKSPACE_OFFSET(AXIS) 0
253
 #endif
248
 #endif
254
 
249
 
255
-#define LOGICAL_POSITION(POS, AXIS) ((POS) + WORKSPACE_OFFSET(AXIS))
256
-#define RAW_POSITION(POS, AXIS)     ((POS) - WORKSPACE_OFFSET(AXIS))
250
+#define NATIVE_TO_LOGICAL(POS, AXIS) ((POS) + WORKSPACE_OFFSET(AXIS))
251
+#define LOGICAL_TO_NATIVE(POS, AXIS) ((POS) - WORKSPACE_OFFSET(AXIS))
257
 
252
 
258
 #if HAS_POSITION_SHIFT || DISABLED(DELTA)
253
 #if HAS_POSITION_SHIFT || DISABLED(DELTA)
259
-  #define LOGICAL_X_POSITION(POS)   LOGICAL_POSITION(POS, X_AXIS)
260
-  #define LOGICAL_Y_POSITION(POS)   LOGICAL_POSITION(POS, Y_AXIS)
261
-  #define RAW_X_POSITION(POS)       RAW_POSITION(POS, X_AXIS)
262
-  #define RAW_Y_POSITION(POS)       RAW_POSITION(POS, Y_AXIS)
254
+  #define LOGICAL_X_POSITION(POS)   NATIVE_TO_LOGICAL(POS, X_AXIS)
255
+  #define LOGICAL_Y_POSITION(POS)   NATIVE_TO_LOGICAL(POS, Y_AXIS)
256
+  #define RAW_X_POSITION(POS)       LOGICAL_TO_NATIVE(POS, X_AXIS)
257
+  #define RAW_Y_POSITION(POS)       LOGICAL_TO_NATIVE(POS, Y_AXIS)
263
 #else
258
 #else
264
   #define LOGICAL_X_POSITION(POS)   (POS)
259
   #define LOGICAL_X_POSITION(POS)   (POS)
265
   #define LOGICAL_Y_POSITION(POS)   (POS)
260
   #define LOGICAL_Y_POSITION(POS)   (POS)
267
   #define RAW_Y_POSITION(POS)       (POS)
262
   #define RAW_Y_POSITION(POS)       (POS)
268
 #endif
263
 #endif
269
 
264
 
270
-#define LOGICAL_Z_POSITION(POS)     LOGICAL_POSITION(POS, Z_AXIS)
271
-#define RAW_Z_POSITION(POS)         RAW_POSITION(POS, Z_AXIS)
272
-#define RAW_CURRENT_POSITION(A)     RAW_##A##_POSITION(current_position[A##_AXIS])
265
+#define LOGICAL_Z_POSITION(POS)     NATIVE_TO_LOGICAL(POS, Z_AXIS)
266
+#define RAW_Z_POSITION(POS)         LOGICAL_TO_NATIVE(POS, Z_AXIS)
273
 
267
 
274
 // Hotend Offsets
268
 // Hotend Offsets
275
 #if HOTENDS > 1
269
 #if HOTENDS > 1
291
   void update_software_endstops(const AxisEnum axis);
285
   void update_software_endstops(const AxisEnum axis);
292
 #endif
286
 #endif
293
 
287
 
288
+#if ENABLED(CNC_COORDINATE_SYSTEMS)
289
+  #define MAX_COORDINATE_SYSTEMS 9
290
+  extern float coordinate_system[MAX_COORDINATE_SYSTEMS][XYZ];
291
+  bool select_coordinate_system(const int8_t _new);
292
+#endif
293
+
294
+void report_current_position();
295
+
294
 #if IS_KINEMATIC
296
 #if IS_KINEMATIC
295
   extern float delta[ABC];
297
   extern float delta[ABC];
296
-  void inverse_kinematics(const float logical[XYZ]);
298
+  void inverse_kinematics(const float raw[XYZ]);
297
 #endif
299
 #endif
298
 
300
 
299
 #if ENABLED(DELTA)
301
 #if ENABLED(DELTA)
300
-  extern float endstop_adj[ABC],
302
+  extern float delta_height,
303
+               delta_endstop_adj[ABC],
301
                delta_radius,
304
                delta_radius,
305
+               delta_tower_angle_trim[ABC],
306
+               delta_tower[ABC][2],
302
                delta_diagonal_rod,
307
                delta_diagonal_rod,
303
                delta_calibration_radius,
308
                delta_calibration_radius,
309
+               delta_diagonal_rod_2_tower[ABC],
304
                delta_segments_per_second,
310
                delta_segments_per_second,
305
-               delta_tower_angle_trim[ABC],
306
                delta_clip_start_height;
311
                delta_clip_start_height;
307
-  void recalc_delta_settings(float radius, float diagonal_rod, float tower_angle_trim[ABC]);
312
+
313
+  void recalc_delta_settings();
314
+  float delta_safe_distance_from_top();
315
+
316
+  #if ENABLED(DELTA_FAST_SQRT)
317
+    float Q_rsqrt(const float number);
318
+    #define _SQRT(n) (1.0f / Q_rsqrt(n))
319
+  #else
320
+    #define _SQRT(n) SQRT(n)
321
+  #endif
322
+
323
+  // Macro to obtain the Z position of an individual tower
324
+  #define DELTA_Z(T) raw[Z_AXIS] + _SQRT(     \
325
+    delta_diagonal_rod_2_tower[T] - HYPOT2(   \
326
+        delta_tower[T][X_AXIS] - raw[X_AXIS], \
327
+        delta_tower[T][Y_AXIS] - raw[Y_AXIS]  \
328
+      )                                       \
329
+    )
330
+
331
+  #define DELTA_RAW_IK() do {        \
332
+    delta[A_AXIS] = DELTA_Z(A_AXIS); \
333
+    delta[B_AXIS] = DELTA_Z(B_AXIS); \
334
+    delta[C_AXIS] = DELTA_Z(C_AXIS); \
335
+  }while(0)
336
+
308
 #elif IS_SCARA
337
 #elif IS_SCARA
309
   void forward_kinematics_SCARA(const float &a, const float &b);
338
   void forward_kinematics_SCARA(const float &a, const float &b);
310
 #endif
339
 #endif
311
 
340
 
341
+#if ENABLED(G26_MESH_VALIDATION)
342
+  extern bool g26_debug_flag;
343
+#elif ENABLED(AUTO_BED_LEVELING_UBL)
344
+  constexpr bool g26_debug_flag = false;
345
+#endif
346
+
347
+#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
348
+  #define _GET_MESH_X(I) (bilinear_start[X_AXIS] + (I) * bilinear_grid_spacing[X_AXIS])
349
+  #define _GET_MESH_Y(J) (bilinear_start[Y_AXIS] + (J) * bilinear_grid_spacing[Y_AXIS])
350
+#elif ENABLED(AUTO_BED_LEVELING_UBL)
351
+  #define _GET_MESH_X(I) ubl.mesh_index_to_xpos(I)
352
+  #define _GET_MESH_Y(J) ubl.mesh_index_to_ypos(J)
353
+#elif ENABLED(MESH_BED_LEVELING)
354
+  #define _GET_MESH_X(I) mbl.index_to_xpos[I]
355
+  #define _GET_MESH_Y(J) mbl.index_to_ypos[J]
356
+#endif
357
+
312
 #if ENABLED(AUTO_BED_LEVELING_BILINEAR)
358
 #if ENABLED(AUTO_BED_LEVELING_BILINEAR)
313
   extern int bilinear_grid_spacing[2], bilinear_start[2];
359
   extern int bilinear_grid_spacing[2], bilinear_start[2];
314
   extern float bilinear_grid_factor[2],
360
   extern float bilinear_grid_factor[2],
315
                z_values[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y];
361
                z_values[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y];
316
-  float bilinear_z_offset(const float logical[XYZ]);
362
+  float bilinear_z_offset(const float raw[XYZ]);
317
 #endif
363
 #endif
318
 
364
 
319
 #if ENABLED(AUTO_BED_LEVELING_UBL)
365
 #if ENABLED(AUTO_BED_LEVELING_UBL)
323
 
369
 
324
 #if HAS_LEVELING
370
 #if HAS_LEVELING
325
   bool leveling_is_valid();
371
   bool leveling_is_valid();
326
-  bool leveling_is_active();
327
   void set_bed_leveling_enabled(const bool enable=true);
372
   void set_bed_leveling_enabled(const bool enable=true);
328
   void reset_bed_level();
373
   void reset_bed_level();
329
 #endif
374
 #endif
330
 
375
 
331
 #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
376
 #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
332
-  void set_z_fade_height(const float zfh);
377
+  void set_z_fade_height(const float zfh, const bool do_report=true);
333
 #endif
378
 #endif
334
 
379
 
380
+#if ENABLED(X_DUAL_ENDSTOPS)
381
+  extern float x_endstop_adj;
382
+#endif
383
+#if ENABLED(Y_DUAL_ENDSTOPS)
384
+  extern float y_endstop_adj;
385
+#endif
335
 #if ENABLED(Z_DUAL_ENDSTOPS)
386
 #if ENABLED(Z_DUAL_ENDSTOPS)
336
   extern float z_endstop_adj;
387
   extern float z_endstop_adj;
337
 #endif
388
 #endif
338
 
389
 
339
 #if HAS_BED_PROBE
390
 #if HAS_BED_PROBE
340
   extern float zprobe_zoffset;
391
   extern float zprobe_zoffset;
341
-  void refresh_zprobe_zoffset(const bool no_babystep=false);
342
   #define DEPLOY_PROBE() set_probe_deployed(true)
392
   #define DEPLOY_PROBE() set_probe_deployed(true)
343
   #define STOW_PROBE() set_probe_deployed(false)
393
   #define STOW_PROBE() set_probe_deployed(false)
344
 #else
394
 #else
355
 
405
 
356
 #if FAN_COUNT > 0
406
 #if FAN_COUNT > 0
357
   extern int16_t fanSpeeds[FAN_COUNT];
407
   extern int16_t fanSpeeds[FAN_COUNT];
408
+  #if ENABLED(EXTRA_FAN_SPEED)
409
+    extern int16_t old_fanSpeeds[FAN_COUNT],
410
+                   new_fanSpeeds[FAN_COUNT];
411
+  #endif
358
   #if ENABLED(PROBING_FANS_OFF)
412
   #if ENABLED(PROBING_FANS_OFF)
359
     extern bool fans_paused;
413
     extern bool fans_paused;
360
     extern int16_t paused_fanSpeeds[FAN_COUNT];
414
     extern int16_t paused_fanSpeeds[FAN_COUNT];
404
 // Handling multiple extruders pins
458
 // Handling multiple extruders pins
405
 extern uint8_t active_extruder;
459
 extern uint8_t active_extruder;
406
 
460
 
407
-#if HAS_TEMP_HOTEND || HAS_TEMP_BED
408
-  void print_heaterstates();
409
-#endif
410
-
411
 #if ENABLED(MIXING_EXTRUDER)
461
 #if ENABLED(MIXING_EXTRUDER)
412
   extern float mixing_factor[MIXING_STEPPERS];
462
   extern float mixing_factor[MIXING_STEPPERS];
413
 #endif
463
 #endif
414
 
464
 
415
-void calculate_volumetric_multipliers();
465
+inline void set_current_from_destination() { COPY(current_position, destination); }
466
+inline void set_destination_from_current() { COPY(destination, current_position); }
467
+void prepare_move_to_destination();
416
 
468
 
417
 /**
469
 /**
418
  * Blocking movement and shorthand functions
470
  * Blocking movement and shorthand functions
430
       || ENABLED(NOZZLE_CLEAN_FEATURE)                                             \
482
       || ENABLED(NOZZLE_CLEAN_FEATURE)                                             \
431
       || ENABLED(NOZZLE_PARK_FEATURE)                                              \
483
       || ENABLED(NOZZLE_PARK_FEATURE)                                              \
432
       || (ENABLED(ADVANCED_PAUSE_FEATURE) && ENABLED(HOME_BEFORE_FILAMENT_CHANGE)) \
484
       || (ENABLED(ADVANCED_PAUSE_FEATURE) && ENABLED(HOME_BEFORE_FILAMENT_CHANGE)) \
485
+      || HAS_M206_COMMAND                                                          \
433
     ) || ENABLED(NO_MOTION_BEFORE_HOMING)
486
     ) || ENABLED(NO_MOTION_BEFORE_HOMING)
434
 
487
 
435
 #if HAS_AXIS_UNHOMED_ERR
488
 #if HAS_AXIS_UNHOMED_ERR
446
     extern const float L1, L2;
499
     extern const float L1, L2;
447
   #endif
500
   #endif
448
 
501
 
449
-  inline bool position_is_reachable_raw_xy(const float &rx, const float &ry) {
502
+  inline bool position_is_reachable(const float &rx, const float &ry) {
450
     #if ENABLED(DELTA)
503
     #if ENABLED(DELTA)
451
       return HYPOT2(rx, ry) <= sq(DELTA_PRINTABLE_RADIUS);
504
       return HYPOT2(rx, ry) <= sq(DELTA_PRINTABLE_RADIUS);
452
     #elif IS_SCARA
505
     #elif IS_SCARA
461
     #endif
514
     #endif
462
   }
515
   }
463
 
516
 
464
-  inline bool position_is_reachable_by_probe_raw_xy(const float &rx, const float &ry) {
517
+  inline bool position_is_reachable_by_probe(const float &rx, const float &ry) {
465
 
518
 
466
     // Both the nozzle and the probe must be able to reach the point.
519
     // Both the nozzle and the probe must be able to reach the point.
467
     // This won't work on SCARA since the probe offset rotates with the arm.
520
     // This won't work on SCARA since the probe offset rotates with the arm.
468
 
521
 
469
-    return position_is_reachable_raw_xy(rx, ry)
470
-        && position_is_reachable_raw_xy(rx - X_PROBE_OFFSET_FROM_EXTRUDER, ry - Y_PROBE_OFFSET_FROM_EXTRUDER);
522
+    return position_is_reachable(rx, ry)
523
+        && position_is_reachable(rx - (X_PROBE_OFFSET_FROM_EXTRUDER), ry - (Y_PROBE_OFFSET_FROM_EXTRUDER));
471
   }
524
   }
472
 
525
 
473
 #else // CARTESIAN
526
 #else // CARTESIAN
474
 
527
 
475
-  inline bool position_is_reachable_raw_xy(const float &rx, const float &ry) {
528
+  inline bool position_is_reachable(const float &rx, const float &ry) {
476
       // Add 0.001 margin to deal with float imprecision
529
       // Add 0.001 margin to deal with float imprecision
477
       return WITHIN(rx, X_MIN_POS - 0.001, X_MAX_POS + 0.001)
530
       return WITHIN(rx, X_MIN_POS - 0.001, X_MAX_POS + 0.001)
478
           && WITHIN(ry, Y_MIN_POS - 0.001, Y_MAX_POS + 0.001);
531
           && WITHIN(ry, Y_MIN_POS - 0.001, Y_MAX_POS + 0.001);
479
   }
532
   }
480
 
533
 
481
-  inline bool position_is_reachable_by_probe_raw_xy(const float &rx, const float &ry) {
534
+  inline bool position_is_reachable_by_probe(const float &rx, const float &ry) {
482
       // Add 0.001 margin to deal with float imprecision
535
       // Add 0.001 margin to deal with float imprecision
483
       return WITHIN(rx, MIN_PROBE_X - 0.001, MAX_PROBE_X + 0.001)
536
       return WITHIN(rx, MIN_PROBE_X - 0.001, MAX_PROBE_X + 0.001)
484
           && WITHIN(ry, MIN_PROBE_Y - 0.001, MAX_PROBE_Y + 0.001);
537
           && WITHIN(ry, MIN_PROBE_Y - 0.001, MAX_PROBE_Y + 0.001);
486
 
539
 
487
 #endif // CARTESIAN
540
 #endif // CARTESIAN
488
 
541
 
489
-FORCE_INLINE bool position_is_reachable_by_probe_xy(const float &lx, const float &ly) {
490
-  return position_is_reachable_by_probe_raw_xy(RAW_X_POSITION(lx), RAW_Y_POSITION(ly));
491
-}
492
-
493
-FORCE_INLINE bool position_is_reachable_xy(const float &lx, const float &ly) {
494
-  return position_is_reachable_raw_xy(RAW_X_POSITION(lx), RAW_Y_POSITION(ly));
495
-}
496
-
497
 #endif // MARLIN_H
542
 #endif // MARLIN_H

+ 1
- 0
Marlin/MarlinConfig.h Переглянути файл

29
 #include "Version.h"
29
 #include "Version.h"
30
 #include "Configuration.h"
30
 #include "Configuration.h"
31
 #include "Conditionals_LCD.h"
31
 #include "Conditionals_LCD.h"
32
+#include "tmc_macros.h"
32
 #include "Configuration_adv.h"
33
 #include "Configuration_adv.h"
33
 #include "pins.h"
34
 #include "pins.h"
34
 #ifndef USBCON
35
 #ifndef USBCON

Marlin/spi.h → Marlin/MarlinSPI.h Переглянути файл

20
  *
20
  *
21
  */
21
  */
22
 
22
 
23
-#ifndef __SPI_H__
24
-#define __SPI_H__
23
+#ifndef __MARLIN_SPI_H__
24
+#define __MARLIN_SPI_H__
25
 
25
 
26
 #include <stdint.h>
26
 #include <stdint.h>
27
 #include "softspi.h"
27
 #include "softspi.h"
54
 
54
 
55
 };
55
 };
56
 
56
 
57
-#endif // __SPI_H__
57
+#endif // __MARLIN_SPI_H__

+ 19
- 18
Marlin/MarlinSerial.h Переглянути файл

75
 #define BIN 2
75
 #define BIN 2
76
 #define BYTE 0
76
 #define BYTE 0
77
 
77
 
78
-#ifndef USBCON
79
-  // Define constants and variables for buffering incoming serial data.  We're
80
-  // using a ring buffer (I think), in which rx_buffer_head is the index of the
81
-  // location to which to write the next incoming character and rx_buffer_tail
82
-  // is the index of the location from which to read.
83
-  // 256 is the max limit due to uint8_t head and tail. Use only powers of 2. (...,16,32,64,128,256)
84
-  #ifndef RX_BUFFER_SIZE
85
-    #define RX_BUFFER_SIZE 128
86
-  #endif
87
-  #ifndef TX_BUFFER_SIZE
88
-    #define TX_BUFFER_SIZE 32
89
-  #endif
78
+// Define constants and variables for buffering serial data.
79
+// Use only 0 or powers of 2 greater than 1
80
+// : [0, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, ...]
81
+#ifndef RX_BUFFER_SIZE
82
+  #define RX_BUFFER_SIZE 128
83
+#endif
84
+// 256 is the max TX buffer limit due to uint8_t head and tail.
85
+#ifndef TX_BUFFER_SIZE
86
+  #define TX_BUFFER_SIZE 32
87
+#endif
90
 
88
 
89
+#ifndef USBCON
91
   #if ENABLED(SERIAL_XON_XOFF) && RX_BUFFER_SIZE < 1024
90
   #if ENABLED(SERIAL_XON_XOFF) && RX_BUFFER_SIZE < 1024
92
-    #error "XON/XOFF requires RX_BUFFER_SIZE >= 1024 for reliable transfers without drops."
91
+    #error "SERIAL_XON_XOFF requires RX_BUFFER_SIZE >= 1024 for reliable transfers without drops."
93
   #endif
92
   #endif
93
+
94
   #if !IS_POWER_OF_2(RX_BUFFER_SIZE) || RX_BUFFER_SIZE < 2
94
   #if !IS_POWER_OF_2(RX_BUFFER_SIZE) || RX_BUFFER_SIZE < 2
95
     #error "RX_BUFFER_SIZE must be a power of 2 greater than 1."
95
     #error "RX_BUFFER_SIZE must be a power of 2 greater than 1."
96
   #endif
96
   #endif
97
+
97
   #if TX_BUFFER_SIZE && (TX_BUFFER_SIZE < 2 || TX_BUFFER_SIZE > 256 || !IS_POWER_OF_2(TX_BUFFER_SIZE))
98
   #if TX_BUFFER_SIZE && (TX_BUFFER_SIZE < 2 || TX_BUFFER_SIZE > 256 || !IS_POWER_OF_2(TX_BUFFER_SIZE))
98
-    #error "TX_BUFFER_SIZE must be 0 or a power of 2 greater than 1."
99
+    #error "TX_BUFFER_SIZE must be 0, a power of 2 greater than 1, and no greater than 256."
99
   #endif
100
   #endif
100
 
101
 
101
   #if RX_BUFFER_SIZE > 256
102
   #if RX_BUFFER_SIZE > 256
143
       static void printFloat(double, uint8_t);
144
       static void printFloat(double, uint8_t);
144
 
145
 
145
     public:
146
     public:
146
-      static FORCE_INLINE void write(const char* str) { while (*str) write(*str++); }
147
-      static FORCE_INLINE void write(const uint8_t* buffer, size_t size) { while (size--) write(*buffer++); }
148
-      static FORCE_INLINE void print(const String& s) { for (int i = 0; i < (int)s.length(); i++) write(s[i]); }
149
-      static FORCE_INLINE void print(const char* str) { write(str); }
147
+      FORCE_INLINE static void write(const char* str) { while (*str) write(*str++); }
148
+      FORCE_INLINE static void write(const uint8_t* buffer, size_t size) { while (size--) write(*buffer++); }
149
+      FORCE_INLINE static void print(const String& s) { for (int i = 0; i < (int)s.length(); i++) write(s[i]); }
150
+      FORCE_INLINE static void print(const char* str) { write(str); }
150
 
151
 
151
       static void print(char, int = BYTE);
152
       static void print(char, int = BYTE);
152
       static void print(unsigned char, int = BYTE);
153
       static void print(unsigned char, int = BYTE);

+ 2749
- 1848
Marlin/Marlin_main.cpp
Різницю між файлами не показано, бо вона завелика
Переглянути файл


+ 264
- 151
Marlin/Max7219_Debug_LEDs.cpp Переглянути файл

39
  * void Max7219_init();
39
  * void Max7219_init();
40
  * void Max7219_PutByte(uint8_t data);
40
  * void Max7219_PutByte(uint8_t data);
41
  * void Max7219(uint8_t reg, uint8_t data);
41
  * void Max7219(uint8_t reg, uint8_t data);
42
- * void Max7219_LED_On(uint8_t row, uint8_t col);
43
- * void Max7219_LED_Off(uint8_t row, uint8_t col);
44
- * void Max7219_LED_Toggle(uint8_t row, uint8_t col);
42
+ * void Max7219_LED_On(uint8_t col, uint8_t row);
43
+ * void Max7219_LED_Off(uint8_t col, uint8_t row);
44
+ * void Max7219_LED_Toggle(uint8_t col, uint8_t row);
45
  * void Max7219_Clear_Row(uint8_t row);
45
  * void Max7219_Clear_Row(uint8_t row);
46
  * void Max7219_Clear_Column(uint8_t col);
46
  * void Max7219_Clear_Column(uint8_t col);
47
  * void Max7219_Set_Row(uint8_t row, uint8_t val);
47
  * void Max7219_Set_Row(uint8_t row, uint8_t val);
48
+ * void Max7219_Set_2_Rows(uint8_t row, uint16_t val);
49
+ * void Max7219_Set_4_Rows(uint8_t row, uint32_t val);
48
  * void Max7219_Set_Column(uint8_t col, uint8_t val);
50
  * void Max7219_Set_Column(uint8_t col, uint8_t val);
49
  * void Max7219_idle_tasks();
51
  * void Max7219_idle_tasks();
50
  */
52
  */
53
 
55
 
54
 #if ENABLED(MAX7219_DEBUG)
56
 #if ENABLED(MAX7219_DEBUG)
55
 
57
 
56
-  #include "Marlin.h"
57
-  #include "planner.h"
58
-  #include "stepper.h"
59
-  #include "Max7219_Debug_LEDs.h"
58
+#include "Max7219_Debug_LEDs.h"
60
 
59
 
61
-  static uint8_t LEDs[8] = { 0 };
60
+#include "planner.h"
61
+#include "stepper.h"
62
+#include "Marlin.h"
62
 
63
 
63
-  void Max7219_PutByte(uint8_t data) {
64
-    for (uint8_t i = 8; i--;) {
65
-      WRITE(MAX7219_CLK_PIN, LOW);       // tick
66
-      WRITE(MAX7219_DIN_PIN, (data & 0x80) ? HIGH : LOW);  // send 1 or 0 based on data bit
67
-      WRITE(MAX7219_CLK_PIN, HIGH);      // tock
68
-      data <<= 1;
69
-    }
64
+static uint8_t LEDs[8] = { 0 };
65
+
66
+#ifdef CPU_32_BIT
67
+  #define MS_DELAY() delayMicroseconds(5)  // 32-bit processors need a delay to stabilize the signal
68
+#else
69
+  #define MS_DELAY() NOOP
70
+#endif
71
+
72
+void Max7219_PutByte(uint8_t data) {
73
+  CRITICAL_SECTION_START
74
+  for (uint8_t i = 8; i--;) {
75
+    MS_DELAY();
76
+    WRITE(MAX7219_CLK_PIN, LOW);       // tick
77
+    MS_DELAY();
78
+    WRITE(MAX7219_DIN_PIN, (data & 0x80) ? HIGH : LOW);  // send 1 or 0 based on data bit
79
+    MS_DELAY();
80
+    WRITE(MAX7219_CLK_PIN, HIGH);      // tock
81
+    MS_DELAY();
82
+    data <<= 1;
70
   }
83
   }
84
+  CRITICAL_SECTION_END
85
+}
71
 
86
 
72
-  void Max7219(const uint8_t reg, const uint8_t data) {
73
-    WRITE(MAX7219_LOAD_PIN, LOW);  // begin
74
-    Max7219_PutByte(reg);          // specify register
75
-    Max7219_PutByte(data);         // put data
76
-    WRITE(MAX7219_LOAD_PIN, LOW);  // and tell the chip to load the data
77
-    WRITE(MAX7219_LOAD_PIN, HIGH);
87
+void Max7219(const uint8_t reg, const uint8_t data) {
88
+  MS_DELAY();
89
+  CRITICAL_SECTION_START
90
+  WRITE(MAX7219_LOAD_PIN, LOW);  // begin
91
+  MS_DELAY();
92
+  Max7219_PutByte(reg);          // specify register
93
+  MS_DELAY();
94
+  Max7219_PutByte(data);         // put data
95
+  MS_DELAY();
96
+  WRITE(MAX7219_LOAD_PIN, LOW);  // and tell the chip to load the data
97
+  MS_DELAY();
98
+  WRITE(MAX7219_LOAD_PIN, HIGH);
99
+  CRITICAL_SECTION_END
100
+  MS_DELAY();
101
+}
102
+
103
+void Max7219_LED_Set(const uint8_t row, const uint8_t col, const bool on) {
104
+  if (row > 7 || col > 7) {
105
+    SERIAL_ECHOPAIR("??? Max7219_LED_Set(", (int)row);
106
+    SERIAL_ECHOPAIR(",", (int)col);
107
+    SERIAL_ECHOLNPGM(")");
108
+    return;
78
   }
109
   }
110
+  if (TEST(LEDs[row], col) == on) return; // if LED is already on/off, leave alone
111
+  if (on) SBI(LEDs[row], col); else CBI(LEDs[row], col);
112
+  Max7219(8 - row, LEDs[row]);
113
+}
79
 
114
 
80
-  void Max7219_LED_Set(const uint8_t row, const uint8_t col, const bool on) {
81
-    if (row > 7 || col > 7) return;
82
-    if (TEST(LEDs[row], col) == on) return; // if LED is already on/off, leave alone
83
-    if (on) SBI(LEDs[row], col); else CBI(LEDs[row], col);
84
-    Max7219(8 - row, LEDs[row]);
115
+void Max7219_LED_On(const uint8_t col, const uint8_t row) {
116
+  if (row > 7 || col > 7) {
117
+    SERIAL_ECHOPAIR("??? Max7219_LED_On(", (int)col);
118
+    SERIAL_ECHOPAIR(",", (int)row);
119
+    SERIAL_ECHOLNPGM(")");
120
+    return;
85
   }
121
   }
122
+  Max7219_LED_Set(col, row, true);
123
+}
86
 
124
 
87
-  void Max7219_LED_On(const uint8_t row, const uint8_t col) {
88
-    Max7219_LED_Set(row, col, true);
125
+void Max7219_LED_Off(const uint8_t col, const uint8_t row) {
126
+  if (row > 7 || col > 7) {
127
+    SERIAL_ECHOPAIR("??? Max7219_LED_Off(", (int)row);
128
+    SERIAL_ECHOPAIR(",", (int)col);
129
+    SERIAL_ECHOLNPGM(")");
130
+    return;
89
   }
131
   }
132
+  Max7219_LED_Set(col, row, false);
133
+}
90
 
134
 
91
-  void Max7219_LED_Off(const uint8_t row, const uint8_t col) {
92
-    Max7219_LED_Set(row, col, false);
135
+void Max7219_LED_Toggle(const uint8_t col, const uint8_t row) {
136
+  if (row > 7 || col > 7) {
137
+    SERIAL_ECHOPAIR("??? Max7219_LED_Toggle(", (int)row);
138
+    SERIAL_ECHOPAIR(",", (int)col);
139
+    SERIAL_ECHOLNPGM(")");
140
+    return;
93
   }
141
   }
142
+  if (TEST(LEDs[row], col))
143
+    Max7219_LED_Off(col, row);
144
+  else
145
+    Max7219_LED_On(col, row);
146
+}
94
 
147
 
95
-  void Max7219_LED_Toggle(const uint8_t row, const uint8_t col) {
96
-    if (row > 7 || col > 7) return;
97
-    if (TEST(LEDs[row], col))
98
-      Max7219_LED_Off(row, col);
99
-    else
100
-      Max7219_LED_On(row, col);
148
+void Max7219_Clear_Column(const uint8_t col) {
149
+  if (col > 7) {
150
+    SERIAL_ECHOPAIR("??? Max7219_Clear_Column(", (int)col);
151
+    SERIAL_ECHOLNPGM(")");
152
+    return;
101
   }
153
   }
154
+  LEDs[col] = 0;
155
+  Max7219(8 - col, LEDs[col]);
156
+}
102
 
157
 
103
-  void Max7219_Clear_Column(const uint8_t col) {
104
-    if (col > 7) return;
105
-    LEDs[col] = 0;
106
-    Max7219(8 - col, LEDs[col]);
158
+void Max7219_Clear_Row(const uint8_t row) {
159
+  if (row > 7) {
160
+    SERIAL_ECHOPAIR("??? Max7219_Clear_Row(", (int)row);
161
+    SERIAL_ECHOLNPGM(")");
162
+    return;
107
   }
163
   }
164
+  for (uint8_t c = 0; c <= 7; c++)
165
+    Max7219_LED_Off(c, row);
166
+}
108
 
167
 
109
-  void Max7219_Clear_Row(const uint8_t row) {
110
-    if (row > 7) return;
111
-    for (uint8_t c = 0; c <= 7; c++)
112
-      Max7219_LED_Off(c, row);
168
+void Max7219_Set_Row(const uint8_t row, const uint8_t val) {
169
+  if (row > 7) {
170
+    SERIAL_ECHOPAIR("??? Max7219_Set_Row(", (int)row);
171
+    SERIAL_ECHOPAIR(",", (int)val);
172
+    SERIAL_ECHOLNPGM(")");
173
+    return;
113
   }
174
   }
175
+  for (uint8_t b = 0; b <= 7; b++)
176
+    if (TEST(val, b))
177
+      Max7219_LED_On(7 - b, row);
178
+    else
179
+      Max7219_LED_Off(7 - b, row);
180
+}
114
 
181
 
115
-  void Max7219_Set_Row(const uint8_t row, const uint8_t val) {
116
-    if (row > 7) return;
117
-    for (uint8_t b = 0; b <= 7; b++)
118
-      if (TEST(val, b))
119
-        Max7219_LED_On(7 - b, row);
120
-      else
121
-        Max7219_LED_Off(7 - b, row);
182
+void Max7219_Set_2_Rows(const uint8_t row, const uint16_t val) {
183
+  if (row > 6) {
184
+    SERIAL_ECHOPAIR("??? Max7219_Set_2_Rows(", (int)row);
185
+    SERIAL_ECHOPAIR(",", (int)val);
186
+    SERIAL_ECHOLNPGM(")");
187
+    return;
122
   }
188
   }
189
+  Max7219_Set_Row(row + 1, (val >> 8) & 0xFF);
190
+  Max7219_Set_Row(row + 0, (val     ) & 0xFF);
191
+}
123
 
192
 
124
-  void Max7219_Set_Column(const uint8_t col, const uint8_t val) {
125
-    if (col > 7) return;
126
-    LEDs[col] = val;
127
-    Max7219(8 - col, LEDs[col]);
193
+void Max7219_Set_4_Rows(const uint8_t row, const uint32_t val) {
194
+  if (row > 4) {
195
+    SERIAL_ECHOPAIR("??? Max7219_Set_4_Rows(", (int)row);
196
+    SERIAL_ECHOPAIR(",", (long)val);
197
+    SERIAL_ECHOLNPGM(")");
198
+    return;
128
   }
199
   }
200
+  Max7219_Set_Row(row + 3, (val >> 24) & 0xFF);
201
+  Max7219_Set_Row(row + 2, (val >> 16) & 0xFF);
202
+  Max7219_Set_Row(row + 1, (val >>  8) & 0xFF);
203
+  Max7219_Set_Row(row + 0, (val      ) & 0xFF);
204
+}
129
 
205
 
130
-  void Max7219_init() {
131
-    uint8_t i, x, y;
206
+void Max7219_Set_Column(const uint8_t col, const uint8_t val) {
207
+  if (col > 7) {
208
+    SERIAL_ECHOPAIR("??? Max7219_Column(", (int)col);
209
+    SERIAL_ECHOPAIR(",", (int)val);
210
+    SERIAL_ECHOLNPGM(")");
211
+    return;
212
+  }
213
+  LEDs[col] = val;
214
+  Max7219(8 - col, LEDs[col]);
215
+}
132
 
216
 
133
-    SET_OUTPUT(MAX7219_DIN_PIN);
134
-    SET_OUTPUT(MAX7219_CLK_PIN);
217
+void Max7219_init() {
218
+  uint8_t i, x, y;
135
 
219
 
136
-    OUT_WRITE(MAX7219_LOAD_PIN, HIGH);
220
+  SET_OUTPUT(MAX7219_DIN_PIN);
221
+  SET_OUTPUT(MAX7219_CLK_PIN);
137
 
222
 
138
-    //initiation of the max 7219
139
-    Max7219(max7219_reg_scanLimit, 0x07);
140
-    Max7219(max7219_reg_decodeMode, 0x00);  // using an led matrix (not digits)
141
-    Max7219(max7219_reg_shutdown, 0x01);    // not in shutdown mode
142
-    Max7219(max7219_reg_displayTest, 0x00); // no display test
143
-    Max7219(max7219_reg_intensity, 0x01 & 0x0F); // the first 0x0F is the value you can set
144
-                                                 // range: 0x00 to 0x0F
145
-    for (i = 0; i <= 7; i++) {      // empty registers, turn all LEDs off
146
-      LEDs[i] = 0x00;
147
-      Max7219(i + 1, 0);
148
-    }
223
+  OUT_WRITE(MAX7219_LOAD_PIN, HIGH);
224
+  delay(1);
149
 
225
 
150
-    for (x = 0; x <= 7; x++)        // Do an aesthetically pleasing pattern to fully test
151
-      for (y = 0; y <= 7; y++) {    // the Max7219 module and LEDs. First, turn them
152
-        Max7219_LED_On(x, y);       // all on.
153
-        delay(3);
154
-      }
155
-
156
-    for (x = 0; x <= 7; x++)        // Now, turn them all off.
157
-      for (y = 0; y <= 7; y++) {
158
-        Max7219_LED_Off(x, y);
159
-        delay(3);                   // delay() is OK here. Max7219_init() is only called from
160
-      }                             // setup() and nothing is running yet.
161
-
162
-    delay(150);
163
-
164
-    for (x = 8; x--;)               // Now, do the same thing from the opposite direction
165
-      for (y = 0; y <= 7; y++) {
166
-        Max7219_LED_On(x, y);
167
-        delay(2);
168
-      }
169
-
170
-    for (x = 8; x--;)
171
-      for (y = 0; y <= 7; y++) {
172
-        Max7219_LED_Off(x, y);
173
-        delay(2);
174
-      }
226
+  //initiation of the max 7219
227
+  Max7219(max7219_reg_scanLimit, 0x07);
228
+  Max7219(max7219_reg_decodeMode, 0x00);  // using an led matrix (not digits)
229
+  Max7219(max7219_reg_shutdown, 0x01);    // not in shutdown mode
230
+  Max7219(max7219_reg_displayTest, 0x00); // no display test
231
+  Max7219(max7219_reg_intensity, 0x01 & 0x0F); // the first 0x0F is the value you can set
232
+                                               // range: 0x00 to 0x0F
233
+  for (i = 0; i <= 7; i++) {      // empty registers, turn all LEDs off
234
+    LEDs[i] = 0x00;
235
+    Max7219(i + 1, 0);
175
   }
236
   }
176
 
237
 
238
+  for (x = 0; x <= 7; x++)        // Do an aesthetically pleasing pattern to fully test
239
+    for (y = 0; y <= 7; y++) {    // the Max7219 module and LEDs. First, turn them
240
+      Max7219_LED_On(x, y);       // all on.
241
+      delay(3);
242
+    }
243
+
244
+  for (x = 0; x <= 7; x++)        // Now, turn them all off.
245
+    for (y = 0; y <= 7; y++) {
246
+      Max7219_LED_Off(x, y);
247
+      delay(3);                   // delay() is OK here. Max7219_init() is only called from
248
+    }                             // setup() and nothing is running yet.
249
+
250
+  delay(150);
251
+
252
+  for (x = 8; x--;)               // Now, do the same thing from the opposite direction
253
+    for (y = 0; y <= 7; y++) {
254
+      Max7219_LED_On(x, y);
255
+      delay(2);
256
+    }
257
+
258
+  for (x = 8; x--;)
259
+    for (y = 0; y <= 7; y++) {
260
+      Max7219_LED_Off(x, y);
261
+      delay(2);
262
+    }
263
+}
264
+
177
 /**
265
 /**
178
- * These are sample debug features to demonstrate the usage of the 8x8 LED Matrix for debug purposes.
179
- * There is very little CPU burden added to the system by displaying information within the idle()
180
- * task.
181
- *
182
- * But with that said, if your debugging can be facilitated by making calls into the library from
183
- * other places in the code, feel free to do it.  The CPU burden for a few calls to toggle an LED
184
- * or clear a row is not very significant.
185
- */
186
-  void Max7219_idle_tasks() {
187
-    #if ENABLED(MAX7219_DEBUG_PRINTER_ALIVE)
188
-      static int debug_cnt = 0;
189
-      if (debug_cnt++ > 100) {
190
-        Max7219_LED_Toggle(7, 7);
191
-        debug_cnt = 0;
192
-      }
193
-    #endif
194
-
195
-    #ifdef MAX7219_DEBUG_STEPPER_HEAD
196
-      Max7219_Clear_Row(MAX7219_DEBUG_STEPPER_HEAD);
197
-      Max7219_Clear_Row(MAX7219_DEBUG_STEPPER_HEAD + 1);
198
-      if ( planner.block_buffer_head < 8)
199
-        Max7219_LED_On( planner.block_buffer_head, MAX7219_DEBUG_STEPPER_HEAD);
266
+* These are sample debug features to demonstrate the usage of the 8x8 LED Matrix for debug purposes.
267
+* There is very little CPU burden added to the system by displaying information within the idle()
268
+* task.
269
+*
270
+* But with that said, if your debugging can be facilitated by making calls into the library from
271
+* other places in the code, feel free to do it.  The CPU burden for a few calls to toggle an LED
272
+* or clear a row is not very significant.
273
+*/
274
+void Max7219_idle_tasks() {
275
+#if MAX7219_DEBUG_STEPPER_HEAD || MAX7219_DEBUG_STEPPER_TAIL || MAX7219_DEBUG_STEPPER_QUEUE
276
+  CRITICAL_SECTION_START
277
+  #if MAX7219_DEBUG_STEPPER_HEAD || MAX7219_DEBUG_STEPPER_QUEUE
278
+    const uint8_t head = planner.block_buffer_head;
279
+  #endif
280
+  #if MAX7219_DEBUG_STEPPER_TAIL || MAX7219_DEBUG_STEPPER_QUEUE
281
+    const uint8_t tail = planner.block_buffer_tail;
282
+  #endif
283
+  CRITICAL_SECTION_END
284
+#endif
285
+
286
+  #if ENABLED(MAX7219_DEBUG_PRINTER_ALIVE)
287
+    static millis_t next_blink = 0;
288
+    if (ELAPSED(millis(), next_blink)) {
289
+      Max7219_LED_Toggle(7, 7);
290
+      next_blink = millis() + 750;
291
+    }
292
+  #endif
293
+
294
+  #ifdef MAX7219_DEBUG_STEPPER_HEAD
295
+    static int16_t last_head_cnt = 0;
296
+    if (last_head_cnt != head) {
297
+      if (last_head_cnt < 8)
298
+        Max7219_LED_Off(last_head_cnt, MAX7219_DEBUG_STEPPER_HEAD);
200
       else
299
       else
201
-        Max7219_LED_On( planner.block_buffer_head-8, MAX7219_DEBUG_STEPPER_HEAD+1);
202
-    #endif
203
-
204
-    #ifdef MAX7219_DEBUG_STEPPER_TAIL
205
-      Max7219_Clear_Row(MAX7219_DEBUG_STEPPER_TAIL);
206
-      Max7219_Clear_Row(MAX7219_DEBUG_STEPPER_TAIL + 1);
207
-      if ( planner.block_buffer_tail < 8)
208
-        Max7219_LED_On( planner.block_buffer_tail, MAX7219_DEBUG_STEPPER_TAIL );
300
+        Max7219_LED_Off(last_head_cnt - 8, MAX7219_DEBUG_STEPPER_HEAD + 1);
301
+
302
+      last_head_cnt = head;
303
+      if (head < 8)
304
+        Max7219_LED_On(head, MAX7219_DEBUG_STEPPER_HEAD);
209
       else
305
       else
210
-        Max7219_LED_On( planner.block_buffer_tail-8, MAX7219_DEBUG_STEPPER_TAIL+1 );
211
-    #endif
212
-
213
-    #ifdef MAX7219_DEBUG_STEPPER_QUEUE
214
-      static int16_t last_depth = 0;
215
-      int16_t current_depth = planner.block_buffer_head - planner.block_buffer_tail;
216
-      if (current_depth != last_depth) {  // usually, no update will be needed.
217
-        if (current_depth < 0) current_depth += BLOCK_BUFFER_SIZE;
218
-        NOMORE(current_depth, BLOCK_BUFFER_SIZE);
219
-        NOMORE(current_depth, 16);        // if the BLOCK_BUFFER_SIZE is greater than 16, two lines
220
-                                          // of LEDs is enough to see if the buffer is draining
221
-
222
-        const uint8_t st = min(current_depth, last_depth),
223
-                      en = max(current_depth, last_depth);
224
-        if (current_depth < last_depth)
225
-          for (uint8_t i = st; i <= en; i++)   // clear the highest order LEDs
226
-            Max7219_LED_Off(i >> 1, MAX7219_DEBUG_STEPPER_QUEUE + (i & 1));
227
-        else
228
-          for (uint8_t i = st; i <= en; i++)   // set the highest order LEDs
229
-            Max7219_LED_On(i >> 1, MAX7219_DEBUG_STEPPER_QUEUE + (i & 1));
230
-
231
-        last_depth = current_depth;
232
-      }
233
-    #endif
234
-  }
306
+        Max7219_LED_On(head - 8, MAX7219_DEBUG_STEPPER_HEAD + 1);
307
+    }
308
+  #endif
309
+
310
+  #ifdef MAX7219_DEBUG_STEPPER_TAIL
311
+    static int16_t last_tail_cnt = 0;
312
+    if (last_tail_cnt != tail) {
313
+      if (last_tail_cnt < 8)
314
+        Max7219_LED_Off(last_tail_cnt, MAX7219_DEBUG_STEPPER_TAIL);
315
+      else
316
+        Max7219_LED_Off(last_tail_cnt - 8, MAX7219_DEBUG_STEPPER_TAIL + 1);
317
+
318
+      last_tail_cnt = tail;
319
+      if (tail < 8)
320
+        Max7219_LED_On(tail, MAX7219_DEBUG_STEPPER_TAIL);
321
+      else
322
+        Max7219_LED_On(tail - 8, MAX7219_DEBUG_STEPPER_TAIL + 1);
323
+    }
324
+  #endif
325
+
326
+  #ifdef MAX7219_DEBUG_STEPPER_QUEUE
327
+    static int16_t last_depth = 0;
328
+    int16_t current_depth = head - tail;
329
+    if (current_depth != last_depth) {  // usually, no update will be needed.
330
+      if (current_depth < 0) current_depth += BLOCK_BUFFER_SIZE;
331
+      NOMORE(current_depth, BLOCK_BUFFER_SIZE);
332
+      NOMORE(current_depth, 16);        // if the BLOCK_BUFFER_SIZE is greater than 16, two lines
333
+                                        // of LEDs is enough to see if the buffer is draining
334
+
335
+      const uint8_t st = min(current_depth, last_depth),
336
+                    en = max(current_depth, last_depth);
337
+      if (current_depth < last_depth)
338
+        for (uint8_t i = st; i <= en; i++)   // clear the highest order LEDs
339
+          Max7219_LED_Off(i / 2, MAX7219_DEBUG_STEPPER_QUEUE + (i & 1));
340
+      else
341
+        for (uint8_t i = st; i <= en; i++)   // set the LEDs to current depth
342
+          Max7219_LED_On(i / 2, MAX7219_DEBUG_STEPPER_QUEUE + (i & 1));
343
+
344
+      last_depth = current_depth;
345
+    }
346
+  #endif
347
+}
235
 
348
 
236
 #endif // MAX7219_DEBUG
349
 #endif // MAX7219_DEBUG

+ 33
- 31
Marlin/Max7219_Debug_LEDs.h Переглянути файл

40
  * void Max7219_PutByte(uint8_t data);
40
  * void Max7219_PutByte(uint8_t data);
41
  * void Max7219(uint8_t reg, uint8_t data);
41
  * void Max7219(uint8_t reg, uint8_t data);
42
  * void Max7219_LED_Set(uint8_t row, uint8_t col, bool on);
42
  * void Max7219_LED_Set(uint8_t row, uint8_t col, bool on);
43
- * void Max7219_LED_On(uint8_t row, uint8_t col);
44
- * void Max7219_LED_Off(uint8_t row, uint8_t col);
43
+ * void Max7219_LED_On(uint8_t col, uint8_t row);
44
+ * void Max7219_LED_Off(uint8_t col, uint8_t row);
45
  * void Max7219_LED_Toggle(uint8_t row, uint8_t col);
45
  * void Max7219_LED_Toggle(uint8_t row, uint8_t col);
46
  * void Max7219_Clear_Row(uint8_t row);
46
  * void Max7219_Clear_Row(uint8_t row);
47
  * void Max7219_Clear_Column(uint8_t col);
47
  * void Max7219_Clear_Column(uint8_t col);
48
  * void Max7219_Set_Row(uint8_t row, uint8_t val);
48
  * void Max7219_Set_Row(uint8_t row, uint8_t val);
49
+ * void Max7219_Set_2_Rows(uint8_t row, uint16_t val);
50
+ * void Max7219_Set_4_Rows(uint8_t row, uint32_t val);
49
  * void Max7219_Set_Column(uint8_t col, uint8_t val);
51
  * void Max7219_Set_Column(uint8_t col, uint8_t val);
50
  * void Max7219_idle_tasks();
52
  * void Max7219_idle_tasks();
51
  */
53
  */
53
 #ifndef __MAX7219_DEBUG_LEDS_H__
55
 #ifndef __MAX7219_DEBUG_LEDS_H__
54
 #define __MAX7219_DEBUG_LEDS_H__
56
 #define __MAX7219_DEBUG_LEDS_H__
55
 
57
 
56
-  //
57
-  // define max7219 registers
58
-  //
59
-  #define max7219_reg_noop        0x00
60
-  #define max7219_reg_digit0      0x01
61
-  #define max7219_reg_digit1      0x02
62
-  #define max7219_reg_digit2      0x03
63
-  #define max7219_reg_digit3      0x04
64
-  #define max7219_reg_digit4      0x05
65
-  #define max7219_reg_digit5      0x06
66
-  #define max7219_reg_digit6      0x07
67
-  #define max7219_reg_digit7      0x08
58
+//
59
+// define max7219 registers
60
+//
61
+#define max7219_reg_noop        0x00
62
+#define max7219_reg_digit0      0x01
63
+#define max7219_reg_digit1      0x02
64
+#define max7219_reg_digit2      0x03
65
+#define max7219_reg_digit3      0x04
66
+#define max7219_reg_digit4      0x05
67
+#define max7219_reg_digit5      0x06
68
+#define max7219_reg_digit6      0x07
69
+#define max7219_reg_digit7      0x08
68
 
70
 
69
-  #define max7219_reg_intensity   0x0A
70
-  #define max7219_reg_displayTest 0x0F
71
-  #define max7219_reg_decodeMode  0x09
72
-  #define max7219_reg_scanLimit   0x0B
73
-  #define max7219_reg_shutdown    0x0C
71
+#define max7219_reg_intensity   0x0A
72
+#define max7219_reg_displayTest 0x0F
73
+#define max7219_reg_decodeMode  0x09
74
+#define max7219_reg_scanLimit   0x0B
75
+#define max7219_reg_shutdown    0x0C
74
 
76
 
75
-  void Max7219_init();
76
-  void Max7219_PutByte(uint8_t data);
77
-  void Max7219(const uint8_t reg, const uint8_t data);
78
-  void Max7219_LED_Set(const uint8_t row, const uint8_t col, const bool on);
79
-  void Max7219_LED_On(const uint8_t row, const uint8_t col);
80
-  void Max7219_LED_Off(const uint8_t row, const uint8_t col);
81
-  void Max7219_LED_Toggle(const uint8_t row, const uint8_t col);
82
-  void Max7219_Clear_Row(const uint8_t row);
83
-  void Max7219_Clear_Column(const uint8_t col);
84
-  void Max7219_Set_Row(const uint8_t row, const uint8_t val);
85
-  void Max7219_Set_Column(const uint8_t col, const uint8_t val);
86
-  void Max7219_idle_tasks();
77
+void Max7219_init();
78
+void Max7219_PutByte(uint8_t data);
79
+void Max7219(const uint8_t reg, const uint8_t data);
80
+void Max7219_LED_Set(const uint8_t row, const uint8_t col, const bool on);
81
+void Max7219_LED_On(const uint8_t row, const uint8_t col);
82
+void Max7219_LED_Off(const uint8_t row, const uint8_t col);
83
+void Max7219_LED_Toggle(const uint8_t row, const uint8_t col);
84
+void Max7219_Clear_Row(const uint8_t row);
85
+void Max7219_Clear_Column(const uint8_t col);
86
+void Max7219_Set_Row(const uint8_t row, const uint8_t val);
87
+void Max7219_Set_Column(const uint8_t col, const uint8_t val);
88
+void Max7219_idle_tasks();
87
 
89
 
88
 #endif // __MAX7219_DEBUG_LEDS_H__
90
 #endif // __MAX7219_DEBUG_LEDS_H__

+ 267
- 76
Marlin/SanityCheck.h Переглянути файл

78
   #error "FILAMENT_SENSOR is deprecated. Use FILAMENT_WIDTH_SENSOR instead."
78
   #error "FILAMENT_SENSOR is deprecated. Use FILAMENT_WIDTH_SENSOR instead."
79
 #elif defined(DISABLE_MAX_ENDSTOPS) || defined(DISABLE_MIN_ENDSTOPS)
79
 #elif defined(DISABLE_MAX_ENDSTOPS) || defined(DISABLE_MIN_ENDSTOPS)
80
   #error "DISABLE_MAX_ENDSTOPS and DISABLE_MIN_ENDSTOPS deprecated. Use individual USE_*_PLUG options instead."
80
   #error "DISABLE_MAX_ENDSTOPS and DISABLE_MIN_ENDSTOPS deprecated. Use individual USE_*_PLUG options instead."
81
-#elif ENABLED(Z_DUAL_ENDSTOPS) && !defined(Z2_USE_ENDSTOP)
82
-  #error "Z_DUAL_ENDSTOPS settings are simplified. Just set Z2_USE_ENDSTOP to the endstop you want to repurpose for Z2."
83
 #elif defined(LANGUAGE_INCLUDE)
81
 #elif defined(LANGUAGE_INCLUDE)
84
   #error "LANGUAGE_INCLUDE has been replaced by LCD_LANGUAGE. Please update your configuration."
82
   #error "LANGUAGE_INCLUDE has been replaced by LCD_LANGUAGE. Please update your configuration."
85
 #elif defined(EXTRUDER_OFFSET_X) || defined(EXTRUDER_OFFSET_Y)
83
 #elif defined(EXTRUDER_OFFSET_X) || defined(EXTRUDER_OFFSET_Y)
182
   #error "MESH_NUM_[XY]_POINTS is now GRID_MAX_POINTS_[XY]. Please update your configuration."
180
   #error "MESH_NUM_[XY]_POINTS is now GRID_MAX_POINTS_[XY]. Please update your configuration."
183
 #elif defined(UBL_MESH_NUM_X_POINTS) || defined(UBL_MESH_NUM_Y_POINTS)
181
 #elif defined(UBL_MESH_NUM_X_POINTS) || defined(UBL_MESH_NUM_Y_POINTS)
184
   #error "UBL_MESH_NUM_[XY]_POINTS is now GRID_MAX_POINTS_[XY]. Please update your configuration."
182
   #error "UBL_MESH_NUM_[XY]_POINTS is now GRID_MAX_POINTS_[XY]. Please update your configuration."
183
+#elif defined(UBL_G26_MESH_VALIDATION)
184
+  #error "UBL_G26_MESH_VALIDATION is now G26_MESH_VALIDATION. Please update your configuration."
185
 #elif defined(UBL_MESH_EDIT_ENABLED)
185
 #elif defined(UBL_MESH_EDIT_ENABLED)
186
-  #error "UBL_MESH_EDIT_ENABLED is now UBL_G26_MESH_VALIDATION. Please update your configuration."
186
+  #error "UBL_MESH_EDIT_ENABLED is now G26_MESH_VALIDATION. Please update your configuration."
187
 #elif defined(UBL_MESH_EDITING)
187
 #elif defined(UBL_MESH_EDITING)
188
-  #error "UBL_MESH_EDITING is now UBL_G26_MESH_VALIDATION. Please update your configuration."
188
+  #error "UBL_MESH_EDITING is now G26_MESH_VALIDATION. Please update your configuration."
189
 #elif defined(BLTOUCH_HEATERS_OFF)
189
 #elif defined(BLTOUCH_HEATERS_OFF)
190
   #error "BLTOUCH_HEATERS_OFF is now PROBING_HEATERS_OFF. Please update your configuration."
190
   #error "BLTOUCH_HEATERS_OFF is now PROBING_HEATERS_OFF. Please update your configuration."
191
 #elif defined(BEEPER)
191
 #elif defined(BEEPER)
212
   #error "ADVANCE was removed in Marlin 1.1.6. Please use LIN_ADVANCE."
212
   #error "ADVANCE was removed in Marlin 1.1.6. Please use LIN_ADVANCE."
213
 #elif defined(NEOPIXEL_RGBW_LED)
213
 #elif defined(NEOPIXEL_RGBW_LED)
214
   #error "NEOPIXEL_RGBW_LED is now NEOPIXEL_LED. Please update your configuration."
214
   #error "NEOPIXEL_RGBW_LED is now NEOPIXEL_LED. Please update your configuration."
215
+#elif defined(UBL_MESH_INSET)
216
+  #error "UBL_MESH_INSET is now just MESH_INSET. Please update your configuration."
217
+#elif defined(UBL_MESH_MIN_X) || defined(UBL_MESH_MIN_Y) || defined(UBL_MESH_MAX_X)  || defined(UBL_MESH_MAX_Y)
218
+  #error "UBL_MESH_(MIN|MAX)_[XY] is now just MESH_(MIN|MAX)_[XY]. Please update your configuration."
219
+#elif defined(ENABLE_MESH_EDIT_GFX_OVERLAY)
220
+  #error "ENABLE_MESH_EDIT_GFX_OVERLAY is now MESH_EDIT_GFX_OVERLAY. Please update your configuration."
221
+#elif defined(BABYSTEP_ZPROBE_GFX_REVERSE)
222
+  #error "BABYSTEP_ZPROBE_GFX_REVERSE is now set by OVERLAY_GFX_REVERSE. Please update your configurations."
223
+#elif defined(UBL_GRANULAR_SEGMENTATION_FOR_CARTESIAN)
224
+  #error "UBL_GRANULAR_SEGMENTATION_FOR_CARTESIAN is now SEGMENT_LEVELED_MOVES. Please update your configuration."
225
+#elif HAS_PID_HEATING && (defined(K1) || !defined(PID_K1))
226
+  #error "K1 is now PID_K1. Please update your configuration."
227
+#elif defined(PROBE_DOUBLE_TOUCH)
228
+  #error "PROBE_DOUBLE_TOUCH is now MULTIPLE_PROBING. Please update your configuration."
229
+#elif defined(ANET_KEYPAD_LCD)
230
+  #error "ANET_KEYPAD_LCD is now ZONESTAR_LCD. Please update your configuration."
215
 #endif
231
 #endif
216
 
232
 
217
 /**
233
 /**
236
 #endif
252
 #endif
237
 
253
 
238
 /**
254
 /**
255
+ * Serial
256
+ */
257
+#if defined(USBCON) && ENABLED(SERIAL_XON_XOFF)
258
+  #error "SERIAL_XON_XOFF is not supported on USB-native AVR devices."
259
+#endif
260
+
261
+/**
239
  * Dual Stepper Drivers
262
  * Dual Stepper Drivers
240
  */
263
  */
241
 #if ENABLED(X_DUAL_STEPPER_DRIVERS) && ENABLED(DUAL_X_CARRIAGE)
264
 #if ENABLED(X_DUAL_STEPPER_DRIVERS) && ENABLED(DUAL_X_CARRIAGE)
255
   "Movement bounds ([XY]_MIN_POS, [XY]_MAX_POS) are too narrow to contain [XY]_BED_SIZE.");
278
   "Movement bounds ([XY]_MIN_POS, [XY]_MAX_POS) are too narrow to contain [XY]_BED_SIZE.");
256
 
279
 
257
 /**
280
 /**
281
+ * Granular software endstops (Marlin >= 1.1.7)
282
+ */
283
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) && DISABLED(MIN_SOFTWARE_ENDSTOP_Z)
284
+  #if IS_KINEMATIC
285
+    #error "MIN_SOFTWARE_ENDSTOPS on DELTA/SCARA also requires MIN_SOFTWARE_ENDSTOP_Z."
286
+  #elif DISABLED(MIN_SOFTWARE_ENDSTOP_X) && DISABLED(MIN_SOFTWARE_ENDSTOP_Y)
287
+    #error "MIN_SOFTWARE_ENDSTOPS requires at least one of the MIN_SOFTWARE_ENDSTOP_[XYZ] options."
288
+  #endif
289
+#endif
290
+
291
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS) && DISABLED(MAX_SOFTWARE_ENDSTOP_Z)
292
+  #if IS_KINEMATIC
293
+    #error "MAX_SOFTWARE_ENDSTOPS on DELTA/SCARA also requires MAX_SOFTWARE_ENDSTOP_Z."
294
+  #elif DISABLED(MAX_SOFTWARE_ENDSTOP_X) && DISABLED(MAX_SOFTWARE_ENDSTOP_Y)
295
+    #error "MAX_SOFTWARE_ENDSTOPS requires at least one of the MAX_SOFTWARE_ENDSTOP_[XYZ] options."
296
+  #endif
297
+#endif
298
+
299
+/**
258
  * Progress Bar
300
  * Progress Bar
259
  */
301
  */
260
 #if ENABLED(LCD_PROGRESS_BAR)
302
 #if ENABLED(LCD_PROGRESS_BAR)
261
   #if DISABLED(SDSUPPORT)
303
   #if DISABLED(SDSUPPORT)
262
     #error "LCD_PROGRESS_BAR requires SDSUPPORT."
304
     #error "LCD_PROGRESS_BAR requires SDSUPPORT."
305
+  #elif DISABLED(ULTRA_LCD)
306
+    #error "LCD_PROGRESS_BAR requires a character LCD."
263
   #elif ENABLED(DOGLCD)
307
   #elif ENABLED(DOGLCD)
264
     #error "LCD_PROGRESS_BAR does not apply to graphical displays."
308
     #error "LCD_PROGRESS_BAR does not apply to graphical displays."
265
   #elif ENABLED(FILAMENT_LCD_DISPLAY)
309
   #elif ENABLED(FILAMENT_LCD_DISPLAY)
266
     #error "LCD_PROGRESS_BAR and FILAMENT_LCD_DISPLAY are not fully compatible. Comment out this line to use both."
310
     #error "LCD_PROGRESS_BAR and FILAMENT_LCD_DISPLAY are not fully compatible. Comment out this line to use both."
267
   #endif
311
   #endif
312
+#elif ENABLED(LCD_SET_PROGRESS_MANUALLY) && DISABLED(DOGLCD)
313
+  #error "LCD_SET_PROGRESS_MANUALLY requires LCD_PROGRESS_BAR or Graphical LCD."
268
 #endif
314
 #endif
269
 
315
 
270
 /**
316
 /**
282
       #error "SDSORT_CACHE_NAMES requires SDSORT_USES_RAM (which reads the directory into RAM)."
328
       #error "SDSORT_CACHE_NAMES requires SDSORT_USES_RAM (which reads the directory into RAM)."
283
     #endif
329
     #endif
284
   #endif
330
   #endif
331
+
332
+  #if ENABLED(SDSORT_CACHE_NAMES) && DISABLED(SDSORT_DYNAMIC_RAM)
333
+    #if SDSORT_CACHE_VFATS < 2
334
+      #error "SDSORT_CACHE_VFATS must be 2 or greater!"
335
+    #elif SDSORT_CACHE_VFATS > MAX_VFAT_ENTRIES
336
+      #undef SDSORT_CACHE_VFATS
337
+      #define SDSORT_CACHE_VFATS MAX_VFAT_ENTRIES
338
+      #warning "SDSORT_CACHE_VFATS was reduced to MAX_VFAT_ENTRIES!"
339
+    #endif
340
+  #endif
285
 #endif
341
 #endif
286
 
342
 
287
 /**
343
 /**
532
  * Delta requirements
588
  * Delta requirements
533
  */
589
  */
534
 #if ENABLED(DELTA)
590
 #if ENABLED(DELTA)
535
-  #if DISABLED(USE_XMAX_PLUG) && DISABLED(USE_YMAX_PLUG) && DISABLED(USE_ZMAX_PLUG)
591
+  #if HAS_BED_PROBE && ENABLED(Z_MIN_PROBE_ENDSTOP)
592
+    #error "Delta probably shouldn't use Z_MIN_PROBE_ENDSTOP. Comment out this line to continue."
593
+  #elif DISABLED(USE_XMAX_PLUG) && DISABLED(USE_YMAX_PLUG) && DISABLED(USE_ZMAX_PLUG)
536
     #error "You probably want to use Max Endstops for DELTA!"
594
     #error "You probably want to use Max Endstops for DELTA!"
537
-  #elif ENABLED(ENABLE_LEVELING_FADE_HEIGHT) && DISABLED(AUTO_BED_LEVELING_BILINEAR) && !UBL_DELTA
595
+  #elif ENABLED(ENABLE_LEVELING_FADE_HEIGHT) && DISABLED(AUTO_BED_LEVELING_BILINEAR) && !UBL_SEGMENTED
538
     #error "ENABLE_LEVELING_FADE_HEIGHT on DELTA requires AUTO_BED_LEVELING_BILINEAR or AUTO_BED_LEVELING_UBL."
596
     #error "ENABLE_LEVELING_FADE_HEIGHT on DELTA requires AUTO_BED_LEVELING_BILINEAR or AUTO_BED_LEVELING_UBL."
539
-  #elif ENABLED(DELTA_AUTO_CALIBRATION) && !PROBE_SELECTED
540
-    #error "DELTA_AUTO_CALIBRATION requires a probe: PROBE_MANUALLY, FIX_MOUNTED_PROBE, BLTOUCH, SOLENOID_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, Z Servo."
541
-  #elif ENABLED(DELTA_AUTO_CALIBRATION) && ENABLED(PROBE_MANUALLY) && DISABLED(ULTIPANEL)
542
-    #error "DELTA_AUTO_CALIBRATION requires an LCD controller with PROBE_MANUALLY."
597
+  #elif ENABLED(DELTA_AUTO_CALIBRATION) && !(HAS_BED_PROBE || ENABLED(ULTIPANEL))
598
+    #error "DELTA_AUTO_CALIBRATION requires either a probe or an LCD Controller."
543
   #elif ABL_GRID
599
   #elif ABL_GRID
544
     #if (GRID_MAX_POINTS_X & 1) == 0 || (GRID_MAX_POINTS_Y & 1) == 0
600
     #if (GRID_MAX_POINTS_X & 1) == 0 || (GRID_MAX_POINTS_Y & 1) == 0
545
       #error "DELTA requires GRID_MAX_POINTS_X and GRID_MAX_POINTS_Y to be odd numbers."
601
       #error "DELTA requires GRID_MAX_POINTS_X and GRID_MAX_POINTS_Y to be odd numbers."
581
   , "Please enable only one probe option: PROBE_MANUALLY, FIX_MOUNTED_PROBE, BLTOUCH, SOLENOID_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or Z Servo."
637
   , "Please enable only one probe option: PROBE_MANUALLY, FIX_MOUNTED_PROBE, BLTOUCH, SOLENOID_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or Z Servo."
582
 );
638
 );
583
 
639
 
584
-#if PROBE_SELECTED
640
+#if HAS_BED_PROBE
585
 
641
 
586
   /**
642
   /**
587
    * Z_PROBE_SLED is incompatible with DELTA
643
    * Z_PROBE_SLED is incompatible with DELTA
629
     #if !HAS_Z_MIN_PROBE_PIN
685
     #if !HAS_Z_MIN_PROBE_PIN
630
       #error "Z_MIN_PROBE_ENDSTOP requires the Z_MIN_PROBE_PIN to be defined."
686
       #error "Z_MIN_PROBE_ENDSTOP requires the Z_MIN_PROBE_PIN to be defined."
631
     #endif
687
     #endif
632
-  #elif DISABLED(PROBE_MANUALLY)
688
+  #else
633
     #error "You must enable either Z_MIN_PROBE_ENDSTOP or Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN to use a probe."
689
     #error "You must enable either Z_MIN_PROBE_ENDSTOP or Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN to use a probe."
634
   #endif
690
   #endif
635
 
691
 
636
   /**
692
   /**
637
    * Make sure Z raise values are set
693
    * Make sure Z raise values are set
638
    */
694
    */
639
-  #if !defined(Z_CLEARANCE_DEPLOY_PROBE)
695
+  #ifndef Z_CLEARANCE_DEPLOY_PROBE
640
     #error "You must define Z_CLEARANCE_DEPLOY_PROBE in your configuration."
696
     #error "You must define Z_CLEARANCE_DEPLOY_PROBE in your configuration."
641
   #elif !defined(Z_CLEARANCE_BETWEEN_PROBES)
697
   #elif !defined(Z_CLEARANCE_BETWEEN_PROBES)
642
     #error "You must define Z_CLEARANCE_BETWEEN_PROBES in your configuration."
698
     #error "You must define Z_CLEARANCE_BETWEEN_PROBES in your configuration."
646
     #error "Probes need Z_CLEARANCE_BETWEEN_PROBES >= 0."
702
     #error "Probes need Z_CLEARANCE_BETWEEN_PROBES >= 0."
647
   #endif
703
   #endif
648
 
704
 
705
+  #if MULTIPLE_PROBING && MULTIPLE_PROBING < 2
706
+    #error "MULTIPLE_PROBING must be >= 2."
707
+  #endif
708
+
649
 #else
709
 #else
650
 
710
 
651
   /**
711
   /**
652
    * Require some kind of probe for bed leveling and probe testing
712
    * Require some kind of probe for bed leveling and probe testing
653
    */
713
    */
654
-  #if HAS_ABL && DISABLED(AUTO_BED_LEVELING_UBL)
714
+  #if OLDSCHOOL_ABL && !PROBE_SELECTED
655
     #error "Auto Bed Leveling requires one of these: PROBE_MANUALLY, FIX_MOUNTED_PROBE, BLTOUCH, SOLENOID_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or a Z Servo."
715
     #error "Auto Bed Leveling requires one of these: PROBE_MANUALLY, FIX_MOUNTED_PROBE, BLTOUCH, SOLENOID_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or a Z Servo."
656
   #endif
716
   #endif
657
 
717
 
658
-#endif
718
+  #if ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST)
719
+    #error "Z_MIN_PROBE_REPEATABILITY_TEST requires a probe: FIX_MOUNTED_PROBE, BLTOUCH, SOLENOID_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or Z Servo."
720
+  #endif
659
 
721
 
660
-#if ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST) && !HAS_BED_PROBE
661
-  #error "Z_MIN_PROBE_REPEATABILITY_TEST requires a probe: FIX_MOUNTED_PROBE, BLTOUCH, SOLENOID_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or Z Servo."
662
 #endif
722
 #endif
663
 
723
 
664
 /**
724
 /**
693
    * Unified Bed Leveling
753
    * Unified Bed Leveling
694
    */
754
    */
695
 
755
 
756
+  // Hide PROBE_MANUALLY from the rest of the code
757
+  #undef PROBE_MANUALLY
758
+
696
   #if IS_SCARA
759
   #if IS_SCARA
697
     #error "AUTO_BED_LEVELING_UBL does not yet support SCARA printers."
760
     #error "AUTO_BED_LEVELING_UBL does not yet support SCARA printers."
698
   #elif DISABLED(EEPROM_SETTINGS)
761
   #elif DISABLED(EEPROM_SETTINGS)
708
     static_assert(WITHIN(UBL_PROBE_PT_3_Y, MIN_PROBE_Y, MAX_PROBE_Y), "UBL_PROBE_PT_3_Y can't be reached by the Z probe.");
771
     static_assert(WITHIN(UBL_PROBE_PT_3_Y, MIN_PROBE_Y, MAX_PROBE_Y), "UBL_PROBE_PT_3_Y can't be reached by the Z probe.");
709
   #endif
772
   #endif
710
 
773
 
711
-#elif HAS_ABL
774
+#elif OLDSCHOOL_ABL
712
 
775
 
713
   /**
776
   /**
714
    * Auto Bed Leveling
777
    * Auto Bed Leveling
757
 
820
 
758
 #elif ENABLED(MESH_BED_LEVELING)
821
 #elif ENABLED(MESH_BED_LEVELING)
759
 
822
 
823
+  // Hide PROBE_MANUALLY from the rest of the code
824
+  #undef PROBE_MANUALLY
825
+
760
   /**
826
   /**
761
    * Mesh Bed Leveling
827
    * Mesh Bed Leveling
762
    */
828
    */
763
 
829
 
764
   #if ENABLED(DELTA)
830
   #if ENABLED(DELTA)
765
-    #error "MESH_BED_LEVELING does not yet support DELTA printers."
831
+    #error "MESH_BED_LEVELING is not compatible with DELTA printers."
766
   #elif GRID_MAX_POINTS_X > 9 || GRID_MAX_POINTS_Y > 9
832
   #elif GRID_MAX_POINTS_X > 9 || GRID_MAX_POINTS_Y > 9
767
     #error "GRID_MAX_POINTS_X and GRID_MAX_POINTS_Y must be less than 10 for MBL."
833
     #error "GRID_MAX_POINTS_X and GRID_MAX_POINTS_Y must be less than 10 for MBL."
768
   #endif
834
   #endif
769
 
835
 
770
 #endif
836
 #endif
771
 
837
 
838
+#if !HAS_MESH && ENABLED(G26_MESH_VALIDATION)
839
+  #error "G26_MESH_VALIDATION requires MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, or AUTO_BED_LEVELING_UBL."
840
+#endif
841
+
842
+#if ENABLED(MESH_EDIT_GFX_OVERLAY) && (DISABLED(AUTO_BED_LEVELING_UBL) || DISABLED(DOGLCD))
843
+  #error "MESH_EDIT_GFX_OVERLAY requires AUTO_BED_LEVELING_UBL and a Graphical LCD."
844
+#endif
845
+
772
 /**
846
 /**
773
  * LCD_BED_LEVELING requirements
847
  * LCD_BED_LEVELING requirements
774
  */
848
  */
775
 #if ENABLED(LCD_BED_LEVELING)
849
 #if ENABLED(LCD_BED_LEVELING)
776
   #if DISABLED(ULTIPANEL)
850
   #if DISABLED(ULTIPANEL)
777
     #error "LCD_BED_LEVELING requires an LCD controller."
851
     #error "LCD_BED_LEVELING requires an LCD controller."
778
-  #elif DISABLED(MESH_BED_LEVELING) && !(HAS_ABL && ENABLED(PROBE_MANUALLY))
779
-    #error "LCD_BED_LEVELING requires MESH_BED_LEVELING or PROBE_MANUALLY with auto bed leveling enabled."
852
+  #elif !(ENABLED(MESH_BED_LEVELING) || (OLDSCHOOL_ABL && ENABLED(PROBE_MANUALLY)))
853
+    #error "LCD_BED_LEVELING requires MESH_BED_LEVELING or ABL with PROBE_MANUALLY."
780
   #endif
854
   #endif
781
 #endif
855
 #endif
782
 
856
 
1007
 /**
1081
 /**
1008
  * Test Extruder Stepper Pins
1082
  * Test Extruder Stepper Pins
1009
  */
1083
  */
1010
-#if E_STEPPERS > 4
1011
-  #if !PIN_EXISTS(E4_STEP) || !PIN_EXISTS(E4_DIR) || !PIN_EXISTS(E4_ENABLE)
1012
-    #error "E4_STEP_PIN, E4_DIR_PIN, or E4_ENABLE_PIN not defined for this board."
1013
-  #endif
1014
-#elif E_STEPPERS > 3
1015
-  #if !PIN_EXISTS(E3_STEP) || !PIN_EXISTS(E3_DIR) || !PIN_EXISTS(E3_ENABLE)
1016
-    #error "E3_STEP_PIN, E3_DIR_PIN, or E3_ENABLE_PIN not defined for this board."
1017
-  #endif
1018
-#elif E_STEPPERS > 2
1019
-  #if !PIN_EXISTS(E2_STEP) || !PIN_EXISTS(E2_DIR) || !PIN_EXISTS(E2_ENABLE)
1020
-    #error "E2_STEP_PIN, E2_DIR_PIN, or E2_ENABLE_PIN not defined for this board."
1021
-  #endif
1022
-#elif E_STEPPERS > 1
1023
-  #if !PIN_EXISTS(E1_STEP) || !PIN_EXISTS(E1_DIR) || !PIN_EXISTS(E1_ENABLE)
1024
-    #error "E1_STEP_PIN, E1_DIR_PIN, or E1_ENABLE_PIN not defined for this board."
1084
+#if DISABLED(MK2_MULTIPLEXER) // MK2_MULTIPLEXER uses E0 stepper only
1085
+  #if E_STEPPERS > 4
1086
+    #if !PIN_EXISTS(E4_STEP) || !PIN_EXISTS(E4_DIR) || !PIN_EXISTS(E4_ENABLE)
1087
+      #error "E4_STEP_PIN, E4_DIR_PIN, or E4_ENABLE_PIN not defined for this board."
1088
+    #endif
1089
+  #elif E_STEPPERS > 3
1090
+    #if !PIN_EXISTS(E3_STEP) || !PIN_EXISTS(E3_DIR) || !PIN_EXISTS(E3_ENABLE)
1091
+      #error "E3_STEP_PIN, E3_DIR_PIN, or E3_ENABLE_PIN not defined for this board."
1092
+    #endif
1093
+  #elif E_STEPPERS > 2
1094
+    #if !PIN_EXISTS(E2_STEP) || !PIN_EXISTS(E2_DIR) || !PIN_EXISTS(E2_ENABLE)
1095
+      #error "E2_STEP_PIN, E2_DIR_PIN, or E2_ENABLE_PIN not defined for this board."
1096
+    #endif
1097
+  #elif E_STEPPERS > 1
1098
+    #if !PIN_EXISTS(E1_STEP) || !PIN_EXISTS(E1_DIR) || !PIN_EXISTS(E1_ENABLE)
1099
+      #error "E1_STEP_PIN, E1_DIR_PIN, or E1_ENABLE_PIN not defined for this board."
1100
+    #endif
1025
   #endif
1101
   #endif
1026
 #endif
1102
 #endif
1027
-
1028
 /**
1103
 /**
1029
- * Endstops
1104
+ * Endstop Tests
1030
  */
1105
  */
1031
-#if DISABLED(USE_XMIN_PLUG) && DISABLED(USE_XMAX_PLUG) && !(ENABLED(Z_DUAL_ENDSTOPS) && WITHIN(Z2_USE_ENDSTOP, _XMAX_, _XMIN_))
1032
- #error "You must enable USE_XMIN_PLUG or USE_XMAX_PLUG."
1033
-#elif DISABLED(USE_YMIN_PLUG) && DISABLED(USE_YMAX_PLUG) && !(ENABLED(Z_DUAL_ENDSTOPS) && WITHIN(Z2_USE_ENDSTOP, _YMAX_, _YMIN_))
1034
- #error "You must enable USE_YMIN_PLUG or USE_YMAX_PLUG."
1035
-#elif DISABLED(USE_ZMIN_PLUG) && DISABLED(USE_ZMAX_PLUG) && !(ENABLED(Z_DUAL_ENDSTOPS) && WITHIN(Z2_USE_ENDSTOP, _ZMAX_, _ZMIN_))
1036
- #error "You must enable USE_ZMIN_PLUG or USE_ZMAX_PLUG."
1037
-#elif ENABLED(Z_DUAL_ENDSTOPS)
1038
-  #if !Z2_USE_ENDSTOP
1039
-    #error "You must set Z2_USE_ENDSTOP with Z_DUAL_ENDSTOPS."
1040
-  #elif Z2_MAX_PIN == 0 && Z2_MIN_PIN == 0
1041
-    #error "Z2_USE_ENDSTOP has been assigned to a nonexistent endstop!"
1042
-  #elif ENABLED(DELTA)
1043
-    #error "Z_DUAL_ENDSTOPS is not compatible with DELTA."
1044
-  #endif
1045
-#elif !IS_SCARA
1106
+
1107
+#define _PLUG_UNUSED_TEST(AXIS,PLUG) (DISABLED(USE_##PLUG##MIN_PLUG) && DISABLED(USE_##PLUG##MAX_PLUG) && !(ENABLED(AXIS##_DUAL_ENDSTOPS) && WITHIN(AXIS##2_USE_ENDSTOP, _##PLUG##MAX_, _##PLUG##MIN_)))
1108
+#define _AXIS_PLUG_UNUSED_TEST(AXIS) (_PLUG_UNUSED_TEST(AXIS,X) && _PLUG_UNUSED_TEST(AXIS,Y) && _PLUG_UNUSED_TEST(AXIS,Z))
1109
+
1110
+// At least 3 endstop plugs must be used
1111
+#if _AXIS_PLUG_UNUSED_TEST(X)
1112
+  #error "You must enable USE_XMIN_PLUG or USE_XMAX_PLUG."
1113
+#endif
1114
+#if _AXIS_PLUG_UNUSED_TEST(Y)
1115
+  #error "You must enable USE_YMIN_PLUG or USE_YMAX_PLUG."
1116
+#endif
1117
+#if _AXIS_PLUG_UNUSED_TEST(Z)
1118
+  #error "You must enable USE_ZMIN_PLUG or USE_ZMAX_PLUG."
1119
+#endif
1120
+
1121
+// Delta and Cartesian use 3 homing endstops
1122
+#if !IS_SCARA
1046
   #if X_HOME_DIR < 0 && DISABLED(USE_XMIN_PLUG)
1123
   #if X_HOME_DIR < 0 && DISABLED(USE_XMIN_PLUG)
1047
     #error "Enable USE_XMIN_PLUG when homing X to MIN."
1124
     #error "Enable USE_XMIN_PLUG when homing X to MIN."
1048
   #elif X_HOME_DIR > 0 && DISABLED(USE_XMAX_PLUG)
1125
   #elif X_HOME_DIR > 0 && DISABLED(USE_XMAX_PLUG)
1051
     #error "Enable USE_YMIN_PLUG when homing Y to MIN."
1128
     #error "Enable USE_YMIN_PLUG when homing Y to MIN."
1052
   #elif Y_HOME_DIR > 0 && DISABLED(USE_YMAX_PLUG)
1129
   #elif Y_HOME_DIR > 0 && DISABLED(USE_YMAX_PLUG)
1053
     #error "Enable USE_YMAX_PLUG when homing Y to MAX."
1130
     #error "Enable USE_YMAX_PLUG when homing Y to MAX."
1054
-  #elif Z_HOME_DIR < 0 && DISABLED(USE_ZMIN_PLUG)
1055
-    #error "Enable USE_ZMIN_PLUG when homing Z to MIN."
1056
-  #elif Z_HOME_DIR > 0 && DISABLED(USE_ZMAX_PLUG)
1057
-    #error "Enable USE_ZMAX_PLUG when homing Z to MAX."
1131
+  #endif
1132
+#endif
1133
+#if Z_HOME_DIR < 0 && DISABLED(USE_ZMIN_PLUG)
1134
+  #error "Enable USE_ZMIN_PLUG when homing Z to MIN."
1135
+#elif Z_HOME_DIR > 0 && DISABLED(USE_ZMAX_PLUG)
1136
+  #error "Enable USE_ZMAX_PLUG when homing Z to MAX."
1137
+#endif
1138
+
1139
+// Dual endstops requirements
1140
+#if ENABLED(X_DUAL_ENDSTOPS)
1141
+  #if !X2_USE_ENDSTOP
1142
+    #error "You must set X2_USE_ENDSTOP with X_DUAL_ENDSTOPS."
1143
+  #elif X2_USE_ENDSTOP == _X_MIN_ && DISABLED(USE_XMIN_PLUG)
1144
+    #error "USE_XMIN_PLUG is required when X2_USE_ENDSTOP is _X_MIN_."
1145
+  #elif X2_USE_ENDSTOP == _X_MAX_ && DISABLED(USE_XMAX_PLUG)
1146
+    #error "USE_XMAX_PLUG is required when X2_USE_ENDSTOP is _X_MAX_."
1147
+  #elif X2_USE_ENDSTOP == _Y_MIN_ && DISABLED(USE_YMIN_PLUG)
1148
+    #error "USE_YMIN_PLUG is required when X2_USE_ENDSTOP is _Y_MIN_."
1149
+  #elif X2_USE_ENDSTOP == _Y_MAX_ && DISABLED(USE_YMAX_PLUG)
1150
+    #error "USE_YMAX_PLUG is required when X2_USE_ENDSTOP is _Y_MAX_."
1151
+  #elif X2_USE_ENDSTOP == _Z_MIN_ && DISABLED(USE_ZMIN_PLUG)
1152
+    #error "USE_ZMIN_PLUG is required when X2_USE_ENDSTOP is _Z_MIN_."
1153
+  #elif X2_USE_ENDSTOP == _Z_MAX_ && DISABLED(USE_ZMAX_PLUG)
1154
+    #error "USE_ZMAX_PLUG is required when X2_USE_ENDSTOP is _Z_MAX_."
1155
+  #elif !HAS_X2_MIN && !HAS_X2_MAX
1156
+    #error "X2_USE_ENDSTOP has been assigned to a nonexistent endstop!"
1157
+  #elif ENABLED(DELTA)
1158
+    #error "X_DUAL_ENDSTOPS is not compatible with DELTA."
1159
+  #endif
1160
+#endif
1161
+#if ENABLED(Y_DUAL_ENDSTOPS)
1162
+  #if !Y2_USE_ENDSTOP
1163
+    #error "You must set Y2_USE_ENDSTOP with Y_DUAL_ENDSTOPS."
1164
+  #elif Y2_USE_ENDSTOP == _X_MIN_ && DISABLED(USE_XMIN_PLUG)
1165
+    #error "USE_XMIN_PLUG is required when Y2_USE_ENDSTOP is _X_MIN_."
1166
+  #elif Y2_USE_ENDSTOP == _X_MAX_ && DISABLED(USE_XMAX_PLUG)
1167
+    #error "USE_XMAX_PLUG is required when Y2_USE_ENDSTOP is _X_MAX_."
1168
+  #elif Y2_USE_ENDSTOP == _Y_MIN_ && DISABLED(USE_YMIN_PLUG)
1169
+    #error "USE_YMIN_PLUG is required when Y2_USE_ENDSTOP is _Y_MIN_."
1170
+  #elif Y2_USE_ENDSTOP == _Y_MAX_ && DISABLED(USE_YMAX_PLUG)
1171
+    #error "USE_YMAX_PLUG is required when Y2_USE_ENDSTOP is _Y_MAX_."
1172
+  #elif Y2_USE_ENDSTOP == _Z_MIN_ && DISABLED(USE_ZMIN_PLUG)
1173
+    #error "USE_ZMIN_PLUG is required when Y2_USE_ENDSTOP is _Z_MIN_."
1174
+  #elif Y2_USE_ENDSTOP == _Z_MAX_ && DISABLED(USE_ZMAX_PLUG)
1175
+    #error "USE_ZMAX_PLUG is required when Y2_USE_ENDSTOP is _Z_MAX_."
1176
+  #elif !HAS_Y2_MIN && !HAS_Y2_MAX
1177
+    #error "Y2_USE_ENDSTOP has been assigned to a nonexistent endstop!"
1178
+  #elif ENABLED(DELTA)
1179
+    #error "Y_DUAL_ENDSTOPS is not compatible with DELTA."
1180
+  #endif
1181
+#endif
1182
+#if ENABLED(Z_DUAL_ENDSTOPS)
1183
+  #if !Z2_USE_ENDSTOP
1184
+    #error "You must set Z2_USE_ENDSTOP with Z_DUAL_ENDSTOPS."
1185
+  #elif Z2_USE_ENDSTOP == _X_MIN_ && DISABLED(USE_XMIN_PLUG)
1186
+    #error "USE_XMIN_PLUG is required when Z2_USE_ENDSTOP is _X_MIN_."
1187
+  #elif Z2_USE_ENDSTOP == _X_MAX_ && DISABLED(USE_XMAX_PLUG)
1188
+    #error "USE_XMAX_PLUG is required when Z2_USE_ENDSTOP is _X_MAX_."
1189
+  #elif Z2_USE_ENDSTOP == _Y_MIN_ && DISABLED(USE_YMIN_PLUG)
1190
+    #error "USE_YMIN_PLUG is required when Z2_USE_ENDSTOP is _Y_MIN_."
1191
+  #elif Z2_USE_ENDSTOP == _Y_MAX_ && DISABLED(USE_YMAX_PLUG)
1192
+    #error "USE_YMAX_PLUG is required when Z2_USE_ENDSTOP is _Y_MAX_."
1193
+  #elif Z2_USE_ENDSTOP == _Z_MIN_ && DISABLED(USE_ZMIN_PLUG)
1194
+    #error "USE_ZMIN_PLUG is required when Z2_USE_ENDSTOP is _Z_MIN_."
1195
+  #elif Z2_USE_ENDSTOP == _Z_MAX_ && DISABLED(USE_ZMAX_PLUG)
1196
+    #error "USE_ZMAX_PLUG is required when Z2_USE_ENDSTOP is _Z_MAX_."
1197
+  #elif !HAS_Z2_MIN && !HAS_Z2_MAX
1198
+    #error "Z2_USE_ENDSTOP has been assigned to a nonexistent endstop!"
1199
+  #elif ENABLED(DELTA)
1200
+    #error "Z_DUAL_ENDSTOPS is not compatible with DELTA."
1058
   #endif
1201
   #endif
1059
 #endif
1202
 #endif
1060
 
1203
 
1199
   #endif
1342
   #endif
1200
   #if ENABLED(REPRAPWORLD_KEYPAD) \
1343
   #if ENABLED(REPRAPWORLD_KEYPAD) \
1201
       && DISABLED(CARTESIO_UI) \
1344
       && DISABLED(CARTESIO_UI) \
1202
-      && DISABLED(ANET_KEYPAD_LCD)
1345
+      && DISABLED(ZONESTAR_LCD)
1203
     + 1
1346
     + 1
1204
   #endif
1347
   #endif
1205
   #if ENABLED(RIGIDBOT_PANEL)
1348
   #if ENABLED(RIGIDBOT_PANEL)
1235
   #if ENABLED(OLED_PANEL_TINYBOY2)
1378
   #if ENABLED(OLED_PANEL_TINYBOY2)
1236
     + 1
1379
     + 1
1237
   #endif
1380
   #endif
1238
-  #if ENABLED(ANET_KEYPAD_LCD)
1381
+  #if ENABLED(ZONESTAR_LCD)
1239
     + 1
1382
     + 1
1240
   #endif
1383
   #endif
1241
   , "Please select no more than one LCD controller option."
1384
   , "Please select no more than one LCD controller option."
1263
 /**
1406
 /**
1264
  * Make sure HAVE_TMC2130 is warranted
1407
  * Make sure HAVE_TMC2130 is warranted
1265
  */
1408
  */
1266
-#if ENABLED(HAVE_TMC2130)
1267
-  #if !( ENABLED(  X_IS_TMC2130 ) \
1268
-      || ENABLED( X2_IS_TMC2130 ) \
1269
-      || ENABLED(  Y_IS_TMC2130 ) \
1270
-      || ENABLED( Y2_IS_TMC2130 ) \
1271
-      || ENABLED(  Z_IS_TMC2130 ) \
1272
-      || ENABLED( Z2_IS_TMC2130 ) \
1273
-      || ENABLED( E0_IS_TMC2130 ) \
1274
-      || ENABLED( E1_IS_TMC2130 ) \
1275
-      || ENABLED( E2_IS_TMC2130 ) \
1276
-      || ENABLED( E3_IS_TMC2130 ) \
1277
-      || ENABLED( E4_IS_TMC2130 ) \
1278
-  )
1279
-    #error "HAVE_TMC2130 requires at least one TMC2130 stepper to be set."
1280
-  #elif ENABLED(HYBRID_THRESHOLD) && DISABLED(STEALTHCHOP)
1281
-    #error "Enable STEALTHCHOP to use HYBRID_THRESHOLD."
1282
-  #endif
1409
+#if ENABLED(HAVE_TMC2130) && !( \
1410
+       ENABLED(  X_IS_TMC2130 ) \
1411
+    || ENABLED( X2_IS_TMC2130 ) \
1412
+    || ENABLED(  Y_IS_TMC2130 ) \
1413
+    || ENABLED( Y2_IS_TMC2130 ) \
1414
+    || ENABLED(  Z_IS_TMC2130 ) \
1415
+    || ENABLED( Z2_IS_TMC2130 ) \
1416
+    || ENABLED( E0_IS_TMC2130 ) \
1417
+    || ENABLED( E1_IS_TMC2130 ) \
1418
+    || ENABLED( E2_IS_TMC2130 ) \
1419
+    || ENABLED( E3_IS_TMC2130 ) \
1420
+    || ENABLED( E4_IS_TMC2130 ) )
1421
+  #error "HAVE_TMC2130 requires at least one TMC2130 stepper to be set."
1422
+#elif ENABLED(SENSORLESS_HOMING) && DISABLED(HAVE_TMC2130)
1423
+  #error "Enable HAVE_TMC2130 to use SENSORLESS_HOMING."
1424
+#elif defined(AUTOMATIC_CURRENT_CONTROL)
1425
+  #error "AUTOMATIC_CURRENT_CONTROL is now MONITOR_DRIVER_STATUS. Please update your configuration."
1426
+#endif
1427
+
1428
+/**
1429
+ * Make sure HAVE_TMC2208 is warranted
1430
+ */
1431
+
1432
+#if ENABLED(HAVE_TMC2208) && !( \
1433
+       ENABLED(  X_IS_TMC2208 ) \
1434
+    || ENABLED( X2_IS_TMC2208 ) \
1435
+    || ENABLED(  Y_IS_TMC2208 ) \
1436
+    || ENABLED( Y2_IS_TMC2208 ) \
1437
+    || ENABLED(  Z_IS_TMC2208 ) \
1438
+    || ENABLED( Z2_IS_TMC2208 ) \
1439
+    || ENABLED( E0_IS_TMC2208 ) \
1440
+    || ENABLED( E1_IS_TMC2208 ) \
1441
+    || ENABLED( E2_IS_TMC2208 ) \
1442
+    || ENABLED( E3_IS_TMC2208 ) )
1443
+  #error "HAVE_TMC2208 requires at least one TMC2208 stepper to be set."
1444
+#endif
1445
+
1446
+#if ENABLED(HYBRID_THRESHOLD) && DISABLED(STEALTHCHOP)
1447
+  #error "Enable STEALTHCHOP to use HYBRID_THRESHOLD."
1283
 #endif
1448
 #endif
1284
 
1449
 
1285
 /**
1450
 /**
1384
     #endif
1549
     #endif
1385
   #endif
1550
   #endif
1386
 #endif // SPINDLE_LASER_ENABLE
1551
 #endif // SPINDLE_LASER_ENABLE
1552
+
1553
+#if ENABLED(CNC_COORDINATE_SYSTEMS) && ENABLED(NO_WORKSPACE_OFFSETS)
1554
+  #error "CNC_COORDINATE_SYSTEMS is incompatible with NO_WORKSPACE_OFFSETS."
1555
+#endif
1556
+
1557
+#if !BLOCK_BUFFER_SIZE || !IS_POWER_OF_2(BLOCK_BUFFER_SIZE)
1558
+  #error "BLOCK_BUFFER_SIZE must be a power of 2."
1559
+#endif
1560
+
1561
+#if ENABLED(LED_CONTROL_MENU) && DISABLED(ULTIPANEL)
1562
+  #error "LED_CONTROL_MENU requires an LCD controller."
1563
+#endif
1564
+
1565
+#if ENABLED(SKEW_CORRECTION)
1566
+  #if !defined(XY_SKEW_FACTOR) && !(defined(XY_DIAG_AC) && defined(XY_DIAG_BD) && defined(XY_SIDE_AD))
1567
+    #error "SKEW_CORRECTION requires XY_SKEW_FACTOR or XY_DIAG_AC, XY_DIAG_BD, XY_SIDE_AD."
1568
+  #endif
1569
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1570
+    #if !defined(XZ_SKEW_FACTOR) && !(defined(XZ_DIAG_AC) && defined(XZ_DIAG_BD) && defined(XZ_SIDE_AD))
1571
+      #error "SKEW_CORRECTION requires XZ_SKEW_FACTOR or XZ_DIAG_AC, XZ_DIAG_BD, XZ_SIDE_AD."
1572
+    #endif
1573
+    #if !defined(YZ_SKEW_FACTOR) && !(defined(YZ_DIAG_AC) && defined(YZ_DIAG_BD) && defined(YZ_SIDE_AD))
1574
+      #error "SKEW_CORRECTION requires YZ_SKEW_FACTOR or YZ_DIAG_AC, YZ_DIAG_BD, YZ_SIDE_AD."
1575
+    #endif
1576
+  #endif
1577
+#endif

+ 124
- 138
Marlin/Sd2Card.cpp Переглянути файл

26
  *
26
  *
27
  * This file is part of the Arduino Sd2Card Library
27
  * This file is part of the Arduino Sd2Card Library
28
  */
28
  */
29
-#include "Marlin.h"
29
+#include "MarlinConfig.h"
30
 
30
 
31
 #if ENABLED(SDSUPPORT)
31
 #if ENABLED(SDSUPPORT)
32
+
32
 #include "Sd2Card.h"
33
 #include "Sd2Card.h"
33
 
34
 
34
 #if ENABLED(USE_WATCHDOG)
35
 #if ENABLED(USE_WATCHDOG)
35
   #include "watchdog.h"
36
   #include "watchdog.h"
36
 #endif
37
 #endif
37
 
38
 
38
-//------------------------------------------------------------------------------
39
 #if DISABLED(SOFTWARE_SPI)
39
 #if DISABLED(SOFTWARE_SPI)
40
   // functions for hardware SPI
40
   // functions for hardware SPI
41
-  //------------------------------------------------------------------------------
41
+
42
   // make sure SPCR rate is in expected bits
42
   // make sure SPCR rate is in expected bits
43
   #if (SPR0 != 0 || SPR1 != 1)
43
   #if (SPR0 != 0 || SPR1 != 1)
44
     #error "unexpected SPCR bits"
44
     #error "unexpected SPCR bits"
52
     SPCR = _BV(SPE) | _BV(MSTR) | (spiRate >> 1);
52
     SPCR = _BV(SPE) | _BV(MSTR) | (spiRate >> 1);
53
     SPSR = spiRate & 1 || spiRate == 6 ? 0 : _BV(SPI2X);
53
     SPSR = spiRate & 1 || spiRate == 6 ? 0 : _BV(SPI2X);
54
   }
54
   }
55
-  //------------------------------------------------------------------------------
55
+
56
   /** SPI receive a byte */
56
   /** SPI receive a byte */
57
   static uint8_t spiRec() {
57
   static uint8_t spiRec() {
58
     SPDR = 0xFF;
58
     SPDR = 0xFF;
59
     while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
59
     while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
60
     return SPDR;
60
     return SPDR;
61
   }
61
   }
62
-  //------------------------------------------------------------------------------
62
+
63
   /** SPI read data - only one call so force inline */
63
   /** SPI read data - only one call so force inline */
64
   static inline __attribute__((always_inline))
64
   static inline __attribute__((always_inline))
65
   void spiRead(uint8_t* buf, uint16_t nbyte) {
65
   void spiRead(uint8_t* buf, uint16_t nbyte) {
73
     while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
73
     while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
74
     buf[nbyte] = SPDR;
74
     buf[nbyte] = SPDR;
75
   }
75
   }
76
-  //------------------------------------------------------------------------------
76
+
77
   /** SPI send a byte */
77
   /** SPI send a byte */
78
   static void spiSend(uint8_t b) {
78
   static void spiSend(uint8_t b) {
79
     SPDR = b;
79
     SPDR = b;
80
     while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
80
     while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
81
   }
81
   }
82
-  //------------------------------------------------------------------------------
82
+
83
   /** SPI send block - only one call so force inline */
83
   /** SPI send block - only one call so force inline */
84
   static inline __attribute__((always_inline))
84
   static inline __attribute__((always_inline))
85
   void spiSendBlock(uint8_t token, const uint8_t* buf) {
85
   void spiSendBlock(uint8_t token, const uint8_t* buf) {
95
        //------------------------------------------------------------------------------
95
        //------------------------------------------------------------------------------
96
 #else  // SOFTWARE_SPI
96
 #else  // SOFTWARE_SPI
97
        //------------------------------------------------------------------------------
97
        //------------------------------------------------------------------------------
98
+
98
   /** nop to tune soft SPI timing */
99
   /** nop to tune soft SPI timing */
99
   #define nop asm volatile ("nop\n\t")
100
   #define nop asm volatile ("nop\n\t")
100
-  //------------------------------------------------------------------------------
101
+
101
   /** Soft SPI receive byte */
102
   /** Soft SPI receive byte */
102
   static uint8_t spiRec() {
103
   static uint8_t spiRec() {
103
     uint8_t data = 0;
104
     uint8_t data = 0;
123
     sei();
124
     sei();
124
     return data;
125
     return data;
125
   }
126
   }
126
-  //------------------------------------------------------------------------------
127
+
127
   /** Soft SPI read data */
128
   /** Soft SPI read data */
128
   static void spiRead(uint8_t* buf, uint16_t nbyte) {
129
   static void spiRead(uint8_t* buf, uint16_t nbyte) {
129
     for (uint16_t i = 0; i < nbyte; i++)
130
     for (uint16_t i = 0; i < nbyte; i++)
130
       buf[i] = spiRec();
131
       buf[i] = spiRec();
131
   }
132
   }
132
-  //------------------------------------------------------------------------------
133
+
133
   /** Soft SPI send byte */
134
   /** Soft SPI send byte */
134
   static void spiSend(uint8_t data) {
135
   static void spiSend(uint8_t data) {
135
     // no interrupts during byte send - about 8 us
136
     // no interrupts during byte send - about 8 us
153
     // enable interrupts
154
     // enable interrupts
154
     sei();
155
     sei();
155
   }
156
   }
156
-  //------------------------------------------------------------------------------
157
+
157
   /** Soft SPI send block */
158
   /** Soft SPI send block */
158
   void spiSendBlock(uint8_t token, const uint8_t* buf) {
159
   void spiSendBlock(uint8_t token, const uint8_t* buf) {
159
     spiSend(token);
160
     spiSend(token);
161
       spiSend(buf[i]);
162
       spiSend(buf[i]);
162
   }
163
   }
163
 #endif  // SOFTWARE_SPI
164
 #endif  // SOFTWARE_SPI
164
-//------------------------------------------------------------------------------
165
+
165
 // send command and return error code.  Return zero for OK
166
 // send command and return error code.  Return zero for OK
166
 uint8_t Sd2Card::cardCommand(uint8_t cmd, uint32_t arg) {
167
 uint8_t Sd2Card::cardCommand(uint8_t cmd, uint32_t arg) {
167
   // select card
168
   // select card
189
   for (uint8_t i = 0; ((status_ = spiRec()) & 0x80) && i != 0xFF; i++) { /* Intentionally left empty */ }
190
   for (uint8_t i = 0; ((status_ = spiRec()) & 0x80) && i != 0xFF; i++) { /* Intentionally left empty */ }
190
   return status_;
191
   return status_;
191
 }
192
 }
192
-//------------------------------------------------------------------------------
193
+
193
 /**
194
 /**
194
  * Determine the size of an SD flash memory card.
195
  * Determine the size of an SD flash memory card.
195
  *
196
  *
217
     return 0;
218
     return 0;
218
   }
219
   }
219
 }
220
 }
220
-//------------------------------------------------------------------------------
221
+
221
 void Sd2Card::chipSelectHigh() {
222
 void Sd2Card::chipSelectHigh() {
222
   digitalWrite(chipSelectPin_, HIGH);
223
   digitalWrite(chipSelectPin_, HIGH);
223
 }
224
 }
224
-//------------------------------------------------------------------------------
225
+
225
 void Sd2Card::chipSelectLow() {
226
 void Sd2Card::chipSelectLow() {
226
   #if DISABLED(SOFTWARE_SPI)
227
   #if DISABLED(SOFTWARE_SPI)
227
     spiInit(spiRate_);
228
     spiInit(spiRate_);
228
   #endif  // SOFTWARE_SPI
229
   #endif  // SOFTWARE_SPI
229
   digitalWrite(chipSelectPin_, LOW);
230
   digitalWrite(chipSelectPin_, LOW);
230
 }
231
 }
231
-//------------------------------------------------------------------------------
232
-/** Erase a range of blocks.
232
+
233
+/**
234
+ * Erase a range of blocks.
233
  *
235
  *
234
  * \param[in] firstBlock The address of the first block in the range.
236
  * \param[in] firstBlock The address of the first block in the range.
235
  * \param[in] lastBlock The address of the last block in the range.
237
  * \param[in] lastBlock The address of the last block in the range.
239
  * either 0 or 1, depends on the card vendor.  The card must support
241
  * either 0 or 1, depends on the card vendor.  The card must support
240
  * single block erase.
242
  * single block erase.
241
  *
243
  *
242
- * \return The value one, true, is returned for success and
243
- * the value zero, false, is returned for failure.
244
+ * \return true for success, false for failure.
244
  */
245
  */
245
 bool Sd2Card::erase(uint32_t firstBlock, uint32_t lastBlock) {
246
 bool Sd2Card::erase(uint32_t firstBlock, uint32_t lastBlock) {
246
   csd_t csd;
247
   csd_t csd;
275
   chipSelectHigh();
276
   chipSelectHigh();
276
   return false;
277
   return false;
277
 }
278
 }
278
-//------------------------------------------------------------------------------
279
-/** Determine if card supports single block erase.
279
+
280
+/**
281
+ * Determine if card supports single block erase.
280
  *
282
  *
281
- * \return The value one, true, is returned if single block erase is supported.
282
- * The value zero, false, is returned if single block erase is not supported.
283
+ * \return true if single block erase is supported.
284
+ *         false if single block erase is not supported.
283
  */
285
  */
284
 bool Sd2Card::eraseSingleBlockEnable() {
286
 bool Sd2Card::eraseSingleBlockEnable() {
285
   csd_t csd;
287
   csd_t csd;
286
   return readCSD(&csd) ? csd.v1.erase_blk_en : false;
288
   return readCSD(&csd) ? csd.v1.erase_blk_en : false;
287
 }
289
 }
288
-//------------------------------------------------------------------------------
290
+
289
 /**
291
 /**
290
  * Initialize an SD flash memory card.
292
  * Initialize an SD flash memory card.
291
  *
293
  *
292
  * \param[in] sckRateID SPI clock rate selector. See setSckRate().
294
  * \param[in] sckRateID SPI clock rate selector. See setSckRate().
293
  * \param[in] chipSelectPin SD chip select pin number.
295
  * \param[in] chipSelectPin SD chip select pin number.
294
  *
296
  *
295
- * \return The value one, true, is returned for success and
296
- * the value zero, false, is returned for failure.  The reason for failure
297
- * can be determined by calling errorCode() and errorData().
297
+ * \return true for success, false for failure.
298
+ * The reason for failure can be determined by calling errorCode() and errorData().
298
  */
299
  */
299
 bool Sd2Card::init(uint8_t sckRateID, uint8_t chipSelectPin) {
300
 bool Sd2Card::init(uint8_t sckRateID, uint8_t chipSelectPin) {
300
   errorCode_ = type_ = 0;
301
   errorCode_ = type_ = 0;
384
   chipSelectHigh();
385
   chipSelectHigh();
385
   return false;
386
   return false;
386
 }
387
 }
387
-//------------------------------------------------------------------------------
388
+
388
 /**
389
 /**
389
  * Read a 512 byte block from an SD card.
390
  * Read a 512 byte block from an SD card.
390
  *
391
  *
391
  * \param[in] blockNumber Logical block to be read.
392
  * \param[in] blockNumber Logical block to be read.
392
  * \param[out] dst Pointer to the location that will receive the data.
393
  * \param[out] dst Pointer to the location that will receive the data.
393
- * \return The value one, true, is returned for success and
394
- * the value zero, false, is returned for failure.
394
+ * \return true for success, false for failure.
395
  */
395
  */
396
 bool Sd2Card::readBlock(uint32_t blockNumber, uint8_t* dst) {
396
 bool Sd2Card::readBlock(uint32_t blockNumber, uint8_t* dst) {
397
   // use address if not SDHC card
397
   // use address if not SDHC card
399
 
399
 
400
   #if ENABLED(SD_CHECK_AND_RETRY)
400
   #if ENABLED(SD_CHECK_AND_RETRY)
401
     uint8_t retryCnt = 3;
401
     uint8_t retryCnt = 3;
402
-    do {
403
-      if (!cardCommand(CMD17, blockNumber)) {
404
-        if (readData(dst, 512)) return true;
405
-      }
406
-      else
402
+    for(;;) {
403
+      if (cardCommand(CMD17, blockNumber))
407
         error(SD_CARD_ERROR_CMD17);
404
         error(SD_CARD_ERROR_CMD17);
405
+      else if (readData(dst, 512))
406
+        return true;
408
 
407
 
409
       if (!--retryCnt) break;
408
       if (!--retryCnt) break;
410
 
409
 
411
       chipSelectHigh();
410
       chipSelectHigh();
412
       cardCommand(CMD12, 0); // Try sending a stop command, ignore the result.
411
       cardCommand(CMD12, 0); // Try sending a stop command, ignore the result.
413
       errorCode_ = 0;
412
       errorCode_ = 0;
414
-    } while (true);
413
+    }
415
   #else
414
   #else
416
     if (cardCommand(CMD17, blockNumber))
415
     if (cardCommand(CMD17, blockNumber))
417
       error(SD_CARD_ERROR_CMD17);
416
       error(SD_CARD_ERROR_CMD17);
422
   chipSelectHigh();
421
   chipSelectHigh();
423
   return false;
422
   return false;
424
 }
423
 }
425
-//------------------------------------------------------------------------------
426
-/** Read one data block in a multiple block read sequence
424
+
425
+/**
426
+ * Read one data block in a multiple block read sequence
427
  *
427
  *
428
  * \param[in] dst Pointer to the location for the data to be read.
428
  * \param[in] dst Pointer to the location for the data to be read.
429
  *
429
  *
430
- * \return The value one, true, is returned for success and
431
- * the value zero, false, is returned for failure.
430
+ * \return true for success, false for failure.
432
  */
431
  */
433
 bool Sd2Card::readData(uint8_t* dst) {
432
 bool Sd2Card::readData(uint8_t* dst) {
434
   chipSelectLow();
433
   chipSelectLow();
436
 }
435
 }
437
 
436
 
438
 #if ENABLED(SD_CHECK_AND_RETRY)
437
 #if ENABLED(SD_CHECK_AND_RETRY)
439
-static const uint16_t crctab[] PROGMEM = {
440
-  0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50A5, 0x60C6, 0x70E7,
441
-  0x8108, 0x9129, 0xA14A, 0xB16B, 0xC18C, 0xD1AD, 0xE1CE, 0xF1EF,
442
-  0x1231, 0x0210, 0x3273, 0x2252, 0x52B5, 0x4294, 0x72F7, 0x62D6,
443
-  0x9339, 0x8318, 0xB37B, 0xA35A, 0xD3BD, 0xC39C, 0xF3FF, 0xE3DE,
444
-  0x2462, 0x3443, 0x0420, 0x1401, 0x64E6, 0x74C7, 0x44A4, 0x5485,
445
-  0xA56A, 0xB54B, 0x8528, 0x9509, 0xE5EE, 0xF5CF, 0xC5AC, 0xD58D,
446
-  0x3653, 0x2672, 0x1611, 0x0630, 0x76D7, 0x66F6, 0x5695, 0x46B4,
447
-  0xB75B, 0xA77A, 0x9719, 0x8738, 0xF7DF, 0xE7FE, 0xD79D, 0xC7BC,
448
-  0x48C4, 0x58E5, 0x6886, 0x78A7, 0x0840, 0x1861, 0x2802, 0x3823,
449
-  0xC9CC, 0xD9ED, 0xE98E, 0xF9AF, 0x8948, 0x9969, 0xA90A, 0xB92B,
450
-  0x5AF5, 0x4AD4, 0x7AB7, 0x6A96, 0x1A71, 0x0A50, 0x3A33, 0x2A12,
451
-  0xDBFD, 0xCBDC, 0xFBBF, 0xEB9E, 0x9B79, 0x8B58, 0xBB3B, 0xAB1A,
452
-  0x6CA6, 0x7C87, 0x4CE4, 0x5CC5, 0x2C22, 0x3C03, 0x0C60, 0x1C41,
453
-  0xEDAE, 0xFD8F, 0xCDEC, 0xDDCD, 0xAD2A, 0xBD0B, 0x8D68, 0x9D49,
454
-  0x7E97, 0x6EB6, 0x5ED5, 0x4EF4, 0x3E13, 0x2E32, 0x1E51, 0x0E70,
455
-  0xFF9F, 0xEFBE, 0xDFDD, 0xCFFC, 0xBF1B, 0xAF3A, 0x9F59, 0x8F78,
456
-  0x9188, 0x81A9, 0xB1CA, 0xA1EB, 0xD10C, 0xC12D, 0xF14E, 0xE16F,
457
-  0x1080, 0x00A1, 0x30C2, 0x20E3, 0x5004, 0x4025, 0x7046, 0x6067,
458
-  0x83B9, 0x9398, 0xA3FB, 0xB3DA, 0xC33D, 0xD31C, 0xE37F, 0xF35E,
459
-  0x02B1, 0x1290, 0x22F3, 0x32D2, 0x4235, 0x5214, 0x6277, 0x7256,
460
-  0xB5EA, 0xA5CB, 0x95A8, 0x8589, 0xF56E, 0xE54F, 0xD52C, 0xC50D,
461
-  0x34E2, 0x24C3, 0x14A0, 0x0481, 0x7466, 0x6447, 0x5424, 0x4405,
462
-  0xA7DB, 0xB7FA, 0x8799, 0x97B8, 0xE75F, 0xF77E, 0xC71D, 0xD73C,
463
-  0x26D3, 0x36F2, 0x0691, 0x16B0, 0x6657, 0x7676, 0x4615, 0x5634,
464
-  0xD94C, 0xC96D, 0xF90E, 0xE92F, 0x99C8, 0x89E9, 0xB98A, 0xA9AB,
465
-  0x5844, 0x4865, 0x7806, 0x6827, 0x18C0, 0x08E1, 0x3882, 0x28A3,
466
-  0xCB7D, 0xDB5C, 0xEB3F, 0xFB1E, 0x8BF9, 0x9BD8, 0xABBB, 0xBB9A,
467
-  0x4A75, 0x5A54, 0x6A37, 0x7A16, 0x0AF1, 0x1AD0, 0x2AB3, 0x3A92,
468
-  0xFD2E, 0xED0F, 0xDD6C, 0xCD4D, 0xBDAA, 0xAD8B, 0x9DE8, 0x8DC9,
469
-  0x7C26, 0x6C07, 0x5C64, 0x4C45, 0x3CA2, 0x2C83, 0x1CE0, 0x0CC1,
470
-  0xEF1F, 0xFF3E, 0xCF5D, 0xDF7C, 0xAF9B, 0xBFBA, 0x8FD9, 0x9FF8,
471
-  0x6E17, 0x7E36, 0x4E55, 0x5E74, 0x2E93, 0x3EB2, 0x0ED1, 0x1EF0
472
-};
473
-static uint16_t CRC_CCITT(const uint8_t* data, size_t n) {
474
-  uint16_t crc = 0;
475
-  for (size_t i = 0; i < n; i++) {
476
-    crc = pgm_read_word(&crctab[(crc >> 8 ^ data[i]) & 0xFF]) ^ (crc << 8);
477
-  }
478
-  return crc;
479
-}
480
-#endif
438
+  static const uint16_t crctab[] PROGMEM = {
439
+    0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50A5, 0x60C6, 0x70E7,
440
+    0x8108, 0x9129, 0xA14A, 0xB16B, 0xC18C, 0xD1AD, 0xE1CE, 0xF1EF,
441
+    0x1231, 0x0210, 0x3273, 0x2252, 0x52B5, 0x4294, 0x72F7, 0x62D6,
442
+    0x9339, 0x8318, 0xB37B, 0xA35A, 0xD3BD, 0xC39C, 0xF3FF, 0xE3DE,
443
+    0x2462, 0x3443, 0x0420, 0x1401, 0x64E6, 0x74C7, 0x44A4, 0x5485,
444
+    0xA56A, 0xB54B, 0x8528, 0x9509, 0xE5EE, 0xF5CF, 0xC5AC, 0xD58D,
445
+    0x3653, 0x2672, 0x1611, 0x0630, 0x76D7, 0x66F6, 0x5695, 0x46B4,
446
+    0xB75B, 0xA77A, 0x9719, 0x8738, 0xF7DF, 0xE7FE, 0xD79D, 0xC7BC,
447
+    0x48C4, 0x58E5, 0x6886, 0x78A7, 0x0840, 0x1861, 0x2802, 0x3823,
448
+    0xC9CC, 0xD9ED, 0xE98E, 0xF9AF, 0x8948, 0x9969, 0xA90A, 0xB92B,
449
+    0x5AF5, 0x4AD4, 0x7AB7, 0x6A96, 0x1A71, 0x0A50, 0x3A33, 0x2A12,
450
+    0xDBFD, 0xCBDC, 0xFBBF, 0xEB9E, 0x9B79, 0x8B58, 0xBB3B, 0xAB1A,
451
+    0x6CA6, 0x7C87, 0x4CE4, 0x5CC5, 0x2C22, 0x3C03, 0x0C60, 0x1C41,
452
+    0xEDAE, 0xFD8F, 0xCDEC, 0xDDCD, 0xAD2A, 0xBD0B, 0x8D68, 0x9D49,
453
+    0x7E97, 0x6EB6, 0x5ED5, 0x4EF4, 0x3E13, 0x2E32, 0x1E51, 0x0E70,
454
+    0xFF9F, 0xEFBE, 0xDFDD, 0xCFFC, 0xBF1B, 0xAF3A, 0x9F59, 0x8F78,
455
+    0x9188, 0x81A9, 0xB1CA, 0xA1EB, 0xD10C, 0xC12D, 0xF14E, 0xE16F,
456
+    0x1080, 0x00A1, 0x30C2, 0x20E3, 0x5004, 0x4025, 0x7046, 0x6067,
457
+    0x83B9, 0x9398, 0xA3FB, 0xB3DA, 0xC33D, 0xD31C, 0xE37F, 0xF35E,
458
+    0x02B1, 0x1290, 0x22F3, 0x32D2, 0x4235, 0x5214, 0x6277, 0x7256,
459
+    0xB5EA, 0xA5CB, 0x95A8, 0x8589, 0xF56E, 0xE54F, 0xD52C, 0xC50D,
460
+    0x34E2, 0x24C3, 0x14A0, 0x0481, 0x7466, 0x6447, 0x5424, 0x4405,
461
+    0xA7DB, 0xB7FA, 0x8799, 0x97B8, 0xE75F, 0xF77E, 0xC71D, 0xD73C,
462
+    0x26D3, 0x36F2, 0x0691, 0x16B0, 0x6657, 0x7676, 0x4615, 0x5634,
463
+    0xD94C, 0xC96D, 0xF90E, 0xE92F, 0x99C8, 0x89E9, 0xB98A, 0xA9AB,
464
+    0x5844, 0x4865, 0x7806, 0x6827, 0x18C0, 0x08E1, 0x3882, 0x28A3,
465
+    0xCB7D, 0xDB5C, 0xEB3F, 0xFB1E, 0x8BF9, 0x9BD8, 0xABBB, 0xBB9A,
466
+    0x4A75, 0x5A54, 0x6A37, 0x7A16, 0x0AF1, 0x1AD0, 0x2AB3, 0x3A92,
467
+    0xFD2E, 0xED0F, 0xDD6C, 0xCD4D, 0xBDAA, 0xAD8B, 0x9DE8, 0x8DC9,
468
+    0x7C26, 0x6C07, 0x5C64, 0x4C45, 0x3CA2, 0x2C83, 0x1CE0, 0x0CC1,
469
+    0xEF1F, 0xFF3E, 0xCF5D, 0xDF7C, 0xAF9B, 0xBFBA, 0x8FD9, 0x9FF8,
470
+    0x6E17, 0x7E36, 0x4E55, 0x5E74, 0x2E93, 0x3EB2, 0x0ED1, 0x1EF0
471
+  };
472
+  static uint16_t CRC_CCITT(const uint8_t* data, size_t n) {
473
+    uint16_t crc = 0;
474
+    for (size_t i = 0; i < n; i++) {
475
+      crc = pgm_read_word(&crctab[(crc >> 8 ^ data[i]) & 0xFF]) ^ (crc << 8);
476
+    }
477
+    return crc;
478
+  }
479
+#endif // SD_CHECK_AND_RETRY
481
 
480
 
482
-//------------------------------------------------------------------------------
483
 bool Sd2Card::readData(uint8_t* dst, uint16_t count) {
481
 bool Sd2Card::readData(uint8_t* dst, uint16_t count) {
484
   // wait for start block token
482
   // wait for start block token
485
   uint16_t t0 = millis();
483
   uint16_t t0 = millis();
521
   spiSend(0XFF);
519
   spiSend(0XFF);
522
   return false;
520
   return false;
523
 }
521
 }
524
-//------------------------------------------------------------------------------
522
+
525
 /** read CID or CSR register */
523
 /** read CID or CSR register */
526
 bool Sd2Card::readRegister(uint8_t cmd, void* buf) {
524
 bool Sd2Card::readRegister(uint8_t cmd, void* buf) {
527
   uint8_t* dst = reinterpret_cast<uint8_t*>(buf);
525
   uint8_t* dst = reinterpret_cast<uint8_t*>(buf);
528
   if (cardCommand(cmd, 0)) {
526
   if (cardCommand(cmd, 0)) {
529
     error(SD_CARD_ERROR_READ_REG);
527
     error(SD_CARD_ERROR_READ_REG);
530
-    goto FAIL;
528
+    chipSelectHigh();
529
+    return false;
531
   }
530
   }
532
   return readData(dst, 16);
531
   return readData(dst, 16);
533
-  FAIL:
534
-  chipSelectHigh();
535
-  return false;
536
 }
532
 }
537
-//------------------------------------------------------------------------------
538
-/** Start a read multiple blocks sequence.
533
+
534
+/**
535
+ * Start a read multiple blocks sequence.
539
  *
536
  *
540
  * \param[in] blockNumber Address of first block in sequence.
537
  * \param[in] blockNumber Address of first block in sequence.
541
  *
538
  *
542
  * \note This function is used with readData() and readStop() for optimized
539
  * \note This function is used with readData() and readStop() for optimized
543
  * multiple block reads.  SPI chipSelect must be low for the entire sequence.
540
  * multiple block reads.  SPI chipSelect must be low for the entire sequence.
544
  *
541
  *
545
- * \return The value one, true, is returned for success and
546
- * the value zero, false, is returned for failure.
542
+ * \return true for success, false for failure.
547
  */
543
  */
548
 bool Sd2Card::readStart(uint32_t blockNumber) {
544
 bool Sd2Card::readStart(uint32_t blockNumber) {
549
   if (type() != SD_CARD_TYPE_SDHC) blockNumber <<= 9;
545
   if (type() != SD_CARD_TYPE_SDHC) blockNumber <<= 9;
550
   if (cardCommand(CMD18, blockNumber)) {
546
   if (cardCommand(CMD18, blockNumber)) {
551
     error(SD_CARD_ERROR_CMD18);
547
     error(SD_CARD_ERROR_CMD18);
552
-    goto FAIL;
548
+    chipSelectHigh();
549
+    return false;
553
   }
550
   }
554
   chipSelectHigh();
551
   chipSelectHigh();
555
   return true;
552
   return true;
556
-  FAIL:
557
-  chipSelectHigh();
558
-  return false;
559
 }
553
 }
560
-//------------------------------------------------------------------------------
561
-/** End a read multiple blocks sequence.
554
+
555
+/**
556
+ * End a read multiple blocks sequence.
562
  *
557
  *
563
-* \return The value one, true, is returned for success and
564
- * the value zero, false, is returned for failure.
558
+ * \return true for success, false for failure.
565
  */
559
  */
566
 bool Sd2Card::readStop() {
560
 bool Sd2Card::readStop() {
567
   chipSelectLow();
561
   chipSelectLow();
568
   if (cardCommand(CMD12, 0)) {
562
   if (cardCommand(CMD12, 0)) {
569
     error(SD_CARD_ERROR_CMD12);
563
     error(SD_CARD_ERROR_CMD12);
570
-    goto FAIL;
564
+    chipSelectHigh();
565
+    return false;
571
   }
566
   }
572
   chipSelectHigh();
567
   chipSelectHigh();
573
   return true;
568
   return true;
574
-  FAIL:
575
-  chipSelectHigh();
576
-  return false;
577
 }
569
 }
578
-//------------------------------------------------------------------------------
570
+
579
 /**
571
 /**
580
  * Set the SPI clock rate.
572
  * Set the SPI clock rate.
581
  *
573
  *
596
   spiRate_ = sckRateID;
588
   spiRate_ = sckRateID;
597
   return true;
589
   return true;
598
 }
590
 }
599
-//------------------------------------------------------------------------------
591
+
600
 // wait for card to go not busy
592
 // wait for card to go not busy
601
 bool Sd2Card::waitNotBusy(uint16_t timeoutMillis) {
593
 bool Sd2Card::waitNotBusy(uint16_t timeoutMillis) {
602
   uint16_t t0 = millis();
594
   uint16_t t0 = millis();
603
-  while (spiRec() != 0XFF) {
604
-    if (((uint16_t)millis() - t0) >= timeoutMillis) goto FAIL;
605
-  }
595
+  while (spiRec() != 0XFF)
596
+    if (((uint16_t)millis() - t0) >= timeoutMillis) return false;
597
+
606
   return true;
598
   return true;
607
-  FAIL:
608
-  return false;
609
 }
599
 }
610
-//------------------------------------------------------------------------------
600
+
611
 /**
601
 /**
612
  * Writes a 512 byte block to an SD card.
602
  * Writes a 512 byte block to an SD card.
613
  *
603
  *
614
  * \param[in] blockNumber Logical block to be written.
604
  * \param[in] blockNumber Logical block to be written.
615
  * \param[in] src Pointer to the location of the data to be written.
605
  * \param[in] src Pointer to the location of the data to be written.
616
- * \return The value one, true, is returned for success and
617
- * the value zero, false, is returned for failure.
606
+ * \return true for success, false for failure.
618
  */
607
  */
619
 bool Sd2Card::writeBlock(uint32_t blockNumber, const uint8_t* src) {
608
 bool Sd2Card::writeBlock(uint32_t blockNumber, const uint8_t* src) {
620
   // use address if not SDHC card
609
   // use address if not SDHC card
641
   chipSelectHigh();
630
   chipSelectHigh();
642
   return false;
631
   return false;
643
 }
632
 }
644
-//------------------------------------------------------------------------------
645
-/** Write one data block in a multiple block write sequence
633
+
634
+/**
635
+ * Write one data block in a multiple block write sequence
646
  * \param[in] src Pointer to the location of the data to be written.
636
  * \param[in] src Pointer to the location of the data to be written.
647
- * \return The value one, true, is returned for success and
648
- * the value zero, false, is returned for failure.
637
+ * \return true for success, false for failure.
649
  */
638
  */
650
 bool Sd2Card::writeData(const uint8_t* src) {
639
 bool Sd2Card::writeData(const uint8_t* src) {
651
   chipSelectLow();
640
   chipSelectLow();
652
   // wait for previous write to finish
641
   // wait for previous write to finish
653
-  if (!waitNotBusy(SD_WRITE_TIMEOUT)) goto FAIL;
654
-  if (!writeData(WRITE_MULTIPLE_TOKEN, src)) goto FAIL;
642
+  if (!waitNotBusy(SD_WRITE_TIMEOUT) || !writeData(WRITE_MULTIPLE_TOKEN, src)) {
643
+    error(SD_CARD_ERROR_WRITE_MULTIPLE);
644
+    chipSelectHigh();
645
+    return false;
646
+  }
655
   chipSelectHigh();
647
   chipSelectHigh();
656
   return true;
648
   return true;
657
-  FAIL:
658
-  error(SD_CARD_ERROR_WRITE_MULTIPLE);
659
-  chipSelectHigh();
660
-  return false;
661
 }
649
 }
662
-//------------------------------------------------------------------------------
650
+
663
 // send one block of data for write block or write multiple blocks
651
 // send one block of data for write block or write multiple blocks
664
 bool Sd2Card::writeData(uint8_t token, const uint8_t* src) {
652
 bool Sd2Card::writeData(uint8_t token, const uint8_t* src) {
665
   spiSendBlock(token, src);
653
   spiSendBlock(token, src);
670
   status_ = spiRec();
658
   status_ = spiRec();
671
   if ((status_ & DATA_RES_MASK) != DATA_RES_ACCEPTED) {
659
   if ((status_ & DATA_RES_MASK) != DATA_RES_ACCEPTED) {
672
     error(SD_CARD_ERROR_WRITE);
660
     error(SD_CARD_ERROR_WRITE);
673
-    goto FAIL;
661
+    chipSelectHigh();
662
+    return false;
674
   }
663
   }
675
   return true;
664
   return true;
676
-  FAIL:
677
-  chipSelectHigh();
678
-  return false;
679
 }
665
 }
680
-//------------------------------------------------------------------------------
681
-/** Start a write multiple blocks sequence.
666
+
667
+/**
668
+ * Start a write multiple blocks sequence.
682
  *
669
  *
683
  * \param[in] blockNumber Address of first block in sequence.
670
  * \param[in] blockNumber Address of first block in sequence.
684
  * \param[in] eraseCount The number of blocks to be pre-erased.
671
  * \param[in] eraseCount The number of blocks to be pre-erased.
686
  * \note This function is used with writeData() and writeStop()
673
  * \note This function is used with writeData() and writeStop()
687
  * for optimized multiple block writes.
674
  * for optimized multiple block writes.
688
  *
675
  *
689
- * \return The value one, true, is returned for success and
690
- * the value zero, false, is returned for failure.
676
+ * \return true for success, false for failure.
691
  */
677
  */
692
 bool Sd2Card::writeStart(uint32_t blockNumber, uint32_t eraseCount) {
678
 bool Sd2Card::writeStart(uint32_t blockNumber, uint32_t eraseCount) {
693
   // send pre-erase count
679
   // send pre-erase count
707
   chipSelectHigh();
693
   chipSelectHigh();
708
   return false;
694
   return false;
709
 }
695
 }
710
-//------------------------------------------------------------------------------
711
-/** End a write multiple blocks sequence.
696
+
697
+/**
698
+ * End a write multiple blocks sequence.
712
  *
699
  *
713
-* \return The value one, true, is returned for success and
714
- * the value zero, false, is returned for failure.
700
+ * \return true for success, false for failure.
715
  */
701
  */
716
 bool Sd2Card::writeStop() {
702
 bool Sd2Card::writeStop() {
717
   chipSelectLow();
703
   chipSelectLow();
726
   return false;
712
   return false;
727
 }
713
 }
728
 
714
 
729
-#endif
715
+#endif // SDSUPPORT

+ 85
- 132
Marlin/Sd2Card.h Переглянути файл

21
  */
21
  */
22
 
22
 
23
 /**
23
 /**
24
+ * \file
25
+ * \brief Sd2Card class for V2 SD/SDHC cards
26
+ */
27
+
28
+/**
24
  * Arduino Sd2Card Library
29
  * Arduino Sd2Card Library
25
  * Copyright (C) 2009 by William Greiman
30
  * Copyright (C) 2009 by William Greiman
26
  *
31
  *
27
  * This file is part of the Arduino Sd2Card Library
32
  * This file is part of the Arduino Sd2Card Library
28
  */
33
  */
34
+#ifndef _SD2CARD_H_
35
+#define _SD2CARD_H_
29
 
36
 
30
-#include "Marlin.h"
31
-#if ENABLED(SDSUPPORT)
32
-
33
-#ifndef Sd2Card_h
34
-#define Sd2Card_h
35
-/**
36
- * \file
37
- * \brief Sd2Card class for V2 SD/SDHC cards
38
- */
39
 #include "SdFatConfig.h"
37
 #include "SdFatConfig.h"
40
 #include "SdInfo.h"
38
 #include "SdInfo.h"
41
-//------------------------------------------------------------------------------
39
+
42
 // SPI speed is F_CPU/2^(1 + index), 0 <= index <= 6
40
 // SPI speed is F_CPU/2^(1 + index), 0 <= index <= 6
43
-/** Set SCK to max rate of F_CPU/2. See Sd2Card::setSckRate(). */
44
-uint8_t const SPI_FULL_SPEED = 0;
45
-/** Set SCK rate to F_CPU/4. See Sd2Card::setSckRate(). */
46
-uint8_t const SPI_HALF_SPEED = 1;
47
-/** Set SCK rate to F_CPU/8. See Sd2Card::setSckRate(). */
48
-uint8_t const SPI_QUARTER_SPEED = 2;
49
-/** Set SCK rate to F_CPU/16. See Sd2Card::setSckRate(). */
50
-uint8_t const SPI_EIGHTH_SPEED = 3;
51
-/** Set SCK rate to F_CPU/32. See Sd2Card::setSckRate(). */
52
-uint8_t const SPI_SIXTEENTH_SPEED = 4;
53
-//------------------------------------------------------------------------------
54
-/** init timeout ms */
55
-uint16_t const SD_INIT_TIMEOUT = 2000;
56
-/** erase timeout ms */
57
-uint16_t const SD_ERASE_TIMEOUT = 10000;
58
-/** read timeout ms */
59
-uint16_t const SD_READ_TIMEOUT = 300;
60
-/** write time out ms */
61
-uint16_t const SD_WRITE_TIMEOUT = 600;
62
-//------------------------------------------------------------------------------
41
+uint8_t const SPI_FULL_SPEED = 0,         // Set SCK to max rate of F_CPU/2. See Sd2Card::setSckRate().
42
+              SPI_HALF_SPEED = 1,         // Set SCK rate to F_CPU/4. See Sd2Card::setSckRate().
43
+              SPI_QUARTER_SPEED = 2,      // Set SCK rate to F_CPU/8. See Sd2Card::setSckRate().
44
+              SPI_EIGHTH_SPEED = 3,       // Set SCK rate to F_CPU/16. See Sd2Card::setSckRate().
45
+              SPI_SIXTEENTH_SPEED = 4;    // Set SCK rate to F_CPU/32. See Sd2Card::setSckRate().
46
+
47
+uint16_t const SD_INIT_TIMEOUT = 2000,    // init timeout ms
48
+               SD_ERASE_TIMEOUT = 10000,  // erase timeout ms
49
+               SD_READ_TIMEOUT = 300,     // read timeout ms
50
+               SD_WRITE_TIMEOUT = 600;    // write time out ms
51
+
63
 // SD card errors
52
 // SD card errors
64
-/** timeout error for command CMD0 (initialize card in SPI mode) */
65
-uint8_t const SD_CARD_ERROR_CMD0 = 0X1;
66
-/** CMD8 was not accepted - not a valid SD card*/
67
-uint8_t const SD_CARD_ERROR_CMD8 = 0X2;
68
-/** card returned an error response for CMD12 (write stop) */
69
-uint8_t const SD_CARD_ERROR_CMD12 = 0X3;
70
-/** card returned an error response for CMD17 (read block) */
71
-uint8_t const SD_CARD_ERROR_CMD17 = 0X4;
72
-/** card returned an error response for CMD18 (read multiple block) */
73
-uint8_t const SD_CARD_ERROR_CMD18 = 0X5;
74
-/** card returned an error response for CMD24 (write block) */
75
-uint8_t const SD_CARD_ERROR_CMD24 = 0X6;
76
-/**  WRITE_MULTIPLE_BLOCKS command failed */
77
-uint8_t const SD_CARD_ERROR_CMD25 = 0X7;
78
-/** card returned an error response for CMD58 (read OCR) */
79
-uint8_t const SD_CARD_ERROR_CMD58 = 0X8;
80
-/** SET_WR_BLK_ERASE_COUNT failed */
81
-uint8_t const SD_CARD_ERROR_ACMD23 = 0X9;
82
-/** ACMD41 initialization process timeout */
83
-uint8_t const SD_CARD_ERROR_ACMD41 = 0XA;
84
-/** card returned a bad CSR version field */
85
-uint8_t const SD_CARD_ERROR_BAD_CSD = 0XB;
86
-/** erase block group command failed */
87
-uint8_t const SD_CARD_ERROR_ERASE = 0XC;
88
-/** card not capable of single block erase */
89
-uint8_t const SD_CARD_ERROR_ERASE_SINGLE_BLOCK = 0XD;
90
-/** Erase sequence timed out */
91
-uint8_t const SD_CARD_ERROR_ERASE_TIMEOUT = 0XE;
92
-/** card returned an error token instead of read data */
93
-uint8_t const SD_CARD_ERROR_READ = 0XF;
94
-/** read CID or CSD failed */
95
-uint8_t const SD_CARD_ERROR_READ_REG = 0x10;
96
-/** timeout while waiting for start of read data */
97
-uint8_t const SD_CARD_ERROR_READ_TIMEOUT = 0x11;
98
-/** card did not accept STOP_TRAN_TOKEN */
99
-uint8_t const SD_CARD_ERROR_STOP_TRAN = 0x12;
100
-/** card returned an error token as a response to a write operation */
101
-uint8_t const SD_CARD_ERROR_WRITE = 0x13;
102
-/** attempt to write protected block zero */
103
-uint8_t const SD_CARD_ERROR_WRITE_BLOCK_ZERO = 0x14;  // REMOVE - not used
104
-/** card did not go ready for a multiple block write */
105
-uint8_t const SD_CARD_ERROR_WRITE_MULTIPLE = 0x15;
106
-/** card returned an error to a CMD13 status check after a write */
107
-uint8_t const SD_CARD_ERROR_WRITE_PROGRAMMING = 0x16;
108
-/** timeout occurred during write programming */
109
-uint8_t const SD_CARD_ERROR_WRITE_TIMEOUT = 0x17;
110
-/** incorrect rate selected */
111
-uint8_t const SD_CARD_ERROR_SCK_RATE = 0x18;
112
-/** init() not called */
113
-uint8_t const SD_CARD_ERROR_INIT_NOT_CALLED = 0x19;
114
-/** crc check error */
115
-uint8_t const SD_CARD_ERROR_CRC = 0x20;
116
-//------------------------------------------------------------------------------
53
+uint8_t const SD_CARD_ERROR_CMD0 = 0X1,                 // timeout error for command CMD0 (initialize card in SPI mode)
54
+              SD_CARD_ERROR_CMD8 = 0X2,                 // CMD8 was not accepted - not a valid SD card
55
+              SD_CARD_ERROR_CMD12 = 0X3,                // card returned an error response for CMD12 (write stop)
56
+              SD_CARD_ERROR_CMD17 = 0X4,                // card returned an error response for CMD17 (read block)
57
+              SD_CARD_ERROR_CMD18 = 0X5,                // card returned an error response for CMD18 (read multiple block)
58
+              SD_CARD_ERROR_CMD24 = 0X6,                // card returned an error response for CMD24 (write block)
59
+              SD_CARD_ERROR_CMD25 = 0X7,                // WRITE_MULTIPLE_BLOCKS command failed
60
+              SD_CARD_ERROR_CMD58 = 0X8,                // card returned an error response for CMD58 (read OCR)
61
+              SD_CARD_ERROR_ACMD23 = 0X9,               // SET_WR_BLK_ERASE_COUNT failed
62
+              SD_CARD_ERROR_ACMD41 = 0XA,               // ACMD41 initialization process timeout
63
+              SD_CARD_ERROR_BAD_CSD = 0XB,              // card returned a bad CSR version field
64
+              SD_CARD_ERROR_ERASE = 0XC,                // erase block group command failed
65
+              SD_CARD_ERROR_ERASE_SINGLE_BLOCK = 0XD,   // card not capable of single block erase
66
+              SD_CARD_ERROR_ERASE_TIMEOUT = 0XE,        // Erase sequence timed out
67
+              SD_CARD_ERROR_READ = 0XF,                 // card returned an error token instead of read data
68
+              SD_CARD_ERROR_READ_REG = 0x10,            // read CID or CSD failed
69
+              SD_CARD_ERROR_READ_TIMEOUT = 0x11,        // timeout while waiting for start of read data
70
+              SD_CARD_ERROR_STOP_TRAN = 0x12,           // card did not accept STOP_TRAN_TOKEN
71
+              SD_CARD_ERROR_WRITE = 0x13,               // card returned an error token as a response to a write operation
72
+              SD_CARD_ERROR_WRITE_BLOCK_ZERO = 0x14,    // REMOVE - not used ... attempt to write protected block zero
73
+              SD_CARD_ERROR_WRITE_MULTIPLE = 0x15,      // card did not go ready for a multiple block write
74
+              SD_CARD_ERROR_WRITE_PROGRAMMING = 0x16,   // card returned an error to a CMD13 status check after a write
75
+              SD_CARD_ERROR_WRITE_TIMEOUT = 0x17,       // timeout occurred during write programming
76
+              SD_CARD_ERROR_SCK_RATE = 0x18,            // incorrect rate selected
77
+              SD_CARD_ERROR_INIT_NOT_CALLED = 0x19,     // init() not called
78
+              SD_CARD_ERROR_CRC = 0x20;                 // crc check error
79
+
117
 // card types
80
 // card types
118
-/** Standard capacity V1 SD card */
119
-uint8_t const SD_CARD_TYPE_SD1  = 1;
120
-/** Standard capacity V2 SD card */
121
-uint8_t const SD_CARD_TYPE_SD2  = 2;
122
-/** High Capacity SD card */
123
-uint8_t const SD_CARD_TYPE_SDHC = 3;
81
+uint8_t const SD_CARD_TYPE_SD1  = 1,                    // Standard capacity V1 SD card
82
+              SD_CARD_TYPE_SD2  = 2,                    // Standard capacity V2 SD card
83
+              SD_CARD_TYPE_SDHC = 3;                    // High Capacity SD card
84
+
124
 /**
85
 /**
125
  * define SOFTWARE_SPI to use bit-bang SPI
86
  * define SOFTWARE_SPI to use bit-bang SPI
126
  */
87
  */
127
-//------------------------------------------------------------------------------
128
 #if MEGA_SOFT_SPI
88
 #if MEGA_SOFT_SPI
129
   #define SOFTWARE_SPI
89
   #define SOFTWARE_SPI
130
 #elif USE_SOFTWARE_SPI
90
 #elif USE_SOFTWARE_SPI
131
   #define SOFTWARE_SPI
91
   #define SOFTWARE_SPI
132
-#endif  // MEGA_SOFT_SPI
133
-//------------------------------------------------------------------------------
92
+#endif
93
+
134
 // SPI pin definitions - do not edit here - change in SdFatConfig.h
94
 // SPI pin definitions - do not edit here - change in SdFatConfig.h
135
-//
136
 #if DISABLED(SOFTWARE_SPI)
95
 #if DISABLED(SOFTWARE_SPI)
137
   // hardware pin defs
96
   // hardware pin defs
138
-  /** The default chip select pin for the SD card is SS. */
139
-  #define SD_CHIP_SELECT_PIN SS_PIN
97
+  #define SD_CHIP_SELECT_PIN SS_PIN   // The default chip select pin for the SD card is SS.
140
   // The following three pins must not be redefined for hardware SPI.
98
   // The following three pins must not be redefined for hardware SPI.
141
-  /** SPI Master Out Slave In pin */
142
-  #define SPI_MOSI_PIN MOSI_PIN
143
-  /** SPI Master In Slave Out pin */
144
-  #define SPI_MISO_PIN MISO_PIN
145
-  /** SPI Clock pin */
146
-  #define SPI_SCK_PIN SCK_PIN
147
-
99
+  #define SPI_MOSI_PIN MOSI_PIN       // SPI Master Out Slave In pin
100
+  #define SPI_MISO_PIN MISO_PIN       // SPI Master In Slave Out pin
101
+  #define SPI_SCK_PIN SCK_PIN         // SPI Clock pin
148
 #else  // SOFTWARE_SPI
102
 #else  // SOFTWARE_SPI
149
-
150
-  /** SPI chip select pin */
151
-  #define SD_CHIP_SELECT_PIN SOFT_SPI_CS_PIN
152
-  /** SPI Master Out Slave In pin */
153
-  #define SPI_MOSI_PIN SOFT_SPI_MOSI_PIN
154
-  /** SPI Master In Slave Out pin */
155
-  #define SPI_MISO_PIN SOFT_SPI_MISO_PIN
156
-  /** SPI Clock pin */
157
-  #define SPI_SCK_PIN SOFT_SPI_SCK_PIN
103
+  #define SD_CHIP_SELECT_PIN SOFT_SPI_CS_PIN  // SPI chip select pin
104
+  #define SPI_MOSI_PIN SOFT_SPI_MOSI_PIN      // SPI Master Out Slave In pin
105
+  #define SPI_MISO_PIN SOFT_SPI_MISO_PIN      // SPI Master In Slave Out pin
106
+  #define SPI_SCK_PIN SOFT_SPI_SCK_PIN        // SPI Clock pin
158
 #endif  // SOFTWARE_SPI
107
 #endif  // SOFTWARE_SPI
159
-//------------------------------------------------------------------------------
108
+
160
 /**
109
 /**
161
  * \class Sd2Card
110
  * \class Sd2Card
162
  * \brief Raw access to SD and SDHC flash memory cards.
111
  * \brief Raw access to SD and SDHC flash memory cards.
163
  */
112
  */
164
 class Sd2Card {
113
 class Sd2Card {
165
- public:
166
-  /** Construct an instance of Sd2Card. */
114
+  public:
115
+
167
   Sd2Card() : errorCode_(SD_CARD_ERROR_INIT_NOT_CALLED), type_(0) {}
116
   Sd2Card() : errorCode_(SD_CARD_ERROR_INIT_NOT_CALLED), type_(0) {}
117
+
168
   uint32_t cardSize();
118
   uint32_t cardSize();
169
   bool erase(uint32_t firstBlock, uint32_t lastBlock);
119
   bool erase(uint32_t firstBlock, uint32_t lastBlock);
170
   bool eraseSingleBlockEnable();
120
   bool eraseSingleBlockEnable();
121
+
171
   /**
122
   /**
172
    *  Set SD error code.
123
    *  Set SD error code.
173
    *  \param[in] code value for error code.
124
    *  \param[in] code value for error code.
174
    */
125
    */
175
   void error(uint8_t code) {errorCode_ = code;}
126
   void error(uint8_t code) {errorCode_ = code;}
127
+
176
   /**
128
   /**
177
    * \return error code for last error. See Sd2Card.h for a list of error codes.
129
    * \return error code for last error. See Sd2Card.h for a list of error codes.
178
    */
130
    */
179
   int errorCode() const {return errorCode_;}
131
   int errorCode() const {return errorCode_;}
132
+
180
   /** \return error data for last error. */
133
   /** \return error data for last error. */
181
   int errorData() const {return status_;}
134
   int errorData() const {return status_;}
135
+
182
   /**
136
   /**
183
    * Initialize an SD flash memory card with default clock rate and chip
137
    * Initialize an SD flash memory card with default clock rate and chip
184
    * select pin.  See sd2Card::init(uint8_t sckRateID, uint8_t chipSelectPin).
138
    * select pin.  See sd2Card::init(uint8_t sckRateID, uint8_t chipSelectPin).
188
   bool init(uint8_t sckRateID = SPI_FULL_SPEED,
142
   bool init(uint8_t sckRateID = SPI_FULL_SPEED,
189
             uint8_t chipSelectPin = SD_CHIP_SELECT_PIN);
143
             uint8_t chipSelectPin = SD_CHIP_SELECT_PIN);
190
   bool readBlock(uint32_t block, uint8_t* dst);
144
   bool readBlock(uint32_t block, uint8_t* dst);
145
+
191
   /**
146
   /**
192
    * Read a card's CID register. The CID contains card identification
147
    * Read a card's CID register. The CID contains card identification
193
    * information such as Manufacturer ID, Product name, Product serial
148
    * information such as Manufacturer ID, Product name, Product serial
197
    *
152
    *
198
    * \return true for success or false for failure.
153
    * \return true for success or false for failure.
199
    */
154
    */
200
-  bool readCID(cid_t* cid) {
201
-    return readRegister(CMD10, cid);
202
-  }
155
+  bool readCID(cid_t* cid) { return readRegister(CMD10, cid); }
156
+
203
   /**
157
   /**
204
    * Read a card's CSD register. The CSD contains Card-Specific Data that
158
    * Read a card's CSD register. The CSD contains Card-Specific Data that
205
    * provides information regarding access to the card's contents.
159
    * provides information regarding access to the card's contents.
208
    *
162
    *
209
    * \return true for success or false for failure.
163
    * \return true for success or false for failure.
210
    */
164
    */
211
-  bool readCSD(csd_t* csd) {
212
-    return readRegister(CMD9, csd);
213
-  }
165
+  bool readCSD(csd_t* csd) { return readRegister(CMD9, csd); }
166
+
214
   bool readData(uint8_t* dst);
167
   bool readData(uint8_t* dst);
215
   bool readStart(uint32_t blockNumber);
168
   bool readStart(uint32_t blockNumber);
216
   bool readStop();
169
   bool readStop();
217
   bool setSckRate(uint8_t sckRateID);
170
   bool setSckRate(uint8_t sckRateID);
218
-  /** Return the card type: SD V1, SD V2 or SDHC
171
+  /**
172
+   * Return the card type: SD V1, SD V2 or SDHC
219
    * \return 0 - SD V1, 1 - SD V2, or 3 - SDHC.
173
    * \return 0 - SD V1, 1 - SD V2, or 3 - SDHC.
220
    */
174
    */
221
   int type() const {return type_;}
175
   int type() const {return type_;}
223
   bool writeData(const uint8_t* src);
177
   bool writeData(const uint8_t* src);
224
   bool writeStart(uint32_t blockNumber, uint32_t eraseCount);
178
   bool writeStart(uint32_t blockNumber, uint32_t eraseCount);
225
   bool writeStop();
179
   bool writeStop();
226
- private:
227
-  //----------------------------------------------------------------------------
228
-  uint8_t chipSelectPin_;
229
-  uint8_t errorCode_;
230
-  uint8_t spiRate_;
231
-  uint8_t status_;
232
-  uint8_t type_;
180
+
181
+  private:
182
+  uint8_t chipSelectPin_,
183
+          errorCode_,
184
+          spiRate_,
185
+          status_,
186
+          type_;
187
+
233
   // private functions
188
   // private functions
234
   uint8_t cardAcmd(uint8_t cmd, uint32_t arg) {
189
   uint8_t cardAcmd(uint8_t cmd, uint32_t arg) {
235
     cardCommand(CMD55, 0);
190
     cardCommand(CMD55, 0);
241
   bool readRegister(uint8_t cmd, void* buf);
196
   bool readRegister(uint8_t cmd, void* buf);
242
   void chipSelectHigh();
197
   void chipSelectHigh();
243
   void chipSelectLow();
198
   void chipSelectLow();
244
-  void type(uint8_t value) {type_ = value;}
199
+  void type(uint8_t value) { type_ = value; }
245
   bool waitNotBusy(uint16_t timeoutMillis);
200
   bool waitNotBusy(uint16_t timeoutMillis);
246
   bool writeData(uint8_t token, const uint8_t* src);
201
   bool writeData(uint8_t token, const uint8_t* src);
247
 };
202
 };
248
-#endif  // Sd2Card_h
249
 
203
 
250
-
251
-#endif
204
+#endif  // _SD2CARD_H_

+ 317
- 414
Marlin/SdBaseFile.cpp
Різницю між файлами не показано, бо вона завелика
Переглянути файл


+ 229
- 220
Marlin/SdBaseFile.h Переглянути файл

21
  */
21
  */
22
 
22
 
23
 /**
23
 /**
24
+ * \file
25
+ * \brief SdBaseFile class
26
+ */
27
+
28
+/**
24
  * Arduino SdFat Library
29
  * Arduino SdFat Library
25
  * Copyright (C) 2009 by William Greiman
30
  * Copyright (C) 2009 by William Greiman
26
  *
31
  *
27
  * This file is part of the Arduino Sd2Card Library
32
  * This file is part of the Arduino Sd2Card Library
28
  */
33
  */
29
-#include "Marlin.h"
30
-#if ENABLED(SDSUPPORT)
34
+#ifndef _SDBASEFILE_H_
35
+#define _SDBASEFILE_H_
31
 
36
 
32
-#ifndef SdBaseFile_h
33
-#define SdBaseFile_h
34
-/**
35
- * \file
36
- * \brief SdBaseFile class
37
- */
38
-#include "Marlin.h"
39
 #include "SdFatConfig.h"
37
 #include "SdFatConfig.h"
40
 #include "SdVolume.h"
38
 #include "SdVolume.h"
41
-//------------------------------------------------------------------------------
39
+
42
 /**
40
 /**
43
  * \struct filepos_t
41
  * \struct filepos_t
44
  * \brief internal type for istream
42
  * \brief internal type for istream
45
  * do not use in user apps
43
  * do not use in user apps
46
  */
44
  */
47
 struct filepos_t {
45
 struct filepos_t {
48
-  /** stream position */
49
-  uint32_t position;
50
-  /** cluster for position */
51
-  uint32_t cluster;
46
+  uint32_t position;  // stream byte position
47
+  uint32_t cluster;   // cluster of position
52
   filepos_t() : position(0), cluster(0) {}
48
   filepos_t() : position(0), cluster(0) {}
53
 };
49
 };
54
 
50
 
55
 // use the gnu style oflag in open()
51
 // use the gnu style oflag in open()
56
-/** open() oflag for reading */
57
-uint8_t const O_READ = 0x01;
58
-/** open() oflag - same as O_IN */
59
-uint8_t const O_RDONLY = O_READ;
60
-/** open() oflag for write */
61
-uint8_t const O_WRITE = 0x02;
62
-/** open() oflag - same as O_WRITE */
63
-uint8_t const O_WRONLY = O_WRITE;
64
-/** open() oflag for reading and writing */
65
-uint8_t const O_RDWR = (O_READ | O_WRITE);
66
-/** open() oflag mask for access modes */
67
-uint8_t const O_ACCMODE = (O_READ | O_WRITE);
68
-/** The file offset shall be set to the end of the file prior to each write. */
69
-uint8_t const O_APPEND = 0x04;
70
-/** synchronous writes - call sync() after each write */
71
-uint8_t const O_SYNC = 0x08;
72
-/** truncate the file to zero length */
73
-uint8_t const O_TRUNC = 0x10;
74
-/** set the initial position at the end of the file */
75
-uint8_t const O_AT_END = 0x20;
76
-/** create the file if nonexistent */
77
-uint8_t const O_CREAT = 0x40;
78
-/** If O_CREAT and O_EXCL are set, open() shall fail if the file exists */
79
-uint8_t const O_EXCL = 0x80;
52
+uint8_t const O_READ = 0x01,                    // open() oflag for reading
53
+              O_RDONLY = O_READ,                // open() oflag - same as O_IN
54
+              O_WRITE = 0x02,                   // open() oflag for write
55
+              O_WRONLY = O_WRITE,               // open() oflag - same as O_WRITE
56
+              O_RDWR = (O_READ | O_WRITE),      // open() oflag for reading and writing
57
+              O_ACCMODE = (O_READ | O_WRITE),   // open() oflag mask for access modes
58
+              O_APPEND = 0x04,                  // The file offset shall be set to the end of the file prior to each write.
59
+              O_SYNC = 0x08,                    // Synchronous writes - call sync() after each write
60
+              O_TRUNC = 0x10,                   // Truncate the file to zero length
61
+              O_AT_END = 0x20,                  // Set the initial position at the end of the file
62
+              O_CREAT = 0x40,                   // Create the file if nonexistent
63
+              O_EXCL = 0x80;                    // If O_CREAT and O_EXCL are set, open() shall fail if the file exists
80
 
64
 
81
 // SdBaseFile class static and const definitions
65
 // SdBaseFile class static and const definitions
66
+
82
 // flags for ls()
67
 // flags for ls()
83
-/** ls() flag to print modify date */
84
-uint8_t const LS_DATE = 1;
85
-/** ls() flag to print file size */
86
-uint8_t const LS_SIZE = 2;
87
-/** ls() flag for recursive list of subdirectories */
88
-uint8_t const LS_R = 4;
68
+uint8_t const LS_DATE = 1,    // ls() flag to print modify date
69
+              LS_SIZE = 2,    // ls() flag to print file size
70
+              LS_R = 4;       // ls() flag for recursive list of subdirectories
89
 
71
 
90
 
72
 
91
 // flags for timestamp
73
 // flags for timestamp
92
-/** set the file's last access date */
93
-uint8_t const T_ACCESS = 1;
94
-/** set the file's creation date and time */
95
-uint8_t const T_CREATE = 2;
96
-/** Set the file's write date and time */
97
-uint8_t const T_WRITE = 4;
74
+uint8_t const T_ACCESS = 1,   // Set the file's last access date
75
+              T_CREATE = 2,   // Set the file's creation date and time
76
+              T_WRITE = 4;    // Set the file's write date and time
77
+
98
 // values for type_
78
 // values for type_
99
-/** This file has not been opened. */
100
-uint8_t const FAT_FILE_TYPE_CLOSED = 0;
101
-/** A normal file */
102
-uint8_t const FAT_FILE_TYPE_NORMAL = 1;
103
-/** A FAT12 or FAT16 root directory */
104
-uint8_t const FAT_FILE_TYPE_ROOT_FIXED = 2;
105
-/** A FAT32 root directory */
106
-uint8_t const FAT_FILE_TYPE_ROOT32 = 3;
107
-/** A subdirectory file*/
108
-uint8_t const FAT_FILE_TYPE_SUBDIR = 4;
109
-/** Test value for directory type */
110
-uint8_t const FAT_FILE_TYPE_MIN_DIR = FAT_FILE_TYPE_ROOT_FIXED;
111
-
112
-/** date field for FAT directory entry
79
+uint8_t const FAT_FILE_TYPE_CLOSED = 0,                           // This file has not been opened.
80
+              FAT_FILE_TYPE_NORMAL = 1,                           // A normal file
81
+              FAT_FILE_TYPE_ROOT_FIXED = 2,                       // A FAT12 or FAT16 root directory
82
+              FAT_FILE_TYPE_ROOT32 = 3,                           // A FAT32 root directory
83
+              FAT_FILE_TYPE_SUBDIR = 4,                           // A subdirectory file
84
+              FAT_FILE_TYPE_MIN_DIR = FAT_FILE_TYPE_ROOT_FIXED;   // Test value for directory type
85
+
86
+/**
87
+ * date field for FAT directory entry
113
  * \param[in] year [1980,2107]
88
  * \param[in] year [1980,2107]
114
  * \param[in] month [1,12]
89
  * \param[in] month [1,12]
115
  * \param[in] day [1,31]
90
  * \param[in] day [1,31]
116
  *
91
  *
117
  * \return Packed date for dir_t entry.
92
  * \return Packed date for dir_t entry.
118
  */
93
  */
119
-static inline uint16_t FAT_DATE(uint16_t year, uint8_t month, uint8_t day) {
120
-  return (year - 1980) << 9 | month << 5 | day;
121
-}
122
-/** year part of FAT directory date field
94
+static inline uint16_t FAT_DATE(uint16_t year, uint8_t month, uint8_t day) { return (year - 1980) << 9 | month << 5 | day; }
95
+
96
+/**
97
+ * year part of FAT directory date field
123
  * \param[in] fatDate Date in packed dir format.
98
  * \param[in] fatDate Date in packed dir format.
124
  *
99
  *
125
  * \return Extracted year [1980,2107]
100
  * \return Extracted year [1980,2107]
126
  */
101
  */
127
-static inline uint16_t FAT_YEAR(uint16_t fatDate) {
128
-  return 1980 + (fatDate >> 9);
129
-}
130
-/** month part of FAT directory date field
102
+static inline uint16_t FAT_YEAR(uint16_t fatDate) { return 1980 + (fatDate >> 9); }
103
+
104
+/**
105
+ * month part of FAT directory date field
131
  * \param[in] fatDate Date in packed dir format.
106
  * \param[in] fatDate Date in packed dir format.
132
  *
107
  *
133
  * \return Extracted month [1,12]
108
  * \return Extracted month [1,12]
134
  */
109
  */
135
-static inline uint8_t FAT_MONTH(uint16_t fatDate) {
136
-  return (fatDate >> 5) & 0XF;
137
-}
138
-/** day part of FAT directory date field
110
+static inline uint8_t FAT_MONTH(uint16_t fatDate) { return (fatDate >> 5) & 0XF; }
111
+
112
+/**
113
+ * day part of FAT directory date field
139
  * \param[in] fatDate Date in packed dir format.
114
  * \param[in] fatDate Date in packed dir format.
140
  *
115
  *
141
  * \return Extracted day [1,31]
116
  * \return Extracted day [1,31]
142
  */
117
  */
143
-static inline uint8_t FAT_DAY(uint16_t fatDate) {
144
-  return fatDate & 0x1F;
145
-}
146
-/** time field for FAT directory entry
118
+static inline uint8_t FAT_DAY(uint16_t fatDate) { return fatDate & 0x1F; }
119
+
120
+/**
121
+ * time field for FAT directory entry
147
  * \param[in] hour [0,23]
122
  * \param[in] hour [0,23]
148
  * \param[in] minute [0,59]
123
  * \param[in] minute [0,59]
149
  * \param[in] second [0,59]
124
  * \param[in] second [0,59]
150
  *
125
  *
151
  * \return Packed time for dir_t entry.
126
  * \return Packed time for dir_t entry.
152
  */
127
  */
153
-static inline uint16_t FAT_TIME(uint8_t hour, uint8_t minute, uint8_t second) {
154
-  return hour << 11 | minute << 5 | second >> 1;
155
-}
156
-/** hour part of FAT directory time field
128
+static inline uint16_t FAT_TIME(uint8_t hour, uint8_t minute, uint8_t second) { return hour << 11 | minute << 5 | second >> 1; }
129
+
130
+/**
131
+ * hour part of FAT directory time field
157
  * \param[in] fatTime Time in packed dir format.
132
  * \param[in] fatTime Time in packed dir format.
158
  *
133
  *
159
  * \return Extracted hour [0,23]
134
  * \return Extracted hour [0,23]
160
  */
135
  */
161
-static inline uint8_t FAT_HOUR(uint16_t fatTime) {
162
-  return fatTime >> 11;
163
-}
164
-/** minute part of FAT directory time field
136
+static inline uint8_t FAT_HOUR(uint16_t fatTime) { return fatTime >> 11; }
137
+
138
+/**
139
+ * minute part of FAT directory time field
165
  * \param[in] fatTime Time in packed dir format.
140
  * \param[in] fatTime Time in packed dir format.
166
  *
141
  *
167
  * \return Extracted minute [0,59]
142
  * \return Extracted minute [0,59]
168
  */
143
  */
169
-static inline uint8_t FAT_MINUTE(uint16_t fatTime) {
170
-  return (fatTime >> 5) & 0x3F;
171
-}
172
-/** second part of FAT directory time field
144
+static inline uint8_t FAT_MINUTE(uint16_t fatTime) { return (fatTime >> 5) & 0x3F; }
145
+
146
+/**
147
+ * second part of FAT directory time field
173
  * Note second/2 is stored in packed time.
148
  * Note second/2 is stored in packed time.
174
  *
149
  *
175
  * \param[in] fatTime Time in packed dir format.
150
  * \param[in] fatTime Time in packed dir format.
176
  *
151
  *
177
  * \return Extracted second [0,58]
152
  * \return Extracted second [0,58]
178
  */
153
  */
179
-static inline uint8_t FAT_SECOND(uint16_t fatTime) {
180
-  return 2 * (fatTime & 0x1F);
181
-}
182
-/** Default date for file timestamps is 1 Jan 2000 */
154
+static inline uint8_t FAT_SECOND(uint16_t fatTime) { return 2 * (fatTime & 0x1F); }
155
+
156
+// Default date for file timestamps is 1 Jan 2000
183
 uint16_t const FAT_DEFAULT_DATE = ((2000 - 1980) << 9) | (1 << 5) | 1;
157
 uint16_t const FAT_DEFAULT_DATE = ((2000 - 1980) << 9) | (1 << 5) | 1;
184
-/** Default time for file timestamp is 1 am */
158
+// Default time for file timestamp is 1 am
185
 uint16_t const FAT_DEFAULT_TIME = (1 << 11);
159
 uint16_t const FAT_DEFAULT_TIME = (1 << 11);
186
-//------------------------------------------------------------------------------
160
+
187
 /**
161
 /**
188
  * \class SdBaseFile
162
  * \class SdBaseFile
189
  * \brief Base class for SdFile with Print and C++ streams.
163
  * \brief Base class for SdFile with Print and C++ streams.
190
  */
164
  */
191
 class SdBaseFile {
165
 class SdBaseFile {
192
  public:
166
  public:
193
-  /** Create an instance. */
194
   SdBaseFile() : writeError(false), type_(FAT_FILE_TYPE_CLOSED) {}
167
   SdBaseFile() : writeError(false), type_(FAT_FILE_TYPE_CLOSED) {}
195
   SdBaseFile(const char* path, uint8_t oflag);
168
   SdBaseFile(const char* path, uint8_t oflag);
196
-  ~SdBaseFile() {if (isOpen()) close();}
169
+  ~SdBaseFile() { if (isOpen()) close(); }
170
+
197
   /**
171
   /**
198
    * writeError is set to true if an error occurs during a write().
172
    * writeError is set to true if an error occurs during a write().
199
    * Set writeError to false before calling print() and/or write() and check
173
    * Set writeError to false before calling print() and/or write() and check
200
    * for true after calls to print() and/or write().
174
    * for true after calls to print() and/or write().
201
    */
175
    */
202
   bool writeError;
176
   bool writeError;
203
-  //----------------------------------------------------------------------------
177
+
204
   // helpers for stream classes
178
   // helpers for stream classes
205
-  /** get position for streams
179
+
180
+  /**
181
+   * get position for streams
206
    * \param[out] pos struct to receive position
182
    * \param[out] pos struct to receive position
207
    */
183
    */
208
   void getpos(filepos_t* pos);
184
   void getpos(filepos_t* pos);
209
-  /** set position for streams
185
+
186
+  /**
187
+   * set position for streams
210
    * \param[out] pos struct with value for new position
188
    * \param[out] pos struct with value for new position
211
    */
189
    */
212
   void setpos(filepos_t* pos);
190
   void setpos(filepos_t* pos);
213
-  //----------------------------------------------------------------------------
191
+
214
   bool close();
192
   bool close();
215
   bool contiguousRange(uint32_t* bgnBlock, uint32_t* endBlock);
193
   bool contiguousRange(uint32_t* bgnBlock, uint32_t* endBlock);
216
   bool createContiguous(SdBaseFile* dirFile,
194
   bool createContiguous(SdBaseFile* dirFile,
217
                         const char* path, uint32_t size);
195
                         const char* path, uint32_t size);
218
-  /** \return The current cluster number for a file or directory. */
219
-  uint32_t curCluster() const {return curCluster_;}
220
-  /** \return The current position for a file or directory. */
221
-  uint32_t curPosition() const {return curPosition_;}
222
-  /** \return Current working directory */
223
-  static SdBaseFile* cwd() {return cwd_;}
224
-  /** Set the date/time callback function
196
+  /**
197
+   * \return The current cluster number for a file or directory.
198
+   */
199
+  uint32_t curCluster() const { return curCluster_; }
200
+
201
+  /**
202
+   * \return The current position for a file or directory.
203
+   */
204
+  uint32_t curPosition() const { return curPosition_; }
205
+
206
+  /**
207
+   * \return Current working directory
208
+   */
209
+  static SdBaseFile* cwd() { return cwd_; }
210
+
211
+  /**
212
+   * Set the date/time callback function
225
    *
213
    *
226
    * \param[in] dateTime The user's call back function.  The callback
214
    * \param[in] dateTime The user's call back function.  The callback
227
    * function is of the form:
215
    * function is of the form:
252
     void (*dateTime)(uint16_t* date, uint16_t* time)) {
240
     void (*dateTime)(uint16_t* date, uint16_t* time)) {
253
     dateTime_ = dateTime;
241
     dateTime_ = dateTime;
254
   }
242
   }
255
-  /**  Cancel the date/time callback function. */
256
-  static void dateTimeCallbackCancel() {dateTime_ = 0;}
243
+
244
+  /**
245
+   * Cancel the date/time callback function.
246
+   */
247
+  static void dateTimeCallbackCancel() { dateTime_ = 0; }
257
   bool dirEntry(dir_t* dir);
248
   bool dirEntry(dir_t* dir);
258
   static void dirName(const dir_t& dir, char* name);
249
   static void dirName(const dir_t& dir, char* name);
259
   bool exists(const char* name);
250
   bool exists(const char* name);
260
   int16_t fgets(char* str, int16_t num, char* delim = 0);
251
   int16_t fgets(char* str, int16_t num, char* delim = 0);
261
-  /** \return The total number of bytes in a file or directory. */
262
-  uint32_t fileSize() const {return fileSize_;}
263
-  /** \return The first cluster number for a file or directory. */
264
-  uint32_t firstCluster() const {return firstCluster_;}
265
-  bool getFilename(char* name);
266
-  /** \return True if this is a directory else false. */
267
-  bool isDir() const {return type_ >= FAT_FILE_TYPE_MIN_DIR;}
268
-  /** \return True if this is a normal file else false. */
269
-  bool isFile() const {return type_ == FAT_FILE_TYPE_NORMAL;}
270
-  /** \return True if this is an open file/directory else false. */
271
-  bool isOpen() const {return type_ != FAT_FILE_TYPE_CLOSED;}
272
-  /** \return True if this is a subdirectory else false. */
273
-  bool isSubDir() const {return type_ == FAT_FILE_TYPE_SUBDIR;}
274
-  /** \return True if this is the root directory. */
275
-  bool isRoot() const {
276
-    return type_ == FAT_FILE_TYPE_ROOT_FIXED || type_ == FAT_FILE_TYPE_ROOT32;
277
-  }
252
+
253
+  /**
254
+   * \return The total number of bytes in a file or directory.
255
+   */
256
+  uint32_t fileSize() const { return fileSize_; }
257
+
258
+  /**
259
+   * \return The first cluster number for a file or directory.
260
+   */
261
+  uint32_t firstCluster() const { return firstCluster_; }
262
+
263
+  /**
264
+   * \return True if this is a directory else false.
265
+   */
266
+  bool isDir() const { return type_ >= FAT_FILE_TYPE_MIN_DIR; }
267
+
268
+  /**
269
+   * \return True if this is a normal file else false.
270
+   */
271
+  bool isFile() const { return type_ == FAT_FILE_TYPE_NORMAL; }
272
+
273
+  /**
274
+   * \return True if this is an open file/directory else false.
275
+   */
276
+  bool isOpen() const { return type_ != FAT_FILE_TYPE_CLOSED; }
277
+
278
+  /**
279
+   * \return True if this is a subdirectory else false.
280
+   */
281
+  bool isSubDir() const { return type_ == FAT_FILE_TYPE_SUBDIR; }
282
+
283
+  /**
284
+   * \return True if this is the root directory.
285
+   */
286
+  bool isRoot() const { return type_ == FAT_FILE_TYPE_ROOT_FIXED || type_ == FAT_FILE_TYPE_ROOT32; }
287
+
288
+  bool getFilename(char * const name);
278
   void ls(uint8_t flags = 0, uint8_t indent = 0);
289
   void ls(uint8_t flags = 0, uint8_t indent = 0);
290
+
279
   bool mkdir(SdBaseFile* dir, const char* path, bool pFlag = true);
291
   bool mkdir(SdBaseFile* dir, const char* path, bool pFlag = true);
280
-  // alias for backward compactability
281
-  bool makeDir(SdBaseFile* dir, const char* path) {
282
-    return mkdir(dir, path, false);
283
-  }
284
   bool open(SdBaseFile* dirFile, uint16_t index, uint8_t oflag);
292
   bool open(SdBaseFile* dirFile, uint16_t index, uint8_t oflag);
285
   bool open(SdBaseFile* dirFile, const char* path, uint8_t oflag);
293
   bool open(SdBaseFile* dirFile, const char* path, uint8_t oflag);
286
   bool open(const char* path, uint8_t oflag = O_READ);
294
   bool open(const char* path, uint8_t oflag = O_READ);
295
   int8_t readDir(dir_t* dir, char* longFilename);
303
   int8_t readDir(dir_t* dir, char* longFilename);
296
   static bool remove(SdBaseFile* dirFile, const char* path);
304
   static bool remove(SdBaseFile* dirFile, const char* path);
297
   bool remove();
305
   bool remove();
298
-  /** Set the file's current position to zero. */
299
-  void rewind() {seekSet(0);}
306
+
307
+  /**
308
+   * Set the file's current position to zero.
309
+   */
310
+  void rewind() { seekSet(0); }
300
   bool rename(SdBaseFile* dirFile, const char* newPath);
311
   bool rename(SdBaseFile* dirFile, const char* newPath);
301
   bool rmdir();
312
   bool rmdir();
302
-  // for backward compatibility
303
-  bool rmDir() {return rmdir();}
304
   bool rmRfStar();
313
   bool rmRfStar();
305
-  /** Set the files position to current position + \a pos. See seekSet().
314
+
315
+  /**
316
+   * Set the files position to current position + \a pos. See seekSet().
306
    * \param[in] offset The new position in bytes from the current position.
317
    * \param[in] offset The new position in bytes from the current position.
307
    * \return true for success or false for failure.
318
    * \return true for success or false for failure.
308
    */
319
    */
309
-  bool seekCur(int32_t offset) {
310
-    return seekSet(curPosition_ + offset);
311
-  }
312
-  /** Set the files position to end-of-file + \a offset. See seekSet().
320
+  bool seekCur(const int32_t offset) { return seekSet(curPosition_ + offset); }
321
+
322
+  /**
323
+   * Set the files position to end-of-file + \a offset. See seekSet().
313
    * \param[in] offset The new position in bytes from end-of-file.
324
    * \param[in] offset The new position in bytes from end-of-file.
314
    * \return true for success or false for failure.
325
    * \return true for success or false for failure.
315
    */
326
    */
316
-  bool seekEnd(int32_t offset = 0) {return seekSet(fileSize_ + offset);}
317
-  bool seekSet(uint32_t pos);
327
+  bool seekEnd(const int32_t offset = 0) { return seekSet(fileSize_ + offset); }
328
+  bool seekSet(const uint32_t pos);
318
   bool sync();
329
   bool sync();
319
   bool timestamp(SdBaseFile* file);
330
   bool timestamp(SdBaseFile* file);
320
   bool timestamp(uint8_t flag, uint16_t year, uint8_t month, uint8_t day,
331
   bool timestamp(uint8_t flag, uint16_t year, uint8_t month, uint8_t day,
321
                  uint8_t hour, uint8_t minute, uint8_t second);
332
                  uint8_t hour, uint8_t minute, uint8_t second);
322
-  /** Type of file.  You should use isFile() or isDir() instead of type()
323
-   * if possible.
333
+
334
+  /**
335
+   * Type of file. Use isFile() or isDir() instead of type() if possible.
324
    *
336
    *
325
    * \return The file or directory type.
337
    * \return The file or directory type.
326
    */
338
    */
327
-  uint8_t type() const {return type_;}
339
+  uint8_t type() const { return type_; }
328
   bool truncate(uint32_t size);
340
   bool truncate(uint32_t size);
329
-  /** \return SdVolume that contains this file. */
330
-  SdVolume* volume() const {return vol_;}
341
+
342
+  /**
343
+   * \return SdVolume that contains this file.
344
+   */
345
+  SdVolume* volume() const { return vol_; }
331
   int16_t write(const void* buf, uint16_t nbyte);
346
   int16_t write(const void* buf, uint16_t nbyte);
332
-  //------------------------------------------------------------------------------
347
+
333
  private:
348
  private:
334
-  // allow SdFat to set cwd_
335
-  friend class SdFat;
336
-  // global pointer to cwd dir
337
-  static SdBaseFile* cwd_;
349
+  friend class SdFat;           // allow SdFat to set cwd_
350
+  static SdBaseFile* cwd_;      // global pointer to cwd dir
351
+
338
   // data time callback function
352
   // data time callback function
339
   static void (*dateTime_)(uint16_t* date, uint16_t* time);
353
   static void (*dateTime_)(uint16_t* date, uint16_t* time);
354
+
340
   // bits defined in flags_
355
   // bits defined in flags_
341
-  // should be 0x0F
342
-  static uint8_t const F_OFLAG = (O_ACCMODE | O_APPEND | O_SYNC);
343
-  // sync of directory entry required
344
-  static uint8_t const F_FILE_DIR_DIRTY = 0x80;
356
+  static uint8_t const F_OFLAG = (O_ACCMODE | O_APPEND | O_SYNC),   // should be 0x0F
357
+                       F_FILE_DIR_DIRTY = 0x80;                     // sync of directory entry required
345
 
358
 
346
   // private data
359
   // private data
347
   uint8_t   flags_;         // See above for definition of flags_ bits
360
   uint8_t   flags_;         // See above for definition of flags_ bits
355
   uint32_t  firstCluster_;  // first cluster of file
368
   uint32_t  firstCluster_;  // first cluster of file
356
   SdVolume* vol_;           // volume where file is located
369
   SdVolume* vol_;           // volume where file is located
357
 
370
 
358
-  /** experimental don't use */
359
-  bool openParent(SdBaseFile* dir);
371
+  /**
372
+   * EXPERIMENTAL - Don't use!
373
+   */
374
+  //bool openParent(SdBaseFile* dir);
375
+
360
   // private functions
376
   // private functions
361
   bool addCluster();
377
   bool addCluster();
362
   bool addDirCluster();
378
   bool addDirCluster();
367
   bool open(SdBaseFile* dirFile, const uint8_t dname[11], uint8_t oflag);
383
   bool open(SdBaseFile* dirFile, const uint8_t dname[11], uint8_t oflag);
368
   bool openCachedEntry(uint8_t cacheIndex, uint8_t oflags);
384
   bool openCachedEntry(uint8_t cacheIndex, uint8_t oflags);
369
   dir_t* readDirCache();
385
   dir_t* readDirCache();
370
-  //------------------------------------------------------------------------------
371
-  // to be deleted
372
-  static void printDirName(const dir_t& dir,
373
-                           uint8_t width, bool printSlash);
374
-  //------------------------------------------------------------------------------
375
-  // Deprecated functions  - suppress cpplint warnings with NOLINT comment
376
-#if ALLOW_DEPRECATED_FUNCTIONS && !defined(DOXYGEN)
386
+
387
+// Deprecated functions
388
+#if ALLOW_DEPRECATED_FUNCTIONS
377
  public:
389
  public:
378
-  /** \deprecated Use:
390
+
391
+  /**
392
+   * \deprecated Use:
379
    * bool contiguousRange(uint32_t* bgnBlock, uint32_t* endBlock);
393
    * bool contiguousRange(uint32_t* bgnBlock, uint32_t* endBlock);
380
    * \param[out] bgnBlock the first block address for the file.
394
    * \param[out] bgnBlock the first block address for the file.
381
    * \param[out] endBlock the last  block address for the file.
395
    * \param[out] endBlock the last  block address for the file.
382
    * \return true for success or false for failure.
396
    * \return true for success or false for failure.
383
    */
397
    */
384
-  bool contiguousRange(uint32_t& bgnBlock, uint32_t& endBlock) {  // NOLINT
398
+  bool contiguousRange(uint32_t& bgnBlock, uint32_t& endBlock) {
385
     return contiguousRange(&bgnBlock, &endBlock);
399
     return contiguousRange(&bgnBlock, &endBlock);
386
   }
400
   }
387
-  /** \deprecated Use:
388
-    * bool createContiguous(SdBaseFile* dirFile,
389
-    *   const char* path, uint32_t size)
390
-    * \param[in] dirFile The directory where the file will be created.
391
-    * \param[in] path A path with a valid DOS 8.3 file name.
392
-    * \param[in] size The desired file size.
393
-    * \return true for success or false for failure.
394
-    */
395
-  bool createContiguous(SdBaseFile& dirFile,  // NOLINT
396
-                        const char* path, uint32_t size) {
401
+
402
+  /**
403
+   * \deprecated Use:
404
+   * bool createContiguous(SdBaseFile* dirFile, const char* path, uint32_t size)
405
+   * \param[in] dirFile The directory where the file will be created.
406
+   * \param[in] path A path with a valid DOS 8.3 file name.
407
+   * \param[in] size The desired file size.
408
+   * \return true for success or false for failure.
409
+   */
410
+  bool createContiguous(SdBaseFile& dirFile, const char* path, uint32_t size) {
397
     return createContiguous(&dirFile, path, size);
411
     return createContiguous(&dirFile, path, size);
398
   }
412
   }
399
-  /** \deprecated Use:
413
+
414
+  /**
415
+   * \deprecated Use:
400
    * static void dateTimeCallback(
416
    * static void dateTimeCallback(
401
    *   void (*dateTime)(uint16_t* date, uint16_t* time));
417
    *   void (*dateTime)(uint16_t* date, uint16_t* time));
402
    * \param[in] dateTime The user's call back function.
418
    * \param[in] dateTime The user's call back function.
403
    */
419
    */
404
   static void dateTimeCallback(
420
   static void dateTimeCallback(
405
-    void (*dateTime)(uint16_t &date, uint16_t &time)) {  // NOLINT
421
+    void (*dateTime)(uint16_t &date, uint16_t &time)) {
406
     oldDateTime_ = dateTime;
422
     oldDateTime_ = dateTime;
407
     dateTime_ = dateTime ? oldToNew : 0;
423
     dateTime_ = dateTime ? oldToNew : 0;
408
   }
424
   }
409
-  /** \deprecated Use: bool dirEntry(dir_t* dir);
410
-   * \param[out] dir Location for return of the file's directory entry.
411
-   * \return true for success or false for failure.
412
-   */
413
-  bool dirEntry(dir_t& dir) {return dirEntry(&dir);}  // NOLINT
414
-  /** \deprecated Use:
415
-   * bool mkdir(SdBaseFile* dir, const char* path);
416
-   * \param[in] dir An open SdFat instance for the directory that will contain
417
-   * the new directory.
418
-   * \param[in] path A path with a valid 8.3 DOS name for the new directory.
419
-   * \return true for success or false for failure.
420
-   */
421
-  bool mkdir(SdBaseFile& dir, const char* path) {  // NOLINT
422
-    return mkdir(&dir, path);
423
-  }
424
-  /** \deprecated Use:
425
+
426
+  /**
427
+   * \deprecated Use:
425
    * bool open(SdBaseFile* dirFile, const char* path, uint8_t oflag);
428
    * bool open(SdBaseFile* dirFile, const char* path, uint8_t oflag);
426
    * \param[in] dirFile An open SdFat instance for the directory containing the
429
    * \param[in] dirFile An open SdFat instance for the directory containing the
427
    * file to be opened.
430
    * file to be opened.
430
    * OR of flags O_READ, O_WRITE, O_TRUNC, and O_SYNC.
433
    * OR of flags O_READ, O_WRITE, O_TRUNC, and O_SYNC.
431
    * \return true for success or false for failure.
434
    * \return true for success or false for failure.
432
    */
435
    */
433
-  bool open(SdBaseFile& dirFile, // NOLINT
434
-            const char* path, uint8_t oflag) {
436
+  bool open(SdBaseFile& dirFile, const char* path, uint8_t oflag) {
435
     return open(&dirFile, path, oflag);
437
     return open(&dirFile, path, oflag);
436
   }
438
   }
437
-  /** \deprecated  Do not use in new apps
439
+
440
+  /**
441
+   * \deprecated  Do not use in new apps
438
    * \param[in] dirFile An open SdFat instance for the directory containing the
442
    * \param[in] dirFile An open SdFat instance for the directory containing the
439
    * file to be opened.
443
    * file to be opened.
440
    * \param[in] path A path with a valid 8.3 DOS name for a file to be opened.
444
    * \param[in] path A path with a valid 8.3 DOS name for a file to be opened.
441
    * \return true for success or false for failure.
445
    * \return true for success or false for failure.
442
    */
446
    */
443
-  bool open(SdBaseFile& dirFile, const char* path) {  // NOLINT
447
+  bool open(SdBaseFile& dirFile, const char* path) {
444
     return open(dirFile, path, O_RDWR);
448
     return open(dirFile, path, O_RDWR);
445
   }
449
   }
446
-  /** \deprecated Use:
450
+
451
+  /**
452
+   * \deprecated Use:
447
    * bool open(SdBaseFile* dirFile, uint16_t index, uint8_t oflag);
453
    * bool open(SdBaseFile* dirFile, uint16_t index, uint8_t oflag);
448
    * \param[in] dirFile An open SdFat instance for the directory.
454
    * \param[in] dirFile An open SdFat instance for the directory.
449
    * \param[in] index The \a index of the directory entry for the file to be
455
    * \param[in] index The \a index of the directory entry for the file to be
452
    * OR of flags O_READ, O_WRITE, O_TRUNC, and O_SYNC.
458
    * OR of flags O_READ, O_WRITE, O_TRUNC, and O_SYNC.
453
    * \return true for success or false for failure.
459
    * \return true for success or false for failure.
454
    */
460
    */
455
-  bool open(SdBaseFile& dirFile, uint16_t index, uint8_t oflag) {  // NOLINT
461
+  bool open(SdBaseFile& dirFile, uint16_t index, uint8_t oflag) {
456
     return open(&dirFile, index, oflag);
462
     return open(&dirFile, index, oflag);
457
   }
463
   }
458
-  /** \deprecated Use: bool openRoot(SdVolume* vol);
464
+
465
+  /**
466
+   * \deprecated Use: bool openRoot(SdVolume* vol);
459
    * \param[in] vol The FAT volume containing the root directory to be opened.
467
    * \param[in] vol The FAT volume containing the root directory to be opened.
460
    * \return true for success or false for failure.
468
    * \return true for success or false for failure.
461
    */
469
    */
462
-  bool openRoot(SdVolume& vol) {return openRoot(&vol);}  // NOLINT
463
-  /** \deprecated Use: int8_t readDir(dir_t* dir);
470
+  bool openRoot(SdVolume& vol) { return openRoot(&vol); }
471
+
472
+  /**
473
+   * \deprecated Use: int8_t readDir(dir_t* dir);
464
    * \param[out] dir The dir_t struct that will receive the data.
474
    * \param[out] dir The dir_t struct that will receive the data.
465
    * \return bytes read for success zero for eof or -1 for failure.
475
    * \return bytes read for success zero for eof or -1 for failure.
466
    */
476
    */
467
-  int8_t readDir(dir_t& dir, char* longFilename) {return readDir(&dir, longFilename);}  // NOLINT
468
-  /** \deprecated Use:
477
+  int8_t readDir(dir_t& dir, char* longFilename) {
478
+    return readDir(&dir, longFilename);
479
+  }
480
+
481
+  /**
482
+   * \deprecated Use:
469
    * static uint8_t remove(SdBaseFile* dirFile, const char* path);
483
    * static uint8_t remove(SdBaseFile* dirFile, const char* path);
470
    * \param[in] dirFile The directory that contains the file.
484
    * \param[in] dirFile The directory that contains the file.
471
    * \param[in] path The name of the file to be removed.
485
    * \param[in] path The name of the file to be removed.
472
    * \return true for success or false for failure.
486
    * \return true for success or false for failure.
473
    */
487
    */
474
-  static bool remove(SdBaseFile& dirFile, const char* path) {  // NOLINT
475
-    return remove(&dirFile, path);
476
-  }
477
-  //------------------------------------------------------------------------------
478
-  // rest are private
488
+  static bool remove(SdBaseFile& dirFile, const char* path) { return remove(&dirFile, path); }
489
+
479
  private:
490
  private:
480
-  static void (*oldDateTime_)(uint16_t &date, uint16_t &time);  // NOLINT
481
-  static void oldToNew(uint16_t* date, uint16_t* time) {
482
-    uint16_t d;
483
-    uint16_t t;
491
+  static void (*oldDateTime_)(uint16_t &date, uint16_t &time);
492
+  static void oldToNew(uint16_t * const date, uint16_t * const time) {
493
+    uint16_t d, t;
484
     oldDateTime_(d, t);
494
     oldDateTime_(d, t);
485
     *date = d;
495
     *date = d;
486
     *time = t;
496
     *time = t;
488
 #endif  // ALLOW_DEPRECATED_FUNCTIONS
498
 #endif  // ALLOW_DEPRECATED_FUNCTIONS
489
 };
499
 };
490
 
500
 
491
-#endif  // SdBaseFile_h
492
-#endif
501
+#endif // _SDBASEFILE_H_

+ 91
- 104
Marlin/SdFatConfig.h Переглянути файл

21
  */
21
  */
22
 
22
 
23
 /**
23
 /**
24
+ * SdFatConfig.h
24
  * Arduino SdFat Library
25
  * Arduino SdFat Library
25
  * Copyright (C) 2009 by William Greiman
26
  * Copyright (C) 2009 by William Greiman
26
  *
27
  *
27
  * This file is part of the Arduino Sd2Card Library
28
  * This file is part of the Arduino Sd2Card Library
28
  */
29
  */
30
+
31
+#ifndef _SDFATCONFIG_H_
32
+#define _SDFATCONFIG_H_
33
+
34
+#include "MarlinConfig.h"
35
+
36
+/**
37
+ * To use multiple SD cards set USE_MULTIPLE_CARDS nonzero.
38
+ *
39
+ * Using multiple cards costs 400 - 500  bytes of flash.
40
+ *
41
+ * Each card requires about 550 bytes of SRAM so use of a Mega is recommended.
42
+ */
43
+#define USE_MULTIPLE_CARDS 0
44
+
45
+/**
46
+ * Call flush for endl if ENDL_CALLS_FLUSH is nonzero
47
+ *
48
+ * The standard for iostreams is to call flush.  This is very costly for
49
+ * SdFat.  Each call to flush causes 2048 bytes of I/O to the SD.
50
+ *
51
+ * SdFat has a single 512 byte buffer for SD I/O so it must write the current
52
+ * data block to the SD, read the directory block from the SD, update the
53
+ * directory entry, write the directory block to the SD and read the data
54
+ * block back into the buffer.
55
+ *
56
+ * The SD flash memory controller is not designed for this many rewrites
57
+ * so performance may be reduced by more than a factor of 100.
58
+ *
59
+ * If ENDL_CALLS_FLUSH is zero, you must call flush and/or close to force
60
+ * all data to be written to the SD.
61
+ */
62
+#define ENDL_CALLS_FLUSH 0
63
+
29
 /**
64
 /**
30
- * \file
31
- * \brief configuration definitions
65
+ * Allow use of deprecated functions if ALLOW_DEPRECATED_FUNCTIONS is nonzero
32
  */
66
  */
33
-#include "Marlin.h"
34
-#if ENABLED(SDSUPPORT)
35
-
36
-#ifndef SdFatConfig_h
37
-  #define SdFatConfig_h
38
-  #include <stdint.h>
39
-  //------------------------------------------------------------------------------
40
-  /**
41
-  * To use multiple SD cards set USE_MULTIPLE_CARDS nonzero.
42
-  *
43
-  * Using multiple cards costs 400 - 500  bytes of flash.
44
-  *
45
-  * Each card requires about 550 bytes of SRAM so use of a Mega is recommended.
46
-  */
47
-  #define USE_MULTIPLE_CARDS 0
48
-  //------------------------------------------------------------------------------
49
-  /**
50
-  * Call flush for endl if ENDL_CALLS_FLUSH is nonzero
51
-  *
52
-  * The standard for iostreams is to call flush.  This is very costly for
53
-  * SdFat.  Each call to flush causes 2048 bytes of I/O to the SD.
54
-  *
55
-  * SdFat has a single 512 byte buffer for SD I/O so it must write the current
56
-  * data block to the SD, read the directory block from the SD, update the
57
-  * directory entry, write the directory block to the SD and read the data
58
-  * block back into the buffer.
59
-  *
60
-  * The SD flash memory controller is not designed for this many rewrites
61
-  * so performance may be reduced by more than a factor of 100.
62
-  *
63
-  * If ENDL_CALLS_FLUSH is zero, you must call flush and/or close to force
64
-  * all data to be written to the SD.
65
-  */
66
-  #define ENDL_CALLS_FLUSH 0
67
-  //------------------------------------------------------------------------------
68
-  /**
69
-  * Allow use of deprecated functions if ALLOW_DEPRECATED_FUNCTIONS is nonzero
70
-  */
71
-  #define ALLOW_DEPRECATED_FUNCTIONS 1
72
-  //------------------------------------------------------------------------------
73
-  /**
74
-  * Allow FAT12 volumes if FAT12_SUPPORT is nonzero.
75
-  * FAT12 has not been well tested.
76
-  */
77
-  #define FAT12_SUPPORT 0
78
-  //------------------------------------------------------------------------------
79
-  /**
80
-  * SPI init rate for SD initialization commands. Must be 5 (F_CPU/64)
81
-  * or 6 (F_CPU/128).
82
-  */
83
-  #define SPI_SD_INIT_RATE 5
84
-  //------------------------------------------------------------------------------
85
-  /**
86
-  * Set the SS pin high for hardware SPI.  If SS is chip select for another SPI
87
-  * device this will disable that device during the SD init phase.
88
-  */
89
-  #define SET_SPI_SS_HIGH 1
90
-  //------------------------------------------------------------------------------
91
-  /**
92
-  * Define MEGA_SOFT_SPI nonzero to use software SPI on Mega Arduinos.
93
-  * Pins used are SS 10, MOSI 11, MISO 12, and SCK 13.
94
-  *
95
-  * MEGA_SOFT_SPI allows an unmodified Adafruit GPS Shield to be used
96
-  * on Mega Arduinos.  Software SPI works well with GPS Shield V1.1
97
-  * but many SD cards will fail with GPS Shield V1.0.
98
-  */
99
-  #define MEGA_SOFT_SPI 0
100
-  //------------------------------------------------------------------------------
101
-  /**
102
-  * Set USE_SOFTWARE_SPI nonzero to always use software SPI.
103
-  */
104
-  #define USE_SOFTWARE_SPI 0
105
-  // define software SPI pins so Mega can use unmodified 168/328 shields
106
-  /** Software SPI chip select pin for the SD */
107
-  #define SOFT_SPI_CS_PIN 10
108
-  /** Software SPI Master Out Slave In pin */
109
-  #define SOFT_SPI_MOSI_PIN 11
110
-  /** Software SPI Master In Slave Out pin */
111
-  #define SOFT_SPI_MISO_PIN 12
112
-  /** Software SPI Clock pin */
113
-  #define SOFT_SPI_SCK_PIN 13
114
-  //------------------------------------------------------------------------------
115
-  /**
116
-  * The __cxa_pure_virtual function is an error handler that is invoked when
117
-  * a pure virtual function is called.
118
-  */
119
-  #define USE_CXA_PURE_VIRTUAL 1
120
-
121
-  /** Number of UTF-16 characters per entry */
122
-  #define FILENAME_LENGTH 13
123
-
124
-  /**
125
-  * Defines for long (vfat) filenames
126
-  */
127
-  /** Number of VFAT entries used. Every entry has 13 UTF-16 characters */
128
-  #define MAX_VFAT_ENTRIES (2)
129
-  /** Total size of the buffer used to store the long filenames */
130
-  #define LONG_FILENAME_LENGTH (FILENAME_LENGTH*MAX_VFAT_ENTRIES+1)
131
-#endif  // SdFatConfig_h
132
-
133
-
134
-#endif
67
+#define ALLOW_DEPRECATED_FUNCTIONS 1
68
+
69
+/**
70
+ * Allow FAT12 volumes if FAT12_SUPPORT is nonzero.
71
+ * FAT12 has not been well tested.
72
+ */
73
+#define FAT12_SUPPORT 0
74
+
75
+/**
76
+ * SPI init rate for SD initialization commands. Must be 5 (F_CPU/64)
77
+ * or 6 (F_CPU/128).
78
+ */
79
+#define SPI_SD_INIT_RATE 5
80
+
81
+/**
82
+ * Set the SS pin high for hardware SPI.  If SS is chip select for another SPI
83
+ * device this will disable that device during the SD init phase.
84
+ */
85
+#define SET_SPI_SS_HIGH 1
86
+
87
+/**
88
+ * Define MEGA_SOFT_SPI nonzero to use software SPI on Mega Arduinos.
89
+ * Pins used are SS 10, MOSI 11, MISO 12, and SCK 13.
90
+ *
91
+ * MEGA_SOFT_SPI allows an unmodified Adafruit GPS Shield to be used
92
+ * on Mega Arduinos.  Software SPI works well with GPS Shield V1.1
93
+ * but many SD cards will fail with GPS Shield V1.0.
94
+ */
95
+#define MEGA_SOFT_SPI 0
96
+
97
+// Set USE_SOFTWARE_SPI nonzero to ALWAYS use Software SPI.
98
+#define USE_SOFTWARE_SPI 0
99
+
100
+// Define software SPI pins so Mega can use unmodified 168/328 shields
101
+#define SOFT_SPI_CS_PIN   10 // Software SPI chip select pin for the SD
102
+#define SOFT_SPI_MOSI_PIN 11 // Software SPI Master Out Slave In pin
103
+#define SOFT_SPI_MISO_PIN 12 // Software SPI Master In Slave Out pin
104
+#define SOFT_SPI_SCK_PIN  13 // Software SPI Clock pin
105
+
106
+/**
107
+ * The __cxa_pure_virtual function is an error handler that is invoked when
108
+ * a pure virtual function is called.
109
+ */
110
+#define USE_CXA_PURE_VIRTUAL 1
111
+
112
+/**
113
+ * Defines for 8.3 and long (vfat) filenames
114
+ */
115
+
116
+#define FILENAME_LENGTH 13 // Number of UTF-16 characters per entry
117
+
118
+// Total bytes needed to store a single long filename
119
+#define LONG_FILENAME_LENGTH (FILENAME_LENGTH * MAX_VFAT_ENTRIES + 1)
120
+
121
+#endif // _SDFATCONFIG_H_

+ 384
- 424
Marlin/SdFatStructs.h Переглянути файл

21
  */
21
  */
22
 
22
 
23
 /**
23
 /**
24
+ * \file
25
+ * \brief FAT file structures
26
+ */
27
+
28
+/**
24
  * Arduino SdFat Library
29
  * Arduino SdFat Library
25
  * Copyright (C) 2009 by William Greiman
30
  * Copyright (C) 2009 by William Greiman
26
  *
31
  *
27
  * This file is part of the Arduino Sd2Card Library
32
  * This file is part of the Arduino Sd2Card Library
28
  */
33
  */
29
-#include "Marlin.h"
30
-#if ENABLED(SDSUPPORT)
31
-
32
-#ifndef SdFatStructs_h
33
-#define SdFatStructs_h
34
+#ifndef SDFATSTRUCTS_H
35
+#define SDFATSTRUCTS_H
34
 
36
 
35
 #define PACKED __attribute__((__packed__))
37
 #define PACKED __attribute__((__packed__))
36
-/**
37
- * \file
38
- * \brief FAT file structures
39
- */
38
+
40
 /**
39
 /**
41
  * mostly from Microsoft document fatgen103.doc
40
  * mostly from Microsoft document fatgen103.doc
42
  * http://www.microsoft.com/whdc/system/platform/firmware/fatgen.mspx
41
  * http://www.microsoft.com/whdc/system/platform/firmware/fatgen.mspx
43
  */
42
  */
44
-//------------------------------------------------------------------------------
45
-/** Value for byte 510 of boot block or MBR */
46
-uint8_t const BOOTSIG0 = 0x55;
47
-/** Value for byte 511 of boot block or MBR */
48
-uint8_t const BOOTSIG1 = 0xAA;
49
-/** Value for bootSignature field int FAT/FAT32 boot sector */
50
-uint8_t const EXTENDED_BOOT_SIG = 0x29;
51
-//------------------------------------------------------------------------------
43
+
44
+uint8_t const BOOTSIG0 = 0x55,          // Value for byte 510 of boot block or MBR
45
+              BOOTSIG1 = 0xAA,          // Value for byte 511 of boot block or MBR
46
+              EXTENDED_BOOT_SIG = 0x29; // Value for bootSignature field int FAT/FAT32 boot sector
47
+
52
 /**
48
 /**
53
  * \struct partitionTable
49
  * \struct partitionTable
54
  * \brief MBR partition table entry
50
  * \brief MBR partition table entry
57
  * The MBR partition table has four entries.
53
  * The MBR partition table has four entries.
58
  */
54
  */
59
 struct partitionTable {
55
 struct partitionTable {
60
-          /**
61
-           * Boot Indicator . Indicates whether the volume is the active
62
-           * partition.  Legal values include: 0x00. Do not use for booting.
63
-           * 0x80 Active partition.
64
-           */
56
+  /**
57
+   * Boot Indicator . Indicates whether the volume is the active
58
+   * partition.  Legal values include: 0x00. Do not use for booting.
59
+   * 0x80 Active partition.
60
+   */
65
   uint8_t  boot;
61
   uint8_t  boot;
66
-          /**
67
-           * Head part of Cylinder-head-sector address of the first block in
68
-           * the partition. Legal values are 0-255. Only used in old PC BIOS.
69
-           */
62
+  /**
63
+   * Head part of Cylinder-head-sector address of the first block in
64
+   * the partition. Legal values are 0-255. Only used in old PC BIOS.
65
+   */
70
   uint8_t  beginHead;
66
   uint8_t  beginHead;
71
-          /**
72
-           * Sector part of Cylinder-head-sector address of the first block in
73
-           * the partition. Legal values are 1-63. Only used in old PC BIOS.
74
-           */
67
+  /**
68
+   * Sector part of Cylinder-head-sector address of the first block in
69
+   * the partition. Legal values are 1-63. Only used in old PC BIOS.
70
+   */
75
   unsigned beginSector : 6;
71
   unsigned beginSector : 6;
76
-           /** High bits cylinder for first block in partition. */
72
+  /** High bits cylinder for first block in partition. */
77
   unsigned beginCylinderHigh : 2;
73
   unsigned beginCylinderHigh : 2;
78
-          /**
79
-           * Combine beginCylinderLow with beginCylinderHigh. Legal values
80
-           * are 0-1023.  Only used in old PC BIOS.
81
-           */
74
+  /**
75
+   * Combine beginCylinderLow with beginCylinderHigh. Legal values
76
+   * are 0-1023.  Only used in old PC BIOS.
77
+   */
82
   uint8_t  beginCylinderLow;
78
   uint8_t  beginCylinderLow;
83
-          /**
84
-           * Partition type. See defines that begin with PART_TYPE_ for
85
-           * some Microsoft partition types.
86
-           */
79
+  /**
80
+   * Partition type. See defines that begin with PART_TYPE_ for
81
+   * some Microsoft partition types.
82
+   */
87
   uint8_t  type;
83
   uint8_t  type;
88
-          /**
89
-           * head part of cylinder-head-sector address of the last sector in the
90
-           * partition.  Legal values are 0-255. Only used in old PC BIOS.
91
-           */
84
+  /**
85
+   * head part of cylinder-head-sector address of the last sector in the
86
+   * partition.  Legal values are 0-255. Only used in old PC BIOS.
87
+   */
92
   uint8_t  endHead;
88
   uint8_t  endHead;
93
-          /**
94
-           * Sector part of cylinder-head-sector address of the last sector in
95
-           * the partition.  Legal values are 1-63. Only used in old PC BIOS.
96
-           */
89
+  /**
90
+   * Sector part of cylinder-head-sector address of the last sector in
91
+   * the partition.  Legal values are 1-63. Only used in old PC BIOS.
92
+   */
97
   unsigned endSector : 6;
93
   unsigned endSector : 6;
98
-           /** High bits of end cylinder */
94
+  /** High bits of end cylinder */
99
   unsigned endCylinderHigh : 2;
95
   unsigned endCylinderHigh : 2;
100
-          /**
101
-           * Combine endCylinderLow with endCylinderHigh. Legal values
102
-           * are 0-1023.  Only used in old PC BIOS.
103
-           */
96
+  /**
97
+   * Combine endCylinderLow with endCylinderHigh. Legal values
98
+   * are 0-1023.  Only used in old PC BIOS.
99
+   */
104
   uint8_t  endCylinderLow;
100
   uint8_t  endCylinderLow;
105
-           /** Logical block address of the first block in the partition. */
106
-  uint32_t firstSector;
107
-           /** Length of the partition, in blocks. */
108
-  uint32_t totalSectors;
101
+
102
+  uint32_t firstSector;   // Logical block address of the first block in the partition.
103
+  uint32_t totalSectors;  // Length of the partition, in blocks.
109
 } PACKED;
104
 } PACKED;
110
-/** Type name for partitionTable */
111
-typedef struct partitionTable part_t;
112
-//------------------------------------------------------------------------------
105
+
106
+typedef struct partitionTable part_t; // Type name for partitionTable
107
+
113
 /**
108
 /**
114
  * \struct masterBootRecord
109
  * \struct masterBootRecord
115
  *
110
  *
118
  * The first block of a storage device that is formatted with a MBR.
113
  * The first block of a storage device that is formatted with a MBR.
119
  */
114
  */
120
 struct masterBootRecord {
115
 struct masterBootRecord {
121
-           /** Code Area for master boot program. */
122
-  uint8_t  codeArea[440];
123
-           /** Optional Windows NT disk signature. May contain boot code. */
124
-  uint32_t diskSignature;
125
-           /** Usually zero but may be more boot code. */
126
-  uint16_t usuallyZero;
127
-           /** Partition tables. */
128
-  part_t   part[4];
129
-           /** First MBR signature byte. Must be 0x55 */
130
-  uint8_t  mbrSig0;
131
-           /** Second MBR signature byte. Must be 0xAA */
132
-  uint8_t  mbrSig1;
116
+  uint8_t  codeArea[440]; // Code Area for master boot program.
117
+  uint32_t diskSignature; // Optional Windows NT disk signature. May contain boot code.
118
+  uint16_t usuallyZero;   // Usually zero but may be more boot code.
119
+  part_t   part[4];       // Partition tables.
120
+  uint8_t  mbrSig0;       // First MBR signature byte. Must be 0x55
121
+  uint8_t  mbrSig1;       // Second MBR signature byte. Must be 0xAA
133
 } PACKED;
122
 } PACKED;
134
 /** Type name for masterBootRecord */
123
 /** Type name for masterBootRecord */
135
 typedef struct masterBootRecord mbr_t;
124
 typedef struct masterBootRecord mbr_t;
136
-//------------------------------------------------------------------------------
125
+
137
 /**
126
 /**
138
  * \struct fat_boot
127
  * \struct fat_boot
139
  *
128
  *
141
  *
130
  *
142
  */
131
  */
143
 struct fat_boot {
132
 struct fat_boot {
144
-         /**
145
-          * The first three bytes of the boot sector must be valid,
146
-          * executable x 86-based CPU instructions. This includes a
147
-          * jump instruction that skips the next nonexecutable bytes.
148
-          */
133
+  /**
134
+   * The first three bytes of the boot sector must be valid,
135
+   * executable x 86-based CPU instructions. This includes a
136
+   * jump instruction that skips the next nonexecutable bytes.
137
+   */
149
   uint8_t jump[3];
138
   uint8_t jump[3];
150
-         /**
151
-          * This is typically a string of characters that identifies
152
-          * the operating system that formatted the volume.
153
-          */
139
+  /**
140
+   * This is typically a string of characters that identifies
141
+   * the operating system that formatted the volume.
142
+   */
154
   char    oemId[8];
143
   char    oemId[8];
155
-          /**
156
-           * The size of a hardware sector. Valid decimal values for this
157
-           * field are 512, 1024, 2048, and 4096. For most disks used in
158
-           * the United States, the value of this field is 512.
159
-           */
144
+  /**
145
+   * The size of a hardware sector. Valid decimal values for this
146
+   * field are 512, 1024, 2048, and 4096. For most disks used in
147
+   * the United States, the value of this field is 512.
148
+   */
160
   uint16_t bytesPerSector;
149
   uint16_t bytesPerSector;
161
-          /**
162
-           * Number of sectors per allocation unit. This value must be a
163
-           * power of 2 that is greater than 0. The legal values are
164
-           * 1, 2, 4, 8, 16, 32, 64, and 128.  128 should be avoided.
165
-           */
150
+  /**
151
+   * Number of sectors per allocation unit. This value must be a
152
+   * power of 2 that is greater than 0. The legal values are
153
+   * 1, 2, 4, 8, 16, 32, 64, and 128.  128 should be avoided.
154
+   */
166
   uint8_t  sectorsPerCluster;
155
   uint8_t  sectorsPerCluster;
167
-          /**
168
-           * The number of sectors preceding the start of the first FAT,
169
-           * including the boot sector. The value of this field is always 1.
170
-           */
156
+  /**
157
+   * The number of sectors preceding the start of the first FAT,
158
+   * including the boot sector. The value of this field is always 1.
159
+   */
171
   uint16_t reservedSectorCount;
160
   uint16_t reservedSectorCount;
172
-          /**
173
-           * The number of copies of the FAT on the volume.
174
-           * The value of this field is always 2.
175
-           */
161
+  /**
162
+   * The number of copies of the FAT on the volume.
163
+   * The value of this field is always 2.
164
+   */
176
   uint8_t  fatCount;
165
   uint8_t  fatCount;
177
-          /**
178
-           * For FAT12 and FAT16 volumes, this field contains the count of
179
-           * 32-byte directory entries in the root directory. For FAT32 volumes,
180
-           * this field must be set to 0. For FAT12 and FAT16 volumes, this
181
-           * value should always specify a count that when multiplied by 32
182
-           * results in a multiple of bytesPerSector.  FAT16 volumes should
183
-           * use the value 512.
184
-           */
166
+  /**
167
+   * For FAT12 and FAT16 volumes, this field contains the count of
168
+   * 32-byte directory entries in the root directory. For FAT32 volumes,
169
+   * this field must be set to 0. For FAT12 and FAT16 volumes, this
170
+   * value should always specify a count that when multiplied by 32
171
+   * results in a multiple of bytesPerSector.  FAT16 volumes should
172
+   * use the value 512.
173
+   */
185
   uint16_t rootDirEntryCount;
174
   uint16_t rootDirEntryCount;
186
-          /**
187
-           * This field is the old 16-bit total count of sectors on the volume.
188
-           * This count includes the count of all sectors in all four regions
189
-           * of the volume. This field can be 0; if it is 0, then totalSectors32
190
-           * must be nonzero.  For FAT32 volumes, this field must be 0. For
191
-           * FAT12 and FAT16 volumes, this field contains the sector count, and
192
-           * totalSectors32 is 0 if the total sector count fits
193
-           * (is less than 0x10000).
194
-           */
175
+  /**
176
+   * This field is the old 16-bit total count of sectors on the volume.
177
+   * This count includes the count of all sectors in all four regions
178
+   * of the volume. This field can be 0; if it is 0, then totalSectors32
179
+   * must be nonzero.  For FAT32 volumes, this field must be 0. For
180
+   * FAT12 and FAT16 volumes, this field contains the sector count, and
181
+   * totalSectors32 is 0 if the total sector count fits
182
+   * (is less than 0x10000).
183
+   */
195
   uint16_t totalSectors16;
184
   uint16_t totalSectors16;
196
-          /**
197
-           * This dates back to the old MS-DOS 1.x media determination and is
198
-           * no longer usually used for anything.  0xF8 is the standard value
199
-           * for fixed (nonremovable) media. For removable media, 0xF0 is
200
-           * frequently used. Legal values are 0xF0 or 0xF8-0xFF.
201
-           */
185
+  /**
186
+   * This dates back to the old MS-DOS 1.x media determination and is
187
+   * no longer usually used for anything.  0xF8 is the standard value
188
+   * for fixed (nonremovable) media. For removable media, 0xF0 is
189
+   * frequently used. Legal values are 0xF0 or 0xF8-0xFF.
190
+   */
202
   uint8_t  mediaType;
191
   uint8_t  mediaType;
203
-          /**
204
-           * Count of sectors occupied by one FAT on FAT12/FAT16 volumes.
205
-           * On FAT32 volumes this field must be 0, and sectorsPerFat32
206
-           * contains the FAT size count.
207
-           */
192
+  /**
193
+   * Count of sectors occupied by one FAT on FAT12/FAT16 volumes.
194
+   * On FAT32 volumes this field must be 0, and sectorsPerFat32
195
+   * contains the FAT size count.
196
+   */
208
   uint16_t sectorsPerFat16;
197
   uint16_t sectorsPerFat16;
209
-           /** Sectors per track for interrupt 0x13. Not used otherwise. */
210
-  uint16_t sectorsPerTrack;
211
-           /** Number of heads for interrupt 0x13.  Not used otherwise. */
212
-  uint16_t headCount;
213
-          /**
214
-           * Count of hidden sectors preceding the partition that contains this
215
-           * FAT volume. This field is generally only relevant for media
216
-           * visible on interrupt 0x13.
217
-           */
198
+
199
+  uint16_t sectorsPerTrack; // Sectors per track for interrupt 0x13. Not used otherwise.
200
+  uint16_t headCount;       // Number of heads for interrupt 0x13. Not used otherwise.
201
+
202
+  /**
203
+   * Count of hidden sectors preceding the partition that contains this
204
+   * FAT volume. This field is generally only relevant for media
205
+   * visible on interrupt 0x13.
206
+   */
218
   uint32_t hidddenSectors;
207
   uint32_t hidddenSectors;
219
-          /**
220
-           * This field is the new 32-bit total count of sectors on the volume.
221
-           * This count includes the count of all sectors in all four regions
222
-           * of the volume.  This field can be 0; if it is 0, then
223
-           * totalSectors16 must be nonzero.
224
-           */
208
+  /**
209
+   * This field is the new 32-bit total count of sectors on the volume.
210
+   * This count includes the count of all sectors in all four regions
211
+   * of the volume.  This field can be 0; if it is 0, then
212
+   * totalSectors16 must be nonzero.
213
+   */
225
   uint32_t totalSectors32;
214
   uint32_t totalSectors32;
226
-           /**
227
-            * Related to the BIOS physical drive number. Floppy drives are
228
-            * identified as 0x00 and physical hard disks are identified as
229
-            * 0x80, regardless of the number of physical disk drives.
230
-            * Typically, this value is set prior to issuing an INT 13h BIOS
231
-            * call to specify the device to access. The value is only
232
-            * relevant if the device is a boot device.
233
-            */
215
+  /**
216
+   * Related to the BIOS physical drive number. Floppy drives are
217
+   * identified as 0x00 and physical hard disks are identified as
218
+   * 0x80, regardless of the number of physical disk drives.
219
+   * Typically, this value is set prior to issuing an INT 13h BIOS
220
+   * call to specify the device to access. The value is only
221
+   * relevant if the device is a boot device.
222
+   */
234
   uint8_t  driveNumber;
223
   uint8_t  driveNumber;
235
-           /** used by Windows NT - should be zero for FAT */
236
-  uint8_t  reserved1;
237
-           /** 0x29 if next three fields are valid */
238
-  uint8_t  bootSignature;
239
-           /**
240
-            * A random serial number created when formatting a disk,
241
-            * which helps to distinguish between disks.
242
-            * Usually generated by combining date and time.
243
-            */
224
+
225
+  uint8_t  reserved1;       // used by Windows NT - should be zero for FAT
226
+  uint8_t  bootSignature;   // 0x29 if next three fields are valid
227
+
228
+  /**
229
+   * A random serial number created when formatting a disk,
230
+   * which helps to distinguish between disks.
231
+   * Usually generated by combining date and time.
232
+   */
244
   uint32_t volumeSerialNumber;
233
   uint32_t volumeSerialNumber;
245
-           /**
246
-            * A field once used to store the volume label. The volume label
247
-            * is now stored as a special file in the root directory.
248
-            */
234
+  /**
235
+   * A field once used to store the volume label. The volume label
236
+   * is now stored as a special file in the root directory.
237
+   */
249
   char     volumeLabel[11];
238
   char     volumeLabel[11];
250
-           /**
251
-            * A field with a value of either FAT, FAT12 or FAT16,
252
-            * depending on the disk format.
253
-            */
239
+  /**
240
+   * A field with a value of either FAT, FAT12 or FAT16,
241
+   * depending on the disk format.
242
+   */
254
   char     fileSystemType[8];
243
   char     fileSystemType[8];
255
-           /** X86 boot code */
256
-  uint8_t  bootCode[448];
257
-           /** must be 0x55 */
258
-  uint8_t  bootSectorSig0;
259
-           /** must be 0xAA */
260
-  uint8_t  bootSectorSig1;
244
+
245
+  uint8_t  bootCode[448];   // X86 boot code
246
+  uint8_t  bootSectorSig0;  // must be 0x55
247
+  uint8_t  bootSectorSig1;  // must be 0xAA
261
 } PACKED;
248
 } PACKED;
262
-/** Type name for FAT Boot Sector */
263
-typedef struct fat_boot fat_boot_t;
264
-//------------------------------------------------------------------------------
249
+
250
+typedef struct fat_boot fat_boot_t;   // Type name for FAT Boot Sector
251
+
265
 /**
252
 /**
266
  * \struct fat32_boot
253
  * \struct fat32_boot
267
  *
254
  *
268
  * \brief Boot sector for a FAT32 volume.
255
  * \brief Boot sector for a FAT32 volume.
269
- *
270
  */
256
  */
271
 struct fat32_boot {
257
 struct fat32_boot {
272
-         /**
273
-          * The first three bytes of the boot sector must be valid,
274
-          * executable x 86-based CPU instructions. This includes a
275
-          * jump instruction that skips the next nonexecutable bytes.
276
-          */
258
+  /**
259
+   * The first three bytes of the boot sector must be valid,
260
+   * executable x 86-based CPU instructions. This includes a
261
+   * jump instruction that skips the next nonexecutable bytes.
262
+   */
277
   uint8_t jump[3];
263
   uint8_t jump[3];
278
-         /**
279
-          * This is typically a string of characters that identifies
280
-          * the operating system that formatted the volume.
281
-          */
264
+  /**
265
+   * This is typically a string of characters that identifies
266
+   * the operating system that formatted the volume.
267
+   */
282
   char    oemId[8];
268
   char    oemId[8];
283
-          /**
284
-           * The size of a hardware sector. Valid decimal values for this
285
-           * field are 512, 1024, 2048, and 4096. For most disks used in
286
-           * the United States, the value of this field is 512.
287
-           */
269
+  /**
270
+   * The size of a hardware sector. Valid decimal values for this
271
+   * field are 512, 1024, 2048, and 4096. For most disks used in
272
+   * the United States, the value of this field is 512.
273
+   */
288
   uint16_t bytesPerSector;
274
   uint16_t bytesPerSector;
289
-          /**
290
-           * Number of sectors per allocation unit. This value must be a
291
-           * power of 2 that is greater than 0. The legal values are
292
-           * 1, 2, 4, 8, 16, 32, 64, and 128.  128 should be avoided.
293
-           */
275
+  /**
276
+   * Number of sectors per allocation unit. This value must be a
277
+   * power of 2 that is greater than 0. The legal values are
278
+   * 1, 2, 4, 8, 16, 32, 64, and 128.  128 should be avoided.
279
+   */
294
   uint8_t  sectorsPerCluster;
280
   uint8_t  sectorsPerCluster;
295
-          /**
296
-           * The number of sectors preceding the start of the first FAT,
297
-           * including the boot sector. Must not be zero
298
-           */
281
+  /**
282
+   * The number of sectors preceding the start of the first FAT,
283
+   * including the boot sector. Must not be zero
284
+   */
299
   uint16_t reservedSectorCount;
285
   uint16_t reservedSectorCount;
300
-          /**
301
-           * The number of copies of the FAT on the volume.
302
-           * The value of this field is always 2.
303
-           */
286
+  /**
287
+   * The number of copies of the FAT on the volume.
288
+   * The value of this field is always 2.
289
+   */
304
   uint8_t  fatCount;
290
   uint8_t  fatCount;
305
-          /**
306
-           * FAT12/FAT16 only. For FAT32 volumes, this field must be set to 0.
307
-           */
291
+  /**
292
+   * FAT12/FAT16 only. For FAT32 volumes, this field must be set to 0.
293
+   */
308
   uint16_t rootDirEntryCount;
294
   uint16_t rootDirEntryCount;
309
-          /**
310
-           * For FAT32 volumes, this field must be 0.
311
-           */
295
+  /**
296
+   * For FAT32 volumes, this field must be 0.
297
+   */
312
   uint16_t totalSectors16;
298
   uint16_t totalSectors16;
313
-          /**
314
-           * This dates back to the old MS-DOS 1.x media determination and is
315
-           * no longer usually used for anything.  0xF8 is the standard value
316
-           * for fixed (nonremovable) media. For removable media, 0xF0 is
317
-           * frequently used. Legal values are 0xF0 or 0xF8-0xFF.
318
-           */
299
+  /**
300
+   * This dates back to the old MS-DOS 1.x media determination and is
301
+   * no longer usually used for anything.  0xF8 is the standard value
302
+   * for fixed (nonremovable) media. For removable media, 0xF0 is
303
+   * frequently used. Legal values are 0xF0 or 0xF8-0xFF.
304
+   */
319
   uint8_t  mediaType;
305
   uint8_t  mediaType;
320
-          /**
321
-           * On FAT32 volumes this field must be 0, and sectorsPerFat32
322
-           * contains the FAT size count.
323
-           */
306
+  /**
307
+   * On FAT32 volumes this field must be 0, and sectorsPerFat32
308
+   * contains the FAT size count.
309
+   */
324
   uint16_t sectorsPerFat16;
310
   uint16_t sectorsPerFat16;
325
-           /** Sectors per track for interrupt 0x13. Not used otherwise. */
326
-  uint16_t sectorsPerTrack;
327
-           /** Number of heads for interrupt 0x13.  Not used otherwise. */
328
-  uint16_t headCount;
329
-          /**
330
-           * Count of hidden sectors preceding the partition that contains this
331
-           * FAT volume. This field is generally only relevant for media
332
-           * visible on interrupt 0x13.
333
-           */
311
+
312
+  uint16_t sectorsPerTrack; // Sectors per track for interrupt 0x13. Not used otherwise.
313
+  uint16_t headCount;       // Number of heads for interrupt 0x13. Not used otherwise.
314
+
315
+  /**
316
+   * Count of hidden sectors preceding the partition that contains this
317
+   * FAT volume. This field is generally only relevant for media
318
+   * visible on interrupt 0x13.
319
+   */
334
   uint32_t hidddenSectors;
320
   uint32_t hidddenSectors;
335
-          /**
336
-           * Contains the total number of sectors in the FAT32 volume.
337
-           */
321
+  /**
322
+   * Contains the total number of sectors in the FAT32 volume.
323
+   */
338
   uint32_t totalSectors32;
324
   uint32_t totalSectors32;
339
-         /**
340
-           * Count of sectors occupied by one FAT on FAT32 volumes.
341
-           */
325
+  /**
326
+   * Count of sectors occupied by one FAT on FAT32 volumes.
327
+   */
342
   uint32_t sectorsPerFat32;
328
   uint32_t sectorsPerFat32;
343
-          /**
344
-           * This field is only defined for FAT32 media and does not exist on
345
-           * FAT12 and FAT16 media.
346
-           * Bits 0-3 -- Zero-based number of active FAT.
347
-           *             Only valid if mirroring is disabled.
348
-           * Bits 4-6 -- Reserved.
349
-           * Bit 7  -- 0 means the FAT is mirrored at runtime into all FATs.
350
-           *        -- 1 means only one FAT is active; it is the one referenced
351
-           *             in bits 0-3.
352
-           * Bits 8-15  -- Reserved.
353
-           */
329
+  /**
330
+   * This field is only defined for FAT32 media and does not exist on
331
+   * FAT12 and FAT16 media.
332
+   * Bits 0-3 -- Zero-based number of active FAT.
333
+   *             Only valid if mirroring is disabled.
334
+   * Bits 4-6 -- Reserved.
335
+   * Bit 7  -- 0 means the FAT is mirrored at runtime into all FATs.
336
+   *        -- 1 means only one FAT is active; it is the one referenced
337
+   *             in bits 0-3.
338
+   * Bits 8-15  -- Reserved.
339
+   */
354
   uint16_t fat32Flags;
340
   uint16_t fat32Flags;
355
-          /**
356
-           * FAT32 version. High byte is major revision number.
357
-           * Low byte is minor revision number. Only 0.0 define.
358
-           */
341
+  /**
342
+   * FAT32 version. High byte is major revision number.
343
+   * Low byte is minor revision number. Only 0.0 define.
344
+   */
359
   uint16_t fat32Version;
345
   uint16_t fat32Version;
360
-          /**
361
-           * Cluster number of the first cluster of the root directory for FAT32.
362
-           * This usually 2 but not required to be 2.
363
-           */
346
+  /**
347
+   * Cluster number of the first cluster of the root directory for FAT32.
348
+   * This usually 2 but not required to be 2.
349
+   */
364
   uint32_t fat32RootCluster;
350
   uint32_t fat32RootCluster;
365
-          /**
366
-           * Sector number of FSINFO structure in the reserved area of the
367
-           * FAT32 volume. Usually 1.
368
-           */
351
+  /**
352
+   * Sector number of FSINFO structure in the reserved area of the
353
+   * FAT32 volume. Usually 1.
354
+   */
369
   uint16_t fat32FSInfo;
355
   uint16_t fat32FSInfo;
370
-          /**
371
-           * If nonzero, indicates the sector number in the reserved area
372
-           * of the volume of a copy of the boot record. Usually 6.
373
-           * No value other than 6 is recommended.
374
-           */
356
+  /**
357
+   * If nonzero, indicates the sector number in the reserved area
358
+   * of the volume of a copy of the boot record. Usually 6.
359
+   * No value other than 6 is recommended.
360
+   */
375
   uint16_t fat32BackBootBlock;
361
   uint16_t fat32BackBootBlock;
376
-          /**
377
-           * Reserved for future expansion. Code that formats FAT32 volumes
378
-           * should always set all of the bytes of this field to 0.
379
-           */
362
+  /**
363
+   * Reserved for future expansion. Code that formats FAT32 volumes
364
+   * should always set all of the bytes of this field to 0.
365
+   */
380
   uint8_t  fat32Reserved[12];
366
   uint8_t  fat32Reserved[12];
381
-           /**
382
-            * Related to the BIOS physical drive number. Floppy drives are
383
-            * identified as 0x00 and physical hard disks are identified as
384
-            * 0x80, regardless of the number of physical disk drives.
385
-            * Typically, this value is set prior to issuing an INT 13h BIOS
386
-            * call to specify the device to access. The value is only
387
-            * relevant if the device is a boot device.
388
-            */
367
+  /**
368
+   * Related to the BIOS physical drive number. Floppy drives are
369
+   * identified as 0x00 and physical hard disks are identified as
370
+   * 0x80, regardless of the number of physical disk drives.
371
+   * Typically, this value is set prior to issuing an INT 13h BIOS
372
+   * call to specify the device to access. The value is only
373
+   * relevant if the device is a boot device.
374
+   */
389
   uint8_t  driveNumber;
375
   uint8_t  driveNumber;
390
-           /** used by Windows NT - should be zero for FAT */
391
-  uint8_t  reserved1;
392
-           /** 0x29 if next three fields are valid */
393
-  uint8_t  bootSignature;
394
-           /**
395
-            * A random serial number created when formatting a disk,
396
-            * which helps to distinguish between disks.
397
-            * Usually generated by combining date and time.
398
-            */
376
+
377
+  uint8_t  reserved1;       // Used by Windows NT - should be zero for FAT
378
+  uint8_t  bootSignature;   // 0x29 if next three fields are valid
379
+
380
+  /**
381
+   * A random serial number created when formatting a disk,
382
+   * which helps to distinguish between disks.
383
+   * Usually generated by combining date and time.
384
+   */
399
   uint32_t volumeSerialNumber;
385
   uint32_t volumeSerialNumber;
400
-           /**
401
-            * A field once used to store the volume label. The volume label
402
-            * is now stored as a special file in the root directory.
403
-            */
386
+  /**
387
+   * A field once used to store the volume label. The volume label
388
+   * is now stored as a special file in the root directory.
389
+   */
404
   char     volumeLabel[11];
390
   char     volumeLabel[11];
405
-           /**
406
-            * A text field with a value of FAT32.
407
-            */
391
+  /**
392
+   * A text field with a value of FAT32.
393
+   */
408
   char     fileSystemType[8];
394
   char     fileSystemType[8];
409
-           /** X86 boot code */
410
-  uint8_t  bootCode[420];
411
-           /** must be 0x55 */
412
-  uint8_t  bootSectorSig0;
413
-           /** must be 0xAA */
414
-  uint8_t  bootSectorSig1;
395
+
396
+  uint8_t  bootCode[420];   // X86 boot code
397
+  uint8_t  bootSectorSig0;  // must be 0x55
398
+  uint8_t  bootSectorSig1;  // must be 0xAA
399
+
415
 } PACKED;
400
 } PACKED;
416
-/** Type name for FAT32 Boot Sector */
417
-typedef struct fat32_boot fat32_boot_t;
418
-//------------------------------------------------------------------------------
419
-/** Lead signature for a FSINFO sector */
420
-uint32_t const FSINFO_LEAD_SIG = 0x41615252;
421
-/** Struct signature for a FSINFO sector */
422
-uint32_t const FSINFO_STRUCT_SIG = 0x61417272;
401
+
402
+typedef struct fat32_boot fat32_boot_t; // Type name for FAT32 Boot Sector
403
+
404
+uint32_t const FSINFO_LEAD_SIG   = 0x41615252,  // 'AaRR' Lead signature for a FSINFO sector
405
+               FSINFO_STRUCT_SIG = 0x61417272;  // 'aArr' Struct signature for a FSINFO sector
406
+
423
 /**
407
 /**
424
  * \struct fat32_fsinfo
408
  * \struct fat32_fsinfo
425
  *
409
  *
427
  *
411
  *
428
  */
412
  */
429
 struct fat32_fsinfo {
413
 struct fat32_fsinfo {
430
-           /** must be 0x52, 0x52, 0x61, 0x41 */
431
-  uint32_t  leadSignature;
432
-           /** must be zero */
433
-  uint8_t  reserved1[480];
434
-           /** must be 0x72, 0x72, 0x41, 0x61 */
435
-  uint32_t  structSignature;
414
+  uint32_t  leadSignature;    // must be 0x52, 0x52, 0x61, 0x41 'RRaA'
415
+  uint8_t  reserved1[480];    // must be zero
416
+  uint32_t  structSignature;  // must be 0x72, 0x72, 0x41, 0x61 'rrAa'
436
           /**
417
           /**
437
            * Contains the last known free cluster count on the volume.
418
            * Contains the last known free cluster count on the volume.
438
            * If the value is 0xFFFFFFFF, then the free count is unknown
419
            * If the value is 0xFFFFFFFF, then the free count is unknown
448
            * should start looking at cluster 2.
429
            * should start looking at cluster 2.
449
            */
430
            */
450
   uint32_t nextFree;
431
   uint32_t nextFree;
451
-           /** must be zero */
452
-  uint8_t  reserved2[12];
453
-           /** must be 0x00, 0x00, 0x55, 0xAA */
454
-  uint8_t  tailSignature[4];
432
+
433
+  uint8_t  reserved2[12];     // must be zero
434
+  uint8_t  tailSignature[4];  // must be 0x00, 0x00, 0x55, 0xAA
455
 } PACKED;
435
 } PACKED;
456
-/** Type name for FAT32 FSINFO Sector */
457
-typedef struct fat32_fsinfo fat32_fsinfo_t;
458
-//------------------------------------------------------------------------------
436
+
437
+typedef struct fat32_fsinfo fat32_fsinfo_t; // Type name for FAT32 FSINFO Sector
438
+
459
 // End Of Chain values for FAT entries
439
 // End Of Chain values for FAT entries
460
-/** FAT12 end of chain value used by Microsoft. */
461
-uint16_t const FAT12EOC = 0xFFF;
462
-/** Minimum value for FAT12 EOC.  Use to test for EOC. */
463
-uint16_t const FAT12EOC_MIN = 0xFF8;
464
-/** FAT16 end of chain value used by Microsoft. */
465
-uint16_t const FAT16EOC = 0xFFFF;
466
-/** Minimum value for FAT16 EOC.  Use to test for EOC. */
467
-uint16_t const FAT16EOC_MIN = 0xFFF8;
468
-/** FAT32 end of chain value used by Microsoft. */
469
-uint32_t const FAT32EOC = 0x0FFFFFFF;
470
-/** Minimum value for FAT32 EOC.  Use to test for EOC. */
471
-uint32_t const FAT32EOC_MIN = 0x0FFFFFF8;
472
-/** Mask a for FAT32 entry. Entries are 28 bits. */
473
-uint32_t const FAT32MASK = 0x0FFFFFFF;
474
-//------------------------------------------------------------------------------
440
+uint16_t const FAT12EOC = 0xFFF,          // FAT12 end of chain value used by Microsoft.
441
+               FAT12EOC_MIN = 0xFF8,      // Minimum value for FAT12 EOC.  Use to test for EOC.
442
+               FAT16EOC = 0xFFFF,         // FAT16 end of chain value used by Microsoft.
443
+               FAT16EOC_MIN = 0xFFF8;     // Minimum value for FAT16 EOC.  Use to test for EOC.
444
+uint32_t const FAT32EOC = 0x0FFFFFFF,     // FAT32 end of chain value used by Microsoft.
445
+               FAT32EOC_MIN = 0x0FFFFFF8, // Minimum value for FAT32 EOC.  Use to test for EOC.
446
+               FAT32MASK = 0x0FFFFFFF;    // Mask a for FAT32 entry. Entries are 28 bits.
447
+
475
 /**
448
 /**
476
  * \struct directoryEntry
449
  * \struct directoryEntry
477
  * \brief FAT short directory entry
450
  * \brief FAT short directory entry
503
  * The valid time range is from Midnight 00:00:00 to 23:59:58.
476
  * The valid time range is from Midnight 00:00:00 to 23:59:58.
504
  */
477
  */
505
 struct directoryEntry {
478
 struct directoryEntry {
506
-           /** Short 8.3 name.
507
-            *
508
-            * The first eight bytes contain the file name with blank fill.
509
-            * The last three bytes contain the file extension with blank fill.
510
-            */
479
+  /**
480
+   * Short 8.3 name.
481
+   *
482
+   * The first eight bytes contain the file name with blank fill.
483
+   * The last three bytes contain the file extension with blank fill.
484
+   */
511
   uint8_t  name[11];
485
   uint8_t  name[11];
512
-          /** Entry attributes.
513
-           *
514
-           * The upper two bits of the attribute byte are reserved and should
515
-           * always be set to 0 when a file is created and never modified or
516
-           * looked at after that.  See defines that begin with DIR_ATT_.
517
-           */
486
+  /**
487
+   * Entry attributes.
488
+   *
489
+   * The upper two bits of the attribute byte are reserved and should
490
+   * always be set to 0 when a file is created and never modified or
491
+   * looked at after that.  See defines that begin with DIR_ATT_.
492
+   */
518
   uint8_t  attributes;
493
   uint8_t  attributes;
519
-          /**
520
-           * Reserved for use by Windows NT. Set value to 0 when a file is
521
-           * created and never modify or look at it after that.
522
-           */
494
+  /**
495
+   * Reserved for use by Windows NT. Set value to 0 when a file is
496
+   * created and never modify or look at it after that.
497
+   */
523
   uint8_t  reservedNT;
498
   uint8_t  reservedNT;
524
-          /**
525
-           * The granularity of the seconds part of creationTime is 2 seconds
526
-           * so this field is a count of tenths of a second and it's valid
527
-           * value range is 0-199 inclusive. (WHG note - seems to be hundredths)
528
-           */
499
+  /**
500
+   * The granularity of the seconds part of creationTime is 2 seconds
501
+   * so this field is a count of tenths of a second and it's valid
502
+   * value range is 0-199 inclusive. (WHG note - seems to be hundredths)
503
+   */
529
   uint8_t  creationTimeTenths;
504
   uint8_t  creationTimeTenths;
530
-           /** Time file was created. */
531
-  uint16_t creationTime;
532
-           /** Date file was created. */
533
-  uint16_t creationDate;
534
-          /**
535
-           * Last access date. Note that there is no last access time, only
536
-           * a date.  This is the date of last read or write. In the case of
537
-           * a write, this should be set to the same date as lastWriteDate.
538
-           */
505
+
506
+  uint16_t creationTime;    // Time file was created.
507
+  uint16_t creationDate;    // Date file was created.
508
+
509
+  /**
510
+   * Last access date. Note that there is no last access time, only
511
+   * a date.  This is the date of last read or write. In the case of
512
+   * a write, this should be set to the same date as lastWriteDate.
513
+   */
539
   uint16_t lastAccessDate;
514
   uint16_t lastAccessDate;
540
-          /**
541
-           * High word of this entry's first cluster number (always 0 for a
542
-           * FAT12 or FAT16 volume).
543
-           */
515
+  /**
516
+   * High word of this entry's first cluster number (always 0 for a
517
+   * FAT12 or FAT16 volume).
518
+   */
544
   uint16_t firstClusterHigh;
519
   uint16_t firstClusterHigh;
545
-           /** Time of last write. File creation is considered a write. */
546
-  uint16_t lastWriteTime;
547
-           /** Date of last write. File creation is considered a write. */
548
-  uint16_t lastWriteDate;
549
-           /** Low word of this entry's first cluster number. */
550
-  uint16_t firstClusterLow;
551
-           /** 32-bit unsigned holding this file's size in bytes. */
552
-  uint32_t fileSize;
520
+
521
+  uint16_t lastWriteTime;   // Time of last write. File creation is considered a write.
522
+  uint16_t lastWriteDate;   // Date of last write. File creation is considered a write.
523
+  uint16_t firstClusterLow; // Low word of this entry's first cluster number.
524
+  uint32_t fileSize;        // 32-bit unsigned holding this file's size in bytes.
553
 } PACKED;
525
 } PACKED;
526
+
554
 /**
527
 /**
555
  * \struct directoryVFATEntry
528
  * \struct directoryVFATEntry
556
  * \brief VFAT long filename directory entry
529
  * \brief VFAT long filename directory entry
568
    *  bit 0-4: the position of this long filename block (first block is 1)
541
    *  bit 0-4: the position of this long filename block (first block is 1)
569
    */
542
    */
570
   uint8_t  sequenceNumber;
543
   uint8_t  sequenceNumber;
571
-  /** First set of UTF-16 characters */
572
-  uint16_t name1[5];//UTF-16
573
-  /** attributes (at the same location as in directoryEntry), always 0x0F */
574
-  uint8_t  attributes;
575
-  /** Reserved for use by Windows NT. Always 0. */
576
-  uint8_t  reservedNT;
577
-  /** Checksum of the short 8.3 filename, can be used to checked if the file system as modified by a not-long-filename aware implementation. */
578
-  uint8_t  checksum;
579
-  /** Second set of UTF-16 characters */
580
-  uint16_t name2[6];//UTF-16
581
-  /** firstClusterLow is always zero for longFilenames */
582
-  uint16_t firstClusterLow;
583
-  /** Third set of UTF-16 characters */
584
-  uint16_t name3[2];//UTF-16
544
+
545
+  uint16_t name1[5];        // First set of UTF-16 characters
546
+  uint8_t  attributes;      // attributes (at the same location as in directoryEntry), always 0x0F
547
+  uint8_t  reservedNT;      // Reserved for use by Windows NT. Always 0.
548
+  uint8_t  checksum;        // Checksum of the short 8.3 filename, can be used to checked if the file system as modified by a not-long-filename aware implementation.
549
+  uint16_t name2[6];        // Second set of UTF-16 characters
550
+  uint16_t firstClusterLow; // firstClusterLow is always zero for longFilenames
551
+  uint16_t name3[2];        // Third set of UTF-16 characters
585
 } PACKED;
552
 } PACKED;
586
-//------------------------------------------------------------------------------
553
+
587
 // Definitions for directory entries
554
 // Definitions for directory entries
588
 //
555
 //
589
-/** Type name for directoryEntry */
590
-typedef struct directoryEntry dir_t;
591
-/** Type name for directoryVFATEntry */
592
-typedef struct directoryVFATEntry vfat_t;
593
-/** escape for name[0] = 0xE5 */
594
-uint8_t const DIR_NAME_0xE5 = 0x05;
595
-/** name[0] value for entry that is free after being "deleted" */
596
-uint8_t const DIR_NAME_DELETED = 0xE5;
597
-/** name[0] value for entry that is free and no allocated entries follow */
598
-uint8_t const DIR_NAME_FREE = 0x00;
599
-/** file is read-only */
600
-uint8_t const DIR_ATT_READ_ONLY = 0x01;
601
-/** File should hidden in directory listings */
602
-uint8_t const DIR_ATT_HIDDEN = 0x02;
603
-/** Entry is for a system file */
604
-uint8_t const DIR_ATT_SYSTEM = 0x04;
605
-/** Directory entry contains the volume label */
606
-uint8_t const DIR_ATT_VOLUME_ID = 0x08;
607
-/** Entry is for a directory */
608
-uint8_t const DIR_ATT_DIRECTORY = 0x10;
609
-/** Old DOS archive bit for backup support */
610
-uint8_t const DIR_ATT_ARCHIVE = 0x20;
611
-/** Test value for long name entry.  Test is
612
-  (d->attributes & DIR_ATT_LONG_NAME_MASK) == DIR_ATT_LONG_NAME. */
613
-uint8_t const DIR_ATT_LONG_NAME = 0x0F;
614
-/** Test mask for long name entry */
615
-uint8_t const DIR_ATT_LONG_NAME_MASK = 0x3F;
616
-/** defined attribute bits */
617
-uint8_t const DIR_ATT_DEFINED_BITS = 0x3F;
618
-/** Directory entry is part of a long name
556
+typedef struct directoryEntry dir_t;          // Type name for directoryEntry
557
+typedef struct directoryVFATEntry vfat_t;     // Type name for directoryVFATEntry
558
+
559
+uint8_t const DIR_NAME_0xE5     = 0x05,       // escape for name[0] = 0xE5
560
+              DIR_NAME_DELETED  = 0xE5,       // name[0] value for entry that is free after being "deleted"
561
+              DIR_NAME_FREE     = 0x00,       // name[0] value for entry that is free and no allocated entries follow
562
+              DIR_ATT_READ_ONLY = 0x01,       // file is read-only
563
+              DIR_ATT_HIDDEN    = 0x02,       // File should hidden in directory listings
564
+              DIR_ATT_SYSTEM    = 0x04,       // Entry is for a system file
565
+              DIR_ATT_VOLUME_ID = 0x08,       // Directory entry contains the volume label
566
+              DIR_ATT_DIRECTORY = 0x10,       // Entry is for a directory
567
+              DIR_ATT_ARCHIVE   = 0x20,       // Old DOS archive bit for backup support
568
+              DIR_ATT_LONG_NAME = 0x0F,       // Test value for long name entry.  Test is (d->attributes & DIR_ATT_LONG_NAME_MASK) == DIR_ATT_LONG_NAME.
569
+              DIR_ATT_LONG_NAME_MASK = 0x3F,  // Test mask for long name entry
570
+              DIR_ATT_DEFINED_BITS = 0x3F;    // defined attribute bits
571
+
572
+/**
573
+ * Directory entry is part of a long name
619
  * \param[in] dir Pointer to a directory entry.
574
  * \param[in] dir Pointer to a directory entry.
620
  *
575
  *
621
  * \return true if the entry is for part of a long name else false.
576
  * \return true if the entry is for part of a long name else false.
623
 static inline uint8_t DIR_IS_LONG_NAME(const dir_t* dir) {
578
 static inline uint8_t DIR_IS_LONG_NAME(const dir_t* dir) {
624
   return (dir->attributes & DIR_ATT_LONG_NAME_MASK) == DIR_ATT_LONG_NAME;
579
   return (dir->attributes & DIR_ATT_LONG_NAME_MASK) == DIR_ATT_LONG_NAME;
625
 }
580
 }
581
+
626
 /** Mask for file/subdirectory tests */
582
 /** Mask for file/subdirectory tests */
627
 uint8_t const DIR_ATT_FILE_TYPE_MASK = (DIR_ATT_VOLUME_ID | DIR_ATT_DIRECTORY);
583
 uint8_t const DIR_ATT_FILE_TYPE_MASK = (DIR_ATT_VOLUME_ID | DIR_ATT_DIRECTORY);
628
-/** Directory entry is for a file
584
+
585
+/**
586
+ * Directory entry is for a file
629
  * \param[in] dir Pointer to a directory entry.
587
  * \param[in] dir Pointer to a directory entry.
630
  *
588
  *
631
  * \return true if the entry is for a normal file else false.
589
  * \return true if the entry is for a normal file else false.
633
 static inline uint8_t DIR_IS_FILE(const dir_t* dir) {
591
 static inline uint8_t DIR_IS_FILE(const dir_t* dir) {
634
   return (dir->attributes & DIR_ATT_FILE_TYPE_MASK) == 0;
592
   return (dir->attributes & DIR_ATT_FILE_TYPE_MASK) == 0;
635
 }
593
 }
636
-/** Directory entry is for a subdirectory
594
+
595
+/**
596
+ * Directory entry is for a subdirectory
637
  * \param[in] dir Pointer to a directory entry.
597
  * \param[in] dir Pointer to a directory entry.
638
  *
598
  *
639
  * \return true if the entry is for a subdirectory else false.
599
  * \return true if the entry is for a subdirectory else false.
641
 static inline uint8_t DIR_IS_SUBDIR(const dir_t* dir) {
601
 static inline uint8_t DIR_IS_SUBDIR(const dir_t* dir) {
642
   return (dir->attributes & DIR_ATT_FILE_TYPE_MASK) == DIR_ATT_DIRECTORY;
602
   return (dir->attributes & DIR_ATT_FILE_TYPE_MASK) == DIR_ATT_DIRECTORY;
643
 }
603
 }
644
-/** Directory entry is for a file or subdirectory
604
+
605
+/**
606
+ * Directory entry is for a file or subdirectory
645
  * \param[in] dir Pointer to a directory entry.
607
  * \param[in] dir Pointer to a directory entry.
646
  *
608
  *
647
  * \return true if the entry is for a normal file or subdirectory else false.
609
  * \return true if the entry is for a normal file or subdirectory else false.
649
 static inline uint8_t DIR_IS_FILE_OR_SUBDIR(const dir_t* dir) {
611
 static inline uint8_t DIR_IS_FILE_OR_SUBDIR(const dir_t* dir) {
650
   return (dir->attributes & DIR_ATT_VOLUME_ID) == 0;
612
   return (dir->attributes & DIR_ATT_VOLUME_ID) == 0;
651
 }
613
 }
652
-#endif  // SdFatStructs_h
653
-
654
 
614
 
655
-#endif
615
+#endif // SDFATSTRUCTS_H

+ 23
- 23
Marlin/SdFatUtil.cpp Переглянути файл

26
  *
26
  *
27
  * This file is part of the Arduino Sd2Card Library
27
  * This file is part of the Arduino Sd2Card Library
28
  */
28
  */
29
-#include "Marlin.h"
29
+#include "MarlinConfig.h"
30
 
30
 
31
 #if ENABLED(SDSUPPORT)
31
 #if ENABLED(SDSUPPORT)
32
+
32
 #include "SdFatUtil.h"
33
 #include "SdFatUtil.h"
34
+#include "serial.h"
33
 
35
 
34
-//------------------------------------------------------------------------------
35
-/** Amount of free RAM
36
+/**
37
+ * Amount of free RAM
36
  * \return The number of free bytes.
38
  * \return The number of free bytes.
37
  */
39
  */
38
 #ifdef __arm__
40
 #ifdef __arm__
44
 #else  // __arm__
46
 #else  // __arm__
45
 extern char* __brkval;
47
 extern char* __brkval;
46
 extern char __bss_end;
48
 extern char __bss_end;
47
-/** Amount of free RAM
49
+/**
50
+ * Amount of free RAM
48
  * \return The number of free bytes.
51
  * \return The number of free bytes.
49
  */
52
  */
50
 int SdFatUtil::FreeRam() {
53
 int SdFatUtil::FreeRam() {
53
 }
56
 }
54
 #endif  // __arm
57
 #endif  // __arm
55
 
58
 
56
-//------------------------------------------------------------------------------
57
-/** %Print a string in flash memory.
59
+/**
60
+ * %Print a string in flash memory.
58
  *
61
  *
59
  * \param[in] pr Print object for output.
62
  * \param[in] pr Print object for output.
60
  * \param[in] str Pointer to string stored in flash memory.
63
  * \param[in] str Pointer to string stored in flash memory.
62
 void SdFatUtil::print_P(PGM_P str) {
65
 void SdFatUtil::print_P(PGM_P str) {
63
   for (uint8_t c; (c = pgm_read_byte(str)); str++) MYSERIAL.write(c);
66
   for (uint8_t c; (c = pgm_read_byte(str)); str++) MYSERIAL.write(c);
64
 }
67
 }
65
-//------------------------------------------------------------------------------
66
-/** %Print a string in flash memory followed by a CR/LF.
68
+
69
+/**
70
+ * %Print a string in flash memory followed by a CR/LF.
67
  *
71
  *
68
  * \param[in] pr Print object for output.
72
  * \param[in] pr Print object for output.
69
  * \param[in] str Pointer to string stored in flash memory.
73
  * \param[in] str Pointer to string stored in flash memory.
70
  */
74
  */
71
-void SdFatUtil::println_P(PGM_P str) {
72
-  print_P(str);
73
-  MYSERIAL.println();
74
-}
75
-//------------------------------------------------------------------------------
76
-/** %Print a string in flash memory to Serial.
75
+void SdFatUtil::println_P(PGM_P str) { print_P(str); MYSERIAL.println(); }
76
+
77
+/**
78
+ * %Print a string in flash memory to Serial.
77
  *
79
  *
78
  * \param[in] str Pointer to string stored in flash memory.
80
  * \param[in] str Pointer to string stored in flash memory.
79
  */
81
  */
80
-void SdFatUtil::SerialPrint_P(PGM_P str) {
81
-  print_P(str);
82
-}
83
-//------------------------------------------------------------------------------
84
-/** %Print a string in flash memory to Serial followed by a CR/LF.
82
+void SdFatUtil::SerialPrint_P(PGM_P str) { print_P(str); }
83
+
84
+/**
85
+ * %Print a string in flash memory to Serial followed by a CR/LF.
85
  *
86
  *
86
  * \param[in] str Pointer to string stored in flash memory.
87
  * \param[in] str Pointer to string stored in flash memory.
87
  */
88
  */
88
-void SdFatUtil::SerialPrintln_P(PGM_P str) {
89
-  println_P(str);
90
-}
91
-#endif
89
+void SdFatUtil::SerialPrintln_P(PGM_P str) { println_P(str); }
90
+
91
+#endif // SDSUPPORT

+ 3
- 8
Marlin/SdFatUtil.h Переглянути файл

26
  *
26
  *
27
  * This file is part of the Arduino Sd2Card Library
27
  * This file is part of the Arduino Sd2Card Library
28
  */
28
  */
29
-#ifndef SdFatUtil_h
30
-#define SdFatUtil_h
31
-
32
-#include "Marlin.h"
33
-#if ENABLED(SDSUPPORT)
29
+#ifndef _SDFATUTIL_H_
30
+#define _SDFATUTIL_H_
34
 
31
 
35
 /**
32
 /**
36
  * \file
33
  * \file
51
 
48
 
52
 using namespace SdFatUtil;  // NOLINT
49
 using namespace SdFatUtil;  // NOLINT
53
 
50
 
54
-#endif // SDSUPPORT
55
-
56
-#endif // SdFatUtil_h
51
+#endif // _SDFATUTIL_H_

+ 26
- 28
Marlin/SdFile.cpp Переглянути файл

26
  *
26
  *
27
  * This file is part of the Arduino Sd2Card Library
27
  * This file is part of the Arduino Sd2Card Library
28
  */
28
  */
29
-#include "Marlin.h"
29
+#include "MarlinConfig.h"
30
 
30
 
31
 #if ENABLED(SDSUPPORT)
31
 #if ENABLED(SDSUPPORT)
32
+
32
 #include "SdFile.h"
33
 #include "SdFile.h"
33
-/**  Create a file object and open it in the current working directory.
34
+
35
+/**
36
+ *  Create a file object and open it in the current working directory.
34
  *
37
  *
35
  * \param[in] path A path with a valid 8.3 DOS name for a file to be opened.
38
  * \param[in] path A path with a valid 8.3 DOS name for a file to be opened.
36
  *
39
  *
37
  * \param[in] oflag Values for \a oflag are constructed by a bitwise-inclusive
40
  * \param[in] oflag Values for \a oflag are constructed by a bitwise-inclusive
38
  * OR of open flags. see SdBaseFile::open(SdBaseFile*, const char*, uint8_t).
41
  * OR of open flags. see SdBaseFile::open(SdBaseFile*, const char*, uint8_t).
39
  */
42
  */
40
-SdFile::SdFile(const char* path, uint8_t oflag) : SdBaseFile(path, oflag) {
41
-}
42
-//------------------------------------------------------------------------------
43
-/** Write data to an open file.
43
+SdFile::SdFile(const char* path, uint8_t oflag) : SdBaseFile(path, oflag) { }
44
+
45
+/**
46
+ * Write data to an open file.
44
  *
47
  *
45
  * \note Data is moved to the cache but may not be written to the
48
  * \note Data is moved to the cache but may not be written to the
46
  * storage device until sync() is called.
49
  * storage device until sync() is called.
55
  * for a read-only file, device is full, a corrupt file system or an I/O error.
58
  * for a read-only file, device is full, a corrupt file system or an I/O error.
56
  *
59
  *
57
  */
60
  */
58
-int16_t SdFile::write(const void* buf, uint16_t nbyte) {
59
-  return SdBaseFile::write(buf, nbyte);
60
-}
61
-//------------------------------------------------------------------------------
62
-/** Write a byte to a file. Required by the Arduino Print class.
61
+int16_t SdFile::write(const void* buf, uint16_t nbyte) { return SdBaseFile::write(buf, nbyte); }
62
+
63
+/**
64
+ * Write a byte to a file. Required by the Arduino Print class.
63
  * \param[in] b the byte to be written.
65
  * \param[in] b the byte to be written.
64
  * Use writeError to check for errors.
66
  * Use writeError to check for errors.
65
  */
67
  */
66
 #if ARDUINO >= 100
68
 #if ARDUINO >= 100
67
-  size_t SdFile::write(uint8_t b) {
68
-    return SdBaseFile::write(&b, 1);
69
-  }
69
+  size_t SdFile::write(uint8_t b) { return SdBaseFile::write(&b, 1); }
70
 #else
70
 #else
71
-  void SdFile::write(uint8_t b) {
72
-    SdBaseFile::write(&b, 1);
73
-  }
71
+  void SdFile::write(uint8_t b) { SdBaseFile::write(&b, 1); }
74
 #endif
72
 #endif
75
-//------------------------------------------------------------------------------
76
-/** Write a string to a file. Used by the Arduino Print class.
73
+
74
+/**
75
+ * Write a string to a file. Used by the Arduino Print class.
77
  * \param[in] str Pointer to the string.
76
  * \param[in] str Pointer to the string.
78
  * Use writeError to check for errors.
77
  * Use writeError to check for errors.
79
  */
78
  */
80
-void SdFile::write(const char* str) {
81
-  SdBaseFile::write(str, strlen(str));
82
-}
83
-//------------------------------------------------------------------------------
84
-/** Write a PROGMEM string to a file.
79
+void SdFile::write(const char* str) { SdBaseFile::write(str, strlen(str)); }
80
+
81
+/**
82
+ * Write a PROGMEM string to a file.
85
  * \param[in] str Pointer to the PROGMEM string.
83
  * \param[in] str Pointer to the PROGMEM string.
86
  * Use writeError to check for errors.
84
  * Use writeError to check for errors.
87
  */
85
  */
88
 void SdFile::write_P(PGM_P str) {
86
 void SdFile::write_P(PGM_P str) {
89
   for (uint8_t c; (c = pgm_read_byte(str)); str++) write(c);
87
   for (uint8_t c; (c = pgm_read_byte(str)); str++) write(c);
90
 }
88
 }
91
-//------------------------------------------------------------------------------
92
-/** Write a PROGMEM string followed by CR/LF to a file.
89
+
90
+/**
91
+ * Write a PROGMEM string followed by CR/LF to a file.
93
  * \param[in] str Pointer to the PROGMEM string.
92
  * \param[in] str Pointer to the PROGMEM string.
94
  * Use writeError to check for errors.
93
  * Use writeError to check for errors.
95
  */
94
  */
98
   write_P(PSTR("\r\n"));
97
   write_P(PSTR("\r\n"));
99
 }
98
 }
100
 
99
 
101
-
102
-#endif
100
+#endif // SDSUPPORT

+ 9
- 12
Marlin/SdFile.h Переглянути файл

21
  */
21
  */
22
 
22
 
23
 /**
23
 /**
24
+ * \file
25
+ * \brief SdFile class
26
+ */
27
+
28
+/**
24
  * Arduino SdFat Library
29
  * Arduino SdFat Library
25
  * Copyright (C) 2009 by William Greiman
30
  * Copyright (C) 2009 by William Greiman
26
  *
31
  *
27
  * This file is part of the Arduino Sd2Card Library
32
  * This file is part of the Arduino Sd2Card Library
28
  */
33
  */
29
-/**
30
- * \file
31
- * \brief SdFile class
32
- */
33
-#include "Marlin.h"
34
+#ifndef _SDFILE_H_
35
+#define _SDFILE_H_
34
 
36
 
35
-#if ENABLED(SDSUPPORT)
36
 #include "SdBaseFile.h"
37
 #include "SdBaseFile.h"
37
 #include <Print.h>
38
 #include <Print.h>
38
-#ifndef SdFile_h
39
-#define SdFile_h
40
-//------------------------------------------------------------------------------
39
+
41
 /**
40
 /**
42
  * \class SdFile
41
  * \class SdFile
43
  * \brief SdBaseFile with Print.
42
  * \brief SdBaseFile with Print.
57
   void write_P(PGM_P str);
56
   void write_P(PGM_P str);
58
   void writeln_P(PGM_P str);
57
   void writeln_P(PGM_P str);
59
 };
58
 };
60
-#endif  // SdFile_h
61
-
62
 
59
 
63
-#endif
60
+#endif // _SDFILE_H_

+ 27
- 49
Marlin/SdInfo.h Переглянути файл

26
  *
26
  *
27
  * This file is part of the Arduino Sd2Card Library
27
  * This file is part of the Arduino Sd2Card Library
28
  */
28
  */
29
-#include "Marlin.h"
30
-#if ENABLED(SDSUPPORT)
29
+#ifndef _SDINFO_H_
30
+#define _SDINFO_H_
31
 
31
 
32
-#ifndef SdInfo_h
33
-#define SdInfo_h
34
 #include <stdint.h>
32
 #include <stdint.h>
33
+
35
 // Based on the document:
34
 // Based on the document:
36
 //
35
 //
37
 // SD Specifications
36
 // SD Specifications
42
 // May 18, 2010
41
 // May 18, 2010
43
 //
42
 //
44
 // http://www.sdcard.org/developers/tech/sdcard/pls/simplified_specs
43
 // http://www.sdcard.org/developers/tech/sdcard/pls/simplified_specs
45
-//------------------------------------------------------------------------------
44
+
46
 // SD card commands
45
 // SD card commands
47
-/** GO_IDLE_STATE - init card in spi mode if CS low */
48
-uint8_t const CMD0 = 0x00;
49
-/** SEND_IF_COND - verify SD Memory Card interface operating condition.*/
50
-uint8_t const CMD8 = 0x08;
51
-/** SEND_CSD - read the Card Specific Data (CSD register) */
52
-uint8_t const CMD9 = 0x09;
53
-/** SEND_CID - read the card identification information (CID register) */
54
-uint8_t const CMD10 = 0x0A;
55
-/** STOP_TRANSMISSION - end multiple block read sequence */
56
-uint8_t const CMD12 = 0x0C;
57
-/** SEND_STATUS - read the card status register */
58
-uint8_t const CMD13 = 0x0D;
59
-/** READ_SINGLE_BLOCK - read a single data block from the card */
60
-uint8_t const CMD17 = 0x11;
61
-/** READ_MULTIPLE_BLOCK - read a multiple data blocks from the card */
62
-uint8_t const CMD18 = 0x12;
63
-/** WRITE_BLOCK - write a single data block to the card */
64
-uint8_t const CMD24 = 0x18;
65
-/** WRITE_MULTIPLE_BLOCK - write blocks of data until a STOP_TRANSMISSION */
66
-uint8_t const CMD25 = 0x19;
67
-/** ERASE_WR_BLK_START - sets the address of the first block to be erased */
68
-uint8_t const CMD32 = 0x20;
69
-/** ERASE_WR_BLK_END - sets the address of the last block of the continuous
70
-    range to be erased*/
71
-uint8_t const CMD33 = 0x21;
72
-/** ERASE - erase all previously selected blocks */
73
-uint8_t const CMD38 = 0x26;
74
-/** APP_CMD - escape for application specific command */
75
-uint8_t const CMD55 = 0x37;
76
-/** READ_OCR - read the OCR register of a card */
77
-uint8_t const CMD58 = 0x3A;
78
-/** SET_WR_BLK_ERASE_COUNT - Set the number of write blocks to be
79
-     pre-erased before writing */
80
-uint8_t const ACMD23 = 0x17;
81
-/** SD_SEND_OP_COMD - Sends host capacity support information and
82
-    activates the card's initialization process */
83
-uint8_t const ACMD41 = 0x29;
84
-//------------------------------------------------------------------------------
46
+uint8_t const CMD0 = 0x00,    // GO_IDLE_STATE - init card in spi mode if CS low
47
+              CMD8 = 0x08,    // SEND_IF_COND - verify SD Memory Card interface operating condition
48
+              CMD9 = 0x09,    // SEND_CSD - read the Card Specific Data (CSD register)
49
+              CMD10 = 0x0A,   // SEND_CID - read the card identification information (CID register)
50
+              CMD12 = 0x0C,   // STOP_TRANSMISSION - end multiple block read sequence
51
+              CMD13 = 0x0D,   // SEND_STATUS - read the card status register
52
+              CMD17 = 0x11,   // READ_SINGLE_BLOCK - read a single data block from the card
53
+              CMD18 = 0x12,   // READ_MULTIPLE_BLOCK - read a multiple data blocks from the card
54
+              CMD24 = 0x18,   // WRITE_BLOCK - write a single data block to the card
55
+              CMD25 = 0x19,   // WRITE_MULTIPLE_BLOCK - write blocks of data until a STOP_TRANSMISSION
56
+              CMD32 = 0x20,   // ERASE_WR_BLK_START - sets the address of the first block to be erased
57
+              CMD33 = 0x21,   // ERASE_WR_BLK_END - sets the address of the last block of the continuous range to be erased*/
58
+              CMD38 = 0x26,   // ERASE - erase all previously selected blocks */
59
+              CMD55 = 0x37,   // APP_CMD - escape for application specific command */
60
+              CMD58 = 0x3A,   // READ_OCR - read the OCR register of a card */
61
+              ACMD23 = 0x17,  // SET_WR_BLK_ERASE_COUNT - Set the number of write blocks to be pre-erased before writing */
62
+              ACMD41 = 0x29;  // SD_SEND_OP_COMD - Sends host capacity support information and activates the card's initialization process */
63
+
85
 /** status for card in the ready state */
64
 /** status for card in the ready state */
86
 uint8_t const R1_READY_STATE = 0x00;
65
 uint8_t const R1_READY_STATE = 0x00;
87
 /** status for card in the idle state */
66
 /** status for card in the idle state */
98
 uint8_t const DATA_RES_MASK = 0x1F;
77
 uint8_t const DATA_RES_MASK = 0x1F;
99
 /** write data accepted token */
78
 /** write data accepted token */
100
 uint8_t const DATA_RES_ACCEPTED = 0x05;
79
 uint8_t const DATA_RES_ACCEPTED = 0x05;
101
-//------------------------------------------------------------------------------
80
+
102
 /** Card IDentification (CID) register */
81
 /** Card IDentification (CID) register */
103
 typedef struct CID {
82
 typedef struct CID {
104
   // byte 0
83
   // byte 0
134
   /** CRC7 checksum */
113
   /** CRC7 checksum */
135
   unsigned char crc : 7;
114
   unsigned char crc : 7;
136
 } cid_t;
115
 } cid_t;
137
-//------------------------------------------------------------------------------
116
+
138
 /** CSD for version 1.00 cards */
117
 /** CSD for version 1.00 cards */
139
 typedef struct CSDV1 {
118
 typedef struct CSDV1 {
140
   // byte 0
119
   // byte 0
196
   unsigned char always1 : 1;
175
   unsigned char always1 : 1;
197
   unsigned char crc : 7;
176
   unsigned char crc : 7;
198
 } csd1_t;
177
 } csd1_t;
199
-//------------------------------------------------------------------------------
178
+
200
 /** CSD for version 2.00 cards */
179
 /** CSD for version 2.00 cards */
201
 typedef struct CSDV2 {
180
 typedef struct CSDV2 {
202
   // byte 0
181
   // byte 0
278
   /** checksum */
257
   /** checksum */
279
   unsigned char crc : 7;
258
   unsigned char crc : 7;
280
 } csd2_t;
259
 } csd2_t;
281
-//------------------------------------------------------------------------------
260
+
282
 /** union of old and new style CSD register */
261
 /** union of old and new style CSD register */
283
 union csd_t {
262
 union csd_t {
284
   csd1_t v1;
263
   csd1_t v1;
285
   csd2_t v2;
264
   csd2_t v2;
286
 };
265
 };
287
-#endif  // SdInfo_h
288
 
266
 
289
-#endif
267
+#endif // _SDINFO_H_

+ 75
- 111
Marlin/SdVolume.cpp Переглянути файл

26
  *
26
  *
27
  * This file is part of the Arduino Sd2Card Library
27
  * This file is part of the Arduino Sd2Card Library
28
  */
28
  */
29
-#include "Marlin.h"
29
+#include "MarlinConfig.h"
30
+
30
 #if ENABLED(SDSUPPORT)
31
 #if ENABLED(SDSUPPORT)
31
 
32
 
32
 #include "SdVolume.h"
33
 #include "SdVolume.h"
33
-//------------------------------------------------------------------------------
34
+
34
 #if !USE_MULTIPLE_CARDS
35
 #if !USE_MULTIPLE_CARDS
35
   // raw block cache
36
   // raw block cache
36
   uint32_t SdVolume::cacheBlockNumber_;  // current block number
37
   uint32_t SdVolume::cacheBlockNumber_;  // current block number
39
   bool     SdVolume::cacheDirty_;        // cacheFlush() will write block if true
40
   bool     SdVolume::cacheDirty_;        // cacheFlush() will write block if true
40
   uint32_t SdVolume::cacheMirrorBlock_;  // mirror  block for second FAT
41
   uint32_t SdVolume::cacheMirrorBlock_;  // mirror  block for second FAT
41
 #endif  // USE_MULTIPLE_CARDS
42
 #endif  // USE_MULTIPLE_CARDS
42
-//------------------------------------------------------------------------------
43
+
43
 // find a contiguous group of clusters
44
 // find a contiguous group of clusters
44
 bool SdVolume::allocContiguous(uint32_t count, uint32_t* curCluster) {
45
 bool SdVolume::allocContiguous(uint32_t count, uint32_t* curCluster) {
45
   // start of group
46
   // start of group
73
   // search the FAT for free clusters
74
   // search the FAT for free clusters
74
   for (uint32_t n = 0;; n++, endCluster++) {
75
   for (uint32_t n = 0;; n++, endCluster++) {
75
     // can't find space checked all clusters
76
     // can't find space checked all clusters
76
-    if (n >= clusterCount_) goto FAIL;
77
+    if (n >= clusterCount_) return false;
77
 
78
 
78
     // past end - start from beginning of FAT
79
     // past end - start from beginning of FAT
79
     if (endCluster > fatEnd) {
80
     if (endCluster > fatEnd) {
80
       bgnCluster = endCluster = 2;
81
       bgnCluster = endCluster = 2;
81
     }
82
     }
82
     uint32_t f;
83
     uint32_t f;
83
-    if (!fatGet(endCluster, &f)) goto FAIL;
84
+    if (!fatGet(endCluster, &f)) return false;
84
 
85
 
85
     if (f != 0) {
86
     if (f != 0) {
86
       // cluster in use try next cluster as bgnCluster
87
       // cluster in use try next cluster as bgnCluster
92
     }
93
     }
93
   }
94
   }
94
   // mark end of chain
95
   // mark end of chain
95
-  if (!fatPutEOC(endCluster)) goto FAIL;
96
+  if (!fatPutEOC(endCluster)) return false;
96
 
97
 
97
   // link clusters
98
   // link clusters
98
   while (endCluster > bgnCluster) {
99
   while (endCluster > bgnCluster) {
99
-    if (!fatPut(endCluster - 1, endCluster)) goto FAIL;
100
+    if (!fatPut(endCluster - 1, endCluster)) return false;
100
     endCluster--;
101
     endCluster--;
101
   }
102
   }
102
   if (*curCluster != 0) {
103
   if (*curCluster != 0) {
103
     // connect chains
104
     // connect chains
104
-    if (!fatPut(*curCluster, bgnCluster)) goto FAIL;
105
+    if (!fatPut(*curCluster, bgnCluster)) return false;
105
   }
106
   }
106
   // return first cluster number to caller
107
   // return first cluster number to caller
107
   *curCluster = bgnCluster;
108
   *curCluster = bgnCluster;
110
   if (setStart) allocSearchStart_ = bgnCluster + 1;
111
   if (setStart) allocSearchStart_ = bgnCluster + 1;
111
 
112
 
112
   return true;
113
   return true;
113
-  FAIL:
114
-  return false;
115
 }
114
 }
116
-//------------------------------------------------------------------------------
115
+
117
 bool SdVolume::cacheFlush() {
116
 bool SdVolume::cacheFlush() {
118
   if (cacheDirty_) {
117
   if (cacheDirty_) {
119
-    if (!sdCard_->writeBlock(cacheBlockNumber_, cacheBuffer_.data)) {
120
-      goto FAIL;
121
-    }
118
+    if (!sdCard_->writeBlock(cacheBlockNumber_, cacheBuffer_.data))
119
+      return false;
120
+
122
     // mirror FAT tables
121
     // mirror FAT tables
123
     if (cacheMirrorBlock_) {
122
     if (cacheMirrorBlock_) {
124
-      if (!sdCard_->writeBlock(cacheMirrorBlock_, cacheBuffer_.data)) {
125
-        goto FAIL;
126
-      }
123
+      if (!sdCard_->writeBlock(cacheMirrorBlock_, cacheBuffer_.data))
124
+        return false;
127
       cacheMirrorBlock_ = 0;
125
       cacheMirrorBlock_ = 0;
128
     }
126
     }
129
     cacheDirty_ = 0;
127
     cacheDirty_ = 0;
130
   }
128
   }
131
   return true;
129
   return true;
132
-  FAIL:
133
-  return false;
134
 }
130
 }
135
-//------------------------------------------------------------------------------
131
+
136
 bool SdVolume::cacheRawBlock(uint32_t blockNumber, bool dirty) {
132
 bool SdVolume::cacheRawBlock(uint32_t blockNumber, bool dirty) {
137
   if (cacheBlockNumber_ != blockNumber) {
133
   if (cacheBlockNumber_ != blockNumber) {
138
-    if (!cacheFlush()) goto FAIL;
139
-    if (!sdCard_->readBlock(blockNumber, cacheBuffer_.data)) goto FAIL;
134
+    if (!cacheFlush()) return false;
135
+    if (!sdCard_->readBlock(blockNumber, cacheBuffer_.data)) return false;
140
     cacheBlockNumber_ = blockNumber;
136
     cacheBlockNumber_ = blockNumber;
141
   }
137
   }
142
   if (dirty) cacheDirty_ = true;
138
   if (dirty) cacheDirty_ = true;
143
   return true;
139
   return true;
144
-  FAIL:
145
-  return false;
146
 }
140
 }
147
-//------------------------------------------------------------------------------
141
+
148
 // return the size in bytes of a cluster chain
142
 // return the size in bytes of a cluster chain
149
 bool SdVolume::chainSize(uint32_t cluster, uint32_t* size) {
143
 bool SdVolume::chainSize(uint32_t cluster, uint32_t* size) {
150
   uint32_t s = 0;
144
   uint32_t s = 0;
151
   do {
145
   do {
152
-    if (!fatGet(cluster, &cluster)) goto FAIL;
146
+    if (!fatGet(cluster, &cluster)) return false;
153
     s += 512UL << clusterSizeShift_;
147
     s += 512UL << clusterSizeShift_;
154
   } while (!isEOC(cluster));
148
   } while (!isEOC(cluster));
155
   *size = s;
149
   *size = s;
156
   return true;
150
   return true;
157
-  FAIL:
158
-  return false;
159
 }
151
 }
160
-//------------------------------------------------------------------------------
152
+
161
 // Fetch a FAT entry
153
 // Fetch a FAT entry
162
 bool SdVolume::fatGet(uint32_t cluster, uint32_t* value) {
154
 bool SdVolume::fatGet(uint32_t cluster, uint32_t* value) {
163
   uint32_t lba;
155
   uint32_t lba;
164
-  if (cluster > (clusterCount_ + 1)) goto FAIL;
156
+  if (cluster > (clusterCount_ + 1)) return false;
165
   if (FAT12_SUPPORT && fatType_ == 12) {
157
   if (FAT12_SUPPORT && fatType_ == 12) {
166
     uint16_t index = cluster;
158
     uint16_t index = cluster;
167
     index += index >> 1;
159
     index += index >> 1;
168
     lba = fatStartBlock_ + (index >> 9);
160
     lba = fatStartBlock_ + (index >> 9);
169
-    if (!cacheRawBlock(lba, CACHE_FOR_READ)) goto FAIL;
161
+    if (!cacheRawBlock(lba, CACHE_FOR_READ)) return false;
170
     index &= 0x1FF;
162
     index &= 0x1FF;
171
     uint16_t tmp = cacheBuffer_.data[index];
163
     uint16_t tmp = cacheBuffer_.data[index];
172
     index++;
164
     index++;
173
     if (index == 512) {
165
     if (index == 512) {
174
-      if (!cacheRawBlock(lba + 1, CACHE_FOR_READ)) goto FAIL;
166
+      if (!cacheRawBlock(lba + 1, CACHE_FOR_READ)) return false;
175
       index = 0;
167
       index = 0;
176
     }
168
     }
177
     tmp |= cacheBuffer_.data[index] << 8;
169
     tmp |= cacheBuffer_.data[index] << 8;
178
     *value = cluster & 1 ? tmp >> 4 : tmp & 0xFFF;
170
     *value = cluster & 1 ? tmp >> 4 : tmp & 0xFFF;
179
     return true;
171
     return true;
180
   }
172
   }
181
-  if (fatType_ == 16) {
173
+
174
+  if (fatType_ == 16)
182
     lba = fatStartBlock_ + (cluster >> 8);
175
     lba = fatStartBlock_ + (cluster >> 8);
183
-  }
184
-  else if (fatType_ == 32) {
176
+  else if (fatType_ == 32)
185
     lba = fatStartBlock_ + (cluster >> 7);
177
     lba = fatStartBlock_ + (cluster >> 7);
186
-  }
187
-  else {
188
-    goto FAIL;
189
-  }
190
-  if (lba != cacheBlockNumber_) {
191
-    if (!cacheRawBlock(lba, CACHE_FOR_READ)) goto FAIL;
192
-  }
193
-  if (fatType_ == 16) {
194
-    *value = cacheBuffer_.fat16[cluster & 0xFF];
195
-  }
196
-  else {
197
-    *value = cacheBuffer_.fat32[cluster & 0x7F] & FAT32MASK;
198
-  }
178
+  else
179
+    return false;
180
+
181
+  if (lba != cacheBlockNumber_ && !cacheRawBlock(lba, CACHE_FOR_READ))
182
+    return false;
183
+
184
+  *value = (fatType_ == 16) ? cacheBuffer_.fat16[cluster & 0xFF] : (cacheBuffer_.fat32[cluster & 0x7F] & FAT32MASK);
199
   return true;
185
   return true;
200
-  FAIL:
201
-  return false;
202
 }
186
 }
203
-//------------------------------------------------------------------------------
187
+
204
 // Store a FAT entry
188
 // Store a FAT entry
205
 bool SdVolume::fatPut(uint32_t cluster, uint32_t value) {
189
 bool SdVolume::fatPut(uint32_t cluster, uint32_t value) {
206
   uint32_t lba;
190
   uint32_t lba;
207
   // error if reserved cluster
191
   // error if reserved cluster
208
-  if (cluster < 2) goto FAIL;
192
+  if (cluster < 2) return false;
209
 
193
 
210
   // error if not in FAT
194
   // error if not in FAT
211
-  if (cluster > (clusterCount_ + 1)) goto FAIL;
195
+  if (cluster > (clusterCount_ + 1)) return false;
212
 
196
 
213
   if (FAT12_SUPPORT && fatType_ == 12) {
197
   if (FAT12_SUPPORT && fatType_ == 12) {
214
     uint16_t index = cluster;
198
     uint16_t index = cluster;
215
     index += index >> 1;
199
     index += index >> 1;
216
     lba = fatStartBlock_ + (index >> 9);
200
     lba = fatStartBlock_ + (index >> 9);
217
-    if (!cacheRawBlock(lba, CACHE_FOR_WRITE)) goto FAIL;
201
+    if (!cacheRawBlock(lba, CACHE_FOR_WRITE)) return false;
218
     // mirror second FAT
202
     // mirror second FAT
219
     if (fatCount_ > 1) cacheMirrorBlock_ = lba + blocksPerFat_;
203
     if (fatCount_ > 1) cacheMirrorBlock_ = lba + blocksPerFat_;
220
     index &= 0x1FF;
204
     index &= 0x1FF;
227
     if (index == 512) {
211
     if (index == 512) {
228
       lba++;
212
       lba++;
229
       index = 0;
213
       index = 0;
230
-      if (!cacheRawBlock(lba, CACHE_FOR_WRITE)) goto FAIL;
214
+      if (!cacheRawBlock(lba, CACHE_FOR_WRITE)) return false;
231
       // mirror second FAT
215
       // mirror second FAT
232
       if (fatCount_ > 1) cacheMirrorBlock_ = lba + blocksPerFat_;
216
       if (fatCount_ > 1) cacheMirrorBlock_ = lba + blocksPerFat_;
233
     }
217
     }
238
     cacheBuffer_.data[index] = tmp;
222
     cacheBuffer_.data[index] = tmp;
239
     return true;
223
     return true;
240
   }
224
   }
241
-  if (fatType_ == 16) {
225
+
226
+  if (fatType_ == 16)
242
     lba = fatStartBlock_ + (cluster >> 8);
227
     lba = fatStartBlock_ + (cluster >> 8);
243
-  }
244
-  else if (fatType_ == 32) {
228
+  else if (fatType_ == 32)
245
     lba = fatStartBlock_ + (cluster >> 7);
229
     lba = fatStartBlock_ + (cluster >> 7);
246
-  }
247
-  else {
248
-    goto FAIL;
249
-  }
250
-  if (!cacheRawBlock(lba, CACHE_FOR_WRITE)) goto FAIL;
230
+  else
231
+    return false;
232
+
233
+  if (!cacheRawBlock(lba, CACHE_FOR_WRITE)) return false;
234
+
251
   // store entry
235
   // store entry
252
-  if (fatType_ == 16) {
236
+  if (fatType_ == 16)
253
     cacheBuffer_.fat16[cluster & 0xFF] = value;
237
     cacheBuffer_.fat16[cluster & 0xFF] = value;
254
-  }
255
-  else {
238
+  else
256
     cacheBuffer_.fat32[cluster & 0x7F] = value;
239
     cacheBuffer_.fat32[cluster & 0x7F] = value;
257
-  }
240
+
258
   // mirror second FAT
241
   // mirror second FAT
259
   if (fatCount_ > 1) cacheMirrorBlock_ = lba + blocksPerFat_;
242
   if (fatCount_ > 1) cacheMirrorBlock_ = lba + blocksPerFat_;
260
   return true;
243
   return true;
261
-  FAIL:
262
-  return false;
263
 }
244
 }
264
-//------------------------------------------------------------------------------
245
+
265
 // free a cluster chain
246
 // free a cluster chain
266
 bool SdVolume::freeChain(uint32_t cluster) {
247
 bool SdVolume::freeChain(uint32_t cluster) {
267
-  uint32_t next;
268
-
269
   // clear free cluster location
248
   // clear free cluster location
270
   allocSearchStart_ = 2;
249
   allocSearchStart_ = 2;
271
 
250
 
272
   do {
251
   do {
273
-    if (!fatGet(cluster, &next)) goto FAIL;
252
+    uint32_t next;
253
+    if (!fatGet(cluster, &next)) return false;
274
 
254
 
275
     // free cluster
255
     // free cluster
276
-    if (!fatPut(cluster, 0)) goto FAIL;
256
+    if (!fatPut(cluster, 0)) return false;
277
 
257
 
278
     cluster = next;
258
     cluster = next;
279
   } while (!isEOC(cluster));
259
   } while (!isEOC(cluster));
280
 
260
 
281
   return true;
261
   return true;
282
-  FAIL:
283
-  return false;
284
 }
262
 }
285
-//------------------------------------------------------------------------------
263
+
286
 /** Volume free space in clusters.
264
 /** Volume free space in clusters.
287
  *
265
  *
288
  * \return Count of free clusters for success or -1 if an error occurs.
266
  * \return Count of free clusters for success or -1 if an error occurs.
292
   uint16_t n;
270
   uint16_t n;
293
   uint32_t todo = clusterCount_ + 2;
271
   uint32_t todo = clusterCount_ + 2;
294
 
272
 
295
-  if (fatType_ == 16) {
273
+  if (fatType_ == 16)
296
     n = 256;
274
     n = 256;
297
-  }
298
-  else if (fatType_ == 32) {
275
+  else if (fatType_ == 32)
299
     n = 128;
276
     n = 128;
300
-  }
301
-  else {
302
-    // put FAT12 here
277
+  else // put FAT12 here
303
     return -1;
278
     return -1;
304
-  }
305
 
279
 
306
   for (uint32_t lba = fatStartBlock_; todo; todo -= n, lba++) {
280
   for (uint32_t lba = fatStartBlock_; todo; todo -= n, lba++) {
307
     if (!cacheRawBlock(lba, CACHE_FOR_READ)) return -1;
281
     if (!cacheRawBlock(lba, CACHE_FOR_READ)) return -1;
308
     NOMORE(n, todo);
282
     NOMORE(n, todo);
309
     if (fatType_ == 16) {
283
     if (fatType_ == 16) {
310
-      for (uint16_t i = 0; i < n; i++) {
284
+      for (uint16_t i = 0; i < n; i++)
311
         if (cacheBuffer_.fat16[i] == 0) free++;
285
         if (cacheBuffer_.fat16[i] == 0) free++;
312
-      }
313
     }
286
     }
314
     else {
287
     else {
315
-      for (uint16_t i = 0; i < n; i++) {
288
+      for (uint16_t i = 0; i < n; i++)
316
         if (cacheBuffer_.fat32[i] == 0) free++;
289
         if (cacheBuffer_.fat32[i] == 0) free++;
317
-      }
318
     }
290
     }
319
   }
291
   }
320
   return free;
292
   return free;
321
 }
293
 }
322
-//------------------------------------------------------------------------------
294
+
323
 /** Initialize a FAT volume.
295
 /** Initialize a FAT volume.
324
  *
296
  *
325
  * \param[in] dev The SD card where the volume is located.
297
  * \param[in] dev The SD card where the volume is located.
329
  * a MBR, Master Boot Record, or zero if the device is formatted as
301
  * a MBR, Master Boot Record, or zero if the device is formatted as
330
  * a super floppy with the FAT boot sector in block zero.
302
  * a super floppy with the FAT boot sector in block zero.
331
  *
303
  *
332
- * \return The value one, true, is returned for success and
333
- * the value zero, false, is returned for failure.  Reasons for
334
- * failure include not finding a valid partition, not finding a valid
304
+ * \return true for success, false for failure.
305
+ * Reasons for failure include not finding a valid partition, not finding a valid
335
  * FAT file system in the specified partition or an I/O error.
306
  * FAT file system in the specified partition or an I/O error.
336
  */
307
  */
337
 bool SdVolume::init(Sd2Card* dev, uint8_t part) {
308
 bool SdVolume::init(Sd2Card* dev, uint8_t part) {
338
-  uint32_t totalBlocks;
339
-  uint32_t volumeStartBlock = 0;
309
+  uint32_t totalBlocks, volumeStartBlock = 0;
340
   fat32_boot_t* fbs;
310
   fat32_boot_t* fbs;
341
 
311
 
342
   sdCard_ = dev;
312
   sdCard_ = dev;
349
   // if part == 0 assume super floppy with FAT boot sector in block zero
319
   // if part == 0 assume super floppy with FAT boot sector in block zero
350
   // if part > 0 assume mbr volume with partition table
320
   // if part > 0 assume mbr volume with partition table
351
   if (part) {
321
   if (part) {
352
-    if (part > 4)goto FAIL;
353
-    if (!cacheRawBlock(volumeStartBlock, CACHE_FOR_READ)) goto FAIL;
322
+    if (part > 4) return false;
323
+    if (!cacheRawBlock(volumeStartBlock, CACHE_FOR_READ)) return false;
354
     part_t* p = &cacheBuffer_.mbr.part[part - 1];
324
     part_t* p = &cacheBuffer_.mbr.part[part - 1];
355
-    if ((p->boot & 0x7F) != 0  ||
356
-        p->totalSectors < 100 ||
357
-        p->firstSector == 0) {
358
-      // not a valid partition
359
-      goto FAIL;
360
-    }
325
+    if ((p->boot & 0x7F) != 0  || p->totalSectors < 100 || p->firstSector == 0)
326
+      return false; // not a valid partition
361
     volumeStartBlock = p->firstSector;
327
     volumeStartBlock = p->firstSector;
362
   }
328
   }
363
-  if (!cacheRawBlock(volumeStartBlock, CACHE_FOR_READ)) goto FAIL;
329
+  if (!cacheRawBlock(volumeStartBlock, CACHE_FOR_READ)) return false;
364
   fbs = &cacheBuffer_.fbs32;
330
   fbs = &cacheBuffer_.fbs32;
365
   if (fbs->bytesPerSector != 512 ||
331
   if (fbs->bytesPerSector != 512 ||
366
       fbs->fatCount == 0 ||
332
       fbs->fatCount == 0 ||
367
       fbs->reservedSectorCount == 0 ||
333
       fbs->reservedSectorCount == 0 ||
368
       fbs->sectorsPerCluster == 0) {
334
       fbs->sectorsPerCluster == 0) {
369
     // not valid FAT volume
335
     // not valid FAT volume
370
-    goto FAIL;
336
+    return false;
371
   }
337
   }
372
   fatCount_ = fbs->fatCount;
338
   fatCount_ = fbs->fatCount;
373
   blocksPerCluster_ = fbs->sectorsPerCluster;
339
   blocksPerCluster_ = fbs->sectorsPerCluster;
375
   clusterSizeShift_ = 0;
341
   clusterSizeShift_ = 0;
376
   while (blocksPerCluster_ != _BV(clusterSizeShift_)) {
342
   while (blocksPerCluster_ != _BV(clusterSizeShift_)) {
377
     // error if not power of 2
343
     // error if not power of 2
378
-    if (clusterSizeShift_++ > 7) goto FAIL;
344
+    if (clusterSizeShift_++ > 7) return false;
379
   }
345
   }
380
   blocksPerFat_ = fbs->sectorsPerFat16 ?
346
   blocksPerFat_ = fbs->sectorsPerFat16 ?
381
                   fbs->sectorsPerFat16 : fbs->sectorsPerFat32;
347
                   fbs->sectorsPerFat16 : fbs->sectorsPerFat32;
404
   // FAT type is determined by cluster count
370
   // FAT type is determined by cluster count
405
   if (clusterCount_ < 4085) {
371
   if (clusterCount_ < 4085) {
406
     fatType_ = 12;
372
     fatType_ = 12;
407
-    if (!FAT12_SUPPORT) goto FAIL;
373
+    if (!FAT12_SUPPORT) return false;
408
   }
374
   }
409
-  else if (clusterCount_ < 65525) {
375
+  else if (clusterCount_ < 65525)
410
     fatType_ = 16;
376
     fatType_ = 16;
411
-  }
412
   else {
377
   else {
413
     rootDirStart_ = fbs->fat32RootCluster;
378
     rootDirStart_ = fbs->fat32RootCluster;
414
     fatType_ = 32;
379
     fatType_ = 32;
415
   }
380
   }
416
   return true;
381
   return true;
417
-  FAIL:
418
-  return false;
419
 }
382
 }
420
-#endif
383
+
384
+#endif // SDSUPPORT

+ 105
- 121
Marlin/SdVolume.h Переглянути файл

21
  */
21
  */
22
 
22
 
23
 /**
23
 /**
24
+ * \file
25
+ * \brief SdVolume class
26
+ */
27
+
28
+/**
24
  * Arduino SdFat Library
29
  * Arduino SdFat Library
25
  * Copyright (C) 2009 by William Greiman
30
  * Copyright (C) 2009 by William Greiman
26
  *
31
  *
27
  * This file is part of the Arduino Sd2Card Library
32
  * This file is part of the Arduino Sd2Card Library
28
  */
33
  */
29
-#include "Marlin.h"
30
-#if ENABLED(SDSUPPORT)
31
-#ifndef SdVolume_h
32
-#define SdVolume_h
33
-/**
34
- * \file
35
- * \brief SdVolume class
36
- */
34
+#ifndef _SDVOLUME_H_
35
+#define _SDVOLUME_H_
36
+
37
 #include "SdFatConfig.h"
37
 #include "SdFatConfig.h"
38
 #include "Sd2Card.h"
38
 #include "Sd2Card.h"
39
 #include "SdFatStructs.h"
39
 #include "SdFatStructs.h"
44
  * \brief Cache for an SD data block
44
  * \brief Cache for an SD data block
45
  */
45
  */
46
 union cache_t {
46
 union cache_t {
47
-           /** Used to access cached file data blocks. */
48
-  uint8_t  data[512];
49
-           /** Used to access cached FAT16 entries. */
50
-  uint16_t fat16[256];
51
-           /** Used to access cached FAT32 entries. */
52
-  uint32_t fat32[128];
53
-           /** Used to access cached directory entries. */
54
-  dir_t    dir[16];
55
-           /** Used to access a cached Master Boot Record. */
56
-  mbr_t    mbr;
57
-           /** Used to access to a cached FAT boot sector. */
58
-  fat_boot_t fbs;
59
-           /** Used to access to a cached FAT32 boot sector. */
60
-  fat32_boot_t fbs32;
61
-           /** Used to access to a cached FAT32 FSINFO sector. */
62
-  fat32_fsinfo_t fsinfo;
47
+  uint8_t         data[512];  // Used to access cached file data blocks.
48
+  uint16_t        fat16[256]; // Used to access cached FAT16 entries.
49
+  uint32_t        fat32[128]; // Used to access cached FAT32 entries.
50
+  dir_t           dir[16];    // Used to access cached directory entries.
51
+  mbr_t           mbr;        // Used to access a cached Master Boot Record.
52
+  fat_boot_t      fbs;        // Used to access to a cached FAT boot sector.
53
+  fat32_boot_t    fbs32;      // Used to access to a cached FAT32 boot sector.
54
+  fat32_fsinfo_t  fsinfo;     // Used to access to a cached FAT32 FSINFO sector.
63
 };
55
 };
64
-//------------------------------------------------------------------------------
56
+
65
 /**
57
 /**
66
  * \class SdVolume
58
  * \class SdVolume
67
  * \brief Access FAT16 and FAT32 volumes on SD and SDHC cards.
59
  * \brief Access FAT16 and FAT32 volumes on SD and SDHC cards.
68
  */
60
  */
69
 class SdVolume {
61
 class SdVolume {
70
  public:
62
  public:
71
-  /** Create an instance of SdVolume */
63
+  // Create an instance of SdVolume
72
   SdVolume() : fatType_(0) {}
64
   SdVolume() : fatType_(0) {}
73
-  /** Clear the cache and returns a pointer to the cache.  Used by the WaveRP
65
+  /**
66
+   * Clear the cache and returns a pointer to the cache.  Used by the WaveRP
74
    * recorder to do raw write to the SD card.  Not for normal apps.
67
    * recorder to do raw write to the SD card.  Not for normal apps.
75
    * \return A pointer to the cache buffer or zero if an error occurs.
68
    * \return A pointer to the cache buffer or zero if an error occurs.
76
    */
69
    */
79
     cacheBlockNumber_ = 0xFFFFFFFF;
72
     cacheBlockNumber_ = 0xFFFFFFFF;
80
     return &cacheBuffer_;
73
     return &cacheBuffer_;
81
   }
74
   }
82
-  /** Initialize a FAT volume.  Try partition one first then try super
75
+
76
+  /**
77
+   * Initialize a FAT volume.  Try partition one first then try super
83
    * floppy format.
78
    * floppy format.
84
    *
79
    *
85
    * \param[in] dev The Sd2Card where the volume is located.
80
    * \param[in] dev The Sd2Card where the volume is located.
86
    *
81
    *
87
-   * \return The value one, true, is returned for success and
88
-   * the value zero, false, is returned for failure.  Reasons for
89
-   * failure include not finding a valid partition, not finding a valid
90
-   * FAT file system or an I/O error.
82
+   * \return true for success, false for failure.
83
+   * Reasons for failure include not finding a valid partition, not finding
84
+   * a valid FAT file system or an I/O error.
91
    */
85
    */
92
-  bool init(Sd2Card* dev) { return init(dev, 1) ? true : init(dev, 0);}
86
+  bool init(Sd2Card* dev) { return init(dev, 1) ? true : init(dev, 0); }
93
   bool init(Sd2Card* dev, uint8_t part);
87
   bool init(Sd2Card* dev, uint8_t part);
94
 
88
 
95
   // inline functions that return volume info
89
   // inline functions that return volume info
96
-  /** \return The volume's cluster size in blocks. */
97
-  uint8_t blocksPerCluster() const {return blocksPerCluster_;}
98
-  /** \return The number of blocks in one FAT. */
99
-  uint32_t blocksPerFat()  const {return blocksPerFat_;}
100
-  /** \return The total number of clusters in the volume. */
101
-  uint32_t clusterCount() const {return clusterCount_;}
102
-  /** \return The shift count required to multiply by blocksPerCluster. */
103
-  uint8_t clusterSizeShift() const {return clusterSizeShift_;}
104
-  /** \return The logical block number for the start of file data. */
105
-  uint32_t dataStartBlock() const {return dataStartBlock_;}
106
-  /** \return The number of FAT structures on the volume. */
107
-  uint8_t fatCount() const {return fatCount_;}
108
-  /** \return The logical block number for the start of the first FAT. */
109
-  uint32_t fatStartBlock() const {return fatStartBlock_;}
110
-  /** \return The FAT type of the volume. Values are 12, 16 or 32. */
111
-  uint8_t fatType() const {return fatType_;}
90
+  uint8_t blocksPerCluster() const { return blocksPerCluster_; } //> \return The volume's cluster size in blocks.
91
+  uint32_t blocksPerFat() const { return blocksPerFat_; }        //> \return The number of blocks in one FAT.
92
+  uint32_t clusterCount() const { return clusterCount_; }        //> \return The total number of clusters in the volume.
93
+  uint8_t clusterSizeShift() const { return clusterSizeShift_; } //> \return The shift count required to multiply by blocksPerCluster.
94
+  uint32_t dataStartBlock() const { return dataStartBlock_; }    //> \return The logical block number for the start of file data.
95
+  uint8_t fatCount() const { return fatCount_; }                 //> \return The number of FAT structures on the volume.
96
+  uint32_t fatStartBlock() const { return fatStartBlock_; }      //> \return The logical block number for the start of the first FAT.
97
+  uint8_t fatType() const { return fatType_; }                   //> \return The FAT type of the volume. Values are 12, 16 or 32.
112
   int32_t freeClusterCount();
98
   int32_t freeClusterCount();
113
-  /** \return The number of entries in the root directory for FAT16 volumes. */
114
-  uint32_t rootDirEntryCount() const {return rootDirEntryCount_;}
115
-  /** \return The logical block number for the start of the root directory
116
-       on FAT16 volumes or the first cluster number on FAT32 volumes. */
117
-  uint32_t rootDirStart() const {return rootDirStart_;}
118
-  /** Sd2Card object for this volume
99
+  uint32_t rootDirEntryCount() const { return rootDirEntryCount_; } /** \return The number of entries in the root directory for FAT16 volumes. */
100
+
101
+  /**
102
+   * \return The logical block number for the start of the root directory
103
+   *   on FAT16 volumes or the first cluster number on FAT32 volumes.
104
+   */
105
+  uint32_t rootDirStart() const { return rootDirStart_; }
106
+
107
+  /**
108
+   * Sd2Card object for this volume
119
    * \return pointer to Sd2Card object.
109
    * \return pointer to Sd2Card object.
120
    */
110
    */
121
-  Sd2Card* sdCard() {return sdCard_;}
122
-  /** Debug access to FAT table
111
+  Sd2Card* sdCard() { return sdCard_; }
112
+
113
+  /**
114
+   * Debug access to FAT table
123
    *
115
    *
124
    * \param[in] n cluster number.
116
    * \param[in] n cluster number.
125
    * \param[out] v value of entry
117
    * \param[out] v value of entry
126
    * \return true for success or false for failure
118
    * \return true for success or false for failure
127
    */
119
    */
128
-  bool dbgFat(uint32_t n, uint32_t* v) {return fatGet(n, v);}
129
-  //------------------------------------------------------------------------------
120
+  bool dbgFat(uint32_t n, uint32_t* v) { return fatGet(n, v); }
121
+
130
  private:
122
  private:
131
   // Allow SdBaseFile access to SdVolume private data.
123
   // Allow SdBaseFile access to SdVolume private data.
132
   friend class SdBaseFile;
124
   friend class SdBaseFile;
136
   // value for dirty argument in cacheRawBlock to indicate write to cache
128
   // value for dirty argument in cacheRawBlock to indicate write to cache
137
   static bool const CACHE_FOR_WRITE = true;
129
   static bool const CACHE_FOR_WRITE = true;
138
 
130
 
139
-#if USE_MULTIPLE_CARDS
140
-  cache_t cacheBuffer_;        // 512 byte cache for device blocks
141
-  uint32_t cacheBlockNumber_;  // Logical number of block in the cache
142
-  Sd2Card* sdCard_;            // Sd2Card object for cache
143
-  bool cacheDirty_;            // cacheFlush() will write block if true
144
-  uint32_t cacheMirrorBlock_;  // block number for mirror FAT
145
-#else  // USE_MULTIPLE_CARDS
146
-  static cache_t cacheBuffer_;        // 512 byte cache for device blocks
147
-  static uint32_t cacheBlockNumber_;  // Logical number of block in the cache
148
-  static Sd2Card* sdCard_;            // Sd2Card object for cache
149
-  static bool cacheDirty_;            // cacheFlush() will write block if true
150
-  static uint32_t cacheMirrorBlock_;  // block number for mirror FAT
151
-#endif  // USE_MULTIPLE_CARDS
131
+  #if USE_MULTIPLE_CARDS
132
+    cache_t cacheBuffer_;        // 512 byte cache for device blocks
133
+    uint32_t cacheBlockNumber_;  // Logical number of block in the cache
134
+    Sd2Card* sdCard_;            // Sd2Card object for cache
135
+    bool cacheDirty_;            // cacheFlush() will write block if true
136
+    uint32_t cacheMirrorBlock_;  // block number for mirror FAT
137
+  #else
138
+    static cache_t cacheBuffer_;        // 512 byte cache for device blocks
139
+    static uint32_t cacheBlockNumber_;  // Logical number of block in the cache
140
+    static Sd2Card* sdCard_;            // Sd2Card object for cache
141
+    static bool cacheDirty_;            // cacheFlush() will write block if true
142
+    static uint32_t cacheMirrorBlock_;  // block number for mirror FAT
143
+  #endif
144
+
152
   uint32_t allocSearchStart_;   // start cluster for alloc search
145
   uint32_t allocSearchStart_;   // start cluster for alloc search
153
   uint8_t blocksPerCluster_;    // cluster size in blocks
146
   uint8_t blocksPerCluster_;    // cluster size in blocks
154
   uint32_t blocksPerFat_;       // FAT size in blocks
147
   uint32_t blocksPerFat_;       // FAT size in blocks
160
   uint8_t fatType_;             // volume type (12, 16, OR 32)
153
   uint8_t fatType_;             // volume type (12, 16, OR 32)
161
   uint16_t rootDirEntryCount_;  // number of entries in FAT16 root dir
154
   uint16_t rootDirEntryCount_;  // number of entries in FAT16 root dir
162
   uint32_t rootDirStart_;       // root start block for FAT16, cluster for FAT32
155
   uint32_t rootDirStart_;       // root start block for FAT16, cluster for FAT32
163
-  //----------------------------------------------------------------------------
156
+
164
   bool allocContiguous(uint32_t count, uint32_t* curCluster);
157
   bool allocContiguous(uint32_t count, uint32_t* curCluster);
165
-  uint8_t blockOfCluster(uint32_t position) const {
166
-    return (position >> 9) & (blocksPerCluster_ - 1);
167
-  }
168
-  uint32_t clusterStartBlock(uint32_t cluster) const {
169
-    return dataStartBlock_ + ((cluster - 2) << clusterSizeShift_);
170
-  }
171
-  uint32_t blockNumber(uint32_t cluster, uint32_t position) const {
172
-    return clusterStartBlock(cluster) + blockOfCluster(position);
173
-  }
174
-  cache_t* cache() {return &cacheBuffer_;}
175
-  uint32_t cacheBlockNumber() {return cacheBlockNumber_;}
176
-#if USE_MULTIPLE_CARDS
177
-  bool cacheFlush();
178
-  bool cacheRawBlock(uint32_t blockNumber, bool dirty);
179
-#else  // USE_MULTIPLE_CARDS
180
-  static bool cacheFlush();
181
-  static bool cacheRawBlock(uint32_t blockNumber, bool dirty);
182
-#endif  // USE_MULTIPLE_CARDS
158
+  uint8_t blockOfCluster(uint32_t position) const { return (position >> 9) & (blocksPerCluster_ - 1); }
159
+  uint32_t clusterStartBlock(uint32_t cluster) const { return dataStartBlock_ + ((cluster - 2) << clusterSizeShift_); }
160
+  uint32_t blockNumber(uint32_t cluster, uint32_t position) const { return clusterStartBlock(cluster) + blockOfCluster(position); }
161
+
162
+  cache_t* cache() { return &cacheBuffer_; }
163
+  uint32_t cacheBlockNumber() const { return cacheBlockNumber_; }
164
+
165
+  #if USE_MULTIPLE_CARDS
166
+    bool cacheFlush();
167
+    bool cacheRawBlock(uint32_t blockNumber, bool dirty);
168
+  #else
169
+    static bool cacheFlush();
170
+    static bool cacheRawBlock(uint32_t blockNumber, bool dirty);
171
+  #endif
172
+
183
   // used by SdBaseFile write to assign cache to SD location
173
   // used by SdBaseFile write to assign cache to SD location
184
   void cacheSetBlockNumber(uint32_t blockNumber, bool dirty) {
174
   void cacheSetBlockNumber(uint32_t blockNumber, bool dirty) {
185
     cacheDirty_ = dirty;
175
     cacheDirty_ = dirty;
186
     cacheBlockNumber_  = blockNumber;
176
     cacheBlockNumber_  = blockNumber;
187
   }
177
   }
188
-  void cacheSetDirty() {cacheDirty_ |= CACHE_FOR_WRITE;}
178
+  void cacheSetDirty() { cacheDirty_ |= CACHE_FOR_WRITE; }
189
   bool chainSize(uint32_t beginCluster, uint32_t* size);
179
   bool chainSize(uint32_t beginCluster, uint32_t* size);
190
   bool fatGet(uint32_t cluster, uint32_t* value);
180
   bool fatGet(uint32_t cluster, uint32_t* value);
191
   bool fatPut(uint32_t cluster, uint32_t value);
181
   bool fatPut(uint32_t cluster, uint32_t value);
192
-  bool fatPutEOC(uint32_t cluster) {
193
-    return fatPut(cluster, 0x0FFFFFFF);
194
-  }
182
+  bool fatPutEOC(uint32_t cluster) { return fatPut(cluster, 0x0FFFFFFF); }
195
   bool freeChain(uint32_t cluster);
183
   bool freeChain(uint32_t cluster);
196
   bool isEOC(uint32_t cluster) const {
184
   bool isEOC(uint32_t cluster) const {
197
     if (FAT12_SUPPORT && fatType_ == 12) return  cluster >= FAT12EOC_MIN;
185
     if (FAT12_SUPPORT && fatType_ == 12) return  cluster >= FAT12EOC_MIN;
198
     if (fatType_ == 16) return cluster >= FAT16EOC_MIN;
186
     if (fatType_ == 16) return cluster >= FAT16EOC_MIN;
199
     return  cluster >= FAT32EOC_MIN;
187
     return  cluster >= FAT32EOC_MIN;
200
   }
188
   }
201
-  bool readBlock(uint32_t block, uint8_t* dst) {
202
-    return sdCard_->readBlock(block, dst);
203
-  }
204
-  bool writeBlock(uint32_t block, const uint8_t* dst) {
205
-    return sdCard_->writeBlock(block, dst);
206
-  }
207
-  //------------------------------------------------------------------------------
208
-  // Deprecated functions  - suppress cpplint warnings with NOLINT comment
209
-#if ALLOW_DEPRECATED_FUNCTIONS && !defined(DOXYGEN)
210
- public:
211
-  /** \deprecated Use: bool SdVolume::init(Sd2Card* dev);
212
-   * \param[in] dev The SD card where the volume is located.
213
-   * \return true for success or false for failure.
214
-   */
215
-  bool init(Sd2Card& dev) {return init(&dev);}  // NOLINT
216
-  /** \deprecated Use: bool SdVolume::init(Sd2Card* dev, uint8_t vol);
217
-   * \param[in] dev The SD card where the volume is located.
218
-   * \param[in] part The partition to be used.
219
-   * \return true for success or false for failure.
220
-   */
221
-  bool init(Sd2Card& dev, uint8_t part) {  // NOLINT
222
-    return init(&dev, part);
223
-  }
224
-#endif  // ALLOW_DEPRECATED_FUNCTIONS
189
+  bool readBlock(uint32_t block, uint8_t* dst) { return sdCard_->readBlock(block, dst); }
190
+  bool writeBlock(uint32_t block, const uint8_t* dst) { return sdCard_->writeBlock(block, dst); }
191
+
192
+  // Deprecated functions
193
+  #if ALLOW_DEPRECATED_FUNCTIONS
194
+    public:
195
+      /**
196
+       * \deprecated Use: bool SdVolume::init(Sd2Card* dev);
197
+       * \param[in] dev The SD card where the volume is located.
198
+       * \return true for success or false for failure.
199
+       */
200
+      bool init(Sd2Card& dev) { return init(&dev); }
201
+      /**
202
+       * \deprecated Use: bool SdVolume::init(Sd2Card* dev, uint8_t vol);
203
+       * \param[in] dev The SD card where the volume is located.
204
+       * \param[in] part The partition to be used.
205
+       * \return true for success or false for failure.
206
+       */
207
+      bool init(Sd2Card& dev, uint8_t part) { return init(&dev, part); }
208
+  #endif  // ALLOW_DEPRECATED_FUNCTIONS
225
 };
209
 };
226
-#endif  // SdVolume
227
-#endif
210
+
211
+#endif // _SDVOLUME_H_

+ 3
- 3
Marlin/Version.h Переглянути файл

48
    * here we define this default string as the date where the latest release
48
    * here we define this default string as the date where the latest release
49
    * version was tagged.
49
    * version was tagged.
50
    */
50
    */
51
-  #define STRING_DISTRIBUTION_DATE "2017-10-10 12:00"
51
+  #define STRING_DISTRIBUTION_DATE "2017-10-24 12:00"
52
 
52
 
53
   /**
53
   /**
54
    * Required minimum Configuration.h and Configuration_adv.h file versions.
54
    * Required minimum Configuration.h and Configuration_adv.h file versions.
57
    * but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option on
57
    * but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option on
58
    * the configuration files.
58
    * the configuration files.
59
    */
59
    */
60
-  #define REQUIRED_CONFIGURATION_H_VERSION 010100
61
-  #define REQUIRED_CONFIGURATION_ADV_H_VERSION 010100
60
+  #define REQUIRED_CONFIGURATION_H_VERSION 010107
61
+  #define REQUIRED_CONFIGURATION_ADV_H_VERSION 010107
62
 
62
 
63
   /**
63
   /**
64
    * The protocol for communication to the host. Protocol indicates communication
64
    * The protocol for communication to the host. Protocol indicates communication

+ 38
- 0
Marlin/bitmap_flags.h Переглянути файл

1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016, 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
+ *
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+
23
+#ifndef _BITMAP_FLAGS_H_
24
+#define _BITMAP_FLAGS_H_
25
+
26
+#include "macros.h"
27
+
28
+/**
29
+ * These support functions allow the use of large bit arrays of flags that take very
30
+ * little RAM. Currently they are limited to being 16x16 in size. Changing the declaration
31
+ * to unsigned long will allow us to go to 32x32 if higher resolution meshes are needed
32
+ * in the future.
33
+ */
34
+FORCE_INLINE void bitmap_clear(uint16_t bits[16], const uint8_t x, const uint8_t y) { CBI(bits[y], x); }
35
+FORCE_INLINE void bitmap_set(uint16_t bits[16], const uint8_t x, const uint8_t y) { SBI(bits[y], x); }
36
+FORCE_INLINE bool is_bitmap_set(uint16_t bits[16], const uint8_t x, const uint8_t y) { return TEST(bits[y], x); }
37
+
38
+#endif // _BITMAP_FLAGS_H_

+ 8
- 8
Marlin/blinkm.cpp Переглянути файл

21
  */
21
  */
22
 
22
 
23
 /**
23
 /**
24
- * blinkm.cpp - Library for controlling a BlinkM over i2c
25
- * Created by Tim Koster, August 21 2013.
24
+ * blinkm.cpp - Control a BlinkM over i2c
26
  */
25
  */
27
 
26
 
28
-#include "Marlin.h"
27
+#include "MarlinConfig.h"
29
 
28
 
30
 #if ENABLED(BLINKM)
29
 #if ENABLED(BLINKM)
31
 
30
 
32
 #include "blinkm.h"
31
 #include "blinkm.h"
32
+#include "leds.h"
33
+#include <Wire.h>
33
 
34
 
34
-void SendColors(byte red, byte grn, byte blu) {
35
+void blinkm_set_led_color(const LEDColor &color) {
35
   Wire.begin();
36
   Wire.begin();
36
   Wire.beginTransmission(0x09);
37
   Wire.beginTransmission(0x09);
37
   Wire.write('o');                    //to disable ongoing script, only needs to be used once
38
   Wire.write('o');                    //to disable ongoing script, only needs to be used once
38
   Wire.write('n');
39
   Wire.write('n');
39
-  Wire.write(red);
40
-  Wire.write(grn);
41
-  Wire.write(blu);
40
+  Wire.write(color.r);
41
+  Wire.write(color.g);
42
+  Wire.write(color.b);
42
   Wire.endTransmission();
43
   Wire.endTransmission();
43
 }
44
 }
44
 
45
 
45
 #endif // BLINKM
46
 #endif // BLINKM
46
-

+ 9
- 5
Marlin/blinkm.h Переглянути файл

21
  */
21
  */
22
 
22
 
23
 /**
23
 /**
24
- * blinkm.h - Library for controlling a BlinkM over i2c
25
- * Created by Tim Koster, August 21 2013.
24
+ * blinkm.h - Control a BlinkM over i2c
26
  */
25
  */
27
 
26
 
28
-#include "Arduino.h"
29
-#include "Wire.h"
27
+#ifndef _BLINKM_H_
28
+#define _BLINKM_H_
30
 
29
 
31
-void SendColors(byte red, byte grn, byte blu);
30
+struct LEDColor;
31
+typedef LEDColor LEDColor;
32
+
33
+void blinkm_set_led_color(const LEDColor &color);
34
+
35
+#endif // _BLINKM_H_

+ 121
- 75
Marlin/boards.h Переглянути файл

25
 
25
 
26
 #define BOARD_UNKNOWN -1
26
 #define BOARD_UNKNOWN -1
27
 
27
 
28
-#define BOARD_GEN7_CUSTOM       10   // Gen7 custom (Alfons3 Version) "https://github.com/Alfons3/Generation_7_Electronics"
29
-#define BOARD_GEN7_12           11   // Gen7 v1.1, v1.2
30
-#define BOARD_GEN7_13           12   // Gen7 v1.3
31
-#define BOARD_GEN7_14           13   // Gen7 v1.4
32
-#define BOARD_CNCONTROLS_11     111  // Cartesio CN Controls V11
33
-#define BOARD_CNCONTROLS_12     112  // Cartesio CN Controls V12
34
-#define BOARD_CHEAPTRONIC       2    // Cheaptronic v1.0
35
-#define BOARD_CHEAPTRONIC_V2    21   // Cheaptronic v2.0
36
-#define BOARD_SETHI             20   // Sethi 3D_1
37
-#define BOARD_MIGHTYBOARD_REVE  200  // Makerbot Mightyboard Revision E
38
-#define BOARD_RAMPS_OLD         3    // MEGA/RAMPS up to 1.2
39
-#define BOARD_RAMPS_13_EFB      33   // RAMPS 1.3 (Power outputs: Hotend, Fan, Bed)
40
-#define BOARD_RAMPS_13_EEB      34   // RAMPS 1.3 (Power outputs: Hotend0, Hotend1, Bed)
41
-#define BOARD_RAMPS_13_EFF      35   // RAMPS 1.3 (Power outputs: Hotend, Fan0, Fan1)
42
-#define BOARD_RAMPS_13_EEF      36   // RAMPS 1.3 (Power outputs: Hotend0, Hotend1, Fan)
43
-#define BOARD_RAMPS_13_SF       38   // RAMPS 1.3 (Power outputs: Spindle, Controller Fan)
44
-#define BOARD_FELIX2            37   // Felix 2.0+ Electronics Board (RAMPS like)
45
-#define BOARD_RIGIDBOARD        42   // Invent-A-Part RigidBoard
46
-#define BOARD_RIGIDBOARD_V2     52   // Invent-A-Part RigidBoard V2
47
-#define BOARD_RAMPS_14_EFB      43   // RAMPS 1.4 (Power outputs: Hotend, Fan, Bed)
48
-#define BOARD_RAMPS_14_EEB      44   // RAMPS 1.4 (Power outputs: Hotend0, Hotend1, Bed)
49
-#define BOARD_RAMPS_14_EFF      45   // RAMPS 1.4 (Power outputs: Hotend, Fan0, Fan1)
50
-#define BOARD_RAMPS_14_EEF      46   // RAMPS 1.4 (Power outputs: Hotend0, Hotend1, Fan)
51
-#define BOARD_RAMPS_14_SF       48   // RAMPS 1.4 (Power outputs: Spindle, Controller Fan)
52
-#define BOARD_GEN6              5    // Gen6
53
-#define BOARD_GEN6_DELUXE       51   // Gen6 deluxe
54
-#define BOARD_SANGUINOLOLU_11   6    // Sanguinololu < 1.2
55
-#define BOARD_SANGUINOLOLU_12   62   // Sanguinololu 1.2 and above
56
-#define BOARD_MELZI             63   // Melzi
57
-#define BOARD_MELZI_MAKR3D      66   // Melzi with ATmega1284 (MaKr3d version)
58
-#define BOARD_MELZI_CREALITY    89   // Melzi Creality3D board (for CR-10 etc)
59
-#define BOARD_STB_11            64   // STB V1.1
60
-#define BOARD_AZTEEG_X1         65   // Azteeg X1
61
-#define BOARD_AZTEEG_X3         67   // Azteeg X3
62
-#define BOARD_AZTEEG_X3_PRO     68   // Azteeg X3 Pro
63
-#define BOARD_ANET_10           69   // Anet 1.0 (Melzi clone)
64
-#define BOARD_ULTIMAKER         7    // Ultimaker
65
-#define BOARD_ULTIMAKER_OLD     71   // Ultimaker (Older electronics. Pre 1.5.4. This is rare)
66
-#define BOARD_ULTIMAIN_2        72   // Ultimainboard 2.x (Uses TEMP_SENSOR 20)
67
-#define BOARD_GT2560_REV_A      74   // Geeetech GT2560 Rev. A
68
-#define BOARD_GT2560_REV_A_PLUS 75   // Geeetech GT2560 Rev. A+ (with auto level probe)
69
-#define BOARD_3DRAG             77   // 3Drag Controller
70
-#define BOARD_K8200             78   // Velleman K8200 Controller (derived from 3Drag Controller)
71
-#define BOARD_K8400             79   // Velleman K8400 Controller (derived from 3Drag Controller)
72
-#define BOARD_TEENSYLU          8    // Teensylu
73
-#define BOARD_RUMBA             80   // Rumba
74
-#define BOARD_PRINTRBOARD       81   // Printrboard (AT90USB1286)
75
-#define BOARD_PRINTRBOARD_REVF  811  // Printrboard Revision F (AT90USB1286)
76
-#define BOARD_BRAINWAVE         82   // Brainwave (AT90USB646)
77
-#define BOARD_SAV_MKI           83   // SAV Mk-I (AT90USB1286)
78
-#define BOARD_TEENSY2           84   // Teensy++2.0 (AT90USB1286) - CLI compile: HARDWARE_MOTHERBOARD=84  make
79
-#define BOARD_BRAINWAVE_PRO     85   // Brainwave Pro (AT90USB1286)
80
-#define BOARD_GEN3_PLUS         9    // Gen3+
81
-#define BOARD_GEN3_MONOLITHIC   22   // Gen3 Monolithic Electronics
82
-#define BOARD_MEGATRONICS       70   // Megatronics
83
-#define BOARD_MEGATRONICS_2     701  // Megatronics v2.0
84
-#define BOARD_MINITRONICS       702  // Minitronics v1.0/1.1
85
-#define BOARD_MEGATRONICS_3     703  // Megatronics v3.0
86
-#define BOARD_MEGATRONICS_31    704  // Megatronics v3.1
87
-#define BOARD_OMCA_A            90   // Alpha OMCA board
88
-#define BOARD_OMCA              91   // Final OMCA board
89
-#define BOARD_RAMBO             301  // Rambo
90
-#define BOARD_MINIRAMBO         302  // Mini-Rambo
91
-#define BOARD_SCOOVO_X9H        303  // abee Scoovo X9H
92
-#define BOARD_MEGACONTROLLER    310  // Mega controller
93
-#define BOARD_ELEFU_3           21   // Elefu Ra Board (v3)
94
-#define BOARD_5DPRINT           88   // 5DPrint D8 Driver Board
95
-#define BOARD_LEAPFROG          999  // Leapfrog
96
-#define BOARD_MKS_BASE          40   // MKS BASE 1.0
97
-#define BOARD_MKS_13            47   // MKS v1.3 or 1.4 (maybe higher)
98
-#define BOARD_SAINSMART_2IN1    49   // Sainsmart 2-in-1 board
99
-#define BOARD_BAM_DICE          401  // 2PrintBeta BAM&DICE with STK drivers
100
-#define BOARD_BAM_DICE_DUE      402  // 2PrintBeta BAM&DICE Due with STK drivers
101
-#define BOARD_BQ_ZUM_MEGA_3D    503  // bq ZUM Mega 3D
102
-#define BOARD_ZRIB_V20          504  // zrib V2.0 control board (Chinese knock off RAMPS replica)
28
+//
29
+// RAMPS 1.3 / 1.4 - ATmega1280, ATmega2560
30
+//
31
+
32
+#define BOARD_RAMPS_OLD         3     // MEGA/RAMPS up to 1.2
33
+
34
+#define BOARD_RAMPS_13_EFB      33    // RAMPS 1.3 (Power outputs: Hotend, Fan, Bed)
35
+#define BOARD_RAMPS_13_EEB      34    // RAMPS 1.3 (Power outputs: Hotend0, Hotend1, Bed)
36
+#define BOARD_RAMPS_13_EFF      35    // RAMPS 1.3 (Power outputs: Hotend, Fan0, Fan1)
37
+#define BOARD_RAMPS_13_EEF      36    // RAMPS 1.3 (Power outputs: Hotend0, Hotend1, Fan)
38
+#define BOARD_RAMPS_13_SF       38    // RAMPS 1.3 (Power outputs: Spindle, Controller Fan)
39
+
40
+#define BOARD_RAMPS_14_EFB      43    // RAMPS 1.4 (Power outputs: Hotend, Fan, Bed)
41
+#define BOARD_RAMPS_14_EEB      44    // RAMPS 1.4 (Power outputs: Hotend0, Hotend1, Bed)
42
+#define BOARD_RAMPS_14_EFF      45    // RAMPS 1.4 (Power outputs: Hotend, Fan0, Fan1)
43
+#define BOARD_RAMPS_14_EEF      46    // RAMPS 1.4 (Power outputs: Hotend0, Hotend1, Fan)
44
+#define BOARD_RAMPS_14_SF       48    // RAMPS 1.4 (Power outputs: Spindle, Controller Fan)
45
+
46
+#define BOARD_RAMPS_PLUS_EFB   143    // RAMPS Plus 3DYMY (Power outputs: Hotend, Fan, Bed)
47
+#define BOARD_RAMPS_PLUS_EEB   144    // RAMPS Plus 3DYMY (Power outputs: Hotend0, Hotend1, Bed)
48
+#define BOARD_RAMPS_PLUS_EFF   145    // RAMPS Plus 3DYMY (Power outputs: Hotend, Fan0, Fan1)
49
+#define BOARD_RAMPS_PLUS_EEF   146    // RAMPS Plus 3DYMY (Power outputs: Hotend0, Hotend1, Fan)
50
+#define BOARD_RAMPS_PLUS_SF    148    // RAMPS Plus 3DYMY (Power outputs: Spindle, Controller Fan)
51
+
52
+//
53
+// RAMPS Derivatives - ATmega1280, ATmega2560
54
+//
55
+
56
+#define BOARD_3DRAG             77    // 3Drag Controller
57
+#define BOARD_K8200             78    // Velleman K8200 Controller (derived from 3Drag Controller)
58
+#define BOARD_K8400             79    // Velleman K8400 Controller (derived from 3Drag Controller)
59
+#define BOARD_BAM_DICE          401   // 2PrintBeta BAM&DICE with STK drivers
60
+#define BOARD_BAM_DICE_DUE      402   // 2PrintBeta BAM&DICE Due with STK drivers
61
+#define BOARD_MKS_BASE          40    // MKS BASE 1.0
62
+#define BOARD_MKS_13            47    // MKS v1.3 or 1.4 (maybe higher)
63
+#define BOARD_MKS_GEN_L         53    // MKS GEN L
64
+#define BOARD_ZRIB_V20          504   // zrib V2.0 control board (Chinese knock off RAMPS replica)
65
+#define BOARD_FELIX2            37    // Felix 2.0+ Electronics Board (RAMPS like)
66
+#define BOARD_RIGIDBOARD        42    // Invent-A-Part RigidBoard
67
+#define BOARD_RIGIDBOARD_V2     52    // Invent-A-Part RigidBoard V2
68
+#define BOARD_SAINSMART_2IN1    49    // Sainsmart 2-in-1 board
69
+#define BOARD_ULTIMAKER         7     // Ultimaker
70
+#define BOARD_ULTIMAKER_OLD     71    // Ultimaker (Older electronics. Pre 1.5.4. This is rare)
71
+#define BOARD_AZTEEG_X3         67    // Azteeg X3
72
+#define BOARD_AZTEEG_X3_PRO     68    // Azteeg X3 Pro
73
+#define BOARD_ULTIMAIN_2        72    // Ultimainboard 2.x (Uses TEMP_SENSOR 20)
74
+#define BOARD_RUMBA             80    // Rumba
75
+#define BOARD_BQ_ZUM_MEGA_3D    503   // bq ZUM Mega 3D
76
+#define BOARD_MAKEBOARD_MINI    431   // MakeBoard Mini v2.1.2 is a control board sold by MicroMake
77
+
78
+//
79
+// Other ATmega1280, ATmega2560
80
+//
81
+
82
+#define BOARD_CNCONTROLS_11     111   // Cartesio CN Controls V11
83
+#define BOARD_CNCONTROLS_12     112   // Cartesio CN Controls V12
84
+#define BOARD_CHEAPTRONIC       2     // Cheaptronic v1.0
85
+#define BOARD_CHEAPTRONIC_V2    21    // Cheaptronic v2.0
86
+#define BOARD_MIGHTYBOARD_REVE  200   // Makerbot Mightyboard Revision E
87
+#define BOARD_MEGATRONICS       70    // Megatronics
88
+#define BOARD_MEGATRONICS_2     701   // Megatronics v2.0
89
+#define BOARD_MEGATRONICS_3     703   // Megatronics v3.0
90
+#define BOARD_MEGATRONICS_31    704   // Megatronics v3.1
91
+#define BOARD_RAMBO             301   // Rambo
92
+#define BOARD_MINIRAMBO         302   // Mini-Rambo
93
+#define BOARD_MINIRAMBO_10A     303   // Mini-Rambo 1.0a
94
+#define BOARD_ELEFU_3           21    // Elefu Ra Board (v3)
95
+#define BOARD_LEAPFROG          999   // Leapfrog
96
+#define BOARD_MEGACONTROLLER    310   // Mega controller
97
+#define BOARD_SCOOVO_X9H        321   // abee Scoovo X9H
98
+#define BOARD_GT2560_REV_A      74    // Geeetech GT2560 Rev. A
99
+#define BOARD_GT2560_REV_A_PLUS 75    // Geeetech GT2560 Rev. A+ (with auto level probe)
100
+
101
+//
102
+// ATmega1281, ATmega2561
103
+//
104
+
105
+#define BOARD_MINITRONICS       702   // Minitronics v1.0/1.1
106
+#define BOARD_SILVER_GATE       25    // Silvergate v1.0
107
+
108
+//
109
+// Sanguinololu and Derivatives - ATmega644P, ATmega1284P
110
+//
111
+
112
+#define BOARD_SANGUINOLOLU_11   6     // Sanguinololu < 1.2
113
+#define BOARD_SANGUINOLOLU_12   62    // Sanguinololu 1.2 and above
114
+#define BOARD_MELZI             63    // Melzi
115
+#define BOARD_MELZI_MAKR3D      66    // Melzi with ATmega1284 (MaKr3d version)
116
+#define BOARD_MELZI_CREALITY    89    // Melzi Creality3D board (for CR-10 etc)
117
+#define BOARD_STB_11            64    // STB V1.1
118
+#define BOARD_AZTEEG_X1         65    // Azteeg X1
119
+
120
+//
121
+// Other ATmega644P, ATmega644, ATmega1284P
122
+//
123
+
124
+#define BOARD_GEN3_MONOLITHIC   22    // Gen3 Monolithic Electronics
125
+#define BOARD_GEN3_PLUS         9     // Gen3+
126
+#define BOARD_GEN6              5     // Gen6
127
+#define BOARD_GEN6_DELUXE       51    // Gen6 deluxe
128
+#define BOARD_GEN7_CUSTOM       10    // Gen7 custom (Alfons3 Version) "https://github.com/Alfons3/Generation_7_Electronics"
129
+#define BOARD_GEN7_12           11    // Gen7 v1.1, v1.2
130
+#define BOARD_GEN7_13           12    // Gen7 v1.3
131
+#define BOARD_GEN7_14           13    // Gen7 v1.4
132
+#define BOARD_OMCA_A            90    // Alpha OMCA board
133
+#define BOARD_OMCA              91    // Final OMCA board
134
+#define BOARD_SETHI             20    // Sethi 3D_1
135
+#define BOARD_ANET_10           69    // Anet 1.0 (Melzi clone)
136
+
137
+//
138
+// Teensyduino - AT90USB1286, AT90USB1286P
139
+//
140
+
141
+#define BOARD_TEENSYLU          8     // Teensylu
142
+#define BOARD_PRINTRBOARD       81    // Printrboard (AT90USB1286)
143
+#define BOARD_PRINTRBOARD_REVF  811   // Printrboard Revision F (AT90USB1286)
144
+#define BOARD_BRAINWAVE         82    // Brainwave (AT90USB646)
145
+#define BOARD_BRAINWAVE_PRO     85    // Brainwave Pro (AT90USB1286)
146
+#define BOARD_SAV_MKI           83    // SAV Mk-I (AT90USB1286)
147
+#define BOARD_TEENSY2           84    // Teensy++2.0 (AT90USB1286) - CLI compile: HARDWARE_MOTHERBOARD=84  make
148
+#define BOARD_5DPRINT           88    // 5DPrint D8 Driver Board
103
 
149
 
104
 #define MB(board) (MOTHERBOARD==BOARD_##board)
150
 #define MB(board) (MOTHERBOARD==BOARD_##board)
105
 
151
 

+ 95
- 71
Marlin/cardreader.cpp Переглянути файл

20
  *
20
  *
21
  */
21
  */
22
 
22
 
23
+#include "MarlinConfig.h"
24
+
25
+#if ENABLED(SDSUPPORT)
26
+
23
 #include "cardreader.h"
27
 #include "cardreader.h"
24
 
28
 
25
 #include "ultralcd.h"
29
 #include "ultralcd.h"
26
 #include "stepper.h"
30
 #include "stepper.h"
27
 #include "language.h"
31
 #include "language.h"
28
 
32
 
29
-#include "Marlin.h"
30
-
31
-#if ENABLED(SDSUPPORT)
32
-
33
 #define LONGEST_FILENAME (longFilename[0] ? longFilename : filename)
33
 #define LONGEST_FILENAME (longFilename[0] ? longFilename : filename)
34
 
34
 
35
 CardReader::CardReader() {
35
 CardReader::CardReader() {
44
   sdprinting = cardOK = saving = logging = false;
44
   sdprinting = cardOK = saving = logging = false;
45
   filesize = 0;
45
   filesize = 0;
46
   sdpos = 0;
46
   sdpos = 0;
47
-  workDirDepth = 0;
48
   file_subcall_ctr = 0;
47
   file_subcall_ctr = 0;
48
+
49
+  workDirDepth = 0;
49
   ZERO(workDirParents);
50
   ZERO(workDirParents);
50
 
51
 
51
   autostart_stilltocheck = true; //the SD start is delayed, because otherwise the serial cannot answer fast enough to make contact with the host software.
52
   autostart_stilltocheck = true; //the SD start is delayed, because otherwise the serial cannot answer fast enough to make contact with the host software.
73
 /**
74
 /**
74
  * Dive into a folder and recurse depth-first to perform a pre-set operation lsAction:
75
  * Dive into a folder and recurse depth-first to perform a pre-set operation lsAction:
75
  *   LS_Count       - Add +1 to nrFiles for every file within the parent
76
  *   LS_Count       - Add +1 to nrFiles for every file within the parent
76
- *   LS_GetFilename - Get the filename of the file indexed by nrFiles
77
+ *   LS_GetFilename - Get the filename of the file indexed by nrFile_index
77
  *   LS_SerialPrint - Print the full path and size of each file to serial output
78
  *   LS_SerialPrint - Print the full path and size of each file to serial output
78
  */
79
  */
80
+
81
+uint16_t nrFile_index;
82
+
79
 void CardReader::lsDive(const char *prepend, SdFile parent, const char * const match/*=NULL*/) {
83
 void CardReader::lsDive(const char *prepend, SdFile parent, const char * const match/*=NULL*/) {
80
   dir_t p;
84
   dir_t p;
81
   uint8_t cnt = 0;
85
   uint8_t cnt = 0;
129
 
133
 
130
       if (!filenameIsDir && (p.name[8] != 'G' || p.name[9] == '~')) continue;
134
       if (!filenameIsDir && (p.name[8] != 'G' || p.name[9] == '~')) continue;
131
 
135
 
132
-      switch (lsAction) {
136
+      switch (lsAction) {  // 1 based file count
133
         case LS_Count:
137
         case LS_Count:
134
           nrFiles++;
138
           nrFiles++;
135
           break;
139
           break;
147
           if (match != NULL) {
151
           if (match != NULL) {
148
             if (strcasecmp(match, filename) == 0) return;
152
             if (strcasecmp(match, filename) == 0) return;
149
           }
153
           }
150
-          else if (cnt == nrFiles) return;
154
+          else if (cnt == nrFile_index) return;  // 0 based index
151
           cnt++;
155
           cnt++;
152
           break;
156
           break;
153
       }
157
       }
255
     SERIAL_ECHO_START();
259
     SERIAL_ECHO_START();
256
     SERIAL_ECHOLNPGM(MSG_SD_CARD_OK);
260
     SERIAL_ECHOLNPGM(MSG_SD_CARD_OK);
257
   }
261
   }
258
-  workDir = root;
259
-  curDir = &root;
260
-  #if ENABLED(SDCARD_SORT_ALPHA)
261
-    presort();
262
-  #endif
263
-  /**
264
-  if (!workDir.openRoot(&volume)) {
265
-    SERIAL_ECHOLNPGM(MSG_SD_WORKDIR_FAIL);
266
-  }
267
-  */
262
+  setroot();
268
 }
263
 }
269
 
264
 
270
 void CardReader::setroot() {
265
 void CardReader::setroot() {
310
   openFile(name, false);
305
   openFile(name, false);
311
 }
306
 }
312
 
307
 
308
+void appendAtom(SdFile &file, char *& dst, uint8_t &cnt) {
309
+  file.getFilename(dst);
310
+  while (*dst && cnt < MAXPATHNAMELENGTH) { dst++; cnt++; }
311
+  if (cnt < MAXPATHNAMELENGTH) { *dst = '/'; dst++; cnt++; }
312
+}
313
+
313
 void CardReader::getAbsFilename(char *t) {
314
 void CardReader::getAbsFilename(char *t) {
314
-  uint8_t cnt = 0;
315
-  *t = '/'; t++; cnt++;
316
-  for (uint8_t i = 0; i < workDirDepth; i++) {
317
-    workDirParents[i].getFilename(t); //SDBaseFile.getfilename!
318
-    while (*t && cnt < MAXPATHNAMELENGTH) { t++; cnt++; } //crawl counter forward.
315
+  *t++ = '/';                                               // Root folder
316
+  uint8_t cnt = 1;
317
+
318
+  for (uint8_t i = 0; i < workDirDepth; i++)                // Loop to current work dir
319
+    appendAtom(workDirParents[i], t, cnt);
320
+
321
+  if (cnt < MAXPATHNAMELENGTH - (FILENAME_LENGTH)) {
322
+    appendAtom(file, t, cnt);
323
+    --t;
319
   }
324
   }
320
-  if (cnt < MAXPATHNAMELENGTH - (FILENAME_LENGTH))
321
-    file.getFilename(t);
322
-  else
323
-    t[0] = 0;
325
+  *t = '\0';
324
 }
326
 }
325
 
327
 
326
-void CardReader::openFile(char* name, bool read, bool push_current/*=false*/) {
328
+void CardReader::openFile(char* name, const bool read, const bool subcall/*=false*/) {
327
 
329
 
328
   if (!cardOK) return;
330
   if (!cardOK) return;
329
 
331
 
330
   uint8_t doing = 0;
332
   uint8_t doing = 0;
331
-  if (isFileOpen()) { //replacing current file by new file, or subfile call
332
-    if (push_current) {
333
+  if (isFileOpen()) {                     // Replacing current file or doing a subroutine
334
+    if (subcall) {
333
       if (file_subcall_ctr > SD_PROCEDURE_DEPTH - 1) {
335
       if (file_subcall_ctr > SD_PROCEDURE_DEPTH - 1) {
334
         SERIAL_ERROR_START();
336
         SERIAL_ERROR_START();
335
         SERIAL_ERRORPGM("trying to call sub-gcode files with too many levels. MAX level is:");
337
         SERIAL_ERRORPGM("trying to call sub-gcode files with too many levels. MAX level is:");
338
         return;
340
         return;
339
       }
341
       }
340
 
342
 
341
-      // Store current filename and position
343
+      // Store current filename (based on workDirParents) and position
342
       getAbsFilename(proc_filenames[file_subcall_ctr]);
344
       getAbsFilename(proc_filenames[file_subcall_ctr]);
345
+      filespos[file_subcall_ctr] = sdpos;
343
 
346
 
344
       SERIAL_ECHO_START();
347
       SERIAL_ECHO_START();
345
       SERIAL_ECHOPAIR("SUBROUTINE CALL target:\"", name);
348
       SERIAL_ECHOPAIR("SUBROUTINE CALL target:\"", name);
346
       SERIAL_ECHOPAIR("\" parent:\"", proc_filenames[file_subcall_ctr]);
349
       SERIAL_ECHOPAIR("\" parent:\"", proc_filenames[file_subcall_ctr]);
347
       SERIAL_ECHOLNPAIR("\" pos", sdpos);
350
       SERIAL_ECHOLNPAIR("\" pos", sdpos);
348
-      filespos[file_subcall_ctr] = sdpos;
349
       file_subcall_ctr++;
351
       file_subcall_ctr++;
350
     }
352
     }
351
-    else {
353
+    else
352
       doing = 1;
354
       doing = 1;
353
-    }
354
   }
355
   }
355
-  else { // Opening fresh file
356
+  else if (subcall) {     // Returning from a subcall?
357
+    SERIAL_ECHO_START();
358
+    SERIAL_ECHOLNPGM("END SUBROUTINE");
359
+  }
360
+  else {                  // Opening fresh file
356
     doing = 2;
361
     doing = 2;
357
     file_subcall_ctr = 0; // Reset procedure depth in case user cancels print while in procedure
362
     file_subcall_ctr = 0; // Reset procedure depth in case user cancels print while in procedure
358
   }
363
   }
360
   if (doing) {
365
   if (doing) {
361
     SERIAL_ECHO_START();
366
     SERIAL_ECHO_START();
362
     SERIAL_ECHOPGM("Now ");
367
     SERIAL_ECHOPGM("Now ");
363
-    SERIAL_ECHO(doing == 1 ? "doing" : "fresh");
368
+    serialprintPGM(doing == 1 ? PSTR("doing") : PSTR("fresh"));
364
     SERIAL_ECHOLNPAIR(" file: ", name);
369
     SERIAL_ECHOLNPAIR(" file: ", name);
365
   }
370
   }
366
 
371
 
380
       if (dirname_end != NULL && dirname_end > dirname_start) {
385
       if (dirname_end != NULL && dirname_end > dirname_start) {
381
         char subdirname[FILENAME_LENGTH];
386
         char subdirname[FILENAME_LENGTH];
382
         strncpy(subdirname, dirname_start, dirname_end - dirname_start);
387
         strncpy(subdirname, dirname_start, dirname_end - dirname_start);
383
-        subdirname[dirname_end - dirname_start] = 0;
384
-        SERIAL_ECHOLN(subdirname);
388
+        subdirname[dirname_end - dirname_start] = '\0';
385
         if (!myDir.open(curDir, subdirname, O_READ)) {
389
         if (!myDir.open(curDir, subdirname, O_READ)) {
386
           SERIAL_PROTOCOLPGM(MSG_SD_OPEN_FILE_FAIL);
390
           SERIAL_PROTOCOLPGM(MSG_SD_OPEN_FILE_FAIL);
387
           SERIAL_PROTOCOL(subdirname);
391
           SERIAL_PROTOCOL(subdirname);
403
       }
407
       }
404
     }
408
     }
405
   }
409
   }
406
-  else { //relative path
407
-    curDir = &workDir;
408
-  }
410
+  else
411
+    curDir = &workDir; // Relative paths start in current directory
409
 
412
 
410
   if (read) {
413
   if (read) {
411
     if (file.open(curDir, fname, O_READ)) {
414
     if (file.open(curDir, fname, O_READ)) {
412
       filesize = file.fileSize();
415
       filesize = file.fileSize();
416
+      sdpos = 0;
413
       SERIAL_PROTOCOLPAIR(MSG_SD_FILE_OPENED, fname);
417
       SERIAL_PROTOCOLPAIR(MSG_SD_FILE_OPENED, fname);
414
       SERIAL_PROTOCOLLNPAIR(MSG_SD_SIZE, filesize);
418
       SERIAL_PROTOCOLLNPAIR(MSG_SD_SIZE, filesize);
415
-      sdpos = 0;
416
-
417
       SERIAL_PROTOCOLLNPGM(MSG_SD_FILE_SELECTED);
419
       SERIAL_PROTOCOLLNPGM(MSG_SD_FILE_SELECTED);
418
       getfilename(0, fname);
420
       getfilename(0, fname);
419
       lcd_setstatus(longFilename[0] ? longFilename : fname);
421
       lcd_setstatus(longFilename[0] ? longFilename : fname);
438
   }
440
   }
439
 }
441
 }
440
 
442
 
441
-void CardReader::removeFile(char* name) {
443
+void CardReader::removeFile(const char * const name) {
442
   if (!cardOK) return;
444
   if (!cardOK) return;
443
 
445
 
444
   stopSDPrint();
446
   stopSDPrint();
445
 
447
 
446
   SdFile myDir;
448
   SdFile myDir;
447
   curDir = &root;
449
   curDir = &root;
448
-  char *fname = name;
450
+  const char *fname = name;
449
 
451
 
450
   char *dirname_start, *dirname_end;
452
   char *dirname_start, *dirname_end;
451
   if (name[0] == '/') {
453
   if (name[0] == '/') {
460
         subdirname[dirname_end - dirname_start] = 0;
462
         subdirname[dirname_end - dirname_start] = 0;
461
         SERIAL_ECHOLN(subdirname);
463
         SERIAL_ECHOLN(subdirname);
462
         if (!myDir.open(curDir, subdirname, O_READ)) {
464
         if (!myDir.open(curDir, subdirname, O_READ)) {
463
-          SERIAL_PROTOCOLPAIR("open failed, File: ", subdirname);
465
+          SERIAL_PROTOCOLPAIR(MSG_SD_OPEN_FILE_FAIL, subdirname);
464
           SERIAL_PROTOCOLCHAR('.');
466
           SERIAL_PROTOCOLCHAR('.');
465
           SERIAL_EOL();
467
           SERIAL_EOL();
466
           return;
468
           return;
467
         }
469
         }
468
-        else {
469
-          //SERIAL_ECHOLNPGM("dive ok");
470
-        }
471
 
470
 
472
         curDir = &myDir;
471
         curDir = &myDir;
473
         dirname_start = dirname_end + 1;
472
         dirname_start = dirname_end + 1;
474
       }
473
       }
475
-      else { // the remainder after all /fsa/fdsa/ is the filename
474
+      else {
476
         fname = dirname_start;
475
         fname = dirname_start;
477
-        //SERIAL_ECHOLNPGM("remainder");
478
-        //SERIAL_ECHOLN(fname);
479
         break;
476
         break;
480
       }
477
       }
481
     }
478
     }
482
   }
479
   }
483
-  else { // relative path
480
+  else // Relative paths are rooted in the current directory
484
     curDir = &workDir;
481
     curDir = &workDir;
485
-  }
486
 
482
 
487
   if (file.remove(curDir, fname)) {
483
   if (file.remove(curDir, fname)) {
488
     SERIAL_PROTOCOLPGM("File deleted:");
484
     SERIAL_PROTOCOLPGM("File deleted:");
506
     SERIAL_PROTOCOLCHAR('/');
502
     SERIAL_PROTOCOLCHAR('/');
507
     SERIAL_PROTOCOLLN(filesize);
503
     SERIAL_PROTOCOLLN(filesize);
508
   }
504
   }
509
-  else {
505
+  else
510
     SERIAL_PROTOCOLLNPGM(MSG_SD_NOT_PRINTING);
506
     SERIAL_PROTOCOLLNPGM(MSG_SD_NOT_PRINTING);
511
-  }
512
 }
507
 }
513
 
508
 
514
 void CardReader::write_command(char *buf) {
509
 void CardReader::write_command(char *buf) {
515
   char* begin = buf;
510
   char* begin = buf;
516
-  char* npos = 0;
511
+  char* npos = NULL;
517
   char* end = buf + strlen(buf) - 1;
512
   char* end = buf + strlen(buf) - 1;
518
 
513
 
519
   file.writeError = false;
514
   file.writeError = false;
595
   #endif // SDSORT_CACHE_NAMES
590
   #endif // SDSORT_CACHE_NAMES
596
   curDir = &workDir;
591
   curDir = &workDir;
597
   lsAction = LS_GetFilename;
592
   lsAction = LS_GetFilename;
598
-  nrFiles = nr;
593
+  nrFile_index = nr;
599
   curDir->rewind();
594
   curDir->rewind();
600
   lsDive("", *curDir, match);
595
   lsDive("", *curDir, match);
601
 }
596
 }
611
 }
606
 }
612
 
607
 
613
 void CardReader::chdir(const char * relpath) {
608
 void CardReader::chdir(const char * relpath) {
614
-  SdFile newfile;
609
+  SdFile newDir;
615
   SdFile *parent = &root;
610
   SdFile *parent = &root;
616
 
611
 
617
   if (workDir.isOpen()) parent = &workDir;
612
   if (workDir.isOpen()) parent = &workDir;
618
 
613
 
619
-  if (!newfile.open(*parent, relpath, O_READ)) {
614
+  if (!newDir.open(*parent, relpath, O_READ)) {
620
     SERIAL_ECHO_START();
615
     SERIAL_ECHO_START();
621
     SERIAL_ECHOPGM(MSG_SD_CANT_ENTER_SUBDIR);
616
     SERIAL_ECHOPGM(MSG_SD_CANT_ENTER_SUBDIR);
622
     SERIAL_ECHOLN(relpath);
617
     SERIAL_ECHOLN(relpath);
623
   }
618
   }
624
   else {
619
   else {
620
+    workDir = newDir;
625
     if (workDirDepth < MAX_DIR_DEPTH)
621
     if (workDirDepth < MAX_DIR_DEPTH)
626
-      workDirParents[workDirDepth++] = *parent;
627
-    workDir = newfile;
622
+      workDirParents[workDirDepth++] = workDir;
628
     #if ENABLED(SDCARD_SORT_ALPHA)
623
     #if ENABLED(SDCARD_SORT_ALPHA)
629
       presort();
624
       presort();
630
     #endif
625
     #endif
631
   }
626
   }
632
 }
627
 }
633
 
628
 
634
-void CardReader::updir() {
635
-  if (workDirDepth > 0) {
636
-    workDir = workDirParents[--workDirDepth];
629
+int8_t CardReader::updir() {
630
+  if (workDirDepth > 0) {                                               // At least 1 dir has been saved
631
+    workDir = --workDirDepth ? workDirParents[workDirDepth - 1] : root; // Use parent, or root if none
637
     #if ENABLED(SDCARD_SORT_ALPHA)
632
     #if ENABLED(SDCARD_SORT_ALPHA)
638
       presort();
633
       presort();
639
     #endif
634
     #endif
640
   }
635
   }
636
+  return workDirDepth;
641
 }
637
 }
642
 
638
 
643
 #if ENABLED(SDCARD_SORT_ALPHA)
639
 #if ENABLED(SDCARD_SORT_ALPHA)
696
             sortnames = new char*[fileCnt];
692
             sortnames = new char*[fileCnt];
697
           #endif
693
           #endif
698
         #elif ENABLED(SDSORT_USES_STACK)
694
         #elif ENABLED(SDSORT_USES_STACK)
699
-          char sortnames[fileCnt][LONG_FILENAME_LENGTH];
695
+          char sortnames[fileCnt][SORTED_LONGNAME_MAXLEN];
700
         #endif
696
         #endif
701
 
697
 
702
         // Folder sorting needs 1 bit per entry for flags.
698
         // Folder sorting needs 1 bit per entry for flags.
735
               #endif
731
               #endif
736
             #else
732
             #else
737
               // Copy filenames into the static array
733
               // Copy filenames into the static array
738
-              strcpy(sortnames[i], LONGEST_FILENAME);
734
+              #if SORTED_LONGNAME_MAXLEN != LONG_FILENAME_LENGTH
735
+                strncpy(sortnames[i], LONGEST_FILENAME, SORTED_LONGNAME_MAXLEN);
736
+                sortnames[i][SORTED_LONGNAME_MAXLEN - 1] = '\0';
737
+              #else
738
+                strncpy(sortnames[i], LONGEST_FILENAME, SORTED_LONGNAME_MAXLEN);
739
+              #endif
739
               #if ENABLED(SDSORT_CACHE_NAMES)
740
               #if ENABLED(SDSORT_CACHE_NAMES)
740
                 strcpy(sortshort[i], filename);
741
                 strcpy(sortshort[i], filename);
741
               #endif
742
               #endif
826
           #if ENABLED(SDSORT_DYNAMIC_RAM)
827
           #if ENABLED(SDSORT_DYNAMIC_RAM)
827
             sortnames = new char*[1];
828
             sortnames = new char*[1];
828
             sortnames[0] = strdup(LONGEST_FILENAME); // malloc
829
             sortnames[0] = strdup(LONGEST_FILENAME); // malloc
829
-            sortshort = new char*[1];
830
-            sortshort[0] = strdup(filename);         // malloc
830
+            #if ENABLED(SDSORT_CACHE_NAMES)
831
+              sortshort = new char*[1];
832
+              sortshort[0] = strdup(filename);       // malloc
833
+            #endif
831
             isDir = new uint8_t[1];
834
             isDir = new uint8_t[1];
832
           #else
835
           #else
833
-            strcpy(sortnames[0], LONGEST_FILENAME);
834
-            strcpy(sortshort[0], filename);
836
+            #if SORTED_LONGNAME_MAXLEN != LONG_FILENAME_LENGTH
837
+              strncpy(sortnames[0], LONGEST_FILENAME, SORTED_LONGNAME_MAXLEN);
838
+              sortnames[0][SORTED_LONGNAME_MAXLEN - 1] = '\0';
839
+            #else
840
+              strncpy(sortnames[0], LONGEST_FILENAME, SORTED_LONGNAME_MAXLEN);
841
+            #endif
842
+            #if ENABLED(SDSORT_CACHE_NAMES)
843
+              strcpy(sortshort[0], filename);
844
+            #endif
835
           #endif
845
           #endif
836
           isDir[0] = filenameIsDir ? 0x01 : 0x00;
846
           isDir[0] = filenameIsDir ? 0x01 : 0x00;
837
         #endif
847
         #endif
860
 
870
 
861
 #endif // SDCARD_SORT_ALPHA
871
 #endif // SDCARD_SORT_ALPHA
862
 
872
 
873
+uint16_t CardReader::get_num_Files() {
874
+  return
875
+    #if ENABLED(SDCARD_SORT_ALPHA) && SDSORT_USES_RAM && SDSORT_CACHE_NAMES
876
+      nrFiles // no need to access the SD card for filenames
877
+    #else
878
+      getnrfilenames()
879
+    #endif
880
+  ;
881
+}
882
+
863
 void CardReader::printingHasFinished() {
883
 void CardReader::printingHasFinished() {
864
   stepper.synchronize();
884
   stepper.synchronize();
865
   file.close();
885
   file.close();
879
     #if ENABLED(SDCARD_SORT_ALPHA)
899
     #if ENABLED(SDCARD_SORT_ALPHA)
880
       presort();
900
       presort();
881
     #endif
901
     #endif
902
+
903
+    #if ENABLED(SD_REPRINT_LAST_SELECTED_FILE)
904
+      lcd_reselect_last_file();
905
+    #endif
882
   }
906
   }
883
 }
907
 }
884
 
908
 

+ 33
- 25
Marlin/cardreader.h Переглянути файл

20
  *
20
  *
21
  */
21
  */
22
 
22
 
23
-#ifndef CARDREADER_H
24
-#define CARDREADER_H
23
+#ifndef _CARDREADER_H_
24
+#define _CARDREADER_H_
25
 
25
 
26
 #include "MarlinConfig.h"
26
 #include "MarlinConfig.h"
27
 
27
 
30
 #define MAX_DIR_DEPTH 10          // Maximum folder depth
30
 #define MAX_DIR_DEPTH 10          // Maximum folder depth
31
 
31
 
32
 #include "SdFile.h"
32
 #include "SdFile.h"
33
-
34
 #include "types.h"
33
 #include "types.h"
35
 #include "enum.h"
34
 #include "enum.h"
36
 
35
 
40
 
39
 
41
   void initsd();
40
   void initsd();
42
   void write_command(char *buf);
41
   void write_command(char *buf);
43
-  //files auto[0-9].g on the sd card are performed in a row
44
-  //this is to delay autostart and hence the initialisaiton of the sd card to some seconds after the normal init, so the device is available quick after a reset
42
+  // Files auto[0-9].g on the sd card are performed in sequence.
43
+  // This is to delay autostart and hence the initialisation of
44
+  // the sd card to some seconds after the normal init, so the
45
+  // device is available soon after a reset.
45
 
46
 
46
   void checkautostart(bool x);
47
   void checkautostart(bool x);
47
-  void openFile(char* name, bool read, bool push_current=false);
48
+  void openFile(char* name, const bool read, const bool subcall=false);
48
   void openLogFile(char* name);
49
   void openLogFile(char* name);
49
-  void removeFile(char* name);
50
+  void removeFile(const char * const name);
50
   void closefile(bool store_location=false);
51
   void closefile(bool store_location=false);
51
   void release();
52
   void release();
52
   void openAndPrintFile(const char *name);
53
   void openAndPrintFile(const char *name);
66
 
67
 
67
   void ls();
68
   void ls();
68
   void chdir(const char *relpath);
69
   void chdir(const char *relpath);
69
-  void updir();
70
+  int8_t updir();
70
   void setroot();
71
   void setroot();
71
 
72
 
73
+  uint16_t get_num_Files();
74
+
72
   #if ENABLED(SDCARD_SORT_ALPHA)
75
   #if ENABLED(SDCARD_SORT_ALPHA)
73
     void presort();
76
     void presort();
74
     void getfilename_sorted(const uint16_t nr);
77
     void getfilename_sorted(const uint16_t nr);
111
       uint8_t sort_order[SDSORT_LIMIT];
114
       uint8_t sort_order[SDSORT_LIMIT];
112
     #endif
115
     #endif
113
 
116
 
117
+    #if ENABLED(SDSORT_USES_RAM) && ENABLED(SDSORT_CACHE_NAMES) && DISABLED(SDSORT_DYNAMIC_RAM)
118
+      #define SORTED_LONGNAME_MAXLEN ((SDSORT_CACHE_VFATS) * (FILENAME_LENGTH) + 1)
119
+    #else
120
+      #define SORTED_LONGNAME_MAXLEN LONG_FILENAME_LENGTH
121
+    #endif
122
+
114
     // Cache filenames to speed up SD menus.
123
     // Cache filenames to speed up SD menus.
115
     #if ENABLED(SDSORT_USES_RAM)
124
     #if ENABLED(SDSORT_USES_RAM)
116
 
125
 
120
           char **sortshort, **sortnames;
129
           char **sortshort, **sortnames;
121
         #else
130
         #else
122
           char sortshort[SDSORT_LIMIT][FILENAME_LENGTH];
131
           char sortshort[SDSORT_LIMIT][FILENAME_LENGTH];
123
-          char sortnames[SDSORT_LIMIT][LONG_FILENAME_LENGTH];
132
+          char sortnames[SDSORT_LIMIT][SORTED_LONGNAME_MAXLEN];
124
         #endif
133
         #endif
125
       #elif DISABLED(SDSORT_USES_STACK)
134
       #elif DISABLED(SDSORT_USES_STACK)
126
-        char sortnames[SDSORT_LIMIT][LONG_FILENAME_LENGTH];
135
+        char sortnames[SDSORT_LIMIT][SORTED_LONGNAME_MAXLEN];
127
       #endif
136
       #endif
128
 
137
 
129
       // Folder sorting uses an isDir array when caching items.
138
       // Folder sorting uses an isDir array when caching items.
148
   uint8_t file_subcall_ctr;
157
   uint8_t file_subcall_ctr;
149
   uint32_t filespos[SD_PROCEDURE_DEPTH];
158
   uint32_t filespos[SD_PROCEDURE_DEPTH];
150
   char proc_filenames[SD_PROCEDURE_DEPTH][MAXPATHNAMELENGTH];
159
   char proc_filenames[SD_PROCEDURE_DEPTH][MAXPATHNAMELENGTH];
151
-  uint32_t filesize;
152
-  uint32_t sdpos;
160
+  uint32_t filesize, sdpos;
153
 
161
 
154
   millis_t next_autostart_ms;
162
   millis_t next_autostart_ms;
155
   bool autostart_stilltocheck; //the sd start is delayed, because otherwise the serial cannot answer fast enought to make contact with the hostsoftware.
163
   bool autostart_stilltocheck; //the sd start is delayed, because otherwise the serial cannot answer fast enought to make contact with the hostsoftware.
164
   #endif
172
   #endif
165
 };
173
 };
166
 
174
 
167
-extern CardReader card;
168
-
169
-#define IS_SD_PRINTING (card.sdprinting)
170
-#define IS_SD_FILE_OPEN (card.isFileOpen())
171
-
172
 #if PIN_EXISTS(SD_DETECT)
175
 #if PIN_EXISTS(SD_DETECT)
173
   #if ENABLED(SD_DETECT_INVERTED)
176
   #if ENABLED(SD_DETECT_INVERTED)
174
-    #define IS_SD_INSERTED (READ(SD_DETECT_PIN) != 0)
177
+    #define IS_SD_INSERTED (READ(SD_DETECT_PIN) == HIGH)
175
   #else
178
   #else
176
-    #define IS_SD_INSERTED (READ(SD_DETECT_PIN) == 0)
179
+    #define IS_SD_INSERTED (READ(SD_DETECT_PIN) == LOW)
177
   #endif
180
   #endif
178
 #else
181
 #else
179
-  //No card detect line? Assume the card is inserted.
182
+  // No card detect line? Assume the card is inserted.
180
   #define IS_SD_INSERTED true
183
   #define IS_SD_INSERTED true
181
 #endif
184
 #endif
182
 
185
 
183
-#else
184
-
185
-#define IS_SD_PRINTING (false)
186
-#define IS_SD_FILE_OPEN (false)
186
+extern CardReader card;
187
 
187
 
188
 #endif // SDSUPPORT
188
 #endif // SDSUPPORT
189
 
189
 
190
-#endif // __CARDREADER_H
190
+#if ENABLED(SDSUPPORT)
191
+  #define IS_SD_PRINTING (card.sdprinting)
192
+  #define IS_SD_FILE_OPEN (card.isFileOpen())
193
+#else
194
+  #define IS_SD_PRINTING (false)
195
+  #define IS_SD_FILE_OPEN (false)
196
+#endif
197
+
198
+#endif // _CARDREADER_H_

+ 586
- 299
Marlin/configuration_store.cpp
Різницю між файлами не показано, бо вона завелика
Переглянути файл


+ 2
- 2
Marlin/configuration_store.h Переглянути файл

52
     #endif
52
     #endif
53
 
53
 
54
     #if DISABLED(DISABLE_M503)
54
     #if DISABLED(DISABLE_M503)
55
-      static void report(bool forReplay=false);
55
+      static void report(const bool forReplay=false);
56
     #else
56
     #else
57
       FORCE_INLINE
57
       FORCE_INLINE
58
-      static void report(bool forReplay=false) { UNUSED(forReplay); }
58
+      static void report(const bool forReplay=false) { UNUSED(forReplay); }
59
     #endif
59
     #endif
60
 
60
 
61
   private:
61
   private:

+ 193
- 144
Marlin/dogm_bitmaps.h Переглянути файл

38
   #if ENABLED(START_BMPHIGH)
38
   #if ENABLED(START_BMPHIGH)
39
     #define START_BMPWIDTH      112
39
     #define START_BMPWIDTH      112
40
     #define START_BMPHEIGHT      38
40
     #define START_BMPHEIGHT      38
41
-    #define START_BMPBYTEWIDTH   14
42
-    #define START_BMPBYTES      532 // START_BMPWIDTH * START_BMPHEIGHT / 8
43
 
41
 
44
-    const unsigned char start_bmp[START_BMPBYTES] PROGMEM = {
42
+    const unsigned char start_bmp[] PROGMEM = {
45
       0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
43
       0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
46
       0x0F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
44
       0x0F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
47
       0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFF, 0xFF,
45
       0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFF, 0xFF,
83
   #else
81
   #else
84
     #define START_BMPWIDTH      56
82
     #define START_BMPWIDTH      56
85
     #define START_BMPHEIGHT     19
83
     #define START_BMPHEIGHT     19
86
-    #define START_BMPBYTEWIDTH  7
87
-    #define START_BMPBYTES      133 // START_BMPWIDTH * START_BMPHEIGHT / 8
88
 
84
 
89
-    const unsigned char start_bmp[START_BMPBYTES] PROGMEM = {
85
+    const unsigned char start_bmp[] PROGMEM = {
90
       0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
86
       0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
91
       0x60, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF,
87
       0x60, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF,
92
       0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
88
       0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
115
 // When only one extruder is selected, the "1" on the symbol will not
111
 // When only one extruder is selected, the "1" on the symbol will not
116
 // be displayed.
112
 // be displayed.
117
 
113
 
114
+#define STATUS_SCREENWIDTH     115 // Width in pixels
115
+#define STATUS_SCREENHEIGHT     19 // Height in pixels
116
+
118
 #if HAS_TEMP_BED
117
 #if HAS_TEMP_BED
119
-  #if HOTENDS == 1
120
-    #define STATUS_SCREENWIDTH     115 //Width in pixels
121
-    #define STATUS_SCREENHEIGHT     19 //Height in pixels
122
-    #define STATUS_SCREENBYTEWIDTH  15 //Width in bytes
123
-    const unsigned char status_screen0_bmp[] PROGMEM = { //AVR-GCC, WinAVR
118
+  #if HOTENDS == 0
119
+    const unsigned char status_screen0_bmp[] PROGMEM = {
120
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
121
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
122
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
123
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20,
124
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20,
125
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0,
126
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0,
127
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x40, 0x60, 0x20,
128
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x40, 0xF0, 0x20,
129
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x40, 0xF0, 0x20,
130
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x40, 0x60, 0x20,
131
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x5E, 0x07, 0xA0,
132
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x5F, 0x0F, 0xA0,
133
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x4F, 0x0F, 0x20,
134
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x47, 0x0E, 0x20,
135
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x63, 0x0C, 0x60,
136
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
137
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x7F, 0xFF, 0xE0,
138
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00
139
+    };
140
+    const unsigned char status_screen1_bmp[] PROGMEM = {
141
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
142
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
143
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
144
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20,
145
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
146
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
147
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0,
148
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x5C, 0x63, 0xA0,
149
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x5E, 0xF7, 0xA0,
150
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x5E, 0xF7, 0xA0,
151
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x5C, 0x63, 0xA0,
152
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x58, 0x01, 0xA0,
153
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x40, 0x60, 0x20,
154
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x40, 0xF0, 0x20,
155
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x41, 0xF8, 0x20,
156
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x61, 0xF8, 0x60,
157
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
158
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x7F, 0xFF, 0xE0,
159
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00
160
+    };
161
+  #elif HOTENDS == 1
162
+    const unsigned char status_screen0_bmp[] PROGMEM = {
124
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
163
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
125
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
164
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
126
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
165
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
142
       0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00
181
       0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00
143
     };
182
     };
144
 
183
 
145
-    #define STATUS_SCREENWIDTH     115 //Width in pixels
146
-    #define STATUS_SCREENHEIGHT     19 //Height in pixels
147
-    #define STATUS_SCREENBYTEWIDTH  15 //Width in bytes
148
-    const unsigned char status_screen1_bmp[] PROGMEM = { //AVR-GCC, WinAVR
184
+    const unsigned char status_screen1_bmp[] PROGMEM = {
149
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
185
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
150
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
186
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
151
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
187
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
167
       0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00
203
       0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00
168
     };
204
     };
169
   #elif HOTENDS == 2
205
   #elif HOTENDS == 2
170
-    #define STATUS_SCREENWIDTH     115 //Width in pixels
171
-    #define STATUS_SCREENHEIGHT     19 //Height in pixels
172
-    #define STATUS_SCREENBYTEWIDTH  15 //Width in bytes
173
-    const unsigned char status_screen0_bmp[] PROGMEM = { //AVR-GCC, WinAVR
206
+    const unsigned char status_screen0_bmp[] PROGMEM = {
174
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
207
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
175
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
208
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
176
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
209
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
192
       0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00
225
       0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00
193
     };
226
     };
194
 
227
 
195
-    #define STATUS_SCREENWIDTH     115 //Width in pixels
196
-    #define STATUS_SCREENHEIGHT     19 //Height in pixels
197
-    #define STATUS_SCREENBYTEWIDTH  15 //Width in bytes
198
-    const unsigned char status_screen1_bmp[] PROGMEM = { //AVR-GCC, WinAVR
228
+    const unsigned char status_screen1_bmp[] PROGMEM = {
199
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
229
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
200
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
230
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
201
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
231
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
217
       0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00
247
       0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00
218
     };
248
     };
219
   #else
249
   #else
220
-    #define STATUS_SCREENWIDTH     115 //Width in pixels
221
-    #define STATUS_SCREENHEIGHT     19 //Height in pixels
222
-    #define STATUS_SCREENBYTEWIDTH  15 //Width in bytes
223
-    const unsigned char status_screen0_bmp[] PROGMEM = { //AVR-GCC, WinAVR
250
+    const unsigned char status_screen0_bmp[] PROGMEM = {
224
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
251
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
225
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
252
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
226
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
253
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
242
       0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00
269
       0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00
243
     };
270
     };
244
 
271
 
245
-    #define STATUS_SCREENWIDTH     115 //Width in pixels
246
-    #define STATUS_SCREENHEIGHT     19 //Height in pixels
247
-    #define STATUS_SCREENBYTEWIDTH  15 //Width in bytes
248
-    const unsigned char status_screen1_bmp[] PROGMEM = { //AVR-GCC, WinAVR
272
+    const unsigned char status_screen1_bmp[] PROGMEM = {
249
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
273
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
250
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
274
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
251
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
275
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
266
       0x1E, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x0F, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x7F, 0xFF, 0xE0,
290
       0x1E, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x0F, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x7F, 0xFF, 0xE0,
267
       0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00
291
       0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00
268
     };
292
     };
269
-  #endif // Extruders
293
+  #endif // HOTENDS
270
 #else
294
 #else
271
-  #if HOTENDS == 1
272
-    #define STATUS_SCREENWIDTH     115 //Width in pixels
273
-    #define STATUS_SCREENHEIGHT     19 //Height in pixels
274
-    #define STATUS_SCREENBYTEWIDTH  15 //Width in bytes
275
-    const unsigned char status_screen0_bmp[] PROGMEM = { //AVR-GCC, WinAVR
295
+  #if HOTENDS == 0
296
+    const unsigned char status_screen0_bmp[] PROGMEM = {
297
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
298
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
299
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
300
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20,
301
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20,
302
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0,
303
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0,
304
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
305
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
306
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
307
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
308
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0,
309
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0,
310
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20,
311
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20,
312
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
313
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
314
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
315
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
316
+    };
317
+    const unsigned char status_screen1_bmp[] PROGMEM = {
318
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
319
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
320
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
321
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20,
322
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
323
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
324
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0,
325
+      0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x63, 0xA0,
326
+      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0xF7, 0xA0,
327
+      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0xF7, 0xA0,
328
+      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x63, 0xA0,
329
+      0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0,
330
+      0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
331
+      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
332
+      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20,
333
+      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
334
+      0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
335
+      0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
336
+      0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
337
+    };
338
+  #elif HOTENDS == 1
339
+    const unsigned char status_screen0_bmp[] PROGMEM = {
276
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
340
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
277
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
341
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
278
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
342
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
294
       0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
358
       0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
295
     };
359
     };
296
 
360
 
297
-    #define STATUS_SCREENWIDTH     115 //Width in pixels
298
-    #define STATUS_SCREENHEIGHT     19 //Height in pixels
299
-    #define STATUS_SCREENBYTEWIDTH  15 //Width in bytes
300
-    const unsigned char status_screen1_bmp[] PROGMEM = { //AVR-GCC, WinAVR
361
+    const unsigned char status_screen1_bmp[] PROGMEM = {
301
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
362
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
302
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
363
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
303
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
364
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
319
       0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
380
       0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
320
     };
381
     };
321
   #elif HOTENDS == 2
382
   #elif HOTENDS == 2
322
-    #define STATUS_SCREENWIDTH     115 //Width in pixels
323
-    #define STATUS_SCREENHEIGHT     19 //Height in pixels
324
-    #define STATUS_SCREENBYTEWIDTH  15 //Width in bytes
325
-    const unsigned char status_screen0_bmp[] PROGMEM = { //AVR-GCC, WinAVR
383
+    const unsigned char status_screen0_bmp[] PROGMEM = {
326
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
384
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
327
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
385
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
328
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
386
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
344
       0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
402
       0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
345
     };
403
     };
346
 
404
 
347
-    #define STATUS_SCREENWIDTH     115 //Width in pixels
348
-    #define STATUS_SCREENHEIGHT     19 //Height in pixels
349
-    #define STATUS_SCREENBYTEWIDTH  15 //Width in bytes
350
-    const unsigned char status_screen1_bmp[] PROGMEM = { //AVR-GCC, WinAVR
405
+    const unsigned char status_screen1_bmp[] PROGMEM = {
351
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
406
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
352
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
407
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
353
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
408
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
369
       0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
424
       0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
370
     };
425
     };
371
   #else
426
   #else
372
-    #define STATUS_SCREENWIDTH     115 //Width in pixels
373
-    #define STATUS_SCREENHEIGHT     19 //Height in pixels
374
-    #define STATUS_SCREENBYTEWIDTH  15 //Width in bytes
375
-    const unsigned char status_screen0_bmp[] PROGMEM = { //AVR-GCC, WinAVR
427
+    const unsigned char status_screen0_bmp[] PROGMEM = {
376
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
428
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
377
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
429
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
378
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
430
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
394
       0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
446
       0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
395
     };
447
     };
396
 
448
 
397
-    #define STATUS_SCREENWIDTH     115 //Width in pixels
398
-    #define STATUS_SCREENHEIGHT     19 //Height in pixels
399
-    #define STATUS_SCREENBYTEWIDTH  15 //Width in bytes
400
-    const unsigned char status_screen1_bmp[] PROGMEM = { //AVR-GCC, WinAVR
449
+    const unsigned char status_screen1_bmp[] PROGMEM = {
401
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
450
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
402
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
451
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
403
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
452
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
418
       0x1E, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
467
       0x1E, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
419
       0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
468
       0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
420
     };
469
     };
421
-  #endif // Extruders
470
+  #endif // HOTENDS
471
+#endif // HAS_TEMP_BED
422
 
472
 
423
-  #if ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY)
424
-    const unsigned char cw_bmp[] PROGMEM = { //AVR-GCC, WinAVR
425
-      0x07,0xf8,0x00, // 000001111111100000000000
426
-      0x0c,0x0c,0x00, // 000011000000110000000000
427
-      0x10,0x02,0x00, // 000100000000001000000000
428
-      0x20,0x01,0x00, // 001000000000000100000000
429
-      0x60,0x01,0x80, // 011000000000000100000000
430
-      0x40,0x00,0x80, // 010000000000000010000000
431
-      0x40,0x03,0xe0, // 010000000000000011100000
432
-      0x40,0x01,0xc0, // 010000000000000011000000
433
-      0x40,0x00,0x80, // 010000000000000010000000
434
-      0x40,0x00,0x00, // 010000000000000000000000
435
-      0x40,0x00,0x00, // 010000000000000000000000
436
-      0x60,0x00,0x00, // 011000000000000000000000
437
-      0x20,0x00,0x00, // 001000000000000000000000
438
-      0x10,0x00,0x00, // 000100000000000000000000
439
-      0x0c,0x0c,0x00, // 000011000000110000000000
440
-      0x07,0xf8,0x00  // 000001111111100000000000
441
-    };
473
+#if ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY) || ENABLED(MESH_EDIT_GFX_OVERLAY)
442
 
474
 
443
-    const unsigned char ccw_bmp[] PROGMEM = { //AVR-GCC, WinAVR
444
-      0x01,0xfe,0x00, // 000000011111111000000000
445
-      0x03,0x03,0x00, // 000000110000001100000000
446
-      0x04,0x00,0x80, // 000001000000000010000000
447
-      0x08,0x00,0x40, // 000010000000000001000000
448
-      0x18,0x00,0x60, // 000110000000000001100000
449
-      0x10,0x00,0x20, // 000100000000000000100000
450
-      0x7c,0x00,0x20, // 011111000000000000100000
451
-      0x38,0x00,0x20, // 001110000000000000100000
452
-      0x10,0x00,0x20, // 000100000000000000100000
453
-      0x00,0x00,0x20, // 000000000000000000100000
454
-      0x00,0x00,0x20, // 000000000000000000100000
455
-      0x00,0x00,0x60, // 000000000000000001100000
456
-      0x00,0x00,0x40, // 000000000000000001000000
457
-      0x00,0x00,0x80, // 000000000000000010000000
458
-      0x03,0x03,0x00, // 000000110000001100000000
459
-      0x01,0xfe,0x00  // 000000011111111000000000
460
-    };
475
+  const unsigned char cw_bmp[] PROGMEM = {
476
+    0x03,0xF8,0x00, // 000000111111100000000000
477
+    0x0F,0xF7,0x00, // 000011111111111000000000
478
+    0x17,0x0F,0x00, // 000111100000111100000000
479
+    0x38,0x07,0x00, // 001110000000011100000000
480
+    0x38,0x03,0x80, // 001110000000001110000000
481
+    0x70,0x03,0x80, // 011100000000001110000000
482
+    0x70,0x0F,0xE0, // 011100000000111111100000
483
+    0x70,0x07,0xC0, // 011100000000011111000000
484
+    0x70,0x03,0x80, // 011100000000001110000000
485
+    0x70,0x01,0x00, // 011100000000000100000000
486
+    0x70,0x00,0x00, // 011100000000000000000000
487
+    0x68,0x00,0x00, // 001110000000000000000000
488
+    0x38,0x07,0x00, // 001110000000011100000000
489
+    0x17,0x0F,0x00, // 000111100000111100000000
490
+    0x0F,0xFE,0x00, // 000011111111111000000000
491
+    0x03,0xF8,0x00  // 000000111111100000000000
492
+  };
461
 
493
 
494
+  const unsigned char ccw_bmp[] PROGMEM = {
495
+    0x00,0xFE,0x00, // 000000001111111000000000
496
+    0x03,0xFF,0x80, // 000000111111111110000000
497
+    0x07,0x83,0xC0, // 000001111000001111000000
498
+    0x0E,0x01,0xC0, // 000011100000000111000000
499
+    0x0E,0x00,0xE0, // 000011100000000011100000
500
+    0x1C,0x00,0xE0, // 000111000000000011100000
501
+    0x7F,0x00,0xE0, // 011111110000000011100000
502
+    0x3E,0x00,0xE0, // 001111100000000011100000
503
+    0x1C,0x00,0xE0, // 000111000000000011100000
504
+    0x08,0x00,0xE0, // 000010000000000011100000
505
+    0x00,0x00,0xE0, // 000000000000000011100000
506
+    0x00,0x01,0xC0, // 000000000000000111000000
507
+    0x0E,0x01,0xC0, // 000011100000000111000000
508
+    0x0F,0x07,0x80, // 000011110000011110000000
509
+    0x07,0xFF,0x00, // 000001111111111100000000
510
+    0x01,0xFC,0x00  // 000000011111110000000000
511
+  };
462
 
512
 
463
-    const unsigned char up_arrow_bmp[] PROGMEM = { //AVR-GCC, WinAVR
464
-      0x06,0x00, // 000001100000
465
-      0x0F,0x00, // 000011110000
466
-      0x1F,0x80, // 000111111000
467
-      0x3F,0xC0, // 001111111100
468
-      0x06,0x00, // 000001100000
469
-      0x06,0x00, // 000001100000
470
-      0x06,0x00, // 000001100000
471
-      0x06,0x00, // 000001100000
472
-      0x06,0x00, // 000001100000
473
-      0x06,0x00, // 000001100000
474
-      0x06,0x00, // 000001100000
475
-      0x06,0x00, // 000001100000
476
-      0x06,0x00  // 000001100000
477
-    };
513
+  const unsigned char up_arrow_bmp[] PROGMEM = {
514
+    0x04,0x00, // 000001000000
515
+    0x0E,0x00, // 000011100000
516
+    0x1F,0x00, // 000111110000
517
+    0x3F,0x80, // 001111111000
518
+    0x7F,0xC0, // 011111111100
519
+    0x0E,0x00, // 000011100000
520
+    0x0E,0x00, // 000011100000
521
+    0x0E,0x00, // 000011100000
522
+    0x0E,0x00, // 000011100000
523
+    0x0E,0x00, // 000011100000
524
+    0x0E,0x00, // 000011100000
525
+    0x0E,0x00, // 000011100000
526
+    0x0E,0x00  // 000011100000
527
+  };
478
 
528
 
479
-    const unsigned char down_arrow_bmp[] PROGMEM = { //AVR-GCC, WinAVR
480
-      0x06,0x00, // 000001100000
481
-      0x06,0x00, // 000001100000
482
-      0x06,0x00, // 000001100000
483
-      0x06,0x00, // 000001100000
484
-      0x06,0x00, // 000001100000
485
-      0x06,0x00, // 000001100000
486
-      0x06,0x00, // 000001100000
487
-      0x06,0x00, // 000001100000
488
-      0x06,0x00, // 000001100000
489
-      0x3F,0xC0, // 001111111100
490
-      0x1F,0x80, // 000111111000
491
-      0x0F,0x00, // 000011110000
492
-      0x06,0x00  // 000001100000
493
-    };
529
+  const unsigned char down_arrow_bmp[] PROGMEM = {
530
+    0x0E,0x00, // 000011100000
531
+    0x0E,0x00, // 000011100000
532
+    0x0E,0x00, // 000011100000
533
+    0x0E,0x00, // 000011100000
534
+    0x0E,0x00, // 000011100000
535
+    0x0E,0x00, // 000011100000
536
+    0x0E,0x00, // 000011100000
537
+    0x0E,0x00, // 000011100000
538
+    0x7F,0xC0, // 011111111100
539
+    0x3F,0x80, // 001111111000
540
+    0x1F,0x00, // 000111110000
541
+    0x0E,0x00, // 000011100000
542
+    0x04,0x00  // 000001000000
543
+  };
494
 
544
 
495
-    const unsigned char offset_bedline_bmp[] PROGMEM = { //AVR-GCC, WinAVR
496
-      0xFF,0xFF,0xFF // 111111111111111111111111
497
-    };
545
+  const unsigned char offset_bedline_bmp[] PROGMEM = {
546
+    0xFF,0xFF,0xFF // 111111111111111111111111
547
+  };
498
 
548
 
499
-    const unsigned char nozzle_bmp[] PROGMEM = { //AVR-GCC, WinAVR
500
-      0x7F,0x80, // 0111111110000000
501
-      0xFF,0xC0, // 1111111111000000
502
-      0xFF,0xC0, // 1111111111000000
503
-      0xFF,0xC0, // 1111111111000000
504
-      0x7F,0x80, // 0111111110000000
505
-      0x7F,0x80, // 0111111110000000
506
-      0xFF,0xC0, // 1111111111000000
507
-      0xFF,0xC0, // 1111111111000000
508
-      0xFF,0xC0, // 1111111111000000
509
-      0x3F,0x00, // 0011111100000000
510
-      0x1E,0x00, // 0001111000000000
511
-      0x0C,0x00  // 0000110000000000
512
-    };
513
-  #endif // BABYSTEP_ZPROBE_GFX_OVERLAY
514
-#endif // HAS_TEMP_BED
549
+  const unsigned char nozzle_bmp[] PROGMEM = {
550
+    0x7F,0x80, // 0111111110000000
551
+    0xFF,0xC0, // 1111111111000000
552
+    0xFF,0xC0, // 1111111111000000
553
+    0xFF,0xC0, // 1111111111000000
554
+    0x7F,0x80, // 0111111110000000
555
+    0x7F,0x80, // 0111111110000000
556
+    0xFF,0xC0, // 1111111111000000
557
+    0xFF,0xC0, // 1111111111000000
558
+    0xFF,0xC0, // 1111111111000000
559
+    0x3F,0x00, // 0011111100000000
560
+    0x1E,0x00, // 0001111000000000
561
+    0x0C,0x00  // 0000110000000000
562
+  };
563
+#endif // BABYSTEP_ZPROBE_GFX_OVERLAY || MESH_EDIT_GFX_OVERLAY

+ 252
- 164
Marlin/dogm_font_data_ISO10646_1.h Переглянути файл

32
   Max Font    ascent = 8 descent=-1
32
   Max Font    ascent = 8 descent=-1
33
 */
33
 */
34
 #include <U8glib.h>
34
 #include <U8glib.h>
35
-const u8g_fntpgm_uint8_t ISO10646_1_5x7[2592] U8G_SECTION(".progmem.ISO10646_1_5x7") = {
36
-  0, 6, 9, 0, 254, 7, 1, 146, 3, 33, 32, 255, 255, 8, 255, 7,
37
-  255, 0, 0, 0, 6, 0, 0, 1, 7, 7, 6, 2, 0, 128, 128, 128,
38
-  128, 128, 0, 128, 3, 2, 2, 6, 1, 5, 160, 160, 5, 7, 7, 6,
39
-  0, 0, 80, 80, 248, 80, 248, 80, 80, 5, 7, 7, 6, 0, 0, 32,
40
-  120, 160, 112, 40, 240, 32, 5, 7, 7, 6, 0, 0, 192, 200, 16, 32,
41
-  64, 152, 24, 5, 7, 7, 6, 0, 0, 96, 144, 160, 64, 168, 144, 104,
42
-  2, 3, 3, 6, 1, 4, 192, 64, 128, 3, 7, 7, 6, 1, 0, 32,
43
-  64, 128, 128, 128, 64, 32, 3, 7, 7, 6, 1, 0, 128, 64, 32, 32,
44
-  32, 64, 128, 5, 5, 5, 6, 0, 1, 32, 168, 112, 168, 32, 5, 5,
45
-  5, 6, 0, 1, 32, 32, 248, 32, 32, 2, 3, 3, 6, 2, 255, 192,
46
-  64, 128, 5, 1, 1, 6, 0, 3, 248, 2, 2, 2, 6, 2, 0, 192,
47
-  192, 5, 5, 5, 6, 0, 1, 8, 16, 32, 64, 128, 5, 7, 7, 6,
48
-  0, 0, 112, 136, 136, 136, 136, 136, 112, 3, 7, 7, 6, 1, 0, 64,
49
-  192, 64, 64, 64, 64, 224, 5, 7, 7, 6, 0, 0, 112, 136, 8, 112,
50
-  128, 128, 248, 5, 7, 7, 6, 0, 0, 248, 16, 32, 16, 8, 8, 240,
51
-  5, 7, 7, 6, 0, 0, 16, 48, 80, 144, 248, 16, 16, 5, 7, 7,
52
-  6, 0, 0, 248, 128, 240, 8, 8, 136, 112, 5, 7, 7, 6, 0, 0,
53
-  112, 128, 128, 240, 136, 136, 112, 5, 7, 7, 6, 0, 0, 248, 8, 16,
54
-  32, 32, 32, 32, 5, 7, 7, 6, 0, 0, 112, 136, 136, 112, 136, 136,
55
-  112, 5, 7, 7, 6, 0, 0, 112, 136, 136, 120, 8, 8, 112, 2, 5,
56
-  5, 6, 2, 0, 192, 192, 0, 192, 192, 2, 6, 6, 6, 2, 255, 192,
57
-  192, 0, 192, 64, 128, 4, 7, 7, 6, 0, 0, 16, 32, 64, 128, 64,
58
-  32, 16, 5, 3, 3, 6, 0, 2, 248, 0, 248, 4, 7, 7, 6, 1,
59
-  0, 128, 64, 32, 16, 32, 64, 128, 5, 7, 7, 6, 0, 0, 112, 136,
60
-  8, 16, 32, 0, 32, 5, 7, 7, 6, 0, 0, 112, 136, 8, 104, 168,
61
-  168, 112, 5, 7, 7, 6, 0, 0, 112, 136, 136, 248, 136, 136, 136, 5,
62
-  7, 7, 6, 0, 0, 240, 136, 136, 240, 136, 136, 240, 5, 7, 7, 6,
63
-  0, 0, 112, 136, 128, 128, 128, 136, 112, 5, 7, 7, 6, 0, 0, 240,
64
-  136, 136, 136, 136, 136, 240, 5, 7, 7, 6, 0, 0, 248, 128, 128, 240,
65
-  128, 128, 248, 5, 7, 7, 6, 0, 0, 248, 128, 128, 240, 128, 128, 128,
66
-  5, 7, 7, 6, 0, 0, 112, 136, 128, 184, 136, 136, 112, 5, 7, 7,
67
-  6, 0, 0, 136, 136, 136, 248, 136, 136, 136, 1, 7, 7, 6, 2, 0,
68
-  128, 128, 128, 128, 128, 128, 128, 5, 7, 7, 6, 0, 0, 56, 16, 16,
69
-  16, 16, 144, 96, 5, 7, 7, 6, 0, 0, 136, 144, 160, 192, 160, 144,
70
-  136, 5, 7, 7, 6, 0, 0, 128, 128, 128, 128, 128, 128, 248, 5, 7,
71
-  7, 6, 0, 0, 136, 216, 168, 136, 136, 136, 136, 5, 7, 7, 6, 0,
72
-  0, 136, 136, 200, 168, 152, 136, 136, 5, 7, 7, 6, 0, 0, 112, 136,
73
-  136, 136, 136, 136, 112, 5, 7, 7, 6, 0, 0, 240, 136, 136, 240, 128,
74
-  128, 128, 5, 7, 7, 6, 0, 0, 112, 136, 136, 136, 168, 144, 104, 5,
75
-  7, 7, 6, 0, 0, 240, 136, 136, 240, 160, 144, 136, 5, 7, 7, 6,
76
-  0, 0, 120, 128, 128, 112, 8, 8, 240, 5, 7, 7, 6, 0, 0, 248,
77
-  32, 32, 32, 32, 32, 32, 5, 7, 7, 6, 0, 0, 136, 136, 136, 136,
78
-  136, 136, 112, 5, 7, 7, 6, 0, 0, 136, 136, 136, 136, 136, 80, 32,
79
-  5, 7, 7, 6, 0, 0, 136, 136, 136, 136, 136, 168, 80, 5, 7, 7,
80
-  6, 0, 0, 136, 136, 80, 32, 80, 136, 136, 5, 7, 7, 6, 0, 0,
81
-  136, 136, 136, 80, 32, 32, 32, 5, 7, 7, 6, 0, 0, 248, 8, 16,
82
-  32, 64, 128, 248, 3, 7, 7, 6, 1, 0, 224, 128, 128, 128, 128, 128,
83
-  224, 5, 5, 5, 6, 0, 1, 128, 64, 32, 16, 8, 3, 7, 7, 6,
84
-  1, 0, 224, 32, 32, 32, 32, 32, 224, 5, 3, 3, 6, 0, 4, 32,
85
-  80, 136, 5, 1, 1, 6, 0, 0, 248, 2, 2, 2, 6, 2, 5, 128,
86
-  64, 5, 5, 5, 6, 0, 0, 112, 8, 120, 136, 120, 5, 7, 7, 6,
87
-  0, 0, 128, 128, 176, 200, 136, 136, 240, 5, 5, 5, 6, 0, 0, 112,
88
-  128, 128, 136, 112, 5, 7, 7, 6, 0, 0, 8, 8, 104, 152, 136, 136,
89
-  120, 5, 5, 5, 6, 0, 0, 112, 136, 248, 128, 112, 5, 7, 7, 6,
90
-  0, 0, 48, 72, 224, 64, 64, 64, 64, 5, 6, 6, 6, 0, 255, 112,
91
-  136, 136, 120, 8, 112, 5, 7, 7, 6, 0, 0, 128, 128, 176, 200, 136,
92
-  136, 136, 1, 7, 7, 6, 2, 0, 128, 0, 128, 128, 128, 128, 128, 3,
93
-  8, 8, 6, 1, 255, 32, 0, 32, 32, 32, 32, 160, 64, 4, 7, 7,
94
-  6, 0, 0, 128, 128, 144, 160, 192, 160, 144, 3, 7, 7, 6, 1, 0,
95
-  192, 64, 64, 64, 64, 64, 224, 5, 5, 5, 6, 0, 0, 208, 168, 168,
96
-  168, 168, 5, 5, 5, 6, 0, 0, 176, 200, 136, 136, 136, 5, 5, 5,
97
-  6, 0, 0, 112, 136, 136, 136, 112, 5, 6, 6, 6, 0, 255, 240, 136,
98
-  136, 240, 128, 128, 5, 6, 6, 6, 0, 255, 120, 136, 136, 120, 8, 8,
99
-  5, 5, 5, 6, 0, 0, 176, 200, 128, 128, 128, 5, 5, 5, 6, 0,
100
-  0, 112, 128, 112, 8, 240, 4, 7, 7, 6, 0, 0, 64, 64, 224, 64,
101
-  64, 64, 48, 5, 5, 5, 6, 0, 0, 136, 136, 136, 152, 104, 5, 5,
102
-  5, 6, 0, 0, 136, 136, 136, 80, 32, 5, 5, 5, 6, 0, 0, 136,
103
-  136, 168, 168, 80, 5, 5, 5, 6, 0, 0, 136, 80, 32, 80, 136, 5,
104
-  6, 6, 6, 0, 255, 136, 136, 136, 120, 8, 112, 5, 5, 5, 6, 0,
105
-  0, 248, 16, 32, 64, 248, 3, 7, 7, 6, 1, 0, 32, 64, 64, 128,
106
-  64, 64, 32, 1, 7, 7, 6, 2, 0, 128, 128, 128, 128, 128, 128, 128,
107
-  3, 7, 7, 6, 1, 0, 128, 64, 64, 32, 64, 64, 128, 5, 2, 2,
108
-  6, 0, 2, 104, 144, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0,
109
-  0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0,
110
-  6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0,
111
-  0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0,
112
-  0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0,
113
-  6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0,
114
-  0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0,
115
-  0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0,
116
-  6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0,
117
-  0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0,
118
-  0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0,
119
-  6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0,
120
-  0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0,
121
-  0, 1, 7, 7, 6, 2, 0, 128, 0, 128, 128, 128, 128, 128, 5, 7,
122
-  7, 6, 0, 0, 32, 112, 168, 160, 168, 112, 32, 5, 7, 7, 6, 0,
123
-  0, 48, 64, 64, 224, 64, 80, 168, 5, 5, 5, 6, 0, 0, 136, 112,
124
-  80, 112, 136, 5, 7, 7, 6, 0, 0, 136, 80, 32, 248, 32, 248, 32,
125
-  1, 7, 7, 6, 2, 0, 128, 128, 128, 0, 128, 128, 128, 5, 8, 8,
126
-  6, 0, 0, 48, 72, 32, 80, 80, 32, 144, 96, 3, 1, 1, 6, 1,
127
-  7, 160, 5, 7, 7, 6, 0, 0, 248, 136, 184, 184, 184, 136, 248, 5,
128
-  7, 7, 6, 0, 1, 112, 8, 120, 136, 120, 0, 248, 5, 5, 5, 6,
129
-  0, 1, 40, 80, 160, 80, 40, 5, 3, 3, 6, 0, 1, 248, 8, 8,
130
-  2, 2, 2, 6, 2, 6, 64, 128, 5, 7, 7, 6, 0, 0, 248, 136,
131
-  168, 136, 152, 168, 248, 5, 1, 1, 6, 0, 6, 248, 4, 4, 4, 6,
132
-  0, 3, 96, 144, 144, 96, 5, 7, 7, 6, 0, 0, 32, 32, 248, 32,
133
-  32, 0, 248, 4, 5, 5, 6, 0, 3, 96, 144, 32, 64, 240, 3, 5,
134
-  5, 6, 0, 3, 224, 32, 224, 32, 224, 2, 2, 2, 6, 2, 6, 64,
135
-  128, 5, 8, 8, 6, 0, 255, 136, 136, 136, 136, 152, 232, 128, 128, 5,
136
-  7, 7, 6, 0, 0, 120, 152, 152, 120, 24, 24, 24, 2, 2, 2, 6,
137
-  2, 2, 192, 192, 2, 2, 2, 6, 2, 255, 64, 128, 3, 5, 5, 6,
138
-  0, 3, 64, 192, 64, 64, 224, 5, 7, 7, 6, 0, 1, 112, 136, 136,
139
-  136, 112, 0, 248, 5, 5, 5, 6, 0, 1, 160, 80, 40, 80, 160, 5,
140
-  7, 7, 6, 0, 0, 136, 144, 168, 88, 184, 8, 8, 5, 7, 7, 6,
141
-  0, 0, 136, 144, 184, 72, 152, 32, 56, 5, 8, 8, 6, 0, 0, 192,
142
-  64, 192, 72, 216, 56, 8, 8, 5, 7, 7, 6, 0, 0, 32, 0, 32,
143
-  64, 128, 136, 112, 5, 8, 8, 6, 0, 0, 64, 32, 0, 112, 136, 248,
144
-  136, 136, 5, 8, 8, 6, 0, 0, 16, 32, 0, 112, 136, 248, 136, 136,
145
-  5, 8, 8, 6, 0, 0, 32, 80, 0, 112, 136, 248, 136, 136, 5, 8,
146
-  8, 6, 0, 0, 104, 144, 0, 112, 136, 248, 136, 136, 5, 8, 8, 6,
147
-  0, 0, 80, 0, 112, 136, 136, 248, 136, 136, 5, 8, 8, 6, 0, 0,
148
-  32, 80, 32, 112, 136, 248, 136, 136, 5, 7, 7, 6, 0, 0, 56, 96,
149
-  160, 184, 224, 160, 184, 5, 8, 8, 6, 0, 255, 112, 136, 128, 128, 136,
150
-  112, 32, 96, 5, 8, 8, 6, 0, 0, 64, 32, 0, 248, 128, 240, 128,
151
-  248, 5, 8, 8, 6, 0, 0, 8, 16, 0, 248, 128, 240, 128, 248, 5,
152
-  8, 8, 6, 0, 0, 32, 80, 0, 248, 128, 240, 128, 248, 5, 7, 7,
153
-  6, 0, 0, 80, 0, 248, 128, 240, 128, 248, 3, 8, 8, 6, 1, 0,
154
-  128, 64, 0, 224, 64, 64, 64, 224, 3, 8, 8, 6, 1, 0, 32, 64,
155
-  0, 224, 64, 64, 64, 224, 3, 8, 8, 6, 1, 0, 64, 160, 0, 224,
156
-  64, 64, 64, 224, 3, 7, 7, 6, 1, 0, 160, 0, 224, 64, 64, 64,
157
-  224, 5, 7, 7, 6, 0, 0, 112, 72, 72, 232, 72, 72, 112, 5, 8,
158
-  8, 6, 0, 0, 104, 144, 0, 136, 200, 168, 152, 136, 5, 8, 8, 6,
159
-  0, 0, 64, 32, 112, 136, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0,
160
-  16, 32, 112, 136, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 32, 80,
161
-  0, 112, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 104, 144, 0, 112,
162
-  136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 80, 0, 112, 136, 136, 136,
163
-  136, 112, 5, 5, 5, 6, 0, 1, 136, 80, 32, 80, 136, 5, 8, 8,
164
-  6, 0, 255, 16, 112, 168, 168, 168, 168, 112, 64, 5, 8, 8, 6, 0,
165
-  0, 64, 32, 136, 136, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 16,
166
-  32, 136, 136, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 32, 80, 0,
167
-  136, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 80, 0, 136, 136, 136,
168
-  136, 136, 112, 5, 8, 8, 6, 0, 0, 16, 32, 136, 80, 32, 32, 32,
169
-  32, 5, 9, 9, 6, 0, 255, 192, 64, 112, 72, 72, 112, 64, 64, 224,
170
-  4, 8, 8, 6, 1, 255, 96, 144, 144, 160, 144, 144, 224, 128, 5, 8,
171
-  8, 6, 0, 0, 64, 32, 0, 112, 8, 120, 136, 120, 5, 8, 8, 6,
172
-  0, 0, 16, 32, 0, 112, 8, 120, 136, 120, 5, 8, 8, 6, 0, 0,
173
-  32, 80, 0, 112, 8, 120, 136, 120, 5, 8, 8, 6, 0, 0, 104, 144,
174
-  0, 112, 8, 120, 136, 120, 5, 7, 7, 6, 0, 0, 80, 0, 112, 8,
175
-  120, 136, 120, 5, 8, 8, 6, 0, 0, 32, 80, 32, 112, 8, 120, 136,
176
-  120, 5, 6, 6, 6, 0, 0, 208, 40, 120, 160, 168, 80, 5, 6, 6,
177
-  6, 0, 255, 112, 128, 136, 112, 32, 96, 5, 8, 8, 6, 0, 0, 64,
178
-  32, 0, 112, 136, 248, 128, 112, 5, 8, 8, 6, 0, 0, 16, 32, 0,
179
-  112, 136, 248, 128, 112, 5, 8, 8, 6, 0, 0, 32, 80, 0, 112, 136,
180
-  248, 128, 112, 5, 7, 7, 6, 0, 0, 80, 0, 112, 136, 248, 128, 112,
181
-  3, 8, 8, 6, 1, 0, 128, 64, 0, 64, 192, 64, 64, 224, 3, 8,
182
-  8, 6, 1, 0, 32, 64, 0, 64, 192, 64, 64, 224, 3, 8, 8, 6,
183
-  1, 0, 64, 160, 0, 64, 192, 64, 64, 224, 3, 7, 7, 6, 1, 0,
184
-  160, 0, 64, 192, 64, 64, 224, 5, 7, 7, 6, 0, 0, 160, 64, 160,
185
-  16, 120, 136, 112, 5, 8, 8, 6, 0, 0, 104, 144, 0, 176, 200, 136,
186
-  136, 136, 5, 8, 8, 6, 0, 0, 64, 32, 0, 112, 136, 136, 136, 112,
187
-  5, 8, 8, 6, 0, 0, 16, 32, 0, 112, 136, 136, 136, 112, 5, 8,
188
-  8, 6, 0, 0, 32, 80, 0, 112, 136, 136, 136, 112, 5, 8, 8, 6,
189
-  0, 0, 104, 144, 0, 112, 136, 136, 136, 112, 5, 7, 7, 6, 0, 0,
190
-  80, 0, 112, 136, 136, 136, 112, 5, 5, 5, 6, 0, 1, 32, 0, 248,
191
-  0, 32, 5, 7, 7, 6, 0, 255, 16, 112, 168, 168, 168, 112, 64, 5,
192
-  8, 8, 6, 0, 0, 64, 32, 0, 136, 136, 136, 152, 104, 5, 8, 8,
193
-  6, 0, 0, 16, 32, 0, 136, 136, 136, 152, 104, 5, 8, 8, 6, 0,
194
-  0, 32, 80, 0, 136, 136, 136, 152, 104, 5, 7, 7, 6, 0, 0, 80,
195
-  0, 136, 136, 136, 152, 104, 5, 9, 9, 6, 0, 255, 16, 32, 0, 136,
196
-  136, 136, 248, 8, 112, 4, 7, 7, 6, 1, 255, 192, 64, 96, 80, 96,
197
-  64, 224, 5, 8, 8, 6, 0, 255, 80, 0, 136, 136, 136, 120, 8, 112
198
-};
35
+
36
+#if defined(__AVR__) && ENABLED(NOT_EXTENDED_ISO10646_1_5X7)
37
+
38
+  //
39
+  // Reduced font (only symbols 32 - 127) - About 1400 bytes smaller
40
+  //
41
+  const u8g_fntpgm_uint8_t ISO10646_1_5x7[] U8G_SECTION(".progmem.ISO10646_1_5x7") = {
42
+    0,6,9,0,254,7,1,146,3,33,32,127,255,7,255,7,
43
+    255,0,0,0,6,0,0,1,7,7,6,2,0,128,128,128,
44
+    128,128,0,128,3,2,2,6,1,5,160,160,5,7,7,6,
45
+    0,0,80,80,248,80,248,80,80,5,7,7,6,0,0,32,
46
+    120,160,112,40,240,32,5,7,7,6,0,0,192,200,16,32,
47
+    64,152,24,5,7,7,6,0,0,96,144,160,64,168,144,104,
48
+    2,3,3,6,1,4,192,64,128,3,7,7,6,1,0,32,
49
+    64,128,128,128,64,32,3,7,7,6,1,0,128,64,32,32,
50
+    32,64,128,5,5,5,6,0,1,32,168,112,168,32,5,5,
51
+    5,6,0,1,32,32,248,32,32,2,3,3,6,2,255,192,
52
+    64,128,5,1,1,6,0,3,248,2,2,2,6,2,0,192,
53
+    192,5,5,5,6,0,1,8,16,32,64,128,5,7,7,6,
54
+    0,0,112,136,136,136,136,136,112,3,7,7,6,1,0,64,
55
+    192,64,64,64,64,224,5,7,7,6,0,0,112,136,8,112,
56
+    128,128,248,5,7,7,6,0,0,248,16,32,16,8,8,240,
57
+    5,7,7,6,0,0,16,48,80,144,248,16,16,5,7,7,
58
+    6,0,0,248,128,240,8,8,136,112,5,7,7,6,0,0,
59
+    112,128,128,240,136,136,112,5,7,7,6,0,0,248,8,16,
60
+    32,32,32,32,5,7,7,6,0,0,112,136,136,112,136,136,
61
+    112,5,7,7,6,0,0,112,136,136,120,8,8,112,2,5,
62
+    5,6,2,0,192,192,0,192,192,2,6,6,6,2,255,192,
63
+    192,0,192,64,128,4,7,7,6,0,0,16,32,64,128,64,
64
+    32,16,5,3,3,6,0,2,248,0,248,4,7,7,6,1,
65
+    0,128,64,32,16,32,64,128,5,7,7,6,0,0,112,136,
66
+    8,16,32,0,32,5,7,7,6,0,0,112,136,8,104,168,
67
+    168,112,5,7,7,6,0,0,112,136,136,248,136,136,136,5,
68
+    7,7,6,0,0,240,136,136,240,136,136,240,5,7,7,6,
69
+    0,0,112,136,128,128,128,136,112,5,7,7,6,0,0,240,
70
+    136,136,136,136,136,240,5,7,7,6,0,0,248,128,128,240,
71
+    128,128,248,5,7,7,6,0,0,248,128,128,240,128,128,128,
72
+    5,7,7,6,0,0,112,136,128,184,136,136,112,5,7,7,
73
+    6,0,0,136,136,136,248,136,136,136,1,7,7,6,2,0,
74
+    128,128,128,128,128,128,128,5,7,7,6,0,0,56,16,16,
75
+    16,16,144,96,5,7,7,6,0,0,136,144,160,192,160,144,
76
+    136,5,7,7,6,0,0,128,128,128,128,128,128,248,5,7,
77
+    7,6,0,0,136,216,168,136,136,136,136,5,7,7,6,0,
78
+    0,136,136,200,168,152,136,136,5,7,7,6,0,0,112,136,
79
+    136,136,136,136,112,5,7,7,6,0,0,240,136,136,240,128,
80
+    128,128,5,7,7,6,0,0,112,136,136,136,168,144,104,5,
81
+    7,7,6,0,0,240,136,136,240,160,144,136,5,7,7,6,
82
+    0,0,120,128,128,112,8,8,240,5,7,7,6,0,0,248,
83
+    32,32,32,32,32,32,5,7,7,6,0,0,136,136,136,136,
84
+    136,136,112,5,7,7,6,0,0,136,136,136,136,136,80,32,
85
+    5,7,7,6,0,0,136,136,136,136,136,168,80,5,7,7,
86
+    6,0,0,136,136,80,32,80,136,136,5,7,7,6,0,0,
87
+    136,136,136,80,32,32,32,5,7,7,6,0,0,248,8,16,
88
+    32,64,128,248,3,7,7,6,1,0,224,128,128,128,128,128,
89
+    224,5,5,5,6,0,1,128,64,32,16,8,3,7,7,6,
90
+    1,0,224,32,32,32,32,32,224,5,3,3,6,0,4,32,
91
+    80,136,5,1,1,6,0,0,248,2,2,2,6,2,5,128,
92
+    64,5,5,5,6,0,0,112,8,120,136,120,5,7,7,6,
93
+    0,0,128,128,176,200,136,136,240,5,5,5,6,0,0,112,
94
+    128,128,136,112,5,7,7,6,0,0,8,8,104,152,136,136,
95
+    120,5,5,5,6,0,0,112,136,248,128,112,5,7,7,6,
96
+    0,0,48,72,224,64,64,64,64,5,6,6,6,0,255,112,
97
+    136,136,120,8,112,5,7,7,6,0,0,128,128,176,200,136,
98
+    136,136,1,7,7,6,2,0,128,0,128,128,128,128,128,3,
99
+    8,8,6,1,255,32,0,32,32,32,32,160,64,4,7,7,
100
+    6,0,0,128,128,144,160,192,160,144,3,7,7,6,1,0,
101
+    192,64,64,64,64,64,224,5,5,5,6,0,0,208,168,168,
102
+    168,168,5,5,5,6,0,0,176,200,136,136,136,5,5,5,
103
+    6,0,0,112,136,136,136,112,5,6,6,6,0,255,240,136,
104
+    136,240,128,128,5,6,6,6,0,255,120,136,136,120,8,8,
105
+    5,5,5,6,0,0,176,200,128,128,128,5,5,5,6,0,
106
+    0,112,128,112,8,240,4,7,7,6,0,0,64,64,224,64,
107
+    64,64,48,5,5,5,6,0,0,136,136,136,152,104,5,5,
108
+    5,6,0,0,136,136,136,80,32,5,5,5,6,0,0,136,
109
+    136,168,168,80,5,5,5,6,0,0,136,80,32,80,136,5,
110
+    6,6,6,0,255,136,136,136,120,8,112,5,5,5,6,0,
111
+    0,248,16,32,64,248,3,7,7,6,1,0,32,64,64,128,
112
+    64,64,32,1,7,7,6,2,0,128,128,128,128,128,128,128,
113
+    3,7,7,6,1,0,128,64,64,32,64,64,128,5,2,2,
114
+    6,0,2,104,144,0,0,0,6,0,0};
115
+
116
+#else
117
+
118
+  //
119
+  // Extended (original) font (symbols 32 - 255)
120
+  //
121
+  const u8g_fntpgm_uint8_t ISO10646_1_5x7[] U8G_SECTION(".progmem.ISO10646_1_5x7") = {
122
+    0, 6, 9, 0, 254, 7, 1, 146, 3, 33, 32, 255, 255, 8, 255, 7,
123
+    255, 0, 0, 0, 6, 0, 0, 1, 7, 7, 6, 2, 0, 128, 128, 128,
124
+    128, 128, 0, 128, 3, 2, 2, 6, 1, 5, 160, 160, 5, 7, 7, 6,
125
+    0, 0, 80, 80, 248, 80, 248, 80, 80, 5, 7, 7, 6, 0, 0, 32,
126
+    120, 160, 112, 40, 240, 32, 5, 7, 7, 6, 0, 0, 192, 200, 16, 32,
127
+    64, 152, 24, 5, 7, 7, 6, 0, 0, 96, 144, 160, 64, 168, 144, 104,
128
+    2, 3, 3, 6, 1, 4, 192, 64, 128, 3, 7, 7, 6, 1, 0, 32,
129
+    64, 128, 128, 128, 64, 32, 3, 7, 7, 6, 1, 0, 128, 64, 32, 32,
130
+    32, 64, 128, 5, 5, 5, 6, 0, 1, 32, 168, 112, 168, 32, 5, 5,
131
+    5, 6, 0, 1, 32, 32, 248, 32, 32, 2, 3, 3, 6, 2, 255, 192,
132
+    64, 128, 5, 1, 1, 6, 0, 3, 248, 2, 2, 2, 6, 2, 0, 192,
133
+    192, 5, 5, 5, 6, 0, 1, 8, 16, 32, 64, 128, 5, 7, 7, 6,
134
+    0, 0, 112, 136, 136, 136, 136, 136, 112, 3, 7, 7, 6, 1, 0, 64,
135
+    192, 64, 64, 64, 64, 224, 5, 7, 7, 6, 0, 0, 112, 136, 8, 112,
136
+    128, 128, 248, 5, 7, 7, 6, 0, 0, 248, 16, 32, 16, 8, 8, 240,
137
+    5, 7, 7, 6, 0, 0, 16, 48, 80, 144, 248, 16, 16, 5, 7, 7,
138
+    6, 0, 0, 248, 128, 240, 8, 8, 136, 112, 5, 7, 7, 6, 0, 0,
139
+    112, 128, 128, 240, 136, 136, 112, 5, 7, 7, 6, 0, 0, 248, 8, 16,
140
+    32, 32, 32, 32, 5, 7, 7, 6, 0, 0, 112, 136, 136, 112, 136, 136,
141
+    112, 5, 7, 7, 6, 0, 0, 112, 136, 136, 120, 8, 8, 112, 2, 5,
142
+    5, 6, 2, 0, 192, 192, 0, 192, 192, 2, 6, 6, 6, 2, 255, 192,
143
+    192, 0, 192, 64, 128, 4, 7, 7, 6, 0, 0, 16, 32, 64, 128, 64,
144
+    32, 16, 5, 3, 3, 6, 0, 2, 248, 0, 248, 4, 7, 7, 6, 1,
145
+    0, 128, 64, 32, 16, 32, 64, 128, 5, 7, 7, 6, 0, 0, 112, 136,
146
+    8, 16, 32, 0, 32, 5, 7, 7, 6, 0, 0, 112, 136, 8, 104, 168,
147
+    168, 112, 5, 7, 7, 6, 0, 0, 112, 136, 136, 248, 136, 136, 136, 5,
148
+    7, 7, 6, 0, 0, 240, 136, 136, 240, 136, 136, 240, 5, 7, 7, 6,
149
+    0, 0, 112, 136, 128, 128, 128, 136, 112, 5, 7, 7, 6, 0, 0, 240,
150
+    136, 136, 136, 136, 136, 240, 5, 7, 7, 6, 0, 0, 248, 128, 128, 240,
151
+    128, 128, 248, 5, 7, 7, 6, 0, 0, 248, 128, 128, 240, 128, 128, 128,
152
+    5, 7, 7, 6, 0, 0, 112, 136, 128, 184, 136, 136, 112, 5, 7, 7,
153
+    6, 0, 0, 136, 136, 136, 248, 136, 136, 136, 1, 7, 7, 6, 2, 0,
154
+    128, 128, 128, 128, 128, 128, 128, 5, 7, 7, 6, 0, 0, 56, 16, 16,
155
+    16, 16, 144, 96, 5, 7, 7, 6, 0, 0, 136, 144, 160, 192, 160, 144,
156
+    136, 5, 7, 7, 6, 0, 0, 128, 128, 128, 128, 128, 128, 248, 5, 7,
157
+    7, 6, 0, 0, 136, 216, 168, 136, 136, 136, 136, 5, 7, 7, 6, 0,
158
+    0, 136, 136, 200, 168, 152, 136, 136, 5, 7, 7, 6, 0, 0, 112, 136,
159
+    136, 136, 136, 136, 112, 5, 7, 7, 6, 0, 0, 240, 136, 136, 240, 128,
160
+    128, 128, 5, 7, 7, 6, 0, 0, 112, 136, 136, 136, 168, 144, 104, 5,
161
+    7, 7, 6, 0, 0, 240, 136, 136, 240, 160, 144, 136, 5, 7, 7, 6,
162
+    0, 0, 120, 128, 128, 112, 8, 8, 240, 5, 7, 7, 6, 0, 0, 248,
163
+    32, 32, 32, 32, 32, 32, 5, 7, 7, 6, 0, 0, 136, 136, 136, 136,
164
+    136, 136, 112, 5, 7, 7, 6, 0, 0, 136, 136, 136, 136, 136, 80, 32,
165
+    5, 7, 7, 6, 0, 0, 136, 136, 136, 136, 136, 168, 80, 5, 7, 7,
166
+    6, 0, 0, 136, 136, 80, 32, 80, 136, 136, 5, 7, 7, 6, 0, 0,
167
+    136, 136, 136, 80, 32, 32, 32, 5, 7, 7, 6, 0, 0, 248, 8, 16,
168
+    32, 64, 128, 248, 3, 7, 7, 6, 1, 0, 224, 128, 128, 128, 128, 128,
169
+    224, 5, 5, 5, 6, 0, 1, 128, 64, 32, 16, 8, 3, 7, 7, 6,
170
+    1, 0, 224, 32, 32, 32, 32, 32, 224, 5, 3, 3, 6, 0, 4, 32,
171
+    80, 136, 5, 1, 1, 6, 0, 0, 248, 2, 2, 2, 6, 2, 5, 128,
172
+    64, 5, 5, 5, 6, 0, 0, 112, 8, 120, 136, 120, 5, 7, 7, 6,
173
+    0, 0, 128, 128, 176, 200, 136, 136, 240, 5, 5, 5, 6, 0, 0, 112,
174
+    128, 128, 136, 112, 5, 7, 7, 6, 0, 0, 8, 8, 104, 152, 136, 136,
175
+    120, 5, 5, 5, 6, 0, 0, 112, 136, 248, 128, 112, 5, 7, 7, 6,
176
+    0, 0, 48, 72, 224, 64, 64, 64, 64, 5, 6, 6, 6, 0, 255, 112,
177
+    136, 136, 120, 8, 112, 5, 7, 7, 6, 0, 0, 128, 128, 176, 200, 136,
178
+    136, 136, 1, 7, 7, 6, 2, 0, 128, 0, 128, 128, 128, 128, 128, 3,
179
+    8, 8, 6, 1, 255, 32, 0, 32, 32, 32, 32, 160, 64, 4, 7, 7,
180
+    6, 0, 0, 128, 128, 144, 160, 192, 160, 144, 3, 7, 7, 6, 1, 0,
181
+    192, 64, 64, 64, 64, 64, 224, 5, 5, 5, 6, 0, 0, 208, 168, 168,
182
+    168, 168, 5, 5, 5, 6, 0, 0, 176, 200, 136, 136, 136, 5, 5, 5,
183
+    6, 0, 0, 112, 136, 136, 136, 112, 5, 6, 6, 6, 0, 255, 240, 136,
184
+    136, 240, 128, 128, 5, 6, 6, 6, 0, 255, 120, 136, 136, 120, 8, 8,
185
+    5, 5, 5, 6, 0, 0, 176, 200, 128, 128, 128, 5, 5, 5, 6, 0,
186
+    0, 112, 128, 112, 8, 240, 4, 7, 7, 6, 0, 0, 64, 64, 224, 64,
187
+    64, 64, 48, 5, 5, 5, 6, 0, 0, 136, 136, 136, 152, 104, 5, 5,
188
+    5, 6, 0, 0, 136, 136, 136, 80, 32, 5, 5, 5, 6, 0, 0, 136,
189
+    136, 168, 168, 80, 5, 5, 5, 6, 0, 0, 136, 80, 32, 80, 136, 5,
190
+    6, 6, 6, 0, 255, 136, 136, 136, 120, 8, 112, 5, 5, 5, 6, 0,
191
+    0, 248, 16, 32, 64, 248, 3, 7, 7, 6, 1, 0, 32, 64, 64, 128,
192
+    64, 64, 32, 1, 7, 7, 6, 2, 0, 128, 128, 128, 128, 128, 128, 128,
193
+    3, 7, 7, 6, 1, 0, 128, 64, 64, 32, 64, 64, 128, 5, 2, 2,
194
+    6, 0, 2, 104, 144, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0,
195
+    0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0,
196
+    6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0,
197
+    0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0,
198
+    0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0,
199
+    6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0,
200
+    0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0,
201
+    0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0,
202
+    6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0,
203
+    0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0,
204
+    0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0,
205
+    6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0,
206
+    0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0,
207
+    0, 1, 7, 7, 6, 2, 0, 128, 0, 128, 128, 128, 128, 128, 5, 7,
208
+    7, 6, 0, 0, 32, 112, 168, 160, 168, 112, 32, 5, 7, 7, 6, 0,
209
+    0, 48, 64, 64, 224, 64, 80, 168, 5, 5, 5, 6, 0, 0, 136, 112,
210
+    80, 112, 136, 5, 7, 7, 6, 0, 0, 136, 80, 32, 248, 32, 248, 32,
211
+    1, 7, 7, 6, 2, 0, 128, 128, 128, 0, 128, 128, 128, 5, 8, 8,
212
+    6, 0, 0, 48, 72, 32, 80, 80, 32, 144, 96, 3, 1, 1, 6, 1,
213
+    7, 160, 5, 7, 7, 6, 0, 0, 248, 136, 184, 184, 184, 136, 248, 5,
214
+    7, 7, 6, 0, 1, 112, 8, 120, 136, 120, 0, 248, 5, 5, 5, 6,
215
+    0, 1, 40, 80, 160, 80, 40, 5, 3, 3, 6, 0, 1, 248, 8, 8,
216
+    2, 2, 2, 6, 2, 6, 64, 128, 5, 7, 7, 6, 0, 0, 248, 136,
217
+    168, 136, 152, 168, 248, 5, 1, 1, 6, 0, 6, 248, 4, 4, 4, 6,
218
+    0, 3, 96, 144, 144, 96, 5, 7, 7, 6, 0, 0, 32, 32, 248, 32,
219
+    32, 0, 248, 4, 5, 5, 6, 0, 3, 96, 144, 32, 64, 240, 3, 5,
220
+    5, 6, 0, 3, 224, 32, 224, 32, 224, 2, 2, 2, 6, 2, 6, 64,
221
+    128, 5, 8, 8, 6, 0, 255, 136, 136, 136, 136, 152, 232, 128, 128, 5,
222
+    7, 7, 6, 0, 0, 120, 152, 152, 120, 24, 24, 24, 2, 2, 2, 6,
223
+    2, 2, 192, 192, 2, 2, 2, 6, 2, 255, 64, 128, 3, 5, 5, 6,
224
+    0, 3, 64, 192, 64, 64, 224, 5, 7, 7, 6, 0, 1, 112, 136, 136,
225
+    136, 112, 0, 248, 5, 5, 5, 6, 0, 1, 160, 80, 40, 80, 160, 5,
226
+    7, 7, 6, 0, 0, 136, 144, 168, 88, 184, 8, 8, 5, 7, 7, 6,
227
+    0, 0, 136, 144, 184, 72, 152, 32, 56, 5, 8, 8, 6, 0, 0, 192,
228
+    64, 192, 72, 216, 56, 8, 8, 5, 7, 7, 6, 0, 0, 32, 0, 32,
229
+    64, 128, 136, 112, 5, 8, 8, 6, 0, 0, 64, 32, 0, 112, 136, 248,
230
+    136, 136, 5, 8, 8, 6, 0, 0, 16, 32, 0, 112, 136, 248, 136, 136,
231
+    5, 8, 8, 6, 0, 0, 32, 80, 0, 112, 136, 248, 136, 136, 5, 8,
232
+    8, 6, 0, 0, 104, 144, 0, 112, 136, 248, 136, 136, 5, 8, 8, 6,
233
+    0, 0, 80, 0, 112, 136, 136, 248, 136, 136, 5, 8, 8, 6, 0, 0,
234
+    32, 80, 32, 112, 136, 248, 136, 136, 5, 7, 7, 6, 0, 0, 56, 96,
235
+    160, 184, 224, 160, 184, 5, 8, 8, 6, 0, 255, 112, 136, 128, 128, 136,
236
+    112, 32, 96, 5, 8, 8, 6, 0, 0, 64, 32, 0, 248, 128, 240, 128,
237
+    248, 5, 8, 8, 6, 0, 0, 8, 16, 0, 248, 128, 240, 128, 248, 5,
238
+    8, 8, 6, 0, 0, 32, 80, 0, 248, 128, 240, 128, 248, 5, 7, 7,
239
+    6, 0, 0, 80, 0, 248, 128, 240, 128, 248, 3, 8, 8, 6, 1, 0,
240
+    128, 64, 0, 224, 64, 64, 64, 224, 3, 8, 8, 6, 1, 0, 32, 64,
241
+    0, 224, 64, 64, 64, 224, 3, 8, 8, 6, 1, 0, 64, 160, 0, 224,
242
+    64, 64, 64, 224, 3, 7, 7, 6, 1, 0, 160, 0, 224, 64, 64, 64,
243
+    224, 5, 7, 7, 6, 0, 0, 112, 72, 72, 232, 72, 72, 112, 5, 8,
244
+    8, 6, 0, 0, 104, 144, 0, 136, 200, 168, 152, 136, 5, 8, 8, 6,
245
+    0, 0, 64, 32, 112, 136, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0,
246
+    16, 32, 112, 136, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 32, 80,
247
+    0, 112, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 104, 144, 0, 112,
248
+    136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 80, 0, 112, 136, 136, 136,
249
+    136, 112, 5, 5, 5, 6, 0, 1, 136, 80, 32, 80, 136, 5, 8, 8,
250
+    6, 0, 255, 16, 112, 168, 168, 168, 168, 112, 64, 5, 8, 8, 6, 0,
251
+    0, 64, 32, 136, 136, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 16,
252
+    32, 136, 136, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 32, 80, 0,
253
+    136, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 80, 0, 136, 136, 136,
254
+    136, 136, 112, 5, 8, 8, 6, 0, 0, 16, 32, 136, 80, 32, 32, 32,
255
+    32, 5, 9, 9, 6, 0, 255, 192, 64, 112, 72, 72, 112, 64, 64, 224,
256
+    4, 8, 8, 6, 1, 255, 96, 144, 144, 160, 144, 144, 224, 128, 5, 8,
257
+    8, 6, 0, 0, 64, 32, 0, 112, 8, 120, 136, 120, 5, 8, 8, 6,
258
+    0, 0, 16, 32, 0, 112, 8, 120, 136, 120, 5, 8, 8, 6, 0, 0,
259
+    32, 80, 0, 112, 8, 120, 136, 120, 5, 8, 8, 6, 0, 0, 104, 144,
260
+    0, 112, 8, 120, 136, 120, 5, 7, 7, 6, 0, 0, 80, 0, 112, 8,
261
+    120, 136, 120, 5, 8, 8, 6, 0, 0, 32, 80, 32, 112, 8, 120, 136,
262
+    120, 5, 6, 6, 6, 0, 0, 208, 40, 120, 160, 168, 80, 5, 6, 6,
263
+    6, 0, 255, 112, 128, 136, 112, 32, 96, 5, 8, 8, 6, 0, 0, 64,
264
+    32, 0, 112, 136, 248, 128, 112, 5, 8, 8, 6, 0, 0, 16, 32, 0,
265
+    112, 136, 248, 128, 112, 5, 8, 8, 6, 0, 0, 32, 80, 0, 112, 136,
266
+    248, 128, 112, 5, 7, 7, 6, 0, 0, 80, 0, 112, 136, 248, 128, 112,
267
+    3, 8, 8, 6, 1, 0, 128, 64, 0, 64, 192, 64, 64, 224, 3, 8,
268
+    8, 6, 1, 0, 32, 64, 0, 64, 192, 64, 64, 224, 3, 8, 8, 6,
269
+    1, 0, 64, 160, 0, 64, 192, 64, 64, 224, 3, 7, 7, 6, 1, 0,
270
+    160, 0, 64, 192, 64, 64, 224, 5, 7, 7, 6, 0, 0, 160, 64, 160,
271
+    16, 120, 136, 112, 5, 8, 8, 6, 0, 0, 104, 144, 0, 176, 200, 136,
272
+    136, 136, 5, 8, 8, 6, 0, 0, 64, 32, 0, 112, 136, 136, 136, 112,
273
+    5, 8, 8, 6, 0, 0, 16, 32, 0, 112, 136, 136, 136, 112, 5, 8,
274
+    8, 6, 0, 0, 32, 80, 0, 112, 136, 136, 136, 112, 5, 8, 8, 6,
275
+    0, 0, 104, 144, 0, 112, 136, 136, 136, 112, 5, 7, 7, 6, 0, 0,
276
+    80, 0, 112, 136, 136, 136, 112, 5, 5, 5, 6, 0, 1, 32, 0, 248,
277
+    0, 32, 5, 7, 7, 6, 0, 255, 16, 112, 168, 168, 168, 112, 64, 5,
278
+    8, 8, 6, 0, 0, 64, 32, 0, 136, 136, 136, 152, 104, 5, 8, 8,
279
+    6, 0, 0, 16, 32, 0, 136, 136, 136, 152, 104, 5, 8, 8, 6, 0,
280
+    0, 32, 80, 0, 136, 136, 136, 152, 104, 5, 7, 7, 6, 0, 0, 80,
281
+    0, 136, 136, 136, 152, 104, 5, 9, 9, 6, 0, 255, 16, 32, 0, 136,
282
+    136, 136, 248, 8, 112, 4, 7, 7, 6, 1, 255, 192, 64, 96, 80, 96,
283
+    64, 224, 5, 8, 8, 6, 0, 255, 80, 0, 136, 136, 136, 120, 8, 112
284
+  };
285
+
286
+#endif

+ 49
- 9
Marlin/endstop_interrupts.h Переглянути файл

111
 void setup_endstop_interrupts( void ) {
111
 void setup_endstop_interrupts( void ) {
112
 
112
 
113
   #if HAS_X_MAX
113
   #if HAS_X_MAX
114
-    #if (digitalPinToInterrupt(X_MAX_PIN) != NOT_AN_INTERRUPT) // if pin has an external interrupt
114
+    #if digitalPinToInterrupt(X_MAX_PIN) != NOT_AN_INTERRUPT // if pin has an external interrupt
115
       attachInterrupt(digitalPinToInterrupt(X_MAX_PIN), endstop_ISR, CHANGE); // assign it
115
       attachInterrupt(digitalPinToInterrupt(X_MAX_PIN), endstop_ISR, CHANGE); // assign it
116
     #else
116
     #else
117
       // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
117
       // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
121
   #endif
121
   #endif
122
 
122
 
123
   #if HAS_X_MIN
123
   #if HAS_X_MIN
124
-    #if (digitalPinToInterrupt(X_MIN_PIN) != NOT_AN_INTERRUPT)
124
+    #if digitalPinToInterrupt(X_MIN_PIN) != NOT_AN_INTERRUPT
125
       attachInterrupt(digitalPinToInterrupt(X_MIN_PIN), endstop_ISR, CHANGE);
125
       attachInterrupt(digitalPinToInterrupt(X_MIN_PIN), endstop_ISR, CHANGE);
126
     #else
126
     #else
127
       // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
127
       // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
131
   #endif
131
   #endif
132
 
132
 
133
   #if HAS_Y_MAX
133
   #if HAS_Y_MAX
134
-    #if (digitalPinToInterrupt(Y_MAX_PIN) != NOT_AN_INTERRUPT)
134
+    #if digitalPinToInterrupt(Y_MAX_PIN) != NOT_AN_INTERRUPT
135
       attachInterrupt(digitalPinToInterrupt(Y_MAX_PIN), endstop_ISR, CHANGE);
135
       attachInterrupt(digitalPinToInterrupt(Y_MAX_PIN), endstop_ISR, CHANGE);
136
     #else
136
     #else
137
       // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
137
       // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
141
   #endif
141
   #endif
142
 
142
 
143
   #if HAS_Y_MIN
143
   #if HAS_Y_MIN
144
-    #if (digitalPinToInterrupt(Y_MIN_PIN) != NOT_AN_INTERRUPT)
144
+    #if digitalPinToInterrupt(Y_MIN_PIN) != NOT_AN_INTERRUPT
145
       attachInterrupt(digitalPinToInterrupt(Y_MIN_PIN), endstop_ISR, CHANGE);
145
       attachInterrupt(digitalPinToInterrupt(Y_MIN_PIN), endstop_ISR, CHANGE);
146
     #else
146
     #else
147
       // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
147
       // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
151
   #endif
151
   #endif
152
 
152
 
153
   #if HAS_Z_MAX
153
   #if HAS_Z_MAX
154
-    #if (digitalPinToInterrupt(Z_MAX_PIN) != NOT_AN_INTERRUPT)
154
+    #if digitalPinToInterrupt(Z_MAX_PIN) != NOT_AN_INTERRUPT
155
       attachInterrupt(digitalPinToInterrupt(Z_MAX_PIN), endstop_ISR, CHANGE);
155
       attachInterrupt(digitalPinToInterrupt(Z_MAX_PIN), endstop_ISR, CHANGE);
156
     #else
156
     #else
157
       // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
157
       // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
161
   #endif
161
   #endif
162
 
162
 
163
   #if HAS_Z_MIN
163
   #if HAS_Z_MIN
164
-    #if (digitalPinToInterrupt(Z_MIN_PIN) != NOT_AN_INTERRUPT)
164
+    #if digitalPinToInterrupt(Z_MIN_PIN) != NOT_AN_INTERRUPT
165
       attachInterrupt(digitalPinToInterrupt(Z_MIN_PIN), endstop_ISR, CHANGE);
165
       attachInterrupt(digitalPinToInterrupt(Z_MIN_PIN), endstop_ISR, CHANGE);
166
     #else
166
     #else
167
       // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
167
       // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
170
     #endif
170
     #endif
171
   #endif
171
   #endif
172
 
172
 
173
+  #if HAS_X2_MAX
174
+    #if (digitalPinToInterrupt(X2_MAX_PIN) != NOT_AN_INTERRUPT)
175
+      attachInterrupt(digitalPinToInterrupt(X2_MAX_PIN), endstop_ISR, CHANGE);
176
+    #else
177
+      // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
178
+      static_assert(digitalPinToPCICR(X2_MAX_PIN) != NULL, "X2_MAX_PIN is not interrupt-capable");
179
+      pciSetup(X2_MAX_PIN);
180
+    #endif
181
+  #endif
182
+
183
+  #if HAS_X2_MIN
184
+    #if (digitalPinToInterrupt(X2_MIN_PIN) != NOT_AN_INTERRUPT)
185
+      attachInterrupt(digitalPinToInterrupt(X2_MIN_PIN), endstop_ISR, CHANGE);
186
+    #else
187
+      // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
188
+      static_assert(digitalPinToPCICR(X2_MIN_PIN) != NULL, "X2_MIN_PIN is not interrupt-capable");
189
+      pciSetup(X2_MIN_PIN);
190
+    #endif
191
+  #endif
192
+
193
+  #if HAS_Y2_MAX
194
+    #if (digitalPinToInterrupt(Y2_MAX_PIN) != NOT_AN_INTERRUPT)
195
+      attachInterrupt(digitalPinToInterrupt(Y2_MAX_PIN), endstop_ISR, CHANGE);
196
+    #else
197
+      // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
198
+      static_assert(digitalPinToPCICR(Y2_MAX_PIN) != NULL, "Y2_MAX_PIN is not interrupt-capable");
199
+      pciSetup(Y2_MAX_PIN);
200
+    #endif
201
+  #endif
202
+
203
+  #if HAS_Y2_MIN
204
+    #if (digitalPinToInterrupt(Y2_MIN_PIN) != NOT_AN_INTERRUPT)
205
+      attachInterrupt(digitalPinToInterrupt(Y2_MIN_PIN), endstop_ISR, CHANGE);
206
+    #else
207
+      // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
208
+      static_assert(digitalPinToPCICR(Y2_MIN_PIN) != NULL, "Y2_MIN_PIN is not interrupt-capable");
209
+      pciSetup(Y2_MIN_PIN);
210
+    #endif
211
+  #endif
212
+
173
   #if HAS_Z2_MAX
213
   #if HAS_Z2_MAX
174
-    #if (digitalPinToInterrupt(Z2_MAX_PIN) != NOT_AN_INTERRUPT)
214
+    #if digitalPinToInterrupt(Z2_MAX_PIN) != NOT_AN_INTERRUPT
175
       attachInterrupt(digitalPinToInterrupt(Z2_MAX_PIN), endstop_ISR, CHANGE);
215
       attachInterrupt(digitalPinToInterrupt(Z2_MAX_PIN), endstop_ISR, CHANGE);
176
     #else
216
     #else
177
       // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
217
       // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
181
   #endif
221
   #endif
182
 
222
 
183
   #if HAS_Z2_MIN
223
   #if HAS_Z2_MIN
184
-    #if (digitalPinToInterrupt(Z2_MIN_PIN) != NOT_AN_INTERRUPT)
224
+    #if digitalPinToInterrupt(Z2_MIN_PIN) != NOT_AN_INTERRUPT
185
       attachInterrupt(digitalPinToInterrupt(Z2_MIN_PIN), endstop_ISR, CHANGE);
225
       attachInterrupt(digitalPinToInterrupt(Z2_MIN_PIN), endstop_ISR, CHANGE);
186
     #else
226
     #else
187
       // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
227
       // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
191
   #endif
231
   #endif
192
 
232
 
193
   #if HAS_Z_MIN_PROBE_PIN
233
   #if HAS_Z_MIN_PROBE_PIN
194
-    #if (digitalPinToInterrupt(Z_MIN_PROBE_PIN) != NOT_AN_INTERRUPT)
234
+    #if digitalPinToInterrupt(Z_MIN_PROBE_PIN) != NOT_AN_INTERRUPT
195
       attachInterrupt(digitalPinToInterrupt(Z_MIN_PROBE_PIN), endstop_ISR, CHANGE);
235
       attachInterrupt(digitalPinToInterrupt(Z_MIN_PROBE_PIN), endstop_ISR, CHANGE);
196
     #else
236
     #else
197
       // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
237
       // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!

+ 131
- 48
Marlin/endstops.cpp Переглянути файл

41
 bool Endstops::enabled, Endstops::enabled_globally; // Initialized by settings.load()
41
 bool Endstops::enabled, Endstops::enabled_globally; // Initialized by settings.load()
42
 volatile char Endstops::endstop_hit_bits; // use X_MIN, Y_MIN, Z_MIN and Z_MIN_PROBE as BIT value
42
 volatile char Endstops::endstop_hit_bits; // use X_MIN, Y_MIN, Z_MIN and Z_MIN_PROBE as BIT value
43
 
43
 
44
-#if ENABLED(Z_DUAL_ENDSTOPS)
44
+#if ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || ENABLED(Z_DUAL_ENDSTOPS)
45
   uint16_t
45
   uint16_t
46
 #else
46
 #else
47
   byte
47
   byte
67
     #endif
67
     #endif
68
   #endif
68
   #endif
69
 
69
 
70
+  #if HAS_X2_MIN
71
+    #if ENABLED(ENDSTOPPULLUP_XMIN)
72
+      SET_INPUT_PULLUP(X2_MIN_PIN);
73
+    #else
74
+      SET_INPUT(X2_MIN_PIN);
75
+    #endif
76
+  #endif
77
+
70
   #if HAS_Y_MIN
78
   #if HAS_Y_MIN
71
     #if ENABLED(ENDSTOPPULLUP_YMIN)
79
     #if ENABLED(ENDSTOPPULLUP_YMIN)
72
       SET_INPUT_PULLUP(Y_MIN_PIN);
80
       SET_INPUT_PULLUP(Y_MIN_PIN);
75
     #endif
83
     #endif
76
   #endif
84
   #endif
77
 
85
 
86
+  #if HAS_Y2_MIN
87
+    #if ENABLED(ENDSTOPPULLUP_YMIN)
88
+      SET_INPUT_PULLUP(Y2_MIN_PIN);
89
+    #else
90
+      SET_INPUT(Y2_MIN_PIN);
91
+    #endif
92
+  #endif
93
+
78
   #if HAS_Z_MIN
94
   #if HAS_Z_MIN
79
     #if ENABLED(ENDSTOPPULLUP_ZMIN)
95
     #if ENABLED(ENDSTOPPULLUP_ZMIN)
80
       SET_INPUT_PULLUP(Z_MIN_PIN);
96
       SET_INPUT_PULLUP(Z_MIN_PIN);
99
     #endif
115
     #endif
100
   #endif
116
   #endif
101
 
117
 
118
+  #if HAS_X2_MAX
119
+    #if ENABLED(ENDSTOPPULLUP_XMAX)
120
+      SET_INPUT_PULLUP(X2_MAX_PIN);
121
+    #else
122
+      SET_INPUT(X2_MAX_PIN);
123
+    #endif
124
+  #endif
125
+
102
   #if HAS_Y_MAX
126
   #if HAS_Y_MAX
103
     #if ENABLED(ENDSTOPPULLUP_YMAX)
127
     #if ENABLED(ENDSTOPPULLUP_YMAX)
104
       SET_INPUT_PULLUP(Y_MAX_PIN);
128
       SET_INPUT_PULLUP(Y_MAX_PIN);
107
     #endif
131
     #endif
108
   #endif
132
   #endif
109
 
133
 
134
+  #if HAS_Y2_MAX
135
+    #if ENABLED(ENDSTOPPULLUP_YMAX)
136
+      SET_INPUT_PULLUP(Y2_MAX_PIN);
137
+    #else
138
+      SET_INPUT(Y2_MAX_PIN);
139
+    #endif
140
+  #endif
141
+
110
   #if HAS_Z_MAX
142
   #if HAS_Z_MAX
111
     #if ENABLED(ENDSTOPPULLUP_ZMAX)
143
     #if ENABLED(ENDSTOPPULLUP_ZMAX)
112
       SET_INPUT_PULLUP(Z_MAX_PIN);
144
       SET_INPUT_PULLUP(Z_MAX_PIN);
185
 
217
 
186
 void Endstops::M119() {
218
 void Endstops::M119() {
187
   SERIAL_PROTOCOLLNPGM(MSG_M119_REPORT);
219
   SERIAL_PROTOCOLLNPGM(MSG_M119_REPORT);
220
+  #define ES_REPORT(AXIS) do{ \
221
+    SERIAL_PROTOCOLPGM(MSG_##AXIS); \
222
+    SERIAL_PROTOCOLLN(((READ(AXIS##_PIN)^AXIS##_ENDSTOP_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN)); \
223
+  }while(0)
188
   #if HAS_X_MIN
224
   #if HAS_X_MIN
189
-    SERIAL_PROTOCOLPGM(MSG_X_MIN);
190
-    SERIAL_PROTOCOLLN(((READ(X_MIN_PIN)^X_MIN_ENDSTOP_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN));
225
+    ES_REPORT(X_MIN);
226
+  #endif
227
+  #if HAS_X2_MIN
228
+    ES_REPORT(X2_MIN);
191
   #endif
229
   #endif
192
   #if HAS_X_MAX
230
   #if HAS_X_MAX
193
-    SERIAL_PROTOCOLPGM(MSG_X_MAX);
194
-    SERIAL_PROTOCOLLN(((READ(X_MAX_PIN)^X_MAX_ENDSTOP_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN));
231
+    ES_REPORT(X_MAX);
232
+  #endif
233
+  #if HAS_X2_MAX
234
+    ES_REPORT(X2_MAX);
195
   #endif
235
   #endif
196
   #if HAS_Y_MIN
236
   #if HAS_Y_MIN
197
-    SERIAL_PROTOCOLPGM(MSG_Y_MIN);
198
-    SERIAL_PROTOCOLLN(((READ(Y_MIN_PIN)^Y_MIN_ENDSTOP_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN));
237
+    ES_REPORT(Y_MIN);
238
+  #endif
239
+  #if HAS_Y2_MIN
240
+    ES_REPORT(Y2_MIN);
199
   #endif
241
   #endif
200
   #if HAS_Y_MAX
242
   #if HAS_Y_MAX
201
-    SERIAL_PROTOCOLPGM(MSG_Y_MAX);
202
-    SERIAL_PROTOCOLLN(((READ(Y_MAX_PIN)^Y_MAX_ENDSTOP_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN));
243
+    ES_REPORT(Y_MAX);
244
+  #endif
245
+  #if HAS_Y2_MAX
246
+    ES_REPORT(Y2_MAX);
203
   #endif
247
   #endif
204
   #if HAS_Z_MIN
248
   #if HAS_Z_MIN
205
-    SERIAL_PROTOCOLPGM(MSG_Z_MIN);
206
-    SERIAL_PROTOCOLLN(((READ(Z_MIN_PIN)^Z_MIN_ENDSTOP_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN));
249
+    ES_REPORT(Z_MIN);
207
   #endif
250
   #endif
208
   #if HAS_Z2_MIN
251
   #if HAS_Z2_MIN
209
-    SERIAL_PROTOCOLPGM(MSG_Z2_MIN);
210
-    SERIAL_PROTOCOLLN(((READ(Z2_MIN_PIN)^Z2_MIN_ENDSTOP_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN));
252
+    ES_REPORT(Z2_MIN);
211
   #endif
253
   #endif
212
   #if HAS_Z_MAX
254
   #if HAS_Z_MAX
213
-    SERIAL_PROTOCOLPGM(MSG_Z_MAX);
214
-    SERIAL_PROTOCOLLN(((READ(Z_MAX_PIN)^Z_MAX_ENDSTOP_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN));
255
+    ES_REPORT(Z_MAX);
215
   #endif
256
   #endif
216
   #if HAS_Z2_MAX
257
   #if HAS_Z2_MAX
217
-    SERIAL_PROTOCOLPGM(MSG_Z2_MAX);
218
-    SERIAL_PROTOCOLLN(((READ(Z2_MAX_PIN)^Z2_MAX_ENDSTOP_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN));
258
+    ES_REPORT(Z2_MAX);
219
   #endif
259
   #endif
220
   #if ENABLED(Z_MIN_PROBE_ENDSTOP)
260
   #if ENABLED(Z_MIN_PROBE_ENDSTOP)
221
     SERIAL_PROTOCOLPGM(MSG_Z_PROBE);
261
     SERIAL_PROTOCOLPGM(MSG_Z_PROBE);
227
   #endif
267
   #endif
228
 } // Endstops::M119
268
 } // Endstops::M119
229
 
269
 
270
+#if ENABLED(X_DUAL_ENDSTOPS)
271
+  void Endstops::test_dual_x_endstops(const EndstopEnum es1, const EndstopEnum es2) {
272
+    byte x_test = TEST_ENDSTOP(es1) | (TEST_ENDSTOP(es2) << 1); // bit 0 for X, bit 1 for X2
273
+    if (x_test && stepper.current_block->steps[X_AXIS] > 0) {
274
+      SBI(endstop_hit_bits, X_MIN);
275
+      if (!stepper.performing_homing || (x_test == 0x3))  //if not performing home or if both endstops were trigged during homing...
276
+        stepper.kill_current_block();
277
+    }
278
+  }
279
+#endif
280
+#if ENABLED(Y_DUAL_ENDSTOPS)
281
+  void Endstops::test_dual_y_endstops(const EndstopEnum es1, const EndstopEnum es2) {
282
+    byte y_test = TEST_ENDSTOP(es1) | (TEST_ENDSTOP(es2) << 1); // bit 0 for Y, bit 1 for Y2
283
+    if (y_test && stepper.current_block->steps[Y_AXIS] > 0) {
284
+      SBI(endstop_hit_bits, Y_MIN);
285
+      if (!stepper.performing_homing || (y_test == 0x3))  //if not performing home or if both endstops were trigged during homing...
286
+        stepper.kill_current_block();
287
+    }
288
+  }
289
+#endif
230
 #if ENABLED(Z_DUAL_ENDSTOPS)
290
 #if ENABLED(Z_DUAL_ENDSTOPS)
231
-
232
-  // Pass the result of the endstop test
233
   void Endstops::test_dual_z_endstops(const EndstopEnum es1, const EndstopEnum es2) {
291
   void Endstops::test_dual_z_endstops(const EndstopEnum es1, const EndstopEnum es2) {
234
     byte z_test = TEST_ENDSTOP(es1) | (TEST_ENDSTOP(es2) << 1); // bit 0 for Z, bit 1 for Z2
292
     byte z_test = TEST_ENDSTOP(es1) | (TEST_ENDSTOP(es2) << 1); // bit 0 for Z, bit 1 for Z2
235
     if (z_test && stepper.current_block->steps[Z_AXIS] > 0) {
293
     if (z_test && stepper.current_block->steps[Z_AXIS] > 0) {
238
         stepper.kill_current_block();
296
         stepper.kill_current_block();
239
     }
297
     }
240
   }
298
   }
241
-
242
 #endif
299
 #endif
243
 
300
 
244
 // Check endstops - Called from ISR!
301
 // Check endstops - Called from ISR!
260
         _ENDSTOP_HIT(AXIS, MINMAX); \
317
         _ENDSTOP_HIT(AXIS, MINMAX); \
261
         stepper.endstop_triggered(_AXIS(AXIS)); \
318
         stepper.endstop_triggered(_AXIS(AXIS)); \
262
       } \
319
       } \
263
-    } while(0)
320
+    }while(0)
264
 
321
 
265
   #if ENABLED(G38_PROBE_TARGET) && PIN_EXISTS(Z_MIN_PROBE) && !(CORE_IS_XY || CORE_IS_XZ)
322
   #if ENABLED(G38_PROBE_TARGET) && PIN_EXISTS(Z_MIN_PROBE) && !(CORE_IS_XY || CORE_IS_XZ)
266
     // If G38 command is active check Z_MIN_PROBE for ALL movement
323
     // If G38 command is active check Z_MIN_PROBE for ALL movement
357
   /**
414
   /**
358
    * Check and update endstops according to conditions
415
    * Check and update endstops according to conditions
359
    */
416
    */
360
-
361
   if (X_MOVE_TEST) {
417
   if (X_MOVE_TEST) {
362
-    if (stepper.motor_direction(X_AXIS_HEAD)) {
363
-      if (X_MIN_TEST) { // -direction
364
-        #if HAS_X_MIN
365
-          UPDATE_ENDSTOP(X, MIN);
418
+    if (stepper.motor_direction(X_AXIS_HEAD)) { // -direction
419
+      #if HAS_X_MIN
420
+        #if ENABLED(X_DUAL_ENDSTOPS)
421
+          UPDATE_ENDSTOP_BIT(X, MIN);
422
+          #if HAS_X2_MIN
423
+            UPDATE_ENDSTOP_BIT(X2, MIN);
424
+          #else
425
+            COPY_BIT(current_endstop_bits, X_MIN, X2_MIN);
426
+          #endif
427
+          test_dual_x_endstops(X_MIN, X2_MIN);
428
+        #else
429
+          if (X_MIN_TEST) UPDATE_ENDSTOP(X, MIN);
366
         #endif
430
         #endif
367
-      }
431
+      #endif
368
     }
432
     }
369
-    else if (X_MAX_TEST) { // +direction
433
+    else { // +direction
370
       #if HAS_X_MAX
434
       #if HAS_X_MAX
371
-        UPDATE_ENDSTOP(X, MAX);
435
+        #if ENABLED(X_DUAL_ENDSTOPS)
436
+          UPDATE_ENDSTOP_BIT(X, MAX);
437
+          #if HAS_X2_MAX
438
+            UPDATE_ENDSTOP_BIT(X2, MAX);
439
+          #else
440
+            COPY_BIT(current_endstop_bits, X_MAX, X2_MAX);
441
+          #endif
442
+          test_dual_x_endstops(X_MAX, X2_MAX);
443
+        #else
444
+          if (X_MIN_TEST) UPDATE_ENDSTOP(X, MAX);
445
+        #endif
446
+
372
       #endif
447
       #endif
373
     }
448
     }
374
   }
449
   }
376
   if (Y_MOVE_TEST) {
451
   if (Y_MOVE_TEST) {
377
     if (stepper.motor_direction(Y_AXIS_HEAD)) { // -direction
452
     if (stepper.motor_direction(Y_AXIS_HEAD)) { // -direction
378
       #if HAS_Y_MIN
453
       #if HAS_Y_MIN
379
-        UPDATE_ENDSTOP(Y, MIN);
454
+        #if ENABLED(Y_DUAL_ENDSTOPS)
455
+          UPDATE_ENDSTOP_BIT(Y, MIN);
456
+          #if HAS_Y2_MIN
457
+            UPDATE_ENDSTOP_BIT(Y2, MIN);
458
+          #else
459
+            COPY_BIT(current_endstop_bits, Y_MIN, Y2_MIN);
460
+          #endif
461
+          test_dual_y_endstops(Y_MIN, Y2_MIN);
462
+        #else
463
+          UPDATE_ENDSTOP(Y, MIN);
464
+        #endif
380
       #endif
465
       #endif
381
     }
466
     }
382
     else { // +direction
467
     else { // +direction
383
       #if HAS_Y_MAX
468
       #if HAS_Y_MAX
384
-        UPDATE_ENDSTOP(Y, MAX);
469
+        #if ENABLED(Y_DUAL_ENDSTOPS)
470
+          UPDATE_ENDSTOP_BIT(Y, MAX);
471
+          #if HAS_Y2_MAX
472
+            UPDATE_ENDSTOP_BIT(Y2, MAX);
473
+          #else
474
+            COPY_BIT(current_endstop_bits, Y_MAX, Y2_MAX);
475
+          #endif
476
+          test_dual_y_endstops(Y_MAX, Y2_MAX);
477
+        #else
478
+          UPDATE_ENDSTOP(Y, MAX);
479
+        #endif
385
       #endif
480
       #endif
386
     }
481
     }
387
   }
482
   }
390
     if (stepper.motor_direction(Z_AXIS_HEAD)) { // Z -direction. Gantry down, bed up.
485
     if (stepper.motor_direction(Z_AXIS_HEAD)) { // Z -direction. Gantry down, bed up.
391
       #if HAS_Z_MIN
486
       #if HAS_Z_MIN
392
         #if ENABLED(Z_DUAL_ENDSTOPS)
487
         #if ENABLED(Z_DUAL_ENDSTOPS)
393
-
394
           UPDATE_ENDSTOP_BIT(Z, MIN);
488
           UPDATE_ENDSTOP_BIT(Z, MIN);
395
           #if HAS_Z2_MIN
489
           #if HAS_Z2_MIN
396
             UPDATE_ENDSTOP_BIT(Z2, MIN);
490
             UPDATE_ENDSTOP_BIT(Z2, MIN);
397
           #else
491
           #else
398
             COPY_BIT(current_endstop_bits, Z_MIN, Z2_MIN);
492
             COPY_BIT(current_endstop_bits, Z_MIN, Z2_MIN);
399
           #endif
493
           #endif
400
-
401
           test_dual_z_endstops(Z_MIN, Z2_MIN);
494
           test_dual_z_endstops(Z_MIN, Z2_MIN);
402
-
403
-        #else // !Z_DUAL_ENDSTOPS
404
-
495
+        #else
405
           #if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
496
           #if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
406
             if (z_probe_enabled) UPDATE_ENDSTOP(Z, MIN);
497
             if (z_probe_enabled) UPDATE_ENDSTOP(Z, MIN);
407
           #else
498
           #else
408
             UPDATE_ENDSTOP(Z, MIN);
499
             UPDATE_ENDSTOP(Z, MIN);
409
           #endif
500
           #endif
410
-
411
-        #endif // !Z_DUAL_ENDSTOPS
412
-
413
-      #endif // HAS_Z_MIN
501
+        #endif
502
+      #endif
414
 
503
 
415
       // When closing the gap check the enabled probe
504
       // When closing the gap check the enabled probe
416
       #if ENABLED(Z_MIN_PROBE_ENDSTOP)
505
       #if ENABLED(Z_MIN_PROBE_ENDSTOP)
422
     }
511
     }
423
     else { // Z +direction. Gantry up, bed down.
512
     else { // Z +direction. Gantry up, bed down.
424
       #if HAS_Z_MAX
513
       #if HAS_Z_MAX
425
-
426
         // Check both Z dual endstops
514
         // Check both Z dual endstops
427
         #if ENABLED(Z_DUAL_ENDSTOPS)
515
         #if ENABLED(Z_DUAL_ENDSTOPS)
428
-
429
           UPDATE_ENDSTOP_BIT(Z, MAX);
516
           UPDATE_ENDSTOP_BIT(Z, MAX);
430
           #if HAS_Z2_MAX
517
           #if HAS_Z2_MAX
431
             UPDATE_ENDSTOP_BIT(Z2, MAX);
518
             UPDATE_ENDSTOP_BIT(Z2, MAX);
432
           #else
519
           #else
433
             COPY_BIT(current_endstop_bits, Z_MAX, Z2_MAX);
520
             COPY_BIT(current_endstop_bits, Z_MAX, Z2_MAX);
434
           #endif
521
           #endif
435
-
436
           test_dual_z_endstops(Z_MAX, Z2_MAX);
522
           test_dual_z_endstops(Z_MAX, Z2_MAX);
437
-
438
         // If this pin is not hijacked for the bed probe
523
         // If this pin is not hijacked for the bed probe
439
         // then it belongs to the Z endstop
524
         // then it belongs to the Z endstop
440
         #elif DISABLED(Z_MIN_PROBE_ENDSTOP) || Z_MAX_PIN != Z_MIN_PROBE_PIN
525
         #elif DISABLED(Z_MIN_PROBE_ENDSTOP) || Z_MAX_PIN != Z_MIN_PROBE_PIN
441
-
442
           UPDATE_ENDSTOP(Z, MAX);
526
           UPDATE_ENDSTOP(Z, MAX);
443
-
444
-        #endif // !Z_MIN_PROBE_PIN...
445
-      #endif // Z_MAX_PIN
527
+        #endif
528
+      #endif
446
     }
529
     }
447
   }
530
   }
448
 
531
 

+ 17
- 2
Marlin/endstops.h Переглянути файл

28
 #define ENDSTOPS_H
28
 #define ENDSTOPS_H
29
 
29
 
30
 #include "enum.h"
30
 #include "enum.h"
31
+#include "MarlinConfig.h"
31
 
32
 
32
 class Endstops {
33
 class Endstops {
33
 
34
 
36
     static bool enabled, enabled_globally;
37
     static bool enabled, enabled_globally;
37
     static volatile char endstop_hit_bits; // use X_MIN, Y_MIN, Z_MIN and Z_MIN_PROBE as BIT value
38
     static volatile char endstop_hit_bits; // use X_MIN, Y_MIN, Z_MIN and Z_MIN_PROBE as BIT value
38
 
39
 
39
-    #if ENABLED(Z_DUAL_ENDSTOPS)
40
+    #if ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || ENABLED(Z_DUAL_ENDSTOPS)
40
       static uint16_t
41
       static uint16_t
41
     #else
42
     #else
42
       static byte
43
       static byte
43
     #endif
44
     #endif
44
         current_endstop_bits, old_endstop_bits;
45
         current_endstop_bits, old_endstop_bits;
45
 
46
 
46
-    Endstops() {};
47
+    Endstops() {
48
+      enable_globally(
49
+        #if ENABLED(ENDSTOPS_ALWAYS_ON_DEFAULT)
50
+          true
51
+        #else
52
+          false
53
+        #endif
54
+      );
55
+    };
47
 
56
 
48
     /**
57
     /**
49
      * Initialize the endstop pins
58
      * Initialize the endstop pins
85
 
94
 
86
   private:
95
   private:
87
 
96
 
97
+    #if ENABLED(X_DUAL_ENDSTOPS)
98
+      static void test_dual_x_endstops(const EndstopEnum es1, const EndstopEnum es2);
99
+    #endif
100
+    #if ENABLED(Y_DUAL_ENDSTOPS)
101
+      static void test_dual_y_endstops(const EndstopEnum es1, const EndstopEnum es2);
102
+    #endif
88
     #if ENABLED(Z_DUAL_ENDSTOPS)
103
     #if ENABLED(Z_DUAL_ENDSTOPS)
89
       static void test_dual_z_endstops(const EndstopEnum es1, const EndstopEnum es2);
104
       static void test_dual_z_endstops(const EndstopEnum es1, const EndstopEnum es2);
90
     #endif
105
     #endif

+ 4
- 0
Marlin/enum.h Переглянути файл

93
   X_MAX,
93
   X_MAX,
94
   Y_MAX,
94
   Y_MAX,
95
   Z_MAX,
95
   Z_MAX,
96
+  X2_MIN,
97
+  X2_MAX,
98
+  Y2_MIN,
99
+  Y2_MAX,
96
   Z2_MIN,
100
   Z2_MIN,
97
   Z2_MAX
101
   Z2_MAX
98
 };
102
 };

+ 159
- 90
Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h Переглянути файл

37
  */
37
  */
38
 #ifndef CONFIGURATION_H
38
 #ifndef CONFIGURATION_H
39
 #define CONFIGURATION_H
39
 #define CONFIGURATION_H
40
-#define CONFIGURATION_H_VERSION 010100
40
+#define CONFIGURATION_H_VERSION 010107
41
 
41
 
42
 //===========================================================================
42
 //===========================================================================
43
 //============================= Getting Started =============================
43
 //============================= Getting Started =============================
136
 // :[1, 2, 3, 4, 5]
136
 // :[1, 2, 3, 4, 5]
137
 #define EXTRUDERS 1
137
 #define EXTRUDERS 1
138
 
138
 
139
+// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
140
+#define DEFAULT_NOMINAL_FILAMENT_DIA 3.0
141
+
139
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
142
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
140
 //#define SINGLENOZZLE
143
 //#define SINGLENOZZLE
141
 
144
 
336
 
339
 
337
 // Comment the following line to disable PID and enable bang-bang.
340
 // Comment the following line to disable PID and enable bang-bang.
338
 #define PIDTEMP
341
 #define PIDTEMP
339
-#define BANG_MAX 70 // limits current to nozzle while in bang-bang mode; 255=full current
340
-#define PID_MAX 74 // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
342
+#define BANG_MAX 70      // Limits current to nozzle while in bang-bang mode; 255=full current
343
+#define PID_MAX  74      // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
344
+#define PID_K1 0.95      // Smoothing factor within the PID
341
 #if ENABLED(PIDTEMP)
345
 #if ENABLED(PIDTEMP)
342
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
346
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
343
   //#define PID_DEBUG // Sends debug data to the serial port.
347
   //#define PID_DEBUG // Sends debug data to the serial port.
347
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
351
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
348
   #define PID_FUNCTIONAL_RANGE 16 // If the temperature difference between the target temperature and the actual temperature
352
   #define PID_FUNCTIONAL_RANGE 16 // If the temperature difference between the target temperature and the actual temperature
349
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
353
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
350
-  #define K1 0.95 //smoothing factor within the PID
351
 
354
 
352
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
355
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
353
   // Buda 2.0 on 24V
356
   // Buda 2.0 on 24V
448
 //===========================================================================
451
 //===========================================================================
449
 
452
 
450
 /**
453
 /**
451
- * Thermal Protection protects your printer from damage and fire if a
452
- * thermistor falls out or temperature sensors fail in any way.
454
+ * Thermal Protection provides additional protection to your printer from damage
455
+ * and fire. Marlin always includes safe min and max temperature ranges which
456
+ * protect against a broken or disconnected thermistor wire.
453
  *
457
  *
454
- * The issue: If a thermistor falls out or a temperature sensor fails,
455
- * Marlin can no longer sense the actual temperature. Since a disconnected
456
- * thermistor reads as a low temperature, the firmware will keep the heater on.
458
+ * The issue: If a thermistor falls out, it will report the much lower
459
+ * temperature of the air in the room, and the the firmware will keep
460
+ * the heater on.
457
  *
461
  *
458
  * If you get "Thermal Runaway" or "Heating failed" errors the
462
  * If you get "Thermal Runaway" or "Heating failed" errors the
459
  * details can be tuned in Configuration_adv.h
463
  * details can be tuned in Configuration_adv.h
593
 // @section probes
597
 // @section probes
594
 
598
 
595
 //
599
 //
596
-// See http://marlinfw.org/configuration/probes.html
600
+// See http://marlinfw.org/docs/configuration/probes.html
597
 //
601
 //
598
 
602
 
599
 /**
603
 /**
706
 // X and Y axis travel speed (mm/m) between probes
710
 // X and Y axis travel speed (mm/m) between probes
707
 #define XY_PROBE_SPEED 8000
711
 #define XY_PROBE_SPEED 8000
708
 
712
 
709
-// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH)
713
+// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
710
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
714
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
711
 
715
 
712
 // Speed for the "accurate" probe of each point
716
 // Speed for the "accurate" probe of each point
713
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
717
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
714
 
718
 
715
-// Use double touch for probing
716
-//#define PROBE_DOUBLE_TOUCH
719
+// The number of probes to perform at each point.
720
+//   Set to 2 for a fast/slow probe, using the second probe result.
721
+//   Set to 3 or more for slow probes, averaging the results.
722
+//#define MULTIPLE_PROBING 2
717
 
723
 
718
 /**
724
 /**
719
  * Z probes require clearance when deploying, stowing, and moving between
725
  * Z probes require clearance when deploying, stowing, and moving between
805
 #define Y_MAX_POS Y_BED_SIZE
811
 #define Y_MAX_POS Y_BED_SIZE
806
 #define Z_MAX_POS 250
812
 #define Z_MAX_POS 250
807
 
813
 
808
-// If enabled, axes won't move below MIN_POS in response to movement commands.
814
+/**
815
+ * Software Endstops
816
+ *
817
+ * - Prevent moves outside the set machine bounds.
818
+ * - Individual axes can be disabled, if desired.
819
+ * - X and Y only apply to Cartesian robots.
820
+ * - Use 'M211' to set software endstops on/off or report current state
821
+ */
822
+
823
+// Min software endstops curtail movement below minimum coordinate bounds
809
 #define MIN_SOFTWARE_ENDSTOPS
824
 #define MIN_SOFTWARE_ENDSTOPS
810
-// If enabled, axes won't move above MAX_POS in response to movement commands.
825
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
826
+  #define MIN_SOFTWARE_ENDSTOP_X
827
+  #define MIN_SOFTWARE_ENDSTOP_Y
828
+  #define MIN_SOFTWARE_ENDSTOP_Z
829
+#endif
830
+
831
+// Max software endstops curtail movement above maximum coordinate bounds
811
 #define MAX_SOFTWARE_ENDSTOPS
832
 #define MAX_SOFTWARE_ENDSTOPS
833
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
834
+  #define MAX_SOFTWARE_ENDSTOP_X
835
+  #define MAX_SOFTWARE_ENDSTOP_Y
836
+  #define MAX_SOFTWARE_ENDSTOP_Z
837
+#endif
812
 
838
 
813
 /**
839
 /**
814
  * Filament Runout Sensor
840
  * Filament Runout Sensor
828
 //===========================================================================
854
 //===========================================================================
829
 //=============================== Bed Leveling ==============================
855
 //=============================== Bed Leveling ==============================
830
 //===========================================================================
856
 //===========================================================================
831
-// @section bedlevel
857
+// @section calibrate
832
 
858
 
833
 /**
859
 /**
834
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
860
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
854
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
880
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
855
  *   A comprehensive bed leveling system combining the features and benefits
881
  *   A comprehensive bed leveling system combining the features and benefits
856
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
882
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
857
- *   Validation and Mesh Editing systems. Currently, UBL is only checked out
858
- *   for Cartesian Printers. That said, it was primarily designed to correct
859
- *   poor quality Delta Printers. If you feel adventurous and have a Delta,
860
- *   please post an issue if something doesn't work correctly. Initially,
861
- *   you will need to set a reduced bed size so you have a rectangular area
862
- *   to test on.
883
+ *   Validation and Mesh Editing systems.
863
  *
884
  *
864
  * - MESH_BED_LEVELING
885
  * - MESH_BED_LEVELING
865
  *   Probe a grid manually
886
  *   Probe a grid manually
886
   // at which point movement will be level to the machine's XY plane.
907
   // at which point movement will be level to the machine's XY plane.
887
   // The height can be set with M420 Z<height>
908
   // The height can be set with M420 Z<height>
888
   #define ENABLE_LEVELING_FADE_HEIGHT
909
   #define ENABLE_LEVELING_FADE_HEIGHT
910
+
911
+  // For Cartesian machines, instead of dividing moves on mesh boundaries,
912
+  // split up moves into short segments like a Delta. This follows the
913
+  // contours of the bed more closely than edge-to-edge straight moves.
914
+  #define SEGMENT_LEVELED_MOVES
915
+  #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)
916
+
917
+  /**
918
+   * Enable the G26 Mesh Validation Pattern tool.
919
+   */
920
+  //#define G26_MESH_VALIDATION   // Enable G26 mesh validation
921
+  #if ENABLED(G26_MESH_VALIDATION)
922
+    #define MESH_TEST_NOZZLE_SIZE     0.4   // (mm) Diameter of primary nozzle.
923
+    #define MESH_TEST_LAYER_HEIGHT    0.2   // (mm) Default layer height for the G26 Mesh Validation Tool.
924
+    #define MESH_TEST_HOTEND_TEMP   205.0   // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
925
+    #define MESH_TEST_BED_TEMP       60.0   // (°C) Default bed temperature for the G26 Mesh Validation Tool.
926
+  #endif
927
+
889
 #endif
928
 #endif
890
 
929
 
891
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
930
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
941
   //========================= Unified Bed Leveling ============================
980
   //========================= Unified Bed Leveling ============================
942
   //===========================================================================
981
   //===========================================================================
943
 
982
 
944
-  #define UBL_MESH_INSET 1          // Mesh inset margin on print area
983
+  //#define MESH_EDIT_GFX_OVERLAY   // Display a graphics overlay while editing the mesh
984
+
985
+  #define MESH_INSET 1              // Mesh inset margin on print area
945
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
986
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
946
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
987
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
947
 
988
 
952
   #define UBL_PROBE_PT_3_X 180
993
   #define UBL_PROBE_PT_3_X 180
953
   #define UBL_PROBE_PT_3_Y 20
994
   #define UBL_PROBE_PT_3_Y 20
954
 
995
 
955
-  #define UBL_G26_MESH_VALIDATION   // Enable G26 mesh validation
956
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
996
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
997
+  #define UBL_SAVE_ACTIVE_ON_M500   // Save the currently active mesh in the current slot on M500
957
 
998
 
958
 #elif ENABLED(MESH_BED_LEVELING)
999
 #elif ENABLED(MESH_BED_LEVELING)
959
 
1000
 
1013
 //#define Z_SAFE_HOMING
1054
 //#define Z_SAFE_HOMING
1014
 
1055
 
1015
 #if ENABLED(Z_SAFE_HOMING)
1056
 #if ENABLED(Z_SAFE_HOMING)
1016
-  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axis (G28).
1017
-  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axis (G28).
1057
+  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axes (G28).
1058
+  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axes (G28).
1018
 #endif
1059
 #endif
1019
 
1060
 
1020
 // Homing speeds (mm/m)
1061
 // Homing speeds (mm/m)
1021
 #define HOMING_FEEDRATE_XY (50*60)
1062
 #define HOMING_FEEDRATE_XY (50*60)
1022
 #define HOMING_FEEDRATE_Z  (8*60)
1063
 #define HOMING_FEEDRATE_Z  (8*60)
1023
 
1064
 
1065
+// @section calibrate
1066
+
1067
+/**
1068
+ * Bed Skew Compensation
1069
+ *
1070
+ * This feature corrects for misalignment in the XYZ axes.
1071
+ *
1072
+ * Take the following steps to get the bed skew in the XY plane:
1073
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1074
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1075
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1076
+ *  4. For XY_SIDE_AD measure the edge A to D
1077
+ *
1078
+ * Marlin automatically computes skew factors from these measurements.
1079
+ * Skew factors may also be computed and set manually:
1080
+ *
1081
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1082
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1083
+ *
1084
+ * If desired, follow the same procedure for XZ and YZ.
1085
+ * Use these diagrams for reference:
1086
+ *
1087
+ *    Y                     Z                     Z
1088
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1089
+ *    |    /       /        |    /       /        |    /       /
1090
+ *    |   /       /         |   /       /         |   /       /
1091
+ *    |  A-------D          |  A-------D          |  A-------D
1092
+ *    +-------------->X     +-------------->X     +-------------->Y
1093
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1094
+ */
1095
+//#define SKEW_CORRECTION
1096
+
1097
+#if ENABLED(SKEW_CORRECTION)
1098
+  // Input all length measurements here:
1099
+  #define XY_DIAG_AC 282.8427124746
1100
+  #define XY_DIAG_BD 282.8427124746
1101
+  #define XY_SIDE_AD 200
1102
+
1103
+  // Or, set the default skew factors directly here
1104
+  // to override the above measurements:
1105
+  #define XY_SKEW_FACTOR 0.0
1106
+
1107
+  //#define SKEW_CORRECTION_FOR_Z
1108
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1109
+    #define XZ_DIAG_AC 282.8427124746
1110
+    #define XZ_DIAG_BD 282.8427124746
1111
+    #define YZ_DIAG_AC 282.8427124746
1112
+    #define YZ_DIAG_BD 282.8427124746
1113
+    #define YZ_SIDE_AD 200
1114
+    #define XZ_SKEW_FACTOR 0.0
1115
+    #define YZ_SKEW_FACTOR 0.0
1116
+  #endif
1117
+
1118
+  // Enable this option for M852 to set skew at runtime
1119
+  //#define SKEW_CORRECTION_GCODE
1120
+#endif
1121
+
1024
 //=============================================================================
1122
 //=============================================================================
1025
 //============================= Additional Features ===========================
1123
 //============================= Additional Features ===========================
1026
 //=============================================================================
1124
 //=============================================================================
1052
 //
1150
 //
1053
 // M100 Free Memory Watcher
1151
 // M100 Free Memory Watcher
1054
 //
1152
 //
1055
-//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
1153
+//#define M100_FREE_MEMORY_WATCHER    // Add M100 (Free Memory Watcher) to debug memory usage
1056
 
1154
 
1057
 //
1155
 //
1058
 // G20/G21 Inch mode support
1156
 // G20/G21 Inch mode support
1197
  *
1295
  *
1198
  * Select the language to display on the LCD. These languages are available:
1296
  * Select the language to display on the LCD. These languages are available:
1199
  *
1297
  *
1200
- *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, gl, hr,
1201
- *    it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1298
+ *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, fr_utf8, gl,
1299
+ *    hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1202
  *    tr, uk, zh_CN, zh_TW, test
1300
  *    tr, uk, zh_CN, zh_TW, test
1203
  *
1301
  *
1204
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1302
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1205
  */
1303
  */
1206
 #define LCD_LANGUAGE en
1304
 #define LCD_LANGUAGE en
1207
 
1305
 
1329
 // Note: Test audio output with the G-Code:
1427
 // Note: Test audio output with the G-Code:
1330
 //  M300 S<frequency Hz> P<duration ms>
1428
 //  M300 S<frequency Hz> P<duration ms>
1331
 //
1429
 //
1332
-//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
1333
-//#define LCD_FEEDBACK_FREQUENCY_HZ 1000
1430
+//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
1431
+//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
1334
 
1432
 
1335
 //
1433
 //
1336
 // CONTROLLER TYPE: Standard
1434
 // CONTROLLER TYPE: Standard
1438
 //#define CARTESIO_UI
1536
 //#define CARTESIO_UI
1439
 
1537
 
1440
 //
1538
 //
1441
-// ANET_10 Controller supported displays.
1539
+// ANET and Tronxy Controller supported displays.
1442
 //
1540
 //
1443
-//#define ANET_KEYPAD_LCD         // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1541
+//#define ZONESTAR_LCD            // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1444
                                   // This LCD is known to be susceptible to electrical interference
1542
                                   // This LCD is known to be susceptible to electrical interference
1445
                                   // which scrambles the display.  Pressing any button clears it up.
1543
                                   // which scrambles the display.  Pressing any button clears it up.
1544
+                                  // This is a LCD2004 display with 5 analog buttons.
1545
+
1446
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1546
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1447
                                   // A clone of the RepRapDiscount full graphics display but with
1547
                                   // A clone of the RepRapDiscount full graphics display but with
1448
                                   // different pins/wiring (see pins_ANET_10.h).
1548
                                   // different pins/wiring (see pins_ANET_10.h).
1552
 //
1652
 //
1553
 //#define MKS_12864OLED
1653
 //#define MKS_12864OLED
1554
 
1654
 
1655
+// Silvergate GLCD controller
1656
+// http://github.com/android444/Silvergate
1657
+//
1658
+//#define SILVER_GATE_GLCD_CONTROLLER
1659
+
1555
 //=============================================================================
1660
 //=============================================================================
1556
 //=============================== Extra Features ==============================
1661
 //=============================== Extra Features ==============================
1557
 //=============================================================================
1662
 //=============================================================================
1608
  * Adds the M150 command to set the LED (or LED strip) color.
1713
  * Adds the M150 command to set the LED (or LED strip) color.
1609
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1714
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1610
  * luminance values can be set from 0 to 255.
1715
  * luminance values can be set from 0 to 255.
1611
- * For Neopixel LED overall brightness parameters is also available 
1716
+ * For Neopixel LED an overall brightness parameter is also available.
1612
  *
1717
  *
1613
  * *** CAUTION ***
1718
  * *** CAUTION ***
1614
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1719
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1615
  *  as the Arduino cannot handle the current the LEDs will require.
1720
  *  as the Arduino cannot handle the current the LEDs will require.
1616
  *  Failure to follow this precaution can destroy your Arduino!
1721
  *  Failure to follow this precaution can destroy your Arduino!
1617
- *  The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
1618
- *  cannot handle such current, separate 5V power supply must be used
1722
+ *  NOTE: A separate 5V power supply is required! The Neopixel LED needs
1723
+ *  more current than the Arduino 5V linear regulator can produce.
1619
  * *** CAUTION ***
1724
  * *** CAUTION ***
1620
  *
1725
  *
1621
- * LED type. This options are mutualy exclusive. Uncomment only one.
1726
+ * LED Type. Enable only one of the following two options.
1622
  *
1727
  *
1623
  */
1728
  */
1624
 //#define RGB_LED
1729
 //#define RGB_LED
1634
 // Support for Adafruit Neopixel LED driver
1739
 // Support for Adafruit Neopixel LED driver
1635
 //#define NEOPIXEL_LED
1740
 //#define NEOPIXEL_LED
1636
 #if ENABLED(NEOPIXEL_LED)
1741
 #if ENABLED(NEOPIXEL_LED)
1637
-  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
1742
+  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
1638
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1743
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1639
-  #define NEOPIXEL_PIXELS 30       // Number of LEDs on strip
1640
-  #define NEOPIXEL_IS_SEQUENTIAL   // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
1641
-  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness 0-255
1744
+  #define NEOPIXEL_PIXELS 30       // Number of LEDs in the strip
1745
+  #define NEOPIXEL_IS_SEQUENTIAL   // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
1746
+  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness (0-255)
1642
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1747
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1643
 #endif
1748
 #endif
1644
 
1749
 
1653
  *  - Change to green once print has finished
1758
  *  - Change to green once print has finished
1654
  *  - Turn off after the print has finished and the user has pushed a button
1759
  *  - Turn off after the print has finished and the user has pushed a button
1655
  */
1760
  */
1656
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED)
1761
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
1657
   #define PRINTER_EVENT_LEDS
1762
   #define PRINTER_EVENT_LEDS
1658
 #endif
1763
 #endif
1659
 
1764
 
1660
-/*********************************************************************\
1661
-* R/C SERVO support
1662
-* Sponsored by TrinityLabs, Reworked by codexmas
1663
-**********************************************************************/
1765
+/**
1766
+ * R/C SERVO support
1767
+ * Sponsored by TrinityLabs, Reworked by codexmas
1768
+ */
1664
 
1769
 
1665
-// Number of servos
1666
-//
1667
-// If you select a configuration below, this will receive a default value and does not need to be set manually
1668
-// set it manually if you have more servos than extruders and wish to manually control some
1669
-// leaving it undefined or defining as 0 will disable the servo subsystem
1670
-// If unsure, leave commented / disabled
1671
-//
1770
+/**
1771
+ * Number of servos
1772
+ *
1773
+ * For some servo-related options NUM_SERVOS will be set automatically.
1774
+ * Set this manually if there are extra servos needing manual control.
1775
+ * Leave undefined or set to 0 to entirely disable the servo subsystem.
1776
+ */
1672
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1777
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1673
 
1778
 
1674
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1779
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1681
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1786
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1682
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1787
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1683
 
1788
 
1684
-/**
1685
- * Filament Width Sensor
1686
- *
1687
- * Measures the filament width in real-time and adjusts
1688
- * flow rate to compensate for any irregularities.
1689
- *
1690
- * Also allows the measured filament diameter to set the
1691
- * extrusion rate, so the slicer only has to specify the
1692
- * volume.
1693
- *
1694
- * Only a single extruder is supported at this time.
1695
- *
1696
- *  34 RAMPS_14    : Analog input 5 on the AUX2 connector
1697
- *  81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
1698
- * 301 RAMBO       : Analog input 3
1699
- *
1700
- * Note: May require analog pins to be defined for other boards.
1701
- */
1702
-//#define FILAMENT_WIDTH_SENSOR
1703
-
1704
-#define DEFAULT_NOMINAL_FILAMENT_DIA 3.00   // (mm) Diameter of the filament generally used (3.0 or 1.75mm), also used in the slicer. Used to validate sensor reading.
1705
-
1706
-#if ENABLED(FILAMENT_WIDTH_SENSOR)
1707
-  #define FILAMENT_SENSOR_EXTRUDER_NUM 0    // Index of the extruder that has the filament sensor (0,1,2,3)
1708
-  #define MEASUREMENT_DELAY_CM        14    // (cm) The distance from the filament sensor to the melting chamber
1709
-
1710
-  #define MEASURED_UPPER_LIMIT         3.30 // (mm) Upper limit used to validate sensor reading
1711
-  #define MEASURED_LOWER_LIMIT         1.90 // (mm) Lower limit used to validate sensor reading
1712
-  #define MAX_MEASUREMENT_DELAY       20    // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
1713
-
1714
-  #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
1715
-
1716
-  // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
1717
-  //#define FILAMENT_LCD_DISPLAY
1718
-#endif
1719
-
1720
 #endif // CONFIGURATION_H
1789
 #endif // CONFIGURATION_H

+ 268
- 125
Marlin/example_configurations/AlephObjects/TAZ4/Configuration_adv.h Переглянути файл

32
  */
32
  */
33
 #ifndef CONFIGURATION_ADV_H
33
 #ifndef CONFIGURATION_ADV_H
34
 #define CONFIGURATION_ADV_H
34
 #define CONFIGURATION_ADV_H
35
-#define CONFIGURATION_ADV_H_VERSION 010100
35
+#define CONFIGURATION_ADV_H_VERSION 010107
36
 
36
 
37
 // @section temperature
37
 // @section temperature
38
 
38
 
48
 #endif
48
 #endif
49
 
49
 
50
 /**
50
 /**
51
- * Thermal Protection protects your printer from damage and fire if a
52
- * thermistor falls out or temperature sensors fail in any way.
51
+ * Thermal Protection provides additional protection to your printer from damage
52
+ * and fire. Marlin always includes safe min and max temperature ranges which
53
+ * protect against a broken or disconnected thermistor wire.
53
  *
54
  *
54
- * The issue: If a thermistor falls out or a temperature sensor fails,
55
- * Marlin can no longer sense the actual temperature. Since a disconnected
56
- * thermistor reads as a low temperature, the firmware will keep the heater on.
55
+ * The issue: If a thermistor falls out, it will report the much lower
56
+ * temperature of the air in the room, and the the firmware will keep
57
+ * the heater on.
57
  *
58
  *
58
  * The solution: Once the temperature reaches the target, start observing.
59
  * The solution: Once the temperature reaches the target, start observing.
59
- * If the temperature stays too far below the target (hysteresis) for too long (period),
60
- * the firmware will halt the machine as a safety precaution.
60
+ * If the temperature stays too far below the target (hysteresis) for too
61
+ * long (period), the firmware will halt the machine as a safety precaution.
61
  *
62
  *
62
- * If you get false positives for "Thermal Runaway" increase THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
63
+ * If you get false positives for "Thermal Runaway", increase
64
+ * THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
63
  */
65
  */
64
 #if ENABLED(THERMAL_PROTECTION_HOTENDS)
66
 #if ENABLED(THERMAL_PROTECTION_HOTENDS)
65
   #define THERMAL_PROTECTION_PERIOD 40        // Seconds
67
   #define THERMAL_PROTECTION_PERIOD 40        // Seconds
66
   #define THERMAL_PROTECTION_HYSTERESIS 4     // Degrees Celsius
68
   #define THERMAL_PROTECTION_HYSTERESIS 4     // Degrees Celsius
67
 
69
 
68
   /**
70
   /**
69
-   * Whenever an M104 or M109 increases the target temperature the firmware will wait for the
70
-   * WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
71
-   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
72
-   * but only if the current temperature is far enough below the target for a reliable test.
71
+   * Whenever an M104, M109, or M303 increases the target temperature, the
72
+   * firmware will wait for the WATCH_TEMP_PERIOD to expire. If the temperature
73
+   * hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted and
74
+   * requires a hard reset. This test restarts with any M104/M109/M303, but only
75
+   * if the current temperature is far enough below the target for a reliable
76
+   * test.
73
    *
77
    *
74
-   * If you get false positives for "Heating failed" increase WATCH_TEMP_PERIOD and/or decrease WATCH_TEMP_INCREASE
75
-   * WATCH_TEMP_INCREASE should not be below 2.
78
+   * If you get false positives for "Heating failed", increase WATCH_TEMP_PERIOD
79
+   * and/or decrease WATCH_TEMP_INCREASE. WATCH_TEMP_INCREASE should not be set
80
+   * below 2.
76
    */
81
    */
77
   #define WATCH_TEMP_PERIOD 20                // Seconds
82
   #define WATCH_TEMP_PERIOD 20                // Seconds
78
   #define WATCH_TEMP_INCREASE 2               // Degrees Celsius
83
   #define WATCH_TEMP_INCREASE 2               // Degrees Celsius
86
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
91
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
87
 
92
 
88
   /**
93
   /**
89
-   * Whenever an M140 or M190 increases the target temperature the firmware will wait for the
90
-   * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE
91
-   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190,
92
-   * but only if the current temperature is far enough below the target for a reliable test.
93
-   *
94
-   * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease
95
-   * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.)
94
+   * As described above, except for the bed (M140/M190/M303).
96
    */
95
    */
97
   #define WATCH_BED_TEMP_PERIOD 60                // Seconds
96
   #define WATCH_BED_TEMP_PERIOD 60                // Seconds
98
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
97
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
123
   #define AUTOTEMP_OLDWEIGHT 0.98
122
   #define AUTOTEMP_OLDWEIGHT 0.98
124
 #endif
123
 #endif
125
 
124
 
125
+// Show extra position information in M114
126
+//#define M114_DETAIL
127
+
126
 // Show Temperature ADC value
128
 // Show Temperature ADC value
127
 // Enable for M105 to include ADC values read from temperature sensors.
129
 // Enable for M105 to include ADC values read from temperature sensors.
128
 //#define SHOW_TEMP_ADC_VALUES
130
 //#define SHOW_TEMP_ADC_VALUES
257
 
259
 
258
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
260
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
259
 
261
 
260
-// Dual X Steppers
261
-// Uncomment this option to drive two X axis motors.
262
-// The next unused E driver will be assigned to the second X stepper.
262
+/**
263
+ * Dual Steppers / Dual Endstops
264
+ *
265
+ * This section will allow you to use extra E drivers to drive a second motor for X, Y, or Z axes.
266
+ *
267
+ * For example, set X_DUAL_STEPPER_DRIVERS setting to use a second motor. If the motors need to
268
+ * spin in opposite directions set INVERT_X2_VS_X_DIR. If the second motor needs its own endstop
269
+ * set X_DUAL_ENDSTOPS. This can adjust for "racking." Use X2_USE_ENDSTOP to set the endstop plug
270
+ * that should be used for the second endstop. Extra endstops will appear in the output of 'M119'.
271
+ *
272
+ * Use X_DUAL_ENDSTOP_ADJUSTMENT to adjust for mechanical imperfection. After homing both motors
273
+ * this offset is applied to the X2 motor. To find the offset home the X axis, and measure the error
274
+ * in X2. Dual endstop offsets can be set at runtime with 'M666 X<offset> Y<offset> Z<offset>'.
275
+ */
276
+
263
 //#define X_DUAL_STEPPER_DRIVERS
277
 //#define X_DUAL_STEPPER_DRIVERS
264
 #if ENABLED(X_DUAL_STEPPER_DRIVERS)
278
 #if ENABLED(X_DUAL_STEPPER_DRIVERS)
265
-  // Set true if the two X motors need to rotate in opposite directions
266
-  #define INVERT_X2_VS_X_DIR true
279
+  #define INVERT_X2_VS_X_DIR true   // Set 'true' if X motors should rotate in opposite directions
280
+  //#define X_DUAL_ENDSTOPS
281
+  #if ENABLED(X_DUAL_ENDSTOPS)
282
+    #define X2_USE_ENDSTOP _XMAX_
283
+    #define X_DUAL_ENDSTOPS_ADJUSTMENT  0
284
+  #endif
267
 #endif
285
 #endif
268
 
286
 
269
-// Dual Y Steppers
270
-// Uncomment this option to drive two Y axis motors.
271
-// The next unused E driver will be assigned to the second Y stepper.
272
 //#define Y_DUAL_STEPPER_DRIVERS
287
 //#define Y_DUAL_STEPPER_DRIVERS
273
 #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
288
 #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
274
-  // Set true if the two Y motors need to rotate in opposite directions
275
-  #define INVERT_Y2_VS_Y_DIR true
289
+  #define INVERT_Y2_VS_Y_DIR true   // Set 'true' if Y motors should rotate in opposite directions
290
+  //#define Y_DUAL_ENDSTOPS
291
+  #if ENABLED(Y_DUAL_ENDSTOPS)
292
+    #define Y2_USE_ENDSTOP _YMAX_
293
+    #define Y_DUAL_ENDSTOPS_ADJUSTMENT  0
294
+  #endif
276
 #endif
295
 #endif
277
 
296
 
278
-// A single Z stepper driver is usually used to drive 2 stepper motors.
279
-// Uncomment this option to use a separate stepper driver for each Z axis motor.
280
-// The next unused E driver will be assigned to the second Z stepper.
281
 //#define Z_DUAL_STEPPER_DRIVERS
297
 //#define Z_DUAL_STEPPER_DRIVERS
282
-
283
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
298
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
284
-
285
-  // Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper.
286
-  // That way the machine is capable to align the bed during home, since both Z steppers are homed.
287
-  // There is also an implementation of M666 (software endstops adjustment) to this feature.
288
-  // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed.
289
-  // One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2.
290
-  // If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive.
291
-  // Play a little bit with small adjustments (0.5mm) and check the behaviour.
292
-  // The M119 (endstops report) will start reporting the Z2 Endstop as well.
293
-
294
   //#define Z_DUAL_ENDSTOPS
299
   //#define Z_DUAL_ENDSTOPS
295
-
296
   #if ENABLED(Z_DUAL_ENDSTOPS)
300
   #if ENABLED(Z_DUAL_ENDSTOPS)
297
     #define Z2_USE_ENDSTOP _XMAX_
301
     #define Z2_USE_ENDSTOP _XMAX_
298
-    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0  // Use M666 to determine/test this value
302
+    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0
299
   #endif
303
   #endif
300
-
301
-#endif // Z_DUAL_STEPPER_DRIVERS
304
+#endif
302
 
305
 
303
 // Enable this for dual x-carriage printers.
306
 // Enable this for dual x-carriage printers.
304
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
307
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
345
 
348
 
346
 // @section homing
349
 // @section homing
347
 
350
 
348
-//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
351
+// Homing hits each endstop, retracts by these distances, then does a slower bump.
349
 #define X_HOME_BUMP_MM 5
352
 #define X_HOME_BUMP_MM 5
350
 #define Y_HOME_BUMP_MM 5
353
 #define Y_HOME_BUMP_MM 5
351
 #define Z_HOME_BUMP_MM 4
354
 #define Z_HOME_BUMP_MM 4
352
-#define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
353
-#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
355
+#define HOMING_BUMP_DIVISOR { 2, 2, 4 }  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
356
+#define QUICK_HOME                       // If homing includes X and Y, do a diagonal move initially
354
 
357
 
355
 // When G28 is called, this option will make Y home before X
358
 // When G28 is called, this option will make Y home before X
356
 //#define HOME_Y_BEFORE_X
359
 //#define HOME_Y_BEFORE_X
434
 //#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 }   // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
437
 //#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 }   // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
435
 //#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 }    // Default drive percent - X, Y, Z, E axis
438
 //#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 }    // Default drive percent - X, Y, Z, E axis
436
 
439
 
437
-// Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
440
+// Use an I2C based DIGIPOT (e.g., Azteeg X3 Pro)
438
 //#define DIGIPOT_I2C
441
 //#define DIGIPOT_I2C
442
+#if ENABLED(DIGIPOT_I2C) && !defined(DIGIPOT_I2C_ADDRESS_A)
443
+  /**
444
+   * Common slave addresses:
445
+   *
446
+   *                    A   (A shifted)   B   (B shifted)  IC
447
+   * Smoothie          0x2C (0x58)       0x2D (0x5A)       MCP4451
448
+   * AZTEEG_X3_PRO     0x2C (0x58)       0x2E (0x5C)       MCP4451
449
+   * MIGHTYBOARD_REVE  0x2F (0x5E)                         MCP4018
450
+   */
451
+  #define DIGIPOT_I2C_ADDRESS_A 0x2C  // unshifted slave address for first DIGIPOT
452
+  #define DIGIPOT_I2C_ADDRESS_B 0x2D  // unshifted slave address for second DIGIPOT
453
+#endif
454
+
439
 //#define DIGIPOT_MCP4018          // Requires library from https://github.com/stawel/SlowSoftI2CMaster
455
 //#define DIGIPOT_MCP4018          // Requires library from https://github.com/stawel/SlowSoftI2CMaster
440
 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4     AZTEEG_X3_PRO: 8
456
 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4     AZTEEG_X3_PRO: 8
441
 // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
457
 // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
466
 // The timeout (in ms) to return to the status screen from sub-menus
482
 // The timeout (in ms) to return to the status screen from sub-menus
467
 //#define LCD_TIMEOUT_TO_STATUS 15000
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
468
 
484
 
485
+/**
486
+ * LED Control Menu
487
+ * Enable this feature to add LED Control to the LCD menu
488
+ */
489
+//#define LED_CONTROL_MENU
490
+#if ENABLED(LED_CONTROL_MENU)
491
+  #define LED_COLOR_PRESETS                 // Enable the Preset Color menu option
492
+  #if ENABLED(LED_COLOR_PRESETS)
493
+    #define LED_USER_PRESET_RED        255  // User defined RED value
494
+    #define LED_USER_PRESET_GREEN      128  // User defined GREEN value
495
+    #define LED_USER_PRESET_BLUE         0  // User defined BLUE value
496
+    #define LED_USER_PRESET_WHITE      255  // User defined WHITE value
497
+    #define LED_USER_PRESET_BRIGHTNESS 255  // User defined intensity
498
+    //#define LED_USER_PRESET_STARTUP       // Have the printer display the user preset color on startup
499
+  #endif
500
+#endif // LED_CONTROL_MENU
501
+
469
 #if ENABLED(SDSUPPORT)
502
 #if ENABLED(SDSUPPORT)
470
 
503
 
471
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
504
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
475
   // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
508
   // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
476
   #define SD_DETECT_INVERTED
509
   #define SD_DETECT_INVERTED
477
 
510
 
478
-  #define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
511
+  #define SD_FINISHED_STEPPERRELEASE true          // Disable steppers when SD Print is finished
479
   #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
512
   #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
480
 
513
 
481
-  #define SDCARD_RATHERRECENTFIRST  //reverse file order of sd card menu display. Its sorted practically after the file system block order.
482
-  // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that.
483
-  // using:
514
+  // Reverse SD sort to show "more recent" files first, according to the card's FAT.
515
+  // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended.
516
+  #define SDCARD_RATHERRECENTFIRST
517
+
518
+  // Add an option in the menu to run all auto#.g files
484
   //#define MENU_ADDAUTOSTART
519
   //#define MENU_ADDAUTOSTART
485
 
520
 
486
   /**
521
   /**
517
     #define SDSORT_USES_STACK  false  // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
552
     #define SDSORT_USES_STACK  false  // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
518
     #define SDSORT_CACHE_NAMES false  // Keep sorted items in RAM longer for speedy performance. Most expensive option.
553
     #define SDSORT_CACHE_NAMES false  // Keep sorted items in RAM longer for speedy performance. Most expensive option.
519
     #define SDSORT_DYNAMIC_RAM false  // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
554
     #define SDSORT_DYNAMIC_RAM false  // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
555
+    #define SDSORT_CACHE_VFATS 2      // Maximum number of 13-byte VFAT entries to use for sorting.
556
+                                      // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM.
520
   #endif
557
   #endif
521
 
558
 
522
   // Show a progress bar on HD44780 LCDs for SD printing
559
   // Show a progress bar on HD44780 LCDs for SD printing
535
     //#define LCD_PROGRESS_BAR_TEST
572
     //#define LCD_PROGRESS_BAR_TEST
536
   #endif
573
   #endif
537
 
574
 
575
+  // Add an 'M73' G-code to set the current percentage
576
+  //#define LCD_SET_PROGRESS_MANUALLY
577
+
538
   // This allows hosts to request long names for files and folders with M33
578
   // This allows hosts to request long names for files and folders with M33
539
   //#define LONG_FILENAME_HOST_SUPPORT
579
   //#define LONG_FILENAME_HOST_SUPPORT
540
 
580
 
541
-  // This option allows you to abort SD printing when any endstop is triggered.
542
-  // This feature must be enabled with "M540 S1" or from the LCD menu.
543
-  // To have any effect, endstops must be enabled during SD printing.
581
+  // Enable this option to scroll long filenames in the SD card menu
582
+  //#define SCROLL_LONG_FILENAMES
583
+
584
+  /**
585
+   * This option allows you to abort SD printing when any endstop is triggered.
586
+   * This feature must be enabled with "M540 S1" or from the LCD menu.
587
+   * To have any effect, endstops must be enabled during SD printing.
588
+   */
544
   //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
589
   //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
545
 
590
 
591
+  /**
592
+   * This option makes it easier to print the same SD Card file again.
593
+   * On print completion the LCD Menu will open with the file selected.
594
+   * You can just click to start the print, or navigate elsewhere.
595
+   */
596
+  //#define SD_REPRINT_LAST_SELECTED_FILE
597
+
546
 #endif // SDSUPPORT
598
 #endif // SDSUPPORT
547
 
599
 
548
 /**
600
 /**
575
   // Enable this option and reduce the value to optimize screen updates.
627
   // Enable this option and reduce the value to optimize screen updates.
576
   // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
628
   // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
577
   //#define DOGM_SPI_DELAY_US 5
629
   //#define DOGM_SPI_DELAY_US 5
630
+
631
+  // Swap the CW/CCW indicators in the graphics overlay
632
+  //#define OVERLAY_GFX_REVERSE
633
+
578
 #endif // DOGLCD
634
 #endif // DOGLCD
579
 
635
 
580
 // @section safety
636
 // @section safety
603
 #if ENABLED(BABYSTEPPING)
659
 #if ENABLED(BABYSTEPPING)
604
   //#define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
660
   //#define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
605
   #define BABYSTEP_INVERT_Z false    // Change if Z babysteps should go the other way
661
   #define BABYSTEP_INVERT_Z false    // Change if Z babysteps should go the other way
606
-  #define BABYSTEP_MULTIPLICATOR 100 // Babysteps are very small. Increase for faster motion.
662
+  #define BABYSTEP_MULTIPLICATOR 1   // Babysteps are very small. Increase for faster motion.
607
   //#define BABYSTEP_ZPROBE_OFFSET   // Enable to combine M851 and Babystepping
663
   //#define BABYSTEP_ZPROBE_OFFSET   // Enable to combine M851 and Babystepping
608
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
664
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
609
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
665
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
610
                                         // Note: Extra time may be added to mitigate controller latency.
666
                                         // Note: Extra time may be added to mitigate controller latency.
611
   //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
667
   //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
612
-  //#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators
613
 #endif
668
 #endif
614
 
669
 
615
 // @section extruder
670
 // @section extruder
656
 
711
 
657
 // @section leveling
712
 // @section leveling
658
 
713
 
659
-// Default mesh area is an area with an inset margin on the print area.
660
-// Below are the macros that are used to define the borders for the mesh area,
661
-// made available here for specialized needs, ie dual extruder setup.
662
-#if ENABLED(MESH_BED_LEVELING)
663
-  #define MESH_MIN_X MESH_INSET
664
-  #define MESH_MAX_X (X_BED_SIZE - (MESH_INSET))
665
-  #define MESH_MIN_Y MESH_INSET
666
-  #define MESH_MAX_Y (Y_BED_SIZE - (MESH_INSET))
667
-#elif ENABLED(AUTO_BED_LEVELING_UBL)
668
-  #define UBL_MESH_MIN_X UBL_MESH_INSET
669
-  #define UBL_MESH_MAX_X (X_BED_SIZE - (UBL_MESH_INSET))
670
-  #define UBL_MESH_MIN_Y UBL_MESH_INSET
671
-  #define UBL_MESH_MAX_Y (Y_BED_SIZE - (UBL_MESH_INSET))
672
-
673
-  // If this is defined, the currently active mesh will be saved in the
674
-  // current slot on M500.
675
-  #define UBL_SAVE_ACTIVE_ON_M500
714
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
715
+  #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
716
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
717
+  #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
718
+#endif
719
+
720
+#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL)
721
+  // Override the mesh area if the automatic (max) area is too large
722
+  //#define MESH_MIN_X MESH_INSET
723
+  //#define MESH_MIN_Y MESH_INSET
724
+  //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET)
725
+  //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
676
 #endif
726
 #endif
677
 
727
 
678
 // @section extras
728
 // @section extras
692
 //#define BEZIER_CURVE_SUPPORT
742
 //#define BEZIER_CURVE_SUPPORT
693
 
743
 
694
 // G38.2 and G38.3 Probe Target
744
 // G38.2 and G38.3 Probe Target
695
-// Enable PROBE_DOUBLE_TOUCH if you want G38 to double touch
745
+// Set MULTIPLE_PROBING if you want G38 to double touch
696
 //#define G38_PROBE_TARGET
746
 //#define G38_PROBE_TARGET
697
 #if ENABLED(G38_PROBE_TARGET)
747
 #if ENABLED(G38_PROBE_TARGET)
698
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
748
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
717
 // @section hidden
767
 // @section hidden
718
 
768
 
719
 // The number of linear motions that can be in the plan at any give time.
769
 // The number of linear motions that can be in the plan at any give time.
720
-// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2, i.g. 8,16,32 because shifts and ors are used to do the ring-buffering.
770
+// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2 (e.g. 8, 16, 32) because shifts and ors are used to do the ring-buffering.
721
 #if ENABLED(SDSUPPORT)
771
 #if ENABLED(SDSUPPORT)
722
   #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
772
   #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
723
 #else
773
 #else
808
 #endif
858
 #endif
809
 
859
 
810
 /**
860
 /**
861
+ * Extra Fan Speed
862
+ * Adds a secondary fan speed for each print-cooling fan.
863
+ *   'M106 P<fan> T3-255' : Set a secondary speed for <fan>
864
+ *   'M106 P<fan> T2'     : Use the set secondary speed
865
+ *   'M106 P<fan> T1'     : Restore the previous fan speed
866
+ */
867
+//#define EXTRA_FAN_SPEED
868
+
869
+/**
811
  * Advanced Pause
870
  * Advanced Pause
812
  * Experimental feature for filament change support and for parking the nozzle when paused.
871
  * Experimental feature for filament change support and for parking the nozzle when paused.
813
  * Adds the GCode M600 for initiating filament change.
872
  * Adds the GCode M600 for initiating filament change.
917
 
976
 
918
 #endif
977
 #endif
919
 
978
 
920
-// @section TMC2130
979
+// @section TMC2130, TMC2208
921
 
980
 
922
 /**
981
 /**
923
  * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
982
  * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
931
  */
990
  */
932
 //#define HAVE_TMC2130
991
 //#define HAVE_TMC2130
933
 
992
 
934
-#if ENABLED(HAVE_TMC2130)
993
+/**
994
+ * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
995
+ * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin.
996
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN
997
+ * to #_SERIAL_TX_PIN with a 1K resistor.
998
+ * The drivers can also be used with hardware serial.
999
+ *
1000
+ * You'll also need the TMC2208Stepper Arduino library
1001
+ * (https://github.com/teemuatlut/TMC2208Stepper).
1002
+ */
1003
+//#define HAVE_TMC2208
1004
+
1005
+#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
935
 
1006
 
936
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
1007
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
937
   //#define X_IS_TMC2130
1008
   //#define X_IS_TMC2130
946
   //#define E3_IS_TMC2130
1017
   //#define E3_IS_TMC2130
947
   //#define E4_IS_TMC2130
1018
   //#define E4_IS_TMC2130
948
 
1019
 
1020
+  //#define X_IS_TMC2208
1021
+  //#define X2_IS_TMC2208
1022
+  //#define Y_IS_TMC2208
1023
+  //#define Y2_IS_TMC2208
1024
+  //#define Z_IS_TMC2208
1025
+  //#define Z2_IS_TMC2208
1026
+  //#define E0_IS_TMC2208
1027
+  //#define E1_IS_TMC2208
1028
+  //#define E2_IS_TMC2208
1029
+  //#define E3_IS_TMC2208
1030
+  //#define E4_IS_TMC2208
1031
+
949
   /**
1032
   /**
950
    * Stepper driver settings
1033
    * Stepper driver settings
951
    */
1034
    */
952
 
1035
 
953
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1036
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
954
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1037
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
955
-  #define INTERPOLATE          1  // Interpolate X/Y/Z_MICROSTEPS to 256
1038
+  #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
956
 
1039
 
957
-  #define X_CURRENT         1000  // rms current in mA. Multiply by 1.41 for peak current.
1040
+  #define X_CURRENT          800  // rms current in mA. Multiply by 1.41 for peak current.
958
   #define X_MICROSTEPS        16  // 0..256
1041
   #define X_MICROSTEPS        16  // 0..256
959
 
1042
 
960
-  #define Y_CURRENT         1000
1043
+  #define Y_CURRENT          800
961
   #define Y_MICROSTEPS        16
1044
   #define Y_MICROSTEPS        16
962
 
1045
 
963
-  #define Z_CURRENT         1000
1046
+  #define Z_CURRENT          800
964
   #define Z_MICROSTEPS        16
1047
   #define Z_MICROSTEPS        16
965
 
1048
 
966
-  //#define X2_CURRENT      1000
967
-  //#define X2_MICROSTEPS     16
1049
+  #define X2_CURRENT         800
1050
+  #define X2_MICROSTEPS       16
968
 
1051
 
969
-  //#define Y2_CURRENT      1000
970
-  //#define Y2_MICROSTEPS     16
1052
+  #define Y2_CURRENT         800
1053
+  #define Y2_MICROSTEPS       16
971
 
1054
 
972
-  //#define Z2_CURRENT      1000
973
-  //#define Z2_MICROSTEPS     16
1055
+  #define Z2_CURRENT         800
1056
+  #define Z2_MICROSTEPS       16
974
 
1057
 
975
-  //#define E0_CURRENT      1000
976
-  //#define E0_MICROSTEPS     16
1058
+  #define E0_CURRENT         800
1059
+  #define E0_MICROSTEPS       16
977
 
1060
 
978
-  //#define E1_CURRENT      1000
979
-  //#define E1_MICROSTEPS     16
1061
+  #define E1_CURRENT         800
1062
+  #define E1_MICROSTEPS       16
980
 
1063
 
981
-  //#define E2_CURRENT      1000
982
-  //#define E2_MICROSTEPS     16
1064
+  #define E2_CURRENT         800
1065
+  #define E2_MICROSTEPS       16
983
 
1066
 
984
-  //#define E3_CURRENT      1000
985
-  //#define E3_MICROSTEPS     16
1067
+  #define E3_CURRENT         800
1068
+  #define E3_MICROSTEPS       16
986
 
1069
 
987
-  //#define E4_CURRENT      1000
988
-  //#define E4_MICROSTEPS     16
1070
+  #define E4_CURRENT         800
1071
+  #define E4_MICROSTEPS       16
989
 
1072
 
990
   /**
1073
   /**
991
    * Use Trinamic's ultra quiet stepping mode.
1074
    * Use Trinamic's ultra quiet stepping mode.
994
   #define STEALTHCHOP
1077
   #define STEALTHCHOP
995
 
1078
 
996
   /**
1079
   /**
997
-   * Let Marlin automatically control stepper current.
998
-   * This is still an experimental feature.
999
-   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
1000
-   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
1001
-   * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX
1080
+   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1081
+   * like overtemperature and short to ground. TMC2208 requires hardware serial.
1082
+   * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1083
+   * Other detected conditions can be used to stop the current print.
1002
    * Relevant g-codes:
1084
    * Relevant g-codes:
1003
    * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
1085
    * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
1004
-   * M906 S1 - Start adjusting current
1005
-   * M906 S0 - Stop adjusting current
1006
    * M911 - Report stepper driver overtemperature pre-warn condition.
1086
    * M911 - Report stepper driver overtemperature pre-warn condition.
1007
    * M912 - Clear stepper driver overtemperature pre-warn condition flag.
1087
    * M912 - Clear stepper driver overtemperature pre-warn condition flag.
1088
+   * M122 S0/1 - Report driver parameters (Requires TMC_DEBUG)
1008
    */
1089
    */
1009
-  //#define AUTOMATIC_CURRENT_CONTROL
1090
+  //#define MONITOR_DRIVER_STATUS
1010
 
1091
 
1011
-  #if ENABLED(AUTOMATIC_CURRENT_CONTROL)
1012
-    #define CURRENT_STEP          50  // [mA]
1013
-    #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
1092
+  #if ENABLED(MONITOR_DRIVER_STATUS)
1093
+    #define CURRENT_STEP_DOWN     50  // [mA]
1014
     #define REPORT_CURRENT_CHANGE
1094
     #define REPORT_CURRENT_CHANGE
1095
+    #define STOP_ON_ERROR
1015
   #endif
1096
   #endif
1016
 
1097
 
1017
   /**
1098
   /**
1026
   #define X2_HYBRID_THRESHOLD    100
1107
   #define X2_HYBRID_THRESHOLD    100
1027
   #define Y_HYBRID_THRESHOLD     100
1108
   #define Y_HYBRID_THRESHOLD     100
1028
   #define Y2_HYBRID_THRESHOLD    100
1109
   #define Y2_HYBRID_THRESHOLD    100
1029
-  #define Z_HYBRID_THRESHOLD       4
1030
-  #define Z2_HYBRID_THRESHOLD      4
1110
+  #define Z_HYBRID_THRESHOLD       3
1111
+  #define Z2_HYBRID_THRESHOLD      3
1031
   #define E0_HYBRID_THRESHOLD     30
1112
   #define E0_HYBRID_THRESHOLD     30
1032
   #define E1_HYBRID_THRESHOLD     30
1113
   #define E1_HYBRID_THRESHOLD     30
1033
   #define E2_HYBRID_THRESHOLD     30
1114
   #define E2_HYBRID_THRESHOLD     30
1037
   /**
1118
   /**
1038
    * Use stallGuard2 to sense an obstacle and trigger an endstop.
1119
    * Use stallGuard2 to sense an obstacle and trigger an endstop.
1039
    * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
1120
    * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
1040
-   * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal.
1121
+   * X and Y homing will always be done in spreadCycle mode.
1041
    *
1122
    *
1042
    * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
1123
    * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
1043
    * Higher values make the system LESS sensitive.
1124
    * Higher values make the system LESS sensitive.
1046
    * It is advised to set X/Y_HOME_BUMP_MM to 0.
1127
    * It is advised to set X/Y_HOME_BUMP_MM to 0.
1047
    * M914 X/Y to live tune the setting
1128
    * M914 X/Y to live tune the setting
1048
    */
1129
    */
1049
-  //#define SENSORLESS_HOMING
1130
+  //#define SENSORLESS_HOMING // TMC2130 only
1050
 
1131
 
1051
   #if ENABLED(SENSORLESS_HOMING)
1132
   #if ENABLED(SENSORLESS_HOMING)
1052
-    #define X_HOMING_SENSITIVITY  19
1053
-    #define Y_HOMING_SENSITIVITY  19
1133
+    #define X_HOMING_SENSITIVITY  8
1134
+    #define Y_HOMING_SENSITIVITY  8
1054
   #endif
1135
   #endif
1055
 
1136
 
1056
   /**
1137
   /**
1138
+   * Enable M122 debugging command for TMC stepper drivers.
1139
+   * M122 S0/1 will enable continous reporting.
1140
+   */
1141
+  //#define TMC_DEBUG
1142
+
1143
+  /**
1057
    * You can set your own advanced settings by filling in predefined functions.
1144
    * You can set your own advanced settings by filling in predefined functions.
1058
    * A list of available functions can be found on the library github page
1145
    * A list of available functions can be found on the library github page
1059
    * https://github.com/teemuatlut/TMC2130Stepper
1146
    * https://github.com/teemuatlut/TMC2130Stepper
1147
+   * https://github.com/teemuatlut/TMC2208Stepper
1060
    *
1148
    *
1061
    * Example:
1149
    * Example:
1062
-   * #define TMC2130_ADV() { \
1150
+   * #define TMC_ADV() { \
1063
    *   stepperX.diag0_temp_prewarn(1); \
1151
    *   stepperX.diag0_temp_prewarn(1); \
1064
-   *   stepperX.interpolate(0); \
1152
+   *   stepperY.interpolate(0); \
1065
    * }
1153
    * }
1066
    */
1154
    */
1067
-  #define  TMC2130_ADV() {  }
1155
+  #define  TMC_ADV() {  }
1068
 
1156
 
1069
-#endif // HAVE_TMC2130
1157
+#endif // TMC2130 || TMC2208
1070
 
1158
 
1071
 // @section L6470
1159
 // @section L6470
1072
 
1160
 
1231
 #endif
1319
 #endif
1232
 
1320
 
1233
 /**
1321
 /**
1322
+ * Filament Width Sensor
1323
+ *
1324
+ * Measures the filament width in real-time and adjusts
1325
+ * flow rate to compensate for any irregularities.
1326
+ *
1327
+ * Also allows the measured filament diameter to set the
1328
+ * extrusion rate, so the slicer only has to specify the
1329
+ * volume.
1330
+ *
1331
+ * Only a single extruder is supported at this time.
1332
+ *
1333
+ *  34 RAMPS_14    : Analog input 5 on the AUX2 connector
1334
+ *  81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
1335
+ * 301 RAMBO       : Analog input 3
1336
+ *
1337
+ * Note: May require analog pins to be defined for other boards.
1338
+ */
1339
+//#define FILAMENT_WIDTH_SENSOR
1340
+
1341
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
1342
+  #define FILAMENT_SENSOR_EXTRUDER_NUM 0    // Index of the extruder that has the filament sensor. :[0,1,2,3,4]
1343
+  #define MEASUREMENT_DELAY_CM        14    // (cm) The distance from the filament sensor to the melting chamber
1344
+
1345
+  #define MEASURED_UPPER_LIMIT         3.30 // (mm) Upper limit used to validate sensor reading
1346
+  #define MEASURED_LOWER_LIMIT         1.90 // (mm) Lower limit used to validate sensor reading
1347
+  #define MAX_MEASUREMENT_DELAY       20    // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
1348
+
1349
+  #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
1350
+
1351
+  // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
1352
+  //#define FILAMENT_LCD_DISPLAY
1353
+#endif
1354
+
1355
+/**
1356
+ * CNC Coordinate Systems
1357
+ *
1358
+ * Enables G53 and G54-G59.3 commands to select coordinate systems
1359
+ * and G92.1 to reset the workspace to native machine space.
1360
+ */
1361
+//#define CNC_COORDINATE_SYSTEMS
1362
+
1363
+/**
1234
  * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
1364
  * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
1235
  */
1365
  */
1236
 //#define PINS_DEBUGGING
1366
 //#define PINS_DEBUGGING
1421
                                          // tweaks made to the configuration are affecting the printer in real-time.
1551
                                          // tweaks made to the configuration are affecting the printer in real-time.
1422
 #endif
1552
 #endif
1423
 
1553
 
1554
+/**
1555
+ * NanoDLP Sync support
1556
+ *
1557
+ * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
1558
+ * string to enable synchronization with DLP projector exposure. This change will allow to use
1559
+ * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
1560
+ */
1561
+//#define NANODLP_Z_SYNC
1562
+#if ENABLED(NANODLP_Z_SYNC)
1563
+  //#define NANODLP_ALL_AXIS  // Enables "Z_move_comp" output on any axis move.
1564
+                              // Default behaviour is limited to Z axis only.
1565
+#endif
1566
+
1424
 #endif // CONFIGURATION_ADV_H
1567
 #endif // CONFIGURATION_ADV_H

+ 159
- 90
Marlin/example_configurations/AliExpress/CL-260/Configuration.h Переглянути файл

37
  */
37
  */
38
 #ifndef CONFIGURATION_H
38
 #ifndef CONFIGURATION_H
39
 #define CONFIGURATION_H
39
 #define CONFIGURATION_H
40
-#define CONFIGURATION_H_VERSION 010100
40
+#define CONFIGURATION_H_VERSION 010107
41
 
41
 
42
 //===========================================================================
42
 //===========================================================================
43
 //============================= Getting Started =============================
43
 //============================= Getting Started =============================
136
 // :[1, 2, 3, 4, 5]
136
 // :[1, 2, 3, 4, 5]
137
 #define EXTRUDERS 1
137
 #define EXTRUDERS 1
138
 
138
 
139
+// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
140
+#define DEFAULT_NOMINAL_FILAMENT_DIA 3.0
141
+
139
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
142
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
140
 //#define SINGLENOZZLE
143
 //#define SINGLENOZZLE
141
 
144
 
336
 
339
 
337
 // Comment the following line to disable PID and enable bang-bang.
340
 // Comment the following line to disable PID and enable bang-bang.
338
 #define PIDTEMP
341
 #define PIDTEMP
339
-#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
340
-#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
342
+#define BANG_MAX 255     // Limits current to nozzle while in bang-bang mode; 255=full current
343
+#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
344
+#define PID_K1 0.95      // Smoothing factor within the PID
341
 #if ENABLED(PIDTEMP)
345
 #if ENABLED(PIDTEMP)
342
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
346
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
343
   //#define PID_DEBUG // Sends debug data to the serial port.
347
   //#define PID_DEBUG // Sends debug data to the serial port.
347
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
351
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
348
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
352
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
349
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
353
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
350
-  #define K1 0.95 //smoothing factor within the PID
351
 
354
 
352
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
355
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
353
 
356
 
428
 //===========================================================================
431
 //===========================================================================
429
 
432
 
430
 /**
433
 /**
431
- * Thermal Protection protects your printer from damage and fire if a
432
- * thermistor falls out or temperature sensors fail in any way.
434
+ * Thermal Protection provides additional protection to your printer from damage
435
+ * and fire. Marlin always includes safe min and max temperature ranges which
436
+ * protect against a broken or disconnected thermistor wire.
433
  *
437
  *
434
- * The issue: If a thermistor falls out or a temperature sensor fails,
435
- * Marlin can no longer sense the actual temperature. Since a disconnected
436
- * thermistor reads as a low temperature, the firmware will keep the heater on.
438
+ * The issue: If a thermistor falls out, it will report the much lower
439
+ * temperature of the air in the room, and the the firmware will keep
440
+ * the heater on.
437
  *
441
  *
438
  * If you get "Thermal Runaway" or "Heating failed" errors the
442
  * If you get "Thermal Runaway" or "Heating failed" errors the
439
  * details can be tuned in Configuration_adv.h
443
  * details can be tuned in Configuration_adv.h
573
 // @section probes
577
 // @section probes
574
 
578
 
575
 //
579
 //
576
-// See http://marlinfw.org/configuration/probes.html
580
+// See http://marlinfw.org/docs/configuration/probes.html
577
 //
581
 //
578
 
582
 
579
 /**
583
 /**
686
 // X and Y axis travel speed (mm/m) between probes
690
 // X and Y axis travel speed (mm/m) between probes
687
 #define XY_PROBE_SPEED 8000
691
 #define XY_PROBE_SPEED 8000
688
 
692
 
689
-// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH)
693
+// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
690
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
694
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
691
 
695
 
692
 // Speed for the "accurate" probe of each point
696
 // Speed for the "accurate" probe of each point
693
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
697
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
694
 
698
 
695
-// Use double touch for probing
696
-//#define PROBE_DOUBLE_TOUCH
699
+// The number of probes to perform at each point.
700
+//   Set to 2 for a fast/slow probe, using the second probe result.
701
+//   Set to 3 or more for slow probes, averaging the results.
702
+//#define MULTIPLE_PROBING 2
697
 
703
 
698
 /**
704
 /**
699
  * Z probes require clearance when deploying, stowing, and moving between
705
  * Z probes require clearance when deploying, stowing, and moving between
785
 #define Y_MAX_POS Y_BED_SIZE
791
 #define Y_MAX_POS Y_BED_SIZE
786
 #define Z_MAX_POS 260
792
 #define Z_MAX_POS 260
787
 
793
 
788
-// If enabled, axes won't move below MIN_POS in response to movement commands.
794
+/**
795
+ * Software Endstops
796
+ *
797
+ * - Prevent moves outside the set machine bounds.
798
+ * - Individual axes can be disabled, if desired.
799
+ * - X and Y only apply to Cartesian robots.
800
+ * - Use 'M211' to set software endstops on/off or report current state
801
+ */
802
+
803
+// Min software endstops curtail movement below minimum coordinate bounds
789
 #define MIN_SOFTWARE_ENDSTOPS
804
 #define MIN_SOFTWARE_ENDSTOPS
790
-// If enabled, axes won't move above MAX_POS in response to movement commands.
805
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
806
+  #define MIN_SOFTWARE_ENDSTOP_X
807
+  #define MIN_SOFTWARE_ENDSTOP_Y
808
+  #define MIN_SOFTWARE_ENDSTOP_Z
809
+#endif
810
+
811
+// Max software endstops curtail movement above maximum coordinate bounds
791
 #define MAX_SOFTWARE_ENDSTOPS
812
 #define MAX_SOFTWARE_ENDSTOPS
813
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
814
+  #define MAX_SOFTWARE_ENDSTOP_X
815
+  #define MAX_SOFTWARE_ENDSTOP_Y
816
+  #define MAX_SOFTWARE_ENDSTOP_Z
817
+#endif
792
 
818
 
793
 /**
819
 /**
794
  * Filament Runout Sensor
820
  * Filament Runout Sensor
808
 //===========================================================================
834
 //===========================================================================
809
 //=============================== Bed Leveling ==============================
835
 //=============================== Bed Leveling ==============================
810
 //===========================================================================
836
 //===========================================================================
811
-// @section bedlevel
837
+// @section calibrate
812
 
838
 
813
 /**
839
 /**
814
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
840
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
834
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
860
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
835
  *   A comprehensive bed leveling system combining the features and benefits
861
  *   A comprehensive bed leveling system combining the features and benefits
836
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
862
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
837
- *   Validation and Mesh Editing systems. Currently, UBL is only checked out
838
- *   for Cartesian Printers. That said, it was primarily designed to correct
839
- *   poor quality Delta Printers. If you feel adventurous and have a Delta,
840
- *   please post an issue if something doesn't work correctly. Initially,
841
- *   you will need to set a reduced bed size so you have a rectangular area
842
- *   to test on.
863
+ *   Validation and Mesh Editing systems.
843
  *
864
  *
844
  * - MESH_BED_LEVELING
865
  * - MESH_BED_LEVELING
845
  *   Probe a grid manually
866
  *   Probe a grid manually
866
   // at which point movement will be level to the machine's XY plane.
887
   // at which point movement will be level to the machine's XY plane.
867
   // The height can be set with M420 Z<height>
888
   // The height can be set with M420 Z<height>
868
   #define ENABLE_LEVELING_FADE_HEIGHT
889
   #define ENABLE_LEVELING_FADE_HEIGHT
890
+
891
+  // For Cartesian machines, instead of dividing moves on mesh boundaries,
892
+  // split up moves into short segments like a Delta. This follows the
893
+  // contours of the bed more closely than edge-to-edge straight moves.
894
+  #define SEGMENT_LEVELED_MOVES
895
+  #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)
896
+
897
+  /**
898
+   * Enable the G26 Mesh Validation Pattern tool.
899
+   */
900
+  //#define G26_MESH_VALIDATION   // Enable G26 mesh validation
901
+  #if ENABLED(G26_MESH_VALIDATION)
902
+    #define MESH_TEST_NOZZLE_SIZE     0.4   // (mm) Diameter of primary nozzle.
903
+    #define MESH_TEST_LAYER_HEIGHT    0.2   // (mm) Default layer height for the G26 Mesh Validation Tool.
904
+    #define MESH_TEST_HOTEND_TEMP   205.0   // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
905
+    #define MESH_TEST_BED_TEMP       60.0   // (°C) Default bed temperature for the G26 Mesh Validation Tool.
906
+  #endif
907
+
869
 #endif
908
 #endif
870
 
909
 
871
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
910
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
921
   //========================= Unified Bed Leveling ============================
960
   //========================= Unified Bed Leveling ============================
922
   //===========================================================================
961
   //===========================================================================
923
 
962
 
924
-  #define UBL_MESH_INSET 1          // Mesh inset margin on print area
963
+  //#define MESH_EDIT_GFX_OVERLAY   // Display a graphics overlay while editing the mesh
964
+
965
+  #define MESH_INSET 1              // Mesh inset margin on print area
925
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
966
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
926
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
967
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
927
 
968
 
932
   #define UBL_PROBE_PT_3_X 180
973
   #define UBL_PROBE_PT_3_X 180
933
   #define UBL_PROBE_PT_3_Y 20
974
   #define UBL_PROBE_PT_3_Y 20
934
 
975
 
935
-  #define UBL_G26_MESH_VALIDATION   // Enable G26 mesh validation
936
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
976
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
977
+  #define UBL_SAVE_ACTIVE_ON_M500   // Save the currently active mesh in the current slot on M500
937
 
978
 
938
 #elif ENABLED(MESH_BED_LEVELING)
979
 #elif ENABLED(MESH_BED_LEVELING)
939
 
980
 
993
 //#define Z_SAFE_HOMING
1034
 //#define Z_SAFE_HOMING
994
 
1035
 
995
 #if ENABLED(Z_SAFE_HOMING)
1036
 #if ENABLED(Z_SAFE_HOMING)
996
-  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axis (G28).
997
-  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axis (G28).
1037
+  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axes (G28).
1038
+  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axes (G28).
998
 #endif
1039
 #endif
999
 
1040
 
1000
 // Homing speeds (mm/m)
1041
 // Homing speeds (mm/m)
1001
 #define HOMING_FEEDRATE_XY (50*60)
1042
 #define HOMING_FEEDRATE_XY (50*60)
1002
 #define HOMING_FEEDRATE_Z  (4*60)
1043
 #define HOMING_FEEDRATE_Z  (4*60)
1003
 
1044
 
1045
+// @section calibrate
1046
+
1047
+/**
1048
+ * Bed Skew Compensation
1049
+ *
1050
+ * This feature corrects for misalignment in the XYZ axes.
1051
+ *
1052
+ * Take the following steps to get the bed skew in the XY plane:
1053
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1054
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1055
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1056
+ *  4. For XY_SIDE_AD measure the edge A to D
1057
+ *
1058
+ * Marlin automatically computes skew factors from these measurements.
1059
+ * Skew factors may also be computed and set manually:
1060
+ *
1061
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1062
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1063
+ *
1064
+ * If desired, follow the same procedure for XZ and YZ.
1065
+ * Use these diagrams for reference:
1066
+ *
1067
+ *    Y                     Z                     Z
1068
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1069
+ *    |    /       /        |    /       /        |    /       /
1070
+ *    |   /       /         |   /       /         |   /       /
1071
+ *    |  A-------D          |  A-------D          |  A-------D
1072
+ *    +-------------->X     +-------------->X     +-------------->Y
1073
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1074
+ */
1075
+//#define SKEW_CORRECTION
1076
+
1077
+#if ENABLED(SKEW_CORRECTION)
1078
+  // Input all length measurements here:
1079
+  #define XY_DIAG_AC 282.8427124746
1080
+  #define XY_DIAG_BD 282.8427124746
1081
+  #define XY_SIDE_AD 200
1082
+
1083
+  // Or, set the default skew factors directly here
1084
+  // to override the above measurements:
1085
+  #define XY_SKEW_FACTOR 0.0
1086
+
1087
+  //#define SKEW_CORRECTION_FOR_Z
1088
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1089
+    #define XZ_DIAG_AC 282.8427124746
1090
+    #define XZ_DIAG_BD 282.8427124746
1091
+    #define YZ_DIAG_AC 282.8427124746
1092
+    #define YZ_DIAG_BD 282.8427124746
1093
+    #define YZ_SIDE_AD 200
1094
+    #define XZ_SKEW_FACTOR 0.0
1095
+    #define YZ_SKEW_FACTOR 0.0
1096
+  #endif
1097
+
1098
+  // Enable this option for M852 to set skew at runtime
1099
+  //#define SKEW_CORRECTION_GCODE
1100
+#endif
1101
+
1004
 //=============================================================================
1102
 //=============================================================================
1005
 //============================= Additional Features ===========================
1103
 //============================= Additional Features ===========================
1006
 //=============================================================================
1104
 //=============================================================================
1032
 //
1130
 //
1033
 // M100 Free Memory Watcher
1131
 // M100 Free Memory Watcher
1034
 //
1132
 //
1035
-//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
1133
+//#define M100_FREE_MEMORY_WATCHER    // Add M100 (Free Memory Watcher) to debug memory usage
1036
 
1134
 
1037
 //
1135
 //
1038
 // G20/G21 Inch mode support
1136
 // G20/G21 Inch mode support
1177
  *
1275
  *
1178
  * Select the language to display on the LCD. These languages are available:
1276
  * Select the language to display on the LCD. These languages are available:
1179
  *
1277
  *
1180
- *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, gl, hr,
1181
- *    it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1278
+ *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, fr_utf8, gl,
1279
+ *    hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1182
  *    tr, uk, zh_CN, zh_TW, test
1280
  *    tr, uk, zh_CN, zh_TW, test
1183
  *
1281
  *
1184
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1282
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1185
  */
1283
  */
1186
 #define LCD_LANGUAGE en
1284
 #define LCD_LANGUAGE en
1187
 
1285
 
1309
 // Note: Test audio output with the G-Code:
1407
 // Note: Test audio output with the G-Code:
1310
 //  M300 S<frequency Hz> P<duration ms>
1408
 //  M300 S<frequency Hz> P<duration ms>
1311
 //
1409
 //
1312
-//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
1313
-//#define LCD_FEEDBACK_FREQUENCY_HZ 1000
1410
+//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
1411
+//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
1314
 
1412
 
1315
 //
1413
 //
1316
 // CONTROLLER TYPE: Standard
1414
 // CONTROLLER TYPE: Standard
1418
 //#define CARTESIO_UI
1516
 //#define CARTESIO_UI
1419
 
1517
 
1420
 //
1518
 //
1421
-// ANET_10 Controller supported displays.
1519
+// ANET and Tronxy Controller supported displays.
1422
 //
1520
 //
1423
-//#define ANET_KEYPAD_LCD         // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1521
+//#define ZONESTAR_LCD            // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1424
                                   // This LCD is known to be susceptible to electrical interference
1522
                                   // This LCD is known to be susceptible to electrical interference
1425
                                   // which scrambles the display.  Pressing any button clears it up.
1523
                                   // which scrambles the display.  Pressing any button clears it up.
1524
+                                  // This is a LCD2004 display with 5 analog buttons.
1525
+
1426
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1526
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1427
                                   // A clone of the RepRapDiscount full graphics display but with
1527
                                   // A clone of the RepRapDiscount full graphics display but with
1428
                                   // different pins/wiring (see pins_ANET_10.h).
1528
                                   // different pins/wiring (see pins_ANET_10.h).
1532
 //
1632
 //
1533
 //#define MKS_12864OLED
1633
 //#define MKS_12864OLED
1534
 
1634
 
1635
+// Silvergate GLCD controller
1636
+// http://github.com/android444/Silvergate
1637
+//
1638
+//#define SILVER_GATE_GLCD_CONTROLLER
1639
+
1535
 //=============================================================================
1640
 //=============================================================================
1536
 //=============================== Extra Features ==============================
1641
 //=============================== Extra Features ==============================
1537
 //=============================================================================
1642
 //=============================================================================
1588
  * Adds the M150 command to set the LED (or LED strip) color.
1693
  * Adds the M150 command to set the LED (or LED strip) color.
1589
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1694
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1590
  * luminance values can be set from 0 to 255.
1695
  * luminance values can be set from 0 to 255.
1591
- * For Neopixel LED overall brightness parameters is also available 
1696
+ * For Neopixel LED an overall brightness parameter is also available.
1592
  *
1697
  *
1593
  * *** CAUTION ***
1698
  * *** CAUTION ***
1594
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1699
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1595
  *  as the Arduino cannot handle the current the LEDs will require.
1700
  *  as the Arduino cannot handle the current the LEDs will require.
1596
  *  Failure to follow this precaution can destroy your Arduino!
1701
  *  Failure to follow this precaution can destroy your Arduino!
1597
- *  The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
1598
- *  cannot handle such current, separate 5V power supply must be used
1702
+ *  NOTE: A separate 5V power supply is required! The Neopixel LED needs
1703
+ *  more current than the Arduino 5V linear regulator can produce.
1599
  * *** CAUTION ***
1704
  * *** CAUTION ***
1600
  *
1705
  *
1601
- * LED type. This options are mutualy exclusive. Uncomment only one.
1706
+ * LED Type. Enable only one of the following two options.
1602
  *
1707
  *
1603
  */
1708
  */
1604
 //#define RGB_LED
1709
 //#define RGB_LED
1614
 // Support for Adafruit Neopixel LED driver
1719
 // Support for Adafruit Neopixel LED driver
1615
 //#define NEOPIXEL_LED
1720
 //#define NEOPIXEL_LED
1616
 #if ENABLED(NEOPIXEL_LED)
1721
 #if ENABLED(NEOPIXEL_LED)
1617
-  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
1722
+  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
1618
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1723
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1619
-  #define NEOPIXEL_PIXELS 30       // Number of LEDs on strip
1620
-  #define NEOPIXEL_IS_SEQUENTIAL   // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
1621
-  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness 0-255
1724
+  #define NEOPIXEL_PIXELS 30       // Number of LEDs in the strip
1725
+  #define NEOPIXEL_IS_SEQUENTIAL   // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
1726
+  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness (0-255)
1622
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1727
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1623
 #endif
1728
 #endif
1624
 
1729
 
1633
  *  - Change to green once print has finished
1738
  *  - Change to green once print has finished
1634
  *  - Turn off after the print has finished and the user has pushed a button
1739
  *  - Turn off after the print has finished and the user has pushed a button
1635
  */
1740
  */
1636
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED)
1741
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
1637
   #define PRINTER_EVENT_LEDS
1742
   #define PRINTER_EVENT_LEDS
1638
 #endif
1743
 #endif
1639
 
1744
 
1640
-/*********************************************************************\
1641
-* R/C SERVO support
1642
-* Sponsored by TrinityLabs, Reworked by codexmas
1643
-**********************************************************************/
1745
+/**
1746
+ * R/C SERVO support
1747
+ * Sponsored by TrinityLabs, Reworked by codexmas
1748
+ */
1644
 
1749
 
1645
-// Number of servos
1646
-//
1647
-// If you select a configuration below, this will receive a default value and does not need to be set manually
1648
-// set it manually if you have more servos than extruders and wish to manually control some
1649
-// leaving it undefined or defining as 0 will disable the servo subsystem
1650
-// If unsure, leave commented / disabled
1651
-//
1750
+/**
1751
+ * Number of servos
1752
+ *
1753
+ * For some servo-related options NUM_SERVOS will be set automatically.
1754
+ * Set this manually if there are extra servos needing manual control.
1755
+ * Leave undefined or set to 0 to entirely disable the servo subsystem.
1756
+ */
1652
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1757
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1653
 
1758
 
1654
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1759
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1661
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1766
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1662
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1767
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1663
 
1768
 
1664
-/**
1665
- * Filament Width Sensor
1666
- *
1667
- * Measures the filament width in real-time and adjusts
1668
- * flow rate to compensate for any irregularities.
1669
- *
1670
- * Also allows the measured filament diameter to set the
1671
- * extrusion rate, so the slicer only has to specify the
1672
- * volume.
1673
- *
1674
- * Only a single extruder is supported at this time.
1675
- *
1676
- *  34 RAMPS_14    : Analog input 5 on the AUX2 connector
1677
- *  81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
1678
- * 301 RAMBO       : Analog input 3
1679
- *
1680
- * Note: May require analog pins to be defined for other boards.
1681
- */
1682
-//#define FILAMENT_WIDTH_SENSOR
1683
-
1684
-#define DEFAULT_NOMINAL_FILAMENT_DIA 3.00   // (mm) Diameter of the filament generally used (3.0 or 1.75mm), also used in the slicer. Used to validate sensor reading.
1685
-
1686
-#if ENABLED(FILAMENT_WIDTH_SENSOR)
1687
-  #define FILAMENT_SENSOR_EXTRUDER_NUM 0    // Index of the extruder that has the filament sensor (0,1,2,3)
1688
-  #define MEASUREMENT_DELAY_CM        14    // (cm) The distance from the filament sensor to the melting chamber
1689
-
1690
-  #define MEASURED_UPPER_LIMIT         3.30 // (mm) Upper limit used to validate sensor reading
1691
-  #define MEASURED_LOWER_LIMIT         1.90 // (mm) Lower limit used to validate sensor reading
1692
-  #define MAX_MEASUREMENT_DELAY       20    // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
1693
-
1694
-  #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
1695
-
1696
-  // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
1697
-  //#define FILAMENT_LCD_DISPLAY
1698
-#endif
1699
-
1700
 #endif // CONFIGURATION_H
1769
 #endif // CONFIGURATION_H

+ 163
- 94
Marlin/example_configurations/Anet/A6/Configuration.h Переглянути файл

37
  */
37
  */
38
 #ifndef CONFIGURATION_H
38
 #ifndef CONFIGURATION_H
39
 #define CONFIGURATION_H
39
 #define CONFIGURATION_H
40
-#define CONFIGURATION_H_VERSION 010100
40
+#define CONFIGURATION_H_VERSION 010107
41
 
41
 
42
 //===========================================================================
42
 //===========================================================================
43
 //============================= Getting Started =============================
43
 //============================= Getting Started =============================
136
 // :[1, 2, 3, 4, 5]
136
 // :[1, 2, 3, 4, 5]
137
 #define EXTRUDERS 1
137
 #define EXTRUDERS 1
138
 
138
 
139
+// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
140
+#define DEFAULT_NOMINAL_FILAMENT_DIA 3.0
141
+
139
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
142
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
140
 //#define SINGLENOZZLE
143
 //#define SINGLENOZZLE
141
 
144
 
336
 
339
 
337
 // Comment the following line to disable PID and enable bang-bang.
340
 // Comment the following line to disable PID and enable bang-bang.
338
 #define PIDTEMP
341
 #define PIDTEMP
339
-#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
340
-#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
342
+#define BANG_MAX 255     // Limits current to nozzle while in bang-bang mode; 255=full current
343
+#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
344
+#define PID_K1 0.95      // Smoothing factor within the PID
341
 #if ENABLED(PIDTEMP)
345
 #if ENABLED(PIDTEMP)
342
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
346
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
343
   //#define PID_DEBUG // Sends debug data to the serial port.
347
   //#define PID_DEBUG // Sends debug data to the serial port.
347
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
351
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
348
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
352
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
349
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
353
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
350
-  #define K1 0.95 //smoothing factor within the PID
351
 
354
 
352
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
355
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
353
 
356
 
448
 //===========================================================================
451
 //===========================================================================
449
 
452
 
450
 /**
453
 /**
451
- * Thermal Protection protects your printer from damage and fire if a
452
- * thermistor falls out or temperature sensors fail in any way.
454
+ * Thermal Protection provides additional protection to your printer from damage
455
+ * and fire. Marlin always includes safe min and max temperature ranges which
456
+ * protect against a broken or disconnected thermistor wire.
453
  *
457
  *
454
- * The issue: If a thermistor falls out or a temperature sensor fails,
455
- * Marlin can no longer sense the actual temperature. Since a disconnected
456
- * thermistor reads as a low temperature, the firmware will keep the heater on.
458
+ * The issue: If a thermistor falls out, it will report the much lower
459
+ * temperature of the air in the room, and the the firmware will keep
460
+ * the heater on.
457
  *
461
  *
458
  * If you get "Thermal Runaway" or "Heating failed" errors the
462
  * If you get "Thermal Runaway" or "Heating failed" errors the
459
  * details can be tuned in Configuration_adv.h
463
  * details can be tuned in Configuration_adv.h
630
 // @section probes
634
 // @section probes
631
 
635
 
632
 //
636
 //
633
-// See http://marlinfw.org/configuration/probes.html
637
+// See http://marlinfw.org/docs/configuration/probes.html
634
 //
638
 //
635
 
639
 
636
 /**
640
 /**
765
 #define XY_PROBE_SPEED 8000
769
 #define XY_PROBE_SPEED 8000
766
 //#define XY_PROBE_SPEED 6000
770
 //#define XY_PROBE_SPEED 6000
767
 
771
 
768
-// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH)
772
+// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
769
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
773
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
770
 
774
 
771
 // Speed for the "accurate" probe of each point
775
 // Speed for the "accurate" probe of each point
772
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 3)
776
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 3)
773
 
777
 
774
-// Use double touch for probing
775
-#define PROBE_DOUBLE_TOUCH
778
+// The number of probes to perform at each point.
779
+//   Set to 2 for a fast/slow probe, using the second probe result.
780
+//   Set to 3 or more for slow probes, averaging the results.
781
+#define MULTIPLE_PROBING 2
776
 
782
 
777
 /**
783
 /**
778
  * Z probes require clearance when deploying, stowing, and moving between
784
  * Z probes require clearance when deploying, stowing, and moving between
904
 #define X_MAX_POS X_BED_SIZE
910
 #define X_MAX_POS X_BED_SIZE
905
 #define Y_MAX_POS Y_BED_SIZE
911
 #define Y_MAX_POS Y_BED_SIZE
906
 
912
 
907
-// If enabled, axes won't move below MIN_POS in response to movement commands.
913
+/**
914
+ * Software Endstops
915
+ *
916
+ * - Prevent moves outside the set machine bounds.
917
+ * - Individual axes can be disabled, if desired.
918
+ * - X and Y only apply to Cartesian robots.
919
+ * - Use 'M211' to set software endstops on/off or report current state
920
+ */
921
+
922
+// Min software endstops curtail movement below minimum coordinate bounds
908
 #define MIN_SOFTWARE_ENDSTOPS
923
 #define MIN_SOFTWARE_ENDSTOPS
909
-// If enabled, axes won't move above MAX_POS in response to movement commands.
924
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
925
+  #define MIN_SOFTWARE_ENDSTOP_X
926
+  #define MIN_SOFTWARE_ENDSTOP_Y
927
+  #define MIN_SOFTWARE_ENDSTOP_Z
928
+#endif
929
+
930
+// Max software endstops curtail movement above maximum coordinate bounds
910
 #define MAX_SOFTWARE_ENDSTOPS
931
 #define MAX_SOFTWARE_ENDSTOPS
932
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
933
+  #define MAX_SOFTWARE_ENDSTOP_X
934
+  #define MAX_SOFTWARE_ENDSTOP_Y
935
+  #define MAX_SOFTWARE_ENDSTOP_Z
936
+#endif
911
 
937
 
912
 /**
938
 /**
913
  * Filament Runout Sensor
939
  * Filament Runout Sensor
927
 //===========================================================================
953
 //===========================================================================
928
 //=============================== Bed Leveling ==============================
954
 //=============================== Bed Leveling ==============================
929
 //===========================================================================
955
 //===========================================================================
930
-// @section bedlevel
956
+// @section calibrate
931
 
957
 
932
 /**
958
 /**
933
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
959
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
953
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
979
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
954
  *   A comprehensive bed leveling system combining the features and benefits
980
  *   A comprehensive bed leveling system combining the features and benefits
955
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
981
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
956
- *   Validation and Mesh Editing systems. Currently, UBL is only checked out
957
- *   for Cartesian Printers. That said, it was primarily designed to correct
958
- *   poor quality Delta Printers. If you feel adventurous and have a Delta,
959
- *   please post an issue if something doesn't work correctly. Initially,
960
- *   you will need to set a reduced bed size so you have a rectangular area
961
- *   to test on.
982
+ *   Validation and Mesh Editing systems.
962
  *
983
  *
963
  * - MESH_BED_LEVELING
984
  * - MESH_BED_LEVELING
964
  *   Probe a grid manually
985
  *   Probe a grid manually
985
   // at which point movement will be level to the machine's XY plane.
1006
   // at which point movement will be level to the machine's XY plane.
986
   // The height can be set with M420 Z<height>
1007
   // The height can be set with M420 Z<height>
987
   #define ENABLE_LEVELING_FADE_HEIGHT
1008
   #define ENABLE_LEVELING_FADE_HEIGHT
1009
+
1010
+  // For Cartesian machines, instead of dividing moves on mesh boundaries,
1011
+  // split up moves into short segments like a Delta. This follows the
1012
+  // contours of the bed more closely than edge-to-edge straight moves.
1013
+  #define SEGMENT_LEVELED_MOVES
1014
+  #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)
1015
+
1016
+  /**
1017
+   * Enable the G26 Mesh Validation Pattern tool.
1018
+   */
1019
+  //#define G26_MESH_VALIDATION   // Enable G26 mesh validation
1020
+  #if ENABLED(G26_MESH_VALIDATION)
1021
+    #define MESH_TEST_NOZZLE_SIZE     0.4   // (mm) Diameter of primary nozzle.
1022
+    #define MESH_TEST_LAYER_HEIGHT    0.2   // (mm) Default layer height for the G26 Mesh Validation Tool.
1023
+    #define MESH_TEST_HOTEND_TEMP   205.0   // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
1024
+    #define MESH_TEST_BED_TEMP       60.0   // (°C) Default bed temperature for the G26 Mesh Validation Tool.
1025
+  #endif
1026
+
988
 #endif
1027
 #endif
989
 
1028
 
990
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
1029
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
1064
   //========================= Unified Bed Leveling ============================
1103
   //========================= Unified Bed Leveling ============================
1065
   //===========================================================================
1104
   //===========================================================================
1066
 
1105
 
1067
-  #define UBL_MESH_INSET 1          // Mesh inset margin on print area
1106
+  //#define MESH_EDIT_GFX_OVERLAY   // Display a graphics overlay while editing the mesh
1107
+
1108
+  #define MESH_INSET 1              // Mesh inset margin on print area
1068
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
1109
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
1069
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
1110
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
1070
 
1111
 
1075
   #define UBL_PROBE_PT_3_X 180
1116
   #define UBL_PROBE_PT_3_X 180
1076
   #define UBL_PROBE_PT_3_Y 20
1117
   #define UBL_PROBE_PT_3_Y 20
1077
 
1118
 
1078
-  #define UBL_G26_MESH_VALIDATION   // Enable G26 mesh validation
1079
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
1119
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
1120
+  #define UBL_SAVE_ACTIVE_ON_M500   // Save the currently active mesh in the current slot on M500
1080
 
1121
 
1081
 #elif ENABLED(MESH_BED_LEVELING)
1122
 #elif ENABLED(MESH_BED_LEVELING)
1082
 
1123
 
1141
 #define Z_SAFE_HOMING
1182
 #define Z_SAFE_HOMING
1142
 
1183
 
1143
 #if ENABLED(Z_SAFE_HOMING)
1184
 #if ENABLED(Z_SAFE_HOMING)
1144
-  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axis (G28).
1145
-  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axis (G28).
1185
+  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axes (G28).
1186
+  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axes (G28).
1146
 
1187
 
1147
   //Anet A6 with new X-Axis
1188
   //Anet A6 with new X-Axis
1148
-  //#define Z_SAFE_HOMING_X_POINT 113    // X point for Z homing when homing all axis (G28).
1149
-  //#define Z_SAFE_HOMING_Y_POINT 112    // Y point for Z homing when homing all axis (G28).
1189
+  //#define Z_SAFE_HOMING_X_POINT 113    // X point for Z homing when homing all axes (G28).
1190
+  //#define Z_SAFE_HOMING_Y_POINT 112    // Y point for Z homing when homing all axes (G28).
1150
 
1191
 
1151
   //Anet A6 with new X-Axis and defined X_HOME_POS -7, Y_HOME_POS -6
1192
   //Anet A6 with new X-Axis and defined X_HOME_POS -7, Y_HOME_POS -6
1152
-  //#define Z_SAFE_HOMING_X_POINT 107    // X point for Z homing when homing all axis (G28).
1153
-  //#define Z_SAFE_HOMING_Y_POINT 107    // Y point for Z homing when homing all axis (G28).
1193
+  //#define Z_SAFE_HOMING_X_POINT 107    // X point for Z homing when homing all axes (G28).
1194
+  //#define Z_SAFE_HOMING_Y_POINT 107    // Y point for Z homing when homing all axes (G28).
1154
 
1195
 
1155
 #endif
1196
 #endif
1156
 
1197
 
1158
 #define HOMING_FEEDRATE_XY (50*60)
1199
 #define HOMING_FEEDRATE_XY (50*60)
1159
 #define HOMING_FEEDRATE_Z  (4*60)
1200
 #define HOMING_FEEDRATE_Z  (4*60)
1160
 
1201
 
1202
+// @section calibrate
1203
+
1204
+/**
1205
+ * Bed Skew Compensation
1206
+ *
1207
+ * This feature corrects for misalignment in the XYZ axes.
1208
+ *
1209
+ * Take the following steps to get the bed skew in the XY plane:
1210
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1211
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1212
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1213
+ *  4. For XY_SIDE_AD measure the edge A to D
1214
+ *
1215
+ * Marlin automatically computes skew factors from these measurements.
1216
+ * Skew factors may also be computed and set manually:
1217
+ *
1218
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1219
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1220
+ *
1221
+ * If desired, follow the same procedure for XZ and YZ.
1222
+ * Use these diagrams for reference:
1223
+ *
1224
+ *    Y                     Z                     Z
1225
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1226
+ *    |    /       /        |    /       /        |    /       /
1227
+ *    |   /       /         |   /       /         |   /       /
1228
+ *    |  A-------D          |  A-------D          |  A-------D
1229
+ *    +-------------->X     +-------------->X     +-------------->Y
1230
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1231
+ */
1232
+//#define SKEW_CORRECTION
1233
+
1234
+#if ENABLED(SKEW_CORRECTION)
1235
+  // Input all length measurements here:
1236
+  #define XY_DIAG_AC 282.8427124746
1237
+  #define XY_DIAG_BD 282.8427124746
1238
+  #define XY_SIDE_AD 200
1239
+
1240
+  // Or, set the default skew factors directly here
1241
+  // to override the above measurements:
1242
+  #define XY_SKEW_FACTOR 0.0
1243
+
1244
+  //#define SKEW_CORRECTION_FOR_Z
1245
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1246
+    #define XZ_DIAG_AC 282.8427124746
1247
+    #define XZ_DIAG_BD 282.8427124746
1248
+    #define YZ_DIAG_AC 282.8427124746
1249
+    #define YZ_DIAG_BD 282.8427124746
1250
+    #define YZ_SIDE_AD 200
1251
+    #define XZ_SKEW_FACTOR 0.0
1252
+    #define YZ_SKEW_FACTOR 0.0
1253
+  #endif
1254
+
1255
+  // Enable this option for M852 to set skew at runtime
1256
+  //#define SKEW_CORRECTION_GCODE
1257
+#endif
1258
+
1161
 //=============================================================================
1259
 //=============================================================================
1162
 //============================= Additional Features ===========================
1260
 //============================= Additional Features ===========================
1163
 //=============================================================================
1261
 //=============================================================================
1189
 //
1287
 //
1190
 // M100 Free Memory Watcher
1288
 // M100 Free Memory Watcher
1191
 //
1289
 //
1192
-//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
1290
+//#define M100_FREE_MEMORY_WATCHER    // Add M100 (Free Memory Watcher) to debug memory usage
1193
 
1291
 
1194
 //
1292
 //
1195
 // G20/G21 Inch mode support
1293
 // G20/G21 Inch mode support
1334
  *
1432
  *
1335
  * Select the language to display on the LCD. These languages are available:
1433
  * Select the language to display on the LCD. These languages are available:
1336
  *
1434
  *
1337
- *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, gl, hr,
1338
- *    it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1435
+ *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, fr_utf8, gl,
1436
+ *    hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1339
  *    tr, uk, zh_CN, zh_TW, test
1437
  *    tr, uk, zh_CN, zh_TW, test
1340
  *
1438
  *
1341
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1439
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1342
  */
1440
  */
1343
 #define LCD_LANGUAGE en
1441
 #define LCD_LANGUAGE en
1344
 
1442
 
1466
 // Note: Test audio output with the G-Code:
1564
 // Note: Test audio output with the G-Code:
1467
 //  M300 S<frequency Hz> P<duration ms>
1565
 //  M300 S<frequency Hz> P<duration ms>
1468
 //
1566
 //
1469
-//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
1470
-//#define LCD_FEEDBACK_FREQUENCY_HZ 1000
1567
+//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
1568
+//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
1471
 
1569
 
1472
 //
1570
 //
1473
 // CONTROLLER TYPE: Standard
1571
 // CONTROLLER TYPE: Standard
1577
 //#define CARTESIO_UI
1675
 //#define CARTESIO_UI
1578
 
1676
 
1579
 //
1677
 //
1580
-// ANET_10 Controller supported displays.
1678
+// ANET and Tronxy Controller supported displays.
1581
 //
1679
 //
1582
-//#define ANET_KEYPAD_LCD         // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1680
+//#define ZONESTAR_LCD            // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1583
                                   // This LCD is known to be susceptible to electrical interference
1681
                                   // This LCD is known to be susceptible to electrical interference
1584
                                   // which scrambles the display.  Pressing any button clears it up.
1682
                                   // which scrambles the display.  Pressing any button clears it up.
1683
+                                  // This is a LCD2004 display with 5 analog buttons.
1684
+
1585
 #define ANET_FULL_GRAPHICS_LCD    // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1685
 #define ANET_FULL_GRAPHICS_LCD    // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1586
                                   // A clone of the RepRapDiscount full graphics display but with
1686
                                   // A clone of the RepRapDiscount full graphics display but with
1587
                                   // different pins/wiring (see pins_ANET_10.h).
1687
                                   // different pins/wiring (see pins_ANET_10.h).
1691
 //
1791
 //
1692
 //#define MKS_12864OLED
1792
 //#define MKS_12864OLED
1693
 
1793
 
1794
+// Silvergate GLCD controller
1795
+// http://github.com/android444/Silvergate
1796
+//
1797
+//#define SILVER_GATE_GLCD_CONTROLLER
1798
+
1694
 //=============================================================================
1799
 //=============================================================================
1695
 //=============================== Extra Features ==============================
1800
 //=============================== Extra Features ==============================
1696
 //=============================================================================
1801
 //=============================================================================
1747
  * Adds the M150 command to set the LED (or LED strip) color.
1852
  * Adds the M150 command to set the LED (or LED strip) color.
1748
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1853
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1749
  * luminance values can be set from 0 to 255.
1854
  * luminance values can be set from 0 to 255.
1750
- * For Neopixel LED overall brightness parameters is also available 
1855
+ * For Neopixel LED an overall brightness parameter is also available.
1751
  *
1856
  *
1752
  * *** CAUTION ***
1857
  * *** CAUTION ***
1753
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1858
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1754
  *  as the Arduino cannot handle the current the LEDs will require.
1859
  *  as the Arduino cannot handle the current the LEDs will require.
1755
  *  Failure to follow this precaution can destroy your Arduino!
1860
  *  Failure to follow this precaution can destroy your Arduino!
1756
- *  The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
1757
- *  cannot handle such current, separate 5V power supply must be used
1861
+ *  NOTE: A separate 5V power supply is required! The Neopixel LED needs
1862
+ *  more current than the Arduino 5V linear regulator can produce.
1758
  * *** CAUTION ***
1863
  * *** CAUTION ***
1759
  *
1864
  *
1760
- * LED type. This options are mutualy exclusive. Uncomment only one.
1865
+ * LED Type. Enable only one of the following two options.
1761
  *
1866
  *
1762
  */
1867
  */
1763
 //#define RGB_LED
1868
 //#define RGB_LED
1773
 // Support for Adafruit Neopixel LED driver
1878
 // Support for Adafruit Neopixel LED driver
1774
 //#define NEOPIXEL_LED
1879
 //#define NEOPIXEL_LED
1775
 #if ENABLED(NEOPIXEL_LED)
1880
 #if ENABLED(NEOPIXEL_LED)
1776
-  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
1881
+  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
1777
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1882
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1778
-  #define NEOPIXEL_PIXELS 30       // Number of LEDs on strip
1779
-  #define NEOPIXEL_IS_SEQUENTIAL   // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
1780
-  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness 0-255
1883
+  #define NEOPIXEL_PIXELS 30       // Number of LEDs in the strip
1884
+  #define NEOPIXEL_IS_SEQUENTIAL   // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
1885
+  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness (0-255)
1781
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1886
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1782
 #endif
1887
 #endif
1783
 
1888
 
1792
  *  - Change to green once print has finished
1897
  *  - Change to green once print has finished
1793
  *  - Turn off after the print has finished and the user has pushed a button
1898
  *  - Turn off after the print has finished and the user has pushed a button
1794
  */
1899
  */
1795
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED)
1900
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
1796
   #define PRINTER_EVENT_LEDS
1901
   #define PRINTER_EVENT_LEDS
1797
 #endif
1902
 #endif
1798
 
1903
 
1799
-/*********************************************************************\
1800
-* R/C SERVO support
1801
-* Sponsored by TrinityLabs, Reworked by codexmas
1802
-**********************************************************************/
1904
+/**
1905
+ * R/C SERVO support
1906
+ * Sponsored by TrinityLabs, Reworked by codexmas
1907
+ */
1803
 
1908
 
1804
-// Number of servos
1805
-//
1806
-// If you select a configuration below, this will receive a default value and does not need to be set manually
1807
-// set it manually if you have more servos than extruders and wish to manually control some
1808
-// leaving it undefined or defining as 0 will disable the servo subsystem
1809
-// If unsure, leave commented / disabled
1810
-//
1909
+/**
1910
+ * Number of servos
1911
+ *
1912
+ * For some servo-related options NUM_SERVOS will be set automatically.
1913
+ * Set this manually if there are extra servos needing manual control.
1914
+ * Leave undefined or set to 0 to entirely disable the servo subsystem.
1915
+ */
1811
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1916
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1812
 
1917
 
1813
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1918
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1820
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1925
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1821
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1926
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1822
 
1927
 
1823
-/**
1824
- * Filament Width Sensor
1825
- *
1826
- * Measures the filament width in real-time and adjusts
1827
- * flow rate to compensate for any irregularities.
1828
- *
1829
- * Also allows the measured filament diameter to set the
1830
- * extrusion rate, so the slicer only has to specify the
1831
- * volume.
1832
- *
1833
- * Only a single extruder is supported at this time.
1834
- *
1835
- *  34 RAMPS_14    : Analog input 5 on the AUX2 connector
1836
- *  81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
1837
- * 301 RAMBO       : Analog input 3
1838
- *
1839
- * Note: May require analog pins to be defined for other boards.
1840
- */
1841
-//#define FILAMENT_WIDTH_SENSOR
1842
-
1843
-#define DEFAULT_NOMINAL_FILAMENT_DIA 3.00   // (mm) Diameter of the filament generally used (3.0 or 1.75mm), also used in the slicer. Used to validate sensor reading.
1844
-
1845
-#if ENABLED(FILAMENT_WIDTH_SENSOR)
1846
-  #define FILAMENT_SENSOR_EXTRUDER_NUM 0    // Index of the extruder that has the filament sensor (0,1,2,3)
1847
-  #define MEASUREMENT_DELAY_CM        14    // (cm) The distance from the filament sensor to the melting chamber
1848
-
1849
-  #define MEASURED_UPPER_LIMIT         3.30 // (mm) Upper limit used to validate sensor reading
1850
-  #define MEASURED_LOWER_LIMIT         1.90 // (mm) Lower limit used to validate sensor reading
1851
-  #define MAX_MEASUREMENT_DELAY       20    // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
1852
-
1853
-  #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
1854
-
1855
-  // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
1856
-  //#define FILAMENT_LCD_DISPLAY
1857
-#endif
1858
-
1859
 #endif // CONFIGURATION_H
1928
 #endif // CONFIGURATION_H

+ 269
- 126
Marlin/example_configurations/Anet/A6/Configuration_adv.h Переглянути файл

32
  */
32
  */
33
 #ifndef CONFIGURATION_ADV_H
33
 #ifndef CONFIGURATION_ADV_H
34
 #define CONFIGURATION_ADV_H
34
 #define CONFIGURATION_ADV_H
35
-#define CONFIGURATION_ADV_H_VERSION 010100
35
+#define CONFIGURATION_ADV_H_VERSION 010107
36
 
36
 
37
 // @section temperature
37
 // @section temperature
38
 
38
 
48
 #endif
48
 #endif
49
 
49
 
50
 /**
50
 /**
51
- * Thermal Protection protects your printer from damage and fire if a
52
- * thermistor falls out or temperature sensors fail in any way.
51
+ * Thermal Protection provides additional protection to your printer from damage
52
+ * and fire. Marlin always includes safe min and max temperature ranges which
53
+ * protect against a broken or disconnected thermistor wire.
53
  *
54
  *
54
- * The issue: If a thermistor falls out or a temperature sensor fails,
55
- * Marlin can no longer sense the actual temperature. Since a disconnected
56
- * thermistor reads as a low temperature, the firmware will keep the heater on.
55
+ * The issue: If a thermistor falls out, it will report the much lower
56
+ * temperature of the air in the room, and the the firmware will keep
57
+ * the heater on.
57
  *
58
  *
58
  * The solution: Once the temperature reaches the target, start observing.
59
  * The solution: Once the temperature reaches the target, start observing.
59
- * If the temperature stays too far below the target (hysteresis) for too long (period),
60
- * the firmware will halt the machine as a safety precaution.
60
+ * If the temperature stays too far below the target (hysteresis) for too
61
+ * long (period), the firmware will halt the machine as a safety precaution.
61
  *
62
  *
62
- * If you get false positives for "Thermal Runaway" increase THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
63
+ * If you get false positives for "Thermal Runaway", increase
64
+ * THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
63
  */
65
  */
64
 #if ENABLED(THERMAL_PROTECTION_HOTENDS)
66
 #if ENABLED(THERMAL_PROTECTION_HOTENDS)
65
   #define THERMAL_PROTECTION_PERIOD 60        // Seconds
67
   #define THERMAL_PROTECTION_PERIOD 60        // Seconds
66
   #define THERMAL_PROTECTION_HYSTERESIS 10    // Degrees Celsius
68
   #define THERMAL_PROTECTION_HYSTERESIS 10    // Degrees Celsius
67
 
69
 
68
   /**
70
   /**
69
-   * Whenever an M104 or M109 increases the target temperature the firmware will wait for the
70
-   * WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
71
-   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
72
-   * but only if the current temperature is far enough below the target for a reliable test.
71
+   * Whenever an M104, M109, or M303 increases the target temperature, the
72
+   * firmware will wait for the WATCH_TEMP_PERIOD to expire. If the temperature
73
+   * hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted and
74
+   * requires a hard reset. This test restarts with any M104/M109/M303, but only
75
+   * if the current temperature is far enough below the target for a reliable
76
+   * test.
73
    *
77
    *
74
-   * If you get false positives for "Heating failed" increase WATCH_TEMP_PERIOD and/or decrease WATCH_TEMP_INCREASE
75
-   * WATCH_TEMP_INCREASE should not be below 2.
78
+   * If you get false positives for "Heating failed", increase WATCH_TEMP_PERIOD
79
+   * and/or decrease WATCH_TEMP_INCREASE. WATCH_TEMP_INCREASE should not be set
80
+   * below 2.
76
    */
81
    */
77
   #define WATCH_TEMP_PERIOD 60                // Seconds
82
   #define WATCH_TEMP_PERIOD 60                // Seconds
78
   #define WATCH_TEMP_INCREASE 5               // Degrees Celsius
83
   #define WATCH_TEMP_INCREASE 5               // Degrees Celsius
86
   #define THERMAL_PROTECTION_BED_HYSTERESIS 5 // Degrees Celsius
91
   #define THERMAL_PROTECTION_BED_HYSTERESIS 5 // Degrees Celsius
87
 
92
 
88
   /**
93
   /**
89
-   * Whenever an M140 or M190 increases the target temperature the firmware will wait for the
90
-   * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE
91
-   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190,
92
-   * but only if the current temperature is far enough below the target for a reliable test.
93
-   *
94
-   * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease
95
-   * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.)
94
+   * As described above, except for the bed (M140/M190/M303).
96
    */
95
    */
97
   #define WATCH_BED_TEMP_PERIOD 180                // Seconds
96
   #define WATCH_BED_TEMP_PERIOD 180                // Seconds
98
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
97
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
123
   #define AUTOTEMP_OLDWEIGHT 0.98
122
   #define AUTOTEMP_OLDWEIGHT 0.98
124
 #endif
123
 #endif
125
 
124
 
125
+// Show extra position information in M114
126
+//#define M114_DETAIL
127
+
126
 // Show Temperature ADC value
128
 // Show Temperature ADC value
127
 // Enable for M105 to include ADC values read from temperature sensors.
129
 // Enable for M105 to include ADC values read from temperature sensors.
128
 //#define SHOW_TEMP_ADC_VALUES
130
 //#define SHOW_TEMP_ADC_VALUES
257
 
259
 
258
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
260
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
259
 
261
 
260
-// Dual X Steppers
261
-// Uncomment this option to drive two X axis motors.
262
-// The next unused E driver will be assigned to the second X stepper.
262
+/**
263
+ * Dual Steppers / Dual Endstops
264
+ *
265
+ * This section will allow you to use extra E drivers to drive a second motor for X, Y, or Z axes.
266
+ *
267
+ * For example, set X_DUAL_STEPPER_DRIVERS setting to use a second motor. If the motors need to
268
+ * spin in opposite directions set INVERT_X2_VS_X_DIR. If the second motor needs its own endstop
269
+ * set X_DUAL_ENDSTOPS. This can adjust for "racking." Use X2_USE_ENDSTOP to set the endstop plug
270
+ * that should be used for the second endstop. Extra endstops will appear in the output of 'M119'.
271
+ *
272
+ * Use X_DUAL_ENDSTOP_ADJUSTMENT to adjust for mechanical imperfection. After homing both motors
273
+ * this offset is applied to the X2 motor. To find the offset home the X axis, and measure the error
274
+ * in X2. Dual endstop offsets can be set at runtime with 'M666 X<offset> Y<offset> Z<offset>'.
275
+ */
276
+
263
 //#define X_DUAL_STEPPER_DRIVERS
277
 //#define X_DUAL_STEPPER_DRIVERS
264
 #if ENABLED(X_DUAL_STEPPER_DRIVERS)
278
 #if ENABLED(X_DUAL_STEPPER_DRIVERS)
265
-  // Set true if the two X motors need to rotate in opposite directions
266
-  #define INVERT_X2_VS_X_DIR true
279
+  #define INVERT_X2_VS_X_DIR true   // Set 'true' if X motors should rotate in opposite directions
280
+  //#define X_DUAL_ENDSTOPS
281
+  #if ENABLED(X_DUAL_ENDSTOPS)
282
+    #define X2_USE_ENDSTOP _XMAX_
283
+    #define X_DUAL_ENDSTOPS_ADJUSTMENT  0
284
+  #endif
267
 #endif
285
 #endif
268
 
286
 
269
-// Dual Y Steppers
270
-// Uncomment this option to drive two Y axis motors.
271
-// The next unused E driver will be assigned to the second Y stepper.
272
 //#define Y_DUAL_STEPPER_DRIVERS
287
 //#define Y_DUAL_STEPPER_DRIVERS
273
 #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
288
 #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
274
-  // Set true if the two Y motors need to rotate in opposite directions
275
-  #define INVERT_Y2_VS_Y_DIR true
289
+  #define INVERT_Y2_VS_Y_DIR true   // Set 'true' if Y motors should rotate in opposite directions
290
+  //#define Y_DUAL_ENDSTOPS
291
+  #if ENABLED(Y_DUAL_ENDSTOPS)
292
+    #define Y2_USE_ENDSTOP _YMAX_
293
+    #define Y_DUAL_ENDSTOPS_ADJUSTMENT  0
294
+  #endif
276
 #endif
295
 #endif
277
 
296
 
278
-// A single Z stepper driver is usually used to drive 2 stepper motors.
279
-// Uncomment this option to use a separate stepper driver for each Z axis motor.
280
-// The next unused E driver will be assigned to the second Z stepper.
281
 //#define Z_DUAL_STEPPER_DRIVERS
297
 //#define Z_DUAL_STEPPER_DRIVERS
282
-
283
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
298
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
284
-
285
-  // Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper.
286
-  // That way the machine is capable to align the bed during home, since both Z steppers are homed.
287
-  // There is also an implementation of M666 (software endstops adjustment) to this feature.
288
-  // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed.
289
-  // One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2.
290
-  // If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive.
291
-  // Play a little bit with small adjustments (0.5mm) and check the behaviour.
292
-  // The M119 (endstops report) will start reporting the Z2 Endstop as well.
293
-
294
   //#define Z_DUAL_ENDSTOPS
299
   //#define Z_DUAL_ENDSTOPS
295
-
296
   #if ENABLED(Z_DUAL_ENDSTOPS)
300
   #if ENABLED(Z_DUAL_ENDSTOPS)
297
     #define Z2_USE_ENDSTOP _XMAX_
301
     #define Z2_USE_ENDSTOP _XMAX_
298
-    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0  // Use M666 to determine/test this value
302
+    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0
299
   #endif
303
   #endif
300
-
301
-#endif // Z_DUAL_STEPPER_DRIVERS
304
+#endif
302
 
305
 
303
 // Enable this for dual x-carriage printers.
306
 // Enable this for dual x-carriage printers.
304
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
307
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
345
 
348
 
346
 // @section homing
349
 // @section homing
347
 
350
 
348
-//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
351
+// Homing hits each endstop, retracts by these distances, then does a slower bump.
349
 #define X_HOME_BUMP_MM 5
352
 #define X_HOME_BUMP_MM 5
350
 #define Y_HOME_BUMP_MM 5
353
 #define Y_HOME_BUMP_MM 5
351
 #define Z_HOME_BUMP_MM 2
354
 #define Z_HOME_BUMP_MM 2
352
-#define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
353
-//#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
355
+#define HOMING_BUMP_DIVISOR { 2, 2, 4 }  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
356
+//#define QUICK_HOME                     // If homing includes X and Y, do a diagonal move initially
354
 
357
 
355
 // When G28 is called, this option will make Y home before X
358
 // When G28 is called, this option will make Y home before X
356
 //#define HOME_Y_BEFORE_X
359
 //#define HOME_Y_BEFORE_X
434
 //#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 }   // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
437
 //#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 }   // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
435
 //#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 }    // Default drive percent - X, Y, Z, E axis
438
 //#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 }    // Default drive percent - X, Y, Z, E axis
436
 
439
 
437
-// Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
440
+// Use an I2C based DIGIPOT (e.g., Azteeg X3 Pro)
438
 //#define DIGIPOT_I2C
441
 //#define DIGIPOT_I2C
442
+#if ENABLED(DIGIPOT_I2C) && !defined(DIGIPOT_I2C_ADDRESS_A)
443
+  /**
444
+   * Common slave addresses:
445
+   *
446
+   *                    A   (A shifted)   B   (B shifted)  IC
447
+   * Smoothie          0x2C (0x58)       0x2D (0x5A)       MCP4451
448
+   * AZTEEG_X3_PRO     0x2C (0x58)       0x2E (0x5C)       MCP4451
449
+   * MIGHTYBOARD_REVE  0x2F (0x5E)                         MCP4018
450
+   */
451
+  #define DIGIPOT_I2C_ADDRESS_A 0x2C  // unshifted slave address for first DIGIPOT
452
+  #define DIGIPOT_I2C_ADDRESS_B 0x2D  // unshifted slave address for second DIGIPOT
453
+#endif
454
+
439
 //#define DIGIPOT_MCP4018          // Requires library from https://github.com/stawel/SlowSoftI2CMaster
455
 //#define DIGIPOT_MCP4018          // Requires library from https://github.com/stawel/SlowSoftI2CMaster
440
 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4     AZTEEG_X3_PRO: 8
456
 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4     AZTEEG_X3_PRO: 8
441
 // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
457
 // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
466
 // The timeout (in ms) to return to the status screen from sub-menus
482
 // The timeout (in ms) to return to the status screen from sub-menus
467
 //#define LCD_TIMEOUT_TO_STATUS 15000
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
468
 
484
 
485
+/**
486
+ * LED Control Menu
487
+ * Enable this feature to add LED Control to the LCD menu
488
+ */
489
+//#define LED_CONTROL_MENU
490
+#if ENABLED(LED_CONTROL_MENU)
491
+  #define LED_COLOR_PRESETS                 // Enable the Preset Color menu option
492
+  #if ENABLED(LED_COLOR_PRESETS)
493
+    #define LED_USER_PRESET_RED        255  // User defined RED value
494
+    #define LED_USER_PRESET_GREEN      128  // User defined GREEN value
495
+    #define LED_USER_PRESET_BLUE         0  // User defined BLUE value
496
+    #define LED_USER_PRESET_WHITE      255  // User defined WHITE value
497
+    #define LED_USER_PRESET_BRIGHTNESS 255  // User defined intensity
498
+    //#define LED_USER_PRESET_STARTUP       // Have the printer display the user preset color on startup
499
+  #endif
500
+#endif // LED_CONTROL_MENU
501
+
469
 #if ENABLED(SDSUPPORT)
502
 #if ENABLED(SDSUPPORT)
470
 
503
 
471
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
504
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
475
   // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
508
   // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
476
   //#define SD_DETECT_INVERTED
509
   //#define SD_DETECT_INVERTED
477
 
510
 
478
-  #define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
511
+  #define SD_FINISHED_STEPPERRELEASE true          // Disable steppers when SD Print is finished
479
   #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
512
   #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
480
 
513
 
481
-  #define SDCARD_RATHERRECENTFIRST  //reverse file order of sd card menu display. Its sorted practically after the file system block order.
482
-  // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that.
483
-  // using:
514
+  // Reverse SD sort to show "more recent" files first, according to the card's FAT.
515
+  // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended.
516
+  #define SDCARD_RATHERRECENTFIRST
517
+
518
+  // Add an option in the menu to run all auto#.g files
484
   //#define MENU_ADDAUTOSTART
519
   //#define MENU_ADDAUTOSTART
485
 
520
 
486
   /**
521
   /**
517
     #define SDSORT_USES_STACK  false  // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
552
     #define SDSORT_USES_STACK  false  // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
518
     #define SDSORT_CACHE_NAMES false  // Keep sorted items in RAM longer for speedy performance. Most expensive option.
553
     #define SDSORT_CACHE_NAMES false  // Keep sorted items in RAM longer for speedy performance. Most expensive option.
519
     #define SDSORT_DYNAMIC_RAM false  // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
554
     #define SDSORT_DYNAMIC_RAM false  // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
555
+    #define SDSORT_CACHE_VFATS 2      // Maximum number of 13-byte VFAT entries to use for sorting.
556
+                                      // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM.
520
   #endif
557
   #endif
521
 
558
 
522
   // Show a progress bar on HD44780 LCDs for SD printing
559
   // Show a progress bar on HD44780 LCDs for SD printing
535
     //#define LCD_PROGRESS_BAR_TEST
572
     //#define LCD_PROGRESS_BAR_TEST
536
   #endif
573
   #endif
537
 
574
 
575
+  // Add an 'M73' G-code to set the current percentage
576
+  //#define LCD_SET_PROGRESS_MANUALLY
577
+
538
   // This allows hosts to request long names for files and folders with M33
578
   // This allows hosts to request long names for files and folders with M33
539
   //#define LONG_FILENAME_HOST_SUPPORT
579
   //#define LONG_FILENAME_HOST_SUPPORT
540
 
580
 
541
-  // This option allows you to abort SD printing when any endstop is triggered.
542
-  // This feature must be enabled with "M540 S1" or from the LCD menu.
543
-  // To have any effect, endstops must be enabled during SD printing.
581
+  // Enable this option to scroll long filenames in the SD card menu
582
+  //#define SCROLL_LONG_FILENAMES
583
+
584
+  /**
585
+   * This option allows you to abort SD printing when any endstop is triggered.
586
+   * This feature must be enabled with "M540 S1" or from the LCD menu.
587
+   * To have any effect, endstops must be enabled during SD printing.
588
+   */
544
   //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
589
   //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
545
 
590
 
591
+  /**
592
+   * This option makes it easier to print the same SD Card file again.
593
+   * On print completion the LCD Menu will open with the file selected.
594
+   * You can just click to start the print, or navigate elsewhere.
595
+   */
596
+  //#define SD_REPRINT_LAST_SELECTED_FILE
597
+
546
 #endif // SDSUPPORT
598
 #endif // SDSUPPORT
547
 
599
 
548
 /**
600
 /**
575
   // Enable this option and reduce the value to optimize screen updates.
627
   // Enable this option and reduce the value to optimize screen updates.
576
   // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
628
   // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
577
   //#define DOGM_SPI_DELAY_US 5
629
   //#define DOGM_SPI_DELAY_US 5
630
+
631
+  // Swap the CW/CCW indicators in the graphics overlay
632
+  //#define OVERLAY_GFX_REVERSE
633
+
578
 #endif // DOGLCD
634
 #endif // DOGLCD
579
 
635
 
580
 // @section safety
636
 // @section safety
601
  */
657
  */
602
 //#define BABYSTEPPING
658
 //#define BABYSTEPPING
603
 #if ENABLED(BABYSTEPPING)
659
 #if ENABLED(BABYSTEPPING)
604
-  //#define BABYSTEP_XY            // Also enable X/Y Babystepping. Not supported on DELTA!
660
+  //#define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
605
   #define BABYSTEP_INVERT_Z false    // Change if Z babysteps should go the other way
661
   #define BABYSTEP_INVERT_Z false    // Change if Z babysteps should go the other way
606
-  #define BABYSTEP_MULTIPLICATOR 100 // Babysteps are very small. Increase for faster motion.
662
+  #define BABYSTEP_MULTIPLICATOR 1   // Babysteps are very small. Increase for faster motion.
607
   //#define BABYSTEP_ZPROBE_OFFSET   // Enable to combine M851 and Babystepping
663
   //#define BABYSTEP_ZPROBE_OFFSET   // Enable to combine M851 and Babystepping
608
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
664
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
609
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
665
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
610
                                         // Note: Extra time may be added to mitigate controller latency.
666
                                         // Note: Extra time may be added to mitigate controller latency.
611
   //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
667
   //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
612
-  //#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators
613
 #endif
668
 #endif
614
 
669
 
615
 // @section extruder
670
 // @section extruder
656
 
711
 
657
 // @section leveling
712
 // @section leveling
658
 
713
 
659
-// Default mesh area is an area with an inset margin on the print area.
660
-// Below are the macros that are used to define the borders for the mesh area,
661
-// made available here for specialized needs, ie dual extruder setup.
662
-#if ENABLED(MESH_BED_LEVELING)
663
-  #define MESH_MIN_X MESH_INSET
664
-  #define MESH_MAX_X (X_BED_SIZE - (MESH_INSET))
665
-  #define MESH_MIN_Y MESH_INSET
666
-  #define MESH_MAX_Y (Y_BED_SIZE - (MESH_INSET))
667
-#elif ENABLED(AUTO_BED_LEVELING_UBL)
668
-  #define UBL_MESH_MIN_X UBL_MESH_INSET
669
-  #define UBL_MESH_MAX_X (X_BED_SIZE - (UBL_MESH_INSET))
670
-  #define UBL_MESH_MIN_Y UBL_MESH_INSET
671
-  #define UBL_MESH_MAX_Y (Y_BED_SIZE - (UBL_MESH_INSET))
672
-
673
-  // If this is defined, the currently active mesh will be saved in the
674
-  // current slot on M500.
675
-  #define UBL_SAVE_ACTIVE_ON_M500
714
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
715
+  #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
716
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
717
+  #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
718
+#endif
719
+
720
+#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL)
721
+  // Override the mesh area if the automatic (max) area is too large
722
+  //#define MESH_MIN_X MESH_INSET
723
+  //#define MESH_MIN_Y MESH_INSET
724
+  //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET)
725
+  //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
676
 #endif
726
 #endif
677
 
727
 
678
 // @section extras
728
 // @section extras
692
 //#define BEZIER_CURVE_SUPPORT
742
 //#define BEZIER_CURVE_SUPPORT
693
 
743
 
694
 // G38.2 and G38.3 Probe Target
744
 // G38.2 and G38.3 Probe Target
695
-// Enable PROBE_DOUBLE_TOUCH if you want G38 to double touch
745
+// Set MULTIPLE_PROBING if you want G38 to double touch
696
 //#define G38_PROBE_TARGET
746
 //#define G38_PROBE_TARGET
697
 #if ENABLED(G38_PROBE_TARGET)
747
 #if ENABLED(G38_PROBE_TARGET)
698
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
748
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
717
 // @section hidden
767
 // @section hidden
718
 
768
 
719
 // The number of linear motions that can be in the plan at any give time.
769
 // The number of linear motions that can be in the plan at any give time.
720
-// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2, i.g. 8,16,32 because shifts and ors are used to do the ring-buffering.
770
+// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2 (e.g. 8, 16, 32) because shifts and ors are used to do the ring-buffering.
721
 #if ENABLED(SDSUPPORT)
771
 #if ENABLED(SDSUPPORT)
722
   #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
772
   #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
723
 #else
773
 #else
808
 #endif
858
 #endif
809
 
859
 
810
 /**
860
 /**
861
+ * Extra Fan Speed
862
+ * Adds a secondary fan speed for each print-cooling fan.
863
+ *   'M106 P<fan> T3-255' : Set a secondary speed for <fan>
864
+ *   'M106 P<fan> T2'     : Use the set secondary speed
865
+ *   'M106 P<fan> T1'     : Restore the previous fan speed
866
+ */
867
+//#define EXTRA_FAN_SPEED
868
+
869
+/**
811
  * Advanced Pause
870
  * Advanced Pause
812
  * Experimental feature for filament change support and for parking the nozzle when paused.
871
  * Experimental feature for filament change support and for parking the nozzle when paused.
813
  * Adds the GCode M600 for initiating filament change.
872
  * Adds the GCode M600 for initiating filament change.
917
 
976
 
918
 #endif
977
 #endif
919
 
978
 
920
-// @section TMC2130
979
+// @section TMC2130, TMC2208
921
 
980
 
922
 /**
981
 /**
923
  * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
982
  * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
931
  */
990
  */
932
 //#define HAVE_TMC2130
991
 //#define HAVE_TMC2130
933
 
992
 
934
-#if ENABLED(HAVE_TMC2130)
993
+/**
994
+ * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
995
+ * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin.
996
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN
997
+ * to #_SERIAL_TX_PIN with a 1K resistor.
998
+ * The drivers can also be used with hardware serial.
999
+ *
1000
+ * You'll also need the TMC2208Stepper Arduino library
1001
+ * (https://github.com/teemuatlut/TMC2208Stepper).
1002
+ */
1003
+//#define HAVE_TMC2208
1004
+
1005
+#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
935
 
1006
 
936
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
1007
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
937
   //#define X_IS_TMC2130
1008
   //#define X_IS_TMC2130
946
   //#define E3_IS_TMC2130
1017
   //#define E3_IS_TMC2130
947
   //#define E4_IS_TMC2130
1018
   //#define E4_IS_TMC2130
948
 
1019
 
1020
+  //#define X_IS_TMC2208
1021
+  //#define X2_IS_TMC2208
1022
+  //#define Y_IS_TMC2208
1023
+  //#define Y2_IS_TMC2208
1024
+  //#define Z_IS_TMC2208
1025
+  //#define Z2_IS_TMC2208
1026
+  //#define E0_IS_TMC2208
1027
+  //#define E1_IS_TMC2208
1028
+  //#define E2_IS_TMC2208
1029
+  //#define E3_IS_TMC2208
1030
+  //#define E4_IS_TMC2208
1031
+
949
   /**
1032
   /**
950
    * Stepper driver settings
1033
    * Stepper driver settings
951
    */
1034
    */
952
 
1035
 
953
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1036
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
954
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1037
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
955
-  #define INTERPOLATE          1  // Interpolate X/Y/Z_MICROSTEPS to 256
1038
+  #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
956
 
1039
 
957
-  #define X_CURRENT         1000  // rms current in mA. Multiply by 1.41 for peak current.
1040
+  #define X_CURRENT          800  // rms current in mA. Multiply by 1.41 for peak current.
958
   #define X_MICROSTEPS        16  // 0..256
1041
   #define X_MICROSTEPS        16  // 0..256
959
 
1042
 
960
-  #define Y_CURRENT         1000
1043
+  #define Y_CURRENT          800
961
   #define Y_MICROSTEPS        16
1044
   #define Y_MICROSTEPS        16
962
 
1045
 
963
-  #define Z_CURRENT         1000
1046
+  #define Z_CURRENT          800
964
   #define Z_MICROSTEPS        16
1047
   #define Z_MICROSTEPS        16
965
 
1048
 
966
-  //#define X2_CURRENT      1000
967
-  //#define X2_MICROSTEPS     16
1049
+  #define X2_CURRENT         800
1050
+  #define X2_MICROSTEPS       16
968
 
1051
 
969
-  //#define Y2_CURRENT      1000
970
-  //#define Y2_MICROSTEPS     16
1052
+  #define Y2_CURRENT         800
1053
+  #define Y2_MICROSTEPS       16
971
 
1054
 
972
-  //#define Z2_CURRENT      1000
973
-  //#define Z2_MICROSTEPS     16
1055
+  #define Z2_CURRENT         800
1056
+  #define Z2_MICROSTEPS       16
974
 
1057
 
975
-  //#define E0_CURRENT      1000
976
-  //#define E0_MICROSTEPS     16
1058
+  #define E0_CURRENT         800
1059
+  #define E0_MICROSTEPS       16
977
 
1060
 
978
-  //#define E1_CURRENT      1000
979
-  //#define E1_MICROSTEPS     16
1061
+  #define E1_CURRENT         800
1062
+  #define E1_MICROSTEPS       16
980
 
1063
 
981
-  //#define E2_CURRENT      1000
982
-  //#define E2_MICROSTEPS     16
1064
+  #define E2_CURRENT         800
1065
+  #define E2_MICROSTEPS       16
983
 
1066
 
984
-  //#define E3_CURRENT      1000
985
-  //#define E3_MICROSTEPS     16
1067
+  #define E3_CURRENT         800
1068
+  #define E3_MICROSTEPS       16
986
 
1069
 
987
-  //#define E4_CURRENT      1000
988
-  //#define E4_MICROSTEPS     16
1070
+  #define E4_CURRENT         800
1071
+  #define E4_MICROSTEPS       16
989
 
1072
 
990
   /**
1073
   /**
991
    * Use Trinamic's ultra quiet stepping mode.
1074
    * Use Trinamic's ultra quiet stepping mode.
994
   #define STEALTHCHOP
1077
   #define STEALTHCHOP
995
 
1078
 
996
   /**
1079
   /**
997
-   * Let Marlin automatically control stepper current.
998
-   * This is still an experimental feature.
999
-   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
1000
-   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
1001
-   * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX
1080
+   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1081
+   * like overtemperature and short to ground. TMC2208 requires hardware serial.
1082
+   * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1083
+   * Other detected conditions can be used to stop the current print.
1002
    * Relevant g-codes:
1084
    * Relevant g-codes:
1003
    * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
1085
    * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
1004
-   * M906 S1 - Start adjusting current
1005
-   * M906 S0 - Stop adjusting current
1006
    * M911 - Report stepper driver overtemperature pre-warn condition.
1086
    * M911 - Report stepper driver overtemperature pre-warn condition.
1007
    * M912 - Clear stepper driver overtemperature pre-warn condition flag.
1087
    * M912 - Clear stepper driver overtemperature pre-warn condition flag.
1088
+   * M122 S0/1 - Report driver parameters (Requires TMC_DEBUG)
1008
    */
1089
    */
1009
-  //#define AUTOMATIC_CURRENT_CONTROL
1090
+  //#define MONITOR_DRIVER_STATUS
1010
 
1091
 
1011
-  #if ENABLED(AUTOMATIC_CURRENT_CONTROL)
1012
-    #define CURRENT_STEP          50  // [mA]
1013
-    #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
1092
+  #if ENABLED(MONITOR_DRIVER_STATUS)
1093
+    #define CURRENT_STEP_DOWN     50  // [mA]
1014
     #define REPORT_CURRENT_CHANGE
1094
     #define REPORT_CURRENT_CHANGE
1095
+    #define STOP_ON_ERROR
1015
   #endif
1096
   #endif
1016
 
1097
 
1017
   /**
1098
   /**
1026
   #define X2_HYBRID_THRESHOLD    100
1107
   #define X2_HYBRID_THRESHOLD    100
1027
   #define Y_HYBRID_THRESHOLD     100
1108
   #define Y_HYBRID_THRESHOLD     100
1028
   #define Y2_HYBRID_THRESHOLD    100
1109
   #define Y2_HYBRID_THRESHOLD    100
1029
-  #define Z_HYBRID_THRESHOLD       4
1030
-  #define Z2_HYBRID_THRESHOLD      4
1110
+  #define Z_HYBRID_THRESHOLD       3
1111
+  #define Z2_HYBRID_THRESHOLD      3
1031
   #define E0_HYBRID_THRESHOLD     30
1112
   #define E0_HYBRID_THRESHOLD     30
1032
   #define E1_HYBRID_THRESHOLD     30
1113
   #define E1_HYBRID_THRESHOLD     30
1033
   #define E2_HYBRID_THRESHOLD     30
1114
   #define E2_HYBRID_THRESHOLD     30
1037
   /**
1118
   /**
1038
    * Use stallGuard2 to sense an obstacle and trigger an endstop.
1119
    * Use stallGuard2 to sense an obstacle and trigger an endstop.
1039
    * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
1120
    * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
1040
-   * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal.
1121
+   * X and Y homing will always be done in spreadCycle mode.
1041
    *
1122
    *
1042
    * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
1123
    * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
1043
    * Higher values make the system LESS sensitive.
1124
    * Higher values make the system LESS sensitive.
1046
    * It is advised to set X/Y_HOME_BUMP_MM to 0.
1127
    * It is advised to set X/Y_HOME_BUMP_MM to 0.
1047
    * M914 X/Y to live tune the setting
1128
    * M914 X/Y to live tune the setting
1048
    */
1129
    */
1049
-  //#define SENSORLESS_HOMING
1130
+  //#define SENSORLESS_HOMING // TMC2130 only
1050
 
1131
 
1051
   #if ENABLED(SENSORLESS_HOMING)
1132
   #if ENABLED(SENSORLESS_HOMING)
1052
-    #define X_HOMING_SENSITIVITY  19
1053
-    #define Y_HOMING_SENSITIVITY  19
1133
+    #define X_HOMING_SENSITIVITY  8
1134
+    #define Y_HOMING_SENSITIVITY  8
1054
   #endif
1135
   #endif
1055
 
1136
 
1056
   /**
1137
   /**
1138
+   * Enable M122 debugging command for TMC stepper drivers.
1139
+   * M122 S0/1 will enable continous reporting.
1140
+   */
1141
+  //#define TMC_DEBUG
1142
+
1143
+  /**
1057
    * You can set your own advanced settings by filling in predefined functions.
1144
    * You can set your own advanced settings by filling in predefined functions.
1058
    * A list of available functions can be found on the library github page
1145
    * A list of available functions can be found on the library github page
1059
    * https://github.com/teemuatlut/TMC2130Stepper
1146
    * https://github.com/teemuatlut/TMC2130Stepper
1147
+   * https://github.com/teemuatlut/TMC2208Stepper
1060
    *
1148
    *
1061
    * Example:
1149
    * Example:
1062
-   * #define TMC2130_ADV() { \
1150
+   * #define TMC_ADV() { \
1063
    *   stepperX.diag0_temp_prewarn(1); \
1151
    *   stepperX.diag0_temp_prewarn(1); \
1064
-   *   stepperX.interpolate(0); \
1152
+   *   stepperY.interpolate(0); \
1065
    * }
1153
    * }
1066
    */
1154
    */
1067
-  #define  TMC2130_ADV() {  }
1155
+  #define  TMC_ADV() {  }
1068
 
1156
 
1069
-#endif // HAVE_TMC2130
1157
+#endif // TMC2130 || TMC2208
1070
 
1158
 
1071
 // @section L6470
1159
 // @section L6470
1072
 
1160
 
1231
 #endif
1319
 #endif
1232
 
1320
 
1233
 /**
1321
 /**
1322
+ * Filament Width Sensor
1323
+ *
1324
+ * Measures the filament width in real-time and adjusts
1325
+ * flow rate to compensate for any irregularities.
1326
+ *
1327
+ * Also allows the measured filament diameter to set the
1328
+ * extrusion rate, so the slicer only has to specify the
1329
+ * volume.
1330
+ *
1331
+ * Only a single extruder is supported at this time.
1332
+ *
1333
+ *  34 RAMPS_14    : Analog input 5 on the AUX2 connector
1334
+ *  81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
1335
+ * 301 RAMBO       : Analog input 3
1336
+ *
1337
+ * Note: May require analog pins to be defined for other boards.
1338
+ */
1339
+//#define FILAMENT_WIDTH_SENSOR
1340
+
1341
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
1342
+  #define FILAMENT_SENSOR_EXTRUDER_NUM 0    // Index of the extruder that has the filament sensor. :[0,1,2,3,4]
1343
+  #define MEASUREMENT_DELAY_CM        14    // (cm) The distance from the filament sensor to the melting chamber
1344
+
1345
+  #define MEASURED_UPPER_LIMIT         3.30 // (mm) Upper limit used to validate sensor reading
1346
+  #define MEASURED_LOWER_LIMIT         1.90 // (mm) Lower limit used to validate sensor reading
1347
+  #define MAX_MEASUREMENT_DELAY       20    // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
1348
+
1349
+  #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
1350
+
1351
+  // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
1352
+  //#define FILAMENT_LCD_DISPLAY
1353
+#endif
1354
+
1355
+/**
1356
+ * CNC Coordinate Systems
1357
+ *
1358
+ * Enables G53 and G54-G59.3 commands to select coordinate systems
1359
+ * and G92.1 to reset the workspace to native machine space.
1360
+ */
1361
+//#define CNC_COORDINATE_SYSTEMS
1362
+
1363
+/**
1234
  * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
1364
  * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
1235
  */
1365
  */
1236
 //#define PINS_DEBUGGING
1366
 //#define PINS_DEBUGGING
1421
                                          // tweaks made to the configuration are affecting the printer in real-time.
1551
                                          // tweaks made to the configuration are affecting the printer in real-time.
1422
 #endif
1552
 #endif
1423
 
1553
 
1554
+/**
1555
+ * NanoDLP Sync support
1556
+ *
1557
+ * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
1558
+ * string to enable synchronization with DLP projector exposure. This change will allow to use
1559
+ * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
1560
+ */
1561
+//#define NANODLP_Z_SYNC
1562
+#if ENABLED(NANODLP_Z_SYNC)
1563
+  //#define NANODLP_ALL_AXIS  // Enables "Z_move_comp" output on any axis move.
1564
+                              // Default behaviour is limited to Z axis only.
1565
+#endif
1566
+
1424
 #endif // CONFIGURATION_ADV_H
1567
 #endif // CONFIGURATION_ADV_H

+ 162
- 92
Marlin/example_configurations/Anet/A8/Configuration.h Переглянути файл

37
  */
37
  */
38
 #ifndef CONFIGURATION_H
38
 #ifndef CONFIGURATION_H
39
 #define CONFIGURATION_H
39
 #define CONFIGURATION_H
40
-#define CONFIGURATION_H_VERSION 010100
40
+#define CONFIGURATION_H_VERSION 010107
41
 
41
 
42
 //===========================================================================
42
 //===========================================================================
43
 //============================= Getting Started =============================
43
 //============================= Getting Started =============================
136
 // :[1, 2, 3, 4, 5]
136
 // :[1, 2, 3, 4, 5]
137
 #define EXTRUDERS 1
137
 #define EXTRUDERS 1
138
 
138
 
139
+// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
140
+// The Anet A8 original extruder is designed for 1.75mm
141
+#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75
142
+
139
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
143
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
140
 //#define SINGLENOZZLE
144
 //#define SINGLENOZZLE
141
 
145
 
336
 
340
 
337
 // Comment the following line to disable PID and enable bang-bang.
341
 // Comment the following line to disable PID and enable bang-bang.
338
 #define PIDTEMP
342
 #define PIDTEMP
339
-#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
340
-#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
343
+#define BANG_MAX 255     // Limits current to nozzle while in bang-bang mode; 255=full current
344
+#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
345
+#define PID_K1 0.95      // Smoothing factor within the PID
341
 #if ENABLED(PIDTEMP)
346
 #if ENABLED(PIDTEMP)
342
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
347
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
343
   //#define PID_DEBUG // Sends debug data to the serial port.
348
   //#define PID_DEBUG // Sends debug data to the serial port.
347
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
352
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
348
   #define PID_FUNCTIONAL_RANGE 15 // If the temperature difference between the target temperature and the actual temperature
353
   #define PID_FUNCTIONAL_RANGE 15 // If the temperature difference between the target temperature and the actual temperature
349
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
354
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
350
-  #define K1 0.95 //smoothing factor within the PID
351
 
355
 
352
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
356
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
353
 
357
 
422
 // or to allow moving the extruder regardless of the hotend temperature.
426
 // or to allow moving the extruder regardless of the hotend temperature.
423
 // *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
427
 // *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
424
 #define PREVENT_COLD_EXTRUSION
428
 #define PREVENT_COLD_EXTRUSION
425
-#define EXTRUDE_MINTEMP 170
429
+#define EXTRUDE_MINTEMP 160  // 160 guards against false tripping when the extruder fan kicks on.
426
 
430
 
427
 // This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
431
 // This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
428
 // Note that for Bowden Extruders a too-small value here may prevent loading.
432
 // Note that for Bowden Extruders a too-small value here may prevent loading.
434
 //===========================================================================
438
 //===========================================================================
435
 
439
 
436
 /**
440
 /**
437
- * Thermal Protection protects your printer from damage and fire if a
438
- * thermistor falls out or temperature sensors fail in any way.
441
+ * Thermal Protection provides additional protection to your printer from damage
442
+ * and fire. Marlin always includes safe min and max temperature ranges which
443
+ * protect against a broken or disconnected thermistor wire.
439
  *
444
  *
440
- * The issue: If a thermistor falls out or a temperature sensor fails,
441
- * Marlin can no longer sense the actual temperature. Since a disconnected
442
- * thermistor reads as a low temperature, the firmware will keep the heater on.
445
+ * The issue: If a thermistor falls out, it will report the much lower
446
+ * temperature of the air in the room, and the the firmware will keep
447
+ * the heater on.
443
  *
448
  *
444
  * If you get "Thermal Runaway" or "Heating failed" errors the
449
  * If you get "Thermal Runaway" or "Heating failed" errors the
445
  * details can be tuned in Configuration_adv.h
450
  * details can be tuned in Configuration_adv.h
531
  * Override with M92
536
  * Override with M92
532
  *                                      X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]]
537
  *                                      X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]]
533
  */
538
  */
534
-#define DEFAULT_AXIS_STEPS_PER_UNIT   { 100, 100, 400, 95 }
539
+#define DEFAULT_AXIS_STEPS_PER_UNIT   { 100, 100, 400, 100 }
535
 
540
 
536
 /**
541
 /**
537
  * Default Max Feed Rate (mm/s)
542
  * Default Max Feed Rate (mm/s)
579
 // @section probes
584
 // @section probes
580
 
585
 
581
 //
586
 //
582
-// See http://marlinfw.org/configuration/probes.html
587
+// See http://marlinfw.org/docs/configuration/probes.html
583
 //
588
 //
584
 
589
 
585
 /**
590
 /**
692
 // X and Y axis travel speed (mm/m) between probes
697
 // X and Y axis travel speed (mm/m) between probes
693
 #define XY_PROBE_SPEED 6000
698
 #define XY_PROBE_SPEED 6000
694
 
699
 
695
-// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH)
700
+// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
696
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
701
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
697
 
702
 
698
 // Speed for the "accurate" probe of each point
703
 // Speed for the "accurate" probe of each point
699
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
704
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
700
 
705
 
701
-// Use double touch for probing
702
-//#define PROBE_DOUBLE_TOUCH
706
+// The number of probes to perform at each point.
707
+//   Set to 2 for a fast/slow probe, using the second probe result.
708
+//   Set to 3 or more for slow probes, averaging the results.
709
+//#define MULTIPLE_PROBING 2
703
 
710
 
704
 /**
711
 /**
705
  * Z probes require clearance when deploying, stowing, and moving between
712
  * Z probes require clearance when deploying, stowing, and moving between
791
 #define Y_MAX_POS Y_BED_SIZE
798
 #define Y_MAX_POS Y_BED_SIZE
792
 #define Z_MAX_POS 240
799
 #define Z_MAX_POS 240
793
 
800
 
794
-// If enabled, axes won't move below MIN_POS in response to movement commands.
801
+/**
802
+ * Software Endstops
803
+ *
804
+ * - Prevent moves outside the set machine bounds.
805
+ * - Individual axes can be disabled, if desired.
806
+ * - X and Y only apply to Cartesian robots.
807
+ * - Use 'M211' to set software endstops on/off or report current state
808
+ */
809
+
810
+// Min software endstops curtail movement below minimum coordinate bounds
795
 #define MIN_SOFTWARE_ENDSTOPS
811
 #define MIN_SOFTWARE_ENDSTOPS
796
-// If enabled, axes won't move above MAX_POS in response to movement commands.
812
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
813
+  #define MIN_SOFTWARE_ENDSTOP_X
814
+  #define MIN_SOFTWARE_ENDSTOP_Y
815
+  #define MIN_SOFTWARE_ENDSTOP_Z
816
+#endif
817
+
818
+// Max software endstops curtail movement above maximum coordinate bounds
797
 #define MAX_SOFTWARE_ENDSTOPS
819
 #define MAX_SOFTWARE_ENDSTOPS
820
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
821
+  #define MAX_SOFTWARE_ENDSTOP_X
822
+  #define MAX_SOFTWARE_ENDSTOP_Y
823
+  #define MAX_SOFTWARE_ENDSTOP_Z
824
+#endif
798
 
825
 
799
 /**
826
 /**
800
  * Filament Runout Sensor
827
  * Filament Runout Sensor
814
 //===========================================================================
841
 //===========================================================================
815
 //=============================== Bed Leveling ==============================
842
 //=============================== Bed Leveling ==============================
816
 //===========================================================================
843
 //===========================================================================
817
-// @section bedlevel
844
+// @section calibrate
818
 
845
 
819
 /**
846
 /**
820
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
847
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
840
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
867
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
841
  *   A comprehensive bed leveling system combining the features and benefits
868
  *   A comprehensive bed leveling system combining the features and benefits
842
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
869
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
843
- *   Validation and Mesh Editing systems. Currently, UBL is only checked out
844
- *   for Cartesian Printers. That said, it was primarily designed to correct
845
- *   poor quality Delta Printers. If you feel adventurous and have a Delta,
846
- *   please post an issue if something doesn't work correctly. Initially,
847
- *   you will need to set a reduced bed size so you have a rectangular area
848
- *   to test on.
870
+ *   Validation and Mesh Editing systems.
849
  *
871
  *
850
  * - MESH_BED_LEVELING
872
  * - MESH_BED_LEVELING
851
  *   Probe a grid manually
873
  *   Probe a grid manually
872
   // at which point movement will be level to the machine's XY plane.
894
   // at which point movement will be level to the machine's XY plane.
873
   // The height can be set with M420 Z<height>
895
   // The height can be set with M420 Z<height>
874
   #define ENABLE_LEVELING_FADE_HEIGHT
896
   #define ENABLE_LEVELING_FADE_HEIGHT
897
+
898
+  // For Cartesian machines, instead of dividing moves on mesh boundaries,
899
+  // split up moves into short segments like a Delta. This follows the
900
+  // contours of the bed more closely than edge-to-edge straight moves.
901
+  #define SEGMENT_LEVELED_MOVES
902
+  #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)
903
+
904
+  /**
905
+   * Enable the G26 Mesh Validation Pattern tool.
906
+   */
907
+  //#define G26_MESH_VALIDATION   // Enable G26 mesh validation
908
+  #if ENABLED(G26_MESH_VALIDATION)
909
+    #define MESH_TEST_NOZZLE_SIZE     0.4   // (mm) Diameter of primary nozzle.
910
+    #define MESH_TEST_LAYER_HEIGHT    0.2   // (mm) Default layer height for the G26 Mesh Validation Tool.
911
+    #define MESH_TEST_HOTEND_TEMP   205.0   // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
912
+    #define MESH_TEST_BED_TEMP       60.0   // (°C) Default bed temperature for the G26 Mesh Validation Tool.
913
+  #endif
914
+
875
 #endif
915
 #endif
876
 
916
 
877
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
917
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
927
   //========================= Unified Bed Leveling ============================
967
   //========================= Unified Bed Leveling ============================
928
   //===========================================================================
968
   //===========================================================================
929
 
969
 
930
-  #define UBL_MESH_INSET 1          // Mesh inset margin on print area
970
+  //#define MESH_EDIT_GFX_OVERLAY   // Display a graphics overlay while editing the mesh
971
+
972
+  #define MESH_INSET 1              // Mesh inset margin on print area
931
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
973
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
932
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
974
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
933
 
975
 
938
   #define UBL_PROBE_PT_3_X 180
980
   #define UBL_PROBE_PT_3_X 180
939
   #define UBL_PROBE_PT_3_Y 20
981
   #define UBL_PROBE_PT_3_Y 20
940
 
982
 
941
-  #define UBL_G26_MESH_VALIDATION   // Enable G26 mesh validation
942
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
983
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
984
+  #define UBL_SAVE_ACTIVE_ON_M500   // Save the currently active mesh in the current slot on M500
943
 
985
 
944
 #elif ENABLED(MESH_BED_LEVELING)
986
 #elif ENABLED(MESH_BED_LEVELING)
945
 
987
 
999
 //#define Z_SAFE_HOMING
1041
 //#define Z_SAFE_HOMING
1000
 
1042
 
1001
 #if ENABLED(Z_SAFE_HOMING)
1043
 #if ENABLED(Z_SAFE_HOMING)
1002
-  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axis (G28).
1003
-  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axis (G28).
1044
+  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axes (G28).
1045
+  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axes (G28).
1004
 #endif
1046
 #endif
1005
 
1047
 
1006
 // Homing speeds (mm/m)
1048
 // Homing speeds (mm/m)
1007
 #define HOMING_FEEDRATE_XY (100*60)
1049
 #define HOMING_FEEDRATE_XY (100*60)
1008
 #define HOMING_FEEDRATE_Z  (4*60)
1050
 #define HOMING_FEEDRATE_Z  (4*60)
1009
 
1051
 
1052
+// @section calibrate
1053
+
1054
+/**
1055
+ * Bed Skew Compensation
1056
+ *
1057
+ * This feature corrects for misalignment in the XYZ axes.
1058
+ *
1059
+ * Take the following steps to get the bed skew in the XY plane:
1060
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1061
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1062
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1063
+ *  4. For XY_SIDE_AD measure the edge A to D
1064
+ *
1065
+ * Marlin automatically computes skew factors from these measurements.
1066
+ * Skew factors may also be computed and set manually:
1067
+ *
1068
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1069
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1070
+ *
1071
+ * If desired, follow the same procedure for XZ and YZ.
1072
+ * Use these diagrams for reference:
1073
+ *
1074
+ *    Y                     Z                     Z
1075
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1076
+ *    |    /       /        |    /       /        |    /       /
1077
+ *    |   /       /         |   /       /         |   /       /
1078
+ *    |  A-------D          |  A-------D          |  A-------D
1079
+ *    +-------------->X     +-------------->X     +-------------->Y
1080
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1081
+ */
1082
+//#define SKEW_CORRECTION
1083
+
1084
+#if ENABLED(SKEW_CORRECTION)
1085
+  // Input all length measurements here:
1086
+  #define XY_DIAG_AC 282.8427124746
1087
+  #define XY_DIAG_BD 282.8427124746
1088
+  #define XY_SIDE_AD 200
1089
+
1090
+  // Or, set the default skew factors directly here
1091
+  // to override the above measurements:
1092
+  #define XY_SKEW_FACTOR 0.0
1093
+
1094
+  //#define SKEW_CORRECTION_FOR_Z
1095
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1096
+    #define XZ_DIAG_AC 282.8427124746
1097
+    #define XZ_DIAG_BD 282.8427124746
1098
+    #define YZ_DIAG_AC 282.8427124746
1099
+    #define YZ_DIAG_BD 282.8427124746
1100
+    #define YZ_SIDE_AD 200
1101
+    #define XZ_SKEW_FACTOR 0.0
1102
+    #define YZ_SKEW_FACTOR 0.0
1103
+  #endif
1104
+
1105
+  // Enable this option for M852 to set skew at runtime
1106
+  //#define SKEW_CORRECTION_GCODE
1107
+#endif
1108
+
1010
 //=============================================================================
1109
 //=============================================================================
1011
 //============================= Additional Features ===========================
1110
 //============================= Additional Features ===========================
1012
 //=============================================================================
1111
 //=============================================================================
1038
 //
1137
 //
1039
 // M100 Free Memory Watcher
1138
 // M100 Free Memory Watcher
1040
 //
1139
 //
1041
-//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
1140
+//#define M100_FREE_MEMORY_WATCHER    // Add M100 (Free Memory Watcher) to debug memory usage
1042
 
1141
 
1043
 //
1142
 //
1044
 // G20/G21 Inch mode support
1143
 // G20/G21 Inch mode support
1183
  *
1282
  *
1184
  * Select the language to display on the LCD. These languages are available:
1283
  * Select the language to display on the LCD. These languages are available:
1185
  *
1284
  *
1186
- *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, gl, hr,
1187
- *    it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1285
+ *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, fr_utf8, gl,
1286
+ *    hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1188
  *    tr, uk, zh_CN, zh_TW, test
1287
  *    tr, uk, zh_CN, zh_TW, test
1189
  *
1288
  *
1190
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1289
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1191
  */
1290
  */
1192
 #define LCD_LANGUAGE en
1291
 #define LCD_LANGUAGE en
1193
 
1292
 
1315
 // Note: Test audio output with the G-Code:
1414
 // Note: Test audio output with the G-Code:
1316
 //  M300 S<frequency Hz> P<duration ms>
1415
 //  M300 S<frequency Hz> P<duration ms>
1317
 //
1416
 //
1318
-//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
1319
-//#define LCD_FEEDBACK_FREQUENCY_HZ 1000
1417
+//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
1418
+//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
1320
 
1419
 
1321
 //
1420
 //
1322
 // CONTROLLER TYPE: Standard
1421
 // CONTROLLER TYPE: Standard
1426
 //#define CARTESIO_UI
1525
 //#define CARTESIO_UI
1427
 
1526
 
1428
 //
1527
 //
1429
-// ANET_10 Controller supported displays.
1528
+// ANET and Tronxy Controller supported displays.
1430
 //
1529
 //
1431
-#define ANET_KEYPAD_LCD           // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1530
+#define ZONESTAR_LCD              // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1432
                                   // This LCD is known to be susceptible to electrical interference
1531
                                   // This LCD is known to be susceptible to electrical interference
1433
                                   // which scrambles the display.  Pressing any button clears it up.
1532
                                   // which scrambles the display.  Pressing any button clears it up.
1533
+                                  // This is a LCD2004 display with 5 analog buttons.
1534
+
1434
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1535
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1435
                                   // A clone of the RepRapDiscount full graphics display but with
1536
                                   // A clone of the RepRapDiscount full graphics display but with
1436
                                   // different pins/wiring (see pins_ANET_10.h).
1537
                                   // different pins/wiring (see pins_ANET_10.h).
1540
 //
1641
 //
1541
 //#define MKS_12864OLED
1642
 //#define MKS_12864OLED
1542
 
1643
 
1644
+// Silvergate GLCD controller
1645
+// http://github.com/android444/Silvergate
1646
+//
1647
+//#define SILVER_GATE_GLCD_CONTROLLER
1648
+
1543
 //=============================================================================
1649
 //=============================================================================
1544
 //=============================== Extra Features ==============================
1650
 //=============================== Extra Features ==============================
1545
 //=============================================================================
1651
 //=============================================================================
1596
  * Adds the M150 command to set the LED (or LED strip) color.
1702
  * Adds the M150 command to set the LED (or LED strip) color.
1597
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1703
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1598
  * luminance values can be set from 0 to 255.
1704
  * luminance values can be set from 0 to 255.
1599
- * For Neopixel LED overall brightness parameters is also available 
1705
+ * For Neopixel LED an overall brightness parameter is also available.
1600
  *
1706
  *
1601
  * *** CAUTION ***
1707
  * *** CAUTION ***
1602
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1708
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1603
  *  as the Arduino cannot handle the current the LEDs will require.
1709
  *  as the Arduino cannot handle the current the LEDs will require.
1604
  *  Failure to follow this precaution can destroy your Arduino!
1710
  *  Failure to follow this precaution can destroy your Arduino!
1605
- *  The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
1606
- *  cannot handle such current, separate 5V power supply must be used
1711
+ *  NOTE: A separate 5V power supply is required! The Neopixel LED needs
1712
+ *  more current than the Arduino 5V linear regulator can produce.
1607
  * *** CAUTION ***
1713
  * *** CAUTION ***
1608
  *
1714
  *
1609
- * LED type. This options are mutualy exclusive. Uncomment only one.
1715
+ * LED Type. Enable only one of the following two options.
1610
  *
1716
  *
1611
  */
1717
  */
1612
 //#define RGB_LED
1718
 //#define RGB_LED
1622
 // Support for Adafruit Neopixel LED driver
1728
 // Support for Adafruit Neopixel LED driver
1623
 //#define NEOPIXEL_LED
1729
 //#define NEOPIXEL_LED
1624
 #if ENABLED(NEOPIXEL_LED)
1730
 #if ENABLED(NEOPIXEL_LED)
1625
-  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
1731
+  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
1626
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1732
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1627
-  #define NEOPIXEL_PIXELS 30       // Number of LEDs on strip
1628
-  #define NEOPIXEL_IS_SEQUENTIAL   // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
1629
-  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness 0-255
1733
+  #define NEOPIXEL_PIXELS 30       // Number of LEDs in the strip
1734
+  #define NEOPIXEL_IS_SEQUENTIAL   // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
1735
+  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness (0-255)
1630
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1736
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1631
 #endif
1737
 #endif
1632
 
1738
 
1641
  *  - Change to green once print has finished
1747
  *  - Change to green once print has finished
1642
  *  - Turn off after the print has finished and the user has pushed a button
1748
  *  - Turn off after the print has finished and the user has pushed a button
1643
  */
1749
  */
1644
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED)
1750
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
1645
   #define PRINTER_EVENT_LEDS
1751
   #define PRINTER_EVENT_LEDS
1646
 #endif
1752
 #endif
1647
 
1753
 
1648
-/*********************************************************************\
1649
-* R/C SERVO support
1650
-* Sponsored by TrinityLabs, Reworked by codexmas
1651
-**********************************************************************/
1754
+/**
1755
+ * R/C SERVO support
1756
+ * Sponsored by TrinityLabs, Reworked by codexmas
1757
+ */
1652
 
1758
 
1653
-// Number of servos
1654
-//
1655
-// If you select a configuration below, this will receive a default value and does not need to be set manually
1656
-// set it manually if you have more servos than extruders and wish to manually control some
1657
-// leaving it undefined or defining as 0 will disable the servo subsystem
1658
-// If unsure, leave commented / disabled
1659
-//
1759
+/**
1760
+ * Number of servos
1761
+ *
1762
+ * For some servo-related options NUM_SERVOS will be set automatically.
1763
+ * Set this manually if there are extra servos needing manual control.
1764
+ * Leave undefined or set to 0 to entirely disable the servo subsystem.
1765
+ */
1660
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1766
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1661
 
1767
 
1662
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1768
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1669
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1775
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1670
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1776
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1671
 
1777
 
1672
-/**
1673
- * Filament Width Sensor
1674
- *
1675
- * Measures the filament width in real-time and adjusts
1676
- * flow rate to compensate for any irregularities.
1677
- *
1678
- * Also allows the measured filament diameter to set the
1679
- * extrusion rate, so the slicer only has to specify the
1680
- * volume.
1681
- *
1682
- * Only a single extruder is supported at this time.
1683
- *
1684
- *  34 RAMPS_14    : Analog input 5 on the AUX2 connector
1685
- *  81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
1686
- * 301 RAMBO       : Analog input 3
1687
- *
1688
- * Note: May require analog pins to be defined for other boards.
1689
- */
1690
-//#define FILAMENT_WIDTH_SENSOR
1691
-
1692
-#define DEFAULT_NOMINAL_FILAMENT_DIA 3.00   // (mm) Diameter of the filament generally used (3.0 or 1.75mm), also used in the slicer. Used to validate sensor reading.
1693
-
1694
-#if ENABLED(FILAMENT_WIDTH_SENSOR)
1695
-  #define FILAMENT_SENSOR_EXTRUDER_NUM 0    // Index of the extruder that has the filament sensor (0,1,2,3)
1696
-  #define MEASUREMENT_DELAY_CM        14    // (cm) The distance from the filament sensor to the melting chamber
1697
-
1698
-  #define MEASURED_UPPER_LIMIT         3.30 // (mm) Upper limit used to validate sensor reading
1699
-  #define MEASURED_LOWER_LIMIT         1.90 // (mm) Lower limit used to validate sensor reading
1700
-  #define MAX_MEASUREMENT_DELAY       20    // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
1701
-
1702
-  #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
1703
-
1704
-  // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
1705
-  //#define FILAMENT_LCD_DISPLAY
1706
-#endif
1707
-
1708
 #endif // CONFIGURATION_H
1778
 #endif // CONFIGURATION_H

+ 268
- 125
Marlin/example_configurations/Anet/A8/Configuration_adv.h Переглянути файл

32
  */
32
  */
33
 #ifndef CONFIGURATION_ADV_H
33
 #ifndef CONFIGURATION_ADV_H
34
 #define CONFIGURATION_ADV_H
34
 #define CONFIGURATION_ADV_H
35
-#define CONFIGURATION_ADV_H_VERSION 010100
35
+#define CONFIGURATION_ADV_H_VERSION 010107
36
 
36
 
37
 // @section temperature
37
 // @section temperature
38
 
38
 
48
 #endif
48
 #endif
49
 
49
 
50
 /**
50
 /**
51
- * Thermal Protection protects your printer from damage and fire if a
52
- * thermistor falls out or temperature sensors fail in any way.
51
+ * Thermal Protection provides additional protection to your printer from damage
52
+ * and fire. Marlin always includes safe min and max temperature ranges which
53
+ * protect against a broken or disconnected thermistor wire.
53
  *
54
  *
54
- * The issue: If a thermistor falls out or a temperature sensor fails,
55
- * Marlin can no longer sense the actual temperature. Since a disconnected
56
- * thermistor reads as a low temperature, the firmware will keep the heater on.
55
+ * The issue: If a thermistor falls out, it will report the much lower
56
+ * temperature of the air in the room, and the the firmware will keep
57
+ * the heater on.
57
  *
58
  *
58
  * The solution: Once the temperature reaches the target, start observing.
59
  * The solution: Once the temperature reaches the target, start observing.
59
- * If the temperature stays too far below the target (hysteresis) for too long (period),
60
- * the firmware will halt the machine as a safety precaution.
60
+ * If the temperature stays too far below the target (hysteresis) for too
61
+ * long (period), the firmware will halt the machine as a safety precaution.
61
  *
62
  *
62
- * If you get false positives for "Thermal Runaway" increase THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
63
+ * If you get false positives for "Thermal Runaway", increase
64
+ * THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
63
  */
65
  */
64
 #if ENABLED(THERMAL_PROTECTION_HOTENDS)
66
 #if ENABLED(THERMAL_PROTECTION_HOTENDS)
65
   #define THERMAL_PROTECTION_PERIOD 60        // Seconds
67
   #define THERMAL_PROTECTION_PERIOD 60        // Seconds
66
   #define THERMAL_PROTECTION_HYSTERESIS 10    // Degrees Celsius
68
   #define THERMAL_PROTECTION_HYSTERESIS 10    // Degrees Celsius
67
 
69
 
68
   /**
70
   /**
69
-   * Whenever an M104 or M109 increases the target temperature the firmware will wait for the
70
-   * WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
71
-   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
72
-   * but only if the current temperature is far enough below the target for a reliable test.
71
+   * Whenever an M104, M109, or M303 increases the target temperature, the
72
+   * firmware will wait for the WATCH_TEMP_PERIOD to expire. If the temperature
73
+   * hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted and
74
+   * requires a hard reset. This test restarts with any M104/M109/M303, but only
75
+   * if the current temperature is far enough below the target for a reliable
76
+   * test.
73
    *
77
    *
74
-   * If you get false positives for "Heating failed" increase WATCH_TEMP_PERIOD and/or decrease WATCH_TEMP_INCREASE
75
-   * WATCH_TEMP_INCREASE should not be below 2.
78
+   * If you get false positives for "Heating failed", increase WATCH_TEMP_PERIOD
79
+   * and/or decrease WATCH_TEMP_INCREASE. WATCH_TEMP_INCREASE should not be set
80
+   * below 2.
76
    */
81
    */
77
   #define WATCH_TEMP_PERIOD 20                // Seconds
82
   #define WATCH_TEMP_PERIOD 20                // Seconds
78
   #define WATCH_TEMP_INCREASE 2               // Degrees Celsius
83
   #define WATCH_TEMP_INCREASE 2               // Degrees Celsius
86
   #define THERMAL_PROTECTION_BED_HYSTERESIS 5 // Degrees Celsius
91
   #define THERMAL_PROTECTION_BED_HYSTERESIS 5 // Degrees Celsius
87
 
92
 
88
   /**
93
   /**
89
-   * Whenever an M140 or M190 increases the target temperature the firmware will wait for the
90
-   * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE
91
-   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190,
92
-   * but only if the current temperature is far enough below the target for a reliable test.
93
-   *
94
-   * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease
95
-   * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.)
94
+   * As described above, except for the bed (M140/M190/M303).
96
    */
95
    */
97
   #define WATCH_BED_TEMP_PERIOD 180               // Seconds
96
   #define WATCH_BED_TEMP_PERIOD 180               // Seconds
98
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
97
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
123
   #define AUTOTEMP_OLDWEIGHT 0.98
122
   #define AUTOTEMP_OLDWEIGHT 0.98
124
 #endif
123
 #endif
125
 
124
 
125
+// Show extra position information in M114
126
+//#define M114_DETAIL
127
+
126
 // Show Temperature ADC value
128
 // Show Temperature ADC value
127
 // Enable for M105 to include ADC values read from temperature sensors.
129
 // Enable for M105 to include ADC values read from temperature sensors.
128
 //#define SHOW_TEMP_ADC_VALUES
130
 //#define SHOW_TEMP_ADC_VALUES
257
 
259
 
258
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
260
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
259
 
261
 
260
-// Dual X Steppers
261
-// Uncomment this option to drive two X axis motors.
262
-// The next unused E driver will be assigned to the second X stepper.
262
+/**
263
+ * Dual Steppers / Dual Endstops
264
+ *
265
+ * This section will allow you to use extra E drivers to drive a second motor for X, Y, or Z axes.
266
+ *
267
+ * For example, set X_DUAL_STEPPER_DRIVERS setting to use a second motor. If the motors need to
268
+ * spin in opposite directions set INVERT_X2_VS_X_DIR. If the second motor needs its own endstop
269
+ * set X_DUAL_ENDSTOPS. This can adjust for "racking." Use X2_USE_ENDSTOP to set the endstop plug
270
+ * that should be used for the second endstop. Extra endstops will appear in the output of 'M119'.
271
+ *
272
+ * Use X_DUAL_ENDSTOP_ADJUSTMENT to adjust for mechanical imperfection. After homing both motors
273
+ * this offset is applied to the X2 motor. To find the offset home the X axis, and measure the error
274
+ * in X2. Dual endstop offsets can be set at runtime with 'M666 X<offset> Y<offset> Z<offset>'.
275
+ */
276
+
263
 //#define X_DUAL_STEPPER_DRIVERS
277
 //#define X_DUAL_STEPPER_DRIVERS
264
 #if ENABLED(X_DUAL_STEPPER_DRIVERS)
278
 #if ENABLED(X_DUAL_STEPPER_DRIVERS)
265
-  // Set true if the two X motors need to rotate in opposite directions
266
-  #define INVERT_X2_VS_X_DIR true
279
+  #define INVERT_X2_VS_X_DIR true   // Set 'true' if X motors should rotate in opposite directions
280
+  //#define X_DUAL_ENDSTOPS
281
+  #if ENABLED(X_DUAL_ENDSTOPS)
282
+    #define X2_USE_ENDSTOP _XMAX_
283
+    #define X_DUAL_ENDSTOPS_ADJUSTMENT  0
284
+  #endif
267
 #endif
285
 #endif
268
 
286
 
269
-// Dual Y Steppers
270
-// Uncomment this option to drive two Y axis motors.
271
-// The next unused E driver will be assigned to the second Y stepper.
272
 //#define Y_DUAL_STEPPER_DRIVERS
287
 //#define Y_DUAL_STEPPER_DRIVERS
273
 #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
288
 #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
274
-  // Set true if the two Y motors need to rotate in opposite directions
275
-  #define INVERT_Y2_VS_Y_DIR true
289
+  #define INVERT_Y2_VS_Y_DIR true   // Set 'true' if Y motors should rotate in opposite directions
290
+  //#define Y_DUAL_ENDSTOPS
291
+  #if ENABLED(Y_DUAL_ENDSTOPS)
292
+    #define Y2_USE_ENDSTOP _YMAX_
293
+    #define Y_DUAL_ENDSTOPS_ADJUSTMENT  0
294
+  #endif
276
 #endif
295
 #endif
277
 
296
 
278
-// A single Z stepper driver is usually used to drive 2 stepper motors.
279
-// Uncomment this option to use a separate stepper driver for each Z axis motor.
280
-// The next unused E driver will be assigned to the second Z stepper.
281
 //#define Z_DUAL_STEPPER_DRIVERS
297
 //#define Z_DUAL_STEPPER_DRIVERS
282
-
283
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
298
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
284
-
285
-  // Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper.
286
-  // That way the machine is capable to align the bed during home, since both Z steppers are homed.
287
-  // There is also an implementation of M666 (software endstops adjustment) to this feature.
288
-  // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed.
289
-  // One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2.
290
-  // If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive.
291
-  // Play a little bit with small adjustments (0.5mm) and check the behaviour.
292
-  // The M119 (endstops report) will start reporting the Z2 Endstop as well.
293
-
294
   //#define Z_DUAL_ENDSTOPS
299
   //#define Z_DUAL_ENDSTOPS
295
-
296
   #if ENABLED(Z_DUAL_ENDSTOPS)
300
   #if ENABLED(Z_DUAL_ENDSTOPS)
297
     #define Z2_USE_ENDSTOP _XMAX_
301
     #define Z2_USE_ENDSTOP _XMAX_
298
-    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0  // Use M666 to determine/test this value
302
+    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0
299
   #endif
303
   #endif
300
-
301
-#endif // Z_DUAL_STEPPER_DRIVERS
304
+#endif
302
 
305
 
303
 // Enable this for dual x-carriage printers.
306
 // Enable this for dual x-carriage printers.
304
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
307
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
345
 
348
 
346
 // @section homing
349
 // @section homing
347
 
350
 
348
-//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
351
+// Homing hits each endstop, retracts by these distances, then does a slower bump.
349
 #define X_HOME_BUMP_MM 5
352
 #define X_HOME_BUMP_MM 5
350
 #define Y_HOME_BUMP_MM 5
353
 #define Y_HOME_BUMP_MM 5
351
 #define Z_HOME_BUMP_MM 2
354
 #define Z_HOME_BUMP_MM 2
352
-#define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
353
-//#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
355
+#define HOMING_BUMP_DIVISOR { 2, 2, 4 }  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
356
+//#define QUICK_HOME                     // If homing includes X and Y, do a diagonal move initially
354
 
357
 
355
 // When G28 is called, this option will make Y home before X
358
 // When G28 is called, this option will make Y home before X
356
 //#define HOME_Y_BEFORE_X
359
 //#define HOME_Y_BEFORE_X
434
 //#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 }   // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
437
 //#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 }   // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
435
 //#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 }    // Default drive percent - X, Y, Z, E axis
438
 //#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 }    // Default drive percent - X, Y, Z, E axis
436
 
439
 
437
-// Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
440
+// Use an I2C based DIGIPOT (e.g., Azteeg X3 Pro)
438
 //#define DIGIPOT_I2C
441
 //#define DIGIPOT_I2C
442
+#if ENABLED(DIGIPOT_I2C) && !defined(DIGIPOT_I2C_ADDRESS_A)
443
+  /**
444
+   * Common slave addresses:
445
+   *
446
+   *                    A   (A shifted)   B   (B shifted)  IC
447
+   * Smoothie          0x2C (0x58)       0x2D (0x5A)       MCP4451
448
+   * AZTEEG_X3_PRO     0x2C (0x58)       0x2E (0x5C)       MCP4451
449
+   * MIGHTYBOARD_REVE  0x2F (0x5E)                         MCP4018
450
+   */
451
+  #define DIGIPOT_I2C_ADDRESS_A 0x2C  // unshifted slave address for first DIGIPOT
452
+  #define DIGIPOT_I2C_ADDRESS_B 0x2D  // unshifted slave address for second DIGIPOT
453
+#endif
454
+
439
 //#define DIGIPOT_MCP4018          // Requires library from https://github.com/stawel/SlowSoftI2CMaster
455
 //#define DIGIPOT_MCP4018          // Requires library from https://github.com/stawel/SlowSoftI2CMaster
440
 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4     AZTEEG_X3_PRO: 8
456
 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4     AZTEEG_X3_PRO: 8
441
 // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
457
 // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
466
 // The timeout (in ms) to return to the status screen from sub-menus
482
 // The timeout (in ms) to return to the status screen from sub-menus
467
 //#define LCD_TIMEOUT_TO_STATUS 15000
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
468
 
484
 
485
+/**
486
+ * LED Control Menu
487
+ * Enable this feature to add LED Control to the LCD menu
488
+ */
489
+//#define LED_CONTROL_MENU
490
+#if ENABLED(LED_CONTROL_MENU)
491
+  #define LED_COLOR_PRESETS                 // Enable the Preset Color menu option
492
+  #if ENABLED(LED_COLOR_PRESETS)
493
+    #define LED_USER_PRESET_RED        255  // User defined RED value
494
+    #define LED_USER_PRESET_GREEN      128  // User defined GREEN value
495
+    #define LED_USER_PRESET_BLUE         0  // User defined BLUE value
496
+    #define LED_USER_PRESET_WHITE      255  // User defined WHITE value
497
+    #define LED_USER_PRESET_BRIGHTNESS 255  // User defined intensity
498
+    //#define LED_USER_PRESET_STARTUP       // Have the printer display the user preset color on startup
499
+  #endif
500
+#endif // LED_CONTROL_MENU
501
+
469
 #if ENABLED(SDSUPPORT)
502
 #if ENABLED(SDSUPPORT)
470
 
503
 
471
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
504
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
475
   // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
508
   // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
476
   //#define SD_DETECT_INVERTED
509
   //#define SD_DETECT_INVERTED
477
 
510
 
478
-  #define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
511
+  #define SD_FINISHED_STEPPERRELEASE true          // Disable steppers when SD Print is finished
479
   #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
512
   #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
480
 
513
 
481
-  #define SDCARD_RATHERRECENTFIRST  //reverse file order of sd card menu display. Its sorted practically after the file system block order.
482
-  // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that.
483
-  // using:
514
+  // Reverse SD sort to show "more recent" files first, according to the card's FAT.
515
+  // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended.
516
+  #define SDCARD_RATHERRECENTFIRST
517
+
518
+  // Add an option in the menu to run all auto#.g files
484
   //#define MENU_ADDAUTOSTART
519
   //#define MENU_ADDAUTOSTART
485
 
520
 
486
   /**
521
   /**
517
     #define SDSORT_USES_STACK  false  // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
552
     #define SDSORT_USES_STACK  false  // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
518
     #define SDSORT_CACHE_NAMES false  // Keep sorted items in RAM longer for speedy performance. Most expensive option.
553
     #define SDSORT_CACHE_NAMES false  // Keep sorted items in RAM longer for speedy performance. Most expensive option.
519
     #define SDSORT_DYNAMIC_RAM false  // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
554
     #define SDSORT_DYNAMIC_RAM false  // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
555
+    #define SDSORT_CACHE_VFATS 2      // Maximum number of 13-byte VFAT entries to use for sorting.
556
+                                      // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM.
520
   #endif
557
   #endif
521
 
558
 
522
   // Show a progress bar on HD44780 LCDs for SD printing
559
   // Show a progress bar on HD44780 LCDs for SD printing
535
     //#define LCD_PROGRESS_BAR_TEST
572
     //#define LCD_PROGRESS_BAR_TEST
536
   #endif
573
   #endif
537
 
574
 
575
+  // Add an 'M73' G-code to set the current percentage
576
+  //#define LCD_SET_PROGRESS_MANUALLY
577
+
538
   // This allows hosts to request long names for files and folders with M33
578
   // This allows hosts to request long names for files and folders with M33
539
   //#define LONG_FILENAME_HOST_SUPPORT
579
   //#define LONG_FILENAME_HOST_SUPPORT
540
 
580
 
541
-  // This option allows you to abort SD printing when any endstop is triggered.
542
-  // This feature must be enabled with "M540 S1" or from the LCD menu.
543
-  // To have any effect, endstops must be enabled during SD printing.
581
+  // Enable this option to scroll long filenames in the SD card menu
582
+  //#define SCROLL_LONG_FILENAMES
583
+
584
+  /**
585
+   * This option allows you to abort SD printing when any endstop is triggered.
586
+   * This feature must be enabled with "M540 S1" or from the LCD menu.
587
+   * To have any effect, endstops must be enabled during SD printing.
588
+   */
544
   //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
589
   //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
545
 
590
 
591
+  /**
592
+   * This option makes it easier to print the same SD Card file again.
593
+   * On print completion the LCD Menu will open with the file selected.
594
+   * You can just click to start the print, or navigate elsewhere.
595
+   */
596
+  //#define SD_REPRINT_LAST_SELECTED_FILE
597
+
546
 #endif // SDSUPPORT
598
 #endif // SDSUPPORT
547
 
599
 
548
 /**
600
 /**
575
   // Enable this option and reduce the value to optimize screen updates.
627
   // Enable this option and reduce the value to optimize screen updates.
576
   // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
628
   // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
577
   //#define DOGM_SPI_DELAY_US 5
629
   //#define DOGM_SPI_DELAY_US 5
630
+
631
+  // Swap the CW/CCW indicators in the graphics overlay
632
+  //#define OVERLAY_GFX_REVERSE
633
+
578
 #endif // DOGLCD
634
 #endif // DOGLCD
579
 
635
 
580
 // @section safety
636
 // @section safety
603
 #if ENABLED(BABYSTEPPING)
659
 #if ENABLED(BABYSTEPPING)
604
   //#define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
660
   //#define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
605
   #define BABYSTEP_INVERT_Z false    // Change if Z babysteps should go the other way
661
   #define BABYSTEP_INVERT_Z false    // Change if Z babysteps should go the other way
606
-  #define BABYSTEP_MULTIPLICATOR 100 // Babysteps are very small. Increase for faster motion.
662
+  #define BABYSTEP_MULTIPLICATOR 1   // Babysteps are very small. Increase for faster motion.
607
   //#define BABYSTEP_ZPROBE_OFFSET   // Enable to combine M851 and Babystepping
663
   //#define BABYSTEP_ZPROBE_OFFSET   // Enable to combine M851 and Babystepping
608
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
664
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
609
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
665
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
610
                                         // Note: Extra time may be added to mitigate controller latency.
666
                                         // Note: Extra time may be added to mitigate controller latency.
611
   //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
667
   //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
612
-  //#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators
613
 #endif
668
 #endif
614
 
669
 
615
 // @section extruder
670
 // @section extruder
656
 
711
 
657
 // @section leveling
712
 // @section leveling
658
 
713
 
659
-// Default mesh area is an area with an inset margin on the print area.
660
-// Below are the macros that are used to define the borders for the mesh area,
661
-// made available here for specialized needs, ie dual extruder setup.
662
-#if ENABLED(MESH_BED_LEVELING)
663
-  #define MESH_MIN_X MESH_INSET
664
-  #define MESH_MAX_X (X_BED_SIZE - (MESH_INSET))
665
-  #define MESH_MIN_Y MESH_INSET
666
-  #define MESH_MAX_Y (Y_BED_SIZE - (MESH_INSET))
667
-#elif ENABLED(AUTO_BED_LEVELING_UBL)
668
-  #define UBL_MESH_MIN_X UBL_MESH_INSET
669
-  #define UBL_MESH_MAX_X (X_BED_SIZE - (UBL_MESH_INSET))
670
-  #define UBL_MESH_MIN_Y UBL_MESH_INSET
671
-  #define UBL_MESH_MAX_Y (Y_BED_SIZE - (UBL_MESH_INSET))
672
-
673
-  // If this is defined, the currently active mesh will be saved in the
674
-  // current slot on M500.
675
-  #define UBL_SAVE_ACTIVE_ON_M500
714
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
715
+  #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
716
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
717
+  #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
718
+#endif
719
+
720
+#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL)
721
+  // Override the mesh area if the automatic (max) area is too large
722
+  //#define MESH_MIN_X MESH_INSET
723
+  //#define MESH_MIN_Y MESH_INSET
724
+  //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET)
725
+  //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
676
 #endif
726
 #endif
677
 
727
 
678
 // @section extras
728
 // @section extras
692
 //#define BEZIER_CURVE_SUPPORT
742
 //#define BEZIER_CURVE_SUPPORT
693
 
743
 
694
 // G38.2 and G38.3 Probe Target
744
 // G38.2 and G38.3 Probe Target
695
-// Enable PROBE_DOUBLE_TOUCH if you want G38 to double touch
745
+// Set MULTIPLE_PROBING if you want G38 to double touch
696
 //#define G38_PROBE_TARGET
746
 //#define G38_PROBE_TARGET
697
 #if ENABLED(G38_PROBE_TARGET)
747
 #if ENABLED(G38_PROBE_TARGET)
698
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
748
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
717
 // @section hidden
767
 // @section hidden
718
 
768
 
719
 // The number of linear motions that can be in the plan at any give time.
769
 // The number of linear motions that can be in the plan at any give time.
720
-// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2, i.g. 8,16,32 because shifts and ors are used to do the ring-buffering.
770
+// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2 (e.g. 8, 16, 32) because shifts and ors are used to do the ring-buffering.
721
 #if ENABLED(SDSUPPORT)
771
 #if ENABLED(SDSUPPORT)
722
   #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
772
   #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
723
 #else
773
 #else
808
 #endif
858
 #endif
809
 
859
 
810
 /**
860
 /**
861
+ * Extra Fan Speed
862
+ * Adds a secondary fan speed for each print-cooling fan.
863
+ *   'M106 P<fan> T3-255' : Set a secondary speed for <fan>
864
+ *   'M106 P<fan> T2'     : Use the set secondary speed
865
+ *   'M106 P<fan> T1'     : Restore the previous fan speed
866
+ */
867
+//#define EXTRA_FAN_SPEED
868
+
869
+/**
811
  * Advanced Pause
870
  * Advanced Pause
812
  * Experimental feature for filament change support and for parking the nozzle when paused.
871
  * Experimental feature for filament change support and for parking the nozzle when paused.
813
  * Adds the GCode M600 for initiating filament change.
872
  * Adds the GCode M600 for initiating filament change.
917
 
976
 
918
 #endif
977
 #endif
919
 
978
 
920
-// @section TMC2130
979
+// @section TMC2130, TMC2208
921
 
980
 
922
 /**
981
 /**
923
  * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
982
  * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
931
  */
990
  */
932
 //#define HAVE_TMC2130
991
 //#define HAVE_TMC2130
933
 
992
 
934
-#if ENABLED(HAVE_TMC2130)
993
+/**
994
+ * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
995
+ * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin.
996
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN
997
+ * to #_SERIAL_TX_PIN with a 1K resistor.
998
+ * The drivers can also be used with hardware serial.
999
+ *
1000
+ * You'll also need the TMC2208Stepper Arduino library
1001
+ * (https://github.com/teemuatlut/TMC2208Stepper).
1002
+ */
1003
+//#define HAVE_TMC2208
1004
+
1005
+#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
935
 
1006
 
936
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
1007
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
937
   //#define X_IS_TMC2130
1008
   //#define X_IS_TMC2130
946
   //#define E3_IS_TMC2130
1017
   //#define E3_IS_TMC2130
947
   //#define E4_IS_TMC2130
1018
   //#define E4_IS_TMC2130
948
 
1019
 
1020
+  //#define X_IS_TMC2208
1021
+  //#define X2_IS_TMC2208
1022
+  //#define Y_IS_TMC2208
1023
+  //#define Y2_IS_TMC2208
1024
+  //#define Z_IS_TMC2208
1025
+  //#define Z2_IS_TMC2208
1026
+  //#define E0_IS_TMC2208
1027
+  //#define E1_IS_TMC2208
1028
+  //#define E2_IS_TMC2208
1029
+  //#define E3_IS_TMC2208
1030
+  //#define E4_IS_TMC2208
1031
+
949
   /**
1032
   /**
950
    * Stepper driver settings
1033
    * Stepper driver settings
951
    */
1034
    */
952
 
1035
 
953
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1036
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
954
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1037
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
955
-  #define INTERPOLATE          1  // Interpolate X/Y/Z_MICROSTEPS to 256
1038
+  #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
956
 
1039
 
957
-  #define X_CURRENT         1000  // rms current in mA. Multiply by 1.41 for peak current.
1040
+  #define X_CURRENT          800  // rms current in mA. Multiply by 1.41 for peak current.
958
   #define X_MICROSTEPS        16  // 0..256
1041
   #define X_MICROSTEPS        16  // 0..256
959
 
1042
 
960
-  #define Y_CURRENT         1000
1043
+  #define Y_CURRENT          800
961
   #define Y_MICROSTEPS        16
1044
   #define Y_MICROSTEPS        16
962
 
1045
 
963
-  #define Z_CURRENT         1000
1046
+  #define Z_CURRENT          800
964
   #define Z_MICROSTEPS        16
1047
   #define Z_MICROSTEPS        16
965
 
1048
 
966
-  //#define X2_CURRENT      1000
967
-  //#define X2_MICROSTEPS     16
1049
+  #define X2_CURRENT         800
1050
+  #define X2_MICROSTEPS       16
968
 
1051
 
969
-  //#define Y2_CURRENT      1000
970
-  //#define Y2_MICROSTEPS     16
1052
+  #define Y2_CURRENT         800
1053
+  #define Y2_MICROSTEPS       16
971
 
1054
 
972
-  //#define Z2_CURRENT      1000
973
-  //#define Z2_MICROSTEPS     16
1055
+  #define Z2_CURRENT         800
1056
+  #define Z2_MICROSTEPS       16
974
 
1057
 
975
-  //#define E0_CURRENT      1000
976
-  //#define E0_MICROSTEPS     16
1058
+  #define E0_CURRENT         800
1059
+  #define E0_MICROSTEPS       16
977
 
1060
 
978
-  //#define E1_CURRENT      1000
979
-  //#define E1_MICROSTEPS     16
1061
+  #define E1_CURRENT         800
1062
+  #define E1_MICROSTEPS       16
980
 
1063
 
981
-  //#define E2_CURRENT      1000
982
-  //#define E2_MICROSTEPS     16
1064
+  #define E2_CURRENT         800
1065
+  #define E2_MICROSTEPS       16
983
 
1066
 
984
-  //#define E3_CURRENT      1000
985
-  //#define E3_MICROSTEPS     16
1067
+  #define E3_CURRENT         800
1068
+  #define E3_MICROSTEPS       16
986
 
1069
 
987
-  //#define E4_CURRENT      1000
988
-  //#define E4_MICROSTEPS     16
1070
+  #define E4_CURRENT         800
1071
+  #define E4_MICROSTEPS       16
989
 
1072
 
990
   /**
1073
   /**
991
    * Use Trinamic's ultra quiet stepping mode.
1074
    * Use Trinamic's ultra quiet stepping mode.
994
   #define STEALTHCHOP
1077
   #define STEALTHCHOP
995
 
1078
 
996
   /**
1079
   /**
997
-   * Let Marlin automatically control stepper current.
998
-   * This is still an experimental feature.
999
-   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
1000
-   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
1001
-   * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX
1080
+   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1081
+   * like overtemperature and short to ground. TMC2208 requires hardware serial.
1082
+   * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1083
+   * Other detected conditions can be used to stop the current print.
1002
    * Relevant g-codes:
1084
    * Relevant g-codes:
1003
    * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
1085
    * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
1004
-   * M906 S1 - Start adjusting current
1005
-   * M906 S0 - Stop adjusting current
1006
    * M911 - Report stepper driver overtemperature pre-warn condition.
1086
    * M911 - Report stepper driver overtemperature pre-warn condition.
1007
    * M912 - Clear stepper driver overtemperature pre-warn condition flag.
1087
    * M912 - Clear stepper driver overtemperature pre-warn condition flag.
1088
+   * M122 S0/1 - Report driver parameters (Requires TMC_DEBUG)
1008
    */
1089
    */
1009
-  //#define AUTOMATIC_CURRENT_CONTROL
1090
+  //#define MONITOR_DRIVER_STATUS
1010
 
1091
 
1011
-  #if ENABLED(AUTOMATIC_CURRENT_CONTROL)
1012
-    #define CURRENT_STEP          50  // [mA]
1013
-    #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
1092
+  #if ENABLED(MONITOR_DRIVER_STATUS)
1093
+    #define CURRENT_STEP_DOWN     50  // [mA]
1014
     #define REPORT_CURRENT_CHANGE
1094
     #define REPORT_CURRENT_CHANGE
1095
+    #define STOP_ON_ERROR
1015
   #endif
1096
   #endif
1016
 
1097
 
1017
   /**
1098
   /**
1026
   #define X2_HYBRID_THRESHOLD    100
1107
   #define X2_HYBRID_THRESHOLD    100
1027
   #define Y_HYBRID_THRESHOLD     100
1108
   #define Y_HYBRID_THRESHOLD     100
1028
   #define Y2_HYBRID_THRESHOLD    100
1109
   #define Y2_HYBRID_THRESHOLD    100
1029
-  #define Z_HYBRID_THRESHOLD       4
1030
-  #define Z2_HYBRID_THRESHOLD      4
1110
+  #define Z_HYBRID_THRESHOLD       3
1111
+  #define Z2_HYBRID_THRESHOLD      3
1031
   #define E0_HYBRID_THRESHOLD     30
1112
   #define E0_HYBRID_THRESHOLD     30
1032
   #define E1_HYBRID_THRESHOLD     30
1113
   #define E1_HYBRID_THRESHOLD     30
1033
   #define E2_HYBRID_THRESHOLD     30
1114
   #define E2_HYBRID_THRESHOLD     30
1037
   /**
1118
   /**
1038
    * Use stallGuard2 to sense an obstacle and trigger an endstop.
1119
    * Use stallGuard2 to sense an obstacle and trigger an endstop.
1039
    * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
1120
    * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
1040
-   * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal.
1121
+   * X and Y homing will always be done in spreadCycle mode.
1041
    *
1122
    *
1042
    * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
1123
    * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
1043
    * Higher values make the system LESS sensitive.
1124
    * Higher values make the system LESS sensitive.
1046
    * It is advised to set X/Y_HOME_BUMP_MM to 0.
1127
    * It is advised to set X/Y_HOME_BUMP_MM to 0.
1047
    * M914 X/Y to live tune the setting
1128
    * M914 X/Y to live tune the setting
1048
    */
1129
    */
1049
-  //#define SENSORLESS_HOMING
1130
+  //#define SENSORLESS_HOMING // TMC2130 only
1050
 
1131
 
1051
   #if ENABLED(SENSORLESS_HOMING)
1132
   #if ENABLED(SENSORLESS_HOMING)
1052
-    #define X_HOMING_SENSITIVITY  19
1053
-    #define Y_HOMING_SENSITIVITY  19
1133
+    #define X_HOMING_SENSITIVITY  8
1134
+    #define Y_HOMING_SENSITIVITY  8
1054
   #endif
1135
   #endif
1055
 
1136
 
1056
   /**
1137
   /**
1138
+   * Enable M122 debugging command for TMC stepper drivers.
1139
+   * M122 S0/1 will enable continous reporting.
1140
+   */
1141
+  //#define TMC_DEBUG
1142
+
1143
+  /**
1057
    * You can set your own advanced settings by filling in predefined functions.
1144
    * You can set your own advanced settings by filling in predefined functions.
1058
    * A list of available functions can be found on the library github page
1145
    * A list of available functions can be found on the library github page
1059
    * https://github.com/teemuatlut/TMC2130Stepper
1146
    * https://github.com/teemuatlut/TMC2130Stepper
1147
+   * https://github.com/teemuatlut/TMC2208Stepper
1060
    *
1148
    *
1061
    * Example:
1149
    * Example:
1062
-   * #define TMC2130_ADV() { \
1150
+   * #define TMC_ADV() { \
1063
    *   stepperX.diag0_temp_prewarn(1); \
1151
    *   stepperX.diag0_temp_prewarn(1); \
1064
-   *   stepperX.interpolate(0); \
1152
+   *   stepperY.interpolate(0); \
1065
    * }
1153
    * }
1066
    */
1154
    */
1067
-  #define  TMC2130_ADV() {  }
1155
+  #define  TMC_ADV() {  }
1068
 
1156
 
1069
-#endif // HAVE_TMC2130
1157
+#endif // TMC2130 || TMC2208
1070
 
1158
 
1071
 // @section L6470
1159
 // @section L6470
1072
 
1160
 
1231
 #endif
1319
 #endif
1232
 
1320
 
1233
 /**
1321
 /**
1322
+ * Filament Width Sensor
1323
+ *
1324
+ * Measures the filament width in real-time and adjusts
1325
+ * flow rate to compensate for any irregularities.
1326
+ *
1327
+ * Also allows the measured filament diameter to set the
1328
+ * extrusion rate, so the slicer only has to specify the
1329
+ * volume.
1330
+ *
1331
+ * Only a single extruder is supported at this time.
1332
+ *
1333
+ *  34 RAMPS_14    : Analog input 5 on the AUX2 connector
1334
+ *  81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
1335
+ * 301 RAMBO       : Analog input 3
1336
+ *
1337
+ * Note: May require analog pins to be defined for other boards.
1338
+ */
1339
+//#define FILAMENT_WIDTH_SENSOR
1340
+
1341
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
1342
+  #define FILAMENT_SENSOR_EXTRUDER_NUM 0    // Index of the extruder that has the filament sensor. :[0,1,2,3,4]
1343
+  #define MEASUREMENT_DELAY_CM        14    // (cm) The distance from the filament sensor to the melting chamber
1344
+
1345
+  #define MEASURED_UPPER_LIMIT         3.30 // (mm) Upper limit used to validate sensor reading
1346
+  #define MEASURED_LOWER_LIMIT         1.90 // (mm) Lower limit used to validate sensor reading
1347
+  #define MAX_MEASUREMENT_DELAY       20    // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
1348
+
1349
+  #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
1350
+
1351
+  // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
1352
+  //#define FILAMENT_LCD_DISPLAY
1353
+#endif
1354
+
1355
+/**
1356
+ * CNC Coordinate Systems
1357
+ *
1358
+ * Enables G53 and G54-G59.3 commands to select coordinate systems
1359
+ * and G92.1 to reset the workspace to native machine space.
1360
+ */
1361
+//#define CNC_COORDINATE_SYSTEMS
1362
+
1363
+/**
1234
  * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
1364
  * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
1235
  */
1365
  */
1236
 //#define PINS_DEBUGGING
1366
 //#define PINS_DEBUGGING
1421
                                          // tweaks made to the configuration are affecting the printer in real-time.
1551
                                          // tweaks made to the configuration are affecting the printer in real-time.
1422
 #endif
1552
 #endif
1423
 
1553
 
1554
+/**
1555
+ * NanoDLP Sync support
1556
+ *
1557
+ * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
1558
+ * string to enable synchronization with DLP projector exposure. This change will allow to use
1559
+ * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
1560
+ */
1561
+//#define NANODLP_Z_SYNC
1562
+#if ENABLED(NANODLP_Z_SYNC)
1563
+  //#define NANODLP_ALL_AXIS  // Enables "Z_move_comp" output on any axis move.
1564
+                              // Default behaviour is limited to Z axis only.
1565
+#endif
1566
+
1424
 #endif // CONFIGURATION_ADV_H
1567
 #endif // CONFIGURATION_ADV_H

+ 160
- 91
Marlin/example_configurations/BQ/Hephestos/Configuration.h Переглянути файл

37
  */
37
  */
38
 #ifndef CONFIGURATION_H
38
 #ifndef CONFIGURATION_H
39
 #define CONFIGURATION_H
39
 #define CONFIGURATION_H
40
-#define CONFIGURATION_H_VERSION 010100
40
+#define CONFIGURATION_H_VERSION 010107
41
 
41
 
42
 //===========================================================================
42
 //===========================================================================
43
 //============================= Getting Started =============================
43
 //============================= Getting Started =============================
139
 // :[1, 2, 3, 4, 5]
139
 // :[1, 2, 3, 4, 5]
140
 #define EXTRUDERS 1
140
 #define EXTRUDERS 1
141
 
141
 
142
+// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
143
+#define DEFAULT_NOMINAL_FILAMENT_DIA 3.0
144
+
142
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
145
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
143
 //#define SINGLENOZZLE
146
 //#define SINGLENOZZLE
144
 
147
 
339
 
342
 
340
 // Comment the following line to disable PID and enable bang-bang.
343
 // Comment the following line to disable PID and enable bang-bang.
341
 #define PIDTEMP
344
 #define PIDTEMP
342
-#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
343
-#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
345
+#define BANG_MAX 255     // Limits current to nozzle while in bang-bang mode; 255=full current
346
+#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
347
+#define PID_K1 0.95      // Smoothing factor within the PID
344
 #if ENABLED(PIDTEMP)
348
 #if ENABLED(PIDTEMP)
345
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
349
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
346
   //#define PID_DEBUG // Sends debug data to the serial port.
350
   //#define PID_DEBUG // Sends debug data to the serial port.
350
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
354
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
351
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
355
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
352
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
356
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
353
-  #define K1 0.95 //smoothing factor within the PID
354
 
357
 
355
   // Hephestos i3
358
   // Hephestos i3
356
   #define  DEFAULT_Kp 23.05
359
   #define  DEFAULT_Kp 23.05
419
 //===========================================================================
422
 //===========================================================================
420
 
423
 
421
 /**
424
 /**
422
- * Thermal Protection protects your printer from damage and fire if a
423
- * thermistor falls out or temperature sensors fail in any way.
425
+ * Thermal Protection provides additional protection to your printer from damage
426
+ * and fire. Marlin always includes safe min and max temperature ranges which
427
+ * protect against a broken or disconnected thermistor wire.
424
  *
428
  *
425
- * The issue: If a thermistor falls out or a temperature sensor fails,
426
- * Marlin can no longer sense the actual temperature. Since a disconnected
427
- * thermistor reads as a low temperature, the firmware will keep the heater on.
429
+ * The issue: If a thermistor falls out, it will report the much lower
430
+ * temperature of the air in the room, and the the firmware will keep
431
+ * the heater on.
428
  *
432
  *
429
  * If you get "Thermal Runaway" or "Heating failed" errors the
433
  * If you get "Thermal Runaway" or "Heating failed" errors the
430
  * details can be tuned in Configuration_adv.h
434
  * details can be tuned in Configuration_adv.h
564
 // @section probes
568
 // @section probes
565
 
569
 
566
 //
570
 //
567
-// See http://marlinfw.org/configuration/probes.html
571
+// See http://marlinfw.org/docs/configuration/probes.html
568
 //
572
 //
569
 
573
 
570
 /**
574
 /**
677
 // X and Y axis travel speed (mm/m) between probes
681
 // X and Y axis travel speed (mm/m) between probes
678
 #define XY_PROBE_SPEED 8000
682
 #define XY_PROBE_SPEED 8000
679
 
683
 
680
-// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH)
684
+// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
681
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
685
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
682
 
686
 
683
 // Speed for the "accurate" probe of each point
687
 // Speed for the "accurate" probe of each point
684
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
688
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
685
 
689
 
686
-// Use double touch for probing
687
-//#define PROBE_DOUBLE_TOUCH
690
+// The number of probes to perform at each point.
691
+//   Set to 2 for a fast/slow probe, using the second probe result.
692
+//   Set to 3 or more for slow probes, averaging the results.
693
+//#define MULTIPLE_PROBING 2
688
 
694
 
689
 /**
695
 /**
690
  * Z probes require clearance when deploying, stowing, and moving between
696
  * Z probes require clearance when deploying, stowing, and moving between
776
 #define Y_MAX_POS Y_BED_SIZE
782
 #define Y_MAX_POS Y_BED_SIZE
777
 #define Z_MAX_POS 180
783
 #define Z_MAX_POS 180
778
 
784
 
779
-// If enabled, axes won't move below MIN_POS in response to movement commands.
785
+/**
786
+ * Software Endstops
787
+ *
788
+ * - Prevent moves outside the set machine bounds.
789
+ * - Individual axes can be disabled, if desired.
790
+ * - X and Y only apply to Cartesian robots.
791
+ * - Use 'M211' to set software endstops on/off or report current state
792
+ */
793
+
794
+// Min software endstops curtail movement below minimum coordinate bounds
780
 #define MIN_SOFTWARE_ENDSTOPS
795
 #define MIN_SOFTWARE_ENDSTOPS
781
-// If enabled, axes won't move above MAX_POS in response to movement commands.
796
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
797
+  #define MIN_SOFTWARE_ENDSTOP_X
798
+  #define MIN_SOFTWARE_ENDSTOP_Y
799
+  #define MIN_SOFTWARE_ENDSTOP_Z
800
+#endif
801
+
802
+// Max software endstops curtail movement above maximum coordinate bounds
782
 #define MAX_SOFTWARE_ENDSTOPS
803
 #define MAX_SOFTWARE_ENDSTOPS
804
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
805
+  #define MAX_SOFTWARE_ENDSTOP_X
806
+  #define MAX_SOFTWARE_ENDSTOP_Y
807
+  #define MAX_SOFTWARE_ENDSTOP_Z
808
+#endif
783
 
809
 
784
 /**
810
 /**
785
  * Filament Runout Sensor
811
  * Filament Runout Sensor
799
 //===========================================================================
825
 //===========================================================================
800
 //=============================== Bed Leveling ==============================
826
 //=============================== Bed Leveling ==============================
801
 //===========================================================================
827
 //===========================================================================
802
-// @section bedlevel
828
+// @section calibrate
803
 
829
 
804
 /**
830
 /**
805
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
831
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
825
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
851
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
826
  *   A comprehensive bed leveling system combining the features and benefits
852
  *   A comprehensive bed leveling system combining the features and benefits
827
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
853
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
828
- *   Validation and Mesh Editing systems. Currently, UBL is only checked out
829
- *   for Cartesian Printers. That said, it was primarily designed to correct
830
- *   poor quality Delta Printers. If you feel adventurous and have a Delta,
831
- *   please post an issue if something doesn't work correctly. Initially,
832
- *   you will need to set a reduced bed size so you have a rectangular area
833
- *   to test on.
854
+ *   Validation and Mesh Editing systems.
834
  *
855
  *
835
  * - MESH_BED_LEVELING
856
  * - MESH_BED_LEVELING
836
  *   Probe a grid manually
857
  *   Probe a grid manually
857
   // at which point movement will be level to the machine's XY plane.
878
   // at which point movement will be level to the machine's XY plane.
858
   // The height can be set with M420 Z<height>
879
   // The height can be set with M420 Z<height>
859
   #define ENABLE_LEVELING_FADE_HEIGHT
880
   #define ENABLE_LEVELING_FADE_HEIGHT
881
+
882
+  // For Cartesian machines, instead of dividing moves on mesh boundaries,
883
+  // split up moves into short segments like a Delta. This follows the
884
+  // contours of the bed more closely than edge-to-edge straight moves.
885
+  #define SEGMENT_LEVELED_MOVES
886
+  #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)
887
+
888
+  /**
889
+   * Enable the G26 Mesh Validation Pattern tool.
890
+   */
891
+  //#define G26_MESH_VALIDATION   // Enable G26 mesh validation
892
+  #if ENABLED(G26_MESH_VALIDATION)
893
+    #define MESH_TEST_NOZZLE_SIZE     0.4   // (mm) Diameter of primary nozzle.
894
+    #define MESH_TEST_LAYER_HEIGHT    0.2   // (mm) Default layer height for the G26 Mesh Validation Tool.
895
+    #define MESH_TEST_HOTEND_TEMP   205.0   // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
896
+    #define MESH_TEST_BED_TEMP       60.0   // (°C) Default bed temperature for the G26 Mesh Validation Tool.
897
+  #endif
898
+
860
 #endif
899
 #endif
861
 
900
 
862
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
901
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
912
   //========================= Unified Bed Leveling ============================
951
   //========================= Unified Bed Leveling ============================
913
   //===========================================================================
952
   //===========================================================================
914
 
953
 
915
-  #define UBL_MESH_INSET 1          // Mesh inset margin on print area
954
+  //#define MESH_EDIT_GFX_OVERLAY   // Display a graphics overlay while editing the mesh
955
+
956
+  #define MESH_INSET 1              // Mesh inset margin on print area
916
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
957
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
917
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
958
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
918
 
959
 
923
   #define UBL_PROBE_PT_3_X 180
964
   #define UBL_PROBE_PT_3_X 180
924
   #define UBL_PROBE_PT_3_Y 20
965
   #define UBL_PROBE_PT_3_Y 20
925
 
966
 
926
-  #define UBL_G26_MESH_VALIDATION   // Enable G26 mesh validation
927
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
967
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
968
+  #define UBL_SAVE_ACTIVE_ON_M500   // Save the currently active mesh in the current slot on M500
928
 
969
 
929
 #elif ENABLED(MESH_BED_LEVELING)
970
 #elif ENABLED(MESH_BED_LEVELING)
930
 
971
 
984
 //#define Z_SAFE_HOMING
1025
 //#define Z_SAFE_HOMING
985
 
1026
 
986
 #if ENABLED(Z_SAFE_HOMING)
1027
 #if ENABLED(Z_SAFE_HOMING)
987
-  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axis (G28).
988
-  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axis (G28).
1028
+  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axes (G28).
1029
+  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axes (G28).
989
 #endif
1030
 #endif
990
 
1031
 
991
 // Homing speeds (mm/m)
1032
 // Homing speeds (mm/m)
992
 #define HOMING_FEEDRATE_XY 2000
1033
 #define HOMING_FEEDRATE_XY 2000
993
 #define HOMING_FEEDRATE_Z  150
1034
 #define HOMING_FEEDRATE_Z  150
994
 
1035
 
1036
+// @section calibrate
1037
+
1038
+/**
1039
+ * Bed Skew Compensation
1040
+ *
1041
+ * This feature corrects for misalignment in the XYZ axes.
1042
+ *
1043
+ * Take the following steps to get the bed skew in the XY plane:
1044
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1045
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1046
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1047
+ *  4. For XY_SIDE_AD measure the edge A to D
1048
+ *
1049
+ * Marlin automatically computes skew factors from these measurements.
1050
+ * Skew factors may also be computed and set manually:
1051
+ *
1052
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1053
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1054
+ *
1055
+ * If desired, follow the same procedure for XZ and YZ.
1056
+ * Use these diagrams for reference:
1057
+ *
1058
+ *    Y                     Z                     Z
1059
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1060
+ *    |    /       /        |    /       /        |    /       /
1061
+ *    |   /       /         |   /       /         |   /       /
1062
+ *    |  A-------D          |  A-------D          |  A-------D
1063
+ *    +-------------->X     +-------------->X     +-------------->Y
1064
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1065
+ */
1066
+//#define SKEW_CORRECTION
1067
+
1068
+#if ENABLED(SKEW_CORRECTION)
1069
+  // Input all length measurements here:
1070
+  #define XY_DIAG_AC 282.8427124746
1071
+  #define XY_DIAG_BD 282.8427124746
1072
+  #define XY_SIDE_AD 200
1073
+
1074
+  // Or, set the default skew factors directly here
1075
+  // to override the above measurements:
1076
+  #define XY_SKEW_FACTOR 0.0
1077
+
1078
+  //#define SKEW_CORRECTION_FOR_Z
1079
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1080
+    #define XZ_DIAG_AC 282.8427124746
1081
+    #define XZ_DIAG_BD 282.8427124746
1082
+    #define YZ_DIAG_AC 282.8427124746
1083
+    #define YZ_DIAG_BD 282.8427124746
1084
+    #define YZ_SIDE_AD 200
1085
+    #define XZ_SKEW_FACTOR 0.0
1086
+    #define YZ_SKEW_FACTOR 0.0
1087
+  #endif
1088
+
1089
+  // Enable this option for M852 to set skew at runtime
1090
+  //#define SKEW_CORRECTION_GCODE
1091
+#endif
1092
+
995
 //=============================================================================
1093
 //=============================================================================
996
 //============================= Additional Features ===========================
1094
 //============================= Additional Features ===========================
997
 //=============================================================================
1095
 //=============================================================================
1023
 //
1121
 //
1024
 // M100 Free Memory Watcher
1122
 // M100 Free Memory Watcher
1025
 //
1123
 //
1026
-//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
1124
+//#define M100_FREE_MEMORY_WATCHER    // Add M100 (Free Memory Watcher) to debug memory usage
1027
 
1125
 
1028
 //
1126
 //
1029
 // G20/G21 Inch mode support
1127
 // G20/G21 Inch mode support
1168
  *
1266
  *
1169
  * Select the language to display on the LCD. These languages are available:
1267
  * Select the language to display on the LCD. These languages are available:
1170
  *
1268
  *
1171
- *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, gl, hr,
1172
- *    it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1269
+ *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, fr_utf8, gl,
1270
+ *    hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1173
  *    tr, uk, zh_CN, zh_TW, test
1271
  *    tr, uk, zh_CN, zh_TW, test
1174
  *
1272
  *
1175
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1273
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1176
  */
1274
  */
1177
-//#define LCD_LANGUAGE en
1275
+#define LCD_LANGUAGE en
1178
 
1276
 
1179
 /**
1277
 /**
1180
  * LCD Character Set
1278
  * LCD Character Set
1300
 // Note: Test audio output with the G-Code:
1398
 // Note: Test audio output with the G-Code:
1301
 //  M300 S<frequency Hz> P<duration ms>
1399
 //  M300 S<frequency Hz> P<duration ms>
1302
 //
1400
 //
1303
-//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
1304
-//#define LCD_FEEDBACK_FREQUENCY_HZ 1000
1401
+//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
1402
+//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
1305
 
1403
 
1306
 //
1404
 //
1307
 // CONTROLLER TYPE: Standard
1405
 // CONTROLLER TYPE: Standard
1409
 //#define CARTESIO_UI
1507
 //#define CARTESIO_UI
1410
 
1508
 
1411
 //
1509
 //
1412
-// ANET_10 Controller supported displays.
1510
+// ANET and Tronxy Controller supported displays.
1413
 //
1511
 //
1414
-//#define ANET_KEYPAD_LCD         // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1512
+//#define ZONESTAR_LCD            // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1415
                                   // This LCD is known to be susceptible to electrical interference
1513
                                   // This LCD is known to be susceptible to electrical interference
1416
                                   // which scrambles the display.  Pressing any button clears it up.
1514
                                   // which scrambles the display.  Pressing any button clears it up.
1515
+                                  // This is a LCD2004 display with 5 analog buttons.
1516
+
1417
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1517
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1418
                                   // A clone of the RepRapDiscount full graphics display but with
1518
                                   // A clone of the RepRapDiscount full graphics display but with
1419
                                   // different pins/wiring (see pins_ANET_10.h).
1519
                                   // different pins/wiring (see pins_ANET_10.h).
1523
 //
1623
 //
1524
 //#define MKS_12864OLED
1624
 //#define MKS_12864OLED
1525
 
1625
 
1626
+// Silvergate GLCD controller
1627
+// http://github.com/android444/Silvergate
1628
+//
1629
+//#define SILVER_GATE_GLCD_CONTROLLER
1630
+
1526
 //=============================================================================
1631
 //=============================================================================
1527
 //=============================== Extra Features ==============================
1632
 //=============================== Extra Features ==============================
1528
 //=============================================================================
1633
 //=============================================================================
1579
  * Adds the M150 command to set the LED (or LED strip) color.
1684
  * Adds the M150 command to set the LED (or LED strip) color.
1580
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1685
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1581
  * luminance values can be set from 0 to 255.
1686
  * luminance values can be set from 0 to 255.
1582
- * For Neopixel LED overall brightness parameters is also available 
1687
+ * For Neopixel LED an overall brightness parameter is also available.
1583
  *
1688
  *
1584
  * *** CAUTION ***
1689
  * *** CAUTION ***
1585
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1690
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1586
  *  as the Arduino cannot handle the current the LEDs will require.
1691
  *  as the Arduino cannot handle the current the LEDs will require.
1587
  *  Failure to follow this precaution can destroy your Arduino!
1692
  *  Failure to follow this precaution can destroy your Arduino!
1588
- *  The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
1589
- *  cannot handle such current, separate 5V power supply must be used
1693
+ *  NOTE: A separate 5V power supply is required! The Neopixel LED needs
1694
+ *  more current than the Arduino 5V linear regulator can produce.
1590
  * *** CAUTION ***
1695
  * *** CAUTION ***
1591
  *
1696
  *
1592
- * LED type. This options are mutualy exclusive. Uncomment only one.
1697
+ * LED Type. Enable only one of the following two options.
1593
  *
1698
  *
1594
  */
1699
  */
1595
 //#define RGB_LED
1700
 //#define RGB_LED
1605
 // Support for Adafruit Neopixel LED driver
1710
 // Support for Adafruit Neopixel LED driver
1606
 //#define NEOPIXEL_LED
1711
 //#define NEOPIXEL_LED
1607
 #if ENABLED(NEOPIXEL_LED)
1712
 #if ENABLED(NEOPIXEL_LED)
1608
-  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
1713
+  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
1609
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1714
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1610
-  #define NEOPIXEL_PIXELS 30       // Number of LEDs on strip
1611
-  #define NEOPIXEL_IS_SEQUENTIAL   // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
1612
-  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness 0-255
1715
+  #define NEOPIXEL_PIXELS 30       // Number of LEDs in the strip
1716
+  #define NEOPIXEL_IS_SEQUENTIAL   // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
1717
+  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness (0-255)
1613
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1718
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1614
 #endif
1719
 #endif
1615
 
1720
 
1624
  *  - Change to green once print has finished
1729
  *  - Change to green once print has finished
1625
  *  - Turn off after the print has finished and the user has pushed a button
1730
  *  - Turn off after the print has finished and the user has pushed a button
1626
  */
1731
  */
1627
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED)
1732
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
1628
   #define PRINTER_EVENT_LEDS
1733
   #define PRINTER_EVENT_LEDS
1629
 #endif
1734
 #endif
1630
 
1735
 
1631
-/*********************************************************************\
1632
-* R/C SERVO support
1633
-* Sponsored by TrinityLabs, Reworked by codexmas
1634
-**********************************************************************/
1736
+/**
1737
+ * R/C SERVO support
1738
+ * Sponsored by TrinityLabs, Reworked by codexmas
1739
+ */
1635
 
1740
 
1636
-// Number of servos
1637
-//
1638
-// If you select a configuration below, this will receive a default value and does not need to be set manually
1639
-// set it manually if you have more servos than extruders and wish to manually control some
1640
-// leaving it undefined or defining as 0 will disable the servo subsystem
1641
-// If unsure, leave commented / disabled
1642
-//
1741
+/**
1742
+ * Number of servos
1743
+ *
1744
+ * For some servo-related options NUM_SERVOS will be set automatically.
1745
+ * Set this manually if there are extra servos needing manual control.
1746
+ * Leave undefined or set to 0 to entirely disable the servo subsystem.
1747
+ */
1643
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1748
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1644
 
1749
 
1645
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1750
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1652
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1757
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1653
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1758
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1654
 
1759
 
1655
-/**
1656
- * Filament Width Sensor
1657
- *
1658
- * Measures the filament width in real-time and adjusts
1659
- * flow rate to compensate for any irregularities.
1660
- *
1661
- * Also allows the measured filament diameter to set the
1662
- * extrusion rate, so the slicer only has to specify the
1663
- * volume.
1664
- *
1665
- * Only a single extruder is supported at this time.
1666
- *
1667
- *  34 RAMPS_14    : Analog input 5 on the AUX2 connector
1668
- *  81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
1669
- * 301 RAMBO       : Analog input 3
1670
- *
1671
- * Note: May require analog pins to be defined for other boards.
1672
- */
1673
-//#define FILAMENT_WIDTH_SENSOR
1674
-
1675
-#define DEFAULT_NOMINAL_FILAMENT_DIA 3.00   // (mm) Diameter of the filament generally used (3.0 or 1.75mm), also used in the slicer. Used to validate sensor reading.
1676
-
1677
-#if ENABLED(FILAMENT_WIDTH_SENSOR)
1678
-  #define FILAMENT_SENSOR_EXTRUDER_NUM 0    // Index of the extruder that has the filament sensor (0,1,2,3)
1679
-  #define MEASUREMENT_DELAY_CM        14    // (cm) The distance from the filament sensor to the melting chamber
1680
-
1681
-  #define MEASURED_UPPER_LIMIT         3.30 // (mm) Upper limit used to validate sensor reading
1682
-  #define MEASURED_LOWER_LIMIT         1.90 // (mm) Lower limit used to validate sensor reading
1683
-  #define MAX_MEASUREMENT_DELAY       20    // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
1684
-
1685
-  #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
1686
-
1687
-  // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
1688
-  //#define FILAMENT_LCD_DISPLAY
1689
-#endif
1690
-
1691
 #endif // CONFIGURATION_H
1760
 #endif // CONFIGURATION_H

+ 268
- 125
Marlin/example_configurations/BQ/Hephestos/Configuration_adv.h Переглянути файл

32
  */
32
  */
33
 #ifndef CONFIGURATION_ADV_H
33
 #ifndef CONFIGURATION_ADV_H
34
 #define CONFIGURATION_ADV_H
34
 #define CONFIGURATION_ADV_H
35
-#define CONFIGURATION_ADV_H_VERSION 010100
35
+#define CONFIGURATION_ADV_H_VERSION 010107
36
 
36
 
37
 // @section temperature
37
 // @section temperature
38
 
38
 
48
 #endif
48
 #endif
49
 
49
 
50
 /**
50
 /**
51
- * Thermal Protection protects your printer from damage and fire if a
52
- * thermistor falls out or temperature sensors fail in any way.
51
+ * Thermal Protection provides additional protection to your printer from damage
52
+ * and fire. Marlin always includes safe min and max temperature ranges which
53
+ * protect against a broken or disconnected thermistor wire.
53
  *
54
  *
54
- * The issue: If a thermistor falls out or a temperature sensor fails,
55
- * Marlin can no longer sense the actual temperature. Since a disconnected
56
- * thermistor reads as a low temperature, the firmware will keep the heater on.
55
+ * The issue: If a thermistor falls out, it will report the much lower
56
+ * temperature of the air in the room, and the the firmware will keep
57
+ * the heater on.
57
  *
58
  *
58
  * The solution: Once the temperature reaches the target, start observing.
59
  * The solution: Once the temperature reaches the target, start observing.
59
- * If the temperature stays too far below the target (hysteresis) for too long (period),
60
- * the firmware will halt the machine as a safety precaution.
60
+ * If the temperature stays too far below the target (hysteresis) for too
61
+ * long (period), the firmware will halt the machine as a safety precaution.
61
  *
62
  *
62
- * If you get false positives for "Thermal Runaway" increase THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
63
+ * If you get false positives for "Thermal Runaway", increase
64
+ * THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
63
  */
65
  */
64
 #if ENABLED(THERMAL_PROTECTION_HOTENDS)
66
 #if ENABLED(THERMAL_PROTECTION_HOTENDS)
65
   #define THERMAL_PROTECTION_PERIOD 40        // Seconds
67
   #define THERMAL_PROTECTION_PERIOD 40        // Seconds
66
   #define THERMAL_PROTECTION_HYSTERESIS 4     // Degrees Celsius
68
   #define THERMAL_PROTECTION_HYSTERESIS 4     // Degrees Celsius
67
 
69
 
68
   /**
70
   /**
69
-   * Whenever an M104 or M109 increases the target temperature the firmware will wait for the
70
-   * WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
71
-   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
72
-   * but only if the current temperature is far enough below the target for a reliable test.
71
+   * Whenever an M104, M109, or M303 increases the target temperature, the
72
+   * firmware will wait for the WATCH_TEMP_PERIOD to expire. If the temperature
73
+   * hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted and
74
+   * requires a hard reset. This test restarts with any M104/M109/M303, but only
75
+   * if the current temperature is far enough below the target for a reliable
76
+   * test.
73
    *
77
    *
74
-   * If you get false positives for "Heating failed" increase WATCH_TEMP_PERIOD and/or decrease WATCH_TEMP_INCREASE
75
-   * WATCH_TEMP_INCREASE should not be below 2.
78
+   * If you get false positives for "Heating failed", increase WATCH_TEMP_PERIOD
79
+   * and/or decrease WATCH_TEMP_INCREASE. WATCH_TEMP_INCREASE should not be set
80
+   * below 2.
76
    */
81
    */
77
   #define WATCH_TEMP_PERIOD 20                // Seconds
82
   #define WATCH_TEMP_PERIOD 20                // Seconds
78
   #define WATCH_TEMP_INCREASE 2               // Degrees Celsius
83
   #define WATCH_TEMP_INCREASE 2               // Degrees Celsius
86
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
91
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
87
 
92
 
88
   /**
93
   /**
89
-   * Whenever an M140 or M190 increases the target temperature the firmware will wait for the
90
-   * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE
91
-   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190,
92
-   * but only if the current temperature is far enough below the target for a reliable test.
93
-   *
94
-   * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease
95
-   * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.)
94
+   * As described above, except for the bed (M140/M190/M303).
96
    */
95
    */
97
   #define WATCH_BED_TEMP_PERIOD 60                // Seconds
96
   #define WATCH_BED_TEMP_PERIOD 60                // Seconds
98
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
97
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
123
   #define AUTOTEMP_OLDWEIGHT 0.98
122
   #define AUTOTEMP_OLDWEIGHT 0.98
124
 #endif
123
 #endif
125
 
124
 
125
+// Show extra position information in M114
126
+//#define M114_DETAIL
127
+
126
 // Show Temperature ADC value
128
 // Show Temperature ADC value
127
 // Enable for M105 to include ADC values read from temperature sensors.
129
 // Enable for M105 to include ADC values read from temperature sensors.
128
 //#define SHOW_TEMP_ADC_VALUES
130
 //#define SHOW_TEMP_ADC_VALUES
257
 
259
 
258
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
260
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
259
 
261
 
260
-// Dual X Steppers
261
-// Uncomment this option to drive two X axis motors.
262
-// The next unused E driver will be assigned to the second X stepper.
262
+/**
263
+ * Dual Steppers / Dual Endstops
264
+ *
265
+ * This section will allow you to use extra E drivers to drive a second motor for X, Y, or Z axes.
266
+ *
267
+ * For example, set X_DUAL_STEPPER_DRIVERS setting to use a second motor. If the motors need to
268
+ * spin in opposite directions set INVERT_X2_VS_X_DIR. If the second motor needs its own endstop
269
+ * set X_DUAL_ENDSTOPS. This can adjust for "racking." Use X2_USE_ENDSTOP to set the endstop plug
270
+ * that should be used for the second endstop. Extra endstops will appear in the output of 'M119'.
271
+ *
272
+ * Use X_DUAL_ENDSTOP_ADJUSTMENT to adjust for mechanical imperfection. After homing both motors
273
+ * this offset is applied to the X2 motor. To find the offset home the X axis, and measure the error
274
+ * in X2. Dual endstop offsets can be set at runtime with 'M666 X<offset> Y<offset> Z<offset>'.
275
+ */
276
+
263
 //#define X_DUAL_STEPPER_DRIVERS
277
 //#define X_DUAL_STEPPER_DRIVERS
264
 #if ENABLED(X_DUAL_STEPPER_DRIVERS)
278
 #if ENABLED(X_DUAL_STEPPER_DRIVERS)
265
-  // Set true if the two X motors need to rotate in opposite directions
266
-  #define INVERT_X2_VS_X_DIR true
279
+  #define INVERT_X2_VS_X_DIR true   // Set 'true' if X motors should rotate in opposite directions
280
+  //#define X_DUAL_ENDSTOPS
281
+  #if ENABLED(X_DUAL_ENDSTOPS)
282
+    #define X2_USE_ENDSTOP _XMAX_
283
+    #define X_DUAL_ENDSTOPS_ADJUSTMENT  0
284
+  #endif
267
 #endif
285
 #endif
268
 
286
 
269
-// Dual Y Steppers
270
-// Uncomment this option to drive two Y axis motors.
271
-// The next unused E driver will be assigned to the second Y stepper.
272
 //#define Y_DUAL_STEPPER_DRIVERS
287
 //#define Y_DUAL_STEPPER_DRIVERS
273
 #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
288
 #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
274
-  // Set true if the two Y motors need to rotate in opposite directions
275
-  #define INVERT_Y2_VS_Y_DIR true
289
+  #define INVERT_Y2_VS_Y_DIR true   // Set 'true' if Y motors should rotate in opposite directions
290
+  //#define Y_DUAL_ENDSTOPS
291
+  #if ENABLED(Y_DUAL_ENDSTOPS)
292
+    #define Y2_USE_ENDSTOP _YMAX_
293
+    #define Y_DUAL_ENDSTOPS_ADJUSTMENT  0
294
+  #endif
276
 #endif
295
 #endif
277
 
296
 
278
-// A single Z stepper driver is usually used to drive 2 stepper motors.
279
-// Uncomment this option to use a separate stepper driver for each Z axis motor.
280
-// The next unused E driver will be assigned to the second Z stepper.
281
 //#define Z_DUAL_STEPPER_DRIVERS
297
 //#define Z_DUAL_STEPPER_DRIVERS
282
-
283
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
298
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
284
-
285
-  // Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper.
286
-  // That way the machine is capable to align the bed during home, since both Z steppers are homed.
287
-  // There is also an implementation of M666 (software endstops adjustment) to this feature.
288
-  // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed.
289
-  // One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2.
290
-  // If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive.
291
-  // Play a little bit with small adjustments (0.5mm) and check the behaviour.
292
-  // The M119 (endstops report) will start reporting the Z2 Endstop as well.
293
-
294
   //#define Z_DUAL_ENDSTOPS
299
   //#define Z_DUAL_ENDSTOPS
295
-
296
   #if ENABLED(Z_DUAL_ENDSTOPS)
300
   #if ENABLED(Z_DUAL_ENDSTOPS)
297
     #define Z2_USE_ENDSTOP _XMAX_
301
     #define Z2_USE_ENDSTOP _XMAX_
298
-    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0  // Use M666 to determine/test this value
302
+    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0
299
   #endif
303
   #endif
300
-
301
-#endif // Z_DUAL_STEPPER_DRIVERS
304
+#endif
302
 
305
 
303
 // Enable this for dual x-carriage printers.
306
 // Enable this for dual x-carriage printers.
304
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
307
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
345
 
348
 
346
 // @section homing
349
 // @section homing
347
 
350
 
348
-//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
351
+// Homing hits each endstop, retracts by these distances, then does a slower bump.
349
 #define X_HOME_BUMP_MM 5
352
 #define X_HOME_BUMP_MM 5
350
 #define Y_HOME_BUMP_MM 5
353
 #define Y_HOME_BUMP_MM 5
351
 #define Z_HOME_BUMP_MM 2
354
 #define Z_HOME_BUMP_MM 2
352
-#define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
353
-//#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
355
+#define HOMING_BUMP_DIVISOR { 2, 2, 4 }  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
356
+//#define QUICK_HOME                     // If homing includes X and Y, do a diagonal move initially
354
 
357
 
355
 // When G28 is called, this option will make Y home before X
358
 // When G28 is called, this option will make Y home before X
356
 //#define HOME_Y_BEFORE_X
359
 //#define HOME_Y_BEFORE_X
434
 //#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 }   // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
437
 //#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 }   // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
435
 //#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 }    // Default drive percent - X, Y, Z, E axis
438
 //#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 }    // Default drive percent - X, Y, Z, E axis
436
 
439
 
437
-// Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
440
+// Use an I2C based DIGIPOT (e.g., Azteeg X3 Pro)
438
 //#define DIGIPOT_I2C
441
 //#define DIGIPOT_I2C
442
+#if ENABLED(DIGIPOT_I2C) && !defined(DIGIPOT_I2C_ADDRESS_A)
443
+  /**
444
+   * Common slave addresses:
445
+   *
446
+   *                    A   (A shifted)   B   (B shifted)  IC
447
+   * Smoothie          0x2C (0x58)       0x2D (0x5A)       MCP4451
448
+   * AZTEEG_X3_PRO     0x2C (0x58)       0x2E (0x5C)       MCP4451
449
+   * MIGHTYBOARD_REVE  0x2F (0x5E)                         MCP4018
450
+   */
451
+  #define DIGIPOT_I2C_ADDRESS_A 0x2C  // unshifted slave address for first DIGIPOT
452
+  #define DIGIPOT_I2C_ADDRESS_B 0x2D  // unshifted slave address for second DIGIPOT
453
+#endif
454
+
439
 //#define DIGIPOT_MCP4018          // Requires library from https://github.com/stawel/SlowSoftI2CMaster
455
 //#define DIGIPOT_MCP4018          // Requires library from https://github.com/stawel/SlowSoftI2CMaster
440
 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4     AZTEEG_X3_PRO: 8
456
 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4     AZTEEG_X3_PRO: 8
441
 // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
457
 // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
466
 // The timeout (in ms) to return to the status screen from sub-menus
482
 // The timeout (in ms) to return to the status screen from sub-menus
467
 //#define LCD_TIMEOUT_TO_STATUS 15000
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
468
 
484
 
485
+/**
486
+ * LED Control Menu
487
+ * Enable this feature to add LED Control to the LCD menu
488
+ */
489
+//#define LED_CONTROL_MENU
490
+#if ENABLED(LED_CONTROL_MENU)
491
+  #define LED_COLOR_PRESETS                 // Enable the Preset Color menu option
492
+  #if ENABLED(LED_COLOR_PRESETS)
493
+    #define LED_USER_PRESET_RED        255  // User defined RED value
494
+    #define LED_USER_PRESET_GREEN      128  // User defined GREEN value
495
+    #define LED_USER_PRESET_BLUE         0  // User defined BLUE value
496
+    #define LED_USER_PRESET_WHITE      255  // User defined WHITE value
497
+    #define LED_USER_PRESET_BRIGHTNESS 255  // User defined intensity
498
+    //#define LED_USER_PRESET_STARTUP       // Have the printer display the user preset color on startup
499
+  #endif
500
+#endif // LED_CONTROL_MENU
501
+
469
 #if ENABLED(SDSUPPORT)
502
 #if ENABLED(SDSUPPORT)
470
 
503
 
471
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
504
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
475
   // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
508
   // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
476
   #define SD_DETECT_INVERTED
509
   #define SD_DETECT_INVERTED
477
 
510
 
478
-  #define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
511
+  #define SD_FINISHED_STEPPERRELEASE true          // Disable steppers when SD Print is finished
479
   #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
512
   #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
480
 
513
 
481
-  #define SDCARD_RATHERRECENTFIRST  //reverse file order of sd card menu display. Its sorted practically after the file system block order.
482
-  // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that.
483
-  // using:
514
+  // Reverse SD sort to show "more recent" files first, according to the card's FAT.
515
+  // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended.
516
+  #define SDCARD_RATHERRECENTFIRST
517
+
518
+  // Add an option in the menu to run all auto#.g files
484
   //#define MENU_ADDAUTOSTART
519
   //#define MENU_ADDAUTOSTART
485
 
520
 
486
   /**
521
   /**
517
     #define SDSORT_USES_STACK  false  // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
552
     #define SDSORT_USES_STACK  false  // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
518
     #define SDSORT_CACHE_NAMES false  // Keep sorted items in RAM longer for speedy performance. Most expensive option.
553
     #define SDSORT_CACHE_NAMES false  // Keep sorted items in RAM longer for speedy performance. Most expensive option.
519
     #define SDSORT_DYNAMIC_RAM false  // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
554
     #define SDSORT_DYNAMIC_RAM false  // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
555
+    #define SDSORT_CACHE_VFATS 2      // Maximum number of 13-byte VFAT entries to use for sorting.
556
+                                      // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM.
520
   #endif
557
   #endif
521
 
558
 
522
   // Show a progress bar on HD44780 LCDs for SD printing
559
   // Show a progress bar on HD44780 LCDs for SD printing
535
     //#define LCD_PROGRESS_BAR_TEST
572
     //#define LCD_PROGRESS_BAR_TEST
536
   #endif
573
   #endif
537
 
574
 
575
+  // Add an 'M73' G-code to set the current percentage
576
+  //#define LCD_SET_PROGRESS_MANUALLY
577
+
538
   // This allows hosts to request long names for files and folders with M33
578
   // This allows hosts to request long names for files and folders with M33
539
   //#define LONG_FILENAME_HOST_SUPPORT
579
   //#define LONG_FILENAME_HOST_SUPPORT
540
 
580
 
541
-  // This option allows you to abort SD printing when any endstop is triggered.
542
-  // This feature must be enabled with "M540 S1" or from the LCD menu.
543
-  // To have any effect, endstops must be enabled during SD printing.
581
+  // Enable this option to scroll long filenames in the SD card menu
582
+  //#define SCROLL_LONG_FILENAMES
583
+
584
+  /**
585
+   * This option allows you to abort SD printing when any endstop is triggered.
586
+   * This feature must be enabled with "M540 S1" or from the LCD menu.
587
+   * To have any effect, endstops must be enabled during SD printing.
588
+   */
544
   //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
589
   //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
545
 
590
 
591
+  /**
592
+   * This option makes it easier to print the same SD Card file again.
593
+   * On print completion the LCD Menu will open with the file selected.
594
+   * You can just click to start the print, or navigate elsewhere.
595
+   */
596
+  //#define SD_REPRINT_LAST_SELECTED_FILE
597
+
546
 #endif // SDSUPPORT
598
 #endif // SDSUPPORT
547
 
599
 
548
 /**
600
 /**
575
   // Enable this option and reduce the value to optimize screen updates.
627
   // Enable this option and reduce the value to optimize screen updates.
576
   // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
628
   // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
577
   //#define DOGM_SPI_DELAY_US 5
629
   //#define DOGM_SPI_DELAY_US 5
630
+
631
+  // Swap the CW/CCW indicators in the graphics overlay
632
+  //#define OVERLAY_GFX_REVERSE
633
+
578
 #endif // DOGLCD
634
 #endif // DOGLCD
579
 
635
 
580
 // @section safety
636
 // @section safety
603
 #if ENABLED(BABYSTEPPING)
659
 #if ENABLED(BABYSTEPPING)
604
   //#define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
660
   //#define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
605
   #define BABYSTEP_INVERT_Z false    // Change if Z babysteps should go the other way
661
   #define BABYSTEP_INVERT_Z false    // Change if Z babysteps should go the other way
606
-  #define BABYSTEP_MULTIPLICATOR 100 // Babysteps are very small. Increase for faster motion.
662
+  #define BABYSTEP_MULTIPLICATOR 1   // Babysteps are very small. Increase for faster motion.
607
   //#define BABYSTEP_ZPROBE_OFFSET   // Enable to combine M851 and Babystepping
663
   //#define BABYSTEP_ZPROBE_OFFSET   // Enable to combine M851 and Babystepping
608
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
664
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
609
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
665
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
610
                                         // Note: Extra time may be added to mitigate controller latency.
666
                                         // Note: Extra time may be added to mitigate controller latency.
611
   //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
667
   //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
612
-  //#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators
613
 #endif
668
 #endif
614
 
669
 
615
 // @section extruder
670
 // @section extruder
656
 
711
 
657
 // @section leveling
712
 // @section leveling
658
 
713
 
659
-// Default mesh area is an area with an inset margin on the print area.
660
-// Below are the macros that are used to define the borders for the mesh area,
661
-// made available here for specialized needs, ie dual extruder setup.
662
-#if ENABLED(MESH_BED_LEVELING)
663
-  #define MESH_MIN_X MESH_INSET
664
-  #define MESH_MAX_X (X_BED_SIZE - (MESH_INSET))
665
-  #define MESH_MIN_Y MESH_INSET
666
-  #define MESH_MAX_Y (Y_BED_SIZE - (MESH_INSET))
667
-#elif ENABLED(AUTO_BED_LEVELING_UBL)
668
-  #define UBL_MESH_MIN_X UBL_MESH_INSET
669
-  #define UBL_MESH_MAX_X (X_BED_SIZE - (UBL_MESH_INSET))
670
-  #define UBL_MESH_MIN_Y UBL_MESH_INSET
671
-  #define UBL_MESH_MAX_Y (Y_BED_SIZE - (UBL_MESH_INSET))
672
-
673
-  // If this is defined, the currently active mesh will be saved in the
674
-  // current slot on M500.
675
-  #define UBL_SAVE_ACTIVE_ON_M500
714
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
715
+  #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
716
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
717
+  #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
718
+#endif
719
+
720
+#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL)
721
+  // Override the mesh area if the automatic (max) area is too large
722
+  //#define MESH_MIN_X MESH_INSET
723
+  //#define MESH_MIN_Y MESH_INSET
724
+  //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET)
725
+  //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
676
 #endif
726
 #endif
677
 
727
 
678
 // @section extras
728
 // @section extras
692
 //#define BEZIER_CURVE_SUPPORT
742
 //#define BEZIER_CURVE_SUPPORT
693
 
743
 
694
 // G38.2 and G38.3 Probe Target
744
 // G38.2 and G38.3 Probe Target
695
-// Enable PROBE_DOUBLE_TOUCH if you want G38 to double touch
745
+// Set MULTIPLE_PROBING if you want G38 to double touch
696
 //#define G38_PROBE_TARGET
746
 //#define G38_PROBE_TARGET
697
 #if ENABLED(G38_PROBE_TARGET)
747
 #if ENABLED(G38_PROBE_TARGET)
698
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
748
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
717
 // @section hidden
767
 // @section hidden
718
 
768
 
719
 // The number of linear motions that can be in the plan at any give time.
769
 // The number of linear motions that can be in the plan at any give time.
720
-// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2, i.g. 8,16,32 because shifts and ors are used to do the ring-buffering.
770
+// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2 (e.g. 8, 16, 32) because shifts and ors are used to do the ring-buffering.
721
 #if ENABLED(SDSUPPORT)
771
 #if ENABLED(SDSUPPORT)
722
   #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
772
   #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
723
 #else
773
 #else
808
 #endif
858
 #endif
809
 
859
 
810
 /**
860
 /**
861
+ * Extra Fan Speed
862
+ * Adds a secondary fan speed for each print-cooling fan.
863
+ *   'M106 P<fan> T3-255' : Set a secondary speed for <fan>
864
+ *   'M106 P<fan> T2'     : Use the set secondary speed
865
+ *   'M106 P<fan> T1'     : Restore the previous fan speed
866
+ */
867
+//#define EXTRA_FAN_SPEED
868
+
869
+/**
811
  * Advanced Pause
870
  * Advanced Pause
812
  * Experimental feature for filament change support and for parking the nozzle when paused.
871
  * Experimental feature for filament change support and for parking the nozzle when paused.
813
  * Adds the GCode M600 for initiating filament change.
872
  * Adds the GCode M600 for initiating filament change.
917
 
976
 
918
 #endif
977
 #endif
919
 
978
 
920
-// @section TMC2130
979
+// @section TMC2130, TMC2208
921
 
980
 
922
 /**
981
 /**
923
  * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
982
  * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
931
  */
990
  */
932
 //#define HAVE_TMC2130
991
 //#define HAVE_TMC2130
933
 
992
 
934
-#if ENABLED(HAVE_TMC2130)
993
+/**
994
+ * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
995
+ * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin.
996
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN
997
+ * to #_SERIAL_TX_PIN with a 1K resistor.
998
+ * The drivers can also be used with hardware serial.
999
+ *
1000
+ * You'll also need the TMC2208Stepper Arduino library
1001
+ * (https://github.com/teemuatlut/TMC2208Stepper).
1002
+ */
1003
+//#define HAVE_TMC2208
1004
+
1005
+#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
935
 
1006
 
936
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
1007
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
937
   //#define X_IS_TMC2130
1008
   //#define X_IS_TMC2130
946
   //#define E3_IS_TMC2130
1017
   //#define E3_IS_TMC2130
947
   //#define E4_IS_TMC2130
1018
   //#define E4_IS_TMC2130
948
 
1019
 
1020
+  //#define X_IS_TMC2208
1021
+  //#define X2_IS_TMC2208
1022
+  //#define Y_IS_TMC2208
1023
+  //#define Y2_IS_TMC2208
1024
+  //#define Z_IS_TMC2208
1025
+  //#define Z2_IS_TMC2208
1026
+  //#define E0_IS_TMC2208
1027
+  //#define E1_IS_TMC2208
1028
+  //#define E2_IS_TMC2208
1029
+  //#define E3_IS_TMC2208
1030
+  //#define E4_IS_TMC2208
1031
+
949
   /**
1032
   /**
950
    * Stepper driver settings
1033
    * Stepper driver settings
951
    */
1034
    */
952
 
1035
 
953
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1036
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
954
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1037
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
955
-  #define INTERPOLATE          1  // Interpolate X/Y/Z_MICROSTEPS to 256
1038
+  #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
956
 
1039
 
957
-  #define X_CURRENT         1000  // rms current in mA. Multiply by 1.41 for peak current.
1040
+  #define X_CURRENT          800  // rms current in mA. Multiply by 1.41 for peak current.
958
   #define X_MICROSTEPS        16  // 0..256
1041
   #define X_MICROSTEPS        16  // 0..256
959
 
1042
 
960
-  #define Y_CURRENT         1000
1043
+  #define Y_CURRENT          800
961
   #define Y_MICROSTEPS        16
1044
   #define Y_MICROSTEPS        16
962
 
1045
 
963
-  #define Z_CURRENT         1000
1046
+  #define Z_CURRENT          800
964
   #define Z_MICROSTEPS        16
1047
   #define Z_MICROSTEPS        16
965
 
1048
 
966
-  //#define X2_CURRENT      1000
967
-  //#define X2_MICROSTEPS     16
1049
+  #define X2_CURRENT         800
1050
+  #define X2_MICROSTEPS       16
968
 
1051
 
969
-  //#define Y2_CURRENT      1000
970
-  //#define Y2_MICROSTEPS     16
1052
+  #define Y2_CURRENT         800
1053
+  #define Y2_MICROSTEPS       16
971
 
1054
 
972
-  //#define Z2_CURRENT      1000
973
-  //#define Z2_MICROSTEPS     16
1055
+  #define Z2_CURRENT         800
1056
+  #define Z2_MICROSTEPS       16
974
 
1057
 
975
-  //#define E0_CURRENT      1000
976
-  //#define E0_MICROSTEPS     16
1058
+  #define E0_CURRENT         800
1059
+  #define E0_MICROSTEPS       16
977
 
1060
 
978
-  //#define E1_CURRENT      1000
979
-  //#define E1_MICROSTEPS     16
1061
+  #define E1_CURRENT         800
1062
+  #define E1_MICROSTEPS       16
980
 
1063
 
981
-  //#define E2_CURRENT      1000
982
-  //#define E2_MICROSTEPS     16
1064
+  #define E2_CURRENT         800
1065
+  #define E2_MICROSTEPS       16
983
 
1066
 
984
-  //#define E3_CURRENT      1000
985
-  //#define E3_MICROSTEPS     16
1067
+  #define E3_CURRENT         800
1068
+  #define E3_MICROSTEPS       16
986
 
1069
 
987
-  //#define E4_CURRENT      1000
988
-  //#define E4_MICROSTEPS     16
1070
+  #define E4_CURRENT         800
1071
+  #define E4_MICROSTEPS       16
989
 
1072
 
990
   /**
1073
   /**
991
    * Use Trinamic's ultra quiet stepping mode.
1074
    * Use Trinamic's ultra quiet stepping mode.
994
   #define STEALTHCHOP
1077
   #define STEALTHCHOP
995
 
1078
 
996
   /**
1079
   /**
997
-   * Let Marlin automatically control stepper current.
998
-   * This is still an experimental feature.
999
-   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
1000
-   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
1001
-   * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX
1080
+   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1081
+   * like overtemperature and short to ground. TMC2208 requires hardware serial.
1082
+   * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1083
+   * Other detected conditions can be used to stop the current print.
1002
    * Relevant g-codes:
1084
    * Relevant g-codes:
1003
    * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
1085
    * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
1004
-   * M906 S1 - Start adjusting current
1005
-   * M906 S0 - Stop adjusting current
1006
    * M911 - Report stepper driver overtemperature pre-warn condition.
1086
    * M911 - Report stepper driver overtemperature pre-warn condition.
1007
    * M912 - Clear stepper driver overtemperature pre-warn condition flag.
1087
    * M912 - Clear stepper driver overtemperature pre-warn condition flag.
1088
+   * M122 S0/1 - Report driver parameters (Requires TMC_DEBUG)
1008
    */
1089
    */
1009
-  //#define AUTOMATIC_CURRENT_CONTROL
1090
+  //#define MONITOR_DRIVER_STATUS
1010
 
1091
 
1011
-  #if ENABLED(AUTOMATIC_CURRENT_CONTROL)
1012
-    #define CURRENT_STEP          50  // [mA]
1013
-    #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
1092
+  #if ENABLED(MONITOR_DRIVER_STATUS)
1093
+    #define CURRENT_STEP_DOWN     50  // [mA]
1014
     #define REPORT_CURRENT_CHANGE
1094
     #define REPORT_CURRENT_CHANGE
1095
+    #define STOP_ON_ERROR
1015
   #endif
1096
   #endif
1016
 
1097
 
1017
   /**
1098
   /**
1026
   #define X2_HYBRID_THRESHOLD    100
1107
   #define X2_HYBRID_THRESHOLD    100
1027
   #define Y_HYBRID_THRESHOLD     100
1108
   #define Y_HYBRID_THRESHOLD     100
1028
   #define Y2_HYBRID_THRESHOLD    100
1109
   #define Y2_HYBRID_THRESHOLD    100
1029
-  #define Z_HYBRID_THRESHOLD       4
1030
-  #define Z2_HYBRID_THRESHOLD      4
1110
+  #define Z_HYBRID_THRESHOLD       3
1111
+  #define Z2_HYBRID_THRESHOLD      3
1031
   #define E0_HYBRID_THRESHOLD     30
1112
   #define E0_HYBRID_THRESHOLD     30
1032
   #define E1_HYBRID_THRESHOLD     30
1113
   #define E1_HYBRID_THRESHOLD     30
1033
   #define E2_HYBRID_THRESHOLD     30
1114
   #define E2_HYBRID_THRESHOLD     30
1037
   /**
1118
   /**
1038
    * Use stallGuard2 to sense an obstacle and trigger an endstop.
1119
    * Use stallGuard2 to sense an obstacle and trigger an endstop.
1039
    * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
1120
    * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
1040
-   * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal.
1121
+   * X and Y homing will always be done in spreadCycle mode.
1041
    *
1122
    *
1042
    * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
1123
    * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
1043
    * Higher values make the system LESS sensitive.
1124
    * Higher values make the system LESS sensitive.
1046
    * It is advised to set X/Y_HOME_BUMP_MM to 0.
1127
    * It is advised to set X/Y_HOME_BUMP_MM to 0.
1047
    * M914 X/Y to live tune the setting
1128
    * M914 X/Y to live tune the setting
1048
    */
1129
    */
1049
-  //#define SENSORLESS_HOMING
1130
+  //#define SENSORLESS_HOMING // TMC2130 only
1050
 
1131
 
1051
   #if ENABLED(SENSORLESS_HOMING)
1132
   #if ENABLED(SENSORLESS_HOMING)
1052
-    #define X_HOMING_SENSITIVITY  19
1053
-    #define Y_HOMING_SENSITIVITY  19
1133
+    #define X_HOMING_SENSITIVITY  8
1134
+    #define Y_HOMING_SENSITIVITY  8
1054
   #endif
1135
   #endif
1055
 
1136
 
1056
   /**
1137
   /**
1138
+   * Enable M122 debugging command for TMC stepper drivers.
1139
+   * M122 S0/1 will enable continous reporting.
1140
+   */
1141
+  //#define TMC_DEBUG
1142
+
1143
+  /**
1057
    * You can set your own advanced settings by filling in predefined functions.
1144
    * You can set your own advanced settings by filling in predefined functions.
1058
    * A list of available functions can be found on the library github page
1145
    * A list of available functions can be found on the library github page
1059
    * https://github.com/teemuatlut/TMC2130Stepper
1146
    * https://github.com/teemuatlut/TMC2130Stepper
1147
+   * https://github.com/teemuatlut/TMC2208Stepper
1060
    *
1148
    *
1061
    * Example:
1149
    * Example:
1062
-   * #define TMC2130_ADV() { \
1150
+   * #define TMC_ADV() { \
1063
    *   stepperX.diag0_temp_prewarn(1); \
1151
    *   stepperX.diag0_temp_prewarn(1); \
1064
-   *   stepperX.interpolate(0); \
1152
+   *   stepperY.interpolate(0); \
1065
    * }
1153
    * }
1066
    */
1154
    */
1067
-  #define  TMC2130_ADV() {  }
1155
+  #define  TMC_ADV() {  }
1068
 
1156
 
1069
-#endif // HAVE_TMC2130
1157
+#endif // TMC2130 || TMC2208
1070
 
1158
 
1071
 // @section L6470
1159
 // @section L6470
1072
 
1160
 
1231
 #endif
1319
 #endif
1232
 
1320
 
1233
 /**
1321
 /**
1322
+ * Filament Width Sensor
1323
+ *
1324
+ * Measures the filament width in real-time and adjusts
1325
+ * flow rate to compensate for any irregularities.
1326
+ *
1327
+ * Also allows the measured filament diameter to set the
1328
+ * extrusion rate, so the slicer only has to specify the
1329
+ * volume.
1330
+ *
1331
+ * Only a single extruder is supported at this time.
1332
+ *
1333
+ *  34 RAMPS_14    : Analog input 5 on the AUX2 connector
1334
+ *  81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
1335
+ * 301 RAMBO       : Analog input 3
1336
+ *
1337
+ * Note: May require analog pins to be defined for other boards.
1338
+ */
1339
+//#define FILAMENT_WIDTH_SENSOR
1340
+
1341
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
1342
+  #define FILAMENT_SENSOR_EXTRUDER_NUM 0    // Index of the extruder that has the filament sensor. :[0,1,2,3,4]
1343
+  #define MEASUREMENT_DELAY_CM        14    // (cm) The distance from the filament sensor to the melting chamber
1344
+
1345
+  #define MEASURED_UPPER_LIMIT         3.30 // (mm) Upper limit used to validate sensor reading
1346
+  #define MEASURED_LOWER_LIMIT         1.90 // (mm) Lower limit used to validate sensor reading
1347
+  #define MAX_MEASUREMENT_DELAY       20    // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
1348
+
1349
+  #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
1350
+
1351
+  // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
1352
+  //#define FILAMENT_LCD_DISPLAY
1353
+#endif
1354
+
1355
+/**
1356
+ * CNC Coordinate Systems
1357
+ *
1358
+ * Enables G53 and G54-G59.3 commands to select coordinate systems
1359
+ * and G92.1 to reset the workspace to native machine space.
1360
+ */
1361
+//#define CNC_COORDINATE_SYSTEMS
1362
+
1363
+/**
1234
  * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
1364
  * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
1235
  */
1365
  */
1236
 //#define PINS_DEBUGGING
1366
 //#define PINS_DEBUGGING
1421
                                          // tweaks made to the configuration are affecting the printer in real-time.
1551
                                          // tweaks made to the configuration are affecting the printer in real-time.
1422
 #endif
1552
 #endif
1423
 
1553
 
1554
+/**
1555
+ * NanoDLP Sync support
1556
+ *
1557
+ * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
1558
+ * string to enable synchronization with DLP projector exposure. This change will allow to use
1559
+ * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
1560
+ */
1561
+//#define NANODLP_Z_SYNC
1562
+#if ENABLED(NANODLP_Z_SYNC)
1563
+  //#define NANODLP_ALL_AXIS  // Enables "Z_move_comp" output on any axis move.
1564
+                              // Default behaviour is limited to Z axis only.
1565
+#endif
1566
+
1424
 #endif // CONFIGURATION_ADV_H
1567
 #endif // CONFIGURATION_ADV_H

+ 159
- 90
Marlin/example_configurations/BQ/Hephestos_2/Configuration.h Переглянути файл

22
 
22
 
23
 #ifndef CONFIGURATION_H
23
 #ifndef CONFIGURATION_H
24
 #define CONFIGURATION_H
24
 #define CONFIGURATION_H
25
-#define CONFIGURATION_H_VERSION 010100
25
+#define CONFIGURATION_H_VERSION 010107
26
 
26
 
27
 //===========================================================================
27
 //===========================================================================
28
 //================================= README ==================================
28
 //================================= README ==================================
135
 // :[1, 2, 3, 4, 5]
135
 // :[1, 2, 3, 4, 5]
136
 #define EXTRUDERS 1
136
 #define EXTRUDERS 1
137
 
137
 
138
+// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
139
+#define DEFAULT_NOMINAL_FILAMENT_DIA 3.0
140
+
138
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
141
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
139
 //#define SINGLENOZZLE
142
 //#define SINGLENOZZLE
140
 
143
 
341
 
344
 
342
 // Comment the following line to disable PID and enable bang-bang.
345
 // Comment the following line to disable PID and enable bang-bang.
343
 #define PIDTEMP
346
 #define PIDTEMP
344
-#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
345
-#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
347
+#define BANG_MAX 255     // Limits current to nozzle while in bang-bang mode; 255=full current
348
+#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
349
+#define PID_K1 0.95      // Smoothing factor within the PID
346
 #if ENABLED(PIDTEMP)
350
 #if ENABLED(PIDTEMP)
347
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
351
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
348
   //#define PID_DEBUG // Sends debug data to the serial port.
352
   //#define PID_DEBUG // Sends debug data to the serial port.
352
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
356
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
353
   #define PID_FUNCTIONAL_RANGE 50 // If the temperature difference between the target temperature and the actual temperature
357
   #define PID_FUNCTIONAL_RANGE 50 // If the temperature difference between the target temperature and the actual temperature
354
                                     // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
358
                                     // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
355
-  #define K1 0.95 //smoothing factor within the PID
356
 
359
 
357
   // Tuned PID values using M303
360
   // Tuned PID values using M303
358
   #define  DEFAULT_Kp 19.18
361
   #define  DEFAULT_Kp 19.18
429
 //===========================================================================
432
 //===========================================================================
430
 
433
 
431
 /**
434
 /**
432
- * Thermal Protection protects your printer from damage and fire if a
433
- * thermistor falls out or temperature sensors fail in any way.
435
+ * Thermal Protection provides additional protection to your printer from damage
436
+ * and fire. Marlin always includes safe min and max temperature ranges which
437
+ * protect against a broken or disconnected thermistor wire.
434
  *
438
  *
435
- * The issue: If a thermistor falls out or a temperature sensor fails,
436
- * Marlin can no longer sense the actual temperature. Since a disconnected
437
- * thermistor reads as a low temperature, the firmware will keep the heater on.
439
+ * The issue: If a thermistor falls out, it will report the much lower
440
+ * temperature of the air in the room, and the the firmware will keep
441
+ * the heater on.
438
  *
442
  *
439
  * If you get "Thermal Runaway" or "Heating failed" errors the
443
  * If you get "Thermal Runaway" or "Heating failed" errors the
440
  * details can be tuned in Configuration_adv.h
444
  * details can be tuned in Configuration_adv.h
574
 // @section probes
578
 // @section probes
575
 
579
 
576
 //
580
 //
577
-// See http://marlinfw.org/configuration/probes.html
581
+// See http://marlinfw.org/docs/configuration/probes.html
578
 //
582
 //
579
 
583
 
580
 /**
584
 /**
687
 // X and Y axis travel speed (mm/m) between probes
691
 // X and Y axis travel speed (mm/m) between probes
688
 #define XY_PROBE_SPEED 8000
692
 #define XY_PROBE_SPEED 8000
689
 
693
 
690
-// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH)
694
+// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
691
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
695
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
692
 
696
 
693
 // Speed for the "accurate" probe of each point
697
 // Speed for the "accurate" probe of each point
694
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
698
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
695
 
699
 
696
-// Use double touch for probing
697
-//#define PROBE_DOUBLE_TOUCH
700
+// The number of probes to perform at each point.
701
+//   Set to 2 for a fast/slow probe, using the second probe result.
702
+//   Set to 3 or more for slow probes, averaging the results.
703
+//#define MULTIPLE_PROBING 2
698
 
704
 
699
 /**
705
 /**
700
  * Z probes require clearance when deploying, stowing, and moving between
706
  * Z probes require clearance when deploying, stowing, and moving between
786
 #define Y_MAX_POS Y_BED_SIZE
792
 #define Y_MAX_POS Y_BED_SIZE
787
 #define Z_MAX_POS 210
793
 #define Z_MAX_POS 210
788
 
794
 
789
-// If enabled, axes won't move below MIN_POS in response to movement commands.
795
+/**
796
+ * Software Endstops
797
+ *
798
+ * - Prevent moves outside the set machine bounds.
799
+ * - Individual axes can be disabled, if desired.
800
+ * - X and Y only apply to Cartesian robots.
801
+ * - Use 'M211' to set software endstops on/off or report current state
802
+ */
803
+
804
+// Min software endstops curtail movement below minimum coordinate bounds
790
 #define MIN_SOFTWARE_ENDSTOPS
805
 #define MIN_SOFTWARE_ENDSTOPS
791
-// If enabled, axes won't move above MAX_POS in response to movement commands.
806
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
807
+  #define MIN_SOFTWARE_ENDSTOP_X
808
+  #define MIN_SOFTWARE_ENDSTOP_Y
809
+  #define MIN_SOFTWARE_ENDSTOP_Z
810
+#endif
811
+
812
+// Max software endstops curtail movement above maximum coordinate bounds
792
 #define MAX_SOFTWARE_ENDSTOPS
813
 #define MAX_SOFTWARE_ENDSTOPS
814
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
815
+  #define MAX_SOFTWARE_ENDSTOP_X
816
+  #define MAX_SOFTWARE_ENDSTOP_Y
817
+  #define MAX_SOFTWARE_ENDSTOP_Z
818
+#endif
793
 
819
 
794
 /**
820
 /**
795
  * Filament Runout Sensor
821
  * Filament Runout Sensor
809
 //===========================================================================
835
 //===========================================================================
810
 //=============================== Bed Leveling ==============================
836
 //=============================== Bed Leveling ==============================
811
 //===========================================================================
837
 //===========================================================================
812
-// @section bedlevel
838
+// @section calibrate
813
 
839
 
814
 /**
840
 /**
815
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
841
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
835
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
861
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
836
  *   A comprehensive bed leveling system combining the features and benefits
862
  *   A comprehensive bed leveling system combining the features and benefits
837
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
863
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
838
- *   Validation and Mesh Editing systems. Currently, UBL is only checked out
839
- *   for Cartesian Printers. That said, it was primarily designed to correct
840
- *   poor quality Delta Printers. If you feel adventurous and have a Delta,
841
- *   please post an issue if something doesn't work correctly. Initially,
842
- *   you will need to set a reduced bed size so you have a rectangular area
843
- *   to test on.
864
+ *   Validation and Mesh Editing systems.
844
  *
865
  *
845
  * - MESH_BED_LEVELING
866
  * - MESH_BED_LEVELING
846
  *   Probe a grid manually
867
  *   Probe a grid manually
867
   // at which point movement will be level to the machine's XY plane.
888
   // at which point movement will be level to the machine's XY plane.
868
   // The height can be set with M420 Z<height>
889
   // The height can be set with M420 Z<height>
869
   #define ENABLE_LEVELING_FADE_HEIGHT
890
   #define ENABLE_LEVELING_FADE_HEIGHT
891
+
892
+  // For Cartesian machines, instead of dividing moves on mesh boundaries,
893
+  // split up moves into short segments like a Delta. This follows the
894
+  // contours of the bed more closely than edge-to-edge straight moves.
895
+  #define SEGMENT_LEVELED_MOVES
896
+  #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)
897
+
898
+  /**
899
+   * Enable the G26 Mesh Validation Pattern tool.
900
+   */
901
+  //#define G26_MESH_VALIDATION   // Enable G26 mesh validation
902
+  #if ENABLED(G26_MESH_VALIDATION)
903
+    #define MESH_TEST_NOZZLE_SIZE     0.4   // (mm) Diameter of primary nozzle.
904
+    #define MESH_TEST_LAYER_HEIGHT    0.2   // (mm) Default layer height for the G26 Mesh Validation Tool.
905
+    #define MESH_TEST_HOTEND_TEMP   205.0   // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
906
+    #define MESH_TEST_BED_TEMP       60.0   // (°C) Default bed temperature for the G26 Mesh Validation Tool.
907
+  #endif
908
+
870
 #endif
909
 #endif
871
 
910
 
872
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
911
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
922
   //========================= Unified Bed Leveling ============================
961
   //========================= Unified Bed Leveling ============================
923
   //===========================================================================
962
   //===========================================================================
924
 
963
 
925
-  #define UBL_MESH_INSET 1          // Mesh inset margin on print area
964
+  //#define MESH_EDIT_GFX_OVERLAY   // Display a graphics overlay while editing the mesh
965
+
966
+  #define MESH_INSET 1              // Mesh inset margin on print area
926
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
967
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
927
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
968
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
928
 
969
 
933
   #define UBL_PROBE_PT_3_X 180
974
   #define UBL_PROBE_PT_3_X 180
934
   #define UBL_PROBE_PT_3_Y 20
975
   #define UBL_PROBE_PT_3_Y 20
935
 
976
 
936
-  #define UBL_G26_MESH_VALIDATION   // Enable G26 mesh validation
937
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
977
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
978
+  #define UBL_SAVE_ACTIVE_ON_M500   // Save the currently active mesh in the current slot on M500
938
 
979
 
939
 #elif ENABLED(MESH_BED_LEVELING)
980
 #elif ENABLED(MESH_BED_LEVELING)
940
 
981
 
994
 #define Z_SAFE_HOMING
1035
 #define Z_SAFE_HOMING
995
 
1036
 
996
 #if ENABLED(Z_SAFE_HOMING)
1037
 #if ENABLED(Z_SAFE_HOMING)
997
-  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axis (G28).
998
-  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axis (G28).
1038
+  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axes (G28).
1039
+  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axes (G28).
999
 #endif
1040
 #endif
1000
 
1041
 
1001
 // Homing speeds (mm/m)
1042
 // Homing speeds (mm/m)
1002
 #define HOMING_FEEDRATE_XY (60*60)
1043
 #define HOMING_FEEDRATE_XY (60*60)
1003
 #define HOMING_FEEDRATE_Z  120
1044
 #define HOMING_FEEDRATE_Z  120
1004
 
1045
 
1046
+// @section calibrate
1047
+
1048
+/**
1049
+ * Bed Skew Compensation
1050
+ *
1051
+ * This feature corrects for misalignment in the XYZ axes.
1052
+ *
1053
+ * Take the following steps to get the bed skew in the XY plane:
1054
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1055
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1056
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1057
+ *  4. For XY_SIDE_AD measure the edge A to D
1058
+ *
1059
+ * Marlin automatically computes skew factors from these measurements.
1060
+ * Skew factors may also be computed and set manually:
1061
+ *
1062
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1063
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1064
+ *
1065
+ * If desired, follow the same procedure for XZ and YZ.
1066
+ * Use these diagrams for reference:
1067
+ *
1068
+ *    Y                     Z                     Z
1069
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1070
+ *    |    /       /        |    /       /        |    /       /
1071
+ *    |   /       /         |   /       /         |   /       /
1072
+ *    |  A-------D          |  A-------D          |  A-------D
1073
+ *    +-------------->X     +-------------->X     +-------------->Y
1074
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1075
+ */
1076
+//#define SKEW_CORRECTION
1077
+
1078
+#if ENABLED(SKEW_CORRECTION)
1079
+  // Input all length measurements here:
1080
+  #define XY_DIAG_AC 282.8427124746
1081
+  #define XY_DIAG_BD 282.8427124746
1082
+  #define XY_SIDE_AD 200
1083
+
1084
+  // Or, set the default skew factors directly here
1085
+  // to override the above measurements:
1086
+  #define XY_SKEW_FACTOR 0.0
1087
+
1088
+  //#define SKEW_CORRECTION_FOR_Z
1089
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1090
+    #define XZ_DIAG_AC 282.8427124746
1091
+    #define XZ_DIAG_BD 282.8427124746
1092
+    #define YZ_DIAG_AC 282.8427124746
1093
+    #define YZ_DIAG_BD 282.8427124746
1094
+    #define YZ_SIDE_AD 200
1095
+    #define XZ_SKEW_FACTOR 0.0
1096
+    #define YZ_SKEW_FACTOR 0.0
1097
+  #endif
1098
+
1099
+  // Enable this option for M852 to set skew at runtime
1100
+  //#define SKEW_CORRECTION_GCODE
1101
+#endif
1102
+
1005
 //=============================================================================
1103
 //=============================================================================
1006
 //============================= Additional Features ===========================
1104
 //============================= Additional Features ===========================
1007
 //=============================================================================
1105
 //=============================================================================
1033
 //
1131
 //
1034
 // M100 Free Memory Watcher
1132
 // M100 Free Memory Watcher
1035
 //
1133
 //
1036
-//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
1134
+//#define M100_FREE_MEMORY_WATCHER    // Add M100 (Free Memory Watcher) to debug memory usage
1037
 
1135
 
1038
 //
1136
 //
1039
 // G20/G21 Inch mode support
1137
 // G20/G21 Inch mode support
1178
  *
1276
  *
1179
  * Select the language to display on the LCD. These languages are available:
1277
  * Select the language to display on the LCD. These languages are available:
1180
  *
1278
  *
1181
- *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, gl, hr,
1182
- *    it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1279
+ *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, fr_utf8, gl,
1280
+ *    hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1183
  *    tr, uk, zh_CN, zh_TW, test
1281
  *    tr, uk, zh_CN, zh_TW, test
1184
  *
1282
  *
1185
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1283
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1186
  */
1284
  */
1187
 #define LCD_LANGUAGE en
1285
 #define LCD_LANGUAGE en
1188
 
1286
 
1310
 // Note: Test audio output with the G-Code:
1408
 // Note: Test audio output with the G-Code:
1311
 //  M300 S<frequency Hz> P<duration ms>
1409
 //  M300 S<frequency Hz> P<duration ms>
1312
 //
1410
 //
1313
-//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
1314
-//#define LCD_FEEDBACK_FREQUENCY_HZ 1000
1411
+//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
1412
+//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
1315
 
1413
 
1316
 //
1414
 //
1317
 // CONTROLLER TYPE: Standard
1415
 // CONTROLLER TYPE: Standard
1419
 //#define CARTESIO_UI
1517
 //#define CARTESIO_UI
1420
 
1518
 
1421
 //
1519
 //
1422
-// ANET_10 Controller supported displays.
1520
+// ANET and Tronxy Controller supported displays.
1423
 //
1521
 //
1424
-//#define ANET_KEYPAD_LCD         // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1522
+//#define ZONESTAR_LCD            // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1425
                                   // This LCD is known to be susceptible to electrical interference
1523
                                   // This LCD is known to be susceptible to electrical interference
1426
                                   // which scrambles the display.  Pressing any button clears it up.
1524
                                   // which scrambles the display.  Pressing any button clears it up.
1525
+                                  // This is a LCD2004 display with 5 analog buttons.
1526
+
1427
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1527
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1428
                                   // A clone of the RepRapDiscount full graphics display but with
1528
                                   // A clone of the RepRapDiscount full graphics display but with
1429
                                   // different pins/wiring (see pins_ANET_10.h).
1529
                                   // different pins/wiring (see pins_ANET_10.h).
1533
 //
1633
 //
1534
 //#define MKS_12864OLED
1634
 //#define MKS_12864OLED
1535
 
1635
 
1636
+// Silvergate GLCD controller
1637
+// http://github.com/android444/Silvergate
1638
+//
1639
+//#define SILVER_GATE_GLCD_CONTROLLER
1640
+
1536
 //=============================================================================
1641
 //=============================================================================
1537
 //=============================== Extra Features ==============================
1642
 //=============================== Extra Features ==============================
1538
 //=============================================================================
1643
 //=============================================================================
1589
  * Adds the M150 command to set the LED (or LED strip) color.
1694
  * Adds the M150 command to set the LED (or LED strip) color.
1590
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1695
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1591
  * luminance values can be set from 0 to 255.
1696
  * luminance values can be set from 0 to 255.
1592
- * For Neopixel LED overall brightness parameters is also available 
1697
+ * For Neopixel LED an overall brightness parameter is also available.
1593
  *
1698
  *
1594
  * *** CAUTION ***
1699
  * *** CAUTION ***
1595
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1700
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1596
  *  as the Arduino cannot handle the current the LEDs will require.
1701
  *  as the Arduino cannot handle the current the LEDs will require.
1597
  *  Failure to follow this precaution can destroy your Arduino!
1702
  *  Failure to follow this precaution can destroy your Arduino!
1598
- *  The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
1599
- *  cannot handle such current, separate 5V power supply must be used
1703
+ *  NOTE: A separate 5V power supply is required! The Neopixel LED needs
1704
+ *  more current than the Arduino 5V linear regulator can produce.
1600
  * *** CAUTION ***
1705
  * *** CAUTION ***
1601
  *
1706
  *
1602
- * LED type. This options are mutualy exclusive. Uncomment only one.
1707
+ * LED Type. Enable only one of the following two options.
1603
  *
1708
  *
1604
  */
1709
  */
1605
 //#define RGB_LED
1710
 //#define RGB_LED
1615
 // Support for Adafruit Neopixel LED driver
1720
 // Support for Adafruit Neopixel LED driver
1616
 //#define NEOPIXEL_LED
1721
 //#define NEOPIXEL_LED
1617
 #if ENABLED(NEOPIXEL_LED)
1722
 #if ENABLED(NEOPIXEL_LED)
1618
-  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
1723
+  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
1619
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1724
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1620
-  #define NEOPIXEL_PIXELS 30       // Number of LEDs on strip
1621
-  #define NEOPIXEL_IS_SEQUENTIAL   // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
1622
-  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness 0-255
1725
+  #define NEOPIXEL_PIXELS 30       // Number of LEDs in the strip
1726
+  #define NEOPIXEL_IS_SEQUENTIAL   // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
1727
+  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness (0-255)
1623
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1728
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1624
 #endif
1729
 #endif
1625
 
1730
 
1634
  *  - Change to green once print has finished
1739
  *  - Change to green once print has finished
1635
  *  - Turn off after the print has finished and the user has pushed a button
1740
  *  - Turn off after the print has finished and the user has pushed a button
1636
  */
1741
  */
1637
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED)
1742
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
1638
   #define PRINTER_EVENT_LEDS
1743
   #define PRINTER_EVENT_LEDS
1639
 #endif
1744
 #endif
1640
 
1745
 
1641
-/*********************************************************************\
1642
-* R/C SERVO support
1643
-* Sponsored by TrinityLabs, Reworked by codexmas
1644
-**********************************************************************/
1746
+/**
1747
+ * R/C SERVO support
1748
+ * Sponsored by TrinityLabs, Reworked by codexmas
1749
+ */
1645
 
1750
 
1646
-// Number of servos
1647
-//
1648
-// If you select a configuration below, this will receive a default value and does not need to be set manually
1649
-// set it manually if you have more servos than extruders and wish to manually control some
1650
-// leaving it undefined or defining as 0 will disable the servo subsystem
1651
-// If unsure, leave commented / disabled
1652
-//
1751
+/**
1752
+ * Number of servos
1753
+ *
1754
+ * For some servo-related options NUM_SERVOS will be set automatically.
1755
+ * Set this manually if there are extra servos needing manual control.
1756
+ * Leave undefined or set to 0 to entirely disable the servo subsystem.
1757
+ */
1653
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1758
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1654
 
1759
 
1655
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1760
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1662
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1767
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1663
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1768
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1664
 
1769
 
1665
-/**
1666
- * Filament Width Sensor
1667
- *
1668
- * Measures the filament width in real-time and adjusts
1669
- * flow rate to compensate for any irregularities.
1670
- *
1671
- * Also allows the measured filament diameter to set the
1672
- * extrusion rate, so the slicer only has to specify the
1673
- * volume.
1674
- *
1675
- * Only a single extruder is supported at this time.
1676
- *
1677
- *  34 RAMPS_14    : Analog input 5 on the AUX2 connector
1678
- *  81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
1679
- * 301 RAMBO       : Analog input 3
1680
- *
1681
- * Note: May require analog pins to be defined for other boards.
1682
- */
1683
-//#define FILAMENT_WIDTH_SENSOR
1684
-
1685
-#define DEFAULT_NOMINAL_FILAMENT_DIA 3.00   // (mm) Diameter of the filament generally used (3.0 or 1.75mm), also used in the slicer. Used to validate sensor reading.
1686
-
1687
-#if ENABLED(FILAMENT_WIDTH_SENSOR)
1688
-  #define FILAMENT_SENSOR_EXTRUDER_NUM 0    // Index of the extruder that has the filament sensor (0,1,2,3)
1689
-  #define MEASUREMENT_DELAY_CM        14    // (cm) The distance from the filament sensor to the melting chamber
1690
-
1691
-  #define MEASURED_UPPER_LIMIT         2.00 // (mm) Upper limit used to validate sensor reading
1692
-  #define MEASURED_LOWER_LIMIT         1.60 // (mm) Lower limit used to validate sensor reading
1693
-  #define MAX_MEASUREMENT_DELAY       20    // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
1694
-
1695
-  #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
1696
-
1697
-  // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
1698
-  //#define FILAMENT_LCD_DISPLAY
1699
-#endif
1700
-
1701
 #endif // CONFIGURATION_H
1770
 #endif // CONFIGURATION_H

+ 268
- 125
Marlin/example_configurations/BQ/Hephestos_2/Configuration_adv.h Переглянути файл

32
  */
32
  */
33
 #ifndef CONFIGURATION_ADV_H
33
 #ifndef CONFIGURATION_ADV_H
34
 #define CONFIGURATION_ADV_H
34
 #define CONFIGURATION_ADV_H
35
-#define CONFIGURATION_ADV_H_VERSION 010100
35
+#define CONFIGURATION_ADV_H_VERSION 010107
36
 
36
 
37
 // @section temperature
37
 // @section temperature
38
 
38
 
48
 #endif
48
 #endif
49
 
49
 
50
 /**
50
 /**
51
- * Thermal Protection protects your printer from damage and fire if a
52
- * thermistor falls out or temperature sensors fail in any way.
51
+ * Thermal Protection provides additional protection to your printer from damage
52
+ * and fire. Marlin always includes safe min and max temperature ranges which
53
+ * protect against a broken or disconnected thermistor wire.
53
  *
54
  *
54
- * The issue: If a thermistor falls out or a temperature sensor fails,
55
- * Marlin can no longer sense the actual temperature. Since a disconnected
56
- * thermistor reads as a low temperature, the firmware will keep the heater on.
55
+ * The issue: If a thermistor falls out, it will report the much lower
56
+ * temperature of the air in the room, and the the firmware will keep
57
+ * the heater on.
57
  *
58
  *
58
  * The solution: Once the temperature reaches the target, start observing.
59
  * The solution: Once the temperature reaches the target, start observing.
59
- * If the temperature stays too far below the target (hysteresis) for too long (period),
60
- * the firmware will halt the machine as a safety precaution.
60
+ * If the temperature stays too far below the target (hysteresis) for too
61
+ * long (period), the firmware will halt the machine as a safety precaution.
61
  *
62
  *
62
- * If you get false positives for "Thermal Runaway" increase THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
63
+ * If you get false positives for "Thermal Runaway", increase
64
+ * THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
63
  */
65
  */
64
 #if ENABLED(THERMAL_PROTECTION_HOTENDS)
66
 #if ENABLED(THERMAL_PROTECTION_HOTENDS)
65
   #define THERMAL_PROTECTION_PERIOD 40        // Seconds
67
   #define THERMAL_PROTECTION_PERIOD 40        // Seconds
66
   #define THERMAL_PROTECTION_HYSTERESIS 4     // Degrees Celsius
68
   #define THERMAL_PROTECTION_HYSTERESIS 4     // Degrees Celsius
67
 
69
 
68
   /**
70
   /**
69
-   * Whenever an M104 or M109 increases the target temperature the firmware will wait for the
70
-   * WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
71
-   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
72
-   * but only if the current temperature is far enough below the target for a reliable test.
71
+   * Whenever an M104, M109, or M303 increases the target temperature, the
72
+   * firmware will wait for the WATCH_TEMP_PERIOD to expire. If the temperature
73
+   * hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted and
74
+   * requires a hard reset. This test restarts with any M104/M109/M303, but only
75
+   * if the current temperature is far enough below the target for a reliable
76
+   * test.
73
    *
77
    *
74
-   * If you get false positives for "Heating failed" increase WATCH_TEMP_PERIOD and/or decrease WATCH_TEMP_INCREASE
75
-   * WATCH_TEMP_INCREASE should not be below 2.
78
+   * If you get false positives for "Heating failed", increase WATCH_TEMP_PERIOD
79
+   * and/or decrease WATCH_TEMP_INCREASE. WATCH_TEMP_INCREASE should not be set
80
+   * below 2.
76
    */
81
    */
77
   #define WATCH_TEMP_PERIOD 20                // Seconds
82
   #define WATCH_TEMP_PERIOD 20                // Seconds
78
   #define WATCH_TEMP_INCREASE 2               // Degrees Celsius
83
   #define WATCH_TEMP_INCREASE 2               // Degrees Celsius
86
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
91
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
87
 
92
 
88
   /**
93
   /**
89
-   * Whenever an M140 or M190 increases the target temperature the firmware will wait for the
90
-   * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE
91
-   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190,
92
-   * but only if the current temperature is far enough below the target for a reliable test.
93
-   *
94
-   * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease
95
-   * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.)
94
+   * As described above, except for the bed (M140/M190/M303).
96
    */
95
    */
97
   #define WATCH_BED_TEMP_PERIOD 60                // Seconds
96
   #define WATCH_BED_TEMP_PERIOD 60                // Seconds
98
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
97
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
123
   #define AUTOTEMP_OLDWEIGHT 0.98
122
   #define AUTOTEMP_OLDWEIGHT 0.98
124
 #endif
123
 #endif
125
 
124
 
125
+// Show extra position information in M114
126
+//#define M114_DETAIL
127
+
126
 // Show Temperature ADC value
128
 // Show Temperature ADC value
127
 // Enable for M105 to include ADC values read from temperature sensors.
129
 // Enable for M105 to include ADC values read from temperature sensors.
128
 //#define SHOW_TEMP_ADC_VALUES
130
 //#define SHOW_TEMP_ADC_VALUES
257
 
259
 
258
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
260
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
259
 
261
 
260
-// Dual X Steppers
261
-// Uncomment this option to drive two X axis motors.
262
-// The next unused E driver will be assigned to the second X stepper.
262
+/**
263
+ * Dual Steppers / Dual Endstops
264
+ *
265
+ * This section will allow you to use extra E drivers to drive a second motor for X, Y, or Z axes.
266
+ *
267
+ * For example, set X_DUAL_STEPPER_DRIVERS setting to use a second motor. If the motors need to
268
+ * spin in opposite directions set INVERT_X2_VS_X_DIR. If the second motor needs its own endstop
269
+ * set X_DUAL_ENDSTOPS. This can adjust for "racking." Use X2_USE_ENDSTOP to set the endstop plug
270
+ * that should be used for the second endstop. Extra endstops will appear in the output of 'M119'.
271
+ *
272
+ * Use X_DUAL_ENDSTOP_ADJUSTMENT to adjust for mechanical imperfection. After homing both motors
273
+ * this offset is applied to the X2 motor. To find the offset home the X axis, and measure the error
274
+ * in X2. Dual endstop offsets can be set at runtime with 'M666 X<offset> Y<offset> Z<offset>'.
275
+ */
276
+
263
 //#define X_DUAL_STEPPER_DRIVERS
277
 //#define X_DUAL_STEPPER_DRIVERS
264
 #if ENABLED(X_DUAL_STEPPER_DRIVERS)
278
 #if ENABLED(X_DUAL_STEPPER_DRIVERS)
265
-  // Set true if the two X motors need to rotate in opposite directions
266
-  #define INVERT_X2_VS_X_DIR true
279
+  #define INVERT_X2_VS_X_DIR true   // Set 'true' if X motors should rotate in opposite directions
280
+  //#define X_DUAL_ENDSTOPS
281
+  #if ENABLED(X_DUAL_ENDSTOPS)
282
+    #define X2_USE_ENDSTOP _XMAX_
283
+    #define X_DUAL_ENDSTOPS_ADJUSTMENT  0
284
+  #endif
267
 #endif
285
 #endif
268
 
286
 
269
-// Dual Y Steppers
270
-// Uncomment this option to drive two Y axis motors.
271
-// The next unused E driver will be assigned to the second Y stepper.
272
 //#define Y_DUAL_STEPPER_DRIVERS
287
 //#define Y_DUAL_STEPPER_DRIVERS
273
 #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
288
 #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
274
-  // Set true if the two Y motors need to rotate in opposite directions
275
-  #define INVERT_Y2_VS_Y_DIR true
289
+  #define INVERT_Y2_VS_Y_DIR true   // Set 'true' if Y motors should rotate in opposite directions
290
+  //#define Y_DUAL_ENDSTOPS
291
+  #if ENABLED(Y_DUAL_ENDSTOPS)
292
+    #define Y2_USE_ENDSTOP _YMAX_
293
+    #define Y_DUAL_ENDSTOPS_ADJUSTMENT  0
294
+  #endif
276
 #endif
295
 #endif
277
 
296
 
278
-// A single Z stepper driver is usually used to drive 2 stepper motors.
279
-// Uncomment this option to use a separate stepper driver for each Z axis motor.
280
-// The next unused E driver will be assigned to the second Z stepper.
281
 //#define Z_DUAL_STEPPER_DRIVERS
297
 //#define Z_DUAL_STEPPER_DRIVERS
282
-
283
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
298
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
284
-
285
-  // Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper.
286
-  // That way the machine is capable to align the bed during home, since both Z steppers are homed.
287
-  // There is also an implementation of M666 (software endstops adjustment) to this feature.
288
-  // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed.
289
-  // One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2.
290
-  // If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive.
291
-  // Play a little bit with small adjustments (0.5mm) and check the behaviour.
292
-  // The M119 (endstops report) will start reporting the Z2 Endstop as well.
293
-
294
   //#define Z_DUAL_ENDSTOPS
299
   //#define Z_DUAL_ENDSTOPS
295
-
296
   #if ENABLED(Z_DUAL_ENDSTOPS)
300
   #if ENABLED(Z_DUAL_ENDSTOPS)
297
     #define Z2_USE_ENDSTOP _XMAX_
301
     #define Z2_USE_ENDSTOP _XMAX_
298
-    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0  // Use M666 to determine/test this value
302
+    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0
299
   #endif
303
   #endif
300
-
301
-#endif // Z_DUAL_STEPPER_DRIVERS
304
+#endif
302
 
305
 
303
 // Enable this for dual x-carriage printers.
306
 // Enable this for dual x-carriage printers.
304
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
307
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
345
 
348
 
346
 // @section homing
349
 // @section homing
347
 
350
 
348
-//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
351
+// Homing hits each endstop, retracts by these distances, then does a slower bump.
349
 #define X_HOME_BUMP_MM 5
352
 #define X_HOME_BUMP_MM 5
350
 #define Y_HOME_BUMP_MM 5
353
 #define Y_HOME_BUMP_MM 5
351
 #define Z_HOME_BUMP_MM 2
354
 #define Z_HOME_BUMP_MM 2
352
-#define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
353
-#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
355
+#define HOMING_BUMP_DIVISOR { 2, 2, 4 }  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
356
+#define QUICK_HOME                       // If homing includes X and Y, do a diagonal move initially
354
 
357
 
355
 // When G28 is called, this option will make Y home before X
358
 // When G28 is called, this option will make Y home before X
356
 #define HOME_Y_BEFORE_X
359
 #define HOME_Y_BEFORE_X
434
 #define DIGIPOT_MOTOR_CURRENT { 150, 170, 180, 190, 180 }   // Values 0-255 (bq ZUM Mega 3D (default): X = 150 [~1.17A]; Y = 170 [~1.33A]; Z = 180 [~1.41A]; E0 = 190 [~1.49A])
437
 #define DIGIPOT_MOTOR_CURRENT { 150, 170, 180, 190, 180 }   // Values 0-255 (bq ZUM Mega 3D (default): X = 150 [~1.17A]; Y = 170 [~1.33A]; Z = 180 [~1.41A]; E0 = 190 [~1.49A])
435
 //#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 }      // Default drive percent - X, Y, Z, E axis
438
 //#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 }      // Default drive percent - X, Y, Z, E axis
436
 
439
 
437
-// Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
440
+// Use an I2C based DIGIPOT (e.g., Azteeg X3 Pro)
438
 //#define DIGIPOT_I2C
441
 //#define DIGIPOT_I2C
442
+#if ENABLED(DIGIPOT_I2C) && !defined(DIGIPOT_I2C_ADDRESS_A)
443
+  /**
444
+   * Common slave addresses:
445
+   *
446
+   *                    A   (A shifted)   B   (B shifted)  IC
447
+   * Smoothie          0x2C (0x58)       0x2D (0x5A)       MCP4451
448
+   * AZTEEG_X3_PRO     0x2C (0x58)       0x2E (0x5C)       MCP4451
449
+   * MIGHTYBOARD_REVE  0x2F (0x5E)                         MCP4018
450
+   */
451
+  #define DIGIPOT_I2C_ADDRESS_A 0x2C  // unshifted slave address for first DIGIPOT
452
+  #define DIGIPOT_I2C_ADDRESS_B 0x2D  // unshifted slave address for second DIGIPOT
453
+#endif
454
+
439
 //#define DIGIPOT_MCP4018          // Requires library from https://github.com/stawel/SlowSoftI2CMaster
455
 //#define DIGIPOT_MCP4018          // Requires library from https://github.com/stawel/SlowSoftI2CMaster
440
 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4     AZTEEG_X3_PRO: 8
456
 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4     AZTEEG_X3_PRO: 8
441
 // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
457
 // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
466
 // The timeout (in ms) to return to the status screen from sub-menus
482
 // The timeout (in ms) to return to the status screen from sub-menus
467
 //#define LCD_TIMEOUT_TO_STATUS 15000
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
468
 
484
 
485
+/**
486
+ * LED Control Menu
487
+ * Enable this feature to add LED Control to the LCD menu
488
+ */
489
+//#define LED_CONTROL_MENU
490
+#if ENABLED(LED_CONTROL_MENU)
491
+  #define LED_COLOR_PRESETS                 // Enable the Preset Color menu option
492
+  #if ENABLED(LED_COLOR_PRESETS)
493
+    #define LED_USER_PRESET_RED        255  // User defined RED value
494
+    #define LED_USER_PRESET_GREEN      128  // User defined GREEN value
495
+    #define LED_USER_PRESET_BLUE         0  // User defined BLUE value
496
+    #define LED_USER_PRESET_WHITE      255  // User defined WHITE value
497
+    #define LED_USER_PRESET_BRIGHTNESS 255  // User defined intensity
498
+    //#define LED_USER_PRESET_STARTUP       // Have the printer display the user preset color on startup
499
+  #endif
500
+#endif // LED_CONTROL_MENU
501
+
469
 #if ENABLED(SDSUPPORT)
502
 #if ENABLED(SDSUPPORT)
470
 
503
 
471
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
504
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
475
   // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
508
   // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
476
   #define SD_DETECT_INVERTED
509
   #define SD_DETECT_INVERTED
477
 
510
 
478
-  #define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
511
+  #define SD_FINISHED_STEPPERRELEASE true          // Disable steppers when SD Print is finished
479
   #define SD_FINISHED_RELEASECOMMAND "M104 S0\nM84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
512
   #define SD_FINISHED_RELEASECOMMAND "M104 S0\nM84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
480
 
513
 
481
-  #define SDCARD_RATHERRECENTFIRST  //reverse file order of sd card menu display. Its sorted practically after the file system block order.
482
-  // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that.
483
-  // using:
514
+  // Reverse SD sort to show "more recent" files first, according to the card's FAT.
515
+  // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended.
516
+  #define SDCARD_RATHERRECENTFIRST
517
+
518
+  // Add an option in the menu to run all auto#.g files
484
   //#define MENU_ADDAUTOSTART
519
   //#define MENU_ADDAUTOSTART
485
 
520
 
486
   /**
521
   /**
517
     #define SDSORT_USES_STACK  false  // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
552
     #define SDSORT_USES_STACK  false  // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
518
     #define SDSORT_CACHE_NAMES false  // Keep sorted items in RAM longer for speedy performance. Most expensive option.
553
     #define SDSORT_CACHE_NAMES false  // Keep sorted items in RAM longer for speedy performance. Most expensive option.
519
     #define SDSORT_DYNAMIC_RAM false  // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
554
     #define SDSORT_DYNAMIC_RAM false  // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
555
+    #define SDSORT_CACHE_VFATS 2      // Maximum number of 13-byte VFAT entries to use for sorting.
556
+                                      // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM.
520
   #endif
557
   #endif
521
 
558
 
522
   // Show a progress bar on HD44780 LCDs for SD printing
559
   // Show a progress bar on HD44780 LCDs for SD printing
535
     //#define LCD_PROGRESS_BAR_TEST
572
     //#define LCD_PROGRESS_BAR_TEST
536
   #endif
573
   #endif
537
 
574
 
575
+  // Add an 'M73' G-code to set the current percentage
576
+  //#define LCD_SET_PROGRESS_MANUALLY
577
+
538
   // This allows hosts to request long names for files and folders with M33
578
   // This allows hosts to request long names for files and folders with M33
539
   #define LONG_FILENAME_HOST_SUPPORT
579
   #define LONG_FILENAME_HOST_SUPPORT
540
 
580
 
541
-  // This option allows you to abort SD printing when any endstop is triggered.
542
-  // This feature must be enabled with "M540 S1" or from the LCD menu.
543
-  // To have any effect, endstops must be enabled during SD printing.
581
+  // Enable this option to scroll long filenames in the SD card menu
582
+  //#define SCROLL_LONG_FILENAMES
583
+
584
+  /**
585
+   * This option allows you to abort SD printing when any endstop is triggered.
586
+   * This feature must be enabled with "M540 S1" or from the LCD menu.
587
+   * To have any effect, endstops must be enabled during SD printing.
588
+   */
544
   //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
589
   //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
545
 
590
 
591
+  /**
592
+   * This option makes it easier to print the same SD Card file again.
593
+   * On print completion the LCD Menu will open with the file selected.
594
+   * You can just click to start the print, or navigate elsewhere.
595
+   */
596
+  //#define SD_REPRINT_LAST_SELECTED_FILE
597
+
546
 #endif // SDSUPPORT
598
 #endif // SDSUPPORT
547
 
599
 
548
 /**
600
 /**
575
   // Enable this option and reduce the value to optimize screen updates.
627
   // Enable this option and reduce the value to optimize screen updates.
576
   // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
628
   // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
577
   //#define DOGM_SPI_DELAY_US 5
629
   //#define DOGM_SPI_DELAY_US 5
630
+
631
+  // Swap the CW/CCW indicators in the graphics overlay
632
+  //#define OVERLAY_GFX_REVERSE
633
+
578
 #endif // DOGLCD
634
 #endif // DOGLCD
579
 
635
 
580
 // @section safety
636
 // @section safety
603
 #if ENABLED(BABYSTEPPING)
659
 #if ENABLED(BABYSTEPPING)
604
   //#define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
660
   //#define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
605
   #define BABYSTEP_INVERT_Z false    // Change if Z babysteps should go the other way
661
   #define BABYSTEP_INVERT_Z false    // Change if Z babysteps should go the other way
606
-  #define BABYSTEP_MULTIPLICATOR 100 // Babysteps are very small. Increase for faster motion.
662
+  #define BABYSTEP_MULTIPLICATOR 1   // Babysteps are very small. Increase for faster motion.
607
   //#define BABYSTEP_ZPROBE_OFFSET   // Enable to combine M851 and Babystepping
663
   //#define BABYSTEP_ZPROBE_OFFSET   // Enable to combine M851 and Babystepping
608
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
664
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
609
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
665
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
610
                                         // Note: Extra time may be added to mitigate controller latency.
666
                                         // Note: Extra time may be added to mitigate controller latency.
611
   //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
667
   //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
612
-  //#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators
613
 #endif
668
 #endif
614
 
669
 
615
 // @section extruder
670
 // @section extruder
656
 
711
 
657
 // @section leveling
712
 // @section leveling
658
 
713
 
659
-// Default mesh area is an area with an inset margin on the print area.
660
-// Below are the macros that are used to define the borders for the mesh area,
661
-// made available here for specialized needs, ie dual extruder setup.
662
-#if ENABLED(MESH_BED_LEVELING)
663
-  #define MESH_MIN_X MESH_INSET
664
-  #define MESH_MAX_X (X_BED_SIZE - (MESH_INSET))
665
-  #define MESH_MIN_Y MESH_INSET
666
-  #define MESH_MAX_Y (Y_BED_SIZE - (MESH_INSET))
667
-#elif ENABLED(AUTO_BED_LEVELING_UBL)
668
-  #define UBL_MESH_MIN_X UBL_MESH_INSET
669
-  #define UBL_MESH_MAX_X (X_BED_SIZE - (UBL_MESH_INSET))
670
-  #define UBL_MESH_MIN_Y UBL_MESH_INSET
671
-  #define UBL_MESH_MAX_Y (Y_BED_SIZE - (UBL_MESH_INSET))
672
-
673
-  // If this is defined, the currently active mesh will be saved in the
674
-  // current slot on M500.
675
-  #define UBL_SAVE_ACTIVE_ON_M500
714
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
715
+  #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
716
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
717
+  #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
718
+#endif
719
+
720
+#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL)
721
+  // Override the mesh area if the automatic (max) area is too large
722
+  //#define MESH_MIN_X MESH_INSET
723
+  //#define MESH_MIN_Y MESH_INSET
724
+  //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET)
725
+  //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
676
 #endif
726
 #endif
677
 
727
 
678
 // @section extras
728
 // @section extras
692
 //#define BEZIER_CURVE_SUPPORT
742
 //#define BEZIER_CURVE_SUPPORT
693
 
743
 
694
 // G38.2 and G38.3 Probe Target
744
 // G38.2 and G38.3 Probe Target
695
-// Enable PROBE_DOUBLE_TOUCH if you want G38 to double touch
745
+// Set MULTIPLE_PROBING if you want G38 to double touch
696
 //#define G38_PROBE_TARGET
746
 //#define G38_PROBE_TARGET
697
 #if ENABLED(G38_PROBE_TARGET)
747
 #if ENABLED(G38_PROBE_TARGET)
698
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
748
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
717
 // @section hidden
767
 // @section hidden
718
 
768
 
719
 // The number of linear motions that can be in the plan at any give time.
769
 // The number of linear motions that can be in the plan at any give time.
720
-// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2, i.g. 8,16,32 because shifts and ors are used to do the ring-buffering.
770
+// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2 (e.g. 8, 16, 32) because shifts and ors are used to do the ring-buffering.
721
 #if ENABLED(SDSUPPORT)
771
 #if ENABLED(SDSUPPORT)
722
   #define BLOCK_BUFFER_SIZE 32 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
772
   #define BLOCK_BUFFER_SIZE 32 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
723
 #else
773
 #else
808
 #endif
858
 #endif
809
 
859
 
810
 /**
860
 /**
861
+ * Extra Fan Speed
862
+ * Adds a secondary fan speed for each print-cooling fan.
863
+ *   'M106 P<fan> T3-255' : Set a secondary speed for <fan>
864
+ *   'M106 P<fan> T2'     : Use the set secondary speed
865
+ *   'M106 P<fan> T1'     : Restore the previous fan speed
866
+ */
867
+//#define EXTRA_FAN_SPEED
868
+
869
+/**
811
  * Advanced Pause
870
  * Advanced Pause
812
  * Experimental feature for filament change support and for parking the nozzle when paused.
871
  * Experimental feature for filament change support and for parking the nozzle when paused.
813
  * Adds the GCode M600 for initiating filament change.
872
  * Adds the GCode M600 for initiating filament change.
917
 
976
 
918
 #endif
977
 #endif
919
 
978
 
920
-// @section TMC2130
979
+// @section TMC2130, TMC2208
921
 
980
 
922
 /**
981
 /**
923
  * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
982
  * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
931
  */
990
  */
932
 //#define HAVE_TMC2130
991
 //#define HAVE_TMC2130
933
 
992
 
934
-#if ENABLED(HAVE_TMC2130)
993
+/**
994
+ * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
995
+ * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin.
996
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN
997
+ * to #_SERIAL_TX_PIN with a 1K resistor.
998
+ * The drivers can also be used with hardware serial.
999
+ *
1000
+ * You'll also need the TMC2208Stepper Arduino library
1001
+ * (https://github.com/teemuatlut/TMC2208Stepper).
1002
+ */
1003
+//#define HAVE_TMC2208
1004
+
1005
+#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
935
 
1006
 
936
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
1007
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
937
   //#define X_IS_TMC2130
1008
   //#define X_IS_TMC2130
946
   //#define E3_IS_TMC2130
1017
   //#define E3_IS_TMC2130
947
   //#define E4_IS_TMC2130
1018
   //#define E4_IS_TMC2130
948
 
1019
 
1020
+  //#define X_IS_TMC2208
1021
+  //#define X2_IS_TMC2208
1022
+  //#define Y_IS_TMC2208
1023
+  //#define Y2_IS_TMC2208
1024
+  //#define Z_IS_TMC2208
1025
+  //#define Z2_IS_TMC2208
1026
+  //#define E0_IS_TMC2208
1027
+  //#define E1_IS_TMC2208
1028
+  //#define E2_IS_TMC2208
1029
+  //#define E3_IS_TMC2208
1030
+  //#define E4_IS_TMC2208
1031
+
949
   /**
1032
   /**
950
    * Stepper driver settings
1033
    * Stepper driver settings
951
    */
1034
    */
952
 
1035
 
953
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1036
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
954
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1037
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
955
-  #define INTERPOLATE          1  // Interpolate X/Y/Z_MICROSTEPS to 256
1038
+  #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
956
 
1039
 
957
-  #define X_CURRENT         1000  // rms current in mA. Multiply by 1.41 for peak current.
1040
+  #define X_CURRENT          800  // rms current in mA. Multiply by 1.41 for peak current.
958
   #define X_MICROSTEPS        16  // 0..256
1041
   #define X_MICROSTEPS        16  // 0..256
959
 
1042
 
960
-  #define Y_CURRENT         1000
1043
+  #define Y_CURRENT          800
961
   #define Y_MICROSTEPS        16
1044
   #define Y_MICROSTEPS        16
962
 
1045
 
963
-  #define Z_CURRENT         1000
1046
+  #define Z_CURRENT          800
964
   #define Z_MICROSTEPS        16
1047
   #define Z_MICROSTEPS        16
965
 
1048
 
966
-  //#define X2_CURRENT      1000
967
-  //#define X2_MICROSTEPS     16
1049
+  #define X2_CURRENT         800
1050
+  #define X2_MICROSTEPS       16
968
 
1051
 
969
-  //#define Y2_CURRENT      1000
970
-  //#define Y2_MICROSTEPS     16
1052
+  #define Y2_CURRENT         800
1053
+  #define Y2_MICROSTEPS       16
971
 
1054
 
972
-  //#define Z2_CURRENT      1000
973
-  //#define Z2_MICROSTEPS     16
1055
+  #define Z2_CURRENT         800
1056
+  #define Z2_MICROSTEPS       16
974
 
1057
 
975
-  //#define E0_CURRENT      1000
976
-  //#define E0_MICROSTEPS     16
1058
+  #define E0_CURRENT         800
1059
+  #define E0_MICROSTEPS       16
977
 
1060
 
978
-  //#define E1_CURRENT      1000
979
-  //#define E1_MICROSTEPS     16
1061
+  #define E1_CURRENT         800
1062
+  #define E1_MICROSTEPS       16
980
 
1063
 
981
-  //#define E2_CURRENT      1000
982
-  //#define E2_MICROSTEPS     16
1064
+  #define E2_CURRENT         800
1065
+  #define E2_MICROSTEPS       16
983
 
1066
 
984
-  //#define E3_CURRENT      1000
985
-  //#define E3_MICROSTEPS     16
1067
+  #define E3_CURRENT         800
1068
+  #define E3_MICROSTEPS       16
986
 
1069
 
987
-  //#define E3_CURRENT      1000
988
-  //#define E3_MICROSTEPS     16
1070
+  #define E4_CURRENT         800
1071
+  #define E4_MICROSTEPS       16
989
 
1072
 
990
   /**
1073
   /**
991
    * Use Trinamic's ultra quiet stepping mode.
1074
    * Use Trinamic's ultra quiet stepping mode.
994
   #define STEALTHCHOP
1077
   #define STEALTHCHOP
995
 
1078
 
996
   /**
1079
   /**
997
-   * Let Marlin automatically control stepper current.
998
-   * This is still an experimental feature.
999
-   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
1000
-   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
1001
-   * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX
1080
+   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1081
+   * like overtemperature and short to ground. TMC2208 requires hardware serial.
1082
+   * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1083
+   * Other detected conditions can be used to stop the current print.
1002
    * Relevant g-codes:
1084
    * Relevant g-codes:
1003
    * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
1085
    * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
1004
-   * M906 S1 - Start adjusting current
1005
-   * M906 S0 - Stop adjusting current
1006
    * M911 - Report stepper driver overtemperature pre-warn condition.
1086
    * M911 - Report stepper driver overtemperature pre-warn condition.
1007
    * M912 - Clear stepper driver overtemperature pre-warn condition flag.
1087
    * M912 - Clear stepper driver overtemperature pre-warn condition flag.
1088
+   * M122 S0/1 - Report driver parameters (Requires TMC_DEBUG)
1008
    */
1089
    */
1009
-  //#define AUTOMATIC_CURRENT_CONTROL
1090
+  //#define MONITOR_DRIVER_STATUS
1010
 
1091
 
1011
-  #if ENABLED(AUTOMATIC_CURRENT_CONTROL)
1012
-    #define CURRENT_STEP          50  // [mA]
1013
-    #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
1092
+  #if ENABLED(MONITOR_DRIVER_STATUS)
1093
+    #define CURRENT_STEP_DOWN     50  // [mA]
1014
     #define REPORT_CURRENT_CHANGE
1094
     #define REPORT_CURRENT_CHANGE
1095
+    #define STOP_ON_ERROR
1015
   #endif
1096
   #endif
1016
 
1097
 
1017
   /**
1098
   /**
1026
   #define X2_HYBRID_THRESHOLD    100
1107
   #define X2_HYBRID_THRESHOLD    100
1027
   #define Y_HYBRID_THRESHOLD     100
1108
   #define Y_HYBRID_THRESHOLD     100
1028
   #define Y2_HYBRID_THRESHOLD    100
1109
   #define Y2_HYBRID_THRESHOLD    100
1029
-  #define Z_HYBRID_THRESHOLD       4
1030
-  #define Z2_HYBRID_THRESHOLD      4
1110
+  #define Z_HYBRID_THRESHOLD       3
1111
+  #define Z2_HYBRID_THRESHOLD      3
1031
   #define E0_HYBRID_THRESHOLD     30
1112
   #define E0_HYBRID_THRESHOLD     30
1032
   #define E1_HYBRID_THRESHOLD     30
1113
   #define E1_HYBRID_THRESHOLD     30
1033
   #define E2_HYBRID_THRESHOLD     30
1114
   #define E2_HYBRID_THRESHOLD     30
1037
   /**
1118
   /**
1038
    * Use stallGuard2 to sense an obstacle and trigger an endstop.
1119
    * Use stallGuard2 to sense an obstacle and trigger an endstop.
1039
    * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
1120
    * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
1040
-   * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal.
1121
+   * X and Y homing will always be done in spreadCycle mode.
1041
    *
1122
    *
1042
    * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
1123
    * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
1043
    * Higher values make the system LESS sensitive.
1124
    * Higher values make the system LESS sensitive.
1046
    * It is advised to set X/Y_HOME_BUMP_MM to 0.
1127
    * It is advised to set X/Y_HOME_BUMP_MM to 0.
1047
    * M914 X/Y to live tune the setting
1128
    * M914 X/Y to live tune the setting
1048
    */
1129
    */
1049
-  //#define SENSORLESS_HOMING
1130
+  //#define SENSORLESS_HOMING // TMC2130 only
1050
 
1131
 
1051
   #if ENABLED(SENSORLESS_HOMING)
1132
   #if ENABLED(SENSORLESS_HOMING)
1052
-    #define X_HOMING_SENSITIVITY  19
1053
-    #define Y_HOMING_SENSITIVITY  19
1133
+    #define X_HOMING_SENSITIVITY  8
1134
+    #define Y_HOMING_SENSITIVITY  8
1054
   #endif
1135
   #endif
1055
 
1136
 
1056
   /**
1137
   /**
1138
+   * Enable M122 debugging command for TMC stepper drivers.
1139
+   * M122 S0/1 will enable continous reporting.
1140
+   */
1141
+  //#define TMC_DEBUG
1142
+
1143
+  /**
1057
    * You can set your own advanced settings by filling in predefined functions.
1144
    * You can set your own advanced settings by filling in predefined functions.
1058
    * A list of available functions can be found on the library github page
1145
    * A list of available functions can be found on the library github page
1059
    * https://github.com/teemuatlut/TMC2130Stepper
1146
    * https://github.com/teemuatlut/TMC2130Stepper
1147
+   * https://github.com/teemuatlut/TMC2208Stepper
1060
    *
1148
    *
1061
    * Example:
1149
    * Example:
1062
-   * #define TMC2130_ADV() { \
1150
+   * #define TMC_ADV() { \
1063
    *   stepperX.diag0_temp_prewarn(1); \
1151
    *   stepperX.diag0_temp_prewarn(1); \
1064
-   *   stepperX.interpolate(0); \
1152
+   *   stepperY.interpolate(0); \
1065
    * }
1153
    * }
1066
    */
1154
    */
1067
-  #define  TMC2130_ADV() {  }
1155
+  #define  TMC_ADV() {  }
1068
 
1156
 
1069
-#endif // HAVE_TMC2130
1157
+#endif // TMC2130 || TMC2208
1070
 
1158
 
1071
 // @section L6470
1159
 // @section L6470
1072
 
1160
 
1231
 #endif
1319
 #endif
1232
 
1320
 
1233
 /**
1321
 /**
1322
+ * Filament Width Sensor
1323
+ *
1324
+ * Measures the filament width in real-time and adjusts
1325
+ * flow rate to compensate for any irregularities.
1326
+ *
1327
+ * Also allows the measured filament diameter to set the
1328
+ * extrusion rate, so the slicer only has to specify the
1329
+ * volume.
1330
+ *
1331
+ * Only a single extruder is supported at this time.
1332
+ *
1333
+ *  34 RAMPS_14    : Analog input 5 on the AUX2 connector
1334
+ *  81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
1335
+ * 301 RAMBO       : Analog input 3
1336
+ *
1337
+ * Note: May require analog pins to be defined for other boards.
1338
+ */
1339
+//#define FILAMENT_WIDTH_SENSOR
1340
+
1341
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
1342
+  #define FILAMENT_SENSOR_EXTRUDER_NUM 0    // Index of the extruder that has the filament sensor. :[0,1,2,3,4]
1343
+  #define MEASUREMENT_DELAY_CM        14    // (cm) The distance from the filament sensor to the melting chamber
1344
+
1345
+  #define MEASURED_UPPER_LIMIT         2.00 // (mm) Upper limit used to validate sensor reading
1346
+  #define MEASURED_LOWER_LIMIT         1.60 // (mm) Lower limit used to validate sensor reading
1347
+  #define MAX_MEASUREMENT_DELAY       20    // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
1348
+
1349
+  #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
1350
+
1351
+  // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
1352
+  //#define FILAMENT_LCD_DISPLAY
1353
+#endif
1354
+
1355
+/**
1356
+ * CNC Coordinate Systems
1357
+ *
1358
+ * Enables G53 and G54-G59.3 commands to select coordinate systems
1359
+ * and G92.1 to reset the workspace to native machine space.
1360
+ */
1361
+//#define CNC_COORDINATE_SYSTEMS
1362
+
1363
+/**
1234
  * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
1364
  * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
1235
  */
1365
  */
1236
 //#define PINS_DEBUGGING
1366
 //#define PINS_DEBUGGING
1421
                                          // tweaks made to the configuration are affecting the printer in real-time.
1551
                                          // tweaks made to the configuration are affecting the printer in real-time.
1422
 #endif
1552
 #endif
1423
 
1553
 
1554
+/**
1555
+ * NanoDLP Sync support
1556
+ *
1557
+ * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
1558
+ * string to enable synchronization with DLP projector exposure. This change will allow to use
1559
+ * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
1560
+ */
1561
+//#define NANODLP_Z_SYNC
1562
+#if ENABLED(NANODLP_Z_SYNC)
1563
+  //#define NANODLP_ALL_AXIS  // Enables "Z_move_comp" output on any axis move.
1564
+                              // Default behaviour is limited to Z axis only.
1565
+#endif
1566
+
1424
 #endif // CONFIGURATION_ADV_H
1567
 #endif // CONFIGURATION_ADV_H

+ 160
- 91
Marlin/example_configurations/BQ/WITBOX/Configuration.h Переглянути файл

37
  */
37
  */
38
 #ifndef CONFIGURATION_H
38
 #ifndef CONFIGURATION_H
39
 #define CONFIGURATION_H
39
 #define CONFIGURATION_H
40
-#define CONFIGURATION_H_VERSION 010100
40
+#define CONFIGURATION_H_VERSION 010107
41
 
41
 
42
 //===========================================================================
42
 //===========================================================================
43
 //============================= Getting Started =============================
43
 //============================= Getting Started =============================
139
 // :[1, 2, 3, 4, 5]
139
 // :[1, 2, 3, 4, 5]
140
 #define EXTRUDERS 1
140
 #define EXTRUDERS 1
141
 
141
 
142
+// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
143
+#define DEFAULT_NOMINAL_FILAMENT_DIA 3.0
144
+
142
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
145
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
143
 //#define SINGLENOZZLE
146
 //#define SINGLENOZZLE
144
 
147
 
339
 
342
 
340
 // Comment the following line to disable PID and enable bang-bang.
343
 // Comment the following line to disable PID and enable bang-bang.
341
 #define PIDTEMP
344
 #define PIDTEMP
342
-#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
343
-#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
345
+#define BANG_MAX 255     // Limits current to nozzle while in bang-bang mode; 255=full current
346
+#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
347
+#define PID_K1 0.95      // Smoothing factor within the PID
344
 #if ENABLED(PIDTEMP)
348
 #if ENABLED(PIDTEMP)
345
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
349
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
346
   //#define PID_DEBUG // Sends debug data to the serial port.
350
   //#define PID_DEBUG // Sends debug data to the serial port.
350
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
354
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
351
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
355
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
352
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
356
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
353
-  #define K1 0.95 //smoothing factor within the PID
354
 
357
 
355
   // Witbox
358
   // Witbox
356
   #define  DEFAULT_Kp 22.2
359
   #define  DEFAULT_Kp 22.2
419
 //===========================================================================
422
 //===========================================================================
420
 
423
 
421
 /**
424
 /**
422
- * Thermal Protection protects your printer from damage and fire if a
423
- * thermistor falls out or temperature sensors fail in any way.
425
+ * Thermal Protection provides additional protection to your printer from damage
426
+ * and fire. Marlin always includes safe min and max temperature ranges which
427
+ * protect against a broken or disconnected thermistor wire.
424
  *
428
  *
425
- * The issue: If a thermistor falls out or a temperature sensor fails,
426
- * Marlin can no longer sense the actual temperature. Since a disconnected
427
- * thermistor reads as a low temperature, the firmware will keep the heater on.
429
+ * The issue: If a thermistor falls out, it will report the much lower
430
+ * temperature of the air in the room, and the the firmware will keep
431
+ * the heater on.
428
  *
432
  *
429
  * If you get "Thermal Runaway" or "Heating failed" errors the
433
  * If you get "Thermal Runaway" or "Heating failed" errors the
430
  * details can be tuned in Configuration_adv.h
434
  * details can be tuned in Configuration_adv.h
564
 // @section probes
568
 // @section probes
565
 
569
 
566
 //
570
 //
567
-// See http://marlinfw.org/configuration/probes.html
571
+// See http://marlinfw.org/docs/configuration/probes.html
568
 //
572
 //
569
 
573
 
570
 /**
574
 /**
677
 // X and Y axis travel speed (mm/m) between probes
681
 // X and Y axis travel speed (mm/m) between probes
678
 #define XY_PROBE_SPEED 8000
682
 #define XY_PROBE_SPEED 8000
679
 
683
 
680
-// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH)
684
+// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
681
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
685
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
682
 
686
 
683
 // Speed for the "accurate" probe of each point
687
 // Speed for the "accurate" probe of each point
684
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
688
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
685
 
689
 
686
-// Use double touch for probing
687
-//#define PROBE_DOUBLE_TOUCH
690
+// The number of probes to perform at each point.
691
+//   Set to 2 for a fast/slow probe, using the second probe result.
692
+//   Set to 3 or more for slow probes, averaging the results.
693
+//#define MULTIPLE_PROBING 2
688
 
694
 
689
 /**
695
 /**
690
  * Z probes require clearance when deploying, stowing, and moving between
696
  * Z probes require clearance when deploying, stowing, and moving between
776
 #define Y_MAX_POS Y_BED_SIZE
782
 #define Y_MAX_POS Y_BED_SIZE
777
 #define Z_MAX_POS 200
783
 #define Z_MAX_POS 200
778
 
784
 
779
-// If enabled, axes won't move below MIN_POS in response to movement commands.
785
+/**
786
+ * Software Endstops
787
+ *
788
+ * - Prevent moves outside the set machine bounds.
789
+ * - Individual axes can be disabled, if desired.
790
+ * - X and Y only apply to Cartesian robots.
791
+ * - Use 'M211' to set software endstops on/off or report current state
792
+ */
793
+
794
+// Min software endstops curtail movement below minimum coordinate bounds
780
 #define MIN_SOFTWARE_ENDSTOPS
795
 #define MIN_SOFTWARE_ENDSTOPS
781
-// If enabled, axes won't move above MAX_POS in response to movement commands.
796
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
797
+  #define MIN_SOFTWARE_ENDSTOP_X
798
+  #define MIN_SOFTWARE_ENDSTOP_Y
799
+  #define MIN_SOFTWARE_ENDSTOP_Z
800
+#endif
801
+
802
+// Max software endstops curtail movement above maximum coordinate bounds
782
 #define MAX_SOFTWARE_ENDSTOPS
803
 #define MAX_SOFTWARE_ENDSTOPS
804
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
805
+  #define MAX_SOFTWARE_ENDSTOP_X
806
+  #define MAX_SOFTWARE_ENDSTOP_Y
807
+  #define MAX_SOFTWARE_ENDSTOP_Z
808
+#endif
783
 
809
 
784
 /**
810
 /**
785
  * Filament Runout Sensor
811
  * Filament Runout Sensor
799
 //===========================================================================
825
 //===========================================================================
800
 //=============================== Bed Leveling ==============================
826
 //=============================== Bed Leveling ==============================
801
 //===========================================================================
827
 //===========================================================================
802
-// @section bedlevel
828
+// @section calibrate
803
 
829
 
804
 /**
830
 /**
805
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
831
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
825
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
851
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
826
  *   A comprehensive bed leveling system combining the features and benefits
852
  *   A comprehensive bed leveling system combining the features and benefits
827
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
853
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
828
- *   Validation and Mesh Editing systems. Currently, UBL is only checked out
829
- *   for Cartesian Printers. That said, it was primarily designed to correct
830
- *   poor quality Delta Printers. If you feel adventurous and have a Delta,
831
- *   please post an issue if something doesn't work correctly. Initially,
832
- *   you will need to set a reduced bed size so you have a rectangular area
833
- *   to test on.
854
+ *   Validation and Mesh Editing systems.
834
  *
855
  *
835
  * - MESH_BED_LEVELING
856
  * - MESH_BED_LEVELING
836
  *   Probe a grid manually
857
  *   Probe a grid manually
857
   // at which point movement will be level to the machine's XY plane.
878
   // at which point movement will be level to the machine's XY plane.
858
   // The height can be set with M420 Z<height>
879
   // The height can be set with M420 Z<height>
859
   #define ENABLE_LEVELING_FADE_HEIGHT
880
   #define ENABLE_LEVELING_FADE_HEIGHT
881
+
882
+  // For Cartesian machines, instead of dividing moves on mesh boundaries,
883
+  // split up moves into short segments like a Delta. This follows the
884
+  // contours of the bed more closely than edge-to-edge straight moves.
885
+  #define SEGMENT_LEVELED_MOVES
886
+  #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)
887
+
888
+  /**
889
+   * Enable the G26 Mesh Validation Pattern tool.
890
+   */
891
+  //#define G26_MESH_VALIDATION   // Enable G26 mesh validation
892
+  #if ENABLED(G26_MESH_VALIDATION)
893
+    #define MESH_TEST_NOZZLE_SIZE     0.4   // (mm) Diameter of primary nozzle.
894
+    #define MESH_TEST_LAYER_HEIGHT    0.2   // (mm) Default layer height for the G26 Mesh Validation Tool.
895
+    #define MESH_TEST_HOTEND_TEMP   205.0   // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
896
+    #define MESH_TEST_BED_TEMP       60.0   // (°C) Default bed temperature for the G26 Mesh Validation Tool.
897
+  #endif
898
+
860
 #endif
899
 #endif
861
 
900
 
862
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
901
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
912
   //========================= Unified Bed Leveling ============================
951
   //========================= Unified Bed Leveling ============================
913
   //===========================================================================
952
   //===========================================================================
914
 
953
 
915
-  #define UBL_MESH_INSET 1          // Mesh inset margin on print area
954
+  //#define MESH_EDIT_GFX_OVERLAY   // Display a graphics overlay while editing the mesh
955
+
956
+  #define MESH_INSET 1              // Mesh inset margin on print area
916
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
957
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
917
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
958
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
918
 
959
 
923
   #define UBL_PROBE_PT_3_X 180
964
   #define UBL_PROBE_PT_3_X 180
924
   #define UBL_PROBE_PT_3_Y 20
965
   #define UBL_PROBE_PT_3_Y 20
925
 
966
 
926
-  #define UBL_G26_MESH_VALIDATION   // Enable G26 mesh validation
927
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
967
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
968
+  #define UBL_SAVE_ACTIVE_ON_M500   // Save the currently active mesh in the current slot on M500
928
 
969
 
929
 #elif ENABLED(MESH_BED_LEVELING)
970
 #elif ENABLED(MESH_BED_LEVELING)
930
 
971
 
984
 //#define Z_SAFE_HOMING
1025
 //#define Z_SAFE_HOMING
985
 
1026
 
986
 #if ENABLED(Z_SAFE_HOMING)
1027
 #if ENABLED(Z_SAFE_HOMING)
987
-  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axis (G28).
988
-  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axis (G28).
1028
+  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axes (G28).
1029
+  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axes (G28).
989
 #endif
1030
 #endif
990
 
1031
 
991
 // Homing speeds (mm/m)
1032
 // Homing speeds (mm/m)
992
 #define HOMING_FEEDRATE_XY (120*60)
1033
 #define HOMING_FEEDRATE_XY (120*60)
993
 #define HOMING_FEEDRATE_Z  432
1034
 #define HOMING_FEEDRATE_Z  432
994
 
1035
 
1036
+// @section calibrate
1037
+
1038
+/**
1039
+ * Bed Skew Compensation
1040
+ *
1041
+ * This feature corrects for misalignment in the XYZ axes.
1042
+ *
1043
+ * Take the following steps to get the bed skew in the XY plane:
1044
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1045
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1046
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1047
+ *  4. For XY_SIDE_AD measure the edge A to D
1048
+ *
1049
+ * Marlin automatically computes skew factors from these measurements.
1050
+ * Skew factors may also be computed and set manually:
1051
+ *
1052
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1053
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1054
+ *
1055
+ * If desired, follow the same procedure for XZ and YZ.
1056
+ * Use these diagrams for reference:
1057
+ *
1058
+ *    Y                     Z                     Z
1059
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1060
+ *    |    /       /        |    /       /        |    /       /
1061
+ *    |   /       /         |   /       /         |   /       /
1062
+ *    |  A-------D          |  A-------D          |  A-------D
1063
+ *    +-------------->X     +-------------->X     +-------------->Y
1064
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1065
+ */
1066
+//#define SKEW_CORRECTION
1067
+
1068
+#if ENABLED(SKEW_CORRECTION)
1069
+  // Input all length measurements here:
1070
+  #define XY_DIAG_AC 282.8427124746
1071
+  #define XY_DIAG_BD 282.8427124746
1072
+  #define XY_SIDE_AD 200
1073
+
1074
+  // Or, set the default skew factors directly here
1075
+  // to override the above measurements:
1076
+  #define XY_SKEW_FACTOR 0.0
1077
+
1078
+  //#define SKEW_CORRECTION_FOR_Z
1079
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1080
+    #define XZ_DIAG_AC 282.8427124746
1081
+    #define XZ_DIAG_BD 282.8427124746
1082
+    #define YZ_DIAG_AC 282.8427124746
1083
+    #define YZ_DIAG_BD 282.8427124746
1084
+    #define YZ_SIDE_AD 200
1085
+    #define XZ_SKEW_FACTOR 0.0
1086
+    #define YZ_SKEW_FACTOR 0.0
1087
+  #endif
1088
+
1089
+  // Enable this option for M852 to set skew at runtime
1090
+  //#define SKEW_CORRECTION_GCODE
1091
+#endif
1092
+
995
 //=============================================================================
1093
 //=============================================================================
996
 //============================= Additional Features ===========================
1094
 //============================= Additional Features ===========================
997
 //=============================================================================
1095
 //=============================================================================
1023
 //
1121
 //
1024
 // M100 Free Memory Watcher
1122
 // M100 Free Memory Watcher
1025
 //
1123
 //
1026
-//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
1124
+//#define M100_FREE_MEMORY_WATCHER    // Add M100 (Free Memory Watcher) to debug memory usage
1027
 
1125
 
1028
 //
1126
 //
1029
 // G20/G21 Inch mode support
1127
 // G20/G21 Inch mode support
1168
  *
1266
  *
1169
  * Select the language to display on the LCD. These languages are available:
1267
  * Select the language to display on the LCD. These languages are available:
1170
  *
1268
  *
1171
- *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, gl, hr,
1172
- *    it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1269
+ *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, fr_utf8, gl,
1270
+ *    hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1173
  *    tr, uk, zh_CN, zh_TW, test
1271
  *    tr, uk, zh_CN, zh_TW, test
1174
  *
1272
  *
1175
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1273
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1176
  */
1274
  */
1177
-//#define LCD_LANGUAGE en
1275
+#define LCD_LANGUAGE en
1178
 
1276
 
1179
 /**
1277
 /**
1180
  * LCD Character Set
1278
  * LCD Character Set
1300
 // Note: Test audio output with the G-Code:
1398
 // Note: Test audio output with the G-Code:
1301
 //  M300 S<frequency Hz> P<duration ms>
1399
 //  M300 S<frequency Hz> P<duration ms>
1302
 //
1400
 //
1303
-//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
1304
-//#define LCD_FEEDBACK_FREQUENCY_HZ 1000
1401
+//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
1402
+//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
1305
 
1403
 
1306
 //
1404
 //
1307
 // CONTROLLER TYPE: Standard
1405
 // CONTROLLER TYPE: Standard
1409
 //#define CARTESIO_UI
1507
 //#define CARTESIO_UI
1410
 
1508
 
1411
 //
1509
 //
1412
-// ANET_10 Controller supported displays.
1510
+// ANET and Tronxy Controller supported displays.
1413
 //
1511
 //
1414
-//#define ANET_KEYPAD_LCD         // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1512
+//#define ZONESTAR_LCD            // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1415
                                   // This LCD is known to be susceptible to electrical interference
1513
                                   // This LCD is known to be susceptible to electrical interference
1416
                                   // which scrambles the display.  Pressing any button clears it up.
1514
                                   // which scrambles the display.  Pressing any button clears it up.
1515
+                                  // This is a LCD2004 display with 5 analog buttons.
1516
+
1417
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1517
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1418
                                   // A clone of the RepRapDiscount full graphics display but with
1518
                                   // A clone of the RepRapDiscount full graphics display but with
1419
                                   // different pins/wiring (see pins_ANET_10.h).
1519
                                   // different pins/wiring (see pins_ANET_10.h).
1523
 //
1623
 //
1524
 //#define MKS_12864OLED
1624
 //#define MKS_12864OLED
1525
 
1625
 
1626
+// Silvergate GLCD controller
1627
+// http://github.com/android444/Silvergate
1628
+//
1629
+//#define SILVER_GATE_GLCD_CONTROLLER
1630
+
1526
 //=============================================================================
1631
 //=============================================================================
1527
 //=============================== Extra Features ==============================
1632
 //=============================== Extra Features ==============================
1528
 //=============================================================================
1633
 //=============================================================================
1579
  * Adds the M150 command to set the LED (or LED strip) color.
1684
  * Adds the M150 command to set the LED (or LED strip) color.
1580
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1685
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1581
  * luminance values can be set from 0 to 255.
1686
  * luminance values can be set from 0 to 255.
1582
- * For Neopixel LED overall brightness parameters is also available 
1687
+ * For Neopixel LED an overall brightness parameter is also available.
1583
  *
1688
  *
1584
  * *** CAUTION ***
1689
  * *** CAUTION ***
1585
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1690
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1586
  *  as the Arduino cannot handle the current the LEDs will require.
1691
  *  as the Arduino cannot handle the current the LEDs will require.
1587
  *  Failure to follow this precaution can destroy your Arduino!
1692
  *  Failure to follow this precaution can destroy your Arduino!
1588
- *  The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
1589
- *  cannot handle such current, separate 5V power supply must be used
1693
+ *  NOTE: A separate 5V power supply is required! The Neopixel LED needs
1694
+ *  more current than the Arduino 5V linear regulator can produce.
1590
  * *** CAUTION ***
1695
  * *** CAUTION ***
1591
  *
1696
  *
1592
- * LED type. This options are mutualy exclusive. Uncomment only one.
1697
+ * LED Type. Enable only one of the following two options.
1593
  *
1698
  *
1594
  */
1699
  */
1595
 //#define RGB_LED
1700
 //#define RGB_LED
1605
 // Support for Adafruit Neopixel LED driver
1710
 // Support for Adafruit Neopixel LED driver
1606
 //#define NEOPIXEL_LED
1711
 //#define NEOPIXEL_LED
1607
 #if ENABLED(NEOPIXEL_LED)
1712
 #if ENABLED(NEOPIXEL_LED)
1608
-  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
1713
+  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
1609
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1714
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1610
-  #define NEOPIXEL_PIXELS 30       // Number of LEDs on strip
1611
-  #define NEOPIXEL_IS_SEQUENTIAL   // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
1612
-  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness 0-255
1715
+  #define NEOPIXEL_PIXELS 30       // Number of LEDs in the strip
1716
+  #define NEOPIXEL_IS_SEQUENTIAL   // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
1717
+  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness (0-255)
1613
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1718
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1614
 #endif
1719
 #endif
1615
 
1720
 
1624
  *  - Change to green once print has finished
1729
  *  - Change to green once print has finished
1625
  *  - Turn off after the print has finished and the user has pushed a button
1730
  *  - Turn off after the print has finished and the user has pushed a button
1626
  */
1731
  */
1627
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED)
1732
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
1628
   #define PRINTER_EVENT_LEDS
1733
   #define PRINTER_EVENT_LEDS
1629
 #endif
1734
 #endif
1630
 
1735
 
1631
-/*********************************************************************\
1632
-* R/C SERVO support
1633
-* Sponsored by TrinityLabs, Reworked by codexmas
1634
-**********************************************************************/
1736
+/**
1737
+ * R/C SERVO support
1738
+ * Sponsored by TrinityLabs, Reworked by codexmas
1739
+ */
1635
 
1740
 
1636
-// Number of servos
1637
-//
1638
-// If you select a configuration below, this will receive a default value and does not need to be set manually
1639
-// set it manually if you have more servos than extruders and wish to manually control some
1640
-// leaving it undefined or defining as 0 will disable the servo subsystem
1641
-// If unsure, leave commented / disabled
1642
-//
1741
+/**
1742
+ * Number of servos
1743
+ *
1744
+ * For some servo-related options NUM_SERVOS will be set automatically.
1745
+ * Set this manually if there are extra servos needing manual control.
1746
+ * Leave undefined or set to 0 to entirely disable the servo subsystem.
1747
+ */
1643
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1748
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1644
 
1749
 
1645
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1750
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1652
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1757
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1653
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1758
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1654
 
1759
 
1655
-/**
1656
- * Filament Width Sensor
1657
- *
1658
- * Measures the filament width in real-time and adjusts
1659
- * flow rate to compensate for any irregularities.
1660
- *
1661
- * Also allows the measured filament diameter to set the
1662
- * extrusion rate, so the slicer only has to specify the
1663
- * volume.
1664
- *
1665
- * Only a single extruder is supported at this time.
1666
- *
1667
- *  34 RAMPS_14    : Analog input 5 on the AUX2 connector
1668
- *  81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
1669
- * 301 RAMBO       : Analog input 3
1670
- *
1671
- * Note: May require analog pins to be defined for other boards.
1672
- */
1673
-//#define FILAMENT_WIDTH_SENSOR
1674
-
1675
-#define DEFAULT_NOMINAL_FILAMENT_DIA 3.00   // (mm) Diameter of the filament generally used (3.0 or 1.75mm), also used in the slicer. Used to validate sensor reading.
1676
-
1677
-#if ENABLED(FILAMENT_WIDTH_SENSOR)
1678
-  #define FILAMENT_SENSOR_EXTRUDER_NUM 0    // Index of the extruder that has the filament sensor (0,1,2,3)
1679
-  #define MEASUREMENT_DELAY_CM        14    // (cm) The distance from the filament sensor to the melting chamber
1680
-
1681
-  #define MEASURED_UPPER_LIMIT         3.30 // (mm) Upper limit used to validate sensor reading
1682
-  #define MEASURED_LOWER_LIMIT         1.90 // (mm) Lower limit used to validate sensor reading
1683
-  #define MAX_MEASUREMENT_DELAY       20    // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
1684
-
1685
-  #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
1686
-
1687
-  // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
1688
-  //#define FILAMENT_LCD_DISPLAY
1689
-#endif
1690
-
1691
 #endif // CONFIGURATION_H
1760
 #endif // CONFIGURATION_H

+ 268
- 125
Marlin/example_configurations/BQ/WITBOX/Configuration_adv.h Переглянути файл

32
  */
32
  */
33
 #ifndef CONFIGURATION_ADV_H
33
 #ifndef CONFIGURATION_ADV_H
34
 #define CONFIGURATION_ADV_H
34
 #define CONFIGURATION_ADV_H
35
-#define CONFIGURATION_ADV_H_VERSION 010100
35
+#define CONFIGURATION_ADV_H_VERSION 010107
36
 
36
 
37
 // @section temperature
37
 // @section temperature
38
 
38
 
48
 #endif
48
 #endif
49
 
49
 
50
 /**
50
 /**
51
- * Thermal Protection protects your printer from damage and fire if a
52
- * thermistor falls out or temperature sensors fail in any way.
51
+ * Thermal Protection provides additional protection to your printer from damage
52
+ * and fire. Marlin always includes safe min and max temperature ranges which
53
+ * protect against a broken or disconnected thermistor wire.
53
  *
54
  *
54
- * The issue: If a thermistor falls out or a temperature sensor fails,
55
- * Marlin can no longer sense the actual temperature. Since a disconnected
56
- * thermistor reads as a low temperature, the firmware will keep the heater on.
55
+ * The issue: If a thermistor falls out, it will report the much lower
56
+ * temperature of the air in the room, and the the firmware will keep
57
+ * the heater on.
57
  *
58
  *
58
  * The solution: Once the temperature reaches the target, start observing.
59
  * The solution: Once the temperature reaches the target, start observing.
59
- * If the temperature stays too far below the target (hysteresis) for too long (period),
60
- * the firmware will halt the machine as a safety precaution.
60
+ * If the temperature stays too far below the target (hysteresis) for too
61
+ * long (period), the firmware will halt the machine as a safety precaution.
61
  *
62
  *
62
- * If you get false positives for "Thermal Runaway" increase THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
63
+ * If you get false positives for "Thermal Runaway", increase
64
+ * THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
63
  */
65
  */
64
 #if ENABLED(THERMAL_PROTECTION_HOTENDS)
66
 #if ENABLED(THERMAL_PROTECTION_HOTENDS)
65
   #define THERMAL_PROTECTION_PERIOD 40        // Seconds
67
   #define THERMAL_PROTECTION_PERIOD 40        // Seconds
66
   #define THERMAL_PROTECTION_HYSTERESIS 4     // Degrees Celsius
68
   #define THERMAL_PROTECTION_HYSTERESIS 4     // Degrees Celsius
67
 
69
 
68
   /**
70
   /**
69
-   * Whenever an M104 or M109 increases the target temperature the firmware will wait for the
70
-   * WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
71
-   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
72
-   * but only if the current temperature is far enough below the target for a reliable test.
71
+   * Whenever an M104, M109, or M303 increases the target temperature, the
72
+   * firmware will wait for the WATCH_TEMP_PERIOD to expire. If the temperature
73
+   * hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted and
74
+   * requires a hard reset. This test restarts with any M104/M109/M303, but only
75
+   * if the current temperature is far enough below the target for a reliable
76
+   * test.
73
    *
77
    *
74
-   * If you get false positives for "Heating failed" increase WATCH_TEMP_PERIOD and/or decrease WATCH_TEMP_INCREASE
75
-   * WATCH_TEMP_INCREASE should not be below 2.
78
+   * If you get false positives for "Heating failed", increase WATCH_TEMP_PERIOD
79
+   * and/or decrease WATCH_TEMP_INCREASE. WATCH_TEMP_INCREASE should not be set
80
+   * below 2.
76
    */
81
    */
77
   #define WATCH_TEMP_PERIOD 20                // Seconds
82
   #define WATCH_TEMP_PERIOD 20                // Seconds
78
   #define WATCH_TEMP_INCREASE 2               // Degrees Celsius
83
   #define WATCH_TEMP_INCREASE 2               // Degrees Celsius
86
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
91
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
87
 
92
 
88
   /**
93
   /**
89
-   * Whenever an M140 or M190 increases the target temperature the firmware will wait for the
90
-   * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE
91
-   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190,
92
-   * but only if the current temperature is far enough below the target for a reliable test.
93
-   *
94
-   * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease
95
-   * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.)
94
+   * As described above, except for the bed (M140/M190/M303).
96
    */
95
    */
97
   #define WATCH_BED_TEMP_PERIOD 60                // Seconds
96
   #define WATCH_BED_TEMP_PERIOD 60                // Seconds
98
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
97
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
123
   #define AUTOTEMP_OLDWEIGHT 0.98
122
   #define AUTOTEMP_OLDWEIGHT 0.98
124
 #endif
123
 #endif
125
 
124
 
125
+// Show extra position information in M114
126
+//#define M114_DETAIL
127
+
126
 // Show Temperature ADC value
128
 // Show Temperature ADC value
127
 // Enable for M105 to include ADC values read from temperature sensors.
129
 // Enable for M105 to include ADC values read from temperature sensors.
128
 //#define SHOW_TEMP_ADC_VALUES
130
 //#define SHOW_TEMP_ADC_VALUES
257
 
259
 
258
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
260
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
259
 
261
 
260
-// Dual X Steppers
261
-// Uncomment this option to drive two X axis motors.
262
-// The next unused E driver will be assigned to the second X stepper.
262
+/**
263
+ * Dual Steppers / Dual Endstops
264
+ *
265
+ * This section will allow you to use extra E drivers to drive a second motor for X, Y, or Z axes.
266
+ *
267
+ * For example, set X_DUAL_STEPPER_DRIVERS setting to use a second motor. If the motors need to
268
+ * spin in opposite directions set INVERT_X2_VS_X_DIR. If the second motor needs its own endstop
269
+ * set X_DUAL_ENDSTOPS. This can adjust for "racking." Use X2_USE_ENDSTOP to set the endstop plug
270
+ * that should be used for the second endstop. Extra endstops will appear in the output of 'M119'.
271
+ *
272
+ * Use X_DUAL_ENDSTOP_ADJUSTMENT to adjust for mechanical imperfection. After homing both motors
273
+ * this offset is applied to the X2 motor. To find the offset home the X axis, and measure the error
274
+ * in X2. Dual endstop offsets can be set at runtime with 'M666 X<offset> Y<offset> Z<offset>'.
275
+ */
276
+
263
 //#define X_DUAL_STEPPER_DRIVERS
277
 //#define X_DUAL_STEPPER_DRIVERS
264
 #if ENABLED(X_DUAL_STEPPER_DRIVERS)
278
 #if ENABLED(X_DUAL_STEPPER_DRIVERS)
265
-  // Set true if the two X motors need to rotate in opposite directions
266
-  #define INVERT_X2_VS_X_DIR true
279
+  #define INVERT_X2_VS_X_DIR true   // Set 'true' if X motors should rotate in opposite directions
280
+  //#define X_DUAL_ENDSTOPS
281
+  #if ENABLED(X_DUAL_ENDSTOPS)
282
+    #define X2_USE_ENDSTOP _XMAX_
283
+    #define X_DUAL_ENDSTOPS_ADJUSTMENT  0
284
+  #endif
267
 #endif
285
 #endif
268
 
286
 
269
-// Dual Y Steppers
270
-// Uncomment this option to drive two Y axis motors.
271
-// The next unused E driver will be assigned to the second Y stepper.
272
 //#define Y_DUAL_STEPPER_DRIVERS
287
 //#define Y_DUAL_STEPPER_DRIVERS
273
 #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
288
 #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
274
-  // Set true if the two Y motors need to rotate in opposite directions
275
-  #define INVERT_Y2_VS_Y_DIR true
289
+  #define INVERT_Y2_VS_Y_DIR true   // Set 'true' if Y motors should rotate in opposite directions
290
+  //#define Y_DUAL_ENDSTOPS
291
+  #if ENABLED(Y_DUAL_ENDSTOPS)
292
+    #define Y2_USE_ENDSTOP _YMAX_
293
+    #define Y_DUAL_ENDSTOPS_ADJUSTMENT  0
294
+  #endif
276
 #endif
295
 #endif
277
 
296
 
278
-// A single Z stepper driver is usually used to drive 2 stepper motors.
279
-// Uncomment this option to use a separate stepper driver for each Z axis motor.
280
-// The next unused E driver will be assigned to the second Z stepper.
281
 //#define Z_DUAL_STEPPER_DRIVERS
297
 //#define Z_DUAL_STEPPER_DRIVERS
282
-
283
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
298
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
284
-
285
-  // Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper.
286
-  // That way the machine is capable to align the bed during home, since both Z steppers are homed.
287
-  // There is also an implementation of M666 (software endstops adjustment) to this feature.
288
-  // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed.
289
-  // One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2.
290
-  // If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive.
291
-  // Play a little bit with small adjustments (0.5mm) and check the behaviour.
292
-  // The M119 (endstops report) will start reporting the Z2 Endstop as well.
293
-
294
   //#define Z_DUAL_ENDSTOPS
299
   //#define Z_DUAL_ENDSTOPS
295
-
296
   #if ENABLED(Z_DUAL_ENDSTOPS)
300
   #if ENABLED(Z_DUAL_ENDSTOPS)
297
     #define Z2_USE_ENDSTOP _XMAX_
301
     #define Z2_USE_ENDSTOP _XMAX_
298
-    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0  // Use M666 to determine/test this value
302
+    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0
299
   #endif
303
   #endif
300
-
301
-#endif // Z_DUAL_STEPPER_DRIVERS
304
+#endif
302
 
305
 
303
 // Enable this for dual x-carriage printers.
306
 // Enable this for dual x-carriage printers.
304
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
307
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
345
 
348
 
346
 // @section homing
349
 // @section homing
347
 
350
 
348
-//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
351
+// Homing hits each endstop, retracts by these distances, then does a slower bump.
349
 #define X_HOME_BUMP_MM 5
352
 #define X_HOME_BUMP_MM 5
350
 #define Y_HOME_BUMP_MM 5
353
 #define Y_HOME_BUMP_MM 5
351
 #define Z_HOME_BUMP_MM 2
354
 #define Z_HOME_BUMP_MM 2
352
-#define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
353
-//#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
355
+#define HOMING_BUMP_DIVISOR { 2, 2, 4 }  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
356
+//#define QUICK_HOME                     // If homing includes X and Y, do a diagonal move initially
354
 
357
 
355
 // When G28 is called, this option will make Y home before X
358
 // When G28 is called, this option will make Y home before X
356
 //#define HOME_Y_BEFORE_X
359
 //#define HOME_Y_BEFORE_X
434
 //#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 }   // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
437
 //#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 }   // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
435
 //#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 }    // Default drive percent - X, Y, Z, E axis
438
 //#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 }    // Default drive percent - X, Y, Z, E axis
436
 
439
 
437
-// Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
440
+// Use an I2C based DIGIPOT (e.g., Azteeg X3 Pro)
438
 //#define DIGIPOT_I2C
441
 //#define DIGIPOT_I2C
442
+#if ENABLED(DIGIPOT_I2C) && !defined(DIGIPOT_I2C_ADDRESS_A)
443
+  /**
444
+   * Common slave addresses:
445
+   *
446
+   *                    A   (A shifted)   B   (B shifted)  IC
447
+   * Smoothie          0x2C (0x58)       0x2D (0x5A)       MCP4451
448
+   * AZTEEG_X3_PRO     0x2C (0x58)       0x2E (0x5C)       MCP4451
449
+   * MIGHTYBOARD_REVE  0x2F (0x5E)                         MCP4018
450
+   */
451
+  #define DIGIPOT_I2C_ADDRESS_A 0x2C  // unshifted slave address for first DIGIPOT
452
+  #define DIGIPOT_I2C_ADDRESS_B 0x2D  // unshifted slave address for second DIGIPOT
453
+#endif
454
+
439
 //#define DIGIPOT_MCP4018          // Requires library from https://github.com/stawel/SlowSoftI2CMaster
455
 //#define DIGIPOT_MCP4018          // Requires library from https://github.com/stawel/SlowSoftI2CMaster
440
 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4     AZTEEG_X3_PRO: 8
456
 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4     AZTEEG_X3_PRO: 8
441
 // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
457
 // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
466
 // The timeout (in ms) to return to the status screen from sub-menus
482
 // The timeout (in ms) to return to the status screen from sub-menus
467
 //#define LCD_TIMEOUT_TO_STATUS 15000
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
468
 
484
 
485
+/**
486
+ * LED Control Menu
487
+ * Enable this feature to add LED Control to the LCD menu
488
+ */
489
+//#define LED_CONTROL_MENU
490
+#if ENABLED(LED_CONTROL_MENU)
491
+  #define LED_COLOR_PRESETS                 // Enable the Preset Color menu option
492
+  #if ENABLED(LED_COLOR_PRESETS)
493
+    #define LED_USER_PRESET_RED        255  // User defined RED value
494
+    #define LED_USER_PRESET_GREEN      128  // User defined GREEN value
495
+    #define LED_USER_PRESET_BLUE         0  // User defined BLUE value
496
+    #define LED_USER_PRESET_WHITE      255  // User defined WHITE value
497
+    #define LED_USER_PRESET_BRIGHTNESS 255  // User defined intensity
498
+    //#define LED_USER_PRESET_STARTUP       // Have the printer display the user preset color on startup
499
+  #endif
500
+#endif // LED_CONTROL_MENU
501
+
469
 #if ENABLED(SDSUPPORT)
502
 #if ENABLED(SDSUPPORT)
470
 
503
 
471
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
504
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
475
   // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
508
   // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
476
   #define SD_DETECT_INVERTED
509
   #define SD_DETECT_INVERTED
477
 
510
 
478
-  #define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
511
+  #define SD_FINISHED_STEPPERRELEASE true          // Disable steppers when SD Print is finished
479
   #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
512
   #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
480
 
513
 
481
-  #define SDCARD_RATHERRECENTFIRST  //reverse file order of sd card menu display. Its sorted practically after the file system block order.
482
-  // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that.
483
-  // using:
514
+  // Reverse SD sort to show "more recent" files first, according to the card's FAT.
515
+  // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended.
516
+  #define SDCARD_RATHERRECENTFIRST
517
+
518
+  // Add an option in the menu to run all auto#.g files
484
   //#define MENU_ADDAUTOSTART
519
   //#define MENU_ADDAUTOSTART
485
 
520
 
486
   /**
521
   /**
517
     #define SDSORT_USES_STACK  false  // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
552
     #define SDSORT_USES_STACK  false  // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
518
     #define SDSORT_CACHE_NAMES false  // Keep sorted items in RAM longer for speedy performance. Most expensive option.
553
     #define SDSORT_CACHE_NAMES false  // Keep sorted items in RAM longer for speedy performance. Most expensive option.
519
     #define SDSORT_DYNAMIC_RAM false  // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
554
     #define SDSORT_DYNAMIC_RAM false  // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
555
+    #define SDSORT_CACHE_VFATS 2      // Maximum number of 13-byte VFAT entries to use for sorting.
556
+                                      // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM.
520
   #endif
557
   #endif
521
 
558
 
522
   // Show a progress bar on HD44780 LCDs for SD printing
559
   // Show a progress bar on HD44780 LCDs for SD printing
535
     //#define LCD_PROGRESS_BAR_TEST
572
     //#define LCD_PROGRESS_BAR_TEST
536
   #endif
573
   #endif
537
 
574
 
575
+  // Add an 'M73' G-code to set the current percentage
576
+  //#define LCD_SET_PROGRESS_MANUALLY
577
+
538
   // This allows hosts to request long names for files and folders with M33
578
   // This allows hosts to request long names for files and folders with M33
539
   //#define LONG_FILENAME_HOST_SUPPORT
579
   //#define LONG_FILENAME_HOST_SUPPORT
540
 
580
 
541
-  // This option allows you to abort SD printing when any endstop is triggered.
542
-  // This feature must be enabled with "M540 S1" or from the LCD menu.
543
-  // To have any effect, endstops must be enabled during SD printing.
581
+  // Enable this option to scroll long filenames in the SD card menu
582
+  //#define SCROLL_LONG_FILENAMES
583
+
584
+  /**
585
+   * This option allows you to abort SD printing when any endstop is triggered.
586
+   * This feature must be enabled with "M540 S1" or from the LCD menu.
587
+   * To have any effect, endstops must be enabled during SD printing.
588
+   */
544
   //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
589
   //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
545
 
590
 
591
+  /**
592
+   * This option makes it easier to print the same SD Card file again.
593
+   * On print completion the LCD Menu will open with the file selected.
594
+   * You can just click to start the print, or navigate elsewhere.
595
+   */
596
+  //#define SD_REPRINT_LAST_SELECTED_FILE
597
+
546
 #endif // SDSUPPORT
598
 #endif // SDSUPPORT
547
 
599
 
548
 /**
600
 /**
575
   // Enable this option and reduce the value to optimize screen updates.
627
   // Enable this option and reduce the value to optimize screen updates.
576
   // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
628
   // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
577
   //#define DOGM_SPI_DELAY_US 5
629
   //#define DOGM_SPI_DELAY_US 5
630
+
631
+  // Swap the CW/CCW indicators in the graphics overlay
632
+  //#define OVERLAY_GFX_REVERSE
633
+
578
 #endif // DOGLCD
634
 #endif // DOGLCD
579
 
635
 
580
 // @section safety
636
 // @section safety
603
 #if ENABLED(BABYSTEPPING)
659
 #if ENABLED(BABYSTEPPING)
604
   //#define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
660
   //#define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
605
   #define BABYSTEP_INVERT_Z false    // Change if Z babysteps should go the other way
661
   #define BABYSTEP_INVERT_Z false    // Change if Z babysteps should go the other way
606
-  #define BABYSTEP_MULTIPLICATOR 100 // Babysteps are very small. Increase for faster motion.
662
+  #define BABYSTEP_MULTIPLICATOR 1   // Babysteps are very small. Increase for faster motion.
607
   //#define BABYSTEP_ZPROBE_OFFSET   // Enable to combine M851 and Babystepping
663
   //#define BABYSTEP_ZPROBE_OFFSET   // Enable to combine M851 and Babystepping
608
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
664
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
609
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
665
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
610
                                         // Note: Extra time may be added to mitigate controller latency.
666
                                         // Note: Extra time may be added to mitigate controller latency.
611
   //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
667
   //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
612
-  //#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators
613
 #endif
668
 #endif
614
 
669
 
615
 // @section extruder
670
 // @section extruder
656
 
711
 
657
 // @section leveling
712
 // @section leveling
658
 
713
 
659
-// Default mesh area is an area with an inset margin on the print area.
660
-// Below are the macros that are used to define the borders for the mesh area,
661
-// made available here for specialized needs, ie dual extruder setup.
662
-#if ENABLED(MESH_BED_LEVELING)
663
-  #define MESH_MIN_X MESH_INSET
664
-  #define MESH_MAX_X (X_BED_SIZE - (MESH_INSET))
665
-  #define MESH_MIN_Y MESH_INSET
666
-  #define MESH_MAX_Y (Y_BED_SIZE - (MESH_INSET))
667
-#elif ENABLED(AUTO_BED_LEVELING_UBL)
668
-  #define UBL_MESH_MIN_X UBL_MESH_INSET
669
-  #define UBL_MESH_MAX_X (X_BED_SIZE - (UBL_MESH_INSET))
670
-  #define UBL_MESH_MIN_Y UBL_MESH_INSET
671
-  #define UBL_MESH_MAX_Y (Y_BED_SIZE - (UBL_MESH_INSET))
672
-
673
-  // If this is defined, the currently active mesh will be saved in the
674
-  // current slot on M500.
675
-  #define UBL_SAVE_ACTIVE_ON_M500
714
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
715
+  #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
716
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
717
+  #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
718
+#endif
719
+
720
+#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL)
721
+  // Override the mesh area if the automatic (max) area is too large
722
+  //#define MESH_MIN_X MESH_INSET
723
+  //#define MESH_MIN_Y MESH_INSET
724
+  //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET)
725
+  //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
676
 #endif
726
 #endif
677
 
727
 
678
 // @section extras
728
 // @section extras
692
 //#define BEZIER_CURVE_SUPPORT
742
 //#define BEZIER_CURVE_SUPPORT
693
 
743
 
694
 // G38.2 and G38.3 Probe Target
744
 // G38.2 and G38.3 Probe Target
695
-// Enable PROBE_DOUBLE_TOUCH if you want G38 to double touch
745
+// Set MULTIPLE_PROBING if you want G38 to double touch
696
 //#define G38_PROBE_TARGET
746
 //#define G38_PROBE_TARGET
697
 #if ENABLED(G38_PROBE_TARGET)
747
 #if ENABLED(G38_PROBE_TARGET)
698
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
748
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
717
 // @section hidden
767
 // @section hidden
718
 
768
 
719
 // The number of linear motions that can be in the plan at any give time.
769
 // The number of linear motions that can be in the plan at any give time.
720
-// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2, i.g. 8,16,32 because shifts and ors are used to do the ring-buffering.
770
+// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2 (e.g. 8, 16, 32) because shifts and ors are used to do the ring-buffering.
721
 #if ENABLED(SDSUPPORT)
771
 #if ENABLED(SDSUPPORT)
722
   #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
772
   #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
723
 #else
773
 #else
808
 #endif
858
 #endif
809
 
859
 
810
 /**
860
 /**
861
+ * Extra Fan Speed
862
+ * Adds a secondary fan speed for each print-cooling fan.
863
+ *   'M106 P<fan> T3-255' : Set a secondary speed for <fan>
864
+ *   'M106 P<fan> T2'     : Use the set secondary speed
865
+ *   'M106 P<fan> T1'     : Restore the previous fan speed
866
+ */
867
+//#define EXTRA_FAN_SPEED
868
+
869
+/**
811
  * Advanced Pause
870
  * Advanced Pause
812
  * Experimental feature for filament change support and for parking the nozzle when paused.
871
  * Experimental feature for filament change support and for parking the nozzle when paused.
813
  * Adds the GCode M600 for initiating filament change.
872
  * Adds the GCode M600 for initiating filament change.
917
 
976
 
918
 #endif
977
 #endif
919
 
978
 
920
-// @section TMC2130
979
+// @section TMC2130, TMC2208
921
 
980
 
922
 /**
981
 /**
923
  * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
982
  * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
931
  */
990
  */
932
 //#define HAVE_TMC2130
991
 //#define HAVE_TMC2130
933
 
992
 
934
-#if ENABLED(HAVE_TMC2130)
993
+/**
994
+ * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
995
+ * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin.
996
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN
997
+ * to #_SERIAL_TX_PIN with a 1K resistor.
998
+ * The drivers can also be used with hardware serial.
999
+ *
1000
+ * You'll also need the TMC2208Stepper Arduino library
1001
+ * (https://github.com/teemuatlut/TMC2208Stepper).
1002
+ */
1003
+//#define HAVE_TMC2208
1004
+
1005
+#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
935
 
1006
 
936
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
1007
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
937
   //#define X_IS_TMC2130
1008
   //#define X_IS_TMC2130
946
   //#define E3_IS_TMC2130
1017
   //#define E3_IS_TMC2130
947
   //#define E4_IS_TMC2130
1018
   //#define E4_IS_TMC2130
948
 
1019
 
1020
+  //#define X_IS_TMC2208
1021
+  //#define X2_IS_TMC2208
1022
+  //#define Y_IS_TMC2208
1023
+  //#define Y2_IS_TMC2208
1024
+  //#define Z_IS_TMC2208
1025
+  //#define Z2_IS_TMC2208
1026
+  //#define E0_IS_TMC2208
1027
+  //#define E1_IS_TMC2208
1028
+  //#define E2_IS_TMC2208
1029
+  //#define E3_IS_TMC2208
1030
+  //#define E4_IS_TMC2208
1031
+
949
   /**
1032
   /**
950
    * Stepper driver settings
1033
    * Stepper driver settings
951
    */
1034
    */
952
 
1035
 
953
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1036
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
954
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1037
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
955
-  #define INTERPOLATE          1  // Interpolate X/Y/Z_MICROSTEPS to 256
1038
+  #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
956
 
1039
 
957
-  #define X_CURRENT         1000  // rms current in mA. Multiply by 1.41 for peak current.
1040
+  #define X_CURRENT          800  // rms current in mA. Multiply by 1.41 for peak current.
958
   #define X_MICROSTEPS        16  // 0..256
1041
   #define X_MICROSTEPS        16  // 0..256
959
 
1042
 
960
-  #define Y_CURRENT         1000
1043
+  #define Y_CURRENT          800
961
   #define Y_MICROSTEPS        16
1044
   #define Y_MICROSTEPS        16
962
 
1045
 
963
-  #define Z_CURRENT         1000
1046
+  #define Z_CURRENT          800
964
   #define Z_MICROSTEPS        16
1047
   #define Z_MICROSTEPS        16
965
 
1048
 
966
-  //#define X2_CURRENT      1000
967
-  //#define X2_MICROSTEPS     16
1049
+  #define X2_CURRENT         800
1050
+  #define X2_MICROSTEPS       16
968
 
1051
 
969
-  //#define Y2_CURRENT      1000
970
-  //#define Y2_MICROSTEPS     16
1052
+  #define Y2_CURRENT         800
1053
+  #define Y2_MICROSTEPS       16
971
 
1054
 
972
-  //#define Z2_CURRENT      1000
973
-  //#define Z2_MICROSTEPS     16
1055
+  #define Z2_CURRENT         800
1056
+  #define Z2_MICROSTEPS       16
974
 
1057
 
975
-  //#define E0_CURRENT      1000
976
-  //#define E0_MICROSTEPS     16
1058
+  #define E0_CURRENT         800
1059
+  #define E0_MICROSTEPS       16
977
 
1060
 
978
-  //#define E1_CURRENT      1000
979
-  //#define E1_MICROSTEPS     16
1061
+  #define E1_CURRENT         800
1062
+  #define E1_MICROSTEPS       16
980
 
1063
 
981
-  //#define E2_CURRENT      1000
982
-  //#define E2_MICROSTEPS     16
1064
+  #define E2_CURRENT         800
1065
+  #define E2_MICROSTEPS       16
983
 
1066
 
984
-  //#define E3_CURRENT      1000
985
-  //#define E3_MICROSTEPS     16
1067
+  #define E3_CURRENT         800
1068
+  #define E3_MICROSTEPS       16
986
 
1069
 
987
-  //#define E4_CURRENT      1000
988
-  //#define E4_MICROSTEPS     16
1070
+  #define E4_CURRENT         800
1071
+  #define E4_MICROSTEPS       16
989
 
1072
 
990
   /**
1073
   /**
991
    * Use Trinamic's ultra quiet stepping mode.
1074
    * Use Trinamic's ultra quiet stepping mode.
994
   #define STEALTHCHOP
1077
   #define STEALTHCHOP
995
 
1078
 
996
   /**
1079
   /**
997
-   * Let Marlin automatically control stepper current.
998
-   * This is still an experimental feature.
999
-   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
1000
-   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
1001
-   * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX
1080
+   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1081
+   * like overtemperature and short to ground. TMC2208 requires hardware serial.
1082
+   * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1083
+   * Other detected conditions can be used to stop the current print.
1002
    * Relevant g-codes:
1084
    * Relevant g-codes:
1003
    * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
1085
    * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
1004
-   * M906 S1 - Start adjusting current
1005
-   * M906 S0 - Stop adjusting current
1006
    * M911 - Report stepper driver overtemperature pre-warn condition.
1086
    * M911 - Report stepper driver overtemperature pre-warn condition.
1007
    * M912 - Clear stepper driver overtemperature pre-warn condition flag.
1087
    * M912 - Clear stepper driver overtemperature pre-warn condition flag.
1088
+   * M122 S0/1 - Report driver parameters (Requires TMC_DEBUG)
1008
    */
1089
    */
1009
-  //#define AUTOMATIC_CURRENT_CONTROL
1090
+  //#define MONITOR_DRIVER_STATUS
1010
 
1091
 
1011
-  #if ENABLED(AUTOMATIC_CURRENT_CONTROL)
1012
-    #define CURRENT_STEP          50  // [mA]
1013
-    #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
1092
+  #if ENABLED(MONITOR_DRIVER_STATUS)
1093
+    #define CURRENT_STEP_DOWN     50  // [mA]
1014
     #define REPORT_CURRENT_CHANGE
1094
     #define REPORT_CURRENT_CHANGE
1095
+    #define STOP_ON_ERROR
1015
   #endif
1096
   #endif
1016
 
1097
 
1017
   /**
1098
   /**
1026
   #define X2_HYBRID_THRESHOLD    100
1107
   #define X2_HYBRID_THRESHOLD    100
1027
   #define Y_HYBRID_THRESHOLD     100
1108
   #define Y_HYBRID_THRESHOLD     100
1028
   #define Y2_HYBRID_THRESHOLD    100
1109
   #define Y2_HYBRID_THRESHOLD    100
1029
-  #define Z_HYBRID_THRESHOLD       4
1030
-  #define Z2_HYBRID_THRESHOLD      4
1110
+  #define Z_HYBRID_THRESHOLD       3
1111
+  #define Z2_HYBRID_THRESHOLD      3
1031
   #define E0_HYBRID_THRESHOLD     30
1112
   #define E0_HYBRID_THRESHOLD     30
1032
   #define E1_HYBRID_THRESHOLD     30
1113
   #define E1_HYBRID_THRESHOLD     30
1033
   #define E2_HYBRID_THRESHOLD     30
1114
   #define E2_HYBRID_THRESHOLD     30
1037
   /**
1118
   /**
1038
    * Use stallGuard2 to sense an obstacle and trigger an endstop.
1119
    * Use stallGuard2 to sense an obstacle and trigger an endstop.
1039
    * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
1120
    * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
1040
-   * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal.
1121
+   * X and Y homing will always be done in spreadCycle mode.
1041
    *
1122
    *
1042
    * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
1123
    * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
1043
    * Higher values make the system LESS sensitive.
1124
    * Higher values make the system LESS sensitive.
1046
    * It is advised to set X/Y_HOME_BUMP_MM to 0.
1127
    * It is advised to set X/Y_HOME_BUMP_MM to 0.
1047
    * M914 X/Y to live tune the setting
1128
    * M914 X/Y to live tune the setting
1048
    */
1129
    */
1049
-  //#define SENSORLESS_HOMING
1130
+  //#define SENSORLESS_HOMING // TMC2130 only
1050
 
1131
 
1051
   #if ENABLED(SENSORLESS_HOMING)
1132
   #if ENABLED(SENSORLESS_HOMING)
1052
-    #define X_HOMING_SENSITIVITY  19
1053
-    #define Y_HOMING_SENSITIVITY  19
1133
+    #define X_HOMING_SENSITIVITY  8
1134
+    #define Y_HOMING_SENSITIVITY  8
1054
   #endif
1135
   #endif
1055
 
1136
 
1056
   /**
1137
   /**
1138
+   * Enable M122 debugging command for TMC stepper drivers.
1139
+   * M122 S0/1 will enable continous reporting.
1140
+   */
1141
+  //#define TMC_DEBUG
1142
+
1143
+  /**
1057
    * You can set your own advanced settings by filling in predefined functions.
1144
    * You can set your own advanced settings by filling in predefined functions.
1058
    * A list of available functions can be found on the library github page
1145
    * A list of available functions can be found on the library github page
1059
    * https://github.com/teemuatlut/TMC2130Stepper
1146
    * https://github.com/teemuatlut/TMC2130Stepper
1147
+   * https://github.com/teemuatlut/TMC2208Stepper
1060
    *
1148
    *
1061
    * Example:
1149
    * Example:
1062
-   * #define TMC2130_ADV() { \
1150
+   * #define TMC_ADV() { \
1063
    *   stepperX.diag0_temp_prewarn(1); \
1151
    *   stepperX.diag0_temp_prewarn(1); \
1064
-   *   stepperX.interpolate(0); \
1152
+   *   stepperY.interpolate(0); \
1065
    * }
1153
    * }
1066
    */
1154
    */
1067
-  #define  TMC2130_ADV() {  }
1155
+  #define  TMC_ADV() {  }
1068
 
1156
 
1069
-#endif // HAVE_TMC2130
1157
+#endif // TMC2130 || TMC2208
1070
 
1158
 
1071
 // @section L6470
1159
 // @section L6470
1072
 
1160
 
1231
 #endif
1319
 #endif
1232
 
1320
 
1233
 /**
1321
 /**
1322
+ * Filament Width Sensor
1323
+ *
1324
+ * Measures the filament width in real-time and adjusts
1325
+ * flow rate to compensate for any irregularities.
1326
+ *
1327
+ * Also allows the measured filament diameter to set the
1328
+ * extrusion rate, so the slicer only has to specify the
1329
+ * volume.
1330
+ *
1331
+ * Only a single extruder is supported at this time.
1332
+ *
1333
+ *  34 RAMPS_14    : Analog input 5 on the AUX2 connector
1334
+ *  81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
1335
+ * 301 RAMBO       : Analog input 3
1336
+ *
1337
+ * Note: May require analog pins to be defined for other boards.
1338
+ */
1339
+//#define FILAMENT_WIDTH_SENSOR
1340
+
1341
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
1342
+  #define FILAMENT_SENSOR_EXTRUDER_NUM 0    // Index of the extruder that has the filament sensor. :[0,1,2,3,4]
1343
+  #define MEASUREMENT_DELAY_CM        14    // (cm) The distance from the filament sensor to the melting chamber
1344
+
1345
+  #define MEASURED_UPPER_LIMIT         3.30 // (mm) Upper limit used to validate sensor reading
1346
+  #define MEASURED_LOWER_LIMIT         1.90 // (mm) Lower limit used to validate sensor reading
1347
+  #define MAX_MEASUREMENT_DELAY       20    // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
1348
+
1349
+  #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
1350
+
1351
+  // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
1352
+  //#define FILAMENT_LCD_DISPLAY
1353
+#endif
1354
+
1355
+/**
1356
+ * CNC Coordinate Systems
1357
+ *
1358
+ * Enables G53 and G54-G59.3 commands to select coordinate systems
1359
+ * and G92.1 to reset the workspace to native machine space.
1360
+ */
1361
+//#define CNC_COORDINATE_SYSTEMS
1362
+
1363
+/**
1234
  * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
1364
  * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
1235
  */
1365
  */
1236
 //#define PINS_DEBUGGING
1366
 //#define PINS_DEBUGGING
1421
                                          // tweaks made to the configuration are affecting the printer in real-time.
1551
                                          // tweaks made to the configuration are affecting the printer in real-time.
1422
 #endif
1552
 #endif
1423
 
1553
 
1554
+/**
1555
+ * NanoDLP Sync support
1556
+ *
1557
+ * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
1558
+ * string to enable synchronization with DLP projector exposure. This change will allow to use
1559
+ * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
1560
+ */
1561
+//#define NANODLP_Z_SYNC
1562
+#if ENABLED(NANODLP_Z_SYNC)
1563
+  //#define NANODLP_ALL_AXIS  // Enables "Z_move_comp" output on any axis move.
1564
+                              // Default behaviour is limited to Z axis only.
1565
+#endif
1566
+
1424
 #endif // CONFIGURATION_ADV_H
1567
 #endif // CONFIGURATION_ADV_H

+ 157
- 88
Marlin/example_configurations/Cartesio/Configuration.h Переглянути файл

37
  */
37
  */
38
 #ifndef CONFIGURATION_H
38
 #ifndef CONFIGURATION_H
39
 #define CONFIGURATION_H
39
 #define CONFIGURATION_H
40
-#define CONFIGURATION_H_VERSION 010100
40
+#define CONFIGURATION_H_VERSION 010107
41
 
41
 
42
 //===========================================================================
42
 //===========================================================================
43
 //============================= Getting Started =============================
43
 //============================= Getting Started =============================
137
 // :[1, 2, 3, 4, 5]
137
 // :[1, 2, 3, 4, 5]
138
 #define EXTRUDERS 3
138
 #define EXTRUDERS 3
139
 
139
 
140
+// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
141
+#define DEFAULT_NOMINAL_FILAMENT_DIA 3.0
142
+
140
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
143
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
141
 //#define SINGLENOZZLE
144
 //#define SINGLENOZZLE
142
 
145
 
337
 
340
 
338
 // Comment the following line to disable PID and enable bang-bang.
341
 // Comment the following line to disable PID and enable bang-bang.
339
 #define PIDTEMP
342
 #define PIDTEMP
340
-#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
341
-#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
343
+#define BANG_MAX 255     // Limits current to nozzle while in bang-bang mode; 255=full current
344
+#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
345
+#define PID_K1 0.95      // Smoothing factor within the PID
342
 #if ENABLED(PIDTEMP)
346
 #if ENABLED(PIDTEMP)
343
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
347
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
344
   //#define PID_DEBUG // Sends debug data to the serial port.
348
   //#define PID_DEBUG // Sends debug data to the serial port.
348
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
352
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
349
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
353
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
350
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
354
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
351
-  #define K1 0.95 //smoothing factor within the PID
352
 
355
 
353
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
356
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
354
 
357
 
427
 //===========================================================================
430
 //===========================================================================
428
 
431
 
429
 /**
432
 /**
430
- * Thermal Protection protects your printer from damage and fire if a
431
- * thermistor falls out or temperature sensors fail in any way.
433
+ * Thermal Protection provides additional protection to your printer from damage
434
+ * and fire. Marlin always includes safe min and max temperature ranges which
435
+ * protect against a broken or disconnected thermistor wire.
432
  *
436
  *
433
- * The issue: If a thermistor falls out or a temperature sensor fails,
434
- * Marlin can no longer sense the actual temperature. Since a disconnected
435
- * thermistor reads as a low temperature, the firmware will keep the heater on.
437
+ * The issue: If a thermistor falls out, it will report the much lower
438
+ * temperature of the air in the room, and the the firmware will keep
439
+ * the heater on.
436
  *
440
  *
437
  * If you get "Thermal Runaway" or "Heating failed" errors the
441
  * If you get "Thermal Runaway" or "Heating failed" errors the
438
  * details can be tuned in Configuration_adv.h
442
  * details can be tuned in Configuration_adv.h
572
 // @section probes
576
 // @section probes
573
 
577
 
574
 //
578
 //
575
-// See http://marlinfw.org/configuration/probes.html
579
+// See http://marlinfw.org/docs/configuration/probes.html
576
 //
580
 //
577
 
581
 
578
 /**
582
 /**
685
 // X and Y axis travel speed (mm/m) between probes
689
 // X and Y axis travel speed (mm/m) between probes
686
 #define XY_PROBE_SPEED 8000
690
 #define XY_PROBE_SPEED 8000
687
 
691
 
688
-// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH)
692
+// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
689
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
693
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
690
 
694
 
691
 // Speed for the "accurate" probe of each point
695
 // Speed for the "accurate" probe of each point
692
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
696
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
693
 
697
 
694
-// Use double touch for probing
695
-//#define PROBE_DOUBLE_TOUCH
698
+// The number of probes to perform at each point.
699
+//   Set to 2 for a fast/slow probe, using the second probe result.
700
+//   Set to 3 or more for slow probes, averaging the results.
701
+//#define MULTIPLE_PROBING 2
696
 
702
 
697
 /**
703
 /**
698
  * Z probes require clearance when deploying, stowing, and moving between
704
  * Z probes require clearance when deploying, stowing, and moving between
784
 #define Y_MAX_POS Y_BED_SIZE
790
 #define Y_MAX_POS Y_BED_SIZE
785
 #define Z_MAX_POS 400
791
 #define Z_MAX_POS 400
786
 
792
 
787
-// If enabled, axes won't move below MIN_POS in response to movement commands.
793
+/**
794
+ * Software Endstops
795
+ *
796
+ * - Prevent moves outside the set machine bounds.
797
+ * - Individual axes can be disabled, if desired.
798
+ * - X and Y only apply to Cartesian robots.
799
+ * - Use 'M211' to set software endstops on/off or report current state
800
+ */
801
+
802
+// Min software endstops curtail movement below minimum coordinate bounds
788
 #define MIN_SOFTWARE_ENDSTOPS
803
 #define MIN_SOFTWARE_ENDSTOPS
789
-// If enabled, axes won't move above MAX_POS in response to movement commands.
804
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
805
+  #define MIN_SOFTWARE_ENDSTOP_X
806
+  #define MIN_SOFTWARE_ENDSTOP_Y
807
+  #define MIN_SOFTWARE_ENDSTOP_Z
808
+#endif
809
+
810
+// Max software endstops curtail movement above maximum coordinate bounds
790
 #define MAX_SOFTWARE_ENDSTOPS
811
 #define MAX_SOFTWARE_ENDSTOPS
812
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
813
+  #define MAX_SOFTWARE_ENDSTOP_X
814
+  #define MAX_SOFTWARE_ENDSTOP_Y
815
+  #define MAX_SOFTWARE_ENDSTOP_Z
816
+#endif
791
 
817
 
792
 /**
818
 /**
793
  * Filament Runout Sensor
819
  * Filament Runout Sensor
807
 //===========================================================================
833
 //===========================================================================
808
 //=============================== Bed Leveling ==============================
834
 //=============================== Bed Leveling ==============================
809
 //===========================================================================
835
 //===========================================================================
810
-// @section bedlevel
836
+// @section calibrate
811
 
837
 
812
 /**
838
 /**
813
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
839
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
833
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
859
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
834
  *   A comprehensive bed leveling system combining the features and benefits
860
  *   A comprehensive bed leveling system combining the features and benefits
835
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
861
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
836
- *   Validation and Mesh Editing systems. Currently, UBL is only checked out
837
- *   for Cartesian Printers. That said, it was primarily designed to correct
838
- *   poor quality Delta Printers. If you feel adventurous and have a Delta,
839
- *   please post an issue if something doesn't work correctly. Initially,
840
- *   you will need to set a reduced bed size so you have a rectangular area
841
- *   to test on.
862
+ *   Validation and Mesh Editing systems.
842
  *
863
  *
843
  * - MESH_BED_LEVELING
864
  * - MESH_BED_LEVELING
844
  *   Probe a grid manually
865
  *   Probe a grid manually
865
   // at which point movement will be level to the machine's XY plane.
886
   // at which point movement will be level to the machine's XY plane.
866
   // The height can be set with M420 Z<height>
887
   // The height can be set with M420 Z<height>
867
   #define ENABLE_LEVELING_FADE_HEIGHT
888
   #define ENABLE_LEVELING_FADE_HEIGHT
889
+
890
+  // For Cartesian machines, instead of dividing moves on mesh boundaries,
891
+  // split up moves into short segments like a Delta. This follows the
892
+  // contours of the bed more closely than edge-to-edge straight moves.
893
+  #define SEGMENT_LEVELED_MOVES
894
+  #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)
895
+
896
+  /**
897
+   * Enable the G26 Mesh Validation Pattern tool.
898
+   */
899
+  //#define G26_MESH_VALIDATION   // Enable G26 mesh validation
900
+  #if ENABLED(G26_MESH_VALIDATION)
901
+    #define MESH_TEST_NOZZLE_SIZE     0.4   // (mm) Diameter of primary nozzle.
902
+    #define MESH_TEST_LAYER_HEIGHT    0.2   // (mm) Default layer height for the G26 Mesh Validation Tool.
903
+    #define MESH_TEST_HOTEND_TEMP   205.0   // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
904
+    #define MESH_TEST_BED_TEMP       60.0   // (°C) Default bed temperature for the G26 Mesh Validation Tool.
905
+  #endif
906
+
868
 #endif
907
 #endif
869
 
908
 
870
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
909
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
920
   //========================= Unified Bed Leveling ============================
959
   //========================= Unified Bed Leveling ============================
921
   //===========================================================================
960
   //===========================================================================
922
 
961
 
923
-  #define UBL_MESH_INSET 1          // Mesh inset margin on print area
962
+  //#define MESH_EDIT_GFX_OVERLAY   // Display a graphics overlay while editing the mesh
963
+
964
+  #define MESH_INSET 1              // Mesh inset margin on print area
924
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
965
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
925
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
966
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
926
 
967
 
931
   #define UBL_PROBE_PT_3_X 180
972
   #define UBL_PROBE_PT_3_X 180
932
   #define UBL_PROBE_PT_3_Y 20
973
   #define UBL_PROBE_PT_3_Y 20
933
 
974
 
934
-  #define UBL_G26_MESH_VALIDATION   // Enable G26 mesh validation
935
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
975
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
976
+  #define UBL_SAVE_ACTIVE_ON_M500   // Save the currently active mesh in the current slot on M500
936
 
977
 
937
 #elif ENABLED(MESH_BED_LEVELING)
978
 #elif ENABLED(MESH_BED_LEVELING)
938
 
979
 
992
 //#define Z_SAFE_HOMING
1033
 //#define Z_SAFE_HOMING
993
 
1034
 
994
 #if ENABLED(Z_SAFE_HOMING)
1035
 #if ENABLED(Z_SAFE_HOMING)
995
-  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axis (G28).
996
-  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axis (G28).
1036
+  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axes (G28).
1037
+  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axes (G28).
997
 #endif
1038
 #endif
998
 
1039
 
999
 // Homing speeds (mm/m)
1040
 // Homing speeds (mm/m)
1000
 #define HOMING_FEEDRATE_XY (50*60)
1041
 #define HOMING_FEEDRATE_XY (50*60)
1001
 #define HOMING_FEEDRATE_Z  (10*60)
1042
 #define HOMING_FEEDRATE_Z  (10*60)
1002
 
1043
 
1044
+// @section calibrate
1045
+
1046
+/**
1047
+ * Bed Skew Compensation
1048
+ *
1049
+ * This feature corrects for misalignment in the XYZ axes.
1050
+ *
1051
+ * Take the following steps to get the bed skew in the XY plane:
1052
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1053
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1054
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1055
+ *  4. For XY_SIDE_AD measure the edge A to D
1056
+ *
1057
+ * Marlin automatically computes skew factors from these measurements.
1058
+ * Skew factors may also be computed and set manually:
1059
+ *
1060
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1061
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1062
+ *
1063
+ * If desired, follow the same procedure for XZ and YZ.
1064
+ * Use these diagrams for reference:
1065
+ *
1066
+ *    Y                     Z                     Z
1067
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1068
+ *    |    /       /        |    /       /        |    /       /
1069
+ *    |   /       /         |   /       /         |   /       /
1070
+ *    |  A-------D          |  A-------D          |  A-------D
1071
+ *    +-------------->X     +-------------->X     +-------------->Y
1072
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1073
+ */
1074
+//#define SKEW_CORRECTION
1075
+
1076
+#if ENABLED(SKEW_CORRECTION)
1077
+  // Input all length measurements here:
1078
+  #define XY_DIAG_AC 282.8427124746
1079
+  #define XY_DIAG_BD 282.8427124746
1080
+  #define XY_SIDE_AD 200
1081
+
1082
+  // Or, set the default skew factors directly here
1083
+  // to override the above measurements:
1084
+  #define XY_SKEW_FACTOR 0.0
1085
+
1086
+  //#define SKEW_CORRECTION_FOR_Z
1087
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1088
+    #define XZ_DIAG_AC 282.8427124746
1089
+    #define XZ_DIAG_BD 282.8427124746
1090
+    #define YZ_DIAG_AC 282.8427124746
1091
+    #define YZ_DIAG_BD 282.8427124746
1092
+    #define YZ_SIDE_AD 200
1093
+    #define XZ_SKEW_FACTOR 0.0
1094
+    #define YZ_SKEW_FACTOR 0.0
1095
+  #endif
1096
+
1097
+  // Enable this option for M852 to set skew at runtime
1098
+  //#define SKEW_CORRECTION_GCODE
1099
+#endif
1100
+
1003
 //=============================================================================
1101
 //=============================================================================
1004
 //============================= Additional Features ===========================
1102
 //============================= Additional Features ===========================
1005
 //=============================================================================
1103
 //=============================================================================
1031
 //
1129
 //
1032
 // M100 Free Memory Watcher
1130
 // M100 Free Memory Watcher
1033
 //
1131
 //
1034
-//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
1132
+//#define M100_FREE_MEMORY_WATCHER    // Add M100 (Free Memory Watcher) to debug memory usage
1035
 
1133
 
1036
 //
1134
 //
1037
 // G20/G21 Inch mode support
1135
 // G20/G21 Inch mode support
1176
  *
1274
  *
1177
  * Select the language to display on the LCD. These languages are available:
1275
  * Select the language to display on the LCD. These languages are available:
1178
  *
1276
  *
1179
- *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, gl, hr,
1180
- *    it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1277
+ *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, fr_utf8, gl,
1278
+ *    hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1181
  *    tr, uk, zh_CN, zh_TW, test
1279
  *    tr, uk, zh_CN, zh_TW, test
1182
  *
1280
  *
1183
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1281
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1184
  */
1282
  */
1185
 #define LCD_LANGUAGE en
1283
 #define LCD_LANGUAGE en
1186
 
1284
 
1417
 #define CARTESIO_UI
1515
 #define CARTESIO_UI
1418
 
1516
 
1419
 //
1517
 //
1420
-// ANET_10 Controller supported displays.
1518
+// ANET and Tronxy Controller supported displays.
1421
 //
1519
 //
1422
-//#define ANET_KEYPAD_LCD         // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1520
+//#define ZONESTAR_LCD            // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1423
                                   // This LCD is known to be susceptible to electrical interference
1521
                                   // This LCD is known to be susceptible to electrical interference
1424
                                   // which scrambles the display.  Pressing any button clears it up.
1522
                                   // which scrambles the display.  Pressing any button clears it up.
1523
+                                  // This is a LCD2004 display with 5 analog buttons.
1524
+
1425
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1525
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1426
                                   // A clone of the RepRapDiscount full graphics display but with
1526
                                   // A clone of the RepRapDiscount full graphics display but with
1427
                                   // different pins/wiring (see pins_ANET_10.h).
1527
                                   // different pins/wiring (see pins_ANET_10.h).
1531
 //
1631
 //
1532
 //#define MKS_12864OLED
1632
 //#define MKS_12864OLED
1533
 
1633
 
1634
+// Silvergate GLCD controller
1635
+// http://github.com/android444/Silvergate
1636
+//
1637
+//#define SILVER_GATE_GLCD_CONTROLLER
1638
+
1534
 //=============================================================================
1639
 //=============================================================================
1535
 //=============================== Extra Features ==============================
1640
 //=============================== Extra Features ==============================
1536
 //=============================================================================
1641
 //=============================================================================
1587
  * Adds the M150 command to set the LED (or LED strip) color.
1692
  * Adds the M150 command to set the LED (or LED strip) color.
1588
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1693
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1589
  * luminance values can be set from 0 to 255.
1694
  * luminance values can be set from 0 to 255.
1590
- * For Neopixel LED overall brightness parameters is also available 
1695
+ * For Neopixel LED an overall brightness parameter is also available.
1591
  *
1696
  *
1592
  * *** CAUTION ***
1697
  * *** CAUTION ***
1593
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1698
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1594
  *  as the Arduino cannot handle the current the LEDs will require.
1699
  *  as the Arduino cannot handle the current the LEDs will require.
1595
  *  Failure to follow this precaution can destroy your Arduino!
1700
  *  Failure to follow this precaution can destroy your Arduino!
1596
- *  The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
1597
- *  cannot handle such current, separate 5V power supply must be used
1701
+ *  NOTE: A separate 5V power supply is required! The Neopixel LED needs
1702
+ *  more current than the Arduino 5V linear regulator can produce.
1598
  * *** CAUTION ***
1703
  * *** CAUTION ***
1599
  *
1704
  *
1600
- * LED type. This options are mutualy exclusive. Uncomment only one.
1705
+ * LED Type. Enable only one of the following two options.
1601
  *
1706
  *
1602
  */
1707
  */
1603
 //#define RGB_LED
1708
 //#define RGB_LED
1613
 // Support for Adafruit Neopixel LED driver
1718
 // Support for Adafruit Neopixel LED driver
1614
 //#define NEOPIXEL_LED
1719
 //#define NEOPIXEL_LED
1615
 #if ENABLED(NEOPIXEL_LED)
1720
 #if ENABLED(NEOPIXEL_LED)
1616
-  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
1721
+  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
1617
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1722
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1618
-  #define NEOPIXEL_PIXELS 30       // Number of LEDs on strip
1619
-  #define NEOPIXEL_IS_SEQUENTIAL   // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
1620
-  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness 0-255
1723
+  #define NEOPIXEL_PIXELS 30       // Number of LEDs in the strip
1724
+  #define NEOPIXEL_IS_SEQUENTIAL   // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
1725
+  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness (0-255)
1621
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1726
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1622
 #endif
1727
 #endif
1623
 
1728
 
1632
  *  - Change to green once print has finished
1737
  *  - Change to green once print has finished
1633
  *  - Turn off after the print has finished and the user has pushed a button
1738
  *  - Turn off after the print has finished and the user has pushed a button
1634
  */
1739
  */
1635
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED)
1740
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
1636
   #define PRINTER_EVENT_LEDS
1741
   #define PRINTER_EVENT_LEDS
1637
 #endif
1742
 #endif
1638
 
1743
 
1639
-/*********************************************************************\
1640
-* R/C SERVO support
1641
-* Sponsored by TrinityLabs, Reworked by codexmas
1642
-**********************************************************************/
1744
+/**
1745
+ * R/C SERVO support
1746
+ * Sponsored by TrinityLabs, Reworked by codexmas
1747
+ */
1643
 
1748
 
1644
-// Number of servos
1645
-//
1646
-// If you select a configuration below, this will receive a default value and does not need to be set manually
1647
-// set it manually if you have more servos than extruders and wish to manually control some
1648
-// leaving it undefined or defining as 0 will disable the servo subsystem
1649
-// If unsure, leave commented / disabled
1650
-//
1749
+/**
1750
+ * Number of servos
1751
+ *
1752
+ * For some servo-related options NUM_SERVOS will be set automatically.
1753
+ * Set this manually if there are extra servos needing manual control.
1754
+ * Leave undefined or set to 0 to entirely disable the servo subsystem.
1755
+ */
1651
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1756
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1652
 
1757
 
1653
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1758
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1660
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1765
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1661
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1766
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1662
 
1767
 
1663
-/**
1664
- * Filament Width Sensor
1665
- *
1666
- * Measures the filament width in real-time and adjusts
1667
- * flow rate to compensate for any irregularities.
1668
- *
1669
- * Also allows the measured filament diameter to set the
1670
- * extrusion rate, so the slicer only has to specify the
1671
- * volume.
1672
- *
1673
- * Only a single extruder is supported at this time.
1674
- *
1675
- *  34 RAMPS_14    : Analog input 5 on the AUX2 connector
1676
- *  81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
1677
- * 301 RAMBO       : Analog input 3
1678
- *
1679
- * Note: May require analog pins to be defined for other boards.
1680
- */
1681
-//#define FILAMENT_WIDTH_SENSOR
1682
-
1683
-#define DEFAULT_NOMINAL_FILAMENT_DIA 3.00   // (mm) Diameter of the filament generally used (3.0 or 1.75mm), also used in the slicer. Used to validate sensor reading.
1684
-
1685
-#if ENABLED(FILAMENT_WIDTH_SENSOR)
1686
-  #define FILAMENT_SENSOR_EXTRUDER_NUM 0    // Index of the extruder that has the filament sensor (0,1,2,3)
1687
-  #define MEASUREMENT_DELAY_CM        14    // (cm) The distance from the filament sensor to the melting chamber
1688
-
1689
-  #define MEASURED_UPPER_LIMIT         3.30 // (mm) Upper limit used to validate sensor reading
1690
-  #define MEASURED_LOWER_LIMIT         1.90 // (mm) Lower limit used to validate sensor reading
1691
-  #define MAX_MEASUREMENT_DELAY       20    // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
1692
-
1693
-  #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
1694
-
1695
-  // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
1696
-  //#define FILAMENT_LCD_DISPLAY
1697
-#endif
1698
-
1699
 #endif // CONFIGURATION_H
1768
 #endif // CONFIGURATION_H

+ 268
- 125
Marlin/example_configurations/Cartesio/Configuration_adv.h Переглянути файл

32
  */
32
  */
33
 #ifndef CONFIGURATION_ADV_H
33
 #ifndef CONFIGURATION_ADV_H
34
 #define CONFIGURATION_ADV_H
34
 #define CONFIGURATION_ADV_H
35
-#define CONFIGURATION_ADV_H_VERSION 010100
35
+#define CONFIGURATION_ADV_H_VERSION 010107
36
 
36
 
37
 // @section temperature
37
 // @section temperature
38
 
38
 
48
 #endif
48
 #endif
49
 
49
 
50
 /**
50
 /**
51
- * Thermal Protection protects your printer from damage and fire if a
52
- * thermistor falls out or temperature sensors fail in any way.
51
+ * Thermal Protection provides additional protection to your printer from damage
52
+ * and fire. Marlin always includes safe min and max temperature ranges which
53
+ * protect against a broken or disconnected thermistor wire.
53
  *
54
  *
54
- * The issue: If a thermistor falls out or a temperature sensor fails,
55
- * Marlin can no longer sense the actual temperature. Since a disconnected
56
- * thermistor reads as a low temperature, the firmware will keep the heater on.
55
+ * The issue: If a thermistor falls out, it will report the much lower
56
+ * temperature of the air in the room, and the the firmware will keep
57
+ * the heater on.
57
  *
58
  *
58
  * The solution: Once the temperature reaches the target, start observing.
59
  * The solution: Once the temperature reaches the target, start observing.
59
- * If the temperature stays too far below the target (hysteresis) for too long (period),
60
- * the firmware will halt the machine as a safety precaution.
60
+ * If the temperature stays too far below the target (hysteresis) for too
61
+ * long (period), the firmware will halt the machine as a safety precaution.
61
  *
62
  *
62
- * If you get false positives for "Thermal Runaway" increase THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
63
+ * If you get false positives for "Thermal Runaway", increase
64
+ * THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
63
  */
65
  */
64
 #if ENABLED(THERMAL_PROTECTION_HOTENDS)
66
 #if ENABLED(THERMAL_PROTECTION_HOTENDS)
65
   #define THERMAL_PROTECTION_PERIOD 40        // Seconds
67
   #define THERMAL_PROTECTION_PERIOD 40        // Seconds
66
   #define THERMAL_PROTECTION_HYSTERESIS 4     // Degrees Celsius
68
   #define THERMAL_PROTECTION_HYSTERESIS 4     // Degrees Celsius
67
 
69
 
68
   /**
70
   /**
69
-   * Whenever an M104 or M109 increases the target temperature the firmware will wait for the
70
-   * WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
71
-   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
72
-   * but only if the current temperature is far enough below the target for a reliable test.
71
+   * Whenever an M104, M109, or M303 increases the target temperature, the
72
+   * firmware will wait for the WATCH_TEMP_PERIOD to expire. If the temperature
73
+   * hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted and
74
+   * requires a hard reset. This test restarts with any M104/M109/M303, but only
75
+   * if the current temperature is far enough below the target for a reliable
76
+   * test.
73
    *
77
    *
74
-   * If you get false positives for "Heating failed" increase WATCH_TEMP_PERIOD and/or decrease WATCH_TEMP_INCREASE
75
-   * WATCH_TEMP_INCREASE should not be below 2.
78
+   * If you get false positives for "Heating failed", increase WATCH_TEMP_PERIOD
79
+   * and/or decrease WATCH_TEMP_INCREASE. WATCH_TEMP_INCREASE should not be set
80
+   * below 2.
76
    */
81
    */
77
   #define WATCH_TEMP_PERIOD 20                // Seconds
82
   #define WATCH_TEMP_PERIOD 20                // Seconds
78
   #define WATCH_TEMP_INCREASE 2               // Degrees Celsius
83
   #define WATCH_TEMP_INCREASE 2               // Degrees Celsius
86
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
91
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
87
 
92
 
88
   /**
93
   /**
89
-   * Whenever an M140 or M190 increases the target temperature the firmware will wait for the
90
-   * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE
91
-   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190,
92
-   * but only if the current temperature is far enough below the target for a reliable test.
93
-   *
94
-   * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease
95
-   * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.)
94
+   * As described above, except for the bed (M140/M190/M303).
96
    */
95
    */
97
   #define WATCH_BED_TEMP_PERIOD 60                // Seconds
96
   #define WATCH_BED_TEMP_PERIOD 60                // Seconds
98
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
97
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
123
   #define AUTOTEMP_OLDWEIGHT 0.98
122
   #define AUTOTEMP_OLDWEIGHT 0.98
124
 #endif
123
 #endif
125
 
124
 
125
+// Show extra position information in M114
126
+//#define M114_DETAIL
127
+
126
 // Show Temperature ADC value
128
 // Show Temperature ADC value
127
 // Enable for M105 to include ADC values read from temperature sensors.
129
 // Enable for M105 to include ADC values read from temperature sensors.
128
 //#define SHOW_TEMP_ADC_VALUES
130
 //#define SHOW_TEMP_ADC_VALUES
257
 
259
 
258
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
260
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
259
 
261
 
260
-// Dual X Steppers
261
-// Uncomment this option to drive two X axis motors.
262
-// The next unused E driver will be assigned to the second X stepper.
262
+/**
263
+ * Dual Steppers / Dual Endstops
264
+ *
265
+ * This section will allow you to use extra E drivers to drive a second motor for X, Y, or Z axes.
266
+ *
267
+ * For example, set X_DUAL_STEPPER_DRIVERS setting to use a second motor. If the motors need to
268
+ * spin in opposite directions set INVERT_X2_VS_X_DIR. If the second motor needs its own endstop
269
+ * set X_DUAL_ENDSTOPS. This can adjust for "racking." Use X2_USE_ENDSTOP to set the endstop plug
270
+ * that should be used for the second endstop. Extra endstops will appear in the output of 'M119'.
271
+ *
272
+ * Use X_DUAL_ENDSTOP_ADJUSTMENT to adjust for mechanical imperfection. After homing both motors
273
+ * this offset is applied to the X2 motor. To find the offset home the X axis, and measure the error
274
+ * in X2. Dual endstop offsets can be set at runtime with 'M666 X<offset> Y<offset> Z<offset>'.
275
+ */
276
+
263
 //#define X_DUAL_STEPPER_DRIVERS
277
 //#define X_DUAL_STEPPER_DRIVERS
264
 #if ENABLED(X_DUAL_STEPPER_DRIVERS)
278
 #if ENABLED(X_DUAL_STEPPER_DRIVERS)
265
-  // Set true if the two X motors need to rotate in opposite directions
266
-  #define INVERT_X2_VS_X_DIR true
279
+  #define INVERT_X2_VS_X_DIR true   // Set 'true' if X motors should rotate in opposite directions
280
+  //#define X_DUAL_ENDSTOPS
281
+  #if ENABLED(X_DUAL_ENDSTOPS)
282
+    #define X2_USE_ENDSTOP _XMAX_
283
+    #define X_DUAL_ENDSTOPS_ADJUSTMENT  0
284
+  #endif
267
 #endif
285
 #endif
268
 
286
 
269
-// Dual Y Steppers
270
-// Uncomment this option to drive two Y axis motors.
271
-// The next unused E driver will be assigned to the second Y stepper.
272
 //#define Y_DUAL_STEPPER_DRIVERS
287
 //#define Y_DUAL_STEPPER_DRIVERS
273
 #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
288
 #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
274
-  // Set true if the two Y motors need to rotate in opposite directions
275
-  #define INVERT_Y2_VS_Y_DIR true
289
+  #define INVERT_Y2_VS_Y_DIR true   // Set 'true' if Y motors should rotate in opposite directions
290
+  //#define Y_DUAL_ENDSTOPS
291
+  #if ENABLED(Y_DUAL_ENDSTOPS)
292
+    #define Y2_USE_ENDSTOP _YMAX_
293
+    #define Y_DUAL_ENDSTOPS_ADJUSTMENT  0
294
+  #endif
276
 #endif
295
 #endif
277
 
296
 
278
-// A single Z stepper driver is usually used to drive 2 stepper motors.
279
-// Uncomment this option to use a separate stepper driver for each Z axis motor.
280
-// The next unused E driver will be assigned to the second Z stepper.
281
 //#define Z_DUAL_STEPPER_DRIVERS
297
 //#define Z_DUAL_STEPPER_DRIVERS
282
-
283
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
298
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
284
-
285
-  // Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper.
286
-  // That way the machine is capable to align the bed during home, since both Z steppers are homed.
287
-  // There is also an implementation of M666 (software endstops adjustment) to this feature.
288
-  // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed.
289
-  // One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2.
290
-  // If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive.
291
-  // Play a little bit with small adjustments (0.5mm) and check the behaviour.
292
-  // The M119 (endstops report) will start reporting the Z2 Endstop as well.
293
-
294
   //#define Z_DUAL_ENDSTOPS
299
   //#define Z_DUAL_ENDSTOPS
295
-
296
   #if ENABLED(Z_DUAL_ENDSTOPS)
300
   #if ENABLED(Z_DUAL_ENDSTOPS)
297
     #define Z2_USE_ENDSTOP _XMAX_
301
     #define Z2_USE_ENDSTOP _XMAX_
298
-    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0  // Use M666 to determine/test this value
302
+    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0
299
   #endif
303
   #endif
300
-
301
-#endif // Z_DUAL_STEPPER_DRIVERS
304
+#endif
302
 
305
 
303
 // Enable this for dual x-carriage printers.
306
 // Enable this for dual x-carriage printers.
304
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
307
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
345
 
348
 
346
 // @section homing
349
 // @section homing
347
 
350
 
348
-//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
351
+// Homing hits each endstop, retracts by these distances, then does a slower bump.
349
 #define X_HOME_BUMP_MM 5
352
 #define X_HOME_BUMP_MM 5
350
 #define Y_HOME_BUMP_MM 5
353
 #define Y_HOME_BUMP_MM 5
351
 #define Z_HOME_BUMP_MM 2
354
 #define Z_HOME_BUMP_MM 2
352
-#define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
353
-//#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
355
+#define HOMING_BUMP_DIVISOR { 2, 2, 4 }  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
356
+//#define QUICK_HOME                     // If homing includes X and Y, do a diagonal move initially
354
 
357
 
355
 // When G28 is called, this option will make Y home before X
358
 // When G28 is called, this option will make Y home before X
356
 #define HOME_Y_BEFORE_X
359
 #define HOME_Y_BEFORE_X
434
 //#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 }   // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
437
 //#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 }   // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
435
 //#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 }    // Default drive percent - X, Y, Z, E axis
438
 //#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 }    // Default drive percent - X, Y, Z, E axis
436
 
439
 
437
-// Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
440
+// Use an I2C based DIGIPOT (e.g., Azteeg X3 Pro)
438
 //#define DIGIPOT_I2C
441
 //#define DIGIPOT_I2C
442
+#if ENABLED(DIGIPOT_I2C) && !defined(DIGIPOT_I2C_ADDRESS_A)
443
+  /**
444
+   * Common slave addresses:
445
+   *
446
+   *                    A   (A shifted)   B   (B shifted)  IC
447
+   * Smoothie          0x2C (0x58)       0x2D (0x5A)       MCP4451
448
+   * AZTEEG_X3_PRO     0x2C (0x58)       0x2E (0x5C)       MCP4451
449
+   * MIGHTYBOARD_REVE  0x2F (0x5E)                         MCP4018
450
+   */
451
+  #define DIGIPOT_I2C_ADDRESS_A 0x2C  // unshifted slave address for first DIGIPOT
452
+  #define DIGIPOT_I2C_ADDRESS_B 0x2D  // unshifted slave address for second DIGIPOT
453
+#endif
454
+
439
 //#define DIGIPOT_MCP4018          // Requires library from https://github.com/stawel/SlowSoftI2CMaster
455
 //#define DIGIPOT_MCP4018          // Requires library from https://github.com/stawel/SlowSoftI2CMaster
440
 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4     AZTEEG_X3_PRO: 8
456
 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4     AZTEEG_X3_PRO: 8
441
 // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
457
 // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
466
 // The timeout (in ms) to return to the status screen from sub-menus
482
 // The timeout (in ms) to return to the status screen from sub-menus
467
 //#define LCD_TIMEOUT_TO_STATUS 15000
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
468
 
484
 
485
+/**
486
+ * LED Control Menu
487
+ * Enable this feature to add LED Control to the LCD menu
488
+ */
489
+//#define LED_CONTROL_MENU
490
+#if ENABLED(LED_CONTROL_MENU)
491
+  #define LED_COLOR_PRESETS                 // Enable the Preset Color menu option
492
+  #if ENABLED(LED_COLOR_PRESETS)
493
+    #define LED_USER_PRESET_RED        255  // User defined RED value
494
+    #define LED_USER_PRESET_GREEN      128  // User defined GREEN value
495
+    #define LED_USER_PRESET_BLUE         0  // User defined BLUE value
496
+    #define LED_USER_PRESET_WHITE      255  // User defined WHITE value
497
+    #define LED_USER_PRESET_BRIGHTNESS 255  // User defined intensity
498
+    //#define LED_USER_PRESET_STARTUP       // Have the printer display the user preset color on startup
499
+  #endif
500
+#endif // LED_CONTROL_MENU
501
+
469
 #if ENABLED(SDSUPPORT)
502
 #if ENABLED(SDSUPPORT)
470
 
503
 
471
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
504
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
475
   // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
508
   // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
476
   #define SD_DETECT_INVERTED
509
   #define SD_DETECT_INVERTED
477
 
510
 
478
-  #define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
511
+  #define SD_FINISHED_STEPPERRELEASE true          // Disable steppers when SD Print is finished
479
   #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
512
   #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
480
 
513
 
481
-  #define SDCARD_RATHERRECENTFIRST  //reverse file order of sd card menu display. Its sorted practically after the file system block order.
482
-  // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that.
483
-  // using:
514
+  // Reverse SD sort to show "more recent" files first, according to the card's FAT.
515
+  // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended.
516
+  #define SDCARD_RATHERRECENTFIRST
517
+
518
+  // Add an option in the menu to run all auto#.g files
484
   //#define MENU_ADDAUTOSTART
519
   //#define MENU_ADDAUTOSTART
485
 
520
 
486
   /**
521
   /**
517
     #define SDSORT_USES_STACK  false  // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
552
     #define SDSORT_USES_STACK  false  // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
518
     #define SDSORT_CACHE_NAMES false  // Keep sorted items in RAM longer for speedy performance. Most expensive option.
553
     #define SDSORT_CACHE_NAMES false  // Keep sorted items in RAM longer for speedy performance. Most expensive option.
519
     #define SDSORT_DYNAMIC_RAM false  // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
554
     #define SDSORT_DYNAMIC_RAM false  // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
555
+    #define SDSORT_CACHE_VFATS 2      // Maximum number of 13-byte VFAT entries to use for sorting.
556
+                                      // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM.
520
   #endif
557
   #endif
521
 
558
 
522
   // Show a progress bar on HD44780 LCDs for SD printing
559
   // Show a progress bar on HD44780 LCDs for SD printing
535
     //#define LCD_PROGRESS_BAR_TEST
572
     //#define LCD_PROGRESS_BAR_TEST
536
   #endif
573
   #endif
537
 
574
 
575
+  // Add an 'M73' G-code to set the current percentage
576
+  //#define LCD_SET_PROGRESS_MANUALLY
577
+
538
   // This allows hosts to request long names for files and folders with M33
578
   // This allows hosts to request long names for files and folders with M33
539
   //#define LONG_FILENAME_HOST_SUPPORT
579
   //#define LONG_FILENAME_HOST_SUPPORT
540
 
580
 
541
-  // This option allows you to abort SD printing when any endstop is triggered.
542
-  // This feature must be enabled with "M540 S1" or from the LCD menu.
543
-  // To have any effect, endstops must be enabled during SD printing.
581
+  // Enable this option to scroll long filenames in the SD card menu
582
+  //#define SCROLL_LONG_FILENAMES
583
+
584
+  /**
585
+   * This option allows you to abort SD printing when any endstop is triggered.
586
+   * This feature must be enabled with "M540 S1" or from the LCD menu.
587
+   * To have any effect, endstops must be enabled during SD printing.
588
+   */
544
   //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
589
   //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
545
 
590
 
591
+  /**
592
+   * This option makes it easier to print the same SD Card file again.
593
+   * On print completion the LCD Menu will open with the file selected.
594
+   * You can just click to start the print, or navigate elsewhere.
595
+   */
596
+  //#define SD_REPRINT_LAST_SELECTED_FILE
597
+
546
 #endif // SDSUPPORT
598
 #endif // SDSUPPORT
547
 
599
 
548
 /**
600
 /**
575
   // Enable this option and reduce the value to optimize screen updates.
627
   // Enable this option and reduce the value to optimize screen updates.
576
   // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
628
   // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
577
   //#define DOGM_SPI_DELAY_US 5
629
   //#define DOGM_SPI_DELAY_US 5
630
+
631
+  // Swap the CW/CCW indicators in the graphics overlay
632
+  //#define OVERLAY_GFX_REVERSE
633
+
578
 #endif // DOGLCD
634
 #endif // DOGLCD
579
 
635
 
580
 // @section safety
636
 // @section safety
603
 #if ENABLED(BABYSTEPPING)
659
 #if ENABLED(BABYSTEPPING)
604
   //#define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
660
   //#define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
605
   #define BABYSTEP_INVERT_Z false    // Change if Z babysteps should go the other way
661
   #define BABYSTEP_INVERT_Z false    // Change if Z babysteps should go the other way
606
-  #define BABYSTEP_MULTIPLICATOR 100 // Babysteps are very small. Increase for faster motion.
662
+  #define BABYSTEP_MULTIPLICATOR 1   // Babysteps are very small. Increase for faster motion.
607
   //#define BABYSTEP_ZPROBE_OFFSET   // Enable to combine M851 and Babystepping
663
   //#define BABYSTEP_ZPROBE_OFFSET   // Enable to combine M851 and Babystepping
608
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
664
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
609
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
665
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
610
                                         // Note: Extra time may be added to mitigate controller latency.
666
                                         // Note: Extra time may be added to mitigate controller latency.
611
   //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
667
   //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
612
-  //#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators
613
 #endif
668
 #endif
614
 
669
 
615
 // @section extruder
670
 // @section extruder
656
 
711
 
657
 // @section leveling
712
 // @section leveling
658
 
713
 
659
-// Default mesh area is an area with an inset margin on the print area.
660
-// Below are the macros that are used to define the borders for the mesh area,
661
-// made available here for specialized needs, ie dual extruder setup.
662
-#if ENABLED(MESH_BED_LEVELING)
663
-  #define MESH_MIN_X MESH_INSET
664
-  #define MESH_MAX_X (X_BED_SIZE - (MESH_INSET))
665
-  #define MESH_MIN_Y MESH_INSET
666
-  #define MESH_MAX_Y (Y_BED_SIZE - (MESH_INSET))
667
-#elif ENABLED(AUTO_BED_LEVELING_UBL)
668
-  #define UBL_MESH_MIN_X UBL_MESH_INSET
669
-  #define UBL_MESH_MAX_X (X_BED_SIZE - (UBL_MESH_INSET))
670
-  #define UBL_MESH_MIN_Y UBL_MESH_INSET
671
-  #define UBL_MESH_MAX_Y (Y_BED_SIZE - (UBL_MESH_INSET))
672
-
673
-  // If this is defined, the currently active mesh will be saved in the
674
-  // current slot on M500.
675
-  #define UBL_SAVE_ACTIVE_ON_M500
714
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
715
+  #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
716
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
717
+  #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
718
+#endif
719
+
720
+#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL)
721
+  // Override the mesh area if the automatic (max) area is too large
722
+  //#define MESH_MIN_X MESH_INSET
723
+  //#define MESH_MIN_Y MESH_INSET
724
+  //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET)
725
+  //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
676
 #endif
726
 #endif
677
 
727
 
678
 // @section extras
728
 // @section extras
692
 //#define BEZIER_CURVE_SUPPORT
742
 //#define BEZIER_CURVE_SUPPORT
693
 
743
 
694
 // G38.2 and G38.3 Probe Target
744
 // G38.2 and G38.3 Probe Target
695
-// Enable PROBE_DOUBLE_TOUCH if you want G38 to double touch
745
+// Set MULTIPLE_PROBING if you want G38 to double touch
696
 //#define G38_PROBE_TARGET
746
 //#define G38_PROBE_TARGET
697
 #if ENABLED(G38_PROBE_TARGET)
747
 #if ENABLED(G38_PROBE_TARGET)
698
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
748
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
717
 // @section hidden
767
 // @section hidden
718
 
768
 
719
 // The number of linear motions that can be in the plan at any give time.
769
 // The number of linear motions that can be in the plan at any give time.
720
-// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2, i.g. 8,16,32 because shifts and ors are used to do the ring-buffering.
770
+// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2 (e.g. 8, 16, 32) because shifts and ors are used to do the ring-buffering.
721
 #if ENABLED(SDSUPPORT)
771
 #if ENABLED(SDSUPPORT)
722
   #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
772
   #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
723
 #else
773
 #else
808
 #endif
858
 #endif
809
 
859
 
810
 /**
860
 /**
861
+ * Extra Fan Speed
862
+ * Adds a secondary fan speed for each print-cooling fan.
863
+ *   'M106 P<fan> T3-255' : Set a secondary speed for <fan>
864
+ *   'M106 P<fan> T2'     : Use the set secondary speed
865
+ *   'M106 P<fan> T1'     : Restore the previous fan speed
866
+ */
867
+//#define EXTRA_FAN_SPEED
868
+
869
+/**
811
  * Advanced Pause
870
  * Advanced Pause
812
  * Experimental feature for filament change support and for parking the nozzle when paused.
871
  * Experimental feature for filament change support and for parking the nozzle when paused.
813
  * Adds the GCode M600 for initiating filament change.
872
  * Adds the GCode M600 for initiating filament change.
917
 
976
 
918
 #endif
977
 #endif
919
 
978
 
920
-// @section TMC2130
979
+// @section TMC2130, TMC2208
921
 
980
 
922
 /**
981
 /**
923
  * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
982
  * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
931
  */
990
  */
932
 //#define HAVE_TMC2130
991
 //#define HAVE_TMC2130
933
 
992
 
934
-#if ENABLED(HAVE_TMC2130)
993
+/**
994
+ * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
995
+ * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin.
996
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN
997
+ * to #_SERIAL_TX_PIN with a 1K resistor.
998
+ * The drivers can also be used with hardware serial.
999
+ *
1000
+ * You'll also need the TMC2208Stepper Arduino library
1001
+ * (https://github.com/teemuatlut/TMC2208Stepper).
1002
+ */
1003
+//#define HAVE_TMC2208
1004
+
1005
+#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
935
 
1006
 
936
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
1007
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
937
   //#define X_IS_TMC2130
1008
   //#define X_IS_TMC2130
946
   //#define E3_IS_TMC2130
1017
   //#define E3_IS_TMC2130
947
   //#define E4_IS_TMC2130
1018
   //#define E4_IS_TMC2130
948
 
1019
 
1020
+  //#define X_IS_TMC2208
1021
+  //#define X2_IS_TMC2208
1022
+  //#define Y_IS_TMC2208
1023
+  //#define Y2_IS_TMC2208
1024
+  //#define Z_IS_TMC2208
1025
+  //#define Z2_IS_TMC2208
1026
+  //#define E0_IS_TMC2208
1027
+  //#define E1_IS_TMC2208
1028
+  //#define E2_IS_TMC2208
1029
+  //#define E3_IS_TMC2208
1030
+  //#define E4_IS_TMC2208
1031
+
949
   /**
1032
   /**
950
    * Stepper driver settings
1033
    * Stepper driver settings
951
    */
1034
    */
952
 
1035
 
953
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1036
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
954
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1037
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
955
-  #define INTERPOLATE          1  // Interpolate X/Y/Z_MICROSTEPS to 256
1038
+  #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
956
 
1039
 
957
-  #define X_CURRENT         1000  // rms current in mA. Multiply by 1.41 for peak current.
1040
+  #define X_CURRENT          800  // rms current in mA. Multiply by 1.41 for peak current.
958
   #define X_MICROSTEPS        16  // 0..256
1041
   #define X_MICROSTEPS        16  // 0..256
959
 
1042
 
960
-  #define Y_CURRENT         1000
1043
+  #define Y_CURRENT          800
961
   #define Y_MICROSTEPS        16
1044
   #define Y_MICROSTEPS        16
962
 
1045
 
963
-  #define Z_CURRENT         1000
1046
+  #define Z_CURRENT          800
964
   #define Z_MICROSTEPS        16
1047
   #define Z_MICROSTEPS        16
965
 
1048
 
966
-  //#define X2_CURRENT      1000
967
-  //#define X2_MICROSTEPS     16
1049
+  #define X2_CURRENT         800
1050
+  #define X2_MICROSTEPS       16
968
 
1051
 
969
-  //#define Y2_CURRENT      1000
970
-  //#define Y2_MICROSTEPS     16
1052
+  #define Y2_CURRENT         800
1053
+  #define Y2_MICROSTEPS       16
971
 
1054
 
972
-  //#define Z2_CURRENT      1000
973
-  //#define Z2_MICROSTEPS     16
1055
+  #define Z2_CURRENT         800
1056
+  #define Z2_MICROSTEPS       16
974
 
1057
 
975
-  //#define E0_CURRENT      1000
976
-  //#define E0_MICROSTEPS     16
1058
+  #define E0_CURRENT         800
1059
+  #define E0_MICROSTEPS       16
977
 
1060
 
978
-  //#define E1_CURRENT      1000
979
-  //#define E1_MICROSTEPS     16
1061
+  #define E1_CURRENT         800
1062
+  #define E1_MICROSTEPS       16
980
 
1063
 
981
-  //#define E2_CURRENT      1000
982
-  //#define E2_MICROSTEPS     16
1064
+  #define E2_CURRENT         800
1065
+  #define E2_MICROSTEPS       16
983
 
1066
 
984
-  //#define E3_CURRENT      1000
985
-  //#define E3_MICROSTEPS     16
1067
+  #define E3_CURRENT         800
1068
+  #define E3_MICROSTEPS       16
986
 
1069
 
987
-  //#define E4_CURRENT      1000
988
-  //#define E4_MICROSTEPS     16
1070
+  #define E4_CURRENT         800
1071
+  #define E4_MICROSTEPS       16
989
 
1072
 
990
   /**
1073
   /**
991
    * Use Trinamic's ultra quiet stepping mode.
1074
    * Use Trinamic's ultra quiet stepping mode.
994
   #define STEALTHCHOP
1077
   #define STEALTHCHOP
995
 
1078
 
996
   /**
1079
   /**
997
-   * Let Marlin automatically control stepper current.
998
-   * This is still an experimental feature.
999
-   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
1000
-   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
1001
-   * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX
1080
+   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1081
+   * like overtemperature and short to ground. TMC2208 requires hardware serial.
1082
+   * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1083
+   * Other detected conditions can be used to stop the current print.
1002
    * Relevant g-codes:
1084
    * Relevant g-codes:
1003
    * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
1085
    * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
1004
-   * M906 S1 - Start adjusting current
1005
-   * M906 S0 - Stop adjusting current
1006
    * M911 - Report stepper driver overtemperature pre-warn condition.
1086
    * M911 - Report stepper driver overtemperature pre-warn condition.
1007
    * M912 - Clear stepper driver overtemperature pre-warn condition flag.
1087
    * M912 - Clear stepper driver overtemperature pre-warn condition flag.
1088
+   * M122 S0/1 - Report driver parameters (Requires TMC_DEBUG)
1008
    */
1089
    */
1009
-  //#define AUTOMATIC_CURRENT_CONTROL
1090
+  //#define MONITOR_DRIVER_STATUS
1010
 
1091
 
1011
-  #if ENABLED(AUTOMATIC_CURRENT_CONTROL)
1012
-    #define CURRENT_STEP          50  // [mA]
1013
-    #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
1092
+  #if ENABLED(MONITOR_DRIVER_STATUS)
1093
+    #define CURRENT_STEP_DOWN     50  // [mA]
1014
     #define REPORT_CURRENT_CHANGE
1094
     #define REPORT_CURRENT_CHANGE
1095
+    #define STOP_ON_ERROR
1015
   #endif
1096
   #endif
1016
 
1097
 
1017
   /**
1098
   /**
1026
   #define X2_HYBRID_THRESHOLD    100
1107
   #define X2_HYBRID_THRESHOLD    100
1027
   #define Y_HYBRID_THRESHOLD     100
1108
   #define Y_HYBRID_THRESHOLD     100
1028
   #define Y2_HYBRID_THRESHOLD    100
1109
   #define Y2_HYBRID_THRESHOLD    100
1029
-  #define Z_HYBRID_THRESHOLD       4
1030
-  #define Z2_HYBRID_THRESHOLD      4
1110
+  #define Z_HYBRID_THRESHOLD       3
1111
+  #define Z2_HYBRID_THRESHOLD      3
1031
   #define E0_HYBRID_THRESHOLD     30
1112
   #define E0_HYBRID_THRESHOLD     30
1032
   #define E1_HYBRID_THRESHOLD     30
1113
   #define E1_HYBRID_THRESHOLD     30
1033
   #define E2_HYBRID_THRESHOLD     30
1114
   #define E2_HYBRID_THRESHOLD     30
1037
   /**
1118
   /**
1038
    * Use stallGuard2 to sense an obstacle and trigger an endstop.
1119
    * Use stallGuard2 to sense an obstacle and trigger an endstop.
1039
    * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
1120
    * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
1040
-   * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal.
1121
+   * X and Y homing will always be done in spreadCycle mode.
1041
    *
1122
    *
1042
    * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
1123
    * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
1043
    * Higher values make the system LESS sensitive.
1124
    * Higher values make the system LESS sensitive.
1046
    * It is advised to set X/Y_HOME_BUMP_MM to 0.
1127
    * It is advised to set X/Y_HOME_BUMP_MM to 0.
1047
    * M914 X/Y to live tune the setting
1128
    * M914 X/Y to live tune the setting
1048
    */
1129
    */
1049
-  //#define SENSORLESS_HOMING
1130
+  //#define SENSORLESS_HOMING // TMC2130 only
1050
 
1131
 
1051
   #if ENABLED(SENSORLESS_HOMING)
1132
   #if ENABLED(SENSORLESS_HOMING)
1052
-    #define X_HOMING_SENSITIVITY  19
1053
-    #define Y_HOMING_SENSITIVITY  19
1133
+    #define X_HOMING_SENSITIVITY  8
1134
+    #define Y_HOMING_SENSITIVITY  8
1054
   #endif
1135
   #endif
1055
 
1136
 
1056
   /**
1137
   /**
1138
+   * Enable M122 debugging command for TMC stepper drivers.
1139
+   * M122 S0/1 will enable continous reporting.
1140
+   */
1141
+  //#define TMC_DEBUG
1142
+
1143
+  /**
1057
    * You can set your own advanced settings by filling in predefined functions.
1144
    * You can set your own advanced settings by filling in predefined functions.
1058
    * A list of available functions can be found on the library github page
1145
    * A list of available functions can be found on the library github page
1059
    * https://github.com/teemuatlut/TMC2130Stepper
1146
    * https://github.com/teemuatlut/TMC2130Stepper
1147
+   * https://github.com/teemuatlut/TMC2208Stepper
1060
    *
1148
    *
1061
    * Example:
1149
    * Example:
1062
-   * #define TMC2130_ADV() { \
1150
+   * #define TMC_ADV() { \
1063
    *   stepperX.diag0_temp_prewarn(1); \
1151
    *   stepperX.diag0_temp_prewarn(1); \
1064
-   *   stepperX.interpolate(0); \
1152
+   *   stepperY.interpolate(0); \
1065
    * }
1153
    * }
1066
    */
1154
    */
1067
-  #define  TMC2130_ADV() {  }
1155
+  #define  TMC_ADV() {  }
1068
 
1156
 
1069
-#endif // HAVE_TMC2130
1157
+#endif // TMC2130 || TMC2208
1070
 
1158
 
1071
 // @section L6470
1159
 // @section L6470
1072
 
1160
 
1231
 #endif
1319
 #endif
1232
 
1320
 
1233
 /**
1321
 /**
1322
+ * Filament Width Sensor
1323
+ *
1324
+ * Measures the filament width in real-time and adjusts
1325
+ * flow rate to compensate for any irregularities.
1326
+ *
1327
+ * Also allows the measured filament diameter to set the
1328
+ * extrusion rate, so the slicer only has to specify the
1329
+ * volume.
1330
+ *
1331
+ * Only a single extruder is supported at this time.
1332
+ *
1333
+ *  34 RAMPS_14    : Analog input 5 on the AUX2 connector
1334
+ *  81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
1335
+ * 301 RAMBO       : Analog input 3
1336
+ *
1337
+ * Note: May require analog pins to be defined for other boards.
1338
+ */
1339
+//#define FILAMENT_WIDTH_SENSOR
1340
+
1341
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
1342
+  #define FILAMENT_SENSOR_EXTRUDER_NUM 0    // Index of the extruder that has the filament sensor. :[0,1,2,3,4]
1343
+  #define MEASUREMENT_DELAY_CM        14    // (cm) The distance from the filament sensor to the melting chamber
1344
+
1345
+  #define MEASURED_UPPER_LIMIT         3.30 // (mm) Upper limit used to validate sensor reading
1346
+  #define MEASURED_LOWER_LIMIT         1.90 // (mm) Lower limit used to validate sensor reading
1347
+  #define MAX_MEASUREMENT_DELAY       20    // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
1348
+
1349
+  #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
1350
+
1351
+  // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
1352
+  //#define FILAMENT_LCD_DISPLAY
1353
+#endif
1354
+
1355
+/**
1356
+ * CNC Coordinate Systems
1357
+ *
1358
+ * Enables G53 and G54-G59.3 commands to select coordinate systems
1359
+ * and G92.1 to reset the workspace to native machine space.
1360
+ */
1361
+//#define CNC_COORDINATE_SYSTEMS
1362
+
1363
+/**
1234
  * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
1364
  * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
1235
  */
1365
  */
1236
 //#define PINS_DEBUGGING
1366
 //#define PINS_DEBUGGING
1421
                                          // tweaks made to the configuration are affecting the printer in real-time.
1551
                                          // tweaks made to the configuration are affecting the printer in real-time.
1422
 #endif
1552
 #endif
1423
 
1553
 
1554
+/**
1555
+ * NanoDLP Sync support
1556
+ *
1557
+ * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
1558
+ * string to enable synchronization with DLP projector exposure. This change will allow to use
1559
+ * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
1560
+ */
1561
+//#define NANODLP_Z_SYNC
1562
+#if ENABLED(NANODLP_Z_SYNC)
1563
+  //#define NANODLP_ALL_AXIS  // Enables "Z_move_comp" output on any axis move.
1564
+                              // Default behaviour is limited to Z axis only.
1565
+#endif
1566
+
1424
 #endif // CONFIGURATION_ADV_H
1567
 #endif // CONFIGURATION_ADV_H

+ 159
- 92
Marlin/example_configurations/Creality/CR-10/Configuration.h Переглянути файл

37
  */
37
  */
38
 #ifndef CONFIGURATION_H
38
 #ifndef CONFIGURATION_H
39
 #define CONFIGURATION_H
39
 #define CONFIGURATION_H
40
-#define CONFIGURATION_H_VERSION 010100
40
+#define CONFIGURATION_H_VERSION 010107
41
 
41
 
42
 //===========================================================================
42
 //===========================================================================
43
 //============================= Getting Started =============================
43
 //============================= Getting Started =============================
136
 // :[1, 2, 3, 4, 5]
136
 // :[1, 2, 3, 4, 5]
137
 #define EXTRUDERS 1
137
 #define EXTRUDERS 1
138
 
138
 
139
+// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
140
+#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75
141
+
139
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
142
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
140
 //#define SINGLENOZZLE
143
 //#define SINGLENOZZLE
141
 
144
 
336
 
339
 
337
 // Comment the following line to disable PID and enable bang-bang.
340
 // Comment the following line to disable PID and enable bang-bang.
338
 #define PIDTEMP
341
 #define PIDTEMP
339
-#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
340
-#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
342
+#define BANG_MAX 255     // Limits current to nozzle while in bang-bang mode; 255=full current
343
+#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
344
+#define PID_K1 0.95      // Smoothing factor within the PID
341
 #if ENABLED(PIDTEMP)
345
 #if ENABLED(PIDTEMP)
342
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
346
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
343
   //#define PID_DEBUG // Sends debug data to the serial port.
347
   //#define PID_DEBUG // Sends debug data to the serial port.
347
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
351
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
348
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
352
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
349
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
353
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
350
-  #define K1 0.95 //smoothing factor within the PID
351
 
354
 
352
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
355
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
353
 
356
 
438
 //===========================================================================
441
 //===========================================================================
439
 
442
 
440
 /**
443
 /**
441
- * Thermal Protection protects your printer from damage and fire if a
442
- * thermistor falls out or temperature sensors fail in any way.
444
+ * Thermal Protection provides additional protection to your printer from damage
445
+ * and fire. Marlin always includes safe min and max temperature ranges which
446
+ * protect against a broken or disconnected thermistor wire.
443
  *
447
  *
444
- * The issue: If a thermistor falls out or a temperature sensor fails,
445
- * Marlin can no longer sense the actual temperature. Since a disconnected
446
- * thermistor reads as a low temperature, the firmware will keep the heater on.
448
+ * The issue: If a thermistor falls out, it will report the much lower
449
+ * temperature of the air in the room, and the the firmware will keep
450
+ * the heater on.
447
  *
451
  *
448
  * If you get "Thermal Runaway" or "Heating failed" errors the
452
  * If you get "Thermal Runaway" or "Heating failed" errors the
449
  * details can be tuned in Configuration_adv.h
453
  * details can be tuned in Configuration_adv.h
583
 // @section probes
587
 // @section probes
584
 
588
 
585
 //
589
 //
586
-// See http://marlinfw.org/configuration/probes.html
590
+// See http://marlinfw.org/docs/configuration/probes.html
587
 //
591
 //
588
 
592
 
589
 /**
593
 /**
696
 // X and Y axis travel speed (mm/m) between probes
700
 // X and Y axis travel speed (mm/m) between probes
697
 #define XY_PROBE_SPEED 8000
701
 #define XY_PROBE_SPEED 8000
698
 
702
 
699
-// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH)
703
+// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
700
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
704
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
701
 
705
 
702
 // Speed for the "accurate" probe of each point
706
 // Speed for the "accurate" probe of each point
703
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
707
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
704
 
708
 
705
-// Use double touch for probing
706
-//#define PROBE_DOUBLE_TOUCH
709
+// The number of probes to perform at each point.
710
+//   Set to 2 for a fast/slow probe, using the second probe result.
711
+//   Set to 3 or more for slow probes, averaging the results.
712
+//#define MULTIPLE_PROBING 2
707
 
713
 
708
 /**
714
 /**
709
  * Z probes require clearance when deploying, stowing, and moving between
715
  * Z probes require clearance when deploying, stowing, and moving between
795
 #define Y_MAX_POS Y_BED_SIZE
801
 #define Y_MAX_POS Y_BED_SIZE
796
 #define Z_MAX_POS 400
802
 #define Z_MAX_POS 400
797
 
803
 
798
-// If enabled, axes won't move below MIN_POS in response to movement commands.
804
+/**
805
+ * Software Endstops
806
+ *
807
+ * - Prevent moves outside the set machine bounds.
808
+ * - Individual axes can be disabled, if desired.
809
+ * - X and Y only apply to Cartesian robots.
810
+ * - Use 'M211' to set software endstops on/off or report current state
811
+ */
812
+
813
+// Min software endstops curtail movement below minimum coordinate bounds
799
 #define MIN_SOFTWARE_ENDSTOPS
814
 #define MIN_SOFTWARE_ENDSTOPS
800
-// If enabled, axes won't move above MAX_POS in response to movement commands.
815
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
816
+  #define MIN_SOFTWARE_ENDSTOP_X
817
+  #define MIN_SOFTWARE_ENDSTOP_Y
818
+  #define MIN_SOFTWARE_ENDSTOP_Z
819
+#endif
820
+
821
+// Max software endstops curtail movement above maximum coordinate bounds
801
 #define MAX_SOFTWARE_ENDSTOPS
822
 #define MAX_SOFTWARE_ENDSTOPS
823
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
824
+  #define MAX_SOFTWARE_ENDSTOP_X
825
+  #define MAX_SOFTWARE_ENDSTOP_Y
826
+  #define MAX_SOFTWARE_ENDSTOP_Z
827
+#endif
802
 
828
 
803
 /**
829
 /**
804
  * Filament Runout Sensor
830
  * Filament Runout Sensor
818
 //===========================================================================
844
 //===========================================================================
819
 //=============================== Bed Leveling ==============================
845
 //=============================== Bed Leveling ==============================
820
 //===========================================================================
846
 //===========================================================================
821
-// @section bedlevel
847
+// @section calibrate
822
 
848
 
823
 /**
849
 /**
824
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
850
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
844
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
870
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
845
  *   A comprehensive bed leveling system combining the features and benefits
871
  *   A comprehensive bed leveling system combining the features and benefits
846
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
872
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
847
- *   Validation and Mesh Editing systems. Currently, UBL is only checked out
848
- *   for Cartesian Printers. That said, it was primarily designed to correct
849
- *   poor quality Delta Printers. If you feel adventurous and have a Delta,
850
- *   please post an issue if something doesn't work correctly. Initially,
851
- *   you will need to set a reduced bed size so you have a rectangular area
852
- *   to test on.
873
+ *   Validation and Mesh Editing systems.
853
  *
874
  *
854
  * - MESH_BED_LEVELING
875
  * - MESH_BED_LEVELING
855
  *   Probe a grid manually
876
  *   Probe a grid manually
876
   // at which point movement will be level to the machine's XY plane.
897
   // at which point movement will be level to the machine's XY plane.
877
   // The height can be set with M420 Z<height>
898
   // The height can be set with M420 Z<height>
878
   #define ENABLE_LEVELING_FADE_HEIGHT
899
   #define ENABLE_LEVELING_FADE_HEIGHT
900
+
901
+  // For Cartesian machines, instead of dividing moves on mesh boundaries,
902
+  // split up moves into short segments like a Delta. This follows the
903
+  // contours of the bed more closely than edge-to-edge straight moves.
904
+  #define SEGMENT_LEVELED_MOVES
905
+  #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)
906
+
907
+  /**
908
+   * Enable the G26 Mesh Validation Pattern tool.
909
+   */
910
+  //#define G26_MESH_VALIDATION   // Enable G26 mesh validation
911
+  #if ENABLED(G26_MESH_VALIDATION)
912
+    #define MESH_TEST_NOZZLE_SIZE     0.4   // (mm) Diameter of primary nozzle.
913
+    #define MESH_TEST_LAYER_HEIGHT    0.2   // (mm) Default layer height for the G26 Mesh Validation Tool.
914
+    #define MESH_TEST_HOTEND_TEMP   205.0   // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
915
+    #define MESH_TEST_BED_TEMP       60.0   // (°C) Default bed temperature for the G26 Mesh Validation Tool.
916
+  #endif
917
+
879
 #endif
918
 #endif
880
 
919
 
881
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
920
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
931
   //========================= Unified Bed Leveling ============================
970
   //========================= Unified Bed Leveling ============================
932
   //===========================================================================
971
   //===========================================================================
933
 
972
 
934
-  #define UBL_MESH_INSET 1          // Mesh inset margin on print area
973
+  //#define MESH_EDIT_GFX_OVERLAY   // Display a graphics overlay while editing the mesh
974
+
975
+  #define MESH_INSET 1              // Mesh inset margin on print area
935
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
976
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
936
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
977
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
937
 
978
 
942
   #define UBL_PROBE_PT_3_X 180
983
   #define UBL_PROBE_PT_3_X 180
943
   #define UBL_PROBE_PT_3_Y 20
984
   #define UBL_PROBE_PT_3_Y 20
944
 
985
 
945
-  //#define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
946
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
986
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
987
+  #define UBL_SAVE_ACTIVE_ON_M500   // Save the currently active mesh in the current slot on M500
947
 
988
 
948
 #elif ENABLED(MESH_BED_LEVELING)
989
 #elif ENABLED(MESH_BED_LEVELING)
949
 
990
 
1003
 //#define Z_SAFE_HOMING
1044
 //#define Z_SAFE_HOMING
1004
 
1045
 
1005
 #if ENABLED(Z_SAFE_HOMING)
1046
 #if ENABLED(Z_SAFE_HOMING)
1006
-  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axis (G28).
1007
-  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axis (G28).
1047
+  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axes (G28).
1048
+  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axes (G28).
1008
 #endif
1049
 #endif
1009
 
1050
 
1010
 // Homing speeds (mm/m)
1051
 // Homing speeds (mm/m)
1011
 #define HOMING_FEEDRATE_XY (50*60)
1052
 #define HOMING_FEEDRATE_XY (50*60)
1012
 #define HOMING_FEEDRATE_Z  (4*60)
1053
 #define HOMING_FEEDRATE_Z  (4*60)
1013
 
1054
 
1055
+// @section calibrate
1056
+
1057
+/**
1058
+ * Bed Skew Compensation
1059
+ *
1060
+ * This feature corrects for misalignment in the XYZ axes.
1061
+ *
1062
+ * Take the following steps to get the bed skew in the XY plane:
1063
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1064
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1065
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1066
+ *  4. For XY_SIDE_AD measure the edge A to D
1067
+ *
1068
+ * Marlin automatically computes skew factors from these measurements.
1069
+ * Skew factors may also be computed and set manually:
1070
+ *
1071
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1072
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1073
+ *
1074
+ * If desired, follow the same procedure for XZ and YZ.
1075
+ * Use these diagrams for reference:
1076
+ *
1077
+ *    Y                     Z                     Z
1078
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1079
+ *    |    /       /        |    /       /        |    /       /
1080
+ *    |   /       /         |   /       /         |   /       /
1081
+ *    |  A-------D          |  A-------D          |  A-------D
1082
+ *    +-------------->X     +-------------->X     +-------------->Y
1083
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1084
+ */
1085
+//#define SKEW_CORRECTION
1086
+
1087
+#if ENABLED(SKEW_CORRECTION)
1088
+  // Input all length measurements here:
1089
+  #define XY_DIAG_AC 282.8427124746
1090
+  #define XY_DIAG_BD 282.8427124746
1091
+  #define XY_SIDE_AD 200
1092
+
1093
+  // Or, set the default skew factors directly here
1094
+  // to override the above measurements:
1095
+  #define XY_SKEW_FACTOR 0.0
1096
+
1097
+  //#define SKEW_CORRECTION_FOR_Z
1098
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1099
+    #define XZ_DIAG_AC 282.8427124746
1100
+    #define XZ_DIAG_BD 282.8427124746
1101
+    #define YZ_DIAG_AC 282.8427124746
1102
+    #define YZ_DIAG_BD 282.8427124746
1103
+    #define YZ_SIDE_AD 200
1104
+    #define XZ_SKEW_FACTOR 0.0
1105
+    #define YZ_SKEW_FACTOR 0.0
1106
+  #endif
1107
+
1108
+  // Enable this option for M852 to set skew at runtime
1109
+  //#define SKEW_CORRECTION_GCODE
1110
+#endif
1111
+
1014
 //=============================================================================
1112
 //=============================================================================
1015
 //============================= Additional Features ===========================
1113
 //============================= Additional Features ===========================
1016
 //=============================================================================
1114
 //=============================================================================
1042
 //
1140
 //
1043
 // M100 Free Memory Watcher
1141
 // M100 Free Memory Watcher
1044
 //
1142
 //
1045
-//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
1143
+//#define M100_FREE_MEMORY_WATCHER    // Add M100 (Free Memory Watcher) to debug memory usage
1046
 
1144
 
1047
 //
1145
 //
1048
 // G20/G21 Inch mode support
1146
 // G20/G21 Inch mode support
1187
  *
1285
  *
1188
  * Select the language to display on the LCD. These languages are available:
1286
  * Select the language to display on the LCD. These languages are available:
1189
  *
1287
  *
1190
- *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, gl, hr,
1191
- *    it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1288
+ *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, fr_utf8, gl,
1289
+ *    hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1192
  *    tr, uk, zh_CN, zh_TW, test
1290
  *    tr, uk, zh_CN, zh_TW, test
1193
  *
1291
  *
1194
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1292
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1195
  */
1293
  */
1196
 #define LCD_LANGUAGE en
1294
 #define LCD_LANGUAGE en
1197
 
1295
 
1319
 // Note: Test audio output with the G-Code:
1417
 // Note: Test audio output with the G-Code:
1320
 //  M300 S<frequency Hz> P<duration ms>
1418
 //  M300 S<frequency Hz> P<duration ms>
1321
 //
1419
 //
1322
-//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
1323
-//#define LCD_FEEDBACK_FREQUENCY_HZ 1000
1420
+//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
1421
+//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
1324
 
1422
 
1325
 //
1423
 //
1326
 // CONTROLLER TYPE: Standard
1424
 // CONTROLLER TYPE: Standard
1428
 //#define CARTESIO_UI
1526
 //#define CARTESIO_UI
1429
 
1527
 
1430
 //
1528
 //
1431
-// ANET_10 Controller supported displays.
1529
+// ANET and Tronxy Controller supported displays.
1432
 //
1530
 //
1433
-//#define ANET_KEYPAD_LCD         // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1531
+//#define ZONESTAR_LCD            // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1434
                                   // This LCD is known to be susceptible to electrical interference
1532
                                   // This LCD is known to be susceptible to electrical interference
1435
                                   // which scrambles the display.  Pressing any button clears it up.
1533
                                   // which scrambles the display.  Pressing any button clears it up.
1534
+                                  // This is a LCD2004 display with 5 analog buttons.
1535
+
1436
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1536
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1437
                                   // A clone of the RepRapDiscount full graphics display but with
1537
                                   // A clone of the RepRapDiscount full graphics display but with
1438
                                   // different pins/wiring (see pins_ANET_10.h).
1538
                                   // different pins/wiring (see pins_ANET_10.h).
1542
 //
1642
 //
1543
 //#define MKS_12864OLED
1643
 //#define MKS_12864OLED
1544
 
1644
 
1645
+// Silvergate GLCD controller
1646
+// http://github.com/android444/Silvergate
1647
+//
1648
+//#define SILVER_GATE_GLCD_CONTROLLER
1649
+
1545
 //=============================================================================
1650
 //=============================================================================
1546
 //=============================== Extra Features ==============================
1651
 //=============================== Extra Features ==============================
1547
 //=============================================================================
1652
 //=============================================================================
1598
  * Adds the M150 command to set the LED (or LED strip) color.
1703
  * Adds the M150 command to set the LED (or LED strip) color.
1599
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1704
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1600
  * luminance values can be set from 0 to 255.
1705
  * luminance values can be set from 0 to 255.
1601
- * For Neopixel LED overall brightness parameters is also available 
1706
+ * For Neopixel LED an overall brightness parameter is also available.
1602
  *
1707
  *
1603
  * *** CAUTION ***
1708
  * *** CAUTION ***
1604
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1709
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1605
  *  as the Arduino cannot handle the current the LEDs will require.
1710
  *  as the Arduino cannot handle the current the LEDs will require.
1606
  *  Failure to follow this precaution can destroy your Arduino!
1711
  *  Failure to follow this precaution can destroy your Arduino!
1607
- *  The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
1608
- *  cannot handle such current, separate 5V power supply must be used
1712
+ *  NOTE: A separate 5V power supply is required! The Neopixel LED needs
1713
+ *  more current than the Arduino 5V linear regulator can produce.
1609
  * *** CAUTION ***
1714
  * *** CAUTION ***
1610
  *
1715
  *
1611
- * LED type. This options are mutualy exclusive. Uncomment only one.
1716
+ * LED Type. Enable only one of the following two options.
1612
  *
1717
  *
1613
  */
1718
  */
1614
 //#define RGB_LED
1719
 //#define RGB_LED
1624
 // Support for Adafruit Neopixel LED driver
1729
 // Support for Adafruit Neopixel LED driver
1625
 //#define NEOPIXEL_LED
1730
 //#define NEOPIXEL_LED
1626
 #if ENABLED(NEOPIXEL_LED)
1731
 #if ENABLED(NEOPIXEL_LED)
1627
-  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
1732
+  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
1628
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1733
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1629
-  #define NEOPIXEL_PIXELS 30       // Number of LEDs on strip
1630
-  #define NEOPIXEL_IS_SEQUENTIAL   // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
1631
-  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness 0-255
1734
+  #define NEOPIXEL_PIXELS 30       // Number of LEDs in the strip
1735
+  #define NEOPIXEL_IS_SEQUENTIAL   // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
1736
+  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness (0-255)
1632
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1737
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1633
 #endif
1738
 #endif
1634
 
1739
 
1643
  *  - Change to green once print has finished
1748
  *  - Change to green once print has finished
1644
  *  - Turn off after the print has finished and the user has pushed a button
1749
  *  - Turn off after the print has finished and the user has pushed a button
1645
  */
1750
  */
1646
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED)
1751
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
1647
   #define PRINTER_EVENT_LEDS
1752
   #define PRINTER_EVENT_LEDS
1648
 #endif
1753
 #endif
1649
 
1754
 
1650
-/*********************************************************************\
1651
-* R/C SERVO support
1652
-* Sponsored by TrinityLabs, Reworked by codexmas
1653
-**********************************************************************/
1755
+/**
1756
+ * R/C SERVO support
1757
+ * Sponsored by TrinityLabs, Reworked by codexmas
1758
+ */
1654
 
1759
 
1655
-// Number of servos
1656
-//
1657
-// If you select a configuration below, this will receive a default value and does not need to be set manually
1658
-// set it manually if you have more servos than extruders and wish to manually control some
1659
-// leaving it undefined or defining as 0 will disable the servo subsystem
1660
-// If unsure, leave commented / disabled
1661
-//
1760
+/**
1761
+ * Number of servos
1762
+ *
1763
+ * For some servo-related options NUM_SERVOS will be set automatically.
1764
+ * Set this manually if there are extra servos needing manual control.
1765
+ * Leave undefined or set to 0 to entirely disable the servo subsystem.
1766
+ */
1662
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1767
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1663
 
1768
 
1664
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1769
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1671
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1776
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1672
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1777
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1673
 
1778
 
1674
-/**
1675
- * Filament Width Sensor
1676
- *
1677
- * Measures the filament width in real-time and adjusts
1678
- * flow rate to compensate for any irregularities.
1679
- *
1680
- * Also allows the measured filament diameter to set the
1681
- * extrusion rate, so the slicer only has to specify the
1682
- * volume.
1683
- *
1684
- * Only a single extruder is supported at this time.
1685
- *
1686
- *  34 RAMPS_14    : Analog input 5 on the AUX2 connector
1687
- *  81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
1688
- * 301 RAMBO       : Analog input 3
1689
- *
1690
- * Note: May require analog pins to be defined for other boards.
1691
- */
1692
-//#define FILAMENT_WIDTH_SENSOR
1693
-
1694
-#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75   // (mm) Diameter of the filament generally used (3.0 or 1.75mm), also used in the slicer. Used to validate sensor reading.
1695
-#define DEFAULT_STDDEV_FILAMENT_DIA 0.05    // Typical estimate for cheap filament
1696
-//#define DEFAULT_STDDEV_FILAMENT_DIA 0.02  // Typical advertised for higher quality filament
1697
-
1698
-#if ENABLED(FILAMENT_WIDTH_SENSOR)
1699
-  #define FILAMENT_SENSOR_EXTRUDER_NUM 0    // Index of the extruder that has the filament sensor (0,1,2,3)
1700
-  #define MEASUREMENT_DELAY_CM        14    // (cm) The distance from the filament sensor to the melting chamber
1701
-
1702
-  #define MEASURED_UPPER_LIMIT        (DEFAULT_NOMINAL_FILAMENT_DIA+4*DEFAULT_STDDEV_FILAMENT_DIA) // (mm) Upper limit used to validate sensor reading
1703
-  #define MEASURED_LOWER_LIMIT        (DEFAULT_NOMINAL_FILAMENT_DIA-4*DEFAULT_STDDEV_FILAMENT_DIA) // (mm) Lower limit used to validate sensor reading
1704
-  #define MAX_MEASUREMENT_DELAY       20    // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
1705
-
1706
-  #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
1707
-
1708
-  // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
1709
-  //#define FILAMENT_LCD_DISPLAY
1710
-#endif
1711
-
1712
 #endif // CONFIGURATION_H
1779
 #endif // CONFIGURATION_H

+ 273
- 127
Marlin/example_configurations/Creality/CR-10/Configuration_adv.h Переглянути файл

32
  */
32
  */
33
 #ifndef CONFIGURATION_ADV_H
33
 #ifndef CONFIGURATION_ADV_H
34
 #define CONFIGURATION_ADV_H
34
 #define CONFIGURATION_ADV_H
35
-#define CONFIGURATION_ADV_H_VERSION 010100
35
+#define CONFIGURATION_ADV_H_VERSION 010107
36
 
36
 
37
 // @section temperature
37
 // @section temperature
38
 
38
 
48
 #endif
48
 #endif
49
 
49
 
50
 /**
50
 /**
51
- * Thermal Protection protects your printer from damage and fire if a
52
- * thermistor falls out or temperature sensors fail in any way.
51
+ * Thermal Protection provides additional protection to your printer from damage
52
+ * and fire. Marlin always includes safe min and max temperature ranges which
53
+ * protect against a broken or disconnected thermistor wire.
53
  *
54
  *
54
- * The issue: If a thermistor falls out or a temperature sensor fails,
55
- * Marlin can no longer sense the actual temperature. Since a disconnected
56
- * thermistor reads as a low temperature, the firmware will keep the heater on.
55
+ * The issue: If a thermistor falls out, it will report the much lower
56
+ * temperature of the air in the room, and the the firmware will keep
57
+ * the heater on.
57
  *
58
  *
58
  * The solution: Once the temperature reaches the target, start observing.
59
  * The solution: Once the temperature reaches the target, start observing.
59
- * If the temperature stays too far below the target (hysteresis) for too long (period),
60
- * the firmware will halt the machine as a safety precaution.
60
+ * If the temperature stays too far below the target (hysteresis) for too
61
+ * long (period), the firmware will halt the machine as a safety precaution.
61
  *
62
  *
62
- * If you get false positives for "Thermal Runaway" increase THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
63
+ * If you get false positives for "Thermal Runaway", increase
64
+ * THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
63
  */
65
  */
64
 #if ENABLED(THERMAL_PROTECTION_HOTENDS)
66
 #if ENABLED(THERMAL_PROTECTION_HOTENDS)
65
   #define THERMAL_PROTECTION_PERIOD 40        // Seconds
67
   #define THERMAL_PROTECTION_PERIOD 40        // Seconds
66
   #define THERMAL_PROTECTION_HYSTERESIS 4     // Degrees Celsius
68
   #define THERMAL_PROTECTION_HYSTERESIS 4     // Degrees Celsius
67
 
69
 
68
   /**
70
   /**
69
-   * Whenever an M104 or M109 increases the target temperature the firmware will wait for the
70
-   * WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
71
-   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
72
-   * but only if the current temperature is far enough below the target for a reliable test.
71
+   * Whenever an M104, M109, or M303 increases the target temperature, the
72
+   * firmware will wait for the WATCH_TEMP_PERIOD to expire. If the temperature
73
+   * hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted and
74
+   * requires a hard reset. This test restarts with any M104/M109/M303, but only
75
+   * if the current temperature is far enough below the target for a reliable
76
+   * test.
73
    *
77
    *
74
-   * If you get false positives for "Heating failed" increase WATCH_TEMP_PERIOD and/or decrease WATCH_TEMP_INCREASE
75
-   * WATCH_TEMP_INCREASE should not be below 2.
78
+   * If you get false positives for "Heating failed", increase WATCH_TEMP_PERIOD
79
+   * and/or decrease WATCH_TEMP_INCREASE. WATCH_TEMP_INCREASE should not be set
80
+   * below 2.
76
    */
81
    */
77
   #define WATCH_TEMP_PERIOD 20                // Seconds
82
   #define WATCH_TEMP_PERIOD 20                // Seconds
78
   #define WATCH_TEMP_INCREASE 2               // Degrees Celsius
83
   #define WATCH_TEMP_INCREASE 2               // Degrees Celsius
86
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
91
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
87
 
92
 
88
   /**
93
   /**
89
-   * Whenever an M140 or M190 increases the target temperature the firmware will wait for the
90
-   * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE
91
-   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190,
92
-   * but only if the current temperature is far enough below the target for a reliable test.
93
-   *
94
-   * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease
95
-   * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.)
94
+   * As described above, except for the bed (M140/M190/M303).
96
    */
95
    */
97
   #define WATCH_BED_TEMP_PERIOD 60                // Seconds
96
   #define WATCH_BED_TEMP_PERIOD 60                // Seconds
98
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
97
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
123
   #define AUTOTEMP_OLDWEIGHT 0.98
122
   #define AUTOTEMP_OLDWEIGHT 0.98
124
 #endif
123
 #endif
125
 
124
 
125
+// Show extra position information in M114
126
+//#define M114_DETAIL
127
+
126
 // Show Temperature ADC value
128
 // Show Temperature ADC value
127
 // Enable for M105 to include ADC values read from temperature sensors.
129
 // Enable for M105 to include ADC values read from temperature sensors.
128
 //#define SHOW_TEMP_ADC_VALUES
130
 //#define SHOW_TEMP_ADC_VALUES
257
 
259
 
258
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
260
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
259
 
261
 
260
-// Dual X Steppers
261
-// Uncomment this option to drive two X axis motors.
262
-// The next unused E driver will be assigned to the second X stepper.
262
+/**
263
+ * Dual Steppers / Dual Endstops
264
+ *
265
+ * This section will allow you to use extra E drivers to drive a second motor for X, Y, or Z axes.
266
+ *
267
+ * For example, set X_DUAL_STEPPER_DRIVERS setting to use a second motor. If the motors need to
268
+ * spin in opposite directions set INVERT_X2_VS_X_DIR. If the second motor needs its own endstop
269
+ * set X_DUAL_ENDSTOPS. This can adjust for "racking." Use X2_USE_ENDSTOP to set the endstop plug
270
+ * that should be used for the second endstop. Extra endstops will appear in the output of 'M119'.
271
+ *
272
+ * Use X_DUAL_ENDSTOP_ADJUSTMENT to adjust for mechanical imperfection. After homing both motors
273
+ * this offset is applied to the X2 motor. To find the offset home the X axis, and measure the error
274
+ * in X2. Dual endstop offsets can be set at runtime with 'M666 X<offset> Y<offset> Z<offset>'.
275
+ */
276
+
263
 //#define X_DUAL_STEPPER_DRIVERS
277
 //#define X_DUAL_STEPPER_DRIVERS
264
 #if ENABLED(X_DUAL_STEPPER_DRIVERS)
278
 #if ENABLED(X_DUAL_STEPPER_DRIVERS)
265
-  // Set true if the two X motors need to rotate in opposite directions
266
-  #define INVERT_X2_VS_X_DIR true
279
+  #define INVERT_X2_VS_X_DIR true   // Set 'true' if X motors should rotate in opposite directions
280
+  //#define X_DUAL_ENDSTOPS
281
+  #if ENABLED(X_DUAL_ENDSTOPS)
282
+    #define X2_USE_ENDSTOP _XMAX_
283
+    #define X_DUAL_ENDSTOPS_ADJUSTMENT  0
284
+  #endif
267
 #endif
285
 #endif
268
 
286
 
269
-// Dual Y Steppers
270
-// Uncomment this option to drive two Y axis motors.
271
-// The next unused E driver will be assigned to the second Y stepper.
272
 //#define Y_DUAL_STEPPER_DRIVERS
287
 //#define Y_DUAL_STEPPER_DRIVERS
273
 #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
288
 #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
274
-  // Set true if the two Y motors need to rotate in opposite directions
275
-  #define INVERT_Y2_VS_Y_DIR true
289
+  #define INVERT_Y2_VS_Y_DIR true   // Set 'true' if Y motors should rotate in opposite directions
290
+  //#define Y_DUAL_ENDSTOPS
291
+  #if ENABLED(Y_DUAL_ENDSTOPS)
292
+    #define Y2_USE_ENDSTOP _YMAX_
293
+    #define Y_DUAL_ENDSTOPS_ADJUSTMENT  0
294
+  #endif
276
 #endif
295
 #endif
277
 
296
 
278
-// A single Z stepper driver is usually used to drive 2 stepper motors.
279
-// Uncomment this option to use a separate stepper driver for each Z axis motor.
280
-// The next unused E driver will be assigned to the second Z stepper.
281
 //#define Z_DUAL_STEPPER_DRIVERS
297
 //#define Z_DUAL_STEPPER_DRIVERS
282
-
283
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
298
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
284
-
285
-  // Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper.
286
-  // That way the machine is capable to align the bed during home, since both Z steppers are homed.
287
-  // There is also an implementation of M666 (software endstops adjustment) to this feature.
288
-  // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed.
289
-  // One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2.
290
-  // If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive.
291
-  // Play a little bit with small adjustments (0.5mm) and check the behaviour.
292
-  // The M119 (endstops report) will start reporting the Z2 Endstop as well.
293
-
294
   //#define Z_DUAL_ENDSTOPS
299
   //#define Z_DUAL_ENDSTOPS
295
-
296
   #if ENABLED(Z_DUAL_ENDSTOPS)
300
   #if ENABLED(Z_DUAL_ENDSTOPS)
297
     #define Z2_USE_ENDSTOP _XMAX_
301
     #define Z2_USE_ENDSTOP _XMAX_
298
-    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0  // Use M666 to determine/test this value
302
+    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0
299
   #endif
303
   #endif
300
-
301
-#endif // Z_DUAL_STEPPER_DRIVERS
304
+#endif
302
 
305
 
303
 // Enable this for dual x-carriage printers.
306
 // Enable this for dual x-carriage printers.
304
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
307
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
345
 
348
 
346
 // @section homing
349
 // @section homing
347
 
350
 
348
-//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
351
+// Homing hits each endstop, retracts by these distances, then does a slower bump.
349
 #define X_HOME_BUMP_MM 5
352
 #define X_HOME_BUMP_MM 5
350
 #define Y_HOME_BUMP_MM 5
353
 #define Y_HOME_BUMP_MM 5
351
 #define Z_HOME_BUMP_MM 2
354
 #define Z_HOME_BUMP_MM 2
352
 #define HOMING_BUMP_DIVISOR { 2, 2, 4 }  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
355
 #define HOMING_BUMP_DIVISOR { 2, 2, 4 }  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
353
-#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
356
+#define QUICK_HOME                       // If homing includes X and Y, do a diagonal move initially
354
 
357
 
355
 // When G28 is called, this option will make Y home before X
358
 // When G28 is called, this option will make Y home before X
356
 //#define HOME_Y_BEFORE_X
359
 //#define HOME_Y_BEFORE_X
434
 //#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 }   // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
437
 //#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 }   // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
435
 //#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 }    // Default drive percent - X, Y, Z, E axis
438
 //#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 }    // Default drive percent - X, Y, Z, E axis
436
 
439
 
437
-// Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
440
+// Use an I2C based DIGIPOT (e.g., Azteeg X3 Pro)
438
 //#define DIGIPOT_I2C
441
 //#define DIGIPOT_I2C
442
+#if ENABLED(DIGIPOT_I2C) && !defined(DIGIPOT_I2C_ADDRESS_A)
443
+  /**
444
+   * Common slave addresses:
445
+   *
446
+   *                    A   (A shifted)   B   (B shifted)  IC
447
+   * Smoothie          0x2C (0x58)       0x2D (0x5A)       MCP4451
448
+   * AZTEEG_X3_PRO     0x2C (0x58)       0x2E (0x5C)       MCP4451
449
+   * MIGHTYBOARD_REVE  0x2F (0x5E)                         MCP4018
450
+   */
451
+  #define DIGIPOT_I2C_ADDRESS_A 0x2C  // unshifted slave address for first DIGIPOT
452
+  #define DIGIPOT_I2C_ADDRESS_B 0x2D  // unshifted slave address for second DIGIPOT
453
+#endif
454
+
439
 //#define DIGIPOT_MCP4018          // Requires library from https://github.com/stawel/SlowSoftI2CMaster
455
 //#define DIGIPOT_MCP4018          // Requires library from https://github.com/stawel/SlowSoftI2CMaster
440
 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4     AZTEEG_X3_PRO: 8
456
 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4     AZTEEG_X3_PRO: 8
441
 // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
457
 // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
466
 // The timeout (in ms) to return to the status screen from sub-menus
482
 // The timeout (in ms) to return to the status screen from sub-menus
467
 //#define LCD_TIMEOUT_TO_STATUS 15000
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
468
 
484
 
485
+/**
486
+ * LED Control Menu
487
+ * Enable this feature to add LED Control to the LCD menu
488
+ */
489
+//#define LED_CONTROL_MENU
490
+#if ENABLED(LED_CONTROL_MENU)
491
+  #define LED_COLOR_PRESETS                 // Enable the Preset Color menu option
492
+  #if ENABLED(LED_COLOR_PRESETS)
493
+    #define LED_USER_PRESET_RED        255  // User defined RED value
494
+    #define LED_USER_PRESET_GREEN      128  // User defined GREEN value
495
+    #define LED_USER_PRESET_BLUE         0  // User defined BLUE value
496
+    #define LED_USER_PRESET_WHITE      255  // User defined WHITE value
497
+    #define LED_USER_PRESET_BRIGHTNESS 255  // User defined intensity
498
+    //#define LED_USER_PRESET_STARTUP       // Have the printer display the user preset color on startup
499
+  #endif
500
+#endif // LED_CONTROL_MENU
501
+
469
 #if ENABLED(SDSUPPORT)
502
 #if ENABLED(SDSUPPORT)
470
 
503
 
471
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
504
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
475
   // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
508
   // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
476
   #define SD_DETECT_INVERTED
509
   #define SD_DETECT_INVERTED
477
 
510
 
478
-  #define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
511
+  #define SD_FINISHED_STEPPERRELEASE true          // Disable steppers when SD Print is finished
479
   #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
512
   #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
480
 
513
 
481
-  #define SDCARD_RATHERRECENTFIRST  //reverse file order of sd card menu display. Its sorted practically after the file system block order.
482
-  // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that.
483
-  // using:
514
+  // Reverse SD sort to show "more recent" files first, according to the card's FAT.
515
+  // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended.
516
+  #define SDCARD_RATHERRECENTFIRST
517
+
518
+  // Add an option in the menu to run all auto#.g files
484
   //#define MENU_ADDAUTOSTART
519
   //#define MENU_ADDAUTOSTART
485
 
520
 
486
   /**
521
   /**
517
     #define SDSORT_USES_STACK  false  // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
552
     #define SDSORT_USES_STACK  false  // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
518
     #define SDSORT_CACHE_NAMES true   // Keep sorted items in RAM longer for speedy performance. Most expensive option.
553
     #define SDSORT_CACHE_NAMES true   // Keep sorted items in RAM longer for speedy performance. Most expensive option.
519
     #define SDSORT_DYNAMIC_RAM false  // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
554
     #define SDSORT_DYNAMIC_RAM false  // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
555
+    #define SDSORT_CACHE_VFATS 2      // Maximum number of 13-byte VFAT entries to use for sorting.
556
+                                      // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM.
520
   #endif
557
   #endif
521
 
558
 
522
   // Show a progress bar on HD44780 LCDs for SD printing
559
   // Show a progress bar on HD44780 LCDs for SD printing
535
     //#define LCD_PROGRESS_BAR_TEST
572
     //#define LCD_PROGRESS_BAR_TEST
536
   #endif
573
   #endif
537
 
574
 
575
+  // Add an 'M73' G-code to set the current percentage
576
+  //#define LCD_SET_PROGRESS_MANUALLY
577
+
538
   // This allows hosts to request long names for files and folders with M33
578
   // This allows hosts to request long names for files and folders with M33
539
   //#define LONG_FILENAME_HOST_SUPPORT
579
   //#define LONG_FILENAME_HOST_SUPPORT
540
 
580
 
541
-  // This option allows you to abort SD printing when any endstop is triggered.
542
-  // This feature must be enabled with "M540 S1" or from the LCD menu.
543
-  // To have any effect, endstops must be enabled during SD printing.
581
+  // Enable this option to scroll long filenames in the SD card menu
582
+  //#define SCROLL_LONG_FILENAMES
583
+
584
+  /**
585
+   * This option allows you to abort SD printing when any endstop is triggered.
586
+   * This feature must be enabled with "M540 S1" or from the LCD menu.
587
+   * To have any effect, endstops must be enabled during SD printing.
588
+   */
544
   //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
589
   //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
545
 
590
 
591
+  /**
592
+   * This option makes it easier to print the same SD Card file again.
593
+   * On print completion the LCD Menu will open with the file selected.
594
+   * You can just click to start the print, or navigate elsewhere.
595
+   */
596
+  //#define SD_REPRINT_LAST_SELECTED_FILE
597
+
546
 #endif // SDSUPPORT
598
 #endif // SDSUPPORT
547
 
599
 
548
 /**
600
 /**
575
   // Enable this option and reduce the value to optimize screen updates.
627
   // Enable this option and reduce the value to optimize screen updates.
576
   // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
628
   // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
577
   //#define DOGM_SPI_DELAY_US 5
629
   //#define DOGM_SPI_DELAY_US 5
630
+
631
+  // Swap the CW/CCW indicators in the graphics overlay
632
+  //#define OVERLAY_GFX_REVERSE
633
+
578
 #endif // DOGLCD
634
 #endif // DOGLCD
579
 
635
 
580
 // @section safety
636
 // @section safety
601
  */
657
  */
602
 #define BABYSTEPPING
658
 #define BABYSTEPPING
603
 #if ENABLED(BABYSTEPPING)
659
 #if ENABLED(BABYSTEPPING)
604
-  //#define BABYSTEP_XY            // Also enable X/Y Babystepping. Not supported on DELTA!
605
-  #define BABYSTEP_INVERT_Z false  // Change if Z babysteps should go the other way
606
-  #define BABYSTEP_MULTIPLICATOR 10 // Babysteps are very small. Increase for faster motion.
607
-  //#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
660
+  //#define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
661
+  #define BABYSTEP_INVERT_Z false    // Change if Z babysteps should go the other way
662
+  #define BABYSTEP_MULTIPLICATOR  10 // Babysteps are very small. Increase for faster motion.
663
+  //#define BABYSTEP_ZPROBE_OFFSET   // Enable to combine M851 and Babystepping
608
   #define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
664
   #define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
609
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
665
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
610
                                         // Note: Extra time may be added to mitigate controller latency.
666
                                         // Note: Extra time may be added to mitigate controller latency.
611
   //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
667
   //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
612
-  //#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators
613
 #endif
668
 #endif
614
 
669
 
615
 // @section extruder
670
 // @section extruder
656
 
711
 
657
 // @section leveling
712
 // @section leveling
658
 
713
 
659
-// Default mesh area is an area with an inset margin on the print area.
660
-// Below are the macros that are used to define the borders for the mesh area,
661
-// made available here for specialized needs, ie dual extruder setup.
662
-#if ENABLED(MESH_BED_LEVELING)
663
-  #define MESH_MIN_X MESH_INSET
664
-  #define MESH_MAX_X (X_BED_SIZE - (MESH_INSET))
665
-  #define MESH_MIN_Y MESH_INSET
666
-  #define MESH_MAX_Y (Y_BED_SIZE - (MESH_INSET))
667
-#elif ENABLED(AUTO_BED_LEVELING_UBL)
668
-  #define UBL_MESH_MIN_X UBL_MESH_INSET
669
-  #define UBL_MESH_MAX_X (X_BED_SIZE - (UBL_MESH_INSET))
670
-  #define UBL_MESH_MIN_Y UBL_MESH_INSET
671
-  #define UBL_MESH_MAX_Y (Y_BED_SIZE - (UBL_MESH_INSET))
672
-
673
-  // If this is defined, the currently active mesh will be saved in the
674
-  // current slot on M500.
675
-  #define UBL_SAVE_ACTIVE_ON_M500
714
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
715
+  #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
716
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
717
+  #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
718
+#endif
719
+
720
+#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL)
721
+  // Override the mesh area if the automatic (max) area is too large
722
+  //#define MESH_MIN_X MESH_INSET
723
+  //#define MESH_MIN_Y MESH_INSET
724
+  //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET)
725
+  //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
676
 #endif
726
 #endif
677
 
727
 
678
 // @section extras
728
 // @section extras
692
 //#define BEZIER_CURVE_SUPPORT
742
 //#define BEZIER_CURVE_SUPPORT
693
 
743
 
694
 // G38.2 and G38.3 Probe Target
744
 // G38.2 and G38.3 Probe Target
695
-// Enable PROBE_DOUBLE_TOUCH if you want G38 to double touch
745
+// Set MULTIPLE_PROBING if you want G38 to double touch
696
 //#define G38_PROBE_TARGET
746
 //#define G38_PROBE_TARGET
697
 #if ENABLED(G38_PROBE_TARGET)
747
 #if ENABLED(G38_PROBE_TARGET)
698
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
748
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
717
 // @section hidden
767
 // @section hidden
718
 
768
 
719
 // The number of linear motions that can be in the plan at any give time.
769
 // The number of linear motions that can be in the plan at any give time.
720
-// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2, i.g. 8,16,32 because shifts and ors are used to do the ring-buffering.
770
+// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2 (e.g. 8, 16, 32) because shifts and ors are used to do the ring-buffering.
721
 #if ENABLED(SDSUPPORT)
771
 #if ENABLED(SDSUPPORT)
722
   #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
772
   #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
723
 #else
773
 #else
808
 #endif
858
 #endif
809
 
859
 
810
 /**
860
 /**
861
+ * Extra Fan Speed
862
+ * Adds a secondary fan speed for each print-cooling fan.
863
+ *   'M106 P<fan> T3-255' : Set a secondary speed for <fan>
864
+ *   'M106 P<fan> T2'     : Use the set secondary speed
865
+ *   'M106 P<fan> T1'     : Restore the previous fan speed
866
+ */
867
+//#define EXTRA_FAN_SPEED
868
+
869
+/**
811
  * Advanced Pause
870
  * Advanced Pause
812
  * Experimental feature for filament change support and for parking the nozzle when paused.
871
  * Experimental feature for filament change support and for parking the nozzle when paused.
813
  * Adds the GCode M600 for initiating filament change.
872
  * Adds the GCode M600 for initiating filament change.
917
 
976
 
918
 #endif
977
 #endif
919
 
978
 
920
-// @section TMC2130
979
+// @section TMC2130, TMC2208
921
 
980
 
922
 /**
981
 /**
923
  * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
982
  * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
931
  */
990
  */
932
 //#define HAVE_TMC2130
991
 //#define HAVE_TMC2130
933
 
992
 
934
-#if ENABLED(HAVE_TMC2130)
993
+/**
994
+ * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
995
+ * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin.
996
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN
997
+ * to #_SERIAL_TX_PIN with a 1K resistor.
998
+ * The drivers can also be used with hardware serial.
999
+ *
1000
+ * You'll also need the TMC2208Stepper Arduino library
1001
+ * (https://github.com/teemuatlut/TMC2208Stepper).
1002
+ */
1003
+//#define HAVE_TMC2208
1004
+
1005
+#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
935
 
1006
 
936
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
1007
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
937
   //#define X_IS_TMC2130
1008
   //#define X_IS_TMC2130
946
   //#define E3_IS_TMC2130
1017
   //#define E3_IS_TMC2130
947
   //#define E4_IS_TMC2130
1018
   //#define E4_IS_TMC2130
948
 
1019
 
1020
+  //#define X_IS_TMC2208
1021
+  //#define X2_IS_TMC2208
1022
+  //#define Y_IS_TMC2208
1023
+  //#define Y2_IS_TMC2208
1024
+  //#define Z_IS_TMC2208
1025
+  //#define Z2_IS_TMC2208
1026
+  //#define E0_IS_TMC2208
1027
+  //#define E1_IS_TMC2208
1028
+  //#define E2_IS_TMC2208
1029
+  //#define E3_IS_TMC2208
1030
+  //#define E4_IS_TMC2208
1031
+
949
   /**
1032
   /**
950
    * Stepper driver settings
1033
    * Stepper driver settings
951
    */
1034
    */
952
 
1035
 
953
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1036
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
954
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1037
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
955
-  #define INTERPOLATE          1  // Interpolate X/Y/Z_MICROSTEPS to 256
1038
+  #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
956
 
1039
 
957
-  #define X_CURRENT         1000  // rms current in mA. Multiply by 1.41 for peak current.
1040
+  #define X_CURRENT          800  // rms current in mA. Multiply by 1.41 for peak current.
958
   #define X_MICROSTEPS        16  // 0..256
1041
   #define X_MICROSTEPS        16  // 0..256
959
 
1042
 
960
-  #define Y_CURRENT         1000
1043
+  #define Y_CURRENT          800
961
   #define Y_MICROSTEPS        16
1044
   #define Y_MICROSTEPS        16
962
 
1045
 
963
-  #define Z_CURRENT         1000
1046
+  #define Z_CURRENT          800
964
   #define Z_MICROSTEPS        16
1047
   #define Z_MICROSTEPS        16
965
 
1048
 
966
-  //#define X2_CURRENT      1000
967
-  //#define X2_MICROSTEPS     16
1049
+  #define X2_CURRENT         800
1050
+  #define X2_MICROSTEPS       16
968
 
1051
 
969
-  //#define Y2_CURRENT      1000
970
-  //#define Y2_MICROSTEPS     16
1052
+  #define Y2_CURRENT         800
1053
+  #define Y2_MICROSTEPS       16
971
 
1054
 
972
-  //#define Z2_CURRENT      1000
973
-  //#define Z2_MICROSTEPS     16
1055
+  #define Z2_CURRENT         800
1056
+  #define Z2_MICROSTEPS       16
974
 
1057
 
975
-  //#define E0_CURRENT      1000
976
-  //#define E0_MICROSTEPS     16
1058
+  #define E0_CURRENT         800
1059
+  #define E0_MICROSTEPS       16
977
 
1060
 
978
-  //#define E1_CURRENT      1000
979
-  //#define E1_MICROSTEPS     16
1061
+  #define E1_CURRENT         800
1062
+  #define E1_MICROSTEPS       16
980
 
1063
 
981
-  //#define E2_CURRENT      1000
982
-  //#define E2_MICROSTEPS     16
1064
+  #define E2_CURRENT         800
1065
+  #define E2_MICROSTEPS       16
983
 
1066
 
984
-  //#define E3_CURRENT      1000
985
-  //#define E3_MICROSTEPS     16
1067
+  #define E3_CURRENT         800
1068
+  #define E3_MICROSTEPS       16
986
 
1069
 
987
-  //#define E4_CURRENT      1000
988
-  //#define E4_MICROSTEPS     16
1070
+  #define E4_CURRENT         800
1071
+  #define E4_MICROSTEPS       16
989
 
1072
 
990
   /**
1073
   /**
991
    * Use Trinamic's ultra quiet stepping mode.
1074
    * Use Trinamic's ultra quiet stepping mode.
994
   #define STEALTHCHOP
1077
   #define STEALTHCHOP
995
 
1078
 
996
   /**
1079
   /**
997
-   * Let Marlin automatically control stepper current.
998
-   * This is still an experimental feature.
999
-   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
1000
-   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
1001
-   * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX
1080
+   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1081
+   * like overtemperature and short to ground. TMC2208 requires hardware serial.
1082
+   * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1083
+   * Other detected conditions can be used to stop the current print.
1002
    * Relevant g-codes:
1084
    * Relevant g-codes:
1003
    * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
1085
    * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
1004
-   * M906 S1 - Start adjusting current
1005
-   * M906 S0 - Stop adjusting current
1006
    * M911 - Report stepper driver overtemperature pre-warn condition.
1086
    * M911 - Report stepper driver overtemperature pre-warn condition.
1007
    * M912 - Clear stepper driver overtemperature pre-warn condition flag.
1087
    * M912 - Clear stepper driver overtemperature pre-warn condition flag.
1088
+   * M122 S0/1 - Report driver parameters (Requires TMC_DEBUG)
1008
    */
1089
    */
1009
-  //#define AUTOMATIC_CURRENT_CONTROL
1090
+  //#define MONITOR_DRIVER_STATUS
1010
 
1091
 
1011
-  #if ENABLED(AUTOMATIC_CURRENT_CONTROL)
1012
-    #define CURRENT_STEP          50  // [mA]
1013
-    #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
1092
+  #if ENABLED(MONITOR_DRIVER_STATUS)
1093
+    #define CURRENT_STEP_DOWN     50  // [mA]
1014
     #define REPORT_CURRENT_CHANGE
1094
     #define REPORT_CURRENT_CHANGE
1095
+    #define STOP_ON_ERROR
1015
   #endif
1096
   #endif
1016
 
1097
 
1017
   /**
1098
   /**
1026
   #define X2_HYBRID_THRESHOLD    100
1107
   #define X2_HYBRID_THRESHOLD    100
1027
   #define Y_HYBRID_THRESHOLD     100
1108
   #define Y_HYBRID_THRESHOLD     100
1028
   #define Y2_HYBRID_THRESHOLD    100
1109
   #define Y2_HYBRID_THRESHOLD    100
1029
-  #define Z_HYBRID_THRESHOLD       4
1030
-  #define Z2_HYBRID_THRESHOLD      4
1110
+  #define Z_HYBRID_THRESHOLD       3
1111
+  #define Z2_HYBRID_THRESHOLD      3
1031
   #define E0_HYBRID_THRESHOLD     30
1112
   #define E0_HYBRID_THRESHOLD     30
1032
   #define E1_HYBRID_THRESHOLD     30
1113
   #define E1_HYBRID_THRESHOLD     30
1033
   #define E2_HYBRID_THRESHOLD     30
1114
   #define E2_HYBRID_THRESHOLD     30
1037
   /**
1118
   /**
1038
    * Use stallGuard2 to sense an obstacle and trigger an endstop.
1119
    * Use stallGuard2 to sense an obstacle and trigger an endstop.
1039
    * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
1120
    * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
1040
-   * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal.
1121
+   * X and Y homing will always be done in spreadCycle mode.
1041
    *
1122
    *
1042
    * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
1123
    * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
1043
    * Higher values make the system LESS sensitive.
1124
    * Higher values make the system LESS sensitive.
1046
    * It is advised to set X/Y_HOME_BUMP_MM to 0.
1127
    * It is advised to set X/Y_HOME_BUMP_MM to 0.
1047
    * M914 X/Y to live tune the setting
1128
    * M914 X/Y to live tune the setting
1048
    */
1129
    */
1049
-  //#define SENSORLESS_HOMING
1130
+  //#define SENSORLESS_HOMING // TMC2130 only
1050
 
1131
 
1051
   #if ENABLED(SENSORLESS_HOMING)
1132
   #if ENABLED(SENSORLESS_HOMING)
1052
-    #define X_HOMING_SENSITIVITY  19
1053
-    #define Y_HOMING_SENSITIVITY  19
1133
+    #define X_HOMING_SENSITIVITY  8
1134
+    #define Y_HOMING_SENSITIVITY  8
1054
   #endif
1135
   #endif
1055
 
1136
 
1056
   /**
1137
   /**
1138
+   * Enable M122 debugging command for TMC stepper drivers.
1139
+   * M122 S0/1 will enable continous reporting.
1140
+   */
1141
+  //#define TMC_DEBUG
1142
+
1143
+  /**
1057
    * You can set your own advanced settings by filling in predefined functions.
1144
    * You can set your own advanced settings by filling in predefined functions.
1058
    * A list of available functions can be found on the library github page
1145
    * A list of available functions can be found on the library github page
1059
    * https://github.com/teemuatlut/TMC2130Stepper
1146
    * https://github.com/teemuatlut/TMC2130Stepper
1147
+   * https://github.com/teemuatlut/TMC2208Stepper
1060
    *
1148
    *
1061
    * Example:
1149
    * Example:
1062
-   * #define TMC2130_ADV() { \
1150
+   * #define TMC_ADV() { \
1063
    *   stepperX.diag0_temp_prewarn(1); \
1151
    *   stepperX.diag0_temp_prewarn(1); \
1064
-   *   stepperX.interpolate(0); \
1152
+   *   stepperY.interpolate(0); \
1065
    * }
1153
    * }
1066
    */
1154
    */
1067
-  #define  TMC2130_ADV() {  }
1155
+  #define  TMC_ADV() {  }
1068
 
1156
 
1069
-#endif // HAVE_TMC2130
1157
+#endif // TMC2130 || TMC2208
1070
 
1158
 
1071
 // @section L6470
1159
 // @section L6470
1072
 
1160
 
1231
 #endif
1319
 #endif
1232
 
1320
 
1233
 /**
1321
 /**
1322
+ * Filament Width Sensor
1323
+ *
1324
+ * Measures the filament width in real-time and adjusts
1325
+ * flow rate to compensate for any irregularities.
1326
+ *
1327
+ * Also allows the measured filament diameter to set the
1328
+ * extrusion rate, so the slicer only has to specify the
1329
+ * volume.
1330
+ *
1331
+ * Only a single extruder is supported at this time.
1332
+ *
1333
+ *  34 RAMPS_14    : Analog input 5 on the AUX2 connector
1334
+ *  81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
1335
+ * 301 RAMBO       : Analog input 3
1336
+ *
1337
+ * Note: May require analog pins to be defined for other boards.
1338
+ */
1339
+//#define FILAMENT_WIDTH_SENSOR
1340
+
1341
+#define DEFAULT_STDDEV_FILAMENT_DIA 0.05    // Typical estimate for cheap filament
1342
+//#define DEFAULT_STDDEV_FILAMENT_DIA 0.02  // Typical advertised for higher quality filament
1343
+
1344
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
1345
+  #define FILAMENT_SENSOR_EXTRUDER_NUM 0    // Index of the extruder that has the filament sensor. :[0,1,2,3,4]
1346
+  #define MEASUREMENT_DELAY_CM        14    // (cm) The distance from the filament sensor to the melting chamber
1347
+
1348
+  #define MEASURED_UPPER_LIMIT        (DEFAULT_NOMINAL_FILAMENT_DIA+4*DEFAULT_STDDEV_FILAMENT_DIA) // (mm) Upper limit used to validate sensor reading
1349
+  #define MEASURED_LOWER_LIMIT        (DEFAULT_NOMINAL_FILAMENT_DIA-4*DEFAULT_STDDEV_FILAMENT_DIA) // (mm) Lower limit used to validate sensor reading
1350
+  #define MAX_MEASUREMENT_DELAY       20    // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
1351
+
1352
+  #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
1353
+
1354
+  // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
1355
+  //#define FILAMENT_LCD_DISPLAY
1356
+#endif
1357
+
1358
+/**
1359
+ * CNC Coordinate Systems
1360
+ *
1361
+ * Enables G53 and G54-G59.3 commands to select coordinate systems
1362
+ * and G92.1 to reset the workspace to native machine space.
1363
+ */
1364
+//#define CNC_COORDINATE_SYSTEMS
1365
+
1366
+/**
1234
  * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
1367
  * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
1235
  */
1368
  */
1236
 //#define PINS_DEBUGGING
1369
 //#define PINS_DEBUGGING
1421
                                          // tweaks made to the configuration are affecting the printer in real-time.
1554
                                          // tweaks made to the configuration are affecting the printer in real-time.
1422
 #endif
1555
 #endif
1423
 
1556
 
1557
+/**
1558
+ * NanoDLP Sync support
1559
+ *
1560
+ * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
1561
+ * string to enable synchronization with DLP projector exposure. This change will allow to use
1562
+ * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
1563
+ */
1564
+//#define NANODLP_Z_SYNC
1565
+#if ENABLED(NANODLP_Z_SYNC)
1566
+  //#define NANODLP_ALL_AXIS  // Enables "Z_move_comp" output on any axis move.
1567
+                              // Default behaviour is limited to Z axis only.
1568
+#endif
1569
+
1424
 #endif // CONFIGURATION_ADV_H
1570
 #endif // CONFIGURATION_ADV_H

+ 160
- 91
Marlin/example_configurations/Felix/Configuration.h Переглянути файл

37
  */
37
  */
38
 #ifndef CONFIGURATION_H
38
 #ifndef CONFIGURATION_H
39
 #define CONFIGURATION_H
39
 #define CONFIGURATION_H
40
-#define CONFIGURATION_H_VERSION 010100
40
+#define CONFIGURATION_H_VERSION 010107
41
 
41
 
42
 //===========================================================================
42
 //===========================================================================
43
 //============================= Getting Started =============================
43
 //============================= Getting Started =============================
136
 // :[1, 2, 3, 4, 5]
136
 // :[1, 2, 3, 4, 5]
137
 #define EXTRUDERS 1
137
 #define EXTRUDERS 1
138
 
138
 
139
+// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
140
+#define DEFAULT_NOMINAL_FILAMENT_DIA 3.0
141
+
139
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
142
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
140
 //#define SINGLENOZZLE
143
 //#define SINGLENOZZLE
141
 
144
 
336
 
339
 
337
 // Comment the following line to disable PID and enable bang-bang.
340
 // Comment the following line to disable PID and enable bang-bang.
338
 #define PIDTEMP
341
 #define PIDTEMP
339
-#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
340
-#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
342
+#define BANG_MAX 255     // Limits current to nozzle while in bang-bang mode; 255=full current
343
+#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
344
+#define PID_K1 0.95      // Smoothing factor within the PID
341
 #if ENABLED(PIDTEMP)
345
 #if ENABLED(PIDTEMP)
342
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
346
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
343
   //#define PID_DEBUG // Sends debug data to the serial port.
347
   //#define PID_DEBUG // Sends debug data to the serial port.
347
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
351
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
348
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
352
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
349
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
353
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
350
-  #define K1 0.95 //smoothing factor within the PID
351
 
354
 
352
   // Felix 2.0+ electronics with v4 Hotend
355
   // Felix 2.0+ electronics with v4 Hotend
353
   #define DEFAULT_Kp 12
356
   #define DEFAULT_Kp 12
409
 //===========================================================================
412
 //===========================================================================
410
 
413
 
411
 /**
414
 /**
412
- * Thermal Protection protects your printer from damage and fire if a
413
- * thermistor falls out or temperature sensors fail in any way.
415
+ * Thermal Protection provides additional protection to your printer from damage
416
+ * and fire. Marlin always includes safe min and max temperature ranges which
417
+ * protect against a broken or disconnected thermistor wire.
414
  *
418
  *
415
- * The issue: If a thermistor falls out or a temperature sensor fails,
416
- * Marlin can no longer sense the actual temperature. Since a disconnected
417
- * thermistor reads as a low temperature, the firmware will keep the heater on.
419
+ * The issue: If a thermistor falls out, it will report the much lower
420
+ * temperature of the air in the room, and the the firmware will keep
421
+ * the heater on.
418
  *
422
  *
419
  * If you get "Thermal Runaway" or "Heating failed" errors the
423
  * If you get "Thermal Runaway" or "Heating failed" errors the
420
  * details can be tuned in Configuration_adv.h
424
  * details can be tuned in Configuration_adv.h
555
 // @section probes
559
 // @section probes
556
 
560
 
557
 //
561
 //
558
-// See http://marlinfw.org/configuration/probes.html
562
+// See http://marlinfw.org/docs/configuration/probes.html
559
 //
563
 //
560
 
564
 
561
 /**
565
 /**
668
 // X and Y axis travel speed (mm/m) between probes
672
 // X and Y axis travel speed (mm/m) between probes
669
 #define XY_PROBE_SPEED 8000
673
 #define XY_PROBE_SPEED 8000
670
 
674
 
671
-// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH)
675
+// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
672
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
676
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
673
 
677
 
674
 // Speed for the "accurate" probe of each point
678
 // Speed for the "accurate" probe of each point
675
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
679
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
676
 
680
 
677
-// Use double touch for probing
678
-//#define PROBE_DOUBLE_TOUCH
681
+// The number of probes to perform at each point.
682
+//   Set to 2 for a fast/slow probe, using the second probe result.
683
+//   Set to 3 or more for slow probes, averaging the results.
684
+//#define MULTIPLE_PROBING 2
679
 
685
 
680
 /**
686
 /**
681
  * Z probes require clearance when deploying, stowing, and moving between
687
  * Z probes require clearance when deploying, stowing, and moving between
767
 #define Y_MAX_POS Y_BED_SIZE
773
 #define Y_MAX_POS Y_BED_SIZE
768
 #define Z_MAX_POS 235
774
 #define Z_MAX_POS 235
769
 
775
 
770
-// If enabled, axes won't move below MIN_POS in response to movement commands.
776
+/**
777
+ * Software Endstops
778
+ *
779
+ * - Prevent moves outside the set machine bounds.
780
+ * - Individual axes can be disabled, if desired.
781
+ * - X and Y only apply to Cartesian robots.
782
+ * - Use 'M211' to set software endstops on/off or report current state
783
+ */
784
+
785
+// Min software endstops curtail movement below minimum coordinate bounds
771
 #define MIN_SOFTWARE_ENDSTOPS
786
 #define MIN_SOFTWARE_ENDSTOPS
772
-// If enabled, axes won't move above MAX_POS in response to movement commands.
787
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
788
+  #define MIN_SOFTWARE_ENDSTOP_X
789
+  #define MIN_SOFTWARE_ENDSTOP_Y
790
+  #define MIN_SOFTWARE_ENDSTOP_Z
791
+#endif
792
+
793
+// Max software endstops curtail movement above maximum coordinate bounds
773
 #define MAX_SOFTWARE_ENDSTOPS
794
 #define MAX_SOFTWARE_ENDSTOPS
795
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
796
+  #define MAX_SOFTWARE_ENDSTOP_X
797
+  #define MAX_SOFTWARE_ENDSTOP_Y
798
+  #define MAX_SOFTWARE_ENDSTOP_Z
799
+#endif
774
 
800
 
775
 /**
801
 /**
776
  * Filament Runout Sensor
802
  * Filament Runout Sensor
790
 //===========================================================================
816
 //===========================================================================
791
 //=============================== Bed Leveling ==============================
817
 //=============================== Bed Leveling ==============================
792
 //===========================================================================
818
 //===========================================================================
793
-// @section bedlevel
819
+// @section calibrate
794
 
820
 
795
 /**
821
 /**
796
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
822
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
816
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
842
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
817
  *   A comprehensive bed leveling system combining the features and benefits
843
  *   A comprehensive bed leveling system combining the features and benefits
818
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
844
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
819
- *   Validation and Mesh Editing systems. Currently, UBL is only checked out
820
- *   for Cartesian Printers. That said, it was primarily designed to correct
821
- *   poor quality Delta Printers. If you feel adventurous and have a Delta,
822
- *   please post an issue if something doesn't work correctly. Initially,
823
- *   you will need to set a reduced bed size so you have a rectangular area
824
- *   to test on.
845
+ *   Validation and Mesh Editing systems.
825
  *
846
  *
826
  * - MESH_BED_LEVELING
847
  * - MESH_BED_LEVELING
827
  *   Probe a grid manually
848
  *   Probe a grid manually
848
   // at which point movement will be level to the machine's XY plane.
869
   // at which point movement will be level to the machine's XY plane.
849
   // The height can be set with M420 Z<height>
870
   // The height can be set with M420 Z<height>
850
   #define ENABLE_LEVELING_FADE_HEIGHT
871
   #define ENABLE_LEVELING_FADE_HEIGHT
872
+
873
+  // For Cartesian machines, instead of dividing moves on mesh boundaries,
874
+  // split up moves into short segments like a Delta. This follows the
875
+  // contours of the bed more closely than edge-to-edge straight moves.
876
+  #define SEGMENT_LEVELED_MOVES
877
+  #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)
878
+
879
+  /**
880
+   * Enable the G26 Mesh Validation Pattern tool.
881
+   */
882
+  //#define G26_MESH_VALIDATION   // Enable G26 mesh validation
883
+  #if ENABLED(G26_MESH_VALIDATION)
884
+    #define MESH_TEST_NOZZLE_SIZE     0.4   // (mm) Diameter of primary nozzle.
885
+    #define MESH_TEST_LAYER_HEIGHT    0.2   // (mm) Default layer height for the G26 Mesh Validation Tool.
886
+    #define MESH_TEST_HOTEND_TEMP   205.0   // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
887
+    #define MESH_TEST_BED_TEMP       60.0   // (°C) Default bed temperature for the G26 Mesh Validation Tool.
888
+  #endif
889
+
851
 #endif
890
 #endif
852
 
891
 
853
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
892
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
903
   //========================= Unified Bed Leveling ============================
942
   //========================= Unified Bed Leveling ============================
904
   //===========================================================================
943
   //===========================================================================
905
 
944
 
906
-  #define UBL_MESH_INSET 1          // Mesh inset margin on print area
945
+  //#define MESH_EDIT_GFX_OVERLAY   // Display a graphics overlay while editing the mesh
946
+
947
+  #define MESH_INSET 1              // Mesh inset margin on print area
907
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
948
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
908
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
949
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
909
 
950
 
914
   #define UBL_PROBE_PT_3_X 180
955
   #define UBL_PROBE_PT_3_X 180
915
   #define UBL_PROBE_PT_3_Y 20
956
   #define UBL_PROBE_PT_3_Y 20
916
 
957
 
917
-  #define UBL_G26_MESH_VALIDATION   // Enable G26 mesh validation
918
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
958
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
959
+  #define UBL_SAVE_ACTIVE_ON_M500   // Save the currently active mesh in the current slot on M500
919
 
960
 
920
 #elif ENABLED(MESH_BED_LEVELING)
961
 #elif ENABLED(MESH_BED_LEVELING)
921
 
962
 
975
 //#define Z_SAFE_HOMING
1016
 //#define Z_SAFE_HOMING
976
 
1017
 
977
 #if ENABLED(Z_SAFE_HOMING)
1018
 #if ENABLED(Z_SAFE_HOMING)
978
-  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axis (G28).
979
-  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axis (G28).
1019
+  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axes (G28).
1020
+  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axes (G28).
980
 #endif
1021
 #endif
981
 
1022
 
982
 // Homing speeds (mm/m)
1023
 // Homing speeds (mm/m)
983
 #define HOMING_FEEDRATE_XY (50*60)
1024
 #define HOMING_FEEDRATE_XY (50*60)
984
 #define HOMING_FEEDRATE_Z  (4*60)
1025
 #define HOMING_FEEDRATE_Z  (4*60)
985
 
1026
 
1027
+// @section calibrate
1028
+
1029
+/**
1030
+ * Bed Skew Compensation
1031
+ *
1032
+ * This feature corrects for misalignment in the XYZ axes.
1033
+ *
1034
+ * Take the following steps to get the bed skew in the XY plane:
1035
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1036
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1037
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1038
+ *  4. For XY_SIDE_AD measure the edge A to D
1039
+ *
1040
+ * Marlin automatically computes skew factors from these measurements.
1041
+ * Skew factors may also be computed and set manually:
1042
+ *
1043
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1044
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1045
+ *
1046
+ * If desired, follow the same procedure for XZ and YZ.
1047
+ * Use these diagrams for reference:
1048
+ *
1049
+ *    Y                     Z                     Z
1050
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1051
+ *    |    /       /        |    /       /        |    /       /
1052
+ *    |   /       /         |   /       /         |   /       /
1053
+ *    |  A-------D          |  A-------D          |  A-------D
1054
+ *    +-------------->X     +-------------->X     +-------------->Y
1055
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1056
+ */
1057
+//#define SKEW_CORRECTION
1058
+
1059
+#if ENABLED(SKEW_CORRECTION)
1060
+  // Input all length measurements here:
1061
+  #define XY_DIAG_AC 282.8427124746
1062
+  #define XY_DIAG_BD 282.8427124746
1063
+  #define XY_SIDE_AD 200
1064
+
1065
+  // Or, set the default skew factors directly here
1066
+  // to override the above measurements:
1067
+  #define XY_SKEW_FACTOR 0.0
1068
+
1069
+  //#define SKEW_CORRECTION_FOR_Z
1070
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1071
+    #define XZ_DIAG_AC 282.8427124746
1072
+    #define XZ_DIAG_BD 282.8427124746
1073
+    #define YZ_DIAG_AC 282.8427124746
1074
+    #define YZ_DIAG_BD 282.8427124746
1075
+    #define YZ_SIDE_AD 200
1076
+    #define XZ_SKEW_FACTOR 0.0
1077
+    #define YZ_SKEW_FACTOR 0.0
1078
+  #endif
1079
+
1080
+  // Enable this option for M852 to set skew at runtime
1081
+  //#define SKEW_CORRECTION_GCODE
1082
+#endif
1083
+
986
 //=============================================================================
1084
 //=============================================================================
987
 //============================= Additional Features ===========================
1085
 //============================= Additional Features ===========================
988
 //=============================================================================
1086
 //=============================================================================
1014
 //
1112
 //
1015
 // M100 Free Memory Watcher
1113
 // M100 Free Memory Watcher
1016
 //
1114
 //
1017
-//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
1115
+//#define M100_FREE_MEMORY_WATCHER    // Add M100 (Free Memory Watcher) to debug memory usage
1018
 
1116
 
1019
 //
1117
 //
1020
 // G20/G21 Inch mode support
1118
 // G20/G21 Inch mode support
1159
  *
1257
  *
1160
  * Select the language to display on the LCD. These languages are available:
1258
  * Select the language to display on the LCD. These languages are available:
1161
  *
1259
  *
1162
- *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, gl, hr,
1163
- *    it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1260
+ *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, fr_utf8, gl,
1261
+ *    hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1164
  *    tr, uk, zh_CN, zh_TW, test
1262
  *    tr, uk, zh_CN, zh_TW, test
1165
  *
1263
  *
1166
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1264
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1167
  */
1265
  */
1168
-//#define LCD_LANGUAGE en
1266
+#define LCD_LANGUAGE en
1169
 
1267
 
1170
 /**
1268
 /**
1171
  * LCD Character Set
1269
  * LCD Character Set
1291
 // Note: Test audio output with the G-Code:
1389
 // Note: Test audio output with the G-Code:
1292
 //  M300 S<frequency Hz> P<duration ms>
1390
 //  M300 S<frequency Hz> P<duration ms>
1293
 //
1391
 //
1294
-//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
1295
-//#define LCD_FEEDBACK_FREQUENCY_HZ 1000
1392
+//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
1393
+//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
1296
 
1394
 
1297
 //
1395
 //
1298
 // CONTROLLER TYPE: Standard
1396
 // CONTROLLER TYPE: Standard
1400
 //#define CARTESIO_UI
1498
 //#define CARTESIO_UI
1401
 
1499
 
1402
 //
1500
 //
1403
-// ANET_10 Controller supported displays.
1501
+// ANET and Tronxy Controller supported displays.
1404
 //
1502
 //
1405
-//#define ANET_KEYPAD_LCD         // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1503
+//#define ZONESTAR_LCD            // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1406
                                   // This LCD is known to be susceptible to electrical interference
1504
                                   // This LCD is known to be susceptible to electrical interference
1407
                                   // which scrambles the display.  Pressing any button clears it up.
1505
                                   // which scrambles the display.  Pressing any button clears it up.
1506
+                                  // This is a LCD2004 display with 5 analog buttons.
1507
+
1408
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1508
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1409
                                   // A clone of the RepRapDiscount full graphics display but with
1509
                                   // A clone of the RepRapDiscount full graphics display but with
1410
                                   // different pins/wiring (see pins_ANET_10.h).
1510
                                   // different pins/wiring (see pins_ANET_10.h).
1514
 //
1614
 //
1515
 //#define MKS_12864OLED
1615
 //#define MKS_12864OLED
1516
 
1616
 
1617
+// Silvergate GLCD controller
1618
+// http://github.com/android444/Silvergate
1619
+//
1620
+//#define SILVER_GATE_GLCD_CONTROLLER
1621
+
1517
 //=============================================================================
1622
 //=============================================================================
1518
 //=============================== Extra Features ==============================
1623
 //=============================== Extra Features ==============================
1519
 //=============================================================================
1624
 //=============================================================================
1570
  * Adds the M150 command to set the LED (or LED strip) color.
1675
  * Adds the M150 command to set the LED (or LED strip) color.
1571
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1676
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1572
  * luminance values can be set from 0 to 255.
1677
  * luminance values can be set from 0 to 255.
1573
- * For Neopixel LED overall brightness parameters is also available 
1678
+ * For Neopixel LED an overall brightness parameter is also available.
1574
  *
1679
  *
1575
  * *** CAUTION ***
1680
  * *** CAUTION ***
1576
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1681
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1577
  *  as the Arduino cannot handle the current the LEDs will require.
1682
  *  as the Arduino cannot handle the current the LEDs will require.
1578
  *  Failure to follow this precaution can destroy your Arduino!
1683
  *  Failure to follow this precaution can destroy your Arduino!
1579
- *  The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
1580
- *  cannot handle such current, separate 5V power supply must be used
1684
+ *  NOTE: A separate 5V power supply is required! The Neopixel LED needs
1685
+ *  more current than the Arduino 5V linear regulator can produce.
1581
  * *** CAUTION ***
1686
  * *** CAUTION ***
1582
  *
1687
  *
1583
- * LED type. This options are mutualy exclusive. Uncomment only one.
1688
+ * LED Type. Enable only one of the following two options.
1584
  *
1689
  *
1585
  */
1690
  */
1586
 //#define RGB_LED
1691
 //#define RGB_LED
1596
 // Support for Adafruit Neopixel LED driver
1701
 // Support for Adafruit Neopixel LED driver
1597
 //#define NEOPIXEL_LED
1702
 //#define NEOPIXEL_LED
1598
 #if ENABLED(NEOPIXEL_LED)
1703
 #if ENABLED(NEOPIXEL_LED)
1599
-  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
1704
+  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
1600
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1705
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1601
-  #define NEOPIXEL_PIXELS 30       // Number of LEDs on strip
1602
-  #define NEOPIXEL_IS_SEQUENTIAL   // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
1603
-  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness 0-255
1706
+  #define NEOPIXEL_PIXELS 30       // Number of LEDs in the strip
1707
+  #define NEOPIXEL_IS_SEQUENTIAL   // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
1708
+  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness (0-255)
1604
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1709
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1605
 #endif
1710
 #endif
1606
 
1711
 
1615
  *  - Change to green once print has finished
1720
  *  - Change to green once print has finished
1616
  *  - Turn off after the print has finished and the user has pushed a button
1721
  *  - Turn off after the print has finished and the user has pushed a button
1617
  */
1722
  */
1618
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED)
1723
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
1619
   #define PRINTER_EVENT_LEDS
1724
   #define PRINTER_EVENT_LEDS
1620
 #endif
1725
 #endif
1621
 
1726
 
1622
-/*********************************************************************\
1623
-* R/C SERVO support
1624
-* Sponsored by TrinityLabs, Reworked by codexmas
1625
-**********************************************************************/
1727
+/**
1728
+ * R/C SERVO support
1729
+ * Sponsored by TrinityLabs, Reworked by codexmas
1730
+ */
1626
 
1731
 
1627
-// Number of servos
1628
-//
1629
-// If you select a configuration below, this will receive a default value and does not need to be set manually
1630
-// set it manually if you have more servos than extruders and wish to manually control some
1631
-// leaving it undefined or defining as 0 will disable the servo subsystem
1632
-// If unsure, leave commented / disabled
1633
-//
1732
+/**
1733
+ * Number of servos
1734
+ *
1735
+ * For some servo-related options NUM_SERVOS will be set automatically.
1736
+ * Set this manually if there are extra servos needing manual control.
1737
+ * Leave undefined or set to 0 to entirely disable the servo subsystem.
1738
+ */
1634
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1739
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1635
 
1740
 
1636
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1741
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1643
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1748
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1644
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1749
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1645
 
1750
 
1646
-/**
1647
- * Filament Width Sensor
1648
- *
1649
- * Measures the filament width in real-time and adjusts
1650
- * flow rate to compensate for any irregularities.
1651
- *
1652
- * Also allows the measured filament diameter to set the
1653
- * extrusion rate, so the slicer only has to specify the
1654
- * volume.
1655
- *
1656
- * Only a single extruder is supported at this time.
1657
- *
1658
- *  34 RAMPS_14    : Analog input 5 on the AUX2 connector
1659
- *  81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
1660
- * 301 RAMBO       : Analog input 3
1661
- *
1662
- * Note: May require analog pins to be defined for other boards.
1663
- */
1664
-//#define FILAMENT_WIDTH_SENSOR
1665
-
1666
-#define DEFAULT_NOMINAL_FILAMENT_DIA 3.00   // (mm) Diameter of the filament generally used (3.0 or 1.75mm), also used in the slicer. Used to validate sensor reading.
1667
-
1668
-#if ENABLED(FILAMENT_WIDTH_SENSOR)
1669
-  #define FILAMENT_SENSOR_EXTRUDER_NUM 0    // Index of the extruder that has the filament sensor (0,1,2,3)
1670
-  #define MEASUREMENT_DELAY_CM        14    // (cm) The distance from the filament sensor to the melting chamber
1671
-
1672
-  #define MEASURED_UPPER_LIMIT         3.30 // (mm) Upper limit used to validate sensor reading
1673
-  #define MEASURED_LOWER_LIMIT         1.90 // (mm) Lower limit used to validate sensor reading
1674
-  #define MAX_MEASUREMENT_DELAY       20    // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
1675
-
1676
-  #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
1677
-
1678
-  // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
1679
-  //#define FILAMENT_LCD_DISPLAY
1680
-#endif
1681
-
1682
 #endif // CONFIGURATION_H
1751
 #endif // CONFIGURATION_H

+ 268
- 125
Marlin/example_configurations/Felix/Configuration_adv.h Переглянути файл

32
  */
32
  */
33
 #ifndef CONFIGURATION_ADV_H
33
 #ifndef CONFIGURATION_ADV_H
34
 #define CONFIGURATION_ADV_H
34
 #define CONFIGURATION_ADV_H
35
-#define CONFIGURATION_ADV_H_VERSION 010100
35
+#define CONFIGURATION_ADV_H_VERSION 010107
36
 
36
 
37
 // @section temperature
37
 // @section temperature
38
 
38
 
48
 #endif
48
 #endif
49
 
49
 
50
 /**
50
 /**
51
- * Thermal Protection protects your printer from damage and fire if a
52
- * thermistor falls out or temperature sensors fail in any way.
51
+ * Thermal Protection provides additional protection to your printer from damage
52
+ * and fire. Marlin always includes safe min and max temperature ranges which
53
+ * protect against a broken or disconnected thermistor wire.
53
  *
54
  *
54
- * The issue: If a thermistor falls out or a temperature sensor fails,
55
- * Marlin can no longer sense the actual temperature. Since a disconnected
56
- * thermistor reads as a low temperature, the firmware will keep the heater on.
55
+ * The issue: If a thermistor falls out, it will report the much lower
56
+ * temperature of the air in the room, and the the firmware will keep
57
+ * the heater on.
57
  *
58
  *
58
  * The solution: Once the temperature reaches the target, start observing.
59
  * The solution: Once the temperature reaches the target, start observing.
59
- * If the temperature stays too far below the target (hysteresis) for too long (period),
60
- * the firmware will halt the machine as a safety precaution.
60
+ * If the temperature stays too far below the target (hysteresis) for too
61
+ * long (period), the firmware will halt the machine as a safety precaution.
61
  *
62
  *
62
- * If you get false positives for "Thermal Runaway" increase THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
63
+ * If you get false positives for "Thermal Runaway", increase
64
+ * THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
63
  */
65
  */
64
 #if ENABLED(THERMAL_PROTECTION_HOTENDS)
66
 #if ENABLED(THERMAL_PROTECTION_HOTENDS)
65
   #define THERMAL_PROTECTION_PERIOD 40        // Seconds
67
   #define THERMAL_PROTECTION_PERIOD 40        // Seconds
66
   #define THERMAL_PROTECTION_HYSTERESIS 4     // Degrees Celsius
68
   #define THERMAL_PROTECTION_HYSTERESIS 4     // Degrees Celsius
67
 
69
 
68
   /**
70
   /**
69
-   * Whenever an M104 or M109 increases the target temperature the firmware will wait for the
70
-   * WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
71
-   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
72
-   * but only if the current temperature is far enough below the target for a reliable test.
71
+   * Whenever an M104, M109, or M303 increases the target temperature, the
72
+   * firmware will wait for the WATCH_TEMP_PERIOD to expire. If the temperature
73
+   * hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted and
74
+   * requires a hard reset. This test restarts with any M104/M109/M303, but only
75
+   * if the current temperature is far enough below the target for a reliable
76
+   * test.
73
    *
77
    *
74
-   * If you get false positives for "Heating failed" increase WATCH_TEMP_PERIOD and/or decrease WATCH_TEMP_INCREASE
75
-   * WATCH_TEMP_INCREASE should not be below 2.
78
+   * If you get false positives for "Heating failed", increase WATCH_TEMP_PERIOD
79
+   * and/or decrease WATCH_TEMP_INCREASE. WATCH_TEMP_INCREASE should not be set
80
+   * below 2.
76
    */
81
    */
77
   #define WATCH_TEMP_PERIOD 20                // Seconds
82
   #define WATCH_TEMP_PERIOD 20                // Seconds
78
   #define WATCH_TEMP_INCREASE 2               // Degrees Celsius
83
   #define WATCH_TEMP_INCREASE 2               // Degrees Celsius
86
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
91
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
87
 
92
 
88
   /**
93
   /**
89
-   * Whenever an M140 or M190 increases the target temperature the firmware will wait for the
90
-   * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE
91
-   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190,
92
-   * but only if the current temperature is far enough below the target for a reliable test.
93
-   *
94
-   * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease
95
-   * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.)
94
+   * As described above, except for the bed (M140/M190/M303).
96
    */
95
    */
97
   #define WATCH_BED_TEMP_PERIOD 60                // Seconds
96
   #define WATCH_BED_TEMP_PERIOD 60                // Seconds
98
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
97
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
123
   #define AUTOTEMP_OLDWEIGHT 0.98
122
   #define AUTOTEMP_OLDWEIGHT 0.98
124
 #endif
123
 #endif
125
 
124
 
125
+// Show extra position information in M114
126
+//#define M114_DETAIL
127
+
126
 // Show Temperature ADC value
128
 // Show Temperature ADC value
127
 // Enable for M105 to include ADC values read from temperature sensors.
129
 // Enable for M105 to include ADC values read from temperature sensors.
128
 //#define SHOW_TEMP_ADC_VALUES
130
 //#define SHOW_TEMP_ADC_VALUES
257
 
259
 
258
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
260
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
259
 
261
 
260
-// Dual X Steppers
261
-// Uncomment this option to drive two X axis motors.
262
-// The next unused E driver will be assigned to the second X stepper.
262
+/**
263
+ * Dual Steppers / Dual Endstops
264
+ *
265
+ * This section will allow you to use extra E drivers to drive a second motor for X, Y, or Z axes.
266
+ *
267
+ * For example, set X_DUAL_STEPPER_DRIVERS setting to use a second motor. If the motors need to
268
+ * spin in opposite directions set INVERT_X2_VS_X_DIR. If the second motor needs its own endstop
269
+ * set X_DUAL_ENDSTOPS. This can adjust for "racking." Use X2_USE_ENDSTOP to set the endstop plug
270
+ * that should be used for the second endstop. Extra endstops will appear in the output of 'M119'.
271
+ *
272
+ * Use X_DUAL_ENDSTOP_ADJUSTMENT to adjust for mechanical imperfection. After homing both motors
273
+ * this offset is applied to the X2 motor. To find the offset home the X axis, and measure the error
274
+ * in X2. Dual endstop offsets can be set at runtime with 'M666 X<offset> Y<offset> Z<offset>'.
275
+ */
276
+
263
 //#define X_DUAL_STEPPER_DRIVERS
277
 //#define X_DUAL_STEPPER_DRIVERS
264
 #if ENABLED(X_DUAL_STEPPER_DRIVERS)
278
 #if ENABLED(X_DUAL_STEPPER_DRIVERS)
265
-  // Set true if the two X motors need to rotate in opposite directions
266
-  #define INVERT_X2_VS_X_DIR true
279
+  #define INVERT_X2_VS_X_DIR true   // Set 'true' if X motors should rotate in opposite directions
280
+  //#define X_DUAL_ENDSTOPS
281
+  #if ENABLED(X_DUAL_ENDSTOPS)
282
+    #define X2_USE_ENDSTOP _XMAX_
283
+    #define X_DUAL_ENDSTOPS_ADJUSTMENT  0
284
+  #endif
267
 #endif
285
 #endif
268
 
286
 
269
-// Dual Y Steppers
270
-// Uncomment this option to drive two Y axis motors.
271
-// The next unused E driver will be assigned to the second Y stepper.
272
 //#define Y_DUAL_STEPPER_DRIVERS
287
 //#define Y_DUAL_STEPPER_DRIVERS
273
 #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
288
 #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
274
-  // Set true if the two Y motors need to rotate in opposite directions
275
-  #define INVERT_Y2_VS_Y_DIR true
289
+  #define INVERT_Y2_VS_Y_DIR true   // Set 'true' if Y motors should rotate in opposite directions
290
+  //#define Y_DUAL_ENDSTOPS
291
+  #if ENABLED(Y_DUAL_ENDSTOPS)
292
+    #define Y2_USE_ENDSTOP _YMAX_
293
+    #define Y_DUAL_ENDSTOPS_ADJUSTMENT  0
294
+  #endif
276
 #endif
295
 #endif
277
 
296
 
278
-// A single Z stepper driver is usually used to drive 2 stepper motors.
279
-// Uncomment this option to use a separate stepper driver for each Z axis motor.
280
-// The next unused E driver will be assigned to the second Z stepper.
281
 //#define Z_DUAL_STEPPER_DRIVERS
297
 //#define Z_DUAL_STEPPER_DRIVERS
282
-
283
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
298
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
284
-
285
-  // Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper.
286
-  // That way the machine is capable to align the bed during home, since both Z steppers are homed.
287
-  // There is also an implementation of M666 (software endstops adjustment) to this feature.
288
-  // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed.
289
-  // One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2.
290
-  // If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive.
291
-  // Play a little bit with small adjustments (0.5mm) and check the behaviour.
292
-  // The M119 (endstops report) will start reporting the Z2 Endstop as well.
293
-
294
   //#define Z_DUAL_ENDSTOPS
299
   //#define Z_DUAL_ENDSTOPS
295
-
296
   #if ENABLED(Z_DUAL_ENDSTOPS)
300
   #if ENABLED(Z_DUAL_ENDSTOPS)
297
     #define Z2_USE_ENDSTOP _XMAX_
301
     #define Z2_USE_ENDSTOP _XMAX_
298
-    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0  // Use M666 to determine/test this value
302
+    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0
299
   #endif
303
   #endif
300
-
301
-#endif // Z_DUAL_STEPPER_DRIVERS
304
+#endif
302
 
305
 
303
 // Enable this for dual x-carriage printers.
306
 // Enable this for dual x-carriage printers.
304
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
307
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
345
 
348
 
346
 // @section homing
349
 // @section homing
347
 
350
 
348
-//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
351
+// Homing hits each endstop, retracts by these distances, then does a slower bump.
349
 #define X_HOME_BUMP_MM 5
352
 #define X_HOME_BUMP_MM 5
350
 #define Y_HOME_BUMP_MM 5
353
 #define Y_HOME_BUMP_MM 5
351
 #define Z_HOME_BUMP_MM 3
354
 #define Z_HOME_BUMP_MM 3
352
-#define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
353
-//#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
355
+#define HOMING_BUMP_DIVISOR { 2, 2, 4 }  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
356
+//#define QUICK_HOME                     // If homing includes X and Y, do a diagonal move initially
354
 
357
 
355
 // When G28 is called, this option will make Y home before X
358
 // When G28 is called, this option will make Y home before X
356
 //#define HOME_Y_BEFORE_X
359
 //#define HOME_Y_BEFORE_X
434
 //#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 }   // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
437
 //#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 }   // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
435
 //#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 }    // Default drive percent - X, Y, Z, E axis
438
 //#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 }    // Default drive percent - X, Y, Z, E axis
436
 
439
 
437
-// Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
440
+// Use an I2C based DIGIPOT (e.g., Azteeg X3 Pro)
438
 //#define DIGIPOT_I2C
441
 //#define DIGIPOT_I2C
442
+#if ENABLED(DIGIPOT_I2C) && !defined(DIGIPOT_I2C_ADDRESS_A)
443
+  /**
444
+   * Common slave addresses:
445
+   *
446
+   *                    A   (A shifted)   B   (B shifted)  IC
447
+   * Smoothie          0x2C (0x58)       0x2D (0x5A)       MCP4451
448
+   * AZTEEG_X3_PRO     0x2C (0x58)       0x2E (0x5C)       MCP4451
449
+   * MIGHTYBOARD_REVE  0x2F (0x5E)                         MCP4018
450
+   */
451
+  #define DIGIPOT_I2C_ADDRESS_A 0x2C  // unshifted slave address for first DIGIPOT
452
+  #define DIGIPOT_I2C_ADDRESS_B 0x2D  // unshifted slave address for second DIGIPOT
453
+#endif
454
+
439
 //#define DIGIPOT_MCP4018          // Requires library from https://github.com/stawel/SlowSoftI2CMaster
455
 //#define DIGIPOT_MCP4018          // Requires library from https://github.com/stawel/SlowSoftI2CMaster
440
 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4     AZTEEG_X3_PRO: 8
456
 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4     AZTEEG_X3_PRO: 8
441
 // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
457
 // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
466
 // The timeout (in ms) to return to the status screen from sub-menus
482
 // The timeout (in ms) to return to the status screen from sub-menus
467
 //#define LCD_TIMEOUT_TO_STATUS 15000
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
468
 
484
 
485
+/**
486
+ * LED Control Menu
487
+ * Enable this feature to add LED Control to the LCD menu
488
+ */
489
+//#define LED_CONTROL_MENU
490
+#if ENABLED(LED_CONTROL_MENU)
491
+  #define LED_COLOR_PRESETS                 // Enable the Preset Color menu option
492
+  #if ENABLED(LED_COLOR_PRESETS)
493
+    #define LED_USER_PRESET_RED        255  // User defined RED value
494
+    #define LED_USER_PRESET_GREEN      128  // User defined GREEN value
495
+    #define LED_USER_PRESET_BLUE         0  // User defined BLUE value
496
+    #define LED_USER_PRESET_WHITE      255  // User defined WHITE value
497
+    #define LED_USER_PRESET_BRIGHTNESS 255  // User defined intensity
498
+    //#define LED_USER_PRESET_STARTUP       // Have the printer display the user preset color on startup
499
+  #endif
500
+#endif // LED_CONTROL_MENU
501
+
469
 #if ENABLED(SDSUPPORT)
502
 #if ENABLED(SDSUPPORT)
470
 
503
 
471
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
504
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
475
   // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
508
   // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
476
   #define SD_DETECT_INVERTED
509
   #define SD_DETECT_INVERTED
477
 
510
 
478
-  #define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
511
+  #define SD_FINISHED_STEPPERRELEASE true          // Disable steppers when SD Print is finished
479
   #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
512
   #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
480
 
513
 
481
-  #define SDCARD_RATHERRECENTFIRST  //reverse file order of sd card menu display. Its sorted practically after the file system block order.
482
-  // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that.
483
-  // using:
514
+  // Reverse SD sort to show "more recent" files first, according to the card's FAT.
515
+  // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended.
516
+  #define SDCARD_RATHERRECENTFIRST
517
+
518
+  // Add an option in the menu to run all auto#.g files
484
   //#define MENU_ADDAUTOSTART
519
   //#define MENU_ADDAUTOSTART
485
 
520
 
486
   /**
521
   /**
517
     #define SDSORT_USES_STACK  false  // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
552
     #define SDSORT_USES_STACK  false  // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
518
     #define SDSORT_CACHE_NAMES false  // Keep sorted items in RAM longer for speedy performance. Most expensive option.
553
     #define SDSORT_CACHE_NAMES false  // Keep sorted items in RAM longer for speedy performance. Most expensive option.
519
     #define SDSORT_DYNAMIC_RAM false  // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
554
     #define SDSORT_DYNAMIC_RAM false  // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
555
+    #define SDSORT_CACHE_VFATS 2      // Maximum number of 13-byte VFAT entries to use for sorting.
556
+                                      // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM.
520
   #endif
557
   #endif
521
 
558
 
522
   // Show a progress bar on HD44780 LCDs for SD printing
559
   // Show a progress bar on HD44780 LCDs for SD printing
535
     //#define LCD_PROGRESS_BAR_TEST
572
     //#define LCD_PROGRESS_BAR_TEST
536
   #endif
573
   #endif
537
 
574
 
575
+  // Add an 'M73' G-code to set the current percentage
576
+  //#define LCD_SET_PROGRESS_MANUALLY
577
+
538
   // This allows hosts to request long names for files and folders with M33
578
   // This allows hosts to request long names for files and folders with M33
539
   //#define LONG_FILENAME_HOST_SUPPORT
579
   //#define LONG_FILENAME_HOST_SUPPORT
540
 
580
 
541
-  // This option allows you to abort SD printing when any endstop is triggered.
542
-  // This feature must be enabled with "M540 S1" or from the LCD menu.
543
-  // To have any effect, endstops must be enabled during SD printing.
581
+  // Enable this option to scroll long filenames in the SD card menu
582
+  //#define SCROLL_LONG_FILENAMES
583
+
584
+  /**
585
+   * This option allows you to abort SD printing when any endstop is triggered.
586
+   * This feature must be enabled with "M540 S1" or from the LCD menu.
587
+   * To have any effect, endstops must be enabled during SD printing.
588
+   */
544
   //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
589
   //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
545
 
590
 
591
+  /**
592
+   * This option makes it easier to print the same SD Card file again.
593
+   * On print completion the LCD Menu will open with the file selected.
594
+   * You can just click to start the print, or navigate elsewhere.
595
+   */
596
+  //#define SD_REPRINT_LAST_SELECTED_FILE
597
+
546
 #endif // SDSUPPORT
598
 #endif // SDSUPPORT
547
 
599
 
548
 /**
600
 /**
575
   // Enable this option and reduce the value to optimize screen updates.
627
   // Enable this option and reduce the value to optimize screen updates.
576
   // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
628
   // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
577
   //#define DOGM_SPI_DELAY_US 5
629
   //#define DOGM_SPI_DELAY_US 5
630
+
631
+  // Swap the CW/CCW indicators in the graphics overlay
632
+  //#define OVERLAY_GFX_REVERSE
633
+
578
 #endif // DOGLCD
634
 #endif // DOGLCD
579
 
635
 
580
 // @section safety
636
 // @section safety
603
 #if ENABLED(BABYSTEPPING)
659
 #if ENABLED(BABYSTEPPING)
604
   //#define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
660
   //#define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
605
   #define BABYSTEP_INVERT_Z false    // Change if Z babysteps should go the other way
661
   #define BABYSTEP_INVERT_Z false    // Change if Z babysteps should go the other way
606
-  #define BABYSTEP_MULTIPLICATOR 100 // Babysteps are very small. Increase for faster motion.
662
+  #define BABYSTEP_MULTIPLICATOR 1   // Babysteps are very small. Increase for faster motion.
607
   //#define BABYSTEP_ZPROBE_OFFSET   // Enable to combine M851 and Babystepping
663
   //#define BABYSTEP_ZPROBE_OFFSET   // Enable to combine M851 and Babystepping
608
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
664
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
609
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
665
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
610
                                         // Note: Extra time may be added to mitigate controller latency.
666
                                         // Note: Extra time may be added to mitigate controller latency.
611
   //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
667
   //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
612
-  //#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators
613
 #endif
668
 #endif
614
 
669
 
615
 // @section extruder
670
 // @section extruder
656
 
711
 
657
 // @section leveling
712
 // @section leveling
658
 
713
 
659
-// Default mesh area is an area with an inset margin on the print area.
660
-// Below are the macros that are used to define the borders for the mesh area,
661
-// made available here for specialized needs, ie dual extruder setup.
662
-#if ENABLED(MESH_BED_LEVELING)
663
-  #define MESH_MIN_X MESH_INSET
664
-  #define MESH_MAX_X (X_BED_SIZE - (MESH_INSET))
665
-  #define MESH_MIN_Y MESH_INSET
666
-  #define MESH_MAX_Y (Y_BED_SIZE - (MESH_INSET))
667
-#elif ENABLED(AUTO_BED_LEVELING_UBL)
668
-  #define UBL_MESH_MIN_X UBL_MESH_INSET
669
-  #define UBL_MESH_MAX_X (X_BED_SIZE - (UBL_MESH_INSET))
670
-  #define UBL_MESH_MIN_Y UBL_MESH_INSET
671
-  #define UBL_MESH_MAX_Y (Y_BED_SIZE - (UBL_MESH_INSET))
672
-
673
-  // If this is defined, the currently active mesh will be saved in the
674
-  // current slot on M500.
675
-  #define UBL_SAVE_ACTIVE_ON_M500
714
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
715
+  #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
716
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
717
+  #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
718
+#endif
719
+
720
+#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL)
721
+  // Override the mesh area if the automatic (max) area is too large
722
+  //#define MESH_MIN_X MESH_INSET
723
+  //#define MESH_MIN_Y MESH_INSET
724
+  //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET)
725
+  //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
676
 #endif
726
 #endif
677
 
727
 
678
 // @section extras
728
 // @section extras
692
 //#define BEZIER_CURVE_SUPPORT
742
 //#define BEZIER_CURVE_SUPPORT
693
 
743
 
694
 // G38.2 and G38.3 Probe Target
744
 // G38.2 and G38.3 Probe Target
695
-// Enable PROBE_DOUBLE_TOUCH if you want G38 to double touch
745
+// Set MULTIPLE_PROBING if you want G38 to double touch
696
 //#define G38_PROBE_TARGET
746
 //#define G38_PROBE_TARGET
697
 #if ENABLED(G38_PROBE_TARGET)
747
 #if ENABLED(G38_PROBE_TARGET)
698
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
748
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
717
 // @section hidden
767
 // @section hidden
718
 
768
 
719
 // The number of linear motions that can be in the plan at any give time.
769
 // The number of linear motions that can be in the plan at any give time.
720
-// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2, i.g. 8,16,32 because shifts and ors are used to do the ring-buffering.
770
+// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2 (e.g. 8, 16, 32) because shifts and ors are used to do the ring-buffering.
721
 #if ENABLED(SDSUPPORT)
771
 #if ENABLED(SDSUPPORT)
722
   #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
772
   #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
723
 #else
773
 #else
808
 #endif
858
 #endif
809
 
859
 
810
 /**
860
 /**
861
+ * Extra Fan Speed
862
+ * Adds a secondary fan speed for each print-cooling fan.
863
+ *   'M106 P<fan> T3-255' : Set a secondary speed for <fan>
864
+ *   'M106 P<fan> T2'     : Use the set secondary speed
865
+ *   'M106 P<fan> T1'     : Restore the previous fan speed
866
+ */
867
+//#define EXTRA_FAN_SPEED
868
+
869
+/**
811
  * Advanced Pause
870
  * Advanced Pause
812
  * Experimental feature for filament change support and for parking the nozzle when paused.
871
  * Experimental feature for filament change support and for parking the nozzle when paused.
813
  * Adds the GCode M600 for initiating filament change.
872
  * Adds the GCode M600 for initiating filament change.
917
 
976
 
918
 #endif
977
 #endif
919
 
978
 
920
-// @section TMC2130
979
+// @section TMC2130, TMC2208
921
 
980
 
922
 /**
981
 /**
923
  * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
982
  * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
931
  */
990
  */
932
 //#define HAVE_TMC2130
991
 //#define HAVE_TMC2130
933
 
992
 
934
-#if ENABLED(HAVE_TMC2130)
993
+/**
994
+ * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
995
+ * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin.
996
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN
997
+ * to #_SERIAL_TX_PIN with a 1K resistor.
998
+ * The drivers can also be used with hardware serial.
999
+ *
1000
+ * You'll also need the TMC2208Stepper Arduino library
1001
+ * (https://github.com/teemuatlut/TMC2208Stepper).
1002
+ */
1003
+//#define HAVE_TMC2208
1004
+
1005
+#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
935
 
1006
 
936
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
1007
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
937
   //#define X_IS_TMC2130
1008
   //#define X_IS_TMC2130
946
   //#define E3_IS_TMC2130
1017
   //#define E3_IS_TMC2130
947
   //#define E4_IS_TMC2130
1018
   //#define E4_IS_TMC2130
948
 
1019
 
1020
+  //#define X_IS_TMC2208
1021
+  //#define X2_IS_TMC2208
1022
+  //#define Y_IS_TMC2208
1023
+  //#define Y2_IS_TMC2208
1024
+  //#define Z_IS_TMC2208
1025
+  //#define Z2_IS_TMC2208
1026
+  //#define E0_IS_TMC2208
1027
+  //#define E1_IS_TMC2208
1028
+  //#define E2_IS_TMC2208
1029
+  //#define E3_IS_TMC2208
1030
+  //#define E4_IS_TMC2208
1031
+
949
   /**
1032
   /**
950
    * Stepper driver settings
1033
    * Stepper driver settings
951
    */
1034
    */
952
 
1035
 
953
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1036
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
954
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1037
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
955
-  #define INTERPOLATE          1  // Interpolate X/Y/Z_MICROSTEPS to 256
1038
+  #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
956
 
1039
 
957
-  #define X_CURRENT         1000  // rms current in mA. Multiply by 1.41 for peak current.
1040
+  #define X_CURRENT          800  // rms current in mA. Multiply by 1.41 for peak current.
958
   #define X_MICROSTEPS        16  // 0..256
1041
   #define X_MICROSTEPS        16  // 0..256
959
 
1042
 
960
-  #define Y_CURRENT         1000
1043
+  #define Y_CURRENT          800
961
   #define Y_MICROSTEPS        16
1044
   #define Y_MICROSTEPS        16
962
 
1045
 
963
-  #define Z_CURRENT         1000
1046
+  #define Z_CURRENT          800
964
   #define Z_MICROSTEPS        16
1047
   #define Z_MICROSTEPS        16
965
 
1048
 
966
-  //#define X2_CURRENT      1000
967
-  //#define X2_MICROSTEPS     16
1049
+  #define X2_CURRENT         800
1050
+  #define X2_MICROSTEPS       16
968
 
1051
 
969
-  //#define Y2_CURRENT      1000
970
-  //#define Y2_MICROSTEPS     16
1052
+  #define Y2_CURRENT         800
1053
+  #define Y2_MICROSTEPS       16
971
 
1054
 
972
-  //#define Z2_CURRENT      1000
973
-  //#define Z2_MICROSTEPS     16
1055
+  #define Z2_CURRENT         800
1056
+  #define Z2_MICROSTEPS       16
974
 
1057
 
975
-  //#define E0_CURRENT      1000
976
-  //#define E0_MICROSTEPS     16
1058
+  #define E0_CURRENT         800
1059
+  #define E0_MICROSTEPS       16
977
 
1060
 
978
-  //#define E1_CURRENT      1000
979
-  //#define E1_MICROSTEPS     16
1061
+  #define E1_CURRENT         800
1062
+  #define E1_MICROSTEPS       16
980
 
1063
 
981
-  //#define E2_CURRENT      1000
982
-  //#define E2_MICROSTEPS     16
1064
+  #define E2_CURRENT         800
1065
+  #define E2_MICROSTEPS       16
983
 
1066
 
984
-  //#define E3_CURRENT      1000
985
-  //#define E3_MICROSTEPS     16
1067
+  #define E3_CURRENT         800
1068
+  #define E3_MICROSTEPS       16
986
 
1069
 
987
-  //#define E4_CURRENT      1000
988
-  //#define E4_MICROSTEPS     16
1070
+  #define E4_CURRENT         800
1071
+  #define E4_MICROSTEPS       16
989
 
1072
 
990
   /**
1073
   /**
991
    * Use Trinamic's ultra quiet stepping mode.
1074
    * Use Trinamic's ultra quiet stepping mode.
994
   #define STEALTHCHOP
1077
   #define STEALTHCHOP
995
 
1078
 
996
   /**
1079
   /**
997
-   * Let Marlin automatically control stepper current.
998
-   * This is still an experimental feature.
999
-   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
1000
-   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
1001
-   * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX
1080
+   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1081
+   * like overtemperature and short to ground. TMC2208 requires hardware serial.
1082
+   * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1083
+   * Other detected conditions can be used to stop the current print.
1002
    * Relevant g-codes:
1084
    * Relevant g-codes:
1003
    * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
1085
    * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
1004
-   * M906 S1 - Start adjusting current
1005
-   * M906 S0 - Stop adjusting current
1006
    * M911 - Report stepper driver overtemperature pre-warn condition.
1086
    * M911 - Report stepper driver overtemperature pre-warn condition.
1007
    * M912 - Clear stepper driver overtemperature pre-warn condition flag.
1087
    * M912 - Clear stepper driver overtemperature pre-warn condition flag.
1088
+   * M122 S0/1 - Report driver parameters (Requires TMC_DEBUG)
1008
    */
1089
    */
1009
-  //#define AUTOMATIC_CURRENT_CONTROL
1090
+  //#define MONITOR_DRIVER_STATUS
1010
 
1091
 
1011
-  #if ENABLED(AUTOMATIC_CURRENT_CONTROL)
1012
-    #define CURRENT_STEP          50  // [mA]
1013
-    #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
1092
+  #if ENABLED(MONITOR_DRIVER_STATUS)
1093
+    #define CURRENT_STEP_DOWN     50  // [mA]
1014
     #define REPORT_CURRENT_CHANGE
1094
     #define REPORT_CURRENT_CHANGE
1095
+    #define STOP_ON_ERROR
1015
   #endif
1096
   #endif
1016
 
1097
 
1017
   /**
1098
   /**
1026
   #define X2_HYBRID_THRESHOLD    100
1107
   #define X2_HYBRID_THRESHOLD    100
1027
   #define Y_HYBRID_THRESHOLD     100
1108
   #define Y_HYBRID_THRESHOLD     100
1028
   #define Y2_HYBRID_THRESHOLD    100
1109
   #define Y2_HYBRID_THRESHOLD    100
1029
-  #define Z_HYBRID_THRESHOLD       4
1030
-  #define Z2_HYBRID_THRESHOLD      4
1110
+  #define Z_HYBRID_THRESHOLD       3
1111
+  #define Z2_HYBRID_THRESHOLD      3
1031
   #define E0_HYBRID_THRESHOLD     30
1112
   #define E0_HYBRID_THRESHOLD     30
1032
   #define E1_HYBRID_THRESHOLD     30
1113
   #define E1_HYBRID_THRESHOLD     30
1033
   #define E2_HYBRID_THRESHOLD     30
1114
   #define E2_HYBRID_THRESHOLD     30
1037
   /**
1118
   /**
1038
    * Use stallGuard2 to sense an obstacle and trigger an endstop.
1119
    * Use stallGuard2 to sense an obstacle and trigger an endstop.
1039
    * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
1120
    * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
1040
-   * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal.
1121
+   * X and Y homing will always be done in spreadCycle mode.
1041
    *
1122
    *
1042
    * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
1123
    * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
1043
    * Higher values make the system LESS sensitive.
1124
    * Higher values make the system LESS sensitive.
1046
    * It is advised to set X/Y_HOME_BUMP_MM to 0.
1127
    * It is advised to set X/Y_HOME_BUMP_MM to 0.
1047
    * M914 X/Y to live tune the setting
1128
    * M914 X/Y to live tune the setting
1048
    */
1129
    */
1049
-  //#define SENSORLESS_HOMING
1130
+  //#define SENSORLESS_HOMING // TMC2130 only
1050
 
1131
 
1051
   #if ENABLED(SENSORLESS_HOMING)
1132
   #if ENABLED(SENSORLESS_HOMING)
1052
-    #define X_HOMING_SENSITIVITY  19
1053
-    #define Y_HOMING_SENSITIVITY  19
1133
+    #define X_HOMING_SENSITIVITY  8
1134
+    #define Y_HOMING_SENSITIVITY  8
1054
   #endif
1135
   #endif
1055
 
1136
 
1056
   /**
1137
   /**
1138
+   * Enable M122 debugging command for TMC stepper drivers.
1139
+   * M122 S0/1 will enable continous reporting.
1140
+   */
1141
+  //#define TMC_DEBUG
1142
+
1143
+  /**
1057
    * You can set your own advanced settings by filling in predefined functions.
1144
    * You can set your own advanced settings by filling in predefined functions.
1058
    * A list of available functions can be found on the library github page
1145
    * A list of available functions can be found on the library github page
1059
    * https://github.com/teemuatlut/TMC2130Stepper
1146
    * https://github.com/teemuatlut/TMC2130Stepper
1147
+   * https://github.com/teemuatlut/TMC2208Stepper
1060
    *
1148
    *
1061
    * Example:
1149
    * Example:
1062
-   * #define TMC2130_ADV() { \
1150
+   * #define TMC_ADV() { \
1063
    *   stepperX.diag0_temp_prewarn(1); \
1151
    *   stepperX.diag0_temp_prewarn(1); \
1064
-   *   stepperX.interpolate(0); \
1152
+   *   stepperY.interpolate(0); \
1065
    * }
1153
    * }
1066
    */
1154
    */
1067
-  #define  TMC2130_ADV() {  }
1155
+  #define  TMC_ADV() {  }
1068
 
1156
 
1069
-#endif // HAVE_TMC2130
1157
+#endif // TMC2130 || TMC2208
1070
 
1158
 
1071
 // @section L6470
1159
 // @section L6470
1072
 
1160
 
1231
 #endif
1319
 #endif
1232
 
1320
 
1233
 /**
1321
 /**
1322
+ * Filament Width Sensor
1323
+ *
1324
+ * Measures the filament width in real-time and adjusts
1325
+ * flow rate to compensate for any irregularities.
1326
+ *
1327
+ * Also allows the measured filament diameter to set the
1328
+ * extrusion rate, so the slicer only has to specify the
1329
+ * volume.
1330
+ *
1331
+ * Only a single extruder is supported at this time.
1332
+ *
1333
+ *  34 RAMPS_14    : Analog input 5 on the AUX2 connector
1334
+ *  81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
1335
+ * 301 RAMBO       : Analog input 3
1336
+ *
1337
+ * Note: May require analog pins to be defined for other boards.
1338
+ */
1339
+//#define FILAMENT_WIDTH_SENSOR
1340
+
1341
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
1342
+  #define FILAMENT_SENSOR_EXTRUDER_NUM 0    // Index of the extruder that has the filament sensor. :[0,1,2,3,4]
1343
+  #define MEASUREMENT_DELAY_CM        14    // (cm) The distance from the filament sensor to the melting chamber
1344
+
1345
+  #define MEASURED_UPPER_LIMIT         3.30 // (mm) Upper limit used to validate sensor reading
1346
+  #define MEASURED_LOWER_LIMIT         1.90 // (mm) Lower limit used to validate sensor reading
1347
+  #define MAX_MEASUREMENT_DELAY       20    // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
1348
+
1349
+  #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
1350
+
1351
+  // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
1352
+  //#define FILAMENT_LCD_DISPLAY
1353
+#endif
1354
+
1355
+/**
1356
+ * CNC Coordinate Systems
1357
+ *
1358
+ * Enables G53 and G54-G59.3 commands to select coordinate systems
1359
+ * and G92.1 to reset the workspace to native machine space.
1360
+ */
1361
+//#define CNC_COORDINATE_SYSTEMS
1362
+
1363
+/**
1234
  * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
1364
  * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
1235
  */
1365
  */
1236
 //#define PINS_DEBUGGING
1366
 //#define PINS_DEBUGGING
1421
                                          // tweaks made to the configuration are affecting the printer in real-time.
1551
                                          // tweaks made to the configuration are affecting the printer in real-time.
1422
 #endif
1552
 #endif
1423
 
1553
 
1554
+/**
1555
+ * NanoDLP Sync support
1556
+ *
1557
+ * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
1558
+ * string to enable synchronization with DLP projector exposure. This change will allow to use
1559
+ * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
1560
+ */
1561
+//#define NANODLP_Z_SYNC
1562
+#if ENABLED(NANODLP_Z_SYNC)
1563
+  //#define NANODLP_ALL_AXIS  // Enables "Z_move_comp" output on any axis move.
1564
+                              // Default behaviour is limited to Z axis only.
1565
+#endif
1566
+
1424
 #endif // CONFIGURATION_ADV_H
1567
 #endif // CONFIGURATION_ADV_H

+ 160
- 91
Marlin/example_configurations/Felix/DUAL/Configuration.h Переглянути файл

37
  */
37
  */
38
 #ifndef CONFIGURATION_H
38
 #ifndef CONFIGURATION_H
39
 #define CONFIGURATION_H
39
 #define CONFIGURATION_H
40
-#define CONFIGURATION_H_VERSION 010100
40
+#define CONFIGURATION_H_VERSION 010107
41
 
41
 
42
 //===========================================================================
42
 //===========================================================================
43
 //============================= Getting Started =============================
43
 //============================= Getting Started =============================
136
 // :[1, 2, 3, 4, 5]
136
 // :[1, 2, 3, 4, 5]
137
 #define EXTRUDERS 2
137
 #define EXTRUDERS 2
138
 
138
 
139
+// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
140
+#define DEFAULT_NOMINAL_FILAMENT_DIA 3.0
141
+
139
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
142
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
140
 //#define SINGLENOZZLE
143
 //#define SINGLENOZZLE
141
 
144
 
336
 
339
 
337
 // Comment the following line to disable PID and enable bang-bang.
340
 // Comment the following line to disable PID and enable bang-bang.
338
 #define PIDTEMP
341
 #define PIDTEMP
339
-#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
340
-#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
342
+#define BANG_MAX 255     // Limits current to nozzle while in bang-bang mode; 255=full current
343
+#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
344
+#define PID_K1 0.95      // Smoothing factor within the PID
341
 #if ENABLED(PIDTEMP)
345
 #if ENABLED(PIDTEMP)
342
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
346
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
343
   //#define PID_DEBUG // Sends debug data to the serial port.
347
   //#define PID_DEBUG // Sends debug data to the serial port.
347
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
351
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
348
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
352
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
349
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
353
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
350
-  #define K1 0.95 //smoothing factor within the PID
351
 
354
 
352
   // Felix 2.0+ electronics with v4 Hotend
355
   // Felix 2.0+ electronics with v4 Hotend
353
   #define DEFAULT_Kp 12
356
   #define DEFAULT_Kp 12
409
 //===========================================================================
412
 //===========================================================================
410
 
413
 
411
 /**
414
 /**
412
- * Thermal Protection protects your printer from damage and fire if a
413
- * thermistor falls out or temperature sensors fail in any way.
415
+ * Thermal Protection provides additional protection to your printer from damage
416
+ * and fire. Marlin always includes safe min and max temperature ranges which
417
+ * protect against a broken or disconnected thermistor wire.
414
  *
418
  *
415
- * The issue: If a thermistor falls out or a temperature sensor fails,
416
- * Marlin can no longer sense the actual temperature. Since a disconnected
417
- * thermistor reads as a low temperature, the firmware will keep the heater on.
419
+ * The issue: If a thermistor falls out, it will report the much lower
420
+ * temperature of the air in the room, and the the firmware will keep
421
+ * the heater on.
418
  *
422
  *
419
  * If you get "Thermal Runaway" or "Heating failed" errors the
423
  * If you get "Thermal Runaway" or "Heating failed" errors the
420
  * details can be tuned in Configuration_adv.h
424
  * details can be tuned in Configuration_adv.h
555
 // @section probes
559
 // @section probes
556
 
560
 
557
 //
561
 //
558
-// See http://marlinfw.org/configuration/probes.html
562
+// See http://marlinfw.org/docs/configuration/probes.html
559
 //
563
 //
560
 
564
 
561
 /**
565
 /**
668
 // X and Y axis travel speed (mm/m) between probes
672
 // X and Y axis travel speed (mm/m) between probes
669
 #define XY_PROBE_SPEED 8000
673
 #define XY_PROBE_SPEED 8000
670
 
674
 
671
-// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH)
675
+// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
672
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
676
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
673
 
677
 
674
 // Speed for the "accurate" probe of each point
678
 // Speed for the "accurate" probe of each point
675
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
679
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
676
 
680
 
677
-// Use double touch for probing
678
-//#define PROBE_DOUBLE_TOUCH
681
+// The number of probes to perform at each point.
682
+//   Set to 2 for a fast/slow probe, using the second probe result.
683
+//   Set to 3 or more for slow probes, averaging the results.
684
+//#define MULTIPLE_PROBING 2
679
 
685
 
680
 /**
686
 /**
681
  * Z probes require clearance when deploying, stowing, and moving between
687
  * Z probes require clearance when deploying, stowing, and moving between
767
 #define Y_MAX_POS Y_BED_SIZE
773
 #define Y_MAX_POS Y_BED_SIZE
768
 #define Z_MAX_POS 235
774
 #define Z_MAX_POS 235
769
 
775
 
770
-// If enabled, axes won't move below MIN_POS in response to movement commands.
776
+/**
777
+ * Software Endstops
778
+ *
779
+ * - Prevent moves outside the set machine bounds.
780
+ * - Individual axes can be disabled, if desired.
781
+ * - X and Y only apply to Cartesian robots.
782
+ * - Use 'M211' to set software endstops on/off or report current state
783
+ */
784
+
785
+// Min software endstops curtail movement below minimum coordinate bounds
771
 #define MIN_SOFTWARE_ENDSTOPS
786
 #define MIN_SOFTWARE_ENDSTOPS
772
-// If enabled, axes won't move above MAX_POS in response to movement commands.
787
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
788
+  #define MIN_SOFTWARE_ENDSTOP_X
789
+  #define MIN_SOFTWARE_ENDSTOP_Y
790
+  #define MIN_SOFTWARE_ENDSTOP_Z
791
+#endif
792
+
793
+// Max software endstops curtail movement above maximum coordinate bounds
773
 #define MAX_SOFTWARE_ENDSTOPS
794
 #define MAX_SOFTWARE_ENDSTOPS
795
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
796
+  #define MAX_SOFTWARE_ENDSTOP_X
797
+  #define MAX_SOFTWARE_ENDSTOP_Y
798
+  #define MAX_SOFTWARE_ENDSTOP_Z
799
+#endif
774
 
800
 
775
 /**
801
 /**
776
  * Filament Runout Sensor
802
  * Filament Runout Sensor
790
 //===========================================================================
816
 //===========================================================================
791
 //=============================== Bed Leveling ==============================
817
 //=============================== Bed Leveling ==============================
792
 //===========================================================================
818
 //===========================================================================
793
-// @section bedlevel
819
+// @section calibrate
794
 
820
 
795
 /**
821
 /**
796
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
822
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
816
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
842
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
817
  *   A comprehensive bed leveling system combining the features and benefits
843
  *   A comprehensive bed leveling system combining the features and benefits
818
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
844
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
819
- *   Validation and Mesh Editing systems. Currently, UBL is only checked out
820
- *   for Cartesian Printers. That said, it was primarily designed to correct
821
- *   poor quality Delta Printers. If you feel adventurous and have a Delta,
822
- *   please post an issue if something doesn't work correctly. Initially,
823
- *   you will need to set a reduced bed size so you have a rectangular area
824
- *   to test on.
845
+ *   Validation and Mesh Editing systems.
825
  *
846
  *
826
  * - MESH_BED_LEVELING
847
  * - MESH_BED_LEVELING
827
  *   Probe a grid manually
848
  *   Probe a grid manually
848
   // at which point movement will be level to the machine's XY plane.
869
   // at which point movement will be level to the machine's XY plane.
849
   // The height can be set with M420 Z<height>
870
   // The height can be set with M420 Z<height>
850
   #define ENABLE_LEVELING_FADE_HEIGHT
871
   #define ENABLE_LEVELING_FADE_HEIGHT
872
+
873
+  // For Cartesian machines, instead of dividing moves on mesh boundaries,
874
+  // split up moves into short segments like a Delta. This follows the
875
+  // contours of the bed more closely than edge-to-edge straight moves.
876
+  #define SEGMENT_LEVELED_MOVES
877
+  #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)
878
+
879
+  /**
880
+   * Enable the G26 Mesh Validation Pattern tool.
881
+   */
882
+  //#define G26_MESH_VALIDATION   // Enable G26 mesh validation
883
+  #if ENABLED(G26_MESH_VALIDATION)
884
+    #define MESH_TEST_NOZZLE_SIZE     0.4   // (mm) Diameter of primary nozzle.
885
+    #define MESH_TEST_LAYER_HEIGHT    0.2   // (mm) Default layer height for the G26 Mesh Validation Tool.
886
+    #define MESH_TEST_HOTEND_TEMP   205.0   // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
887
+    #define MESH_TEST_BED_TEMP       60.0   // (°C) Default bed temperature for the G26 Mesh Validation Tool.
888
+  #endif
889
+
851
 #endif
890
 #endif
852
 
891
 
853
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
892
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
903
   //========================= Unified Bed Leveling ============================
942
   //========================= Unified Bed Leveling ============================
904
   //===========================================================================
943
   //===========================================================================
905
 
944
 
906
-  #define UBL_MESH_INSET 1          // Mesh inset margin on print area
945
+  //#define MESH_EDIT_GFX_OVERLAY   // Display a graphics overlay while editing the mesh
946
+
947
+  #define MESH_INSET 1              // Mesh inset margin on print area
907
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
948
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
908
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
949
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
909
 
950
 
914
   #define UBL_PROBE_PT_3_X 180
955
   #define UBL_PROBE_PT_3_X 180
915
   #define UBL_PROBE_PT_3_Y 20
956
   #define UBL_PROBE_PT_3_Y 20
916
 
957
 
917
-  #define UBL_G26_MESH_VALIDATION   // Enable G26 mesh validation
918
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
958
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
959
+  #define UBL_SAVE_ACTIVE_ON_M500   // Save the currently active mesh in the current slot on M500
919
 
960
 
920
 #elif ENABLED(MESH_BED_LEVELING)
961
 #elif ENABLED(MESH_BED_LEVELING)
921
 
962
 
975
 //#define Z_SAFE_HOMING
1016
 //#define Z_SAFE_HOMING
976
 
1017
 
977
 #if ENABLED(Z_SAFE_HOMING)
1018
 #if ENABLED(Z_SAFE_HOMING)
978
-  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axis (G28).
979
-  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axis (G28).
1019
+  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axes (G28).
1020
+  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axes (G28).
980
 #endif
1021
 #endif
981
 
1022
 
982
 // Homing speeds (mm/m)
1023
 // Homing speeds (mm/m)
983
 #define HOMING_FEEDRATE_XY (50*60)
1024
 #define HOMING_FEEDRATE_XY (50*60)
984
 #define HOMING_FEEDRATE_Z  (4*60)
1025
 #define HOMING_FEEDRATE_Z  (4*60)
985
 
1026
 
1027
+// @section calibrate
1028
+
1029
+/**
1030
+ * Bed Skew Compensation
1031
+ *
1032
+ * This feature corrects for misalignment in the XYZ axes.
1033
+ *
1034
+ * Take the following steps to get the bed skew in the XY plane:
1035
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1036
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1037
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1038
+ *  4. For XY_SIDE_AD measure the edge A to D
1039
+ *
1040
+ * Marlin automatically computes skew factors from these measurements.
1041
+ * Skew factors may also be computed and set manually:
1042
+ *
1043
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1044
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1045
+ *
1046
+ * If desired, follow the same procedure for XZ and YZ.
1047
+ * Use these diagrams for reference:
1048
+ *
1049
+ *    Y                     Z                     Z
1050
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1051
+ *    |    /       /        |    /       /        |    /       /
1052
+ *    |   /       /         |   /       /         |   /       /
1053
+ *    |  A-------D          |  A-------D          |  A-------D
1054
+ *    +-------------->X     +-------------->X     +-------------->Y
1055
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1056
+ */
1057
+//#define SKEW_CORRECTION
1058
+
1059
+#if ENABLED(SKEW_CORRECTION)
1060
+  // Input all length measurements here:
1061
+  #define XY_DIAG_AC 282.8427124746
1062
+  #define XY_DIAG_BD 282.8427124746
1063
+  #define XY_SIDE_AD 200
1064
+
1065
+  // Or, set the default skew factors directly here
1066
+  // to override the above measurements:
1067
+  #define XY_SKEW_FACTOR 0.0
1068
+
1069
+  //#define SKEW_CORRECTION_FOR_Z
1070
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1071
+    #define XZ_DIAG_AC 282.8427124746
1072
+    #define XZ_DIAG_BD 282.8427124746
1073
+    #define YZ_DIAG_AC 282.8427124746
1074
+    #define YZ_DIAG_BD 282.8427124746
1075
+    #define YZ_SIDE_AD 200
1076
+    #define XZ_SKEW_FACTOR 0.0
1077
+    #define YZ_SKEW_FACTOR 0.0
1078
+  #endif
1079
+
1080
+  // Enable this option for M852 to set skew at runtime
1081
+  //#define SKEW_CORRECTION_GCODE
1082
+#endif
1083
+
986
 //=============================================================================
1084
 //=============================================================================
987
 //============================= Additional Features ===========================
1085
 //============================= Additional Features ===========================
988
 //=============================================================================
1086
 //=============================================================================
1014
 //
1112
 //
1015
 // M100 Free Memory Watcher
1113
 // M100 Free Memory Watcher
1016
 //
1114
 //
1017
-//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
1115
+//#define M100_FREE_MEMORY_WATCHER    // Add M100 (Free Memory Watcher) to debug memory usage
1018
 
1116
 
1019
 //
1117
 //
1020
 // G20/G21 Inch mode support
1118
 // G20/G21 Inch mode support
1159
  *
1257
  *
1160
  * Select the language to display on the LCD. These languages are available:
1258
  * Select the language to display on the LCD. These languages are available:
1161
  *
1259
  *
1162
- *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, gl, hr,
1163
- *    it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1260
+ *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, fr_utf8, gl,
1261
+ *    hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1164
  *    tr, uk, zh_CN, zh_TW, test
1262
  *    tr, uk, zh_CN, zh_TW, test
1165
  *
1263
  *
1166
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1264
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1167
  */
1265
  */
1168
-//#define LCD_LANGUAGE en
1266
+#define LCD_LANGUAGE en
1169
 
1267
 
1170
 /**
1268
 /**
1171
  * LCD Character Set
1269
  * LCD Character Set
1291
 // Note: Test audio output with the G-Code:
1389
 // Note: Test audio output with the G-Code:
1292
 //  M300 S<frequency Hz> P<duration ms>
1390
 //  M300 S<frequency Hz> P<duration ms>
1293
 //
1391
 //
1294
-//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
1295
-//#define LCD_FEEDBACK_FREQUENCY_HZ 1000
1392
+//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
1393
+//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
1296
 
1394
 
1297
 //
1395
 //
1298
 // CONTROLLER TYPE: Standard
1396
 // CONTROLLER TYPE: Standard
1400
 //#define CARTESIO_UI
1498
 //#define CARTESIO_UI
1401
 
1499
 
1402
 //
1500
 //
1403
-// ANET_10 Controller supported displays.
1501
+// ANET and Tronxy Controller supported displays.
1404
 //
1502
 //
1405
-//#define ANET_KEYPAD_LCD         // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1503
+//#define ZONESTAR_LCD            // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1406
                                   // This LCD is known to be susceptible to electrical interference
1504
                                   // This LCD is known to be susceptible to electrical interference
1407
                                   // which scrambles the display.  Pressing any button clears it up.
1505
                                   // which scrambles the display.  Pressing any button clears it up.
1506
+                                  // This is a LCD2004 display with 5 analog buttons.
1507
+
1408
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1508
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1409
                                   // A clone of the RepRapDiscount full graphics display but with
1509
                                   // A clone of the RepRapDiscount full graphics display but with
1410
                                   // different pins/wiring (see pins_ANET_10.h).
1510
                                   // different pins/wiring (see pins_ANET_10.h).
1514
 //
1614
 //
1515
 //#define MKS_12864OLED
1615
 //#define MKS_12864OLED
1516
 
1616
 
1617
+// Silvergate GLCD controller
1618
+// http://github.com/android444/Silvergate
1619
+//
1620
+//#define SILVER_GATE_GLCD_CONTROLLER
1621
+
1517
 //=============================================================================
1622
 //=============================================================================
1518
 //=============================== Extra Features ==============================
1623
 //=============================== Extra Features ==============================
1519
 //=============================================================================
1624
 //=============================================================================
1570
  * Adds the M150 command to set the LED (or LED strip) color.
1675
  * Adds the M150 command to set the LED (or LED strip) color.
1571
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1676
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1572
  * luminance values can be set from 0 to 255.
1677
  * luminance values can be set from 0 to 255.
1573
- * For Neopixel LED overall brightness parameters is also available 
1678
+ * For Neopixel LED an overall brightness parameter is also available.
1574
  *
1679
  *
1575
  * *** CAUTION ***
1680
  * *** CAUTION ***
1576
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1681
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1577
  *  as the Arduino cannot handle the current the LEDs will require.
1682
  *  as the Arduino cannot handle the current the LEDs will require.
1578
  *  Failure to follow this precaution can destroy your Arduino!
1683
  *  Failure to follow this precaution can destroy your Arduino!
1579
- *  The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
1580
- *  cannot handle such current, separate 5V power supply must be used
1684
+ *  NOTE: A separate 5V power supply is required! The Neopixel LED needs
1685
+ *  more current than the Arduino 5V linear regulator can produce.
1581
  * *** CAUTION ***
1686
  * *** CAUTION ***
1582
  *
1687
  *
1583
- * LED type. This options are mutualy exclusive. Uncomment only one.
1688
+ * LED Type. Enable only one of the following two options.
1584
  *
1689
  *
1585
  */
1690
  */
1586
 //#define RGB_LED
1691
 //#define RGB_LED
1596
 // Support for Adafruit Neopixel LED driver
1701
 // Support for Adafruit Neopixel LED driver
1597
 //#define NEOPIXEL_LED
1702
 //#define NEOPIXEL_LED
1598
 #if ENABLED(NEOPIXEL_LED)
1703
 #if ENABLED(NEOPIXEL_LED)
1599
-  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
1704
+  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
1600
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1705
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1601
-  #define NEOPIXEL_PIXELS 30       // Number of LEDs on strip
1602
-  #define NEOPIXEL_IS_SEQUENTIAL   // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
1603
-  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness 0-255
1706
+  #define NEOPIXEL_PIXELS 30       // Number of LEDs in the strip
1707
+  #define NEOPIXEL_IS_SEQUENTIAL   // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
1708
+  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness (0-255)
1604
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1709
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1605
 #endif
1710
 #endif
1606
 
1711
 
1615
  *  - Change to green once print has finished
1720
  *  - Change to green once print has finished
1616
  *  - Turn off after the print has finished and the user has pushed a button
1721
  *  - Turn off after the print has finished and the user has pushed a button
1617
  */
1722
  */
1618
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED)
1723
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
1619
   #define PRINTER_EVENT_LEDS
1724
   #define PRINTER_EVENT_LEDS
1620
 #endif
1725
 #endif
1621
 
1726
 
1622
-/*********************************************************************\
1623
-* R/C SERVO support
1624
-* Sponsored by TrinityLabs, Reworked by codexmas
1625
-**********************************************************************/
1727
+/**
1728
+ * R/C SERVO support
1729
+ * Sponsored by TrinityLabs, Reworked by codexmas
1730
+ */
1626
 
1731
 
1627
-// Number of servos
1628
-//
1629
-// If you select a configuration below, this will receive a default value and does not need to be set manually
1630
-// set it manually if you have more servos than extruders and wish to manually control some
1631
-// leaving it undefined or defining as 0 will disable the servo subsystem
1632
-// If unsure, leave commented / disabled
1633
-//
1732
+/**
1733
+ * Number of servos
1734
+ *
1735
+ * For some servo-related options NUM_SERVOS will be set automatically.
1736
+ * Set this manually if there are extra servos needing manual control.
1737
+ * Leave undefined or set to 0 to entirely disable the servo subsystem.
1738
+ */
1634
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1739
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1635
 
1740
 
1636
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1741
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1643
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1748
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1644
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1749
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1645
 
1750
 
1646
-/**
1647
- * Filament Width Sensor
1648
- *
1649
- * Measures the filament width in real-time and adjusts
1650
- * flow rate to compensate for any irregularities.
1651
- *
1652
- * Also allows the measured filament diameter to set the
1653
- * extrusion rate, so the slicer only has to specify the
1654
- * volume.
1655
- *
1656
- * Only a single extruder is supported at this time.
1657
- *
1658
- *  34 RAMPS_14    : Analog input 5 on the AUX2 connector
1659
- *  81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
1660
- * 301 RAMBO       : Analog input 3
1661
- *
1662
- * Note: May require analog pins to be defined for other boards.
1663
- */
1664
-//#define FILAMENT_WIDTH_SENSOR
1665
-
1666
-#define DEFAULT_NOMINAL_FILAMENT_DIA 3.00   // (mm) Diameter of the filament generally used (3.0 or 1.75mm), also used in the slicer. Used to validate sensor reading.
1667
-
1668
-#if ENABLED(FILAMENT_WIDTH_SENSOR)
1669
-  #define FILAMENT_SENSOR_EXTRUDER_NUM 0    // Index of the extruder that has the filament sensor (0,1,2,3)
1670
-  #define MEASUREMENT_DELAY_CM        14    // (cm) The distance from the filament sensor to the melting chamber
1671
-
1672
-  #define MEASURED_UPPER_LIMIT         3.30 // (mm) Upper limit used to validate sensor reading
1673
-  #define MEASURED_LOWER_LIMIT         1.90 // (mm) Lower limit used to validate sensor reading
1674
-  #define MAX_MEASUREMENT_DELAY       20    // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
1675
-
1676
-  #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
1677
-
1678
-  // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
1679
-  //#define FILAMENT_LCD_DISPLAY
1680
-#endif
1681
-
1682
 #endif // CONFIGURATION_H
1751
 #endif // CONFIGURATION_H

Marlin/example_configurations/Folger Tech/i3-2020/Configuration.h → Marlin/example_configurations/FolgerTech/i3-2020/Configuration.h Переглянути файл

37
  */
37
  */
38
 #ifndef CONFIGURATION_H
38
 #ifndef CONFIGURATION_H
39
 #define CONFIGURATION_H
39
 #define CONFIGURATION_H
40
-#define CONFIGURATION_H_VERSION 010100
40
+#define CONFIGURATION_H_VERSION 010107
41
 
41
 
42
 //===========================================================================
42
 //===========================================================================
43
 //============================= Getting Started =============================
43
 //============================= Getting Started =============================
136
 // :[1, 2, 3, 4, 5]
136
 // :[1, 2, 3, 4, 5]
137
 #define EXTRUDERS 1
137
 #define EXTRUDERS 1
138
 
138
 
139
+// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
140
+#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75
141
+
139
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
142
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
140
 //#define SINGLENOZZLE
143
 //#define SINGLENOZZLE
141
 
144
 
336
 
339
 
337
 // Comment the following line to disable PID and enable bang-bang.
340
 // Comment the following line to disable PID and enable bang-bang.
338
 #define PIDTEMP
341
 #define PIDTEMP
339
-#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
340
-#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
342
+#define BANG_MAX 255     // Limits current to nozzle while in bang-bang mode; 255=full current
343
+#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
344
+#define PID_K1 0.95      // Smoothing factor within the PID
341
 #if ENABLED(PIDTEMP)
345
 #if ENABLED(PIDTEMP)
342
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
346
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
343
   //#define PID_DEBUG // Sends debug data to the serial port.
347
   //#define PID_DEBUG // Sends debug data to the serial port.
347
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
351
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
348
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
352
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
349
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
353
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
350
-  #define K1 0.95 //smoothing factor within the PID
351
 
354
 
352
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
355
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
353
 
356
 
433
 //===========================================================================
436
 //===========================================================================
434
 
437
 
435
 /**
438
 /**
436
- * Thermal Protection protects your printer from damage and fire if a
437
- * thermistor falls out or temperature sensors fail in any way.
439
+ * Thermal Protection provides additional protection to your printer from damage
440
+ * and fire. Marlin always includes safe min and max temperature ranges which
441
+ * protect against a broken or disconnected thermistor wire.
438
  *
442
  *
439
- * The issue: If a thermistor falls out or a temperature sensor fails,
440
- * Marlin can no longer sense the actual temperature. Since a disconnected
441
- * thermistor reads as a low temperature, the firmware will keep the heater on.
443
+ * The issue: If a thermistor falls out, it will report the much lower
444
+ * temperature of the air in the room, and the the firmware will keep
445
+ * the heater on.
442
  *
446
  *
443
  * If you get "Thermal Runaway" or "Heating failed" errors the
447
  * If you get "Thermal Runaway" or "Heating failed" errors the
444
  * details can be tuned in Configuration_adv.h
448
  * details can be tuned in Configuration_adv.h
578
 // @section probes
582
 // @section probes
579
 
583
 
580
 //
584
 //
581
-// See http://marlinfw.org/configuration/probes.html
585
+// See http://marlinfw.org/docs/configuration/probes.html
582
 //
586
 //
583
 
587
 
584
 /**
588
 /**
690
 
694
 
691
 // X and Y axis travel speed (mm/m) between probes
695
 // X and Y axis travel speed (mm/m) between probes
692
 #define XY_PROBE_SPEED 7500
696
 #define XY_PROBE_SPEED 7500
693
-// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH)
697
+// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
694
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
698
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
695
 
699
 
696
 // Speed for the "accurate" probe of each point
700
 // Speed for the "accurate" probe of each point
697
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
701
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
698
 
702
 
699
-// Use double touch for probing
700
-//#define PROBE_DOUBLE_TOUCH
703
+// The number of probes to perform at each point.
704
+//   Set to 2 for a fast/slow probe, using the second probe result.
705
+//   Set to 3 or more for slow probes, averaging the results.
706
+//#define MULTIPLE_PROBING 2
701
 
707
 
702
 /**
708
 /**
703
  * Z probes require clearance when deploying, stowing, and moving between
709
  * Z probes require clearance when deploying, stowing, and moving between
788
 #define Y_MAX_POS Y_BED_SIZE
794
 #define Y_MAX_POS Y_BED_SIZE
789
 #define Z_MAX_POS 175
795
 #define Z_MAX_POS 175
790
 
796
 
791
-// If enabled, axes won't move below MIN_POS in response to movement commands.
797
+/**
798
+ * Software Endstops
799
+ *
800
+ * - Prevent moves outside the set machine bounds.
801
+ * - Individual axes can be disabled, if desired.
802
+ * - X and Y only apply to Cartesian robots.
803
+ * - Use 'M211' to set software endstops on/off or report current state
804
+ */
805
+
806
+// Min software endstops curtail movement below minimum coordinate bounds
792
 //#define MIN_SOFTWARE_ENDSTOPS
807
 //#define MIN_SOFTWARE_ENDSTOPS
793
-// If enabled, axes won't move above MAX_POS in response to movement commands.
808
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
809
+  #define MIN_SOFTWARE_ENDSTOP_X
810
+  #define MIN_SOFTWARE_ENDSTOP_Y
811
+  #define MIN_SOFTWARE_ENDSTOP_Z
812
+#endif
813
+
814
+// Max software endstops curtail movement above maximum coordinate bounds
794
 #define MAX_SOFTWARE_ENDSTOPS
815
 #define MAX_SOFTWARE_ENDSTOPS
816
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
817
+  #define MAX_SOFTWARE_ENDSTOP_X
818
+  #define MAX_SOFTWARE_ENDSTOP_Y
819
+  #define MAX_SOFTWARE_ENDSTOP_Z
820
+#endif
795
 
821
 
796
 /**
822
 /**
797
  * Filament Runout Sensor
823
  * Filament Runout Sensor
811
 //===========================================================================
837
 //===========================================================================
812
 //=============================== Bed Leveling ==============================
838
 //=============================== Bed Leveling ==============================
813
 //===========================================================================
839
 //===========================================================================
814
-// @section bedlevel
840
+// @section calibrate
815
 
841
 
816
 /**
842
 /**
817
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
843
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
837
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
863
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
838
  *   A comprehensive bed leveling system combining the features and benefits
864
  *   A comprehensive bed leveling system combining the features and benefits
839
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
865
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
840
- *   Validation and Mesh Editing systems. Currently, UBL is only checked out
841
- *   for Cartesian Printers. That said, it was primarily designed to correct
842
- *   poor quality Delta Printers. If you feel adventurous and have a Delta,
843
- *   please post an issue if something doesn't work correctly. Initially,
844
- *   you will need to set a reduced bed size so you have a rectangular area
845
- *   to test on.
866
+ *   Validation and Mesh Editing systems.
846
  *
867
  *
847
  * - MESH_BED_LEVELING
868
  * - MESH_BED_LEVELING
848
  *   Probe a grid manually
869
  *   Probe a grid manually
869
   // at which point movement will be level to the machine's XY plane.
890
   // at which point movement will be level to the machine's XY plane.
870
   // The height can be set with M420 Z<height>
891
   // The height can be set with M420 Z<height>
871
   #define ENABLE_LEVELING_FADE_HEIGHT
892
   #define ENABLE_LEVELING_FADE_HEIGHT
893
+
894
+  // For Cartesian machines, instead of dividing moves on mesh boundaries,
895
+  // split up moves into short segments like a Delta. This follows the
896
+  // contours of the bed more closely than edge-to-edge straight moves.
897
+  #define SEGMENT_LEVELED_MOVES
898
+  #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)
899
+
900
+  /**
901
+   * Enable the G26 Mesh Validation Pattern tool.
902
+   */
903
+  //#define G26_MESH_VALIDATION   // Enable G26 mesh validation
904
+  #if ENABLED(G26_MESH_VALIDATION)
905
+    #define MESH_TEST_NOZZLE_SIZE     0.4   // (mm) Diameter of primary nozzle.
906
+    #define MESH_TEST_LAYER_HEIGHT    0.2   // (mm) Default layer height for the G26 Mesh Validation Tool.
907
+    #define MESH_TEST_HOTEND_TEMP   205.0   // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
908
+    #define MESH_TEST_BED_TEMP       60.0   // (°C) Default bed temperature for the G26 Mesh Validation Tool.
909
+  #endif
910
+
872
 #endif
911
 #endif
873
 
912
 
874
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
913
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
926
   //========================= Unified Bed Leveling ============================
965
   //========================= Unified Bed Leveling ============================
927
   //===========================================================================
966
   //===========================================================================
928
 
967
 
929
-  #define UBL_MESH_INSET 1          // Mesh inset margin on print area
968
+  //#define MESH_EDIT_GFX_OVERLAY   // Display a graphics overlay while editing the mesh
969
+
970
+  #define MESH_INSET 1              // Mesh inset margin on print area
930
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
971
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
931
   #define GRID_MAX_POINTS_Y 10
972
   #define GRID_MAX_POINTS_Y 10
932
 
973
 
937
   #define UBL_PROBE_PT_3_X 180
978
   #define UBL_PROBE_PT_3_X 180
938
   #define UBL_PROBE_PT_3_Y 25
979
   #define UBL_PROBE_PT_3_Y 25
939
 
980
 
940
-  #define UBL_G26_MESH_VALIDATION   // Enable G26 mesh validation
941
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
981
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
982
+  #define UBL_SAVE_ACTIVE_ON_M500   // Save the currently active mesh in the current slot on M500
942
 
983
 
943
 #elif ENABLED(MESH_BED_LEVELING)
984
 #elif ENABLED(MESH_BED_LEVELING)
944
 
985
 
998
 #define Z_SAFE_HOMING
1039
 #define Z_SAFE_HOMING
999
 
1040
 
1000
 #if ENABLED(Z_SAFE_HOMING)
1041
 #if ENABLED(Z_SAFE_HOMING)
1001
-  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axis (G28).
1002
-  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axis (G28).
1042
+  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axes (G28).
1043
+  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axes (G28).
1003
 #endif
1044
 #endif
1004
 
1045
 
1005
 // Homing speeds (mm/m)
1046
 // Homing speeds (mm/m)
1006
 #define HOMING_FEEDRATE_XY (40*60)
1047
 #define HOMING_FEEDRATE_XY (40*60)
1007
 #define HOMING_FEEDRATE_Z  (55)
1048
 #define HOMING_FEEDRATE_Z  (55)
1008
 
1049
 
1050
+// @section calibrate
1051
+
1052
+/**
1053
+ * Bed Skew Compensation
1054
+ *
1055
+ * This feature corrects for misalignment in the XYZ axes.
1056
+ *
1057
+ * Take the following steps to get the bed skew in the XY plane:
1058
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1059
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1060
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1061
+ *  4. For XY_SIDE_AD measure the edge A to D
1062
+ *
1063
+ * Marlin automatically computes skew factors from these measurements.
1064
+ * Skew factors may also be computed and set manually:
1065
+ *
1066
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1067
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1068
+ *
1069
+ * If desired, follow the same procedure for XZ and YZ.
1070
+ * Use these diagrams for reference:
1071
+ *
1072
+ *    Y                     Z                     Z
1073
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1074
+ *    |    /       /        |    /       /        |    /       /
1075
+ *    |   /       /         |   /       /         |   /       /
1076
+ *    |  A-------D          |  A-------D          |  A-------D
1077
+ *    +-------------->X     +-------------->X     +-------------->Y
1078
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1079
+ */
1080
+//#define SKEW_CORRECTION
1081
+
1082
+#if ENABLED(SKEW_CORRECTION)
1083
+  // Input all length measurements here:
1084
+  #define XY_DIAG_AC 282.8427124746
1085
+  #define XY_DIAG_BD 282.8427124746
1086
+  #define XY_SIDE_AD 200
1087
+
1088
+  // Or, set the default skew factors directly here
1089
+  // to override the above measurements:
1090
+  #define XY_SKEW_FACTOR 0.0
1091
+
1092
+  //#define SKEW_CORRECTION_FOR_Z
1093
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1094
+    #define XZ_DIAG_AC 282.8427124746
1095
+    #define XZ_DIAG_BD 282.8427124746
1096
+    #define YZ_DIAG_AC 282.8427124746
1097
+    #define YZ_DIAG_BD 282.8427124746
1098
+    #define YZ_SIDE_AD 200
1099
+    #define XZ_SKEW_FACTOR 0.0
1100
+    #define YZ_SKEW_FACTOR 0.0
1101
+  #endif
1102
+
1103
+  // Enable this option for M852 to set skew at runtime
1104
+  //#define SKEW_CORRECTION_GCODE
1105
+#endif
1106
+
1009
 //=============================================================================
1107
 //=============================================================================
1010
 //============================= Additional Features ===========================
1108
 //============================= Additional Features ===========================
1011
 //=============================================================================
1109
 //=============================================================================
1037
 //
1135
 //
1038
 // M100 Free Memory Watcher
1136
 // M100 Free Memory Watcher
1039
 //
1137
 //
1040
-#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
1138
+#define M100_FREE_MEMORY_WATCHER    // Add M100 (Free Memory Watcher) to debug memory usage
1041
 
1139
 
1042
 //
1140
 //
1043
 // G20/G21 Inch mode support
1141
 // G20/G21 Inch mode support
1182
  *
1280
  *
1183
  * Select the language to display on the LCD. These languages are available:
1281
  * Select the language to display on the LCD. These languages are available:
1184
  *
1282
  *
1185
- *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, gl, hr,
1186
- *    it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1283
+ *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, fr_utf8, gl,
1284
+ *    hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1187
  *    tr, uk, zh_CN, zh_TW, test
1285
  *    tr, uk, zh_CN, zh_TW, test
1188
  *
1286
  *
1189
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1287
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1190
  */
1288
  */
1191
 #define LCD_LANGUAGE en
1289
 #define LCD_LANGUAGE en
1192
 
1290
 
1314
 // Note: Test audio output with the G-Code:
1412
 // Note: Test audio output with the G-Code:
1315
 //  M300 S<frequency Hz> P<duration ms>
1413
 //  M300 S<frequency Hz> P<duration ms>
1316
 //
1414
 //
1317
-//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
1318
-//#define LCD_FEEDBACK_FREQUENCY_HZ 1000
1415
+//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
1416
+//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
1319
 
1417
 
1320
 //
1418
 //
1321
 // CONTROLLER TYPE: Standard
1419
 // CONTROLLER TYPE: Standard
1423
 //#define CARTESIO_UI
1521
 //#define CARTESIO_UI
1424
 
1522
 
1425
 //
1523
 //
1426
-// ANET_10 Controller supported displays.
1524
+// ANET and Tronxy Controller supported displays.
1427
 //
1525
 //
1428
-//#define ANET_KEYPAD_LCD         // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1526
+//#define ZONESTAR_LCD            // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1429
                                   // This LCD is known to be susceptible to electrical interference
1527
                                   // This LCD is known to be susceptible to electrical interference
1430
                                   // which scrambles the display.  Pressing any button clears it up.
1528
                                   // which scrambles the display.  Pressing any button clears it up.
1529
+                                  // This is a LCD2004 display with 5 analog buttons.
1530
+
1431
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1531
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1432
                                   // A clone of the RepRapDiscount full graphics display but with
1532
                                   // A clone of the RepRapDiscount full graphics display but with
1433
                                   // different pins/wiring (see pins_ANET_10.h).
1533
                                   // different pins/wiring (see pins_ANET_10.h).
1537
 //
1637
 //
1538
 //#define MKS_12864OLED
1638
 //#define MKS_12864OLED
1539
 
1639
 
1640
+// Silvergate GLCD controller
1641
+// http://github.com/android444/Silvergate
1642
+//
1643
+//#define SILVER_GATE_GLCD_CONTROLLER
1644
+
1540
 //=============================================================================
1645
 //=============================================================================
1541
 //=============================== Extra Features ==============================
1646
 //=============================== Extra Features ==============================
1542
 //=============================================================================
1647
 //=============================================================================
1593
  * Adds the M150 command to set the LED (or LED strip) color.
1698
  * Adds the M150 command to set the LED (or LED strip) color.
1594
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1699
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1595
  * luminance values can be set from 0 to 255.
1700
  * luminance values can be set from 0 to 255.
1596
- * For Neopixel LED overall brightness parameters is also available 
1701
+ * For Neopixel LED an overall brightness parameter is also available.
1597
  *
1702
  *
1598
  * *** CAUTION ***
1703
  * *** CAUTION ***
1599
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1704
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1600
  *  as the Arduino cannot handle the current the LEDs will require.
1705
  *  as the Arduino cannot handle the current the LEDs will require.
1601
  *  Failure to follow this precaution can destroy your Arduino!
1706
  *  Failure to follow this precaution can destroy your Arduino!
1602
- *  The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
1603
- *  cannot handle such current, separate 5V power supply must be used
1707
+ *  NOTE: A separate 5V power supply is required! The Neopixel LED needs
1708
+ *  more current than the Arduino 5V linear regulator can produce.
1604
  * *** CAUTION ***
1709
  * *** CAUTION ***
1605
  *
1710
  *
1606
- * LED type. This options are mutualy exclusive. Uncomment only one.
1711
+ * LED Type. Enable only one of the following two options.
1607
  *
1712
  *
1608
  */
1713
  */
1609
 //#define RGB_LED
1714
 //#define RGB_LED
1619
 // Support for Adafruit Neopixel LED driver
1724
 // Support for Adafruit Neopixel LED driver
1620
 //#define NEOPIXEL_LED
1725
 //#define NEOPIXEL_LED
1621
 #if ENABLED(NEOPIXEL_LED)
1726
 #if ENABLED(NEOPIXEL_LED)
1622
-  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
1727
+  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
1623
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1728
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1624
-  #define NEOPIXEL_PIXELS 30       // Number of LEDs on strip
1625
-  #define NEOPIXEL_IS_SEQUENTIAL   // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
1626
-  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness 0-255
1729
+  #define NEOPIXEL_PIXELS 30       // Number of LEDs in the strip
1730
+  #define NEOPIXEL_IS_SEQUENTIAL   // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
1731
+  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness (0-255)
1627
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1732
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1628
 #endif
1733
 #endif
1629
 
1734
 
1638
  *  - Change to green once print has finished
1743
  *  - Change to green once print has finished
1639
  *  - Turn off after the print has finished and the user has pushed a button
1744
  *  - Turn off after the print has finished and the user has pushed a button
1640
  */
1745
  */
1641
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED)
1746
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
1642
   #define PRINTER_EVENT_LEDS
1747
   #define PRINTER_EVENT_LEDS
1643
 #endif
1748
 #endif
1644
 
1749
 
1645
-/*********************************************************************\
1646
-* R/C SERVO support
1647
-* Sponsored by TrinityLabs, Reworked by codexmas
1648
-**********************************************************************/
1750
+/**
1751
+ * R/C SERVO support
1752
+ * Sponsored by TrinityLabs, Reworked by codexmas
1753
+ */
1649
 
1754
 
1650
-// Number of servos
1651
-//
1652
-// If you select a configuration below, this will receive a default value and does not need to be set manually
1653
-// set it manually if you have more servos than extruders and wish to manually control some
1654
-// leaving it undefined or defining as 0 will disable the servo subsystem
1655
-// If unsure, leave commented / disabled
1656
-//
1755
+/**
1756
+ * Number of servos
1757
+ *
1758
+ * For some servo-related options NUM_SERVOS will be set automatically.
1759
+ * Set this manually if there are extra servos needing manual control.
1760
+ * Leave undefined or set to 0 to entirely disable the servo subsystem.
1761
+ */
1657
 #define NUM_SERVOS 2 // Servo index starts with 0 for M280 command
1762
 #define NUM_SERVOS 2 // Servo index starts with 0 for M280 command
1658
 
1763
 
1659
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1764
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1666
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1771
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1667
 #define DEACTIVATE_SERVOS_AFTER_MOVE
1772
 #define DEACTIVATE_SERVOS_AFTER_MOVE
1668
 
1773
 
1669
-/**
1670
- * Filament Width Sensor
1671
- *
1672
- * Measures the filament width in real-time and adjusts
1673
- * flow rate to compensate for any irregularities.
1674
- *
1675
- * Also allows the measured filament diameter to set the
1676
- * extrusion rate, so the slicer only has to specify the
1677
- * volume.
1678
- *
1679
- * Only a single extruder is supported at this time.
1680
- *
1681
- *  34 RAMPS_14    : Analog input 5 on the AUX2 connector
1682
- *  81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
1683
- * 301 RAMBO       : Analog input 3
1684
- *
1685
- * Note: May require analog pins to be defined for other boards.
1686
- */
1687
-//#define FILAMENT_WIDTH_SENSOR
1688
-
1689
-#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75   // (mm) Diameter of the filament generally used (3.0 or 1.75mm), also used in the slicer. Used to validate sensor reading.
1690
-
1691
-#if ENABLED(FILAMENT_WIDTH_SENSOR)
1692
-  #define FILAMENT_SENSOR_EXTRUDER_NUM 0    // Index of the extruder that has the filament sensor (0,1,2,3)
1693
-  #define MEASUREMENT_DELAY_CM        14    // (cm) The distance from the filament sensor to the melting chamber
1694
-
1695
-  #define MEASURED_UPPER_LIMIT         3.30 // (mm) Upper limit used to validate sensor reading
1696
-  #define MEASURED_LOWER_LIMIT         1.90 // (mm) Lower limit used to validate sensor reading
1697
-  #define MAX_MEASUREMENT_DELAY       20    // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
1698
-
1699
-  #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
1700
-
1701
-  // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
1702
-  //#define FILAMENT_LCD_DISPLAY
1703
-#endif
1704
-
1705
 #endif // CONFIGURATION_H
1774
 #endif // CONFIGURATION_H

Marlin/example_configurations/Folger Tech/i3-2020/Configuration_adv.h → Marlin/example_configurations/FolgerTech/i3-2020/Configuration_adv.h Переглянути файл

32
  */
32
  */
33
 #ifndef CONFIGURATION_ADV_H
33
 #ifndef CONFIGURATION_ADV_H
34
 #define CONFIGURATION_ADV_H
34
 #define CONFIGURATION_ADV_H
35
-#define CONFIGURATION_ADV_H_VERSION 010100
35
+#define CONFIGURATION_ADV_H_VERSION 010107
36
 
36
 
37
 // @section temperature
37
 // @section temperature
38
 
38
 
48
 #endif
48
 #endif
49
 
49
 
50
 /**
50
 /**
51
- * Thermal Protection protects your printer from damage and fire if a
52
- * thermistor falls out or temperature sensors fail in any way.
51
+ * Thermal Protection provides additional protection to your printer from damage
52
+ * and fire. Marlin always includes safe min and max temperature ranges which
53
+ * protect against a broken or disconnected thermistor wire.
53
  *
54
  *
54
- * The issue: If a thermistor falls out or a temperature sensor fails,
55
- * Marlin can no longer sense the actual temperature. Since a disconnected
56
- * thermistor reads as a low temperature, the firmware will keep the heater on.
55
+ * The issue: If a thermistor falls out, it will report the much lower
56
+ * temperature of the air in the room, and the the firmware will keep
57
+ * the heater on.
57
  *
58
  *
58
  * The solution: Once the temperature reaches the target, start observing.
59
  * The solution: Once the temperature reaches the target, start observing.
59
- * If the temperature stays too far below the target (hysteresis) for too long (period),
60
- * the firmware will halt the machine as a safety precaution.
60
+ * If the temperature stays too far below the target (hysteresis) for too
61
+ * long (period), the firmware will halt the machine as a safety precaution.
61
  *
62
  *
62
- * If you get false positives for "Thermal Runaway" increase THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
63
+ * If you get false positives for "Thermal Runaway", increase
64
+ * THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
63
  */
65
  */
64
 #if ENABLED(THERMAL_PROTECTION_HOTENDS)
66
 #if ENABLED(THERMAL_PROTECTION_HOTENDS)
65
   #define THERMAL_PROTECTION_PERIOD 40        // Seconds
67
   #define THERMAL_PROTECTION_PERIOD 40        // Seconds
66
   #define THERMAL_PROTECTION_HYSTERESIS 2     // Degrees Celsius
68
   #define THERMAL_PROTECTION_HYSTERESIS 2     // Degrees Celsius
67
 
69
 
68
   /**
70
   /**
69
-   * Whenever an M104 or M109 increases the target temperature the firmware will wait for the
70
-   * WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
71
-   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
72
-   * but only if the current temperature is far enough below the target for a reliable test.
71
+   * Whenever an M104, M109, or M303 increases the target temperature, the
72
+   * firmware will wait for the WATCH_TEMP_PERIOD to expire. If the temperature
73
+   * hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted and
74
+   * requires a hard reset. This test restarts with any M104/M109/M303, but only
75
+   * if the current temperature is far enough below the target for a reliable
76
+   * test.
73
    *
77
    *
74
-   * If you get false positives for "Heating failed" increase WATCH_TEMP_PERIOD and/or decrease WATCH_TEMP_INCREASE
75
-   * WATCH_TEMP_INCREASE should not be below 2.
78
+   * If you get false positives for "Heating failed", increase WATCH_TEMP_PERIOD
79
+   * and/or decrease WATCH_TEMP_INCREASE. WATCH_TEMP_INCREASE should not be set
80
+   * below 2.
76
    */
81
    */
77
   #define WATCH_TEMP_PERIOD 40                // Seconds
82
   #define WATCH_TEMP_PERIOD 40                // Seconds
78
   #define WATCH_TEMP_INCREASE 2               // Degrees Celsius
83
   #define WATCH_TEMP_INCREASE 2               // Degrees Celsius
86
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
91
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
87
 
92
 
88
   /**
93
   /**
89
-   * Whenever an M140 or M190 increases the target temperature the firmware will wait for the
90
-   * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE
91
-   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190,
92
-   * but only if the current temperature is far enough below the target for a reliable test.
93
-   *
94
-   * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease
95
-   * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.)
94
+   * As described above, except for the bed (M140/M190/M303).
96
    */
95
    */
97
   #define WATCH_BED_TEMP_PERIOD 60                // Seconds
96
   #define WATCH_BED_TEMP_PERIOD 60                // Seconds
98
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
97
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
123
   #define AUTOTEMP_OLDWEIGHT 0.98
122
   #define AUTOTEMP_OLDWEIGHT 0.98
124
 #endif
123
 #endif
125
 
124
 
125
+// Show extra position information in M114
126
+//#define M114_DETAIL
127
+
126
 // Show Temperature ADC value
128
 // Show Temperature ADC value
127
 // Enable for M105 to include ADC values read from temperature sensors.
129
 // Enable for M105 to include ADC values read from temperature sensors.
128
 //#define SHOW_TEMP_ADC_VALUES
130
 //#define SHOW_TEMP_ADC_VALUES
257
 
259
 
258
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
260
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
259
 
261
 
260
-// Dual X Steppers
261
-// Uncomment this option to drive two X axis motors.
262
-// The next unused E driver will be assigned to the second X stepper.
262
+/**
263
+ * Dual Steppers / Dual Endstops
264
+ *
265
+ * This section will allow you to use extra E drivers to drive a second motor for X, Y, or Z axes.
266
+ *
267
+ * For example, set X_DUAL_STEPPER_DRIVERS setting to use a second motor. If the motors need to
268
+ * spin in opposite directions set INVERT_X2_VS_X_DIR. If the second motor needs its own endstop
269
+ * set X_DUAL_ENDSTOPS. This can adjust for "racking." Use X2_USE_ENDSTOP to set the endstop plug
270
+ * that should be used for the second endstop. Extra endstops will appear in the output of 'M119'.
271
+ *
272
+ * Use X_DUAL_ENDSTOP_ADJUSTMENT to adjust for mechanical imperfection. After homing both motors
273
+ * this offset is applied to the X2 motor. To find the offset home the X axis, and measure the error
274
+ * in X2. Dual endstop offsets can be set at runtime with 'M666 X<offset> Y<offset> Z<offset>'.
275
+ */
276
+
263
 //#define X_DUAL_STEPPER_DRIVERS
277
 //#define X_DUAL_STEPPER_DRIVERS
264
 #if ENABLED(X_DUAL_STEPPER_DRIVERS)
278
 #if ENABLED(X_DUAL_STEPPER_DRIVERS)
265
-  // Set true if the two X motors need to rotate in opposite directions
266
-  #define INVERT_X2_VS_X_DIR true
279
+  #define INVERT_X2_VS_X_DIR true   // Set 'true' if X motors should rotate in opposite directions
280
+  //#define X_DUAL_ENDSTOPS
281
+  #if ENABLED(X_DUAL_ENDSTOPS)
282
+    #define X2_USE_ENDSTOP _XMAX_
283
+    #define X_DUAL_ENDSTOPS_ADJUSTMENT  0
284
+  #endif
267
 #endif
285
 #endif
268
 
286
 
269
-// Dual Y Steppers
270
-// Uncomment this option to drive two Y axis motors.
271
-// The next unused E driver will be assigned to the second Y stepper.
272
 //#define Y_DUAL_STEPPER_DRIVERS
287
 //#define Y_DUAL_STEPPER_DRIVERS
273
 #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
288
 #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
274
-  // Set true if the two Y motors need to rotate in opposite directions
275
-  #define INVERT_Y2_VS_Y_DIR true
289
+  #define INVERT_Y2_VS_Y_DIR true   // Set 'true' if Y motors should rotate in opposite directions
290
+  //#define Y_DUAL_ENDSTOPS
291
+  #if ENABLED(Y_DUAL_ENDSTOPS)
292
+    #define Y2_USE_ENDSTOP _YMAX_
293
+    #define Y_DUAL_ENDSTOPS_ADJUSTMENT  0
294
+  #endif
276
 #endif
295
 #endif
277
 
296
 
278
-// A single Z stepper driver is usually used to drive 2 stepper motors.
279
-// Uncomment this option to use a separate stepper driver for each Z axis motor.
280
-// The next unused E driver will be assigned to the second Z stepper.
281
 //#define Z_DUAL_STEPPER_DRIVERS
297
 //#define Z_DUAL_STEPPER_DRIVERS
282
-
283
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
298
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
284
-
285
-  // Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper.
286
-  // That way the machine is capable to align the bed during home, since both Z steppers are homed.
287
-  // There is also an implementation of M666 (software endstops adjustment) to this feature.
288
-  // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed.
289
-  // One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2.
290
-  // If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive.
291
-  // Play a little bit with small adjustments (0.5mm) and check the behaviour.
292
-  // The M119 (endstops report) will start reporting the Z2 Endstop as well.
293
-
294
   //#define Z_DUAL_ENDSTOPS
299
   //#define Z_DUAL_ENDSTOPS
295
-
296
   #if ENABLED(Z_DUAL_ENDSTOPS)
300
   #if ENABLED(Z_DUAL_ENDSTOPS)
297
     #define Z2_USE_ENDSTOP _XMAX_
301
     #define Z2_USE_ENDSTOP _XMAX_
298
-    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0  // Use M666 to determine/test this value
302
+    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0
299
   #endif
303
   #endif
300
-
301
-#endif // Z_DUAL_STEPPER_DRIVERS
304
+#endif
302
 
305
 
303
 // Enable this for dual x-carriage printers.
306
 // Enable this for dual x-carriage printers.
304
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
307
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
345
 
348
 
346
 // @section homing
349
 // @section homing
347
 
350
 
348
-//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
351
+// Homing hits each endstop, retracts by these distances, then does a slower bump.
349
 #define X_HOME_BUMP_MM 5
352
 #define X_HOME_BUMP_MM 5
350
 #define Y_HOME_BUMP_MM 5
353
 #define Y_HOME_BUMP_MM 5
351
 #define Z_HOME_BUMP_MM 2
354
 #define Z_HOME_BUMP_MM 2
352
-#define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
353
-//#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
355
+#define HOMING_BUMP_DIVISOR { 2, 2, 4 }  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
356
+//#define QUICK_HOME                     // If homing includes X and Y, do a diagonal move initially
354
 
357
 
355
 // When G28 is called, this option will make Y home before X
358
 // When G28 is called, this option will make Y home before X
356
 //#define HOME_Y_BEFORE_X
359
 //#define HOME_Y_BEFORE_X
434
 //#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 }   // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
437
 //#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 }   // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
435
 //#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 }    // Default drive percent - X, Y, Z, E axis
438
 //#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 }    // Default drive percent - X, Y, Z, E axis
436
 
439
 
437
-// Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
440
+// Use an I2C based DIGIPOT (e.g., Azteeg X3 Pro)
438
 //#define DIGIPOT_I2C
441
 //#define DIGIPOT_I2C
442
+#if ENABLED(DIGIPOT_I2C) && !defined(DIGIPOT_I2C_ADDRESS_A)
443
+  /**
444
+   * Common slave addresses:
445
+   *
446
+   *                    A   (A shifted)   B   (B shifted)  IC
447
+   * Smoothie          0x2C (0x58)       0x2D (0x5A)       MCP4451
448
+   * AZTEEG_X3_PRO     0x2C (0x58)       0x2E (0x5C)       MCP4451
449
+   * MIGHTYBOARD_REVE  0x2F (0x5E)                         MCP4018
450
+   */
451
+  #define DIGIPOT_I2C_ADDRESS_A 0x2C  // unshifted slave address for first DIGIPOT
452
+  #define DIGIPOT_I2C_ADDRESS_B 0x2D  // unshifted slave address for second DIGIPOT
453
+#endif
454
+
439
 //#define DIGIPOT_MCP4018          // Requires library from https://github.com/stawel/SlowSoftI2CMaster
455
 //#define DIGIPOT_MCP4018          // Requires library from https://github.com/stawel/SlowSoftI2CMaster
440
 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4     AZTEEG_X3_PRO: 8
456
 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4     AZTEEG_X3_PRO: 8
441
 // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
457
 // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
466
 // The timeout (in ms) to return to the status screen from sub-menus
482
 // The timeout (in ms) to return to the status screen from sub-menus
467
 //#define LCD_TIMEOUT_TO_STATUS 15000
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
468
 
484
 
485
+/**
486
+ * LED Control Menu
487
+ * Enable this feature to add LED Control to the LCD menu
488
+ */
489
+//#define LED_CONTROL_MENU
490
+#if ENABLED(LED_CONTROL_MENU)
491
+  #define LED_COLOR_PRESETS                 // Enable the Preset Color menu option
492
+  #if ENABLED(LED_COLOR_PRESETS)
493
+    #define LED_USER_PRESET_RED        255  // User defined RED value
494
+    #define LED_USER_PRESET_GREEN      128  // User defined GREEN value
495
+    #define LED_USER_PRESET_BLUE         0  // User defined BLUE value
496
+    #define LED_USER_PRESET_WHITE      255  // User defined WHITE value
497
+    #define LED_USER_PRESET_BRIGHTNESS 255  // User defined intensity
498
+    //#define LED_USER_PRESET_STARTUP       // Have the printer display the user preset color on startup
499
+  #endif
500
+#endif // LED_CONTROL_MENU
501
+
469
 #if ENABLED(SDSUPPORT)
502
 #if ENABLED(SDSUPPORT)
470
 
503
 
471
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
504
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
475
   // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
508
   // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
476
   #define SD_DETECT_INVERTED
509
   #define SD_DETECT_INVERTED
477
 
510
 
478
-  #define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
511
+  #define SD_FINISHED_STEPPERRELEASE true          // Disable steppers when SD Print is finished
479
   #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
512
   #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
480
 
513
 
481
-  #define SDCARD_RATHERRECENTFIRST  //reverse file order of sd card menu display. Its sorted practically after the file system block order.
482
-  // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that.
483
-  // using:
514
+  // Reverse SD sort to show "more recent" files first, according to the card's FAT.
515
+  // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended.
516
+  #define SDCARD_RATHERRECENTFIRST
517
+
518
+  // Add an option in the menu to run all auto#.g files
484
   //#define MENU_ADDAUTOSTART
519
   //#define MENU_ADDAUTOSTART
485
 
520
 
486
   /**
521
   /**
517
     #define SDSORT_USES_STACK  false  // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
552
     #define SDSORT_USES_STACK  false  // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
518
     #define SDSORT_CACHE_NAMES false  // Keep sorted items in RAM longer for speedy performance. Most expensive option.
553
     #define SDSORT_CACHE_NAMES false  // Keep sorted items in RAM longer for speedy performance. Most expensive option.
519
     #define SDSORT_DYNAMIC_RAM false  // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
554
     #define SDSORT_DYNAMIC_RAM false  // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
555
+    #define SDSORT_CACHE_VFATS 2      // Maximum number of 13-byte VFAT entries to use for sorting.
556
+                                      // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM.
520
   #endif
557
   #endif
521
 
558
 
522
   // Show a progress bar on HD44780 LCDs for SD printing
559
   // Show a progress bar on HD44780 LCDs for SD printing
535
     //#define LCD_PROGRESS_BAR_TEST
572
     //#define LCD_PROGRESS_BAR_TEST
536
   #endif
573
   #endif
537
 
574
 
575
+  // Add an 'M73' G-code to set the current percentage
576
+  //#define LCD_SET_PROGRESS_MANUALLY
577
+
538
   // This allows hosts to request long names for files and folders with M33
578
   // This allows hosts to request long names for files and folders with M33
539
   //#define LONG_FILENAME_HOST_SUPPORT
579
   //#define LONG_FILENAME_HOST_SUPPORT
540
 
580
 
541
-  // This option allows you to abort SD printing when any endstop is triggered.
542
-  // This feature must be enabled with "M540 S1" or from the LCD menu.
543
-  // To have any effect, endstops must be enabled during SD printing.
581
+  // Enable this option to scroll long filenames in the SD card menu
582
+  //#define SCROLL_LONG_FILENAMES
583
+
584
+  /**
585
+   * This option allows you to abort SD printing when any endstop is triggered.
586
+   * This feature must be enabled with "M540 S1" or from the LCD menu.
587
+   * To have any effect, endstops must be enabled during SD printing.
588
+   */
544
   //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
589
   //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
545
 
590
 
591
+  /**
592
+   * This option makes it easier to print the same SD Card file again.
593
+   * On print completion the LCD Menu will open with the file selected.
594
+   * You can just click to start the print, or navigate elsewhere.
595
+   */
596
+  //#define SD_REPRINT_LAST_SELECTED_FILE
597
+
546
 #endif // SDSUPPORT
598
 #endif // SDSUPPORT
547
 
599
 
548
 /**
600
 /**
575
   // Enable this option and reduce the value to optimize screen updates.
627
   // Enable this option and reduce the value to optimize screen updates.
576
   // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
628
   // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
577
   //#define DOGM_SPI_DELAY_US 5
629
   //#define DOGM_SPI_DELAY_US 5
630
+
631
+  // Swap the CW/CCW indicators in the graphics overlay
632
+  //#define OVERLAY_GFX_REVERSE
633
+
578
 #endif // DOGLCD
634
 #endif // DOGLCD
579
 
635
 
580
 // @section safety
636
 // @section safety
601
  */
657
  */
602
 #define BABYSTEPPING
658
 #define BABYSTEPPING
603
 #if ENABLED(BABYSTEPPING)
659
 #if ENABLED(BABYSTEPPING)
604
-  //#define BABYSTEP_XY            // Also enable X/Y Babystepping. Not supported on DELTA!
605
-  #define BABYSTEP_INVERT_Z false  // Change if Z babysteps should go the other way
606
-  #define BABYSTEP_MULTIPLICATOR 2 // Babysteps are very small. Increase for faster motion.
607
-  //#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
660
+  //#define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
661
+  #define BABYSTEP_INVERT_Z false    // Change if Z babysteps should go the other way
662
+  #define BABYSTEP_MULTIPLICATOR   2 // Babysteps are very small. Increase for faster motion.
663
+  //#define BABYSTEP_ZPROBE_OFFSET   // Enable to combine M851 and Babystepping
608
   #define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
664
   #define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
609
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
665
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
610
                                         // Note: Extra time may be added to mitigate controller latency.
666
                                         // Note: Extra time may be added to mitigate controller latency.
611
   //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
667
   //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
612
-  //#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators
613
 #endif
668
 #endif
614
 
669
 
615
 // @section extruder
670
 // @section extruder
656
 
711
 
657
 // @section leveling
712
 // @section leveling
658
 
713
 
659
-// Default mesh area is an area with an inset margin on the print area.
660
-// Below are the macros that are used to define the borders for the mesh area,
661
-// made available here for specialized needs, ie dual extruder setup.
662
-#if ENABLED(MESH_BED_LEVELING)
663
-  #define MESH_MIN_X MESH_INSET
664
-  #define MESH_MAX_X (X_BED_SIZE - (MESH_INSET))
665
-  #define MESH_MIN_Y MESH_INSET
666
-  #define MESH_MAX_Y (Y_BED_SIZE - (MESH_INSET))
667
-#elif ENABLED(AUTO_BED_LEVELING_UBL)
668
-  #define UBL_MESH_MIN_X UBL_MESH_INSET
669
-  #define UBL_MESH_MAX_X (X_BED_SIZE - (UBL_MESH_INSET))
670
-  #define UBL_MESH_MIN_Y UBL_MESH_INSET
671
-  #define UBL_MESH_MAX_Y (Y_BED_SIZE - (UBL_MESH_INSET))
672
-
673
-  // If this is defined, the currently active mesh will be saved in the
674
-  // current slot on M500.
675
-  #define UBL_SAVE_ACTIVE_ON_M500
714
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
715
+  #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
716
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
717
+  #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
718
+#endif
719
+
720
+#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL)
721
+  // Override the mesh area if the automatic (max) area is too large
722
+  //#define MESH_MIN_X MESH_INSET
723
+  //#define MESH_MIN_Y MESH_INSET
724
+  //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET)
725
+  //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
676
 #endif
726
 #endif
677
 
727
 
678
 // @section extras
728
 // @section extras
692
 //#define BEZIER_CURVE_SUPPORT
742
 //#define BEZIER_CURVE_SUPPORT
693
 
743
 
694
 // G38.2 and G38.3 Probe Target
744
 // G38.2 and G38.3 Probe Target
695
-// Enable PROBE_DOUBLE_TOUCH if you want G38 to double touch
745
+// Set MULTIPLE_PROBING if you want G38 to double touch
696
 //#define G38_PROBE_TARGET
746
 //#define G38_PROBE_TARGET
697
 #if ENABLED(G38_PROBE_TARGET)
747
 #if ENABLED(G38_PROBE_TARGET)
698
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
748
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
717
 // @section hidden
767
 // @section hidden
718
 
768
 
719
 // The number of linear motions that can be in the plan at any give time.
769
 // The number of linear motions that can be in the plan at any give time.
720
-// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2, i.g. 8,16,32 because shifts and ors are used to do the ring-buffering.
770
+// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2 (e.g. 8, 16, 32) because shifts and ors are used to do the ring-buffering.
721
 #if ENABLED(SDSUPPORT)
771
 #if ENABLED(SDSUPPORT)
722
   #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
772
   #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
723
 #else
773
 #else
808
 #endif
858
 #endif
809
 
859
 
810
 /**
860
 /**
861
+ * Extra Fan Speed
862
+ * Adds a secondary fan speed for each print-cooling fan.
863
+ *   'M106 P<fan> T3-255' : Set a secondary speed for <fan>
864
+ *   'M106 P<fan> T2'     : Use the set secondary speed
865
+ *   'M106 P<fan> T1'     : Restore the previous fan speed
866
+ */
867
+//#define EXTRA_FAN_SPEED
868
+
869
+/**
811
  * Advanced Pause
870
  * Advanced Pause
812
  * Experimental feature for filament change support and for parking the nozzle when paused.
871
  * Experimental feature for filament change support and for parking the nozzle when paused.
813
  * Adds the GCode M600 for initiating filament change.
872
  * Adds the GCode M600 for initiating filament change.
917
 
976
 
918
 #endif
977
 #endif
919
 
978
 
920
-// @section TMC2130
979
+// @section TMC2130, TMC2208
921
 
980
 
922
 /**
981
 /**
923
  * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
982
  * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
931
  */
990
  */
932
 //#define HAVE_TMC2130
991
 //#define HAVE_TMC2130
933
 
992
 
934
-#if ENABLED(HAVE_TMC2130)
993
+/**
994
+ * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
995
+ * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin.
996
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN
997
+ * to #_SERIAL_TX_PIN with a 1K resistor.
998
+ * The drivers can also be used with hardware serial.
999
+ *
1000
+ * You'll also need the TMC2208Stepper Arduino library
1001
+ * (https://github.com/teemuatlut/TMC2208Stepper).
1002
+ */
1003
+//#define HAVE_TMC2208
1004
+
1005
+#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
935
 
1006
 
936
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
1007
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
937
   //#define X_IS_TMC2130
1008
   //#define X_IS_TMC2130
946
   //#define E3_IS_TMC2130
1017
   //#define E3_IS_TMC2130
947
   //#define E4_IS_TMC2130
1018
   //#define E4_IS_TMC2130
948
 
1019
 
1020
+  //#define X_IS_TMC2208
1021
+  //#define X2_IS_TMC2208
1022
+  //#define Y_IS_TMC2208
1023
+  //#define Y2_IS_TMC2208
1024
+  //#define Z_IS_TMC2208
1025
+  //#define Z2_IS_TMC2208
1026
+  //#define E0_IS_TMC2208
1027
+  //#define E1_IS_TMC2208
1028
+  //#define E2_IS_TMC2208
1029
+  //#define E3_IS_TMC2208
1030
+  //#define E4_IS_TMC2208
1031
+
949
   /**
1032
   /**
950
    * Stepper driver settings
1033
    * Stepper driver settings
951
    */
1034
    */
952
 
1035
 
953
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1036
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
954
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1037
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
955
-  #define INTERPOLATE          1  // Interpolate X/Y/Z_MICROSTEPS to 256
1038
+  #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
956
 
1039
 
957
-  #define X_CURRENT         1000  // rms current in mA. Multiply by 1.41 for peak current.
1040
+  #define X_CURRENT          800  // rms current in mA. Multiply by 1.41 for peak current.
958
   #define X_MICROSTEPS        16  // 0..256
1041
   #define X_MICROSTEPS        16  // 0..256
959
 
1042
 
960
-  #define Y_CURRENT         1000
1043
+  #define Y_CURRENT          800
961
   #define Y_MICROSTEPS        16
1044
   #define Y_MICROSTEPS        16
962
 
1045
 
963
-  #define Z_CURRENT         1000
1046
+  #define Z_CURRENT          800
964
   #define Z_MICROSTEPS        16
1047
   #define Z_MICROSTEPS        16
965
 
1048
 
966
-  //#define X2_CURRENT      1000
967
-  //#define X2_MICROSTEPS     16
1049
+  #define X2_CURRENT         800
1050
+  #define X2_MICROSTEPS       16
968
 
1051
 
969
-  //#define Y2_CURRENT      1000
970
-  //#define Y2_MICROSTEPS     16
1052
+  #define Y2_CURRENT         800
1053
+  #define Y2_MICROSTEPS       16
971
 
1054
 
972
-  //#define Z2_CURRENT      1000
973
-  //#define Z2_MICROSTEPS     16
1055
+  #define Z2_CURRENT         800
1056
+  #define Z2_MICROSTEPS       16
974
 
1057
 
975
-  //#define E0_CURRENT      1000
976
-  //#define E0_MICROSTEPS     16
1058
+  #define E0_CURRENT         800
1059
+  #define E0_MICROSTEPS       16
977
 
1060
 
978
-  //#define E1_CURRENT      1000
979
-  //#define E1_MICROSTEPS     16
1061
+  #define E1_CURRENT         800
1062
+  #define E1_MICROSTEPS       16
980
 
1063
 
981
-  //#define E2_CURRENT      1000
982
-  //#define E2_MICROSTEPS     16
1064
+  #define E2_CURRENT         800
1065
+  #define E2_MICROSTEPS       16
983
 
1066
 
984
-  //#define E3_CURRENT      1000
985
-  //#define E3_MICROSTEPS     16
1067
+  #define E3_CURRENT         800
1068
+  #define E3_MICROSTEPS       16
986
 
1069
 
987
-  //#define E4_CURRENT      1000
988
-  //#define E4_MICROSTEPS     16
1070
+  #define E4_CURRENT         800
1071
+  #define E4_MICROSTEPS       16
989
 
1072
 
990
   /**
1073
   /**
991
    * Use Trinamic's ultra quiet stepping mode.
1074
    * Use Trinamic's ultra quiet stepping mode.
994
   #define STEALTHCHOP
1077
   #define STEALTHCHOP
995
 
1078
 
996
   /**
1079
   /**
997
-   * Let Marlin automatically control stepper current.
998
-   * This is still an experimental feature.
999
-   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
1000
-   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
1001
-   * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX
1080
+   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1081
+   * like overtemperature and short to ground. TMC2208 requires hardware serial.
1082
+   * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1083
+   * Other detected conditions can be used to stop the current print.
1002
    * Relevant g-codes:
1084
    * Relevant g-codes:
1003
    * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
1085
    * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
1004
-   * M906 S1 - Start adjusting current
1005
-   * M906 S0 - Stop adjusting current
1006
    * M911 - Report stepper driver overtemperature pre-warn condition.
1086
    * M911 - Report stepper driver overtemperature pre-warn condition.
1007
    * M912 - Clear stepper driver overtemperature pre-warn condition flag.
1087
    * M912 - Clear stepper driver overtemperature pre-warn condition flag.
1088
+   * M122 S0/1 - Report driver parameters (Requires TMC_DEBUG)
1008
    */
1089
    */
1009
-  //#define AUTOMATIC_CURRENT_CONTROL
1090
+  //#define MONITOR_DRIVER_STATUS
1010
 
1091
 
1011
-  #if ENABLED(AUTOMATIC_CURRENT_CONTROL)
1012
-    #define CURRENT_STEP          50  // [mA]
1013
-    #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
1092
+  #if ENABLED(MONITOR_DRIVER_STATUS)
1093
+    #define CURRENT_STEP_DOWN     50  // [mA]
1014
     #define REPORT_CURRENT_CHANGE
1094
     #define REPORT_CURRENT_CHANGE
1095
+    #define STOP_ON_ERROR
1015
   #endif
1096
   #endif
1016
 
1097
 
1017
   /**
1098
   /**
1026
   #define X2_HYBRID_THRESHOLD    100
1107
   #define X2_HYBRID_THRESHOLD    100
1027
   #define Y_HYBRID_THRESHOLD     100
1108
   #define Y_HYBRID_THRESHOLD     100
1028
   #define Y2_HYBRID_THRESHOLD    100
1109
   #define Y2_HYBRID_THRESHOLD    100
1029
-  #define Z_HYBRID_THRESHOLD       4
1030
-  #define Z2_HYBRID_THRESHOLD      4
1110
+  #define Z_HYBRID_THRESHOLD       3
1111
+  #define Z2_HYBRID_THRESHOLD      3
1031
   #define E0_HYBRID_THRESHOLD     30
1112
   #define E0_HYBRID_THRESHOLD     30
1032
   #define E1_HYBRID_THRESHOLD     30
1113
   #define E1_HYBRID_THRESHOLD     30
1033
   #define E2_HYBRID_THRESHOLD     30
1114
   #define E2_HYBRID_THRESHOLD     30
1037
   /**
1118
   /**
1038
    * Use stallGuard2 to sense an obstacle and trigger an endstop.
1119
    * Use stallGuard2 to sense an obstacle and trigger an endstop.
1039
    * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
1120
    * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
1040
-   * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal.
1121
+   * X and Y homing will always be done in spreadCycle mode.
1041
    *
1122
    *
1042
    * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
1123
    * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
1043
    * Higher values make the system LESS sensitive.
1124
    * Higher values make the system LESS sensitive.
1046
    * It is advised to set X/Y_HOME_BUMP_MM to 0.
1127
    * It is advised to set X/Y_HOME_BUMP_MM to 0.
1047
    * M914 X/Y to live tune the setting
1128
    * M914 X/Y to live tune the setting
1048
    */
1129
    */
1049
-  //#define SENSORLESS_HOMING
1130
+  //#define SENSORLESS_HOMING // TMC2130 only
1050
 
1131
 
1051
   #if ENABLED(SENSORLESS_HOMING)
1132
   #if ENABLED(SENSORLESS_HOMING)
1052
-    #define X_HOMING_SENSITIVITY  19
1053
-    #define Y_HOMING_SENSITIVITY  19
1133
+    #define X_HOMING_SENSITIVITY  8
1134
+    #define Y_HOMING_SENSITIVITY  8
1054
   #endif
1135
   #endif
1055
 
1136
 
1056
   /**
1137
   /**
1138
+   * Enable M122 debugging command for TMC stepper drivers.
1139
+   * M122 S0/1 will enable continous reporting.
1140
+   */
1141
+  //#define TMC_DEBUG
1142
+
1143
+  /**
1057
    * You can set your own advanced settings by filling in predefined functions.
1144
    * You can set your own advanced settings by filling in predefined functions.
1058
    * A list of available functions can be found on the library github page
1145
    * A list of available functions can be found on the library github page
1059
    * https://github.com/teemuatlut/TMC2130Stepper
1146
    * https://github.com/teemuatlut/TMC2130Stepper
1147
+   * https://github.com/teemuatlut/TMC2208Stepper
1060
    *
1148
    *
1061
    * Example:
1149
    * Example:
1062
-   * #define TMC2130_ADV() { \
1150
+   * #define TMC_ADV() { \
1063
    *   stepperX.diag0_temp_prewarn(1); \
1151
    *   stepperX.diag0_temp_prewarn(1); \
1064
-   *   stepperX.interpolate(0); \
1152
+   *   stepperY.interpolate(0); \
1065
    * }
1153
    * }
1066
    */
1154
    */
1067
-  #define  TMC2130_ADV() {  }
1155
+  #define  TMC_ADV() {  }
1068
 
1156
 
1069
-#endif // HAVE_TMC2130
1157
+#endif // TMC2130 || TMC2208
1070
 
1158
 
1071
 // @section L6470
1159
 // @section L6470
1072
 
1160
 
1231
 #endif
1319
 #endif
1232
 
1320
 
1233
 /**
1321
 /**
1322
+ * Filament Width Sensor
1323
+ *
1324
+ * Measures the filament width in real-time and adjusts
1325
+ * flow rate to compensate for any irregularities.
1326
+ *
1327
+ * Also allows the measured filament diameter to set the
1328
+ * extrusion rate, so the slicer only has to specify the
1329
+ * volume.
1330
+ *
1331
+ * Only a single extruder is supported at this time.
1332
+ *
1333
+ *  34 RAMPS_14    : Analog input 5 on the AUX2 connector
1334
+ *  81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
1335
+ * 301 RAMBO       : Analog input 3
1336
+ *
1337
+ * Note: May require analog pins to be defined for other boards.
1338
+ */
1339
+//#define FILAMENT_WIDTH_SENSOR
1340
+
1341
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
1342
+  #define FILAMENT_SENSOR_EXTRUDER_NUM 0    // Index of the extruder that has the filament sensor. :[0,1,2,3,4]
1343
+  #define MEASUREMENT_DELAY_CM        14    // (cm) The distance from the filament sensor to the melting chamber
1344
+
1345
+  #define MEASURED_UPPER_LIMIT         3.30 // (mm) Upper limit used to validate sensor reading
1346
+  #define MEASURED_LOWER_LIMIT         1.90 // (mm) Lower limit used to validate sensor reading
1347
+  #define MAX_MEASUREMENT_DELAY       20    // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
1348
+
1349
+  #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
1350
+
1351
+  // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
1352
+  //#define FILAMENT_LCD_DISPLAY
1353
+#endif
1354
+
1355
+/**
1356
+ * CNC Coordinate Systems
1357
+ *
1358
+ * Enables G53 and G54-G59.3 commands to select coordinate systems
1359
+ * and G92.1 to reset the workspace to native machine space.
1360
+ */
1361
+//#define CNC_COORDINATE_SYSTEMS
1362
+
1363
+/**
1234
  * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
1364
  * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
1235
  */
1365
  */
1236
 #define PINS_DEBUGGING
1366
 #define PINS_DEBUGGING
1421
                                          // tweaks made to the configuration are affecting the printer in real-time.
1551
                                          // tweaks made to the configuration are affecting the printer in real-time.
1422
 #endif
1552
 #endif
1423
 
1553
 
1554
+/**
1555
+ * NanoDLP Sync support
1556
+ *
1557
+ * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
1558
+ * string to enable synchronization with DLP projector exposure. This change will allow to use
1559
+ * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
1560
+ */
1561
+//#define NANODLP_Z_SYNC
1562
+#if ENABLED(NANODLP_Z_SYNC)
1563
+  //#define NANODLP_ALL_AXIS  // Enables "Z_move_comp" output on any axis move.
1564
+                              // Default behaviour is limited to Z axis only.
1565
+#endif
1566
+
1424
 #endif // CONFIGURATION_ADV_H
1567
 #endif // CONFIGURATION_ADV_H

+ 160
- 91
Marlin/example_configurations/Geeetech/GT2560/Configuration.h Переглянути файл

37
  */
37
  */
38
 #ifndef CONFIGURATION_H
38
 #ifndef CONFIGURATION_H
39
 #define CONFIGURATION_H
39
 #define CONFIGURATION_H
40
-#define CONFIGURATION_H_VERSION 010100
40
+#define CONFIGURATION_H_VERSION 010107
41
 
41
 
42
 //===========================================================================
42
 //===========================================================================
43
 //============================= Getting Started =============================
43
 //============================= Getting Started =============================
136
 // :[1, 2, 3, 4, 5]
136
 // :[1, 2, 3, 4, 5]
137
 #define EXTRUDERS 1
137
 #define EXTRUDERS 1
138
 
138
 
139
+// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
140
+#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75
141
+
139
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
142
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
140
 //#define SINGLENOZZLE
143
 //#define SINGLENOZZLE
141
 
144
 
336
 
339
 
337
 // Comment the following line to disable PID and enable bang-bang.
340
 // Comment the following line to disable PID and enable bang-bang.
338
 #define PIDTEMP
341
 #define PIDTEMP
339
-#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
340
-#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
342
+#define BANG_MAX 255     // Limits current to nozzle while in bang-bang mode; 255=full current
343
+#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
344
+#define PID_K1 0.95      // Smoothing factor within the PID
341
 #if ENABLED(PIDTEMP)
345
 #if ENABLED(PIDTEMP)
342
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
346
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
343
   //#define PID_DEBUG // Sends debug data to the serial port.
347
   //#define PID_DEBUG // Sends debug data to the serial port.
347
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
351
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
348
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
352
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
349
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
353
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
350
-  #define K1 0.95 //smoothing factor within the PID
351
 
354
 
352
   // Geeetech MK8 Extruder
355
   // Geeetech MK8 Extruder
353
   #define  DEFAULT_Kp 12.33
356
   #define  DEFAULT_Kp 12.33
443
 //===========================================================================
446
 //===========================================================================
444
 
447
 
445
 /**
448
 /**
446
- * Thermal Protection protects your printer from damage and fire if a
447
- * thermistor falls out or temperature sensors fail in any way.
449
+ * Thermal Protection provides additional protection to your printer from damage
450
+ * and fire. Marlin always includes safe min and max temperature ranges which
451
+ * protect against a broken or disconnected thermistor wire.
448
  *
452
  *
449
- * The issue: If a thermistor falls out or a temperature sensor fails,
450
- * Marlin can no longer sense the actual temperature. Since a disconnected
451
- * thermistor reads as a low temperature, the firmware will keep the heater on.
453
+ * The issue: If a thermistor falls out, it will report the much lower
454
+ * temperature of the air in the room, and the the firmware will keep
455
+ * the heater on.
452
  *
456
  *
453
  * If you get "Thermal Runaway" or "Heating failed" errors the
457
  * If you get "Thermal Runaway" or "Heating failed" errors the
454
  * details can be tuned in Configuration_adv.h
458
  * details can be tuned in Configuration_adv.h
588
 // @section probes
592
 // @section probes
589
 
593
 
590
 //
594
 //
591
-// See http://marlinfw.org/configuration/probes.html
595
+// See http://marlinfw.org/docs/configuration/probes.html
592
 //
596
 //
593
 
597
 
594
 /**
598
 /**
701
 // X and Y axis travel speed (mm/m) between probes
705
 // X and Y axis travel speed (mm/m) between probes
702
 #define XY_PROBE_SPEED 8000
706
 #define XY_PROBE_SPEED 8000
703
 
707
 
704
-// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH)
708
+// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
705
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
709
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
706
 
710
 
707
 // Speed for the "accurate" probe of each point
711
 // Speed for the "accurate" probe of each point
708
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
712
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
709
 
713
 
710
-// Use double touch for probing
711
-//#define PROBE_DOUBLE_TOUCH
714
+// The number of probes to perform at each point.
715
+//   Set to 2 for a fast/slow probe, using the second probe result.
716
+//   Set to 3 or more for slow probes, averaging the results.
717
+//#define MULTIPLE_PROBING 2
712
 
718
 
713
 /**
719
 /**
714
  * Z probes require clearance when deploying, stowing, and moving between
720
  * Z probes require clearance when deploying, stowing, and moving between
800
 #define Y_MAX_POS Y_BED_SIZE
806
 #define Y_MAX_POS Y_BED_SIZE
801
 #define Z_MAX_POS 200
807
 #define Z_MAX_POS 200
802
 
808
 
803
-// If enabled, axes won't move below MIN_POS in response to movement commands.
809
+/**
810
+ * Software Endstops
811
+ *
812
+ * - Prevent moves outside the set machine bounds.
813
+ * - Individual axes can be disabled, if desired.
814
+ * - X and Y only apply to Cartesian robots.
815
+ * - Use 'M211' to set software endstops on/off or report current state
816
+ */
817
+
818
+// Min software endstops curtail movement below minimum coordinate bounds
804
 #define MIN_SOFTWARE_ENDSTOPS
819
 #define MIN_SOFTWARE_ENDSTOPS
805
-// If enabled, axes won't move above MAX_POS in response to movement commands.
820
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
821
+  #define MIN_SOFTWARE_ENDSTOP_X
822
+  #define MIN_SOFTWARE_ENDSTOP_Y
823
+  #define MIN_SOFTWARE_ENDSTOP_Z
824
+#endif
825
+
826
+// Max software endstops curtail movement above maximum coordinate bounds
806
 #define MAX_SOFTWARE_ENDSTOPS
827
 #define MAX_SOFTWARE_ENDSTOPS
828
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
829
+  #define MAX_SOFTWARE_ENDSTOP_X
830
+  #define MAX_SOFTWARE_ENDSTOP_Y
831
+  #define MAX_SOFTWARE_ENDSTOP_Z
832
+#endif
807
 
833
 
808
 /**
834
 /**
809
  * Filament Runout Sensor
835
  * Filament Runout Sensor
823
 //===========================================================================
849
 //===========================================================================
824
 //=============================== Bed Leveling ==============================
850
 //=============================== Bed Leveling ==============================
825
 //===========================================================================
851
 //===========================================================================
826
-// @section bedlevel
852
+// @section calibrate
827
 
853
 
828
 /**
854
 /**
829
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
855
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
849
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
875
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
850
  *   A comprehensive bed leveling system combining the features and benefits
876
  *   A comprehensive bed leveling system combining the features and benefits
851
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
877
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
852
- *   Validation and Mesh Editing systems. Currently, UBL is only checked out
853
- *   for Cartesian Printers. That said, it was primarily designed to correct
854
- *   poor quality Delta Printers. If you feel adventurous and have a Delta,
855
- *   please post an issue if something doesn't work correctly. Initially,
856
- *   you will need to set a reduced bed size so you have a rectangular area
857
- *   to test on.
878
+ *   Validation and Mesh Editing systems.
858
  *
879
  *
859
  * - MESH_BED_LEVELING
880
  * - MESH_BED_LEVELING
860
  *   Probe a grid manually
881
  *   Probe a grid manually
881
   // at which point movement will be level to the machine's XY plane.
902
   // at which point movement will be level to the machine's XY plane.
882
   // The height can be set with M420 Z<height>
903
   // The height can be set with M420 Z<height>
883
   #define ENABLE_LEVELING_FADE_HEIGHT
904
   #define ENABLE_LEVELING_FADE_HEIGHT
905
+
906
+  // For Cartesian machines, instead of dividing moves on mesh boundaries,
907
+  // split up moves into short segments like a Delta. This follows the
908
+  // contours of the bed more closely than edge-to-edge straight moves.
909
+  #define SEGMENT_LEVELED_MOVES
910
+  #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)
911
+
912
+  /**
913
+   * Enable the G26 Mesh Validation Pattern tool.
914
+   */
915
+  //#define G26_MESH_VALIDATION   // Enable G26 mesh validation
916
+  #if ENABLED(G26_MESH_VALIDATION)
917
+    #define MESH_TEST_NOZZLE_SIZE     0.4   // (mm) Diameter of primary nozzle.
918
+    #define MESH_TEST_LAYER_HEIGHT    0.2   // (mm) Default layer height for the G26 Mesh Validation Tool.
919
+    #define MESH_TEST_HOTEND_TEMP   205.0   // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
920
+    #define MESH_TEST_BED_TEMP       60.0   // (°C) Default bed temperature for the G26 Mesh Validation Tool.
921
+  #endif
922
+
884
 #endif
923
 #endif
885
 
924
 
886
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
925
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
936
   //========================= Unified Bed Leveling ============================
975
   //========================= Unified Bed Leveling ============================
937
   //===========================================================================
976
   //===========================================================================
938
 
977
 
939
-  #define UBL_MESH_INSET 1          // Mesh inset margin on print area
978
+  //#define MESH_EDIT_GFX_OVERLAY   // Display a graphics overlay while editing the mesh
979
+
980
+  #define MESH_INSET 1              // Mesh inset margin on print area
940
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
981
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
941
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
982
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
942
 
983
 
947
   #define UBL_PROBE_PT_3_X 180
988
   #define UBL_PROBE_PT_3_X 180
948
   #define UBL_PROBE_PT_3_Y 20
989
   #define UBL_PROBE_PT_3_Y 20
949
 
990
 
950
-  #define UBL_G26_MESH_VALIDATION   // Enable G26 mesh validation
951
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
991
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
992
+  #define UBL_SAVE_ACTIVE_ON_M500   // Save the currently active mesh in the current slot on M500
952
 
993
 
953
 #elif ENABLED(MESH_BED_LEVELING)
994
 #elif ENABLED(MESH_BED_LEVELING)
954
 
995
 
1008
 //#define Z_SAFE_HOMING
1049
 //#define Z_SAFE_HOMING
1009
 
1050
 
1010
 #if ENABLED(Z_SAFE_HOMING)
1051
 #if ENABLED(Z_SAFE_HOMING)
1011
-  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axis (G28).
1012
-  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axis (G28).
1052
+  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axes (G28).
1053
+  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axes (G28).
1013
 #endif
1054
 #endif
1014
 
1055
 
1015
 // Homing speeds (mm/m)
1056
 // Homing speeds (mm/m)
1016
 #define HOMING_FEEDRATE_XY (50*60)
1057
 #define HOMING_FEEDRATE_XY (50*60)
1017
 #define HOMING_FEEDRATE_Z  (4*60)
1058
 #define HOMING_FEEDRATE_Z  (4*60)
1018
 
1059
 
1060
+// @section calibrate
1061
+
1062
+/**
1063
+ * Bed Skew Compensation
1064
+ *
1065
+ * This feature corrects for misalignment in the XYZ axes.
1066
+ *
1067
+ * Take the following steps to get the bed skew in the XY plane:
1068
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1069
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1070
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1071
+ *  4. For XY_SIDE_AD measure the edge A to D
1072
+ *
1073
+ * Marlin automatically computes skew factors from these measurements.
1074
+ * Skew factors may also be computed and set manually:
1075
+ *
1076
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1077
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1078
+ *
1079
+ * If desired, follow the same procedure for XZ and YZ.
1080
+ * Use these diagrams for reference:
1081
+ *
1082
+ *    Y                     Z                     Z
1083
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1084
+ *    |    /       /        |    /       /        |    /       /
1085
+ *    |   /       /         |   /       /         |   /       /
1086
+ *    |  A-------D          |  A-------D          |  A-------D
1087
+ *    +-------------->X     +-------------->X     +-------------->Y
1088
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1089
+ */
1090
+//#define SKEW_CORRECTION
1091
+
1092
+#if ENABLED(SKEW_CORRECTION)
1093
+  // Input all length measurements here:
1094
+  #define XY_DIAG_AC 282.8427124746
1095
+  #define XY_DIAG_BD 282.8427124746
1096
+  #define XY_SIDE_AD 200
1097
+
1098
+  // Or, set the default skew factors directly here
1099
+  // to override the above measurements:
1100
+  #define XY_SKEW_FACTOR 0.0
1101
+
1102
+  //#define SKEW_CORRECTION_FOR_Z
1103
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1104
+    #define XZ_DIAG_AC 282.8427124746
1105
+    #define XZ_DIAG_BD 282.8427124746
1106
+    #define YZ_DIAG_AC 282.8427124746
1107
+    #define YZ_DIAG_BD 282.8427124746
1108
+    #define YZ_SIDE_AD 200
1109
+    #define XZ_SKEW_FACTOR 0.0
1110
+    #define YZ_SKEW_FACTOR 0.0
1111
+  #endif
1112
+
1113
+  // Enable this option for M852 to set skew at runtime
1114
+  //#define SKEW_CORRECTION_GCODE
1115
+#endif
1116
+
1019
 //=============================================================================
1117
 //=============================================================================
1020
 //============================= Additional Features ===========================
1118
 //============================= Additional Features ===========================
1021
 //=============================================================================
1119
 //=============================================================================
1047
 //
1145
 //
1048
 // M100 Free Memory Watcher
1146
 // M100 Free Memory Watcher
1049
 //
1147
 //
1050
-//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
1148
+//#define M100_FREE_MEMORY_WATCHER    // Add M100 (Free Memory Watcher) to debug memory usage
1051
 
1149
 
1052
 //
1150
 //
1053
 // G20/G21 Inch mode support
1151
 // G20/G21 Inch mode support
1192
  *
1290
  *
1193
  * Select the language to display on the LCD. These languages are available:
1291
  * Select the language to display on the LCD. These languages are available:
1194
  *
1292
  *
1195
- *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, gl, hr,
1196
- *    it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1293
+ *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, fr_utf8, gl,
1294
+ *    hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1197
  *    tr, uk, zh_CN, zh_TW, test
1295
  *    tr, uk, zh_CN, zh_TW, test
1198
  *
1296
  *
1199
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1297
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1200
  */
1298
  */
1201
 #define LCD_LANGUAGE en
1299
 #define LCD_LANGUAGE en
1202
 
1300
 
1324
 // Note: Test audio output with the G-Code:
1422
 // Note: Test audio output with the G-Code:
1325
 //  M300 S<frequency Hz> P<duration ms>
1423
 //  M300 S<frequency Hz> P<duration ms>
1326
 //
1424
 //
1327
-//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
1328
-//#define LCD_FEEDBACK_FREQUENCY_HZ 1000
1425
+//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
1426
+//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
1329
 
1427
 
1330
 //
1428
 //
1331
 // CONTROLLER TYPE: Standard
1429
 // CONTROLLER TYPE: Standard
1433
 //#define CARTESIO_UI
1531
 //#define CARTESIO_UI
1434
 
1532
 
1435
 //
1533
 //
1436
-// ANET_10 Controller supported displays.
1534
+// ANET and Tronxy Controller supported displays.
1437
 //
1535
 //
1438
-//#define ANET_KEYPAD_LCD         // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1536
+//#define ZONESTAR_LCD            // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1439
                                   // This LCD is known to be susceptible to electrical interference
1537
                                   // This LCD is known to be susceptible to electrical interference
1440
                                   // which scrambles the display.  Pressing any button clears it up.
1538
                                   // which scrambles the display.  Pressing any button clears it up.
1539
+                                  // This is a LCD2004 display with 5 analog buttons.
1540
+
1441
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1541
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1442
                                   // A clone of the RepRapDiscount full graphics display but with
1542
                                   // A clone of the RepRapDiscount full graphics display but with
1443
                                   // different pins/wiring (see pins_ANET_10.h).
1543
                                   // different pins/wiring (see pins_ANET_10.h).
1547
 //
1647
 //
1548
 //#define MKS_12864OLED
1648
 //#define MKS_12864OLED
1549
 
1649
 
1650
+// Silvergate GLCD controller
1651
+// http://github.com/android444/Silvergate
1652
+//
1653
+//#define SILVER_GATE_GLCD_CONTROLLER
1654
+
1550
 //=============================================================================
1655
 //=============================================================================
1551
 //=============================== Extra Features ==============================
1656
 //=============================== Extra Features ==============================
1552
 //=============================================================================
1657
 //=============================================================================
1603
  * Adds the M150 command to set the LED (or LED strip) color.
1708
  * Adds the M150 command to set the LED (or LED strip) color.
1604
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1709
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1605
  * luminance values can be set from 0 to 255.
1710
  * luminance values can be set from 0 to 255.
1606
- * For Neopixel LED overall brightness parameters is also available 
1711
+ * For Neopixel LED an overall brightness parameter is also available.
1607
  *
1712
  *
1608
  * *** CAUTION ***
1713
  * *** CAUTION ***
1609
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1714
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1610
  *  as the Arduino cannot handle the current the LEDs will require.
1715
  *  as the Arduino cannot handle the current the LEDs will require.
1611
  *  Failure to follow this precaution can destroy your Arduino!
1716
  *  Failure to follow this precaution can destroy your Arduino!
1612
- *  The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
1613
- *  cannot handle such current, separate 5V power supply must be used
1717
+ *  NOTE: A separate 5V power supply is required! The Neopixel LED needs
1718
+ *  more current than the Arduino 5V linear regulator can produce.
1614
  * *** CAUTION ***
1719
  * *** CAUTION ***
1615
  *
1720
  *
1616
- * LED type. This options are mutualy exclusive. Uncomment only one.
1721
+ * LED Type. Enable only one of the following two options.
1617
  *
1722
  *
1618
  */
1723
  */
1619
 //#define RGB_LED
1724
 //#define RGB_LED
1629
 // Support for Adafruit Neopixel LED driver
1734
 // Support for Adafruit Neopixel LED driver
1630
 //#define NEOPIXEL_LED
1735
 //#define NEOPIXEL_LED
1631
 #if ENABLED(NEOPIXEL_LED)
1736
 #if ENABLED(NEOPIXEL_LED)
1632
-  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
1737
+  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
1633
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1738
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1634
-  #define NEOPIXEL_PIXELS 30       // Number of LEDs on strip
1635
-  #define NEOPIXEL_IS_SEQUENTIAL   // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
1636
-  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness 0-255
1739
+  #define NEOPIXEL_PIXELS 30       // Number of LEDs in the strip
1740
+  #define NEOPIXEL_IS_SEQUENTIAL   // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
1741
+  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness (0-255)
1637
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1742
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1638
 #endif
1743
 #endif
1639
 
1744
 
1648
  *  - Change to green once print has finished
1753
  *  - Change to green once print has finished
1649
  *  - Turn off after the print has finished and the user has pushed a button
1754
  *  - Turn off after the print has finished and the user has pushed a button
1650
  */
1755
  */
1651
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED)
1756
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
1652
   #define PRINTER_EVENT_LEDS
1757
   #define PRINTER_EVENT_LEDS
1653
 #endif
1758
 #endif
1654
 
1759
 
1655
-/*********************************************************************\
1656
-* R/C SERVO support
1657
-* Sponsored by TrinityLabs, Reworked by codexmas
1658
-**********************************************************************/
1760
+/**
1761
+ * R/C SERVO support
1762
+ * Sponsored by TrinityLabs, Reworked by codexmas
1763
+ */
1659
 
1764
 
1660
-// Number of servos
1661
-//
1662
-// If you select a configuration below, this will receive a default value and does not need to be set manually
1663
-// set it manually if you have more servos than extruders and wish to manually control some
1664
-// leaving it undefined or defining as 0 will disable the servo subsystem
1665
-// If unsure, leave commented / disabled
1666
-//
1765
+/**
1766
+ * Number of servos
1767
+ *
1768
+ * For some servo-related options NUM_SERVOS will be set automatically.
1769
+ * Set this manually if there are extra servos needing manual control.
1770
+ * Leave undefined or set to 0 to entirely disable the servo subsystem.
1771
+ */
1667
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1772
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1668
 
1773
 
1669
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1774
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1677
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1782
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1678
 
1783
 
1679
 /**
1784
 /**
1680
- * Filament Width Sensor
1681
- *
1682
- * Measures the filament width in real-time and adjusts
1683
- * flow rate to compensate for any irregularities.
1684
- *
1685
- * Also allows the measured filament diameter to set the
1686
- * extrusion rate, so the slicer only has to specify the
1687
- * volume.
1688
- *
1689
- * Only a single extruder is supported at this time.
1690
- *
1691
- *  34 RAMPS_14    : Analog input 5 on the AUX2 connector
1692
- *  81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
1693
- * 301 RAMBO       : Analog input 3
1694
- *
1695
- * Note: May require analog pins to be defined for other boards.
1696
- */
1697
-//#define FILAMENT_WIDTH_SENSOR
1698
-
1699
-#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75   // (mm) Diameter of the filament generally used (3.0 or 1.75mm), also used in the slicer. Used to validate sensor reading.
1700
-
1701
-#if ENABLED(FILAMENT_WIDTH_SENSOR)
1702
-  #define FILAMENT_SENSOR_EXTRUDER_NUM 0    // Index of the extruder that has the filament sensor (0,1,2,3)
1703
-  #define MEASUREMENT_DELAY_CM        14    // (cm) The distance from the filament sensor to the melting chamber
1704
-
1705
-  #define MEASURED_UPPER_LIMIT         3.30 // (mm) Upper limit used to validate sensor reading
1706
-  #define MEASURED_LOWER_LIMIT         1.90 // (mm) Lower limit used to validate sensor reading
1707
-  #define MAX_MEASUREMENT_DELAY       20    // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
1708
-
1709
-  #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
1710
-
1711
-  // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
1712
-  //#define FILAMENT_LCD_DISPLAY
1713
-#endif
1714
-
1715
-/**
1716
  * Customize common displays for GT2560
1785
  * Customize common displays for GT2560
1717
  */
1786
  */
1718
-#if ENABLED(ULTIMAKERCONTROLLER) || ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) || ENABLED(G3D_PANEL)
1787
+#if ENABLED(ULTIMAKERCONTROLLER) || ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) || ENABLED(G3D_PANEL) || ENABLED(MKS_MINI_12864)
1719
   #define SDSUPPORT   // Force SD Card support on for these displays
1788
   #define SDSUPPORT   // Force SD Card support on for these displays
1720
 #elif ENABLED(ULTRA_LCD) && ENABLED(DOGLCD) // No panel, just graphical LCD?
1789
 #elif ENABLED(ULTRA_LCD) && ENABLED(DOGLCD) // No panel, just graphical LCD?
1721
   #define LCD_WIDTH 20 // Default is 22. For this Geeetech use 20
1790
   #define LCD_WIDTH 20 // Default is 22. For this Geeetech use 20

+ 157
- 88
Marlin/example_configurations/Geeetech/I3_Pro_X-GT2560/Configuration.h Переглянути файл

37
  */
37
  */
38
 #ifndef CONFIGURATION_H
38
 #ifndef CONFIGURATION_H
39
 #define CONFIGURATION_H
39
 #define CONFIGURATION_H
40
-#define CONFIGURATION_H_VERSION 010100
40
+#define CONFIGURATION_H_VERSION 010107
41
 
41
 
42
 //===========================================================================
42
 //===========================================================================
43
 //============================= Getting Started =============================
43
 //============================= Getting Started =============================
136
 // :[1, 2, 3, 4, 5]
136
 // :[1, 2, 3, 4, 5]
137
 #define EXTRUDERS 1
137
 #define EXTRUDERS 1
138
 
138
 
139
+// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
140
+#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75
141
+
139
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
142
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
140
 //#define SINGLENOZZLE
143
 //#define SINGLENOZZLE
141
 
144
 
336
 
339
 
337
 // Comment the following line to disable PID and enable bang-bang.
340
 // Comment the following line to disable PID and enable bang-bang.
338
 #define PIDTEMP
341
 #define PIDTEMP
339
-#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
340
-#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
342
+#define BANG_MAX 255     // Limits current to nozzle while in bang-bang mode; 255=full current
343
+#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
344
+#define PID_K1 0.95      // Smoothing factor within the PID
341
 #if ENABLED(PIDTEMP)
345
 #if ENABLED(PIDTEMP)
342
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
346
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
343
   //#define PID_DEBUG // Sends debug data to the serial port.
347
   //#define PID_DEBUG // Sends debug data to the serial port.
347
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
351
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
348
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
352
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
349
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
353
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
350
-  #define K1 0.95 //smoothing factor within the PID
351
 
354
 
352
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
355
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
353
 
356
 
428
 //===========================================================================
431
 //===========================================================================
429
 
432
 
430
 /**
433
 /**
431
- * Thermal Protection protects your printer from damage and fire if a
432
- * thermistor falls out or temperature sensors fail in any way.
434
+ * Thermal Protection provides additional protection to your printer from damage
435
+ * and fire. Marlin always includes safe min and max temperature ranges which
436
+ * protect against a broken or disconnected thermistor wire.
433
  *
437
  *
434
- * The issue: If a thermistor falls out or a temperature sensor fails,
435
- * Marlin can no longer sense the actual temperature. Since a disconnected
436
- * thermistor reads as a low temperature, the firmware will keep the heater on.
438
+ * The issue: If a thermistor falls out, it will report the much lower
439
+ * temperature of the air in the room, and the the firmware will keep
440
+ * the heater on.
437
  *
441
  *
438
  * If you get "Thermal Runaway" or "Heating failed" errors the
442
  * If you get "Thermal Runaway" or "Heating failed" errors the
439
  * details can be tuned in Configuration_adv.h
443
  * details can be tuned in Configuration_adv.h
573
 // @section probes
577
 // @section probes
574
 
578
 
575
 //
579
 //
576
-// See http://marlinfw.org/configuration/probes.html
580
+// See http://marlinfw.org/docs/configuration/probes.html
577
 //
581
 //
578
 
582
 
579
 /**
583
 /**
686
 // X and Y axis travel speed (mm/m) between probes
690
 // X and Y axis travel speed (mm/m) between probes
687
 #define XY_PROBE_SPEED 8000
691
 #define XY_PROBE_SPEED 8000
688
 
692
 
689
-// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH)
693
+// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
690
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
694
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
691
 
695
 
692
 // Speed for the "accurate" probe of each point
696
 // Speed for the "accurate" probe of each point
693
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
697
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
694
 
698
 
695
-// Use double touch for probing
696
-//#define PROBE_DOUBLE_TOUCH
699
+// The number of probes to perform at each point.
700
+//   Set to 2 for a fast/slow probe, using the second probe result.
701
+//   Set to 3 or more for slow probes, averaging the results.
702
+//#define MULTIPLE_PROBING 2
697
 
703
 
698
 /**
704
 /**
699
  * Z probes require clearance when deploying, stowing, and moving between
705
  * Z probes require clearance when deploying, stowing, and moving between
785
 #define Y_MAX_POS Y_BED_SIZE
791
 #define Y_MAX_POS Y_BED_SIZE
786
 #define Z_MAX_POS 170
792
 #define Z_MAX_POS 170
787
 
793
 
788
-// If enabled, axes won't move below MIN_POS in response to movement commands.
794
+/**
795
+ * Software Endstops
796
+ *
797
+ * - Prevent moves outside the set machine bounds.
798
+ * - Individual axes can be disabled, if desired.
799
+ * - X and Y only apply to Cartesian robots.
800
+ * - Use 'M211' to set software endstops on/off or report current state
801
+ */
802
+
803
+// Min software endstops curtail movement below minimum coordinate bounds
789
 #define MIN_SOFTWARE_ENDSTOPS
804
 #define MIN_SOFTWARE_ENDSTOPS
790
-// If enabled, axes won't move above MAX_POS in response to movement commands.
805
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
806
+  #define MIN_SOFTWARE_ENDSTOP_X
807
+  #define MIN_SOFTWARE_ENDSTOP_Y
808
+  #define MIN_SOFTWARE_ENDSTOP_Z
809
+#endif
810
+
811
+// Max software endstops curtail movement above maximum coordinate bounds
791
 #define MAX_SOFTWARE_ENDSTOPS
812
 #define MAX_SOFTWARE_ENDSTOPS
813
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
814
+  #define MAX_SOFTWARE_ENDSTOP_X
815
+  #define MAX_SOFTWARE_ENDSTOP_Y
816
+  #define MAX_SOFTWARE_ENDSTOP_Z
817
+#endif
792
 
818
 
793
 /**
819
 /**
794
  * Filament Runout Sensor
820
  * Filament Runout Sensor
808
 //===========================================================================
834
 //===========================================================================
809
 //=============================== Bed Leveling ==============================
835
 //=============================== Bed Leveling ==============================
810
 //===========================================================================
836
 //===========================================================================
811
-// @section bedlevel
837
+// @section calibrate
812
 
838
 
813
 /**
839
 /**
814
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
840
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
834
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
860
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
835
  *   A comprehensive bed leveling system combining the features and benefits
861
  *   A comprehensive bed leveling system combining the features and benefits
836
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
862
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
837
- *   Validation and Mesh Editing systems. Currently, UBL is only checked out
838
- *   for Cartesian Printers. That said, it was primarily designed to correct
839
- *   poor quality Delta Printers. If you feel adventurous and have a Delta,
840
- *   please post an issue if something doesn't work correctly. Initially,
841
- *   you will need to set a reduced bed size so you have a rectangular area
842
- *   to test on.
863
+ *   Validation and Mesh Editing systems.
843
  *
864
  *
844
  * - MESH_BED_LEVELING
865
  * - MESH_BED_LEVELING
845
  *   Probe a grid manually
866
  *   Probe a grid manually
866
   // at which point movement will be level to the machine's XY plane.
887
   // at which point movement will be level to the machine's XY plane.
867
   // The height can be set with M420 Z<height>
888
   // The height can be set with M420 Z<height>
868
   #define ENABLE_LEVELING_FADE_HEIGHT
889
   #define ENABLE_LEVELING_FADE_HEIGHT
890
+
891
+  // For Cartesian machines, instead of dividing moves on mesh boundaries,
892
+  // split up moves into short segments like a Delta. This follows the
893
+  // contours of the bed more closely than edge-to-edge straight moves.
894
+  #define SEGMENT_LEVELED_MOVES
895
+  #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)
896
+
897
+  /**
898
+   * Enable the G26 Mesh Validation Pattern tool.
899
+   */
900
+  //#define G26_MESH_VALIDATION   // Enable G26 mesh validation
901
+  #if ENABLED(G26_MESH_VALIDATION)
902
+    #define MESH_TEST_NOZZLE_SIZE     0.4   // (mm) Diameter of primary nozzle.
903
+    #define MESH_TEST_LAYER_HEIGHT    0.2   // (mm) Default layer height for the G26 Mesh Validation Tool.
904
+    #define MESH_TEST_HOTEND_TEMP   205.0   // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
905
+    #define MESH_TEST_BED_TEMP       60.0   // (°C) Default bed temperature for the G26 Mesh Validation Tool.
906
+  #endif
907
+
869
 #endif
908
 #endif
870
 
909
 
871
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
910
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
921
   //========================= Unified Bed Leveling ============================
960
   //========================= Unified Bed Leveling ============================
922
   //===========================================================================
961
   //===========================================================================
923
 
962
 
924
-  #define UBL_MESH_INSET 1          // Mesh inset margin on print area
963
+  //#define MESH_EDIT_GFX_OVERLAY   // Display a graphics overlay while editing the mesh
964
+
965
+  #define MESH_INSET 1              // Mesh inset margin on print area
925
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
966
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
926
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
967
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
927
 
968
 
932
   #define UBL_PROBE_PT_3_X 180
973
   #define UBL_PROBE_PT_3_X 180
933
   #define UBL_PROBE_PT_3_Y 20
974
   #define UBL_PROBE_PT_3_Y 20
934
 
975
 
935
-  #define UBL_G26_MESH_VALIDATION   // Enable G26 mesh validation
936
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
976
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
977
+  #define UBL_SAVE_ACTIVE_ON_M500   // Save the currently active mesh in the current slot on M500
937
 
978
 
938
 #elif ENABLED(MESH_BED_LEVELING)
979
 #elif ENABLED(MESH_BED_LEVELING)
939
 
980
 
993
 //#define Z_SAFE_HOMING
1034
 //#define Z_SAFE_HOMING
994
 
1035
 
995
 #if ENABLED(Z_SAFE_HOMING)
1036
 #if ENABLED(Z_SAFE_HOMING)
996
-  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axis (G28).
997
-  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axis (G28).
1037
+  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axes (G28).
1038
+  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axes (G28).
998
 #endif
1039
 #endif
999
 
1040
 
1000
 // Homing speeds (mm/m)
1041
 // Homing speeds (mm/m)
1001
 #define HOMING_FEEDRATE_XY (50*60)
1042
 #define HOMING_FEEDRATE_XY (50*60)
1002
 #define HOMING_FEEDRATE_Z  (4*60)
1043
 #define HOMING_FEEDRATE_Z  (4*60)
1003
 
1044
 
1045
+// @section calibrate
1046
+
1047
+/**
1048
+ * Bed Skew Compensation
1049
+ *
1050
+ * This feature corrects for misalignment in the XYZ axes.
1051
+ *
1052
+ * Take the following steps to get the bed skew in the XY plane:
1053
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1054
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1055
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1056
+ *  4. For XY_SIDE_AD measure the edge A to D
1057
+ *
1058
+ * Marlin automatically computes skew factors from these measurements.
1059
+ * Skew factors may also be computed and set manually:
1060
+ *
1061
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1062
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1063
+ *
1064
+ * If desired, follow the same procedure for XZ and YZ.
1065
+ * Use these diagrams for reference:
1066
+ *
1067
+ *    Y                     Z                     Z
1068
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1069
+ *    |    /       /        |    /       /        |    /       /
1070
+ *    |   /       /         |   /       /         |   /       /
1071
+ *    |  A-------D          |  A-------D          |  A-------D
1072
+ *    +-------------->X     +-------------->X     +-------------->Y
1073
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1074
+ */
1075
+//#define SKEW_CORRECTION
1076
+
1077
+#if ENABLED(SKEW_CORRECTION)
1078
+  // Input all length measurements here:
1079
+  #define XY_DIAG_AC 282.8427124746
1080
+  #define XY_DIAG_BD 282.8427124746
1081
+  #define XY_SIDE_AD 200
1082
+
1083
+  // Or, set the default skew factors directly here
1084
+  // to override the above measurements:
1085
+  #define XY_SKEW_FACTOR 0.0
1086
+
1087
+  //#define SKEW_CORRECTION_FOR_Z
1088
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1089
+    #define XZ_DIAG_AC 282.8427124746
1090
+    #define XZ_DIAG_BD 282.8427124746
1091
+    #define YZ_DIAG_AC 282.8427124746
1092
+    #define YZ_DIAG_BD 282.8427124746
1093
+    #define YZ_SIDE_AD 200
1094
+    #define XZ_SKEW_FACTOR 0.0
1095
+    #define YZ_SKEW_FACTOR 0.0
1096
+  #endif
1097
+
1098
+  // Enable this option for M852 to set skew at runtime
1099
+  //#define SKEW_CORRECTION_GCODE
1100
+#endif
1101
+
1004
 //=============================================================================
1102
 //=============================================================================
1005
 //============================= Additional Features ===========================
1103
 //============================= Additional Features ===========================
1006
 //=============================================================================
1104
 //=============================================================================
1032
 //
1130
 //
1033
 // M100 Free Memory Watcher
1131
 // M100 Free Memory Watcher
1034
 //
1132
 //
1035
-//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
1133
+//#define M100_FREE_MEMORY_WATCHER    // Add M100 (Free Memory Watcher) to debug memory usage
1036
 
1134
 
1037
 //
1135
 //
1038
 // G20/G21 Inch mode support
1136
 // G20/G21 Inch mode support
1177
  *
1275
  *
1178
  * Select the language to display on the LCD. These languages are available:
1276
  * Select the language to display on the LCD. These languages are available:
1179
  *
1277
  *
1180
- *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, gl, hr,
1181
- *    it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1278
+ *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, fr_utf8, gl,
1279
+ *    hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1182
  *    tr, uk, zh_CN, zh_TW, test
1280
  *    tr, uk, zh_CN, zh_TW, test
1183
  *
1281
  *
1184
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1282
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1185
  */
1283
  */
1186
 #define LCD_LANGUAGE en
1284
 #define LCD_LANGUAGE en
1187
 
1285
 
1418
 //#define CARTESIO_UI
1516
 //#define CARTESIO_UI
1419
 
1517
 
1420
 //
1518
 //
1421
-// ANET_10 Controller supported displays.
1519
+// ANET and Tronxy Controller supported displays.
1422
 //
1520
 //
1423
-//#define ANET_KEYPAD_LCD         // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1521
+//#define ZONESTAR_LCD            // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1424
                                   // This LCD is known to be susceptible to electrical interference
1522
                                   // This LCD is known to be susceptible to electrical interference
1425
                                   // which scrambles the display.  Pressing any button clears it up.
1523
                                   // which scrambles the display.  Pressing any button clears it up.
1524
+                                  // This is a LCD2004 display with 5 analog buttons.
1525
+
1426
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1526
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1427
                                   // A clone of the RepRapDiscount full graphics display but with
1527
                                   // A clone of the RepRapDiscount full graphics display but with
1428
                                   // different pins/wiring (see pins_ANET_10.h).
1528
                                   // different pins/wiring (see pins_ANET_10.h).
1532
 //
1632
 //
1533
 //#define MKS_12864OLED
1633
 //#define MKS_12864OLED
1534
 
1634
 
1635
+// Silvergate GLCD controller
1636
+// http://github.com/android444/Silvergate
1637
+//
1638
+//#define SILVER_GATE_GLCD_CONTROLLER
1639
+
1535
 //=============================================================================
1640
 //=============================================================================
1536
 //=============================== Extra Features ==============================
1641
 //=============================== Extra Features ==============================
1537
 //=============================================================================
1642
 //=============================================================================
1588
  * Adds the M150 command to set the LED (or LED strip) color.
1693
  * Adds the M150 command to set the LED (or LED strip) color.
1589
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1694
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1590
  * luminance values can be set from 0 to 255.
1695
  * luminance values can be set from 0 to 255.
1591
- * For Neopixel LED overall brightness parameters is also available 
1696
+ * For Neopixel LED an overall brightness parameter is also available.
1592
  *
1697
  *
1593
  * *** CAUTION ***
1698
  * *** CAUTION ***
1594
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1699
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1595
  *  as the Arduino cannot handle the current the LEDs will require.
1700
  *  as the Arduino cannot handle the current the LEDs will require.
1596
  *  Failure to follow this precaution can destroy your Arduino!
1701
  *  Failure to follow this precaution can destroy your Arduino!
1597
- *  The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
1598
- *  cannot handle such current, separate 5V power supply must be used
1702
+ *  NOTE: A separate 5V power supply is required! The Neopixel LED needs
1703
+ *  more current than the Arduino 5V linear regulator can produce.
1599
  * *** CAUTION ***
1704
  * *** CAUTION ***
1600
  *
1705
  *
1601
- * LED type. This options are mutualy exclusive. Uncomment only one.
1706
+ * LED Type. Enable only one of the following two options.
1602
  *
1707
  *
1603
  */
1708
  */
1604
 //#define RGB_LED
1709
 //#define RGB_LED
1614
 // Support for Adafruit Neopixel LED driver
1719
 // Support for Adafruit Neopixel LED driver
1615
 //#define NEOPIXEL_LED
1720
 //#define NEOPIXEL_LED
1616
 #if ENABLED(NEOPIXEL_LED)
1721
 #if ENABLED(NEOPIXEL_LED)
1617
-  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
1722
+  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
1618
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1723
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1619
-  #define NEOPIXEL_PIXELS 30       // Number of LEDs on strip
1620
-  #define NEOPIXEL_IS_SEQUENTIAL   // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
1621
-  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness 0-255
1724
+  #define NEOPIXEL_PIXELS 30       // Number of LEDs in the strip
1725
+  #define NEOPIXEL_IS_SEQUENTIAL   // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
1726
+  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness (0-255)
1622
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1727
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1623
 #endif
1728
 #endif
1624
 
1729
 
1633
  *  - Change to green once print has finished
1738
  *  - Change to green once print has finished
1634
  *  - Turn off after the print has finished and the user has pushed a button
1739
  *  - Turn off after the print has finished and the user has pushed a button
1635
  */
1740
  */
1636
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED)
1741
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
1637
   #define PRINTER_EVENT_LEDS
1742
   #define PRINTER_EVENT_LEDS
1638
 #endif
1743
 #endif
1639
 
1744
 
1640
-/*********************************************************************\
1641
-* R/C SERVO support
1642
-* Sponsored by TrinityLabs, Reworked by codexmas
1643
-**********************************************************************/
1745
+/**
1746
+ * R/C SERVO support
1747
+ * Sponsored by TrinityLabs, Reworked by codexmas
1748
+ */
1644
 
1749
 
1645
-// Number of servos
1646
-//
1647
-// If you select a configuration below, this will receive a default value and does not need to be set manually
1648
-// set it manually if you have more servos than extruders and wish to manually control some
1649
-// leaving it undefined or defining as 0 will disable the servo subsystem
1650
-// If unsure, leave commented / disabled
1651
-//
1750
+/**
1751
+ * Number of servos
1752
+ *
1753
+ * For some servo-related options NUM_SERVOS will be set automatically.
1754
+ * Set this manually if there are extra servos needing manual control.
1755
+ * Leave undefined or set to 0 to entirely disable the servo subsystem.
1756
+ */
1652
 #define NUM_SERVOS 1 // Servo index starts with 0 for M280 command
1757
 #define NUM_SERVOS 1 // Servo index starts with 0 for M280 command
1653
 
1758
 
1654
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1759
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1661
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1766
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1662
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1767
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1663
 
1768
 
1664
-/**
1665
- * Filament Width Sensor
1666
- *
1667
- * Measures the filament width in real-time and adjusts
1668
- * flow rate to compensate for any irregularities.
1669
- *
1670
- * Also allows the measured filament diameter to set the
1671
- * extrusion rate, so the slicer only has to specify the
1672
- * volume.
1673
- *
1674
- * Only a single extruder is supported at this time.
1675
- *
1676
- *  34 RAMPS_14    : Analog input 5 on the AUX2 connector
1677
- *  81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
1678
- * 301 RAMBO       : Analog input 3
1679
- *
1680
- * Note: May require analog pins to be defined for other boards.
1681
- */
1682
-//#define FILAMENT_WIDTH_SENSOR
1683
-
1684
-#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75   // (mm) Diameter of the filament generally used (3.0 or 1.75mm), also used in the slicer. Used to validate sensor reading.
1685
-
1686
-#if ENABLED(FILAMENT_WIDTH_SENSOR)
1687
-  #define FILAMENT_SENSOR_EXTRUDER_NUM 0    // Index of the extruder that has the filament sensor (0,1,2,3)
1688
-  #define MEASUREMENT_DELAY_CM        14    // (cm) The distance from the filament sensor to the melting chamber
1689
-
1690
-  #define MEASURED_UPPER_LIMIT         3.30 // (mm) Upper limit used to validate sensor reading
1691
-  #define MEASURED_LOWER_LIMIT         1.90 // (mm) Lower limit used to validate sensor reading
1692
-  #define MAX_MEASUREMENT_DELAY       20    // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
1693
-
1694
-  #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
1695
-
1696
-  // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
1697
-  //#define FILAMENT_LCD_DISPLAY
1698
-#endif
1699
-
1700
 #endif // CONFIGURATION_H
1769
 #endif // CONFIGURATION_H

+ 159
- 90
Marlin/example_configurations/Infitary/i3-M508/Configuration.h Переглянути файл

37
  */
37
  */
38
 #ifndef CONFIGURATION_H
38
 #ifndef CONFIGURATION_H
39
 #define CONFIGURATION_H
39
 #define CONFIGURATION_H
40
-#define CONFIGURATION_H_VERSION 010100
40
+#define CONFIGURATION_H_VERSION 010107
41
 
41
 
42
 //===========================================================================
42
 //===========================================================================
43
 //============================= Getting Started =============================
43
 //============================= Getting Started =============================
136
 // :[1, 2, 3, 4, 5]
136
 // :[1, 2, 3, 4, 5]
137
 #define EXTRUDERS 1
137
 #define EXTRUDERS 1
138
 
138
 
139
+// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
140
+#define DEFAULT_NOMINAL_FILAMENT_DIA 3.0
141
+
139
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
142
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
140
 //#define SINGLENOZZLE
143
 //#define SINGLENOZZLE
141
 
144
 
336
 
339
 
337
 // Comment the following line to disable PID and enable bang-bang.
340
 // Comment the following line to disable PID and enable bang-bang.
338
 #define PIDTEMP
341
 #define PIDTEMP
339
-#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
340
-#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
342
+#define BANG_MAX 255     // Limits current to nozzle while in bang-bang mode; 255=full current
343
+#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
344
+#define PID_K1 0.95      // Smoothing factor within the PID
341
 #if ENABLED(PIDTEMP)
345
 #if ENABLED(PIDTEMP)
342
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
346
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
343
   //#define PID_DEBUG // Sends debug data to the serial port.
347
   //#define PID_DEBUG // Sends debug data to the serial port.
347
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
351
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
348
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
352
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
349
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
353
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
350
-  #define K1 0.95 //smoothing factor within the PID
351
 
354
 
352
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
355
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
353
 
356
 
432
 //===========================================================================
435
 //===========================================================================
433
 
436
 
434
 /**
437
 /**
435
- * Thermal Protection protects your printer from damage and fire if a
436
- * thermistor falls out or temperature sensors fail in any way.
438
+ * Thermal Protection provides additional protection to your printer from damage
439
+ * and fire. Marlin always includes safe min and max temperature ranges which
440
+ * protect against a broken or disconnected thermistor wire.
437
  *
441
  *
438
- * The issue: If a thermistor falls out or a temperature sensor fails,
439
- * Marlin can no longer sense the actual temperature. Since a disconnected
440
- * thermistor reads as a low temperature, the firmware will keep the heater on.
442
+ * The issue: If a thermistor falls out, it will report the much lower
443
+ * temperature of the air in the room, and the the firmware will keep
444
+ * the heater on.
441
  *
445
  *
442
  * If you get "Thermal Runaway" or "Heating failed" errors the
446
  * If you get "Thermal Runaway" or "Heating failed" errors the
443
  * details can be tuned in Configuration_adv.h
447
  * details can be tuned in Configuration_adv.h
577
 // @section probes
581
 // @section probes
578
 
582
 
579
 //
583
 //
580
-// See http://marlinfw.org/configuration/probes.html
584
+// See http://marlinfw.org/docs/configuration/probes.html
581
 //
585
 //
582
 
586
 
583
 /**
587
 /**
690
 // X and Y axis travel speed (mm/m) between probes
694
 // X and Y axis travel speed (mm/m) between probes
691
 #define XY_PROBE_SPEED 8000
695
 #define XY_PROBE_SPEED 8000
692
 
696
 
693
-// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH)
697
+// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
694
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
698
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
695
 
699
 
696
 // Speed for the "accurate" probe of each point
700
 // Speed for the "accurate" probe of each point
697
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
701
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
698
 
702
 
699
-// Use double touch for probing
700
-//#define PROBE_DOUBLE_TOUCH
703
+// The number of probes to perform at each point.
704
+//   Set to 2 for a fast/slow probe, using the second probe result.
705
+//   Set to 3 or more for slow probes, averaging the results.
706
+//#define MULTIPLE_PROBING 2
701
 
707
 
702
 /**
708
 /**
703
  * Z probes require clearance when deploying, stowing, and moving between
709
  * Z probes require clearance when deploying, stowing, and moving between
789
 #define Y_MAX_POS Y_BED_SIZE
795
 #define Y_MAX_POS Y_BED_SIZE
790
 #define Z_MAX_POS 185
796
 #define Z_MAX_POS 185
791
 
797
 
792
-// If enabled, axes won't move below MIN_POS in response to movement commands.
798
+/**
799
+ * Software Endstops
800
+ *
801
+ * - Prevent moves outside the set machine bounds.
802
+ * - Individual axes can be disabled, if desired.
803
+ * - X and Y only apply to Cartesian robots.
804
+ * - Use 'M211' to set software endstops on/off or report current state
805
+ */
806
+
807
+// Min software endstops curtail movement below minimum coordinate bounds
793
 #define MIN_SOFTWARE_ENDSTOPS
808
 #define MIN_SOFTWARE_ENDSTOPS
794
-// If enabled, axes won't move above MAX_POS in response to movement commands.
809
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
810
+  #define MIN_SOFTWARE_ENDSTOP_X
811
+  #define MIN_SOFTWARE_ENDSTOP_Y
812
+  #define MIN_SOFTWARE_ENDSTOP_Z
813
+#endif
814
+
815
+// Max software endstops curtail movement above maximum coordinate bounds
795
 #define MAX_SOFTWARE_ENDSTOPS
816
 #define MAX_SOFTWARE_ENDSTOPS
817
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
818
+  #define MAX_SOFTWARE_ENDSTOP_X
819
+  #define MAX_SOFTWARE_ENDSTOP_Y
820
+  #define MAX_SOFTWARE_ENDSTOP_Z
821
+#endif
796
 
822
 
797
 /**
823
 /**
798
  * Filament Runout Sensor
824
  * Filament Runout Sensor
812
 //===========================================================================
838
 //===========================================================================
813
 //=============================== Bed Leveling ==============================
839
 //=============================== Bed Leveling ==============================
814
 //===========================================================================
840
 //===========================================================================
815
-// @section bedlevel
841
+// @section calibrate
816
 
842
 
817
 /**
843
 /**
818
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
844
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
838
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
864
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
839
  *   A comprehensive bed leveling system combining the features and benefits
865
  *   A comprehensive bed leveling system combining the features and benefits
840
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
866
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
841
- *   Validation and Mesh Editing systems. Currently, UBL is only checked out
842
- *   for Cartesian Printers. That said, it was primarily designed to correct
843
- *   poor quality Delta Printers. If you feel adventurous and have a Delta,
844
- *   please post an issue if something doesn't work correctly. Initially,
845
- *   you will need to set a reduced bed size so you have a rectangular area
846
- *   to test on.
867
+ *   Validation and Mesh Editing systems.
847
  *
868
  *
848
  * - MESH_BED_LEVELING
869
  * - MESH_BED_LEVELING
849
  *   Probe a grid manually
870
  *   Probe a grid manually
870
   // at which point movement will be level to the machine's XY plane.
891
   // at which point movement will be level to the machine's XY plane.
871
   // The height can be set with M420 Z<height>
892
   // The height can be set with M420 Z<height>
872
   #define ENABLE_LEVELING_FADE_HEIGHT
893
   #define ENABLE_LEVELING_FADE_HEIGHT
894
+
895
+  // For Cartesian machines, instead of dividing moves on mesh boundaries,
896
+  // split up moves into short segments like a Delta. This follows the
897
+  // contours of the bed more closely than edge-to-edge straight moves.
898
+  #define SEGMENT_LEVELED_MOVES
899
+  #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)
900
+
901
+  /**
902
+   * Enable the G26 Mesh Validation Pattern tool.
903
+   */
904
+  //#define G26_MESH_VALIDATION   // Enable G26 mesh validation
905
+  #if ENABLED(G26_MESH_VALIDATION)
906
+    #define MESH_TEST_NOZZLE_SIZE     0.4   // (mm) Diameter of primary nozzle.
907
+    #define MESH_TEST_LAYER_HEIGHT    0.2   // (mm) Default layer height for the G26 Mesh Validation Tool.
908
+    #define MESH_TEST_HOTEND_TEMP   205.0   // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
909
+    #define MESH_TEST_BED_TEMP       60.0   // (°C) Default bed temperature for the G26 Mesh Validation Tool.
910
+  #endif
911
+
873
 #endif
912
 #endif
874
 
913
 
875
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
914
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
925
   //========================= Unified Bed Leveling ============================
964
   //========================= Unified Bed Leveling ============================
926
   //===========================================================================
965
   //===========================================================================
927
 
966
 
928
-  #define UBL_MESH_INSET 1          // Mesh inset margin on print area
967
+  //#define MESH_EDIT_GFX_OVERLAY   // Display a graphics overlay while editing the mesh
968
+
969
+  #define MESH_INSET 1              // Mesh inset margin on print area
929
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
970
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
930
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
971
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
931
 
972
 
936
   #define UBL_PROBE_PT_3_X 180
977
   #define UBL_PROBE_PT_3_X 180
937
   #define UBL_PROBE_PT_3_Y 20
978
   #define UBL_PROBE_PT_3_Y 20
938
 
979
 
939
-  #define UBL_G26_MESH_VALIDATION   // Enable G26 mesh validation
940
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
980
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
981
+  #define UBL_SAVE_ACTIVE_ON_M500   // Save the currently active mesh in the current slot on M500
941
 
982
 
942
 #elif ENABLED(MESH_BED_LEVELING)
983
 #elif ENABLED(MESH_BED_LEVELING)
943
 
984
 
997
 //#define Z_SAFE_HOMING
1038
 //#define Z_SAFE_HOMING
998
 
1039
 
999
 #if ENABLED(Z_SAFE_HOMING)
1040
 #if ENABLED(Z_SAFE_HOMING)
1000
-  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axis (G28).
1001
-  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axis (G28).
1041
+  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axes (G28).
1042
+  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axes (G28).
1002
 #endif
1043
 #endif
1003
 
1044
 
1004
 // Homing speeds (mm/m)
1045
 // Homing speeds (mm/m)
1005
 #define HOMING_FEEDRATE_XY (50*60)
1046
 #define HOMING_FEEDRATE_XY (50*60)
1006
 #define HOMING_FEEDRATE_Z  (4*60)
1047
 #define HOMING_FEEDRATE_Z  (4*60)
1007
 
1048
 
1049
+// @section calibrate
1050
+
1051
+/**
1052
+ * Bed Skew Compensation
1053
+ *
1054
+ * This feature corrects for misalignment in the XYZ axes.
1055
+ *
1056
+ * Take the following steps to get the bed skew in the XY plane:
1057
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1058
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1059
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1060
+ *  4. For XY_SIDE_AD measure the edge A to D
1061
+ *
1062
+ * Marlin automatically computes skew factors from these measurements.
1063
+ * Skew factors may also be computed and set manually:
1064
+ *
1065
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1066
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1067
+ *
1068
+ * If desired, follow the same procedure for XZ and YZ.
1069
+ * Use these diagrams for reference:
1070
+ *
1071
+ *    Y                     Z                     Z
1072
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1073
+ *    |    /       /        |    /       /        |    /       /
1074
+ *    |   /       /         |   /       /         |   /       /
1075
+ *    |  A-------D          |  A-------D          |  A-------D
1076
+ *    +-------------->X     +-------------->X     +-------------->Y
1077
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1078
+ */
1079
+//#define SKEW_CORRECTION
1080
+
1081
+#if ENABLED(SKEW_CORRECTION)
1082
+  // Input all length measurements here:
1083
+  #define XY_DIAG_AC 282.8427124746
1084
+  #define XY_DIAG_BD 282.8427124746
1085
+  #define XY_SIDE_AD 200
1086
+
1087
+  // Or, set the default skew factors directly here
1088
+  // to override the above measurements:
1089
+  #define XY_SKEW_FACTOR 0.0
1090
+
1091
+  //#define SKEW_CORRECTION_FOR_Z
1092
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1093
+    #define XZ_DIAG_AC 282.8427124746
1094
+    #define XZ_DIAG_BD 282.8427124746
1095
+    #define YZ_DIAG_AC 282.8427124746
1096
+    #define YZ_DIAG_BD 282.8427124746
1097
+    #define YZ_SIDE_AD 200
1098
+    #define XZ_SKEW_FACTOR 0.0
1099
+    #define YZ_SKEW_FACTOR 0.0
1100
+  #endif
1101
+
1102
+  // Enable this option for M852 to set skew at runtime
1103
+  //#define SKEW_CORRECTION_GCODE
1104
+#endif
1105
+
1008
 //=============================================================================
1106
 //=============================================================================
1009
 //============================= Additional Features ===========================
1107
 //============================= Additional Features ===========================
1010
 //=============================================================================
1108
 //=============================================================================
1036
 //
1134
 //
1037
 // M100 Free Memory Watcher
1135
 // M100 Free Memory Watcher
1038
 //
1136
 //
1039
-//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
1137
+//#define M100_FREE_MEMORY_WATCHER    // Add M100 (Free Memory Watcher) to debug memory usage
1040
 
1138
 
1041
 //
1139
 //
1042
 // G20/G21 Inch mode support
1140
 // G20/G21 Inch mode support
1181
  *
1279
  *
1182
  * Select the language to display on the LCD. These languages are available:
1280
  * Select the language to display on the LCD. These languages are available:
1183
  *
1281
  *
1184
- *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, gl, hr,
1185
- *    it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1282
+ *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, fr_utf8, gl,
1283
+ *    hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1186
  *    tr, uk, zh_CN, zh_TW, test
1284
  *    tr, uk, zh_CN, zh_TW, test
1187
  *
1285
  *
1188
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1286
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1189
  */
1287
  */
1190
 #define LCD_LANGUAGE en
1288
 #define LCD_LANGUAGE en
1191
 
1289
 
1313
 // Note: Test audio output with the G-Code:
1411
 // Note: Test audio output with the G-Code:
1314
 //  M300 S<frequency Hz> P<duration ms>
1412
 //  M300 S<frequency Hz> P<duration ms>
1315
 //
1413
 //
1316
-//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
1317
-//#define LCD_FEEDBACK_FREQUENCY_HZ 1000
1414
+//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
1415
+//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
1318
 
1416
 
1319
 //
1417
 //
1320
 // CONTROLLER TYPE: Standard
1418
 // CONTROLLER TYPE: Standard
1422
 //#define CARTESIO_UI
1520
 //#define CARTESIO_UI
1423
 
1521
 
1424
 //
1522
 //
1425
-// ANET_10 Controller supported displays.
1523
+// ANET and Tronxy Controller supported displays.
1426
 //
1524
 //
1427
-//#define ANET_KEYPAD_LCD         // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1525
+//#define ZONESTAR_LCD            // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1428
                                   // This LCD is known to be susceptible to electrical interference
1526
                                   // This LCD is known to be susceptible to electrical interference
1429
                                   // which scrambles the display.  Pressing any button clears it up.
1527
                                   // which scrambles the display.  Pressing any button clears it up.
1528
+                                  // This is a LCD2004 display with 5 analog buttons.
1529
+
1430
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1530
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1431
                                   // A clone of the RepRapDiscount full graphics display but with
1531
                                   // A clone of the RepRapDiscount full graphics display but with
1432
                                   // different pins/wiring (see pins_ANET_10.h).
1532
                                   // different pins/wiring (see pins_ANET_10.h).
1536
 //
1636
 //
1537
 //#define MKS_12864OLED
1637
 //#define MKS_12864OLED
1538
 
1638
 
1639
+// Silvergate GLCD controller
1640
+// http://github.com/android444/Silvergate
1641
+//
1642
+//#define SILVER_GATE_GLCD_CONTROLLER
1643
+
1539
 //=============================================================================
1644
 //=============================================================================
1540
 //=============================== Extra Features ==============================
1645
 //=============================== Extra Features ==============================
1541
 //=============================================================================
1646
 //=============================================================================
1592
  * Adds the M150 command to set the LED (or LED strip) color.
1697
  * Adds the M150 command to set the LED (or LED strip) color.
1593
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1698
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1594
  * luminance values can be set from 0 to 255.
1699
  * luminance values can be set from 0 to 255.
1595
- * For Neopixel LED overall brightness parameters is also available 
1700
+ * For Neopixel LED an overall brightness parameter is also available.
1596
  *
1701
  *
1597
  * *** CAUTION ***
1702
  * *** CAUTION ***
1598
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1703
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1599
  *  as the Arduino cannot handle the current the LEDs will require.
1704
  *  as the Arduino cannot handle the current the LEDs will require.
1600
  *  Failure to follow this precaution can destroy your Arduino!
1705
  *  Failure to follow this precaution can destroy your Arduino!
1601
- *  The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
1602
- *  cannot handle such current, separate 5V power supply must be used
1706
+ *  NOTE: A separate 5V power supply is required! The Neopixel LED needs
1707
+ *  more current than the Arduino 5V linear regulator can produce.
1603
  * *** CAUTION ***
1708
  * *** CAUTION ***
1604
  *
1709
  *
1605
- * LED type. This options are mutualy exclusive. Uncomment only one.
1710
+ * LED Type. Enable only one of the following two options.
1606
  *
1711
  *
1607
  */
1712
  */
1608
 //#define RGB_LED
1713
 //#define RGB_LED
1618
 // Support for Adafruit Neopixel LED driver
1723
 // Support for Adafruit Neopixel LED driver
1619
 //#define NEOPIXEL_LED
1724
 //#define NEOPIXEL_LED
1620
 #if ENABLED(NEOPIXEL_LED)
1725
 #if ENABLED(NEOPIXEL_LED)
1621
-  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
1726
+  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
1622
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1727
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1623
-  #define NEOPIXEL_PIXELS 30       // Number of LEDs on strip
1624
-  #define NEOPIXEL_IS_SEQUENTIAL   // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
1625
-  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness 0-255
1728
+  #define NEOPIXEL_PIXELS 30       // Number of LEDs in the strip
1729
+  #define NEOPIXEL_IS_SEQUENTIAL   // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
1730
+  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness (0-255)
1626
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1731
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1627
 #endif
1732
 #endif
1628
 
1733
 
1637
  *  - Change to green once print has finished
1742
  *  - Change to green once print has finished
1638
  *  - Turn off after the print has finished and the user has pushed a button
1743
  *  - Turn off after the print has finished and the user has pushed a button
1639
  */
1744
  */
1640
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED)
1745
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
1641
   #define PRINTER_EVENT_LEDS
1746
   #define PRINTER_EVENT_LEDS
1642
 #endif
1747
 #endif
1643
 
1748
 
1644
-/*********************************************************************\
1645
-* R/C SERVO support
1646
-* Sponsored by TrinityLabs, Reworked by codexmas
1647
-**********************************************************************/
1749
+/**
1750
+ * R/C SERVO support
1751
+ * Sponsored by TrinityLabs, Reworked by codexmas
1752
+ */
1648
 
1753
 
1649
-// Number of servos
1650
-//
1651
-// If you select a configuration below, this will receive a default value and does not need to be set manually
1652
-// set it manually if you have more servos than extruders and wish to manually control some
1653
-// leaving it undefined or defining as 0 will disable the servo subsystem
1654
-// If unsure, leave commented / disabled
1655
-//
1754
+/**
1755
+ * Number of servos
1756
+ *
1757
+ * For some servo-related options NUM_SERVOS will be set automatically.
1758
+ * Set this manually if there are extra servos needing manual control.
1759
+ * Leave undefined or set to 0 to entirely disable the servo subsystem.
1760
+ */
1656
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1761
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1657
 
1762
 
1658
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1763
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1665
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1770
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1666
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1771
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1667
 
1772
 
1668
-/**
1669
- * Filament Width Sensor
1670
- *
1671
- * Measures the filament width in real-time and adjusts
1672
- * flow rate to compensate for any irregularities.
1673
- *
1674
- * Also allows the measured filament diameter to set the
1675
- * extrusion rate, so the slicer only has to specify the
1676
- * volume.
1677
- *
1678
- * Only a single extruder is supported at this time.
1679
- *
1680
- *  34 RAMPS_14    : Analog input 5 on the AUX2 connector
1681
- *  81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
1682
- * 301 RAMBO       : Analog input 3
1683
- *
1684
- * Note: May require analog pins to be defined for other boards.
1685
- */
1686
-//#define FILAMENT_WIDTH_SENSOR
1687
-
1688
-#define DEFAULT_NOMINAL_FILAMENT_DIA 3.00   // (mm) Diameter of the filament generally used (3.0 or 1.75mm), also used in the slicer. Used to validate sensor reading.
1689
-
1690
-#if ENABLED(FILAMENT_WIDTH_SENSOR)
1691
-  #define FILAMENT_SENSOR_EXTRUDER_NUM 0    // Index of the extruder that has the filament sensor (0,1,2,3)
1692
-  #define MEASUREMENT_DELAY_CM        14    // (cm) The distance from the filament sensor to the melting chamber
1693
-
1694
-  #define MEASURED_UPPER_LIMIT         3.30 // (mm) Upper limit used to validate sensor reading
1695
-  #define MEASURED_LOWER_LIMIT         1.90 // (mm) Lower limit used to validate sensor reading
1696
-  #define MAX_MEASUREMENT_DELAY       20    // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
1697
-
1698
-  #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
1699
-
1700
-  // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
1701
-  //#define FILAMENT_LCD_DISPLAY
1702
-#endif
1703
-
1704
 #endif // CONFIGURATION_H
1773
 #endif // CONFIGURATION_H

+ 268
- 125
Marlin/example_configurations/Infitary/i3-M508/Configuration_adv.h Переглянути файл

32
  */
32
  */
33
 #ifndef CONFIGURATION_ADV_H
33
 #ifndef CONFIGURATION_ADV_H
34
 #define CONFIGURATION_ADV_H
34
 #define CONFIGURATION_ADV_H
35
-#define CONFIGURATION_ADV_H_VERSION 010100
35
+#define CONFIGURATION_ADV_H_VERSION 010107
36
 
36
 
37
 // @section temperature
37
 // @section temperature
38
 
38
 
48
 #endif
48
 #endif
49
 
49
 
50
 /**
50
 /**
51
- * Thermal Protection protects your printer from damage and fire if a
52
- * thermistor falls out or temperature sensors fail in any way.
51
+ * Thermal Protection provides additional protection to your printer from damage
52
+ * and fire. Marlin always includes safe min and max temperature ranges which
53
+ * protect against a broken or disconnected thermistor wire.
53
  *
54
  *
54
- * The issue: If a thermistor falls out or a temperature sensor fails,
55
- * Marlin can no longer sense the actual temperature. Since a disconnected
56
- * thermistor reads as a low temperature, the firmware will keep the heater on.
55
+ * The issue: If a thermistor falls out, it will report the much lower
56
+ * temperature of the air in the room, and the the firmware will keep
57
+ * the heater on.
57
  *
58
  *
58
  * The solution: Once the temperature reaches the target, start observing.
59
  * The solution: Once the temperature reaches the target, start observing.
59
- * If the temperature stays too far below the target (hysteresis) for too long (period),
60
- * the firmware will halt the machine as a safety precaution.
60
+ * If the temperature stays too far below the target (hysteresis) for too
61
+ * long (period), the firmware will halt the machine as a safety precaution.
61
  *
62
  *
62
- * If you get false positives for "Thermal Runaway" increase THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
63
+ * If you get false positives for "Thermal Runaway", increase
64
+ * THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
63
  */
65
  */
64
 #if ENABLED(THERMAL_PROTECTION_HOTENDS)
66
 #if ENABLED(THERMAL_PROTECTION_HOTENDS)
65
   #define THERMAL_PROTECTION_PERIOD 40        // Seconds
67
   #define THERMAL_PROTECTION_PERIOD 40        // Seconds
66
   #define THERMAL_PROTECTION_HYSTERESIS 4     // Degrees Celsius
68
   #define THERMAL_PROTECTION_HYSTERESIS 4     // Degrees Celsius
67
 
69
 
68
   /**
70
   /**
69
-   * Whenever an M104 or M109 increases the target temperature the firmware will wait for the
70
-   * WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
71
-   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
72
-   * but only if the current temperature is far enough below the target for a reliable test.
71
+   * Whenever an M104, M109, or M303 increases the target temperature, the
72
+   * firmware will wait for the WATCH_TEMP_PERIOD to expire. If the temperature
73
+   * hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted and
74
+   * requires a hard reset. This test restarts with any M104/M109/M303, but only
75
+   * if the current temperature is far enough below the target for a reliable
76
+   * test.
73
    *
77
    *
74
-   * If you get false positives for "Heating failed" increase WATCH_TEMP_PERIOD and/or decrease WATCH_TEMP_INCREASE
75
-   * WATCH_TEMP_INCREASE should not be below 2.
78
+   * If you get false positives for "Heating failed", increase WATCH_TEMP_PERIOD
79
+   * and/or decrease WATCH_TEMP_INCREASE. WATCH_TEMP_INCREASE should not be set
80
+   * below 2.
76
    */
81
    */
77
   #define WATCH_TEMP_PERIOD 20                // Seconds
82
   #define WATCH_TEMP_PERIOD 20                // Seconds
78
   #define WATCH_TEMP_INCREASE 2               // Degrees Celsius
83
   #define WATCH_TEMP_INCREASE 2               // Degrees Celsius
86
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
91
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
87
 
92
 
88
   /**
93
   /**
89
-   * Whenever an M140 or M190 increases the target temperature the firmware will wait for the
90
-   * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE
91
-   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190,
92
-   * but only if the current temperature is far enough below the target for a reliable test.
93
-   *
94
-   * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease
95
-   * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.)
94
+   * As described above, except for the bed (M140/M190/M303).
96
    */
95
    */
97
   #define WATCH_BED_TEMP_PERIOD 60                // Seconds
96
   #define WATCH_BED_TEMP_PERIOD 60                // Seconds
98
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
97
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
123
   #define AUTOTEMP_OLDWEIGHT 0.98
122
   #define AUTOTEMP_OLDWEIGHT 0.98
124
 #endif
123
 #endif
125
 
124
 
125
+// Show extra position information in M114
126
+//#define M114_DETAIL
127
+
126
 // Show Temperature ADC value
128
 // Show Temperature ADC value
127
 // Enable for M105 to include ADC values read from temperature sensors.
129
 // Enable for M105 to include ADC values read from temperature sensors.
128
 //#define SHOW_TEMP_ADC_VALUES
130
 //#define SHOW_TEMP_ADC_VALUES
257
 
259
 
258
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
260
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
259
 
261
 
260
-// Dual X Steppers
261
-// Uncomment this option to drive two X axis motors.
262
-// The next unused E driver will be assigned to the second X stepper.
262
+/**
263
+ * Dual Steppers / Dual Endstops
264
+ *
265
+ * This section will allow you to use extra E drivers to drive a second motor for X, Y, or Z axes.
266
+ *
267
+ * For example, set X_DUAL_STEPPER_DRIVERS setting to use a second motor. If the motors need to
268
+ * spin in opposite directions set INVERT_X2_VS_X_DIR. If the second motor needs its own endstop
269
+ * set X_DUAL_ENDSTOPS. This can adjust for "racking." Use X2_USE_ENDSTOP to set the endstop plug
270
+ * that should be used for the second endstop. Extra endstops will appear in the output of 'M119'.
271
+ *
272
+ * Use X_DUAL_ENDSTOP_ADJUSTMENT to adjust for mechanical imperfection. After homing both motors
273
+ * this offset is applied to the X2 motor. To find the offset home the X axis, and measure the error
274
+ * in X2. Dual endstop offsets can be set at runtime with 'M666 X<offset> Y<offset> Z<offset>'.
275
+ */
276
+
263
 //#define X_DUAL_STEPPER_DRIVERS
277
 //#define X_DUAL_STEPPER_DRIVERS
264
 #if ENABLED(X_DUAL_STEPPER_DRIVERS)
278
 #if ENABLED(X_DUAL_STEPPER_DRIVERS)
265
-  // Set true if the two X motors need to rotate in opposite directions
266
-  #define INVERT_X2_VS_X_DIR true
279
+  #define INVERT_X2_VS_X_DIR true   // Set 'true' if X motors should rotate in opposite directions
280
+  //#define X_DUAL_ENDSTOPS
281
+  #if ENABLED(X_DUAL_ENDSTOPS)
282
+    #define X2_USE_ENDSTOP _XMAX_
283
+    #define X_DUAL_ENDSTOPS_ADJUSTMENT  0
284
+  #endif
267
 #endif
285
 #endif
268
 
286
 
269
-// Dual Y Steppers
270
-// Uncomment this option to drive two Y axis motors.
271
-// The next unused E driver will be assigned to the second Y stepper.
272
 //#define Y_DUAL_STEPPER_DRIVERS
287
 //#define Y_DUAL_STEPPER_DRIVERS
273
 #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
288
 #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
274
-  // Set true if the two Y motors need to rotate in opposite directions
275
-  #define INVERT_Y2_VS_Y_DIR true
289
+  #define INVERT_Y2_VS_Y_DIR true   // Set 'true' if Y motors should rotate in opposite directions
290
+  //#define Y_DUAL_ENDSTOPS
291
+  #if ENABLED(Y_DUAL_ENDSTOPS)
292
+    #define Y2_USE_ENDSTOP _YMAX_
293
+    #define Y_DUAL_ENDSTOPS_ADJUSTMENT  0
294
+  #endif
276
 #endif
295
 #endif
277
 
296
 
278
-// A single Z stepper driver is usually used to drive 2 stepper motors.
279
-// Uncomment this option to use a separate stepper driver for each Z axis motor.
280
-// The next unused E driver will be assigned to the second Z stepper.
281
 //#define Z_DUAL_STEPPER_DRIVERS
297
 //#define Z_DUAL_STEPPER_DRIVERS
282
-
283
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
298
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
284
-
285
-  // Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper.
286
-  // That way the machine is capable to align the bed during home, since both Z steppers are homed.
287
-  // There is also an implementation of M666 (software endstops adjustment) to this feature.
288
-  // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed.
289
-  // One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2.
290
-  // If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive.
291
-  // Play a little bit with small adjustments (0.5mm) and check the behaviour.
292
-  // The M119 (endstops report) will start reporting the Z2 Endstop as well.
293
-
294
   //#define Z_DUAL_ENDSTOPS
299
   //#define Z_DUAL_ENDSTOPS
295
-
296
   #if ENABLED(Z_DUAL_ENDSTOPS)
300
   #if ENABLED(Z_DUAL_ENDSTOPS)
297
     #define Z2_USE_ENDSTOP _XMAX_
301
     #define Z2_USE_ENDSTOP _XMAX_
298
-    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0  // Use M666 to determine/test this value
302
+    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0
299
   #endif
303
   #endif
300
-
301
-#endif // Z_DUAL_STEPPER_DRIVERS
304
+#endif
302
 
305
 
303
 // Enable this for dual x-carriage printers.
306
 // Enable this for dual x-carriage printers.
304
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
307
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
345
 
348
 
346
 // @section homing
349
 // @section homing
347
 
350
 
348
-//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
351
+// Homing hits each endstop, retracts by these distances, then does a slower bump.
349
 #define X_HOME_BUMP_MM 5
352
 #define X_HOME_BUMP_MM 5
350
 #define Y_HOME_BUMP_MM 5
353
 #define Y_HOME_BUMP_MM 5
351
 #define Z_HOME_BUMP_MM 1
354
 #define Z_HOME_BUMP_MM 1
352
-#define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
353
-#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
355
+#define HOMING_BUMP_DIVISOR { 2, 2, 4 }  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
356
+#define QUICK_HOME                       // If homing includes X and Y, do a diagonal move initially
354
 
357
 
355
 // When G28 is called, this option will make Y home before X
358
 // When G28 is called, this option will make Y home before X
356
 //#define HOME_Y_BEFORE_X
359
 //#define HOME_Y_BEFORE_X
434
 #define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 }   // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
437
 #define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 }   // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
435
 //#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 }    // Default drive percent - X, Y, Z, E axis
438
 //#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 }    // Default drive percent - X, Y, Z, E axis
436
 
439
 
437
-// Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
440
+// Use an I2C based DIGIPOT (e.g., Azteeg X3 Pro)
438
 //#define DIGIPOT_I2C
441
 //#define DIGIPOT_I2C
442
+#if ENABLED(DIGIPOT_I2C) && !defined(DIGIPOT_I2C_ADDRESS_A)
443
+  /**
444
+   * Common slave addresses:
445
+   *
446
+   *                    A   (A shifted)   B   (B shifted)  IC
447
+   * Smoothie          0x2C (0x58)       0x2D (0x5A)       MCP4451
448
+   * AZTEEG_X3_PRO     0x2C (0x58)       0x2E (0x5C)       MCP4451
449
+   * MIGHTYBOARD_REVE  0x2F (0x5E)                         MCP4018
450
+   */
451
+  #define DIGIPOT_I2C_ADDRESS_A 0x2C  // unshifted slave address for first DIGIPOT
452
+  #define DIGIPOT_I2C_ADDRESS_B 0x2D  // unshifted slave address for second DIGIPOT
453
+#endif
454
+
439
 //#define DIGIPOT_MCP4018          // Requires library from https://github.com/stawel/SlowSoftI2CMaster
455
 //#define DIGIPOT_MCP4018          // Requires library from https://github.com/stawel/SlowSoftI2CMaster
440
 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4     AZTEEG_X3_PRO: 8
456
 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4     AZTEEG_X3_PRO: 8
441
 // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
457
 // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
466
 // The timeout (in ms) to return to the status screen from sub-menus
482
 // The timeout (in ms) to return to the status screen from sub-menus
467
 //#define LCD_TIMEOUT_TO_STATUS 15000
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
468
 
484
 
485
+/**
486
+ * LED Control Menu
487
+ * Enable this feature to add LED Control to the LCD menu
488
+ */
489
+//#define LED_CONTROL_MENU
490
+#if ENABLED(LED_CONTROL_MENU)
491
+  #define LED_COLOR_PRESETS                 // Enable the Preset Color menu option
492
+  #if ENABLED(LED_COLOR_PRESETS)
493
+    #define LED_USER_PRESET_RED        255  // User defined RED value
494
+    #define LED_USER_PRESET_GREEN      128  // User defined GREEN value
495
+    #define LED_USER_PRESET_BLUE         0  // User defined BLUE value
496
+    #define LED_USER_PRESET_WHITE      255  // User defined WHITE value
497
+    #define LED_USER_PRESET_BRIGHTNESS 255  // User defined intensity
498
+    //#define LED_USER_PRESET_STARTUP       // Have the printer display the user preset color on startup
499
+  #endif
500
+#endif // LED_CONTROL_MENU
501
+
469
 #if ENABLED(SDSUPPORT)
502
 #if ENABLED(SDSUPPORT)
470
 
503
 
471
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
504
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
475
   // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
508
   // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
476
   #define SD_DETECT_INVERTED
509
   #define SD_DETECT_INVERTED
477
 
510
 
478
-  #define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
511
+  #define SD_FINISHED_STEPPERRELEASE true          // Disable steppers when SD Print is finished
479
   #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
512
   #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
480
 
513
 
481
-  #define SDCARD_RATHERRECENTFIRST  //reverse file order of sd card menu display. Its sorted practically after the file system block order.
482
-  // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that.
483
-  // using:
514
+  // Reverse SD sort to show "more recent" files first, according to the card's FAT.
515
+  // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended.
516
+  #define SDCARD_RATHERRECENTFIRST
517
+
518
+  // Add an option in the menu to run all auto#.g files
484
   //#define MENU_ADDAUTOSTART
519
   //#define MENU_ADDAUTOSTART
485
 
520
 
486
   /**
521
   /**
517
     #define SDSORT_USES_STACK  false  // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
552
     #define SDSORT_USES_STACK  false  // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
518
     #define SDSORT_CACHE_NAMES false  // Keep sorted items in RAM longer for speedy performance. Most expensive option.
553
     #define SDSORT_CACHE_NAMES false  // Keep sorted items in RAM longer for speedy performance. Most expensive option.
519
     #define SDSORT_DYNAMIC_RAM false  // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
554
     #define SDSORT_DYNAMIC_RAM false  // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
555
+    #define SDSORT_CACHE_VFATS 2      // Maximum number of 13-byte VFAT entries to use for sorting.
556
+                                      // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM.
520
   #endif
557
   #endif
521
 
558
 
522
   // Show a progress bar on HD44780 LCDs for SD printing
559
   // Show a progress bar on HD44780 LCDs for SD printing
535
     //#define LCD_PROGRESS_BAR_TEST
572
     //#define LCD_PROGRESS_BAR_TEST
536
   #endif
573
   #endif
537
 
574
 
575
+  // Add an 'M73' G-code to set the current percentage
576
+  //#define LCD_SET_PROGRESS_MANUALLY
577
+
538
   // This allows hosts to request long names for files and folders with M33
578
   // This allows hosts to request long names for files and folders with M33
539
   //#define LONG_FILENAME_HOST_SUPPORT
579
   //#define LONG_FILENAME_HOST_SUPPORT
540
 
580
 
541
-  // This option allows you to abort SD printing when any endstop is triggered.
542
-  // This feature must be enabled with "M540 S1" or from the LCD menu.
543
-  // To have any effect, endstops must be enabled during SD printing.
581
+  // Enable this option to scroll long filenames in the SD card menu
582
+  //#define SCROLL_LONG_FILENAMES
583
+
584
+  /**
585
+   * This option allows you to abort SD printing when any endstop is triggered.
586
+   * This feature must be enabled with "M540 S1" or from the LCD menu.
587
+   * To have any effect, endstops must be enabled during SD printing.
588
+   */
544
   //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
589
   //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
545
 
590
 
591
+  /**
592
+   * This option makes it easier to print the same SD Card file again.
593
+   * On print completion the LCD Menu will open with the file selected.
594
+   * You can just click to start the print, or navigate elsewhere.
595
+   */
596
+  //#define SD_REPRINT_LAST_SELECTED_FILE
597
+
546
 #endif // SDSUPPORT
598
 #endif // SDSUPPORT
547
 
599
 
548
 /**
600
 /**
575
   // Enable this option and reduce the value to optimize screen updates.
627
   // Enable this option and reduce the value to optimize screen updates.
576
   // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
628
   // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
577
   //#define DOGM_SPI_DELAY_US 5
629
   //#define DOGM_SPI_DELAY_US 5
630
+
631
+  // Swap the CW/CCW indicators in the graphics overlay
632
+  //#define OVERLAY_GFX_REVERSE
633
+
578
 #endif // DOGLCD
634
 #endif // DOGLCD
579
 
635
 
580
 // @section safety
636
 // @section safety
603
 #if ENABLED(BABYSTEPPING)
659
 #if ENABLED(BABYSTEPPING)
604
   //#define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
660
   //#define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
605
   #define BABYSTEP_INVERT_Z false    // Change if Z babysteps should go the other way
661
   #define BABYSTEP_INVERT_Z false    // Change if Z babysteps should go the other way
606
-  #define BABYSTEP_MULTIPLICATOR 100 // Babysteps are very small. Increase for faster motion.
662
+  #define BABYSTEP_MULTIPLICATOR 1   // Babysteps are very small. Increase for faster motion.
607
   //#define BABYSTEP_ZPROBE_OFFSET   // Enable to combine M851 and Babystepping
663
   //#define BABYSTEP_ZPROBE_OFFSET   // Enable to combine M851 and Babystepping
608
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
664
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
609
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
665
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
610
                                         // Note: Extra time may be added to mitigate controller latency.
666
                                         // Note: Extra time may be added to mitigate controller latency.
611
   //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
667
   //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
612
-  //#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators
613
 #endif
668
 #endif
614
 
669
 
615
 // @section extruder
670
 // @section extruder
656
 
711
 
657
 // @section leveling
712
 // @section leveling
658
 
713
 
659
-// Default mesh area is an area with an inset margin on the print area.
660
-// Below are the macros that are used to define the borders for the mesh area,
661
-// made available here for specialized needs, ie dual extruder setup.
662
-#if ENABLED(MESH_BED_LEVELING)
663
-  #define MESH_MIN_X MESH_INSET
664
-  #define MESH_MAX_X (X_BED_SIZE - (MESH_INSET))
665
-  #define MESH_MIN_Y MESH_INSET
666
-  #define MESH_MAX_Y (Y_BED_SIZE - (MESH_INSET))
667
-#elif ENABLED(AUTO_BED_LEVELING_UBL)
668
-  #define UBL_MESH_MIN_X UBL_MESH_INSET
669
-  #define UBL_MESH_MAX_X (X_BED_SIZE - (UBL_MESH_INSET))
670
-  #define UBL_MESH_MIN_Y UBL_MESH_INSET
671
-  #define UBL_MESH_MAX_Y (Y_BED_SIZE - (UBL_MESH_INSET))
672
-
673
-  // If this is defined, the currently active mesh will be saved in the
674
-  // current slot on M500.
675
-  #define UBL_SAVE_ACTIVE_ON_M500
714
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
715
+  #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
716
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
717
+  #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
718
+#endif
719
+
720
+#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL)
721
+  // Override the mesh area if the automatic (max) area is too large
722
+  //#define MESH_MIN_X MESH_INSET
723
+  //#define MESH_MIN_Y MESH_INSET
724
+  //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET)
725
+  //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
676
 #endif
726
 #endif
677
 
727
 
678
 // @section extras
728
 // @section extras
692
 //#define BEZIER_CURVE_SUPPORT
742
 //#define BEZIER_CURVE_SUPPORT
693
 
743
 
694
 // G38.2 and G38.3 Probe Target
744
 // G38.2 and G38.3 Probe Target
695
-// Enable PROBE_DOUBLE_TOUCH if you want G38 to double touch
745
+// Set MULTIPLE_PROBING if you want G38 to double touch
696
 //#define G38_PROBE_TARGET
746
 //#define G38_PROBE_TARGET
697
 #if ENABLED(G38_PROBE_TARGET)
747
 #if ENABLED(G38_PROBE_TARGET)
698
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
748
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
717
 // @section hidden
767
 // @section hidden
718
 
768
 
719
 // The number of linear motions that can be in the plan at any give time.
769
 // The number of linear motions that can be in the plan at any give time.
720
-// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2, i.g. 8,16,32 because shifts and ors are used to do the ring-buffering.
770
+// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2 (e.g. 8, 16, 32) because shifts and ors are used to do the ring-buffering.
721
 #if ENABLED(SDSUPPORT)
771
 #if ENABLED(SDSUPPORT)
722
   #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
772
   #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
723
 #else
773
 #else
808
 #endif
858
 #endif
809
 
859
 
810
 /**
860
 /**
861
+ * Extra Fan Speed
862
+ * Adds a secondary fan speed for each print-cooling fan.
863
+ *   'M106 P<fan> T3-255' : Set a secondary speed for <fan>
864
+ *   'M106 P<fan> T2'     : Use the set secondary speed
865
+ *   'M106 P<fan> T1'     : Restore the previous fan speed
866
+ */
867
+//#define EXTRA_FAN_SPEED
868
+
869
+/**
811
  * Advanced Pause
870
  * Advanced Pause
812
  * Experimental feature for filament change support and for parking the nozzle when paused.
871
  * Experimental feature for filament change support and for parking the nozzle when paused.
813
  * Adds the GCode M600 for initiating filament change.
872
  * Adds the GCode M600 for initiating filament change.
917
 
976
 
918
 #endif
977
 #endif
919
 
978
 
920
-// @section TMC2130
979
+// @section TMC2130, TMC2208
921
 
980
 
922
 /**
981
 /**
923
  * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
982
  * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
931
  */
990
  */
932
 //#define HAVE_TMC2130
991
 //#define HAVE_TMC2130
933
 
992
 
934
-#if ENABLED(HAVE_TMC2130)
993
+/**
994
+ * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
995
+ * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin.
996
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN
997
+ * to #_SERIAL_TX_PIN with a 1K resistor.
998
+ * The drivers can also be used with hardware serial.
999
+ *
1000
+ * You'll also need the TMC2208Stepper Arduino library
1001
+ * (https://github.com/teemuatlut/TMC2208Stepper).
1002
+ */
1003
+//#define HAVE_TMC2208
1004
+
1005
+#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
935
 
1006
 
936
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
1007
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
937
   //#define X_IS_TMC2130
1008
   //#define X_IS_TMC2130
946
   //#define E3_IS_TMC2130
1017
   //#define E3_IS_TMC2130
947
   //#define E4_IS_TMC2130
1018
   //#define E4_IS_TMC2130
948
 
1019
 
1020
+  //#define X_IS_TMC2208
1021
+  //#define X2_IS_TMC2208
1022
+  //#define Y_IS_TMC2208
1023
+  //#define Y2_IS_TMC2208
1024
+  //#define Z_IS_TMC2208
1025
+  //#define Z2_IS_TMC2208
1026
+  //#define E0_IS_TMC2208
1027
+  //#define E1_IS_TMC2208
1028
+  //#define E2_IS_TMC2208
1029
+  //#define E3_IS_TMC2208
1030
+  //#define E4_IS_TMC2208
1031
+
949
   /**
1032
   /**
950
    * Stepper driver settings
1033
    * Stepper driver settings
951
    */
1034
    */
952
 
1035
 
953
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1036
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
954
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1037
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
955
-  #define INTERPOLATE          1  // Interpolate X/Y/Z_MICROSTEPS to 256
1038
+  #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
956
 
1039
 
957
-  #define X_CURRENT         1000  // rms current in mA. Multiply by 1.41 for peak current.
1040
+  #define X_CURRENT          800  // rms current in mA. Multiply by 1.41 for peak current.
958
   #define X_MICROSTEPS        16  // 0..256
1041
   #define X_MICROSTEPS        16  // 0..256
959
 
1042
 
960
-  #define Y_CURRENT         1000
1043
+  #define Y_CURRENT          800
961
   #define Y_MICROSTEPS        16
1044
   #define Y_MICROSTEPS        16
962
 
1045
 
963
-  #define Z_CURRENT         1000
1046
+  #define Z_CURRENT          800
964
   #define Z_MICROSTEPS        16
1047
   #define Z_MICROSTEPS        16
965
 
1048
 
966
-  //#define X2_CURRENT      1000
967
-  //#define X2_MICROSTEPS     16
1049
+  #define X2_CURRENT         800
1050
+  #define X2_MICROSTEPS       16
968
 
1051
 
969
-  //#define Y2_CURRENT      1000
970
-  //#define Y2_MICROSTEPS     16
1052
+  #define Y2_CURRENT         800
1053
+  #define Y2_MICROSTEPS       16
971
 
1054
 
972
-  //#define Z2_CURRENT      1000
973
-  //#define Z2_MICROSTEPS     16
1055
+  #define Z2_CURRENT         800
1056
+  #define Z2_MICROSTEPS       16
974
 
1057
 
975
-  //#define E0_CURRENT      1000
976
-  //#define E0_MICROSTEPS     16
1058
+  #define E0_CURRENT         800
1059
+  #define E0_MICROSTEPS       16
977
 
1060
 
978
-  //#define E1_CURRENT      1000
979
-  //#define E1_MICROSTEPS     16
1061
+  #define E1_CURRENT         800
1062
+  #define E1_MICROSTEPS       16
980
 
1063
 
981
-  //#define E2_CURRENT      1000
982
-  //#define E2_MICROSTEPS     16
1064
+  #define E2_CURRENT         800
1065
+  #define E2_MICROSTEPS       16
983
 
1066
 
984
-  //#define E3_CURRENT      1000
985
-  //#define E3_MICROSTEPS     16
1067
+  #define E3_CURRENT         800
1068
+  #define E3_MICROSTEPS       16
986
 
1069
 
987
-  //#define E4_CURRENT      1000
988
-  //#define E4_MICROSTEPS     16
1070
+  #define E4_CURRENT         800
1071
+  #define E4_MICROSTEPS       16
989
 
1072
 
990
   /**
1073
   /**
991
    * Use Trinamic's ultra quiet stepping mode.
1074
    * Use Trinamic's ultra quiet stepping mode.
994
   #define STEALTHCHOP
1077
   #define STEALTHCHOP
995
 
1078
 
996
   /**
1079
   /**
997
-   * Let Marlin automatically control stepper current.
998
-   * This is still an experimental feature.
999
-   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
1000
-   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
1001
-   * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX
1080
+   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1081
+   * like overtemperature and short to ground. TMC2208 requires hardware serial.
1082
+   * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1083
+   * Other detected conditions can be used to stop the current print.
1002
    * Relevant g-codes:
1084
    * Relevant g-codes:
1003
    * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
1085
    * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
1004
-   * M906 S1 - Start adjusting current
1005
-   * M906 S0 - Stop adjusting current
1006
    * M911 - Report stepper driver overtemperature pre-warn condition.
1086
    * M911 - Report stepper driver overtemperature pre-warn condition.
1007
    * M912 - Clear stepper driver overtemperature pre-warn condition flag.
1087
    * M912 - Clear stepper driver overtemperature pre-warn condition flag.
1088
+   * M122 S0/1 - Report driver parameters (Requires TMC_DEBUG)
1008
    */
1089
    */
1009
-  //#define AUTOMATIC_CURRENT_CONTROL
1090
+  //#define MONITOR_DRIVER_STATUS
1010
 
1091
 
1011
-  #if ENABLED(AUTOMATIC_CURRENT_CONTROL)
1012
-    #define CURRENT_STEP          50  // [mA]
1013
-    #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
1092
+  #if ENABLED(MONITOR_DRIVER_STATUS)
1093
+    #define CURRENT_STEP_DOWN     50  // [mA]
1014
     #define REPORT_CURRENT_CHANGE
1094
     #define REPORT_CURRENT_CHANGE
1095
+    #define STOP_ON_ERROR
1015
   #endif
1096
   #endif
1016
 
1097
 
1017
   /**
1098
   /**
1026
   #define X2_HYBRID_THRESHOLD    100
1107
   #define X2_HYBRID_THRESHOLD    100
1027
   #define Y_HYBRID_THRESHOLD     100
1108
   #define Y_HYBRID_THRESHOLD     100
1028
   #define Y2_HYBRID_THRESHOLD    100
1109
   #define Y2_HYBRID_THRESHOLD    100
1029
-  #define Z_HYBRID_THRESHOLD       4
1030
-  #define Z2_HYBRID_THRESHOLD      4
1110
+  #define Z_HYBRID_THRESHOLD       3
1111
+  #define Z2_HYBRID_THRESHOLD      3
1031
   #define E0_HYBRID_THRESHOLD     30
1112
   #define E0_HYBRID_THRESHOLD     30
1032
   #define E1_HYBRID_THRESHOLD     30
1113
   #define E1_HYBRID_THRESHOLD     30
1033
   #define E2_HYBRID_THRESHOLD     30
1114
   #define E2_HYBRID_THRESHOLD     30
1037
   /**
1118
   /**
1038
    * Use stallGuard2 to sense an obstacle and trigger an endstop.
1119
    * Use stallGuard2 to sense an obstacle and trigger an endstop.
1039
    * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
1120
    * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
1040
-   * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal.
1121
+   * X and Y homing will always be done in spreadCycle mode.
1041
    *
1122
    *
1042
    * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
1123
    * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
1043
    * Higher values make the system LESS sensitive.
1124
    * Higher values make the system LESS sensitive.
1046
    * It is advised to set X/Y_HOME_BUMP_MM to 0.
1127
    * It is advised to set X/Y_HOME_BUMP_MM to 0.
1047
    * M914 X/Y to live tune the setting
1128
    * M914 X/Y to live tune the setting
1048
    */
1129
    */
1049
-  //#define SENSORLESS_HOMING
1130
+  //#define SENSORLESS_HOMING // TMC2130 only
1050
 
1131
 
1051
   #if ENABLED(SENSORLESS_HOMING)
1132
   #if ENABLED(SENSORLESS_HOMING)
1052
-    #define X_HOMING_SENSITIVITY  19
1053
-    #define Y_HOMING_SENSITIVITY  19
1133
+    #define X_HOMING_SENSITIVITY  8
1134
+    #define Y_HOMING_SENSITIVITY  8
1054
   #endif
1135
   #endif
1055
 
1136
 
1056
   /**
1137
   /**
1138
+   * Enable M122 debugging command for TMC stepper drivers.
1139
+   * M122 S0/1 will enable continous reporting.
1140
+   */
1141
+  //#define TMC_DEBUG
1142
+
1143
+  /**
1057
    * You can set your own advanced settings by filling in predefined functions.
1144
    * You can set your own advanced settings by filling in predefined functions.
1058
    * A list of available functions can be found on the library github page
1145
    * A list of available functions can be found on the library github page
1059
    * https://github.com/teemuatlut/TMC2130Stepper
1146
    * https://github.com/teemuatlut/TMC2130Stepper
1147
+   * https://github.com/teemuatlut/TMC2208Stepper
1060
    *
1148
    *
1061
    * Example:
1149
    * Example:
1062
-   * #define TMC2130_ADV() { \
1150
+   * #define TMC_ADV() { \
1063
    *   stepperX.diag0_temp_prewarn(1); \
1151
    *   stepperX.diag0_temp_prewarn(1); \
1064
-   *   stepperX.interpolate(0); \
1152
+   *   stepperY.interpolate(0); \
1065
    * }
1153
    * }
1066
    */
1154
    */
1067
-  #define  TMC2130_ADV() {  }
1155
+  #define  TMC_ADV() {  }
1068
 
1156
 
1069
-#endif // HAVE_TMC2130
1157
+#endif // TMC2130 || TMC2208
1070
 
1158
 
1071
 // @section L6470
1159
 // @section L6470
1072
 
1160
 
1231
 #endif
1319
 #endif
1232
 
1320
 
1233
 /**
1321
 /**
1322
+ * Filament Width Sensor
1323
+ *
1324
+ * Measures the filament width in real-time and adjusts
1325
+ * flow rate to compensate for any irregularities.
1326
+ *
1327
+ * Also allows the measured filament diameter to set the
1328
+ * extrusion rate, so the slicer only has to specify the
1329
+ * volume.
1330
+ *
1331
+ * Only a single extruder is supported at this time.
1332
+ *
1333
+ *  34 RAMPS_14    : Analog input 5 on the AUX2 connector
1334
+ *  81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
1335
+ * 301 RAMBO       : Analog input 3
1336
+ *
1337
+ * Note: May require analog pins to be defined for other boards.
1338
+ */
1339
+//#define FILAMENT_WIDTH_SENSOR
1340
+
1341
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
1342
+  #define FILAMENT_SENSOR_EXTRUDER_NUM 0    // Index of the extruder that has the filament sensor. :[0,1,2,3,4]
1343
+  #define MEASUREMENT_DELAY_CM        14    // (cm) The distance from the filament sensor to the melting chamber
1344
+
1345
+  #define MEASURED_UPPER_LIMIT         3.30 // (mm) Upper limit used to validate sensor reading
1346
+  #define MEASURED_LOWER_LIMIT         1.90 // (mm) Lower limit used to validate sensor reading
1347
+  #define MAX_MEASUREMENT_DELAY       20    // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
1348
+
1349
+  #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
1350
+
1351
+  // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
1352
+  //#define FILAMENT_LCD_DISPLAY
1353
+#endif
1354
+
1355
+/**
1356
+ * CNC Coordinate Systems
1357
+ *
1358
+ * Enables G53 and G54-G59.3 commands to select coordinate systems
1359
+ * and G92.1 to reset the workspace to native machine space.
1360
+ */
1361
+//#define CNC_COORDINATE_SYSTEMS
1362
+
1363
+/**
1234
  * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
1364
  * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
1235
  */
1365
  */
1236
 //#define PINS_DEBUGGING
1366
 //#define PINS_DEBUGGING
1421
                                          // tweaks made to the configuration are affecting the printer in real-time.
1551
                                          // tweaks made to the configuration are affecting the printer in real-time.
1422
 #endif
1552
 #endif
1423
 
1553
 
1554
+/**
1555
+ * NanoDLP Sync support
1556
+ *
1557
+ * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
1558
+ * string to enable synchronization with DLP projector exposure. This change will allow to use
1559
+ * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
1560
+ */
1561
+//#define NANODLP_Z_SYNC
1562
+#if ENABLED(NANODLP_Z_SYNC)
1563
+  //#define NANODLP_ALL_AXIS  // Enables "Z_move_comp" output on any axis move.
1564
+                              // Default behaviour is limited to Z axis only.
1565
+#endif
1566
+
1424
 #endif // CONFIGURATION_ADV_H
1567
 #endif // CONFIGURATION_ADV_H

+ 159
- 90
Marlin/example_configurations/Malyan/M150/Configuration.h Переглянути файл

42
  */
42
  */
43
 #ifndef CONFIGURATION_H
43
 #ifndef CONFIGURATION_H
44
 #define CONFIGURATION_H
44
 #define CONFIGURATION_H
45
-#define CONFIGURATION_H_VERSION 010100
45
+#define CONFIGURATION_H_VERSION 010107
46
 
46
 
47
 //===========================================================================
47
 //===========================================================================
48
 //============================= Getting Started =============================
48
 //============================= Getting Started =============================
141
 // :[1, 2, 3, 4, 5]
141
 // :[1, 2, 3, 4, 5]
142
 #define EXTRUDERS 1
142
 #define EXTRUDERS 1
143
 
143
 
144
+// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
145
+#define DEFAULT_NOMINAL_FILAMENT_DIA 3.0
146
+
144
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
147
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
145
 //#define SINGLENOZZLE
148
 //#define SINGLENOZZLE
146
 
149
 
344
 
347
 
345
 // Comment the following line to disable PID and enable bang-bang.
348
 // Comment the following line to disable PID and enable bang-bang.
346
 #define PIDTEMP
349
 #define PIDTEMP
347
-#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
348
-#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
350
+#define BANG_MAX 255     // Limits current to nozzle while in bang-bang mode; 255=full current
351
+#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
352
+#define PID_K1 0.95      // Smoothing factor within the PID
349
 #if ENABLED(PIDTEMP)
353
 #if ENABLED(PIDTEMP)
350
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
354
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
351
   //#define PID_DEBUG // Sends debug data to the serial port.
355
   //#define PID_DEBUG // Sends debug data to the serial port.
355
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
359
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
356
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
360
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
357
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
361
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
358
-  #define K1 0.95 //smoothing factor within the PID
359
 
362
 
360
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
363
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
361
 
364
 
436
 //===========================================================================
439
 //===========================================================================
437
 
440
 
438
 /**
441
 /**
439
- * Thermal Protection protects your printer from damage and fire if a
440
- * thermistor falls out or temperature sensors fail in any way.
442
+ * Thermal Protection provides additional protection to your printer from damage
443
+ * and fire. Marlin always includes safe min and max temperature ranges which
444
+ * protect against a broken or disconnected thermistor wire.
441
  *
445
  *
442
- * The issue: If a thermistor falls out or a temperature sensor fails,
443
- * Marlin can no longer sense the actual temperature. Since a disconnected
444
- * thermistor reads as a low temperature, the firmware will keep the heater on.
446
+ * The issue: If a thermistor falls out, it will report the much lower
447
+ * temperature of the air in the room, and the the firmware will keep
448
+ * the heater on.
445
  *
449
  *
446
  * If you get "Thermal Runaway" or "Heating failed" errors the
450
  * If you get "Thermal Runaway" or "Heating failed" errors the
447
  * details can be tuned in Configuration_adv.h
451
  * details can be tuned in Configuration_adv.h
593
 // @section probes
597
 // @section probes
594
 
598
 
595
 //
599
 //
596
-// See http://marlinfw.org/configuration/probes.html
600
+// See http://marlinfw.org/docs/configuration/probes.html
597
 //
601
 //
598
 
602
 
599
 /**
603
 /**
710
 // X and Y axis travel speed (mm/m) between probes
714
 // X and Y axis travel speed (mm/m) between probes
711
 //#define XY_PROBE_SPEED 8000
715
 //#define XY_PROBE_SPEED 8000
712
 
716
 
713
-// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH)
717
+// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
714
 //#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
718
 //#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
715
 
719
 
716
 // Speed for the "accurate" probe of each point
720
 // Speed for the "accurate" probe of each point
717
 //#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
721
 //#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
718
 
722
 
719
-// Use double touch for probing
720
-//#define PROBE_DOUBLE_TOUCH
723
+// The number of probes to perform at each point.
724
+//   Set to 2 for a fast/slow probe, using the second probe result.
725
+//   Set to 3 or more for slow probes, averaging the results.
726
+//#define MULTIPLE_PROBING 2
721
 
727
 
722
 /**
728
 /**
723
  * Z probes require clearance when deploying, stowing, and moving between
729
  * Z probes require clearance when deploying, stowing, and moving between
809
 #define Y_MAX_POS Y_BED_SIZE
815
 #define Y_MAX_POS Y_BED_SIZE
810
 #define Z_MAX_POS 180
816
 #define Z_MAX_POS 180
811
 
817
 
812
-// If enabled, axes won't move below MIN_POS in response to movement commands.
818
+/**
819
+ * Software Endstops
820
+ *
821
+ * - Prevent moves outside the set machine bounds.
822
+ * - Individual axes can be disabled, if desired.
823
+ * - X and Y only apply to Cartesian robots.
824
+ * - Use 'M211' to set software endstops on/off or report current state
825
+ */
826
+
827
+// Min software endstops curtail movement below minimum coordinate bounds
813
 #define MIN_SOFTWARE_ENDSTOPS
828
 #define MIN_SOFTWARE_ENDSTOPS
814
-// If enabled, axes won't move above MAX_POS in response to movement commands.
829
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
830
+  #define MIN_SOFTWARE_ENDSTOP_X
831
+  #define MIN_SOFTWARE_ENDSTOP_Y
832
+  #define MIN_SOFTWARE_ENDSTOP_Z
833
+#endif
834
+
835
+// Max software endstops curtail movement above maximum coordinate bounds
815
 #define MAX_SOFTWARE_ENDSTOPS
836
 #define MAX_SOFTWARE_ENDSTOPS
837
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
838
+  #define MAX_SOFTWARE_ENDSTOP_X
839
+  #define MAX_SOFTWARE_ENDSTOP_Y
840
+  #define MAX_SOFTWARE_ENDSTOP_Z
841
+#endif
816
 
842
 
817
 /**
843
 /**
818
  * Filament Runout Sensor
844
  * Filament Runout Sensor
832
 //===========================================================================
858
 //===========================================================================
833
 //=============================== Bed Leveling ==============================
859
 //=============================== Bed Leveling ==============================
834
 //===========================================================================
860
 //===========================================================================
835
-// @section bedlevel
861
+// @section calibrate
836
 
862
 
837
 /**
863
 /**
838
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
864
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
858
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
884
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
859
  *   A comprehensive bed leveling system combining the features and benefits
885
  *   A comprehensive bed leveling system combining the features and benefits
860
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
886
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
861
- *   Validation and Mesh Editing systems. Currently, UBL is only checked out
862
- *   for Cartesian Printers. That said, it was primarily designed to correct
863
- *   poor quality Delta Printers. If you feel adventurous and have a Delta,
864
- *   please post an issue if something doesn't work correctly. Initially,
865
- *   you will need to set a reduced bed size so you have a rectangular area
866
- *   to test on.
887
+ *   Validation and Mesh Editing systems.
867
  *
888
  *
868
  * - MESH_BED_LEVELING
889
  * - MESH_BED_LEVELING
869
  *   Probe a grid manually
890
  *   Probe a grid manually
894
   // at which point movement will be level to the machine's XY plane.
915
   // at which point movement will be level to the machine's XY plane.
895
   // The height can be set with M420 Z<height>
916
   // The height can be set with M420 Z<height>
896
   #define ENABLE_LEVELING_FADE_HEIGHT
917
   #define ENABLE_LEVELING_FADE_HEIGHT
918
+
919
+  // For Cartesian machines, instead of dividing moves on mesh boundaries,
920
+  // split up moves into short segments like a Delta. This follows the
921
+  // contours of the bed more closely than edge-to-edge straight moves.
922
+  #define SEGMENT_LEVELED_MOVES
923
+  #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)
924
+
925
+  /**
926
+   * Enable the G26 Mesh Validation Pattern tool.
927
+   */
928
+  //#define G26_MESH_VALIDATION   // Enable G26 mesh validation
929
+  #if ENABLED(G26_MESH_VALIDATION)
930
+    #define MESH_TEST_NOZZLE_SIZE     0.4   // (mm) Diameter of primary nozzle.
931
+    #define MESH_TEST_LAYER_HEIGHT    0.2   // (mm) Default layer height for the G26 Mesh Validation Tool.
932
+    #define MESH_TEST_HOTEND_TEMP   205.0   // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
933
+    #define MESH_TEST_BED_TEMP       60.0   // (°C) Default bed temperature for the G26 Mesh Validation Tool.
934
+  #endif
935
+
897
 #endif
936
 #endif
898
 
937
 
899
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
938
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
949
   //========================= Unified Bed Leveling ============================
988
   //========================= Unified Bed Leveling ============================
950
   //===========================================================================
989
   //===========================================================================
951
 
990
 
952
-  #define UBL_MESH_INSET 1          // Mesh inset margin on print area
991
+  //#define MESH_EDIT_GFX_OVERLAY   // Display a graphics overlay while editing the mesh
992
+
993
+  #define MESH_INSET 1              // Mesh inset margin on print area
953
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
994
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
954
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
995
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
955
 
996
 
960
   #define UBL_PROBE_PT_3_X 180
1001
   #define UBL_PROBE_PT_3_X 180
961
   #define UBL_PROBE_PT_3_Y 20
1002
   #define UBL_PROBE_PT_3_Y 20
962
 
1003
 
963
-  #define UBL_G26_MESH_VALIDATION   // Enable G26 mesh validation
964
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
1004
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
1005
+  #define UBL_SAVE_ACTIVE_ON_M500   // Save the currently active mesh in the current slot on M500
965
 
1006
 
966
 #elif ENABLED(MESH_BED_LEVELING)
1007
 #elif ENABLED(MESH_BED_LEVELING)
967
 
1008
 
1021
 //#define Z_SAFE_HOMING
1062
 //#define Z_SAFE_HOMING
1022
 
1063
 
1023
 #if ENABLED(Z_SAFE_HOMING)
1064
 #if ENABLED(Z_SAFE_HOMING)
1024
-  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axis (G28).
1025
-  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axis (G28).
1065
+  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axes (G28).
1066
+  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axes (G28).
1026
 #endif
1067
 #endif
1027
 
1068
 
1028
 // Homing speeds (mm/m)
1069
 // Homing speeds (mm/m)
1029
 #define HOMING_FEEDRATE_XY (50*60)
1070
 #define HOMING_FEEDRATE_XY (50*60)
1030
 #define HOMING_FEEDRATE_Z  (4*60)
1071
 #define HOMING_FEEDRATE_Z  (4*60)
1031
 
1072
 
1073
+// @section calibrate
1074
+
1075
+/**
1076
+ * Bed Skew Compensation
1077
+ *
1078
+ * This feature corrects for misalignment in the XYZ axes.
1079
+ *
1080
+ * Take the following steps to get the bed skew in the XY plane:
1081
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1082
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1083
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1084
+ *  4. For XY_SIDE_AD measure the edge A to D
1085
+ *
1086
+ * Marlin automatically computes skew factors from these measurements.
1087
+ * Skew factors may also be computed and set manually:
1088
+ *
1089
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1090
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1091
+ *
1092
+ * If desired, follow the same procedure for XZ and YZ.
1093
+ * Use these diagrams for reference:
1094
+ *
1095
+ *    Y                     Z                     Z
1096
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1097
+ *    |    /       /        |    /       /        |    /       /
1098
+ *    |   /       /         |   /       /         |   /       /
1099
+ *    |  A-------D          |  A-------D          |  A-------D
1100
+ *    +-------------->X     +-------------->X     +-------------->Y
1101
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1102
+ */
1103
+//#define SKEW_CORRECTION
1104
+
1105
+#if ENABLED(SKEW_CORRECTION)
1106
+  // Input all length measurements here:
1107
+  #define XY_DIAG_AC 282.8427124746
1108
+  #define XY_DIAG_BD 282.8427124746
1109
+  #define XY_SIDE_AD 200
1110
+
1111
+  // Or, set the default skew factors directly here
1112
+  // to override the above measurements:
1113
+  #define XY_SKEW_FACTOR 0.0
1114
+
1115
+  //#define SKEW_CORRECTION_FOR_Z
1116
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1117
+    #define XZ_DIAG_AC 282.8427124746
1118
+    #define XZ_DIAG_BD 282.8427124746
1119
+    #define YZ_DIAG_AC 282.8427124746
1120
+    #define YZ_DIAG_BD 282.8427124746
1121
+    #define YZ_SIDE_AD 200
1122
+    #define XZ_SKEW_FACTOR 0.0
1123
+    #define YZ_SKEW_FACTOR 0.0
1124
+  #endif
1125
+
1126
+  // Enable this option for M852 to set skew at runtime
1127
+  //#define SKEW_CORRECTION_GCODE
1128
+#endif
1129
+
1032
 //=============================================================================
1130
 //=============================================================================
1033
 //============================= Additional Features ===========================
1131
 //============================= Additional Features ===========================
1034
 //=============================================================================
1132
 //=============================================================================
1060
 //
1158
 //
1061
 // M100 Free Memory Watcher
1159
 // M100 Free Memory Watcher
1062
 //
1160
 //
1063
-//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
1161
+//#define M100_FREE_MEMORY_WATCHER    // Add M100 (Free Memory Watcher) to debug memory usage
1064
 
1162
 
1065
 //
1163
 //
1066
 // G20/G21 Inch mode support
1164
 // G20/G21 Inch mode support
1205
  *
1303
  *
1206
  * Select the language to display on the LCD. These languages are available:
1304
  * Select the language to display on the LCD. These languages are available:
1207
  *
1305
  *
1208
- *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, gl, hr,
1209
- *    it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1306
+ *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, fr_utf8, gl,
1307
+ *    hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1210
  *    tr, uk, zh_CN, zh_TW, test
1308
  *    tr, uk, zh_CN, zh_TW, test
1211
  *
1309
  *
1212
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1310
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1213
  */
1311
  */
1214
 #define LCD_LANGUAGE en
1312
 #define LCD_LANGUAGE en
1215
 
1313
 
1337
 // Note: Test audio output with the G-Code:
1435
 // Note: Test audio output with the G-Code:
1338
 //  M300 S<frequency Hz> P<duration ms>
1436
 //  M300 S<frequency Hz> P<duration ms>
1339
 //
1437
 //
1340
-//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
1341
-//#define LCD_FEEDBACK_FREQUENCY_HZ 1000
1438
+//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
1439
+//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
1342
 
1440
 
1343
 //
1441
 //
1344
 // CONTROLLER TYPE: Standard
1442
 // CONTROLLER TYPE: Standard
1446
 //#define CARTESIO_UI
1544
 //#define CARTESIO_UI
1447
 
1545
 
1448
 //
1546
 //
1449
-// ANET_10 Controller supported displays.
1547
+// ANET and Tronxy Controller supported displays.
1450
 //
1548
 //
1451
-//#define ANET_KEYPAD_LCD         // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1549
+//#define ZONESTAR_LCD            // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1452
                                   // This LCD is known to be susceptible to electrical interference
1550
                                   // This LCD is known to be susceptible to electrical interference
1453
                                   // which scrambles the display.  Pressing any button clears it up.
1551
                                   // which scrambles the display.  Pressing any button clears it up.
1552
+                                  // This is a LCD2004 display with 5 analog buttons.
1553
+
1454
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1554
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1455
                                   // A clone of the RepRapDiscount full graphics display but with
1555
                                   // A clone of the RepRapDiscount full graphics display but with
1456
                                   // different pins/wiring (see pins_ANET_10.h).
1556
                                   // different pins/wiring (see pins_ANET_10.h).
1560
 //
1660
 //
1561
 //#define MKS_12864OLED
1661
 //#define MKS_12864OLED
1562
 
1662
 
1663
+// Silvergate GLCD controller
1664
+// http://github.com/android444/Silvergate
1665
+//
1666
+//#define SILVER_GATE_GLCD_CONTROLLER
1667
+
1563
 //=============================================================================
1668
 //=============================================================================
1564
 //=============================== Extra Features ==============================
1669
 //=============================== Extra Features ==============================
1565
 //=============================================================================
1670
 //=============================================================================
1616
  * Adds the M150 command to set the LED (or LED strip) color.
1721
  * Adds the M150 command to set the LED (or LED strip) color.
1617
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1722
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1618
  * luminance values can be set from 0 to 255.
1723
  * luminance values can be set from 0 to 255.
1619
- * For Neopixel LED overall brightness parameters is also available 
1724
+ * For Neopixel LED an overall brightness parameter is also available.
1620
  *
1725
  *
1621
  * *** CAUTION ***
1726
  * *** CAUTION ***
1622
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1727
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1623
  *  as the Arduino cannot handle the current the LEDs will require.
1728
  *  as the Arduino cannot handle the current the LEDs will require.
1624
  *  Failure to follow this precaution can destroy your Arduino!
1729
  *  Failure to follow this precaution can destroy your Arduino!
1625
- *  The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
1626
- *  cannot handle such current, separate 5V power supply must be used
1730
+ *  NOTE: A separate 5V power supply is required! The Neopixel LED needs
1731
+ *  more current than the Arduino 5V linear regulator can produce.
1627
  * *** CAUTION ***
1732
  * *** CAUTION ***
1628
  *
1733
  *
1629
- * LED type. This options are mutualy exclusive. Uncomment only one.
1734
+ * LED Type. Enable only one of the following two options.
1630
  *
1735
  *
1631
  */
1736
  */
1632
 //#define RGB_LED
1737
 //#define RGB_LED
1642
 // Support for Adafruit Neopixel LED driver
1747
 // Support for Adafruit Neopixel LED driver
1643
 //#define NEOPIXEL_LED
1748
 //#define NEOPIXEL_LED
1644
 #if ENABLED(NEOPIXEL_LED)
1749
 #if ENABLED(NEOPIXEL_LED)
1645
-  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
1750
+  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
1646
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1751
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1647
-  #define NEOPIXEL_PIXELS 30       // Number of LEDs on strip
1648
-  #define NEOPIXEL_IS_SEQUENTIAL   // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
1649
-  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness 0-255
1752
+  #define NEOPIXEL_PIXELS 30       // Number of LEDs in the strip
1753
+  #define NEOPIXEL_IS_SEQUENTIAL   // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
1754
+  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness (0-255)
1650
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1755
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1651
 #endif
1756
 #endif
1652
 
1757
 
1661
  *  - Change to green once print has finished
1766
  *  - Change to green once print has finished
1662
  *  - Turn off after the print has finished and the user has pushed a button
1767
  *  - Turn off after the print has finished and the user has pushed a button
1663
  */
1768
  */
1664
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED)
1769
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
1665
   #define PRINTER_EVENT_LEDS
1770
   #define PRINTER_EVENT_LEDS
1666
 #endif
1771
 #endif
1667
 
1772
 
1668
-/*********************************************************************\
1669
-* R/C SERVO support
1670
-* Sponsored by TrinityLabs, Reworked by codexmas
1671
-**********************************************************************/
1773
+/**
1774
+ * R/C SERVO support
1775
+ * Sponsored by TrinityLabs, Reworked by codexmas
1776
+ */
1672
 
1777
 
1673
-// Number of servos
1674
-//
1675
-// If you select a configuration below, this will receive a default value and does not need to be set manually
1676
-// set it manually if you have more servos than extruders and wish to manually control some
1677
-// leaving it undefined or defining as 0 will disable the servo subsystem
1678
-// If unsure, leave commented / disabled
1679
-//
1778
+/**
1779
+ * Number of servos
1780
+ *
1781
+ * For some servo-related options NUM_SERVOS will be set automatically.
1782
+ * Set this manually if there are extra servos needing manual control.
1783
+ * Leave undefined or set to 0 to entirely disable the servo subsystem.
1784
+ */
1680
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1785
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1681
 
1786
 
1682
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1787
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1689
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1794
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1690
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1795
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1691
 
1796
 
1692
-/**
1693
- * Filament Width Sensor
1694
- *
1695
- * Measures the filament width in real-time and adjusts
1696
- * flow rate to compensate for any irregularities.
1697
- *
1698
- * Also allows the measured filament diameter to set the
1699
- * extrusion rate, so the slicer only has to specify the
1700
- * volume.
1701
- *
1702
- * Only a single extruder is supported at this time.
1703
- *
1704
- *  34 RAMPS_14    : Analog input 5 on the AUX2 connector
1705
- *  81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
1706
- * 301 RAMBO       : Analog input 3
1707
- *
1708
- * Note: May require analog pins to be defined for other boards.
1709
- */
1710
-//#define FILAMENT_WIDTH_SENSOR
1711
-
1712
-#define DEFAULT_NOMINAL_FILAMENT_DIA 3.00   // (mm) Diameter of the filament generally used (3.0 or 1.75mm), also used in the slicer. Used to validate sensor reading.
1713
-
1714
-#if ENABLED(FILAMENT_WIDTH_SENSOR)
1715
-  #define FILAMENT_SENSOR_EXTRUDER_NUM 0    // Index of the extruder that has the filament sensor (0,1,2,3)
1716
-  #define MEASUREMENT_DELAY_CM        14    // (cm) The distance from the filament sensor to the melting chamber
1717
-
1718
-  #define MEASURED_UPPER_LIMIT         3.30 // (mm) Upper limit used to validate sensor reading
1719
-  #define MEASURED_LOWER_LIMIT         1.90 // (mm) Lower limit used to validate sensor reading
1720
-  #define MAX_MEASUREMENT_DELAY       20    // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
1721
-
1722
-  #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
1723
-
1724
-  // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
1725
-  //#define FILAMENT_LCD_DISPLAY
1726
-#endif
1727
-
1728
 #endif // CONFIGURATION_H
1797
 #endif // CONFIGURATION_H

+ 268
- 125
Marlin/example_configurations/Malyan/M150/Configuration_adv.h Переглянути файл

32
  */
32
  */
33
 #ifndef CONFIGURATION_ADV_H
33
 #ifndef CONFIGURATION_ADV_H
34
 #define CONFIGURATION_ADV_H
34
 #define CONFIGURATION_ADV_H
35
-#define CONFIGURATION_ADV_H_VERSION 010100
35
+#define CONFIGURATION_ADV_H_VERSION 010107
36
 
36
 
37
 // @section temperature
37
 // @section temperature
38
 
38
 
48
 #endif
48
 #endif
49
 
49
 
50
 /**
50
 /**
51
- * Thermal Protection protects your printer from damage and fire if a
52
- * thermistor falls out or temperature sensors fail in any way.
51
+ * Thermal Protection provides additional protection to your printer from damage
52
+ * and fire. Marlin always includes safe min and max temperature ranges which
53
+ * protect against a broken or disconnected thermistor wire.
53
  *
54
  *
54
- * The issue: If a thermistor falls out or a temperature sensor fails,
55
- * Marlin can no longer sense the actual temperature. Since a disconnected
56
- * thermistor reads as a low temperature, the firmware will keep the heater on.
55
+ * The issue: If a thermistor falls out, it will report the much lower
56
+ * temperature of the air in the room, and the the firmware will keep
57
+ * the heater on.
57
  *
58
  *
58
  * The solution: Once the temperature reaches the target, start observing.
59
  * The solution: Once the temperature reaches the target, start observing.
59
- * If the temperature stays too far below the target (hysteresis) for too long (period),
60
- * the firmware will halt the machine as a safety precaution.
60
+ * If the temperature stays too far below the target (hysteresis) for too
61
+ * long (period), the firmware will halt the machine as a safety precaution.
61
  *
62
  *
62
- * If you get false positives for "Thermal Runaway" increase THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
63
+ * If you get false positives for "Thermal Runaway", increase
64
+ * THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
63
  */
65
  */
64
 #if ENABLED(THERMAL_PROTECTION_HOTENDS)
66
 #if ENABLED(THERMAL_PROTECTION_HOTENDS)
65
   #define THERMAL_PROTECTION_PERIOD 40        // Seconds
67
   #define THERMAL_PROTECTION_PERIOD 40        // Seconds
66
   #define THERMAL_PROTECTION_HYSTERESIS 4     // Degrees Celsius
68
   #define THERMAL_PROTECTION_HYSTERESIS 4     // Degrees Celsius
67
 
69
 
68
   /**
70
   /**
69
-   * Whenever an M104 or M109 increases the target temperature the firmware will wait for the
70
-   * WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
71
-   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
72
-   * but only if the current temperature is far enough below the target for a reliable test.
71
+   * Whenever an M104, M109, or M303 increases the target temperature, the
72
+   * firmware will wait for the WATCH_TEMP_PERIOD to expire. If the temperature
73
+   * hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted and
74
+   * requires a hard reset. This test restarts with any M104/M109/M303, but only
75
+   * if the current temperature is far enough below the target for a reliable
76
+   * test.
73
    *
77
    *
74
-   * If you get false positives for "Heating failed" increase WATCH_TEMP_PERIOD and/or decrease WATCH_TEMP_INCREASE
75
-   * WATCH_TEMP_INCREASE should not be below 2.
78
+   * If you get false positives for "Heating failed", increase WATCH_TEMP_PERIOD
79
+   * and/or decrease WATCH_TEMP_INCREASE. WATCH_TEMP_INCREASE should not be set
80
+   * below 2.
76
    */
81
    */
77
   #define WATCH_TEMP_PERIOD 20                // Seconds
82
   #define WATCH_TEMP_PERIOD 20                // Seconds
78
   #define WATCH_TEMP_INCREASE 2               // Degrees Celsius
83
   #define WATCH_TEMP_INCREASE 2               // Degrees Celsius
86
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
91
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
87
 
92
 
88
   /**
93
   /**
89
-   * Whenever an M140 or M190 increases the target temperature the firmware will wait for the
90
-   * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE
91
-   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190,
92
-   * but only if the current temperature is far enough below the target for a reliable test.
93
-   *
94
-   * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease
95
-   * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.)
94
+   * As described above, except for the bed (M140/M190/M303).
96
    */
95
    */
97
   #define WATCH_BED_TEMP_PERIOD 60                // Seconds
96
   #define WATCH_BED_TEMP_PERIOD 60                // Seconds
98
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
97
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
123
   #define AUTOTEMP_OLDWEIGHT 0.98
122
   #define AUTOTEMP_OLDWEIGHT 0.98
124
 #endif
123
 #endif
125
 
124
 
125
+// Show extra position information in M114
126
+//#define M114_DETAIL
127
+
126
 // Show Temperature ADC value
128
 // Show Temperature ADC value
127
 // Enable for M105 to include ADC values read from temperature sensors.
129
 // Enable for M105 to include ADC values read from temperature sensors.
128
 //#define SHOW_TEMP_ADC_VALUES
130
 //#define SHOW_TEMP_ADC_VALUES
257
 
259
 
258
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
260
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
259
 
261
 
260
-// Dual X Steppers
261
-// Uncomment this option to drive two X axis motors.
262
-// The next unused E driver will be assigned to the second X stepper.
262
+/**
263
+ * Dual Steppers / Dual Endstops
264
+ *
265
+ * This section will allow you to use extra E drivers to drive a second motor for X, Y, or Z axes.
266
+ *
267
+ * For example, set X_DUAL_STEPPER_DRIVERS setting to use a second motor. If the motors need to
268
+ * spin in opposite directions set INVERT_X2_VS_X_DIR. If the second motor needs its own endstop
269
+ * set X_DUAL_ENDSTOPS. This can adjust for "racking." Use X2_USE_ENDSTOP to set the endstop plug
270
+ * that should be used for the second endstop. Extra endstops will appear in the output of 'M119'.
271
+ *
272
+ * Use X_DUAL_ENDSTOP_ADJUSTMENT to adjust for mechanical imperfection. After homing both motors
273
+ * this offset is applied to the X2 motor. To find the offset home the X axis, and measure the error
274
+ * in X2. Dual endstop offsets can be set at runtime with 'M666 X<offset> Y<offset> Z<offset>'.
275
+ */
276
+
263
 //#define X_DUAL_STEPPER_DRIVERS
277
 //#define X_DUAL_STEPPER_DRIVERS
264
 #if ENABLED(X_DUAL_STEPPER_DRIVERS)
278
 #if ENABLED(X_DUAL_STEPPER_DRIVERS)
265
-  // Set true if the two X motors need to rotate in opposite directions
266
-  #define INVERT_X2_VS_X_DIR true
279
+  #define INVERT_X2_VS_X_DIR true   // Set 'true' if X motors should rotate in opposite directions
280
+  //#define X_DUAL_ENDSTOPS
281
+  #if ENABLED(X_DUAL_ENDSTOPS)
282
+    #define X2_USE_ENDSTOP _XMAX_
283
+    #define X_DUAL_ENDSTOPS_ADJUSTMENT  0
284
+  #endif
267
 #endif
285
 #endif
268
 
286
 
269
-// Dual Y Steppers
270
-// Uncomment this option to drive two Y axis motors.
271
-// The next unused E driver will be assigned to the second Y stepper.
272
 //#define Y_DUAL_STEPPER_DRIVERS
287
 //#define Y_DUAL_STEPPER_DRIVERS
273
 #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
288
 #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
274
-  // Set true if the two Y motors need to rotate in opposite directions
275
-  #define INVERT_Y2_VS_Y_DIR true
289
+  #define INVERT_Y2_VS_Y_DIR true   // Set 'true' if Y motors should rotate in opposite directions
290
+  //#define Y_DUAL_ENDSTOPS
291
+  #if ENABLED(Y_DUAL_ENDSTOPS)
292
+    #define Y2_USE_ENDSTOP _YMAX_
293
+    #define Y_DUAL_ENDSTOPS_ADJUSTMENT  0
294
+  #endif
276
 #endif
295
 #endif
277
 
296
 
278
-// A single Z stepper driver is usually used to drive 2 stepper motors.
279
-// Uncomment this option to use a separate stepper driver for each Z axis motor.
280
-// The next unused E driver will be assigned to the second Z stepper.
281
 //#define Z_DUAL_STEPPER_DRIVERS
297
 //#define Z_DUAL_STEPPER_DRIVERS
282
-
283
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
298
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
284
-
285
-  // Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper.
286
-  // That way the machine is capable to align the bed during home, since both Z steppers are homed.
287
-  // There is also an implementation of M666 (software endstops adjustment) to this feature.
288
-  // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed.
289
-  // One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2.
290
-  // If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive.
291
-  // Play a little bit with small adjustments (0.5mm) and check the behaviour.
292
-  // The M119 (endstops report) will start reporting the Z2 Endstop as well.
293
-
294
   //#define Z_DUAL_ENDSTOPS
299
   //#define Z_DUAL_ENDSTOPS
295
-
296
   #if ENABLED(Z_DUAL_ENDSTOPS)
300
   #if ENABLED(Z_DUAL_ENDSTOPS)
297
     #define Z2_USE_ENDSTOP _XMAX_
301
     #define Z2_USE_ENDSTOP _XMAX_
298
-    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0  // Use M666 to determine/test this value
302
+    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0
299
   #endif
303
   #endif
300
-
301
-#endif // Z_DUAL_STEPPER_DRIVERS
304
+#endif
302
 
305
 
303
 // Enable this for dual x-carriage printers.
306
 // Enable this for dual x-carriage printers.
304
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
307
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
345
 
348
 
346
 // @section homing
349
 // @section homing
347
 
350
 
348
-//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
351
+// Homing hits each endstop, retracts by these distances, then does a slower bump.
349
 #define X_HOME_BUMP_MM 5
352
 #define X_HOME_BUMP_MM 5
350
 #define Y_HOME_BUMP_MM 5
353
 #define Y_HOME_BUMP_MM 5
351
 #define Z_HOME_BUMP_MM 2
354
 #define Z_HOME_BUMP_MM 2
352
-#define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
353
-//#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
355
+#define HOMING_BUMP_DIVISOR { 2, 2, 4 }  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
356
+//#define QUICK_HOME                     // If homing includes X and Y, do a diagonal move initially
354
 
357
 
355
 // When G28 is called, this option will make Y home before X
358
 // When G28 is called, this option will make Y home before X
356
 //#define HOME_Y_BEFORE_X
359
 //#define HOME_Y_BEFORE_X
434
 //#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 }   // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
437
 //#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 }   // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
435
 //#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 }    // Default drive percent - X, Y, Z, E axis
438
 //#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 }    // Default drive percent - X, Y, Z, E axis
436
 
439
 
437
-// Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
440
+// Use an I2C based DIGIPOT (e.g., Azteeg X3 Pro)
438
 //#define DIGIPOT_I2C
441
 //#define DIGIPOT_I2C
442
+#if ENABLED(DIGIPOT_I2C) && !defined(DIGIPOT_I2C_ADDRESS_A)
443
+  /**
444
+   * Common slave addresses:
445
+   *
446
+   *                    A   (A shifted)   B   (B shifted)  IC
447
+   * Smoothie          0x2C (0x58)       0x2D (0x5A)       MCP4451
448
+   * AZTEEG_X3_PRO     0x2C (0x58)       0x2E (0x5C)       MCP4451
449
+   * MIGHTYBOARD_REVE  0x2F (0x5E)                         MCP4018
450
+   */
451
+  #define DIGIPOT_I2C_ADDRESS_A 0x2C  // unshifted slave address for first DIGIPOT
452
+  #define DIGIPOT_I2C_ADDRESS_B 0x2D  // unshifted slave address for second DIGIPOT
453
+#endif
454
+
439
 //#define DIGIPOT_MCP4018          // Requires library from https://github.com/stawel/SlowSoftI2CMaster
455
 //#define DIGIPOT_MCP4018          // Requires library from https://github.com/stawel/SlowSoftI2CMaster
440
 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4     AZTEEG_X3_PRO: 8
456
 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4     AZTEEG_X3_PRO: 8
441
 // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
457
 // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
466
 // The timeout (in ms) to return to the status screen from sub-menus
482
 // The timeout (in ms) to return to the status screen from sub-menus
467
 //#define LCD_TIMEOUT_TO_STATUS 15000
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
468
 
484
 
485
+/**
486
+ * LED Control Menu
487
+ * Enable this feature to add LED Control to the LCD menu
488
+ */
489
+//#define LED_CONTROL_MENU
490
+#if ENABLED(LED_CONTROL_MENU)
491
+  #define LED_COLOR_PRESETS                 // Enable the Preset Color menu option
492
+  #if ENABLED(LED_COLOR_PRESETS)
493
+    #define LED_USER_PRESET_RED        255  // User defined RED value
494
+    #define LED_USER_PRESET_GREEN      128  // User defined GREEN value
495
+    #define LED_USER_PRESET_BLUE         0  // User defined BLUE value
496
+    #define LED_USER_PRESET_WHITE      255  // User defined WHITE value
497
+    #define LED_USER_PRESET_BRIGHTNESS 255  // User defined intensity
498
+    //#define LED_USER_PRESET_STARTUP       // Have the printer display the user preset color on startup
499
+  #endif
500
+#endif // LED_CONTROL_MENU
501
+
469
 #if ENABLED(SDSUPPORT)
502
 #if ENABLED(SDSUPPORT)
470
 
503
 
471
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
504
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
475
   // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
508
   // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
476
   #define SD_DETECT_INVERTED
509
   #define SD_DETECT_INVERTED
477
 
510
 
478
-  #define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
511
+  #define SD_FINISHED_STEPPERRELEASE true          // Disable steppers when SD Print is finished
479
   #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
512
   #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
480
 
513
 
481
-  #define SDCARD_RATHERRECENTFIRST  //reverse file order of sd card menu display. Its sorted practically after the file system block order.
482
-  // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that.
483
-  // using:
514
+  // Reverse SD sort to show "more recent" files first, according to the card's FAT.
515
+  // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended.
516
+  #define SDCARD_RATHERRECENTFIRST
517
+
518
+  // Add an option in the menu to run all auto#.g files
484
   //#define MENU_ADDAUTOSTART
519
   //#define MENU_ADDAUTOSTART
485
 
520
 
486
   /**
521
   /**
517
     #define SDSORT_USES_STACK  false  // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
552
     #define SDSORT_USES_STACK  false  // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
518
     #define SDSORT_CACHE_NAMES false  // Keep sorted items in RAM longer for speedy performance. Most expensive option.
553
     #define SDSORT_CACHE_NAMES false  // Keep sorted items in RAM longer for speedy performance. Most expensive option.
519
     #define SDSORT_DYNAMIC_RAM false  // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
554
     #define SDSORT_DYNAMIC_RAM false  // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
555
+    #define SDSORT_CACHE_VFATS 2      // Maximum number of 13-byte VFAT entries to use for sorting.
556
+                                      // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM.
520
   #endif
557
   #endif
521
 
558
 
522
   // Show a progress bar on HD44780 LCDs for SD printing
559
   // Show a progress bar on HD44780 LCDs for SD printing
535
     //#define LCD_PROGRESS_BAR_TEST
572
     //#define LCD_PROGRESS_BAR_TEST
536
   #endif
573
   #endif
537
 
574
 
575
+  // Add an 'M73' G-code to set the current percentage
576
+  //#define LCD_SET_PROGRESS_MANUALLY
577
+
538
   // This allows hosts to request long names for files and folders with M33
578
   // This allows hosts to request long names for files and folders with M33
539
   #define LONG_FILENAME_HOST_SUPPORT
579
   #define LONG_FILENAME_HOST_SUPPORT
540
 
580
 
541
-  // This option allows you to abort SD printing when any endstop is triggered.
542
-  // This feature must be enabled with "M540 S1" or from the LCD menu.
543
-  // To have any effect, endstops must be enabled during SD printing.
581
+  // Enable this option to scroll long filenames in the SD card menu
582
+  //#define SCROLL_LONG_FILENAMES
583
+
584
+  /**
585
+   * This option allows you to abort SD printing when any endstop is triggered.
586
+   * This feature must be enabled with "M540 S1" or from the LCD menu.
587
+   * To have any effect, endstops must be enabled during SD printing.
588
+   */
544
   //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
589
   //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
545
 
590
 
591
+  /**
592
+   * This option makes it easier to print the same SD Card file again.
593
+   * On print completion the LCD Menu will open with the file selected.
594
+   * You can just click to start the print, or navigate elsewhere.
595
+   */
596
+  //#define SD_REPRINT_LAST_SELECTED_FILE
597
+
546
 #endif // SDSUPPORT
598
 #endif // SDSUPPORT
547
 
599
 
548
 /**
600
 /**
575
   // Enable this option and reduce the value to optimize screen updates.
627
   // Enable this option and reduce the value to optimize screen updates.
576
   // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
628
   // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
577
   //#define DOGM_SPI_DELAY_US 5
629
   //#define DOGM_SPI_DELAY_US 5
630
+
631
+  // Swap the CW/CCW indicators in the graphics overlay
632
+  //#define OVERLAY_GFX_REVERSE
633
+
578
 #endif // DOGLCD
634
 #endif // DOGLCD
579
 
635
 
580
 // @section safety
636
 // @section safety
603
 #if ENABLED(BABYSTEPPING)
659
 #if ENABLED(BABYSTEPPING)
604
   //#define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
660
   //#define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
605
   #define BABYSTEP_INVERT_Z false    // Change if Z babysteps should go the other way
661
   #define BABYSTEP_INVERT_Z false    // Change if Z babysteps should go the other way
606
-  #define BABYSTEP_MULTIPLICATOR 100 // Babysteps are very small. Increase for faster motion.
662
+  #define BABYSTEP_MULTIPLICATOR 1   // Babysteps are very small. Increase for faster motion.
607
   //#define BABYSTEP_ZPROBE_OFFSET   // Enable to combine M851 and Babystepping
663
   //#define BABYSTEP_ZPROBE_OFFSET   // Enable to combine M851 and Babystepping
608
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
664
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
609
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
665
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
610
                                         // Note: Extra time may be added to mitigate controller latency.
666
                                         // Note: Extra time may be added to mitigate controller latency.
611
   //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
667
   //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
612
-  //#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators
613
 #endif
668
 #endif
614
 
669
 
615
 // @section extruder
670
 // @section extruder
656
 
711
 
657
 // @section leveling
712
 // @section leveling
658
 
713
 
659
-// Default mesh area is an area with an inset margin on the print area.
660
-// Below are the macros that are used to define the borders for the mesh area,
661
-// made available here for specialized needs, ie dual extruder setup.
662
-#if ENABLED(MESH_BED_LEVELING)
663
-  #define MESH_MIN_X MESH_INSET
664
-  #define MESH_MAX_X (X_BED_SIZE - (MESH_INSET))
665
-  #define MESH_MIN_Y MESH_INSET
666
-  #define MESH_MAX_Y (Y_BED_SIZE - (MESH_INSET))
667
-#elif ENABLED(AUTO_BED_LEVELING_UBL)
668
-  #define UBL_MESH_MIN_X UBL_MESH_INSET
669
-  #define UBL_MESH_MAX_X (X_BED_SIZE - (UBL_MESH_INSET))
670
-  #define UBL_MESH_MIN_Y UBL_MESH_INSET
671
-  #define UBL_MESH_MAX_Y (Y_BED_SIZE - (UBL_MESH_INSET))
672
-
673
-  // If this is defined, the currently active mesh will be saved in the
674
-  // current slot on M500.
675
-  #define UBL_SAVE_ACTIVE_ON_M500
714
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
715
+  #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
716
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
717
+  #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
718
+#endif
719
+
720
+#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL)
721
+  // Override the mesh area if the automatic (max) area is too large
722
+  //#define MESH_MIN_X MESH_INSET
723
+  //#define MESH_MIN_Y MESH_INSET
724
+  //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET)
725
+  //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
676
 #endif
726
 #endif
677
 
727
 
678
 // @section extras
728
 // @section extras
692
 //#define BEZIER_CURVE_SUPPORT
742
 //#define BEZIER_CURVE_SUPPORT
693
 
743
 
694
 // G38.2 and G38.3 Probe Target
744
 // G38.2 and G38.3 Probe Target
695
-// Enable PROBE_DOUBLE_TOUCH if you want G38 to double touch
745
+// Set MULTIPLE_PROBING if you want G38 to double touch
696
 //#define G38_PROBE_TARGET
746
 //#define G38_PROBE_TARGET
697
 #if ENABLED(G38_PROBE_TARGET)
747
 #if ENABLED(G38_PROBE_TARGET)
698
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
748
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
717
 // @section hidden
767
 // @section hidden
718
 
768
 
719
 // The number of linear motions that can be in the plan at any give time.
769
 // The number of linear motions that can be in the plan at any give time.
720
-// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2, i.g. 8,16,32 because shifts and ors are used to do the ring-buffering.
770
+// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2 (e.g. 8, 16, 32) because shifts and ors are used to do the ring-buffering.
721
 #if ENABLED(SDSUPPORT)
771
 #if ENABLED(SDSUPPORT)
722
   #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
772
   #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
723
 #else
773
 #else
808
 #endif
858
 #endif
809
 
859
 
810
 /**
860
 /**
861
+ * Extra Fan Speed
862
+ * Adds a secondary fan speed for each print-cooling fan.
863
+ *   'M106 P<fan> T3-255' : Set a secondary speed for <fan>
864
+ *   'M106 P<fan> T2'     : Use the set secondary speed
865
+ *   'M106 P<fan> T1'     : Restore the previous fan speed
866
+ */
867
+//#define EXTRA_FAN_SPEED
868
+
869
+/**
811
  * Advanced Pause
870
  * Advanced Pause
812
  * Experimental feature for filament change support and for parking the nozzle when paused.
871
  * Experimental feature for filament change support and for parking the nozzle when paused.
813
  * Adds the GCode M600 for initiating filament change.
872
  * Adds the GCode M600 for initiating filament change.
917
 
976
 
918
 #endif
977
 #endif
919
 
978
 
920
-// @section TMC2130
979
+// @section TMC2130, TMC2208
921
 
980
 
922
 /**
981
 /**
923
  * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
982
  * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
931
  */
990
  */
932
 //#define HAVE_TMC2130
991
 //#define HAVE_TMC2130
933
 
992
 
934
-#if ENABLED(HAVE_TMC2130)
993
+/**
994
+ * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
995
+ * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin.
996
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN
997
+ * to #_SERIAL_TX_PIN with a 1K resistor.
998
+ * The drivers can also be used with hardware serial.
999
+ *
1000
+ * You'll also need the TMC2208Stepper Arduino library
1001
+ * (https://github.com/teemuatlut/TMC2208Stepper).
1002
+ */
1003
+//#define HAVE_TMC2208
1004
+
1005
+#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
935
 
1006
 
936
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
1007
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
937
   //#define X_IS_TMC2130
1008
   //#define X_IS_TMC2130
946
   //#define E3_IS_TMC2130
1017
   //#define E3_IS_TMC2130
947
   //#define E4_IS_TMC2130
1018
   //#define E4_IS_TMC2130
948
 
1019
 
1020
+  //#define X_IS_TMC2208
1021
+  //#define X2_IS_TMC2208
1022
+  //#define Y_IS_TMC2208
1023
+  //#define Y2_IS_TMC2208
1024
+  //#define Z_IS_TMC2208
1025
+  //#define Z2_IS_TMC2208
1026
+  //#define E0_IS_TMC2208
1027
+  //#define E1_IS_TMC2208
1028
+  //#define E2_IS_TMC2208
1029
+  //#define E3_IS_TMC2208
1030
+  //#define E4_IS_TMC2208
1031
+
949
   /**
1032
   /**
950
    * Stepper driver settings
1033
    * Stepper driver settings
951
    */
1034
    */
952
 
1035
 
953
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1036
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
954
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1037
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
955
-  #define INTERPOLATE          1  // Interpolate X/Y/Z_MICROSTEPS to 256
1038
+  #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
956
 
1039
 
957
-  #define X_CURRENT         1000  // rms current in mA. Multiply by 1.41 for peak current.
1040
+  #define X_CURRENT          800  // rms current in mA. Multiply by 1.41 for peak current.
958
   #define X_MICROSTEPS        16  // 0..256
1041
   #define X_MICROSTEPS        16  // 0..256
959
 
1042
 
960
-  #define Y_CURRENT         1000
1043
+  #define Y_CURRENT          800
961
   #define Y_MICROSTEPS        16
1044
   #define Y_MICROSTEPS        16
962
 
1045
 
963
-  #define Z_CURRENT         1000
1046
+  #define Z_CURRENT          800
964
   #define Z_MICROSTEPS        16
1047
   #define Z_MICROSTEPS        16
965
 
1048
 
966
-  //#define X2_CURRENT      1000
967
-  //#define X2_MICROSTEPS     16
1049
+  #define X2_CURRENT         800
1050
+  #define X2_MICROSTEPS       16
968
 
1051
 
969
-  //#define Y2_CURRENT      1000
970
-  //#define Y2_MICROSTEPS     16
1052
+  #define Y2_CURRENT         800
1053
+  #define Y2_MICROSTEPS       16
971
 
1054
 
972
-  //#define Z2_CURRENT      1000
973
-  //#define Z2_MICROSTEPS     16
1055
+  #define Z2_CURRENT         800
1056
+  #define Z2_MICROSTEPS       16
974
 
1057
 
975
-  //#define E0_CURRENT      1000
976
-  //#define E0_MICROSTEPS     16
1058
+  #define E0_CURRENT         800
1059
+  #define E0_MICROSTEPS       16
977
 
1060
 
978
-  //#define E1_CURRENT      1000
979
-  //#define E1_MICROSTEPS     16
1061
+  #define E1_CURRENT         800
1062
+  #define E1_MICROSTEPS       16
980
 
1063
 
981
-  //#define E2_CURRENT      1000
982
-  //#define E2_MICROSTEPS     16
1064
+  #define E2_CURRENT         800
1065
+  #define E2_MICROSTEPS       16
983
 
1066
 
984
-  //#define E3_CURRENT      1000
985
-  //#define E3_MICROSTEPS     16
1067
+  #define E3_CURRENT         800
1068
+  #define E3_MICROSTEPS       16
986
 
1069
 
987
-  //#define E4_CURRENT      1000
988
-  //#define E4_MICROSTEPS     16
1070
+  #define E4_CURRENT         800
1071
+  #define E4_MICROSTEPS       16
989
 
1072
 
990
   /**
1073
   /**
991
    * Use Trinamic's ultra quiet stepping mode.
1074
    * Use Trinamic's ultra quiet stepping mode.
994
   #define STEALTHCHOP
1077
   #define STEALTHCHOP
995
 
1078
 
996
   /**
1079
   /**
997
-   * Let Marlin automatically control stepper current.
998
-   * This is still an experimental feature.
999
-   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
1000
-   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
1001
-   * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX
1080
+   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1081
+   * like overtemperature and short to ground. TMC2208 requires hardware serial.
1082
+   * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1083
+   * Other detected conditions can be used to stop the current print.
1002
    * Relevant g-codes:
1084
    * Relevant g-codes:
1003
    * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
1085
    * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
1004
-   * M906 S1 - Start adjusting current
1005
-   * M906 S0 - Stop adjusting current
1006
    * M911 - Report stepper driver overtemperature pre-warn condition.
1086
    * M911 - Report stepper driver overtemperature pre-warn condition.
1007
    * M912 - Clear stepper driver overtemperature pre-warn condition flag.
1087
    * M912 - Clear stepper driver overtemperature pre-warn condition flag.
1088
+   * M122 S0/1 - Report driver parameters (Requires TMC_DEBUG)
1008
    */
1089
    */
1009
-  //#define AUTOMATIC_CURRENT_CONTROL
1090
+  //#define MONITOR_DRIVER_STATUS
1010
 
1091
 
1011
-  #if ENABLED(AUTOMATIC_CURRENT_CONTROL)
1012
-    #define CURRENT_STEP          50  // [mA]
1013
-    #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
1092
+  #if ENABLED(MONITOR_DRIVER_STATUS)
1093
+    #define CURRENT_STEP_DOWN     50  // [mA]
1014
     #define REPORT_CURRENT_CHANGE
1094
     #define REPORT_CURRENT_CHANGE
1095
+    #define STOP_ON_ERROR
1015
   #endif
1096
   #endif
1016
 
1097
 
1017
   /**
1098
   /**
1026
   #define X2_HYBRID_THRESHOLD    100
1107
   #define X2_HYBRID_THRESHOLD    100
1027
   #define Y_HYBRID_THRESHOLD     100
1108
   #define Y_HYBRID_THRESHOLD     100
1028
   #define Y2_HYBRID_THRESHOLD    100
1109
   #define Y2_HYBRID_THRESHOLD    100
1029
-  #define Z_HYBRID_THRESHOLD       4
1030
-  #define Z2_HYBRID_THRESHOLD      4
1110
+  #define Z_HYBRID_THRESHOLD       3
1111
+  #define Z2_HYBRID_THRESHOLD      3
1031
   #define E0_HYBRID_THRESHOLD     30
1112
   #define E0_HYBRID_THRESHOLD     30
1032
   #define E1_HYBRID_THRESHOLD     30
1113
   #define E1_HYBRID_THRESHOLD     30
1033
   #define E2_HYBRID_THRESHOLD     30
1114
   #define E2_HYBRID_THRESHOLD     30
1037
   /**
1118
   /**
1038
    * Use stallGuard2 to sense an obstacle and trigger an endstop.
1119
    * Use stallGuard2 to sense an obstacle and trigger an endstop.
1039
    * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
1120
    * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
1040
-   * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal.
1121
+   * X and Y homing will always be done in spreadCycle mode.
1041
    *
1122
    *
1042
    * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
1123
    * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
1043
    * Higher values make the system LESS sensitive.
1124
    * Higher values make the system LESS sensitive.
1046
    * It is advised to set X/Y_HOME_BUMP_MM to 0.
1127
    * It is advised to set X/Y_HOME_BUMP_MM to 0.
1047
    * M914 X/Y to live tune the setting
1128
    * M914 X/Y to live tune the setting
1048
    */
1129
    */
1049
-  //#define SENSORLESS_HOMING
1130
+  //#define SENSORLESS_HOMING // TMC2130 only
1050
 
1131
 
1051
   #if ENABLED(SENSORLESS_HOMING)
1132
   #if ENABLED(SENSORLESS_HOMING)
1052
-    #define X_HOMING_SENSITIVITY  19
1053
-    #define Y_HOMING_SENSITIVITY  19
1133
+    #define X_HOMING_SENSITIVITY  8
1134
+    #define Y_HOMING_SENSITIVITY  8
1054
   #endif
1135
   #endif
1055
 
1136
 
1056
   /**
1137
   /**
1138
+   * Enable M122 debugging command for TMC stepper drivers.
1139
+   * M122 S0/1 will enable continous reporting.
1140
+   */
1141
+  //#define TMC_DEBUG
1142
+
1143
+  /**
1057
    * You can set your own advanced settings by filling in predefined functions.
1144
    * You can set your own advanced settings by filling in predefined functions.
1058
    * A list of available functions can be found on the library github page
1145
    * A list of available functions can be found on the library github page
1059
    * https://github.com/teemuatlut/TMC2130Stepper
1146
    * https://github.com/teemuatlut/TMC2130Stepper
1147
+   * https://github.com/teemuatlut/TMC2208Stepper
1060
    *
1148
    *
1061
    * Example:
1149
    * Example:
1062
-   * #define TMC2130_ADV() { \
1150
+   * #define TMC_ADV() { \
1063
    *   stepperX.diag0_temp_prewarn(1); \
1151
    *   stepperX.diag0_temp_prewarn(1); \
1064
-   *   stepperX.interpolate(0); \
1152
+   *   stepperY.interpolate(0); \
1065
    * }
1153
    * }
1066
    */
1154
    */
1067
-  #define  TMC2130_ADV() {  }
1155
+  #define  TMC_ADV() {  }
1068
 
1156
 
1069
-#endif // HAVE_TMC2130
1157
+#endif // TMC2130 || TMC2208
1070
 
1158
 
1071
 // @section L6470
1159
 // @section L6470
1072
 
1160
 
1231
 #endif
1319
 #endif
1232
 
1320
 
1233
 /**
1321
 /**
1322
+ * Filament Width Sensor
1323
+ *
1324
+ * Measures the filament width in real-time and adjusts
1325
+ * flow rate to compensate for any irregularities.
1326
+ *
1327
+ * Also allows the measured filament diameter to set the
1328
+ * extrusion rate, so the slicer only has to specify the
1329
+ * volume.
1330
+ *
1331
+ * Only a single extruder is supported at this time.
1332
+ *
1333
+ *  34 RAMPS_14    : Analog input 5 on the AUX2 connector
1334
+ *  81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
1335
+ * 301 RAMBO       : Analog input 3
1336
+ *
1337
+ * Note: May require analog pins to be defined for other boards.
1338
+ */
1339
+//#define FILAMENT_WIDTH_SENSOR
1340
+
1341
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
1342
+  #define FILAMENT_SENSOR_EXTRUDER_NUM 0    // Index of the extruder that has the filament sensor. :[0,1,2,3,4]
1343
+  #define MEASUREMENT_DELAY_CM        14    // (cm) The distance from the filament sensor to the melting chamber
1344
+
1345
+  #define MEASURED_UPPER_LIMIT         3.30 // (mm) Upper limit used to validate sensor reading
1346
+  #define MEASURED_LOWER_LIMIT         1.90 // (mm) Lower limit used to validate sensor reading
1347
+  #define MAX_MEASUREMENT_DELAY       20    // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
1348
+
1349
+  #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
1350
+
1351
+  // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
1352
+  //#define FILAMENT_LCD_DISPLAY
1353
+#endif
1354
+
1355
+/**
1356
+ * CNC Coordinate Systems
1357
+ *
1358
+ * Enables G53 and G54-G59.3 commands to select coordinate systems
1359
+ * and G92.1 to reset the workspace to native machine space.
1360
+ */
1361
+//#define CNC_COORDINATE_SYSTEMS
1362
+
1363
+/**
1234
  * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
1364
  * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
1235
  */
1365
  */
1236
 //#define PINS_DEBUGGING
1366
 //#define PINS_DEBUGGING
1421
                                          // tweaks made to the configuration are affecting the printer in real-time.
1551
                                          // tweaks made to the configuration are affecting the printer in real-time.
1422
 #endif
1552
 #endif
1423
 
1553
 
1554
+/**
1555
+ * NanoDLP Sync support
1556
+ *
1557
+ * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
1558
+ * string to enable synchronization with DLP projector exposure. This change will allow to use
1559
+ * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
1560
+ */
1561
+//#define NANODLP_Z_SYNC
1562
+#if ENABLED(NANODLP_Z_SYNC)
1563
+  //#define NANODLP_ALL_AXIS  // Enables "Z_move_comp" output on any axis move.
1564
+                              // Default behaviour is limited to Z axis only.
1565
+#endif
1566
+
1424
 #endif // CONFIGURATION_ADV_H
1567
 #endif // CONFIGURATION_ADV_H

+ 15
- 0
Marlin/example_configurations/Micromake/C1/README.md Переглянути файл

1
+# Micromake C1
2
+
3
+### In the folder "basic"
4
+Configuration files for Micromake C1 without mods
5
+  - English LCD 2X16 Characters
6
+  - Motors 16 STEPS
7
+  - No heated bed
8
+  - No probe, etc.
9
+  - Like a standard C1 as shipped by Micromake.
10
+
11
+### In the folder "enhanced"
12
+Configuration files for Micromake C1 with…
13
+  - 128 STEPS configured with jumper on the motherboard (all open for 128 Steps).
14
+  - Capacitive Probe (Adjust offsets at your convenience)
15
+  - French language with no accents for Japanese LCD.

+ 1773
- 0
Marlin/example_configurations/Micromake/C1/basic/Configuration.h
Різницю між файлами не показано, бо вона завелика
Переглянути файл


+ 1773
- 0
Marlin/example_configurations/Micromake/C1/enhanced/Configuration.h
Різницю між файлами не показано, бо вона завелика
Переглянути файл


+ 1568
- 0
Marlin/example_configurations/Micromake/C1/enhanced/Configuration_adv.h
Різницю між файлами не показано, бо вона завелика
Переглянути файл


+ 159
- 90
Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h Переглянути файл

37
  */
37
  */
38
 #ifndef CONFIGURATION_H
38
 #ifndef CONFIGURATION_H
39
 #define CONFIGURATION_H
39
 #define CONFIGURATION_H
40
-#define CONFIGURATION_H_VERSION 010100
40
+#define CONFIGURATION_H_VERSION 010107
41
 
41
 
42
 //===========================================================================
42
 //===========================================================================
43
 //============================= Getting Started =============================
43
 //============================= Getting Started =============================
136
 // :[1, 2, 3, 4, 5]
136
 // :[1, 2, 3, 4, 5]
137
 #define EXTRUDERS 1
137
 #define EXTRUDERS 1
138
 
138
 
139
+// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
140
+#define DEFAULT_NOMINAL_FILAMENT_DIA 3.0
141
+
139
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
142
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
140
 //#define SINGLENOZZLE
143
 //#define SINGLENOZZLE
141
 
144
 
336
 
339
 
337
 // Comment the following line to disable PID and enable bang-bang.
340
 // Comment the following line to disable PID and enable bang-bang.
338
 #define PIDTEMP
341
 #define PIDTEMP
339
-#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
340
-#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
342
+#define BANG_MAX 255     // Limits current to nozzle while in bang-bang mode; 255=full current
343
+#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
344
+#define PID_K1 0.95      // Smoothing factor within the PID
341
 #if ENABLED(PIDTEMP)
345
 #if ENABLED(PIDTEMP)
342
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
346
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
343
   //#define PID_DEBUG // Sends debug data to the serial port.
347
   //#define PID_DEBUG // Sends debug data to the serial port.
347
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
351
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
348
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
352
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
349
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
353
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
350
-  #define K1 0.95 //smoothing factor within the PID
351
 
354
 
352
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
355
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
353
 
356
 
428
 //===========================================================================
431
 //===========================================================================
429
 
432
 
430
 /**
433
 /**
431
- * Thermal Protection protects your printer from damage and fire if a
432
- * thermistor falls out or temperature sensors fail in any way.
434
+ * Thermal Protection provides additional protection to your printer from damage
435
+ * and fire. Marlin always includes safe min and max temperature ranges which
436
+ * protect against a broken or disconnected thermistor wire.
433
  *
437
  *
434
- * The issue: If a thermistor falls out or a temperature sensor fails,
435
- * Marlin can no longer sense the actual temperature. Since a disconnected
436
- * thermistor reads as a low temperature, the firmware will keep the heater on.
438
+ * The issue: If a thermistor falls out, it will report the much lower
439
+ * temperature of the air in the room, and the the firmware will keep
440
+ * the heater on.
437
  *
441
  *
438
  * If you get "Thermal Runaway" or "Heating failed" errors the
442
  * If you get "Thermal Runaway" or "Heating failed" errors the
439
  * details can be tuned in Configuration_adv.h
443
  * details can be tuned in Configuration_adv.h
573
 // @section probes
577
 // @section probes
574
 
578
 
575
 //
579
 //
576
-// See http://marlinfw.org/configuration/probes.html
580
+// See http://marlinfw.org/docs/configuration/probes.html
577
 //
581
 //
578
 
582
 
579
 /**
583
 /**
686
 // X and Y axis travel speed (mm/m) between probes
690
 // X and Y axis travel speed (mm/m) between probes
687
 #define XY_PROBE_SPEED 8000
691
 #define XY_PROBE_SPEED 8000
688
 
692
 
689
-// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH)
693
+// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
690
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
694
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
691
 
695
 
692
 // Speed for the "accurate" probe of each point
696
 // Speed for the "accurate" probe of each point
693
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
697
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
694
 
698
 
695
-// Use double touch for probing
696
-//#define PROBE_DOUBLE_TOUCH
699
+// The number of probes to perform at each point.
700
+//   Set to 2 for a fast/slow probe, using the second probe result.
701
+//   Set to 3 or more for slow probes, averaging the results.
702
+//#define MULTIPLE_PROBING 2
697
 
703
 
698
 /**
704
 /**
699
  * Z probes require clearance when deploying, stowing, and moving between
705
  * Z probes require clearance when deploying, stowing, and moving between
785
 #define Y_MAX_POS Y_BED_SIZE
791
 #define Y_MAX_POS Y_BED_SIZE
786
 #define Z_MAX_POS 200
792
 #define Z_MAX_POS 200
787
 
793
 
788
-// If enabled, axes won't move below MIN_POS in response to movement commands.
794
+/**
795
+ * Software Endstops
796
+ *
797
+ * - Prevent moves outside the set machine bounds.
798
+ * - Individual axes can be disabled, if desired.
799
+ * - X and Y only apply to Cartesian robots.
800
+ * - Use 'M211' to set software endstops on/off or report current state
801
+ */
802
+
803
+// Min software endstops curtail movement below minimum coordinate bounds
789
 #define MIN_SOFTWARE_ENDSTOPS
804
 #define MIN_SOFTWARE_ENDSTOPS
790
-// If enabled, axes won't move above MAX_POS in response to movement commands.
805
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
806
+  #define MIN_SOFTWARE_ENDSTOP_X
807
+  #define MIN_SOFTWARE_ENDSTOP_Y
808
+  #define MIN_SOFTWARE_ENDSTOP_Z
809
+#endif
810
+
811
+// Max software endstops curtail movement above maximum coordinate bounds
791
 #define MAX_SOFTWARE_ENDSTOPS
812
 #define MAX_SOFTWARE_ENDSTOPS
813
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
814
+  #define MAX_SOFTWARE_ENDSTOP_X
815
+  #define MAX_SOFTWARE_ENDSTOP_Y
816
+  #define MAX_SOFTWARE_ENDSTOP_Z
817
+#endif
792
 
818
 
793
 /**
819
 /**
794
  * Filament Runout Sensor
820
  * Filament Runout Sensor
808
 //===========================================================================
834
 //===========================================================================
809
 //=============================== Bed Leveling ==============================
835
 //=============================== Bed Leveling ==============================
810
 //===========================================================================
836
 //===========================================================================
811
-// @section bedlevel
837
+// @section calibrate
812
 
838
 
813
 /**
839
 /**
814
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
840
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
834
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
860
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
835
  *   A comprehensive bed leveling system combining the features and benefits
861
  *   A comprehensive bed leveling system combining the features and benefits
836
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
862
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
837
- *   Validation and Mesh Editing systems. Currently, UBL is only checked out
838
- *   for Cartesian Printers. That said, it was primarily designed to correct
839
- *   poor quality Delta Printers. If you feel adventurous and have a Delta,
840
- *   please post an issue if something doesn't work correctly. Initially,
841
- *   you will need to set a reduced bed size so you have a rectangular area
842
- *   to test on.
863
+ *   Validation and Mesh Editing systems.
843
  *
864
  *
844
  * - MESH_BED_LEVELING
865
  * - MESH_BED_LEVELING
845
  *   Probe a grid manually
866
  *   Probe a grid manually
866
   // at which point movement will be level to the machine's XY plane.
887
   // at which point movement will be level to the machine's XY plane.
867
   // The height can be set with M420 Z<height>
888
   // The height can be set with M420 Z<height>
868
   #define ENABLE_LEVELING_FADE_HEIGHT
889
   #define ENABLE_LEVELING_FADE_HEIGHT
890
+
891
+  // For Cartesian machines, instead of dividing moves on mesh boundaries,
892
+  // split up moves into short segments like a Delta. This follows the
893
+  // contours of the bed more closely than edge-to-edge straight moves.
894
+  #define SEGMENT_LEVELED_MOVES
895
+  #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)
896
+
897
+  /**
898
+   * Enable the G26 Mesh Validation Pattern tool.
899
+   */
900
+  //#define G26_MESH_VALIDATION   // Enable G26 mesh validation
901
+  #if ENABLED(G26_MESH_VALIDATION)
902
+    #define MESH_TEST_NOZZLE_SIZE     0.4   // (mm) Diameter of primary nozzle.
903
+    #define MESH_TEST_LAYER_HEIGHT    0.2   // (mm) Default layer height for the G26 Mesh Validation Tool.
904
+    #define MESH_TEST_HOTEND_TEMP   205.0   // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
905
+    #define MESH_TEST_BED_TEMP       60.0   // (°C) Default bed temperature for the G26 Mesh Validation Tool.
906
+  #endif
907
+
869
 #endif
908
 #endif
870
 
909
 
871
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
910
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
921
   //========================= Unified Bed Leveling ============================
960
   //========================= Unified Bed Leveling ============================
922
   //===========================================================================
961
   //===========================================================================
923
 
962
 
924
-  #define UBL_MESH_INSET 1          // Mesh inset margin on print area
963
+  //#define MESH_EDIT_GFX_OVERLAY   // Display a graphics overlay while editing the mesh
964
+
965
+  #define MESH_INSET 1              // Mesh inset margin on print area
925
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
966
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
926
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
967
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
927
 
968
 
932
   #define UBL_PROBE_PT_3_X 180
973
   #define UBL_PROBE_PT_3_X 180
933
   #define UBL_PROBE_PT_3_Y 20
974
   #define UBL_PROBE_PT_3_Y 20
934
 
975
 
935
-  #define UBL_G26_MESH_VALIDATION   // Enable G26 mesh validation
936
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
976
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
977
+  #define UBL_SAVE_ACTIVE_ON_M500   // Save the currently active mesh in the current slot on M500
937
 
978
 
938
 #elif ENABLED(MESH_BED_LEVELING)
979
 #elif ENABLED(MESH_BED_LEVELING)
939
 
980
 
993
 //#define Z_SAFE_HOMING
1034
 //#define Z_SAFE_HOMING
994
 
1035
 
995
 #if ENABLED(Z_SAFE_HOMING)
1036
 #if ENABLED(Z_SAFE_HOMING)
996
-  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axis (G28).
997
-  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axis (G28).
1037
+  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axes (G28).
1038
+  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axes (G28).
998
 #endif
1039
 #endif
999
 
1040
 
1000
 // Homing speeds (mm/m)
1041
 // Homing speeds (mm/m)
1001
 #define HOMING_FEEDRATE_XY (50*60)
1042
 #define HOMING_FEEDRATE_XY (50*60)
1002
 #define HOMING_FEEDRATE_Z  (4*60)
1043
 #define HOMING_FEEDRATE_Z  (4*60)
1003
 
1044
 
1045
+// @section calibrate
1046
+
1047
+/**
1048
+ * Bed Skew Compensation
1049
+ *
1050
+ * This feature corrects for misalignment in the XYZ axes.
1051
+ *
1052
+ * Take the following steps to get the bed skew in the XY plane:
1053
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1054
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1055
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1056
+ *  4. For XY_SIDE_AD measure the edge A to D
1057
+ *
1058
+ * Marlin automatically computes skew factors from these measurements.
1059
+ * Skew factors may also be computed and set manually:
1060
+ *
1061
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1062
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1063
+ *
1064
+ * If desired, follow the same procedure for XZ and YZ.
1065
+ * Use these diagrams for reference:
1066
+ *
1067
+ *    Y                     Z                     Z
1068
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1069
+ *    |    /       /        |    /       /        |    /       /
1070
+ *    |   /       /         |   /       /         |   /       /
1071
+ *    |  A-------D          |  A-------D          |  A-------D
1072
+ *    +-------------->X     +-------------->X     +-------------->Y
1073
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1074
+ */
1075
+//#define SKEW_CORRECTION
1076
+
1077
+#if ENABLED(SKEW_CORRECTION)
1078
+  // Input all length measurements here:
1079
+  #define XY_DIAG_AC 282.8427124746
1080
+  #define XY_DIAG_BD 282.8427124746
1081
+  #define XY_SIDE_AD 200
1082
+
1083
+  // Or, set the default skew factors directly here
1084
+  // to override the above measurements:
1085
+  #define XY_SKEW_FACTOR 0.0
1086
+
1087
+  //#define SKEW_CORRECTION_FOR_Z
1088
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1089
+    #define XZ_DIAG_AC 282.8427124746
1090
+    #define XZ_DIAG_BD 282.8427124746
1091
+    #define YZ_DIAG_AC 282.8427124746
1092
+    #define YZ_DIAG_BD 282.8427124746
1093
+    #define YZ_SIDE_AD 200
1094
+    #define XZ_SKEW_FACTOR 0.0
1095
+    #define YZ_SKEW_FACTOR 0.0
1096
+  #endif
1097
+
1098
+  // Enable this option for M852 to set skew at runtime
1099
+  //#define SKEW_CORRECTION_GCODE
1100
+#endif
1101
+
1004
 //=============================================================================
1102
 //=============================================================================
1005
 //============================= Additional Features ===========================
1103
 //============================= Additional Features ===========================
1006
 //=============================================================================
1104
 //=============================================================================
1032
 //
1130
 //
1033
 // M100 Free Memory Watcher
1131
 // M100 Free Memory Watcher
1034
 //
1132
 //
1035
-//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
1133
+//#define M100_FREE_MEMORY_WATCHER    // Add M100 (Free Memory Watcher) to debug memory usage
1036
 
1134
 
1037
 //
1135
 //
1038
 // G20/G21 Inch mode support
1136
 // G20/G21 Inch mode support
1177
  *
1275
  *
1178
  * Select the language to display on the LCD. These languages are available:
1276
  * Select the language to display on the LCD. These languages are available:
1179
  *
1277
  *
1180
- *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, gl, hr,
1181
- *    it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1278
+ *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, fr_utf8, gl,
1279
+ *    hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1182
  *    tr, uk, zh_CN, zh_TW, test
1280
  *    tr, uk, zh_CN, zh_TW, test
1183
  *
1281
  *
1184
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1282
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1185
  */
1283
  */
1186
 #define LCD_LANGUAGE en
1284
 #define LCD_LANGUAGE en
1187
 
1285
 
1309
 // Note: Test audio output with the G-Code:
1407
 // Note: Test audio output with the G-Code:
1310
 //  M300 S<frequency Hz> P<duration ms>
1408
 //  M300 S<frequency Hz> P<duration ms>
1311
 //
1409
 //
1312
-//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
1313
-//#define LCD_FEEDBACK_FREQUENCY_HZ 1000
1410
+//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
1411
+//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
1314
 
1412
 
1315
 //
1413
 //
1316
 // CONTROLLER TYPE: Standard
1414
 // CONTROLLER TYPE: Standard
1418
 //#define CARTESIO_UI
1516
 //#define CARTESIO_UI
1419
 
1517
 
1420
 //
1518
 //
1421
-// ANET_10 Controller supported displays.
1519
+// ANET and Tronxy Controller supported displays.
1422
 //
1520
 //
1423
-//#define ANET_KEYPAD_LCD         // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1521
+//#define ZONESTAR_LCD            // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1424
                                   // This LCD is known to be susceptible to electrical interference
1522
                                   // This LCD is known to be susceptible to electrical interference
1425
                                   // which scrambles the display.  Pressing any button clears it up.
1523
                                   // which scrambles the display.  Pressing any button clears it up.
1524
+                                  // This is a LCD2004 display with 5 analog buttons.
1525
+
1426
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1526
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1427
                                   // A clone of the RepRapDiscount full graphics display but with
1527
                                   // A clone of the RepRapDiscount full graphics display but with
1428
                                   // different pins/wiring (see pins_ANET_10.h).
1528
                                   // different pins/wiring (see pins_ANET_10.h).
1532
 //
1632
 //
1533
 //#define MKS_12864OLED
1633
 //#define MKS_12864OLED
1534
 
1634
 
1635
+// Silvergate GLCD controller
1636
+// http://github.com/android444/Silvergate
1637
+//
1638
+//#define SILVER_GATE_GLCD_CONTROLLER
1639
+
1535
 //=============================================================================
1640
 //=============================================================================
1536
 //=============================== Extra Features ==============================
1641
 //=============================== Extra Features ==============================
1537
 //=============================================================================
1642
 //=============================================================================
1588
  * Adds the M150 command to set the LED (or LED strip) color.
1693
  * Adds the M150 command to set the LED (or LED strip) color.
1589
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1694
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1590
  * luminance values can be set from 0 to 255.
1695
  * luminance values can be set from 0 to 255.
1591
- * For Neopixel LED overall brightness parameters is also available 
1696
+ * For Neopixel LED an overall brightness parameter is also available.
1592
  *
1697
  *
1593
  * *** CAUTION ***
1698
  * *** CAUTION ***
1594
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1699
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1595
  *  as the Arduino cannot handle the current the LEDs will require.
1700
  *  as the Arduino cannot handle the current the LEDs will require.
1596
  *  Failure to follow this precaution can destroy your Arduino!
1701
  *  Failure to follow this precaution can destroy your Arduino!
1597
- *  The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
1598
- *  cannot handle such current, separate 5V power supply must be used
1702
+ *  NOTE: A separate 5V power supply is required! The Neopixel LED needs
1703
+ *  more current than the Arduino 5V linear regulator can produce.
1599
  * *** CAUTION ***
1704
  * *** CAUTION ***
1600
  *
1705
  *
1601
- * LED type. This options are mutualy exclusive. Uncomment only one.
1706
+ * LED Type. Enable only one of the following two options.
1602
  *
1707
  *
1603
  */
1708
  */
1604
 //#define RGB_LED
1709
 //#define RGB_LED
1614
 // Support for Adafruit Neopixel LED driver
1719
 // Support for Adafruit Neopixel LED driver
1615
 //#define NEOPIXEL_LED
1720
 //#define NEOPIXEL_LED
1616
 #if ENABLED(NEOPIXEL_LED)
1721
 #if ENABLED(NEOPIXEL_LED)
1617
-  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
1722
+  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
1618
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1723
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1619
-  #define NEOPIXEL_PIXELS 30       // Number of LEDs on strip
1620
-  #define NEOPIXEL_IS_SEQUENTIAL   // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
1621
-  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness 0-255
1724
+  #define NEOPIXEL_PIXELS 30       // Number of LEDs in the strip
1725
+  #define NEOPIXEL_IS_SEQUENTIAL   // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
1726
+  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness (0-255)
1622
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1727
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1623
 #endif
1728
 #endif
1624
 
1729
 
1633
  *  - Change to green once print has finished
1738
  *  - Change to green once print has finished
1634
  *  - Turn off after the print has finished and the user has pushed a button
1739
  *  - Turn off after the print has finished and the user has pushed a button
1635
  */
1740
  */
1636
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED)
1741
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
1637
   #define PRINTER_EVENT_LEDS
1742
   #define PRINTER_EVENT_LEDS
1638
 #endif
1743
 #endif
1639
 
1744
 
1640
-/*********************************************************************\
1641
-* R/C SERVO support
1642
-* Sponsored by TrinityLabs, Reworked by codexmas
1643
-**********************************************************************/
1745
+/**
1746
+ * R/C SERVO support
1747
+ * Sponsored by TrinityLabs, Reworked by codexmas
1748
+ */
1644
 
1749
 
1645
-// Number of servos
1646
-//
1647
-// If you select a configuration below, this will receive a default value and does not need to be set manually
1648
-// set it manually if you have more servos than extruders and wish to manually control some
1649
-// leaving it undefined or defining as 0 will disable the servo subsystem
1650
-// If unsure, leave commented / disabled
1651
-//
1750
+/**
1751
+ * Number of servos
1752
+ *
1753
+ * For some servo-related options NUM_SERVOS will be set automatically.
1754
+ * Set this manually if there are extra servos needing manual control.
1755
+ * Leave undefined or set to 0 to entirely disable the servo subsystem.
1756
+ */
1652
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1757
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1653
 
1758
 
1654
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1759
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1661
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1766
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1662
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1767
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1663
 
1768
 
1664
-/**
1665
- * Filament Width Sensor
1666
- *
1667
- * Measures the filament width in real-time and adjusts
1668
- * flow rate to compensate for any irregularities.
1669
- *
1670
- * Also allows the measured filament diameter to set the
1671
- * extrusion rate, so the slicer only has to specify the
1672
- * volume.
1673
- *
1674
- * Only a single extruder is supported at this time.
1675
- *
1676
- *  34 RAMPS_14    : Analog input 5 on the AUX2 connector
1677
- *  81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
1678
- * 301 RAMBO       : Analog input 3
1679
- *
1680
- * Note: May require analog pins to be defined for other boards.
1681
- */
1682
-//#define FILAMENT_WIDTH_SENSOR
1683
-
1684
-#define DEFAULT_NOMINAL_FILAMENT_DIA 3.00   // (mm) Diameter of the filament generally used (3.0 or 1.75mm), also used in the slicer. Used to validate sensor reading.
1685
-
1686
-#if ENABLED(FILAMENT_WIDTH_SENSOR)
1687
-  #define FILAMENT_SENSOR_EXTRUDER_NUM 0    // Index of the extruder that has the filament sensor (0,1,2,3)
1688
-  #define MEASUREMENT_DELAY_CM        14    // (cm) The distance from the filament sensor to the melting chamber
1689
-
1690
-  #define MEASURED_UPPER_LIMIT         3.30 // (mm) Upper limit used to validate sensor reading
1691
-  #define MEASURED_LOWER_LIMIT         1.90 // (mm) Lower limit used to validate sensor reading
1692
-  #define MAX_MEASUREMENT_DELAY       20    // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
1693
-
1694
-  #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
1695
-
1696
-  // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
1697
-  //#define FILAMENT_LCD_DISPLAY
1698
-#endif
1699
-
1700
 #endif // CONFIGURATION_H
1769
 #endif // CONFIGURATION_H

+ 159
- 90
Marlin/example_configurations/RigidBot/Configuration.h Переглянути файл

37
  */
37
  */
38
 #ifndef CONFIGURATION_H
38
 #ifndef CONFIGURATION_H
39
 #define CONFIGURATION_H
39
 #define CONFIGURATION_H
40
-#define CONFIGURATION_H_VERSION 010100
40
+#define CONFIGURATION_H_VERSION 010107
41
 
41
 
42
 //===========================================================================
42
 //===========================================================================
43
 //============================= Getting Started =============================
43
 //============================= Getting Started =============================
139
 // :[1, 2, 3, 4, 5]
139
 // :[1, 2, 3, 4, 5]
140
 #define EXTRUDERS 1  // Single extruder. Set to 2 for dual extruders
140
 #define EXTRUDERS 1  // Single extruder. Set to 2 for dual extruders
141
 
141
 
142
+// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
143
+#define DEFAULT_NOMINAL_FILAMENT_DIA 3.0
144
+
142
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
145
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
143
 //#define SINGLENOZZLE
146
 //#define SINGLENOZZLE
144
 
147
 
339
 
342
 
340
 // Comment the following line to disable PID and enable bang-bang.
343
 // Comment the following line to disable PID and enable bang-bang.
341
 #define PIDTEMP
344
 #define PIDTEMP
342
-#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
343
-#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
345
+#define BANG_MAX 255     // Limits current to nozzle while in bang-bang mode; 255=full current
346
+#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
347
+#define PID_K1 0.95      // Smoothing factor within the PID
344
 #if ENABLED(PIDTEMP)
348
 #if ENABLED(PIDTEMP)
345
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
349
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
346
   //#define PID_DEBUG // Sends debug data to the serial port.
350
   //#define PID_DEBUG // Sends debug data to the serial port.
350
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
354
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
351
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
355
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
352
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
356
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
353
-  #define K1 0.95 //smoothing factor within the PID
354
 
357
 
355
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
358
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
356
 
359
 
424
 //===========================================================================
427
 //===========================================================================
425
 
428
 
426
 /**
429
 /**
427
- * Thermal Protection protects your printer from damage and fire if a
428
- * thermistor falls out or temperature sensors fail in any way.
430
+ * Thermal Protection provides additional protection to your printer from damage
431
+ * and fire. Marlin always includes safe min and max temperature ranges which
432
+ * protect against a broken or disconnected thermistor wire.
429
  *
433
  *
430
- * The issue: If a thermistor falls out or a temperature sensor fails,
431
- * Marlin can no longer sense the actual temperature. Since a disconnected
432
- * thermistor reads as a low temperature, the firmware will keep the heater on.
434
+ * The issue: If a thermistor falls out, it will report the much lower
435
+ * temperature of the air in the room, and the the firmware will keep
436
+ * the heater on.
433
  *
437
  *
434
  * If you get "Thermal Runaway" or "Heating failed" errors the
438
  * If you get "Thermal Runaway" or "Heating failed" errors the
435
  * details can be tuned in Configuration_adv.h
439
  * details can be tuned in Configuration_adv.h
571
 // @section probes
575
 // @section probes
572
 
576
 
573
 //
577
 //
574
-// See http://marlinfw.org/configuration/probes.html
578
+// See http://marlinfw.org/docs/configuration/probes.html
575
 //
579
 //
576
 
580
 
577
 /**
581
 /**
684
 // X and Y axis travel speed (mm/m) between probes
688
 // X and Y axis travel speed (mm/m) between probes
685
 #define XY_PROBE_SPEED 8000
689
 #define XY_PROBE_SPEED 8000
686
 
690
 
687
-// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH)
691
+// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
688
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
692
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
689
 
693
 
690
 // Speed for the "accurate" probe of each point
694
 // Speed for the "accurate" probe of each point
691
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
695
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
692
 
696
 
693
-// Use double touch for probing
694
-//#define PROBE_DOUBLE_TOUCH
697
+// The number of probes to perform at each point.
698
+//   Set to 2 for a fast/slow probe, using the second probe result.
699
+//   Set to 3 or more for slow probes, averaging the results.
700
+//#define MULTIPLE_PROBING 2
695
 
701
 
696
 /**
702
 /**
697
  * Z probes require clearance when deploying, stowing, and moving between
703
  * Z probes require clearance when deploying, stowing, and moving between
783
 #define Y_MAX_POS Y_BED_SIZE
789
 #define Y_MAX_POS Y_BED_SIZE
784
 #define Z_MAX_POS 254  // RigidBot regular and Big are 254mm
790
 #define Z_MAX_POS 254  // RigidBot regular and Big are 254mm
785
 
791
 
786
-// If enabled, axes won't move below MIN_POS in response to movement commands.
792
+/**
793
+ * Software Endstops
794
+ *
795
+ * - Prevent moves outside the set machine bounds.
796
+ * - Individual axes can be disabled, if desired.
797
+ * - X and Y only apply to Cartesian robots.
798
+ * - Use 'M211' to set software endstops on/off or report current state
799
+ */
800
+
801
+// Min software endstops curtail movement below minimum coordinate bounds
787
 #define MIN_SOFTWARE_ENDSTOPS
802
 #define MIN_SOFTWARE_ENDSTOPS
788
-// If enabled, axes won't move above MAX_POS in response to movement commands.
803
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
804
+  #define MIN_SOFTWARE_ENDSTOP_X
805
+  #define MIN_SOFTWARE_ENDSTOP_Y
806
+  #define MIN_SOFTWARE_ENDSTOP_Z
807
+#endif
808
+
809
+// Max software endstops curtail movement above maximum coordinate bounds
789
 #define MAX_SOFTWARE_ENDSTOPS
810
 #define MAX_SOFTWARE_ENDSTOPS
811
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
812
+  #define MAX_SOFTWARE_ENDSTOP_X
813
+  #define MAX_SOFTWARE_ENDSTOP_Y
814
+  #define MAX_SOFTWARE_ENDSTOP_Z
815
+#endif
790
 
816
 
791
 /**
817
 /**
792
  * Filament Runout Sensor
818
  * Filament Runout Sensor
806
 //===========================================================================
832
 //===========================================================================
807
 //=============================== Bed Leveling ==============================
833
 //=============================== Bed Leveling ==============================
808
 //===========================================================================
834
 //===========================================================================
809
-// @section bedlevel
835
+// @section calibrate
810
 
836
 
811
 /**
837
 /**
812
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
838
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
832
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
858
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
833
  *   A comprehensive bed leveling system combining the features and benefits
859
  *   A comprehensive bed leveling system combining the features and benefits
834
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
860
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
835
- *   Validation and Mesh Editing systems. Currently, UBL is only checked out
836
- *   for Cartesian Printers. That said, it was primarily designed to correct
837
- *   poor quality Delta Printers. If you feel adventurous and have a Delta,
838
- *   please post an issue if something doesn't work correctly. Initially,
839
- *   you will need to set a reduced bed size so you have a rectangular area
840
- *   to test on.
861
+ *   Validation and Mesh Editing systems.
841
  *
862
  *
842
  * - MESH_BED_LEVELING
863
  * - MESH_BED_LEVELING
843
  *   Probe a grid manually
864
  *   Probe a grid manually
864
   // at which point movement will be level to the machine's XY plane.
885
   // at which point movement will be level to the machine's XY plane.
865
   // The height can be set with M420 Z<height>
886
   // The height can be set with M420 Z<height>
866
   #define ENABLE_LEVELING_FADE_HEIGHT
887
   #define ENABLE_LEVELING_FADE_HEIGHT
888
+
889
+  // For Cartesian machines, instead of dividing moves on mesh boundaries,
890
+  // split up moves into short segments like a Delta. This follows the
891
+  // contours of the bed more closely than edge-to-edge straight moves.
892
+  #define SEGMENT_LEVELED_MOVES
893
+  #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)
894
+
895
+  /**
896
+   * Enable the G26 Mesh Validation Pattern tool.
897
+   */
898
+  //#define G26_MESH_VALIDATION   // Enable G26 mesh validation
899
+  #if ENABLED(G26_MESH_VALIDATION)
900
+    #define MESH_TEST_NOZZLE_SIZE     0.4   // (mm) Diameter of primary nozzle.
901
+    #define MESH_TEST_LAYER_HEIGHT    0.2   // (mm) Default layer height for the G26 Mesh Validation Tool.
902
+    #define MESH_TEST_HOTEND_TEMP   205.0   // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
903
+    #define MESH_TEST_BED_TEMP       60.0   // (°C) Default bed temperature for the G26 Mesh Validation Tool.
904
+  #endif
905
+
867
 #endif
906
 #endif
868
 
907
 
869
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
908
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
919
   //========================= Unified Bed Leveling ============================
958
   //========================= Unified Bed Leveling ============================
920
   //===========================================================================
959
   //===========================================================================
921
 
960
 
922
-  #define UBL_MESH_INSET 1          // Mesh inset margin on print area
961
+  //#define MESH_EDIT_GFX_OVERLAY   // Display a graphics overlay while editing the mesh
962
+
963
+  #define MESH_INSET 1              // Mesh inset margin on print area
923
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
964
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
924
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
965
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
925
 
966
 
930
   #define UBL_PROBE_PT_3_X 180
971
   #define UBL_PROBE_PT_3_X 180
931
   #define UBL_PROBE_PT_3_Y 20
972
   #define UBL_PROBE_PT_3_Y 20
932
 
973
 
933
-  #define UBL_G26_MESH_VALIDATION   // Enable G26 mesh validation
934
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
974
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
975
+  #define UBL_SAVE_ACTIVE_ON_M500   // Save the currently active mesh in the current slot on M500
935
 
976
 
936
 #elif ENABLED(MESH_BED_LEVELING)
977
 #elif ENABLED(MESH_BED_LEVELING)
937
 
978
 
991
 //#define Z_SAFE_HOMING
1032
 //#define Z_SAFE_HOMING
992
 
1033
 
993
 #if ENABLED(Z_SAFE_HOMING)
1034
 #if ENABLED(Z_SAFE_HOMING)
994
-  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axis (G28).
995
-  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axis (G28).
1035
+  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axes (G28).
1036
+  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axes (G28).
996
 #endif
1037
 #endif
997
 
1038
 
998
 // Homing speeds (mm/m)
1039
 // Homing speeds (mm/m)
999
 #define HOMING_FEEDRATE_XY (50*60)
1040
 #define HOMING_FEEDRATE_XY (50*60)
1000
 #define HOMING_FEEDRATE_Z  (15*60)
1041
 #define HOMING_FEEDRATE_Z  (15*60)
1001
 
1042
 
1043
+// @section calibrate
1044
+
1045
+/**
1046
+ * Bed Skew Compensation
1047
+ *
1048
+ * This feature corrects for misalignment in the XYZ axes.
1049
+ *
1050
+ * Take the following steps to get the bed skew in the XY plane:
1051
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1052
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1053
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1054
+ *  4. For XY_SIDE_AD measure the edge A to D
1055
+ *
1056
+ * Marlin automatically computes skew factors from these measurements.
1057
+ * Skew factors may also be computed and set manually:
1058
+ *
1059
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1060
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1061
+ *
1062
+ * If desired, follow the same procedure for XZ and YZ.
1063
+ * Use these diagrams for reference:
1064
+ *
1065
+ *    Y                     Z                     Z
1066
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1067
+ *    |    /       /        |    /       /        |    /       /
1068
+ *    |   /       /         |   /       /         |   /       /
1069
+ *    |  A-------D          |  A-------D          |  A-------D
1070
+ *    +-------------->X     +-------------->X     +-------------->Y
1071
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1072
+ */
1073
+//#define SKEW_CORRECTION
1074
+
1075
+#if ENABLED(SKEW_CORRECTION)
1076
+  // Input all length measurements here:
1077
+  #define XY_DIAG_AC 282.8427124746
1078
+  #define XY_DIAG_BD 282.8427124746
1079
+  #define XY_SIDE_AD 200
1080
+
1081
+  // Or, set the default skew factors directly here
1082
+  // to override the above measurements:
1083
+  #define XY_SKEW_FACTOR 0.0
1084
+
1085
+  //#define SKEW_CORRECTION_FOR_Z
1086
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1087
+    #define XZ_DIAG_AC 282.8427124746
1088
+    #define XZ_DIAG_BD 282.8427124746
1089
+    #define YZ_DIAG_AC 282.8427124746
1090
+    #define YZ_DIAG_BD 282.8427124746
1091
+    #define YZ_SIDE_AD 200
1092
+    #define XZ_SKEW_FACTOR 0.0
1093
+    #define YZ_SKEW_FACTOR 0.0
1094
+  #endif
1095
+
1096
+  // Enable this option for M852 to set skew at runtime
1097
+  //#define SKEW_CORRECTION_GCODE
1098
+#endif
1099
+
1002
 //=============================================================================
1100
 //=============================================================================
1003
 //============================= Additional Features ===========================
1101
 //============================= Additional Features ===========================
1004
 //=============================================================================
1102
 //=============================================================================
1030
 //
1128
 //
1031
 // M100 Free Memory Watcher
1129
 // M100 Free Memory Watcher
1032
 //
1130
 //
1033
-//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
1131
+//#define M100_FREE_MEMORY_WATCHER    // Add M100 (Free Memory Watcher) to debug memory usage
1034
 
1132
 
1035
 //
1133
 //
1036
 // G20/G21 Inch mode support
1134
 // G20/G21 Inch mode support
1175
  *
1273
  *
1176
  * Select the language to display on the LCD. These languages are available:
1274
  * Select the language to display on the LCD. These languages are available:
1177
  *
1275
  *
1178
- *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, gl, hr,
1179
- *    it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1276
+ *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, fr_utf8, gl,
1277
+ *    hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1180
  *    tr, uk, zh_CN, zh_TW, test
1278
  *    tr, uk, zh_CN, zh_TW, test
1181
  *
1279
  *
1182
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1280
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1183
  */
1281
  */
1184
 #define LCD_LANGUAGE en
1282
 #define LCD_LANGUAGE en
1185
 
1283
 
1307
 // Note: Test audio output with the G-Code:
1405
 // Note: Test audio output with the G-Code:
1308
 //  M300 S<frequency Hz> P<duration ms>
1406
 //  M300 S<frequency Hz> P<duration ms>
1309
 //
1407
 //
1310
-//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
1311
-//#define LCD_FEEDBACK_FREQUENCY_HZ 1000
1408
+//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
1409
+//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
1312
 
1410
 
1313
 //
1411
 //
1314
 // CONTROLLER TYPE: Standard
1412
 // CONTROLLER TYPE: Standard
1418
 //#define CARTESIO_UI
1516
 //#define CARTESIO_UI
1419
 
1517
 
1420
 //
1518
 //
1421
-// ANET_10 Controller supported displays.
1519
+// ANET and Tronxy Controller supported displays.
1422
 //
1520
 //
1423
-//#define ANET_KEYPAD_LCD         // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1521
+//#define ZONESTAR_LCD            // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1424
                                   // This LCD is known to be susceptible to electrical interference
1522
                                   // This LCD is known to be susceptible to electrical interference
1425
                                   // which scrambles the display.  Pressing any button clears it up.
1523
                                   // which scrambles the display.  Pressing any button clears it up.
1524
+                                  // This is a LCD2004 display with 5 analog buttons.
1525
+
1426
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1526
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1427
                                   // A clone of the RepRapDiscount full graphics display but with
1527
                                   // A clone of the RepRapDiscount full graphics display but with
1428
                                   // different pins/wiring (see pins_ANET_10.h).
1528
                                   // different pins/wiring (see pins_ANET_10.h).
1532
 //
1632
 //
1533
 //#define MKS_12864OLED
1633
 //#define MKS_12864OLED
1534
 
1634
 
1635
+// Silvergate GLCD controller
1636
+// http://github.com/android444/Silvergate
1637
+//
1638
+//#define SILVER_GATE_GLCD_CONTROLLER
1639
+
1535
 //=============================================================================
1640
 //=============================================================================
1536
 //=============================== Extra Features ==============================
1641
 //=============================== Extra Features ==============================
1537
 //=============================================================================
1642
 //=============================================================================
1588
  * Adds the M150 command to set the LED (or LED strip) color.
1693
  * Adds the M150 command to set the LED (or LED strip) color.
1589
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1694
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1590
  * luminance values can be set from 0 to 255.
1695
  * luminance values can be set from 0 to 255.
1591
- * For Neopixel LED overall brightness parameters is also available 
1696
+ * For Neopixel LED an overall brightness parameter is also available.
1592
  *
1697
  *
1593
  * *** CAUTION ***
1698
  * *** CAUTION ***
1594
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1699
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1595
  *  as the Arduino cannot handle the current the LEDs will require.
1700
  *  as the Arduino cannot handle the current the LEDs will require.
1596
  *  Failure to follow this precaution can destroy your Arduino!
1701
  *  Failure to follow this precaution can destroy your Arduino!
1597
- *  The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
1598
- *  cannot handle such current, separate 5V power supply must be used
1702
+ *  NOTE: A separate 5V power supply is required! The Neopixel LED needs
1703
+ *  more current than the Arduino 5V linear regulator can produce.
1599
  * *** CAUTION ***
1704
  * *** CAUTION ***
1600
  *
1705
  *
1601
- * LED type. This options are mutualy exclusive. Uncomment only one.
1706
+ * LED Type. Enable only one of the following two options.
1602
  *
1707
  *
1603
  */
1708
  */
1604
 //#define RGB_LED
1709
 //#define RGB_LED
1614
 // Support for Adafruit Neopixel LED driver
1719
 // Support for Adafruit Neopixel LED driver
1615
 //#define NEOPIXEL_LED
1720
 //#define NEOPIXEL_LED
1616
 #if ENABLED(NEOPIXEL_LED)
1721
 #if ENABLED(NEOPIXEL_LED)
1617
-  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
1722
+  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
1618
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1723
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1619
-  #define NEOPIXEL_PIXELS 30       // Number of LEDs on strip
1620
-  #define NEOPIXEL_IS_SEQUENTIAL   // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
1621
-  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness 0-255
1724
+  #define NEOPIXEL_PIXELS 30       // Number of LEDs in the strip
1725
+  #define NEOPIXEL_IS_SEQUENTIAL   // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
1726
+  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness (0-255)
1622
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1727
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1623
 #endif
1728
 #endif
1624
 
1729
 
1633
  *  - Change to green once print has finished
1738
  *  - Change to green once print has finished
1634
  *  - Turn off after the print has finished and the user has pushed a button
1739
  *  - Turn off after the print has finished and the user has pushed a button
1635
  */
1740
  */
1636
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED)
1741
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
1637
   #define PRINTER_EVENT_LEDS
1742
   #define PRINTER_EVENT_LEDS
1638
 #endif
1743
 #endif
1639
 
1744
 
1640
-/*********************************************************************\
1641
-* R/C SERVO support
1642
-* Sponsored by TrinityLabs, Reworked by codexmas
1643
-**********************************************************************/
1745
+/**
1746
+ * R/C SERVO support
1747
+ * Sponsored by TrinityLabs, Reworked by codexmas
1748
+ */
1644
 
1749
 
1645
-// Number of servos
1646
-//
1647
-// If you select a configuration below, this will receive a default value and does not need to be set manually
1648
-// set it manually if you have more servos than extruders and wish to manually control some
1649
-// leaving it undefined or defining as 0 will disable the servo subsystem
1650
-// If unsure, leave commented / disabled
1651
-//
1750
+/**
1751
+ * Number of servos
1752
+ *
1753
+ * For some servo-related options NUM_SERVOS will be set automatically.
1754
+ * Set this manually if there are extra servos needing manual control.
1755
+ * Leave undefined or set to 0 to entirely disable the servo subsystem.
1756
+ */
1652
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1757
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1653
 
1758
 
1654
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1759
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1661
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1766
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1662
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1767
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1663
 
1768
 
1664
-/**
1665
- * Filament Width Sensor
1666
- *
1667
- * Measures the filament width in real-time and adjusts
1668
- * flow rate to compensate for any irregularities.
1669
- *
1670
- * Also allows the measured filament diameter to set the
1671
- * extrusion rate, so the slicer only has to specify the
1672
- * volume.
1673
- *
1674
- * Only a single extruder is supported at this time.
1675
- *
1676
- *  34 RAMPS_14    : Analog input 5 on the AUX2 connector
1677
- *  81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
1678
- * 301 RAMBO       : Analog input 3
1679
- *
1680
- * Note: May require analog pins to be defined for other boards.
1681
- */
1682
-//#define FILAMENT_WIDTH_SENSOR
1683
-
1684
-#define DEFAULT_NOMINAL_FILAMENT_DIA 3.00   // (mm) Diameter of the filament generally used (3.0 or 1.75mm), also used in the slicer. Used to validate sensor reading.
1685
-
1686
-#if ENABLED(FILAMENT_WIDTH_SENSOR)
1687
-  #define FILAMENT_SENSOR_EXTRUDER_NUM 0    // Index of the extruder that has the filament sensor (0,1,2,3)
1688
-  #define MEASUREMENT_DELAY_CM        14    // (cm) The distance from the filament sensor to the melting chamber
1689
-
1690
-  #define MEASURED_UPPER_LIMIT         3.30 // (mm) Upper limit used to validate sensor reading
1691
-  #define MEASURED_LOWER_LIMIT         1.90 // (mm) Lower limit used to validate sensor reading
1692
-  #define MAX_MEASUREMENT_DELAY       20    // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
1693
-
1694
-  #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
1695
-
1696
-  // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
1697
-  //#define FILAMENT_LCD_DISPLAY
1698
-#endif
1699
-
1700
 #endif // CONFIGURATION_H
1769
 #endif // CONFIGURATION_H

+ 268
- 125
Marlin/example_configurations/RigidBot/Configuration_adv.h Переглянути файл

32
  */
32
  */
33
 #ifndef CONFIGURATION_ADV_H
33
 #ifndef CONFIGURATION_ADV_H
34
 #define CONFIGURATION_ADV_H
34
 #define CONFIGURATION_ADV_H
35
-#define CONFIGURATION_ADV_H_VERSION 010100
35
+#define CONFIGURATION_ADV_H_VERSION 010107
36
 
36
 
37
 // @section temperature
37
 // @section temperature
38
 
38
 
48
 #endif
48
 #endif
49
 
49
 
50
 /**
50
 /**
51
- * Thermal Protection protects your printer from damage and fire if a
52
- * thermistor falls out or temperature sensors fail in any way.
51
+ * Thermal Protection provides additional protection to your printer from damage
52
+ * and fire. Marlin always includes safe min and max temperature ranges which
53
+ * protect against a broken or disconnected thermistor wire.
53
  *
54
  *
54
- * The issue: If a thermistor falls out or a temperature sensor fails,
55
- * Marlin can no longer sense the actual temperature. Since a disconnected
56
- * thermistor reads as a low temperature, the firmware will keep the heater on.
55
+ * The issue: If a thermistor falls out, it will report the much lower
56
+ * temperature of the air in the room, and the the firmware will keep
57
+ * the heater on.
57
  *
58
  *
58
  * The solution: Once the temperature reaches the target, start observing.
59
  * The solution: Once the temperature reaches the target, start observing.
59
- * If the temperature stays too far below the target (hysteresis) for too long (period),
60
- * the firmware will halt the machine as a safety precaution.
60
+ * If the temperature stays too far below the target (hysteresis) for too
61
+ * long (period), the firmware will halt the machine as a safety precaution.
61
  *
62
  *
62
- * If you get false positives for "Thermal Runaway" increase THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
63
+ * If you get false positives for "Thermal Runaway", increase
64
+ * THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
63
  */
65
  */
64
 #if ENABLED(THERMAL_PROTECTION_HOTENDS)
66
 #if ENABLED(THERMAL_PROTECTION_HOTENDS)
65
   #define THERMAL_PROTECTION_PERIOD 40        // Seconds
67
   #define THERMAL_PROTECTION_PERIOD 40        // Seconds
66
   #define THERMAL_PROTECTION_HYSTERESIS 4     // Degrees Celsius
68
   #define THERMAL_PROTECTION_HYSTERESIS 4     // Degrees Celsius
67
 
69
 
68
   /**
70
   /**
69
-   * Whenever an M104 or M109 increases the target temperature the firmware will wait for the
70
-   * WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
71
-   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
72
-   * but only if the current temperature is far enough below the target for a reliable test.
71
+   * Whenever an M104, M109, or M303 increases the target temperature, the
72
+   * firmware will wait for the WATCH_TEMP_PERIOD to expire. If the temperature
73
+   * hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted and
74
+   * requires a hard reset. This test restarts with any M104/M109/M303, but only
75
+   * if the current temperature is far enough below the target for a reliable
76
+   * test.
73
    *
77
    *
74
-   * If you get false positives for "Heating failed" increase WATCH_TEMP_PERIOD and/or decrease WATCH_TEMP_INCREASE
75
-   * WATCH_TEMP_INCREASE should not be below 2.
78
+   * If you get false positives for "Heating failed", increase WATCH_TEMP_PERIOD
79
+   * and/or decrease WATCH_TEMP_INCREASE. WATCH_TEMP_INCREASE should not be set
80
+   * below 2.
76
    */
81
    */
77
   #define WATCH_TEMP_PERIOD 20                // Seconds
82
   #define WATCH_TEMP_PERIOD 20                // Seconds
78
   #define WATCH_TEMP_INCREASE 2               // Degrees Celsius
83
   #define WATCH_TEMP_INCREASE 2               // Degrees Celsius
86
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
91
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
87
 
92
 
88
   /**
93
   /**
89
-   * Whenever an M140 or M190 increases the target temperature the firmware will wait for the
90
-   * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE
91
-   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190,
92
-   * but only if the current temperature is far enough below the target for a reliable test.
93
-   *
94
-   * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease
95
-   * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.)
94
+   * As described above, except for the bed (M140/M190/M303).
96
    */
95
    */
97
   #define WATCH_BED_TEMP_PERIOD 60                // Seconds
96
   #define WATCH_BED_TEMP_PERIOD 60                // Seconds
98
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
97
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
123
   #define AUTOTEMP_OLDWEIGHT 0.98
122
   #define AUTOTEMP_OLDWEIGHT 0.98
124
 #endif
123
 #endif
125
 
124
 
125
+// Show extra position information in M114
126
+//#define M114_DETAIL
127
+
126
 // Show Temperature ADC value
128
 // Show Temperature ADC value
127
 // Enable for M105 to include ADC values read from temperature sensors.
129
 // Enable for M105 to include ADC values read from temperature sensors.
128
 //#define SHOW_TEMP_ADC_VALUES
130
 //#define SHOW_TEMP_ADC_VALUES
257
 
259
 
258
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
260
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
259
 
261
 
260
-// Dual X Steppers
261
-// Uncomment this option to drive two X axis motors.
262
-// The next unused E driver will be assigned to the second X stepper.
262
+/**
263
+ * Dual Steppers / Dual Endstops
264
+ *
265
+ * This section will allow you to use extra E drivers to drive a second motor for X, Y, or Z axes.
266
+ *
267
+ * For example, set X_DUAL_STEPPER_DRIVERS setting to use a second motor. If the motors need to
268
+ * spin in opposite directions set INVERT_X2_VS_X_DIR. If the second motor needs its own endstop
269
+ * set X_DUAL_ENDSTOPS. This can adjust for "racking." Use X2_USE_ENDSTOP to set the endstop plug
270
+ * that should be used for the second endstop. Extra endstops will appear in the output of 'M119'.
271
+ *
272
+ * Use X_DUAL_ENDSTOP_ADJUSTMENT to adjust for mechanical imperfection. After homing both motors
273
+ * this offset is applied to the X2 motor. To find the offset home the X axis, and measure the error
274
+ * in X2. Dual endstop offsets can be set at runtime with 'M666 X<offset> Y<offset> Z<offset>'.
275
+ */
276
+
263
 //#define X_DUAL_STEPPER_DRIVERS
277
 //#define X_DUAL_STEPPER_DRIVERS
264
 #if ENABLED(X_DUAL_STEPPER_DRIVERS)
278
 #if ENABLED(X_DUAL_STEPPER_DRIVERS)
265
-  // Set true if the two X motors need to rotate in opposite directions
266
-  #define INVERT_X2_VS_X_DIR true
279
+  #define INVERT_X2_VS_X_DIR true   // Set 'true' if X motors should rotate in opposite directions
280
+  //#define X_DUAL_ENDSTOPS
281
+  #if ENABLED(X_DUAL_ENDSTOPS)
282
+    #define X2_USE_ENDSTOP _XMAX_
283
+    #define X_DUAL_ENDSTOPS_ADJUSTMENT  0
284
+  #endif
267
 #endif
285
 #endif
268
 
286
 
269
-// Dual Y Steppers
270
-// Uncomment this option to drive two Y axis motors.
271
-// The next unused E driver will be assigned to the second Y stepper.
272
 //#define Y_DUAL_STEPPER_DRIVERS
287
 //#define Y_DUAL_STEPPER_DRIVERS
273
 #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
288
 #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
274
-  // Set true if the two Y motors need to rotate in opposite directions
275
-  #define INVERT_Y2_VS_Y_DIR true
289
+  #define INVERT_Y2_VS_Y_DIR true   // Set 'true' if Y motors should rotate in opposite directions
290
+  //#define Y_DUAL_ENDSTOPS
291
+  #if ENABLED(Y_DUAL_ENDSTOPS)
292
+    #define Y2_USE_ENDSTOP _YMAX_
293
+    #define Y_DUAL_ENDSTOPS_ADJUSTMENT  0
294
+  #endif
276
 #endif
295
 #endif
277
 
296
 
278
-// A single Z stepper driver is usually used to drive 2 stepper motors.
279
-// Uncomment this option to use a separate stepper driver for each Z axis motor.
280
-// The next unused E driver will be assigned to the second Z stepper.
281
 //#define Z_DUAL_STEPPER_DRIVERS
297
 //#define Z_DUAL_STEPPER_DRIVERS
282
-
283
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
298
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
284
-
285
-  // Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper.
286
-  // That way the machine is capable to align the bed during home, since both Z steppers are homed.
287
-  // There is also an implementation of M666 (software endstops adjustment) to this feature.
288
-  // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed.
289
-  // One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2.
290
-  // If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive.
291
-  // Play a little bit with small adjustments (0.5mm) and check the behaviour.
292
-  // The M119 (endstops report) will start reporting the Z2 Endstop as well.
293
-
294
   //#define Z_DUAL_ENDSTOPS
299
   //#define Z_DUAL_ENDSTOPS
295
-
296
   #if ENABLED(Z_DUAL_ENDSTOPS)
300
   #if ENABLED(Z_DUAL_ENDSTOPS)
297
     #define Z2_USE_ENDSTOP _XMAX_
301
     #define Z2_USE_ENDSTOP _XMAX_
298
-    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0  // Use M666 to determine/test this value
302
+    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0
299
   #endif
303
   #endif
300
-
301
-#endif // Z_DUAL_STEPPER_DRIVERS
304
+#endif
302
 
305
 
303
 // Enable this for dual x-carriage printers.
306
 // Enable this for dual x-carriage printers.
304
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
307
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
345
 
348
 
346
 // @section homing
349
 // @section homing
347
 
350
 
348
-//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
351
+// Homing hits each endstop, retracts by these distances, then does a slower bump.
349
 #define X_HOME_BUMP_MM 5
352
 #define X_HOME_BUMP_MM 5
350
 #define Y_HOME_BUMP_MM 5
353
 #define Y_HOME_BUMP_MM 5
351
 #define Z_HOME_BUMP_MM 2
354
 #define Z_HOME_BUMP_MM 2
352
-#define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
353
-//#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
355
+#define HOMING_BUMP_DIVISOR { 2, 2, 4 }  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
356
+//#define QUICK_HOME                     // If homing includes X and Y, do a diagonal move initially
354
 
357
 
355
 // When G28 is called, this option will make Y home before X
358
 // When G28 is called, this option will make Y home before X
356
 //#define HOME_Y_BEFORE_X
359
 //#define HOME_Y_BEFORE_X
434
 //#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 }   // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
437
 //#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 }   // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
435
 //#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 }    // Default drive percent - X, Y, Z, E axis
438
 //#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 }    // Default drive percent - X, Y, Z, E axis
436
 
439
 
437
-// Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
440
+// Use an I2C based DIGIPOT (e.g., Azteeg X3 Pro)
438
 //#define DIGIPOT_I2C
441
 //#define DIGIPOT_I2C
442
+#if ENABLED(DIGIPOT_I2C) && !defined(DIGIPOT_I2C_ADDRESS_A)
443
+  /**
444
+   * Common slave addresses:
445
+   *
446
+   *                    A   (A shifted)   B   (B shifted)  IC
447
+   * Smoothie          0x2C (0x58)       0x2D (0x5A)       MCP4451
448
+   * AZTEEG_X3_PRO     0x2C (0x58)       0x2E (0x5C)       MCP4451
449
+   * MIGHTYBOARD_REVE  0x2F (0x5E)                         MCP4018
450
+   */
451
+  #define DIGIPOT_I2C_ADDRESS_A 0x2C  // unshifted slave address for first DIGIPOT
452
+  #define DIGIPOT_I2C_ADDRESS_B 0x2D  // unshifted slave address for second DIGIPOT
453
+#endif
454
+
439
 //#define DIGIPOT_MCP4018          // Requires library from https://github.com/stawel/SlowSoftI2CMaster
455
 //#define DIGIPOT_MCP4018          // Requires library from https://github.com/stawel/SlowSoftI2CMaster
440
 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4     AZTEEG_X3_PRO: 8
456
 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4     AZTEEG_X3_PRO: 8
441
 // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
457
 // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
466
 // The timeout (in ms) to return to the status screen from sub-menus
482
 // The timeout (in ms) to return to the status screen from sub-menus
467
 //#define LCD_TIMEOUT_TO_STATUS 15000
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
468
 
484
 
485
+/**
486
+ * LED Control Menu
487
+ * Enable this feature to add LED Control to the LCD menu
488
+ */
489
+//#define LED_CONTROL_MENU
490
+#if ENABLED(LED_CONTROL_MENU)
491
+  #define LED_COLOR_PRESETS                 // Enable the Preset Color menu option
492
+  #if ENABLED(LED_COLOR_PRESETS)
493
+    #define LED_USER_PRESET_RED        255  // User defined RED value
494
+    #define LED_USER_PRESET_GREEN      128  // User defined GREEN value
495
+    #define LED_USER_PRESET_BLUE         0  // User defined BLUE value
496
+    #define LED_USER_PRESET_WHITE      255  // User defined WHITE value
497
+    #define LED_USER_PRESET_BRIGHTNESS 255  // User defined intensity
498
+    //#define LED_USER_PRESET_STARTUP       // Have the printer display the user preset color on startup
499
+  #endif
500
+#endif // LED_CONTROL_MENU
501
+
469
 #if ENABLED(SDSUPPORT)
502
 #if ENABLED(SDSUPPORT)
470
 
503
 
471
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
504
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
475
   // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
508
   // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
476
   #define SD_DETECT_INVERTED
509
   #define SD_DETECT_INVERTED
477
 
510
 
478
-  #define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
511
+  #define SD_FINISHED_STEPPERRELEASE true          // Disable steppers when SD Print is finished
479
   #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
512
   #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
480
 
513
 
481
-  #define SDCARD_RATHERRECENTFIRST  //reverse file order of sd card menu display. Its sorted practically after the file system block order.
482
-  // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that.
483
-  // using:
514
+  // Reverse SD sort to show "more recent" files first, according to the card's FAT.
515
+  // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended.
516
+  #define SDCARD_RATHERRECENTFIRST
517
+
518
+  // Add an option in the menu to run all auto#.g files
484
   //#define MENU_ADDAUTOSTART
519
   //#define MENU_ADDAUTOSTART
485
 
520
 
486
   /**
521
   /**
517
     #define SDSORT_USES_STACK  false  // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
552
     #define SDSORT_USES_STACK  false  // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
518
     #define SDSORT_CACHE_NAMES false  // Keep sorted items in RAM longer for speedy performance. Most expensive option.
553
     #define SDSORT_CACHE_NAMES false  // Keep sorted items in RAM longer for speedy performance. Most expensive option.
519
     #define SDSORT_DYNAMIC_RAM false  // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
554
     #define SDSORT_DYNAMIC_RAM false  // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
555
+    #define SDSORT_CACHE_VFATS 2      // Maximum number of 13-byte VFAT entries to use for sorting.
556
+                                      // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM.
520
   #endif
557
   #endif
521
 
558
 
522
   // Show a progress bar on HD44780 LCDs for SD printing
559
   // Show a progress bar on HD44780 LCDs for SD printing
535
     //#define LCD_PROGRESS_BAR_TEST
572
     //#define LCD_PROGRESS_BAR_TEST
536
   #endif
573
   #endif
537
 
574
 
575
+  // Add an 'M73' G-code to set the current percentage
576
+  //#define LCD_SET_PROGRESS_MANUALLY
577
+
538
   // This allows hosts to request long names for files and folders with M33
578
   // This allows hosts to request long names for files and folders with M33
539
   //#define LONG_FILENAME_HOST_SUPPORT
579
   //#define LONG_FILENAME_HOST_SUPPORT
540
 
580
 
541
-  // This option allows you to abort SD printing when any endstop is triggered.
542
-  // This feature must be enabled with "M540 S1" or from the LCD menu.
543
-  // To have any effect, endstops must be enabled during SD printing.
581
+  // Enable this option to scroll long filenames in the SD card menu
582
+  //#define SCROLL_LONG_FILENAMES
583
+
584
+  /**
585
+   * This option allows you to abort SD printing when any endstop is triggered.
586
+   * This feature must be enabled with "M540 S1" or from the LCD menu.
587
+   * To have any effect, endstops must be enabled during SD printing.
588
+   */
544
   //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
589
   //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
545
 
590
 
591
+  /**
592
+   * This option makes it easier to print the same SD Card file again.
593
+   * On print completion the LCD Menu will open with the file selected.
594
+   * You can just click to start the print, or navigate elsewhere.
595
+   */
596
+  //#define SD_REPRINT_LAST_SELECTED_FILE
597
+
546
 #endif // SDSUPPORT
598
 #endif // SDSUPPORT
547
 
599
 
548
 /**
600
 /**
575
   // Enable this option and reduce the value to optimize screen updates.
627
   // Enable this option and reduce the value to optimize screen updates.
576
   // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
628
   // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
577
   //#define DOGM_SPI_DELAY_US 5
629
   //#define DOGM_SPI_DELAY_US 5
630
+
631
+  // Swap the CW/CCW indicators in the graphics overlay
632
+  //#define OVERLAY_GFX_REVERSE
633
+
578
 #endif // DOGLCD
634
 #endif // DOGLCD
579
 
635
 
580
 // @section safety
636
 // @section safety
603
 #if ENABLED(BABYSTEPPING)
659
 #if ENABLED(BABYSTEPPING)
604
   //#define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
660
   //#define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
605
   #define BABYSTEP_INVERT_Z false    // Change if Z babysteps should go the other way
661
   #define BABYSTEP_INVERT_Z false    // Change if Z babysteps should go the other way
606
-  #define BABYSTEP_MULTIPLICATOR 100 // Babysteps are very small. Increase for faster motion.
662
+  #define BABYSTEP_MULTIPLICATOR 1   // Babysteps are very small. Increase for faster motion.
607
   //#define BABYSTEP_ZPROBE_OFFSET   // Enable to combine M851 and Babystepping
663
   //#define BABYSTEP_ZPROBE_OFFSET   // Enable to combine M851 and Babystepping
608
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
664
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
609
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
665
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
610
                                         // Note: Extra time may be added to mitigate controller latency.
666
                                         // Note: Extra time may be added to mitigate controller latency.
611
   //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
667
   //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
612
-  //#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators
613
 #endif
668
 #endif
614
 
669
 
615
 // @section extruder
670
 // @section extruder
656
 
711
 
657
 // @section leveling
712
 // @section leveling
658
 
713
 
659
-// Default mesh area is an area with an inset margin on the print area.
660
-// Below are the macros that are used to define the borders for the mesh area,
661
-// made available here for specialized needs, ie dual extruder setup.
662
-#if ENABLED(MESH_BED_LEVELING)
663
-  #define MESH_MIN_X MESH_INSET
664
-  #define MESH_MAX_X (X_BED_SIZE - (MESH_INSET))
665
-  #define MESH_MIN_Y MESH_INSET
666
-  #define MESH_MAX_Y (Y_BED_SIZE - (MESH_INSET))
667
-#elif ENABLED(AUTO_BED_LEVELING_UBL)
668
-  #define UBL_MESH_MIN_X UBL_MESH_INSET
669
-  #define UBL_MESH_MAX_X (X_BED_SIZE - (UBL_MESH_INSET))
670
-  #define UBL_MESH_MIN_Y UBL_MESH_INSET
671
-  #define UBL_MESH_MAX_Y (Y_BED_SIZE - (UBL_MESH_INSET))
672
-
673
-  // If this is defined, the currently active mesh will be saved in the
674
-  // current slot on M500.
675
-  #define UBL_SAVE_ACTIVE_ON_M500
714
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
715
+  #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
716
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
717
+  #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
718
+#endif
719
+
720
+#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL)
721
+  // Override the mesh area if the automatic (max) area is too large
722
+  //#define MESH_MIN_X MESH_INSET
723
+  //#define MESH_MIN_Y MESH_INSET
724
+  //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET)
725
+  //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
676
 #endif
726
 #endif
677
 
727
 
678
 // @section extras
728
 // @section extras
692
 //#define BEZIER_CURVE_SUPPORT
742
 //#define BEZIER_CURVE_SUPPORT
693
 
743
 
694
 // G38.2 and G38.3 Probe Target
744
 // G38.2 and G38.3 Probe Target
695
-// Enable PROBE_DOUBLE_TOUCH if you want G38 to double touch
745
+// Set MULTIPLE_PROBING if you want G38 to double touch
696
 //#define G38_PROBE_TARGET
746
 //#define G38_PROBE_TARGET
697
 #if ENABLED(G38_PROBE_TARGET)
747
 #if ENABLED(G38_PROBE_TARGET)
698
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
748
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
717
 // @section hidden
767
 // @section hidden
718
 
768
 
719
 // The number of linear motions that can be in the plan at any give time.
769
 // The number of linear motions that can be in the plan at any give time.
720
-// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2, i.g. 8,16,32 because shifts and ors are used to do the ring-buffering.
770
+// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2 (e.g. 8, 16, 32) because shifts and ors are used to do the ring-buffering.
721
 #if ENABLED(SDSUPPORT)
771
 #if ENABLED(SDSUPPORT)
722
   #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
772
   #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
723
 #else
773
 #else
808
 #endif
858
 #endif
809
 
859
 
810
 /**
860
 /**
861
+ * Extra Fan Speed
862
+ * Adds a secondary fan speed for each print-cooling fan.
863
+ *   'M106 P<fan> T3-255' : Set a secondary speed for <fan>
864
+ *   'M106 P<fan> T2'     : Use the set secondary speed
865
+ *   'M106 P<fan> T1'     : Restore the previous fan speed
866
+ */
867
+//#define EXTRA_FAN_SPEED
868
+
869
+/**
811
  * Advanced Pause
870
  * Advanced Pause
812
  * Experimental feature for filament change support and for parking the nozzle when paused.
871
  * Experimental feature for filament change support and for parking the nozzle when paused.
813
  * Adds the GCode M600 for initiating filament change.
872
  * Adds the GCode M600 for initiating filament change.
917
 
976
 
918
 #endif
977
 #endif
919
 
978
 
920
-// @section TMC2130
979
+// @section TMC2130, TMC2208
921
 
980
 
922
 /**
981
 /**
923
  * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
982
  * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
931
  */
990
  */
932
 //#define HAVE_TMC2130
991
 //#define HAVE_TMC2130
933
 
992
 
934
-#if ENABLED(HAVE_TMC2130)
993
+/**
994
+ * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
995
+ * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin.
996
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN
997
+ * to #_SERIAL_TX_PIN with a 1K resistor.
998
+ * The drivers can also be used with hardware serial.
999
+ *
1000
+ * You'll also need the TMC2208Stepper Arduino library
1001
+ * (https://github.com/teemuatlut/TMC2208Stepper).
1002
+ */
1003
+//#define HAVE_TMC2208
1004
+
1005
+#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
935
 
1006
 
936
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
1007
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
937
   //#define X_IS_TMC2130
1008
   //#define X_IS_TMC2130
946
   //#define E3_IS_TMC2130
1017
   //#define E3_IS_TMC2130
947
   //#define E4_IS_TMC2130
1018
   //#define E4_IS_TMC2130
948
 
1019
 
1020
+  //#define X_IS_TMC2208
1021
+  //#define X2_IS_TMC2208
1022
+  //#define Y_IS_TMC2208
1023
+  //#define Y2_IS_TMC2208
1024
+  //#define Z_IS_TMC2208
1025
+  //#define Z2_IS_TMC2208
1026
+  //#define E0_IS_TMC2208
1027
+  //#define E1_IS_TMC2208
1028
+  //#define E2_IS_TMC2208
1029
+  //#define E3_IS_TMC2208
1030
+  //#define E4_IS_TMC2208
1031
+
949
   /**
1032
   /**
950
    * Stepper driver settings
1033
    * Stepper driver settings
951
    */
1034
    */
952
 
1035
 
953
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1036
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
954
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1037
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
955
-  #define INTERPOLATE          1  // Interpolate X/Y/Z_MICROSTEPS to 256
1038
+  #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
956
 
1039
 
957
-  #define X_CURRENT         1000  // rms current in mA. Multiply by 1.41 for peak current.
1040
+  #define X_CURRENT          800  // rms current in mA. Multiply by 1.41 for peak current.
958
   #define X_MICROSTEPS        16  // 0..256
1041
   #define X_MICROSTEPS        16  // 0..256
959
 
1042
 
960
-  #define Y_CURRENT         1000
1043
+  #define Y_CURRENT          800
961
   #define Y_MICROSTEPS        16
1044
   #define Y_MICROSTEPS        16
962
 
1045
 
963
-  #define Z_CURRENT         1000
1046
+  #define Z_CURRENT          800
964
   #define Z_MICROSTEPS        16
1047
   #define Z_MICROSTEPS        16
965
 
1048
 
966
-  //#define X2_CURRENT      1000
967
-  //#define X2_MICROSTEPS     16
1049
+  #define X2_CURRENT         800
1050
+  #define X2_MICROSTEPS       16
968
 
1051
 
969
-  //#define Y2_CURRENT      1000
970
-  //#define Y2_MICROSTEPS     16
1052
+  #define Y2_CURRENT         800
1053
+  #define Y2_MICROSTEPS       16
971
 
1054
 
972
-  //#define Z2_CURRENT      1000
973
-  //#define Z2_MICROSTEPS     16
1055
+  #define Z2_CURRENT         800
1056
+  #define Z2_MICROSTEPS       16
974
 
1057
 
975
-  //#define E0_CURRENT      1000
976
-  //#define E0_MICROSTEPS     16
1058
+  #define E0_CURRENT         800
1059
+  #define E0_MICROSTEPS       16
977
 
1060
 
978
-  //#define E1_CURRENT      1000
979
-  //#define E1_MICROSTEPS     16
1061
+  #define E1_CURRENT         800
1062
+  #define E1_MICROSTEPS       16
980
 
1063
 
981
-  //#define E2_CURRENT      1000
982
-  //#define E2_MICROSTEPS     16
1064
+  #define E2_CURRENT         800
1065
+  #define E2_MICROSTEPS       16
983
 
1066
 
984
-  //#define E3_CURRENT      1000
985
-  //#define E3_MICROSTEPS     16
1067
+  #define E3_CURRENT         800
1068
+  #define E3_MICROSTEPS       16
986
 
1069
 
987
-  //#define E4_CURRENT      1000
988
-  //#define E4_MICROSTEPS     16
1070
+  #define E4_CURRENT         800
1071
+  #define E4_MICROSTEPS       16
989
 
1072
 
990
   /**
1073
   /**
991
    * Use Trinamic's ultra quiet stepping mode.
1074
    * Use Trinamic's ultra quiet stepping mode.
994
   #define STEALTHCHOP
1077
   #define STEALTHCHOP
995
 
1078
 
996
   /**
1079
   /**
997
-   * Let Marlin automatically control stepper current.
998
-   * This is still an experimental feature.
999
-   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
1000
-   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
1001
-   * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX
1080
+   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1081
+   * like overtemperature and short to ground. TMC2208 requires hardware serial.
1082
+   * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1083
+   * Other detected conditions can be used to stop the current print.
1002
    * Relevant g-codes:
1084
    * Relevant g-codes:
1003
    * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
1085
    * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
1004
-   * M906 S1 - Start adjusting current
1005
-   * M906 S0 - Stop adjusting current
1006
    * M911 - Report stepper driver overtemperature pre-warn condition.
1086
    * M911 - Report stepper driver overtemperature pre-warn condition.
1007
    * M912 - Clear stepper driver overtemperature pre-warn condition flag.
1087
    * M912 - Clear stepper driver overtemperature pre-warn condition flag.
1088
+   * M122 S0/1 - Report driver parameters (Requires TMC_DEBUG)
1008
    */
1089
    */
1009
-  //#define AUTOMATIC_CURRENT_CONTROL
1090
+  //#define MONITOR_DRIVER_STATUS
1010
 
1091
 
1011
-  #if ENABLED(AUTOMATIC_CURRENT_CONTROL)
1012
-    #define CURRENT_STEP          50  // [mA]
1013
-    #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
1092
+  #if ENABLED(MONITOR_DRIVER_STATUS)
1093
+    #define CURRENT_STEP_DOWN     50  // [mA]
1014
     #define REPORT_CURRENT_CHANGE
1094
     #define REPORT_CURRENT_CHANGE
1095
+    #define STOP_ON_ERROR
1015
   #endif
1096
   #endif
1016
 
1097
 
1017
   /**
1098
   /**
1026
   #define X2_HYBRID_THRESHOLD    100
1107
   #define X2_HYBRID_THRESHOLD    100
1027
   #define Y_HYBRID_THRESHOLD     100
1108
   #define Y_HYBRID_THRESHOLD     100
1028
   #define Y2_HYBRID_THRESHOLD    100
1109
   #define Y2_HYBRID_THRESHOLD    100
1029
-  #define Z_HYBRID_THRESHOLD       4
1030
-  #define Z2_HYBRID_THRESHOLD      4
1110
+  #define Z_HYBRID_THRESHOLD       3
1111
+  #define Z2_HYBRID_THRESHOLD      3
1031
   #define E0_HYBRID_THRESHOLD     30
1112
   #define E0_HYBRID_THRESHOLD     30
1032
   #define E1_HYBRID_THRESHOLD     30
1113
   #define E1_HYBRID_THRESHOLD     30
1033
   #define E2_HYBRID_THRESHOLD     30
1114
   #define E2_HYBRID_THRESHOLD     30
1037
   /**
1118
   /**
1038
    * Use stallGuard2 to sense an obstacle and trigger an endstop.
1119
    * Use stallGuard2 to sense an obstacle and trigger an endstop.
1039
    * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
1120
    * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
1040
-   * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal.
1121
+   * X and Y homing will always be done in spreadCycle mode.
1041
    *
1122
    *
1042
    * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
1123
    * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
1043
    * Higher values make the system LESS sensitive.
1124
    * Higher values make the system LESS sensitive.
1046
    * It is advised to set X/Y_HOME_BUMP_MM to 0.
1127
    * It is advised to set X/Y_HOME_BUMP_MM to 0.
1047
    * M914 X/Y to live tune the setting
1128
    * M914 X/Y to live tune the setting
1048
    */
1129
    */
1049
-  //#define SENSORLESS_HOMING
1130
+  //#define SENSORLESS_HOMING // TMC2130 only
1050
 
1131
 
1051
   #if ENABLED(SENSORLESS_HOMING)
1132
   #if ENABLED(SENSORLESS_HOMING)
1052
-    #define X_HOMING_SENSITIVITY  19
1053
-    #define Y_HOMING_SENSITIVITY  19
1133
+    #define X_HOMING_SENSITIVITY  8
1134
+    #define Y_HOMING_SENSITIVITY  8
1054
   #endif
1135
   #endif
1055
 
1136
 
1056
   /**
1137
   /**
1138
+   * Enable M122 debugging command for TMC stepper drivers.
1139
+   * M122 S0/1 will enable continous reporting.
1140
+   */
1141
+  //#define TMC_DEBUG
1142
+
1143
+  /**
1057
    * You can set your own advanced settings by filling in predefined functions.
1144
    * You can set your own advanced settings by filling in predefined functions.
1058
    * A list of available functions can be found on the library github page
1145
    * A list of available functions can be found on the library github page
1059
    * https://github.com/teemuatlut/TMC2130Stepper
1146
    * https://github.com/teemuatlut/TMC2130Stepper
1147
+   * https://github.com/teemuatlut/TMC2208Stepper
1060
    *
1148
    *
1061
    * Example:
1149
    * Example:
1062
-   * #define TMC2130_ADV() { \
1150
+   * #define TMC_ADV() { \
1063
    *   stepperX.diag0_temp_prewarn(1); \
1151
    *   stepperX.diag0_temp_prewarn(1); \
1064
-   *   stepperX.interpolate(0); \
1152
+   *   stepperY.interpolate(0); \
1065
    * }
1153
    * }
1066
    */
1154
    */
1067
-  #define  TMC2130_ADV() {  }
1155
+  #define  TMC_ADV() {  }
1068
 
1156
 
1069
-#endif // HAVE_TMC2130
1157
+#endif // TMC2130 || TMC2208
1070
 
1158
 
1071
 // @section L6470
1159
 // @section L6470
1072
 
1160
 
1231
 #endif
1319
 #endif
1232
 
1320
 
1233
 /**
1321
 /**
1322
+ * Filament Width Sensor
1323
+ *
1324
+ * Measures the filament width in real-time and adjusts
1325
+ * flow rate to compensate for any irregularities.
1326
+ *
1327
+ * Also allows the measured filament diameter to set the
1328
+ * extrusion rate, so the slicer only has to specify the
1329
+ * volume.
1330
+ *
1331
+ * Only a single extruder is supported at this time.
1332
+ *
1333
+ *  34 RAMPS_14    : Analog input 5 on the AUX2 connector
1334
+ *  81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
1335
+ * 301 RAMBO       : Analog input 3
1336
+ *
1337
+ * Note: May require analog pins to be defined for other boards.
1338
+ */
1339
+//#define FILAMENT_WIDTH_SENSOR
1340
+
1341
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
1342
+  #define FILAMENT_SENSOR_EXTRUDER_NUM 0    // Index of the extruder that has the filament sensor. :[0,1,2,3,4]
1343
+  #define MEASUREMENT_DELAY_CM        14    // (cm) The distance from the filament sensor to the melting chamber
1344
+
1345
+  #define MEASURED_UPPER_LIMIT         3.30 // (mm) Upper limit used to validate sensor reading
1346
+  #define MEASURED_LOWER_LIMIT         1.90 // (mm) Lower limit used to validate sensor reading
1347
+  #define MAX_MEASUREMENT_DELAY       20    // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
1348
+
1349
+  #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
1350
+
1351
+  // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
1352
+  //#define FILAMENT_LCD_DISPLAY
1353
+#endif
1354
+
1355
+/**
1356
+ * CNC Coordinate Systems
1357
+ *
1358
+ * Enables G53 and G54-G59.3 commands to select coordinate systems
1359
+ * and G92.1 to reset the workspace to native machine space.
1360
+ */
1361
+//#define CNC_COORDINATE_SYSTEMS
1362
+
1363
+/**
1234
  * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
1364
  * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
1235
  */
1365
  */
1236
 //#define PINS_DEBUGGING
1366
 //#define PINS_DEBUGGING
1421
                                          // tweaks made to the configuration are affecting the printer in real-time.
1551
                                          // tweaks made to the configuration are affecting the printer in real-time.
1422
 #endif
1552
 #endif
1423
 
1553
 
1554
+/**
1555
+ * NanoDLP Sync support
1556
+ *
1557
+ * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
1558
+ * string to enable synchronization with DLP projector exposure. This change will allow to use
1559
+ * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
1560
+ */
1561
+//#define NANODLP_Z_SYNC
1562
+#if ENABLED(NANODLP_Z_SYNC)
1563
+  //#define NANODLP_ALL_AXIS  // Enables "Z_move_comp" output on any axis move.
1564
+                              // Default behaviour is limited to Z axis only.
1565
+#endif
1566
+
1424
 #endif // CONFIGURATION_ADV_H
1567
 #endif // CONFIGURATION_ADV_H

+ 160
- 91
Marlin/example_configurations/SCARA/Configuration.h Переглянути файл

37
  */
37
  */
38
 #ifndef CONFIGURATION_H
38
 #ifndef CONFIGURATION_H
39
 #define CONFIGURATION_H
39
 #define CONFIGURATION_H
40
-#define CONFIGURATION_H_VERSION 010100
40
+#define CONFIGURATION_H_VERSION 010107
41
 
41
 
42
 //===========================================================================
42
 //===========================================================================
43
 //============================= Getting Started =============================
43
 //============================= Getting Started =============================
166
 // :[1, 2, 3, 4, 5]
166
 // :[1, 2, 3, 4, 5]
167
 #define EXTRUDERS 1
167
 #define EXTRUDERS 1
168
 
168
 
169
+// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
170
+#define DEFAULT_NOMINAL_FILAMENT_DIA 3.0
171
+
169
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
172
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
170
 //#define SINGLENOZZLE
173
 //#define SINGLENOZZLE
171
 
174
 
366
 
369
 
367
 // Comment the following line to disable PID and enable bang-bang.
370
 // Comment the following line to disable PID and enable bang-bang.
368
 #define PIDTEMP
371
 #define PIDTEMP
369
-#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
370
-#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
372
+#define BANG_MAX 255     // Limits current to nozzle while in bang-bang mode; 255=full current
373
+#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
374
+#define PID_K1 0.95      // Smoothing factor within the PID
371
 #if ENABLED(PIDTEMP)
375
 #if ENABLED(PIDTEMP)
372
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
376
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
373
   //#define PID_DEBUG // Sends debug data to the serial port.
377
   //#define PID_DEBUG // Sends debug data to the serial port.
377
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
381
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
378
   #define PID_FUNCTIONAL_RANGE 20 // If the temperature difference between the target temperature and the actual temperature
382
   #define PID_FUNCTIONAL_RANGE 20 // If the temperature difference between the target temperature and the actual temperature
379
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
383
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
380
-  #define K1 0.95 //smoothing factor within the PID
381
 
384
 
382
   // Merlin Hotend: From Autotune
385
   // Merlin Hotend: From Autotune
383
   #define  DEFAULT_Kp 24.5
386
   #define  DEFAULT_Kp 24.5
440
 //===========================================================================
443
 //===========================================================================
441
 
444
 
442
 /**
445
 /**
443
- * Thermal Protection protects your printer from damage and fire if a
444
- * thermistor falls out or temperature sensors fail in any way.
446
+ * Thermal Protection provides additional protection to your printer from damage
447
+ * and fire. Marlin always includes safe min and max temperature ranges which
448
+ * protect against a broken or disconnected thermistor wire.
445
  *
449
  *
446
- * The issue: If a thermistor falls out or a temperature sensor fails,
447
- * Marlin can no longer sense the actual temperature. Since a disconnected
448
- * thermistor reads as a low temperature, the firmware will keep the heater on.
450
+ * The issue: If a thermistor falls out, it will report the much lower
451
+ * temperature of the air in the room, and the the firmware will keep
452
+ * the heater on.
449
  *
453
  *
450
  * If you get "Thermal Runaway" or "Heating failed" errors the
454
  * If you get "Thermal Runaway" or "Heating failed" errors the
451
  * details can be tuned in Configuration_adv.h
455
  * details can be tuned in Configuration_adv.h
585
 // @section probes
589
 // @section probes
586
 
590
 
587
 //
591
 //
588
-// See http://marlinfw.org/configuration/probes.html
592
+// See http://marlinfw.org/docs/configuration/probes.html
589
 //
593
 //
590
 
594
 
591
 /**
595
 /**
698
 // X and Y axis travel speed (mm/m) between probes
702
 // X and Y axis travel speed (mm/m) between probes
699
 #define XY_PROBE_SPEED 8000
703
 #define XY_PROBE_SPEED 8000
700
 
704
 
701
-// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH)
705
+// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
702
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
706
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
703
 
707
 
704
 // Speed for the "accurate" probe of each point
708
 // Speed for the "accurate" probe of each point
705
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
709
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
706
 
710
 
707
-// Use double touch for probing
708
-//#define PROBE_DOUBLE_TOUCH
711
+// The number of probes to perform at each point.
712
+//   Set to 2 for a fast/slow probe, using the second probe result.
713
+//   Set to 3 or more for slow probes, averaging the results.
714
+//#define MULTIPLE_PROBING 2
709
 
715
 
710
 /**
716
 /**
711
  * Z probes require clearance when deploying, stowing, and moving between
717
  * Z probes require clearance when deploying, stowing, and moving between
797
 #define Y_MAX_POS Y_BED_SIZE
803
 #define Y_MAX_POS Y_BED_SIZE
798
 #define Z_MAX_POS 225
804
 #define Z_MAX_POS 225
799
 
805
 
800
-// If enabled, axes won't move below MIN_POS in response to movement commands.
806
+/**
807
+ * Software Endstops
808
+ *
809
+ * - Prevent moves outside the set machine bounds.
810
+ * - Individual axes can be disabled, if desired.
811
+ * - X and Y only apply to Cartesian robots.
812
+ * - Use 'M211' to set software endstops on/off or report current state
813
+ */
814
+
815
+// Min software endstops curtail movement below minimum coordinate bounds
801
 #define MIN_SOFTWARE_ENDSTOPS
816
 #define MIN_SOFTWARE_ENDSTOPS
802
-// If enabled, axes won't move above MAX_POS in response to movement commands.
817
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
818
+  #define MIN_SOFTWARE_ENDSTOP_X
819
+  #define MIN_SOFTWARE_ENDSTOP_Y
820
+  #define MIN_SOFTWARE_ENDSTOP_Z
821
+#endif
822
+
823
+// Max software endstops curtail movement above maximum coordinate bounds
803
 #define MAX_SOFTWARE_ENDSTOPS
824
 #define MAX_SOFTWARE_ENDSTOPS
825
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
826
+  #define MAX_SOFTWARE_ENDSTOP_X
827
+  #define MAX_SOFTWARE_ENDSTOP_Y
828
+  #define MAX_SOFTWARE_ENDSTOP_Z
829
+#endif
804
 
830
 
805
 /**
831
 /**
806
  * Filament Runout Sensor
832
  * Filament Runout Sensor
820
 //===========================================================================
846
 //===========================================================================
821
 //=============================== Bed Leveling ==============================
847
 //=============================== Bed Leveling ==============================
822
 //===========================================================================
848
 //===========================================================================
823
-// @section bedlevel
849
+// @section calibrate
824
 
850
 
825
 /**
851
 /**
826
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
852
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
846
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
872
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
847
  *   A comprehensive bed leveling system combining the features and benefits
873
  *   A comprehensive bed leveling system combining the features and benefits
848
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
874
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
849
- *   Validation and Mesh Editing systems. Currently, UBL is only checked out
850
- *   for Cartesian Printers. That said, it was primarily designed to correct
851
- *   poor quality Delta Printers. If you feel adventurous and have a Delta,
852
- *   please post an issue if something doesn't work correctly. Initially,
853
- *   you will need to set a reduced bed size so you have a rectangular area
854
- *   to test on.
875
+ *   Validation and Mesh Editing systems.
855
  *
876
  *
856
  * - MESH_BED_LEVELING
877
  * - MESH_BED_LEVELING
857
  *   Probe a grid manually
878
  *   Probe a grid manually
878
   // at which point movement will be level to the machine's XY plane.
899
   // at which point movement will be level to the machine's XY plane.
879
   // The height can be set with M420 Z<height>
900
   // The height can be set with M420 Z<height>
880
   #define ENABLE_LEVELING_FADE_HEIGHT
901
   #define ENABLE_LEVELING_FADE_HEIGHT
902
+
903
+  // For Cartesian machines, instead of dividing moves on mesh boundaries,
904
+  // split up moves into short segments like a Delta. This follows the
905
+  // contours of the bed more closely than edge-to-edge straight moves.
906
+  #define SEGMENT_LEVELED_MOVES
907
+  #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)
908
+
909
+  /**
910
+   * Enable the G26 Mesh Validation Pattern tool.
911
+   */
912
+  //#define G26_MESH_VALIDATION   // Enable G26 mesh validation
913
+  #if ENABLED(G26_MESH_VALIDATION)
914
+    #define MESH_TEST_NOZZLE_SIZE     0.4   // (mm) Diameter of primary nozzle.
915
+    #define MESH_TEST_LAYER_HEIGHT    0.2   // (mm) Default layer height for the G26 Mesh Validation Tool.
916
+    #define MESH_TEST_HOTEND_TEMP   205.0   // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
917
+    #define MESH_TEST_BED_TEMP       60.0   // (°C) Default bed temperature for the G26 Mesh Validation Tool.
918
+  #endif
919
+
881
 #endif
920
 #endif
882
 
921
 
883
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
922
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
933
   //========================= Unified Bed Leveling ============================
972
   //========================= Unified Bed Leveling ============================
934
   //===========================================================================
973
   //===========================================================================
935
 
974
 
936
-  #define UBL_MESH_INSET 1          // Mesh inset margin on print area
975
+  //#define MESH_EDIT_GFX_OVERLAY   // Display a graphics overlay while editing the mesh
976
+
977
+  #define MESH_INSET 1              // Mesh inset margin on print area
937
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
978
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
938
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
979
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
939
 
980
 
944
   #define UBL_PROBE_PT_3_X 180
985
   #define UBL_PROBE_PT_3_X 180
945
   #define UBL_PROBE_PT_3_Y 20
986
   #define UBL_PROBE_PT_3_Y 20
946
 
987
 
947
-  #define UBL_G26_MESH_VALIDATION   // Enable G26 mesh validation
948
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
988
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
989
+  #define UBL_SAVE_ACTIVE_ON_M500   // Save the currently active mesh in the current slot on M500
949
 
990
 
950
 #elif ENABLED(MESH_BED_LEVELING)
991
 #elif ENABLED(MESH_BED_LEVELING)
951
 
992
 
1005
 //#define Z_SAFE_HOMING
1046
 //#define Z_SAFE_HOMING
1006
 
1047
 
1007
 #if ENABLED(Z_SAFE_HOMING)
1048
 #if ENABLED(Z_SAFE_HOMING)
1008
-  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axis (G28).
1009
-  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axis (G28).
1049
+  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axes (G28).
1050
+  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axes (G28).
1010
 #endif
1051
 #endif
1011
 
1052
 
1012
 // Homing speeds (mm/m)
1053
 // Homing speeds (mm/m)
1013
 #define HOMING_FEEDRATE_XY (40*60)
1054
 #define HOMING_FEEDRATE_XY (40*60)
1014
 #define HOMING_FEEDRATE_Z  (10*60)
1055
 #define HOMING_FEEDRATE_Z  (10*60)
1015
 
1056
 
1057
+// @section calibrate
1058
+
1059
+/**
1060
+ * Bed Skew Compensation
1061
+ *
1062
+ * This feature corrects for misalignment in the XYZ axes.
1063
+ *
1064
+ * Take the following steps to get the bed skew in the XY plane:
1065
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1066
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1067
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1068
+ *  4. For XY_SIDE_AD measure the edge A to D
1069
+ *
1070
+ * Marlin automatically computes skew factors from these measurements.
1071
+ * Skew factors may also be computed and set manually:
1072
+ *
1073
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1074
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1075
+ *
1076
+ * If desired, follow the same procedure for XZ and YZ.
1077
+ * Use these diagrams for reference:
1078
+ *
1079
+ *    Y                     Z                     Z
1080
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1081
+ *    |    /       /        |    /       /        |    /       /
1082
+ *    |   /       /         |   /       /         |   /       /
1083
+ *    |  A-------D          |  A-------D          |  A-------D
1084
+ *    +-------------->X     +-------------->X     +-------------->Y
1085
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1086
+ */
1087
+//#define SKEW_CORRECTION
1088
+
1089
+#if ENABLED(SKEW_CORRECTION)
1090
+  // Input all length measurements here:
1091
+  #define XY_DIAG_AC 282.8427124746
1092
+  #define XY_DIAG_BD 282.8427124746
1093
+  #define XY_SIDE_AD 200
1094
+
1095
+  // Or, set the default skew factors directly here
1096
+  // to override the above measurements:
1097
+  #define XY_SKEW_FACTOR 0.0
1098
+
1099
+  //#define SKEW_CORRECTION_FOR_Z
1100
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1101
+    #define XZ_DIAG_AC 282.8427124746
1102
+    #define XZ_DIAG_BD 282.8427124746
1103
+    #define YZ_DIAG_AC 282.8427124746
1104
+    #define YZ_DIAG_BD 282.8427124746
1105
+    #define YZ_SIDE_AD 200
1106
+    #define XZ_SKEW_FACTOR 0.0
1107
+    #define YZ_SKEW_FACTOR 0.0
1108
+  #endif
1109
+
1110
+  // Enable this option for M852 to set skew at runtime
1111
+  //#define SKEW_CORRECTION_GCODE
1112
+#endif
1113
+
1016
 //=============================================================================
1114
 //=============================================================================
1017
 //============================= Additional Features ===========================
1115
 //============================= Additional Features ===========================
1018
 //=============================================================================
1116
 //=============================================================================
1044
 //
1142
 //
1045
 // M100 Free Memory Watcher
1143
 // M100 Free Memory Watcher
1046
 //
1144
 //
1047
-//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
1145
+//#define M100_FREE_MEMORY_WATCHER    // Add M100 (Free Memory Watcher) to debug memory usage
1048
 
1146
 
1049
 //
1147
 //
1050
 // G20/G21 Inch mode support
1148
 // G20/G21 Inch mode support
1189
  *
1287
  *
1190
  * Select the language to display on the LCD. These languages are available:
1288
  * Select the language to display on the LCD. These languages are available:
1191
  *
1289
  *
1192
- *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, gl, hr,
1193
- *    it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1290
+ *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, fr_utf8, gl,
1291
+ *    hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1194
  *    tr, uk, zh_CN, zh_TW, test
1292
  *    tr, uk, zh_CN, zh_TW, test
1195
  *
1293
  *
1196
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1294
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1197
  */
1295
  */
1198
-//#define LCD_LANGUAGE en
1296
+#define LCD_LANGUAGE en
1199
 
1297
 
1200
 /**
1298
 /**
1201
  * LCD Character Set
1299
  * LCD Character Set
1321
 // Note: Test audio output with the G-Code:
1419
 // Note: Test audio output with the G-Code:
1322
 //  M300 S<frequency Hz> P<duration ms>
1420
 //  M300 S<frequency Hz> P<duration ms>
1323
 //
1421
 //
1324
-//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
1325
-//#define LCD_FEEDBACK_FREQUENCY_HZ 1000
1422
+//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
1423
+//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
1326
 
1424
 
1327
 //
1425
 //
1328
 // CONTROLLER TYPE: Standard
1426
 // CONTROLLER TYPE: Standard
1430
 //#define CARTESIO_UI
1528
 //#define CARTESIO_UI
1431
 
1529
 
1432
 //
1530
 //
1433
-// ANET_10 Controller supported displays.
1531
+// ANET and Tronxy Controller supported displays.
1434
 //
1532
 //
1435
-//#define ANET_KEYPAD_LCD         // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1533
+//#define ZONESTAR_LCD            // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1436
                                   // This LCD is known to be susceptible to electrical interference
1534
                                   // This LCD is known to be susceptible to electrical interference
1437
                                   // which scrambles the display.  Pressing any button clears it up.
1535
                                   // which scrambles the display.  Pressing any button clears it up.
1536
+                                  // This is a LCD2004 display with 5 analog buttons.
1537
+
1438
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1538
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1439
                                   // A clone of the RepRapDiscount full graphics display but with
1539
                                   // A clone of the RepRapDiscount full graphics display but with
1440
                                   // different pins/wiring (see pins_ANET_10.h).
1540
                                   // different pins/wiring (see pins_ANET_10.h).
1544
 //
1644
 //
1545
 //#define MKS_12864OLED
1645
 //#define MKS_12864OLED
1546
 
1646
 
1647
+// Silvergate GLCD controller
1648
+// http://github.com/android444/Silvergate
1649
+//
1650
+//#define SILVER_GATE_GLCD_CONTROLLER
1651
+
1547
 //=============================================================================
1652
 //=============================================================================
1548
 //=============================== Extra Features ==============================
1653
 //=============================== Extra Features ==============================
1549
 //=============================================================================
1654
 //=============================================================================
1600
  * Adds the M150 command to set the LED (or LED strip) color.
1705
  * Adds the M150 command to set the LED (or LED strip) color.
1601
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1706
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1602
  * luminance values can be set from 0 to 255.
1707
  * luminance values can be set from 0 to 255.
1603
- * For Neopixel LED overall brightness parameters is also available 
1708
+ * For Neopixel LED an overall brightness parameter is also available.
1604
  *
1709
  *
1605
  * *** CAUTION ***
1710
  * *** CAUTION ***
1606
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1711
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1607
  *  as the Arduino cannot handle the current the LEDs will require.
1712
  *  as the Arduino cannot handle the current the LEDs will require.
1608
  *  Failure to follow this precaution can destroy your Arduino!
1713
  *  Failure to follow this precaution can destroy your Arduino!
1609
- *  The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
1610
- *  cannot handle such current, separate 5V power supply must be used
1714
+ *  NOTE: A separate 5V power supply is required! The Neopixel LED needs
1715
+ *  more current than the Arduino 5V linear regulator can produce.
1611
  * *** CAUTION ***
1716
  * *** CAUTION ***
1612
  *
1717
  *
1613
- * LED type. This options are mutualy exclusive. Uncomment only one.
1718
+ * LED Type. Enable only one of the following two options.
1614
  *
1719
  *
1615
  */
1720
  */
1616
 //#define RGB_LED
1721
 //#define RGB_LED
1626
 // Support for Adafruit Neopixel LED driver
1731
 // Support for Adafruit Neopixel LED driver
1627
 //#define NEOPIXEL_LED
1732
 //#define NEOPIXEL_LED
1628
 #if ENABLED(NEOPIXEL_LED)
1733
 #if ENABLED(NEOPIXEL_LED)
1629
-  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
1734
+  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
1630
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1735
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1631
-  #define NEOPIXEL_PIXELS 30       // Number of LEDs on strip
1632
-  #define NEOPIXEL_IS_SEQUENTIAL   // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
1633
-  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness 0-255
1736
+  #define NEOPIXEL_PIXELS 30       // Number of LEDs in the strip
1737
+  #define NEOPIXEL_IS_SEQUENTIAL   // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
1738
+  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness (0-255)
1634
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1739
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1635
 #endif
1740
 #endif
1636
 
1741
 
1645
  *  - Change to green once print has finished
1750
  *  - Change to green once print has finished
1646
  *  - Turn off after the print has finished and the user has pushed a button
1751
  *  - Turn off after the print has finished and the user has pushed a button
1647
  */
1752
  */
1648
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED)
1753
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
1649
   #define PRINTER_EVENT_LEDS
1754
   #define PRINTER_EVENT_LEDS
1650
 #endif
1755
 #endif
1651
 
1756
 
1652
-/*********************************************************************\
1653
-* R/C SERVO support
1654
-* Sponsored by TrinityLabs, Reworked by codexmas
1655
-**********************************************************************/
1757
+/**
1758
+ * R/C SERVO support
1759
+ * Sponsored by TrinityLabs, Reworked by codexmas
1760
+ */
1656
 
1761
 
1657
-// Number of servos
1658
-//
1659
-// If you select a configuration below, this will receive a default value and does not need to be set manually
1660
-// set it manually if you have more servos than extruders and wish to manually control some
1661
-// leaving it undefined or defining as 0 will disable the servo subsystem
1662
-// If unsure, leave commented / disabled
1663
-//
1762
+/**
1763
+ * Number of servos
1764
+ *
1765
+ * For some servo-related options NUM_SERVOS will be set automatically.
1766
+ * Set this manually if there are extra servos needing manual control.
1767
+ * Leave undefined or set to 0 to entirely disable the servo subsystem.
1768
+ */
1664
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1769
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1665
 
1770
 
1666
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1771
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1673
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1778
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1674
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1779
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1675
 
1780
 
1676
-/**
1677
- * Filament Width Sensor
1678
- *
1679
- * Measures the filament width in real-time and adjusts
1680
- * flow rate to compensate for any irregularities.
1681
- *
1682
- * Also allows the measured filament diameter to set the
1683
- * extrusion rate, so the slicer only has to specify the
1684
- * volume.
1685
- *
1686
- * Only a single extruder is supported at this time.
1687
- *
1688
- *  34 RAMPS_14    : Analog input 5 on the AUX2 connector
1689
- *  81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
1690
- * 301 RAMBO       : Analog input 3
1691
- *
1692
- * Note: May require analog pins to be defined for other boards.
1693
- */
1694
-//#define FILAMENT_WIDTH_SENSOR
1695
-
1696
-#define DEFAULT_NOMINAL_FILAMENT_DIA 3.00   // (mm) Diameter of the filament generally used (3.0 or 1.75mm), also used in the slicer. Used to validate sensor reading.
1697
-
1698
-#if ENABLED(FILAMENT_WIDTH_SENSOR)
1699
-  #define FILAMENT_SENSOR_EXTRUDER_NUM 0    // Index of the extruder that has the filament sensor (0,1,2,3)
1700
-  #define MEASUREMENT_DELAY_CM        14    // (cm) The distance from the filament sensor to the melting chamber
1701
-
1702
-  #define MEASURED_UPPER_LIMIT         3.30 // (mm) Upper limit used to validate sensor reading
1703
-  #define MEASURED_LOWER_LIMIT         1.90 // (mm) Lower limit used to validate sensor reading
1704
-  #define MAX_MEASUREMENT_DELAY       20    // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
1705
-
1706
-  #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
1707
-
1708
-  // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
1709
-  //#define FILAMENT_LCD_DISPLAY
1710
-#endif
1711
-
1712
 #endif // CONFIGURATION_H
1781
 #endif // CONFIGURATION_H

+ 268
- 125
Marlin/example_configurations/SCARA/Configuration_adv.h Переглянути файл

32
  */
32
  */
33
 #ifndef CONFIGURATION_ADV_H
33
 #ifndef CONFIGURATION_ADV_H
34
 #define CONFIGURATION_ADV_H
34
 #define CONFIGURATION_ADV_H
35
-#define CONFIGURATION_ADV_H_VERSION 010100
35
+#define CONFIGURATION_ADV_H_VERSION 010107
36
 
36
 
37
 // @section temperature
37
 // @section temperature
38
 
38
 
48
 #endif
48
 #endif
49
 
49
 
50
 /**
50
 /**
51
- * Thermal Protection protects your printer from damage and fire if a
52
- * thermistor falls out or temperature sensors fail in any way.
51
+ * Thermal Protection provides additional protection to your printer from damage
52
+ * and fire. Marlin always includes safe min and max temperature ranges which
53
+ * protect against a broken or disconnected thermistor wire.
53
  *
54
  *
54
- * The issue: If a thermistor falls out or a temperature sensor fails,
55
- * Marlin can no longer sense the actual temperature. Since a disconnected
56
- * thermistor reads as a low temperature, the firmware will keep the heater on.
55
+ * The issue: If a thermistor falls out, it will report the much lower
56
+ * temperature of the air in the room, and the the firmware will keep
57
+ * the heater on.
57
  *
58
  *
58
  * The solution: Once the temperature reaches the target, start observing.
59
  * The solution: Once the temperature reaches the target, start observing.
59
- * If the temperature stays too far below the target (hysteresis) for too long (period),
60
- * the firmware will halt the machine as a safety precaution.
60
+ * If the temperature stays too far below the target (hysteresis) for too
61
+ * long (period), the firmware will halt the machine as a safety precaution.
61
  *
62
  *
62
- * If you get false positives for "Thermal Runaway" increase THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
63
+ * If you get false positives for "Thermal Runaway", increase
64
+ * THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
63
  */
65
  */
64
 #if ENABLED(THERMAL_PROTECTION_HOTENDS)
66
 #if ENABLED(THERMAL_PROTECTION_HOTENDS)
65
   #define THERMAL_PROTECTION_PERIOD 40        // Seconds
67
   #define THERMAL_PROTECTION_PERIOD 40        // Seconds
66
   #define THERMAL_PROTECTION_HYSTERESIS 4     // Degrees Celsius
68
   #define THERMAL_PROTECTION_HYSTERESIS 4     // Degrees Celsius
67
 
69
 
68
   /**
70
   /**
69
-   * Whenever an M104 or M109 increases the target temperature the firmware will wait for the
70
-   * WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
71
-   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
72
-   * but only if the current temperature is far enough below the target for a reliable test.
71
+   * Whenever an M104, M109, or M303 increases the target temperature, the
72
+   * firmware will wait for the WATCH_TEMP_PERIOD to expire. If the temperature
73
+   * hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted and
74
+   * requires a hard reset. This test restarts with any M104/M109/M303, but only
75
+   * if the current temperature is far enough below the target for a reliable
76
+   * test.
73
    *
77
    *
74
-   * If you get false positives for "Heating failed" increase WATCH_TEMP_PERIOD and/or decrease WATCH_TEMP_INCREASE
75
-   * WATCH_TEMP_INCREASE should not be below 2.
78
+   * If you get false positives for "Heating failed", increase WATCH_TEMP_PERIOD
79
+   * and/or decrease WATCH_TEMP_INCREASE. WATCH_TEMP_INCREASE should not be set
80
+   * below 2.
76
    */
81
    */
77
   #define WATCH_TEMP_PERIOD 20                // Seconds
82
   #define WATCH_TEMP_PERIOD 20                // Seconds
78
   #define WATCH_TEMP_INCREASE 2               // Degrees Celsius
83
   #define WATCH_TEMP_INCREASE 2               // Degrees Celsius
86
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
91
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
87
 
92
 
88
   /**
93
   /**
89
-   * Whenever an M140 or M190 increases the target temperature the firmware will wait for the
90
-   * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE
91
-   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190,
92
-   * but only if the current temperature is far enough below the target for a reliable test.
93
-   *
94
-   * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease
95
-   * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.)
94
+   * As described above, except for the bed (M140/M190/M303).
96
    */
95
    */
97
   #define WATCH_BED_TEMP_PERIOD 60                // Seconds
96
   #define WATCH_BED_TEMP_PERIOD 60                // Seconds
98
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
97
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
123
   #define AUTOTEMP_OLDWEIGHT 0.98
122
   #define AUTOTEMP_OLDWEIGHT 0.98
124
 #endif
123
 #endif
125
 
124
 
125
+// Show extra position information in M114
126
+//#define M114_DETAIL
127
+
126
 // Show Temperature ADC value
128
 // Show Temperature ADC value
127
 // Enable for M105 to include ADC values read from temperature sensors.
129
 // Enable for M105 to include ADC values read from temperature sensors.
128
 //#define SHOW_TEMP_ADC_VALUES
130
 //#define SHOW_TEMP_ADC_VALUES
257
 
259
 
258
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
260
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
259
 
261
 
260
-// Dual X Steppers
261
-// Uncomment this option to drive two X axis motors.
262
-// The next unused E driver will be assigned to the second X stepper.
262
+/**
263
+ * Dual Steppers / Dual Endstops
264
+ *
265
+ * This section will allow you to use extra E drivers to drive a second motor for X, Y, or Z axes.
266
+ *
267
+ * For example, set X_DUAL_STEPPER_DRIVERS setting to use a second motor. If the motors need to
268
+ * spin in opposite directions set INVERT_X2_VS_X_DIR. If the second motor needs its own endstop
269
+ * set X_DUAL_ENDSTOPS. This can adjust for "racking." Use X2_USE_ENDSTOP to set the endstop plug
270
+ * that should be used for the second endstop. Extra endstops will appear in the output of 'M119'.
271
+ *
272
+ * Use X_DUAL_ENDSTOP_ADJUSTMENT to adjust for mechanical imperfection. After homing both motors
273
+ * this offset is applied to the X2 motor. To find the offset home the X axis, and measure the error
274
+ * in X2. Dual endstop offsets can be set at runtime with 'M666 X<offset> Y<offset> Z<offset>'.
275
+ */
276
+
263
 //#define X_DUAL_STEPPER_DRIVERS
277
 //#define X_DUAL_STEPPER_DRIVERS
264
 #if ENABLED(X_DUAL_STEPPER_DRIVERS)
278
 #if ENABLED(X_DUAL_STEPPER_DRIVERS)
265
-  // Set true if the two X motors need to rotate in opposite directions
266
-  #define INVERT_X2_VS_X_DIR true
279
+  #define INVERT_X2_VS_X_DIR true   // Set 'true' if X motors should rotate in opposite directions
280
+  //#define X_DUAL_ENDSTOPS
281
+  #if ENABLED(X_DUAL_ENDSTOPS)
282
+    #define X2_USE_ENDSTOP _XMAX_
283
+    #define X_DUAL_ENDSTOPS_ADJUSTMENT  0
284
+  #endif
267
 #endif
285
 #endif
268
 
286
 
269
-// Dual Y Steppers
270
-// Uncomment this option to drive two Y axis motors.
271
-// The next unused E driver will be assigned to the second Y stepper.
272
 //#define Y_DUAL_STEPPER_DRIVERS
287
 //#define Y_DUAL_STEPPER_DRIVERS
273
 #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
288
 #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
274
-  // Set true if the two Y motors need to rotate in opposite directions
275
-  #define INVERT_Y2_VS_Y_DIR true
289
+  #define INVERT_Y2_VS_Y_DIR true   // Set 'true' if Y motors should rotate in opposite directions
290
+  //#define Y_DUAL_ENDSTOPS
291
+  #if ENABLED(Y_DUAL_ENDSTOPS)
292
+    #define Y2_USE_ENDSTOP _YMAX_
293
+    #define Y_DUAL_ENDSTOPS_ADJUSTMENT  0
294
+  #endif
276
 #endif
295
 #endif
277
 
296
 
278
-// A single Z stepper driver is usually used to drive 2 stepper motors.
279
-// Uncomment this option to use a separate stepper driver for each Z axis motor.
280
-// The next unused E driver will be assigned to the second Z stepper.
281
 //#define Z_DUAL_STEPPER_DRIVERS
297
 //#define Z_DUAL_STEPPER_DRIVERS
282
-
283
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
298
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
284
-
285
-  // Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper.
286
-  // That way the machine is capable to align the bed during home, since both Z steppers are homed.
287
-  // There is also an implementation of M666 (software endstops adjustment) to this feature.
288
-  // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed.
289
-  // One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2.
290
-  // If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive.
291
-  // Play a little bit with small adjustments (0.5mm) and check the behaviour.
292
-  // The M119 (endstops report) will start reporting the Z2 Endstop as well.
293
-
294
   //#define Z_DUAL_ENDSTOPS
299
   //#define Z_DUAL_ENDSTOPS
295
-
296
   #if ENABLED(Z_DUAL_ENDSTOPS)
300
   #if ENABLED(Z_DUAL_ENDSTOPS)
297
     #define Z2_USE_ENDSTOP _XMAX_
301
     #define Z2_USE_ENDSTOP _XMAX_
298
-    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0  // Use M666 to determine/test this value
302
+    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0
299
   #endif
303
   #endif
300
-
301
-#endif // Z_DUAL_STEPPER_DRIVERS
304
+#endif
302
 
305
 
303
 // Enable this for dual x-carriage printers.
306
 // Enable this for dual x-carriage printers.
304
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
307
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
345
 
348
 
346
 // @section homing
349
 // @section homing
347
 
350
 
348
-//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
351
+// Homing hits each endstop, retracts by these distances, then does a slower bump.
349
 #define X_HOME_BUMP_MM 3
352
 #define X_HOME_BUMP_MM 3
350
 #define Y_HOME_BUMP_MM 3
353
 #define Y_HOME_BUMP_MM 3
351
 #define Z_HOME_BUMP_MM 3
354
 #define Z_HOME_BUMP_MM 3
352
-#define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
353
-//#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
355
+#define HOMING_BUMP_DIVISOR { 2, 2, 4 }  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
356
+//#define QUICK_HOME                     // If homing includes X and Y, do a diagonal move initially
354
 
357
 
355
 // When G28 is called, this option will make Y home before X
358
 // When G28 is called, this option will make Y home before X
356
 //#define HOME_Y_BEFORE_X
359
 //#define HOME_Y_BEFORE_X
434
 //#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 }   // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
437
 //#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 }   // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
435
 //#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 }    // Default drive percent - X, Y, Z, E axis
438
 //#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 }    // Default drive percent - X, Y, Z, E axis
436
 
439
 
437
-// Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
440
+// Use an I2C based DIGIPOT (e.g., Azteeg X3 Pro)
438
 //#define DIGIPOT_I2C
441
 //#define DIGIPOT_I2C
442
+#if ENABLED(DIGIPOT_I2C) && !defined(DIGIPOT_I2C_ADDRESS_A)
443
+  /**
444
+   * Common slave addresses:
445
+   *
446
+   *                    A   (A shifted)   B   (B shifted)  IC
447
+   * Smoothie          0x2C (0x58)       0x2D (0x5A)       MCP4451
448
+   * AZTEEG_X3_PRO     0x2C (0x58)       0x2E (0x5C)       MCP4451
449
+   * MIGHTYBOARD_REVE  0x2F (0x5E)                         MCP4018
450
+   */
451
+  #define DIGIPOT_I2C_ADDRESS_A 0x2C  // unshifted slave address for first DIGIPOT
452
+  #define DIGIPOT_I2C_ADDRESS_B 0x2D  // unshifted slave address for second DIGIPOT
453
+#endif
454
+
439
 //#define DIGIPOT_MCP4018          // Requires library from https://github.com/stawel/SlowSoftI2CMaster
455
 //#define DIGIPOT_MCP4018          // Requires library from https://github.com/stawel/SlowSoftI2CMaster
440
 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4     AZTEEG_X3_PRO: 8
456
 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4     AZTEEG_X3_PRO: 8
441
 // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
457
 // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
466
 // The timeout (in ms) to return to the status screen from sub-menus
482
 // The timeout (in ms) to return to the status screen from sub-menus
467
 //#define LCD_TIMEOUT_TO_STATUS 15000
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
468
 
484
 
485
+/**
486
+ * LED Control Menu
487
+ * Enable this feature to add LED Control to the LCD menu
488
+ */
489
+//#define LED_CONTROL_MENU
490
+#if ENABLED(LED_CONTROL_MENU)
491
+  #define LED_COLOR_PRESETS                 // Enable the Preset Color menu option
492
+  #if ENABLED(LED_COLOR_PRESETS)
493
+    #define LED_USER_PRESET_RED        255  // User defined RED value
494
+    #define LED_USER_PRESET_GREEN      128  // User defined GREEN value
495
+    #define LED_USER_PRESET_BLUE         0  // User defined BLUE value
496
+    #define LED_USER_PRESET_WHITE      255  // User defined WHITE value
497
+    #define LED_USER_PRESET_BRIGHTNESS 255  // User defined intensity
498
+    //#define LED_USER_PRESET_STARTUP       // Have the printer display the user preset color on startup
499
+  #endif
500
+#endif // LED_CONTROL_MENU
501
+
469
 #if ENABLED(SDSUPPORT)
502
 #if ENABLED(SDSUPPORT)
470
 
503
 
471
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
504
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
475
   // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
508
   // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
476
   #define SD_DETECT_INVERTED
509
   #define SD_DETECT_INVERTED
477
 
510
 
478
-  #define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
511
+  #define SD_FINISHED_STEPPERRELEASE true          // Disable steppers when SD Print is finished
479
   #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
512
   #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
480
 
513
 
481
-  #define SDCARD_RATHERRECENTFIRST  //reverse file order of sd card menu display. Its sorted practically after the file system block order.
482
-  // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that.
483
-  // using:
514
+  // Reverse SD sort to show "more recent" files first, according to the card's FAT.
515
+  // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended.
516
+  #define SDCARD_RATHERRECENTFIRST
517
+
518
+  // Add an option in the menu to run all auto#.g files
484
   //#define MENU_ADDAUTOSTART
519
   //#define MENU_ADDAUTOSTART
485
 
520
 
486
   /**
521
   /**
517
     #define SDSORT_USES_STACK  false  // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
552
     #define SDSORT_USES_STACK  false  // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
518
     #define SDSORT_CACHE_NAMES false  // Keep sorted items in RAM longer for speedy performance. Most expensive option.
553
     #define SDSORT_CACHE_NAMES false  // Keep sorted items in RAM longer for speedy performance. Most expensive option.
519
     #define SDSORT_DYNAMIC_RAM false  // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
554
     #define SDSORT_DYNAMIC_RAM false  // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
555
+    #define SDSORT_CACHE_VFATS 2      // Maximum number of 13-byte VFAT entries to use for sorting.
556
+                                      // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM.
520
   #endif
557
   #endif
521
 
558
 
522
   // Show a progress bar on HD44780 LCDs for SD printing
559
   // Show a progress bar on HD44780 LCDs for SD printing
535
     //#define LCD_PROGRESS_BAR_TEST
572
     //#define LCD_PROGRESS_BAR_TEST
536
   #endif
573
   #endif
537
 
574
 
575
+  // Add an 'M73' G-code to set the current percentage
576
+  //#define LCD_SET_PROGRESS_MANUALLY
577
+
538
   // This allows hosts to request long names for files and folders with M33
578
   // This allows hosts to request long names for files and folders with M33
539
   //#define LONG_FILENAME_HOST_SUPPORT
579
   //#define LONG_FILENAME_HOST_SUPPORT
540
 
580
 
541
-  // This option allows you to abort SD printing when any endstop is triggered.
542
-  // This feature must be enabled with "M540 S1" or from the LCD menu.
543
-  // To have any effect, endstops must be enabled during SD printing.
581
+  // Enable this option to scroll long filenames in the SD card menu
582
+  //#define SCROLL_LONG_FILENAMES
583
+
584
+  /**
585
+   * This option allows you to abort SD printing when any endstop is triggered.
586
+   * This feature must be enabled with "M540 S1" or from the LCD menu.
587
+   * To have any effect, endstops must be enabled during SD printing.
588
+   */
544
   //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
589
   //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
545
 
590
 
591
+  /**
592
+   * This option makes it easier to print the same SD Card file again.
593
+   * On print completion the LCD Menu will open with the file selected.
594
+   * You can just click to start the print, or navigate elsewhere.
595
+   */
596
+  //#define SD_REPRINT_LAST_SELECTED_FILE
597
+
546
 #endif // SDSUPPORT
598
 #endif // SDSUPPORT
547
 
599
 
548
 /**
600
 /**
575
   // Enable this option and reduce the value to optimize screen updates.
627
   // Enable this option and reduce the value to optimize screen updates.
576
   // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
628
   // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
577
   //#define DOGM_SPI_DELAY_US 5
629
   //#define DOGM_SPI_DELAY_US 5
630
+
631
+  // Swap the CW/CCW indicators in the graphics overlay
632
+  //#define OVERLAY_GFX_REVERSE
633
+
578
 #endif // DOGLCD
634
 #endif // DOGLCD
579
 
635
 
580
 // @section safety
636
 // @section safety
603
 #if ENABLED(BABYSTEPPING)
659
 #if ENABLED(BABYSTEPPING)
604
   //#define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
660
   //#define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
605
   #define BABYSTEP_INVERT_Z false    // Change if Z babysteps should go the other way
661
   #define BABYSTEP_INVERT_Z false    // Change if Z babysteps should go the other way
606
-  #define BABYSTEP_MULTIPLICATOR 100 // Babysteps are very small. Increase for faster motion.
662
+  #define BABYSTEP_MULTIPLICATOR 1   // Babysteps are very small. Increase for faster motion.
607
   //#define BABYSTEP_ZPROBE_OFFSET   // Enable to combine M851 and Babystepping
663
   //#define BABYSTEP_ZPROBE_OFFSET   // Enable to combine M851 and Babystepping
608
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
664
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
609
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
665
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
610
                                         // Note: Extra time may be added to mitigate controller latency.
666
                                         // Note: Extra time may be added to mitigate controller latency.
611
   //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
667
   //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
612
-  //#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators
613
 #endif
668
 #endif
614
 
669
 
615
 // @section extruder
670
 // @section extruder
656
 
711
 
657
 // @section leveling
712
 // @section leveling
658
 
713
 
659
-// Default mesh area is an area with an inset margin on the print area.
660
-// Below are the macros that are used to define the borders for the mesh area,
661
-// made available here for specialized needs, ie dual extruder setup.
662
-#if ENABLED(MESH_BED_LEVELING)
663
-  #define MESH_MIN_X MESH_INSET
664
-  #define MESH_MAX_X (X_BED_SIZE - (MESH_INSET))
665
-  #define MESH_MIN_Y MESH_INSET
666
-  #define MESH_MAX_Y (Y_BED_SIZE - (MESH_INSET))
667
-#elif ENABLED(AUTO_BED_LEVELING_UBL)
668
-  #define UBL_MESH_MIN_X UBL_MESH_INSET
669
-  #define UBL_MESH_MAX_X (X_BED_SIZE - (UBL_MESH_INSET))
670
-  #define UBL_MESH_MIN_Y UBL_MESH_INSET
671
-  #define UBL_MESH_MAX_Y (Y_BED_SIZE - (UBL_MESH_INSET))
672
-
673
-  // If this is defined, the currently active mesh will be saved in the
674
-  // current slot on M500.
675
-  #define UBL_SAVE_ACTIVE_ON_M500
714
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
715
+  #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
716
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
717
+  #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
718
+#endif
719
+
720
+#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL)
721
+  // Override the mesh area if the automatic (max) area is too large
722
+  //#define MESH_MIN_X MESH_INSET
723
+  //#define MESH_MIN_Y MESH_INSET
724
+  //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET)
725
+  //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
676
 #endif
726
 #endif
677
 
727
 
678
 // @section extras
728
 // @section extras
692
 //#define BEZIER_CURVE_SUPPORT
742
 //#define BEZIER_CURVE_SUPPORT
693
 
743
 
694
 // G38.2 and G38.3 Probe Target
744
 // G38.2 and G38.3 Probe Target
695
-// Enable PROBE_DOUBLE_TOUCH if you want G38 to double touch
745
+// Set MULTIPLE_PROBING if you want G38 to double touch
696
 //#define G38_PROBE_TARGET
746
 //#define G38_PROBE_TARGET
697
 #if ENABLED(G38_PROBE_TARGET)
747
 #if ENABLED(G38_PROBE_TARGET)
698
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
748
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
717
 // @section hidden
767
 // @section hidden
718
 
768
 
719
 // The number of linear motions that can be in the plan at any give time.
769
 // The number of linear motions that can be in the plan at any give time.
720
-// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2, i.g. 8,16,32 because shifts and ors are used to do the ring-buffering.
770
+// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2 (e.g. 8, 16, 32) because shifts and ors are used to do the ring-buffering.
721
 #if ENABLED(SDSUPPORT)
771
 #if ENABLED(SDSUPPORT)
722
   #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
772
   #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
723
 #else
773
 #else
808
 #endif
858
 #endif
809
 
859
 
810
 /**
860
 /**
861
+ * Extra Fan Speed
862
+ * Adds a secondary fan speed for each print-cooling fan.
863
+ *   'M106 P<fan> T3-255' : Set a secondary speed for <fan>
864
+ *   'M106 P<fan> T2'     : Use the set secondary speed
865
+ *   'M106 P<fan> T1'     : Restore the previous fan speed
866
+ */
867
+//#define EXTRA_FAN_SPEED
868
+
869
+/**
811
  * Advanced Pause
870
  * Advanced Pause
812
  * Experimental feature for filament change support and for parking the nozzle when paused.
871
  * Experimental feature for filament change support and for parking the nozzle when paused.
813
  * Adds the GCode M600 for initiating filament change.
872
  * Adds the GCode M600 for initiating filament change.
917
 
976
 
918
 #endif
977
 #endif
919
 
978
 
920
-// @section TMC2130
979
+// @section TMC2130, TMC2208
921
 
980
 
922
 /**
981
 /**
923
  * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
982
  * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
931
  */
990
  */
932
 //#define HAVE_TMC2130
991
 //#define HAVE_TMC2130
933
 
992
 
934
-#if ENABLED(HAVE_TMC2130)
993
+/**
994
+ * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
995
+ * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin.
996
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN
997
+ * to #_SERIAL_TX_PIN with a 1K resistor.
998
+ * The drivers can also be used with hardware serial.
999
+ *
1000
+ * You'll also need the TMC2208Stepper Arduino library
1001
+ * (https://github.com/teemuatlut/TMC2208Stepper).
1002
+ */
1003
+//#define HAVE_TMC2208
1004
+
1005
+#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
935
 
1006
 
936
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
1007
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
937
   //#define X_IS_TMC2130
1008
   //#define X_IS_TMC2130
946
   //#define E3_IS_TMC2130
1017
   //#define E3_IS_TMC2130
947
   //#define E4_IS_TMC2130
1018
   //#define E4_IS_TMC2130
948
 
1019
 
1020
+  //#define X_IS_TMC2208
1021
+  //#define X2_IS_TMC2208
1022
+  //#define Y_IS_TMC2208
1023
+  //#define Y2_IS_TMC2208
1024
+  //#define Z_IS_TMC2208
1025
+  //#define Z2_IS_TMC2208
1026
+  //#define E0_IS_TMC2208
1027
+  //#define E1_IS_TMC2208
1028
+  //#define E2_IS_TMC2208
1029
+  //#define E3_IS_TMC2208
1030
+  //#define E4_IS_TMC2208
1031
+
949
   /**
1032
   /**
950
    * Stepper driver settings
1033
    * Stepper driver settings
951
    */
1034
    */
952
 
1035
 
953
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1036
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
954
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1037
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
955
-  #define INTERPOLATE          1  // Interpolate X/Y/Z_MICROSTEPS to 256
1038
+  #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
956
 
1039
 
957
-  #define X_CURRENT         1000  // rms current in mA. Multiply by 1.41 for peak current.
1040
+  #define X_CURRENT          800  // rms current in mA. Multiply by 1.41 for peak current.
958
   #define X_MICROSTEPS        16  // 0..256
1041
   #define X_MICROSTEPS        16  // 0..256
959
 
1042
 
960
-  #define Y_CURRENT         1000
1043
+  #define Y_CURRENT          800
961
   #define Y_MICROSTEPS        16
1044
   #define Y_MICROSTEPS        16
962
 
1045
 
963
-  #define Z_CURRENT         1000
1046
+  #define Z_CURRENT          800
964
   #define Z_MICROSTEPS        16
1047
   #define Z_MICROSTEPS        16
965
 
1048
 
966
-  //#define X2_CURRENT      1000
967
-  //#define X2_MICROSTEPS     16
1049
+  #define X2_CURRENT         800
1050
+  #define X2_MICROSTEPS       16
968
 
1051
 
969
-  //#define Y2_CURRENT      1000
970
-  //#define Y2_MICROSTEPS     16
1052
+  #define Y2_CURRENT         800
1053
+  #define Y2_MICROSTEPS       16
971
 
1054
 
972
-  //#define Z2_CURRENT      1000
973
-  //#define Z2_MICROSTEPS     16
1055
+  #define Z2_CURRENT         800
1056
+  #define Z2_MICROSTEPS       16
974
 
1057
 
975
-  //#define E0_CURRENT      1000
976
-  //#define E0_MICROSTEPS     16
1058
+  #define E0_CURRENT         800
1059
+  #define E0_MICROSTEPS       16
977
 
1060
 
978
-  //#define E1_CURRENT      1000
979
-  //#define E1_MICROSTEPS     16
1061
+  #define E1_CURRENT         800
1062
+  #define E1_MICROSTEPS       16
980
 
1063
 
981
-  //#define E2_CURRENT      1000
982
-  //#define E2_MICROSTEPS     16
1064
+  #define E2_CURRENT         800
1065
+  #define E2_MICROSTEPS       16
983
 
1066
 
984
-  //#define E3_CURRENT      1000
985
-  //#define E3_MICROSTEPS     16
1067
+  #define E3_CURRENT         800
1068
+  #define E3_MICROSTEPS       16
986
 
1069
 
987
-  //#define E4_CURRENT      1000
988
-  //#define E4_MICROSTEPS     16
1070
+  #define E4_CURRENT         800
1071
+  #define E4_MICROSTEPS       16
989
 
1072
 
990
   /**
1073
   /**
991
    * Use Trinamic's ultra quiet stepping mode.
1074
    * Use Trinamic's ultra quiet stepping mode.
994
   #define STEALTHCHOP
1077
   #define STEALTHCHOP
995
 
1078
 
996
   /**
1079
   /**
997
-   * Let Marlin automatically control stepper current.
998
-   * This is still an experimental feature.
999
-   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
1000
-   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
1001
-   * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX
1080
+   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1081
+   * like overtemperature and short to ground. TMC2208 requires hardware serial.
1082
+   * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1083
+   * Other detected conditions can be used to stop the current print.
1002
    * Relevant g-codes:
1084
    * Relevant g-codes:
1003
    * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
1085
    * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
1004
-   * M906 S1 - Start adjusting current
1005
-   * M906 S0 - Stop adjusting current
1006
    * M911 - Report stepper driver overtemperature pre-warn condition.
1086
    * M911 - Report stepper driver overtemperature pre-warn condition.
1007
    * M912 - Clear stepper driver overtemperature pre-warn condition flag.
1087
    * M912 - Clear stepper driver overtemperature pre-warn condition flag.
1088
+   * M122 S0/1 - Report driver parameters (Requires TMC_DEBUG)
1008
    */
1089
    */
1009
-  //#define AUTOMATIC_CURRENT_CONTROL
1090
+  //#define MONITOR_DRIVER_STATUS
1010
 
1091
 
1011
-  #if ENABLED(AUTOMATIC_CURRENT_CONTROL)
1012
-    #define CURRENT_STEP          50  // [mA]
1013
-    #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
1092
+  #if ENABLED(MONITOR_DRIVER_STATUS)
1093
+    #define CURRENT_STEP_DOWN     50  // [mA]
1014
     #define REPORT_CURRENT_CHANGE
1094
     #define REPORT_CURRENT_CHANGE
1095
+    #define STOP_ON_ERROR
1015
   #endif
1096
   #endif
1016
 
1097
 
1017
   /**
1098
   /**
1026
   #define X2_HYBRID_THRESHOLD    100
1107
   #define X2_HYBRID_THRESHOLD    100
1027
   #define Y_HYBRID_THRESHOLD     100
1108
   #define Y_HYBRID_THRESHOLD     100
1028
   #define Y2_HYBRID_THRESHOLD    100
1109
   #define Y2_HYBRID_THRESHOLD    100
1029
-  #define Z_HYBRID_THRESHOLD       4
1030
-  #define Z2_HYBRID_THRESHOLD      4
1110
+  #define Z_HYBRID_THRESHOLD       3
1111
+  #define Z2_HYBRID_THRESHOLD      3
1031
   #define E0_HYBRID_THRESHOLD     30
1112
   #define E0_HYBRID_THRESHOLD     30
1032
   #define E1_HYBRID_THRESHOLD     30
1113
   #define E1_HYBRID_THRESHOLD     30
1033
   #define E2_HYBRID_THRESHOLD     30
1114
   #define E2_HYBRID_THRESHOLD     30
1037
   /**
1118
   /**
1038
    * Use stallGuard2 to sense an obstacle and trigger an endstop.
1119
    * Use stallGuard2 to sense an obstacle and trigger an endstop.
1039
    * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
1120
    * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
1040
-   * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal.
1121
+   * X and Y homing will always be done in spreadCycle mode.
1041
    *
1122
    *
1042
    * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
1123
    * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
1043
    * Higher values make the system LESS sensitive.
1124
    * Higher values make the system LESS sensitive.
1046
    * It is advised to set X/Y_HOME_BUMP_MM to 0.
1127
    * It is advised to set X/Y_HOME_BUMP_MM to 0.
1047
    * M914 X/Y to live tune the setting
1128
    * M914 X/Y to live tune the setting
1048
    */
1129
    */
1049
-  //#define SENSORLESS_HOMING
1130
+  //#define SENSORLESS_HOMING // TMC2130 only
1050
 
1131
 
1051
   #if ENABLED(SENSORLESS_HOMING)
1132
   #if ENABLED(SENSORLESS_HOMING)
1052
-    #define X_HOMING_SENSITIVITY  19
1053
-    #define Y_HOMING_SENSITIVITY  19
1133
+    #define X_HOMING_SENSITIVITY  8
1134
+    #define Y_HOMING_SENSITIVITY  8
1054
   #endif
1135
   #endif
1055
 
1136
 
1056
   /**
1137
   /**
1138
+   * Enable M122 debugging command for TMC stepper drivers.
1139
+   * M122 S0/1 will enable continous reporting.
1140
+   */
1141
+  //#define TMC_DEBUG
1142
+
1143
+  /**
1057
    * You can set your own advanced settings by filling in predefined functions.
1144
    * You can set your own advanced settings by filling in predefined functions.
1058
    * A list of available functions can be found on the library github page
1145
    * A list of available functions can be found on the library github page
1059
    * https://github.com/teemuatlut/TMC2130Stepper
1146
    * https://github.com/teemuatlut/TMC2130Stepper
1147
+   * https://github.com/teemuatlut/TMC2208Stepper
1060
    *
1148
    *
1061
    * Example:
1149
    * Example:
1062
-   * #define TMC2130_ADV() { \
1150
+   * #define TMC_ADV() { \
1063
    *   stepperX.diag0_temp_prewarn(1); \
1151
    *   stepperX.diag0_temp_prewarn(1); \
1064
-   *   stepperX.interpolate(0); \
1152
+   *   stepperY.interpolate(0); \
1065
    * }
1153
    * }
1066
    */
1154
    */
1067
-  #define  TMC2130_ADV() {  }
1155
+  #define  TMC_ADV() {  }
1068
 
1156
 
1069
-#endif // HAVE_TMC2130
1157
+#endif // TMC2130 || TMC2208
1070
 
1158
 
1071
 // @section L6470
1159
 // @section L6470
1072
 
1160
 
1231
 #endif
1319
 #endif
1232
 
1320
 
1233
 /**
1321
 /**
1322
+ * Filament Width Sensor
1323
+ *
1324
+ * Measures the filament width in real-time and adjusts
1325
+ * flow rate to compensate for any irregularities.
1326
+ *
1327
+ * Also allows the measured filament diameter to set the
1328
+ * extrusion rate, so the slicer only has to specify the
1329
+ * volume.
1330
+ *
1331
+ * Only a single extruder is supported at this time.
1332
+ *
1333
+ *  34 RAMPS_14    : Analog input 5 on the AUX2 connector
1334
+ *  81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
1335
+ * 301 RAMBO       : Analog input 3
1336
+ *
1337
+ * Note: May require analog pins to be defined for other boards.
1338
+ */
1339
+//#define FILAMENT_WIDTH_SENSOR
1340
+
1341
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
1342
+  #define FILAMENT_SENSOR_EXTRUDER_NUM 0    // Index of the extruder that has the filament sensor. :[0,1,2,3,4]
1343
+  #define MEASUREMENT_DELAY_CM        14    // (cm) The distance from the filament sensor to the melting chamber
1344
+
1345
+  #define MEASURED_UPPER_LIMIT         3.30 // (mm) Upper limit used to validate sensor reading
1346
+  #define MEASURED_LOWER_LIMIT         1.90 // (mm) Lower limit used to validate sensor reading
1347
+  #define MAX_MEASUREMENT_DELAY       20    // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
1348
+
1349
+  #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
1350
+
1351
+  // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
1352
+  //#define FILAMENT_LCD_DISPLAY
1353
+#endif
1354
+
1355
+/**
1356
+ * CNC Coordinate Systems
1357
+ *
1358
+ * Enables G53 and G54-G59.3 commands to select coordinate systems
1359
+ * and G92.1 to reset the workspace to native machine space.
1360
+ */
1361
+//#define CNC_COORDINATE_SYSTEMS
1362
+
1363
+/**
1234
  * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
1364
  * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
1235
  */
1365
  */
1236
 //#define PINS_DEBUGGING
1366
 //#define PINS_DEBUGGING
1421
                                          // tweaks made to the configuration are affecting the printer in real-time.
1551
                                          // tweaks made to the configuration are affecting the printer in real-time.
1422
 #endif
1552
 #endif
1423
 
1553
 
1554
+/**
1555
+ * NanoDLP Sync support
1556
+ *
1557
+ * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
1558
+ * string to enable synchronization with DLP projector exposure. This change will allow to use
1559
+ * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
1560
+ */
1561
+//#define NANODLP_Z_SYNC
1562
+#if ENABLED(NANODLP_Z_SYNC)
1563
+  //#define NANODLP_ALL_AXIS  // Enables "Z_move_comp" output on any axis move.
1564
+                              // Default behaviour is limited to Z axis only.
1565
+#endif
1566
+
1424
 #endif // CONFIGURATION_ADV_H
1567
 #endif // CONFIGURATION_ADV_H

+ 157
- 88
Marlin/example_configurations/Sanguinololu/Configuration.h Переглянути файл

37
  */
37
  */
38
 #ifndef CONFIGURATION_H
38
 #ifndef CONFIGURATION_H
39
 #define CONFIGURATION_H
39
 #define CONFIGURATION_H
40
-#define CONFIGURATION_H_VERSION 010100
40
+#define CONFIGURATION_H_VERSION 010107
41
 
41
 
42
 //===========================================================================
42
 //===========================================================================
43
 //============================= Getting Started =============================
43
 //============================= Getting Started =============================
136
 // :[1, 2, 3, 4, 5]
136
 // :[1, 2, 3, 4, 5]
137
 #define EXTRUDERS 1
137
 #define EXTRUDERS 1
138
 
138
 
139
+// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
140
+#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75
141
+
139
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
142
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
140
 //#define SINGLENOZZLE
143
 //#define SINGLENOZZLE
141
 
144
 
336
 
339
 
337
 // Comment the following line to disable PID and enable bang-bang.
340
 // Comment the following line to disable PID and enable bang-bang.
338
 #define PIDTEMP
341
 #define PIDTEMP
339
-#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
340
-#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
342
+#define BANG_MAX 255     // Limits current to nozzle while in bang-bang mode; 255=full current
343
+#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
344
+#define PID_K1 0.95      // Smoothing factor within the PID
341
 #if ENABLED(PIDTEMP)
345
 #if ENABLED(PIDTEMP)
342
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
346
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
343
   //#define PID_DEBUG // Sends debug data to the serial port.
347
   //#define PID_DEBUG // Sends debug data to the serial port.
347
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
351
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
348
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
352
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
349
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
353
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
350
-  #define K1 0.95 //smoothing factor within the PID
351
 
354
 
352
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
355
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
353
 
356
 
428
 //===========================================================================
431
 //===========================================================================
429
 
432
 
430
 /**
433
 /**
431
- * Thermal Protection protects your printer from damage and fire if a
432
- * thermistor falls out or temperature sensors fail in any way.
434
+ * Thermal Protection provides additional protection to your printer from damage
435
+ * and fire. Marlin always includes safe min and max temperature ranges which
436
+ * protect against a broken or disconnected thermistor wire.
433
  *
437
  *
434
- * The issue: If a thermistor falls out or a temperature sensor fails,
435
- * Marlin can no longer sense the actual temperature. Since a disconnected
436
- * thermistor reads as a low temperature, the firmware will keep the heater on.
438
+ * The issue: If a thermistor falls out, it will report the much lower
439
+ * temperature of the air in the room, and the the firmware will keep
440
+ * the heater on.
437
  *
441
  *
438
  * If you get "Thermal Runaway" or "Heating failed" errors the
442
  * If you get "Thermal Runaway" or "Heating failed" errors the
439
  * details can be tuned in Configuration_adv.h
443
  * details can be tuned in Configuration_adv.h
604
 // @section probes
608
 // @section probes
605
 
609
 
606
 //
610
 //
607
-// See http://marlinfw.org/configuration/probes.html
611
+// See http://marlinfw.org/docs/configuration/probes.html
608
 //
612
 //
609
 
613
 
610
 /**
614
 /**
717
 // X and Y axis travel speed (mm/m) between probes
721
 // X and Y axis travel speed (mm/m) between probes
718
 #define XY_PROBE_SPEED 8000
722
 #define XY_PROBE_SPEED 8000
719
 
723
 
720
-// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH)
724
+// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
721
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
725
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
722
 
726
 
723
 // Speed for the "accurate" probe of each point
727
 // Speed for the "accurate" probe of each point
724
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
728
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
725
 
729
 
726
-// Use double touch for probing
727
-//#define PROBE_DOUBLE_TOUCH
730
+// The number of probes to perform at each point.
731
+//   Set to 2 for a fast/slow probe, using the second probe result.
732
+//   Set to 3 or more for slow probes, averaging the results.
733
+//#define MULTIPLE_PROBING 2
728
 
734
 
729
 /**
735
 /**
730
  * Z probes require clearance when deploying, stowing, and moving between
736
  * Z probes require clearance when deploying, stowing, and moving between
816
 #define Y_MAX_POS Y_BED_SIZE
822
 #define Y_MAX_POS Y_BED_SIZE
817
 #define Z_MAX_POS 170
823
 #define Z_MAX_POS 170
818
 
824
 
819
-// If enabled, axes won't move below MIN_POS in response to movement commands.
825
+/**
826
+ * Software Endstops
827
+ *
828
+ * - Prevent moves outside the set machine bounds.
829
+ * - Individual axes can be disabled, if desired.
830
+ * - X and Y only apply to Cartesian robots.
831
+ * - Use 'M211' to set software endstops on/off or report current state
832
+ */
833
+
834
+// Min software endstops curtail movement below minimum coordinate bounds
820
 #define MIN_SOFTWARE_ENDSTOPS
835
 #define MIN_SOFTWARE_ENDSTOPS
821
-// If enabled, axes won't move above MAX_POS in response to movement commands.
836
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
837
+  #define MIN_SOFTWARE_ENDSTOP_X
838
+  #define MIN_SOFTWARE_ENDSTOP_Y
839
+  #define MIN_SOFTWARE_ENDSTOP_Z
840
+#endif
841
+
842
+// Max software endstops curtail movement above maximum coordinate bounds
822
 #define MAX_SOFTWARE_ENDSTOPS
843
 #define MAX_SOFTWARE_ENDSTOPS
844
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
845
+  #define MAX_SOFTWARE_ENDSTOP_X
846
+  #define MAX_SOFTWARE_ENDSTOP_Y
847
+  #define MAX_SOFTWARE_ENDSTOP_Z
848
+#endif
823
 
849
 
824
 /**
850
 /**
825
  * Filament Runout Sensor
851
  * Filament Runout Sensor
839
 //===========================================================================
865
 //===========================================================================
840
 //=============================== Bed Leveling ==============================
866
 //=============================== Bed Leveling ==============================
841
 //===========================================================================
867
 //===========================================================================
842
-// @section bedlevel
868
+// @section calibrate
843
 
869
 
844
 /**
870
 /**
845
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
871
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
865
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
891
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
866
  *   A comprehensive bed leveling system combining the features and benefits
892
  *   A comprehensive bed leveling system combining the features and benefits
867
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
893
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
868
- *   Validation and Mesh Editing systems. Currently, UBL is only checked out
869
- *   for Cartesian Printers. That said, it was primarily designed to correct
870
- *   poor quality Delta Printers. If you feel adventurous and have a Delta,
871
- *   please post an issue if something doesn't work correctly. Initially,
872
- *   you will need to set a reduced bed size so you have a rectangular area
873
- *   to test on.
894
+ *   Validation and Mesh Editing systems.
874
  *
895
  *
875
  * - MESH_BED_LEVELING
896
  * - MESH_BED_LEVELING
876
  *   Probe a grid manually
897
  *   Probe a grid manually
897
   // at which point movement will be level to the machine's XY plane.
918
   // at which point movement will be level to the machine's XY plane.
898
   // The height can be set with M420 Z<height>
919
   // The height can be set with M420 Z<height>
899
   #define ENABLE_LEVELING_FADE_HEIGHT
920
   #define ENABLE_LEVELING_FADE_HEIGHT
921
+
922
+  // For Cartesian machines, instead of dividing moves on mesh boundaries,
923
+  // split up moves into short segments like a Delta. This follows the
924
+  // contours of the bed more closely than edge-to-edge straight moves.
925
+  #define SEGMENT_LEVELED_MOVES
926
+  #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)
927
+
928
+  /**
929
+   * Enable the G26 Mesh Validation Pattern tool.
930
+   */
931
+  //#define G26_MESH_VALIDATION   // Enable G26 mesh validation
932
+  #if ENABLED(G26_MESH_VALIDATION)
933
+    #define MESH_TEST_NOZZLE_SIZE     0.4   // (mm) Diameter of primary nozzle.
934
+    #define MESH_TEST_LAYER_HEIGHT    0.2   // (mm) Default layer height for the G26 Mesh Validation Tool.
935
+    #define MESH_TEST_HOTEND_TEMP   205.0   // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
936
+    #define MESH_TEST_BED_TEMP       60.0   // (°C) Default bed temperature for the G26 Mesh Validation Tool.
937
+  #endif
938
+
900
 #endif
939
 #endif
901
 
940
 
902
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
941
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
952
   //========================= Unified Bed Leveling ============================
991
   //========================= Unified Bed Leveling ============================
953
   //===========================================================================
992
   //===========================================================================
954
 
993
 
955
-  #define UBL_MESH_INSET 1          // Mesh inset margin on print area
994
+  //#define MESH_EDIT_GFX_OVERLAY   // Display a graphics overlay while editing the mesh
995
+
996
+  #define MESH_INSET 1              // Mesh inset margin on print area
956
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
997
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
957
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
998
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
958
 
999
 
963
   #define UBL_PROBE_PT_3_X 180
1004
   #define UBL_PROBE_PT_3_X 180
964
   #define UBL_PROBE_PT_3_Y 20
1005
   #define UBL_PROBE_PT_3_Y 20
965
 
1006
 
966
-  //#define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
967
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
1007
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
1008
+  #define UBL_SAVE_ACTIVE_ON_M500   // Save the currently active mesh in the current slot on M500
968
 
1009
 
969
 #elif ENABLED(MESH_BED_LEVELING)
1010
 #elif ENABLED(MESH_BED_LEVELING)
970
 
1011
 
1024
 //#define Z_SAFE_HOMING
1065
 //#define Z_SAFE_HOMING
1025
 
1066
 
1026
 #if ENABLED(Z_SAFE_HOMING)
1067
 #if ENABLED(Z_SAFE_HOMING)
1027
-  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axis (G28).
1028
-  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axis (G28).
1068
+  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axes (G28).
1069
+  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axes (G28).
1029
 #endif
1070
 #endif
1030
 
1071
 
1031
 // Homing speeds (mm/m)
1072
 // Homing speeds (mm/m)
1032
 #define HOMING_FEEDRATE_XY (50*60)
1073
 #define HOMING_FEEDRATE_XY (50*60)
1033
 #define HOMING_FEEDRATE_Z  (6*60)
1074
 #define HOMING_FEEDRATE_Z  (6*60)
1034
 
1075
 
1076
+// @section calibrate
1077
+
1078
+/**
1079
+ * Bed Skew Compensation
1080
+ *
1081
+ * This feature corrects for misalignment in the XYZ axes.
1082
+ *
1083
+ * Take the following steps to get the bed skew in the XY plane:
1084
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1085
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1086
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1087
+ *  4. For XY_SIDE_AD measure the edge A to D
1088
+ *
1089
+ * Marlin automatically computes skew factors from these measurements.
1090
+ * Skew factors may also be computed and set manually:
1091
+ *
1092
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1093
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1094
+ *
1095
+ * If desired, follow the same procedure for XZ and YZ.
1096
+ * Use these diagrams for reference:
1097
+ *
1098
+ *    Y                     Z                     Z
1099
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1100
+ *    |    /       /        |    /       /        |    /       /
1101
+ *    |   /       /         |   /       /         |   /       /
1102
+ *    |  A-------D          |  A-------D          |  A-------D
1103
+ *    +-------------->X     +-------------->X     +-------------->Y
1104
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1105
+ */
1106
+//#define SKEW_CORRECTION
1107
+
1108
+#if ENABLED(SKEW_CORRECTION)
1109
+  // Input all length measurements here:
1110
+  #define XY_DIAG_AC 282.8427124746
1111
+  #define XY_DIAG_BD 282.8427124746
1112
+  #define XY_SIDE_AD 200
1113
+
1114
+  // Or, set the default skew factors directly here
1115
+  // to override the above measurements:
1116
+  #define XY_SKEW_FACTOR 0.0
1117
+
1118
+  //#define SKEW_CORRECTION_FOR_Z
1119
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1120
+    #define XZ_DIAG_AC 282.8427124746
1121
+    #define XZ_DIAG_BD 282.8427124746
1122
+    #define YZ_DIAG_AC 282.8427124746
1123
+    #define YZ_DIAG_BD 282.8427124746
1124
+    #define YZ_SIDE_AD 200
1125
+    #define XZ_SKEW_FACTOR 0.0
1126
+    #define YZ_SKEW_FACTOR 0.0
1127
+  #endif
1128
+
1129
+  // Enable this option for M852 to set skew at runtime
1130
+  //#define SKEW_CORRECTION_GCODE
1131
+#endif
1132
+
1035
 //=============================================================================
1133
 //=============================================================================
1036
 //============================= Additional Features ===========================
1134
 //============================= Additional Features ===========================
1037
 //=============================================================================
1135
 //=============================================================================
1063
 //
1161
 //
1064
 // M100 Free Memory Watcher
1162
 // M100 Free Memory Watcher
1065
 //
1163
 //
1066
-//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
1164
+//#define M100_FREE_MEMORY_WATCHER    // Add M100 (Free Memory Watcher) to debug memory usage
1067
 
1165
 
1068
 //
1166
 //
1069
 // G20/G21 Inch mode support
1167
 // G20/G21 Inch mode support
1212
  *    it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, tr, uk,
1310
  *    it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, tr, uk,
1213
  *    zh_CN, zh_TW, test
1311
  *    zh_CN, zh_TW, test
1214
  *
1312
  *
1215
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1313
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1216
  */
1314
  */
1217
 #define LCD_LANGUAGE en
1315
 #define LCD_LANGUAGE en
1218
 
1316
 
1340
 // Note: Test audio output with the G-Code:
1438
 // Note: Test audio output with the G-Code:
1341
 //  M300 S<frequency Hz> P<duration ms>
1439
 //  M300 S<frequency Hz> P<duration ms>
1342
 //
1440
 //
1343
-//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
1344
-//#define LCD_FEEDBACK_FREQUENCY_HZ 1000
1441
+//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
1442
+//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
1345
 
1443
 
1346
 //
1444
 //
1347
 // CONTROLLER TYPE: Standard
1445
 // CONTROLLER TYPE: Standard
1449
 //#define CARTESIO_UI
1547
 //#define CARTESIO_UI
1450
 
1548
 
1451
 //
1549
 //
1452
-// ANET_10 Controller supported displays.
1550
+// ANET and Tronxy Controller supported displays.
1453
 //
1551
 //
1454
-//#define ANET_KEYPAD_LCD         // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1552
+//#define ZONESTAR_LCD            // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1455
                                   // This LCD is known to be susceptible to electrical interference
1553
                                   // This LCD is known to be susceptible to electrical interference
1456
                                   // which scrambles the display.  Pressing any button clears it up.
1554
                                   // which scrambles the display.  Pressing any button clears it up.
1555
+                                  // This is a LCD2004 display with 5 analog buttons.
1556
+
1457
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1557
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1458
                                   // A clone of the RepRapDiscount full graphics display but with
1558
                                   // A clone of the RepRapDiscount full graphics display but with
1459
                                   // different pins/wiring (see pins_ANET_10.h).
1559
                                   // different pins/wiring (see pins_ANET_10.h).
1563
 //
1663
 //
1564
 //#define MKS_12864OLED
1664
 //#define MKS_12864OLED
1565
 
1665
 
1666
+// Silvergate GLCD controller
1667
+// http://github.com/android444/Silvergate
1668
+//
1669
+//#define SILVER_GATE_GLCD_CONTROLLER
1670
+
1566
 //=============================================================================
1671
 //=============================================================================
1567
 //=============================== Extra Features ==============================
1672
 //=============================== Extra Features ==============================
1568
 //=============================================================================
1673
 //=============================================================================
1619
  * Adds the M150 command to set the LED (or LED strip) color.
1724
  * Adds the M150 command to set the LED (or LED strip) color.
1620
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1725
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1621
  * luminance values can be set from 0 to 255.
1726
  * luminance values can be set from 0 to 255.
1622
- * For Neopixel LED overall brightness parameters is also available 
1727
+ * For Neopixel LED an overall brightness parameter is also available.
1623
  *
1728
  *
1624
  * *** CAUTION ***
1729
  * *** CAUTION ***
1625
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1730
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1626
  *  as the Arduino cannot handle the current the LEDs will require.
1731
  *  as the Arduino cannot handle the current the LEDs will require.
1627
  *  Failure to follow this precaution can destroy your Arduino!
1732
  *  Failure to follow this precaution can destroy your Arduino!
1628
- *  The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
1629
- *  cannot handle such current, separate 5V power supply must be used
1733
+ *  NOTE: A separate 5V power supply is required! The Neopixel LED needs
1734
+ *  more current than the Arduino 5V linear regulator can produce.
1630
  * *** CAUTION ***
1735
  * *** CAUTION ***
1631
  *
1736
  *
1632
- * LED type. This options are mutualy exclusive. Uncomment only one.
1737
+ * LED Type. Enable only one of the following two options.
1633
  *
1738
  *
1634
  */
1739
  */
1635
 #define RGB_LED
1740
 #define RGB_LED
1645
 // Support for Adafruit Neopixel LED driver
1750
 // Support for Adafruit Neopixel LED driver
1646
 //#define NEOPIXEL_LED
1751
 //#define NEOPIXEL_LED
1647
 #if ENABLED(NEOPIXEL_LED)
1752
 #if ENABLED(NEOPIXEL_LED)
1648
-  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
1753
+  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
1649
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1754
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1650
-  #define NEOPIXEL_PIXELS 30       // Number of LEDs on strip
1651
-  #define NEOPIXEL_IS_SEQUENTIAL   // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
1652
-  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness 0-255
1755
+  #define NEOPIXEL_PIXELS 30       // Number of LEDs in the strip
1756
+  #define NEOPIXEL_IS_SEQUENTIAL   // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
1757
+  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness (0-255)
1653
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1758
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1654
 #endif
1759
 #endif
1655
 
1760
 
1664
  *  - Change to green once print has finished
1769
  *  - Change to green once print has finished
1665
  *  - Turn off after the print has finished and the user has pushed a button
1770
  *  - Turn off after the print has finished and the user has pushed a button
1666
  */
1771
  */
1667
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED)
1772
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
1668
   #define PRINTER_EVENT_LEDS
1773
   #define PRINTER_EVENT_LEDS
1669
 #endif
1774
 #endif
1670
 
1775
 
1671
-/*********************************************************************\
1672
-* R/C SERVO support
1673
-* Sponsored by TrinityLabs, Reworked by codexmas
1674
-**********************************************************************/
1776
+/**
1777
+ * R/C SERVO support
1778
+ * Sponsored by TrinityLabs, Reworked by codexmas
1779
+ */
1675
 
1780
 
1676
-// Number of servos
1677
-//
1678
-// If you select a configuration below, this will receive a default value and does not need to be set manually
1679
-// set it manually if you have more servos than extruders and wish to manually control some
1680
-// leaving it undefined or defining as 0 will disable the servo subsystem
1681
-// If unsure, leave commented / disabled
1682
-//
1781
+/**
1782
+ * Number of servos
1783
+ *
1784
+ * For some servo-related options NUM_SERVOS will be set automatically.
1785
+ * Set this manually if there are extra servos needing manual control.
1786
+ * Leave undefined or set to 0 to entirely disable the servo subsystem.
1787
+ */
1683
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1788
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1684
 
1789
 
1685
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1790
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1692
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1797
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1693
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1798
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1694
 
1799
 
1695
-/**
1696
- * Filament Width Sensor
1697
- *
1698
- * Measures the filament width in real-time and adjusts
1699
- * flow rate to compensate for any irregularities.
1700
- *
1701
- * Also allows the measured filament diameter to set the
1702
- * extrusion rate, so the slicer only has to specify the
1703
- * volume.
1704
- *
1705
- * Only a single extruder is supported at this time.
1706
- *
1707
- *  34 RAMPS_14    : Analog input 5 on the AUX2 connector
1708
- *  81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
1709
- * 301 RAMBO       : Analog input 3
1710
- *
1711
- * Note: May require analog pins to be defined for other boards.
1712
- */
1713
-//#define FILAMENT_WIDTH_SENSOR
1714
-
1715
-#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75   // (mm) Diameter of the filament generally used (3.0 or 1.75mm), also used in the slicer. Used to validate sensor reading.
1716
-
1717
-#if ENABLED(FILAMENT_WIDTH_SENSOR)
1718
-  #define FILAMENT_SENSOR_EXTRUDER_NUM 0    // Index of the extruder that has the filament sensor (0,1,2,3)
1719
-  #define MEASUREMENT_DELAY_CM        14    // (cm) The distance from the filament sensor to the melting chamber
1720
-
1721
-  #define MEASURED_UPPER_LIMIT         3.30 // (mm) Upper limit used to validate sensor reading
1722
-  #define MEASURED_LOWER_LIMIT         1.90 // (mm) Lower limit used to validate sensor reading
1723
-  #define MAX_MEASUREMENT_DELAY       20    // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
1724
-
1725
-  #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
1726
-
1727
-  // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
1728
-  //#define FILAMENT_LCD_DISPLAY
1729
-#endif
1730
-
1731
 #endif // CONFIGURATION_H
1800
 #endif // CONFIGURATION_H

+ 268
- 125
Marlin/example_configurations/Sanguinololu/Configuration_adv.h Переглянути файл

32
  */
32
  */
33
 #ifndef CONFIGURATION_ADV_H
33
 #ifndef CONFIGURATION_ADV_H
34
 #define CONFIGURATION_ADV_H
34
 #define CONFIGURATION_ADV_H
35
-#define CONFIGURATION_ADV_H_VERSION 010100
35
+#define CONFIGURATION_ADV_H_VERSION 010107
36
 
36
 
37
 // @section temperature
37
 // @section temperature
38
 
38
 
48
 #endif
48
 #endif
49
 
49
 
50
 /**
50
 /**
51
- * Thermal Protection protects your printer from damage and fire if a
52
- * thermistor falls out or temperature sensors fail in any way.
51
+ * Thermal Protection provides additional protection to your printer from damage
52
+ * and fire. Marlin always includes safe min and max temperature ranges which
53
+ * protect against a broken or disconnected thermistor wire.
53
  *
54
  *
54
- * The issue: If a thermistor falls out or a temperature sensor fails,
55
- * Marlin can no longer sense the actual temperature. Since a disconnected
56
- * thermistor reads as a low temperature, the firmware will keep the heater on.
55
+ * The issue: If a thermistor falls out, it will report the much lower
56
+ * temperature of the air in the room, and the the firmware will keep
57
+ * the heater on.
57
  *
58
  *
58
  * The solution: Once the temperature reaches the target, start observing.
59
  * The solution: Once the temperature reaches the target, start observing.
59
- * If the temperature stays too far below the target (hysteresis) for too long (period),
60
- * the firmware will halt the machine as a safety precaution.
60
+ * If the temperature stays too far below the target (hysteresis) for too
61
+ * long (period), the firmware will halt the machine as a safety precaution.
61
  *
62
  *
62
- * If you get false positives for "Thermal Runaway" increase THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
63
+ * If you get false positives for "Thermal Runaway", increase
64
+ * THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
63
  */
65
  */
64
 #if ENABLED(THERMAL_PROTECTION_HOTENDS)
66
 #if ENABLED(THERMAL_PROTECTION_HOTENDS)
65
   #define THERMAL_PROTECTION_PERIOD 40        // Seconds
67
   #define THERMAL_PROTECTION_PERIOD 40        // Seconds
66
   #define THERMAL_PROTECTION_HYSTERESIS 4     // Degrees Celsius
68
   #define THERMAL_PROTECTION_HYSTERESIS 4     // Degrees Celsius
67
 
69
 
68
   /**
70
   /**
69
-   * Whenever an M104 or M109 increases the target temperature the firmware will wait for the
70
-   * WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
71
-   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
72
-   * but only if the current temperature is far enough below the target for a reliable test.
71
+   * Whenever an M104, M109, or M303 increases the target temperature, the
72
+   * firmware will wait for the WATCH_TEMP_PERIOD to expire. If the temperature
73
+   * hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted and
74
+   * requires a hard reset. This test restarts with any M104/M109/M303, but only
75
+   * if the current temperature is far enough below the target for a reliable
76
+   * test.
73
    *
77
    *
74
-   * If you get false positives for "Heating failed" increase WATCH_TEMP_PERIOD and/or decrease WATCH_TEMP_INCREASE
75
-   * WATCH_TEMP_INCREASE should not be below 2.
78
+   * If you get false positives for "Heating failed", increase WATCH_TEMP_PERIOD
79
+   * and/or decrease WATCH_TEMP_INCREASE. WATCH_TEMP_INCREASE should not be set
80
+   * below 2.
76
    */
81
    */
77
   #define WATCH_TEMP_PERIOD 20                // Seconds
82
   #define WATCH_TEMP_PERIOD 20                // Seconds
78
   #define WATCH_TEMP_INCREASE 2               // Degrees Celsius
83
   #define WATCH_TEMP_INCREASE 2               // Degrees Celsius
86
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
91
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
87
 
92
 
88
   /**
93
   /**
89
-   * Whenever an M140 or M190 increases the target temperature the firmware will wait for the
90
-   * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE
91
-   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190,
92
-   * but only if the current temperature is far enough below the target for a reliable test.
93
-   *
94
-   * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease
95
-   * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.)
94
+   * As described above, except for the bed (M140/M190/M303).
96
    */
95
    */
97
   #define WATCH_BED_TEMP_PERIOD 60                // Seconds
96
   #define WATCH_BED_TEMP_PERIOD 60                // Seconds
98
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
97
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
123
   #define AUTOTEMP_OLDWEIGHT 0.98
122
   #define AUTOTEMP_OLDWEIGHT 0.98
124
 #endif
123
 #endif
125
 
124
 
125
+// Show extra position information in M114
126
+//#define M114_DETAIL
127
+
126
 // Show Temperature ADC value
128
 // Show Temperature ADC value
127
 // Enable for M105 to include ADC values read from temperature sensors.
129
 // Enable for M105 to include ADC values read from temperature sensors.
128
 //#define SHOW_TEMP_ADC_VALUES
130
 //#define SHOW_TEMP_ADC_VALUES
246
 
248
 
247
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
249
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
248
 
250
 
249
-// Dual X Steppers
250
-// Uncomment this option to drive two X axis motors.
251
-// The next unused E driver will be assigned to the second X stepper.
251
+/**
252
+ * Dual Steppers / Dual Endstops
253
+ *
254
+ * This section will allow you to use extra E drivers to drive a second motor for X, Y, or Z axes.
255
+ *
256
+ * For example, set X_DUAL_STEPPER_DRIVERS setting to use a second motor. If the motors need to
257
+ * spin in opposite directions set INVERT_X2_VS_X_DIR. If the second motor needs its own endstop
258
+ * set X_DUAL_ENDSTOPS. This can adjust for "racking." Use X2_USE_ENDSTOP to set the endstop plug
259
+ * that should be used for the second endstop. Extra endstops will appear in the output of 'M119'.
260
+ *
261
+ * Use X_DUAL_ENDSTOP_ADJUSTMENT to adjust for mechanical imperfection. After homing both motors
262
+ * this offset is applied to the X2 motor. To find the offset home the X axis, and measure the error
263
+ * in X2. Dual endstop offsets can be set at runtime with 'M666 X<offset> Y<offset> Z<offset>'.
264
+ */
265
+
252
 //#define X_DUAL_STEPPER_DRIVERS
266
 //#define X_DUAL_STEPPER_DRIVERS
253
 #if ENABLED(X_DUAL_STEPPER_DRIVERS)
267
 #if ENABLED(X_DUAL_STEPPER_DRIVERS)
254
-  // Set true if the two X motors need to rotate in opposite directions
255
-  #define INVERT_X2_VS_X_DIR true
268
+  #define INVERT_X2_VS_X_DIR true   // Set 'true' if X motors should rotate in opposite directions
269
+  //#define X_DUAL_ENDSTOPS
270
+  #if ENABLED(X_DUAL_ENDSTOPS)
271
+    #define X2_USE_ENDSTOP _XMAX_
272
+    #define X_DUAL_ENDSTOPS_ADJUSTMENT  0
273
+  #endif
256
 #endif
274
 #endif
257
 
275
 
258
-// Dual Y Steppers
259
-// Uncomment this option to drive two Y axis motors.
260
-// The next unused E driver will be assigned to the second Y stepper.
261
 //#define Y_DUAL_STEPPER_DRIVERS
276
 //#define Y_DUAL_STEPPER_DRIVERS
262
 #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
277
 #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
263
-  // Set true if the two Y motors need to rotate in opposite directions
264
-  #define INVERT_Y2_VS_Y_DIR true
278
+  #define INVERT_Y2_VS_Y_DIR true   // Set 'true' if Y motors should rotate in opposite directions
279
+  //#define Y_DUAL_ENDSTOPS
280
+  #if ENABLED(Y_DUAL_ENDSTOPS)
281
+    #define Y2_USE_ENDSTOP _YMAX_
282
+    #define Y_DUAL_ENDSTOPS_ADJUSTMENT  0
283
+  #endif
265
 #endif
284
 #endif
266
 
285
 
267
-// A single Z stepper driver is usually used to drive 2 stepper motors.
268
-// Uncomment this option to use a separate stepper driver for each Z axis motor.
269
-// The next unused E driver will be assigned to the second Z stepper.
270
 //#define Z_DUAL_STEPPER_DRIVERS
286
 //#define Z_DUAL_STEPPER_DRIVERS
271
-
272
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
287
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
273
-
274
-  // Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper.
275
-  // That way the machine is capable to align the bed during home, since both Z steppers are homed.
276
-  // There is also an implementation of M666 (software endstops adjustment) to this feature.
277
-  // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed.
278
-  // One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2.
279
-  // If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive.
280
-  // Play a little bit with small adjustments (0.5mm) and check the behaviour.
281
-  // The M119 (endstops report) will start reporting the Z2 Endstop as well.
282
-
283
   //#define Z_DUAL_ENDSTOPS
288
   //#define Z_DUAL_ENDSTOPS
284
-
285
   #if ENABLED(Z_DUAL_ENDSTOPS)
289
   #if ENABLED(Z_DUAL_ENDSTOPS)
286
     #define Z2_USE_ENDSTOP _XMAX_
290
     #define Z2_USE_ENDSTOP _XMAX_
287
-    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0  // Use M666 to determine/test this value
291
+    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0
288
   #endif
292
   #endif
289
-
290
-#endif // Z_DUAL_STEPPER_DRIVERS
293
+#endif
291
 
294
 
292
 // Enable this for dual x-carriage printers.
295
 // Enable this for dual x-carriage printers.
293
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
296
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
334
 
337
 
335
 // @section homing
338
 // @section homing
336
 
339
 
337
-//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
340
+// Homing hits each endstop, retracts by these distances, then does a slower bump.
338
 #define X_HOME_BUMP_MM 5
341
 #define X_HOME_BUMP_MM 5
339
 #define Y_HOME_BUMP_MM 5
342
 #define Y_HOME_BUMP_MM 5
340
 #define Z_HOME_BUMP_MM 2
343
 #define Z_HOME_BUMP_MM 2
341
-#define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
342
-#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
344
+#define HOMING_BUMP_DIVISOR { 2, 2, 4 }  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
345
+#define QUICK_HOME                       // If homing includes X and Y, do a diagonal move initially
343
 
346
 
344
 // When G28 is called, this option will make Y home before X
347
 // When G28 is called, this option will make Y home before X
345
 //#define HOME_Y_BEFORE_X
348
 //#define HOME_Y_BEFORE_X
423
 //#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 }   // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
426
 //#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 }   // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
424
 //#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 }    // Default drive percent - X, Y, Z, E axis
427
 //#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 }    // Default drive percent - X, Y, Z, E axis
425
 
428
 
426
-// Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
429
+// Use an I2C based DIGIPOT (e.g., Azteeg X3 Pro)
427
 //#define DIGIPOT_I2C
430
 //#define DIGIPOT_I2C
431
+#if ENABLED(DIGIPOT_I2C) && !defined(DIGIPOT_I2C_ADDRESS_A)
432
+  /**
433
+   * Common slave addresses:
434
+   *
435
+   *                    A   (A shifted)   B   (B shifted)  IC
436
+   * Smoothie          0x2C (0x58)       0x2D (0x5A)       MCP4451
437
+   * AZTEEG_X3_PRO     0x2C (0x58)       0x2E (0x5C)       MCP4451
438
+   * MIGHTYBOARD_REVE  0x2F (0x5E)                         MCP4018
439
+   */
440
+  #define DIGIPOT_I2C_ADDRESS_A 0x2C  // unshifted slave address for first DIGIPOT
441
+  #define DIGIPOT_I2C_ADDRESS_B 0x2D  // unshifted slave address for second DIGIPOT
442
+#endif
443
+
428
 //#define DIGIPOT_MCP4018          // Requires library from https://github.com/stawel/SlowSoftI2CMaster
444
 //#define DIGIPOT_MCP4018          // Requires library from https://github.com/stawel/SlowSoftI2CMaster
429
 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4     AZTEEG_X3_PRO: 8
445
 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4     AZTEEG_X3_PRO: 8
430
 // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
446
 // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
455
 // The timeout (in ms) to return to the status screen from sub-menus
471
 // The timeout (in ms) to return to the status screen from sub-menus
456
 //#define LCD_TIMEOUT_TO_STATUS 15000
472
 //#define LCD_TIMEOUT_TO_STATUS 15000
457
 
473
 
474
+/**
475
+ * LED Control Menu
476
+ * Enable this feature to add LED Control to the LCD menu
477
+ */
478
+//#define LED_CONTROL_MENU
479
+#if ENABLED(LED_CONTROL_MENU)
480
+  #define LED_COLOR_PRESETS                 // Enable the Preset Color menu option
481
+  #if ENABLED(LED_COLOR_PRESETS)
482
+    #define LED_USER_PRESET_RED        255  // User defined RED value
483
+    #define LED_USER_PRESET_GREEN      128  // User defined GREEN value
484
+    #define LED_USER_PRESET_BLUE         0  // User defined BLUE value
485
+    #define LED_USER_PRESET_WHITE      255  // User defined WHITE value
486
+    #define LED_USER_PRESET_BRIGHTNESS 255  // User defined intensity
487
+    //#define LED_USER_PRESET_STARTUP       // Have the printer display the user preset color on startup
488
+  #endif
489
+#endif // LED_CONTROL_MENU
490
+
458
 #if ENABLED(SDSUPPORT)
491
 #if ENABLED(SDSUPPORT)
459
 
492
 
460
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
493
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
464
   // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
497
   // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
465
   #define SD_DETECT_INVERTED
498
   #define SD_DETECT_INVERTED
466
 
499
 
467
-  #define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
500
+  #define SD_FINISHED_STEPPERRELEASE true          // Disable steppers when SD Print is finished
468
   #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
501
   #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
469
 
502
 
470
-  #define SDCARD_RATHERRECENTFIRST  //reverse file order of sd card menu display. Its sorted practically after the file system block order.
471
-  // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that.
472
-  // using:
503
+  // Reverse SD sort to show "more recent" files first, according to the card's FAT.
504
+  // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended.
505
+  #define SDCARD_RATHERRECENTFIRST
506
+
507
+  // Add an option in the menu to run all auto#.g files
473
   //#define MENU_ADDAUTOSTART
508
   //#define MENU_ADDAUTOSTART
474
 
509
 
475
   /**
510
   /**
506
     #define SDSORT_USES_STACK  false  // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
541
     #define SDSORT_USES_STACK  false  // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
507
     #define SDSORT_CACHE_NAMES false  // Keep sorted items in RAM longer for speedy performance. Most expensive option.
542
     #define SDSORT_CACHE_NAMES false  // Keep sorted items in RAM longer for speedy performance. Most expensive option.
508
     #define SDSORT_DYNAMIC_RAM false  // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
543
     #define SDSORT_DYNAMIC_RAM false  // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
544
+    #define SDSORT_CACHE_VFATS 2      // Maximum number of 13-byte VFAT entries to use for sorting.
545
+                                      // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM.
509
   #endif
546
   #endif
510
 
547
 
511
   // Show a progress bar on HD44780 LCDs for SD printing
548
   // Show a progress bar on HD44780 LCDs for SD printing
524
     //#define LCD_PROGRESS_BAR_TEST
561
     //#define LCD_PROGRESS_BAR_TEST
525
   #endif
562
   #endif
526
 
563
 
564
+  // Add an 'M73' G-code to set the current percentage
565
+  //#define LCD_SET_PROGRESS_MANUALLY
566
+
527
   // This allows hosts to request long names for files and folders with M33
567
   // This allows hosts to request long names for files and folders with M33
528
   //#define LONG_FILENAME_HOST_SUPPORT
568
   //#define LONG_FILENAME_HOST_SUPPORT
529
 
569
 
530
-  // This option allows you to abort SD printing when any endstop is triggered.
531
-  // This feature must be enabled with "M540 S1" or from the LCD menu.
532
-  // To have any effect, endstops must be enabled during SD printing.
570
+  // Enable this option to scroll long filenames in the SD card menu
571
+  //#define SCROLL_LONG_FILENAMES
572
+
573
+  /**
574
+   * This option allows you to abort SD printing when any endstop is triggered.
575
+   * This feature must be enabled with "M540 S1" or from the LCD menu.
576
+   * To have any effect, endstops must be enabled during SD printing.
577
+   */
533
   //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
578
   //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
534
 
579
 
580
+  /**
581
+   * This option makes it easier to print the same SD Card file again.
582
+   * On print completion the LCD Menu will open with the file selected.
583
+   * You can just click to start the print, or navigate elsewhere.
584
+   */
585
+  //#define SD_REPRINT_LAST_SELECTED_FILE
586
+
535
 #endif // SDSUPPORT
587
 #endif // SDSUPPORT
536
 
588
 
537
 /**
589
 /**
564
   // Enable this option and reduce the value to optimize screen updates.
616
   // Enable this option and reduce the value to optimize screen updates.
565
   // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
617
   // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
566
   //#define DOGM_SPI_DELAY_US 5
618
   //#define DOGM_SPI_DELAY_US 5
619
+
620
+  // Swap the CW/CCW indicators in the graphics overlay
621
+  //#define OVERLAY_GFX_REVERSE
622
+
567
 #endif // DOGLCD
623
 #endif // DOGLCD
568
 
624
 
569
 // @section safety
625
 // @section safety
592
 #if ENABLED(BABYSTEPPING)
648
 #if ENABLED(BABYSTEPPING)
593
   //#define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
649
   //#define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
594
   #define BABYSTEP_INVERT_Z false    // Change if Z babysteps should go the other way
650
   #define BABYSTEP_INVERT_Z false    // Change if Z babysteps should go the other way
595
-  #define BABYSTEP_MULTIPLICATOR 100 // Babysteps are very small. Increase for faster motion.
651
+  #define BABYSTEP_MULTIPLICATOR 1   // Babysteps are very small. Increase for faster motion.
596
   //#define BABYSTEP_ZPROBE_OFFSET   // Enable to combine M851 and Babystepping
652
   //#define BABYSTEP_ZPROBE_OFFSET   // Enable to combine M851 and Babystepping
597
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
653
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
598
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
654
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
599
                                         // Note: Extra time may be added to mitigate controller latency.
655
                                         // Note: Extra time may be added to mitigate controller latency.
600
   //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
656
   //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
601
-  //#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators
602
 #endif
657
 #endif
603
 
658
 
604
 // @section extruder
659
 // @section extruder
645
 
700
 
646
 // @section leveling
701
 // @section leveling
647
 
702
 
648
-// Default mesh area is an area with an inset margin on the print area.
649
-// Below are the macros that are used to define the borders for the mesh area,
650
-// made available here for specialized needs, ie dual extruder setup.
651
-#if ENABLED(MESH_BED_LEVELING)
652
-  #define MESH_MIN_X MESH_INSET
653
-  #define MESH_MAX_X (X_BED_SIZE - (MESH_INSET))
654
-  #define MESH_MIN_Y MESH_INSET
655
-  #define MESH_MAX_Y (Y_BED_SIZE - (MESH_INSET))
656
-#elif ENABLED(AUTO_BED_LEVELING_UBL)
657
-  #define UBL_MESH_MIN_X UBL_MESH_INSET
658
-  #define UBL_MESH_MAX_X (X_BED_SIZE - (UBL_MESH_INSET))
659
-  #define UBL_MESH_MIN_Y UBL_MESH_INSET
660
-  #define UBL_MESH_MAX_Y (Y_BED_SIZE - (UBL_MESH_INSET))
661
-
662
-  // If this is defined, the currently active mesh will be saved in the
663
-  // current slot on M500.
664
-  #define UBL_SAVE_ACTIVE_ON_M500
703
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
704
+  #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
705
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
706
+  #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
707
+#endif
708
+
709
+#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL)
710
+  // Override the mesh area if the automatic (max) area is too large
711
+  //#define MESH_MIN_X MESH_INSET
712
+  //#define MESH_MIN_Y MESH_INSET
713
+  //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET)
714
+  //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
665
 #endif
715
 #endif
666
 
716
 
667
 // @section extras
717
 // @section extras
681
 //#define BEZIER_CURVE_SUPPORT
731
 //#define BEZIER_CURVE_SUPPORT
682
 
732
 
683
 // G38.2 and G38.3 Probe Target
733
 // G38.2 and G38.3 Probe Target
684
-// Enable PROBE_DOUBLE_TOUCH if you want G38 to double touch
734
+// Set MULTIPLE_PROBING if you want G38 to double touch
685
 //#define G38_PROBE_TARGET
735
 //#define G38_PROBE_TARGET
686
 #if ENABLED(G38_PROBE_TARGET)
736
 #if ENABLED(G38_PROBE_TARGET)
687
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
737
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
706
 // @section hidden
756
 // @section hidden
707
 
757
 
708
 // The number of linear motions that can be in the plan at any give time.
758
 // The number of linear motions that can be in the plan at any give time.
709
-// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2, i.g. 8,16,32 because shifts and ors are used to do the ring-buffering.
759
+// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2 (e.g. 8, 16, 32) because shifts and ors are used to do the ring-buffering.
710
 #if ENABLED(SDSUPPORT)
760
 #if ENABLED(SDSUPPORT)
711
   #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
761
   #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
712
 #else
762
 #else
775
 #endif
825
 #endif
776
 
826
 
777
 /**
827
 /**
828
+ * Extra Fan Speed
829
+ * Adds a secondary fan speed for each print-cooling fan.
830
+ *   'M106 P<fan> T3-255' : Set a secondary speed for <fan>
831
+ *   'M106 P<fan> T2'     : Use the set secondary speed
832
+ *   'M106 P<fan> T1'     : Restore the previous fan speed
833
+ */
834
+//#define EXTRA_FAN_SPEED
835
+
836
+/**
778
  * Advanced Pause
837
  * Advanced Pause
779
  * Experimental feature for filament change support and for parking the nozzle when paused.
838
  * Experimental feature for filament change support and for parking the nozzle when paused.
780
  * Adds the GCode M600 for initiating filament change.
839
  * Adds the GCode M600 for initiating filament change.
884
 
943
 
885
 #endif
944
 #endif
886
 
945
 
887
-// @section TMC2130
946
+// @section TMC2130, TMC2208
888
 
947
 
889
 /**
948
 /**
890
  * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
949
  * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
898
  */
957
  */
899
 //#define HAVE_TMC2130
958
 //#define HAVE_TMC2130
900
 
959
 
901
-#if ENABLED(HAVE_TMC2130)
960
+/**
961
+ * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
962
+ * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin.
963
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN
964
+ * to #_SERIAL_TX_PIN with a 1K resistor.
965
+ * The drivers can also be used with hardware serial.
966
+ *
967
+ * You'll also need the TMC2208Stepper Arduino library
968
+ * (https://github.com/teemuatlut/TMC2208Stepper).
969
+ */
970
+//#define HAVE_TMC2208
971
+
972
+#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
902
 
973
 
903
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
974
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
904
   //#define X_IS_TMC2130
975
   //#define X_IS_TMC2130
913
   //#define E3_IS_TMC2130
984
   //#define E3_IS_TMC2130
914
   //#define E4_IS_TMC2130
985
   //#define E4_IS_TMC2130
915
 
986
 
987
+  //#define X_IS_TMC2208
988
+  //#define X2_IS_TMC2208
989
+  //#define Y_IS_TMC2208
990
+  //#define Y2_IS_TMC2208
991
+  //#define Z_IS_TMC2208
992
+  //#define Z2_IS_TMC2208
993
+  //#define E0_IS_TMC2208
994
+  //#define E1_IS_TMC2208
995
+  //#define E2_IS_TMC2208
996
+  //#define E3_IS_TMC2208
997
+  //#define E4_IS_TMC2208
998
+
916
   /**
999
   /**
917
    * Stepper driver settings
1000
    * Stepper driver settings
918
    */
1001
    */
919
 
1002
 
920
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1003
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
921
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1004
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
922
-  #define INTERPOLATE          1  // Interpolate X/Y/Z_MICROSTEPS to 256
1005
+  #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
923
 
1006
 
924
-  #define X_CURRENT         1000  // rms current in mA. Multiply by 1.41 for peak current.
1007
+  #define X_CURRENT          800  // rms current in mA. Multiply by 1.41 for peak current.
925
   #define X_MICROSTEPS        16  // 0..256
1008
   #define X_MICROSTEPS        16  // 0..256
926
 
1009
 
927
-  #define Y_CURRENT         1000
1010
+  #define Y_CURRENT          800
928
   #define Y_MICROSTEPS        16
1011
   #define Y_MICROSTEPS        16
929
 
1012
 
930
-  #define Z_CURRENT         1000
1013
+  #define Z_CURRENT          800
931
   #define Z_MICROSTEPS        16
1014
   #define Z_MICROSTEPS        16
932
 
1015
 
933
-  //#define X2_CURRENT      1000
934
-  //#define X2_MICROSTEPS     16
1016
+  #define X2_CURRENT         800
1017
+  #define X2_MICROSTEPS       16
935
 
1018
 
936
-  //#define Y2_CURRENT      1000
937
-  //#define Y2_MICROSTEPS     16
1019
+  #define Y2_CURRENT         800
1020
+  #define Y2_MICROSTEPS       16
938
 
1021
 
939
-  //#define Z2_CURRENT      1000
940
-  //#define Z2_MICROSTEPS     16
1022
+  #define Z2_CURRENT         800
1023
+  #define Z2_MICROSTEPS       16
941
 
1024
 
942
-  //#define E0_CURRENT      1000
943
-  //#define E0_MICROSTEPS     16
1025
+  #define E0_CURRENT         800
1026
+  #define E0_MICROSTEPS       16
944
 
1027
 
945
-  //#define E1_CURRENT      1000
946
-  //#define E1_MICROSTEPS     16
1028
+  #define E1_CURRENT         800
1029
+  #define E1_MICROSTEPS       16
947
 
1030
 
948
-  //#define E2_CURRENT      1000
949
-  //#define E2_MICROSTEPS     16
1031
+  #define E2_CURRENT         800
1032
+  #define E2_MICROSTEPS       16
950
 
1033
 
951
-  //#define E3_CURRENT      1000
952
-  //#define E3_MICROSTEPS     16
1034
+  #define E3_CURRENT         800
1035
+  #define E3_MICROSTEPS       16
953
 
1036
 
954
-  //#define E4_CURRENT      1000
955
-  //#define E4_MICROSTEPS     16
1037
+  #define E4_CURRENT         800
1038
+  #define E4_MICROSTEPS       16
956
 
1039
 
957
   /**
1040
   /**
958
    * Use Trinamic's ultra quiet stepping mode.
1041
    * Use Trinamic's ultra quiet stepping mode.
961
   #define STEALTHCHOP
1044
   #define STEALTHCHOP
962
 
1045
 
963
   /**
1046
   /**
964
-   * Let Marlin automatically control stepper current.
965
-   * This is still an experimental feature.
966
-   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
967
-   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
968
-   * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX
1047
+   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1048
+   * like overtemperature and short to ground. TMC2208 requires hardware serial.
1049
+   * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1050
+   * Other detected conditions can be used to stop the current print.
969
    * Relevant g-codes:
1051
    * Relevant g-codes:
970
    * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
1052
    * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
971
-   * M906 S1 - Start adjusting current
972
-   * M906 S0 - Stop adjusting current
973
    * M911 - Report stepper driver overtemperature pre-warn condition.
1053
    * M911 - Report stepper driver overtemperature pre-warn condition.
974
    * M912 - Clear stepper driver overtemperature pre-warn condition flag.
1054
    * M912 - Clear stepper driver overtemperature pre-warn condition flag.
1055
+   * M122 S0/1 - Report driver parameters (Requires TMC_DEBUG)
975
    */
1056
    */
976
-  //#define AUTOMATIC_CURRENT_CONTROL
1057
+  //#define MONITOR_DRIVER_STATUS
977
 
1058
 
978
-  #if ENABLED(AUTOMATIC_CURRENT_CONTROL)
979
-    #define CURRENT_STEP          50  // [mA]
980
-    #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
1059
+  #if ENABLED(MONITOR_DRIVER_STATUS)
1060
+    #define CURRENT_STEP_DOWN     50  // [mA]
981
     #define REPORT_CURRENT_CHANGE
1061
     #define REPORT_CURRENT_CHANGE
1062
+    #define STOP_ON_ERROR
982
   #endif
1063
   #endif
983
 
1064
 
984
   /**
1065
   /**
993
   #define X2_HYBRID_THRESHOLD    100
1074
   #define X2_HYBRID_THRESHOLD    100
994
   #define Y_HYBRID_THRESHOLD     100
1075
   #define Y_HYBRID_THRESHOLD     100
995
   #define Y2_HYBRID_THRESHOLD    100
1076
   #define Y2_HYBRID_THRESHOLD    100
996
-  #define Z_HYBRID_THRESHOLD       4
997
-  #define Z2_HYBRID_THRESHOLD      4
1077
+  #define Z_HYBRID_THRESHOLD       3
1078
+  #define Z2_HYBRID_THRESHOLD      3
998
   #define E0_HYBRID_THRESHOLD     30
1079
   #define E0_HYBRID_THRESHOLD     30
999
   #define E1_HYBRID_THRESHOLD     30
1080
   #define E1_HYBRID_THRESHOLD     30
1000
   #define E2_HYBRID_THRESHOLD     30
1081
   #define E2_HYBRID_THRESHOLD     30
1004
   /**
1085
   /**
1005
    * Use stallGuard2 to sense an obstacle and trigger an endstop.
1086
    * Use stallGuard2 to sense an obstacle and trigger an endstop.
1006
    * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
1087
    * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
1007
-   * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal.
1088
+   * X and Y homing will always be done in spreadCycle mode.
1008
    *
1089
    *
1009
    * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
1090
    * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
1010
    * Higher values make the system LESS sensitive.
1091
    * Higher values make the system LESS sensitive.
1013
    * It is advised to set X/Y_HOME_BUMP_MM to 0.
1094
    * It is advised to set X/Y_HOME_BUMP_MM to 0.
1014
    * M914 X/Y to live tune the setting
1095
    * M914 X/Y to live tune the setting
1015
    */
1096
    */
1016
-  //#define SENSORLESS_HOMING
1097
+  //#define SENSORLESS_HOMING // TMC2130 only
1017
 
1098
 
1018
   #if ENABLED(SENSORLESS_HOMING)
1099
   #if ENABLED(SENSORLESS_HOMING)
1019
-    #define X_HOMING_SENSITIVITY  19
1020
-    #define Y_HOMING_SENSITIVITY  19
1100
+    #define X_HOMING_SENSITIVITY  8
1101
+    #define Y_HOMING_SENSITIVITY  8
1021
   #endif
1102
   #endif
1022
 
1103
 
1023
   /**
1104
   /**
1105
+   * Enable M122 debugging command for TMC stepper drivers.
1106
+   * M122 S0/1 will enable continous reporting.
1107
+   */
1108
+  //#define TMC_DEBUG
1109
+
1110
+  /**
1024
    * You can set your own advanced settings by filling in predefined functions.
1111
    * You can set your own advanced settings by filling in predefined functions.
1025
    * A list of available functions can be found on the library github page
1112
    * A list of available functions can be found on the library github page
1026
    * https://github.com/teemuatlut/TMC2130Stepper
1113
    * https://github.com/teemuatlut/TMC2130Stepper
1114
+   * https://github.com/teemuatlut/TMC2208Stepper
1027
    *
1115
    *
1028
    * Example:
1116
    * Example:
1029
-   * #define TMC2130_ADV() { \
1117
+   * #define TMC_ADV() { \
1030
    *   stepperX.diag0_temp_prewarn(1); \
1118
    *   stepperX.diag0_temp_prewarn(1); \
1031
-   *   stepperX.interpolate(0); \
1119
+   *   stepperY.interpolate(0); \
1032
    * }
1120
    * }
1033
    */
1121
    */
1034
-  #define  TMC2130_ADV() {  }
1122
+  #define  TMC_ADV() {  }
1035
 
1123
 
1036
-#endif // HAVE_TMC2130
1124
+#endif // TMC2130 || TMC2208
1037
 
1125
 
1038
 // @section L6470
1126
 // @section L6470
1039
 
1127
 
1198
 #endif
1286
 #endif
1199
 
1287
 
1200
 /**
1288
 /**
1289
+ * Filament Width Sensor
1290
+ *
1291
+ * Measures the filament width in real-time and adjusts
1292
+ * flow rate to compensate for any irregularities.
1293
+ *
1294
+ * Also allows the measured filament diameter to set the
1295
+ * extrusion rate, so the slicer only has to specify the
1296
+ * volume.
1297
+ *
1298
+ * Only a single extruder is supported at this time.
1299
+ *
1300
+ *  34 RAMPS_14    : Analog input 5 on the AUX2 connector
1301
+ *  81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
1302
+ * 301 RAMBO       : Analog input 3
1303
+ *
1304
+ * Note: May require analog pins to be defined for other boards.
1305
+ */
1306
+//#define FILAMENT_WIDTH_SENSOR
1307
+
1308
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
1309
+  #define FILAMENT_SENSOR_EXTRUDER_NUM 0    // Index of the extruder that has the filament sensor. :[0,1,2,3,4]
1310
+  #define MEASUREMENT_DELAY_CM        14    // (cm) The distance from the filament sensor to the melting chamber
1311
+
1312
+  #define MEASURED_UPPER_LIMIT         3.30 // (mm) Upper limit used to validate sensor reading
1313
+  #define MEASURED_LOWER_LIMIT         1.90 // (mm) Lower limit used to validate sensor reading
1314
+  #define MAX_MEASUREMENT_DELAY       20    // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
1315
+
1316
+  #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
1317
+
1318
+  // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
1319
+  //#define FILAMENT_LCD_DISPLAY
1320
+#endif
1321
+
1322
+/**
1323
+ * CNC Coordinate Systems
1324
+ *
1325
+ * Enables G53 and G54-G59.3 commands to select coordinate systems
1326
+ * and G92.1 to reset the workspace to native machine space.
1327
+ */
1328
+//#define CNC_COORDINATE_SYSTEMS
1329
+
1330
+/**
1201
  * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
1331
  * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
1202
  */
1332
  */
1203
 //#define PINS_DEBUGGING
1333
 //#define PINS_DEBUGGING
1388
                                          // tweaks made to the configuration are affecting the printer in real-time.
1518
                                          // tweaks made to the configuration are affecting the printer in real-time.
1389
 #endif
1519
 #endif
1390
 
1520
 
1521
+/**
1522
+ * NanoDLP Sync support
1523
+ *
1524
+ * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
1525
+ * string to enable synchronization with DLP projector exposure. This change will allow to use
1526
+ * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
1527
+ */
1528
+//#define NANODLP_Z_SYNC
1529
+#if ENABLED(NANODLP_Z_SYNC)
1530
+  //#define NANODLP_ALL_AXIS  // Enables "Z_move_comp" output on any axis move.
1531
+                              // Default behaviour is limited to Z axis only.
1532
+#endif
1533
+
1391
 #endif // CONFIGURATION_ADV_H
1534
 #endif // CONFIGURATION_ADV_H

+ 159
- 90
Marlin/example_configurations/TinyBoy2/Configuration.h Переглянути файл

37
  */
37
  */
38
 #ifndef CONFIGURATION_H
38
 #ifndef CONFIGURATION_H
39
 #define CONFIGURATION_H
39
 #define CONFIGURATION_H
40
-#define CONFIGURATION_H_VERSION 010100
40
+#define CONFIGURATION_H_VERSION 010107
41
 
41
 
42
 /**
42
 /**
43
  * Sample configuration file for TinyBoy2 L10/L16
43
  * Sample configuration file for TinyBoy2 L10/L16
158
 // :[1, 2, 3, 4, 5]
158
 // :[1, 2, 3, 4, 5]
159
 #define EXTRUDERS 1
159
 #define EXTRUDERS 1
160
 
160
 
161
+// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
162
+#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75
163
+
161
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
164
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
162
 //#define SINGLENOZZLE
165
 //#define SINGLENOZZLE
163
 
166
 
363
 
366
 
364
 // Comment the following line to disable PID and enable bang-bang.
367
 // Comment the following line to disable PID and enable bang-bang.
365
 #define PIDTEMP
368
 #define PIDTEMP
366
-#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
367
-#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
369
+#define BANG_MAX 255     // Limits current to nozzle while in bang-bang mode; 255=full current
370
+#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
371
+#define PID_K1 0.95      // Smoothing factor within the PID
368
 #if ENABLED(PIDTEMP)
372
 #if ENABLED(PIDTEMP)
369
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
373
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
370
   //#define PID_DEBUG // Sends debug data to the serial port.
374
   //#define PID_DEBUG // Sends debug data to the serial port.
374
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
378
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
375
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
379
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
376
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
380
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
377
-  #define K1 0.95 //smoothing factor within the PID
378
 
381
 
379
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
382
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
380
 
383
 
478
 //===========================================================================
481
 //===========================================================================
479
 
482
 
480
 /**
483
 /**
481
- * Thermal Protection protects your printer from damage and fire if a
482
- * thermistor falls out or temperature sensors fail in any way.
484
+ * Thermal Protection provides additional protection to your printer from damage
485
+ * and fire. Marlin always includes safe min and max temperature ranges which
486
+ * protect against a broken or disconnected thermistor wire.
483
  *
487
  *
484
- * The issue: If a thermistor falls out or a temperature sensor fails,
485
- * Marlin can no longer sense the actual temperature. Since a disconnected
486
- * thermistor reads as a low temperature, the firmware will keep the heater on.
488
+ * The issue: If a thermistor falls out, it will report the much lower
489
+ * temperature of the air in the room, and the the firmware will keep
490
+ * the heater on.
487
  *
491
  *
488
  * If you get "Thermal Runaway" or "Heating failed" errors the
492
  * If you get "Thermal Runaway" or "Heating failed" errors the
489
  * details can be tuned in Configuration_adv.h
493
  * details can be tuned in Configuration_adv.h
624
 // @section probes
628
 // @section probes
625
 
629
 
626
 //
630
 //
627
-// See http://marlinfw.org/configuration/probes.html
631
+// See http://marlinfw.org/docs/configuration/probes.html
628
 //
632
 //
629
 
633
 
630
 /**
634
 /**
737
 // X and Y axis travel speed (mm/m) between probes
741
 // X and Y axis travel speed (mm/m) between probes
738
 #define XY_PROBE_SPEED 8000
742
 #define XY_PROBE_SPEED 8000
739
 
743
 
740
-// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH)
744
+// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
741
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
745
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
742
 
746
 
743
 // Speed for the "accurate" probe of each point
747
 // Speed for the "accurate" probe of each point
744
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
748
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
745
 
749
 
746
-// Use double touch for probing
747
-//#define PROBE_DOUBLE_TOUCH
750
+// The number of probes to perform at each point.
751
+//   Set to 2 for a fast/slow probe, using the second probe result.
752
+//   Set to 3 or more for slow probes, averaging the results.
753
+//#define MULTIPLE_PROBING 2
748
 
754
 
749
 /**
755
 /**
750
  * Z probes require clearance when deploying, stowing, and moving between
756
  * Z probes require clearance when deploying, stowing, and moving between
841
   #define Z_MAX_POS 158
847
   #define Z_MAX_POS 158
842
 #endif
848
 #endif
843
 
849
 
844
-// If enabled, axes won't move below MIN_POS in response to movement commands.
850
+/**
851
+ * Software Endstops
852
+ *
853
+ * - Prevent moves outside the set machine bounds.
854
+ * - Individual axes can be disabled, if desired.
855
+ * - X and Y only apply to Cartesian robots.
856
+ * - Use 'M211' to set software endstops on/off or report current state
857
+ */
858
+
859
+// Min software endstops curtail movement below minimum coordinate bounds
845
 #define MIN_SOFTWARE_ENDSTOPS
860
 #define MIN_SOFTWARE_ENDSTOPS
846
-// If enabled, axes won't move above MAX_POS in response to movement commands.
861
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
862
+  #define MIN_SOFTWARE_ENDSTOP_X
863
+  #define MIN_SOFTWARE_ENDSTOP_Y
864
+  #define MIN_SOFTWARE_ENDSTOP_Z
865
+#endif
866
+
867
+// Max software endstops curtail movement above maximum coordinate bounds
847
 #define MAX_SOFTWARE_ENDSTOPS
868
 #define MAX_SOFTWARE_ENDSTOPS
869
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
870
+  #define MAX_SOFTWARE_ENDSTOP_X
871
+  #define MAX_SOFTWARE_ENDSTOP_Y
872
+  #define MAX_SOFTWARE_ENDSTOP_Z
873
+#endif
848
 
874
 
849
 /**
875
 /**
850
  * Filament Runout Sensor
876
  * Filament Runout Sensor
864
 //===========================================================================
890
 //===========================================================================
865
 //=============================== Bed Leveling ==============================
891
 //=============================== Bed Leveling ==============================
866
 //===========================================================================
892
 //===========================================================================
867
-// @section bedlevel
893
+// @section calibrate
868
 
894
 
869
 /**
895
 /**
870
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
896
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
890
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
916
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
891
  *   A comprehensive bed leveling system combining the features and benefits
917
  *   A comprehensive bed leveling system combining the features and benefits
892
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
918
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
893
- *   Validation and Mesh Editing systems. Currently, UBL is only checked out
894
- *   for Cartesian Printers. That said, it was primarily designed to correct
895
- *   poor quality Delta Printers. If you feel adventurous and have a Delta,
896
- *   please post an issue if something doesn't work correctly. Initially,
897
- *   you will need to set a reduced bed size so you have a rectangular area
898
- *   to test on.
919
+ *   Validation and Mesh Editing systems.
899
  *
920
  *
900
  * - MESH_BED_LEVELING
921
  * - MESH_BED_LEVELING
901
  *   Probe a grid manually
922
  *   Probe a grid manually
922
   // at which point movement will be level to the machine's XY plane.
943
   // at which point movement will be level to the machine's XY plane.
923
   // The height can be set with M420 Z<height>
944
   // The height can be set with M420 Z<height>
924
   #define ENABLE_LEVELING_FADE_HEIGHT
945
   #define ENABLE_LEVELING_FADE_HEIGHT
946
+
947
+  // For Cartesian machines, instead of dividing moves on mesh boundaries,
948
+  // split up moves into short segments like a Delta. This follows the
949
+  // contours of the bed more closely than edge-to-edge straight moves.
950
+  #define SEGMENT_LEVELED_MOVES
951
+  #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)
952
+
953
+  /**
954
+   * Enable the G26 Mesh Validation Pattern tool.
955
+   */
956
+  //#define G26_MESH_VALIDATION   // Enable G26 mesh validation
957
+  #if ENABLED(G26_MESH_VALIDATION)
958
+    #define MESH_TEST_NOZZLE_SIZE     0.4   // (mm) Diameter of primary nozzle.
959
+    #define MESH_TEST_LAYER_HEIGHT    0.2   // (mm) Default layer height for the G26 Mesh Validation Tool.
960
+    #define MESH_TEST_HOTEND_TEMP   205.0   // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
961
+    #define MESH_TEST_BED_TEMP       60.0   // (°C) Default bed temperature for the G26 Mesh Validation Tool.
962
+  #endif
963
+
925
 #endif
964
 #endif
926
 
965
 
927
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
966
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
977
   //========================= Unified Bed Leveling ============================
1016
   //========================= Unified Bed Leveling ============================
978
   //===========================================================================
1017
   //===========================================================================
979
 
1018
 
980
-  #define UBL_MESH_INSET 1          // Mesh inset margin on print area
1019
+  //#define MESH_EDIT_GFX_OVERLAY   // Display a graphics overlay while editing the mesh
1020
+
1021
+  #define MESH_INSET 1              // Mesh inset margin on print area
981
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
1022
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
982
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
1023
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
983
 
1024
 
988
   #define UBL_PROBE_PT_3_X 180
1029
   #define UBL_PROBE_PT_3_X 180
989
   #define UBL_PROBE_PT_3_Y 20
1030
   #define UBL_PROBE_PT_3_Y 20
990
 
1031
 
991
-  #define UBL_G26_MESH_VALIDATION   // Enable G26 mesh validation
992
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
1032
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
1033
+  #define UBL_SAVE_ACTIVE_ON_M500   // Save the currently active mesh in the current slot on M500
993
 
1034
 
994
 #elif ENABLED(MESH_BED_LEVELING)
1035
 #elif ENABLED(MESH_BED_LEVELING)
995
 
1036
 
1049
 //#define Z_SAFE_HOMING
1090
 //#define Z_SAFE_HOMING
1050
 
1091
 
1051
 #if ENABLED(Z_SAFE_HOMING)
1092
 #if ENABLED(Z_SAFE_HOMING)
1052
-  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axis (G28).
1053
-  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axis (G28).
1093
+  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axes (G28).
1094
+  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axes (G28).
1054
 #endif
1095
 #endif
1055
 
1096
 
1056
 // Homing speeds (mm/m)
1097
 // Homing speeds (mm/m)
1057
 #define HOMING_FEEDRATE_XY (40*60)
1098
 #define HOMING_FEEDRATE_XY (40*60)
1058
 #define HOMING_FEEDRATE_Z  (3*60)
1099
 #define HOMING_FEEDRATE_Z  (3*60)
1059
 
1100
 
1101
+// @section calibrate
1102
+
1103
+/**
1104
+ * Bed Skew Compensation
1105
+ *
1106
+ * This feature corrects for misalignment in the XYZ axes.
1107
+ *
1108
+ * Take the following steps to get the bed skew in the XY plane:
1109
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1110
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1111
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1112
+ *  4. For XY_SIDE_AD measure the edge A to D
1113
+ *
1114
+ * Marlin automatically computes skew factors from these measurements.
1115
+ * Skew factors may also be computed and set manually:
1116
+ *
1117
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1118
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1119
+ *
1120
+ * If desired, follow the same procedure for XZ and YZ.
1121
+ * Use these diagrams for reference:
1122
+ *
1123
+ *    Y                     Z                     Z
1124
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1125
+ *    |    /       /        |    /       /        |    /       /
1126
+ *    |   /       /         |   /       /         |   /       /
1127
+ *    |  A-------D          |  A-------D          |  A-------D
1128
+ *    +-------------->X     +-------------->X     +-------------->Y
1129
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1130
+ */
1131
+//#define SKEW_CORRECTION
1132
+
1133
+#if ENABLED(SKEW_CORRECTION)
1134
+  // Input all length measurements here:
1135
+  #define XY_DIAG_AC 282.8427124746
1136
+  #define XY_DIAG_BD 282.8427124746
1137
+  #define XY_SIDE_AD 200
1138
+
1139
+  // Or, set the default skew factors directly here
1140
+  // to override the above measurements:
1141
+  #define XY_SKEW_FACTOR 0.0
1142
+
1143
+  //#define SKEW_CORRECTION_FOR_Z
1144
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1145
+    #define XZ_DIAG_AC 282.8427124746
1146
+    #define XZ_DIAG_BD 282.8427124746
1147
+    #define YZ_DIAG_AC 282.8427124746
1148
+    #define YZ_DIAG_BD 282.8427124746
1149
+    #define YZ_SIDE_AD 200
1150
+    #define XZ_SKEW_FACTOR 0.0
1151
+    #define YZ_SKEW_FACTOR 0.0
1152
+  #endif
1153
+
1154
+  // Enable this option for M852 to set skew at runtime
1155
+  //#define SKEW_CORRECTION_GCODE
1156
+#endif
1157
+
1060
 //=============================================================================
1158
 //=============================================================================
1061
 //============================= Additional Features ===========================
1159
 //============================= Additional Features ===========================
1062
 //=============================================================================
1160
 //=============================================================================
1088
 //
1186
 //
1089
 // M100 Free Memory Watcher
1187
 // M100 Free Memory Watcher
1090
 //
1188
 //
1091
-//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
1189
+//#define M100_FREE_MEMORY_WATCHER    // Add M100 (Free Memory Watcher) to debug memory usage
1092
 
1190
 
1093
 //
1191
 //
1094
 // G20/G21 Inch mode support
1192
 // G20/G21 Inch mode support
1233
  *
1331
  *
1234
  * Select the language to display on the LCD. These languages are available:
1332
  * Select the language to display on the LCD. These languages are available:
1235
  *
1333
  *
1236
- *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, gl, hr,
1237
- *    it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1334
+ *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, fr_utf8, gl,
1335
+ *    hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1238
  *    tr, uk, zh_CN, zh_TW, test
1336
  *    tr, uk, zh_CN, zh_TW, test
1239
  *
1337
  *
1240
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1338
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1241
  */
1339
  */
1242
 #define LCD_LANGUAGE en
1340
 #define LCD_LANGUAGE en
1243
 
1341
 
1365
 // Note: Test audio output with the G-Code:
1463
 // Note: Test audio output with the G-Code:
1366
 //  M300 S<frequency Hz> P<duration ms>
1464
 //  M300 S<frequency Hz> P<duration ms>
1367
 //
1465
 //
1368
-//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
1369
-//#define LCD_FEEDBACK_FREQUENCY_HZ 1000
1466
+//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
1467
+//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
1370
 
1468
 
1371
 //
1469
 //
1372
 // CONTROLLER TYPE: Standard
1470
 // CONTROLLER TYPE: Standard
1474
 //#define CARTESIO_UI
1572
 //#define CARTESIO_UI
1475
 
1573
 
1476
 //
1574
 //
1477
-// ANET_10 Controller supported displays.
1575
+// ANET and Tronxy Controller supported displays.
1478
 //
1576
 //
1479
-//#define ANET_KEYPAD_LCD         // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1577
+//#define ZONESTAR_LCD            // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1480
                                   // This LCD is known to be susceptible to electrical interference
1578
                                   // This LCD is known to be susceptible to electrical interference
1481
                                   // which scrambles the display.  Pressing any button clears it up.
1579
                                   // which scrambles the display.  Pressing any button clears it up.
1580
+                                  // This is a LCD2004 display with 5 analog buttons.
1581
+
1482
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1582
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1483
                                   // A clone of the RepRapDiscount full graphics display but with
1583
                                   // A clone of the RepRapDiscount full graphics display but with
1484
                                   // different pins/wiring (see pins_ANET_10.h).
1584
                                   // different pins/wiring (see pins_ANET_10.h).
1588
 //
1688
 //
1589
 //#define MKS_12864OLED
1689
 //#define MKS_12864OLED
1590
 
1690
 
1691
+// Silvergate GLCD controller
1692
+// http://github.com/android444/Silvergate
1693
+//
1694
+//#define SILVER_GATE_GLCD_CONTROLLER
1695
+
1591
 //=============================================================================
1696
 //=============================================================================
1592
 //=============================== Extra Features ==============================
1697
 //=============================== Extra Features ==============================
1593
 //=============================================================================
1698
 //=============================================================================
1644
  * Adds the M150 command to set the LED (or LED strip) color.
1749
  * Adds the M150 command to set the LED (or LED strip) color.
1645
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1750
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1646
  * luminance values can be set from 0 to 255.
1751
  * luminance values can be set from 0 to 255.
1647
- * For Neopixel LED overall brightness parameters is also available 
1752
+ * For Neopixel LED an overall brightness parameter is also available.
1648
  *
1753
  *
1649
  * *** CAUTION ***
1754
  * *** CAUTION ***
1650
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1755
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1651
  *  as the Arduino cannot handle the current the LEDs will require.
1756
  *  as the Arduino cannot handle the current the LEDs will require.
1652
  *  Failure to follow this precaution can destroy your Arduino!
1757
  *  Failure to follow this precaution can destroy your Arduino!
1653
- *  The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
1654
- *  cannot handle such current, separate 5V power supply must be used
1758
+ *  NOTE: A separate 5V power supply is required! The Neopixel LED needs
1759
+ *  more current than the Arduino 5V linear regulator can produce.
1655
  * *** CAUTION ***
1760
  * *** CAUTION ***
1656
  *
1761
  *
1657
- * LED type. This options are mutualy exclusive. Uncomment only one.
1762
+ * LED Type. Enable only one of the following two options.
1658
  *
1763
  *
1659
  */
1764
  */
1660
 //#define RGB_LED
1765
 //#define RGB_LED
1670
 // Support for Adafruit Neopixel LED driver
1775
 // Support for Adafruit Neopixel LED driver
1671
 //#define NEOPIXEL_LED
1776
 //#define NEOPIXEL_LED
1672
 #if ENABLED(NEOPIXEL_LED)
1777
 #if ENABLED(NEOPIXEL_LED)
1673
-  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
1778
+  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
1674
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1779
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1675
-  #define NEOPIXEL_PIXELS 30       // Number of LEDs on strip
1676
-  #define NEOPIXEL_IS_SEQUENTIAL   // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
1677
-  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness 0-255
1780
+  #define NEOPIXEL_PIXELS 30       // Number of LEDs in the strip
1781
+  #define NEOPIXEL_IS_SEQUENTIAL   // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
1782
+  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness (0-255)
1678
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1783
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1679
 #endif
1784
 #endif
1680
 
1785
 
1689
  *  - Change to green once print has finished
1794
  *  - Change to green once print has finished
1690
  *  - Turn off after the print has finished and the user has pushed a button
1795
  *  - Turn off after the print has finished and the user has pushed a button
1691
  */
1796
  */
1692
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED)
1797
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
1693
   #define PRINTER_EVENT_LEDS
1798
   #define PRINTER_EVENT_LEDS
1694
 #endif
1799
 #endif
1695
 
1800
 
1696
-/*********************************************************************\
1697
-* R/C SERVO support
1698
-* Sponsored by TrinityLabs, Reworked by codexmas
1699
-**********************************************************************/
1801
+/**
1802
+ * R/C SERVO support
1803
+ * Sponsored by TrinityLabs, Reworked by codexmas
1804
+ */
1700
 
1805
 
1701
-// Number of servos
1702
-//
1703
-// If you select a configuration below, this will receive a default value and does not need to be set manually
1704
-// set it manually if you have more servos than extruders and wish to manually control some
1705
-// leaving it undefined or defining as 0 will disable the servo subsystem
1706
-// If unsure, leave commented / disabled
1707
-//
1806
+/**
1807
+ * Number of servos
1808
+ *
1809
+ * For some servo-related options NUM_SERVOS will be set automatically.
1810
+ * Set this manually if there are extra servos needing manual control.
1811
+ * Leave undefined or set to 0 to entirely disable the servo subsystem.
1812
+ */
1708
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1813
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1709
 
1814
 
1710
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1815
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1717
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1822
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1718
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1823
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1719
 
1824
 
1720
-/**
1721
- * Filament Width Sensor
1722
- *
1723
- * Measures the filament width in real-time and adjusts
1724
- * flow rate to compensate for any irregularities.
1725
- *
1726
- * Also allows the measured filament diameter to set the
1727
- * extrusion rate, so the slicer only has to specify the
1728
- * volume.
1729
- *
1730
- * Only a single extruder is supported at this time.
1731
- *
1732
- *  34 RAMPS_14    : Analog input 5 on the AUX2 connector
1733
- *  81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
1734
- * 301 RAMBO       : Analog input 3
1735
- *
1736
- * Note: May require analog pins to be defined for other boards.
1737
- */
1738
-//#define FILAMENT_WIDTH_SENSOR
1739
-
1740
-#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75   // (mm) Diameter of the filament generally used (3.0 or 1.75mm), also used in the slicer. Used to validate sensor reading.
1741
-
1742
-#if ENABLED(FILAMENT_WIDTH_SENSOR)
1743
-  #define FILAMENT_SENSOR_EXTRUDER_NUM 0    // Index of the extruder that has the filament sensor (0,1,2,3)
1744
-  #define MEASUREMENT_DELAY_CM        14    // (cm) The distance from the filament sensor to the melting chamber
1745
-
1746
-  #define MEASURED_UPPER_LIMIT         3.30 // (mm) Upper limit used to validate sensor reading
1747
-  #define MEASURED_LOWER_LIMIT         1.90 // (mm) Lower limit used to validate sensor reading
1748
-  #define MAX_MEASUREMENT_DELAY       20    // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
1749
-
1750
-  #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
1751
-
1752
-  // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
1753
-  //#define FILAMENT_LCD_DISPLAY
1754
-#endif
1755
-
1756
 #endif // CONFIGURATION_H
1825
 #endif // CONFIGURATION_H

+ 268
- 125
Marlin/example_configurations/TinyBoy2/Configuration_adv.h Переглянути файл

32
  */
32
  */
33
 #ifndef CONFIGURATION_ADV_H
33
 #ifndef CONFIGURATION_ADV_H
34
 #define CONFIGURATION_ADV_H
34
 #define CONFIGURATION_ADV_H
35
-#define CONFIGURATION_ADV_H_VERSION 010100
35
+#define CONFIGURATION_ADV_H_VERSION 010107
36
 
36
 
37
 // @section temperature
37
 // @section temperature
38
 
38
 
48
 #endif
48
 #endif
49
 
49
 
50
 /**
50
 /**
51
- * Thermal Protection protects your printer from damage and fire if a
52
- * thermistor falls out or temperature sensors fail in any way.
51
+ * Thermal Protection provides additional protection to your printer from damage
52
+ * and fire. Marlin always includes safe min and max temperature ranges which
53
+ * protect against a broken or disconnected thermistor wire.
53
  *
54
  *
54
- * The issue: If a thermistor falls out or a temperature sensor fails,
55
- * Marlin can no longer sense the actual temperature. Since a disconnected
56
- * thermistor reads as a low temperature, the firmware will keep the heater on.
55
+ * The issue: If a thermistor falls out, it will report the much lower
56
+ * temperature of the air in the room, and the the firmware will keep
57
+ * the heater on.
57
  *
58
  *
58
  * The solution: Once the temperature reaches the target, start observing.
59
  * The solution: Once the temperature reaches the target, start observing.
59
- * If the temperature stays too far below the target (hysteresis) for too long (period),
60
- * the firmware will halt the machine as a safety precaution.
60
+ * If the temperature stays too far below the target (hysteresis) for too
61
+ * long (period), the firmware will halt the machine as a safety precaution.
61
  *
62
  *
62
- * If you get false positives for "Thermal Runaway" increase THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
63
+ * If you get false positives for "Thermal Runaway", increase
64
+ * THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
63
  */
65
  */
64
 #if ENABLED(THERMAL_PROTECTION_HOTENDS)
66
 #if ENABLED(THERMAL_PROTECTION_HOTENDS)
65
   #define THERMAL_PROTECTION_PERIOD 40        // Seconds
67
   #define THERMAL_PROTECTION_PERIOD 40        // Seconds
66
   #define THERMAL_PROTECTION_HYSTERESIS 4     // Degrees Celsius
68
   #define THERMAL_PROTECTION_HYSTERESIS 4     // Degrees Celsius
67
 
69
 
68
   /**
70
   /**
69
-   * Whenever an M104 or M109 increases the target temperature the firmware will wait for the
70
-   * WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
71
-   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
72
-   * but only if the current temperature is far enough below the target for a reliable test.
71
+   * Whenever an M104, M109, or M303 increases the target temperature, the
72
+   * firmware will wait for the WATCH_TEMP_PERIOD to expire. If the temperature
73
+   * hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted and
74
+   * requires a hard reset. This test restarts with any M104/M109/M303, but only
75
+   * if the current temperature is far enough below the target for a reliable
76
+   * test.
73
    *
77
    *
74
-   * If you get false positives for "Heating failed" increase WATCH_TEMP_PERIOD and/or decrease WATCH_TEMP_INCREASE
75
-   * WATCH_TEMP_INCREASE should not be below 2.
78
+   * If you get false positives for "Heating failed", increase WATCH_TEMP_PERIOD
79
+   * and/or decrease WATCH_TEMP_INCREASE. WATCH_TEMP_INCREASE should not be set
80
+   * below 2.
76
    */
81
    */
77
   #define WATCH_TEMP_PERIOD 20                // Seconds
82
   #define WATCH_TEMP_PERIOD 20                // Seconds
78
   #define WATCH_TEMP_INCREASE 2               // Degrees Celsius
83
   #define WATCH_TEMP_INCREASE 2               // Degrees Celsius
86
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
91
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
87
 
92
 
88
   /**
93
   /**
89
-   * Whenever an M140 or M190 increases the target temperature the firmware will wait for the
90
-   * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE
91
-   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190,
92
-   * but only if the current temperature is far enough below the target for a reliable test.
93
-   *
94
-   * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease
95
-   * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.)
94
+   * As described above, except for the bed (M140/M190/M303).
96
    */
95
    */
97
   #define WATCH_BED_TEMP_PERIOD 60                // Seconds
96
   #define WATCH_BED_TEMP_PERIOD 60                // Seconds
98
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
97
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
123
   #define AUTOTEMP_OLDWEIGHT 0.98
122
   #define AUTOTEMP_OLDWEIGHT 0.98
124
 #endif
123
 #endif
125
 
124
 
125
+// Show extra position information in M114
126
+//#define M114_DETAIL
127
+
126
 // Show Temperature ADC value
128
 // Show Temperature ADC value
127
 // Enable for M105 to include ADC values read from temperature sensors.
129
 // Enable for M105 to include ADC values read from temperature sensors.
128
 //#define SHOW_TEMP_ADC_VALUES
130
 //#define SHOW_TEMP_ADC_VALUES
257
 
259
 
258
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
260
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
259
 
261
 
260
-// Dual X Steppers
261
-// Uncomment this option to drive two X axis motors.
262
-// The next unused E driver will be assigned to the second X stepper.
262
+/**
263
+ * Dual Steppers / Dual Endstops
264
+ *
265
+ * This section will allow you to use extra E drivers to drive a second motor for X, Y, or Z axes.
266
+ *
267
+ * For example, set X_DUAL_STEPPER_DRIVERS setting to use a second motor. If the motors need to
268
+ * spin in opposite directions set INVERT_X2_VS_X_DIR. If the second motor needs its own endstop
269
+ * set X_DUAL_ENDSTOPS. This can adjust for "racking." Use X2_USE_ENDSTOP to set the endstop plug
270
+ * that should be used for the second endstop. Extra endstops will appear in the output of 'M119'.
271
+ *
272
+ * Use X_DUAL_ENDSTOP_ADJUSTMENT to adjust for mechanical imperfection. After homing both motors
273
+ * this offset is applied to the X2 motor. To find the offset home the X axis, and measure the error
274
+ * in X2. Dual endstop offsets can be set at runtime with 'M666 X<offset> Y<offset> Z<offset>'.
275
+ */
276
+
263
 //#define X_DUAL_STEPPER_DRIVERS
277
 //#define X_DUAL_STEPPER_DRIVERS
264
 #if ENABLED(X_DUAL_STEPPER_DRIVERS)
278
 #if ENABLED(X_DUAL_STEPPER_DRIVERS)
265
-  // Set true if the two X motors need to rotate in opposite directions
266
-  #define INVERT_X2_VS_X_DIR true
279
+  #define INVERT_X2_VS_X_DIR true   // Set 'true' if X motors should rotate in opposite directions
280
+  //#define X_DUAL_ENDSTOPS
281
+  #if ENABLED(X_DUAL_ENDSTOPS)
282
+    #define X2_USE_ENDSTOP _XMAX_
283
+    #define X_DUAL_ENDSTOPS_ADJUSTMENT  0
284
+  #endif
267
 #endif
285
 #endif
268
 
286
 
269
-// Dual Y Steppers
270
-// Uncomment this option to drive two Y axis motors.
271
-// The next unused E driver will be assigned to the second Y stepper.
272
 //#define Y_DUAL_STEPPER_DRIVERS
287
 //#define Y_DUAL_STEPPER_DRIVERS
273
 #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
288
 #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
274
-  // Set true if the two Y motors need to rotate in opposite directions
275
-  #define INVERT_Y2_VS_Y_DIR true
289
+  #define INVERT_Y2_VS_Y_DIR true   // Set 'true' if Y motors should rotate in opposite directions
290
+  //#define Y_DUAL_ENDSTOPS
291
+  #if ENABLED(Y_DUAL_ENDSTOPS)
292
+    #define Y2_USE_ENDSTOP _YMAX_
293
+    #define Y_DUAL_ENDSTOPS_ADJUSTMENT  0
294
+  #endif
276
 #endif
295
 #endif
277
 
296
 
278
-// A single Z stepper driver is usually used to drive 2 stepper motors.
279
-// Uncomment this option to use a separate stepper driver for each Z axis motor.
280
-// The next unused E driver will be assigned to the second Z stepper.
281
 //#define Z_DUAL_STEPPER_DRIVERS
297
 //#define Z_DUAL_STEPPER_DRIVERS
282
-
283
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
298
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
284
-
285
-  // Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper.
286
-  // That way the machine is capable to align the bed during home, since both Z steppers are homed.
287
-  // There is also an implementation of M666 (software endstops adjustment) to this feature.
288
-  // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed.
289
-  // One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2.
290
-  // If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive.
291
-  // Play a little bit with small adjustments (0.5mm) and check the behaviour.
292
-  // The M119 (endstops report) will start reporting the Z2 Endstop as well.
293
-
294
   //#define Z_DUAL_ENDSTOPS
299
   //#define Z_DUAL_ENDSTOPS
295
-
296
   #if ENABLED(Z_DUAL_ENDSTOPS)
300
   #if ENABLED(Z_DUAL_ENDSTOPS)
297
     #define Z2_USE_ENDSTOP _XMAX_
301
     #define Z2_USE_ENDSTOP _XMAX_
298
-    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0  // Use M666 to determine/test this value
302
+    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0
299
   #endif
303
   #endif
300
-
301
-#endif // Z_DUAL_STEPPER_DRIVERS
304
+#endif
302
 
305
 
303
 // Enable this for dual x-carriage printers.
306
 // Enable this for dual x-carriage printers.
304
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
307
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
345
 
348
 
346
 // @section homing
349
 // @section homing
347
 
350
 
348
-//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
351
+// Homing hits each endstop, retracts by these distances, then does a slower bump.
349
 #define X_HOME_BUMP_MM 5
352
 #define X_HOME_BUMP_MM 5
350
 #define Y_HOME_BUMP_MM 5
353
 #define Y_HOME_BUMP_MM 5
351
 #define Z_HOME_BUMP_MM 2
354
 #define Z_HOME_BUMP_MM 2
352
-#define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
353
-//#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
355
+#define HOMING_BUMP_DIVISOR { 2, 2, 4 }  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
356
+//#define QUICK_HOME                     // If homing includes X and Y, do a diagonal move initially
354
 
357
 
355
 // When G28 is called, this option will make Y home before X
358
 // When G28 is called, this option will make Y home before X
356
 //#define HOME_Y_BEFORE_X
359
 //#define HOME_Y_BEFORE_X
434
 //#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 }   // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
437
 //#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 }   // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
435
 //#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 }    // Default drive percent - X, Y, Z, E axis
438
 //#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 }    // Default drive percent - X, Y, Z, E axis
436
 
439
 
437
-// Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
440
+// Use an I2C based DIGIPOT (e.g., Azteeg X3 Pro)
438
 //#define DIGIPOT_I2C
441
 //#define DIGIPOT_I2C
442
+#if ENABLED(DIGIPOT_I2C) && !defined(DIGIPOT_I2C_ADDRESS_A)
443
+  /**
444
+   * Common slave addresses:
445
+   *
446
+   *                    A   (A shifted)   B   (B shifted)  IC
447
+   * Smoothie          0x2C (0x58)       0x2D (0x5A)       MCP4451
448
+   * AZTEEG_X3_PRO     0x2C (0x58)       0x2E (0x5C)       MCP4451
449
+   * MIGHTYBOARD_REVE  0x2F (0x5E)                         MCP4018
450
+   */
451
+  #define DIGIPOT_I2C_ADDRESS_A 0x2C  // unshifted slave address for first DIGIPOT
452
+  #define DIGIPOT_I2C_ADDRESS_B 0x2D  // unshifted slave address for second DIGIPOT
453
+#endif
454
+
439
 //#define DIGIPOT_MCP4018          // Requires library from https://github.com/stawel/SlowSoftI2CMaster
455
 //#define DIGIPOT_MCP4018          // Requires library from https://github.com/stawel/SlowSoftI2CMaster
440
 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4     AZTEEG_X3_PRO: 8
456
 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4     AZTEEG_X3_PRO: 8
441
 // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
457
 // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
466
 // The timeout (in ms) to return to the status screen from sub-menus
482
 // The timeout (in ms) to return to the status screen from sub-menus
467
 //#define LCD_TIMEOUT_TO_STATUS 15000
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
468
 
484
 
485
+/**
486
+ * LED Control Menu
487
+ * Enable this feature to add LED Control to the LCD menu
488
+ */
489
+//#define LED_CONTROL_MENU
490
+#if ENABLED(LED_CONTROL_MENU)
491
+  #define LED_COLOR_PRESETS                 // Enable the Preset Color menu option
492
+  #if ENABLED(LED_COLOR_PRESETS)
493
+    #define LED_USER_PRESET_RED        255  // User defined RED value
494
+    #define LED_USER_PRESET_GREEN      128  // User defined GREEN value
495
+    #define LED_USER_PRESET_BLUE         0  // User defined BLUE value
496
+    #define LED_USER_PRESET_WHITE      255  // User defined WHITE value
497
+    #define LED_USER_PRESET_BRIGHTNESS 255  // User defined intensity
498
+    //#define LED_USER_PRESET_STARTUP       // Have the printer display the user preset color on startup
499
+  #endif
500
+#endif // LED_CONTROL_MENU
501
+
469
 #if ENABLED(SDSUPPORT)
502
 #if ENABLED(SDSUPPORT)
470
 
503
 
471
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
504
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
475
   // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
508
   // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
476
   #define SD_DETECT_INVERTED
509
   #define SD_DETECT_INVERTED
477
 
510
 
478
-  #define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
511
+  #define SD_FINISHED_STEPPERRELEASE true          // Disable steppers when SD Print is finished
479
   #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
512
   #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
480
 
513
 
481
-  #define SDCARD_RATHERRECENTFIRST  //reverse file order of sd card menu display. Its sorted practically after the file system block order.
482
-  // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that.
483
-  // using:
514
+  // Reverse SD sort to show "more recent" files first, according to the card's FAT.
515
+  // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended.
516
+  #define SDCARD_RATHERRECENTFIRST
517
+
518
+  // Add an option in the menu to run all auto#.g files
484
   //#define MENU_ADDAUTOSTART
519
   //#define MENU_ADDAUTOSTART
485
 
520
 
486
   /**
521
   /**
517
     #define SDSORT_USES_STACK  false  // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
552
     #define SDSORT_USES_STACK  false  // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
518
     #define SDSORT_CACHE_NAMES false  // Keep sorted items in RAM longer for speedy performance. Most expensive option.
553
     #define SDSORT_CACHE_NAMES false  // Keep sorted items in RAM longer for speedy performance. Most expensive option.
519
     #define SDSORT_DYNAMIC_RAM false  // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
554
     #define SDSORT_DYNAMIC_RAM false  // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
555
+    #define SDSORT_CACHE_VFATS 2      // Maximum number of 13-byte VFAT entries to use for sorting.
556
+                                      // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM.
520
   #endif
557
   #endif
521
 
558
 
522
   // Show a progress bar on HD44780 LCDs for SD printing
559
   // Show a progress bar on HD44780 LCDs for SD printing
535
     //#define LCD_PROGRESS_BAR_TEST
572
     //#define LCD_PROGRESS_BAR_TEST
536
   #endif
573
   #endif
537
 
574
 
575
+  // Add an 'M73' G-code to set the current percentage
576
+  //#define LCD_SET_PROGRESS_MANUALLY
577
+
538
   // This allows hosts to request long names for files and folders with M33
578
   // This allows hosts to request long names for files and folders with M33
539
   //#define LONG_FILENAME_HOST_SUPPORT
579
   //#define LONG_FILENAME_HOST_SUPPORT
540
 
580
 
541
-  // This option allows you to abort SD printing when any endstop is triggered.
542
-  // This feature must be enabled with "M540 S1" or from the LCD menu.
543
-  // To have any effect, endstops must be enabled during SD printing.
581
+  // Enable this option to scroll long filenames in the SD card menu
582
+  //#define SCROLL_LONG_FILENAMES
583
+
584
+  /**
585
+   * This option allows you to abort SD printing when any endstop is triggered.
586
+   * This feature must be enabled with "M540 S1" or from the LCD menu.
587
+   * To have any effect, endstops must be enabled during SD printing.
588
+   */
544
   //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
589
   //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
545
 
590
 
591
+  /**
592
+   * This option makes it easier to print the same SD Card file again.
593
+   * On print completion the LCD Menu will open with the file selected.
594
+   * You can just click to start the print, or navigate elsewhere.
595
+   */
596
+  //#define SD_REPRINT_LAST_SELECTED_FILE
597
+
546
 #endif // SDSUPPORT
598
 #endif // SDSUPPORT
547
 
599
 
548
 /**
600
 /**
575
   // Enable this option and reduce the value to optimize screen updates.
627
   // Enable this option and reduce the value to optimize screen updates.
576
   // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
628
   // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
577
   //#define DOGM_SPI_DELAY_US 5
629
   //#define DOGM_SPI_DELAY_US 5
630
+
631
+  // Swap the CW/CCW indicators in the graphics overlay
632
+  //#define OVERLAY_GFX_REVERSE
633
+
578
 #endif // DOGLCD
634
 #endif // DOGLCD
579
 
635
 
580
 // @section safety
636
 // @section safety
603
 #if ENABLED(BABYSTEPPING)
659
 #if ENABLED(BABYSTEPPING)
604
   //#define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
660
   //#define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
605
   #define BABYSTEP_INVERT_Z false    // Change if Z babysteps should go the other way
661
   #define BABYSTEP_INVERT_Z false    // Change if Z babysteps should go the other way
606
-  #define BABYSTEP_MULTIPLICATOR 100 // Babysteps are very small. Increase for faster motion.
662
+  #define BABYSTEP_MULTIPLICATOR 1   // Babysteps are very small. Increase for faster motion.
607
   //#define BABYSTEP_ZPROBE_OFFSET   // Enable to combine M851 and Babystepping
663
   //#define BABYSTEP_ZPROBE_OFFSET   // Enable to combine M851 and Babystepping
608
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
664
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
609
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
665
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
610
                                         // Note: Extra time may be added to mitigate controller latency.
666
                                         // Note: Extra time may be added to mitigate controller latency.
611
   //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
667
   //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
612
-  //#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators
613
 #endif
668
 #endif
614
 
669
 
615
 // @section extruder
670
 // @section extruder
656
 
711
 
657
 // @section leveling
712
 // @section leveling
658
 
713
 
659
-// Default mesh area is an area with an inset margin on the print area.
660
-// Below are the macros that are used to define the borders for the mesh area,
661
-// made available here for specialized needs, ie dual extruder setup.
662
-#if ENABLED(MESH_BED_LEVELING)
663
-  #define MESH_MIN_X MESH_INSET
664
-  #define MESH_MAX_X (X_BED_SIZE - (MESH_INSET))
665
-  #define MESH_MIN_Y MESH_INSET
666
-  #define MESH_MAX_Y (Y_BED_SIZE - (MESH_INSET))
667
-#elif ENABLED(AUTO_BED_LEVELING_UBL)
668
-  #define UBL_MESH_MIN_X UBL_MESH_INSET
669
-  #define UBL_MESH_MAX_X (X_BED_SIZE - (UBL_MESH_INSET))
670
-  #define UBL_MESH_MIN_Y UBL_MESH_INSET
671
-  #define UBL_MESH_MAX_Y (Y_BED_SIZE - (UBL_MESH_INSET))
672
-
673
-  // If this is defined, the currently active mesh will be saved in the
674
-  // current slot on M500.
675
-  #define UBL_SAVE_ACTIVE_ON_M500
714
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
715
+  #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
716
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
717
+  #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
718
+#endif
719
+
720
+#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL)
721
+  // Override the mesh area if the automatic (max) area is too large
722
+  //#define MESH_MIN_X MESH_INSET
723
+  //#define MESH_MIN_Y MESH_INSET
724
+  //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET)
725
+  //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
676
 #endif
726
 #endif
677
 
727
 
678
 // @section extras
728
 // @section extras
692
 //#define BEZIER_CURVE_SUPPORT
742
 //#define BEZIER_CURVE_SUPPORT
693
 
743
 
694
 // G38.2 and G38.3 Probe Target
744
 // G38.2 and G38.3 Probe Target
695
-// Enable PROBE_DOUBLE_TOUCH if you want G38 to double touch
745
+// Set MULTIPLE_PROBING if you want G38 to double touch
696
 //#define G38_PROBE_TARGET
746
 //#define G38_PROBE_TARGET
697
 #if ENABLED(G38_PROBE_TARGET)
747
 #if ENABLED(G38_PROBE_TARGET)
698
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
748
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
717
 // @section hidden
767
 // @section hidden
718
 
768
 
719
 // The number of linear motions that can be in the plan at any give time.
769
 // The number of linear motions that can be in the plan at any give time.
720
-// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2, i.g. 8,16,32 because shifts and ors are used to do the ring-buffering.
770
+// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2 (e.g. 8, 16, 32) because shifts and ors are used to do the ring-buffering.
721
 #if ENABLED(SDSUPPORT)
771
 #if ENABLED(SDSUPPORT)
722
   #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
772
   #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
723
 #else
773
 #else
808
 #endif
858
 #endif
809
 
859
 
810
 /**
860
 /**
861
+ * Extra Fan Speed
862
+ * Adds a secondary fan speed for each print-cooling fan.
863
+ *   'M106 P<fan> T3-255' : Set a secondary speed for <fan>
864
+ *   'M106 P<fan> T2'     : Use the set secondary speed
865
+ *   'M106 P<fan> T1'     : Restore the previous fan speed
866
+ */
867
+//#define EXTRA_FAN_SPEED
868
+
869
+/**
811
  * Advanced Pause
870
  * Advanced Pause
812
  * Experimental feature for filament change support and for parking the nozzle when paused.
871
  * Experimental feature for filament change support and for parking the nozzle when paused.
813
  * Adds the GCode M600 for initiating filament change.
872
  * Adds the GCode M600 for initiating filament change.
917
 
976
 
918
 #endif
977
 #endif
919
 
978
 
920
-// @section TMC2130
979
+// @section TMC2130, TMC2208
921
 
980
 
922
 /**
981
 /**
923
  * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
982
  * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
931
  */
990
  */
932
 //#define HAVE_TMC2130
991
 //#define HAVE_TMC2130
933
 
992
 
934
-#if ENABLED(HAVE_TMC2130)
993
+/**
994
+ * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
995
+ * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin.
996
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN
997
+ * to #_SERIAL_TX_PIN with a 1K resistor.
998
+ * The drivers can also be used with hardware serial.
999
+ *
1000
+ * You'll also need the TMC2208Stepper Arduino library
1001
+ * (https://github.com/teemuatlut/TMC2208Stepper).
1002
+ */
1003
+//#define HAVE_TMC2208
1004
+
1005
+#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
935
 
1006
 
936
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
1007
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
937
   //#define X_IS_TMC2130
1008
   //#define X_IS_TMC2130
946
   //#define E3_IS_TMC2130
1017
   //#define E3_IS_TMC2130
947
   //#define E4_IS_TMC2130
1018
   //#define E4_IS_TMC2130
948
 
1019
 
1020
+  //#define X_IS_TMC2208
1021
+  //#define X2_IS_TMC2208
1022
+  //#define Y_IS_TMC2208
1023
+  //#define Y2_IS_TMC2208
1024
+  //#define Z_IS_TMC2208
1025
+  //#define Z2_IS_TMC2208
1026
+  //#define E0_IS_TMC2208
1027
+  //#define E1_IS_TMC2208
1028
+  //#define E2_IS_TMC2208
1029
+  //#define E3_IS_TMC2208
1030
+  //#define E4_IS_TMC2208
1031
+
949
   /**
1032
   /**
950
    * Stepper driver settings
1033
    * Stepper driver settings
951
    */
1034
    */
952
 
1035
 
953
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1036
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
954
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1037
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
955
-  #define INTERPOLATE          1  // Interpolate X/Y/Z_MICROSTEPS to 256
1038
+  #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
956
 
1039
 
957
-  #define X_CURRENT         1000  // rms current in mA. Multiply by 1.41 for peak current.
1040
+  #define X_CURRENT          800  // rms current in mA. Multiply by 1.41 for peak current.
958
   #define X_MICROSTEPS        16  // 0..256
1041
   #define X_MICROSTEPS        16  // 0..256
959
 
1042
 
960
-  #define Y_CURRENT         1000
1043
+  #define Y_CURRENT          800
961
   #define Y_MICROSTEPS        16
1044
   #define Y_MICROSTEPS        16
962
 
1045
 
963
-  #define Z_CURRENT         1000
1046
+  #define Z_CURRENT          800
964
   #define Z_MICROSTEPS        16
1047
   #define Z_MICROSTEPS        16
965
 
1048
 
966
-  //#define X2_CURRENT      1000
967
-  //#define X2_MICROSTEPS     16
1049
+  #define X2_CURRENT         800
1050
+  #define X2_MICROSTEPS       16
968
 
1051
 
969
-  //#define Y2_CURRENT      1000
970
-  //#define Y2_MICROSTEPS     16
1052
+  #define Y2_CURRENT         800
1053
+  #define Y2_MICROSTEPS       16
971
 
1054
 
972
-  //#define Z2_CURRENT      1000
973
-  //#define Z2_MICROSTEPS     16
1055
+  #define Z2_CURRENT         800
1056
+  #define Z2_MICROSTEPS       16
974
 
1057
 
975
-  //#define E0_CURRENT      1000
976
-  //#define E0_MICROSTEPS     16
1058
+  #define E0_CURRENT         800
1059
+  #define E0_MICROSTEPS       16
977
 
1060
 
978
-  //#define E1_CURRENT      1000
979
-  //#define E1_MICROSTEPS     16
1061
+  #define E1_CURRENT         800
1062
+  #define E1_MICROSTEPS       16
980
 
1063
 
981
-  //#define E2_CURRENT      1000
982
-  //#define E2_MICROSTEPS     16
1064
+  #define E2_CURRENT         800
1065
+  #define E2_MICROSTEPS       16
983
 
1066
 
984
-  //#define E3_CURRENT      1000
985
-  //#define E3_MICROSTEPS     16
1067
+  #define E3_CURRENT         800
1068
+  #define E3_MICROSTEPS       16
986
 
1069
 
987
-  //#define E4_CURRENT      1000
988
-  //#define E4_MICROSTEPS     16
1070
+  #define E4_CURRENT         800
1071
+  #define E4_MICROSTEPS       16
989
 
1072
 
990
   /**
1073
   /**
991
    * Use Trinamic's ultra quiet stepping mode.
1074
    * Use Trinamic's ultra quiet stepping mode.
994
   #define STEALTHCHOP
1077
   #define STEALTHCHOP
995
 
1078
 
996
   /**
1079
   /**
997
-   * Let Marlin automatically control stepper current.
998
-   * This is still an experimental feature.
999
-   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
1000
-   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
1001
-   * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX
1080
+   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1081
+   * like overtemperature and short to ground. TMC2208 requires hardware serial.
1082
+   * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1083
+   * Other detected conditions can be used to stop the current print.
1002
    * Relevant g-codes:
1084
    * Relevant g-codes:
1003
    * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
1085
    * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
1004
-   * M906 S1 - Start adjusting current
1005
-   * M906 S0 - Stop adjusting current
1006
    * M911 - Report stepper driver overtemperature pre-warn condition.
1086
    * M911 - Report stepper driver overtemperature pre-warn condition.
1007
    * M912 - Clear stepper driver overtemperature pre-warn condition flag.
1087
    * M912 - Clear stepper driver overtemperature pre-warn condition flag.
1088
+   * M122 S0/1 - Report driver parameters (Requires TMC_DEBUG)
1008
    */
1089
    */
1009
-  //#define AUTOMATIC_CURRENT_CONTROL
1090
+  //#define MONITOR_DRIVER_STATUS
1010
 
1091
 
1011
-  #if ENABLED(AUTOMATIC_CURRENT_CONTROL)
1012
-    #define CURRENT_STEP          50  // [mA]
1013
-    #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
1092
+  #if ENABLED(MONITOR_DRIVER_STATUS)
1093
+    #define CURRENT_STEP_DOWN     50  // [mA]
1014
     #define REPORT_CURRENT_CHANGE
1094
     #define REPORT_CURRENT_CHANGE
1095
+    #define STOP_ON_ERROR
1015
   #endif
1096
   #endif
1016
 
1097
 
1017
   /**
1098
   /**
1026
   #define X2_HYBRID_THRESHOLD    100
1107
   #define X2_HYBRID_THRESHOLD    100
1027
   #define Y_HYBRID_THRESHOLD     100
1108
   #define Y_HYBRID_THRESHOLD     100
1028
   #define Y2_HYBRID_THRESHOLD    100
1109
   #define Y2_HYBRID_THRESHOLD    100
1029
-  #define Z_HYBRID_THRESHOLD       4
1030
-  #define Z2_HYBRID_THRESHOLD      4
1110
+  #define Z_HYBRID_THRESHOLD       3
1111
+  #define Z2_HYBRID_THRESHOLD      3
1031
   #define E0_HYBRID_THRESHOLD     30
1112
   #define E0_HYBRID_THRESHOLD     30
1032
   #define E1_HYBRID_THRESHOLD     30
1113
   #define E1_HYBRID_THRESHOLD     30
1033
   #define E2_HYBRID_THRESHOLD     30
1114
   #define E2_HYBRID_THRESHOLD     30
1037
   /**
1118
   /**
1038
    * Use stallGuard2 to sense an obstacle and trigger an endstop.
1119
    * Use stallGuard2 to sense an obstacle and trigger an endstop.
1039
    * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
1120
    * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
1040
-   * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal.
1121
+   * X and Y homing will always be done in spreadCycle mode.
1041
    *
1122
    *
1042
    * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
1123
    * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
1043
    * Higher values make the system LESS sensitive.
1124
    * Higher values make the system LESS sensitive.
1046
    * It is advised to set X/Y_HOME_BUMP_MM to 0.
1127
    * It is advised to set X/Y_HOME_BUMP_MM to 0.
1047
    * M914 X/Y to live tune the setting
1128
    * M914 X/Y to live tune the setting
1048
    */
1129
    */
1049
-  //#define SENSORLESS_HOMING
1130
+  //#define SENSORLESS_HOMING // TMC2130 only
1050
 
1131
 
1051
   #if ENABLED(SENSORLESS_HOMING)
1132
   #if ENABLED(SENSORLESS_HOMING)
1052
-    #define X_HOMING_SENSITIVITY  19
1053
-    #define Y_HOMING_SENSITIVITY  19
1133
+    #define X_HOMING_SENSITIVITY  8
1134
+    #define Y_HOMING_SENSITIVITY  8
1054
   #endif
1135
   #endif
1055
 
1136
 
1056
   /**
1137
   /**
1138
+   * Enable M122 debugging command for TMC stepper drivers.
1139
+   * M122 S0/1 will enable continous reporting.
1140
+   */
1141
+  //#define TMC_DEBUG
1142
+
1143
+  /**
1057
    * You can set your own advanced settings by filling in predefined functions.
1144
    * You can set your own advanced settings by filling in predefined functions.
1058
    * A list of available functions can be found on the library github page
1145
    * A list of available functions can be found on the library github page
1059
    * https://github.com/teemuatlut/TMC2130Stepper
1146
    * https://github.com/teemuatlut/TMC2130Stepper
1147
+   * https://github.com/teemuatlut/TMC2208Stepper
1060
    *
1148
    *
1061
    * Example:
1149
    * Example:
1062
-   * #define TMC2130_ADV() { \
1150
+   * #define TMC_ADV() { \
1063
    *   stepperX.diag0_temp_prewarn(1); \
1151
    *   stepperX.diag0_temp_prewarn(1); \
1064
-   *   stepperX.interpolate(0); \
1152
+   *   stepperY.interpolate(0); \
1065
    * }
1153
    * }
1066
    */
1154
    */
1067
-  #define  TMC2130_ADV() {  }
1155
+  #define  TMC_ADV() {  }
1068
 
1156
 
1069
-#endif // HAVE_TMC2130
1157
+#endif // TMC2130 || TMC2208
1070
 
1158
 
1071
 // @section L6470
1159
 // @section L6470
1072
 
1160
 
1231
 #endif
1319
 #endif
1232
 
1320
 
1233
 /**
1321
 /**
1322
+ * Filament Width Sensor
1323
+ *
1324
+ * Measures the filament width in real-time and adjusts
1325
+ * flow rate to compensate for any irregularities.
1326
+ *
1327
+ * Also allows the measured filament diameter to set the
1328
+ * extrusion rate, so the slicer only has to specify the
1329
+ * volume.
1330
+ *
1331
+ * Only a single extruder is supported at this time.
1332
+ *
1333
+ *  34 RAMPS_14    : Analog input 5 on the AUX2 connector
1334
+ *  81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
1335
+ * 301 RAMBO       : Analog input 3
1336
+ *
1337
+ * Note: May require analog pins to be defined for other boards.
1338
+ */
1339
+//#define FILAMENT_WIDTH_SENSOR
1340
+
1341
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
1342
+  #define FILAMENT_SENSOR_EXTRUDER_NUM 0    // Index of the extruder that has the filament sensor. :[0,1,2,3,4]
1343
+  #define MEASUREMENT_DELAY_CM        14    // (cm) The distance from the filament sensor to the melting chamber
1344
+
1345
+  #define MEASURED_UPPER_LIMIT         3.30 // (mm) Upper limit used to validate sensor reading
1346
+  #define MEASURED_LOWER_LIMIT         1.90 // (mm) Lower limit used to validate sensor reading
1347
+  #define MAX_MEASUREMENT_DELAY       20    // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
1348
+
1349
+  #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
1350
+
1351
+  // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
1352
+  //#define FILAMENT_LCD_DISPLAY
1353
+#endif
1354
+
1355
+/**
1356
+ * CNC Coordinate Systems
1357
+ *
1358
+ * Enables G53 and G54-G59.3 commands to select coordinate systems
1359
+ * and G92.1 to reset the workspace to native machine space.
1360
+ */
1361
+//#define CNC_COORDINATE_SYSTEMS
1362
+
1363
+/**
1234
  * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
1364
  * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
1235
  */
1365
  */
1236
 //#define PINS_DEBUGGING
1366
 //#define PINS_DEBUGGING
1421
                                          // tweaks made to the configuration are affecting the printer in real-time.
1551
                                          // tweaks made to the configuration are affecting the printer in real-time.
1422
 #endif
1552
 #endif
1423
 
1553
 
1554
+/**
1555
+ * NanoDLP Sync support
1556
+ *
1557
+ * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
1558
+ * string to enable synchronization with DLP projector exposure. This change will allow to use
1559
+ * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
1560
+ */
1561
+//#define NANODLP_Z_SYNC
1562
+#if ENABLED(NANODLP_Z_SYNC)
1563
+  //#define NANODLP_ALL_AXIS  // Enables "Z_move_comp" output on any axis move.
1564
+                              // Default behaviour is limited to Z axis only.
1565
+#endif
1566
+
1424
 #endif // CONFIGURATION_ADV_H
1567
 #endif // CONFIGURATION_ADV_H

+ 154
- 90
Marlin/example_configurations/Velleman/K8200/Configuration.h Переглянути файл

37
  */
37
  */
38
 #ifndef CONFIGURATION_H
38
 #ifndef CONFIGURATION_H
39
 #define CONFIGURATION_H
39
 #define CONFIGURATION_H
40
-#define CONFIGURATION_H_VERSION 010100
40
+#define CONFIGURATION_H_VERSION 010107
41
 
41
 
42
 /**
42
 /**
43
  * Sample configuration file for Vellemann K8200
43
  * Sample configuration file for Vellemann K8200
156
 // :[1, 2, 3, 4, 5]
156
 // :[1, 2, 3, 4, 5]
157
 #define EXTRUDERS 1
157
 #define EXTRUDERS 1
158
 
158
 
159
+// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
160
+#define DEFAULT_NOMINAL_FILAMENT_DIA 3.0
161
+
159
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
162
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
160
 //#define SINGLENOZZLE
163
 //#define SINGLENOZZLE
161
 
164
 
356
 
359
 
357
 // Comment the following line to disable PID and enable bang-bang.
360
 // Comment the following line to disable PID and enable bang-bang.
358
 #define PIDTEMP
361
 #define PIDTEMP
359
-#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
360
-#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
362
+#define BANG_MAX 255     // Limits current to nozzle while in bang-bang mode; 255=full current
363
+#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
364
+#define PID_K1 0.95      // Smoothing factor within the PID
361
 #if ENABLED(PIDTEMP)
365
 #if ENABLED(PIDTEMP)
362
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
366
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
363
   //#define PID_DEBUG // Sends debug data to the serial port.
367
   //#define PID_DEBUG // Sends debug data to the serial port.
367
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
371
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
368
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
372
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
369
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
373
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
370
-  #define K1 0.95 //smoothing factor within the PID
371
 
374
 
372
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
375
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
373
 
376
 
458
 //===========================================================================
461
 //===========================================================================
459
 
462
 
460
 /**
463
 /**
461
- * Thermal Protection protects your printer from damage and fire if a
462
- * thermistor falls out or temperature sensors fail in any way.
464
+ * Thermal Protection provides additional protection to your printer from damage
465
+ * and fire. Marlin always includes safe min and max temperature ranges which
466
+ * protect against a broken or disconnected thermistor wire.
463
  *
467
  *
464
- * The issue: If a thermistor falls out or a temperature sensor fails,
465
- * Marlin can no longer sense the actual temperature. Since a disconnected
466
- * thermistor reads as a low temperature, the firmware will keep the heater on.
468
+ * The issue: If a thermistor falls out, it will report the much lower
469
+ * temperature of the air in the room, and the the firmware will keep
470
+ * the heater on.
467
  *
471
  *
468
  * If you get "Thermal Runaway" or "Heating failed" errors the
472
  * If you get "Thermal Runaway" or "Heating failed" errors the
469
  * details can be tuned in Configuration_adv.h
473
  * details can be tuned in Configuration_adv.h
602
 // @section probes
606
 // @section probes
603
 
607
 
604
 //
608
 //
605
-// See http://marlinfw.org/configuration/probes.html
609
+// See http://marlinfw.org/docs/configuration/probes.html
606
 //
610
 //
607
 
611
 
608
 /**
612
 /**
715
 // X and Y axis travel speed (mm/m) between probes
719
 // X and Y axis travel speed (mm/m) between probes
716
 #define XY_PROBE_SPEED 8000
720
 #define XY_PROBE_SPEED 8000
717
 
721
 
718
-// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH)
722
+// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
719
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
723
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
720
 
724
 
721
 // Speed for the "accurate" probe of each point
725
 // Speed for the "accurate" probe of each point
722
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
726
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
723
 
727
 
724
-// Use double touch for probing
725
-//#define PROBE_DOUBLE_TOUCH
728
+// The number of probes to perform at each point.
729
+//   Set to 2 for a fast/slow probe, using the second probe result.
730
+//   Set to 3 or more for slow probes, averaging the results.
731
+//#define MULTIPLE_PROBING 2
726
 
732
 
727
 /**
733
 /**
728
  * Z probes require clearance when deploying, stowing, and moving between
734
  * Z probes require clearance when deploying, stowing, and moving between
815
 #define Y_MAX_POS Y_BED_SIZE
821
 #define Y_MAX_POS Y_BED_SIZE
816
 #define Z_MAX_POS 200
822
 #define Z_MAX_POS 200
817
 
823
 
818
-// If enabled, axes won't move below MIN_POS in response to movement commands.
824
+/**
825
+ * Software Endstops
826
+ *
827
+ * - Prevent moves outside the set machine bounds.
828
+ * - Individual axes can be disabled, if desired.
829
+ * - X and Y only apply to Cartesian robots.
830
+ * - Use 'M211' to set software endstops on/off or report current state
831
+ */
832
+
833
+// Min software endstops curtail movement below minimum coordinate bounds
819
 #define MIN_SOFTWARE_ENDSTOPS
834
 #define MIN_SOFTWARE_ENDSTOPS
820
-// If enabled, axes won't move above MAX_POS in response to movement commands.
835
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
836
+  #define MIN_SOFTWARE_ENDSTOP_X
837
+  #define MIN_SOFTWARE_ENDSTOP_Y
838
+  #define MIN_SOFTWARE_ENDSTOP_Z
839
+#endif
840
+
841
+// Max software endstops curtail movement above maximum coordinate bounds
821
 #define MAX_SOFTWARE_ENDSTOPS
842
 #define MAX_SOFTWARE_ENDSTOPS
843
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
844
+  #define MAX_SOFTWARE_ENDSTOP_X
845
+  #define MAX_SOFTWARE_ENDSTOP_Y
846
+  #define MAX_SOFTWARE_ENDSTOP_Z
847
+#endif
822
 
848
 
823
 /**
849
 /**
824
  * Filament Runout Sensor
850
  * Filament Runout Sensor
838
 //===========================================================================
864
 //===========================================================================
839
 //=============================== Bed Leveling ==============================
865
 //=============================== Bed Leveling ==============================
840
 //===========================================================================
866
 //===========================================================================
841
-// @section bedlevel
867
+// @section calibrate
842
 
868
 
843
 /**
869
 /**
844
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
870
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
864
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
890
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
865
  *   A comprehensive bed leveling system combining the features and benefits
891
  *   A comprehensive bed leveling system combining the features and benefits
866
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
892
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
867
- *   Validation and Mesh Editing systems. Currently, UBL is only checked out
868
- *   for Cartesian Printers. That said, it was primarily designed to correct
869
- *   poor quality Delta Printers. If you feel adventurous and have a Delta,
870
- *   please post an issue if something doesn't work correctly. Initially,
871
- *   you will need to set a reduced bed size so you have a rectangular area
872
- *   to test on.
893
+ *   Validation and Mesh Editing systems.
873
  *
894
  *
874
  * - MESH_BED_LEVELING
895
  * - MESH_BED_LEVELING
875
  *   Probe a grid manually
896
  *   Probe a grid manually
896
   // at which point movement will be level to the machine's XY plane.
917
   // at which point movement will be level to the machine's XY plane.
897
   // The height can be set with M420 Z<height>
918
   // The height can be set with M420 Z<height>
898
   #define ENABLE_LEVELING_FADE_HEIGHT
919
   #define ENABLE_LEVELING_FADE_HEIGHT
920
+
921
+  // For Cartesian machines, instead of dividing moves on mesh boundaries,
922
+  // split up moves into short segments like a Delta. This follows the
923
+  // contours of the bed more closely than edge-to-edge straight moves.
924
+  #define SEGMENT_LEVELED_MOVES
925
+  #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)
926
+
927
+  /**
928
+   * Enable the G26 Mesh Validation Pattern tool.
929
+   */
930
+  //#define G26_MESH_VALIDATION   // Enable G26 mesh validation
931
+  #if ENABLED(G26_MESH_VALIDATION)
932
+    #define MESH_TEST_NOZZLE_SIZE     0.4   // (mm) Diameter of primary nozzle.
933
+    #define MESH_TEST_LAYER_HEIGHT    0.2   // (mm) Default layer height for the G26 Mesh Validation Tool.
934
+    #define MESH_TEST_HOTEND_TEMP   205.0   // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
935
+    #define MESH_TEST_BED_TEMP       60.0   // (°C) Default bed temperature for the G26 Mesh Validation Tool.
936
+  #endif
937
+
899
 #endif
938
 #endif
900
 
939
 
901
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
940
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
951
   //========================= Unified Bed Leveling ============================
990
   //========================= Unified Bed Leveling ============================
952
   //===========================================================================
991
   //===========================================================================
953
 
992
 
954
-  #define UBL_MESH_INSET 1          // Mesh inset margin on print area
993
+  //#define MESH_EDIT_GFX_OVERLAY   // Display a graphics overlay while editing the mesh
994
+
995
+  #define MESH_INSET 1              // Mesh inset margin on print area
955
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
996
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
956
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
997
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
957
 
998
 
962
   #define UBL_PROBE_PT_3_X 180
1003
   #define UBL_PROBE_PT_3_X 180
963
   #define UBL_PROBE_PT_3_Y 20
1004
   #define UBL_PROBE_PT_3_Y 20
964
 
1005
 
965
-  #define UBL_G26_MESH_VALIDATION   // Enable G26 mesh validation
966
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
1006
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
1007
+  #define UBL_SAVE_ACTIVE_ON_M500   // Save the currently active mesh in the current slot on M500
967
 
1008
 
968
 #elif ENABLED(MESH_BED_LEVELING)
1009
 #elif ENABLED(MESH_BED_LEVELING)
969
 
1010
 
1023
 //#define Z_SAFE_HOMING
1064
 //#define Z_SAFE_HOMING
1024
 
1065
 
1025
 #if ENABLED(Z_SAFE_HOMING)
1066
 #if ENABLED(Z_SAFE_HOMING)
1026
-  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axis (G28).
1027
-  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axis (G28).
1067
+  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axes (G28).
1068
+  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axes (G28).
1028
 #endif
1069
 #endif
1029
 
1070
 
1030
 // Homing speeds (mm/m)
1071
 // Homing speeds (mm/m)
1031
 #define HOMING_FEEDRATE_XY (50*60)
1072
 #define HOMING_FEEDRATE_XY (50*60)
1032
 #define HOMING_FEEDRATE_Z  (4*60)
1073
 #define HOMING_FEEDRATE_Z  (4*60)
1033
 
1074
 
1075
+// @section calibrate
1076
+
1077
+/**
1078
+ * Bed Skew Compensation
1079
+ *
1080
+ * This feature corrects for misalignment in the XYZ axes.
1081
+ *
1082
+ * Take the following steps to get the bed skew in the XY plane:
1083
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1084
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1085
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1086
+ *  4. For XY_SIDE_AD measure the edge A to D
1087
+ *
1088
+ * Marlin automatically computes skew factors from these measurements.
1089
+ * Skew factors may also be computed and set manually:
1090
+ *
1091
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1092
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1093
+ *
1094
+ * If desired, follow the same procedure for XZ and YZ.
1095
+ * Use these diagrams for reference:
1096
+ *
1097
+ *    Y                     Z                     Z
1098
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1099
+ *    |    /       /        |    /       /        |    /       /
1100
+ *    |   /       /         |   /       /         |   /       /
1101
+ *    |  A-------D          |  A-------D          |  A-------D
1102
+ *    +-------------->X     +-------------->X     +-------------->Y
1103
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1104
+ */
1105
+//#define SKEW_CORRECTION
1106
+
1107
+#if ENABLED(SKEW_CORRECTION)
1108
+  // Input all length measurements here:
1109
+  #define XY_DIAG_AC 282.8427124746
1110
+  #define XY_DIAG_BD 282.8427124746
1111
+  #define XY_SIDE_AD 200
1112
+
1113
+  // Or, set the default skew factors directly here
1114
+  // to override the above measurements:
1115
+  #define XY_SKEW_FACTOR 0.0
1116
+
1117
+  //#define SKEW_CORRECTION_FOR_Z
1118
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1119
+    #define XZ_DIAG_AC 282.8427124746
1120
+    #define XZ_DIAG_BD 282.8427124746
1121
+    #define YZ_DIAG_AC 282.8427124746
1122
+    #define YZ_DIAG_BD 282.8427124746
1123
+    #define YZ_SIDE_AD 200
1124
+    #define XZ_SKEW_FACTOR 0.0
1125
+    #define YZ_SKEW_FACTOR 0.0
1126
+  #endif
1127
+
1128
+  // Enable this option for M852 to set skew at runtime
1129
+  //#define SKEW_CORRECTION_GCODE
1130
+#endif
1131
+
1034
 //=============================================================================
1132
 //=============================================================================
1035
 //============================= Additional Features ===========================
1133
 //============================= Additional Features ===========================
1036
 //=============================================================================
1134
 //=============================================================================
1062
 //
1160
 //
1063
 // M100 Free Memory Watcher
1161
 // M100 Free Memory Watcher
1064
 //
1162
 //
1065
-//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
1163
+//#define M100_FREE_MEMORY_WATCHER    // Add M100 (Free Memory Watcher) to debug memory usage
1066
 
1164
 
1067
 //
1165
 //
1068
 // G20/G21 Inch mode support
1166
 // G20/G21 Inch mode support
1210
  *
1308
  *
1211
  * Select the language to display on the LCD. These languages are available:
1309
  * Select the language to display on the LCD. These languages are available:
1212
  *
1310
  *
1213
- *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, gl, hr,
1214
- *    it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1311
+ *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, fr_utf8, gl,
1312
+ *    hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1215
  *    tr, uk, zh_CN, zh_TW, test
1313
  *    tr, uk, zh_CN, zh_TW, test
1216
  *
1314
  *
1217
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1315
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1218
  */
1316
  */
1219
 #define LCD_LANGUAGE en
1317
 #define LCD_LANGUAGE en
1220
 
1318
 
1342
 // Note: Test audio output with the G-Code:
1440
 // Note: Test audio output with the G-Code:
1343
 //  M300 S<frequency Hz> P<duration ms>
1441
 //  M300 S<frequency Hz> P<duration ms>
1344
 //
1442
 //
1345
-//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
1346
-//#define LCD_FEEDBACK_FREQUENCY_HZ 1000
1443
+//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
1444
+//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
1347
 
1445
 
1348
 //
1446
 //
1349
 // CONTROLLER TYPE: Standard
1447
 // CONTROLLER TYPE: Standard
1451
 //#define CARTESIO_UI
1549
 //#define CARTESIO_UI
1452
 
1550
 
1453
 //
1551
 //
1454
-// ANET_10 Controller supported displays.
1552
+// ANET and Tronxy Controller supported displays.
1455
 //
1553
 //
1456
-//#define ANET_KEYPAD_LCD         // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1554
+//#define ZONESTAR_LCD            // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1457
                                   // This LCD is known to be susceptible to electrical interference
1555
                                   // This LCD is known to be susceptible to electrical interference
1458
                                   // which scrambles the display.  Pressing any button clears it up.
1556
                                   // which scrambles the display.  Pressing any button clears it up.
1557
+                                  // This is a LCD2004 display with 5 analog buttons.
1558
+
1459
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1559
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1460
                                   // A clone of the RepRapDiscount full graphics display but with
1560
                                   // A clone of the RepRapDiscount full graphics display but with
1461
                                   // different pins/wiring (see pins_ANET_10.h).
1561
                                   // different pins/wiring (see pins_ANET_10.h).
1623
  * Adds the M150 command to set the LED (or LED strip) color.
1723
  * Adds the M150 command to set the LED (or LED strip) color.
1624
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1724
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1625
  * luminance values can be set from 0 to 255.
1725
  * luminance values can be set from 0 to 255.
1626
- * For Neopixel LED overall brightness parameters is also available 
1726
+ * For Neopixel LED an overall brightness parameter is also available.
1627
  *
1727
  *
1628
  * *** CAUTION ***
1728
  * *** CAUTION ***
1629
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1729
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1630
  *  as the Arduino cannot handle the current the LEDs will require.
1730
  *  as the Arduino cannot handle the current the LEDs will require.
1631
  *  Failure to follow this precaution can destroy your Arduino!
1731
  *  Failure to follow this precaution can destroy your Arduino!
1632
- *  The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
1633
- *  cannot handle such current, separate 5V power supply must be used
1732
+ *  NOTE: A separate 5V power supply is required! The Neopixel LED needs
1733
+ *  more current than the Arduino 5V linear regulator can produce.
1634
  * *** CAUTION ***
1734
  * *** CAUTION ***
1635
  *
1735
  *
1636
- * LED type. This options are mutualy exclusive. Uncomment only one.
1736
+ * LED Type. Enable only one of the following two options.
1637
  *
1737
  *
1638
  */
1738
  */
1639
 //#define RGB_LED
1739
 //#define RGB_LED
1649
 // Support for Adafruit Neopixel LED driver
1749
 // Support for Adafruit Neopixel LED driver
1650
 //#define NEOPIXEL_LED
1750
 //#define NEOPIXEL_LED
1651
 #if ENABLED(NEOPIXEL_LED)
1751
 #if ENABLED(NEOPIXEL_LED)
1652
-  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
1752
+  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
1653
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1753
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1654
-  #define NEOPIXEL_PIXELS 30       // Number of LEDs on strip
1655
-  #define NEOPIXEL_IS_SEQUENTIAL   // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
1656
-  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness 0-255
1754
+  #define NEOPIXEL_PIXELS 30       // Number of LEDs in the strip
1755
+  #define NEOPIXEL_IS_SEQUENTIAL   // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
1756
+  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness (0-255)
1657
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1757
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1658
 #endif
1758
 #endif
1659
 
1759
 
1668
  *  - Change to green once print has finished
1768
  *  - Change to green once print has finished
1669
  *  - Turn off after the print has finished and the user has pushed a button
1769
  *  - Turn off after the print has finished and the user has pushed a button
1670
  */
1770
  */
1671
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED)
1771
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
1672
   #define PRINTER_EVENT_LEDS
1772
   #define PRINTER_EVENT_LEDS
1673
 #endif
1773
 #endif
1674
 
1774
 
1675
-/*********************************************************************\
1676
-* R/C SERVO support
1677
-* Sponsored by TrinityLabs, Reworked by codexmas
1678
-**********************************************************************/
1775
+/**
1776
+ * R/C SERVO support
1777
+ * Sponsored by TrinityLabs, Reworked by codexmas
1778
+ */
1679
 
1779
 
1680
-// Number of servos
1681
-//
1682
-// If you select a configuration below, this will receive a default value and does not need to be set manually
1683
-// set it manually if you have more servos than extruders and wish to manually control some
1684
-// leaving it undefined or defining as 0 will disable the servo subsystem
1685
-// If unsure, leave commented / disabled
1686
-//
1780
+/**
1781
+ * Number of servos
1782
+ *
1783
+ * For some servo-related options NUM_SERVOS will be set automatically.
1784
+ * Set this manually if there are extra servos needing manual control.
1785
+ * Leave undefined or set to 0 to entirely disable the servo subsystem.
1786
+ */
1687
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1787
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1688
 
1788
 
1689
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1789
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1696
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1796
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1697
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1797
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1698
 
1798
 
1699
-/**
1700
- * Filament Width Sensor
1701
- *
1702
- * Measures the filament width in real-time and adjusts
1703
- * flow rate to compensate for any irregularities.
1704
- *
1705
- * Also allows the measured filament diameter to set the
1706
- * extrusion rate, so the slicer only has to specify the
1707
- * volume.
1708
- *
1709
- * Only a single extruder is supported at this time.
1710
- *
1711
- *  34 RAMPS_14    : Analog input 5 on the AUX2 connector
1712
- *  81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
1713
- * 301 RAMBO       : Analog input 3
1714
- *
1715
- * Note: May require analog pins to be defined for other boards.
1716
- */
1717
-//#define FILAMENT_WIDTH_SENSOR
1718
-
1719
-#define DEFAULT_NOMINAL_FILAMENT_DIA 3.00   // (mm) Diameter of the filament generally used (3.0 or 1.75mm), also used in the slicer. Used to validate sensor reading.
1720
-
1721
-#if ENABLED(FILAMENT_WIDTH_SENSOR)
1722
-  #define FILAMENT_SENSOR_EXTRUDER_NUM 0    // Index of the extruder that has the filament sensor (0,1,2,3)
1723
-  #define MEASUREMENT_DELAY_CM        14    // (cm) The distance from the filament sensor to the melting chamber
1724
-
1725
-  #define MEASURED_UPPER_LIMIT         3.30 // (mm) Upper limit used to validate sensor reading
1726
-  #define MEASURED_LOWER_LIMIT         1.90 // (mm) Lower limit used to validate sensor reading
1727
-  #define MAX_MEASUREMENT_DELAY       20    // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
1728
-
1729
-  #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
1730
-
1731
-  // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
1732
-  //#define FILAMENT_LCD_DISPLAY
1733
-#endif
1734
-
1735
 #endif // CONFIGURATION_H
1799
 #endif // CONFIGURATION_H

+ 263
- 122
Marlin/example_configurations/Velleman/K8200/Configuration_adv.h Переглянути файл

41
 
41
 
42
 #ifndef CONFIGURATION_ADV_H
42
 #ifndef CONFIGURATION_ADV_H
43
 #define CONFIGURATION_ADV_H
43
 #define CONFIGURATION_ADV_H
44
-#define CONFIGURATION_ADV_H_VERSION 010100
44
+#define CONFIGURATION_ADV_H_VERSION 010107
45
 
45
 
46
 // @section temperature
46
 // @section temperature
47
 
47
 
57
 #endif
57
 #endif
58
 
58
 
59
 /**
59
 /**
60
- * Thermal Protection protects your printer from damage and fire if a
61
- * thermistor falls out or temperature sensors fail in any way.
60
+ * Thermal Protection provides additional protection to your printer from damage
61
+ * and fire. Marlin always includes safe min and max temperature ranges which
62
+ * protect against a broken or disconnected thermistor wire.
62
  *
63
  *
63
- * The issue: If a thermistor falls out or a temperature sensor fails,
64
- * Marlin can no longer sense the actual temperature. Since a disconnected
65
- * thermistor reads as a low temperature, the firmware will keep the heater on.
64
+ * The issue: If a thermistor falls out, it will report the much lower
65
+ * temperature of the air in the room, and the the firmware will keep
66
+ * the heater on.
66
  *
67
  *
67
  * The solution: Once the temperature reaches the target, start observing.
68
  * The solution: Once the temperature reaches the target, start observing.
68
- * If the temperature stays too far below the target (hysteresis) for too long (period),
69
- * the firmware will halt the machine as a safety precaution.
69
+ * If the temperature stays too far below the target (hysteresis) for too
70
+ * long (period), the firmware will halt the machine as a safety precaution.
70
  *
71
  *
71
- * If you get false positives for "Thermal Runaway" increase THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
72
+ * If you get false positives for "Thermal Runaway", increase
73
+ * THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
72
  */
74
  */
73
 #if ENABLED(THERMAL_PROTECTION_HOTENDS)
75
 #if ENABLED(THERMAL_PROTECTION_HOTENDS)
74
   // K8200 has weak heaters/power supply by default, so you have to relax!
76
   // K8200 has weak heaters/power supply by default, so you have to relax!
76
   #define THERMAL_PROTECTION_HYSTERESIS 8     // Degrees Celsius
78
   #define THERMAL_PROTECTION_HYSTERESIS 8     // Degrees Celsius
77
 
79
 
78
   /**
80
   /**
79
-   * Whenever an M104 or M109 increases the target temperature the firmware will wait for the
80
-   * WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
81
-   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
82
-   * but only if the current temperature is far enough below the target for a reliable test.
81
+   * Whenever an M104, M109, or M303 increases the target temperature, the
82
+   * firmware will wait for the WATCH_TEMP_PERIOD to expire. If the temperature
83
+   * hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted and
84
+   * requires a hard reset. This test restarts with any M104/M109/M303, but only
85
+   * if the current temperature is far enough below the target for a reliable
86
+   * test.
83
    *
87
    *
84
-   * If you get false positives for "Heating failed" increase WATCH_TEMP_PERIOD and/or decrease WATCH_TEMP_INCREASE
85
-   * WATCH_TEMP_INCREASE should not be below 2.
88
+   * If you get false positives for "Heating failed", increase WATCH_TEMP_PERIOD
89
+   * and/or decrease WATCH_TEMP_INCREASE. WATCH_TEMP_INCREASE should not be set
90
+   * below 2.
86
    */
91
    */
87
   // K8200 has weak heaters/power supply by default, so you have to relax!
92
   // K8200 has weak heaters/power supply by default, so you have to relax!
88
   #define WATCH_TEMP_PERIOD 30                // Seconds
93
   #define WATCH_TEMP_PERIOD 30                // Seconds
99
   #define THERMAL_PROTECTION_BED_HYSTERESIS 10 // Degrees Celsius
104
   #define THERMAL_PROTECTION_BED_HYSTERESIS 10 // Degrees Celsius
100
 
105
 
101
   /**
106
   /**
102
-   * Whenever an M140 or M190 increases the target temperature the firmware will wait for the
103
-   * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE
104
-   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190,
105
-   * but only if the current temperature is far enough below the target for a reliable test.
106
-   *
107
-   * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease
108
-   * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.)
107
+   * As described above, except for the bed (M140/M190/M303).
109
    */
108
    */
110
   #define WATCH_BED_TEMP_PERIOD 60                // Seconds
109
   #define WATCH_BED_TEMP_PERIOD 60                // Seconds
111
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
110
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
136
   #define AUTOTEMP_OLDWEIGHT 0.98
135
   #define AUTOTEMP_OLDWEIGHT 0.98
137
 #endif
136
 #endif
138
 
137
 
138
+// Show extra position information in M114
139
+//#define M114_DETAIL
140
+
139
 // Show Temperature ADC value
141
 // Show Temperature ADC value
140
 // Enable for M105 to include ADC values read from temperature sensors.
142
 // Enable for M105 to include ADC values read from temperature sensors.
141
 //#define SHOW_TEMP_ADC_VALUES
143
 //#define SHOW_TEMP_ADC_VALUES
270
 
272
 
271
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
273
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
272
 
274
 
273
-// Dual X Steppers
274
-// Uncomment this option to drive two X axis motors.
275
-// The next unused E driver will be assigned to the second X stepper.
275
+/**
276
+ * Dual Steppers / Dual Endstops
277
+ *
278
+ * This section will allow you to use extra E drivers to drive a second motor for X, Y, or Z axes.
279
+ *
280
+ * For example, set X_DUAL_STEPPER_DRIVERS setting to use a second motor. If the motors need to
281
+ * spin in opposite directions set INVERT_X2_VS_X_DIR. If the second motor needs its own endstop
282
+ * set X_DUAL_ENDSTOPS. This can adjust for "racking." Use X2_USE_ENDSTOP to set the endstop plug
283
+ * that should be used for the second endstop. Extra endstops will appear in the output of 'M119'.
284
+ *
285
+ * Use X_DUAL_ENDSTOP_ADJUSTMENT to adjust for mechanical imperfection. After homing both motors
286
+ * this offset is applied to the X2 motor. To find the offset home the X axis, and measure the error
287
+ * in X2. Dual endstop offsets can be set at runtime with 'M666 X<offset> Y<offset> Z<offset>'.
288
+ */
289
+
276
 //#define X_DUAL_STEPPER_DRIVERS
290
 //#define X_DUAL_STEPPER_DRIVERS
277
 #if ENABLED(X_DUAL_STEPPER_DRIVERS)
291
 #if ENABLED(X_DUAL_STEPPER_DRIVERS)
278
-  // Set true if the two X motors need to rotate in opposite directions
279
-  #define INVERT_X2_VS_X_DIR true
292
+  #define INVERT_X2_VS_X_DIR true   // Set 'true' if X motors should rotate in opposite directions
293
+  //#define X_DUAL_ENDSTOPS
294
+  #if ENABLED(X_DUAL_ENDSTOPS)
295
+    #define X2_USE_ENDSTOP _XMAX_
296
+    #define X_DUAL_ENDSTOPS_ADJUSTMENT  0
297
+  #endif
280
 #endif
298
 #endif
281
 
299
 
282
-// Dual Y Steppers
283
-// Uncomment this option to drive two Y axis motors.
284
-// The next unused E driver will be assigned to the second Y stepper.
285
 //#define Y_DUAL_STEPPER_DRIVERS
300
 //#define Y_DUAL_STEPPER_DRIVERS
286
 #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
301
 #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
287
-  // Set true if the two Y motors need to rotate in opposite directions
288
-  #define INVERT_Y2_VS_Y_DIR true
302
+  #define INVERT_Y2_VS_Y_DIR true   // Set 'true' if Y motors should rotate in opposite directions
303
+  //#define Y_DUAL_ENDSTOPS
304
+  #if ENABLED(Y_DUAL_ENDSTOPS)
305
+    #define Y2_USE_ENDSTOP _YMAX_
306
+    #define Y_DUAL_ENDSTOPS_ADJUSTMENT  0
307
+  #endif
289
 #endif
308
 #endif
290
 
309
 
291
-// A single Z stepper driver is usually used to drive 2 stepper motors.
292
-// Uncomment this option to use a separate stepper driver for each Z axis motor.
293
-// The next unused E driver will be assigned to the second Z stepper.
294
 //#define Z_DUAL_STEPPER_DRIVERS
310
 //#define Z_DUAL_STEPPER_DRIVERS
295
-
296
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
311
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
297
-
298
-  // Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper.
299
-  // That way the machine is capable to align the bed during home, since both Z steppers are homed.
300
-  // There is also an implementation of M666 (software endstops adjustment) to this feature.
301
-  // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed.
302
-  // One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2.
303
-  // If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive.
304
-  // Play a little bit with small adjustments (0.5mm) and check the behaviour.
305
-  // The M119 (endstops report) will start reporting the Z2 Endstop as well.
306
-
307
   //#define Z_DUAL_ENDSTOPS
312
   //#define Z_DUAL_ENDSTOPS
308
-
309
   #if ENABLED(Z_DUAL_ENDSTOPS)
313
   #if ENABLED(Z_DUAL_ENDSTOPS)
310
     #define Z2_USE_ENDSTOP _XMAX_
314
     #define Z2_USE_ENDSTOP _XMAX_
311
-    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0  // Use M666 to determine/test this value
315
+    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0
312
   #endif
316
   #endif
313
-
314
-#endif // Z_DUAL_STEPPER_DRIVERS
317
+#endif
315
 
318
 
316
 // Enable this for dual x-carriage printers.
319
 // Enable this for dual x-carriage printers.
317
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
320
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
358
 
361
 
359
 // @section homing
362
 // @section homing
360
 
363
 
361
-//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
364
+// Homing hits each endstop, retracts by these distances, then does a slower bump.
362
 #define X_HOME_BUMP_MM 5
365
 #define X_HOME_BUMP_MM 5
363
 #define Y_HOME_BUMP_MM 5
366
 #define Y_HOME_BUMP_MM 5
364
 #define Z_HOME_BUMP_MM 2
367
 #define Z_HOME_BUMP_MM 2
365
-#define HOMING_BUMP_DIVISOR {4, 4, 8}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
366
-#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
368
+#define HOMING_BUMP_DIVISOR { 4, 4, 8 }  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
369
+#define QUICK_HOME                       // If homing includes X and Y, do a diagonal move initially
367
 
370
 
368
 // When G28 is called, this option will make Y home before X
371
 // When G28 is called, this option will make Y home before X
369
 //#define HOME_Y_BEFORE_X
372
 //#define HOME_Y_BEFORE_X
447
 //#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 }   // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
450
 //#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 }   // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
448
 //#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 }    // Default drive percent - X, Y, Z, E axis
451
 //#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 }    // Default drive percent - X, Y, Z, E axis
449
 
452
 
450
-// Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
453
+// Use an I2C based DIGIPOT (e.g., Azteeg X3 Pro)
451
 //#define DIGIPOT_I2C
454
 //#define DIGIPOT_I2C
455
+#if ENABLED(DIGIPOT_I2C) && !defined(DIGIPOT_I2C_ADDRESS_A)
456
+  /**
457
+   * Common slave addresses:
458
+   *
459
+   *                    A   (A shifted)   B   (B shifted)  IC
460
+   * Smoothie          0x2C (0x58)       0x2D (0x5A)       MCP4451
461
+   * AZTEEG_X3_PRO     0x2C (0x58)       0x2E (0x5C)       MCP4451
462
+   * MIGHTYBOARD_REVE  0x2F (0x5E)                         MCP4018
463
+   */
464
+  #define DIGIPOT_I2C_ADDRESS_A 0x2C  // unshifted slave address for first DIGIPOT
465
+  #define DIGIPOT_I2C_ADDRESS_B 0x2D  // unshifted slave address for second DIGIPOT
466
+#endif
467
+
452
 //#define DIGIPOT_MCP4018          // Requires library from https://github.com/stawel/SlowSoftI2CMaster
468
 //#define DIGIPOT_MCP4018          // Requires library from https://github.com/stawel/SlowSoftI2CMaster
453
 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4     AZTEEG_X3_PRO: 8
469
 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4     AZTEEG_X3_PRO: 8
454
 // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
470
 // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
479
 // The timeout (in ms) to return to the status screen from sub-menus
495
 // The timeout (in ms) to return to the status screen from sub-menus
480
 //#define LCD_TIMEOUT_TO_STATUS 15000
496
 //#define LCD_TIMEOUT_TO_STATUS 15000
481
 
497
 
498
+/**
499
+ * LED Control Menu
500
+ * Enable this feature to add LED Control to the LCD menu
501
+ */
502
+//#define LED_CONTROL_MENU
503
+#if ENABLED(LED_CONTROL_MENU)
504
+  #define LED_COLOR_PRESETS                 // Enable the Preset Color menu option
505
+  #if ENABLED(LED_COLOR_PRESETS)
506
+    #define LED_USER_PRESET_RED        255  // User defined RED value
507
+    #define LED_USER_PRESET_GREEN      128  // User defined GREEN value
508
+    #define LED_USER_PRESET_BLUE         0  // User defined BLUE value
509
+    #define LED_USER_PRESET_WHITE      255  // User defined WHITE value
510
+    #define LED_USER_PRESET_BRIGHTNESS 255  // User defined intensity
511
+    //#define LED_USER_PRESET_STARTUP       // Have the printer display the user preset color on startup
512
+  #endif
513
+#endif // LED_CONTROL_MENU
514
+
482
 #if ENABLED(SDSUPPORT)
515
 #if ENABLED(SDSUPPORT)
483
 
516
 
484
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
517
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
488
   // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
521
   // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
489
   #define SD_DETECT_INVERTED
522
   #define SD_DETECT_INVERTED
490
 
523
 
491
-  #define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
524
+  #define SD_FINISHED_STEPPERRELEASE true          // Disable steppers when SD Print is finished
492
   #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
525
   #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
493
 
526
 
494
   #define SDCARD_RATHERRECENTFIRST  //reverse file order of sd card menu display. Its sorted practically after the file system block order.
527
   #define SDCARD_RATHERRECENTFIRST  //reverse file order of sd card menu display. Its sorted practically after the file system block order.
530
     #define SDSORT_USES_STACK  false  // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
563
     #define SDSORT_USES_STACK  false  // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
531
     #define SDSORT_CACHE_NAMES false  // Keep sorted items in RAM longer for speedy performance. Most expensive option.
564
     #define SDSORT_CACHE_NAMES false  // Keep sorted items in RAM longer for speedy performance. Most expensive option.
532
     #define SDSORT_DYNAMIC_RAM false  // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
565
     #define SDSORT_DYNAMIC_RAM false  // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
566
+    #define SDSORT_CACHE_VFATS 2      // Maximum number of 13-byte VFAT entries to use for sorting.
567
+                                      // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM.
533
   #endif
568
   #endif
534
 
569
 
535
   // Show a progress bar on HD44780 LCDs for SD printing
570
   // Show a progress bar on HD44780 LCDs for SD printing
548
     //#define LCD_PROGRESS_BAR_TEST
583
     //#define LCD_PROGRESS_BAR_TEST
549
   #endif
584
   #endif
550
 
585
 
586
+  // Add an 'M73' G-code to set the current percentage
587
+  //#define LCD_SET_PROGRESS_MANUALLY
588
+
551
   // This allows hosts to request long names for files and folders with M33
589
   // This allows hosts to request long names for files and folders with M33
552
   #define LONG_FILENAME_HOST_SUPPORT
590
   #define LONG_FILENAME_HOST_SUPPORT
553
 
591
 
554
-  // This option allows you to abort SD printing when any endstop is triggered.
555
-  // This feature must be enabled with "M540 S1" or from the LCD menu.
556
-  // To have any effect, endstops must be enabled during SD printing.
592
+  // Enable this option to scroll long filenames in the SD card menu
593
+  //#define SCROLL_LONG_FILENAMES
594
+
595
+  /**
596
+   * This option allows you to abort SD printing when any endstop is triggered.
597
+   * This feature must be enabled with "M540 S1" or from the LCD menu.
598
+   * To have any effect, endstops must be enabled during SD printing.
599
+   */
557
   //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
600
   //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
558
 
601
 
602
+  /**
603
+   * This option makes it easier to print the same SD Card file again.
604
+   * On print completion the LCD Menu will open with the file selected.
605
+   * You can just click to start the print, or navigate elsewhere.
606
+   */
607
+  //#define SD_REPRINT_LAST_SELECTED_FILE
608
+
559
 #endif // SDSUPPORT
609
 #endif // SDSUPPORT
560
 
610
 
561
 /**
611
 /**
588
   // Enable this option and reduce the value to optimize screen updates.
638
   // Enable this option and reduce the value to optimize screen updates.
589
   // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
639
   // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
590
   //#define DOGM_SPI_DELAY_US 5
640
   //#define DOGM_SPI_DELAY_US 5
641
+
642
+  // Swap the CW/CCW indicators in the graphics overlay
643
+  //#define OVERLAY_GFX_REVERSE
644
+
591
 #endif // DOGLCD
645
 #endif // DOGLCD
592
 
646
 
593
 // @section safety
647
 // @section safety
616
 #if ENABLED(BABYSTEPPING)
670
 #if ENABLED(BABYSTEPPING)
617
   //#define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
671
   //#define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
618
   #define BABYSTEP_INVERT_Z false    // Change if Z babysteps should go the other way
672
   #define BABYSTEP_INVERT_Z false    // Change if Z babysteps should go the other way
619
-  #define BABYSTEP_MULTIPLICATOR 100 // Babysteps are very small. Increase for faster motion.
673
+  #define BABYSTEP_MULTIPLICATOR 1   // Babysteps are very small. Increase for faster motion.
620
   //#define BABYSTEP_ZPROBE_OFFSET   // Enable to combine M851 and Babystepping
674
   //#define BABYSTEP_ZPROBE_OFFSET   // Enable to combine M851 and Babystepping
621
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
675
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
622
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
676
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
623
                                         // Note: Extra time may be added to mitigate controller latency.
677
                                         // Note: Extra time may be added to mitigate controller latency.
624
   //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
678
   //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
625
-  //#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators
626
 #endif
679
 #endif
627
 
680
 
628
 // @section extruder
681
 // @section extruder
669
 
722
 
670
 // @section leveling
723
 // @section leveling
671
 
724
 
672
-// Default mesh area is an area with an inset margin on the print area.
673
-// Below are the macros that are used to define the borders for the mesh area,
674
-// made available here for specialized needs, ie dual extruder setup.
675
-#if ENABLED(MESH_BED_LEVELING)
676
-  #define MESH_MIN_X MESH_INSET
677
-  #define MESH_MAX_X (X_BED_SIZE - (MESH_INSET))
678
-  #define MESH_MIN_Y MESH_INSET
679
-  #define MESH_MAX_Y (Y_BED_SIZE - (MESH_INSET))
680
-#elif ENABLED(AUTO_BED_LEVELING_UBL)
681
-  #define UBL_MESH_MIN_X UBL_MESH_INSET
682
-  #define UBL_MESH_MAX_X (X_BED_SIZE - (UBL_MESH_INSET))
683
-  #define UBL_MESH_MIN_Y UBL_MESH_INSET
684
-  #define UBL_MESH_MAX_Y (Y_BED_SIZE - (UBL_MESH_INSET))
685
-
686
-  // If this is defined, the currently active mesh will be saved in the
687
-  // current slot on M500.
688
-  #define UBL_SAVE_ACTIVE_ON_M500
725
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
726
+  #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
727
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
728
+  #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
729
+#endif
730
+
731
+#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL)
732
+  // Override the mesh area if the automatic (max) area is too large
733
+  //#define MESH_MIN_X MESH_INSET
734
+  //#define MESH_MIN_Y MESH_INSET
735
+  //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET)
736
+  //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
689
 #endif
737
 #endif
690
 
738
 
691
 // @section extras
739
 // @section extras
705
 //#define BEZIER_CURVE_SUPPORT
753
 //#define BEZIER_CURVE_SUPPORT
706
 
754
 
707
 // G38.2 and G38.3 Probe Target
755
 // G38.2 and G38.3 Probe Target
708
-// Enable PROBE_DOUBLE_TOUCH if you want G38 to double touch
756
+// Set MULTIPLE_PROBING if you want G38 to double touch
709
 //#define G38_PROBE_TARGET
757
 //#define G38_PROBE_TARGET
710
 #if ENABLED(G38_PROBE_TARGET)
758
 #if ENABLED(G38_PROBE_TARGET)
711
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
759
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
730
 // @section hidden
778
 // @section hidden
731
 
779
 
732
 // The number of linear motions that can be in the plan at any give time.
780
 // The number of linear motions that can be in the plan at any give time.
733
-// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2, i.g. 8,16,32 because shifts and ors are used to do the ring-buffering.
781
+// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2 (e.g. 8, 16, 32) because shifts and ors are used to do the ring-buffering.
734
 #if ENABLED(SDSUPPORT)
782
 #if ENABLED(SDSUPPORT)
735
   #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
783
   #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
736
 #else
784
 #else
821
 #endif
869
 #endif
822
 
870
 
823
 /**
871
 /**
872
+ * Extra Fan Speed
873
+ * Adds a secondary fan speed for each print-cooling fan.
874
+ *   'M106 P<fan> T3-255' : Set a secondary speed for <fan>
875
+ *   'M106 P<fan> T2'     : Use the set secondary speed
876
+ *   'M106 P<fan> T1'     : Restore the previous fan speed
877
+ */
878
+//#define EXTRA_FAN_SPEED
879
+
880
+/**
824
  * Advanced Pause
881
  * Advanced Pause
825
  * Experimental feature for filament change support and for parking the nozzle when paused.
882
  * Experimental feature for filament change support and for parking the nozzle when paused.
826
  * Adds the GCode M600 for initiating filament change.
883
  * Adds the GCode M600 for initiating filament change.
930
 
987
 
931
 #endif
988
 #endif
932
 
989
 
933
-// @section TMC2130
990
+// @section TMC2130, TMC2208
934
 
991
 
935
 /**
992
 /**
936
  * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
993
  * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
944
  */
1001
  */
945
 //#define HAVE_TMC2130
1002
 //#define HAVE_TMC2130
946
 
1003
 
947
-#if ENABLED(HAVE_TMC2130)
1004
+/**
1005
+ * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
1006
+ * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin.
1007
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1008
+ * to #_SERIAL_TX_PIN with a 1K resistor.
1009
+ * The drivers can also be used with hardware serial.
1010
+ *
1011
+ * You'll also need the TMC2208Stepper Arduino library
1012
+ * (https://github.com/teemuatlut/TMC2208Stepper).
1013
+ */
1014
+//#define HAVE_TMC2208
1015
+
1016
+#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
948
 
1017
 
949
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
1018
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
950
   //#define X_IS_TMC2130
1019
   //#define X_IS_TMC2130
959
   //#define E3_IS_TMC2130
1028
   //#define E3_IS_TMC2130
960
   //#define E4_IS_TMC2130
1029
   //#define E4_IS_TMC2130
961
 
1030
 
1031
+  //#define X_IS_TMC2208
1032
+  //#define X2_IS_TMC2208
1033
+  //#define Y_IS_TMC2208
1034
+  //#define Y2_IS_TMC2208
1035
+  //#define Z_IS_TMC2208
1036
+  //#define Z2_IS_TMC2208
1037
+  //#define E0_IS_TMC2208
1038
+  //#define E1_IS_TMC2208
1039
+  //#define E2_IS_TMC2208
1040
+  //#define E3_IS_TMC2208
1041
+  //#define E4_IS_TMC2208
1042
+
962
   /**
1043
   /**
963
    * Stepper driver settings
1044
    * Stepper driver settings
964
    */
1045
    */
965
 
1046
 
966
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1047
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
967
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1048
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
968
-  #define INTERPOLATE          1  // Interpolate X/Y/Z_MICROSTEPS to 256
1049
+  #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
969
 
1050
 
970
-  #define X_CURRENT         1000  // rms current in mA. Multiply by 1.41 for peak current.
1051
+  #define X_CURRENT          800  // rms current in mA. Multiply by 1.41 for peak current.
971
   #define X_MICROSTEPS        16  // 0..256
1052
   #define X_MICROSTEPS        16  // 0..256
972
 
1053
 
973
-  #define Y_CURRENT         1000
1054
+  #define Y_CURRENT          800
974
   #define Y_MICROSTEPS        16
1055
   #define Y_MICROSTEPS        16
975
 
1056
 
976
-  #define Z_CURRENT         1000
1057
+  #define Z_CURRENT          800
977
   #define Z_MICROSTEPS        16
1058
   #define Z_MICROSTEPS        16
978
 
1059
 
979
-  //#define X2_CURRENT      1000
980
-  //#define X2_MICROSTEPS     16
1060
+  #define X2_CURRENT         800
1061
+  #define X2_MICROSTEPS       16
981
 
1062
 
982
-  //#define Y2_CURRENT      1000
983
-  //#define Y2_MICROSTEPS     16
1063
+  #define Y2_CURRENT         800
1064
+  #define Y2_MICROSTEPS       16
984
 
1065
 
985
-  //#define Z2_CURRENT      1000
986
-  //#define Z2_MICROSTEPS     16
1066
+  #define Z2_CURRENT         800
1067
+  #define Z2_MICROSTEPS       16
987
 
1068
 
988
-  //#define E0_CURRENT      1000
989
-  //#define E0_MICROSTEPS     16
1069
+  #define E0_CURRENT         800
1070
+  #define E0_MICROSTEPS       16
990
 
1071
 
991
-  //#define E1_CURRENT      1000
992
-  //#define E1_MICROSTEPS     16
1072
+  #define E1_CURRENT         800
1073
+  #define E1_MICROSTEPS       16
993
 
1074
 
994
-  //#define E2_CURRENT      1000
995
-  //#define E2_MICROSTEPS     16
1075
+  #define E2_CURRENT         800
1076
+  #define E2_MICROSTEPS       16
996
 
1077
 
997
-  //#define E3_CURRENT      1000
998
-  //#define E3_MICROSTEPS     16
1078
+  #define E3_CURRENT         800
1079
+  #define E3_MICROSTEPS       16
999
 
1080
 
1000
-  //#define E4_CURRENT      1000
1001
-  //#define E4_MICROSTEPS     16
1081
+  #define E4_CURRENT         800
1082
+  #define E4_MICROSTEPS       16
1002
 
1083
 
1003
   /**
1084
   /**
1004
    * Use Trinamic's ultra quiet stepping mode.
1085
    * Use Trinamic's ultra quiet stepping mode.
1007
   #define STEALTHCHOP
1088
   #define STEALTHCHOP
1008
 
1089
 
1009
   /**
1090
   /**
1010
-   * Let Marlin automatically control stepper current.
1011
-   * This is still an experimental feature.
1012
-   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
1013
-   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
1014
-   * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX
1091
+   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1092
+   * like overtemperature and short to ground. TMC2208 requires hardware serial.
1093
+   * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1094
+   * Other detected conditions can be used to stop the current print.
1015
    * Relevant g-codes:
1095
    * Relevant g-codes:
1016
    * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
1096
    * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
1017
-   * M906 S1 - Start adjusting current
1018
-   * M906 S0 - Stop adjusting current
1019
    * M911 - Report stepper driver overtemperature pre-warn condition.
1097
    * M911 - Report stepper driver overtemperature pre-warn condition.
1020
    * M912 - Clear stepper driver overtemperature pre-warn condition flag.
1098
    * M912 - Clear stepper driver overtemperature pre-warn condition flag.
1099
+   * M122 S0/1 - Report driver parameters (Requires TMC_DEBUG)
1021
    */
1100
    */
1022
-  //#define AUTOMATIC_CURRENT_CONTROL
1101
+  //#define MONITOR_DRIVER_STATUS
1023
 
1102
 
1024
-  #if ENABLED(AUTOMATIC_CURRENT_CONTROL)
1025
-    #define CURRENT_STEP          50  // [mA]
1026
-    #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
1103
+  #if ENABLED(MONITOR_DRIVER_STATUS)
1104
+    #define CURRENT_STEP_DOWN     50  // [mA]
1027
     #define REPORT_CURRENT_CHANGE
1105
     #define REPORT_CURRENT_CHANGE
1106
+    #define STOP_ON_ERROR
1028
   #endif
1107
   #endif
1029
 
1108
 
1030
   /**
1109
   /**
1039
   #define X2_HYBRID_THRESHOLD    100
1118
   #define X2_HYBRID_THRESHOLD    100
1040
   #define Y_HYBRID_THRESHOLD     100
1119
   #define Y_HYBRID_THRESHOLD     100
1041
   #define Y2_HYBRID_THRESHOLD    100
1120
   #define Y2_HYBRID_THRESHOLD    100
1042
-  #define Z_HYBRID_THRESHOLD       4
1043
-  #define Z2_HYBRID_THRESHOLD      4
1121
+  #define Z_HYBRID_THRESHOLD       3
1122
+  #define Z2_HYBRID_THRESHOLD      3
1044
   #define E0_HYBRID_THRESHOLD     30
1123
   #define E0_HYBRID_THRESHOLD     30
1045
   #define E1_HYBRID_THRESHOLD     30
1124
   #define E1_HYBRID_THRESHOLD     30
1046
   #define E2_HYBRID_THRESHOLD     30
1125
   #define E2_HYBRID_THRESHOLD     30
1050
   /**
1129
   /**
1051
    * Use stallGuard2 to sense an obstacle and trigger an endstop.
1130
    * Use stallGuard2 to sense an obstacle and trigger an endstop.
1052
    * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
1131
    * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
1053
-   * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal.
1132
+   * X and Y homing will always be done in spreadCycle mode.
1054
    *
1133
    *
1055
    * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
1134
    * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
1056
    * Higher values make the system LESS sensitive.
1135
    * Higher values make the system LESS sensitive.
1059
    * It is advised to set X/Y_HOME_BUMP_MM to 0.
1138
    * It is advised to set X/Y_HOME_BUMP_MM to 0.
1060
    * M914 X/Y to live tune the setting
1139
    * M914 X/Y to live tune the setting
1061
    */
1140
    */
1062
-  //#define SENSORLESS_HOMING
1141
+  //#define SENSORLESS_HOMING // TMC2130 only
1063
 
1142
 
1064
   #if ENABLED(SENSORLESS_HOMING)
1143
   #if ENABLED(SENSORLESS_HOMING)
1065
-    #define X_HOMING_SENSITIVITY  19
1066
-    #define Y_HOMING_SENSITIVITY  19
1144
+    #define X_HOMING_SENSITIVITY  8
1145
+    #define Y_HOMING_SENSITIVITY  8
1067
   #endif
1146
   #endif
1068
 
1147
 
1069
   /**
1148
   /**
1149
+   * Enable M122 debugging command for TMC stepper drivers.
1150
+   * M122 S0/1 will enable continous reporting.
1151
+   */
1152
+  //#define TMC_DEBUG
1153
+
1154
+  /**
1070
    * You can set your own advanced settings by filling in predefined functions.
1155
    * You can set your own advanced settings by filling in predefined functions.
1071
    * A list of available functions can be found on the library github page
1156
    * A list of available functions can be found on the library github page
1072
    * https://github.com/teemuatlut/TMC2130Stepper
1157
    * https://github.com/teemuatlut/TMC2130Stepper
1158
+   * https://github.com/teemuatlut/TMC2208Stepper
1073
    *
1159
    *
1074
    * Example:
1160
    * Example:
1075
-   * #define TMC2130_ADV() { \
1161
+   * #define TMC_ADV() { \
1076
    *   stepperX.diag0_temp_prewarn(1); \
1162
    *   stepperX.diag0_temp_prewarn(1); \
1077
-   *   stepperX.interpolate(0); \
1163
+   *   stepperY.interpolate(0); \
1078
    * }
1164
    * }
1079
    */
1165
    */
1080
-  #define  TMC2130_ADV() {  }
1166
+  #define  TMC_ADV() {  }
1081
 
1167
 
1082
-#endif // HAVE_TMC2130
1168
+#endif // TMC2130 || TMC2208
1083
 
1169
 
1084
 // @section L6470
1170
 // @section L6470
1085
 
1171
 
1244
 #endif
1330
 #endif
1245
 
1331
 
1246
 /**
1332
 /**
1333
+ * Filament Width Sensor
1334
+ *
1335
+ * Measures the filament width in real-time and adjusts
1336
+ * flow rate to compensate for any irregularities.
1337
+ *
1338
+ * Also allows the measured filament diameter to set the
1339
+ * extrusion rate, so the slicer only has to specify the
1340
+ * volume.
1341
+ *
1342
+ * Only a single extruder is supported at this time.
1343
+ *
1344
+ *  34 RAMPS_14    : Analog input 5 on the AUX2 connector
1345
+ *  81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
1346
+ * 301 RAMBO       : Analog input 3
1347
+ *
1348
+ * Note: May require analog pins to be defined for other boards.
1349
+ */
1350
+//#define FILAMENT_WIDTH_SENSOR
1351
+
1352
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
1353
+  #define FILAMENT_SENSOR_EXTRUDER_NUM 0    // Index of the extruder that has the filament sensor. :[0,1,2,3,4]
1354
+  #define MEASUREMENT_DELAY_CM        14    // (cm) The distance from the filament sensor to the melting chamber
1355
+
1356
+  #define MEASURED_UPPER_LIMIT         3.30 // (mm) Upper limit used to validate sensor reading
1357
+  #define MEASURED_LOWER_LIMIT         1.90 // (mm) Lower limit used to validate sensor reading
1358
+  #define MAX_MEASUREMENT_DELAY       20    // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
1359
+
1360
+  #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
1361
+
1362
+  // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
1363
+  //#define FILAMENT_LCD_DISPLAY
1364
+#endif
1365
+
1366
+/**
1367
+ * CNC Coordinate Systems
1368
+ *
1369
+ * Enables G53 and G54-G59.3 commands to select coordinate systems
1370
+ * and G92.1 to reset the workspace to native machine space.
1371
+ */
1372
+//#define CNC_COORDINATE_SYSTEMS
1373
+
1374
+/**
1247
  * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
1375
  * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
1248
  */
1376
  */
1249
 //#define PINS_DEBUGGING
1377
 //#define PINS_DEBUGGING
1434
                                          // tweaks made to the configuration are affecting the printer in real-time.
1562
                                          // tweaks made to the configuration are affecting the printer in real-time.
1435
 #endif
1563
 #endif
1436
 
1564
 
1565
+/**
1566
+ * NanoDLP Sync support
1567
+ *
1568
+ * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
1569
+ * string to enable synchronization with DLP projector exposure. This change will allow to use
1570
+ * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
1571
+ */
1572
+//#define NANODLP_Z_SYNC
1573
+#if ENABLED(NANODLP_Z_SYNC)
1574
+  //#define NANODLP_ALL_AXIS  // Enables "Z_move_comp" output on any axis move.
1575
+                              // Default behaviour is limited to Z axis only.
1576
+#endif
1577
+
1437
 #endif // CONFIGURATION_ADV_H
1578
 #endif // CONFIGURATION_ADV_H

+ 159
- 90
Marlin/example_configurations/Velleman/K8400/Configuration.h Переглянути файл

37
  */
37
  */
38
 #ifndef CONFIGURATION_H
38
 #ifndef CONFIGURATION_H
39
 #define CONFIGURATION_H
39
 #define CONFIGURATION_H
40
-#define CONFIGURATION_H_VERSION 010100
40
+#define CONFIGURATION_H_VERSION 010107
41
 
41
 
42
 //===========================================================================
42
 //===========================================================================
43
 //============================= Getting Started =============================
43
 //============================= Getting Started =============================
136
 // :[1, 2, 3, 4, 5]
136
 // :[1, 2, 3, 4, 5]
137
 #define EXTRUDERS 1
137
 #define EXTRUDERS 1
138
 
138
 
139
+// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
140
+#define DEFAULT_NOMINAL_FILAMENT_DIA 3.0
141
+
139
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
142
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
140
 //#define SINGLENOZZLE
143
 //#define SINGLENOZZLE
141
 
144
 
336
 
339
 
337
 // Comment the following line to disable PID and enable bang-bang.
340
 // Comment the following line to disable PID and enable bang-bang.
338
 #define PIDTEMP
341
 #define PIDTEMP
339
-#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
340
-#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
342
+#define BANG_MAX 255     // Limits current to nozzle while in bang-bang mode; 255=full current
343
+#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
344
+#define PID_K1 0.95      // Smoothing factor within the PID
341
 #if ENABLED(PIDTEMP)
345
 #if ENABLED(PIDTEMP)
342
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
346
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
343
   //#define PID_DEBUG // Sends debug data to the serial port.
347
   //#define PID_DEBUG // Sends debug data to the serial port.
347
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
351
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
348
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
352
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
349
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
353
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
350
-  #define K1 0.95 //smoothing factor within the PID
351
 
354
 
352
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
355
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
353
 
356
 
428
 //===========================================================================
431
 //===========================================================================
429
 
432
 
430
 /**
433
 /**
431
- * Thermal Protection protects your printer from damage and fire if a
432
- * thermistor falls out or temperature sensors fail in any way.
434
+ * Thermal Protection provides additional protection to your printer from damage
435
+ * and fire. Marlin always includes safe min and max temperature ranges which
436
+ * protect against a broken or disconnected thermistor wire.
433
  *
437
  *
434
- * The issue: If a thermistor falls out or a temperature sensor fails,
435
- * Marlin can no longer sense the actual temperature. Since a disconnected
436
- * thermistor reads as a low temperature, the firmware will keep the heater on.
438
+ * The issue: If a thermistor falls out, it will report the much lower
439
+ * temperature of the air in the room, and the the firmware will keep
440
+ * the heater on.
437
  *
441
  *
438
  * If you get "Thermal Runaway" or "Heating failed" errors the
442
  * If you get "Thermal Runaway" or "Heating failed" errors the
439
  * details can be tuned in Configuration_adv.h
443
  * details can be tuned in Configuration_adv.h
573
 // @section probes
577
 // @section probes
574
 
578
 
575
 //
579
 //
576
-// See http://marlinfw.org/configuration/probes.html
580
+// See http://marlinfw.org/docs/configuration/probes.html
577
 //
581
 //
578
 
582
 
579
 /**
583
 /**
686
 // X and Y axis travel speed (mm/m) between probes
690
 // X and Y axis travel speed (mm/m) between probes
687
 #define XY_PROBE_SPEED 8000
691
 #define XY_PROBE_SPEED 8000
688
 
692
 
689
-// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH)
693
+// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
690
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
694
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
691
 
695
 
692
 // Speed for the "accurate" probe of each point
696
 // Speed for the "accurate" probe of each point
693
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
697
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
694
 
698
 
695
-// Use double touch for probing
696
-//#define PROBE_DOUBLE_TOUCH
699
+// The number of probes to perform at each point.
700
+//   Set to 2 for a fast/slow probe, using the second probe result.
701
+//   Set to 3 or more for slow probes, averaging the results.
702
+//#define MULTIPLE_PROBING 2
697
 
703
 
698
 /**
704
 /**
699
  * Z probes require clearance when deploying, stowing, and moving between
705
  * Z probes require clearance when deploying, stowing, and moving between
785
 #define Y_MAX_POS Y_BED_SIZE
791
 #define Y_MAX_POS Y_BED_SIZE
786
 #define Z_MAX_POS 190
792
 #define Z_MAX_POS 190
787
 
793
 
788
-// If enabled, axes won't move below MIN_POS in response to movement commands.
794
+/**
795
+ * Software Endstops
796
+ *
797
+ * - Prevent moves outside the set machine bounds.
798
+ * - Individual axes can be disabled, if desired.
799
+ * - X and Y only apply to Cartesian robots.
800
+ * - Use 'M211' to set software endstops on/off or report current state
801
+ */
802
+
803
+// Min software endstops curtail movement below minimum coordinate bounds
789
 #define MIN_SOFTWARE_ENDSTOPS
804
 #define MIN_SOFTWARE_ENDSTOPS
790
-// If enabled, axes won't move above MAX_POS in response to movement commands.
805
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
806
+  #define MIN_SOFTWARE_ENDSTOP_X
807
+  #define MIN_SOFTWARE_ENDSTOP_Y
808
+  #define MIN_SOFTWARE_ENDSTOP_Z
809
+#endif
810
+
811
+// Max software endstops curtail movement above maximum coordinate bounds
791
 #define MAX_SOFTWARE_ENDSTOPS
812
 #define MAX_SOFTWARE_ENDSTOPS
813
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
814
+  #define MAX_SOFTWARE_ENDSTOP_X
815
+  #define MAX_SOFTWARE_ENDSTOP_Y
816
+  #define MAX_SOFTWARE_ENDSTOP_Z
817
+#endif
792
 
818
 
793
 /**
819
 /**
794
  * Filament Runout Sensor
820
  * Filament Runout Sensor
808
 //===========================================================================
834
 //===========================================================================
809
 //=============================== Bed Leveling ==============================
835
 //=============================== Bed Leveling ==============================
810
 //===========================================================================
836
 //===========================================================================
811
-// @section bedlevel
837
+// @section calibrate
812
 
838
 
813
 /**
839
 /**
814
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
840
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
834
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
860
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
835
  *   A comprehensive bed leveling system combining the features and benefits
861
  *   A comprehensive bed leveling system combining the features and benefits
836
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
862
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
837
- *   Validation and Mesh Editing systems. Currently, UBL is only checked out
838
- *   for Cartesian Printers. That said, it was primarily designed to correct
839
- *   poor quality Delta Printers. If you feel adventurous and have a Delta,
840
- *   please post an issue if something doesn't work correctly. Initially,
841
- *   you will need to set a reduced bed size so you have a rectangular area
842
- *   to test on.
863
+ *   Validation and Mesh Editing systems.
843
  *
864
  *
844
  * - MESH_BED_LEVELING
865
  * - MESH_BED_LEVELING
845
  *   Probe a grid manually
866
  *   Probe a grid manually
866
   // at which point movement will be level to the machine's XY plane.
887
   // at which point movement will be level to the machine's XY plane.
867
   // The height can be set with M420 Z<height>
888
   // The height can be set with M420 Z<height>
868
   #define ENABLE_LEVELING_FADE_HEIGHT
889
   #define ENABLE_LEVELING_FADE_HEIGHT
890
+
891
+  // For Cartesian machines, instead of dividing moves on mesh boundaries,
892
+  // split up moves into short segments like a Delta. This follows the
893
+  // contours of the bed more closely than edge-to-edge straight moves.
894
+  #define SEGMENT_LEVELED_MOVES
895
+  #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)
896
+
897
+  /**
898
+   * Enable the G26 Mesh Validation Pattern tool.
899
+   */
900
+  //#define G26_MESH_VALIDATION   // Enable G26 mesh validation
901
+  #if ENABLED(G26_MESH_VALIDATION)
902
+    #define MESH_TEST_NOZZLE_SIZE     0.4   // (mm) Diameter of primary nozzle.
903
+    #define MESH_TEST_LAYER_HEIGHT    0.2   // (mm) Default layer height for the G26 Mesh Validation Tool.
904
+    #define MESH_TEST_HOTEND_TEMP   205.0   // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
905
+    #define MESH_TEST_BED_TEMP       60.0   // (°C) Default bed temperature for the G26 Mesh Validation Tool.
906
+  #endif
907
+
869
 #endif
908
 #endif
870
 
909
 
871
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
910
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
921
   //========================= Unified Bed Leveling ============================
960
   //========================= Unified Bed Leveling ============================
922
   //===========================================================================
961
   //===========================================================================
923
 
962
 
924
-  #define UBL_MESH_INSET 1          // Mesh inset margin on print area
963
+  //#define MESH_EDIT_GFX_OVERLAY   // Display a graphics overlay while editing the mesh
964
+
965
+  #define MESH_INSET 1              // Mesh inset margin on print area
925
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
966
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
926
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
967
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
927
 
968
 
932
   #define UBL_PROBE_PT_3_X 180
973
   #define UBL_PROBE_PT_3_X 180
933
   #define UBL_PROBE_PT_3_Y 20
974
   #define UBL_PROBE_PT_3_Y 20
934
 
975
 
935
-  #define UBL_G26_MESH_VALIDATION   // Enable G26 mesh validation
936
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
976
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
977
+  #define UBL_SAVE_ACTIVE_ON_M500   // Save the currently active mesh in the current slot on M500
937
 
978
 
938
 #elif ENABLED(MESH_BED_LEVELING)
979
 #elif ENABLED(MESH_BED_LEVELING)
939
 
980
 
993
 //#define Z_SAFE_HOMING
1034
 //#define Z_SAFE_HOMING
994
 
1035
 
995
 #if ENABLED(Z_SAFE_HOMING)
1036
 #if ENABLED(Z_SAFE_HOMING)
996
-  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axis (G28).
997
-  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axis (G28).
1037
+  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axes (G28).
1038
+  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axes (G28).
998
 #endif
1039
 #endif
999
 
1040
 
1000
 // Homing speeds (mm/m)
1041
 // Homing speeds (mm/m)
1001
 #define HOMING_FEEDRATE_XY (50*60)
1042
 #define HOMING_FEEDRATE_XY (50*60)
1002
 #define HOMING_FEEDRATE_Z  (8*60)
1043
 #define HOMING_FEEDRATE_Z  (8*60)
1003
 
1044
 
1045
+// @section calibrate
1046
+
1047
+/**
1048
+ * Bed Skew Compensation
1049
+ *
1050
+ * This feature corrects for misalignment in the XYZ axes.
1051
+ *
1052
+ * Take the following steps to get the bed skew in the XY plane:
1053
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1054
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1055
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1056
+ *  4. For XY_SIDE_AD measure the edge A to D
1057
+ *
1058
+ * Marlin automatically computes skew factors from these measurements.
1059
+ * Skew factors may also be computed and set manually:
1060
+ *
1061
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1062
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1063
+ *
1064
+ * If desired, follow the same procedure for XZ and YZ.
1065
+ * Use these diagrams for reference:
1066
+ *
1067
+ *    Y                     Z                     Z
1068
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1069
+ *    |    /       /        |    /       /        |    /       /
1070
+ *    |   /       /         |   /       /         |   /       /
1071
+ *    |  A-------D          |  A-------D          |  A-------D
1072
+ *    +-------------->X     +-------------->X     +-------------->Y
1073
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1074
+ */
1075
+//#define SKEW_CORRECTION
1076
+
1077
+#if ENABLED(SKEW_CORRECTION)
1078
+  // Input all length measurements here:
1079
+  #define XY_DIAG_AC 282.8427124746
1080
+  #define XY_DIAG_BD 282.8427124746
1081
+  #define XY_SIDE_AD 200
1082
+
1083
+  // Or, set the default skew factors directly here
1084
+  // to override the above measurements:
1085
+  #define XY_SKEW_FACTOR 0.0
1086
+
1087
+  //#define SKEW_CORRECTION_FOR_Z
1088
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1089
+    #define XZ_DIAG_AC 282.8427124746
1090
+    #define XZ_DIAG_BD 282.8427124746
1091
+    #define YZ_DIAG_AC 282.8427124746
1092
+    #define YZ_DIAG_BD 282.8427124746
1093
+    #define YZ_SIDE_AD 200
1094
+    #define XZ_SKEW_FACTOR 0.0
1095
+    #define YZ_SKEW_FACTOR 0.0
1096
+  #endif
1097
+
1098
+  // Enable this option for M852 to set skew at runtime
1099
+  //#define SKEW_CORRECTION_GCODE
1100
+#endif
1101
+
1004
 //=============================================================================
1102
 //=============================================================================
1005
 //============================= Additional Features ===========================
1103
 //============================= Additional Features ===========================
1006
 //=============================================================================
1104
 //=============================================================================
1032
 //
1130
 //
1033
 // M100 Free Memory Watcher
1131
 // M100 Free Memory Watcher
1034
 //
1132
 //
1035
-//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
1133
+//#define M100_FREE_MEMORY_WATCHER    // Add M100 (Free Memory Watcher) to debug memory usage
1036
 
1134
 
1037
 //
1135
 //
1038
 // G20/G21 Inch mode support
1136
 // G20/G21 Inch mode support
1177
  *
1275
  *
1178
  * Select the language to display on the LCD. These languages are available:
1276
  * Select the language to display on the LCD. These languages are available:
1179
  *
1277
  *
1180
- *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, gl, hr,
1181
- *    it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1278
+ *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, fr_utf8, gl,
1279
+ *    hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1182
  *    tr, uk, zh_CN, zh_TW, test
1280
  *    tr, uk, zh_CN, zh_TW, test
1183
  *
1281
  *
1184
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1282
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1185
  */
1283
  */
1186
 #define LCD_LANGUAGE en
1284
 #define LCD_LANGUAGE en
1187
 
1285
 
1309
 // Note: Test audio output with the G-Code:
1407
 // Note: Test audio output with the G-Code:
1310
 //  M300 S<frequency Hz> P<duration ms>
1408
 //  M300 S<frequency Hz> P<duration ms>
1311
 //
1409
 //
1312
-//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
1313
-//#define LCD_FEEDBACK_FREQUENCY_HZ 1000
1410
+//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
1411
+//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
1314
 
1412
 
1315
 //
1413
 //
1316
 // CONTROLLER TYPE: Standard
1414
 // CONTROLLER TYPE: Standard
1418
 //#define CARTESIO_UI
1516
 //#define CARTESIO_UI
1419
 
1517
 
1420
 //
1518
 //
1421
-// ANET_10 Controller supported displays.
1519
+// ANET and Tronxy Controller supported displays.
1422
 //
1520
 //
1423
-//#define ANET_KEYPAD_LCD         // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1521
+//#define ZONESTAR_LCD            // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1424
                                   // This LCD is known to be susceptible to electrical interference
1522
                                   // This LCD is known to be susceptible to electrical interference
1425
                                   // which scrambles the display.  Pressing any button clears it up.
1523
                                   // which scrambles the display.  Pressing any button clears it up.
1524
+                                  // This is a LCD2004 display with 5 analog buttons.
1525
+
1426
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1526
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1427
                                   // A clone of the RepRapDiscount full graphics display but with
1527
                                   // A clone of the RepRapDiscount full graphics display but with
1428
                                   // different pins/wiring (see pins_ANET_10.h).
1528
                                   // different pins/wiring (see pins_ANET_10.h).
1532
 //
1632
 //
1533
 //#define MKS_12864OLED
1633
 //#define MKS_12864OLED
1534
 
1634
 
1635
+// Silvergate GLCD controller
1636
+// http://github.com/android444/Silvergate
1637
+//
1638
+//#define SILVER_GATE_GLCD_CONTROLLER
1639
+
1535
 //=============================================================================
1640
 //=============================================================================
1536
 //=============================== Extra Features ==============================
1641
 //=============================== Extra Features ==============================
1537
 //=============================================================================
1642
 //=============================================================================
1588
  * Adds the M150 command to set the LED (or LED strip) color.
1693
  * Adds the M150 command to set the LED (or LED strip) color.
1589
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1694
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1590
  * luminance values can be set from 0 to 255.
1695
  * luminance values can be set from 0 to 255.
1591
- * For Neopixel LED overall brightness parameters is also available 
1696
+ * For Neopixel LED an overall brightness parameter is also available.
1592
  *
1697
  *
1593
  * *** CAUTION ***
1698
  * *** CAUTION ***
1594
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1699
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1595
  *  as the Arduino cannot handle the current the LEDs will require.
1700
  *  as the Arduino cannot handle the current the LEDs will require.
1596
  *  Failure to follow this precaution can destroy your Arduino!
1701
  *  Failure to follow this precaution can destroy your Arduino!
1597
- *  The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
1598
- *  cannot handle such current, separate 5V power supply must be used
1702
+ *  NOTE: A separate 5V power supply is required! The Neopixel LED needs
1703
+ *  more current than the Arduino 5V linear regulator can produce.
1599
  * *** CAUTION ***
1704
  * *** CAUTION ***
1600
  *
1705
  *
1601
- * LED type. This options are mutualy exclusive. Uncomment only one.
1706
+ * LED Type. Enable only one of the following two options.
1602
  *
1707
  *
1603
  */
1708
  */
1604
 //#define RGB_LED
1709
 //#define RGB_LED
1614
 // Support for Adafruit Neopixel LED driver
1719
 // Support for Adafruit Neopixel LED driver
1615
 //#define NEOPIXEL_LED
1720
 //#define NEOPIXEL_LED
1616
 #if ENABLED(NEOPIXEL_LED)
1721
 #if ENABLED(NEOPIXEL_LED)
1617
-  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
1722
+  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
1618
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1723
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1619
-  #define NEOPIXEL_PIXELS 30       // Number of LEDs on strip
1620
-  #define NEOPIXEL_IS_SEQUENTIAL   // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
1621
-  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness 0-255
1724
+  #define NEOPIXEL_PIXELS 30       // Number of LEDs in the strip
1725
+  #define NEOPIXEL_IS_SEQUENTIAL   // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
1726
+  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness (0-255)
1622
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1727
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1623
 #endif
1728
 #endif
1624
 
1729
 
1633
  *  - Change to green once print has finished
1738
  *  - Change to green once print has finished
1634
  *  - Turn off after the print has finished and the user has pushed a button
1739
  *  - Turn off after the print has finished and the user has pushed a button
1635
  */
1740
  */
1636
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED)
1741
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
1637
   #define PRINTER_EVENT_LEDS
1742
   #define PRINTER_EVENT_LEDS
1638
 #endif
1743
 #endif
1639
 
1744
 
1640
-/*********************************************************************\
1641
-* R/C SERVO support
1642
-* Sponsored by TrinityLabs, Reworked by codexmas
1643
-**********************************************************************/
1745
+/**
1746
+ * R/C SERVO support
1747
+ * Sponsored by TrinityLabs, Reworked by codexmas
1748
+ */
1644
 
1749
 
1645
-// Number of servos
1646
-//
1647
-// If you select a configuration below, this will receive a default value and does not need to be set manually
1648
-// set it manually if you have more servos than extruders and wish to manually control some
1649
-// leaving it undefined or defining as 0 will disable the servo subsystem
1650
-// If unsure, leave commented / disabled
1651
-//
1750
+/**
1751
+ * Number of servos
1752
+ *
1753
+ * For some servo-related options NUM_SERVOS will be set automatically.
1754
+ * Set this manually if there are extra servos needing manual control.
1755
+ * Leave undefined or set to 0 to entirely disable the servo subsystem.
1756
+ */
1652
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1757
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1653
 
1758
 
1654
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1759
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1661
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1766
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1662
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1767
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1663
 
1768
 
1664
-/**
1665
- * Filament Width Sensor
1666
- *
1667
- * Measures the filament width in real-time and adjusts
1668
- * flow rate to compensate for any irregularities.
1669
- *
1670
- * Also allows the measured filament diameter to set the
1671
- * extrusion rate, so the slicer only has to specify the
1672
- * volume.
1673
- *
1674
- * Only a single extruder is supported at this time.
1675
- *
1676
- *  34 RAMPS_14    : Analog input 5 on the AUX2 connector
1677
- *  81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
1678
- * 301 RAMBO       : Analog input 3
1679
- *
1680
- * Note: May require analog pins to be defined for other boards.
1681
- */
1682
-//#define FILAMENT_WIDTH_SENSOR
1683
-
1684
-#define DEFAULT_NOMINAL_FILAMENT_DIA 3.00   // (mm) Diameter of the filament generally used (3.0 or 1.75mm), also used in the slicer. Used to validate sensor reading.
1685
-
1686
-#if ENABLED(FILAMENT_WIDTH_SENSOR)
1687
-  #define FILAMENT_SENSOR_EXTRUDER_NUM 0    // Index of the extruder that has the filament sensor (0,1,2,3)
1688
-  #define MEASUREMENT_DELAY_CM        14    // (cm) The distance from the filament sensor to the melting chamber
1689
-
1690
-  #define MEASURED_UPPER_LIMIT         3.30 // (mm) Upper limit used to validate sensor reading
1691
-  #define MEASURED_LOWER_LIMIT         1.90 // (mm) Lower limit used to validate sensor reading
1692
-  #define MAX_MEASUREMENT_DELAY       20    // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
1693
-
1694
-  #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
1695
-
1696
-  // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
1697
-  //#define FILAMENT_LCD_DISPLAY
1698
-#endif
1699
-
1700
 #endif // CONFIGURATION_H
1769
 #endif // CONFIGURATION_H

+ 268
- 125
Marlin/example_configurations/Velleman/K8400/Configuration_adv.h Переглянути файл

32
  */
32
  */
33
 #ifndef CONFIGURATION_ADV_H
33
 #ifndef CONFIGURATION_ADV_H
34
 #define CONFIGURATION_ADV_H
34
 #define CONFIGURATION_ADV_H
35
-#define CONFIGURATION_ADV_H_VERSION 010100
35
+#define CONFIGURATION_ADV_H_VERSION 010107
36
 
36
 
37
 // @section temperature
37
 // @section temperature
38
 
38
 
48
 #endif
48
 #endif
49
 
49
 
50
 /**
50
 /**
51
- * Thermal Protection protects your printer from damage and fire if a
52
- * thermistor falls out or temperature sensors fail in any way.
51
+ * Thermal Protection provides additional protection to your printer from damage
52
+ * and fire. Marlin always includes safe min and max temperature ranges which
53
+ * protect against a broken or disconnected thermistor wire.
53
  *
54
  *
54
- * The issue: If a thermistor falls out or a temperature sensor fails,
55
- * Marlin can no longer sense the actual temperature. Since a disconnected
56
- * thermistor reads as a low temperature, the firmware will keep the heater on.
55
+ * The issue: If a thermistor falls out, it will report the much lower
56
+ * temperature of the air in the room, and the the firmware will keep
57
+ * the heater on.
57
  *
58
  *
58
  * The solution: Once the temperature reaches the target, start observing.
59
  * The solution: Once the temperature reaches the target, start observing.
59
- * If the temperature stays too far below the target (hysteresis) for too long (period),
60
- * the firmware will halt the machine as a safety precaution.
60
+ * If the temperature stays too far below the target (hysteresis) for too
61
+ * long (period), the firmware will halt the machine as a safety precaution.
61
  *
62
  *
62
- * If you get false positives for "Thermal Runaway" increase THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
63
+ * If you get false positives for "Thermal Runaway", increase
64
+ * THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
63
  */
65
  */
64
 #if ENABLED(THERMAL_PROTECTION_HOTENDS)
66
 #if ENABLED(THERMAL_PROTECTION_HOTENDS)
65
   #define THERMAL_PROTECTION_PERIOD 40        // Seconds
67
   #define THERMAL_PROTECTION_PERIOD 40        // Seconds
66
   #define THERMAL_PROTECTION_HYSTERESIS 4     // Degrees Celsius
68
   #define THERMAL_PROTECTION_HYSTERESIS 4     // Degrees Celsius
67
 
69
 
68
   /**
70
   /**
69
-   * Whenever an M104 or M109 increases the target temperature the firmware will wait for the
70
-   * WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
71
-   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
72
-   * but only if the current temperature is far enough below the target for a reliable test.
71
+   * Whenever an M104, M109, or M303 increases the target temperature, the
72
+   * firmware will wait for the WATCH_TEMP_PERIOD to expire. If the temperature
73
+   * hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted and
74
+   * requires a hard reset. This test restarts with any M104/M109/M303, but only
75
+   * if the current temperature is far enough below the target for a reliable
76
+   * test.
73
    *
77
    *
74
-   * If you get false positives for "Heating failed" increase WATCH_TEMP_PERIOD and/or decrease WATCH_TEMP_INCREASE
75
-   * WATCH_TEMP_INCREASE should not be below 2.
78
+   * If you get false positives for "Heating failed", increase WATCH_TEMP_PERIOD
79
+   * and/or decrease WATCH_TEMP_INCREASE. WATCH_TEMP_INCREASE should not be set
80
+   * below 2.
76
    */
81
    */
77
   #define WATCH_TEMP_PERIOD 20                // Seconds
82
   #define WATCH_TEMP_PERIOD 20                // Seconds
78
   #define WATCH_TEMP_INCREASE 2               // Degrees Celsius
83
   #define WATCH_TEMP_INCREASE 2               // Degrees Celsius
86
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
91
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
87
 
92
 
88
   /**
93
   /**
89
-   * Whenever an M140 or M190 increases the target temperature the firmware will wait for the
90
-   * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE
91
-   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190,
92
-   * but only if the current temperature is far enough below the target for a reliable test.
93
-   *
94
-   * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease
95
-   * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.)
94
+   * As described above, except for the bed (M140/M190/M303).
96
    */
95
    */
97
   #define WATCH_BED_TEMP_PERIOD 60                // Seconds
96
   #define WATCH_BED_TEMP_PERIOD 60                // Seconds
98
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
97
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
123
   #define AUTOTEMP_OLDWEIGHT 0.98
122
   #define AUTOTEMP_OLDWEIGHT 0.98
124
 #endif
123
 #endif
125
 
124
 
125
+// Show extra position information in M114
126
+//#define M114_DETAIL
127
+
126
 // Show Temperature ADC value
128
 // Show Temperature ADC value
127
 // Enable for M105 to include ADC values read from temperature sensors.
129
 // Enable for M105 to include ADC values read from temperature sensors.
128
 //#define SHOW_TEMP_ADC_VALUES
130
 //#define SHOW_TEMP_ADC_VALUES
257
 
259
 
258
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
260
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
259
 
261
 
260
-// Dual X Steppers
261
-// Uncomment this option to drive two X axis motors.
262
-// The next unused E driver will be assigned to the second X stepper.
262
+/**
263
+ * Dual Steppers / Dual Endstops
264
+ *
265
+ * This section will allow you to use extra E drivers to drive a second motor for X, Y, or Z axes.
266
+ *
267
+ * For example, set X_DUAL_STEPPER_DRIVERS setting to use a second motor. If the motors need to
268
+ * spin in opposite directions set INVERT_X2_VS_X_DIR. If the second motor needs its own endstop
269
+ * set X_DUAL_ENDSTOPS. This can adjust for "racking." Use X2_USE_ENDSTOP to set the endstop plug
270
+ * that should be used for the second endstop. Extra endstops will appear in the output of 'M119'.
271
+ *
272
+ * Use X_DUAL_ENDSTOP_ADJUSTMENT to adjust for mechanical imperfection. After homing both motors
273
+ * this offset is applied to the X2 motor. To find the offset home the X axis, and measure the error
274
+ * in X2. Dual endstop offsets can be set at runtime with 'M666 X<offset> Y<offset> Z<offset>'.
275
+ */
276
+
263
 //#define X_DUAL_STEPPER_DRIVERS
277
 //#define X_DUAL_STEPPER_DRIVERS
264
 #if ENABLED(X_DUAL_STEPPER_DRIVERS)
278
 #if ENABLED(X_DUAL_STEPPER_DRIVERS)
265
-  // Set true if the two X motors need to rotate in opposite directions
266
-  #define INVERT_X2_VS_X_DIR true
279
+  #define INVERT_X2_VS_X_DIR true   // Set 'true' if X motors should rotate in opposite directions
280
+  //#define X_DUAL_ENDSTOPS
281
+  #if ENABLED(X_DUAL_ENDSTOPS)
282
+    #define X2_USE_ENDSTOP _XMAX_
283
+    #define X_DUAL_ENDSTOPS_ADJUSTMENT  0
284
+  #endif
267
 #endif
285
 #endif
268
 
286
 
269
-// Dual Y Steppers
270
-// Uncomment this option to drive two Y axis motors.
271
-// The next unused E driver will be assigned to the second Y stepper.
272
 //#define Y_DUAL_STEPPER_DRIVERS
287
 //#define Y_DUAL_STEPPER_DRIVERS
273
 #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
288
 #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
274
-  // Set true if the two Y motors need to rotate in opposite directions
275
-  #define INVERT_Y2_VS_Y_DIR true
289
+  #define INVERT_Y2_VS_Y_DIR true   // Set 'true' if Y motors should rotate in opposite directions
290
+  //#define Y_DUAL_ENDSTOPS
291
+  #if ENABLED(Y_DUAL_ENDSTOPS)
292
+    #define Y2_USE_ENDSTOP _YMAX_
293
+    #define Y_DUAL_ENDSTOPS_ADJUSTMENT  0
294
+  #endif
276
 #endif
295
 #endif
277
 
296
 
278
-// A single Z stepper driver is usually used to drive 2 stepper motors.
279
-// Uncomment this option to use a separate stepper driver for each Z axis motor.
280
-// The next unused E driver will be assigned to the second Z stepper.
281
 //#define Z_DUAL_STEPPER_DRIVERS
297
 //#define Z_DUAL_STEPPER_DRIVERS
282
-
283
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
298
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
284
-
285
-  // Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper.
286
-  // That way the machine is capable to align the bed during home, since both Z steppers are homed.
287
-  // There is also an implementation of M666 (software endstops adjustment) to this feature.
288
-  // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed.
289
-  // One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2.
290
-  // If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive.
291
-  // Play a little bit with small adjustments (0.5mm) and check the behaviour.
292
-  // The M119 (endstops report) will start reporting the Z2 Endstop as well.
293
-
294
   //#define Z_DUAL_ENDSTOPS
299
   //#define Z_DUAL_ENDSTOPS
295
-
296
   #if ENABLED(Z_DUAL_ENDSTOPS)
300
   #if ENABLED(Z_DUAL_ENDSTOPS)
297
     #define Z2_USE_ENDSTOP _XMAX_
301
     #define Z2_USE_ENDSTOP _XMAX_
298
-    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0  // Use M666 to determine/test this value
302
+    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0
299
   #endif
303
   #endif
300
-
301
-#endif // Z_DUAL_STEPPER_DRIVERS
304
+#endif
302
 
305
 
303
 // Enable this for dual x-carriage printers.
306
 // Enable this for dual x-carriage printers.
304
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
307
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
345
 
348
 
346
 // @section homing
349
 // @section homing
347
 
350
 
348
-//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
351
+// Homing hits each endstop, retracts by these distances, then does a slower bump.
349
 #define X_HOME_BUMP_MM 10
352
 #define X_HOME_BUMP_MM 10
350
 #define Y_HOME_BUMP_MM 10
353
 #define Y_HOME_BUMP_MM 10
351
 #define Z_HOME_BUMP_MM 3
354
 #define Z_HOME_BUMP_MM 3
352
-#define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
353
-#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
355
+#define HOMING_BUMP_DIVISOR { 2, 2, 4 }  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
356
+#define QUICK_HOME                       // If homing includes X and Y, do a diagonal move initially
354
 
357
 
355
 // When G28 is called, this option will make Y home before X
358
 // When G28 is called, this option will make Y home before X
356
 //#define HOME_Y_BEFORE_X
359
 //#define HOME_Y_BEFORE_X
434
 //#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 }   // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
437
 //#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 }   // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
435
 //#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 }    // Default drive percent - X, Y, Z, E axis
438
 //#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 }    // Default drive percent - X, Y, Z, E axis
436
 
439
 
437
-// Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
440
+// Use an I2C based DIGIPOT (e.g., Azteeg X3 Pro)
438
 //#define DIGIPOT_I2C
441
 //#define DIGIPOT_I2C
442
+#if ENABLED(DIGIPOT_I2C) && !defined(DIGIPOT_I2C_ADDRESS_A)
443
+  /**
444
+   * Common slave addresses:
445
+   *
446
+   *                    A   (A shifted)   B   (B shifted)  IC
447
+   * Smoothie          0x2C (0x58)       0x2D (0x5A)       MCP4451
448
+   * AZTEEG_X3_PRO     0x2C (0x58)       0x2E (0x5C)       MCP4451
449
+   * MIGHTYBOARD_REVE  0x2F (0x5E)                         MCP4018
450
+   */
451
+  #define DIGIPOT_I2C_ADDRESS_A 0x2C  // unshifted slave address for first DIGIPOT
452
+  #define DIGIPOT_I2C_ADDRESS_B 0x2D  // unshifted slave address for second DIGIPOT
453
+#endif
454
+
439
 //#define DIGIPOT_MCP4018          // Requires library from https://github.com/stawel/SlowSoftI2CMaster
455
 //#define DIGIPOT_MCP4018          // Requires library from https://github.com/stawel/SlowSoftI2CMaster
440
 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4     AZTEEG_X3_PRO: 8
456
 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4     AZTEEG_X3_PRO: 8
441
 // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
457
 // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
466
 // The timeout (in ms) to return to the status screen from sub-menus
482
 // The timeout (in ms) to return to the status screen from sub-menus
467
 //#define LCD_TIMEOUT_TO_STATUS 15000
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
468
 
484
 
485
+/**
486
+ * LED Control Menu
487
+ * Enable this feature to add LED Control to the LCD menu
488
+ */
489
+//#define LED_CONTROL_MENU
490
+#if ENABLED(LED_CONTROL_MENU)
491
+  #define LED_COLOR_PRESETS                 // Enable the Preset Color menu option
492
+  #if ENABLED(LED_COLOR_PRESETS)
493
+    #define LED_USER_PRESET_RED        255  // User defined RED value
494
+    #define LED_USER_PRESET_GREEN      128  // User defined GREEN value
495
+    #define LED_USER_PRESET_BLUE         0  // User defined BLUE value
496
+    #define LED_USER_PRESET_WHITE      255  // User defined WHITE value
497
+    #define LED_USER_PRESET_BRIGHTNESS 255  // User defined intensity
498
+    //#define LED_USER_PRESET_STARTUP       // Have the printer display the user preset color on startup
499
+  #endif
500
+#endif // LED_CONTROL_MENU
501
+
469
 #if ENABLED(SDSUPPORT)
502
 #if ENABLED(SDSUPPORT)
470
 
503
 
471
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
504
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
475
   // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
508
   // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
476
   #define SD_DETECT_INVERTED
509
   #define SD_DETECT_INVERTED
477
 
510
 
478
-  #define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
511
+  #define SD_FINISHED_STEPPERRELEASE true          // Disable steppers when SD Print is finished
479
   #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
512
   #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
480
 
513
 
481
-  #define SDCARD_RATHERRECENTFIRST  //reverse file order of sd card menu display. Its sorted practically after the file system block order.
482
-  // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that.
483
-  // using:
514
+  // Reverse SD sort to show "more recent" files first, according to the card's FAT.
515
+  // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended.
516
+  #define SDCARD_RATHERRECENTFIRST
517
+
518
+  // Add an option in the menu to run all auto#.g files
484
   //#define MENU_ADDAUTOSTART
519
   //#define MENU_ADDAUTOSTART
485
 
520
 
486
   /**
521
   /**
517
     #define SDSORT_USES_STACK  false  // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
552
     #define SDSORT_USES_STACK  false  // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
518
     #define SDSORT_CACHE_NAMES false  // Keep sorted items in RAM longer for speedy performance. Most expensive option.
553
     #define SDSORT_CACHE_NAMES false  // Keep sorted items in RAM longer for speedy performance. Most expensive option.
519
     #define SDSORT_DYNAMIC_RAM false  // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
554
     #define SDSORT_DYNAMIC_RAM false  // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
555
+    #define SDSORT_CACHE_VFATS 2      // Maximum number of 13-byte VFAT entries to use for sorting.
556
+                                      // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM.
520
   #endif
557
   #endif
521
 
558
 
522
   // Show a progress bar on HD44780 LCDs for SD printing
559
   // Show a progress bar on HD44780 LCDs for SD printing
535
     //#define LCD_PROGRESS_BAR_TEST
572
     //#define LCD_PROGRESS_BAR_TEST
536
   #endif
573
   #endif
537
 
574
 
575
+  // Add an 'M73' G-code to set the current percentage
576
+  //#define LCD_SET_PROGRESS_MANUALLY
577
+
538
   // This allows hosts to request long names for files and folders with M33
578
   // This allows hosts to request long names for files and folders with M33
539
   //#define LONG_FILENAME_HOST_SUPPORT
579
   //#define LONG_FILENAME_HOST_SUPPORT
540
 
580
 
541
-  // This option allows you to abort SD printing when any endstop is triggered.
542
-  // This feature must be enabled with "M540 S1" or from the LCD menu.
543
-  // To have any effect, endstops must be enabled during SD printing.
581
+  // Enable this option to scroll long filenames in the SD card menu
582
+  //#define SCROLL_LONG_FILENAMES
583
+
584
+  /**
585
+   * This option allows you to abort SD printing when any endstop is triggered.
586
+   * This feature must be enabled with "M540 S1" or from the LCD menu.
587
+   * To have any effect, endstops must be enabled during SD printing.
588
+   */
544
   //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
589
   //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
545
 
590
 
591
+  /**
592
+   * This option makes it easier to print the same SD Card file again.
593
+   * On print completion the LCD Menu will open with the file selected.
594
+   * You can just click to start the print, or navigate elsewhere.
595
+   */
596
+  //#define SD_REPRINT_LAST_SELECTED_FILE
597
+
546
 #endif // SDSUPPORT
598
 #endif // SDSUPPORT
547
 
599
 
548
 /**
600
 /**
575
   // Enable this option and reduce the value to optimize screen updates.
627
   // Enable this option and reduce the value to optimize screen updates.
576
   // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
628
   // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
577
   //#define DOGM_SPI_DELAY_US 5
629
   //#define DOGM_SPI_DELAY_US 5
630
+
631
+  // Swap the CW/CCW indicators in the graphics overlay
632
+  //#define OVERLAY_GFX_REVERSE
633
+
578
 #endif // DOGLCD
634
 #endif // DOGLCD
579
 
635
 
580
 // @section safety
636
 // @section safety
603
 #if ENABLED(BABYSTEPPING)
659
 #if ENABLED(BABYSTEPPING)
604
   //#define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
660
   //#define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
605
   #define BABYSTEP_INVERT_Z false    // Change if Z babysteps should go the other way
661
   #define BABYSTEP_INVERT_Z false    // Change if Z babysteps should go the other way
606
-  #define BABYSTEP_MULTIPLICATOR 100 // Babysteps are very small. Increase for faster motion.
662
+  #define BABYSTEP_MULTIPLICATOR 1   // Babysteps are very small. Increase for faster motion.
607
   //#define BABYSTEP_ZPROBE_OFFSET   // Enable to combine M851 and Babystepping
663
   //#define BABYSTEP_ZPROBE_OFFSET   // Enable to combine M851 and Babystepping
608
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
664
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
609
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
665
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
610
                                         // Note: Extra time may be added to mitigate controller latency.
666
                                         // Note: Extra time may be added to mitigate controller latency.
611
   //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
667
   //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
612
-  //#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators
613
 #endif
668
 #endif
614
 
669
 
615
 // @section extruder
670
 // @section extruder
656
 
711
 
657
 // @section leveling
712
 // @section leveling
658
 
713
 
659
-// Default mesh area is an area with an inset margin on the print area.
660
-// Below are the macros that are used to define the borders for the mesh area,
661
-// made available here for specialized needs, ie dual extruder setup.
662
-#if ENABLED(MESH_BED_LEVELING)
663
-  #define MESH_MIN_X MESH_INSET
664
-  #define MESH_MAX_X (X_BED_SIZE - (MESH_INSET))
665
-  #define MESH_MIN_Y MESH_INSET
666
-  #define MESH_MAX_Y (Y_BED_SIZE - (MESH_INSET))
667
-#elif ENABLED(AUTO_BED_LEVELING_UBL)
668
-  #define UBL_MESH_MIN_X UBL_MESH_INSET
669
-  #define UBL_MESH_MAX_X (X_BED_SIZE - (UBL_MESH_INSET))
670
-  #define UBL_MESH_MIN_Y UBL_MESH_INSET
671
-  #define UBL_MESH_MAX_Y (Y_BED_SIZE - (UBL_MESH_INSET))
672
-
673
-  // If this is defined, the currently active mesh will be saved in the
674
-  // current slot on M500.
675
-  #define UBL_SAVE_ACTIVE_ON_M500
714
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
715
+  #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
716
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
717
+  #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
718
+#endif
719
+
720
+#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL)
721
+  // Override the mesh area if the automatic (max) area is too large
722
+  //#define MESH_MIN_X MESH_INSET
723
+  //#define MESH_MIN_Y MESH_INSET
724
+  //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET)
725
+  //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
676
 #endif
726
 #endif
677
 
727
 
678
 // @section extras
728
 // @section extras
692
 //#define BEZIER_CURVE_SUPPORT
742
 //#define BEZIER_CURVE_SUPPORT
693
 
743
 
694
 // G38.2 and G38.3 Probe Target
744
 // G38.2 and G38.3 Probe Target
695
-// Enable PROBE_DOUBLE_TOUCH if you want G38 to double touch
745
+// Set MULTIPLE_PROBING if you want G38 to double touch
696
 //#define G38_PROBE_TARGET
746
 //#define G38_PROBE_TARGET
697
 #if ENABLED(G38_PROBE_TARGET)
747
 #if ENABLED(G38_PROBE_TARGET)
698
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
748
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
717
 // @section hidden
767
 // @section hidden
718
 
768
 
719
 // The number of linear motions that can be in the plan at any give time.
769
 // The number of linear motions that can be in the plan at any give time.
720
-// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2, i.g. 8,16,32 because shifts and ors are used to do the ring-buffering.
770
+// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2 (e.g. 8, 16, 32) because shifts and ors are used to do the ring-buffering.
721
 #if ENABLED(SDSUPPORT)
771
 #if ENABLED(SDSUPPORT)
722
   #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
772
   #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
723
 #else
773
 #else
808
 #endif
858
 #endif
809
 
859
 
810
 /**
860
 /**
861
+ * Extra Fan Speed
862
+ * Adds a secondary fan speed for each print-cooling fan.
863
+ *   'M106 P<fan> T3-255' : Set a secondary speed for <fan>
864
+ *   'M106 P<fan> T2'     : Use the set secondary speed
865
+ *   'M106 P<fan> T1'     : Restore the previous fan speed
866
+ */
867
+//#define EXTRA_FAN_SPEED
868
+
869
+/**
811
  * Advanced Pause
870
  * Advanced Pause
812
  * Experimental feature for filament change support and for parking the nozzle when paused.
871
  * Experimental feature for filament change support and for parking the nozzle when paused.
813
  * Adds the GCode M600 for initiating filament change.
872
  * Adds the GCode M600 for initiating filament change.
917
 
976
 
918
 #endif
977
 #endif
919
 
978
 
920
-// @section TMC2130
979
+// @section TMC2130, TMC2208
921
 
980
 
922
 /**
981
 /**
923
  * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
982
  * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
931
  */
990
  */
932
 //#define HAVE_TMC2130
991
 //#define HAVE_TMC2130
933
 
992
 
934
-#if ENABLED(HAVE_TMC2130)
993
+/**
994
+ * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
995
+ * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin.
996
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN
997
+ * to #_SERIAL_TX_PIN with a 1K resistor.
998
+ * The drivers can also be used with hardware serial.
999
+ *
1000
+ * You'll also need the TMC2208Stepper Arduino library
1001
+ * (https://github.com/teemuatlut/TMC2208Stepper).
1002
+ */
1003
+//#define HAVE_TMC2208
1004
+
1005
+#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
935
 
1006
 
936
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
1007
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
937
   //#define X_IS_TMC2130
1008
   //#define X_IS_TMC2130
946
   //#define E3_IS_TMC2130
1017
   //#define E3_IS_TMC2130
947
   //#define E4_IS_TMC2130
1018
   //#define E4_IS_TMC2130
948
 
1019
 
1020
+  //#define X_IS_TMC2208
1021
+  //#define X2_IS_TMC2208
1022
+  //#define Y_IS_TMC2208
1023
+  //#define Y2_IS_TMC2208
1024
+  //#define Z_IS_TMC2208
1025
+  //#define Z2_IS_TMC2208
1026
+  //#define E0_IS_TMC2208
1027
+  //#define E1_IS_TMC2208
1028
+  //#define E2_IS_TMC2208
1029
+  //#define E3_IS_TMC2208
1030
+  //#define E4_IS_TMC2208
1031
+
949
   /**
1032
   /**
950
    * Stepper driver settings
1033
    * Stepper driver settings
951
    */
1034
    */
952
 
1035
 
953
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1036
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
954
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1037
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
955
-  #define INTERPOLATE          1  // Interpolate X/Y/Z_MICROSTEPS to 256
1038
+  #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
956
 
1039
 
957
-  #define X_CURRENT         1000  // rms current in mA. Multiply by 1.41 for peak current.
1040
+  #define X_CURRENT          800  // rms current in mA. Multiply by 1.41 for peak current.
958
   #define X_MICROSTEPS        16  // 0..256
1041
   #define X_MICROSTEPS        16  // 0..256
959
 
1042
 
960
-  #define Y_CURRENT         1000
1043
+  #define Y_CURRENT          800
961
   #define Y_MICROSTEPS        16
1044
   #define Y_MICROSTEPS        16
962
 
1045
 
963
-  #define Z_CURRENT         1000
1046
+  #define Z_CURRENT          800
964
   #define Z_MICROSTEPS        16
1047
   #define Z_MICROSTEPS        16
965
 
1048
 
966
-  //#define X2_CURRENT      1000
967
-  //#define X2_MICROSTEPS     16
1049
+  #define X2_CURRENT         800
1050
+  #define X2_MICROSTEPS       16
968
 
1051
 
969
-  //#define Y2_CURRENT      1000
970
-  //#define Y2_MICROSTEPS     16
1052
+  #define Y2_CURRENT         800
1053
+  #define Y2_MICROSTEPS       16
971
 
1054
 
972
-  //#define Z2_CURRENT      1000
973
-  //#define Z2_MICROSTEPS     16
1055
+  #define Z2_CURRENT         800
1056
+  #define Z2_MICROSTEPS       16
974
 
1057
 
975
-  //#define E0_CURRENT      1000
976
-  //#define E0_MICROSTEPS     16
1058
+  #define E0_CURRENT         800
1059
+  #define E0_MICROSTEPS       16
977
 
1060
 
978
-  //#define E1_CURRENT      1000
979
-  //#define E1_MICROSTEPS     16
1061
+  #define E1_CURRENT         800
1062
+  #define E1_MICROSTEPS       16
980
 
1063
 
981
-  //#define E2_CURRENT      1000
982
-  //#define E2_MICROSTEPS     16
1064
+  #define E2_CURRENT         800
1065
+  #define E2_MICROSTEPS       16
983
 
1066
 
984
-  //#define E3_CURRENT      1000
985
-  //#define E3_MICROSTEPS     16
1067
+  #define E3_CURRENT         800
1068
+  #define E3_MICROSTEPS       16
986
 
1069
 
987
-  //#define E4_CURRENT      1000
988
-  //#define E4_MICROSTEPS     16
1070
+  #define E4_CURRENT         800
1071
+  #define E4_MICROSTEPS       16
989
 
1072
 
990
   /**
1073
   /**
991
    * Use Trinamic's ultra quiet stepping mode.
1074
    * Use Trinamic's ultra quiet stepping mode.
994
   #define STEALTHCHOP
1077
   #define STEALTHCHOP
995
 
1078
 
996
   /**
1079
   /**
997
-   * Let Marlin automatically control stepper current.
998
-   * This is still an experimental feature.
999
-   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
1000
-   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
1001
-   * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX
1080
+   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1081
+   * like overtemperature and short to ground. TMC2208 requires hardware serial.
1082
+   * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1083
+   * Other detected conditions can be used to stop the current print.
1002
    * Relevant g-codes:
1084
    * Relevant g-codes:
1003
    * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
1085
    * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
1004
-   * M906 S1 - Start adjusting current
1005
-   * M906 S0 - Stop adjusting current
1006
    * M911 - Report stepper driver overtemperature pre-warn condition.
1086
    * M911 - Report stepper driver overtemperature pre-warn condition.
1007
    * M912 - Clear stepper driver overtemperature pre-warn condition flag.
1087
    * M912 - Clear stepper driver overtemperature pre-warn condition flag.
1088
+   * M122 S0/1 - Report driver parameters (Requires TMC_DEBUG)
1008
    */
1089
    */
1009
-  //#define AUTOMATIC_CURRENT_CONTROL
1090
+  //#define MONITOR_DRIVER_STATUS
1010
 
1091
 
1011
-  #if ENABLED(AUTOMATIC_CURRENT_CONTROL)
1012
-    #define CURRENT_STEP          50  // [mA]
1013
-    #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
1092
+  #if ENABLED(MONITOR_DRIVER_STATUS)
1093
+    #define CURRENT_STEP_DOWN     50  // [mA]
1014
     #define REPORT_CURRENT_CHANGE
1094
     #define REPORT_CURRENT_CHANGE
1095
+    #define STOP_ON_ERROR
1015
   #endif
1096
   #endif
1016
 
1097
 
1017
   /**
1098
   /**
1026
   #define X2_HYBRID_THRESHOLD    100
1107
   #define X2_HYBRID_THRESHOLD    100
1027
   #define Y_HYBRID_THRESHOLD     100
1108
   #define Y_HYBRID_THRESHOLD     100
1028
   #define Y2_HYBRID_THRESHOLD    100
1109
   #define Y2_HYBRID_THRESHOLD    100
1029
-  #define Z_HYBRID_THRESHOLD       4
1030
-  #define Z2_HYBRID_THRESHOLD      4
1110
+  #define Z_HYBRID_THRESHOLD       3
1111
+  #define Z2_HYBRID_THRESHOLD      3
1031
   #define E0_HYBRID_THRESHOLD     30
1112
   #define E0_HYBRID_THRESHOLD     30
1032
   #define E1_HYBRID_THRESHOLD     30
1113
   #define E1_HYBRID_THRESHOLD     30
1033
   #define E2_HYBRID_THRESHOLD     30
1114
   #define E2_HYBRID_THRESHOLD     30
1037
   /**
1118
   /**
1038
    * Use stallGuard2 to sense an obstacle and trigger an endstop.
1119
    * Use stallGuard2 to sense an obstacle and trigger an endstop.
1039
    * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
1120
    * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
1040
-   * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal.
1121
+   * X and Y homing will always be done in spreadCycle mode.
1041
    *
1122
    *
1042
    * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
1123
    * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
1043
    * Higher values make the system LESS sensitive.
1124
    * Higher values make the system LESS sensitive.
1046
    * It is advised to set X/Y_HOME_BUMP_MM to 0.
1127
    * It is advised to set X/Y_HOME_BUMP_MM to 0.
1047
    * M914 X/Y to live tune the setting
1128
    * M914 X/Y to live tune the setting
1048
    */
1129
    */
1049
-  //#define SENSORLESS_HOMING
1130
+  //#define SENSORLESS_HOMING // TMC2130 only
1050
 
1131
 
1051
   #if ENABLED(SENSORLESS_HOMING)
1132
   #if ENABLED(SENSORLESS_HOMING)
1052
-    #define X_HOMING_SENSITIVITY  19
1053
-    #define Y_HOMING_SENSITIVITY  19
1133
+    #define X_HOMING_SENSITIVITY  8
1134
+    #define Y_HOMING_SENSITIVITY  8
1054
   #endif
1135
   #endif
1055
 
1136
 
1056
   /**
1137
   /**
1138
+   * Enable M122 debugging command for TMC stepper drivers.
1139
+   * M122 S0/1 will enable continous reporting.
1140
+   */
1141
+  //#define TMC_DEBUG
1142
+
1143
+  /**
1057
    * You can set your own advanced settings by filling in predefined functions.
1144
    * You can set your own advanced settings by filling in predefined functions.
1058
    * A list of available functions can be found on the library github page
1145
    * A list of available functions can be found on the library github page
1059
    * https://github.com/teemuatlut/TMC2130Stepper
1146
    * https://github.com/teemuatlut/TMC2130Stepper
1147
+   * https://github.com/teemuatlut/TMC2208Stepper
1060
    *
1148
    *
1061
    * Example:
1149
    * Example:
1062
-   * #define TMC2130_ADV() { \
1150
+   * #define TMC_ADV() { \
1063
    *   stepperX.diag0_temp_prewarn(1); \
1151
    *   stepperX.diag0_temp_prewarn(1); \
1064
-   *   stepperX.interpolate(0); \
1152
+   *   stepperY.interpolate(0); \
1065
    * }
1153
    * }
1066
    */
1154
    */
1067
-  #define  TMC2130_ADV() {  }
1155
+  #define  TMC_ADV() {  }
1068
 
1156
 
1069
-#endif // HAVE_TMC2130
1157
+#endif // TMC2130 || TMC2208
1070
 
1158
 
1071
 // @section L6470
1159
 // @section L6470
1072
 
1160
 
1231
 #endif
1319
 #endif
1232
 
1320
 
1233
 /**
1321
 /**
1322
+ * Filament Width Sensor
1323
+ *
1324
+ * Measures the filament width in real-time and adjusts
1325
+ * flow rate to compensate for any irregularities.
1326
+ *
1327
+ * Also allows the measured filament diameter to set the
1328
+ * extrusion rate, so the slicer only has to specify the
1329
+ * volume.
1330
+ *
1331
+ * Only a single extruder is supported at this time.
1332
+ *
1333
+ *  34 RAMPS_14    : Analog input 5 on the AUX2 connector
1334
+ *  81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
1335
+ * 301 RAMBO       : Analog input 3
1336
+ *
1337
+ * Note: May require analog pins to be defined for other boards.
1338
+ */
1339
+//#define FILAMENT_WIDTH_SENSOR
1340
+
1341
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
1342
+  #define FILAMENT_SENSOR_EXTRUDER_NUM 0    // Index of the extruder that has the filament sensor. :[0,1,2,3,4]
1343
+  #define MEASUREMENT_DELAY_CM        14    // (cm) The distance from the filament sensor to the melting chamber
1344
+
1345
+  #define MEASURED_UPPER_LIMIT         3.30 // (mm) Upper limit used to validate sensor reading
1346
+  #define MEASURED_LOWER_LIMIT         1.90 // (mm) Lower limit used to validate sensor reading
1347
+  #define MAX_MEASUREMENT_DELAY       20    // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
1348
+
1349
+  #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
1350
+
1351
+  // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
1352
+  //#define FILAMENT_LCD_DISPLAY
1353
+#endif
1354
+
1355
+/**
1356
+ * CNC Coordinate Systems
1357
+ *
1358
+ * Enables G53 and G54-G59.3 commands to select coordinate systems
1359
+ * and G92.1 to reset the workspace to native machine space.
1360
+ */
1361
+//#define CNC_COORDINATE_SYSTEMS
1362
+
1363
+/**
1234
  * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
1364
  * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
1235
  */
1365
  */
1236
 //#define PINS_DEBUGGING
1366
 //#define PINS_DEBUGGING
1421
                                          // tweaks made to the configuration are affecting the printer in real-time.
1551
                                          // tweaks made to the configuration are affecting the printer in real-time.
1422
 #endif
1552
 #endif
1423
 
1553
 
1554
+/**
1555
+ * NanoDLP Sync support
1556
+ *
1557
+ * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
1558
+ * string to enable synchronization with DLP projector exposure. This change will allow to use
1559
+ * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
1560
+ */
1561
+//#define NANODLP_Z_SYNC
1562
+#if ENABLED(NANODLP_Z_SYNC)
1563
+  //#define NANODLP_ALL_AXIS  // Enables "Z_move_comp" output on any axis move.
1564
+                              // Default behaviour is limited to Z axis only.
1565
+#endif
1566
+
1424
 #endif // CONFIGURATION_ADV_H
1567
 #endif // CONFIGURATION_ADV_H

+ 159
- 90
Marlin/example_configurations/Velleman/K8400/Dual-head/Configuration.h Переглянути файл

37
  */
37
  */
38
 #ifndef CONFIGURATION_H
38
 #ifndef CONFIGURATION_H
39
 #define CONFIGURATION_H
39
 #define CONFIGURATION_H
40
-#define CONFIGURATION_H_VERSION 010100
40
+#define CONFIGURATION_H_VERSION 010107
41
 
41
 
42
 //===========================================================================
42
 //===========================================================================
43
 //============================= Getting Started =============================
43
 //============================= Getting Started =============================
136
 // :[1, 2, 3, 4, 5]
136
 // :[1, 2, 3, 4, 5]
137
 #define EXTRUDERS 2
137
 #define EXTRUDERS 2
138
 
138
 
139
+// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
140
+#define DEFAULT_NOMINAL_FILAMENT_DIA 3.0
141
+
139
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
142
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
140
 //#define SINGLENOZZLE
143
 //#define SINGLENOZZLE
141
 
144
 
336
 
339
 
337
 // Comment the following line to disable PID and enable bang-bang.
340
 // Comment the following line to disable PID and enable bang-bang.
338
 #define PIDTEMP
341
 #define PIDTEMP
339
-#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
340
-#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
342
+#define BANG_MAX 255     // Limits current to nozzle while in bang-bang mode; 255=full current
343
+#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
344
+#define PID_K1 0.95      // Smoothing factor within the PID
341
 #if ENABLED(PIDTEMP)
345
 #if ENABLED(PIDTEMP)
342
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
346
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
343
   //#define PID_DEBUG // Sends debug data to the serial port.
347
   //#define PID_DEBUG // Sends debug data to the serial port.
347
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
351
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
348
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
352
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
349
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
353
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
350
-  #define K1 0.95 //smoothing factor within the PID
351
 
354
 
352
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
355
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
353
 
356
 
428
 //===========================================================================
431
 //===========================================================================
429
 
432
 
430
 /**
433
 /**
431
- * Thermal Protection protects your printer from damage and fire if a
432
- * thermistor falls out or temperature sensors fail in any way.
434
+ * Thermal Protection provides additional protection to your printer from damage
435
+ * and fire. Marlin always includes safe min and max temperature ranges which
436
+ * protect against a broken or disconnected thermistor wire.
433
  *
437
  *
434
- * The issue: If a thermistor falls out or a temperature sensor fails,
435
- * Marlin can no longer sense the actual temperature. Since a disconnected
436
- * thermistor reads as a low temperature, the firmware will keep the heater on.
438
+ * The issue: If a thermistor falls out, it will report the much lower
439
+ * temperature of the air in the room, and the the firmware will keep
440
+ * the heater on.
437
  *
441
  *
438
  * If you get "Thermal Runaway" or "Heating failed" errors the
442
  * If you get "Thermal Runaway" or "Heating failed" errors the
439
  * details can be tuned in Configuration_adv.h
443
  * details can be tuned in Configuration_adv.h
573
 // @section probes
577
 // @section probes
574
 
578
 
575
 //
579
 //
576
-// See http://marlinfw.org/configuration/probes.html
580
+// See http://marlinfw.org/docs/configuration/probes.html
577
 //
581
 //
578
 
582
 
579
 /**
583
 /**
686
 // X and Y axis travel speed (mm/m) between probes
690
 // X and Y axis travel speed (mm/m) between probes
687
 #define XY_PROBE_SPEED 8000
691
 #define XY_PROBE_SPEED 8000
688
 
692
 
689
-// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH)
693
+// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
690
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
694
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
691
 
695
 
692
 // Speed for the "accurate" probe of each point
696
 // Speed for the "accurate" probe of each point
693
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
697
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
694
 
698
 
695
-// Use double touch for probing
696
-//#define PROBE_DOUBLE_TOUCH
699
+// The number of probes to perform at each point.
700
+//   Set to 2 for a fast/slow probe, using the second probe result.
701
+//   Set to 3 or more for slow probes, averaging the results.
702
+//#define MULTIPLE_PROBING 2
697
 
703
 
698
 /**
704
 /**
699
  * Z probes require clearance when deploying, stowing, and moving between
705
  * Z probes require clearance when deploying, stowing, and moving between
785
 #define Y_MAX_POS Y_BED_SIZE
791
 #define Y_MAX_POS Y_BED_SIZE
786
 #define Z_MAX_POS 190
792
 #define Z_MAX_POS 190
787
 
793
 
788
-// If enabled, axes won't move below MIN_POS in response to movement commands.
794
+/**
795
+ * Software Endstops
796
+ *
797
+ * - Prevent moves outside the set machine bounds.
798
+ * - Individual axes can be disabled, if desired.
799
+ * - X and Y only apply to Cartesian robots.
800
+ * - Use 'M211' to set software endstops on/off or report current state
801
+ */
802
+
803
+// Min software endstops curtail movement below minimum coordinate bounds
789
 #define MIN_SOFTWARE_ENDSTOPS
804
 #define MIN_SOFTWARE_ENDSTOPS
790
-// If enabled, axes won't move above MAX_POS in response to movement commands.
805
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
806
+  #define MIN_SOFTWARE_ENDSTOP_X
807
+  #define MIN_SOFTWARE_ENDSTOP_Y
808
+  #define MIN_SOFTWARE_ENDSTOP_Z
809
+#endif
810
+
811
+// Max software endstops curtail movement above maximum coordinate bounds
791
 #define MAX_SOFTWARE_ENDSTOPS
812
 #define MAX_SOFTWARE_ENDSTOPS
813
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
814
+  #define MAX_SOFTWARE_ENDSTOP_X
815
+  #define MAX_SOFTWARE_ENDSTOP_Y
816
+  #define MAX_SOFTWARE_ENDSTOP_Z
817
+#endif
792
 
818
 
793
 /**
819
 /**
794
  * Filament Runout Sensor
820
  * Filament Runout Sensor
808
 //===========================================================================
834
 //===========================================================================
809
 //=============================== Bed Leveling ==============================
835
 //=============================== Bed Leveling ==============================
810
 //===========================================================================
836
 //===========================================================================
811
-// @section bedlevel
837
+// @section calibrate
812
 
838
 
813
 /**
839
 /**
814
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
840
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
834
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
860
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
835
  *   A comprehensive bed leveling system combining the features and benefits
861
  *   A comprehensive bed leveling system combining the features and benefits
836
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
862
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
837
- *   Validation and Mesh Editing systems. Currently, UBL is only checked out
838
- *   for Cartesian Printers. That said, it was primarily designed to correct
839
- *   poor quality Delta Printers. If you feel adventurous and have a Delta,
840
- *   please post an issue if something doesn't work correctly. Initially,
841
- *   you will need to set a reduced bed size so you have a rectangular area
842
- *   to test on.
863
+ *   Validation and Mesh Editing systems.
843
  *
864
  *
844
  * - MESH_BED_LEVELING
865
  * - MESH_BED_LEVELING
845
  *   Probe a grid manually
866
  *   Probe a grid manually
866
   // at which point movement will be level to the machine's XY plane.
887
   // at which point movement will be level to the machine's XY plane.
867
   // The height can be set with M420 Z<height>
888
   // The height can be set with M420 Z<height>
868
   #define ENABLE_LEVELING_FADE_HEIGHT
889
   #define ENABLE_LEVELING_FADE_HEIGHT
890
+
891
+  // For Cartesian machines, instead of dividing moves on mesh boundaries,
892
+  // split up moves into short segments like a Delta. This follows the
893
+  // contours of the bed more closely than edge-to-edge straight moves.
894
+  #define SEGMENT_LEVELED_MOVES
895
+  #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)
896
+
897
+  /**
898
+   * Enable the G26 Mesh Validation Pattern tool.
899
+   */
900
+  //#define G26_MESH_VALIDATION   // Enable G26 mesh validation
901
+  #if ENABLED(G26_MESH_VALIDATION)
902
+    #define MESH_TEST_NOZZLE_SIZE     0.4   // (mm) Diameter of primary nozzle.
903
+    #define MESH_TEST_LAYER_HEIGHT    0.2   // (mm) Default layer height for the G26 Mesh Validation Tool.
904
+    #define MESH_TEST_HOTEND_TEMP   205.0   // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
905
+    #define MESH_TEST_BED_TEMP       60.0   // (°C) Default bed temperature for the G26 Mesh Validation Tool.
906
+  #endif
907
+
869
 #endif
908
 #endif
870
 
909
 
871
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
910
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
921
   //========================= Unified Bed Leveling ============================
960
   //========================= Unified Bed Leveling ============================
922
   //===========================================================================
961
   //===========================================================================
923
 
962
 
924
-  #define UBL_MESH_INSET 1          // Mesh inset margin on print area
963
+  //#define MESH_EDIT_GFX_OVERLAY   // Display a graphics overlay while editing the mesh
964
+
965
+  #define MESH_INSET 1              // Mesh inset margin on print area
925
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
966
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
926
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
967
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
927
 
968
 
932
   #define UBL_PROBE_PT_3_X 180
973
   #define UBL_PROBE_PT_3_X 180
933
   #define UBL_PROBE_PT_3_Y 20
974
   #define UBL_PROBE_PT_3_Y 20
934
 
975
 
935
-  #define UBL_G26_MESH_VALIDATION   // Enable G26 mesh validation
936
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
976
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
977
+  #define UBL_SAVE_ACTIVE_ON_M500   // Save the currently active mesh in the current slot on M500
937
 
978
 
938
 #elif ENABLED(MESH_BED_LEVELING)
979
 #elif ENABLED(MESH_BED_LEVELING)
939
 
980
 
993
 //#define Z_SAFE_HOMING
1034
 //#define Z_SAFE_HOMING
994
 
1035
 
995
 #if ENABLED(Z_SAFE_HOMING)
1036
 #if ENABLED(Z_SAFE_HOMING)
996
-  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axis (G28).
997
-  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axis (G28).
1037
+  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axes (G28).
1038
+  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axes (G28).
998
 #endif
1039
 #endif
999
 
1040
 
1000
 // Homing speeds (mm/m)
1041
 // Homing speeds (mm/m)
1001
 #define HOMING_FEEDRATE_XY (50*60)
1042
 #define HOMING_FEEDRATE_XY (50*60)
1002
 #define HOMING_FEEDRATE_Z  (8*60)
1043
 #define HOMING_FEEDRATE_Z  (8*60)
1003
 
1044
 
1045
+// @section calibrate
1046
+
1047
+/**
1048
+ * Bed Skew Compensation
1049
+ *
1050
+ * This feature corrects for misalignment in the XYZ axes.
1051
+ *
1052
+ * Take the following steps to get the bed skew in the XY plane:
1053
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1054
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1055
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1056
+ *  4. For XY_SIDE_AD measure the edge A to D
1057
+ *
1058
+ * Marlin automatically computes skew factors from these measurements.
1059
+ * Skew factors may also be computed and set manually:
1060
+ *
1061
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1062
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1063
+ *
1064
+ * If desired, follow the same procedure for XZ and YZ.
1065
+ * Use these diagrams for reference:
1066
+ *
1067
+ *    Y                     Z                     Z
1068
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1069
+ *    |    /       /        |    /       /        |    /       /
1070
+ *    |   /       /         |   /       /         |   /       /
1071
+ *    |  A-------D          |  A-------D          |  A-------D
1072
+ *    +-------------->X     +-------------->X     +-------------->Y
1073
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1074
+ */
1075
+//#define SKEW_CORRECTION
1076
+
1077
+#if ENABLED(SKEW_CORRECTION)
1078
+  // Input all length measurements here:
1079
+  #define XY_DIAG_AC 282.8427124746
1080
+  #define XY_DIAG_BD 282.8427124746
1081
+  #define XY_SIDE_AD 200
1082
+
1083
+  // Or, set the default skew factors directly here
1084
+  // to override the above measurements:
1085
+  #define XY_SKEW_FACTOR 0.0
1086
+
1087
+  //#define SKEW_CORRECTION_FOR_Z
1088
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1089
+    #define XZ_DIAG_AC 282.8427124746
1090
+    #define XZ_DIAG_BD 282.8427124746
1091
+    #define YZ_DIAG_AC 282.8427124746
1092
+    #define YZ_DIAG_BD 282.8427124746
1093
+    #define YZ_SIDE_AD 200
1094
+    #define XZ_SKEW_FACTOR 0.0
1095
+    #define YZ_SKEW_FACTOR 0.0
1096
+  #endif
1097
+
1098
+  // Enable this option for M852 to set skew at runtime
1099
+  //#define SKEW_CORRECTION_GCODE
1100
+#endif
1101
+
1004
 //=============================================================================
1102
 //=============================================================================
1005
 //============================= Additional Features ===========================
1103
 //============================= Additional Features ===========================
1006
 //=============================================================================
1104
 //=============================================================================
1032
 //
1130
 //
1033
 // M100 Free Memory Watcher
1131
 // M100 Free Memory Watcher
1034
 //
1132
 //
1035
-//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
1133
+//#define M100_FREE_MEMORY_WATCHER    // Add M100 (Free Memory Watcher) to debug memory usage
1036
 
1134
 
1037
 //
1135
 //
1038
 // G20/G21 Inch mode support
1136
 // G20/G21 Inch mode support
1177
  *
1275
  *
1178
  * Select the language to display on the LCD. These languages are available:
1276
  * Select the language to display on the LCD. These languages are available:
1179
  *
1277
  *
1180
- *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, gl, hr,
1181
- *    it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1278
+ *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, fr_utf8, gl,
1279
+ *    hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1182
  *    tr, uk, zh_CN, zh_TW, test
1280
  *    tr, uk, zh_CN, zh_TW, test
1183
  *
1281
  *
1184
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1282
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1185
  */
1283
  */
1186
 #define LCD_LANGUAGE en
1284
 #define LCD_LANGUAGE en
1187
 
1285
 
1309
 // Note: Test audio output with the G-Code:
1407
 // Note: Test audio output with the G-Code:
1310
 //  M300 S<frequency Hz> P<duration ms>
1408
 //  M300 S<frequency Hz> P<duration ms>
1311
 //
1409
 //
1312
-//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
1313
-//#define LCD_FEEDBACK_FREQUENCY_HZ 1000
1410
+//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
1411
+//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
1314
 
1412
 
1315
 //
1413
 //
1316
 // CONTROLLER TYPE: Standard
1414
 // CONTROLLER TYPE: Standard
1418
 //#define CARTESIO_UI
1516
 //#define CARTESIO_UI
1419
 
1517
 
1420
 //
1518
 //
1421
-// ANET_10 Controller supported displays.
1519
+// ANET and Tronxy Controller supported displays.
1422
 //
1520
 //
1423
-//#define ANET_KEYPAD_LCD         // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1521
+//#define ZONESTAR_LCD            // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1424
                                   // This LCD is known to be susceptible to electrical interference
1522
                                   // This LCD is known to be susceptible to electrical interference
1425
                                   // which scrambles the display.  Pressing any button clears it up.
1523
                                   // which scrambles the display.  Pressing any button clears it up.
1524
+                                  // This is a LCD2004 display with 5 analog buttons.
1525
+
1426
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1526
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1427
                                   // A clone of the RepRapDiscount full graphics display but with
1527
                                   // A clone of the RepRapDiscount full graphics display but with
1428
                                   // different pins/wiring (see pins_ANET_10.h).
1528
                                   // different pins/wiring (see pins_ANET_10.h).
1532
 //
1632
 //
1533
 //#define MKS_12864OLED
1633
 //#define MKS_12864OLED
1534
 
1634
 
1635
+// Silvergate GLCD controller
1636
+// http://github.com/android444/Silvergate
1637
+//
1638
+//#define SILVER_GATE_GLCD_CONTROLLER
1639
+
1535
 //=============================================================================
1640
 //=============================================================================
1536
 //=============================== Extra Features ==============================
1641
 //=============================== Extra Features ==============================
1537
 //=============================================================================
1642
 //=============================================================================
1588
  * Adds the M150 command to set the LED (or LED strip) color.
1693
  * Adds the M150 command to set the LED (or LED strip) color.
1589
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1694
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1590
  * luminance values can be set from 0 to 255.
1695
  * luminance values can be set from 0 to 255.
1591
- * For Neopixel LED overall brightness parameters is also available 
1696
+ * For Neopixel LED an overall brightness parameter is also available.
1592
  *
1697
  *
1593
  * *** CAUTION ***
1698
  * *** CAUTION ***
1594
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1699
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1595
  *  as the Arduino cannot handle the current the LEDs will require.
1700
  *  as the Arduino cannot handle the current the LEDs will require.
1596
  *  Failure to follow this precaution can destroy your Arduino!
1701
  *  Failure to follow this precaution can destroy your Arduino!
1597
- *  The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
1598
- *  cannot handle such current, separate 5V power supply must be used
1702
+ *  NOTE: A separate 5V power supply is required! The Neopixel LED needs
1703
+ *  more current than the Arduino 5V linear regulator can produce.
1599
  * *** CAUTION ***
1704
  * *** CAUTION ***
1600
  *
1705
  *
1601
- * LED type. This options are mutualy exclusive. Uncomment only one.
1706
+ * LED Type. Enable only one of the following two options.
1602
  *
1707
  *
1603
  */
1708
  */
1604
 //#define RGB_LED
1709
 //#define RGB_LED
1614
 // Support for Adafruit Neopixel LED driver
1719
 // Support for Adafruit Neopixel LED driver
1615
 //#define NEOPIXEL_LED
1720
 //#define NEOPIXEL_LED
1616
 #if ENABLED(NEOPIXEL_LED)
1721
 #if ENABLED(NEOPIXEL_LED)
1617
-  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
1722
+  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
1618
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1723
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1619
-  #define NEOPIXEL_PIXELS 30       // Number of LEDs on strip
1620
-  #define NEOPIXEL_IS_SEQUENTIAL   // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
1621
-  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness 0-255
1724
+  #define NEOPIXEL_PIXELS 30       // Number of LEDs in the strip
1725
+  #define NEOPIXEL_IS_SEQUENTIAL   // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
1726
+  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness (0-255)
1622
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1727
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1623
 #endif
1728
 #endif
1624
 
1729
 
1633
  *  - Change to green once print has finished
1738
  *  - Change to green once print has finished
1634
  *  - Turn off after the print has finished and the user has pushed a button
1739
  *  - Turn off after the print has finished and the user has pushed a button
1635
  */
1740
  */
1636
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED)
1741
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
1637
   #define PRINTER_EVENT_LEDS
1742
   #define PRINTER_EVENT_LEDS
1638
 #endif
1743
 #endif
1639
 
1744
 
1640
-/*********************************************************************\
1641
-* R/C SERVO support
1642
-* Sponsored by TrinityLabs, Reworked by codexmas
1643
-**********************************************************************/
1745
+/**
1746
+ * R/C SERVO support
1747
+ * Sponsored by TrinityLabs, Reworked by codexmas
1748
+ */
1644
 
1749
 
1645
-// Number of servos
1646
-//
1647
-// If you select a configuration below, this will receive a default value and does not need to be set manually
1648
-// set it manually if you have more servos than extruders and wish to manually control some
1649
-// leaving it undefined or defining as 0 will disable the servo subsystem
1650
-// If unsure, leave commented / disabled
1651
-//
1750
+/**
1751
+ * Number of servos
1752
+ *
1753
+ * For some servo-related options NUM_SERVOS will be set automatically.
1754
+ * Set this manually if there are extra servos needing manual control.
1755
+ * Leave undefined or set to 0 to entirely disable the servo subsystem.
1756
+ */
1652
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1757
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1653
 
1758
 
1654
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1759
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1661
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1766
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1662
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1767
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1663
 
1768
 
1664
-/**
1665
- * Filament Width Sensor
1666
- *
1667
- * Measures the filament width in real-time and adjusts
1668
- * flow rate to compensate for any irregularities.
1669
- *
1670
- * Also allows the measured filament diameter to set the
1671
- * extrusion rate, so the slicer only has to specify the
1672
- * volume.
1673
- *
1674
- * Only a single extruder is supported at this time.
1675
- *
1676
- *  34 RAMPS_14    : Analog input 5 on the AUX2 connector
1677
- *  81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
1678
- * 301 RAMBO       : Analog input 3
1679
- *
1680
- * Note: May require analog pins to be defined for other boards.
1681
- */
1682
-//#define FILAMENT_WIDTH_SENSOR
1683
-
1684
-#define DEFAULT_NOMINAL_FILAMENT_DIA 3.00   // (mm) Diameter of the filament generally used (3.0 or 1.75mm), also used in the slicer. Used to validate sensor reading.
1685
-
1686
-#if ENABLED(FILAMENT_WIDTH_SENSOR)
1687
-  #define FILAMENT_SENSOR_EXTRUDER_NUM 0    // Index of the extruder that has the filament sensor (0,1,2,3)
1688
-  #define MEASUREMENT_DELAY_CM        14    // (cm) The distance from the filament sensor to the melting chamber
1689
-
1690
-  #define MEASURED_UPPER_LIMIT         3.30 // (mm) Upper limit used to validate sensor reading
1691
-  #define MEASURED_LOWER_LIMIT         1.90 // (mm) Lower limit used to validate sensor reading
1692
-  #define MAX_MEASUREMENT_DELAY       20    // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
1693
-
1694
-  #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
1695
-
1696
-  // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
1697
-  //#define FILAMENT_LCD_DISPLAY
1698
-#endif
1699
-
1700
 #endif // CONFIGURATION_H
1769
 #endif // CONFIGURATION_H

+ 1725
- 0
Marlin/example_configurations/Wanhao/Duplicator 6/Configuration.h
Різницю між файлами не показано, бо вона завелика
Переглянути файл


+ 1569
- 0
Marlin/example_configurations/Wanhao/Duplicator 6/Configuration_adv.h
Різницю між файлами не показано, бо вона завелика
Переглянути файл


+ 159
- 90
Marlin/example_configurations/adafruit/ST7565/Configuration.h Переглянути файл

37
  */
37
  */
38
 #ifndef CONFIGURATION_H
38
 #ifndef CONFIGURATION_H
39
 #define CONFIGURATION_H
39
 #define CONFIGURATION_H
40
-#define CONFIGURATION_H_VERSION 010100
40
+#define CONFIGURATION_H_VERSION 010107
41
 
41
 
42
 //===========================================================================
42
 //===========================================================================
43
 //============================= Getting Started =============================
43
 //============================= Getting Started =============================
136
 // :[1, 2, 3, 4, 5]
136
 // :[1, 2, 3, 4, 5]
137
 #define EXTRUDERS 1
137
 #define EXTRUDERS 1
138
 
138
 
139
+// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
140
+#define DEFAULT_NOMINAL_FILAMENT_DIA 3.0
141
+
139
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
142
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
140
 //#define SINGLENOZZLE
143
 //#define SINGLENOZZLE
141
 
144
 
336
 
339
 
337
 // Comment the following line to disable PID and enable bang-bang.
340
 // Comment the following line to disable PID and enable bang-bang.
338
 #define PIDTEMP
341
 #define PIDTEMP
339
-#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
340
-#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
342
+#define BANG_MAX 255     // Limits current to nozzle while in bang-bang mode; 255=full current
343
+#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
344
+#define PID_K1 0.95      // Smoothing factor within the PID
341
 #if ENABLED(PIDTEMP)
345
 #if ENABLED(PIDTEMP)
342
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
346
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
343
   //#define PID_DEBUG // Sends debug data to the serial port.
347
   //#define PID_DEBUG // Sends debug data to the serial port.
347
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
351
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
348
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
352
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
349
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
353
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
350
-  #define K1 0.95 //smoothing factor within the PID
351
 
354
 
352
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
355
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
353
 
356
 
428
 //===========================================================================
431
 //===========================================================================
429
 
432
 
430
 /**
433
 /**
431
- * Thermal Protection protects your printer from damage and fire if a
432
- * thermistor falls out or temperature sensors fail in any way.
434
+ * Thermal Protection provides additional protection to your printer from damage
435
+ * and fire. Marlin always includes safe min and max temperature ranges which
436
+ * protect against a broken or disconnected thermistor wire.
433
  *
437
  *
434
- * The issue: If a thermistor falls out or a temperature sensor fails,
435
- * Marlin can no longer sense the actual temperature. Since a disconnected
436
- * thermistor reads as a low temperature, the firmware will keep the heater on.
438
+ * The issue: If a thermistor falls out, it will report the much lower
439
+ * temperature of the air in the room, and the the firmware will keep
440
+ * the heater on.
437
  *
441
  *
438
  * If you get "Thermal Runaway" or "Heating failed" errors the
442
  * If you get "Thermal Runaway" or "Heating failed" errors the
439
  * details can be tuned in Configuration_adv.h
443
  * details can be tuned in Configuration_adv.h
573
 // @section probes
577
 // @section probes
574
 
578
 
575
 //
579
 //
576
-// See http://marlinfw.org/configuration/probes.html
580
+// See http://marlinfw.org/docs/configuration/probes.html
577
 //
581
 //
578
 
582
 
579
 /**
583
 /**
686
 // X and Y axis travel speed (mm/m) between probes
690
 // X and Y axis travel speed (mm/m) between probes
687
 #define XY_PROBE_SPEED 8000
691
 #define XY_PROBE_SPEED 8000
688
 
692
 
689
-// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH)
693
+// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
690
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
694
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
691
 
695
 
692
 // Speed for the "accurate" probe of each point
696
 // Speed for the "accurate" probe of each point
693
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
697
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
694
 
698
 
695
-// Use double touch for probing
696
-//#define PROBE_DOUBLE_TOUCH
699
+// The number of probes to perform at each point.
700
+//   Set to 2 for a fast/slow probe, using the second probe result.
701
+//   Set to 3 or more for slow probes, averaging the results.
702
+//#define MULTIPLE_PROBING 2
697
 
703
 
698
 /**
704
 /**
699
  * Z probes require clearance when deploying, stowing, and moving between
705
  * Z probes require clearance when deploying, stowing, and moving between
785
 #define Y_MAX_POS Y_BED_SIZE
791
 #define Y_MAX_POS Y_BED_SIZE
786
 #define Z_MAX_POS 200
792
 #define Z_MAX_POS 200
787
 
793
 
788
-// If enabled, axes won't move below MIN_POS in response to movement commands.
794
+/**
795
+ * Software Endstops
796
+ *
797
+ * - Prevent moves outside the set machine bounds.
798
+ * - Individual axes can be disabled, if desired.
799
+ * - X and Y only apply to Cartesian robots.
800
+ * - Use 'M211' to set software endstops on/off or report current state
801
+ */
802
+
803
+// Min software endstops curtail movement below minimum coordinate bounds
789
 #define MIN_SOFTWARE_ENDSTOPS
804
 #define MIN_SOFTWARE_ENDSTOPS
790
-// If enabled, axes won't move above MAX_POS in response to movement commands.
805
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
806
+  #define MIN_SOFTWARE_ENDSTOP_X
807
+  #define MIN_SOFTWARE_ENDSTOP_Y
808
+  #define MIN_SOFTWARE_ENDSTOP_Z
809
+#endif
810
+
811
+// Max software endstops curtail movement above maximum coordinate bounds
791
 #define MAX_SOFTWARE_ENDSTOPS
812
 #define MAX_SOFTWARE_ENDSTOPS
813
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
814
+  #define MAX_SOFTWARE_ENDSTOP_X
815
+  #define MAX_SOFTWARE_ENDSTOP_Y
816
+  #define MAX_SOFTWARE_ENDSTOP_Z
817
+#endif
792
 
818
 
793
 /**
819
 /**
794
  * Filament Runout Sensor
820
  * Filament Runout Sensor
808
 //===========================================================================
834
 //===========================================================================
809
 //=============================== Bed Leveling ==============================
835
 //=============================== Bed Leveling ==============================
810
 //===========================================================================
836
 //===========================================================================
811
-// @section bedlevel
837
+// @section calibrate
812
 
838
 
813
 /**
839
 /**
814
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
840
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
834
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
860
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
835
  *   A comprehensive bed leveling system combining the features and benefits
861
  *   A comprehensive bed leveling system combining the features and benefits
836
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
862
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
837
- *   Validation and Mesh Editing systems. Currently, UBL is only checked out
838
- *   for Cartesian Printers. That said, it was primarily designed to correct
839
- *   poor quality Delta Printers. If you feel adventurous and have a Delta,
840
- *   please post an issue if something doesn't work correctly. Initially,
841
- *   you will need to set a reduced bed size so you have a rectangular area
842
- *   to test on.
863
+ *   Validation and Mesh Editing systems.
843
  *
864
  *
844
  * - MESH_BED_LEVELING
865
  * - MESH_BED_LEVELING
845
  *   Probe a grid manually
866
  *   Probe a grid manually
866
   // at which point movement will be level to the machine's XY plane.
887
   // at which point movement will be level to the machine's XY plane.
867
   // The height can be set with M420 Z<height>
888
   // The height can be set with M420 Z<height>
868
   #define ENABLE_LEVELING_FADE_HEIGHT
889
   #define ENABLE_LEVELING_FADE_HEIGHT
890
+
891
+  // For Cartesian machines, instead of dividing moves on mesh boundaries,
892
+  // split up moves into short segments like a Delta. This follows the
893
+  // contours of the bed more closely than edge-to-edge straight moves.
894
+  #define SEGMENT_LEVELED_MOVES
895
+  #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)
896
+
897
+  /**
898
+   * Enable the G26 Mesh Validation Pattern tool.
899
+   */
900
+  //#define G26_MESH_VALIDATION   // Enable G26 mesh validation
901
+  #if ENABLED(G26_MESH_VALIDATION)
902
+    #define MESH_TEST_NOZZLE_SIZE     0.4   // (mm) Diameter of primary nozzle.
903
+    #define MESH_TEST_LAYER_HEIGHT    0.2   // (mm) Default layer height for the G26 Mesh Validation Tool.
904
+    #define MESH_TEST_HOTEND_TEMP   205.0   // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
905
+    #define MESH_TEST_BED_TEMP       60.0   // (°C) Default bed temperature for the G26 Mesh Validation Tool.
906
+  #endif
907
+
869
 #endif
908
 #endif
870
 
909
 
871
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
910
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
921
   //========================= Unified Bed Leveling ============================
960
   //========================= Unified Bed Leveling ============================
922
   //===========================================================================
961
   //===========================================================================
923
 
962
 
924
-  #define UBL_MESH_INSET 1          // Mesh inset margin on print area
963
+  //#define MESH_EDIT_GFX_OVERLAY   // Display a graphics overlay while editing the mesh
964
+
965
+  #define MESH_INSET 1              // Mesh inset margin on print area
925
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
966
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
926
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
967
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
927
 
968
 
932
   #define UBL_PROBE_PT_3_X 180
973
   #define UBL_PROBE_PT_3_X 180
933
   #define UBL_PROBE_PT_3_Y 20
974
   #define UBL_PROBE_PT_3_Y 20
934
 
975
 
935
-  #define UBL_G26_MESH_VALIDATION   // Enable G26 mesh validation
936
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
976
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
977
+  #define UBL_SAVE_ACTIVE_ON_M500   // Save the currently active mesh in the current slot on M500
937
 
978
 
938
 #elif ENABLED(MESH_BED_LEVELING)
979
 #elif ENABLED(MESH_BED_LEVELING)
939
 
980
 
993
 //#define Z_SAFE_HOMING
1034
 //#define Z_SAFE_HOMING
994
 
1035
 
995
 #if ENABLED(Z_SAFE_HOMING)
1036
 #if ENABLED(Z_SAFE_HOMING)
996
-  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axis (G28).
997
-  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axis (G28).
1037
+  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axes (G28).
1038
+  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axes (G28).
998
 #endif
1039
 #endif
999
 
1040
 
1000
 // Homing speeds (mm/m)
1041
 // Homing speeds (mm/m)
1001
 #define HOMING_FEEDRATE_XY (50*60)
1042
 #define HOMING_FEEDRATE_XY (50*60)
1002
 #define HOMING_FEEDRATE_Z  (4*60)
1043
 #define HOMING_FEEDRATE_Z  (4*60)
1003
 
1044
 
1045
+// @section calibrate
1046
+
1047
+/**
1048
+ * Bed Skew Compensation
1049
+ *
1050
+ * This feature corrects for misalignment in the XYZ axes.
1051
+ *
1052
+ * Take the following steps to get the bed skew in the XY plane:
1053
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1054
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1055
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1056
+ *  4. For XY_SIDE_AD measure the edge A to D
1057
+ *
1058
+ * Marlin automatically computes skew factors from these measurements.
1059
+ * Skew factors may also be computed and set manually:
1060
+ *
1061
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1062
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1063
+ *
1064
+ * If desired, follow the same procedure for XZ and YZ.
1065
+ * Use these diagrams for reference:
1066
+ *
1067
+ *    Y                     Z                     Z
1068
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1069
+ *    |    /       /        |    /       /        |    /       /
1070
+ *    |   /       /         |   /       /         |   /       /
1071
+ *    |  A-------D          |  A-------D          |  A-------D
1072
+ *    +-------------->X     +-------------->X     +-------------->Y
1073
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1074
+ */
1075
+//#define SKEW_CORRECTION
1076
+
1077
+#if ENABLED(SKEW_CORRECTION)
1078
+  // Input all length measurements here:
1079
+  #define XY_DIAG_AC 282.8427124746
1080
+  #define XY_DIAG_BD 282.8427124746
1081
+  #define XY_SIDE_AD 200
1082
+
1083
+  // Or, set the default skew factors directly here
1084
+  // to override the above measurements:
1085
+  #define XY_SKEW_FACTOR 0.0
1086
+
1087
+  //#define SKEW_CORRECTION_FOR_Z
1088
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1089
+    #define XZ_DIAG_AC 282.8427124746
1090
+    #define XZ_DIAG_BD 282.8427124746
1091
+    #define YZ_DIAG_AC 282.8427124746
1092
+    #define YZ_DIAG_BD 282.8427124746
1093
+    #define YZ_SIDE_AD 200
1094
+    #define XZ_SKEW_FACTOR 0.0
1095
+    #define YZ_SKEW_FACTOR 0.0
1096
+  #endif
1097
+
1098
+  // Enable this option for M852 to set skew at runtime
1099
+  //#define SKEW_CORRECTION_GCODE
1100
+#endif
1101
+
1004
 //=============================================================================
1102
 //=============================================================================
1005
 //============================= Additional Features ===========================
1103
 //============================= Additional Features ===========================
1006
 //=============================================================================
1104
 //=============================================================================
1032
 //
1130
 //
1033
 // M100 Free Memory Watcher
1131
 // M100 Free Memory Watcher
1034
 //
1132
 //
1035
-//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
1133
+//#define M100_FREE_MEMORY_WATCHER    // Add M100 (Free Memory Watcher) to debug memory usage
1036
 
1134
 
1037
 //
1135
 //
1038
 // G20/G21 Inch mode support
1136
 // G20/G21 Inch mode support
1177
  *
1275
  *
1178
  * Select the language to display on the LCD. These languages are available:
1276
  * Select the language to display on the LCD. These languages are available:
1179
  *
1277
  *
1180
- *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, gl, hr,
1181
- *    it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1278
+ *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, fr_utf8, gl,
1279
+ *    hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1182
  *    tr, uk, zh_CN, zh_TW, test
1280
  *    tr, uk, zh_CN, zh_TW, test
1183
  *
1281
  *
1184
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1282
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1185
  */
1283
  */
1186
 #define LCD_LANGUAGE en
1284
 #define LCD_LANGUAGE en
1187
 
1285
 
1309
 // Note: Test audio output with the G-Code:
1407
 // Note: Test audio output with the G-Code:
1310
 //  M300 S<frequency Hz> P<duration ms>
1408
 //  M300 S<frequency Hz> P<duration ms>
1311
 //
1409
 //
1312
-//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
1313
-//#define LCD_FEEDBACK_FREQUENCY_HZ 1000
1410
+//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
1411
+//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
1314
 
1412
 
1315
 //
1413
 //
1316
 // CONTROLLER TYPE: Standard
1414
 // CONTROLLER TYPE: Standard
1418
 //#define CARTESIO_UI
1516
 //#define CARTESIO_UI
1419
 
1517
 
1420
 //
1518
 //
1421
-// ANET_10 Controller supported displays.
1519
+// ANET and Tronxy Controller supported displays.
1422
 //
1520
 //
1423
-//#define ANET_KEYPAD_LCD         // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1521
+//#define ZONESTAR_LCD            // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1424
                                   // This LCD is known to be susceptible to electrical interference
1522
                                   // This LCD is known to be susceptible to electrical interference
1425
                                   // which scrambles the display.  Pressing any button clears it up.
1523
                                   // which scrambles the display.  Pressing any button clears it up.
1524
+                                  // This is a LCD2004 display with 5 analog buttons.
1525
+
1426
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1526
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1427
                                   // A clone of the RepRapDiscount full graphics display but with
1527
                                   // A clone of the RepRapDiscount full graphics display but with
1428
                                   // different pins/wiring (see pins_ANET_10.h).
1528
                                   // different pins/wiring (see pins_ANET_10.h).
1532
 //
1632
 //
1533
 //#define MKS_12864OLED
1633
 //#define MKS_12864OLED
1534
 
1634
 
1635
+// Silvergate GLCD controller
1636
+// http://github.com/android444/Silvergate
1637
+//
1638
+//#define SILVER_GATE_GLCD_CONTROLLER
1639
+
1535
 //=============================================================================
1640
 //=============================================================================
1536
 //=============================== Extra Features ==============================
1641
 //=============================== Extra Features ==============================
1537
 //=============================================================================
1642
 //=============================================================================
1588
  * Adds the M150 command to set the LED (or LED strip) color.
1693
  * Adds the M150 command to set the LED (or LED strip) color.
1589
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1694
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1590
  * luminance values can be set from 0 to 255.
1695
  * luminance values can be set from 0 to 255.
1591
- * For Neopixel LED overall brightness parameters is also available 
1696
+ * For Neopixel LED an overall brightness parameter is also available.
1592
  *
1697
  *
1593
  * *** CAUTION ***
1698
  * *** CAUTION ***
1594
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1699
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1595
  *  as the Arduino cannot handle the current the LEDs will require.
1700
  *  as the Arduino cannot handle the current the LEDs will require.
1596
  *  Failure to follow this precaution can destroy your Arduino!
1701
  *  Failure to follow this precaution can destroy your Arduino!
1597
- *  The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
1598
- *  cannot handle such current, separate 5V power supply must be used
1702
+ *  NOTE: A separate 5V power supply is required! The Neopixel LED needs
1703
+ *  more current than the Arduino 5V linear regulator can produce.
1599
  * *** CAUTION ***
1704
  * *** CAUTION ***
1600
  *
1705
  *
1601
- * LED type. This options are mutualy exclusive. Uncomment only one.
1706
+ * LED Type. Enable only one of the following two options.
1602
  *
1707
  *
1603
  */
1708
  */
1604
 //#define RGB_LED
1709
 //#define RGB_LED
1614
 // Support for Adafruit Neopixel LED driver
1719
 // Support for Adafruit Neopixel LED driver
1615
 //#define NEOPIXEL_LED
1720
 //#define NEOPIXEL_LED
1616
 #if ENABLED(NEOPIXEL_LED)
1721
 #if ENABLED(NEOPIXEL_LED)
1617
-  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
1722
+  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
1618
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1723
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1619
-  #define NEOPIXEL_PIXELS 30       // Number of LEDs on strip
1620
-  #define NEOPIXEL_IS_SEQUENTIAL   // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
1621
-  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness 0-255
1724
+  #define NEOPIXEL_PIXELS 30       // Number of LEDs in the strip
1725
+  #define NEOPIXEL_IS_SEQUENTIAL   // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
1726
+  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness (0-255)
1622
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1727
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1623
 #endif
1728
 #endif
1624
 
1729
 
1633
  *  - Change to green once print has finished
1738
  *  - Change to green once print has finished
1634
  *  - Turn off after the print has finished and the user has pushed a button
1739
  *  - Turn off after the print has finished and the user has pushed a button
1635
  */
1740
  */
1636
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED)
1741
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
1637
   #define PRINTER_EVENT_LEDS
1742
   #define PRINTER_EVENT_LEDS
1638
 #endif
1743
 #endif
1639
 
1744
 
1640
-/*********************************************************************\
1641
-* R/C SERVO support
1642
-* Sponsored by TrinityLabs, Reworked by codexmas
1643
-**********************************************************************/
1745
+/**
1746
+ * R/C SERVO support
1747
+ * Sponsored by TrinityLabs, Reworked by codexmas
1748
+ */
1644
 
1749
 
1645
-// Number of servos
1646
-//
1647
-// If you select a configuration below, this will receive a default value and does not need to be set manually
1648
-// set it manually if you have more servos than extruders and wish to manually control some
1649
-// leaving it undefined or defining as 0 will disable the servo subsystem
1650
-// If unsure, leave commented / disabled
1651
-//
1750
+/**
1751
+ * Number of servos
1752
+ *
1753
+ * For some servo-related options NUM_SERVOS will be set automatically.
1754
+ * Set this manually if there are extra servos needing manual control.
1755
+ * Leave undefined or set to 0 to entirely disable the servo subsystem.
1756
+ */
1652
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1757
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1653
 
1758
 
1654
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1759
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1661
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1766
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1662
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1767
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1663
 
1768
 
1664
-/**
1665
- * Filament Width Sensor
1666
- *
1667
- * Measures the filament width in real-time and adjusts
1668
- * flow rate to compensate for any irregularities.
1669
- *
1670
- * Also allows the measured filament diameter to set the
1671
- * extrusion rate, so the slicer only has to specify the
1672
- * volume.
1673
- *
1674
- * Only a single extruder is supported at this time.
1675
- *
1676
- *  34 RAMPS_14    : Analog input 5 on the AUX2 connector
1677
- *  81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
1678
- * 301 RAMBO       : Analog input 3
1679
- *
1680
- * Note: May require analog pins to be defined for other boards.
1681
- */
1682
-//#define FILAMENT_WIDTH_SENSOR
1683
-
1684
-#define DEFAULT_NOMINAL_FILAMENT_DIA 3.00   // (mm) Diameter of the filament generally used (3.0 or 1.75mm), also used in the slicer. Used to validate sensor reading.
1685
-
1686
-#if ENABLED(FILAMENT_WIDTH_SENSOR)
1687
-  #define FILAMENT_SENSOR_EXTRUDER_NUM 0    // Index of the extruder that has the filament sensor (0,1,2,3)
1688
-  #define MEASUREMENT_DELAY_CM        14    // (cm) The distance from the filament sensor to the melting chamber
1689
-
1690
-  #define MEASURED_UPPER_LIMIT         3.30 // (mm) Upper limit used to validate sensor reading
1691
-  #define MEASURED_LOWER_LIMIT         1.90 // (mm) Lower limit used to validate sensor reading
1692
-  #define MAX_MEASUREMENT_DELAY       20    // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
1693
-
1694
-  #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
1695
-
1696
-  // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
1697
-  //#define FILAMENT_LCD_DISPLAY
1698
-#endif
1699
-
1700
 #endif // CONFIGURATION_H
1769
 #endif // CONFIGURATION_H

+ 167
- 92
Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h Переглянути файл

37
  */
37
  */
38
 #ifndef CONFIGURATION_H
38
 #ifndef CONFIGURATION_H
39
 #define CONFIGURATION_H
39
 #define CONFIGURATION_H
40
-#define CONFIGURATION_H_VERSION 010100
40
+#define CONFIGURATION_H_VERSION 010107
41
 
41
 
42
 //===========================================================================
42
 //===========================================================================
43
 //============================= Getting Started =============================
43
 //============================= Getting Started =============================
136
 // :[1, 2, 3, 4, 5]
136
 // :[1, 2, 3, 4, 5]
137
 #define EXTRUDERS 1
137
 #define EXTRUDERS 1
138
 
138
 
139
+// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
140
+#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75
141
+
139
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
142
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
140
 //#define SINGLENOZZLE
143
 //#define SINGLENOZZLE
141
 
144
 
336
 
339
 
337
 // Comment the following line to disable PID and enable bang-bang.
340
 // Comment the following line to disable PID and enable bang-bang.
338
 #define PIDTEMP
341
 #define PIDTEMP
339
-#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
340
-#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
342
+#define BANG_MAX 255     // Limits current to nozzle while in bang-bang mode; 255=full current
343
+#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
344
+#define PID_K1 0.95      // Smoothing factor within the PID
341
 #if ENABLED(PIDTEMP)
345
 #if ENABLED(PIDTEMP)
342
   #define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
346
   #define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
343
   //#define PID_DEBUG // Sends debug data to the serial port.
347
   //#define PID_DEBUG // Sends debug data to the serial port.
347
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
351
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
348
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
352
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
349
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
353
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
350
-  #define K1 0.95 //smoothing factor within the PID
351
 
354
 
352
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
355
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
353
 
356
 
438
 //===========================================================================
441
 //===========================================================================
439
 
442
 
440
 /**
443
 /**
441
- * Thermal Protection protects your printer from damage and fire if a
442
- * thermistor falls out or temperature sensors fail in any way.
444
+ * Thermal Protection provides additional protection to your printer from damage
445
+ * and fire. Marlin always includes safe min and max temperature ranges which
446
+ * protect against a broken or disconnected thermistor wire.
443
  *
447
  *
444
- * The issue: If a thermistor falls out or a temperature sensor fails,
445
- * Marlin can no longer sense the actual temperature. Since a disconnected
446
- * thermistor reads as a low temperature, the firmware will keep the heater on.
448
+ * The issue: If a thermistor falls out, it will report the much lower
449
+ * temperature of the air in the room, and the the firmware will keep
450
+ * the heater on.
447
  *
451
  *
448
  * If you get "Thermal Runaway" or "Heating failed" errors the
452
  * If you get "Thermal Runaway" or "Heating failed" errors the
449
  * details can be tuned in Configuration_adv.h
453
  * details can be tuned in Configuration_adv.h
486
   // Delta calibration menu
490
   // Delta calibration menu
487
   // uncomment to add three points calibration menu option.
491
   // uncomment to add three points calibration menu option.
488
   // See http://minow.blogspot.com/index.html#4918805519571907051
492
   // See http://minow.blogspot.com/index.html#4918805519571907051
489
-  #define DELTA_CALIBRATION_MENU
493
+  //#define DELTA_CALIBRATION_MENU
490
 
494
 
491
   // uncomment to add G33 Delta Auto-Calibration (Enable EEPROM_SETTINGS to store results)
495
   // uncomment to add G33 Delta Auto-Calibration (Enable EEPROM_SETTINGS to store results)
492
   #define DELTA_AUTO_CALIBRATION
496
   #define DELTA_AUTO_CALIBRATION
496
   #if ENABLED(DELTA_AUTO_CALIBRATION)
500
   #if ENABLED(DELTA_AUTO_CALIBRATION)
497
     // set the default number of probe points : n*n (1 -> 7)
501
     // set the default number of probe points : n*n (1 -> 7)
498
     #define DELTA_CALIBRATION_DEFAULT_POINTS 4
502
     #define DELTA_CALIBRATION_DEFAULT_POINTS 4
503
+
504
+    // Enable and set these values based on results of 'G33 A'
505
+    //#define H_FACTOR 1.01
506
+    //#define R_FACTOR 2.61
507
+    //#define A_FACTOR 0.87
508
+
499
   #endif
509
   #endif
500
 
510
 
501
   #if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU)
511
   #if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU)
502
-    // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS*0.869 for non-eccentric probes
512
+    // Set the radius for the calibration probe points - max 0.9 * DELTA_PRINTABLE_RADIUS for non-eccentric probes
503
     #define DELTA_CALIBRATION_RADIUS 73.5 // mm
513
     #define DELTA_CALIBRATION_RADIUS 73.5 // mm
504
     // Set the steprate for papertest probing
514
     // Set the steprate for papertest probing
505
     #define PROBE_MANUALLY_STEP 0.025
515
     #define PROBE_MANUALLY_STEP 0.025
647
 // @section probes
657
 // @section probes
648
 
658
 
649
 //
659
 //
650
-// See http://marlinfw.org/configuration/probes.html
660
+// See http://marlinfw.org/docs/configuration/probes.html
651
 //
661
 //
652
 
662
 
653
 /**
663
 /**
760
 // X and Y axis travel speed (mm/m) between probes
770
 // X and Y axis travel speed (mm/m) between probes
761
 #define XY_PROBE_SPEED 5000
771
 #define XY_PROBE_SPEED 5000
762
 
772
 
763
-// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH)
773
+// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
764
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
774
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
765
 
775
 
766
 // Speed for the "accurate" probe of each point
776
 // Speed for the "accurate" probe of each point
767
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST) / 6
777
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST) / 6
768
 
778
 
769
-// Use double touch for probing
770
-//#define PROBE_DOUBLE_TOUCH
779
+// The number of probes to perform at each point.
780
+//   Set to 2 for a fast/slow probe, using the second probe result.
781
+//   Set to 3 or more for slow probes, averaging the results.
782
+//#define MULTIPLE_PROBING 2
771
 
783
 
772
 /**
784
 /**
773
  * Allen key retractable z-probe as seen on many Kossel delta printers - http://reprap.org/wiki/Kossel#Automatic_bed_leveling_probe
785
  * Allen key retractable z-probe as seen on many Kossel delta printers - http://reprap.org/wiki/Kossel#Automatic_bed_leveling_probe
909
 #define Y_MAX_POS DELTA_PRINTABLE_RADIUS
921
 #define Y_MAX_POS DELTA_PRINTABLE_RADIUS
910
 #define Z_MAX_POS MANUAL_Z_HOME_POS
922
 #define Z_MAX_POS MANUAL_Z_HOME_POS
911
 
923
 
912
-// If enabled, axes won't move below MIN_POS in response to movement commands.
924
+/**
925
+ * Software Endstops
926
+ *
927
+ * - Prevent moves outside the set machine bounds.
928
+ * - Individual axes can be disabled, if desired.
929
+ * - X and Y only apply to Cartesian robots.
930
+ * - Use 'M211' to set software endstops on/off or report current state
931
+ */
932
+
933
+// Min software endstops curtail movement below minimum coordinate bounds
913
 //#define MIN_SOFTWARE_ENDSTOPS
934
 //#define MIN_SOFTWARE_ENDSTOPS
914
-// If enabled, axes won't move above MAX_POS in response to movement commands.
935
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
936
+  #define MIN_SOFTWARE_ENDSTOP_X
937
+  #define MIN_SOFTWARE_ENDSTOP_Y
938
+  #define MIN_SOFTWARE_ENDSTOP_Z
939
+#endif
940
+
941
+// Max software endstops curtail movement above maximum coordinate bounds
915
 #define MAX_SOFTWARE_ENDSTOPS
942
 #define MAX_SOFTWARE_ENDSTOPS
943
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
944
+  #define MAX_SOFTWARE_ENDSTOP_X
945
+  #define MAX_SOFTWARE_ENDSTOP_Y
946
+  #define MAX_SOFTWARE_ENDSTOP_Z
947
+#endif
916
 
948
 
917
 /**
949
 /**
918
  * Filament Runout Sensor
950
  * Filament Runout Sensor
932
 //===========================================================================
964
 //===========================================================================
933
 //=============================== Bed Leveling ==============================
965
 //=============================== Bed Leveling ==============================
934
 //===========================================================================
966
 //===========================================================================
935
-// @section bedlevel
967
+// @section calibrate
936
 
968
 
937
 /**
969
 /**
938
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
970
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
958
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
990
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
959
  *   A comprehensive bed leveling system combining the features and benefits
991
  *   A comprehensive bed leveling system combining the features and benefits
960
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
992
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
961
- *   Validation and Mesh Editing systems. Currently, UBL is only checked out
962
- *   for Cartesian Printers. That said, it was primarily designed to correct
963
- *   poor quality Delta Printers. If you feel adventurous and have a Delta,
964
- *   please post an issue if something doesn't work correctly. Initially,
965
- *   you will need to set a reduced bed size so you have a rectangular area
966
- *   to test on.
993
+ *   Validation and Mesh Editing systems.
967
  *
994
  *
968
  * - MESH_BED_LEVELING
995
  * - MESH_BED_LEVELING
969
  *   Probe a grid manually
996
  *   Probe a grid manually
990
   // at which point movement will be level to the machine's XY plane.
1017
   // at which point movement will be level to the machine's XY plane.
991
   // The height can be set with M420 Z<height>
1018
   // The height can be set with M420 Z<height>
992
   //#define ENABLE_LEVELING_FADE_HEIGHT
1019
   //#define ENABLE_LEVELING_FADE_HEIGHT
1020
+
1021
+  // For Cartesian machines, instead of dividing moves on mesh boundaries,
1022
+  // split up moves into short segments like a Delta. This follows the
1023
+  // contours of the bed more closely than edge-to-edge straight moves.
1024
+  #define SEGMENT_LEVELED_MOVES
1025
+  #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)
1026
+
1027
+  /**
1028
+   * Enable the G26 Mesh Validation Pattern tool.
1029
+   */
1030
+  //#define G26_MESH_VALIDATION   // Enable G26 mesh validation
1031
+  #if ENABLED(G26_MESH_VALIDATION)
1032
+    #define MESH_TEST_NOZZLE_SIZE     0.4   // (mm) Diameter of primary nozzle.
1033
+    #define MESH_TEST_LAYER_HEIGHT    0.2   // (mm) Default layer height for the G26 Mesh Validation Tool.
1034
+    #define MESH_TEST_HOTEND_TEMP   205.0   // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
1035
+    #define MESH_TEST_BED_TEMP       60.0   // (°C) Default bed temperature for the G26 Mesh Validation Tool.
1036
+  #endif
1037
+
993
 #endif
1038
 #endif
994
 
1039
 
995
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
1040
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
1047
   //========================= Unified Bed Leveling ============================
1092
   //========================= Unified Bed Leveling ============================
1048
   //===========================================================================
1093
   //===========================================================================
1049
 
1094
 
1050
-  #define UBL_MESH_INSET 1          // Mesh inset margin on print area
1095
+  //#define MESH_EDIT_GFX_OVERLAY   // Display a graphics overlay while editing the mesh
1096
+
1097
+  #define MESH_INSET 1              // Mesh inset margin on print area
1051
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
1098
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
1052
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
1099
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
1053
 
1100
 
1060
   #define UBL_PROBE_PT_3_X _PX(DELTA_PROBEABLE_RADIUS, 240)
1107
   #define UBL_PROBE_PT_3_X _PX(DELTA_PROBEABLE_RADIUS, 240)
1061
   #define UBL_PROBE_PT_3_Y _PY(DELTA_PROBEABLE_RADIUS, 240)
1108
   #define UBL_PROBE_PT_3_Y _PY(DELTA_PROBEABLE_RADIUS, 240)
1062
 
1109
 
1063
-  #define UBL_G26_MESH_VALIDATION   // Enable G26 mesh validation
1064
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
1110
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
1111
+  #define UBL_SAVE_ACTIVE_ON_M500   // Save the currently active mesh in the current slot on M500
1065
 
1112
 
1066
 #elif ENABLED(MESH_BED_LEVELING)
1113
 #elif ENABLED(MESH_BED_LEVELING)
1067
 
1114
 
1121
 //#define Z_SAFE_HOMING
1168
 //#define Z_SAFE_HOMING
1122
 
1169
 
1123
 #if ENABLED(Z_SAFE_HOMING)
1170
 #if ENABLED(Z_SAFE_HOMING)
1124
-  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axis (G28).
1125
-  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axis (G28).
1171
+  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axes (G28).
1172
+  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axes (G28).
1126
 #endif
1173
 #endif
1127
 
1174
 
1128
 // Delta only homes to Z
1175
 // Delta only homes to Z
1129
 #define HOMING_FEEDRATE_Z  (100*60)
1176
 #define HOMING_FEEDRATE_Z  (100*60)
1130
 
1177
 
1178
+// @section calibrate
1179
+
1180
+/**
1181
+ * Bed Skew Compensation
1182
+ *
1183
+ * This feature corrects for misalignment in the XYZ axes.
1184
+ *
1185
+ * Take the following steps to get the bed skew in the XY plane:
1186
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1187
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1188
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1189
+ *  4. For XY_SIDE_AD measure the edge A to D
1190
+ *
1191
+ * Marlin automatically computes skew factors from these measurements.
1192
+ * Skew factors may also be computed and set manually:
1193
+ *
1194
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1195
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1196
+ *
1197
+ * If desired, follow the same procedure for XZ and YZ.
1198
+ * Use these diagrams for reference:
1199
+ *
1200
+ *    Y                     Z                     Z
1201
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1202
+ *    |    /       /        |    /       /        |    /       /
1203
+ *    |   /       /         |   /       /         |   /       /
1204
+ *    |  A-------D          |  A-------D          |  A-------D
1205
+ *    +-------------->X     +-------------->X     +-------------->Y
1206
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1207
+ */
1208
+//#define SKEW_CORRECTION
1209
+
1210
+#if ENABLED(SKEW_CORRECTION)
1211
+  // Input all length measurements here:
1212
+  #define XY_DIAG_AC 282.8427124746
1213
+  #define XY_DIAG_BD 282.8427124746
1214
+  #define XY_SIDE_AD 200
1215
+
1216
+  // Or, set the default skew factors directly here
1217
+  // to override the above measurements:
1218
+  #define XY_SKEW_FACTOR 0.0
1219
+
1220
+  //#define SKEW_CORRECTION_FOR_Z
1221
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1222
+    #define XZ_DIAG_AC 282.8427124746
1223
+    #define XZ_DIAG_BD 282.8427124746
1224
+    #define YZ_DIAG_AC 282.8427124746
1225
+    #define YZ_DIAG_BD 282.8427124746
1226
+    #define YZ_SIDE_AD 200
1227
+    #define XZ_SKEW_FACTOR 0.0
1228
+    #define YZ_SKEW_FACTOR 0.0
1229
+  #endif
1230
+
1231
+  // Enable this option for M852 to set skew at runtime
1232
+  //#define SKEW_CORRECTION_GCODE
1233
+#endif
1234
+
1131
 //=============================================================================
1235
 //=============================================================================
1132
 //============================= Additional Features ===========================
1236
 //============================= Additional Features ===========================
1133
 //=============================================================================
1237
 //=============================================================================
1159
 //
1263
 //
1160
 // M100 Free Memory Watcher
1264
 // M100 Free Memory Watcher
1161
 //
1265
 //
1162
-//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
1266
+//#define M100_FREE_MEMORY_WATCHER    // Add M100 (Free Memory Watcher) to debug memory usage
1163
 
1267
 
1164
 //
1268
 //
1165
 // G20/G21 Inch mode support
1269
 // G20/G21 Inch mode support
1304
  *
1408
  *
1305
  * Select the language to display on the LCD. These languages are available:
1409
  * Select the language to display on the LCD. These languages are available:
1306
  *
1410
  *
1307
- *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, gl, hr,
1308
- *    it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1411
+ *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, fr_utf8, gl,
1412
+ *    hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1309
  *    tr, uk, zh_CN, zh_TW, test
1413
  *    tr, uk, zh_CN, zh_TW, test
1310
  *
1414
  *
1311
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1415
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1312
  */
1416
  */
1313
 #define LCD_LANGUAGE en
1417
 #define LCD_LANGUAGE en
1314
 
1418
 
1437
 // Note: Test audio output with the G-Code:
1541
 // Note: Test audio output with the G-Code:
1438
 //  M300 S<frequency Hz> P<duration ms>
1542
 //  M300 S<frequency Hz> P<duration ms>
1439
 //
1543
 //
1440
-//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
1441
-//#define LCD_FEEDBACK_FREQUENCY_HZ 1000
1544
+//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
1545
+//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
1442
 
1546
 
1443
 //
1547
 //
1444
 // CONTROLLER TYPE: Standard
1548
 // CONTROLLER TYPE: Standard
1546
 //#define CARTESIO_UI
1650
 //#define CARTESIO_UI
1547
 
1651
 
1548
 //
1652
 //
1549
-// ANET_10 Controller supported displays.
1653
+// ANET and Tronxy Controller supported displays.
1550
 //
1654
 //
1551
-//#define ANET_KEYPAD_LCD         // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1655
+//#define ZONESTAR_LCD            // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1552
                                   // This LCD is known to be susceptible to electrical interference
1656
                                   // This LCD is known to be susceptible to electrical interference
1553
                                   // which scrambles the display.  Pressing any button clears it up.
1657
                                   // which scrambles the display.  Pressing any button clears it up.
1658
+                                  // This is a LCD2004 display with 5 analog buttons.
1659
+
1554
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1660
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1555
                                   // A clone of the RepRapDiscount full graphics display but with
1661
                                   // A clone of the RepRapDiscount full graphics display but with
1556
                                   // different pins/wiring (see pins_ANET_10.h).
1662
                                   // different pins/wiring (see pins_ANET_10.h).
1660
 //
1766
 //
1661
 //#define MKS_12864OLED
1767
 //#define MKS_12864OLED
1662
 
1768
 
1769
+// Silvergate GLCD controller
1770
+// http://github.com/android444/Silvergate
1771
+//
1772
+//#define SILVER_GATE_GLCD_CONTROLLER
1773
+
1663
 //=============================================================================
1774
 //=============================================================================
1664
 //=============================== Extra Features ==============================
1775
 //=============================== Extra Features ==============================
1665
 //=============================================================================
1776
 //=============================================================================
1716
  * Adds the M150 command to set the LED (or LED strip) color.
1827
  * Adds the M150 command to set the LED (or LED strip) color.
1717
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1828
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1718
  * luminance values can be set from 0 to 255.
1829
  * luminance values can be set from 0 to 255.
1719
- * For Neopixel LED overall brightness parameters is also available 
1830
+ * For Neopixel LED an overall brightness parameter is also available.
1720
  *
1831
  *
1721
  * *** CAUTION ***
1832
  * *** CAUTION ***
1722
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1833
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1723
  *  as the Arduino cannot handle the current the LEDs will require.
1834
  *  as the Arduino cannot handle the current the LEDs will require.
1724
  *  Failure to follow this precaution can destroy your Arduino!
1835
  *  Failure to follow this precaution can destroy your Arduino!
1725
- *  The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
1726
- *  cannot handle such current, separate 5V power supply must be used
1836
+ *  NOTE: A separate 5V power supply is required! The Neopixel LED needs
1837
+ *  more current than the Arduino 5V linear regulator can produce.
1727
  * *** CAUTION ***
1838
  * *** CAUTION ***
1728
  *
1839
  *
1729
- * LED type. This options are mutualy exclusive. Uncomment only one.
1840
+ * LED Type. Enable only one of the following two options.
1730
  *
1841
  *
1731
  */
1842
  */
1732
 //#define RGB_LED
1843
 //#define RGB_LED
1742
 // Support for Adafruit Neopixel LED driver
1853
 // Support for Adafruit Neopixel LED driver
1743
 //#define NEOPIXEL_LED
1854
 //#define NEOPIXEL_LED
1744
 #if ENABLED(NEOPIXEL_LED)
1855
 #if ENABLED(NEOPIXEL_LED)
1745
-  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
1856
+  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
1746
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1857
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1747
-  #define NEOPIXEL_PIXELS 30       // Number of LEDs on strip
1748
-  #define NEOPIXEL_IS_SEQUENTIAL   // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
1749
-  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness 0-255
1858
+  #define NEOPIXEL_PIXELS 30       // Number of LEDs in the strip
1859
+  #define NEOPIXEL_IS_SEQUENTIAL   // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
1860
+  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness (0-255)
1750
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1861
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1751
 #endif
1862
 #endif
1752
 
1863
 
1761
  *  - Change to green once print has finished
1872
  *  - Change to green once print has finished
1762
  *  - Turn off after the print has finished and the user has pushed a button
1873
  *  - Turn off after the print has finished and the user has pushed a button
1763
  */
1874
  */
1764
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED)
1875
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
1765
   #define PRINTER_EVENT_LEDS
1876
   #define PRINTER_EVENT_LEDS
1766
 #endif
1877
 #endif
1767
 
1878
 
1768
-/*********************************************************************\
1769
-* R/C SERVO support
1770
-* Sponsored by TrinityLabs, Reworked by codexmas
1771
-**********************************************************************/
1879
+/**
1880
+ * R/C SERVO support
1881
+ * Sponsored by TrinityLabs, Reworked by codexmas
1882
+ */
1772
 
1883
 
1773
-// Number of servos
1774
-//
1775
-// If you select a configuration below, this will receive a default value and does not need to be set manually
1776
-// set it manually if you have more servos than extruders and wish to manually control some
1777
-// leaving it undefined or defining as 0 will disable the servo subsystem
1778
-// If unsure, leave commented / disabled
1779
-//
1884
+/**
1885
+ * Number of servos
1886
+ *
1887
+ * For some servo-related options NUM_SERVOS will be set automatically.
1888
+ * Set this manually if there are extra servos needing manual control.
1889
+ * Leave undefined or set to 0 to entirely disable the servo subsystem.
1890
+ */
1780
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1891
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1781
 
1892
 
1782
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1893
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1789
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1900
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1790
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1901
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1791
 
1902
 
1792
-/**
1793
- * Filament Width Sensor
1794
- *
1795
- * Measures the filament width in real-time and adjusts
1796
- * flow rate to compensate for any irregularities.
1797
- *
1798
- * Also allows the measured filament diameter to set the
1799
- * extrusion rate, so the slicer only has to specify the
1800
- * volume.
1801
- *
1802
- * Only a single extruder is supported at this time.
1803
- *
1804
- *  34 RAMPS_14    : Analog input 5 on the AUX2 connector
1805
- *  81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
1806
- * 301 RAMBO       : Analog input 3
1807
- *
1808
- * Note: May require analog pins to be defined for other boards.
1809
- */
1810
-//#define FILAMENT_WIDTH_SENSOR
1811
-
1812
-#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75   // (mm) Diameter of the filament generally used (3.0 or 1.75mm), also used in the slicer. Used to validate sensor reading.
1813
-
1814
-#if ENABLED(FILAMENT_WIDTH_SENSOR)
1815
-  #define FILAMENT_SENSOR_EXTRUDER_NUM 0    // Index of the extruder that has the filament sensor (0,1,2,3)
1816
-  #define MEASUREMENT_DELAY_CM        14    // (cm) The distance from the filament sensor to the melting chamber
1817
-
1818
-  #define MEASURED_UPPER_LIMIT         1.95 // (mm) Upper limit used to validate sensor reading
1819
-  #define MEASURED_LOWER_LIMIT         1.20 // (mm) Lower limit used to validate sensor reading
1820
-  #define MAX_MEASUREMENT_DELAY       20    // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
1821
-
1822
-  #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
1823
-
1824
-  // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
1825
-  //#define FILAMENT_LCD_DISPLAY
1826
-#endif
1827
-
1828
 #endif // CONFIGURATION_H
1903
 #endif // CONFIGURATION_H

+ 271
- 128
Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h Переглянути файл

32
  */
32
  */
33
 #ifndef CONFIGURATION_ADV_H
33
 #ifndef CONFIGURATION_ADV_H
34
 #define CONFIGURATION_ADV_H
34
 #define CONFIGURATION_ADV_H
35
-#define CONFIGURATION_ADV_H_VERSION 010100
35
+#define CONFIGURATION_ADV_H_VERSION 010107
36
 
36
 
37
 // @section temperature
37
 // @section temperature
38
 
38
 
48
 #endif
48
 #endif
49
 
49
 
50
 /**
50
 /**
51
- * Thermal Protection protects your printer from damage and fire if a
52
- * thermistor falls out or temperature sensors fail in any way.
51
+ * Thermal Protection provides additional protection to your printer from damage
52
+ * and fire. Marlin always includes safe min and max temperature ranges which
53
+ * protect against a broken or disconnected thermistor wire.
53
  *
54
  *
54
- * The issue: If a thermistor falls out or a temperature sensor fails,
55
- * Marlin can no longer sense the actual temperature. Since a disconnected
56
- * thermistor reads as a low temperature, the firmware will keep the heater on.
55
+ * The issue: If a thermistor falls out, it will report the much lower
56
+ * temperature of the air in the room, and the the firmware will keep
57
+ * the heater on.
57
  *
58
  *
58
  * The solution: Once the temperature reaches the target, start observing.
59
  * The solution: Once the temperature reaches the target, start observing.
59
- * If the temperature stays too far below the target (hysteresis) for too long (period),
60
- * the firmware will halt the machine as a safety precaution.
60
+ * If the temperature stays too far below the target (hysteresis) for too
61
+ * long (period), the firmware will halt the machine as a safety precaution.
61
  *
62
  *
62
- * If you get false positives for "Thermal Runaway" increase THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
63
+ * If you get false positives for "Thermal Runaway", increase
64
+ * THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
63
  */
65
  */
64
 #if ENABLED(THERMAL_PROTECTION_HOTENDS)
66
 #if ENABLED(THERMAL_PROTECTION_HOTENDS)
65
   #define THERMAL_PROTECTION_PERIOD 40        // Seconds
67
   #define THERMAL_PROTECTION_PERIOD 40        // Seconds
66
   #define THERMAL_PROTECTION_HYSTERESIS 4     // Degrees Celsius
68
   #define THERMAL_PROTECTION_HYSTERESIS 4     // Degrees Celsius
67
 
69
 
68
   /**
70
   /**
69
-   * Whenever an M104 or M109 increases the target temperature the firmware will wait for the
70
-   * WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
71
-   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
72
-   * but only if the current temperature is far enough below the target for a reliable test.
71
+   * Whenever an M104, M109, or M303 increases the target temperature, the
72
+   * firmware will wait for the WATCH_TEMP_PERIOD to expire. If the temperature
73
+   * hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted and
74
+   * requires a hard reset. This test restarts with any M104/M109/M303, but only
75
+   * if the current temperature is far enough below the target for a reliable
76
+   * test.
73
    *
77
    *
74
-   * If you get false positives for "Heating failed" increase WATCH_TEMP_PERIOD and/or decrease WATCH_TEMP_INCREASE
75
-   * WATCH_TEMP_INCREASE should not be below 2.
78
+   * If you get false positives for "Heating failed", increase WATCH_TEMP_PERIOD
79
+   * and/or decrease WATCH_TEMP_INCREASE. WATCH_TEMP_INCREASE should not be set
80
+   * below 2.
76
    */
81
    */
77
   #define WATCH_TEMP_PERIOD 20                // Seconds
82
   #define WATCH_TEMP_PERIOD 20                // Seconds
78
   #define WATCH_TEMP_INCREASE 2               // Degrees Celsius
83
   #define WATCH_TEMP_INCREASE 2               // Degrees Celsius
86
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
91
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
87
 
92
 
88
   /**
93
   /**
89
-   * Whenever an M140 or M190 increases the target temperature the firmware will wait for the
90
-   * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE
91
-   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190,
92
-   * but only if the current temperature is far enough below the target for a reliable test.
93
-   *
94
-   * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease
95
-   * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.)
94
+   * As described above, except for the bed (M140/M190/M303).
96
    */
95
    */
97
   #define WATCH_BED_TEMP_PERIOD 60                // Seconds
96
   #define WATCH_BED_TEMP_PERIOD 60                // Seconds
98
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
97
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
123
   #define AUTOTEMP_OLDWEIGHT 0.98
122
   #define AUTOTEMP_OLDWEIGHT 0.98
124
 #endif
123
 #endif
125
 
124
 
125
+// Show extra position information in M114
126
+//#define M114_DETAIL
127
+
126
 // Show Temperature ADC value
128
 // Show Temperature ADC value
127
 // Enable for M105 to include ADC values read from temperature sensors.
129
 // Enable for M105 to include ADC values read from temperature sensors.
128
 //#define SHOW_TEMP_ADC_VALUES
130
 //#define SHOW_TEMP_ADC_VALUES
257
 
259
 
258
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
260
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
259
 
261
 
260
-// Dual X Steppers
261
-// Uncomment this option to drive two X axis motors.
262
-// The next unused E driver will be assigned to the second X stepper.
262
+/**
263
+ * Dual Steppers / Dual Endstops
264
+ *
265
+ * This section will allow you to use extra E drivers to drive a second motor for X, Y, or Z axes.
266
+ *
267
+ * For example, set X_DUAL_STEPPER_DRIVERS setting to use a second motor. If the motors need to
268
+ * spin in opposite directions set INVERT_X2_VS_X_DIR. If the second motor needs its own endstop
269
+ * set X_DUAL_ENDSTOPS. This can adjust for "racking." Use X2_USE_ENDSTOP to set the endstop plug
270
+ * that should be used for the second endstop. Extra endstops will appear in the output of 'M119'.
271
+ *
272
+ * Use X_DUAL_ENDSTOP_ADJUSTMENT to adjust for mechanical imperfection. After homing both motors
273
+ * this offset is applied to the X2 motor. To find the offset home the X axis, and measure the error
274
+ * in X2. Dual endstop offsets can be set at runtime with 'M666 X<offset> Y<offset> Z<offset>'.
275
+ */
276
+
263
 //#define X_DUAL_STEPPER_DRIVERS
277
 //#define X_DUAL_STEPPER_DRIVERS
264
 #if ENABLED(X_DUAL_STEPPER_DRIVERS)
278
 #if ENABLED(X_DUAL_STEPPER_DRIVERS)
265
-  // Set true if the two X motors need to rotate in opposite directions
266
-  #define INVERT_X2_VS_X_DIR true
279
+  #define INVERT_X2_VS_X_DIR true   // Set 'true' if X motors should rotate in opposite directions
280
+  //#define X_DUAL_ENDSTOPS
281
+  #if ENABLED(X_DUAL_ENDSTOPS)
282
+    #define X2_USE_ENDSTOP _XMAX_
283
+    #define X_DUAL_ENDSTOPS_ADJUSTMENT  0
284
+  #endif
267
 #endif
285
 #endif
268
 
286
 
269
-// Dual Y Steppers
270
-// Uncomment this option to drive two Y axis motors.
271
-// The next unused E driver will be assigned to the second Y stepper.
272
 //#define Y_DUAL_STEPPER_DRIVERS
287
 //#define Y_DUAL_STEPPER_DRIVERS
273
 #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
288
 #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
274
-  // Set true if the two Y motors need to rotate in opposite directions
275
-  #define INVERT_Y2_VS_Y_DIR true
289
+  #define INVERT_Y2_VS_Y_DIR true   // Set 'true' if Y motors should rotate in opposite directions
290
+  //#define Y_DUAL_ENDSTOPS
291
+  #if ENABLED(Y_DUAL_ENDSTOPS)
292
+    #define Y2_USE_ENDSTOP _YMAX_
293
+    #define Y_DUAL_ENDSTOPS_ADJUSTMENT  0
294
+  #endif
276
 #endif
295
 #endif
277
 
296
 
278
-// A single Z stepper driver is usually used to drive 2 stepper motors.
279
-// Uncomment this option to use a separate stepper driver for each Z axis motor.
280
-// The next unused E driver will be assigned to the second Z stepper.
281
 //#define Z_DUAL_STEPPER_DRIVERS
297
 //#define Z_DUAL_STEPPER_DRIVERS
282
-
283
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
298
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
284
-
285
-  // Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper.
286
-  // That way the machine is capable to align the bed during home, since both Z steppers are homed.
287
-  // There is also an implementation of M666 (software endstops adjustment) to this feature.
288
-  // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed.
289
-  // One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2.
290
-  // If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive.
291
-  // Play a little bit with small adjustments (0.5mm) and check the behaviour.
292
-  // The M119 (endstops report) will start reporting the Z2 Endstop as well.
293
-
294
   //#define Z_DUAL_ENDSTOPS
299
   //#define Z_DUAL_ENDSTOPS
295
-
296
   #if ENABLED(Z_DUAL_ENDSTOPS)
300
   #if ENABLED(Z_DUAL_ENDSTOPS)
297
     #define Z2_USE_ENDSTOP _XMAX_
301
     #define Z2_USE_ENDSTOP _XMAX_
298
-    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0  // Use M666 to determine/test this value
302
+    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0
299
   #endif
303
   #endif
300
-
301
-#endif // Z_DUAL_STEPPER_DRIVERS
304
+#endif
302
 
305
 
303
 // Enable this for dual x-carriage printers.
306
 // Enable this for dual x-carriage printers.
304
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
307
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
345
 
348
 
346
 // @section homing
349
 // @section homing
347
 
350
 
348
-//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
351
+// Homing hits each endstop, retracts by these distances, then does a slower bump.
349
 #define X_HOME_BUMP_MM 5
352
 #define X_HOME_BUMP_MM 5
350
 #define Y_HOME_BUMP_MM 5
353
 #define Y_HOME_BUMP_MM 5
351
 #define Z_HOME_BUMP_MM 5 // deltas need the same for all three axes
354
 #define Z_HOME_BUMP_MM 5 // deltas need the same for all three axes
352
-#define HOMING_BUMP_DIVISOR {10, 10, 10}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
353
-//#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
355
+#define HOMING_BUMP_DIVISOR { 10, 10, 10 }  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
356
+//#define QUICK_HOME                     // If homing includes X and Y, do a diagonal move initially
354
 
357
 
355
 // When G28 is called, this option will make Y home before X
358
 // When G28 is called, this option will make Y home before X
356
 //#define HOME_Y_BEFORE_X
359
 //#define HOME_Y_BEFORE_X
436
 #define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 }   // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
439
 #define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 }   // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
437
 //#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 }    // Default drive percent - X, Y, Z, E axis
440
 //#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 }    // Default drive percent - X, Y, Z, E axis
438
 
441
 
439
-// Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
442
+// Use an I2C based DIGIPOT (e.g., Azteeg X3 Pro)
440
 //#define DIGIPOT_I2C
443
 //#define DIGIPOT_I2C
444
+#if ENABLED(DIGIPOT_I2C) && !defined(DIGIPOT_I2C_ADDRESS_A)
445
+  /**
446
+   * Common slave addresses:
447
+   *
448
+   *                    A   (A shifted)   B   (B shifted)  IC
449
+   * Smoothie          0x2C (0x58)       0x2D (0x5A)       MCP4451
450
+   * AZTEEG_X3_PRO     0x2C (0x58)       0x2E (0x5C)       MCP4451
451
+   * MIGHTYBOARD_REVE  0x2F (0x5E)                         MCP4018
452
+   */
453
+  #define DIGIPOT_I2C_ADDRESS_A 0x2C  // unshifted slave address for first DIGIPOT
454
+  #define DIGIPOT_I2C_ADDRESS_B 0x2D  // unshifted slave address for second DIGIPOT
455
+#endif
456
+
441
 //#define DIGIPOT_MCP4018          // Requires library from https://github.com/stawel/SlowSoftI2CMaster
457
 //#define DIGIPOT_MCP4018          // Requires library from https://github.com/stawel/SlowSoftI2CMaster
442
 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4     AZTEEG_X3_PRO: 8
458
 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4     AZTEEG_X3_PRO: 8
443
 // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
459
 // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
468
 // The timeout (in ms) to return to the status screen from sub-menus
484
 // The timeout (in ms) to return to the status screen from sub-menus
469
 //#define LCD_TIMEOUT_TO_STATUS 15000
485
 //#define LCD_TIMEOUT_TO_STATUS 15000
470
 
486
 
487
+/**
488
+ * LED Control Menu
489
+ * Enable this feature to add LED Control to the LCD menu
490
+ */
491
+//#define LED_CONTROL_MENU
492
+#if ENABLED(LED_CONTROL_MENU)
493
+  #define LED_COLOR_PRESETS                 // Enable the Preset Color menu option
494
+  #if ENABLED(LED_COLOR_PRESETS)
495
+    #define LED_USER_PRESET_RED        255  // User defined RED value
496
+    #define LED_USER_PRESET_GREEN      128  // User defined GREEN value
497
+    #define LED_USER_PRESET_BLUE         0  // User defined BLUE value
498
+    #define LED_USER_PRESET_WHITE      255  // User defined WHITE value
499
+    #define LED_USER_PRESET_BRIGHTNESS 255  // User defined intensity
500
+    //#define LED_USER_PRESET_STARTUP       // Have the printer display the user preset color on startup
501
+  #endif
502
+#endif // LED_CONTROL_MENU
503
+
471
 #if ENABLED(SDSUPPORT)
504
 #if ENABLED(SDSUPPORT)
472
 
505
 
473
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
506
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
477
   // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
510
   // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
478
   #define SD_DETECT_INVERTED
511
   #define SD_DETECT_INVERTED
479
 
512
 
480
-  #define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
513
+  #define SD_FINISHED_STEPPERRELEASE true          // Disable steppers when SD Print is finished
481
   #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
514
   #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
482
 
515
 
483
-  #define SDCARD_RATHERRECENTFIRST  //reverse file order of sd card menu display. Its sorted practically after the file system block order.
484
-  // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that.
485
-  // using:
516
+  // Reverse SD sort to show "more recent" files first, according to the card's FAT.
517
+  // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended.
518
+  #define SDCARD_RATHERRECENTFIRST
519
+
520
+  // Add an option in the menu to run all auto#.g files
486
   //#define MENU_ADDAUTOSTART
521
   //#define MENU_ADDAUTOSTART
487
 
522
 
488
   /**
523
   /**
519
     #define SDSORT_USES_STACK  false  // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
554
     #define SDSORT_USES_STACK  false  // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
520
     #define SDSORT_CACHE_NAMES false  // Keep sorted items in RAM longer for speedy performance. Most expensive option.
555
     #define SDSORT_CACHE_NAMES false  // Keep sorted items in RAM longer for speedy performance. Most expensive option.
521
     #define SDSORT_DYNAMIC_RAM false  // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
556
     #define SDSORT_DYNAMIC_RAM false  // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
557
+    #define SDSORT_CACHE_VFATS 2      // Maximum number of 13-byte VFAT entries to use for sorting.
558
+                                      // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM.
522
   #endif
559
   #endif
523
 
560
 
524
   // Show a progress bar on HD44780 LCDs for SD printing
561
   // Show a progress bar on HD44780 LCDs for SD printing
537
     //#define LCD_PROGRESS_BAR_TEST
574
     //#define LCD_PROGRESS_BAR_TEST
538
   #endif
575
   #endif
539
 
576
 
577
+  // Add an 'M73' G-code to set the current percentage
578
+  //#define LCD_SET_PROGRESS_MANUALLY
579
+
540
   // This allows hosts to request long names for files and folders with M33
580
   // This allows hosts to request long names for files and folders with M33
541
   //#define LONG_FILENAME_HOST_SUPPORT
581
   //#define LONG_FILENAME_HOST_SUPPORT
542
 
582
 
543
-  // This option allows you to abort SD printing when any endstop is triggered.
544
-  // This feature must be enabled with "M540 S1" or from the LCD menu.
545
-  // To have any effect, endstops must be enabled during SD printing.
583
+  // Enable this option to scroll long filenames in the SD card menu
584
+  //#define SCROLL_LONG_FILENAMES
585
+
586
+  /**
587
+   * This option allows you to abort SD printing when any endstop is triggered.
588
+   * This feature must be enabled with "M540 S1" or from the LCD menu.
589
+   * To have any effect, endstops must be enabled during SD printing.
590
+   */
546
   //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
591
   //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
547
 
592
 
593
+  /**
594
+   * This option makes it easier to print the same SD Card file again.
595
+   * On print completion the LCD Menu will open with the file selected.
596
+   * You can just click to start the print, or navigate elsewhere.
597
+   */
598
+  //#define SD_REPRINT_LAST_SELECTED_FILE
599
+
548
 #endif // SDSUPPORT
600
 #endif // SDSUPPORT
549
 
601
 
550
 /**
602
 /**
577
   // Enable this option and reduce the value to optimize screen updates.
629
   // Enable this option and reduce the value to optimize screen updates.
578
   // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
630
   // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
579
   //#define DOGM_SPI_DELAY_US 5
631
   //#define DOGM_SPI_DELAY_US 5
632
+
633
+  // Swap the CW/CCW indicators in the graphics overlay
634
+  //#define OVERLAY_GFX_REVERSE
635
+
580
 #endif // DOGLCD
636
 #endif // DOGLCD
581
 
637
 
582
 // @section safety
638
 // @section safety
603
  */
659
  */
604
 //#define BABYSTEPPING
660
 //#define BABYSTEPPING
605
 #if ENABLED(BABYSTEPPING)
661
 #if ENABLED(BABYSTEPPING)
606
-  //#define BABYSTEP_XY            // Also enable X/Y Babystepping. Not supported on DELTA!
607
-  #define BABYSTEP_INVERT_Z false  // Change if Z babysteps should go the other way
608
-  #define BABYSTEP_MULTIPLICATOR 1 // Babysteps are very small. Increase for faster motion.
609
-  //#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
662
+  //#define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
663
+  #define BABYSTEP_INVERT_Z false    // Change if Z babysteps should go the other way
664
+  #define BABYSTEP_MULTIPLICATOR   1 // Babysteps are very small. Increase for faster motion.
665
+  //#define BABYSTEP_ZPROBE_OFFSET   // Enable to combine M851 and Babystepping
610
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
666
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
611
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
667
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
612
                                         // Note: Extra time may be added to mitigate controller latency.
668
                                         // Note: Extra time may be added to mitigate controller latency.
613
   //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
669
   //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
614
-  //#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators
615
 #endif
670
 #endif
616
 
671
 
617
 // @section extruder
672
 // @section extruder
658
 
713
 
659
 // @section leveling
714
 // @section leveling
660
 
715
 
661
-// Default mesh area is an area with an inset margin on the print area.
662
-// Below are the macros that are used to define the borders for the mesh area,
663
-// made available here for specialized needs, ie dual extruder setup.
664
-#if ENABLED(MESH_BED_LEVELING)
665
-  #define MESH_MIN_X MESH_INSET
666
-  #define MESH_MAX_X (X_BED_SIZE - (MESH_INSET))
667
-  #define MESH_MIN_Y MESH_INSET
668
-  #define MESH_MAX_Y (Y_BED_SIZE - (MESH_INSET))
669
-#elif ENABLED(AUTO_BED_LEVELING_UBL)
670
-  #define UBL_MESH_MIN_X UBL_MESH_INSET
671
-  #define UBL_MESH_MAX_X (X_BED_SIZE - (UBL_MESH_INSET))
672
-  #define UBL_MESH_MIN_Y UBL_MESH_INSET
673
-  #define UBL_MESH_MAX_Y (Y_BED_SIZE - (UBL_MESH_INSET))
674
-
675
-  // If this is defined, the currently active mesh will be saved in the
676
-  // current slot on M500.
677
-  #define UBL_SAVE_ACTIVE_ON_M500
716
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
717
+  #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
718
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
719
+  #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
720
+#endif
721
+
722
+#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL)
723
+  // Override the mesh area if the automatic (max) area is too large
724
+  //#define MESH_MIN_X MESH_INSET
725
+  //#define MESH_MIN_Y MESH_INSET
726
+  //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET)
727
+  //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
678
 #endif
728
 #endif
679
 
729
 
680
 // @section extras
730
 // @section extras
694
 //#define BEZIER_CURVE_SUPPORT
744
 //#define BEZIER_CURVE_SUPPORT
695
 
745
 
696
 // G38.2 and G38.3 Probe Target
746
 // G38.2 and G38.3 Probe Target
697
-// Enable PROBE_DOUBLE_TOUCH if you want G38 to double touch
747
+// Set MULTIPLE_PROBING if you want G38 to double touch
698
 //#define G38_PROBE_TARGET
748
 //#define G38_PROBE_TARGET
699
 #if ENABLED(G38_PROBE_TARGET)
749
 #if ENABLED(G38_PROBE_TARGET)
700
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
750
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
719
 // @section hidden
769
 // @section hidden
720
 
770
 
721
 // The number of linear motions that can be in the plan at any give time.
771
 // The number of linear motions that can be in the plan at any give time.
722
-// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2, i.g. 8,16,32 because shifts and ors are used to do the ring-buffering.
772
+// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2 (e.g. 8, 16, 32) because shifts and ors are used to do the ring-buffering.
723
 #if ENABLED(SDSUPPORT)
773
 #if ENABLED(SDSUPPORT)
724
   #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
774
   #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
725
 #else
775
 #else
810
 #endif
860
 #endif
811
 
861
 
812
 /**
862
 /**
863
+ * Extra Fan Speed
864
+ * Adds a secondary fan speed for each print-cooling fan.
865
+ *   'M106 P<fan> T3-255' : Set a secondary speed for <fan>
866
+ *   'M106 P<fan> T2'     : Use the set secondary speed
867
+ *   'M106 P<fan> T1'     : Restore the previous fan speed
868
+ */
869
+//#define EXTRA_FAN_SPEED
870
+
871
+/**
813
  * Advanced Pause
872
  * Advanced Pause
814
  * Experimental feature for filament change support and for parking the nozzle when paused.
873
  * Experimental feature for filament change support and for parking the nozzle when paused.
815
  * Adds the GCode M600 for initiating filament change.
874
  * Adds the GCode M600 for initiating filament change.
919
 
978
 
920
 #endif
979
 #endif
921
 
980
 
922
-// @section TMC2130
981
+// @section TMC2130, TMC2208
923
 
982
 
924
 /**
983
 /**
925
  * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
984
  * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
933
  */
992
  */
934
 //#define HAVE_TMC2130
993
 //#define HAVE_TMC2130
935
 
994
 
936
-#if ENABLED(HAVE_TMC2130)
995
+/**
996
+ * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
997
+ * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin.
998
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN
999
+ * to #_SERIAL_TX_PIN with a 1K resistor.
1000
+ * The drivers can also be used with hardware serial.
1001
+ *
1002
+ * You'll also need the TMC2208Stepper Arduino library
1003
+ * (https://github.com/teemuatlut/TMC2208Stepper).
1004
+ */
1005
+//#define HAVE_TMC2208
1006
+
1007
+#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
937
 
1008
 
938
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
1009
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
939
   //#define X_IS_TMC2130
1010
   //#define X_IS_TMC2130
948
   //#define E3_IS_TMC2130
1019
   //#define E3_IS_TMC2130
949
   //#define E4_IS_TMC2130
1020
   //#define E4_IS_TMC2130
950
 
1021
 
1022
+  //#define X_IS_TMC2208
1023
+  //#define X2_IS_TMC2208
1024
+  //#define Y_IS_TMC2208
1025
+  //#define Y2_IS_TMC2208
1026
+  //#define Z_IS_TMC2208
1027
+  //#define Z2_IS_TMC2208
1028
+  //#define E0_IS_TMC2208
1029
+  //#define E1_IS_TMC2208
1030
+  //#define E2_IS_TMC2208
1031
+  //#define E3_IS_TMC2208
1032
+  //#define E4_IS_TMC2208
1033
+
951
   /**
1034
   /**
952
    * Stepper driver settings
1035
    * Stepper driver settings
953
    */
1036
    */
954
 
1037
 
955
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1038
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
956
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1039
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
957
-  #define INTERPOLATE          1  // Interpolate X/Y/Z_MICROSTEPS to 256
1040
+  #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
958
 
1041
 
959
-  #define X_CURRENT         1000  // rms current in mA. Multiply by 1.41 for peak current.
1042
+  #define X_CURRENT          800  // rms current in mA. Multiply by 1.41 for peak current.
960
   #define X_MICROSTEPS        16  // 0..256
1043
   #define X_MICROSTEPS        16  // 0..256
961
 
1044
 
962
-  #define Y_CURRENT         1000
1045
+  #define Y_CURRENT          800
963
   #define Y_MICROSTEPS        16
1046
   #define Y_MICROSTEPS        16
964
 
1047
 
965
-  #define Z_CURRENT         1000
1048
+  #define Z_CURRENT          800
966
   #define Z_MICROSTEPS        16
1049
   #define Z_MICROSTEPS        16
967
 
1050
 
968
-  //#define X2_CURRENT      1000
969
-  //#define X2_MICROSTEPS     16
1051
+  #define X2_CURRENT         800
1052
+  #define X2_MICROSTEPS       16
970
 
1053
 
971
-  //#define Y2_CURRENT      1000
972
-  //#define Y2_MICROSTEPS     16
1054
+  #define Y2_CURRENT         800
1055
+  #define Y2_MICROSTEPS       16
973
 
1056
 
974
-  //#define Z2_CURRENT      1000
975
-  //#define Z2_MICROSTEPS     16
1057
+  #define Z2_CURRENT         800
1058
+  #define Z2_MICROSTEPS       16
976
 
1059
 
977
-  //#define E0_CURRENT      1000
978
-  //#define E0_MICROSTEPS     16
1060
+  #define E0_CURRENT         800
1061
+  #define E0_MICROSTEPS       16
979
 
1062
 
980
-  //#define E1_CURRENT      1000
981
-  //#define E1_MICROSTEPS     16
1063
+  #define E1_CURRENT         800
1064
+  #define E1_MICROSTEPS       16
982
 
1065
 
983
-  //#define E2_CURRENT      1000
984
-  //#define E2_MICROSTEPS     16
1066
+  #define E2_CURRENT         800
1067
+  #define E2_MICROSTEPS       16
985
 
1068
 
986
-  //#define E3_CURRENT      1000
987
-  //#define E3_MICROSTEPS     16
1069
+  #define E3_CURRENT         800
1070
+  #define E3_MICROSTEPS       16
988
 
1071
 
989
-  //#define E4_CURRENT      1000
990
-  //#define E4_MICROSTEPS     16
1072
+  #define E4_CURRENT         800
1073
+  #define E4_MICROSTEPS       16
991
 
1074
 
992
   /**
1075
   /**
993
    * Use Trinamic's ultra quiet stepping mode.
1076
    * Use Trinamic's ultra quiet stepping mode.
996
   #define STEALTHCHOP
1079
   #define STEALTHCHOP
997
 
1080
 
998
   /**
1081
   /**
999
-   * Let Marlin automatically control stepper current.
1000
-   * This is still an experimental feature.
1001
-   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
1002
-   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
1003
-   * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX
1082
+   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1083
+   * like overtemperature and short to ground. TMC2208 requires hardware serial.
1084
+   * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1085
+   * Other detected conditions can be used to stop the current print.
1004
    * Relevant g-codes:
1086
    * Relevant g-codes:
1005
    * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
1087
    * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
1006
-   * M906 S1 - Start adjusting current
1007
-   * M906 S0 - Stop adjusting current
1008
    * M911 - Report stepper driver overtemperature pre-warn condition.
1088
    * M911 - Report stepper driver overtemperature pre-warn condition.
1009
    * M912 - Clear stepper driver overtemperature pre-warn condition flag.
1089
    * M912 - Clear stepper driver overtemperature pre-warn condition flag.
1090
+   * M122 S0/1 - Report driver parameters (Requires TMC_DEBUG)
1010
    */
1091
    */
1011
-  //#define AUTOMATIC_CURRENT_CONTROL
1092
+  //#define MONITOR_DRIVER_STATUS
1012
 
1093
 
1013
-  #if ENABLED(AUTOMATIC_CURRENT_CONTROL)
1014
-    #define CURRENT_STEP          50  // [mA]
1015
-    #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
1094
+  #if ENABLED(MONITOR_DRIVER_STATUS)
1095
+    #define CURRENT_STEP_DOWN     50  // [mA]
1016
     #define REPORT_CURRENT_CHANGE
1096
     #define REPORT_CURRENT_CHANGE
1097
+    #define STOP_ON_ERROR
1017
   #endif
1098
   #endif
1018
 
1099
 
1019
   /**
1100
   /**
1028
   #define X2_HYBRID_THRESHOLD    100
1109
   #define X2_HYBRID_THRESHOLD    100
1029
   #define Y_HYBRID_THRESHOLD     100
1110
   #define Y_HYBRID_THRESHOLD     100
1030
   #define Y2_HYBRID_THRESHOLD    100
1111
   #define Y2_HYBRID_THRESHOLD    100
1031
-  #define Z_HYBRID_THRESHOLD       4
1032
-  #define Z2_HYBRID_THRESHOLD      4
1112
+  #define Z_HYBRID_THRESHOLD       3
1113
+  #define Z2_HYBRID_THRESHOLD      3
1033
   #define E0_HYBRID_THRESHOLD     30
1114
   #define E0_HYBRID_THRESHOLD     30
1034
   #define E1_HYBRID_THRESHOLD     30
1115
   #define E1_HYBRID_THRESHOLD     30
1035
   #define E2_HYBRID_THRESHOLD     30
1116
   #define E2_HYBRID_THRESHOLD     30
1039
   /**
1120
   /**
1040
    * Use stallGuard2 to sense an obstacle and trigger an endstop.
1121
    * Use stallGuard2 to sense an obstacle and trigger an endstop.
1041
    * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
1122
    * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
1042
-   * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal.
1123
+   * X and Y homing will always be done in spreadCycle mode.
1043
    *
1124
    *
1044
    * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
1125
    * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
1045
    * Higher values make the system LESS sensitive.
1126
    * Higher values make the system LESS sensitive.
1048
    * It is advised to set X/Y_HOME_BUMP_MM to 0.
1129
    * It is advised to set X/Y_HOME_BUMP_MM to 0.
1049
    * M914 X/Y to live tune the setting
1130
    * M914 X/Y to live tune the setting
1050
    */
1131
    */
1051
-  //#define SENSORLESS_HOMING
1132
+  //#define SENSORLESS_HOMING // TMC2130 only
1052
 
1133
 
1053
   #if ENABLED(SENSORLESS_HOMING)
1134
   #if ENABLED(SENSORLESS_HOMING)
1054
-    #define X_HOMING_SENSITIVITY  19
1055
-    #define Y_HOMING_SENSITIVITY  19
1135
+    #define X_HOMING_SENSITIVITY  8
1136
+    #define Y_HOMING_SENSITIVITY  8
1056
   #endif
1137
   #endif
1057
 
1138
 
1058
   /**
1139
   /**
1140
+   * Enable M122 debugging command for TMC stepper drivers.
1141
+   * M122 S0/1 will enable continous reporting.
1142
+   */
1143
+  //#define TMC_DEBUG
1144
+
1145
+  /**
1059
    * You can set your own advanced settings by filling in predefined functions.
1146
    * You can set your own advanced settings by filling in predefined functions.
1060
    * A list of available functions can be found on the library github page
1147
    * A list of available functions can be found on the library github page
1061
    * https://github.com/teemuatlut/TMC2130Stepper
1148
    * https://github.com/teemuatlut/TMC2130Stepper
1149
+   * https://github.com/teemuatlut/TMC2208Stepper
1062
    *
1150
    *
1063
    * Example:
1151
    * Example:
1064
-   * #define TMC2130_ADV() { \
1152
+   * #define TMC_ADV() { \
1065
    *   stepperX.diag0_temp_prewarn(1); \
1153
    *   stepperX.diag0_temp_prewarn(1); \
1066
-   *   stepperX.interpolate(0); \
1154
+   *   stepperY.interpolate(0); \
1067
    * }
1155
    * }
1068
    */
1156
    */
1069
-  #define  TMC2130_ADV() {  }
1157
+  #define  TMC_ADV() {  }
1070
 
1158
 
1071
-#endif // HAVE_TMC2130
1159
+#endif // TMC2130 || TMC2208
1072
 
1160
 
1073
 // @section L6470
1161
 // @section L6470
1074
 
1162
 
1233
 #endif
1321
 #endif
1234
 
1322
 
1235
 /**
1323
 /**
1324
+ * Filament Width Sensor
1325
+ *
1326
+ * Measures the filament width in real-time and adjusts
1327
+ * flow rate to compensate for any irregularities.
1328
+ *
1329
+ * Also allows the measured filament diameter to set the
1330
+ * extrusion rate, so the slicer only has to specify the
1331
+ * volume.
1332
+ *
1333
+ * Only a single extruder is supported at this time.
1334
+ *
1335
+ *  34 RAMPS_14    : Analog input 5 on the AUX2 connector
1336
+ *  81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
1337
+ * 301 RAMBO       : Analog input 3
1338
+ *
1339
+ * Note: May require analog pins to be defined for other boards.
1340
+ */
1341
+//#define FILAMENT_WIDTH_SENSOR
1342
+
1343
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
1344
+  #define FILAMENT_SENSOR_EXTRUDER_NUM 0    // Index of the extruder that has the filament sensor. :[0,1,2,3,4]
1345
+  #define MEASUREMENT_DELAY_CM        14    // (cm) The distance from the filament sensor to the melting chamber
1346
+
1347
+  #define MEASURED_UPPER_LIMIT         1.95 // (mm) Upper limit used to validate sensor reading
1348
+  #define MEASURED_LOWER_LIMIT         1.20 // (mm) Lower limit used to validate sensor reading
1349
+  #define MAX_MEASUREMENT_DELAY       20    // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
1350
+
1351
+  #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
1352
+
1353
+  // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
1354
+  //#define FILAMENT_LCD_DISPLAY
1355
+#endif
1356
+
1357
+/**
1358
+ * CNC Coordinate Systems
1359
+ *
1360
+ * Enables G53 and G54-G59.3 commands to select coordinate systems
1361
+ * and G92.1 to reset the workspace to native machine space.
1362
+ */
1363
+//#define CNC_COORDINATE_SYSTEMS
1364
+
1365
+/**
1236
  * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
1366
  * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
1237
  */
1367
  */
1238
 //#define PINS_DEBUGGING
1368
 //#define PINS_DEBUGGING
1423
                                          // tweaks made to the configuration are affecting the printer in real-time.
1553
                                          // tweaks made to the configuration are affecting the printer in real-time.
1424
 #endif
1554
 #endif
1425
 
1555
 
1556
+/**
1557
+ * NanoDLP Sync support
1558
+ *
1559
+ * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
1560
+ * string to enable synchronization with DLP projector exposure. This change will allow to use
1561
+ * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
1562
+ */
1563
+//#define NANODLP_Z_SYNC
1564
+#if ENABLED(NANODLP_Z_SYNC)
1565
+  //#define NANODLP_ALL_AXIS  // Enables "Z_move_comp" output on any axis move.
1566
+                              // Default behaviour is limited to Z axis only.
1567
+#endif
1568
+
1426
 #endif // CONFIGURATION_ADV_H
1569
 #endif // CONFIGURATION_ADV_H

+ 166
- 91
Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h Переглянути файл

37
  */
37
  */
38
 #ifndef CONFIGURATION_H
38
 #ifndef CONFIGURATION_H
39
 #define CONFIGURATION_H
39
 #define CONFIGURATION_H
40
-#define CONFIGURATION_H_VERSION 010100
40
+#define CONFIGURATION_H_VERSION 010107
41
 
41
 
42
 //===========================================================================
42
 //===========================================================================
43
 //============================= Getting Started =============================
43
 //============================= Getting Started =============================
136
 // :[1, 2, 3, 4, 5]
136
 // :[1, 2, 3, 4, 5]
137
 #define EXTRUDERS 1
137
 #define EXTRUDERS 1
138
 
138
 
139
+// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
140
+#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75
141
+
139
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
142
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
140
 //#define SINGLENOZZLE
143
 //#define SINGLENOZZLE
141
 
144
 
336
 
339
 
337
 // Comment the following line to disable PID and enable bang-bang.
340
 // Comment the following line to disable PID and enable bang-bang.
338
 #define PIDTEMP
341
 #define PIDTEMP
339
-#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
340
-#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
342
+#define BANG_MAX 255     // Limits current to nozzle while in bang-bang mode; 255=full current
343
+#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
344
+#define PID_K1 0.95      // Smoothing factor within the PID
341
 #if ENABLED(PIDTEMP)
345
 #if ENABLED(PIDTEMP)
342
   #define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
346
   #define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
343
   //#define PID_DEBUG // Sends debug data to the serial port.
347
   //#define PID_DEBUG // Sends debug data to the serial port.
347
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
351
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
348
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
352
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
349
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
353
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
350
-  #define K1 0.95 //smoothing factor within the PID
351
 
354
 
352
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
355
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
353
 
356
 
438
 //===========================================================================
441
 //===========================================================================
439
 
442
 
440
 /**
443
 /**
441
- * Thermal Protection protects your printer from damage and fire if a
442
- * thermistor falls out or temperature sensors fail in any way.
444
+ * Thermal Protection provides additional protection to your printer from damage
445
+ * and fire. Marlin always includes safe min and max temperature ranges which
446
+ * protect against a broken or disconnected thermistor wire.
443
  *
447
  *
444
- * The issue: If a thermistor falls out or a temperature sensor fails,
445
- * Marlin can no longer sense the actual temperature. Since a disconnected
446
- * thermistor reads as a low temperature, the firmware will keep the heater on.
448
+ * The issue: If a thermistor falls out, it will report the much lower
449
+ * temperature of the air in the room, and the the firmware will keep
450
+ * the heater on.
447
  *
451
  *
448
  * If you get "Thermal Runaway" or "Heating failed" errors the
452
  * If you get "Thermal Runaway" or "Heating failed" errors the
449
  * details can be tuned in Configuration_adv.h
453
  * details can be tuned in Configuration_adv.h
496
   #if ENABLED(DELTA_AUTO_CALIBRATION)
500
   #if ENABLED(DELTA_AUTO_CALIBRATION)
497
     // set the default number of probe points : n*n (1 -> 7)
501
     // set the default number of probe points : n*n (1 -> 7)
498
     #define DELTA_CALIBRATION_DEFAULT_POINTS 4
502
     #define DELTA_CALIBRATION_DEFAULT_POINTS 4
503
+
504
+    // Enable and set these values based on results of 'G33 A'
505
+    //#define H_FACTOR 1.01
506
+    //#define R_FACTOR 2.61
507
+    //#define A_FACTOR 0.87
508
+
499
   #endif
509
   #endif
500
 
510
 
501
   #if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU)
511
   #if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU)
502
-    // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS*0.869 for non-eccentric probes
512
+    // Set the radius for the calibration probe points - max 0.9 * DELTA_PRINTABLE_RADIUS for non-eccentric probes
503
     #define DELTA_CALIBRATION_RADIUS 73.5 // mm
513
     #define DELTA_CALIBRATION_RADIUS 73.5 // mm
504
     // Set the steprate for papertest probing
514
     // Set the steprate for papertest probing
505
     #define PROBE_MANUALLY_STEP 0.025
515
     #define PROBE_MANUALLY_STEP 0.025
647
 // @section probes
657
 // @section probes
648
 
658
 
649
 //
659
 //
650
-// See http://marlinfw.org/configuration/probes.html
660
+// See http://marlinfw.org/docs/configuration/probes.html
651
 //
661
 //
652
 
662
 
653
 /**
663
 /**
760
 // X and Y axis travel speed (mm/m) between probes
770
 // X and Y axis travel speed (mm/m) between probes
761
 #define XY_PROBE_SPEED 2000
771
 #define XY_PROBE_SPEED 2000
762
 
772
 
763
-// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH)
773
+// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
764
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
774
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
765
 
775
 
766
 // Speed for the "accurate" probe of each point
776
 // Speed for the "accurate" probe of each point
767
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
777
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
768
 
778
 
769
-// Use double touch for probing
770
-#define PROBE_DOUBLE_TOUCH
779
+// The number of probes to perform at each point.
780
+//   Set to 2 for a fast/slow probe, using the second probe result.
781
+//   Set to 3 or more for slow probes, averaging the results.
782
+#define MULTIPLE_PROBING 2
771
 
783
 
772
 /**
784
 /**
773
  * Allen key retractable z-probe as seen on many Kossel delta printers - http://reprap.org/wiki/Kossel#Automatic_bed_leveling_probe
785
  * Allen key retractable z-probe as seen on many Kossel delta printers - http://reprap.org/wiki/Kossel#Automatic_bed_leveling_probe
909
 #define Y_MAX_POS DELTA_PRINTABLE_RADIUS
921
 #define Y_MAX_POS DELTA_PRINTABLE_RADIUS
910
 #define Z_MAX_POS MANUAL_Z_HOME_POS
922
 #define Z_MAX_POS MANUAL_Z_HOME_POS
911
 
923
 
912
-// If enabled, axes won't move below MIN_POS in response to movement commands.
924
+/**
925
+ * Software Endstops
926
+ *
927
+ * - Prevent moves outside the set machine bounds.
928
+ * - Individual axes can be disabled, if desired.
929
+ * - X and Y only apply to Cartesian robots.
930
+ * - Use 'M211' to set software endstops on/off or report current state
931
+ */
932
+
933
+// Min software endstops curtail movement below minimum coordinate bounds
913
 #define MIN_SOFTWARE_ENDSTOPS
934
 #define MIN_SOFTWARE_ENDSTOPS
914
-// If enabled, axes won't move above MAX_POS in response to movement commands.
935
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
936
+  #define MIN_SOFTWARE_ENDSTOP_X
937
+  #define MIN_SOFTWARE_ENDSTOP_Y
938
+  #define MIN_SOFTWARE_ENDSTOP_Z
939
+#endif
940
+
941
+// Max software endstops curtail movement above maximum coordinate bounds
915
 #define MAX_SOFTWARE_ENDSTOPS
942
 #define MAX_SOFTWARE_ENDSTOPS
943
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
944
+  #define MAX_SOFTWARE_ENDSTOP_X
945
+  #define MAX_SOFTWARE_ENDSTOP_Y
946
+  #define MAX_SOFTWARE_ENDSTOP_Z
947
+#endif
916
 
948
 
917
 /**
949
 /**
918
  * Filament Runout Sensor
950
  * Filament Runout Sensor
932
 //===========================================================================
964
 //===========================================================================
933
 //=============================== Bed Leveling ==============================
965
 //=============================== Bed Leveling ==============================
934
 //===========================================================================
966
 //===========================================================================
935
-// @section bedlevel
967
+// @section calibrate
936
 
968
 
937
 /**
969
 /**
938
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
970
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
958
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
990
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
959
  *   A comprehensive bed leveling system combining the features and benefits
991
  *   A comprehensive bed leveling system combining the features and benefits
960
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
992
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
961
- *   Validation and Mesh Editing systems. Currently, UBL is only checked out
962
- *   for Cartesian Printers. That said, it was primarily designed to correct
963
- *   poor quality Delta Printers. If you feel adventurous and have a Delta,
964
- *   please post an issue if something doesn't work correctly. Initially,
965
- *   you will need to set a reduced bed size so you have a rectangular area
966
- *   to test on.
993
+ *   Validation and Mesh Editing systems.
967
  *
994
  *
968
  * - MESH_BED_LEVELING
995
  * - MESH_BED_LEVELING
969
  *   Probe a grid manually
996
  *   Probe a grid manually
990
   // at which point movement will be level to the machine's XY plane.
1017
   // at which point movement will be level to the machine's XY plane.
991
   // The height can be set with M420 Z<height>
1018
   // The height can be set with M420 Z<height>
992
   //#define ENABLE_LEVELING_FADE_HEIGHT
1019
   //#define ENABLE_LEVELING_FADE_HEIGHT
1020
+
1021
+  // For Cartesian machines, instead of dividing moves on mesh boundaries,
1022
+  // split up moves into short segments like a Delta. This follows the
1023
+  // contours of the bed more closely than edge-to-edge straight moves.
1024
+  #define SEGMENT_LEVELED_MOVES
1025
+  #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)
1026
+
1027
+  /**
1028
+   * Enable the G26 Mesh Validation Pattern tool.
1029
+   */
1030
+  //#define G26_MESH_VALIDATION   // Enable G26 mesh validation
1031
+  #if ENABLED(G26_MESH_VALIDATION)
1032
+    #define MESH_TEST_NOZZLE_SIZE     0.4   // (mm) Diameter of primary nozzle.
1033
+    #define MESH_TEST_LAYER_HEIGHT    0.2   // (mm) Default layer height for the G26 Mesh Validation Tool.
1034
+    #define MESH_TEST_HOTEND_TEMP   205.0   // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
1035
+    #define MESH_TEST_BED_TEMP       60.0   // (°C) Default bed temperature for the G26 Mesh Validation Tool.
1036
+  #endif
1037
+
993
 #endif
1038
 #endif
994
 
1039
 
995
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
1040
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
1041
   //========================= Unified Bed Leveling ============================
1086
   //========================= Unified Bed Leveling ============================
1042
   //===========================================================================
1087
   //===========================================================================
1043
 
1088
 
1044
-  #define UBL_MESH_INSET 1          // Mesh inset margin on print area
1089
+  //#define MESH_EDIT_GFX_OVERLAY   // Display a graphics overlay while editing the mesh
1090
+
1091
+  #define MESH_INSET 1              // Mesh inset margin on print area
1045
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
1092
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
1046
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
1093
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
1047
 
1094
 
1054
   #define UBL_PROBE_PT_3_X _PX(DELTA_PROBEABLE_RADIUS, 240)
1101
   #define UBL_PROBE_PT_3_X _PX(DELTA_PROBEABLE_RADIUS, 240)
1055
   #define UBL_PROBE_PT_3_Y _PY(DELTA_PROBEABLE_RADIUS, 240)
1102
   #define UBL_PROBE_PT_3_Y _PY(DELTA_PROBEABLE_RADIUS, 240)
1056
 
1103
 
1057
-  #define UBL_G26_MESH_VALIDATION   // Enable G26 mesh validation
1058
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
1104
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
1105
+  #define UBL_SAVE_ACTIVE_ON_M500   // Save the currently active mesh in the current slot on M500
1059
 
1106
 
1060
 #elif ENABLED(MESH_BED_LEVELING)
1107
 #elif ENABLED(MESH_BED_LEVELING)
1061
 
1108
 
1115
 //#define Z_SAFE_HOMING
1162
 //#define Z_SAFE_HOMING
1116
 
1163
 
1117
 #if ENABLED(Z_SAFE_HOMING)
1164
 #if ENABLED(Z_SAFE_HOMING)
1118
-  #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2)    // X point for Z homing when homing all axis (G28).
1119
-  #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2)    // Y point for Z homing when homing all axis (G28).
1165
+  #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2)    // X point for Z homing when homing all axes (G28).
1166
+  #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2)    // Y point for Z homing when homing all axes (G28).
1120
 #endif
1167
 #endif
1121
 
1168
 
1122
 // Delta only homes to Z
1169
 // Delta only homes to Z
1123
 #define HOMING_FEEDRATE_Z  (45*60)
1170
 #define HOMING_FEEDRATE_Z  (45*60)
1124
 
1171
 
1172
+// @section calibrate
1173
+
1174
+/**
1175
+ * Bed Skew Compensation
1176
+ *
1177
+ * This feature corrects for misalignment in the XYZ axes.
1178
+ *
1179
+ * Take the following steps to get the bed skew in the XY plane:
1180
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1181
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1182
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1183
+ *  4. For XY_SIDE_AD measure the edge A to D
1184
+ *
1185
+ * Marlin automatically computes skew factors from these measurements.
1186
+ * Skew factors may also be computed and set manually:
1187
+ *
1188
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1189
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1190
+ *
1191
+ * If desired, follow the same procedure for XZ and YZ.
1192
+ * Use these diagrams for reference:
1193
+ *
1194
+ *    Y                     Z                     Z
1195
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1196
+ *    |    /       /        |    /       /        |    /       /
1197
+ *    |   /       /         |   /       /         |   /       /
1198
+ *    |  A-------D          |  A-------D          |  A-------D
1199
+ *    +-------------->X     +-------------->X     +-------------->Y
1200
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1201
+ */
1202
+//#define SKEW_CORRECTION
1203
+
1204
+#if ENABLED(SKEW_CORRECTION)
1205
+  // Input all length measurements here:
1206
+  #define XY_DIAG_AC 282.8427124746
1207
+  #define XY_DIAG_BD 282.8427124746
1208
+  #define XY_SIDE_AD 200
1209
+
1210
+  // Or, set the default skew factors directly here
1211
+  // to override the above measurements:
1212
+  #define XY_SKEW_FACTOR 0.0
1213
+
1214
+  //#define SKEW_CORRECTION_FOR_Z
1215
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1216
+    #define XZ_DIAG_AC 282.8427124746
1217
+    #define XZ_DIAG_BD 282.8427124746
1218
+    #define YZ_DIAG_AC 282.8427124746
1219
+    #define YZ_DIAG_BD 282.8427124746
1220
+    #define YZ_SIDE_AD 200
1221
+    #define XZ_SKEW_FACTOR 0.0
1222
+    #define YZ_SKEW_FACTOR 0.0
1223
+  #endif
1224
+
1225
+  // Enable this option for M852 to set skew at runtime
1226
+  //#define SKEW_CORRECTION_GCODE
1227
+#endif
1228
+
1125
 //=============================================================================
1229
 //=============================================================================
1126
 //============================= Additional Features ===========================
1230
 //============================= Additional Features ===========================
1127
 //=============================================================================
1231
 //=============================================================================
1153
 //
1257
 //
1154
 // M100 Free Memory Watcher
1258
 // M100 Free Memory Watcher
1155
 //
1259
 //
1156
-//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
1260
+//#define M100_FREE_MEMORY_WATCHER    // Add M100 (Free Memory Watcher) to debug memory usage
1157
 
1261
 
1158
 //
1262
 //
1159
 // G20/G21 Inch mode support
1263
 // G20/G21 Inch mode support
1298
  *
1402
  *
1299
  * Select the language to display on the LCD. These languages are available:
1403
  * Select the language to display on the LCD. These languages are available:
1300
  *
1404
  *
1301
- *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, gl, hr,
1302
- *    it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1405
+ *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, fr_utf8, gl,
1406
+ *    hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1303
  *    tr, uk, zh_CN, zh_TW, test
1407
  *    tr, uk, zh_CN, zh_TW, test
1304
  *
1408
  *
1305
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1409
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1306
  */
1410
  */
1307
 #define LCD_LANGUAGE en
1411
 #define LCD_LANGUAGE en
1308
 
1412
 
1430
 // Note: Test audio output with the G-Code:
1534
 // Note: Test audio output with the G-Code:
1431
 //  M300 S<frequency Hz> P<duration ms>
1535
 //  M300 S<frequency Hz> P<duration ms>
1432
 //
1536
 //
1433
-//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
1434
-//#define LCD_FEEDBACK_FREQUENCY_HZ 1000
1537
+//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
1538
+//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
1435
 
1539
 
1436
 //
1540
 //
1437
 // CONTROLLER TYPE: Standard
1541
 // CONTROLLER TYPE: Standard
1539
 //#define CARTESIO_UI
1643
 //#define CARTESIO_UI
1540
 
1644
 
1541
 //
1645
 //
1542
-// ANET_10 Controller supported displays.
1646
+// ANET and Tronxy Controller supported displays.
1543
 //
1647
 //
1544
-//#define ANET_KEYPAD_LCD         // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1648
+//#define ZONESTAR_LCD            // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1545
                                   // This LCD is known to be susceptible to electrical interference
1649
                                   // This LCD is known to be susceptible to electrical interference
1546
                                   // which scrambles the display.  Pressing any button clears it up.
1650
                                   // which scrambles the display.  Pressing any button clears it up.
1651
+                                  // This is a LCD2004 display with 5 analog buttons.
1652
+
1547
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1653
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1548
                                   // A clone of the RepRapDiscount full graphics display but with
1654
                                   // A clone of the RepRapDiscount full graphics display but with
1549
                                   // different pins/wiring (see pins_ANET_10.h).
1655
                                   // different pins/wiring (see pins_ANET_10.h).
1653
 //
1759
 //
1654
 //#define MKS_12864OLED
1760
 //#define MKS_12864OLED
1655
 
1761
 
1762
+// Silvergate GLCD controller
1763
+// http://github.com/android444/Silvergate
1764
+//
1765
+//#define SILVER_GATE_GLCD_CONTROLLER
1766
+
1656
 //=============================================================================
1767
 //=============================================================================
1657
 //=============================== Extra Features ==============================
1768
 //=============================== Extra Features ==============================
1658
 //=============================================================================
1769
 //=============================================================================
1709
  * Adds the M150 command to set the LED (or LED strip) color.
1820
  * Adds the M150 command to set the LED (or LED strip) color.
1710
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1821
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1711
  * luminance values can be set from 0 to 255.
1822
  * luminance values can be set from 0 to 255.
1712
- * For Neopixel LED overall brightness parameters is also available 
1823
+ * For Neopixel LED an overall brightness parameter is also available.
1713
  *
1824
  *
1714
  * *** CAUTION ***
1825
  * *** CAUTION ***
1715
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1826
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1716
  *  as the Arduino cannot handle the current the LEDs will require.
1827
  *  as the Arduino cannot handle the current the LEDs will require.
1717
  *  Failure to follow this precaution can destroy your Arduino!
1828
  *  Failure to follow this precaution can destroy your Arduino!
1718
- *  The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
1719
- *  cannot handle such current, separate 5V power supply must be used
1829
+ *  NOTE: A separate 5V power supply is required! The Neopixel LED needs
1830
+ *  more current than the Arduino 5V linear regulator can produce.
1720
  * *** CAUTION ***
1831
  * *** CAUTION ***
1721
  *
1832
  *
1722
- * LED type. This options are mutualy exclusive. Uncomment only one.
1833
+ * LED Type. Enable only one of the following two options.
1723
  *
1834
  *
1724
  */
1835
  */
1725
 //#define RGB_LED
1836
 //#define RGB_LED
1735
 // Support for Adafruit Neopixel LED driver
1846
 // Support for Adafruit Neopixel LED driver
1736
 //#define NEOPIXEL_LED
1847
 //#define NEOPIXEL_LED
1737
 #if ENABLED(NEOPIXEL_LED)
1848
 #if ENABLED(NEOPIXEL_LED)
1738
-  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
1849
+  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
1739
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1850
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1740
-  #define NEOPIXEL_PIXELS 30       // Number of LEDs on strip
1741
-  #define NEOPIXEL_IS_SEQUENTIAL   // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
1742
-  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness 0-255
1851
+  #define NEOPIXEL_PIXELS 30       // Number of LEDs in the strip
1852
+  #define NEOPIXEL_IS_SEQUENTIAL   // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
1853
+  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness (0-255)
1743
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1854
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1744
 #endif
1855
 #endif
1745
 
1856
 
1754
  *  - Change to green once print has finished
1865
  *  - Change to green once print has finished
1755
  *  - Turn off after the print has finished and the user has pushed a button
1866
  *  - Turn off after the print has finished and the user has pushed a button
1756
  */
1867
  */
1757
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED)
1868
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
1758
   #define PRINTER_EVENT_LEDS
1869
   #define PRINTER_EVENT_LEDS
1759
 #endif
1870
 #endif
1760
 
1871
 
1761
-/*********************************************************************\
1762
-* R/C SERVO support
1763
-* Sponsored by TrinityLabs, Reworked by codexmas
1764
-**********************************************************************/
1872
+/**
1873
+ * R/C SERVO support
1874
+ * Sponsored by TrinityLabs, Reworked by codexmas
1875
+ */
1765
 
1876
 
1766
-// Number of servos
1767
-//
1768
-// If you select a configuration below, this will receive a default value and does not need to be set manually
1769
-// set it manually if you have more servos than extruders and wish to manually control some
1770
-// leaving it undefined or defining as 0 will disable the servo subsystem
1771
-// If unsure, leave commented / disabled
1772
-//
1877
+/**
1878
+ * Number of servos
1879
+ *
1880
+ * For some servo-related options NUM_SERVOS will be set automatically.
1881
+ * Set this manually if there are extra servos needing manual control.
1882
+ * Leave undefined or set to 0 to entirely disable the servo subsystem.
1883
+ */
1773
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1884
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1774
 
1885
 
1775
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1886
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1782
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1893
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1783
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1894
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1784
 
1895
 
1785
-/**
1786
- * Filament Width Sensor
1787
- *
1788
- * Measures the filament width in real-time and adjusts
1789
- * flow rate to compensate for any irregularities.
1790
- *
1791
- * Also allows the measured filament diameter to set the
1792
- * extrusion rate, so the slicer only has to specify the
1793
- * volume.
1794
- *
1795
- * Only a single extruder is supported at this time.
1796
- *
1797
- *  34 RAMPS_14    : Analog input 5 on the AUX2 connector
1798
- *  81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
1799
- * 301 RAMBO       : Analog input 3
1800
- *
1801
- * Note: May require analog pins to be defined for other boards.
1802
- */
1803
-//#define FILAMENT_WIDTH_SENSOR
1804
-
1805
-#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75   // (mm) Diameter of the filament generally used (3.0 or 1.75mm), also used in the slicer. Used to validate sensor reading.
1806
-
1807
-#if ENABLED(FILAMENT_WIDTH_SENSOR)
1808
-  #define FILAMENT_SENSOR_EXTRUDER_NUM 0    // Index of the extruder that has the filament sensor (0,1,2,3)
1809
-  #define MEASUREMENT_DELAY_CM        14    // (cm) The distance from the filament sensor to the melting chamber
1810
-
1811
-  #define MEASURED_UPPER_LIMIT         3.30 // (mm) Upper limit used to validate sensor reading
1812
-  #define MEASURED_LOWER_LIMIT         1.90 // (mm) Lower limit used to validate sensor reading
1813
-  #define MAX_MEASUREMENT_DELAY       20    // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
1814
-
1815
-  #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
1816
-
1817
-  // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
1818
-  //#define FILAMENT_LCD_DISPLAY
1819
-#endif
1820
-
1821
 #endif // CONFIGURATION_H
1896
 #endif // CONFIGURATION_H

+ 268
- 125
Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h Переглянути файл

32
  */
32
  */
33
 #ifndef CONFIGURATION_ADV_H
33
 #ifndef CONFIGURATION_ADV_H
34
 #define CONFIGURATION_ADV_H
34
 #define CONFIGURATION_ADV_H
35
-#define CONFIGURATION_ADV_H_VERSION 010100
35
+#define CONFIGURATION_ADV_H_VERSION 010107
36
 
36
 
37
 // @section temperature
37
 // @section temperature
38
 
38
 
48
 #endif
48
 #endif
49
 
49
 
50
 /**
50
 /**
51
- * Thermal Protection protects your printer from damage and fire if a
52
- * thermistor falls out or temperature sensors fail in any way.
51
+ * Thermal Protection provides additional protection to your printer from damage
52
+ * and fire. Marlin always includes safe min and max temperature ranges which
53
+ * protect against a broken or disconnected thermistor wire.
53
  *
54
  *
54
- * The issue: If a thermistor falls out or a temperature sensor fails,
55
- * Marlin can no longer sense the actual temperature. Since a disconnected
56
- * thermistor reads as a low temperature, the firmware will keep the heater on.
55
+ * The issue: If a thermistor falls out, it will report the much lower
56
+ * temperature of the air in the room, and the the firmware will keep
57
+ * the heater on.
57
  *
58
  *
58
  * The solution: Once the temperature reaches the target, start observing.
59
  * The solution: Once the temperature reaches the target, start observing.
59
- * If the temperature stays too far below the target (hysteresis) for too long (period),
60
- * the firmware will halt the machine as a safety precaution.
60
+ * If the temperature stays too far below the target (hysteresis) for too
61
+ * long (period), the firmware will halt the machine as a safety precaution.
61
  *
62
  *
62
- * If you get false positives for "Thermal Runaway" increase THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
63
+ * If you get false positives for "Thermal Runaway", increase
64
+ * THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
63
  */
65
  */
64
 #if ENABLED(THERMAL_PROTECTION_HOTENDS)
66
 #if ENABLED(THERMAL_PROTECTION_HOTENDS)
65
   #define THERMAL_PROTECTION_PERIOD 40        // Seconds
67
   #define THERMAL_PROTECTION_PERIOD 40        // Seconds
66
   #define THERMAL_PROTECTION_HYSTERESIS 4     // Degrees Celsius
68
   #define THERMAL_PROTECTION_HYSTERESIS 4     // Degrees Celsius
67
 
69
 
68
   /**
70
   /**
69
-   * Whenever an M104 or M109 increases the target temperature the firmware will wait for the
70
-   * WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
71
-   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
72
-   * but only if the current temperature is far enough below the target for a reliable test.
71
+   * Whenever an M104, M109, or M303 increases the target temperature, the
72
+   * firmware will wait for the WATCH_TEMP_PERIOD to expire. If the temperature
73
+   * hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted and
74
+   * requires a hard reset. This test restarts with any M104/M109/M303, but only
75
+   * if the current temperature is far enough below the target for a reliable
76
+   * test.
73
    *
77
    *
74
-   * If you get false positives for "Heating failed" increase WATCH_TEMP_PERIOD and/or decrease WATCH_TEMP_INCREASE
75
-   * WATCH_TEMP_INCREASE should not be below 2.
78
+   * If you get false positives for "Heating failed", increase WATCH_TEMP_PERIOD
79
+   * and/or decrease WATCH_TEMP_INCREASE. WATCH_TEMP_INCREASE should not be set
80
+   * below 2.
76
    */
81
    */
77
   #define WATCH_TEMP_PERIOD 20                // Seconds
82
   #define WATCH_TEMP_PERIOD 20                // Seconds
78
   #define WATCH_TEMP_INCREASE 2               // Degrees Celsius
83
   #define WATCH_TEMP_INCREASE 2               // Degrees Celsius
86
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
91
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
87
 
92
 
88
   /**
93
   /**
89
-   * Whenever an M140 or M190 increases the target temperature the firmware will wait for the
90
-   * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE
91
-   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190,
92
-   * but only if the current temperature is far enough below the target for a reliable test.
93
-   *
94
-   * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease
95
-   * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.)
94
+   * As described above, except for the bed (M140/M190/M303).
96
    */
95
    */
97
   #define WATCH_BED_TEMP_PERIOD 60                // Seconds
96
   #define WATCH_BED_TEMP_PERIOD 60                // Seconds
98
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
97
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
123
   #define AUTOTEMP_OLDWEIGHT 0.98
122
   #define AUTOTEMP_OLDWEIGHT 0.98
124
 #endif
123
 #endif
125
 
124
 
125
+// Show extra position information in M114
126
+//#define M114_DETAIL
127
+
126
 // Show Temperature ADC value
128
 // Show Temperature ADC value
127
 // Enable for M105 to include ADC values read from temperature sensors.
129
 // Enable for M105 to include ADC values read from temperature sensors.
128
 //#define SHOW_TEMP_ADC_VALUES
130
 //#define SHOW_TEMP_ADC_VALUES
257
 
259
 
258
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
260
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
259
 
261
 
260
-// Dual X Steppers
261
-// Uncomment this option to drive two X axis motors.
262
-// The next unused E driver will be assigned to the second X stepper.
262
+/**
263
+ * Dual Steppers / Dual Endstops
264
+ *
265
+ * This section will allow you to use extra E drivers to drive a second motor for X, Y, or Z axes.
266
+ *
267
+ * For example, set X_DUAL_STEPPER_DRIVERS setting to use a second motor. If the motors need to
268
+ * spin in opposite directions set INVERT_X2_VS_X_DIR. If the second motor needs its own endstop
269
+ * set X_DUAL_ENDSTOPS. This can adjust for "racking." Use X2_USE_ENDSTOP to set the endstop plug
270
+ * that should be used for the second endstop. Extra endstops will appear in the output of 'M119'.
271
+ *
272
+ * Use X_DUAL_ENDSTOP_ADJUSTMENT to adjust for mechanical imperfection. After homing both motors
273
+ * this offset is applied to the X2 motor. To find the offset home the X axis, and measure the error
274
+ * in X2. Dual endstop offsets can be set at runtime with 'M666 X<offset> Y<offset> Z<offset>'.
275
+ */
276
+
263
 //#define X_DUAL_STEPPER_DRIVERS
277
 //#define X_DUAL_STEPPER_DRIVERS
264
 #if ENABLED(X_DUAL_STEPPER_DRIVERS)
278
 #if ENABLED(X_DUAL_STEPPER_DRIVERS)
265
-  // Set true if the two X motors need to rotate in opposite directions
266
-  #define INVERT_X2_VS_X_DIR true
279
+  #define INVERT_X2_VS_X_DIR true   // Set 'true' if X motors should rotate in opposite directions
280
+  //#define X_DUAL_ENDSTOPS
281
+  #if ENABLED(X_DUAL_ENDSTOPS)
282
+    #define X2_USE_ENDSTOP _XMAX_
283
+    #define X_DUAL_ENDSTOPS_ADJUSTMENT  0
284
+  #endif
267
 #endif
285
 #endif
268
 
286
 
269
-// Dual Y Steppers
270
-// Uncomment this option to drive two Y axis motors.
271
-// The next unused E driver will be assigned to the second Y stepper.
272
 //#define Y_DUAL_STEPPER_DRIVERS
287
 //#define Y_DUAL_STEPPER_DRIVERS
273
 #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
288
 #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
274
-  // Set true if the two Y motors need to rotate in opposite directions
275
-  #define INVERT_Y2_VS_Y_DIR true
289
+  #define INVERT_Y2_VS_Y_DIR true   // Set 'true' if Y motors should rotate in opposite directions
290
+  //#define Y_DUAL_ENDSTOPS
291
+  #if ENABLED(Y_DUAL_ENDSTOPS)
292
+    #define Y2_USE_ENDSTOP _YMAX_
293
+    #define Y_DUAL_ENDSTOPS_ADJUSTMENT  0
294
+  #endif
276
 #endif
295
 #endif
277
 
296
 
278
-// A single Z stepper driver is usually used to drive 2 stepper motors.
279
-// Uncomment this option to use a separate stepper driver for each Z axis motor.
280
-// The next unused E driver will be assigned to the second Z stepper.
281
 //#define Z_DUAL_STEPPER_DRIVERS
297
 //#define Z_DUAL_STEPPER_DRIVERS
282
-
283
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
298
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
284
-
285
-  // Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper.
286
-  // That way the machine is capable to align the bed during home, since both Z steppers are homed.
287
-  // There is also an implementation of M666 (software endstops adjustment) to this feature.
288
-  // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed.
289
-  // One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2.
290
-  // If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive.
291
-  // Play a little bit with small adjustments (0.5mm) and check the behaviour.
292
-  // The M119 (endstops report) will start reporting the Z2 Endstop as well.
293
-
294
   //#define Z_DUAL_ENDSTOPS
299
   //#define Z_DUAL_ENDSTOPS
295
-
296
   #if ENABLED(Z_DUAL_ENDSTOPS)
300
   #if ENABLED(Z_DUAL_ENDSTOPS)
297
     #define Z2_USE_ENDSTOP _XMAX_
301
     #define Z2_USE_ENDSTOP _XMAX_
298
-    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0  // Use M666 to determine/test this value
302
+    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0
299
   #endif
303
   #endif
300
-
301
-#endif // Z_DUAL_STEPPER_DRIVERS
304
+#endif
302
 
305
 
303
 // Enable this for dual x-carriage printers.
306
 // Enable this for dual x-carriage printers.
304
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
307
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
345
 
348
 
346
 // @section homing
349
 // @section homing
347
 
350
 
348
-//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
351
+// Homing hits each endstop, retracts by these distances, then does a slower bump.
349
 #define X_HOME_BUMP_MM 5
352
 #define X_HOME_BUMP_MM 5
350
 #define Y_HOME_BUMP_MM 5
353
 #define Y_HOME_BUMP_MM 5
351
 #define Z_HOME_BUMP_MM 5 // deltas need the same for all three axes
354
 #define Z_HOME_BUMP_MM 5 // deltas need the same for all three axes
352
-#define HOMING_BUMP_DIVISOR {10, 10, 10}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
353
-//#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
355
+#define HOMING_BUMP_DIVISOR { 10, 10, 10 }  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
356
+//#define QUICK_HOME                     // If homing includes X and Y, do a diagonal move initially
354
 
357
 
355
 // When G28 is called, this option will make Y home before X
358
 // When G28 is called, this option will make Y home before X
356
 //#define HOME_Y_BEFORE_X
359
 //#define HOME_Y_BEFORE_X
436
 //#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 }   // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
439
 //#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 }   // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
437
 //#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 }    // Default drive percent - X, Y, Z, E axis
440
 //#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 }    // Default drive percent - X, Y, Z, E axis
438
 
441
 
439
-// Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
442
+// Use an I2C based DIGIPOT (e.g., Azteeg X3 Pro)
440
 //#define DIGIPOT_I2C
443
 //#define DIGIPOT_I2C
444
+#if ENABLED(DIGIPOT_I2C) && !defined(DIGIPOT_I2C_ADDRESS_A)
445
+  /**
446
+   * Common slave addresses:
447
+   *
448
+   *                    A   (A shifted)   B   (B shifted)  IC
449
+   * Smoothie          0x2C (0x58)       0x2D (0x5A)       MCP4451
450
+   * AZTEEG_X3_PRO     0x2C (0x58)       0x2E (0x5C)       MCP4451
451
+   * MIGHTYBOARD_REVE  0x2F (0x5E)                         MCP4018
452
+   */
453
+  #define DIGIPOT_I2C_ADDRESS_A 0x2C  // unshifted slave address for first DIGIPOT
454
+  #define DIGIPOT_I2C_ADDRESS_B 0x2D  // unshifted slave address for second DIGIPOT
455
+#endif
456
+
441
 //#define DIGIPOT_MCP4018          // Requires library from https://github.com/stawel/SlowSoftI2CMaster
457
 //#define DIGIPOT_MCP4018          // Requires library from https://github.com/stawel/SlowSoftI2CMaster
442
 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4     AZTEEG_X3_PRO: 8
458
 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4     AZTEEG_X3_PRO: 8
443
 // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
459
 // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
468
 // The timeout (in ms) to return to the status screen from sub-menus
484
 // The timeout (in ms) to return to the status screen from sub-menus
469
 //#define LCD_TIMEOUT_TO_STATUS 15000
485
 //#define LCD_TIMEOUT_TO_STATUS 15000
470
 
486
 
487
+/**
488
+ * LED Control Menu
489
+ * Enable this feature to add LED Control to the LCD menu
490
+ */
491
+//#define LED_CONTROL_MENU
492
+#if ENABLED(LED_CONTROL_MENU)
493
+  #define LED_COLOR_PRESETS                 // Enable the Preset Color menu option
494
+  #if ENABLED(LED_COLOR_PRESETS)
495
+    #define LED_USER_PRESET_RED        255  // User defined RED value
496
+    #define LED_USER_PRESET_GREEN      128  // User defined GREEN value
497
+    #define LED_USER_PRESET_BLUE         0  // User defined BLUE value
498
+    #define LED_USER_PRESET_WHITE      255  // User defined WHITE value
499
+    #define LED_USER_PRESET_BRIGHTNESS 255  // User defined intensity
500
+    //#define LED_USER_PRESET_STARTUP       // Have the printer display the user preset color on startup
501
+  #endif
502
+#endif // LED_CONTROL_MENU
503
+
471
 #if ENABLED(SDSUPPORT)
504
 #if ENABLED(SDSUPPORT)
472
 
505
 
473
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
506
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
477
   // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
510
   // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
478
   #define SD_DETECT_INVERTED
511
   #define SD_DETECT_INVERTED
479
 
512
 
480
-  #define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
513
+  #define SD_FINISHED_STEPPERRELEASE true          // Disable steppers when SD Print is finished
481
   #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
514
   #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
482
 
515
 
483
-  #define SDCARD_RATHERRECENTFIRST  //reverse file order of sd card menu display. Its sorted practically after the file system block order.
484
-  // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that.
485
-  // using:
516
+  // Reverse SD sort to show "more recent" files first, according to the card's FAT.
517
+  // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended.
518
+  #define SDCARD_RATHERRECENTFIRST
519
+
520
+  // Add an option in the menu to run all auto#.g files
486
   //#define MENU_ADDAUTOSTART
521
   //#define MENU_ADDAUTOSTART
487
 
522
 
488
   /**
523
   /**
519
     #define SDSORT_USES_STACK  false  // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
554
     #define SDSORT_USES_STACK  false  // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
520
     #define SDSORT_CACHE_NAMES false  // Keep sorted items in RAM longer for speedy performance. Most expensive option.
555
     #define SDSORT_CACHE_NAMES false  // Keep sorted items in RAM longer for speedy performance. Most expensive option.
521
     #define SDSORT_DYNAMIC_RAM false  // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
556
     #define SDSORT_DYNAMIC_RAM false  // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
557
+    #define SDSORT_CACHE_VFATS 2      // Maximum number of 13-byte VFAT entries to use for sorting.
558
+                                      // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM.
522
   #endif
559
   #endif
523
 
560
 
524
   // Show a progress bar on HD44780 LCDs for SD printing
561
   // Show a progress bar on HD44780 LCDs for SD printing
537
     //#define LCD_PROGRESS_BAR_TEST
574
     //#define LCD_PROGRESS_BAR_TEST
538
   #endif
575
   #endif
539
 
576
 
577
+  // Add an 'M73' G-code to set the current percentage
578
+  //#define LCD_SET_PROGRESS_MANUALLY
579
+
540
   // This allows hosts to request long names for files and folders with M33
580
   // This allows hosts to request long names for files and folders with M33
541
   //#define LONG_FILENAME_HOST_SUPPORT
581
   //#define LONG_FILENAME_HOST_SUPPORT
542
 
582
 
543
-  // This option allows you to abort SD printing when any endstop is triggered.
544
-  // This feature must be enabled with "M540 S1" or from the LCD menu.
545
-  // To have any effect, endstops must be enabled during SD printing.
583
+  // Enable this option to scroll long filenames in the SD card menu
584
+  //#define SCROLL_LONG_FILENAMES
585
+
586
+  /**
587
+   * This option allows you to abort SD printing when any endstop is triggered.
588
+   * This feature must be enabled with "M540 S1" or from the LCD menu.
589
+   * To have any effect, endstops must be enabled during SD printing.
590
+   */
546
   //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
591
   //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
547
 
592
 
593
+  /**
594
+   * This option makes it easier to print the same SD Card file again.
595
+   * On print completion the LCD Menu will open with the file selected.
596
+   * You can just click to start the print, or navigate elsewhere.
597
+   */
598
+  //#define SD_REPRINT_LAST_SELECTED_FILE
599
+
548
 #endif // SDSUPPORT
600
 #endif // SDSUPPORT
549
 
601
 
550
 /**
602
 /**
577
   // Enable this option and reduce the value to optimize screen updates.
629
   // Enable this option and reduce the value to optimize screen updates.
578
   // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
630
   // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
579
   //#define DOGM_SPI_DELAY_US 5
631
   //#define DOGM_SPI_DELAY_US 5
632
+
633
+  // Swap the CW/CCW indicators in the graphics overlay
634
+  //#define OVERLAY_GFX_REVERSE
635
+
580
 #endif // DOGLCD
636
 #endif // DOGLCD
581
 
637
 
582
 // @section safety
638
 // @section safety
605
 #if ENABLED(BABYSTEPPING)
661
 #if ENABLED(BABYSTEPPING)
606
   //#define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
662
   //#define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
607
   #define BABYSTEP_INVERT_Z false    // Change if Z babysteps should go the other way
663
   #define BABYSTEP_INVERT_Z false    // Change if Z babysteps should go the other way
608
-  #define BABYSTEP_MULTIPLICATOR 100 // Babysteps are very small. Increase for faster motion.
664
+  #define BABYSTEP_MULTIPLICATOR 1   // Babysteps are very small. Increase for faster motion.
609
   //#define BABYSTEP_ZPROBE_OFFSET   // Enable to combine M851 and Babystepping
665
   //#define BABYSTEP_ZPROBE_OFFSET   // Enable to combine M851 and Babystepping
610
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
666
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
611
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
667
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
612
                                         // Note: Extra time may be added to mitigate controller latency.
668
                                         // Note: Extra time may be added to mitigate controller latency.
613
   //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
669
   //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
614
-  //#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators
615
 #endif
670
 #endif
616
 
671
 
617
 // @section extruder
672
 // @section extruder
658
 
713
 
659
 // @section leveling
714
 // @section leveling
660
 
715
 
661
-// Default mesh area is an area with an inset margin on the print area.
662
-// Below are the macros that are used to define the borders for the mesh area,
663
-// made available here for specialized needs, ie dual extruder setup.
664
-#if ENABLED(MESH_BED_LEVELING)
665
-  #define MESH_MIN_X MESH_INSET
666
-  #define MESH_MAX_X (X_BED_SIZE - (MESH_INSET))
667
-  #define MESH_MIN_Y MESH_INSET
668
-  #define MESH_MAX_Y (Y_BED_SIZE - (MESH_INSET))
669
-#elif ENABLED(AUTO_BED_LEVELING_UBL)
670
-  #define UBL_MESH_MIN_X UBL_MESH_INSET
671
-  #define UBL_MESH_MAX_X (X_BED_SIZE - (UBL_MESH_INSET))
672
-  #define UBL_MESH_MIN_Y UBL_MESH_INSET
673
-  #define UBL_MESH_MAX_Y (Y_BED_SIZE - (UBL_MESH_INSET))
674
-
675
-  // If this is defined, the currently active mesh will be saved in the
676
-  // current slot on M500.
677
-  #define UBL_SAVE_ACTIVE_ON_M500
716
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
717
+  #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
718
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
719
+  #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
720
+#endif
721
+
722
+#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL)
723
+  // Override the mesh area if the automatic (max) area is too large
724
+  //#define MESH_MIN_X MESH_INSET
725
+  //#define MESH_MIN_Y MESH_INSET
726
+  //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET)
727
+  //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
678
 #endif
728
 #endif
679
 
729
 
680
 // @section extras
730
 // @section extras
694
 //#define BEZIER_CURVE_SUPPORT
744
 //#define BEZIER_CURVE_SUPPORT
695
 
745
 
696
 // G38.2 and G38.3 Probe Target
746
 // G38.2 and G38.3 Probe Target
697
-// Enable PROBE_DOUBLE_TOUCH if you want G38 to double touch
747
+// Set MULTIPLE_PROBING if you want G38 to double touch
698
 //#define G38_PROBE_TARGET
748
 //#define G38_PROBE_TARGET
699
 #if ENABLED(G38_PROBE_TARGET)
749
 #if ENABLED(G38_PROBE_TARGET)
700
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
750
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
719
 // @section hidden
769
 // @section hidden
720
 
770
 
721
 // The number of linear motions that can be in the plan at any give time.
771
 // The number of linear motions that can be in the plan at any give time.
722
-// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2, i.g. 8,16,32 because shifts and ors are used to do the ring-buffering.
772
+// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2 (e.g. 8, 16, 32) because shifts and ors are used to do the ring-buffering.
723
 #if ENABLED(SDSUPPORT)
773
 #if ENABLED(SDSUPPORT)
724
   #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
774
   #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
725
 #else
775
 #else
810
 #endif
860
 #endif
811
 
861
 
812
 /**
862
 /**
863
+ * Extra Fan Speed
864
+ * Adds a secondary fan speed for each print-cooling fan.
865
+ *   'M106 P<fan> T3-255' : Set a secondary speed for <fan>
866
+ *   'M106 P<fan> T2'     : Use the set secondary speed
867
+ *   'M106 P<fan> T1'     : Restore the previous fan speed
868
+ */
869
+//#define EXTRA_FAN_SPEED
870
+
871
+/**
813
  * Advanced Pause
872
  * Advanced Pause
814
  * Experimental feature for filament change support and for parking the nozzle when paused.
873
  * Experimental feature for filament change support and for parking the nozzle when paused.
815
  * Adds the GCode M600 for initiating filament change.
874
  * Adds the GCode M600 for initiating filament change.
919
 
978
 
920
 #endif
979
 #endif
921
 
980
 
922
-// @section TMC2130
981
+// @section TMC2130, TMC2208
923
 
982
 
924
 /**
983
 /**
925
  * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
984
  * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
933
  */
992
  */
934
 //#define HAVE_TMC2130
993
 //#define HAVE_TMC2130
935
 
994
 
936
-#if ENABLED(HAVE_TMC2130)
995
+/**
996
+ * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
997
+ * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin.
998
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN
999
+ * to #_SERIAL_TX_PIN with a 1K resistor.
1000
+ * The drivers can also be used with hardware serial.
1001
+ *
1002
+ * You'll also need the TMC2208Stepper Arduino library
1003
+ * (https://github.com/teemuatlut/TMC2208Stepper).
1004
+ */
1005
+//#define HAVE_TMC2208
1006
+
1007
+#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
937
 
1008
 
938
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
1009
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
939
   //#define X_IS_TMC2130
1010
   //#define X_IS_TMC2130
948
   //#define E3_IS_TMC2130
1019
   //#define E3_IS_TMC2130
949
   //#define E4_IS_TMC2130
1020
   //#define E4_IS_TMC2130
950
 
1021
 
1022
+  //#define X_IS_TMC2208
1023
+  //#define X2_IS_TMC2208
1024
+  //#define Y_IS_TMC2208
1025
+  //#define Y2_IS_TMC2208
1026
+  //#define Z_IS_TMC2208
1027
+  //#define Z2_IS_TMC2208
1028
+  //#define E0_IS_TMC2208
1029
+  //#define E1_IS_TMC2208
1030
+  //#define E2_IS_TMC2208
1031
+  //#define E3_IS_TMC2208
1032
+  //#define E4_IS_TMC2208
1033
+
951
   /**
1034
   /**
952
    * Stepper driver settings
1035
    * Stepper driver settings
953
    */
1036
    */
954
 
1037
 
955
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1038
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
956
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1039
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
957
-  #define INTERPOLATE          1  // Interpolate X/Y/Z_MICROSTEPS to 256
1040
+  #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
958
 
1041
 
959
-  #define X_CURRENT         1000  // rms current in mA. Multiply by 1.41 for peak current.
1042
+  #define X_CURRENT          800  // rms current in mA. Multiply by 1.41 for peak current.
960
   #define X_MICROSTEPS        16  // 0..256
1043
   #define X_MICROSTEPS        16  // 0..256
961
 
1044
 
962
-  #define Y_CURRENT         1000
1045
+  #define Y_CURRENT          800
963
   #define Y_MICROSTEPS        16
1046
   #define Y_MICROSTEPS        16
964
 
1047
 
965
-  #define Z_CURRENT         1000
1048
+  #define Z_CURRENT          800
966
   #define Z_MICROSTEPS        16
1049
   #define Z_MICROSTEPS        16
967
 
1050
 
968
-  //#define X2_CURRENT      1000
969
-  //#define X2_MICROSTEPS     16
1051
+  #define X2_CURRENT         800
1052
+  #define X2_MICROSTEPS       16
970
 
1053
 
971
-  //#define Y2_CURRENT      1000
972
-  //#define Y2_MICROSTEPS     16
1054
+  #define Y2_CURRENT         800
1055
+  #define Y2_MICROSTEPS       16
973
 
1056
 
974
-  //#define Z2_CURRENT      1000
975
-  //#define Z2_MICROSTEPS     16
1057
+  #define Z2_CURRENT         800
1058
+  #define Z2_MICROSTEPS       16
976
 
1059
 
977
-  //#define E0_CURRENT      1000
978
-  //#define E0_MICROSTEPS     16
1060
+  #define E0_CURRENT         800
1061
+  #define E0_MICROSTEPS       16
979
 
1062
 
980
-  //#define E1_CURRENT      1000
981
-  //#define E1_MICROSTEPS     16
1063
+  #define E1_CURRENT         800
1064
+  #define E1_MICROSTEPS       16
982
 
1065
 
983
-  //#define E2_CURRENT      1000
984
-  //#define E2_MICROSTEPS     16
1066
+  #define E2_CURRENT         800
1067
+  #define E2_MICROSTEPS       16
985
 
1068
 
986
-  //#define E3_CURRENT      1000
987
-  //#define E3_MICROSTEPS     16
1069
+  #define E3_CURRENT         800
1070
+  #define E3_MICROSTEPS       16
988
 
1071
 
989
-  //#define E4_CURRENT      1000
990
-  //#define E4_MICROSTEPS     16
1072
+  #define E4_CURRENT         800
1073
+  #define E4_MICROSTEPS       16
991
 
1074
 
992
   /**
1075
   /**
993
    * Use Trinamic's ultra quiet stepping mode.
1076
    * Use Trinamic's ultra quiet stepping mode.
996
   #define STEALTHCHOP
1079
   #define STEALTHCHOP
997
 
1080
 
998
   /**
1081
   /**
999
-   * Let Marlin automatically control stepper current.
1000
-   * This is still an experimental feature.
1001
-   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
1002
-   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
1003
-   * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX
1082
+   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1083
+   * like overtemperature and short to ground. TMC2208 requires hardware serial.
1084
+   * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1085
+   * Other detected conditions can be used to stop the current print.
1004
    * Relevant g-codes:
1086
    * Relevant g-codes:
1005
    * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
1087
    * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
1006
-   * M906 S1 - Start adjusting current
1007
-   * M906 S0 - Stop adjusting current
1008
    * M911 - Report stepper driver overtemperature pre-warn condition.
1088
    * M911 - Report stepper driver overtemperature pre-warn condition.
1009
    * M912 - Clear stepper driver overtemperature pre-warn condition flag.
1089
    * M912 - Clear stepper driver overtemperature pre-warn condition flag.
1090
+   * M122 S0/1 - Report driver parameters (Requires TMC_DEBUG)
1010
    */
1091
    */
1011
-  //#define AUTOMATIC_CURRENT_CONTROL
1092
+  //#define MONITOR_DRIVER_STATUS
1012
 
1093
 
1013
-  #if ENABLED(AUTOMATIC_CURRENT_CONTROL)
1014
-    #define CURRENT_STEP          50  // [mA]
1015
-    #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
1094
+  #if ENABLED(MONITOR_DRIVER_STATUS)
1095
+    #define CURRENT_STEP_DOWN     50  // [mA]
1016
     #define REPORT_CURRENT_CHANGE
1096
     #define REPORT_CURRENT_CHANGE
1097
+    #define STOP_ON_ERROR
1017
   #endif
1098
   #endif
1018
 
1099
 
1019
   /**
1100
   /**
1028
   #define X2_HYBRID_THRESHOLD    100
1109
   #define X2_HYBRID_THRESHOLD    100
1029
   #define Y_HYBRID_THRESHOLD     100
1110
   #define Y_HYBRID_THRESHOLD     100
1030
   #define Y2_HYBRID_THRESHOLD    100
1111
   #define Y2_HYBRID_THRESHOLD    100
1031
-  #define Z_HYBRID_THRESHOLD       4
1032
-  #define Z2_HYBRID_THRESHOLD      4
1112
+  #define Z_HYBRID_THRESHOLD       3
1113
+  #define Z2_HYBRID_THRESHOLD      3
1033
   #define E0_HYBRID_THRESHOLD     30
1114
   #define E0_HYBRID_THRESHOLD     30
1034
   #define E1_HYBRID_THRESHOLD     30
1115
   #define E1_HYBRID_THRESHOLD     30
1035
   #define E2_HYBRID_THRESHOLD     30
1116
   #define E2_HYBRID_THRESHOLD     30
1039
   /**
1120
   /**
1040
    * Use stallGuard2 to sense an obstacle and trigger an endstop.
1121
    * Use stallGuard2 to sense an obstacle and trigger an endstop.
1041
    * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
1122
    * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
1042
-   * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal.
1123
+   * X and Y homing will always be done in spreadCycle mode.
1043
    *
1124
    *
1044
    * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
1125
    * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
1045
    * Higher values make the system LESS sensitive.
1126
    * Higher values make the system LESS sensitive.
1048
    * It is advised to set X/Y_HOME_BUMP_MM to 0.
1129
    * It is advised to set X/Y_HOME_BUMP_MM to 0.
1049
    * M914 X/Y to live tune the setting
1130
    * M914 X/Y to live tune the setting
1050
    */
1131
    */
1051
-  //#define SENSORLESS_HOMING
1132
+  //#define SENSORLESS_HOMING // TMC2130 only
1052
 
1133
 
1053
   #if ENABLED(SENSORLESS_HOMING)
1134
   #if ENABLED(SENSORLESS_HOMING)
1054
-    #define X_HOMING_SENSITIVITY  19
1055
-    #define Y_HOMING_SENSITIVITY  19
1135
+    #define X_HOMING_SENSITIVITY  8
1136
+    #define Y_HOMING_SENSITIVITY  8
1056
   #endif
1137
   #endif
1057
 
1138
 
1058
   /**
1139
   /**
1140
+   * Enable M122 debugging command for TMC stepper drivers.
1141
+   * M122 S0/1 will enable continous reporting.
1142
+   */
1143
+  //#define TMC_DEBUG
1144
+
1145
+  /**
1059
    * You can set your own advanced settings by filling in predefined functions.
1146
    * You can set your own advanced settings by filling in predefined functions.
1060
    * A list of available functions can be found on the library github page
1147
    * A list of available functions can be found on the library github page
1061
    * https://github.com/teemuatlut/TMC2130Stepper
1148
    * https://github.com/teemuatlut/TMC2130Stepper
1149
+   * https://github.com/teemuatlut/TMC2208Stepper
1062
    *
1150
    *
1063
    * Example:
1151
    * Example:
1064
-   * #define TMC2130_ADV() { \
1152
+   * #define TMC_ADV() { \
1065
    *   stepperX.diag0_temp_prewarn(1); \
1153
    *   stepperX.diag0_temp_prewarn(1); \
1066
-   *   stepperX.interpolate(0); \
1154
+   *   stepperY.interpolate(0); \
1067
    * }
1155
    * }
1068
    */
1156
    */
1069
-  #define  TMC2130_ADV() {  }
1157
+  #define  TMC_ADV() {  }
1070
 
1158
 
1071
-#endif // HAVE_TMC2130
1159
+#endif // TMC2130 || TMC2208
1072
 
1160
 
1073
 // @section L6470
1161
 // @section L6470
1074
 
1162
 
1233
 #endif
1321
 #endif
1234
 
1322
 
1235
 /**
1323
 /**
1324
+ * Filament Width Sensor
1325
+ *
1326
+ * Measures the filament width in real-time and adjusts
1327
+ * flow rate to compensate for any irregularities.
1328
+ *
1329
+ * Also allows the measured filament diameter to set the
1330
+ * extrusion rate, so the slicer only has to specify the
1331
+ * volume.
1332
+ *
1333
+ * Only a single extruder is supported at this time.
1334
+ *
1335
+ *  34 RAMPS_14    : Analog input 5 on the AUX2 connector
1336
+ *  81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
1337
+ * 301 RAMBO       : Analog input 3
1338
+ *
1339
+ * Note: May require analog pins to be defined for other boards.
1340
+ */
1341
+//#define FILAMENT_WIDTH_SENSOR
1342
+
1343
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
1344
+  #define FILAMENT_SENSOR_EXTRUDER_NUM 0    // Index of the extruder that has the filament sensor. :[0,1,2,3,4]
1345
+  #define MEASUREMENT_DELAY_CM        14    // (cm) The distance from the filament sensor to the melting chamber
1346
+
1347
+  #define MEASURED_UPPER_LIMIT         3.30 // (mm) Upper limit used to validate sensor reading
1348
+  #define MEASURED_LOWER_LIMIT         1.90 // (mm) Lower limit used to validate sensor reading
1349
+  #define MAX_MEASUREMENT_DELAY       20    // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
1350
+
1351
+  #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
1352
+
1353
+  // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
1354
+  //#define FILAMENT_LCD_DISPLAY
1355
+#endif
1356
+
1357
+/**
1358
+ * CNC Coordinate Systems
1359
+ *
1360
+ * Enables G53 and G54-G59.3 commands to select coordinate systems
1361
+ * and G92.1 to reset the workspace to native machine space.
1362
+ */
1363
+//#define CNC_COORDINATE_SYSTEMS
1364
+
1365
+/**
1236
  * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
1366
  * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
1237
  */
1367
  */
1238
 //#define PINS_DEBUGGING
1368
 //#define PINS_DEBUGGING
1423
                                          // tweaks made to the configuration are affecting the printer in real-time.
1553
                                          // tweaks made to the configuration are affecting the printer in real-time.
1424
 #endif
1554
 #endif
1425
 
1555
 
1556
+/**
1557
+ * NanoDLP Sync support
1558
+ *
1559
+ * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
1560
+ * string to enable synchronization with DLP projector exposure. This change will allow to use
1561
+ * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
1562
+ */
1563
+//#define NANODLP_Z_SYNC
1564
+#if ENABLED(NANODLP_Z_SYNC)
1565
+  //#define NANODLP_ALL_AXIS  // Enables "Z_move_comp" output on any axis move.
1566
+                              // Default behaviour is limited to Z axis only.
1567
+#endif
1568
+
1426
 #endif // CONFIGURATION_ADV_H
1569
 #endif // CONFIGURATION_ADV_H

+ 168
- 93
Marlin/example_configurations/delta/generic/Configuration.h Переглянути файл

37
  */
37
  */
38
 #ifndef CONFIGURATION_H
38
 #ifndef CONFIGURATION_H
39
 #define CONFIGURATION_H
39
 #define CONFIGURATION_H
40
-#define CONFIGURATION_H_VERSION 010100
40
+#define CONFIGURATION_H_VERSION 010107
41
 
41
 
42
 //===========================================================================
42
 //===========================================================================
43
 //============================= Getting Started =============================
43
 //============================= Getting Started =============================
136
 // :[1, 2, 3, 4, 5]
136
 // :[1, 2, 3, 4, 5]
137
 #define EXTRUDERS 1
137
 #define EXTRUDERS 1
138
 
138
 
139
+// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
140
+#define DEFAULT_NOMINAL_FILAMENT_DIA 3.0
141
+
139
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
142
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
140
 //#define SINGLENOZZLE
143
 //#define SINGLENOZZLE
141
 
144
 
336
 
339
 
337
 // Comment the following line to disable PID and enable bang-bang.
340
 // Comment the following line to disable PID and enable bang-bang.
338
 #define PIDTEMP
341
 #define PIDTEMP
339
-#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
340
-#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
342
+#define BANG_MAX 255     // Limits current to nozzle while in bang-bang mode; 255=full current
343
+#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
344
+#define PID_K1 0.95      // Smoothing factor within the PID
341
 #if ENABLED(PIDTEMP)
345
 #if ENABLED(PIDTEMP)
342
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
346
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
343
   //#define PID_DEBUG // Sends debug data to the serial port.
347
   //#define PID_DEBUG // Sends debug data to the serial port.
347
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
351
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
348
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
352
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
349
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
353
                                   // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
350
-  #define K1 0.95 //smoothing factor within the PID
351
 
354
 
352
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
355
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
353
 
356
 
428
 //===========================================================================
431
 //===========================================================================
429
 
432
 
430
 /**
433
 /**
431
- * Thermal Protection protects your printer from damage and fire if a
432
- * thermistor falls out or temperature sensors fail in any way.
434
+ * Thermal Protection provides additional protection to your printer from damage
435
+ * and fire. Marlin always includes safe min and max temperature ranges which
436
+ * protect against a broken or disconnected thermistor wire.
433
  *
437
  *
434
- * The issue: If a thermistor falls out or a temperature sensor fails,
435
- * Marlin can no longer sense the actual temperature. Since a disconnected
436
- * thermistor reads as a low temperature, the firmware will keep the heater on.
438
+ * The issue: If a thermistor falls out, it will report the much lower
439
+ * temperature of the air in the room, and the the firmware will keep
440
+ * the heater on.
437
  *
441
  *
438
  * If you get "Thermal Runaway" or "Heating failed" errors the
442
  * If you get "Thermal Runaway" or "Heating failed" errors the
439
  * details can be tuned in Configuration_adv.h
443
  * details can be tuned in Configuration_adv.h
486
   #if ENABLED(DELTA_AUTO_CALIBRATION)
490
   #if ENABLED(DELTA_AUTO_CALIBRATION)
487
     // set the default number of probe points : n*n (1 -> 7)
491
     // set the default number of probe points : n*n (1 -> 7)
488
     #define DELTA_CALIBRATION_DEFAULT_POINTS 4
492
     #define DELTA_CALIBRATION_DEFAULT_POINTS 4
493
+
494
+    // Enable and set these values based on results of 'G33 A'
495
+    //#define H_FACTOR 1.01
496
+    //#define R_FACTOR 2.61
497
+    //#define A_FACTOR 0.87
498
+
489
   #endif
499
   #endif
490
 
500
 
491
   #if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU)
501
   #if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU)
492
-    // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS*0.869 for non-eccentric probes
502
+    // Set the radius for the calibration probe points - max 0.9 * DELTA_PRINTABLE_RADIUS for non-eccentric probes
493
     #define DELTA_CALIBRATION_RADIUS 121.5 // mm
503
     #define DELTA_CALIBRATION_RADIUS 121.5 // mm
494
     // Set the steprate for papertest probing
504
     // Set the steprate for papertest probing
495
     #define PROBE_MANUALLY_STEP 0.025
505
     #define PROBE_MANUALLY_STEP 0.025
637
 // @section probes
647
 // @section probes
638
 
648
 
639
 //
649
 //
640
-// See http://marlinfw.org/configuration/probes.html
650
+// See http://marlinfw.org/docs/configuration/probes.html
641
 //
651
 //
642
 
652
 
643
 /**
653
 /**
645
  *
655
  *
646
  * Enable this option for a probe connected to the Z Min endstop pin.
656
  * Enable this option for a probe connected to the Z Min endstop pin.
647
  */
657
  */
648
-//#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
658
+#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
649
 
659
 
650
 /**
660
 /**
651
  * Z_MIN_PROBE_ENDSTOP
661
  * Z_MIN_PROBE_ENDSTOP
666
  * disastrous consequences. Use with caution and do your homework.
676
  * disastrous consequences. Use with caution and do your homework.
667
  *
677
  *
668
  */
678
  */
669
-#define Z_MIN_PROBE_ENDSTOP
679
+//#define Z_MIN_PROBE_ENDSTOP
670
 
680
 
671
 /**
681
 /**
672
  * Probe Type
682
  * Probe Type
750
 // X and Y axis travel speed (mm/m) between probes
760
 // X and Y axis travel speed (mm/m) between probes
751
 #define XY_PROBE_SPEED 4000
761
 #define XY_PROBE_SPEED 4000
752
 
762
 
753
-// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH)
763
+// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
754
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
764
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
755
 
765
 
756
 // Speed for the "accurate" probe of each point
766
 // Speed for the "accurate" probe of each point
757
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
767
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
758
 
768
 
759
-// Use double touch for probing
760
-//#define PROBE_DOUBLE_TOUCH
769
+// The number of probes to perform at each point.
770
+//   Set to 2 for a fast/slow probe, using the second probe result.
771
+//   Set to 3 or more for slow probes, averaging the results.
772
+//#define MULTIPLE_PROBING 2
761
 
773
 
762
 /**
774
 /**
763
  * Allen key retractable z-probe as seen on many Kossel delta printers - http://reprap.org/wiki/Kossel#Automatic_bed_leveling_probe
775
  * Allen key retractable z-probe as seen on many Kossel delta printers - http://reprap.org/wiki/Kossel#Automatic_bed_leveling_probe
896
 #define Y_MAX_POS DELTA_PRINTABLE_RADIUS
908
 #define Y_MAX_POS DELTA_PRINTABLE_RADIUS
897
 #define Z_MAX_POS MANUAL_Z_HOME_POS
909
 #define Z_MAX_POS MANUAL_Z_HOME_POS
898
 
910
 
899
-// If enabled, axes won't move below MIN_POS in response to movement commands.
911
+/**
912
+ * Software Endstops
913
+ *
914
+ * - Prevent moves outside the set machine bounds.
915
+ * - Individual axes can be disabled, if desired.
916
+ * - X and Y only apply to Cartesian robots.
917
+ * - Use 'M211' to set software endstops on/off or report current state
918
+ */
919
+
920
+// Min software endstops curtail movement below minimum coordinate bounds
900
 #define MIN_SOFTWARE_ENDSTOPS
921
 #define MIN_SOFTWARE_ENDSTOPS
901
-// If enabled, axes won't move above MAX_POS in response to movement commands.
922
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
923
+  #define MIN_SOFTWARE_ENDSTOP_X
924
+  #define MIN_SOFTWARE_ENDSTOP_Y
925
+  #define MIN_SOFTWARE_ENDSTOP_Z
926
+#endif
927
+
928
+// Max software endstops curtail movement above maximum coordinate bounds
902
 #define MAX_SOFTWARE_ENDSTOPS
929
 #define MAX_SOFTWARE_ENDSTOPS
930
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
931
+  #define MAX_SOFTWARE_ENDSTOP_X
932
+  #define MAX_SOFTWARE_ENDSTOP_Y
933
+  #define MAX_SOFTWARE_ENDSTOP_Z
934
+#endif
903
 
935
 
904
 /**
936
 /**
905
  * Filament Runout Sensor
937
  * Filament Runout Sensor
919
 //===========================================================================
951
 //===========================================================================
920
 //=============================== Bed Leveling ==============================
952
 //=============================== Bed Leveling ==============================
921
 //===========================================================================
953
 //===========================================================================
922
-// @section bedlevel
954
+// @section calibrate
923
 
955
 
924
 /**
956
 /**
925
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
957
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
945
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
977
  * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
946
  *   A comprehensive bed leveling system combining the features and benefits
978
  *   A comprehensive bed leveling system combining the features and benefits
947
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
979
  *   of other systems. UBL also includes integrated Mesh Generation, Mesh
948
- *   Validation and Mesh Editing systems. Currently, UBL is only checked out
949
- *   for Cartesian Printers. That said, it was primarily designed to correct
950
- *   poor quality Delta Printers. If you feel adventurous and have a Delta,
951
- *   please post an issue if something doesn't work correctly. Initially,
952
- *   you will need to set a reduced bed size so you have a rectangular area
953
- *   to test on.
980
+ *   Validation and Mesh Editing systems.
954
  *
981
  *
955
  * - MESH_BED_LEVELING
982
  * - MESH_BED_LEVELING
956
  *   Probe a grid manually
983
  *   Probe a grid manually
981
   // Set the boundaries for probing (where the probe can reach).
1008
   // Set the boundaries for probing (where the probe can reach).
982
   #define DELTA_PROBEABLE_RADIUS (DELTA_PRINTABLE_RADIUS - 10)
1009
   #define DELTA_PROBEABLE_RADIUS (DELTA_PRINTABLE_RADIUS - 10)
983
 
1010
 
1011
+
1012
+  // For Cartesian machines, instead of dividing moves on mesh boundaries,
1013
+  // split up moves into short segments like a Delta. This follows the
1014
+  // contours of the bed more closely than edge-to-edge straight moves.
1015
+  #define SEGMENT_LEVELED_MOVES
1016
+  #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)
1017
+
1018
+  /**
1019
+   * Enable the G26 Mesh Validation Pattern tool.
1020
+   */
1021
+  //#define G26_MESH_VALIDATION   // Enable G26 mesh validation
1022
+  #if ENABLED(G26_MESH_VALIDATION)
1023
+    #define MESH_TEST_NOZZLE_SIZE     0.4   // (mm) Diameter of primary nozzle.
1024
+    #define MESH_TEST_LAYER_HEIGHT    0.2   // (mm) Default layer height for the G26 Mesh Validation Tool.
1025
+    #define MESH_TEST_HOTEND_TEMP   205.0   // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
1026
+    #define MESH_TEST_BED_TEMP       60.0   // (°C) Default bed temperature for the G26 Mesh Validation Tool.
1027
+  #endif
1028
+
984
 #endif
1029
 #endif
985
 
1030
 
986
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
1031
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
1036
   //========================= Unified Bed Leveling ============================
1081
   //========================= Unified Bed Leveling ============================
1037
   //===========================================================================
1082
   //===========================================================================
1038
 
1083
 
1039
-  #define UBL_MESH_INSET 1          // Mesh inset margin on print area
1084
+  //#define MESH_EDIT_GFX_OVERLAY   // Display a graphics overlay while editing the mesh
1085
+
1086
+  #define MESH_INSET 1              // Mesh inset margin on print area
1040
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
1087
   #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
1041
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
1088
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
1042
 
1089
 
1049
   #define UBL_PROBE_PT_3_X _PX(DELTA_PROBEABLE_RADIUS, 240)
1096
   #define UBL_PROBE_PT_3_X _PX(DELTA_PROBEABLE_RADIUS, 240)
1050
   #define UBL_PROBE_PT_3_Y _PY(DELTA_PROBEABLE_RADIUS, 240)
1097
   #define UBL_PROBE_PT_3_Y _PY(DELTA_PROBEABLE_RADIUS, 240)
1051
 
1098
 
1052
-  #define UBL_G26_MESH_VALIDATION   // Enable G26 mesh validation
1053
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
1099
   #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle
1100
+  #define UBL_SAVE_ACTIVE_ON_M500   // Save the currently active mesh in the current slot on M500
1054
 
1101
 
1055
 #elif ENABLED(MESH_BED_LEVELING)
1102
 #elif ENABLED(MESH_BED_LEVELING)
1056
 
1103
 
1110
 //#define Z_SAFE_HOMING
1157
 //#define Z_SAFE_HOMING
1111
 
1158
 
1112
 #if ENABLED(Z_SAFE_HOMING)
1159
 #if ENABLED(Z_SAFE_HOMING)
1113
-  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axis (G28).
1114
-  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axis (G28).
1160
+  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axes (G28).
1161
+  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axes (G28).
1115
 #endif
1162
 #endif
1116
 
1163
 
1117
 // Delta only homes to Z
1164
 // Delta only homes to Z
1118
 #define HOMING_FEEDRATE_Z  (200*60)
1165
 #define HOMING_FEEDRATE_Z  (200*60)
1119
 
1166
 
1167
+// @section calibrate
1168
+
1169
+/**
1170
+ * Bed Skew Compensation
1171
+ *
1172
+ * This feature corrects for misalignment in the XYZ axes.
1173
+ *
1174
+ * Take the following steps to get the bed skew in the XY plane:
1175
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1176
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1177
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1178
+ *  4. For XY_SIDE_AD measure the edge A to D
1179
+ *
1180
+ * Marlin automatically computes skew factors from these measurements.
1181
+ * Skew factors may also be computed and set manually:
1182
+ *
1183
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1184
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1185
+ *
1186
+ * If desired, follow the same procedure for XZ and YZ.
1187
+ * Use these diagrams for reference:
1188
+ *
1189
+ *    Y                     Z                     Z
1190
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1191
+ *    |    /       /        |    /       /        |    /       /
1192
+ *    |   /       /         |   /       /         |   /       /
1193
+ *    |  A-------D          |  A-------D          |  A-------D
1194
+ *    +-------------->X     +-------------->X     +-------------->Y
1195
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1196
+ */
1197
+//#define SKEW_CORRECTION
1198
+
1199
+#if ENABLED(SKEW_CORRECTION)
1200
+  // Input all length measurements here:
1201
+  #define XY_DIAG_AC 282.8427124746
1202
+  #define XY_DIAG_BD 282.8427124746
1203
+  #define XY_SIDE_AD 200
1204
+
1205
+  // Or, set the default skew factors directly here
1206
+  // to override the above measurements:
1207
+  #define XY_SKEW_FACTOR 0.0
1208
+
1209
+  //#define SKEW_CORRECTION_FOR_Z
1210
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1211
+    #define XZ_DIAG_AC 282.8427124746
1212
+    #define XZ_DIAG_BD 282.8427124746
1213
+    #define YZ_DIAG_AC 282.8427124746
1214
+    #define YZ_DIAG_BD 282.8427124746
1215
+    #define YZ_SIDE_AD 200
1216
+    #define XZ_SKEW_FACTOR 0.0
1217
+    #define YZ_SKEW_FACTOR 0.0
1218
+  #endif
1219
+
1220
+  // Enable this option for M852 to set skew at runtime
1221
+  //#define SKEW_CORRECTION_GCODE
1222
+#endif
1223
+
1120
 //=============================================================================
1224
 //=============================================================================
1121
 //============================= Additional Features ===========================
1225
 //============================= Additional Features ===========================
1122
 //=============================================================================
1226
 //=============================================================================
1148
 //
1252
 //
1149
 // M100 Free Memory Watcher
1253
 // M100 Free Memory Watcher
1150
 //
1254
 //
1151
-//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
1255
+//#define M100_FREE_MEMORY_WATCHER    // Add M100 (Free Memory Watcher) to debug memory usage
1152
 
1256
 
1153
 //
1257
 //
1154
 // G20/G21 Inch mode support
1258
 // G20/G21 Inch mode support
1293
  *
1397
  *
1294
  * Select the language to display on the LCD. These languages are available:
1398
  * Select the language to display on the LCD. These languages are available:
1295
  *
1399
  *
1296
- *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, gl, hr,
1297
- *    it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1400
+ *    en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, fr_utf8, gl,
1401
+ *    hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
1298
  *    tr, uk, zh_CN, zh_TW, test
1402
  *    tr, uk, zh_CN, zh_TW, test
1299
  *
1403
  *
1300
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1404
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
1301
  */
1405
  */
1302
 #define LCD_LANGUAGE en
1406
 #define LCD_LANGUAGE en
1303
 
1407
 
1425
 // Note: Test audio output with the G-Code:
1529
 // Note: Test audio output with the G-Code:
1426
 //  M300 S<frequency Hz> P<duration ms>
1530
 //  M300 S<frequency Hz> P<duration ms>
1427
 //
1531
 //
1428
-//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
1429
-//#define LCD_FEEDBACK_FREQUENCY_HZ 1000
1532
+//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
1533
+//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
1430
 
1534
 
1431
 //
1535
 //
1432
 // CONTROLLER TYPE: Standard
1536
 // CONTROLLER TYPE: Standard
1534
 //#define CARTESIO_UI
1638
 //#define CARTESIO_UI
1535
 
1639
 
1536
 //
1640
 //
1537
-// ANET_10 Controller supported displays.
1641
+// ANET and Tronxy Controller supported displays.
1538
 //
1642
 //
1539
-//#define ANET_KEYPAD_LCD         // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1643
+//#define ZONESTAR_LCD            // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1540
                                   // This LCD is known to be susceptible to electrical interference
1644
                                   // This LCD is known to be susceptible to electrical interference
1541
                                   // which scrambles the display.  Pressing any button clears it up.
1645
                                   // which scrambles the display.  Pressing any button clears it up.
1646
+                                  // This is a LCD2004 display with 5 analog buttons.
1647
+
1542
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1648
 //#define ANET_FULL_GRAPHICS_LCD  // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
1543
                                   // A clone of the RepRapDiscount full graphics display but with
1649
                                   // A clone of the RepRapDiscount full graphics display but with
1544
                                   // different pins/wiring (see pins_ANET_10.h).
1650
                                   // different pins/wiring (see pins_ANET_10.h).
1648
 //
1754
 //
1649
 //#define MKS_12864OLED
1755
 //#define MKS_12864OLED
1650
 
1756
 
1757
+// Silvergate GLCD controller
1758
+// http://github.com/android444/Silvergate
1759
+//
1760
+//#define SILVER_GATE_GLCD_CONTROLLER
1761
+
1651
 //=============================================================================
1762
 //=============================================================================
1652
 //=============================== Extra Features ==============================
1763
 //=============================== Extra Features ==============================
1653
 //=============================================================================
1764
 //=============================================================================
1704
  * Adds the M150 command to set the LED (or LED strip) color.
1815
  * Adds the M150 command to set the LED (or LED strip) color.
1705
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1816
  * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1706
  * luminance values can be set from 0 to 255.
1817
  * luminance values can be set from 0 to 255.
1707
- * For Neopixel LED overall brightness parameters is also available 
1818
+ * For Neopixel LED an overall brightness parameter is also available.
1708
  *
1819
  *
1709
  * *** CAUTION ***
1820
  * *** CAUTION ***
1710
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1821
  *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1711
  *  as the Arduino cannot handle the current the LEDs will require.
1822
  *  as the Arduino cannot handle the current the LEDs will require.
1712
  *  Failure to follow this precaution can destroy your Arduino!
1823
  *  Failure to follow this precaution can destroy your Arduino!
1713
- *  The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
1714
- *  cannot handle such current, separate 5V power supply must be used
1824
+ *  NOTE: A separate 5V power supply is required! The Neopixel LED needs
1825
+ *  more current than the Arduino 5V linear regulator can produce.
1715
  * *** CAUTION ***
1826
  * *** CAUTION ***
1716
  *
1827
  *
1717
- * LED type. This options are mutualy exclusive. Uncomment only one.
1828
+ * LED Type. Enable only one of the following two options.
1718
  *
1829
  *
1719
  */
1830
  */
1720
 //#define RGB_LED
1831
 //#define RGB_LED
1730
 // Support for Adafruit Neopixel LED driver
1841
 // Support for Adafruit Neopixel LED driver
1731
 //#define NEOPIXEL_LED
1842
 //#define NEOPIXEL_LED
1732
 #if ENABLED(NEOPIXEL_LED)
1843
 #if ENABLED(NEOPIXEL_LED)
1733
-  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
1844
+  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
1734
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1845
   #define NEOPIXEL_PIN    4        // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
1735
-  #define NEOPIXEL_PIXELS 30       // Number of LEDs on strip
1736
-  #define NEOPIXEL_IS_SEQUENTIAL   // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
1737
-  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness 0-255
1846
+  #define NEOPIXEL_PIXELS 30       // Number of LEDs in the strip
1847
+  #define NEOPIXEL_IS_SEQUENTIAL   // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
1848
+  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness (0-255)
1738
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1849
   //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
1739
 #endif
1850
 #endif
1740
 
1851
 
1749
  *  - Change to green once print has finished
1860
  *  - Change to green once print has finished
1750
  *  - Turn off after the print has finished and the user has pushed a button
1861
  *  - Turn off after the print has finished and the user has pushed a button
1751
  */
1862
  */
1752
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED)
1863
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
1753
   #define PRINTER_EVENT_LEDS
1864
   #define PRINTER_EVENT_LEDS
1754
 #endif
1865
 #endif
1755
 
1866
 
1756
-/*********************************************************************\
1757
-* R/C SERVO support
1758
-* Sponsored by TrinityLabs, Reworked by codexmas
1759
-**********************************************************************/
1867
+/**
1868
+ * R/C SERVO support
1869
+ * Sponsored by TrinityLabs, Reworked by codexmas
1870
+ */
1760
 
1871
 
1761
-// Number of servos
1762
-//
1763
-// If you select a configuration below, this will receive a default value and does not need to be set manually
1764
-// set it manually if you have more servos than extruders and wish to manually control some
1765
-// leaving it undefined or defining as 0 will disable the servo subsystem
1766
-// If unsure, leave commented / disabled
1767
-//
1872
+/**
1873
+ * Number of servos
1874
+ *
1875
+ * For some servo-related options NUM_SERVOS will be set automatically.
1876
+ * Set this manually if there are extra servos needing manual control.
1877
+ * Leave undefined or set to 0 to entirely disable the servo subsystem.
1878
+ */
1768
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1879
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
1769
 
1880
 
1770
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1881
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1777
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1888
 // With this option servos are powered only during movement, then turned off to prevent jitter.
1778
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1889
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
1779
 
1890
 
1780
-/**
1781
- * Filament Width Sensor
1782
- *
1783
- * Measures the filament width in real-time and adjusts
1784
- * flow rate to compensate for any irregularities.
1785
- *
1786
- * Also allows the measured filament diameter to set the
1787
- * extrusion rate, so the slicer only has to specify the
1788
- * volume.
1789
- *
1790
- * Only a single extruder is supported at this time.
1791
- *
1792
- *  34 RAMPS_14    : Analog input 5 on the AUX2 connector
1793
- *  81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
1794
- * 301 RAMBO       : Analog input 3
1795
- *
1796
- * Note: May require analog pins to be defined for other boards.
1797
- */
1798
-//#define FILAMENT_WIDTH_SENSOR
1799
-
1800
-#define DEFAULT_NOMINAL_FILAMENT_DIA 3.00   // (mm) Diameter of the filament generally used (3.0 or 1.75mm), also used in the slicer. Used to validate sensor reading.
1801
-
1802
-#if ENABLED(FILAMENT_WIDTH_SENSOR)
1803
-  #define FILAMENT_SENSOR_EXTRUDER_NUM 0    // Index of the extruder that has the filament sensor (0,1,2,3)
1804
-  #define MEASUREMENT_DELAY_CM        14    // (cm) The distance from the filament sensor to the melting chamber
1805
-
1806
-  #define MEASURED_UPPER_LIMIT         3.30 // (mm) Upper limit used to validate sensor reading
1807
-  #define MEASURED_LOWER_LIMIT         1.90 // (mm) Lower limit used to validate sensor reading
1808
-  #define MAX_MEASUREMENT_DELAY       20    // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
1809
-
1810
-  #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
1811
-
1812
-  // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
1813
-  //#define FILAMENT_LCD_DISPLAY
1814
-#endif
1815
-
1816
 #endif // CONFIGURATION_H
1891
 #endif // CONFIGURATION_H

+ 0
- 0
Marlin/example_configurations/delta/generic/Configuration_adv.h Переглянути файл


Деякі файли не було показано, через те що забагато файлів було змінено

Завантаження…
Відмінити
Зберегти