Browse Source

Merge pull request #1 from MarlinFirmware/RCBugFix

Rc bug fix
Silvio 9 years ago
parent
commit
62612580ef
100 changed files with 8699 additions and 7394 deletions
  1. 3
    0
      .gitignore
  2. 181
    153
      .travis.yml
  3. 1
    1
      ArduinoAddons/Arduino_1.6.x/hardware/marlin/avr/boards.txt
  4. 4
    0
      LinuxAddons/bin/build_marlin
  5. 5
    0
      LinuxAddons/bin/opt_disable
  6. 5
    0
      LinuxAddons/bin/opt_enable
  7. 5
    0
      LinuxAddons/bin/opt_enable_adv
  8. 3
    0
      LinuxAddons/bin/opt_set
  9. 3
    0
      LinuxAddons/bin/opt_set_adv
  10. 3
    0
      LinuxAddons/bin/pins_set
  11. 5
    0
      LinuxAddons/bin/restore_configs
  12. 3
    0
      LinuxAddons/bin/use_example_configs
  13. 221
    37
      Marlin/Conditionals.h
  14. 213
    116
      Marlin/Configuration.h
  15. 140
    84
      Marlin/Configuration_adv.h
  16. 28
    6
      Marlin/Default_Version.h
  17. 49
    26
      Marlin/M100_Free_Mem_Chk.cpp
  18. 9
    6
      Marlin/Makefile
  19. 61
    35
      Marlin/Marlin.h
  20. 10
    2
      Marlin/Marlin.ino
  21. 63
    46
      Marlin/MarlinSerial.cpp
  22. 57
    31
      Marlin/MarlinSerial.h
  23. 1432
    951
      Marlin/Marlin_main.cpp
  24. 142
    32
      Marlin/SanityCheck.h
  25. 23
    9
      Marlin/Sd2Card.cpp
  26. 17
    8
      Marlin/Sd2Card.h
  27. 20
    11
      Marlin/Sd2PinMap.h
  28. 24
    16
      Marlin/SdBaseFile.cpp
  29. 21
    12
      Marlin/SdBaseFile.h
  30. 16
    7
      Marlin/SdFatConfig.h
  31. 17
    8
      Marlin/SdFatStructs.h
  32. 17
    8
      Marlin/SdFatUtil.cpp
  33. 18
    9
      Marlin/SdFatUtil.h
  34. 16
    7
      Marlin/SdFile.cpp
  35. 17
    8
      Marlin/SdFile.h
  36. 17
    8
      Marlin/SdInfo.h
  37. 19
    10
      Marlin/SdVolume.cpp
  38. 17
    8
      Marlin/SdVolume.h
  39. 27
    4
      Marlin/blinkm.cpp
  40. 25
    3
      Marlin/blinkm.h
  41. 27
    0
      Marlin/boards.h
  42. 22
    0
      Marlin/buzzer.cpp
  43. 23
    1
      Marlin/buzzer.h
  44. 57
    43
      Marlin/cardreader.cpp
  45. 28
    5
      Marlin/cardreader.h
  46. 129
    76
      Marlin/configuration_store.cpp
  47. 22
    0
      Marlin/configuration_store.h
  48. 0
    1
      Marlin/configurator/config/_htaccess
  49. 0
    64
      Marlin/configurator/config/boards.h
  50. 0
    228
      Marlin/configurator/config/language.h
  51. 0
    344
      Marlin/configurator/css/configurator.css
  52. BIN
      Marlin/configurator/css/logo.png
  53. 0
    129
      Marlin/configurator/index.html
  54. 0
    2
      Marlin/configurator/js/FileSaver.min.js
  55. 0
    79
      Marlin/configurator/js/binaryfileuploader.js
  56. 0
    168
      Marlin/configurator/js/binarystring.js
  57. 0
    1432
      Marlin/configurator/js/configurator.js
  58. 0
    524
      Marlin/configurator/js/jcanvas.js
  59. 0
    4
      Marlin/configurator/js/jquery-2.1.3.min.js
  60. 0
    220
      Marlin/configurator/js/jstepper.js
  61. 0
    14
      Marlin/configurator/js/jszip.min.js
  62. 138
    0
      Marlin/dac_mcp4728.cpp
  63. 66
    0
      Marlin/dac_mcp4728.h
  64. 22
    0
      Marlin/digipot_mcp4451.cpp
  65. 28
    3
      Marlin/dogm_bitmaps.h
  66. 23
    1
      Marlin/dogm_font_data_6x9_marlin.h
  67. 23
    1
      Marlin/dogm_font_data_HD44780_C.h
  68. 83
    61
      Marlin/dogm_font_data_HD44780_J.h
  69. 23
    1
      Marlin/dogm_font_data_HD44780_W.h
  70. 23
    1
      Marlin/dogm_font_data_ISO10646_1.h
  71. 23
    1
      Marlin/dogm_font_data_ISO10646_5_Cyrillic.h
  72. 23
    1
      Marlin/dogm_font_data_ISO10646_CN.h
  73. 97
    79
      Marlin/dogm_font_data_ISO10646_Kana.h
  74. 23
    1
      Marlin/dogm_font_data_Marlin_symbols.h
  75. 115
    48
      Marlin/dogm_lcd_implementation.h
  76. 212
    114
      Marlin/example_configurations/Felix/Configuration.h
  77. 258
    127
      Marlin/example_configurations/Felix/Configuration_DUAL.h
  78. 121
    67
      Marlin/example_configurations/Felix/Configuration_adv.h
  79. 216
    115
      Marlin/example_configurations/Hephestos/Configuration.h
  80. 123
    69
      Marlin/example_configurations/Hephestos/Configuration_adv.h
  81. 269
    174
      Marlin/example_configurations/Hephestos_2/Configuration.h
  82. 659
    0
      Marlin/example_configurations/Hephestos_2/Configuration_adv.h
  83. 8
    0
      Marlin/example_configurations/Hephestos_2/readme.md
  84. 255
    128
      Marlin/example_configurations/K8200/Configuration.h
  85. 138
    78
      Marlin/example_configurations/K8200/Configuration_adv.h
  86. 212
    114
      Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h
  87. 224
    114
      Marlin/example_configurations/RigidBot/Configuration.h
  88. 119
    60
      Marlin/example_configurations/RigidBot/Configuration_adv.h
  89. 220
    122
      Marlin/example_configurations/SCARA/Configuration.h
  90. 121
    67
      Marlin/example_configurations/SCARA/Configuration_adv.h
  91. 218
    118
      Marlin/example_configurations/TAZ4/Configuration.h
  92. 109
    50
      Marlin/example_configurations/TAZ4/Configuration_adv.h
  93. 213
    114
      Marlin/example_configurations/WITBOX/Configuration.h
  94. 123
    69
      Marlin/example_configurations/WITBOX/Configuration_adv.h
  95. 213
    115
      Marlin/example_configurations/adafruit/ST7565/Configuration.h
  96. 223
    121
      Marlin/example_configurations/delta/biv2.5/Configuration.h
  97. 123
    68
      Marlin/example_configurations/delta/biv2.5/Configuration_adv.h
  98. 226
    129
      Marlin/example_configurations/delta/generic/Configuration.h
  99. 121
    67
      Marlin/example_configurations/delta/generic/Configuration_adv.h
  100. 0
    0
      Marlin/example_configurations/delta/kossel_mini/Configuration.h

+ 3
- 0
.gitignore View File

@@ -15,3 +15,6 @@ applet/
15 15
 *.bak
16 16
 *.DS_Store
17 17
 *.idea
18
+*.s
19
+*.i
20
+*.ii

+ 181
- 153
.travis.yml View File

@@ -1,12 +1,13 @@
1 1
 ---
2 2
 language: c
3
-
3
+  #
4 4
 before_install:
5 5
   # Travis runs a detached head. We need to find the current branch
6 6
   - git checkout `git branch --contains HEAD | grep -v '*'`
7 7
   # Also tags for the root(s) of the minor version(s)
8 8
   - git fetch origin --tags
9 9
   - mkdir ~/bin
10
+  #
10 11
 install:
11 12
   # Install arduino 1.6.4
12 13
   - wget http://downloads-02.arduino.cc/arduino-1.6.4-linux64.tar.xz
@@ -26,188 +27,215 @@ install:
26 27
   - mv LiquidCrystal_I2C/LiquidCrystal_I2C /usr/local/share/arduino/libraries/LiquidCrystal_I2C
27 28
   - git clone https://github.com/lincomatic/LiquidTWI2.git
28 29
   - mv LiquidTWI2 /usr/local/share/arduino/libraries/LiquidTWI2
29
-  # Install astyle
30
-  - wget https://github.com/timonwong/astyle-mirror/archive/master.zip
31
-  - unzip master.zip
32
-  - cd astyle-mirror-master/build/gcc/
33
-  - make prefix=$HOME astyle install
30
+  #
34 31
 before_script:
35 32
   # arduino requires an X server even with command line
36 33
   # https://github.com/arduino/Arduino/issues/1981
37 34
   - Xvfb :1 -screen 0 1024x768x16 &> xvfb.log &
38 35
   # change back to home directory for compiling
39 36
   - cd $TRAVIS_BUILD_DIR
40
-  # Check style
41
-  # ~/bin/astyle --recursive --options=.astylerc "Marlin/*.h" "Marlin/*.cpp"
37
+  #
42 38
 script:
43
-  # Abort on style errors
44
-  # if [ "0" != `find . -name "*.orig" | wc -l` ] ; then echo "Improperly styled source -- run astyle" ; exit -999; fi
45
-  # Relaxed Travis check
46
-  # if [ "0" != `find . -name "*.orig" | wc -l` ] ; then echo "Improperly styled source -- run astyle" ; fi
47
-  # build default config
48
-  - DISPLAY=:1.0 ~/bin/arduino --verify --board marlin:avr:mega  Marlin/Marlin.ino
49
-  # backup configuration.h
39
+  #
40
+  # Backup Configuration.h, Configuration_adv.h, and pins_RAMPS_14.h
41
+  #
50 42
   - cp Marlin/Configuration.h Marlin/Configuration.h.backup
51 43
   - cp Marlin/Configuration_adv.h Marlin/Configuration_adv.h.backup
52
-  - cp Marlin/pins_RAMPS_13.h Marlin/pins_RAMPS_13.h.backup
53
-  # add sensor for bed
54
-  - sed -i 's/#define TEMP_SENSOR_BED 0/#define TEMP_SENSOR_BED 1/g' Marlin/Configuration.h
55
-  - rm -rf .build/
56
-  - DISPLAY=:1.0 ~/bin/arduino --verify --board marlin:avr:mega  Marlin/Marlin.ino
57
-  # change extruder numbers from 1 to 2
58
-  - sed -i 's/#define MOTHERBOARD BOARD_RAMPS_13_EFB/#define MOTHERBOARD BOARD_RAMPS_13_EEB/g' Marlin/Configuration.h
59
-  - sed -i 's/#define EXTRUDERS 1/#define EXTRUDERS 2/g' Marlin/Configuration.h
60
-  - sed -i 's/#define TEMP_SENSOR_1 0/#define TEMP_SENSOR_1 1/g' Marlin/Configuration.h
61
-  #- cat Marlin/Configuration.h
62
-  - rm -rf .build/
63
-  - DISPLAY=:1.0 ~/bin/arduino --verify --board marlin:avr:mega  Marlin/Marlin.ino
64
-  # change extruder numbers from 2 to 3, needs to be a board with 3 extruders defined in pins.h 
65
-  - sed -i 's/#define MOTHERBOARD BOARD_RAMPS_13_EEB/#define MOTHERBOARD BOARD_RUMBA/g' Marlin/Configuration.h
66
-  - sed -i 's/#define EXTRUDERS 2/#define EXTRUDERS 3/g' Marlin/Configuration.h
67
-  - sed -i 's/#define TEMP_SENSOR_2 0/#define TEMP_SENSOR_2 1/g' Marlin/Configuration.h
68
-  - rm -rf .build/
69
-  - DISPLAY=:1.0 ~/bin/arduino --verify --board marlin:avr:mega  Marlin/Marlin.ino
70
-  # enable PIDTEMPBED 
71
-  - cp Marlin/Configuration.h.backup Marlin/Configuration.h
72
-  - sed -i 's/\/\/#define PIDTEMPBED/#define PIDTEMPBED/g' Marlin/Configuration.h
73
-  - rm -rf .build/
74
-  - DISPLAY=:1.0 ~/bin/arduino --verify --board marlin:avr:mega  Marlin/Marlin.ino
75
-  # enable AUTO_BED_LEVELING
76
-  - cp Marlin/Configuration.h.backup Marlin/Configuration.h
77
-  - sed -i 's/\/\/#define ENABLE_AUTO_BED_LEVELING/#define ENABLE_AUTO_BED_LEVELING/g' Marlin/Configuration.h
78
-  - rm -rf .build/
79
-  - DISPLAY=:1.0 ~/bin/arduino --verify --board marlin:avr:mega  Marlin/Marlin.ino
80
-  # enable AUTO_BED_LEVELING with servos
81
-  - cp Marlin/Configuration.h.backup Marlin/Configuration.h
82
-  - sed -i 's/\/\/#define ENABLE_AUTO_BED_LEVELING/#define ENABLE_AUTO_BED_LEVELING/g' Marlin/Configuration.h
83
-  - sed -i 's/\/\/#define NUM_SERVOS/#define NUM_SERVOS/g' Marlin/Configuration.h
84
-  - sed -i 's/\/\/#define Z_ENDSTOP_SERVO_NR/#define Z_ENDSTOP_SERVO_NR/g' Marlin/Configuration.h
85
-  - sed -i 's/\/\/#define SERVO_ENDSTOP_ANGLES/#define SERVO_ENDSTOP_ANGLES/g' Marlin/Configuration.h
86
-  - sed -i 's/\/\/#define DEACTIVATE_SERVOS_AFTER_MOVE/#define DEACTIVATE_SERVOS_AFTER_MOVE/g' Marlin/Configuration.h
87
-  - rm -rf .build/
88
-  - DISPLAY=:1.0 ~/bin/arduino --verify --board marlin:avr:mega  Marlin/Marlin.ino
89
-  # enable EEPROM_SETTINGS & EEPROM_CHITCHAT
90
-  - cp Marlin/Configuration.h.backup Marlin/Configuration.h
91
-  - sed -i 's/\/\/#define EEPROM_SETTINGS/#define EEPROM_SETTINGS/g' Marlin/Configuration.h
92
-  - sed -i 's/\/\/#define EEPROM_CHITCHAT/#define EEPROM_CHITCHAT/g' Marlin/Configuration.h
93
-  - rm -rf .build/
94
-  - DISPLAY=:1.0 ~/bin/arduino --verify --board marlin:avr:mega  Marlin/Marlin.ino
44
+  - cp Marlin/pins_RAMPS_14.h Marlin/pins_RAMPS_14.h.backup
45
+  #
46
+  # Build with the default configurations
47
+  #
48
+  - build_marlin
49
+  #
50
+  # Test heated bed temperature sensor
51
+  #
52
+  - opt_set TEMP_SENSOR_BED 1
53
+  - build_marlin
54
+  #
55
+  # Test 2 extruders on basic RAMPS 1.4
56
+  #
57
+  - opt_set MOTHERBOARD BOARD_RAMPS_14_EEB
58
+  - opt_set EXTRUDERS 2
59
+  - opt_set TEMP_SENSOR_1 1
60
+  - build_marlin
61
+  #
62
+  # Test 3 extruders on RUMBA (can use any board with >=3 extruders defined)
63
+  #
64
+  - opt_set MOTHERBOARD BOARD_RUMBA
65
+  - opt_set EXTRUDERS 3
66
+  - opt_set TEMP_SENSOR_2 1
67
+  - build_marlin
68
+  #
69
+  # Test PIDTEMPBED
70
+  #
71
+  - restore_configs
72
+  - opt_enable PIDTEMPBED
73
+  - build_marlin
74
+  #
75
+  # Test AUTO_BED_LEVELING & DEBUG_LEVELING_FEATURE
76
+  #
77
+  - restore_configs
78
+  - opt_enable ENABLE_AUTO_BED_LEVELING DEBUG_LEVELING_FEATURE
79
+  - build_marlin
80
+  #
81
+  # Test AUTO_BED_LEVELING & DEBUG_LEVELING_FEATURE with Servos
82
+  #
83
+  - opt_enable NUM_SERVOS Z_ENDSTOP_SERVO_NR SERVO_ENDSTOP_ANGLES DEACTIVATE_SERVOS_AFTER_MOVE
84
+  - build_marlin
85
+  #
86
+  # Test EEPROM_SETTINGS & EEPROM_CHITCHAT
87
+  #
88
+  - restore_configs
89
+  - opt_enable EEPROM_SETTINGS EEPROM_CHITCHAT
90
+  - build_marlin
91
+  #
95 92
   ### LCDS ###
93
+  #
94
+  #
96 95
   # ULTIMAKERCONTROLLER
97
-  - cp Marlin/Configuration.h.backup Marlin/Configuration.h
98
-  - sed -i 's/\/\/#define ULTIMAKERCONTROLLER/#define ULTIMAKERCONTROLLER/g' Marlin/Configuration.h
99
-  - rm -rf .build/
100
-  - DISPLAY=:1.0 ~/bin/arduino --verify --board marlin:avr:mega  Marlin/Marlin.ino
96
+  #
97
+  - restore_configs
98
+  - opt_enable ULTIMAKERCONTROLLER
99
+  - build_marlin
100
+  #
101 101
   # MAKRPANEL
102
-  # Needs to use melzi and sanguino hardware
103
-  #- cp Marlin/Configuration.h.backup Marlin/Configuration.h
104
-  #- sed -i 's/\/\/#define MAKRPANEL/#define MAKRPANEL/g' Marlin/Configuration.h
105
-  #- rm -rf .build/
106
-  #- DISPLAY=:1.0 ~/bin/arduino --verify --board marlin:avr:mega  Marlin/Marlin.ino
102
+  # Needs to use Melzi and Sanguino hardware
103
+  #
104
+  #- restore_configs
105
+  #- opt_enable MAKRPANEL
106
+  #- build_marlin
107
+  #
107 108
   # REPRAP_DISCOUNT_SMART_CONTROLLER
108
-  - cp Marlin/Configuration.h.backup Marlin/Configuration.h
109
-  - sed -i 's/\/\/#define REPRAP_DISCOUNT_SMART_CONTROLLER/#define REPRAP_DISCOUNT_SMART_CONTROLLER/g' Marlin/Configuration.h
110
-  - rm -rf .build/
111
-  - DISPLAY=:1.0 ~/bin/arduino --verify --board marlin:avr:mega  Marlin/Marlin.ino
112
-  # G3D_PANE
113
-  - cp Marlin/Configuration.h.backup Marlin/Configuration.h
114
-  - sed -i 's/\/\/#define G3D_PANEL/#define G3D_PANEL/g' Marlin/Configuration.h
115
-  - rm -rf .build/
116
-  - DISPLAY=:1.0 ~/bin/arduino --verify --board marlin:avr:mega  Marlin/Marlin.ino
109
+  #
110
+  - restore_configs
111
+  - opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT
112
+  - build_marlin
113
+  #
114
+  # G3D_PANEL
115
+  #
116
+  - restore_configs
117
+  - opt_enable G3D_PANEL SDSUPPORT
118
+  - build_marlin
119
+  #
117 120
   # REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
118
-  - cp Marlin/Configuration.h.backup Marlin/Configuration.h
119
-  - sed -i 's/\/\/#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER/#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER/g' Marlin/Configuration.h
120
-  - rm -rf .build/
121
-  - DISPLAY=:1.0 ~/bin/arduino --verify --board marlin:avr:mega  Marlin/Marlin.ino
122
-  # REPRAPWORLD_KEYPAD 
121
+  #
122
+  - restore_configs
123
+  - opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER SDSUPPORT
124
+  - build_marlin
125
+  #
126
+  # REPRAPWORLD_KEYPAD
127
+  #
123 128
   # Cant find configuration details to get it to compile
124
-  #- cp Marlin/Configuration.h.backup Marlin/Configuration.h
125
-  #- sed -i 's/\/\/#define ULTRA_LCD/#define ULTRA_LCD/g' Marlin/Configuration.h
126
-  #- sed -i 's/\/\/#define REPRAPWORLD_KEYPAD/#define REPRAPWORLD_KEYPAD/g' Marlin/Configuration.h
127
-  #- sed -i 's/\/\/#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0/#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0/g' Marlin/Configuration.h
128
-  #- rm -rf .build/
129
-  #- DISPLAY=:1.0 ~/bin/arduino --verify --board marlin:avr:mega  Marlin/Marlin.ino
129
+  #- restore_configs
130
+  #- opt_enable ULTRA_LCD REPRAPWORLD_KEYPAD REPRAPWORLD_KEYPAD_MOVE_STEP
131
+  #- build_marlin
132
+  #
130 133
   # RA_CONTROL_PANEL
131
-  - cp Marlin/Configuration.h.backup Marlin/Configuration.h
132
-  - sed -i 's/\/\/#define RA_CONTROL_PANEL/#define RA_CONTROL_PANEL/g' Marlin/Configuration.h
133
-  - rm -rf .build/
134
-  - DISPLAY=:1.0 ~/bin/arduino --verify --board marlin:avr:mega  Marlin/Marlin.ino
134
+  #
135
+  - restore_configs
136
+  - opt_enable RA_CONTROL_PANEL
137
+  - build_marlin
138
+  #
135 139
   ### I2C PANELS ###
140
+  #
136 141
   # LCD_I2C_SAINSMART_YWROBOT
137 142
   # Failing at the moment needs different library 
138
-  #- cp Marlin/Configuration.h.backup Marlin/Configuration.h
139
-  #- sed -i 's/\/\/#define LCD_I2C_SAINSMART_YWROBOT/#define LCD_I2C_SAINSMART_YWROBOT/g' Marlin/Configuration.h
140
-  #- rm -rf .build/
141
-  #- DISPLAY=:1.0 ~/bin/arduino --verify --board marlin:avr:mega  Marlin/Marlin.ino
143
+  #- restore_configs
144
+  #- opt_enable LCD_I2C_SAINSMART_YWROBOT
145
+  #- build_marlin
146
+  #
142 147
   # LCD_I2C_PANELOLU2
143
-  - cp Marlin/Configuration.h.backup Marlin/Configuration.h
144
-  - sed -i 's/\/\/#define LCD_I2C_PANELOLU2/#define LCD_I2C_PANELOLU2/g' Marlin/Configuration.h
145
-  - rm -rf .build/
146
-  - DISPLAY=:1.0 ~/bin/arduino --verify --board marlin:avr:mega  Marlin/Marlin.ino
148
+  #
149
+  - restore_configs
150
+  - opt_enable LCD_I2C_PANELOLU2
151
+  - build_marlin
152
+  #
147 153
   # LCD_I2C_VIKI
148
-  - cp Marlin/Configuration.h.backup Marlin/Configuration.h
149
-  - sed -i 's/\/\/#define LCD_I2C_VIKI/#define LCD_I2C_VIKI/g' Marlin/Configuration.h
150
-  - rm -rf .build/
151
-  - DISPLAY=:1.0 ~/bin/arduino --verify --board marlin:avr:mega  Marlin/Marlin.ino
154
+  #
155
+  - restore_configs
156
+  - opt_enable LCD_I2C_VIKI
157
+  - build_marlin
158
+  #
159
+  # LCM1602
160
+  #
161
+  - restore_configs
162
+  - opt_enable LCM1602
163
+  - build_marlin
164
+  #
165
+  # Enable FILAMENTCHANGEENABLE
166
+  #
167
+  - restore_configs
168
+  - opt_enable FILAMENTCHANGEENABLE ULTIMAKERCONTROLLER
169
+  - build_marlin
170
+  #
152 171
   # Enable filament sensor
153
-  - cp Marlin/Configuration.h.backup Marlin/Configuration.h
154
-  - sed -i 's/\/\/#define FILAMENT_SENSOR/#define FILAMENT_SENSOR/g' Marlin/Configuration.h
155
-  - rm -rf .build/
156
-  - DISPLAY=:1.0 ~/bin/arduino --verify --board marlin:avr:mega  Marlin/Marlin.ino
157
-   # Enable filament sensor with LCD display
158
-  - cp Marlin/Configuration.h.backup Marlin/Configuration.h
159
-  - sed -i 's/\/\/#define ULTIMAKERCONTROLLER/#define ULTIMAKERCONTROLLER/g' Marlin/Configuration.h
160
-  - sed -i 's/\/\/#define FILAMENT_SENSOR/#define FILAMENT_SENSOR/g' Marlin/Configuration.h
161
-  - sed -i 's/\/\/#define FILAMENT_LCD_DISPLAY/#define FILAMENT_LCD_DISPLAY/g' Marlin/Configuration.h
162
-  - rm -rf .build/
163
-  - DISPLAY=:1.0 ~/bin/arduino --verify --board marlin:avr:mega  Marlin/Marlin.ino
172
+  #
173
+  - restore_configs
174
+  - opt_enable FILAMENT_WIDTH_SENSOR
175
+  - build_marlin
176
+  #
177
+  # Enable filament sensor with LCD display
178
+  #
179
+  - opt_enable ULTIMAKERCONTROLLER FILAMENT_LCD_DISPLAY
180
+  - build_marlin
181
+  #
164 182
   # Enable COREXY
165
-  - cp Marlin/Configuration.h.backup Marlin/Configuration.h
166
-  - sed -i 's/\/\/#define COREXY/#define COREXY/g' Marlin/Configuration.h
167
-  - rm -rf .build/
168
-  - DISPLAY=:1.0 ~/bin/arduino --verify --board marlin:avr:mega  Marlin/Marlin.ino
183
+  #
184
+  - restore_configs
185
+  - opt_enable COREXY
186
+  - build_marlin
187
+  #
169 188
   # Enable COREXZ
170
-  - cp Marlin/Configuration.h.backup Marlin/Configuration.h
171
-  - sed -i 's/\/\/#define COREXZ/#define COREXZ/g' Marlin/Configuration.h
172
-  - rm -rf .build/
173
-  - DISPLAY=:1.0 ~/bin/arduino --verify --board marlin:avr:mega  Marlin/Marlin.ino
189
+  #
190
+  - restore_configs
191
+  - opt_enable COREXZ
192
+  - build_marlin
193
+  #
174 194
   # Enable Z_DUAL_STEPPER_DRIVERS, Z_DUAL_ENDSTOPS
175
-  - cp Marlin/Configuration.h.backup Marlin/Configuration.h
176
-  - sed -i 's/\/\/#define Z_DUAL_STEPPER_DRIVERS/#define Z_DUAL_STEPPER_DRIVERS/g' Marlin/Configuration_adv.h
177
-  - sed -i 's/\ \ \/\/\ \#define Z_DUAL_ENDSTOPS/#define Z_DUAL_ENDSTOPS/g' Marlin/Configuration_adv.h
178
-  - sed -i 's/#define X_MAX_PIN           2/#define X_MAX_PIN          -1/g' Marlin/pins_RAMPS_13.h
179
-  - sed -i 's/\ \ \ \ \#define Z2_MAX_PIN 36/#define Z2_MAX_PIN  2/g' Marlin/Configuration_adv.h
180
-  - rm -rf .build/
181
-  - DISPLAY=:1.0 ~/bin/arduino --verify --board marlin:avr:mega  Marlin/Marlin.ino
182
-  - cp Marlin/Configuration.h.backup Marlin/Configuration.h
183
-  - cp Marlin/Configuration_adv.h.backup Marlin/Configuration_adv.h
184
-  - cp Marlin/pins_RAMPS_13.h.backup Marlin/pins_RAMPS_13.h
195
+  #
196
+  - restore_configs
197
+  - opt_enable_adv Z_DUAL_STEPPER_DRIVERS Z_DUAL_ENDSTOPS
198
+  - pins_set RAMPS_14 X_MAX_PIN -1
199
+  - opt_set_adv Z2_MAX_PIN 2
200
+  - build_marlin
201
+  #
202
+  #
185 203
   ######## Example Configurations ##############
204
+  #
186 205
   # Delta Config (generic)
187
-  - cp Marlin/example_configurations/delta/generic/Configuration* Marlin/
188
-  - rm -rf .build/
189
-  - DISPLAY=:1.0 ~/bin/arduino --verify --board marlin:avr:mega  Marlin/Marlin.ino
206
+  - restore_configs
207
+  - use_example_configs delta/generic
208
+  - build_marlin
209
+  #
190 210
   # Delta Config (generic) + ABL + ALLEN_KEY
191
-  - cp Marlin/example_configurations/delta/generic/Configuration* Marlin/
192
-  - sed -i 's/#define DISABLE_MIN_ENDSTOPS/\/\/#define DISABLE_MIN_ENDSTOPS/g' Marlin/Configuration.h
193
-  - sed -i 's/\/\/#define AUTO_BED_LEVELING_FEATURE/#define AUTO_BED_LEVELING_FEATURE/g' Marlin/Configuration.h
194
-  - sed -i 's/\/\/#define Z_PROBE_ALLEN_KEY/#define Z_PROBE_ALLEN_KEY/g' Marlin/Configuration.h
195
-  - rm -rf .build/
196
-  - DISPLAY=:1.0 ~/bin/arduino --verify --board marlin:avr:mega  Marlin/Marlin.ino
211
+  #
212
+  - use_example_configs delta/generic
213
+  - opt_disable DISABLE_MIN_ENDSTOPS
214
+  - opt_enable AUTO_BED_LEVELING_FEATURE Z_PROBE_ALLEN_KEY
215
+  - build_marlin
216
+  #
197 217
   # Delta Config (Mini Kossel)
198
-  - cp Marlin/example_configurations/delta/kossel_mini/Configuration* Marlin/
199
-  - rm -rf .build/
200
-  - DISPLAY=:1.0 ~/bin/arduino --verify --board marlin:avr:mega  Marlin/Marlin.ino
218
+  #
219
+  - use_example_configs delta/kossel_mini
220
+  - build_marlin
221
+  #
201 222
   # Makibox Config  need to check board type for Teensy++ 2.0
202
-  #- cp Marlin/example_configurations/makibox/Configuration* Marlin/
203
-  #- rm -rf .build/
204
-  #- DISPLAY=:1.0 ~/bin/arduino --verify --board marlin:avr:mega  Marlin/Marlin.ino
223
+  #
224
+  #- use_example_configs makibox
225
+  #- build_marlin
226
+  #
205 227
   # SCARA Config
206
-  - cp Marlin/example_configurations/SCARA/Configuration* Marlin/
207
-  - rm -rf .build/
208
-  - DISPLAY=:1.0 ~/bin/arduino --verify --board marlin:avr:mega  Marlin/Marlin.ino
228
+  #
229
+  - use_example_configs SCARA
230
+  - build_marlin
231
+  #
209 232
   # tvrrug Config need to check board type for sanguino atmega644p
210
-  #- cp Marlin/example_configurations/tvrrug/Round2/Configuration* Marlin/
211
-  #- rm -rf .build/
212
-  #- DISPLAY=:1.0 ~/bin/arduino --verify --board marlin:avr:mega  Marlin/Marlin.ino
233
+  #
234
+  #- use_example_configs tvrrug/Round2
235
+  #- build_marlin
236
+  #
237
+  #
213 238
   ######## Board Types #############
239
+  #
240
+  # To be added in nightly test branch
241
+  #

+ 1
- 1
ArduinoAddons/Arduino_1.6.x/hardware/marlin/avr/boards.txt View File

@@ -95,7 +95,7 @@ rambo.build.variant=rambo
95 95
 sanguino.name=Sanguino
96 96
 
97 97
 sanguino.upload.tool=arduino:avrdude
98
-sanguino.upload.protocol=stk500
98
+sanguino.upload.protocol=arduino
99 99
 sanguino.upload.maximum_size=131072
100 100
 sanguino.upload.speed=57600
101 101
 

+ 4
- 0
LinuxAddons/bin/build_marlin View File

@@ -0,0 +1,4 @@
1
+#!/usr/bin/env bash
2
+
3
+rm -rf .build/
4
+DISPLAY=:1.0 ~/bin/arduino --verify --board marlin:avr:mega  Marlin/Marlin.ino

+ 5
- 0
LinuxAddons/bin/opt_disable View File

@@ -0,0 +1,5 @@
1
+#!/usr/bin/env bash
2
+
3
+for opt in "$@" ; do
4
+  eval "sed -i 's/\(\/\/ *\)*\(\#define *$opt\)/\/\/\2/g' Marlin/Configuration.h"
5
+done

+ 5
- 0
LinuxAddons/bin/opt_enable View File

@@ -0,0 +1,5 @@
1
+#!/usr/bin/env bash
2
+
3
+for opt in "$@" ; do
4
+  eval "sed -i 's/\/\/ *\(#define *$opt\)/\1/g' Marlin/Configuration.h"
5
+done

+ 5
- 0
LinuxAddons/bin/opt_enable_adv View File

@@ -0,0 +1,5 @@
1
+#!/usr/bin/env bash
2
+
3
+for opt in "$@" ; do
4
+  eval "sed -i 's/\/\/ *\(#define *$opt\)/\1/g' Marlin/Configuration_adv.h"
5
+done

+ 3
- 0
LinuxAddons/bin/opt_set View File

@@ -0,0 +1,3 @@
1
+#!/usr/bin/env bash
2
+
3
+eval "sed -i 's/\(#define *$1\) *.*$/\1 $2/g' Marlin/Configuration.h"

+ 3
- 0
LinuxAddons/bin/opt_set_adv View File

@@ -0,0 +1,3 @@
1
+#!/usr/bin/env bash
2
+
3
+eval "sed -i 's/\(#define *$1\) *.*$/\1 $2/g' Marlin/Configuration_adv.h"

+ 3
- 0
LinuxAddons/bin/pins_set View File

@@ -0,0 +1,3 @@
1
+#!/usr/bin/env bash
2
+
3
+eval "sed -i 's/\(#define *$2\) *.*$/\1 $3/g' Marlin/pins_$1.h"

+ 5
- 0
LinuxAddons/bin/restore_configs View File

@@ -0,0 +1,5 @@
1
+#!/usr/bin/env bash
2
+
3
+cp Marlin/Configuration.h.backup      Marlin/Configuration.h
4
+cp Marlin/Configuration_adv.h.backup  Marlin/Configuration_adv.h
5
+cp Marlin/pins_RAMPS_14.h.backup      Marlin/pins_RAMPS_14.h

+ 3
- 0
LinuxAddons/bin/use_example_configs View File

@@ -0,0 +1,3 @@
1
+#!/usr/bin/env bash
2
+
3
+eval "cp Marlin/example_configurations/$1/Configuration* Marlin/"

+ 221
- 37
Marlin/Conditionals.h View File

@@ -1,16 +1,48 @@
1 1
 /**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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
+/**
2 24
  * Conditionals.h
3 25
  * Defines that depend on configuration but are not editable.
4 26
  */
27
+
5 28
 #ifndef CONDITIONALS_H
6 29
 
30
+/**
31
+* Miscellaneous
32
+*/
7 33
 #ifndef M_PI
8 34
   #define M_PI 3.1415926536
9 35
 #endif
10 36
 
11
-#ifndef CONFIGURATION_LCD // Get the LCD defines which are needed first
37
+/**
38
+ * This value is used by M109 when tying to calculate a ballpark safe margin
39
+ * to prevent wait-forever situation.
40
+ */
41
+#ifndef EXTRUDE_MINTEMP
42
+ #define EXTRUDE_MINTEMP 170
43
+#endif
12 44
 
13
-  #define PIN_EXISTS(PN) (defined(PN##_PIN) && PN##_PIN >= 0)
45
+#ifndef CONFIGURATION_LCD // Get the LCD defines which are needed first
14 46
 
15 47
   #define CONFIGURATION_LCD
16 48
 
@@ -45,11 +77,26 @@
45 77
     #define DOGLCD  // Support for I2C LCD 128x64 (Controller SSD1306 graphic Display Family)
46 78
   #endif
47 79
 
48
-
49 80
   #if ENABLED(PANEL_ONE)
50 81
     #define ULTIMAKERCONTROLLER
51 82
   #endif
52 83
 
84
+  #if ENABLED(BQ_LCD_SMART_CONTROLLER)
85
+    #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
86
+
87
+    #ifndef ENCODER_PULSES_PER_STEP
88
+      #define ENCODER_PULSES_PER_STEP 4
89
+    #endif
90
+
91
+    #ifndef ENCODER_STEPS_PER_MENU_ITEM
92
+      #define ENCODER_STEPS_PER_MENU_ITEM 1
93
+    #endif
94
+
95
+    #ifndef LONG_FILENAME_HOST_SUPPORT
96
+      #define LONG_FILENAME_HOST_SUPPORT
97
+    #endif
98
+  #endif
99
+
53 100
   #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
54 101
     #define DOGLCD
55 102
     #define U8GLIB_ST7920
@@ -135,28 +182,35 @@
135 182
   // https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
136 183
 
137 184
   #if ENABLED(SAV_3DLCD)
138
-    #define SR_LCD_2W_NL    // Non latching 2 wire shiftregister
185
+    #define SR_LCD_2W_NL    // Non latching 2 wire shift register
139 186
     #define ULTIPANEL
140 187
     #define NEWPANEL
141 188
   #endif
142 189
 
190
+  #if ENABLED(DOGLCD) // Change number of lines to match the DOG graphic display
191
+    #ifndef LCD_WIDTH
192
+      #define LCD_WIDTH 22
193
+    #endif
194
+    #ifndef LCD_HEIGHT
195
+      #define LCD_HEIGHT 5
196
+    #endif
197
+  #endif
198
+
143 199
   #if ENABLED(ULTIPANEL)
144 200
     #define NEWPANEL  //enable this if you have a click-encoder panel
145 201
     #define ULTRA_LCD
146
-    #if ENABLED(DOGLCD) // Change number of lines to match the DOG graphic display
147
-      #define LCD_WIDTH 22
148
-      #define LCD_HEIGHT 5
149
-    #else
202
+    #ifndef LCD_WIDTH
150 203
       #define LCD_WIDTH 20
204
+    #endif
205
+    #ifndef LCD_HEIGHT
151 206
       #define LCD_HEIGHT 4
152 207
     #endif
153 208
   #else //no panel but just LCD
154 209
     #if ENABLED(ULTRA_LCD)
155
-      #if ENABLED(DOGLCD) // Change number of lines to match the 128x64 graphics display
156
-        #define LCD_WIDTH 22
157
-        #define LCD_HEIGHT 5
158
-      #else
210
+      #ifndef LCD_WIDTH
159 211
         #define LCD_WIDTH 16
212
+      #endif
213
+      #ifndef LCD_HEIGHT
160 214
         #define LCD_HEIGHT 2
161 215
       #endif
162 216
     #endif
@@ -221,20 +275,28 @@
221 275
   #include "Arduino.h"
222 276
 
223 277
   /**
224
-   * ENDSTOPPULLUPS
278
+   * Set ENDSTOPPULLUPS for unused endstop switches
225 279
    */
226 280
   #if ENABLED(ENDSTOPPULLUPS)
227
-    #if DISABLED(DISABLE_MAX_ENDSTOPS)
281
+    #if ENABLED(USE_XMAX_PLUG)
228 282
       #define ENDSTOPPULLUP_XMAX
283
+    #endif
284
+    #if ENABLED(USE_YMAX_PLUG)
229 285
       #define ENDSTOPPULLUP_YMAX
286
+    #endif
287
+    #if ENABLED(USE_ZMAX_PLUG)
230 288
       #define ENDSTOPPULLUP_ZMAX
231 289
     #endif
232
-    #if DISABLED(DISABLE_MIN_ENDSTOPS)
290
+    #if ENABLED(USE_XMIN_PLUG)
233 291
       #define ENDSTOPPULLUP_XMIN
292
+    #endif
293
+    #if ENABLED(USE_YMIN_PLUG)
234 294
       #define ENDSTOPPULLUP_YMIN
295
+    #endif
296
+    #if ENABLED(USE_ZMIN_PLUG)
235 297
       #define ENDSTOPPULLUP_ZMIN
236 298
     #endif
237
-    #if DISABLED(DISABLE_Z_MIN_PROBE_ENDSTOP)
299
+    #if ENABLED(DISABLE_Z_MIN_PROBE_ENDSTOP)
238 300
       #define ENDSTOPPULLUP_ZMIN_PROBE
239 301
     #endif
240 302
   #endif
@@ -242,9 +304,20 @@
242 304
   /**
243 305
    * Axis lengths
244 306
    */
245
-  #define X_MAX_LENGTH (X_MAX_POS - X_MIN_POS)
246
-  #define Y_MAX_LENGTH (Y_MAX_POS - Y_MIN_POS)
247
-  #define Z_MAX_LENGTH (Z_MAX_POS - Z_MIN_POS)
307
+  #define X_MAX_LENGTH (X_MAX_POS - (X_MIN_POS))
308
+  #define Y_MAX_LENGTH (Y_MAX_POS - (Y_MIN_POS))
309
+  #define Z_MAX_LENGTH (Z_MAX_POS - (Z_MIN_POS))
310
+
311
+  /**
312
+   * CoreXY and CoreXZ
313
+   */
314
+  #if ENABLED(COREXY)
315
+    #define CORE_AXIS_2 B_AXIS
316
+    #define CORE_AXIS_3 Z_AXIS
317
+  #elif ENABLED(COREXZ)
318
+    #define CORE_AXIS_2 C_AXIS
319
+    #define CORE_AXIS_3 Y_AXIS
320
+  #endif
248 321
 
249 322
   /**
250 323
    * SCARA
@@ -263,8 +336,8 @@
263 336
     #define Z_HOME_POS MANUAL_Z_HOME_POS
264 337
   #else //!MANUAL_HOME_POSITIONS – Use home switch positions based on homing direction and travel limits
265 338
     #if ENABLED(BED_CENTER_AT_0_0)
266
-      #define X_HOME_POS X_MAX_LENGTH * X_HOME_DIR * 0.5
267
-      #define Y_HOME_POS Y_MAX_LENGTH * Y_HOME_DIR * 0.5
339
+      #define X_HOME_POS (X_MAX_LENGTH) * (X_HOME_DIR) * 0.5
340
+      #define Y_HOME_POS (Y_MAX_LENGTH) * (Y_HOME_DIR) * 0.5
268 341
     #else
269 342
       #define X_HOME_POS (X_HOME_DIR < 0 ? X_MIN_POS : X_MAX_POS)
270 343
       #define Y_HOME_POS (Y_HOME_DIR < 0 ? Y_MIN_POS : Y_MAX_POS)
@@ -283,7 +356,7 @@
283 356
     #define MAX_PROBE_Y (min(Y_MAX_POS, Y_MAX_POS + Y_PROBE_OFFSET_FROM_EXTRUDER))
284 357
   #endif
285 358
 
286
-  #define SERVO_LEVELING (defined(AUTO_BED_LEVELING_FEATURE) && defined(Z_ENDSTOP_SERVO_NR))
359
+  #define SERVO_LEVELING (ENABLED(AUTO_BED_LEVELING_FEATURE) && defined(Z_ENDSTOP_SERVO_NR) && Z_ENDSTOP_SERVO_NR >= 0)
287 360
 
288 361
   /**
289 362
    * Sled Options
@@ -293,6 +366,13 @@
293 366
   #endif
294 367
 
295 368
   /**
369
+   * Avoid double-negatives for enabling features
370
+   */
371
+  #if DISABLED(DISABLE_HOST_KEEPALIVE)
372
+    #define HOST_KEEPALIVE_FEATURE
373
+  #endif
374
+
375
+  /**
296 376
    * MAX_STEP_FREQUENCY differs for TOSHIBA
297 377
    */
298 378
   #if ENABLED(CONFIG_STEPPERS_TOSHIBA)
@@ -312,14 +392,30 @@
312 392
    * Advance calculated values
313 393
    */
314 394
   #if ENABLED(ADVANCE)
315
-    #define EXTRUSION_AREA (0.25 * D_FILAMENT * D_FILAMENT * M_PI)
316
-    #define STEPS_PER_CUBIC_MM_E (axis_steps_per_unit[E_AXIS] / EXTRUSION_AREA)
395
+    #define EXTRUSION_AREA (0.25 * (D_FILAMENT) * (D_FILAMENT) * M_PI)
396
+    #define STEPS_PER_CUBIC_MM_E (axis_steps_per_unit[E_AXIS] / (EXTRUSION_AREA))
317 397
   #endif
318 398
 
319 399
   #if ENABLED(ULTIPANEL) && DISABLED(ELB_FULL_GRAPHIC_CONTROLLER)
320 400
     #undef SD_DETECT_INVERTED
321 401
   #endif
322 402
 
403
+  /**
404
+   * Set defaults for missing (newer) options
405
+   */
406
+  #ifndef DISABLE_INACTIVE_X
407
+    #define DISABLE_INACTIVE_X DISABLE_X
408
+  #endif
409
+  #ifndef DISABLE_INACTIVE_Y
410
+    #define DISABLE_INACTIVE_Y DISABLE_Y
411
+  #endif
412
+  #ifndef DISABLE_INACTIVE_Z
413
+    #define DISABLE_INACTIVE_Z DISABLE_Z
414
+  #endif
415
+  #ifndef DISABLE_INACTIVE_E
416
+    #define DISABLE_INACTIVE_E DISABLE_E
417
+  #endif
418
+
323 419
   // Power Signal Control Definitions
324 420
   // By default use ATX definition
325 421
   #ifndef POWER_SUPPLY
@@ -337,7 +433,10 @@
337 433
   /**
338 434
    * Temp Sensor defines
339 435
    */
340
-  #if TEMP_SENSOR_0 == -2
436
+  #if TEMP_SENSOR_0 == -3
437
+    #define HEATER_0_USES_MAX6675
438
+    #define MAX6675_IS_MAX31855
439
+  #elif TEMP_SENSOR_0 == -2
341 440
     #define HEATER_0_USES_MAX6675
342 441
   #elif TEMP_SENSOR_0 == -1
343 442
     #define HEATER_0_USES_AD595
@@ -349,7 +448,9 @@
349 448
     #define HEATER_0_USES_THERMISTOR
350 449
   #endif
351 450
 
352
-  #if TEMP_SENSOR_1 == -1
451
+  #if TEMP_SENSOR_1 <= -2
452
+    #error MAX6675 / MAX31855 Thermocouples not supported for TEMP_SENSOR_1
453
+  #elif TEMP_SENSOR_1 == -1
353 454
     #define HEATER_1_USES_AD595
354 455
   #elif TEMP_SENSOR_1 == 0
355 456
     #undef HEATER_1_MINTEMP
@@ -359,7 +460,9 @@
359 460
     #define HEATER_1_USES_THERMISTOR
360 461
   #endif
361 462
 
362
-  #if TEMP_SENSOR_2 == -1
463
+  #if TEMP_SENSOR_2 <= -2
464
+    #error MAX6675 / MAX31855 Thermocouples not supported for TEMP_SENSOR_2
465
+  #elif TEMP_SENSOR_2 == -1
363 466
     #define HEATER_2_USES_AD595
364 467
   #elif TEMP_SENSOR_2 == 0
365 468
     #undef HEATER_2_MINTEMP
@@ -369,7 +472,9 @@
369 472
     #define HEATER_2_USES_THERMISTOR
370 473
   #endif
371 474
 
372
-  #if TEMP_SENSOR_3 == -1
475
+  #if TEMP_SENSOR_3 <= -2
476
+    #error MAX6675 / MAX31855 Thermocouples not supported for TEMP_SENSOR_3
477
+  #elif TEMP_SENSOR_3 == -1
373 478
     #define HEATER_3_USES_AD595
374 479
   #elif TEMP_SENSOR_3 == 0
375 480
     #undef HEATER_3_MINTEMP
@@ -379,7 +484,9 @@
379 484
     #define HEATER_3_USES_THERMISTOR
380 485
   #endif
381 486
 
382
-  #if TEMP_SENSOR_BED == -1
487
+  #if TEMP_SENSOR_BED <= -2
488
+    #error MAX6675 / MAX31855 Thermocouples not supported for TEMP_SENSOR_BED
489
+  #elif TEMP_SENSOR_BED == -1
383 490
     #define BED_USES_AD595
384 491
   #elif TEMP_SENSOR_BED == 0
385 492
     #undef BED_MINTEMP
@@ -405,13 +512,54 @@
405 512
   #define ARRAY_BY_EXTRUDERS1(v1) ARRAY_BY_EXTRUDERS(v1, v1, v1, v1)
406 513
 
407 514
   /**
515
+   * Z_DUAL_ENDSTOPS endstop reassignment
516
+   */
517
+  #if ENABLED(Z_DUAL_ENDSTOPS)
518
+    #define _XMIN_ 100
519
+    #define _YMIN_ 200
520
+    #define _ZMIN_ 300
521
+    #define _XMAX_ 101
522
+    #define _YMAX_ 201
523
+    #define _ZMAX_ 301
524
+    const bool Z2_MAX_ENDSTOP_INVERTING =
525
+      #if Z2_USE_ENDSTOP == _XMAX_
526
+        X_MAX_ENDSTOP_INVERTING
527
+        #define Z2_MAX_PIN X_MAX_PIN
528
+        #undef USE_XMAX_PLUG
529
+      #elif Z2_USE_ENDSTOP == _YMAX_
530
+        Y_MAX_ENDSTOP_INVERTING
531
+        #define Z2_MAX_PIN Y_MAX_PIN
532
+        #undef USE_YMAX_PLUG
533
+      #elif Z2_USE_ENDSTOP == _ZMAX_
534
+        Z_MAX_ENDSTOP_INVERTING
535
+        #define Z2_MAX_PIN Z_MAX_PIN
536
+        #undef USE_ZMAX_PLUG
537
+      #elif Z2_USE_ENDSTOP == _XMIN_
538
+        X_MIN_ENDSTOP_INVERTING
539
+        #define Z2_MAX_PIN X_MIN_PIN
540
+        #undef USE_XMIN_PLUG
541
+      #elif Z2_USE_ENDSTOP == _YMIN_
542
+        Y_MIN_ENDSTOP_INVERTING
543
+        #define Z2_MAX_PIN Y_MIN_PIN
544
+        #undef USE_YMIN_PLUG
545
+      #elif Z2_USE_ENDSTOP == _ZMIN_
546
+        Z_MIN_ENDSTOP_INVERTING
547
+        #define Z2_MAX_PIN Z_MIN_PIN
548
+        #undef USE_ZMIN_PLUG
549
+      #else
550
+        0
551
+      #endif
552
+    ;
553
+  #endif
554
+
555
+  /**
408 556
    * Shorthand for pin tests, used wherever needed
409 557
    */
410
-  #define HAS_TEMP_0 (PIN_EXISTS(TEMP_0) && TEMP_SENSOR_0 != 0 && TEMP_SENSOR_0 != -2)
411
-  #define HAS_TEMP_1 (PIN_EXISTS(TEMP_1) && TEMP_SENSOR_1 != 0)
412
-  #define HAS_TEMP_2 (PIN_EXISTS(TEMP_2) && TEMP_SENSOR_2 != 0)
413
-  #define HAS_TEMP_3 (PIN_EXISTS(TEMP_3) && TEMP_SENSOR_3 != 0)
414
-  #define HAS_TEMP_BED (PIN_EXISTS(TEMP_BED) && TEMP_SENSOR_BED != 0)
558
+  #define HAS_TEMP_0 (PIN_EXISTS(TEMP_0) && TEMP_SENSOR_0 != 0 && TEMP_SENSOR_0 > -2)
559
+  #define HAS_TEMP_1 (PIN_EXISTS(TEMP_1) && TEMP_SENSOR_1 != 0 && TEMP_SENSOR_1 > -2)
560
+  #define HAS_TEMP_2 (PIN_EXISTS(TEMP_2) && TEMP_SENSOR_2 != 0 && TEMP_SENSOR_2 > -2)
561
+  #define HAS_TEMP_3 (PIN_EXISTS(TEMP_3) && TEMP_SENSOR_3 != 0 && TEMP_SENSOR_3 > -2)
562
+  #define HAS_TEMP_BED (PIN_EXISTS(TEMP_BED) && TEMP_SENSOR_BED != 0 && TEMP_SENSOR_BED > -2)
415 563
   #define HAS_HEATER_0 (PIN_EXISTS(HEATER_0))
416 564
   #define HAS_HEATER_1 (PIN_EXISTS(HEATER_1))
417 565
   #define HAS_HEATER_2 (PIN_EXISTS(HEATER_2))
@@ -422,14 +570,16 @@
422 570
   #define HAS_AUTO_FAN_2 (PIN_EXISTS(EXTRUDER_2_AUTO_FAN))
423 571
   #define HAS_AUTO_FAN_3 (PIN_EXISTS(EXTRUDER_3_AUTO_FAN))
424 572
   #define HAS_AUTO_FAN (HAS_AUTO_FAN_0 || HAS_AUTO_FAN_1 || HAS_AUTO_FAN_2 || HAS_AUTO_FAN_3)
425
-  #define HAS_FAN (PIN_EXISTS(FAN))
573
+  #define HAS_FAN0 (PIN_EXISTS(FAN))
574
+  #define HAS_FAN1 (PIN_EXISTS(FAN1) && CONTROLLERFAN_PIN != FAN1_PIN && EXTRUDER_0_AUTO_FAN_PIN != FAN1_PIN && EXTRUDER_1_AUTO_FAN_PIN != FAN1_PIN && EXTRUDER_2_AUTO_FAN_PIN != FAN1_PIN)
575
+  #define HAS_FAN2 (PIN_EXISTS(FAN2) && CONTROLLERFAN_PIN != FAN2_PIN && EXTRUDER_0_AUTO_FAN_PIN != FAN2_PIN && EXTRUDER_1_AUTO_FAN_PIN != FAN2_PIN && EXTRUDER_2_AUTO_FAN_PIN != FAN2_PIN)
426 576
   #define HAS_CONTROLLERFAN (PIN_EXISTS(CONTROLLERFAN))
427 577
   #define HAS_SERVOS (defined(NUM_SERVOS) && NUM_SERVOS > 0)
428 578
   #define HAS_SERVO_0 (PIN_EXISTS(SERVO0))
429 579
   #define HAS_SERVO_1 (PIN_EXISTS(SERVO1))
430 580
   #define HAS_SERVO_2 (PIN_EXISTS(SERVO2))
431 581
   #define HAS_SERVO_3 (PIN_EXISTS(SERVO3))
432
-  #define HAS_FILAMENT_SENSOR (ENABLED(FILAMENT_SENSOR) && PIN_EXISTS(FILWIDTH))
582
+  #define HAS_FILAMENT_WIDTH_SENSOR (PIN_EXISTS(FILWIDTH))
433 583
   #define HAS_FILRUNOUT (PIN_EXISTS(FILRUNOUT))
434 584
   #define HAS_HOME (PIN_EXISTS(HOME))
435 585
   #define HAS_KILL (PIN_EXISTS(KILL))
@@ -462,6 +612,7 @@
462 612
   #define HAS_E1_ENABLE (PIN_EXISTS(E1_ENABLE))
463 613
   #define HAS_E2_ENABLE (PIN_EXISTS(E2_ENABLE))
464 614
   #define HAS_E3_ENABLE (PIN_EXISTS(E3_ENABLE))
615
+  #define HAS_E4_ENABLE (PIN_EXISTS(E4_ENABLE))
465 616
   #define HAS_X_DIR (PIN_EXISTS(X_DIR))
466 617
   #define HAS_X2_DIR (PIN_EXISTS(X2_DIR))
467 618
   #define HAS_Y_DIR (PIN_EXISTS(Y_DIR))
@@ -472,6 +623,7 @@
472 623
   #define HAS_E1_DIR (PIN_EXISTS(E1_DIR))
473 624
   #define HAS_E2_DIR (PIN_EXISTS(E2_DIR))
474 625
   #define HAS_E3_DIR (PIN_EXISTS(E3_DIR))
626
+  #define HAS_E4_DIR (PIN_EXISTS(E4_DIR))
475 627
   #define HAS_X_STEP (PIN_EXISTS(X_STEP))
476 628
   #define HAS_X2_STEP (PIN_EXISTS(X2_STEP))
477 629
   #define HAS_Y_STEP (PIN_EXISTS(Y_STEP))
@@ -482,6 +634,11 @@
482 634
   #define HAS_E1_STEP (PIN_EXISTS(E1_STEP))
483 635
   #define HAS_E2_STEP (PIN_EXISTS(E2_STEP))
484 636
   #define HAS_E3_STEP (PIN_EXISTS(E3_STEP))
637
+  #define HAS_E4_STEP (PIN_EXISTS(E4_STEP))
638
+
639
+  #define HAS_MOTOR_CURRENT_PWM (PIN_EXISTS(MOTOR_CURRENT_PWM_XY) || PIN_EXISTS(MOTOR_CURRENT_PWM_Z) || PIN_EXISTS(MOTOR_CURRENT_PWM_E))
640
+
641
+  #define HAS_TEMP_HOTEND (HAS_TEMP_0 || ENABLED(HEATER_0_USES_MAX6675))
485 642
 
486 643
   /**
487 644
    * Helper Macros for heaters and extruder fan
@@ -504,9 +661,31 @@
504 661
   #if HAS_HEATER_BED
505 662
     #define WRITE_HEATER_BED(v) WRITE(HEATER_BED_PIN, v)
506 663
   #endif
507
-  #if HAS_FAN
664
+
665
+  /**
666
+   * Up to 3 PWM fans
667
+   */
668
+  #if HAS_FAN2
669
+    #define FAN_COUNT 3
670
+  #elif HAS_FAN1
671
+    #define FAN_COUNT 2
672
+  #elif HAS_FAN0
673
+    #define FAN_COUNT 1
674
+  #else
675
+    #define FAN_COUNT 0
676
+  #endif
677
+
678
+  #if HAS_FAN0
508 679
     #define WRITE_FAN(v) WRITE(FAN_PIN, v)
680
+    #define WRITE_FAN0(v) WRITE_FAN(v)
509 681
   #endif
682
+  #if HAS_FAN1
683
+    #define WRITE_FAN1(v) WRITE(FAN1_PIN, v)
684
+  #endif
685
+  #if HAS_FAN2
686
+    #define WRITE_FAN2(v) WRITE(FAN2_PIN, v)
687
+  #endif
688
+  #define WRITE_FAN_N(n, v) WRITE_FAN##n(v)
510 689
 
511 690
   #define HAS_BUZZER (PIN_EXISTS(BEEPER) || defined(LCD_USE_I2C_BUZZER))
512 691
 
@@ -526,5 +705,10 @@
526 705
     #endif
527 706
   #endif
528 707
 
708
+  #if ( (HAS_Z_MIN && ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)) || HAS_Z_PROBE ) && \
709
+    ( ENABLED(FIX_MOUNTED_PROBE) || defined(Z_ENDSTOP_SERVO_NR) || ENABLED(Z_PROBE_ALLEN_KEY) || ENABLED(Z_PROBE_SLED) )
710
+    #define HAS_Z_MIN_PROBE
711
+  #endif
712
+
529 713
 #endif //CONFIGURATION_LCD
530 714
 #endif //CONDITIONALS_H

+ 213
- 116
Marlin/Configuration.h View File

@@ -1,3 +1,40 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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
+/**
24
+ * Configuration.h
25
+ *
26
+ * Basic settings such as:
27
+ *
28
+ * - Type of electronics
29
+ * - Type of temperature sensor
30
+ * - Printer geometry
31
+ * - Endstop configuration
32
+ * - LCD controller
33
+ * - Extra features
34
+ *
35
+ * Advanced settings can be found in Configuration_adv.h
36
+ *
37
+ */
1 38
 #ifndef CONFIGURATION_H
2 39
 #define CONFIGURATION_H
3 40
 
@@ -7,8 +44,10 @@
7 44
 //===========================================================================
8 45
 //============================= Getting Started =============================
9 46
 //===========================================================================
10
-/*
11
-Here are some standard links for getting your machine calibrated:
47
+
48
+/**
49
+ * Here are some standard links for getting your machine calibrated:
50
+ *
12 51
  * http://reprap.org/wiki/Calibration
13 52
  * http://youtu.be/wAL9d7FgInk
14 53
  * http://calculator.josefprusa.cz
@@ -16,11 +55,7 @@ Here are some standard links for getting your machine calibrated:
16 55
  * http://www.thingiverse.com/thing:5573
17 56
  * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap
18 57
  * http://www.thingiverse.com/thing:298812
19
-*/
20
-
21
-// This configuration file contains the basic settings.
22
-// Advanced settings can be found in Configuration_adv.h
23
-// BASIC SETTINGS: select your board type, temperature sensor type, axis scaling, and endstop configuration
58
+ */
24 59
 
25 60
 //===========================================================================
26 61
 //============================= DELTA Printer ===============================
@@ -70,7 +105,7 @@ Here are some standard links for getting your machine calibrated:
70 105
 // The following define selects which electronics board you have.
71 106
 // Please choose the name from boards.h that matches your setup
72 107
 #ifndef MOTHERBOARD
73
-  #define MOTHERBOARD BOARD_RAMPS_13_EFB
108
+  #define MOTHERBOARD BOARD_RAMPS_14_EFB
74 109
 #endif
75 110
 
76 111
 // Optional custom name for your RepStrap or other custom machine
@@ -110,6 +145,7 @@ Here are some standard links for getting your machine calibrated:
110 145
 //--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table
111 146
 //
112 147
 //// Temperature sensor settings:
148
+// -3 is thermocouple with MAX31855 (only for sensor 0)
113 149
 // -2 is thermocouple with MAX6675 (only for sensor 0)
114 150
 // -1 is thermocouple with AD595
115 151
 // 0 is not used
@@ -129,6 +165,7 @@ Here are some standard links for getting your machine calibrated:
129 165
 // 13 is 100k Hisens 3950  1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
130 166
 // 20 is the PT100 circuit found in the Ultimainboard V2.x
131 167
 // 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
168
+// 70 is the 100K thermistor found in the bq Hephestos 2
132 169
 //
133 170
 //    1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k
134 171
 //                          (but gives greater accuracy and more stable PID)
@@ -144,7 +181,7 @@ Here are some standard links for getting your machine calibrated:
144 181
 //     Use it for Testing or Development purposes. NEVER for production machine.
145 182
 //#define DUMMY_THERMISTOR_998_VALUE 25
146 183
 //#define DUMMY_THERMISTOR_999_VALUE 100
147
-// :{ '0': "Not used", '4': "10k !! do not use for a hotend. Bad resolution at high temp. !!", '1': "100k / 4.7k - EPCOS", '51': "100k / 1k - EPCOS", '6': "100k / 4.7k EPCOS - Not as accurate as Table 1", '5': "100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '7': "100k / 4.7k Honeywell 135-104LAG-J01", '71': "100k / 4.7k Honeywell 135-104LAF-J01", '8': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9': "100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10': "100k / 4.7k RS 198-961", '11': "100k / 4.7k beta 3950 1%", '12': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13': "100k Hisens 3950  1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '60': "100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '55': "100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '2': "200k / 4.7k - ATC Semitec 204GT-2", '52': "200k / 1k - ATC Semitec 204GT-2", '-2': "Thermocouple + MAX6675 (only for sensor 0)", '-1': "Thermocouple + AD595", '3': "Mendel-parts / 4.7k", '1047': "Pt1000 / 4.7k", '1010': "Pt1000 / 1k (non standard)", '20': "PT100 (Ultimainboard V2.x)", '147': "Pt100 / 4.7k", '110': "Pt100 / 1k (non-standard)", '998': "Dummy 1", '999': "Dummy 2" }
184
+// :{ '0': "Not used", '4': "10k !! do not use for a hotend. Bad resolution at high temp. !!", '1': "100k / 4.7k - EPCOS", '51': "100k / 1k - EPCOS", '6': "100k / 4.7k EPCOS - Not as accurate as Table 1", '5': "100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '7': "100k / 4.7k Honeywell 135-104LAG-J01", '71': "100k / 4.7k Honeywell 135-104LAF-J01", '8': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9': "100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10': "100k / 4.7k RS 198-961", '11': "100k / 4.7k beta 3950 1%", '12': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13': "100k Hisens 3950  1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '60': "100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '55': "100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '2': "200k / 4.7k - ATC Semitec 204GT-2", '52': "200k / 1k - ATC Semitec 204GT-2", '-3': "Thermocouple + MAX31855 (only for sensor 0)", '-2': "Thermocouple + MAX6675 (only for sensor 0)", '-1': "Thermocouple + AD595", '3': "Mendel-parts / 4.7k", '1047': "Pt1000 / 4.7k", '1010': "Pt1000 / 1k (non standard)", '20': "PT100 (Ultimainboard V2.x)", '147': "Pt100 / 4.7k", '110': "Pt100 / 1k (non-standard)", '998': "Dummy 1", '999': "Dummy 2" }
148 185
 #define TEMP_SENSOR_0 1
149 186
 #define TEMP_SENSOR_1 0
150 187
 #define TEMP_SENSOR_2 0
@@ -178,14 +215,9 @@ Here are some standard links for getting your machine calibrated:
178 215
 #define HEATER_3_MAXTEMP 275
179 216
 #define BED_MAXTEMP 150
180 217
 
181
-// If your bed has low resistance e.g. .6 ohm and throws the fuse you can duty cycle it to reduce the
182
-// average current. The value should be an integer and the heat bed will be turned on for 1 interval of
183
-// HEATER_BED_DUTY_CYCLE_DIVIDER intervals.
184
-//#define HEATER_BED_DUTY_CYCLE_DIVIDER 4
185
-
186 218
 // If you want the M105 heater power reported in watts, define the BED_WATTS, and (shared for all extruders) EXTRUDER_WATTS
187
-//#define EXTRUDER_WATTS (12.0*12.0/6.7) //  P=I^2/R
188
-//#define BED_WATTS (12.0*12.0/1.1)      // P=I^2/R
219
+//#define EXTRUDER_WATTS (12.0*12.0/6.7) // P=U^2/R
220
+//#define BED_WATTS (12.0*12.0/1.1)      // P=U^2/R
189 221
 
190 222
 //===========================================================================
191 223
 //============================= PID Settings ================================
@@ -197,6 +229,7 @@ Here are some standard links for getting your machine calibrated:
197 229
 #define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
198 230
 #define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
199 231
 #if ENABLED(PIDTEMP)
232
+  //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
200 233
   //#define PID_DEBUG // Sends debug data to the serial port.
201 234
   //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
202 235
   //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -247,19 +280,19 @@ Here are some standard links for getting your machine calibrated:
247 280
 // so you shouldn't use it unless you are OK with PWM on your bed.  (see the comment on enabling PIDTEMPBED)
248 281
 #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
249 282
 
250
-//#define PID_BED_DEBUG // Sends debug data to the serial port.
251
-
252 283
 #if ENABLED(PIDTEMPBED)
253 284
 
285
+  //#define PID_BED_DEBUG // Sends debug data to the serial port.
286
+
254 287
   #define PID_BED_INTEGRAL_DRIVE_MAX MAX_BED_POWER //limit for the integral term
255 288
 
256
-  //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
289
+  //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
257 290
   //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
258 291
   #define  DEFAULT_bedKp 10.00
259 292
   #define  DEFAULT_bedKi .023
260 293
   #define  DEFAULT_bedKd 305.4
261 294
 
262
-  //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
295
+  //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
263 296
   //from pidautotune
264 297
   //#define  DEFAULT_bedKp 97.1
265 298
   //#define  DEFAULT_bedKi 1.41
@@ -284,16 +317,15 @@ Here are some standard links for getting your machine calibrated:
284 317
 //===========================================================================
285 318
 
286 319
 /**
287
- * Thermal Runaway Protection protects your printer from damage and fire if a
320
+ * Thermal Protection protects your printer from damage and fire if a
288 321
  * thermistor falls out or temperature sensors fail in any way.
289 322
  *
290 323
  * The issue: If a thermistor falls out or a temperature sensor fails,
291 324
  * Marlin can no longer sense the actual temperature. Since a disconnected
292 325
  * thermistor reads as a low temperature, the firmware will keep the heater on.
293 326
  *
294
- * The solution: Once the temperature reaches the target, start observing.
295
- * If the temperature stays too far below the target (hysteresis) for too long,
296
- * the firmware will halt as a safety precaution.
327
+ * If you get "Thermal Runaway" or "Heating failed" errors the
328
+ * details can be tuned in Configuration_adv.h
297 329
  */
298 330
 
299 331
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
@@ -314,8 +346,22 @@ Here are some standard links for getting your machine calibrated:
314 346
 // Enable this option for Toshiba steppers
315 347
 //#define CONFIG_STEPPERS_TOSHIBA
316 348
 
349
+//===========================================================================
350
+//============================== Endstop Settings ===========================
351
+//===========================================================================
352
+
317 353
 // @section homing
318 354
 
355
+// Specify here all the endstop connectors that are connected to any endstop or probe.
356
+// Almost all printers will be using one per axis. Probes will use one or more of the
357
+// extra connectors. Leave undefined any used for non-endstop and non-probe purposes.
358
+#define USE_XMIN_PLUG
359
+#define USE_YMIN_PLUG
360
+#define USE_ZMIN_PLUG
361
+//#define USE_XMAX_PLUG
362
+//#define USE_YMAX_PLUG
363
+//#define USE_ZMAX_PLUG
364
+
319 365
 // coarse Endstop Settings
320 366
 #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
321 367
 
@@ -338,13 +384,53 @@ const bool X_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
338 384
 const bool Y_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
339 385
 const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
340 386
 const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
341
-//#define DISABLE_MAX_ENDSTOPS
342
-//#define DISABLE_MIN_ENDSTOPS
343 387
 
344
-// If you want to enable the Z probe pin, but disable its use, uncomment the line below.
345
-// This only affects a Z probe endstop if you have separate Z min endstop as well and have
346
-// activated Z_MIN_PROBE_ENDSTOP below. If you are using the Z Min endstop on your Z probe,
347
-// this has no effect.
388
+//===========================================================================
389
+//============================= Z Probe Options =============================
390
+//===========================================================================
391
+
392
+// Enable Z_MIN_PROBE_ENDSTOP to use _both_ a Z Probe and a Z-min-endstop on the same machine.
393
+// With this option the Z_MIN_PROBE_PIN will only be used for probing, never for homing.
394
+//
395
+// *** PLEASE READ ALL INSTRUCTIONS BELOW FOR SAFETY! ***
396
+//
397
+// To continue using the Z-min-endstop for homing, be sure to disable Z_SAFE_HOMING.
398
+// Example: To park the head outside the bed area when homing with G28.
399
+//
400
+// To use a separate Z probe, your board must define a Z_MIN_PROBE_PIN.
401
+//
402
+// For a servo-based Z probe, you must set up servo support below, including
403
+// NUM_SERVOS, Z_ENDSTOP_SERVO_NR and SERVO_ENDSTOP_ANGLES.
404
+//
405
+// - RAMPS 1.3/1.4 boards may be able to use the 5V, GND, and Aux4->D32 pin.
406
+// - Use 5V for powered (usu. inductive) sensors.
407
+// - Otherwise connect:
408
+//   - normally-closed switches to GND and D32.
409
+//   - normally-open switches to 5V and D32.
410
+//
411
+// Normally-closed switches are advised and are the default.
412
+//
413
+// The Z_MIN_PROBE_PIN sets the Arduino pin to use. (See your board's pins file.)
414
+// Since the RAMPS Aux4->D32 pin maps directly to the Arduino D32 pin, D32 is the
415
+// default pin for all RAMPS-based boards. Some other boards map differently.
416
+// To set or change the pin for your board, edit the appropriate pins_XXXXX.h file.
417
+//
418
+// WARNING:
419
+// Setting the wrong pin may have unexpected and potentially disastrous consequences.
420
+// Use with caution and do your homework.
421
+//
422
+//#define Z_MIN_PROBE_ENDSTOP
423
+
424
+// Enable Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN to use the Z_MIN_PIN for your Z_MIN_PROBE.
425
+// The Z_MIN_PIN will then be used for both Z-homing and probing.
426
+#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
427
+
428
+// To use a probe you must enable one of the two options above!
429
+
430
+// This option disables the use of the Z_MIN_PROBE_PIN
431
+// To enable the Z probe pin but disable its use, uncomment the line below. This only affects a
432
+// Z probe switch if you have a separate Z min endstop also and have activated Z_MIN_PROBE_ENDSTOP above.
433
+// If you're using the Z MIN endstop connector for your Z probe, this has no effect.
348 434
 //#define DISABLE_Z_MIN_PROBE_ENDSTOP
349 435
 
350 436
 // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
@@ -354,11 +440,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
354 440
 #define Z_ENABLE_ON 0
355 441
 #define E_ENABLE_ON 0 // For all extruders
356 442
 
357
-// Disables axis when it's not being used.
443
+// Disables axis stepper immediately when it's not being used.
358 444
 // WARNING: When motors turn off there is a chance of losing position accuracy!
359 445
 #define DISABLE_X false
360 446
 #define DISABLE_Y false
361 447
 #define DISABLE_Z false
448
+// Warn on display about possibly reduced accuracy
449
+//#define DISABLE_REDUCED_ACCURACY_WARNING
362 450
 
363 451
 // @section extruder
364 452
 
@@ -381,6 +469,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
381 469
 #define INVERT_E3_DIR false
382 470
 
383 471
 // @section homing
472
+//#define MIN_Z_HEIGHT_FOR_HOMING 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
473
+                                    // Be sure you have this distance over your Z_MAX_POS in case.
384 474
 
385 475
 // ENDSTOP SETTINGS:
386 476
 // Sets direction of endstops when homing; 1=MAX, -1=MIN
@@ -416,24 +506,26 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
416 506
 #endif
417 507
 
418 508
 //===========================================================================
419
-//=========================== Manual Bed Leveling ===========================
509
+//============================ Mesh Bed Leveling ============================
420 510
 //===========================================================================
421 511
 
422
-//#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
423 512
 //#define MESH_BED_LEVELING    // Enable mesh bed leveling.
424 513
 
425
-#if ENABLED(MANUAL_BED_LEVELING)
426
-  #define MBL_Z_STEP 0.025  // Step size while manually probing Z axis.
427
-#endif  // MANUAL_BED_LEVELING
428
-
429 514
 #if ENABLED(MESH_BED_LEVELING)
430 515
   #define MESH_MIN_X 10
431
-  #define MESH_MAX_X (X_MAX_POS - MESH_MIN_X)
516
+  #define MESH_MAX_X (X_MAX_POS - (MESH_MIN_X))
432 517
   #define MESH_MIN_Y 10
433
-  #define MESH_MAX_Y (Y_MAX_POS - MESH_MIN_Y)
518
+  #define MESH_MAX_Y (Y_MAX_POS - (MESH_MIN_Y))
434 519
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
435 520
   #define MESH_NUM_Y_POINTS 3
436 521
   #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0.
522
+
523
+  //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
524
+
525
+  #if ENABLED(MANUAL_BED_LEVELING)
526
+    #define MBL_Z_STEP 0.025  // Step size while manually probing Z axis.
527
+  #endif  // MANUAL_BED_LEVELING
528
+
437 529
 #endif  // MESH_BED_LEVELING
438 530
 
439 531
 //===========================================================================
@@ -444,7 +536,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
444 536
 
445 537
 //#define AUTO_BED_LEVELING_FEATURE // Delete the comment to enable (remove // at the start of the line)
446 538
 //#define DEBUG_LEVELING_FEATURE
447
-#define Z_MIN_PROBE_REPEATABILITY_TEST  // If not commented out, Z-Probe Repeatability test will be included if Auto Bed Leveling is Enabled.
539
+#define Z_MIN_PROBE_REPEATABILITY_TEST  // If not commented out, Z Probe Repeatability test will be included if Auto Bed Leveling is Enabled.
448 540
 
449 541
 #if ENABLED(AUTO_BED_LEVELING_FEATURE)
450 542
 
@@ -456,7 +548,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
456 548
   //   This mode is preferred because there are more measurements.
457 549
   //
458 550
   // - "3-point" mode
459
-  //   Probe 3 arbitrary points on the bed (that aren't colinear)
551
+  //   Probe 3 arbitrary points on the bed (that aren't collinear)
460 552
   //   You specify the XY coordinates of all 3 points.
461 553
 
462 554
   // Enable this to sample the bed in a grid (least squares solution).
@@ -478,25 +570,37 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
478 570
 
479 571
   #else  // !AUTO_BED_LEVELING_GRID
480 572
 
481
-      // Arbitrary points to probe.
482
-      // A simple cross-product is used to estimate the plane of the bed.
483
-      #define ABL_PROBE_PT_1_X 15
484
-      #define ABL_PROBE_PT_1_Y 180
485
-      #define ABL_PROBE_PT_2_X 15
486
-      #define ABL_PROBE_PT_2_Y 20
487
-      #define ABL_PROBE_PT_3_X 170
488
-      #define ABL_PROBE_PT_3_Y 20
573
+    // Arbitrary points to probe.
574
+    // A simple cross-product is used to estimate the plane of the bed.
575
+    #define ABL_PROBE_PT_1_X 15
576
+    #define ABL_PROBE_PT_1_Y 180
577
+    #define ABL_PROBE_PT_2_X 15
578
+    #define ABL_PROBE_PT_2_Y 20
579
+    #define ABL_PROBE_PT_3_X 170
580
+    #define ABL_PROBE_PT_3_Y 20
489 581
 
490 582
   #endif // AUTO_BED_LEVELING_GRID
491 583
 
492
-  // Offsets to the Z probe relative to the nozzle tip.
584
+  // Z Probe to nozzle (X,Y) offset, relative to (0, 0).
493 585
   // X and Y offsets must be integers.
494
-  #define X_PROBE_OFFSET_FROM_EXTRUDER -25     // Z probe to nozzle X offset: -left  +right
495
-  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29     // Z probe to nozzle Y offset: -front +behind
496
-  #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35  // Z probe to nozzle Z offset: -below (always!)
497
-
498
-  #define Z_RAISE_BEFORE_HOMING 4       // (in mm) Raise Z axis before homing (G28) for Z probe clearance.
499
-                                        // Be sure you have this distance over your Z_MAX_POS in case.
586
+  //
587
+  // In the following example the X and Y offsets are both positive:
588
+  // #define X_PROBE_OFFSET_FROM_EXTRUDER 10
589
+  // #define Y_PROBE_OFFSET_FROM_EXTRUDER 10
590
+  //
591
+  //    +-- BACK ---+
592
+  //    |           |
593
+  //  L |    (+) P  | R <-- probe (20,20)
594
+  //  E |           | I
595
+  //  F | (-) N (+) | G <-- nozzle (10,10)
596
+  //  T |           | H
597
+  //    |    (-)    | T
598
+  //    |           |
599
+  //    O-- FRONT --+
600
+  //  (0,0)
601
+  #define X_PROBE_OFFSET_FROM_EXTRUDER 10  // X offset: -left  [of the nozzle] +right
602
+  #define Y_PROBE_OFFSET_FROM_EXTRUDER 10  // Y offset: -front [of the nozzle] +behind
603
+  #define Z_PROBE_OFFSET_FROM_EXTRUDER 0   // Z offset: -below [the nozzle] (always negative!)
500 604
 
501 605
   #define XY_TRAVEL_SPEED 8000         // X and Y axis travel speed between probes, in mm/min.
502 606
 
@@ -504,17 +608,29 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
504 608
   #define Z_RAISE_BETWEEN_PROBINGS 5  // How much the Z axis will be raised when traveling from between next probing points.
505 609
   #define Z_RAISE_AFTER_PROBING 15    // How much the Z axis will be raised after the last probing point.
506 610
 
507
-//#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" // These commands will be executed in the end of G29 routine.
508
-                                                                            // Useful to retract a deployable Z probe.
611
+  //#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" // These commands will be executed in the end of G29 routine.
612
+                                                                             // Useful to retract a deployable Z probe.
509 613
 
510
-  //#define Z_PROBE_SLED // Turn on if you have a Z probe mounted on a sled like those designed by Charles Bell.
511
-  //#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
614
+  // Probes are sensors/switches that need to be activated before they can be used
615
+  // and deactivated after the use.
616
+  // Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, ... . You have to activate one of these for the AUTO_BED_LEVELING_FEATURE
617
+
618
+  // A fix mounted probe, like the normal inductive probe, must be deactivated to go below Z_PROBE_OFFSET_FROM_EXTRUDER
619
+  // when the hardware endstops are active.
620
+  //#define FIX_MOUNTED_PROBE
621
+
622
+  // A Servo Probe can be defined in the servo section below.
512 623
 
624
+  // An Allen Key Probe is currently predefined only in the delta example configurations.
513 625
 
514
-  //If you have enabled the Bed Auto Leveling and are using the same Z Probe for Z Homing,
515
-  //it is highly recommended you let this Z_SAFE_HOMING enabled!!!
626
+  //#define Z_PROBE_SLED // Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
627
+  //#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
628
+
629
+  // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing,
630
+  // it is highly recommended you leave Z_SAFE_HOMING enabled!
516 631
 
517
-  #define Z_SAFE_HOMING   // This feature is meant to avoid Z homing with Z probe outside the bed area.
632
+  #define Z_SAFE_HOMING   // Use the z-min-probe for homing to z-min - not the z-min-endstop.
633
+                          // This feature is meant to avoid Z homing with Z probe outside the bed area.
518 634
                           // When defined, it will:
519 635
                           // - Allow Z homing only after X and Y homing AND stepper drivers still enabled.
520 636
                           // - If stepper drivers timeout, it will need X and Y homing again before Z homing.
@@ -528,37 +644,6 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
528 644
 
529 645
   #endif
530 646
 
531
-  // Support for a dedicated Z probe endstop separate from the Z min endstop.
532
-  // If you would like to use both a Z probe and a Z min endstop together,
533
-  // uncomment #define Z_MIN_PROBE_ENDSTOP and read the instructions below.
534
-  // If you still want to use the Z min endstop for homing, disable Z_SAFE_HOMING above.
535
-  // Example: To park the head outside the bed area when homing with G28.
536
-  //
537
-  // WARNING:
538
-  // The Z min endstop will need to set properly as it would without a Z probe
539
-  // to prevent head crashes and premature stopping during a print.
540
-  //
541
-  // To use a separate Z probe endstop, you must have a Z_MIN_PROBE_PIN
542
-  // defined in the pins_XXXXX.h file for your control board.
543
-  // If you are using a servo based Z probe, you will need to enable NUM_SERVOS,
544
-  // Z_ENDSTOP_SERVO_NR and SERVO_ENDSTOP_ANGLES in the R/C SERVO support below.
545
-  // RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin
546
-  // in the Aux 4 section of the RAMPS board. Use 5V for powered sensors,
547
-  // otherwise connect to ground and D32 for normally closed configuration
548
-  // and 5V and D32 for normally open configurations.
549
-  // Normally closed configuration is advised and assumed.
550
-  // The D32 pin in Aux 4 on RAMPS maps to the Arduino D32 pin.
551
-  // Z_MIN_PROBE_PIN is setting the pin to use on the Arduino.
552
-  // Since the D32 pin on the RAMPS maps to D32 on Arduino, this works.
553
-  // D32 is currently selected in the RAMPS 1.3/1.4 pin file.
554
-  // All other boards will need changes to the respective pins_XXXXX.h file.
555
-  //
556
-  // WARNING:
557
-  // Setting the wrong pin may have unexpected and potentially disastrous outcomes.
558
-  // Use with caution and do your homework.
559
-  //
560
-  //#define Z_MIN_PROBE_ENDSTOP
561
-
562 647
 #endif // AUTO_BED_LEVELING_FEATURE
563 648
 
564 649
 
@@ -633,6 +718,14 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
633 718
 #endif
634 719
 
635 720
 //
721
+// Host Keepalive
722
+//
723
+// By default Marlin will send a busy status message to the host
724
+// every 10 seconds when it can't accept commands.
725
+//
726
+//#define DISABLE_HOST_KEEPALIVE // Enable this option if your host doesn't like keepalive messages.
727
+
728
+//
636 729
 // M100 Free Memory Watcher
637 730
 //
638 731
 //#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
@@ -652,13 +745,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
652 745
 // @section lcd
653 746
 
654 747
 // Define your display language below. Replace (en) with your language code and uncomment.
655
-// en, pl, fr, de, es, ru, bg, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, cn, test
748
+// en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8, fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test
656 749
 // See also language.h
657 750
 #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
658 751
 
659 752
 // Choose ONE of these 3 charsets. This has to match your hardware. Ignored for full graphic display.
660 753
 // To find out what type you have - compile with (test) - upload - click to get the menu. You'll see two typical lines from the upper half of the charset.
661
-// See also documentation/LCDLanguageFont.md
754
+// See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
662 755
   #define DISPLAY_CHARSET_HD44780_JAPAN        // this is the most common hardware
663 756
   //#define DISPLAY_CHARSET_HD44780_WESTERN
664 757
   //#define DISPLAY_CHARSET_HD44780_CYRILLIC
@@ -666,12 +759,12 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
666 759
 //#define ULTRA_LCD  //general LCD support, also 16x2
667 760
 //#define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
668 761
 //#define SDSUPPORT // Enable SD Card Support in Hardware Console
669
-// Changed behaviour! If you need SDSUPPORT uncomment it!
670
-//#define SDSLOW // Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
671
-//#define SDEXTRASLOW // Use even slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
762
+                    // Changed behaviour! If you need SDSUPPORT uncomment it!
763
+//#define SPI_SPEED SPI_HALF_SPEED // (also SPI_QUARTER_SPEED, SPI_EIGHTH_SPEED) Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
672 764
 //#define SD_CHECK_AND_RETRY // Use CRC checks and retries on the SD communication
673 765
 //#define ENCODER_PULSES_PER_STEP 1 // Increase if you have a high resolution encoder
674 766
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
767
+//#define REVERSE_MENU_DIRECTION // When enabled CLOCKWISE moves UP in the LCD menu
675 768
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
676 769
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
677 770
 //#define SPEAKER // The sound device is a speaker - not a buzzer. A buzzer resonates with his own frequency.
@@ -688,13 +781,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
688 781
 
689 782
 // The Panucatt Devices Viki 2.0 and mini Viki with Graphic LCD
690 783
 // http://panucatt.com
691
-// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
784
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
692 785
 //#define VIKI2
693 786
 //#define miniVIKI
694 787
 
695 788
 // This is a new controller currently under development.  https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
696 789
 //
697
-// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
790
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
698 791
 //#define ELB_FULL_GRAPHIC_CONTROLLER
699 792
 //#define SD_DETECT_INVERTED
700 793
 
@@ -709,7 +802,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
709 802
 // The RepRapDiscount FULL GRAPHIC Smart Controller (quadratic white PCB)
710 803
 // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
711 804
 //
712
-// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
805
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
713 806
 //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
714 807
 
715 808
 // The RepRapWorld REPRAPWORLD_KEYPAD v1.1
@@ -732,6 +825,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
732 825
 
733 826
 //#define LCD_I2C_SAINSMART_YWROBOT
734 827
 
828
+//#define LCM1602 // LCM1602 Adapter for 16x2 LCD
829
+
735 830
 // PANELOLU2 LCD with status LEDs, separate encoder and click inputs
736 831
 //
737 832
 // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
@@ -743,9 +838,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
743 838
 
744 839
 // Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs
745 840
 //#define LCD_I2C_VIKI
746
-  
841
+
747 842
 // SSD1306 OLED generic display support
748
-// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
843
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
749 844
 //#define U8GLIB_SSD1306
750 845
 
751 846
 // Shift register panels
@@ -757,7 +852,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
757 852
 
758 853
 // @section extras
759 854
 
760
-// Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
855
+// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino
761 856
 //#define FAST_PWM_FAN
762 857
 
763 858
 // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
@@ -837,21 +932,23 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
837 932
  * Note may require analog pins to be defined for different motherboards
838 933
  **********************************************************************/
839 934
 // Uncomment below to enable
840
-//#define FILAMENT_SENSOR
841
-
842
-#define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
843
-#define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
935
+//#define FILAMENT_WIDTH_SENSOR
844 936
 
845 937
 #define DEFAULT_NOMINAL_FILAMENT_DIA 3.00  //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software.  Used for sensor reading validation
846
-#define MEASURED_UPPER_LIMIT         3.30  //upper limit factor used for sensor reading validation in mm
847
-#define MEASURED_LOWER_LIMIT         1.90  //lower limit factor for sensor reading validation in mm
848
-#define MAX_MEASUREMENT_DELAY       20     //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM  and lower number saves RAM)
849 938
 
850
-//defines used in the code
851
-#define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially
939
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
940
+  #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
941
+  #define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
942
+
943
+  #define MEASURED_UPPER_LIMIT         3.30  //upper limit factor used for sensor reading validation in mm
944
+  #define MEASURED_LOWER_LIMIT         1.90  //lower limit factor for sensor reading validation in mm
945
+  #define MAX_MEASUREMENT_DELAY       20     //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM  and lower number saves RAM)
852 946
 
853
-//When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status.  Status will appear for 5 sec.
854
-//#define FILAMENT_LCD_DISPLAY
947
+  #define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially
948
+
949
+  //When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status.  Status will appear for 5 sec.
950
+  //#define FILAMENT_LCD_DISPLAY
951
+#endif
855 952
 
856 953
 #include "Configuration_adv.h"
857 954
 #include "thermistortables.h"

+ 140
- 84
Marlin/Configuration_adv.h View File

@@ -1,3 +1,35 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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
+/**
24
+ * Configuration_adv.h
25
+ *
26
+ * Advanced settings.
27
+ * Only change these if you know exactly what you're doing.
28
+ * Some of these settings can damage your printer if improperly set!
29
+ *
30
+ * Basic settings can be found in Configuration.h
31
+ *
32
+ */
1 33
 #ifndef CONFIGURATION_ADV_H
2 34
 #define CONFIGURATION_ADV_H
3 35
 
@@ -9,13 +41,26 @@
9 41
 //=============================Thermal Settings  ============================
10 42
 //===========================================================================
11 43
 
12
-#if ENABLED(BED_LIMIT_SWITCHING)
13
-  #define BED_HYSTERESIS 2 //only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS
44
+#if DISABLED(PIDTEMPBED)
45
+  #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control
46
+  #if ENABLED(BED_LIMIT_SWITCHING)
47
+    #define BED_HYSTERESIS 2 // Only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS
48
+  #endif
14 49
 #endif
15
-#define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control
16 50
 
17 51
 /**
18
- * Thermal Protection parameters
52
+ * Thermal Protection protects your printer from damage and fire if a
53
+ * thermistor falls out or temperature sensors fail in any way.
54
+ *
55
+ * The issue: If a thermistor falls out or a temperature sensor fails,
56
+ * Marlin can no longer sense the actual temperature. Since a disconnected
57
+ * thermistor reads as a low temperature, the firmware will keep the heater on.
58
+ *
59
+ * The solution: Once the temperature reaches the target, start observing.
60
+ * If the temperature stays too far below the target (hysteresis) for too long (period),
61
+ * the firmware will halt the machine as a safety precaution.
62
+ *
63
+ * If you get false positives for "Thermal Runaway" increase THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
19 64
  */
20 65
 #if ENABLED(THERMAL_PROTECTION_HOTENDS)
21 66
   #define THERMAL_PROTECTION_PERIOD 40        // Seconds
@@ -26,11 +71,19 @@
26 71
    * WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
27 72
    * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
28 73
    * but only if the current temperature is far enough below the target for a reliable test.
74
+   *
75
+   * If you get false positives for "Heating failed" increase WATCH_TEMP_PERIOD and/or decrease WATCH_TEMP_INCREASE
76
+   * WATCH_TEMP_INCREASE should not be below 2.
29 77
    */
30
-  #define WATCH_TEMP_PERIOD 16                // Seconds
31
-  #define WATCH_TEMP_INCREASE 4               // Degrees Celsius
78
+  #define WATCH_TEMP_PERIOD 20                // Seconds
79
+  #define WATCH_TEMP_INCREASE 2               // Degrees Celsius
32 80
 #endif
33 81
 
82
+/**
83
+ * Thermal Protection parameters for the bed
84
+ * are like the above for the hotends.
85
+ * WATCH_TEMP_BED_PERIOD and WATCH_TEMP_BED_INCREASE are not imlemented now.
86
+ */
34 87
 #if ENABLED(THERMAL_PROTECTION_BED)
35 88
   #define THERMAL_PROTECTION_BED_PERIOD 20    // Seconds
36 89
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
@@ -52,7 +105,7 @@
52 105
  * The maximum buffered steps/sec of the extruder motor is called "se".
53 106
  * Start autotemp mode with M109 S<mintemp> B<maxtemp> F<factor>
54 107
  * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by
55
- * mintemp and maxtemp. Turn this off by excuting M109 without F*
108
+ * mintemp and maxtemp. Turn this off by executing M109 without F*
56 109
  * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp.
57 110
  * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
58 111
  */
@@ -137,7 +190,7 @@
137 190
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
138 191
 
139 192
   // 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.
140
-  // That way the machine is capable to align the bed during home, since both Z steppers are homed. 
193
+  // That way the machine is capable to align the bed during home, since both Z steppers are homed.
141 194
   // There is also an implementation of M666 (software endstops adjustment) to this feature.
142 195
   // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed.
143 196
   // 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.
@@ -148,9 +201,7 @@
148 201
   //#define Z_DUAL_ENDSTOPS
149 202
 
150 203
   #if ENABLED(Z_DUAL_ENDSTOPS)
151
-    #define Z2_MAX_PIN 36                     //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36)
152
-    const bool Z2_MAX_ENDSTOP_INVERTING = false;
153
-    #define DISABLE_XMAX_ENDSTOP              //Better to disable the XMAX to avoid conflict. Just rename "XMAX_ENDSTOP" by the endstop you are using for Z2 axis.
204
+    #define Z2_USE_ENDSTOP _XMAX_
154 205
   #endif
155 206
 
156 207
 #endif // Z_DUAL_STEPPER_DRIVERS
@@ -232,7 +283,13 @@
232 283
 #define INVERT_E_STEP_PIN false
233 284
 
234 285
 // Default stepper release if idle. Set to 0 to deactivate.
235
-#define DEFAULT_STEPPER_DEACTIVE_TIME 60
286
+// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true.
287
+// Time can be set by M18 and M84.
288
+#define DEFAULT_STEPPER_DEACTIVE_TIME 120
289
+#define DISABLE_INACTIVE_X true
290
+#define DISABLE_INACTIVE_Y true
291
+#define DISABLE_INACTIVE_Z true  // set to false if the nozzle will fall down on your printed part when print has finished.
292
+#define DISABLE_INACTIVE_E true
236 293
 
237 294
 #define DEFAULT_MINIMUMFEEDRATE       0.0     // minimum feedrate
238 295
 #define DEFAULT_MINTRAVELFEEDRATE     0.0
@@ -268,6 +325,9 @@
268 325
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
269 326
 #define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
270 327
 
328
+// Motor Current controlled via PWM (Overridable on supported boards with PWM-driven motor driver current)
329
+//#define PWM_MOTOR_CURRENT {1300, 1300, 1250} // Values in milliamps
330
+
271 331
 // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
272 332
 //#define DIGIPOT_I2C
273 333
 // Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8
@@ -335,8 +395,8 @@
335 395
   // save 3120 bytes of PROGMEM by commenting out #define USE_BIG_EDIT_FONT
336 396
   // we don't have a big font for Cyrillic, Kana
337 397
   //#define USE_BIG_EDIT_FONT
338
- 
339
-  // If you have spare 2300Byte of progmem and want to use a 
398
+
399
+  // If you have spare 2300Byte of progmem and want to use a
340 400
   // smaller font on the Info-screen uncomment the next line.
341 401
   //#define USE_SMALL_INFOFONT
342 402
 #endif // DOGLCD
@@ -344,13 +404,13 @@
344 404
 // @section more
345 405
 
346 406
 // The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
347
-//#define USE_WATCHDOG
407
+#define USE_WATCHDOG
348 408
 
349 409
 #if ENABLED(USE_WATCHDOG)
350
-// If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
351
-// The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset.
352
-//  However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled.
353
-//#define WATCHDOG_RESET_MANUAL
410
+  // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
411
+  // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset.
412
+  //  However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled.
413
+  //#define WATCHDOG_RESET_MANUAL
354 414
 #endif
355 415
 
356 416
 // @section lcd
@@ -361,7 +421,7 @@
361 421
 //#define BABYSTEPPING
362 422
 #if ENABLED(BABYSTEPPING)
363 423
   #define BABYSTEP_XY  //not only z, but also XY in the menu. more clutter, more functions
364
-                       //not implemented for CoreXY and deltabots!
424
+                       //not implemented for deltabots!
365 425
   #define BABYSTEP_INVERT_Z false  //true for inverse movements in Z
366 426
   #define BABYSTEP_MULTIPLICATOR 1 //faster movements
367 427
 #endif
@@ -380,7 +440,6 @@
380 440
 #if ENABLED(ADVANCE)
381 441
   #define EXTRUDER_ADVANCE_K .0
382 442
   #define D_FILAMENT 2.85
383
-  #define STEPS_MM_E 836
384 443
 #endif
385 444
 
386 445
 // @section extras
@@ -389,7 +448,7 @@
389 448
 #define MM_PER_ARC_SEGMENT 1
390 449
 #define N_ARC_CORRECTION 25
391 450
 
392
-const unsigned int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement
451
+const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement
393 452
 
394 453
 // @section temperature
395 454
 
@@ -461,8 +520,8 @@ const unsigned int dropsegments=5; //everything with less than this number of st
461 520
 #endif
462 521
 
463 522
 /******************************************************************************\
464
- * enable this section if you have TMC26X motor drivers. 
465
- * you need to import the TMC26XStepper library into the arduino IDE for this
523
+ * enable this section if you have TMC26X motor drivers.
524
+ * you need to import the TMC26XStepper library into the Arduino IDE for this
466 525
  ******************************************************************************/
467 526
 
468 527
 // @section tmc
@@ -470,61 +529,61 @@ const unsigned int dropsegments=5; //everything with less than this number of st
470 529
 //#define HAVE_TMCDRIVER
471 530
 #if ENABLED(HAVE_TMCDRIVER)
472 531
 
473
-//#define X_IS_TMC
532
+  //#define X_IS_TMC
474 533
   #define X_MAX_CURRENT 1000  //in mA
475 534
   #define X_SENSE_RESISTOR 91 //in mOhms
476 535
   #define X_MICROSTEPS 16     //number of microsteps
477
-  
478
-//#define X2_IS_TMC
536
+
537
+  //#define X2_IS_TMC
479 538
   #define X2_MAX_CURRENT 1000  //in mA
480 539
   #define X2_SENSE_RESISTOR 91 //in mOhms
481 540
   #define X2_MICROSTEPS 16     //number of microsteps
482
-  
483
-//#define Y_IS_TMC
541
+
542
+  //#define Y_IS_TMC
484 543
   #define Y_MAX_CURRENT 1000  //in mA
485 544
   #define Y_SENSE_RESISTOR 91 //in mOhms
486 545
   #define Y_MICROSTEPS 16     //number of microsteps
487
-  
488
-//#define Y2_IS_TMC
546
+
547
+  //#define Y2_IS_TMC
489 548
   #define Y2_MAX_CURRENT 1000  //in mA
490 549
   #define Y2_SENSE_RESISTOR 91 //in mOhms
491
-  #define Y2_MICROSTEPS 16     //number of microsteps 
492
-  
493
-//#define Z_IS_TMC
550
+  #define Y2_MICROSTEPS 16     //number of microsteps
551
+
552
+  //#define Z_IS_TMC
494 553
   #define Z_MAX_CURRENT 1000  //in mA
495 554
   #define Z_SENSE_RESISTOR 91 //in mOhms
496 555
   #define Z_MICROSTEPS 16     //number of microsteps
497
-  
498
-//#define Z2_IS_TMC
556
+
557
+  //#define Z2_IS_TMC
499 558
   #define Z2_MAX_CURRENT 1000  //in mA
500 559
   #define Z2_SENSE_RESISTOR 91 //in mOhms
501 560
   #define Z2_MICROSTEPS 16     //number of microsteps
502
-  
503
-//#define E0_IS_TMC
561
+
562
+  //#define E0_IS_TMC
504 563
   #define E0_MAX_CURRENT 1000  //in mA
505 564
   #define E0_SENSE_RESISTOR 91 //in mOhms
506 565
   #define E0_MICROSTEPS 16     //number of microsteps
507
-  
508
-//#define E1_IS_TMC
566
+
567
+  //#define E1_IS_TMC
509 568
   #define E1_MAX_CURRENT 1000  //in mA
510 569
   #define E1_SENSE_RESISTOR 91 //in mOhms
511
-  #define E1_MICROSTEPS 16     //number of microsteps 
512
-  
513
-//#define E2_IS_TMC
570
+  #define E1_MICROSTEPS 16     //number of microsteps
571
+
572
+  //#define E2_IS_TMC
514 573
   #define E2_MAX_CURRENT 1000  //in mA
515 574
   #define E2_SENSE_RESISTOR 91 //in mOhms
516
-  #define E2_MICROSTEPS 16     //number of microsteps 
517
-  
518
-//#define E3_IS_TMC
575
+  #define E2_MICROSTEPS 16     //number of microsteps
576
+
577
+  //#define E3_IS_TMC
519 578
   #define E3_MAX_CURRENT 1000  //in mA
520 579
   #define E3_SENSE_RESISTOR 91 //in mOhms
521
-  #define E3_MICROSTEPS 16     //number of microsteps   
580
+  #define E3_MICROSTEPS 16     //number of microsteps
522 581
 
523 582
 #endif
524 583
 
525 584
 /******************************************************************************\
526
- * enable this section if you have L6470  motor drivers. 
527
- * you need to import the L6470 library into the arduino IDE for this
585
+ * enable this section if you have L6470  motor drivers.
586
+ * you need to import the L6470 library into the Arduino IDE for this
528 587
  ******************************************************************************/
529 588
 
530 589
 // @section l6470
@@ -532,69 +591,66 @@ const unsigned int dropsegments=5; //everything with less than this number of st
532 591
 //#define HAVE_L6470DRIVER
533 592
 #if ENABLED(HAVE_L6470DRIVER)
534 593
 
535
-//#define X_IS_L6470
594
+  //#define X_IS_L6470
536 595
   #define X_MICROSTEPS 16     //number of microsteps
537
-  #define X_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
596
+  #define X_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
538 597
   #define X_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
539 598
   #define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall
540
-  
541
-//#define X2_IS_L6470
599
+
600
+  //#define X2_IS_L6470
542 601
   #define X2_MICROSTEPS 16     //number of microsteps
543
-  #define X2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
602
+  #define X2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
544 603
   #define X2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
545 604
   #define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
546
-  
547
-//#define Y_IS_L6470
605
+
606
+  //#define Y_IS_L6470
548 607
   #define Y_MICROSTEPS 16     //number of microsteps
549
-  #define Y_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
608
+  #define Y_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
550 609
   #define Y_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
551 610
   #define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall
552
-  
553
-//#define Y2_IS_L6470
554
-  #define Y2_MICROSTEPS 16     //number of microsteps 
555
-  #define Y2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
611
+
612
+  //#define Y2_IS_L6470
613
+  #define Y2_MICROSTEPS 16     //number of microsteps
614
+  #define Y2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
556 615
   #define Y2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
557
-  #define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall 
558
-  
559
-//#define Z_IS_L6470
616
+  #define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
617
+
618
+  //#define Z_IS_L6470
560 619
   #define Z_MICROSTEPS 16     //number of microsteps
561
-  #define Z_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
620
+  #define Z_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
562 621
   #define Z_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
563 622
   #define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall
564
-  
565
-//#define Z2_IS_L6470
623
+
624
+  //#define Z2_IS_L6470
566 625
   #define Z2_MICROSTEPS 16     //number of microsteps
567
-  #define Z2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
626
+  #define Z2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
568 627
   #define Z2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
569 628
   #define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
570
-  
571
-//#define E0_IS_L6470
629
+
630
+  //#define E0_IS_L6470
572 631
   #define E0_MICROSTEPS 16     //number of microsteps
573
-  #define E0_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
632
+  #define E0_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
574 633
   #define E0_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
575 634
   #define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall
576
-  
577
-//#define E1_IS_L6470
578
-  #define E1_MICROSTEPS 16     //number of microsteps 
635
+
636
+  //#define E1_IS_L6470
579 637
   #define E1_MICROSTEPS 16     //number of microsteps
580
-  #define E1_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
638
+  #define E1_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
581 639
   #define E1_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
582 640
   #define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall
583
-  
584
-//#define E2_IS_L6470
585
-  #define E2_MICROSTEPS 16     //number of microsteps 
641
+
642
+  //#define E2_IS_L6470
586 643
   #define E2_MICROSTEPS 16     //number of microsteps
587
-  #define E2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
644
+  #define E2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
588 645
   #define E2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
589 646
   #define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
590
-  
591
-//#define E3_IS_L6470
592
-  #define E3_MICROSTEPS 16     //number of microsteps   
647
+
648
+  //#define E3_IS_L6470
593 649
   #define E3_MICROSTEPS 16     //number of microsteps
594
-  #define E3_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
650
+  #define E3_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
595 651
   #define E3_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
596 652
   #define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall
597
-  
653
+
598 654
 #endif
599 655
 
600 656
 #include "Conditionals.h"

+ 28
- 6
Marlin/Default_Version.h View File

@@ -1,4 +1,26 @@
1
-/*
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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
+/**
2 24
  * This file is a placeholder for a file which could be distributed in an archive
3 25
  * It takes the place of an automatically created "_Version.h" which is generated during the build process
4 26
  */
@@ -6,9 +28,9 @@
6 28
 // #error "You must specify the following parameters related to your distribution"
7 29
 
8 30
 #if true
9
-#define SHORT_BUILD_VERSION "1.1.0-RC3"
10
-#define DETAILED_BUILD_VERSION "1.1.0-RC3 From Archive"
11
-#define STRING_DISTRIBUTION_DATE "2015-12-01 12:00"
31
+#define SHORT_BUILD_VERSION "1.1.0-RC5"
32
+#define DETAILED_BUILD_VERSION "1.1.0-RC5 From Archive"
33
+#define STRING_DISTRIBUTION_DATE "2016-04-01 12:00"
12 34
 // It might also be appropriate to define a location where additional information can be found
13
-#define SOURCE_CODE_URL  "http:// ..."
14
-#endif
35
+// #define SOURCE_CODE_URL  "http:// ..."
36
+#endif

+ 49
- 26
Marlin/M100_Free_Mem_Chk.cpp View File

@@ -1,26 +1,45 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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
+/**
24
+ * M100 Free Memory Watcher
25
+ * 
26
+ * This code watches the free memory block between the bottom of the heap and the top of the stack.
27
+ * This memory block is initialized and watched via the M100 command.
28
+ * 
29
+ * M100 I Initializes the free memory block and prints vitals statistics about the area
30
+ * M100 F Identifies how much of the free memory block remains free and unused.  It also
31
+ *    detects and reports any corruption within the free memory block that may have
32
+ *    happened due to errant firmware.
33
+ * M100 D Does a hex display of the free memory block along with a flag for any errant
34
+ *    data that does not match the expected value.
35
+ * M100 C x Corrupts x locations within the free memory block.   This is useful to check the
36
+ *    correctness of the M100 F and M100 D commands.
37
+ * 
38
+ * Initial version by Roxy-3DPrintBoard
39
+ */
1 40
 #define M100_FREE_MEMORY_DUMPER     // Comment out to remove Dump sub-command
2 41
 #define M100_FREE_MEMORY_CORRUPTOR    // Comment out to remove Corrupt sub-command
3 42
 
4
-
5
-// M100 Free Memory Watcher
6
-//
7
-// This code watches the free memory block between the bottom of the heap and the top of the stack.
8
-// This memory block is initialized and watched via the M100 command.
9
-//
10
-// M100 I Initializes the free memory block and prints vitals statistics about the area
11
-// M100 F Identifies how much of the free memory block remains free and unused.  It also
12
-//    detects and reports any corruption within the free memory block that may have
13
-//    happened due to errant firmware.
14
-// M100 D Does a hex display of the free memory block along with a flag for any errant
15
-//    data that does not match the expected value.
16
-// M100 C x Corrupts x locations within the free memory block.   This is useful to check the
17
-//    correctness of the M100 F and M100 D commands.
18
-//
19
-// Initial version by Roxy-3DPrintBoard
20
-//
21
-//
22
-
23
-
24 43
 #include "Marlin.h"
25 44
 
26 45
 #if ENABLED(M100_FREE_MEMORY_WATCHER)
@@ -118,8 +137,10 @@ void gcode_M100() {
118 137
   // other vital statistics that define the memory pool.
119 138
   //
120 139
   if (code_seen('F')) {
121
-    int max_addr = (int) __brkval;
122
-    int max_cnt = 0;
140
+    #if 0
141
+      int max_addr = (int) __brkval;
142
+      int max_cnt = 0;
143
+    #endif
123 144
     int block_cnt = 0;
124 145
     ptr = (unsigned char*) __brkval;
125 146
     sp = top_of_stack();
@@ -136,10 +157,12 @@ void gcode_M100() {
136 157
           i += j;
137 158
           block_cnt++;
138 159
         }
139
-        if (j > max_cnt) {      // We don't do anything with this information yet
140
-          max_cnt  = j;     // but we do know where the biggest free memory block is.
141
-          max_addr = (int) ptr + i;
142
-        }
160
+        #if 0
161
+          if (j > max_cnt) {      // We don't do anything with this information yet
162
+            max_cnt  = j;     // but we do know where the biggest free memory block is.
163
+            max_addr = (int) ptr + i;
164
+          }
165
+        #endif
143 166
       }
144 167
     }
145 168
     if (block_cnt > 1)

+ 9
- 6
Marlin/Makefile View File

@@ -12,14 +12,14 @@
12 12
 #
13 13
 # Detailed instructions for using the makefile:
14 14
 #
15
-#  1. Modify the line containg "ARDUINO_INSTALL_DIR" to point to the directory that
15
+#  1. Modify the line containing "ARDUINO_INSTALL_DIR" to point to the directory that
16 16
 #     contains the Arduino installation (for example, under Mac OS X, this
17 17
 #     might be /Applications/Arduino.app/Contents/Resources/Java).
18 18
 #
19 19
 #  2. Modify the line containing "UPLOAD_PORT" to refer to the filename
20 20
 #     representing the USB or serial connection to your Arduino board
21 21
 #     (e.g. UPLOAD_PORT = /dev/tty.USB0).  If the exact name of this file
22
-#     changes, you can use * as a wildcard (e.g. UPLOAD_PORT = /dev/tty.usb*).
22
+#     changes, you can use * as a wild card (e.g. UPLOAD_PORT = /dev/tty.usb*).
23 23
 #
24 24
 #  3. Set the line containing "MCU" to match your board's processor.
25 25
 #     Older one's are atmega8 based, newer ones like Arduino Mini, Bluetooth
@@ -163,6 +163,9 @@ MCU              ?= at90usb1286
163 163
 else ifeq  ($(HARDWARE_MOTHERBOARD),81)
164 164
 HARDWARE_VARIANT ?= Teensy
165 165
 MCU              ?= at90usb1286
166
+else ifeq  ($(HARDWARE_MOTHERBOARD),811)
167
+HARDWARE_VARIANT ?= Teensy
168
+MCU              ?= at90usb1286
166 169
 else ifeq  ($(HARDWARE_MOTHERBOARD),82)
167 170
 HARDWARE_VARIANT ?= Teensy
168 171
 MCU              ?= at90usb646
@@ -218,7 +221,7 @@ endif
218 221
 # Set to 16Mhz if not yet set.
219 222
 F_CPU ?= 16000000
220 223
 
221
-# Arduino containd the main source code for the Arduino
224
+# Arduino contained the main source code for the Arduino
222 225
 # Libraries, the "hardware variant" are for boards
223 226
 # that derives from that, and their source are present in
224 227
 # the main Marlin source directory
@@ -287,7 +290,7 @@ CXXSRC = WMath.cpp WString.cpp Print.cpp Marlin_main.cpp	\
287 290
 	SdFile.cpp SdVolume.cpp planner.cpp stepper.cpp \
288 291
 	temperature.cpp cardreader.cpp configuration_store.cpp \
289 292
 	watchdog.cpp SPI.cpp servo.cpp Tone.cpp ultralcd.cpp digipot_mcp4451.cpp \
290
-	vector_3.cpp qr_solve.cpp buzzer.cpp
293
+	dac_mcp4728.cpp vector_3.cpp qr_solve.cpp buzzer.cpp
291 294
 ifeq ($(LIQUID_TWI2), 0)
292 295
 CXXSRC += LiquidCrystal.cpp
293 296
 else
@@ -300,7 +303,7 @@ SRC += twi.c
300 303
 CXXSRC += Wire.cpp
301 304
 endif
302 305
 
303
-#Check for Arduino 1.0.0 or higher and use the correct sourcefiles for that version
306
+#Check for Arduino 1.0.0 or higher and use the correct source files for that version
304 307
 ifeq ($(shell [ $(ARDUINO_VERSION) -ge 100 ] && echo true), true)
305 308
 CXXSRC += main.cpp
306 309
 else
@@ -421,7 +424,7 @@ lss: $(BUILD_DIR)/$(TARGET).lss
421 424
 sym: $(BUILD_DIR)/$(TARGET).sym
422 425
 
423 426
 # Program the device.
424
-# Do not try to reset an arduino if it's not one
427
+# Do not try to reset an Arduino if it's not one
425 428
 upload: $(BUILD_DIR)/$(TARGET).hex
426 429
 ifeq (${AVRDUDE_PROGRAMMER}, arduino)
427 430
 	stty hup < $(UPLOAD_PORT); true

+ 61
- 35
Marlin/Marlin.h View File

@@ -1,12 +1,30 @@
1
-// Tonokip RepRap firmware rewrite based off of Hydra-mmm firmware.
2
-// License: GPL
3
-
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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
+ */
4 22
 #ifndef MARLIN_H
5 23
 #define MARLIN_H
6 24
 
7 25
 #define  FORCE_INLINE __attribute__((always_inline)) inline
8 26
 /**
9
- * Compiler warning on unused varable.
27
+ * Compiler warning on unused variable.
10 28
  */
11 29
 #define UNUSED(x) (void) (x)
12 30
 
@@ -45,13 +63,6 @@ typedef unsigned long millis_t;
45 63
 
46 64
 #include "MarlinSerial.h"
47 65
 
48
-#ifndef cbi
49
-  #define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit))
50
-#endif
51
-#ifndef sbi
52
-  #define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit))
53
-#endif
54
-
55 66
 #include "WString.h"
56 67
 
57 68
 #ifdef USBCON
@@ -98,7 +109,6 @@ void serial_echopair_P(const char* s_P, float v);
98 109
 void serial_echopair_P(const char* s_P, double v);
99 110
 void serial_echopair_P(const char* s_P, unsigned long v);
100 111
 
101
-
102 112
 // Things to write to serial from Program memory. Saves 400 to 2k of RAM.
103 113
 FORCE_INLINE void serialprintPGM(const char* str) {
104 114
   char ch;
@@ -108,9 +118,11 @@ FORCE_INLINE void serialprintPGM(const char* str) {
108 118
   }
109 119
 }
110 120
 
111
-void get_command();
112
-
113
-void idle(); // the standard idle routine calls manage_inactivity(false)
121
+void idle(
122
+  #if ENABLED(FILAMENTCHANGEENABLE)
123
+    bool no_stepper_sleep=false  // pass true to keep steppers from disabling on timeout
124
+  #endif
125
+);
114 126
 
115 127
 void manage_inactivity(bool ignore_stepper_queue = false);
116 128
 
@@ -217,21 +229,24 @@ void Stop();
217 229
  * Debug flags - not yet widely applied
218 230
  */
219 231
 enum DebugFlags {
220
-  DEBUG_ECHO          = BIT(0),
221
-  DEBUG_INFO          = BIT(1),
222
-  DEBUG_ERRORS        = BIT(2),
223
-  DEBUG_DRYRUN        = BIT(3),
224
-  DEBUG_COMMUNICATION = BIT(4),
225
-  DEBUG_LEVELING      = BIT(5)
232
+  DEBUG_NONE          = 0,
233
+  DEBUG_ECHO          = _BV(0),
234
+  DEBUG_INFO          = _BV(1),
235
+  DEBUG_ERRORS        = _BV(2),
236
+  DEBUG_DRYRUN        = _BV(3),
237
+  DEBUG_COMMUNICATION = _BV(4),
238
+  DEBUG_LEVELING      = _BV(5)
226 239
 };
227 240
 extern uint8_t marlin_debug_flags;
241
+#define DEBUGGING(F) (marlin_debug_flags & (DEBUG_## F))
228 242
 
229 243
 extern bool Running;
230 244
 inline bool IsRunning() { return  Running; }
231 245
 inline bool IsStopped() { return !Running; }
232 246
 
233
-bool enqueuecommand(const char* cmd); //put a single ASCII command at the end of the current buffer or return false when it is full
234
-void enqueuecommands_P(const char* cmd); //put one or many ASCII commands at the end of the current buffer, read from flash
247
+bool enqueue_and_echo_command(const char* cmd, bool say_ok=false); //put a single ASCII command at the end of the current buffer or return false when it is full
248
+void enqueue_and_echo_command_now(const char* cmd); // enqueue now, only return when the command has been enqueued
249
+void enqueue_and_echo_commands_P(const char* cmd); //put one or many ASCII commands at the end of the current buffer, read from flash
235 250
 
236 251
 void prepare_arc_move(char isclockwise);
237 252
 void clamp_to_software_endstops(float target[3]);
@@ -259,11 +274,9 @@ extern float home_offset[3]; // axis[n].home_offset
259 274
 extern float min_pos[3]; // axis[n].min_pos
260 275
 extern float max_pos[3]; // axis[n].max_pos
261 276
 extern bool axis_known_position[3]; // axis[n].is_known
277
+extern bool axis_homed[3]; // axis[n].is_homed
262 278
 
263 279
 #if ENABLED(DELTA)
264
-  extern float delta[3];
265
-  extern float endstop_adj[3]; // axis[n].endstop_adj
266
-  extern float delta_radius;
267 280
   #ifndef DELTA_RADIUS_TRIM_TOWER_1
268 281
     #define DELTA_RADIUS_TRIM_TOWER_1 0.0
269 282
   #endif
@@ -273,7 +286,6 @@ extern bool axis_known_position[3]; // axis[n].is_known
273 286
   #ifndef DELTA_RADIUS_TRIM_TOWER_3
274 287
     #define DELTA_RADIUS_TRIM_TOWER_3 0.0
275 288
   #endif
276
-  extern float delta_diagonal_rod;
277 289
   #ifndef DELTA_DIAGONAL_ROD_TRIM_TOWER_1
278 290
     #define DELTA_DIAGONAL_ROD_TRIM_TOWER_1 0.0
279 291
   #endif
@@ -283,7 +295,14 @@ extern bool axis_known_position[3]; // axis[n].is_known
283 295
   #ifndef DELTA_DIAGONAL_ROD_TRIM_TOWER_3
284 296
     #define DELTA_DIAGONAL_ROD_TRIM_TOWER_3 0.0
285 297
   #endif
298
+  extern float delta[3];
299
+  extern float endstop_adj[3]; // axis[n].endstop_adj
300
+  extern float delta_radius;
301
+  extern float delta_diagonal_rod;
286 302
   extern float delta_segments_per_second;
303
+  extern float delta_diagonal_rod_trim_tower_1;
304
+  extern float delta_diagonal_rod_trim_tower_2;
305
+  extern float delta_diagonal_rod_trim_tower_3;
287 306
   void calculate_delta(float cartesian[3]);
288 307
   void recalc_delta_settings(float radius, float diagonal_rod);
289 308
   #if ENABLED(AUTO_BED_LEVELING_FEATURE)
@@ -308,22 +327,20 @@ extern bool axis_known_position[3]; // axis[n].is_known
308 327
   extern float extrude_min_temp;
309 328
 #endif
310 329
 
311
-extern int fanSpeed;
330
+#if FAN_COUNT > 0
331
+  extern int fanSpeeds[FAN_COUNT];
332
+#endif
312 333
 
313 334
 #if ENABLED(BARICUDA)
314 335
   extern int ValvePressure;
315 336
   extern int EtoPPressure;
316 337
 #endif
317 338
 
318
-#if ENABLED(FAN_SOFT_PWM)
319
-  extern unsigned char fanSpeedSoftPwm;
320
-#endif
321
-
322
-#if ENABLED(FILAMENT_SENSOR)
323
-  extern float filament_width_nominal;  //holds the theoretical filament diameter ie., 3.00 or 1.75
339
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
340
+  extern float filament_width_nominal;  //holds the theoretical filament diameter i.e., 3.00 or 1.75
324 341
   extern bool filament_sensor;  //indicates that filament sensor readings should control extrusion
325 342
   extern float filament_width_meas; //holds the filament diameter as accurately measured
326
-  extern signed char measurement_delay[];  //ring buffer to delay measurement
343
+  extern int8_t measurement_delay[];  //ring buffer to delay measurement
327 344
   extern int delay_index1, delay_index2;  //ring buffer index. used by planner, temperature, and main code
328 345
   extern float delay_dist; //delay distance counter
329 346
   extern int meas_delay_cm; //delay distance
@@ -351,6 +368,15 @@ extern uint8_t active_extruder;
351 368
   extern void digipot_i2c_init();
352 369
 #endif
353 370
 
371
+#if HAS_TEMP_HOTEND || HAS_TEMP_BED
372
+  void print_heaterstates();
373
+#endif
374
+
354 375
 extern void calculate_volumetric_multipliers();
355 376
 
377
+// Print job timer related functions
378
+millis_t print_job_timer();
379
+bool print_job_start(millis_t t = 0);
380
+bool print_job_stop(bool force = false);
381
+
356 382
 #endif //MARLIN_H

+ 10
- 2
Marlin/Marlin.ino View File

@@ -1,5 +1,6 @@
1 1
 /**
2
- * Marlin Firmware
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
3 4
  *
4 5
  * Based on Sprinter and grbl.
5 6
  * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -17,6 +18,9 @@
17 18
  * You should have received a copy of the GNU General Public License
18 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
19 20
  *
21
+ */
22
+
23
+/**
20 24
  * About Marlin
21 25
  *
22 26
  * This firmware is a mashup between Sprinter and grbl.
@@ -40,8 +44,12 @@
40 44
   #elif ENABLED(LCD_I2C_TYPE_MCP23017) || ENABLED(LCD_I2C_TYPE_MCP23008)
41 45
     #include <Wire.h>
42 46
     #include <LiquidTWI2.h>
47
+  #elif ENABLED(LCM1602)
48
+    #include <Wire.h>
49
+    #include <LCD.h>
50
+    #include <LiquidCrystal_I2C.h>
43 51
   #elif ENABLED(DOGLCD)
44
-    #include <U8glib.h> // library for graphics LCD by Oli Kraus (https://code.google.com/p/u8glib/)
52
+    #include <U8glib.h> // library for graphics LCD by Oli Kraus (https://github.com/olikraus/U8glib_Arduino)
45 53
   #else
46 54
     #include <LiquidCrystal.h> // library for character LCD
47 55
   #endif

+ 63
- 46
Marlin/MarlinSerial.cpp View File

@@ -1,21 +1,29 @@
1
-/*
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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
+/**
2 24
   HardwareSerial.cpp - Hardware serial library for Wiring
3 25
   Copyright (c) 2006 Nicholas Zambetti.  All right reserved.
4 26
 
5
-  This library is free software; you can redistribute it and/or
6
-  modify it under the terms of the GNU Lesser General Public
7
-  License as published by the Free Software Foundation; either
8
-  version 2.1 of the License, or (at your option) any later version.
9
-
10
-  This library is distributed in the hope that it will be useful,
11
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
12
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
-  Lesser General Public License for more details.
14
-
15
-  You should have received a copy of the GNU Lesser General Public
16
-  License along with this library; if not, write to the Free Software
17
-  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
-
19 27
   Modified 23 November 2006 by David A. Mellis
20 28
   Modified 28 September 2010 by Mark Sproul
21 29
 */
@@ -33,16 +41,19 @@
33 41
 #endif
34 42
 
35 43
 FORCE_INLINE void store_char(unsigned char c) {
36
-  int i = (unsigned int)(rx_buffer.head + 1) % RX_BUFFER_SIZE;
37
-
38
-  // if we should be storing the received character into the location
39
-  // just before the tail (meaning that the head would advance to the
40
-  // current location of the tail), we're about to overflow the buffer
41
-  // and so we don't write the character or advance the head.
42
-  if (i != rx_buffer.tail) {
43
-    rx_buffer.buffer[rx_buffer.head] = c;
44
-    rx_buffer.head = i;
45
-  }
44
+  CRITICAL_SECTION_START;
45
+    uint8_t h = rx_buffer.head;
46
+    uint8_t i = (uint8_t)(h + 1)  & (RX_BUFFER_SIZE - 1);
47
+
48
+    // if we should be storing the received character into the location
49
+    // just before the tail (meaning that the head would advance to the
50
+    // current location of the tail), we're about to overflow the buffer
51
+    // and so we don't write the character or advance the head.
52
+    if (i != rx_buffer.tail) {
53
+      rx_buffer.buffer[h] = c;
54
+      rx_buffer.head = i;
55
+    }
56
+  CRITICAL_SECTION_END;
46 57
 }
47 58
 
48 59
 
@@ -76,7 +87,7 @@ void MarlinSerial::begin(long baud) {
76 87
   #endif
77 88
 
78 89
   if (useU2X) {
79
-    M_UCSRxA = BIT(M_U2Xx);
90
+    M_UCSRxA = _BV(M_U2Xx);
80 91
     baud_setting = (F_CPU / 4 / baud - 1) / 2;
81 92
   }
82 93
   else {
@@ -88,37 +99,45 @@ void MarlinSerial::begin(long baud) {
88 99
   M_UBRRxH = baud_setting >> 8;
89 100
   M_UBRRxL = baud_setting;
90 101
 
91
-  sbi(M_UCSRxB, M_RXENx);
92
-  sbi(M_UCSRxB, M_TXENx);
93
-  sbi(M_UCSRxB, M_RXCIEx);
102
+  SBI(M_UCSRxB, M_RXENx);
103
+  SBI(M_UCSRxB, M_TXENx);
104
+  SBI(M_UCSRxB, M_RXCIEx);
94 105
 }
95 106
 
96 107
 void MarlinSerial::end() {
97
-  cbi(M_UCSRxB, M_RXENx);
98
-  cbi(M_UCSRxB, M_TXENx);
99
-  cbi(M_UCSRxB, M_RXCIEx);
108
+  CBI(M_UCSRxB, M_RXENx);
109
+  CBI(M_UCSRxB, M_TXENx);
110
+  CBI(M_UCSRxB, M_RXCIEx);
100 111
 }
101 112
 
102 113
 
103 114
 int MarlinSerial::peek(void) {
104
-  if (rx_buffer.head == rx_buffer.tail) {
105
-    return -1;
115
+  int v;
116
+  CRITICAL_SECTION_START;
117
+  uint8_t t = rx_buffer.tail;
118
+  if (rx_buffer.head == t) {
119
+    v = -1;
106 120
   }
107 121
   else {
108
-    return rx_buffer.buffer[rx_buffer.tail];
122
+    v = rx_buffer.buffer[t];
109 123
   }
124
+  CRITICAL_SECTION_END;
125
+  return v;
110 126
 }
111 127
 
112 128
 int MarlinSerial::read(void) {
113
-  // if the head isn't ahead of the tail, we don't have any characters
114
-  if (rx_buffer.head == rx_buffer.tail) {
115
-    return -1;
129
+  int v;
130
+  CRITICAL_SECTION_START;
131
+  uint8_t t = rx_buffer.tail;
132
+  if (rx_buffer.head == t) {
133
+    v = -1;
116 134
   }
117 135
   else {
118
-    unsigned char c = rx_buffer.buffer[rx_buffer.tail];
119
-    rx_buffer.tail = (unsigned int)(rx_buffer.tail + 1) % RX_BUFFER_SIZE;
120
-    return c;
136
+    v = rx_buffer.buffer[t];
137
+    rx_buffer.tail = (uint8_t)(t + 1) & (RX_BUFFER_SIZE - 1);
121 138
   }
139
+  CRITICAL_SECTION_END;
140
+  return v;
122 141
 }
123 142
 
124 143
 void MarlinSerial::flush() {
@@ -126,12 +145,10 @@ void MarlinSerial::flush() {
126 145
   // occurs after reading the value of rx_buffer_head but before writing
127 146
   // the value to rx_buffer_tail; the previous value of rx_buffer_head
128 147
   // may be written to rx_buffer_tail, making it appear as if the buffer
129
-  // don't reverse this or there may be problems if the RX interrupt
130
-  // occurs after reading the value of rx_buffer_head but before writing
131
-  // the value to rx_buffer_tail; the previous value of rx_buffer_head
132
-  // may be written to rx_buffer_tail, making it appear as if the buffer
133 148
   // were full, not empty.
134
-  rx_buffer.head = rx_buffer.tail;
149
+  CRITICAL_SECTION_START;
150
+    rx_buffer.head = rx_buffer.tail;
151
+  CRITICAL_SECTION_END;
135 152
 }
136 153
 
137 154
 

+ 57
- 31
Marlin/MarlinSerial.h View File

@@ -1,21 +1,29 @@
1
-/*
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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
+/**
2 24
   HardwareSerial.h - Hardware serial library for Wiring
3 25
   Copyright (c) 2006 Nicholas Zambetti.  All right reserved.
4 26
 
5
-  This library is free software; you can redistribute it and/or
6
-  modify it under the terms of the GNU Lesser General Public
7
-  License as published by the Free Software Foundation; either
8
-  version 2.1 of the License, or (at your option) any later version.
9
-
10
-  This library is distributed in the hope that it will be useful,
11
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
12
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
-  Lesser General Public License for more details.
14
-
15
-  You should have received a copy of the GNU Lesser General Public
16
-  License along with this library; if not, write to the Free Software
17
-  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
-
19 27
   Modified 28 September 2010 by Mark Sproul
20 28
 */
21 29
 
@@ -23,6 +31,12 @@
23 31
 #define MarlinSerial_h
24 32
 #include "Marlin.h"
25 33
 
34
+#ifndef CRITICAL_SECTION_START
35
+  #define CRITICAL_SECTION_START  unsigned char _sreg = SREG; cli();
36
+  #define CRITICAL_SECTION_END    SREG = _sreg;
37
+#endif
38
+
39
+
26 40
 #ifndef SERIAL_PORT
27 41
   #define SERIAL_PORT 0
28 42
 #endif
@@ -69,13 +83,18 @@
69 83
 // using a ring buffer (I think), in which rx_buffer_head is the index of the
70 84
 // location to which to write the next incoming character and rx_buffer_tail
71 85
 // is the index of the location from which to read.
72
-#define RX_BUFFER_SIZE 128
73
-
86
+// 256 is the max limit due to uint8_t head and tail. Use only powers of 2. (...,16,32,64,128,256)
87
+#ifndef RX_BUFFER_SIZE
88
+  #define RX_BUFFER_SIZE 128
89
+#endif
90
+#if !((RX_BUFFER_SIZE == 256) ||(RX_BUFFER_SIZE == 128) ||(RX_BUFFER_SIZE == 64) ||(RX_BUFFER_SIZE == 32) ||(RX_BUFFER_SIZE == 16) ||(RX_BUFFER_SIZE == 8) ||(RX_BUFFER_SIZE == 4) ||(RX_BUFFER_SIZE == 2))
91
+  #error RX_BUFFER_SIZE has to be a power of 2 and >= 2
92
+#endif
74 93
 
75 94
 struct ring_buffer {
76 95
   unsigned char buffer[RX_BUFFER_SIZE];
77
-  int head;
78
-  int tail;
96
+  volatile uint8_t head;
97
+  volatile uint8_t tail;
79 98
 };
80 99
 
81 100
 #if UART_PRESENT(SERIAL_PORT)
@@ -92,8 +111,12 @@ class MarlinSerial { //: public Stream
92 111
     int read(void);
93 112
     void flush(void);
94 113
 
95
-    FORCE_INLINE int available(void) {
96
-      return (unsigned int)(RX_BUFFER_SIZE + rx_buffer.head - rx_buffer.tail) % RX_BUFFER_SIZE;
114
+    FORCE_INLINE uint8_t available(void) {
115
+      CRITICAL_SECTION_START;
116
+        uint8_t h = rx_buffer.head;
117
+        uint8_t t = rx_buffer.tail;
118
+      CRITICAL_SECTION_END;
119
+      return (uint8_t)(RX_BUFFER_SIZE + h - t) & (RX_BUFFER_SIZE - 1);
97 120
     }
98 121
 
99 122
     FORCE_INLINE void write(uint8_t c) {
@@ -105,16 +128,19 @@ class MarlinSerial { //: public Stream
105 128
     FORCE_INLINE void checkRx(void) {
106 129
       if (TEST(M_UCSRxA, M_RXCx)) {
107 130
         unsigned char c  =  M_UDRx;
108
-        int i = (unsigned int)(rx_buffer.head + 1) % RX_BUFFER_SIZE;
109
-
110
-        // if we should be storing the received character into the location
111
-        // just before the tail (meaning that the head would advance to the
112
-        // current location of the tail), we're about to overflow the buffer
113
-        // and so we don't write the character or advance the head.
114
-        if (i != rx_buffer.tail) {
115
-          rx_buffer.buffer[rx_buffer.head] = c;
116
-          rx_buffer.head = i;
117
-        }
131
+        CRITICAL_SECTION_START;
132
+          uint8_t h = rx_buffer.head;
133
+          uint8_t i = (uint8_t)(h + 1) & (RX_BUFFER_SIZE - 1);
134
+
135
+          // if we should be storing the received character into the location
136
+          // just before the tail (meaning that the head would advance to the
137
+          // current location of the tail), we're about to overflow the buffer
138
+          // and so we don't write the character or advance the head.
139
+          if (i != rx_buffer.tail) {
140
+            rx_buffer.buffer[h] = c;
141
+            rx_buffer.head = i;
142
+          }
143
+        CRITICAL_SECTION_END;
118 144
       }
119 145
     }
120 146
 

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


+ 142
- 32
Marlin/SanityCheck.h View File

@@ -1,4 +1,26 @@
1 1
 /**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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
+/**
2 24
  * SanityCheck.h
3 25
  *
4 26
  * Test configuration values for errors at compile-time.
@@ -7,6 +29,16 @@
7 29
 #define SANITYCHECK_H
8 30
 
9 31
 /**
32
+ * Due to the high number of issues related with old versions of Arduino IDE
33
+ * we are now warning our users to update their toolkits. In a future Marlin
34
+ * release we will stop supporting old IDE versions and will require user
35
+ * action to proceed with compilation in such environments.
36
+ */
37
+#if !defined(ARDUINO) || ARDUINO < 10500
38
+  #warning Versions of Arduino IDE prior to 1.5 are no longer supported, please update your toolkit.
39
+#endif
40
+
41
+/**
10 42
  * Dual Stepper Drivers
11 43
  */
12 44
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS) && ENABLED(Y_DUAL_STEPPER_DRIVERS)
@@ -32,8 +64,8 @@
32 64
  * Babystepping
33 65
  */
34 66
 #if ENABLED(BABYSTEPPING)
35
-  #if ENABLED(COREXY) && ENABLED(BABYSTEP_XY)
36
-    #error BABYSTEPPING only implemented for Z axis on CoreXY.
67
+  #if DISABLED(ULTRA_LCD)
68
+    #error BABYSTEPPING requires an LCD controller.
37 69
   #endif
38 70
   #if ENABLED(SCARA)
39 71
     #error BABYSTEPPING is not implemented for SCARA yet.
@@ -110,6 +142,13 @@
110 142
 #endif
111 143
 
112 144
 /**
145
+ * Bed Heating Options - PID vs Limit Switching
146
+ */
147
+#if ENABLED(PIDTEMPBED) && ENABLED(BED_LIMIT_SWITCHING)
148
+  #error To use BED_LIMIT_SWITCHING you must disable PIDTEMPBED.
149
+#endif
150
+
151
+/**
113 152
  * Mesh Bed Leveling
114 153
  */
115 154
 #if ENABLED(MESH_BED_LEVELING)
@@ -122,9 +161,39 @@
122 161
   #if MESH_NUM_X_POINTS > 7 || MESH_NUM_Y_POINTS > 7
123 162
     #error MESH_NUM_X_POINTS and MESH_NUM_Y_POINTS need to be less than 8.
124 163
   #endif
164
+#elif ENABLED(MANUAL_BED_LEVELING)
165
+  #error MESH_BED_LEVELING is required for MANUAL_BED_LEVELING.
125 166
 #endif
126 167
 
127 168
 /**
169
+ * Probes
170
+ */
171
+
172
+/**
173
+ * A probe needs a pin
174
+ */
175
+#if (!((HAS_Z_MIN && ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)) || HAS_Z_PROBE )) && ( ENABLED(FIX_MOUNTED_PROBE) || defined(Z_ENDSTOP_SERVO_NR) || ENABLED(Z_PROBE_ALLEN_KEY) || ENABLED(Z_PROBE_SLED))
176
+  #error A probe needs a pin! [Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN || HAS_Z_PROBE]
177
+#endif
178
+
179
+#if ((HAS_Z_MIN && ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)) && HAS_Z_PROBE) && ( ENABLED(FIX_MOUNTED_PROBE) || defined(Z_ENDSTOP_SERVO_NR) || ENABLED(Z_PROBE_ALLEN_KEY) || ENABLED(Z_PROBE_SLED))
180
+  #error A probe should not be connected to more then one pin! [Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN || HAS_Z_PROBE]
181
+#endif
182
+
183
+/**
184
+  * Require one kind of probe
185
+  */
186
+#if ENABLED(AUTO_BED_LEVELING_FEATURE) && !( ENABLED(FIX_MOUNTED_PROBE) || defined(Z_ENDSTOP_SERVO_NR) || ENABLED(Z_PROBE_ALLEN_KEY) || ENABLED(Z_PROBE_SLED))
187
+  #error For AUTO_BED_LEVELING_FEATURE define one kind of probe! {Servo | Z_PROBE_ALLEN_KEY | Z_PROBE_SLED | FIX_MOUNTED_PROBE]
188
+#endif
189
+
190
+#if ENABLED(Z_SAFE_HOMING)&& !( ENABLED(FIX_MOUNTED_PROBE) || defined(Z_ENDSTOP_SERVO_NR) || ENABLED(Z_PROBE_ALLEN_KEY) || ENABLED(Z_PROBE_SLED))
191
+  #error For Z_SAFE_HOMING define one kind of probe! {Servo | Z_PROBE_ALLEN_KEY | Z_PROBE_SLED | FIX_MOUNTED_PROBE]
192
+#endif
193
+
194
+// To do: Fail with more then one probe defined
195
+
196
+/**
128 197
  * Auto Bed Leveling
129 198
  */
130 199
 #if ENABLED(AUTO_BED_LEVELING_FEATURE)
@@ -167,7 +236,7 @@
167 236
    * Check if Probe_Offset * Grid Points is greater than Probing Range
168 237
    */
169 238
   #if ENABLED(AUTO_BED_LEVELING_GRID)
170
-    #ifndef DELTA_PROBABLE_RADIUS
239
+    #ifndef DELTA_PROBEABLE_RADIUS
171 240
       // Be sure points are in the right order
172 241
       #if LEFT_PROBE_BED_POSITION > RIGHT_PROBE_BED_POSITION
173 242
         #error LEFT_PROBE_BED_POSITION must be less than RIGHT_PROBE_BED_POSITION.
@@ -207,6 +276,14 @@
207 276
 #endif // AUTO_BED_LEVELING_FEATURE
208 277
 
209 278
 /**
279
+ * Filament Width Sensor
280
+ */
281
+#if ENABLED(FILAMENT_WIDTH_SENSOR) && !HAS_FILAMENT_WIDTH_SENSOR
282
+  #error FILAMENT_WIDTH_SENSOR requires a FILWIDTH_PIN to be defined.
283
+#endif
284
+
285
+
286
+/**
210 287
  * ULTIPANEL encoder
211 288
  */
212 289
 #if ENABLED(ULTIPANEL) && DISABLED(NEWPANEL) && DISABLED(SR_LCD_2W_NL) && !defined(SHIFT_CLK)
@@ -228,10 +305,6 @@
228 305
       #error You cannot use Z_PROBE_SLED with DELTA.
229 306
     #endif
230 307
 
231
-    #if ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST)
232
-      #error Z_MIN_PROBE_REPEATABILITY_TEST is not supported with DELTA yet.
233
-    #endif
234
-
235 308
   #endif
236 309
 
237 310
 #endif
@@ -261,47 +334,63 @@
261 334
 /**
262 335
  * Make sure auto fan pins don't conflict with the fan pin
263 336
  */
264
-#if HAS_AUTO_FAN && HAS_FAN
265
-  #if EXTRUDER_0_AUTO_FAN_PIN == FAN_PIN
266
-    #error You cannot set EXTRUDER_0_AUTO_FAN_PIN equal to FAN_PIN.
267
-  #elif EXTRUDER_1_AUTO_FAN_PIN == FAN_PIN
268
-    #error You cannot set EXTRUDER_1_AUTO_FAN_PIN equal to FAN_PIN.
269
-  #elif EXTRUDER_2_AUTO_FAN_PIN == FAN_PIN
270
-    #error You cannot set EXTRUDER_2_AUTO_FAN_PIN equal to FAN_PIN.
271
-  #elif EXTRUDER_3_AUTO_FAN_PIN == FAN_PIN
272
-    #error You cannot set EXTRUDER_3_AUTO_FAN_PIN equal to FAN_PIN.
337
+#if HAS_AUTO_FAN
338
+  #if HAS_FAN0
339
+    #if EXTRUDER_0_AUTO_FAN_PIN == FAN_PIN
340
+      #error You cannot set EXTRUDER_0_AUTO_FAN_PIN equal to FAN_PIN.
341
+    #elif EXTRUDER_1_AUTO_FAN_PIN == FAN_PIN
342
+      #error You cannot set EXTRUDER_1_AUTO_FAN_PIN equal to FAN_PIN.
343
+    #elif EXTRUDER_2_AUTO_FAN_PIN == FAN_PIN
344
+      #error You cannot set EXTRUDER_2_AUTO_FAN_PIN equal to FAN_PIN.
345
+    #elif EXTRUDER_3_AUTO_FAN_PIN == FAN_PIN
346
+      #error You cannot set EXTRUDER_3_AUTO_FAN_PIN equal to FAN_PIN.
347
+    #endif
273 348
   #endif
274 349
 #endif
275 350
 
276
-#if HAS_FAN && CONTROLLERFAN_PIN == FAN_PIN
351
+#if HAS_FAN0 && CONTROLLERFAN_PIN == FAN_PIN
277 352
   #error You cannot set CONTROLLERFAN_PIN equal to FAN_PIN.
278 353
 #endif
279 354
 
355
+#if HAS_CONTROLLERFAN
356
+  #if EXTRUDER_0_AUTO_FAN_PIN == CONTROLLERFAN_PIN
357
+    #error You cannot set EXTRUDER_0_AUTO_FAN_PIN equal to CONTROLLERFAN_PIN.
358
+  #elif EXTRUDER_1_AUTO_FAN_PIN == CONTROLLERFAN_PIN
359
+    #error You cannot set EXTRUDER_1_AUTO_FAN_PIN equal to CONTROLLERFAN_PIN.
360
+  #elif EXTRUDER_2_AUTO_FAN_PIN == CONTROLLERFAN_PIN
361
+    #error You cannot set EXTRUDER_2_AUTO_FAN_PIN equal to CONTROLLERFAN_PIN.
362
+  #elif EXTRUDER_3_AUTO_FAN_PIN == CONTROLLERFAN_PIN
363
+    #error You cannot set EXTRUDER_3_AUTO_FAN_PIN equal to CONTROLLERFAN_PIN.
364
+  #endif
365
+#endif
366
+
280 367
 /**
281 368
  * Test Heater, Temp Sensor, and Extruder Pins; Sensor Type must also be set.
282 369
  */
283 370
 #if EXTRUDERS > 3
284
-  #if !HAS_HEATER_3
371
+  #if TEMP_SENSOR_3 == 0
372
+    #error TEMP_SENSOR_3 is required with 4 EXTRUDERS.
373
+  #elif !HAS_HEATER_3
285 374
     #error HEATER_3_PIN not defined for this board.
286 375
   #elif !PIN_EXISTS(TEMP_3)
287 376
     #error TEMP_3_PIN not defined for this board.
288 377
   #elif !PIN_EXISTS(E3_STEP) || !PIN_EXISTS(E3_DIR) || !PIN_EXISTS(E3_ENABLE)
289 378
     #error E3_STEP_PIN, E3_DIR_PIN, or E3_ENABLE_PIN not defined for this board.
290
-  #elif TEMP_SENSOR_3 == 0
291
-    #error TEMP_SENSOR_3 is required with 4 EXTRUDERS.
292 379
   #endif
293 380
 #elif EXTRUDERS > 2
294
-  #if !HAS_HEATER_2
381
+  #if TEMP_SENSOR_2 == 0
382
+    #error TEMP_SENSOR_2 is required with 3 or more EXTRUDERS.
383
+  #elif !HAS_HEATER_2
295 384
     #error HEATER_2_PIN not defined for this board.
296 385
   #elif !PIN_EXISTS(TEMP_2)
297 386
     #error TEMP_2_PIN not defined for this board.
298 387
   #elif !PIN_EXISTS(E2_STEP) || !PIN_EXISTS(E2_DIR) || !PIN_EXISTS(E2_ENABLE)
299 388
     #error E2_STEP_PIN, E2_DIR_PIN, or E2_ENABLE_PIN not defined for this board.
300
-  #elif TEMP_SENSOR_2 == 0
301
-    #error TEMP_SENSOR_2 is required with 3 or more EXTRUDERS.
302 389
   #endif
303 390
 #elif EXTRUDERS > 1
304
-  #if !PIN_EXISTS(TEMP_1)
391
+  #if TEMP_SENSOR_1 == 0
392
+    #error TEMP_SENSOR_1 is required with 2 or more EXTRUDERS.
393
+  #elif !PIN_EXISTS(TEMP_1)
305 394
     #error TEMP_1_PIN not defined for this board.
306 395
   #elif !PIN_EXISTS(E1_STEP) || !PIN_EXISTS(E1_DIR) || !PIN_EXISTS(E1_ENABLE)
307 396
     #error E1_STEP_PIN, E1_DIR_PIN, or E1_ENABLE_PIN not defined for this board.
@@ -314,12 +403,8 @@
314 403
   #endif
315 404
 #endif
316 405
 
317
-#if TEMP_SENSOR_1 == 0
318
-  #if EXTRUDERS > 1
319
-    #error TEMP_SENSOR_1 is required with 2 or more EXTRUDERS.
320
-  #elif ENABLED(TEMP_SENSOR_1_AS_REDUNDANT)
321
-    #error TEMP_SENSOR_1 is required with TEMP_SENSOR_1_AS_REDUNDANT.
322
-  #endif
406
+#if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT) && TEMP_SENSOR_1 == 0
407
+  #error TEMP_SENSOR_1 is required with TEMP_SENSOR_1_AS_REDUNDANT.
323 408
 #endif
324 409
 
325 410
 #if !HAS_HEATER_0
@@ -333,6 +418,19 @@
333 418
 #endif
334 419
 
335 420
 /**
421
+ * Endstops
422
+ */
423
+#if DISABLED(USE_XMIN_PLUG) && DISABLED(USE_XMAX_PLUG) && !(ENABLED(Z_DUAL_ENDSTOPS) && Z2_USE_ENDSTOP >= _XMAX_ && Z2_USE_ENDSTOP <= _XMIN_)
424
+ #error You must enable USE_XMIN_PLUG or USE_XMAX_PLUG
425
+#elif DISABLED(USE_YMIN_PLUG) && DISABLED(USE_YMAX_PLUG) && !(ENABLED(Z_DUAL_ENDSTOPS) && Z2_USE_ENDSTOP >= _YMAX_ && Z2_USE_ENDSTOP <= _YMIN_)
426
+ #error You must enable USE_YMIN_PLUG or USE_YMAX_PLUG
427
+#elif DISABLED(USE_ZMIN_PLUG) && DISABLED(USE_ZMAX_PLUG) && !(ENABLED(Z_DUAL_ENDSTOPS) && Z2_USE_ENDSTOP >= _ZMAX_ && Z2_USE_ENDSTOP <= _ZMIN_)
428
+ #error You must enable USE_ZMIN_PLUG or USE_ZMAX_PLUG
429
+#elif ENABLED(Z_DUAL_ENDSTOPS) && !Z2_USE_ENDSTOP
430
+ #error You must set Z2_USE_ENDSTOP with Z_DUAL_ENDSTOPS
431
+#endif
432
+
433
+/**
336 434
  * Warnings for old configurations
337 435
  */
338 436
 #if WATCH_TEMP_PERIOD > 500
@@ -358,9 +456,21 @@
358 456
 #elif defined(CUSTOM_MENDEL_NAME)
359 457
   #error CUSTOM_MENDEL_NAME is now CUSTOM_MACHINE_NAME. Please update your configuration.
360 458
 #elif defined(HAS_AUTOMATIC_VERSIONING)
361
-  #error HAS_AUTOMATIC_VERSIONING deprecated - use USE_AUTOMATIC_VERSIONING instead
459
+  #error HAS_AUTOMATIC_VERSIONING is now USE_AUTOMATIC_VERSIONING. Please update your configuration.
362 460
 #elif defined(ENABLE_AUTO_BED_LEVELING)
363
-  #error ENABLE_AUTO_BED_LEVELING deprecated - use AUTO_BED_LEVELING_FEATURE instead
461
+  #error ENABLE_AUTO_BED_LEVELING is now AUTO_BED_LEVELING_FEATURE. Please update your configuration.
462
+#elif defined(SDSLOW)
463
+  #error SDSLOW deprecated. Set SPI_SPEED to SPI_HALF_SPEED instead.
464
+#elif defined(SDEXTRASLOW)
465
+  #error SDEXTRASLOW deprecated. Set SPI_SPEED to SPI_QUARTER_SPEED instead.
466
+#elif defined(Z_RAISE_BEFORE_HOMING)
467
+  #error Z_RAISE_BEFORE_HOMING is deprecated. Use MIN_Z_HEIGHT_FOR_HOMING instead.
468
+#elif defined(FILAMENT_SENSOR)
469
+  #error FILAMENT_SENSOR is deprecated. Use FILAMENT_WIDTH_SENSOR instead.
470
+#elif defined(DISABLE_MAX_ENDSTOPS) || defined(DISABLE_MIN_ENDSTOPS)
471
+  #error DISABLE_MAX_ENDSTOPS and DISABLE_MIN_ENDSTOPS deprecated. Use individual USE_*_PLUG options instead.
472
+#elif ENABLED(Z_DUAL_ENDSTOPS) && !defined(Z2_USE_ENDSTOP)
473
+  #error Z_DUAL_ENDSTOPS settings are simplified. Just set Z2_USE_ENDSTOP to the endstop you want to repurpose for Z2
364 474
 #endif
365 475
 
366 476
 #endif //SANITYCHECK_H

+ 23
- 9
Marlin/Sd2Card.cpp View File

@@ -1,21 +1,30 @@
1
-/* Arduino Sd2Card Library
2
- * Copyright (C) 2009 by William Greiman
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
3 4
  *
4
- * This file is part of the Arduino Sd2Card Library
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
5 7
  *
6
- * This Library is free software: you can redistribute it and/or modify
8
+ * This program is free software: you can redistribute it and/or modify
7 9
  * it under the terms of the GNU General Public License as published by
8 10
  * the Free Software Foundation, either version 3 of the License, or
9 11
  * (at your option) any later version.
10 12
  *
11
- * This Library is distributed in the hope that it will be useful,
13
+ * This program is distributed in the hope that it will be useful,
12 14
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 15
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 16
  * GNU General Public License for more details.
15 17
  *
16 18
  * You should have received a copy of the GNU General Public License
17
- * along with the Arduino Sd2Card Library.  If not, see
18
- * <http://www.gnu.org/licenses/>.
19
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+
23
+/**
24
+ * Arduino Sd2Card Library
25
+ * Copyright (C) 2009 by William Greiman
26
+ *
27
+ * This file is part of the Arduino Sd2Card Library
19 28
  */
20 29
 #include "Marlin.h"
21 30
 
@@ -35,8 +44,8 @@
35 44
    */
36 45
   static void spiInit(uint8_t spiRate) {
37 46
     // See avr processor documentation
38
-    SPCR = BIT(SPE) | BIT(MSTR) | (spiRate >> 1);
39
-    SPSR = spiRate & 1 || spiRate == 6 ? 0 : BIT(SPI2X);
47
+    SPCR = _BV(SPE) | _BV(MSTR) | (spiRate >> 1);
48
+    SPSR = spiRate & 1 || spiRate == 6 ? 0 : _BV(SPI2X);
40 49
   }
41 50
   //------------------------------------------------------------------------------
42 51
   /** SPI receive a byte */
@@ -356,6 +365,7 @@ bool Sd2Card::init(uint8_t sckRateID, uint8_t chipSelectPin) {
356 365
   #if DISABLED(SOFTWARE_SPI)
357 366
     return setSckRate(sckRateID);
358 367
   #else  // SOFTWARE_SPI
368
+    UNUSED(sckRateID);
359 369
     return true;
360 370
   #endif  // SOFTWARE_SPI
361 371
 
@@ -498,9 +508,13 @@ bool Sd2Card::readData(uint8_t* dst, uint16_t count) {
498 508
   spiRec();
499 509
 #endif
500 510
   chipSelectHigh();
511
+  // Send an additional dummy byte, required by Toshiba Flash Air SD Card
512
+  spiSend(0XFF);
501 513
   return true;
502 514
 fail:
503 515
   chipSelectHigh();
516
+  // Send an additional dummy byte, required by Toshiba Flash Air SD Card
517
+  spiSend(0XFF);
504 518
   return false;
505 519
 }
506 520
 //------------------------------------------------------------------------------

+ 17
- 8
Marlin/Sd2Card.h View File

@@ -1,21 +1,30 @@
1
-/* Arduino Sd2Card Library
2
- * Copyright (C) 2009 by William Greiman
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
3 4
  *
4
- * This file is part of the Arduino Sd2Card Library
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
5 7
  *
6
- * This Library is free software: you can redistribute it and/or modify
8
+ * This program is free software: you can redistribute it and/or modify
7 9
  * it under the terms of the GNU General Public License as published by
8 10
  * the Free Software Foundation, either version 3 of the License, or
9 11
  * (at your option) any later version.
10 12
  *
11
- * This Library is distributed in the hope that it will be useful,
13
+ * This program is distributed in the hope that it will be useful,
12 14
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 15
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 16
  * GNU General Public License for more details.
15 17
  *
16 18
  * You should have received a copy of the GNU General Public License
17
- * along with the Arduino Sd2Card Library.  If not, see
18
- * <http://www.gnu.org/licenses/>.
19
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+
23
+/**
24
+ * Arduino Sd2Card Library
25
+ * Copyright (C) 2009 by William Greiman
26
+ *
27
+ * This file is part of the Arduino Sd2Card Library
19 28
  */
20 29
 
21 30
 #include "Marlin.h"
@@ -240,4 +249,4 @@ class Sd2Card {
240 249
 #endif  // Sd2Card_h
241 250
 
242 251
 
243
-#endif
252
+#endif

+ 20
- 11
Marlin/Sd2PinMap.h View File

@@ -1,21 +1,30 @@
1
-/* Arduino SdFat Library
2
- * Copyright (C) 2010 by William Greiman
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
3 4
  *
4
- * This file is part of the Arduino SdFat Library
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
5 7
  *
6
- * This Library is free software: you can redistribute it and/or modify
8
+ * This program is free software: you can redistribute it and/or modify
7 9
  * it under the terms of the GNU General Public License as published by
8 10
  * the Free Software Foundation, either version 3 of the License, or
9 11
  * (at your option) any later version.
10 12
  *
11
- * This Library is distributed in the hope that it will be useful,
13
+ * This program is distributed in the hope that it will be useful,
12 14
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 15
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 16
  * GNU General Public License for more details.
15 17
  *
16 18
  * You should have received a copy of the GNU General Public License
17
- * along with the Arduino SdFat Library.  If not, see
18
- * <http://www.gnu.org/licenses/>.
19
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+
23
+/**
24
+ * Arduino SdFat Library
25
+ * Copyright (C) 2010 by William Greiman
26
+ *
27
+ * This file is part of the Arduino Sd2Card Library
19 28
  */
20 29
 // Warning this file was generated by a program.
21 30
 #include "Marlin.h"
@@ -405,10 +414,10 @@ static inline __attribute__((always_inline))
405 414
   void setPinMode(uint8_t pin, uint8_t mode) {
406 415
   if (__builtin_constant_p(pin) && pin < digitalPinCount) {
407 416
     if (mode) {
408
-      *digitalPinMap[pin].ddr |= BIT(digitalPinMap[pin].bit);
417
+      SBI(*digitalPinMap[pin].ddr, digitalPinMap[pin].bit);
409 418
     }
410 419
     else {
411
-      *digitalPinMap[pin].ddr &= ~BIT(digitalPinMap[pin].bit);
420
+      CBI(*digitalPinMap[pin].ddr, digitalPinMap[pin].bit);
412 421
     }
413 422
   }
414 423
   else {
@@ -428,10 +437,10 @@ static inline __attribute__((always_inline))
428 437
   void fastDigitalWrite(uint8_t pin, uint8_t value) {
429 438
   if (__builtin_constant_p(pin) && pin < digitalPinCount) {
430 439
     if (value) {
431
-      *digitalPinMap[pin].port |= BIT(digitalPinMap[pin].bit);
440
+      SBI(*digitalPinMap[pin].port, digitalPinMap[pin].bit);
432 441
     }
433 442
     else {
434
-      *digitalPinMap[pin].port &= ~BIT(digitalPinMap[pin].bit);
443
+      CBI(*digitalPinMap[pin].port, digitalPinMap[pin].bit);
435 444
     }
436 445
   }
437 446
   else {

+ 24
- 16
Marlin/SdBaseFile.cpp View File

@@ -1,21 +1,30 @@
1
-/* Arduino SdFat Library
2
- * Copyright (C) 2009 by William Greiman
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
3 4
  *
4
- * This file is part of the Arduino SdFat Library
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
5 7
  *
6
- * This Library is free software: you can redistribute it and/or modify
8
+ * This program is free software: you can redistribute it and/or modify
7 9
  * it under the terms of the GNU General Public License as published by
8 10
  * the Free Software Foundation, either version 3 of the License, or
9 11
  * (at your option) any later version.
10 12
  *
11
- * This Library is distributed in the hope that it will be useful,
13
+ * This program is distributed in the hope that it will be useful,
12 14
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 15
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 16
  * GNU General Public License for more details.
15 17
  *
16 18
  * You should have received a copy of the GNU General Public License
17
- * along with the Arduino SdFat Library.  If not, see
18
- * <http://www.gnu.org/licenses/>.
19
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+
23
+/**
24
+ * Arduino SdFat Library
25
+ * Copyright (C) 2009 by William Greiman
26
+ *
27
+ * This file is part of the Arduino Sd2Card Library
19 28
  */
20 29
 
21 30
 #include "Marlin.h"
@@ -291,7 +300,7 @@ bool SdBaseFile::getFilename(char* name) {
291 300
   return true;
292 301
 }
293 302
 //------------------------------------------------------------------------------
294
-void SdBaseFile::getpos(fpos_t* pos) {
303
+void SdBaseFile::getpos(filepos_t* pos) {
295 304
   pos->position = curPosition_;
296 305
   pos->cluster = curCluster_;
297 306
 }
@@ -923,7 +932,7 @@ fail:
923 932
  * \return The byte if no error and not at eof else -1;
924 933
  */
925 934
 int SdBaseFile::peek() {
926
-  fpos_t pos;
935
+  filepos_t pos;
927 936
   getpos(&pos);
928 937
   int c = read();
929 938
   if (c >= 0) setpos(&pos);
@@ -1049,9 +1058,8 @@ int16_t SdBaseFile::read(void* buf, uint16_t nbyte) {
1049 1058
   if (!isOpen() || !(flags_ & O_READ)) goto fail;
1050 1059
 
1051 1060
   // max bytes left in file
1052
-  if (nbyte >= (fileSize_ - curPosition_)) {
1053
-    nbyte = fileSize_ - curPosition_;
1054
-  }
1061
+  NOMORE(nbyte, fileSize_ - curPosition_);
1062
+
1055 1063
   // amount left to read
1056 1064
   toRead = nbyte;
1057 1065
   while (toRead > 0) {
@@ -1077,7 +1085,7 @@ int16_t SdBaseFile::read(void* buf, uint16_t nbyte) {
1077 1085
     uint16_t n = toRead;
1078 1086
 
1079 1087
     // amount to be read from current block
1080
-    if (n > (512 - offset)) n = 512 - offset;
1088
+    NOMORE(n, 512 - offset);
1081 1089
 
1082 1090
     // no buffering needed if n == 512
1083 1091
     if (n == 512 && block != vol_->cacheBlockNumber()) {
@@ -1135,7 +1143,7 @@ int8_t SdBaseFile::readDir(dir_t* dir, char* longFilename) {
1135 1143
       // Sanity-check the VFAT entry. The first cluster is always set to zero. And the sequence number should be higher than 0
1136 1144
       if (VFAT->firstClusterLow == 0 && (VFAT->sequenceNumber & 0x1F) > 0 && (VFAT->sequenceNumber & 0x1F) <= MAX_VFAT_ENTRIES) {
1137 1145
         // TODO: Store the filename checksum to verify if a none-long filename aware system modified the file table.
1138
-        n = ((VFAT->sequenceNumber & 0x1F) - 1) * FILENAME_LENGTH;
1146
+        n = ((VFAT->sequenceNumber & 0x1F) - 1) * (FILENAME_LENGTH);
1139 1147
         for (uint8_t i = 0; i < FILENAME_LENGTH; i++)
1140 1148
           longFilename[n + i] = (i < 5) ? VFAT->name1[i] : (i < 11) ? VFAT->name2[i - 5] : VFAT->name3[i - 11];
1141 1149
         // If this VFAT entry is the last one, add a NUL terminator at the end of the string
@@ -1479,7 +1487,7 @@ fail:
1479 1487
   return false;
1480 1488
 }
1481 1489
 //------------------------------------------------------------------------------
1482
-void SdBaseFile::setpos(fpos_t* pos) {
1490
+void SdBaseFile::setpos(filepos_t* pos) {
1483 1491
   curPosition_ = pos->position;
1484 1492
   curCluster_ = pos->cluster;
1485 1493
 }
@@ -1758,7 +1766,7 @@ int16_t SdBaseFile::write(const void* buf, uint16_t nbyte) {
1758 1766
     uint16_t n = 512 - blockOffset;
1759 1767
 
1760 1768
     // lesser of space and amount to write
1761
-    if (n > nToWrite) n = nToWrite;
1769
+    NOMORE(n, nToWrite);
1762 1770
 
1763 1771
     // block for data write
1764 1772
     uint32_t block = vol_->clusterStartBlock(curCluster_) + blockOfCluster;

+ 21
- 12
Marlin/SdBaseFile.h View File

@@ -1,21 +1,30 @@
1
-/* Arduino SdFat Library
2
- * Copyright (C) 2009 by William Greiman
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
3 4
  *
4
- * This file is part of the Arduino SdFat Library
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
5 7
  *
6
- * This Library is free software: you can redistribute it and/or modify
8
+ * This program is free software: you can redistribute it and/or modify
7 9
  * it under the terms of the GNU General Public License as published by
8 10
  * the Free Software Foundation, either version 3 of the License, or
9 11
  * (at your option) any later version.
10 12
  *
11
- * This Library is distributed in the hope that it will be useful,
13
+ * This program is distributed in the hope that it will be useful,
12 14
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 15
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 16
  * GNU General Public License for more details.
15 17
  *
16 18
  * You should have received a copy of the GNU General Public License
17
- * along with the Arduino SdFat Library.  If not, see
18
- * <http://www.gnu.org/licenses/>.
19
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+
23
+/**
24
+ * Arduino SdFat Library
25
+ * Copyright (C) 2009 by William Greiman
26
+ *
27
+ * This file is part of the Arduino Sd2Card Library
19 28
  */
20 29
 #include "Marlin.h"
21 30
 #if ENABLED(SDSUPPORT)
@@ -31,16 +40,16 @@
31 40
 #include "SdVolume.h"
32 41
 //------------------------------------------------------------------------------
33 42
 /**
34
- * \struct fpos_t
43
+ * \struct filepos_t
35 44
  * \brief internal type for istream
36 45
  * do not use in user apps
37 46
  */
38
-struct fpos_t {
47
+struct filepos_t {
39 48
   /** stream position */
40 49
   uint32_t position;
41 50
   /** cluster for position */
42 51
   uint32_t cluster;
43
-  fpos_t() : position(0), cluster(0) {}
52
+  filepos_t() : position(0), cluster(0) {}
44 53
 };
45 54
 
46 55
 // use the gnu style oflag in open()
@@ -196,11 +205,11 @@ class SdBaseFile {
196 205
   /** get position for streams
197 206
    * \param[out] pos struct to receive position
198 207
    */
199
-  void getpos(fpos_t* pos);
208
+  void getpos(filepos_t* pos);
200 209
   /** set position for streams
201 210
    * \param[out] pos struct with value for new position
202 211
    */
203
-  void setpos(fpos_t* pos);
212
+  void setpos(filepos_t* pos);
204 213
   //----------------------------------------------------------------------------
205 214
   bool close();
206 215
   bool contiguousRange(uint32_t* bgnBlock, uint32_t* endBlock);

+ 16
- 7
Marlin/SdFatConfig.h View File

@@ -1,21 +1,30 @@
1
-/* Arduino SdFat Library
2
- * Copyright (C) 2009 by William Greiman
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
3 4
  *
4
- * This file is part of the Arduino SdFat Library
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
5 7
  *
6
- * This Library is free software: you can redistribute it and/or modify
8
+ * This program is free software: you can redistribute it and/or modify
7 9
  * it under the terms of the GNU General Public License as published by
8 10
  * the Free Software Foundation, either version 3 of the License, or
9 11
  * (at your option) any later version.
10 12
  *
11
- * This Library is distributed in the hope that it will be useful,
13
+ * This program is distributed in the hope that it will be useful,
12 14
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 15
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 16
  * GNU General Public License for more details.
15 17
  *
16 18
  * You should have received a copy of the GNU General Public License
17
- * along with the Arduino SdFat Library.  If not, see
18
- * <http://www.gnu.org/licenses/>.
19
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+
23
+/**
24
+ * Arduino SdFat Library
25
+ * Copyright (C) 2009 by William Greiman
26
+ *
27
+ * This file is part of the Arduino Sd2Card Library
19 28
  */
20 29
 /**
21 30
  * \file

+ 17
- 8
Marlin/SdFatStructs.h View File

@@ -1,21 +1,30 @@
1
-/* Arduino SdFat Library
2
- * Copyright (C) 2009 by William Greiman
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
3 4
  *
4
- * This file is part of the Arduino SdFat Library
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
5 7
  *
6
- * This Library is free software: you can redistribute it and/or modify
8
+ * This program is free software: you can redistribute it and/or modify
7 9
  * it under the terms of the GNU General Public License as published by
8 10
  * the Free Software Foundation, either version 3 of the License, or
9 11
  * (at your option) any later version.
10 12
  *
11
- * This Library is distributed in the hope that it will be useful,
13
+ * This program is distributed in the hope that it will be useful,
12 14
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 15
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 16
  * GNU General Public License for more details.
15 17
  *
16 18
  * You should have received a copy of the GNU General Public License
17
- * along with the Arduino SdFat Library.  If not, see
18
- * <http://www.gnu.org/licenses/>.
19
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+
23
+/**
24
+ * Arduino SdFat Library
25
+ * Copyright (C) 2009 by William Greiman
26
+ *
27
+ * This file is part of the Arduino Sd2Card Library
19 28
  */
20 29
 #include "Marlin.h"
21 30
 #if ENABLED(SDSUPPORT)
@@ -28,7 +37,7 @@
28 37
  * \file
29 38
  * \brief FAT file structures
30 39
  */
31
-/*
40
+/**
32 41
  * mostly from Microsoft document fatgen103.doc
33 42
  * http://www.microsoft.com/whdc/system/platform/firmware/fatgen.mspx
34 43
  */

+ 17
- 8
Marlin/SdFatUtil.cpp View File

@@ -1,21 +1,30 @@
1
-/* Arduino SdFat Library
2
- * Copyright (C) 2008 by William Greiman
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
3 4
  *
4
- * This file is part of the Arduino SdFat Library
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
5 7
  *
6
- * This Library is free software: you can redistribute it and/or modify
8
+ * This program is free software: you can redistribute it and/or modify
7 9
  * it under the terms of the GNU General Public License as published by
8 10
  * the Free Software Foundation, either version 3 of the License, or
9 11
  * (at your option) any later version.
10 12
  *
11
- * This Library is distributed in the hope that it will be useful,
13
+ * This program is distributed in the hope that it will be useful,
12 14
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 15
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 16
  * GNU General Public License for more details.
15
-
17
+ *
16 18
  * You should have received a copy of the GNU General Public License
17
- * along with the Arduino SdFat Library.  If not, see
18
- * <http://www.gnu.org/licenses/>.
19
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+
23
+/**
24
+ * Arduino SdFat Library
25
+ * Copyright (C) 2008 by William Greiman
26
+ *
27
+ * This file is part of the Arduino Sd2Card Library
19 28
  */
20 29
 #include "Marlin.h"
21 30
 

+ 18
- 9
Marlin/SdFatUtil.h View File

@@ -1,21 +1,30 @@
1
-/* Arduino SdFat Library
2
- * Copyright (C) 2008 by William Greiman
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
3 4
  *
4
- * This file is part of the Arduino SdFat Library
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
5 7
  *
6
- * This Library is free software: you can redistribute it and/or modify
8
+ * This program is free software: you can redistribute it and/or modify
7 9
  * it under the terms of the GNU General Public License as published by
8 10
  * the Free Software Foundation, either version 3 of the License, or
9 11
  * (at your option) any later version.
10 12
  *
11
- * This Library is distributed in the hope that it will be useful,
13
+ * This program is distributed in the hope that it will be useful,
12 14
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 15
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 16
  * GNU General Public License for more details.
15
-
17
+ *
16 18
  * You should have received a copy of the GNU General Public License
17
- * along with the Arduino SdFat Library.  If not, see
18
- * <http://www.gnu.org/licenses/>.
19
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+
23
+/**
24
+ * Arduino SdFat Library
25
+ * Copyright (C) 2008 by William Greiman
26
+ *
27
+ * This file is part of the Arduino Sd2Card Library
19 28
  */
20 29
 #include "Marlin.h"
21 30
 #if ENABLED(SDSUPPORT)
@@ -45,4 +54,4 @@ using namespace SdFatUtil;  // NOLINT
45 54
 #endif  //#define SdFatUtil_h
46 55
 
47 56
 
48
-#endif
57
+#endif

+ 16
- 7
Marlin/SdFile.cpp View File

@@ -1,21 +1,30 @@
1
-/* Arduino SdFat Library
2
- * Copyright (C) 2009 by William Greiman
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
3 4
  *
4
- * This file is part of the Arduino SdFat Library
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
5 7
  *
6
- * This Library is free software: you can redistribute it and/or modify
8
+ * This program is free software: you can redistribute it and/or modify
7 9
  * it under the terms of the GNU General Public License as published by
8 10
  * the Free Software Foundation, either version 3 of the License, or
9 11
  * (at your option) any later version.
10 12
  *
11
- * This Library is distributed in the hope that it will be useful,
13
+ * This program is distributed in the hope that it will be useful,
12 14
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 15
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 16
  * GNU General Public License for more details.
15 17
  *
16 18
  * You should have received a copy of the GNU General Public License
17
- * along with the Arduino SdFat Library.  If not, see
18
- * <http://www.gnu.org/licenses/>.
19
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+
23
+/**
24
+ * Arduino SdFat Library
25
+ * Copyright (C) 2009 by William Greiman
26
+ *
27
+ * This file is part of the Arduino Sd2Card Library
19 28
  */
20 29
 #include "Marlin.h"
21 30
 

+ 17
- 8
Marlin/SdFile.h View File

@@ -1,21 +1,30 @@
1
-/* Arduino SdFat Library
2
- * Copyright (C) 2009 by William Greiman
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
3 4
  *
4
- * This file is part of the Arduino SdFat Library
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
5 7
  *
6
- * This Library is free software: you can redistribute it and/or modify
8
+ * This program is free software: you can redistribute it and/or modify
7 9
  * it under the terms of the GNU General Public License as published by
8 10
  * the Free Software Foundation, either version 3 of the License, or
9 11
  * (at your option) any later version.
10 12
  *
11
- * This Library is distributed in the hope that it will be useful,
13
+ * This program is distributed in the hope that it will be useful,
12 14
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 15
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 16
  * GNU General Public License for more details.
15 17
  *
16 18
  * You should have received a copy of the GNU General Public License
17
- * along with the Arduino SdFat Library.  If not, see
18
- * <http://www.gnu.org/licenses/>.
19
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+
23
+/**
24
+ * Arduino SdFat Library
25
+ * Copyright (C) 2009 by William Greiman
26
+ *
27
+ * This file is part of the Arduino Sd2Card Library
19 28
  */
20 29
 /**
21 30
  * \file
@@ -51,4 +60,4 @@ class SdFile : public SdBaseFile, public Print {
51 60
 #endif  // SdFile_h
52 61
 
53 62
 
54
-#endif
63
+#endif

+ 17
- 8
Marlin/SdInfo.h View File

@@ -1,21 +1,30 @@
1
-/* Arduino Sd2Card Library
2
- * Copyright (C) 2009 by William Greiman
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
3 4
  *
4
- * This file is part of the Arduino Sd2Card Library
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
5 7
  *
6
- * This Library is free software: you can redistribute it and/or modify
8
+ * This program is free software: you can redistribute it and/or modify
7 9
  * it under the terms of the GNU General Public License as published by
8 10
  * the Free Software Foundation, either version 3 of the License, or
9 11
  * (at your option) any later version.
10 12
  *
11
- * This Library is distributed in the hope that it will be useful,
13
+ * This program is distributed in the hope that it will be useful,
12 14
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 15
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 16
  * GNU General Public License for more details.
15 17
  *
16 18
  * You should have received a copy of the GNU General Public License
17
- * along with the Arduino Sd2Card Library.  If not, see
18
- * <http://www.gnu.org/licenses/>.
19
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+
23
+/**
24
+ * Arduino Sd2Card Library
25
+ * Copyright (C) 2009 by William Greiman
26
+ *
27
+ * This file is part of the Arduino Sd2Card Library
19 28
  */
20 29
 #include "Marlin.h"
21 30
 #if ENABLED(SDSUPPORT)
@@ -277,4 +286,4 @@ union csd_t {
277 286
 };
278 287
 #endif  // SdInfo_h
279 288
 
280
-#endif
289
+#endif

+ 19
- 10
Marlin/SdVolume.cpp View File

@@ -1,21 +1,30 @@
1
-/* Arduino SdFat Library
2
- * Copyright (C) 2009 by William Greiman
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
3 4
  *
4
- * This file is part of the Arduino SdFat Library
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
5 7
  *
6
- * This Library is free software: you can redistribute it and/or modify
8
+ * This program is free software: you can redistribute it and/or modify
7 9
  * it under the terms of the GNU General Public License as published by
8 10
  * the Free Software Foundation, either version 3 of the License, or
9 11
  * (at your option) any later version.
10 12
  *
11
- * This Library is distributed in the hope that it will be useful,
13
+ * This program is distributed in the hope that it will be useful,
12 14
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 15
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 16
  * GNU General Public License for more details.
15 17
  *
16 18
  * You should have received a copy of the GNU General Public License
17
- * along with the Arduino SdFat Library.  If not, see
18
- * <http://www.gnu.org/licenses/>.
19
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+
23
+/**
24
+ * Arduino SdFat Library
25
+ * Copyright (C) 2009 by William Greiman
26
+ *
27
+ * This file is part of the Arduino Sd2Card Library
19 28
  */
20 29
 #include "Marlin.h"
21 30
 #if ENABLED(SDSUPPORT)
@@ -296,7 +305,7 @@ int32_t SdVolume::freeClusterCount() {
296 305
 
297 306
   for (uint32_t lba = fatStartBlock_; todo; todo -= n, lba++) {
298 307
     if (!cacheRawBlock(lba, CACHE_FOR_READ)) return -1;
299
-    if (todo < n) n = todo;
308
+    NOMORE(n, todo);
300 309
     if (fatType_ == 16) {
301 310
       for (uint16_t i = 0; i < n; i++) {
302 311
         if (cacheBuffer_.fat16[i] == 0) free++;
@@ -364,7 +373,7 @@ bool SdVolume::init(Sd2Card* dev, uint8_t part) {
364 373
   blocksPerCluster_ = fbs->sectorsPerCluster;
365 374
   // determine shift that is same as multiply by blocksPerCluster_
366 375
   clusterSizeShift_ = 0;
367
-  while (blocksPerCluster_ != BIT(clusterSizeShift_)) {
376
+  while (blocksPerCluster_ != _BV(clusterSizeShift_)) {
368 377
     // error if not power of 2
369 378
     if (clusterSizeShift_++ > 7) goto fail;
370 379
   }
@@ -408,4 +417,4 @@ bool SdVolume::init(Sd2Card* dev, uint8_t part) {
408 417
 fail:
409 418
   return false;
410 419
 }
411
-#endif
420
+#endif

+ 17
- 8
Marlin/SdVolume.h View File

@@ -1,21 +1,30 @@
1
-/* Arduino SdFat Library
2
- * Copyright (C) 2009 by William Greiman
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
3 4
  *
4
- * This file is part of the Arduino SdFat Library
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
5 7
  *
6
- * This Library is free software: you can redistribute it and/or modify
8
+ * This program is free software: you can redistribute it and/or modify
7 9
  * it under the terms of the GNU General Public License as published by
8 10
  * the Free Software Foundation, either version 3 of the License, or
9 11
  * (at your option) any later version.
10 12
  *
11
- * This Library is distributed in the hope that it will be useful,
13
+ * This program is distributed in the hope that it will be useful,
12 14
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 15
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 16
  * GNU General Public License for more details.
15 17
  *
16 18
  * You should have received a copy of the GNU General Public License
17
- * along with the Arduino SdFat Library.  If not, see
18
- * <http://www.gnu.org/licenses/>.
19
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+
23
+/**
24
+ * Arduino SdFat Library
25
+ * Copyright (C) 2009 by William Greiman
26
+ *
27
+ * This file is part of the Arduino Sd2Card Library
19 28
  */
20 29
 #include "Marlin.h"
21 30
 #if ENABLED(SDSUPPORT)
@@ -215,4 +224,4 @@ class SdVolume {
215 224
 #endif  // ALLOW_DEPRECATED_FUNCTIONS
216 225
 };
217 226
 #endif  // SdVolume
218
-#endif
227
+#endif

+ 27
- 4
Marlin/blinkm.cpp View File

@@ -1,7 +1,30 @@
1
-/*
2
-  blinkm.cpp - Library for controlling a BlinkM over i2c
3
-  Created by Tim Koster, August 21 2013.
4
-*/
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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
+/**
24
+ * blinkm.cpp - Library for controlling a BlinkM over i2c
25
+ * Created by Tim Koster, August 21 2013.
26
+ */
27
+
5 28
 #include "Marlin.h"
6 29
 
7 30
 #if ENABLED(BLINKM)

+ 25
- 3
Marlin/blinkm.h View File

@@ -1,6 +1,28 @@
1
-/*
2
-  blinkm.h
3
-  Library header file for BlinkM library
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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
+/**
24
+ * blinkm.h - Library for controlling a BlinkM over i2c
25
+ * Created by Tim Koster, August 21 2013.
4 26
  */
5 27
 
6 28
 #include "Arduino.h"

+ 27
- 0
Marlin/boards.h View File

@@ -1,3 +1,25 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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
+
1 23
 #ifndef BOARDS_H
2 24
 #define BOARDS_H
3 25
 
@@ -40,6 +62,7 @@
40 62
 #define BOARD_TEENSYLU          8    // Teensylu
41 63
 #define BOARD_RUMBA             80   // Rumba
42 64
 #define BOARD_PRINTRBOARD       81   // Printrboard (AT90USB1286)
65
+#define BOARD_PRINTRBOARD_REVF  811  // Printrboard Revision F (AT90USB1286)
43 66
 #define BOARD_BRAINWAVE         82   // Brainwave (AT90USB646)
44 67
 #define BOARD_SAV_MKI           83   // SAV Mk-I (AT90USB1286)
45 68
 #define BOARD_TEENSY2           84   // Teensy++2.0 (AT90USB1286) - CLI compile: DEFINES=AT90USBxx_TEENSYPP_ASSIGNMENTS HARDWARE_MOTHERBOARD=84  make
@@ -54,13 +77,17 @@
54 77
 #define BOARD_OMCA              91   // Final OMCA board
55 78
 #define BOARD_RAMBO             301  // Rambo
56 79
 #define BOARD_MINIRAMBO         302  // Mini-Rambo
80
+#define BOARD_AJ4P              303  // AJ4P
57 81
 #define BOARD_MEGACONTROLLER    310  // Mega controller
58 82
 #define BOARD_ELEFU_3           21   // Elefu Ra Board (v3)
59 83
 #define BOARD_5DPRINT           88   // 5DPrint D8 Driver Board
60 84
 #define BOARD_LEAPFROG          999  // Leapfrog
61 85
 #define BOARD_MKS_BASE          40   // MKS BASE 1.0
86
+#define BOARD_MKS_13            47   // MKS v1.3 or 1.4 (maybe higher)
87
+#define BOARD_SAINSMART_2IN1    49   // Sainsmart 2-in-1 board
62 88
 #define BOARD_BAM_DICE          401  // 2PrintBeta BAM&DICE with STK drivers
63 89
 #define BOARD_BAM_DICE_DUE      402  // 2PrintBeta BAM&DICE Due with STK drivers
90
+#define BOARD_BQ_ZUM_MEGA_3D    503  // bq ZUM Mega 3D
64 91
 
65 92
 #define BOARD_99                99   // This is in pins.h but...?
66 93
 

+ 22
- 0
Marlin/buzzer.cpp View File

@@ -1,3 +1,25 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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
+
1 23
 #include "Marlin.h"
2 24
 #if HAS_BUZZER
3 25
   #include "buzzer.h"

+ 23
- 1
Marlin/buzzer.h View File

@@ -1,3 +1,25 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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
+
1 23
 #ifndef BUZZER_H
2 24
   #define BUZZER_H
3 25
 
@@ -5,4 +27,4 @@
5 27
     void buzz(long duration, uint16_t freq);
6 28
   #endif
7 29
 
8
-#endif //BUZZER_H
30
+#endif //BUZZER_H

+ 57
- 43
Marlin/cardreader.cpp View File

@@ -1,3 +1,25 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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
+
1 23
 #include "Marlin.h"
2 24
 #include "cardreader.h"
3 25
 #include "ultralcd.h"
@@ -88,7 +110,7 @@ void CardReader::lsDive(const char *prepend, SdFile parent, const char * const m
88 110
       // close() is done automatically by destructor of SdFile
89 111
     }
90 112
     else {
91
-      char pn0 = p.name[0];
113
+      uint8_t pn0 = p.name[0];
92 114
       if (pn0 == DIR_NAME_FREE) break;
93 115
       if (pn0 == DIR_NAME_DELETED || pn0 == '.') continue;
94 116
       if (longFilename[0] == '.') continue;
@@ -195,11 +217,7 @@ void CardReader::initsd() {
195 217
   cardOK = false;
196 218
   if (root.isOpen()) root.close();
197 219
 
198
-  #if ENABLED(SDEXTRASLOW)
199
-    #define SPI_SPEED SPI_QUARTER_SPEED
200
-  #elif ENABLED(SDSLOW)
201
-    #define SPI_SPEED SPI_HALF_SPEED
202
-  #else
220
+  #ifndef SPI_SPEED
203 221
     #define SPI_SPEED SPI_FULL_SPEED
204 222
   #endif
205 223
 
@@ -227,7 +245,7 @@ void CardReader::initsd() {
227 245
   }
228 246
   workDir = root;
229 247
   curDir = &root;
230
-  /*
248
+  /**
231 249
   if (!workDir.openRoot(&volume)) {
232 250
     SERIAL_ECHOLNPGM(MSG_SD_WORKDIR_FAIL);
233 251
   }
@@ -247,6 +265,14 @@ void CardReader::release() {
247 265
   cardOK = false;
248 266
 }
249 267
 
268
+void CardReader::openAndPrintFile(const char *name) {
269
+  char cmd[4 + strlen(name) + 1]; // Room for "M23 ", filename, and null
270
+  sprintf_P(cmd, PSTR("M23 %s"), name);
271
+  for (char *c = &cmd[4]; *c; c++) *c = tolower(*c);
272
+  enqueue_and_echo_command(cmd);
273
+  enqueue_and_echo_commands_P(PSTR("M24"));
274
+}
275
+
250 276
 void CardReader::startFileprint() {
251 277
   if (cardOK)
252 278
     sdprinting = true;
@@ -268,16 +294,16 @@ void CardReader::getAbsFilename(char *t) {
268 294
     workDirParents[i].getFilename(t); //SDBaseFile.getfilename!
269 295
     while (*t && cnt < MAXPATHNAMELENGTH) { t++; cnt++; } //crawl counter forward.
270 296
   }
271
-  if (cnt < MAXPATHNAMELENGTH - FILENAME_LENGTH)
297
+  if (cnt < MAXPATHNAMELENGTH - (FILENAME_LENGTH))
272 298
     file.getFilename(t);
273 299
   else
274 300
     t[0] = 0;
275 301
 }
276 302
 
277
-void CardReader::openFile(char* name, bool read, bool replace_current/*=true*/) {
303
+void CardReader::openFile(char* name, bool read, bool push_current/*=false*/) {
278 304
   if (!cardOK) return;
279 305
   if (file.isOpen()) { //replacing current file by new file, or subfile call
280
-    if (!replace_current) {
306
+    if (push_current) {
281 307
       if (file_subcall_ctr > SD_PROCEDURE_DEPTH - 1) {
282 308
         SERIAL_ERROR_START;
283 309
         SERIAL_ERRORPGM("trying to call sub-gcode files with too many levels. MAX level is:");
@@ -292,20 +318,20 @@ void CardReader::openFile(char* name, bool read, bool replace_current/*=true*/)
292 318
       SERIAL_ECHOPGM("\" parent:\"");
293 319
 
294 320
       //store current filename and position
295
-      getAbsFilename(filenames[file_subcall_ctr]);
321
+      getAbsFilename(proc_filenames[file_subcall_ctr]);
296 322
 
297
-      SERIAL_ECHO(filenames[file_subcall_ctr]);
323
+      SERIAL_ECHO(proc_filenames[file_subcall_ctr]);
298 324
       SERIAL_ECHOPGM("\" pos");
299 325
       SERIAL_ECHOLN(sdpos);
300 326
       filespos[file_subcall_ctr] = sdpos;
301 327
       file_subcall_ctr++;
302
-     }
303
-     else {
304
-      SERIAL_ECHO_START;
305
-      SERIAL_ECHOPGM("Now doing file: ");
306
-      SERIAL_ECHOLN(name);
307
-     }
308
-     file.close();
328
+    }
329
+    else {
330
+     SERIAL_ECHO_START;
331
+     SERIAL_ECHOPGM("Now doing file: ");
332
+     SERIAL_ECHOLN(name);
333
+    }
334
+    file.close();
309 335
   }
310 336
   else { //opening fresh file
311 337
     file_subcall_ctr = 0; //resetting procedure depth in case user cancels print while in procedure
@@ -322,11 +348,11 @@ void CardReader::openFile(char* name, bool read, bool replace_current/*=true*/)
322 348
   char *dirname_start, *dirname_end;
323 349
   if (name[0] == '/') {
324 350
     dirname_start = &name[1];
325
-    while (dirname_start > 0) {
351
+    while (dirname_start != NULL) {
326 352
       dirname_end = strchr(dirname_start, '/');
327 353
       //SERIAL_ECHO("start:");SERIAL_ECHOLN((int)(dirname_start - name));
328 354
       //SERIAL_ECHO("end  :");SERIAL_ECHOLN((int)(dirname_end - name));
329
-      if (dirname_end > 0 && dirname_end > dirname_start) {
355
+      if (dirname_end != NULL && dirname_end > dirname_start) {
330 356
         char subdirname[FILENAME_LENGTH];
331 357
         strncpy(subdirname, dirname_start, dirname_end - dirname_start);
332 358
         subdirname[dirname_end - dirname_start] = 0;
@@ -403,11 +429,11 @@ void CardReader::removeFile(char* name) {
403 429
   char *dirname_start, *dirname_end;
404 430
   if (name[0] == '/') {
405 431
     dirname_start = strchr(name, '/') + 1;
406
-    while (dirname_start > 0) {
432
+    while (dirname_start != NULL) {
407 433
       dirname_end = strchr(dirname_start, '/');
408 434
       //SERIAL_ECHO("start:");SERIAL_ECHOLN((int)(dirname_start - name));
409 435
       //SERIAL_ECHO("end  :");SERIAL_ECHOLN((int)(dirname_end - name));
410
-      if (dirname_end > 0 && dirname_end > dirname_start) {
436
+      if (dirname_end != NULL && dirname_end > dirname_start) {
411 437
         char subdirname[FILENAME_LENGTH];
412 438
         strncpy(subdirname, dirname_start, dirname_end - dirname_start);
413 439
         subdirname[dirname_end - dirname_start] = 0;
@@ -504,10 +530,7 @@ void CardReader::checkautostart(bool force) {
504 530
   while (root.readDir(p, NULL) > 0) {
505 531
     for (int8_t i = 0; i < (int8_t)strlen((char*)p.name); i++) p.name[i] = tolower(p.name[i]);
506 532
     if (p.name[9] != '~' && strncmp((char*)p.name, autoname, 5) == 0) {
507
-      char cmd[4 + (FILENAME_LENGTH + 1) * MAX_DIR_DEPTH + 2];
508
-      sprintf_P(cmd, PSTR("M23 %s"), autoname);
509
-      enqueuecommand(cmd);
510
-      enqueuecommands_P(PSTR("M24"));
533
+      openAndPrintFile(autoname);
511 534
       found = true;
512 535
     }
513 536
   }
@@ -561,22 +584,15 @@ void CardReader::chdir(const char * relpath) {
561 584
     SERIAL_ECHOLN(relpath);
562 585
   }
563 586
   else {
564
-    if (workDirDepth < MAX_DIR_DEPTH) {
565
-      ++workDirDepth;
566
-      for (int d = workDirDepth; d--;) workDirParents[d + 1] = workDirParents[d];
567
-      workDirParents[0] = *parent;
568
-    }
587
+    if (workDirDepth < MAX_DIR_DEPTH)
588
+      workDirParents[workDirDepth++] = *parent;
569 589
     workDir = newfile;
570 590
   }
571 591
 }
572 592
 
573 593
 void CardReader::updir() {
574
-  if (workDirDepth > 0) {
575
-    --workDirDepth;
576
-    workDir = workDirParents[0];
577
-    for (uint16_t d = 0; d < workDirDepth; d++)
578
-      workDirParents[d] = workDirParents[d+1];
579
-  }
594
+  if (workDirDepth > 0)
595
+    workDir = workDirParents[--workDirDepth];
580 596
 }
581 597
 
582 598
 void CardReader::printingHasFinished() {
@@ -584,17 +600,15 @@ void CardReader::printingHasFinished() {
584 600
   if (file_subcall_ctr > 0) { // Heading up to a parent file that called current as a procedure.
585 601
     file.close();
586 602
     file_subcall_ctr--;
587
-    openFile(filenames[file_subcall_ctr], true, true);
603
+    openFile(proc_filenames[file_subcall_ctr], true, true);
588 604
     setIndex(filespos[file_subcall_ctr]);
589 605
     startFileprint();
590 606
   }
591 607
   else {
592 608
     file.close();
593 609
     sdprinting = false;
594
-    if (SD_FINISHED_STEPPERRELEASE) {
595
-      //finishAndDisableSteppers();
596
-      enqueuecommands_P(PSTR(SD_FINISHED_RELEASECOMMAND));
597
-    }
610
+    if (SD_FINISHED_STEPPERRELEASE)
611
+      enqueue_and_echo_commands_P(PSTR(SD_FINISHED_RELEASECOMMAND));
598 612
     autotempShutdown();
599 613
   }
600 614
 }

+ 28
- 5
Marlin/cardreader.h View File

@@ -1,3 +1,25 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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
+
1 23
 #ifndef CARDREADER_H
2 24
 #define CARDREADER_H
3 25
 
@@ -18,11 +40,12 @@ public:
18 40
   //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
19 41
 
20 42
   void checkautostart(bool x);
21
-  void openFile(char* name,bool read,bool replace_current=true);
43
+  void openFile(char* name, bool read, bool push_current=false);
22 44
   void openLogFile(char* name);
23 45
   void removeFile(char* name);
24 46
   void closefile(bool store_location=false);
25 47
   void release();
48
+  void openAndPrintFile(const char *name);
26 49
   void startFileprint();
27 50
   void pauseSDPrint();
28 51
   void getStatus();
@@ -42,7 +65,6 @@ public:
42 65
   void updir();
43 66
   void setroot();
44 67
 
45
-
46 68
   FORCE_INLINE bool isFileOpen() { return file.isOpen(); }
47 69
   FORCE_INLINE bool eof() { return sdpos >= filesize; }
48 70
   FORCE_INLINE int16_t get() { sdpos = file.curPosition(); return (int16_t)file.read(); }
@@ -56,19 +78,20 @@ public:
56 78
   int autostart_index;
57 79
 private:
58 80
   SdFile root, *curDir, workDir, workDirParents[MAX_DIR_DEPTH];
59
-  uint16_t workDirDepth;
81
+  uint8_t workDirDepth;
60 82
   Sd2Card card;
61 83
   SdVolume volume;
62 84
   SdFile file;
85
+
63 86
   #define SD_PROCEDURE_DEPTH 1
64 87
   #define MAXPATHNAMELENGTH (FILENAME_LENGTH*MAX_DIR_DEPTH + MAX_DIR_DEPTH + 1)
65 88
   uint8_t file_subcall_ctr;
66 89
   uint32_t filespos[SD_PROCEDURE_DEPTH];
67
-  char filenames[SD_PROCEDURE_DEPTH][MAXPATHNAMELENGTH];
90
+  char proc_filenames[SD_PROCEDURE_DEPTH][MAXPATHNAMELENGTH];
68 91
   uint32_t filesize;
69
-  millis_t next_autostart_ms;
70 92
   uint32_t sdpos;
71 93
 
94
+  millis_t next_autostart_ms;
72 95
   bool autostart_stilltocheck; //the sd start is delayed, because otherwise the serial cannot answer fast enought to make contact with the hostsoftware.
73 96
 
74 97
   LsAction lsAction; //stored for recursion.

+ 129
- 76
Marlin/configuration_store.cpp View File

@@ -1,4 +1,26 @@
1 1
 /**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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
+/**
2 24
  * configuration_store.cpp
3 25
  *
4 26
  * Configuration and EEPROM storage
@@ -14,79 +36,88 @@
14 36
  *
15 37
  */
16 38
 
17
-#define EEPROM_VERSION "V21"
39
+#define EEPROM_VERSION "V23"
18 40
 
19 41
 /**
20
- * V19 EEPROM Layout:
42
+ * V23 EEPROM Layout:
43
+ *
44
+ *  100  Version (char x4)
21 45
  *
22
- *  ver
23
- *  M92 XYZE  axis_steps_per_unit (x4)
24
- *  M203 XYZE max_feedrate (x4)
25
- *  M201 XYZE max_acceleration_units_per_sq_second (x4)
26
- *  M204 P    acceleration
27
- *  M204 R    retract_acceleration
28
- *  M204 T    travel_acceleration
29
- *  M205 S    minimumfeedrate
30
- *  M205 T    mintravelfeedrate
31
- *  M205 B    minsegmenttime
32
- *  M205 X    max_xy_jerk
33
- *  M205 Z    max_z_jerk
34
- *  M205 E    max_e_jerk
35
- *  M206 XYZ  home_offset (x3)
46
+ *  104  M92 XYZE  axis_steps_per_unit (float x4)
47
+ *  120  M203 XYZE max_feedrate (float x4)
48
+ *  136  M201 XYZE max_acceleration_units_per_sq_second (uint32_t x4)
49
+ *  152  M204 P    acceleration (float)
50
+ *  156  M204 R    retract_acceleration (float)
51
+ *  160  M204 T    travel_acceleration (float)
52
+ *  164  M205 S    minimumfeedrate (float)
53
+ *  168  M205 T    mintravelfeedrate (float)
54
+ *  172  M205 B    minsegmenttime (ulong)
55
+ *  176  M205 X    max_xy_jerk (float)
56
+ *  180  M205 Z    max_z_jerk (float)
57
+ *  184  M205 E    max_e_jerk (float)
58
+ *  188  M206 XYZ  home_offset (float x3)
36 59
  *
37 60
  * Mesh bed leveling:
38
- *  M420 S    active
39
- *            mesh_num_x (set in firmware)
40
- *            mesh_num_y (set in firmware)
41
- *  M421 XYZ  z_values[][]
42
- *  M851      zprobe_zoffset
61
+ *  200  M420 S    active (bool)
62
+ *  201            z_offset (float) (added in V23)
63
+ *  205            mesh_num_x (uint8 as set in firmware)
64
+ *  206            mesh_num_y (uint8 as set in firmware)
65
+ *  207  M421 XYZ  z_values[][] (float x9, by default)
66
+ *
67
+ * AUTO BED LEVELING
68
+ *  243  M851      zprobe_zoffset (float)
43 69
  *
44 70
  * DELTA:
45
- *  M666 XYZ  endstop_adj (x3)
46
- *  M665 R    delta_radius
47
- *  M665 L    delta_diagonal_rod
48
- *  M665 S    delta_segments_per_second
71
+ *  247  M666 XYZ  endstop_adj (float x3)
72
+ *  259  M665 R    delta_radius (float)
73
+ *  263  M665 L    delta_diagonal_rod (float)
74
+ *  267  M665 S    delta_segments_per_second (float)
75
+ *  271  M665 A    delta_diagonal_rod_trim_tower_1 (float)
76
+ *  275  M665 B    delta_diagonal_rod_trim_tower_2 (float)
77
+ *  279  M665 C    delta_diagonal_rod_trim_tower_3 (float)
78
+ *
79
+ * Z_DUAL_ENDSTOPS:
80
+ *  283  M666 Z    z_endstop_adj (float)
49 81
  *
50 82
  * ULTIPANEL:
51
- *  M145 S0 H plaPreheatHotendTemp
52
- *  M145 S0 B plaPreheatHPBTemp
53
- *  M145 S0 F plaPreheatFanSpeed
54
- *  M145 S1 H absPreheatHotendTemp
55
- *  M145 S1 B absPreheatHPBTemp
56
- *  M145 S1 F absPreheatFanSpeed
83
+ *  287  M145 S0 H plaPreheatHotendTemp (int)
84
+ *  289  M145 S0 B plaPreheatHPBTemp (int)
85
+ *  291  M145 S0 F plaPreheatFanSpeed (int)
86
+ *  293  M145 S1 H absPreheatHotendTemp (int)
87
+ *  295  M145 S1 B absPreheatHPBTemp (int)
88
+ *  297  M145 S1 F absPreheatFanSpeed (int)
57 89
  *
58 90
  * PIDTEMP:
59
- *  M301 E0 PIDC  Kp[0], Ki[0], Kd[0], Kc[0]
60
- *  M301 E1 PIDC  Kp[1], Ki[1], Kd[1], Kc[1]
61
- *  M301 E2 PIDC  Kp[2], Ki[2], Kd[2], Kc[2]
62
- *  M301 E3 PIDC  Kp[3], Ki[3], Kd[3], Kc[3]
63
- *  M301 L        lpq_len
91
+ *  299  M301 E0 PIDC  Kp[0], Ki[0], Kd[0], Kc[0] (float x4)
92
+ *  315  M301 E1 PIDC  Kp[1], Ki[1], Kd[1], Kc[1] (float x4)
93
+ *  331  M301 E2 PIDC  Kp[2], Ki[2], Kd[2], Kc[2] (float x4)
94
+ *  347  M301 E3 PIDC  Kp[3], Ki[3], Kd[3], Kc[3] (float x4)
95
+ *  363  M301 L        lpq_len (int)
64 96
  *
65 97
  * PIDTEMPBED:
66
- *  M304 PID  bedKp, bedKi, bedKd
98
+ *  365  M304 PID  bedKp, bedKi, bedKd (float x3)
67 99
  *
68 100
  * DOGLCD:
69
- *  M250 C    lcd_contrast
101
+ *  377  M250 C    lcd_contrast (int)
70 102
  *
71 103
  * SCARA:
72
- *  M365 XYZ  axis_scaling (x3)
104
+ *  379  M365 XYZ  axis_scaling (float x3)
73 105
  *
74 106
  * FWRETRACT:
75
- *  M209 S    autoretract_enabled
76
- *  M207 S    retract_length
77
- *  M207 W    retract_length_swap
78
- *  M207 F    retract_feedrate
79
- *  M207 Z    retract_zlift
80
- *  M208 S    retract_recover_length
81
- *  M208 W    retract_recover_length_swap
82
- *  M208 F    retract_recover_feedrate
107
+ *  391  M209 S    autoretract_enabled (bool)
108
+ *  392  M207 S    retract_length (float)
109
+ *  396  M207 W    retract_length_swap (float)
110
+ *  400  M207 F    retract_feedrate (float)
111
+ *  404  M207 Z    retract_zlift (float)
112
+ *  408  M208 S    retract_recover_length (float)
113
+ *  412  M208 W    retract_recover_length_swap (float)
114
+ *  416  M208 F    retract_recover_feedrate (float)
83 115
  *
84
- *  M200 D    volumetric_enabled (D>0 makes this enabled)
116
+ * Volumetric Extrusion:
117
+ *  420  M200 D    volumetric_enabled (bool)
118
+ *  421  M200 T D  filament_size (float x4) (T0..3)
85 119
  *
86
- *  M200 T D  filament_size (x4) (T0..3)
87
- *
88
- * Z_DUAL_ENDSTOPS:
89
- *  M666 Z    z_endstop_adj
120
+ *  437  This Slot is Available!
90 121
  *
91 122
  */
92 123
 #include "Marlin.h"
@@ -133,6 +164,10 @@ void _EEPROM_readData(int &pos, uint8_t* value, uint8_t size) {
133 164
 
134 165
 #if ENABLED(EEPROM_SETTINGS)
135 166
 
167
+/**
168
+ * Store Configuration Settings - M500
169
+ */
170
+
136 171
 void Config_StoreSettings()  {
137 172
   float dummy = 0.0f;
138 173
   char ver[4] = "000";
@@ -156,19 +191,21 @@ void Config_StoreSettings()  {
156 191
   uint8_t mesh_num_y = 3;
157 192
   #if ENABLED(MESH_BED_LEVELING)
158 193
     // Compile time test that sizeof(mbl.z_values) is as expected
159
-    typedef char c_assert[(sizeof(mbl.z_values) == MESH_NUM_X_POINTS * MESH_NUM_Y_POINTS * sizeof(dummy)) ? 1 : -1];
194
+    typedef char c_assert[(sizeof(mbl.z_values) == (MESH_NUM_X_POINTS) * (MESH_NUM_Y_POINTS) * sizeof(dummy)) ? 1 : -1];
160 195
     mesh_num_x = MESH_NUM_X_POINTS;
161 196
     mesh_num_y = MESH_NUM_Y_POINTS;
162 197
     EEPROM_WRITE_VAR(i, mbl.active);
198
+    EEPROM_WRITE_VAR(i, mbl.z_offset);
163 199
     EEPROM_WRITE_VAR(i, mesh_num_x);
164 200
     EEPROM_WRITE_VAR(i, mesh_num_y);
165 201
     EEPROM_WRITE_VAR(i, mbl.z_values);
166 202
   #else
167 203
     uint8_t dummy_uint8 = 0;
204
+    dummy = 0.0f;
168 205
     EEPROM_WRITE_VAR(i, dummy_uint8);
206
+    EEPROM_WRITE_VAR(i, dummy);
169 207
     EEPROM_WRITE_VAR(i, mesh_num_x);
170 208
     EEPROM_WRITE_VAR(i, mesh_num_y);
171
-    dummy = 0.0f;
172 209
     for (uint8_t q = 0; q < mesh_num_x * mesh_num_y; q++) EEPROM_WRITE_VAR(i, dummy);
173 210
   #endif // MESH_BED_LEVELING
174 211
 
@@ -182,13 +219,16 @@ void Config_StoreSettings()  {
182 219
     EEPROM_WRITE_VAR(i, delta_radius);              // 1 float
183 220
     EEPROM_WRITE_VAR(i, delta_diagonal_rod);        // 1 float
184 221
     EEPROM_WRITE_VAR(i, delta_segments_per_second); // 1 float
222
+    EEPROM_WRITE_VAR(i, delta_diagonal_rod_trim_tower_1);  // 1 float
223
+    EEPROM_WRITE_VAR(i, delta_diagonal_rod_trim_tower_2);  // 1 float
224
+    EEPROM_WRITE_VAR(i, delta_diagonal_rod_trim_tower_3);  // 1 float
185 225
   #elif ENABLED(Z_DUAL_ENDSTOPS)
186
-    EEPROM_WRITE_VAR(i, z_endstop_adj);            // 1 floats
226
+    EEPROM_WRITE_VAR(i, z_endstop_adj);            // 1 float
187 227
     dummy = 0.0f;
188
-    for (int q = 5; q--;) EEPROM_WRITE_VAR(i, dummy);
228
+    for (uint8_t q = 8; q--;) EEPROM_WRITE_VAR(i, dummy);
189 229
   #else
190 230
     dummy = 0.0f;
191
-    for (int q = 6; q--;) EEPROM_WRITE_VAR(i, dummy);
231
+    for (uint8_t q = 9; q--;) EEPROM_WRITE_VAR(i, dummy);
192 232
   #endif
193 233
 
194 234
   #if DISABLED(ULTIPANEL)
@@ -203,7 +243,7 @@ void Config_StoreSettings()  {
203 243
   EEPROM_WRITE_VAR(i, absPreheatHPBTemp);
204 244
   EEPROM_WRITE_VAR(i, absPreheatFanSpeed);
205 245
 
206
-  for (int e = 0; e < 4; e++) {
246
+  for (uint8_t e = 0; e < 4; e++) {
207 247
 
208 248
     #if ENABLED(PIDTEMP)
209 249
       if (e < EXTRUDERS) {
@@ -223,7 +263,7 @@ void Config_StoreSettings()  {
223 263
         dummy = DUMMY_PID_VALUE; // When read, will not change the existing value
224 264
         EEPROM_WRITE_VAR(i, dummy);
225 265
         dummy = 0.0f;
226
-        for (int q = 3; q--;) EEPROM_WRITE_VAR(i, dummy);
266
+        for (uint8_t q = 3; q--;) EEPROM_WRITE_VAR(i, dummy);
227 267
       }
228 268
 
229 269
   } // Extruders Loop
@@ -277,7 +317,7 @@ void Config_StoreSettings()  {
277 317
   EEPROM_WRITE_VAR(i, volumetric_enabled);
278 318
 
279 319
   // Save filament sizes
280
-  for (int q = 0; q < 4; q++) {
320
+  for (uint8_t q = 0; q < 4; q++) {
281 321
     if (q < EXTRUDERS) dummy = filament_size[q];
282 322
     EEPROM_WRITE_VAR(i, dummy);
283 323
   }
@@ -331,18 +371,20 @@ void Config_RetrieveSettings() {
331 371
 
332 372
     uint8_t dummy_uint8 = 0, mesh_num_x = 0, mesh_num_y = 0;
333 373
     EEPROM_READ_VAR(i, dummy_uint8);
374
+    EEPROM_READ_VAR(i, dummy);
334 375
     EEPROM_READ_VAR(i, mesh_num_x);
335 376
     EEPROM_READ_VAR(i, mesh_num_y);
336 377
     #if ENABLED(MESH_BED_LEVELING)
337 378
       mbl.active = dummy_uint8;
379
+      mbl.z_offset = dummy;
338 380
       if (mesh_num_x == MESH_NUM_X_POINTS && mesh_num_y == MESH_NUM_Y_POINTS) {
339 381
         EEPROM_READ_VAR(i, mbl.z_values);
340 382
       } else {
341 383
         mbl.reset();
342
-        for (int q = 0; q < mesh_num_x * mesh_num_y; q++) EEPROM_READ_VAR(i, dummy);
384
+        for (uint8_t q = 0; q < mesh_num_x * mesh_num_y; q++) EEPROM_READ_VAR(i, dummy);
343 385
       }
344 386
     #else
345
-      for (int q = 0; q < mesh_num_x * mesh_num_y; q++) EEPROM_READ_VAR(i, dummy);
387
+      for (uint8_t q = 0; q < mesh_num_x * mesh_num_y; q++) EEPROM_READ_VAR(i, dummy);
346 388
     #endif // MESH_BED_LEVELING
347 389
 
348 390
     #if DISABLED(AUTO_BED_LEVELING_FEATURE)
@@ -355,13 +397,16 @@ void Config_RetrieveSettings() {
355 397
       EEPROM_READ_VAR(i, delta_radius);               // 1 float
356 398
       EEPROM_READ_VAR(i, delta_diagonal_rod);         // 1 float
357 399
       EEPROM_READ_VAR(i, delta_segments_per_second);  // 1 float
400
+      EEPROM_READ_VAR(i, delta_diagonal_rod_trim_tower_1);  // 1 float
401
+      EEPROM_READ_VAR(i, delta_diagonal_rod_trim_tower_2);  // 1 float
402
+      EEPROM_READ_VAR(i, delta_diagonal_rod_trim_tower_3);  // 1 float
358 403
     #elif ENABLED(Z_DUAL_ENDSTOPS)
359 404
       EEPROM_READ_VAR(i, z_endstop_adj);
360 405
       dummy = 0.0f;
361
-      for (int q=5; q--;) EEPROM_READ_VAR(i, dummy);
406
+      for (uint8_t q=8; q--;) EEPROM_READ_VAR(i, dummy);
362 407
     #else
363 408
       dummy = 0.0f;
364
-      for (int q=6; q--;) EEPROM_READ_VAR(i, dummy);
409
+      for (uint8_t q=9; q--;) EEPROM_READ_VAR(i, dummy);
365 410
     #endif
366 411
 
367 412
     #if DISABLED(ULTIPANEL)
@@ -377,7 +422,7 @@ void Config_RetrieveSettings() {
377 422
     EEPROM_READ_VAR(i, absPreheatFanSpeed);
378 423
 
379 424
     #if ENABLED(PIDTEMP)
380
-      for (int e = 0; e < 4; e++) { // 4 = max extruders currently supported by Marlin
425
+      for (uint8_t e = 0; e < 4; e++) { // 4 = max extruders currently supported by Marlin
381 426
         EEPROM_READ_VAR(i, dummy); // Kp
382 427
         if (e < EXTRUDERS && dummy != DUMMY_PID_VALUE) {
383 428
           // do not need to scale PID values as the values in EEPROM are already scaled
@@ -391,12 +436,12 @@ void Config_RetrieveSettings() {
391 436
           #endif
392 437
         }
393 438
         else {
394
-          for (int q=3; q--;) EEPROM_READ_VAR(i, dummy); // Ki, Kd, Kc
439
+          for (uint8_t q=3; q--;) EEPROM_READ_VAR(i, dummy); // Ki, Kd, Kc
395 440
         }
396 441
       }
397 442
     #else // !PIDTEMP
398 443
       // 4 x 4 = 16 slots for PID parameters
399
-      for (int q=16; q--;) EEPROM_READ_VAR(i, dummy);  // 4x Kp, Ki, Kd, Kc
444
+      for (uint8_t q=16; q--;) EEPROM_READ_VAR(i, dummy);  // 4x Kp, Ki, Kd, Kc
400 445
     #endif // !PIDTEMP
401 446
 
402 447
     #if DISABLED(PID_ADD_EXTRUSION_RATE)
@@ -415,7 +460,7 @@ void Config_RetrieveSettings() {
415 460
       EEPROM_READ_VAR(i, bedKd);
416 461
     }
417 462
     else {
418
-      for (int q=2; q--;) EEPROM_READ_VAR(i, dummy); // bedKi, bedKd
463
+      for (uint8_t q=2; q--;) EEPROM_READ_VAR(i, dummy); // bedKi, bedKd
419 464
     }
420 465
 
421 466
     #if DISABLED(HAS_LCD_CONTRAST)
@@ -450,7 +495,7 @@ void Config_RetrieveSettings() {
450 495
 
451 496
     EEPROM_READ_VAR(i, volumetric_enabled);
452 497
 
453
-    for (int q = 0; q < 4; q++) {
498
+    for (uint8_t q = 0; q < 4; q++) {
454 499
       EEPROM_READ_VAR(i, dummy);
455 500
       if (q < EXTRUDERS) filament_size[q] = dummy;
456 501
     }
@@ -518,6 +563,9 @@ void Config_ResetDefault() {
518 563
     delta_radius =  DELTA_RADIUS;
519 564
     delta_diagonal_rod =  DELTA_DIAGONAL_ROD;
520 565
     delta_segments_per_second =  DELTA_SEGMENTS_PER_SECOND;
566
+    delta_diagonal_rod_trim_tower_1 = DELTA_DIAGONAL_ROD_TRIM_TOWER_1;
567
+    delta_diagonal_rod_trim_tower_2 = DELTA_DIAGONAL_ROD_TRIM_TOWER_2;
568
+    delta_diagonal_rod_trim_tower_3 = DELTA_DIAGONAL_ROD_TRIM_TOWER_3;
521 569
     recalc_delta_settings(delta_radius, delta_diagonal_rod);
522 570
   #elif ENABLED(Z_DUAL_ENDSTOPS)
523 571
     z_endstop_adj = 0;
@@ -538,7 +586,7 @@ void Config_ResetDefault() {
538 586
 
539 587
   #if ENABLED(PIDTEMP)
540 588
     #if ENABLED(PID_PARAMS_PER_EXTRUDER)
541
-      for (int e = 0; e < EXTRUDERS; e++)
589
+      for (uint8_t e = 0; e < EXTRUDERS; e++)
542 590
     #else
543 591
       int e = 0; UNUSED(e); // only need to write once
544 592
     #endif
@@ -686,8 +734,8 @@ void Config_PrintSettings(bool forReplay) {
686 734
     SERIAL_ECHOPAIR(" X", (unsigned long)MESH_NUM_X_POINTS);
687 735
     SERIAL_ECHOPAIR(" Y", (unsigned long)MESH_NUM_Y_POINTS);
688 736
     SERIAL_EOL;
689
-    for (int y = 0; y < MESH_NUM_Y_POINTS; y++) {
690
-      for (int x = 0; x < MESH_NUM_X_POINTS; x++) {
737
+    for (uint8_t y = 0; y < MESH_NUM_Y_POINTS; y++) {
738
+      for (uint8_t x = 0; x < MESH_NUM_X_POINTS; x++) {
691 739
         CONFIG_ECHO_START;
692 740
         SERIAL_ECHOPAIR("  M421 X", mbl.get_x(x));
693 741
         SERIAL_ECHOPAIR(" Y", mbl.get_y(y));
@@ -708,11 +756,16 @@ void Config_PrintSettings(bool forReplay) {
708 756
     SERIAL_ECHOPAIR(" Z", endstop_adj[Z_AXIS]);
709 757
     SERIAL_EOL;
710 758
     CONFIG_ECHO_START;
711
-    SERIAL_ECHOLNPGM("Delta settings: L=delta_diagonal_rod, R=delta_radius, S=delta_segments_per_second");
712
-    CONFIG_ECHO_START;
759
+    if (!forReplay) {
760
+      SERIAL_ECHOLNPGM("Delta settings: L=diagonal_rod, R=radius, S=segments_per_second, ABC=diagonal_rod_trim_tower_[123]");
761
+      CONFIG_ECHO_START;
762
+    }
713 763
     SERIAL_ECHOPAIR("  M665 L", delta_diagonal_rod);
714 764
     SERIAL_ECHOPAIR(" R", delta_radius);
715 765
     SERIAL_ECHOPAIR(" S", delta_segments_per_second);
766
+    SERIAL_ECHOPAIR(" A", delta_diagonal_rod_trim_tower_1);
767
+    SERIAL_ECHOPAIR(" B", delta_diagonal_rod_trim_tower_2);
768
+    SERIAL_ECHOPAIR(" C", delta_diagonal_rod_trim_tower_3);
716 769
     SERIAL_EOL;
717 770
   #elif ENABLED(Z_DUAL_ENDSTOPS)
718 771
     CONFIG_ECHO_START;
@@ -730,12 +783,12 @@ void Config_PrintSettings(bool forReplay) {
730 783
       SERIAL_ECHOLNPGM("Material heatup parameters:");
731 784
       CONFIG_ECHO_START;
732 785
     }
733
-    SERIAL_ECHOPAIR("  M145 M0 H", (unsigned long)plaPreheatHotendTemp);
786
+    SERIAL_ECHOPAIR("  M145 S0 H", (unsigned long)plaPreheatHotendTemp);
734 787
     SERIAL_ECHOPAIR(" B", (unsigned long)plaPreheatHPBTemp);
735 788
     SERIAL_ECHOPAIR(" F", (unsigned long)plaPreheatFanSpeed);
736 789
     SERIAL_EOL;
737 790
     CONFIG_ECHO_START;
738
-    SERIAL_ECHOPAIR("  M145 M1 H", (unsigned long)absPreheatHotendTemp);
791
+    SERIAL_ECHOPAIR("  M145 S1 H", (unsigned long)absPreheatHotendTemp);
739 792
     SERIAL_ECHOPAIR(" B", (unsigned long)absPreheatHPBTemp);
740 793
     SERIAL_ECHOPAIR(" F", (unsigned long)absPreheatFanSpeed);
741 794
     SERIAL_EOL;

+ 22
- 0
Marlin/configuration_store.h View File

@@ -1,3 +1,25 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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
+
1 23
 #ifndef CONFIGURATION_STORE_H
2 24
 #define CONFIGURATION_STORE_H
3 25
 

+ 0
- 1
Marlin/configurator/config/_htaccess View File

@@ -1 +0,0 @@
1
-Header set Access-Control-Allow-Origin "*"

+ 0
- 64
Marlin/configurator/config/boards.h View File

@@ -1,64 +0,0 @@
1
-#ifndef BOARDS_H
2
-#define BOARDS_H
3
-
4
-#define BOARD_UNKNOWN -1
5
-
6
-#define BOARD_GEN7_CUSTOM       10   // Gen7 custom (Alfons3 Version) "https://github.com/Alfons3/Generation_7_Electronics"
7
-#define BOARD_GEN7_12           11   // Gen7 v1.1, v1.2
8
-#define BOARD_GEN7_13           12   // Gen7 v1.3
9
-#define BOARD_GEN7_14           13   // Gen7 v1.4
10
-#define BOARD_CHEAPTRONIC       2    // Cheaptronic v1.0
11
-#define BOARD_SETHI             20   // Sethi 3D_1
12
-#define BOARD_RAMPS_OLD         3    // MEGA/RAMPS up to 1.2
13
-#define BOARD_RAMPS_13_EFB      33   // RAMPS 1.3 / 1.4 (Power outputs: Extruder, Fan, Bed)
14
-#define BOARD_RAMPS_13_EEB      34   // RAMPS 1.3 / 1.4 (Power outputs: Extruder0, Extruder1, Bed)
15
-#define BOARD_RAMPS_13_EFF      35   // RAMPS 1.3 / 1.4 (Power outputs: Extruder, Fan, Fan)
16
-#define BOARD_RAMPS_13_EEF      36   // RAMPS 1.3 / 1.4 (Power outputs: Extruder0, Extruder1, Fan)
17
-#define BOARD_RAMPS_13_SF       38   // RAMPS 1.3 / 1.4 (Power outputs: Spindle, Controller Fan)
18
-#define BOARD_FELIX2            37   // Felix 2.0+ Electronics Board (RAMPS like)
19
-#define BOARD_RIGIDBOARD        42   // Invent-A-Part RigidBoard
20
-#define BOARD_GEN6              5    // Gen6
21
-#define BOARD_GEN6_DELUXE       51   // Gen6 deluxe
22
-#define BOARD_SANGUINOLOLU_11   6    // Sanguinololu < 1.2
23
-#define BOARD_SANGUINOLOLU_12   62   // Sanguinololu 1.2 and above
24
-#define BOARD_MELZI             63   // Melzi
25
-#define BOARD_STB_11            64   // STB V1.1
26
-#define BOARD_AZTEEG_X1         65   // Azteeg X1
27
-#define BOARD_MELZI_MAKR3D      66   // Melzi with ATmega1284 (MaKr3d version)
28
-#define BOARD_AZTEEG_X3         67   // Azteeg X3
29
-#define BOARD_AZTEEG_X3_PRO     68   // Azteeg X3 Pro
30
-#define BOARD_ULTIMAKER         7    // Ultimaker
31
-#define BOARD_ULTIMAKER_OLD     71   // Ultimaker (Older electronics. Pre 1.5.4. This is rare)
32
-#define BOARD_ULTIMAIN_2        72   // Ultimainboard 2.x (Uses TEMP_SENSOR 20)
33
-#define BOARD_3DRAG             77   // 3Drag Controller
34
-#define BOARD_K8200             78   // Vellemann K8200 Controller (derived from 3Drag Controller)
35
-#define BOARD_TEENSYLU          8    // Teensylu
36
-#define BOARD_RUMBA             80   // Rumba
37
-#define BOARD_PRINTRBOARD       81   // Printrboard (AT90USB1286)
38
-#define BOARD_BRAINWAVE         82   // Brainwave (AT90USB646)
39
-#define BOARD_SAV_MKI           83   // SAV Mk-I (AT90USB1286)
40
-#define BOARD_TEENSY2           84   // Teensy++2.0 (AT90USB1286) - CLI compile: DEFINES=AT90USBxx_TEENSYPP_ASSIGNMENTS HARDWARE_MOTHERBOARD=84  make
41
-#define BOARD_BRAINWAVE_PRO     85   // Brainwave Pro (AT90USB1286)
42
-#define BOARD_GEN3_PLUS         9    // Gen3+
43
-#define BOARD_GEN3_MONOLITHIC   22   // Gen3 Monolithic Electronics
44
-#define BOARD_MEGATRONICS       70   // Megatronics
45
-#define BOARD_MEGATRONICS_2     701  // Megatronics v2.0
46
-#define BOARD_MINITRONICS       702  // Minitronics v1.0/1.1
47
-#define BOARD_MEGATRONICS_3     703  // Megatronics v3.0
48
-#define BOARD_OMCA_A            90   // Alpha OMCA board
49
-#define BOARD_OMCA              91   // Final OMCA board
50
-#define BOARD_RAMBO             301  // Rambo
51
-#define BOARD_MINIRAMBO         302  // Mini-Rambo
52
-#define BOARD_MEGACONTROLLER    310  // Mega controller
53
-#define BOARD_ELEFU_3           21   // Elefu Ra Board (v3)
54
-#define BOARD_5DPRINT           88   // 5DPrint D8 Driver Board
55
-#define BOARD_LEAPFROG          999  // Leapfrog
56
-#define BOARD_MKS_BASE          40   // MKS BASE 1.0
57
-#define BOARD_BAM_DICE          401  // 2PrintBeta BAM&DICE with STK drivers
58
-#define BOARD_BAM_DICE_DUE      402  // 2PrintBeta BAM&DICE Due with STK drivers
59
-
60
-#define BOARD_99                99   // This is in pins.h but...?
61
-
62
-#define MB(board) (MOTHERBOARD==BOARD_##board)
63
-
64
-#endif //__BOARDS_H

+ 0
- 228
Marlin/configurator/config/language.h View File

@@ -1,228 +0,0 @@
1
-#ifndef LANGUAGE_H
2
-#define LANGUAGE_H
3
-
4
-#include "Configuration.h"
5
-
6
-#define LANGUAGE_CONCAT(M)       #M
7
-#define GENERATE_LANGUAGE_INCLUDE(M)  LANGUAGE_CONCAT(language_##M.h)
8
-
9
-
10
-// NOTE: IF YOU CHANGE LANGUAGE FILES OR MERGE A FILE WITH CHANGES
11
-//
12
-//   ==> ALWAYS TRY TO COMPILE MARLIN WITH/WITHOUT "ULTIPANEL" / "ULTRALCD" / "SDSUPPORT" #define IN "Configuration.h"
13
-//   ==> ALSO TRY ALL AVAILABLE LANGUAGE OPTIONS
14
-// See also documentation/LCDLanguageFont.md
15
-
16
-// Languages
17
-// en       English
18
-// pl       Polish
19
-// fr       French
20
-// de       German
21
-// es       Spanish
22
-// ru       Russian
23
-// bg       Bulgarian
24
-// it       Italian
25
-// pt       Portuguese
26
-// pt-br    Portuguese (Brazil)
27
-// fi       Finnish
28
-// an       Aragonese
29
-// nl       Dutch
30
-// ca       Catalan
31
-// eu       Basque-Euskera
32
-// kana     Japanese
33
-// kana_utf Japanese
34
-// cn       Chinese
35
-
36
-// fallback if no language is set, don't change
37
-#ifndef LANGUAGE_INCLUDE
38
-  #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
39
-#endif
40
-
41
-#if ENABLED(USE_AUTOMATIC_VERSIONING)
42
-  #include "_Version.h"
43
-#else
44
-  #include "Default_Version.h"
45
-#endif
46
-
47
-#define PROTOCOL_VERSION "1.0"
48
-
49
-#if MB(ULTIMAKER)|| MB(ULTIMAKER_OLD)|| MB(ULTIMAIN_2)
50
-  #define MACHINE_NAME "Ultimaker"
51
-  #define SOURCE_CODE_URL "https://github.com/Ultimaker/Marlin"
52
-#elif MB(RUMBA)
53
-  #define MACHINE_NAME "Rumba"
54
-#elif MB(3DRAG)
55
-  #define MACHINE_NAME "3Drag"
56
-  #define SOURCE_CODE_URL "http://3dprint.elettronicain.it/"
57
-#elif MB(K8200)
58
-  #define MACHINE_NAME "K8200"
59
-  #define SOURCE_CODE_URL "https://github.com/CONSULitAS/Marlin-K8200"
60
-#elif MB(5DPRINT)
61
-  #define MACHINE_NAME "Makibox"
62
-#elif MB(SAV_MKI)
63
-  #define MACHINE_NAME "SAV MkI"
64
-  #define SOURCE_CODE_URL "https://github.com/fmalpartida/Marlin/tree/SAV-MkI-config"
65
-#elif !defined(MACHINE_NAME)
66
-  #define MACHINE_NAME "3D Printer"
67
-#endif
68
-
69
-#ifdef CUSTOM_MACHINE_NAME
70
-  #undef MACHINE_NAME
71
-  #define MACHINE_NAME CUSTOM_MACHINE_NAME
72
-#endif
73
-
74
-#ifndef SOURCE_CODE_URL
75
-  #define SOURCE_CODE_URL "https://github.com/MarlinFirmware/Marlin"
76
-#endif
77
-
78
-#ifndef DETAILED_BUILD_VERSION
79
-  #error BUILD_VERSION Information must be specified
80
-#endif
81
-
82
-#ifndef MACHINE_UUID
83
-   #define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
84
-#endif
85
-
86
-
87
-#define STRINGIFY_(n) #n
88
-#define STRINGIFY(n) STRINGIFY_(n)
89
-
90
-
91
-// Common LCD messages
92
-
93
-  /* nothing here yet */
94
-
95
-// Common serial messages
96
-#define MSG_MARLIN "Marlin"
97
-
98
-// Serial Console Messages (do not translate those!)
99
-
100
-#define MSG_Enqueueing                      "enqueueing \""
101
-#define MSG_POWERUP                         "PowerUp"
102
-#define MSG_EXTERNAL_RESET                  " External Reset"
103
-#define MSG_BROWNOUT_RESET                  " Brown out Reset"
104
-#define MSG_WATCHDOG_RESET                  " Watchdog Reset"
105
-#define MSG_SOFTWARE_RESET                  " Software Reset"
106
-#define MSG_AUTHOR                          " | Author: "
107
-#define MSG_CONFIGURATION_VER               " Last Updated: "
108
-#define MSG_FREE_MEMORY                     " Free Memory: "
109
-#define MSG_PLANNER_BUFFER_BYTES            "  PlannerBufferBytes: "
110
-#define MSG_OK                              "ok"
111
-#define MSG_WAIT                            "wait"
112
-#define MSG_FILE_SAVED                      "Done saving file."
113
-#define MSG_ERR_LINE_NO                     "Line Number is not Last Line Number+1, Last Line: "
114
-#define MSG_ERR_CHECKSUM_MISMATCH           "checksum mismatch, Last Line: "
115
-#define MSG_ERR_NO_CHECKSUM                 "No Checksum with line number, Last Line: "
116
-#define MSG_ERR_NO_LINENUMBER_WITH_CHECKSUM "No Line Number with checksum, Last Line: "
117
-#define MSG_FILE_PRINTED                    "Done printing file"
118
-#define MSG_BEGIN_FILE_LIST                 "Begin file list"
119
-#define MSG_END_FILE_LIST                   "End file list"
120
-#define MSG_INVALID_EXTRUDER                "Invalid extruder"
121
-#define MSG_INVALID_SOLENOID                "Invalid solenoid"
122
-#define MSG_ERR_NO_THERMISTORS              "No thermistors - no temperature"
123
-#define MSG_M115_REPORT                     "FIRMWARE_NAME:Marlin " DETAILED_BUILD_VERSION " SOURCE_CODE_URL:" SOURCE_CODE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:" MACHINE_NAME " EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) " UUID:" MACHINE_UUID "\n"
124
-#define MSG_COUNT_X                         " Count X: "
125
-#define MSG_ERR_KILLED                      "Printer halted. kill() called!"
126
-#define MSG_ERR_STOPPED                     "Printer stopped due to errors. Fix the error and use M999 to restart. (Temperature is reset. Set it after restarting)"
127
-#define MSG_RESEND                          "Resend: "
128
-#define MSG_UNKNOWN_COMMAND                 "Unknown command: \""
129
-#define MSG_ACTIVE_EXTRUDER                 "Active Extruder: "
130
-#define MSG_X_MIN                           "x_min: "
131
-#define MSG_X_MAX                           "x_max: "
132
-#define MSG_Y_MIN                           "y_min: "
133
-#define MSG_Y_MAX                           "y_max: "
134
-#define MSG_Z_MIN                           "z_min: "
135
-#define MSG_Z_MAX                           "z_max: "
136
-#define MSG_Z2_MAX                          "z2_max: "
137
-#define MSG_Z_PROBE                         "z_probe: "
138
-#define MSG_ERR_MATERIAL_INDEX              "M145 S<index> out of range (0-1)"
139
-#define MSG_ERR_M421_REQUIRES_XYZ           "M421 requires XYZ parameters"
140
-#define MSG_ERR_MESH_INDEX_OOB              "Mesh XY index is out of bounds"
141
-#define MSG_ERR_M428_TOO_FAR                "Too far from reference point"
142
-#define MSG_M119_REPORT                     "Reporting endstop status"
143
-#define MSG_ENDSTOP_HIT                     "TRIGGERED"
144
-#define MSG_ENDSTOP_OPEN                    "open"
145
-#define MSG_HOTEND_OFFSET                   "Hotend offsets:"
146
-
147
-#define MSG_SD_CANT_OPEN_SUBDIR             "Cannot open subdir"
148
-#define MSG_SD_INIT_FAIL                    "SD init fail"
149
-#define MSG_SD_VOL_INIT_FAIL                "volume.init failed"
150
-#define MSG_SD_OPENROOT_FAIL                "openRoot failed"
151
-#define MSG_SD_CARD_OK                      "SD card ok"
152
-#define MSG_SD_WORKDIR_FAIL                 "workDir open failed"
153
-#define MSG_SD_OPEN_FILE_FAIL               "open failed, File: "
154
-#define MSG_SD_FILE_OPENED                  "File opened: "
155
-#define MSG_SD_SIZE                         " Size: "
156
-#define MSG_SD_FILE_SELECTED                "File selected"
157
-#define MSG_SD_WRITE_TO_FILE                "Writing to file: "
158
-#define MSG_SD_PRINTING_BYTE                "SD printing byte "
159
-#define MSG_SD_NOT_PRINTING                 "Not SD printing"
160
-#define MSG_SD_ERR_WRITE_TO_FILE            "error writing to file"
161
-#define MSG_SD_CANT_ENTER_SUBDIR            "Cannot enter subdir: "
162
-
163
-#define MSG_STEPPER_TOO_HIGH                "Steprate too high: "
164
-#define MSG_ENDSTOPS_HIT                    "endstops hit: "
165
-#define MSG_ERR_COLD_EXTRUDE_STOP           " cold extrusion prevented"
166
-#define MSG_ERR_LONG_EXTRUDE_STOP           " too long extrusion prevented"
167
-#define MSG_TOO_COLD_FOR_M600               "M600 Hotend too cold to change filament"
168
-#define MSG_BABYSTEPPING_X                  "Babystepping X"
169
-#define MSG_BABYSTEPPING_Y                  "Babystepping Y"
170
-#define MSG_BABYSTEPPING_Z                  "Babystepping Z"
171
-#define MSG_SERIAL_ERROR_MENU_STRUCTURE     "Error in menu structure"
172
-
173
-#define MSG_ERR_EEPROM_WRITE                "Error writing to EEPROM!"
174
-
175
-// temperature.cpp strings
176
-#define MSG_PID_AUTOTUNE                    "PID Autotune"
177
-#define MSG_PID_AUTOTUNE_START              MSG_PID_AUTOTUNE " start"
178
-#define MSG_PID_AUTOTUNE_FAILED             MSG_PID_AUTOTUNE " failed!"
179
-#define MSG_PID_BAD_EXTRUDER_NUM            MSG_PID_AUTOTUNE_FAILED " Bad extruder number"
180
-#define MSG_PID_TEMP_TOO_HIGH               MSG_PID_AUTOTUNE_FAILED " Temperature too high"
181
-#define MSG_PID_TIMEOUT                     MSG_PID_AUTOTUNE_FAILED " timeout"
182
-#define MSG_BIAS                            " bias: "
183
-#define MSG_D                               " d: "
184
-#define MSG_T_MIN                           " min: "
185
-#define MSG_T_MAX                           " max: "
186
-#define MSG_KU                              " Ku: "
187
-#define MSG_TU                              " Tu: "
188
-#define MSG_CLASSIC_PID                     " Classic PID "
189
-#define MSG_KP                              " Kp: "
190
-#define MSG_KI                              " Ki: "
191
-#define MSG_KD                              " Kd: "
192
-#define MSG_B                               "B:"
193
-#define MSG_T                               "T:"
194
-#define MSG_AT                              " @:"
195
-#define MSG_PID_AUTOTUNE_FINISHED           MSG_PID_AUTOTUNE " finished! Put the last Kp, Ki and Kd constants from below into Configuration.h"
196
-#define MSG_PID_DEBUG                       " PID_DEBUG "
197
-#define MSG_PID_DEBUG_INPUT                 ": Input "
198
-#define MSG_PID_DEBUG_OUTPUT                " Output "
199
-#define MSG_PID_DEBUG_PTERM                 " pTerm "
200
-#define MSG_PID_DEBUG_ITERM                 " iTerm "
201
-#define MSG_PID_DEBUG_DTERM                 " dTerm "
202
-#define MSG_PID_DEBUG_CTERM                 " cTerm "
203
-#define MSG_INVALID_EXTRUDER_NUM            " - Invalid extruder number !"
204
-
205
-#define MSG_HEATER_BED                      "bed"
206
-#define MSG_STOPPED_HEATER                  ", system stopped! Heater_ID: "
207
-#define MSG_REDUNDANCY                      "Heater switched off. Temperature difference between temp sensors is too high !"
208
-#define MSG_T_HEATING_FAILED                "Heating failed"
209
-#define MSG_T_THERMAL_RUNAWAY               "Thermal Runaway"
210
-#define MSG_T_MAXTEMP                       "MAXTEMP triggered"
211
-#define MSG_T_MINTEMP                       "MINTEMP triggered"
212
-
213
-// Debug
214
-#define MSG_DEBUG_ECHO                      "DEBUG ECHO ENABLED"
215
-#define MSG_DEBUG_INFO                      "DEBUG INFO ENABLED"
216
-#define MSG_DEBUG_ERRORS                    "DEBUG ERRORS ENABLED"
217
-#define MSG_DEBUG_DRYRUN                    "DEBUG DRYRUN ENABLED"
218
-
219
-// LCD Menu Messages
220
-
221
-#if DISABLED(DISPLAY_CHARSET_HD44780_JAPAN) && DISABLED(DISPLAY_CHARSET_HD44780_WESTERN) && DISABLED(DISPLAY_CHARSET_HD44780_CYRILLIC)
222
-  #define DISPLAY_CHARSET_HD44780_JAPAN
223
-#endif
224
-
225
-#include LANGUAGE_INCLUDE
226
-#include "language_en.h"
227
-
228
-#endif //__LANGUAGE_H

+ 0
- 344
Marlin/configurator/css/configurator.css View File

@@ -1,344 +0,0 @@
1
-/* configurator.css */
2
-/* Styles for Marlin Configurator */
3
-
4
-.clear { clear: both; }
5
-
6
-/* Prevent selection except PRE tags */
7
-* {
8
-    -webkit-touch-callout: none;
9
-    -webkit-user-select: none;
10
-    -khtml-user-select: none;
11
-    -moz-user-select: none;
12
-    -ms-user-select: none;
13
-    user-select: none;
14
-	}
15
-pre {
16
-    -webkit-touch-callout: text;
17
-    -webkit-user-select: text;
18
-    -khtml-user-select: text;
19
-    -moz-user-select: text;
20
-    -ms-user-select: text;
21
-    user-select: text;
22
-	}
23
-
24
-body { margin: 0; padding: 0; background: #56A; color: #000; font-family: monospace; }
25
-#main {
26
-	max-width: 1100px;
27
-	margin: 0 auto 10px;
28
- 	padding: 0 2%; width: 96%;
29
-	}
30
-
31
-h1, h2, h3, h4, h5, h6 { clear: both; }
32
-
33
-h1, p.info { font-family: sans-serif; }
34
-h1 {
35
-	height: 38px;
36
-	margin-bottom: -30px;
37
-	color: #FFF;
38
-	background: transparent url(logo.png) right top no-repeat;
39
-	}
40
-p.info { padding: 0; color: #000; }
41
-p.info span { color: #800; }
42
-
43
-#message { text-align: center; }
44
-#message { width: 80%; margin: 0 auto 0.25em; color: #FF0; }
45
-#message p { padding: 2px 0; font-weight: bold; border-radius: 0.8em; }
46
-#message p.message { color: #080; background: #CFC; }
47
-#message p.error { color: #F00; background: #FF4; }
48
-#message p.warning { color: #FF0; background: #BA4; }
49
-#message p.message span,
50
-#message p.error span,
51
-#message p.warning span {
52
-	color: #A00;
53
-	background: rgba(255, 255, 255, 1);
54
-	border: 1px solid rgba(0,0,0,0.5);
55
-	border-radius: 1em;
56
-	float: right;
57
-	margin-right: 0.5em;
58
-	padding: 0 3px;
59
-	font-family: sans-serif;
60
-	font-size: small;
61
-	position: relative;
62
-	top: -1px;
63
-	}
64
-
65
-#help strong { color: #0DD; }
66
-img { display: none; }
67
-
68
-/* Forms */
69
-
70
-#config_form {
71
-	display: block;
72
-	background: #EEE;
73
-	padding: 6px 20px 20px;
74
-	color: #000;
75
-	position: relative;
76
-	border-radius: 1.5em;
77
-	border-top-left-radius: 0;
78
-	}
79
-fieldset {
80
-	height: 16.1em;
81
-	overflow-y: scroll;
82
-	overflow-x: hidden;
83
-	margin-top: 10px;
84
-	}
85
-label, input, select, textarea { display: block; float: left; margin: 1px 0; }
86
-label.newline, textarea, fieldset { clear: both; }
87
-label {
88
-	width: 120px; /* label area */
89
-	height: 1em;
90
-	padding: 10px 460px 10px 1em;
91
-	margin-right: -450px;
92
-	text-align: right;
93
-	}
94
-label.blocked, label.added.blocked, label.added.blocked.sublabel { color: #AAA; }
95
-
96
-label.added.sublabel {
97
-	width: auto;
98
-	margin: 11px -2.5em 0 1em;
99
-	padding: 0 3em 0 0;
100
-	font-style: italic;
101
-	color: #444;
102
-	}
103
-label+label.added.sublabel {
104
-	margin-left: 0;
105
-	}
106
-
107
-input[type="text"], select { margin: 0.75em 0 0; }
108
-input[type="checkbox"], input[type="radio"], input[type="file"] { margin: 1em 0 0; }
109
-input[type="checkbox"].enabler, input[type="radio"].enabler { margin-left: 1em; }
110
-
111
-input:disabled { color: #BBB; }
112
-
113
-#config_form input[type="text"].subitem { width: 4em; }
114
-#config_form input[type="text"].subitem+.subitem { margin-left: 4px; }
115
-
116
-input[type="text"].added { width: 20em; }
117
-label.added {
118
-	width: 265px; /* label area */
119
-	height: 1em;
120
-	padding: 10px 370px 10px 1em;
121
-	margin-right: -360px;
122
-	text-align: right;
123
-	}
124
-
125
-ul.tabs { padding: 0; list-style: none; }
126
-ul.tabs li { display: inline; }
127
-ul.tabs li a,
128
-ul.tabs li a.active:hover,
129
-ul.tabs li a.active:active {
130
-	display: block;
131
-	float: left;
132
-	background: #1E4059;
133
-	color: #CCC;
134
-	font-size: 110%;
135
-	border-radius: 0.25em 0.25em 0 0;
136
-	margin: 0 4px 0 0;
137
-	padding: 2px 8px;
138
-	text-decoration: none;
139
-	font-family: georgia,"times new roman",times;
140
-	}
141
-ul.tabs li a.active:link,
142
-ul.tabs li a.active:visited {
143
-	background: #DDD;
144
-	color: #06F;
145
-	cursor: default;
146
-	margin-top: -4px;
147
-	padding-bottom: 4px;
148
-	padding-top: 4px;
149
-	}
150
-ul.tabs li a:hover,
151
-ul.tabs li a:active {
152
-	background: #000;
153
-	color: #FFF;
154
-	}
155
-
156
-fieldset { display: none; border: 1px solid #AAA; border-radius: 1em; }
157
-fieldset legend { display: none; }
158
-
159
-.hilightable span {
160
-	display: block;
161
-	float: left;
162
-	width: 100%;
163
-	height: 1.3em;
164
-	background: rgba(225,255,0,1);
165
-	margin: 0 -100% -1em 0;
166
-	}
167
-
168
-#serial_stepper { padding-top: 0.75em; display: block; float: left; }
169
-/*#SERIAL_PORT { display: none; }*/
170
-
171
-/* Tooltips */
172
-
173
-#tooltip {
174
-	display: none;
175
-	max-width: 30em;
176
-	padding: 8px;
177
-	border: 2px solid #73d699;
178
-	border-radius: 1em;
179
-	position: absolute;
180
-	z-index: 999;
181
-	font-family: sans-serif;
182
-	font-size: 85%;
183
-	color: #000;
184
-	line-height: 1.1;
185
-	background: #e2ff99; /* Old browsers */
186
-	background: -moz-linear-gradient(top,  #e2ff99 0%, #73d699 100%); /* FF3.6+ */
187
-	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#e2ff99), color-stop(100%,#73d699)); /* Chrome,Safari4+ */
188
-	background: -webkit-linear-gradient(top,  #e2ff99 0%,#73d699 100%); /* Chrome10+,Safari5.1+ */
189
-	background: -o-linear-gradient(top,  #e2ff99 0%,#73d699 100%); /* Opera 11.10+ */
190
-	background: -ms-linear-gradient(top,  #e2ff99 0%,#73d699 100%); /* IE10+ */
191
-	background: linear-gradient(to bottom,  #e2ff99 0%,#73d699 100%); /* W3C */
192
-	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e2ff99', endColorstr='#73d699',GradientType=0 ); /* IE6-9 */
193
-	-webkit-box-shadow: 0px 6px 25px -4px rgba(0,0,0,0.75);
194
-	-moz-box-shadow: 0px 6px 25px -4px rgba(0,0,0,0.75);
195
-	box-shadow: 0px 6px 25px -4px rgba(0,0,0,0.75);
196
-	}
197
-#tooltip>span {
198
-	position: absolute;
199
-	content: "";
200
-	width: 0;
201
-	height: 0;
202
-	border-left: 8px solid transparent;
203
-	border-right: 8px solid transparent;
204
-	border-top: 8px solid #73d699;
205
-	z-index: 999;
206
-	bottom: -10px;
207
-	left: 20px;
208
-	}
209
-#tooltip>strong { color: #00B; }
210
-
211
-/* Tooltips Checkbox */
212
-
213
-#tipson {
214
-	width: auto;
215
-	height: auto;
216
-	padding: 0;
217
-	margin-right: 0;
218
-	float: right;
219
-	font-weight: bold;
220
-	font-size: 100%;
221
-	font-family: helvetica;
222
-	text-align: left;
223
-	cursor: pointer;
224
-	}
225
-#tipson input { float: none; display: inline; cursor: pointer; }
226
-
227
-/* Config Text */
228
-
229
-pre.config {
230
-	height: 25em;
231
-	padding: 10px;
232
-	border: 2px solid #888;
233
-	border-radius: 5px;
234
-	overflow: auto;
235
-	clear: both;
236
-	background-color: #FFF;
237
-	color: #000;
238
-	font-family: "Fira Mono", monospace;
239
-	font-size: small;
240
-	}
241
-
242
-/* Pre Headers */
243
-
244
-h2 {
245
-	width: 100%;
246
-	margin: 12px -300px 4px 0;
247
-	padding: 0;
248
-	float: left;
249
-	}
250
-
251
-/* Disclosure Widget */
252
-
253
-span.disclose, a.download, a.download-all {︎
254
-	display: block;
255
-	float: right;
256
-	margin-top: 12px;
257
-	}
258
-
259
-span.disclose {
260
-	margin-right: -10px; /* total width */
261
-	margin-left: 14px;
262
-	width: 0;
263
-	height: 0;
264
-	position: relative;
265
-	left: 3px;
266
-	top: 3px;
267
-	cursor: pointer;
268
-	border-left: 8px solid transparent;
269
-	border-right: 8px solid transparent;
270
-	border-top: 10px solid #000;
271
-	}
272
-span.disclose.closed {
273
-	margin-right: -8px; /* total width */
274
-	margin-left: 10px;
275
-	left: 0;
276
-	top: 0;
277
-	border-top: 8px solid transparent;
278
-	border-bottom: 8px solid transparent;
279
-	border-right: 10px solid #000;
280
-	}
281
-span.disclose.almost {
282
-    -ms-transform: rotate(45deg); /* IE 9 */
283
-    -webkit-transform: rotate(45deg); /* Chrome, Safari, Opera */
284
-    transform: rotate(45deg);
285
-	}
286
-span.disclose.closed.almost {
287
-	left: 1px;
288
-	top: 3px;
289
-    -ms-transform: rotate(315deg); /* IE 9 */
290
-    -webkit-transform: rotate(315deg); /* Chrome, Safari, Opera */
291
-    transform: rotate(315deg);
292
-	}
293
-
294
-/* Download Button */
295
-
296
-a.download, a.download-all {
297
-	visibility: hidden;
298
-	padding: 2px;
299
-	border: 1px solid #494;
300
-	border-radius: 4px;
301
-	margin: 12px 0 0;
302
-	background: #FFF;
303
-	color: #494;
304
-	font-family: sans-serif;
305
-	font-size: small;
306
-	font-weight: bold;
307
-	text-decoration: none;
308
-	}
309
-a.download-all { margin: 9px 2em 0; color: #449; border-color: #449; }
310
-
311
-input[type="text"].one_of_2 { max-width: 15%; }
312
-input[type="text"].one_of_3 { max-width: 10%; }
313
-input[type="text"].one_of_4 { max-width: 7%; }
314
-
315
-select.one_of_2 { max-width: 15%; }
316
-select.one_of_3 { max-width: 10%; }
317
-select.one_of_4 { max-width: 14%; }
318
-select.one_of_4+span.label+select.one_of_4+span.label { clear: both; margin-left: 265px; padding-left: 1.75em; }
319
-select.one_of_4+span.label+select.one_of_4+span.label+select.one_of_4+span.label { clear: none; margin-left: 1em; padding-left: 0; }
320
-
321
-@media all and (min-width: 1140px) {
322
-
323
-	#main { max-width: 10000px; }
324
-
325
-	fieldset { float: left; width: 50%; height: auto; }
326
-
327
-	#config_text, #config_adv_text { float: right; clear: right; width: 45%; }
328
-
329
-	pre.config { height: 20em; }
330
-
331
-	.disclose { display: none; }
332
-
333
-	input[type="text"].one_of_2 { max-width: 15%; }
334
-	input[type="text"].one_of_3 { max-width: 9%; }
335
-	input[type="text"].one_of_4 { max-width: 8%; }
336
-
337
-	select.one_of_2 { max-width: 15%; }
338
-	select.one_of_3 { max-width: 10%; }
339
-	select.one_of_4 { max-width: 16%; }
340
-
341
-}
342
-
343
-/*label.blocked, .blocked { display: none; }*/
344
-

BIN
Marlin/configurator/css/logo.png View File


+ 0
- 129
Marlin/configurator/index.html View File

@@ -1,129 +0,0 @@
1
-<!DOCTYPE html>
2
-<html>
3
-  <head>
4
-    <meta charset="UTF-8">
5
-    <title>Marlin Firmware Configurator</title>
6
-    <link href='http://fonts.googleapis.com/css?family=Fira+Mono&amp;subset=latin,latin-ext' rel='stylesheet' type='text/css' />
7
-    <script src="js/jquery-2.1.3.min.js"></script>
8
-    <script src="js/binarystring.js"></script>
9
-    <script src="js/binaryfileuploader.js"></script>
10
-    <script src="js/FileSaver.min.js"></script>
11
-    <script src="js/jszip.min.js"></script>
12
-    <script src="js/jcanvas.js"></script>
13
-    <script src="js/jstepper.js"></script>
14
-    <script src="js/configurator.js"></script>
15
-    <link rel="stylesheet" href="css/configurator.css" type="text/css" media="all" />
16
-  </head>
17
-  <body>
18
-    <section id="main">
19
-      <h1>Marlin Configurator</h1>
20
-      <p class="info">Select presets (coming soon), modify, and download.</p>
21
-
22
-      <div id="message"></div>
23
-      <div id="tabs"></div>
24
-
25
-      <form id="config_form">
26
-
27
-        <div id="tooltip"></div>
28
-
29
-        <label>Drop Files:</label><input type="file" id="file-upload" />
30
-        <label id="tipson"><input type="checkbox" checked /> ?</label>
31
-        <a href="" class="download-all">Download Zip</a>
32
-
33
-        <fieldset id="info">
34
-          <legend>Info</legend>
35
-        </fieldset>
36
-
37
-        <fieldset id="machine">
38
-          <legend>Machine</legend>
39
-
40
-          <label class="newline">Serial Port:</label><select name="SERIAL_PORT"></select><div id="serial_stepper"></div>
41
-
42
-          <label>Baud Rate:</label><select name="BAUDRATE"></select>
43
-
44
-          <label>AT90USB BT IF:</label>
45
-            <input name="BLUETOOTH" type="checkbox" value="1" checked />
46
-
47
-          <label class="newline">Motherboard:</label><select name="MOTHERBOARD"></select>
48
-
49
-          <label class="newline">Custom Name:</label><input name="CUSTOM_MACHINE_NAME" type="text" size="14" maxlength="12" value="" />
50
-
51
-          <label class="newline">Machine UUID:</label><input name="MACHINE_UUID" type="text" size="38" maxlength="36" value="" />
52
-
53
-          <label class="newline">Extruders:</label><select name="EXTRUDERS"></select>
54
-
55
-          <label class="newline">Power Supply:</label><select name="POWER_SUPPLY"></select>
56
-
57
-          <label>PS Default Off:</label>
58
-            <input name="PS_DEFAULT_OFF" type="checkbox" value="1" checked />
59
-        </fieldset>
60
-
61
-        <fieldset id="homing">
62
-          <legend>Homing</legend>
63
-        </fieldset>
64
-
65
-        <fieldset id="temperature">
66
-          <legend>Temperature</legend>
67
-          <label class="newline">Temp Sensor 0:</label><select name="TEMP_SENSOR_0"></select>
68
-          <label class="newline">Temp Sensor 1:</label><select name="TEMP_SENSOR_1"></select>
69
-          <label class="newline">Temp Sensor 2:</label><select name="TEMP_SENSOR_2"></select>
70
-          <label class="newline">Bed Temp Sensor:</label><select name="TEMP_SENSOR_BED"></select>
71
-
72
-          <label>Max Diff:</label>
73
-            <input name="MAX_REDUNDANT_TEMP_SENSOR_DIFF" type="text" size="3" maxlength="2" />
74
-
75
-          <label>Temp Residency Time (s):</label>
76
-            <input name="TEMP_RESIDENCY_TIME" type="text" size="3" maxlength="2" />
77
-        </fieldset>
78
-
79
-        <fieldset id="extruder">
80
-          <legend>Extruder</legend>
81
-        </fieldset>
82
-
83
-        <fieldset id="lcd">
84
-          <legend>LCD / SD</legend>
85
-        </fieldset>
86
-
87
-        <fieldset id="bedlevel">
88
-          <legend>Bed Leveling</legend>
89
-        </fieldset>
90
-
91
-        <fieldset id="fwretract">
92
-          <legend>FW Retract</legend>
93
-        </fieldset>
94
-
95
-        <fieldset id="tmc">
96
-          <legend>TMC</legend>
97
-        </fieldset>
98
-
99
-        <fieldset id="l6470">
100
-          <legend>L6470</legend>
101
-        </fieldset>
102
-
103
-        <fieldset id="extras">
104
-          <legend>Extras</legend>
105
-        </fieldset>
106
-
107
-        <fieldset id="more">
108
-          <legend>More…</legend>
109
-        </fieldset>
110
-
111
-        <section id="config_text">
112
-          <h2>Configuration.h</h2>
113
-          <span class="disclose"></span>
114
-          <a href="" class="download">Download</a>
115
-          <pre class="hilightable config"></pre>
116
-        </section>
117
-
118
-        <section id="config_adv_text">
119
-          <h2>Configuration_adv.h</h2>
120
-          <span class="disclose"></span>
121
-          <a href="" class="download">Download</a>
122
-          <pre class="hilightable config"></pre>
123
-        </section>
124
-
125
-        <br class="clear" />
126
-      </form>
127
-    </section>
128
-  </body>
129
-</html>

+ 0
- 2
Marlin/configurator/js/FileSaver.min.js View File

@@ -1,2 +0,0 @@
1
-/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */
2
-var saveAs=saveAs||typeof navigator!=="undefined"&&navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob.bind(navigator)||function(view){"use strict";if(typeof navigator!=="undefined"&&/MSIE [1-9]\./.test(navigator.userAgent)){return}var doc=view.document,get_URL=function(){return view.URL||view.webkitURL||view},save_link=doc.createElementNS("http://www.w3.org/1999/xhtml","a"),can_use_save_link="download"in save_link,click=function(node){var event=doc.createEvent("MouseEvents");event.initMouseEvent("click",true,false,view,0,0,0,0,0,false,false,false,false,0,null);node.dispatchEvent(event)},webkit_req_fs=view.webkitRequestFileSystem,req_fs=view.requestFileSystem||webkit_req_fs||view.mozRequestFileSystem,throw_outside=function(ex){(view.setImmediate||view.setTimeout)(function(){throw ex},0)},force_saveable_type="application/octet-stream",fs_min_size=0,arbitrary_revoke_timeout=500,revoke=function(file){var revoker=function(){if(typeof file==="string"){get_URL().revokeObjectURL(file)}else{file.remove()}};if(view.chrome){revoker()}else{setTimeout(revoker,arbitrary_revoke_timeout)}},dispatch=function(filesaver,event_types,event){event_types=[].concat(event_types);var i=event_types.length;while(i--){var listener=filesaver["on"+event_types[i]];if(typeof listener==="function"){try{listener.call(filesaver,event||filesaver)}catch(ex){throw_outside(ex)}}}},FileSaver=function(blob,name){var filesaver=this,type=blob.type,blob_changed=false,object_url,target_view,dispatch_all=function(){dispatch(filesaver,"writestart progress write writeend".split(" "))},fs_error=function(){if(blob_changed||!object_url){object_url=get_URL().createObjectURL(blob)}if(target_view){target_view.location.href=object_url}else{var new_tab=view.open(object_url,"_blank");if(new_tab==undefined&&typeof safari!=="undefined"){view.location.href=object_url}}filesaver.readyState=filesaver.DONE;dispatch_all();revoke(object_url)},abortable=function(func){return function(){if(filesaver.readyState!==filesaver.DONE){return func.apply(this,arguments)}}},create_if_not_found={create:true,exclusive:false},slice;filesaver.readyState=filesaver.INIT;if(!name){name="download"}if(can_use_save_link){object_url=get_URL().createObjectURL(blob);save_link.href=object_url;save_link.download=name;click(save_link);filesaver.readyState=filesaver.DONE;dispatch_all();revoke(object_url);return}if(view.chrome&&type&&type!==force_saveable_type){slice=blob.slice||blob.webkitSlice;blob=slice.call(blob,0,blob.size,force_saveable_type);blob_changed=true}if(webkit_req_fs&&name!=="download"){name+=".download"}if(type===force_saveable_type||webkit_req_fs){target_view=view}if(!req_fs){fs_error();return}fs_min_size+=blob.size;req_fs(view.TEMPORARY,fs_min_size,abortable(function(fs){fs.root.getDirectory("saved",create_if_not_found,abortable(function(dir){var save=function(){dir.getFile(name,create_if_not_found,abortable(function(file){file.createWriter(abortable(function(writer){writer.onwriteend=function(event){target_view.location.href=file.toURL();filesaver.readyState=filesaver.DONE;dispatch(filesaver,"writeend",event);revoke(file)};writer.onerror=function(){var error=writer.error;if(error.code!==error.ABORT_ERR){fs_error()}};"writestart progress write abort".split(" ").forEach(function(event){writer["on"+event]=filesaver["on"+event]});writer.write(blob);filesaver.abort=function(){writer.abort();filesaver.readyState=filesaver.DONE};filesaver.readyState=filesaver.WRITING}),fs_error)}),fs_error)};dir.getFile(name,{create:false},abortable(function(file){file.remove();save()}),abortable(function(ex){if(ex.code===ex.NOT_FOUND_ERR){save()}else{fs_error()}}))}),fs_error)}),fs_error)},FS_proto=FileSaver.prototype,saveAs=function(blob,name){return new FileSaver(blob,name)};FS_proto.abort=function(){var filesaver=this;filesaver.readyState=filesaver.DONE;dispatch(filesaver,"abort")};FS_proto.readyState=FS_proto.INIT=0;FS_proto.WRITING=1;FS_proto.DONE=2;FS_proto.error=FS_proto.onwritestart=FS_proto.onprogress=FS_proto.onwrite=FS_proto.onabort=FS_proto.onerror=FS_proto.onwriteend=null;return saveAs}(typeof self!=="undefined"&&self||typeof window!=="undefined"&&window||this.content);if(typeof module!=="undefined"&&module.exports){module.exports.saveAs=saveAs}else if(typeof define!=="undefined"&&define!==null&&define.amd!=null){define([],function(){return saveAs})}

+ 0
- 79
Marlin/configurator/js/binaryfileuploader.js View File

@@ -1,79 +0,0 @@
1
-function BinaryFileUploader(o) {
2
-	this.options = null;
3
-
4
-
5
-	this._defaultOptions = {
6
-		element: null, // HTML file element
7
-		onFileLoad: function(file) {
8
-			console.log(file.toString());
9
-		}
10
-	};
11
-
12
-
13
-	this._init = function(o) {
14
-		if (!this.hasFileUploaderSupport()) return;
15
-
16
-		this._verifyDependencies();
17
-
18
-		this.options = this._mergeObjects(this._defaultOptions, o);
19
-		this._verifyOptions();
20
-
21
-		this.addFileChangeListener();
22
-	}
23
-
24
-
25
-	this.hasFileUploaderSupport = function() {
26
-		return !!(window.File && window.FileReader && window.FileList && window.Blob);
27
-	}
28
-
29
-	this.addFileChangeListener = function() {
30
-		this.options.element.addEventListener(
31
-			'change',
32
-			this._bind(this, this.onFileChange)
33
-		);
34
-	}
35
-
36
-	this.onFileChange = function(e) {
37
-		// TODO accept multiple files
38
-		var file = e.target.files[0],
39
-		    reader = new FileReader();
40
-
41
-		reader.onload = this._bind(this, this.onFileLoad);
42
-		reader.readAsBinaryString(file);
43
-	}
44
-
45
-	this.onFileLoad = function(e) {
46
-		var content = e.target.result,
47
-		    string  = new BinaryString(content);
48
-		this.options.onFileLoad(string);
49
-	}
50
-
51
-
52
-	this._mergeObjects = function(starting, override) {
53
-		var merged = starting;
54
-		for (key in override) merged[key] = override[key];
55
-
56
-		return merged;
57
-	}
58
-
59
-	this._verifyOptions = function() {
60
-		if (!(this.options.element && this.options.element.type && this.options.element.type === 'file')) {
61
-			throw 'Invalid element param in options. Must be a file upload DOM element';
62
-		}
63
-
64
-		if (typeof this.options.onFileLoad !== 'function') {
65
-			throw 'Invalid onFileLoad param in options. Must be a function';
66
-		}
67
-	}
68
-
69
-	this._verifyDependencies = function() {
70
-		if (!window.BinaryString) throw 'BinaryString is missing. Check that you\'ve correctly included it';
71
-	}
72
-
73
-	// helper function for binding methods to objects
74
-	this._bind = function(object, method) {
75
-		return function() {return method.apply(object, arguments);};
76
-	}
77
-
78
-	this._init(o);
79
-}

+ 0
- 168
Marlin/configurator/js/binarystring.js View File

@@ -1,168 +0,0 @@
1
-function BinaryString(source) {
2
-	this._source = null;
3
-	this._bytes  = [];
4
-	this._pos    = 0;
5
-	this._length = 0;
6
-
7
-	this._init = function(source) {
8
-		this._source = source;
9
-		this._bytes  = this._stringToBytes(this._source);
10
-		this._length = this._bytes.length;
11
-	}
12
-
13
-	this.current = function() {return this._pos;}
14
-
15
-	this.rewind  = function() {return this.jump(0);}
16
-	this.end     = function() {return this.jump(this.length()  - 1);}
17
-	this.next    = function() {return this.jump(this.current() + 1);}
18
-	this.prev    = function() {return this.jump(this.current() - 1);}
19
-
20
-	this.jump = function(pos) {
21
-		if (pos < 0 || pos >= this.length()) return false;
22
-
23
-		this._pos = pos;
24
-		return true;
25
-	}
26
-
27
-	this.readByte = function(pos) {
28
-		pos = (typeof pos == 'number') ? pos : this.current();
29
-		return this.readBytes(1, pos)[0];
30
-	}
31
-
32
-	this.readBytes = function(length, pos) {
33
-		length = length || 1;
34
-		pos    = (typeof pos == 'number') ? pos : this.current();
35
-
36
-		if (pos          >  this.length() ||
37
-		    pos          <  0             ||
38
-		    length       <= 0             ||
39
-		    pos + length >  this.length() ||
40
-		    pos + length <  0
41
-		) {
42
-			return false;
43
-		}
44
-
45
-		var bytes = [];
46
-		
47
-		for (var i = pos; i < pos + length; i++) {
48
-			bytes.push(this._bytes[i]);
49
-		}
50
-
51
-		return bytes;
52
-	}
53
-
54
-	this.length = function() {return this._length;}
55
-
56
-	this.toString = function() {
57
-		var string = '',
58
-		    length = this.length();
59
-
60
-		for (var i = 0; i < length; i++) {
61
-			string += String.fromCharCode(this.readByte(i));
62
-		}
63
-
64
-		return string;
65
-	}
66
-
67
-	this.toUtf8 = function() {
68
-		var inc    = 0,
69
-		    string = '',
70
-		    length = this.length();
71
-
72
-		// determine if first 3 characters are the BOM
73
-		// then skip them in output if so
74
-		if (length >= 3               &&
75
-		    this.readByte(0) === 0xEF &&
76
-		    this.readByte(1) === 0xBB &&
77
-		    this.readByte(2) === 0xBF
78
-		) {
79
-			inc = 3;
80
-		}
81
-
82
-		for (; inc < length; inc++) {
83
-			var byte1 = this.readByte(inc),
84
-			    byte2 = 0,
85
-			    byte3 = 0,
86
-			    byte4 = 0,
87
-			    code1 = 0,
88
-			    code2 = 0,
89
-			    point = 0;
90
-
91
-			switch (true) {
92
-				// single byte character; same as ascii
93
-				case (byte1 < 0x80):
94
-					code1 = byte1;
95
-					break;
96
-
97
-				// 2 byte character
98
-				case (byte1 >= 0xC2 && byte1 < 0xE0):
99
-					byte2 = this.readByte(++inc);
100
-
101
-					code1 = ((byte1 & 0x1F) << 6) +
102
-					         (byte2 & 0x3F);
103
-					break;
104
-
105
-				// 3 byte character
106
-				case (byte1 >= 0xE0 && byte1 < 0xF0):
107
-					byte2 = this.readByte(++inc);
108
-					byte3 = this.readByte(++inc);
109
-
110
-					code1 = ((byte1 & 0xFF) << 12) +
111
-					        ((byte2 & 0x3F) <<  6) +
112
-					         (byte3 & 0x3F);
113
-					break;
114
-
115
-				// 4 byte character
116
-				case (byte1 >= 0xF0 && byte1 < 0xF5):
117
-					byte2 = this.readByte(++inc);
118
-					byte3 = this.readByte(++inc);
119
-					byte4 = this.readByte(++inc);
120
-
121
-					point = ((byte1 & 0x07) << 18) +
122
-					        ((byte2 & 0x3F) << 12) +
123
-					        ((byte3 & 0x3F) <<  6) +
124
-					         (byte4 & 0x3F)
125
-					point -= 0x10000;
126
-
127
-					code1 = (point >> 10)    + 0xD800;
128
-					code2 = (point &  0x3FF) + 0xDC00;
129
-					break;
130
-
131
-				default:
132
-					throw 'Invalid byte ' + this._byteToString(byte1) + ' whilst converting to UTF-8';
133
-					break;
134
-			}
135
-
136
-			string += (code2) ? String.fromCharCode(code1, code2)
137
-			                  : String.fromCharCode(code1);
138
-		}
139
-
140
-		return string;
141
-	}
142
-
143
-	this.toArray  = function() {return this.readBytes(this.length() - 1, 0);} 
144
-
145
-
146
-	this._stringToBytes = function(str) {
147
-		var bytes = [],
148
-		    chr   = 0;
149
-
150
-		for (var i = 0; i < str.length; i++) {
151
-			chr = str.charCodeAt(i);
152
-			bytes.push(chr & 0xFF);
153
-		}
154
-
155
-		return bytes;
156
-	}
157
-
158
-	this._byteToString = function(byte) {
159
-		var asString = byte.toString(16).toUpperCase();
160
-		while (asString.length < 2) {
161
-			asString = '0' + asString;
162
-		}
163
-
164
-		return '0x' + asString;
165
-	}
166
-
167
-	this._init(source);
168
-}

+ 0
- 1432
Marlin/configurator/js/configurator.js
File diff suppressed because it is too large
View File


+ 0
- 524
Marlin/configurator/js/jcanvas.js View File

@@ -1,524 +0,0 @@
1
-/*!
2
-  jCanvas v2.2.1
3
-  Caleb Evans
4
-  2.2.1 revisions by Thinkyhead
5
-*/
6
-
7
-(function($, document, Math, Number, undefined) {
8
-
9
-// jC global object
10
-var jC = {};
11
-jC.originals = {
12
-	width: 20,
13
-	height: 20,
14
-	cornerRadius: 0,
15
-	fillStyle: 'transparent',
16
-	strokeStyle: 'transparent',
17
-	strokeWidth: 5,
18
-	strokeCap: 'butt',
19
-	strokeJoin: 'miter',
20
-	shadowX: 0,
21
-	shadowY: 0,
22
-	shadowBlur: 10,
23
-	shadowColor: 'transparent',
24
-	x: 0, y: 0,
25
-	x1: 0, y1: 0,
26
-	radius: 10,
27
-	start: 0,
28
-	end: 360,
29
-	ccw: false,
30
-	inDegrees: true,
31
-	fromCenter: true,
32
-	closed: false,
33
-	sides: 3,
34
-	angle: 0,
35
-	text: '',
36
-	font: 'normal 12pt sans-serif',
37
-	align: 'center',
38
-	baseline: 'middle',
39
-	source: '',
40
-	repeat: 'repeat'
41
-};
42
-// Duplicate original defaults
43
-jC.defaults = $.extend({}, jC.originals);
44
-
45
-// Set global properties
46
-function setGlobals(context, map) {
47
-	context.fillStyle = map.fillStyle;
48
-	context.strokeStyle = map.strokeStyle;
49
-	context.lineWidth = map.strokeWidth;
50
-	context.lineCap = map.strokeCap;
51
-	context.lineJoin = map.strokeJoin;
52
-	context.shadowOffsetX = map.shadowX;
53
-	context.shadowOffsetY = map.shadowY;
54
-	context.shadowBlur = map.shadowBlur;
55
-	context.shadowColor = map.shadowColor;
56
-}
57
-
58
-// Close path if chosen
59
-function closePath(context, map) {
60
-	if (map.closed === true) {
61
-		context.closePath();
62
-		context.fill();
63
-		context.stroke();
64
-	} else {
65
-		context.fill();
66
-		context.stroke();
67
-		context.closePath();
68
-	}
69
-}
70
-
71
-// Measure angles in degrees if chosen
72
-function checkUnits(map) {
73
-	if (map.inDegrees === true) {
74
-		return Math.PI / 180;
75
-	} else {
76
-		return 1;
77
-	}
78
-}
79
-
80
-// Set canvas defaults
81
-$.fn.canvas = function(args) {
82
-	// Reset defaults if no value is passed
83
-	if (typeof args === 'undefined') {
84
-		jC.defaults = jC.originals;
85
-	} else {
86
-		jC.defaults = $.extend({}, jC.defaults, args);
87
-	}
88
-	return this;
89
-};
90
-
91
-// Load canvas
92
-$.fn.loadCanvas = function(context) {
93
-	if (typeof context === 'undefined') {context = '2d';}
94
-	return this[0].getContext(context);
95
-};
96
-
97
-// Create gradient
98
-$.fn.gradient = function(args) {
99
-	var ctx = this.loadCanvas(),
100
-		// Specify custom defaults
101
-		gDefaults = {
102
-			x1: 0, y1: 0,
103
-			x2: 0, y2: 0,
104
-			r1: 10, r2: 100
105
-		},
106
-		params = $.extend({}, gDefaults, args),
107
-		gradient, stops = 0, percent, i;
108
-		
109
-	// Create radial gradient if chosen
110
-	if (typeof args.r1 === 'undefined' && typeof args.r2 === 'undefined') {
111
-		gradient = ctx.createLinearGradient(params.x1, params.y1, params.x2, params.y2);
112
-	} else {
113
-		gradient = ctx.createRadialGradient(params.x1, params.y1, params.r1, params.x2, params.y2, params.r2);
114
-	}
115
-	
116
-	// Count number of color stops
117
-	for (i=1; i<=Number.MAX_VALUE; i+=1) {
118
-		if (params['c' + i]) {
119
-			stops += 1;
120
-		} else {
121
-			break;
122
-		}
123
-	}
124
-	
125
-	// Calculate color stop percentages if absent
126
-	for (i=1; i<=stops; i+=1) {
127
-		percent = Math.round((100 / (stops-1)) * (i-1)) / 100;
128
-		if (typeof params['s' + i] === 'undefined') {
129
-			params['s' + i] = percent;
130
-		}
131
-		gradient.addColorStop(params['s' + i], params['c' + i]);
132
-	}
133
-	return gradient;
134
-};
135
-
136
-// Create pattern
137
-$.fn.pattern = function(args) {
138
-	var ctx = this.loadCanvas(),
139
-		params = $.extend({}, jC.defaults, args),
140
-		pattern,
141
-		img = document.createElement('img');
142
-	img.src = params.source;
143
-	
144
-	// Create pattern
145
-	function create() {
146
-		if (img.complete === true) {
147
-			// Create pattern
148
-			pattern = ctx.createPattern(img, params.repeat);
149
-		} else {
150
-			throw "The pattern has not loaded yet";
151
-		}
152
-	}
153
-	try {
154
-		create();
155
-	} catch(error) {
156
-		img.onload = create;
157
-	}
158
-	return pattern;
159
-};
160
-
161
-// Clear canvas
162
-$.fn.clearCanvas = function(args) {
163
-	var ctx = this.loadCanvas(),
164
-		params = $.extend({}, jC.defaults, args);
165
-
166
-	// Draw from center if chosen
167
-	if (params.fromCenter === true) {
168
-		params.x -= params.width / 2;
169
-		params.y -= params.height / 2;
170
-	}
171
-
172
-	// Clear entire canvas if chosen
173
-	ctx.beginPath();
174
-	if (typeof args === 'undefined') {
175
-		ctx.clearRect(0, 0, this.width(), this.height());
176
-	} else {
177
-		ctx.clearRect(params.x, params.y, params.width, params.height);
178
-	} 
179
-	ctx.closePath();
180
-	return this;
181
-};
182
-
183
-// Save canvas
184
-$.fn.saveCanvas = function() {
185
-	var ctx = this.loadCanvas();
186
-	ctx.save();
187
-	return this;
188
-};
189
-
190
-// Restore canvas
191
-$.fn.restoreCanvas = function() {
192
-	var ctx = this.loadCanvas();
193
-	ctx.restore();
194
-	return this;
195
-};
196
-
197
-// Scale canvas
198
-$.fn.scaleCanvas = function(args) {
199
-	var ctx = this.loadCanvas(),
200
-		params = $.extend({}, jC.defaults, args);
201
-	ctx.save();
202
-	ctx.translate(params.x, params.y);
203
-	ctx.scale(params.width, params.height);
204
-	ctx.translate(-params.x, -params.y)
205
-	return this;
206
-};
207
-
208
-// Translate canvas
209
-$.fn.translateCanvas = function(args) {
210
-	var ctx = this.loadCanvas(),
211
-		params = $.extend({}, jC.defaults, args);
212
-	ctx.save();
213
-	ctx.translate(params.x, params.y);		
214
-	return this;
215
-};
216
-
217
-// Rotate canvas
218
-$.fn.rotateCanvas = function(args) {
219
-	var ctx = this.loadCanvas(),
220
-		params = $.extend({}, jC.defaults, args),
221
-		toRad = checkUnits(params);
222
-	
223
-	ctx.save();
224
-	ctx.translate(params.x, params.y);
225
-	ctx.rotate(params.angle * toRad);
226
-	ctx.translate(-params.x, -params.y);
227
-	return this;
228
-};
229
-
230
-// Draw rectangle
231
-$.fn.drawRect = function(args) {
232
-	var ctx = this.loadCanvas(),
233
-		params = $.extend({}, jC.defaults, args),
234
-		toRad = checkUnits(params),
235
-		x1, y1, x2, y2, r;
236
-	setGlobals(ctx, params);
237
-	
238
-	// Draw from center if chosen
239
-	if (params.fromCenter === true) {
240
-		params.x -= params.width / 2;
241
-		params.y -= params.height / 2;
242
-	}
243
-		
244
-	// Draw rounded rectangle if chosen
245
-	if (params.cornerRadius > 0) {
246
-		x1 = params.x;
247
-		y1 = params.y;
248
-		x2 = params.x + params.width;
249
-		y2 = params.y + params.height;
250
-		r = params.cornerRadius;
251
-		if ((x2 - x1) - (2 * r) < 0) {
252
-			r = (x2 - x1) / 2;
253
-		}
254
-		if ((y2 - y1) - (2 * r) < 0) {
255
-			r = (y2 - y1) / 2;
256
-		}
257
-		ctx.beginPath();
258
-		ctx.moveTo(x1+r,y1);
259
-		ctx.lineTo(x2-r,y1);
260
-		ctx.arc(x2-r, y1+r, r, 270*toRad, 360*toRad, false);
261
-		ctx.lineTo(x2,y2-r);
262
-		ctx.arc(x2-r, y2-r, r, 0, 90*toRad, false);
263
-		ctx.lineTo(x1+r,y2);
264
-		ctx.arc(x1+r, y2-r, r, 90*toRad, 180*toRad, false);
265
-		ctx.lineTo(x1,y1+r);
266
-		ctx.arc(x1+r, y1+r, r, 180*toRad, 270*toRad, false);
267
-		ctx.fill();
268
-		ctx.stroke();
269
-		ctx.closePath();
270
-	} else {
271
-		ctx.fillRect(params.x, params.y, params.width, params.height);
272
-		ctx.strokeRect(params.x, params.y, params.width, params.height);
273
-	}
274
-	return this;
275
-};
276
-
277
-// Draw arc
278
-$.fn.drawArc = function(args) {
279
-	var ctx = this.loadCanvas(),
280
-		params = $.extend({}, jC.defaults, args),
281
-		toRad = checkUnits(params);
282
-		setGlobals(ctx, params);
283
-	
284
-	// Draw from center if chosen
285
-	if (params.fromCenter === false) {
286
-		params.x += params.radius;
287
-		params.y += params.radius;
288
-	}
289
-	
290
-	ctx.beginPath();
291
-	ctx.arc(params.x, params.y, params.radius, (params.start*toRad)-(Math.PI/2), (params.end*toRad)-(Math.PI/2), params.ccw);
292
-	// Close path if chosen
293
-	closePath(ctx, params);
294
-	return this;
295
-};
296
-
297
-// Draw ellipse
298
-$.fn.drawEllipse = function(args) {
299
-	var ctx = this.loadCanvas(),
300
-		params = $.extend({}, jC.defaults, args),
301
-		controlW = params.width * (4/3);
302
-		setGlobals(ctx, params);
303
-	
304
-	// Draw from center if chosen
305
-	if (params.fromCenter === false) {
306
-		params.x += params.width / 2;
307
-		params.y += params.height / 2;
308
-	}
309
-	
310
-	// Increment coordinates to prevent negative values
311
-	params.x += 1e-10;
312
-	params.y += 1e-10;
313
-	
314
-	// Create ellipse
315
-	ctx.beginPath();
316
-	ctx.moveTo(params.x, params.y-params.height/2);
317
-	ctx.bezierCurveTo(params.x-controlW/2,params.y-params.height/2,
318
-		params.x-controlW/2,params.y+params.height/2,
319
-		params.x,params.y+params.height/2);
320
-	ctx.bezierCurveTo(params.x+controlW/2,params.y+params.height/2,
321
-		params.x+controlW/2,params.y-params.height/2,
322
-		params.x,params.y-params.height/2);
323
-	ctx.closePath();
324
-	ctx.fill();
325
-	ctx.stroke();
326
-	return this;
327
-};
328
-
329
-// Draw line
330
-$.fn.drawLine = function(args) {
331
-	var ctx = this.loadCanvas(),
332
-		params = $.extend({}, jC.defaults, args),
333
-		max = Number.MAX_VALUE, l,
334
-		lx, ly;
335
-	setGlobals(ctx, params);
336
-	
337
-	// Draw each point
338
-	ctx.beginPath();
339
-	ctx.moveTo(params.x1, params.y1);
340
-	for (l=2; l<max; l+=1) {
341
-		lx = params['x' + l];
342
-		ly = params['y' + l];
343
-		// Stop loop when all points are drawn
344
-		if (typeof lx === 'undefined' || typeof ly === 'undefined') {
345
-			break;
346
-		}
347
-		ctx.lineTo(lx, ly);
348
-	}
349
-	// Close path if chosen
350
-	closePath(ctx, params);
351
-	return this;
352
-};
353
-
354
-// Draw quadratic curve
355
-$.fn.drawQuad = function(args) {
356
-	var ctx = this.loadCanvas(),
357
-		params = $.extend({}, jC.defaults, args),
358
-		max = Number.MAX_VALUE, l,
359
-		lx, ly, lcx, lcy;
360
-	setGlobals(ctx, params);
361
-	
362
-	// Draw each point
363
-	ctx.beginPath();
364
-	ctx.moveTo(params.x1, params.y1);
365
-	for (l=2; l<max; l+=1) {
366
-		lx = params['x' + l];
367
-    if (typeof lx === 'undefined') break;
368
-		ly = params['y' + l];
369
-    if (typeof ly === 'undefined') break;
370
-		lcx = params['cx' + (l-1)];
371
-    if (typeof lcx === 'undefined') break;
372
-		lcy = params['cy' + (l-1)];
373
-    if (typeof lcy === 'undefined') break;
374
-		ctx.quadraticCurveTo(lcx, lcy, lx, ly);
375
-	}
376
-	// Close path if chosen
377
-	closePath(ctx, params);
378
-	return this;
379
-};
380
-
381
-// Draw Bezier curve
382
-$.fn.drawBezier = function(args) {
383
-	var ctx = this.loadCanvas(),
384
-		params = $.extend({}, jC.defaults, args),
385
-		max = Number.MAX_VALUE,
386
-		l=2, lc=1, lx, ly, lcx1, lcy1, lcx2, lcy2, i;
387
-	setGlobals(ctx, params);
388
-
389
-	// Draw each point
390
-	ctx.beginPath();
391
-	ctx.moveTo(params.x1, params.y1);
392
-	for (i=2; i<max; i+=1) {
393
-		lx = params['x' + l];
394
-    if (typeof lx === 'undefined') break;
395
-		ly = params['y' + l];
396
-    if (typeof ly === 'undefined') break;
397
-		lcx1 = params['cx' + lc];
398
-    if (typeof lcx1 === 'undefined') break;
399
-		lcy1 = params['cy' + lc];
400
-    if (typeof lcy1 === 'undefined') break;
401
-		lcx2 = params['cx' + (lc+1)];
402
-    if (typeof lcx2 === 'undefined') break;
403
-		lcy2 = params['cy' + (lc+1)];
404
-    if (typeof lcy2 === 'undefined') break;
405
-		ctx.bezierCurveTo(lcx1, lcy1, lcx2, lcy2, lx, ly);
406
-		l += 1;
407
-		lc += 2;
408
-	}
409
-	// Close path if chosen
410
-	closePath(ctx, params);
411
-	return this;
412
-};
413
-
414
-// Draw text
415
-$.fn.drawText = function(args) {
416
-	var ctx = this.loadCanvas(),
417
-		params = $.extend({}, jC.defaults, args);
418
-	setGlobals(ctx, params);
419
-	
420
-	// Set text-specific properties
421
-	ctx.textBaseline = params.baseline;
422
-	ctx.textAlign = params.align;
423
-	ctx.font = params.font;
424
-	
425
-	ctx.strokeText(params.text, params.x, params.y);
426
-	ctx.fillText(params.text, params.x, params.y);
427
-	return this;
428
-};
429
-
430
-// Draw image
431
-$.fn.drawImage = function(args) {
432
-	var ctx = this.loadCanvas(),
433
-		params = $.extend({}, jC.defaults, args),
434
-		// Define image source
435
-		img = document.createElement('img');
436
-  	img.src = params.source;
437
-	  setGlobals(ctx, params);
438
-
439
-	// Draw image function
440
-	function draw() {
441
-		if (img.complete) {
442
-
443
-  		var scaleFac = img.width / img.height;
444
-
445
-			// If width/height are specified
446
-			if (typeof args.width !== 'undefined' && typeof args.height !== 'undefined') {
447
-				img.width = args.width;
448
-				img.height = args.height;
449
-			// If width is specified
450
-			} else if (typeof args.width !== 'undefined' && typeof args.height === 'undefined') {
451
-				img.width = args.width;
452
-				img.height = img.width / scaleFac;
453
-			// If height is specified
454
-			} else if (typeof args.width === 'undefined' && typeof args.height !== 'undefined') {
455
-				img.height = args.height;
456
-				img.width = img.height * scaleFac;
457
-			}
458
-		
459
-			// Draw from center if chosen
460
-			if (params.fromCenter === true) {
461
-				params.x -= img.width / 2;
462
-				params.y -= img.height / 2;
463
-			}
464
-
465
-			// Draw image
466
-			ctx.drawImage(img, params.x, params.y, img.width, img.height);
467
-		} else {
468
-			throw "The image has not loaded yet.";
469
-		}
470
-	}
471
-
472
-  function dodraw() {
473
-    // console.log("dodraw...");
474
-    try {
475
-  	  // console.log("dodraw...try...");
476
-      draw();
477
-    }
478
-    catch(error) {
479
-      // console.log("dodraw...catch: " + error);
480
-    }
481
-  }
482
-
483
-	// Draw image if already loaded
484
-  // console.log("--------------------");
485
-  // console.log("drawImage " + img.src);
486
-	try {
487
-    // console.log("try...");
488
-		draw();
489
-	} catch(error) {
490
-    // console.log("catch: " + error);
491
-		img.onload = dodraw;
492
-	}
493
-	return this;
494
-};
495
-
496
-// Draw polygon
497
-$.fn.drawPolygon = function(args) {
498
-	var ctx = this.loadCanvas(),
499
-		params = $.extend({}, jC.defaults, args),
500
-		theta, dtheta, x, y,
501
-		toRad = checkUnits(params), i;
502
-	setGlobals(ctx, params);
503
-	
504
-	if (params.sides >= 3) {		
505
-		// Calculate points and draw
506
-		theta = (Math.PI/2) + (Math.PI/params.sides) + (params.angle*toRad);
507
-		dtheta = (Math.PI*2) / params.sides;
508
-		for (i=0; i<params.sides; i+=1) {
509
-			x = params.x + (params.radius * Math.cos(theta)) + 1e-10;
510
-			y = params.y + (params.radius * Math.sin(theta)) + 1e-10;
511
-			if (params.fromCenter === false) {
512
-				x += params.radius;
513
-				y += params.radius;
514
-			}
515
-			ctx.lineTo(x, y);
516
-			theta += dtheta;
517
-		}
518
-		closePath(ctx, params);
519
-	}
520
-	return this;
521
-};
522
-
523
-return window.jCanvas = jC;
524
-}(jQuery, document, Math, Number));

+ 0
- 4
Marlin/configurator/js/jquery-2.1.3.min.js
File diff suppressed because it is too large
View File


+ 0
- 220
Marlin/configurator/js/jstepper.js View File

@@ -1,220 +0,0 @@
1
-/*!
2
- * jQuery "stepper" Plugin
3
- * version 0.0.1
4
- * @requires jQuery v1.3.2 or later
5
- * @requires jCanvas
6
- *
7
- * Authored 2011-06-11 Scott Lahteine (thinkyhead.com)
8
- *
9
- *  A very simple numerical stepper.
10
- *  TODO: place arrows based on div size, make 50/50 width
11
- *
12
- *  Usage example:
13
- *
14
- *  $('#mydiv').jstepper({
15
- *    min: 1,
16
- *    max: 4,
17
- *    val: 1,
18
- *    arrowWidth: 15,
19
- *    arrowHeight: '22px',
20
- *    color: '#FFF',
21
- *    acolor: '#F70',
22
- *    hcolor: '#FF0',
23
- *    id: 'select-me',
24
- *    stepperClass: 'inner',
25
- *    textStyle: {width:'1.5em',fontSize:'20px',textAlign:'center'},
26
- *    onChange: function(v) { },
27
- *  });
28
- *
29
- */
30
-;(function($) {
31
-  var un = 'undefined';
32
-
33
-  $.jstepperArrows = [
34
-    { name:'prev', poly:[[1.0,0],[0,0.5],[1.0,1.0]] },
35
-    { name:'next', poly:[[0,0],[1.0,0.5],[0,1.0]] }
36
-  ];
37
-
38
- 	$.fn.jstepper = function(args) {
39
-
40
-		return this.each(function() {
41
-
42
-      var defaults = {
43
-        min: 1,
44
-        max: null,
45
-        val: null,
46
-        active: true,
47
-        placeholder: null,
48
-        arrowWidth: 0,
49
-        arrowHeight: 0,
50
-        color: '#FFF',
51
-        hcolor: '#FF0',
52
-        acolor: '#F80',
53
-        id: '',
54
-        stepperClass: '',
55
-        textStyle: '',
56
-        onChange: (function(v){ if (typeof console.log !== 'undefined') console.log("val="+v); })
57
-      };
58
-
59
-      args = $.extend(defaults, args || {});
60
-
61
-		  var min = args.min * 1,
62
-          max = (args.max !== null) ? args.max * 1 : min,
63
-          span = max - min + 1,
64
-          val = (args.val !== null) ? args.val * 1 : min,
65
-          active = !args.disabled,
66
-          placeholder = args.placeholder,
67
-          arrowWidth = 1 * args.arrowWidth.toString().replace(/px/,''),
68
-          arrowHeight = 1 * args.arrowHeight.toString().replace(/px/,''),
69
-          color = args.color,
70
-          hcolor = args.hcolor,
71
-          acolor = args.acolor,
72
-			    $prev = $('<a href="#prev" style="cursor:w-resize;"><canvas/></a>'),
73
-			    $marq = $('<div class="number"/>').css({float:'left',textAlign:'center'}),
74
-			    $next = $('<a href="#next" style="cursor:e-resize;"><canvas/></a>'),
75
-			    arrow = [ $prev.find('canvas')[0], $next.find('canvas')[0] ],
76
-			    $stepper = $('<span class="jstepper"/>').append($prev).append($marq).append($next).append('<div style="clear:both;"/>'),
77
-			    onChange = args.onChange;
78
-
79
-      if (args.id) $stepper[0].id = args.id;
80
-      if (args.stepperClass) $stepper.addClass(args.stepperClass);
81
-      if (args.textStyle) $marq.css(args.textStyle);
82
-
83
-      // replace a span, but embed elsewhere
84
-      if (this.tagName == 'SPAN') {
85
-        var previd = this.id;
86
-        $(this).replaceWith($stepper);
87
-        if (previd) $stepper.attr('id',previd);
88
-      }
89
-      else {
90
-        $(this).append($stepper);
91
-      }
92
-
93
-      // hook to call functions on this object
94
-      $stepper[0].ui = {
95
-
96
-        refresh: function() {
97
-          this.updateNumber();
98
-          this._drawArrow(0, 1);
99
-          this._drawArrow(1, 1);
100
-          return this;
101
-        },
102
-
103
-        _drawArrow: function(i,state) {
104
-          var $elm = $(arrow[i]),
105
-              desc = $.jstepperArrows[i],
106
-              fillStyle = (state == 2) ? hcolor : (state == 3) ? acolor : color,
107
-              draw = { fillStyle: fillStyle },
108
-              w = $elm.width(), h = $elm.height();
109
-
110
-          if (w <= 0) w = $elm.attr('width');
111
-          if (h <= 0) h = $elm.attr('height');
112
-
113
-          $.each(desc.poly,function(i,v){
114
-            ++i;
115
-            draw['x'+i] = v[0] * w;
116
-            draw['y'+i] = v[1] * h;
117
-          });
118
-          $elm.restoreCanvas().clearCanvas().drawLine(draw);
119
-        },
120
-
121
-        updateNumber: function() {
122
-          $marq.html((active || placeholder === null) ? val.toString() : placeholder);
123
-          return this;
124
-        },
125
-
126
-        _doclick: function(i) {
127
-          this.add(i ? 1 : -1);
128
-          this._drawArrow(i, 3);
129
-          var self = this;
130
-          setTimeout(function(){ self._drawArrow(i, 2); }, 50);
131
-        },
132
-
133
-        add: function(x) {
134
-          val = (((val - min) + x + span) % span) + min;
135
-          this.updateNumber();
136
-          this.didChange(val);
137
-          return this;
138
-        },
139
-
140
-        min: function(v) {
141
-          if (typeof v === un) return min;
142
-          this.setRange(v,max);
143
-          return this;
144
-        },
145
-
146
-        max: function(v) {
147
-          if (typeof v === un) return max;
148
-          this.setRange(min,v);
149
-          return this;
150
-        },
151
-
152
-        val: function(v) {
153
-          if (typeof v === un) return val;
154
-          val = (((v - min) + span) % span) + min;
155
-          this.updateNumber();
156
-          return this;
157
-        },
158
-
159
-        setRange: function(lo, hi, ini) {
160
-          if (lo > hi) hi = (lo += hi -= lo) - hi;
161
-          min = lo; max = hi; span = hi - lo + 1;
162
-          if (typeof ini !== un) val = ini;
163
-          if (val < min) val = min;
164
-          if (val > max) val = max;
165
-          this.updateNumber();
166
-          return this;
167
-        },
168
-
169
-        active: function(a) {
170
-          if (typeof a === un) return active;
171
-          (active = a) ? $marq.removeClass('inactive') : $marq.addClass('inactive');
172
-          this.updateNumber();
173
-          return this;
174
-        },
175
-
176
-        disable: function() { this.active(false); return this; },
177
-        enable: function() { this.active(true); return this; },
178
-
179
-        clearPlaceholder: function() {
180
-          this.setPlaceholder(null);
181
-          return this;
182
-        },
183
-        setPlaceholder: function(p) {
184
-          placeholder = p;
185
-          if (!active) this.updateNumber();
186
-          return this;
187
-        },
188
-
189
-        didChange: onChange
190
-
191
-      };
192
-
193
-      // set hover and click for each arrow
194
-      $.each($.jstepperArrows, function(i,desc) {
195
-        var $elm = $(arrow[i]),
196
-            w = arrowWidth ? arrowWidth : $elm.width() ? $elm.width() : 15,
197
-            h = arrowHeight ? arrowHeight : $elm.height() ? $elm.height() : 24;
198
-        $elm[0]._index = i;
199
-        $elm
200
-          .css({float:'left'})
201
-          .attr({width:w,height:h,'class':desc.name})
202
-          .hover(
203
-            function(e) { $stepper[0].ui._drawArrow(e.target._index, 2); },
204
-            function(e) { $stepper[0].ui._drawArrow(e.target._index, 1); }
205
-          )
206
-          .click(function(e){
207
-            $stepper[0].ui._doclick(e.target._index);
208
-            return false;
209
-          });
210
-      });
211
-
212
-      // init the visuals first time
213
-  		$stepper[0].ui.refresh();
214
-
215
-		}); // this.each
216
-
217
-  }; // $.fn.jstepper
218
-
219
-})( jQuery );
220
-

+ 0
- 14
Marlin/configurator/js/jszip.min.js
File diff suppressed because it is too large
View File


+ 138
- 0
Marlin/dac_mcp4728.cpp View File

@@ -0,0 +1,138 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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
+/**
24
+ * mcp4728.cpp - Arduino library for MicroChip MCP4728 I2C D/A converter
25
+ *
26
+ * For implementation details, please take a look at the datasheet:
27
+ * http://ww1.microchip.com/downloads/en/DeviceDoc/22187a.pdf
28
+ *
29
+ * For discussion and feedback, please go to:
30
+ * http://arduino.cc/forum/index.php/topic,51842.0.html
31
+ */
32
+
33
+#include "dac_mcp4728.h"
34
+
35
+#if ENABLED(DAC_STEPPER_CURRENT)
36
+
37
+uint16_t     mcp4728_values[4];
38
+
39
+/**
40
+ * Begin I2C, get current values (input register and eeprom) of mcp4728
41
+ */
42
+void mcp4728_init() {
43
+  Wire.begin();
44
+  Wire.requestFrom(int(DAC_DEV_ADDRESS), 24);
45
+  while(Wire.available()) {
46
+    int deviceID = Wire.receive();
47
+    int hiByte = Wire.receive();
48
+    int loByte = Wire.receive();
49
+
50
+    int isEEPROM = (deviceID & 0B00001000) >> 3;
51
+    int channel = (deviceID & 0B00110000) >> 4;
52
+    if (isEEPROM != 1) {
53
+      mcp4728_values[channel] = word((hiByte & 0B00001111), loByte);
54
+    }
55
+  }
56
+}
57
+
58
+/**
59
+ * Write input resister value to specified channel using fastwrite method.
60
+ * Channel : 0-3, Values : 0-4095
61
+ */
62
+uint8_t mcp4728_analogWrite(uint8_t channel, uint16_t value) {
63
+  mcp4728_values[channel] = value;
64
+  return mcp4728_fastWrite();
65
+}
66
+/**
67
+ * Write all input resistor values to EEPROM using SequencialWrite method.
68
+ * This will update both input register and EEPROM value
69
+ * This will also write current Vref, PowerDown, Gain settings to EEPROM
70
+ */
71
+uint8_t mcp4728_eepromWrite() {
72
+  Wire.beginTransmission(DAC_DEV_ADDRESS);
73
+  Wire.send(SEQWRITE);
74
+  for (uint8_t channel=0; channel <= 3; channel++) {
75
+    Wire.send(DAC_STEPPER_VREF << 7 | 0 << 5 | DAC_STEPPER_GAIN << 4 | highByte(mcp4728_values[channel]));
76
+    Wire.send(lowByte(mcp4728_values[channel]));
77
+  }
78
+  return Wire.endTransmission();
79
+}
80
+
81
+/**
82
+ * Write Voltage reference setting to all input regiters
83
+ */
84
+uint8_t mcp4728_setVref_all(uint8_t value) {
85
+  Wire.beginTransmission(DAC_DEV_ADDRESS);
86
+  Wire.send(VREFWRITE | value << 3 | value << 2 | value << 1 | value);
87
+  return Wire.endTransmission();
88
+}
89
+/**
90
+ * Write Gain setting to all input regiters
91
+ */
92
+uint8_t mcp4728_setGain_all(uint8_t value) {
93
+  Wire.beginTransmission(DAC_DEV_ADDRESS);
94
+  Wire.send(GAINWRITE | value << 3 | value << 2 | value << 1 | value);
95
+  return Wire.endTransmission();
96
+}
97
+
98
+/**
99
+ * Return Input Regiter value
100
+ */
101
+uint16_t mcp4728_getValue(uint8_t channel) { return mcp4728_values[channel]; }
102
+
103
+/**
104
+ * Steph: Might be useful in the future
105
+ * Return Vout
106
+ *
107
+uint16_t mcp4728_getVout(uint8_t channel) {
108
+  uint32_t vref = 2048;
109
+  uint32_t vOut = (vref * mcp4728_values[channel] * (_DAC_STEPPER_GAIN + 1)) / 4096;
110
+  if (vOut > defaultVDD) vOut = defaultVDD;
111
+  return vOut;
112
+}
113
+*/
114
+
115
+/**
116
+ * FastWrite input register values - All DAC ouput update. refer to DATASHEET 5.6.1
117
+ * DAC Input and PowerDown bits update.
118
+ * No EEPROM update
119
+ */
120
+uint8_t mcp4728_fastWrite() {
121
+  Wire.beginTransmission(DAC_DEV_ADDRESS);
122
+  for (uint8_t channel=0; channel <= 3; channel++) {
123
+    Wire.send(highByte(mcp4728_values[channel]));
124
+    Wire.send(lowByte(mcp4728_values[channel]));
125
+  }
126
+  return Wire.endTransmission();
127
+}
128
+
129
+/**
130
+ * Common function for simple general commands
131
+ */
132
+uint8_t mcp4728_simpleCommand(byte simpleCommand) {
133
+  Wire.beginTransmission(GENERALCALL);
134
+  Wire.send(simpleCommand);
135
+  return Wire.endTransmission();
136
+}
137
+
138
+#endif // DAC_STEPPER_CURRENT

+ 66
- 0
Marlin/dac_mcp4728.h View File

@@ -0,0 +1,66 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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
+/**
24
+ * Arduino library for MicroChip MCP4728 I2C D/A converter.
25
+ */
26
+
27
+#ifndef mcp4728_h
28
+#define mcp4728_h
29
+
30
+#include "Configuration.h"
31
+#include "Configuration_adv.h"
32
+
33
+#if ENABLED(DAC_STEPPER_CURRENT)
34
+#include "WProgram.h"
35
+#include "Wire.h"
36
+//#include <Wire.h>
37
+
38
+#define defaultVDD 5000
39
+#define BASE_ADDR 0x60
40
+#define RESET 0B00000110
41
+#define WAKE 0B00001001
42
+#define UPDATE 0B00001000
43
+#define MULTIWRITE 0B01000000
44
+#define SINGLEWRITE 0B01011000
45
+#define SEQWRITE 0B01010000
46
+#define VREFWRITE 0B10000000
47
+#define GAINWRITE 0B11000000
48
+#define POWERDOWNWRITE 0B10100000
49
+#define GENERALCALL 0B0000000
50
+#define GAINWRITE 0B11000000
51
+
52
+// This is taken from the original lib, makes it easy to edit if needed
53
+#define DAC_DEV_ADDRESS (BASE_ADDR | 0x00)
54
+
55
+void mcp4728_init();
56
+uint8_t mcp4728_analogWrite(uint8_t channel, uint16_t value);
57
+uint8_t mcp4728_eepromWrite();
58
+uint8_t mcp4728_setVref_all(uint8_t value);
59
+uint8_t mcp4728_setGain_all(uint8_t value);
60
+uint16_t mcp4728_getValue(uint8_t channel);
61
+uint8_t mcp4728_fastWrite();
62
+uint8_t mcp4728_simpleCommand(byte simpleCommand);
63
+
64
+#endif
65
+#endif
66
+

+ 22
- 0
Marlin/digipot_mcp4451.cpp View File

@@ -1,3 +1,25 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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
+
1 23
 #include "Configuration.h"
2 24
 
3 25
 #if ENABLED(DIGIPOT_I2C)

+ 28
- 3
Marlin/dogm_bitmaps.h View File

@@ -1,6 +1,31 @@
1
-// BitMap for splashscreen
2
-// Generated with: http://www.digole.com/tools/PicturetoC_Hex_converter.php
3
-// Please note that using the high-res version takes 402Bytes of PROGMEM.
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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
+/**
24
+ * BitMap for splashscreen
25
+ * Generated with: http://www.digole.com/tools/PicturetoC_Hex_converter.php
26
+ * Please note that using the high-res version takes 402Bytes of PROGMEM.
27
+ */
28
+
4 29
 //#define START_BMPHIGH
5 30
 
6 31
 #if ENABLED(SHOW_BOOTSCREEN)

+ 23
- 1
Marlin/dogm_font_data_6x9_marlin.h View File

@@ -1,4 +1,26 @@
1
-/*
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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
+/**
2 24
   Fontname: -Misc-Fixed-Medium-R-Normal--9-90-75-75-C-60-ISO10646-1
3 25
   Copyright: Public domain font.  Share and enjoy.
4 26
   Capital A Height: 6, '1' Height: 6

+ 23
- 1
Marlin/dogm_font_data_HD44780_C.h View File

@@ -1,4 +1,26 @@
1
-/*
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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
+/**
2 24
   Fontname: HD44780_C v1.2
3 25
   Copyright: A. Hardtung, public domain
4 26
   Capital A Height: 7, '1' Height: 7

+ 83
- 61
Marlin/dogm_font_data_HD44780_J.h View File

@@ -1,8 +1,30 @@
1
-/*
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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
+/**
2 24
   Fontname: HD44780_J
3 25
   Copyright: A. Hardtung, public domain
4 26
   Capital A Height: 7, '1' Height: 7
5
-  Calculated Max Values w= 6 h=10 x= 2 y= 8 dx= 6 dy= 0 ascent= 8 len= 8
27
+  Calculated Max Values w= 6 h=10 x= 2 y= 5 dx= 6 dy= 0 ascent= 8 len= 8
6 28
   Font Bounding box     w= 6 h= 9 x= 0 y=-2
7 29
   Calculated Min Values           x= 0 y=-2 dx= 0 dy= 0
8 30
   Pure Font   ascent = 7 descent=-1
@@ -10,9 +32,9 @@
10 32
   Max Font    ascent = 8 descent=-2
11 33
 */
12 34
 #include <U8glib.h>
13
-const u8g_fntpgm_uint8_t HD44780_J_5x7[2491] U8G_SECTION(".progmem.HD44780_J_5x7") = {
35
+const u8g_fntpgm_uint8_t HD44780_J_5x7[2492] U8G_SECTION(".progmem.HD44780_J_5x7") = {
14 36
   0, 6, 9, 0, 254, 7, 1, 145, 3, 34, 32, 255, 255, 8, 254, 7,
15
-  255, 0, 0, 0, 6, 0, 8, 1, 7, 7, 6, 2, 0, 128, 128, 128,
37
+  255, 0, 0, 0, 6, 0, 0, 1, 7, 7, 6, 2, 0, 128, 128, 128,
16 38
   128, 128, 0, 128, 3, 2, 2, 6, 1, 5, 160, 160, 5, 7, 7, 6,
17 39
   0, 0, 80, 80, 248, 80, 248, 80, 80, 5, 7, 7, 6, 0, 0, 32,
18 40
   120, 160, 112, 40, 240, 32, 5, 7, 7, 6, 0, 0, 192, 200, 16, 32,
@@ -84,19 +106,19 @@ const u8g_fntpgm_uint8_t HD44780_J_5x7[2491] U8G_SECTION(".progmem.HD44780_J_5x7
84 106
   128, 64, 64, 32, 1, 7, 7, 6, 2, 0, 128, 128, 128, 128, 128, 128,
85 107
   128, 3, 7, 7, 6, 1, 0, 128, 64, 64, 32, 64, 64, 128, 5, 5,
86 108
   5, 6, 0, 1, 32, 16, 248, 16, 32, 5, 5, 5, 6, 0, 1, 32,
87
-  64, 248, 64, 32, 0, 0, 0, 6, 0, 8, 0, 0, 0, 6, 0, 8,
88
-  0, 0, 0, 6, 0, 8, 0, 0, 0, 6, 0, 8, 0, 0, 0, 6,
89
-  0, 8, 0, 0, 0, 6, 0, 8, 0, 0, 0, 6, 0, 8, 0, 0,
90
-  0, 6, 0, 8, 0, 0, 0, 6, 0, 8, 0, 0, 0, 6, 0, 8,
91
-  0, 0, 0, 6, 0, 8, 0, 0, 0, 6, 0, 8, 0, 0, 0, 6,
92
-  0, 8, 0, 0, 0, 6, 0, 8, 0, 0, 0, 6, 0, 8, 0, 0,
93
-  0, 6, 0, 8, 0, 0, 0, 6, 0, 8, 0, 0, 0, 6, 0, 8,
94
-  0, 0, 0, 6, 0, 8, 0, 0, 0, 6, 0, 8, 0, 0, 0, 6,
95
-  0, 8, 0, 0, 0, 6, 0, 8, 0, 0, 0, 6, 0, 8, 0, 0,
96
-  0, 6, 0, 8, 0, 0, 0, 6, 0, 8, 0, 0, 0, 6, 0, 8,
97
-  0, 0, 0, 6, 0, 8, 0, 0, 0, 6, 0, 8, 0, 0, 0, 6,
98
-  0, 8, 0, 0, 0, 6, 0, 8, 0, 0, 0, 6, 0, 8, 0, 0,
99
-  0, 6, 0, 8, 0, 0, 0, 6, 0, 8, 3, 3, 3, 6, 0, 0,
109
+  64, 248, 64, 32, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0,
110
+  0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6,
111
+  0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0,
112
+  0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0,
113
+  0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6,
114
+  0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0,
115
+  0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0,
116
+  0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6,
117
+  0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0,
118
+  0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0,
119
+  0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6,
120
+  0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0,
121
+  0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 3, 3, 3, 6, 0, 0,
100 122
   224, 160, 224, 3, 4, 4, 6, 2, 3, 224, 128, 128, 128, 3, 4, 4,
101 123
   6, 0, 0, 32, 32, 32, 224, 3, 3, 3, 6, 0, 0, 128, 64, 32,
102 124
   2, 2, 2, 6, 1, 2, 192, 192, 5, 6, 6, 6, 0, 0, 248, 8,
@@ -106,7 +128,7 @@ const u8g_fntpgm_uint8_t HD44780_J_5x7[2491] U8G_SECTION(".progmem.HD44780_J_5x7
106 128
   5, 5, 6, 0, 0, 16, 248, 48, 80, 144, 5, 5, 5, 6, 0, 0,
107 129
   64, 248, 72, 80, 64, 5, 4, 4, 6, 0, 0, 112, 16, 16, 248, 4,
108 130
   5, 5, 6, 0, 0, 240, 16, 240, 16, 240, 5, 4, 4, 6, 0, 0,
109
-  168, 168, 8, 48, 5, 1, 1, 6, 0, 4, 248, 5, 7, 7, 6, 0,
131
+  168, 168, 8, 48, 5, 1, 1, 6, 0, 3, 248, 5, 7, 7, 6, 0,
110 132
   0, 248, 8, 40, 48, 32, 32, 64, 5, 7, 7, 6, 0, 0, 8, 16,
111 133
   32, 96, 160, 32, 32, 5, 7, 7, 6, 0, 0, 32, 248, 136, 136, 8,
112 134
   16, 32, 5, 6, 6, 6, 0, 0, 248, 32, 32, 32, 32, 248, 5, 7,
@@ -124,47 +146,47 @@ const u8g_fntpgm_uint8_t HD44780_J_5x7[2491] U8G_SECTION(".progmem.HD44780_J_5x7
124 146
   6, 0, 0, 112, 0, 248, 32, 32, 32, 64, 3, 7, 7, 6, 1, 0,
125 147
   128, 128, 128, 192, 160, 128, 128, 5, 7, 7, 6, 0, 0, 32, 32, 248,
126 148
   32, 32, 64, 128, 5, 6, 6, 6, 0, 0, 112, 0, 0, 0, 0, 248,
127
-  5, 6, 6, 6, 0, 0, 248, 8, 80, 32, 80, 128, 5, 6, 6, 6,
128
-  0, 1, 32, 248, 16, 32, 112, 168, 3, 7, 7, 6, 1, 0, 32, 32,
129
-  32, 32, 32, 64, 128, 5, 6, 6, 6, 0, 0, 32, 16, 136, 136, 136,
130
-  136, 5, 7, 7, 6, 0, 0, 128, 128, 248, 128, 128, 128, 120, 5, 6,
131
-  6, 6, 0, 0, 248, 8, 8, 8, 16, 96, 5, 5, 5, 6, 0, 1,
132
-  64, 160, 16, 8, 8, 5, 7, 7, 6, 0, 0, 32, 248, 32, 32, 168,
133
-  168, 32, 5, 6, 6, 6, 0, 0, 248, 8, 8, 80, 32, 16, 4, 6,
134
-  6, 6, 1, 0, 224, 0, 224, 0, 224, 16, 5, 6, 6, 6, 0, 0,
135
-  32, 64, 128, 136, 248, 8, 5, 6, 6, 6, 0, 0, 8, 8, 80, 32,
136
-  80, 128, 5, 6, 6, 6, 0, 0, 248, 64, 248, 64, 64, 56, 5, 7,
137
-  7, 6, 0, 0, 64, 64, 248, 72, 80, 64, 64, 5, 7, 7, 6, 0,
138
-  0, 112, 16, 16, 16, 16, 16, 248, 5, 6, 6, 6, 0, 0, 248, 8,
139
-  248, 8, 8, 248, 5, 7, 7, 6, 0, 0, 112, 0, 248, 8, 8, 16,
140
-  32, 4, 7, 7, 6, 0, 0, 144, 144, 144, 144, 16, 32, 64, 5, 6,
141
-  6, 6, 0, 0, 32, 160, 160, 168, 168, 176, 5, 7, 7, 6, 0, 0,
142
-  128, 128, 128, 136, 144, 160, 192, 5, 6, 6, 6, 0, 0, 248, 136, 136,
143
-  136, 136, 248, 5, 6, 6, 6, 0, 0, 248, 136, 136, 8, 16, 32, 5,
144
-  6, 6, 6, 0, 0, 192, 0, 8, 8, 16, 224, 4, 3, 3, 6, 0,
145
-  4, 32, 144, 64, 3, 3, 3, 6, 0, 4, 224, 160, 224, 5, 5, 5,
146
-  6, 0, 1, 72, 168, 144, 144, 104, 5, 7, 7, 6, 0, 0, 80, 0,
147
-  112, 8, 120, 136, 120, 4, 8, 8, 6, 1, 255, 96, 144, 144, 224, 144,
148
-  144, 224, 128, 5, 5, 5, 6, 0, 0, 112, 128, 96, 136, 112, 5, 6,
149
-  6, 6, 0, 255, 136, 136, 152, 232, 136, 128, 5, 5, 5, 6, 0, 0,
150
-  120, 160, 144, 136, 112, 5, 7, 7, 6, 0, 254, 48, 72, 136, 136, 240,
151
-  128, 128, 5, 8, 8, 6, 0, 254, 120, 136, 136, 136, 120, 8, 8, 112,
152
-  5, 5, 5, 6, 0, 1, 56, 32, 32, 160, 64, 4, 3, 3, 6, 0,
153
-  3, 16, 208, 16, 4, 8, 8, 6, 0, 255, 16, 0, 48, 16, 16, 16,
154
-  144, 96, 3, 3, 3, 6, 0, 4, 160, 64, 160, 5, 7, 7, 6, 0,
155
-  0, 32, 112, 160, 160, 168, 112, 32, 5, 7, 7, 6, 0, 0, 64, 64,
156
-  224, 64, 224, 64, 120, 5, 7, 7, 6, 0, 0, 112, 0, 176, 200, 136,
157
-  136, 136, 5, 7, 7, 6, 0, 0, 80, 0, 112, 136, 136, 136, 112, 5,
158
-  7, 7, 6, 0, 255, 176, 200, 136, 136, 240, 128, 128, 5, 7, 7, 6,
159
-  0, 255, 104, 152, 136, 136, 120, 8, 8, 5, 6, 6, 6, 0, 0, 112,
160
-  136, 248, 136, 136, 112, 5, 3, 3, 6, 0, 2, 88, 168, 208, 5, 5,
161
-  5, 6, 0, 0, 112, 136, 136, 80, 216, 5, 7, 7, 6, 0, 0, 80,
162
-  0, 136, 136, 136, 152, 104, 5, 7, 7, 6, 0, 0, 248, 128, 64, 32,
163
-  64, 128, 248, 5, 5, 5, 6, 0, 0, 248, 80, 80, 80, 152, 5, 7,
164
-  7, 6, 0, 0, 248, 0, 136, 80, 32, 80, 136, 5, 7, 7, 6, 0,
165
-  255, 136, 136, 136, 136, 120, 8, 112, 5, 6, 6, 6, 0, 1, 8, 240,
166
-  32, 248, 32, 32, 5, 5, 5, 6, 0, 0, 248, 64, 120, 72, 136, 5,
167
-  5, 5, 6, 0, 0, 248, 168, 248, 136, 136, 5, 5, 5, 6, 0, 1,
168
-  32, 0, 248, 0, 32, 0, 0, 0, 6, 0, 8, 6, 10, 10, 6, 0,
169
-  254, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252
149
+  5, 6, 6, 6, 0, 0, 248, 8, 80, 32, 80, 128, 5, 7, 7, 6,
150
+  0, 0, 32, 248, 16, 32, 112, 168, 32, 3, 7, 7, 6, 1, 0, 32,
151
+  32, 32, 32, 32, 64, 128, 5, 6, 6, 6, 0, 0, 32, 16, 136, 136,
152
+  136, 136, 5, 7, 7, 6, 0, 0, 128, 128, 248, 128, 128, 128, 120, 5,
153
+  6, 6, 6, 0, 0, 248, 8, 8, 8, 16, 96, 5, 5, 5, 6, 0,
154
+  1, 64, 160, 16, 8, 8, 5, 7, 7, 6, 0, 0, 32, 248, 32, 32,
155
+  168, 168, 32, 5, 6, 6, 6, 0, 0, 248, 8, 8, 80, 32, 16, 4,
156
+  6, 6, 6, 1, 0, 224, 0, 224, 0, 224, 16, 5, 6, 6, 6, 0,
157
+  0, 32, 64, 128, 136, 248, 8, 5, 6, 6, 6, 0, 0, 8, 8, 80,
158
+  32, 80, 128, 5, 6, 6, 6, 0, 0, 248, 64, 248, 64, 64, 56, 5,
159
+  7, 7, 6, 0, 0, 64, 64, 248, 72, 80, 64, 64, 5, 7, 7, 6,
160
+  0, 0, 112, 16, 16, 16, 16, 16, 248, 5, 6, 6, 6, 0, 0, 248,
161
+  8, 248, 8, 8, 248, 5, 7, 7, 6, 0, 0, 112, 0, 248, 8, 8,
162
+  16, 32, 4, 7, 7, 6, 0, 0, 144, 144, 144, 144, 16, 32, 64, 5,
163
+  6, 6, 6, 0, 0, 32, 160, 160, 168, 168, 176, 5, 7, 7, 6, 0,
164
+  0, 128, 128, 128, 136, 144, 160, 192, 5, 6, 6, 6, 0, 0, 248, 136,
165
+  136, 136, 136, 248, 5, 6, 6, 6, 0, 0, 248, 136, 136, 8, 16, 32,
166
+  5, 6, 6, 6, 0, 0, 192, 0, 8, 8, 16, 224, 4, 3, 3, 6,
167
+  0, 4, 32, 144, 64, 3, 3, 3, 6, 0, 4, 224, 160, 224, 5, 5,
168
+  5, 6, 0, 1, 72, 168, 144, 144, 104, 5, 7, 7, 6, 0, 0, 80,
169
+  0, 112, 8, 120, 136, 120, 4, 8, 8, 6, 1, 255, 96, 144, 144, 224,
170
+  144, 144, 224, 128, 5, 5, 5, 6, 0, 0, 112, 128, 96, 136, 112, 5,
171
+  6, 6, 6, 0, 255, 136, 136, 152, 232, 136, 128, 5, 5, 5, 6, 0,
172
+  0, 120, 160, 144, 136, 112, 5, 7, 7, 6, 0, 254, 48, 72, 136, 136,
173
+  240, 128, 128, 5, 8, 8, 6, 0, 254, 120, 136, 136, 136, 120, 8, 8,
174
+  112, 5, 5, 5, 6, 0, 1, 56, 32, 32, 160, 64, 4, 3, 3, 6,
175
+  0, 3, 16, 208, 16, 4, 8, 8, 6, 0, 255, 16, 0, 48, 16, 16,
176
+  16, 144, 96, 3, 3, 3, 6, 0, 4, 160, 64, 160, 5, 7, 7, 6,
177
+  0, 0, 32, 112, 160, 160, 168, 112, 32, 5, 7, 7, 6, 0, 0, 64,
178
+  64, 224, 64, 224, 64, 120, 5, 7, 7, 6, 0, 0, 112, 0, 176, 200,
179
+  136, 136, 136, 5, 7, 7, 6, 0, 0, 80, 0, 112, 136, 136, 136, 112,
180
+  5, 7, 7, 6, 0, 255, 176, 200, 136, 136, 240, 128, 128, 5, 7, 7,
181
+  6, 0, 255, 104, 152, 136, 136, 120, 8, 8, 5, 6, 6, 6, 0, 0,
182
+  112, 136, 248, 136, 136, 112, 5, 3, 3, 6, 0, 2, 88, 168, 208, 5,
183
+  5, 5, 6, 0, 0, 112, 136, 136, 80, 216, 5, 7, 7, 6, 0, 0,
184
+  80, 0, 136, 136, 136, 152, 104, 5, 7, 7, 6, 0, 0, 248, 128, 64,
185
+  32, 64, 128, 248, 5, 5, 5, 6, 0, 0, 248, 80, 80, 80, 152, 5,
186
+  7, 7, 6, 0, 0, 248, 0, 136, 80, 32, 80, 136, 5, 7, 7, 6,
187
+  0, 255, 136, 136, 136, 136, 120, 8, 112, 5, 6, 6, 6, 0, 0, 8,
188
+  240, 32, 248, 32, 32, 5, 5, 5, 6, 0, 0, 248, 64, 120, 72, 136,
189
+  5, 5, 5, 6, 0, 0, 248, 168, 248, 136, 136, 5, 5, 5, 6, 0,
190
+  1, 32, 0, 248, 0, 32, 0, 0, 0, 6, 0, 0, 6, 10, 10, 6,
191
+  0, 254, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252
170 192
 };

+ 23
- 1
Marlin/dogm_font_data_HD44780_W.h View File

@@ -1,4 +1,26 @@
1
-/*
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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
+/**
2 24
   Fontname: HD44780_W
3 25
   Copyright: A.Hardtung, public domain
4 26
   Capital A Height: 7, '1' Height: 7

+ 23
- 1
Marlin/dogm_font_data_ISO10646_1.h View File

@@ -1,4 +1,26 @@
1
-/*
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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
+/**
2 24
   Fontname: ISO10646-1
3 25
   Copyright: A.Hardtung, public domain
4 26
   Capital A Height: 7, '1' Height: 7

+ 23
- 1
Marlin/dogm_font_data_ISO10646_5_Cyrillic.h View File

@@ -1,4 +1,26 @@
1
-/*
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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
+/**
2 24
   Fontname: ISO10646_5_Cyrillic
3 25
   Copyright: A. Hardtung, public domain
4 26
   Capital A Height: 7, '1' Height: 7

+ 23
- 1
Marlin/dogm_font_data_ISO10646_CN.h View File

@@ -1,4 +1,26 @@
1
-/*
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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
+/**
2 24
   Fontname: ISO10646_CN
3 25
   Copyright: A. Hardtung, public domain
4 26
   Capital A Height: 7, '1' Height: 7

+ 97
- 79
Marlin/dogm_font_data_ISO10646_Kana.h View File

@@ -1,8 +1,30 @@
1
-/*
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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
+/**
2 24
   Fontname: ISO10646_Kana
3 25
   Copyright: A. Hardtung, public domain
4 26
   Capital A Height: 7, '1' Height: 7
5
-  Calculated Max Values w= 5 h= 9 x= 2 y= 5 dx= 6 dy= 0 ascent= 8 len= 9
27
+  Calculated Max Values w= 5 h= 8 x= 2 y= 5 dx= 6 dy= 0 ascent= 8 len= 8
6 28
   Font Bounding box     w= 6 h= 9 x= 0 y=-2
7 29
   Calculated Min Values           x= 0 y=-1 dx= 0 dy= 0
8 30
   Pure Font   ascent = 7 descent=-1
@@ -10,7 +32,7 @@
10 32
   Max Font    ascent = 8 descent=-1
11 33
 */
12 34
 #include <U8glib.h>
13
-const u8g_fntpgm_uint8_t ISO10646_Kana_5x7[2549] U8G_SECTION(".progmem.ISO10646_Kana_5x7") = {
35
+const u8g_fntpgm_uint8_t ISO10646_Kana_5x7[2482] U8G_SECTION(".progmem.ISO10646_Kana_5x7") = {
14 36
   0, 6, 9, 0, 254, 7, 1, 145, 3, 32, 32, 255, 255, 8, 255, 7,
15 37
   255, 0, 0, 0, 6, 0, 0, 1, 7, 7, 6, 2, 0, 128, 128, 128,
16 38
   128, 128, 0, 128, 3, 2, 2, 6, 1, 5, 160, 160, 5, 7, 7, 6,
@@ -95,80 +117,76 @@ const u8g_fntpgm_uint8_t ISO10646_Kana_5x7[2549] U8G_SECTION(".progmem.ISO10646_
95 117
   0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0,
96 118
   0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6,
97 119
   0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0,
98
-  0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 5, 3, 3, 6, 0, 2,
99
-  248, 0, 248, 5, 6, 6, 6, 0, 0, 248, 8, 40, 48, 32, 64, 5,
100
-  7, 7, 6, 0, 0, 248, 8, 40, 48, 32, 32, 64, 4, 5, 5, 6,
101
-  0, 0, 16, 32, 96, 160, 32, 5, 7, 7, 6, 0, 0, 8, 16, 32,
102
-  96, 160, 32, 32, 5, 5, 5, 6, 0, 0, 32, 248, 136, 8, 48, 5,
103
-  7, 7, 6, 0, 0, 32, 248, 136, 136, 8, 16, 32, 5, 4, 4, 6,
104
-  0, 0, 248, 32, 32, 248, 5, 6, 6, 6, 0, 0, 248, 32, 32, 32,
105
-  32, 248, 5, 5, 5, 6, 0, 0, 16, 248, 48, 80, 144, 5, 7, 7,
106
-  6, 0, 0, 16, 248, 16, 48, 80, 144, 16, 5, 5, 5, 6, 0, 0,
107
-  64, 248, 72, 80, 64, 5, 7, 7, 6, 0, 0, 40, 0, 64, 248, 72,
108
-  80, 64, 5, 7, 7, 6, 0, 0, 32, 248, 32, 248, 32, 32, 32, 5,
109
-  8, 8, 6, 0, 0, 40, 0, 32, 248, 32, 248, 32, 32, 4, 6, 6,
110
-  6, 0, 0, 64, 112, 144, 16, 16, 32, 5, 8, 8, 6, 0, 0, 40,
111
-  0, 64, 112, 144, 16, 16, 32, 5, 6, 6, 6, 0, 0, 64, 120, 144,
112
-  16, 16, 32, 5, 8, 8, 6, 0, 0, 40, 0, 64, 120, 144, 16, 16,
113
-  32, 5, 5, 5, 6, 0, 0, 248, 8, 8, 8, 248, 5, 7, 7, 6,
114
-  0, 0, 40, 0, 248, 8, 8, 8, 248, 5, 7, 7, 6, 0, 255, 80,
115
-  248, 80, 80, 16, 32, 64, 5, 9, 9, 6, 0, 255, 40, 0, 80, 248,
116
-  80, 80, 16, 32, 64, 5, 6, 6, 6, 0, 0, 192, 8, 200, 8, 16,
117
-  224, 5, 8, 8, 6, 0, 0, 40, 0, 192, 8, 200, 8, 16, 224, 5,
118
-  6, 6, 6, 0, 0, 248, 8, 16, 32, 80, 136, 5, 8, 8, 6, 0,
119
-  0, 40, 0, 248, 8, 16, 32, 80, 136, 5, 6, 6, 6, 0, 0, 64,
120
-  248, 72, 80, 64, 120, 5, 8, 8, 6, 0, 0, 40, 0, 64, 248, 72,
121
-  80, 64, 120, 4, 4, 4, 6, 0, 1, 16, 208, 16, 224, 5, 7, 7,
122
-  6, 0, 0, 40, 0, 8, 200, 8, 16, 224, 5, 7, 7, 6, 0, 255,
123
-  32, 120, 136, 40, 16, 40, 64, 5, 9, 9, 6, 0, 255, 40, 0, 32,
124
-  120, 136, 40, 16, 40, 64, 5, 6, 6, 6, 0, 0, 240, 32, 248, 32,
125
-  64, 128, 5, 8, 8, 6, 0, 0, 40, 0, 240, 32, 248, 32, 64, 128,
126
-  4, 5, 5, 6, 0, 1, 192, 16, 208, 16, 224, 5, 6, 6, 6, 0,
127
-  0, 192, 8, 200, 8, 16, 224, 5, 8, 8, 6, 0, 0, 40, 0, 192,
128
-  8, 200, 8, 16, 224, 5, 6, 6, 6, 0, 0, 112, 0, 248, 32, 32,
129
-  64, 5, 8, 8, 6, 0, 0, 40, 0, 112, 0, 248, 32, 32, 64, 3,
130
-  7, 7, 6, 1, 0, 128, 128, 128, 192, 160, 128, 128, 4, 8, 8, 6,
131
-  1, 0, 80, 0, 128, 128, 192, 160, 128, 128, 5, 7, 7, 6, 0, 0,
132
-  32, 32, 248, 32, 32, 64, 128, 5, 6, 6, 6, 0, 0, 112, 0, 0,
133
-  0, 0, 248, 5, 6, 6, 6, 0, 0, 248, 8, 80, 32, 80, 128, 5,
134
-  7, 7, 6, 0, 255, 32, 248, 8, 16, 32, 112, 168, 3, 7, 7, 6,
135
-  1, 0, 32, 32, 32, 32, 32, 64, 128, 5, 5, 5, 6, 0, 0, 16,
136
-  136, 136, 136, 136, 5, 7, 7, 6, 0, 0, 40, 0, 16, 136, 136, 136,
137
-  136, 5, 8, 8, 6, 0, 0, 24, 24, 0, 16, 136, 136, 136, 136, 5,
138
-  7, 7, 6, 0, 0, 128, 128, 248, 128, 128, 128, 120, 5, 8, 8, 6,
139
-  0, 0, 40, 128, 128, 248, 128, 128, 128, 120, 5, 8, 8, 6, 0, 0,
140
-  24, 152, 128, 248, 128, 128, 128, 120, 5, 6, 6, 6, 0, 0, 248, 8,
141
-  8, 8, 16, 96, 5, 8, 8, 6, 0, 0, 40, 0, 248, 8, 8, 8,
142
-  16, 96, 5, 8, 8, 6, 0, 0, 24, 24, 248, 8, 8, 8, 16, 96,
143
-  5, 5, 5, 6, 0, 1, 64, 160, 16, 8, 8, 5, 7, 7, 6, 0,
144
-  1, 40, 0, 64, 160, 16, 8, 8, 5, 7, 7, 6, 0, 1, 24, 24,
145
-  64, 160, 16, 8, 8, 5, 6, 6, 6, 0, 0, 32, 248, 32, 32, 168,
146
-  168, 5, 8, 8, 6, 0, 0, 40, 0, 32, 248, 32, 32, 168, 168, 5,
147
-  8, 8, 6, 0, 0, 24, 24, 32, 248, 32, 32, 168, 168, 5, 6, 6,
148
-  6, 0, 0, 248, 8, 8, 80, 32, 16, 4, 6, 6, 6, 1, 0, 224,
149
-  0, 224, 0, 224, 16, 5, 6, 6, 6, 0, 0, 32, 64, 128, 144, 248,
150
-  8, 5, 6, 6, 6, 0, 0, 8, 8, 80, 32, 80, 128, 5, 6, 6,
151
-  6, 0, 0, 120, 32, 248, 32, 32, 56, 5, 7, 7, 6, 0, 0, 64,
152
-  64, 248, 72, 80, 64, 64, 5, 7, 7, 6, 0, 0, 64, 248, 72, 80,
153
-  64, 64, 64, 5, 5, 5, 6, 0, 0, 112, 16, 16, 16, 248, 5, 7,
154
-  7, 6, 0, 0, 112, 16, 16, 16, 16, 16, 248, 4, 5, 5, 6, 1,
155
-  0, 240, 16, 240, 16, 240, 5, 7, 7, 6, 0, 0, 248, 8, 8, 248,
156
-  8, 8, 248, 5, 6, 6, 6, 0, 0, 112, 0, 248, 8, 16, 32, 3,
157
-  6, 6, 6, 1, 0, 160, 160, 160, 160, 32, 64, 5, 6, 6, 6, 0,
158
-  0, 80, 80, 80, 80, 88, 144, 4, 6, 6, 6, 1, 0, 128, 128, 128,
159
-  144, 160, 192, 5, 6, 6, 6, 0, 0, 248, 136, 136, 136, 248, 136, 5,
160
-  5, 5, 6, 0, 0, 248, 136, 8, 16, 96, 5, 6, 6, 6, 0, 0,
161
-  248, 136, 8, 8, 16, 96, 5, 6, 6, 6, 0, 0, 16, 248, 80, 80,
162
-  248, 16, 5, 6, 6, 6, 0, 0, 248, 8, 80, 96, 64, 248, 5, 6,
163
-  6, 6, 0, 0, 248, 8, 248, 8, 16, 32, 5, 6, 6, 6, 0, 0,
164
-  128, 64, 8, 8, 16, 224, 5, 8, 8, 6, 0, 0, 40, 0, 32, 248,
165
-  136, 8, 24, 32, 5, 6, 6, 6, 0, 0, 64, 248, 72, 72, 136, 144,
166
-  4, 5, 5, 6, 1, 0, 128, 240, 160, 32, 32, 5, 8, 8, 6, 0,
167
-  0, 40, 0, 248, 136, 8, 8, 16, 96, 5, 8, 8, 6, 0, 0, 40,
168
-  0, 16, 248, 80, 80, 248, 16, 5, 7, 7, 6, 0, 0, 40, 0, 248,
169
-  16, 32, 32, 248, 5, 8, 8, 6, 0, 0, 40, 0, 248, 8, 248, 8,
170
-  16, 32, 2, 2, 2, 6, 2, 2, 192, 192, 5, 1, 1, 6, 0, 3,
171
-  248, 5, 5, 5, 6, 0, 1, 128, 64, 32, 16, 8, 5, 6, 6, 6,
172
-  0, 1, 40, 128, 64, 32, 16, 8, 5, 7, 7, 6, 0, 0, 248, 8,
173
-  8, 8, 8, 8, 8
120
+  0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 5, 3, 3, 6, 0, 1,
121
+  248, 0, 248, 4, 4, 4, 6, 0, 0, 240, 16, 96, 64, 5, 6, 6,
122
+  6, 0, 0, 248, 8, 40, 48, 32, 64, 3, 4, 4, 6, 1, 0, 32,
123
+  64, 192, 64, 4, 6, 6, 6, 0, 0, 16, 32, 96, 160, 32, 32, 4,
124
+  4, 4, 6, 0, 0, 32, 240, 144, 32, 5, 6, 6, 6, 0, 0, 32,
125
+  248, 136, 8, 16, 32, 3, 4, 4, 6, 1, 0, 224, 64, 64, 224, 5,
126
+  5, 5, 6, 0, 0, 248, 32, 32, 32, 248, 4, 4, 4, 6, 0, 0,
127
+  32, 240, 96, 160, 5, 6, 6, 6, 0, 0, 16, 248, 48, 80, 144, 16,
128
+  5, 6, 6, 6, 0, 0, 64, 248, 72, 72, 72, 144, 5, 8, 8, 6,
129
+  0, 0, 40, 0, 64, 248, 72, 72, 72, 144, 5, 6, 6, 6, 0, 0,
130
+  32, 248, 32, 248, 32, 32, 5, 8, 8, 6, 0, 0, 40, 0, 32, 248,
131
+  32, 248, 32, 32, 4, 5, 5, 6, 0, 0, 112, 144, 16, 32, 192, 5,
132
+  7, 7, 6, 0, 0, 40, 0, 112, 144, 16, 32, 192, 5, 6, 6, 6,
133
+  0, 0, 64, 120, 144, 16, 16, 32, 5, 8, 8, 6, 0, 0, 40, 0,
134
+  64, 120, 144, 16, 16, 32, 5, 5, 5, 6, 0, 0, 248, 8, 8, 8,
135
+  248, 5, 7, 7, 6, 0, 0, 40, 0, 248, 8, 8, 8, 248, 5, 6,
136
+  6, 6, 0, 0, 80, 248, 80, 16, 32, 64, 5, 8, 8, 6, 0, 0,
137
+  40, 0, 80, 248, 80, 16, 32, 64, 5, 5, 5, 6, 0, 0, 192, 8,
138
+  200, 16, 224, 5, 7, 7, 6, 0, 0, 40, 0, 192, 8, 200, 16, 224,
139
+  5, 5, 5, 6, 0, 0, 248, 16, 32, 80, 136, 5, 7, 7, 6, 0,
140
+  0, 40, 0, 248, 16, 32, 80, 136, 5, 6, 6, 6, 0, 0, 64, 248,
141
+  72, 80, 64, 56, 5, 8, 8, 6, 0, 0, 40, 0, 64, 248, 72, 80,
142
+  64, 56, 5, 5, 5, 6, 0, 0, 136, 136, 72, 16, 96, 5, 7, 7,
143
+  6, 0, 0, 40, 0, 136, 136, 72, 16, 96, 5, 5, 5, 6, 0, 0,
144
+  120, 72, 168, 16, 96, 5, 7, 7, 6, 0, 0, 40, 0, 120, 72, 168,
145
+  16, 96, 5, 6, 6, 6, 0, 0, 16, 224, 32, 248, 32, 64, 5, 8,
146
+  8, 6, 0, 0, 40, 0, 16, 224, 32, 248, 32, 64, 5, 4, 4, 6,
147
+  0, 0, 168, 168, 8, 48, 5, 5, 5, 6, 0, 0, 168, 168, 8, 16,
148
+  32, 5, 7, 7, 6, 0, 0, 40, 0, 168, 168, 8, 16, 32, 5, 6,
149
+  6, 6, 0, 0, 112, 0, 248, 32, 32, 64, 5, 8, 8, 6, 0, 0,
150
+  40, 0, 112, 0, 248, 32, 32, 64, 3, 6, 6, 6, 1, 0, 128, 128,
151
+  192, 160, 128, 128, 4, 8, 8, 6, 1, 0, 80, 0, 128, 128, 192, 160,
152
+  128, 128, 5, 6, 6, 6, 0, 0, 32, 248, 32, 32, 64, 128, 5, 5,
153
+  5, 6, 0, 0, 112, 0, 0, 0, 248, 5, 5, 5, 6, 0, 0, 248,
154
+  8, 80, 32, 208, 5, 6, 6, 6, 0, 0, 32, 248, 16, 32, 112, 168,
155
+  3, 6, 6, 6, 1, 0, 32, 32, 32, 32, 64, 128, 5, 5, 5, 6,
156
+  0, 0, 16, 136, 136, 136, 136, 5, 7, 7, 6, 0, 0, 40, 0, 16,
157
+  136, 136, 136, 136, 5, 8, 8, 6, 0, 0, 24, 24, 0, 16, 136, 136,
158
+  136, 136, 5, 6, 6, 6, 0, 0, 128, 128, 248, 128, 128, 120, 5, 7,
159
+  7, 6, 0, 0, 40, 128, 128, 248, 128, 128, 120, 5, 7, 7, 6, 0,
160
+  0, 24, 152, 128, 248, 128, 128, 120, 5, 5, 5, 6, 0, 0, 248, 8,
161
+  8, 16, 96, 5, 7, 7, 6, 0, 0, 40, 0, 248, 8, 8, 16, 96,
162
+  5, 8, 8, 6, 0, 0, 24, 24, 0, 248, 8, 8, 16, 96, 5, 4,
163
+  4, 6, 0, 1, 64, 160, 16, 8, 5, 6, 6, 6, 0, 1, 40, 0,
164
+  64, 160, 16, 8, 5, 6, 6, 6, 0, 1, 24, 24, 64, 160, 16, 8,
165
+  5, 6, 6, 6, 0, 0, 32, 248, 32, 168, 168, 32, 5, 8, 8, 6,
166
+  0, 0, 40, 0, 32, 248, 32, 168, 168, 32, 5, 8, 8, 6, 0, 0,
167
+  24, 24, 32, 248, 32, 168, 168, 32, 5, 5, 5, 6, 0, 0, 248, 8,
168
+  80, 32, 16, 4, 5, 5, 6, 1, 0, 224, 0, 224, 0, 240, 5, 5,
169
+  5, 6, 0, 0, 32, 64, 136, 248, 8, 5, 5, 5, 6, 0, 0, 8,
170
+  40, 16, 40, 192, 5, 5, 5, 6, 0, 0, 248, 64, 248, 64, 56, 5,
171
+  4, 4, 6, 0, 0, 64, 248, 80, 64, 5, 6, 6, 6, 0, 0, 64,
172
+  248, 72, 80, 64, 64, 4, 4, 4, 6, 0, 0, 96, 32, 32, 240, 5,
173
+  5, 5, 6, 0, 0, 112, 16, 16, 16, 248, 4, 5, 5, 6, 0, 0,
174
+  240, 16, 240, 16, 240, 5, 5, 5, 6, 0, 0, 248, 8, 248, 8, 248,
175
+  5, 6, 6, 6, 0, 0, 112, 0, 248, 8, 16, 32, 4, 6, 6, 6,
176
+  0, 0, 144, 144, 144, 144, 16, 32, 5, 5, 5, 6, 0, 0, 32, 160,
177
+  168, 168, 176, 4, 5, 5, 6, 0, 0, 128, 128, 144, 160, 192, 5, 5,
178
+  5, 6, 0, 0, 248, 136, 136, 136, 248, 4, 4, 4, 6, 0, 0, 240,
179
+  144, 16, 32, 5, 5, 5, 6, 0, 0, 248, 136, 8, 16, 32, 5, 6,
180
+  6, 6, 0, 0, 16, 248, 80, 80, 248, 16, 5, 5, 5, 6, 0, 0,
181
+  248, 8, 48, 32, 248, 5, 5, 5, 6, 0, 0, 248, 8, 248, 8, 48,
182
+  5, 5, 5, 6, 0, 0, 192, 8, 8, 16, 224, 5, 8, 8, 6, 0,
183
+  0, 40, 0, 32, 248, 136, 8, 16, 32, 4, 4, 4, 6, 0, 0, 64,
184
+  240, 80, 160, 4, 4, 4, 6, 0, 0, 64, 240, 32, 64, 5, 7, 7,
185
+  6, 0, 0, 40, 0, 248, 136, 8, 16, 96, 5, 8, 8, 6, 0, 0,
186
+  40, 0, 16, 248, 80, 80, 248, 16, 5, 7, 7, 6, 0, 0, 40, 0,
187
+  248, 8, 48, 32, 248, 5, 7, 7, 6, 0, 0, 40, 0, 248, 8, 248,
188
+  8, 48, 2, 2, 2, 6, 2, 2, 192, 192, 5, 1, 1, 6, 0, 2,
189
+  248, 5, 4, 4, 6, 0, 1, 128, 96, 16, 8, 5, 5, 5, 6, 0,
190
+  1, 40, 128, 96, 16, 8, 5, 6, 6, 6, 0, 0, 248, 8, 8, 8,
191
+  8, 8
174 192
 };

+ 23
- 1
Marlin/dogm_font_data_Marlin_symbols.h View File

@@ -1,4 +1,26 @@
1
-/*
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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
+/**
2 24
   Fontname: Marlin_symbols
3 25
   Copyright: Created with Fony 1.4.7
4 26
   Capital A Height: 0, '1' Height: 0

+ 115
- 48
Marlin/dogm_lcd_implementation.h View File

@@ -1,4 +1,26 @@
1 1
 /**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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
+/**
2 24
  * dogm_lcd_implementation.h
3 25
  *
4 26
  * Graphics LCD implementation for 128x64 pixel LCDs by STB for ErikZalm/Marlin
@@ -7,7 +29,7 @@
7 29
  *
8 30
  * With the use of:
9 31
  * u8glib by Oliver Kraus
10
- * http://code.google.com/p/u8glib/
32
+ * https://github.com/olikraus/U8glib_Arduino
11 33
  * License: http://opensource.org/licenses/BSD-3-Clause
12 34
  */
13 35
 
@@ -22,9 +44,9 @@
22 44
   #define BLEN_A 0
23 45
   #define BLEN_B 1
24 46
   #define BLEN_C 2
25
-  #define EN_A BIT(BLEN_A)
26
-  #define EN_B BIT(BLEN_B)
27
-  #define EN_C BIT(BLEN_C)
47
+  #define EN_A (_BV(BLEN_A))
48
+  #define EN_B (_BV(BLEN_B))
49
+  #define EN_C (_BV(BLEN_C))
28 50
   #define LCD_CLICKED (buttons&EN_C)
29 51
 #endif
30 52
 
@@ -146,7 +168,6 @@
146 168
 #include "utf_mapper.h"
147 169
 
148 170
 int lcd_contrast;
149
-static unsigned char blink = 0; // Variable for visualization of fan rotation in GLCD
150 171
 static char currentfont = 0;
151 172
 
152 173
 static void lcd_setFont(char font_nr) {
@@ -170,7 +191,7 @@ char lcd_print(char c) {
170 191
   }
171 192
 }
172 193
 
173
-char lcd_print(char* str) {
194
+char lcd_print(const char* str) {
174 195
   char c;
175 196
   int i = 0;
176 197
   char n = 0;
@@ -225,14 +246,14 @@ static void lcd_implementation_init() {
225 246
   #endif
226 247
 
227 248
   #if ENABLED(SHOW_BOOTSCREEN)
228
-    int offx = (u8g.getWidth() - START_BMPWIDTH) / 2;
249
+    int offx = (u8g.getWidth() - (START_BMPWIDTH)) / 2;
229 250
     #if ENABLED(START_BMPHIGH)
230 251
       int offy = 0;
231 252
     #else
232 253
       int offy = DOG_CHAR_HEIGHT;
233 254
     #endif
234 255
 
235
-    int txt1X = (u8g.getWidth() - (sizeof(STRING_SPLASH_LINE1) - 1) * DOG_CHAR_WIDTH) / 2;
256
+    int txt1X = (u8g.getWidth() - (sizeof(STRING_SPLASH_LINE1) - 1) * (DOG_CHAR_WIDTH)) / 2;
236 257
 
237 258
     u8g.firstPage();
238 259
     do {
@@ -240,11 +261,11 @@ static void lcd_implementation_init() {
240 261
         u8g.drawBitmapP(offx, offy, START_BMPBYTEWIDTH, START_BMPHEIGHT, start_bmp);
241 262
         lcd_setFont(FONT_MENU);
242 263
         #ifndef STRING_SPLASH_LINE2
243
-          u8g.drawStr(txt1X, u8g.getHeight() - DOG_CHAR_HEIGHT, STRING_SPLASH_LINE1);
264
+          u8g.drawStr(txt1X, u8g.getHeight() - (DOG_CHAR_HEIGHT), STRING_SPLASH_LINE1);
244 265
         #else
245
-          int txt2X = (u8g.getWidth() - (sizeof(STRING_SPLASH_LINE2) - 1) * DOG_CHAR_WIDTH) / 2;
246
-          u8g.drawStr(txt1X, u8g.getHeight() - DOG_CHAR_HEIGHT * 3 / 2, STRING_SPLASH_LINE1);
247
-          u8g.drawStr(txt2X, u8g.getHeight() - DOG_CHAR_HEIGHT * 1 / 2, STRING_SPLASH_LINE2);
266
+          int txt2X = (u8g.getWidth() - (sizeof(STRING_SPLASH_LINE2) - 1) * (DOG_CHAR_WIDTH)) / 2;
267
+          u8g.drawStr(txt1X, u8g.getHeight() - (DOG_CHAR_HEIGHT) * 3 / 2, STRING_SPLASH_LINE1);
268
+          u8g.drawStr(txt2X, u8g.getHeight() - (DOG_CHAR_HEIGHT) * 1 / 2, STRING_SPLASH_LINE2);
248 269
         #endif
249 270
       }
250 271
     } while (u8g.nextPage());
@@ -270,7 +291,7 @@ static void _draw_heater_status(int x, int heater) {
270 291
   lcd_print(itostr3(int(heater >= 0 ? degHotend(heater) : degBed()) + 0.5));
271 292
 
272 293
   lcd_printPGM(PSTR(LCD_STR_DEGREE " "));
273
-  if (!isHeatingHotend(0)) {
294
+  if (heater >= 0 ? !isHeatingHotend(heater) : !isHeatingBed()) {
274 295
     u8g.drawBox(x+7,y,2,2);
275 296
   }
276 297
   else {
@@ -283,30 +304,39 @@ static void _draw_heater_status(int x, int heater) {
283 304
 static void lcd_implementation_status_screen() {
284 305
   u8g.setColorIndex(1); // black on white
285 306
 
307
+  bool blink = lcd_blink();
308
+
286 309
   // Symbols menu graphics, animated fan
287
-  u8g.drawBitmapP(9,1,STATUS_SCREENBYTEWIDTH,STATUS_SCREENHEIGHT, (blink % 2) && fanSpeed ? status_screen0_bmp : status_screen1_bmp);
310
+  u8g.drawBitmapP(9, 1, STATUS_SCREENBYTEWIDTH, STATUS_SCREENHEIGHT,
311
+    #if HAS_FAN0
312
+      blink && fanSpeeds[0] ? status_screen0_bmp : status_screen1_bmp
313
+    #else
314
+      status_screen0_bmp
315
+    #endif
316
+  );
288 317
 
289 318
   #if ENABLED(SDSUPPORT)
290 319
     // SD Card Symbol
291
-    u8g.drawBox(42, 42 - TALL_FONT_CORRECTION, 8, 7);
292
-    u8g.drawBox(50, 44 - TALL_FONT_CORRECTION, 2, 5);
293
-    u8g.drawFrame(42, 49 - TALL_FONT_CORRECTION, 10, 4);
294
-    u8g.drawPixel(50, 43 - TALL_FONT_CORRECTION);
320
+    u8g.drawBox(42, 42 - (TALL_FONT_CORRECTION), 8, 7);
321
+    u8g.drawBox(50, 44 - (TALL_FONT_CORRECTION), 2, 5);
322
+    u8g.drawFrame(42, 49 - (TALL_FONT_CORRECTION), 10, 4);
323
+    u8g.drawPixel(50, 43 - (TALL_FONT_CORRECTION));
295 324
 
296 325
     // Progress bar frame
297
-    u8g.drawFrame(54, 49, 73, 4 - TALL_FONT_CORRECTION);
326
+    u8g.drawFrame(54, 49, 73, 4 - (TALL_FONT_CORRECTION));
298 327
 
299 328
     // SD Card Progress bar and clock
300 329
     lcd_setFont(FONT_STATUSMENU);
301 330
 
302 331
     if (IS_SD_PRINTING) {
303 332
       // Progress bar solid part
304
-      u8g.drawBox(55, 50, (unsigned int)(71.f * card.percentDone() / 100.f), 2 - TALL_FONT_CORRECTION);
333
+      u8g.drawBox(55, 50, (unsigned int)(71.f * card.percentDone() / 100.f), 2 - (TALL_FONT_CORRECTION));
305 334
     }
306 335
 
307 336
     u8g.setPrintPos(80,48);
308 337
     if (print_job_start_ms != 0) {
309
-      uint16_t time = (millis() - print_job_start_ms) / 60000;
338
+      uint16_t time = (((print_job_stop_ms > print_job_start_ms)
339
+                       ? print_job_stop_ms : millis()) - print_job_start_ms) / 60000;
310 340
       lcd_print(itostr2(time/60));
311 341
       lcd_print(':');
312 342
       lcd_print(itostr2(time%60));
@@ -325,8 +355,8 @@ static void lcd_implementation_status_screen() {
325 355
   // Fan
326 356
   lcd_setFont(FONT_STATUSMENU);
327 357
   u8g.setPrintPos(104, 27);
328
-  #if HAS_FAN
329
-    int per = ((fanSpeed + 1) * 100) / 256;
358
+  #if HAS_FAN0
359
+    int per = ((fanSpeeds[0] + 1) * 100) / 256;
330 360
     if (per) {
331 361
       lcd_print(itostr3(per));
332 362
       lcd_print('%');
@@ -338,6 +368,9 @@ static void lcd_implementation_status_screen() {
338 368
     }
339 369
 
340 370
   // X, Y, Z-Coordinates
371
+  // Before homing the axis letters are blinking 'X' <-> '?'.
372
+  // When axis is homed but axis_known_position is false the axis letters are blinking 'X' <-> ' '.
373
+  // When everything is ok you see a constant 'X'.
341 374
   #define XYZ_BASELINE 38
342 375
   lcd_setFont(FONT_STATUSMENU);
343 376
 
@@ -348,32 +381,64 @@ static void lcd_implementation_status_screen() {
348 381
   #endif
349 382
   u8g.setColorIndex(0); // white on black
350 383
   u8g.setPrintPos(2, XYZ_BASELINE);
351
-  lcd_print('X');
384
+  if (blink)
385
+    lcd_printPGM(PSTR(MSG_X));
386
+  else {
387
+    if (!axis_homed[X_AXIS])
388
+      lcd_printPGM(PSTR("?"));
389
+    else {
390
+      #if DISABLED(DISABLE_REDUCED_ACCURACY_WARNING)
391
+        if (!axis_known_position[X_AXIS])
392
+          lcd_printPGM(PSTR(" "));
393
+        else
394
+      #endif
395
+      lcd_printPGM(PSTR(MSG_X));
396
+    }
397
+  }
352 398
   u8g.drawPixel(8, XYZ_BASELINE - 5);
353 399
   u8g.drawPixel(8, XYZ_BASELINE - 3);
354 400
   u8g.setPrintPos(10, XYZ_BASELINE);
355
-  if (axis_known_position[X_AXIS])
356
-    lcd_print(ftostr31ns(current_position[X_AXIS]));
357
-  else
358
-    lcd_printPGM(PSTR("---"));
401
+  lcd_print(ftostr31ns(current_position[X_AXIS]));
402
+
359 403
   u8g.setPrintPos(43, XYZ_BASELINE);
360
-  lcd_print('Y');
404
+  if (blink)
405
+    lcd_printPGM(PSTR(MSG_Y));
406
+  else {
407
+    if (!axis_homed[Y_AXIS])
408
+      lcd_printPGM(PSTR("?"));
409
+    else {
410
+      #if DISABLED(DISABLE_REDUCED_ACCURACY_WARNING)
411
+        if (!axis_known_position[Y_AXIS])
412
+          lcd_printPGM(PSTR(" "));
413
+        else
414
+      #endif
415
+      lcd_printPGM(PSTR(MSG_Y));
416
+    }
417
+  }
361 418
   u8g.drawPixel(49, XYZ_BASELINE - 5);
362 419
   u8g.drawPixel(49, XYZ_BASELINE - 3);
363 420
   u8g.setPrintPos(51, XYZ_BASELINE);
364
-  if (axis_known_position[Y_AXIS])
365
-    lcd_print(ftostr31ns(current_position[Y_AXIS]));
366
-  else
367
-    lcd_printPGM(PSTR("---"));
421
+  lcd_print(ftostr31ns(current_position[Y_AXIS]));
422
+
368 423
   u8g.setPrintPos(83, XYZ_BASELINE);
369
-  lcd_print('Z');
424
+  if (blink)
425
+    lcd_printPGM(PSTR(MSG_Z));
426
+  else {
427
+    if (!axis_homed[Z_AXIS])
428
+      lcd_printPGM(PSTR("?"));
429
+    else {
430
+      #if DISABLED(DISABLE_REDUCED_ACCURACY_WARNING)
431
+        if (!axis_known_position[Z_AXIS])
432
+          lcd_printPGM(PSTR(" "));
433
+        else
434
+      #endif
435
+      lcd_printPGM(PSTR(MSG_Z));
436
+    }
437
+  }
370 438
   u8g.drawPixel(89, XYZ_BASELINE - 5);
371 439
   u8g.drawPixel(89, XYZ_BASELINE - 3);
372 440
   u8g.setPrintPos(91, XYZ_BASELINE);
373
-  if (axis_known_position[Z_AXIS])
374
-    lcd_print(ftostr32sp(current_position[Z_AXIS]));
375
-  else
376
-    lcd_printPGM(PSTR("---.--"));
441
+  lcd_print(ftostr32sp(current_position[Z_AXIS]));
377 442
   u8g.setColorIndex(1); // black on white
378 443
 
379 444
   // Feedrate
@@ -411,13 +476,13 @@ static void lcd_implementation_status_screen() {
411 476
 static void lcd_implementation_mark_as_selected(uint8_t row, bool isSelected) {
412 477
   if (isSelected) {
413 478
     u8g.setColorIndex(1);  // black on white
414
-    u8g.drawBox(0, row * DOG_CHAR_HEIGHT + 3 - TALL_FONT_CORRECTION, LCD_PIXEL_WIDTH, DOG_CHAR_HEIGHT);
479
+    u8g.drawBox(0, row * (DOG_CHAR_HEIGHT) + 3 - (TALL_FONT_CORRECTION), LCD_PIXEL_WIDTH, DOG_CHAR_HEIGHT);
415 480
     u8g.setColorIndex(0);  // following text must be white on black
416 481
   }
417 482
   else {
418 483
     u8g.setColorIndex(1); // unmarked text is black on white
419 484
   }
420
-  u8g.setPrintPos(START_ROW * DOG_CHAR_WIDTH, (row + 1) * DOG_CHAR_HEIGHT);
485
+  u8g.setPrintPos((START_ROW) * (DOG_CHAR_WIDTH), (row + 1) * (DOG_CHAR_HEIGHT));
421 486
 }
422 487
 
423 488
 static void lcd_implementation_drawmenu_generic(bool isSelected, uint8_t row, const char* pstr, char pre_char, char post_char) {
@@ -431,7 +496,7 @@ static void lcd_implementation_drawmenu_generic(bool isSelected, uint8_t row, co
431 496
     pstr++;
432 497
   }
433 498
   while (n--) lcd_print(' ');
434
-  u8g.setPrintPos(LCD_PIXEL_WIDTH - DOG_CHAR_WIDTH, (row + 1) * DOG_CHAR_HEIGHT);
499
+  u8g.setPrintPos(LCD_PIXEL_WIDTH - (DOG_CHAR_WIDTH), (row + 1) * (DOG_CHAR_HEIGHT));
435 500
   lcd_print(post_char);
436 501
   lcd_print(' ');
437 502
 }
@@ -449,7 +514,7 @@ static void _drawmenu_setting_edit_generic(bool isSelected, uint8_t row, const c
449 514
   }
450 515
   lcd_print(':');
451 516
   while (n--) lcd_print(' ');
452
-  u8g.setPrintPos(LCD_PIXEL_WIDTH - DOG_CHAR_WIDTH * vallen, (row + 1) * DOG_CHAR_HEIGHT);
517
+  u8g.setPrintPos(LCD_PIXEL_WIDTH - (DOG_CHAR_WIDTH) * vallen, (row + 1) * (DOG_CHAR_HEIGHT));
453 518
   if (pgm)  lcd_printPGM(data);  else  lcd_print((char*)data);
454 519
 }
455 520
 
@@ -477,7 +542,7 @@ static void _drawmenu_setting_edit_generic(bool isSelected, uint8_t row, const c
477 542
 #define lcd_implementation_drawmenu_setting_edit_callback_long5(sel, row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ftostr5(*(data)))
478 543
 #define lcd_implementation_drawmenu_setting_edit_callback_bool(sel, row, pstr, pstr2, data, callback) lcd_implementation_drawmenu_setting_edit_generic_P(sel, row, pstr, (*(data))?PSTR(MSG_ON):PSTR(MSG_OFF))
479 544
 
480
-void lcd_implementation_drawedit(const char* pstr, char* value) {
545
+void lcd_implementation_drawedit(const char* pstr, const char* value) {
481 546
   uint8_t rows = 1;
482 547
   uint8_t lcd_width = LCD_WIDTH, char_width = DOG_CHAR_WIDTH;
483 548
   uint8_t vallen = lcd_strlen(value);
@@ -496,14 +561,16 @@ void lcd_implementation_drawedit(const char* pstr, char* value) {
496 561
 
497 562
   if (lcd_strlen_P(pstr) > LCD_WIDTH - 2 - vallen) rows = 2;
498 563
 
499
-  const float kHalfChar = DOG_CHAR_HEIGHT_EDIT / 2;
564
+  const float kHalfChar = (DOG_CHAR_HEIGHT_EDIT) / 2;
500 565
   float rowHeight = u8g.getHeight() / (rows + 1); // 1/(rows+1) = 1/2 or 1/3
501 566
 
502 567
   u8g.setPrintPos(0, rowHeight + kHalfChar);
503 568
   lcd_printPGM(pstr);
504
-  lcd_print(':');
505
-  u8g.setPrintPos((lcd_width - 1 - vallen) * char_width, rows * rowHeight + kHalfChar);
506
-  lcd_print(value);
569
+  if (value != NULL) {
570
+    lcd_print(':');
571
+    u8g.setPrintPos((lcd_width - 1 - vallen) * char_width, rows * rowHeight + kHalfChar);
572
+    lcd_print(value);
573
+  }
507 574
 }
508 575
 
509 576
 #if ENABLED(SDSUPPORT)
@@ -532,7 +599,7 @@ void lcd_implementation_drawedit(const char* pstr, char* value) {
532 599
 
533 600
 #endif //SDSUPPORT
534 601
 
535
-#define lcd_implementation_drawmenu_back(sel, row, pstr, data) lcd_implementation_drawmenu_generic(sel, row, pstr, LCD_STR_UPLEVEL[0], LCD_STR_UPLEVEL[0])
602
+#define lcd_implementation_drawmenu_back(sel, row, pstr) lcd_implementation_drawmenu_generic(sel, row, pstr, LCD_STR_UPLEVEL[0], LCD_STR_UPLEVEL[0])
536 603
 #define lcd_implementation_drawmenu_submenu(sel, row, pstr, data) lcd_implementation_drawmenu_generic(sel, row, pstr, '>', LCD_STR_ARROW_RIGHT[0])
537 604
 #define lcd_implementation_drawmenu_gcode(sel, row, pstr, gcode) lcd_implementation_drawmenu_generic(sel, row, pstr, '>', ' ')
538 605
 #define lcd_implementation_drawmenu_function(sel, row, pstr, data) lcd_implementation_drawmenu_generic(sel, row, pstr, '>', ' ')

+ 212
- 114
Marlin/example_configurations/Felix/Configuration.h View File

@@ -1,3 +1,40 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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
+/**
24
+ * Configuration.h
25
+ *
26
+ * Basic settings such as:
27
+ *
28
+ * - Type of electronics
29
+ * - Type of temperature sensor
30
+ * - Printer geometry
31
+ * - Endstop configuration
32
+ * - LCD controller
33
+ * - Extra features
34
+ *
35
+ * Advanced settings can be found in Configuration_adv.h
36
+ *
37
+ */
1 38
 #ifndef CONFIGURATION_H
2 39
 #define CONFIGURATION_H
3 40
 
@@ -7,8 +44,10 @@
7 44
 //===========================================================================
8 45
 //============================= Getting Started =============================
9 46
 //===========================================================================
10
-/*
11
-Here are some standard links for getting your machine calibrated:
47
+
48
+/**
49
+ * Here are some standard links for getting your machine calibrated:
50
+ *
12 51
  * http://reprap.org/wiki/Calibration
13 52
  * http://youtu.be/wAL9d7FgInk
14 53
  * http://calculator.josefprusa.cz
@@ -16,11 +55,7 @@ Here are some standard links for getting your machine calibrated:
16 55
  * http://www.thingiverse.com/thing:5573
17 56
  * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap
18 57
  * http://www.thingiverse.com/thing:298812
19
-*/
20
-
21
-// This configuration file contains the basic settings.
22
-// Advanced settings can be found in Configuration_adv.h
23
-// BASIC SETTINGS: select your board type, temperature sensor type, axis scaling, and endstop configuration
58
+ */
24 59
 
25 60
 //===========================================================================
26 61
 //============================= DELTA Printer ===============================
@@ -110,6 +145,7 @@ Here are some standard links for getting your machine calibrated:
110 145
 //--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table
111 146
 //
112 147
 //// Temperature sensor settings:
148
+// -3 is thermocouple with MAX31855 (only for sensor 0)
113 149
 // -2 is thermocouple with MAX6675 (only for sensor 0)
114 150
 // -1 is thermocouple with AD595
115 151
 // 0 is not used
@@ -129,6 +165,7 @@ Here are some standard links for getting your machine calibrated:
129 165
 // 13 is 100k Hisens 3950  1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
130 166
 // 20 is the PT100 circuit found in the Ultimainboard V2.x
131 167
 // 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
168
+// 70 is the 100K thermistor found in the bq Hephestos 2
132 169
 //
133 170
 //    1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k
134 171
 //                          (but gives greater accuracy and more stable PID)
@@ -144,7 +181,7 @@ Here are some standard links for getting your machine calibrated:
144 181
 //     Use it for Testing or Development purposes. NEVER for production machine.
145 182
 //#define DUMMY_THERMISTOR_998_VALUE 25
146 183
 //#define DUMMY_THERMISTOR_999_VALUE 100
147
-// :{ '0': "Not used", '4': "10k !! do not use for a hotend. Bad resolution at high temp. !!", '1': "100k / 4.7k - EPCOS", '51': "100k / 1k - EPCOS", '6': "100k / 4.7k EPCOS - Not as accurate as Table 1", '5': "100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '7': "100k / 4.7k Honeywell 135-104LAG-J01", '71': "100k / 4.7k Honeywell 135-104LAF-J01", '8': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9': "100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10': "100k / 4.7k RS 198-961", '11': "100k / 4.7k beta 3950 1%", '12': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13': "100k Hisens 3950  1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '60': "100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '55': "100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '2': "200k / 4.7k - ATC Semitec 204GT-2", '52': "200k / 1k - ATC Semitec 204GT-2", '-2': "Thermocouple + MAX6675 (only for sensor 0)", '-1': "Thermocouple + AD595", '3': "Mendel-parts / 4.7k", '1047': "Pt1000 / 4.7k", '1010': "Pt1000 / 1k (non standard)", '20': "PT100 (Ultimainboard V2.x)", '147': "Pt100 / 4.7k", '110': "Pt100 / 1k (non-standard)", '998': "Dummy 1", '999': "Dummy 2" }
184
+// :{ '0': "Not used", '4': "10k !! do not use for a hotend. Bad resolution at high temp. !!", '1': "100k / 4.7k - EPCOS", '51': "100k / 1k - EPCOS", '6': "100k / 4.7k EPCOS - Not as accurate as Table 1", '5': "100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '7': "100k / 4.7k Honeywell 135-104LAG-J01", '71': "100k / 4.7k Honeywell 135-104LAF-J01", '8': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9': "100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10': "100k / 4.7k RS 198-961", '11': "100k / 4.7k beta 3950 1%", '12': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13': "100k Hisens 3950  1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '60': "100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '55': "100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '2': "200k / 4.7k - ATC Semitec 204GT-2", '52': "200k / 1k - ATC Semitec 204GT-2", '-3': "Thermocouple + MAX31855 (only for sensor 0)", '-2': "Thermocouple + MAX6675 (only for sensor 0)", '-1': "Thermocouple + AD595", '3': "Mendel-parts / 4.7k", '1047': "Pt1000 / 4.7k", '1010': "Pt1000 / 1k (non standard)", '20': "PT100 (Ultimainboard V2.x)", '147': "Pt100 / 4.7k", '110': "Pt100 / 1k (non-standard)", '998': "Dummy 1", '999': "Dummy 2" }
148 185
 #define TEMP_SENSOR_0 1
149 186
 #define TEMP_SENSOR_1 0
150 187
 #define TEMP_SENSOR_2 0
@@ -178,14 +215,9 @@ Here are some standard links for getting your machine calibrated:
178 215
 #define HEATER_3_MAXTEMP 275
179 216
 #define BED_MAXTEMP 150
180 217
 
181
-// If your bed has low resistance e.g. .6 ohm and throws the fuse you can duty cycle it to reduce the
182
-// average current. The value should be an integer and the heat bed will be turned on for 1 interval of
183
-// HEATER_BED_DUTY_CYCLE_DIVIDER intervals.
184
-//#define HEATER_BED_DUTY_CYCLE_DIVIDER 4
185
-
186 218
 // If you want the M105 heater power reported in watts, define the BED_WATTS, and (shared for all extruders) EXTRUDER_WATTS
187
-//#define EXTRUDER_WATTS (12.0*12.0/6.7) //  P=I^2/R
188
-//#define BED_WATTS (12.0*12.0/1.1)      // P=I^2/R
219
+//#define EXTRUDER_WATTS (12.0*12.0/6.7) // P=U^2/R
220
+//#define BED_WATTS (12.0*12.0/1.1)      // P=U^2/R
189 221
 
190 222
 //===========================================================================
191 223
 //============================= PID Settings ================================
@@ -197,6 +229,7 @@ Here are some standard links for getting your machine calibrated:
197 229
 #define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
198 230
 #define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
199 231
 #if ENABLED(PIDTEMP)
232
+  //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
200 233
   //#define PID_DEBUG // Sends debug data to the serial port.
201 234
   //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
202 235
   //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -236,10 +269,10 @@ Here are some standard links for getting your machine calibrated:
236 269
 // so you shouldn't use it unless you are OK with PWM on your bed.  (see the comment on enabling PIDTEMPBED)
237 270
 #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
238 271
 
239
-//#define PID_BED_DEBUG // Sends debug data to the serial port.
240
-
241 272
 #if ENABLED(PIDTEMPBED)
242 273
 
274
+  //#define PID_BED_DEBUG // Sends debug data to the serial port.
275
+
243 276
   #define PID_BED_INTEGRAL_DRIVE_MAX MAX_BED_POWER //limit for the integral term
244 277
 
245 278
   // Felix Foil Heater
@@ -266,16 +299,15 @@ Here are some standard links for getting your machine calibrated:
266 299
 //===========================================================================
267 300
 
268 301
 /**
269
- * Thermal Runaway Protection protects your printer from damage and fire if a
302
+ * Thermal Protection protects your printer from damage and fire if a
270 303
  * thermistor falls out or temperature sensors fail in any way.
271 304
  *
272 305
  * The issue: If a thermistor falls out or a temperature sensor fails,
273 306
  * Marlin can no longer sense the actual temperature. Since a disconnected
274 307
  * thermistor reads as a low temperature, the firmware will keep the heater on.
275 308
  *
276
- * The solution: Once the temperature reaches the target, start observing.
277
- * If the temperature stays too far below the target (hysteresis) for too long,
278
- * the firmware will halt as a safety precaution.
309
+ * If you get "Thermal Runaway" or "Heating failed" errors the
310
+ * details can be tuned in Configuration_adv.h
279 311
  */
280 312
 
281 313
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
@@ -296,8 +328,22 @@ Here are some standard links for getting your machine calibrated:
296 328
 // Enable this option for Toshiba steppers
297 329
 //#define CONFIG_STEPPERS_TOSHIBA
298 330
 
331
+//===========================================================================
332
+//============================== Endstop Settings ===========================
333
+//===========================================================================
334
+
299 335
 // @section homing
300 336
 
337
+// Specify here all the endstop connectors that are connected to any endstop or probe.
338
+// Almost all printers will be using one per axis. Probes will use one or more of the
339
+// extra connectors. Leave undefined any used for non-endstop and non-probe purposes.
340
+#define USE_XMIN_PLUG
341
+#define USE_YMIN_PLUG
342
+#define USE_ZMIN_PLUG
343
+//#define USE_XMAX_PLUG
344
+//#define USE_YMAX_PLUG
345
+//#define USE_ZMAX_PLUG
346
+
301 347
 // coarse Endstop Settings
302 348
 #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
303 349
 
@@ -320,13 +366,53 @@ const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
320 366
 const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
321 367
 const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
322 368
 const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
323
-#define DISABLE_MAX_ENDSTOPS
324
-//#define DISABLE_MIN_ENDSTOPS
325 369
 
326
-// If you want to enable the Z probe pin, but disable its use, uncomment the line below.
327
-// This only affects a Z probe endstop if you have separate Z min endstop as well and have
328
-// activated Z_MIN_PROBE_ENDSTOP below. If you are using the Z Min endstop on your Z probe,
329
-// this has no effect.
370
+//===========================================================================
371
+//============================= Z Probe Options =============================
372
+//===========================================================================
373
+
374
+// Enable Z_MIN_PROBE_ENDSTOP to use _both_ a Z Probe and a Z-min-endstop on the same machine.
375
+// With this option the Z_MIN_PROBE_PIN will only be used for probing, never for homing.
376
+//
377
+// *** PLEASE READ ALL INSTRUCTIONS BELOW FOR SAFETY! ***
378
+//
379
+// To continue using the Z-min-endstop for homing, be sure to disable Z_SAFE_HOMING.
380
+// Example: To park the head outside the bed area when homing with G28.
381
+//
382
+// To use a separate Z probe, your board must define a Z_MIN_PROBE_PIN.
383
+//
384
+// For a servo-based Z probe, you must set up servo support below, including
385
+// NUM_SERVOS, Z_ENDSTOP_SERVO_NR and SERVO_ENDSTOP_ANGLES.
386
+//
387
+// - RAMPS 1.3/1.4 boards may be able to use the 5V, GND, and Aux4->D32 pin.
388
+// - Use 5V for powered (usu. inductive) sensors.
389
+// - Otherwise connect:
390
+//   - normally-closed switches to GND and D32.
391
+//   - normally-open switches to 5V and D32.
392
+//
393
+// Normally-closed switches are advised and are the default.
394
+//
395
+// The Z_MIN_PROBE_PIN sets the Arduino pin to use. (See your board's pins file.)
396
+// Since the RAMPS Aux4->D32 pin maps directly to the Arduino D32 pin, D32 is the
397
+// default pin for all RAMPS-based boards. Some other boards map differently.
398
+// To set or change the pin for your board, edit the appropriate pins_XXXXX.h file.
399
+//
400
+// WARNING:
401
+// Setting the wrong pin may have unexpected and potentially disastrous consequences.
402
+// Use with caution and do your homework.
403
+//
404
+//#define Z_MIN_PROBE_ENDSTOP
405
+
406
+// Enable Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN to use the Z_MIN_PIN for your Z_MIN_PROBE.
407
+// The Z_MIN_PIN will then be used for both Z-homing and probing.
408
+#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
409
+
410
+// To use a probe you must enable one of the two options above!
411
+
412
+// This option disables the use of the Z_MIN_PROBE_PIN
413
+// To enable the Z probe pin but disable its use, uncomment the line below. This only affects a
414
+// Z probe switch if you have a separate Z min endstop also and have activated Z_MIN_PROBE_ENDSTOP above.
415
+// If you're using the Z MIN endstop connector for your Z probe, this has no effect.
330 416
 //#define DISABLE_Z_MIN_PROBE_ENDSTOP
331 417
 
332 418
 // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
@@ -336,11 +422,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
336 422
 #define Z_ENABLE_ON 0
337 423
 #define E_ENABLE_ON 0 // For all extruders
338 424
 
339
-// Disables axis when it's not being used.
425
+// Disables axis stepper immediately when it's not being used.
340 426
 // WARNING: When motors turn off there is a chance of losing position accuracy!
341 427
 #define DISABLE_X false
342 428
 #define DISABLE_Y false
343 429
 #define DISABLE_Z false
430
+// Warn on display about possibly reduced accuracy
431
+//#define DISABLE_REDUCED_ACCURACY_WARNING
344 432
 
345 433
 // @section extruder
346 434
 
@@ -363,6 +451,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
363 451
 #define INVERT_E3_DIR false
364 452
 
365 453
 // @section homing
454
+//#define MIN_Z_HEIGHT_FOR_HOMING 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
455
+                                    // Be sure you have this distance over your Z_MAX_POS in case.
366 456
 
367 457
 // ENDSTOP SETTINGS:
368 458
 // Sets direction of endstops when homing; 1=MAX, -1=MIN
@@ -398,24 +488,26 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
398 488
 #endif
399 489
 
400 490
 //===========================================================================
401
-//=========================== Manual Bed Leveling ===========================
491
+//============================ Mesh Bed Leveling ============================
402 492
 //===========================================================================
403 493
 
404
-//#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
405 494
 //#define MESH_BED_LEVELING    // Enable mesh bed leveling.
406 495
 
407
-#if ENABLED(MANUAL_BED_LEVELING)
408
-  #define MBL_Z_STEP 0.025  // Step size while manually probing Z axis.
409
-#endif  // MANUAL_BED_LEVELING
410
-
411 496
 #if ENABLED(MESH_BED_LEVELING)
412 497
   #define MESH_MIN_X 10
413
-  #define MESH_MAX_X (X_MAX_POS - MESH_MIN_X)
498
+  #define MESH_MAX_X (X_MAX_POS - (MESH_MIN_X))
414 499
   #define MESH_MIN_Y 10
415
-  #define MESH_MAX_Y (Y_MAX_POS - MESH_MIN_Y)
500
+  #define MESH_MAX_Y (Y_MAX_POS - (MESH_MIN_Y))
416 501
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
417 502
   #define MESH_NUM_Y_POINTS 3
418 503
   #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0.
504
+
505
+  //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
506
+
507
+  #if ENABLED(MANUAL_BED_LEVELING)
508
+    #define MBL_Z_STEP 0.025  // Step size while manually probing Z axis.
509
+  #endif  // MANUAL_BED_LEVELING
510
+
419 511
 #endif  // MESH_BED_LEVELING
420 512
 
421 513
 //===========================================================================
@@ -426,7 +518,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
426 518
 
427 519
 //#define AUTO_BED_LEVELING_FEATURE // Delete the comment to enable (remove // at the start of the line)
428 520
 //#define DEBUG_LEVELING_FEATURE
429
-//#define Z_MIN_PROBE_REPEATABILITY_TEST  // If not commented out, Z-Probe Repeatability test will be included if Auto Bed Leveling is Enabled.
521
+//#define Z_MIN_PROBE_REPEATABILITY_TEST  // If not commented out, Z Probe Repeatability test will be included if Auto Bed Leveling is Enabled.
430 522
 
431 523
 #if ENABLED(AUTO_BED_LEVELING_FEATURE)
432 524
 
@@ -438,7 +530,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
438 530
   //   This mode is preferred because there are more measurements.
439 531
   //
440 532
   // - "3-point" mode
441
-  //   Probe 3 arbitrary points on the bed (that aren't colinear)
533
+  //   Probe 3 arbitrary points on the bed (that aren't collinear)
442 534
   //   You specify the XY coordinates of all 3 points.
443 535
 
444 536
   // Enable this to sample the bed in a grid (least squares solution).
@@ -452,7 +544,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
452 544
     #define FRONT_PROBE_BED_POSITION 20
453 545
     #define BACK_PROBE_BED_POSITION 180
454 546
 
455
-    #define MIN_PROBE_EDGE 10 // The Z probe square sides can be no smaller than this.
547
+    #define MIN_PROBE_EDGE 10 // The Z probe minimum square sides can be no smaller than this.
456 548
 
457 549
     // Set the number of grid points per dimension.
458 550
     // You probably don't need more than 3 (squared=9).
@@ -460,25 +552,37 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
460 552
 
461 553
   #else  // !AUTO_BED_LEVELING_GRID
462 554
 
463
-      // Arbitrary points to probe.
464
-      // A simple cross-product is used to estimate the plane of the bed.
465
-      #define ABL_PROBE_PT_1_X 15
466
-      #define ABL_PROBE_PT_1_Y 180
467
-      #define ABL_PROBE_PT_2_X 15
468
-      #define ABL_PROBE_PT_2_Y 20
469
-      #define ABL_PROBE_PT_3_X 170
470
-      #define ABL_PROBE_PT_3_Y 20
555
+    // Arbitrary points to probe.
556
+    // A simple cross-product is used to estimate the plane of the bed.
557
+    #define ABL_PROBE_PT_1_X 15
558
+    #define ABL_PROBE_PT_1_Y 180
559
+    #define ABL_PROBE_PT_2_X 15
560
+    #define ABL_PROBE_PT_2_Y 20
561
+    #define ABL_PROBE_PT_3_X 170
562
+    #define ABL_PROBE_PT_3_Y 20
471 563
 
472 564
   #endif // AUTO_BED_LEVELING_GRID
473 565
 
474
-  // Offsets to the Z probe relative to the nozzle tip.
566
+  // Z Probe to nozzle (X,Y) offset, relative to (0, 0).
475 567
   // X and Y offsets must be integers.
476
-  #define X_PROBE_OFFSET_FROM_EXTRUDER -25     // Z probe to nozzle X offset: -left  +right
477
-  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29     // Z probe to nozzle Y offset: -front +behind
478
-  #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35  // Z probe to nozzle Z offset: -below (always!)
479
-
480
-  #define Z_RAISE_BEFORE_HOMING 4       // (in mm) Raise Z axis before homing (G28) for Z probe clearance.
481
-                                        // Be sure you have this distance over your Z_MAX_POS in case.
568
+  //
569
+  // In the following example the X and Y offsets are both positive:
570
+  // #define X_PROBE_OFFSET_FROM_EXTRUDER 10
571
+  // #define Y_PROBE_OFFSET_FROM_EXTRUDER 10
572
+  //
573
+  //    +-- BACK ---+
574
+  //    |           |
575
+  //  L |    (+) P  | R <-- probe (20,20)
576
+  //  E |           | I
577
+  //  F | (-) N (+) | G <-- nozzle (10,10)
578
+  //  T |           | H
579
+  //    |    (-)    | T
580
+  //    |           |
581
+  //    O-- FRONT --+
582
+  //  (0,0)
583
+  #define X_PROBE_OFFSET_FROM_EXTRUDER -25     // X offset: -left  [of the nozzle] +right
584
+  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29     // Y offset: -front [of the nozzle] +behind
585
+  #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35  // Z offset: -below [the nozzle] (always negative!)
482 586
 
483 587
   #define XY_TRAVEL_SPEED 8000         // X and Y axis travel speed between probes, in mm/min.
484 588
 
@@ -486,16 +590,29 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
486 590
   #define Z_RAISE_BETWEEN_PROBINGS 5  // How much the Z axis will be raised when traveling from between next probing points.
487 591
   #define Z_RAISE_AFTER_PROBING 15    // How much the Z axis will be raised after the last probing point.
488 592
 
489
-//#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" // These commands will be executed in the end of G29 routine.
490
-                                                                            // Useful to retract a deployable Z probe.
593
+  //#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" // These commands will be executed in the end of G29 routine.
594
+                                                                             // Useful to retract a deployable Z probe.
595
+
596
+  // Probes are sensors/switches that need to be activated before they can be used
597
+  // and deactivated after the use.
598
+  // Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, ... . You have to activate one of these for the AUTO_BED_LEVELING_FEATURE
599
+
600
+  // A fix mounted probe, like the normal inductive probe, must be deactivated to go below Z_PROBE_OFFSET_FROM_EXTRUDER
601
+  // when the hardware endstops are active.
602
+  //#define FIX_MOUNTED_PROBE
491 603
 
492
-  //#define Z_PROBE_SLED // Turn on if you have a Z probe mounted on a sled like those designed by Charles Bell.
604
+  // A Servo Probe can be defined in the servo section below.
605
+
606
+  // An Allen Key Probe is currently predefined only in the delta example configurations.
607
+
608
+  //#define Z_PROBE_SLED // Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
493 609
   //#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
494 610
 
495
-// If you have enabled the bed auto leveling and are using the same Z probe for Z homing,
496
-// it is highly recommended you let this Z_SAFE_HOMING enabled!!!
611
+  // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing,
612
+  // it is highly recommended you leave Z_SAFE_HOMING enabled!
497 613
 
498
-  #define Z_SAFE_HOMING   // This feature is meant to avoid Z homing with Z probe outside the bed area.
614
+  #define Z_SAFE_HOMING   // Use the z-min-probe for homing to z-min - not the z-min-endstop.
615
+                          // This feature is meant to avoid Z homing with Z probe outside the bed area.
499 616
                           // When defined, it will:
500 617
                           // - Allow Z homing only after X and Y homing AND stepper drivers still enabled.
501 618
                           // - If stepper drivers timeout, it will need X and Y homing again before Z homing.
@@ -509,37 +626,6 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
509 626
 
510 627
   #endif
511 628
 
512
-  // Support for a dedicated Z probe endstop separate from the Z min endstop.
513
-  // If you would like to use both a Z probe and a Z min endstop together,
514
-  // uncomment #define Z_MIN_PROBE_ENDSTOP and read the instructions below.
515
-  // If you still want to use the Z min endstop for homing, disable Z_SAFE_HOMING above.
516
-  // Example: To park the head outside the bed area when homing with G28.
517
-  //
518
-  // WARNING:
519
-  // The Z min endstop will need to set properly as it would without a Z probe
520
-  // to prevent head crashes and premature stopping during a print.
521
-  //
522
-  // To use a separate Z probe endstop, you must have a Z_MIN_PROBE_PIN
523
-  // defined in the pins_XXXXX.h file for your control board.
524
-  // If you are using a servo based Z probe, you will need to enable NUM_SERVOS,
525
-  // Z_ENDSTOP_SERVO_NR and SERVO_ENDSTOP_ANGLES in the R/C SERVO support below.
526
-  // RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin
527
-  // in the Aux 4 section of the RAMPS board. Use 5V for powered sensors,
528
-  // otherwise connect to ground and D32 for normally closed configuration
529
-  // and 5V and D32 for normally open configurations.
530
-  // Normally closed configuration is advised and assumed.
531
-  // The D32 pin in Aux 4 on RAMPS maps to the Arduino D32 pin.
532
-  // Z_MIN_PROBE_PIN is setting the pin to use on the Arduino.
533
-  // Since the D32 pin on the RAMPS maps to D32 on Arduino, this works.
534
-  // D32 is currently selected in the RAMPS 1.3/1.4 pin file.
535
-  // All other boards will need changes to the respective pins_XXXXX.h file.
536
-  //
537
-  // WARNING:
538
-  // Setting the wrong pin may have unexpected and potentially disastrous outcomes.
539
-  // Use with caution and do your homework.
540
-  //
541
-  //#define Z_MIN_PROBE_ENDSTOP
542
-
543 629
 #endif // AUTO_BED_LEVELING_FEATURE
544 630
 
545 631
 
@@ -571,10 +657,10 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
571 657
 // default steps per unit for Felix 2.0/3.0: 0.00249mm x/y rounding error with 3mm pitch HTD belt and 14 tooth pulleys. 0 z error.
572 658
 #define DEFAULT_AXIS_STEPS_PER_UNIT   {76.190476, 76.190476, 1600, 164}
573 659
 #define DEFAULT_MAX_FEEDRATE          {500, 500, 5, 25}    // (mm/sec)
574
-#define DEFAULT_MAX_ACCELERATION      {5000,5000,100,80000}    // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for skeinforge 40+, for older versions raise them a lot.
660
+#define DEFAULT_MAX_ACCELERATION      {5000,5000,100,80000}    // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for Skeinforge 40+, for older versions raise them a lot.
575 661
 
576 662
 #define DEFAULT_ACCELERATION          1750 //1500    // X, Y, Z and E max acceleration in mm/s^2 for printing moves
577
-#define DEFAULT_RETRACT_ACCELERATION  5000 // X, Y, Z and E max acceleration in mm/s^2 for r retracts
663
+#define DEFAULT_RETRACT_ACCELERATION  5000 // E acceleration in mm/s^2 for retracts
578 664
 #define DEFAULT_TRAVEL_ACCELERATION   3000 // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves
579 665
 
580 666
 // The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously)
@@ -615,6 +701,14 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
615 701
 #endif
616 702
 
617 703
 //
704
+// Host Keepalive
705
+//
706
+// By default Marlin will send a busy status message to the host
707
+// every 10 seconds when it can't accept commands.
708
+//
709
+//#define DISABLE_HOST_KEEPALIVE // Enable this option if your host doesn't like keepalive messages.
710
+
711
+//
618 712
 // M100 Free Memory Watcher
619 713
 //
620 714
 //#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
@@ -634,13 +728,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
634 728
 // @section lcd
635 729
 
636 730
 // Define your display language below. Replace (en) with your language code and uncomment.
637
-// en, pl, fr, de, es, ru, bg, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, cn, test
731
+// en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8, fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test
638 732
 // See also language.h
639 733
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
640 734
 
641 735
 // Choose ONE of these 3 charsets. This has to match your hardware. Ignored for full graphic display.
642 736
 // To find out what type you have - compile with (test) - upload - click to get the menu. You'll see two typical lines from the upper half of the charset.
643
-// See also documentation/LCDLanguageFont.md
737
+// See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
644 738
   #define DISPLAY_CHARSET_HD44780_JAPAN        // this is the most common hardware
645 739
   //#define DISPLAY_CHARSET_HD44780_WESTERN
646 740
   //#define DISPLAY_CHARSET_HD44780_CYRILLIC
@@ -648,12 +742,12 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
648 742
 //#define ULTRA_LCD  //general LCD support, also 16x2
649 743
 //#define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
650 744
 //#define SDSUPPORT // Enable SD Card Support in Hardware Console
651
-// Changed behaviour! If you need SDSUPPORT uncomment it!
652
-//#define SDSLOW // Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
653
-//#define SDEXTRASLOW // Use even slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
745
+                    // Changed behaviour! If you need SDSUPPORT uncomment it!
746
+//#define SPI_SPEED SPI_HALF_SPEED // (also SPI_QUARTER_SPEED, SPI_EIGHTH_SPEED) Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
654 747
 //#define SD_CHECK_AND_RETRY // Use CRC checks and retries on the SD communication
655 748
 //#define ENCODER_PULSES_PER_STEP 1 // Increase if you have a high resolution encoder
656 749
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
750
+//#define REVERSE_MENU_DIRECTION // When enabled CLOCKWISE moves UP in the LCD menu
657 751
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
658 752
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
659 753
 //#define SPEAKER // The sound device is a speaker - not a buzzer. A buzzer resonates with his own frequency.
@@ -670,13 +764,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
670 764
 
671 765
 // The Panucatt Devices Viki 2.0 and mini Viki with Graphic LCD
672 766
 // http://panucatt.com
673
-// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
767
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
674 768
 //#define VIKI2
675 769
 //#define miniVIKI
676 770
 
677 771
 // This is a new controller currently under development.  https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
678 772
 //
679
-// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
773
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
680 774
 //#define ELB_FULL_GRAPHIC_CONTROLLER
681 775
 //#define SD_DETECT_INVERTED
682 776
 
@@ -691,7 +785,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
691 785
 // The RepRapDiscount FULL GRAPHIC Smart Controller (quadratic white PCB)
692 786
 // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
693 787
 //
694
-// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
788
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
695 789
 //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
696 790
 
697 791
 // The RepRapWorld REPRAPWORLD_KEYPAD v1.1
@@ -714,6 +808,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
714 808
 
715 809
 //#define LCD_I2C_SAINSMART_YWROBOT
716 810
 
811
+//#define LCM1602 // LCM1602 Adapter for 16x2 LCD
812
+
717 813
 // PANELOLU2 LCD with status LEDs, separate encoder and click inputs
718 814
 //
719 815
 // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
@@ -727,7 +823,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
727 823
 //#define LCD_I2C_VIKI
728 824
 
729 825
 // SSD1306 OLED generic display support
730
-// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
826
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
731 827
 //#define U8GLIB_SSD1306
732 828
 
733 829
 // Shift register panels
@@ -739,7 +835,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
739 835
 
740 836
 // @section extras
741 837
 
742
-// Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
838
+// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino
743 839
 #define FAST_PWM_FAN
744 840
 
745 841
 // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
@@ -819,21 +915,23 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
819 915
  * Note may require analog pins to be defined for different motherboards
820 916
  **********************************************************************/
821 917
 // Uncomment below to enable
822
-//#define FILAMENT_SENSOR
823
-
824
-#define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
825
-#define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
918
+//#define FILAMENT_WIDTH_SENSOR
826 919
 
827 920
 #define DEFAULT_NOMINAL_FILAMENT_DIA 3.00  //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software.  Used for sensor reading validation
828
-#define MEASURED_UPPER_LIMIT         3.30  //upper limit factor used for sensor reading validation in mm
829
-#define MEASURED_LOWER_LIMIT         1.90  //lower limit factor for sensor reading validation in mm
830
-#define MAX_MEASUREMENT_DELAY       20     //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM  and lower number saves RAM)
831 921
 
832
-//defines used in the code
833
-#define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially
922
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
923
+  #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
924
+  #define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
925
+
926
+  #define MEASURED_UPPER_LIMIT         3.30  //upper limit factor used for sensor reading validation in mm
927
+  #define MEASURED_LOWER_LIMIT         1.90  //lower limit factor for sensor reading validation in mm
928
+  #define MAX_MEASUREMENT_DELAY       20     //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM  and lower number saves RAM)
834 929
 
835
-//When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status.  Status will appear for 5 sec.
836
-//#define FILAMENT_LCD_DISPLAY
930
+  #define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially
931
+
932
+  //When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status.  Status will appear for 5 sec.
933
+  //#define FILAMENT_LCD_DISPLAY
934
+#endif
837 935
 
838 936
 #include "Configuration_adv.h"
839 937
 #include "thermistortables.h"

+ 258
- 127
Marlin/example_configurations/Felix/Configuration_DUAL.h View File

@@ -1,3 +1,40 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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
+/**
24
+ * Configuration.h
25
+ *
26
+ * Basic settings such as:
27
+ *
28
+ * - Type of electronics
29
+ * - Type of temperature sensor
30
+ * - Printer geometry
31
+ * - Endstop configuration
32
+ * - LCD controller
33
+ * - Extra features
34
+ *
35
+ * Advanced settings can be found in Configuration_adv.h
36
+ *
37
+ */
1 38
 #ifndef CONFIGURATION_H
2 39
 #define CONFIGURATION_H
3 40
 
@@ -7,8 +44,10 @@
7 44
 //===========================================================================
8 45
 //============================= Getting Started =============================
9 46
 //===========================================================================
10
-/*
11
-Here are some standard links for getting your machine calibrated:
47
+
48
+/**
49
+ * Here are some standard links for getting your machine calibrated:
50
+ *
12 51
  * http://reprap.org/wiki/Calibration
13 52
  * http://youtu.be/wAL9d7FgInk
14 53
  * http://calculator.josefprusa.cz
@@ -16,11 +55,7 @@ Here are some standard links for getting your machine calibrated:
16 55
  * http://www.thingiverse.com/thing:5573
17 56
  * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap
18 57
  * http://www.thingiverse.com/thing:298812
19
-*/
20
-
21
-// This configuration file contains the basic settings.
22
-// Advanced settings can be found in Configuration_adv.h
23
-// BASIC SETTINGS: select your board type, temperature sensor type, axis scaling, and endstop configuration
58
+ */
24 59
 
25 60
 //===========================================================================
26 61
 //============================= DELTA Printer ===============================
@@ -61,6 +96,7 @@ Here are some standard links for getting your machine calibrated:
61 96
 #define SERIAL_PORT 0
62 97
 
63 98
 // This determines the communication speed of the printer
99
+// :[2400,9600,19200,38400,57600,115200,250000]
64 100
 #define BAUDRATE 250000
65 101
 
66 102
 // Enable the Bluetooth serial interface on AT90USB devices
@@ -81,17 +117,27 @@ Here are some standard links for getting your machine calibrated:
81 117
 //#define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
82 118
 
83 119
 // This defines the number of extruders
120
+// :[1,2,3,4]
84 121
 #define EXTRUDERS 2
85 122
 
123
+// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
124
+// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).
125
+// For the other hotends it is their distance from the extruder 0 hotend.
126
+//#define EXTRUDER_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis
127
+//#define EXTRUDER_OFFSET_Y {0.0, 5.00}  // (in mm) for each extruder, offset of the hotend on the Y axis
128
+
86 129
 //// The following define selects which power supply you have. Please choose the one that matches your setup
87 130
 // 1 = ATX
88 131
 // 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC)
132
+// :{1:'ATX',2:'X-Box 360'}
89 133
 
90 134
 #define POWER_SUPPLY 1
91 135
 
92 136
 // Define this to have the electronics keep the power supply off on startup. If you don't know what this is leave it.
93 137
 #define PS_DEFAULT_OFF
94 138
 
139
+// @section temperature
140
+
95 141
 //===========================================================================
96 142
 //============================= Thermal Settings ============================
97 143
 //===========================================================================
@@ -99,6 +145,7 @@ Here are some standard links for getting your machine calibrated:
99 145
 //--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table
100 146
 //
101 147
 //// Temperature sensor settings:
148
+// -3 is thermocouple with MAX31855 (only for sensor 0)
102 149
 // -2 is thermocouple with MAX6675 (only for sensor 0)
103 150
 // -1 is thermocouple with AD595
104 151
 // 0 is not used
@@ -118,6 +165,7 @@ Here are some standard links for getting your machine calibrated:
118 165
 // 13 is 100k Hisens 3950  1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
119 166
 // 20 is the PT100 circuit found in the Ultimainboard V2.x
120 167
 // 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
168
+// 70 is the 100K thermistor found in the bq Hephestos 2
121 169
 //
122 170
 //    1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k
123 171
 //                          (but gives greater accuracy and more stable PID)
@@ -133,7 +181,7 @@ Here are some standard links for getting your machine calibrated:
133 181
 //     Use it for Testing or Development purposes. NEVER for production machine.
134 182
 //#define DUMMY_THERMISTOR_998_VALUE 25
135 183
 //#define DUMMY_THERMISTOR_999_VALUE 100
136
-// :{ '0': "Not used", '4': "10k !! do not use for a hotend. Bad resolution at high temp. !!", '1': "100k / 4.7k - EPCOS", '51': "100k / 1k - EPCOS", '6': "100k / 4.7k EPCOS - Not as accurate as Table 1", '5': "100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '7': "100k / 4.7k Honeywell 135-104LAG-J01", '71': "100k / 4.7k Honeywell 135-104LAF-J01", '8': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9': "100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10': "100k / 4.7k RS 198-961", '11': "100k / 4.7k beta 3950 1%", '12': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13': "100k Hisens 3950  1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '60': "100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '55': "100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '2': "200k / 4.7k - ATC Semitec 204GT-2", '52': "200k / 1k - ATC Semitec 204GT-2", '-2': "Thermocouple + MAX6675 (only for sensor 0)", '-1': "Thermocouple + AD595", '3': "Mendel-parts / 4.7k", '1047': "Pt1000 / 4.7k", '1010': "Pt1000 / 1k (non standard)", '20': "PT100 (Ultimainboard V2.x)", '147': "Pt100 / 4.7k", '110': "Pt100 / 1k (non-standard)", '998': "Dummy 1", '999': "Dummy 2" }
184
+// :{ '0': "Not used", '4': "10k !! do not use for a hotend. Bad resolution at high temp. !!", '1': "100k / 4.7k - EPCOS", '51': "100k / 1k - EPCOS", '6': "100k / 4.7k EPCOS - Not as accurate as Table 1", '5': "100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '7': "100k / 4.7k Honeywell 135-104LAG-J01", '71': "100k / 4.7k Honeywell 135-104LAF-J01", '8': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9': "100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10': "100k / 4.7k RS 198-961", '11': "100k / 4.7k beta 3950 1%", '12': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13': "100k Hisens 3950  1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '60': "100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '55': "100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '2': "200k / 4.7k - ATC Semitec 204GT-2", '52': "200k / 1k - ATC Semitec 204GT-2", '-3': "Thermocouple + MAX31855 (only for sensor 0)", '-2': "Thermocouple + MAX6675 (only for sensor 0)", '-1': "Thermocouple + AD595", '3': "Mendel-parts / 4.7k", '1047': "Pt1000 / 4.7k", '1010': "Pt1000 / 1k (non standard)", '20': "PT100 (Ultimainboard V2.x)", '147': "Pt100 / 4.7k", '110': "Pt100 / 1k (non-standard)", '998': "Dummy 1", '999': "Dummy 2" }
137 185
 #define TEMP_SENSOR_0 1
138 186
 #define TEMP_SENSOR_1 1
139 187
 #define TEMP_SENSOR_2 0
@@ -167,14 +215,9 @@ Here are some standard links for getting your machine calibrated:
167 215
 #define HEATER_3_MAXTEMP 275
168 216
 #define BED_MAXTEMP 150
169 217
 
170
-// If your bed has low resistance e.g. .6 ohm and throws the fuse you can duty cycle it to reduce the
171
-// average current. The value should be an integer and the heat bed will be turned on for 1 interval of
172
-// HEATER_BED_DUTY_CYCLE_DIVIDER intervals.
173
-//#define HEATER_BED_DUTY_CYCLE_DIVIDER 4
174
-
175 218
 // If you want the M105 heater power reported in watts, define the BED_WATTS, and (shared for all extruders) EXTRUDER_WATTS
176
-//#define EXTRUDER_WATTS (12.0*12.0/6.7) //  P=I^2/R
177
-//#define BED_WATTS (12.0*12.0/1.1)      // P=I^2/R
219
+//#define EXTRUDER_WATTS (12.0*12.0/6.7) // P=U^2/R
220
+//#define BED_WATTS (12.0*12.0/1.1)      // P=U^2/R
178 221
 
179 222
 //===========================================================================
180 223
 //============================= PID Settings ================================
@@ -186,6 +229,7 @@ Here are some standard links for getting your machine calibrated:
186 229
 #define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
187 230
 #define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
188 231
 #if ENABLED(PIDTEMP)
232
+  //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
189 233
   //#define PID_DEBUG // Sends debug data to the serial port.
190 234
   //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
191 235
   //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -228,14 +272,15 @@ Here are some standard links for getting your machine calibrated:
228 272
 //#define PID_BED_DEBUG // Sends debug data to the serial port.
229 273
 
230 274
 #if ENABLED(PIDTEMPBED)
231
-// Felix Foil Heater
232
-   #define DEFAULT_bedKp 103.37
233
-   #define DEFAULT_bedKi 2.79
234
-   #define DEFAULT_bedKd 956.94
275
+  // Felix Foil Heater
276
+  #define DEFAULT_bedKp 103.37
277
+  #define DEFAULT_bedKi 2.79
278
+  #define DEFAULT_bedKd 956.94
235 279
 
236
-// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
280
+  // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
237 281
 #endif // PIDTEMPBED
238 282
 
283
+// @section extruder
239 284
 
240 285
 //this prevents dangerous Extruder moves, i.e. if the temperature is under the limit
241 286
 //can be software-disabled for whatever purposes by
@@ -251,16 +296,15 @@ Here are some standard links for getting your machine calibrated:
251 296
 //===========================================================================
252 297
 
253 298
 /**
254
- * Thermal Runaway Protection protects your printer from damage and fire if a
299
+ * Thermal Protection protects your printer from damage and fire if a
255 300
  * thermistor falls out or temperature sensors fail in any way.
256 301
  *
257 302
  * The issue: If a thermistor falls out or a temperature sensor fails,
258 303
  * Marlin can no longer sense the actual temperature. Since a disconnected
259 304
  * thermistor reads as a low temperature, the firmware will keep the heater on.
260 305
  *
261
- * The solution: Once the temperature reaches the target, start observing.
262
- * If the temperature stays too far below the target (hysteresis) for too long,
263
- * the firmware will halt as a safety precaution.
306
+ * If you get "Thermal Runaway" or "Heating failed" errors the
307
+ * details can be tuned in Configuration_adv.h
264 308
  */
265 309
 
266 310
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
@@ -281,8 +325,22 @@ Here are some standard links for getting your machine calibrated:
281 325
 // Enable this option for Toshiba steppers
282 326
 //#define CONFIG_STEPPERS_TOSHIBA
283 327
 
328
+//===========================================================================
329
+//============================== Endstop Settings ===========================
330
+//===========================================================================
331
+
284 332
 // @section homing
285 333
 
334
+// Specify here all the endstop connectors that are connected to any endstop or probe.
335
+// Almost all printers will be using one per axis. Probes will use one or more of the
336
+// extra connectors. Leave undefined any used for non-endstop and non-probe purposes.
337
+#define USE_XMIN_PLUG
338
+#define USE_YMIN_PLUG
339
+#define USE_ZMIN_PLUG
340
+//#define USE_XMAX_PLUG
341
+//#define USE_YMAX_PLUG
342
+//#define USE_ZMAX_PLUG
343
+
286 344
 // coarse Endstop Settings
287 345
 #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
288 346
 
@@ -305,40 +363,97 @@ const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
305 363
 const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
306 364
 const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
307 365
 const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
308
-#define DISABLE_MAX_ENDSTOPS
309
-//#define DISABLE_MIN_ENDSTOPS
310 366
 
311
-// If you want to enable the Z probe pin, but disable its use, uncomment the line below.
312
-// This only affects a Z probe endstop if you have separate Z min endstop as well and have
313
-// activated Z_MIN_PROBE_ENDSTOP below. If you are using the Z Min endstop on your Z probe,
314
-// this has no effect.
367
+//===========================================================================
368
+//============================= Z Probe Options =============================
369
+//===========================================================================
370
+
371
+// Enable Z_MIN_PROBE_ENDSTOP to use _both_ a Z Probe and a Z-min-endstop on the same machine.
372
+// With this option the Z_MIN_PROBE_PIN will only be used for probing, never for homing.
373
+//
374
+// *** PLEASE READ ALL INSTRUCTIONS BELOW FOR SAFETY! ***
375
+//
376
+// To continue using the Z-min-endstop for homing, be sure to disable Z_SAFE_HOMING.
377
+// Example: To park the head outside the bed area when homing with G28.
378
+//
379
+// To use a separate Z probe, your board must define a Z_MIN_PROBE_PIN.
380
+//
381
+// For a servo-based Z probe, you must set up servo support below, including
382
+// NUM_SERVOS, Z_ENDSTOP_SERVO_NR and SERVO_ENDSTOP_ANGLES.
383
+//
384
+// - RAMPS 1.3/1.4 boards may be able to use the 5V, GND, and Aux4->D32 pin.
385
+// - Use 5V for powered (usu. inductive) sensors.
386
+// - Otherwise connect:
387
+//   - normally-closed switches to GND and D32.
388
+//   - normally-open switches to 5V and D32.
389
+//
390
+// Normally-closed switches are advised and are the default.
391
+//
392
+// The Z_MIN_PROBE_PIN sets the Arduino pin to use. (See your board's pins file.)
393
+// Since the RAMPS Aux4->D32 pin maps directly to the Arduino D32 pin, D32 is the
394
+// default pin for all RAMPS-based boards. Some other boards map differently.
395
+// To set or change the pin for your board, edit the appropriate pins_XXXXX.h file.
396
+//
397
+// WARNING:
398
+// Setting the wrong pin may have unexpected and potentially disastrous consequences.
399
+// Use with caution and do your homework.
400
+//
401
+//#define Z_MIN_PROBE_ENDSTOP
402
+
403
+// Enable Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN to use the Z_MIN_PIN for your Z_MIN_PROBE.
404
+// The Z_MIN_PIN will then be used for both Z-homing and probing.
405
+#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
406
+
407
+// To use a probe you must enable one of the two options above!
408
+
409
+// This option disables the use of the Z_MIN_PROBE_PIN
410
+// To enable the Z probe pin but disable its use, uncomment the line below. This only affects a
411
+// Z probe switch if you have a separate Z min endstop also and have activated Z_MIN_PROBE_ENDSTOP above.
412
+// If you're using the Z MIN endstop connector for your Z probe, this has no effect.
315 413
 //#define DISABLE_Z_MIN_PROBE_ENDSTOP
316 414
 
317 415
 // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
416
+// :{0:'Low',1:'High'}
318 417
 #define X_ENABLE_ON 0
319 418
 #define Y_ENABLE_ON 0
320 419
 #define Z_ENABLE_ON 0
321 420
 #define E_ENABLE_ON 0 // For all extruders
322 421
 
323
-// Disables axis when it's not being used.
422
+// Disables axis stepper immediately when it's not being used.
324 423
 // WARNING: When motors turn off there is a chance of losing position accuracy!
325 424
 #define DISABLE_X false
326 425
 #define DISABLE_Y false
327 426
 #define DISABLE_Z false
427
+// Warn on display about possibly reduced accuracy
428
+//#define DISABLE_REDUCED_ACCURACY_WARNING
429
+
430
+// @section extruder
431
+
328 432
 #define DISABLE_E false // For all extruders
329 433
 #define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled
330 434
 
435
+// @section machine
436
+
331 437
 // Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
332 438
 #define INVERT_X_DIR true
333 439
 #define INVERT_Y_DIR true
334 440
 #define INVERT_Z_DIR true
441
+
442
+// @section extruder
443
+
444
+// For direct drive extruder v9 set to true, for geared extruder set to false.
335 445
 #define INVERT_E0_DIR false
336 446
 #define INVERT_E1_DIR true
337 447
 #define INVERT_E2_DIR false
338 448
 #define INVERT_E3_DIR false
339 449
 
450
+// @section homing
451
+//#define MIN_Z_HEIGHT_FOR_HOMING 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
452
+                                    // Be sure you have this distance over your Z_MAX_POS in case.
453
+
340 454
 // ENDSTOP SETTINGS:
341 455
 // Sets direction of endstops when homing; 1=MAX, -1=MIN
456
+// :[-1,1]
342 457
 #define X_HOME_DIR -1
343 458
 #define Y_HOME_DIR -1
344 459
 #define Z_HOME_DIR -1
@@ -346,6 +461,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
346 461
 #define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
347 462
 #define max_software_endstops true  // If true, axis won't move to coordinates greater than the defined lengths below.
348 463
 
464
+// @section machine
465
+
349 466
 // Travel limits after homing (units are in mm)
350 467
 #define X_MIN_POS 0
351 468
 #define Y_MIN_POS 0
@@ -368,24 +485,26 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
368 485
 #endif
369 486
 
370 487
 //===========================================================================
371
-//=========================== Manual Bed Leveling ===========================
488
+//============================ Mesh Bed Leveling ============================
372 489
 //===========================================================================
373 490
 
374
-//#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
375 491
 //#define MESH_BED_LEVELING    // Enable mesh bed leveling.
376 492
 
377
-#if ENABLED(MANUAL_BED_LEVELING)
378
-  #define MBL_Z_STEP 0.025  // Step size while manually probing Z axis.
379
-#endif  // MANUAL_BED_LEVELING
380
-
381 493
 #if ENABLED(MESH_BED_LEVELING)
382 494
   #define MESH_MIN_X 10
383
-  #define MESH_MAX_X (X_MAX_POS - MESH_MIN_X)
495
+  #define MESH_MAX_X (X_MAX_POS - (MESH_MIN_X))
384 496
   #define MESH_MIN_Y 10
385
-  #define MESH_MAX_Y (Y_MAX_POS - MESH_MIN_Y)
497
+  #define MESH_MAX_Y (Y_MAX_POS - (MESH_MIN_Y))
386 498
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
387 499
   #define MESH_NUM_Y_POINTS 3
388 500
   #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0.
501
+
502
+  //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
503
+
504
+  #if ENABLED(MANUAL_BED_LEVELING)
505
+    #define MBL_Z_STEP 0.025  // Step size while manually probing Z axis.
506
+  #endif  // MANUAL_BED_LEVELING
507
+
389 508
 #endif  // MESH_BED_LEVELING
390 509
 
391 510
 //===========================================================================
@@ -394,10 +513,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
394 513
 
395 514
 // @section bedlevel
396 515
 
397
-
398 516
 //#define AUTO_BED_LEVELING_FEATURE // Delete the comment to enable (remove // at the start of the line)
399 517
 //#define DEBUG_LEVELING_FEATURE
400
-//#define Z_MIN_PROBE_REPEATABILITY_TEST  // If not commented out, Z-Probe Repeatability test will be included if Auto Bed Leveling is Enabled.
518
+//#define Z_MIN_PROBE_REPEATABILITY_TEST  // If not commented out, Z Probe Repeatability test will be included if Auto Bed Leveling is Enabled.
401 519
 
402 520
 #if ENABLED(AUTO_BED_LEVELING_FEATURE)
403 521
 
@@ -409,7 +527,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
409 527
   //   This mode is preferred because there are more measurements.
410 528
   //
411 529
   // - "3-point" mode
412
-  //   Probe 3 arbitrary points on the bed (that aren't colinear)
530
+  //   Probe 3 arbitrary points on the bed (that aren't collinear)
413 531
   //   You specify the XY coordinates of all 3 points.
414 532
 
415 533
   // Enable this to sample the bed in a grid (least squares solution).
@@ -423,7 +541,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
423 541
     #define FRONT_PROBE_BED_POSITION 20
424 542
     #define BACK_PROBE_BED_POSITION 180
425 543
 
426
-    #define MIN_PROBE_EDGE 10 // The Z probe square sides can be no smaller than this.
544
+    #define MIN_PROBE_EDGE 10 // The Z probe minimum square sides can be no smaller than this.
427 545
 
428 546
     // Set the number of grid points per dimension.
429 547
     // You probably don't need more than 3 (squared=9).
@@ -431,25 +549,37 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
431 549
 
432 550
   #else  // !AUTO_BED_LEVELING_GRID
433 551
 
434
-      // Arbitrary points to probe.
435
-      // A simple cross-product is used to estimate the plane of the bed.
436
-      #define ABL_PROBE_PT_1_X 15
437
-      #define ABL_PROBE_PT_1_Y 180
438
-      #define ABL_PROBE_PT_2_X 15
439
-      #define ABL_PROBE_PT_2_Y 20
440
-      #define ABL_PROBE_PT_3_X 170
441
-      #define ABL_PROBE_PT_3_Y 20
552
+    // Arbitrary points to probe.
553
+    // A simple cross-product is used to estimate the plane of the bed.
554
+    #define ABL_PROBE_PT_1_X 15
555
+    #define ABL_PROBE_PT_1_Y 180
556
+    #define ABL_PROBE_PT_2_X 15
557
+    #define ABL_PROBE_PT_2_Y 20
558
+    #define ABL_PROBE_PT_3_X 170
559
+    #define ABL_PROBE_PT_3_Y 20
442 560
 
443 561
   #endif // AUTO_BED_LEVELING_GRID
444 562
 
445
-  // Offsets to the Z probe relative to the nozzle tip.
563
+  // Z Probe to nozzle (X,Y) offset, relative to (0, 0).
446 564
   // X and Y offsets must be integers.
447
-  #define X_PROBE_OFFSET_FROM_EXTRUDER -25     // Z probe to nozzle X offset: -left  +right
448
-  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29     // Z probe to nozzle Y offset: -front +behind
449
-  #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35  // Z probe to nozzle Z offset: -below (always!)
450
-
451
-  #define Z_RAISE_BEFORE_HOMING 4       // (in mm) Raise Z axis before homing (G28) for Z probe clearance.
452
-                                        // Be sure you have this distance over your Z_MAX_POS in case.
565
+  //
566
+  // In the following example the X and Y offsets are both positive:
567
+  // #define X_PROBE_OFFSET_FROM_EXTRUDER 10
568
+  // #define Y_PROBE_OFFSET_FROM_EXTRUDER 10
569
+  //
570
+  //    +-- BACK ---+
571
+  //    |           |
572
+  //  L |    (+) P  | R <-- probe (20,20)
573
+  //  E |           | I
574
+  //  F | (-) N (+) | G <-- nozzle (10,10)
575
+  //  T |           | H
576
+  //    |    (-)    | T
577
+  //    |           |
578
+  //    O-- FRONT --+
579
+  //  (0,0)
580
+  #define X_PROBE_OFFSET_FROM_EXTRUDER -25     // X offset: -left  [of the nozzle] +right
581
+  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29     // Y offset: -front [of the nozzle] +behind
582
+  #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35  // Z offset: -below [the nozzle] (always negative!)
453 583
 
454 584
   #define XY_TRAVEL_SPEED 8000         // X and Y axis travel speed between probes, in mm/min.
455 585
 
@@ -457,16 +587,29 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
457 587
   #define Z_RAISE_BETWEEN_PROBINGS 5  // How much the Z axis will be raised when traveling from between next probing points.
458 588
   #define Z_RAISE_AFTER_PROBING 15    // How much the Z axis will be raised after the last probing point.
459 589
 
460
-//#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" // These commands will be executed in the end of G29 routine.
461
-                                                                            // Useful to retract a deployable Z probe.
590
+  //#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" // These commands will be executed in the end of G29 routine.
591
+                                                                             // Useful to retract a deployable Z probe.
592
+
593
+  // Probes are sensors/switches that need to be activated before they can be used
594
+  // and deactivated after the use.
595
+  // Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, ... . You have to activate one of these for the AUTO_BED_LEVELING_FEATURE
596
+
597
+  // A fix mounted probe, like the normal inductive probe, must be deactivated to go below Z_PROBE_OFFSET_FROM_EXTRUDER
598
+  // when the hardware endstops are active.
599
+  //#define FIX_MOUNTED_PROBE
462 600
 
463
-  //#define Z_PROBE_SLED // Turn on if you have a Z probe mounted on a sled like those designed by Charles Bell.
601
+  // A Servo Probe can be defined in the servo section below.
602
+
603
+  // An Allen Key Probe is currently predefined only in the delta example configurations.
604
+
605
+  //#define Z_PROBE_SLED // Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
464 606
   //#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
465 607
 
466
-// If you have enabled the bed auto leveling and are using the same Z probe for Z homing,
467
-// it is highly recommended you let this Z_SAFE_HOMING enabled!!!
608
+  // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing,
609
+  // it is highly recommended you leave Z_SAFE_HOMING enabled!
468 610
 
469
-  #define Z_SAFE_HOMING   // This feature is meant to avoid Z homing with Z probe outside the bed area.
611
+  #define Z_SAFE_HOMING   // Use the z-min-probe for homing to z-min - not the z-min-endstop.
612
+                          // This feature is meant to avoid Z homing with Z probe outside the bed area.
470 613
                           // When defined, it will:
471 614
                           // - Allow Z homing only after X and Y homing AND stepper drivers still enabled.
472 615
                           // - If stepper drivers timeout, it will need X and Y homing again before Z homing.
@@ -480,40 +623,11 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
480 623
 
481 624
   #endif
482 625
 
483
-  // Support for a dedicated Z probe endstop separate from the Z min endstop.
484
-  // If you would like to use both a Z probe and a Z min endstop together,
485
-  // uncomment #define Z_MIN_PROBE_ENDSTOP and read the instructions below.
486
-  // If you still want to use the Z min endstop for homing, disable Z_SAFE_HOMING above.
487
-  // Example: To park the head outside the bed area when homing with G28.
488
-  //
489
-  // WARNING:
490
-  // The Z min endstop will need to set properly as it would without a Z probe
491
-  // to prevent head crashes and premature stopping during a print.
492
-  //
493
-  // To use a separate Z probe endstop, you must have a Z_MIN_PROBE_PIN
494
-  // defined in the pins_XXXXX.h file for your control board.
495
-  // If you are using a servo based Z probe, you will need to enable NUM_SERVOS,
496
-  // Z_ENDSTOP_SERVO_NR and SERVO_ENDSTOP_ANGLES in the R/C SERVO support below.
497
-  // RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin
498
-  // in the Aux 4 section of the RAMPS board. Use 5V for powered sensors,
499
-  // otherwise connect to ground and D32 for normally closed configuration
500
-  // and 5V and D32 for normally open configurations.
501
-  // Normally closed configuration is advised and assumed.
502
-  // The D32 pin in Aux 4 on RAMPS maps to the Arduino D32 pin.
503
-  // Z_MIN_PROBE_PIN is setting the pin to use on the Arduino.
504
-  // Since the D32 pin on the RAMPS maps to D32 on Arduino, this works.
505
-  // D32 is currently selected in the RAMPS 1.3/1.4 pin file.
506
-  // All other boards will need changes to the respective pins_XXXXX.h file.
507
-  //
508
-  // WARNING:
509
-  // Setting the wrong pin may have unexpected and potentially disastrous outcomes.
510
-  // Use with caution and do your homework.
511
-  //
512
-  //#define Z_MIN_PROBE_ENDSTOP
513
-
514 626
 #endif // AUTO_BED_LEVELING_FEATURE
515 627
 
516 628
 
629
+// @section homing
630
+
517 631
 // The position of the homing switches
518 632
 //#define MANUAL_HOME_POSITIONS  // If defined, MANUAL_*_HOME_POS below will be used
519 633
 //#define BED_CENTER_AT_0_0  // If defined, the center of the bed is at (X=0, Y=0)
@@ -527,6 +641,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
527 641
   //#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing.
528 642
 #endif
529 643
 
644
+// @section movement
645
+
530 646
 /**
531 647
  * MOVEMENT SETTINGS
532 648
  */
@@ -538,18 +654,12 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
538 654
 // default steps per unit for Felix 2.0/3.0: 0.00249mm x/y rounding error with 3mm pitch HTD belt and 14 tooth pulleys. 0 z error.
539 655
 #define DEFAULT_AXIS_STEPS_PER_UNIT   {76.190476, 76.190476, 1600, 164}
540 656
 #define DEFAULT_MAX_FEEDRATE          {500, 500, 5, 25}    // (mm/sec)
541
-#define DEFAULT_MAX_ACCELERATION      {5000,5000,100,80000}    // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for skeinforge 40+, for older versions raise them a lot.
657
+#define DEFAULT_MAX_ACCELERATION      {5000,5000,100,80000}    // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for Skeinforge 40+, for older versions raise them a lot.
542 658
 
543 659
 #define DEFAULT_ACCELERATION          1750 //1500    // X, Y, Z and E max acceleration in mm/s^2 for printing moves
544
-#define DEFAULT_RETRACT_ACCELERATION  5000 // X, Y, Z and E max acceleration in mm/s^2 for r retracts
660
+#define DEFAULT_RETRACT_ACCELERATION  5000 // E acceleration in mm/s^2 for retracts
545 661
 #define DEFAULT_TRAVEL_ACCELERATION   3000 // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves
546 662
 
547
-// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
548
-// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).
549
-// For the other hotends it is their distance from the extruder 0 hotend.
550
-//#define EXTRUDER_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis
551
-//#define EXTRUDER_OFFSET_Y {0.0, 5.00}  // (in mm) for each extruder, offset of the hotend on the Y axis
552
-
553 663
 // The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously)
554 664
 #define DEFAULT_XYJERK                10   // (mm/sec)
555 665
 #define DEFAULT_ZJERK                 0.3  //0.4   // (mm/sec)
@@ -560,6 +670,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
560 670
 //============================= Additional Features ===========================
561 671
 //=============================================================================
562 672
 
673
+// @section more
674
+
563 675
 // Custom M code points
564 676
 #define CUSTOM_M_CODES
565 677
 #if ENABLED(CUSTOM_M_CODES)
@@ -570,6 +682,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
570 682
   #endif
571 683
 #endif
572 684
 
685
+// @section extras
573 686
 
574 687
 // EEPROM
575 688
 // The microcontroller can store settings in the EEPROM, e.g. max velocity...
@@ -581,10 +694,18 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
581 694
 
582 695
 #if ENABLED(EEPROM_SETTINGS)
583 696
   // To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
584
-  #define EEPROM_CHITCHAT // please keep turned on if you can.
697
+  #define EEPROM_CHITCHAT // Please keep turned on if you can.
585 698
 #endif
586 699
 
587 700
 //
701
+// Host Keepalive
702
+//
703
+// By default Marlin will send a busy status message to the host
704
+// every 10 seconds when it can't accept commands.
705
+//
706
+//#define DISABLE_HOST_KEEPALIVE // Enable this option if your host doesn't like keepalive messages.
707
+
708
+//
588 709
 // M100 Free Memory Watcher
589 710
 //
590 711
 //#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
@@ -601,15 +722,16 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
601 722
 #define ABS_PREHEAT_FAN_SPEED 255   // Insert Value between 0 and 255
602 723
 
603 724
 //==============================LCD and SD support=============================
725
+// @section lcd
604 726
 
605 727
 // Define your display language below. Replace (en) with your language code and uncomment.
606
-// en, pl, fr, de, es, ru, bg, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, cn, test
728
+// en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8, fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test
607 729
 // See also language.h
608 730
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
609 731
 
610 732
 // Choose ONE of these 3 charsets. This has to match your hardware. Ignored for full graphic display.
611 733
 // To find out what type you have - compile with (test) - upload - click to get the menu. You'll see two typical lines from the upper half of the charset.
612
-// See also documentation/LCDLanguageFont.md
734
+// See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
613 735
   #define DISPLAY_CHARSET_HD44780_JAPAN        // this is the most common hardware
614 736
   //#define DISPLAY_CHARSET_HD44780_WESTERN
615 737
   //#define DISPLAY_CHARSET_HD44780_CYRILLIC
@@ -617,19 +739,18 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
617 739
 //#define ULTRA_LCD  //general LCD support, also 16x2
618 740
 //#define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
619 741
 //#define SDSUPPORT // Enable SD Card Support in Hardware Console
620
-// Changed behaviour! If you need SDSUPPORT uncomment it!
621
-//#define SDSLOW // Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
622
-//#define SDEXTRASLOW // Use even slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
742
+                    // Changed behaviour! If you need SDSUPPORT uncomment it!
743
+//#define SPI_SPEED SPI_HALF_SPEED // (also SPI_QUARTER_SPEED, SPI_EIGHTH_SPEED) Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
623 744
 //#define SD_CHECK_AND_RETRY // Use CRC checks and retries on the SD communication
624 745
 //#define ENCODER_PULSES_PER_STEP 1 // Increase if you have a high resolution encoder
625 746
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
747
+//#define REVERSE_MENU_DIRECTION // When enabled CLOCKWISE moves UP in the LCD menu
626 748
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
627 749
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
628 750
 //#define SPEAKER // The sound device is a speaker - not a buzzer. A buzzer resonates with his own frequency.
629 751
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
630 752
 //#define LCD_FEEDBACK_FREQUENCY_HZ 1000         // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
631 753
                                                  // 0 to disable buzzer feedback. Test with M300 S<frequency Hz> P<duration ms>
632
-
633 754
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
634 755
 // http://reprap.org/wiki/PanelOne
635 756
 //#define PANEL_ONE
@@ -640,13 +761,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
640 761
 
641 762
 // The Panucatt Devices Viki 2.0 and mini Viki with Graphic LCD
642 763
 // http://panucatt.com
643
-// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
764
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
644 765
 //#define VIKI2
645 766
 //#define miniVIKI
646 767
 
647 768
 // This is a new controller currently under development.  https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
648 769
 //
649
-// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
770
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
650 771
 //#define ELB_FULL_GRAPHIC_CONTROLLER
651 772
 //#define SD_DETECT_INVERTED
652 773
 
@@ -661,7 +782,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
661 782
 // The RepRapDiscount FULL GRAPHIC Smart Controller (quadratic white PCB)
662 783
 // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
663 784
 //
664
-// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
785
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
665 786
 //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
666 787
 
667 788
 // The RepRapWorld REPRAPWORLD_KEYPAD v1.1
@@ -684,6 +805,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
684 805
 
685 806
 //#define LCD_I2C_SAINSMART_YWROBOT
686 807
 
808
+//#define LCM1602 // LCM1602 Adapter for 16x2 LCD
809
+
687 810
 // PANELOLU2 LCD with status LEDs, separate encoder and click inputs
688 811
 //
689 812
 // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
@@ -696,14 +819,20 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
696 819
 // Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs
697 820
 //#define LCD_I2C_VIKI
698 821
 
822
+// SSD1306 OLED generic display support
823
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
824
+//#define U8GLIB_SSD1306
825
+
699 826
 // Shift register panels
700 827
 // ---------------------
701 828
 // 2 wire Non-latching LCD SR from:
702 829
 // https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
703
-
830
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
704 831
 //#define SAV_3DLCD
705 832
 
706
-// Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
833
+// @section extras
834
+
835
+// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino
707 836
 #define FAST_PWM_FAN
708 837
 
709 838
 // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
@@ -726,7 +855,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
726 855
 // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
727 856
 //#define PHOTOGRAPH_PIN     23
728 857
 
729
-// SF send wrong arc g-codes when using Arc Point as fillet procedure
858
+// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
730 859
 //#define SF_ARC_FIX
731 860
 
732 861
 // Support for the BariCUDA Paste Extruder.
@@ -783,21 +912,23 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
783 912
  * Note may require analog pins to be defined for different motherboards
784 913
  **********************************************************************/
785 914
 // Uncomment below to enable
786
-//#define FILAMENT_SENSOR
787
-
788
-#define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
789
-#define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
915
+//#define FILAMENT_WIDTH_SENSOR
790 916
 
791 917
 #define DEFAULT_NOMINAL_FILAMENT_DIA 3.00  //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software.  Used for sensor reading validation
792
-#define MEASURED_UPPER_LIMIT         3.30  //upper limit factor used for sensor reading validation in mm
793
-#define MEASURED_LOWER_LIMIT         1.90  //lower limit factor for sensor reading validation in mm
794
-#define MAX_MEASUREMENT_DELAY       20     //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM  and lower number saves RAM)
795 918
 
796
-//defines used in the code
797
-#define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially
919
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
920
+  #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
921
+  #define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
798 922
 
799
-//When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status.  Status will appear for 5 sec.
800
-//#define FILAMENT_LCD_DISPLAY
923
+  #define MEASURED_UPPER_LIMIT         3.30  //upper limit factor used for sensor reading validation in mm
924
+  #define MEASURED_LOWER_LIMIT         1.90  //lower limit factor for sensor reading validation in mm
925
+  #define MAX_MEASUREMENT_DELAY       20     //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM  and lower number saves RAM)
926
+
927
+  #define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially
928
+
929
+  //When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status.  Status will appear for 5 sec.
930
+  //#define FILAMENT_LCD_DISPLAY
931
+#endif
801 932
 
802 933
 #include "Configuration_adv.h"
803 934
 #include "thermistortables.h"

+ 121
- 67
Marlin/example_configurations/Felix/Configuration_adv.h View File

@@ -1,3 +1,35 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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
+/**
24
+ * Configuration_adv.h
25
+ *
26
+ * Advanced settings.
27
+ * Only change these if you know exactly what you're doing.
28
+ * Some of these settings can damage your printer if improperly set!
29
+ *
30
+ * Basic settings can be found in Configuration.h
31
+ *
32
+ */
1 33
 #ifndef CONFIGURATION_ADV_H
2 34
 #define CONFIGURATION_ADV_H
3 35
 
@@ -9,13 +41,26 @@
9 41
 //=============================Thermal Settings  ============================
10 42
 //===========================================================================
11 43
 
12
-#if ENABLED(BED_LIMIT_SWITCHING)
13
-  #define BED_HYSTERESIS 2 //only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS
44
+#if DISABLED(PIDTEMPBED)
45
+  #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control
46
+  #if ENABLED(BED_LIMIT_SWITCHING)
47
+    #define BED_HYSTERESIS 2 // Only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS
48
+  #endif
14 49
 #endif
15
-#define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control
16 50
 
17 51
 /**
18
- * Thermal Protection parameters
52
+ * Thermal Protection protects your printer from damage and fire if a
53
+ * thermistor falls out or temperature sensors fail in any way.
54
+ *
55
+ * The issue: If a thermistor falls out or a temperature sensor fails,
56
+ * Marlin can no longer sense the actual temperature. Since a disconnected
57
+ * thermistor reads as a low temperature, the firmware will keep the heater on.
58
+ *
59
+ * The solution: Once the temperature reaches the target, start observing.
60
+ * If the temperature stays too far below the target (hysteresis) for too long (period),
61
+ * the firmware will halt the machine as a safety precaution.
62
+ *
63
+ * If you get false positives for "Thermal Runaway" increase THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
19 64
  */
20 65
 #if ENABLED(THERMAL_PROTECTION_HOTENDS)
21 66
   #define THERMAL_PROTECTION_PERIOD 40        // Seconds
@@ -26,26 +71,24 @@
26 71
    * WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
27 72
    * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
28 73
    * but only if the current temperature is far enough below the target for a reliable test.
74
+   *
75
+   * If you get false positives for "Heating failed" increase WATCH_TEMP_PERIOD and/or decrease WATCH_TEMP_INCREASE
76
+   * WATCH_TEMP_INCREASE should not be below 2.
29 77
    */
30
-  #define WATCH_TEMP_PERIOD 16                // Seconds
31
-  #define WATCH_TEMP_INCREASE 4               // Degrees Celsius
78
+  #define WATCH_TEMP_PERIOD 20                // Seconds
79
+  #define WATCH_TEMP_INCREASE 2               // Degrees Celsius
32 80
 #endif
33 81
 
82
+/**
83
+ * Thermal Protection parameters for the bed
84
+ * are like the above for the hotends.
85
+ * WATCH_TEMP_BED_PERIOD and WATCH_TEMP_BED_INCREASE are not imlemented now.
86
+ */
34 87
 #if ENABLED(THERMAL_PROTECTION_BED)
35 88
   #define THERMAL_PROTECTION_BED_PERIOD 20    // Seconds
36 89
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
37 90
 #endif
38 91
 
39
-/**
40
- * Automatic Temperature:
41
- * The hotend target temperature is calculated by all the buffered lines of gcode.
42
- * The maximum buffered steps/sec of the extruder motor is called "se".
43
- * Start autotemp mode with M109 S<mintemp> B<maxtemp> F<factor>
44
- * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by
45
- * mintemp and maxtemp. Turn this off by excuting M109 without F*
46
- * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp.
47
- * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
48
- */
49 92
 #if ENABLED(PIDTEMP)
50 93
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
51 94
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.
@@ -56,14 +99,16 @@
56 99
   #endif
57 100
 #endif
58 101
 
59
-
60
-//automatic temperature: The hot end target temperature is calculated by all the buffered lines of gcode.
61
-//The maximum buffered steps/sec of the extruder motor are called "se".
62
-//You enter the autotemp mode by a M109 S<mintemp> B<maxtemp> F<factor>
63
-// the target temperature is set to mintemp+factor*se[steps/sec] and limited by mintemp and maxtemp
64
-// you exit the value by any M109 without F*
65
-// Also, if the temperature is set to a value <mintemp, it is not changed by autotemp.
66
-// on an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
102
+/**
103
+ * Automatic Temperature:
104
+ * The hotend target temperature is calculated by all the buffered lines of gcode.
105
+ * The maximum buffered steps/sec of the extruder motor is called "se".
106
+ * Start autotemp mode with M109 S<mintemp> B<maxtemp> F<factor>
107
+ * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by
108
+ * mintemp and maxtemp. Turn this off by executing M109 without F*
109
+ * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp.
110
+ * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
111
+ */
67 112
 #define AUTOTEMP
68 113
 #if ENABLED(AUTOTEMP)
69 114
   #define AUTOTEMP_OLDWEIGHT 0.98
@@ -156,9 +201,7 @@
156 201
   //#define Z_DUAL_ENDSTOPS
157 202
 
158 203
   #if ENABLED(Z_DUAL_ENDSTOPS)
159
-    #define Z2_MAX_PIN 36                     //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36)
160
-    const bool Z2_MAX_ENDSTOP_INVERTING = false;
161
-    #define DISABLE_XMAX_ENDSTOP              //Better to disable the XMAX to avoid conflict. Just rename "XMAX_ENDSTOP" by the endstop you are using for Z2 axis.
204
+    #define Z2_USE_ENDSTOP _XMAX_
162 205
   #endif
163 206
 
164 207
 #endif // Z_DUAL_STEPPER_DRIVERS
@@ -240,7 +283,13 @@
240 283
 #define INVERT_E_STEP_PIN false
241 284
 
242 285
 // Default stepper release if idle. Set to 0 to deactivate.
286
+// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true.
287
+// Time can be set by M18 and M84.
243 288
 #define DEFAULT_STEPPER_DEACTIVE_TIME 60
289
+#define DISABLE_INACTIVE_X true
290
+#define DISABLE_INACTIVE_Y true
291
+#define DISABLE_INACTIVE_Z true  // set to false if the nozzle will fall down on your printed part when print has finished.
292
+#define DISABLE_INACTIVE_E true
244 293
 
245 294
 #define DEFAULT_MINIMUMFEEDRATE       0.0     // minimum feedrate
246 295
 #define DEFAULT_MINTRAVELFEEDRATE     0.0
@@ -276,6 +325,9 @@
276 325
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
277 326
 #define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
278 327
 
328
+// Motor Current controlled via PWM (Overridable on supported boards with PWM-driven motor driver current)
329
+//#define PWM_MOTOR_CURRENT {1300, 1300, 1250} // Values in milliamps
330
+
279 331
 // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
280 332
 //#define DIGIPOT_I2C
281 333
 // Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8
@@ -349,17 +401,16 @@
349 401
   //#define USE_SMALL_INFOFONT
350 402
 #endif // DOGLCD
351 403
 
352
-
353 404
 // @section more
354 405
 
355 406
 // The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
356
-//#define USE_WATCHDOG
407
+#define USE_WATCHDOG
357 408
 
358 409
 #if ENABLED(USE_WATCHDOG)
359
-// If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
360
-// The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset.
361
-//  However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled.
362
-//#define WATCHDOG_RESET_MANUAL
410
+  // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
411
+  // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset.
412
+  //  However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled.
413
+  //#define WATCHDOG_RESET_MANUAL
363 414
 #endif
364 415
 
365 416
 // @section lcd
@@ -370,6 +421,7 @@
370 421
 //#define BABYSTEPPING
371 422
 #if ENABLED(BABYSTEPPING)
372 423
   #define BABYSTEP_XY  //not only z, but also XY in the menu. more clutter, more functions
424
+                       //not implemented for deltabots!
373 425
   #define BABYSTEP_INVERT_Z false  //true for inverse movements in Z
374 426
   #define BABYSTEP_MULTIPLICATOR 1 //faster movements
375 427
 #endif
@@ -388,7 +440,6 @@
388 440
 #if ENABLED(ADVANCE)
389 441
   #define EXTRUDER_ADVANCE_K .0
390 442
   #define D_FILAMENT 2.85
391
-  #define STEPS_MM_E 836
392 443
 #endif
393 444
 
394 445
 // @section extras
@@ -397,7 +448,7 @@
397 448
 #define MM_PER_ARC_SEGMENT 1
398 449
 #define N_ARC_CORRECTION 25
399 450
 
400
-const unsigned int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement
451
+const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement
401 452
 
402 453
 // @section temperature
403 454
 
@@ -462,12 +513,15 @@ const unsigned int dropsegments=5; //everything with less than this number of st
462 513
     #define FILAMENTCHANGE_ZADD 10
463 514
     #define FILAMENTCHANGE_FIRSTRETRACT -2
464 515
     #define FILAMENTCHANGE_FINALRETRACT -100
516
+    #define AUTO_FILAMENT_CHANGE                //This extrude filament until you press the button on LCD
517
+    #define AUTO_FILAMENT_CHANGE_LENGTH 0.04    //Extrusion length on automatic extrusion loop
518
+    #define AUTO_FILAMENT_CHANGE_FEEDRATE 300   //Extrusion feedrate (mm/min) on automatic extrusion loop
465 519
   #endif
466 520
 #endif
467 521
 
468 522
 /******************************************************************************\
469 523
  * enable this section if you have TMC26X motor drivers.
470
- * you need to import the TMC26XStepper library into the arduino IDE for this
524
+ * you need to import the TMC26XStepper library into the Arduino IDE for this
471 525
  ******************************************************************************/
472 526
 
473 527
 // @section tmc
@@ -475,52 +529,52 @@ const unsigned int dropsegments=5; //everything with less than this number of st
475 529
 //#define HAVE_TMCDRIVER
476 530
 #if ENABLED(HAVE_TMCDRIVER)
477 531
 
478
-//#define X_IS_TMC
532
+  //#define X_IS_TMC
479 533
   #define X_MAX_CURRENT 1000  //in mA
480 534
   #define X_SENSE_RESISTOR 91 //in mOhms
481 535
   #define X_MICROSTEPS 16     //number of microsteps
482 536
 
483
-//#define X2_IS_TMC
537
+  //#define X2_IS_TMC
484 538
   #define X2_MAX_CURRENT 1000  //in mA
485 539
   #define X2_SENSE_RESISTOR 91 //in mOhms
486 540
   #define X2_MICROSTEPS 16     //number of microsteps
487 541
 
488
-//#define Y_IS_TMC
542
+  //#define Y_IS_TMC
489 543
   #define Y_MAX_CURRENT 1000  //in mA
490 544
   #define Y_SENSE_RESISTOR 91 //in mOhms
491 545
   #define Y_MICROSTEPS 16     //number of microsteps
492 546
 
493
-//#define Y2_IS_TMC
547
+  //#define Y2_IS_TMC
494 548
   #define Y2_MAX_CURRENT 1000  //in mA
495 549
   #define Y2_SENSE_RESISTOR 91 //in mOhms
496 550
   #define Y2_MICROSTEPS 16     //number of microsteps
497 551
 
498
-//#define Z_IS_TMC
552
+  //#define Z_IS_TMC
499 553
   #define Z_MAX_CURRENT 1000  //in mA
500 554
   #define Z_SENSE_RESISTOR 91 //in mOhms
501 555
   #define Z_MICROSTEPS 16     //number of microsteps
502 556
 
503
-//#define Z2_IS_TMC
557
+  //#define Z2_IS_TMC
504 558
   #define Z2_MAX_CURRENT 1000  //in mA
505 559
   #define Z2_SENSE_RESISTOR 91 //in mOhms
506 560
   #define Z2_MICROSTEPS 16     //number of microsteps
507 561
 
508
-//#define E0_IS_TMC
562
+  //#define E0_IS_TMC
509 563
   #define E0_MAX_CURRENT 1000  //in mA
510 564
   #define E0_SENSE_RESISTOR 91 //in mOhms
511 565
   #define E0_MICROSTEPS 16     //number of microsteps
512 566
 
513
-//#define E1_IS_TMC
567
+  //#define E1_IS_TMC
514 568
   #define E1_MAX_CURRENT 1000  //in mA
515 569
   #define E1_SENSE_RESISTOR 91 //in mOhms
516 570
   #define E1_MICROSTEPS 16     //number of microsteps
517 571
 
518
-//#define E2_IS_TMC
572
+  //#define E2_IS_TMC
519 573
   #define E2_MAX_CURRENT 1000  //in mA
520 574
   #define E2_SENSE_RESISTOR 91 //in mOhms
521 575
   #define E2_MICROSTEPS 16     //number of microsteps
522 576
 
523
-//#define E3_IS_TMC
577
+  //#define E3_IS_TMC
524 578
   #define E3_MAX_CURRENT 1000  //in mA
525 579
   #define E3_SENSE_RESISTOR 91 //in mOhms
526 580
   #define E3_MICROSTEPS 16     //number of microsteps
@@ -529,7 +583,7 @@ const unsigned int dropsegments=5; //everything with less than this number of st
529 583
 
530 584
 /******************************************************************************\
531 585
  * enable this section if you have L6470  motor drivers.
532
- * you need to import the L6470 library into the arduino IDE for this
586
+ * you need to import the L6470 library into the Arduino IDE for this
533 587
  ******************************************************************************/
534 588
 
535 589
 // @section l6470
@@ -537,63 +591,63 @@ const unsigned int dropsegments=5; //everything with less than this number of st
537 591
 //#define HAVE_L6470DRIVER
538 592
 #if ENABLED(HAVE_L6470DRIVER)
539 593
 
540
-//#define X_IS_L6470
594
+  //#define X_IS_L6470
541 595
   #define X_MICROSTEPS 16     //number of microsteps
542
-  #define X_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
596
+  #define X_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
543 597
   #define X_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
544 598
   #define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall
545 599
 
546
-//#define X2_IS_L6470
600
+  //#define X2_IS_L6470
547 601
   #define X2_MICROSTEPS 16     //number of microsteps
548
-  #define X2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
602
+  #define X2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
549 603
   #define X2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
550 604
   #define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
551 605
 
552
-//#define Y_IS_L6470
606
+  //#define Y_IS_L6470
553 607
   #define Y_MICROSTEPS 16     //number of microsteps
554
-  #define Y_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
608
+  #define Y_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
555 609
   #define Y_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
556 610
   #define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall
557 611
 
558
-//#define Y2_IS_L6470
612
+  //#define Y2_IS_L6470
559 613
   #define Y2_MICROSTEPS 16     //number of microsteps
560
-  #define Y2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
614
+  #define Y2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
561 615
   #define Y2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
562 616
   #define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
563 617
 
564
-//#define Z_IS_L6470
618
+  //#define Z_IS_L6470
565 619
   #define Z_MICROSTEPS 16     //number of microsteps
566
-  #define Z_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
620
+  #define Z_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
567 621
   #define Z_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
568 622
   #define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall
569 623
 
570
-//#define Z2_IS_L6470
624
+  //#define Z2_IS_L6470
571 625
   #define Z2_MICROSTEPS 16     //number of microsteps
572
-  #define Z2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
626
+  #define Z2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
573 627
   #define Z2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
574 628
   #define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
575 629
 
576
-//#define E0_IS_L6470
630
+  //#define E0_IS_L6470
577 631
   #define E0_MICROSTEPS 16     //number of microsteps
578
-  #define E0_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
632
+  #define E0_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
579 633
   #define E0_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
580 634
   #define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall
581 635
 
582
-//#define E1_IS_L6470
636
+  //#define E1_IS_L6470
583 637
   #define E1_MICROSTEPS 16     //number of microsteps
584
-  #define E1_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
638
+  #define E1_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
585 639
   #define E1_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
586 640
   #define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall
587 641
 
588
-//#define E2_IS_L6470
642
+  //#define E2_IS_L6470
589 643
   #define E2_MICROSTEPS 16     //number of microsteps
590
-  #define E2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
644
+  #define E2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
591 645
   #define E2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
592 646
   #define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
593 647
 
594
-//#define E3_IS_L6470
648
+  //#define E3_IS_L6470
595 649
   #define E3_MICROSTEPS 16     //number of microsteps
596
-  #define E3_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
650
+  #define E3_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
597 651
   #define E3_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
598 652
   #define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall
599 653
 

+ 216
- 115
Marlin/example_configurations/Hephestos/Configuration.h View File

@@ -1,3 +1,40 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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
+/**
24
+ * Configuration.h
25
+ *
26
+ * Basic settings such as:
27
+ *
28
+ * - Type of electronics
29
+ * - Type of temperature sensor
30
+ * - Printer geometry
31
+ * - Endstop configuration
32
+ * - LCD controller
33
+ * - Extra features
34
+ *
35
+ * Advanced settings can be found in Configuration_adv.h
36
+ *
37
+ */
1 38
 #ifndef CONFIGURATION_H
2 39
 #define CONFIGURATION_H
3 40
 
@@ -7,8 +44,10 @@
7 44
 //===========================================================================
8 45
 //============================= Getting Started =============================
9 46
 //===========================================================================
10
-/*
11
-Here are some standard links for getting your machine calibrated:
47
+
48
+/**
49
+ * Here are some standard links for getting your machine calibrated:
50
+ *
12 51
  * http://reprap.org/wiki/Calibration
13 52
  * http://youtu.be/wAL9d7FgInk
14 53
  * http://calculator.josefprusa.cz
@@ -16,11 +55,7 @@ Here are some standard links for getting your machine calibrated:
16 55
  * http://www.thingiverse.com/thing:5573
17 56
  * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap
18 57
  * http://www.thingiverse.com/thing:298812
19
-*/
20
-
21
-// This configuration file contains the basic settings.
22
-// Advanced settings can be found in Configuration_adv.h
23
-// BASIC SETTINGS: select your board type, temperature sensor type, axis scaling, and endstop configuration
58
+ */
24 59
 
25 60
 //===========================================================================
26 61
 //============================= DELTA Printer ===============================
@@ -70,7 +105,7 @@ Here are some standard links for getting your machine calibrated:
70 105
 // The following define selects which electronics board you have.
71 106
 // Please choose the name from boards.h that matches your setup
72 107
 #ifndef MOTHERBOARD
73
-  #define MOTHERBOARD BOARD_RAMPS_13_EFB
108
+  #define MOTHERBOARD BOARD_RAMPS_14_EFB
74 109
 #endif
75 110
 
76 111
 // Optional custom name for your RepStrap or other custom machine
@@ -113,6 +148,7 @@ Here are some standard links for getting your machine calibrated:
113 148
 //--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table
114 149
 //
115 150
 //// Temperature sensor settings:
151
+// -3 is thermocouple with MAX31855 (only for sensor 0)
116 152
 // -2 is thermocouple with MAX6675 (only for sensor 0)
117 153
 // -1 is thermocouple with AD595
118 154
 // 0 is not used
@@ -132,6 +168,7 @@ Here are some standard links for getting your machine calibrated:
132 168
 // 13 is 100k Hisens 3950  1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
133 169
 // 20 is the PT100 circuit found in the Ultimainboard V2.x
134 170
 // 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
171
+// 70 is the 100K thermistor found in the bq Hephestos 2
135 172
 //
136 173
 //    1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k
137 174
 //                          (but gives greater accuracy and more stable PID)
@@ -147,7 +184,7 @@ Here are some standard links for getting your machine calibrated:
147 184
 //     Use it for Testing or Development purposes. NEVER for production machine.
148 185
 //#define DUMMY_THERMISTOR_998_VALUE 25
149 186
 //#define DUMMY_THERMISTOR_999_VALUE 100
150
-// :{ '0': "Not used", '4': "10k !! do not use for a hotend. Bad resolution at high temp. !!", '1': "100k / 4.7k - EPCOS", '51': "100k / 1k - EPCOS", '6': "100k / 4.7k EPCOS - Not as accurate as Table 1", '5': "100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '7': "100k / 4.7k Honeywell 135-104LAG-J01", '71': "100k / 4.7k Honeywell 135-104LAF-J01", '8': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9': "100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10': "100k / 4.7k RS 198-961", '11': "100k / 4.7k beta 3950 1%", '12': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13': "100k Hisens 3950  1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '60': "100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '55': "100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '2': "200k / 4.7k - ATC Semitec 204GT-2", '52': "200k / 1k - ATC Semitec 204GT-2", '-2': "Thermocouple + MAX6675 (only for sensor 0)", '-1': "Thermocouple + AD595", '3': "Mendel-parts / 4.7k", '1047': "Pt1000 / 4.7k", '1010': "Pt1000 / 1k (non standard)", '20': "PT100 (Ultimainboard V2.x)", '147': "Pt100 / 4.7k", '110': "Pt100 / 1k (non-standard)", '998': "Dummy 1", '999': "Dummy 2" }
187
+// :{ '0': "Not used", '4': "10k !! do not use for a hotend. Bad resolution at high temp. !!", '1': "100k / 4.7k - EPCOS", '51': "100k / 1k - EPCOS", '6': "100k / 4.7k EPCOS - Not as accurate as Table 1", '5': "100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '7': "100k / 4.7k Honeywell 135-104LAG-J01", '71': "100k / 4.7k Honeywell 135-104LAF-J01", '8': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9': "100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10': "100k / 4.7k RS 198-961", '11': "100k / 4.7k beta 3950 1%", '12': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13': "100k Hisens 3950  1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '60': "100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '55': "100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '2': "200k / 4.7k - ATC Semitec 204GT-2", '52': "200k / 1k - ATC Semitec 204GT-2", '-3': "Thermocouple + MAX31855 (only for sensor 0)", '-2': "Thermocouple + MAX6675 (only for sensor 0)", '-1': "Thermocouple + AD595", '3': "Mendel-parts / 4.7k", '1047': "Pt1000 / 4.7k", '1010': "Pt1000 / 1k (non standard)", '20': "PT100 (Ultimainboard V2.x)", '147': "Pt100 / 4.7k", '110': "Pt100 / 1k (non-standard)", '998': "Dummy 1", '999': "Dummy 2" }
151 188
 #define TEMP_SENSOR_0 1
152 189
 #define TEMP_SENSOR_1 0
153 190
 #define TEMP_SENSOR_2 0
@@ -181,14 +218,9 @@ Here are some standard links for getting your machine calibrated:
181 218
 #define HEATER_3_MAXTEMP 260
182 219
 #define BED_MAXTEMP 150
183 220
 
184
-// If your bed has low resistance e.g. .6 ohm and throws the fuse you can duty cycle it to reduce the
185
-// average current. The value should be an integer and the heat bed will be turned on for 1 interval of
186
-// HEATER_BED_DUTY_CYCLE_DIVIDER intervals.
187
-//#define HEATER_BED_DUTY_CYCLE_DIVIDER 4
188
-
189 221
 // If you want the M105 heater power reported in watts, define the BED_WATTS, and (shared for all extruders) EXTRUDER_WATTS
190
-//#define EXTRUDER_WATTS (12.0*12.0/6.7) //  P=I^2/R
191
-//#define BED_WATTS (12.0*12.0/1.1)      // P=I^2/R
222
+//#define EXTRUDER_WATTS (12.0*12.0/6.7) // P=U^2/R
223
+//#define BED_WATTS (12.0*12.0/1.1)      // P=U^2/R
192 224
 
193 225
 //===========================================================================
194 226
 //============================= PID Settings ================================
@@ -200,6 +232,7 @@ Here are some standard links for getting your machine calibrated:
200 232
 #define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
201 233
 #define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
202 234
 #if ENABLED(PIDTEMP)
235
+  //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
203 236
   //#define PID_DEBUG // Sends debug data to the serial port.
204 237
   //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
205 238
   //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -239,19 +272,19 @@ Here are some standard links for getting your machine calibrated:
239 272
 // so you shouldn't use it unless you are OK with PWM on your bed.  (see the comment on enabling PIDTEMPBED)
240 273
 #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
241 274
 
242
-//#define PID_BED_DEBUG // Sends debug data to the serial port.
243
-
244 275
 #if ENABLED(PIDTEMPBED)
245 276
 
277
+  //#define PID_BED_DEBUG // Sends debug data to the serial port.
278
+
246 279
   #define PID_BED_INTEGRAL_DRIVE_MAX MAX_BED_POWER //limit for the integral term
247 280
 
248
-  //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
281
+  //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
249 282
   //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
250 283
   #define  DEFAULT_bedKp 10.00
251 284
   #define  DEFAULT_bedKi .023
252 285
   #define  DEFAULT_bedKd 305.4
253 286
 
254
-  //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
287
+  //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
255 288
   //from pidautotune
256 289
   //#define  DEFAULT_bedKp 97.1
257 290
   //#define  DEFAULT_bedKi 1.41
@@ -276,16 +309,15 @@ Here are some standard links for getting your machine calibrated:
276 309
 //===========================================================================
277 310
 
278 311
 /**
279
- * Thermal Runaway Protection protects your printer from damage and fire if a
312
+ * Thermal Protection protects your printer from damage and fire if a
280 313
  * thermistor falls out or temperature sensors fail in any way.
281 314
  *
282 315
  * The issue: If a thermistor falls out or a temperature sensor fails,
283 316
  * Marlin can no longer sense the actual temperature. Since a disconnected
284 317
  * thermistor reads as a low temperature, the firmware will keep the heater on.
285 318
  *
286
- * The solution: Once the temperature reaches the target, start observing.
287
- * If the temperature stays too far below the target (hysteresis) for too long,
288
- * the firmware will halt as a safety precaution.
319
+ * If you get "Thermal Runaway" or "Heating failed" errors the
320
+ * details can be tuned in Configuration_adv.h
289 321
  */
290 322
 
291 323
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
@@ -306,8 +338,22 @@ Here are some standard links for getting your machine calibrated:
306 338
 // Enable this option for Toshiba steppers
307 339
 //#define CONFIG_STEPPERS_TOSHIBA
308 340
 
341
+//===========================================================================
342
+//============================== Endstop Settings ===========================
343
+//===========================================================================
344
+
309 345
 // @section homing
310 346
 
347
+// Specify here all the endstop connectors that are connected to any endstop or probe.
348
+// Almost all printers will be using one per axis. Probes will use one or more of the
349
+// extra connectors. Leave undefined any used for non-endstop and non-probe purposes.
350
+#define USE_XMIN_PLUG
351
+#define USE_YMIN_PLUG
352
+#define USE_ZMIN_PLUG
353
+//#define USE_XMAX_PLUG
354
+//#define USE_YMAX_PLUG
355
+//#define USE_ZMAX_PLUG
356
+
311 357
 // coarse Endstop Settings
312 358
 #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
313 359
 
@@ -330,13 +376,53 @@ const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
330 376
 const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
331 377
 const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
332 378
 const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
333
-//#define DISABLE_MAX_ENDSTOPS
334
-//#define DISABLE_MIN_ENDSTOPS
335 379
 
336
-// If you want to enable the Z probe pin, but disable its use, uncomment the line below.
337
-// This only affects a Z probe endstop if you have separate Z min endstop as well and have
338
-// activated Z_MIN_PROBE_ENDSTOP below. If you are using the Z Min endstop on your Z probe,
339
-// this has no effect.
380
+//===========================================================================
381
+//============================= Z Probe Options =============================
382
+//===========================================================================
383
+
384
+// Enable Z_MIN_PROBE_ENDSTOP to use _both_ a Z Probe and a Z-min-endstop on the same machine.
385
+// With this option the Z_MIN_PROBE_PIN will only be used for probing, never for homing.
386
+//
387
+// *** PLEASE READ ALL INSTRUCTIONS BELOW FOR SAFETY! ***
388
+//
389
+// To continue using the Z-min-endstop for homing, be sure to disable Z_SAFE_HOMING.
390
+// Example: To park the head outside the bed area when homing with G28.
391
+//
392
+// To use a separate Z probe, your board must define a Z_MIN_PROBE_PIN.
393
+//
394
+// For a servo-based Z probe, you must set up servo support below, including
395
+// NUM_SERVOS, Z_ENDSTOP_SERVO_NR and SERVO_ENDSTOP_ANGLES.
396
+//
397
+// - RAMPS 1.3/1.4 boards may be able to use the 5V, GND, and Aux4->D32 pin.
398
+// - Use 5V for powered (usu. inductive) sensors.
399
+// - Otherwise connect:
400
+//   - normally-closed switches to GND and D32.
401
+//   - normally-open switches to 5V and D32.
402
+//
403
+// Normally-closed switches are advised and are the default.
404
+//
405
+// The Z_MIN_PROBE_PIN sets the Arduino pin to use. (See your board's pins file.)
406
+// Since the RAMPS Aux4->D32 pin maps directly to the Arduino D32 pin, D32 is the
407
+// default pin for all RAMPS-based boards. Some other boards map differently.
408
+// To set or change the pin for your board, edit the appropriate pins_XXXXX.h file.
409
+//
410
+// WARNING:
411
+// Setting the wrong pin may have unexpected and potentially disastrous consequences.
412
+// Use with caution and do your homework.
413
+//
414
+//#define Z_MIN_PROBE_ENDSTOP
415
+
416
+// Enable Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN to use the Z_MIN_PIN for your Z_MIN_PROBE.
417
+// The Z_MIN_PIN will then be used for both Z-homing and probing.
418
+#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
419
+
420
+// To use a probe you must enable one of the two options above!
421
+
422
+// This option disables the use of the Z_MIN_PROBE_PIN
423
+// To enable the Z probe pin but disable its use, uncomment the line below. This only affects a
424
+// Z probe switch if you have a separate Z min endstop also and have activated Z_MIN_PROBE_ENDSTOP above.
425
+// If you're using the Z MIN endstop connector for your Z probe, this has no effect.
340 426
 //#define DISABLE_Z_MIN_PROBE_ENDSTOP
341 427
 
342 428
 // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
@@ -346,11 +432,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
346 432
 #define Z_ENABLE_ON 0
347 433
 #define E_ENABLE_ON 0 // For all extruders
348 434
 
349
-// Disables axis when it's not being used.
435
+// Disables axis stepper immediately when it's not being used.
350 436
 // WARNING: When motors turn off there is a chance of losing position accuracy!
351 437
 #define DISABLE_X false
352 438
 #define DISABLE_Y false
353 439
 #define DISABLE_Z false
440
+// Warn on display about possibly reduced accuracy
441
+//#define DISABLE_REDUCED_ACCURACY_WARNING
354 442
 
355 443
 // @section extruder
356 444
 
@@ -373,6 +461,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
373 461
 #define INVERT_E3_DIR false
374 462
 
375 463
 // @section homing
464
+//#define MIN_Z_HEIGHT_FOR_HOMING 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
465
+                                    // Be sure you have this distance over your Z_MAX_POS in case.
376 466
 
377 467
 // ENDSTOP SETTINGS:
378 468
 // Sets direction of endstops when homing; 1=MAX, -1=MIN
@@ -408,24 +498,26 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
408 498
 #endif
409 499
 
410 500
 //===========================================================================
411
-//=========================== Manual Bed Leveling ===========================
501
+//============================ Mesh Bed Leveling ============================
412 502
 //===========================================================================
413 503
 
414
-//#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
415 504
 //#define MESH_BED_LEVELING    // Enable mesh bed leveling.
416 505
 
417
-#if ENABLED(MANUAL_BED_LEVELING)
418
-  #define MBL_Z_STEP 0.025  // Step size while manually probing Z axis.
419
-#endif  // MANUAL_BED_LEVELING
420
-
421 506
 #if ENABLED(MESH_BED_LEVELING)
422 507
   #define MESH_MIN_X 10
423
-  #define MESH_MAX_X (X_MAX_POS - MESH_MIN_X)
508
+  #define MESH_MAX_X (X_MAX_POS - (MESH_MIN_X))
424 509
   #define MESH_MIN_Y 10
425
-  #define MESH_MAX_Y (Y_MAX_POS - MESH_MIN_Y)
510
+  #define MESH_MAX_Y (Y_MAX_POS - (MESH_MIN_Y))
426 511
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
427 512
   #define MESH_NUM_Y_POINTS 3
428 513
   #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0.
514
+
515
+  //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
516
+
517
+  #if ENABLED(MANUAL_BED_LEVELING)
518
+    #define MBL_Z_STEP 0.025  // Step size while manually probing Z axis.
519
+  #endif  // MANUAL_BED_LEVELING
520
+
429 521
 #endif  // MESH_BED_LEVELING
430 522
 
431 523
 //===========================================================================
@@ -434,10 +526,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
434 526
 
435 527
 // @section bedlevel
436 528
 
437
-
438 529
 //#define AUTO_BED_LEVELING_FEATURE // Delete the comment to enable (remove // at the start of the line)
439 530
 //#define DEBUG_LEVELING_FEATURE
440
-#define Z_MIN_PROBE_REPEATABILITY_TEST  // If not commented out, Z-Probe Repeatability test will be included if Auto Bed Leveling is Enabled.
531
+#define Z_MIN_PROBE_REPEATABILITY_TEST  // If not commented out, Z Probe Repeatability test will be included if Auto Bed Leveling is Enabled.
441 532
 
442 533
 #if ENABLED(AUTO_BED_LEVELING_FEATURE)
443 534
 
@@ -449,7 +540,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
449 540
   //   This mode is preferred because there are more measurements.
450 541
   //
451 542
   // - "3-point" mode
452
-  //   Probe 3 arbitrary points on the bed (that aren't colinear)
543
+  //   Probe 3 arbitrary points on the bed (that aren't collinear)
453 544
   //   You specify the XY coordinates of all 3 points.
454 545
 
455 546
   // Enable this to sample the bed in a grid (least squares solution).
@@ -463,7 +554,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
463 554
     #define FRONT_PROBE_BED_POSITION 20
464 555
     #define BACK_PROBE_BED_POSITION 170
465 556
 
466
-    #define MIN_PROBE_EDGE 10 // The Z probe square sides can be no smaller than this.
557
+    #define MIN_PROBE_EDGE 10 // The Z probe minimum square sides can be no smaller than this.
467 558
 
468 559
     // Set the number of grid points per dimension.
469 560
     // You probably don't need more than 3 (squared=9).
@@ -471,25 +562,37 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
471 562
 
472 563
   #else  // !AUTO_BED_LEVELING_GRID
473 564
 
474
-      // Arbitrary points to probe.
475
-      // A simple cross-product is used to estimate the plane of the bed.
476
-      #define ABL_PROBE_PT_1_X 15
477
-      #define ABL_PROBE_PT_1_Y 180
478
-      #define ABL_PROBE_PT_2_X 15
479
-      #define ABL_PROBE_PT_2_Y 20
480
-      #define ABL_PROBE_PT_3_X 170
481
-      #define ABL_PROBE_PT_3_Y 20
565
+    // Arbitrary points to probe.
566
+    // A simple cross-product is used to estimate the plane of the bed.
567
+    #define ABL_PROBE_PT_1_X 15
568
+    #define ABL_PROBE_PT_1_Y 180
569
+    #define ABL_PROBE_PT_2_X 15
570
+    #define ABL_PROBE_PT_2_Y 20
571
+    #define ABL_PROBE_PT_3_X 170
572
+    #define ABL_PROBE_PT_3_Y 20
482 573
 
483 574
   #endif // AUTO_BED_LEVELING_GRID
484 575
 
485
-  // Offsets to the Z probe relative to the nozzle tip.
576
+  // Z Probe to nozzle (X,Y) offset, relative to (0, 0).
486 577
   // X and Y offsets must be integers.
487
-  #define X_PROBE_OFFSET_FROM_EXTRUDER -25     // Z probe to nozzle X offset: -left  +right
488
-  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29     // Z probe to nozzle Y offset: -front +behind
489
-  #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35  // Z probe to nozzle Z offset: -below (always!)
490
-
491
-  #define Z_RAISE_BEFORE_HOMING 4       // (in mm) Raise Z axis before homing (G28) for Z probe clearance.
492
-                                        // Be sure you have this distance over your Z_MAX_POS in case.
578
+  //
579
+  // In the following example the X and Y offsets are both positive:
580
+  // #define X_PROBE_OFFSET_FROM_EXTRUDER 10
581
+  // #define Y_PROBE_OFFSET_FROM_EXTRUDER 10
582
+  //
583
+  //    +-- BACK ---+
584
+  //    |           |
585
+  //  L |    (+) P  | R <-- probe (20,20)
586
+  //  E |           | I
587
+  //  F | (-) N (+) | G <-- nozzle (10,10)
588
+  //  T |           | H
589
+  //    |    (-)    | T
590
+  //    |           |
591
+  //    O-- FRONT --+
592
+  //  (0,0)
593
+  #define X_PROBE_OFFSET_FROM_EXTRUDER -25     // X offset: -left  [of the nozzle] +right
594
+  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29     // Y offset: -front [of the nozzle] +behind
595
+  #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35  // Z offset: -below [the nozzle] (always negative!)
493 596
 
494 597
   #define XY_TRAVEL_SPEED 8000         // X and Y axis travel speed between probes, in mm/min.
495 598
 
@@ -497,16 +600,29 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
497 600
   #define Z_RAISE_BETWEEN_PROBINGS 5  // How much the Z axis will be raised when traveling from between next probing points.
498 601
   #define Z_RAISE_AFTER_PROBING 15    // How much the Z axis will be raised after the last probing point.
499 602
 
500
-//#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" // These commands will be executed in the end of G29 routine.
501
-                                                                            // Useful to retract a deployable Z probe.
603
+  //#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" // These commands will be executed in the end of G29 routine.
604
+                                                                             // Useful to retract a deployable Z probe.
605
+
606
+  // Probes are sensors/switches that need to be activated before they can be used
607
+  // and deactivated after the use.
608
+  // Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, ... . You have to activate one of these for the AUTO_BED_LEVELING_FEATURE
609
+
610
+  // A fix mounted probe, like the normal inductive probe, must be deactivated to go below Z_PROBE_OFFSET_FROM_EXTRUDER
611
+  // when the hardware endstops are active.
612
+  //#define FIX_MOUNTED_PROBE
502 613
 
503
-  //#define Z_PROBE_SLED // Turn on if you have a Z probe mounted on a sled like those designed by Charles Bell.
614
+  // A Servo Probe can be defined in the servo section below.
615
+
616
+  // An Allen Key Probe is currently predefined only in the delta example configurations.
617
+
618
+  //#define Z_PROBE_SLED // Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
504 619
   //#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
505 620
 
506
-// If you have enabled the bed auto leveling and are using the same Z probe for Z homing,
507
-// it is highly recommended you let this Z_SAFE_HOMING enabled!!!
621
+  // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing,
622
+  // it is highly recommended you leave Z_SAFE_HOMING enabled!
508 623
 
509
-  #define Z_SAFE_HOMING   // This feature is meant to avoid Z homing with Z probe outside the bed area.
624
+  #define Z_SAFE_HOMING   // Use the z-min-probe for homing to z-min - not the z-min-endstop.
625
+                          // This feature is meant to avoid Z homing with Z probe outside the bed area.
510 626
                           // When defined, it will:
511 627
                           // - Allow Z homing only after X and Y homing AND stepper drivers still enabled.
512 628
                           // - If stepper drivers timeout, it will need X and Y homing again before Z homing.
@@ -520,37 +636,6 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
520 636
 
521 637
   #endif
522 638
 
523
-  // Support for a dedicated Z probe endstop separate from the Z min endstop.
524
-  // If you would like to use both a Z probe and a Z min endstop together,
525
-  // uncomment #define Z_MIN_PROBE_ENDSTOP and read the instructions below.
526
-  // If you still want to use the Z min endstop for homing, disable Z_SAFE_HOMING above.
527
-  // Example: To park the head outside the bed area when homing with G28.
528
-  //
529
-  // WARNING:
530
-  // The Z min endstop will need to set properly as it would without a Z probe
531
-  // to prevent head crashes and premature stopping during a print.
532
-  //
533
-  // To use a separate Z probe endstop, you must have a Z_MIN_PROBE_PIN
534
-  // defined in the pins_XXXXX.h file for your control board.
535
-  // If you are using a servo based Z probe, you will need to enable NUM_SERVOS,
536
-  // Z_ENDSTOP_SERVO_NR and SERVO_ENDSTOP_ANGLES in the R/C SERVO support below.
537
-  // RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin
538
-  // in the Aux 4 section of the RAMPS board. Use 5V for powered sensors,
539
-  // otherwise connect to ground and D32 for normally closed configuration
540
-  // and 5V and D32 for normally open configurations.
541
-  // Normally closed configuration is advised and assumed.
542
-  // The D32 pin in Aux 4 on RAMPS maps to the Arduino D32 pin.
543
-  // Z_MIN_PROBE_PIN is setting the pin to use on the Arduino.
544
-  // Since the D32 pin on the RAMPS maps to D32 on Arduino, this works.
545
-  // D32 is currently selected in the RAMPS 1.3/1.4 pin file.
546
-  // All other boards will need changes to the respective pins_XXXXX.h file.
547
-  //
548
-  // WARNING:
549
-  // Setting the wrong pin may have unexpected and potentially disastrous outcomes.
550
-  // Use with caution and do your homework.
551
-  //
552
-  //#define Z_MIN_PROBE_ENDSTOP
553
-
554 639
 #endif // AUTO_BED_LEVELING_FEATURE
555 640
 
556 641
 
@@ -625,6 +710,14 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
625 710
 #endif
626 711
 
627 712
 //
713
+// Host Keepalive
714
+//
715
+// By default Marlin will send a busy status message to the host
716
+// every 10 seconds when it can't accept commands.
717
+//
718
+//#define DISABLE_HOST_KEEPALIVE // Enable this option if your host doesn't like keepalive messages.
719
+
720
+//
628 721
 // M100 Free Memory Watcher
629 722
 //
630 723
 //#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
@@ -644,13 +737,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
644 737
 // @section lcd
645 738
 
646 739
 // Define your display language below. Replace (en) with your language code and uncomment.
647
-// en, pl, fr, de, es, ru, bg, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, cn, test
740
+// en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8, fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test
648 741
 // See also language.h
649 742
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
650 743
 
651 744
 // Choose ONE of these 3 charsets. This has to match your hardware. Ignored for full graphic display.
652 745
 // To find out what type you have - compile with (test) - upload - click to get the menu. You'll see two typical lines from the upper half of the charset.
653
-// See also documentation/LCDLanguageFont.md
746
+// See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
654 747
   #define DISPLAY_CHARSET_HD44780_JAPAN        // this is the most common hardware
655 748
   //#define DISPLAY_CHARSET_HD44780_WESTERN
656 749
   //#define DISPLAY_CHARSET_HD44780_CYRILLIC
@@ -658,11 +751,12 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
658 751
 #define ULTRA_LCD  //general LCD support, also 16x2
659 752
 //#define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
660 753
 #define SDSUPPORT // Enable SD Card Support in Hardware Console
661
-//#define SDSLOW // Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
662
-//#define SDEXTRASLOW // Use even slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
754
+                  // Changed behaviour! If you need SDSUPPORT uncomment it!
755
+//#define SPI_SPEED SPI_HALF_SPEED // (also SPI_QUARTER_SPEED, SPI_EIGHTH_SPEED) Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
663 756
 //#define SD_CHECK_AND_RETRY // Use CRC checks and retries on the SD communication
664 757
 //#define ENCODER_PULSES_PER_STEP 1 // Increase if you have a high resolution encoder
665 758
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
759
+//#define REVERSE_MENU_DIRECTION // When enabled CLOCKWISE moves UP in the LCD menu
666 760
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
667 761
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
668 762
 //#define SPEAKER // The sound device is a speaker - not a buzzer. A buzzer resonates with his own frequency.
@@ -679,13 +773,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
679 773
 
680 774
 // The Panucatt Devices Viki 2.0 and mini Viki with Graphic LCD
681 775
 // http://panucatt.com
682
-// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
776
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
683 777
 //#define VIKI2
684 778
 //#define miniVIKI
685 779
 
686 780
 // This is a new controller currently under development.  https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
687 781
 //
688
-// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
782
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
689 783
 //#define ELB_FULL_GRAPHIC_CONTROLLER
690 784
 //#define SD_DETECT_INVERTED
691 785
 
@@ -700,7 +794,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
700 794
 // The RepRapDiscount FULL GRAPHIC Smart Controller (quadratic white PCB)
701 795
 // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
702 796
 //
703
-// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
797
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
704 798
 //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
705 799
 
706 800
 // The RepRapWorld REPRAPWORLD_KEYPAD v1.1
@@ -717,12 +811,17 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
717 811
 // http://reprap.org/wiki/Mini_panel
718 812
 //#define MINIPANEL
719 813
 
814
+// BQ SMART FULL GRAPHIC CONTROLLER
815
+//#define BQ_LCD_SMART_CONTROLLER
816
+
720 817
 /**
721 818
  * I2C Panels
722 819
  */
723 820
 
724 821
 //#define LCD_I2C_SAINSMART_YWROBOT
725 822
 
823
+//#define LCM1602 // LCM1602 Adapter for 16x2 LCD
824
+
726 825
 // PANELOLU2 LCD with status LEDs, separate encoder and click inputs
727 826
 //
728 827
 // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
@@ -736,7 +835,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
736 835
 //#define LCD_I2C_VIKI
737 836
 
738 837
 // SSD1306 OLED generic display support
739
-// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
838
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
740 839
 //#define U8GLIB_SSD1306
741 840
 
742 841
 // Shift register panels
@@ -748,7 +847,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
748 847
 
749 848
 // @section extras
750 849
 
751
-// Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
850
+// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino
752 851
 //#define FAST_PWM_FAN
753 852
 
754 853
 // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
@@ -828,21 +927,23 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
828 927
  * Note may require analog pins to be defined for different motherboards
829 928
  **********************************************************************/
830 929
 // Uncomment below to enable
831
-//#define FILAMENT_SENSOR
832
-
833
-#define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
834
-#define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
930
+//#define FILAMENT_WIDTH_SENSOR
835 931
 
836 932
 #define DEFAULT_NOMINAL_FILAMENT_DIA 3.00  //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software.  Used for sensor reading validation
837
-#define MEASURED_UPPER_LIMIT         3.30  //upper limit factor used for sensor reading validation in mm
838
-#define MEASURED_LOWER_LIMIT         1.90  //lower limit factor for sensor reading validation in mm
839
-#define MAX_MEASUREMENT_DELAY       20     //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM  and lower number saves RAM)
840 933
 
841
-//defines used in the code
842
-#define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially
934
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
935
+  #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
936
+  #define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
937
+
938
+  #define MEASURED_UPPER_LIMIT         3.30  //upper limit factor used for sensor reading validation in mm
939
+  #define MEASURED_LOWER_LIMIT         1.90  //lower limit factor for sensor reading validation in mm
940
+  #define MAX_MEASUREMENT_DELAY       20     //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM  and lower number saves RAM)
843 941
 
844
-//When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status.  Status will appear for 5 sec.
845
-//#define FILAMENT_LCD_DISPLAY
942
+  #define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially
943
+
944
+  //When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status.  Status will appear for 5 sec.
945
+  //#define FILAMENT_LCD_DISPLAY
946
+#endif
846 947
 
847 948
 #include "Configuration_adv.h"
848 949
 #include "thermistortables.h"

+ 123
- 69
Marlin/example_configurations/Hephestos/Configuration_adv.h View File

@@ -1,3 +1,35 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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
+/**
24
+ * Configuration_adv.h
25
+ *
26
+ * Advanced settings.
27
+ * Only change these if you know exactly what you're doing.
28
+ * Some of these settings can damage your printer if improperly set!
29
+ *
30
+ * Basic settings can be found in Configuration.h
31
+ *
32
+ */
1 33
 #ifndef CONFIGURATION_ADV_H
2 34
 #define CONFIGURATION_ADV_H
3 35
 
@@ -9,13 +41,26 @@
9 41
 //=============================Thermal Settings  ============================
10 42
 //===========================================================================
11 43
 
12
-#if ENABLED(BED_LIMIT_SWITCHING)
13
-  #define BED_HYSTERESIS 2 //only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS
44
+#if DISABLED(PIDTEMPBED)
45
+  #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control
46
+  #if ENABLED(BED_LIMIT_SWITCHING)
47
+    #define BED_HYSTERESIS 2 // Only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS
48
+  #endif
14 49
 #endif
15
-#define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control
16 50
 
17 51
 /**
18
- * Thermal Protection parameters
52
+ * Thermal Protection protects your printer from damage and fire if a
53
+ * thermistor falls out or temperature sensors fail in any way.
54
+ *
55
+ * The issue: If a thermistor falls out or a temperature sensor fails,
56
+ * Marlin can no longer sense the actual temperature. Since a disconnected
57
+ * thermistor reads as a low temperature, the firmware will keep the heater on.
58
+ *
59
+ * The solution: Once the temperature reaches the target, start observing.
60
+ * If the temperature stays too far below the target (hysteresis) for too long (period),
61
+ * the firmware will halt the machine as a safety precaution.
62
+ *
63
+ * If you get false positives for "Thermal Runaway" increase THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
19 64
  */
20 65
 #if ENABLED(THERMAL_PROTECTION_HOTENDS)
21 66
   #define THERMAL_PROTECTION_PERIOD 40        // Seconds
@@ -26,26 +71,24 @@
26 71
    * WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
27 72
    * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
28 73
    * but only if the current temperature is far enough below the target for a reliable test.
74
+   *
75
+   * If you get false positives for "Heating failed" increase WATCH_TEMP_PERIOD and/or decrease WATCH_TEMP_INCREASE
76
+   * WATCH_TEMP_INCREASE should not be below 2.
29 77
    */
30
-  #define WATCH_TEMP_PERIOD 16                // Seconds
31
-  #define WATCH_TEMP_INCREASE 4               // Degrees Celsius
78
+  #define WATCH_TEMP_PERIOD 20                // Seconds
79
+  #define WATCH_TEMP_INCREASE 2               // Degrees Celsius
32 80
 #endif
33 81
 
82
+/**
83
+ * Thermal Protection parameters for the bed
84
+ * are like the above for the hotends.
85
+ * WATCH_TEMP_BED_PERIOD and WATCH_TEMP_BED_INCREASE are not imlemented now.
86
+ */
34 87
 #if ENABLED(THERMAL_PROTECTION_BED)
35 88
   #define THERMAL_PROTECTION_BED_PERIOD 20    // Seconds
36 89
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
37 90
 #endif
38 91
 
39
-/**
40
- * Automatic Temperature:
41
- * The hotend target temperature is calculated by all the buffered lines of gcode.
42
- * The maximum buffered steps/sec of the extruder motor is called "se".
43
- * Start autotemp mode with M109 S<mintemp> B<maxtemp> F<factor>
44
- * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by
45
- * mintemp and maxtemp. Turn this off by excuting M109 without F*
46
- * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp.
47
- * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
48
- */
49 92
 #if ENABLED(PIDTEMP)
50 93
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
51 94
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.
@@ -56,14 +99,16 @@
56 99
   #endif
57 100
 #endif
58 101
 
59
-
60
-//automatic temperature: The hot end target temperature is calculated by all the buffered lines of gcode.
61
-//The maximum buffered steps/sec of the extruder motor are called "se".
62
-//You enter the autotemp mode by a M109 S<mintemp> B<maxtemp> F<factor>
63
-// the target temperature is set to mintemp+factor*se[steps/sec] and limited by mintemp and maxtemp
64
-// you exit the value by any M109 without F*
65
-// Also, if the temperature is set to a value <mintemp, it is not changed by autotemp.
66
-// on an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
102
+/**
103
+ * Automatic Temperature:
104
+ * The hotend target temperature is calculated by all the buffered lines of gcode.
105
+ * The maximum buffered steps/sec of the extruder motor is called "se".
106
+ * Start autotemp mode with M109 S<mintemp> B<maxtemp> F<factor>
107
+ * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by
108
+ * mintemp and maxtemp. Turn this off by executing M109 without F*
109
+ * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp.
110
+ * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
111
+ */
67 112
 #define AUTOTEMP
68 113
 #if ENABLED(AUTOTEMP)
69 114
   #define AUTOTEMP_OLDWEIGHT 0.98
@@ -156,9 +201,7 @@
156 201
   //#define Z_DUAL_ENDSTOPS
157 202
 
158 203
   #if ENABLED(Z_DUAL_ENDSTOPS)
159
-    #define Z2_MAX_PIN 36                     //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36)
160
-    const bool Z2_MAX_ENDSTOP_INVERTING = false;
161
-    #define DISABLE_XMAX_ENDSTOP              //Better to disable the XMAX to avoid conflict. Just rename "XMAX_ENDSTOP" by the endstop you are using for Z2 axis.
204
+    #define Z2_USE_ENDSTOP _XMAX_
162 205
   #endif
163 206
 
164 207
 #endif // Z_DUAL_STEPPER_DRIVERS
@@ -240,7 +283,13 @@
240 283
 #define INVERT_E_STEP_PIN false
241 284
 
242 285
 // Default stepper release if idle. Set to 0 to deactivate.
286
+// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true.
287
+// Time can be set by M18 and M84.
243 288
 #define DEFAULT_STEPPER_DEACTIVE_TIME 60
289
+#define DISABLE_INACTIVE_X true
290
+#define DISABLE_INACTIVE_Y true
291
+#define DISABLE_INACTIVE_Z true  // set to false if the nozzle will fall down on your printed part when print has finished.
292
+#define DISABLE_INACTIVE_E true
244 293
 
245 294
 #define DEFAULT_MINIMUMFEEDRATE       0.0     // minimum feedrate
246 295
 #define DEFAULT_MINTRAVELFEEDRATE     0.0
@@ -276,6 +325,9 @@
276 325
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
277 326
 #define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
278 327
 
328
+// Motor Current controlled via PWM (Overridable on supported boards with PWM-driven motor driver current)
329
+//#define PWM_MOTOR_CURRENT {1300, 1300, 1250} // Values in milliamps
330
+
279 331
 // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
280 332
 //#define DIGIPOT_I2C
281 333
 // Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8
@@ -349,17 +401,16 @@
349 401
   //#define USE_SMALL_INFOFONT
350 402
 #endif // DOGLCD
351 403
 
352
-
353 404
 // @section more
354 405
 
355 406
 // The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
356
-//#define USE_WATCHDOG
407
+#define USE_WATCHDOG
357 408
 
358 409
 #if ENABLED(USE_WATCHDOG)
359
-// If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
360
-// The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset.
361
-//  However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled.
362
-//#define WATCHDOG_RESET_MANUAL
410
+  // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
411
+  // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset.
412
+  //  However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled.
413
+  //#define WATCHDOG_RESET_MANUAL
363 414
 #endif
364 415
 
365 416
 // @section lcd
@@ -370,6 +421,7 @@
370 421
 //#define BABYSTEPPING
371 422
 #if ENABLED(BABYSTEPPING)
372 423
   #define BABYSTEP_XY  //not only z, but also XY in the menu. more clutter, more functions
424
+                       //not implemented for deltabots!
373 425
   #define BABYSTEP_INVERT_Z false  //true for inverse movements in Z
374 426
   #define BABYSTEP_MULTIPLICATOR 1 //faster movements
375 427
 #endif
@@ -388,7 +440,6 @@
388 440
 #if ENABLED(ADVANCE)
389 441
   #define EXTRUDER_ADVANCE_K .0
390 442
   #define D_FILAMENT 1.75
391
-  #define STEPS_MM_E 100.47095761381482
392 443
 #endif
393 444
 
394 445
 // @section extras
@@ -397,7 +448,7 @@
397 448
 #define MM_PER_ARC_SEGMENT 1
398 449
 #define N_ARC_CORRECTION 25
399 450
 
400
-const unsigned int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement
451
+const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement
401 452
 
402 453
 // @section temperature
403 454
 
@@ -446,11 +497,11 @@ const unsigned int dropsegments=5; //everything with less than this number of st
446 497
   #define MIN_RETRACT 0.1                //minimum extruded mm to accept a automatic gcode retraction attempt
447 498
   #define RETRACT_LENGTH 3               //default retract length (positive mm)
448 499
   #define RETRACT_LENGTH_SWAP 13         //default swap retract length (positive mm), for extruder change
449
-  #define RETRACT_FEEDRATE 80*60         //default feedrate for retracting (mm/s)
500
+  #define RETRACT_FEEDRATE 80            //default feedrate for retracting (mm/s)
450 501
   #define RETRACT_ZLIFT 0                //default retract Z-lift
451 502
   #define RETRACT_RECOVER_LENGTH 0       //default additional recover length (mm, added to retract length when recovering)
452 503
   //#define RETRACT_RECOVER_LENGTH_SWAP 0  //default additional swap recover length (mm, added to retract length when recovering from extruder change)
453
-  #define RETRACT_RECOVER_FEEDRATE 8*60  //default feedrate for recovering from retraction (mm/s)
504
+  #define RETRACT_RECOVER_FEEDRATE 8     //default feedrate for recovering from retraction (mm/s)
454 505
 #endif
455 506
 
456 507
 // Add support for experimental filament exchange support M600; requires display
@@ -462,12 +513,15 @@ const unsigned int dropsegments=5; //everything with less than this number of st
462 513
     #define FILAMENTCHANGE_ZADD 10
463 514
     #define FILAMENTCHANGE_FIRSTRETRACT -2
464 515
     #define FILAMENTCHANGE_FINALRETRACT -100
516
+    #define AUTO_FILAMENT_CHANGE                //This extrude filament until you press the button on LCD
517
+    #define AUTO_FILAMENT_CHANGE_LENGTH 0.04    //Extrusion length on automatic extrusion loop
518
+    #define AUTO_FILAMENT_CHANGE_FEEDRATE 300   //Extrusion feedrate (mm/min) on automatic extrusion loop
465 519
   #endif
466 520
 #endif
467 521
 
468 522
 /******************************************************************************\
469 523
  * enable this section if you have TMC26X motor drivers.
470
- * you need to import the TMC26XStepper library into the arduino IDE for this
524
+ * you need to import the TMC26XStepper library into the Arduino IDE for this
471 525
  ******************************************************************************/
472 526
 
473 527
 // @section tmc
@@ -475,52 +529,52 @@ const unsigned int dropsegments=5; //everything with less than this number of st
475 529
 //#define HAVE_TMCDRIVER
476 530
 #if ENABLED(HAVE_TMCDRIVER)
477 531
 
478
-//#define X_IS_TMC
532
+  //#define X_IS_TMC
479 533
   #define X_MAX_CURRENT 1000  //in mA
480 534
   #define X_SENSE_RESISTOR 91 //in mOhms
481 535
   #define X_MICROSTEPS 16     //number of microsteps
482 536
 
483
-//#define X2_IS_TMC
537
+  //#define X2_IS_TMC
484 538
   #define X2_MAX_CURRENT 1000  //in mA
485 539
   #define X2_SENSE_RESISTOR 91 //in mOhms
486 540
   #define X2_MICROSTEPS 16     //number of microsteps
487 541
 
488
-//#define Y_IS_TMC
542
+  //#define Y_IS_TMC
489 543
   #define Y_MAX_CURRENT 1000  //in mA
490 544
   #define Y_SENSE_RESISTOR 91 //in mOhms
491 545
   #define Y_MICROSTEPS 16     //number of microsteps
492 546
 
493
-//#define Y2_IS_TMC
547
+  //#define Y2_IS_TMC
494 548
   #define Y2_MAX_CURRENT 1000  //in mA
495 549
   #define Y2_SENSE_RESISTOR 91 //in mOhms
496 550
   #define Y2_MICROSTEPS 16     //number of microsteps
497 551
 
498
-//#define Z_IS_TMC
552
+  //#define Z_IS_TMC
499 553
   #define Z_MAX_CURRENT 1000  //in mA
500 554
   #define Z_SENSE_RESISTOR 91 //in mOhms
501 555
   #define Z_MICROSTEPS 16     //number of microsteps
502 556
 
503
-//#define Z2_IS_TMC
557
+  //#define Z2_IS_TMC
504 558
   #define Z2_MAX_CURRENT 1000  //in mA
505 559
   #define Z2_SENSE_RESISTOR 91 //in mOhms
506 560
   #define Z2_MICROSTEPS 16     //number of microsteps
507 561
 
508
-//#define E0_IS_TMC
562
+  //#define E0_IS_TMC
509 563
   #define E0_MAX_CURRENT 1000  //in mA
510 564
   #define E0_SENSE_RESISTOR 91 //in mOhms
511 565
   #define E0_MICROSTEPS 16     //number of microsteps
512 566
 
513
-//#define E1_IS_TMC
567
+  //#define E1_IS_TMC
514 568
   #define E1_MAX_CURRENT 1000  //in mA
515 569
   #define E1_SENSE_RESISTOR 91 //in mOhms
516 570
   #define E1_MICROSTEPS 16     //number of microsteps
517 571
 
518
-//#define E2_IS_TMC
572
+  //#define E2_IS_TMC
519 573
   #define E2_MAX_CURRENT 1000  //in mA
520 574
   #define E2_SENSE_RESISTOR 91 //in mOhms
521 575
   #define E2_MICROSTEPS 16     //number of microsteps
522 576
 
523
-//#define E3_IS_TMC
577
+  //#define E3_IS_TMC
524 578
   #define E3_MAX_CURRENT 1000  //in mA
525 579
   #define E3_SENSE_RESISTOR 91 //in mOhms
526 580
   #define E3_MICROSTEPS 16     //number of microsteps
@@ -529,7 +583,7 @@ const unsigned int dropsegments=5; //everything with less than this number of st
529 583
 
530 584
 /******************************************************************************\
531 585
  * enable this section if you have L6470  motor drivers.
532
- * you need to import the L6470 library into the arduino IDE for this
586
+ * you need to import the L6470 library into the Arduino IDE for this
533 587
  ******************************************************************************/
534 588
 
535 589
 // @section l6470
@@ -537,63 +591,63 @@ const unsigned int dropsegments=5; //everything with less than this number of st
537 591
 //#define HAVE_L6470DRIVER
538 592
 #if ENABLED(HAVE_L6470DRIVER)
539 593
 
540
-//#define X_IS_L6470
594
+  //#define X_IS_L6470
541 595
   #define X_MICROSTEPS 16     //number of microsteps
542
-  #define X_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
596
+  #define X_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
543 597
   #define X_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
544 598
   #define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall
545 599
 
546
-//#define X2_IS_L6470
600
+  //#define X2_IS_L6470
547 601
   #define X2_MICROSTEPS 16     //number of microsteps
548
-  #define X2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
602
+  #define X2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
549 603
   #define X2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
550 604
   #define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
551 605
 
552
-//#define Y_IS_L6470
606
+  //#define Y_IS_L6470
553 607
   #define Y_MICROSTEPS 16     //number of microsteps
554
-  #define Y_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
608
+  #define Y_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
555 609
   #define Y_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
556 610
   #define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall
557 611
 
558
-//#define Y2_IS_L6470
612
+  //#define Y2_IS_L6470
559 613
   #define Y2_MICROSTEPS 16     //number of microsteps
560
-  #define Y2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
614
+  #define Y2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
561 615
   #define Y2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
562 616
   #define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
563 617
 
564
-//#define Z_IS_L6470
618
+  //#define Z_IS_L6470
565 619
   #define Z_MICROSTEPS 16     //number of microsteps
566
-  #define Z_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
620
+  #define Z_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
567 621
   #define Z_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
568 622
   #define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall
569 623
 
570
-//#define Z2_IS_L6470
624
+  //#define Z2_IS_L6470
571 625
   #define Z2_MICROSTEPS 16     //number of microsteps
572
-  #define Z2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
626
+  #define Z2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
573 627
   #define Z2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
574 628
   #define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
575 629
 
576
-//#define E0_IS_L6470
630
+  //#define E0_IS_L6470
577 631
   #define E0_MICROSTEPS 16     //number of microsteps
578
-  #define E0_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
632
+  #define E0_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
579 633
   #define E0_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
580 634
   #define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall
581 635
 
582
-//#define E1_IS_L6470
636
+  //#define E1_IS_L6470
583 637
   #define E1_MICROSTEPS 16     //number of microsteps
584
-  #define E1_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
638
+  #define E1_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
585 639
   #define E1_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
586 640
   #define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall
587 641
 
588
-//#define E2_IS_L6470
642
+  //#define E2_IS_L6470
589 643
   #define E2_MICROSTEPS 16     //number of microsteps
590
-  #define E2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
644
+  #define E2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
591 645
   #define E2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
592 646
   #define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
593 647
 
594
-//#define E3_IS_L6470
648
+  //#define E3_IS_L6470
595 649
   #define E3_MICROSTEPS 16     //number of microsteps
596
-  #define E3_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
650
+  #define E3_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
597 651
   #define E3_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
598 652
   #define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall
599 653
 

Marlin/configurator/config/Configuration.h → Marlin/example_configurations/Hephestos_2/Configuration.h View File

@@ -1,3 +1,40 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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
+/**
24
+ * Configuration.h
25
+ *
26
+ * Basic settings such as:
27
+ *
28
+ * - Type of electronics
29
+ * - Type of temperature sensor
30
+ * - Printer geometry
31
+ * - Endstop configuration
32
+ * - LCD controller
33
+ * - Extra features
34
+ *
35
+ * Advanced settings can be found in Configuration_adv.h
36
+ *
37
+ */
1 38
 #ifndef CONFIGURATION_H
2 39
 #define CONFIGURATION_H
3 40
 
@@ -7,8 +44,10 @@
7 44
 //===========================================================================
8 45
 //============================= Getting Started =============================
9 46
 //===========================================================================
10
-/*
11
-Here are some standard links for getting your machine calibrated:
47
+
48
+/**
49
+ * Here are some standard links for getting your machine calibrated:
50
+ *
12 51
  * http://reprap.org/wiki/Calibration
13 52
  * http://youtu.be/wAL9d7FgInk
14 53
  * http://calculator.josefprusa.cz
@@ -16,11 +55,7 @@ Here are some standard links for getting your machine calibrated:
16 55
  * http://www.thingiverse.com/thing:5573
17 56
  * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap
18 57
  * http://www.thingiverse.com/thing:298812
19
-*/
20
-
21
-// This configuration file contains the basic settings.
22
-// Advanced settings can be found in Configuration_adv.h
23
-// BASIC SETTINGS: select your board type, temperature sensor type, axis scaling, and endstop configuration
58
+ */
24 59
 
25 60
 //===========================================================================
26 61
 //============================= DELTA Printer ===============================
@@ -47,7 +82,7 @@ Here are some standard links for getting your machine calibrated:
47 82
 // User-specified version info of this build to display in [Pronterface, etc] terminal window during
48 83
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
49 84
 // build by the user have been successfully uploaded into firmware.
50
-#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
85
+#define STRING_CONFIG_H_AUTHOR "@jbrazio" // Who made the changes.
51 86
 #define SHOW_BOOTSCREEN
52 87
 #define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
53 88
 //#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
@@ -70,16 +105,16 @@ Here are some standard links for getting your machine calibrated:
70 105
 // The following define selects which electronics board you have.
71 106
 // Please choose the name from boards.h that matches your setup
72 107
 #ifndef MOTHERBOARD
73
-  #define MOTHERBOARD BOARD_RAMPS_13_EFB
108
+  #define MOTHERBOARD BOARD_BQ_ZUM_MEGA_3D
74 109
 #endif
75 110
 
76 111
 // Optional custom name for your RepStrap or other custom machine
77 112
 // Displayed in the LCD "Ready" message
78
-//#define CUSTOM_MACHINE_NAME "3D Printer"
113
+#define CUSTOM_MACHINE_NAME "BQ Hephestos 2"
79 114
 
80 115
 // Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines)
81 116
 // You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4)
82
-//#define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
117
+#define MACHINE_UUID "8d083632-40c5-4649-85b8-43d9ae6c5d55" // BQ Hephestos 2 standard config
83 118
 
84 119
 // This defines the number of extruders
85 120
 // :[1,2,3,4]
@@ -110,6 +145,7 @@ Here are some standard links for getting your machine calibrated:
110 145
 //--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table
111 146
 //
112 147
 //// Temperature sensor settings:
148
+// -3 is thermocouple with MAX31855 (only for sensor 0)
113 149
 // -2 is thermocouple with MAX6675 (only for sensor 0)
114 150
 // -1 is thermocouple with AD595
115 151
 // 0 is not used
@@ -129,6 +165,7 @@ Here are some standard links for getting your machine calibrated:
129 165
 // 13 is 100k Hisens 3950  1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
130 166
 // 20 is the PT100 circuit found in the Ultimainboard V2.x
131 167
 // 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
168
+// 70 is the 100K thermistor found in the bq Hephestos 2
132 169
 //
133 170
 //    1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k
134 171
 //                          (but gives greater accuracy and more stable PID)
@@ -144,8 +181,8 @@ Here are some standard links for getting your machine calibrated:
144 181
 //     Use it for Testing or Development purposes. NEVER for production machine.
145 182
 //#define DUMMY_THERMISTOR_998_VALUE 25
146 183
 //#define DUMMY_THERMISTOR_999_VALUE 100
147
-// :{ '0': "Not used", '4': "10k !! do not use for a hotend. Bad resolution at high temp. !!", '1': "100k / 4.7k - EPCOS", '51': "100k / 1k - EPCOS", '6': "100k / 4.7k EPCOS - Not as accurate as Table 1", '5': "100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '7': "100k / 4.7k Honeywell 135-104LAG-J01", '71': "100k / 4.7k Honeywell 135-104LAF-J01", '8': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9': "100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10': "100k / 4.7k RS 198-961", '11': "100k / 4.7k beta 3950 1%", '12': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13': "100k Hisens 3950  1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '60': "100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '55': "100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '2': "200k / 4.7k - ATC Semitec 204GT-2", '52': "200k / 1k - ATC Semitec 204GT-2", '-2': "Thermocouple + MAX6675 (only for sensor 0)", '-1': "Thermocouple + AD595", '3': "Mendel-parts / 4.7k", '1047': "Pt1000 / 4.7k", '1010': "Pt1000 / 1k (non standard)", '20': "PT100 (Ultimainboard V2.x)", '147': "Pt100 / 4.7k", '110': "Pt100 / 1k (non-standard)", '998': "Dummy 1", '999': "Dummy 2" }
148
-#define TEMP_SENSOR_0 1
184
+// :{ '0': "Not used", '4': "10k !! do not use for a hotend. Bad resolution at high temp. !!", '1': "100k / 4.7k - EPCOS", '51': "100k / 1k - EPCOS", '6': "100k / 4.7k EPCOS - Not as accurate as Table 1", '5': "100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '7': "100k / 4.7k Honeywell 135-104LAG-J01", '71': "100k / 4.7k Honeywell 135-104LAF-J01", '8': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9': "100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10': "100k / 4.7k RS 198-961", '11': "100k / 4.7k beta 3950 1%", '12': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13': "100k Hisens 3950  1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '60': "100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '55': "100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '2': "200k / 4.7k - ATC Semitec 204GT-2", '52': "200k / 1k - ATC Semitec 204GT-2", '-3': "Thermocouple + MAX31855 (only for sensor 0)", '-2': "Thermocouple + MAX6675 (only for sensor 0)", '-1': "Thermocouple + AD595", '3': "Mendel-parts / 4.7k", '1047': "Pt1000 / 4.7k", '1010': "Pt1000 / 1k (non standard)", '20': "PT100 (Ultimainboard V2.x)", '147': "Pt100 / 4.7k", '110': "Pt100 / 1k (non-standard)", '998': "Dummy 1", '999': "Dummy 2" }
185
+#define TEMP_SENSOR_0 70
149 186
 #define TEMP_SENSOR_1 0
150 187
 #define TEMP_SENSOR_2 0
151 188
 #define TEMP_SENSOR_3 0
@@ -172,20 +209,15 @@ Here are some standard links for getting your machine calibrated:
172 209
 // When temperature exceeds max temp, your heater will be switched off.
173 210
 // This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure!
174 211
 // You should use MINTEMP for thermistor short/failure protection.
175
-#define HEATER_0_MAXTEMP 275
212
+#define HEATER_0_MAXTEMP 250
176 213
 #define HEATER_1_MAXTEMP 275
177 214
 #define HEATER_2_MAXTEMP 275
178 215
 #define HEATER_3_MAXTEMP 275
179 216
 #define BED_MAXTEMP 150
180 217
 
181
-// If your bed has low resistance e.g. .6 ohm and throws the fuse you can duty cycle it to reduce the
182
-// average current. The value should be an integer and the heat bed will be turned on for 1 interval of
183
-// HEATER_BED_DUTY_CYCLE_DIVIDER intervals.
184
-//#define HEATER_BED_DUTY_CYCLE_DIVIDER 4
185
-
186 218
 // If you want the M105 heater power reported in watts, define the BED_WATTS, and (shared for all extruders) EXTRUDER_WATTS
187
-//#define EXTRUDER_WATTS (12.0*12.0/6.7) //  P=I^2/R
188
-//#define BED_WATTS (12.0*12.0/1.1)      // P=I^2/R
219
+//#define EXTRUDER_WATTS (12.0*12.0/6.7) // P=U^2/R
220
+//#define BED_WATTS (12.0*12.0/1.1)      // P=U^2/R
189 221
 
190 222
 //===========================================================================
191 223
 //============================= PID Settings ================================
@@ -197,31 +229,26 @@ Here are some standard links for getting your machine calibrated:
197 229
 #define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
198 230
 #define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
199 231
 #if ENABLED(PIDTEMP)
232
+  //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
200 233
   //#define PID_DEBUG // Sends debug data to the serial port.
201 234
   //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
202 235
   //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
203 236
   //#define PID_PARAMS_PER_EXTRUDER // Uses separate PID parameters for each extruder (useful for mismatched extruders)
204 237
                                     // Set/get with gcode: M301 E[extruder number, 0-2]
205
-  #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
206
-                                  // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
238
+  #define PID_FUNCTIONAL_RANGE 250  // If the temperature difference between the target temperature and the actual temperature
239
+                                    // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
207 240
   #define PID_INTEGRAL_DRIVE_MAX PID_MAX  //limit for the integral term
208 241
   #define K1 0.95 //smoothing factor within the PID
209 242
 
210
-  // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
211
-  // Ultimaker
212
-  #define  DEFAULT_Kp 22.2
213
-  #define  DEFAULT_Ki 1.08
214
-  #define  DEFAULT_Kd 114
215
-
216
-  // MakerGear
217
-  //#define  DEFAULT_Kp 7.0
218
-  //#define  DEFAULT_Ki 0.1
219
-  //#define  DEFAULT_Kd 12
243
+  // Tuned PID values using M303
244
+  #define  DEFAULT_Kp 19.18
245
+  #define  DEFAULT_Ki 1.36
246
+  #define  DEFAULT_Kd 67.42
220 247
 
221
-  // Mendel Parts V9 on 12V
222
-  //#define  DEFAULT_Kp 63.0
223
-  //#define  DEFAULT_Ki 2.25
224
-  //#define  DEFAULT_Kd 440
248
+  // BQ firmware stock PID values
249
+  //#define  DEFAULT_Kp 10.7
250
+  //#define  DEFAULT_Ki 0.45
251
+  //#define  DEFAULT_Kd 3
225 252
 
226 253
 #endif // PIDTEMP
227 254
 
@@ -247,19 +274,19 @@ Here are some standard links for getting your machine calibrated:
247 274
 // so you shouldn't use it unless you are OK with PWM on your bed.  (see the comment on enabling PIDTEMPBED)
248 275
 #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
249 276
 
250
-//#define PID_BED_DEBUG // Sends debug data to the serial port.
251
-
252 277
 #if ENABLED(PIDTEMPBED)
253 278
 
279
+  //#define PID_BED_DEBUG // Sends debug data to the serial port.
280
+
254 281
   #define PID_BED_INTEGRAL_DRIVE_MAX MAX_BED_POWER //limit for the integral term
255 282
 
256
-  //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
283
+  //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
257 284
   //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
258 285
   #define  DEFAULT_bedKp 10.00
259 286
   #define  DEFAULT_bedKi .023
260 287
   #define  DEFAULT_bedKd 305.4
261 288
 
262
-  //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
289
+  //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
263 290
   //from pidautotune
264 291
   //#define  DEFAULT_bedKp 97.1
265 292
   //#define  DEFAULT_bedKi 1.41
@@ -284,16 +311,15 @@ Here are some standard links for getting your machine calibrated:
284 311
 //===========================================================================
285 312
 
286 313
 /**
287
- * Thermal Runaway Protection protects your printer from damage and fire if a
314
+ * Thermal Protection protects your printer from damage and fire if a
288 315
  * thermistor falls out or temperature sensors fail in any way.
289 316
  *
290 317
  * The issue: If a thermistor falls out or a temperature sensor fails,
291 318
  * Marlin can no longer sense the actual temperature. Since a disconnected
292 319
  * thermistor reads as a low temperature, the firmware will keep the heater on.
293 320
  *
294
- * The solution: Once the temperature reaches the target, start observing.
295
- * If the temperature stays too far below the target (hysteresis) for too long,
296
- * the firmware will halt as a safety precaution.
321
+ * If you get "Thermal Runaway" or "Heating failed" errors the
322
+ * details can be tuned in Configuration_adv.h
297 323
  */
298 324
 
299 325
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
@@ -314,8 +340,22 @@ Here are some standard links for getting your machine calibrated:
314 340
 // Enable this option for Toshiba steppers
315 341
 //#define CONFIG_STEPPERS_TOSHIBA
316 342
 
343
+//===========================================================================
344
+//============================== Endstop Settings ===========================
345
+//===========================================================================
346
+
317 347
 // @section homing
318 348
 
349
+// Specify here all the endstop connectors that are connected to any endstop or probe.
350
+// Almost all printers will be using one per axis. Probes will use one or more of the
351
+// extra connectors. Leave undefined any used for non-endstop and non-probe purposes.
352
+#define USE_XMIN_PLUG
353
+#define USE_YMIN_PLUG
354
+#define USE_ZMIN_PLUG
355
+//#define USE_XMAX_PLUG
356
+//#define USE_YMAX_PLUG
357
+//#define USE_ZMAX_PLUG
358
+
319 359
 // coarse Endstop Settings
320 360
 #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
321 361
 
@@ -331,20 +371,60 @@ Here are some standard links for getting your machine calibrated:
331 371
 #endif
332 372
 
333 373
 // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
334
-const bool X_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
335
-const bool Y_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
374
+const bool X_MIN_ENDSTOP_INVERTING = true;  // set to true to invert the logic of the endstop.
375
+const bool Y_MIN_ENDSTOP_INVERTING = true;  // set to true to invert the logic of the endstop.
336 376
 const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
337
-const bool X_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
338
-const bool Y_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
339
-const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
377
+const bool X_MAX_ENDSTOP_INVERTING = true;  // set to true to invert the logic of the endstop.
378
+const bool Y_MAX_ENDSTOP_INVERTING = true;  // set to true to invert the logic of the endstop.
379
+const bool Z_MAX_ENDSTOP_INVERTING = true;  // set to true to invert the logic of the endstop.
340 380
 const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
341
-//#define DISABLE_MAX_ENDSTOPS
342
-//#define DISABLE_MIN_ENDSTOPS
343 381
 
344
-// If you want to enable the Z probe pin, but disable its use, uncomment the line below.
345
-// This only affects a Z probe endstop if you have separate Z min endstop as well and have
346
-// activated Z_MIN_PROBE_ENDSTOP below. If you are using the Z Min endstop on your Z probe,
347
-// this has no effect.
382
+//===========================================================================
383
+//============================= Z Probe Options =============================
384
+//===========================================================================
385
+
386
+// Enable Z_MIN_PROBE_ENDSTOP to use _both_ a Z Probe and a Z-min-endstop on the same machine.
387
+// With this option the Z_MIN_PROBE_PIN will only be used for probing, never for homing.
388
+//
389
+// *** PLEASE READ ALL INSTRUCTIONS BELOW FOR SAFETY! ***
390
+//
391
+// To continue using the Z-min-endstop for homing, be sure to disable Z_SAFE_HOMING.
392
+// Example: To park the head outside the bed area when homing with G28.
393
+//
394
+// To use a separate Z probe, your board must define a Z_MIN_PROBE_PIN.
395
+//
396
+// For a servo-based Z probe, you must set up servo support below, including
397
+// NUM_SERVOS, Z_ENDSTOP_SERVO_NR and SERVO_ENDSTOP_ANGLES.
398
+//
399
+// - RAMPS 1.3/1.4 boards may be able to use the 5V, GND, and Aux4->D32 pin.
400
+// - Use 5V for powered (usu. inductive) sensors.
401
+// - Otherwise connect:
402
+//   - normally-closed switches to GND and D32.
403
+//   - normally-open switches to 5V and D32.
404
+//
405
+// Normally-closed switches are advised and are the default.
406
+//
407
+// The Z_MIN_PROBE_PIN sets the Arduino pin to use. (See your board's pins file.)
408
+// Since the RAMPS Aux4->D32 pin maps directly to the Arduino D32 pin, D32 is the
409
+// default pin for all RAMPS-based boards. Some other boards map differently.
410
+// To set or change the pin for your board, edit the appropriate pins_XXXXX.h file.
411
+//
412
+// WARNING:
413
+// Setting the wrong pin may have unexpected and potentially disastrous consequences.
414
+// Use with caution and do your homework.
415
+//
416
+//#define Z_MIN_PROBE_ENDSTOP
417
+
418
+// Enable Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN to use the Z_MIN_PIN for your Z_MIN_PROBE.
419
+// The Z_MIN_PIN will then be used for both Z-homing and probing.
420
+#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
421
+
422
+// To use a probe you must enable one of the two options above!
423
+
424
+// This option disables the use of the Z_MIN_PROBE_PIN
425
+// To enable the Z probe pin but disable its use, uncomment the line below. This only affects a
426
+// Z probe switch if you have a separate Z min endstop also and have activated Z_MIN_PROBE_ENDSTOP above.
427
+// If you're using the Z MIN endstop connector for your Z probe, this has no effect.
348 428
 //#define DISABLE_Z_MIN_PROBE_ENDSTOP
349 429
 
350 430
 // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
@@ -354,11 +434,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
354 434
 #define Z_ENABLE_ON 0
355 435
 #define E_ENABLE_ON 0 // For all extruders
356 436
 
357
-// Disables axis when it's not being used.
437
+// Disables axis stepper immediately when it's not being used.
358 438
 // WARNING: When motors turn off there is a chance of losing position accuracy!
359 439
 #define DISABLE_X false
360 440
 #define DISABLE_Y false
361 441
 #define DISABLE_Z false
442
+// Warn on display about possibly reduced accuracy
443
+//#define DISABLE_REDUCED_ACCURACY_WARNING
362 444
 
363 445
 // @section extruder
364 446
 
@@ -368,19 +450,21 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
368 450
 // @section machine
369 451
 
370 452
 // Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
371
-#define INVERT_X_DIR false
453
+#define INVERT_X_DIR true
372 454
 #define INVERT_Y_DIR true
373
-#define INVERT_Z_DIR false
455
+#define INVERT_Z_DIR true
374 456
 
375 457
 // @section extruder
376 458
 
377 459
 // For direct drive extruder v9 set to true, for geared extruder set to false.
378
-#define INVERT_E0_DIR false
460
+#define INVERT_E0_DIR true
379 461
 #define INVERT_E1_DIR false
380 462
 #define INVERT_E2_DIR false
381 463
 #define INVERT_E3_DIR false
382 464
 
383 465
 // @section homing
466
+#define MIN_Z_HEIGHT_FOR_HOMING 5   // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
467
+                                    // Be sure you have this distance over your Z_MAX_POS in case.
384 468
 
385 469
 // ENDSTOP SETTINGS:
386 470
 // Sets direction of endstops when homing; 1=MAX, -1=MIN
@@ -389,8 +473,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
389 473
 #define Y_HOME_DIR -1
390 474
 #define Z_HOME_DIR -1
391 475
 
392
-#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
393
-#define max_software_endstops true  // If true, axis won't move to coordinates greater than the defined lengths below.
476
+#define min_software_endstops false // If true, axis won't move to coordinates less than HOME_POS.
477
+#define max_software_endstops false // If true, axis won't move to coordinates greater than the defined lengths below.
394 478
 
395 479
 // @section machine
396 480
 
@@ -398,9 +482,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
398 482
 #define X_MIN_POS 0
399 483
 #define Y_MIN_POS 0
400 484
 #define Z_MIN_POS 0
401
-#define X_MAX_POS 200
402
-#define Y_MAX_POS 200
403
-#define Z_MAX_POS 200
485
+#define X_MAX_POS 210
486
+#define Y_MAX_POS 297
487
+#define Z_MAX_POS 210
404 488
 
405 489
 //===========================================================================
406 490
 //========================= Filament Runout Sensor ==========================
@@ -416,16 +500,11 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
416 500
 #endif
417 501
 
418 502
 //===========================================================================
419
-//=========================== Manual Bed Leveling ===========================
503
+//============================ Mesh Bed Leveling ============================
420 504
 //===========================================================================
421 505
 
422
-//#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
423 506
 //#define MESH_BED_LEVELING    // Enable mesh bed leveling.
424 507
 
425
-#if ENABLED(MANUAL_BED_LEVELING)
426
-  #define MBL_Z_STEP 0.025  // Step size while manually probing Z axis.
427
-#endif  // MANUAL_BED_LEVELING
428
-
429 508
 #if ENABLED(MESH_BED_LEVELING)
430 509
   #define MESH_MIN_X 10
431 510
   #define MESH_MAX_X (X_MAX_POS - MESH_MIN_X)
@@ -434,6 +513,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
434 513
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
435 514
   #define MESH_NUM_Y_POINTS 3
436 515
   #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0.
516
+
517
+  //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
518
+
519
+  #if ENABLED(MANUAL_BED_LEVELING)
520
+    #define MBL_Z_STEP 0.025  // Step size while manually probing Z axis.
521
+  #endif  // MANUAL_BED_LEVELING
522
+
437 523
 #endif  // MESH_BED_LEVELING
438 524
 
439 525
 //===========================================================================
@@ -442,9 +528,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
442 528
 
443 529
 // @section bedlevel
444 530
 
445
-//#define AUTO_BED_LEVELING_FEATURE // Delete the comment to enable (remove // at the start of the line)
531
+#define AUTO_BED_LEVELING_FEATURE // Delete the comment to enable (remove // at the start of the line)
446 532
 //#define DEBUG_LEVELING_FEATURE
447
-#define Z_MIN_PROBE_REPEATABILITY_TEST  // If not commented out, Z-Probe Repeatability test will be included if Auto Bed Leveling is Enabled.
533
+#define Z_MIN_PROBE_REPEATABILITY_TEST  // If not commented out, Z Probe Repeatability test will be included if Auto Bed Leveling is Enabled.
448 534
 
449 535
 #if ENABLED(AUTO_BED_LEVELING_FEATURE)
450 536
 
@@ -456,7 +542,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
456 542
   //   This mode is preferred because there are more measurements.
457 543
   //
458 544
   // - "3-point" mode
459
-  //   Probe 3 arbitrary points on the bed (that aren't colinear)
545
+  //   Probe 3 arbitrary points on the bed (that aren't collinear)
460 546
   //   You specify the XY coordinates of all 3 points.
461 547
 
462 548
   // Enable this to sample the bed in a grid (least squares solution).
@@ -465,12 +551,12 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
465 551
 
466 552
   #if ENABLED(AUTO_BED_LEVELING_GRID)
467 553
 
468
-    #define LEFT_PROBE_BED_POSITION 15
469
-    #define RIGHT_PROBE_BED_POSITION 170
470
-    #define FRONT_PROBE_BED_POSITION 20
471
-    #define BACK_PROBE_BED_POSITION 170
554
+    #define LEFT_PROBE_BED_POSITION  X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER
555
+    #define RIGHT_PROBE_BED_POSITION X_MAX_POS - X_PROBE_OFFSET_FROM_EXTRUDER
556
+    #define FRONT_PROBE_BED_POSITION Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER
557
+    #define BACK_PROBE_BED_POSITION  Y_MAX_POS - Y_PROBE_OFFSET_FROM_EXTRUDER
472 558
 
473
-    #define MIN_PROBE_EDGE 10 // The Z probe square sides can be no smaller than this.
559
+    #define MIN_PROBE_EDGE 10 // The Z probe minimum square sides can be no smaller than this.
474 560
 
475 561
     // Set the number of grid points per dimension.
476 562
     // You probably don't need more than 3 (squared=9).
@@ -478,42 +564,67 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
478 564
 
479 565
   #else  // !AUTO_BED_LEVELING_GRID
480 566
 
481
-      // Arbitrary points to probe.
482
-      // A simple cross-product is used to estimate the plane of the bed.
483
-      #define ABL_PROBE_PT_1_X 15
484
-      #define ABL_PROBE_PT_1_Y 180
485
-      #define ABL_PROBE_PT_2_X 15
486
-      #define ABL_PROBE_PT_2_Y 20
487
-      #define ABL_PROBE_PT_3_X 170
488
-      #define ABL_PROBE_PT_3_Y 20
567
+    // Arbitrary points to probe.
568
+    // A simple cross-product is used to estimate the plane of the bed.
569
+    #define ABL_PROBE_PT_1_X X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER
570
+    #define ABL_PROBE_PT_1_Y Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER
571
+    #define ABL_PROBE_PT_2_X X_MAX_POS - X_PROBE_OFFSET_FROM_EXTRUDER
572
+    #define ABL_PROBE_PT_2_Y Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER
573
+    #define ABL_PROBE_PT_3_X ((X_MIN_POS + X_MAX_POS) / 2)
574
+    #define ABL_PROBE_PT_3_Y Y_MAX_POS - Y_PROBE_OFFSET_FROM_EXTRUDER
489 575
 
490 576
   #endif // AUTO_BED_LEVELING_GRID
491 577
 
492
-  // Offsets to the Z probe relative to the nozzle tip.
578
+  // Z Probe to nozzle (X,Y) offset, relative to (0, 0).
493 579
   // X and Y offsets must be integers.
494
-  #define X_PROBE_OFFSET_FROM_EXTRUDER -25     // Z probe to nozzle X offset: -left  +right
495
-  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29     // Z probe to nozzle Y offset: -front +behind
496
-  #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35  // Z probe to nozzle Z offset: -below (always!)
497
-
498
-  #define Z_RAISE_BEFORE_HOMING 4       // (in mm) Raise Z axis before homing (G28) for Z probe clearance.
499
-                                        // Be sure you have this distance over your Z_MAX_POS in case.
580
+  //
581
+  // In the following example the X and Y offsets are both positive:
582
+  // #define X_PROBE_OFFSET_FROM_EXTRUDER 10
583
+  // #define Y_PROBE_OFFSET_FROM_EXTRUDER 10
584
+  //
585
+  //    +-- BACK ---+
586
+  //    |           |
587
+  //  L |    (+) P  | R <-- probe (20,20)
588
+  //  E |           | I
589
+  //  F | (-) N (+) | G <-- nozzle (10,10)
590
+  //  T |           | H
591
+  //    |    (-)    | T
592
+  //    |           |
593
+  //    O-- FRONT --+
594
+  //  (0,0)
595
+  #define X_PROBE_OFFSET_FROM_EXTRUDER 34  // X offset: -left  [of the nozzle] +right
596
+  #define Y_PROBE_OFFSET_FROM_EXTRUDER 15  // Y offset: -front [of the nozzle] +behind
597
+  #define Z_PROBE_OFFSET_FROM_EXTRUDER 0   // Z offset: -below [the nozzle] (always negative!)
500 598
 
501 599
   #define XY_TRAVEL_SPEED 8000         // X and Y axis travel speed between probes, in mm/min.
502 600
 
503
-  #define Z_RAISE_BEFORE_PROBING 15   // How much the Z axis will be raised before traveling to the first probing point.
504
-  #define Z_RAISE_BETWEEN_PROBINGS 5  // How much the Z axis will be raised when traveling from between next probing points.
505
-  #define Z_RAISE_AFTER_PROBING 15    // How much the Z axis will be raised after the last probing point.
601
+  #define Z_RAISE_BEFORE_PROBING   5  // How much the Z axis will be raised before traveling to the first probing point.
602
+  #define Z_RAISE_BETWEEN_PROBINGS 2  // How much the Z axis will be raised when traveling from between next probing points.
603
+  #define Z_RAISE_AFTER_PROBING    5  // How much the Z axis will be raised after the last probing point.
604
+
605
+  //#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" // These commands will be executed in the end of G29 routine.
606
+                                                                             // Useful to retract a deployable Z probe.
607
+
608
+  // Probes are sensors/switches that need to be activated before they can be used
609
+  // and deactivated after the use.
610
+  // Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, ... . You have to activate one of these for the AUTO_BED_LEVELING_FEATURE
611
+
612
+  // A fix mounted probe, like the normal inductive probe, must be deactivated to go below Z_PROBE_OFFSET_FROM_EXTRUDER
613
+  // when the hardware endstops are active.
614
+  #define FIX_MOUNTED_PROBE
506 615
 
507
-//#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" // These commands will be executed in the end of G29 routine.
508
-                                                                            // Useful to retract a deployable Z probe.
616
+  // A Servo Probe can be defined in the servo section below.
509 617
 
510
-  //#define Z_PROBE_SLED // Turn on if you have a Z probe mounted on a sled like those designed by Charles Bell.
618
+  // An Allen Key Probe is currently predefined only in the delta example configurations.
619
+
620
+  //#define Z_PROBE_SLED // Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
511 621
   //#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
512 622
 
513
-// If you have enabled the bed auto leveling and are using the same Z probe for Z homing,
514
-// it is highly recommended you let this Z_SAFE_HOMING enabled!!!
623
+  // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing,
624
+  // it is highly recommended you leave Z_SAFE_HOMING enabled!
515 625
 
516
-  #define Z_SAFE_HOMING   // This feature is meant to avoid Z homing with Z probe outside the bed area.
626
+  #define Z_SAFE_HOMING   // Use the z-min-probe for homing to z-min - not the z-min-endstop.
627
+                          // This feature is meant to avoid Z homing with Z probe outside the bed area.
517 628
                           // When defined, it will:
518 629
                           // - Allow Z homing only after X and Y homing AND stepper drivers still enabled.
519 630
                           // - If stepper drivers timeout, it will need X and Y homing again before Z homing.
@@ -527,37 +638,6 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
527 638
 
528 639
   #endif
529 640
 
530
-  // Support for a dedicated Z probe endstop separate from the Z min endstop.
531
-  // If you would like to use both a Z probe and a Z min endstop together,
532
-  // uncomment #define Z_MIN_PROBE_ENDSTOP and read the instructions below.
533
-  // If you still want to use the Z min endstop for homing, disable Z_SAFE_HOMING above.
534
-  // Example: To park the head outside the bed area when homing with G28.
535
-  //
536
-  // WARNING:
537
-  // The Z min endstop will need to set properly as it would without a Z probe
538
-  // to prevent head crashes and premature stopping during a print.
539
-  //
540
-  // To use a separate Z probe endstop, you must have a Z_MIN_PROBE_PIN
541
-  // defined in the pins_XXXXX.h file for your control board.
542
-  // If you are using a servo based Z probe, you will need to enable NUM_SERVOS,
543
-  // Z_ENDSTOP_SERVO_NR and SERVO_ENDSTOP_ANGLES in the R/C SERVO support below.
544
-  // RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin
545
-  // in the Aux 4 section of the RAMPS board. Use 5V for powered sensors,
546
-  // otherwise connect to ground and D32 for normally closed configuration
547
-  // and 5V and D32 for normally open configurations.
548
-  // Normally closed configuration is advised and assumed.
549
-  // The D32 pin in Aux 4 on RAMPS maps to the Arduino D32 pin.
550
-  // Z_MIN_PROBE_PIN is setting the pin to use on the Arduino.
551
-  // Since the D32 pin on the RAMPS maps to D32 on Arduino, this works.
552
-  // D32 is currently selected in the RAMPS 1.3/1.4 pin file.
553
-  // All other boards will need changes to the respective pins_XXXXX.h file.
554
-  //
555
-  // WARNING:
556
-  // Setting the wrong pin may have unexpected and potentially disastrous outcomes.
557
-  // Use with caution and do your homework.
558
-  //
559
-  //#define Z_MIN_PROBE_ENDSTOP
560
-
561 641
 #endif // AUTO_BED_LEVELING_FEATURE
562 642
 
563 643
 
@@ -582,22 +662,22 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
582 662
  * MOVEMENT SETTINGS
583 663
  */
584 664
 
585
-#define HOMING_FEEDRATE {50*60, 50*60, 4*60, 0}  // set the homing speeds (mm/min)
665
+#define HOMING_FEEDRATE {150*60, 150*60, 3.3*60, 0}  // set the homing speeds (mm/min)
586 666
 
587 667
 // default settings
588 668
 
589
-#define DEFAULT_AXIS_STEPS_PER_UNIT   {80,80,4000,500}  // default steps per unit for Ultimaker
590
-#define DEFAULT_MAX_FEEDRATE          {300, 300, 5, 25}    // (mm/sec)
591
-#define DEFAULT_MAX_ACCELERATION      {3000,3000,100,10000}    // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for Skeinforge 40+, for older versions raise them a lot.
669
+#define DEFAULT_AXIS_STEPS_PER_UNIT   {160, 160, 8000, 204.146} // default steps per unit for Ultimaker
670
+#define DEFAULT_MAX_FEEDRATE          {200, 200, 3.3, 200}      // (mm/sec)
671
+#define DEFAULT_MAX_ACCELERATION      {1000, 1000, 100, 3000}   // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for Skeinforge 40+, for older versions raise them a lot.
592 672
 
593
-#define DEFAULT_ACCELERATION          3000    // X, Y, Z and E acceleration in mm/s^2 for printing moves
673
+#define DEFAULT_ACCELERATION          1000    // X, Y, Z and E acceleration in mm/s^2 for printing moves
594 674
 #define DEFAULT_RETRACT_ACCELERATION  3000    // E acceleration in mm/s^2 for retracts
595
-#define DEFAULT_TRAVEL_ACCELERATION   3000    // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves
675
+#define DEFAULT_TRAVEL_ACCELERATION   1000    // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves
596 676
 
597 677
 // The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously)
598
-#define DEFAULT_XYJERK                20.0    // (mm/sec)
678
+#define DEFAULT_XYJERK                15.0    // (mm/sec)
599 679
 #define DEFAULT_ZJERK                 0.4     // (mm/sec)
600
-#define DEFAULT_EJERK                 5.0    // (mm/sec)
680
+#define DEFAULT_EJERK                 2.0     // (mm/sec)
601 681
 
602 682
 
603 683
 //=============================================================================
@@ -611,8 +691,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
611 691
 #if ENABLED(CUSTOM_M_CODES)
612 692
   #if ENABLED(AUTO_BED_LEVELING_FEATURE)
613 693
     #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
614
-    #define Z_PROBE_OFFSET_RANGE_MIN -20
615
-    #define Z_PROBE_OFFSET_RANGE_MAX 20
694
+    #define Z_PROBE_OFFSET_RANGE_MIN -5
695
+    #define Z_PROBE_OFFSET_RANGE_MAX  0
616 696
   #endif
617 697
 #endif
618 698
 
@@ -624,7 +704,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
624 704
 // M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
625 705
 // M502 - reverts to the default "factory settings".  You still need to store them in EEPROM afterwards if you want to.
626 706
 //define this to enable EEPROM support
627
-//#define EEPROM_SETTINGS
707
+#define EEPROM_SETTINGS
628 708
 
629 709
 #if ENABLED(EEPROM_SETTINGS)
630 710
   // To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
@@ -632,6 +712,14 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
632 712
 #endif
633 713
 
634 714
 //
715
+// Host Keepalive
716
+//
717
+// By default Marlin will send a busy status message to the host
718
+// every 10 seconds when it can't accept commands.
719
+//
720
+//#define DISABLE_HOST_KEEPALIVE // Enable this option if your host doesn't like keepalive messages.
721
+
722
+//
635 723
 // M100 Free Memory Watcher
636 724
 //
637 725
 //#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
@@ -639,38 +727,38 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
639 727
 // @section temperature
640 728
 
641 729
 // Preheat Constants
642
-#define PLA_PREHEAT_HOTEND_TEMP 180
643
-#define PLA_PREHEAT_HPB_TEMP 70
644
-#define PLA_PREHEAT_FAN_SPEED 0   // Insert Value between 0 and 255
730
+#define PLA_PREHEAT_HOTEND_TEMP 210
731
+#define PLA_PREHEAT_HPB_TEMP    70
732
+#define PLA_PREHEAT_FAN_SPEED   0   // Insert Value between 0 and 255
645 733
 
646 734
 #define ABS_PREHEAT_HOTEND_TEMP 240
647
-#define ABS_PREHEAT_HPB_TEMP 110
648
-#define ABS_PREHEAT_FAN_SPEED 0   // Insert Value between 0 and 255
735
+#define ABS_PREHEAT_HPB_TEMP    110
736
+#define ABS_PREHEAT_FAN_SPEED   0   // Insert Value between 0 and 255
649 737
 
650 738
 //==============================LCD and SD support=============================
651 739
 // @section lcd
652 740
 
653 741
 // Define your display language below. Replace (en) with your language code and uncomment.
654
-// en, pl, fr, de, es, ru, bg, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, cn, test
742
+// en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8, fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test
655 743
 // See also language.h
656 744
 #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
657 745
 
658 746
 // Choose ONE of these 3 charsets. This has to match your hardware. Ignored for full graphic display.
659 747
 // To find out what type you have - compile with (test) - upload - click to get the menu. You'll see two typical lines from the upper half of the charset.
660
-// See also documentation/LCDLanguageFont.md
748
+// See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
661 749
   #define DISPLAY_CHARSET_HD44780_JAPAN        // this is the most common hardware
662 750
   //#define DISPLAY_CHARSET_HD44780_WESTERN
663 751
   //#define DISPLAY_CHARSET_HD44780_CYRILLIC
664 752
 
665 753
 //#define ULTRA_LCD  //general LCD support, also 16x2
666 754
 //#define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
667
-//#define SDSUPPORT // Enable SD Card Support in Hardware Console
668
-// Changed behaviour! If you need SDSUPPORT uncomment it!
669
-//#define SDSLOW // Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
670
-//#define SDEXTRASLOW // Use even slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
755
+#define SDSUPPORT // Enable SD Card Support in Hardware Console
756
+                  // Changed behaviour! If you need SDSUPPORT uncomment it!
757
+//#define SPI_SPEED SPI_HALF_SPEED // (also SPI_QUARTER_SPEED, SPI_EIGHTH_SPEED) Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
671 758
 //#define SD_CHECK_AND_RETRY // Use CRC checks and retries on the SD communication
672 759
 //#define ENCODER_PULSES_PER_STEP 1 // Increase if you have a high resolution encoder
673 760
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
761
+//#define REVERSE_MENU_DIRECTION // When enabled CLOCKWISE moves UP in the LCD menu
674 762
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
675 763
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
676 764
 //#define SPEAKER // The sound device is a speaker - not a buzzer. A buzzer resonates with his own frequency.
@@ -687,13 +775,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
687 775
 
688 776
 // The Panucatt Devices Viki 2.0 and mini Viki with Graphic LCD
689 777
 // http://panucatt.com
690
-// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
778
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
691 779
 //#define VIKI2
692 780
 //#define miniVIKI
693 781
 
694 782
 // This is a new controller currently under development.  https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
695 783
 //
696
-// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
784
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
697 785
 //#define ELB_FULL_GRAPHIC_CONTROLLER
698 786
 //#define SD_DETECT_INVERTED
699 787
 
@@ -708,7 +796,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
708 796
 // The RepRapDiscount FULL GRAPHIC Smart Controller (quadratic white PCB)
709 797
 // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
710 798
 //
711
-// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
799
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
712 800
 //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
713 801
 
714 802
 // The RepRapWorld REPRAPWORLD_KEYPAD v1.1
@@ -725,12 +813,17 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
725 813
 // http://reprap.org/wiki/Mini_panel
726 814
 //#define MINIPANEL
727 815
 
816
+// BQ SMART FULL GRAPHIC CONTROLLER
817
+#define BQ_LCD_SMART_CONTROLLER
818
+
728 819
 /**
729 820
  * I2C Panels
730 821
  */
731 822
 
732 823
 //#define LCD_I2C_SAINSMART_YWROBOT
733 824
 
825
+//#define LCM1602 // LCM1602 Adapter for 16x2 LCD
826
+
734 827
 // PANELOLU2 LCD with status LEDs, separate encoder and click inputs
735 828
 //
736 829
 // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
@@ -742,9 +835,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
742 835
 
743 836
 // Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs
744 837
 //#define LCD_I2C_VIKI
745
-  
838
+
746 839
 // SSD1306 OLED generic display support
747
-// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
840
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
748 841
 //#define U8GLIB_SSD1306
749 842
 
750 843
 // Shift register panels
@@ -756,13 +849,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
756 849
 
757 850
 // @section extras
758 851
 
759
-// Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
852
+// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino
760 853
 //#define FAST_PWM_FAN
761 854
 
762 855
 // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
763 856
 // which is not as annoying as with the hardware PWM. On the other hand, if this frequency
764 857
 // is too low, you should also increment SOFT_PWM_SCALE.
765
-//#define FAN_SOFT_PWM
858
+#define FAN_SOFT_PWM
766 859
 
767 860
 // Incrementing this by 1 will double the software PWM frequency,
768 861
 // affecting heaters, and the fan if FAN_SOFT_PWM is enabled.
@@ -836,21 +929,23 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
836 929
  * Note may require analog pins to be defined for different motherboards
837 930
  **********************************************************************/
838 931
 // Uncomment below to enable
839
-//#define FILAMENT_SENSOR
840
-
841
-#define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
842
-#define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
932
+//#define FILAMENT_WIDTH_SENSOR
843 933
 
844 934
 #define DEFAULT_NOMINAL_FILAMENT_DIA 3.00  //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software.  Used for sensor reading validation
845
-#define MEASURED_UPPER_LIMIT         3.30  //upper limit factor used for sensor reading validation in mm
846
-#define MEASURED_LOWER_LIMIT         1.90  //lower limit factor for sensor reading validation in mm
847
-#define MAX_MEASUREMENT_DELAY       20     //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM  and lower number saves RAM)
848 935
 
849
-//defines used in the code
850
-#define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially
936
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
937
+  #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
938
+  #define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
939
+
940
+  #define MEASURED_UPPER_LIMIT         2.00  //upper limit factor used for sensor reading validation in mm
941
+  #define MEASURED_LOWER_LIMIT         1.60  //lower limit factor for sensor reading validation in mm
942
+  #define MAX_MEASUREMENT_DELAY       20     //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM  and lower number saves RAM)
851 943
 
852
-//When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status.  Status will appear for 5 sec.
853
-//#define FILAMENT_LCD_DISPLAY
944
+  #define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially
945
+
946
+  //When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status.  Status will appear for 5 sec.
947
+  //#define FILAMENT_LCD_DISPLAY
948
+#endif
854 949
 
855 950
 #include "Configuration_adv.h"
856 951
 #include "thermistortables.h"

+ 659
- 0
Marlin/example_configurations/Hephestos_2/Configuration_adv.h View File

@@ -0,0 +1,659 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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
+/**
24
+ * Configuration_adv.h
25
+ *
26
+ * Advanced settings.
27
+ * Only change these if you know exactly what you're doing.
28
+ * Some of these settings can damage your printer if improperly set!
29
+ *
30
+ * Basic settings can be found in Configuration.h
31
+ *
32
+ */
33
+#ifndef CONFIGURATION_ADV_H
34
+#define CONFIGURATION_ADV_H
35
+
36
+#include "Conditionals.h"
37
+
38
+// @section temperature
39
+
40
+//===========================================================================
41
+//=============================Thermal Settings  ============================
42
+//===========================================================================
43
+
44
+#if DISABLED(PIDTEMPBED)
45
+  #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control
46
+  #if ENABLED(BED_LIMIT_SWITCHING)
47
+    #define BED_HYSTERESIS 2 // Only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS
48
+  #endif
49
+#endif
50
+
51
+/**
52
+ * Thermal Protection protects your printer from damage and fire if a
53
+ * thermistor falls out or temperature sensors fail in any way.
54
+ *
55
+ * The issue: If a thermistor falls out or a temperature sensor fails,
56
+ * Marlin can no longer sense the actual temperature. Since a disconnected
57
+ * thermistor reads as a low temperature, the firmware will keep the heater on.
58
+ *
59
+ * The solution: Once the temperature reaches the target, start observing.
60
+ * If the temperature stays too far below the target (hysteresis) for too long (period),
61
+ * the firmware will halt the machine as a safety precaution.
62
+ *
63
+ * If you get false positives for "Thermal Runaway" increase THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
64
+ */
65
+#if ENABLED(THERMAL_PROTECTION_HOTENDS)
66
+  #define THERMAL_PROTECTION_PERIOD 40        // Seconds
67
+  #define THERMAL_PROTECTION_HYSTERESIS 4     // Degrees Celsius
68
+
69
+  /**
70
+   * Whenever an M104 or M109 increases the target temperature the firmware will wait for the
71
+   * WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
72
+   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
73
+   * but only if the current temperature is far enough below the target for a reliable test.
74
+   *
75
+   * If you get false positives for "Heating failed" increase WATCH_TEMP_PERIOD and/or decrease WATCH_TEMP_INCREASE
76
+   * WATCH_TEMP_INCREASE should not be below 2.
77
+   */
78
+  #define WATCH_TEMP_PERIOD 20                // Seconds
79
+  #define WATCH_TEMP_INCREASE 2               // Degrees Celsius
80
+#endif
81
+
82
+/**
83
+ * Thermal Protection parameters for the bed
84
+ * are like the above for the hotends.
85
+ * WATCH_TEMP_BED_PERIOD and WATCH_TEMP_BED_INCREASE are not imlemented now.
86
+ */
87
+#if ENABLED(THERMAL_PROTECTION_BED)
88
+  #define THERMAL_PROTECTION_BED_PERIOD 20    // Seconds
89
+  #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
90
+#endif
91
+
92
+#if ENABLED(PIDTEMP)
93
+  // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
94
+  // if Kc is chosen well, the additional required power due to increased melting should be compensated.
95
+  #define PID_ADD_EXTRUSION_RATE
96
+  #if ENABLED(PID_ADD_EXTRUSION_RATE)
97
+    #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
98
+    #define LPQ_MAX_LEN 50
99
+  #endif
100
+#endif
101
+
102
+/**
103
+ * Automatic Temperature:
104
+ * The hotend target temperature is calculated by all the buffered lines of gcode.
105
+ * The maximum buffered steps/sec of the extruder motor is called "se".
106
+ * Start autotemp mode with M109 S<mintemp> B<maxtemp> F<factor>
107
+ * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by
108
+ * mintemp and maxtemp. Turn this off by executing M109 without F*
109
+ * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp.
110
+ * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
111
+ */
112
+#define AUTOTEMP
113
+#if ENABLED(AUTOTEMP)
114
+  #define AUTOTEMP_OLDWEIGHT 0.98
115
+#endif
116
+
117
+//Show Temperature ADC value
118
+//The M105 command return, besides traditional information, the ADC value read from temperature sensors.
119
+//#define SHOW_TEMP_ADC_VALUES
120
+
121
+// @section extruder
122
+
123
+//  extruder run-out prevention.
124
+//if the machine is idle, and the temperature over MINTEMP, every couple of SECONDS some filament is extruded
125
+//#define EXTRUDER_RUNOUT_PREVENT
126
+#define EXTRUDER_RUNOUT_MINTEMP 190
127
+#define EXTRUDER_RUNOUT_SECONDS 30.
128
+#define EXTRUDER_RUNOUT_ESTEPS 14. //mm filament
129
+#define EXTRUDER_RUNOUT_SPEED 1500.  //extrusion speed
130
+#define EXTRUDER_RUNOUT_EXTRUDE 100
131
+
132
+// @section temperature
133
+
134
+//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
135
+//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
136
+#define TEMP_SENSOR_AD595_OFFSET 0.0
137
+#define TEMP_SENSOR_AD595_GAIN   1.0
138
+
139
+//This is for controlling a fan to cool down the stepper drivers
140
+//it will turn on when any driver is enabled
141
+//and turn off after the set amount of seconds from last driver being disabled again
142
+#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable)
143
+#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run
144
+#define CONTROLLERFAN_SPEED 255  // == full speed
145
+
146
+// When first starting the main fan, run it at full speed for the
147
+// given number of milliseconds.  This gets the fan spinning reliably
148
+// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
149
+//#define FAN_KICKSTART_TIME 100
150
+
151
+// This defines the minimal speed for the main fan, run in PWM mode
152
+// to enable uncomment and set minimal PWM speed for reliable running (1-255)
153
+// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
154
+//#define FAN_MIN_PWM 50
155
+
156
+// @section extruder
157
+
158
+// Extruder cooling fans
159
+// Configure fan pin outputs to automatically turn on/off when the associated
160
+// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE.
161
+// Multiple extruders can be assigned to the same pin in which case
162
+// the fan will turn on when any selected extruder is above the threshold.
163
+#define EXTRUDER_0_AUTO_FAN_PIN 11
164
+#define EXTRUDER_1_AUTO_FAN_PIN  6
165
+#define EXTRUDER_2_AUTO_FAN_PIN -1
166
+#define EXTRUDER_3_AUTO_FAN_PIN -1
167
+#define EXTRUDER_AUTO_FAN_TEMPERATURE 50
168
+#define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
169
+
170
+
171
+//===========================================================================
172
+//=============================Mechanical Settings===========================
173
+//===========================================================================
174
+
175
+// @section homing
176
+
177
+#define ENDSTOPS_ONLY_FOR_HOMING // If defined the endstops will only be used for homing
178
+
179
+// @section extras
180
+
181
+//#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
182
+
183
+// A single Z stepper driver is usually used to drive 2 stepper motors.
184
+// Uncomment this define to utilize a separate stepper driver for each Z axis motor.
185
+// Only a few motherboards support this, like RAMPS, which have dual extruder support (the 2nd, often unused, extruder driver is used
186
+// to control the 2nd Z axis stepper motor). The pins are currently only defined for a RAMPS motherboards.
187
+// On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder.
188
+//#define Z_DUAL_STEPPER_DRIVERS
189
+
190
+#if ENABLED(Z_DUAL_STEPPER_DRIVERS)
191
+
192
+  // 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.
193
+  // That way the machine is capable to align the bed during home, since both Z steppers are homed.
194
+  // There is also an implementation of M666 (software endstops adjustment) to this feature.
195
+  // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed.
196
+  // 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.
197
+  // 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.
198
+  // Play a little bit with small adjustments (0.5mm) and check the behaviour.
199
+  // The M119 (endstops report) will start reporting the Z2 Endstop as well.
200
+
201
+  //#define Z_DUAL_ENDSTOPS
202
+
203
+  #if ENABLED(Z_DUAL_ENDSTOPS)
204
+    #define Z2_USE_ENDSTOP _XMAX_
205
+  #endif
206
+
207
+#endif // Z_DUAL_STEPPER_DRIVERS
208
+
209
+// Same again but for Y Axis.
210
+//#define Y_DUAL_STEPPER_DRIVERS
211
+
212
+#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
213
+  // Define if the two Y drives need to rotate in opposite directions
214
+  #define INVERT_Y2_VS_Y_DIR true
215
+#endif
216
+
217
+// Enable this for dual x-carriage printers.
218
+// A dual x-carriage design has the advantage that the inactive extruder can be parked which
219
+// prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
220
+// allowing faster printing speeds.
221
+//#define DUAL_X_CARRIAGE
222
+#if ENABLED(DUAL_X_CARRIAGE)
223
+  // Configuration for second X-carriage
224
+  // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop;
225
+  // the second x-carriage always homes to the maximum endstop.
226
+  #define X2_MIN_POS 80     // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
227
+  #define X2_MAX_POS 353    // set maximum to the distance between toolheads when both heads are homed
228
+  #define X2_HOME_DIR 1     // the second X-carriage always homes to the maximum endstop position
229
+  #define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position
230
+      // However: In this mode the EXTRUDER_OFFSET_X value for the second extruder provides a software
231
+      // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
232
+      // without modifying the firmware (through the "M218 T1 X???" command).
233
+      // Remember: you should set the second extruder x-offset to 0 in your slicer.
234
+
235
+  // Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h)
236
+  #define X2_ENABLE_PIN 29
237
+  #define X2_STEP_PIN 25
238
+  #define X2_DIR_PIN 23
239
+
240
+  // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
241
+  //    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
242
+  //                           as long as it supports dual x-carriages. (M605 S0)
243
+  //    Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
244
+  //                           that additional slicer support is not required. (M605 S1)
245
+  //    Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
246
+  //                           actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
247
+  //                           once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
248
+
249
+  // This is the default power-up mode which can be later using M605.
250
+  #define DEFAULT_DUAL_X_CARRIAGE_MODE 0
251
+
252
+  // Default settings in "Auto-park Mode"
253
+  #define TOOLCHANGE_PARK_ZLIFT   0.2      // the distance to raise Z axis when parking an extruder
254
+  #define TOOLCHANGE_UNPARK_ZLIFT 1        // the distance to raise Z axis when unparking an extruder
255
+
256
+  // Default x offset in duplication mode (typically set to half print bed width)
257
+  #define DEFAULT_DUPLICATION_X_OFFSET 100
258
+
259
+#endif //DUAL_X_CARRIAGE
260
+
261
+// @section homing
262
+
263
+//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
264
+#define X_HOME_BUMP_MM 5
265
+#define Y_HOME_BUMP_MM 5
266
+#define Z_HOME_BUMP_MM 2
267
+#define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
268
+//#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
269
+
270
+// When G28 is called, this option will make Y home before X
271
+//#define HOME_Y_BEFORE_X
272
+
273
+// @section machine
274
+
275
+#define AXIS_RELATIVE_MODES {false, false, false, false}
276
+
277
+// @section machine
278
+
279
+//By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step.
280
+#define INVERT_X_STEP_PIN false
281
+#define INVERT_Y_STEP_PIN false
282
+#define INVERT_Z_STEP_PIN false
283
+#define INVERT_E_STEP_PIN false
284
+
285
+// Default stepper release if idle. Set to 0 to deactivate.
286
+// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true.
287
+// Time can be set by M18 and M84.
288
+#define DEFAULT_STEPPER_DEACTIVE_TIME 60
289
+#define DISABLE_INACTIVE_X true
290
+#define DISABLE_INACTIVE_Y true
291
+#define DISABLE_INACTIVE_Z true  // set to false if the nozzle will fall down on your printed part when print has finished.
292
+#define DISABLE_INACTIVE_E true
293
+
294
+#define DEFAULT_MINIMUMFEEDRATE       0.0     // minimum feedrate
295
+#define DEFAULT_MINTRAVELFEEDRATE     0.0
296
+
297
+// @section lcd
298
+
299
+#if ENABLED(ULTIPANEL)
300
+  #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel
301
+  #define ULTIPANEL_FEEDMULTIPLY  // Comment to disable setting feedrate multiplier via encoder
302
+#endif
303
+
304
+// @section extras
305
+
306
+// minimum time in microseconds that a movement needs to take if the buffer is emptied.
307
+#define DEFAULT_MINSEGMENTTIME        20000
308
+
309
+// If defined the movements slow down when the look ahead buffer is only half full
310
+#define SLOWDOWN
311
+
312
+// Frequency limit
313
+// See nophead's blog for more info
314
+// Not working O
315
+//#define XY_FREQUENCY_LIMIT  15
316
+
317
+// Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end
318
+// of the buffer and all stops. This should not be much greater than zero and should only be changed
319
+// if unwanted behavior is observed on a user's machine when running at very slow speeds.
320
+#define MINIMUM_PLANNER_SPEED 0.05// (mm/sec)
321
+
322
+// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
323
+#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
324
+
325
+// Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
326
+#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])
327
+
328
+// Motor Current controlled via PWM (Overridable on supported boards with PWM-driven motor driver current)
329
+//#define PWM_MOTOR_CURRENT {1300, 1300, 1250} // Values in milliamps
330
+
331
+// uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
332
+//#define DIGIPOT_I2C
333
+// Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8
334
+#define DIGIPOT_I2C_NUM_CHANNELS 8
335
+// actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
336
+#define DIGIPOT_I2C_MOTOR_CURRENTS {1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0}
337
+
338
+//===========================================================================
339
+//=============================Additional Features===========================
340
+//===========================================================================
341
+
342
+#define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
343
+#define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
344
+#define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
345
+
346
+//#define CHDK 4        //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
347
+#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
348
+
349
+// @section lcd
350
+
351
+#if ENABLED(SDSUPPORT)
352
+
353
+  // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
354
+  // around this by connecting a push button or single throw switch to the pin defined
355
+  // as SD_DETECT_PIN in your board's pins definitions.
356
+  // This setting should be disabled unless you are using a push button, pulling the pin to ground.
357
+  // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
358
+  #define SD_DETECT_INVERTED
359
+
360
+  #define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
361
+  #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
362
+
363
+  #define SDCARD_RATHERRECENTFIRST  //reverse file order of sd card menu display. Its sorted practically after the file system block order.
364
+  // 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.
365
+  // using:
366
+  #define MENU_ADDAUTOSTART
367
+
368
+  // Show a progress bar on HD44780 LCDs for SD printing
369
+  //#define LCD_PROGRESS_BAR
370
+
371
+  #if ENABLED(LCD_PROGRESS_BAR)
372
+    // Amount of time (ms) to show the bar
373
+    #define PROGRESS_BAR_BAR_TIME 2000
374
+    // Amount of time (ms) to show the status message
375
+    #define PROGRESS_BAR_MSG_TIME 3000
376
+    // Amount of time (ms) to retain the status message (0=forever)
377
+    #define PROGRESS_MSG_EXPIRE   0
378
+    // Enable this to show messages for MSG_TIME then hide them
379
+    //#define PROGRESS_MSG_ONCE
380
+  #endif
381
+
382
+  // This allows hosts to request long names for files and folders with M33
383
+  #define LONG_FILENAME_HOST_SUPPORT
384
+
385
+  // This option allows you to abort SD printing when any endstop is triggered.
386
+  // This feature must be enabled with "M540 S1" or from the LCD menu.
387
+  // To have any effect, endstops must be enabled during SD printing.
388
+  // With ENDSTOPS_ONLY_FOR_HOMING you must send "M120" to enable endstops.
389
+  //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
390
+
391
+#endif // SDSUPPORT
392
+
393
+// for dogm lcd displays you can choose some additional fonts:
394
+#if ENABLED(DOGLCD)
395
+  // save 3120 bytes of PROGMEM by commenting out #define USE_BIG_EDIT_FONT
396
+  // we don't have a big font for Cyrillic, Kana
397
+  //#define USE_BIG_EDIT_FONT
398
+
399
+  // If you have spare 2300Byte of progmem and want to use a
400
+  // smaller font on the Info-screen uncomment the next line.
401
+  #define USE_SMALL_INFOFONT
402
+#endif // DOGLCD
403
+
404
+// @section more
405
+
406
+// The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
407
+#define USE_WATCHDOG
408
+
409
+#if ENABLED(USE_WATCHDOG)
410
+  // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
411
+  // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset.
412
+  //  However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled.
413
+  //#define WATCHDOG_RESET_MANUAL
414
+#endif
415
+
416
+// @section lcd
417
+
418
+// Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process
419
+// it can e.g. be used to change z-positions in the print startup phase in real-time
420
+// does not respect endstops!
421
+//#define BABYSTEPPING
422
+#if ENABLED(BABYSTEPPING)
423
+  #define BABYSTEP_XY  //not only z, but also XY in the menu. more clutter, more functions
424
+                       //not implemented for deltabots!
425
+  #define BABYSTEP_INVERT_Z false  //true for inverse movements in Z
426
+  #define BABYSTEP_MULTIPLICATOR 1 //faster movements
427
+#endif
428
+
429
+// @section extruder
430
+
431
+// extruder advance constant (s2/mm3)
432
+//
433
+// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
434
+//
435
+// Hooke's law says:    force = k * distance
436
+// Bernoulli's principle says:  v ^ 2 / 2 + g . h + pressure / density = constant
437
+// so: v ^ 2 is proportional to number of steps we advance the extruder
438
+//#define ADVANCE
439
+
440
+#if ENABLED(ADVANCE)
441
+  #define EXTRUDER_ADVANCE_K .0
442
+  #define D_FILAMENT 2.85
443
+#endif
444
+
445
+// @section extras
446
+
447
+// Arc interpretation settings:
448
+#define MM_PER_ARC_SEGMENT 1
449
+#define N_ARC_CORRECTION 25
450
+
451
+const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement
452
+
453
+// @section temperature
454
+
455
+// Control heater 0 and heater 1 in parallel.
456
+//#define HEATERS_PARALLEL
457
+
458
+//===========================================================================
459
+//================================= Buffers =================================
460
+//===========================================================================
461
+
462
+// @section hidden
463
+
464
+// The number of linear motions that can be in the plan at any give time.
465
+// 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.
466
+#if ENABLED(SDSUPPORT)
467
+  #define BLOCK_BUFFER_SIZE 16   // SD,LCD,Buttons take more memory, block buffer needs to be smaller
468
+#else
469
+  #define BLOCK_BUFFER_SIZE 16 // maximize block buffer
470
+#endif
471
+
472
+// @section more
473
+
474
+//The ASCII buffer for receiving from the serial:
475
+#define MAX_CMD_SIZE 96
476
+#define BUFSIZE 4
477
+
478
+// Bad Serial-connections can miss a received command by sending an 'ok'
479
+// Therefore some clients abort after 30 seconds in a timeout.
480
+// Some other clients start sending commands while receiving a 'wait'.
481
+// This "wait" is only sent when the buffer is empty. 1 second is a good value here.
482
+//#define NO_TIMEOUTS 1000 // Milliseconds
483
+
484
+// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary.
485
+//#define ADVANCED_OK
486
+
487
+// @section fwretract
488
+
489
+// Firmware based and LCD controlled retract
490
+// M207 and M208 can be used to define parameters for the retraction.
491
+// The retraction can be called by the slicer using G10 and G11
492
+// until then, intended retractions can be detected by moves that only extrude and the direction.
493
+// the moves are than replaced by the firmware controlled ones.
494
+
495
+//#define FWRETRACT  //ONLY PARTIALLY TESTED
496
+#if ENABLED(FWRETRACT)
497
+  #define MIN_RETRACT 0.1                //minimum extruded mm to accept a automatic gcode retraction attempt
498
+  #define RETRACT_LENGTH 3               //default retract length (positive mm)
499
+  #define RETRACT_LENGTH_SWAP 13         //default swap retract length (positive mm), for extruder change
500
+  #define RETRACT_FEEDRATE 45            //default feedrate for retracting (mm/s)
501
+  #define RETRACT_ZLIFT 0                //default retract Z-lift
502
+  #define RETRACT_RECOVER_LENGTH 0       //default additional recover length (mm, added to retract length when recovering)
503
+  #define RETRACT_RECOVER_LENGTH_SWAP 0  //default additional swap recover length (mm, added to retract length when recovering from extruder change)
504
+  #define RETRACT_RECOVER_FEEDRATE 8     //default feedrate for recovering from retraction (mm/s)
505
+#endif
506
+
507
+// Add support for experimental filament exchange support M600; requires display
508
+#if ENABLED(ULTIPANEL)
509
+  //#define FILAMENTCHANGEENABLE
510
+  #if ENABLED(FILAMENTCHANGEENABLE)
511
+    #define FILAMENTCHANGE_XPOS 3
512
+    #define FILAMENTCHANGE_YPOS 3
513
+    #define FILAMENTCHANGE_ZADD 10
514
+    #define FILAMENTCHANGE_FIRSTRETRACT -2
515
+    #define FILAMENTCHANGE_FINALRETRACT -100
516
+    #define AUTO_FILAMENT_CHANGE                //This extrude filament until you press the button on LCD
517
+    #define AUTO_FILAMENT_CHANGE_LENGTH 0.04    //Extrusion length on automatic extrusion loop
518
+    #define AUTO_FILAMENT_CHANGE_FEEDRATE 300   //Extrusion feedrate (mm/min) on automatic extrusion loop
519
+  #endif
520
+#endif
521
+
522
+/******************************************************************************\
523
+ * enable this section if you have TMC26X motor drivers.
524
+ * you need to import the TMC26XStepper library into the Arduino IDE for this
525
+ ******************************************************************************/
526
+
527
+// @section tmc
528
+
529
+//#define HAVE_TMCDRIVER
530
+#if ENABLED(HAVE_TMCDRIVER)
531
+
532
+  //#define X_IS_TMC
533
+  #define X_MAX_CURRENT 1000  //in mA
534
+  #define X_SENSE_RESISTOR 91 //in mOhms
535
+  #define X_MICROSTEPS 16     //number of microsteps
536
+
537
+  //#define X2_IS_TMC
538
+  #define X2_MAX_CURRENT 1000  //in mA
539
+  #define X2_SENSE_RESISTOR 91 //in mOhms
540
+  #define X2_MICROSTEPS 16     //number of microsteps
541
+
542
+  //#define Y_IS_TMC
543
+  #define Y_MAX_CURRENT 1000  //in mA
544
+  #define Y_SENSE_RESISTOR 91 //in mOhms
545
+  #define Y_MICROSTEPS 16     //number of microsteps
546
+
547
+  //#define Y2_IS_TMC
548
+  #define Y2_MAX_CURRENT 1000  //in mA
549
+  #define Y2_SENSE_RESISTOR 91 //in mOhms
550
+  #define Y2_MICROSTEPS 16     //number of microsteps
551
+
552
+  //#define Z_IS_TMC
553
+  #define Z_MAX_CURRENT 1000  //in mA
554
+  #define Z_SENSE_RESISTOR 91 //in mOhms
555
+  #define Z_MICROSTEPS 16     //number of microsteps
556
+
557
+  //#define Z2_IS_TMC
558
+  #define Z2_MAX_CURRENT 1000  //in mA
559
+  #define Z2_SENSE_RESISTOR 91 //in mOhms
560
+  #define Z2_MICROSTEPS 16     //number of microsteps
561
+
562
+  //#define E0_IS_TMC
563
+  #define E0_MAX_CURRENT 1000  //in mA
564
+  #define E0_SENSE_RESISTOR 91 //in mOhms
565
+  #define E0_MICROSTEPS 16     //number of microsteps
566
+
567
+  //#define E1_IS_TMC
568
+  #define E1_MAX_CURRENT 1000  //in mA
569
+  #define E1_SENSE_RESISTOR 91 //in mOhms
570
+  #define E1_MICROSTEPS 16     //number of microsteps
571
+
572
+  //#define E2_IS_TMC
573
+  #define E2_MAX_CURRENT 1000  //in mA
574
+  #define E2_SENSE_RESISTOR 91 //in mOhms
575
+  #define E2_MICROSTEPS 16     //number of microsteps
576
+
577
+  //#define E3_IS_TMC
578
+  #define E3_MAX_CURRENT 1000  //in mA
579
+  #define E3_SENSE_RESISTOR 91 //in mOhms
580
+  #define E3_MICROSTEPS 16     //number of microsteps
581
+
582
+#endif
583
+
584
+/******************************************************************************\
585
+ * enable this section if you have L6470  motor drivers.
586
+ * you need to import the L6470 library into the Arduino IDE for this
587
+ ******************************************************************************/
588
+
589
+// @section l6470
590
+
591
+//#define HAVE_L6470DRIVER
592
+#if ENABLED(HAVE_L6470DRIVER)
593
+
594
+  //#define X_IS_L6470
595
+  #define X_MICROSTEPS 16     //number of microsteps
596
+  #define X_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
597
+  #define X_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
598
+  #define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall
599
+
600
+  //#define X2_IS_L6470
601
+  #define X2_MICROSTEPS 16     //number of microsteps
602
+  #define X2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
603
+  #define X2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
604
+  #define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
605
+
606
+  //#define Y_IS_L6470
607
+  #define Y_MICROSTEPS 16     //number of microsteps
608
+  #define Y_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
609
+  #define Y_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
610
+  #define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall
611
+
612
+  //#define Y2_IS_L6470
613
+  #define Y2_MICROSTEPS 16     //number of microsteps
614
+  #define Y2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
615
+  #define Y2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
616
+  #define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
617
+
618
+  //#define Z_IS_L6470
619
+  #define Z_MICROSTEPS 16     //number of microsteps
620
+  #define Z_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
621
+  #define Z_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
622
+  #define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall
623
+
624
+  //#define Z2_IS_L6470
625
+  #define Z2_MICROSTEPS 16     //number of microsteps
626
+  #define Z2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
627
+  #define Z2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
628
+  #define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
629
+
630
+  //#define E0_IS_L6470
631
+  #define E0_MICROSTEPS 16     //number of microsteps
632
+  #define E0_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
633
+  #define E0_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
634
+  #define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall
635
+
636
+  //#define E1_IS_L6470
637
+  #define E1_MICROSTEPS 16     //number of microsteps
638
+  #define E1_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
639
+  #define E1_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
640
+  #define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall
641
+
642
+  //#define E2_IS_L6470
643
+  #define E2_MICROSTEPS 16     //number of microsteps
644
+  #define E2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
645
+  #define E2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
646
+  #define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
647
+
648
+  //#define E3_IS_L6470
649
+  #define E3_MICROSTEPS 16     //number of microsteps
650
+  #define E3_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
651
+  #define E3_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
652
+  #define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall
653
+
654
+#endif
655
+
656
+#include "Conditionals.h"
657
+#include "SanityCheck.h"
658
+
659
+#endif //CONFIGURATION_ADV_H

+ 8
- 0
Marlin/example_configurations/Hephestos_2/readme.md View File

@@ -0,0 +1,8 @@
1
+# Example Configuration for BQ [Hephestos 2](http://www.bq.com/uk/hephestos-2)
2
+This configuration file is based on the original configuration file shipped with the heavily modified Marlin fork by BQ. The original firmware and configuration file can be found at [BQ Github repository](https://github.com/bq/Marlin).
3
+
4
+NOTE: The look and feel of the Hephestos 2 while navigating the LCD menu will change by using the original Marlin firmware.
5
+
6
+## Changelog
7
+ * 2016/03/01 - Initial release
8
+ * 2016/03/21 - Activated four point auto leveling by default; updated miscellaneous z-probe values

+ 255
- 128
Marlin/example_configurations/K8200/Configuration.h View File

@@ -1,8 +1,47 @@
1
-// Example configuration file for Vellemann K8200
2
-// tested on K8200 with VM8201 (Display)
3
-// and Arduino 1.6.1 (Win) by @CONSULitAS, 2015-04-14
4
-// https://github.com/CONSULitAS/Marlin-K8200/archive/K8200_stable_2015-04-14.zip
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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
+ */
5 22
 
23
+/**
24
+ * Sample configuration file for Vellemann K8200
25
+ * tested on K8200 with VM8201 (Display)
26
+ * and Arduino 1.6.8 (Mac) by @CONSULitAS, 2016-02-21
27
+ * https://github.com/CONSULitAS/Marlin-K8200/archive/K8200_stable_2016-02-21.zip
28
+ */
29
+
30
+/**
31
+ * Configuration.h
32
+ *
33
+ * Basic settings such as:
34
+ *
35
+ * - Type of electronics
36
+ * - Type of temperature sensor
37
+ * - Printer geometry
38
+ * - Endstop configuration
39
+ * - LCD controller
40
+ * - Extra features
41
+ *
42
+ * Advanced settings can be found in Configuration_adv.h
43
+ *
44
+ */
6 45
 #ifndef CONFIGURATION_H
7 46
 #define CONFIGURATION_H
8 47
 
@@ -12,8 +51,10 @@
12 51
 //===========================================================================
13 52
 //============================= Getting Started =============================
14 53
 //===========================================================================
15
-/*
16
-Here are some standard links for getting your machine calibrated:
54
+
55
+/**
56
+ * Here are some standard links for getting your machine calibrated:
57
+ *
17 58
  * http://reprap.org/wiki/Calibration
18 59
  * http://youtu.be/wAL9d7FgInk
19 60
  * http://calculator.josefprusa.cz
@@ -21,11 +62,7 @@ Here are some standard links for getting your machine calibrated:
21 62
  * http://www.thingiverse.com/thing:5573
22 63
  * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap
23 64
  * http://www.thingiverse.com/thing:298812
24
-*/
25
-
26
-// This configuration file contains the basic settings.
27
-// Advanced settings can be found in Configuration_adv.h
28
-// BASIC SETTINGS: select your board type, temperature sensor type, axis scaling, and endstop configuration
65
+ */
29 66
 
30 67
 //===========================================================================
31 68
 //============================= DELTA Printer ===============================
@@ -52,7 +89,7 @@ Here are some standard links for getting your machine calibrated:
52 89
 // User-specified version info of this build to display in [Pronterface, etc] terminal window during
53 90
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
54 91
 // build by the user have been successfully uploaded into firmware.
55
-#define STRING_CONFIG_H_AUTHOR "(K8200, CONSULitAS)" // Who made the changes.
92
+#define STRING_CONFIG_H_AUTHOR "(K8200, @CONSULitAS)" // Who made the changes.
56 93
 #define SHOW_BOOTSCREEN
57 94
 #define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
58 95
 //#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
@@ -80,11 +117,11 @@ Here are some standard links for getting your machine calibrated:
80 117
 
81 118
 // Optional custom name for your RepStrap or other custom machine
82 119
 // Displayed in the LCD "Ready" message
83
-//#define CUSTOM_MACHINE_NAME "3D Printer"
120
+#define CUSTOM_MACHINE_NAME "K8200"
84 121
 
85 122
 // Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines)
86 123
 // You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4)
87
-//#define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
124
+#define MACHINE_UUID "2b7dea3b-844e-4ab1-aa96-bb6406607d6e" // K8200 standard config with VM8201 (Display)
88 125
 
89 126
 // This defines the number of extruders
90 127
 // :[1,2,3,4]
@@ -115,6 +152,7 @@ Here are some standard links for getting your machine calibrated:
115 152
 //--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table
116 153
 //
117 154
 //// Temperature sensor settings:
155
+// -3 is thermocouple with MAX31855 (only for sensor 0)
118 156
 // -2 is thermocouple with MAX6675 (only for sensor 0)
119 157
 // -1 is thermocouple with AD595
120 158
 // 0 is not used
@@ -134,6 +172,7 @@ Here are some standard links for getting your machine calibrated:
134 172
 // 13 is 100k Hisens 3950  1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
135 173
 // 20 is the PT100 circuit found in the Ultimainboard V2.x
136 174
 // 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
175
+// 70 is the 100K thermistor found in the bq Hephestos 2
137 176
 //
138 177
 //    1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k
139 178
 //                          (but gives greater accuracy and more stable PID)
@@ -149,7 +188,7 @@ Here are some standard links for getting your machine calibrated:
149 188
 //     Use it for Testing or Development purposes. NEVER for production machine.
150 189
 //#define DUMMY_THERMISTOR_998_VALUE 25
151 190
 //#define DUMMY_THERMISTOR_999_VALUE 100
152
-// :{ '0': "Not used", '4': "10k !! do not use for a hotend. Bad resolution at high temp. !!", '1': "100k / 4.7k - EPCOS", '51': "100k / 1k - EPCOS", '6': "100k / 4.7k EPCOS - Not as accurate as Table 1", '5': "100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '7': "100k / 4.7k Honeywell 135-104LAG-J01", '71': "100k / 4.7k Honeywell 135-104LAF-J01", '8': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9': "100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10': "100k / 4.7k RS 198-961", '11': "100k / 4.7k beta 3950 1%", '12': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13': "100k Hisens 3950  1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '60': "100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '55': "100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '2': "200k / 4.7k - ATC Semitec 204GT-2", '52': "200k / 1k - ATC Semitec 204GT-2", '-2': "Thermocouple + MAX6675 (only for sensor 0)", '-1': "Thermocouple + AD595", '3': "Mendel-parts / 4.7k", '1047': "Pt1000 / 4.7k", '1010': "Pt1000 / 1k (non standard)", '20': "PT100 (Ultimainboard V2.x)", '147': "Pt100 / 4.7k", '110': "Pt100 / 1k (non-standard)", '998': "Dummy 1", '999': "Dummy 2" }
191
+// :{ '0': "Not used", '4': "10k !! do not use for a hotend. Bad resolution at high temp. !!", '1': "100k / 4.7k - EPCOS", '51': "100k / 1k - EPCOS", '6': "100k / 4.7k EPCOS - Not as accurate as Table 1", '5': "100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '7': "100k / 4.7k Honeywell 135-104LAG-J01", '71': "100k / 4.7k Honeywell 135-104LAF-J01", '8': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9': "100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10': "100k / 4.7k RS 198-961", '11': "100k / 4.7k beta 3950 1%", '12': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13': "100k Hisens 3950  1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '60': "100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '55': "100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '2': "200k / 4.7k - ATC Semitec 204GT-2", '52': "200k / 1k - ATC Semitec 204GT-2", '-3': "Thermocouple + MAX31855 (only for sensor 0)", '-2': "Thermocouple + MAX6675 (only for sensor 0)", '-1': "Thermocouple + AD595", '3': "Mendel-parts / 4.7k", '1047': "Pt1000 / 4.7k", '1010': "Pt1000 / 1k (non standard)", '20': "PT100 (Ultimainboard V2.x)", '147': "Pt100 / 4.7k", '110': "Pt100 / 1k (non-standard)", '998': "Dummy 1", '999': "Dummy 2" }
153 192
 #define TEMP_SENSOR_0 5
154 193
 #define TEMP_SENSOR_1 0
155 194
 #define TEMP_SENSOR_2 0
@@ -183,14 +222,9 @@ Here are some standard links for getting your machine calibrated:
183 222
 #define HEATER_3_MAXTEMP 275
184 223
 #define BED_MAXTEMP 150
185 224
 
186
-// If your bed has low resistance e.g. .6 ohm and throws the fuse you can duty cycle it to reduce the
187
-// average current. The value should be an integer and the heat bed will be turned on for 1 interval of
188
-// HEATER_BED_DUTY_CYCLE_DIVIDER intervals.
189
-//#define HEATER_BED_DUTY_CYCLE_DIVIDER 4
190
-
191 225
 // If you want the M105 heater power reported in watts, define the BED_WATTS, and (shared for all extruders) EXTRUDER_WATTS
192
-//#define EXTRUDER_WATTS (12.0*12.0/6.7) //  P=I^2/R
193
-//#define BED_WATTS (12.0*12.0/1.1)      // P=I^2/R
226
+//#define EXTRUDER_WATTS (12.0*12.0/6.7) // P=U^2/R
227
+//#define BED_WATTS (12.0*12.0/1.1)      // P=U^2/R
194 228
 
195 229
 //===========================================================================
196 230
 //============================= PID Settings ================================
@@ -202,6 +236,7 @@ Here are some standard links for getting your machine calibrated:
202 236
 #define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
203 237
 #define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
204 238
 #if ENABLED(PIDTEMP)
239
+  //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
205 240
   //#define PID_DEBUG // Sends debug data to the serial port.
206 241
   //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
207 242
   //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -212,11 +247,26 @@ Here are some standard links for getting your machine calibrated:
212 247
   #define PID_INTEGRAL_DRIVE_MAX PID_MAX  //limit for the integral term
213 248
   #define K1 0.95 //smoothing factor within the PID
214 249
 
250
+  // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
251
+  // Ultimaker
252
+  //#define  DEFAULT_Kp 22.2
253
+  //#define  DEFAULT_Ki 1.08
254
+  //#define  DEFAULT_Kd 114
255
+
256
+  // MakerGear
257
+  //#define  DEFAULT_Kp 7.0
258
+  //#define  DEFAULT_Ki 0.1
259
+  //#define  DEFAULT_Kd 12
260
+
261
+  // Mendel Parts V9 on 12V
262
+  //#define  DEFAULT_Kp 63.0
263
+  //#define  DEFAULT_Ki 2.25
264
+  //#define  DEFAULT_Kd 440
265
+
215 266
   // Vellemann K8200 Extruder - calculated with PID Autotune and tested
216 267
   #define  DEFAULT_Kp 24.29
217 268
   #define  DEFAULT_Ki 1.58
218 269
   #define  DEFAULT_Kd 93.51
219
-
220 270
 #endif // PIDTEMP
221 271
 
222 272
 //===========================================================================
@@ -231,7 +281,7 @@ Here are some standard links for getting your machine calibrated:
231 281
 // If your configuration is significantly different than this and you don't understand the issues involved, you probably
232 282
 // shouldn't use bed PID until someone else verifies your hardware works.
233 283
 // If this is enabled, find your own PID constants below.
234
-//#define PIDTEMPBED
284
+#define PIDTEMPBED
235 285
 
236 286
 //#define BED_LIMIT_SWITCHING
237 287
 
@@ -241,19 +291,31 @@ Here are some standard links for getting your machine calibrated:
241 291
 // so you shouldn't use it unless you are OK with PWM on your bed.  (see the comment on enabling PIDTEMPBED)
242 292
 #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
243 293
 
244
-//#define PID_BED_DEBUG // Sends debug data to the serial port.
245
-
246 294
 #if ENABLED(PIDTEMPBED)
247 295
 
296
+  //#define PID_BED_DEBUG // Sends debug data to the serial port.
297
+
248 298
   #define PID_BED_INTEGRAL_DRIVE_MAX MAX_BED_POWER //limit for the integral term
249 299
 
250
-  //Vellemann K8200 PCB heatbed with standard PCU at 60 degreesC - calculated with PID Autotune and tested
300
+  //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
301
+  //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
302
+  //#define  DEFAULT_bedKp 10.00
303
+  //#define  DEFAULT_bedKi .023
304
+  //#define  DEFAULT_bedKd 305.4
305
+
306
+  //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
251 307
   //from pidautotune
308
+  //#define  DEFAULT_bedKp 97.1
309
+  //#define  DEFAULT_bedKi 1.41
310
+  //#define  DEFAULT_bedKd 1675.16
311
+
312
+  // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
313
+
314
+  // Vellemann K8200 PCB heatbed with standard PCU at 60 degreesC - calculated with PID Autotune and tested
315
+  // from pidautotune
252 316
   #define  DEFAULT_bedKp 341.88
253 317
   #define  DEFAULT_bedKi 25.32
254 318
   #define  DEFAULT_bedKd 1153.89
255
-
256
-  // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
257 319
 #endif // PIDTEMPBED
258 320
 
259 321
 // @section extruder
@@ -272,16 +334,15 @@ Here are some standard links for getting your machine calibrated:
272 334
 //===========================================================================
273 335
 
274 336
 /**
275
- * Thermal Runaway Protection protects your printer from damage and fire if a
337
+ * Thermal Protection protects your printer from damage and fire if a
276 338
  * thermistor falls out or temperature sensors fail in any way.
277 339
  *
278 340
  * The issue: If a thermistor falls out or a temperature sensor fails,
279 341
  * Marlin can no longer sense the actual temperature. Since a disconnected
280 342
  * thermistor reads as a low temperature, the firmware will keep the heater on.
281 343
  *
282
- * The solution: Once the temperature reaches the target, start observing.
283
- * If the temperature stays too far below the target (hysteresis) for too long,
284
- * the firmware will halt as a safety precaution.
344
+ * If you get "Thermal Runaway" or "Heating failed" errors the
345
+ * details can be tuned in Configuration_adv.h
285 346
  */
286 347
 
287 348
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
@@ -302,8 +363,22 @@ Here are some standard links for getting your machine calibrated:
302 363
 // Enable this option for Toshiba steppers
303 364
 //#define CONFIG_STEPPERS_TOSHIBA
304 365
 
366
+//===========================================================================
367
+//============================== Endstop Settings ===========================
368
+//===========================================================================
369
+
305 370
 // @section homing
306 371
 
372
+// Specify here all the endstop connectors that are connected to any endstop or probe.
373
+// Almost all printers will be using one per axis. Probes will use one or more of the
374
+// extra connectors. Leave undefined any used for non-endstop and non-probe purposes.
375
+#define USE_XMIN_PLUG
376
+#define USE_YMIN_PLUG
377
+#define USE_ZMIN_PLUG
378
+//#define USE_XMAX_PLUG
379
+//#define USE_YMAX_PLUG
380
+//#define USE_ZMAX_PLUG
381
+
307 382
 // coarse Endstop Settings
308 383
 #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
309 384
 
@@ -326,13 +401,53 @@ const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
326 401
 const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
327 402
 const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
328 403
 const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
329
-#define DISABLE_MAX_ENDSTOPS
330
-//#define DISABLE_MIN_ENDSTOPS
331 404
 
332
-// If you want to enable the Z probe pin, but disable its use, uncomment the line below.
333
-// This only affects a Z probe endstop if you have separate Z min endstop as well and have
334
-// activated Z_MIN_PROBE_ENDSTOP below. If you are using the Z Min endstop on your Z probe,
335
-// this has no effect.
405
+//===========================================================================
406
+//============================= Z Probe Options =============================
407
+//===========================================================================
408
+
409
+// Enable Z_MIN_PROBE_ENDSTOP to use _both_ a Z Probe and a Z-min-endstop on the same machine.
410
+// With this option the Z_MIN_PROBE_PIN will only be used for probing, never for homing.
411
+//
412
+// *** PLEASE READ ALL INSTRUCTIONS BELOW FOR SAFETY! ***
413
+//
414
+// To continue using the Z-min-endstop for homing, be sure to disable Z_SAFE_HOMING.
415
+// Example: To park the head outside the bed area when homing with G28.
416
+//
417
+// To use a separate Z probe, your board must define a Z_MIN_PROBE_PIN.
418
+//
419
+// For a servo-based Z probe, you must set up servo support below, including
420
+// NUM_SERVOS, Z_ENDSTOP_SERVO_NR and SERVO_ENDSTOP_ANGLES.
421
+//
422
+// - RAMPS 1.3/1.4 boards may be able to use the 5V, GND, and Aux4->D32 pin.
423
+// - Use 5V for powered (usu. inductive) sensors.
424
+// - Otherwise connect:
425
+//   - normally-closed switches to GND and D32.
426
+//   - normally-open switches to 5V and D32.
427
+//
428
+// Normally-closed switches are advised and are the default.
429
+//
430
+// The Z_MIN_PROBE_PIN sets the Arduino pin to use. (See your board's pins file.)
431
+// Since the RAMPS Aux4->D32 pin maps directly to the Arduino D32 pin, D32 is the
432
+// default pin for all RAMPS-based boards. Some other boards map differently.
433
+// To set or change the pin for your board, edit the appropriate pins_XXXXX.h file.
434
+//
435
+// WARNING:
436
+// Setting the wrong pin may have unexpected and potentially disastrous consequences.
437
+// Use with caution and do your homework.
438
+//
439
+//#define Z_MIN_PROBE_ENDSTOP
440
+
441
+// Enable Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN to use the Z_MIN_PIN for your Z_MIN_PROBE.
442
+// The Z_MIN_PIN will then be used for both Z-homing and probing.
443
+#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
444
+
445
+// To use a probe you must enable one of the two options above!
446
+
447
+// This option disables the use of the Z_MIN_PROBE_PIN
448
+// To enable the Z probe pin but disable its use, uncomment the line below. This only affects a
449
+// Z probe switch if you have a separate Z min endstop also and have activated Z_MIN_PROBE_ENDSTOP above.
450
+// If you're using the Z MIN endstop connector for your Z probe, this has no effect.
336 451
 //#define DISABLE_Z_MIN_PROBE_ENDSTOP
337 452
 
338 453
 // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
@@ -342,11 +457,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
342 457
 #define Z_ENABLE_ON 0
343 458
 #define E_ENABLE_ON 0 // For all extruders
344 459
 
345
-// Disables axis when it's not being used.
460
+// Disables axis stepper immediately when it's not being used.
346 461
 // WARNING: When motors turn off there is a chance of losing position accuracy!
347 462
 #define DISABLE_X false
348 463
 #define DISABLE_Y false
349
-#define DISABLE_Z true
464
+#define DISABLE_Z false // not for K8200 -> looses Steps
465
+// Warn on display about possibly reduced accuracy
466
+//#define DISABLE_REDUCED_ACCURACY_WARNING
350 467
 
351 468
 // @section extruder
352 469
 
@@ -357,7 +474,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
357 474
 
358 475
 // Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
359 476
 #define INVERT_X_DIR false
360
-#define INVERT_Y_DIR false
477
+#define INVERT_Y_DIR false // was true -> why for K8200?
361 478
 #define INVERT_Z_DIR false
362 479
 
363 480
 // @section extruder
@@ -369,6 +486,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
369 486
 #define INVERT_E3_DIR true
370 487
 
371 488
 // @section homing
489
+//#define MIN_Z_HEIGHT_FOR_HOMING 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
490
+                                    // Be sure you have this distance over your Z_MAX_POS in case.
372 491
 
373 492
 // ENDSTOP SETTINGS:
374 493
 // Sets direction of endstops when homing; 1=MAX, -1=MIN
@@ -404,24 +523,26 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
404 523
 #endif
405 524
 
406 525
 //===========================================================================
407
-//=========================== Manual Bed Leveling ===========================
526
+//============================ Mesh Bed Leveling ============================
408 527
 //===========================================================================
409 528
 
410
-//#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
411 529
 //#define MESH_BED_LEVELING    // Enable mesh bed leveling.
412 530
 
413
-#if ENABLED(MANUAL_BED_LEVELING)
414
-  #define MBL_Z_STEP 0.025  // Step size while manually probing Z axis.
415
-#endif  // MANUAL_BED_LEVELING
416
-
417 531
 #if ENABLED(MESH_BED_LEVELING)
418 532
   #define MESH_MIN_X 10
419
-  #define MESH_MAX_X (X_MAX_POS - MESH_MIN_X)
533
+  #define MESH_MAX_X (X_MAX_POS - (MESH_MIN_X))
420 534
   #define MESH_MIN_Y 10
421
-  #define MESH_MAX_Y (Y_MAX_POS - MESH_MIN_Y)
535
+  #define MESH_MAX_Y (Y_MAX_POS - (MESH_MIN_Y))
422 536
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
423 537
   #define MESH_NUM_Y_POINTS 3
424 538
   #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0.
539
+
540
+  //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
541
+
542
+  #if ENABLED(MANUAL_BED_LEVELING)
543
+    #define MBL_Z_STEP 0.025  // Step size while manually probing Z axis.
544
+  #endif  // MANUAL_BED_LEVELING
545
+
425 546
 #endif  // MESH_BED_LEVELING
426 547
 
427 548
 //===========================================================================
@@ -432,7 +553,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
432 553
 
433 554
 //#define AUTO_BED_LEVELING_FEATURE // Delete the comment to enable (remove // at the start of the line)
434 555
 //#define DEBUG_LEVELING_FEATURE
435
-#define Z_MIN_PROBE_REPEATABILITY_TEST  // If not commented out, Z-Probe Repeatability test will be included if Auto Bed Leveling is Enabled.
556
+#define Z_MIN_PROBE_REPEATABILITY_TEST  // If not commented out, Z Probe Repeatability test will be included if Auto Bed Leveling is Enabled.
436 557
 
437 558
 #if ENABLED(AUTO_BED_LEVELING_FEATURE)
438 559
 
@@ -444,7 +565,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
444 565
   //   This mode is preferred because there are more measurements.
445 566
   //
446 567
   // - "3-point" mode
447
-  //   Probe 3 arbitrary points on the bed (that aren't colinear)
568
+  //   Probe 3 arbitrary points on the bed (that aren't collinear)
448 569
   //   You specify the XY coordinates of all 3 points.
449 570
 
450 571
   // Enable this to sample the bed in a grid (least squares solution).
@@ -458,7 +579,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
458 579
     #define FRONT_PROBE_BED_POSITION 20
459 580
     #define BACK_PROBE_BED_POSITION 170
460 581
 
461
-    #define MIN_PROBE_EDGE 10 // The Z probe square sides can be no smaller than this.
582
+    #define MIN_PROBE_EDGE 10 // The Z probe minimum square sides can be no smaller than this.
462 583
 
463 584
     // Set the number of grid points per dimension.
464 585
     // You probably don't need more than 3 (squared=9).
@@ -466,25 +587,37 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
466 587
 
467 588
   #else  // !AUTO_BED_LEVELING_GRID
468 589
 
469
-      // Arbitrary points to probe.
470
-      // A simple cross-product is used to estimate the plane of the bed.
471
-      #define ABL_PROBE_PT_1_X 15
472
-      #define ABL_PROBE_PT_1_Y 180
473
-      #define ABL_PROBE_PT_2_X 15
474
-      #define ABL_PROBE_PT_2_Y 20
475
-      #define ABL_PROBE_PT_3_X 170
476
-      #define ABL_PROBE_PT_3_Y 20
590
+    // Arbitrary points to probe.
591
+    // A simple cross-product is used to estimate the plane of the bed.
592
+    #define ABL_PROBE_PT_1_X 15
593
+    #define ABL_PROBE_PT_1_Y 180
594
+    #define ABL_PROBE_PT_2_X 15
595
+    #define ABL_PROBE_PT_2_Y 20
596
+    #define ABL_PROBE_PT_3_X 170
597
+    #define ABL_PROBE_PT_3_Y 20
477 598
 
478 599
   #endif // AUTO_BED_LEVELING_GRID
479 600
 
480
-  // Offsets to the Z probe relative to the nozzle tip.
601
+  // Z Probe to nozzle (X,Y) offset, relative to (0, 0).
481 602
   // X and Y offsets must be integers.
482
-  #define X_PROBE_OFFSET_FROM_EXTRUDER -25     // Z probe to nozzle X offset: -left  +right
483
-  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29     // Z probe to nozzle Y offset: -front +behind
484
-  #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35  // Z probe to nozzle Z offset: -below (always!)
485
-
486
-  #define Z_RAISE_BEFORE_HOMING 4       // (in mm) Raise Z axis before homing (G28) for Z probe clearance.
487
-                                        // Be sure you have this distance over your Z_MAX_POS in case.
603
+  //
604
+  // In the following example the X and Y offsets are both positive:
605
+  // #define X_PROBE_OFFSET_FROM_EXTRUDER 10
606
+  // #define Y_PROBE_OFFSET_FROM_EXTRUDER 10
607
+  //
608
+  //    +-- BACK ---+
609
+  //    |           |
610
+  //  L |    (+) P  | R <-- probe (20,20)
611
+  //  E |           | I
612
+  //  F | (-) N (+) | G <-- nozzle (10,10)
613
+  //  T |           | H
614
+  //    |    (-)    | T
615
+  //    |           |
616
+  //    O-- FRONT --+
617
+  //  (0,0)
618
+  #define X_PROBE_OFFSET_FROM_EXTRUDER -25     // X offset: -left  [of the nozzle] +right
619
+  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29     // Y offset: -front [of the nozzle] +behind
620
+  #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35  // Z offset: -below [the nozzle] (always negative!)
488 621
 
489 622
   #define XY_TRAVEL_SPEED 8000         // X and Y axis travel speed between probes, in mm/min.
490 623
 
@@ -492,16 +625,29 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
492 625
   #define Z_RAISE_BETWEEN_PROBINGS 5  // How much the Z axis will be raised when traveling from between next probing points.
493 626
   #define Z_RAISE_AFTER_PROBING 15    // How much the Z axis will be raised after the last probing point.
494 627
 
495
-//#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" // These commands will be executed in the end of G29 routine.
496
-                                                                            // Useful to retract a deployable Z probe.
628
+  //#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" // These commands will be executed in the end of G29 routine.
629
+                                                                             // Useful to retract a deployable Z probe.
630
+
631
+  // Probes are sensors/switches that need to be activated before they can be used
632
+  // and deactivated after the use.
633
+  // Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, ... . You have to activate one of these for the AUTO_BED_LEVELING_FEATURE
634
+
635
+  // A fix mounted probe, like the normal inductive probe, must be deactivated to go below Z_PROBE_OFFSET_FROM_EXTRUDER
636
+  // when the hardware endstops are active.
637
+  //#define FIX_MOUNTED_PROBE
638
+
639
+  // A Servo Probe can be defined in the servo section below.
640
+
641
+  // An Allen Key Probe is currently predefined only in the delta example configurations.
497 642
 
498
-  //#define Z_PROBE_SLED // Turn on if you have a Z probe mounted on a sled like those designed by Charles Bell.
643
+  //#define Z_PROBE_SLED // Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
499 644
   //#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
500 645
 
501
-// If you have enabled the bed auto leveling and are using the same Z probe for Z homing,
502
-// it is highly recommended you let this Z_SAFE_HOMING enabled!!!
646
+  // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing,
647
+  // it is highly recommended you leave Z_SAFE_HOMING enabled!
503 648
 
504
-  #define Z_SAFE_HOMING   // This feature is meant to avoid Z homing with Z probe outside the bed area.
649
+  #define Z_SAFE_HOMING   // Use the z-min-probe for homing to z-min - not the z-min-endstop.
650
+                          // This feature is meant to avoid Z homing with Z probe outside the bed area.
505 651
                           // When defined, it will:
506 652
                           // - Allow Z homing only after X and Y homing AND stepper drivers still enabled.
507 653
                           // - If stepper drivers timeout, it will need X and Y homing again before Z homing.
@@ -515,37 +661,6 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
515 661
 
516 662
   #endif
517 663
 
518
-  // Support for a dedicated Z probe endstop separate from the Z min endstop.
519
-  // If you would like to use both a Z probe and a Z min endstop together,
520
-  // uncomment #define Z_MIN_PROBE_ENDSTOP and read the instructions below.
521
-  // If you still want to use the Z min endstop for homing, disable Z_SAFE_HOMING above.
522
-  // Example: To park the head outside the bed area when homing with G28.
523
-  //
524
-  // WARNING:
525
-  // The Z min endstop will need to set properly as it would without a Z probe
526
-  // to prevent head crashes and premature stopping during a print.
527
-  //
528
-  // To use a separate Z probe endstop, you must have a Z_MIN_PROBE_PIN
529
-  // defined in the pins_XXXXX.h file for your control board.
530
-  // If you are using a servo based Z probe, you will need to enable NUM_SERVOS,
531
-  // Z_ENDSTOP_SERVO_NR and SERVO_ENDSTOP_ANGLES in the R/C SERVO support below.
532
-  // RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin
533
-  // in the Aux 4 section of the RAMPS board. Use 5V for powered sensors,
534
-  // otherwise connect to ground and D32 for normally closed configuration
535
-  // and 5V and D32 for normally open configurations.
536
-  // Normally closed configuration is advised and assumed.
537
-  // The D32 pin in Aux 4 on RAMPS maps to the Arduino D32 pin.
538
-  // Z_MIN_PROBE_PIN is setting the pin to use on the Arduino.
539
-  // Since the D32 pin on the RAMPS maps to D32 on Arduino, this works.
540
-  // D32 is currently selected in the RAMPS 1.3/1.4 pin file.
541
-  // All other boards will need changes to the respective pins_XXXXX.h file.
542
-  //
543
-  // WARNING:
544
-  // Setting the wrong pin may have unexpected and potentially disastrous outcomes.
545
-  // Use with caution and do your homework.
546
-  //
547
-  //#define Z_MIN_PROBE_ENDSTOP
548
-
549 664
 #endif // AUTO_BED_LEVELING_FEATURE
550 665
 
551 666
 
@@ -579,7 +694,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
579 694
 #define DEFAULT_MAX_ACCELERATION      {9000,9000,100,10000}    // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for Skeinforge 40+, for older versions raise them a lot.
580 695
 
581 696
 #define DEFAULT_ACCELERATION          1000    // X, Y, Z and E acceleration in mm/s^2 for printing moves
582
-#define DEFAULT_RETRACT_ACCELERATION  1000    // E acceleration in mm/s^2 for retracts
697
+#define DEFAULT_RETRACT_ACCELERATION  1000   // E acceleration in mm/s^2 for retracts
583 698
 #define DEFAULT_TRAVEL_ACCELERATION   1000    // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves
584 699
 
585 700
 // The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously)
@@ -620,6 +735,14 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
620 735
 #endif
621 736
 
622 737
 //
738
+// Host Keepalive
739
+//
740
+// By default Marlin will send a busy status message to the host
741
+// every 10 seconds when it can't accept commands.
742
+//
743
+//#define DISABLE_HOST_KEEPALIVE // Enable this option if your host doesn't like keepalive messages.
744
+
745
+//
623 746
 // M100 Free Memory Watcher
624 747
 //
625 748
 //#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
@@ -639,26 +762,26 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
639 762
 // @section lcd
640 763
 
641 764
 // Define your display language below. Replace (en) with your language code and uncomment.
642
-// en, pl, fr, de, es, ru, bg, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, cn, test
765
+// en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8, fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test
643 766
 // See also language.h
644 767
 #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
645 768
 
646 769
 // Choose ONE of these 3 charsets. This has to match your hardware. Ignored for full graphic display.
647 770
 // To find out what type you have - compile with (test) - upload - click to get the menu. You'll see two typical lines from the upper half of the charset.
648
-// See also documentation/LCDLanguageFont.md
771
+// See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
649 772
   #define DISPLAY_CHARSET_HD44780_JAPAN        // K8200: for Display VM8201 // this is the most common hardware
650 773
   //#define DISPLAY_CHARSET_HD44780_WESTERN
651 774
   //#define DISPLAY_CHARSET_HD44780_CYRILLIC
652 775
 
653 776
 //#define ULTRA_LCD  //general LCD support, also 16x2
654 777
 //#define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
655
-//#define SDSUPPORT // Enable SD Card Support in Hardware Console
656
-// Changed behaviour! If you need SDSUPPORT uncomment it!
657
-//#define SDSLOW // Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
658
-//#define SDEXTRASLOW // Use even slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
778
+#define SDSUPPORT // Enable SD Card Support in Hardware Console
779
+                    // Changed behaviour! If you need SDSUPPORT uncomment it!
780
+//#define SPI_SPEED SPI_HALF_SPEED // (also SPI_QUARTER_SPEED, SPI_EIGHTH_SPEED) Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
659 781
 //#define SD_CHECK_AND_RETRY // Use CRC checks and retries on the SD communication
660 782
 //#define ENCODER_PULSES_PER_STEP 1 // Increase if you have a high resolution encoder
661 783
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
784
+//#define REVERSE_MENU_DIRECTION // When enabled CLOCKWISE moves UP in the LCD menu
662 785
 #define ULTIMAKERCONTROLLER // K8200: for Display VM8201 // as available from the Ultimaker online store.
663 786
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
664 787
 //#define SPEAKER // The sound device is a speaker - not a buzzer. A buzzer resonates with his own frequency.
@@ -675,13 +798,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
675 798
 
676 799
 // The Panucatt Devices Viki 2.0 and mini Viki with Graphic LCD
677 800
 // http://panucatt.com
678
-// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
801
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
679 802
 //#define VIKI2
680 803
 //#define miniVIKI
681 804
 
682 805
 // This is a new controller currently under development.  https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
683 806
 //
684
-// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
807
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
685 808
 //#define ELB_FULL_GRAPHIC_CONTROLLER
686 809
 //#define SD_DETECT_INVERTED
687 810
 
@@ -696,7 +819,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
696 819
 // The RepRapDiscount FULL GRAPHIC Smart Controller (quadratic white PCB)
697 820
 // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
698 821
 //
699
-// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
822
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
700 823
 //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
701 824
 
702 825
 // The RepRapWorld REPRAPWORLD_KEYPAD v1.1
@@ -719,6 +842,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
719 842
 
720 843
 //#define LCD_I2C_SAINSMART_YWROBOT
721 844
 
845
+//#define LCM1602 // LCM1602 Adapter for 16x2 LCD
846
+
722 847
 // PANELOLU2 LCD with status LEDs, separate encoder and click inputs
723 848
 //
724 849
 // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
@@ -732,7 +857,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
732 857
 //#define LCD_I2C_VIKI
733 858
 
734 859
 // SSD1306 OLED generic display support
735
-// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
860
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
736 861
 //#define U8GLIB_SSD1306
737 862
 
738 863
 // Shift register panels
@@ -744,7 +869,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
744 869
 
745 870
 // @section extras
746 871
 
747
-// Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
872
+// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino
748 873
 //#define FAST_PWM_FAN
749 874
 
750 875
 // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
@@ -824,21 +949,23 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
824 949
  * Note may require analog pins to be defined for different motherboards
825 950
  **********************************************************************/
826 951
 // Uncomment below to enable
827
-//#define FILAMENT_SENSOR
828
-
829
-#define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
830
-#define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
952
+//#define FILAMENT_WIDTH_SENSOR
831 953
 
832 954
 #define DEFAULT_NOMINAL_FILAMENT_DIA 3.00  //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software.  Used for sensor reading validation
833
-#define MEASURED_UPPER_LIMIT         3.30  //upper limit factor used for sensor reading validation in mm
834
-#define MEASURED_LOWER_LIMIT         1.90  //lower limit factor for sensor reading validation in mm
835
-#define MAX_MEASUREMENT_DELAY       20     //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM  and lower number saves RAM)
836 955
 
837
-//defines used in the code
838
-#define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially
956
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
957
+  #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
958
+  #define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
959
+
960
+  #define MEASURED_UPPER_LIMIT         3.30  //upper limit factor used for sensor reading validation in mm
961
+  #define MEASURED_LOWER_LIMIT         1.90  //lower limit factor for sensor reading validation in mm
962
+  #define MAX_MEASUREMENT_DELAY       20     //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM  and lower number saves RAM)
839 963
 
840
-//When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status.  Status will appear for 5 sec.
841
-//#define FILAMENT_LCD_DISPLAY
964
+  #define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially
965
+
966
+  //When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status.  Status will appear for 5 sec.
967
+  //#define FILAMENT_LCD_DISPLAY
968
+#endif
842 969
 
843 970
 #include "Configuration_adv.h"
844 971
 #include "thermistortables.h"

+ 138
- 78
Marlin/example_configurations/K8200/Configuration_adv.h View File

@@ -1,3 +1,41 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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
+// Sample configuration file for Vellemann K8200
24
+// tested on K8200 with VM8201 (Display)
25
+// and Arduino 1.6.8 (Mac) by @CONSULitAS, 2016-02-21
26
+// https://github.com/CONSULitAS/Marlin-K8200/archive/K8200_stable_2016-02-21.zip
27
+
28
+
29
+/**
30
+ * Configuration_adv.h
31
+ *
32
+ * Advanced settings.
33
+ * Only change these if you know exactly what you're doing.
34
+ * Some of these settings can damage your printer if improperly set!
35
+ *
36
+ * Basic settings can be found in Configuration.h
37
+ *
38
+ */
1 39
 #ifndef CONFIGURATION_ADV_H
2 40
 #define CONFIGURATION_ADV_H
3 41
 
@@ -9,43 +47,54 @@
9 47
 //=============================Thermal Settings  ============================
10 48
 //===========================================================================
11 49
 
12
-#if ENABLED(BED_LIMIT_SWITCHING)
13
-  #define BED_HYSTERESIS 2 //only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS
50
+#if DISABLED(PIDTEMPBED)
51
+  #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control
52
+  #if ENABLED(BED_LIMIT_SWITCHING)
53
+    #define BED_HYSTERESIS 2 // Only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS
54
+  #endif
14 55
 #endif
15
-#define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control
16 56
 
17 57
 /**
18
- * Thermal Protection parameters
58
+ * Thermal Protection protects your printer from damage and fire if a
59
+ * thermistor falls out or temperature sensors fail in any way.
60
+ *
61
+ * The issue: If a thermistor falls out or a temperature sensor fails,
62
+ * Marlin can no longer sense the actual temperature. Since a disconnected
63
+ * thermistor reads as a low temperature, the firmware will keep the heater on.
64
+ *
65
+ * The solution: Once the temperature reaches the target, start observing.
66
+ * If the temperature stays too far below the target (hysteresis) for too long (period),
67
+ * the firmware will halt the machine as a safety precaution.
68
+ *
69
+ * If you get false positives for "Thermal Runaway" increase THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
19 70
  */
20 71
 #if ENABLED(THERMAL_PROTECTION_HOTENDS)
21
-  #define THERMAL_PROTECTION_PERIOD 40        // Seconds
22
-  #define THERMAL_PROTECTION_HYSTERESIS 4     // Degrees Celsius
72
+  #define THERMAL_PROTECTION_PERIOD 60        // Seconds
73
+  #define THERMAL_PROTECTION_HYSTERESIS 8     // Degrees Celsius
23 74
 
24 75
   /**
25 76
    * Whenever an M104 or M109 increases the target temperature the firmware will wait for the
26 77
    * WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
27 78
    * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
28 79
    * but only if the current temperature is far enough below the target for a reliable test.
80
+   *
81
+   * If you get false positives for "Heating failed" increase WATCH_TEMP_PERIOD and/or decrease WATCH_TEMP_INCREASE
82
+   * WATCH_TEMP_INCREASE should not be below 2.
29 83
    */
30
-  #define WATCH_TEMP_PERIOD 16                // Seconds
84
+  #define WATCH_TEMP_PERIOD 30                // Seconds
31 85
   #define WATCH_TEMP_INCREASE 4               // Degrees Celsius
32 86
 #endif
33 87
 
88
+/**
89
+ * Thermal Protection parameters for the bed
90
+ * are like the above for the hotends.
91
+ * WATCH_TEMP_BED_PERIOD and WATCH_TEMP_BED_INCREASE are not imlemented now.
92
+ */
34 93
 #if ENABLED(THERMAL_PROTECTION_BED)
35 94
   #define THERMAL_PROTECTION_BED_PERIOD 20    // Seconds
36 95
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
37 96
 #endif
38 97
 
39
-/**
40
- * Automatic Temperature:
41
- * The hotend target temperature is calculated by all the buffered lines of gcode.
42
- * The maximum buffered steps/sec of the extruder motor is called "se".
43
- * Start autotemp mode with M109 S<mintemp> B<maxtemp> F<factor>
44
- * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by
45
- * mintemp and maxtemp. Turn this off by excuting M109 without F*
46
- * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp.
47
- * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
48
- */
49 98
 #if ENABLED(PIDTEMP)
50 99
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
51 100
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.
@@ -56,14 +105,16 @@
56 105
   #endif
57 106
 #endif
58 107
 
59
-
60
-//automatic temperature: The hot end target temperature is calculated by all the buffered lines of gcode.
61
-//The maximum buffered steps/sec of the extruder motor are called "se".
62
-//You enter the autotemp mode by a M109 S<mintemp> B<maxtemp> F<factor>
63
-// the target temperature is set to mintemp+factor*se[steps/sec] and limited by mintemp and maxtemp
64
-// you exit the value by any M109 without F*
65
-// Also, if the temperature is set to a value <mintemp, it is not changed by autotemp.
66
-// on an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
108
+/**
109
+ * Automatic Temperature:
110
+ * The hotend target temperature is calculated by all the buffered lines of gcode.
111
+ * The maximum buffered steps/sec of the extruder motor is called "se".
112
+ * Start autotemp mode with M109 S<mintemp> B<maxtemp> F<factor>
113
+ * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by
114
+ * mintemp and maxtemp. Turn this off by executing M109 without F*
115
+ * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp.
116
+ * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
117
+ */
67 118
 #define AUTOTEMP
68 119
 #if ENABLED(AUTOTEMP)
69 120
   #define AUTOTEMP_OLDWEIGHT 0.98
@@ -101,12 +152,12 @@
101 152
 // When first starting the main fan, run it at full speed for the
102 153
 // given number of milliseconds.  This gets the fan spinning reliably
103 154
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
104
-//#define FAN_KICKSTART_TIME 100
155
+#define FAN_KICKSTART_TIME 500
105 156
 
106 157
 // This defines the minimal speed for the main fan, run in PWM mode
107 158
 // to enable uncomment and set minimal PWM speed for reliable running (1-255)
108 159
 // if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
109
-#define FAN_MIN_PWM 50 // K8200: fan stops running at about 35 to 40 (of 255)
160
+#define FAN_MIN_PWM 50
110 161
 
111 162
 // @section extruder
112 163
 
@@ -156,9 +207,7 @@
156 207
   //#define Z_DUAL_ENDSTOPS
157 208
 
158 209
   #if ENABLED(Z_DUAL_ENDSTOPS)
159
-    #define Z2_MAX_PIN 36                     //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36)
160
-    const bool Z2_MAX_ENDSTOP_INVERTING = false;
161
-    #define DISABLE_XMAX_ENDSTOP              //Better to disable the XMAX to avoid conflict. Just rename "XMAX_ENDSTOP" by the endstop you are using for Z2 axis.
210
+    #define Z2_USE_ENDSTOP _XMAX_
162 211
   #endif
163 212
 
164 213
 #endif // Z_DUAL_STEPPER_DRIVERS
@@ -220,9 +269,9 @@
220 269
 //homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
221 270
 #define X_HOME_BUMP_MM 5
222 271
 #define Y_HOME_BUMP_MM 5
223
-#define Z_HOME_BUMP_MM 3
224
-#define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
225
-//#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
272
+#define Z_HOME_BUMP_MM 2
273
+#define HOMING_BUMP_DIVISOR {4, 4, 8}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
274
+#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
226 275
 
227 276
 // When G28 is called, this option will make Y home before X
228 277
 //#define HOME_Y_BEFORE_X
@@ -240,7 +289,13 @@
240 289
 #define INVERT_E_STEP_PIN false
241 290
 
242 291
 // Default stepper release if idle. Set to 0 to deactivate.
292
+// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true.
293
+// Time can be set by M18 and M84.
243 294
 #define DEFAULT_STEPPER_DEACTIVE_TIME 60
295
+#define DISABLE_INACTIVE_X true
296
+#define DISABLE_INACTIVE_Y true
297
+#define DISABLE_INACTIVE_Z true  // set to false if the nozzle will fall down on your printed part when print has finished.
298
+#define DISABLE_INACTIVE_E true
244 299
 
245 300
 #define DEFAULT_MINIMUMFEEDRATE       0.0     // minimum feedrate
246 301
 #define DEFAULT_MINTRAVELFEEDRATE     0.0
@@ -276,6 +331,9 @@
276 331
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
277 332
 #define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
278 333
 
334
+// Motor Current controlled via PWM (Overridable on supported boards with PWM-driven motor driver current)
335
+//#define PWM_MOTOR_CURRENT {1300, 1300, 1250} // Values in milliamps
336
+
279 337
 // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
280 338
 //#define DIGIPOT_I2C
281 339
 // Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8
@@ -311,10 +369,10 @@
311 369
   #define SDCARD_RATHERRECENTFIRST  //reverse file order of sd card menu display. Its sorted practically after the file system block order.
312 370
   // 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.
313 371
   // using:
314
-  //#define MENU_ADDAUTOSTART
372
+  #define MENU_ADDAUTOSTART
315 373
 
316 374
   // Show a progress bar on HD44780 LCDs for SD printing
317
-  //#define LCD_PROGRESS_BAR
375
+  #define LCD_PROGRESS_BAR
318 376
 
319 377
   #if ENABLED(LCD_PROGRESS_BAR)
320 378
     // Amount of time (ms) to show the bar
@@ -328,7 +386,7 @@
328 386
   #endif
329 387
 
330 388
   // This allows hosts to request long names for files and folders with M33
331
-  //#define LONG_FILENAME_HOST_SUPPORT
389
+  #define LONG_FILENAME_HOST_SUPPORT
332 390
 
333 391
   // This option allows you to abort SD printing when any endstop is triggered.
334 392
   // This feature must be enabled with "M540 S1" or from the LCD menu.
@@ -349,17 +407,16 @@
349 407
   //#define USE_SMALL_INFOFONT
350 408
 #endif // DOGLCD
351 409
 
352
-
353 410
 // @section more
354 411
 
355 412
 // The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
356
-//#define USE_WATCHDOG
413
+#define USE_WATCHDOG
357 414
 
358 415
 #if ENABLED(USE_WATCHDOG)
359
-// If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
360
-// The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset.
361
-//  However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled.
362
-//#define WATCHDOG_RESET_MANUAL
416
+  // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
417
+  // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset.
418
+  //  However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled.
419
+  //#define WATCHDOG_RESET_MANUAL
363 420
 #endif
364 421
 
365 422
 // @section lcd
@@ -367,9 +424,10 @@
367 424
 // Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process
368 425
 // it can e.g. be used to change z-positions in the print startup phase in real-time
369 426
 // does not respect endstops!
370
-//#define BABYSTEPPING
427
+#define BABYSTEPPING
371 428
 #if ENABLED(BABYSTEPPING)
372 429
   #define BABYSTEP_XY  //not only z, but also XY in the menu. more clutter, more functions
430
+                       //not implemented for deltabots!
373 431
   #define BABYSTEP_INVERT_Z false  //true for inverse movements in Z
374 432
   #define BABYSTEP_MULTIPLICATOR 1 //faster movements
375 433
 #endif
@@ -388,7 +446,6 @@
388 446
 #if ENABLED(ADVANCE)
389 447
   #define EXTRUDER_ADVANCE_K .0
390 448
   #define D_FILAMENT 2.85
391
-  #define STEPS_MM_E 836
392 449
 #endif
393 450
 
394 451
 // @section extras
@@ -397,7 +454,7 @@
397 454
 #define MM_PER_ARC_SEGMENT 1
398 455
 #define N_ARC_CORRECTION 25
399 456
 
400
-const unsigned int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement
457
+const unsigned int dropsegments = 2; //everything with less than this number of steps will be ignored as move and joined with the next movement
401 458
 
402 459
 // @section temperature
403 460
 
@@ -415,7 +472,7 @@ const unsigned int dropsegments=5; //everything with less than this number of st
415 472
 #if ENABLED(SDSUPPORT)
416 473
   #define BLOCK_BUFFER_SIZE 16   // SD,LCD,Buttons take more memory, block buffer needs to be smaller
417 474
 #else
418
-  #define BLOCK_BUFFER_SIZE 16 // maximize block buffer
475
+  #define BLOCK_BUFFER_SIZE 32 // maximize block buffer
419 476
 #endif
420 477
 
421 478
 // @section more
@@ -462,12 +519,15 @@ const unsigned int dropsegments=5; //everything with less than this number of st
462 519
     #define FILAMENTCHANGE_ZADD 10
463 520
     #define FILAMENTCHANGE_FIRSTRETRACT -2
464 521
     #define FILAMENTCHANGE_FINALRETRACT -100
522
+    #define AUTO_FILAMENT_CHANGE                //This extrude filament until you press the button on LCD
523
+    #define AUTO_FILAMENT_CHANGE_LENGTH 0.04    //Extrusion length on automatic extrusion loop
524
+    #define AUTO_FILAMENT_CHANGE_FEEDRATE 300   //Extrusion feedrate (mm/min) on automatic extrusion loop
465 525
   #endif
466 526
 #endif
467 527
 
468 528
 /******************************************************************************\
469 529
  * enable this section if you have TMC26X motor drivers.
470
- * you need to import the TMC26XStepper library into the arduino IDE for this
530
+ * you need to import the TMC26XStepper library into the Arduino IDE for this
471 531
  ******************************************************************************/
472 532
 
473 533
 // @section tmc
@@ -475,52 +535,52 @@ const unsigned int dropsegments=5; //everything with less than this number of st
475 535
 //#define HAVE_TMCDRIVER
476 536
 #if ENABLED(HAVE_TMCDRIVER)
477 537
 
478
-//#define X_IS_TMC
538
+  //#define X_IS_TMC
479 539
   #define X_MAX_CURRENT 1000  //in mA
480 540
   #define X_SENSE_RESISTOR 91 //in mOhms
481 541
   #define X_MICROSTEPS 16     //number of microsteps
482 542
 
483
-//#define X2_IS_TMC
543
+  //#define X2_IS_TMC
484 544
   #define X2_MAX_CURRENT 1000  //in mA
485 545
   #define X2_SENSE_RESISTOR 91 //in mOhms
486 546
   #define X2_MICROSTEPS 16     //number of microsteps
487 547
 
488
-//#define Y_IS_TMC
548
+  //#define Y_IS_TMC
489 549
   #define Y_MAX_CURRENT 1000  //in mA
490 550
   #define Y_SENSE_RESISTOR 91 //in mOhms
491 551
   #define Y_MICROSTEPS 16     //number of microsteps
492 552
 
493
-//#define Y2_IS_TMC
553
+  //#define Y2_IS_TMC
494 554
   #define Y2_MAX_CURRENT 1000  //in mA
495 555
   #define Y2_SENSE_RESISTOR 91 //in mOhms
496 556
   #define Y2_MICROSTEPS 16     //number of microsteps
497 557
 
498
-//#define Z_IS_TMC
558
+  //#define Z_IS_TMC
499 559
   #define Z_MAX_CURRENT 1000  //in mA
500 560
   #define Z_SENSE_RESISTOR 91 //in mOhms
501 561
   #define Z_MICROSTEPS 16     //number of microsteps
502 562
 
503
-//#define Z2_IS_TMC
563
+  //#define Z2_IS_TMC
504 564
   #define Z2_MAX_CURRENT 1000  //in mA
505 565
   #define Z2_SENSE_RESISTOR 91 //in mOhms
506 566
   #define Z2_MICROSTEPS 16     //number of microsteps
507 567
 
508
-//#define E0_IS_TMC
568
+  //#define E0_IS_TMC
509 569
   #define E0_MAX_CURRENT 1000  //in mA
510 570
   #define E0_SENSE_RESISTOR 91 //in mOhms
511 571
   #define E0_MICROSTEPS 16     //number of microsteps
512 572
 
513
-//#define E1_IS_TMC
573
+  //#define E1_IS_TMC
514 574
   #define E1_MAX_CURRENT 1000  //in mA
515 575
   #define E1_SENSE_RESISTOR 91 //in mOhms
516 576
   #define E1_MICROSTEPS 16     //number of microsteps
517 577
 
518
-//#define E2_IS_TMC
578
+  //#define E2_IS_TMC
519 579
   #define E2_MAX_CURRENT 1000  //in mA
520 580
   #define E2_SENSE_RESISTOR 91 //in mOhms
521 581
   #define E2_MICROSTEPS 16     //number of microsteps
522 582
 
523
-//#define E3_IS_TMC
583
+  //#define E3_IS_TMC
524 584
   #define E3_MAX_CURRENT 1000  //in mA
525 585
   #define E3_SENSE_RESISTOR 91 //in mOhms
526 586
   #define E3_MICROSTEPS 16     //number of microsteps
@@ -529,7 +589,7 @@ const unsigned int dropsegments=5; //everything with less than this number of st
529 589
 
530 590
 /******************************************************************************\
531 591
  * enable this section if you have L6470  motor drivers.
532
- * you need to import the L6470 library into the arduino IDE for this
592
+ * you need to import the L6470 library into the Arduino IDE for this
533 593
  ******************************************************************************/
534 594
 
535 595
 // @section l6470
@@ -537,63 +597,63 @@ const unsigned int dropsegments=5; //everything with less than this number of st
537 597
 //#define HAVE_L6470DRIVER
538 598
 #if ENABLED(HAVE_L6470DRIVER)
539 599
 
540
-//#define X_IS_L6470
600
+  //#define X_IS_L6470
541 601
   #define X_MICROSTEPS 16     //number of microsteps
542
-  #define X_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
602
+  #define X_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
543 603
   #define X_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
544 604
   #define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall
545 605
 
546
-//#define X2_IS_L6470
606
+  //#define X2_IS_L6470
547 607
   #define X2_MICROSTEPS 16     //number of microsteps
548
-  #define X2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
608
+  #define X2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
549 609
   #define X2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
550 610
   #define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
551 611
 
552
-//#define Y_IS_L6470
612
+  //#define Y_IS_L6470
553 613
   #define Y_MICROSTEPS 16     //number of microsteps
554
-  #define Y_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
614
+  #define Y_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
555 615
   #define Y_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
556 616
   #define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall
557 617
 
558
-//#define Y2_IS_L6470
618
+  //#define Y2_IS_L6470
559 619
   #define Y2_MICROSTEPS 16     //number of microsteps
560
-  #define Y2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
620
+  #define Y2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
561 621
   #define Y2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
562 622
   #define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
563 623
 
564
-//#define Z_IS_L6470
624
+  //#define Z_IS_L6470
565 625
   #define Z_MICROSTEPS 16     //number of microsteps
566
-  #define Z_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
626
+  #define Z_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
567 627
   #define Z_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
568 628
   #define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall
569 629
 
570
-//#define Z2_IS_L6470
630
+  //#define Z2_IS_L6470
571 631
   #define Z2_MICROSTEPS 16     //number of microsteps
572
-  #define Z2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
632
+  #define Z2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
573 633
   #define Z2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
574 634
   #define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
575 635
 
576
-//#define E0_IS_L6470
636
+  //#define E0_IS_L6470
577 637
   #define E0_MICROSTEPS 16     //number of microsteps
578
-  #define E0_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
638
+  #define E0_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
579 639
   #define E0_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
580 640
   #define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall
581 641
 
582
-//#define E1_IS_L6470
642
+  //#define E1_IS_L6470
583 643
   #define E1_MICROSTEPS 16     //number of microsteps
584
-  #define E1_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
644
+  #define E1_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
585 645
   #define E1_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
586 646
   #define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall
587 647
 
588
-//#define E2_IS_L6470
648
+  //#define E2_IS_L6470
589 649
   #define E2_MICROSTEPS 16     //number of microsteps
590
-  #define E2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
650
+  #define E2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
591 651
   #define E2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
592 652
   #define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
593 653
 
594
-//#define E3_IS_L6470
654
+  //#define E3_IS_L6470
595 655
   #define E3_MICROSTEPS 16     //number of microsteps
596
-  #define E3_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
656
+  #define E3_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
597 657
   #define E3_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
598 658
   #define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall
599 659
 

+ 212
- 114
Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h View File

@@ -1,3 +1,40 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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
+/**
24
+ * Configuration.h
25
+ *
26
+ * Basic settings such as:
27
+ *
28
+ * - Type of electronics
29
+ * - Type of temperature sensor
30
+ * - Printer geometry
31
+ * - Endstop configuration
32
+ * - LCD controller
33
+ * - Extra features
34
+ *
35
+ * Advanced settings can be found in Configuration_adv.h
36
+ *
37
+ */
1 38
 #ifndef CONFIGURATION_H
2 39
 #define CONFIGURATION_H
3 40
 
@@ -7,8 +44,10 @@
7 44
 //===========================================================================
8 45
 //============================= Getting Started =============================
9 46
 //===========================================================================
10
-/*
11
-Here are some standard links for getting your machine calibrated:
47
+
48
+/**
49
+ * Here are some standard links for getting your machine calibrated:
50
+ *
12 51
  * http://reprap.org/wiki/Calibration
13 52
  * http://youtu.be/wAL9d7FgInk
14 53
  * http://calculator.josefprusa.cz
@@ -16,11 +55,7 @@ Here are some standard links for getting your machine calibrated:
16 55
  * http://www.thingiverse.com/thing:5573
17 56
  * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap
18 57
  * http://www.thingiverse.com/thing:298812
19
-*/
20
-
21
-// This configuration file contains the basic settings.
22
-// Advanced settings can be found in Configuration_adv.h
23
-// BASIC SETTINGS: select your board type, temperature sensor type, axis scaling, and endstop configuration
58
+ */
24 59
 
25 60
 //===========================================================================
26 61
 //============================= DELTA Printer ===============================
@@ -110,6 +145,7 @@ Here are some standard links for getting your machine calibrated:
110 145
 //--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table
111 146
 //
112 147
 //// Temperature sensor settings:
148
+// -3 is thermocouple with MAX31855 (only for sensor 0)
113 149
 // -2 is thermocouple with MAX6675 (only for sensor 0)
114 150
 // -1 is thermocouple with AD595
115 151
 // 0 is not used
@@ -129,6 +165,7 @@ Here are some standard links for getting your machine calibrated:
129 165
 // 13 is 100k Hisens 3950  1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
130 166
 // 20 is the PT100 circuit found in the Ultimainboard V2.x
131 167
 // 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
168
+// 70 is the 100K thermistor found in the bq Hephestos 2
132 169
 //
133 170
 //    1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k
134 171
 //                          (but gives greater accuracy and more stable PID)
@@ -144,7 +181,7 @@ Here are some standard links for getting your machine calibrated:
144 181
 //     Use it for Testing or Development purposes. NEVER for production machine.
145 182
 //#define DUMMY_THERMISTOR_998_VALUE 25
146 183
 //#define DUMMY_THERMISTOR_999_VALUE 100
147
-// :{ '0': "Not used", '4': "10k !! do not use for a hotend. Bad resolution at high temp. !!", '1': "100k / 4.7k - EPCOS", '51': "100k / 1k - EPCOS", '6': "100k / 4.7k EPCOS - Not as accurate as Table 1", '5': "100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '7': "100k / 4.7k Honeywell 135-104LAG-J01", '71': "100k / 4.7k Honeywell 135-104LAF-J01", '8': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9': "100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10': "100k / 4.7k RS 198-961", '11': "100k / 4.7k beta 3950 1%", '12': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13': "100k Hisens 3950  1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '60': "100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '55': "100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '2': "200k / 4.7k - ATC Semitec 204GT-2", '52': "200k / 1k - ATC Semitec 204GT-2", '-2': "Thermocouple + MAX6675 (only for sensor 0)", '-1': "Thermocouple + AD595", '3': "Mendel-parts / 4.7k", '1047': "Pt1000 / 4.7k", '1010': "Pt1000 / 1k (non standard)", '20': "PT100 (Ultimainboard V2.x)", '147': "Pt100 / 4.7k", '110': "Pt100 / 1k (non-standard)", '998': "Dummy 1", '999': "Dummy 2" }
184
+// :{ '0': "Not used", '4': "10k !! do not use for a hotend. Bad resolution at high temp. !!", '1': "100k / 4.7k - EPCOS", '51': "100k / 1k - EPCOS", '6': "100k / 4.7k EPCOS - Not as accurate as Table 1", '5': "100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '7': "100k / 4.7k Honeywell 135-104LAG-J01", '71': "100k / 4.7k Honeywell 135-104LAF-J01", '8': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9': "100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10': "100k / 4.7k RS 198-961", '11': "100k / 4.7k beta 3950 1%", '12': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13': "100k Hisens 3950  1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '60': "100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '55': "100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '2': "200k / 4.7k - ATC Semitec 204GT-2", '52': "200k / 1k - ATC Semitec 204GT-2", '-3': "Thermocouple + MAX31855 (only for sensor 0)", '-2': "Thermocouple + MAX6675 (only for sensor 0)", '-1': "Thermocouple + AD595", '3': "Mendel-parts / 4.7k", '1047': "Pt1000 / 4.7k", '1010': "Pt1000 / 1k (non standard)", '20': "PT100 (Ultimainboard V2.x)", '147': "Pt100 / 4.7k", '110': "Pt100 / 1k (non-standard)", '998': "Dummy 1", '999': "Dummy 2" }
148 185
 #define TEMP_SENSOR_0 1
149 186
 #define TEMP_SENSOR_1 0
150 187
 #define TEMP_SENSOR_2 0
@@ -178,14 +215,9 @@ Here are some standard links for getting your machine calibrated:
178 215
 #define HEATER_3_MAXTEMP 275
179 216
 #define BED_MAXTEMP 150
180 217
 
181
-// If your bed has low resistance e.g. .6 ohm and throws the fuse you can duty cycle it to reduce the
182
-// average current. The value should be an integer and the heat bed will be turned on for 1 interval of
183
-// HEATER_BED_DUTY_CYCLE_DIVIDER intervals.
184
-//#define HEATER_BED_DUTY_CYCLE_DIVIDER 4
185
-
186 218
 // If you want the M105 heater power reported in watts, define the BED_WATTS, and (shared for all extruders) EXTRUDER_WATTS
187
-//#define EXTRUDER_WATTS (12.0*12.0/6.7) //  P=I^2/R
188
-//#define BED_WATTS (12.0*12.0/1.1)      // P=I^2/R
219
+//#define EXTRUDER_WATTS (12.0*12.0/6.7) // P=U^2/R
220
+//#define BED_WATTS (12.0*12.0/1.1)      // P=U^2/R
189 221
 
190 222
 //===========================================================================
191 223
 //============================= PID Settings ================================
@@ -197,6 +229,7 @@ Here are some standard links for getting your machine calibrated:
197 229
 #define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
198 230
 #define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
199 231
 #if ENABLED(PIDTEMP)
232
+  //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
200 233
   //#define PID_DEBUG // Sends debug data to the serial port.
201 234
   //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
202 235
   //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -247,19 +280,19 @@ Here are some standard links for getting your machine calibrated:
247 280
 // so you shouldn't use it unless you are OK with PWM on your bed.  (see the comment on enabling PIDTEMPBED)
248 281
 #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
249 282
 
250
-//#define PID_BED_DEBUG // Sends debug data to the serial port.
251
-
252 283
 #if ENABLED(PIDTEMPBED)
253 284
 
285
+  //#define PID_BED_DEBUG // Sends debug data to the serial port.
286
+
254 287
   #define PID_BED_INTEGRAL_DRIVE_MAX MAX_BED_POWER //limit for the integral term
255 288
 
256
-  //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
289
+  //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
257 290
   //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
258 291
   #define  DEFAULT_bedKp 10.00
259 292
   #define  DEFAULT_bedKi .023
260 293
   #define  DEFAULT_bedKd 305.4
261 294
 
262
-  //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
295
+  //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
263 296
   //from pidautotune
264 297
   //#define  DEFAULT_bedKp 97.1
265 298
   //#define  DEFAULT_bedKi 1.41
@@ -284,16 +317,15 @@ Here are some standard links for getting your machine calibrated:
284 317
 //===========================================================================
285 318
 
286 319
 /**
287
- * Thermal Runaway Protection protects your printer from damage and fire if a
320
+ * Thermal Protection protects your printer from damage and fire if a
288 321
  * thermistor falls out or temperature sensors fail in any way.
289 322
  *
290 323
  * The issue: If a thermistor falls out or a temperature sensor fails,
291 324
  * Marlin can no longer sense the actual temperature. Since a disconnected
292 325
  * thermistor reads as a low temperature, the firmware will keep the heater on.
293 326
  *
294
- * The solution: Once the temperature reaches the target, start observing.
295
- * If the temperature stays too far below the target (hysteresis) for too long,
296
- * the firmware will halt as a safety precaution.
327
+ * If you get "Thermal Runaway" or "Heating failed" errors the
328
+ * details can be tuned in Configuration_adv.h
297 329
  */
298 330
 
299 331
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
@@ -314,8 +346,22 @@ Here are some standard links for getting your machine calibrated:
314 346
 // Enable this option for Toshiba steppers
315 347
 //#define CONFIG_STEPPERS_TOSHIBA
316 348
 
349
+//===========================================================================
350
+//============================== Endstop Settings ===========================
351
+//===========================================================================
352
+
317 353
 // @section homing
318 354
 
355
+// Specify here all the endstop connectors that are connected to any endstop or probe.
356
+// Almost all printers will be using one per axis. Probes will use one or more of the
357
+// extra connectors. Leave undefined any used for non-endstop and non-probe purposes.
358
+#define USE_XMIN_PLUG
359
+#define USE_YMIN_PLUG
360
+#define USE_ZMIN_PLUG
361
+//#define USE_XMAX_PLUG
362
+//#define USE_YMAX_PLUG
363
+//#define USE_ZMAX_PLUG
364
+
319 365
 // coarse Endstop Settings
320 366
 #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
321 367
 
@@ -338,13 +384,53 @@ const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
338 384
 const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
339 385
 const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
340 386
 const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
341
-//#define DISABLE_MAX_ENDSTOPS
342
-//#define DISABLE_MIN_ENDSTOPS
343 387
 
344
-// If you want to enable the Z probe pin, but disable its use, uncomment the line below.
345
-// This only affects a Z probe endstop if you have separate Z min endstop as well and have
346
-// activated Z_MIN_PROBE_ENDSTOP below. If you are using the Z Min endstop on your Z probe,
347
-// this has no effect.
388
+//===========================================================================
389
+//============================= Z Probe Options =============================
390
+//===========================================================================
391
+
392
+// Enable Z_MIN_PROBE_ENDSTOP to use _both_ a Z Probe and a Z-min-endstop on the same machine.
393
+// With this option the Z_MIN_PROBE_PIN will only be used for probing, never for homing.
394
+//
395
+// *** PLEASE READ ALL INSTRUCTIONS BELOW FOR SAFETY! ***
396
+//
397
+// To continue using the Z-min-endstop for homing, be sure to disable Z_SAFE_HOMING.
398
+// Example: To park the head outside the bed area when homing with G28.
399
+//
400
+// To use a separate Z probe, your board must define a Z_MIN_PROBE_PIN.
401
+//
402
+// For a servo-based Z probe, you must set up servo support below, including
403
+// NUM_SERVOS, Z_ENDSTOP_SERVO_NR and SERVO_ENDSTOP_ANGLES.
404
+//
405
+// - RAMPS 1.3/1.4 boards may be able to use the 5V, GND, and Aux4->D32 pin.
406
+// - Use 5V for powered (usu. inductive) sensors.
407
+// - Otherwise connect:
408
+//   - normally-closed switches to GND and D32.
409
+//   - normally-open switches to 5V and D32.
410
+//
411
+// Normally-closed switches are advised and are the default.
412
+//
413
+// The Z_MIN_PROBE_PIN sets the Arduino pin to use. (See your board's pins file.)
414
+// Since the RAMPS Aux4->D32 pin maps directly to the Arduino D32 pin, D32 is the
415
+// default pin for all RAMPS-based boards. Some other boards map differently.
416
+// To set or change the pin for your board, edit the appropriate pins_XXXXX.h file.
417
+//
418
+// WARNING:
419
+// Setting the wrong pin may have unexpected and potentially disastrous consequences.
420
+// Use with caution and do your homework.
421
+//
422
+//#define Z_MIN_PROBE_ENDSTOP
423
+
424
+// Enable Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN to use the Z_MIN_PIN for your Z_MIN_PROBE.
425
+// The Z_MIN_PIN will then be used for both Z-homing and probing.
426
+#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
427
+
428
+// To use a probe you must enable one of the two options above!
429
+
430
+// This option disables the use of the Z_MIN_PROBE_PIN
431
+// To enable the Z probe pin but disable its use, uncomment the line below. This only affects a
432
+// Z probe switch if you have a separate Z min endstop also and have activated Z_MIN_PROBE_ENDSTOP above.
433
+// If you're using the Z MIN endstop connector for your Z probe, this has no effect.
348 434
 //#define DISABLE_Z_MIN_PROBE_ENDSTOP
349 435
 
350 436
 // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
@@ -354,11 +440,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
354 440
 #define Z_ENABLE_ON 0
355 441
 #define E_ENABLE_ON 0 // For all extruders
356 442
 
357
-// Disables axis when it's not being used.
443
+// Disables axis stepper immediately when it's not being used.
358 444
 // WARNING: When motors turn off there is a chance of losing position accuracy!
359 445
 #define DISABLE_X false
360 446
 #define DISABLE_Y false
361 447
 #define DISABLE_Z false
448
+// Warn on display about possibly reduced accuracy
449
+//#define DISABLE_REDUCED_ACCURACY_WARNING
362 450
 
363 451
 // @section extruder
364 452
 
@@ -381,6 +469,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
381 469
 #define INVERT_E3_DIR false
382 470
 
383 471
 // @section homing
472
+//#define MIN_Z_HEIGHT_FOR_HOMING 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
473
+                                    // Be sure you have this distance over your Z_MAX_POS in case.
384 474
 
385 475
 // ENDSTOP SETTINGS:
386 476
 // Sets direction of endstops when homing; 1=MAX, -1=MIN
@@ -416,24 +506,26 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
416 506
 #endif
417 507
 
418 508
 //===========================================================================
419
-//=========================== Manual Bed Leveling ===========================
509
+//============================ Mesh Bed Leveling ============================
420 510
 //===========================================================================
421 511
 
422
-//#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
423 512
 //#define MESH_BED_LEVELING    // Enable mesh bed leveling.
424 513
 
425
-#if ENABLED(MANUAL_BED_LEVELING)
426
-  #define MBL_Z_STEP 0.025  // Step size while manually probing Z axis.
427
-#endif  // MANUAL_BED_LEVELING
428
-
429 514
 #if ENABLED(MESH_BED_LEVELING)
430 515
   #define MESH_MIN_X 10
431
-  #define MESH_MAX_X (X_MAX_POS - MESH_MIN_X)
516
+  #define MESH_MAX_X (X_MAX_POS - (MESH_MIN_X))
432 517
   #define MESH_MIN_Y 10
433
-  #define MESH_MAX_Y (Y_MAX_POS - MESH_MIN_Y)
518
+  #define MESH_MAX_Y (Y_MAX_POS - (MESH_MIN_Y))
434 519
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
435 520
   #define MESH_NUM_Y_POINTS 3
436 521
   #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0.
522
+
523
+  //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
524
+
525
+  #if ENABLED(MANUAL_BED_LEVELING)
526
+    #define MBL_Z_STEP 0.025  // Step size while manually probing Z axis.
527
+  #endif  // MANUAL_BED_LEVELING
528
+
437 529
 #endif  // MESH_BED_LEVELING
438 530
 
439 531
 //===========================================================================
@@ -442,10 +534,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
442 534
 
443 535
 // @section bedlevel
444 536
 
445
-
446 537
 //#define AUTO_BED_LEVELING_FEATURE // Delete the comment to enable (remove // at the start of the line)
447 538
 //#define DEBUG_LEVELING_FEATURE
448
-#define Z_MIN_PROBE_REPEATABILITY_TEST  // If not commented out, Z-Probe Repeatability test will be included if Auto Bed Leveling is Enabled.
539
+#define Z_MIN_PROBE_REPEATABILITY_TEST  // If not commented out, Z Probe Repeatability test will be included if Auto Bed Leveling is Enabled.
449 540
 
450 541
 #if ENABLED(AUTO_BED_LEVELING_FEATURE)
451 542
 
@@ -457,7 +548,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
457 548
   //   This mode is preferred because there are more measurements.
458 549
   //
459 550
   // - "3-point" mode
460
-  //   Probe 3 arbitrary points on the bed (that aren't colinear)
551
+  //   Probe 3 arbitrary points on the bed (that aren't collinear)
461 552
   //   You specify the XY coordinates of all 3 points.
462 553
 
463 554
   // Enable this to sample the bed in a grid (least squares solution).
@@ -471,7 +562,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
471 562
     #define FRONT_PROBE_BED_POSITION 20
472 563
     #define BACK_PROBE_BED_POSITION 170
473 564
 
474
-    #define MIN_PROBE_EDGE 10 // The Z probe square sides can be no smaller than this.
565
+    #define MIN_PROBE_EDGE 10 // The Z probe minimum square sides can be no smaller than this.
475 566
 
476 567
     // Set the number of grid points per dimension.
477 568
     // You probably don't need more than 3 (squared=9).
@@ -479,25 +570,37 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
479 570
 
480 571
   #else  // !AUTO_BED_LEVELING_GRID
481 572
 
482
-      // Arbitrary points to probe.
483
-      // A simple cross-product is used to estimate the plane of the bed.
484
-      #define ABL_PROBE_PT_1_X 15
485
-      #define ABL_PROBE_PT_1_Y 180
486
-      #define ABL_PROBE_PT_2_X 15
487
-      #define ABL_PROBE_PT_2_Y 20
488
-      #define ABL_PROBE_PT_3_X 170
489
-      #define ABL_PROBE_PT_3_Y 20
573
+    // Arbitrary points to probe.
574
+    // A simple cross-product is used to estimate the plane of the bed.
575
+    #define ABL_PROBE_PT_1_X 15
576
+    #define ABL_PROBE_PT_1_Y 180
577
+    #define ABL_PROBE_PT_2_X 15
578
+    #define ABL_PROBE_PT_2_Y 20
579
+    #define ABL_PROBE_PT_3_X 170
580
+    #define ABL_PROBE_PT_3_Y 20
490 581
 
491 582
   #endif // AUTO_BED_LEVELING_GRID
492 583
 
493
-  // Offsets to the Z probe relative to the nozzle tip.
584
+  // Z Probe to nozzle (X,Y) offset, relative to (0, 0).
494 585
   // X and Y offsets must be integers.
495
-  #define X_PROBE_OFFSET_FROM_EXTRUDER -25     // Z probe to nozzle X offset: -left  +right
496
-  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29     // Z probe to nozzle Y offset: -front +behind
497
-  #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35  // Z probe to nozzle Z offset: -below (always!)
498
-
499
-  #define Z_RAISE_BEFORE_HOMING 4       // (in mm) Raise Z axis before homing (G28) for Z probe clearance.
500
-                                        // Be sure you have this distance over your Z_MAX_POS in case.
586
+  //
587
+  // In the following example the X and Y offsets are both positive:
588
+  // #define X_PROBE_OFFSET_FROM_EXTRUDER 10
589
+  // #define Y_PROBE_OFFSET_FROM_EXTRUDER 10
590
+  //
591
+  //    +-- BACK ---+
592
+  //    |           |
593
+  //  L |    (+) P  | R <-- probe (20,20)
594
+  //  E |           | I
595
+  //  F | (-) N (+) | G <-- nozzle (10,10)
596
+  //  T |           | H
597
+  //    |    (-)    | T
598
+  //    |           |
599
+  //    O-- FRONT --+
600
+  //  (0,0)
601
+  #define X_PROBE_OFFSET_FROM_EXTRUDER -25     // X offset: -left  [of the nozzle] +right
602
+  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29     // Y offset: -front [of the nozzle] +behind
603
+  #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35  // Z offset: -below [the nozzle] (always negative!)
501 604
 
502 605
   #define XY_TRAVEL_SPEED 8000         // X and Y axis travel speed between probes, in mm/min.
503 606
 
@@ -505,16 +608,29 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
505 608
   #define Z_RAISE_BETWEEN_PROBINGS 5  // How much the Z axis will be raised when traveling from between next probing points.
506 609
   #define Z_RAISE_AFTER_PROBING 15    // How much the Z axis will be raised after the last probing point.
507 610
 
508
-//#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" // These commands will be executed in the end of G29 routine.
509
-                                                                            // Useful to retract a deployable Z probe.
611
+  //#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" // These commands will be executed in the end of G29 routine.
612
+                                                                             // Useful to retract a deployable Z probe.
613
+
614
+  // Probes are sensors/switches that need to be activated before they can be used
615
+  // and deactivated after the use.
616
+  // Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, ... . You have to activate one of these for the AUTO_BED_LEVELING_FEATURE
617
+
618
+  // A fix mounted probe, like the normal inductive probe, must be deactivated to go below Z_PROBE_OFFSET_FROM_EXTRUDER
619
+  // when the hardware endstops are active.
620
+  //#define FIX_MOUNTED_PROBE
510 621
 
511
-  //#define Z_PROBE_SLED // Turn on if you have a Z probe mounted on a sled like those designed by Charles Bell.
622
+  // A Servo Probe can be defined in the servo section below.
623
+
624
+  // An Allen Key Probe is currently predefined only in the delta example configurations.
625
+
626
+  //#define Z_PROBE_SLED // Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
512 627
   //#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
513 628
 
514
-// If you have enabled the bed auto leveling and are using the same Z probe for Z homing,
515
-// it is highly recommended you let this Z_SAFE_HOMING enabled!!!
629
+  // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing,
630
+  // it is highly recommended you leave Z_SAFE_HOMING enabled!
516 631
 
517
-  #define Z_SAFE_HOMING   // This feature is meant to avoid Z homing with Z probe outside the bed area.
632
+  #define Z_SAFE_HOMING   // Use the z-min-probe for homing to z-min - not the z-min-endstop.
633
+                          // This feature is meant to avoid Z homing with Z probe outside the bed area.
518 634
                           // When defined, it will:
519 635
                           // - Allow Z homing only after X and Y homing AND stepper drivers still enabled.
520 636
                           // - If stepper drivers timeout, it will need X and Y homing again before Z homing.
@@ -528,37 +644,6 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
528 644
 
529 645
   #endif
530 646
 
531
-  // Support for a dedicated Z probe endstop separate from the Z min endstop.
532
-  // If you would like to use both a Z probe and a Z min endstop together,
533
-  // uncomment #define Z_MIN_PROBE_ENDSTOP and read the instructions below.
534
-  // If you still want to use the Z min endstop for homing, disable Z_SAFE_HOMING above.
535
-  // Example: To park the head outside the bed area when homing with G28.
536
-  //
537
-  // WARNING:
538
-  // The Z min endstop will need to set properly as it would without a Z probe
539
-  // to prevent head crashes and premature stopping during a print.
540
-  //
541
-  // To use a separate Z probe endstop, you must have a Z_MIN_PROBE_PIN
542
-  // defined in the pins_XXXXX.h file for your control board.
543
-  // If you are using a servo based Z probe, you will need to enable NUM_SERVOS,
544
-  // Z_ENDSTOP_SERVO_NR and SERVO_ENDSTOP_ANGLES in the R/C SERVO support below.
545
-  // RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin
546
-  // in the Aux 4 section of the RAMPS board. Use 5V for powered sensors,
547
-  // otherwise connect to ground and D32 for normally closed configuration
548
-  // and 5V and D32 for normally open configurations.
549
-  // Normally closed configuration is advised and assumed.
550
-  // The D32 pin in Aux 4 on RAMPS maps to the Arduino D32 pin.
551
-  // Z_MIN_PROBE_PIN is setting the pin to use on the Arduino.
552
-  // Since the D32 pin on the RAMPS maps to D32 on Arduino, this works.
553
-  // D32 is currently selected in the RAMPS 1.3/1.4 pin file.
554
-  // All other boards will need changes to the respective pins_XXXXX.h file.
555
-  //
556
-  // WARNING:
557
-  // Setting the wrong pin may have unexpected and potentially disastrous outcomes.
558
-  // Use with caution and do your homework.
559
-  //
560
-  //#define Z_MIN_PROBE_ENDSTOP
561
-
562 647
 #endif // AUTO_BED_LEVELING_FEATURE
563 648
 
564 649
 
@@ -633,6 +718,14 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
633 718
 #endif
634 719
 
635 720
 //
721
+// Host Keepalive
722
+//
723
+// By default Marlin will send a busy status message to the host
724
+// every 10 seconds when it can't accept commands.
725
+//
726
+//#define DISABLE_HOST_KEEPALIVE // Enable this option if your host doesn't like keepalive messages.
727
+
728
+//
636 729
 // M100 Free Memory Watcher
637 730
 //
638 731
 //#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
@@ -652,13 +745,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
652 745
 // @section lcd
653 746
 
654 747
 // Define your display language below. Replace (en) with your language code and uncomment.
655
-// en, pl, fr, de, es, ru, bg, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, cn, test
748
+// en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8, fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test
656 749
 // See also language.h
657 750
 #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
658 751
 
659 752
 // Choose ONE of these 3 charsets. This has to match your hardware. Ignored for full graphic display.
660 753
 // To find out what type you have - compile with (test) - upload - click to get the menu. You'll see two typical lines from the upper half of the charset.
661
-// See also documentation/LCDLanguageFont.md
754
+// See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
662 755
   #define DISPLAY_CHARSET_HD44780_JAPAN        // this is the most common hardware
663 756
   //#define DISPLAY_CHARSET_HD44780_WESTERN
664 757
   //#define DISPLAY_CHARSET_HD44780_CYRILLIC
@@ -666,11 +759,12 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
666 759
 #define ULTRA_LCD  //general LCD support, also 16x2
667 760
 //#define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
668 761
 #define SDSUPPORT // Enable SD Card Support in Hardware Console
669
-//#define SDSLOW // Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
670
-//#define SDEXTRASLOW // Use even slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
762
+                  // Changed behaviour! If you need SDSUPPORT uncomment it!
763
+//#define SPI_SPEED SPI_HALF_SPEED // (also SPI_QUARTER_SPEED, SPI_EIGHTH_SPEED) Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
671 764
 #define SD_CHECK_AND_RETRY // Use CRC checks and retries on the SD communication
672 765
 //#define ENCODER_PULSES_PER_STEP 1 // Increase if you have a high resolution encoder
673 766
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
767
+//#define REVERSE_MENU_DIRECTION // When enabled CLOCKWISE moves UP in the LCD menu
674 768
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
675 769
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
676 770
 //#define SPEAKER // The sound device is a speaker - not a buzzer. A buzzer resonates with his own frequency.
@@ -687,13 +781,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
687 781
 
688 782
 // The Panucatt Devices Viki 2.0 and mini Viki with Graphic LCD
689 783
 // http://panucatt.com
690
-// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
784
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
691 785
 //#define VIKI2
692 786
 //#define miniVIKI
693 787
 
694 788
 // This is a new controller currently under development.  https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
695 789
 //
696
-// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
790
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
697 791
 //#define ELB_FULL_GRAPHIC_CONTROLLER
698 792
 //#define SD_DETECT_INVERTED
699 793
 
@@ -708,7 +802,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
708 802
 // The RepRapDiscount FULL GRAPHIC Smart Controller (quadratic white PCB)
709 803
 // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
710 804
 //
711
-// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
805
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
712 806
 //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
713 807
 
714 808
 // The RepRapWorld REPRAPWORLD_KEYPAD v1.1
@@ -731,6 +825,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
731 825
 
732 826
 //#define LCD_I2C_SAINSMART_YWROBOT
733 827
 
828
+//#define LCM1602 // LCM1602 Adapter for 16x2 LCD
829
+
734 830
 // PANELOLU2 LCD with status LEDs, separate encoder and click inputs
735 831
 //
736 832
 // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
@@ -744,7 +840,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
744 840
 //#define LCD_I2C_VIKI
745 841
 
746 842
 // SSD1306 OLED generic display support
747
-// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
843
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
748 844
 //#define U8GLIB_SSD1306
749 845
 
750 846
 // Shift register panels
@@ -756,7 +852,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
756 852
 
757 853
 // @section extras
758 854
 
759
-// Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
855
+// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino
760 856
 //#define FAST_PWM_FAN
761 857
 
762 858
 // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
@@ -836,21 +932,23 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
836 932
  * Note may require analog pins to be defined for different motherboards
837 933
  **********************************************************************/
838 934
 // Uncomment below to enable
839
-//#define FILAMENT_SENSOR
840
-
841
-#define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
842
-#define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
935
+//#define FILAMENT_WIDTH_SENSOR
843 936
 
844 937
 #define DEFAULT_NOMINAL_FILAMENT_DIA 3.00  //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software.  Used for sensor reading validation
845
-#define MEASURED_UPPER_LIMIT         3.30  //upper limit factor used for sensor reading validation in mm
846
-#define MEASURED_LOWER_LIMIT         1.90  //lower limit factor for sensor reading validation in mm
847
-#define MAX_MEASUREMENT_DELAY       20     //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM  and lower number saves RAM)
848 938
 
849
-//defines used in the code
850
-#define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially
939
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
940
+  #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
941
+  #define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
942
+
943
+  #define MEASURED_UPPER_LIMIT         3.30  //upper limit factor used for sensor reading validation in mm
944
+  #define MEASURED_LOWER_LIMIT         1.90  //lower limit factor for sensor reading validation in mm
945
+  #define MAX_MEASUREMENT_DELAY       20     //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM  and lower number saves RAM)
851 946
 
852
-//When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status.  Status will appear for 5 sec.
853
-//#define FILAMENT_LCD_DISPLAY
947
+  #define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially
948
+
949
+  //When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status.  Status will appear for 5 sec.
950
+  //#define FILAMENT_LCD_DISPLAY
951
+#endif
854 952
 
855 953
 #include "Configuration_adv.h"
856 954
 #include "thermistortables.h"

+ 224
- 114
Marlin/example_configurations/RigidBot/Configuration.h View File

@@ -1,3 +1,40 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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
+/**
24
+ * Configuration.h
25
+ *
26
+ * Basic settings such as:
27
+ *
28
+ * - Type of electronics
29
+ * - Type of temperature sensor
30
+ * - Printer geometry
31
+ * - Endstop configuration
32
+ * - LCD controller
33
+ * - Extra features
34
+ *
35
+ * Advanced settings can be found in Configuration_adv.h
36
+ *
37
+ */
1 38
 #ifndef CONFIGURATION_H
2 39
 #define CONFIGURATION_H
3 40
 
@@ -7,8 +44,10 @@
7 44
 //===========================================================================
8 45
 //============================= Getting Started =============================
9 46
 //===========================================================================
10
-/*
11
-Here are some standard links for getting your machine calibrated:
47
+
48
+/**
49
+ * Here are some standard links for getting your machine calibrated:
50
+ *
12 51
  * http://reprap.org/wiki/Calibration
13 52
  * http://youtu.be/wAL9d7FgInk
14 53
  * http://calculator.josefprusa.cz
@@ -16,11 +55,7 @@ Here are some standard links for getting your machine calibrated:
16 55
  * http://www.thingiverse.com/thing:5573
17 56
  * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap
18 57
  * http://www.thingiverse.com/thing:298812
19
-*/
20
-
21
-// This configuration file contains the basic settings.
22
-// Advanced settings can be found in Configuration_adv.h
23
-// BASIC SETTINGS: select your board type, temperature sensor type, axis scaling, and endstop configuration
58
+ */
24 59
 
25 60
 //===========================================================================
26 61
 //============================= DELTA Printer ===============================
@@ -110,6 +145,7 @@ Here are some standard links for getting your machine calibrated:
110 145
 //--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table
111 146
 //
112 147
 //// Temperature sensor settings:
148
+// -3 is thermocouple with MAX31855 (only for sensor 0)
113 149
 // -2 is thermocouple with MAX6675 (only for sensor 0)
114 150
 // -1 is thermocouple with AD595
115 151
 // 0 is not used
@@ -129,6 +165,7 @@ Here are some standard links for getting your machine calibrated:
129 165
 // 13 is 100k Hisens 3950  1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
130 166
 // 20 is the PT100 circuit found in the Ultimainboard V2.x
131 167
 // 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
168
+// 70 is the 100K thermistor found in the bq Hephestos 2
132 169
 //
133 170
 //    1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k
134 171
 //                          (but gives greater accuracy and more stable PID)
@@ -144,7 +181,7 @@ Here are some standard links for getting your machine calibrated:
144 181
 //     Use it for Testing or Development purposes. NEVER for production machine.
145 182
 //#define DUMMY_THERMISTOR_998_VALUE 25
146 183
 //#define DUMMY_THERMISTOR_999_VALUE 100
147
-// :{ '0': "Not used", '4': "10k !! do not use for a hotend. Bad resolution at high temp. !!", '1': "100k / 4.7k - EPCOS", '51': "100k / 1k - EPCOS", '6': "100k / 4.7k EPCOS - Not as accurate as Table 1", '5': "100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '7': "100k / 4.7k Honeywell 135-104LAG-J01", '71': "100k / 4.7k Honeywell 135-104LAF-J01", '8': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9': "100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10': "100k / 4.7k RS 198-961", '11': "100k / 4.7k beta 3950 1%", '12': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13': "100k Hisens 3950  1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '60': "100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '55': "100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '2': "200k / 4.7k - ATC Semitec 204GT-2", '52': "200k / 1k - ATC Semitec 204GT-2", '-2': "Thermocouple + MAX6675 (only for sensor 0)", '-1': "Thermocouple + AD595", '3': "Mendel-parts / 4.7k", '1047': "Pt1000 / 4.7k", '1010': "Pt1000 / 1k (non standard)", '20': "PT100 (Ultimainboard V2.x)", '147': "Pt100 / 4.7k", '110': "Pt100 / 1k (non-standard)", '998': "Dummy 1", '999': "Dummy 2" }
184
+// :{ '0': "Not used", '4': "10k !! do not use for a hotend. Bad resolution at high temp. !!", '1': "100k / 4.7k - EPCOS", '51': "100k / 1k - EPCOS", '6': "100k / 4.7k EPCOS - Not as accurate as Table 1", '5': "100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '7': "100k / 4.7k Honeywell 135-104LAG-J01", '71': "100k / 4.7k Honeywell 135-104LAF-J01", '8': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9': "100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10': "100k / 4.7k RS 198-961", '11': "100k / 4.7k beta 3950 1%", '12': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13': "100k Hisens 3950  1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '60': "100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '55': "100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '2': "200k / 4.7k - ATC Semitec 204GT-2", '52': "200k / 1k - ATC Semitec 204GT-2", '-3': "Thermocouple + MAX31855 (only for sensor 0)", '-2': "Thermocouple + MAX6675 (only for sensor 0)", '-1': "Thermocouple + AD595", '3': "Mendel-parts / 4.7k", '1047': "Pt1000 / 4.7k", '1010': "Pt1000 / 1k (non standard)", '20': "PT100 (Ultimainboard V2.x)", '147': "Pt100 / 4.7k", '110': "Pt100 / 1k (non-standard)", '998': "Dummy 1", '999': "Dummy 2" }
148 185
 #define TEMP_SENSOR_0 1 // DGlass3D = 5; RigidBot = 1; 3DSv6 = 5
149 186
 #define TEMP_SENSOR_1 0
150 187
 #define TEMP_SENSOR_2 0
@@ -178,14 +215,9 @@ Here are some standard links for getting your machine calibrated:
178 215
 #define HEATER_3_MAXTEMP 275
179 216
 #define BED_MAXTEMP 150
180 217
 
181
-// If your bed has low resistance e.g. .6 ohm and throws the fuse you can duty cycle it to reduce the
182
-// average current. The value should be an integer and the heat bed will be turned on for 1 interval of
183
-// HEATER_BED_DUTY_CYCLE_DIVIDER intervals.
184
-//#define HEATER_BED_DUTY_CYCLE_DIVIDER 4
185
-
186 218
 // If you want the M105 heater power reported in watts, define the BED_WATTS, and (shared for all extruders) EXTRUDER_WATTS
187
-//#define EXTRUDER_WATTS (12.0*12.0/6.7) //  P=I^2/R
188
-//#define BED_WATTS (12.0*12.0/1.1)      // P=I^2/R
219
+//#define EXTRUDER_WATTS (12.0*12.0/6.7) // P=U^2/R
220
+//#define BED_WATTS (12.0*12.0/1.1)      // P=U^2/R
189 221
 
190 222
 //===========================================================================
191 223
 //============================= PID Settings ================================
@@ -197,6 +229,7 @@ Here are some standard links for getting your machine calibrated:
197 229
 #define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
198 230
 #define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
199 231
 #if ENABLED(PIDTEMP)
232
+  //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
200 233
   //#define PID_DEBUG // Sends debug data to the serial port.
201 234
   //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
202 235
   //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -219,6 +252,11 @@ Here are some standard links for getting your machine calibrated:
219 252
   //#define  DEFAULT_Ki 0.85
220 253
   //#define  DEFAULT_Kd 245
221 254
 
255
+  // E3D w/ rigidbot cartridge
256
+  //#define  DEFAULT_Kp 16.30
257
+  //#define  DEFAULT_Ki 0.95
258
+  //#define  DEFAULT_Kd 69.69
259
+
222 260
 #endif // PIDTEMP
223 261
 
224 262
 //===========================================================================
@@ -243,10 +281,10 @@ Here are some standard links for getting your machine calibrated:
243 281
 // so you shouldn't use it unless you are OK with PWM on your bed.  (see the comment on enabling PIDTEMPBED)
244 282
 #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
245 283
 
246
-//#define PID_BED_DEBUG // Sends debug data to the serial port.
247
-
248 284
 #if ENABLED(PIDTEMPBED)
249 285
 
286
+  //#define PID_BED_DEBUG // Sends debug data to the serial port.
287
+
250 288
   #define PID_BED_INTEGRAL_DRIVE_MAX MAX_BED_POWER //limit for the integral term
251 289
 
252 290
   //RigidBot, from pid autotune
@@ -273,16 +311,15 @@ Here are some standard links for getting your machine calibrated:
273 311
 //===========================================================================
274 312
 
275 313
 /**
276
- * Thermal Runaway Protection protects your printer from damage and fire if a
314
+ * Thermal Protection protects your printer from damage and fire if a
277 315
  * thermistor falls out or temperature sensors fail in any way.
278 316
  *
279 317
  * The issue: If a thermistor falls out or a temperature sensor fails,
280 318
  * Marlin can no longer sense the actual temperature. Since a disconnected
281 319
  * thermistor reads as a low temperature, the firmware will keep the heater on.
282 320
  *
283
- * The solution: Once the temperature reaches the target, start observing.
284
- * If the temperature stays too far below the target (hysteresis) for too long,
285
- * the firmware will halt as a safety precaution.
321
+ * If you get "Thermal Runaway" or "Heating failed" errors the
322
+ * details can be tuned in Configuration_adv.h
286 323
  */
287 324
 
288 325
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
@@ -297,11 +334,28 @@ Here are some standard links for getting your machine calibrated:
297 334
 // Uncomment this option to enable CoreXY kinematics
298 335
 //#define COREXY
299 336
 
337
+// Uncomment this option to enable CoreXZ kinematics
338
+//#define COREXZ
339
+
300 340
 // Enable this option for Toshiba steppers
301 341
 //#define CONFIG_STEPPERS_TOSHIBA
302 342
 
343
+//===========================================================================
344
+//============================== Endstop Settings ===========================
345
+//===========================================================================
346
+
303 347
 // @section homing
304 348
 
349
+// Specify here all the endstop connectors that are connected to any endstop or probe.
350
+// Almost all printers will be using one per axis. Probes will use one or more of the
351
+// extra connectors. Leave undefined any used for non-endstop and non-probe purposes.
352
+#define USE_XMIN_PLUG
353
+#define USE_YMIN_PLUG
354
+#define USE_ZMIN_PLUG
355
+//#define USE_XMAX_PLUG
356
+//#define USE_YMAX_PLUG
357
+//#define USE_ZMAX_PLUG
358
+
305 359
 // coarse Endstop Settings
306 360
 #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
307 361
 
@@ -324,13 +378,53 @@ const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
324 378
 const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
325 379
 const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
326 380
 const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
327
-//#define DISABLE_MAX_ENDSTOPS
328
-//#define DISABLE_MIN_ENDSTOPS
329 381
 
330
-// If you want to enable the Z probe pin, but disable its use, uncomment the line below.
331
-// This only affects a Z probe endstop if you have separate Z min endstop as well and have
332
-// activated Z_MIN_PROBE_ENDSTOP below. If you are using the Z Min endstop on your Z probe,
333
-// this has no effect.
382
+//===========================================================================
383
+//============================= Z Probe Options =============================
384
+//===========================================================================
385
+
386
+// Enable Z_MIN_PROBE_ENDSTOP to use _both_ a Z Probe and a Z-min-endstop on the same machine.
387
+// With this option the Z_MIN_PROBE_PIN will only be used for probing, never for homing.
388
+//
389
+// *** PLEASE READ ALL INSTRUCTIONS BELOW FOR SAFETY! ***
390
+//
391
+// To continue using the Z-min-endstop for homing, be sure to disable Z_SAFE_HOMING.
392
+// Example: To park the head outside the bed area when homing with G28.
393
+//
394
+// To use a separate Z probe, your board must define a Z_MIN_PROBE_PIN.
395
+//
396
+// For a servo-based Z probe, you must set up servo support below, including
397
+// NUM_SERVOS, Z_ENDSTOP_SERVO_NR and SERVO_ENDSTOP_ANGLES.
398
+//
399
+// - RAMPS 1.3/1.4 boards may be able to use the 5V, GND, and Aux4->D32 pin.
400
+// - Use 5V for powered (usu. inductive) sensors.
401
+// - Otherwise connect:
402
+//   - normally-closed switches to GND and D32.
403
+//   - normally-open switches to 5V and D32.
404
+//
405
+// Normally-closed switches are advised and are the default.
406
+//
407
+// The Z_MIN_PROBE_PIN sets the Arduino pin to use. (See your board's pins file.)
408
+// Since the RAMPS Aux4->D32 pin maps directly to the Arduino D32 pin, D32 is the
409
+// default pin for all RAMPS-based boards. Some other boards map differently.
410
+// To set or change the pin for your board, edit the appropriate pins_XXXXX.h file.
411
+//
412
+// WARNING:
413
+// Setting the wrong pin may have unexpected and potentially disastrous consequences.
414
+// Use with caution and do your homework.
415
+//
416
+//#define Z_MIN_PROBE_ENDSTOP
417
+
418
+// Enable Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN to use the Z_MIN_PIN for your Z_MIN_PROBE.
419
+// The Z_MIN_PIN will then be used for both Z-homing and probing.
420
+#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
421
+
422
+// To use a probe you must enable one of the two options above!
423
+
424
+// This option disables the use of the Z_MIN_PROBE_PIN
425
+// To enable the Z probe pin but disable its use, uncomment the line below. This only affects a
426
+// Z probe switch if you have a separate Z min endstop also and have activated Z_MIN_PROBE_ENDSTOP above.
427
+// If you're using the Z MIN endstop connector for your Z probe, this has no effect.
334 428
 //#define DISABLE_Z_MIN_PROBE_ENDSTOP
335 429
 
336 430
 // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
@@ -340,11 +434,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
340 434
 #define Z_ENABLE_ON 0
341 435
 #define E_ENABLE_ON 0 // For all extruders
342 436
 
343
-// Disables axis when it's not being used.
437
+// Disables axis stepper immediately when it's not being used.
344 438
 // WARNING: When motors turn off there is a chance of losing position accuracy!
345 439
 #define DISABLE_X false
346 440
 #define DISABLE_Y false
347 441
 #define DISABLE_Z false
442
+// Warn on display about possibly reduced accuracy
443
+//#define DISABLE_REDUCED_ACCURACY_WARNING
348 444
 
349 445
 // @section extruder
350 446
 
@@ -367,6 +463,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
367 463
 #define INVERT_E3_DIR false
368 464
 
369 465
 // @section homing
466
+//#define MIN_Z_HEIGHT_FOR_HOMING 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
467
+                                    // Be sure you have this distance over your Z_MAX_POS in case.
370 468
 
371 469
 // ENDSTOP SETTINGS:
372 470
 // Sets direction of endstops when homing; 1=MAX, -1=MIN
@@ -402,24 +500,26 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
402 500
 #endif
403 501
 
404 502
 //===========================================================================
405
-//=========================== Manual Bed Leveling ===========================
503
+//============================ Mesh Bed Leveling ============================
406 504
 //===========================================================================
407 505
 
408
-//#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
409 506
 //#define MESH_BED_LEVELING    // Enable mesh bed leveling.
410 507
 
411
-#if ENABLED(MANUAL_BED_LEVELING)
412
-  #define MBL_Z_STEP 0.025  // Step size while manually probing Z axis.
413
-#endif  // MANUAL_BED_LEVELING
414
-
415 508
 #if ENABLED(MESH_BED_LEVELING)
416 509
   #define MESH_MIN_X 10
417
-  #define MESH_MAX_X (X_MAX_POS - MESH_MIN_X)
510
+  #define MESH_MAX_X (X_MAX_POS - (MESH_MIN_X))
418 511
   #define MESH_MIN_Y 10
419
-  #define MESH_MAX_Y (Y_MAX_POS - MESH_MIN_Y)
512
+  #define MESH_MAX_Y (Y_MAX_POS - (MESH_MIN_Y))
420 513
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
421 514
   #define MESH_NUM_Y_POINTS 3
422 515
   #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0.
516
+
517
+  //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
518
+
519
+  #if ENABLED(MANUAL_BED_LEVELING)
520
+    #define MBL_Z_STEP 0.025  // Step size while manually probing Z axis.
521
+  #endif  // MANUAL_BED_LEVELING
522
+
423 523
 #endif  // MESH_BED_LEVELING
424 524
 
425 525
 //===========================================================================
@@ -430,7 +530,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
430 530
 
431 531
 //#define AUTO_BED_LEVELING_FEATURE // Delete the comment to enable (remove // at the start of the line)
432 532
 //#define DEBUG_LEVELING_FEATURE
433
-//#define Z_MIN_PROBE_REPEATABILITY_TEST  // If not commented out, Z-Probe Repeatability test will be included if Auto Bed Leveling is Enabled.
533
+//#define Z_MIN_PROBE_REPEATABILITY_TEST  // If not commented out, Z Probe Repeatability test will be included if Auto Bed Leveling is Enabled.
434 534
 
435 535
 #if ENABLED(AUTO_BED_LEVELING_FEATURE)
436 536
 
@@ -442,7 +542,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
442 542
   //   This mode is preferred because there are more measurements.
443 543
   //
444 544
   // - "3-point" mode
445
-  //   Probe 3 arbitrary points on the bed (that aren't colinear)
545
+  //   Probe 3 arbitrary points on the bed (that aren't collinear)
446 546
   //   You specify the XY coordinates of all 3 points.
447 547
 
448 548
   // Enable this to sample the bed in a grid (least squares solution).
@@ -456,7 +556,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
456 556
     #define FRONT_PROBE_BED_POSITION 20
457 557
     #define BACK_PROBE_BED_POSITION 170
458 558
 
459
-    #define MIN_PROBE_EDGE 10 // The Z probe square sides can be no smaller than this.
559
+    #define MIN_PROBE_EDGE 10 // The Z probe minimum square sides can be no smaller than this.
460 560
 
461 561
     // Set the number of grid points per dimension.
462 562
     // You probably don't need more than 3 (squared=9).
@@ -464,25 +564,37 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
464 564
 
465 565
   #else  // !AUTO_BED_LEVELING_GRID
466 566
 
467
-      // Arbitrary points to probe.
468
-      // A simple cross-product is used to estimate the plane of the bed.
469
-      #define ABL_PROBE_PT_1_X 15
470
-      #define ABL_PROBE_PT_1_Y 180
471
-      #define ABL_PROBE_PT_2_X 15
472
-      #define ABL_PROBE_PT_2_Y 20
473
-      #define ABL_PROBE_PT_3_X 170
474
-      #define ABL_PROBE_PT_3_Y 20
567
+    // Arbitrary points to probe.
568
+    // A simple cross-product is used to estimate the plane of the bed.
569
+    #define ABL_PROBE_PT_1_X 15
570
+    #define ABL_PROBE_PT_1_Y 180
571
+    #define ABL_PROBE_PT_2_X 15
572
+    #define ABL_PROBE_PT_2_Y 20
573
+    #define ABL_PROBE_PT_3_X 170
574
+    #define ABL_PROBE_PT_3_Y 20
475 575
 
476 576
   #endif // AUTO_BED_LEVELING_GRID
477 577
 
478
-  // Offsets to the Z probe relative to the nozzle tip.
578
+  // Z Probe to nozzle (X,Y) offset, relative to (0, 0).
479 579
   // X and Y offsets must be integers.
480
-  #define X_PROBE_OFFSET_FROM_EXTRUDER -25     // Z probe to nozzle X offset: -left  +right
481
-  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29     // Z probe to nozzle Y offset: -front +behind
482
-  #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35  // Z probe to nozzle Z offset: -below (always!)
483
-
484
-  #define Z_RAISE_BEFORE_HOMING 4       // (in mm) Raise Z axis before homing (G28) for Z probe clearance.
485
-                                        // Be sure you have this distance over your Z_MAX_POS in case.
580
+  //
581
+  // In the following example the X and Y offsets are both positive:
582
+  // #define X_PROBE_OFFSET_FROM_EXTRUDER 10
583
+  // #define Y_PROBE_OFFSET_FROM_EXTRUDER 10
584
+  //
585
+  //    +-- BACK ---+
586
+  //    |           |
587
+  //  L |    (+) P  | R <-- probe (20,20)
588
+  //  E |           | I
589
+  //  F | (-) N (+) | G <-- nozzle (10,10)
590
+  //  T |           | H
591
+  //    |    (-)    | T
592
+  //    |           |
593
+  //    O-- FRONT --+
594
+  //  (0,0)
595
+  #define X_PROBE_OFFSET_FROM_EXTRUDER -25     // X offset: -left  [of the nozzle] +right
596
+  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29     // Y offset: -front [of the nozzle] +behind
597
+  #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35  // Z offset: -below [the nozzle] (always negative!)
486 598
 
487 599
   #define XY_TRAVEL_SPEED 8000         // X and Y axis travel speed between probes, in mm/min.
488 600
 
@@ -490,16 +602,29 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
490 602
   #define Z_RAISE_BETWEEN_PROBINGS 5  // How much the Z axis will be raised when traveling from between next probing points.
491 603
   #define Z_RAISE_AFTER_PROBING 15    // How much the Z axis will be raised after the last probing point.
492 604
 
493
-//#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" // These commands will be executed in the end of G29 routine.
494
-                                                                            // Useful to retract a deployable Z probe.
605
+  //#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" // These commands will be executed in the end of G29 routine.
606
+                                                                             // Useful to retract a deployable Z probe.
607
+
608
+  // Probes are sensors/switches that need to be activated before they can be used
609
+  // and deactivated after the use.
610
+  // Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, ... . You have to activate one of these for the AUTO_BED_LEVELING_FEATURE
611
+
612
+  // A fix mounted probe, like the normal inductive probe, must be deactivated to go below Z_PROBE_OFFSET_FROM_EXTRUDER
613
+  // when the hardware endstops are active.
614
+  //#define FIX_MOUNTED_PROBE
495 615
 
496
-  //#define Z_PROBE_SLED // Turn on if you have a Z probe mounted on a sled like those designed by Charles Bell.
616
+  // A Servo Probe can be defined in the servo section below.
617
+
618
+  // An Allen Key Probe is currently predefined only in the delta example configurations.
619
+
620
+  //#define Z_PROBE_SLED // Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
497 621
   //#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
498 622
 
499
-// If you have enabled the bed auto leveling and are using the same Z probe for Z homing,
500
-// it is highly recommended you let this Z_SAFE_HOMING enabled!!!
623
+  // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing,
624
+  // it is highly recommended you leave Z_SAFE_HOMING enabled!
501 625
 
502
-  #define Z_SAFE_HOMING   // This feature is meant to avoid Z homing with Z probe outside the bed area.
626
+  #define Z_SAFE_HOMING   // Use the z-min-probe for homing to z-min - not the z-min-endstop.
627
+                          // This feature is meant to avoid Z homing with Z probe outside the bed area.
503 628
                           // When defined, it will:
504 629
                           // - Allow Z homing only after X and Y homing AND stepper drivers still enabled.
505 630
                           // - If stepper drivers timeout, it will need X and Y homing again before Z homing.
@@ -513,37 +638,6 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
513 638
 
514 639
   #endif
515 640
 
516
-  // Support for a dedicated Z probe endstop separate from the Z min endstop.
517
-  // If you would like to use both a Z probe and a Z min endstop together,
518
-  // uncomment #define Z_MIN_PROBE_ENDSTOP and read the instructions below.
519
-  // If you still want to use the Z min endstop for homing, disable Z_SAFE_HOMING above.
520
-  // Example: To park the head outside the bed area when homing with G28.
521
-  //
522
-  // WARNING:
523
-  // The Z min endstop will need to set properly as it would without a Z probe
524
-  // to prevent head crashes and premature stopping during a print.
525
-  //
526
-  // To use a separate Z probe endstop, you must have a Z_MIN_PROBE_PIN
527
-  // defined in the pins_XXXXX.h file for your control board.
528
-  // If you are using a servo based Z probe, you will need to enable NUM_SERVOS,
529
-  // Z_ENDSTOP_SERVO_NR and SERVO_ENDSTOP_ANGLES in the R/C SERVO support below.
530
-  // RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin
531
-  // in the Aux 4 section of the RAMPS board. Use 5V for powered sensors,
532
-  // otherwise connect to ground and D32 for normally closed configuration
533
-  // and 5V and D32 for normally open configurations.
534
-  // Normally closed configuration is advised and assumed.
535
-  // The D32 pin in Aux 4 on RAMPS maps to the Arduino D32 pin.
536
-  // Z_MIN_PROBE_PIN is setting the pin to use on the Arduino.
537
-  // Since the D32 pin on the RAMPS maps to D32 on Arduino, this works.
538
-  // D32 is currently selected in the RAMPS 1.3/1.4 pin file.
539
-  // All other boards will need changes to the respective pins_XXXXX.h file.
540
-  //
541
-  // WARNING:
542
-  // Setting the wrong pin may have unexpected and potentially disastrous outcomes.
543
-  // Use with caution and do your homework.
544
-  //
545
-  //#define Z_MIN_PROBE_ENDSTOP
546
-
547 641
 #endif // AUTO_BED_LEVELING_FEATURE
548 642
 
549 643
 
@@ -611,7 +705,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
611 705
 // M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
612 706
 // M502 - reverts to the default "factory settings".  You still need to store them in EEPROM afterwards if you want to.
613 707
 //define this to enable EEPROM support
614
-//#define EEPROM_SETTINGS
708
+#define EEPROM_SETTINGS
615 709
 
616 710
 #if ENABLED(EEPROM_SETTINGS)
617 711
   // To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
@@ -619,6 +713,14 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
619 713
 #endif
620 714
 
621 715
 //
716
+// Host Keepalive
717
+//
718
+// By default Marlin will send a busy status message to the host
719
+// every 10 seconds when it can't accept commands.
720
+//
721
+//#define DISABLE_HOST_KEEPALIVE // Enable this option if your host doesn't like keepalive messages.
722
+
723
+//
622 724
 // M100 Free Memory Watcher
623 725
 //
624 726
 //#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
@@ -638,26 +740,26 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
638 740
 // @section lcd
639 741
 
640 742
 // Define your display language below. Replace (en) with your language code and uncomment.
641
-// en, pl, fr, de, es, ru, bg, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, cn, test
743
+// en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8, fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test
642 744
 // See also language.h
643 745
 #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
644 746
 
645 747
 // Choose ONE of these 3 charsets. This has to match your hardware. Ignored for full graphic display.
646 748
 // To find out what type you have - compile with (test) - upload - click to get the menu. You'll see two typical lines from the upper half of the charset.
647
-// See also documentation/LCDLanguageFont.md
749
+// See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
648 750
   #define DISPLAY_CHARSET_HD44780_JAPAN        // this is the most common hardware
649 751
   //#define DISPLAY_CHARSET_HD44780_WESTERN
650 752
   //#define DISPLAY_CHARSET_HD44780_CYRILLIC
651 753
 
652 754
 //#define ULTRA_LCD  //general LCD support, also 16x2
653 755
 //#define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
654
-//#define SDSUPPORT // Enable SD Card Support in Hardware Console
655
-// Changed behaviour! If you need SDSUPPORT uncomment it!
656
-//#define SDSLOW // Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
657
-//#define SDEXTRASLOW // Use even slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
756
+#define SDSUPPORT // Enable SD Card Support in Hardware Console
757
+                  // Changed behaviour! If you need SDSUPPORT uncomment it!
758
+#define SPI_SPEED SPI_EIGHTH_SPEED // Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
658 759
 //#define SD_CHECK_AND_RETRY // Use CRC checks and retries on the SD communication
659 760
 //#define ENCODER_PULSES_PER_STEP 1 // Increase if you have a high resolution encoder
660 761
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
762
+//#define REVERSE_MENU_DIRECTION // When enabled CLOCKWISE moves UP in the LCD menu
661 763
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
662 764
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
663 765
 //#define SPEAKER // The sound device is a speaker - not a buzzer. A buzzer resonates with his own frequency.
@@ -674,13 +776,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
674 776
 
675 777
 // The Panucatt Devices Viki 2.0 and mini Viki with Graphic LCD
676 778
 // http://panucatt.com
677
-// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
779
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
678 780
 //#define VIKI2
679 781
 //#define miniVIKI
680 782
 
681 783
 // This is a new controller currently under development.  https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
682 784
 //
683
-// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
785
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
684 786
 //#define ELB_FULL_GRAPHIC_CONTROLLER
685 787
 //#define SD_DETECT_INVERTED
686 788
 
@@ -695,7 +797,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
695 797
 // The RepRapDiscount FULL GRAPHIC Smart Controller (quadratic white PCB)
696 798
 // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
697 799
 //
698
-// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
800
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
699 801
 //
700 802
 // RigidBoard: To rewire this for a RigidBot see http://rigidtalk.com/wiki/index.php?title=LCD_Smart_Controller
701 803
 //
@@ -711,6 +813,10 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
711 813
 // REMEMBER TO INSTALL LiquidCrystal_I2C.h in your ARDUINO library folder: https://github.com/kiyoshigawa/LiquidCrystal_I2C
712 814
 //#define RA_CONTROL_PANEL
713 815
 
816
+// The MakerLab Mini Panel with graphic controller and SD support
817
+// http://reprap.org/wiki/Mini_panel
818
+//#define MINIPANEL
819
+
714 820
 // RigidBot Panel V1.0
715 821
 // http://www.inventapart.com/
716 822
 #define RIGIDBOT_PANEL
@@ -721,6 +827,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
721 827
 
722 828
 //#define LCD_I2C_SAINSMART_YWROBOT
723 829
 
830
+//#define LCM1602 // LCM1602 Adapter for 16x2 LCD
831
+
724 832
 // PANELOLU2 LCD with status LEDs, separate encoder and click inputs
725 833
 //
726 834
 // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
@@ -734,7 +842,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
734 842
 //#define LCD_I2C_VIKI
735 843
 
736 844
 // SSD1306 OLED generic display support
737
-// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
845
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
738 846
 //#define U8GLIB_SSD1306
739 847
 
740 848
 // Shift register panels
@@ -746,7 +854,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
746 854
 
747 855
 // @section extras
748 856
 
749
-// Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
857
+// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino
750 858
 //#define FAST_PWM_FAN
751 859
 
752 860
 // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
@@ -826,21 +934,23 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
826 934
  * Note may require analog pins to be defined for different motherboards
827 935
  **********************************************************************/
828 936
 // Uncomment below to enable
829
-//#define FILAMENT_SENSOR
830
-
831
-#define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
832
-#define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
937
+//#define FILAMENT_WIDTH_SENSOR
833 938
 
834 939
 #define DEFAULT_NOMINAL_FILAMENT_DIA 3.00  //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software.  Used for sensor reading validation
835
-#define MEASURED_UPPER_LIMIT         3.30  //upper limit factor used for sensor reading validation in mm
836
-#define MEASURED_LOWER_LIMIT         1.90  //lower limit factor for sensor reading validation in mm
837
-#define MAX_MEASUREMENT_DELAY       20     //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM  and lower number saves RAM)
838 940
 
839
-//defines used in the code
840
-#define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially
941
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
942
+  #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
943
+  #define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
944
+
945
+  #define MEASURED_UPPER_LIMIT         3.30  //upper limit factor used for sensor reading validation in mm
946
+  #define MEASURED_LOWER_LIMIT         1.90  //lower limit factor for sensor reading validation in mm
947
+  #define MAX_MEASUREMENT_DELAY       20     //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM  and lower number saves RAM)
841 948
 
842
-//When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status.  Status will appear for 5 sec.
843
-//#define FILAMENT_LCD_DISPLAY
949
+  #define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially
950
+
951
+  //When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status.  Status will appear for 5 sec.
952
+  //#define FILAMENT_LCD_DISPLAY
953
+#endif
844 954
 
845 955
 #include "Configuration_adv.h"
846 956
 #include "thermistortables.h"

+ 119
- 60
Marlin/example_configurations/RigidBot/Configuration_adv.h View File

@@ -1,3 +1,35 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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
+/**
24
+ * Configuration_adv.h
25
+ *
26
+ * Advanced settings.
27
+ * Only change these if you know exactly what you're doing.
28
+ * Some of these settings can damage your printer if improperly set!
29
+ *
30
+ * Basic settings can be found in Configuration.h
31
+ *
32
+ */
1 33
 #ifndef CONFIGURATION_ADV_H
2 34
 #define CONFIGURATION_ADV_H
3 35
 
@@ -9,13 +41,26 @@
9 41
 //=============================Thermal Settings  ============================
10 42
 //===========================================================================
11 43
 
12
-#if ENABLED(BED_LIMIT_SWITCHING)
13
-  #define BED_HYSTERESIS 2 //only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS
44
+#if DISABLED(PIDTEMPBED)
45
+  #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control
46
+  #if ENABLED(BED_LIMIT_SWITCHING)
47
+    #define BED_HYSTERESIS 2 // Only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS
48
+  #endif
14 49
 #endif
15
-#define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control
16 50
 
17 51
 /**
18
- * Thermal Protection parameters
52
+ * Thermal Protection protects your printer from damage and fire if a
53
+ * thermistor falls out or temperature sensors fail in any way.
54
+ *
55
+ * The issue: If a thermistor falls out or a temperature sensor fails,
56
+ * Marlin can no longer sense the actual temperature. Since a disconnected
57
+ * thermistor reads as a low temperature, the firmware will keep the heater on.
58
+ *
59
+ * The solution: Once the temperature reaches the target, start observing.
60
+ * If the temperature stays too far below the target (hysteresis) for too long (period),
61
+ * the firmware will halt the machine as a safety precaution.
62
+ *
63
+ * If you get false positives for "Thermal Runaway" increase THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
19 64
  */
20 65
 #if ENABLED(THERMAL_PROTECTION_HOTENDS)
21 66
   #define THERMAL_PROTECTION_PERIOD 40        // Seconds
@@ -26,11 +71,19 @@
26 71
    * WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
27 72
    * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
28 73
    * but only if the current temperature is far enough below the target for a reliable test.
74
+   *
75
+   * If you get false positives for "Heating failed" increase WATCH_TEMP_PERIOD and/or decrease WATCH_TEMP_INCREASE
76
+   * WATCH_TEMP_INCREASE should not be below 2.
29 77
    */
30
-  #define WATCH_TEMP_PERIOD 16                // Seconds
31
-  #define WATCH_TEMP_INCREASE 4               // Degrees Celsius
78
+  #define WATCH_TEMP_PERIOD 20                // Seconds
79
+  #define WATCH_TEMP_INCREASE 2               // Degrees Celsius
32 80
 #endif
33 81
 
82
+/**
83
+ * Thermal Protection parameters for the bed
84
+ * are like the above for the hotends.
85
+ * WATCH_TEMP_BED_PERIOD and WATCH_TEMP_BED_INCREASE are not imlemented now.
86
+ */
34 87
 #if ENABLED(THERMAL_PROTECTION_BED)
35 88
   #define THERMAL_PROTECTION_BED_PERIOD 20    // Seconds
36 89
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
@@ -52,7 +105,7 @@
52 105
  * The maximum buffered steps/sec of the extruder motor is called "se".
53 106
  * Start autotemp mode with M109 S<mintemp> B<maxtemp> F<factor>
54 107
  * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by
55
- * mintemp and maxtemp. Turn this off by excuting M109 without F*
108
+ * mintemp and maxtemp. Turn this off by executing M109 without F*
56 109
  * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp.
57 110
  * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
58 111
  */
@@ -148,9 +201,7 @@
148 201
   //#define Z_DUAL_ENDSTOPS
149 202
 
150 203
   #if ENABLED(Z_DUAL_ENDSTOPS)
151
-    #define Z2_MAX_PIN 36                     //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36)
152
-    const bool Z2_MAX_ENDSTOP_INVERTING = false;
153
-    #define DISABLE_XMAX_ENDSTOP              //Better to disable the XMAX to avoid conflict. Just rename "XMAX_ENDSTOP" by the endstop you are using for Z2 axis.
204
+    #define Z2_USE_ENDSTOP _XMAX_
154 205
   #endif
155 206
 
156 207
 #endif // Z_DUAL_STEPPER_DRIVERS
@@ -232,7 +283,13 @@
232 283
 #define INVERT_E_STEP_PIN false
233 284
 
234 285
 // Default stepper release if idle. Set to 0 to deactivate.
286
+// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true.
287
+// Time can be set by M18 and M84.
235 288
 #define DEFAULT_STEPPER_DEACTIVE_TIME 60
289
+#define DISABLE_INACTIVE_X true
290
+#define DISABLE_INACTIVE_Y true
291
+#define DISABLE_INACTIVE_Z true  // set to false if the nozzle will fall down on your printed part when print has finished.
292
+#define DISABLE_INACTIVE_E true
236 293
 
237 294
 #define DEFAULT_MINIMUMFEEDRATE       0.0     // minimum feedrate
238 295
 #define DEFAULT_MINTRAVELFEEDRATE     0.0
@@ -268,6 +325,9 @@
268 325
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
269 326
 #define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
270 327
 
328
+// Motor Current controlled via PWM (Overridable on supported boards with PWM-driven motor driver current)
329
+//#define PWM_MOTOR_CURRENT {1300, 1300, 1250} // Values in milliamps
330
+
271 331
 // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
272 332
 //#define DIGIPOT_I2C
273 333
 // Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8
@@ -279,9 +339,9 @@
279 339
 //=============================Additional Features===========================
280 340
 //===========================================================================
281 341
 
282
-#define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
283
-#define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
284
-#define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
342
+//#define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
343
+//#define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
344
+//#define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
285 345
 
286 346
 //#define CHDK 4        //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
287 347
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
@@ -290,13 +350,12 @@
290 350
 
291 351
 #if ENABLED(SDSUPPORT)
292 352
 
293
-  // If you are using a RAMPS board or cheap E-bay purchased boards that do not detect when an SD card is inserted
294
-  // You can get round this by connecting a push button or single throw switch to the pin defined as SD_DETECT_PIN
295
-  // in the pins.h file.  When using a push button pulling the pin to ground this will need inverted.  This setting should
296
-  // be commented out otherwise
297
-  #ifndef ELB_FULL_GRAPHIC_CONTROLLER
298
-    #define SD_DETECT_INVERTED
299
-  #endif
353
+  // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
354
+  // around this by connecting a push button or single throw switch to the pin defined
355
+  // as SD_DETECT_PIN in your board's pins definitions.
356
+  // This setting should be disabled unless you are using a push button, pulling the pin to ground.
357
+  // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
358
+  #define SD_DETECT_INVERTED
300 359
 
301 360
   #define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
302 361
   #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
@@ -345,13 +404,13 @@
345 404
 // @section more
346 405
 
347 406
 // The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
348
-//#define USE_WATCHDOG
407
+#define USE_WATCHDOG
349 408
 
350 409
 #if ENABLED(USE_WATCHDOG)
351
-// If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
352
-// The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset.
353
-//  However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled.
354
-//#define WATCHDOG_RESET_MANUAL
410
+  // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
411
+  // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset.
412
+  //  However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled.
413
+  //#define WATCHDOG_RESET_MANUAL
355 414
 #endif
356 415
 
357 416
 // @section lcd
@@ -362,6 +421,7 @@
362 421
 //#define BABYSTEPPING
363 422
 #if ENABLED(BABYSTEPPING)
364 423
   #define BABYSTEP_XY  //not only z, but also XY in the menu. more clutter, more functions
424
+                       //not implemented for deltabots!
365 425
   #define BABYSTEP_INVERT_Z false  //true for inverse movements in Z
366 426
   #define BABYSTEP_MULTIPLICATOR 1 //faster movements
367 427
 #endif
@@ -380,7 +440,6 @@
380 440
 #if ENABLED(ADVANCE)
381 441
   #define EXTRUDER_ADVANCE_K .0
382 442
   #define D_FILAMENT 1.75
383
-  #define STEPS_MM_E 836
384 443
 #endif
385 444
 
386 445
 // @section extras
@@ -389,7 +448,7 @@
389 448
 #define MM_PER_ARC_SEGMENT 1
390 449
 #define N_ARC_CORRECTION 25
391 450
 
392
-const unsigned int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement
451
+const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement
393 452
 
394 453
 // @section temperature
395 454
 
@@ -414,7 +473,7 @@ const unsigned int dropsegments=5; //everything with less than this number of st
414 473
 
415 474
 //The ASCII buffer for receiving from the serial:
416 475
 #define MAX_CMD_SIZE 96
417
-#define BUFSIZE 4
476
+#define BUFSIZE 8
418 477
 
419 478
 // Bad Serial-connections can miss a received command by sending an 'ok'
420 479
 // Therefore some clients abort after 30 seconds in a timeout.
@@ -462,7 +521,7 @@ const unsigned int dropsegments=5; //everything with less than this number of st
462 521
 
463 522
 /******************************************************************************\
464 523
  * enable this section if you have TMC26X motor drivers.
465
- * you need to import the TMC26XStepper library into the arduino IDE for this
524
+ * you need to import the TMC26XStepper library into the Arduino IDE for this
466 525
  ******************************************************************************/
467 526
 
468 527
 // @section tmc
@@ -470,52 +529,52 @@ const unsigned int dropsegments=5; //everything with less than this number of st
470 529
 //#define HAVE_TMCDRIVER
471 530
 #if ENABLED(HAVE_TMCDRIVER)
472 531
 
473
-//#define X_IS_TMC
532
+  //#define X_IS_TMC
474 533
   #define X_MAX_CURRENT 1000  //in mA
475 534
   #define X_SENSE_RESISTOR 91 //in mOhms
476 535
   #define X_MICROSTEPS 16     //number of microsteps
477 536
 
478
-//#define X2_IS_TMC
537
+  //#define X2_IS_TMC
479 538
   #define X2_MAX_CURRENT 1000  //in mA
480 539
   #define X2_SENSE_RESISTOR 91 //in mOhms
481 540
   #define X2_MICROSTEPS 16     //number of microsteps
482 541
 
483
-//#define Y_IS_TMC
542
+  //#define Y_IS_TMC
484 543
   #define Y_MAX_CURRENT 1000  //in mA
485 544
   #define Y_SENSE_RESISTOR 91 //in mOhms
486 545
   #define Y_MICROSTEPS 16     //number of microsteps
487 546
 
488
-//#define Y2_IS_TMC
547
+  //#define Y2_IS_TMC
489 548
   #define Y2_MAX_CURRENT 1000  //in mA
490 549
   #define Y2_SENSE_RESISTOR 91 //in mOhms
491 550
   #define Y2_MICROSTEPS 16     //number of microsteps
492 551
 
493
-//#define Z_IS_TMC
552
+  //#define Z_IS_TMC
494 553
   #define Z_MAX_CURRENT 1000  //in mA
495 554
   #define Z_SENSE_RESISTOR 91 //in mOhms
496 555
   #define Z_MICROSTEPS 16     //number of microsteps
497 556
 
498
-//#define Z2_IS_TMC
557
+  //#define Z2_IS_TMC
499 558
   #define Z2_MAX_CURRENT 1000  //in mA
500 559
   #define Z2_SENSE_RESISTOR 91 //in mOhms
501 560
   #define Z2_MICROSTEPS 16     //number of microsteps
502 561
 
503
-//#define E0_IS_TMC
562
+  //#define E0_IS_TMC
504 563
   #define E0_MAX_CURRENT 1000  //in mA
505 564
   #define E0_SENSE_RESISTOR 91 //in mOhms
506 565
   #define E0_MICROSTEPS 16     //number of microsteps
507 566
 
508
-//#define E1_IS_TMC
567
+  //#define E1_IS_TMC
509 568
   #define E1_MAX_CURRENT 1000  //in mA
510 569
   #define E1_SENSE_RESISTOR 91 //in mOhms
511 570
   #define E1_MICROSTEPS 16     //number of microsteps
512 571
 
513
-//#define E2_IS_TMC
572
+  //#define E2_IS_TMC
514 573
   #define E2_MAX_CURRENT 1000  //in mA
515 574
   #define E2_SENSE_RESISTOR 91 //in mOhms
516 575
   #define E2_MICROSTEPS 16     //number of microsteps
517 576
 
518
-//#define E3_IS_TMC
577
+  //#define E3_IS_TMC
519 578
   #define E3_MAX_CURRENT 1000  //in mA
520 579
   #define E3_SENSE_RESISTOR 91 //in mOhms
521 580
   #define E3_MICROSTEPS 16     //number of microsteps
@@ -524,7 +583,7 @@ const unsigned int dropsegments=5; //everything with less than this number of st
524 583
 
525 584
 /******************************************************************************\
526 585
  * enable this section if you have L6470  motor drivers.
527
- * you need to import the L6470 library into the arduino IDE for this
586
+ * you need to import the L6470 library into the Arduino IDE for this
528 587
  ******************************************************************************/
529 588
 
530 589
 // @section l6470
@@ -532,63 +591,63 @@ const unsigned int dropsegments=5; //everything with less than this number of st
532 591
 //#define HAVE_L6470DRIVER
533 592
 #if ENABLED(HAVE_L6470DRIVER)
534 593
 
535
-//#define X_IS_L6470
594
+  //#define X_IS_L6470
536 595
   #define X_MICROSTEPS 16     //number of microsteps
537
-  #define X_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
596
+  #define X_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
538 597
   #define X_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
539 598
   #define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall
540 599
 
541
-//#define X2_IS_L6470
600
+  //#define X2_IS_L6470
542 601
   #define X2_MICROSTEPS 16     //number of microsteps
543
-  #define X2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
602
+  #define X2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
544 603
   #define X2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
545 604
   #define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
546 605
 
547
-//#define Y_IS_L6470
606
+  //#define Y_IS_L6470
548 607
   #define Y_MICROSTEPS 16     //number of microsteps
549
-  #define Y_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
608
+  #define Y_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
550 609
   #define Y_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
551 610
   #define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall
552 611
 
553
-//#define Y2_IS_L6470
612
+  //#define Y2_IS_L6470
554 613
   #define Y2_MICROSTEPS 16     //number of microsteps
555
-  #define Y2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
614
+  #define Y2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
556 615
   #define Y2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
557 616
   #define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
558 617
 
559
-//#define Z_IS_L6470
618
+  //#define Z_IS_L6470
560 619
   #define Z_MICROSTEPS 16     //number of microsteps
561
-  #define Z_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
620
+  #define Z_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
562 621
   #define Z_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
563 622
   #define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall
564 623
 
565
-//#define Z2_IS_L6470
624
+  //#define Z2_IS_L6470
566 625
   #define Z2_MICROSTEPS 16     //number of microsteps
567
-  #define Z2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
626
+  #define Z2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
568 627
   #define Z2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
569 628
   #define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
570 629
 
571
-//#define E0_IS_L6470
630
+  //#define E0_IS_L6470
572 631
   #define E0_MICROSTEPS 16     //number of microsteps
573
-  #define E0_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
632
+  #define E0_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
574 633
   #define E0_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
575 634
   #define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall
576 635
 
577
-//#define E1_IS_L6470
636
+  //#define E1_IS_L6470
578 637
   #define E1_MICROSTEPS 16     //number of microsteps
579
-  #define E1_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
638
+  #define E1_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
580 639
   #define E1_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
581 640
   #define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall
582 641
 
583
-//#define E2_IS_L6470
642
+  //#define E2_IS_L6470
584 643
   #define E2_MICROSTEPS 16     //number of microsteps
585
-  #define E2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
644
+  #define E2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
586 645
   #define E2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
587 646
   #define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
588 647
 
589
-//#define E3_IS_L6470
648
+  //#define E3_IS_L6470
590 649
   #define E3_MICROSTEPS 16     //number of microsteps
591
-  #define E3_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
650
+  #define E3_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
592 651
   #define E3_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
593 652
   #define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall
594 653
 

+ 220
- 122
Marlin/example_configurations/SCARA/Configuration.h View File

@@ -1,3 +1,40 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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
+/**
24
+ * Configuration.h
25
+ *
26
+ * Basic settings such as:
27
+ *
28
+ * - Type of electronics
29
+ * - Type of temperature sensor
30
+ * - Printer geometry
31
+ * - Endstop configuration
32
+ * - LCD controller
33
+ * - Extra features
34
+ *
35
+ * Advanced settings can be found in Configuration_adv.h
36
+ *
37
+ */
1 38
 #ifndef CONFIGURATION_H
2 39
 #define CONFIGURATION_H
3 40
 
@@ -7,8 +44,10 @@
7 44
 //===========================================================================
8 45
 //============================= Getting Started =============================
9 46
 //===========================================================================
10
-/*
11
-Here are some standard links for getting your machine calibrated:
47
+
48
+/**
49
+ * Here are some standard links for getting your machine calibrated:
50
+ *
12 51
  * http://reprap.org/wiki/Calibration
13 52
  * http://youtu.be/wAL9d7FgInk
14 53
  * http://calculator.josefprusa.cz
@@ -16,11 +55,7 @@ Here are some standard links for getting your machine calibrated:
16 55
  * http://www.thingiverse.com/thing:5573
17 56
  * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap
18 57
  * http://www.thingiverse.com/thing:298812
19
-*/
20
-
21
-// This configuration file contains the basic settings.
22
-// Advanced settings can be found in Configuration_adv.h
23
-// BASIC SETTINGS: select your board type, temperature sensor type, axis scaling, and endstop configuration
58
+ */
24 59
 
25 60
 //===========================================================================
26 61
 //============================= DELTA Printer ===============================
@@ -95,7 +130,7 @@ Here are some standard links for getting your machine calibrated:
95 130
 // The following define selects which electronics board you have.
96 131
 // Please choose the name from boards.h that matches your setup
97 132
 #ifndef MOTHERBOARD
98
-  #define MOTHERBOARD BOARD_RAMPS_13_EFB
133
+  #define MOTHERBOARD BOARD_RAMPS_14_EFB
99 134
 #endif
100 135
 
101 136
 // Optional custom name for your RepStrap or other custom machine
@@ -135,6 +170,7 @@ Here are some standard links for getting your machine calibrated:
135 170
 //--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table
136 171
 //
137 172
 //// Temperature sensor settings:
173
+// -3 is thermocouple with MAX31855 (only for sensor 0)
138 174
 // -2 is thermocouple with MAX6675 (only for sensor 0)
139 175
 // -1 is thermocouple with AD595
140 176
 // 0 is not used
@@ -154,6 +190,7 @@ Here are some standard links for getting your machine calibrated:
154 190
 // 13 is 100k Hisens 3950  1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
155 191
 // 20 is the PT100 circuit found in the Ultimainboard V2.x
156 192
 // 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
193
+// 70 is the 100K thermistor found in the bq Hephestos 2
157 194
 //
158 195
 //    1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k
159 196
 //                          (but gives greater accuracy and more stable PID)
@@ -169,7 +206,7 @@ Here are some standard links for getting your machine calibrated:
169 206
 //     Use it for Testing or Development purposes. NEVER for production machine.
170 207
 //#define DUMMY_THERMISTOR_998_VALUE 25
171 208
 //#define DUMMY_THERMISTOR_999_VALUE 100
172
-// :{ '0': "Not used", '4': "10k !! do not use for a hotend. Bad resolution at high temp. !!", '1': "100k / 4.7k - EPCOS", '51': "100k / 1k - EPCOS", '6': "100k / 4.7k EPCOS - Not as accurate as Table 1", '5': "100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '7': "100k / 4.7k Honeywell 135-104LAG-J01", '71': "100k / 4.7k Honeywell 135-104LAF-J01", '8': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9': "100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10': "100k / 4.7k RS 198-961", '11': "100k / 4.7k beta 3950 1%", '12': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13': "100k Hisens 3950  1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '60': "100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '55': "100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '2': "200k / 4.7k - ATC Semitec 204GT-2", '52': "200k / 1k - ATC Semitec 204GT-2", '-2': "Thermocouple + MAX6675 (only for sensor 0)", '-1': "Thermocouple + AD595", '3': "Mendel-parts / 4.7k", '1047': "Pt1000 / 4.7k", '1010': "Pt1000 / 1k (non standard)", '20': "PT100 (Ultimainboard V2.x)", '147': "Pt100 / 4.7k", '110': "Pt100 / 1k (non-standard)", '998': "Dummy 1", '999': "Dummy 2" }
209
+// :{ '0': "Not used", '4': "10k !! do not use for a hotend. Bad resolution at high temp. !!", '1': "100k / 4.7k - EPCOS", '51': "100k / 1k - EPCOS", '6': "100k / 4.7k EPCOS - Not as accurate as Table 1", '5': "100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '7': "100k / 4.7k Honeywell 135-104LAG-J01", '71': "100k / 4.7k Honeywell 135-104LAF-J01", '8': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9': "100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10': "100k / 4.7k RS 198-961", '11': "100k / 4.7k beta 3950 1%", '12': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13': "100k Hisens 3950  1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '60': "100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '55': "100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '2': "200k / 4.7k - ATC Semitec 204GT-2", '52': "200k / 1k - ATC Semitec 204GT-2", '-3': "Thermocouple + MAX31855 (only for sensor 0)", '-2': "Thermocouple + MAX6675 (only for sensor 0)", '-1': "Thermocouple + AD595", '3': "Mendel-parts / 4.7k", '1047': "Pt1000 / 4.7k", '1010': "Pt1000 / 1k (non standard)", '20': "PT100 (Ultimainboard V2.x)", '147': "Pt100 / 4.7k", '110': "Pt100 / 1k (non-standard)", '998': "Dummy 1", '999': "Dummy 2" }
173 210
 #define TEMP_SENSOR_0 1
174 211
 #define TEMP_SENSOR_1 0
175 212
 #define TEMP_SENSOR_2 0
@@ -203,14 +240,9 @@ Here are some standard links for getting your machine calibrated:
203 240
 #define HEATER_3_MAXTEMP 275
204 241
 #define BED_MAXTEMP 150
205 242
 
206
-// If your bed has low resistance e.g. .6 ohm and throws the fuse you can duty cycle it to reduce the
207
-// average current. The value should be an integer and the heat bed will be turned on for 1 interval of
208
-// HEATER_BED_DUTY_CYCLE_DIVIDER intervals.
209
-//#define HEATER_BED_DUTY_CYCLE_DIVIDER 4
210
-
211 243
 // If you want the M105 heater power reported in watts, define the BED_WATTS, and (shared for all extruders) EXTRUDER_WATTS
212
-#define EXTRUDER_WATTS (2*2/5.9) //  P=I^2/R
213
-#define BED_WATTS (5.45*5.45/2.2)      // P=I^2/R
244
+#define EXTRUDER_WATTS (2*2/5.9)       // P=U^2/R
245
+#define BED_WATTS (5.45*5.45/2.2)      // P=U^2/R
214 246
 
215 247
 //===========================================================================
216 248
 //============================= PID Settings ================================
@@ -222,6 +254,7 @@ Here are some standard links for getting your machine calibrated:
222 254
 #define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
223 255
 #define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
224 256
 #if ENABLED(PIDTEMP)
257
+  //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
225 258
   //#define PID_DEBUG // Sends debug data to the serial port.
226 259
   //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
227 260
   //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -253,7 +286,7 @@ Here are some standard links for getting your machine calibrated:
253 286
 // If this is enabled, find your own PID constants below.
254 287
 #define PIDTEMPBED
255 288
 
256
-#define BED_LIMIT_SWITCHING
289
+//#define BED_LIMIT_SWITCHING
257 290
 
258 291
 // This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option.
259 292
 // all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis)
@@ -261,10 +294,10 @@ Here are some standard links for getting your machine calibrated:
261 294
 // so you shouldn't use it unless you are OK with PWM on your bed.  (see the comment on enabling PIDTEMPBED)
262 295
 #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
263 296
 
264
-//#define PID_BED_DEBUG // Sends debug data to the serial port.
265
-
266 297
 #if ENABLED(PIDTEMPBED)
267 298
 
299
+  //#define PID_BED_DEBUG // Sends debug data to the serial port.
300
+
268 301
   #define PID_BED_INTEGRAL_DRIVE_MAX MAX_BED_POWER //limit for the integral term
269 302
 
270 303
   //12v Heatbed Mk3 12V in parallel
@@ -292,16 +325,15 @@ Here are some standard links for getting your machine calibrated:
292 325
 //===========================================================================
293 326
 
294 327
 /**
295
- * Thermal Runaway Protection protects your printer from damage and fire if a
328
+ * Thermal Protection protects your printer from damage and fire if a
296 329
  * thermistor falls out or temperature sensors fail in any way.
297 330
  *
298 331
  * The issue: If a thermistor falls out or a temperature sensor fails,
299 332
  * Marlin can no longer sense the actual temperature. Since a disconnected
300 333
  * thermistor reads as a low temperature, the firmware will keep the heater on.
301 334
  *
302
- * The solution: Once the temperature reaches the target, start observing.
303
- * If the temperature stays too far below the target (hysteresis) for too long,
304
- * the firmware will halt as a safety precaution.
335
+ * If you get "Thermal Runaway" or "Heating failed" errors the
336
+ * details can be tuned in Configuration_adv.h
305 337
  */
306 338
 
307 339
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
@@ -322,8 +354,22 @@ Here are some standard links for getting your machine calibrated:
322 354
 // Enable this option for Toshiba steppers
323 355
 //#define CONFIG_STEPPERS_TOSHIBA
324 356
 
357
+//===========================================================================
358
+//============================== Endstop Settings ===========================
359
+//===========================================================================
360
+
325 361
 // @section homing
326 362
 
363
+// Specify here all the endstop connectors that are connected to any endstop or probe.
364
+// Almost all printers will be using one per axis. Probes will use one or more of the
365
+// extra connectors. Leave undefined any used for non-endstop and non-probe purposes.
366
+#define USE_XMIN_PLUG
367
+#define USE_YMIN_PLUG
368
+//#define USE_ZMIN_PLUG
369
+//#define USE_XMAX_PLUG
370
+//#define USE_YMAX_PLUG
371
+#define USE_ZMAX_PLUG
372
+
327 373
 // coarse Endstop Settings
328 374
 //#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
329 375
 
@@ -331,9 +377,9 @@ Here are some standard links for getting your machine calibrated:
331 377
   // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
332 378
   //#define ENDSTOPPULLUP_XMAX
333 379
   //#define ENDSTOPPULLUP_YMAX
334
-   #define ENDSTOPPULLUP_ZMAX  // open pin, inverted
335
-   #define ENDSTOPPULLUP_XMIN  // open pin, inverted
336
-   #define ENDSTOPPULLUP_YMIN  // open pin, inverted
380
+  #define ENDSTOPPULLUP_ZMAX  // open pin, inverted
381
+  #define ENDSTOPPULLUP_XMIN  // open pin, inverted
382
+  #define ENDSTOPPULLUP_YMIN  // open pin, inverted
337 383
   //#define ENDSTOPPULLUP_ZMIN
338 384
   //#define ENDSTOPPULLUP_ZMIN_PROBE
339 385
 #endif
@@ -346,13 +392,53 @@ const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
346 392
 const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
347 393
 const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
348 394
 const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
349
-//#define DISABLE_MAX_ENDSTOPS
350
-//#define DISABLE_MIN_ENDSTOPS
351 395
 
352
-// If you want to enable the Z probe pin, but disable its use, uncomment the line below.
353
-// This only affects a Z probe endstop if you have separate Z min endstop as well and have
354
-// activated Z_MIN_PROBE_ENDSTOP below. If you are using the Z Min endstop on your Z probe,
355
-// this has no effect.
396
+//===========================================================================
397
+//============================= Z Probe Options =============================
398
+//===========================================================================
399
+
400
+// Enable Z_MIN_PROBE_ENDSTOP to use _both_ a Z Probe and a Z-min-endstop on the same machine.
401
+// With this option the Z_MIN_PROBE_PIN will only be used for probing, never for homing.
402
+//
403
+// *** PLEASE READ ALL INSTRUCTIONS BELOW FOR SAFETY! ***
404
+//
405
+// To continue using the Z-min-endstop for homing, be sure to disable Z_SAFE_HOMING.
406
+// Example: To park the head outside the bed area when homing with G28.
407
+//
408
+// To use a separate Z probe, your board must define a Z_MIN_PROBE_PIN.
409
+//
410
+// For a servo-based Z probe, you must set up servo support below, including
411
+// NUM_SERVOS, Z_ENDSTOP_SERVO_NR and SERVO_ENDSTOP_ANGLES.
412
+//
413
+// - RAMPS 1.3/1.4 boards may be able to use the 5V, GND, and Aux4->D32 pin.
414
+// - Use 5V for powered (usu. inductive) sensors.
415
+// - Otherwise connect:
416
+//   - normally-closed switches to GND and D32.
417
+//   - normally-open switches to 5V and D32.
418
+//
419
+// Normally-closed switches are advised and are the default.
420
+//
421
+// The Z_MIN_PROBE_PIN sets the Arduino pin to use. (See your board's pins file.)
422
+// Since the RAMPS Aux4->D32 pin maps directly to the Arduino D32 pin, D32 is the
423
+// default pin for all RAMPS-based boards. Some other boards map differently.
424
+// To set or change the pin for your board, edit the appropriate pins_XXXXX.h file.
425
+//
426
+// WARNING:
427
+// Setting the wrong pin may have unexpected and potentially disastrous consequences.
428
+// Use with caution and do your homework.
429
+//
430
+//#define Z_MIN_PROBE_ENDSTOP
431
+
432
+// Enable Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN to use the Z_MIN_PIN for your Z_MIN_PROBE.
433
+// The Z_MIN_PIN will then be used for both Z-homing and probing.
434
+#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
435
+
436
+// To use a probe you must enable one of the two options above!
437
+
438
+// This option disables the use of the Z_MIN_PROBE_PIN
439
+// To enable the Z probe pin but disable its use, uncomment the line below. This only affects a
440
+// Z probe switch if you have a separate Z min endstop also and have activated Z_MIN_PROBE_ENDSTOP above.
441
+// If you're using the Z MIN endstop connector for your Z probe, this has no effect.
356 442
 //#define DISABLE_Z_MIN_PROBE_ENDSTOP
357 443
 
358 444
 // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
@@ -362,11 +448,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
362 448
 #define Z_ENABLE_ON 0
363 449
 #define E_ENABLE_ON 0 // For all extruders
364 450
 
365
-// Disables axis when it's not being used.
451
+// Disables axis stepper immediately when it's not being used.
366 452
 // WARNING: When motors turn off there is a chance of losing position accuracy!
367 453
 #define DISABLE_X false
368 454
 #define DISABLE_Y false
369 455
 #define DISABLE_Z false
456
+// Warn on display about possibly reduced accuracy
457
+//#define DISABLE_REDUCED_ACCURACY_WARNING
370 458
 
371 459
 // @section extruder
372 460
 
@@ -389,6 +477,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
389 477
 #define INVERT_E3_DIR false
390 478
 
391 479
 // @section homing
480
+//#define MIN_Z_HEIGHT_FOR_HOMING 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
481
+                                    // Be sure you have this distance over your Z_MAX_POS in case.
392 482
 
393 483
 // ENDSTOP SETTINGS:
394 484
 // Sets direction of endstops when homing; 1=MAX, -1=MIN
@@ -424,24 +514,26 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
424 514
 #endif
425 515
 
426 516
 //===========================================================================
427
-//=========================== Manual Bed Leveling ===========================
517
+//============================ Mesh Bed Leveling ============================
428 518
 //===========================================================================
429 519
 
430
-//#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
431 520
 //#define MESH_BED_LEVELING    // Enable mesh bed leveling.
432 521
 
433
-#if ENABLED(MANUAL_BED_LEVELING)
434
-  #define MBL_Z_STEP 0.025  // Step size while manually probing Z axis.
435
-#endif  // MANUAL_BED_LEVELING
436
-
437 522
 #if ENABLED(MESH_BED_LEVELING)
438 523
   #define MESH_MIN_X 10
439
-  #define MESH_MAX_X (X_MAX_POS - MESH_MIN_X)
524
+  #define MESH_MAX_X (X_MAX_POS - (MESH_MIN_X))
440 525
   #define MESH_MIN_Y 10
441
-  #define MESH_MAX_Y (Y_MAX_POS - MESH_MIN_Y)
526
+  #define MESH_MAX_Y (Y_MAX_POS - (MESH_MIN_Y))
442 527
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
443 528
   #define MESH_NUM_Y_POINTS 3
444 529
   #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0.
530
+
531
+  //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
532
+
533
+  #if ENABLED(MANUAL_BED_LEVELING)
534
+    #define MBL_Z_STEP 0.025  // Step size while manually probing Z axis.
535
+  #endif  // MANUAL_BED_LEVELING
536
+
445 537
 #endif  // MESH_BED_LEVELING
446 538
 
447 539
 //===========================================================================
@@ -452,7 +544,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
452 544
 
453 545
 //#define AUTO_BED_LEVELING_FEATURE // Delete the comment to enable (remove // at the start of the line)
454 546
 //#define DEBUG_LEVELING_FEATURE
455
-//#define Z_MIN_PROBE_REPEATABILITY_TEST  // If not commented out, Z-Probe Repeatability test will be included if Auto Bed Leveling is Enabled.
547
+//#define Z_MIN_PROBE_REPEATABILITY_TEST  // If not commented out, Z Probe Repeatability test will be included if Auto Bed Leveling is Enabled.
456 548
 
457 549
 #if ENABLED(AUTO_BED_LEVELING_FEATURE)
458 550
 
@@ -464,7 +556,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
464 556
   //   This mode is preferred because there are more measurements.
465 557
   //
466 558
   // - "3-point" mode
467
-  //   Probe 3 arbitrary points on the bed (that aren't colinear)
559
+  //   Probe 3 arbitrary points on the bed (that aren't collinear)
468 560
   //   You specify the XY coordinates of all 3 points.
469 561
 
470 562
   // Enable this to sample the bed in a grid (least squares solution).
@@ -478,7 +570,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
478 570
     #define FRONT_PROBE_BED_POSITION 20
479 571
     #define BACK_PROBE_BED_POSITION 170
480 572
 
481
-    #define MIN_PROBE_EDGE 10 // The Z probe square sides can be no smaller than this.
573
+    #define MIN_PROBE_EDGE 10 // The Z probe minimum square sides can be no smaller than this.
482 574
 
483 575
     // Set the number of grid points per dimension.
484 576
     // You probably don't need more than 3 (squared=9).
@@ -486,25 +578,37 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
486 578
 
487 579
   #else  // !AUTO_BED_LEVELING_GRID
488 580
 
489
-      // Arbitrary points to probe.
490
-      // A simple cross-product is used to estimate the plane of the bed.
491
-      #define ABL_PROBE_PT_1_X 15
492
-      #define ABL_PROBE_PT_1_Y 180
493
-      #define ABL_PROBE_PT_2_X 15
494
-      #define ABL_PROBE_PT_2_Y 20
495
-      #define ABL_PROBE_PT_3_X 170
496
-      #define ABL_PROBE_PT_3_Y 20
581
+    // Arbitrary points to probe.
582
+    // A simple cross-product is used to estimate the plane of the bed.
583
+    #define ABL_PROBE_PT_1_X 15
584
+    #define ABL_PROBE_PT_1_Y 180
585
+    #define ABL_PROBE_PT_2_X 15
586
+    #define ABL_PROBE_PT_2_Y 20
587
+    #define ABL_PROBE_PT_3_X 170
588
+    #define ABL_PROBE_PT_3_Y 20
497 589
 
498 590
   #endif // AUTO_BED_LEVELING_GRID
499 591
 
500
-  // Offsets to the Z probe relative to the nozzle tip.
592
+  // Z Probe to nozzle (X,Y) offset, relative to (0, 0).
501 593
   // X and Y offsets must be integers.
502
-  #define X_PROBE_OFFSET_FROM_EXTRUDER -25     // Z probe to nozzle X offset: -left  +right
503
-  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29     // Z probe to nozzle Y offset: -front +behind
504
-  #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35  // Z probe to nozzle Z offset: -below (always!)
505
-
506
-  //#define Z_RAISE_BEFORE_HOMING 4       // (in mm) Raise Z axis before homing (G28) for Z probe clearance.
507
-                                        // Be sure you have this distance over your Z_MAX_POS in case.
594
+  //
595
+  // In the following example the X and Y offsets are both positive:
596
+  // #define X_PROBE_OFFSET_FROM_EXTRUDER 10
597
+  // #define Y_PROBE_OFFSET_FROM_EXTRUDER 10
598
+  //
599
+  //    +-- BACK ---+
600
+  //    |           |
601
+  //  L |    (+) P  | R <-- probe (20,20)
602
+  //  E |           | I
603
+  //  F | (-) N (+) | G <-- nozzle (10,10)
604
+  //  T |           | H
605
+  //    |    (-)    | T
606
+  //    |           |
607
+  //    O-- FRONT --+
608
+  //  (0,0)
609
+  #define X_PROBE_OFFSET_FROM_EXTRUDER -25     // X offset: -left  [of the nozzle] +right
610
+  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29     // Y offset: -front [of the nozzle] +behind
611
+  #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35  // Z offset: -below [the nozzle] (always negative!)
508 612
 
509 613
   #define XY_TRAVEL_SPEED 8000         // X and Y axis travel speed between probes, in mm/min.
510 614
 
@@ -512,21 +616,34 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
512 616
   #define Z_RAISE_BETWEEN_PROBINGS 5  // How much the Z axis will be raised when traveling from between next probing points.
513 617
   #define Z_RAISE_AFTER_PROBING 15    // How much the Z axis will be raised after the last probing point.
514 618
 
515
-//#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" // These commands will be executed in the end of G29 routine.
516
-                                                                            // Useful to retract a deployable Z probe.
619
+  //#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" // These commands will be executed in the end of G29 routine.
620
+                                                                             // Useful to retract a deployable Z probe.
621
+
622
+  // Probes are sensors/switches that need to be activated before they can be used
623
+  // and deactivated after the use.
624
+  // Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, ... . You have to activate one of these for the AUTO_BED_LEVELING_FEATURE
625
+
626
+  // A fix mounted probe, like the normal inductive probe, must be deactivated to go below Z_PROBE_OFFSET_FROM_EXTRUDER
627
+  // when the hardware endstops are active.
628
+  //#define FIX_MOUNTED_PROBE
517 629
 
518
-  //#define Z_PROBE_SLED // Turn on if you have a Z probe mounted on a sled like those designed by Charles Bell.
630
+  // A Servo Probe can be defined in the servo section below.
631
+
632
+  // An Allen Key Probe is currently predefined only in the delta example configurations.
633
+
634
+  //#define Z_PROBE_SLED // Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
519 635
   //#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
520 636
 
521
-// If you have enabled the bed auto leveling and are using the same Z probe for Z homing,
522
-// it is highly recommended you let this Z_SAFE_HOMING enabled!!!
637
+  // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing,
638
+  // it is highly recommended you leave Z_SAFE_HOMING enabled!
523 639
 
524
- //#define Z_SAFE_HOMING   // This feature is meant to avoid Z homing with Z probe outside the bed area.
525
-                          // When defined, it will:
526
-                          // - Allow Z homing only after X and Y homing AND stepper drivers still enabled.
527
-                          // - If stepper drivers timeout, it will need X and Y homing again before Z homing.
528
-                          // - Position the Z probe in a defined XY point before Z Homing when homing all axis (G28).
529
-                          // - Block Z homing only when the Z probe is outside bed area.
640
+  //#define Z_SAFE_HOMING   // Use the z-min-probe for homing to z-min - not the z-min-endstop.
641
+                            // This feature is meant to avoid Z homing with Z probe outside the bed area.
642
+                            // When defined, it will:
643
+                            // - Allow Z homing only after X and Y homing AND stepper drivers still enabled.
644
+                            // - If stepper drivers timeout, it will need X and Y homing again before Z homing.
645
+                            // - Position the Z probe in a defined XY point before Z Homing when homing all axis (G28).
646
+                            // - Block Z homing only when the Z probe is outside bed area.
530 647
 
531 648
   #if ENABLED(Z_SAFE_HOMING)
532 649
 
@@ -535,37 +652,6 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
535 652
 
536 653
   #endif
537 654
 
538
-  // Support for a dedicated Z probe endstop separate from the Z min endstop.
539
-  // If you would like to use both a Z probe and a Z min endstop together,
540
-  // uncomment #define Z_MIN_PROBE_ENDSTOP and read the instructions below.
541
-  // If you still want to use the Z min endstop for homing, disable Z_SAFE_HOMING above.
542
-  // Example: To park the head outside the bed area when homing with G28.
543
-  //
544
-  // WARNING:
545
-  // The Z min endstop will need to set properly as it would without a Z probe
546
-  // to prevent head crashes and premature stopping during a print.
547
-  //
548
-  // To use a separate Z probe endstop, you must have a Z_MIN_PROBE_PIN
549
-  // defined in the pins_XXXXX.h file for your control board.
550
-  // If you are using a servo based Z probe, you will need to enable NUM_SERVOS,
551
-  // Z_ENDSTOP_SERVO_NR and SERVO_ENDSTOP_ANGLES in the R/C SERVO support below.
552
-  // RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin
553
-  // in the Aux 4 section of the RAMPS board. Use 5V for powered sensors,
554
-  // otherwise connect to ground and D32 for normally closed configuration
555
-  // and 5V and D32 for normally open configurations.
556
-  // Normally closed configuration is advised and assumed.
557
-  // The D32 pin in Aux 4 on RAMPS maps to the Arduino D32 pin.
558
-  // Z_MIN_PROBE_PIN is setting the pin to use on the Arduino.
559
-  // Since the D32 pin on the RAMPS maps to D32 on Arduino, this works.
560
-  // D32 is currently selected in the RAMPS 1.3/1.4 pin file.
561
-  // All other boards will need changes to the respective pins_XXXXX.h file.
562
-  //
563
-  // WARNING:
564
-  // Setting the wrong pin may have unexpected and potentially disastrous outcomes.
565
-  // Use with caution and do your homework.
566
-  //
567
-  //#define Z_MIN_PROBE_ENDSTOP
568
-
569 655
 #endif // AUTO_BED_LEVELING_FEATURE
570 656
 
571 657
 
@@ -640,6 +726,14 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
640 726
 #endif
641 727
 
642 728
 //
729
+// Host Keepalive
730
+//
731
+// By default Marlin will send a busy status message to the host
732
+// every 10 seconds when it can't accept commands.
733
+//
734
+//#define DISABLE_HOST_KEEPALIVE // Enable this option if your host doesn't like keepalive messages.
735
+
736
+//
643 737
 // M100 Free Memory Watcher
644 738
 //
645 739
 //#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
@@ -659,13 +753,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
659 753
 // @section lcd
660 754
 
661 755
 // Define your display language below. Replace (en) with your language code and uncomment.
662
-// en, pl, fr, de, es, ru, bg, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, cn, test
756
+// en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8, fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test
663 757
 // See also language.h
664 758
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
665 759
 
666 760
 // Choose ONE of these 3 charsets. This has to match your hardware. Ignored for full graphic display.
667 761
 // To find out what type you have - compile with (test) - upload - click to get the menu. You'll see two typical lines from the upper half of the charset.
668
-// See also documentation/LCDLanguageFont.md
762
+// See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
669 763
   #define DISPLAY_CHARSET_HD44780_JAPAN        // this is the most common hardware
670 764
   //#define DISPLAY_CHARSET_HD44780_WESTERN
671 765
   //#define DISPLAY_CHARSET_HD44780_CYRILLIC
@@ -673,12 +767,12 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
673 767
 //#define ULTRA_LCD  //general LCD support, also 16x2
674 768
 //#define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
675 769
 //#define SDSUPPORT // Enable SD Card Support in Hardware Console
676
-// Changed behaviour! If you need SDSUPPORT uncomment it!
677
-//#define SDSLOW // Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
678
-//#define SDEXTRASLOW // Use even slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
770
+                    // Changed behaviour! If you need SDSUPPORT uncomment it!
771
+//#define SPI_SPEED SPI_HALF_SPEED // (also SPI_QUARTER_SPEED, SPI_EIGHTH_SPEED) Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
679 772
 //#define SD_CHECK_AND_RETRY // Use CRC checks and retries on the SD communication
680 773
 //#define ENCODER_PULSES_PER_STEP 1 // Increase if you have a high resolution encoder
681 774
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
775
+//#define REVERSE_MENU_DIRECTION // When enabled CLOCKWISE moves UP in the LCD menu
682 776
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
683 777
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
684 778
 //#define SPEAKER // The sound device is a speaker - not a buzzer. A buzzer resonates with his own frequency.
@@ -695,13 +789,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
695 789
 
696 790
 // The Panucatt Devices Viki 2.0 and mini Viki with Graphic LCD
697 791
 // http://panucatt.com
698
-// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
792
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
699 793
 //#define VIKI2
700 794
 //#define miniVIKI
701 795
 
702 796
 // This is a new controller currently under development.  https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
703 797
 //
704
-// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
798
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
705 799
 //#define ELB_FULL_GRAPHIC_CONTROLLER
706 800
 //#define SD_DETECT_INVERTED
707 801
 
@@ -716,7 +810,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
716 810
 // The RepRapDiscount FULL GRAPHIC Smart Controller (quadratic white PCB)
717 811
 // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
718 812
 //
719
-// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
813
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
720 814
 //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
721 815
 
722 816
 // The RepRapWorld REPRAPWORLD_KEYPAD v1.1
@@ -739,6 +833,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
739 833
 
740 834
 //#define LCD_I2C_SAINSMART_YWROBOT
741 835
 
836
+//#define LCM1602 // LCM1602 Adapter for 16x2 LCD
837
+
742 838
 // PANELOLU2 LCD with status LEDs, separate encoder and click inputs
743 839
 //
744 840
 // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
@@ -752,7 +848,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
752 848
 //#define LCD_I2C_VIKI
753 849
 
754 850
 // SSD1306 OLED generic display support
755
-// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
851
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
756 852
 //#define U8GLIB_SSD1306
757 853
 
758 854
 // Shift register panels
@@ -764,7 +860,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
764 860
 
765 861
 // @section extras
766 862
 
767
-// Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
863
+// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino
768 864
 //#define FAST_PWM_FAN
769 865
 
770 866
 // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
@@ -844,21 +940,23 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
844 940
  * Note may require analog pins to be defined for different motherboards
845 941
  **********************************************************************/
846 942
 // Uncomment below to enable
847
-//#define FILAMENT_SENSOR
848
-
849
-#define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
850
-#define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
943
+//#define FILAMENT_WIDTH_SENSOR
851 944
 
852 945
 #define DEFAULT_NOMINAL_FILAMENT_DIA 3.00  //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software.  Used for sensor reading validation
853
-#define MEASURED_UPPER_LIMIT         3.30  //upper limit factor used for sensor reading validation in mm
854
-#define MEASURED_LOWER_LIMIT         1.90  //lower limit factor for sensor reading validation in mm
855
-#define MAX_MEASUREMENT_DELAY       20     //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM  and lower number saves RAM)
856 946
 
857
-//defines used in the code
858
-#define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially
947
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
948
+  #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
949
+  #define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
950
+
951
+  #define MEASURED_UPPER_LIMIT         3.30  //upper limit factor used for sensor reading validation in mm
952
+  #define MEASURED_LOWER_LIMIT         1.90  //lower limit factor for sensor reading validation in mm
953
+  #define MAX_MEASUREMENT_DELAY       20     //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM  and lower number saves RAM)
859 954
 
860
-//When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status.  Status will appear for 5 sec.
861
-//#define FILAMENT_LCD_DISPLAY
955
+  #define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially
956
+
957
+  //When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status.  Status will appear for 5 sec.
958
+  //#define FILAMENT_LCD_DISPLAY
959
+#endif
862 960
 
863 961
 #include "Configuration_adv.h"
864 962
 #include "thermistortables.h"

+ 121
- 67
Marlin/example_configurations/SCARA/Configuration_adv.h View File

@@ -1,3 +1,35 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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
+/**
24
+ * Configuration_adv.h
25
+ *
26
+ * Advanced settings.
27
+ * Only change these if you know exactly what you're doing.
28
+ * Some of these settings can damage your printer if improperly set!
29
+ *
30
+ * Basic settings can be found in Configuration.h
31
+ *
32
+ */
1 33
 #ifndef CONFIGURATION_ADV_H
2 34
 #define CONFIGURATION_ADV_H
3 35
 
@@ -9,13 +41,26 @@
9 41
 //=============================Thermal Settings  ============================
10 42
 //===========================================================================
11 43
 
12
-#if ENABLED(BED_LIMIT_SWITCHING)
13
-  #define BED_HYSTERESIS 2 //only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS
44
+#if DISABLED(PIDTEMPBED)
45
+  #define BED_CHECK_INTERVAL 3000 // ms between checks in bang-bang control
46
+  #if ENABLED(BED_LIMIT_SWITCHING)
47
+    #define BED_HYSTERESIS 2 // Only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS
48
+  #endif
14 49
 #endif
15
-#define BED_CHECK_INTERVAL 3000 //ms between checks in bang-bang control
16 50
 
17 51
 /**
18
- * Thermal Protection parameters
52
+ * Thermal Protection protects your printer from damage and fire if a
53
+ * thermistor falls out or temperature sensors fail in any way.
54
+ *
55
+ * The issue: If a thermistor falls out or a temperature sensor fails,
56
+ * Marlin can no longer sense the actual temperature. Since a disconnected
57
+ * thermistor reads as a low temperature, the firmware will keep the heater on.
58
+ *
59
+ * The solution: Once the temperature reaches the target, start observing.
60
+ * If the temperature stays too far below the target (hysteresis) for too long (period),
61
+ * the firmware will halt the machine as a safety precaution.
62
+ *
63
+ * If you get false positives for "Thermal Runaway" increase THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
19 64
  */
20 65
 #if ENABLED(THERMAL_PROTECTION_HOTENDS)
21 66
   #define THERMAL_PROTECTION_PERIOD 40        // Seconds
@@ -26,26 +71,24 @@
26 71
    * WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
27 72
    * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
28 73
    * but only if the current temperature is far enough below the target for a reliable test.
74
+   *
75
+   * If you get false positives for "Heating failed" increase WATCH_TEMP_PERIOD and/or decrease WATCH_TEMP_INCREASE
76
+   * WATCH_TEMP_INCREASE should not be below 2.
29 77
    */
30
-  #define WATCH_TEMP_PERIOD 16                // Seconds
31
-  #define WATCH_TEMP_INCREASE 4               // Degrees Celsius
78
+  #define WATCH_TEMP_PERIOD 20                // Seconds
79
+  #define WATCH_TEMP_INCREASE 2               // Degrees Celsius
32 80
 #endif
33 81
 
82
+/**
83
+ * Thermal Protection parameters for the bed
84
+ * are like the above for the hotends.
85
+ * WATCH_TEMP_BED_PERIOD and WATCH_TEMP_BED_INCREASE are not imlemented now.
86
+ */
34 87
 #if ENABLED(THERMAL_PROTECTION_BED)
35 88
   #define THERMAL_PROTECTION_BED_PERIOD 20    // Seconds
36 89
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
37 90
 #endif
38 91
 
39
-/**
40
- * Automatic Temperature:
41
- * The hotend target temperature is calculated by all the buffered lines of gcode.
42
- * The maximum buffered steps/sec of the extruder motor is called "se".
43
- * Start autotemp mode with M109 S<mintemp> B<maxtemp> F<factor>
44
- * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by
45
- * mintemp and maxtemp. Turn this off by excuting M109 without F*
46
- * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp.
47
- * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
48
- */
49 92
 #if ENABLED(PIDTEMP)
50 93
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
51 94
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.
@@ -56,14 +99,16 @@
56 99
   #endif
57 100
 #endif
58 101
 
59
-
60
-//automatic temperature: The hot end target temperature is calculated by all the buffered lines of gcode.
61
-//The maximum buffered steps/sec of the extruder motor are called "se".
62
-//You enter the autotemp mode by a M109 S<mintemp> B<maxtemp> F<factor>
63
-// the target temperature is set to mintemp+factor*se[steps/sec] and limited by mintemp and maxtemp
64
-// you exit the value by any M109 without F*
65
-// Also, if the temperature is set to a value <mintemp, it is not changed by autotemp.
66
-// on an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
102
+/**
103
+ * Automatic Temperature:
104
+ * The hotend target temperature is calculated by all the buffered lines of gcode.
105
+ * The maximum buffered steps/sec of the extruder motor is called "se".
106
+ * Start autotemp mode with M109 S<mintemp> B<maxtemp> F<factor>
107
+ * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by
108
+ * mintemp and maxtemp. Turn this off by executing M109 without F*
109
+ * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp.
110
+ * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
111
+ */
67 112
 #define AUTOTEMP
68 113
 #if ENABLED(AUTOTEMP)
69 114
   #define AUTOTEMP_OLDWEIGHT 0.98
@@ -156,9 +201,7 @@
156 201
   //#define Z_DUAL_ENDSTOPS
157 202
 
158 203
   #if ENABLED(Z_DUAL_ENDSTOPS)
159
-    #define Z2_MAX_PIN 36                     //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36)
160
-    const bool Z2_MAX_ENDSTOP_INVERTING = false;
161
-    #define DISABLE_XMAX_ENDSTOP              //Better to disable the XMAX to avoid conflict. Just rename "XMAX_ENDSTOP" by the endstop you are using for Z2 axis.
204
+    #define Z2_USE_ENDSTOP _XMAX_
162 205
   #endif
163 206
 
164 207
 #endif // Z_DUAL_STEPPER_DRIVERS
@@ -240,7 +283,13 @@
240 283
 #define INVERT_E_STEP_PIN false
241 284
 
242 285
 // Default stepper release if idle. Set to 0 to deactivate.
286
+// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true.
287
+// Time can be set by M18 and M84.
243 288
 #define DEFAULT_STEPPER_DEACTIVE_TIME 240
289
+#define DISABLE_INACTIVE_X true
290
+#define DISABLE_INACTIVE_Y true
291
+#define DISABLE_INACTIVE_Z true  // set to false if the nozzle will fall down on your printed part when print has finished.
292
+#define DISABLE_INACTIVE_E true
244 293
 
245 294
 #define DEFAULT_MINIMUMFEEDRATE       0.0     // minimum feedrate
246 295
 #define DEFAULT_MINTRAVELFEEDRATE     0.0
@@ -276,6 +325,9 @@
276 325
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
277 326
 #define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
278 327
 
328
+// Motor Current controlled via PWM (Overridable on supported boards with PWM-driven motor driver current)
329
+//#define PWM_MOTOR_CURRENT {1300, 1300, 1250} // Values in milliamps
330
+
279 331
 // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
280 332
 //#define DIGIPOT_I2C
281 333
 // Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8
@@ -349,17 +401,16 @@
349 401
   //#define USE_SMALL_INFOFONT
350 402
 #endif // DOGLCD
351 403
 
352
-
353 404
 // @section more
354 405
 
355 406
 // The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
356
-//#define USE_WATCHDOG
407
+#define USE_WATCHDOG
357 408
 
358 409
 #if ENABLED(USE_WATCHDOG)
359
-// If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
360
-// The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset.
361
-//  However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled.
362
-//#define WATCHDOG_RESET_MANUAL
410
+  // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
411
+  // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset.
412
+  //  However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled.
413
+  //#define WATCHDOG_RESET_MANUAL
363 414
 #endif
364 415
 
365 416
 // @section lcd
@@ -370,6 +421,7 @@
370 421
 //#define BABYSTEPPING
371 422
 #if ENABLED(BABYSTEPPING)
372 423
   #define BABYSTEP_XY  //not only z, but also XY in the menu. more clutter, more functions
424
+                       //not implemented for deltabots!
373 425
   #define BABYSTEP_INVERT_Z false  //true for inverse movements in Z
374 426
   #define BABYSTEP_MULTIPLICATOR 1 //faster movements
375 427
 #endif
@@ -388,7 +440,6 @@
388 440
 #if ENABLED(ADVANCE)
389 441
   #define EXTRUDER_ADVANCE_K .0
390 442
   #define D_FILAMENT 1.75
391
-  #define STEPS_MM_E 1000
392 443
 #endif
393 444
 
394 445
 // @section extras
@@ -397,7 +448,7 @@
397 448
 #define MM_PER_ARC_SEGMENT 1
398 449
 #define N_ARC_CORRECTION 25
399 450
 
400
-const unsigned int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement
451
+const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement
401 452
 
402 453
 // @section temperature
403 454
 
@@ -462,12 +513,15 @@ const unsigned int dropsegments=5; //everything with less than this number of st
462 513
     #define FILAMENTCHANGE_ZADD 10
463 514
     #define FILAMENTCHANGE_FIRSTRETRACT -2
464 515
     #define FILAMENTCHANGE_FINALRETRACT -100
516
+    #define AUTO_FILAMENT_CHANGE                //This extrude filament until you press the button on LCD
517
+    #define AUTO_FILAMENT_CHANGE_LENGTH 0.04    //Extrusion length on automatic extrusion loop
518
+    #define AUTO_FILAMENT_CHANGE_FEEDRATE 300   //Extrusion feedrate (mm/min) on automatic extrusion loop
465 519
   #endif
466 520
 #endif
467 521
 
468 522
 /******************************************************************************\
469 523
  * enable this section if you have TMC26X motor drivers.
470
- * you need to import the TMC26XStepper library into the arduino IDE for this
524
+ * you need to import the TMC26XStepper library into the Arduino IDE for this
471 525
  ******************************************************************************/
472 526
 
473 527
 // @section tmc
@@ -475,52 +529,52 @@ const unsigned int dropsegments=5; //everything with less than this number of st
475 529
 //#define HAVE_TMCDRIVER
476 530
 #if ENABLED(HAVE_TMCDRIVER)
477 531
 
478
-//#define X_IS_TMC
532
+  //#define X_IS_TMC
479 533
   #define X_MAX_CURRENT 1000  //in mA
480 534
   #define X_SENSE_RESISTOR 91 //in mOhms
481 535
   #define X_MICROSTEPS 16     //number of microsteps
482 536
 
483
-//#define X2_IS_TMC
537
+  //#define X2_IS_TMC
484 538
   #define X2_MAX_CURRENT 1000  //in mA
485 539
   #define X2_SENSE_RESISTOR 91 //in mOhms
486 540
   #define X2_MICROSTEPS 16     //number of microsteps
487 541
 
488
-//#define Y_IS_TMC
542
+  //#define Y_IS_TMC
489 543
   #define Y_MAX_CURRENT 1000  //in mA
490 544
   #define Y_SENSE_RESISTOR 91 //in mOhms
491 545
   #define Y_MICROSTEPS 16     //number of microsteps
492 546
 
493
-//#define Y2_IS_TMC
547
+  //#define Y2_IS_TMC
494 548
   #define Y2_MAX_CURRENT 1000  //in mA
495 549
   #define Y2_SENSE_RESISTOR 91 //in mOhms
496 550
   #define Y2_MICROSTEPS 16     //number of microsteps
497 551
 
498
-//#define Z_IS_TMC
552
+  //#define Z_IS_TMC
499 553
   #define Z_MAX_CURRENT 1000  //in mA
500 554
   #define Z_SENSE_RESISTOR 91 //in mOhms
501 555
   #define Z_MICROSTEPS 16     //number of microsteps
502 556
 
503
-//#define Z2_IS_TMC
557
+  //#define Z2_IS_TMC
504 558
   #define Z2_MAX_CURRENT 1000  //in mA
505 559
   #define Z2_SENSE_RESISTOR 91 //in mOhms
506 560
   #define Z2_MICROSTEPS 16     //number of microsteps
507 561
 
508
-//#define E0_IS_TMC
562
+  //#define E0_IS_TMC
509 563
   #define E0_MAX_CURRENT 1000  //in mA
510 564
   #define E0_SENSE_RESISTOR 91 //in mOhms
511 565
   #define E0_MICROSTEPS 16     //number of microsteps
512 566
 
513
-//#define E1_IS_TMC
567
+  //#define E1_IS_TMC
514 568
   #define E1_MAX_CURRENT 1000  //in mA
515 569
   #define E1_SENSE_RESISTOR 91 //in mOhms
516 570
   #define E1_MICROSTEPS 16     //number of microsteps
517 571
 
518
-//#define E2_IS_TMC
572
+  //#define E2_IS_TMC
519 573
   #define E2_MAX_CURRENT 1000  //in mA
520 574
   #define E2_SENSE_RESISTOR 91 //in mOhms
521 575
   #define E2_MICROSTEPS 16     //number of microsteps
522 576
 
523
-//#define E3_IS_TMC
577
+  //#define E3_IS_TMC
524 578
   #define E3_MAX_CURRENT 1000  //in mA
525 579
   #define E3_SENSE_RESISTOR 91 //in mOhms
526 580
   #define E3_MICROSTEPS 16     //number of microsteps
@@ -529,7 +583,7 @@ const unsigned int dropsegments=5; //everything with less than this number of st
529 583
 
530 584
 /******************************************************************************\
531 585
  * enable this section if you have L6470  motor drivers.
532
- * you need to import the L6470 library into the arduino IDE for this
586
+ * you need to import the L6470 library into the Arduino IDE for this
533 587
  ******************************************************************************/
534 588
 
535 589
 // @section l6470
@@ -537,63 +591,63 @@ const unsigned int dropsegments=5; //everything with less than this number of st
537 591
 //#define HAVE_L6470DRIVER
538 592
 #if ENABLED(HAVE_L6470DRIVER)
539 593
 
540
-//#define X_IS_L6470
594
+  //#define X_IS_L6470
541 595
   #define X_MICROSTEPS 16     //number of microsteps
542
-  #define X_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
596
+  #define X_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
543 597
   #define X_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
544 598
   #define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall
545 599
 
546
-//#define X2_IS_L6470
600
+  //#define X2_IS_L6470
547 601
   #define X2_MICROSTEPS 16     //number of microsteps
548
-  #define X2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
602
+  #define X2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
549 603
   #define X2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
550 604
   #define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
551 605
 
552
-//#define Y_IS_L6470
606
+  //#define Y_IS_L6470
553 607
   #define Y_MICROSTEPS 16     //number of microsteps
554
-  #define Y_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
608
+  #define Y_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
555 609
   #define Y_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
556 610
   #define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall
557 611
 
558
-//#define Y2_IS_L6470
612
+  //#define Y2_IS_L6470
559 613
   #define Y2_MICROSTEPS 16     //number of microsteps
560
-  #define Y2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
614
+  #define Y2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
561 615
   #define Y2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
562 616
   #define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
563 617
 
564
-//#define Z_IS_L6470
618
+  //#define Z_IS_L6470
565 619
   #define Z_MICROSTEPS 16     //number of microsteps
566
-  #define Z_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
620
+  #define Z_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
567 621
   #define Z_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
568 622
   #define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall
569 623
 
570
-//#define Z2_IS_L6470
624
+  //#define Z2_IS_L6470
571 625
   #define Z2_MICROSTEPS 16     //number of microsteps
572
-  #define Z2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
626
+  #define Z2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
573 627
   #define Z2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
574 628
   #define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
575 629
 
576
-//#define E0_IS_L6470
630
+  //#define E0_IS_L6470
577 631
   #define E0_MICROSTEPS 16     //number of microsteps
578
-  #define E0_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
632
+  #define E0_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
579 633
   #define E0_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
580 634
   #define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall
581 635
 
582
-//#define E1_IS_L6470
636
+  //#define E1_IS_L6470
583 637
   #define E1_MICROSTEPS 16     //number of microsteps
584
-  #define E1_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
638
+  #define E1_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
585 639
   #define E1_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
586 640
   #define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall
587 641
 
588
-//#define E2_IS_L6470
642
+  //#define E2_IS_L6470
589 643
   #define E2_MICROSTEPS 16     //number of microsteps
590
-  #define E2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
644
+  #define E2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
591 645
   #define E2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
592 646
   #define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
593 647
 
594
-//#define E3_IS_L6470
648
+  //#define E3_IS_L6470
595 649
   #define E3_MICROSTEPS 16     //number of microsteps
596
-  #define E3_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
650
+  #define E3_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
597 651
   #define E3_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
598 652
   #define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall
599 653
 

+ 218
- 118
Marlin/example_configurations/TAZ4/Configuration.h View File

@@ -1,3 +1,40 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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
+/**
24
+ * Configuration.h
25
+ *
26
+ * Basic settings such as:
27
+ *
28
+ * - Type of electronics
29
+ * - Type of temperature sensor
30
+ * - Printer geometry
31
+ * - Endstop configuration
32
+ * - LCD controller
33
+ * - Extra features
34
+ *
35
+ * Advanced settings can be found in Configuration_adv.h
36
+ *
37
+ */
1 38
 #ifndef CONFIGURATION_H
2 39
 #define CONFIGURATION_H
3 40
 
@@ -7,8 +44,10 @@
7 44
 //===========================================================================
8 45
 //============================= Getting Started =============================
9 46
 //===========================================================================
10
-/*
11
-Here are some standard links for getting your machine calibrated:
47
+
48
+/**
49
+ * Here are some standard links for getting your machine calibrated:
50
+ *
12 51
  * http://reprap.org/wiki/Calibration
13 52
  * http://youtu.be/wAL9d7FgInk
14 53
  * http://calculator.josefprusa.cz
@@ -16,11 +55,7 @@ Here are some standard links for getting your machine calibrated:
16 55
  * http://www.thingiverse.com/thing:5573
17 56
  * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap
18 57
  * http://www.thingiverse.com/thing:298812
19
-*/
20
-
21
-// This configuration file contains the basic settings.
22
-// Advanced settings can be found in Configuration_adv.h
23
-// BASIC SETTINGS: select your board type, temperature sensor type, axis scaling, and endstop configuration
58
+ */
24 59
 
25 60
 //===========================================================================
26 61
 //============================= DELTA Printer ===============================
@@ -110,6 +145,7 @@ Here are some standard links for getting your machine calibrated:
110 145
 //--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table
111 146
 //
112 147
 //// Temperature sensor settings:
148
+// -3 is thermocouple with MAX31855 (only for sensor 0)
113 149
 // -2 is thermocouple with MAX6675 (only for sensor 0)
114 150
 // -1 is thermocouple with AD595
115 151
 // 0 is not used
@@ -129,6 +165,7 @@ Here are some standard links for getting your machine calibrated:
129 165
 // 13 is 100k Hisens 3950  1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
130 166
 // 20 is the PT100 circuit found in the Ultimainboard V2.x
131 167
 // 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
168
+// 70 is the 100K thermistor found in the bq Hephestos 2
132 169
 //
133 170
 //    1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k
134 171
 //                          (but gives greater accuracy and more stable PID)
@@ -144,7 +181,7 @@ Here are some standard links for getting your machine calibrated:
144 181
 //     Use it for Testing or Development purposes. NEVER for production machine.
145 182
 //#define DUMMY_THERMISTOR_998_VALUE 25
146 183
 //#define DUMMY_THERMISTOR_999_VALUE 100
147
-// :{ '0': "Not used", '4': "10k !! do not use for a hotend. Bad resolution at high temp. !!", '1': "100k / 4.7k - EPCOS", '51': "100k / 1k - EPCOS", '6': "100k / 4.7k EPCOS - Not as accurate as Table 1", '5': "100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '7': "100k / 4.7k Honeywell 135-104LAG-J01", '71': "100k / 4.7k Honeywell 135-104LAF-J01", '8': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9': "100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10': "100k / 4.7k RS 198-961", '11': "100k / 4.7k beta 3950 1%", '12': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13': "100k Hisens 3950  1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '60': "100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '55': "100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '2': "200k / 4.7k - ATC Semitec 204GT-2", '52': "200k / 1k - ATC Semitec 204GT-2", '-2': "Thermocouple + MAX6675 (only for sensor 0)", '-1': "Thermocouple + AD595", '3': "Mendel-parts / 4.7k", '1047': "Pt1000 / 4.7k", '1010': "Pt1000 / 1k (non standard)", '20': "PT100 (Ultimainboard V2.x)", '147': "Pt100 / 4.7k", '110': "Pt100 / 1k (non-standard)", '998': "Dummy 1", '999': "Dummy 2" }
184
+// :{ '0': "Not used", '4': "10k !! do not use for a hotend. Bad resolution at high temp. !!", '1': "100k / 4.7k - EPCOS", '51': "100k / 1k - EPCOS", '6': "100k / 4.7k EPCOS - Not as accurate as Table 1", '5': "100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '7': "100k / 4.7k Honeywell 135-104LAG-J01", '71': "100k / 4.7k Honeywell 135-104LAF-J01", '8': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9': "100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10': "100k / 4.7k RS 198-961", '11': "100k / 4.7k beta 3950 1%", '12': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13': "100k Hisens 3950  1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '60': "100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '55': "100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '2': "200k / 4.7k - ATC Semitec 204GT-2", '52': "200k / 1k - ATC Semitec 204GT-2", '-3': "Thermocouple + MAX31855 (only for sensor 0)", '-2': "Thermocouple + MAX6675 (only for sensor 0)", '-1': "Thermocouple + AD595", '3': "Mendel-parts / 4.7k", '1047': "Pt1000 / 4.7k", '1010': "Pt1000 / 1k (non standard)", '20': "PT100 (Ultimainboard V2.x)", '147': "Pt100 / 4.7k", '110': "Pt100 / 1k (non-standard)", '998': "Dummy 1", '999': "Dummy 2" }
148 185
 #define TEMP_SENSOR_0 7
149 186
 #define TEMP_SENSOR_1 7
150 187
 #define TEMP_SENSOR_2 0
@@ -178,14 +215,9 @@ Here are some standard links for getting your machine calibrated:
178 215
 #define HEATER_3_MAXTEMP 250
179 216
 #define BED_MAXTEMP 150
180 217
 
181
-// If your bed has low resistance e.g. .6 ohm and throws the fuse you can duty cycle it to reduce the
182
-// average current. The value should be an integer and the heat bed will be turned on for 1 interval of
183
-// HEATER_BED_DUTY_CYCLE_DIVIDER intervals.
184
-//#define HEATER_BED_DUTY_CYCLE_DIVIDER 4
185
-
186 218
 // If you want the M105 heater power reported in watts, define the BED_WATTS, and (shared for all extruders) EXTRUDER_WATTS
187
-//#define EXTRUDER_WATTS (12.0*12.0/6.7) //  P=I^2/R
188
-//#define BED_WATTS (12.0*12.0/1.1)      // P=I^2/R
219
+//#define EXTRUDER_WATTS (12.0*12.0/6.7) // P=U^2/R
220
+//#define BED_WATTS (12.0*12.0/1.1)      // P=U^2/R
189 221
 
190 222
 //===========================================================================
191 223
 //============================= PID Settings ================================
@@ -197,6 +229,7 @@ Here are some standard links for getting your machine calibrated:
197 229
 #define BANG_MAX 70 // limits current to nozzle while in bang-bang mode; 255=full current
198 230
 #define PID_MAX 74 // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
199 231
 #if ENABLED(PIDTEMP)
232
+  //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
200 233
   //#define PID_DEBUG // Sends debug data to the serial port.
201 234
   //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
202 235
   //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -207,7 +240,7 @@ Here are some standard links for getting your machine calibrated:
207 240
   #define PID_INTEGRAL_DRIVE_MAX PID_MAX  //limit for the integral term
208 241
   #define K1 0.95 //smoothing factor within the PID
209 242
 
210
-  // If you are using a preconfigured hotend then you can use one of the value sets by uncommenting it
243
+  // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
211 244
   // Buda 2.0 on 24V
212 245
   #define  DEFAULT_Kp 6
213 246
   #define  DEFAULT_Ki .3
@@ -257,9 +290,10 @@ Here are some standard links for getting your machine calibrated:
257 290
 // so you shouldn't use it unless you are OK with PWM on your bed.  (see the comment on enabling PIDTEMPBED)
258 291
 #define MAX_BED_POWER 206 // limits duty cycle to bed; 255=full current
259 292
 
260
-//#define PID_BED_DEBUG // Sends debug data to the serial port.
261
-
262 293
 #if ENABLED(PIDTEMPBED)
294
+
295
+  //#define PID_BED_DEBUG // Sends debug data to the serial port.
296
+
263 297
   #define PID_BED_INTEGRAL_DRIVE_MAX MAX_BED_POWER //limit for the integral term
264 298
 
265 299
   //24V 360W silicone heater from NPH on 3mm borosilicate (TAZ 2.2+)
@@ -273,13 +307,13 @@ Here are some standard links for getting your machine calibrated:
273 307
   //#define  DEFAULT_bedKi 60
274 308
   //#define  DEFAULT_bedKd 1800
275 309
 
276
-  //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
310
+  //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
277 311
   //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
278 312
   //#define  DEFAULT_bedKp 10.00
279 313
   //#define  DEFAULT_bedKi .023
280 314
   //#define  DEFAULT_bedKd 305.4
281 315
 
282
-  //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
316
+  //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
283 317
   //from pidautotune
284 318
   //#define  DEFAULT_bedKp 97.1
285 319
   //#define  DEFAULT_bedKi 1.41
@@ -304,16 +338,15 @@ Here are some standard links for getting your machine calibrated:
304 338
 //===========================================================================
305 339
 
306 340
 /**
307
- * Thermal Runaway Protection protects your printer from damage and fire if a
341
+ * Thermal Protection protects your printer from damage and fire if a
308 342
  * thermistor falls out or temperature sensors fail in any way.
309 343
  *
310 344
  * The issue: If a thermistor falls out or a temperature sensor fails,
311 345
  * Marlin can no longer sense the actual temperature. Since a disconnected
312 346
  * thermistor reads as a low temperature, the firmware will keep the heater on.
313 347
  *
314
- * The solution: Once the temperature reaches the target, start observing.
315
- * If the temperature stays too far below the target (hysteresis) for too long,
316
- * the firmware will halt as a safety precaution.
348
+ * If you get "Thermal Runaway" or "Heating failed" errors the
349
+ * details can be tuned in Configuration_adv.h
317 350
  */
318 351
 
319 352
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
@@ -334,8 +367,22 @@ Here are some standard links for getting your machine calibrated:
334 367
 // Enable this option for Toshiba steppers
335 368
 //#define CONFIG_STEPPERS_TOSHIBA
336 369
 
370
+//===========================================================================
371
+//============================== Endstop Settings ===========================
372
+//===========================================================================
373
+
337 374
 // @section homing
338 375
 
376
+// Specify here all the endstop connectors that are connected to any endstop or probe.
377
+// Almost all printers will be using one per axis. Probes will use one or more of the
378
+// extra connectors. Leave undefined any used for non-endstop and non-probe purposes.
379
+#define USE_XMIN_PLUG
380
+#define USE_YMIN_PLUG
381
+#define USE_ZMIN_PLUG
382
+//#define USE_XMAX_PLUG
383
+//#define USE_YMAX_PLUG
384
+//#define USE_ZMAX_PLUG
385
+
339 386
 // coarse Endstop Settings
340 387
 #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
341 388
 
@@ -358,13 +405,53 @@ const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
358 405
 const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
359 406
 const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
360 407
 const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
361
-#define DISABLE_MAX_ENDSTOPS
362
-//#define DISABLE_MIN_ENDSTOPS
363 408
 
364
-// If you want to enable the Z probe pin, but disable its use, uncomment the line below.
365
-// This only affects a Z probe endstop if you have separate Z min endstop as well and have
366
-// activated Z_MIN_PROBE_ENDSTOP below. If you are using the Z Min endstop on your Z probe,
367
-// this has no effect.
409
+//===========================================================================
410
+//============================= Z Probe Options =============================
411
+//===========================================================================
412
+
413
+// Enable Z_MIN_PROBE_ENDSTOP to use _both_ a Z Probe and a Z-min-endstop on the same machine.
414
+// With this option the Z_MIN_PROBE_PIN will only be used for probing, never for homing.
415
+//
416
+// *** PLEASE READ ALL INSTRUCTIONS BELOW FOR SAFETY! ***
417
+//
418
+// To continue using the Z-min-endstop for homing, be sure to disable Z_SAFE_HOMING.
419
+// Example: To park the head outside the bed area when homing with G28.
420
+//
421
+// To use a separate Z probe, your board must define a Z_MIN_PROBE_PIN.
422
+//
423
+// For a servo-based Z probe, you must set up servo support below, including
424
+// NUM_SERVOS, Z_ENDSTOP_SERVO_NR and SERVO_ENDSTOP_ANGLES.
425
+//
426
+// - RAMPS 1.3/1.4 boards may be able to use the 5V, GND, and Aux4->D32 pin.
427
+// - Use 5V for powered (usu. inductive) sensors.
428
+// - Otherwise connect:
429
+//   - normally-closed switches to GND and D32.
430
+//   - normally-open switches to 5V and D32.
431
+//
432
+// Normally-closed switches are advised and are the default.
433
+//
434
+// The Z_MIN_PROBE_PIN sets the Arduino pin to use. (See your board's pins file.)
435
+// Since the RAMPS Aux4->D32 pin maps directly to the Arduino D32 pin, D32 is the
436
+// default pin for all RAMPS-based boards. Some other boards map differently.
437
+// To set or change the pin for your board, edit the appropriate pins_XXXXX.h file.
438
+//
439
+// WARNING:
440
+// Setting the wrong pin may have unexpected and potentially disastrous consequences.
441
+// Use with caution and do your homework.
442
+//
443
+//#define Z_MIN_PROBE_ENDSTOP
444
+
445
+// Enable Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN to use the Z_MIN_PIN for your Z_MIN_PROBE.
446
+// The Z_MIN_PIN will then be used for both Z-homing and probing.
447
+#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
448
+
449
+// To use a probe you must enable one of the two options above!
450
+
451
+// This option disables the use of the Z_MIN_PROBE_PIN
452
+// To enable the Z probe pin but disable its use, uncomment the line below. This only affects a
453
+// Z probe switch if you have a separate Z min endstop also and have activated Z_MIN_PROBE_ENDSTOP above.
454
+// If you're using the Z MIN endstop connector for your Z probe, this has no effect.
368 455
 //#define DISABLE_Z_MIN_PROBE_ENDSTOP
369 456
 
370 457
 // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
@@ -374,11 +461,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
374 461
 #define Z_ENABLE_ON 0
375 462
 #define E_ENABLE_ON 0 // For all extruders
376 463
 
377
-// Disables axis when it's not being used.
464
+// Disables axis stepper immediately when it's not being used.
378 465
 // WARNING: When motors turn off there is a chance of losing position accuracy!
379 466
 #define DISABLE_X false
380 467
 #define DISABLE_Y false
381 468
 #define DISABLE_Z false
469
+// Warn on display about possibly reduced accuracy
470
+//#define DISABLE_REDUCED_ACCURACY_WARNING
382 471
 
383 472
 // @section extruder
384 473
 
@@ -401,6 +490,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
401 490
 #define INVERT_E3_DIR true
402 491
 
403 492
 // @section homing
493
+//#define MIN_Z_HEIGHT_FOR_HOMING 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
494
+                                    // Be sure you have this distance over your Z_MAX_POS in case.
404 495
 
405 496
 // ENDSTOP SETTINGS:
406 497
 // Sets direction of endstops when homing; 1=MAX, -1=MIN
@@ -436,24 +527,26 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
436 527
 #endif
437 528
 
438 529
 //===========================================================================
439
-//=========================== Manual Bed Leveling ===========================
530
+//============================ Mesh Bed Leveling ============================
440 531
 //===========================================================================
441 532
 
442
-//#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
443 533
 //#define MESH_BED_LEVELING    // Enable mesh bed leveling.
444 534
 
445
-#if ENABLED(MANUAL_BED_LEVELING)
446
-  #define MBL_Z_STEP 0.025  // Step size while manually probing Z axis.
447
-#endif  // MANUAL_BED_LEVELING
448
-
449 535
 #if ENABLED(MESH_BED_LEVELING)
450 536
   #define MESH_MIN_X 10
451
-  #define MESH_MAX_X (X_MAX_POS - MESH_MIN_X)
537
+  #define MESH_MAX_X (X_MAX_POS - (MESH_MIN_X))
452 538
   #define MESH_MIN_Y 10
453
-  #define MESH_MAX_Y (Y_MAX_POS - MESH_MIN_Y)
539
+  #define MESH_MAX_Y (Y_MAX_POS - (MESH_MIN_Y))
454 540
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
455 541
   #define MESH_NUM_Y_POINTS 3
456 542
   #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0.
543
+
544
+  //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
545
+
546
+  #if ENABLED(MANUAL_BED_LEVELING)
547
+    #define MBL_Z_STEP 0.025  // Step size while manually probing Z axis.
548
+  #endif  // MANUAL_BED_LEVELING
549
+
457 550
 #endif  // MESH_BED_LEVELING
458 551
 
459 552
 //===========================================================================
@@ -462,10 +555,11 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
462 555
 
463 556
 // @section bedlevel
464 557
 
465
-//#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line).
466
-#define Z_MIN_PROBE_REPEATABILITY_TEST  // If not commented out, Z probe repeatability test will be included if auto bed leveling is enabled.
558
+//#define AUTO_BED_LEVELING_FEATURE // Delete the comment to enable (remove // at the start of the line)
559
+//#define DEBUG_LEVELING_FEATURE
560
+#define Z_MIN_PROBE_REPEATABILITY_TEST  // If not commented out, Z Probe Repeatability test will be included if Auto Bed Leveling is Enabled.
467 561
 
468
-#if ENABLED(ENABLE_AUTO_BED_LEVELING)
562
+#if ENABLED(AUTO_BED_LEVELING_FEATURE)
469 563
 
470 564
   // There are 2 different ways to specify probing locations:
471 565
   //
@@ -475,7 +569,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
475 569
   //   This mode is preferred because there are more measurements.
476 570
   //
477 571
   // - "3-point" mode
478
-  //   Probe 3 arbitrary points on the bed (that aren't colinear)
572
+  //   Probe 3 arbitrary points on the bed (that aren't collinear)
479 573
   //   You specify the XY coordinates of all 3 points.
480 574
 
481 575
   // Enable this to sample the bed in a grid (least squares solution).
@@ -497,25 +591,37 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
497 591
 
498 592
   #else  // !AUTO_BED_LEVELING_GRID
499 593
 
500
-      // Arbitrary points to probe.
501
-      // A simple cross-product is used to estimate the plane of the bed.
502
-      #define ABL_PROBE_PT_1_X 15
503
-      #define ABL_PROBE_PT_1_Y 180
504
-      #define ABL_PROBE_PT_2_X 15
505
-      #define ABL_PROBE_PT_2_Y 20
506
-      #define ABL_PROBE_PT_3_X 170
507
-      #define ABL_PROBE_PT_3_Y 20
594
+    // Arbitrary points to probe.
595
+    // A simple cross-product is used to estimate the plane of the bed.
596
+    #define ABL_PROBE_PT_1_X 15
597
+    #define ABL_PROBE_PT_1_Y 180
598
+    #define ABL_PROBE_PT_2_X 15
599
+    #define ABL_PROBE_PT_2_Y 20
600
+    #define ABL_PROBE_PT_3_X 170
601
+    #define ABL_PROBE_PT_3_Y 20
508 602
 
509 603
   #endif // AUTO_BED_LEVELING_GRID
510 604
 
511
-  // Offsets to the Z probe relative to the nozzle tip.
605
+  // Z Probe to nozzle (X,Y) offset, relative to (0, 0).
512 606
   // X and Y offsets must be integers.
513
-  #define X_PROBE_OFFSET_FROM_EXTRUDER -25     // Z probe to nozzle X offset: -left  +right
514
-  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29     // Z probe to nozzle Y offset: -front +behind
515
-  #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35  // Z probe to nozzle Z offset: -below (always!)
516
-
517
-  #define Z_RAISE_BEFORE_HOMING 4       // (in mm) Raise Z axis before homing (G28) for Z probe clearance.
518
-                                        // Be sure you have this distance over your Z_MAX_POS in case.
607
+  //
608
+  // In the following example the X and Y offsets are both positive:
609
+  // #define X_PROBE_OFFSET_FROM_EXTRUDER 10
610
+  // #define Y_PROBE_OFFSET_FROM_EXTRUDER 10
611
+  //
612
+  //    +-- BACK ---+
613
+  //    |           |
614
+  //  L |    (+) P  | R <-- probe (20,20)
615
+  //  E |           | I
616
+  //  F | (-) N (+) | G <-- nozzle (10,10)
617
+  //  T |           | H
618
+  //    |    (-)    | T
619
+  //    |           |
620
+  //    O-- FRONT --+
621
+  //  (0,0)
622
+  #define X_PROBE_OFFSET_FROM_EXTRUDER -25     // X offset: -left  [of the nozzle] +right
623
+  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29     // Y offset: -front [of the nozzle] +behind
624
+  #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35  // Z offset: -below [the nozzle] (always negative!)
519 625
 
520 626
   #define XY_TRAVEL_SPEED 8000         // X and Y axis travel speed between probes, in mm/min.
521 627
 
@@ -523,16 +629,29 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
523 629
   #define Z_RAISE_BETWEEN_PROBINGS 5  // How much the Z axis will be raised when traveling from between next probing points.
524 630
   #define Z_RAISE_AFTER_PROBING 15    // How much the Z axis will be raised after the last probing point.
525 631
 
526
-//#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" // These commands will be executed in the end of G29 routine.
527
-                                                                            // Useful to retract a deployable Z probe.
632
+  //#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" // These commands will be executed in the end of G29 routine.
633
+                                                                             // Useful to retract a deployable Z probe.
634
+
635
+  // Probes are sensors/switches that need to be activated before they can be used
636
+  // and deactivated after the use.
637
+  // Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, ... . You have to activate one of these for the AUTO_BED_LEVELING_FEATURE
638
+
639
+  // A fix mounted probe, like the normal inductive probe, must be deactivated to go below Z_PROBE_OFFSET_FROM_EXTRUDER
640
+  // when the hardware endstops are active.
641
+  //#define FIX_MOUNTED_PROBE
528 642
 
529
-  //#define Z_PROBE_SLED // Turn on if you have a Z probe mounted on a sled like those designed by Charles Bell.
643
+  // A Servo Probe can be defined in the servo section below.
644
+
645
+  // An Allen Key Probe is currently predefined only in the delta example configurations.
646
+
647
+  //#define Z_PROBE_SLED // Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
530 648
   //#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
531 649
 
532
-// If you have enabled the bed auto leveling and are using the same Z probe for Z homing,
533
-// it is highly recommended you let this Z_SAFE_HOMING enabled!!!
650
+  // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing,
651
+  // it is highly recommended you leave Z_SAFE_HOMING enabled!
534 652
 
535
-  #define Z_SAFE_HOMING   // This feature is meant to avoid Z homing with Z probe outside the bed area.
653
+  #define Z_SAFE_HOMING   // Use the z-min-probe for homing to z-min - not the z-min-endstop.
654
+                          // This feature is meant to avoid Z homing with Z probe outside the bed area.
536 655
                           // When defined, it will:
537 656
                           // - Allow Z homing only after X and Y homing AND stepper drivers still enabled.
538 657
                           // - If stepper drivers timeout, it will need X and Y homing again before Z homing.
@@ -546,38 +665,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
546 665
 
547 666
   #endif
548 667
 
549
-  // Support for a dedicated Z probe endstop separate from the Z min endstop.
550
-  // If you would like to use both a Z probe and a Z min endstop together,
551
-  // uncomment #define Z_MIN_PROBE_ENDSTOP and read the instructions below.
552
-  // If you still want to use the Z min endstop for homing, disable Z_SAFE_HOMING above.
553
-  // Example: To park the head outside the bed area when homing with G28.
554
-  //
555
-  // WARNING:
556
-  // The Z min endstop will need to set properly as it would without a Z probe
557
-  // to prevent head crashes and premature stopping during a print.
558
-  //
559
-  // To use a separate Z probe endstop, you must have a Z_MIN_PROBE_PIN
560
-  // defined in the pins_XXXXX.h file for your control board.
561
-  // If you are using a servo based Z probe, you will need to enable NUM_SERVOS,
562
-  // Z_ENDSTOP_SERVO_NR and SERVO_ENDSTOP_ANGLES in the R/C SERVO support below.
563
-  // RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin
564
-  // in the Aux 4 section of the RAMPS board. Use 5V for powered sensors,
565
-  // otherwise connect to ground and D32 for normally closed configuration
566
-  // and 5V and D32 for normally open configurations.
567
-  // Normally closed configuration is advised and assumed.
568
-  // The D32 pin in Aux 4 on RAMPS maps to the Arduino D32 pin.
569
-  // Z_MIN_PROBE_PIN is setting the pin to use on the Arduino.
570
-  // Since the D32 pin on the RAMPS maps to D32 on Arduino, this works.
571
-  // D32 is currently selected in the RAMPS 1.3/1.4 pin file.
572
-  // All other boards will need changes to the respective pins_XXXXX.h file.
573
-  //
574
-  // WARNING:
575
-  // Setting the wrong pin may have unexpected and potentially disastrous outcomes.
576
-  // Use with caution and do your homework.
577
-  //
578
-  //#define Z_MIN_PROBE_ENDSTOP
579
-
580
-#endif // ENABLE_AUTO_BED_LEVELING
668
+#endif // AUTO_BED_LEVELING_FEATURE
581 669
 
582 670
 
583 671
 // @section homing
@@ -628,7 +716,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
628 716
 // Custom M code points
629 717
 #define CUSTOM_M_CODES
630 718
 #if ENABLED(CUSTOM_M_CODES)
631
-  #if ENABLED(ENABLE_AUTO_BED_LEVELING)
719
+  #if ENABLED(AUTO_BED_LEVELING_FEATURE)
632 720
     #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
633 721
     #define Z_PROBE_OFFSET_RANGE_MIN -20
634 722
     #define Z_PROBE_OFFSET_RANGE_MAX 20
@@ -651,6 +739,14 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
651 739
 #endif
652 740
 
653 741
 //
742
+// Host Keepalive
743
+//
744
+// By default Marlin will send a busy status message to the host
745
+// every 10 seconds when it can't accept commands.
746
+//
747
+//#define DISABLE_HOST_KEEPALIVE // Enable this option if your host doesn't like keepalive messages.
748
+
749
+//
654 750
 // M100 Free Memory Watcher
655 751
 //
656 752
 //#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
@@ -670,13 +766,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
670 766
 // @section lcd
671 767
 
672 768
 // Define your display language below. Replace (en) with your language code and uncomment.
673
-// en, pl, fr, de, es, ru, bg, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, cn, test
769
+// en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8, fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test
674 770
 // See also language.h
675 771
 #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
676 772
 
677 773
 // Choose ONE of these 3 charsets. This has to match your hardware. Ignored for full graphic display.
678 774
 // To find out what type you have - compile with (test) - upload - click to get the menu. You'll see two typical lines from the upper half of the charset.
679
-// See also documentation/LCDLanguageFont.md
775
+// See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
680 776
   #define DISPLAY_CHARSET_HD44780_JAPAN        // this is the most common hardware
681 777
   //#define DISPLAY_CHARSET_HD44780_WESTERN
682 778
   //#define DISPLAY_CHARSET_HD44780_CYRILLIC
@@ -684,12 +780,12 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
684 780
 //#define ULTRA_LCD  //general LCD support, also 16x2
685 781
 //#define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
686 782
 //#define SDSUPPORT // Enable SD Card Support in Hardware Console
687
-// Changed behaviour! If you need SDSUPPORT uncomment it!
688
-//#define SDSLOW // Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
689
-//#define SDEXTRASLOW // Use even slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
783
+                    // Changed behaviour! If you need SDSUPPORT uncomment it!
784
+//#define SPI_SPEED SPI_HALF_SPEED // (also SPI_QUARTER_SPEED, SPI_EIGHTH_SPEED) Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
690 785
 //#define SD_CHECK_AND_RETRY // Use CRC checks and retries on the SD communication
691 786
 #define ENCODER_PULSES_PER_STEP 2 // Increase if you have a high resolution encoder
692 787
 #define ENCODER_STEPS_PER_MENU_ITEM 1 // Set according to ENCODER_PULSES_PER_STEP or your liking
788
+//#define REVERSE_MENU_DIRECTION // When enabled CLOCKWISE moves UP in the LCD menu
693 789
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
694 790
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
695 791
 //#define SPEAKER // The sound device is a speaker - not a buzzer. A buzzer resonates with his own frequency.
@@ -706,13 +802,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
706 802
 
707 803
 // The Panucatt Devices Viki 2.0 and mini Viki with Graphic LCD
708 804
 // http://panucatt.com
709
-// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
805
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
710 806
 //#define VIKI2
711 807
 //#define miniVIKI
712 808
 
713 809
 // This is a new controller currently under development.  https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
714 810
 //
715
-// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
811
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
716 812
 //#define ELB_FULL_GRAPHIC_CONTROLLER
717 813
 //#define SD_DETECT_INVERTED
718 814
 
@@ -727,7 +823,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
727 823
 // The RepRapDiscount FULL GRAPHIC Smart Controller (quadratic white PCB)
728 824
 // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
729 825
 //
730
-// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
826
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
731 827
 #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
732 828
 
733 829
 // The RepRapWorld REPRAPWORLD_KEYPAD v1.1
@@ -750,6 +846,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
750 846
 
751 847
 //#define LCD_I2C_SAINSMART_YWROBOT
752 848
 
849
+//#define LCM1602 // LCM1602 Adapter for 16x2 LCD
850
+
753 851
 // PANELOLU2 LCD with status LEDs, separate encoder and click inputs
754 852
 //
755 853
 // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
@@ -763,7 +861,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
763 861
 //#define LCD_I2C_VIKI
764 862
 
765 863
 // SSD1306 OLED generic display support
766
-// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
864
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
767 865
 //#define U8GLIB_SSD1306
768 866
 
769 867
 // Shift register panels
@@ -775,7 +873,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
775 873
 
776 874
 // @section extras
777 875
 
778
-// Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
876
+// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino
779 877
 #define FAST_PWM_FAN
780 878
 
781 879
 // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
@@ -855,21 +953,23 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
855 953
  * Note may require analog pins to be defined for different motherboards
856 954
  **********************************************************************/
857 955
 // Uncomment below to enable
858
-//#define FILAMENT_SENSOR
859
-
860
-#define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
861
-#define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
956
+//#define FILAMENT_WIDTH_SENSOR
862 957
 
863 958
 #define DEFAULT_NOMINAL_FILAMENT_DIA 3.00  //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software.  Used for sensor reading validation
864
-#define MEASURED_UPPER_LIMIT         3.30  //upper limit factor used for sensor reading validation in mm
865
-#define MEASURED_LOWER_LIMIT         1.90  //lower limit factor for sensor reading validation in mm
866
-#define MAX_MEASUREMENT_DELAY       20     //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM  and lower number saves RAM)
867 959
 
868
-//defines used in the code
869
-#define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially
960
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
961
+  #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
962
+  #define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
963
+
964
+  #define MEASURED_UPPER_LIMIT         3.30  //upper limit factor used for sensor reading validation in mm
965
+  #define MEASURED_LOWER_LIMIT         1.90  //lower limit factor for sensor reading validation in mm
966
+  #define MAX_MEASUREMENT_DELAY       20     //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM  and lower number saves RAM)
870 967
 
871
-//When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status.  Status will appear for 5 sec.
872
-//#define FILAMENT_LCD_DISPLAY
968
+  #define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially
969
+
970
+  //When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status.  Status will appear for 5 sec.
971
+  //#define FILAMENT_LCD_DISPLAY
972
+#endif
873 973
 
874 974
 #include "Configuration_adv.h"
875 975
 #include "thermistortables.h"

+ 109
- 50
Marlin/example_configurations/TAZ4/Configuration_adv.h View File

@@ -1,3 +1,35 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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
+/**
24
+ * Configuration_adv.h
25
+ *
26
+ * Advanced settings.
27
+ * Only change these if you know exactly what you're doing.
28
+ * Some of these settings can damage your printer if improperly set!
29
+ *
30
+ * Basic settings can be found in Configuration.h
31
+ *
32
+ */
1 33
 #ifndef CONFIGURATION_ADV_H
2 34
 #define CONFIGURATION_ADV_H
3 35
 
@@ -9,13 +41,26 @@
9 41
 //=============================Thermal Settings  ============================
10 42
 //===========================================================================
11 43
 
12
-#if ENABLED(BED_LIMIT_SWITCHING)
13
-  #define BED_HYSTERESIS 2 //only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS
44
+#if DISABLED(PIDTEMPBED)
45
+  #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control
46
+  #if ENABLED(BED_LIMIT_SWITCHING)
47
+    #define BED_HYSTERESIS 2 // Only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS
48
+  #endif
14 49
 #endif
15
-#define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control
16 50
 
17 51
 /**
18
- * Thermal Protection parameters
52
+ * Thermal Protection protects your printer from damage and fire if a
53
+ * thermistor falls out or temperature sensors fail in any way.
54
+ *
55
+ * The issue: If a thermistor falls out or a temperature sensor fails,
56
+ * Marlin can no longer sense the actual temperature. Since a disconnected
57
+ * thermistor reads as a low temperature, the firmware will keep the heater on.
58
+ *
59
+ * The solution: Once the temperature reaches the target, start observing.
60
+ * If the temperature stays too far below the target (hysteresis) for too long (period),
61
+ * the firmware will halt the machine as a safety precaution.
62
+ *
63
+ * If you get false positives for "Thermal Runaway" increase THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
19 64
  */
20 65
 #if ENABLED(THERMAL_PROTECTION_HOTENDS)
21 66
   #define THERMAL_PROTECTION_PERIOD 40        // Seconds
@@ -26,11 +71,19 @@
26 71
    * WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
27 72
    * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
28 73
    * but only if the current temperature is far enough below the target for a reliable test.
74
+   *
75
+   * If you get false positives for "Heating failed" increase WATCH_TEMP_PERIOD and/or decrease WATCH_TEMP_INCREASE
76
+   * WATCH_TEMP_INCREASE should not be below 2.
29 77
    */
30
-  #define WATCH_TEMP_PERIOD 16                // Seconds
31
-  #define WATCH_TEMP_INCREASE 4               // Degrees Celsius
78
+  #define WATCH_TEMP_PERIOD 20                // Seconds
79
+  #define WATCH_TEMP_INCREASE 2               // Degrees Celsius
32 80
 #endif
33 81
 
82
+/**
83
+ * Thermal Protection parameters for the bed
84
+ * are like the above for the hotends.
85
+ * WATCH_TEMP_BED_PERIOD and WATCH_TEMP_BED_INCREASE are not imlemented now.
86
+ */
34 87
 #if ENABLED(THERMAL_PROTECTION_BED)
35 88
   #define THERMAL_PROTECTION_BED_PERIOD 20    // Seconds
36 89
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
@@ -52,7 +105,7 @@
52 105
  * The maximum buffered steps/sec of the extruder motor is called "se".
53 106
  * Start autotemp mode with M109 S<mintemp> B<maxtemp> F<factor>
54 107
  * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by
55
- * mintemp and maxtemp. Turn this off by excuting M109 without F*
108
+ * mintemp and maxtemp. Turn this off by executing M109 without F*
56 109
  * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp.
57 110
  * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
58 111
  */
@@ -156,9 +209,7 @@
156 209
   //#define Z_DUAL_ENDSTOPS
157 210
 
158 211
   #if ENABLED(Z_DUAL_ENDSTOPS)
159
-    #define Z2_MAX_PIN 36                     //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36)
160
-    const bool Z2_MAX_ENDSTOP_INVERTING = false;
161
-    #define DISABLE_XMAX_ENDSTOP              //Better to disable the XMAX to avoid conflict. Just rename "XMAX_ENDSTOP" by the endstop you are using for Z2 axis.
212
+    #define Z2_USE_ENDSTOP _XMAX_
162 213
   #endif
163 214
 
164 215
 #endif // Z_DUAL_STEPPER_DRIVERS
@@ -240,7 +291,13 @@
240 291
 #define INVERT_E_STEP_PIN false
241 292
 
242 293
 // Default stepper release if idle. Set to 0 to deactivate.
294
+// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true.
295
+// Time can be set by M18 and M84.
243 296
 #define DEFAULT_STEPPER_DEACTIVE_TIME 60
297
+#define DISABLE_INACTIVE_X true
298
+#define DISABLE_INACTIVE_Y true
299
+#define DISABLE_INACTIVE_Z true  // set to false if the nozzle will fall down on your printed part when print has finished.
300
+#define DISABLE_INACTIVE_E true
244 301
 
245 302
 #define DEFAULT_MINIMUMFEEDRATE       0.0     // minimum feedrate
246 303
 #define DEFAULT_MINTRAVELFEEDRATE     0.0
@@ -276,6 +333,9 @@
276 333
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
277 334
 #define DIGIPOT_MOTOR_CURRENT {175,175,240,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
278 335
 
336
+// Motor Current controlled via PWM (Overridable on supported boards with PWM-driven motor driver current)
337
+//#define PWM_MOTOR_CURRENT {1300, 1300, 1250} // Values in milliamps
338
+
279 339
 // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
280 340
 //#define DIGIPOT_I2C
281 341
 // Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8
@@ -352,13 +412,13 @@
352 412
 // @section more
353 413
 
354 414
 // The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
355
-//#define USE_WATCHDOG
415
+#define USE_WATCHDOG
356 416
 
357 417
 #if ENABLED(USE_WATCHDOG)
358
-// If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
359
-// The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset.
360
-//  However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled.
361
-//#define WATCHDOG_RESET_MANUAL
418
+  // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
419
+  // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset.
420
+  //  However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled.
421
+  //#define WATCHDOG_RESET_MANUAL
362 422
 #endif
363 423
 
364 424
 // @section lcd
@@ -369,7 +429,7 @@
369 429
 //#define BABYSTEPPING
370 430
 #if ENABLED(BABYSTEPPING)
371 431
   #define BABYSTEP_XY  //not only z, but also XY in the menu. more clutter, more functions
372
-                       //not implemented for CoreXY and deltabots!
432
+                       //not implemented for deltabots!
373 433
   #define BABYSTEP_INVERT_Z false  //true for inverse movements in Z
374 434
   #define BABYSTEP_MULTIPLICATOR 1 //faster movements
375 435
 #endif
@@ -388,7 +448,6 @@
388 448
 #if ENABLED(ADVANCE)
389 449
   #define EXTRUDER_ADVANCE_K .0
390 450
   #define D_FILAMENT 2.85
391
-  #define STEPS_MM_E 836
392 451
 #endif
393 452
 
394 453
 // @section extras
@@ -397,7 +456,7 @@
397 456
 #define MM_PER_ARC_SEGMENT 1
398 457
 #define N_ARC_CORRECTION 25
399 458
 
400
-const unsigned int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement
459
+const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement
401 460
 
402 461
 // @section temperature
403 462
 
@@ -470,7 +529,7 @@ const unsigned int dropsegments=5; //everything with less than this number of st
470 529
 
471 530
 /******************************************************************************\
472 531
  * enable this section if you have TMC26X motor drivers.
473
- * you need to import the TMC26XStepper library into the arduino IDE for this
532
+ * you need to import the TMC26XStepper library into the Arduino IDE for this
474 533
  ******************************************************************************/
475 534
 
476 535
 // @section tmc
@@ -478,52 +537,52 @@ const unsigned int dropsegments=5; //everything with less than this number of st
478 537
 //#define HAVE_TMCDRIVER
479 538
 #if ENABLED(HAVE_TMCDRIVER)
480 539
 
481
-//#define X_IS_TMC
540
+  //#define X_IS_TMC
482 541
   #define X_MAX_CURRENT 1000  //in mA
483 542
   #define X_SENSE_RESISTOR 91 //in mOhms
484 543
   #define X_MICROSTEPS 16     //number of microsteps
485 544
 
486
-//#define X2_IS_TMC
545
+  //#define X2_IS_TMC
487 546
   #define X2_MAX_CURRENT 1000  //in mA
488 547
   #define X2_SENSE_RESISTOR 91 //in mOhms
489 548
   #define X2_MICROSTEPS 16     //number of microsteps
490 549
 
491
-//#define Y_IS_TMC
550
+  //#define Y_IS_TMC
492 551
   #define Y_MAX_CURRENT 1000  //in mA
493 552
   #define Y_SENSE_RESISTOR 91 //in mOhms
494 553
   #define Y_MICROSTEPS 16     //number of microsteps
495 554
 
496
-//#define Y2_IS_TMC
555
+  //#define Y2_IS_TMC
497 556
   #define Y2_MAX_CURRENT 1000  //in mA
498 557
   #define Y2_SENSE_RESISTOR 91 //in mOhms
499 558
   #define Y2_MICROSTEPS 16     //number of microsteps
500 559
 
501
-//#define Z_IS_TMC
560
+  //#define Z_IS_TMC
502 561
   #define Z_MAX_CURRENT 1000  //in mA
503 562
   #define Z_SENSE_RESISTOR 91 //in mOhms
504 563
   #define Z_MICROSTEPS 16     //number of microsteps
505 564
 
506
-//#define Z2_IS_TMC
565
+  //#define Z2_IS_TMC
507 566
   #define Z2_MAX_CURRENT 1000  //in mA
508 567
   #define Z2_SENSE_RESISTOR 91 //in mOhms
509 568
   #define Z2_MICROSTEPS 16     //number of microsteps
510 569
 
511
-//#define E0_IS_TMC
570
+  //#define E0_IS_TMC
512 571
   #define E0_MAX_CURRENT 1000  //in mA
513 572
   #define E0_SENSE_RESISTOR 91 //in mOhms
514 573
   #define E0_MICROSTEPS 16     //number of microsteps
515 574
 
516
-//#define E1_IS_TMC
575
+  //#define E1_IS_TMC
517 576
   #define E1_MAX_CURRENT 1000  //in mA
518 577
   #define E1_SENSE_RESISTOR 91 //in mOhms
519 578
   #define E1_MICROSTEPS 16     //number of microsteps
520 579
 
521
-//#define E2_IS_TMC
580
+  //#define E2_IS_TMC
522 581
   #define E2_MAX_CURRENT 1000  //in mA
523 582
   #define E2_SENSE_RESISTOR 91 //in mOhms
524 583
   #define E2_MICROSTEPS 16     //number of microsteps
525 584
 
526
-//#define E3_IS_TMC
585
+  //#define E3_IS_TMC
527 586
   #define E3_MAX_CURRENT 1000  //in mA
528 587
   #define E3_SENSE_RESISTOR 91 //in mOhms
529 588
   #define E3_MICROSTEPS 16     //number of microsteps
@@ -532,7 +591,7 @@ const unsigned int dropsegments=5; //everything with less than this number of st
532 591
 
533 592
 /******************************************************************************\
534 593
  * enable this section if you have L6470  motor drivers.
535
- * you need to import the L6470 library into the arduino IDE for this
594
+ * you need to import the L6470 library into the Arduino IDE for this
536 595
  ******************************************************************************/
537 596
 
538 597
 // @section l6470
@@ -540,63 +599,63 @@ const unsigned int dropsegments=5; //everything with less than this number of st
540 599
 //#define HAVE_L6470DRIVER
541 600
 #if ENABLED(HAVE_L6470DRIVER)
542 601
 
543
-//#define X_IS_L6470
602
+  //#define X_IS_L6470
544 603
   #define X_MICROSTEPS 16     //number of microsteps
545
-  #define X_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
604
+  #define X_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
546 605
   #define X_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
547 606
   #define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall
548 607
 
549
-//#define X2_IS_L6470
608
+  //#define X2_IS_L6470
550 609
   #define X2_MICROSTEPS 16     //number of microsteps
551
-  #define X2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
610
+  #define X2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
552 611
   #define X2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
553 612
   #define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
554 613
 
555
-//#define Y_IS_L6470
614
+  //#define Y_IS_L6470
556 615
   #define Y_MICROSTEPS 16     //number of microsteps
557
-  #define Y_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
616
+  #define Y_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
558 617
   #define Y_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
559 618
   #define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall
560 619
 
561
-//#define Y2_IS_L6470
620
+  //#define Y2_IS_L6470
562 621
   #define Y2_MICROSTEPS 16     //number of microsteps
563
-  #define Y2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
622
+  #define Y2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
564 623
   #define Y2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
565 624
   #define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
566 625
 
567
-//#define Z_IS_L6470
626
+  //#define Z_IS_L6470
568 627
   #define Z_MICROSTEPS 16     //number of microsteps
569
-  #define Z_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
628
+  #define Z_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
570 629
   #define Z_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
571 630
   #define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall
572 631
 
573
-//#define Z2_IS_L6470
632
+  //#define Z2_IS_L6470
574 633
   #define Z2_MICROSTEPS 16     //number of microsteps
575
-  #define Z2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
634
+  #define Z2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
576 635
   #define Z2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
577 636
   #define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
578 637
 
579
-//#define E0_IS_L6470
638
+  //#define E0_IS_L6470
580 639
   #define E0_MICROSTEPS 16     //number of microsteps
581
-  #define E0_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
640
+  #define E0_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
582 641
   #define E0_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
583 642
   #define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall
584 643
 
585
-//#define E1_IS_L6470
644
+  //#define E1_IS_L6470
586 645
   #define E1_MICROSTEPS 16     //number of microsteps
587
-  #define E1_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
646
+  #define E1_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
588 647
   #define E1_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
589 648
   #define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall
590 649
 
591
-//#define E2_IS_L6470
650
+  //#define E2_IS_L6470
592 651
   #define E2_MICROSTEPS 16     //number of microsteps
593
-  #define E2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
652
+  #define E2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
594 653
   #define E2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
595 654
   #define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
596 655
 
597
-//#define E3_IS_L6470
656
+  //#define E3_IS_L6470
598 657
   #define E3_MICROSTEPS 16     //number of microsteps
599
-  #define E3_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
658
+  #define E3_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
600 659
   #define E3_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
601 660
   #define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall
602 661
 

+ 213
- 114
Marlin/example_configurations/WITBOX/Configuration.h View File

@@ -1,3 +1,40 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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
+/**
24
+ * Configuration.h
25
+ *
26
+ * Basic settings such as:
27
+ *
28
+ * - Type of electronics
29
+ * - Type of temperature sensor
30
+ * - Printer geometry
31
+ * - Endstop configuration
32
+ * - LCD controller
33
+ * - Extra features
34
+ *
35
+ * Advanced settings can be found in Configuration_adv.h
36
+ *
37
+ */
1 38
 #ifndef CONFIGURATION_H
2 39
 #define CONFIGURATION_H
3 40
 
@@ -7,8 +44,10 @@
7 44
 //===========================================================================
8 45
 //============================= Getting Started =============================
9 46
 //===========================================================================
10
-/*
11
-Here are some standard links for getting your machine calibrated:
47
+
48
+/**
49
+ * Here are some standard links for getting your machine calibrated:
50
+ *
12 51
  * http://reprap.org/wiki/Calibration
13 52
  * http://youtu.be/wAL9d7FgInk
14 53
  * http://calculator.josefprusa.cz
@@ -16,11 +55,7 @@ Here are some standard links for getting your machine calibrated:
16 55
  * http://www.thingiverse.com/thing:5573
17 56
  * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap
18 57
  * http://www.thingiverse.com/thing:298812
19
-*/
20
-
21
-// This configuration file contains the basic settings.
22
-// Advanced settings can be found in Configuration_adv.h
23
-// BASIC SETTINGS: select your board type, temperature sensor type, axis scaling, and endstop configuration
58
+ */
24 59
 
25 60
 //===========================================================================
26 61
 //============================= DELTA Printer ===============================
@@ -70,7 +105,7 @@ Here are some standard links for getting your machine calibrated:
70 105
 // The following define selects which electronics board you have.
71 106
 // Please choose the name from boards.h that matches your setup
72 107
 #ifndef MOTHERBOARD
73
-  #define MOTHERBOARD BOARD_RAMPS_13_EFB
108
+  #define MOTHERBOARD BOARD_RAMPS_14_EFB
74 109
 #endif
75 110
 
76 111
 // Optional custom name for your RepStrap or other custom machine
@@ -113,6 +148,7 @@ Here are some standard links for getting your machine calibrated:
113 148
 //--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table
114 149
 //
115 150
 //// Temperature sensor settings:
151
+// -3 is thermocouple with MAX31855 (only for sensor 0)
116 152
 // -2 is thermocouple with MAX6675 (only for sensor 0)
117 153
 // -1 is thermocouple with AD595
118 154
 // 0 is not used
@@ -132,6 +168,7 @@ Here are some standard links for getting your machine calibrated:
132 168
 // 13 is 100k Hisens 3950  1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
133 169
 // 20 is the PT100 circuit found in the Ultimainboard V2.x
134 170
 // 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
171
+// 70 is the 100K thermistor found in the bq Hephestos 2
135 172
 //
136 173
 //    1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k
137 174
 //                          (but gives greater accuracy and more stable PID)
@@ -147,7 +184,7 @@ Here are some standard links for getting your machine calibrated:
147 184
 //     Use it for Testing or Development purposes. NEVER for production machine.
148 185
 //#define DUMMY_THERMISTOR_998_VALUE 25
149 186
 //#define DUMMY_THERMISTOR_999_VALUE 100
150
-// :{ '0': "Not used", '4': "10k !! do not use for a hotend. Bad resolution at high temp. !!", '1': "100k / 4.7k - EPCOS", '51': "100k / 1k - EPCOS", '6': "100k / 4.7k EPCOS - Not as accurate as Table 1", '5': "100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '7': "100k / 4.7k Honeywell 135-104LAG-J01", '71': "100k / 4.7k Honeywell 135-104LAF-J01", '8': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9': "100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10': "100k / 4.7k RS 198-961", '11': "100k / 4.7k beta 3950 1%", '12': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13': "100k Hisens 3950  1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '60': "100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '55': "100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '2': "200k / 4.7k - ATC Semitec 204GT-2", '52': "200k / 1k - ATC Semitec 204GT-2", '-2': "Thermocouple + MAX6675 (only for sensor 0)", '-1': "Thermocouple + AD595", '3': "Mendel-parts / 4.7k", '1047': "Pt1000 / 4.7k", '1010': "Pt1000 / 1k (non standard)", '20': "PT100 (Ultimainboard V2.x)", '147': "Pt100 / 4.7k", '110': "Pt100 / 1k (non-standard)", '998': "Dummy 1", '999': "Dummy 2" }
187
+// :{ '0': "Not used", '4': "10k !! do not use for a hotend. Bad resolution at high temp. !!", '1': "100k / 4.7k - EPCOS", '51': "100k / 1k - EPCOS", '6': "100k / 4.7k EPCOS - Not as accurate as Table 1", '5': "100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '7': "100k / 4.7k Honeywell 135-104LAG-J01", '71': "100k / 4.7k Honeywell 135-104LAF-J01", '8': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9': "100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10': "100k / 4.7k RS 198-961", '11': "100k / 4.7k beta 3950 1%", '12': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13': "100k Hisens 3950  1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '60': "100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '55': "100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '2': "200k / 4.7k - ATC Semitec 204GT-2", '52': "200k / 1k - ATC Semitec 204GT-2", '-3': "Thermocouple + MAX31855 (only for sensor 0)", '-2': "Thermocouple + MAX6675 (only for sensor 0)", '-1': "Thermocouple + AD595", '3': "Mendel-parts / 4.7k", '1047': "Pt1000 / 4.7k", '1010': "Pt1000 / 1k (non standard)", '20': "PT100 (Ultimainboard V2.x)", '147': "Pt100 / 4.7k", '110': "Pt100 / 1k (non-standard)", '998': "Dummy 1", '999': "Dummy 2" }
151 188
 #define TEMP_SENSOR_0 1
152 189
 #define TEMP_SENSOR_1 0
153 190
 #define TEMP_SENSOR_2 0
@@ -181,14 +218,9 @@ Here are some standard links for getting your machine calibrated:
181 218
 #define HEATER_3_MAXTEMP 260
182 219
 #define BED_MAXTEMP 150
183 220
 
184
-// If your bed has low resistance e.g. .6 ohm and throws the fuse you can duty cycle it to reduce the
185
-// average current. The value should be an integer and the heat bed will be turned on for 1 interval of
186
-// HEATER_BED_DUTY_CYCLE_DIVIDER intervals.
187
-//#define HEATER_BED_DUTY_CYCLE_DIVIDER 4
188
-
189 221
 // If you want the M105 heater power reported in watts, define the BED_WATTS, and (shared for all extruders) EXTRUDER_WATTS
190
-//#define EXTRUDER_WATTS (12.0*12.0/6.7) //  P=I^2/R
191
-//#define BED_WATTS (12.0*12.0/1.1)      // P=I^2/R
222
+//#define EXTRUDER_WATTS (12.0*12.0/6.7) // P=U^2/R
223
+//#define BED_WATTS (12.0*12.0/1.1)      // P=U^2/R
192 224
 
193 225
 //===========================================================================
194 226
 //============================= PID Settings ================================
@@ -200,6 +232,7 @@ Here are some standard links for getting your machine calibrated:
200 232
 #define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
201 233
 #define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
202 234
 #if ENABLED(PIDTEMP)
235
+  //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
203 236
   //#define PID_DEBUG // Sends debug data to the serial port.
204 237
   //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
205 238
   //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -239,19 +272,19 @@ Here are some standard links for getting your machine calibrated:
239 272
 // so you shouldn't use it unless you are OK with PWM on your bed.  (see the comment on enabling PIDTEMPBED)
240 273
 #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
241 274
 
242
-//#define PID_BED_DEBUG // Sends debug data to the serial port.
243
-
244 275
 #if ENABLED(PIDTEMPBED)
245 276
 
277
+  //#define PID_BED_DEBUG // Sends debug data to the serial port.
278
+
246 279
   #define PID_BED_INTEGRAL_DRIVE_MAX MAX_BED_POWER //limit for the integral term
247 280
 
248
-  //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
281
+  //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
249 282
   //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
250 283
   #define  DEFAULT_bedKp 10.00
251 284
   #define  DEFAULT_bedKi .023
252 285
   #define  DEFAULT_bedKd 305.4
253 286
 
254
-  //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
287
+  //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
255 288
   //from pidautotune
256 289
   //#define  DEFAULT_bedKp 97.1
257 290
   //#define  DEFAULT_bedKi 1.41
@@ -276,16 +309,15 @@ Here are some standard links for getting your machine calibrated:
276 309
 //===========================================================================
277 310
 
278 311
 /**
279
- * Thermal Runaway Protection protects your printer from damage and fire if a
312
+ * Thermal Protection protects your printer from damage and fire if a
280 313
  * thermistor falls out or temperature sensors fail in any way.
281 314
  *
282 315
  * The issue: If a thermistor falls out or a temperature sensor fails,
283 316
  * Marlin can no longer sense the actual temperature. Since a disconnected
284 317
  * thermistor reads as a low temperature, the firmware will keep the heater on.
285 318
  *
286
- * The solution: Once the temperature reaches the target, start observing.
287
- * If the temperature stays too far below the target (hysteresis) for too long,
288
- * the firmware will halt as a safety precaution.
319
+ * If you get "Thermal Runaway" or "Heating failed" errors the
320
+ * details can be tuned in Configuration_adv.h
289 321
  */
290 322
 
291 323
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
@@ -306,8 +338,22 @@ Here are some standard links for getting your machine calibrated:
306 338
 // Enable this option for Toshiba steppers
307 339
 //#define CONFIG_STEPPERS_TOSHIBA
308 340
 
341
+//===========================================================================
342
+//============================== Endstop Settings ===========================
343
+//===========================================================================
344
+
309 345
 // @section homing
310 346
 
347
+// Specify here all the endstop connectors that are connected to any endstop or probe.
348
+// Almost all printers will be using one per axis. Probes will use one or more of the
349
+// extra connectors. Leave undefined any used for non-endstop and non-probe purposes.
350
+#define USE_XMIN_PLUG
351
+#define USE_YMIN_PLUG
352
+#define USE_ZMIN_PLUG
353
+//#define USE_XMAX_PLUG
354
+//#define USE_YMAX_PLUG
355
+//#define USE_ZMAX_PLUG
356
+
311 357
 // coarse Endstop Settings
312 358
 #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
313 359
 
@@ -330,13 +376,53 @@ const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
330 376
 const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
331 377
 const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
332 378
 const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
333
-//#define DISABLE_MAX_ENDSTOPS
334
-//#define DISABLE_MIN_ENDSTOPS
335 379
 
336
-// If you want to enable the Z probe pin, but disable its use, uncomment the line below.
337
-// This only affects a Z probe endstop if you have separate Z min endstop as well and have
338
-// activated Z_MIN_PROBE_ENDSTOP below. If you are using the Z Min endstop on your Z probe,
339
-// this has no effect.
380
+//===========================================================================
381
+//============================= Z Probe Options =============================
382
+//===========================================================================
383
+
384
+// Enable Z_MIN_PROBE_ENDSTOP to use _both_ a Z Probe and a Z-min-endstop on the same machine.
385
+// With this option the Z_MIN_PROBE_PIN will only be used for probing, never for homing.
386
+//
387
+// *** PLEASE READ ALL INSTRUCTIONS BELOW FOR SAFETY! ***
388
+//
389
+// To continue using the Z-min-endstop for homing, be sure to disable Z_SAFE_HOMING.
390
+// Example: To park the head outside the bed area when homing with G28.
391
+//
392
+// To use a separate Z probe, your board must define a Z_MIN_PROBE_PIN.
393
+//
394
+// For a servo-based Z probe, you must set up servo support below, including
395
+// NUM_SERVOS, Z_ENDSTOP_SERVO_NR and SERVO_ENDSTOP_ANGLES.
396
+//
397
+// - RAMPS 1.3/1.4 boards may be able to use the 5V, GND, and Aux4->D32 pin.
398
+// - Use 5V for powered (usu. inductive) sensors.
399
+// - Otherwise connect:
400
+//   - normally-closed switches to GND and D32.
401
+//   - normally-open switches to 5V and D32.
402
+//
403
+// Normally-closed switches are advised and are the default.
404
+//
405
+// The Z_MIN_PROBE_PIN sets the Arduino pin to use. (See your board's pins file.)
406
+// Since the RAMPS Aux4->D32 pin maps directly to the Arduino D32 pin, D32 is the
407
+// default pin for all RAMPS-based boards. Some other boards map differently.
408
+// To set or change the pin for your board, edit the appropriate pins_XXXXX.h file.
409
+//
410
+// WARNING:
411
+// Setting the wrong pin may have unexpected and potentially disastrous consequences.
412
+// Use with caution and do your homework.
413
+//
414
+//#define Z_MIN_PROBE_ENDSTOP
415
+
416
+// Enable Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN to use the Z_MIN_PIN for your Z_MIN_PROBE.
417
+// The Z_MIN_PIN will then be used for both Z-homing and probing.
418
+#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
419
+
420
+// To use a probe you must enable one of the two options above!
421
+
422
+// This option disables the use of the Z_MIN_PROBE_PIN
423
+// To enable the Z probe pin but disable its use, uncomment the line below. This only affects a
424
+// Z probe switch if you have a separate Z min endstop also and have activated Z_MIN_PROBE_ENDSTOP above.
425
+// If you're using the Z MIN endstop connector for your Z probe, this has no effect.
340 426
 //#define DISABLE_Z_MIN_PROBE_ENDSTOP
341 427
 
342 428
 // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
@@ -346,11 +432,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
346 432
 #define Z_ENABLE_ON 0
347 433
 #define E_ENABLE_ON 0 // For all extruders
348 434
 
349
-// Disables axis when it's not being used.
435
+// Disables axis stepper immediately when it's not being used.
350 436
 // WARNING: When motors turn off there is a chance of losing position accuracy!
351 437
 #define DISABLE_X false
352 438
 #define DISABLE_Y false
353 439
 #define DISABLE_Z true
440
+// Warn on display about possibly reduced accuracy
441
+//#define DISABLE_REDUCED_ACCURACY_WARNING
354 442
 
355 443
 // @section extruder
356 444
 
@@ -373,6 +461,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
373 461
 #define INVERT_E3_DIR false
374 462
 
375 463
 // @section homing
464
+//#define MIN_Z_HEIGHT_FOR_HOMING 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
465
+                                    // Be sure you have this distance over your Z_MAX_POS in case.
376 466
 
377 467
 // ENDSTOP SETTINGS:
378 468
 // Sets direction of endstops when homing; 1=MAX, -1=MIN
@@ -408,24 +498,26 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
408 498
 #endif
409 499
 
410 500
 //===========================================================================
411
-//=========================== Manual Bed Leveling ===========================
501
+//============================ Mesh Bed Leveling ============================
412 502
 //===========================================================================
413 503
 
414
-//#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
415 504
 //#define MESH_BED_LEVELING    // Enable mesh bed leveling.
416 505
 
417
-#if ENABLED(MANUAL_BED_LEVELING)
418
-  #define MBL_Z_STEP 0.025  // Step size while manually probing Z axis.
419
-#endif  // MANUAL_BED_LEVELING
420
-
421 506
 #if ENABLED(MESH_BED_LEVELING)
422 507
   #define MESH_MIN_X 10
423
-  #define MESH_MAX_X (X_MAX_POS - MESH_MIN_X)
508
+  #define MESH_MAX_X (X_MAX_POS - (MESH_MIN_X))
424 509
   #define MESH_MIN_Y 10
425
-  #define MESH_MAX_Y (Y_MAX_POS - MESH_MIN_Y)
510
+  #define MESH_MAX_Y (Y_MAX_POS - (MESH_MIN_Y))
426 511
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
427 512
   #define MESH_NUM_Y_POINTS 3
428 513
   #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0.
514
+
515
+  //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
516
+
517
+  #if ENABLED(MANUAL_BED_LEVELING)
518
+    #define MBL_Z_STEP 0.025  // Step size while manually probing Z axis.
519
+  #endif  // MANUAL_BED_LEVELING
520
+
429 521
 #endif  // MESH_BED_LEVELING
430 522
 
431 523
 //===========================================================================
@@ -436,7 +528,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
436 528
 
437 529
 //#define AUTO_BED_LEVELING_FEATURE // Delete the comment to enable (remove // at the start of the line)
438 530
 //#define DEBUG_LEVELING_FEATURE
439
-#define Z_MIN_PROBE_REPEATABILITY_TEST  // If not commented out, Z-Probe Repeatability test will be included if Auto Bed Leveling is Enabled.
531
+#define Z_MIN_PROBE_REPEATABILITY_TEST  // If not commented out, Z Probe Repeatability test will be included if Auto Bed Leveling is Enabled.
440 532
 
441 533
 #if ENABLED(AUTO_BED_LEVELING_FEATURE)
442 534
 
@@ -448,7 +540,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
448 540
   //   This mode is preferred because there are more measurements.
449 541
   //
450 542
   // - "3-point" mode
451
-  //   Probe 3 arbitrary points on the bed (that aren't colinear)
543
+  //   Probe 3 arbitrary points on the bed (that aren't collinear)
452 544
   //   You specify the XY coordinates of all 3 points.
453 545
 
454 546
   // Enable this to sample the bed in a grid (least squares solution).
@@ -462,7 +554,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
462 554
     #define FRONT_PROBE_BED_POSITION 20
463 555
     #define BACK_PROBE_BED_POSITION 170
464 556
 
465
-    #define MIN_PROBE_EDGE 10 // The Z probe square sides can be no smaller than this.
557
+    #define MIN_PROBE_EDGE 10 // The Z probe minimum square sides can be no smaller than this.
466 558
 
467 559
     // Set the number of grid points per dimension.
468 560
     // You probably don't need more than 3 (squared=9).
@@ -470,25 +562,37 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
470 562
 
471 563
   #else  // !AUTO_BED_LEVELING_GRID
472 564
 
473
-      // Arbitrary points to probe.
474
-      // A simple cross-product is used to estimate the plane of the bed.
475
-      #define ABL_PROBE_PT_1_X 15
476
-      #define ABL_PROBE_PT_1_Y 180
477
-      #define ABL_PROBE_PT_2_X 15
478
-      #define ABL_PROBE_PT_2_Y 20
479
-      #define ABL_PROBE_PT_3_X 170
480
-      #define ABL_PROBE_PT_3_Y 20
565
+    // Arbitrary points to probe.
566
+    // A simple cross-product is used to estimate the plane of the bed.
567
+    #define ABL_PROBE_PT_1_X 15
568
+    #define ABL_PROBE_PT_1_Y 180
569
+    #define ABL_PROBE_PT_2_X 15
570
+    #define ABL_PROBE_PT_2_Y 20
571
+    #define ABL_PROBE_PT_3_X 170
572
+    #define ABL_PROBE_PT_3_Y 20
481 573
 
482 574
   #endif // AUTO_BED_LEVELING_GRID
483 575
 
484
-  // Offsets to the Z probe relative to the nozzle tip.
576
+  // Z Probe to nozzle (X,Y) offset, relative to (0, 0).
485 577
   // X and Y offsets must be integers.
486
-  #define X_PROBE_OFFSET_FROM_EXTRUDER -25     // Z probe to nozzle X offset: -left  +right
487
-  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29     // Z probe to nozzle Y offset: -front +behind
488
-  #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35  // Z probe to nozzle Z offset: -below (always!)
489
-
490
-  #define Z_RAISE_BEFORE_HOMING 4       // (in mm) Raise Z axis before homing (G28) for Z probe clearance.
491
-                                        // Be sure you have this distance over your Z_MAX_POS in case.
578
+  //
579
+  // In the following example the X and Y offsets are both positive:
580
+  // #define X_PROBE_OFFSET_FROM_EXTRUDER 10
581
+  // #define Y_PROBE_OFFSET_FROM_EXTRUDER 10
582
+  //
583
+  //    +-- BACK ---+
584
+  //    |           |
585
+  //  L |    (+) P  | R <-- probe (20,20)
586
+  //  E |           | I
587
+  //  F | (-) N (+) | G <-- nozzle (10,10)
588
+  //  T |           | H
589
+  //    |    (-)    | T
590
+  //    |           |
591
+  //    O-- FRONT --+
592
+  //  (0,0)
593
+  #define X_PROBE_OFFSET_FROM_EXTRUDER -25     // X offset: -left  [of the nozzle] +right
594
+  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29     // Y offset: -front [of the nozzle] +behind
595
+  #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35  // Z offset: -below [the nozzle] (always negative!)
492 596
 
493 597
   #define XY_TRAVEL_SPEED 8000         // X and Y axis travel speed between probes, in mm/min.
494 598
 
@@ -496,16 +600,29 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
496 600
   #define Z_RAISE_BETWEEN_PROBINGS 5  // How much the Z axis will be raised when traveling from between next probing points.
497 601
   #define Z_RAISE_AFTER_PROBING 15    // How much the Z axis will be raised after the last probing point.
498 602
 
499
-//#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" // These commands will be executed in the end of G29 routine.
500
-                                                                            // Useful to retract a deployable Z probe.
603
+  //#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" // These commands will be executed in the end of G29 routine.
604
+                                                                             // Useful to retract a deployable Z probe.
605
+
606
+  // Probes are sensors/switches that need to be activated before they can be used
607
+  // and deactivated after the use.
608
+  // Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, ... . You have to activate one of these for the AUTO_BED_LEVELING_FEATURE
609
+
610
+  // A fix mounted probe, like the normal inductive probe, must be deactivated to go below Z_PROBE_OFFSET_FROM_EXTRUDER
611
+  // when the hardware endstops are active.
612
+  //#define FIX_MOUNTED_PROBE
501 613
 
502
-  //#define Z_PROBE_SLED // Turn on if you have a Z probe mounted on a sled like those designed by Charles Bell.
614
+  // A Servo Probe can be defined in the servo section below.
615
+
616
+  // An Allen Key Probe is currently predefined only in the delta example configurations.
617
+
618
+  //#define Z_PROBE_SLED // Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
503 619
   //#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
504 620
 
505
-// If you have enabled the bed auto leveling and are using the same Z probe for Z homing,
506
-// it is highly recommended you let this Z_SAFE_HOMING enabled!!!
621
+  // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing,
622
+  // it is highly recommended you leave Z_SAFE_HOMING enabled!
507 623
 
508
-  #define Z_SAFE_HOMING   // This feature is meant to avoid Z homing with Z probe outside the bed area.
624
+  #define Z_SAFE_HOMING   // Use the z-min-probe for homing to z-min - not the z-min-endstop.
625
+                          // This feature is meant to avoid Z homing with Z probe outside the bed area.
509 626
                           // When defined, it will:
510 627
                           // - Allow Z homing only after X and Y homing AND stepper drivers still enabled.
511 628
                           // - If stepper drivers timeout, it will need X and Y homing again before Z homing.
@@ -519,37 +636,6 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
519 636
 
520 637
   #endif
521 638
 
522
-  // Support for a dedicated Z probe endstop separate from the Z min endstop.
523
-  // If you would like to use both a Z probe and a Z min endstop together,
524
-  // uncomment #define Z_MIN_PROBE_ENDSTOP and read the instructions below.
525
-  // If you still want to use the Z min endstop for homing, disable Z_SAFE_HOMING above.
526
-  // Example: To park the head outside the bed area when homing with G28.
527
-  //
528
-  // WARNING:
529
-  // The Z min endstop will need to set properly as it would without a Z probe
530
-  // to prevent head crashes and premature stopping during a print.
531
-  //
532
-  // To use a separate Z probe endstop, you must have a Z_MIN_PROBE_PIN
533
-  // defined in the pins_XXXXX.h file for your control board.
534
-  // If you are using a servo based Z probe, you will need to enable NUM_SERVOS,
535
-  // Z_ENDSTOP_SERVO_NR and SERVO_ENDSTOP_ANGLES in the R/C SERVO support below.
536
-  // RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin
537
-  // in the Aux 4 section of the RAMPS board. Use 5V for powered sensors,
538
-  // otherwise connect to ground and D32 for normally closed configuration
539
-  // and 5V and D32 for normally open configurations.
540
-  // Normally closed configuration is advised and assumed.
541
-  // The D32 pin in Aux 4 on RAMPS maps to the Arduino D32 pin.
542
-  // Z_MIN_PROBE_PIN is setting the pin to use on the Arduino.
543
-  // Since the D32 pin on the RAMPS maps to D32 on Arduino, this works.
544
-  // D32 is currently selected in the RAMPS 1.3/1.4 pin file.
545
-  // All other boards will need changes to the respective pins_XXXXX.h file.
546
-  //
547
-  // WARNING:
548
-  // Setting the wrong pin may have unexpected and potentially disastrous outcomes.
549
-  // Use with caution and do your homework.
550
-  //
551
-  //#define Z_MIN_PROBE_ENDSTOP
552
-
553 639
 #endif // AUTO_BED_LEVELING_FEATURE
554 640
 
555 641
 
@@ -624,6 +710,14 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
624 710
 #endif
625 711
 
626 712
 //
713
+// Host Keepalive
714
+//
715
+// By default Marlin will send a busy status message to the host
716
+// every 10 seconds when it can't accept commands.
717
+//
718
+//#define DISABLE_HOST_KEEPALIVE // Enable this option if your host doesn't like keepalive messages.
719
+
720
+//
627 721
 // M100 Free Memory Watcher
628 722
 //
629 723
 //#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
@@ -643,13 +737,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
643 737
 // @section lcd
644 738
 
645 739
 // Define your display language below. Replace (en) with your language code and uncomment.
646
-// en, pl, fr, de, es, ru, bg, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, cn, test
740
+// en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8, fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test
647 741
 // See also language.h
648 742
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
649 743
 
650 744
 // Choose ONE of these 3 charsets. This has to match your hardware. Ignored for full graphic display.
651 745
 // To find out what type you have - compile with (test) - upload - click to get the menu. You'll see two typical lines from the upper half of the charset.
652
-// See also documentation/LCDLanguageFont.md
746
+// See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
653 747
   #define DISPLAY_CHARSET_HD44780_JAPAN        // this is the most common hardware
654 748
   //#define DISPLAY_CHARSET_HD44780_WESTERN
655 749
   //#define DISPLAY_CHARSET_HD44780_CYRILLIC
@@ -657,11 +751,12 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
657 751
 #define ULTRA_LCD  //general LCD support, also 16x2
658 752
 //#define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
659 753
 #define SDSUPPORT // Enable SD Card Support in Hardware Console
660
-//#define SDSLOW // Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
661
-//#define SDEXTRASLOW // Use even slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
754
+                  // Changed behaviour! If you need SDSUPPORT uncomment it!
755
+//#define SPI_SPEED SPI_HALF_SPEED // (also SPI_QUARTER_SPEED, SPI_EIGHTH_SPEED) Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
662 756
 //#define SD_CHECK_AND_RETRY // Use CRC checks and retries on the SD communication
663 757
 //#define ENCODER_PULSES_PER_STEP 1 // Increase if you have a high resolution encoder
664 758
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
759
+//#define REVERSE_MENU_DIRECTION // When enabled CLOCKWISE moves UP in the LCD menu
665 760
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
666 761
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
667 762
 //#define SPEAKER // The sound device is a speaker - not a buzzer. A buzzer resonates with his own frequency.
@@ -678,13 +773,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
678 773
 
679 774
 // The Panucatt Devices Viki 2.0 and mini Viki with Graphic LCD
680 775
 // http://panucatt.com
681
-// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
776
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
682 777
 //#define VIKI2
683 778
 //#define miniVIKI
684 779
 
685 780
 // This is a new controller currently under development.  https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
686 781
 //
687
-// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
782
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
688 783
 //#define ELB_FULL_GRAPHIC_CONTROLLER
689 784
 //#define SD_DETECT_INVERTED
690 785
 
@@ -699,7 +794,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
699 794
 // The RepRapDiscount FULL GRAPHIC Smart Controller (quadratic white PCB)
700 795
 // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
701 796
 //
702
-// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
797
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
703 798
 //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
704 799
 
705 800
 // The RepRapWorld REPRAPWORLD_KEYPAD v1.1
@@ -722,6 +817,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
722 817
 
723 818
 //#define LCD_I2C_SAINSMART_YWROBOT
724 819
 
820
+//#define LCM1602 // LCM1602 Adapter for 16x2 LCD
821
+
725 822
 // PANELOLU2 LCD with status LEDs, separate encoder and click inputs
726 823
 //
727 824
 // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
@@ -735,7 +832,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
735 832
 //#define LCD_I2C_VIKI
736 833
 
737 834
 // SSD1306 OLED generic display support
738
-// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
835
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
739 836
 //#define U8GLIB_SSD1306
740 837
 
741 838
 // Shift register panels
@@ -747,7 +844,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
747 844
 
748 845
 // @section extras
749 846
 
750
-// Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
847
+// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino
751 848
 //#define FAST_PWM_FAN
752 849
 
753 850
 // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
@@ -827,21 +924,23 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
827 924
  * Note may require analog pins to be defined for different motherboards
828 925
  **********************************************************************/
829 926
 // Uncomment below to enable
830
-//#define FILAMENT_SENSOR
831
-
832
-#define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
833
-#define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
927
+//#define FILAMENT_WIDTH_SENSOR
834 928
 
835 929
 #define DEFAULT_NOMINAL_FILAMENT_DIA 3.00  //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software.  Used for sensor reading validation
836
-#define MEASURED_UPPER_LIMIT         3.30  //upper limit factor used for sensor reading validation in mm
837
-#define MEASURED_LOWER_LIMIT         1.90  //lower limit factor for sensor reading validation in mm
838
-#define MAX_MEASUREMENT_DELAY       20     //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM  and lower number saves RAM)
839 930
 
840
-//defines used in the code
841
-#define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially
931
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
932
+  #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
933
+  #define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
934
+
935
+  #define MEASURED_UPPER_LIMIT         3.30  //upper limit factor used for sensor reading validation in mm
936
+  #define MEASURED_LOWER_LIMIT         1.90  //lower limit factor for sensor reading validation in mm
937
+  #define MAX_MEASUREMENT_DELAY       20     //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM  and lower number saves RAM)
842 938
 
843
-//When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status.  Status will appear for 5 sec.
844
-//#define FILAMENT_LCD_DISPLAY
939
+  #define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially
940
+
941
+  //When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status.  Status will appear for 5 sec.
942
+  //#define FILAMENT_LCD_DISPLAY
943
+#endif
845 944
 
846 945
 #include "Configuration_adv.h"
847 946
 #include "thermistortables.h"

+ 123
- 69
Marlin/example_configurations/WITBOX/Configuration_adv.h View File

@@ -1,3 +1,35 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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
+/**
24
+ * Configuration_adv.h
25
+ *
26
+ * Advanced settings.
27
+ * Only change these if you know exactly what you're doing.
28
+ * Some of these settings can damage your printer if improperly set!
29
+ *
30
+ * Basic settings can be found in Configuration.h
31
+ *
32
+ */
1 33
 #ifndef CONFIGURATION_ADV_H
2 34
 #define CONFIGURATION_ADV_H
3 35
 
@@ -9,13 +41,26 @@
9 41
 //=============================Thermal Settings  ============================
10 42
 //===========================================================================
11 43
 
12
-#if ENABLED(BED_LIMIT_SWITCHING)
13
-  #define BED_HYSTERESIS 2 //only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS
44
+#if DISABLED(PIDTEMPBED)
45
+  #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control
46
+  #if ENABLED(BED_LIMIT_SWITCHING)
47
+    #define BED_HYSTERESIS 2 // Only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS
48
+  #endif
14 49
 #endif
15
-#define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control
16 50
 
17 51
 /**
18
- * Thermal Protection parameters
52
+ * Thermal Protection protects your printer from damage and fire if a
53
+ * thermistor falls out or temperature sensors fail in any way.
54
+ *
55
+ * The issue: If a thermistor falls out or a temperature sensor fails,
56
+ * Marlin can no longer sense the actual temperature. Since a disconnected
57
+ * thermistor reads as a low temperature, the firmware will keep the heater on.
58
+ *
59
+ * The solution: Once the temperature reaches the target, start observing.
60
+ * If the temperature stays too far below the target (hysteresis) for too long (period),
61
+ * the firmware will halt the machine as a safety precaution.
62
+ *
63
+ * If you get false positives for "Thermal Runaway" increase THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
19 64
  */
20 65
 #if ENABLED(THERMAL_PROTECTION_HOTENDS)
21 66
   #define THERMAL_PROTECTION_PERIOD 40        // Seconds
@@ -26,26 +71,24 @@
26 71
    * WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
27 72
    * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
28 73
    * but only if the current temperature is far enough below the target for a reliable test.
74
+   *
75
+   * If you get false positives for "Heating failed" increase WATCH_TEMP_PERIOD and/or decrease WATCH_TEMP_INCREASE
76
+   * WATCH_TEMP_INCREASE should not be below 2.
29 77
    */
30
-  #define WATCH_TEMP_PERIOD 16                // Seconds
31
-  #define WATCH_TEMP_INCREASE 4               // Degrees Celsius
78
+  #define WATCH_TEMP_PERIOD 20                // Seconds
79
+  #define WATCH_TEMP_INCREASE 2               // Degrees Celsius
32 80
 #endif
33 81
 
82
+/**
83
+ * Thermal Protection parameters for the bed
84
+ * are like the above for the hotends.
85
+ * WATCH_TEMP_BED_PERIOD and WATCH_TEMP_BED_INCREASE are not imlemented now.
86
+ */
34 87
 #if ENABLED(THERMAL_PROTECTION_BED)
35 88
   #define THERMAL_PROTECTION_BED_PERIOD 20    // Seconds
36 89
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
37 90
 #endif
38 91
 
39
-/**
40
- * Automatic Temperature:
41
- * The hotend target temperature is calculated by all the buffered lines of gcode.
42
- * The maximum buffered steps/sec of the extruder motor is called "se".
43
- * Start autotemp mode with M109 S<mintemp> B<maxtemp> F<factor>
44
- * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by
45
- * mintemp and maxtemp. Turn this off by excuting M109 without F*
46
- * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp.
47
- * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
48
- */
49 92
 #if ENABLED(PIDTEMP)
50 93
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
51 94
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.
@@ -56,14 +99,16 @@
56 99
   #endif
57 100
 #endif
58 101
 
59
-
60
-//automatic temperature: The hot end target temperature is calculated by all the buffered lines of gcode.
61
-//The maximum buffered steps/sec of the extruder motor are called "se".
62
-//You enter the autotemp mode by a M109 S<mintemp> B<maxtemp> F<factor>
63
-// the target temperature is set to mintemp+factor*se[steps/sec] and limited by mintemp and maxtemp
64
-// you exit the value by any M109 without F*
65
-// Also, if the temperature is set to a value <mintemp, it is not changed by autotemp.
66
-// on an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
102
+/**
103
+ * Automatic Temperature:
104
+ * The hotend target temperature is calculated by all the buffered lines of gcode.
105
+ * The maximum buffered steps/sec of the extruder motor is called "se".
106
+ * Start autotemp mode with M109 S<mintemp> B<maxtemp> F<factor>
107
+ * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by
108
+ * mintemp and maxtemp. Turn this off by executing M109 without F*
109
+ * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp.
110
+ * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
111
+ */
67 112
 #define AUTOTEMP
68 113
 #if ENABLED(AUTOTEMP)
69 114
   #define AUTOTEMP_OLDWEIGHT 0.98
@@ -156,9 +201,7 @@
156 201
   //#define Z_DUAL_ENDSTOPS
157 202
 
158 203
   #if ENABLED(Z_DUAL_ENDSTOPS)
159
-    #define Z2_MAX_PIN 36                     //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36)
160
-    const bool Z2_MAX_ENDSTOP_INVERTING = false;
161
-    #define DISABLE_XMAX_ENDSTOP              //Better to disable the XMAX to avoid conflict. Just rename "XMAX_ENDSTOP" by the endstop you are using for Z2 axis.
204
+    #define Z2_USE_ENDSTOP _XMAX_
162 205
   #endif
163 206
 
164 207
 #endif // Z_DUAL_STEPPER_DRIVERS
@@ -240,7 +283,13 @@
240 283
 #define INVERT_E_STEP_PIN false
241 284
 
242 285
 // Default stepper release if idle. Set to 0 to deactivate.
286
+// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true.
287
+// Time can be set by M18 and M84.
243 288
 #define DEFAULT_STEPPER_DEACTIVE_TIME 60
289
+#define DISABLE_INACTIVE_X true
290
+#define DISABLE_INACTIVE_Y true
291
+#define DISABLE_INACTIVE_Z true  // set to false if the nozzle will fall down on your printed part when print has finished.
292
+#define DISABLE_INACTIVE_E true
244 293
 
245 294
 #define DEFAULT_MINIMUMFEEDRATE       0.0     // minimum feedrate
246 295
 #define DEFAULT_MINTRAVELFEEDRATE     0.0
@@ -276,6 +325,9 @@
276 325
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
277 326
 #define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
278 327
 
328
+// Motor Current controlled via PWM (Overridable on supported boards with PWM-driven motor driver current)
329
+//#define PWM_MOTOR_CURRENT {1300, 1300, 1250} // Values in milliamps
330
+
279 331
 // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
280 332
 //#define DIGIPOT_I2C
281 333
 // Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8
@@ -349,17 +401,16 @@
349 401
   //#define USE_SMALL_INFOFONT
350 402
 #endif // DOGLCD
351 403
 
352
-
353 404
 // @section more
354 405
 
355 406
 // The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
356
-//#define USE_WATCHDOG
407
+#define USE_WATCHDOG
357 408
 
358 409
 #if ENABLED(USE_WATCHDOG)
359
-// If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
360
-// The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset.
361
-//  However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled.
362
-//#define WATCHDOG_RESET_MANUAL
410
+  // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
411
+  // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset.
412
+  //  However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled.
413
+  //#define WATCHDOG_RESET_MANUAL
363 414
 #endif
364 415
 
365 416
 // @section lcd
@@ -370,6 +421,7 @@
370 421
 //#define BABYSTEPPING
371 422
 #if ENABLED(BABYSTEPPING)
372 423
   #define BABYSTEP_XY  //not only z, but also XY in the menu. more clutter, more functions
424
+                       //not implemented for deltabots!
373 425
   #define BABYSTEP_INVERT_Z false  //true for inverse movements in Z
374 426
   #define BABYSTEP_MULTIPLICATOR 1 //faster movements
375 427
 #endif
@@ -388,7 +440,6 @@
388 440
 #if ENABLED(ADVANCE)
389 441
   #define EXTRUDER_ADVANCE_K .0
390 442
   #define D_FILAMENT 1.75
391
-  #define STEPS_MM_E 100.47095761381482
392 443
 #endif
393 444
 
394 445
 // @section extras
@@ -397,7 +448,7 @@
397 448
 #define MM_PER_ARC_SEGMENT 1
398 449
 #define N_ARC_CORRECTION 25
399 450
 
400
-const unsigned int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement
451
+const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement
401 452
 
402 453
 // @section temperature
403 454
 
@@ -446,11 +497,11 @@ const unsigned int dropsegments=5; //everything with less than this number of st
446 497
   #define MIN_RETRACT 0.1                //minimum extruded mm to accept a automatic gcode retraction attempt
447 498
   #define RETRACT_LENGTH 3               //default retract length (positive mm)
448 499
   #define RETRACT_LENGTH_SWAP 13         //default swap retract length (positive mm), for extruder change
449
-  #define RETRACT_FEEDRATE 80*60            //default feedrate for retracting (mm/s)
500
+  #define RETRACT_FEEDRATE 80            //default feedrate for retracting (mm/s)
450 501
   #define RETRACT_ZLIFT 0                //default retract Z-lift
451 502
   #define RETRACT_RECOVER_LENGTH 0       //default additional recover length (mm, added to retract length when recovering)
452 503
   //#define RETRACT_RECOVER_LENGTH_SWAP 0  //default additional swap recover length (mm, added to retract length when recovering from extruder change)
453
-  #define RETRACT_RECOVER_FEEDRATE 8*60     //default feedrate for recovering from retraction (mm/s)
504
+  #define RETRACT_RECOVER_FEEDRATE 8     //default feedrate for recovering from retraction (mm/s)
454 505
 #endif
455 506
 
456 507
 // Add support for experimental filament exchange support M600; requires display
@@ -462,12 +513,15 @@ const unsigned int dropsegments=5; //everything with less than this number of st
462 513
     #define FILAMENTCHANGE_ZADD 10
463 514
     #define FILAMENTCHANGE_FIRSTRETRACT -2
464 515
     #define FILAMENTCHANGE_FINALRETRACT -100
516
+    #define AUTO_FILAMENT_CHANGE                //This extrude filament until you press the button on LCD
517
+    #define AUTO_FILAMENT_CHANGE_LENGTH 0.04    //Extrusion length on automatic extrusion loop
518
+    #define AUTO_FILAMENT_CHANGE_FEEDRATE 300   //Extrusion feedrate (mm/min) on automatic extrusion loop
465 519
   #endif
466 520
 #endif
467 521
 
468 522
 /******************************************************************************\
469 523
  * enable this section if you have TMC26X motor drivers.
470
- * you need to import the TMC26XStepper library into the arduino IDE for this
524
+ * you need to import the TMC26XStepper library into the Arduino IDE for this
471 525
  ******************************************************************************/
472 526
 
473 527
 // @section tmc
@@ -475,52 +529,52 @@ const unsigned int dropsegments=5; //everything with less than this number of st
475 529
 //#define HAVE_TMCDRIVER
476 530
 #if ENABLED(HAVE_TMCDRIVER)
477 531
 
478
-//#define X_IS_TMC
532
+  //#define X_IS_TMC
479 533
   #define X_MAX_CURRENT 1000  //in mA
480 534
   #define X_SENSE_RESISTOR 91 //in mOhms
481 535
   #define X_MICROSTEPS 16     //number of microsteps
482 536
 
483
-//#define X2_IS_TMC
537
+  //#define X2_IS_TMC
484 538
   #define X2_MAX_CURRENT 1000  //in mA
485 539
   #define X2_SENSE_RESISTOR 91 //in mOhms
486 540
   #define X2_MICROSTEPS 16     //number of microsteps
487 541
 
488
-//#define Y_IS_TMC
542
+  //#define Y_IS_TMC
489 543
   #define Y_MAX_CURRENT 1000  //in mA
490 544
   #define Y_SENSE_RESISTOR 91 //in mOhms
491 545
   #define Y_MICROSTEPS 16     //number of microsteps
492 546
 
493
-//#define Y2_IS_TMC
547
+  //#define Y2_IS_TMC
494 548
   #define Y2_MAX_CURRENT 1000  //in mA
495 549
   #define Y2_SENSE_RESISTOR 91 //in mOhms
496 550
   #define Y2_MICROSTEPS 16     //number of microsteps
497 551
 
498
-//#define Z_IS_TMC
552
+  //#define Z_IS_TMC
499 553
   #define Z_MAX_CURRENT 1000  //in mA
500 554
   #define Z_SENSE_RESISTOR 91 //in mOhms
501 555
   #define Z_MICROSTEPS 16     //number of microsteps
502 556
 
503
-//#define Z2_IS_TMC
557
+  //#define Z2_IS_TMC
504 558
   #define Z2_MAX_CURRENT 1000  //in mA
505 559
   #define Z2_SENSE_RESISTOR 91 //in mOhms
506 560
   #define Z2_MICROSTEPS 16     //number of microsteps
507 561
 
508
-//#define E0_IS_TMC
562
+  //#define E0_IS_TMC
509 563
   #define E0_MAX_CURRENT 1000  //in mA
510 564
   #define E0_SENSE_RESISTOR 91 //in mOhms
511 565
   #define E0_MICROSTEPS 16     //number of microsteps
512 566
 
513
-//#define E1_IS_TMC
567
+  //#define E1_IS_TMC
514 568
   #define E1_MAX_CURRENT 1000  //in mA
515 569
   #define E1_SENSE_RESISTOR 91 //in mOhms
516 570
   #define E1_MICROSTEPS 16     //number of microsteps
517 571
 
518
-//#define E2_IS_TMC
572
+  //#define E2_IS_TMC
519 573
   #define E2_MAX_CURRENT 1000  //in mA
520 574
   #define E2_SENSE_RESISTOR 91 //in mOhms
521 575
   #define E2_MICROSTEPS 16     //number of microsteps
522 576
 
523
-//#define E3_IS_TMC
577
+  //#define E3_IS_TMC
524 578
   #define E3_MAX_CURRENT 1000  //in mA
525 579
   #define E3_SENSE_RESISTOR 91 //in mOhms
526 580
   #define E3_MICROSTEPS 16     //number of microsteps
@@ -529,7 +583,7 @@ const unsigned int dropsegments=5; //everything with less than this number of st
529 583
 
530 584
 /******************************************************************************\
531 585
  * enable this section if you have L6470  motor drivers.
532
- * you need to import the L6470 library into the arduino IDE for this
586
+ * you need to import the L6470 library into the Arduino IDE for this
533 587
  ******************************************************************************/
534 588
 
535 589
 // @section l6470
@@ -537,63 +591,63 @@ const unsigned int dropsegments=5; //everything with less than this number of st
537 591
 //#define HAVE_L6470DRIVER
538 592
 #if ENABLED(HAVE_L6470DRIVER)
539 593
 
540
-//#define X_IS_L6470
594
+  //#define X_IS_L6470
541 595
   #define X_MICROSTEPS 16     //number of microsteps
542
-  #define X_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
596
+  #define X_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
543 597
   #define X_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
544 598
   #define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall
545 599
 
546
-//#define X2_IS_L6470
600
+  //#define X2_IS_L6470
547 601
   #define X2_MICROSTEPS 16     //number of microsteps
548
-  #define X2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
602
+  #define X2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
549 603
   #define X2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
550 604
   #define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
551 605
 
552
-//#define Y_IS_L6470
606
+  //#define Y_IS_L6470
553 607
   #define Y_MICROSTEPS 16     //number of microsteps
554
-  #define Y_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
608
+  #define Y_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
555 609
   #define Y_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
556 610
   #define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall
557 611
 
558
-//#define Y2_IS_L6470
612
+  //#define Y2_IS_L6470
559 613
   #define Y2_MICROSTEPS 16     //number of microsteps
560
-  #define Y2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
614
+  #define Y2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
561 615
   #define Y2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
562 616
   #define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
563 617
 
564
-//#define Z_IS_L6470
618
+  //#define Z_IS_L6470
565 619
   #define Z_MICROSTEPS 16     //number of microsteps
566
-  #define Z_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
620
+  #define Z_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
567 621
   #define Z_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
568 622
   #define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall
569 623
 
570
-//#define Z2_IS_L6470
624
+  //#define Z2_IS_L6470
571 625
   #define Z2_MICROSTEPS 16     //number of microsteps
572
-  #define Z2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
626
+  #define Z2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
573 627
   #define Z2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
574 628
   #define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
575 629
 
576
-//#define E0_IS_L6470
630
+  //#define E0_IS_L6470
577 631
   #define E0_MICROSTEPS 16     //number of microsteps
578
-  #define E0_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
632
+  #define E0_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
579 633
   #define E0_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
580 634
   #define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall
581 635
 
582
-//#define E1_IS_L6470
636
+  //#define E1_IS_L6470
583 637
   #define E1_MICROSTEPS 16     //number of microsteps
584
-  #define E1_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
638
+  #define E1_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
585 639
   #define E1_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
586 640
   #define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall
587 641
 
588
-//#define E2_IS_L6470
642
+  //#define E2_IS_L6470
589 643
   #define E2_MICROSTEPS 16     //number of microsteps
590
-  #define E2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
644
+  #define E2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
591 645
   #define E2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
592 646
   #define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
593 647
 
594
-//#define E3_IS_L6470
648
+  //#define E3_IS_L6470
595 649
   #define E3_MICROSTEPS 16     //number of microsteps
596
-  #define E3_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
650
+  #define E3_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
597 651
   #define E3_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
598 652
   #define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall
599 653
 

+ 213
- 115
Marlin/example_configurations/adafruit/ST7565/Configuration.h View File

@@ -1,3 +1,40 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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
+/**
24
+ * Configuration.h
25
+ *
26
+ * Basic settings such as:
27
+ *
28
+ * - Type of electronics
29
+ * - Type of temperature sensor
30
+ * - Printer geometry
31
+ * - Endstop configuration
32
+ * - LCD controller
33
+ * - Extra features
34
+ *
35
+ * Advanced settings can be found in Configuration_adv.h
36
+ *
37
+ */
1 38
 #ifndef CONFIGURATION_H
2 39
 #define CONFIGURATION_H
3 40
 
@@ -7,8 +44,10 @@
7 44
 //===========================================================================
8 45
 //============================= Getting Started =============================
9 46
 //===========================================================================
10
-/*
11
-Here are some standard links for getting your machine calibrated:
47
+
48
+/**
49
+ * Here are some standard links for getting your machine calibrated:
50
+ *
12 51
  * http://reprap.org/wiki/Calibration
13 52
  * http://youtu.be/wAL9d7FgInk
14 53
  * http://calculator.josefprusa.cz
@@ -16,11 +55,7 @@ Here are some standard links for getting your machine calibrated:
16 55
  * http://www.thingiverse.com/thing:5573
17 56
  * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap
18 57
  * http://www.thingiverse.com/thing:298812
19
-*/
20
-
21
-// This configuration file contains the basic settings.
22
-// Advanced settings can be found in Configuration_adv.h
23
-// BASIC SETTINGS: select your board type, temperature sensor type, axis scaling, and endstop configuration
58
+ */
24 59
 
25 60
 //===========================================================================
26 61
 //============================= DELTA Printer ===============================
@@ -70,7 +105,7 @@ Here are some standard links for getting your machine calibrated:
70 105
 // The following define selects which electronics board you have.
71 106
 // Please choose the name from boards.h that matches your setup
72 107
 #ifndef MOTHERBOARD
73
-  #define MOTHERBOARD BOARD_RAMPS_13_EFB
108
+  #define MOTHERBOARD BOARD_RAMPS_14_EFB
74 109
 #endif
75 110
 
76 111
 // Optional custom name for your RepStrap or other custom machine
@@ -110,6 +145,7 @@ Here are some standard links for getting your machine calibrated:
110 145
 //--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table
111 146
 //
112 147
 //// Temperature sensor settings:
148
+// -3 is thermocouple with MAX31855 (only for sensor 0)
113 149
 // -2 is thermocouple with MAX6675 (only for sensor 0)
114 150
 // -1 is thermocouple with AD595
115 151
 // 0 is not used
@@ -129,6 +165,7 @@ Here are some standard links for getting your machine calibrated:
129 165
 // 13 is 100k Hisens 3950  1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
130 166
 // 20 is the PT100 circuit found in the Ultimainboard V2.x
131 167
 // 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
168
+// 70 is the 100K thermistor found in the bq Hephestos 2
132 169
 //
133 170
 //    1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k
134 171
 //                          (but gives greater accuracy and more stable PID)
@@ -144,7 +181,7 @@ Here are some standard links for getting your machine calibrated:
144 181
 //     Use it for Testing or Development purposes. NEVER for production machine.
145 182
 //#define DUMMY_THERMISTOR_998_VALUE 25
146 183
 //#define DUMMY_THERMISTOR_999_VALUE 100
147
-// :{ '0': "Not used", '4': "10k !! do not use for a hotend. Bad resolution at high temp. !!", '1': "100k / 4.7k - EPCOS", '51': "100k / 1k - EPCOS", '6': "100k / 4.7k EPCOS - Not as accurate as Table 1", '5': "100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '7': "100k / 4.7k Honeywell 135-104LAG-J01", '71': "100k / 4.7k Honeywell 135-104LAF-J01", '8': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9': "100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10': "100k / 4.7k RS 198-961", '11': "100k / 4.7k beta 3950 1%", '12': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13': "100k Hisens 3950  1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '60': "100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '55': "100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '2': "200k / 4.7k - ATC Semitec 204GT-2", '52': "200k / 1k - ATC Semitec 204GT-2", '-2': "Thermocouple + MAX6675 (only for sensor 0)", '-1': "Thermocouple + AD595", '3': "Mendel-parts / 4.7k", '1047': "Pt1000 / 4.7k", '1010': "Pt1000 / 1k (non standard)", '20': "PT100 (Ultimainboard V2.x)", '147': "Pt100 / 4.7k", '110': "Pt100 / 1k (non-standard)", '998': "Dummy 1", '999': "Dummy 2" }
184
+// :{ '0': "Not used", '4': "10k !! do not use for a hotend. Bad resolution at high temp. !!", '1': "100k / 4.7k - EPCOS", '51': "100k / 1k - EPCOS", '6': "100k / 4.7k EPCOS - Not as accurate as Table 1", '5': "100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '7': "100k / 4.7k Honeywell 135-104LAG-J01", '71': "100k / 4.7k Honeywell 135-104LAF-J01", '8': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9': "100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10': "100k / 4.7k RS 198-961", '11': "100k / 4.7k beta 3950 1%", '12': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13': "100k Hisens 3950  1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '60': "100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '55': "100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '2': "200k / 4.7k - ATC Semitec 204GT-2", '52': "200k / 1k - ATC Semitec 204GT-2", '-3': "Thermocouple + MAX31855 (only for sensor 0)", '-2': "Thermocouple + MAX6675 (only for sensor 0)", '-1': "Thermocouple + AD595", '3': "Mendel-parts / 4.7k", '1047': "Pt1000 / 4.7k", '1010': "Pt1000 / 1k (non standard)", '20': "PT100 (Ultimainboard V2.x)", '147': "Pt100 / 4.7k", '110': "Pt100 / 1k (non-standard)", '998': "Dummy 1", '999': "Dummy 2" }
148 185
 #define TEMP_SENSOR_0 1
149 186
 #define TEMP_SENSOR_1 0
150 187
 #define TEMP_SENSOR_2 0
@@ -178,14 +215,9 @@ Here are some standard links for getting your machine calibrated:
178 215
 #define HEATER_3_MAXTEMP 275
179 216
 #define BED_MAXTEMP 150
180 217
 
181
-// If your bed has low resistance e.g. .6 ohm and throws the fuse you can duty cycle it to reduce the
182
-// average current. The value should be an integer and the heat bed will be turned on for 1 interval of
183
-// HEATER_BED_DUTY_CYCLE_DIVIDER intervals.
184
-//#define HEATER_BED_DUTY_CYCLE_DIVIDER 4
185
-
186 218
 // If you want the M105 heater power reported in watts, define the BED_WATTS, and (shared for all extruders) EXTRUDER_WATTS
187
-//#define EXTRUDER_WATTS (12.0*12.0/6.7) //  P=I^2/R
188
-//#define BED_WATTS (12.0*12.0/1.1)      // P=I^2/R
219
+//#define EXTRUDER_WATTS (12.0*12.0/6.7) // P=U^2/R
220
+//#define BED_WATTS (12.0*12.0/1.1)      // P=U^2/R
189 221
 
190 222
 //===========================================================================
191 223
 //============================= PID Settings ================================
@@ -197,6 +229,7 @@ Here are some standard links for getting your machine calibrated:
197 229
 #define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
198 230
 #define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
199 231
 #if ENABLED(PIDTEMP)
232
+  //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
200 233
   //#define PID_DEBUG // Sends debug data to the serial port.
201 234
   //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
202 235
   //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -247,19 +280,19 @@ Here are some standard links for getting your machine calibrated:
247 280
 // so you shouldn't use it unless you are OK with PWM on your bed.  (see the comment on enabling PIDTEMPBED)
248 281
 #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
249 282
 
250
-//#define PID_BED_DEBUG // Sends debug data to the serial port.
251
-
252 283
 #if ENABLED(PIDTEMPBED)
253 284
 
285
+  //#define PID_BED_DEBUG // Sends debug data to the serial port.
286
+
254 287
   #define PID_BED_INTEGRAL_DRIVE_MAX MAX_BED_POWER //limit for the integral term
255 288
 
256
-  //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
289
+  //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
257 290
   //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
258 291
   #define  DEFAULT_bedKp 10.00
259 292
   #define  DEFAULT_bedKi .023
260 293
   #define  DEFAULT_bedKd 305.4
261 294
 
262
-  //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
295
+  //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
263 296
   //from pidautotune
264 297
   //#define  DEFAULT_bedKp 97.1
265 298
   //#define  DEFAULT_bedKi 1.41
@@ -284,16 +317,15 @@ Here are some standard links for getting your machine calibrated:
284 317
 //===========================================================================
285 318
 
286 319
 /**
287
- * Thermal Runaway Protection protects your printer from damage and fire if a
320
+ * Thermal Protection protects your printer from damage and fire if a
288 321
  * thermistor falls out or temperature sensors fail in any way.
289 322
  *
290 323
  * The issue: If a thermistor falls out or a temperature sensor fails,
291 324
  * Marlin can no longer sense the actual temperature. Since a disconnected
292 325
  * thermistor reads as a low temperature, the firmware will keep the heater on.
293 326
  *
294
- * The solution: Once the temperature reaches the target, start observing.
295
- * If the temperature stays too far below the target (hysteresis) for too long,
296
- * the firmware will halt as a safety precaution.
327
+ * If you get "Thermal Runaway" or "Heating failed" errors the
328
+ * details can be tuned in Configuration_adv.h
297 329
  */
298 330
 
299 331
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
@@ -314,8 +346,22 @@ Here are some standard links for getting your machine calibrated:
314 346
 // Enable this option for Toshiba steppers
315 347
 //#define CONFIG_STEPPERS_TOSHIBA
316 348
 
349
+//===========================================================================
350
+//============================== Endstop Settings ===========================
351
+//===========================================================================
352
+
317 353
 // @section homing
318 354
 
355
+// Specify here all the endstop connectors that are connected to any endstop or probe.
356
+// Almost all printers will be using one per axis. Probes will use one or more of the
357
+// extra connectors. Leave undefined any used for non-endstop and non-probe purposes.
358
+#define USE_XMIN_PLUG
359
+#define USE_YMIN_PLUG
360
+#define USE_ZMIN_PLUG
361
+//#define USE_XMAX_PLUG
362
+//#define USE_YMAX_PLUG
363
+//#define USE_ZMAX_PLUG
364
+
319 365
 // coarse Endstop Settings
320 366
 #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
321 367
 
@@ -338,13 +384,53 @@ const bool X_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
338 384
 const bool Y_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
339 385
 const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
340 386
 const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
341
-//#define DISABLE_MAX_ENDSTOPS
342
-//#define DISABLE_MIN_ENDSTOPS
343 387
 
344
-// If you want to enable the Z probe pin, but disable its use, uncomment the line below.
345
-// This only affects a Z probe endstop if you have separate Z min endstop as well and have
346
-// activated Z_MIN_PROBE_ENDSTOP below. If you are using the Z Min endstop on your Z probe,
347
-// this has no effect.
388
+//===========================================================================
389
+//============================= Z Probe Options =============================
390
+//===========================================================================
391
+
392
+// Enable Z_MIN_PROBE_ENDSTOP to use _both_ a Z Probe and a Z-min-endstop on the same machine.
393
+// With this option the Z_MIN_PROBE_PIN will only be used for probing, never for homing.
394
+//
395
+// *** PLEASE READ ALL INSTRUCTIONS BELOW FOR SAFETY! ***
396
+//
397
+// To continue using the Z-min-endstop for homing, be sure to disable Z_SAFE_HOMING.
398
+// Example: To park the head outside the bed area when homing with G28.
399
+//
400
+// To use a separate Z probe, your board must define a Z_MIN_PROBE_PIN.
401
+//
402
+// For a servo-based Z probe, you must set up servo support below, including
403
+// NUM_SERVOS, Z_ENDSTOP_SERVO_NR and SERVO_ENDSTOP_ANGLES.
404
+//
405
+// - RAMPS 1.3/1.4 boards may be able to use the 5V, GND, and Aux4->D32 pin.
406
+// - Use 5V for powered (usu. inductive) sensors.
407
+// - Otherwise connect:
408
+//   - normally-closed switches to GND and D32.
409
+//   - normally-open switches to 5V and D32.
410
+//
411
+// Normally-closed switches are advised and are the default.
412
+//
413
+// The Z_MIN_PROBE_PIN sets the Arduino pin to use. (See your board's pins file.)
414
+// Since the RAMPS Aux4->D32 pin maps directly to the Arduino D32 pin, D32 is the
415
+// default pin for all RAMPS-based boards. Some other boards map differently.
416
+// To set or change the pin for your board, edit the appropriate pins_XXXXX.h file.
417
+//
418
+// WARNING:
419
+// Setting the wrong pin may have unexpected and potentially disastrous consequences.
420
+// Use with caution and do your homework.
421
+//
422
+//#define Z_MIN_PROBE_ENDSTOP
423
+
424
+// Enable Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN to use the Z_MIN_PIN for your Z_MIN_PROBE.
425
+// The Z_MIN_PIN will then be used for both Z-homing and probing.
426
+#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
427
+
428
+// To use a probe you must enable one of the two options above!
429
+
430
+// This option disables the use of the Z_MIN_PROBE_PIN
431
+// To enable the Z probe pin but disable its use, uncomment the line below. This only affects a
432
+// Z probe switch if you have a separate Z min endstop also and have activated Z_MIN_PROBE_ENDSTOP above.
433
+// If you're using the Z MIN endstop connector for your Z probe, this has no effect.
348 434
 //#define DISABLE_Z_MIN_PROBE_ENDSTOP
349 435
 
350 436
 // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
@@ -354,11 +440,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
354 440
 #define Z_ENABLE_ON 0
355 441
 #define E_ENABLE_ON 0 // For all extruders
356 442
 
357
-// Disables axis when it's not being used.
443
+// Disables axis stepper immediately when it's not being used.
358 444
 // WARNING: When motors turn off there is a chance of losing position accuracy!
359 445
 #define DISABLE_X false
360 446
 #define DISABLE_Y false
361 447
 #define DISABLE_Z false
448
+// Warn on display about possibly reduced accuracy
449
+//#define DISABLE_REDUCED_ACCURACY_WARNING
362 450
 
363 451
 // @section extruder
364 452
 
@@ -381,6 +469,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
381 469
 #define INVERT_E3_DIR false
382 470
 
383 471
 // @section homing
472
+//#define MIN_Z_HEIGHT_FOR_HOMING 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
473
+                                    // Be sure you have this distance over your Z_MAX_POS in case.
384 474
 
385 475
 // ENDSTOP SETTINGS:
386 476
 // Sets direction of endstops when homing; 1=MAX, -1=MIN
@@ -416,24 +506,26 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
416 506
 #endif
417 507
 
418 508
 //===========================================================================
419
-//=========================== Manual Bed Leveling ===========================
509
+//============================ Mesh Bed Leveling ============================
420 510
 //===========================================================================
421 511
 
422
-//#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
423 512
 //#define MESH_BED_LEVELING    // Enable mesh bed leveling.
424 513
 
425
-#if ENABLED(MANUAL_BED_LEVELING)
426
-  #define MBL_Z_STEP 0.025  // Step size while manually probing Z axis.
427
-#endif  // MANUAL_BED_LEVELING
428
-
429 514
 #if ENABLED(MESH_BED_LEVELING)
430 515
   #define MESH_MIN_X 10
431
-  #define MESH_MAX_X (X_MAX_POS - MESH_MIN_X)
516
+  #define MESH_MAX_X (X_MAX_POS - (MESH_MIN_X))
432 517
   #define MESH_MIN_Y 10
433
-  #define MESH_MAX_Y (Y_MAX_POS - MESH_MIN_Y)
518
+  #define MESH_MAX_Y (Y_MAX_POS - (MESH_MIN_Y))
434 519
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
435 520
   #define MESH_NUM_Y_POINTS 3
436 521
   #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0.
522
+
523
+  //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
524
+
525
+  #if ENABLED(MANUAL_BED_LEVELING)
526
+    #define MBL_Z_STEP 0.025  // Step size while manually probing Z axis.
527
+  #endif  // MANUAL_BED_LEVELING
528
+
437 529
 #endif  // MESH_BED_LEVELING
438 530
 
439 531
 //===========================================================================
@@ -442,10 +534,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
442 534
 
443 535
 // @section bedlevel
444 536
 
445
-
446 537
 //#define AUTO_BED_LEVELING_FEATURE // Delete the comment to enable (remove // at the start of the line)
447 538
 //#define DEBUG_LEVELING_FEATURE
448
-#define Z_MIN_PROBE_REPEATABILITY_TEST  // If not commented out, Z-Probe Repeatability test will be included if Auto Bed Leveling is Enabled.
539
+#define Z_MIN_PROBE_REPEATABILITY_TEST  // If not commented out, Z Probe Repeatability test will be included if Auto Bed Leveling is Enabled.
449 540
 
450 541
 #if ENABLED(AUTO_BED_LEVELING_FEATURE)
451 542
 
@@ -457,7 +548,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
457 548
   //   This mode is preferred because there are more measurements.
458 549
   //
459 550
   // - "3-point" mode
460
-  //   Probe 3 arbitrary points on the bed (that aren't colinear)
551
+  //   Probe 3 arbitrary points on the bed (that aren't collinear)
461 552
   //   You specify the XY coordinates of all 3 points.
462 553
 
463 554
   // Enable this to sample the bed in a grid (least squares solution).
@@ -471,7 +562,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
471 562
     #define FRONT_PROBE_BED_POSITION 20
472 563
     #define BACK_PROBE_BED_POSITION 170
473 564
 
474
-    #define MIN_PROBE_EDGE 10 // The Z probe square sides can be no smaller than this.
565
+    #define MIN_PROBE_EDGE 10 // The Z probe minimum square sides can be no smaller than this.
475 566
 
476 567
     // Set the number of grid points per dimension.
477 568
     // You probably don't need more than 3 (squared=9).
@@ -479,25 +570,37 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
479 570
 
480 571
   #else  // !AUTO_BED_LEVELING_GRID
481 572
 
482
-      // Arbitrary points to probe.
483
-      // A simple cross-product is used to estimate the plane of the bed.
484
-      #define ABL_PROBE_PT_1_X 15
485
-      #define ABL_PROBE_PT_1_Y 180
486
-      #define ABL_PROBE_PT_2_X 15
487
-      #define ABL_PROBE_PT_2_Y 20
488
-      #define ABL_PROBE_PT_3_X 170
489
-      #define ABL_PROBE_PT_3_Y 20
573
+    // Arbitrary points to probe.
574
+    // A simple cross-product is used to estimate the plane of the bed.
575
+    #define ABL_PROBE_PT_1_X 15
576
+    #define ABL_PROBE_PT_1_Y 180
577
+    #define ABL_PROBE_PT_2_X 15
578
+    #define ABL_PROBE_PT_2_Y 20
579
+    #define ABL_PROBE_PT_3_X 170
580
+    #define ABL_PROBE_PT_3_Y 20
490 581
 
491 582
   #endif // AUTO_BED_LEVELING_GRID
492 583
 
493
-  // Offsets to the Z probe relative to the nozzle tip.
584
+  // Z Probe to nozzle (X,Y) offset, relative to (0, 0).
494 585
   // X and Y offsets must be integers.
495
-  #define X_PROBE_OFFSET_FROM_EXTRUDER -25     // Z probe to nozzle X offset: -left  +right
496
-  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29     // Z probe to nozzle Y offset: -front +behind
497
-  #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35  // Z probe to nozzle Z offset: -below (always!)
498
-
499
-  #define Z_RAISE_BEFORE_HOMING 4       // (in mm) Raise Z axis before homing (G28) for Z probe clearance.
500
-                                        // Be sure you have this distance over your Z_MAX_POS in case.
586
+  //
587
+  // In the following example the X and Y offsets are both positive:
588
+  // #define X_PROBE_OFFSET_FROM_EXTRUDER 10
589
+  // #define Y_PROBE_OFFSET_FROM_EXTRUDER 10
590
+  //
591
+  //    +-- BACK ---+
592
+  //    |           |
593
+  //  L |    (+) P  | R <-- probe (20,20)
594
+  //  E |           | I
595
+  //  F | (-) N (+) | G <-- nozzle (10,10)
596
+  //  T |           | H
597
+  //    |    (-)    | T
598
+  //    |           |
599
+  //    O-- FRONT --+
600
+  //  (0,0)
601
+  #define X_PROBE_OFFSET_FROM_EXTRUDER -25     // X offset: -left  [of the nozzle] +right
602
+  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29     // Y offset: -front [of the nozzle] +behind
603
+  #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35  // Z offset: -below [the nozzle] (always negative!)
501 604
 
502 605
   #define XY_TRAVEL_SPEED 8000         // X and Y axis travel speed between probes, in mm/min.
503 606
 
@@ -505,16 +608,29 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
505 608
   #define Z_RAISE_BETWEEN_PROBINGS 5  // How much the Z axis will be raised when traveling from between next probing points.
506 609
   #define Z_RAISE_AFTER_PROBING 15    // How much the Z axis will be raised after the last probing point.
507 610
 
508
-//#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" // These commands will be executed in the end of G29 routine.
509
-                                                                            // Useful to retract a deployable Z probe.
611
+  //#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" // These commands will be executed in the end of G29 routine.
612
+                                                                             // Useful to retract a deployable Z probe.
613
+
614
+  // Probes are sensors/switches that need to be activated before they can be used
615
+  // and deactivated after the use.
616
+  // Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, ... . You have to activate one of these for the AUTO_BED_LEVELING_FEATURE
617
+
618
+  // A fix mounted probe, like the normal inductive probe, must be deactivated to go below Z_PROBE_OFFSET_FROM_EXTRUDER
619
+  // when the hardware endstops are active.
620
+  //#define FIX_MOUNTED_PROBE
510 621
 
511
-  //#define Z_PROBE_SLED // Turn on if you have a Z probe mounted on a sled like those designed by Charles Bell.
622
+  // A Servo Probe can be defined in the servo section below.
623
+
624
+  // An Allen Key Probe is currently predefined only in the delta example configurations.
625
+
626
+  //#define Z_PROBE_SLED // Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
512 627
   //#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
513 628
 
514
-// If you have enabled the bed auto leveling and are using the same Z probe for Z homing,
515
-// it is highly recommended you let this Z_SAFE_HOMING enabled!!!
629
+  // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing,
630
+  // it is highly recommended you leave Z_SAFE_HOMING enabled!
516 631
 
517
-  #define Z_SAFE_HOMING   // This feature is meant to avoid Z homing with Z probe outside the bed area.
632
+  #define Z_SAFE_HOMING   // Use the z-min-probe for homing to z-min - not the z-min-endstop.
633
+                          // This feature is meant to avoid Z homing with Z probe outside the bed area.
518 634
                           // When defined, it will:
519 635
                           // - Allow Z homing only after X and Y homing AND stepper drivers still enabled.
520 636
                           // - If stepper drivers timeout, it will need X and Y homing again before Z homing.
@@ -528,37 +644,6 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
528 644
 
529 645
   #endif
530 646
 
531
-  // Support for a dedicated Z probe endstop separate from the Z min endstop.
532
-  // If you would like to use both a Z probe and a Z min endstop together,
533
-  // uncomment #define Z_MIN_PROBE_ENDSTOP and read the instructions below.
534
-  // If you still want to use the Z min endstop for homing, disable Z_SAFE_HOMING above.
535
-  // Example: To park the head outside the bed area when homing with G28.
536
-  //
537
-  // WARNING:
538
-  // The Z min endstop will need to set properly as it would without a Z probe
539
-  // to prevent head crashes and premature stopping during a print.
540
-  //
541
-  // To use a separate Z probe endstop, you must have a Z_MIN_PROBE_PIN
542
-  // defined in the pins_XXXXX.h file for your control board.
543
-  // If you are using a servo based Z probe, you will need to enable NUM_SERVOS,
544
-  // Z_ENDSTOP_SERVO_NR and SERVO_ENDSTOP_ANGLES in the R/C SERVO support below.
545
-  // RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin
546
-  // in the Aux 4 section of the RAMPS board. Use 5V for powered sensors,
547
-  // otherwise connect to ground and D32 for normally closed configuration
548
-  // and 5V and D32 for normally open configurations.
549
-  // Normally closed configuration is advised and assumed.
550
-  // The D32 pin in Aux 4 on RAMPS maps to the Arduino D32 pin.
551
-  // Z_MIN_PROBE_PIN is setting the pin to use on the Arduino.
552
-  // Since the D32 pin on the RAMPS maps to D32 on Arduino, this works.
553
-  // D32 is currently selected in the RAMPS 1.3/1.4 pin file.
554
-  // All other boards will need changes to the respective pins_XXXXX.h file.
555
-  //
556
-  // WARNING:
557
-  // Setting the wrong pin may have unexpected and potentially disastrous outcomes.
558
-  // Use with caution and do your homework.
559
-  //
560
-  //#define Z_MIN_PROBE_ENDSTOP
561
-
562 647
 #endif // AUTO_BED_LEVELING_FEATURE
563 648
 
564 649
 
@@ -633,6 +718,14 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
633 718
 #endif
634 719
 
635 720
 //
721
+// Host Keepalive
722
+//
723
+// By default Marlin will send a busy status message to the host
724
+// every 10 seconds when it can't accept commands.
725
+//
726
+//#define DISABLE_HOST_KEEPALIVE // Enable this option if your host doesn't like keepalive messages.
727
+
728
+//
636 729
 // M100 Free Memory Watcher
637 730
 //
638 731
 //#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
@@ -652,13 +745,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
652 745
 // @section lcd
653 746
 
654 747
 // Define your display language below. Replace (en) with your language code and uncomment.
655
-// en, pl, fr, de, es, ru, bg, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, cn, test
748
+// en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8, fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test
656 749
 // See also language.h
657 750
 #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
658 751
 
659 752
 // Choose ONE of these 3 charsets. This has to match your hardware. Ignored for full graphic display.
660 753
 // To find out what type you have - compile with (test) - upload - click to get the menu. You'll see two typical lines from the upper half of the charset.
661
-// See also documentation/LCDLanguageFont.md
754
+// See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
662 755
   #define DISPLAY_CHARSET_HD44780_JAPAN        // this is the most common hardware
663 756
   //#define DISPLAY_CHARSET_HD44780_WESTERN
664 757
   //#define DISPLAY_CHARSET_HD44780_CYRILLIC
@@ -666,11 +759,12 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
666 759
 //#define ULTRA_LCD  //general LCD support, also 16x2
667 760
 //#define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
668 761
 #define SDSUPPORT // Enable SD Card Support in Hardware Console
669
-#define SDSLOW // Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
670
-//#define SDEXTRASLOW // Use even slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
762
+                  // Changed behaviour! If you need SDSUPPORT uncomment it!
763
+#define SPI_SPEED SPI_HALF_SPEED // (also SPI_QUARTER_SPEED, SPI_EIGHTH_SPEED) Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
671 764
 //#define SD_CHECK_AND_RETRY // Use CRC checks and retries on the SD communication
672 765
 //#define ENCODER_PULSES_PER_STEP 1 // Increase if you have a high resolution encoder
673 766
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
767
+//#define REVERSE_MENU_DIRECTION // When enabled CLOCKWISE moves UP in the LCD menu
674 768
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
675 769
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
676 770
 //#define SPEAKER // The sound device is a speaker - not a buzzer. A buzzer resonates with his own frequency.
@@ -687,13 +781,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
687 781
 
688 782
 // The Panucatt Devices Viki 2.0 and mini Viki with Graphic LCD
689 783
 // http://panucatt.com
690
-// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
784
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
691 785
 //#define VIKI2
692 786
 //#define miniVIKI
693 787
 
694 788
 // This is a new controller currently under development.  https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
695 789
 //
696
-// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
790
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
697 791
 #define ELB_FULL_GRAPHIC_CONTROLLER
698 792
 //#define SD_DETECT_INVERTED
699 793
 
@@ -708,7 +802,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
708 802
 // The RepRapDiscount FULL GRAPHIC Smart Controller (quadratic white PCB)
709 803
 // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
710 804
 //
711
-// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
805
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
712 806
 //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
713 807
 
714 808
 // The RepRapWorld REPRAPWORLD_KEYPAD v1.1
@@ -731,6 +825,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
731 825
 
732 826
 //#define LCD_I2C_SAINSMART_YWROBOT
733 827
 
828
+//#define LCM1602 // LCM1602 Adapter for 16x2 LCD
829
+
734 830
 // PANELOLU2 LCD with status LEDs, separate encoder and click inputs
735 831
 //
736 832
 // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
@@ -744,7 +840,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
744 840
 //#define LCD_I2C_VIKI
745 841
 
746 842
 // SSD1306 OLED generic display support
747
-// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
843
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
748 844
 //#define U8GLIB_SSD1306
749 845
 
750 846
 // Shift register panels
@@ -756,7 +852,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
756 852
 
757 853
 // @section extras
758 854
 
759
-// Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
855
+// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino
760 856
 //#define FAST_PWM_FAN
761 857
 
762 858
 // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
@@ -836,21 +932,23 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
836 932
  * Note may require analog pins to be defined for different motherboards
837 933
  **********************************************************************/
838 934
 // Uncomment below to enable
839
-//#define FILAMENT_SENSOR
840
-
841
-#define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
842
-#define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
935
+//#define FILAMENT_WIDTH_SENSOR
843 936
 
844 937
 #define DEFAULT_NOMINAL_FILAMENT_DIA 3.00  //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software.  Used for sensor reading validation
845
-#define MEASURED_UPPER_LIMIT         3.30  //upper limit factor used for sensor reading validation in mm
846
-#define MEASURED_LOWER_LIMIT         1.90  //lower limit factor for sensor reading validation in mm
847
-#define MAX_MEASUREMENT_DELAY       20     //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM  and lower number saves RAM)
848 938
 
849
-//defines used in the code
850
-#define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially
939
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
940
+  #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
941
+  #define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
942
+
943
+  #define MEASURED_UPPER_LIMIT         3.30  //upper limit factor used for sensor reading validation in mm
944
+  #define MEASURED_LOWER_LIMIT         1.90  //lower limit factor for sensor reading validation in mm
945
+  #define MAX_MEASUREMENT_DELAY       20     //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM  and lower number saves RAM)
851 946
 
852
-//When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status.  Status will appear for 5 sec.
853
-//#define FILAMENT_LCD_DISPLAY
947
+  #define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially
948
+
949
+  //When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status.  Status will appear for 5 sec.
950
+  //#define FILAMENT_LCD_DISPLAY
951
+#endif
854 952
 
855 953
 #include "Configuration_adv.h"
856 954
 #include "thermistortables.h"

+ 223
- 121
Marlin/example_configurations/delta/biv2.5/Configuration.h View File

@@ -1,3 +1,40 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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
+/**
24
+ * Configuration.h
25
+ *
26
+ * Basic settings such as:
27
+ *
28
+ * - Type of electronics
29
+ * - Type of temperature sensor
30
+ * - Printer geometry
31
+ * - Endstop configuration
32
+ * - LCD controller
33
+ * - Extra features
34
+ *
35
+ * Advanced settings can be found in Configuration_adv.h
36
+ *
37
+ */
1 38
 #ifndef CONFIGURATION_H
2 39
 #define CONFIGURATION_H
3 40
 
@@ -7,8 +44,10 @@
7 44
 //===========================================================================
8 45
 //============================= Getting Started =============================
9 46
 //===========================================================================
10
-/*
11
-Here are some standard links for getting your machine calibrated:
47
+
48
+/**
49
+ * Here are some standard links for getting your machine calibrated:
50
+ *
12 51
  * http://reprap.org/wiki/Calibration
13 52
  * http://youtu.be/wAL9d7FgInk
14 53
  * http://calculator.josefprusa.cz
@@ -16,11 +55,7 @@ Here are some standard links for getting your machine calibrated:
16 55
  * http://www.thingiverse.com/thing:5573
17 56
  * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap
18 57
  * http://www.thingiverse.com/thing:298812
19
-*/
20
-
21
-// This configuration file contains the basic settings.
22
-// Advanced settings can be found in Configuration_adv.h
23
-// BASIC SETTINGS: select your board type, temperature sensor type, axis scaling, and endstop configuration
58
+ */
24 59
 
25 60
 //===========================================================================
26 61
 //============================= DELTA Printer ===============================
@@ -110,6 +145,7 @@ Here are some standard links for getting your machine calibrated:
110 145
 //--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table
111 146
 //
112 147
 //// Temperature sensor settings:
148
+// -3 is thermocouple with MAX31855 (only for sensor 0)
113 149
 // -2 is thermocouple with MAX6675 (only for sensor 0)
114 150
 // -1 is thermocouple with AD595
115 151
 // 0 is not used
@@ -129,6 +165,7 @@ Here are some standard links for getting your machine calibrated:
129 165
 // 13 is 100k Hisens 3950  1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
130 166
 // 20 is the PT100 circuit found in the Ultimainboard V2.x
131 167
 // 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
168
+// 70 is the 100K thermistor found in the bq Hephestos 2
132 169
 //
133 170
 //    1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k
134 171
 //                          (but gives greater accuracy and more stable PID)
@@ -144,7 +181,7 @@ Here are some standard links for getting your machine calibrated:
144 181
 //     Use it for Testing or Development purposes. NEVER for production machine.
145 182
 //#define DUMMY_THERMISTOR_998_VALUE 25
146 183
 //#define DUMMY_THERMISTOR_999_VALUE 100
147
-// :{ '0': "Not used", '4': "10k !! do not use for a hotend. Bad resolution at high temp. !!", '1': "100k / 4.7k - EPCOS", '51': "100k / 1k - EPCOS", '6': "100k / 4.7k EPCOS - Not as accurate as Table 1", '5': "100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '7': "100k / 4.7k Honeywell 135-104LAG-J01", '71': "100k / 4.7k Honeywell 135-104LAF-J01", '8': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9': "100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10': "100k / 4.7k RS 198-961", '11': "100k / 4.7k beta 3950 1%", '12': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13': "100k Hisens 3950  1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '60': "100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '55': "100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '2': "200k / 4.7k - ATC Semitec 204GT-2", '52': "200k / 1k - ATC Semitec 204GT-2", '-2': "Thermocouple + MAX6675 (only for sensor 0)", '-1': "Thermocouple + AD595", '3': "Mendel-parts / 4.7k", '1047': "Pt1000 / 4.7k", '1010': "Pt1000 / 1k (non standard)", '20': "PT100 (Ultimainboard V2.x)", '147': "Pt100 / 4.7k", '110': "Pt100 / 1k (non-standard)", '998': "Dummy 1", '999': "Dummy 2" }
184
+// :{ '0': "Not used", '4': "10k !! do not use for a hotend. Bad resolution at high temp. !!", '1': "100k / 4.7k - EPCOS", '51': "100k / 1k - EPCOS", '6': "100k / 4.7k EPCOS - Not as accurate as Table 1", '5': "100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '7': "100k / 4.7k Honeywell 135-104LAG-J01", '71': "100k / 4.7k Honeywell 135-104LAF-J01", '8': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9': "100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10': "100k / 4.7k RS 198-961", '11': "100k / 4.7k beta 3950 1%", '12': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13': "100k Hisens 3950  1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '60': "100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '55': "100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '2': "200k / 4.7k - ATC Semitec 204GT-2", '52': "200k / 1k - ATC Semitec 204GT-2", '-3': "Thermocouple + MAX31855 (only for sensor 0)", '-2': "Thermocouple + MAX6675 (only for sensor 0)", '-1': "Thermocouple + AD595", '3': "Mendel-parts / 4.7k", '1047': "Pt1000 / 4.7k", '1010': "Pt1000 / 1k (non standard)", '20': "PT100 (Ultimainboard V2.x)", '147': "Pt100 / 4.7k", '110': "Pt100 / 1k (non-standard)", '998': "Dummy 1", '999': "Dummy 2" }
148 185
 #define TEMP_SENSOR_0 5
149 186
 #define TEMP_SENSOR_1 5
150 187
 #define TEMP_SENSOR_2 0
@@ -178,14 +215,9 @@ Here are some standard links for getting your machine calibrated:
178 215
 #define HEATER_3_MAXTEMP 275
179 216
 #define BED_MAXTEMP 150
180 217
 
181
-// If your bed has low resistance e.g. .6 ohm and throws the fuse you can duty cycle it to reduce the
182
-// average current. The value should be an integer and the heat bed will be turned on for 1 interval of
183
-// HEATER_BED_DUTY_CYCLE_DIVIDER intervals.
184
-//#define HEATER_BED_DUTY_CYCLE_DIVIDER 4
185
-
186 218
 // If you want the M105 heater power reported in watts, define the BED_WATTS, and (shared for all extruders) EXTRUDER_WATTS
187
-//#define EXTRUDER_WATTS (12.0*12.0/6.7) //  P=I^2/R
188
-//#define BED_WATTS (12.0*12.0/1.1)      // P=I^2/R
219
+//#define EXTRUDER_WATTS (12.0*12.0/6.7) // P=U^2/R
220
+//#define BED_WATTS (12.0*12.0/1.1)      // P=U^2/R
189 221
 
190 222
 //===========================================================================
191 223
 //============================= PID Settings ================================
@@ -197,6 +229,7 @@ Here are some standard links for getting your machine calibrated:
197 229
 #define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
198 230
 #define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
199 231
 #if ENABLED(PIDTEMP)
232
+  //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
200 233
   //#define PID_DEBUG // Sends debug data to the serial port.
201 234
   //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
202 235
   //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -247,19 +280,19 @@ Here are some standard links for getting your machine calibrated:
247 280
 // so you shouldn't use it unless you are OK with PWM on your bed.  (see the comment on enabling PIDTEMPBED)
248 281
 #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
249 282
 
250
-//#define PID_BED_DEBUG // Sends debug data to the serial port.
251
-
252 283
 #if ENABLED(PIDTEMPBED)
253 284
 
285
+  //#define PID_BED_DEBUG // Sends debug data to the serial port.
286
+
254 287
   #define PID_BED_INTEGRAL_DRIVE_MAX MAX_BED_POWER //limit for the integral term
255 288
 
256
-  //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
289
+  //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
257 290
   //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
258 291
   #define  DEFAULT_bedKp 10.00
259 292
   #define  DEFAULT_bedKi .023
260 293
   #define  DEFAULT_bedKd 305.4
261 294
 
262
-  //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
295
+  //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
263 296
   //from pidautotune
264 297
   //#define  DEFAULT_bedKp 97.1
265 298
   //#define  DEFAULT_bedKi 1.41
@@ -284,16 +317,15 @@ Here are some standard links for getting your machine calibrated:
284 317
 //===========================================================================
285 318
 
286 319
 /**
287
- * Thermal Runaway Protection protects your printer from damage and fire if a
320
+ * Thermal Protection protects your printer from damage and fire if a
288 321
  * thermistor falls out or temperature sensors fail in any way.
289 322
  *
290 323
  * The issue: If a thermistor falls out or a temperature sensor fails,
291 324
  * Marlin can no longer sense the actual temperature. Since a disconnected
292 325
  * thermistor reads as a low temperature, the firmware will keep the heater on.
293 326
  *
294
- * The solution: Once the temperature reaches the target, start observing.
295
- * If the temperature stays too far below the target (hysteresis) for too long,
296
- * the firmware will halt as a safety precaution.
327
+ * If you get "Thermal Runaway" or "Heating failed" errors the
328
+ * details can be tuned in Configuration_adv.h
297 329
  */
298 330
 
299 331
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
@@ -349,8 +381,22 @@ Here are some standard links for getting your machine calibrated:
349 381
 // Enable this option for Toshiba steppers
350 382
 //#define CONFIG_STEPPERS_TOSHIBA
351 383
 
384
+//===========================================================================
385
+//============================== Endstop Settings ===========================
386
+//===========================================================================
387
+
352 388
 // @section homing
353 389
 
390
+// Specify here all the endstop connectors that are connected to any endstop or probe.
391
+// Almost all printers will be using one per axis. Probes will use one or more of the
392
+// extra connectors. Leave undefined any used for non-endstop and non-probe purposes.
393
+//#define USE_XMIN_PLUG
394
+//#define USE_YMIN_PLUG
395
+//#define USE_ZMIN_PLUG
396
+#define USE_XMAX_PLUG
397
+#define USE_YMAX_PLUG
398
+#define USE_ZMAX_PLUG
399
+
354 400
 // coarse Endstop Settings
355 401
 #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
356 402
 
@@ -373,13 +419,53 @@ const bool X_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
373 419
 const bool Y_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
374 420
 const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
375 421
 const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
376
-//#define DISABLE_MAX_ENDSTOPS
377
-#define DISABLE_MIN_ENDSTOPS // Deltas only use min endstops for probing.
378 422
 
379
-// If you want to enable the Z probe pin, but disable its use, uncomment the line below.
380
-// This only affects a Z probe endstop if you have separate Z min endstop as well and have
381
-// activated Z_MIN_PROBE_ENDSTOP below. If you are using the Z Min endstop on your Z probe,
382
-// this has no effect.
423
+//===========================================================================
424
+//============================= Z Probe Options =============================
425
+//===========================================================================
426
+
427
+// Enable Z_MIN_PROBE_ENDSTOP to use _both_ a Z Probe and a Z-min-endstop on the same machine.
428
+// With this option the Z_MIN_PROBE_PIN will only be used for probing, never for homing.
429
+//
430
+// *** PLEASE READ ALL INSTRUCTIONS BELOW FOR SAFETY! ***
431
+//
432
+// To continue using the Z-min-endstop for homing, be sure to disable Z_SAFE_HOMING.
433
+// Example: To park the head outside the bed area when homing with G28.
434
+//
435
+// To use a separate Z probe, your board must define a Z_MIN_PROBE_PIN.
436
+//
437
+// For a servo-based Z probe, you must set up servo support below, including
438
+// NUM_SERVOS, Z_ENDSTOP_SERVO_NR and SERVO_ENDSTOP_ANGLES.
439
+//
440
+// - RAMPS 1.3/1.4 boards may be able to use the 5V, GND, and Aux4->D32 pin.
441
+// - Use 5V for powered (usu. inductive) sensors.
442
+// - Otherwise connect:
443
+//   - normally-closed switches to GND and D32.
444
+//   - normally-open switches to 5V and D32.
445
+//
446
+// Normally-closed switches are advised and are the default.
447
+//
448
+// The Z_MIN_PROBE_PIN sets the Arduino pin to use. (See your board's pins file.)
449
+// Since the RAMPS Aux4->D32 pin maps directly to the Arduino D32 pin, D32 is the
450
+// default pin for all RAMPS-based boards. Some other boards map differently.
451
+// To set or change the pin for your board, edit the appropriate pins_XXXXX.h file.
452
+//
453
+// WARNING:
454
+// Setting the wrong pin may have unexpected and potentially disastrous consequences.
455
+// Use with caution and do your homework.
456
+//
457
+//#define Z_MIN_PROBE_ENDSTOP
458
+
459
+// Enable Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN to use the Z_MIN_PIN for your Z_MIN_PROBE.
460
+// The Z_MIN_PIN will then be used for both Z-homing and probing.
461
+#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
462
+
463
+// To use a probe you must enable one of the two options above!
464
+
465
+// This option disables the use of the Z_MIN_PROBE_PIN
466
+// To enable the Z probe pin but disable its use, uncomment the line below. This only affects a
467
+// Z probe switch if you have a separate Z min endstop also and have activated Z_MIN_PROBE_ENDSTOP above.
468
+// If you're using the Z MIN endstop connector for your Z probe, this has no effect.
383 469
 //#define DISABLE_Z_MIN_PROBE_ENDSTOP
384 470
 
385 471
 // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
@@ -389,11 +475,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
389 475
 #define Z_ENABLE_ON 0
390 476
 #define E_ENABLE_ON 0 // For all extruders
391 477
 
392
-// Disables axis when it's not being used.
478
+// Disables axis stepper immediately when it's not being used.
393 479
 // WARNING: When motors turn off there is a chance of losing position accuracy!
394 480
 #define DISABLE_X false
395 481
 #define DISABLE_Y false
396 482
 #define DISABLE_Z false
483
+// Warn on display about possibly reduced accuracy
484
+//#define DISABLE_REDUCED_ACCURACY_WARNING
397 485
 
398 486
 // @section extruder
399 487
 
@@ -416,6 +504,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
416 504
 #define INVERT_E3_DIR false
417 505
 
418 506
 // @section homing
507
+//#define MIN_Z_HEIGHT_FOR_HOMING 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
508
+                                    // Be sure you have this distance over your Z_MAX_POS in case.
419 509
 
420 510
 // ENDSTOP SETTINGS:
421 511
 // Sets direction of endstops when homing; 1=MAX, -1=MIN
@@ -451,24 +541,26 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
451 541
 #endif
452 542
 
453 543
 //===========================================================================
454
-//=========================== Manual Bed Leveling ===========================
544
+//============================ Mesh Bed Leveling ============================
455 545
 //===========================================================================
456 546
 
457
-//#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
458 547
 //#define MESH_BED_LEVELING    // Enable mesh bed leveling.
459 548
 
460
-#if ENABLED(MANUAL_BED_LEVELING)
461
-  #define MBL_Z_STEP 0.025  // Step size while manually probing Z axis.
462
-#endif  // MANUAL_BED_LEVELING
463
-
464 549
 #if ENABLED(MESH_BED_LEVELING)
465 550
   #define MESH_MIN_X 10
466
-  #define MESH_MAX_X (X_MAX_POS - MESH_MIN_X)
551
+  #define MESH_MAX_X (X_MAX_POS - (MESH_MIN_X))
467 552
   #define MESH_MIN_Y 10
468
-  #define MESH_MAX_Y (Y_MAX_POS - MESH_MIN_Y)
553
+  #define MESH_MAX_Y (Y_MAX_POS - (MESH_MIN_Y))
469 554
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
470 555
   #define MESH_NUM_Y_POINTS 3
471 556
   #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0.
557
+
558
+  //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
559
+
560
+  #if ENABLED(MANUAL_BED_LEVELING)
561
+    #define MBL_Z_STEP 0.025  // Step size while manually probing Z axis.
562
+  #endif  // MANUAL_BED_LEVELING
563
+
472 564
 #endif  // MESH_BED_LEVELING
473 565
 
474 566
 //===========================================================================
@@ -479,7 +571,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
479 571
 
480 572
 //#define AUTO_BED_LEVELING_FEATURE // Delete the comment to enable (remove // at the start of the line)
481 573
 //#define DEBUG_LEVELING_FEATURE
482
-//#define Z_MIN_PROBE_REPEATABILITY_TEST  // If not commented out, Z-Probe Repeatability test will be included if Auto Bed Leveling is Enabled.
574
+//#define Z_MIN_PROBE_REPEATABILITY_TEST  // If not commented out, Z Probe Repeatability test will be included if Auto Bed Leveling is Enabled.
483 575
 
484 576
 #if ENABLED(AUTO_BED_LEVELING_FEATURE)
485 577
 
@@ -491,7 +583,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
491 583
   //   This mode is preferred because there are more measurements.
492 584
   //
493 585
   // - "3-point" mode
494
-  //   Probe 3 arbitrary points on the bed (that aren't colinear)
586
+  //   Probe 3 arbitrary points on the bed (that aren't collinear)
495 587
   //   You specify the XY coordinates of all 3 points.
496 588
 
497 589
   // Enable this to sample the bed in a grid (least squares solution).
@@ -501,41 +593,53 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
501 593
   #if ENABLED(AUTO_BED_LEVELING_GRID)
502 594
 
503 595
     // Set the rectangle in which to probe.
504
-    #define DELTA_PROBABLE_RADIUS (DELTA_PRINTABLE_RADIUS - 10)
505
-    #define LEFT_PROBE_BED_POSITION -DELTA_PROBABLE_RADIUS
506
-    #define RIGHT_PROBE_BED_POSITION DELTA_PROBABLE_RADIUS
507
-    #define FRONT_PROBE_BED_POSITION -DELTA_PROBABLE_RADIUS
508
-    #define BACK_PROBE_BED_POSITION DELTA_PROBABLE_RADIUS
596
+    #define DELTA_PROBEABLE_RADIUS (DELTA_PRINTABLE_RADIUS - 10)
597
+    #define LEFT_PROBE_BED_POSITION -DELTA_PROBEABLE_RADIUS
598
+    #define RIGHT_PROBE_BED_POSITION DELTA_PROBEABLE_RADIUS
599
+    #define FRONT_PROBE_BED_POSITION -DELTA_PROBEABLE_RADIUS
600
+    #define BACK_PROBE_BED_POSITION DELTA_PROBEABLE_RADIUS
509 601
 
510
-    #define MIN_PROBE_EDGE 10 // The Z probe square sides can be no smaller than this.
602
+    #define MIN_PROBE_EDGE 10 // The Z probe minimum square sides can be no smaller than this.
511 603
 
512 604
     // Non-linear bed leveling will be used.
513 605
     // Compensate by interpolating between the nearest four Z probe values for each point.
514 606
     // Useful for deltas where the print surface may appear like a bowl or dome shape.
515
-    // Works best with ACCURATE_BED_LEVELING_POINTS 5 or higher.
607
+    // Works best with AUTO_BED_LEVELING_GRID_POINTS 5 or higher.
516 608
     #define AUTO_BED_LEVELING_GRID_POINTS 9
517 609
 
518 610
   #else  // !AUTO_BED_LEVELING_GRID
519 611
 
520
-      // Arbitrary points to probe.
521
-      // A simple cross-product is used to estimate the plane of the bed.
522
-      #define ABL_PROBE_PT_1_X 15
523
-      #define ABL_PROBE_PT_1_Y 180
524
-      #define ABL_PROBE_PT_2_X 15
525
-      #define ABL_PROBE_PT_2_Y 20
526
-      #define ABL_PROBE_PT_3_X 170
527
-      #define ABL_PROBE_PT_3_Y 20
612
+    // Arbitrary points to probe.
613
+    // A simple cross-product is used to estimate the plane of the bed.
614
+    #define ABL_PROBE_PT_1_X 15
615
+    #define ABL_PROBE_PT_1_Y 180
616
+    #define ABL_PROBE_PT_2_X 15
617
+    #define ABL_PROBE_PT_2_Y 20
618
+    #define ABL_PROBE_PT_3_X 170
619
+    #define ABL_PROBE_PT_3_Y 20
528 620
 
529 621
   #endif // AUTO_BED_LEVELING_GRID
530 622
 
531
-  // Offsets to the Z probe relative to the nozzle tip.
623
+  // Z Probe to nozzle (X,Y) offset, relative to (0, 0).
532 624
   // X and Y offsets must be integers.
533
-  #define X_PROBE_OFFSET_FROM_EXTRUDER 0     // Z probe to nozzle X offset: -left  +right
534
-  #define Y_PROBE_OFFSET_FROM_EXTRUDER -10   // Z probe to nozzle Y offset: -front +behind
535
-  #define Z_PROBE_OFFSET_FROM_EXTRUDER -3.5  // Z probe to nozzle Z offset: -below (always!)
536
-
537
-  #define Z_RAISE_BEFORE_HOMING 4       // (in mm) Raise Z axis before homing (G28) for Z probe clearance.
538
-                                        // Be sure you have this distance over your Z_MAX_POS in case.
625
+  //
626
+  // In the following example the X and Y offsets are both positive:
627
+  // #define X_PROBE_OFFSET_FROM_EXTRUDER 10
628
+  // #define Y_PROBE_OFFSET_FROM_EXTRUDER 10
629
+  //
630
+  //    +-- BACK ---+
631
+  //    |           |
632
+  //  L |    (+) P  | R <-- probe (20,20)
633
+  //  E |           | I
634
+  //  F | (-) N (+) | G <-- nozzle (10,10)
635
+  //  T |           | H
636
+  //    |    (-)    | T
637
+  //    |           |
638
+  //    O-- FRONT --+
639
+  //  (0,0)
640
+  #define X_PROBE_OFFSET_FROM_EXTRUDER 0     // X offset: -left  [of the nozzle] +right
641
+  #define Y_PROBE_OFFSET_FROM_EXTRUDER -10   // Y offset: -front [of the nozzle] +behind
642
+  #define Z_PROBE_OFFSET_FROM_EXTRUDER -3.5  // Z offset: -below [the nozzle] (always negative!)
539 643
 
540 644
   #define XY_TRAVEL_SPEED 4000         // X and Y axis travel speed between probes, in mm/min.
541 645
 
@@ -543,10 +647,22 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
543 647
   #define Z_RAISE_BETWEEN_PROBINGS 5  // How much the Z axis will be raised when traveling from between next probing points.
544 648
   #define Z_RAISE_AFTER_PROBING 50    // How much the Z axis will be raised after the last probing point.
545 649
 
546
-//#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" // These commands will be executed in the end of G29 routine.
547
-                                                                            // Useful to retract a deployable Z probe.
650
+  //#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" // These commands will be executed in the end of G29 routine.
651
+                                                                             // Useful to retract a deployable Z probe.
652
+
653
+  // Probes are sensors/switches that need to be activated before they can be used
654
+  // and deactivated after the use.
655
+  // Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, ... . You have to activate one of these for the AUTO_BED_LEVELING_FEATURE
548 656
 
549
-  //#define Z_PROBE_SLED // Turn on if you have a Z probe mounted on a sled like those designed by Charles Bell.
657
+  // A fix mounted probe, like the normal inductive probe, must be deactivated to go below Z_PROBE_OFFSET_FROM_EXTRUDER
658
+  // when the hardware endstops are active.
659
+  //#define FIX_MOUNTED_PROBE
660
+
661
+  // A Servo Probe can be defined in the servo section below.
662
+
663
+  // An Allen Key Probe is currently predefined only in the delta example configurations.
664
+
665
+  //#define Z_PROBE_SLED // Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
550 666
   //#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
551 667
 
552 668
   // Allen key retractable Z probe as seen on many Kossel delta printers - http://reprap.org/wiki/Kossel#Automatic_bed_leveling_probe
@@ -630,10 +746,11 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
630 746
     #define Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE HOMING_FEEDRATE_XYZ
631 747
   #endif
632 748
 
633
-// If you have enabled the bed auto leveling and are using the same Z probe for Z homing,
634
-// it is highly recommended you let this Z_SAFE_HOMING enabled!!!
749
+  // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing,
750
+  // it is highly recommended you leave Z_SAFE_HOMING enabled!
635 751
 
636
-  #define Z_SAFE_HOMING   // This feature is meant to avoid Z homing with Z probe outside the bed area.
752
+  #define Z_SAFE_HOMING   // Use the z-min-probe for homing to z-min - not the z-min-endstop.
753
+                          // This feature is meant to avoid Z homing with Z probe outside the bed area.
637 754
                           // When defined, it will:
638 755
                           // - Allow Z homing only after X and Y homing AND stepper drivers still enabled.
639 756
                           // - If stepper drivers timeout, it will need X and Y homing again before Z homing.
@@ -647,37 +764,6 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
647 764
 
648 765
   #endif
649 766
 
650
-  // Support for a dedicated Z probe endstop separate from the Z min endstop.
651
-  // If you would like to use both a Z probe and a Z min endstop together,
652
-  // uncomment #define Z_MIN_PROBE_ENDSTOP and read the instructions below.
653
-  // If you still want to use the Z min endstop for homing, disable Z_SAFE_HOMING above.
654
-  // Example: To park the head outside the bed area when homing with G28.
655
-  //
656
-  // WARNING:
657
-  // The Z min endstop will need to set properly as it would without a Z probe
658
-  // to prevent head crashes and premature stopping during a print.
659
-  //
660
-  // To use a separate Z probe endstop, you must have a Z_MIN_PROBE_PIN
661
-  // defined in the pins_XXXXX.h file for your control board.
662
-  // If you are using a servo based Z probe, you will need to enable NUM_SERVOS,
663
-  // Z_ENDSTOP_SERVO_NR and SERVO_ENDSTOP_ANGLES in the R/C SERVO support below.
664
-  // RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin
665
-  // in the Aux 4 section of the RAMPS board. Use 5V for powered sensors,
666
-  // otherwise connect to ground and D32 for normally closed configuration
667
-  // and 5V and D32 for normally open configurations.
668
-  // Normally closed configuration is advised and assumed.
669
-  // The D32 pin in Aux 4 on RAMPS maps to the Arduino D32 pin.
670
-  // Z_MIN_PROBE_PIN is setting the pin to use on the Arduino.
671
-  // Since the D32 pin on the RAMPS maps to D32 on Arduino, this works.
672
-  // D32 is currently selected in the RAMPS 1.3/1.4 pin file.
673
-  // All other boards will need changes to the respective pins_XXXXX.h file.
674
-  //
675
-  // WARNING:
676
-  // Setting the wrong pin may have unexpected and potentially disastrous outcomes.
677
-  // Use with caution and do your homework.
678
-  //
679
-  //#define Z_MIN_PROBE_ENDSTOP
680
-
681 767
 #endif // AUTO_BED_LEVELING_FEATURE
682 768
 
683 769
 
@@ -710,7 +796,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
710 796
 // delta speeds must be the same on xyz
711 797
 #define DEFAULT_AXIS_STEPS_PER_UNIT   {72.9, 72.9, 72.9, 291}  // default steps per unit for BI v2.5 (cable drive)
712 798
 #define DEFAULT_MAX_FEEDRATE          {500, 500, 500, 150}    // (mm/sec)
713
-#define DEFAULT_MAX_ACCELERATION      {9000,9000,9000,10000}    // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for skeinforge 40+, for older versions raise them a lot.
799
+#define DEFAULT_MAX_ACCELERATION      {9000,9000,9000,10000}    // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for Skeinforge 40+, for older versions raise them a lot.
714 800
 
715 801
 #define DEFAULT_ACCELERATION          3000    // X, Y, Z and E acceleration in mm/s^2 for printing moves
716 802
 #define DEFAULT_RETRACT_ACCELERATION  3000    // E acceleration in mm/s^2 for retracts
@@ -754,6 +840,14 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
754 840
 #endif
755 841
 
756 842
 //
843
+// Host Keepalive
844
+//
845
+// By default Marlin will send a busy status message to the host
846
+// every 10 seconds when it can't accept commands.
847
+//
848
+//#define DISABLE_HOST_KEEPALIVE // Enable this option if your host doesn't like keepalive messages.
849
+
850
+//
757 851
 // M100 Free Memory Watcher
758 852
 //
759 853
 //#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
@@ -773,13 +867,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
773 867
 // @section lcd
774 868
 
775 869
 // Define your display language below. Replace (en) with your language code and uncomment.
776
-// en, pl, fr, de, es, ru, bg, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, cn, test
870
+// en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8, fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test
777 871
 // See also language.h
778 872
 #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
779 873
 
780 874
 // Choose ONE of these 3 charsets. This has to match your hardware. Ignored for full graphic display.
781 875
 // To find out what type you have - compile with (test) - upload - click to get the menu. You'll see two typical lines from the upper half of the charset.
782
-// See also documentation/LCDLanguageFont.md
876
+// See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
783 877
   #define DISPLAY_CHARSET_HD44780_JAPAN        // this is the most common hardware
784 878
   //#define DISPLAY_CHARSET_HD44780_WESTERN
785 879
   //#define DISPLAY_CHARSET_HD44780_CYRILLIC
@@ -787,12 +881,12 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
787 881
 //#define ULTRA_LCD  //general LCD support, also 16x2
788 882
 //#define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
789 883
 //#define SDSUPPORT // Enable SD Card Support in Hardware Console
790
-// Changed behaviour! If you need SDSUPPORT uncomment it!
791
-//#define SDSLOW // Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
792
-//#define SDEXTRASLOW // Use even slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
884
+                    // Changed behaviour! If you need SDSUPPORT uncomment it!
885
+//#define SPI_SPEED SPI_HALF_SPEED // (also SPI_QUARTER_SPEED, SPI_EIGHTH_SPEED) Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
793 886
 //#define SD_CHECK_AND_RETRY // Use CRC checks and retries on the SD communication
794 887
 //#define ENCODER_PULSES_PER_STEP 1 // Increase if you have a high resolution encoder
795 888
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
889
+//#define REVERSE_MENU_DIRECTION // When enabled CLOCKWISE moves UP in the LCD menu
796 890
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
797 891
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
798 892
 //#define SPEAKER // The sound device is a speaker - not a buzzer. A buzzer resonates with his own frequency.
@@ -809,13 +903,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
809 903
 
810 904
 // The Panucatt Devices Viki 2.0 and mini Viki with Graphic LCD
811 905
 // http://panucatt.com
812
-// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
906
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
813 907
 //#define VIKI2
814 908
 //#define miniVIKI
815 909
 
816 910
 // This is a new controller currently under development.  https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
817 911
 //
818
-// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
912
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
819 913
 //#define ELB_FULL_GRAPHIC_CONTROLLER
820 914
 //#define SD_DETECT_INVERTED
821 915
 
@@ -830,7 +924,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
830 924
 // The RepRapDiscount FULL GRAPHIC Smart Controller (quadratic white PCB)
831 925
 // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
832 926
 //
833
-// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
927
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
834 928
 #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
835 929
 
836 930
 // The RepRapWorld REPRAPWORLD_KEYPAD v1.1
@@ -843,6 +937,10 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
843 937
 // REMEMBER TO INSTALL LiquidCrystal_I2C.h in your ARDUINO library folder: https://github.com/kiyoshigawa/LiquidCrystal_I2C
844 938
 //#define RA_CONTROL_PANEL
845 939
 
940
+// The MakerLab Mini Panel with graphic controller and SD support
941
+// http://reprap.org/wiki/Mini_panel
942
+//#define MINIPANEL
943
+
846 944
 // Delta calibration menu
847 945
 // uncomment to add three points calibration menu option.
848 946
 // See http://minow.blogspot.com/index.html#4918805519571907051
@@ -856,6 +954,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
856 954
 
857 955
 //#define LCD_I2C_SAINSMART_YWROBOT
858 956
 
957
+//#define LCM1602 // LCM1602 Adapter for 16x2 LCD
958
+
859 959
 // PANELOLU2 LCD with status LEDs, separate encoder and click inputs
860 960
 //
861 961
 // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
@@ -869,7 +969,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
869 969
 //#define LCD_I2C_VIKI
870 970
 
871 971
 // SSD1306 OLED generic display support
872
-// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
972
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
873 973
 //#define U8GLIB_SSD1306
874 974
 
875 975
 // Shift register panels
@@ -881,7 +981,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
881 981
 
882 982
 // @section extras
883 983
 
884
-// Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
984
+// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino
885 985
 //#define FAST_PWM_FAN
886 986
 
887 987
 // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
@@ -961,21 +1061,23 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
961 1061
  * Note may require analog pins to be defined for different motherboards
962 1062
  **********************************************************************/
963 1063
 // Uncomment below to enable
964
-//#define FILAMENT_SENSOR
1064
+//#define FILAMENT_WIDTH_SENSOR
965 1065
 
966
-#define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
967
-#define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
1066
+#define DEFAULT_NOMINAL_FILAMENT_DIA 3.00  //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software.  Used for sensor reading validation
968 1067
 
969
-#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75  //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software.  Used for sensor reading validation
970
-#define MEASURED_UPPER_LIMIT         3.30  //upper limit factor used for sensor reading validation in mm
971
-#define MEASURED_LOWER_LIMIT         1.90  //lower limit factor for sensor reading validation in mm
972
-#define MAX_MEASUREMENT_DELAY       20     //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM  and lower number saves RAM)
1068
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
1069
+  #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
1070
+  #define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
973 1071
 
974
-//defines used in the code
975
-#define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially
1072
+  #define MEASURED_UPPER_LIMIT         3.30  //upper limit factor used for sensor reading validation in mm
1073
+  #define MEASURED_LOWER_LIMIT         1.90  //lower limit factor for sensor reading validation in mm
1074
+  #define MAX_MEASUREMENT_DELAY       20     //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM  and lower number saves RAM)
976 1075
 
977
-//When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status.  Status will appear for 5 sec.
978
-//#define FILAMENT_LCD_DISPLAY
1076
+  #define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially
1077
+
1078
+  //When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status.  Status will appear for 5 sec.
1079
+  //#define FILAMENT_LCD_DISPLAY
1080
+#endif
979 1081
 
980 1082
 #include "Configuration_adv.h"
981 1083
 #include "thermistortables.h"

+ 123
- 68
Marlin/example_configurations/delta/biv2.5/Configuration_adv.h View File

@@ -1,3 +1,35 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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
+/**
24
+ * Configuration_adv.h
25
+ *
26
+ * Advanced settings.
27
+ * Only change these if you know exactly what you're doing.
28
+ * Some of these settings can damage your printer if improperly set!
29
+ *
30
+ * Basic settings can be found in Configuration.h
31
+ *
32
+ */
1 33
 #ifndef CONFIGURATION_ADV_H
2 34
 #define CONFIGURATION_ADV_H
3 35
 
@@ -9,13 +41,26 @@
9 41
 //=============================Thermal Settings  ============================
10 42
 //===========================================================================
11 43
 
12
-#if ENABLED(BED_LIMIT_SWITCHING)
13
-  #define BED_HYSTERESIS 2 //only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS
44
+#if DISABLED(PIDTEMPBED)
45
+  #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control
46
+  #if ENABLED(BED_LIMIT_SWITCHING)
47
+    #define BED_HYSTERESIS 2 // Only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS
48
+  #endif
14 49
 #endif
15
-#define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control
16 50
 
17 51
 /**
18
- * Thermal Protection parameters
52
+ * Thermal Protection protects your printer from damage and fire if a
53
+ * thermistor falls out or temperature sensors fail in any way.
54
+ *
55
+ * The issue: If a thermistor falls out or a temperature sensor fails,
56
+ * Marlin can no longer sense the actual temperature. Since a disconnected
57
+ * thermistor reads as a low temperature, the firmware will keep the heater on.
58
+ *
59
+ * The solution: Once the temperature reaches the target, start observing.
60
+ * If the temperature stays too far below the target (hysteresis) for too long (period),
61
+ * the firmware will halt the machine as a safety precaution.
62
+ *
63
+ * If you get false positives for "Thermal Runaway" increase THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
19 64
  */
20 65
 #if ENABLED(THERMAL_PROTECTION_HOTENDS)
21 66
   #define THERMAL_PROTECTION_PERIOD 40        // Seconds
@@ -26,26 +71,24 @@
26 71
    * WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
27 72
    * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
28 73
    * but only if the current temperature is far enough below the target for a reliable test.
74
+   *
75
+   * If you get false positives for "Heating failed" increase WATCH_TEMP_PERIOD and/or decrease WATCH_TEMP_INCREASE
76
+   * WATCH_TEMP_INCREASE should not be below 2.
29 77
    */
30
-  #define WATCH_TEMP_PERIOD 16                // Seconds
31
-  #define WATCH_TEMP_INCREASE 4               // Degrees Celsius
78
+  #define WATCH_TEMP_PERIOD 20                // Seconds
79
+  #define WATCH_TEMP_INCREASE 2               // Degrees Celsius
32 80
 #endif
33 81
 
82
+/**
83
+ * Thermal Protection parameters for the bed
84
+ * are like the above for the hotends.
85
+ * WATCH_TEMP_BED_PERIOD and WATCH_TEMP_BED_INCREASE are not imlemented now.
86
+ */
34 87
 #if ENABLED(THERMAL_PROTECTION_BED)
35 88
   #define THERMAL_PROTECTION_BED_PERIOD 120   // Seconds
36 89
   #define THERMAL_PROTECTION_BED_HYSTERESIS 4 // Degrees Celsius
37 90
 #endif
38 91
 
39
-/**
40
- * Automatic Temperature:
41
- * The hotend target temperature is calculated by all the buffered lines of gcode.
42
- * The maximum buffered steps/sec of the extruder motor is called "se".
43
- * Start autotemp mode with M109 S<mintemp> B<maxtemp> F<factor>
44
- * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by
45
- * mintemp and maxtemp. Turn this off by excuting M109 without F*
46
- * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp.
47
- * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
48
- */
49 92
 #if ENABLED(PIDTEMP)
50 93
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
51 94
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.
@@ -56,14 +99,16 @@
56 99
   #endif
57 100
 #endif
58 101
 
59
-
60
-//automatic temperature: The hot end target temperature is calculated by all the buffered lines of gcode.
61
-//The maximum buffered steps/sec of the extruder motor are called "se".
62
-//You enter the autotemp mode by a M109 S<mintemp> B<maxtemp> F<factor>
63
-// the target temperature is set to mintemp+factor*se[steps/sec] and limited by mintemp and maxtemp
64
-// you exit the value by any M109 without F*
65
-// Also, if the temperature is set to a value <mintemp, it is not changed by autotemp.
66
-// on an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
102
+/**
103
+ * Automatic Temperature:
104
+ * The hotend target temperature is calculated by all the buffered lines of gcode.
105
+ * The maximum buffered steps/sec of the extruder motor is called "se".
106
+ * Start autotemp mode with M109 S<mintemp> B<maxtemp> F<factor>
107
+ * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by
108
+ * mintemp and maxtemp. Turn this off by executing M109 without F*
109
+ * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp.
110
+ * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
111
+ */
67 112
 #define AUTOTEMP
68 113
 #if ENABLED(AUTOTEMP)
69 114
   #define AUTOTEMP_OLDWEIGHT 0.98
@@ -156,9 +201,7 @@
156 201
   //#define Z_DUAL_ENDSTOPS
157 202
 
158 203
   #if ENABLED(Z_DUAL_ENDSTOPS)
159
-    #define Z2_MAX_PIN 36                     //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36)
160
-    const bool Z2_MAX_ENDSTOP_INVERTING = false;
161
-    #define DISABLE_XMAX_ENDSTOP              //Better to disable the XMAX to avoid conflict. Just rename "XMAX_ENDSTOP" by the endstop you are using for Z2 axis.
204
+    #define Z2_USE_ENDSTOP _XMAX_
162 205
   #endif
163 206
 
164 207
 #endif // Z_DUAL_STEPPER_DRIVERS
@@ -240,7 +283,13 @@
240 283
 #define INVERT_E_STEP_PIN false
241 284
 
242 285
 // Default stepper release if idle. Set to 0 to deactivate.
286
+// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true.
287
+// Time can be set by M18 and M84.
243 288
 #define DEFAULT_STEPPER_DEACTIVE_TIME 0
289
+#define DISABLE_INACTIVE_X true
290
+#define DISABLE_INACTIVE_Y true
291
+#define DISABLE_INACTIVE_Z true  // set to false if the nozzle will fall down on your printed part when print has finished.
292
+#define DISABLE_INACTIVE_E true
244 293
 
245 294
 #define DEFAULT_MINIMUMFEEDRATE       0.0     // minimum feedrate
246 295
 #define DEFAULT_MINTRAVELFEEDRATE     0.0
@@ -278,6 +327,9 @@
278 327
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
279 328
 #define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
280 329
 
330
+// Motor Current controlled via PWM (Overridable on supported boards with PWM-driven motor driver current)
331
+//#define PWM_MOTOR_CURRENT {1300, 1300, 1250} // Values in milliamps
332
+
281 333
 // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
282 334
 //#define DIGIPOT_I2C
283 335
 // Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8
@@ -354,13 +406,13 @@
354 406
 // @section more
355 407
 
356 408
 // The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
357
-//#define USE_WATCHDOG
409
+#define USE_WATCHDOG
358 410
 
359 411
 #if ENABLED(USE_WATCHDOG)
360
-// If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
361
-// The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset.
362
-//  However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled.
363
-//#define WATCHDOG_RESET_MANUAL
412
+  // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
413
+  // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset.
414
+  //  However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled.
415
+  //#define WATCHDOG_RESET_MANUAL
364 416
 #endif
365 417
 
366 418
 // @section lcd
@@ -371,6 +423,7 @@
371 423
 //#define BABYSTEPPING
372 424
 #if ENABLED(BABYSTEPPING)
373 425
   #define BABYSTEP_XY  //not only z, but also XY in the menu. more clutter, more functions
426
+                       //not implemented for deltabots!
374 427
   #define BABYSTEP_INVERT_Z false  //true for inverse movements in Z
375 428
   #define BABYSTEP_MULTIPLICATOR 1 //faster movements
376 429
 #endif
@@ -389,7 +442,6 @@
389 442
 #if ENABLED(ADVANCE)
390 443
   #define EXTRUDER_ADVANCE_K .0
391 444
   #define D_FILAMENT 2.85
392
-  #define STEPS_MM_E 836
393 445
 #endif
394 446
 
395 447
 // @section extras
@@ -398,7 +450,7 @@
398 450
 #define MM_PER_ARC_SEGMENT 1
399 451
 #define N_ARC_CORRECTION 25
400 452
 
401
-const unsigned int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement
453
+const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement
402 454
 
403 455
 // @section temperature
404 456
 
@@ -447,11 +499,11 @@ const unsigned int dropsegments=5; //everything with less than this number of st
447 499
   #define MIN_RETRACT 0.1                //minimum extruded mm to accept a automatic gcode retraction attempt
448 500
   #define RETRACT_LENGTH 5               //default retract length (positive mm)
449 501
   #define RETRACT_LENGTH_SWAP 13         //default swap retract length (positive mm), for extruder change
450
-  #define RETRACT_FEEDRATE 100            //default feedrate for retracting (mm/s)
502
+  #define RETRACT_FEEDRATE 100           //default feedrate for retracting (mm/s)
451 503
   #define RETRACT_ZLIFT 0                //default retract Z-lift
452 504
   #define RETRACT_RECOVER_LENGTH 0       //default additional recover length (mm, added to retract length when recovering)
453 505
   #define RETRACT_RECOVER_LENGTH_SWAP 0  //default additional swap recover length (mm, added to retract length when recovering from extruder change)
454
-  #define RETRACT_RECOVER_FEEDRATE 100     //default feedrate for recovering from retraction (mm/s)
506
+  #define RETRACT_RECOVER_FEEDRATE 100   //default feedrate for recovering from retraction (mm/s)
455 507
 #endif
456 508
 
457 509
 // Add support for experimental filament exchange support M600; requires display
@@ -463,12 +515,15 @@ const unsigned int dropsegments=5; //everything with less than this number of st
463 515
     #define FILAMENTCHANGE_ZADD 10
464 516
     #define FILAMENTCHANGE_FIRSTRETRACT -2
465 517
     #define FILAMENTCHANGE_FINALRETRACT -100
518
+    #define AUTO_FILAMENT_CHANGE                //This extrude filament until you press the button on LCD
519
+    #define AUTO_FILAMENT_CHANGE_LENGTH 0.04    //Extrusion length on automatic extrusion loop
520
+    #define AUTO_FILAMENT_CHANGE_FEEDRATE 300   //Extrusion feedrate (mm/min) on automatic extrusion loop
466 521
   #endif
467 522
 #endif
468 523
 
469 524
 /******************************************************************************\
470 525
  * enable this section if you have TMC26X motor drivers.
471
- * you need to import the TMC26XStepper library into the arduino IDE for this
526
+ * you need to import the TMC26XStepper library into the Arduino IDE for this
472 527
  ******************************************************************************/
473 528
 
474 529
 // @section tmc
@@ -476,52 +531,52 @@ const unsigned int dropsegments=5; //everything with less than this number of st
476 531
 //#define HAVE_TMCDRIVER
477 532
 #if ENABLED(HAVE_TMCDRIVER)
478 533
 
479
-//#define X_IS_TMC
534
+  //#define X_IS_TMC
480 535
   #define X_MAX_CURRENT 1000  //in mA
481 536
   #define X_SENSE_RESISTOR 91 //in mOhms
482 537
   #define X_MICROSTEPS 16     //number of microsteps
483 538
 
484
-//#define X2_IS_TMC
539
+  //#define X2_IS_TMC
485 540
   #define X2_MAX_CURRENT 1000  //in mA
486 541
   #define X2_SENSE_RESISTOR 91 //in mOhms
487 542
   #define X2_MICROSTEPS 16     //number of microsteps
488 543
 
489
-//#define Y_IS_TMC
544
+  //#define Y_IS_TMC
490 545
   #define Y_MAX_CURRENT 1000  //in mA
491 546
   #define Y_SENSE_RESISTOR 91 //in mOhms
492 547
   #define Y_MICROSTEPS 16     //number of microsteps
493 548
 
494
-//#define Y2_IS_TMC
549
+  //#define Y2_IS_TMC
495 550
   #define Y2_MAX_CURRENT 1000  //in mA
496 551
   #define Y2_SENSE_RESISTOR 91 //in mOhms
497 552
   #define Y2_MICROSTEPS 16     //number of microsteps
498 553
 
499
-//#define Z_IS_TMC
554
+  //#define Z_IS_TMC
500 555
   #define Z_MAX_CURRENT 1000  //in mA
501 556
   #define Z_SENSE_RESISTOR 91 //in mOhms
502 557
   #define Z_MICROSTEPS 16     //number of microsteps
503 558
 
504
-//#define Z2_IS_TMC
559
+  //#define Z2_IS_TMC
505 560
   #define Z2_MAX_CURRENT 1000  //in mA
506 561
   #define Z2_SENSE_RESISTOR 91 //in mOhms
507 562
   #define Z2_MICROSTEPS 16     //number of microsteps
508 563
 
509
-//#define E0_IS_TMC
564
+  //#define E0_IS_TMC
510 565
   #define E0_MAX_CURRENT 1000  //in mA
511 566
   #define E0_SENSE_RESISTOR 91 //in mOhms
512 567
   #define E0_MICROSTEPS 16     //number of microsteps
513 568
 
514
-//#define E1_IS_TMC
569
+  //#define E1_IS_TMC
515 570
   #define E1_MAX_CURRENT 1000  //in mA
516 571
   #define E1_SENSE_RESISTOR 91 //in mOhms
517 572
   #define E1_MICROSTEPS 16     //number of microsteps
518 573
 
519
-//#define E2_IS_TMC
574
+  //#define E2_IS_TMC
520 575
   #define E2_MAX_CURRENT 1000  //in mA
521 576
   #define E2_SENSE_RESISTOR 91 //in mOhms
522 577
   #define E2_MICROSTEPS 16     //number of microsteps
523 578
 
524
-//#define E3_IS_TMC
579
+  //#define E3_IS_TMC
525 580
   #define E3_MAX_CURRENT 1000  //in mA
526 581
   #define E3_SENSE_RESISTOR 91 //in mOhms
527 582
   #define E3_MICROSTEPS 16     //number of microsteps
@@ -530,7 +585,7 @@ const unsigned int dropsegments=5; //everything with less than this number of st
530 585
 
531 586
 /******************************************************************************\
532 587
  * enable this section if you have L6470  motor drivers.
533
- * you need to import the L6470 library into the arduino IDE for this
588
+ * you need to import the L6470 library into the Arduino IDE for this
534 589
  ******************************************************************************/
535 590
 
536 591
 // @section l6470
@@ -538,63 +593,63 @@ const unsigned int dropsegments=5; //everything with less than this number of st
538 593
 //#define HAVE_L6470DRIVER
539 594
 #if ENABLED(HAVE_L6470DRIVER)
540 595
 
541
-//#define X_IS_L6470
596
+  //#define X_IS_L6470
542 597
   #define X_MICROSTEPS 16     //number of microsteps
543
-  #define X_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
598
+  #define X_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
544 599
   #define X_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
545 600
   #define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall
546 601
 
547
-//#define X2_IS_L6470
602
+  //#define X2_IS_L6470
548 603
   #define X2_MICROSTEPS 16     //number of microsteps
549
-  #define X2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
604
+  #define X2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
550 605
   #define X2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
551 606
   #define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
552 607
 
553
-//#define Y_IS_L6470
608
+  //#define Y_IS_L6470
554 609
   #define Y_MICROSTEPS 16     //number of microsteps
555
-  #define Y_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
610
+  #define Y_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
556 611
   #define Y_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
557 612
   #define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall
558 613
 
559
-//#define Y2_IS_L6470
614
+  //#define Y2_IS_L6470
560 615
   #define Y2_MICROSTEPS 16     //number of microsteps
561
-  #define Y2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
616
+  #define Y2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
562 617
   #define Y2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
563 618
   #define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
564 619
 
565
-//#define Z_IS_L6470
620
+  //#define Z_IS_L6470
566 621
   #define Z_MICROSTEPS 16     //number of microsteps
567
-  #define Z_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
622
+  #define Z_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
568 623
   #define Z_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
569 624
   #define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall
570 625
 
571
-//#define Z2_IS_L6470
626
+  //#define Z2_IS_L6470
572 627
   #define Z2_MICROSTEPS 16     //number of microsteps
573
-  #define Z2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
628
+  #define Z2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
574 629
   #define Z2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
575 630
   #define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
576 631
 
577
-//#define E0_IS_L6470
632
+  //#define E0_IS_L6470
578 633
   #define E0_MICROSTEPS 16     //number of microsteps
579
-  #define E0_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
634
+  #define E0_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
580 635
   #define E0_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
581 636
   #define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall
582 637
 
583
-//#define E1_IS_L6470
638
+  //#define E1_IS_L6470
584 639
   #define E1_MICROSTEPS 16     //number of microsteps
585
-  #define E1_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
640
+  #define E1_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
586 641
   #define E1_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
587 642
   #define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall
588 643
 
589
-//#define E2_IS_L6470
644
+  //#define E2_IS_L6470
590 645
   #define E2_MICROSTEPS 16     //number of microsteps
591
-  #define E2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
646
+  #define E2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
592 647
   #define E2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
593 648
   #define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
594 649
 
595
-//#define E3_IS_L6470
650
+  //#define E3_IS_L6470
596 651
   #define E3_MICROSTEPS 16     //number of microsteps
597
-  #define E3_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
652
+  #define E3_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
598 653
   #define E3_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
599 654
   #define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall
600 655
 

+ 226
- 129
Marlin/example_configurations/delta/generic/Configuration.h View File

@@ -1,3 +1,40 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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
+/**
24
+ * Configuration.h
25
+ *
26
+ * Basic settings such as:
27
+ *
28
+ * - Type of electronics
29
+ * - Type of temperature sensor
30
+ * - Printer geometry
31
+ * - Endstop configuration
32
+ * - LCD controller
33
+ * - Extra features
34
+ *
35
+ * Advanced settings can be found in Configuration_adv.h
36
+ *
37
+ */
1 38
 #ifndef CONFIGURATION_H
2 39
 #define CONFIGURATION_H
3 40
 
@@ -7,8 +44,10 @@
7 44
 //===========================================================================
8 45
 //============================= Getting Started =============================
9 46
 //===========================================================================
10
-/*
11
-Here are some standard links for getting your machine calibrated:
47
+
48
+/**
49
+ * Here are some standard links for getting your machine calibrated:
50
+ *
12 51
  * http://reprap.org/wiki/Calibration
13 52
  * http://youtu.be/wAL9d7FgInk
14 53
  * http://calculator.josefprusa.cz
@@ -16,11 +55,7 @@ Here are some standard links for getting your machine calibrated:
16 55
  * http://www.thingiverse.com/thing:5573
17 56
  * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap
18 57
  * http://www.thingiverse.com/thing:298812
19
-*/
20
-
21
-// This configuration file contains the basic settings.
22
-// Advanced settings can be found in Configuration_adv.h
23
-// BASIC SETTINGS: select your board type, temperature sensor type, axis scaling, and endstop configuration
58
+ */
24 59
 
25 60
 //===========================================================================
26 61
 //============================= DELTA Printer ===============================
@@ -70,7 +105,7 @@ Here are some standard links for getting your machine calibrated:
70 105
 // The following define selects which electronics board you have.
71 106
 // Please choose the name from boards.h that matches your setup
72 107
 #ifndef MOTHERBOARD
73
-  #define MOTHERBOARD BOARD_RAMPS_13_EFB
108
+  #define MOTHERBOARD BOARD_RAMPS_14_EFB
74 109
 #endif
75 110
 
76 111
 // Optional custom name for your RepStrap or other custom machine
@@ -110,6 +145,7 @@ Here are some standard links for getting your machine calibrated:
110 145
 //--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table
111 146
 //
112 147
 //// Temperature sensor settings:
148
+// -3 is thermocouple with MAX31855 (only for sensor 0)
113 149
 // -2 is thermocouple with MAX6675 (only for sensor 0)
114 150
 // -1 is thermocouple with AD595
115 151
 // 0 is not used
@@ -129,6 +165,7 @@ Here are some standard links for getting your machine calibrated:
129 165
 // 13 is 100k Hisens 3950  1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
130 166
 // 20 is the PT100 circuit found in the Ultimainboard V2.x
131 167
 // 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
168
+// 70 is the 100K thermistor found in the bq Hephestos 2
132 169
 //
133 170
 //    1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k
134 171
 //                          (but gives greater accuracy and more stable PID)
@@ -144,7 +181,7 @@ Here are some standard links for getting your machine calibrated:
144 181
 //     Use it for Testing or Development purposes. NEVER for production machine.
145 182
 //#define DUMMY_THERMISTOR_998_VALUE 25
146 183
 //#define DUMMY_THERMISTOR_999_VALUE 100
147
-// :{ '0': "Not used", '4': "10k !! do not use for a hotend. Bad resolution at high temp. !!", '1': "100k / 4.7k - EPCOS", '51': "100k / 1k - EPCOS", '6': "100k / 4.7k EPCOS - Not as accurate as Table 1", '5': "100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '7': "100k / 4.7k Honeywell 135-104LAG-J01", '71': "100k / 4.7k Honeywell 135-104LAF-J01", '8': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9': "100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10': "100k / 4.7k RS 198-961", '11': "100k / 4.7k beta 3950 1%", '12': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13': "100k Hisens 3950  1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '60': "100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '55': "100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '2': "200k / 4.7k - ATC Semitec 204GT-2", '52': "200k / 1k - ATC Semitec 204GT-2", '-2': "Thermocouple + MAX6675 (only for sensor 0)", '-1': "Thermocouple + AD595", '3': "Mendel-parts / 4.7k", '1047': "Pt1000 / 4.7k", '1010': "Pt1000 / 1k (non standard)", '20': "PT100 (Ultimainboard V2.x)", '147': "Pt100 / 4.7k", '110': "Pt100 / 1k (non-standard)", '998': "Dummy 1", '999': "Dummy 2" }
184
+// :{ '0': "Not used", '4': "10k !! do not use for a hotend. Bad resolution at high temp. !!", '1': "100k / 4.7k - EPCOS", '51': "100k / 1k - EPCOS", '6': "100k / 4.7k EPCOS - Not as accurate as Table 1", '5': "100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '7': "100k / 4.7k Honeywell 135-104LAG-J01", '71': "100k / 4.7k Honeywell 135-104LAF-J01", '8': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9': "100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10': "100k / 4.7k RS 198-961", '11': "100k / 4.7k beta 3950 1%", '12': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13': "100k Hisens 3950  1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '60': "100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '55': "100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '2': "200k / 4.7k - ATC Semitec 204GT-2", '52': "200k / 1k - ATC Semitec 204GT-2", '-3': "Thermocouple + MAX31855 (only for sensor 0)", '-2': "Thermocouple + MAX6675 (only for sensor 0)", '-1': "Thermocouple + AD595", '3': "Mendel-parts / 4.7k", '1047': "Pt1000 / 4.7k", '1010': "Pt1000 / 1k (non standard)", '20': "PT100 (Ultimainboard V2.x)", '147': "Pt100 / 4.7k", '110': "Pt100 / 1k (non-standard)", '998': "Dummy 1", '999': "Dummy 2" }
148 185
 #define TEMP_SENSOR_0 -1
149 186
 #define TEMP_SENSOR_1 -1
150 187
 #define TEMP_SENSOR_2 0
@@ -178,14 +215,9 @@ Here are some standard links for getting your machine calibrated:
178 215
 #define HEATER_3_MAXTEMP 275
179 216
 #define BED_MAXTEMP 150
180 217
 
181
-// If your bed has low resistance e.g. .6 ohm and throws the fuse you can duty cycle it to reduce the
182
-// average current. The value should be an integer and the heat bed will be turned on for 1 interval of
183
-// HEATER_BED_DUTY_CYCLE_DIVIDER intervals.
184
-//#define HEATER_BED_DUTY_CYCLE_DIVIDER 4
185
-
186 218
 // If you want the M105 heater power reported in watts, define the BED_WATTS, and (shared for all extruders) EXTRUDER_WATTS
187
-//#define EXTRUDER_WATTS (12.0*12.0/6.7) //  P=I^2/R
188
-//#define BED_WATTS (12.0*12.0/1.1)      // P=I^2/R
219
+//#define EXTRUDER_WATTS (12.0*12.0/6.7) // P=U^2/R
220
+//#define BED_WATTS (12.0*12.0/1.1)      // P=U^2/R
189 221
 
190 222
 //===========================================================================
191 223
 //============================= PID Settings ================================
@@ -197,6 +229,7 @@ Here are some standard links for getting your machine calibrated:
197 229
 #define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
198 230
 #define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
199 231
 #if ENABLED(PIDTEMP)
232
+  //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
200 233
   //#define PID_DEBUG // Sends debug data to the serial port.
201 234
   //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
202 235
   //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -247,19 +280,19 @@ Here are some standard links for getting your machine calibrated:
247 280
 // so you shouldn't use it unless you are OK with PWM on your bed.  (see the comment on enabling PIDTEMPBED)
248 281
 #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
249 282
 
250
-//#define PID_BED_DEBUG // Sends debug data to the serial port.
251
-
252 283
 #if ENABLED(PIDTEMPBED)
253 284
 
285
+  //#define PID_BED_DEBUG // Sends debug data to the serial port.
286
+
254 287
   #define PID_BED_INTEGRAL_DRIVE_MAX MAX_BED_POWER //limit for the integral term
255 288
 
256
-  //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
289
+  //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
257 290
   //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
258 291
   #define  DEFAULT_bedKp 10.00
259 292
   #define  DEFAULT_bedKi .023
260 293
   #define  DEFAULT_bedKd 305.4
261 294
 
262
-  //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
295
+  //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
263 296
   //from pidautotune
264 297
   //#define  DEFAULT_bedKp 97.1
265 298
   //#define  DEFAULT_bedKi 1.41
@@ -284,16 +317,15 @@ Here are some standard links for getting your machine calibrated:
284 317
 //===========================================================================
285 318
 
286 319
 /**
287
- * Thermal Runaway Protection protects your printer from damage and fire if a
320
+ * Thermal Protection protects your printer from damage and fire if a
288 321
  * thermistor falls out or temperature sensors fail in any way.
289 322
  *
290 323
  * The issue: If a thermistor falls out or a temperature sensor fails,
291 324
  * Marlin can no longer sense the actual temperature. Since a disconnected
292 325
  * thermistor reads as a low temperature, the firmware will keep the heater on.
293 326
  *
294
- * The solution: Once the temperature reaches the target, start observing.
295
- * If the temperature stays too far below the target (hysteresis) for too long,
296
- * the firmware will halt as a safety precaution.
327
+ * If you get "Thermal Runaway" or "Heating failed" errors the
328
+ * details can be tuned in Configuration_adv.h
297 329
  */
298 330
 
299 331
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
@@ -349,8 +381,22 @@ Here are some standard links for getting your machine calibrated:
349 381
 // Enable this option for Toshiba steppers
350 382
 //#define CONFIG_STEPPERS_TOSHIBA
351 383
 
384
+//===========================================================================
385
+//============================== Endstop Settings ===========================
386
+//===========================================================================
387
+
352 388
 // @section homing
353 389
 
390
+// Specify here all the endstop connectors that are connected to any endstop or probe.
391
+// Almost all printers will be using one per axis. Probes will use one or more of the
392
+// extra connectors. Leave undefined any used for non-endstop and non-probe purposes.
393
+//#define USE_XMIN_PLUG
394
+//#define USE_YMIN_PLUG
395
+#define USE_ZMIN_PLUG // a Z probe
396
+#define USE_XMAX_PLUG
397
+#define USE_YMAX_PLUG
398
+#define USE_ZMAX_PLUG
399
+
354 400
 // coarse Endstop Settings
355 401
 #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
356 402
 
@@ -373,13 +419,53 @@ const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
373 419
 const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
374 420
 const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
375 421
 const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
376
-//#define DISABLE_MAX_ENDSTOPS
377
-#define DISABLE_MIN_ENDSTOPS // Deltas only use min endstops for probing.
378 422
 
379
-// If you want to enable the Z probe pin, but disable its use, uncomment the line below.
380
-// This only affects a Z probe endstop if you have separate Z min endstop as well and have
381
-// activated Z_MIN_PROBE_ENDSTOP below. If you are using the Z Min endstop on your Z probe,
382
-// this has no effect.
423
+//===========================================================================
424
+//============================= Z Probe Options =============================
425
+//===========================================================================
426
+
427
+// Enable Z_MIN_PROBE_ENDSTOP to use _both_ a Z Probe and a Z-min-endstop on the same machine.
428
+// With this option the Z_MIN_PROBE_PIN will only be used for probing, never for homing.
429
+//
430
+// *** PLEASE READ ALL INSTRUCTIONS BELOW FOR SAFETY! ***
431
+//
432
+// To continue using the Z-min-endstop for homing, be sure to disable Z_SAFE_HOMING.
433
+// Example: To park the head outside the bed area when homing with G28.
434
+//
435
+// To use a separate Z probe, your board must define a Z_MIN_PROBE_PIN.
436
+//
437
+// For a servo-based Z probe, you must set up servo support below, including
438
+// NUM_SERVOS, Z_ENDSTOP_SERVO_NR and SERVO_ENDSTOP_ANGLES.
439
+//
440
+// - RAMPS 1.3/1.4 boards may be able to use the 5V, GND, and Aux4->D32 pin.
441
+// - Use 5V for powered (usu. inductive) sensors.
442
+// - Otherwise connect:
443
+//   - normally-closed switches to GND and D32.
444
+//   - normally-open switches to 5V and D32.
445
+//
446
+// Normally-closed switches are advised and are the default.
447
+//
448
+// The Z_MIN_PROBE_PIN sets the Arduino pin to use. (See your board's pins file.)
449
+// Since the RAMPS Aux4->D32 pin maps directly to the Arduino D32 pin, D32 is the
450
+// default pin for all RAMPS-based boards. Some other boards map differently.
451
+// To set or change the pin for your board, edit the appropriate pins_XXXXX.h file.
452
+//
453
+// WARNING:
454
+// Setting the wrong pin may have unexpected and potentially disastrous consequences.
455
+// Use with caution and do your homework.
456
+//
457
+#define Z_MIN_PROBE_ENDSTOP
458
+
459
+// Enable Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN to use the Z_MIN_PIN for your Z_MIN_PROBE.
460
+// The Z_MIN_PIN will then be used for both Z-homing and probing.
461
+//#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
462
+
463
+// To use a probe you must enable one of the two options above!
464
+
465
+// This option disables the use of the Z_MIN_PROBE_PIN
466
+// To enable the Z probe pin but disable its use, uncomment the line below. This only affects a
467
+// Z probe switch if you have a separate Z min endstop also and have activated Z_MIN_PROBE_ENDSTOP above.
468
+// If you're using the Z MIN endstop connector for your Z probe, this has no effect.
383 469
 //#define DISABLE_Z_MIN_PROBE_ENDSTOP
384 470
 
385 471
 // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
@@ -389,11 +475,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
389 475
 #define Z_ENABLE_ON 0
390 476
 #define E_ENABLE_ON 0 // For all extruders
391 477
 
392
-// Disables axis when it's not being used.
478
+// Disables axis stepper immediately when it's not being used.
393 479
 // WARNING: When motors turn off there is a chance of losing position accuracy!
394 480
 #define DISABLE_X false
395 481
 #define DISABLE_Y false
396 482
 #define DISABLE_Z false
483
+// Warn on display about possibly reduced accuracy
484
+//#define DISABLE_REDUCED_ACCURACY_WARNING
397 485
 
398 486
 // @section extruder
399 487
 
@@ -416,6 +504,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
416 504
 #define INVERT_E3_DIR false
417 505
 
418 506
 // @section homing
507
+//#define MIN_Z_HEIGHT_FOR_HOMING 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
508
+                                    // Be sure you have this distance over your Z_MAX_POS in case.
419 509
 
420 510
 // ENDSTOP SETTINGS:
421 511
 // Sets direction of endstops when homing; 1=MAX, -1=MIN
@@ -451,24 +541,26 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
451 541
 #endif
452 542
 
453 543
 //===========================================================================
454
-//=========================== Manual Bed Leveling ===========================
544
+//============================ Mesh Bed Leveling ============================
455 545
 //===========================================================================
456 546
 
457
-//#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
458 547
 //#define MESH_BED_LEVELING    // Enable mesh bed leveling.
459 548
 
460
-#if ENABLED(MANUAL_BED_LEVELING)
461
-  #define MBL_Z_STEP 0.025  // Step size while manually probing Z axis.
462
-#endif  // MANUAL_BED_LEVELING
463
-
464 549
 #if ENABLED(MESH_BED_LEVELING)
465 550
   #define MESH_MIN_X 10
466
-  #define MESH_MAX_X (X_MAX_POS - MESH_MIN_X)
551
+  #define MESH_MAX_X (X_MAX_POS - (MESH_MIN_X))
467 552
   #define MESH_MIN_Y 10
468
-  #define MESH_MAX_Y (Y_MAX_POS - MESH_MIN_Y)
553
+  #define MESH_MAX_Y (Y_MAX_POS - (MESH_MIN_Y))
469 554
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
470 555
   #define MESH_NUM_Y_POINTS 3
471 556
   #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0.
557
+
558
+  //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
559
+
560
+  #if ENABLED(MANUAL_BED_LEVELING)
561
+    #define MBL_Z_STEP 0.025  // Step size while manually probing Z axis.
562
+  #endif  // MANUAL_BED_LEVELING
563
+
472 564
 #endif  // MESH_BED_LEVELING
473 565
 
474 566
 //===========================================================================
@@ -477,14 +569,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
477 569
 
478 570
 // @section bedlevel
479 571
 
480
-
481 572
 //#define AUTO_BED_LEVELING_FEATURE // Delete the comment to enable (remove // at the start of the line)
482 573
 //#define DEBUG_LEVELING_FEATURE
483
-//#define Z_MIN_PROBE_REPEATABILITY_TEST  // If not commented out, Z-Probe Repeatability test will be included if Auto Bed Leveling is Enabled.
574
+//#define Z_MIN_PROBE_REPEATABILITY_TEST  // If not commented out, Z Probe Repeatability test will be included if Auto Bed Leveling is Enabled.
484 575
 
485 576
 #if ENABLED(AUTO_BED_LEVELING_FEATURE)
486 577
 
487
-  // There are 2 different ways to specify probing locations.
578
+  // There are 2 different ways to specify probing locations:
488 579
   //
489 580
   // - "grid" mode
490 581
   //   Probe several points in a rectangular grid.
@@ -492,7 +583,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
492 583
   //   This mode is preferred because there are more measurements.
493 584
   //
494 585
   // - "3-point" mode
495
-  //   Probe 3 arbitrary points on the bed (that aren't colinear)
586
+  //   Probe 3 arbitrary points on the bed (that aren't collinear)
496 587
   //   You specify the XY coordinates of all 3 points.
497 588
 
498 589
   // Enable this to sample the bed in a grid (least squares solution).
@@ -502,41 +593,53 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
502 593
   #if ENABLED(AUTO_BED_LEVELING_GRID)
503 594
 
504 595
     // set the rectangle in which to probe
505
-    #define DELTA_PROBABLE_RADIUS (DELTA_PRINTABLE_RADIUS - 10)
506
-    #define LEFT_PROBE_BED_POSITION -DELTA_PROBABLE_RADIUS
507
-    #define RIGHT_PROBE_BED_POSITION DELTA_PROBABLE_RADIUS
508
-    #define FRONT_PROBE_BED_POSITION -DELTA_PROBABLE_RADIUS
509
-    #define BACK_PROBE_BED_POSITION DELTA_PROBABLE_RADIUS
596
+    #define DELTA_PROBEABLE_RADIUS (DELTA_PRINTABLE_RADIUS - 10)
597
+    #define LEFT_PROBE_BED_POSITION -DELTA_PROBEABLE_RADIUS
598
+    #define RIGHT_PROBE_BED_POSITION DELTA_PROBEABLE_RADIUS
599
+    #define FRONT_PROBE_BED_POSITION -DELTA_PROBEABLE_RADIUS
600
+    #define BACK_PROBE_BED_POSITION DELTA_PROBEABLE_RADIUS
510 601
 
511
-    #define MIN_PROBE_EDGE 10 // The Z probe square sides can be no smaller than this.
602
+    #define MIN_PROBE_EDGE 10 // The Z probe minimum square sides can be no smaller than this.
512 603
 
513 604
     // Non-linear bed leveling will be used.
514 605
     // Compensate by interpolating between the nearest four Z probe values for each point.
515 606
     // Useful for deltas where the print surface may appear like a bowl or dome shape.
516
-    // Works best with ACCURATE_BED_LEVELING_POINTS 5 or higher.
607
+    // Works best with AUTO_BED_LEVELING_GRID_POINTS 5 or higher.
517 608
     #define AUTO_BED_LEVELING_GRID_POINTS 9
518 609
 
519 610
   #else  // !AUTO_BED_LEVELING_GRID
520 611
 
521
-      // Arbitrary points to probe.
522
-      // A simple cross-product is used to estimate the plane of the bed.
523
-      #define ABL_PROBE_PT_1_X 15
524
-      #define ABL_PROBE_PT_1_Y 180
525
-      #define ABL_PROBE_PT_2_X 15
526
-      #define ABL_PROBE_PT_2_Y 20
527
-      #define ABL_PROBE_PT_3_X 170
528
-      #define ABL_PROBE_PT_3_Y 20
612
+    // Arbitrary points to probe.
613
+    // A simple cross-product is used to estimate the plane of the bed.
614
+    #define ABL_PROBE_PT_1_X 15
615
+    #define ABL_PROBE_PT_1_Y 180
616
+    #define ABL_PROBE_PT_2_X 15
617
+    #define ABL_PROBE_PT_2_Y 20
618
+    #define ABL_PROBE_PT_3_X 170
619
+    #define ABL_PROBE_PT_3_Y 20
529 620
 
530 621
   #endif // AUTO_BED_LEVELING_GRID
531 622
 
532
-  // Offsets to the Z probe relative to the nozzle tip.
623
+  // Z Probe to nozzle (X,Y) offset, relative to (0, 0).
533 624
   // X and Y offsets must be integers.
534
-  #define X_PROBE_OFFSET_FROM_EXTRUDER 0     // Z probe to nozzle X offset: -left  +right
535
-  #define Y_PROBE_OFFSET_FROM_EXTRUDER -10   // Z probe to nozzle Y offset: -front +behind
536
-  #define Z_PROBE_OFFSET_FROM_EXTRUDER -3.5  // Z probe to nozzle Z offset: -below (always!)
537
-
538
-  #define Z_RAISE_BEFORE_HOMING 4       // (in mm) Raise Z axis before homing (G28) for Z probe clearance.
539
-                                        // Be sure you have this distance over your Z_MAX_POS in case.
625
+  //
626
+  // In the following example the X and Y offsets are both positive:
627
+  // #define X_PROBE_OFFSET_FROM_EXTRUDER 10
628
+  // #define Y_PROBE_OFFSET_FROM_EXTRUDER 10
629
+  //
630
+  //    +-- BACK ---+
631
+  //    |           |
632
+  //  L |    (+) P  | R <-- probe (20,20)
633
+  //  E |           | I
634
+  //  F | (-) N (+) | G <-- nozzle (10,10)
635
+  //  T |           | H
636
+  //    |    (-)    | T
637
+  //    |           |
638
+  //    O-- FRONT --+
639
+  //  (0,0)
640
+  #define X_PROBE_OFFSET_FROM_EXTRUDER 0     // X offset: -left  [of the nozzle] +right
641
+  #define Y_PROBE_OFFSET_FROM_EXTRUDER -10   // Y offset: -front [of the nozzle] +behind
642
+  #define Z_PROBE_OFFSET_FROM_EXTRUDER -3.5  // Z offset: -below [the nozzle] (always negative!)
540 643
 
541 644
   #define XY_TRAVEL_SPEED 4000         // X and Y axis travel speed between probes, in mm/min.
542 645
 
@@ -544,13 +647,25 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
544 647
   #define Z_RAISE_BETWEEN_PROBINGS 5  // How much the Z axis will be raised when traveling from between next probing points
545 648
   #define Z_RAISE_AFTER_PROBING 50    // How much the Z axis will be raised after the last probing point.
546 649
 
547
-//#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" // These commands will be executed in the end of G29 routine.
548
-                                                                            // Useful to retract a deployable Z probe.
650
+  //#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" // These commands will be executed in the end of G29 routine.
651
+                                                                             // Useful to retract a deployable Z probe.
652
+
653
+  // Probes are sensors/switches that need to be activated before they can be used
654
+  // and deactivated after the use.
655
+  // Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, ... . You have to activate one of these for the AUTO_BED_LEVELING_FEATURE
656
+
657
+  // A fix mounted probe, like the normal inductive probe, must be deactivated to go below Z_PROBE_OFFSET_FROM_EXTRUDER
658
+  // when the hardware endstops are active.
659
+  //#define FIX_MOUNTED_PROBE
660
+
661
+  // A Servo Probe can be defined in the servo section below.
662
+
663
+  // An Allen Key Probe is currently predefined only in the delta example configurations.
549 664
 
550
-  //#define Z_PROBE_SLED // Turn on if you have a Z probe mounted on a sled like those designed by Charles Bell.
665
+  //#define Z_PROBE_SLED // Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
551 666
   //#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
552 667
 
553
-  // Allen key retractable z-probe as seen on many Kossel delta printers - http://reprap.org/wiki/Kossel#Automatic_bed_leveling_probe
668
+  // Allen key retractable Z probe as seen on many Kossel delta printers - http://reprap.org/wiki/Kossel#Automatic_bed_leveling_probe
554 669
   // Deploys by touching z-axis belt. Retracts by pushing the probe down. Uses Z_MIN_PIN.
555 670
   //#define Z_PROBE_ALLEN_KEY
556 671
 
@@ -631,10 +746,11 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
631 746
     //#define Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE HOMING_FEEDRATE_XYZ
632 747
   #endif
633 748
 
634
-// If you have enabled the bed auto leveling and are using the same Z probe for Z homing,
635
-// it is highly recommended you let this Z_SAFE_HOMING enabled!!!
749
+  // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing,
750
+  // it is highly recommended you leave Z_SAFE_HOMING enabled!
636 751
 
637
-  #define Z_SAFE_HOMING   // This feature is meant to avoid Z homing with Z probe outside the bed area.
752
+  #define Z_SAFE_HOMING   // Use the z-min-probe for homing to z-min - not the z-min-endstop.
753
+                          // This feature is meant to avoid Z homing with Z probe outside the bed area.
638 754
                           // When defined, it will:
639 755
                           // - Allow Z homing only after X and Y homing AND stepper drivers still enabled.
640 756
                           // - If stepper drivers timeout, it will need X and Y homing again before Z homing.
@@ -648,37 +764,6 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
648 764
 
649 765
   #endif
650 766
 
651
-  // Support for a dedicated Z probe endstop separate from the Z min endstop.
652
-  // If you would like to use both a Z probe and a Z min endstop together,
653
-  // uncomment #define Z_MIN_PROBE_ENDSTOP and read the instructions below.
654
-  // If you still want to use the Z min endstop for homing, disable Z_SAFE_HOMING above.
655
-  // Example: To park the head outside the bed area when homing with G28.
656
-  //
657
-  // WARNING:
658
-  // The Z min endstop will need to set properly as it would without a Z probe
659
-  // to prevent head crashes and premature stopping during a print.
660
-  //
661
-  // To use a separate Z probe endstop, you must have a Z_MIN_PROBE_PIN
662
-  // defined in the pins_XXXXX.h file for your control board.
663
-  // If you are using a servo based Z probe, you will need to enable NUM_SERVOS,
664
-  // Z_ENDSTOP_SERVO_NR and SERVO_ENDSTOP_ANGLES in the R/C SERVO support below.
665
-  // RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin
666
-  // in the Aux 4 section of the RAMPS board. Use 5V for powered sensors,
667
-  // otherwise connect to ground and D32 for normally closed configuration
668
-  // and 5V and D32 for normally open configurations.
669
-  // Normally closed configuration is advised and assumed.
670
-  // The D32 pin in Aux 4 on RAMPS maps to the Arduino D32 pin.
671
-  // Z_MIN_PROBE_PIN is setting the pin to use on the Arduino.
672
-  // Since the D32 pin on the RAMPS maps to D32 on Arduino, this works.
673
-  // D32 is currently selected in the RAMPS 1.3/1.4 pin file.
674
-  // All other boards will need changes to the respective pins_XXXXX.h file.
675
-  //
676
-  // WARNING:
677
-  // Setting the wrong pin may have unexpected and potentially disastrous outcomes.
678
-  // Use with caution and do your homework.
679
-  //
680
-  //#define Z_MIN_PROBE_ENDSTOP
681
-
682 767
 #endif // AUTO_BED_LEVELING_FEATURE
683 768
 
684 769
 
@@ -711,7 +796,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
711 796
 // delta speeds must be the same on xyz
712 797
 #define DEFAULT_AXIS_STEPS_PER_UNIT   {80, 80, 80, 760*1.1}  // default steps per unit for Kossel (GT2, 20 tooth)
713 798
 #define DEFAULT_MAX_FEEDRATE          {500, 500, 500, 25}    // (mm/sec)
714
-#define DEFAULT_MAX_ACCELERATION      {9000,9000,9000,10000}    // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for skeinforge 40+, for older versions raise them a lot.
799
+#define DEFAULT_MAX_ACCELERATION      {9000,9000,9000,10000}    // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for Skeinforge 40+, for older versions raise them a lot.
715 800
 
716 801
 #define DEFAULT_ACCELERATION          3000    // X, Y, Z and E acceleration in mm/s^2 for printing moves
717 802
 #define DEFAULT_RETRACT_ACCELERATION  3000    // E acceleration in mm/s^2 for retracts
@@ -755,6 +840,14 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
755 840
 #endif
756 841
 
757 842
 //
843
+// Host Keepalive
844
+//
845
+// By default Marlin will send a busy status message to the host
846
+// every 10 seconds when it can't accept commands.
847
+//
848
+//#define DISABLE_HOST_KEEPALIVE // Enable this option if your host doesn't like keepalive messages.
849
+
850
+//
758 851
 // M100 Free Memory Watcher
759 852
 //
760 853
 //#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
@@ -774,13 +867,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
774 867
 // @section lcd
775 868
 
776 869
 // Define your display language below. Replace (en) with your language code and uncomment.
777
-// en, pl, fr, de, es, ru, bg, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, cn, test
870
+// en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8, fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test
778 871
 // See also language.h
779 872
 #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
780 873
 
781 874
 // Choose ONE of these 3 charsets. This has to match your hardware. Ignored for full graphic display.
782 875
 // To find out what type you have - compile with (test) - upload - click to get the menu. You'll see two typical lines from the upper half of the charset.
783
-// See also documentation/LCDLanguageFont.md
876
+// See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
784 877
   #define DISPLAY_CHARSET_HD44780_JAPAN        // this is the most common hardware
785 878
   //#define DISPLAY_CHARSET_HD44780_WESTERN
786 879
   //#define DISPLAY_CHARSET_HD44780_CYRILLIC
@@ -788,12 +881,12 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
788 881
 //#define ULTRA_LCD  //general LCD support, also 16x2
789 882
 //#define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
790 883
 //#define SDSUPPORT // Enable SD Card Support in Hardware Console
791
-// Changed behaviour! If you need SDSUPPORT uncomment it!
792
-//#define SDSLOW // Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
793
-//#define SDEXTRASLOW // Use even slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
884
+                    // Changed behaviour! If you need SDSUPPORT uncomment it!
885
+//#define SPI_SPEED SPI_HALF_SPEED // (also SPI_QUARTER_SPEED, SPI_EIGHTH_SPEED) Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
794 886
 //#define SD_CHECK_AND_RETRY // Use CRC checks and retries on the SD communication
795 887
 //#define ENCODER_PULSES_PER_STEP 1 // Increase if you have a high resolution encoder
796 888
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
889
+//#define REVERSE_MENU_DIRECTION // When enabled CLOCKWISE moves UP in the LCD menu
797 890
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
798 891
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
799 892
 //#define SPEAKER // The sound device is a speaker - not a buzzer. A buzzer resonates with his own frequency.
@@ -810,13 +903,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
810 903
 
811 904
 // The Panucatt Devices Viki 2.0 and mini Viki with Graphic LCD
812 905
 // http://panucatt.com
813
-// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
906
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
814 907
 //#define VIKI2
815 908
 //#define miniVIKI
816 909
 
817 910
 // This is a new controller currently under development.  https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
818 911
 //
819
-// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
912
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
820 913
 //#define ELB_FULL_GRAPHIC_CONTROLLER
821 914
 //#define SD_DETECT_INVERTED
822 915
 
@@ -831,7 +924,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
831 924
 // The RepRapDiscount FULL GRAPHIC Smart Controller (quadratic white PCB)
832 925
 // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
833 926
 //
834
-// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
927
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
835 928
 //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
836 929
 
837 930
 // The RepRapWorld REPRAPWORLD_KEYPAD v1.1
@@ -844,6 +937,10 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
844 937
 // REMEMBER TO INSTALL LiquidCrystal_I2C.h in your ARDUINO library folder: https://github.com/kiyoshigawa/LiquidCrystal_I2C
845 938
 //#define RA_CONTROL_PANEL
846 939
 
940
+// The MakerLab Mini Panel with graphic controller and SD support
941
+// http://reprap.org/wiki/Mini_panel
942
+//#define MINIPANEL
943
+
847 944
 // Delta calibration menu
848 945
 // uncomment to add three points calibration menu option.
849 946
 // See http://minow.blogspot.com/index.html#4918805519571907051
@@ -851,16 +948,14 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
851 948
 // in ultralcd.cpp@lcd_delta_calibrate_menu()
852 949
 //#define DELTA_CALIBRATION_MENU
853 950
 
854
-// The MakerLab Mini Panel with graphic controller and SD support
855
-// http://reprap.org/wiki/Mini_panel
856
-//#define MINIPANEL
857
-
858 951
 /**
859 952
  * I2C Panels
860 953
  */
861 954
 
862 955
 //#define LCD_I2C_SAINSMART_YWROBOT
863 956
 
957
+//#define LCM1602 // LCM1602 Adapter for 16x2 LCD
958
+
864 959
 // PANELOLU2 LCD with status LEDs, separate encoder and click inputs
865 960
 //
866 961
 // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
@@ -874,7 +969,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
874 969
 //#define LCD_I2C_VIKI
875 970
 
876 971
 // SSD1306 OLED generic display support
877
-// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
972
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
878 973
 //#define U8GLIB_SSD1306
879 974
 
880 975
 // Shift register panels
@@ -886,7 +981,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
886 981
 
887 982
 // @section extras
888 983
 
889
-// Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
984
+// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino
890 985
 //#define FAST_PWM_FAN
891 986
 
892 987
 // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
@@ -966,21 +1061,23 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
966 1061
  * Note may require analog pins to be defined for different motherboards
967 1062
  **********************************************************************/
968 1063
 // Uncomment below to enable
969
-//#define FILAMENT_SENSOR
970
-
971
-#define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
972
-#define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
1064
+//#define FILAMENT_WIDTH_SENSOR
973 1065
 
974 1066
 #define DEFAULT_NOMINAL_FILAMENT_DIA 3.00  //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software.  Used for sensor reading validation
975
-#define MEASURED_UPPER_LIMIT         3.30  //upper limit factor used for sensor reading validation in mm
976
-#define MEASURED_LOWER_LIMIT         1.90  //lower limit factor for sensor reading validation in mm
977
-#define MAX_MEASUREMENT_DELAY       20     //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM  and lower number saves RAM)
978 1067
 
979
-//defines used in the code
980
-#define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially
1068
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
1069
+  #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
1070
+  #define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
1071
+
1072
+  #define MEASURED_UPPER_LIMIT         3.30  //upper limit factor used for sensor reading validation in mm
1073
+  #define MEASURED_LOWER_LIMIT         1.90  //lower limit factor for sensor reading validation in mm
1074
+  #define MAX_MEASUREMENT_DELAY       20     //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM  and lower number saves RAM)
981 1075
 
982
-//When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status.  Status will appear for 5 sec.
983
-//#define FILAMENT_LCD_DISPLAY
1076
+  #define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially
1077
+
1078
+  //When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status.  Status will appear for 5 sec.
1079
+  //#define FILAMENT_LCD_DISPLAY
1080
+#endif
984 1081
 
985 1082
 #include "Configuration_adv.h"
986 1083
 #include "thermistortables.h"

+ 121
- 67
Marlin/example_configurations/delta/generic/Configuration_adv.h View File

@@ -1,3 +1,35 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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
+/**
24
+ * Configuration_adv.h
25
+ *
26
+ * Advanced settings.
27
+ * Only change these if you know exactly what you're doing.
28
+ * Some of these settings can damage your printer if improperly set!
29
+ *
30
+ * Basic settings can be found in Configuration.h
31
+ *
32
+ */
1 33
 #ifndef CONFIGURATION_ADV_H
2 34
 #define CONFIGURATION_ADV_H
3 35
 
@@ -9,13 +41,26 @@
9 41
 //=============================Thermal Settings  ============================
10 42
 //===========================================================================
11 43
 
12
-#if ENABLED(BED_LIMIT_SWITCHING)
13
-  #define BED_HYSTERESIS 2 //only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS
44
+#if DISABLED(PIDTEMPBED)
45
+  #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control
46
+  #if ENABLED(BED_LIMIT_SWITCHING)
47
+    #define BED_HYSTERESIS 2 // Only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS
48
+  #endif
14 49
 #endif
15
-#define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control
16 50
 
17 51
 /**
18
- * Thermal Protection parameters
52
+ * Thermal Protection protects your printer from damage and fire if a
53
+ * thermistor falls out or temperature sensors fail in any way.
54
+ *
55
+ * The issue: If a thermistor falls out or a temperature sensor fails,
56
+ * Marlin can no longer sense the actual temperature. Since a disconnected
57
+ * thermistor reads as a low temperature, the firmware will keep the heater on.
58
+ *
59
+ * The solution: Once the temperature reaches the target, start observing.
60
+ * If the temperature stays too far below the target (hysteresis) for too long (period),
61
+ * the firmware will halt the machine as a safety precaution.
62
+ *
63
+ * If you get false positives for "Thermal Runaway" increase THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
19 64
  */
20 65
 #if ENABLED(THERMAL_PROTECTION_HOTENDS)
21 66
   #define THERMAL_PROTECTION_PERIOD 40        // Seconds
@@ -26,26 +71,24 @@
26 71
    * WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
27 72
    * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
28 73
    * but only if the current temperature is far enough below the target for a reliable test.
74
+   *
75
+   * If you get false positives for "Heating failed" increase WATCH_TEMP_PERIOD and/or decrease WATCH_TEMP_INCREASE
76
+   * WATCH_TEMP_INCREASE should not be below 2.
29 77
    */
30
-  #define WATCH_TEMP_PERIOD 16                // Seconds
31
-  #define WATCH_TEMP_INCREASE 4               // Degrees Celsius
78
+  #define WATCH_TEMP_PERIOD 20                // Seconds
79
+  #define WATCH_TEMP_INCREASE 2               // Degrees Celsius
32 80
 #endif
33 81
 
82
+/**
83
+ * Thermal Protection parameters for the bed
84
+ * are like the above for the hotends.
85
+ * WATCH_TEMP_BED_PERIOD and WATCH_TEMP_BED_INCREASE are not imlemented now.
86
+ */
34 87
 #if ENABLED(THERMAL_PROTECTION_BED)
35 88
   #define THERMAL_PROTECTION_BED_PERIOD 20    // Seconds
36 89
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
37 90
 #endif
38 91
 
39
-/**
40
- * Automatic Temperature:
41
- * The hotend target temperature is calculated by all the buffered lines of gcode.
42
- * The maximum buffered steps/sec of the extruder motor is called "se".
43
- * Start autotemp mode with M109 S<mintemp> B<maxtemp> F<factor>
44
- * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by
45
- * mintemp and maxtemp. Turn this off by excuting M109 without F*
46
- * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp.
47
- * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
48
- */
49 92
 #if ENABLED(PIDTEMP)
50 93
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
51 94
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.
@@ -56,14 +99,16 @@
56 99
   #endif
57 100
 #endif
58 101
 
59
-
60
-//automatic temperature: The hot end target temperature is calculated by all the buffered lines of gcode.
61
-//The maximum buffered steps/sec of the extruder motor are called "se".
62
-//You enter the autotemp mode by a M109 S<mintemp> B<maxtemp> F<factor>
63
-// the target temperature is set to mintemp+factor*se[steps/sec] and limited by mintemp and maxtemp
64
-// you exit the value by any M109 without F*
65
-// Also, if the temperature is set to a value <mintemp, it is not changed by autotemp.
66
-// on an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
102
+/**
103
+ * Automatic Temperature:
104
+ * The hotend target temperature is calculated by all the buffered lines of gcode.
105
+ * The maximum buffered steps/sec of the extruder motor is called "se".
106
+ * Start autotemp mode with M109 S<mintemp> B<maxtemp> F<factor>
107
+ * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by
108
+ * mintemp and maxtemp. Turn this off by executing M109 without F*
109
+ * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp.
110
+ * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
111
+ */
67 112
 #define AUTOTEMP
68 113
 #if ENABLED(AUTOTEMP)
69 114
   #define AUTOTEMP_OLDWEIGHT 0.98
@@ -156,9 +201,7 @@
156 201
   //#define Z_DUAL_ENDSTOPS
157 202
 
158 203
   #if ENABLED(Z_DUAL_ENDSTOPS)
159
-    #define Z2_MAX_PIN 36                     //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36)
160
-    const bool Z2_MAX_ENDSTOP_INVERTING = false;
161
-    #define DISABLE_XMAX_ENDSTOP              //Better to disable the XMAX to avoid conflict. Just rename "XMAX_ENDSTOP" by the endstop you are using for Z2 axis.
204
+    #define Z2_USE_ENDSTOP _XMAX_
162 205
   #endif
163 206
 
164 207
 #endif // Z_DUAL_STEPPER_DRIVERS
@@ -240,7 +283,13 @@
240 283
 #define INVERT_E_STEP_PIN false
241 284
 
242 285
 // Default stepper release if idle. Set to 0 to deactivate.
286
+// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true.
287
+// Time can be set by M18 and M84.
243 288
 #define DEFAULT_STEPPER_DEACTIVE_TIME 60
289
+#define DISABLE_INACTIVE_X true
290
+#define DISABLE_INACTIVE_Y true
291
+#define DISABLE_INACTIVE_Z true  // set to false if the nozzle will fall down on your printed part when print has finished.
292
+#define DISABLE_INACTIVE_E true
244 293
 
245 294
 #define DEFAULT_MINIMUMFEEDRATE       0.0     // minimum feedrate
246 295
 #define DEFAULT_MINTRAVELFEEDRATE     0.0
@@ -278,6 +327,9 @@
278 327
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
279 328
 #define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
280 329
 
330
+// Motor Current controlled via PWM (Overridable on supported boards with PWM-driven motor driver current)
331
+//#define PWM_MOTOR_CURRENT {1300, 1300, 1250} // Values in milliamps
332
+
281 333
 // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
282 334
 //#define DIGIPOT_I2C
283 335
 // Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8
@@ -351,17 +403,16 @@
351 403
   //#define USE_SMALL_INFOFONT
352 404
 #endif // DOGLCD
353 405
 
354
-
355 406
 // @section more
356 407
 
357 408
 // The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
358
-//#define USE_WATCHDOG
409
+#define USE_WATCHDOG
359 410
 
360 411
 #if ENABLED(USE_WATCHDOG)
361
-// If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
362
-// The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset.
363
-//  However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled.
364
-//#define WATCHDOG_RESET_MANUAL
412
+  // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
413
+  // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset.
414
+  //  However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled.
415
+  //#define WATCHDOG_RESET_MANUAL
365 416
 #endif
366 417
 
367 418
 // @section lcd
@@ -372,6 +423,7 @@
372 423
 //#define BABYSTEPPING
373 424
 #if ENABLED(BABYSTEPPING)
374 425
   #define BABYSTEP_XY  //not only z, but also XY in the menu. more clutter, more functions
426
+                       //not implemented for deltabots!
375 427
   #define BABYSTEP_INVERT_Z false  //true for inverse movements in Z
376 428
   #define BABYSTEP_MULTIPLICATOR 1 //faster movements
377 429
 #endif
@@ -390,7 +442,6 @@
390 442
 #if ENABLED(ADVANCE)
391 443
   #define EXTRUDER_ADVANCE_K .0
392 444
   #define D_FILAMENT 2.85
393
-  #define STEPS_MM_E 836
394 445
 #endif
395 446
 
396 447
 // @section extras
@@ -399,7 +450,7 @@
399 450
 #define MM_PER_ARC_SEGMENT 1
400 451
 #define N_ARC_CORRECTION 25
401 452
 
402
-const unsigned int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement
453
+const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement
403 454
 
404 455
 // @section temperature
405 456
 
@@ -464,12 +515,15 @@ const unsigned int dropsegments=5; //everything with less than this number of st
464 515
     #define FILAMENTCHANGE_ZADD 10
465 516
     #define FILAMENTCHANGE_FIRSTRETRACT -2
466 517
     #define FILAMENTCHANGE_FINALRETRACT -100
518
+    #define AUTO_FILAMENT_CHANGE                //This extrude filament until you press the button on LCD
519
+    #define AUTO_FILAMENT_CHANGE_LENGTH 0.04    //Extrusion length on automatic extrusion loop
520
+    #define AUTO_FILAMENT_CHANGE_FEEDRATE 300   //Extrusion feedrate (mm/min) on automatic extrusion loop
467 521
   #endif
468 522
 #endif
469 523
 
470 524
 /******************************************************************************\
471 525
  * enable this section if you have TMC26X motor drivers.
472
- * you need to import the TMC26XStepper library into the arduino IDE for this
526
+ * you need to import the TMC26XStepper library into the Arduino IDE for this
473 527
  ******************************************************************************/
474 528
 
475 529
 // @section tmc
@@ -477,52 +531,52 @@ const unsigned int dropsegments=5; //everything with less than this number of st
477 531
 //#define HAVE_TMCDRIVER
478 532
 #if ENABLED(HAVE_TMCDRIVER)
479 533
 
480
-//#define X_IS_TMC
534
+  //#define X_IS_TMC
481 535
   #define X_MAX_CURRENT 1000  //in mA
482 536
   #define X_SENSE_RESISTOR 91 //in mOhms
483 537
   #define X_MICROSTEPS 16     //number of microsteps
484 538
 
485
-//#define X2_IS_TMC
539
+  //#define X2_IS_TMC
486 540
   #define X2_MAX_CURRENT 1000  //in mA
487 541
   #define X2_SENSE_RESISTOR 91 //in mOhms
488 542
   #define X2_MICROSTEPS 16     //number of microsteps
489 543
 
490
-//#define Y_IS_TMC
544
+  //#define Y_IS_TMC
491 545
   #define Y_MAX_CURRENT 1000  //in mA
492 546
   #define Y_SENSE_RESISTOR 91 //in mOhms
493 547
   #define Y_MICROSTEPS 16     //number of microsteps
494 548
 
495
-//#define Y2_IS_TMC
549
+  //#define Y2_IS_TMC
496 550
   #define Y2_MAX_CURRENT 1000  //in mA
497 551
   #define Y2_SENSE_RESISTOR 91 //in mOhms
498 552
   #define Y2_MICROSTEPS 16     //number of microsteps
499 553
 
500
-//#define Z_IS_TMC
554
+  //#define Z_IS_TMC
501 555
   #define Z_MAX_CURRENT 1000  //in mA
502 556
   #define Z_SENSE_RESISTOR 91 //in mOhms
503 557
   #define Z_MICROSTEPS 16     //number of microsteps
504 558
 
505
-//#define Z2_IS_TMC
559
+  //#define Z2_IS_TMC
506 560
   #define Z2_MAX_CURRENT 1000  //in mA
507 561
   #define Z2_SENSE_RESISTOR 91 //in mOhms
508 562
   #define Z2_MICROSTEPS 16     //number of microsteps
509 563
 
510
-//#define E0_IS_TMC
564
+  //#define E0_IS_TMC
511 565
   #define E0_MAX_CURRENT 1000  //in mA
512 566
   #define E0_SENSE_RESISTOR 91 //in mOhms
513 567
   #define E0_MICROSTEPS 16     //number of microsteps
514 568
 
515
-//#define E1_IS_TMC
569
+  //#define E1_IS_TMC
516 570
   #define E1_MAX_CURRENT 1000  //in mA
517 571
   #define E1_SENSE_RESISTOR 91 //in mOhms
518 572
   #define E1_MICROSTEPS 16     //number of microsteps
519 573
 
520
-//#define E2_IS_TMC
574
+  //#define E2_IS_TMC
521 575
   #define E2_MAX_CURRENT 1000  //in mA
522 576
   #define E2_SENSE_RESISTOR 91 //in mOhms
523 577
   #define E2_MICROSTEPS 16     //number of microsteps
524 578
 
525
-//#define E3_IS_TMC
579
+  //#define E3_IS_TMC
526 580
   #define E3_MAX_CURRENT 1000  //in mA
527 581
   #define E3_SENSE_RESISTOR 91 //in mOhms
528 582
   #define E3_MICROSTEPS 16     //number of microsteps
@@ -531,7 +585,7 @@ const unsigned int dropsegments=5; //everything with less than this number of st
531 585
 
532 586
 /******************************************************************************\
533 587
  * enable this section if you have L6470  motor drivers.
534
- * you need to import the L6470 library into the arduino IDE for this
588
+ * you need to import the L6470 library into the Arduino IDE for this
535 589
  ******************************************************************************/
536 590
 
537 591
 // @section l6470
@@ -539,63 +593,63 @@ const unsigned int dropsegments=5; //everything with less than this number of st
539 593
 //#define HAVE_L6470DRIVER
540 594
 #if ENABLED(HAVE_L6470DRIVER)
541 595
 
542
-//#define X_IS_L6470
596
+  //#define X_IS_L6470
543 597
   #define X_MICROSTEPS 16     //number of microsteps
544
-  #define X_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
598
+  #define X_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
545 599
   #define X_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
546 600
   #define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall
547 601
 
548
-//#define X2_IS_L6470
602
+  //#define X2_IS_L6470
549 603
   #define X2_MICROSTEPS 16     //number of microsteps
550
-  #define X2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
604
+  #define X2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
551 605
   #define X2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
552 606
   #define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
553 607
 
554
-//#define Y_IS_L6470
608
+  //#define Y_IS_L6470
555 609
   #define Y_MICROSTEPS 16     //number of microsteps
556
-  #define Y_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
610
+  #define Y_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
557 611
   #define Y_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
558 612
   #define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall
559 613
 
560
-//#define Y2_IS_L6470
614
+  //#define Y2_IS_L6470
561 615
   #define Y2_MICROSTEPS 16     //number of microsteps
562
-  #define Y2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
616
+  #define Y2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
563 617
   #define Y2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
564 618
   #define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
565 619
 
566
-//#define Z_IS_L6470
620
+  //#define Z_IS_L6470
567 621
   #define Z_MICROSTEPS 16     //number of microsteps
568
-  #define Z_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
622
+  #define Z_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
569 623
   #define Z_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
570 624
   #define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall
571 625
 
572
-//#define Z2_IS_L6470
626
+  //#define Z2_IS_L6470
573 627
   #define Z2_MICROSTEPS 16     //number of microsteps
574
-  #define Z2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
628
+  #define Z2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
575 629
   #define Z2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
576 630
   #define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
577 631
 
578
-//#define E0_IS_L6470
632
+  //#define E0_IS_L6470
579 633
   #define E0_MICROSTEPS 16     //number of microsteps
580
-  #define E0_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
634
+  #define E0_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
581 635
   #define E0_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
582 636
   #define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall
583 637
 
584
-//#define E1_IS_L6470
638
+  //#define E1_IS_L6470
585 639
   #define E1_MICROSTEPS 16     //number of microsteps
586
-  #define E1_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
640
+  #define E1_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
587 641
   #define E1_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
588 642
   #define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall
589 643
 
590
-//#define E2_IS_L6470
644
+  //#define E2_IS_L6470
591 645
   #define E2_MICROSTEPS 16     //number of microsteps
592
-  #define E2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
646
+  #define E2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
593 647
   #define E2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
594 648
   #define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
595 649
 
596
-//#define E3_IS_L6470
650
+  //#define E3_IS_L6470
597 651
   #define E3_MICROSTEPS 16     //number of microsteps
598
-  #define E3_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high
652
+  #define E3_K_VAL 50          // 0 - 255, Higher values, are higher power. Be careful not to go too high
599 653
   #define E3_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
600 654
   #define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall
601 655
 

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


Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save