Merge remote-tracking branch 'upstream/Development' into Development

master
CONSULitAS 10 years ago
commit b447a4ffab

9
.gitignore vendored

@ -1,3 +1,12 @@
// Our automatic versioning scheme generates the following file
// NEVER put it in the repository
_Version.h
// All of the following OS, IDE and compiler generated file
// references should be moved from this file
// They are needed, but they belong in your global .gitignore
// rather than in a per-project file such as this
*.o *.o
applet/ applet/
*~ *~

@ -0,0 +1 @@
compiler.cpp.extra_flags=-DHAS_AUTOMATIC_VERSIONING

@ -1,108 +1,176 @@
# Implemented G Codes ## Implemented G Codes
## G Codes ### Movement G and M Codes
```
G0 -> G1
G1 - Coordinated Movement X Y Z E
G2 - CW ARC
G3 - CCW ARC
G4 - Dwell S[seconds] or P[milliseconds]
G92 - Set the "current position" to coordinates: X<xpos> Y<ypos> Z<zpos> E<epos>
M0 - Wait for user, with optional prompt message (requires LCD controller)
M0 Click When Ready ; show "Click When Ready" until the button is pressed.
M1 - Same as M0
M400 - Finish all moves
M999 - Restart after being stopped by error
```
### SD Card M Codes
```
M20 - List SD card
M21 - Init SD card
M22 - Release SD card
M23 - Select SD file (M23 filename.g)
M24 - Start/resume SD print
M25 - Pause SD print
M26 - Set SD position in bytes (M26 S12345)
M27 - Report SD print status
M28 - Start SD write (M28 filename.g)
M29 - Stop SD write
M30 - Delete file from SD (M30 filename.g)
M31 - Output time since last M109 or SD card start to serial
M32 - Select file and start SD print (Can be used _while_ printing from SD card files):
syntax "M32 /path/filename#", or "M32 S<startpos bytes> !filename#"
Call gcode file : "M32 P !filename#" and return to caller file after finishing (similar to #include).
The '#' is necessary when calling from within sd files, as it stops buffer prereading
M540 - Enable/Disable "Stop SD Print on Endstop Hit" (req. ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED)
M540 S<0|1>
M928 - Start SD logging (M928 filename.g) - ended by M29
```
### Hardware Control
```
M42 - Change pin status via gcode: P<pin> S<value>. If P is omitted the onboard LED pin will be used.
M42 P9 S1 ; set PIN 9 to 1.
M80 - Turn on Power Supply
M81 - Turn off Power Supply
M84 - Disable steppers until next move,
or use S<seconds> to specify an inactivity timeout, after which the steppers will be disabled. S0 to disable the timeout.
M85 - Set inactivity shutdown timer with parameter S<seconds>. Disable with "M85" or "M85 S0".
M112 - Emergency stop. Requires hardware reset!!
M226 - Wait for a pin to be in some state: P<pin number> S<pin state>
```
### Temperature M Codes
```
M104 - Set extruder target temp
M105 - Read current temp
M106 - Fan on
M107 - Fan off
M109 - Sxxx Wait for extruder current temp to reach target temp. Waits only when heating
Rxxx Wait for extruder current temp to reach target temp. Waits when heating and cooling
IF AUTOTEMP is enabled, S<mintemp> B<maxtemp> F<factor>. Exit autotemp by any M109 without F
M140 - Set bed target temp
M190 - Sxxx Wait for bed current temp to reach target temp. Waits only when heating
Rxxx Wait for bed current temp to reach target temp. Waits when heating and cooling
M301 - Set PID parameters P I and D
M302 - Allow cold extrudes, or set the minimum extrude S<temperature>.
M303 - PID relay autotune S<temperature> sets the target temperature. (default target temperature = 150C)
M304 - Set bed PID parameters P I and D
```
### Message M Codes
```
M114 - Output current position to serial port
M115 - Capabilities string
M117 - Display message text on the LCD
M119 - Output Endstop status to serial port
```
### Endstops M Codes
```
M120 - Enable endstop detection
M121 - Disable endstop detection
```
### Special Features M Codes
```
M126 - Solenoid Air Valve Open (BariCUDA support by jmil)
M127 - Solenoid Air Valve Closed (BariCUDA vent to atmospheric pressure by jmil)
M128 - EtoP Open (BariCUDA EtoP = electricity to air pressure transducer by jmil)
M129 - EtoP Closed (BariCUDA EtoP = electricity to air pressure transducer by jmil)
M150 - Set BlinkM Color: R<red> U<green> B<blue> via I2C. Range: 0-255
M240 - Trigger a camera to take a photograph. (Add to your per-layer GCode.)
M250 - Set LCD contrast: C<0-63>
M280 - Set servo position absolute. P<servo index> S<angle or microseconds>
M300 - Play beep sound S<frequency Hz> P<duration ms>
M380 - Activate solenoid on active extruder
M381 - Disable all solenoids
M600 - Pause for filament change X<xpos> Y<ypos> Z<lift> E<initial retract> L<later retract for removal>
```
### Units and Measures G and M Codes
```
G90 - Use Absolute Coordinates
G91 - Use Relative Coordinates
M82 - Set E codes absolute (default)
M83 - Set E codes relative while in Absolute Coordinates (G90) mode
M92 - Set axis_steps_per_unit - same syntax as G92
M200 - Set filament diameter and set E axis units to mm^3 (use S0 to set back to mm).: D<mm>
M201 - Set max acceleration in units/s^2 for print moves (M201 X1000 Y1000)
M202 - Set max acceleration in units/s^2 for travel moves (M202 X1000 Y1000) Unused in Marlin!!
M203 - Set maximum feedrate that your machine can sustain (M203 X200 Y200 Z300 E10000) in mm/sec
M204 - Set default acceleration: P for Printing moves, R for Retract only (no X, Y, Z) moves and T for Travel (non printing) moves (ex. M204 P800 T3000 R9000) in mm/sec^2
M205 - Advanced settings: minimum travel speed S=while printing T=travel only, B=minimum segment time X=maximum xy jerk, Z=maximum Z jerk, E=maximum E jerk
M206 - Set additional homing offset
M218 - Set hotend offset (in mm): T<extruder_number> X<offset_on_X> Y<offset_on_Y>
M220 - Set speed factor override percentage: S<factor in percent>
M221 - Set extrude factor override percentage: S<factor in percent>
```
### Firmware Retraction G and M Codes
```
G10 - Retract filament according to settings of M207
G11 - Retract recover filament according to settings of M208
M207 - Set retract length S[positive mm] F[feedrate mm/min] Z[additional zlift/hop], stays in mm regardless of M200 setting
M208 - Set recover=unretract length S[positive mm surplus to the M207 S*] F[feedrate mm/s]
M209 - S<1=true/0=false> enable automatic retract detect if the slicer did not support G10/11: every normal extrude-only move will be classified as retract depending on the direction
```
### Z Probe G and M Codes
```
G28 - Home all Axis
G29 - Detailed Z-Probe, probes the bed at 3 or more points. The printer must be homed with G28 before G29.
G30 - Single Z Probe, probes bed at current XY location.
G31 - Dock Z Probe sled (if enabled)
G32 - Undock Z Probe sled (if enabled)
M48 - Measure Z_Probe repeatability: P<points> X<xpos> Y<ypos> V<verbosity> E=engage L<legs of travel>
As with G29, the E flag causes the probe to stow after each probe.
M401 - Lower Z-probe (if present)
M402 - Raise Z-probe (if present)
```
### Filament Diameter M Codes
```
M404 - Set (or display) Nominal Filament Diameter in mm: [N<diameter>] (e.g., 3mm or 1.75mm)
M405 - Turn on Filament Sensor extrusion control: [D<distance>] to set distance (in cm) from sensor to extruder
M406 - Turn off Filament Sensor extrusion control
M407 - Display measured Filament Diameter
```
### EEPROM Settings M Codes
```
M500 - Store parameters in EEPROM
M501 - Read parameters from EEPROM (if you need reset them after you changed them temporarily).
M502 - Revert to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
M503 - Print the current settings (from memory not from EEPROM). Use S0 to leave off headings.
```
### Delta M Codes
```
M665 - Set Delta configurations: L<diagonal rod> R<delta radius> S<segments/s>
M666 - Set Delta endstop adjustment: X<x-adjustment> Y<y-adjustment> Z<z-adjustment>
M605 - Set dual x-carriage movement mode: S<mode> [ X<duplication x-offset> R<duplication temp offset> ]
```
### Stepper Driver M Codes
```
M17 - Enable/Power all stepper motors
M18 - Disable all stepper motors. (same as M84)
M907 - Set digital trimpot motor current using axis codes.
M908 - Control digital trimpot directly.
M350 - Set microstepping mode.
M351 - Toggle MS1 MS2 pins directly.
```
### SCARA M-Codes
__May change to suit future G-code standards__
```
M360 - SCARA calibration: Move to cal-position ThetaA (0 deg calibration)
M361 - SCARA calibration: Move to cal-position ThetaB (90 deg calibration - steps per degree)
M362 - SCARA calibration: Move to cal-position PsiA (0 deg calibration)
M363 - SCARA calibration: Move to cal-position PsiB (90 deg calibration - steps per degree)
M364 - SCARA calibration: Move to cal-position PSIC (90 deg to Theta calibration position)
M365 - SCARA calibration: Scaling factor, X, Y, Z axis
```
* G0 -> G1 ## Comments
* G1 - Coordinated Movement X Y Z E
* G2 - CW ARC
* G3 - CCW ARC
* G4 - Dwell S[seconds] or P[milliseconds]
* G10 - retract filament according to settings of M207
* G11 - retract recover filament according to settings of M208
* G28 - Home all Axis
* G29 - Detailed Z-Probe, probes the bed at 3 points. You must be at the home position for this to work correctly.
* G30 - Single Z Probe, probes bed at current XY location.
* G31 - Dock Z Probe sled (if enabled)
* G32 - Undock Z Probe sled (if enabled)
* G90 - Use Absolute Coordinates
* G91 - Use Relative Coordinates
* G92 - Set current position to cordinates given
## M Codes
* M0 - Unconditional stop - Wait for user to press a button on the LCD (Only if ULTRA_LCD is enabled)
* M1 - Same as M0
* M17 - Enable/Power all stepper motors
* M18 - Disable all stepper motors; same as M84
* M20 - List SD card
* M21 - Init SD card
* M22 - Release SD card
* M23 - Select SD file (M23 filename.g)
* M24 - Start/resume SD print
* M25 - Pause SD print
* M26 - Set SD position in bytes (M26 S12345)
* M27 - Report SD print status
* M28 - Start SD write (M28 filename.g)
* M29 - Stop SD write
* M30 - Delete file from SD (M30 filename.g)
* M31 - Output time since last M109 or SD card start to serial
* M32 - Select file and start SD print (Can be used when printing from SD card)
* M42 - Change pin status via gcode Use M42 Px Sy to set pin x to value y, when omitting Px the onboard led will be used.
* M80 - Turn on Power Supply
* M81 - Turn off Power Supply
* M82 - Set E codes absolute (default)
* M83 - Set E codes relative while in Absolute Coordinates (G90) mode
* M84 - Disable steppers until next move, or use S[seconds] to specify an inactivity timeout, after which the steppers will be disabled. S0 to disable the timeout.
* M85 - Set inactivity shutdown timer with parameter S[seconds]. To disable set zero (default)
* M92 - Set axis_steps_per_unit - same syntax as G92
* M104 - Set extruder target temp
* M105 - Read current temp
* M106 - Fan on
* M107 - Fan off
* M109 - Sxxx Wait for extruder current temp to reach target temp. Waits only when heating
* Rxxx Wait for extruder current temp to reach target temp. Waits when heating and cooling
* M112 - Emergency stop
* M114 - Output current position to serial port
* M115 - Capabilities string
* M117 - display message
* M119 - Output Endstop status to serial port
* M126 - Solenoid Air Valve Open (BariCUDA support by jmil)
* M127 - Solenoid Air Valve Closed (BariCUDA vent to atmospheric pressure by jmil)
* M128 - EtoP Open (BariCUDA EtoP = electricity to air pressure transducer by jmil)
* M129 - EtoP Closed (BariCUDA EtoP = electricity to air pressure transducer by jmil)
* M140 - Set bed target temp
* M190 - Sxxx Wait for bed current temp to reach target temp. Waits only when heating
* Rxxx Wait for bed current temp to reach target temp. Waits when heating and cooling
* M200 - D[millimeters]- set filament diameter and set E axis units to cubic millimeters (use S0 to set back to millimeters).
* M201 - Set max acceleration in units/s^2 for print moves (M201 X1000 Y1000)
* M202 - Set max acceleration in units/s^2 for travel moves (M202 X1000 Y1000) Unused in Marlin!!
* M203 - Set maximum feedrate that your machine can sustain (M203 X200 Y200 Z300 E10000) in mm/sec
* M204 - Set default acceleration: P for Printing moves, R for Retract only (no X, Y, Z) moves and T for Travel (non printing) moves (ex. M204 P800 T3000 R9000) in mm/sec^2
* M205 - advanced settings: minimum travel speed S=while printing T=travel only, B=minimum segment time X= maximum xy jerk, Z=maximum Z jerk, E=maximum E jerk
* M206 - set additional homing offset
* M207 - set retract length S[positive mm] F[feedrate mm/min] Z[additional zlift/hop], stays in mm regardless of M200 setting
* M208 - set recover=unretract length S[positive mm surplus to the M207 S*] F[feedrate mm/min]
* M209 - S[1=true/0=false] enable automatic retract detect if the slicer did not support G10/11: every normal extrude-only move will be classified as retract depending on the direction.
* M218 - set hotend offset (in mm): T[extruder_number] X[offset_on_X] Y[offset_on_Y]
* M220 - S[factor in percent] - set speed factor override percentage
* M221 - S[factor in percent] - set extrude factor override percentage
* M240 - Trigger a camera to take a photograph
* M280 - Position an RC Servo P[index] S[angle/microseconds], ommit S to report back current angle
* M300 - Play beep sound S[frequency Hz] P[duration ms]
* M301 - Set PID parameters P I and D
* M302 - Allow cold extrudes
* M303 - PID relay autotune S[temperature] sets the target temperature. (default target temperature = 150C)
* M304 - Set bed PID parameters P I and D
* M350 - Set microstepping mode.
* M351 - Toggle MS1 MS2 pins directly.
* M400 - Finish all moves
* M401 - Lower z-probe if present
* M402 - Raise z-probe if present
* M404 - N[dia in mm] Enter the nominal filament width (3mm, 1.75mm) or will display nominal filament width without parameters
* M405 - Turn on Filament Sensor extrusion control. Optional D[delay in cm] to set delay in centimeters between sensor and extruder
* M406 - Turn off Filament Sensor extrusion control
* M407 - Displays measured filament diameter
* M500 - stores paramters in EEPROM
* M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
* M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
* M503 - print the current settings (from memory not from EEPROM)
* M540 - Use S[0|1] to enable or disable the stop SD card print on endstop hit (requires ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED)
* M600 - Pause for filament change X[pos] Y[pos] Z[relative lift] E[initial retract] L[later retract distance for removal]
* M907 - Set digital trimpot motor current using axis codes.
* M908 - Control digital trimpot directly.
* M928 - Start SD logging (M928 filename.g) - ended by M29
* M999 - Restart after being stopped by error
# Comments
Comments start at a `;` (semicolon) and end with the end of the line: Comments start at a `;` (semicolon) and end with the end of the line:

@ -0,0 +1,145 @@
# LCD Language Font System
We deal with a variety of different displays.
And we try to display a lot of different languages in different scripts on them.
This system is ought to solve some of the related problems.
## The Displays
We have two different technologies for the displays:
* Character based displays:
Have a fixed set of symbols (charset - font) in their ROM.
All of them have a similar but not identical symbol set at the positions 0 to 127 similar to US-ASCII.
On the other hand symbols at places higher than 127 have mayor differences.
Until now we know of (and support):
* 1.) HD44780 and similar with Kana charset A00 https://www.sparkfun.com/datasheets/LCD/HD44780.pdf Page 17
These are very common, but sadly not very useful when writing in European languages.
* 2.) HD44780 and similar with Western charset A02 https://www.sparkfun.com/datasheets/LCD/HD44780.pdf Page 18
These are rare, but fairly useful for European languages. Also a limited number of Cyrillic symbols is available.
* 3.) HD44780 and similar with Cyrillic charset http://store.comet.bg/download-file.php?id=466 Page 14
Some of our Russian friends use them.
At all of them you can define 8 different symbols by yourself. In Marlin they are used for the Feedrate-, Thermometer-, ... symbols
* Full graphic displays:
Where we have the full freedom to display whatever we want, when we can make a program for it.
Currently we deal with 128x64 Pixel Displays and divide this area in about 5 Lines with about 22 columns.
Therefore we need fonts with a bounding box of about 6x10.
Until now we used a
* 1.) Marlin-font similar to ISO10646-1 but with special Symbols at the end, what made 'ü' and 'ä' inaccessible, in the size 6x10.
* 2.) Because these letters where to big for some locations on the info-screen we use a full ISO10646-1 font in the size of 6x9.(3200 byte)
* 3.) When we define USE_BIG_EDIT_FONT we use an additional ISO10646-1 font with 9x18, eating up another 3120 bytes of progmem - but readable without glasses.
## The Languages
For the moment Marlin wants to support a lot of languages:
* en English
* pl Polish
* fr French
* de German
* es Spanish
* ru Russian
* it Italian
* pt Portuguese
* pt-br Portuguese (Brazil)
* fi Finnish
* an Aragonese
* nl Dutch
* ca Catalan
* eu Basque-Euskera
and recently on [Thingiverse](http://www.thingiverse.com/) a new port to
* jp [Japanese](http://www.thingiverse.com/thing:664397)
appeared.
## The Problem
All of this languages, except the English, normally use extended symbol sets, not contained in US-ASCII.
Even the English translation uses some Symbols not in US-ASCII. ( '\002' for Thermometer, STR_h3 for '³')
And worse, in the code itself symbols are used, not taking in account, on what display they are written. [(This is true only for Displays with Japanese charset](https://github.com/MarlinFirmware/Marlin/blob/Development/Marlin/ultralcd_implementation_hitachi_HD44780.h#L218) on Western displays you'll see a '~' and on Cyrillic an 'arrow coming from top - pointing to left', what is quite the opposite of what the programmer wanted.)
The Germans want to use "ÄäÖöÜüß" the Finnish at least "äö". Other European languages want to see their accents on their letters.
For other scripts like Cyrillic, Japanese, Greek, Hebrew, ... you have to find totally different symbol sets.
Until now the problems where ignored widely.
The German translation used utf8 'ä' and 'ö' and did not care about showing garbage on ALL displays.
The Russian translators new that their system only works on the Cyrillic character displays and relied on special LCD routines (LiquidCrystalRus.cpp) to handle UTF8 but missed to implement a proper strlen().
The Japanese translator dealed with to scripts. He introduced a very special font for the full graphic displays and made use of the Japanese version of the character displays. Therefore he ended up with two pretty unreadable language.h files full of '\xxx' definitions.
Other languages ether tried to avoid wording with their special symbols or ignored the problem at all and used the basic symbols without the accents, dots, ... whatever.
## The (partial) Solution
On a 'perfect' system like Windows or Linux we'd dig out unifont.ttf and some code from the libraries and they'd do what we want. But we are on a embedded system with very limited resources. So we had to find ways to limit the used space (Alone unifont.ttf is about 12MB) and have to make some compromise.
### Aims:
* 1.) Make the input for translators as convenient as possible. (Unicode UTF8)
* 2.) Make the displays show the scripts as good as they can. (fonts, mapping tables)
* 3.) Don't destroy the existing language files.
* 3.) Don't loose to much speed
* 4.) Don't loose to much memory.
### Actions:
* a.) Declare the display hardware we use. (Configuration.h)
* b.) Declare the language ore script we use. (Configuration.h)
* c.) Declare the kind of input we use. Ether direct pointers to the font (\xxx) or UTF8 and the font to use on graphic displays. (language_xx.h)
* d.) Declare the needed translations. (language_xx.h)
* e.) Make strlen() work with UTF8. (ultralcd.cpp)
* f.) Seperate the Marlin Symbols to their own font. (dogm_font_data_Marlin_symbols.h)
* g.) Make the fontswitch function remember the last used font. (dogm_lcd_implementation.h)
* h.) Make output functions that count the number of written chars and switch the font to Marlin symbols and back when needed. (dogm_lcd_implementation.h) (ultralcd_implementation_hitachi_HD44780.h)
* i.) Make three fonts to simulate the HD44780 charsets on dogm-displays. With this fonts the translator can check how his translation will look on the character based displays.
* j.) Make ISO fonts for Cyrillic and Katakana because they do not need a mapping table and are faster to deal with and have a better charset (less compromises) than the HD44780 fonts.
* k.) Make mapping functions and tables to convert from UTF8 to the fonts and integrate in the new output functions. (utf_mapper.h)
* l.) Delete the not needed any more 'LiquidCrystalRus.xxx' files and their calls in 'ultralcd_implementation_hitachi_HD44780.h'.
* m.) Split 'dogm_font_data_Marlin.h' into separate fonts and delete. (+dogm_font_data_6x9_marlin.h , +dogm_font_data_Marlin_symbols.h, -dogm_font_data_Marlin.h)
* n.) Do a bit of preprocessor magic to match displays - fonts and mappers in 'utf_mapper.h'.
## Translators handbook
* a.) Check is there already is a language_xx.h file for your language (-> b.) or not (-> e.)
* b.) Ether their is declared MAPPER_NON (-> c.) or an other mapper (-> d.)
* c.) Symbols outside the normal ASCII-range (32-128) are written as "\xxx" and point directly into the font of the hardware you declared in 'Configuration.h'
This is one of the three fonts of the character based Hitachi displays (DISPLAY_CHARSET_HD44780_JAPAN, DISPLAY_CHARSET_HD44780_WEST, DISPLAY_CHARSET_HD44780_CYRILIC).
Even on the full graphic displays one of these will be used when SIMULATE_ROMFONT is defined.
If you don't make use of the extended character set your file will look like 'language_en.h' and your language file will work on all the displays.
If you make intensive use, your file will look like 'language_kana.h' and your language file will only work on one of displays. (in this case DISPLAY_CHARSET_HD44780_JAPAN)
Be careful with the characters 0x5c = '\', and 0x7b - 0x7f. "{|}"These are not the same on all variants.
MAPPER_NON is the fastest an least memory consuming variant.
If you want to make use of more than a view symbols outside standard ASCII or want to improve the portability to more different types of displays use UTF8 input. That means define an other mapper.
* d.) With a mapper different to MAPPER_NON UTF8 input is used. Instead of "\xe1" (on a display with Japanese font) or STR_ae simply use "ä". When the string is read byte by byte , the "ä" will expand to "\0xc3\0xa4" or "Я" will expand to "0xd0\0xaf" or "ホ" will expand to "\0xe3\0x83\0x9b"
To limit the used memory we can't use all the possibilities UTF8 gives at the same time. We define a subset matching to the language or script we use.
* MAPPER_C2C3 correspondents good with west European languages the possible symbols are listed at (http://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block))
* MAPPER_D0D1 correspondents well with the Cyrillic languages. See (http://en.wikipedia.org/wiki/Cyrillic_(Unicode_block))
* MAPPER_E382E383 works with the Japanese Katakana script. See (http://en.wikipedia.org/wiki/Katakana_(Unicode_block))
The mapper functions will only catch the 'lead in' described in the mappers name. If the input they get does not match they'll put out a '?' or garbage.
The last byte in the sequence ether points directly into a matching ISO10646 font or via a mapper_table into one of the HD44780 fonts.
The mapper_tables do their best to find a similar symbol in the HD44780_fonts. For example replacing small letters with the matching capital letters. But they may fail to find something matching and will output a '?'. There are combinations of language and display what simply have no corresponding symbols - like Cyrillic on a Japanese display or visa versa - than the compiler will throw an error.
In short: Chose a Mapper working with the symbols you want to use. Use only symbols matching the mapper. On FULL graphic displays all will be fine, but check for daring replacements or question-marks in the output of character based displays by defining SIMULATE_ROMFONT and trying the different variants.
If you get a lot of question-marks on the Hitachi based displays with your new translation, maybe creating an additional language file with the format 'language_xx_utf8.h' is the way to go.
* MAPPER_NON is the fastest and least memory consuming variant.
* Mappers together with a ISO10646_font are the second best choice regarding speed and memory consumption. Only a few more decisions are mad per character.
* Mappers together with the HD44780_fonts use about additional 128 bytes for the mapping_table.
* e.) Creating a new language file is not a big thing. Just make a new file with the format 'language_xx.h' or maybe 'language.xx.utf8.h', define a mapper and a font in there and translate some of the strings defined in language_en.h. You can drop the surrounding #ifndef #endif. You don't have to translate all the stings - the missing one will be added by language_en.h - in English - of cause.
* f.) If you cant find a matching mapper things will be a bit more complex. With the Hitachi based displays you will not have big chance to make something useful unless you have one with a matching charset. For a full graphic display - lets explain with - let's say Greece.
Find a matching charset. (http://en.wikipedia.org/wiki/Greek_and_Coptic)
Provide a font containing the symbols in the right size. Normal ASCII in the lower 127 places, the upper with your selection.
Write a mapper catching, in this case, 0xcd to 0xcf and add it to 'utf_mapper.h'.
In case of a ISO10646 font we have a MAPPER_ONE_TO_ONE and don't have to make a table.
* g.) If you discover enough useful symbols in one of the HD44780 fonts you can provide a mapping table. For example HD44780_WEST contains 'alpha', 'beta', 'pi', 'Sigma', 'omega' 'My' - what is not enough to make USEFUL table - I think.
* h.) If you want to integrate an entirely new variant of a Hitachi based display.
Add it in 'Configuration.h'. Define mapper tables in 'utf_mapper.h'. Maybe you need a new mapper function.
The length of the strings is limited. '17 chars' was crude rule of thumb. Obviously 17 is to long for the 16x2 displays. A more exact rule would be max_strlen = Displaywidth - 2 - strlen(value to display behind). This is a bit complicated. So try and count is my rule of thumb.
On the 16x2 displays the strings are cut at the end to fit on the display. So it's a good idea to make them differ early. ('Somverylongoptionname x' -> 'x Somverylongoptionname')
You'll find all translatable strings in 'language_en.h'. Please don't translate any strings from 'language.h', this may break the serial protocol.
## User Instructions
Define your hardware and the wanted language in 'Configuration.h'.
To find out what charset your hardware is, define language 'test' and compile. In the menu you will see two lines from the upper half of the charset.
* DISPLAY_CHARSET_HD44780_JAPAN locks like "バパヒビピフブプヘベペホボポマミ"
* DISPLAY_CHARSET_HD44780_WESTERN locks like "ÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞß"
* DISPLAY_CHARSET_HD44780_CYRILIC locks like "РСТУФХЦЧШЩЪЫЬЭЮЯ"
If you get an error about missing mappers during compilation - lie about your displays hardware font to see at lest some garbage, or select an other language.
English works on all hardware.

@ -0,0 +1,82 @@
==============================================
Instructions for configuring Mesh Bed Leveling
==============================================
Background
----------
This mesh based method of leveling/compensating can compensate for an non-flat bed. There are various opinions about doing this. It was primarily written to compensate a RigidBot BIG bed (40x30cm) that was somewhat bent.
Currently there is no automatic way to probe the bed like the Auto Bed Leveling feature. So, you can not enable `ENABLE_AUTO_BED_LEVELING` at the same time. This might soon be implemented though, stay tuned.
Theory
------
The bed is manually probed in a grid maner. During a print the Z axis compensation will be interpolated within each square using a bi-linear method. Because the grid squares can be tilting in different directions a printing move can be split on the borders of the grid squares. During fast travel moves one can sometimes notice a de-acceleration on these borders.
Mesh point probing can either be carried out from the display, or by issuing `G29` commands.
The Z-endstop should be set slightly above the bed. An opto endstop is preferable but a switch with a metal arm that allow some travel though should also work.
Configuration
-------------
In `Configuration.h` there are two options that can be enabled.
`MESH_BED_LEVELING` will enable mesh bed leveling.<br/>
`MANUAL_BED_LEVELING` will add the menu option for bed leveling.
There are also some values that can be set.
The following will set the step distance used when manually turning the display encoder. Default is 0.025
`MBL_Z_STEP`
Following four define the area to cover. Default 10mm from max bed size
`MESH_MIN_X`<br/>
`MESH_MAX_X`<br/>
`MESH_MIN_Y`<br/>
`MESH_MAX_Y`
Following two define the number of points to probe, total number will be these two multiplied. Default is 3x3 points. Don't probe more than 7x7 points (software limited)
`MESH_NUM_X_POINTS`<br/>
`MESH_NUM_Y_POINTS`<br/>
The following will set the Z-endstop height during probing. When initiating a bed leveling probing, a homing will take place and the Z-endstop will be set to this height so lowering through the endstop can take place and the bed should be within this distance. Default is 4mm
`MESH_HOME_SEARCH_Z`
The probed points will also be saved in the EEPROM if it has been enables. Otherwise a new probe sequence needs to be made next time the printer has been turned on.
Probing the bed with the display
--------------------------------
If `MANUAL_BED_LEVELING` has been enabled then will a `Level bed` menu option be available in the `Prepare` menu.
When selecting this option the printer will first do a homing, and then travel to the first probe point. There it will wait. By turning the encoder on the display the hotend can now be lowered until it touches the bed. Using a paper to feel the distance when it gets close. Pressing the encoder/button will store this point and then travel to the next point. Repeating this until all points have been probed.
If the EEPROM has been enable it can be good to issue a `M500` to get these points saved.
Issuing a `G29` will return the state of the mesh leveling and report the probed points.
Probing the bed with G-codes
----------------------------
Probing the bed by G-codes follows the sequence much like doing it with the display.
`G29` or `G29 S0` will return the state of the bed leveling and report the probed points. Where X=1 Y=1 is the top-left value and X=MESH_NUM_X_POINTS Y=MESH_NUM_Y_POINTS is bottom-right value. X per column and Y per row.
`G29 S1` will initiate the bed leveling, homing and traveling to the first point to probe.
Then use your preferred Printer controller program, i.e. Printrun, to lower the hotend until it touches the bed. Using a paper to feel the distance when it gets close.
`G29 S2` will store the point and travel to the next point until last point has been probed.
`G29 S3 Xn Yn Zn.nn` will modify a single probed point. This can be used to tweak a badly probed point. Specify probe point where `Xn` and `Yn`, where `n` in `Xn` is between 1 and `MESH_NUM_X_POINTS`. Likewise for `Yn`. `Zn.nn` is the new Z value in that probed point.
Note
----
Depending how firm feel you aim for on the paper you can use the `Z offset` option in Slic3r to compensate a slight height diff. (I like the paper loose so I needed to put `-0.05` in Slic3r)

@ -4,8 +4,14 @@
*/ */
#ifndef CONDITIONALS_H #ifndef CONDITIONALS_H
#ifndef M_PI
#define M_PI 3.1415926536
#endif
#ifndef CONFIGURATION_LCD // Get the LCD defines which are needed first #ifndef CONFIGURATION_LCD // Get the LCD defines which are needed first
#define PIN_EXISTS(PN) (defined(PN##_PIN) && PN##_PIN >= 0)
#define CONFIGURATION_LCD #define CONFIGURATION_LCD
#if defined(MAKRPANEL) #if defined(MAKRPANEL)
@ -124,7 +130,6 @@
#define NEWPANEL #define NEWPANEL
#endif #endif
#ifdef ULTIPANEL #ifdef ULTIPANEL
#define NEWPANEL //enable this if you have a click-encoder panel #define NEWPANEL //enable this if you have a click-encoder panel
#define SDSUPPORT #define SDSUPPORT
@ -148,6 +153,35 @@
#endif #endif
#endif #endif
#ifdef DOGLCD
/* Custom characters defined in font font_6x10_marlin_symbols */
// \x00 intentionally skipped to avoid problems in strings
#define LCD_STR_REFRESH "\x01"
#define LCD_STR_FOLDER "\x02"
#define LCD_STR_ARROW_RIGHT "\x03"
#define LCD_STR_UPLEVEL "\x04"
#define LCD_STR_CLOCK "\x05"
#define LCD_STR_FEEDRATE "\x06"
#define LCD_STR_BEDTEMP "\x07"
#define LCD_STR_THERMOMETER "\x08"
#define LCD_STR_DEGREE "\x09"
#define LCD_STR_SPECIAL_MAX '\x09'
// Maximum here is 0x1f because 0x20 is ' ' (space) and the normal charsets begin.
// Better stay below 0x10 because DISPLAY_CHARSET_HD44780_WESTERN begins here.
#else
/* Custom characters defined in the first 8 characters of the LCD */
#define LCD_STR_BEDTEMP "\x00" // this will have 'unexpected' results when used in a string!
#define LCD_STR_DEGREE "\x01"
#define LCD_STR_THERMOMETER "\x02"
#define LCD_STR_UPLEVEL "\x03"
#define LCD_STR_REFRESH "\x04"
#define LCD_STR_FOLDER "\x05"
#define LCD_STR_FEEDRATE "\x06"
#define LCD_STR_CLOCK "\x07"
#define LCD_STR_ARROW_RIGHT ">" /* from the default character set */
#endif
/** /**
* Default LCD contrast for dogm-like LCD displays * Default LCD contrast for dogm-like LCD displays
*/ */
@ -155,6 +189,13 @@
#define DEFAULT_LCD_CONTRAST 32 #define DEFAULT_LCD_CONTRAST 32
#endif #endif
#ifdef DOGLCD
#define HAS_LCD_CONTRAST
#ifdef U8GLIB_ST7920
#undef HAS_LCD_CONTRAST
#endif
#endif
#else // CONFIGURATION_LCD #else // CONFIGURATION_LCD
#define CONDITIONALS_H #define CONDITIONALS_H
@ -185,6 +226,9 @@
#define ENDSTOPPULLUP_YMIN #define ENDSTOPPULLUP_YMIN
#define ENDSTOPPULLUP_ZMIN #define ENDSTOPPULLUP_ZMIN
#endif #endif
#ifndef DISABLE_Z_PROBE_ENDSTOP
#define ENDSTOPPULLUP_ZPROBE
#endif
#endif #endif
/** /**
@ -252,7 +296,7 @@
* Advance calculated values * Advance calculated values
*/ */
#ifdef ADVANCE #ifdef ADVANCE
#define EXTRUSION_AREA (0.25 * D_FILAMENT * D_FILAMENT * 3.14159) #define EXTRUSION_AREA (0.25 * D_FILAMENT * D_FILAMENT * M_PI)
#define STEPS_PER_CUBIC_MM_E (axis_steps_per_unit[E_AXIS] / EXTRUSION_AREA) #define STEPS_PER_CUBIC_MM_E (axis_steps_per_unit[E_AXIS] / EXTRUSION_AREA)
#endif #endif
@ -265,16 +309,14 @@
#ifndef POWER_SUPPLY #ifndef POWER_SUPPLY
#define POWER_SUPPLY 1 #define POWER_SUPPLY 1
#endif #endif
// 1 = ATX #if (POWER_SUPPLY == 1) // 1 = ATX
#if (POWER_SUPPLY == 1)
#define PS_ON_AWAKE LOW #define PS_ON_AWAKE LOW
#define PS_ON_ASLEEP HIGH #define PS_ON_ASLEEP HIGH
#endif #elif (POWER_SUPPLY == 2) // 2 = X-Box 360 203W
// 2 = X-Box 360 203W
#if (POWER_SUPPLY == 2)
#define PS_ON_AWAKE HIGH #define PS_ON_AWAKE HIGH
#define PS_ON_ASLEEP LOW #define PS_ON_ASLEEP LOW
#endif #endif
#define HAS_POWER_SWITCH (POWER_SUPPLY > 0 && PIN_EXISTS(PS_ON))
/** /**
* Temp Sensor defines * Temp Sensor defines
@ -345,25 +387,81 @@
#endif #endif
/** /**
* Shorthand for pin tests, for temperature.cpp * Shorthand for pin tests, used wherever needed
*/ */
#define HAS_TEMP_0 (defined(TEMP_0_PIN) && TEMP_0_PIN >= 0) #define HAS_TEMP_0 (PIN_EXISTS(TEMP_0) && TEMP_SENSOR_0 != 0 && TEMP_SENSOR_0 != -2)
#define HAS_TEMP_1 (defined(TEMP_1_PIN) && TEMP_1_PIN >= 0) #define HAS_TEMP_1 (PIN_EXISTS(TEMP_1) && TEMP_SENSOR_1 != 0)
#define HAS_TEMP_2 (defined(TEMP_2_PIN) && TEMP_2_PIN >= 0) #define HAS_TEMP_2 (PIN_EXISTS(TEMP_2) && TEMP_SENSOR_2 != 0)
#define HAS_TEMP_3 (defined(TEMP_3_PIN) && TEMP_3_PIN >= 0) #define HAS_TEMP_3 (PIN_EXISTS(TEMP_3) && TEMP_SENSOR_3 != 0)
#define HAS_TEMP_BED (defined(TEMP_BED_PIN) && TEMP_BED_PIN >= 0) #define HAS_TEMP_BED (PIN_EXISTS(TEMP_BED) && TEMP_SENSOR_BED != 0)
#define HAS_FILAMENT_SENSOR (defined(FILAMENT_SENSOR) && defined(FILWIDTH_PIN) && FILWIDTH_PIN >= 0) #define HAS_HEATER_0 (PIN_EXISTS(HEATER_0))
#define HAS_HEATER_0 (defined(HEATER_0_PIN) && HEATER_0_PIN >= 0) #define HAS_HEATER_1 (PIN_EXISTS(HEATER_1))
#define HAS_HEATER_1 (defined(HEATER_1_PIN) && HEATER_1_PIN >= 0) #define HAS_HEATER_2 (PIN_EXISTS(HEATER_2))
#define HAS_HEATER_2 (defined(HEATER_2_PIN) && HEATER_2_PIN >= 0) #define HAS_HEATER_3 (PIN_EXISTS(HEATER_3))
#define HAS_HEATER_3 (defined(HEATER_3_PIN) && HEATER_3_PIN >= 0) #define HAS_HEATER_BED (PIN_EXISTS(HEATER_BED))
#define HAS_HEATER_BED (defined(HEATER_BED_PIN) && HEATER_BED_PIN >= 0) #define HAS_AUTO_FAN_0 (PIN_EXISTS(EXTRUDER_0_AUTO_FAN))
#define HAS_AUTO_FAN_0 (defined(EXTRUDER_0_AUTO_FAN_PIN) && EXTRUDER_0_AUTO_FAN_PIN >= 0) #define HAS_AUTO_FAN_1 (PIN_EXISTS(EXTRUDER_1_AUTO_FAN))
#define HAS_AUTO_FAN_1 (defined(EXTRUDER_1_AUTO_FAN_PIN) && EXTRUDER_1_AUTO_FAN_PIN >= 0) #define HAS_AUTO_FAN_2 (PIN_EXISTS(EXTRUDER_2_AUTO_FAN))
#define HAS_AUTO_FAN_2 (defined(EXTRUDER_2_AUTO_FAN_PIN) && EXTRUDER_2_AUTO_FAN_PIN >= 0) #define HAS_AUTO_FAN_3 (PIN_EXISTS(EXTRUDER_3_AUTO_FAN))
#define HAS_AUTO_FAN_3 (defined(EXTRUDER_3_AUTO_FAN_PIN) && EXTRUDER_3_AUTO_FAN_PIN >= 0) #define HAS_AUTO_FAN (HAS_AUTO_FAN_0 || HAS_AUTO_FAN_1 || HAS_AUTO_FAN_2 || HAS_AUTO_FAN_3)
#define HAS_AUTO_FAN HAS_AUTO_FAN_0 || HAS_AUTO_FAN_1 || HAS_AUTO_FAN_2 || HAS_AUTO_FAN_3 #define HAS_FAN (PIN_EXISTS(FAN))
#define HAS_FAN (defined(FAN_PIN) && FAN_PIN >= 0) #define HAS_CONTROLLERFAN (PIN_EXISTS(CONTROLLERFAN))
#define HAS_SERVO_0 (PIN_EXISTS(SERVO0))
#define HAS_SERVO_1 (PIN_EXISTS(SERVO1))
#define HAS_SERVO_2 (PIN_EXISTS(SERVO2))
#define HAS_SERVO_3 (PIN_EXISTS(SERVO3))
#define HAS_FILAMENT_SENSOR (defined(FILAMENT_SENSOR) && PIN_EXISTS(FILWIDTH))
#define HAS_FILRUNOUT (PIN_EXISTS(FILRUNOUT))
#define HAS_HOME (PIN_EXISTS(HOME))
#define HAS_KILL (PIN_EXISTS(KILL))
#define HAS_SUICIDE (PIN_EXISTS(SUICIDE))
#define HAS_PHOTOGRAPH (PIN_EXISTS(PHOTOGRAPH))
#define HAS_X_MIN (PIN_EXISTS(X_MIN))
#define HAS_X_MAX (PIN_EXISTS(X_MAX))
#define HAS_Y_MIN (PIN_EXISTS(Y_MIN))
#define HAS_Y_MAX (PIN_EXISTS(Y_MAX))
#define HAS_Z_MIN (PIN_EXISTS(Z_MIN))
#define HAS_Z_MAX (PIN_EXISTS(Z_MAX))
#define HAS_Z2_MIN (PIN_EXISTS(Z2_MIN))
#define HAS_Z2_MAX (PIN_EXISTS(Z2_MAX))
#define HAS_Z_PROBE (PIN_EXISTS(Z_PROBE))
#define HAS_SOLENOID_1 (PIN_EXISTS(SOL1))
#define HAS_SOLENOID_2 (PIN_EXISTS(SOL2))
#define HAS_SOLENOID_3 (PIN_EXISTS(SOL3))
#define HAS_MICROSTEPS (PIN_EXISTS(X_MS1))
#define HAS_MICROSTEPS_E0 (PIN_EXISTS(E0_MS1))
#define HAS_MICROSTEPS_E1 (PIN_EXISTS(E1_MS1))
#define HAS_MICROSTEPS_E2 (PIN_EXISTS(E2_MS1))
#define HAS_X_ENABLE (PIN_EXISTS(X_ENABLE))
#define HAS_X2_ENABLE (PIN_EXISTS(X2_ENABLE))
#define HAS_Y_ENABLE (PIN_EXISTS(Y_ENABLE))
#define HAS_Y2_ENABLE (PIN_EXISTS(Y2_ENABLE))
#define HAS_Z_ENABLE (PIN_EXISTS(Z_ENABLE))
#define HAS_Z2_ENABLE (PIN_EXISTS(Z2_ENABLE))
#define HAS_E0_ENABLE (PIN_EXISTS(E0_ENABLE))
#define HAS_E1_ENABLE (PIN_EXISTS(E1_ENABLE))
#define HAS_E2_ENABLE (PIN_EXISTS(E2_ENABLE))
#define HAS_E3_ENABLE (PIN_EXISTS(E3_ENABLE))
#define HAS_X_DIR (PIN_EXISTS(X_DIR))
#define HAS_X2_DIR (PIN_EXISTS(X2_DIR))
#define HAS_Y_DIR (PIN_EXISTS(Y_DIR))
#define HAS_Y2_DIR (PIN_EXISTS(Y2_DIR))
#define HAS_Z_DIR (PIN_EXISTS(Z_DIR))
#define HAS_Z2_DIR (PIN_EXISTS(Z2_DIR))
#define HAS_E0_DIR (PIN_EXISTS(E0_DIR))
#define HAS_E1_DIR (PIN_EXISTS(E1_DIR))
#define HAS_E2_DIR (PIN_EXISTS(E2_DIR))
#define HAS_E3_DIR (PIN_EXISTS(E3_DIR))
#define HAS_X_STEP (PIN_EXISTS(X_STEP))
#define HAS_X2_STEP (PIN_EXISTS(X2_STEP))
#define HAS_Y_STEP (PIN_EXISTS(Y_STEP))
#define HAS_Y2_STEP (PIN_EXISTS(Y2_STEP))
#define HAS_Z_STEP (PIN_EXISTS(Z_STEP))
#define HAS_Z2_STEP (PIN_EXISTS(Z2_STEP))
#define HAS_E0_STEP (PIN_EXISTS(E0_STEP))
#define HAS_E1_STEP (PIN_EXISTS(E1_STEP))
#define HAS_E2_STEP (PIN_EXISTS(E2_STEP))
#define HAS_E3_STEP (PIN_EXISTS(E3_STEP))
/** /**
* Helper Macros for heaters and extruder fan * Helper Macros for heaters and extruder fan
@ -390,16 +488,5 @@
#define WRITE_FAN(v) WRITE(FAN_PIN, v) #define WRITE_FAN(v) WRITE(FAN_PIN, v)
#endif #endif
/**
* Sampling period of the temperature routine
* This override comes originally from temperature.cpp
* The Configuration.h option is basically ignored.
*/
#ifdef PID_dT
#undef PID_dT
#endif
#define PID_dT ((OVERSAMPLENR * 12.0)/(F_CPU / 64.0 / 256.0))
#endif //CONFIGURATION_LCD #endif //CONFIGURATION_LCD
#endif //CONDITIONALS_H #endif //CONDITIONALS_H

@ -31,26 +31,32 @@ Here are some standard links for getting your machine calibrated:
//=========================================================================== //===========================================================================
//============================= SCARA Printer =============================== //============================= SCARA Printer ===============================
//=========================================================================== //===========================================================================
// For a Delta printer replace the configuration files with the files in the // For a Scara printer replace the configuration files with the files in the
// example_configurations/SCARA directory. // example_configurations/SCARA directory.
// //
// @section info
// User-specified version info of this build to display in [Pronterface, etc] terminal window during // User-specified version info of this build to display in [Pronterface, etc] terminal window during
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
// build by the user have been successfully uploaded into firmware. // build by the user have been successfully uploaded into firmware.
#define STRING_VERSION "1.0.2" #define STRING_VERSION "1.0.3 dev"
#define STRING_URL "reprap.org" #define STRING_URL "reprap.org"
#define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
#define STRING_SPLASH_LINE1 "v" STRING_VERSION // will be shown during bootup in line 1 #define STRING_SPLASH_LINE1 "v" STRING_VERSION // will be shown during bootup in line 1
//#define STRING_SPLASH_LINE2 STRING_VERSION_CONFIG_H // will be shown during bootup in line2 //#define STRING_SPLASH_LINE2 STRING_VERSION_CONFIG_H // will be shown during bootup in line2
// @section machine
// SERIAL_PORT selects which serial port should be used for communication with the host. // SERIAL_PORT selects which serial port should be used for communication with the host.
// This allows the connection of wireless adapters (for instance) to non-default port pins. // This allows the connection of wireless adapters (for instance) to non-default port pins.
// Serial port 0 is still used by the Arduino bootloader regardless of this setting. // Serial port 0 is still used by the Arduino bootloader regardless of this setting.
// :[0,1,2,3,4,5,6,7]
#define SERIAL_PORT 0 #define SERIAL_PORT 0
// This determines the communication speed of the printer // This determines the communication speed of the printer
// :[2400,9600,19200,38400,57600,115200,250000]
#define BAUDRATE 250000 #define BAUDRATE 250000
// This enables the serial port associated to the Bluetooth interface // This enables the serial port associated to the Bluetooth interface
@ -62,25 +68,36 @@ Here are some standard links for getting your machine calibrated:
#define MOTHERBOARD BOARD_RAMPS_13_EFB #define MOTHERBOARD BOARD_RAMPS_13_EFB
#endif #endif
// Define this to set a custom name for your generic Mendel, // Optional custom name for your RepStrap or other custom machine
// #define CUSTOM_MENDEL_NAME "This Mendel" // Displayed in the LCD "Ready" message
// #define CUSTOM_MACHINE_NAME "3D Printer"
// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines) // Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines)
// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) // You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4)
// #define MACHINE_UUID "00000000-0000-0000-0000-000000000000" // #define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
// This defines the number of extruders // This defines the number of extruders
// :[1,2,3,4]
#define EXTRUDERS 1 #define EXTRUDERS 1
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).
// For the other hotends it is their distance from the extruder 0 hotend.
//#define EXTRUDER_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis
//#define EXTRUDER_OFFSET_Y {0.0, 5.00} // (in mm) for each extruder, offset of the hotend on the Y axis
//// The following define selects which power supply you have. Please choose the one that matches your setup //// The following define selects which power supply you have. Please choose the one that matches your setup
// 1 = ATX // 1 = ATX
// 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC) // 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC)
// :{1:'ATX',2:'X-Box 360'}
#define POWER_SUPPLY 1 #define POWER_SUPPLY 1
// Define this to have the electronics keep the power supply off on startup. If you don't know what this is leave it. // Define this to have the electronics keep the power supply off on startup. If you don't know what this is leave it.
// #define PS_DEFAULT_OFF // #define PS_DEFAULT_OFF
// @section temperature
//=========================================================================== //===========================================================================
//============================= Thermal Settings ============================ //============================= Thermal Settings ============================
//=========================================================================== //===========================================================================
@ -122,7 +139,7 @@ Here are some standard links for getting your machine calibrated:
// Use it for Testing or Development purposes. NEVER for production machine. // Use it for Testing or Development purposes. NEVER for production machine.
// #define DUMMY_THERMISTOR_998_VALUE 25 // #define DUMMY_THERMISTOR_998_VALUE 25
// #define DUMMY_THERMISTOR_999_VALUE 100 // #define DUMMY_THERMISTOR_999_VALUE 100
// :{ '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" }
#define TEMP_SENSOR_0 1 #define TEMP_SENSOR_0 1
#define TEMP_SENSOR_1 0 #define TEMP_SENSOR_1 0
#define TEMP_SENSOR_2 0 #define TEMP_SENSOR_2 0
@ -184,7 +201,6 @@ Here are some standard links for getting your machine calibrated:
// is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
#define PID_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term #define PID_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term
#define K1 0.95 //smoothing factor within the PID #define K1 0.95 //smoothing factor within the PID
#define PID_dT ((OVERSAMPLENR * 10.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine
// If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
// Ultimaker // Ultimaker
@ -209,7 +225,7 @@ Here are some standard links for getting your machine calibrated:
// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis // Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
// //
// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. // Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder.
// If your PID_dT above is the default, and correct for your hardware/configuration, that means 7.689Hz, // If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz,
// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. // which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. // This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
// If your configuration is significantly different than this and you don't understand the issues involved, you probably // If your configuration is significantly different than this and you don't understand the issues involved, you probably
@ -243,6 +259,7 @@ Here are some standard links for getting your machine calibrated:
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #endif // PIDTEMPBED
// @section extruder
//this prevents dangerous Extruder moves, i.e. if the temperature is under the limit //this prevents dangerous Extruder moves, i.e. if the temperature is under the limit
//can be software-disabled for whatever purposes by //can be software-disabled for whatever purposes by
@ -297,19 +314,29 @@ your extruder heater takes 2 minutes to hit the target on heating.
//============================= Mechanical Settings ========================= //============================= Mechanical Settings =========================
//=========================================================================== //===========================================================================
// @section machine
// Uncomment this option to enable CoreXY kinematics // Uncomment this option to enable CoreXY kinematics
// #define COREXY // #define COREXY
// Enable this option for Toshiba steppers // Enable this option for Toshiba steppers
// #define CONFIG_STEPPERS_TOSHIBA // #define CONFIG_STEPPERS_TOSHIBA
// The pullups are needed if you directly connect a mechanical endstop between the signal and ground pins. // @section homing
#define ENDSTOPPULLUP_XMAX
#define ENDSTOPPULLUP_YMAX // coarse Endstop Settings
#define ENDSTOPPULLUP_ZMAX #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
#define ENDSTOPPULLUP_XMIN
#define ENDSTOPPULLUP_YMIN #ifndef ENDSTOPPULLUPS
#define ENDSTOPPULLUP_ZMIN // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
// #define ENDSTOPPULLUP_XMAX
// #define ENDSTOPPULLUP_YMAX
// #define ENDSTOPPULLUP_ZMAX
// #define ENDSTOPPULLUP_XMIN
// #define ENDSTOPPULLUP_YMIN
// #define ENDSTOPPULLUP_ZMIN
// #define ENDSTOPPULLUP_ZPROBE
#endif
// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
const bool X_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop. const bool X_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
@ -318,10 +345,19 @@ const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic o
const bool X_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop. const bool X_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Y_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop. const bool Y_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop. const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
//#define DISABLE_MAX_ENDSTOPS //#define DISABLE_MAX_ENDSTOPS
//#define DISABLE_MIN_ENDSTOPS //#define DISABLE_MIN_ENDSTOPS
// @section machine
// If you want to enable the Z Probe pin, but disable its use, uncomment the line below.
// This only affects a Z Probe Endstop if you have separate Z min endstop as well and have
// activated Z_PROBE_ENDSTOP below. If you are using the Z Min endstop on your Z Probe,
// this has no effect.
//#define DISABLE_Z_PROBE_ENDSTOP
// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1 // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
// :{0:'Low',1:'High'}
#define X_ENABLE_ON 0 #define X_ENABLE_ON 0
#define Y_ENABLE_ON 0 #define Y_ENABLE_ON 0
#define Z_ENABLE_ON 0 #define Z_ENABLE_ON 0
@ -331,20 +367,32 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
#define DISABLE_X false #define DISABLE_X false
#define DISABLE_Y false #define DISABLE_Y false
#define DISABLE_Z false #define DISABLE_Z false
// @section extruder
#define DISABLE_E false // For all extruders #define DISABLE_E false // For all extruders
#define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled #define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled
// If you motor turns to wrong direction, you can invert it here: // @section machine
// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
#define INVERT_X_DIR false #define INVERT_X_DIR false
#define INVERT_Y_DIR false #define INVERT_Y_DIR false
#define INVERT_Z_DIR false #define INVERT_Z_DIR false
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
#define INVERT_E0_DIR false #define INVERT_E0_DIR false
#define INVERT_E1_DIR false #define INVERT_E1_DIR false
#define INVERT_E2_DIR false #define INVERT_E2_DIR false
#define INVERT_E3_DIR false #define INVERT_E3_DIR false
// @section homing
// ENDSTOP SETTINGS: // ENDSTOP SETTINGS:
// Sets direction of endstops when homing; 1=MAX, -1=MIN // Sets direction of endstops when homing; 1=MAX, -1=MIN
// :[-1,1]
#define X_HOME_DIR -1 #define X_HOME_DIR -1
#define Y_HOME_DIR -1 #define Y_HOME_DIR -1
#define Z_HOME_DIR -1 #define Z_HOME_DIR -1
@ -352,6 +400,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS. #define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below. #define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below.
// @section machine
// Travel limits after homing (units are in mm) // Travel limits after homing (units are in mm)
#define X_MIN_POS 0 #define X_MIN_POS 0
#define Y_MIN_POS 0 #define Y_MIN_POS 0
@ -371,13 +421,17 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. //#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
//=========================================================================== //===========================================================================
//============================ Manual Bed Leveling ========================== //============================ Mesh Bed Leveling ============================
//=========================================================================== //===========================================================================
// #define MANUAL_BED_LEVELING // Add display menu option for bed leveling // #define MANUAL_BED_LEVELING // Add display menu option for bed leveling
// #define MESH_BED_LEVELING // Enable mesh bed leveling // #define MESH_BED_LEVELING // Enable mesh bed leveling
#if defined(MESH_BED_LEVELING) #ifdef MANUAL_BED_LEVELING
#define MBL_Z_STEP 0.025 // Step size while manually probing Z axis
#endif // MANUAL_BED_LEVELING
#ifdef MESH_BED_LEVELING
#define MESH_MIN_X 10 #define MESH_MIN_X 10
#define MESH_MAX_X (X_MAX_POS - MESH_MIN_X) #define MESH_MAX_X (X_MAX_POS - MESH_MIN_X)
#define MESH_MIN_Y 10 #define MESH_MIN_Y 10
@ -391,6 +445,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
//============================= Bed Auto Leveling =========================== //============================= Bed Auto Leveling ===========================
//=========================================================================== //===========================================================================
// @section bedlevel
//#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line) //#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line)
#define Z_PROBE_REPEATABILITY_TEST // If not commented out, Z-Probe Repeatability test will be included if Auto Bed Leveling is Enabled. #define Z_PROBE_REPEATABILITY_TEST // If not commented out, Z-Probe Repeatability test will be included if Auto Bed Leveling is Enabled.
@ -424,7 +480,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
// You probably don't need more than 3 (squared=9) // You probably don't need more than 3 (squared=9)
#define AUTO_BED_LEVELING_GRID_POINTS 2 #define AUTO_BED_LEVELING_GRID_POINTS 2
#else // !AUTO_BED_LEVELING_GRID #else // !AUTO_BED_LEVELING_GRID
// Arbitrary points to probe. A simple cross-product // Arbitrary points to probe. A simple cross-product
@ -438,7 +493,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
#endif // AUTO_BED_LEVELING_GRID #endif // AUTO_BED_LEVELING_GRID
// Offsets to the probe relative to the extruder tip (Hotend - Probe) // Offsets to the probe relative to the extruder tip (Hotend - Probe)
// X and Y offsets must be integers // X and Y offsets must be integers
#define X_PROBE_OFFSET_FROM_EXTRUDER -25 // Probe on: -left +right #define X_PROBE_OFFSET_FROM_EXTRUDER -25 // Probe on: -left +right
@ -484,9 +538,25 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
#endif #endif
// Support for a dedicated Z PROBE endstop separate from the Z MIN endstop.
// If you would like to use both a Z PROBE and a Z MIN endstop together or just a Z PROBE with a custom pin, uncomment #define Z_PROBE_ENDSTOP and read the instructions below.
// If you want to still use the Z min endstop for homing, disable Z_SAFE_HOMING above. Eg; to park the head outside the bed area when homing with G28.
// WARNING: The Z MIN endstop will need to set properly as it would without a Z PROBE to prevent head crashes and premature stopping during a print.
// To use a separate Z PROBE endstop, you must have a Z_PROBE_PIN defined in the pins.h file for your control board.
// If you are using a servo based Z PROBE, you will need to enable NUM_SERVOS, SERVO_ENDSTOPS and SERVO_ENDSTOPS_ANGLES in the R/C Servo below.
// RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin in the Aux 4 section of the RAMPS board. Use 5V for powered sensors, otherwise connect to ground and D32
// for normally closed configuration and 5V and D32 for normally open configurations. Normally closed configuration is advised and assumed.
// The D32 pin in Aux 4 on RAMPS maps to the Arduino D32 pin. Z_PROBE_PIN is setting the pin to use on the Arduino. Since the D32 pin on the RAMPS maps to D32 on Arduino, this works.
// D32 is currently selected in the RAMPS 1.3/1.4 pin file. All other boards will need changes to the respective pins_XXXXX.h file.
// WARNING: Setting the wrong pin may have unexpected and potentially disastrous outcomes. Use with caution and do your homework.
//#define Z_PROBE_ENDSTOP
#endif // ENABLE_AUTO_BED_LEVELING #endif // ENABLE_AUTO_BED_LEVELING
// @section homing
// The position of the homing switches // The position of the homing switches
//#define MANUAL_HOME_POSITIONS // If defined, MANUAL_*_HOME_POS below will be used //#define MANUAL_HOME_POSITIONS // If defined, MANUAL_*_HOME_POS below will be used
//#define BED_CENTER_AT_0_0 // If defined, the center of the bed is at (X=0, Y=0) //#define BED_CENTER_AT_0_0 // If defined, the center of the bed is at (X=0, Y=0)
@ -500,8 +570,12 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
//#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing. //#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing.
#endif #endif
//// MOVEMENT SETTINGS // @section movement
#define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
/**
* MOVEMENT SETTINGS
*/
#define HOMING_FEEDRATE {50*60, 50*60, 4*60, 0} // set the homing speeds (mm/min) #define HOMING_FEEDRATE {50*60, 50*60, 4*60, 0} // set the homing speeds (mm/min)
// default settings // default settings
@ -514,12 +588,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
#define DEFAULT_RETRACT_ACCELERATION 3000 // E acceleration in mm/s^2 for retracts #define DEFAULT_RETRACT_ACCELERATION 3000 // E acceleration in mm/s^2 for retracts
#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves #define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).
// For the other hotends it is their distance from the extruder 0 hotend.
// #define EXTRUDER_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis
// #define EXTRUDER_OFFSET_Y {0.0, 5.00} // (in mm) for each extruder, offset of the hotend on the Y axis
// The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously) // The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously)
#define DEFAULT_XYJERK 20.0 // (mm/sec) #define DEFAULT_XYJERK 20.0 // (mm/sec)
#define DEFAULT_ZJERK 0.4 // (mm/sec) #define DEFAULT_ZJERK 0.4 // (mm/sec)
@ -530,14 +598,19 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
//============================= Additional Features =========================== //============================= Additional Features ===========================
//============================================================================= //=============================================================================
// @section more
// Custom M code points // Custom M code points
#define CUSTOM_M_CODES #define CUSTOM_M_CODES
#ifdef CUSTOM_M_CODES #ifdef CUSTOM_M_CODES
#ifdef ENABLE_AUTO_BED_LEVELING
#define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851 #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
#define Z_PROBE_OFFSET_RANGE_MIN -15 #define Z_PROBE_OFFSET_RANGE_MIN -20
#define Z_PROBE_OFFSET_RANGE_MAX -5 #define Z_PROBE_OFFSET_RANGE_MAX 20
#endif
#endif #endif
// @section extras
// EEPROM // EEPROM
// The microcontroller can store settings in the EEPROM, e.g. max velocity... // The microcontroller can store settings in the EEPROM, e.g. max velocity...
@ -546,9 +619,14 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. // M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
//define this to enable EEPROM support //define this to enable EEPROM support
//#define EEPROM_SETTINGS //#define EEPROM_SETTINGS
//to disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
// please keep turned on if you can. #ifdef EEPROM_SETTINGS
//#define EEPROM_CHITCHAT // To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
#define EEPROM_CHITCHAT // please keep turned on if you can.
#endif
// @section temperature
// Preheat Constants // Preheat Constants
#define PLA_PREHEAT_HOTEND_TEMP 180 #define PLA_PREHEAT_HOTEND_TEMP 180
@ -560,15 +638,19 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
#define ABS_PREHEAT_FAN_SPEED 0 // Insert Value between 0 and 255 #define ABS_PREHEAT_FAN_SPEED 0 // Insert Value between 0 and 255
//==============================LCD and SD support============================= //==============================LCD and SD support=============================
// @section lcd
// Define your display language below. Replace (en) with your language code and uncomment. // Define your display language below. Replace (en) with your language code and uncomment.
// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu // en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
// See also language.h // See also language.h
//#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
// Character based displays can have different extended charsets. // Choose ONE of these 3 charsets. This has to match your hardware. Ignored for full graphic display.
#define DISPLAY_CHARSET_HD44780_JAPAN // "ääööüüß23°" // 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.
//#define DISPLAY_CHARSET_HD44780_WESTERN // "ÄäÖöÜüß²³°" if you see a '~' instead of a 'arrow_right' at the right of submenuitems - this is the right one. // See also documentation/LCDLanguageFont.md
#define DISPLAY_CHARSET_HD44780_JAPAN // this is the most common hardware
//#define DISPLAY_CHARSET_HD44780_WESTERN
//#define DISPLAY_CHARSET_HD44780_CYRILLIC
//#define ULTRA_LCD //general LCD support, also 16x2 //#define ULTRA_LCD //general LCD support, also 16x2
//#define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family) //#define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
@ -581,6 +663,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
//#define ULTIPANEL //the UltiPanel as on Thingiverse //#define ULTIPANEL //the UltiPanel as on Thingiverse
//#define LCD_FEEDBACK_FREQUENCY_HZ 1000 // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click //#define LCD_FEEDBACK_FREQUENCY_HZ 1000 // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
// 0 to disable buzzer feedback
// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3) // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
// http://reprap.org/wiki/PanelOne // http://reprap.org/wiki/PanelOne
@ -639,11 +722,13 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
//#define SAV_3DLCD //#define SAV_3DLCD
// @section extras
// Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino // Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
//#define FAST_PWM_FAN //#define FAST_PWM_FAN
// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
// which is not ass annoying as with the hardware PWM. On the other hand, if this frequency // which is not as annoying as with the hardware PWM. On the other hand, if this frequency
// is too low, you should also increment SOFT_PWM_SCALE. // is too low, you should also increment SOFT_PWM_SCALE.
//#define FAN_SOFT_PWM //#define FAN_SOFT_PWM
@ -662,7 +747,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
// Data from: http://www.doc-diy.net/photo/rc-1_hacked/ // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
// #define PHOTOGRAPH_PIN 23 // #define PHOTOGRAPH_PIN 23
// SF send wrong arc g-codes when using Arc Point as fillet procedure // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
//#define SF_ARC_FIX //#define SF_ARC_FIX
// Support for the BariCUDA Paste Extruder. // Support for the BariCUDA Paste Extruder.
@ -688,7 +773,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
// Servo Endstops // Servo Endstops
// //
// This allows for servo actuated endstops, primary usage is for the Z Axis to eliminate calibration or bed height changes. // This allows for servo actuated endstops, primary usage is for the Z Axis to eliminate calibration or bed height changes.
// Use M206 command to correct for switch height offset to actual nozzle height. Store that setting with M500. // Use M851 to set the z-probe vertical offset from the nozzle. Store that setting with M500.
// //
//#define SERVO_ENDSTOPS {-1, -1, 0} // Servo index for X, Y, Z. Disable with -1 //#define SERVO_ENDSTOPS {-1, -1, 0} // Servo index for X, Y, Z. Disable with -1
//#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles //#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles

@ -3,7 +3,21 @@
* *
* Configuration and EEPROM storage * Configuration and EEPROM storage
* *
* V16 EEPROM Layout: * IMPORTANT: Whenever there are changes made to the variables stored in EEPROM
* in the functions below, also increment the version number. This makes sure that
* the default values are used whenever there is a change to the data, to prevent
* wrong data being written to the variables.
*
* ALSO: Variables in the Store and Retrieve sections must be in the same order.
* If a feature is disabled, some data must still be written that, when read,
* either sets a Sane Default, or results in No Change to the existing value.
*
*/
#define EEPROM_VERSION "V19"
/**
* V19 EEPROM Layout:
* *
* ver * ver
* axis_steps_per_unit (x4) * axis_steps_per_unit (x4)
@ -11,7 +25,7 @@
* max_acceleration_units_per_sq_second (x4) * max_acceleration_units_per_sq_second (x4)
* acceleration * acceleration
* retract_acceleration * retract_acceleration
* travel_aceeleration * travel_acceleration
* minimumfeedrate * minimumfeedrate
* mintravelfeedrate * mintravelfeedrate
* minsegmenttime * minsegmenttime
@ -25,6 +39,7 @@
* mesh_num_x * mesh_num_x
* mesh_num_y * mesh_num_y
* z_values[][] * z_values[][]
* zprobe_zoffset
* *
* DELTA: * DELTA:
* endstop_adj (x3) * endstop_adj (x3)
@ -39,7 +54,6 @@
* absPreheatHotendTemp * absPreheatHotendTemp
* absPreheatHPBTemp * absPreheatHPBTemp
* absPreheatFanSpeed * absPreheatFanSpeed
* zprobe_zoffset
* *
* PIDTEMP: * PIDTEMP:
* Kp[0], Ki[0], Kd[0], Kc[0] * Kp[0], Ki[0], Kd[0], Kc[0]
@ -47,6 +61,9 @@
* Kp[2], Ki[2], Kd[2], Kc[2] * Kp[2], Ki[2], Kd[2], Kc[2]
* Kp[3], Ki[3], Kd[3], Kc[3] * Kp[3], Ki[3], Kd[3], Kc[3]
* *
* PIDTEMPBED:
* bedKp, bedKi, bedKd
*
* DOGLCD: * DOGLCD:
* lcd_contrast * lcd_contrast
* *
@ -78,7 +95,7 @@
#include "ultralcd.h" #include "ultralcd.h"
#include "ConfigurationStore.h" #include "ConfigurationStore.h"
#if defined(MESH_BED_LEVELING) #ifdef MESH_BED_LEVELING
#include "mesh_bed_leveling.h" #include "mesh_bed_leveling.h"
#endif // MESH_BED_LEVELING #endif // MESH_BED_LEVELING
@ -111,15 +128,6 @@ void _EEPROM_readData(int &pos, uint8_t* value, uint8_t size) {
#define EEPROM_OFFSET 100 #define EEPROM_OFFSET 100
// IMPORTANT: Whenever there are changes made to the variables stored in EEPROM
// in the functions below, also increment the version number. This makes sure that
// the default values are used whenever there is a change to the data, to prevent
// wrong data being written to the variables.
// ALSO: always make sure the variables in the Store and retrieve sections are in the same order.
#define EEPROM_VERSION "V17"
#ifdef EEPROM_SETTINGS #ifdef EEPROM_SETTINGS
void Config_StoreSettings() { void Config_StoreSettings() {
@ -143,7 +151,7 @@ void Config_StoreSettings() {
uint8_t mesh_num_x = 3; uint8_t mesh_num_x = 3;
uint8_t mesh_num_y = 3; uint8_t mesh_num_y = 3;
#if defined(MESH_BED_LEVELING) #ifdef MESH_BED_LEVELING
// Compile time test that sizeof(mbl.z_values) is as expected // Compile time test that sizeof(mbl.z_values) is as expected
typedef char c_assert[(sizeof(mbl.z_values) == MESH_NUM_X_POINTS*MESH_NUM_Y_POINTS*sizeof(dummy)) ? 1 : -1]; typedef char c_assert[(sizeof(mbl.z_values) == MESH_NUM_X_POINTS*MESH_NUM_Y_POINTS*sizeof(dummy)) ? 1 : -1];
mesh_num_x = MESH_NUM_X_POINTS; mesh_num_x = MESH_NUM_X_POINTS;
@ -163,6 +171,11 @@ void Config_StoreSettings() {
} }
#endif // MESH_BED_LEVELING #endif // MESH_BED_LEVELING
#ifndef ENABLE_AUTO_BED_LEVELING
float zprobe_zoffset = 0;
#endif
EEPROM_WRITE_VAR(i, zprobe_zoffset);
#ifdef DELTA #ifdef DELTA
EEPROM_WRITE_VAR(i, endstop_adj); // 3 floats EEPROM_WRITE_VAR(i, endstop_adj); // 3 floats
EEPROM_WRITE_VAR(i, delta_radius); // 1 float EEPROM_WRITE_VAR(i, delta_radius); // 1 float
@ -188,7 +201,6 @@ void Config_StoreSettings() {
EEPROM_WRITE_VAR(i, absPreheatHotendTemp); EEPROM_WRITE_VAR(i, absPreheatHotendTemp);
EEPROM_WRITE_VAR(i, absPreheatHPBTemp); EEPROM_WRITE_VAR(i, absPreheatHPBTemp);
EEPROM_WRITE_VAR(i, absPreheatFanSpeed); EEPROM_WRITE_VAR(i, absPreheatFanSpeed);
EEPROM_WRITE_VAR(i, zprobe_zoffset);
for (int e = 0; e < 4; e++) { for (int e = 0; e < 4; e++) {
@ -204,12 +216,10 @@ void Config_StoreSettings() {
EEPROM_WRITE_VAR(i, dummy); EEPROM_WRITE_VAR(i, dummy);
#endif #endif
} }
else { else
#else // !PIDTEMP
{
#endif // !PIDTEMP #endif // !PIDTEMP
{
dummy = DUMMY_PID_VALUE; dummy = DUMMY_PID_VALUE; // When read, will not change the existing value
EEPROM_WRITE_VAR(i, dummy); EEPROM_WRITE_VAR(i, dummy);
dummy = 0.0f; dummy = 0.0f;
for (int q = 3; q--;) EEPROM_WRITE_VAR(i, dummy); for (int q = 3; q--;) EEPROM_WRITE_VAR(i, dummy);
@ -217,6 +227,14 @@ void Config_StoreSettings() {
} // Extruders Loop } // Extruders Loop
#ifndef PIDTEMPBED
float bedKp = DUMMY_PID_VALUE, bedKi = DUMMY_PID_VALUE, bedKd = DUMMY_PID_VALUE;
#endif
EEPROM_WRITE_VAR(i, bedKp);
EEPROM_WRITE_VAR(i, bedKi);
EEPROM_WRITE_VAR(i, bedKd);
#ifndef DOGLCD #ifndef DOGLCD
int lcd_contrast = 32; int lcd_contrast = 32;
#endif #endif
@ -258,8 +276,6 @@ void Config_StoreSettings() {
EEPROM_WRITE_VAR(i, dummy); EEPROM_WRITE_VAR(i, dummy);
} }
int storageSize = i;
char ver2[4] = EEPROM_VERSION; char ver2[4] = EEPROM_VERSION;
int j = EEPROM_OFFSET; int j = EEPROM_OFFSET;
EEPROM_WRITE_VAR(j, ver2); // validate data EEPROM_WRITE_VAR(j, ver2); // validate data
@ -305,7 +321,7 @@ void Config_RetrieveSettings() {
uint8_t mesh_num_x = 0; uint8_t mesh_num_x = 0;
uint8_t mesh_num_y = 0; uint8_t mesh_num_y = 0;
#if defined(MESH_BED_LEVELING) #ifdef MESH_BED_LEVELING
EEPROM_READ_VAR(i, mbl.active); EEPROM_READ_VAR(i, mbl.active);
EEPROM_READ_VAR(i, mesh_num_x); EEPROM_READ_VAR(i, mesh_num_x);
EEPROM_READ_VAR(i, mesh_num_y); EEPROM_READ_VAR(i, mesh_num_y);
@ -328,6 +344,11 @@ void Config_RetrieveSettings() {
} }
#endif // MESH_BED_LEVELING #endif // MESH_BED_LEVELING
#ifndef ENABLE_AUTO_BED_LEVELING
float zprobe_zoffset = 0;
#endif
EEPROM_READ_VAR(i, zprobe_zoffset);
#ifdef DELTA #ifdef DELTA
EEPROM_READ_VAR(i, endstop_adj); // 3 floats EEPROM_READ_VAR(i, endstop_adj); // 3 floats
EEPROM_READ_VAR(i, delta_radius); // 1 float EEPROM_READ_VAR(i, delta_radius); // 1 float
@ -353,11 +374,10 @@ void Config_RetrieveSettings() {
EEPROM_READ_VAR(i, absPreheatHotendTemp); EEPROM_READ_VAR(i, absPreheatHotendTemp);
EEPROM_READ_VAR(i, absPreheatHPBTemp); EEPROM_READ_VAR(i, absPreheatHPBTemp);
EEPROM_READ_VAR(i, absPreheatFanSpeed); EEPROM_READ_VAR(i, absPreheatFanSpeed);
EEPROM_READ_VAR(i, zprobe_zoffset);
#ifdef PIDTEMP #ifdef PIDTEMP
for (int e = 0; e < 4; e++) { // 4 = max extruders currently supported by Marlin for (int e = 0; e < 4; e++) { // 4 = max extruders currently supported by Marlin
EEPROM_READ_VAR(i, dummy); EEPROM_READ_VAR(i, dummy); // Kp
if (e < EXTRUDERS && dummy != DUMMY_PID_VALUE) { if (e < EXTRUDERS && dummy != DUMMY_PID_VALUE) {
// do not need to scale PID values as the values in EEPROM are already scaled // do not need to scale PID values as the values in EEPROM are already scaled
PID_PARAM(Kp, e) = dummy; PID_PARAM(Kp, e) = dummy;
@ -378,6 +398,20 @@ void Config_RetrieveSettings() {
for (int q=16; q--;) EEPROM_READ_VAR(i, dummy); // 4x Kp, Ki, Kd, Kc for (int q=16; q--;) EEPROM_READ_VAR(i, dummy); // 4x Kp, Ki, Kd, Kc
#endif // !PIDTEMP #endif // !PIDTEMP
#ifndef PIDTEMPBED
float bedKp, bedKi, bedKd;
#endif
EEPROM_READ_VAR(i, dummy); // bedKp
if (dummy != DUMMY_PID_VALUE) {
bedKp = dummy;
EEPROM_READ_VAR(i, bedKi);
EEPROM_READ_VAR(i, bedKd);
}
else {
for (int q=2; q--;) EEPROM_READ_VAR(i, dummy); // bedKi, bedKd
}
#ifndef DOGLCD #ifndef DOGLCD
int lcd_contrast; int lcd_contrast;
#endif #endif
@ -437,7 +471,7 @@ void Config_ResetDefault() {
float tmp1[] = DEFAULT_AXIS_STEPS_PER_UNIT; float tmp1[] = DEFAULT_AXIS_STEPS_PER_UNIT;
float tmp2[] = DEFAULT_MAX_FEEDRATE; float tmp2[] = DEFAULT_MAX_FEEDRATE;
long tmp3[] = DEFAULT_MAX_ACCELERATION; long tmp3[] = DEFAULT_MAX_ACCELERATION;
for (int i = 0; i < NUM_AXIS; i++) { for (uint16_t i = 0; i < NUM_AXIS; i++) {
axis_steps_per_unit[i] = tmp1[i]; axis_steps_per_unit[i] = tmp1[i];
max_feedrate[i] = tmp2[i]; max_feedrate[i] = tmp2[i];
max_acceleration_units_per_sq_second[i] = tmp3[i]; max_acceleration_units_per_sq_second[i] = tmp3[i];
@ -461,9 +495,13 @@ void Config_ResetDefault() {
max_e_jerk = DEFAULT_EJERK; max_e_jerk = DEFAULT_EJERK;
home_offset[X_AXIS] = home_offset[Y_AXIS] = home_offset[Z_AXIS] = 0; home_offset[X_AXIS] = home_offset[Y_AXIS] = home_offset[Z_AXIS] = 0;
#if defined(MESH_BED_LEVELING) #ifdef MESH_BED_LEVELING
mbl.active = 0; mbl.active = 0;
#endif // MESH_BED_LEVELING #endif
#ifdef ENABLE_AUTO_BED_LEVELING
zprobe_zoffset = -Z_PROBE_OFFSET_FROM_EXTRUDER;
#endif
#ifdef DELTA #ifdef DELTA
endstop_adj[X_AXIS] = endstop_adj[Y_AXIS] = endstop_adj[Z_AXIS] = 0; endstop_adj[X_AXIS] = endstop_adj[Y_AXIS] = endstop_adj[Z_AXIS] = 0;
@ -484,10 +522,6 @@ void Config_ResetDefault() {
absPreheatFanSpeed = ABS_PREHEAT_FAN_SPEED; absPreheatFanSpeed = ABS_PREHEAT_FAN_SPEED;
#endif #endif
#ifdef ENABLE_AUTO_BED_LEVELING
zprobe_zoffset = -Z_PROBE_OFFSET_FROM_EXTRUDER;
#endif
#ifdef DOGLCD #ifdef DOGLCD
lcd_contrast = DEFAULT_LCD_CONTRAST; lcd_contrast = DEFAULT_LCD_CONTRAST;
#endif #endif
@ -510,6 +544,12 @@ void Config_ResetDefault() {
updatePID(); updatePID();
#endif // PIDTEMP #endif // PIDTEMP
#ifdef PIDTEMPBED
bedKp = DEFAULT_bedKp;
bedKi = scalePID_i(DEFAULT_bedKi);
bedKd = scalePID_d(DEFAULT_bedKd);
#endif
#ifdef FWRETRACT #ifdef FWRETRACT
autoretract_enabled = false; autoretract_enabled = false;
retract_length = RETRACT_LENGTH; retract_length = RETRACT_LENGTH;
@ -629,7 +669,7 @@ void Config_PrintSettings(bool forReplay) {
#ifdef DELTA #ifdef DELTA
SERIAL_ECHO_START; SERIAL_ECHO_START;
if (!forReplay) { if (!forReplay) {
SERIAL_ECHOLNPGM("Endstop adjustement (mm):"); SERIAL_ECHOLNPGM("Endstop adjustment (mm):");
SERIAL_ECHO_START; SERIAL_ECHO_START;
} }
SERIAL_ECHOPAIR(" M666 X", endstop_adj[X_AXIS] ); SERIAL_ECHOPAIR(" M666 X", endstop_adj[X_AXIS] );
@ -646,24 +686,35 @@ void Config_PrintSettings(bool forReplay) {
#elif defined(Z_DUAL_ENDSTOPS) #elif defined(Z_DUAL_ENDSTOPS)
SERIAL_ECHO_START; SERIAL_ECHO_START;
if (!forReplay) { if (!forReplay) {
SERIAL_ECHOLNPGM("Z2 Endstop adjustement (mm):"); SERIAL_ECHOLNPGM("Z2 Endstop adjustment (mm):");
SERIAL_ECHO_START; SERIAL_ECHO_START;
} }
SERIAL_ECHOPAIR(" M666 Z", z_endstop_adj ); SERIAL_ECHOPAIR(" M666 Z", z_endstop_adj );
SERIAL_EOL; SERIAL_EOL;
#endif // DELTA #endif // DELTA
#ifdef PIDTEMP #if defined(PIDTEMP) || defined(PIDTEMPBED)
SERIAL_ECHO_START; SERIAL_ECHO_START;
if (!forReplay) { if (!forReplay) {
SERIAL_ECHOLNPGM("PID settings:"); SERIAL_ECHOLNPGM("PID settings:");
SERIAL_ECHO_START; SERIAL_ECHO_START;
} }
#if defined(PIDTEMP) && defined(PIDTEMPBED)
SERIAL_EOL;
#endif
#ifdef PIDTEMP
SERIAL_ECHOPAIR(" M301 P", PID_PARAM(Kp, 0)); // for compatibility with hosts, only echos values for E0 SERIAL_ECHOPAIR(" M301 P", PID_PARAM(Kp, 0)); // for compatibility with hosts, only echos values for E0
SERIAL_ECHOPAIR(" I", unscalePID_i(PID_PARAM(Ki, 0))); SERIAL_ECHOPAIR(" I", unscalePID_i(PID_PARAM(Ki, 0)));
SERIAL_ECHOPAIR(" D", unscalePID_d(PID_PARAM(Kd, 0))); SERIAL_ECHOPAIR(" D", unscalePID_d(PID_PARAM(Kd, 0)));
SERIAL_EOL; SERIAL_EOL;
#endif // PIDTEMP #endif
#ifdef PIDTEMPBED
SERIAL_ECHOPAIR(" M304 P", bedKp); // for compatibility with hosts, only echos values for E0
SERIAL_ECHOPAIR(" I", unscalePID_i(bedKi));
SERIAL_ECHOPAIR(" D", unscalePID_d(bedKd));
SERIAL_EOL;
#endif
#endif
#ifdef FWRETRACT #ifdef FWRETRACT
@ -738,15 +789,20 @@ void Config_PrintSettings(bool forReplay) {
} }
} }
#ifdef CUSTOM_M_CODES #ifdef ENABLE_AUTO_BED_LEVELING
SERIAL_ECHO_START; SERIAL_ECHO_START;
#ifdef CUSTOM_M_CODES
if (!forReplay) { if (!forReplay) {
SERIAL_ECHOLNPGM("Z-Probe Offset (mm):"); SERIAL_ECHOLNPGM("Z-Probe Offset (mm):");
SERIAL_ECHO_START; SERIAL_ECHO_START;
} }
SERIAL_ECHO(" M"); SERIAL_ECHOPAIR(" M", (unsigned long)CUSTOM_M_CODE_SET_Z_PROBE_OFFSET);
SERIAL_ECHO(CUSTOM_M_CODE_SET_Z_PROBE_OFFSET);
SERIAL_ECHOPAIR(" Z", -zprobe_zoffset); SERIAL_ECHOPAIR(" Z", -zprobe_zoffset);
#else
if (!forReplay) {
SERIAL_ECHOPAIR("Z-Probe Offset (mm):", -zprobe_zoffset);
}
#endif
SERIAL_EOL; SERIAL_EOL;
#endif #endif
} }

@ -3,6 +3,8 @@
#include "Conditionals.h" #include "Conditionals.h"
// @section temperature
//=========================================================================== //===========================================================================
//=============================Thermal Settings ============================ //=============================Thermal Settings ============================
//=========================================================================== //===========================================================================
@ -46,6 +48,8 @@
//The M105 command return, besides traditional information, the ADC value read from temperature sensors. //The M105 command return, besides traditional information, the ADC value read from temperature sensors.
//#define SHOW_TEMP_ADC_VALUES //#define SHOW_TEMP_ADC_VALUES
// @section extruder
// extruder run-out prevention. // extruder run-out prevention.
//if the machine is idle, and the temperature over MINTEMP, every couple of SECONDS some filament is extruded //if the machine is idle, and the temperature over MINTEMP, every couple of SECONDS some filament is extruded
//#define EXTRUDER_RUNOUT_PREVENT //#define EXTRUDER_RUNOUT_PREVENT
@ -55,6 +59,8 @@
#define EXTRUDER_RUNOUT_SPEED 1500. //extrusion speed #define EXTRUDER_RUNOUT_SPEED 1500. //extrusion speed
#define EXTRUDER_RUNOUT_EXTRUDE 100 #define EXTRUDER_RUNOUT_EXTRUDE 100
// @section temperature
//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements. //These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET" //The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
#define TEMP_SENSOR_AD595_OFFSET 0.0 #define TEMP_SENSOR_AD595_OFFSET 0.0
@ -72,6 +78,8 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu) // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100 //#define FAN_KICKSTART_TIME 100
// @section extruder
// Extruder cooling fans // Extruder cooling fans
// Configure fan pin outputs to automatically turn on/off when the associated // Configure fan pin outputs to automatically turn on/off when the associated
// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE. // extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE.
@ -89,8 +97,12 @@
//=============================Mechanical Settings=========================== //=============================Mechanical Settings===========================
//=========================================================================== //===========================================================================
// @section homing
#define ENDSTOPS_ONLY_FOR_HOMING // If defined the endstops will only be used for homing #define ENDSTOPS_ONLY_FOR_HOMING // If defined the endstops will only be used for homing
// @section extras
//#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats. //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
// A single Z stepper driver is usually used to drive 2 stepper motors. // A single Z stepper driver is usually used to drive 2 stepper motors.
@ -98,32 +110,31 @@
// Only a few motherboards support this, like RAMPS, which have dual extruder support (the 2nd, often unused, extruder driver is used // Only a few motherboards support this, like RAMPS, which have dual extruder support (the 2nd, often unused, extruder driver is used
// to control the 2nd Z axis stepper motor). The pins are currently only defined for a RAMPS motherboards. // to control the 2nd Z axis stepper motor). The pins are currently only defined for a RAMPS motherboards.
// On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder. // On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder.
#define Z_DUAL_STEPPER_DRIVERS //#define Z_DUAL_STEPPER_DRIVERS
#ifdef Z_DUAL_STEPPER_DRIVERS #ifdef Z_DUAL_STEPPER_DRIVERS
// 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. // 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.
// That way the machine is capable to align the bed during home, since both Z steppers are homed. // That way the machine is capable to align the bed during home, since both Z steppers are homed.
// There is also an implementation of M666 (software endstops adjustment) to this feature. // There is also an implementation of M666 (software endstops adjustment) to this feature.
// After Z homing, this adjustment is applied to just one of the steppers in order to align the bed. // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed.
// 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. // 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.
// 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. // 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.
// Play a little bit with small adjustments (0.5mm) and check the behaviour. // Play a little bit with small adjustments (0.5mm) and check the behaviour.
// The M119 (endstops report) will start reporting the Z2 Endstop as well. // The M119 (endstops report) will start reporting the Z2 Endstop as well.
#define Z_DUAL_ENDSTOPS #define Z_DUAL_ENDSTOPS
#ifdef Z_DUAL_ENDSTOPS #ifdef Z_DUAL_ENDSTOPS
#define Z2_STEP_PIN E2_STEP_PIN // Stepper to be used to Z2 axis. #define Z2_STEP_PIN E2_STEP_PIN // Stepper to be used to Z2 axis.
#define Z2_DIR_PIN E2_DIR_PIN #define Z2_DIR_PIN E2_DIR_PIN
#define Z2_ENABLE_PIN E2_ENABLE_PIN #define Z2_ENABLE_PIN E2_ENABLE_PIN
#define Z2_MAX_PIN 36 //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36) #define Z2_MAX_PIN 36 //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36)
const bool Z2_MAX_ENDSTOP_INVERTING = false; const bool Z2_MAX_ENDSTOP_INVERTING = false;
#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. #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.
#endif #endif
#endif #endif // Z_DUAL_STEPPER_DRIVERS
// Same again but for Y Axis. // Same again but for Y Axis.
//#define Y_DUAL_STEPPER_DRIVERS //#define Y_DUAL_STEPPER_DRIVERS
@ -175,15 +186,21 @@
#endif //DUAL_X_CARRIAGE #endif //DUAL_X_CARRIAGE
// @section homing
//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again: //homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
#define X_HOME_RETRACT_MM 5 #define X_HOME_BUMP_MM 5
#define Y_HOME_RETRACT_MM 5 #define Y_HOME_BUMP_MM 5
#define Z_HOME_RETRACT_MM 2 #define Z_HOME_BUMP_MM 2
#define HOMING_BUMP_DIVISOR {10, 10, 20} // Re-Bump Speed Divisor (Divides the Homing Feedrate) #define HOMING_BUMP_DIVISOR {2, 2, 4} // Re-Bump Speed Divisor (Divides the Homing Feedrate)
//#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially. //#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
// @section machine
#define AXIS_RELATIVE_MODES {false, false, false, false} #define AXIS_RELATIVE_MODES {false, false, false, false}
// @section machine
//By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. //By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step.
#define INVERT_X_STEP_PIN false #define INVERT_X_STEP_PIN false
#define INVERT_Y_STEP_PIN false #define INVERT_Y_STEP_PIN false
@ -196,11 +213,15 @@
#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
#define DEFAULT_MINTRAVELFEEDRATE 0.0 #define DEFAULT_MINTRAVELFEEDRATE 0.0
// @section lcd
#ifdef ULTIPANEL #ifdef ULTIPANEL
#define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel
#define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder
#endif #endif
// @section extras
// minimum time in microseconds that a movement needs to take if the buffer is emptied. // minimum time in microseconds that a movement needs to take if the buffer is emptied.
#define DEFAULT_MINSEGMENTTIME 20000 #define DEFAULT_MINSEGMENTTIME 20000
@ -242,18 +263,28 @@
//#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/ //#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/
#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
#define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? // @section lcd
#define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
#define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. #ifdef SDSUPPORT
// 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.
// using: // If you are using a RAMPS board or cheap E-bay purchased boards that do not detect when an SD card is inserted
//#define MENU_ADDAUTOSTART // You can get round this by connecting a push button or single throw switch to the pin defined as SDCARDCARDDETECT
// in the pins.h file. When using a push button pulling the pin to ground this will need inverted. This setting should
// be commented out otherwise
#define SDCARDDETECTINVERTED
#define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers?
#define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
#define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order.
// 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.
// using:
//#define MENU_ADDAUTOSTART
// Show a progress bar on HD44780 LCDs for SD printing // Show a progress bar on HD44780 LCDs for SD printing
//#define LCD_PROGRESS_BAR //#define LCD_PROGRESS_BAR
#ifdef LCD_PROGRESS_BAR #ifdef LCD_PROGRESS_BAR
// Amount of time (ms) to show the bar // Amount of time (ms) to show the bar
#define PROGRESS_BAR_BAR_TIME 2000 #define PROGRESS_BAR_BAR_TIME 2000
// Amount of time (ms) to show the status message // Amount of time (ms) to show the status message
@ -262,7 +293,11 @@
#define PROGRESS_MSG_EXPIRE 0 #define PROGRESS_MSG_EXPIRE 0
// Enable this to show messages for MSG_TIME then hide them // Enable this to show messages for MSG_TIME then hide them
//#define PROGRESS_MSG_ONCE //#define PROGRESS_MSG_ONCE
#endif #endif
#endif // SDSUPPORT
// @section more
// The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation. // The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
//#define USE_WATCHDOG //#define USE_WATCHDOG
@ -277,6 +312,8 @@
// Enable the option to stop SD printing when hitting and endstops, needs to be enabled from the LCD menu when this option is enabled. // Enable the option to stop SD printing when hitting and endstops, needs to be enabled from the LCD menu when this option is enabled.
//#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
// @section lcd
// Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process // Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process
// it can e.g. be used to change z-positions in the print startup phase in real-time // it can e.g. be used to change z-positions in the print startup phase in real-time
// does not respect endstops! // does not respect endstops!
@ -287,6 +324,8 @@
#define BABYSTEP_Z_MULTIPLICATOR 2 //faster z movements #define BABYSTEP_Z_MULTIPLICATOR 2 //faster z movements
#endif #endif
// @section extruder
// extruder advance constant (s2/mm3) // extruder advance constant (s2/mm3)
// //
// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2 // advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
@ -300,7 +339,9 @@
#define EXTRUDER_ADVANCE_K .0 #define EXTRUDER_ADVANCE_K .0
#define D_FILAMENT 2.85 #define D_FILAMENT 2.85
#define STEPS_MM_E 836 #define STEPS_MM_E 836
#endif // ADVANCE #endif
// @section extras
// Arc interpretation settings: // Arc interpretation settings:
#define MM_PER_ARC_SEGMENT 1 #define MM_PER_ARC_SEGMENT 1
@ -308,11 +349,7 @@
const unsigned int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement const unsigned int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement
// If you are using a RAMPS board or cheap E-bay purchased boards that do not detect when an SD card is inserted // @section temperature
// You can get round this by connecting a push button or single throw switch to the pin defined as SDCARDCARDDETECT
// in the pins.h file. When using a push button pulling the pin to ground this will need inverted. This setting should
// be commented out otherwise
#define SDCARDDETECTINVERTED
// Control heater 0 and heater 1 in parallel. // Control heater 0 and heater 1 in parallel.
//#define HEATERS_PARALLEL //#define HEATERS_PARALLEL
@ -321,6 +358,8 @@ const unsigned int dropsegments=5; //everything with less than this number of st
//=============================Buffers ============================ //=============================Buffers ============================
//=========================================================================== //===========================================================================
// @section hidden
// The number of linear motions that can be in the plan at any give time. // The number of linear motions that can be in the plan at any give time.
// 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. // 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.
#ifdef SDSUPPORT #ifdef SDSUPPORT
@ -329,11 +368,13 @@ const unsigned int dropsegments=5; //everything with less than this number of st
#define BLOCK_BUFFER_SIZE 16 // maximize block buffer #define BLOCK_BUFFER_SIZE 16 // maximize block buffer
#endif #endif
// @section more
//The ASCII buffer for receiving from the serial: //The ASCII buffer for receiving from the serial:
#define MAX_CMD_SIZE 96 #define MAX_CMD_SIZE 96
#define BUFSIZE 4 #define BUFSIZE 4
// @section fwretract
// Firmware based and LCD controlled retract // Firmware based and LCD controlled retract
// M207 and M208 can be used to define parameters for the retraction. // M207 and M208 can be used to define parameters for the retraction.
@ -370,6 +411,8 @@ const unsigned int dropsegments=5; //everything with less than this number of st
* you need to import the TMC26XStepper library into the arduino IDE for this * you need to import the TMC26XStepper library into the arduino IDE for this
******************************************************************************/ ******************************************************************************/
// @section tmc
//#define HAVE_TMCDRIVER //#define HAVE_TMCDRIVER
#ifdef HAVE_TMCDRIVER #ifdef HAVE_TMCDRIVER
@ -430,6 +473,8 @@ const unsigned int dropsegments=5; //everything with less than this number of st
* you need to import the L6470 library into the arduino IDE for this * you need to import the L6470 library into the arduino IDE for this
******************************************************************************/ ******************************************************************************/
// @section l6470
//#define HAVE_L6470DRIVER //#define HAVE_L6470DRIVER
#ifdef HAVE_L6470DRIVER #ifdef HAVE_L6470DRIVER

@ -1,393 +0,0 @@
#include "LiquidCrystalRus.h"
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
#include <avr/pgmspace.h>
#if defined(ARDUINO) && ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif
// it is a Russian alphabet translation
// except 0401 --> 0xa2 = ╗, 0451 --> 0xb5
const PROGMEM uint8_t utf_recode[] =
{ 0x41,0xa0,0x42,0xa1,0xe0,0x45,0xa3,0xa4,
0xa5,0xa6,0x4b,0xa7,0x4d,0x48,0x4f,0xa8,
0x50,0x43,0x54,0xa9,0xaa,0x58,0xe1,0xab,
0xac,0xe2,0xad,0xae,0x62,0xaf,0xb0,0xb1,
0x61,0xb2,0xb3,0xb4,0xe3,0x65,0xb6,0xb7,
0xb8,0xb9,0xba,0xbb,0xbc,0xbd,0x6f,0xbe,
0x70,0x63,0xbf,0x79,0xe4,0x78,0xe5,0xc0,
0xc1,0xe6,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7
};
// When the display powers up, it is configured as follows:
//
// 1. Display clear
// 2. Function set:
// DL = 1; 8-bit interface data
// N = 0; 1-line display
// F = 0; 5x8 dot character font
// 3. Display on/off control:
// D = 0; Display off
// C = 0; Cursor off
// B = 0; Blinking off
// 4. Entry mode set:
// I/D = 1; Increment by 1
// S = 0; No shift
//
// Note, however, that resetting the Arduino doesn't reset the LCD, so we
// can't assume that it's in that state when a sketch starts (and the
// LiquidCrystal constructor is called).
//
// modified 27 Jul 2011
// by Ilya V. Danilov http://mk90.ru/
LiquidCrystalRus::LiquidCrystalRus(uint8_t rs, uint8_t rw, uint8_t enable,
uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7)
{
init(0, rs, rw, enable, d0, d1, d2, d3, d4, d5, d6, d7);
}
LiquidCrystalRus::LiquidCrystalRus(uint8_t rs, uint8_t enable,
uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7)
{
init(0, rs, 255, enable, d0, d1, d2, d3, d4, d5, d6, d7);
}
LiquidCrystalRus::LiquidCrystalRus(uint8_t rs, uint8_t rw, uint8_t enable,
uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3)
{
init(1, rs, rw, enable, d0, d1, d2, d3, 0, 0, 0, 0);
}
LiquidCrystalRus::LiquidCrystalRus(uint8_t rs, uint8_t enable,
uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3)
{
init(1, rs, 255, enable, d0, d1, d2, d3, 0, 0, 0, 0);
}
void LiquidCrystalRus::init(uint8_t fourbitmode, uint8_t rs, uint8_t rw, uint8_t enable,
uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7)
{
_rs_pin = rs;
_rw_pin = rw;
_enable_pin = enable;
_data_pins[0] = d0;
_data_pins[1] = d1;
_data_pins[2] = d2;
_data_pins[3] = d3;
_data_pins[4] = d4;
_data_pins[5] = d5;
_data_pins[6] = d6;
_data_pins[7] = d7;
pinMode(_rs_pin, OUTPUT);
// we can save 1 pin by not using RW. Indicate by passing 255 instead of pin#
if (_rw_pin != 255) {
pinMode(_rw_pin, OUTPUT);
}
pinMode(_enable_pin, OUTPUT);
if (fourbitmode)
_displayfunction = LCD_4BITMODE | LCD_1LINE | LCD_5x8DOTS;
else
_displayfunction = LCD_8BITMODE | LCD_1LINE | LCD_5x8DOTS;
begin(16, 1);
}
void LiquidCrystalRus::begin(uint8_t cols, uint8_t lines, uint8_t dotsize) {
if (lines > 1) {
_displayfunction |= LCD_2LINE;
}
_numlines = lines;
_currline = 0;
// for some 1 line displays you can select a 10 pixel high font
if ((dotsize != 0) && (lines == 1)) {
_displayfunction |= LCD_5x10DOTS;
}
// SEE PAGE 45/46 FOR INITIALIZATION SPECIFICATION!
// according to datasheet, we need at least 40ms after power rises above 2.7V
// before sending commands. Arduino can turn on way before 4.5V so we'll wait 50
delayMicroseconds(50000);
// Now we pull both RS and R/W low to begin commands
digitalWrite(_rs_pin, LOW);
digitalWrite(_enable_pin, LOW);
if (_rw_pin != 255) {
digitalWrite(_rw_pin, LOW);
}
//put the LCD into 4 bit or 8 bit mode
if (! (_displayfunction & LCD_8BITMODE)) {
// this is according to the Hitachi HD44780 datasheet
// figure 24, pg 46
// we start in 8bit mode, try to set 4 bit mode
writeNbits(0x03,4);
delayMicroseconds(4500); // wait min 4.1ms
// second try
writeNbits(0x03,4);
delayMicroseconds(4500); // wait min 4.1ms
// third go!
writeNbits(0x03,4);
delayMicroseconds(150);
// finally, set to 8-bit interface
writeNbits(0x02,4);
} else {
// this is according to the Hitachi HD44780 datasheet
// page 45 figure 23
// Send function set command sequence
command(LCD_FUNCTIONSET | _displayfunction);
delayMicroseconds(4500); // wait more than 4.1ms
// second try
command(LCD_FUNCTIONSET | _displayfunction);
delayMicroseconds(150);
// third go
command(LCD_FUNCTIONSET | _displayfunction);
}
// finally, set # lines, font size, etc.
command(LCD_FUNCTIONSET | _displayfunction);
// turn the display on with no cursor or blinking default
_displaycontrol = LCD_DISPLAYON | LCD_CURSOROFF | LCD_BLINKOFF;
display();
// clear it off
clear();
// Initialize to default text direction (for romance languages)
_displaymode = LCD_ENTRYLEFT | LCD_ENTRYSHIFTDECREMENT;
// set the entry mode
command(LCD_ENTRYMODESET | _displaymode);
}
void LiquidCrystalRus::setDRAMModel(uint8_t model) {
_dram_model = model;
}
/********** high level commands, for the user! */
void LiquidCrystalRus::clear()
{
command(LCD_CLEARDISPLAY); // clear display, set cursor position to zero
delayMicroseconds(2000); // this command takes a long time!
}
void LiquidCrystalRus::home()
{
command(LCD_RETURNHOME); // set cursor position to zero
delayMicroseconds(2000); // this command takes a long time!
}
void LiquidCrystalRus::setCursor(uint8_t col, uint8_t row)
{
int row_offsets[] = { 0x00, 0x40, 0x14, 0x54 };
if ( row >= _numlines ) {
row = _numlines-1; // we count rows starting w/0
}
command(LCD_SETDDRAMADDR | (col + row_offsets[row]));
}
// Turn the display on/off (quickly)
void LiquidCrystalRus::noDisplay() {
_displaycontrol &= ~LCD_DISPLAYON;
command(LCD_DISPLAYCONTROL | _displaycontrol);
}
void LiquidCrystalRus::display() {
_displaycontrol |= LCD_DISPLAYON;
command(LCD_DISPLAYCONTROL | _displaycontrol);
}
// Turns the underline cursor on/off
void LiquidCrystalRus::noCursor() {
_displaycontrol &= ~LCD_CURSORON;
command(LCD_DISPLAYCONTROL | _displaycontrol);
}
void LiquidCrystalRus::cursor() {
_displaycontrol |= LCD_CURSORON;
command(LCD_DISPLAYCONTROL | _displaycontrol);
}
// Turn on and off the blinking cursor
void LiquidCrystalRus::noBlink() {
_displaycontrol &= ~LCD_BLINKON;
command(LCD_DISPLAYCONTROL | _displaycontrol);
}
void LiquidCrystalRus::blink() {
_displaycontrol |= LCD_BLINKON;
command(LCD_DISPLAYCONTROL | _displaycontrol);
}
// These commands scroll the display without changing the RAM
void LiquidCrystalRus::scrollDisplayLeft(void) {
command(LCD_CURSORSHIFT | LCD_DISPLAYMOVE | LCD_MOVELEFT);
}
void LiquidCrystalRus::scrollDisplayRight(void) {
command(LCD_CURSORSHIFT | LCD_DISPLAYMOVE | LCD_MOVERIGHT);
}
// This is for text that flows Left to Right
void LiquidCrystalRus::leftToRight(void) {
_displaymode |= LCD_ENTRYLEFT;
command(LCD_ENTRYMODESET | _displaymode);
}
// This is for text that flows Right to Left
void LiquidCrystalRus::rightToLeft(void) {
_displaymode &= ~LCD_ENTRYLEFT;
command(LCD_ENTRYMODESET | _displaymode);
}
// This will 'right justify' text from the cursor
void LiquidCrystalRus::autoscroll(void) {
_displaymode |= LCD_ENTRYSHIFTINCREMENT;
command(LCD_ENTRYMODESET | _displaymode);
}
// This will 'left justify' text from the cursor
void LiquidCrystalRus::noAutoscroll(void) {
_displaymode &= ~LCD_ENTRYSHIFTINCREMENT;
command(LCD_ENTRYMODESET | _displaymode);
}
// Allows us to fill the first 8 CGRAM locations
// with custom characters
void LiquidCrystalRus::createChar(uint8_t location, uint8_t charmap[]) {
location &= 0x7; // we only have 8 locations 0-7
command(LCD_SETCGRAMADDR | (location << 3));
for (int i=0; i<8; i++) {
write(charmap[i]);
}
}
/*********** mid level commands, for sending data/cmds */
inline void LiquidCrystalRus::command(uint8_t value) {
send(value, LOW);
}
#if defined(ARDUINO) && ARDUINO >= 100
size_t LiquidCrystalRus::write(uint8_t value)
#else
void LiquidCrystalRus::write(uint8_t value)
#endif
{
uint8_t out_char=value;
if (_dram_model == LCD_DRAM_WH1601) {
uint8_t ac=recv(LOW) & 0x7f;
if (ac>7 && ac<0x14) command(LCD_SETDDRAMADDR | (0x40+ac-8));
}
if (value>=0x80) { // UTF-8 handling
if (value >= 0xc0) {
utf_hi_char = value - 0xd0;
} else {
value &= 0x3f;
if (!utf_hi_char && (value == 1))
send(0xa2,HIGH); // ╗
else if ((utf_hi_char == 1) && (value == 0x11))
send(0xb5,HIGH); // ╦
else
send(pgm_read_byte_near(utf_recode + value + (utf_hi_char<<6) - 0x10), HIGH);
}
} else send(out_char, HIGH);
#if defined(ARDUINO) && ARDUINO >= 100
return 1; // assume success
#endif
}
/************ low level data pushing commands **********/
// write either command or data, with automatic 4/8-bit selection
void LiquidCrystalRus::send(uint8_t value, uint8_t mode) {
digitalWrite(_rs_pin, mode);
// if there is a RW pin indicated, set it low to Write
if (_rw_pin != 255) {
digitalWrite(_rw_pin, LOW);
}
if (_displayfunction & LCD_8BITMODE) {
writeNbits(value,8);
} else {
writeNbits(value>>4,4);
writeNbits(value,4);
}
}
// read data, with automatic 4/8-bit selection
uint8_t LiquidCrystalRus::recv(uint8_t mode) {
uint8_t retval;
digitalWrite(_rs_pin, mode);
// if there is a RW pin indicated, set it low to Write
if (_rw_pin != 255) {
digitalWrite(_rw_pin, HIGH);
}
if (_displayfunction & LCD_8BITMODE) {
retval = readNbits(8);
} else {
retval = readNbits(4) << 4;
retval |= readNbits(4);
}
return retval;
}
void LiquidCrystalRus::pulseEnable() {
digitalWrite(_enable_pin, LOW);
delayMicroseconds(1);
digitalWrite(_enable_pin, HIGH);
delayMicroseconds(1); // enable pulse must be >450ns
digitalWrite(_enable_pin, LOW);
delayMicroseconds(100); // commands need > 37us to settle
}
void LiquidCrystalRus::writeNbits(uint8_t value, uint8_t n) {
for (int i = 0; i < n; i++) {
pinMode(_data_pins[i], OUTPUT);
digitalWrite(_data_pins[i], (value >> i) & 0x01);
}
pulseEnable();
}
uint8_t LiquidCrystalRus::readNbits(uint8_t n) {
uint8_t retval=0;
for (int i = 0; i < n; i++) {
pinMode(_data_pins[i], INPUT);
}
digitalWrite(_enable_pin, LOW);
delayMicroseconds(1);
digitalWrite(_enable_pin, HIGH);
delayMicroseconds(1); // enable pulse must be >450ns
for (int i = 0; i < n; i++) {
retval |= (digitalRead(_data_pins[i]) == HIGH)?(1 << i):0;
}
digitalWrite(_enable_pin, LOW);
return retval;
}

@ -1,129 +0,0 @@
//
// based on LiquidCrystal library from ArduinoIDE, see http://arduino.cc
// modified 27 Jul 2011
// by Ilya V. Danilov http://mk90.ru/
//
#ifndef LiquidCrystalRus_h
#define LiquidCrystalRus_h
#include <inttypes.h>
#include "Print.h"
// commands
#define LCD_CLEARDISPLAY 0x01
#define LCD_RETURNHOME 0x02
#define LCD_ENTRYMODESET 0x04
#define LCD_DISPLAYCONTROL 0x08
#define LCD_CURSORSHIFT 0x10
#define LCD_FUNCTIONSET 0x20
#define LCD_SETCGRAMADDR 0x40
#define LCD_SETDDRAMADDR 0x80
// flags for display entry mode
#define LCD_ENTRYRIGHT 0x00
#define LCD_ENTRYLEFT 0x02
#define LCD_ENTRYSHIFTINCREMENT 0x01
#define LCD_ENTRYSHIFTDECREMENT 0x00
// flags for display on/off control
#define LCD_DISPLAYON 0x04
#define LCD_DISPLAYOFF 0x00
#define LCD_CURSORON 0x02
#define LCD_CURSOROFF 0x00
#define LCD_BLINKON 0x01
#define LCD_BLINKOFF 0x00
// flags for display/cursor shift
#define LCD_DISPLAYMOVE 0x08
#define LCD_CURSORMOVE 0x00
#define LCD_MOVERIGHT 0x04
#define LCD_MOVELEFT 0x00
// flags for function set
#define LCD_8BITMODE 0x10
#define LCD_4BITMODE 0x00
#define LCD_2LINE 0x08
#define LCD_1LINE 0x00
#define LCD_5x10DOTS 0x04
#define LCD_5x8DOTS 0x00
// enum for
#define LCD_DRAM_Normal 0x00
#define LCD_DRAM_WH1601 0x01
class LiquidCrystalRus : public Print {
public:
LiquidCrystalRus(uint8_t rs, uint8_t enable,
uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7);
LiquidCrystalRus(uint8_t rs, uint8_t rw, uint8_t enable,
uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7);
LiquidCrystalRus(uint8_t rs, uint8_t rw, uint8_t enable,
uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3);
LiquidCrystalRus(uint8_t rs, uint8_t enable,
uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3);
void init(uint8_t fourbitmode, uint8_t rs, uint8_t rw, uint8_t enable,
uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7);
void begin(uint8_t cols, uint8_t rows, uint8_t charsize = LCD_5x8DOTS);
void clear();
void home();
void noDisplay();
void display();
void noBlink();
void blink();
void noCursor();
void cursor();
void scrollDisplayLeft();
void scrollDisplayRight();
void leftToRight();
void rightToLeft();
void autoscroll();
void noAutoscroll();
void createChar(uint8_t, uint8_t[]);
void setCursor(uint8_t, uint8_t);
#if defined(ARDUINO) && ARDUINO >= 100
virtual size_t write(uint8_t);
using Print::write;
#else
virtual void write(uint8_t);
#endif
void command(uint8_t);
void setDRAMModel(uint8_t);
private:
void send(uint8_t, uint8_t);
void writeNbits(uint8_t, uint8_t);
uint8_t recv(uint8_t);
uint8_t readNbits(uint8_t);
void pulseEnable();
uint8_t _rs_pin; // LOW: command. HIGH: character.
uint8_t _rw_pin; // LOW: write to LCD. HIGH: read from LCD.
uint8_t _enable_pin; // activated by a HIGH pulse.
uint8_t _data_pins[8];
uint8_t _displayfunction;
uint8_t _displaycontrol;
uint8_t _displaymode;
uint8_t _initialized;
uint8_t _numlines,_currline;
uint8_t _dram_model;
uint8_t utf_hi_char; // UTF-8 high part
};
#endif

@ -29,6 +29,12 @@
#define BIT(b) (1<<(b)) #define BIT(b) (1<<(b))
#define TEST(n,b) (((n)&BIT(b))!=0) #define TEST(n,b) (((n)&BIT(b))!=0)
#define RADIANS(d) ((d)*M_PI/180.0)
#define DEGREES(r) ((d)*180.0/M_PI)
#define NOLESS(v,n) do{ if (v < n) v = n; }while(0)
#define NOMORE(v,n) do{ if (v > n) v = n; }while(0)
typedef unsigned long millis_t;
// Arduino < 1.0.0 does not define this, so we need to do it ourselves // Arduino < 1.0.0 does not define this, so we need to do it ourselves
#ifndef analogInputToDigitalPin #ifndef analogInputToDigitalPin
@ -60,59 +66,57 @@
#define MYSERIAL MSerial #define MYSERIAL MSerial
#endif #endif
#define SERIAL_PROTOCOL(x) (MYSERIAL.print(x)) #define SERIAL_CHAR(x) MYSERIAL.write(x)
#define SERIAL_PROTOCOL_F(x,y) (MYSERIAL.print(x,y)) #define SERIAL_EOL SERIAL_CHAR('\n')
#define SERIAL_PROTOCOLPGM(x) (serialprintPGM(PSTR(x)))
#define SERIAL_PROTOCOLLN(x) (MYSERIAL.print(x),MYSERIAL.write('\n')) #define SERIAL_PROTOCOLCHAR(x) SERIAL_CHAR(x)
#define SERIAL_PROTOCOLLNPGM(x) (serialprintPGM(PSTR(x)),MYSERIAL.write('\n')) #define SERIAL_PROTOCOL(x) MYSERIAL.print(x)
#define SERIAL_PROTOCOL_F(x,y) MYSERIAL.print(x,y)
#define SERIAL_PROTOCOLPGM(x) serialprintPGM(PSTR(x))
#define SERIAL_PROTOCOLLN(x) do{ MYSERIAL.print(x),MYSERIAL.write('\n'); }while(0)
#define SERIAL_PROTOCOLLNPGM(x) do{ serialprintPGM(PSTR(x)),MYSERIAL.write('\n'); }while(0)
extern const char errormagic[] PROGMEM; extern const char errormagic[] PROGMEM;
extern const char echomagic[] PROGMEM; extern const char echomagic[] PROGMEM;
#define SERIAL_ERROR_START (serialprintPGM(errormagic)) #define SERIAL_ERROR_START serialprintPGM(errormagic)
#define SERIAL_ERROR(x) SERIAL_PROTOCOL(x) #define SERIAL_ERROR(x) SERIAL_PROTOCOL(x)
#define SERIAL_ERRORPGM(x) SERIAL_PROTOCOLPGM(x) #define SERIAL_ERRORPGM(x) SERIAL_PROTOCOLPGM(x)
#define SERIAL_ERRORLN(x) SERIAL_PROTOCOLLN(x) #define SERIAL_ERRORLN(x) SERIAL_PROTOCOLLN(x)
#define SERIAL_ERRORLNPGM(x) SERIAL_PROTOCOLLNPGM(x) #define SERIAL_ERRORLNPGM(x) SERIAL_PROTOCOLLNPGM(x)
#define SERIAL_ECHO_START (serialprintPGM(echomagic)) #define SERIAL_ECHO_START serialprintPGM(echomagic)
#define SERIAL_ECHO(x) SERIAL_PROTOCOL(x) #define SERIAL_ECHO(x) SERIAL_PROTOCOL(x)
#define SERIAL_ECHOPGM(x) SERIAL_PROTOCOLPGM(x) #define SERIAL_ECHOPGM(x) SERIAL_PROTOCOLPGM(x)
#define SERIAL_ECHOLN(x) SERIAL_PROTOCOLLN(x) #define SERIAL_ECHOLN(x) SERIAL_PROTOCOLLN(x)
#define SERIAL_ECHOLNPGM(x) SERIAL_PROTOCOLLNPGM(x) #define SERIAL_ECHOLNPGM(x) SERIAL_PROTOCOLLNPGM(x)
#define SERIAL_ECHOPAIR(name,value) (serial_echopair_P(PSTR(name),(value))) #define SERIAL_ECHOPAIR(name,value) do{ serial_echopair_P(PSTR(name),(value)); }while(0)
#define SERIAL_EOL MYSERIAL.write('\n')
void serial_echopair_P(const char *s_P, float v); void serial_echopair_P(const char *s_P, float v);
void serial_echopair_P(const char *s_P, double v); void serial_echopair_P(const char *s_P, double v);
void serial_echopair_P(const char *s_P, unsigned long v); void serial_echopair_P(const char *s_P, unsigned long v);
//Things to write to serial from Program memory. Saves 400 to 2k of RAM. // Things to write to serial from Program memory. Saves 400 to 2k of RAM.
FORCE_INLINE void serialprintPGM(const char *str) FORCE_INLINE void serialprintPGM(const char *str) {
{ char ch;
char ch=pgm_read_byte(str); while ((ch = pgm_read_byte(str))) {
while(ch)
{
MYSERIAL.write(ch); MYSERIAL.write(ch);
ch=pgm_read_byte(++str); str++;
} }
} }
void get_command(); void get_command();
void process_commands(); void process_commands();
void manage_inactivity(bool ignore_stepper_queue=false); void manage_inactivity(bool ignore_stepper_queue=false);
#if defined(DUAL_X_CARRIAGE) && defined(X_ENABLE_PIN) && X_ENABLE_PIN > -1 \ #if defined(DUAL_X_CARRIAGE) && HAS_X_ENABLE && HAS_X2_ENABLE
&& defined(X2_ENABLE_PIN) && X2_ENABLE_PIN > -1
#define enable_x() do { X_ENABLE_WRITE( X_ENABLE_ON); X2_ENABLE_WRITE( X_ENABLE_ON); } while (0) #define enable_x() do { X_ENABLE_WRITE( X_ENABLE_ON); X2_ENABLE_WRITE( X_ENABLE_ON); } while (0)
#define disable_x() do { X_ENABLE_WRITE(!X_ENABLE_ON); X2_ENABLE_WRITE(!X_ENABLE_ON); axis_known_position[X_AXIS] = false; } while (0) #define disable_x() do { X_ENABLE_WRITE(!X_ENABLE_ON); X2_ENABLE_WRITE(!X_ENABLE_ON); axis_known_position[X_AXIS] = false; } while (0)
#elif defined(X_ENABLE_PIN) && X_ENABLE_PIN > -1 #elif HAS_X_ENABLE
#define enable_x() X_ENABLE_WRITE( X_ENABLE_ON) #define enable_x() X_ENABLE_WRITE( X_ENABLE_ON)
#define disable_x() { X_ENABLE_WRITE(!X_ENABLE_ON); axis_known_position[X_AXIS] = false; } #define disable_x() { X_ENABLE_WRITE(!X_ENABLE_ON); axis_known_position[X_AXIS] = false; }
#else #else
@ -120,7 +124,7 @@ void manage_inactivity(bool ignore_stepper_queue=false);
#define disable_x() ; #define disable_x() ;
#endif #endif
#if defined(Y_ENABLE_PIN) && Y_ENABLE_PIN > -1 #if HAS_Y_ENABLE
#ifdef Y_DUAL_STEPPER_DRIVERS #ifdef Y_DUAL_STEPPER_DRIVERS
#define enable_y() { Y_ENABLE_WRITE( Y_ENABLE_ON); Y2_ENABLE_WRITE(Y_ENABLE_ON); } #define enable_y() { Y_ENABLE_WRITE( Y_ENABLE_ON); Y2_ENABLE_WRITE(Y_ENABLE_ON); }
#define disable_y() { Y_ENABLE_WRITE(!Y_ENABLE_ON); Y2_ENABLE_WRITE(!Y_ENABLE_ON); axis_known_position[Y_AXIS] = false; } #define disable_y() { Y_ENABLE_WRITE(!Y_ENABLE_ON); Y2_ENABLE_WRITE(!Y_ENABLE_ON); axis_known_position[Y_AXIS] = false; }
@ -133,7 +137,7 @@ void manage_inactivity(bool ignore_stepper_queue=false);
#define disable_y() ; #define disable_y() ;
#endif #endif
#if defined(Z_ENABLE_PIN) && Z_ENABLE_PIN > -1 #if HAS_Z_ENABLE
#ifdef Z_DUAL_STEPPER_DRIVERS #ifdef Z_DUAL_STEPPER_DRIVERS
#define enable_z() { Z_ENABLE_WRITE( Z_ENABLE_ON); Z2_ENABLE_WRITE(Z_ENABLE_ON); } #define enable_z() { Z_ENABLE_WRITE( Z_ENABLE_ON); Z2_ENABLE_WRITE(Z_ENABLE_ON); }
#define disable_z() { Z_ENABLE_WRITE(!Z_ENABLE_ON); Z2_ENABLE_WRITE(!Z_ENABLE_ON); axis_known_position[Z_AXIS] = false; } #define disable_z() { Z_ENABLE_WRITE(!Z_ENABLE_ON); Z2_ENABLE_WRITE(!Z_ENABLE_ON); axis_known_position[Z_AXIS] = false; }
@ -146,40 +150,53 @@ void manage_inactivity(bool ignore_stepper_queue=false);
#define disable_z() ; #define disable_z() ;
#endif #endif
#if defined(E0_ENABLE_PIN) && (E0_ENABLE_PIN > -1) #if HAS_E0_ENABLE
#define enable_e0() E0_ENABLE_WRITE(E_ENABLE_ON) #define enable_e0() E0_ENABLE_WRITE( E_ENABLE_ON)
#define disable_e0() E0_ENABLE_WRITE(!E_ENABLE_ON) #define disable_e0() E0_ENABLE_WRITE(!E_ENABLE_ON)
#else #else
#define enable_e0() /* nothing */ #define enable_e0() /* nothing */
#define disable_e0() /* nothing */ #define disable_e0() /* nothing */
#endif #endif
#if (EXTRUDERS > 1) && defined(E1_ENABLE_PIN) && (E1_ENABLE_PIN > -1) #if (EXTRUDERS > 1) && HAS_E1_ENABLE
#define enable_e1() E1_ENABLE_WRITE(E_ENABLE_ON) #define enable_e1() E1_ENABLE_WRITE( E_ENABLE_ON)
#define disable_e1() E1_ENABLE_WRITE(!E_ENABLE_ON) #define disable_e1() E1_ENABLE_WRITE(!E_ENABLE_ON)
#else #else
#define enable_e1() /* nothing */ #define enable_e1() /* nothing */
#define disable_e1() /* nothing */ #define disable_e1() /* nothing */
#endif #endif
#if (EXTRUDERS > 2) && defined(E2_ENABLE_PIN) && (E2_ENABLE_PIN > -1) #if (EXTRUDERS > 2) && HAS_E2_ENABLE
#define enable_e2() E2_ENABLE_WRITE(E_ENABLE_ON) #define enable_e2() E2_ENABLE_WRITE( E_ENABLE_ON)
#define disable_e2() E2_ENABLE_WRITE(!E_ENABLE_ON) #define disable_e2() E2_ENABLE_WRITE(!E_ENABLE_ON)
#else #else
#define enable_e2() /* nothing */ #define enable_e2() /* nothing */
#define disable_e2() /* nothing */ #define disable_e2() /* nothing */
#endif #endif
#if (EXTRUDERS > 3) && defined(E3_ENABLE_PIN) && (E3_ENABLE_PIN > -1) #if (EXTRUDERS > 3) && HAS_E3_ENABLE
#define enable_e3() E3_ENABLE_WRITE(E_ENABLE_ON) #define enable_e3() E3_ENABLE_WRITE( E_ENABLE_ON)
#define disable_e3() E3_ENABLE_WRITE(!E_ENABLE_ON) #define disable_e3() E3_ENABLE_WRITE(!E_ENABLE_ON)
#else #else
#define enable_e3() /* nothing */ #define enable_e3() /* nothing */
#define disable_e3() /* nothing */ #define disable_e3() /* nothing */
#endif #endif
/**
* The axis order in all axis related arrays is X, Y, Z, E
*/
#define NUM_AXIS 4
/**
* Axis indices as enumerated constants
*
* A_AXIS and B_AXIS are used by COREXY printers
* X_HEAD and Y_HEAD is used for systems that don't have a 1:1 relationship between X_AXIS and X Head movement, like CoreXY bots.
*/
enum AxisEnum {X_AXIS=0, Y_AXIS=1, A_AXIS=0, B_AXIS=1, Z_AXIS=2, E_AXIS=3, X_HEAD=4, Y_HEAD=5}; enum AxisEnum {X_AXIS=0, Y_AXIS=1, A_AXIS=0, B_AXIS=1, Z_AXIS=2, E_AXIS=3, X_HEAD=4, Y_HEAD=5};
//X_HEAD and Y_HEAD is used for systems that don't have a 1:1 relationship between X_AXIS and X Head movement, like CoreXY bots.
void enable_all_steppers();
void disable_all_steppers();
void FlushSerialRequestResend(); void FlushSerialRequestResend();
void ClearToSend(); void ClearToSend();
@ -192,7 +209,6 @@ void get_coordinates();
void adjust_delta(float cartesian[3]); void adjust_delta(float cartesian[3]);
#endif #endif
extern float delta[3]; extern float delta[3];
void prepare_move_raw();
#endif #endif
#ifdef SCARA #ifdef SCARA
void calculate_delta(float cartesian[3]); void calculate_delta(float cartesian[3]);
@ -207,15 +223,18 @@ void Stop();
void filrunout(); void filrunout();
#endif #endif
bool IsStopped(); extern bool Running;
inline bool IsRunning() { return Running; }
inline bool IsStopped() { return !Running; }
bool enquecommand(const char *cmd); //put a single ASCII command at the end of the current buffer or return false when it is full bool enqueuecommand(const char *cmd); //put a single ASCII command at the end of the current buffer or return false when it is full
void enquecommands_P(const char *cmd); //put one or many ASCII commands at the end of the current buffer, read from flash void enqueuecommands_P(const char *cmd); //put one or many ASCII commands at the end of the current buffer, read from flash
void prepare_arc_move(char isclockwise); void prepare_arc_move(char isclockwise);
void clamp_to_software_endstops(float target[3]); void clamp_to_software_endstops(float target[3]);
void refresh_cmd_timeout(void); extern millis_t previous_cmd_ms;
inline void refresh_cmd_timeout() { previous_cmd_ms = millis(); }
#ifdef FAST_PWM_FAN #ifdef FAST_PWM_FAN
void setPwmFrequency(uint8_t pin, int val); void setPwmFrequency(uint8_t pin, int val);
@ -224,18 +243,18 @@ void refresh_cmd_timeout(void);
#ifndef CRITICAL_SECTION_START #ifndef CRITICAL_SECTION_START
#define CRITICAL_SECTION_START unsigned char _sreg = SREG; cli(); #define CRITICAL_SECTION_START unsigned char _sreg = SREG; cli();
#define CRITICAL_SECTION_END SREG = _sreg; #define CRITICAL_SECTION_END SREG = _sreg;
#endif //CRITICAL_SECTION_START #endif
extern float homing_feedrate[]; extern float homing_feedrate[];
extern bool axis_relative_modes[]; extern bool axis_relative_modes[];
extern int feedmultiply; extern int feedrate_multiplier;
extern int extrudemultiply; // Sets extrude multiply factor (in percent) for all extruders
extern bool volumetric_enabled; extern bool volumetric_enabled;
extern int extruder_multiply[EXTRUDERS]; // sets extrude multiply factor (in percent) for each extruder individually extern int extruder_multiply[EXTRUDERS]; // sets extrude multiply factor (in percent) for each extruder individually
extern float filament_size[EXTRUDERS]; // cross-sectional area of filament (in millimeters), typically around 1.75 or 2.85, 0 disables the volumetric calculations for the extruder. extern float filament_size[EXTRUDERS]; // cross-sectional area of filament (in millimeters), typically around 1.75 or 2.85, 0 disables the volumetric calculations for the extruder.
extern float volumetric_multiplier[EXTRUDERS]; // reciprocal of cross-sectional area of filament (in square millimeters), stored this way to reduce computational burden in planner extern float volumetric_multiplier[EXTRUDERS]; // reciprocal of cross-sectional area of filament (in square millimeters), stored this way to reduce computational burden in planner
extern float current_position[NUM_AXIS] ; extern float current_position[NUM_AXIS];
extern float home_offset[3]; extern float home_offset[3];
#ifdef DELTA #ifdef DELTA
extern float endstop_adj[3]; extern float endstop_adj[3];
extern float delta_radius; extern float delta_radius;
@ -243,16 +262,27 @@ extern float home_offset[3];
extern float delta_segments_per_second; extern float delta_segments_per_second;
void recalc_delta_settings(float radius, float diagonal_rod); void recalc_delta_settings(float radius, float diagonal_rod);
#elif defined(Z_DUAL_ENDSTOPS) #elif defined(Z_DUAL_ENDSTOPS)
extern float z_endstop_adj; extern float z_endstop_adj;
#endif #endif
#ifdef SCARA #ifdef SCARA
extern float axis_scaling[3]; // Build size scaling extern float axis_scaling[3]; // Build size scaling
#endif #endif
extern float min_pos[3]; extern float min_pos[3];
extern float max_pos[3]; extern float max_pos[3];
extern bool axis_known_position[3]; extern bool axis_known_position[3];
extern float zprobe_zoffset;
#ifdef ENABLE_AUTO_BED_LEVELING
extern float zprobe_zoffset;
#endif
#ifdef PREVENT_DANGEROUS_EXTRUDE
extern float extrude_min_temp;
#endif
extern int fanSpeed; extern int fanSpeed;
#ifdef BARICUDA #ifdef BARICUDA
extern int ValvePressure; extern int ValvePressure;
extern int EtoPPressure; extern int EtoPPressure;
@ -279,8 +309,8 @@ extern int fanSpeed;
extern float retract_recover_length, retract_recover_length_swap, retract_recover_feedrate; extern float retract_recover_length, retract_recover_length_swap, retract_recover_feedrate;
#endif #endif
extern unsigned long starttime; extern millis_t print_job_start_ms;
extern unsigned long stoptime; extern millis_t print_job_stop_ms;
// Handling multiple extruders pins // Handling multiple extruders pins
extern uint8_t active_extruder; extern uint8_t active_extruder;

@ -268,8 +268,7 @@ void MarlinSerial::printFloat(double number, uint8_t digits) {
print(int_part); print(int_part);
// Print the decimal point, but only if there are digits beyond // Print the decimal point, but only if there are digits beyond
if (digits > 0) if (digits > 0) print('.');
print(".");
// Extract digits from the remainder one at a time // Extract digits from the remainder one at a time
while (digits-- > 0) { while (digits-- > 0) {
@ -288,7 +287,6 @@ MarlinSerial MSerial;
#endif // !AT90USB #endif // !AT90USB
// For AT90USB targets use the UART for BT interfacing // For AT90USB targets use the UART for BT interfacing
#if defined(AT90USB) && defined (BTENABLED) #if defined(AT90USB) && defined(BTENABLED)
HardwareSerial bt; HardwareSerial bt;
#endif #endif

@ -153,7 +153,7 @@ extern MarlinSerial MSerial;
#endif // !AT90USB #endif // !AT90USB
// Use the UART for BT in AT90USB configurations // Use the UART for BT in AT90USB configurations
#if defined(AT90USB) && defined (BTENABLED) #if defined(AT90USB) && defined(BTENABLED)
extern HardwareSerial bt; extern HardwareSerial bt;
#endif #endif

File diff suppressed because it is too large Load Diff

@ -17,8 +17,11 @@
* Progress Bar * Progress Bar
*/ */
#ifdef LCD_PROGRESS_BAR #ifdef LCD_PROGRESS_BAR
#ifndef SDSUPPORT
#error LCD_PROGRESS_BAR requires SDSUPPORT.
#endif
#ifdef DOGLCD #ifdef DOGLCD
#warning LCD_PROGRESS_BAR does not apply to graphical displays. #error LCD_PROGRESS_BAR does not apply to graphical displays.
#endif #endif
#ifdef FILAMENT_LCD_DISPLAY #ifdef FILAMENT_LCD_DISPLAY
#error LCD_PROGRESS_BAR and FILAMENT_LCD_DISPLAY are not fully compatible. Comment out this line to use both. #error LCD_PROGRESS_BAR and FILAMENT_LCD_DISPLAY are not fully compatible. Comment out this line to use both.
@ -53,7 +56,7 @@
#if EXTRUDERS > 1 #if EXTRUDERS > 1
#if EXTRUDERS > 4 #if EXTRUDERS > 4
#error The maximum number of EXTRUDERS is 4. #error The maximum number of EXTRUDERS in Marlin is 4.
#endif #endif
#ifdef TEMP_SENSOR_1_AS_REDUNDANT #ifdef TEMP_SENSOR_1_AS_REDUNDANT
@ -74,6 +77,13 @@
#endif // EXTRUDERS > 1 #endif // EXTRUDERS > 1
/**
* Limited number of servos
*/
#if NUM_SERVOS > 4
#error The maximum number of SERVOS in Marlin is 4.
#endif
/** /**
* Required LCD language * Required LCD language
*/ */
@ -81,6 +91,21 @@
#error You must enable either DISPLAY_CHARSET_HD44780_JAPAN or DISPLAY_CHARSET_HD44780_WESTERN for your LCD controller. #error You must enable either DISPLAY_CHARSET_HD44780_JAPAN or DISPLAY_CHARSET_HD44780_WESTERN for your LCD controller.
#endif #endif
/**
* Mesh Bed Leveling
*/
#ifdef MESH_BED_LEVELING
#ifdef DELTA
#error MESH_BED_LEVELING does not yet support DELTA printers
#endif
#ifdef ENABLE_AUTO_BED_LEVELING
#error Select ENABLE_AUTO_BED_LEVELING or MESH_BED_LEVELING, not both
#endif
#if MESH_NUM_X_POINTS > 7 || MESH_NUM_Y_POINTS > 7
#error MESH_NUM_X_POINTS and MESH_NUM_Y_POINTS need to be less than 8
#endif
#endif
/** /**
* Auto Bed Leveling * Auto Bed Leveling
*/ */
@ -90,13 +115,39 @@
* Require a Z Min pin * Require a Z Min pin
*/ */
#if Z_MIN_PIN == -1 #if Z_MIN_PIN == -1
#if Z_PROBE_PIN == -1 || (!defined(Z_PROBE_ENDSTOP) || defined(DISABLE_Z_PROBE_ENDSTOP)) // It's possible for someone to set a pin for the Z Probe, but not enable it.
#ifdef Z_PROBE_REPEATABILITY_TEST #ifdef Z_PROBE_REPEATABILITY_TEST
#error You must have a Z_MIN endstop to enable Z_PROBE_REPEATABILITY_TEST. #error You must have a Z_MIN or Z_PROBE endstop to enable Z_PROBE_REPEATABILITY_TEST.
#else #else
#error ENABLE_AUTO_BED_LEVELING requires a Z_MIN endstop. Z_MIN_PIN must point to a valid hardware pin. #error ENABLE_AUTO_BED_LEVELING requires a Z_MIN or Z_PROBE endstop. Z_MIN_PIN or Z_PROBE_PIN must point to a valid hardware pin.
#endif
#endif #endif
#endif #endif
/**
* Require a Z Probe Pin if Z_PROBE_ENDSTOP is enabled.
*/
#if defined(Z_PROBE_ENDSTOP)
#ifndef Z_PROBE_PIN
#error You must have a Z_PROBE_PIN defined in your pins_XXXX.h file if you enable Z_PROBE_ENDSTOP
#endif
#if Z_PROBE_PIN == -1
#error You must set Z_PROBE_PIN to a valid pin if you enable Z_PROBE_ENDSTOP
#endif
// Forcing Servo definitions can break some hall effect sensor setups. Leaving these here for further comment.
// #ifndef NUM_SERVOS
// #error You must have NUM_SERVOS defined and there must be at least 1 configured to use Z_PROBE_ENDSTOP
// #endif
// #if defined(NUM_SERVOS) && NUM_SERVOS < 1
// #error You must have at least 1 servo defined for NUM_SERVOS to use Z_PROBE_ENDSTOP
// #endif
// #ifndef SERVO_ENDSTOPS
// #error You must have SERVO_ENDSTOPS defined and have the Z index set to at least 0 or above to use Z_PROBE_ENDSTOP
// #endif
// #ifndef SERVO_ENDSTOP_ANGLES
// #error You must have SERVO_ENDSTOP_ANGLES defined for Z Extend and Retract to use Z_PROBE_AND_ENSTOP
// #endif
#endif
/** /**
* Check if Probe_Offset * Grid Points is greater than Probing Range * Check if Probe_Offset * Grid Points is greater than Probing Range
*/ */
@ -104,13 +155,13 @@
// Make sure probing points are reachable // Make sure probing points are reachable
#if LEFT_PROBE_BED_POSITION < MIN_PROBE_X #if LEFT_PROBE_BED_POSITION < MIN_PROBE_X
#error The given LEFT_PROBE_BED_POSITION can't be reached by the probe. #error "The given LEFT_PROBE_BED_POSITION can't be reached by the probe."
#elif RIGHT_PROBE_BED_POSITION > MAX_PROBE_X #elif RIGHT_PROBE_BED_POSITION > MAX_PROBE_X
#error The given RIGHT_PROBE_BED_POSITION can't be reached by the probe. #error "The given RIGHT_PROBE_BED_POSITION can't be reached by the probe."
#elif FRONT_PROBE_BED_POSITION < MIN_PROBE_Y #elif FRONT_PROBE_BED_POSITION < MIN_PROBE_Y
#error The given FRONT_PROBE_BED_POSITION can't be reached by the probe. #error "The given FRONT_PROBE_BED_POSITION can't be reached by the probe."
#elif BACK_PROBE_BED_POSITION > MAX_PROBE_Y #elif BACK_PROBE_BED_POSITION > MAX_PROBE_Y
#error The given BACK_PROBE_BED_POSITION can't be reached by the probe. #error "The given BACK_PROBE_BED_POSITION can't be reached by the probe."
#endif #endif
#define PROBE_SIZE_X (X_PROBE_OFFSET_FROM_EXTRUDER * (AUTO_BED_LEVELING_GRID_POINTS-1)) #define PROBE_SIZE_X (X_PROBE_OFFSET_FROM_EXTRUDER * (AUTO_BED_LEVELING_GRID_POINTS-1))
@ -135,7 +186,7 @@
#define Y_PROBE_ERROR #define Y_PROBE_ERROR
#endif #endif
#ifdef Y_PROBE_ERROR #ifdef Y_PROBE_ERROR
#error The Y axis probing range is to small to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS #error The Y axis probing range is too small to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS
#endif #endif
#undef PROBE_SIZE_X #undef PROBE_SIZE_X
@ -206,9 +257,9 @@
*/ */
#ifdef DUAL_X_CARRIAGE #ifdef DUAL_X_CARRIAGE
#if EXTRUDERS == 1 || defined(COREXY) \ #if EXTRUDERS == 1 || defined(COREXY) \
|| !defined(X2_ENABLE_PIN) || !defined(X2_STEP_PIN) || !defined(X2_DIR_PIN) \ || !HAS_X2_ENABLE || !HAS_X2_STEP || !HAS_X2_DIR \
|| !defined(X2_HOME_POS) || !defined(X2_MIN_POS) || !defined(X2_MAX_POS) \ || !defined(X2_HOME_POS) || !defined(X2_MIN_POS) || !defined(X2_MAX_POS) \
|| !defined(X_MAX_PIN) || X_MAX_PIN < 0 || !HAS_X_MAX
#error Missing or invalid definitions for DUAL_X_CARRIAGE mode. #error Missing or invalid definitions for DUAL_X_CARRIAGE mode.
#endif #endif
#if X_HOME_DIR != -1 || X2_HOME_DIR != 1 #if X_HOME_DIR != -1 || X2_HOME_DIR != 1
@ -231,6 +282,10 @@
#endif #endif
#endif #endif
#if HAS_FAN && CONTROLLERFAN_PIN == FAN_PIN
#error You cannot set CONTROLLERFAN_PIN equal to FAN_PIN
#endif
/** /**
* Test required HEATER defines * Test required HEATER defines
*/ */
@ -251,4 +306,11 @@
#error HEATER_0_PIN not defined for this board #error HEATER_0_PIN not defined for this board
#endif #endif
/**
* Warnings for old configurations
*/
#ifdef X_HOME_RETRACT_MM
#error [XYZ]_HOME_RETRACT_MM settings have been renamed [XYZ]_HOME_BUMP_MM
#endif
#endif //SANITYCHECK_H #endif //SANITYCHECK_H

@ -312,6 +312,75 @@ static const pin_map_t digitalPinMap[] = {
{&DDRC, &PINC, &PORTC, 4}, // C4 18 {&DDRC, &PINC, &PORTC, 4}, // C4 18
{&DDRC, &PINC, &PORTC, 5} // C5 19 {&DDRC, &PINC, &PORTC, 5} // C5 19
}; };
#elif defined(__AVR_ATmega1281__)
// Waspmote
// Two Wire (aka I2C) ports
uint8_t const SDA_PIN = 41;
uint8_t const SCL_PIN = 40;
#undef MOSI_PIN
#undef MISO_PIN
// SPI port
uint8_t const SS_PIN = 16; // B0
uint8_t const MOSI_PIN = 11; // B2
uint8_t const MISO_PIN = 12; // B3
uint8_t const SCK_PIN = 10; // B1
static const pin_map_t digitalPinMap[] = {
{&DDRE, &PINE, &PORTE, 0}, // E0 0
{&DDRE, &PINE, &PORTE, 1}, // E1 1
{&DDRE, &PINE, &PORTE, 3}, // E3 2
{&DDRE, &PINE, &PORTE, 4}, // E4 3
{&DDRC, &PINC, &PORTC, 4}, // C4 4
{&DDRC, &PINC, &PORTC, 5}, // C5 5
{&DDRC, &PINC, &PORTC, 6}, // C6 6
{&DDRC, &PINC, &PORTC, 7}, // C7 7
{&DDRA, &PINA, &PORTA, 2}, // A2 8
{&DDRA, &PINA, &PORTA, 3}, // A3 9
{&DDRA, &PINA, &PORTA, 4}, // A4 10
{&DDRD, &PIND, &PORTD, 5}, // D5 11
{&DDRD, &PIND, &PORTD, 6}, // D6 12
{&DDRC, &PINC, &PORTC, 1}, // C1 13
{&DDRF, &PINF, &PORTF, 1}, // F1 14
{&DDRF, &PINF, &PORTF, 2}, // F2 15
{&DDRF, &PINF, &PORTF, 3}, // F3 16
{&DDRF, &PINF, &PORTF, 4}, // F4 17
{&DDRF, &PINF, &PORTF, 5}, // F5 18
{&DDRF, &PINF, &PORTF, 6}, // F6 19
{&DDRF, &PINF, &PORTF, 7}, // F7 20
{&DDRF, &PINF, &PORTF, 0}, // F0 21
{&DDRA, &PINA, &PORTA, 1}, // A1 22
{&DDRD, &PIND, &PORTD, 7}, // D7 23
{&DDRE, &PINE, &PORTE, 5}, // E5 24
{&DDRA, &PINA, &PORTA, 6}, // A6 25
{&DDRE, &PINE, &PORTE, 2}, // E2 26
{&DDRA, &PINA, &PORTA, 5}, // A5 27
{&DDRC, &PINC, &PORTC, 0}, // C0 28
{&DDRB, &PINB, &PORTB, 0}, // B0 29
{&DDRB, &PINB, &PORTB, 1}, // B1 30
{&DDRB, &PINB, &PORTB, 2}, // B2 31
{&DDRB, &PINB, &PORTB, 3}, // B3 32
{&DDRB, &PINB, &PORTB, 4}, // B4 33
{&DDRB, &PINB, &PORTB, 5}, // B5 34
{&DDRA, &PINA, &PORTA, 0}, // A0 35
{&DDRB, &PINB, &PORTB, 6}, // B6 36
{&DDRB, &PINB, &PORTB, 7}, // B7 37
{&DDRE, &PINE, &PORTE, 6}, // E6 38
{&DDRE, &PINE, &PORTE, 7}, // E7 39
{&DDRD, &PIND, &PORTD, 0}, // D0 40
{&DDRD, &PIND, &PORTD, 1}, // D1 41
{&DDRC, &PINC, &PORTC, 3}, // C3 42
{&DDRD, &PIND, &PORTD, 2}, // D2 43
{&DDRD, &PIND, &PORTD, 3}, // D3 44
{&DDRA, &PINA, &PORTA, 7}, // A7 45
{&DDRC, &PINC, &PORTC, 2}, // C2 46
{&DDRD, &PIND, &PORTD, 4}, // D4 47
{&DDRG, &PING, &PORTG, 2}, // G2 48
{&DDRG, &PING, &PORTG, 1}, // G1 49
{&DDRG, &PING, &PORTG, 0}, // G0 50
};
#else // defined(__AVR_ATmega1280__) #else // defined(__AVR_ATmega1280__)
#error unknown chip #error unknown chip
#endif // defined(__AVR_ATmega1280__) #endif // defined(__AVR_ATmega1280__)

@ -123,7 +123,7 @@ class Servo {
int read(); // returns current pulse width as an angle between 0 and 180 degrees int read(); // returns current pulse width as an angle between 0 and 180 degrees
int readMicroseconds(); // returns current pulse width in microseconds for this servo (was read_us() in first release) int readMicroseconds(); // returns current pulse width in microseconds for this servo (was read_us() in first release)
bool attached(); // return true if this servo is attached, otherwise false bool attached(); // return true if this servo is attached, otherwise false
#if defined (ENABLE_AUTO_BED_LEVELING) && (PROBE_SERVO_DEACTIVATION_DELAY > 0) #if defined(ENABLE_AUTO_BED_LEVELING) && PROBE_SERVO_DEACTIVATION_DELAY > 0
int pin; // store the hardware pin of the servo int pin; // store the hardware pin of the servo
#endif #endif
private: private:

@ -37,6 +37,7 @@
#define BOARD_BRAINWAVE 82 // Brainwave (AT90USB646) #define BOARD_BRAINWAVE 82 // Brainwave (AT90USB646)
#define BOARD_SAV_MKI 83 // SAV Mk-I (AT90USB1286) #define BOARD_SAV_MKI 83 // SAV Mk-I (AT90USB1286)
#define BOARD_TEENSY2 84 // Teensy++2.0 (AT90USB1286) - CLI compile: DEFINES=AT90USBxx_TEENSYPP_ASSIGNMENTS HARDWARE_MOTHERBOARD=84 make #define BOARD_TEENSY2 84 // Teensy++2.0 (AT90USB1286) - CLI compile: DEFINES=AT90USBxx_TEENSYPP_ASSIGNMENTS HARDWARE_MOTHERBOARD=84 make
#define BOARD_BRAINWAVE_PRO 85 // Brainwave Pro (AT90USB1286)
#define BOARD_GEN3_PLUS 9 // Gen3+ #define BOARD_GEN3_PLUS 9 // Gen3+
#define BOARD_GEN3_MONOLITHIC 22 // Gen3 Monolithic Electronics #define BOARD_GEN3_MONOLITHIC 22 // Gen3 Monolithic Electronics
#define BOARD_MEGATRONICS 70 // Megatronics #define BOARD_MEGATRONICS 70 // Megatronics

@ -25,7 +25,7 @@ CardReader::CardReader() {
OUT_WRITE(SDPOWER, HIGH); OUT_WRITE(SDPOWER, HIGH);
#endif //SDPOWER #endif //SDPOWER
autostart_atmillis = millis() + 5000; next_autostart_ms = millis() + 5000;
} }
char *createFilename(char *buffer, const dir_t &p) { //buffer > 12characters char *createFilename(char *buffer, const dir_t &p) { //buffer > 12characters
@ -249,7 +249,7 @@ void CardReader::openFile(char* name, bool read, bool replace_current/*=true*/)
if (!myDir.open(curDir, subdirname, O_READ)) { if (!myDir.open(curDir, subdirname, O_READ)) {
SERIAL_PROTOCOLPGM(MSG_SD_OPEN_FILE_FAIL); SERIAL_PROTOCOLPGM(MSG_SD_OPEN_FILE_FAIL);
SERIAL_PROTOCOL(subdirname); SERIAL_PROTOCOL(subdirname);
SERIAL_PROTOCOLLNPGM("."); SERIAL_PROTOCOLCHAR('.');
return; return;
} }
else { else {
@ -287,14 +287,14 @@ void CardReader::openFile(char* name, bool read, bool replace_current/*=true*/)
else { else {
SERIAL_PROTOCOLPGM(MSG_SD_OPEN_FILE_FAIL); SERIAL_PROTOCOLPGM(MSG_SD_OPEN_FILE_FAIL);
SERIAL_PROTOCOL(fname); SERIAL_PROTOCOL(fname);
SERIAL_PROTOCOLLNPGM("."); SERIAL_PROTOCOLCHAR('.');
} }
} }
else { //write else { //write
if (!file.open(curDir, fname, O_CREAT | O_APPEND | O_WRITE | O_TRUNC)) { if (!file.open(curDir, fname, O_CREAT | O_APPEND | O_WRITE | O_TRUNC)) {
SERIAL_PROTOCOLPGM(MSG_SD_OPEN_FILE_FAIL); SERIAL_PROTOCOLPGM(MSG_SD_OPEN_FILE_FAIL);
SERIAL_PROTOCOL(fname); SERIAL_PROTOCOL(fname);
SERIAL_PROTOCOLLNPGM("."); SERIAL_PROTOCOLCHAR('.');
} }
else { else {
saving = true; saving = true;
@ -330,7 +330,7 @@ void CardReader::removeFile(char* name) {
if (!myDir.open(curDir, subdirname, O_READ)) { if (!myDir.open(curDir, subdirname, O_READ)) {
SERIAL_PROTOCOLPGM("open failed, File: "); SERIAL_PROTOCOLPGM("open failed, File: ");
SERIAL_PROTOCOL(subdirname); SERIAL_PROTOCOL(subdirname);
SERIAL_PROTOCOLLNPGM("."); SERIAL_PROTOCOLCHAR('.');
return; return;
} }
else { else {
@ -360,7 +360,7 @@ void CardReader::removeFile(char* name) {
else { else {
SERIAL_PROTOCOLPGM("Deletion failed, File: "); SERIAL_PROTOCOLPGM("Deletion failed, File: ");
SERIAL_PROTOCOL(fname); SERIAL_PROTOCOL(fname);
SERIAL_PROTOCOLLNPGM("."); SERIAL_PROTOCOLCHAR('.');
} }
} }
@ -368,7 +368,7 @@ void CardReader::getStatus() {
if (cardOK) { if (cardOK) {
SERIAL_PROTOCOLPGM(MSG_SD_PRINTING_BYTE); SERIAL_PROTOCOLPGM(MSG_SD_PRINTING_BYTE);
SERIAL_PROTOCOL(sdpos); SERIAL_PROTOCOL(sdpos);
SERIAL_PROTOCOLPGM("/"); SERIAL_PROTOCOLCHAR('/');
SERIAL_PROTOCOLLN(filesize); SERIAL_PROTOCOLLN(filesize);
} }
else { else {
@ -397,7 +397,7 @@ void CardReader::write_command(char *buf) {
} }
void CardReader::checkautostart(bool force) { void CardReader::checkautostart(bool force) {
if (!force && (!autostart_stilltocheck || autostart_atmillis < millis())) if (!force && (!autostart_stilltocheck || next_autostart_ms < millis()))
return; return;
autostart_stilltocheck = false; autostart_stilltocheck = false;
@ -421,8 +421,8 @@ void CardReader::checkautostart(bool force) {
if (p.name[9] != '~' && strncmp((char*)p.name, autoname, 5) == 0) { if (p.name[9] != '~' && strncmp((char*)p.name, autoname, 5) == 0) {
char cmd[30]; char cmd[30];
sprintf_P(cmd, PSTR("M23 %s"), autoname); sprintf_P(cmd, PSTR("M23 %s"), autoname);
enquecommand(cmd); enqueuecommand(cmd);
enquecommands_P(PSTR("M24")); enqueuecommands_P(PSTR("M24"));
found = true; found = true;
} }
} }
@ -489,7 +489,7 @@ void CardReader::updir() {
if (workDirDepth > 0) { if (workDirDepth > 0) {
--workDirDepth; --workDirDepth;
workDir = workDirParents[0]; workDir = workDirParents[0];
for (int d = 0; d < workDirDepth; d++) for (uint16_t d = 0; d < workDirDepth; d++)
workDirParents[d] = workDirParents[d+1]; workDirParents[d] = workDirParents[d+1];
} }
} }
@ -508,7 +508,7 @@ void CardReader::printingHasFinished() {
sdprinting = false; sdprinting = false;
if (SD_FINISHED_STEPPERRELEASE) { if (SD_FINISHED_STEPPERRELEASE) {
//finishAndDisableSteppers(); //finishAndDisableSteppers();
enquecommands_P(PSTR(SD_FINISHED_RELEASECOMMAND)); enqueuecommands_P(PSTR(SD_FINISHED_RELEASECOMMAND));
} }
autotempShutdown(); autotempShutdown();
} }

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

@ -31,7 +31,7 @@ Here are some standard links for getting your machine calibrated:
//=========================================================================== //===========================================================================
//============================= SCARA Printer =============================== //============================= SCARA Printer ===============================
//=========================================================================== //===========================================================================
// For a Delta printer replace the configuration files with the files in the // For a Scara printer replace the configuration files with the files in the
// example_configurations/SCARA directory. // example_configurations/SCARA directory.
// //
@ -40,7 +40,7 @@ Here are some standard links for getting your machine calibrated:
// User-specified version info of this build to display in [Pronterface, etc] terminal window during // User-specified version info of this build to display in [Pronterface, etc] terminal window during
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
// build by the user have been successfully uploaded into firmware. // build by the user have been successfully uploaded into firmware.
#define STRING_VERSION "1.0.2" #define STRING_VERSION "1.0.3 dev"
#define STRING_URL "reprap.org" #define STRING_URL "reprap.org"
#define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
@ -65,11 +65,12 @@ Here are some standard links for getting your machine calibrated:
// The following define selects which electronics board you have. // The following define selects which electronics board you have.
// Please choose the name from boards.h that matches your setup // Please choose the name from boards.h that matches your setup
#ifndef MOTHERBOARD #ifndef MOTHERBOARD
#define MOTHERBOARD BOARD_ULTIMAKER #define MOTHERBOARD BOARD_RAMPS_13_EFB
#endif #endif
// Define this to set a custom name for your generic Mendel, // Optional custom name for your RepStrap or other custom machine
// #define CUSTOM_MENDEL_NAME "This Mendel" // Displayed in the LCD "Ready" message
// #define CUSTOM_MACHINE_NAME "3D Printer"
// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines) // Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines)
// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) // You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4)
@ -79,10 +80,17 @@ Here are some standard links for getting your machine calibrated:
// :[1,2,3,4] // :[1,2,3,4]
#define EXTRUDERS 1 #define EXTRUDERS 1
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).
// For the other hotends it is their distance from the extruder 0 hotend.
//#define EXTRUDER_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis
//#define EXTRUDER_OFFSET_Y {0.0, 5.00} // (in mm) for each extruder, offset of the hotend on the Y axis
//// The following define selects which power supply you have. Please choose the one that matches your setup //// The following define selects which power supply you have. Please choose the one that matches your setup
// 1 = ATX // 1 = ATX
// 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC) // 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC)
// :{1:'ATX',2:'X-Box 360'} // :{1:'ATX',2:'X-Box 360'}
#define POWER_SUPPLY 1 #define POWER_SUPPLY 1
// Define this to have the electronics keep the power supply off on startup. If you don't know what this is leave it. // Define this to have the electronics keep the power supply off on startup. If you don't know what this is leave it.
@ -131,9 +139,9 @@ Here are some standard links for getting your machine calibrated:
// Use it for Testing or Development purposes. NEVER for production machine. // Use it for Testing or Development purposes. NEVER for production machine.
// #define DUMMY_THERMISTOR_998_VALUE 25 // #define DUMMY_THERMISTOR_998_VALUE 25
// #define DUMMY_THERMISTOR_999_VALUE 100 // #define DUMMY_THERMISTOR_999_VALUE 100
// :{ 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" } // :{ '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" }
#define TEMP_SENSOR_0 -1 #define TEMP_SENSOR_0 1
#define TEMP_SENSOR_1 -1 #define TEMP_SENSOR_1 0
#define TEMP_SENSOR_2 0 #define TEMP_SENSOR_2 0
#define TEMP_SENSOR_3 0 #define TEMP_SENSOR_3 0
#define TEMP_SENSOR_BED 0 #define TEMP_SENSOR_BED 0
@ -193,7 +201,6 @@ Here are some standard links for getting your machine calibrated:
// is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
#define PID_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term #define PID_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term
#define K1 0.95 //smoothing factor within the PID #define K1 0.95 //smoothing factor within the PID
#define PID_dT ((OVERSAMPLENR * 10.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine
// If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
// Ultimaker // Ultimaker
@ -218,7 +225,7 @@ Here are some standard links for getting your machine calibrated:
// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis // Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
// //
// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. // Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder.
// If your PID_dT above is the default, and correct for your hardware/configuration, that means 7.689Hz, // If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz,
// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. // which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. // This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
// If your configuration is significantly different than this and you don't understand the issues involved, you probably // If your configuration is significantly different than this and you don't understand the issues involved, you probably
@ -328,19 +335,26 @@ your extruder heater takes 2 minutes to hit the target on heating.
// #define ENDSTOPPULLUP_XMIN // #define ENDSTOPPULLUP_XMIN
// #define ENDSTOPPULLUP_YMIN // #define ENDSTOPPULLUP_YMIN
// #define ENDSTOPPULLUP_ZMIN // #define ENDSTOPPULLUP_ZMIN
// #define ENDSTOPPULLUP_ZPROBE
#endif #endif
// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins. // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
const bool X_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. const bool X_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Y_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. const bool Y_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Z_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. const bool X_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. const bool Y_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
//#define DISABLE_MAX_ENDSTOPS //#define DISABLE_MAX_ENDSTOPS
//#define DISABLE_MIN_ENDSTOPS //#define DISABLE_MIN_ENDSTOPS
// @section machine // @section machine
// If you want to enable the Z Probe pin, but disable its use, uncomment the line below.
// This only affects a Z Probe Endstop if you have separate Z min endstop as well and have
// activated Z_PROBE_ENDSTOP below. If you are using the Z Min endstop on your Z Probe,
// this has no effect.
//#define DISABLE_Z_PROBE_ENDSTOP
// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1 // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
// :{0:'Low',1:'High'} // :{0:'Low',1:'High'}
@ -362,17 +376,17 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// @section machine // @section machine
// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way. // Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
#define INVERT_X_DIR true // for Mendel set to false, for Orca set to true #define INVERT_X_DIR false
#define INVERT_Y_DIR false // for Mendel set to true, for Orca set to false #define INVERT_Y_DIR false
#define INVERT_Z_DIR true // for Mendel set to false, for Orca set to true #define INVERT_Z_DIR false
// @section extruder // @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false. // For direct drive extruder v9 set to true, for geared extruder set to false.
#define INVERT_E0_DIR false // Direct drive extruder v9: true. Geared extruder: false #define INVERT_E0_DIR false
#define INVERT_E1_DIR false // Direct drive extruder v9: true. Geared extruder: false #define INVERT_E1_DIR false
#define INVERT_E2_DIR false // Direct drive extruder v9: true. Geared extruder: false #define INVERT_E2_DIR false
#define INVERT_E3_DIR false // Direct drive extruder v9: true. Geared extruder: false #define INVERT_E3_DIR false
// @section homing // @section homing
@ -392,8 +406,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#define X_MIN_POS 0 #define X_MIN_POS 0
#define Y_MIN_POS 0 #define Y_MIN_POS 0
#define Z_MIN_POS 0 #define Z_MIN_POS 0
#define X_MAX_POS 205 #define X_MAX_POS 200
#define Y_MAX_POS 205 #define Y_MAX_POS 200
#define Z_MAX_POS 200 #define Z_MAX_POS 200
//=========================================================================== //===========================================================================
@ -413,7 +427,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// #define MANUAL_BED_LEVELING // Add display menu option for bed leveling // #define MANUAL_BED_LEVELING // Add display menu option for bed leveling
// #define MESH_BED_LEVELING // Enable mesh bed leveling // #define MESH_BED_LEVELING // Enable mesh bed leveling
#if defined(MESH_BED_LEVELING) #ifdef MANUAL_BED_LEVELING
#define MBL_Z_STEP 0.025
#endif // MANUAL_BED_LEVELING
#ifdef MESH_BED_LEVELING
#define MESH_MIN_X 10 #define MESH_MIN_X 10
#define MESH_MAX_X (X_MAX_POS - MESH_MIN_X) #define MESH_MAX_X (X_MAX_POS - MESH_MIN_X)
#define MESH_MIN_Y 10 #define MESH_MIN_Y 10
@ -456,11 +474,12 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#define FRONT_PROBE_BED_POSITION 20 #define FRONT_PROBE_BED_POSITION 20
#define BACK_PROBE_BED_POSITION 170 #define BACK_PROBE_BED_POSITION 170
#define MIN_PROBE_EDGE 10 // The probe square sides can be no smaller than this
// Set the number of grid points per dimension // Set the number of grid points per dimension
// You probably don't need more than 3 (squared=9) // You probably don't need more than 3 (squared=9)
#define AUTO_BED_LEVELING_GRID_POINTS 2 #define AUTO_BED_LEVELING_GRID_POINTS 2
#else // !AUTO_BED_LEVELING_GRID #else // !AUTO_BED_LEVELING_GRID
// Arbitrary points to probe. A simple cross-product // Arbitrary points to probe. A simple cross-product
@ -474,11 +493,10 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#endif // AUTO_BED_LEVELING_GRID #endif // AUTO_BED_LEVELING_GRID
// Offsets to the probe relative to the extruder tip (Hotend - Probe) // Offsets to the probe relative to the extruder tip (Hotend - Probe)
// X and Y offsets must be integers // X and Y offsets must be integers
#define X_PROBE_OFFSET_FROM_EXTRUDER -25 // -left +right #define X_PROBE_OFFSET_FROM_EXTRUDER -25 // Probe on: -left +right
#define Y_PROBE_OFFSET_FROM_EXTRUDER -29 // -front +behind #define Y_PROBE_OFFSET_FROM_EXTRUDER -29 // Probe on: -front +behind
#define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35 // -below (always!) #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35 // -below (always!)
#define Z_RAISE_BEFORE_HOMING 4 // (in mm) Raise Z before homing (G28) for Probe Clearance. #define Z_RAISE_BEFORE_HOMING 4 // (in mm) Raise Z before homing (G28) for Probe Clearance.
@ -488,6 +506,10 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#define Z_RAISE_BEFORE_PROBING 15 //How much the extruder will be raised before traveling to the first probing point. #define Z_RAISE_BEFORE_PROBING 15 //How much the extruder will be raised before traveling to the first probing point.
#define Z_RAISE_BETWEEN_PROBINGS 5 //How much the extruder will be raised when traveling from between next probing points #define Z_RAISE_BETWEEN_PROBINGS 5 //How much the extruder will be raised when traveling from between next probing points
#define Z_RAISE_AFTER_PROBING 15 //How much the extruder will be raised after the last probing point.
// #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.
//Useful to retract a deployable probe.
//#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell //#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell
//#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. //#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.
@ -516,6 +538,20 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#endif #endif
// Support for a dedicated Z PROBE endstop separate from the Z MIN endstop.
// If you would like to use both a Z PROBE and a Z MIN endstop together or just a Z PROBE with a custom pin, uncomment #define Z_PROBE_ENDSTOP and read the instructions below.
// If you want to still use the Z min endstop for homing, disable Z_SAFE_HOMING above. Eg; to park the head outside the bed area when homing with G28.
// WARNING: The Z MIN endstop will need to set properly as it would without a Z PROBE to prevent head crashes and premature stopping during a print.
// To use a separate Z PROBE endstop, you must have a Z_PROBE_PIN defined in the pins.h file for your control board.
// If you are using a servo based Z PROBE, you will need to enable NUM_SERVOS, SERVO_ENDSTOPS and SERVO_ENDSTOPS_ANGLES in the R/C Servo below.
// RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin in the Aux 4 section of the RAMPS board. Use 5V for powered sensors, otherwise connect to ground and D32
// for normally closed configuration and 5V and D32 for normally open configurations. Normally closed configuration is advised and assumed.
// The D32 pin in Aux 4 on RAMPS maps to the Arduino D32 pin. Z_PROBE_PIN is setting the pin to use on the Arduino. Since the D32 pin on the RAMPS maps to D32 on Arduino, this works.
// D32 is currently selected in the RAMPS 1.3/1.4 pin file. All other boards will need changes to the respective pins_XXXXX.h file.
// WARNING: Setting the wrong pin may have unexpected and potentially disastrous outcomes. Use with caution and do your homework.
//#define Z_PROBE_ENDSTOP
#endif // ENABLE_AUTO_BED_LEVELING #endif // ENABLE_AUTO_BED_LEVELING
@ -536,24 +572,21 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// @section movement // @section movement
//// MOVEMENT SETTINGS /**
#define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E * MOVEMENT SETTINGS
*/
#define HOMING_FEEDRATE {50*60, 50*60, 4*60, 0} // set the homing speeds (mm/min) #define HOMING_FEEDRATE {50*60, 50*60, 4*60, 0} // set the homing speeds (mm/min)
// default settings // default settings
#define DEFAULT_AXIS_STEPS_PER_UNIT {78.7402,78.7402,200.0*8/3,760*1.1} // default steps per unit for Ultimaker #define DEFAULT_AXIS_STEPS_PER_UNIT {80,80,4000,500} // default steps per unit for Ultimaker
#define DEFAULT_MAX_FEEDRATE {500, 500, 5, 25} // (mm/sec) #define DEFAULT_MAX_FEEDRATE {300, 300, 5, 25} // (mm/sec)
#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. #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.
#define DEFAULT_ACCELERATION 3000 // X, Y, Z and E max acceleration in mm/s^2 for printing moves #define DEFAULT_ACCELERATION 3000 // X, Y, Z and E acceleration in mm/s^2 for printing moves
#define DEFAULT_RETRACT_ACCELERATION 3000 // X, Y, Z and E max acceleration in mm/s^2 for retracts #define DEFAULT_RETRACT_ACCELERATION 3000 // E acceleration in mm/s^2 for retracts
#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).
// For the other hotends it is their distance from the extruder 0 hotend.
// #define EXTRUDER_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis
// #define EXTRUDER_OFFSET_Y {0.0, 5.00} // (in mm) for each extruder, offset of the hotend on the Y axis
// The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously) // The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously)
#define DEFAULT_XYJERK 20.0 // (mm/sec) #define DEFAULT_XYJERK 20.0 // (mm/sec)
@ -570,9 +603,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// Custom M code points // Custom M code points
#define CUSTOM_M_CODES #define CUSTOM_M_CODES
#ifdef CUSTOM_M_CODES #ifdef CUSTOM_M_CODES
#ifdef ENABLE_AUTO_BED_LEVELING
#define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851 #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
#define Z_PROBE_OFFSET_RANGE_MIN -15 #define Z_PROBE_OFFSET_RANGE_MIN -20
#define Z_PROBE_OFFSET_RANGE_MAX -5 #define Z_PROBE_OFFSET_RANGE_MAX 20
#endif
#endif #endif
// @section extras // @section extras
@ -584,32 +619,37 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. // M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
//define this to enable EEPROM support //define this to enable EEPROM support
//#define EEPROM_SETTINGS //#define EEPROM_SETTINGS
//to disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
// please keep turned on if you can. #ifdef EEPROM_SETTINGS
//#define EEPROM_CHITCHAT // To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
#define EEPROM_CHITCHAT // please keep turned on if you can.
#endif
// @section temperature // @section temperature
// Preheat Constants // Preheat Constants
#define PLA_PREHEAT_HOTEND_TEMP 180 #define PLA_PREHEAT_HOTEND_TEMP 180
#define PLA_PREHEAT_HPB_TEMP 70 #define PLA_PREHEAT_HPB_TEMP 70
#define PLA_PREHEAT_FAN_SPEED 255 // Insert Value between 0 and 255 #define PLA_PREHEAT_FAN_SPEED 0 // Insert Value between 0 and 255
#define ABS_PREHEAT_HOTEND_TEMP 240 #define ABS_PREHEAT_HOTEND_TEMP 240
#define ABS_PREHEAT_HPB_TEMP 100 #define ABS_PREHEAT_HPB_TEMP 110
#define ABS_PREHEAT_FAN_SPEED 255 // Insert Value between 0 and 255 #define ABS_PREHEAT_FAN_SPEED 0 // Insert Value between 0 and 255
//==============================LCD and SD support============================= //==============================LCD and SD support=============================
// @section lcd // @section lcd
// Define your display language below. Replace (en) with your language code and uncomment. // Define your display language below. Replace (en) with your language code and uncomment.
// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu // en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
// See also language.h // See also language.h
//#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
// Character based displays can have different extended charsets. // Choose ONE of these 3 charsets. This has to match your hardware. Ignored for full graphic display.
#define DISPLAY_CHARSET_HD44780_JAPAN // "ääööüüß23°" // 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.
//#define DISPLAY_CHARSET_HD44780_WESTERN // "ÄäÖöÜüß²³°" if you see a '~' instead of a 'arrow_right' at the right of submenuitems - this is the right one. // See also documentation/LCDLanguageFont.md
#define DISPLAY_CHARSET_HD44780_JAPAN // this is the most common hardware
//#define DISPLAY_CHARSET_HD44780_WESTERN
//#define DISPLAY_CHARSET_HD44780_CYRILLIC
//#define ULTRA_LCD //general LCD support, also 16x2 //#define ULTRA_LCD //general LCD support, also 16x2
//#define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family) //#define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
@ -622,6 +662,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
//#define ULTIPANEL //the UltiPanel as on Thingiverse //#define ULTIPANEL //the UltiPanel as on Thingiverse
//#define LCD_FEEDBACK_FREQUENCY_HZ 1000 // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click //#define LCD_FEEDBACK_FREQUENCY_HZ 1000 // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
// 0 to disable buzzer feedback
// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3) // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
// http://reprap.org/wiki/PanelOne // http://reprap.org/wiki/PanelOne
@ -686,7 +727,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
//#define FAST_PWM_FAN //#define FAST_PWM_FAN
// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
// which is not ass annoying as with the hardware PWM. On the other hand, if this frequency // which is not as annoying as with the hardware PWM. On the other hand, if this frequency
// is too low, you should also increment SOFT_PWM_SCALE. // is too low, you should also increment SOFT_PWM_SCALE.
//#define FAN_SOFT_PWM //#define FAN_SOFT_PWM
@ -705,7 +746,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// Data from: http://www.doc-diy.net/photo/rc-1_hacked/ // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
// #define PHOTOGRAPH_PIN 23 // #define PHOTOGRAPH_PIN 23
// SF send wrong arc g-codes when using Arc Point as fillet procedure // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
//#define SF_ARC_FIX //#define SF_ARC_FIX
// Support for the BariCUDA Paste Extruder. // Support for the BariCUDA Paste Extruder.
@ -731,7 +772,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// Servo Endstops // Servo Endstops
// //
// This allows for servo actuated endstops, primary usage is for the Z Axis to eliminate calibration or bed height changes. // This allows for servo actuated endstops, primary usage is for the Z Axis to eliminate calibration or bed height changes.
// Use M206 command to correct for switch height offset to actual nozzle height. Store that setting with M500. // Use M851 to set the z-probe vertical offset from the nozzle. Store that setting with M500.
// //
//#define SERVO_ENDSTOPS {-1, -1, 0} // Servo index for X, Y, Z. Disable with -1 //#define SERVO_ENDSTOPS {-1, -1, 0} // Servo index for X, Y, Z. Disable with -1
//#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles //#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles

@ -112,6 +112,30 @@
// On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder. // On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder.
//#define Z_DUAL_STEPPER_DRIVERS //#define Z_DUAL_STEPPER_DRIVERS
#ifdef Z_DUAL_STEPPER_DRIVERS
// 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.
// That way the machine is capable to align the bed during home, since both Z steppers are homed.
// There is also an implementation of M666 (software endstops adjustment) to this feature.
// After Z homing, this adjustment is applied to just one of the steppers in order to align the bed.
// 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.
// 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.
// Play a little bit with small adjustments (0.5mm) and check the behaviour.
// The M119 (endstops report) will start reporting the Z2 Endstop as well.
#define Z_DUAL_ENDSTOPS
#ifdef Z_DUAL_ENDSTOPS
#define Z2_STEP_PIN E2_STEP_PIN // Stepper to be used to Z2 axis.
#define Z2_DIR_PIN E2_DIR_PIN
#define Z2_ENABLE_PIN E2_ENABLE_PIN
#define Z2_MAX_PIN 36 //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36)
const bool Z2_MAX_ENDSTOP_INVERTING = false;
#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.
#endif
#endif // Z_DUAL_STEPPER_DRIVERS
// Same again but for Y Axis. // Same again but for Y Axis.
//#define Y_DUAL_STEPPER_DRIVERS //#define Y_DUAL_STEPPER_DRIVERS
@ -124,50 +148,51 @@
// allowing faster printing speeds. // allowing faster printing speeds.
//#define DUAL_X_CARRIAGE //#define DUAL_X_CARRIAGE
#ifdef DUAL_X_CARRIAGE #ifdef DUAL_X_CARRIAGE
// Configuration for second X-carriage // Configuration for second X-carriage
// Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop;
// the second x-carriage always homes to the maximum endstop. // the second x-carriage always homes to the maximum endstop.
#define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
#define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed
#define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position
#define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position #define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position
// However: In this mode the EXTRUDER_OFFSET_X value for the second extruder provides a software // However: In this mode the EXTRUDER_OFFSET_X value for the second extruder provides a software
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command). // without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer. // Remember: you should set the second extruder x-offset to 0 in your slicer.
// Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h) // Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h)
#define X2_ENABLE_PIN 29 #define X2_ENABLE_PIN 29
#define X2_STEP_PIN 25 #define X2_STEP_PIN 25
#define X2_DIR_PIN 23 #define X2_DIR_PIN 23
// There are a few selectable movement modes for dual x-carriages using M605 S<mode> // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
// Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results // Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
// as long as it supports dual x-carriages. (M605 S0) // as long as it supports dual x-carriages. (M605 S0)
// Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so // Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
// that additional slicer support is not required. (M605 S1) // that additional slicer support is not required. (M605 S1)
// Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all // Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
// actions of the first x-carriage. This allows the printer to print 2 arbitrary items at // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
// once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm]) // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
// This is the default power-up mode which can be later using M605. // This is the default power-up mode which can be later using M605.
#define DEFAULT_DUAL_X_CARRIAGE_MODE 0 #define DEFAULT_DUAL_X_CARRIAGE_MODE 0
// Default settings in "Auto-park Mode" // Default settings in "Auto-park Mode"
#define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder #define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder
#define TOOLCHANGE_UNPARK_ZLIFT 1 // the distance to raise Z axis when unparking an extruder #define TOOLCHANGE_UNPARK_ZLIFT 1 // the distance to raise Z axis when unparking an extruder
// Default x offset in duplication mode (typically set to half print bed width) // Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100 #define DEFAULT_DUPLICATION_X_OFFSET 100
#endif //DUAL_X_CARRIAGE #endif //DUAL_X_CARRIAGE
// @section homing // @section homing
//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again: //homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
#define X_HOME_RETRACT_MM 5 #define X_HOME_BUMP_MM 5
#define Y_HOME_RETRACT_MM 5 #define Y_HOME_BUMP_MM 5
#define Z_HOME_RETRACT_MM 2 #define Z_HOME_BUMP_MM 2
#define HOMING_BUMP_DIVISOR {2, 2, 4} // Re-Bump Speed Divisor (Divides the Homing Feedrate)
//#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially. //#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
// @section machine // @section machine
@ -231,8 +256,8 @@
//=========================================================================== //===========================================================================
#define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly #define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
#define ENCODER_10X_STEPS_PER_SEC 75 // If the encoder steps per sec exceed this value, multiple the steps moved by ten to quickly advance the value #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
#define ENCODER_100X_STEPS_PER_SEC 160 // If the encoder steps per sec exceed this value, multiple the steps moved by 100 to really quickly advance the value #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
//#define ENCODER_RATE_MULTIPLIER_DEBUG // If defined, output the encoder steps per second value //#define ENCODER_RATE_MULTIPLIER_DEBUG // If defined, output the encoder steps per second value
//#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/ //#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/
@ -240,18 +265,26 @@
// @section lcd // @section lcd
#define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? #ifdef SDSUPPORT
#define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
// If you are using a RAMPS board or cheap E-bay purchased boards that do not detect when an SD card is inserted
// You can get round this by connecting a push button or single throw switch to the pin defined as SDCARDCARDDETECT
// in the pins.h file. When using a push button pulling the pin to ground this will need inverted. This setting should
// be commented out otherwise
#define SDCARDDETECTINVERTED
#define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers?
// 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. #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
// using:
//#define MENU_ADDAUTOSTART
// Show a progress bar on HD44780 LCDs for SD printing #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order.
//#define LCD_PROGRESS_BAR // 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.
// using:
//#define MENU_ADDAUTOSTART
#ifdef LCD_PROGRESS_BAR // Show a progress bar on HD44780 LCDs for SD printing
//#define LCD_PROGRESS_BAR
#ifdef LCD_PROGRESS_BAR
// Amount of time (ms) to show the bar // Amount of time (ms) to show the bar
#define PROGRESS_BAR_BAR_TIME 2000 #define PROGRESS_BAR_BAR_TIME 2000
// Amount of time (ms) to show the status message // Amount of time (ms) to show the status message
@ -260,7 +293,9 @@
#define PROGRESS_MSG_EXPIRE 0 #define PROGRESS_MSG_EXPIRE 0
// Enable this to show messages for MSG_TIME then hide them // Enable this to show messages for MSG_TIME then hide them
//#define PROGRESS_MSG_ONCE //#define PROGRESS_MSG_ONCE
#endif #endif
#endif // SDSUPPORT
// @section more // @section more
@ -277,6 +312,8 @@
// Enable the option to stop SD printing when hitting and endstops, needs to be enabled from the LCD menu when this option is enabled. // Enable the option to stop SD printing when hitting and endstops, needs to be enabled from the LCD menu when this option is enabled.
//#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
// @section lcd
// Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process // Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process
// it can e.g. be used to change z-positions in the print startup phase in real-time // it can e.g. be used to change z-positions in the print startup phase in real-time
// does not respect endstops! // does not respect endstops!
@ -287,6 +324,8 @@
#define BABYSTEP_Z_MULTIPLICATOR 2 //faster z movements #define BABYSTEP_Z_MULTIPLICATOR 2 //faster z movements
#endif #endif
// @section extruder
// extruder advance constant (s2/mm3) // extruder advance constant (s2/mm3)
// //
// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2 // advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
@ -298,13 +337,11 @@
#ifdef ADVANCE #ifdef ADVANCE
#define EXTRUDER_ADVANCE_K .0 #define EXTRUDER_ADVANCE_K .0
#define D_FILAMENT 2.85 #define D_FILAMENT 2.85
#define STEPS_MM_E 836 #define STEPS_MM_E 836
#define EXTRUSION_AREA (0.25 * D_FILAMENT * D_FILAMENT * 3.14159) #endif
#define STEPS_PER_CUBIC_MM_E (axis_steps_per_unit[E_AXIS]/ EXTRUSION_AREA)
#endif // ADVANCE // @section extras
// Arc interpretation settings: // Arc interpretation settings:
#define MM_PER_ARC_SEGMENT 1 #define MM_PER_ARC_SEGMENT 1
@ -312,14 +349,6 @@
const unsigned int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement const unsigned int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement
// @section lcd
// If you are using a RAMPS board or cheap E-bay purchased boards that do not detect when an SD card is inserted
// You can get round this by connecting a push button or single throw switch to the pin defined as SDCARDCARDDETECT
// in the pins.h file. When using a push button pulling the pin to ground this will need inverted. This setting should
// be commented out otherwise
#define SDCARDDETECTINVERTED
// @section temperature // @section temperature
// Control heater 0 and heater 1 in parallel. // Control heater 0 and heater 1 in parallel.
@ -333,7 +362,7 @@ const unsigned int dropsegments=5; //everything with less than this number of st
// The number of linear motions that can be in the plan at any give time. // The number of linear motions that can be in the plan at any give time.
// 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. // 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.
#if defined SDSUPPORT #ifdef SDSUPPORT
#define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
#else #else
#define BLOCK_BUFFER_SIZE 16 // maximize block buffer #define BLOCK_BUFFER_SIZE 16 // maximize block buffer
@ -345,7 +374,7 @@ const unsigned int dropsegments=5; //everything with less than this number of st
#define MAX_CMD_SIZE 96 #define MAX_CMD_SIZE 96
#define BUFSIZE 4 #define BUFSIZE 4
// @section extras // @section fwretract
// Firmware based and LCD controlled retract // Firmware based and LCD controlled retract
// M207 and M208 can be used to define parameters for the retraction. // M207 and M208 can be used to define parameters for the retraction.
@ -377,6 +406,143 @@ const unsigned int dropsegments=5; //everything with less than this number of st
#endif #endif
#endif #endif
/******************************************************************************\
* enable this section if you have TMC26X motor drivers.
* you need to import the TMC26XStepper library into the arduino IDE for this
******************************************************************************/
// @section tmc
//#define HAVE_TMCDRIVER
#ifdef HAVE_TMCDRIVER
// #define X_IS_TMC
#define X_MAX_CURRENT 1000 //in mA
#define X_SENSE_RESISTOR 91 //in mOhms
#define X_MICROSTEPS 16 //number of microsteps
// #define X2_IS_TMC
#define X2_MAX_CURRENT 1000 //in mA
#define X2_SENSE_RESISTOR 91 //in mOhms
#define X2_MICROSTEPS 16 //number of microsteps
// #define Y_IS_TMC
#define Y_MAX_CURRENT 1000 //in mA
#define Y_SENSE_RESISTOR 91 //in mOhms
#define Y_MICROSTEPS 16 //number of microsteps
// #define Y2_IS_TMC
#define Y2_MAX_CURRENT 1000 //in mA
#define Y2_SENSE_RESISTOR 91 //in mOhms
#define Y2_MICROSTEPS 16 //number of microsteps
// #define Z_IS_TMC
#define Z_MAX_CURRENT 1000 //in mA
#define Z_SENSE_RESISTOR 91 //in mOhms
#define Z_MICROSTEPS 16 //number of microsteps
// #define Z2_IS_TMC
#define Z2_MAX_CURRENT 1000 //in mA
#define Z2_SENSE_RESISTOR 91 //in mOhms
#define Z2_MICROSTEPS 16 //number of microsteps
// #define E0_IS_TMC
#define E0_MAX_CURRENT 1000 //in mA
#define E0_SENSE_RESISTOR 91 //in mOhms
#define E0_MICROSTEPS 16 //number of microsteps
// #define E1_IS_TMC
#define E1_MAX_CURRENT 1000 //in mA
#define E1_SENSE_RESISTOR 91 //in mOhms
#define E1_MICROSTEPS 16 //number of microsteps
// #define E2_IS_TMC
#define E2_MAX_CURRENT 1000 //in mA
#define E2_SENSE_RESISTOR 91 //in mOhms
#define E2_MICROSTEPS 16 //number of microsteps
// #define E3_IS_TMC
#define E3_MAX_CURRENT 1000 //in mA
#define E3_SENSE_RESISTOR 91 //in mOhms
#define E3_MICROSTEPS 16 //number of microsteps
#endif
/******************************************************************************\
* enable this section if you have L6470 motor drivers.
* you need to import the L6470 library into the arduino IDE for this
******************************************************************************/
// @section l6470
//#define HAVE_L6470DRIVER
#ifdef HAVE_L6470DRIVER
// #define X_IS_L6470
#define X_MICROSTEPS 16 //number of microsteps
#define X_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define X_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define X2_IS_L6470
#define X2_MICROSTEPS 16 //number of microsteps
#define X2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define X2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define Y_IS_L6470
#define Y_MICROSTEPS 16 //number of microsteps
#define Y_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define Y_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define Y2_IS_L6470
#define Y2_MICROSTEPS 16 //number of microsteps
#define Y2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define Y2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define Z_IS_L6470
#define Z_MICROSTEPS 16 //number of microsteps
#define Z_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define Z_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define Z2_IS_L6470
#define Z2_MICROSTEPS 16 //number of microsteps
#define Z2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define Z2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define E0_IS_L6470
#define E0_MICROSTEPS 16 //number of microsteps
#define E0_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define E0_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define E1_IS_L6470
#define E1_MICROSTEPS 16 //number of microsteps
#define E1_MICROSTEPS 16 //number of microsteps
#define E1_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define E1_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define E2_IS_L6470
#define E2_MICROSTEPS 16 //number of microsteps
#define E2_MICROSTEPS 16 //number of microsteps
#define E2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define E2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define E3_IS_L6470
#define E3_MICROSTEPS 16 //number of microsteps
#define E3_MICROSTEPS 16 //number of microsteps
#define E3_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define E3_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall
#endif
#include "Conditionals.h" #include "Conditionals.h"
#include "SanityCheck.h" #include "SanityCheck.h"

@ -10,10 +10,11 @@
#define BOARD_CHEAPTRONIC 2 // Cheaptronic v1.0 #define BOARD_CHEAPTRONIC 2 // Cheaptronic v1.0
#define BOARD_SETHI 20 // Sethi 3D_1 #define BOARD_SETHI 20 // Sethi 3D_1
#define BOARD_RAMPS_OLD 3 // MEGA/RAMPS up to 1.2 #define BOARD_RAMPS_OLD 3 // MEGA/RAMPS up to 1.2
#define BOARD_RAMPS_13_EFB 33 // RAMPS 1.3 / 1.4 (Extruder, Fan, Bed) #define BOARD_RAMPS_13_EFB 33 // RAMPS 1.3 / 1.4 (Power outputs: Extruder, Fan, Bed)
#define BOARD_RAMPS_13_EEB 34 // RAMPS 1.3 / 1.4 (Extruder0, Extruder1, Bed) #define BOARD_RAMPS_13_EEB 34 // RAMPS 1.3 / 1.4 (Power outputs: Extruder0, Extruder1, Bed)
#define BOARD_RAMPS_13_EFF 35 // RAMPS 1.3 / 1.4 (Extruder, Fan, Fan) #define BOARD_RAMPS_13_EFF 35 // RAMPS 1.3 / 1.4 (Power outputs: Extruder, Fan, Fan)
#define BOARD_RAMPS_13_EEF 36 // RAMPS 1.3 / 1.4 (Extruder0, Extruder1, Fan) #define BOARD_RAMPS_13_EEF 36 // RAMPS 1.3 / 1.4 (Power outputs: Extruder0, Extruder1, Fan)
#define BOARD_FELIX2 37 // Felix 2.0+ Electronics Board (RAMPS like)
#define BOARD_DUEMILANOVE_328P 4 // Duemilanove w/ ATMega328P pin assignments #define BOARD_DUEMILANOVE_328P 4 // Duemilanove w/ ATMega328P pin assignments
#define BOARD_GEN6 5 // Gen6 #define BOARD_GEN6 5 // Gen6
#define BOARD_GEN6_DELUXE 51 // Gen6 deluxe #define BOARD_GEN6_DELUXE 51 // Gen6 deluxe
@ -28,14 +29,15 @@
#define BOARD_ULTIMAKER 7 // Ultimaker #define BOARD_ULTIMAKER 7 // Ultimaker
#define BOARD_ULTIMAKER_OLD 71 // Ultimaker (Older electronics. Pre 1.5.4. This is rare) #define BOARD_ULTIMAKER_OLD 71 // Ultimaker (Older electronics. Pre 1.5.4. This is rare)
#define BOARD_ULTIMAIN_2 72 // Ultimainboard 2.x (Uses TEMP_SENSOR 20) #define BOARD_ULTIMAIN_2 72 // Ultimainboard 2.x (Uses TEMP_SENSOR 20)
#define BOARD_3DRAG 77 // 3Drag #define BOARD_3DRAG 77 // 3Drag Controller
#define BOARD_K8200 78 // Vellemann K8200 (derived from 3Drag) #define BOARD_K8200 78 // Vellemann K8200 Controller (derived from 3Drag Controller)
#define BOARD_TEENSYLU 8 // Teensylu #define BOARD_TEENSYLU 8 // Teensylu
#define BOARD_RUMBA 80 // Rumba #define BOARD_RUMBA 80 // Rumba
#define BOARD_PRINTRBOARD 81 // Printrboard (AT90USB1286) #define BOARD_PRINTRBOARD 81 // Printrboard (AT90USB1286)
#define BOARD_BRAINWAVE 82 // Brainwave (AT90USB646) #define BOARD_BRAINWAVE 82 // Brainwave (AT90USB646)
#define BOARD_SAV_MKI 83 // SAV Mk-I (AT90USB1286) #define BOARD_SAV_MKI 83 // SAV Mk-I (AT90USB1286)
#define BOARD_TEENSY2 84 // Teensy++2.0 (AT90USB1286) - CLI compile: DEFINES=AT90USBxx_TEENSYPP_ASSIGNMENTS HARDWARE_MOTHERBOARD=84 make #define BOARD_TEENSY2 84 // Teensy++2.0 (AT90USB1286) - CLI compile: DEFINES=AT90USBxx_TEENSYPP_ASSIGNMENTS HARDWARE_MOTHERBOARD=84 make
#define BOARD_BRAINWAVE_PRO 85 // Brainwave Pro (AT90USB1286)
#define BOARD_GEN3_PLUS 9 // Gen3+ #define BOARD_GEN3_PLUS 9 // Gen3+
#define BOARD_GEN3_MONOLITHIC 22 // Gen3 Monolithic Electronics #define BOARD_GEN3_MONOLITHIC 22 // Gen3 Monolithic Electronics
#define BOARD_MEGATRONICS 70 // Megatronics #define BOARD_MEGATRONICS 70 // Megatronics
@ -50,10 +52,11 @@
#define BOARD_LEAPFROG 999 // Leapfrog #define BOARD_LEAPFROG 999 // Leapfrog
#define BOARD_WITBOX 41 // bq WITBOX #define BOARD_WITBOX 41 // bq WITBOX
#define BOARD_HEPHESTOS 42 // bq Prusa i3 Hephestos #define BOARD_HEPHESTOS 42 // bq Prusa i3 Hephestos
#define BOARD_BAM_DICE 401 // 2PrintBeta BAM&DICE with STK drivers
#define BOARD_BAM_DICE_DUE 402 // 2PrintBeta BAM&DICE Due with STK drivers
#define BOARD_99 99 // This is in pins.h but...? #define BOARD_99 99 // This is in pins.h but...?
#define MB(board) (MOTHERBOARD==BOARD_##board) #define MB(board) (MOTHERBOARD==BOARD_##board)
#define IS_RAMPS (MB(RAMPS_OLD) || MB(RAMPS_13_EFB) || MB(RAMPS_13_EEB) || MB(RAMPS_13_EFF) || MB(RAMPS_13_EEF))
#endif //__BOARDS_H #endif //__BOARDS_H

@ -11,6 +11,7 @@
// //
// ==> ALWAYS TRY TO COMPILE MARLIN WITH/WITHOUT "ULTIPANEL" / "ULTRALCD" / "SDSUPPORT" #define IN "Configuration.h" // ==> ALWAYS TRY TO COMPILE MARLIN WITH/WITHOUT "ULTIPANEL" / "ULTRALCD" / "SDSUPPORT" #define IN "Configuration.h"
// ==> ALSO TRY ALL AVAILABLE LANGUAGE OPTIONS // ==> ALSO TRY ALL AVAILABLE LANGUAGE OPTIONS
// See also documentation/LCDLanguageFont.md
// Languages // Languages
// en English // en English
@ -27,14 +28,19 @@
// nl Dutch // nl Dutch
// ca Catalan // ca Catalan
// eu Basque-Euskera // eu Basque-Euskera
// kana Japanese
// kana_utf Japanese
#ifndef LANGUAGE_INCLUDE #ifndef LANGUAGE_INCLUDE
// pick your language from the list above // pick your language from the list above
#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
#endif #endif
#ifdef HAS_AUTOMATIC_VERSIONING
#include "_Version.h"
#endif
#define PROTOCOL_VERSION "1.0" #define PROTOCOL_VERSION "1.0"
#define FIRMWARE_URL "https://github.com/MarlinFirmware/Marlin"
#if MB(ULTIMAKER)|| MB(ULTIMAKER_OLD)|| MB(ULTIMAIN_2) #if MB(ULTIMAKER)|| MB(ULTIMAKER_OLD)|| MB(ULTIMAIN_2)
#define MACHINE_NAME "Ultimaker" #define MACHINE_NAME "Ultimaker"
@ -57,12 +63,33 @@
#elif MB(HEPHESTOS) #elif MB(HEPHESTOS)
#define MACHINE_NAME "HEPHESTOS" #define MACHINE_NAME "HEPHESTOS"
#define FIRMWARE_URL "http://www.bq.com/gb/downloads-prusa-i3-hephestos.html" #define FIRMWARE_URL "http://www.bq.com/gb/downloads-prusa-i3-hephestos.html"
#else // Default firmware set to Mendel #elif MB(BRAINWAVE_PRO)
#define MACHINE_NAME "Kossel Pro"
#ifndef FIRMWARE_URL
#define FIRMWARE_URL "https://github.com/OpenBeamUSA/Marlin/"
#endif
#else
#ifndef MACHINE_NAME
#define MACHINE_NAME "Mendel" #define MACHINE_NAME "Mendel"
#endif
#endif #endif
#ifdef CUSTOM_MENDEL_NAME #ifdef CUSTOM_MENDEL_NAME
#define MACHINE_NAME CUSTOM_MENDEL_NAME #error CUSTOM_MENDEL_NAME deprecated - use CUSTOM_MACHINE_NAME
#define CUSTOM_MACHINE_NAME CUSTOM_MENDEL_NAME
#endif
#ifdef CUSTOM_MACHINE_NAME
#undef MACHINE_NAME
#define MACHINE_NAME CUSTOM_MACHINE_NAME
#endif
#ifndef FIRMWARE_URL
#define FIRMWARE_URL "https://github.com/MarlinFirmware/Marlin"
#endif
#ifndef BUILD_VERSION
#define BUILD_VERSION "V1; Sprinter/grbl mashup for gen6"
#endif #endif
#ifndef MACHINE_UUID #ifndef MACHINE_UUID
@ -83,7 +110,7 @@
// Serial Console Messages (do not translate those!) // Serial Console Messages (do not translate those!)
#define MSG_Enqueing "enqueing \"" #define MSG_Enqueueing "enqueueing \""
#define MSG_POWERUP "PowerUp" #define MSG_POWERUP "PowerUp"
#define MSG_EXTERNAL_RESET " External Reset" #define MSG_EXTERNAL_RESET " External Reset"
#define MSG_BROWNOUT_RESET " Brown out Reset" #define MSG_BROWNOUT_RESET " Brown out Reset"
@ -113,7 +140,7 @@
#define MSG_HEATING_COMPLETE "Heating done." #define MSG_HEATING_COMPLETE "Heating done."
#define MSG_BED_HEATING "Bed Heating." #define MSG_BED_HEATING "Bed Heating."
#define MSG_BED_DONE "Bed done." #define MSG_BED_DONE "Bed done."
#define MSG_M115_REPORT "FIRMWARE_NAME:Marlin V1; Sprinter/grbl mashup for gen6 FIRMWARE_URL:" FIRMWARE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:" MACHINE_NAME " EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) " UUID:" MACHINE_UUID "\n" #define MSG_M115_REPORT "FIRMWARE_NAME:Marlin " BUILD_VERSION " FIRMWARE_URL:" FIRMWARE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:" MACHINE_NAME " EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) " UUID:" MACHINE_UUID "\n"
#define MSG_COUNT_X " Count X: " #define MSG_COUNT_X " Count X: "
#define MSG_ERR_KILLED "Printer halted. kill() called!" #define MSG_ERR_KILLED "Printer halted. kill() called!"
#define MSG_ERR_STOPPED "Printer stopped due to errors. Fix the error and use M999 to restart. (Temperature is reset. Set it after restarting)" #define MSG_ERR_STOPPED "Printer stopped due to errors. Fix the error and use M999 to restart. (Temperature is reset. Set it after restarting)"
@ -121,12 +148,15 @@
#define MSG_UNKNOWN_COMMAND "Unknown command: \"" #define MSG_UNKNOWN_COMMAND "Unknown command: \""
#define MSG_ACTIVE_EXTRUDER "Active Extruder: " #define MSG_ACTIVE_EXTRUDER "Active Extruder: "
#define MSG_INVALID_EXTRUDER "Invalid extruder" #define MSG_INVALID_EXTRUDER "Invalid extruder"
#define MSG_INVALID_SOLENOID "Invalid solenoid"
#define MSG_X_MIN "x_min: " #define MSG_X_MIN "x_min: "
#define MSG_X_MAX "x_max: " #define MSG_X_MAX "x_max: "
#define MSG_Y_MIN "y_min: " #define MSG_Y_MIN "y_min: "
#define MSG_Y_MAX "y_max: " #define MSG_Y_MAX "y_max: "
#define MSG_Z_MIN "z_min: " #define MSG_Z_MIN "z_min: "
#define MSG_Z_MAX "z_max: " #define MSG_Z_MAX "z_max: "
#define MSG_Z2_MAX "z2_max: "
#define MSG_Z_PROBE "z_probe: "
#define MSG_M119_REPORT "Reporting endstop status" #define MSG_M119_REPORT "Reporting endstop status"
#define MSG_ENDSTOP_HIT "TRIGGERED" #define MSG_ENDSTOP_HIT "TRIGGERED"
#define MSG_ENDSTOP_OPEN "open" #define MSG_ENDSTOP_OPEN "open"
@ -159,68 +189,48 @@
#define MSG_ERR_EEPROM_WRITE "Error writing to EEPROM!" #define MSG_ERR_EEPROM_WRITE "Error writing to EEPROM!"
// temperature.cpp strings
#define MSG_PID_AUTOTUNE "PID Autotune"
#define MSG_PID_AUTOTUNE_START MSG_PID_AUTOTUNE " start"
#define MSG_PID_AUTOTUNE_FAILED MSG_PID_AUTOTUNE " failed!"
#define MSG_PID_BAD_EXTRUDER_NUM MSG_PID_AUTOTUNE_FAILED " Bad extruder number"
#define MSG_PID_TEMP_TOO_HIGH MSG_PID_AUTOTUNE_FAILED " Temperature too high"
#define MSG_PID_TIMEOUT MSG_PID_AUTOTUNE_FAILED " timeout"
#define MSG_BIAS " bias: "
#define MSG_D " d: "
#define MSG_T_MIN " min: "
#define MSG_T_MAX " max: "
#define MSG_KU " Ku: "
#define MSG_TU " Tu: "
#define MSG_CLASSIC_PID " Classic PID "
#define MSG_KP " Kp: "
#define MSG_KI " Ki: "
#define MSG_KD " Kd: "
#define MSG_OK_B "ok B:"
#define MSG_OK_T "ok T:"
#define MSG_AT " @:"
#define MSG_PID_AUTOTUNE_FINISHED MSG_PID_AUTOTUNE " finished! Put the last Kp, Ki and Kd constants from above into Configuration.h"
#define MSG_PID_DEBUG " PID_DEBUG "
#define MSG_PID_DEBUG_INPUT ": Input "
#define MSG_PID_DEBUG_OUTPUT " Output "
#define MSG_PID_DEBUG_PTERM " pTerm "
#define MSG_PID_DEBUG_ITERM " iTerm "
#define MSG_PID_DEBUG_DTERM " dTerm "
#define MSG_HEATING_FAILED "Heating failed"
#define MSG_EXTRUDER_SWITCHED_OFF "Extruder switched off. Temperature difference between temp sensors is too high !"
#define MSG_INVALID_EXTRUDER_NUM " - Invalid extruder number !"
#define MSG_THERMAL_RUNAWAY_STOP "Thermal Runaway, system stopped! Heater_ID: "
#define MSG_SWITCHED_OFF_MAX " switched off. MAXTEMP triggered !!"
#define MSG_MINTEMP_EXTRUDER_OFF ": Extruder switched off. MINTEMP triggered !"
#define MSG_MAXTEMP_EXTRUDER_OFF ": Extruder" MSG_SWITCHED_OFF_MAX
#define MSG_MAXTEMP_BED_OFF "Heated bed" MSG_SWITCHED_OFF_MAX
// LCD Menu Messages // LCD Menu Messages
// Add your own character. Reference: https://github.com/MarlinFirmware/Marlin/pull/1434 photos #if !(defined( DISPLAY_CHARSET_HD44780_JAPAN ) || defined( DISPLAY_CHARSET_HD44780_WESTERN ) || defined( DISPLAY_CHARSET_HD44780_CYRILLIC ))
// and https://www.sparkfun.com/datasheets/LCD/HD44780.pdf page 17-18 #define DISPLAY_CHARSET_HD44780_JAPAN
#ifdef DOGLCD
#define STR_Ae "\304" // 'Ä' U8glib
#define STR_ae "\344" // 'ä'
#define STR_Oe "\326" // 'Ö'
#define STR_oe STR_Oe // 'ö'
#define STR_Ue "\334" // 'Ü'
#define STR_ue STR_Ue // 'ü'
#define STR_sz "\337" // 'ß'
#define STR_h2 "\262" // '²'
#define STR_h3 "\263" // '³'
#define STR_Deg "\260" // '°'
#define STR_THERMOMETER "\377"
#else
#ifdef DISPLAY_CHARSET_HD44780_JAPAN // HD44780 ROM Code: A00 (Japan)
#define STR_ae "\xe1"
#define STR_Ae STR_ae
#define STR_oe "\357"
#define STR_Oe STR_oe
#define STR_ue "\365"
#define STR_Ue STR_ue
#define STR_sz "\342"
#define STR_h2 "2"
#define STR_h3 "3"
#define STR_Deg "\271"
#define STR_THERMOMETER "\002"
#endif
#ifdef DISPLAY_CHARSET_HD44780_WESTERN // HD44780 ROM Code: A02 (Western)
#define STR_Ae "\216"
#define STR_ae "\204"
#define STR_Oe "\211"
#define STR_oe "\204"
#define STR_Ue "\212"
#define STR_ue "\201"
#define STR_sz "\160"
#define STR_h2 "\262"
#define STR_h3 "\263"
#define STR_Deg "\337"
#define STR_THERMOMETER "\002"
#endif
#endif #endif
/*
#define TESTSTRING000 "\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017"
#define TESTSTRING020 "\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
#define TESTSTRING040 "\040\041\042\043\044\045\046\047\050\051\052\053\054\055\056\057"
#define TESTSTRING060 "\060\061\062\063\064\065\066\067\070\071\072\073\074\075\076\077"
#define TESTSTRING100 "\100\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117"
#define TESTSTRING120 "\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137"
#define TESTSTRING140 "\140\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157"
#define TESTSTRING160 "\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176\177"
#define TESTSTRING200 "\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217"
#define TESTSTRING220 "\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237"
#define TESTSTRING240 "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257"
#define TESTSTRING260 "\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277"
#define TESTSTRING300 "\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317"
#define TESTSTRING320 "\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337"
#define TESTSTRING340 "\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357"
#define TESTSTRING360 "\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377"
*/
#include LANGUAGE_INCLUDE #include LANGUAGE_INCLUDE
#include "language_en.h" #include "language_en.h"

@ -30,6 +30,10 @@
<label id="tipson"><input type="checkbox" checked /> ?</label> <label id="tipson"><input type="checkbox" checked /> ?</label>
<a href="" class="download-all">Download Zip</a> <a href="" class="download-all">Download Zip</a>
<fieldset id="info">
<legend>Info</legend>
</fieldset>
<fieldset id="machine"> <fieldset id="machine">
<legend>Machine</legend> <legend>Machine</legend>
@ -42,7 +46,7 @@
<label class="newline">Motherboard:</label><select name="MOTHERBOARD"></select> <label class="newline">Motherboard:</label><select name="MOTHERBOARD"></select>
<label class="newline">Custom Name:</label><input name="CUSTOM_MENDEL_NAME" type="text" size="14" maxlength="12" value="" /> <label class="newline">Custom Name:</label><input name="CUSTOM_MACHINE_NAME" type="text" size="14" maxlength="12" value="" />
<label class="newline">Machine UUID:</label><input name="MACHINE_UUID" type="text" size="38" maxlength="36" value="" /> <label class="newline">Machine UUID:</label><input name="MACHINE_UUID" type="text" size="38" maxlength="36" value="" />
@ -84,12 +88,20 @@
<legend>Bed Leveling</legend> <legend>Bed Leveling</legend>
</fieldset> </fieldset>
<fieldset id="extras"> <fieldset id="fwretract">
<legend>Extras</legend> <legend>FW Retract</legend>
</fieldset> </fieldset>
<fieldset id="info"> <fieldset id="tmc">
<legend>Info</legend> <legend>TMC</legend>
</fieldset>
<fieldset id="l6470">
<legend>L6470</legend>
</fieldset>
<fieldset id="extras">
<legend>Extras</legend>
</fieldset> </fieldset>
<fieldset id="more"> <fieldset id="more">

@ -29,9 +29,9 @@ $(function(){
var config = { var config = {
type: 'github', type: 'github',
host: 'https://api.github.com', host: 'https://api.github.com',
owner: 'thinkyhead', owner: 'MarlinFirmware',
repo: 'Marlin', repo: 'Marlin',
ref: 'marlin_configurator', ref: 'Development',
path: 'Marlin/configurator/config' path: 'Marlin/configurator/config'
}; };
/**/ /**/
@ -397,7 +397,7 @@ window.configuratorApp = (function(){
* .count number of items in the group * .count number of items in the group
*/ */
refreshDefineGroups: function(cindex) { refreshDefineGroups: function(cindex) {
var findDef = /^(|.*_)(([XYZE](MAX|MIN))|(E[0-3]|[XYZE01234])|MAX|MIN|(bed)?K[pid]|HOTEND|HPB|JAPAN|WESTERN|LEFT|RIGHT|BACK|FRONT|[XYZ]_POINT)(_.*|)$/i; var findDef = /^(|.*_)(([XYZE](MAX|MIN))|(E[0-3]|[XYZE01234])|MAX|MIN|(bed)?K[pid]|HOTEND|HPB|JAPAN|WESTERN|CYRILLIC|LEFT|RIGHT|BACK|FRONT|[XYZ]_POINT)(_.*|)$/i;
var match_prev, patt, title, nameList, groups = {}, match_section; var match_prev, patt, title, nameList, groups = {}, match_section;
$.each(define_list[cindex], function(i, name) { $.each(define_list[cindex], function(i, name) {
if (match_prev) { if (match_prev) {
@ -458,7 +458,8 @@ window.configuratorApp = (function(){
break; break;
case 'JAPAN': case 'JAPAN':
case 'WESTERN': case 'WESTERN':
patt = '(JAPAN|WESTERN)'; case 'CYRILLIC':
patt = '(JAPAN|WESTERN|CYRILLIC)';
break; break;
case 'XMIN': case 'XMIN':
case 'XMAX': case 'XMAX':
@ -1267,16 +1268,33 @@ window.configuratorApp = (function(){
if (info.line.search(find) >= 0) if (info.line.search(find) >= 0)
eoltip = tooltip = info.line.replace(find, '$1'); eoltip = tooltip = info.line.replace(find, '$1');
// Get all the comments immediately before the item // Get all the comments immediately before the item, also include #define lines preceding it
var s; var s;
find = new RegExp('(([ \\t]*(//|#)[^\n]+\n){1,4})' + info.line.regEsc(), 'g'); // find = new RegExp('(([ \\t]*(//|#)[^\n]+\n){1,4})' + info.line.regEsc(), 'g');
find = new RegExp('(([ \\t]*//+[^\n]+\n)+([ \\t]*(//)?#define[^\n]+\n)*)' + info.line.regEsc(), 'g');
if (r = find.exec(txt)) { if (r = find.exec(txt)) {
// Get the text of the found comments var temp = [], tips = [];
// Find each line in forward order, store in reverse
find = new RegExp('^[ \\t]*//+[ \\t]*(.*)[ \\t]*$', 'gm'); find = new RegExp('^[ \\t]*//+[ \\t]*(.*)[ \\t]*$', 'gm');
while((s = find.exec(r[1])) !== null) { while((s = find.exec(r[1])) !== null) temp.unshift(s[1]);
var tip = s[1].replace(/[ \\t]*(={5,}|(#define[ \\t]+.*|@section[ \\t]+\w+))[ \\t]*/g, '');
if (tip.length) { this.log(name+":\n"+temp.join('\n'), 2);
if (tip.match(/^#define[ \\t]/) != null) tooltip = eoltip;
// Go through the reversed lines and add comment lines on
$.each(temp, function(i,v) {
// @ annotation breaks the comment chain
if (v.match(/^[ \\t]*\/\/+[ \\t]*@/)) return false;
// A #define breaks the chain, after a good tip
if (v.match(/^[ \\t]*(\/\/+)?[ \\t]*#define/)) return (tips.length < 1);
// Skip unwanted lines
if (v.match(/^[ \\t]*(={5,}|#define[ \\t]+.*)/g)) return true;
tips.unshift(v);
});
// Build the final tooltip, extract embedded options
$.each(tips, function(i,tip) {
// if (tip.match(/^#define[ \\t]/) != null) tooltip = eoltip;
// JSON data? Save as select options // JSON data? Save as select options
if (!info.options && tip.match(/:[\[{]/) != null) { if (!info.options && tip.match(/:[\[{]/) != null) {
// TODO // TODO
@ -1290,9 +1308,7 @@ window.configuratorApp = (function(){
// Other lines added to the tooltip // Other lines added to the tooltip
tooltip += ' ' + tip + '\n'; tooltip += ' ' + tip + '\n';
} }
} });
}
}
// Add .tooltip and .lineNum properties to the info // Add .tooltip and .lineNum properties to the info
find = new RegExp('^'+name); // Strip the name from the tooltip find = new RegExp('^'+name); // Strip the name from the tooltip
@ -1316,7 +1332,9 @@ window.configuratorApp = (function(){
enabled: enable_cond ? enable_cond : 'true' enabled: enable_cond ? enable_cond : 'true'
}); });
} } // found comments
} // if info.type
else else
info = null; info = null;

@ -0,0 +1,157 @@
/*
Fontname: -Misc-Fixed-Medium-R-Normal--9-90-75-75-C-60-ISO10646-1
Copyright: Public domain font. Share and enjoy.
Capital A Height: 6, '1' Height: 6
Calculated Max Values w= 6 h= 9 x= 2 y= 7 dx= 6 dy= 0 ascent= 7 len= 9
Font Bounding box w= 6 h= 9 x= 0 y=-2
Calculated Min Values x= 0 y=-2 dx= 0 dy= 0
Pure Font ascent = 6 descent=-2
X Font ascent = 6 descent=-2
Max Font ascent = 7 descent=-2
*/
#include <utility/u8g.h>
const u8g_fntpgm_uint8_t u8g_font_6x9[2300] U8G_SECTION(".progmem.u8g_font_6x9") = {
0,6,9,0,254,6,1,137,2,254,32,255,254,7,254,6,
254,0,0,0,6,0,7,1,6,6,6,2,0,128,128,128,
128,0,128,3,3,3,6,1,3,160,160,160,5,7,7,6,
0,255,80,80,248,80,248,80,80,5,9,9,6,0,254,32,
112,168,160,112,40,168,112,32,6,8,8,6,0,255,64,168,
72,16,32,72,84,8,5,7,7,6,0,255,96,144,144,96,
152,144,104,1,3,3,6,2,3,128,128,128,2,7,7,6,
2,255,64,128,128,128,128,128,64,2,7,7,6,2,255,128,
64,64,64,64,64,128,5,5,5,6,0,0,136,80,248,80,
136,5,5,5,6,0,0,32,32,248,32,32,2,4,4,6,
2,254,192,64,64,128,5,1,1,6,0,2,248,2,2,2,
6,2,0,192,192,4,6,6,6,1,0,16,16,32,64,128,
128,4,6,6,6,1,0,96,144,144,144,144,96,3,6,6,
6,1,0,64,192,64,64,64,224,4,6,6,6,1,0,96,
144,16,32,64,240,4,6,6,6,1,0,240,32,96,16,16,
224,5,6,6,6,0,0,16,48,80,144,248,16,4,6,6,
6,1,0,240,128,224,16,16,224,4,6,6,6,1,0,96,
128,224,144,144,96,4,6,6,6,1,0,240,16,16,32,64,
64,4,6,6,6,1,0,96,144,96,144,144,96,4,6,6,
6,1,0,96,144,144,112,16,96,2,5,5,6,2,0,192,
192,0,192,192,2,7,7,6,2,254,192,192,0,192,64,64,
128,5,5,5,6,0,0,24,96,128,96,24,5,3,3,6,
0,1,248,0,248,5,5,5,6,0,0,192,48,8,48,192,
4,7,7,6,1,0,96,144,16,96,64,0,64,5,6,6,
6,0,0,112,144,168,176,128,112,5,6,6,6,0,0,32,
80,136,248,136,136,5,6,6,6,0,0,240,136,240,136,136,
240,4,6,6,6,1,0,96,144,128,128,144,96,4,6,6,
6,1,0,224,144,144,144,144,224,4,6,6,6,1,0,240,
128,224,128,128,240,4,6,6,6,1,0,240,128,224,128,128,
128,4,6,6,6,1,0,96,144,128,176,144,96,4,6,6,
6,1,0,144,144,240,144,144,144,3,6,6,6,1,0,224,
64,64,64,64,224,5,6,6,6,0,0,56,16,16,16,144,
96,4,6,6,6,1,0,144,160,192,160,144,144,4,6,6,
6,1,0,128,128,128,128,128,240,5,6,6,6,0,0,136,
216,168,168,136,136,4,6,6,6,1,0,144,208,176,144,144,
144,5,6,6,6,0,0,112,136,136,136,136,112,4,6,6,
6,1,0,224,144,144,224,128,128,4,7,7,6,1,255,96,
144,144,208,176,96,16,4,6,6,6,1,0,224,144,144,224,
144,144,4,6,6,6,1,0,96,144,64,32,144,96,5,6,
6,6,0,0,248,32,32,32,32,32,4,6,6,6,1,0,
144,144,144,144,144,96,4,6,6,6,1,0,144,144,144,240,
96,96,5,6,6,6,0,0,136,136,168,168,216,136,5,6,
6,6,0,0,136,80,32,32,80,136,5,6,6,6,0,0,
136,136,80,32,32,32,4,6,6,6,1,0,240,16,32,64,
128,240,3,6,6,6,1,0,224,128,128,128,128,224,4,6,
6,6,1,0,128,128,64,32,16,16,3,6,6,6,1,0,
224,32,32,32,32,224,5,3,3,6,0,3,32,80,136,5,
1,1,6,0,254,248,2,2,2,6,2,4,128,64,4,4,
4,6,1,0,112,144,144,112,4,6,6,6,1,0,128,128,
224,144,144,224,4,4,4,6,1,0,112,128,128,112,4,6,
6,6,1,0,16,16,112,144,144,112,4,4,4,6,1,0,
96,176,192,112,4,6,6,6,1,0,32,80,64,224,64,64,
4,6,6,6,1,254,96,144,144,112,16,96,4,6,6,6,
1,0,128,128,224,144,144,144,3,6,6,6,1,0,64,0,
192,64,64,224,3,8,8,6,1,254,32,0,96,32,32,32,
160,64,4,6,6,6,1,0,128,128,160,192,160,144,3,6,
6,6,1,0,192,64,64,64,64,224,5,4,4,6,0,0,
208,168,168,136,4,4,4,6,1,0,224,144,144,144,4,4,
4,6,1,0,96,144,144,96,4,6,6,6,1,254,224,144,
144,224,128,128,4,6,6,6,1,254,112,144,144,112,16,16,
4,4,4,6,1,0,160,208,128,128,4,4,4,6,1,0,
112,192,48,224,4,6,6,6,1,0,64,64,224,64,80,32,
4,4,4,6,1,0,144,144,144,112,4,4,4,6,1,0,
144,144,96,96,5,4,4,6,0,0,136,168,168,80,4,4,
4,6,1,0,144,96,96,144,4,6,6,6,1,254,144,144,
144,112,144,96,4,4,4,6,1,0,240,32,64,240,3,7,
7,6,1,0,32,64,64,128,64,64,32,1,7,7,6,2,
255,128,128,128,128,128,128,128,3,7,7,6,1,0,128,64,
64,32,64,64,128,4,2,2,6,1,3,80,160,255,255,255,
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,
0,6,0,7,1,6,6,6,2,0,128,0,128,128,128,128,
4,6,6,6,1,255,32,112,160,160,112,32,5,7,7,6,
0,255,48,72,64,240,64,64,248,5,5,5,6,0,0,168,
80,136,80,168,5,6,6,6,0,0,136,80,248,32,248,32,
1,7,7,6,2,255,128,128,128,0,128,128,128,4,7,7,
6,1,255,112,128,96,144,96,16,224,3,1,1,6,1,5,
160,6,7,7,6,0,0,120,132,148,164,148,132,120,3,5,
5,6,1,1,96,160,96,0,224,5,5,5,6,0,0,40,
80,160,80,40,4,3,3,6,1,0,240,16,16,4,1,1,
6,1,2,240,6,7,7,6,0,0,120,132,180,164,164,132,
120,4,1,1,6,1,5,240,4,3,3,6,1,2,96,144,
96,5,7,7,6,0,255,32,32,248,32,32,0,248,3,5,
5,6,1,1,64,160,32,64,224,3,5,5,6,1,1,192,
32,64,32,192,2,2,2,6,2,4,64,128,4,5,5,6,
1,255,144,144,176,208,128,5,6,6,6,0,0,120,232,232,
104,40,40,1,1,1,6,2,2,128,2,2,2,6,2,254,
64,128,3,5,5,6,1,1,64,192,64,64,224,3,5,5,
6,1,1,64,160,64,0,224,5,5,5,6,0,0,160,80,
40,80,160,5,8,8,6,0,255,64,192,64,80,112,48,120,
16,5,8,8,6,0,255,64,192,64,80,104,8,16,56,5,
8,8,6,0,255,192,32,64,48,240,48,120,16,4,7,7,
6,1,0,32,0,32,96,128,144,96,5,7,7,6,0,0,
64,32,32,80,112,136,136,5,7,7,6,0,0,16,32,32,
80,112,136,136,5,7,7,6,0,0,32,80,32,80,112,136,
136,5,7,7,6,0,0,40,80,32,80,112,136,136,5,7,
7,6,0,0,80,0,32,80,112,136,136,5,7,7,6,0,
0,32,80,32,80,112,136,136,5,6,6,6,0,0,120,160,
240,160,160,184,4,8,8,6,1,254,96,144,128,128,144,96,
32,64,4,7,7,6,1,0,64,32,240,128,224,128,240,4,
7,7,6,1,0,32,64,240,128,224,128,240,4,7,7,6,
1,0,32,80,240,128,224,128,240,4,7,7,6,1,0,80,
0,240,128,224,128,240,3,7,7,6,1,0,128,64,224,64,
64,64,224,3,7,7,6,1,0,32,64,224,64,64,64,224,
3,7,7,6,1,0,64,160,224,64,64,64,224,3,7,7,
6,1,0,160,0,224,64,64,64,224,5,6,6,6,0,0,
112,72,232,72,72,112,4,7,7,6,1,0,80,160,144,208,
176,144,144,4,7,7,6,1,0,64,32,96,144,144,144,96,
4,7,7,6,1,0,32,64,96,144,144,144,96,4,7,7,
6,1,0,32,80,96,144,144,144,96,4,7,7,6,1,0,
80,160,96,144,144,144,96,4,7,7,6,1,0,80,0,96,
144,144,144,96,5,5,5,6,0,0,136,80,32,80,136,4,
8,8,6,1,255,16,112,176,176,208,208,224,128,4,7,7,
6,1,0,64,32,144,144,144,144,96,4,7,7,6,1,0,
32,64,144,144,144,144,96,4,7,7,6,1,0,32,80,144,
144,144,144,96,4,7,7,6,1,0,80,0,144,144,144,144,
96,5,7,7,6,0,0,16,32,136,80,32,32,32,4,6,
6,6,1,0,128,224,144,144,224,128,4,6,6,6,1,0,
96,144,160,160,144,160,4,7,7,6,1,0,64,32,0,112,
144,144,112,4,7,7,6,1,0,32,64,0,112,144,144,112,
4,7,7,6,1,0,32,80,0,112,144,144,112,4,7,7,
6,1,0,80,160,0,112,144,144,112,4,6,6,6,1,0,
80,0,112,144,144,112,4,7,7,6,1,0,32,80,32,112,
144,144,112,5,4,4,6,0,0,112,168,176,120,4,6,6,
6,1,254,112,128,128,112,32,64,4,7,7,6,1,0,64,
32,0,96,176,192,112,4,7,7,6,1,0,32,64,0,96,
176,192,112,4,7,7,6,1,0,32,80,0,96,176,192,112,
4,6,6,6,1,0,80,0,96,176,192,112,3,7,7,6,
1,0,128,64,0,192,64,64,224,3,7,7,6,1,0,32,
64,0,192,64,64,224,3,7,7,6,1,0,64,160,0,192,
64,64,224,3,6,6,6,1,0,160,0,192,64,64,224,4,
7,7,6,1,0,48,96,16,112,144,144,96,4,7,7,6,
1,0,80,160,0,224,144,144,144,4,7,7,6,1,0,64,
32,0,96,144,144,96,4,7,7,6,1,0,32,64,0,96,
144,144,96,4,7,7,6,1,0,32,80,0,96,144,144,96,
4,7,7,6,1,0,80,160,0,96,144,144,96,4,6,6,
6,1,0,80,0,96,144,144,96,5,5,5,6,0,0,32,
0,248,0,32,4,4,4,6,1,0,112,176,208,224,4,7,
7,6,1,0,64,32,0,144,144,144,112,4,7,7,6,1,
0,32,64,0,144,144,144,112,4,7,7,6,1,0,32,80,
0,144,144,144,112,4,6,6,6,1,0,80,0,144,144,144,
112,4,9,9,6,1,254,32,64,0,144,144,144,112,144,96,
4,8,8,6,1,254,128,128,224,144,144,224,128,128,4,8,
8,6,1,254,80,0,144,144,144,112,144,96};

@ -0,0 +1,171 @@
/*
Fontname: HD44780_C v1.2
Copyright: A. Hardtung, public domain
Capital A Height: 7, '1' Height: 7
Calculated Max Values w= 5 h= 8 x= 2 y= 7 dx= 6 dy= 0 ascent= 8 len= 8
Font Bounding box w= 6 h= 9 x= 0 y=-2
Calculated Min Values x= 0 y=-1 dx= 0 dy= 0
Pure Font ascent = 7 descent=-1
X Font ascent = 7 descent=-1
Max Font ascent = 8 descent=-1
*/
#include <utility/u8g.h>
const u8g_fntpgm_uint8_t HD44780_C_5x7[2522] U8G_SECTION(".progmem.HD44780_C_5x7") = {
0,6,9,0,254,7,1,145,3,34,32,255,255,8,255,7,
255,0,0,0,6,0,0,1,7,7,6,2,0,128,128,128,
128,128,0,128,3,2,2,6,1,5,160,160,5,7,7,6,
0,0,80,80,248,80,248,80,80,5,7,7,6,0,0,32,
120,160,112,40,240,32,5,7,7,6,0,0,192,200,16,32,
64,152,24,5,7,7,6,0,0,96,144,160,64,168,144,104,
2,3,3,6,1,4,192,64,128,3,7,7,6,1,0,32,
64,128,128,128,64,32,3,7,7,6,1,0,128,64,32,32,
32,64,128,5,5,5,6,0,1,32,168,112,168,32,5,5,
5,6,0,1,32,32,248,32,32,2,3,3,6,2,255,192,
64,128,5,1,1,6,0,3,248,2,2,2,6,2,0,192,
192,5,5,5,6,0,1,8,16,32,64,128,5,7,7,6,
0,0,112,136,152,168,200,136,112,3,7,7,6,1,0,64,
192,64,64,64,64,224,5,7,7,6,0,0,112,136,8,112,
128,128,248,5,7,7,6,0,0,248,16,32,16,8,8,240,
5,7,7,6,0,0,16,48,80,144,248,16,16,5,7,7,
6,0,0,248,128,240,8,8,136,112,5,7,7,6,0,0,
48,64,128,240,136,136,112,5,7,7,6,0,0,248,8,16,
32,32,32,32,5,7,7,6,0,0,112,136,136,112,136,136,
112,5,7,7,6,0,0,112,136,136,120,8,16,96,2,5,
5,6,2,0,192,192,0,192,192,2,6,6,6,2,255,192,
192,0,192,64,128,4,7,7,6,0,0,16,32,64,128,64,
32,16,5,3,3,6,0,2,248,0,248,4,7,7,6,1,
0,128,64,32,16,32,64,128,5,7,7,6,0,0,112,136,
8,16,32,0,32,5,6,6,6,0,0,112,136,8,104,168,
112,5,7,7,6,0,0,112,136,136,248,136,136,136,5,7,
7,6,0,0,240,136,136,240,136,136,240,5,7,7,6,0,
0,112,136,128,128,128,136,112,5,7,7,6,0,0,224,144,
136,136,136,144,224,5,7,7,6,0,0,248,128,128,240,128,
128,248,5,7,7,6,0,0,248,128,128,240,128,128,128,5,
7,7,6,0,0,112,136,128,184,136,136,112,5,7,7,6,
0,0,136,136,136,248,136,136,136,1,7,7,6,2,0,128,
128,128,128,128,128,128,5,7,7,6,0,0,56,16,16,16,
16,144,96,5,7,7,6,0,0,136,144,160,192,160,144,136,
5,7,7,6,0,0,128,128,128,128,128,128,248,5,7,7,
6,0,0,136,216,168,136,136,136,136,5,7,7,6,0,0,
136,136,200,168,152,136,136,5,7,7,6,0,0,112,136,136,
136,136,136,112,5,7,7,6,0,0,240,136,136,240,128,128,
128,5,7,7,6,0,0,112,136,136,136,168,144,104,5,7,
7,6,0,0,240,136,136,240,160,144,136,5,7,7,6,0,
0,120,128,128,112,8,8,240,5,7,7,6,0,0,248,32,
32,32,32,32,32,5,7,7,6,0,0,136,136,136,136,136,
136,112,5,7,7,6,0,0,136,136,136,136,136,80,32,5,
7,7,6,0,0,136,136,136,136,136,168,80,5,7,7,6,
0,0,136,136,80,32,80,136,136,5,7,7,6,0,0,136,
136,136,80,32,32,32,5,7,7,6,0,0,248,8,16,32,
64,128,248,3,7,7,6,1,0,224,128,128,128,128,128,224,
5,7,7,6,0,0,32,112,160,160,168,112,32,3,7,7,
6,1,0,224,32,32,32,32,32,224,5,3,3,6,0,4,
32,80,136,5,1,1,6,0,0,248,2,2,2,6,2,5,
128,64,5,5,5,6,0,0,112,8,120,136,120,5,7,7,
6,0,0,128,128,176,200,136,136,240,5,5,5,6,0,0,
112,128,128,136,112,5,7,7,6,0,0,8,8,104,152,136,
136,120,5,5,5,6,0,0,112,136,248,128,112,5,7,7,
6,0,0,48,72,224,64,64,64,64,5,6,6,6,0,255,
112,136,136,120,8,112,5,7,7,6,0,0,128,128,176,200,
136,136,136,1,7,7,6,2,0,128,0,128,128,128,128,128,
3,8,8,6,1,255,32,0,32,32,32,32,160,64,4,7,
7,6,0,0,128,128,144,160,192,160,144,3,7,7,6,1,
0,192,64,64,64,64,64,224,5,5,5,6,0,0,208,168,
168,168,168,5,5,5,6,0,0,176,200,136,136,136,5,5,
5,6,0,0,112,136,136,136,112,5,6,6,6,0,255,240,
136,136,240,128,128,5,6,6,6,0,255,120,136,136,120,8,
8,5,5,5,6,0,0,176,200,128,128,128,5,5,5,6,
0,0,112,128,112,8,240,5,7,7,6,0,0,64,64,224,
64,64,72,48,5,5,5,6,0,0,136,136,136,152,104,5,
5,5,6,0,0,136,136,136,80,32,5,5,5,6,0,0,
136,136,168,168,80,5,5,5,6,0,0,136,80,32,80,136,
5,6,6,6,0,255,136,136,136,120,8,112,5,5,5,6,
0,0,248,16,32,64,248,5,5,5,6,0,2,184,168,168,
168,184,5,5,5,6,0,2,184,136,184,160,184,5,5,5,
6,0,2,184,160,184,136,184,5,6,6,6,0,1,8,40,
72,248,64,32,5,5,5,6,0,0,56,112,224,136,240,0,
0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,5,
7,7,6,0,0,248,136,128,240,136,136,240,5,7,7,6,
0,0,248,136,128,128,128,128,128,5,7,7,6,0,0,80,
0,248,128,240,128,248,5,7,7,6,0,0,168,168,168,112,
168,168,168,5,7,7,6,0,0,240,8,8,112,8,8,240,
5,7,7,6,0,0,136,136,152,168,200,136,136,5,8,8,
6,0,0,80,32,136,152,168,168,200,136,5,7,7,6,0,
0,120,40,40,40,40,168,72,5,7,7,6,0,0,248,136,
136,136,136,136,136,5,7,7,6,0,0,136,136,136,80,32,
64,128,5,7,7,6,0,0,32,112,168,168,168,112,32,5,
7,7,6,0,0,136,136,136,120,8,8,8,5,7,7,6,
0,0,168,168,168,168,168,168,248,5,7,7,6,0,0,192,
64,64,112,72,72,112,5,7,7,6,0,0,136,136,136,200,
168,168,200,5,7,7,6,0,0,112,136,8,56,8,136,112,
5,7,7,6,0,0,144,168,168,232,168,168,144,5,7,7,
6,0,0,120,136,136,120,40,72,136,5,7,7,6,0,0,
24,96,128,240,136,136,112,4,5,5,6,0,0,224,144,224,
144,224,5,5,5,6,0,0,248,136,128,128,128,5,7,7,
6,0,0,80,0,112,136,248,128,112,5,5,5,6,0,0,
168,168,112,168,168,5,5,5,6,0,0,240,8,48,8,240,
5,5,5,6,0,0,136,152,168,200,136,5,7,7,6,0,
0,80,32,136,152,168,200,136,4,5,5,6,0,0,144,160,
192,160,144,5,5,5,6,0,0,248,40,40,168,72,5,5,
5,6,0,0,136,216,168,136,136,5,5,5,6,0,0,136,
136,248,136,136,5,5,5,6,0,0,248,136,136,136,136,5,
5,5,6,0,0,248,32,32,32,32,5,5,5,6,0,0,
136,136,120,8,8,5,5,5,6,0,0,168,168,168,168,248,
5,5,5,6,0,0,192,64,112,72,112,5,5,5,6,0,
0,136,136,200,168,200,4,5,5,6,0,0,128,128,224,144,
224,5,5,5,6,0,0,112,136,56,136,112,5,5,5,6,
0,0,144,168,232,168,144,5,5,5,6,0,0,120,136,120,
40,72,5,5,5,6,0,1,32,72,144,72,32,5,5,5,
6,0,1,32,144,72,144,32,5,3,3,6,0,0,72,144,
216,5,3,3,6,0,4,216,72,144,5,7,7,6,0,0,
144,208,176,144,56,40,56,5,7,7,6,0,0,32,0,32,
64,128,136,112,5,7,7,6,0,0,24,32,32,112,32,32,
192,5,7,7,6,0,0,32,80,64,240,64,64,120,1,2,
2,6,2,0,128,128,1,4,4,6,2,0,128,128,128,128,
3,5,5,6,1,0,160,160,160,0,224,3,5,5,6,1,
0,160,160,160,0,160,5,7,7,6,0,0,160,0,232,16,
32,64,128,5,5,5,6,0,1,216,112,32,112,216,5,7,
7,6,0,0,160,64,168,16,32,64,128,3,6,6,6,1,
1,224,64,64,64,64,224,5,6,6,6,0,1,248,80,80,
80,80,248,5,7,7,6,0,0,32,112,168,32,32,32,32,
5,7,7,6,0,0,32,32,32,32,168,112,32,5,7,7,
6,0,0,128,144,176,248,176,144,128,5,7,7,6,0,0,
8,72,104,248,104,72,8,5,7,7,6,0,0,128,136,168,
248,168,136,128,5,7,7,6,0,0,128,224,136,16,32,64,
128,2,2,2,6,2,2,192,192,5,8,8,6,0,255,120,
40,40,40,72,136,248,136,5,8,8,6,0,255,136,136,136,
136,136,136,248,8,5,8,8,6,0,255,168,168,168,168,168,
168,248,8,5,6,6,6,0,255,120,40,72,136,248,136,5,
7,7,6,0,255,32,32,112,168,168,112,32,5,6,6,6,
0,255,136,136,136,136,248,8,5,6,6,6,0,255,168,168,
168,168,248,8,2,2,2,6,2,6,64,128,3,1,1,6,
1,7,160,5,2,2,6,0,6,72,176,5,8,8,6,0,
0,16,32,0,112,136,248,128,112,5,6,6,6,0,255,112,
128,136,112,32,96,3,7,7,6,1,0,160,0,160,160,160,
32,192,5,6,6,6,0,1,32,112,112,112,248,32,5,5,
5,6,0,1,80,0,136,0,80,5,5,5,6,0,1,112,
136,136,136,112,5,7,7,6,0,0,136,144,168,88,184,8,
8,5,7,7,6,0,0,136,144,184,72,184,8,56,5,7,
7,6,0,0,136,144,184,72,152,32,56,5,8,8,6,0,
0,192,64,192,72,216,56,8,8,5,7,7,6,0,0,136,
248,136,248,136,248,136,4,5,5,6,0,2,192,0,48,0,
96,5,8,8,6,0,0,64,160,224,168,8,40,120,32,5,
8,8,6,0,0,64,112,64,120,64,112,64,224,5,8,8,
6,0,0,32,112,32,248,32,112,32,112,5,7,7,6,0,
0,104,0,232,0,104,16,56,5,8,8,6,0,0,16,112,
16,240,16,112,16,56,5,7,7,6,0,1,32,112,32,248,
32,112,32,5,8,8,6,0,0,16,144,80,48,80,144,16,
56,5,8,8,6,0,0,48,72,32,80,80,32,144,96,5,
7,7,6,0,0,120,168,168,120,40,40,40,5,8,8,6,
0,0,248,248,248,248,248,248,248,248};

@ -0,0 +1,169 @@
/*
Fontname: HD44780_J
Copyright: A. Hardtung, public domain
Capital A Height: 7, '1' Height: 7
Calculated Max Values w= 6 h=10 x= 2 y= 8 dx= 6 dy= 0 ascent= 8 len= 8
Font Bounding box w= 6 h= 9 x= 0 y=-2
Calculated Min Values x= 0 y=-2 dx= 0 dy= 0
Pure Font ascent = 7 descent=-1
X Font ascent = 7 descent=-1
Max Font ascent = 8 descent=-2
*/
#include <utility/u8g.h>
const u8g_fntpgm_uint8_t HD44780_J_5x7[2491] U8G_SECTION(".progmem.HD44780_J_5x7") = {
0,6,9,0,254,7,1,145,3,34,32,255,255,8,254,7,
255,0,0,0,6,0,8,1,7,7,6,2,0,128,128,128,
128,128,0,128,3,2,2,6,1,5,160,160,5,7,7,6,
0,0,80,80,248,80,248,80,80,5,7,7,6,0,0,32,
120,160,112,40,240,32,5,7,7,6,0,0,192,200,16,32,
64,152,24,5,7,7,6,0,0,96,144,160,64,168,144,104,
2,3,3,6,1,4,192,64,128,3,7,7,6,1,0,32,
64,128,128,128,64,32,3,7,7,6,1,0,128,64,32,32,
32,64,128,5,5,5,6,0,1,32,168,112,168,32,5,5,
5,6,0,1,32,32,248,32,32,2,3,3,6,2,255,192,
64,128,5,1,1,6,0,3,248,2,2,2,6,2,0,192,
192,5,5,5,6,0,1,8,16,32,64,128,5,7,7,6,
0,0,112,136,152,168,200,136,112,3,7,7,6,1,0,64,
192,64,64,64,64,224,5,7,7,6,0,0,112,136,8,112,
128,128,248,5,7,7,6,0,0,248,16,32,16,8,8,240,
5,7,7,6,0,0,16,48,80,144,248,16,16,5,7,7,
6,0,0,248,128,240,8,8,136,112,5,7,7,6,0,0,
48,64,128,240,136,136,112,5,7,7,6,0,0,248,8,16,
32,32,32,32,5,7,7,6,0,0,112,136,136,112,136,136,
112,5,7,7,6,0,0,112,136,136,120,8,16,96,2,5,
5,6,2,0,192,192,0,192,192,2,6,6,6,2,255,192,
192,0,192,64,128,4,7,7,6,0,0,16,32,64,128,64,
32,16,5,3,3,6,0,2,248,0,248,4,7,7,6,1,
0,128,64,32,16,32,64,128,5,7,7,6,0,0,112,136,
8,16,32,0,32,5,6,6,6,0,0,112,136,8,104,168,
112,5,7,7,6,0,0,112,136,136,248,136,136,136,5,7,
7,6,0,0,240,136,136,240,136,136,240,5,7,7,6,0,
0,112,136,128,128,128,136,112,5,7,7,6,0,0,224,144,
136,136,136,144,224,5,7,7,6,0,0,248,128,128,240,128,
128,248,5,7,7,6,0,0,248,128,128,240,128,128,128,5,
7,7,6,0,0,112,136,128,184,136,136,112,5,7,7,6,
0,0,136,136,136,248,136,136,136,1,7,7,6,2,0,128,
128,128,128,128,128,128,5,7,7,6,0,0,56,16,16,16,
16,144,96,5,7,7,6,0,0,136,144,160,192,160,144,136,
5,7,7,6,0,0,128,128,128,128,128,128,248,5,7,7,
6,0,0,136,216,168,136,136,136,136,5,7,7,6,0,0,
136,136,200,168,152,136,136,5,7,7,6,0,0,112,136,136,
136,136,136,112,5,7,7,6,0,0,240,136,136,240,128,128,
128,5,7,7,6,0,0,112,136,136,136,168,144,104,5,7,
7,6,0,0,240,136,136,240,160,144,136,5,7,7,6,0,
0,120,128,128,112,8,8,240,5,7,7,6,0,0,248,32,
32,32,32,32,32,5,7,7,6,0,0,136,136,136,136,136,
136,112,5,7,7,6,0,0,136,136,136,136,136,80,32,5,
7,7,6,0,0,136,136,136,136,136,168,80,5,7,7,6,
0,0,136,136,80,32,80,136,136,5,7,7,6,0,0,136,
136,136,80,32,32,32,5,7,7,6,0,0,248,8,16,32,
64,128,248,3,7,7,6,1,0,224,128,128,128,128,128,224,
5,7,7,6,0,0,136,80,248,32,248,32,32,3,7,7,
6,1,0,224,32,32,32,32,32,224,5,3,3,6,0,4,
32,80,136,5,1,1,6,0,0,248,2,2,2,6,2,5,
128,64,5,5,5,6,0,0,112,8,120,136,120,5,7,7,
6,0,0,128,128,176,200,136,136,240,5,5,5,6,0,0,
112,128,128,136,112,5,7,7,6,0,0,8,8,104,152,136,
136,120,5,5,5,6,0,0,112,136,248,128,112,5,7,7,
6,0,0,48,72,224,64,64,64,64,5,6,6,6,0,255,
112,136,136,120,8,112,5,7,7,6,0,0,128,128,176,200,
136,136,136,1,7,7,6,2,0,128,0,128,128,128,128,128,
3,8,8,6,1,255,32,0,32,32,32,32,160,64,4,7,
7,6,0,0,128,128,144,160,192,160,144,3,7,7,6,1,
0,192,64,64,64,64,64,224,5,5,5,6,0,0,208,168,
168,168,168,5,5,5,6,0,0,176,200,136,136,136,5,5,
5,6,0,0,112,136,136,136,112,5,6,6,6,0,255,240,
136,136,240,128,128,5,6,6,6,0,255,120,136,136,120,8,
8,5,5,5,6,0,0,176,200,128,128,128,5,5,5,6,
0,0,112,128,112,8,240,5,7,7,6,0,0,64,64,224,
64,64,72,48,5,5,5,6,0,0,136,136,136,152,104,5,
5,5,6,0,0,136,136,136,80,32,5,5,5,6,0,0,
136,136,168,168,80,5,5,5,6,0,0,136,80,32,80,136,
5,6,6,6,0,255,136,136,136,120,8,112,5,5,5,6,
0,0,248,16,32,64,248,3,7,7,6,1,0,32,64,64,
128,64,64,32,1,7,7,6,2,0,128,128,128,128,128,128,
128,3,7,7,6,1,0,128,64,64,32,64,64,128,5,5,
5,6,0,1,32,16,248,16,32,5,5,5,6,0,1,32,
64,248,64,32,0,0,0,6,0,8,0,0,0,6,0,8,
0,0,0,6,0,8,0,0,0,6,0,8,0,0,0,6,
0,8,0,0,0,6,0,8,0,0,0,6,0,8,0,0,
0,6,0,8,0,0,0,6,0,8,0,0,0,6,0,8,
0,0,0,6,0,8,0,0,0,6,0,8,0,0,0,6,
0,8,0,0,0,6,0,8,0,0,0,6,0,8,0,0,
0,6,0,8,0,0,0,6,0,8,0,0,0,6,0,8,
0,0,0,6,0,8,0,0,0,6,0,8,0,0,0,6,
0,8,0,0,0,6,0,8,0,0,0,6,0,8,0,0,
0,6,0,8,0,0,0,6,0,8,0,0,0,6,0,8,
0,0,0,6,0,8,0,0,0,6,0,8,0,0,0,6,
0,8,0,0,0,6,0,8,0,0,0,6,0,8,0,0,
0,6,0,8,0,0,0,6,0,8,3,3,3,6,0,0,
224,160,224,3,4,4,6,2,3,224,128,128,128,3,4,4,
6,0,0,32,32,32,224,3,3,3,6,0,0,128,64,32,
2,2,2,6,1,2,192,192,5,6,6,6,0,0,248,8,
248,8,16,32,5,5,5,6,0,0,248,8,48,32,64,4,
5,5,6,0,0,16,32,96,160,32,5,5,5,6,0,0,
32,248,136,8,48,5,4,4,6,0,0,248,32,32,248,5,
5,5,6,0,0,16,248,48,80,144,5,5,5,6,0,0,
64,248,72,80,64,5,4,4,6,0,0,112,16,16,248,4,
5,5,6,0,0,240,16,240,16,240,5,4,4,6,0,0,
168,168,8,48,5,1,1,6,0,4,248,5,7,7,6,0,
0,248,8,40,48,32,32,64,5,7,7,6,0,0,8,16,
32,96,160,32,32,5,7,7,6,0,0,32,248,136,136,8,
16,32,5,6,6,6,0,0,248,32,32,32,32,248,5,7,
7,6,0,0,16,248,16,48,80,144,16,5,7,7,6,0,
0,64,248,72,72,72,72,144,5,7,7,6,0,0,32,248,
32,248,32,32,32,5,6,6,6,0,0,120,72,136,8,16,
96,5,7,7,6,0,0,64,120,144,16,16,16,32,5,6,
6,6,0,0,248,8,8,8,8,248,5,7,7,6,0,0,
80,248,80,80,16,32,64,5,6,6,6,0,0,192,8,200,
8,16,224,5,6,6,6,0,0,248,8,16,32,80,136,5,
7,7,6,0,0,64,248,72,80,64,64,56,5,6,6,6,
0,0,136,136,72,8,16,96,5,6,6,6,0,0,120,72,
168,24,16,96,5,7,7,6,0,0,16,224,32,248,32,32,
64,5,6,6,6,0,0,168,168,168,8,16,32,5,7,7,
6,0,0,112,0,248,32,32,32,64,3,7,7,6,1,0,
128,128,128,192,160,128,128,5,7,7,6,0,0,32,32,248,
32,32,64,128,5,6,6,6,0,0,112,0,0,0,0,248,
5,6,6,6,0,0,248,8,80,32,80,128,5,6,6,6,
0,1,32,248,16,32,112,168,3,7,7,6,1,0,32,32,
32,32,32,64,128,5,6,6,6,0,0,32,16,136,136,136,
136,5,7,7,6,0,0,128,128,248,128,128,128,120,5,6,
6,6,0,0,248,8,8,8,16,96,5,5,5,6,0,1,
64,160,16,8,8,5,7,7,6,0,0,32,248,32,32,168,
168,32,5,6,6,6,0,0,248,8,8,80,32,16,4,6,
6,6,1,0,224,0,224,0,224,16,5,6,6,6,0,0,
32,64,128,136,248,8,5,6,6,6,0,0,8,8,80,32,
80,128,5,6,6,6,0,0,248,64,248,64,64,56,5,7,
7,6,0,0,64,64,248,72,80,64,64,5,7,7,6,0,
0,112,16,16,16,16,16,248,5,6,6,6,0,0,248,8,
248,8,8,248,5,7,7,6,0,0,112,0,248,8,8,16,
32,4,7,7,6,0,0,144,144,144,144,16,32,64,5,6,
6,6,0,0,32,160,160,168,168,176,5,7,7,6,0,0,
128,128,128,136,144,160,192,5,6,6,6,0,0,248,136,136,
136,136,248,5,6,6,6,0,0,248,136,136,8,16,32,5,
6,6,6,0,0,192,0,8,8,16,224,4,3,3,6,0,
4,32,144,64,3,3,3,6,0,4,224,160,224,5,5,5,
6,0,1,72,168,144,144,104,5,7,7,6,0,0,80,0,
112,8,120,136,120,4,8,8,6,1,255,96,144,144,224,144,
144,224,128,5,5,5,6,0,0,112,128,96,136,112,5,6,
6,6,0,255,136,136,152,232,136,128,5,5,5,6,0,0,
120,160,144,136,112,5,7,7,6,0,254,48,72,136,136,240,
128,128,5,8,8,6,0,254,120,136,136,136,120,8,8,112,
5,5,5,6,0,1,56,32,32,160,64,4,3,3,6,0,
3,16,208,16,4,8,8,6,0,255,16,0,48,16,16,16,
144,96,3,3,3,6,0,4,160,64,160,5,7,7,6,0,
0,32,112,160,160,168,112,32,5,7,7,6,0,0,64,64,
224,64,224,64,120,5,7,7,6,0,0,112,0,176,200,136,
136,136,5,7,7,6,0,0,80,0,112,136,136,136,112,5,
7,7,6,0,255,176,200,136,136,240,128,128,5,7,7,6,
0,255,104,152,136,136,120,8,8,5,6,6,6,0,0,112,
136,248,136,136,112,5,3,3,6,0,2,88,168,208,5,5,
5,6,0,0,112,136,136,80,216,5,7,7,6,0,0,80,
0,136,136,136,152,104,5,7,7,6,0,0,248,128,64,32,
64,128,248,5,5,5,6,0,0,248,80,80,80,152,5,7,
7,6,0,0,248,0,136,80,32,80,136,5,7,7,6,0,
255,136,136,136,136,120,8,112,5,6,6,6,0,1,8,240,
32,248,32,32,5,5,5,6,0,0,248,64,120,72,136,5,
5,5,6,0,0,248,168,248,136,136,5,5,5,6,0,1,
32,0,248,0,32,0,0,0,6,0,8,6,10,10,6,0,
254,252,252,252,252,252,252,252,252,252,252};

@ -0,0 +1,203 @@
/*
Fontname: HD44780_W
Copyright: A.Hardtung, public domain
Capital A Height: 7, '1' Height: 7
Calculated Max Values w= 5 h= 9 x= 2 y= 5 dx= 6 dy= 0 ascent= 8 len= 9
Font Bounding box w= 6 h= 9 x= 0 y=-2
Calculated Min Values x= 0 y=-1 dx= 0 dy= 0
Pure Font ascent = 7 descent=-1
X Font ascent = 7 descent=-1
Max Font ascent = 8 descent=-1
*/
#include <utility/u8g.h>
const u8g_fntpgm_uint8_t HD44780_W_5x7[3034] U8G_SECTION(".progmem.HD44780_W_5x7") = {
0,6,9,0,254,7,2,79,3,222,16,255,255,8,255,7,
255,4,7,7,6,0,0,16,48,112,240,112,48,16,4,7,
7,6,1,0,128,192,224,240,224,192,128,5,3,3,6,0,
4,216,72,144,5,3,3,6,0,4,216,144,72,5,7,7,
6,0,0,32,112,248,0,32,112,248,5,7,7,6,0,0,
248,112,32,0,248,112,32,5,5,5,6,0,1,112,248,248,
248,112,5,7,7,6,0,0,8,8,40,72,248,64,32,5,
7,7,6,0,0,32,112,168,32,32,32,32,5,7,7,6,
0,0,32,32,32,32,168,112,32,5,5,5,6,0,1,32,
64,248,64,32,5,5,5,6,0,1,32,16,248,16,32,5,
7,7,6,0,0,16,32,64,32,16,0,248,5,7,7,6,
0,0,64,32,16,32,64,0,248,5,5,5,6,0,1,32,
32,112,112,248,5,5,5,6,0,0,248,112,112,32,32,0,
0,0,6,0,0,1,7,7,6,2,0,128,128,128,128,128,
0,128,3,2,2,6,1,5,160,160,5,7,7,6,0,0,
80,80,248,80,248,80,80,5,7,7,6,0,0,32,120,160,
112,40,240,32,5,7,7,6,0,0,192,200,16,32,64,152,
24,5,7,7,6,0,0,96,144,160,64,168,144,104,2,3,
3,6,1,4,192,64,128,3,7,7,6,1,0,32,64,128,
128,128,64,32,3,7,7,6,1,0,128,64,32,32,32,64,
128,5,5,5,6,0,1,32,168,112,168,32,5,5,5,6,
0,1,32,32,248,32,32,2,3,3,6,2,255,192,64,128,
5,1,1,6,0,3,248,2,2,2,6,2,0,192,192,5,
5,5,6,0,1,8,16,32,64,128,5,7,7,6,0,0,
112,136,152,168,200,136,112,3,7,7,6,1,0,64,192,64,
64,64,64,224,5,7,7,6,0,0,112,136,8,112,128,128,
248,5,7,7,6,0,0,248,16,32,16,8,8,240,5,7,
7,6,0,0,16,48,80,144,248,16,16,5,7,7,6,0,
0,248,128,240,8,8,136,112,5,7,7,6,0,0,48,64,
128,240,136,136,112,5,7,7,6,0,0,248,8,16,32,32,
32,32,5,7,7,6,0,0,112,136,136,112,136,136,112,5,
7,7,6,0,0,112,136,136,120,8,16,96,2,5,5,6,
2,0,192,192,0,192,192,2,6,6,6,2,255,192,192,0,
192,64,128,4,7,7,6,0,0,16,32,64,128,64,32,16,
5,3,3,6,0,2,248,0,248,4,7,7,6,1,0,128,
64,32,16,32,64,128,5,7,7,6,0,0,112,136,8,16,
32,0,32,5,6,6,6,0,0,112,136,8,104,168,112,5,
7,7,6,0,0,112,136,136,248,136,136,136,5,7,7,6,
0,0,240,136,136,240,136,136,240,5,7,7,6,0,0,112,
136,128,128,128,136,112,5,7,7,6,0,0,224,144,136,136,
136,144,224,5,7,7,6,0,0,248,128,128,240,128,128,248,
5,7,7,6,0,0,248,128,128,240,128,128,128,5,7,7,
6,0,0,112,136,128,184,136,136,112,5,7,7,6,0,0,
136,136,136,248,136,136,136,1,7,7,6,2,0,128,128,128,
128,128,128,128,5,7,7,6,0,0,56,16,16,16,16,144,
96,5,7,7,6,0,0,136,144,160,192,160,144,136,5,7,
7,6,0,0,128,128,128,128,128,128,248,5,7,7,6,0,
0,136,216,168,136,136,136,136,5,7,7,6,0,0,136,136,
200,168,152,136,136,5,7,7,6,0,0,112,136,136,136,136,
136,112,5,7,7,6,0,0,240,136,136,240,128,128,128,5,
7,7,6,0,0,112,136,136,136,168,144,104,5,7,7,6,
0,0,240,136,136,240,160,144,136,5,7,7,6,0,0,120,
128,128,112,8,8,240,5,7,7,6,0,0,248,32,32,32,
32,32,32,5,7,7,6,0,0,136,136,136,136,136,136,112,
5,7,7,6,0,0,136,136,136,136,136,80,32,5,7,7,
6,0,0,136,136,136,136,136,168,80,5,7,7,6,0,0,
136,136,80,32,80,136,136,5,7,7,6,0,0,136,136,136,
80,32,32,32,5,7,7,6,0,0,248,8,16,32,64,128,
248,3,7,7,6,1,0,224,128,128,128,128,128,224,5,5,
5,6,0,1,128,64,32,16,8,3,7,7,6,1,0,224,
32,32,32,32,32,224,5,3,3,6,0,4,32,80,136,5,
1,1,6,0,0,248,2,2,2,6,2,5,128,64,5,5,
5,6,0,0,112,8,120,136,120,5,7,7,6,0,0,128,
128,176,200,136,136,240,5,5,5,6,0,0,112,128,128,136,
112,5,7,7,6,0,0,8,8,104,152,136,136,120,5,5,
5,6,0,0,112,136,248,128,112,5,7,7,6,0,0,48,
72,224,64,64,64,64,5,6,6,6,0,255,112,136,136,120,
8,112,5,7,7,6,0,0,128,128,176,200,136,136,136,1,
7,7,6,2,0,128,0,128,128,128,128,128,3,8,8,6,
1,255,32,0,32,32,32,32,160,64,4,7,7,6,0,0,
128,128,144,160,192,160,144,3,7,7,6,1,0,192,64,64,
64,64,64,224,5,5,5,6,0,0,208,168,168,168,168,5,
5,5,6,0,0,176,200,136,136,136,5,5,5,6,0,0,
112,136,136,136,112,5,6,6,6,0,255,240,136,136,240,128,
128,5,6,6,6,0,255,120,136,136,120,8,8,5,5,5,
6,0,0,176,200,128,128,128,5,5,5,6,0,0,112,128,
112,8,240,5,7,7,6,0,0,64,64,224,64,64,72,48,
5,5,5,6,0,0,136,136,136,152,104,5,5,5,6,0,
0,136,136,136,80,32,5,5,5,6,0,0,136,136,168,168,
80,5,5,5,6,0,0,136,80,32,80,136,5,6,6,6,
0,255,136,136,136,120,8,112,5,5,5,6,0,0,248,16,
32,64,248,3,7,7,6,1,0,32,64,64,128,64,64,32,
1,7,7,6,2,0,128,128,128,128,128,128,128,3,7,7,
6,1,0,128,64,64,32,64,64,128,5,6,6,6,0,1,
8,40,72,248,64,32,5,7,7,6,0,0,32,80,136,136,
136,136,248,5,7,7,6,0,0,248,136,128,240,136,136,240,
5,8,8,6,0,255,120,40,40,40,72,136,248,136,5,7,
7,6,0,0,168,168,168,112,168,168,168,5,7,7,6,0,
0,240,8,8,112,8,8,240,5,7,7,6,0,0,136,136,
152,168,200,136,136,5,8,8,6,0,0,80,32,136,152,168,
168,200,136,5,7,7,6,0,0,120,40,40,40,40,168,72,
5,7,7,6,0,0,248,136,136,136,136,136,136,5,7,7,
6,0,0,136,136,136,80,32,64,128,5,8,8,6,0,255,
136,136,136,136,136,136,248,8,5,7,7,6,0,0,136,136,
136,120,8,8,8,5,7,7,6,0,0,168,168,168,168,168,
168,248,5,8,8,6,0,255,168,168,168,168,168,168,248,8,
5,7,7,6,0,0,192,64,64,112,72,72,112,5,7,7,
6,0,0,136,136,136,200,168,168,200,5,7,7,6,0,0,
112,136,40,80,8,136,112,5,5,5,6,0,0,64,160,144,
144,104,5,7,7,6,0,0,32,48,40,40,32,224,224,5,
7,7,6,0,0,248,136,128,128,128,128,128,5,5,5,6,
0,0,248,80,80,80,152,5,7,7,6,0,0,248,128,64,
32,64,128,248,5,5,5,6,0,0,120,144,144,144,96,5,
7,7,6,0,0,48,40,56,40,200,216,24,5,6,6,6,
0,0,8,112,160,32,32,16,5,6,6,6,0,1,32,112,
112,112,248,32,5,7,7,6,0,0,112,136,136,248,136,136,
112,5,5,5,6,0,0,112,136,136,80,216,5,7,7,6,
0,0,48,72,32,80,136,136,112,5,3,3,6,0,2,88,
168,208,5,6,6,6,0,0,80,248,248,248,112,32,5,5,
5,6,0,0,112,128,96,136,112,5,7,7,6,0,0,112,
136,136,136,136,136,136,5,7,7,6,0,0,216,216,216,216,
216,216,216,1,7,7,6,2,0,128,0,128,128,128,128,128,
5,7,7,6,0,0,32,112,160,160,168,112,32,5,7,7,
6,0,0,48,64,64,224,64,80,168,5,5,5,6,0,0,
136,112,80,112,136,5,7,7,6,0,0,136,80,248,32,248,
32,32,1,7,7,6,2,0,128,128,128,0,128,128,128,5,
8,8,6,0,0,48,72,32,80,80,32,144,96,5,7,7,
6,0,0,24,32,32,112,32,32,192,5,7,7,6,0,0,
248,136,184,184,184,136,248,5,7,7,6,0,0,112,8,120,
136,120,0,248,5,5,5,6,0,1,40,80,160,80,40,5,
7,7,6,0,0,144,168,168,232,168,168,144,5,7,7,6,
0,0,120,136,136,120,40,72,136,5,7,7,6,0,0,248,
136,168,136,152,168,248,2,3,3,6,2,4,64,128,192,4,
5,5,6,0,3,96,144,144,144,96,5,7,7,6,0,0,
32,32,248,32,32,0,248,4,5,5,6,0,3,96,144,32,
64,240,3,5,5,6,0,3,224,32,224,32,224,5,8,8,
6,0,0,224,144,224,128,144,184,144,24,5,8,8,6,0,
255,136,136,136,136,152,232,128,128,5,7,7,6,0,0,120,
152,152,120,24,24,24,2,2,2,6,2,2,192,192,5,5,
5,6,0,0,80,136,168,168,80,3,5,5,6,0,3,64,
192,64,64,224,5,7,7,6,0,0,112,136,136,136,112,0,
248,5,5,5,6,0,1,160,80,40,80,160,5,7,7,6,
0,0,136,144,168,88,184,8,8,5,7,7,6,0,0,136,
144,184,72,152,32,56,5,8,8,6,0,0,192,64,192,72,
216,56,8,8,5,7,7,6,0,0,32,0,32,64,128,136,
112,5,8,8,6,0,0,64,32,32,80,136,248,136,136,5,
8,8,6,0,0,16,32,32,80,136,248,136,136,5,8,8,
6,0,0,32,80,0,112,136,248,136,136,5,8,8,6,0,
0,104,144,0,112,136,248,136,136,5,8,8,6,0,0,80,
0,32,80,136,248,136,136,5,8,8,6,0,0,32,80,32,
112,136,248,136,136,5,7,7,6,0,0,56,96,160,184,224,
160,184,5,8,8,6,0,255,112,136,128,128,136,112,32,96,
5,8,8,6,0,0,64,32,0,248,128,240,128,248,5,8,
8,6,0,0,8,16,0,248,128,240,128,248,5,8,8,6,
0,0,32,80,0,248,128,240,128,248,5,7,7,6,0,0,
80,0,248,128,240,128,248,3,8,8,6,1,0,128,64,0,
224,64,64,64,224,3,8,8,6,1,0,32,64,0,224,64,
64,64,224,3,8,8,6,1,0,64,160,0,224,64,64,64,
224,3,7,7,6,1,0,160,0,224,64,64,64,224,5,7,
7,6,0,0,112,72,72,232,72,72,112,5,8,8,6,0,
0,104,144,0,136,200,168,152,136,5,8,8,6,0,0,64,
32,112,136,136,136,136,112,5,8,8,6,0,0,16,32,112,
136,136,136,136,112,5,8,8,6,0,0,32,80,0,112,136,
136,136,112,5,8,8,6,0,0,104,144,0,112,136,136,136,
112,5,8,8,6,0,0,80,0,112,136,136,136,136,112,5,
5,5,6,0,1,136,80,32,80,136,5,7,7,6,0,0,
112,32,112,168,112,32,112,5,8,8,6,0,0,64,32,136,
136,136,136,136,112,5,8,8,6,0,0,16,32,136,136,136,
136,136,112,5,8,8,6,0,0,32,80,0,136,136,136,136,
112,5,8,8,6,0,0,80,0,136,136,136,136,136,112,5,
8,8,6,0,0,16,32,136,80,32,32,32,32,5,8,8,
6,0,0,192,64,112,72,72,112,64,224,5,7,7,6,0,
0,48,72,72,112,72,72,176,5,8,8,6,0,0,64,32,
0,112,8,120,136,120,5,8,8,6,0,0,16,32,0,112,
8,120,136,120,5,8,8,6,0,0,32,80,0,112,8,120,
136,120,5,8,8,6,0,0,104,144,0,112,8,120,136,120,
5,7,7,6,0,0,80,0,112,8,120,136,120,5,8,8,
6,0,0,32,80,32,112,8,120,136,120,5,6,6,6,0,
0,208,40,120,160,168,80,5,6,6,6,0,255,112,128,136,
112,32,96,5,8,8,6,0,0,64,32,0,112,136,248,128,
112,5,8,8,6,0,0,16,32,0,112,136,248,128,112,5,
8,8,6,0,0,32,80,0,112,136,248,128,112,5,7,7,
6,0,0,80,0,112,136,248,128,112,3,8,8,6,1,0,
128,64,0,64,192,64,64,224,3,8,8,6,1,0,32,64,
0,64,192,64,64,224,3,8,8,6,1,0,64,160,0,64,
192,64,64,224,3,7,7,6,1,0,160,0,64,192,64,64,
224,5,7,7,6,0,0,160,64,160,16,120,136,112,5,8,
8,6,0,0,104,144,0,176,200,136,136,136,5,8,8,6,
0,0,64,32,0,112,136,136,136,112,5,8,8,6,0,0,
16,32,0,112,136,136,136,112,5,8,8,6,0,0,32,80,
0,112,136,136,136,112,5,8,8,6,0,0,104,144,0,112,
136,136,136,112,5,7,7,6,0,0,80,0,112,136,136,136,
112,5,5,5,6,0,1,32,0,248,0,32,5,7,7,6,
0,0,16,32,112,168,112,32,64,5,8,8,6,0,0,64,
32,0,136,136,136,152,104,5,8,8,6,0,0,16,32,0,
136,136,136,152,104,5,8,8,6,0,0,32,80,0,136,136,
136,152,104,5,7,7,6,0,0,80,0,136,136,136,152,104,
5,9,9,6,0,255,16,32,0,136,136,136,248,8,112,4,
7,7,6,1,0,192,64,96,80,96,64,224,5,8,8,6,
0,255,80,0,136,136,136,248,8,112};

@ -1,17 +1,17 @@
/* /*
Fontname: ISO10646-1-Marlin Fontname: ISO10646-1
Copyright: A.Hardtung, public domain Copyright: A.Hardtung, public domain
Capital A Height: 7, '1' Height: 7 Capital A Height: 7, '1' Height: 7
Calculated Max Values w= 5 h=10 x= 2 y= 7 dx= 6 dy= 0 ascent= 8 len= 9 Calculated Max Values w= 5 h= 9 x= 2 y= 7 dx= 6 dy= 0 ascent= 8 len= 9
Font Bounding box w= 6 h= 9 x= 0 y=-2 Font Bounding box w= 6 h= 9 x= 0 y=-2
Calculated Min Values x= 0 y=-2 dx= 0 dy= 0 Calculated Min Values x= 0 y=-1 dx= 0 dy= 0
Pure Font ascent = 7 descent=-1 Pure Font ascent = 7 descent=-1
X Font ascent = 7 descent=-1 X Font ascent = 7 descent=-1
Max Font ascent = 8 descent=-2 Max Font ascent = 8 descent=-1
*/ */
#include <utility/u8g.h> #include <utility/u8g.h>
const u8g_fntpgm_uint8_t ISO10646_1_Marlin_5x7[2596] U8G_SECTION(".progmem.ISO10646_1_Marlin_5x7") = { const u8g_fntpgm_uint8_t ISO10646_1_5x7[2592] U8G_SECTION(".progmem.ISO10646_1_5x7") = {
0,6,9,0,254,7,1,146,3,33,32,255,255,8,254,7, 0,6,9,0,254,7,1,146,3,33,32,255,255,8,255,7,
255,0,0,0,6,0,0,1,7,7,6,2,0,128,128,128, 255,0,0,0,6,0,0,1,7,7,6,2,0,128,128,128,
128,128,0,128,3,2,2,6,1,5,160,160,5,7,7,6, 128,128,0,128,3,2,2,6,1,5,160,160,5,7,7,6,
0,0,80,80,248,80,248,80,80,5,7,7,6,0,0,32, 0,0,80,80,248,80,248,80,80,5,7,7,6,0,0,32,
@ -166,11 +166,11 @@ const u8g_fntpgm_uint8_t ISO10646_1_Marlin_5x7[2596] U8G_SECTION(".progmem.ISO10
8,6,0,0,32,80,0,112,136,136,136,112,5,8,8,6, 8,6,0,0,32,80,0,112,136,136,136,112,5,8,8,6,
0,0,104,144,0,112,136,136,136,112,5,7,7,6,0,0, 0,0,104,144,0,112,136,136,136,112,5,7,7,6,0,0,
80,0,112,136,136,136,112,5,5,5,6,0,1,32,0,248, 80,0,112,136,136,136,112,5,5,5,6,0,1,32,0,248,
0,32,5,8,8,6,0,0,64,240,200,136,136,152,120,16, 0,32,5,7,7,6,0,255,16,112,168,168,168,112,64,5,
5,8,8,6,0,0,192,248,136,136,136,136,136,248,5,5, 8,8,6,0,0,64,32,0,136,136,136,152,104,5,8,8,
5,6,0,1,32,48,248,48,32,5,8,8,6,0,0,32, 6,0,0,16,32,0,136,136,136,152,104,5,8,8,6,0,
112,248,32,32,32,32,224,5,9,9,6,0,255,32,112,168, 0,32,80,0,136,136,136,152,104,5,7,7,6,0,0,80,
168,184,136,136,112,32,5,9,9,6,0,255,224,128,192,176, 0,136,136,136,152,104,5,9,9,6,0,255,16,32,0,136,
168,40,48,40,40,5,9,9,6,0,255,248,168,136,136,136, 136,136,248,8,112,4,7,7,6,1,255,192,64,96,80,96,
136,136,168,248,5,10,10,6,0,254,32,80,80,80,80,136, 64,224,5,8,8,6,0,255,80,0,136,136,136,120,8,112
168,168,136,112}; };

@ -0,0 +1,174 @@
/*
Fontname: ISO10646_5_Cyrillic
Copyright: A. Hardtung, public domain
Capital A Height: 7, '1' Height: 7
Calculated Max Values w= 5 h= 9 x= 2 y= 5 dx= 6 dy= 0 ascent= 8 len= 9
Font Bounding box w= 6 h= 9 x= 0 y=-2
Calculated Min Values x= 0 y=-1 dx= 0 dy= 0
Pure Font ascent = 7 descent=-1
X Font ascent = 7 descent=-1
Max Font ascent = 8 descent=-1
*/
#include <utility/u8g.h>
const u8g_fntpgm_uint8_t ISO10646_5_Cyrillic_5x7[2560] U8G_SECTION(".progmem.ISO10646_5_Cyrillic_5x7") = {
0,6,9,0,254,7,1,145,3,32,32,255,255,8,255,7,
255,0,0,0,6,0,0,1,7,7,6,2,0,128,128,128,
128,128,0,128,3,2,2,6,1,5,160,160,5,7,7,6,
0,0,80,80,248,80,248,80,80,5,7,7,6,0,0,32,
120,160,112,40,240,32,5,7,7,6,0,0,192,200,16,32,
64,152,24,5,7,7,6,0,0,96,144,160,64,168,144,104,
2,3,3,6,1,4,192,64,128,3,7,7,6,1,0,32,
64,128,128,128,64,32,3,7,7,6,1,0,128,64,32,32,
32,64,128,5,5,5,6,0,1,32,168,112,168,32,5,5,
5,6,0,1,32,32,248,32,32,2,3,3,6,2,255,192,
64,128,5,1,1,6,0,3,248,2,2,2,6,2,0,192,
192,5,5,5,6,0,1,8,16,32,64,128,5,7,7,6,
0,0,112,136,152,168,200,136,112,3,7,7,6,1,0,64,
192,64,64,64,64,224,5,7,7,6,0,0,112,136,8,112,
128,128,248,5,7,7,6,0,0,248,16,32,16,8,8,240,
5,7,7,6,0,0,16,48,80,144,248,16,16,5,7,7,
6,0,0,248,128,240,8,8,136,112,5,7,7,6,0,0,
48,64,128,240,136,136,112,5,7,7,6,0,0,248,8,16,
32,32,32,32,5,7,7,6,0,0,112,136,136,112,136,136,
112,5,7,7,6,0,0,112,136,136,120,8,16,96,2,5,
5,6,2,0,192,192,0,192,192,2,6,6,6,2,255,192,
192,0,192,64,128,4,7,7,6,0,0,16,32,64,128,64,
32,16,5,3,3,6,0,2,248,0,248,4,7,7,6,1,
0,128,64,32,16,32,64,128,5,7,7,6,0,0,112,136,
8,16,32,0,32,5,6,6,6,0,0,112,136,8,104,168,
112,5,7,7,6,0,0,112,136,136,248,136,136,136,5,7,
7,6,0,0,240,136,136,240,136,136,240,5,7,7,6,0,
0,112,136,128,128,128,136,112,5,7,7,6,0,0,224,144,
136,136,136,144,224,5,7,7,6,0,0,248,128,128,240,128,
128,248,5,7,7,6,0,0,248,128,128,240,128,128,128,5,
7,7,6,0,0,112,136,128,184,136,136,112,5,7,7,6,
0,0,136,136,136,248,136,136,136,1,7,7,6,2,0,128,
128,128,128,128,128,128,5,7,7,6,0,0,56,16,16,16,
16,144,96,5,7,7,6,0,0,136,144,160,192,160,144,136,
5,7,7,6,0,0,128,128,128,128,128,128,248,5,7,7,
6,0,0,136,216,168,136,136,136,136,5,7,7,6,0,0,
136,136,200,168,152,136,136,5,7,7,6,0,0,112,136,136,
136,136,136,112,5,7,7,6,0,0,240,136,136,240,128,128,
128,5,7,7,6,0,0,112,136,136,136,168,144,104,5,7,
7,6,0,0,240,136,136,240,160,144,136,5,7,7,6,0,
0,120,128,128,112,8,8,240,5,7,7,6,0,0,248,32,
32,32,32,32,32,5,7,7,6,0,0,136,136,136,136,136,
136,112,5,7,7,6,0,0,136,136,136,136,136,80,32,5,
7,7,6,0,0,136,136,136,136,136,168,80,5,7,7,6,
0,0,136,136,80,32,80,136,136,5,7,7,6,0,0,136,
136,136,80,32,32,32,5,7,7,6,0,0,248,8,16,32,
64,128,248,3,7,7,6,1,0,224,128,128,128,128,128,224,
5,5,5,6,0,1,128,64,32,16,8,3,7,7,6,1,
0,224,32,32,32,32,32,224,5,3,3,6,0,4,32,80,
136,5,1,1,6,0,0,248,2,2,2,6,2,5,128,64,
5,5,5,6,0,0,112,8,120,136,120,5,7,7,6,0,
0,128,128,176,200,136,136,240,5,5,5,6,0,0,112,128,
128,136,112,5,7,7,6,0,0,8,8,104,152,136,136,120,
5,5,5,6,0,0,112,136,248,128,112,5,7,7,6,0,
0,48,72,224,64,64,64,64,5,6,6,6,0,255,112,136,
136,120,8,112,5,7,7,6,0,0,128,128,176,200,136,136,
136,1,7,7,6,2,0,128,0,128,128,128,128,128,3,8,
8,6,1,255,32,0,32,32,32,32,160,64,4,7,7,6,
0,0,128,128,144,160,192,160,144,3,7,7,6,1,0,192,
64,64,64,64,64,224,5,5,5,6,0,0,208,168,168,168,
168,5,5,5,6,0,0,176,200,136,136,136,5,5,5,6,
0,0,112,136,136,136,112,5,6,6,6,0,255,240,136,136,
240,128,128,5,6,6,6,0,255,120,136,136,120,8,8,5,
5,5,6,0,0,176,200,128,128,128,5,5,5,6,0,0,
112,128,112,8,240,5,7,7,6,0,0,64,64,224,64,64,
72,48,5,5,5,6,0,0,136,136,136,152,104,5,5,5,
6,0,0,136,136,136,80,32,5,5,5,6,0,0,136,136,
168,168,80,5,5,5,6,0,0,136,80,32,80,136,5,6,
6,6,0,255,136,136,136,120,8,112,5,5,5,6,0,0,
248,16,32,64,248,3,7,7,6,1,0,32,64,64,128,64,
64,32,1,7,7,6,2,0,128,128,128,128,128,128,128,3,
7,7,6,1,0,128,64,64,32,64,64,128,5,2,2,6,
0,3,104,144,0,0,0,6,0,0,0,0,0,6,0,0,
0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,
0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,
0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,
0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,
0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,
0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,
0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,
0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,
0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,
0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,
0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,
0,6,0,0,0,0,0,6,0,0,5,8,8,6,0,0,
64,248,128,128,240,128,128,248,5,8,8,6,0,0,80,248,
128,128,240,128,128,248,5,7,7,6,0,0,224,64,64,112,
72,72,112,5,8,8,6,0,0,16,32,248,136,128,128,128,
128,5,7,7,6,0,0,48,72,128,224,128,72,48,5,7,
7,6,0,0,112,136,128,112,8,136,112,3,7,7,6,1,
0,224,64,64,64,64,64,224,3,8,8,6,1,0,160,0,
224,64,64,64,64,224,5,7,7,6,0,0,56,16,16,16,
16,144,96,5,7,7,6,0,0,160,160,160,184,168,168,184,
5,7,7,6,0,0,160,160,160,248,168,168,184,4,7,7,
6,0,0,224,64,112,80,80,80,80,5,8,8,6,0,0,
16,32,136,144,160,224,144,136,5,8,8,6,0,0,64,32,
136,152,168,200,136,136,5,9,9,6,0,255,80,32,136,136,
136,80,32,32,32,5,8,8,6,0,255,136,136,136,136,136,
136,248,32,5,7,7,6,0,0,112,136,136,248,136,136,136,
5,7,7,6,0,0,248,128,128,240,136,136,240,5,7,7,
6,0,0,240,136,136,240,136,136,240,5,7,7,6,0,0,
248,136,128,128,128,128,128,5,8,8,6,0,255,120,40,40,
40,72,136,248,136,5,7,7,6,0,0,248,128,128,240,128,
128,248,5,7,7,6,0,0,168,168,168,112,168,168,168,5,
7,7,6,0,0,240,8,8,112,8,8,240,5,7,7,6,
0,0,136,136,152,168,200,136,136,5,8,8,6,0,0,80,
32,136,152,168,168,200,136,5,7,7,6,0,0,136,144,160,
192,160,144,136,5,7,7,6,0,0,120,40,40,40,40,168,
72,5,7,7,6,0,0,136,216,168,136,136,136,136,5,7,
7,6,0,0,136,136,136,248,136,136,136,5,7,7,6,0,
0,112,136,136,136,136,136,112,5,7,7,6,0,0,248,136,
136,136,136,136,136,5,7,7,6,0,0,240,136,136,240,128,
128,128,5,7,7,6,0,0,112,136,128,128,128,136,112,5,
7,7,6,0,0,248,32,32,32,32,32,32,5,7,7,6,
0,0,136,136,136,80,32,64,128,5,7,7,6,0,0,32,
112,168,168,168,112,32,5,7,7,6,0,0,136,136,80,32,
80,136,136,5,8,8,6,0,255,136,136,136,136,136,136,248,
8,5,7,7,6,0,0,136,136,136,152,104,8,8,5,7,
7,6,0,0,168,168,168,168,168,168,248,5,8,8,6,0,
255,168,168,168,168,168,168,248,8,5,7,7,6,0,0,192,
64,64,112,72,72,112,5,7,7,6,0,0,136,136,136,200,
168,168,200,5,7,7,6,0,0,128,128,128,240,136,136,240,
5,7,7,6,0,0,112,136,8,56,8,136,112,5,7,7,
6,0,0,144,168,168,232,168,168,144,5,7,7,6,0,0,
120,136,136,120,40,72,136,5,5,5,6,0,0,112,8,120,
136,120,5,7,7,6,0,0,24,96,128,240,136,136,112,4,
5,5,6,0,0,224,144,224,144,224,5,5,5,6,0,0,
248,136,128,128,128,5,6,6,6,0,255,120,40,72,136,248,
136,5,5,5,6,0,0,112,136,248,128,112,5,5,5,6,
0,0,168,168,112,168,168,5,5,5,6,0,0,240,8,48,
8,240,5,5,5,6,0,0,136,152,168,200,136,5,7,7,
6,0,0,80,32,136,152,168,200,136,4,5,5,6,0,0,
144,160,192,160,144,5,5,5,6,0,0,248,40,40,168,72,
5,5,5,6,0,0,136,216,168,136,136,5,5,5,6,0,
0,136,136,248,136,136,5,5,5,6,0,0,112,136,136,136,
112,5,5,5,6,0,0,248,136,136,136,136,5,6,6,6,
0,255,240,136,136,240,128,128,5,5,5,6,0,0,112,128,
128,136,112,5,5,5,6,0,0,248,32,32,32,32,5,6,
6,6,0,255,136,136,136,120,8,112,5,6,6,6,0,0,
32,112,168,168,112,32,5,5,5,6,0,0,136,80,32,80,
136,5,6,6,6,0,255,136,136,136,136,248,8,5,5,5,
6,0,0,136,136,248,8,8,5,5,5,6,0,0,168,168,
168,168,248,5,6,6,6,0,255,168,168,168,168,248,8,5,
5,5,6,0,0,192,64,112,72,112,5,5,5,6,0,0,
136,136,200,168,200,3,5,5,6,1,0,128,128,192,160,192,
5,5,5,6,0,0,112,136,56,136,112,5,5,5,6,0,
0,144,168,232,168,144,5,5,5,6,0,0,120,136,120,40,
72,5,8,8,6,0,0,64,32,0,112,136,248,128,112,5,
7,7,6,0,0,80,0,112,136,248,128,112,5,9,9,6,
0,255,64,224,64,64,120,72,72,72,16,5,8,8,6,0,
0,16,32,0,248,136,128,128,128,5,5,5,6,0,0,112,
136,96,136,112,5,5,5,6,0,0,112,128,112,8,240,1,
7,7,6,2,0,128,0,128,128,128,128,128,3,7,7,6,
1,0,160,0,64,64,64,64,64,3,8,8,6,1,255,32,
0,32,32,32,32,160,64,5,5,5,6,0,0,160,160,184,
168,184,5,5,5,6,0,0,160,160,248,168,184,5,6,6,
6,0,0,64,224,64,120,72,72,4,8,8,6,0,0,16,
32,0,144,160,192,160,144,5,8,8,6,0,0,64,32,0,
136,152,168,200,136,5,9,9,6,0,255,80,32,0,136,136,
136,120,8,112,5,6,6,6,0,255,136,136,136,136,248,32
};

@ -0,0 +1,173 @@
/*
Fontname: ISO10646_Kana
Copyright: A. Hardtung, public domain
Capital A Height: 7, '1' Height: 7
Calculated Max Values w= 5 h= 9 x= 2 y= 5 dx= 6 dy= 0 ascent= 8 len= 9
Font Bounding box w= 6 h= 9 x= 0 y=-2
Calculated Min Values x= 0 y=-1 dx= 0 dy= 0
Pure Font ascent = 7 descent=-1
X Font ascent = 7 descent=-1
Max Font ascent = 8 descent=-1
*/
#include <utility/u8g.h>
const u8g_fntpgm_uint8_t ISO10646_Kana_5x7[2549] U8G_SECTION(".progmem.ISO10646_Kana_5x7") = {
0,6,9,0,254,7,1,145,3,32,32,255,255,8,255,7,
255,0,0,0,6,0,0,1,7,7,6,2,0,128,128,128,
128,128,0,128,3,2,2,6,1,5,160,160,5,7,7,6,
0,0,80,80,248,80,248,80,80,5,7,7,6,0,0,32,
120,160,112,40,240,32,5,7,7,6,0,0,192,200,16,32,
64,152,24,5,7,7,6,0,0,96,144,160,64,168,144,104,
2,3,3,6,1,4,192,64,128,3,7,7,6,1,0,32,
64,128,128,128,64,32,3,7,7,6,1,0,128,64,32,32,
32,64,128,5,5,5,6,0,1,32,168,112,168,32,5,5,
5,6,0,1,32,32,248,32,32,2,3,3,6,2,255,192,
64,128,5,1,1,6,0,3,248,2,2,2,6,2,0,192,
192,5,5,5,6,0,1,8,16,32,64,128,5,7,7,6,
0,0,112,136,152,168,200,136,112,3,7,7,6,1,0,64,
192,64,64,64,64,224,5,7,7,6,0,0,112,136,8,112,
128,128,248,5,7,7,6,0,0,248,16,32,16,8,8,240,
5,7,7,6,0,0,16,48,80,144,248,16,16,5,7,7,
6,0,0,248,128,240,8,8,136,112,5,7,7,6,0,0,
48,64,128,240,136,136,112,5,7,7,6,0,0,248,8,16,
32,32,32,32,5,7,7,6,0,0,112,136,136,112,136,136,
112,5,7,7,6,0,0,112,136,136,120,8,16,96,2,5,
5,6,2,0,192,192,0,192,192,2,6,6,6,2,255,192,
192,0,192,64,128,4,7,7,6,0,0,16,32,64,128,64,
32,16,5,3,3,6,0,2,248,0,248,4,7,7,6,1,
0,128,64,32,16,32,64,128,5,7,7,6,0,0,112,136,
8,16,32,0,32,5,6,6,6,0,0,112,136,8,104,168,
112,5,7,7,6,0,0,112,136,136,248,136,136,136,5,7,
7,6,0,0,240,136,136,240,136,136,240,5,7,7,6,0,
0,112,136,128,128,128,136,112,5,7,7,6,0,0,224,144,
136,136,136,144,224,5,7,7,6,0,0,248,128,128,240,128,
128,248,5,7,7,6,0,0,248,128,128,240,128,128,128,5,
7,7,6,0,0,112,136,128,184,136,136,112,5,7,7,6,
0,0,136,136,136,248,136,136,136,1,7,7,6,2,0,128,
128,128,128,128,128,128,5,7,7,6,0,0,56,16,16,16,
16,144,96,5,7,7,6,0,0,136,144,160,192,160,144,136,
5,7,7,6,0,0,128,128,128,128,128,128,248,5,7,7,
6,0,0,136,216,168,136,136,136,136,5,7,7,6,0,0,
136,136,200,168,152,136,136,5,7,7,6,0,0,112,136,136,
136,136,136,112,5,7,7,6,0,0,240,136,136,240,128,128,
128,5,7,7,6,0,0,112,136,136,136,168,144,104,5,7,
7,6,0,0,240,136,136,240,160,144,136,5,7,7,6,0,
0,120,128,128,112,8,8,240,5,7,7,6,0,0,248,32,
32,32,32,32,32,5,7,7,6,0,0,136,136,136,136,136,
136,112,5,7,7,6,0,0,136,136,136,136,136,80,32,5,
7,7,6,0,0,136,136,136,136,136,168,80,5,7,7,6,
0,0,136,136,80,32,80,136,136,5,7,7,6,0,0,136,
136,136,80,32,32,32,5,7,7,6,0,0,248,8,16,32,
64,128,248,3,7,7,6,1,0,224,128,128,128,128,128,224,
5,5,5,6,0,1,128,64,32,16,8,3,7,7,6,1,
0,224,32,32,32,32,32,224,5,3,3,6,0,4,32,80,
136,5,1,1,6,0,0,248,2,2,2,6,2,5,128,64,
5,5,5,6,0,0,112,8,120,136,120,5,7,7,6,0,
0,128,128,176,200,136,136,240,5,5,5,6,0,0,112,128,
128,136,112,5,7,7,6,0,0,8,8,104,152,136,136,120,
5,5,5,6,0,0,112,136,248,128,112,5,7,7,6,0,
0,48,72,224,64,64,64,64,5,6,6,6,0,255,112,136,
136,120,8,112,5,7,7,6,0,0,128,128,176,200,136,136,
136,1,7,7,6,2,0,128,0,128,128,128,128,128,3,8,
8,6,1,255,32,0,32,32,32,32,160,64,4,7,7,6,
0,0,128,128,144,160,192,160,144,3,7,7,6,1,0,192,
64,64,64,64,64,224,5,5,5,6,0,0,208,168,168,168,
168,5,5,5,6,0,0,176,200,136,136,136,5,5,5,6,
0,0,112,136,136,136,112,5,6,6,6,0,255,240,136,136,
240,128,128,5,6,6,6,0,255,120,136,136,120,8,8,5,
5,5,6,0,0,176,200,128,128,128,5,5,5,6,0,0,
112,128,112,8,240,5,7,7,6,0,0,64,64,224,64,64,
72,48,5,5,5,6,0,0,136,136,136,152,104,5,5,5,
6,0,0,136,136,136,80,32,5,5,5,6,0,0,136,136,
168,168,80,5,5,5,6,0,0,136,80,32,80,136,5,6,
6,6,0,255,136,136,136,120,8,112,5,5,5,6,0,0,
248,16,32,64,248,3,7,7,6,1,0,32,64,64,128,64,
64,32,1,7,7,6,2,0,128,128,128,128,128,128,128,3,
7,7,6,1,0,128,64,64,32,64,64,128,5,2,2,6,
0,3,104,144,0,0,0,6,0,0,0,0,0,6,0,0,
0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,
0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,
0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,
0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,
0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,
0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,
0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,
0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,
0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,
0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,
0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,
0,6,0,0,0,0,0,6,0,0,5,3,3,6,0,2,
248,0,248,5,6,6,6,0,0,248,8,40,48,32,64,5,
7,7,6,0,0,248,8,40,48,32,32,64,4,5,5,6,
0,0,16,32,96,160,32,5,7,7,6,0,0,8,16,32,
96,160,32,32,5,5,5,6,0,0,32,248,136,8,48,5,
7,7,6,0,0,32,248,136,136,8,16,32,5,4,4,6,
0,0,248,32,32,248,5,6,6,6,0,0,248,32,32,32,
32,248,5,5,5,6,0,0,16,248,48,80,144,5,7,7,
6,0,0,16,248,16,48,80,144,16,5,5,5,6,0,0,
64,248,72,80,64,5,7,7,6,0,0,40,0,64,248,72,
80,64,5,7,7,6,0,0,32,248,32,248,32,32,32,5,
8,8,6,0,0,40,0,32,248,32,248,32,32,4,6,6,
6,0,0,64,112,144,16,16,32,5,8,8,6,0,0,40,
0,64,112,144,16,16,32,5,6,6,6,0,0,64,120,144,
16,16,32,5,8,8,6,0,0,40,0,64,120,144,16,16,
32,5,5,5,6,0,0,248,8,8,8,248,5,7,7,6,
0,0,40,0,248,8,8,8,248,5,7,7,6,0,255,80,
248,80,80,16,32,64,5,9,9,6,0,255,40,0,80,248,
80,80,16,32,64,5,6,6,6,0,0,192,8,200,8,16,
224,5,8,8,6,0,0,40,0,192,8,200,8,16,224,5,
6,6,6,0,0,248,8,16,32,80,136,5,8,8,6,0,
0,40,0,248,8,16,32,80,136,5,6,6,6,0,0,64,
248,72,80,64,120,5,8,8,6,0,0,40,0,64,248,72,
80,64,120,4,4,4,6,0,1,16,208,16,224,5,7,7,
6,0,0,40,0,8,200,8,16,224,5,7,7,6,0,255,
32,120,136,40,16,40,64,5,9,9,6,0,255,40,0,32,
120,136,40,16,40,64,5,6,6,6,0,0,240,32,248,32,
64,128,5,8,8,6,0,0,40,0,240,32,248,32,64,128,
4,5,5,6,0,1,192,16,208,16,224,5,6,6,6,0,
0,192,8,200,8,16,224,5,8,8,6,0,0,40,0,192,
8,200,8,16,224,5,6,6,6,0,0,112,0,248,32,32,
64,5,8,8,6,0,0,40,0,112,0,248,32,32,64,3,
7,7,6,1,0,128,128,128,192,160,128,128,4,8,8,6,
1,0,80,0,128,128,192,160,128,128,5,7,7,6,0,0,
32,32,248,32,32,64,128,5,6,6,6,0,0,112,0,0,
0,0,248,5,6,6,6,0,0,248,8,80,32,80,128,5,
7,7,6,0,255,32,248,8,16,32,112,168,3,7,7,6,
1,0,32,32,32,32,32,64,128,5,5,5,6,0,0,16,
136,136,136,136,5,7,7,6,0,0,40,0,16,136,136,136,
136,5,8,8,6,0,0,24,24,0,16,136,136,136,136,5,
7,7,6,0,0,128,128,248,128,128,128,120,5,8,8,6,
0,0,40,128,128,248,128,128,128,120,5,8,8,6,0,0,
24,152,128,248,128,128,128,120,5,6,6,6,0,0,248,8,
8,8,16,96,5,8,8,6,0,0,40,0,248,8,8,8,
16,96,5,8,8,6,0,0,24,24,248,8,8,8,16,96,
5,5,5,6,0,1,64,160,16,8,8,5,7,7,6,0,
1,40,0,64,160,16,8,8,5,7,7,6,0,1,24,24,
64,160,16,8,8,5,6,6,6,0,0,32,248,32,32,168,
168,5,8,8,6,0,0,40,0,32,248,32,32,168,168,5,
8,8,6,0,0,24,24,32,248,32,32,168,168,5,6,6,
6,0,0,248,8,8,80,32,16,4,6,6,6,1,0,224,
0,224,0,224,16,5,6,6,6,0,0,32,64,128,144,248,
8,5,6,6,6,0,0,8,8,80,32,80,128,5,6,6,
6,0,0,120,32,248,32,32,56,5,7,7,6,0,0,64,
64,248,72,80,64,64,5,7,7,6,0,0,64,248,72,80,
64,64,64,5,5,5,6,0,0,112,16,16,16,248,5,7,
7,6,0,0,112,16,16,16,16,16,248,4,5,5,6,1,
0,240,16,240,16,240,5,7,7,6,0,0,248,8,8,248,
8,8,248,5,6,6,6,0,0,112,0,248,8,16,32,3,
6,6,6,1,0,160,160,160,160,32,64,5,6,6,6,0,
0,80,80,80,80,88,144,4,6,6,6,1,0,128,128,128,
144,160,192,5,6,6,6,0,0,248,136,136,136,248,136,5,
5,5,6,0,0,248,136,8,16,96,5,6,6,6,0,0,
248,136,8,8,16,96,5,6,6,6,0,0,16,248,80,80,
248,16,5,6,6,6,0,0,248,8,80,96,64,248,5,6,
6,6,0,0,248,8,248,8,16,32,5,6,6,6,0,0,
128,64,8,8,16,224,5,8,8,6,0,0,40,0,32,248,
136,8,24,32,5,6,6,6,0,0,64,248,72,72,136,144,
4,5,5,6,1,0,128,240,160,32,32,5,8,8,6,0,
0,40,0,248,136,8,8,16,96,5,8,8,6,0,0,40,
0,16,248,80,80,248,16,5,7,7,6,0,0,40,0,248,
16,32,32,248,5,8,8,6,0,0,40,0,248,8,248,8,
16,32,2,2,2,6,2,2,192,192,5,1,1,6,0,3,
248,5,5,5,6,0,1,128,64,32,16,8,5,6,6,6,
0,1,40,128,64,32,16,8,5,7,7,6,0,0,248,8,
8,8,8,8,8};

@ -0,0 +1,22 @@
/*
Fontname: Marlin_symbols
Copyright: Created with Fony 1.4.7
Capital A Height: 0, '1' Height: 0
Calculated Max Values w= 5 h=10 x= 0 y= 3 dx= 6 dy= 0 ascent= 8 len=10
Font Bounding box w= 6 h= 9 x= 0 y=-2
Calculated Min Values x= 0 y=-2 dx= 0 dy= 0
Pure Font ascent = 0 descent= 0
X Font ascent = 0 descent= 0
Max Font ascent = 8 descent=-2
*/
#include <utility/u8g.h>
const u8g_fntpgm_uint8_t Marlin_symbols[140] U8G_SECTION(".progmem.Marlin_symbols") = {
0,6,9,0,254,0,0,0,0,0,1,9,0,8,254,0,
0,5,8,8,6,0,0,64,240,200,136,136,152,120,16,5,
8,8,6,0,0,192,248,136,136,136,136,136,248,5,5,5,
6,0,1,32,48,248,48,32,5,8,8,6,0,0,32,112,
248,32,32,32,32,224,5,9,9,6,0,255,32,112,168,168,
184,136,136,112,32,5,9,9,6,0,255,224,128,192,176,168,
40,48,40,40,5,9,9,6,0,255,248,168,136,136,136,136,
136,168,248,5,10,10,6,0,254,32,80,80,80,80,136,168,
168,136,112,3,3,3,6,0,3,64,160,64};

@ -14,11 +14,9 @@
#ifndef DOGM_LCD_IMPLEMENTATION_H #ifndef DOGM_LCD_IMPLEMENTATION_H
#define DOGM_LCD_IMPLEMENTATION_H #define DOGM_LCD_IMPLEMENTATION_H
#define MARLIN_VERSION "1.0.2"
/** /**
* Implementation of the LCD display routines for a DOGM128 graphic display. These are common LCD 128x64 pixel graphic displays. * Implementation of the LCD display routines for a DOGM128 graphic display. These are common LCD 128x64 pixel graphic displays.
**/ */
#ifdef ULTIPANEL #ifdef ULTIPANEL
#define BLEN_A 0 #define BLEN_A 0
@ -32,73 +30,150 @@
#include <U8glib.h> #include <U8glib.h>
#include "DOGMbitmaps.h" #include "DOGMbitmaps.h"
#include "dogm_font_data_ISO10646_1_Marlin.h"
#include "ultralcd.h" #include "ultralcd.h"
#include "ultralcd_st7920_u8glib_rrd.h" #include "ultralcd_st7920_u8glib_rrd.h"
#include "Configuration.h"
/* Russian language not supported yet, needs custom font // save 3120 bytes of PROGMEM by commenting out #define USE_BIG_EDIT_FONT
// we don't have a big font for Cyrillic, Kana
#if defined(MAPPER_C2C3) || defined(MAPPER_NON)
//#define USE_BIG_EDIT_FONT
#endif
#ifdef LANGUAGE_RU // If you have spare 2300Byte of progmem and want to use a
#include "LiquidCrystalRus.h" // smaller font on the Info-screen uncomment the next line.
#define LCD_CLASS LiquidCrystalRus //#define USE_SMALL_INFOFONT
#ifdef USE_SMALL_INFOFONT
#include "dogm_font_data_6x9_marlin.h"
#define FONT_STATUSMENU_NAME u8g_font_6x9
#else #else
#include <LiquidCrystal.h> #define FONT_STATUSMENU_NAME FONT_MENU_NAME
#define LCD_CLASS LiquidCrystal
#endif #endif
*/
#define USE_BIG_EDIT_FONT // save 3120 bytes of PROGMEM by commenting out this line #include "dogm_font_data_Marlin_symbols.h" // The Marlin special symbols
#define FONT_MENU ISO10646_1_Marlin_5x7 #define FONT_SPECIAL_NAME Marlin_symbols
#ifndef SIMULATE_ROMFONT
#if defined( DISPLAY_CHARSET_ISO10646_1 )
#include "dogm_font_data_ISO10646_1.h"
#define FONT_MENU_NAME ISO10646_1_5x7
#elif defined( DISPLAY_CHARSET_ISO10646_5 )
#include "dogm_font_data_ISO10646_5_Cyrillic.h"
#define FONT_MENU_NAME ISO10646_5_Cyrillic_5x7
#elif defined( DISPLAY_CHARSET_ISO10646_KANA )
#include "dogm_font_data_ISO10646_Kana.h"
#define FONT_MENU_NAME ISO10646_Kana_5x7
#else // fall-back
#include "dogm_font_data_ISO10646_1.h"
#define FONT_MENU_NAME ISO10646_1_5x7
#endif
#else // SIMULATE_ROMFONT
#if defined( DISPLAY_CHARSET_HD44780_JAPAN )
#include "dogm_font_data_HD44780_J.h"
#define FONT_MENU_NAME HD44780_J_5x7
#elif defined( DISPLAY_CHARSET_HD44780_WESTERN )
#include "dogm_font_data_HD44780_W.h"
#define FONT_MENU_NAME HD44780_W_5x7
#elif defined( DISPLAY_CHARSET_HD44780_CYRILLIC )
#include "dogm_font_data_HD44780_C.h"
#define FONT_MENU_NAME HD44780_C_5x7
#else // fall-back
#include "dogm_font_data_ISO10646_1.h"
#define FONT_MENU_NAME ISO10646_1_5x7
#endif
#endif // SIMULATE_ROMFONT
//#define FONT_STATUSMENU_NAME FONT_MENU_NAME
#define FONT_STATUSMENU 1
#define FONT_SPECIAL 2
#define FONT_MENU_EDIT 3
#define FONT_MENU 4
// DOGM parameters (size in pixels) // DOGM parameters (size in pixels)
#define DOG_CHAR_WIDTH 6 #define DOG_CHAR_WIDTH 6
#define DOG_CHAR_HEIGHT 12 #define DOG_CHAR_HEIGHT 12
#ifdef USE_BIG_EDIT_FONT #ifdef USE_BIG_EDIT_FONT
#define FONT_MENU_EDIT u8g_font_9x18 #define FONT_MENU_EDIT_NAME u8g_font_9x18
#define DOG_CHAR_WIDTH_EDIT 9 #define DOG_CHAR_WIDTH_EDIT 9
#define DOG_CHAR_HEIGHT_EDIT 18 #define DOG_CHAR_HEIGHT_EDIT 18
#define LCD_WIDTH_EDIT 14 #define LCD_WIDTH_EDIT 14
#else #else
#define FONT_MENU_EDIT ISO10646_1_Marlin_5x7 #define FONT_MENU_EDIT_NAME FONT_MENU_NAME
#define DOG_CHAR_WIDTH_EDIT 6 #define DOG_CHAR_WIDTH_EDIT 6
#define DOG_CHAR_HEIGHT_EDIT 12 #define DOG_CHAR_HEIGHT_EDIT 12
#define LCD_WIDTH_EDIT 22 #define LCD_WIDTH_EDIT 22
#endif #endif
#define FONT_STATUSMENU FONT_MENU
#define START_ROW 0 #define START_ROW 0
/* Custom characters defined in font font_6x10_marlin.c */
#define LCD_STR_DEGREE "\xB0"
#define LCD_STR_REFRESH "\xF8"
#define LCD_STR_FOLDER "\xF9"
#define LCD_STR_ARROW_RIGHT "\xFA"
#define LCD_STR_UPLEVEL "\xFB"
#define LCD_STR_CLOCK "\xFC"
#define LCD_STR_FEEDRATE "\xFD"
#define LCD_STR_BEDTEMP "\xFE"
#define LCD_STR_THERMOMETER "\xFF"
int lcd_contrast;
// LCD selection // LCD selection
#ifdef U8GLIB_ST7920 #ifdef U8GLIB_ST7920
//U8GLIB_ST7920_128X64_RRD u8g(0,0,0); //U8GLIB_ST7920_128X64_RRD u8g(0,0,0);
U8GLIB_ST7920_128X64_RRD u8g(0); U8GLIB_ST7920_128X64_RRD u8g(0);
#elif defined(MAKRPANEL) #elif defined(MAKRPANEL)
// The MaKrPanel display, ST7565 controller as well // The MaKrPanel display, ST7565 controller as well
U8GLIB_NHD_C12864 u8g(DOGLCD_CS, DOGLCD_A0); U8GLIB_NHD_C12864 u8g(DOGLCD_CS, DOGLCD_A0);
#elif defined(VIKI2) || defined(miniVIKI) #elif defined(VIKI2) || defined(miniVIKI)
// Mini Viki and Viki 2.0 LCD, ST7565 controller as well // Mini Viki and Viki 2.0 LCD, ST7565 controller as well
U8GLIB_NHD_C12864 u8g(DOGLCD_CS, DOGLCD_A0); U8GLIB_NHD_C12864 u8g(DOGLCD_CS, DOGLCD_A0);
#else #else
// for regular DOGM128 display with HW-SPI // for regular DOGM128 display with HW-SPI
U8GLIB_DOGM128 u8g(DOGLCD_CS, DOGLCD_A0); // HW-SPI Com: CS, A0 U8GLIB_DOGM128 u8g(DOGLCD_CS, DOGLCD_A0); // HW-SPI Com: CS, A0
#endif #endif
static void lcd_implementation_init() #include "utf_mapper.h"
{
int lcd_contrast;
static unsigned char blink = 0; // Variable for visualization of fan rotation in GLCD
static char currentfont = 0;
static void lcd_setFont(char font_nr) {
switch(font_nr) {
case FONT_STATUSMENU : {u8g.setFont(FONT_STATUSMENU_NAME); currentfont = FONT_STATUSMENU;}; break;
case FONT_MENU : {u8g.setFont(FONT_MENU_NAME); currentfont = FONT_MENU;}; break;
case FONT_SPECIAL : {u8g.setFont(FONT_SPECIAL_NAME); currentfont = FONT_SPECIAL;}; break;
case FONT_MENU_EDIT : {u8g.setFont(FONT_MENU_EDIT_NAME); currentfont = FONT_MENU_EDIT;}; break;
break;
}
}
char lcd_print(char c) {
if ((c > 0) && (c <= LCD_STR_SPECIAL_MAX)) {
u8g.setFont(FONT_SPECIAL_NAME);
u8g.print(c);
lcd_setFont(currentfont);
return 1;
} else {
return charset_mapper(c);
}
}
char lcd_print(char* str) {
char c;
int i = 0;
char n = 0;
while ((c = str[i++])) {
n += lcd_print(c);
}
return n;
}
/* Arduino < 1.0.0 is missing a function to print PROGMEM strings, so we need to implement our own */
char lcd_printPGM(const char* str) {
char c;
char n = 0;
while ((c = pgm_read_byte(str++))) {
n += lcd_print(c);
}
return n;
}
static bool show_splashscreen = true;
static void lcd_implementation_init() {
#ifdef LCD_PIN_BL // Enable LCD backlight #ifdef LCD_PIN_BL // Enable LCD backlight
pinMode(LCD_PIN_BL, OUTPUT); pinMode(LCD_PIN_BL, OUTPUT);
digitalWrite(LCD_PIN_BL, HIGH); digitalWrite(LCD_PIN_BL, HIGH);
@ -110,13 +185,13 @@ static void lcd_implementation_init()
// pinMode(17, OUTPUT); // Enable LCD backlight // pinMode(17, OUTPUT); // Enable LCD backlight
// digitalWrite(17, HIGH); // digitalWrite(17, HIGH);
#ifdef LCD_SCREEN_ROT_90 #ifdef LCD_SCREEN_ROT_90
u8g.setRot90(); // Rotate screen by 90° u8g.setRot90(); // Rotate screen by 90°
#elif defined(LCD_SCREEN_ROT_180) #elif defined(LCD_SCREEN_ROT_180)
u8g.setRot180(); // Rotate screen by 180° u8g.setRot180(); // Rotate screen by 180°
#elif defined(LCD_SCREEN_ROT_270) #elif defined(LCD_SCREEN_ROT_270)
u8g.setRot270(); // Rotate screen by 270° u8g.setRot270(); // Rotate screen by 270°
#endif #endif
// Show splashscreen // Show splashscreen
int offx = (u8g.getWidth() - START_BMPWIDTH) / 2; int offx = (u8g.getWidth() - START_BMPWIDTH) / 2;
@ -130,8 +205,9 @@ static void lcd_implementation_init()
u8g.firstPage(); u8g.firstPage();
do { do {
if (show_splashscreen) {
u8g.drawBitmapP(offx, offy, START_BMPBYTEWIDTH, START_BMPHEIGHT, start_bmp); u8g.drawBitmapP(offx, offy, START_BMPBYTEWIDTH, START_BMPHEIGHT, start_bmp);
u8g.setFont(FONT_MENU); lcd_setFont(FONT_MENU);
#ifndef STRING_SPLASH_LINE2 #ifndef STRING_SPLASH_LINE2
u8g.drawStr(txt1X, u8g.getHeight() - DOG_CHAR_HEIGHT, STRING_SPLASH_LINE1); u8g.drawStr(txt1X, u8g.getHeight() - DOG_CHAR_HEIGHT, STRING_SPLASH_LINE1);
#else #else
@ -139,26 +215,24 @@ static void lcd_implementation_init()
u8g.drawStr(txt1X, u8g.getHeight() - DOG_CHAR_HEIGHT*3/2, STRING_SPLASH_LINE1); u8g.drawStr(txt1X, u8g.getHeight() - DOG_CHAR_HEIGHT*3/2, STRING_SPLASH_LINE1);
u8g.drawStr(txt2X, u8g.getHeight() - DOG_CHAR_HEIGHT*1/2, STRING_SPLASH_LINE2); u8g.drawStr(txt2X, u8g.getHeight() - DOG_CHAR_HEIGHT*1/2, STRING_SPLASH_LINE2);
#endif #endif
}
} while (u8g.nextPage()); } while (u8g.nextPage());
show_splashscreen = false;
} }
static void lcd_implementation_clear() { } // Automatically cleared by Picture Loop static void lcd_implementation_clear() { } // Automatically cleared by Picture Loop
/* Arduino < 1.0.0 is missing a function to print PROGMEM strings, so we need to implement our own */
static void lcd_printPGM(const char* str) {
char c;
while ((c = pgm_read_byte(str++))) u8g.print(c);
}
static void _draw_heater_status(int x, int heater) { static void _draw_heater_status(int x, int heater) {
bool isBed = heater < 0; bool isBed = heater < 0;
int y = 17 + (isBed ? 1 : 0); int y = 17 + (isBed ? 1 : 0);
u8g.setFont(FONT_STATUSMENU);
lcd_setFont(FONT_STATUSMENU);
u8g.setPrintPos(x,7); u8g.setPrintPos(x,7);
u8g.print(itostr3(int((heater >= 0 ? degTargetHotend(heater) : degTargetBed()) + 0.5))); lcd_print(itostr3(int((heater >= 0 ? degTargetHotend(heater) : degTargetBed()) + 0.5)));
lcd_printPGM(PSTR(LCD_STR_DEGREE " ")); lcd_printPGM(PSTR(LCD_STR_DEGREE " "));
u8g.setPrintPos(x,28); u8g.setPrintPos(x,28);
u8g.print(itostr3(int(heater >= 0 ? degHotend(heater) : degBed()) + 0.5)); lcd_print(itostr3(int(heater >= 0 ? degHotend(heater) : degBed()) + 0.5));
lcd_printPGM(PSTR(LCD_STR_DEGREE " ")); lcd_printPGM(PSTR(LCD_STR_DEGREE " "));
if (!isHeatingHotend(0)) { if (!isHeatingHotend(0)) {
u8g.drawBox(x+7,y,2,2); u8g.drawBox(x+7,y,2,2);
@ -171,9 +245,6 @@ static void _draw_heater_status(int x, int heater) {
} }
static void lcd_implementation_status_screen() { static void lcd_implementation_status_screen() {
static unsigned char fan_rot = 0;
u8g.setColorIndex(1); // black on white u8g.setColorIndex(1); // black on white
// Symbols menu graphics, animated fan // Symbols menu graphics, animated fan
@ -190,7 +261,7 @@ static void lcd_implementation_status_screen() {
u8g.drawFrame(54,49,73,4); u8g.drawFrame(54,49,73,4);
// SD Card Progress bar and clock // SD Card Progress bar and clock
u8g.setFont(FONT_STATUSMENU); lcd_setFont(FONT_STATUSMENU);
if (IS_SD_PRINTING) { if (IS_SD_PRINTING) {
// Progress bar solid part // Progress bar solid part
@ -198,11 +269,11 @@ static void lcd_implementation_status_screen() {
} }
u8g.setPrintPos(80,48); u8g.setPrintPos(80,48);
if (starttime != 0) { if (print_job_start_ms != 0) {
uint16_t time = (millis() - starttime) / 60000; uint16_t time = (millis() - print_job_start_ms) / 60000;
u8g.print(itostr2(time/60)); lcd_print(itostr2(time/60));
u8g.print(':'); lcd_print(':');
u8g.print(itostr2(time%60)); lcd_print(itostr2(time%60));
} }
else { else {
lcd_printPGM(PSTR("--:--")); lcd_printPGM(PSTR("--:--"));
@ -216,69 +287,78 @@ static void lcd_implementation_status_screen() {
if (EXTRUDERS < 4) _draw_heater_status(81, -1); if (EXTRUDERS < 4) _draw_heater_status(81, -1);
// Fan // Fan
u8g.setFont(FONT_STATUSMENU); lcd_setFont(FONT_STATUSMENU);
u8g.setPrintPos(104,27); u8g.setPrintPos(104,27);
#if defined(FAN_PIN) && FAN_PIN > -1 #if HAS_FAN
int per = ((fanSpeed + 1) * 100) / 256; int per = ((fanSpeed + 1) * 100) / 256;
if (per) { if (per) {
u8g.print(itostr3(per)); lcd_print(itostr3(per));
u8g.print('%'); lcd_print('%');
} }
else else
#endif #endif
{ {
u8g.print("---"); lcd_printPGM(PSTR("---"));
} }
// X, Y, Z-Coordinates // X, Y, Z-Coordinates
#define XYZ_BASELINE 38 #define XYZ_BASELINE 38
u8g.setFont(FONT_STATUSMENU); lcd_setFont(FONT_STATUSMENU);
#ifdef USE_SMALL_INFOFONT
u8g.drawBox(0,30,128,10);
#else
u8g.drawBox(0,30,128,9); u8g.drawBox(0,30,128,9);
#endif
u8g.setColorIndex(0); // white on black u8g.setColorIndex(0); // white on black
u8g.setPrintPos(2,XYZ_BASELINE); u8g.setPrintPos(2,XYZ_BASELINE);
u8g.print('X'); lcd_print('X');
u8g.drawPixel(8,XYZ_BASELINE - 5); u8g.drawPixel(8,XYZ_BASELINE - 5);
u8g.drawPixel(8,XYZ_BASELINE - 3); u8g.drawPixel(8,XYZ_BASELINE - 3);
u8g.setPrintPos(10,XYZ_BASELINE); u8g.setPrintPos(10,XYZ_BASELINE);
u8g.print(ftostr31ns(current_position[X_AXIS])); lcd_print(ftostr31ns(current_position[X_AXIS]));
u8g.setPrintPos(43,XYZ_BASELINE); u8g.setPrintPos(43,XYZ_BASELINE);
u8g.print('Y'); lcd_print('Y');
u8g.drawPixel(49,XYZ_BASELINE - 5); u8g.drawPixel(49,XYZ_BASELINE - 5);
u8g.drawPixel(49,XYZ_BASELINE - 3); u8g.drawPixel(49,XYZ_BASELINE - 3);
u8g.setPrintPos(51,XYZ_BASELINE); u8g.setPrintPos(51,XYZ_BASELINE);
u8g.print(ftostr31ns(current_position[Y_AXIS])); lcd_print(ftostr31ns(current_position[Y_AXIS]));
u8g.setPrintPos(83,XYZ_BASELINE); u8g.setPrintPos(83,XYZ_BASELINE);
u8g.print('Z'); lcd_print('Z');
u8g.drawPixel(89,XYZ_BASELINE - 5); u8g.drawPixel(89,XYZ_BASELINE - 5);
u8g.drawPixel(89,XYZ_BASELINE - 3); u8g.drawPixel(89,XYZ_BASELINE - 3);
u8g.setPrintPos(91,XYZ_BASELINE); u8g.setPrintPos(91,XYZ_BASELINE);
u8g.print(ftostr31(current_position[Z_AXIS])); lcd_print(ftostr31(current_position[Z_AXIS]));
u8g.setColorIndex(1); // black on white u8g.setColorIndex(1); // black on white
// Feedrate // Feedrate
u8g.setFont(FONT_MENU); lcd_setFont(FONT_MENU);
u8g.setPrintPos(3,49); u8g.setPrintPos(3,49);
u8g.print(LCD_STR_FEEDRATE[0]); lcd_print(LCD_STR_FEEDRATE[0]);
u8g.setFont(FONT_STATUSMENU); lcd_setFont(FONT_STATUSMENU);
u8g.setPrintPos(12,49); u8g.setPrintPos(12,49);
u8g.print(itostr3(feedmultiply)); lcd_print(itostr3(feedrate_multiplier));
u8g.print('%'); lcd_print('%');
// Status line // Status line
u8g.setFont(FONT_STATUSMENU); lcd_setFont(FONT_STATUSMENU);
#ifdef USE_SMALL_INFOFONT
u8g.setPrintPos(0,62);
#else
u8g.setPrintPos(0,63); u8g.setPrintPos(0,63);
#endif
#ifndef FILAMENT_LCD_DISPLAY #ifndef FILAMENT_LCD_DISPLAY
u8g.print(lcd_status_message); lcd_print(lcd_status_message);
#else #else
if (millis() < message_millis + 5000) { //Display both Status message line and Filament display on the last line if (millis() < previous_lcd_status_ms + 5000) { //Display both Status message line and Filament display on the last line
u8g.print(lcd_status_message); lcd_print(lcd_status_message);
} }
else { else {
lcd_printPGM(PSTR("dia:")); lcd_printPGM(PSTR("dia:"));
u8g.print(ftostr12ns(filament_width_meas)); lcd_print(ftostr12ns(filament_width_meas));
lcd_printPGM(PSTR(" factor:")); lcd_printPGM(PSTR(" factor:"));
u8g.print(itostr3(extrudemultiply)); lcd_print(itostr3(volumetric_multiplier[FILAMENT_SENSOR_EXTRUDER_NUM]));
u8g.print('%'); lcd_print('%');
} }
#endif #endif
} }
@ -301,14 +381,13 @@ static void lcd_implementation_drawmenu_generic(bool isSelected, uint8_t row, co
lcd_implementation_mark_as_selected(row, isSelected); lcd_implementation_mark_as_selected(row, isSelected);
while ((c = pgm_read_byte(pstr))) { while (c = pgm_read_byte(pstr)) {
u8g.print(c); n -= lcd_print(c);
pstr++; pstr++;
n--;
} }
while (n--) u8g.print(' '); while (n--) lcd_print(' ');
u8g.print(post_char); lcd_print(post_char);
u8g.print(' '); lcd_print(' ');
} }
static void _drawmenu_setting_edit_generic(bool isSelected, uint8_t row, const char* pstr, const char* data, bool pgm) { static void _drawmenu_setting_edit_generic(bool isSelected, uint8_t row, const char* pstr, const char* data, bool pgm) {
@ -317,14 +396,13 @@ static void _drawmenu_setting_edit_generic(bool isSelected, uint8_t row, const c
lcd_implementation_mark_as_selected(row, isSelected); lcd_implementation_mark_as_selected(row, isSelected);
while ((c = pgm_read_byte(pstr))) { while (c = pgm_read_byte(pstr)) {
u8g.print(c); n -= lcd_print(c);
pstr++; pstr++;
n--;
} }
u8g.print(':'); lcd_print(':');
while (n--) u8g.print(' '); while (n--) lcd_print(' ');
if (pgm) { lcd_printPGM(data); } else { u8g.print(data); } if (pgm) { lcd_printPGM(data); } else { lcd_print((char *)data); }
} }
#define lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, data) _drawmenu_setting_edit_generic(sel, row, pstr, data, false) #define lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, data) _drawmenu_setting_edit_generic(sel, row, pstr, data, false)
@ -358,13 +436,13 @@ void lcd_implementation_drawedit(const char* pstr, char* value) {
#ifdef USE_BIG_EDIT_FONT #ifdef USE_BIG_EDIT_FONT
if (lcd_strlen_P(pstr) <= LCD_WIDTH_EDIT - 1) { if (lcd_strlen_P(pstr) <= LCD_WIDTH_EDIT - 1) {
u8g.setFont(FONT_MENU_EDIT); lcd_setFont(FONT_MENU_EDIT);
lcd_width = LCD_WIDTH_EDIT + 1; lcd_width = LCD_WIDTH_EDIT + 1;
char_width = DOG_CHAR_WIDTH_EDIT; char_width = DOG_CHAR_WIDTH_EDIT;
if (lcd_strlen_P(pstr) >= LCD_WIDTH_EDIT - vallen) rows = 2; if (lcd_strlen_P(pstr) >= LCD_WIDTH_EDIT - vallen) rows = 2;
} }
else { else {
u8g.setFont(FONT_MENU); lcd_setFont(FONT_MENU);
} }
#endif #endif
@ -375,9 +453,9 @@ void lcd_implementation_drawedit(const char* pstr, char* value) {
u8g.setPrintPos(0, rowHeight + kHalfChar); u8g.setPrintPos(0, rowHeight + kHalfChar);
lcd_printPGM(pstr); lcd_printPGM(pstr);
u8g.print(':'); lcd_print(':');
u8g.setPrintPos((lcd_width - 1 - vallen) * char_width, rows * rowHeight + kHalfChar); u8g.setPrintPos((lcd_width - 1 - vallen) * char_width, rows * rowHeight + kHalfChar);
u8g.print(value); lcd_print(value);
} }
static void _drawmenu_sd(bool isSelected, uint8_t row, const char* pstr, const char* filename, char * const longFilename, bool isDir) { static void _drawmenu_sd(bool isSelected, uint8_t row, const char* pstr, const char* filename, char * const longFilename, bool isDir) {
@ -391,13 +469,12 @@ static void _drawmenu_sd(bool isSelected, uint8_t row, const char* pstr, const c
lcd_implementation_mark_as_selected(row, isSelected); lcd_implementation_mark_as_selected(row, isSelected);
if (isDir) u8g.print(LCD_STR_FOLDER[0]); if (isDir) lcd_print(LCD_STR_FOLDER[0]);
while ((c = *filename)) { while ((c = *filename)) {
u8g.print(c); n -= lcd_print(c);
filename++; filename++;
n--;
} }
while (n--) u8g.print(' '); while (n--) lcd_print(' ');
} }
#define lcd_implementation_drawmenu_sdfile(sel, row, pstr, filename, longFilename) _drawmenu_sd(sel, row, pstr, filename, longFilename, false) #define lcd_implementation_drawmenu_sdfile(sel, row, pstr, filename, longFilename) _drawmenu_sd(sel, row, pstr, filename, longFilename, false)
@ -408,16 +485,4 @@ static void _drawmenu_sd(bool isSelected, uint8_t row, const char* pstr, const c
#define lcd_implementation_drawmenu_gcode(sel, row, pstr, gcode) lcd_implementation_drawmenu_generic(sel, row, pstr, '>', ' ') #define lcd_implementation_drawmenu_gcode(sel, row, pstr, gcode) lcd_implementation_drawmenu_generic(sel, row, pstr, '>', ' ')
#define lcd_implementation_drawmenu_function(sel, row, pstr, data) lcd_implementation_drawmenu_generic(sel, row, pstr, '>', ' ') #define lcd_implementation_drawmenu_function(sel, row, pstr, data) lcd_implementation_drawmenu_generic(sel, row, pstr, '>', ' ')
static void lcd_implementation_quick_feedback() {
#if BEEPER > -1
SET_OUTPUT(BEEPER);
for(int8_t i=0; i<10; i++) {
WRITE(BEEPER,HIGH);
delay(3);
WRITE(BEEPER,LOW);
delay(3);
}
#endif
}
#endif //__DOGM_LCD_IMPLEMENTATION_H #endif //__DOGM_LCD_IMPLEMENTATION_H

@ -1,4 +1,4 @@
#ifndef CONFIGURATION_H #ifndef CONFIGURATION_H
#define CONFIGURATION_H #define CONFIGURATION_H
#include "boards.h" #include "boards.h"
@ -38,7 +38,7 @@ Here are some standard links for getting your machine calibrated:
// User-specified version info of this build to display in [Pronterface, etc] terminal window during // User-specified version info of this build to display in [Pronterface, etc] terminal window during
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
// build by the user have been successfully uploaded into firmware. // build by the user have been successfully uploaded into firmware.
#define STRING_VERSION "1.0.2" #define STRING_VERSION "1.0.3 dev"
#define STRING_URL "reprap.org" #define STRING_URL "reprap.org"
#define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
@ -62,8 +62,9 @@ Here are some standard links for getting your machine calibrated:
#define MOTHERBOARD BOARD_FELIX2 #define MOTHERBOARD BOARD_FELIX2
#endif #endif
// Define this to set a custom name for your generic Mendel, // Optional custom name for your RepStrap or other custom machine
// #define CUSTOM_MENDEL_NAME "This Mendel" // Displayed in the LCD "Ready" message
#define CUSTOM_MACHINE_NAME "Felix"
// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines) // Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines)
// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) // You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4)
@ -122,7 +123,7 @@ Here are some standard links for getting your machine calibrated:
// Use it for Testing or Development purposes. NEVER for production machine. // Use it for Testing or Development purposes. NEVER for production machine.
// #define DUMMY_THERMISTOR_998_VALUE 25 // #define DUMMY_THERMISTOR_998_VALUE 25
// #define DUMMY_THERMISTOR_999_VALUE 100 // #define DUMMY_THERMISTOR_999_VALUE 100
// :{ '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" }
#define TEMP_SENSOR_0 1 #define TEMP_SENSOR_0 1
#define TEMP_SENSOR_1 0 #define TEMP_SENSOR_1 0
#define TEMP_SENSOR_2 0 #define TEMP_SENSOR_2 0
@ -184,7 +185,6 @@ Here are some standard links for getting your machine calibrated:
// is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
#define PID_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term #define PID_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term
#define K1 0.95 //smoothing factor within the PID #define K1 0.95 //smoothing factor within the PID
#define PID_dT ((OVERSAMPLENR * 10.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine
// Felix 2.0+ electronics with v4 Hotend // Felix 2.0+ electronics with v4 Hotend
#define DEFAULT_Kp 12 #define DEFAULT_Kp 12
@ -199,7 +199,7 @@ Here are some standard links for getting your machine calibrated:
// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis // Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
// //
// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. // Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder.
// If your PID_dT above is the default, and correct for your hardware/configuration, that means 7.689Hz, // If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz,
// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. // which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. // This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
// If your configuration is significantly different than this and you don't understand the issues involved, you probably // If your configuration is significantly different than this and you don't understand the issues involved, you probably
@ -265,24 +265,27 @@ your extruder heater takes 2 minutes to hit the target on heating.
// uncomment the 2 defines below: // uncomment the 2 defines below:
// Parameters for all extruder heaters // Parameters for all extruder heaters
//#define THERMAL_RUNAWAY_PROTECTION_PERIOD 60 //in seconds //#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds
//#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 5 // in degree Celsius //#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius
// If you want to enable this feature for your bed heater, // If you want to enable this feature for your bed heater,
// uncomment the 2 defines below: // uncomment the 2 defines below:
// Parameters for the bed heater // Parameters for the bed heater
//#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 30 //in seconds //#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds
//#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 5// in degree Celsius //#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius
//=========================================================================== //===========================================================================
//============================= Mechanical Settings ========================= //============================= Mechanical Settings =========================
//=========================================================================== //===========================================================================
// Uncomment the following line to enable CoreXY kinematics // Uncomment this option to enable CoreXY kinematics
// #define COREXY // #define COREXY
// Enable this option for Toshiba steppers
// #define CONFIG_STEPPERS_TOSHIBA
// coarse Endstop Settings // coarse Endstop Settings
#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
@ -296,13 +299,14 @@ your extruder heater takes 2 minutes to hit the target on heating.
// #define ENDSTOPPULLUP_ZMIN // #define ENDSTOPPULLUP_ZMIN
#endif #endif
// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins. // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
const bool X_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop. const bool X_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Y_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop. const bool Y_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop. const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
#define DISABLE_MAX_ENDSTOPS #define DISABLE_MAX_ENDSTOPS
//#define DISABLE_MIN_ENDSTOPS //#define DISABLE_MIN_ENDSTOPS
@ -319,13 +323,14 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#define DISABLE_E false // For all extruders #define DISABLE_E false // For all extruders
#define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled #define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled
#define INVERT_X_DIR true // for Mendel set to false, for Orca set to true // Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
#define INVERT_Y_DIR true // for Mendel set to true, for Orca set to false #define INVERT_X_DIR true
#define INVERT_Z_DIR true // for Mendel set to false, for Orca set to true #define INVERT_Y_DIR true
#define INVERT_E0_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false #define INVERT_Z_DIR true
#define INVERT_E1_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false #define INVERT_E0_DIR false
#define INVERT_E2_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false #define INVERT_E1_DIR false
#define INVERT_E3_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false #define INVERT_E2_DIR false
#define INVERT_E3_DIR false
// ENDSTOP SETTINGS: // ENDSTOP SETTINGS:
// Sets direction of endstops when homing; 1=MAX, -1=MIN // Sets direction of endstops when homing; 1=MAX, -1=MIN
@ -337,12 +342,12 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below. #define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below.
// Travel limits after homing (units are in mm) // Travel limits after homing (units are in mm)
#define X_MAX_POS 255
#define X_MIN_POS 0 #define X_MIN_POS 0
#define Y_MAX_POS 205
#define Y_MIN_POS 0 #define Y_MIN_POS 0
#define Z_MAX_POS 235
#define Z_MIN_POS 0 #define Z_MIN_POS 0
#define X_MAX_POS 255
#define Y_MAX_POS 205
#define Z_MAX_POS 235
//=========================================================================== //===========================================================================
//============================= Filament Runout Sensor ====================== //============================= Filament Runout Sensor ======================
@ -361,7 +366,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// #define MANUAL_BED_LEVELING // Add display menu option for bed leveling // #define MANUAL_BED_LEVELING // Add display menu option for bed leveling
// #define MESH_BED_LEVELING // Enable mesh bed leveling // #define MESH_BED_LEVELING // Enable mesh bed leveling
#if defined(MESH_BED_LEVELING) #ifdef MANUAL_BED_LEVELING
#define MBL_Z_STEP 0.025
#endif // MANUAL_BED_LEVELING
#ifdef MESH_BED_LEVELING
#define MESH_MIN_X 10 #define MESH_MIN_X 10
#define MESH_MAX_X (X_MAX_POS - MESH_MIN_X) #define MESH_MAX_X (X_MAX_POS - MESH_MIN_X)
#define MESH_MIN_Y 10 #define MESH_MIN_Y 10
@ -380,39 +389,38 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#ifdef ENABLE_AUTO_BED_LEVELING #ifdef ENABLE_AUTO_BED_LEVELING
// There are 2 different ways to pick the X and Y locations to probe: // There are 2 different ways to specify probing locations
//
// - "grid" mode // - "grid" mode
// Probe every point in a rectangular grid // Probe several points in a rectangular grid.
// You must specify the rectangle, and the density of sample points // You specify the rectangle and the density of sample points.
// This mode is preferred because there are more measurements. // This mode is preferred because there are more measurements.
// It used to be called ACCURATE_BED_LEVELING but "grid" is more descriptive //
// - "3-point" mode
// - "3-point" mode // Probe 3 arbitrary points on the bed (that aren't colinear)
// Probe 3 arbitrary points on the bed (that aren't colinear) // You specify the XY coordinates of all 3 points.
// You must specify the X & Y coordinates of all 3 points
// Enable this to sample the bed in a grid (least squares solution)
// Note: this feature generates 10KB extra code size
#define AUTO_BED_LEVELING_GRID #define AUTO_BED_LEVELING_GRID
// with AUTO_BED_LEVELING_GRID, the bed is sampled in a
// AUTO_BED_LEVELING_GRID_POINTSxAUTO_BED_LEVELING_GRID_POINTS grid
// and least squares solution is calculated
// Note: this feature occupies 10'206 byte
#ifdef AUTO_BED_LEVELING_GRID #ifdef AUTO_BED_LEVELING_GRID
#define LEFT_PROBE_BED_POSITION 15 #define LEFT_PROBE_BED_POSITION 15
#define RIGHT_PROBE_BED_POSITION 170 #define RIGHT_PROBE_BED_POSITION 170
#define BACK_PROBE_BED_POSITION 180
#define FRONT_PROBE_BED_POSITION 20 #define FRONT_PROBE_BED_POSITION 20
#define BACK_PROBE_BED_POSITION 180
// set the number of grid points per dimension #define MIN_PROBE_EDGE 10 // The probe square sides can be no smaller than this
// I wouldn't see a reason to go above 3 (=9 probing points on the bed)
#define AUTO_BED_LEVELING_GRID_POINTS 2
// Set the number of grid points per dimension
// You probably don't need more than 3 (squared=9)
#define AUTO_BED_LEVELING_GRID_POINTS 2
#else // not AUTO_BED_LEVELING_GRID #else // !AUTO_BED_LEVELING_GRID
// with no grid, just probe 3 arbitrary points. A simple cross-product
// is used to esimate the plane of the print bed
// Arbitrary points to probe. A simple cross-product
// is used to estimate the plane of the bed.
#define ABL_PROBE_PT_1_X 15 #define ABL_PROBE_PT_1_X 15
#define ABL_PROBE_PT_1_Y 180 #define ABL_PROBE_PT_1_Y 180
#define ABL_PROBE_PT_2_X 15 #define ABL_PROBE_PT_2_X 15
@ -422,12 +430,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#endif // AUTO_BED_LEVELING_GRID #endif // AUTO_BED_LEVELING_GRID
// Offsets to the probe relative to the extruder tip (Hotend - Probe)
// these are the offsets to the probe relative to the extruder tip (Hotend - Probe)
// X and Y offsets must be integers // X and Y offsets must be integers
#define X_PROBE_OFFSET_FROM_EXTRUDER -25 #define X_PROBE_OFFSET_FROM_EXTRUDER -25 // Probe on: -left +right
#define Y_PROBE_OFFSET_FROM_EXTRUDER -29 #define Y_PROBE_OFFSET_FROM_EXTRUDER -29 // Probe on: -front +behind
#define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35 #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35 // -below (always!)
#define Z_RAISE_BEFORE_HOMING 4 // (in mm) Raise Z before homing (G28) for Probe Clearance. #define Z_RAISE_BEFORE_HOMING 4 // (in mm) Raise Z before homing (G28) for Probe Clearance.
// Be sure you have this distance over your Z_MAX_POS in case // Be sure you have this distance over your Z_MAX_POS in case
@ -436,6 +443,10 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#define Z_RAISE_BEFORE_PROBING 15 //How much the extruder will be raised before traveling to the first probing point. #define Z_RAISE_BEFORE_PROBING 15 //How much the extruder will be raised before traveling to the first probing point.
#define Z_RAISE_BETWEEN_PROBINGS 5 //How much the extruder will be raised when traveling from between next probing points #define Z_RAISE_BETWEEN_PROBINGS 5 //How much the extruder will be raised when traveling from between next probing points
#define Z_RAISE_AFTER_PROBING 15 //How much the extruder will be raised after the last probing point.
// #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.
//Useful to retract a deployable probe.
//#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell //#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell
//#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. //#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.
@ -464,6 +475,20 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#endif #endif
// Support for a dedicated Z PROBE endstop separate from the Z MIN endstop.
// If you would like to use both a Z PROBE and a Z MIN endstop together or just a Z PROBE with a custom pin, uncomment #define Z_PROBE_ENDSTOP and read the instructions below.
// If you want to still use the Z min endstop for homing, disable Z_SAFE_HOMING above. Eg; to park the head outside the bed area when homing with G28.
// WARNING: The Z MIN endstop will need to set properly as it would without a Z PROBE to prevent head crashes and premature stopping during a print.
// To use a separate Z PROBE endstop, you must have a Z_PROBE_PIN defined in the pins.h file for your control board.
// If you are using a servo based Z PROBE, you will need to enable NUM_SERVOS, SERVO_ENDSTOPS and SERVO_ENDSTOPS_ANGLES in the R/C Servo below.
// RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin in the Aux 4 section of the RAMPS board. Use 5V for powered sensors, otherwise connect to ground and D32
// for normally closed configuration and 5V and D32 for normally open configurations. Normally closed configuration is advised and assumed.
// The D32 pin in Aux 4 on RAMPS maps to the Arduino D32 pin. Z_PROBE_PIN is setting the pin to use on the Arduino. Since the D32 pin on the RAMPS maps to D32 on Arduino, this works.
// D32 is currently selected in the RAMPS 1.3/1.4 pin file. All other boards will need changes to the respective pins_XXXXX.h file.
// WARNING: Setting the wrong pin may have unexpected and potentially disastrous outcomes. Use with caution and do your homework.
//#define Z_PROBE_ENDSTOP
#endif // ENABLE_AUTO_BED_LEVELING #endif // ENABLE_AUTO_BED_LEVELING
@ -471,15 +496,19 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
//#define MANUAL_HOME_POSITIONS // If defined, MANUAL_*_HOME_POS below will be used //#define MANUAL_HOME_POSITIONS // If defined, MANUAL_*_HOME_POS below will be used
//#define BED_CENTER_AT_0_0 // If defined, the center of the bed is at (X=0, Y=0) //#define BED_CENTER_AT_0_0 // If defined, the center of the bed is at (X=0, Y=0)
//Manual homing switch locations: // Manual homing switch locations:
// For deltabots this means top and center of the Cartesian print volume. // For deltabots this means top and center of the Cartesian print volume.
#define MANUAL_X_HOME_POS 0 #ifdef MANUAL_HOME_POSITIONS
#define MANUAL_Y_HOME_POS 0 #define MANUAL_X_HOME_POS 0
#define MANUAL_Z_HOME_POS 0 #define MANUAL_Y_HOME_POS 0
//#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing. #define MANUAL_Z_HOME_POS 0
//#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing.
#endif
/**
* MOVEMENT SETTINGS
*/
//// MOVEMENT SETTINGS
#define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
#define HOMING_FEEDRATE {50*60, 50*60, 4*60, 0} // set the homing speeds (mm/min) #define HOMING_FEEDRATE {50*60, 50*60, 4*60, 0} // set the homing speeds (mm/min)
// default settings // default settings
@ -512,9 +541,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// Custom M code points // Custom M code points
#define CUSTOM_M_CODES #define CUSTOM_M_CODES
#ifdef CUSTOM_M_CODES #ifdef CUSTOM_M_CODES
#ifdef ENABLE_AUTO_BED_LEVELING
#define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851 #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
#define Z_PROBE_OFFSET_RANGE_MIN -15 #define Z_PROBE_OFFSET_RANGE_MIN -20
#define Z_PROBE_OFFSET_RANGE_MAX -5 #define Z_PROBE_OFFSET_RANGE_MAX 20
#endif
#endif #endif
@ -525,9 +556,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. // M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
//define this to enable EEPROM support //define this to enable EEPROM support
//#define EEPROM_SETTINGS //#define EEPROM_SETTINGS
//to disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
// please keep turned on if you can. #ifdef EEPROM_SETTINGS
//#define EEPROM_CHITCHAT // To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
#define EEPROM_CHITCHAT // please keep turned on if you can.
#endif
// Preheat Constants // Preheat Constants
#define PLA_PREHEAT_HOTEND_TEMP 180 #define PLA_PREHEAT_HOTEND_TEMP 180
@ -541,13 +574,16 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
//==============================LCD and SD support============================= //==============================LCD and SD support=============================
// Define your display language below. Replace (en) with your language code and uncomment. // Define your display language below. Replace (en) with your language code and uncomment.
// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu // en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
// See also language.h // See also language.h
//#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
// Character based displays can have different extended charsets. // Choose ONE of these 3 charsets. This has to match your hardware. Ignored for full graphic display.
//#define DISPLAY_CHARSET_HD44780_JAPAN // "ääööüüß23°" // 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.
//#define DISPLAY_CHARSET_HD44780_WESTERN // "ÄäÖöÜüß²³°" if you see a '~' instead of a 'arrow_right' at the right of submenuitems - this is the right one. // See also documentation/LCDLanguageFont.md
#define DISPLAY_CHARSET_HD44780_JAPAN // this is the most common hardware
//#define DISPLAY_CHARSET_HD44780_WESTERN
//#define DISPLAY_CHARSET_HD44780_CYRILLIC
//#define ULTRA_LCD //general LCD support, also 16x2 //#define ULTRA_LCD //general LCD support, also 16x2
//#define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family) //#define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
@ -560,6 +596,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
//#define ULTIPANEL //the UltiPanel as on Thingiverse //#define ULTIPANEL //the UltiPanel as on Thingiverse
//#define LCD_FEEDBACK_FREQUENCY_HZ 1000 // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click //#define LCD_FEEDBACK_FREQUENCY_HZ 1000 // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
// 0 to disable buzzer feedback
// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3) // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
// http://reprap.org/wiki/PanelOne // http://reprap.org/wiki/PanelOne
@ -621,11 +658,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino // Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
#define FAST_PWM_FAN #define FAST_PWM_FAN
// Temperature status LEDs that display the hotend and bet temperature.
// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
// Otherwise the RED led is on. There is 1C hysteresis.
//#define TEMP_STAT_LEDS
// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
// which is not as annoying as with the hardware PWM. On the other hand, if this frequency // which is not as annoying as with the hardware PWM. On the other hand, if this frequency
// is too low, you should also increment SOFT_PWM_SCALE. // is too low, you should also increment SOFT_PWM_SCALE.
@ -637,6 +669,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// at zero value, there are 128 effective control positions. // at zero value, there are 128 effective control positions.
#define SOFT_PWM_SCALE 0 #define SOFT_PWM_SCALE 0
// Temperature status LEDs that display the hotend and bet temperature.
// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
// Otherwise the RED led is on. There is 1C hysteresis.
//#define TEMP_STAT_LEDS
// M240 Triggers a camera by emulating a Canon RC-1 Remote // M240 Triggers a camera by emulating a Canon RC-1 Remote
// Data from: http://www.doc-diy.net/photo/rc-1_hacked/ // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
// #define PHOTOGRAPH_PIN 23 // #define PHOTOGRAPH_PIN 23
@ -667,7 +704,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// Servo Endstops // Servo Endstops
// //
// This allows for servo actuated endstops, primary usage is for the Z Axis to eliminate calibration or bed height changes. // This allows for servo actuated endstops, primary usage is for the Z Axis to eliminate calibration or bed height changes.
// Use M206 command to correct for switch height offset to actual nozzle height. Store that setting with M500. // Use M851 to set the z-probe vertical offset from the nozzle. Store that setting with M500.
// //
//#define SERVO_ENDSTOPS {-1, -1, 0} // Servo index for X, Y, Z. Disable with -1 //#define SERVO_ENDSTOPS {-1, -1, 0} // Servo index for X, Y, Z. Disable with -1
//#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles //#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles

@ -1,4 +1,4 @@
#ifndef CONFIGURATION_H #ifndef CONFIGURATION_H
#define CONFIGURATION_H #define CONFIGURATION_H
#include "boards.h" #include "boards.h"
@ -38,7 +38,7 @@ Here are some standard links for getting your machine calibrated:
// User-specified version info of this build to display in [Pronterface, etc] terminal window during // User-specified version info of this build to display in [Pronterface, etc] terminal window during
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
// build by the user have been successfully uploaded into firmware. // build by the user have been successfully uploaded into firmware.
#define STRING_VERSION "1.0.2" #define STRING_VERSION "1.0.3 dev"
#define STRING_URL "reprap.org" #define STRING_URL "reprap.org"
#define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
@ -62,8 +62,9 @@ Here are some standard links for getting your machine calibrated:
#define MOTHERBOARD BOARD_FELIX2 #define MOTHERBOARD BOARD_FELIX2
#endif #endif
// Define this to set a custom name for your generic Mendel, // Optional custom name for your RepStrap or other custom machine
// #define CUSTOM_MENDEL_NAME "This Mendel" // Displayed in the LCD "Ready" message
#define CUSTOM_MACHINE_NAME "Felix Dual"
// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines) // Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines)
// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) // You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4)
@ -122,7 +123,7 @@ Here are some standard links for getting your machine calibrated:
// Use it for Testing or Development purposes. NEVER for production machine. // Use it for Testing or Development purposes. NEVER for production machine.
// #define DUMMY_THERMISTOR_998_VALUE 25 // #define DUMMY_THERMISTOR_998_VALUE 25
// #define DUMMY_THERMISTOR_999_VALUE 100 // #define DUMMY_THERMISTOR_999_VALUE 100
// :{ '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" }
#define TEMP_SENSOR_0 1 #define TEMP_SENSOR_0 1
#define TEMP_SENSOR_1 1 #define TEMP_SENSOR_1 1
#define TEMP_SENSOR_2 0 #define TEMP_SENSOR_2 0
@ -184,7 +185,6 @@ Here are some standard links for getting your machine calibrated:
// is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
#define PID_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term #define PID_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term
#define K1 0.95 //smoothing factor within the PID #define K1 0.95 //smoothing factor within the PID
#define PID_dT ((OVERSAMPLENR * 10.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine
// Felix 2.0+ electronics with v4 Hotend // Felix 2.0+ electronics with v4 Hotend
#define DEFAULT_Kp 12 #define DEFAULT_Kp 12
@ -199,7 +199,7 @@ Here are some standard links for getting your machine calibrated:
// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis // Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
// //
// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. // Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder.
// If your PID_dT above is the default, and correct for your hardware/configuration, that means 7.689Hz, // If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz,
// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. // which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. // This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
// If your configuration is significantly different than this and you don't understand the issues involved, you probably // If your configuration is significantly different than this and you don't understand the issues involved, you probably
@ -265,24 +265,27 @@ your extruder heater takes 2 minutes to hit the target on heating.
// uncomment the 2 defines below: // uncomment the 2 defines below:
// Parameters for all extruder heaters // Parameters for all extruder heaters
//#define THERMAL_RUNAWAY_PROTECTION_PERIOD 60 //in seconds //#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds
//#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 5 // in degree Celsius //#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius
// If you want to enable this feature for your bed heater, // If you want to enable this feature for your bed heater,
// uncomment the 2 defines below: // uncomment the 2 defines below:
// Parameters for the bed heater // Parameters for the bed heater
//#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 30 //in seconds //#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds
//#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 5// in degree Celsius //#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius
//=========================================================================== //===========================================================================
//============================= Mechanical Settings ========================= //============================= Mechanical Settings =========================
//=========================================================================== //===========================================================================
// Uncomment the following line to enable CoreXY kinematics // Uncomment this option to enable CoreXY kinematics
// #define COREXY // #define COREXY
// Enable this option for Toshiba steppers
// #define CONFIG_STEPPERS_TOSHIBA
// coarse Endstop Settings // coarse Endstop Settings
#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
@ -296,13 +299,14 @@ your extruder heater takes 2 minutes to hit the target on heating.
// #define ENDSTOPPULLUP_ZMIN // #define ENDSTOPPULLUP_ZMIN
#endif #endif
// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins. // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
const bool X_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop. const bool X_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Y_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop. const bool Y_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop. const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
#define DISABLE_MAX_ENDSTOPS #define DISABLE_MAX_ENDSTOPS
//#define DISABLE_MIN_ENDSTOPS //#define DISABLE_MIN_ENDSTOPS
@ -319,13 +323,14 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#define DISABLE_E false // For all extruders #define DISABLE_E false // For all extruders
#define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled #define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled
#define INVERT_X_DIR true // for Mendel set to false, for Orca set to true // Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
#define INVERT_Y_DIR true // for Mendel set to true, for Orca set to false #define INVERT_X_DIR true
#define INVERT_Z_DIR true // for Mendel set to false, for Orca set to true #define INVERT_Y_DIR true
#define INVERT_E0_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false #define INVERT_Z_DIR true
#define INVERT_E1_DIR true // for direct drive extruder v9 set to true, for geared extruder set to false #define INVERT_E0_DIR false
#define INVERT_E2_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false #define INVERT_E1_DIR true
#define INVERT_E3_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false #define INVERT_E2_DIR false
#define INVERT_E3_DIR false
// ENDSTOP SETTINGS: // ENDSTOP SETTINGS:
// Sets direction of endstops when homing; 1=MAX, -1=MIN // Sets direction of endstops when homing; 1=MAX, -1=MIN
@ -337,12 +342,12 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below. #define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below.
// Travel limits after homing (units are in mm) // Travel limits after homing (units are in mm)
#define X_MAX_POS 255
#define X_MIN_POS 0 #define X_MIN_POS 0
#define Y_MAX_POS 205
#define Y_MIN_POS 0 #define Y_MIN_POS 0
#define Z_MAX_POS 235
#define Z_MIN_POS 0 #define Z_MIN_POS 0
#define X_MAX_POS 255
#define Y_MAX_POS 205
#define Z_MAX_POS 235
//=========================================================================== //===========================================================================
//============================= Filament Runout Sensor ====================== //============================= Filament Runout Sensor ======================
@ -361,7 +366,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// #define MANUAL_BED_LEVELING // Add display menu option for bed leveling // #define MANUAL_BED_LEVELING // Add display menu option for bed leveling
// #define MESH_BED_LEVELING // Enable mesh bed leveling // #define MESH_BED_LEVELING // Enable mesh bed leveling
#if defined(MESH_BED_LEVELING) #ifdef MESH_BED_LEVELING
#define MESH_MIN_X 10 #define MESH_MIN_X 10
#define MESH_MAX_X (X_MAX_POS - MESH_MIN_X) #define MESH_MAX_X (X_MAX_POS - MESH_MIN_X)
#define MESH_MIN_Y 10 #define MESH_MIN_Y 10
@ -380,39 +385,38 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#ifdef ENABLE_AUTO_BED_LEVELING #ifdef ENABLE_AUTO_BED_LEVELING
// There are 2 different ways to pick the X and Y locations to probe: // There are 2 different ways to specify probing locations
//
// - "grid" mode // - "grid" mode
// Probe every point in a rectangular grid // Probe several points in a rectangular grid.
// You must specify the rectangle, and the density of sample points // You specify the rectangle and the density of sample points.
// This mode is preferred because there are more measurements. // This mode is preferred because there are more measurements.
// It used to be called ACCURATE_BED_LEVELING but "grid" is more descriptive //
// - "3-point" mode
// - "3-point" mode // Probe 3 arbitrary points on the bed (that aren't colinear)
// Probe 3 arbitrary points on the bed (that aren't colinear) // You specify the XY coordinates of all 3 points.
// You must specify the X & Y coordinates of all 3 points
// Enable this to sample the bed in a grid (least squares solution)
// Note: this feature generates 10KB extra code size
#define AUTO_BED_LEVELING_GRID #define AUTO_BED_LEVELING_GRID
// with AUTO_BED_LEVELING_GRID, the bed is sampled in a
// AUTO_BED_LEVELING_GRID_POINTSxAUTO_BED_LEVELING_GRID_POINTS grid
// and least squares solution is calculated
// Note: this feature occupies 10'206 byte
#ifdef AUTO_BED_LEVELING_GRID #ifdef AUTO_BED_LEVELING_GRID
#define LEFT_PROBE_BED_POSITION 15 #define LEFT_PROBE_BED_POSITION 15
#define RIGHT_PROBE_BED_POSITION 170 #define RIGHT_PROBE_BED_POSITION 170
#define BACK_PROBE_BED_POSITION 180
#define FRONT_PROBE_BED_POSITION 20 #define FRONT_PROBE_BED_POSITION 20
#define BACK_PROBE_BED_POSITION 180
// set the number of grid points per dimension #define MIN_PROBE_EDGE 10 // The probe square sides can be no smaller than this
// I wouldn't see a reason to go above 3 (=9 probing points on the bed)
#define AUTO_BED_LEVELING_GRID_POINTS 2
// Set the number of grid points per dimension
// You probably don't need more than 3 (squared=9)
#define AUTO_BED_LEVELING_GRID_POINTS 2
#else // not AUTO_BED_LEVELING_GRID #else // !AUTO_BED_LEVELING_GRID
// with no grid, just probe 3 arbitrary points. A simple cross-product
// is used to esimate the plane of the print bed
// Arbitrary points to probe. A simple cross-product
// is used to estimate the plane of the bed.
#define ABL_PROBE_PT_1_X 15 #define ABL_PROBE_PT_1_X 15
#define ABL_PROBE_PT_1_Y 180 #define ABL_PROBE_PT_1_Y 180
#define ABL_PROBE_PT_2_X 15 #define ABL_PROBE_PT_2_X 15
@ -422,12 +426,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#endif // AUTO_BED_LEVELING_GRID #endif // AUTO_BED_LEVELING_GRID
// Offsets to the probe relative to the extruder tip (Hotend - Probe)
// these are the offsets to the probe relative to the extruder tip (Hotend - Probe)
// X and Y offsets must be integers // X and Y offsets must be integers
#define X_PROBE_OFFSET_FROM_EXTRUDER -25 #define X_PROBE_OFFSET_FROM_EXTRUDER -25 // Probe on: -left +right
#define Y_PROBE_OFFSET_FROM_EXTRUDER -29 #define Y_PROBE_OFFSET_FROM_EXTRUDER -29 // Probe on: -front +behind
#define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35 #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35 // -below (always!)
#define Z_RAISE_BEFORE_HOMING 4 // (in mm) Raise Z before homing (G28) for Probe Clearance. #define Z_RAISE_BEFORE_HOMING 4 // (in mm) Raise Z before homing (G28) for Probe Clearance.
// Be sure you have this distance over your Z_MAX_POS in case // Be sure you have this distance over your Z_MAX_POS in case
@ -436,6 +439,10 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#define Z_RAISE_BEFORE_PROBING 15 //How much the extruder will be raised before traveling to the first probing point. #define Z_RAISE_BEFORE_PROBING 15 //How much the extruder will be raised before traveling to the first probing point.
#define Z_RAISE_BETWEEN_PROBINGS 5 //How much the extruder will be raised when traveling from between next probing points #define Z_RAISE_BETWEEN_PROBINGS 5 //How much the extruder will be raised when traveling from between next probing points
#define Z_RAISE_AFTER_PROBING 15 //How much the extruder will be raised after the last probing point.
// #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.
//Useful to retract a deployable probe.
//#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell //#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell
//#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. //#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.
@ -464,6 +471,20 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#endif #endif
// Support for a dedicated Z PROBE endstop separate from the Z MIN endstop.
// If you would like to use both a Z PROBE and a Z MIN endstop together or just a Z PROBE with a custom pin, uncomment #define Z_PROBE_ENDSTOP and read the instructions below.
// If you want to still use the Z min endstop for homing, disable Z_SAFE_HOMING above. Eg; to park the head outside the bed area when homing with G28.
// WARNING: The Z MIN endstop will need to set properly as it would without a Z PROBE to prevent head crashes and premature stopping during a print.
// To use a separate Z PROBE endstop, you must have a Z_PROBE_PIN defined in the pins.h file for your control board.
// If you are using a servo based Z PROBE, you will need to enable NUM_SERVOS, SERVO_ENDSTOPS and SERVO_ENDSTOPS_ANGLES in the R/C Servo below.
// RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin in the Aux 4 section of the RAMPS board. Use 5V for powered sensors, otherwise connect to ground and D32
// for normally closed configuration and 5V and D32 for normally open configurations. Normally closed configuration is advised and assumed.
// The D32 pin in Aux 4 on RAMPS maps to the Arduino D32 pin. Z_PROBE_PIN is setting the pin to use on the Arduino. Since the D32 pin on the RAMPS maps to D32 on Arduino, this works.
// D32 is currently selected in the RAMPS 1.3/1.4 pin file. All other boards will need changes to the respective pins_XXXXX.h file.
// WARNING: Setting the wrong pin may have unexpected and potentially disastrous outcomes. Use with caution and do your homework.
//#define Z_PROBE_ENDSTOP
#endif // ENABLE_AUTO_BED_LEVELING #endif // ENABLE_AUTO_BED_LEVELING
@ -471,15 +492,19 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
//#define MANUAL_HOME_POSITIONS // If defined, MANUAL_*_HOME_POS below will be used //#define MANUAL_HOME_POSITIONS // If defined, MANUAL_*_HOME_POS below will be used
//#define BED_CENTER_AT_0_0 // If defined, the center of the bed is at (X=0, Y=0) //#define BED_CENTER_AT_0_0 // If defined, the center of the bed is at (X=0, Y=0)
//Manual homing switch locations: // Manual homing switch locations:
// For deltabots this means top and center of the Cartesian print volume. // For deltabots this means top and center of the Cartesian print volume.
#define MANUAL_X_HOME_POS 0 #ifdef MANUAL_HOME_POSITIONS
#define MANUAL_Y_HOME_POS 0 #define MANUAL_X_HOME_POS 0
#define MANUAL_Z_HOME_POS 0 #define MANUAL_Y_HOME_POS 0
//#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing. #define MANUAL_Z_HOME_POS 0
//#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing.
#endif
/**
* MOVEMENT SETTINGS
*/
//// MOVEMENT SETTINGS
#define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
#define HOMING_FEEDRATE {50*60, 50*60, 4*60, 0} // set the homing speeds (mm/min) #define HOMING_FEEDRATE {50*60, 50*60, 4*60, 0} // set the homing speeds (mm/min)
// default settings // default settings
@ -512,9 +537,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// Custom M code points // Custom M code points
#define CUSTOM_M_CODES #define CUSTOM_M_CODES
#ifdef CUSTOM_M_CODES #ifdef CUSTOM_M_CODES
#ifdef ENABLE_AUTO_BED_LEVELING
#define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851 #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
#define Z_PROBE_OFFSET_RANGE_MIN -15 #define Z_PROBE_OFFSET_RANGE_MIN -20
#define Z_PROBE_OFFSET_RANGE_MAX -5 #define Z_PROBE_OFFSET_RANGE_MAX 20
#endif
#endif #endif
@ -525,9 +552,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. // M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
//define this to enable EEPROM support //define this to enable EEPROM support
//#define EEPROM_SETTINGS //#define EEPROM_SETTINGS
//to disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
// please keep turned on if you can. #ifdef EEPROM_SETTINGS
//#define EEPROM_CHITCHAT // To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
#define EEPROM_CHITCHAT // please keep turned on if you can.
#endif
// Preheat Constants // Preheat Constants
#define PLA_PREHEAT_HOTEND_TEMP 180 #define PLA_PREHEAT_HOTEND_TEMP 180
@ -541,13 +570,16 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
//==============================LCD and SD support============================= //==============================LCD and SD support=============================
// Define your display language below. Replace (en) with your language code and uncomment. // Define your display language below. Replace (en) with your language code and uncomment.
// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu // en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
// See also language.h // See also language.h
//#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
// Character based displays can have different extended charsets. // Choose ONE of these 3 charsets. This has to match your hardware. Ignored for full graphic display.
//#define DISPLAY_CHARSET_HD44780_JAPAN // "ääööüüß23°" // 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.
//#define DISPLAY_CHARSET_HD44780_WESTERN // "ÄäÖöÜüß²³°" if you see a '~' instead of a 'arrow_right' at the right of submenuitems - this is the right one. // See also documentation/LCDLanguageFont.md
#define DISPLAY_CHARSET_HD44780_JAPAN // this is the most common hardware
//#define DISPLAY_CHARSET_HD44780_WESTERN
//#define DISPLAY_CHARSET_HD44780_CYRILLIC
//#define ULTRA_LCD //general LCD support, also 16x2 //#define ULTRA_LCD //general LCD support, also 16x2
//#define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family) //#define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
@ -560,6 +592,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
//#define ULTIPANEL //the UltiPanel as on Thingiverse //#define ULTIPANEL //the UltiPanel as on Thingiverse
//#define LCD_FEEDBACK_FREQUENCY_HZ 1000 // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click //#define LCD_FEEDBACK_FREQUENCY_HZ 1000 // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
// 0 to disable buzzer feedback
// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3) // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
// http://reprap.org/wiki/PanelOne // http://reprap.org/wiki/PanelOne
@ -618,15 +651,9 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
//#define SAV_3DLCD //#define SAV_3DLCD
// Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino // Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
#define FAST_PWM_FAN #define FAST_PWM_FAN
// Temperature status LEDs that display the hotend and bet temperature.
// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
// Otherwise the RED led is on. There is 1C hysteresis.
//#define TEMP_STAT_LEDS
// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
// which is not as annoying as with the hardware PWM. On the other hand, if this frequency // which is not as annoying as with the hardware PWM. On the other hand, if this frequency
// is too low, you should also increment SOFT_PWM_SCALE. // is too low, you should also increment SOFT_PWM_SCALE.
@ -638,6 +665,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// at zero value, there are 128 effective control positions. // at zero value, there are 128 effective control positions.
#define SOFT_PWM_SCALE 0 #define SOFT_PWM_SCALE 0
// Temperature status LEDs that display the hotend and bet temperature.
// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
// Otherwise the RED led is on. There is 1C hysteresis.
//#define TEMP_STAT_LEDS
// M240 Triggers a camera by emulating a Canon RC-1 Remote // M240 Triggers a camera by emulating a Canon RC-1 Remote
// Data from: http://www.doc-diy.net/photo/rc-1_hacked/ // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
// #define PHOTOGRAPH_PIN 23 // #define PHOTOGRAPH_PIN 23
@ -668,7 +700,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// Servo Endstops // Servo Endstops
// //
// This allows for servo actuated endstops, primary usage is for the Z Axis to eliminate calibration or bed height changes. // This allows for servo actuated endstops, primary usage is for the Z Axis to eliminate calibration or bed height changes.
// Use M206 command to correct for switch height offset to actual nozzle height. Store that setting with M500. // Use M851 to set the z-probe vertical offset from the nozzle. Store that setting with M500.
// //
//#define SERVO_ENDSTOPS {-1, -1, 0} // Servo index for X, Y, Z. Disable with -1 //#define SERVO_ENDSTOPS {-1, -1, 0} // Servo index for X, Y, Z. Disable with -1
//#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles //#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles

@ -3,6 +3,8 @@
#include "Conditionals.h" #include "Conditionals.h"
// @section temperature
//=========================================================================== //===========================================================================
//=============================Thermal Settings ============================ //=============================Thermal Settings ============================
//=========================================================================== //===========================================================================
@ -46,6 +48,8 @@
//The M105 command return, besides traditional information, the ADC value read from temperature sensors. //The M105 command return, besides traditional information, the ADC value read from temperature sensors.
//#define SHOW_TEMP_ADC_VALUES //#define SHOW_TEMP_ADC_VALUES
// @section extruder
// extruder run-out prevention. // extruder run-out prevention.
//if the machine is idle, and the temperature over MINTEMP, every couple of SECONDS some filament is extruded //if the machine is idle, and the temperature over MINTEMP, every couple of SECONDS some filament is extruded
//#define EXTRUDER_RUNOUT_PREVENT //#define EXTRUDER_RUNOUT_PREVENT
@ -55,6 +59,8 @@
#define EXTRUDER_RUNOUT_SPEED 1500. //extrusion speed #define EXTRUDER_RUNOUT_SPEED 1500. //extrusion speed
#define EXTRUDER_RUNOUT_EXTRUDE 100 #define EXTRUDER_RUNOUT_EXTRUDE 100
// @section temperature
//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements. //These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET" //The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
#define TEMP_SENSOR_AD595_OFFSET 0.0 #define TEMP_SENSOR_AD595_OFFSET 0.0
@ -72,6 +78,8 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu) // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100 //#define FAN_KICKSTART_TIME 100
// @section extruder
// Extruder cooling fans // Extruder cooling fans
// Configure fan pin outputs to automatically turn on/off when the associated // Configure fan pin outputs to automatically turn on/off when the associated
// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE. // extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE.
@ -89,8 +97,12 @@
//=============================Mechanical Settings=========================== //=============================Mechanical Settings===========================
//=========================================================================== //===========================================================================
// @section homing
#define ENDSTOPS_ONLY_FOR_HOMING // If defined the endstops will only be used for homing #define ENDSTOPS_ONLY_FOR_HOMING // If defined the endstops will only be used for homing
// @section extras
//#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats. //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
// A single Z stepper driver is usually used to drive 2 stepper motors. // A single Z stepper driver is usually used to drive 2 stepper motors.
@ -100,6 +112,30 @@
// On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder. // On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder.
//#define Z_DUAL_STEPPER_DRIVERS //#define Z_DUAL_STEPPER_DRIVERS
#ifdef Z_DUAL_STEPPER_DRIVERS
// 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.
// That way the machine is capable to align the bed during home, since both Z steppers are homed.
// There is also an implementation of M666 (software endstops adjustment) to this feature.
// After Z homing, this adjustment is applied to just one of the steppers in order to align the bed.
// 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.
// 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.
// Play a little bit with small adjustments (0.5mm) and check the behaviour.
// The M119 (endstops report) will start reporting the Z2 Endstop as well.
#define Z_DUAL_ENDSTOPS
#ifdef Z_DUAL_ENDSTOPS
#define Z2_STEP_PIN E2_STEP_PIN // Stepper to be used to Z2 axis.
#define Z2_DIR_PIN E2_DIR_PIN
#define Z2_ENABLE_PIN E2_ENABLE_PIN
#define Z2_MAX_PIN 36 //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36)
const bool Z2_MAX_ENDSTOP_INVERTING = false;
#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.
#endif
#endif // Z_DUAL_STEPPER_DRIVERS
// Same again but for Y Axis. // Same again but for Y Axis.
//#define Y_DUAL_STEPPER_DRIVERS //#define Y_DUAL_STEPPER_DRIVERS
@ -112,53 +148,59 @@
// allowing faster printing speeds. // allowing faster printing speeds.
//#define DUAL_X_CARRIAGE //#define DUAL_X_CARRIAGE
#ifdef DUAL_X_CARRIAGE #ifdef DUAL_X_CARRIAGE
// Configuration for second X-carriage // Configuration for second X-carriage
// Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop;
// the second x-carriage always homes to the maximum endstop. // the second x-carriage always homes to the maximum endstop.
#define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
#define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed
#define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position
#define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position #define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position
// However: In this mode the EXTRUDER_OFFSET_X value for the second extruder provides a software // However: In this mode the EXTRUDER_OFFSET_X value for the second extruder provides a software
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command). // without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer. // Remember: you should set the second extruder x-offset to 0 in your slicer.
// Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h) // Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h)
#define X2_ENABLE_PIN 29 #define X2_ENABLE_PIN 29
#define X2_STEP_PIN 25 #define X2_STEP_PIN 25
#define X2_DIR_PIN 23 #define X2_DIR_PIN 23
// There are a few selectable movement modes for dual x-carriages using M605 S<mode> // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
// Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results // Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
// as long as it supports dual x-carriages. (M605 S0) // as long as it supports dual x-carriages. (M605 S0)
// Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so // Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
// that additional slicer support is not required. (M605 S1) // that additional slicer support is not required. (M605 S1)
// Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all // Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
// actions of the first x-carriage. This allows the printer to print 2 arbitrary items at // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
// once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm]) // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
// This is the default power-up mode which can be later using M605. // This is the default power-up mode which can be later using M605.
#define DEFAULT_DUAL_X_CARRIAGE_MODE 0 #define DEFAULT_DUAL_X_CARRIAGE_MODE 0
// Default settings in "Auto-park Mode" // Default settings in "Auto-park Mode"
#define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder #define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder
#define TOOLCHANGE_UNPARK_ZLIFT 1 // the distance to raise Z axis when unparking an extruder #define TOOLCHANGE_UNPARK_ZLIFT 1 // the distance to raise Z axis when unparking an extruder
// Default x offset in duplication mode (typically set to half print bed width) // Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100 #define DEFAULT_DUPLICATION_X_OFFSET 100
#endif //DUAL_X_CARRIAGE #endif //DUAL_X_CARRIAGE
// @section homing
//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again: //homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
#define X_HOME_RETRACT_MM 5 #define X_HOME_BUMP_MM 5
#define Y_HOME_RETRACT_MM 5 #define Y_HOME_BUMP_MM 5
#define Z_HOME_RETRACT_MM 3 #define Z_HOME_BUMP_MM 3
#define HOMING_BUMP_DIVISOR {10, 10, 20} // Re-Bump Speed Divisor (Divides the Homing Feedrate) #define HOMING_BUMP_DIVISOR {2, 2, 4} // Re-Bump Speed Divisor (Divides the Homing Feedrate)
//#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially. //#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
// @section machine
#define AXIS_RELATIVE_MODES {false, false, false, false} #define AXIS_RELATIVE_MODES {false, false, false, false}
// @section machine
//By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. //By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step.
#define INVERT_X_STEP_PIN false #define INVERT_X_STEP_PIN false
#define INVERT_Y_STEP_PIN false #define INVERT_Y_STEP_PIN false
@ -171,11 +213,15 @@
#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
#define DEFAULT_MINTRAVELFEEDRATE 0.0 #define DEFAULT_MINTRAVELFEEDRATE 0.0
// @section lcd
#ifdef ULTIPANEL #ifdef ULTIPANEL
#define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel
#define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder
#endif #endif
// @section extras
// minimum time in microseconds that a movement needs to take if the buffer is emptied. // minimum time in microseconds that a movement needs to take if the buffer is emptied.
#define DEFAULT_MINSEGMENTTIME 20000 #define DEFAULT_MINSEGMENTTIME 20000
@ -210,25 +256,35 @@
//=========================================================================== //===========================================================================
#define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly #define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
#define ENCODER_10X_STEPS_PER_SEC 75 // If the encoder steps per sec exceed this value, multiple the steps moved by ten to quickly advance the value #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
#define ENCODER_100X_STEPS_PER_SEC 160 // If the encoder steps per sec exceed this value, multiple the steps moved by 100 to really quickly advance the value #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
//#define ENCODER_RATE_MULTIPLIER_DEBUG // If defined, output the encoder steps per second value //#define ENCODER_RATE_MULTIPLIER_DEBUG // If defined, output the encoder steps per second value
//#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/ //#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/
#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
#define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? // @section lcd
#define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
#ifdef SDSUPPORT
#define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. // If you are using a RAMPS board or cheap E-bay purchased boards that do not detect when an SD card is inserted
// 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. // You can get round this by connecting a push button or single throw switch to the pin defined as SDCARDCARDDETECT
// using: // in the pins.h file. When using a push button pulling the pin to ground this will need inverted. This setting should
//#define MENU_ADDAUTOSTART // be commented out otherwise
#define SDCARDDETECTINVERTED
// Show a progress bar on HD44780 LCDs for SD printing #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers?
//#define LCD_PROGRESS_BAR #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
#ifdef LCD_PROGRESS_BAR #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order.
// 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.
// using:
//#define MENU_ADDAUTOSTART
// Show a progress bar on HD44780 LCDs for SD printing
//#define LCD_PROGRESS_BAR
#ifdef LCD_PROGRESS_BAR
// Amount of time (ms) to show the bar // Amount of time (ms) to show the bar
#define PROGRESS_BAR_BAR_TIME 2000 #define PROGRESS_BAR_BAR_TIME 2000
// Amount of time (ms) to show the status message // Amount of time (ms) to show the status message
@ -237,7 +293,11 @@
#define PROGRESS_MSG_EXPIRE 0 #define PROGRESS_MSG_EXPIRE 0
// Enable this to show messages for MSG_TIME then hide them // Enable this to show messages for MSG_TIME then hide them
//#define PROGRESS_MSG_ONCE //#define PROGRESS_MSG_ONCE
#endif #endif
#endif // SDSUPPORT
// @section more
// The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation. // The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
//#define USE_WATCHDOG //#define USE_WATCHDOG
@ -252,6 +312,8 @@
// Enable the option to stop SD printing when hitting and endstops, needs to be enabled from the LCD menu when this option is enabled. // Enable the option to stop SD printing when hitting and endstops, needs to be enabled from the LCD menu when this option is enabled.
//#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
// @section lcd
// Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process // Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process
// it can e.g. be used to change z-positions in the print startup phase in real-time // it can e.g. be used to change z-positions in the print startup phase in real-time
// does not respect endstops! // does not respect endstops!
@ -262,6 +324,8 @@
#define BABYSTEP_Z_MULTIPLICATOR 2 //faster z movements #define BABYSTEP_Z_MULTIPLICATOR 2 //faster z movements
#endif #endif
// @section extruder
// extruder advance constant (s2/mm3) // extruder advance constant (s2/mm3)
// //
// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2 // advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
@ -275,7 +339,9 @@
#define EXTRUDER_ADVANCE_K .0 #define EXTRUDER_ADVANCE_K .0
#define D_FILAMENT 2.85 #define D_FILAMENT 2.85
#define STEPS_MM_E 836 #define STEPS_MM_E 836
#endif // ADVANCE #endif
// @section extras
// Arc interpretation settings: // Arc interpretation settings:
#define MM_PER_ARC_SEGMENT 1 #define MM_PER_ARC_SEGMENT 1
@ -283,31 +349,7 @@
const unsigned int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement const unsigned int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement
// If you are using a RAMPS board or cheap E-bay purchased boards that do not detect when an SD card is inserted // @section temperature
// You can get round this by connecting a push button or single throw switch to the pin defined as SDCARDCARDDETECT
// in the pins.h file. When using a push button pulling the pin to ground this will need inverted. This setting should
// be commented out otherwise
#define SDCARDDETECTINVERTED
//#ifdef ULTIPANEL
// #undef SDCARDDETECTINVERTED
//#endif
// Power Signal Control Definitions
// By default use ATX definition
#ifndef POWER_SUPPLY
#define POWER_SUPPLY 1
#endif
// 1 = ATX
#if (POWER_SUPPLY == 1)
#define PS_ON_AWAKE LOW
#define PS_ON_ASLEEP HIGH
#endif
// 2 = X-Box 360 203W
#if (POWER_SUPPLY == 2)
#define PS_ON_AWAKE HIGH
#define PS_ON_ASLEEP LOW
#endif
// Control heater 0 and heater 1 in parallel. // Control heater 0 and heater 1 in parallel.
//#define HEATERS_PARALLEL //#define HEATERS_PARALLEL
@ -316,19 +358,23 @@ const unsigned int dropsegments=5; //everything with less than this number of st
//=============================Buffers ============================ //=============================Buffers ============================
//=========================================================================== //===========================================================================
// @section hidden
// The number of linear motions that can be in the plan at any give time. // The number of linear motions that can be in the plan at any give time.
// 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. // 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.
#if defined SDSUPPORT #ifdef SDSUPPORT
#define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
#else #else
#define BLOCK_BUFFER_SIZE 16 // maximize block buffer #define BLOCK_BUFFER_SIZE 16 // maximize block buffer
#endif #endif
// @section more
//The ASCII buffer for receiving from the serial: //The ASCII buffer for receiving from the serial:
#define MAX_CMD_SIZE 96 #define MAX_CMD_SIZE 96
#define BUFSIZE 4 #define BUFSIZE 4
// @section fwretract
// Firmware based and LCD controlled retract // Firmware based and LCD controlled retract
// M207 and M208 can be used to define parameters for the retraction. // M207 and M208 can be used to define parameters for the retraction.
@ -360,6 +406,143 @@ const unsigned int dropsegments=5; //everything with less than this number of st
#endif #endif
#endif #endif
/******************************************************************************\
* enable this section if you have TMC26X motor drivers.
* you need to import the TMC26XStepper library into the arduino IDE for this
******************************************************************************/
// @section tmc
//#define HAVE_TMCDRIVER
#ifdef HAVE_TMCDRIVER
// #define X_IS_TMC
#define X_MAX_CURRENT 1000 //in mA
#define X_SENSE_RESISTOR 91 //in mOhms
#define X_MICROSTEPS 16 //number of microsteps
// #define X2_IS_TMC
#define X2_MAX_CURRENT 1000 //in mA
#define X2_SENSE_RESISTOR 91 //in mOhms
#define X2_MICROSTEPS 16 //number of microsteps
// #define Y_IS_TMC
#define Y_MAX_CURRENT 1000 //in mA
#define Y_SENSE_RESISTOR 91 //in mOhms
#define Y_MICROSTEPS 16 //number of microsteps
// #define Y2_IS_TMC
#define Y2_MAX_CURRENT 1000 //in mA
#define Y2_SENSE_RESISTOR 91 //in mOhms
#define Y2_MICROSTEPS 16 //number of microsteps
// #define Z_IS_TMC
#define Z_MAX_CURRENT 1000 //in mA
#define Z_SENSE_RESISTOR 91 //in mOhms
#define Z_MICROSTEPS 16 //number of microsteps
// #define Z2_IS_TMC
#define Z2_MAX_CURRENT 1000 //in mA
#define Z2_SENSE_RESISTOR 91 //in mOhms
#define Z2_MICROSTEPS 16 //number of microsteps
// #define E0_IS_TMC
#define E0_MAX_CURRENT 1000 //in mA
#define E0_SENSE_RESISTOR 91 //in mOhms
#define E0_MICROSTEPS 16 //number of microsteps
// #define E1_IS_TMC
#define E1_MAX_CURRENT 1000 //in mA
#define E1_SENSE_RESISTOR 91 //in mOhms
#define E1_MICROSTEPS 16 //number of microsteps
// #define E2_IS_TMC
#define E2_MAX_CURRENT 1000 //in mA
#define E2_SENSE_RESISTOR 91 //in mOhms
#define E2_MICROSTEPS 16 //number of microsteps
// #define E3_IS_TMC
#define E3_MAX_CURRENT 1000 //in mA
#define E3_SENSE_RESISTOR 91 //in mOhms
#define E3_MICROSTEPS 16 //number of microsteps
#endif
/******************************************************************************\
* enable this section if you have L6470 motor drivers.
* you need to import the L6470 library into the arduino IDE for this
******************************************************************************/
// @section l6470
//#define HAVE_L6470DRIVER
#ifdef HAVE_L6470DRIVER
// #define X_IS_L6470
#define X_MICROSTEPS 16 //number of microsteps
#define X_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define X_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define X2_IS_L6470
#define X2_MICROSTEPS 16 //number of microsteps
#define X2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define X2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define Y_IS_L6470
#define Y_MICROSTEPS 16 //number of microsteps
#define Y_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define Y_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define Y2_IS_L6470
#define Y2_MICROSTEPS 16 //number of microsteps
#define Y2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define Y2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define Z_IS_L6470
#define Z_MICROSTEPS 16 //number of microsteps
#define Z_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define Z_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define Z2_IS_L6470
#define Z2_MICROSTEPS 16 //number of microsteps
#define Z2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define Z2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define E0_IS_L6470
#define E0_MICROSTEPS 16 //number of microsteps
#define E0_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define E0_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define E1_IS_L6470
#define E1_MICROSTEPS 16 //number of microsteps
#define E1_MICROSTEPS 16 //number of microsteps
#define E1_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define E1_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define E2_IS_L6470
#define E2_MICROSTEPS 16 //number of microsteps
#define E2_MICROSTEPS 16 //number of microsteps
#define E2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define E2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define E3_IS_L6470
#define E3_MICROSTEPS 16 //number of microsteps
#define E3_MICROSTEPS 16 //number of microsteps
#define E3_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define E3_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall
#endif
#include "Conditionals.h" #include "Conditionals.h"
#include "SanityCheck.h" #include "SanityCheck.h"

@ -38,7 +38,7 @@ Here are some standard links for getting your machine calibrated:
// User-specified version info of this build to display in [Pronterface, etc] terminal window during // User-specified version info of this build to display in [Pronterface, etc] terminal window during
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
// build by the user have been successfully uploaded into firmware. // build by the user have been successfully uploaded into firmware.
#define STRING_VERSION "1.0.2" #define STRING_VERSION "1.0.3 dev"
#define STRING_URL "reprap.org" #define STRING_URL "reprap.org"
#define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
#define STRING_CONFIG_H_AUTHOR "(bq Hephestos)" // Who made the changes. #define STRING_CONFIG_H_AUTHOR "(bq Hephestos)" // Who made the changes.
@ -58,12 +58,11 @@ Here are some standard links for getting your machine calibrated:
// The following define selects which electronics board you have. // The following define selects which electronics board you have.
// Please choose the name from boards.h that matches your setup // Please choose the name from boards.h that matches your setup
#ifndef MOTHERBOARD #define MOTHERBOARD BOARD_HEPHESTOS
#define MOTHERBOARD BOARD_HEPHESTOS
#endif
// Define this to set a custom name for your generic Mendel, // Optional custom name for your RepStrap or other custom machine
// #define CUSTOM_MENDEL_NAME "This Mendel" // Displayed in the LCD "Ready" message
// #define CUSTOM_MACHINE_NAME "3D Printer"
// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines) // Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines)
// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) // You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4)
@ -122,7 +121,7 @@ Here are some standard links for getting your machine calibrated:
// Use it for Testing or Development purposes. NEVER for production machine. // Use it for Testing or Development purposes. NEVER for production machine.
// #define DUMMY_THERMISTOR_998_VALUE 25 // #define DUMMY_THERMISTOR_998_VALUE 25
// #define DUMMY_THERMISTOR_999_VALUE 100 // #define DUMMY_THERMISTOR_999_VALUE 100
// :{ '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" }
#define TEMP_SENSOR_0 1 #define TEMP_SENSOR_0 1
#define TEMP_SENSOR_1 0 #define TEMP_SENSOR_1 0
#define TEMP_SENSOR_2 0 #define TEMP_SENSOR_2 0
@ -184,7 +183,6 @@ Here are some standard links for getting your machine calibrated:
// is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
#define PID_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term #define PID_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term
#define K1 0.95 //smoothing factor within the PID #define K1 0.95 //smoothing factor within the PID
#define PID_dT ((OVERSAMPLENR * 10.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine
// If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
// Ultimaker // Ultimaker
@ -215,7 +213,7 @@ Here are some standard links for getting your machine calibrated:
// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis // Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
// //
// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. // Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder.
// If your PID_dT above is the default, and correct for your hardware/configuration, that means 7.689Hz, // If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz,
// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. // which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. // This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
// If your configuration is significantly different than this and you don't understand the issues involved, you probably // If your configuration is significantly different than this and you don't understand the issues involved, you probably
@ -322,13 +320,14 @@ your extruder heater takes 2 minutes to hit the target on heating.
// #define ENDSTOPPULLUP_ZMIN // #define ENDSTOPPULLUP_ZMIN
#endif #endif
// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins. // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
const bool X_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. const bool X_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Y_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. const bool Y_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Z_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. const bool Z_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
//#define DISABLE_MAX_ENDSTOPS //#define DISABLE_MAX_ENDSTOPS
//#define DISABLE_MIN_ENDSTOPS //#define DISABLE_MIN_ENDSTOPS
@ -345,13 +344,14 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#define DISABLE_E false // For all extruders #define DISABLE_E false // For all extruders
#define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled #define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled
#define INVERT_X_DIR true // for Mendel set to false, for Orca set to true // Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
#define INVERT_Y_DIR false // for Mendel set to true, for Orca set to false #define INVERT_X_DIR true
#define INVERT_Z_DIR true // for Mendel set to false, for Orca set to true #define INVERT_Y_DIR false
#define INVERT_E0_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false #define INVERT_Z_DIR true
#define INVERT_E1_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false #define INVERT_E0_DIR false
#define INVERT_E2_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false #define INVERT_E1_DIR false
#define INVERT_E3_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false #define INVERT_E2_DIR false
#define INVERT_E3_DIR false
// ENDSTOP SETTINGS: // ENDSTOP SETTINGS:
// Sets direction of endstops when homing; 1=MAX, -1=MIN // Sets direction of endstops when homing; 1=MAX, -1=MIN
@ -362,13 +362,13 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS. #define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below. #define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below.
// Travel limits after homing (units in mm) // Travel limits after homing (units are in mm)
#define X_MAX_POS 215
#define X_MIN_POS 0 #define X_MIN_POS 0
#define Y_MAX_POS 210
#define Y_MIN_POS 0 #define Y_MIN_POS 0
#define Z_MAX_POS 180
#define Z_MIN_POS 0 #define Z_MIN_POS 0
#define X_MAX_POS 215
#define Y_MAX_POS 210
#define Z_MAX_POS 180
//=========================================================================== //===========================================================================
//============================= Filament Runout Sensor ====================== //============================= Filament Runout Sensor ======================
@ -387,7 +387,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// #define MANUAL_BED_LEVELING // Add display menu option for bed leveling // #define MANUAL_BED_LEVELING // Add display menu option for bed leveling
// #define MESH_BED_LEVELING // Enable mesh bed leveling // #define MESH_BED_LEVELING // Enable mesh bed leveling
#if defined(MESH_BED_LEVELING) #ifdef MANUAL_BED_LEVELING
#define MBL_Z_STEP 0.025
#endif // MANUAL_BED_LEVELING
#ifdef MESH_BED_LEVELING
#define MESH_MIN_X 10 #define MESH_MIN_X 10
#define MESH_MAX_X (X_MAX_POS - MESH_MIN_X) #define MESH_MAX_X (X_MAX_POS - MESH_MIN_X)
#define MESH_MIN_Y 10 #define MESH_MIN_Y 10
@ -434,7 +438,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// You probably don't need more than 3 (squared=9) // You probably don't need more than 3 (squared=9)
#define AUTO_BED_LEVELING_GRID_POINTS 2 #define AUTO_BED_LEVELING_GRID_POINTS 2
#else // !AUTO_BED_LEVELING_GRID #else // !AUTO_BED_LEVELING_GRID
// Arbitrary points to probe. A simple cross-product // Arbitrary points to probe. A simple cross-product
@ -448,11 +451,10 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#endif // AUTO_BED_LEVELING_GRID #endif // AUTO_BED_LEVELING_GRID
// Offsets to the probe relative to the extruder tip (Hotend - Probe) // Offsets to the probe relative to the extruder tip (Hotend - Probe)
// X and Y offsets must be integers // X and Y offsets must be integers
#define X_PROBE_OFFSET_FROM_EXTRUDER -25 // -left +right #define X_PROBE_OFFSET_FROM_EXTRUDER -25 // Probe on: -left +right
#define Y_PROBE_OFFSET_FROM_EXTRUDER -29 // -front +behind #define Y_PROBE_OFFSET_FROM_EXTRUDER -29 // Probe on: -front +behind
#define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35 // -below (always!) #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35 // -below (always!)
#define Z_RAISE_BEFORE_HOMING 4 // (in mm) Raise Z before homing (G28) for Probe Clearance. #define Z_RAISE_BEFORE_HOMING 4 // (in mm) Raise Z before homing (G28) for Probe Clearance.
@ -464,6 +466,9 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#define Z_RAISE_BETWEEN_PROBINGS 5 //How much the extruder will be raised when traveling from between next probing points #define Z_RAISE_BETWEEN_PROBINGS 5 //How much the extruder will be raised when traveling from between next probing points
#define Z_RAISE_AFTER_PROBING 15 //How much the extruder will be raised after the last probing point. #define Z_RAISE_AFTER_PROBING 15 //How much the extruder will be raised after the last probing point.
// #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.
//Useful to retract a deployable probe.
//#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell //#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell
//#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. //#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.
@ -491,6 +496,20 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#endif #endif
// Support for a dedicated Z PROBE endstop separate from the Z MIN endstop.
// If you would like to use both a Z PROBE and a Z MIN endstop together or just a Z PROBE with a custom pin, uncomment #define Z_PROBE_ENDSTOP and read the instructions below.
// If you want to still use the Z min endstop for homing, disable Z_SAFE_HOMING above. Eg; to park the head outside the bed area when homing with G28.
// WARNING: The Z MIN endstop will need to set properly as it would without a Z PROBE to prevent head crashes and premature stopping during a print.
// To use a separate Z PROBE endstop, you must have a Z_PROBE_PIN defined in the pins.h file for your control board.
// If you are using a servo based Z PROBE, you will need to enable NUM_SERVOS, SERVO_ENDSTOPS and SERVO_ENDSTOPS_ANGLES in the R/C Servo below.
// RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin in the Aux 4 section of the RAMPS board. Use 5V for powered sensors, otherwise connect to ground and D32
// for normally closed configuration and 5V and D32 for normally open configurations. Normally closed configuration is advised and assumed.
// The D32 pin in Aux 4 on RAMPS maps to the Arduino D32 pin. Z_PROBE_PIN is setting the pin to use on the Arduino. Since the D32 pin on the RAMPS maps to D32 on Arduino, this works.
// D32 is currently selected in the RAMPS 1.3/1.4 pin file. All other boards will need changes to the respective pins_XXXXX.h file.
// WARNING: Setting the wrong pin may have unexpected and potentially disastrous outcomes. Use with caution and do your homework.
//#define Z_PROBE_ENDSTOP
#endif // ENABLE_AUTO_BED_LEVELING #endif // ENABLE_AUTO_BED_LEVELING
@ -498,15 +517,19 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
//#define MANUAL_HOME_POSITIONS // If defined, MANUAL_*_HOME_POS below will be used //#define MANUAL_HOME_POSITIONS // If defined, MANUAL_*_HOME_POS below will be used
//#define BED_CENTER_AT_0_0 // If defined, the center of the bed is at (X=0, Y=0) //#define BED_CENTER_AT_0_0 // If defined, the center of the bed is at (X=0, Y=0)
//Manual homing switch locations: // Manual homing switch locations:
// For deltabots this means top and center of the Cartesian print volume. // For deltabots this means top and center of the Cartesian print volume.
#define MANUAL_X_HOME_POS 0 #ifdef MANUAL_HOME_POSITIONS
#define MANUAL_Y_HOME_POS 0 #define MANUAL_X_HOME_POS 0
#define MANUAL_Z_HOME_POS 0 #define MANUAL_Y_HOME_POS 0
//#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing. #define MANUAL_Z_HOME_POS 0
//#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing.
#endif
/**
* MOVEMENT SETTINGS
*/
//// MOVEMENT SETTINGS
#define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
#define HOMING_FEEDRATE {2000, 2000, 150, 0} // set the homing speeds (mm/min) #define HOMING_FEEDRATE {2000, 2000, 150, 0} // set the homing speeds (mm/min)
// default settings // default settings
@ -519,8 +542,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#define DEFAULT_RETRACT_ACCELERATION 1000 // E acceleration in mm/s^2 for retracts #define DEFAULT_RETRACT_ACCELERATION 1000 // E acceleration in mm/s^2 for retracts
#define DEFAULT_TRAVEL_ACCELERATION 1000 // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves #define DEFAULT_TRAVEL_ACCELERATION 1000 // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing). // Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder). // The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).
// For the other hotends it is their distance from the extruder 0 hotend. // For the other hotends it is their distance from the extruder 0 hotend.
@ -540,9 +561,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// Custom M code points // Custom M code points
#define CUSTOM_M_CODES #define CUSTOM_M_CODES
#ifdef CUSTOM_M_CODES #ifdef CUSTOM_M_CODES
#ifdef ENABLE_AUTO_BED_LEVELING
#define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851 #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
#define Z_PROBE_OFFSET_RANGE_MIN -15 #define Z_PROBE_OFFSET_RANGE_MIN -20
#define Z_PROBE_OFFSET_RANGE_MAX -5 #define Z_PROBE_OFFSET_RANGE_MAX 20
#endif
#endif #endif
@ -553,9 +576,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. // M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
//define this to enable EEPROM support //define this to enable EEPROM support
//#define EEPROM_SETTINGS //#define EEPROM_SETTINGS
//to disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
// please keep turned on if you can. #ifdef EEPROM_SETTINGS
//#define EEPROM_CHITCHAT // To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
#define EEPROM_CHITCHAT // please keep turned on if you can.
#endif
// Preheat Constants // Preheat Constants
#define PLA_PREHEAT_HOTEND_TEMP 200 #define PLA_PREHEAT_HOTEND_TEMP 200
@ -569,13 +594,16 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
//==============================LCD and SD support============================= //==============================LCD and SD support=============================
// Define your display language below. Replace (en) with your language code and uncomment. // Define your display language below. Replace (en) with your language code and uncomment.
// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu // en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
// See also language.h // See also language.h
//#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
// Character based displays can have different extended charsets. // Choose ONE of these 3 charsets. This has to match your hardware. Ignored for full graphic display.
#define DISPLAY_CHARSET_HD44780_JAPAN // "ääööüüß23°" // 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.
//#define DISPLAY_CHARSET_HD44780_WESTERN // "ÄäÖöÜüß²³°" if you see a '~' instead of a 'arrow_right' at the right of submenuitems - this is the right one. // See also documentation/LCDLanguageFont.md
#define DISPLAY_CHARSET_HD44780_JAPAN // this is the most common hardware
//#define DISPLAY_CHARSET_HD44780_WESTERN
//#define DISPLAY_CHARSET_HD44780_CYRILLIC
#define ULTRA_LCD //general LCD support, also 16x2 #define ULTRA_LCD //general LCD support, also 16x2
//#define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family) //#define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
@ -588,6 +616,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
//#define ULTIPANEL //the UltiPanel as on Thingiverse //#define ULTIPANEL //the UltiPanel as on Thingiverse
//#define LCD_FEEDBACK_FREQUENCY_HZ 1000 // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click //#define LCD_FEEDBACK_FREQUENCY_HZ 1000 // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
// 0 to disable buzzer feedback
// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3) // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
// http://reprap.org/wiki/PanelOne // http://reprap.org/wiki/PanelOne
@ -650,7 +679,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
//#define FAST_PWM_FAN //#define FAST_PWM_FAN
// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
// which is not ass annoying as with the hardware PWM. On the other hand, if this frequency // which is not as annoying as with the hardware PWM. On the other hand, if this frequency
// is too low, you should also increment SOFT_PWM_SCALE. // is too low, you should also increment SOFT_PWM_SCALE.
//#define FAN_SOFT_PWM //#define FAN_SOFT_PWM
@ -695,7 +724,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// Servo Endstops // Servo Endstops
// //
// This allows for servo actuated endstops, primary usage is for the Z Axis to eliminate calibration or bed height changes. // This allows for servo actuated endstops, primary usage is for the Z Axis to eliminate calibration or bed height changes.
// Use M206 command to correct for switch height offset to actual nozzle height. Store that setting with M500. // Use M851 to set the z-probe vertical offset from the nozzle. Store that setting with M500.
// //
//#define SERVO_ENDSTOPS {-1, -1, 0} // Servo index for X, Y, Z. Disable with -1 //#define SERVO_ENDSTOPS {-1, -1, 0} // Servo index for X, Y, Z. Disable with -1
//#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles //#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles

@ -3,6 +3,8 @@
#include "Conditionals.h" #include "Conditionals.h"
// @section temperature
//=========================================================================== //===========================================================================
//=============================Thermal Settings ============================ //=============================Thermal Settings ============================
//=========================================================================== //===========================================================================
@ -46,6 +48,8 @@
//The M105 command return, besides traditional information, the ADC value read from temperature sensors. //The M105 command return, besides traditional information, the ADC value read from temperature sensors.
//#define SHOW_TEMP_ADC_VALUES //#define SHOW_TEMP_ADC_VALUES
// @section extruder
// extruder run-out prevention. // extruder run-out prevention.
//if the machine is idle, and the temperature over MINTEMP, every couple of SECONDS some filament is extruded //if the machine is idle, and the temperature over MINTEMP, every couple of SECONDS some filament is extruded
//#define EXTRUDER_RUNOUT_PREVENT //#define EXTRUDER_RUNOUT_PREVENT
@ -55,6 +59,8 @@
#define EXTRUDER_RUNOUT_SPEED 1500. //extrusion speed #define EXTRUDER_RUNOUT_SPEED 1500. //extrusion speed
#define EXTRUDER_RUNOUT_EXTRUDE 100 #define EXTRUDER_RUNOUT_EXTRUDE 100
// @section temperature
//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements. //These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET" //The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
#define TEMP_SENSOR_AD595_OFFSET 0.0 #define TEMP_SENSOR_AD595_OFFSET 0.0
@ -72,6 +78,8 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu) // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100 //#define FAN_KICKSTART_TIME 100
// @section extruder
// Extruder cooling fans // Extruder cooling fans
// Configure fan pin outputs to automatically turn on/off when the associated // Configure fan pin outputs to automatically turn on/off when the associated
// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE. // extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE.
@ -89,8 +97,12 @@
//=============================Mechanical Settings=========================== //=============================Mechanical Settings===========================
//=========================================================================== //===========================================================================
// @section homing
//#define ENDSTOPS_ONLY_FOR_HOMING // If defined the endstops will only be used for homing //#define ENDSTOPS_ONLY_FOR_HOMING // If defined the endstops will only be used for homing
// @section extras
//#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats. //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
// A single Z stepper driver is usually used to drive 2 stepper motors. // A single Z stepper driver is usually used to drive 2 stepper motors.
@ -100,6 +112,30 @@
// On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder. // On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder.
//#define Z_DUAL_STEPPER_DRIVERS //#define Z_DUAL_STEPPER_DRIVERS
#ifdef Z_DUAL_STEPPER_DRIVERS
// 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.
// That way the machine is capable to align the bed during home, since both Z steppers are homed.
// There is also an implementation of M666 (software endstops adjustment) to this feature.
// After Z homing, this adjustment is applied to just one of the steppers in order to align the bed.
// 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.
// 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.
// Play a little bit with small adjustments (0.5mm) and check the behaviour.
// The M119 (endstops report) will start reporting the Z2 Endstop as well.
#define Z_DUAL_ENDSTOPS
#ifdef Z_DUAL_ENDSTOPS
#define Z2_STEP_PIN E2_STEP_PIN // Stepper to be used to Z2 axis.
#define Z2_DIR_PIN E2_DIR_PIN
#define Z2_ENABLE_PIN E2_ENABLE_PIN
#define Z2_MAX_PIN 36 //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36)
const bool Z2_MAX_ENDSTOP_INVERTING = false;
#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.
#endif
#endif // Z_DUAL_STEPPER_DRIVERS
// Same again but for Y Axis. // Same again but for Y Axis.
//#define Y_DUAL_STEPPER_DRIVERS //#define Y_DUAL_STEPPER_DRIVERS
@ -112,57 +148,59 @@
// allowing faster printing speeds. // allowing faster printing speeds.
//#define DUAL_X_CARRIAGE //#define DUAL_X_CARRIAGE
#ifdef DUAL_X_CARRIAGE #ifdef DUAL_X_CARRIAGE
// Configuration for second X-carriage // Configuration for second X-carriage
// Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop;
// the second x-carriage always homes to the maximum endstop. // the second x-carriage always homes to the maximum endstop.
#define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
#define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed
#define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position
#define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position #define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position
// However: In this mode the EXTRUDER_OFFSET_X value for the second extruder provides a software // However: In this mode the EXTRUDER_OFFSET_X value for the second extruder provides a software
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command). // without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer. // Remember: you should set the second extruder x-offset to 0 in your slicer.
// Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h) // Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h)
#define X2_ENABLE_PIN 29 #define X2_ENABLE_PIN 29
#define X2_STEP_PIN 25 #define X2_STEP_PIN 25
#define X2_DIR_PIN 23 #define X2_DIR_PIN 23
// There are a few selectable movement modes for dual x-carriages using M605 S<mode> // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
// Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results // Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
// as long as it supports dual x-carriages. (M605 S0) // as long as it supports dual x-carriages. (M605 S0)
// Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so // Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
// that additional slicer support is not required. (M605 S1) // that additional slicer support is not required. (M605 S1)
// Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all // Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
// actions of the first x-carriage. This allows the printer to print 2 arbitrary items at // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
// once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm]) // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
// This is the default power-up mode which can be later using M605. // This is the default power-up mode which can be later using M605.
#define DEFAULT_DUAL_X_CARRIAGE_MODE 0 #define DEFAULT_DUAL_X_CARRIAGE_MODE 0
// Default settings in "Auto-park Mode" // Default settings in "Auto-park Mode"
#define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder #define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder
#define TOOLCHANGE_UNPARK_ZLIFT 1 // the distance to raise Z axis when unparking an extruder #define TOOLCHANGE_UNPARK_ZLIFT 1 // the distance to raise Z axis when unparking an extruder
// Default x offset in duplication mode (typically set to half print bed width) // Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100 #define DEFAULT_DUPLICATION_X_OFFSET 100
#endif //DUAL_X_CARRIAGE #endif //DUAL_X_CARRIAGE
// @section homing
//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again: //homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
#define X_HOME_RETRACT_MM 5 #define X_HOME_BUMP_MM 5
#define Y_HOME_RETRACT_MM 5 #define Y_HOME_BUMP_MM 5
#define Z_HOME_RETRACT_MM 2 #define Z_HOME_BUMP_MM 2
#define HOMING_BUMP_DIVISOR {10, 10, 20} // Re-Bump Speed Divisor (Divides the Homing Feedrate) #define HOMING_BUMP_DIVISOR {2, 2, 4} // Re-Bump Speed Divisor (Divides the Homing Feedrate)
//#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially. //#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
// @section machine
#define AXIS_RELATIVE_MODES {false, false, false, false} #define AXIS_RELATIVE_MODES {false, false, false, false}
#ifdef CONFIG_STEPPERS_TOSHIBA
#define MAX_STEP_FREQUENCY 10000 // Max step frequency for Toshiba Stepper Controllers // @section machine
#else
#define MAX_STEP_FREQUENCY 40000 // Max step frequency for Ultimaker (5000 pps / half step)
#endif
//By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. //By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step.
#define INVERT_X_STEP_PIN false #define INVERT_X_STEP_PIN false
#define INVERT_Y_STEP_PIN false #define INVERT_Y_STEP_PIN false
@ -175,11 +213,15 @@
#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
#define DEFAULT_MINTRAVELFEEDRATE 0.0 #define DEFAULT_MINTRAVELFEEDRATE 0.0
// @section lcd
#ifdef ULTIPANEL #ifdef ULTIPANEL
#define MANUAL_FEEDRATE {120*60, 120*60, 18*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel #define MANUAL_FEEDRATE {120*60, 120*60, 18*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel
#define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder
#endif #endif
// @section extras
// minimum time in microseconds that a movement needs to take if the buffer is emptied. // minimum time in microseconds that a movement needs to take if the buffer is emptied.
#define DEFAULT_MINSEGMENTTIME 20000 #define DEFAULT_MINSEGMENTTIME 20000
@ -214,25 +256,35 @@
//=========================================================================== //===========================================================================
#define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly #define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
#define ENCODER_10X_STEPS_PER_SEC 75 // If the encoder steps per sec exceed this value, multiple the steps moved by ten to quickly advance the value #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
#define ENCODER_100X_STEPS_PER_SEC 160 // If the encoder steps per sec exceed this value, multiple the steps moved by 100 to really quickly advance the value #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
//#define ENCODER_RATE_MULTIPLIER_DEBUG // If defined, output the encoder steps per second value //#define ENCODER_RATE_MULTIPLIER_DEBUG // If defined, output the encoder steps per second value
//#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/ //#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/
#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
#define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? // @section lcd
#define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
#ifdef SDSUPPORT
#define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. // If you are using a RAMPS board or cheap E-bay purchased boards that do not detect when an SD card is inserted
// 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. // You can get round this by connecting a push button or single throw switch to the pin defined as SDCARDCARDDETECT
// using: // in the pins.h file. When using a push button pulling the pin to ground this will need inverted. This setting should
#define MENU_ADDAUTOSTART // be commented out otherwise
#define SDCARDDETECTINVERTED
// Show a progress bar on HD44780 LCDs for SD printing #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers?
//#define LCD_PROGRESS_BAR #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
#ifdef LCD_PROGRESS_BAR #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order.
// 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.
// using:
//#define MENU_ADDAUTOSTART
// Show a progress bar on HD44780 LCDs for SD printing
//#define LCD_PROGRESS_BAR
#ifdef LCD_PROGRESS_BAR
// Amount of time (ms) to show the bar // Amount of time (ms) to show the bar
#define PROGRESS_BAR_BAR_TIME 2000 #define PROGRESS_BAR_BAR_TIME 2000
// Amount of time (ms) to show the status message // Amount of time (ms) to show the status message
@ -241,7 +293,11 @@
#define PROGRESS_MSG_EXPIRE 0 #define PROGRESS_MSG_EXPIRE 0
// Enable this to show messages for MSG_TIME then hide them // Enable this to show messages for MSG_TIME then hide them
//#define PROGRESS_MSG_ONCE //#define PROGRESS_MSG_ONCE
#endif #endif
#endif // SDSUPPORT
// @section more
// The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation. // The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
//#define USE_WATCHDOG //#define USE_WATCHDOG
@ -256,6 +312,8 @@
// Enable the option to stop SD printing when hitting and endstops, needs to be enabled from the LCD menu when this option is enabled. // Enable the option to stop SD printing when hitting and endstops, needs to be enabled from the LCD menu when this option is enabled.
//#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
// @section lcd
// Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process // Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process
// it can e.g. be used to change z-positions in the print startup phase in real-time // it can e.g. be used to change z-positions in the print startup phase in real-time
// does not respect endstops! // does not respect endstops!
@ -266,6 +324,8 @@
#define BABYSTEP_Z_MULTIPLICATOR 2 //faster z movements #define BABYSTEP_Z_MULTIPLICATOR 2 //faster z movements
#endif #endif
// @section extruder
// extruder advance constant (s2/mm3) // extruder advance constant (s2/mm3)
// //
// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2 // advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
@ -279,7 +339,9 @@
#define EXTRUDER_ADVANCE_K .0 #define EXTRUDER_ADVANCE_K .0
#define D_FILAMENT 1.75 #define D_FILAMENT 1.75
#define STEPS_MM_E 100.47095761381482 #define STEPS_MM_E 100.47095761381482
#endif // ADVANCE #endif
// @section extras
// Arc interpretation settings: // Arc interpretation settings:
#define MM_PER_ARC_SEGMENT 1 #define MM_PER_ARC_SEGMENT 1
@ -287,11 +349,7 @@
const unsigned int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement const unsigned int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement
// If you are using a RAMPS board or cheap E-bay purchased boards that do not detect when an SD card is inserted // @section temperature
// You can get round this by connecting a push button or single throw switch to the pin defined as SDCARDCARDDETECT
// in the pins.h file. When using a push button pulling the pin to ground this will need inverted. This setting should
// be commented out otherwise
#define SDCARDDETECTINVERTED
// Control heater 0 and heater 1 in parallel. // Control heater 0 and heater 1 in parallel.
//#define HEATERS_PARALLEL //#define HEATERS_PARALLEL
@ -300,19 +358,23 @@ const unsigned int dropsegments=5; //everything with less than this number of st
//=============================Buffers ============================ //=============================Buffers ============================
//=========================================================================== //===========================================================================
// @section hidden
// The number of linear motions that can be in the plan at any give time. // The number of linear motions that can be in the plan at any give time.
// 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. // 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.
#if defined SDSUPPORT #ifdef SDSUPPORT
#define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
#else #else
#define BLOCK_BUFFER_SIZE 16 // maximize block buffer #define BLOCK_BUFFER_SIZE 16 // maximize block buffer
#endif #endif
// @section more
//The ASCII buffer for receiving from the serial: //The ASCII buffer for receiving from the serial:
#define MAX_CMD_SIZE 96 #define MAX_CMD_SIZE 96
#define BUFSIZE 5 #define BUFSIZE 5
// @section fwretract
// Firmware based and LCD controlled retract // Firmware based and LCD controlled retract
// M207 and M208 can be used to define parameters for the retraction. // M207 and M208 can be used to define parameters for the retraction.
@ -344,6 +406,143 @@ const unsigned int dropsegments=5; //everything with less than this number of st
#endif #endif
#endif #endif
/******************************************************************************\
* enable this section if you have TMC26X motor drivers.
* you need to import the TMC26XStepper library into the arduino IDE for this
******************************************************************************/
// @section tmc
//#define HAVE_TMCDRIVER
#ifdef HAVE_TMCDRIVER
// #define X_IS_TMC
#define X_MAX_CURRENT 1000 //in mA
#define X_SENSE_RESISTOR 91 //in mOhms
#define X_MICROSTEPS 16 //number of microsteps
// #define X2_IS_TMC
#define X2_MAX_CURRENT 1000 //in mA
#define X2_SENSE_RESISTOR 91 //in mOhms
#define X2_MICROSTEPS 16 //number of microsteps
// #define Y_IS_TMC
#define Y_MAX_CURRENT 1000 //in mA
#define Y_SENSE_RESISTOR 91 //in mOhms
#define Y_MICROSTEPS 16 //number of microsteps
// #define Y2_IS_TMC
#define Y2_MAX_CURRENT 1000 //in mA
#define Y2_SENSE_RESISTOR 91 //in mOhms
#define Y2_MICROSTEPS 16 //number of microsteps
// #define Z_IS_TMC
#define Z_MAX_CURRENT 1000 //in mA
#define Z_SENSE_RESISTOR 91 //in mOhms
#define Z_MICROSTEPS 16 //number of microsteps
// #define Z2_IS_TMC
#define Z2_MAX_CURRENT 1000 //in mA
#define Z2_SENSE_RESISTOR 91 //in mOhms
#define Z2_MICROSTEPS 16 //number of microsteps
// #define E0_IS_TMC
#define E0_MAX_CURRENT 1000 //in mA
#define E0_SENSE_RESISTOR 91 //in mOhms
#define E0_MICROSTEPS 16 //number of microsteps
// #define E1_IS_TMC
#define E1_MAX_CURRENT 1000 //in mA
#define E1_SENSE_RESISTOR 91 //in mOhms
#define E1_MICROSTEPS 16 //number of microsteps
// #define E2_IS_TMC
#define E2_MAX_CURRENT 1000 //in mA
#define E2_SENSE_RESISTOR 91 //in mOhms
#define E2_MICROSTEPS 16 //number of microsteps
// #define E3_IS_TMC
#define E3_MAX_CURRENT 1000 //in mA
#define E3_SENSE_RESISTOR 91 //in mOhms
#define E3_MICROSTEPS 16 //number of microsteps
#endif
/******************************************************************************\
* enable this section if you have L6470 motor drivers.
* you need to import the L6470 library into the arduino IDE for this
******************************************************************************/
// @section l6470
//#define HAVE_L6470DRIVER
#ifdef HAVE_L6470DRIVER
// #define X_IS_L6470
#define X_MICROSTEPS 16 //number of microsteps
#define X_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define X_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define X2_IS_L6470
#define X2_MICROSTEPS 16 //number of microsteps
#define X2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define X2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define Y_IS_L6470
#define Y_MICROSTEPS 16 //number of microsteps
#define Y_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define Y_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define Y2_IS_L6470
#define Y2_MICROSTEPS 16 //number of microsteps
#define Y2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define Y2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define Z_IS_L6470
#define Z_MICROSTEPS 16 //number of microsteps
#define Z_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define Z_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define Z2_IS_L6470
#define Z2_MICROSTEPS 16 //number of microsteps
#define Z2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define Z2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define E0_IS_L6470
#define E0_MICROSTEPS 16 //number of microsteps
#define E0_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define E0_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define E1_IS_L6470
#define E1_MICROSTEPS 16 //number of microsteps
#define E1_MICROSTEPS 16 //number of microsteps
#define E1_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define E1_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define E2_IS_L6470
#define E2_MICROSTEPS 16 //number of microsteps
#define E2_MICROSTEPS 16 //number of microsteps
#define E2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define E2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define E3_IS_L6470
#define E3_MICROSTEPS 16 //number of microsteps
#define E3_MICROSTEPS 16 //number of microsteps
#define E3_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define E3_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall
#endif
#include "Conditionals.h" #include "Conditionals.h"
#include "SanityCheck.h" #include "SanityCheck.h"

@ -38,7 +38,7 @@ Here are some standard links for getting your machine calibrated:
// User-specified version info of this build to display in [Pronterface, etc] terminal window during // User-specified version info of this build to display in [Pronterface, etc] terminal window during
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
// build by the user have been successfully uploaded into firmware. // build by the user have been successfully uploaded into firmware.
#define STRING_VERSION "1.0.2" #define STRING_VERSION "1.0.3 dev"
#define STRING_URL "reprap.org" #define STRING_URL "reprap.org"
#define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
#define STRING_CONFIG_H_AUTHOR "(K8200, CONSULitAS)" // Who made the changes. #define STRING_CONFIG_H_AUTHOR "(K8200, CONSULitAS)" // Who made the changes.
@ -62,8 +62,9 @@ Here are some standard links for getting your machine calibrated:
#define MOTHERBOARD BOARD_K8200 #define MOTHERBOARD BOARD_K8200
#endif #endif
// Define this to set a custom name for your generic Mendel, // Optional custom name for your RepStrap or other custom machine
// #define CUSTOM_MENDEL_NAME "This Mendel" // Displayed in the LCD "Ready" message
// #define CUSTOM_MACHINE_NAME "3D Printer"
// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines) // Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines)
// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) // You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4)
@ -122,7 +123,7 @@ Here are some standard links for getting your machine calibrated:
// Use it for Testing or Development purposes. NEVER for production machine. // Use it for Testing or Development purposes. NEVER for production machine.
// #define DUMMY_THERMISTOR_998_VALUE 25 // #define DUMMY_THERMISTOR_998_VALUE 25
// #define DUMMY_THERMISTOR_999_VALUE 100 // #define DUMMY_THERMISTOR_999_VALUE 100
// :{ '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" }
#define TEMP_SENSOR_0 5 #define TEMP_SENSOR_0 5
#define TEMP_SENSOR_1 0 #define TEMP_SENSOR_1 0
#define TEMP_SENSOR_2 0 #define TEMP_SENSOR_2 0
@ -184,7 +185,6 @@ Here are some standard links for getting your machine calibrated:
// is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
#define PID_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term #define PID_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term
#define K1 0.95 //smoothing factor within the PID #define K1 0.95 //smoothing factor within the PID
#define PID_dT ((OVERSAMPLENR * 10.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine
// If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
// Ultimaker // Ultimaker
@ -214,7 +214,7 @@ Here are some standard links for getting your machine calibrated:
// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis // Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
// //
// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. // Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder.
// If your PID_dT above is the default, and correct for your hardware/configuration, that means 7.689Hz, // If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz,
// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. // which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. // This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
// If your configuration is significantly different than this and you don't understand the issues involved, you probably // If your configuration is significantly different than this and you don't understand the issues involved, you probably
@ -327,13 +327,14 @@ your extruder heater takes 2 minutes to hit the target on heating.
#define ENDSTOPPULLUP_ZMIN #define ENDSTOPPULLUP_ZMIN
#endif #endif
// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins. // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
const bool X_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop. const bool X_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Y_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop. const bool Y_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop. const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
#define DISABLE_MAX_ENDSTOPS #define DISABLE_MAX_ENDSTOPS
//#define DISABLE_MIN_ENDSTOPS //#define DISABLE_MIN_ENDSTOPS
@ -350,13 +351,14 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#define DISABLE_E false // For all extruders #define DISABLE_E false // For all extruders
#define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled #define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled
#define INVERT_X_DIR false // for Mendel set to false, for Orca set to true // Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
#define INVERT_Y_DIR false // for Mendel set to true, for Orca set to false #define INVERT_X_DIR false
#define INVERT_Z_DIR false // for Mendel set to false, for Orca set to true #define INVERT_Y_DIR false
#define INVERT_E0_DIR true // for direct drive extruder v9 set to true, for geared extruder set to false #define INVERT_Z_DIR false
#define INVERT_E1_DIR true // for direct drive extruder v9 set to true, for geared extruder set to false #define INVERT_E0_DIR true
#define INVERT_E2_DIR true // for direct drive extruder v9 set to true, for geared extruder set to false #define INVERT_E1_DIR true
#define INVERT_E3_DIR true // for direct drive extruder v9 set to true, for geared extruder set to false #define INVERT_E2_DIR true
#define INVERT_E3_DIR true
// ENDSTOP SETTINGS: // ENDSTOP SETTINGS:
// Sets direction of endstops when homing; 1=MAX, -1=MIN // Sets direction of endstops when homing; 1=MAX, -1=MIN
@ -368,12 +370,12 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below. #define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below.
// Travel limits after homing (units are in mm) // Travel limits after homing (units are in mm)
#define X_MAX_POS 200
#define X_MIN_POS 0 #define X_MIN_POS 0
#define Y_MAX_POS 200
#define Y_MIN_POS 0 #define Y_MIN_POS 0
#define Z_MAX_POS 200
#define Z_MIN_POS 0 #define Z_MIN_POS 0
#define X_MAX_POS 200
#define Y_MAX_POS 200
#define Z_MAX_POS 200
//=========================================================================== //===========================================================================
//============================= Filament Runout Sensor ====================== //============================= Filament Runout Sensor ======================
@ -392,7 +394,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// #define MANUAL_BED_LEVELING // Add display menu option for bed leveling // #define MANUAL_BED_LEVELING // Add display menu option for bed leveling
// #define MESH_BED_LEVELING // Enable mesh bed leveling // #define MESH_BED_LEVELING // Enable mesh bed leveling
#if defined(MESH_BED_LEVELING) #ifdef MANUAL_BED_LEVELING
#define MBL_Z_STEP 0.025
#endif // MANUAL_BED_LEVELING
#ifdef MESH_BED_LEVELING
#define MESH_MIN_X 10 #define MESH_MIN_X 10
#define MESH_MAX_X (X_MAX_POS - MESH_MIN_X) #define MESH_MAX_X (X_MAX_POS - MESH_MIN_X)
#define MESH_MIN_Y 10 #define MESH_MIN_Y 10
@ -439,7 +445,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// You probably don't need more than 3 (squared=9) // You probably don't need more than 3 (squared=9)
#define AUTO_BED_LEVELING_GRID_POINTS 2 #define AUTO_BED_LEVELING_GRID_POINTS 2
#else // !AUTO_BED_LEVELING_GRID #else // !AUTO_BED_LEVELING_GRID
// Arbitrary points to probe. A simple cross-product // Arbitrary points to probe. A simple cross-product
@ -453,11 +458,10 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#endif // AUTO_BED_LEVELING_GRID #endif // AUTO_BED_LEVELING_GRID
// Offsets to the probe relative to the extruder tip (Hotend - Probe) // Offsets to the probe relative to the extruder tip (Hotend - Probe)
// X and Y offsets must be integers // X and Y offsets must be integers
#define X_PROBE_OFFSET_FROM_EXTRUDER -25 // -left +right #define X_PROBE_OFFSET_FROM_EXTRUDER -25 // Probe on: -left +right
#define Y_PROBE_OFFSET_FROM_EXTRUDER -29 // -front +behind #define Y_PROBE_OFFSET_FROM_EXTRUDER -29 // Probe on: -front +behind
#define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35 // -below (always!) #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35 // -below (always!)
#define Z_RAISE_BEFORE_HOMING 4 // (in mm) Raise Z before homing (G28) for Probe Clearance. #define Z_RAISE_BEFORE_HOMING 4 // (in mm) Raise Z before homing (G28) for Probe Clearance.
@ -469,6 +473,9 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#define Z_RAISE_BETWEEN_PROBINGS 5 //How much the extruder will be raised when traveling from between next probing points #define Z_RAISE_BETWEEN_PROBINGS 5 //How much the extruder will be raised when traveling from between next probing points
#define Z_RAISE_AFTER_PROBING 15 //How much the extruder will be raised after the last probing point. #define Z_RAISE_AFTER_PROBING 15 //How much the extruder will be raised after the last probing point.
// #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.
//Useful to retract a deployable probe.
//#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell //#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell
//#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. //#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.
@ -496,6 +503,20 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#endif #endif
// Support for a dedicated Z PROBE endstop separate from the Z MIN endstop.
// If you would like to use both a Z PROBE and a Z MIN endstop together or just a Z PROBE with a custom pin, uncomment #define Z_PROBE_ENDSTOP and read the instructions below.
// If you want to still use the Z min endstop for homing, disable Z_SAFE_HOMING above. Eg; to park the head outside the bed area when homing with G28.
// WARNING: The Z MIN endstop will need to set properly as it would without a Z PROBE to prevent head crashes and premature stopping during a print.
// To use a separate Z PROBE endstop, you must have a Z_PROBE_PIN defined in the pins.h file for your control board.
// If you are using a servo based Z PROBE, you will need to enable NUM_SERVOS, SERVO_ENDSTOPS and SERVO_ENDSTOPS_ANGLES in the R/C Servo below.
// RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin in the Aux 4 section of the RAMPS board. Use 5V for powered sensors, otherwise connect to ground and D32
// for normally closed configuration and 5V and D32 for normally open configurations. Normally closed configuration is advised and assumed.
// The D32 pin in Aux 4 on RAMPS maps to the Arduino D32 pin. Z_PROBE_PIN is setting the pin to use on the Arduino. Since the D32 pin on the RAMPS maps to D32 on Arduino, this works.
// D32 is currently selected in the RAMPS 1.3/1.4 pin file. All other boards will need changes to the respective pins_XXXXX.h file.
// WARNING: Setting the wrong pin may have unexpected and potentially disastrous outcomes. Use with caution and do your homework.
//#define Z_PROBE_ENDSTOP
#endif // ENABLE_AUTO_BED_LEVELING #endif // ENABLE_AUTO_BED_LEVELING
@ -503,15 +524,19 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
//#define MANUAL_HOME_POSITIONS // If defined, MANUAL_*_HOME_POS below will be used //#define MANUAL_HOME_POSITIONS // If defined, MANUAL_*_HOME_POS below will be used
//#define BED_CENTER_AT_0_0 // If defined, the center of the bed is at (X=0, Y=0) //#define BED_CENTER_AT_0_0 // If defined, the center of the bed is at (X=0, Y=0)
//Manual homing switch locations: // Manual homing switch locations:
// For deltabots this means top and center of the Cartesian print volume. // For deltabots this means top and center of the Cartesian print volume.
#define MANUAL_X_HOME_POS 0 #ifdef MANUAL_HOME_POSITIONS
#define MANUAL_Y_HOME_POS 0 #define MANUAL_X_HOME_POS 0
#define MANUAL_Z_HOME_POS 0 #define MANUAL_Y_HOME_POS 0
//#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing. #define MANUAL_Z_HOME_POS 0
//#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing.
#endif
/**
* MOVEMENT SETTINGS
*/
//// MOVEMENT SETTINGS
#define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
#define HOMING_FEEDRATE {50*60, 50*60, 4*60, 0} // set the homing speeds (mm/min) #define HOMING_FEEDRATE {50*60, 50*60, 4*60, 0} // set the homing speeds (mm/min)
// default settings // default settings
@ -544,9 +569,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// Custom M code points // Custom M code points
#define CUSTOM_M_CODES #define CUSTOM_M_CODES
#ifdef CUSTOM_M_CODES #ifdef CUSTOM_M_CODES
#ifdef ENABLE_AUTO_BED_LEVELING
#define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851 #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
#define Z_PROBE_OFFSET_RANGE_MIN -15 #define Z_PROBE_OFFSET_RANGE_MIN -20
#define Z_PROBE_OFFSET_RANGE_MAX -5 #define Z_PROBE_OFFSET_RANGE_MAX 20
#endif
#endif #endif
@ -557,9 +584,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. // M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
//define this to enable EEPROM support //define this to enable EEPROM support
#define EEPROM_SETTINGS #define EEPROM_SETTINGS
//to disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
// please keep turned on if you can. #ifdef EEPROM_SETTINGS
//#define EEPROM_CHITCHAT // To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
#define EEPROM_CHITCHAT // please keep turned on if you can.
#endif
// Preheat Constants // Preheat Constants
#define PLA_PREHEAT_HOTEND_TEMP 190 #define PLA_PREHEAT_HOTEND_TEMP 190
@ -573,13 +602,16 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
//==============================LCD and SD support============================= //==============================LCD and SD support=============================
// Define your display language below. Replace (en) with your language code and uncomment. // Define your display language below. Replace (en) with your language code and uncomment.
// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu // en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
// See also language.h // See also language.h
//#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
// Character based displays can have different extended charsets. // Choose ONE of these 3 charsets. This has to match your hardware. Ignored for full graphic display.
#define DISPLAY_CHARSET_HD44780_JAPAN // "ääööüüß23°" // 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.
//#define DISPLAY_CHARSET_HD44780_WESTERN // "ÄäÖöÜüß²³°" if you see a '~' instead of a 'arrow_right' at the right of submenuitems - this is the right one. // See also documentation/LCDLanguageFont.md
#define DISPLAY_CHARSET_HD44780_JAPAN // this is the most common hardware
//#define DISPLAY_CHARSET_HD44780_WESTERN
//#define DISPLAY_CHARSET_HD44780_CYRILLIC
//#define ULTRA_LCD //general LCD support, also 16x2 //#define ULTRA_LCD //general LCD support, also 16x2
//#define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family) //#define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
@ -592,6 +624,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
//#define ULTIPANEL //the UltiPanel as on Thingiverse //#define ULTIPANEL //the UltiPanel as on Thingiverse
//#define LCD_FEEDBACK_FREQUENCY_HZ 1000 // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click //#define LCD_FEEDBACK_FREQUENCY_HZ 1000 // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
// 0 to disable buzzer feedback
// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3) // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
// http://reprap.org/wiki/PanelOne // http://reprap.org/wiki/PanelOne
@ -654,7 +687,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
//#define FAST_PWM_FAN //#define FAST_PWM_FAN
// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
// which is not ass annoying as with the hardware PWM. On the other hand, if this frequency // which is not as annoying as with the hardware PWM. On the other hand, if this frequency
// is too low, you should also increment SOFT_PWM_SCALE. // is too low, you should also increment SOFT_PWM_SCALE.
//#define FAN_SOFT_PWM //#define FAN_SOFT_PWM
@ -699,7 +732,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// Servo Endstops // Servo Endstops
// //
// This allows for servo actuated endstops, primary usage is for the Z Axis to eliminate calibration or bed height changes. // This allows for servo actuated endstops, primary usage is for the Z Axis to eliminate calibration or bed height changes.
// Use M206 command to correct for switch height offset to actual nozzle height. Store that setting with M500. // Use M851 to set the z-probe vertical offset from the nozzle. Store that setting with M500.
// //
//#define SERVO_ENDSTOPS {-1, -1, 0} // Servo index for X, Y, Z. Disable with -1 //#define SERVO_ENDSTOPS {-1, -1, 0} // Servo index for X, Y, Z. Disable with -1
//#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles //#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles

@ -3,6 +3,8 @@
#include "Conditionals.h" #include "Conditionals.h"
// @section temperature
//=========================================================================== //===========================================================================
//=============================Thermal Settings ============================ //=============================Thermal Settings ============================
//=========================================================================== //===========================================================================
@ -46,6 +48,8 @@
//The M105 command return, besides traditional information, the ADC value read from temperature sensors. //The M105 command return, besides traditional information, the ADC value read from temperature sensors.
//#define SHOW_TEMP_ADC_VALUES //#define SHOW_TEMP_ADC_VALUES
// @section extruder
// extruder run-out prevention. // extruder run-out prevention.
//if the machine is idle, and the temperature over MINTEMP, every couple of SECONDS some filament is extruded //if the machine is idle, and the temperature over MINTEMP, every couple of SECONDS some filament is extruded
//#define EXTRUDER_RUNOUT_PREVENT //#define EXTRUDER_RUNOUT_PREVENT
@ -55,6 +59,8 @@
#define EXTRUDER_RUNOUT_SPEED 1500. //extrusion speed #define EXTRUDER_RUNOUT_SPEED 1500. //extrusion speed
#define EXTRUDER_RUNOUT_EXTRUDE 100 #define EXTRUDER_RUNOUT_EXTRUDE 100
// @section temperature
//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements. //These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET" //The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
#define TEMP_SENSOR_AD595_OFFSET 0.0 #define TEMP_SENSOR_AD595_OFFSET 0.0
@ -72,6 +78,8 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu) // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100 //#define FAN_KICKSTART_TIME 100
// @section extruder
// Extruder cooling fans // Extruder cooling fans
// Configure fan pin outputs to automatically turn on/off when the associated // Configure fan pin outputs to automatically turn on/off when the associated
// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE. // extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE.
@ -89,8 +97,12 @@
//=============================Mechanical Settings=========================== //=============================Mechanical Settings===========================
//=========================================================================== //===========================================================================
// @section homing
#define ENDSTOPS_ONLY_FOR_HOMING // If defined the endstops will only be used for homing #define ENDSTOPS_ONLY_FOR_HOMING // If defined the endstops will only be used for homing
// @section extras
//#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats. //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
// A single Z stepper driver is usually used to drive 2 stepper motors. // A single Z stepper driver is usually used to drive 2 stepper motors.
@ -100,6 +112,30 @@
// On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder. // On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder.
//#define Z_DUAL_STEPPER_DRIVERS //#define Z_DUAL_STEPPER_DRIVERS
#ifdef Z_DUAL_STEPPER_DRIVERS
// 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.
// That way the machine is capable to align the bed during home, since both Z steppers are homed.
// There is also an implementation of M666 (software endstops adjustment) to this feature.
// After Z homing, this adjustment is applied to just one of the steppers in order to align the bed.
// 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.
// 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.
// Play a little bit with small adjustments (0.5mm) and check the behaviour.
// The M119 (endstops report) will start reporting the Z2 Endstop as well.
#define Z_DUAL_ENDSTOPS
#ifdef Z_DUAL_ENDSTOPS
#define Z2_STEP_PIN E2_STEP_PIN // Stepper to be used to Z2 axis.
#define Z2_DIR_PIN E2_DIR_PIN
#define Z2_ENABLE_PIN E2_ENABLE_PIN
#define Z2_MAX_PIN 36 //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36)
const bool Z2_MAX_ENDSTOP_INVERTING = false;
#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.
#endif
#endif // Z_DUAL_STEPPER_DRIVERS
// Same again but for Y Axis. // Same again but for Y Axis.
//#define Y_DUAL_STEPPER_DRIVERS //#define Y_DUAL_STEPPER_DRIVERS
@ -112,53 +148,59 @@
// allowing faster printing speeds. // allowing faster printing speeds.
//#define DUAL_X_CARRIAGE //#define DUAL_X_CARRIAGE
#ifdef DUAL_X_CARRIAGE #ifdef DUAL_X_CARRIAGE
// Configuration for second X-carriage // Configuration for second X-carriage
// Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop;
// the second x-carriage always homes to the maximum endstop. // the second x-carriage always homes to the maximum endstop.
#define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
#define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed
#define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position
#define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position #define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position
// However: In this mode the EXTRUDER_OFFSET_X value for the second extruder provides a software // However: In this mode the EXTRUDER_OFFSET_X value for the second extruder provides a software
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command). // without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer. // Remember: you should set the second extruder x-offset to 0 in your slicer.
// Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h) // Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h)
#define X2_ENABLE_PIN 29 #define X2_ENABLE_PIN 29
#define X2_STEP_PIN 25 #define X2_STEP_PIN 25
#define X2_DIR_PIN 23 #define X2_DIR_PIN 23
// There are a few selectable movement modes for dual x-carriages using M605 S<mode> // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
// Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results // Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
// as long as it supports dual x-carriages. (M605 S0) // as long as it supports dual x-carriages. (M605 S0)
// Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so // Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
// that additional slicer support is not required. (M605 S1) // that additional slicer support is not required. (M605 S1)
// Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all // Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
// actions of the first x-carriage. This allows the printer to print 2 arbitrary items at // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
// once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm]) // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
// This is the default power-up mode which can be later using M605. // This is the default power-up mode which can be later using M605.
#define DEFAULT_DUAL_X_CARRIAGE_MODE 0 #define DEFAULT_DUAL_X_CARRIAGE_MODE 0
// Default settings in "Auto-park Mode" // Default settings in "Auto-park Mode"
#define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder #define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder
#define TOOLCHANGE_UNPARK_ZLIFT 1 // the distance to raise Z axis when unparking an extruder #define TOOLCHANGE_UNPARK_ZLIFT 1 // the distance to raise Z axis when unparking an extruder
// Default x offset in duplication mode (typically set to half print bed width) // Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100 #define DEFAULT_DUPLICATION_X_OFFSET 100
#endif //DUAL_X_CARRIAGE #endif //DUAL_X_CARRIAGE
// @section homing
//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again: //homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
#define X_HOME_RETRACT_MM 5 #define X_HOME_BUMP_MM 5
#define Y_HOME_RETRACT_MM 5 #define Y_HOME_BUMP_MM 5
#define Z_HOME_RETRACT_MM 3 #define Z_HOME_BUMP_MM 3
#define HOMING_BUMP_DIVISOR {10, 10, 20} // Re-Bump Speed Divisor (Divides the Homing Feedrate) #define HOMING_BUMP_DIVISOR {2, 2, 4} // Re-Bump Speed Divisor (Divides the Homing Feedrate)
//#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially. //#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
// @section machine
#define AXIS_RELATIVE_MODES {false, false, false, false} #define AXIS_RELATIVE_MODES {false, false, false, false}
// @section machine
//By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. //By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step.
#define INVERT_X_STEP_PIN false #define INVERT_X_STEP_PIN false
#define INVERT_Y_STEP_PIN false #define INVERT_Y_STEP_PIN false
@ -171,11 +213,15 @@
#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
#define DEFAULT_MINTRAVELFEEDRATE 0.0 #define DEFAULT_MINTRAVELFEEDRATE 0.0
// @section lcd
#ifdef ULTIPANEL #ifdef ULTIPANEL
#define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel
#define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder
#endif #endif
// @section extras
// minimum time in microseconds that a movement needs to take if the buffer is emptied. // minimum time in microseconds that a movement needs to take if the buffer is emptied.
#define DEFAULT_MINSEGMENTTIME 20000 #define DEFAULT_MINSEGMENTTIME 20000
@ -210,25 +256,35 @@
//=========================================================================== //===========================================================================
#define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly #define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
#define ENCODER_10X_STEPS_PER_SEC 75 // If the encoder steps per sec exceed this value, multiple the steps moved by ten to quickly advance the value #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
#define ENCODER_100X_STEPS_PER_SEC 160 // If the encoder steps per sec exceed this value, multiple the steps moved by 100 to really quickly advance the value #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
//#define ENCODER_RATE_MULTIPLIER_DEBUG // If defined, output the encoder steps per second value //#define ENCODER_RATE_MULTIPLIER_DEBUG // If defined, output the encoder steps per second value
//#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/ //#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/
#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
#define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? // @section lcd
#define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
#ifdef SDSUPPORT
// If you are using a RAMPS board or cheap E-bay purchased boards that do not detect when an SD card is inserted
// You can get round this by connecting a push button or single throw switch to the pin defined as SDCARDCARDDETECT
// in the pins.h file. When using a push button pulling the pin to ground this will need inverted. This setting should
// be commented out otherwise
#define SDCARDDETECTINVERTED
#define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers?
// 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. #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
// using:
//#define MENU_ADDAUTOSTART
// Show a progress bar on HD44780 LCDs for SD printing #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order.
//#define LCD_PROGRESS_BAR // 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.
// using:
//#define MENU_ADDAUTOSTART
#ifdef LCD_PROGRESS_BAR // Show a progress bar on HD44780 LCDs for SD printing
//#define LCD_PROGRESS_BAR
#ifdef LCD_PROGRESS_BAR
// Amount of time (ms) to show the bar // Amount of time (ms) to show the bar
#define PROGRESS_BAR_BAR_TIME 2000 #define PROGRESS_BAR_BAR_TIME 2000
// Amount of time (ms) to show the status message // Amount of time (ms) to show the status message
@ -237,7 +293,11 @@
#define PROGRESS_MSG_EXPIRE 0 #define PROGRESS_MSG_EXPIRE 0
// Enable this to show messages for MSG_TIME then hide them // Enable this to show messages for MSG_TIME then hide them
//#define PROGRESS_MSG_ONCE //#define PROGRESS_MSG_ONCE
#endif #endif
#endif // SDSUPPORT
// @section more
// The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation. // The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
//#define USE_WATCHDOG //#define USE_WATCHDOG
@ -252,6 +312,8 @@
// Enable the option to stop SD printing when hitting and endstops, needs to be enabled from the LCD menu when this option is enabled. // Enable the option to stop SD printing when hitting and endstops, needs to be enabled from the LCD menu when this option is enabled.
//#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
// @section lcd
// Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process // Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process
// it can e.g. be used to change z-positions in the print startup phase in real-time // it can e.g. be used to change z-positions in the print startup phase in real-time
// does not respect endstops! // does not respect endstops!
@ -262,6 +324,8 @@
#define BABYSTEP_Z_MULTIPLICATOR 2 //faster z movements #define BABYSTEP_Z_MULTIPLICATOR 2 //faster z movements
#endif #endif
// @section extruder
// extruder advance constant (s2/mm3) // extruder advance constant (s2/mm3)
// //
// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2 // advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
@ -275,7 +339,9 @@
#define EXTRUDER_ADVANCE_K .0 #define EXTRUDER_ADVANCE_K .0
#define D_FILAMENT 2.85 #define D_FILAMENT 2.85
#define STEPS_MM_E 836 #define STEPS_MM_E 836
#endif // ADVANCE #endif
// @section extras
// Arc interpretation settings: // Arc interpretation settings:
#define MM_PER_ARC_SEGMENT 1 #define MM_PER_ARC_SEGMENT 1
@ -283,11 +349,7 @@
const unsigned int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement const unsigned int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement
// If you are using a RAMPS board or cheap E-bay purchased boards that do not detect when an SD card is inserted // @section temperature
// You can get round this by connecting a push button or single throw switch to the pin defined as SDCARDCARDDETECT
// in the pins.h file. When using a push button pulling the pin to ground this will need inverted. This setting should
// be commented out otherwise
#define SDCARDDETECTINVERTED
// Control heater 0 and heater 1 in parallel. // Control heater 0 and heater 1 in parallel.
//#define HEATERS_PARALLEL //#define HEATERS_PARALLEL
@ -296,19 +358,23 @@ const unsigned int dropsegments=5; //everything with less than this number of st
//=============================Buffers ============================ //=============================Buffers ============================
//=========================================================================== //===========================================================================
// @section hidden
// The number of linear motions that can be in the plan at any give time. // The number of linear motions that can be in the plan at any give time.
// 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. // 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.
#if defined SDSUPPORT #ifdef SDSUPPORT
#define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
#else #else
#define BLOCK_BUFFER_SIZE 16 // maximize block buffer #define BLOCK_BUFFER_SIZE 16 // maximize block buffer
#endif #endif
// @section more
//The ASCII buffer for receiving from the serial: //The ASCII buffer for receiving from the serial:
#define MAX_CMD_SIZE 96 #define MAX_CMD_SIZE 96
#define BUFSIZE 4 #define BUFSIZE 4
// @section fwretract
// Firmware based and LCD controlled retract // Firmware based and LCD controlled retract
// M207 and M208 can be used to define parameters for the retraction. // M207 and M208 can be used to define parameters for the retraction.
@ -340,6 +406,143 @@ const unsigned int dropsegments=5; //everything with less than this number of st
#endif #endif
#endif #endif
/******************************************************************************\
* enable this section if you have TMC26X motor drivers.
* you need to import the TMC26XStepper library into the arduino IDE for this
******************************************************************************/
// @section tmc
//#define HAVE_TMCDRIVER
#ifdef HAVE_TMCDRIVER
// #define X_IS_TMC
#define X_MAX_CURRENT 1000 //in mA
#define X_SENSE_RESISTOR 91 //in mOhms
#define X_MICROSTEPS 16 //number of microsteps
// #define X2_IS_TMC
#define X2_MAX_CURRENT 1000 //in mA
#define X2_SENSE_RESISTOR 91 //in mOhms
#define X2_MICROSTEPS 16 //number of microsteps
// #define Y_IS_TMC
#define Y_MAX_CURRENT 1000 //in mA
#define Y_SENSE_RESISTOR 91 //in mOhms
#define Y_MICROSTEPS 16 //number of microsteps
// #define Y2_IS_TMC
#define Y2_MAX_CURRENT 1000 //in mA
#define Y2_SENSE_RESISTOR 91 //in mOhms
#define Y2_MICROSTEPS 16 //number of microsteps
// #define Z_IS_TMC
#define Z_MAX_CURRENT 1000 //in mA
#define Z_SENSE_RESISTOR 91 //in mOhms
#define Z_MICROSTEPS 16 //number of microsteps
// #define Z2_IS_TMC
#define Z2_MAX_CURRENT 1000 //in mA
#define Z2_SENSE_RESISTOR 91 //in mOhms
#define Z2_MICROSTEPS 16 //number of microsteps
// #define E0_IS_TMC
#define E0_MAX_CURRENT 1000 //in mA
#define E0_SENSE_RESISTOR 91 //in mOhms
#define E0_MICROSTEPS 16 //number of microsteps
// #define E1_IS_TMC
#define E1_MAX_CURRENT 1000 //in mA
#define E1_SENSE_RESISTOR 91 //in mOhms
#define E1_MICROSTEPS 16 //number of microsteps
// #define E2_IS_TMC
#define E2_MAX_CURRENT 1000 //in mA
#define E2_SENSE_RESISTOR 91 //in mOhms
#define E2_MICROSTEPS 16 //number of microsteps
// #define E3_IS_TMC
#define E3_MAX_CURRENT 1000 //in mA
#define E3_SENSE_RESISTOR 91 //in mOhms
#define E3_MICROSTEPS 16 //number of microsteps
#endif
/******************************************************************************\
* enable this section if you have L6470 motor drivers.
* you need to import the L6470 library into the arduino IDE for this
******************************************************************************/
// @section l6470
//#define HAVE_L6470DRIVER
#ifdef HAVE_L6470DRIVER
// #define X_IS_L6470
#define X_MICROSTEPS 16 //number of microsteps
#define X_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define X_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define X2_IS_L6470
#define X2_MICROSTEPS 16 //number of microsteps
#define X2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define X2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define Y_IS_L6470
#define Y_MICROSTEPS 16 //number of microsteps
#define Y_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define Y_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define Y2_IS_L6470
#define Y2_MICROSTEPS 16 //number of microsteps
#define Y2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define Y2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define Z_IS_L6470
#define Z_MICROSTEPS 16 //number of microsteps
#define Z_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define Z_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define Z2_IS_L6470
#define Z2_MICROSTEPS 16 //number of microsteps
#define Z2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define Z2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define E0_IS_L6470
#define E0_MICROSTEPS 16 //number of microsteps
#define E0_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define E0_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define E1_IS_L6470
#define E1_MICROSTEPS 16 //number of microsteps
#define E1_MICROSTEPS 16 //number of microsteps
#define E1_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define E1_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define E2_IS_L6470
#define E2_MICROSTEPS 16 //number of microsteps
#define E2_MICROSTEPS 16 //number of microsteps
#define E2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define E2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define E3_IS_L6470
#define E3_MICROSTEPS 16 //number of microsteps
#define E3_MICROSTEPS 16 //number of microsteps
#define E3_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define E3_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall
#endif
#include "Conditionals.h" #include "Conditionals.h"
#include "SanityCheck.h" #include "SanityCheck.h"

@ -56,7 +56,7 @@ Here are some standard links for getting your machine calibrated:
// User-specified version info of this build to display in [Pronterface, etc] terminal window during // User-specified version info of this build to display in [Pronterface, etc] terminal window during
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
// build by the user have been successfully uploaded into firmware. // build by the user have been successfully uploaded into firmware.
#define STRING_VERSION "1.0.2" #define STRING_VERSION "1.0.3 dev"
#define STRING_URL "reprap.org" #define STRING_URL "reprap.org"
#define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
@ -80,8 +80,9 @@ Here are some standard links for getting your machine calibrated:
#define MOTHERBOARD BOARD_RAMPS_13_EFB #define MOTHERBOARD BOARD_RAMPS_13_EFB
#endif #endif
// Define this to set a custom name for your generic Mendel, // Optional custom name for your RepStrap or other custom machine
// #define CUSTOM_MENDEL_NAME "This Mendel" // Displayed in the LCD "Ready" message
// #define CUSTOM_MACHINE_NAME "3D Printer"
// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines) // Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines)
// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) // You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4)
@ -140,7 +141,7 @@ Here are some standard links for getting your machine calibrated:
// Use it for Testing or Development purposes. NEVER for production machine. // Use it for Testing or Development purposes. NEVER for production machine.
// #define DUMMY_THERMISTOR_998_VALUE 25 // #define DUMMY_THERMISTOR_998_VALUE 25
// #define DUMMY_THERMISTOR_999_VALUE 100 // #define DUMMY_THERMISTOR_999_VALUE 100
// :{ '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" }
#define TEMP_SENSOR_0 1 #define TEMP_SENSOR_0 1
#define TEMP_SENSOR_1 0 #define TEMP_SENSOR_1 0
#define TEMP_SENSOR_2 0 #define TEMP_SENSOR_2 0
@ -202,7 +203,6 @@ Here are some standard links for getting your machine calibrated:
// is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
#define PID_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term #define PID_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term
#define K1 0.95 //smoothing factor within the PID #define K1 0.95 //smoothing factor within the PID
#define PID_dT ((OVERSAMPLENR * 10.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine
// If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
// Ultimaker // Ultimaker
@ -238,7 +238,7 @@ Here are some standard links for getting your machine calibrated:
// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis // Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
// //
// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. // Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder.
// If your PID_dT above is the default, and correct for your hardware/configuration, that means 7.689Hz, // If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz,
// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. // which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. // This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
// If your configuration is significantly different than this and you don't understand the issues involved, you probably // If your configuration is significantly different than this and you don't understand the issues involved, you probably
@ -351,13 +351,14 @@ your extruder heater takes 2 minutes to hit the target on heating.
// #define ENDSTOPPULLUP_ZMIN // #define ENDSTOPPULLUP_ZMIN
#endif #endif
// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins. // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
const bool X_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. const bool X_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Y_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. const bool Y_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Z_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. const bool Z_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
//#define DISABLE_MAX_ENDSTOPS //#define DISABLE_MAX_ENDSTOPS
//#define DISABLE_MIN_ENDSTOPS //#define DISABLE_MIN_ENDSTOPS
@ -374,13 +375,14 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#define DISABLE_E false // For all extruders #define DISABLE_E false // For all extruders
#define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled #define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled
#define INVERT_X_DIR false // for Mendel set to false, for Orca set to true // Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
#define INVERT_Y_DIR false // for Mendel set to true, for Orca set to false #define INVERT_X_DIR false
#define INVERT_Z_DIR true // for Mendel set to false, for Orca set to true #define INVERT_Y_DIR false
#define INVERT_E0_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false #define INVERT_Z_DIR true
#define INVERT_E1_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false #define INVERT_E0_DIR false
#define INVERT_E2_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false #define INVERT_E1_DIR false
#define INVERT_E3_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false #define INVERT_E2_DIR false
#define INVERT_E3_DIR false
// ENDSTOP SETTINGS: // ENDSTOP SETTINGS:
// Sets direction of endstops when homing; 1=MAX, -1=MIN // Sets direction of endstops when homing; 1=MAX, -1=MIN
@ -392,12 +394,12 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below. #define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below.
// Travel limits after homing (units are in mm) // Travel limits after homing (units are in mm)
#define X_MAX_POS 200
#define X_MIN_POS 0 #define X_MIN_POS 0
#define Y_MAX_POS 200
#define Y_MIN_POS 0 #define Y_MIN_POS 0
#define Z_MAX_POS 225
#define Z_MIN_POS MANUAL_Z_HOME_POS #define Z_MIN_POS MANUAL_Z_HOME_POS
#define X_MAX_POS 200
#define Y_MAX_POS 200
#define Z_MAX_POS 225
//=========================================================================== //===========================================================================
//============================= Filament Runout Sensor ====================== //============================= Filament Runout Sensor ======================
@ -416,7 +418,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// #define MANUAL_BED_LEVELING // Add display menu option for bed leveling // #define MANUAL_BED_LEVELING // Add display menu option for bed leveling
// #define MESH_BED_LEVELING // Enable mesh bed leveling // #define MESH_BED_LEVELING // Enable mesh bed leveling
#if defined(MESH_BED_LEVELING) #ifdef MANUAL_BED_LEVELING
#define MBL_Z_STEP 0.025
#endif // MANUAL_BED_LEVELING
#ifdef MESH_BED_LEVELING
#define MESH_MIN_X 10 #define MESH_MIN_X 10
#define MESH_MAX_X (X_MAX_POS - MESH_MIN_X) #define MESH_MAX_X (X_MAX_POS - MESH_MIN_X)
#define MESH_MIN_Y 10 #define MESH_MIN_Y 10
@ -463,7 +469,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// You probably don't need more than 3 (squared=9) // You probably don't need more than 3 (squared=9)
#define AUTO_BED_LEVELING_GRID_POINTS 2 #define AUTO_BED_LEVELING_GRID_POINTS 2
#else // !AUTO_BED_LEVELING_GRID #else // !AUTO_BED_LEVELING_GRID
// Arbitrary points to probe. A simple cross-product // Arbitrary points to probe. A simple cross-product
@ -477,11 +482,10 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#endif // AUTO_BED_LEVELING_GRID #endif // AUTO_BED_LEVELING_GRID
// Offsets to the probe relative to the extruder tip (Hotend - Probe) // Offsets to the probe relative to the extruder tip (Hotend - Probe)
// X and Y offsets must be integers // X and Y offsets must be integers
#define X_PROBE_OFFSET_FROM_EXTRUDER -25 // -left +right #define X_PROBE_OFFSET_FROM_EXTRUDER -25 // Probe on: -left +right
#define Y_PROBE_OFFSET_FROM_EXTRUDER -29 // -front +behind #define Y_PROBE_OFFSET_FROM_EXTRUDER -29 // Probe on: -front +behind
#define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35 // -below (always!) #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35 // -below (always!)
//#define Z_RAISE_BEFORE_HOMING 4 // (in mm) Raise Z before homing (G28) for Probe Clearance. //#define Z_RAISE_BEFORE_HOMING 4 // (in mm) Raise Z before homing (G28) for Probe Clearance.
@ -493,6 +497,9 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#define Z_RAISE_BETWEEN_PROBINGS 5 //How much the extruder will be raised when traveling from between next probing points #define Z_RAISE_BETWEEN_PROBINGS 5 //How much the extruder will be raised when traveling from between next probing points
#define Z_RAISE_AFTER_PROBING 15 //How much the extruder will be raised after the last probing point. #define Z_RAISE_AFTER_PROBING 15 //How much the extruder will be raised after the last probing point.
// #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.
//Useful to retract a deployable probe.
//#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell //#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell
//#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. //#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,6 +527,20 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#endif #endif
// Support for a dedicated Z PROBE endstop separate from the Z MIN endstop.
// If you would like to use both a Z PROBE and a Z MIN endstop together or just a Z PROBE with a custom pin, uncomment #define Z_PROBE_ENDSTOP and read the instructions below.
// If you want to still use the Z min endstop for homing, disable Z_SAFE_HOMING above. Eg; to park the head outside the bed area when homing with G28.
// WARNING: The Z MIN endstop will need to set properly as it would without a Z PROBE to prevent head crashes and premature stopping during a print.
// To use a separate Z PROBE endstop, you must have a Z_PROBE_PIN defined in the pins.h file for your control board.
// If you are using a servo based Z PROBE, you will need to enable NUM_SERVOS, SERVO_ENDSTOPS and SERVO_ENDSTOPS_ANGLES in the R/C Servo below.
// RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin in the Aux 4 section of the RAMPS board. Use 5V for powered sensors, otherwise connect to ground and D32
// for normally closed configuration and 5V and D32 for normally open configurations. Normally closed configuration is advised and assumed.
// The D32 pin in Aux 4 on RAMPS maps to the Arduino D32 pin. Z_PROBE_PIN is setting the pin to use on the Arduino. Since the D32 pin on the RAMPS maps to D32 on Arduino, this works.
// D32 is currently selected in the RAMPS 1.3/1.4 pin file. All other boards will need changes to the respective pins_XXXXX.h file.
// WARNING: Setting the wrong pin may have unexpected and potentially disastrous outcomes. Use with caution and do your homework.
//#define Z_PROBE_ENDSTOP
#endif // ENABLE_AUTO_BED_LEVELING #endif // ENABLE_AUTO_BED_LEVELING
@ -527,16 +548,19 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#define MANUAL_HOME_POSITIONS // If defined, MANUAL_*_HOME_POS below will be used #define MANUAL_HOME_POSITIONS // If defined, MANUAL_*_HOME_POS below will be used
//#define BED_CENTER_AT_0_0 // If defined, the center of the bed is at (X=0, Y=0) //#define BED_CENTER_AT_0_0 // If defined, the center of the bed is at (X=0, Y=0)
//Manual homing switch locations: // Manual homing switch locations:
// For deltabots this means top and center of the Cartesian print volume. // For deltabots this means top and center of the Cartesian print volume.
// For SCARA: Offset between HomingPosition and Bed X=0 / Y=0 #ifdef MANUAL_HOME_POSITIONS
#define MANUAL_X_HOME_POS -22. // For SCARA: Offset between HomingPosition and Bed X=0 / Y=0
#define MANUAL_Y_HOME_POS -52. #define MANUAL_X_HOME_POS -22.
#define MANUAL_Z_HOME_POS 0.1 // Distance between nozzle and print surface after homing. #define MANUAL_Y_HOME_POS -52.
#define MANUAL_Z_HOME_POS 0.1 // Distance between nozzle and print surface after homing.
#endif
/**
* MOVEMENT SETTINGS
*/
//// MOVEMENT SETTINGS
#define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
#define HOMING_FEEDRATE {40*60, 40*60, 10*60, 0} // set the homing speeds (mm/min) #define HOMING_FEEDRATE {40*60, 40*60, 10*60, 0} // set the homing speeds (mm/min)
// default settings // default settings
@ -549,8 +573,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#define DEFAULT_RETRACT_ACCELERATION 2000 // E acceleration in mm/s^2 for retracts #define DEFAULT_RETRACT_ACCELERATION 2000 // E acceleration in mm/s^2 for retracts
#define DEFAULT_TRAVEL_ACCELERATION 400 // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves #define DEFAULT_TRAVEL_ACCELERATION 400 // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing). // Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder). // The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).
// For the other hotends it is their distance from the extruder 0 hotend. // For the other hotends it is their distance from the extruder 0 hotend.
@ -570,9 +592,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// Custom M code points // Custom M code points
//#define CUSTOM_M_CODES //#define CUSTOM_M_CODES
#ifdef CUSTOM_M_CODES #ifdef CUSTOM_M_CODES
#ifdef ENABLE_AUTO_BED_LEVELING
#define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851 #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
#define Z_PROBE_OFFSET_RANGE_MIN -15 #define Z_PROBE_OFFSET_RANGE_MIN -20
#define Z_PROBE_OFFSET_RANGE_MAX -5 #define Z_PROBE_OFFSET_RANGE_MAX 20
#endif
#endif #endif
@ -583,9 +607,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. // M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
//define this to enable EEPROM support //define this to enable EEPROM support
//#define EEPROM_SETTINGS //#define EEPROM_SETTINGS
//to disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
// please keep turned on if you can. #ifdef EEPROM_SETTINGS
#define EEPROM_CHITCHAT // To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
#define EEPROM_CHITCHAT // please keep turned on if you can.
#endif
// Preheat Constants // Preheat Constants
#define PLA_PREHEAT_HOTEND_TEMP 180 #define PLA_PREHEAT_HOTEND_TEMP 180
@ -599,13 +625,16 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
//==============================LCD and SD support============================= //==============================LCD and SD support=============================
// Define your display language below. Replace (en) with your language code and uncomment. // Define your display language below. Replace (en) with your language code and uncomment.
// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu // en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
// See also language.h // See also language.h
//#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
// Character based displays can have different extended charsets. // Choose ONE of these 3 charsets. This has to match your hardware. Ignored for full graphic display.
#define DISPLAY_CHARSET_HD44780_JAPAN // "ääööüüß23°" // 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.
//#define DISPLAY_CHARSET_HD44780_WESTERN // "ÄäÖöÜüß²³°" if you see a '~' instead of a 'arrow_right' at the right of submenuitems - this is the right one. // See also documentation/LCDLanguageFont.md
#define DISPLAY_CHARSET_HD44780_JAPAN // this is the most common hardware
//#define DISPLAY_CHARSET_HD44780_WESTERN
//#define DISPLAY_CHARSET_HD44780_CYRILLIC
//#define ULTRA_LCD //general LCD support, also 16x2 //#define ULTRA_LCD //general LCD support, also 16x2
//#define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family) //#define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
@ -618,6 +647,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
//#define ULTIPANEL //the UltiPanel as on Thingiverse //#define ULTIPANEL //the UltiPanel as on Thingiverse
//#define LCD_FEEDBACK_FREQUENCY_HZ 1000 // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click //#define LCD_FEEDBACK_FREQUENCY_HZ 1000 // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
// 0 to disable buzzer feedback
// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3) // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
// http://reprap.org/wiki/PanelOne // http://reprap.org/wiki/PanelOne
@ -680,7 +710,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
//#define FAST_PWM_FAN //#define FAST_PWM_FAN
// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
// which is not ass annoying as with the hardware PWM. On the other hand, if this frequency // which is not as annoying as with the hardware PWM. On the other hand, if this frequency
// is too low, you should also increment SOFT_PWM_SCALE. // is too low, you should also increment SOFT_PWM_SCALE.
//#define FAN_SOFT_PWM //#define FAN_SOFT_PWM
@ -725,7 +755,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// Servo Endstops // Servo Endstops
// //
// This allows for servo actuated endstops, primary usage is for the Z Axis to eliminate calibration or bed height changes. // This allows for servo actuated endstops, primary usage is for the Z Axis to eliminate calibration or bed height changes.
// Use M206 command to correct for switch height offset to actual nozzle height. Store that setting with M500. // Use M851 to set the z-probe vertical offset from the nozzle. Store that setting with M500.
// //
//#define SERVO_ENDSTOPS {-1, -1, 0} // Servo index for X, Y, Z. Disable with -1 //#define SERVO_ENDSTOPS {-1, -1, 0} // Servo index for X, Y, Z. Disable with -1
//#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles //#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles

@ -3,6 +3,8 @@
#include "Conditionals.h" #include "Conditionals.h"
// @section temperature
//=========================================================================== //===========================================================================
//=============================Thermal Settings ============================ //=============================Thermal Settings ============================
//=========================================================================== //===========================================================================
@ -46,6 +48,8 @@
//The M105 command return, besides traditional information, the ADC value read from temperature sensors. //The M105 command return, besides traditional information, the ADC value read from temperature sensors.
//#define SHOW_TEMP_ADC_VALUES //#define SHOW_TEMP_ADC_VALUES
// @section extruder
// extruder run-out prevention. // extruder run-out prevention.
//if the machine is idle, and the temperature over MINTEMP, every couple of SECONDS some filament is extruded //if the machine is idle, and the temperature over MINTEMP, every couple of SECONDS some filament is extruded
//#define EXTRUDER_RUNOUT_PREVENT //#define EXTRUDER_RUNOUT_PREVENT
@ -55,6 +59,8 @@
#define EXTRUDER_RUNOUT_SPEED 180. //extrusion speed #define EXTRUDER_RUNOUT_SPEED 180. //extrusion speed
#define EXTRUDER_RUNOUT_EXTRUDE 100 #define EXTRUDER_RUNOUT_EXTRUDE 100
// @section temperature
//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements. //These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET" //The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
#define TEMP_SENSOR_AD595_OFFSET 0.0 #define TEMP_SENSOR_AD595_OFFSET 0.0
@ -72,6 +78,8 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu) // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100 //#define FAN_KICKSTART_TIME 100
// @section extruder
// Extruder cooling fans // Extruder cooling fans
// Configure fan pin outputs to automatically turn on/off when the associated // Configure fan pin outputs to automatically turn on/off when the associated
// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE. // extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE.
@ -89,8 +97,12 @@
//=============================Mechanical Settings=========================== //=============================Mechanical Settings===========================
//=========================================================================== //===========================================================================
// @section homing
#define ENDSTOPS_ONLY_FOR_HOMING // If defined the endstops will only be used for homing #define ENDSTOPS_ONLY_FOR_HOMING // If defined the endstops will only be used for homing
// @section extras
//#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats. //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
// A single Z stepper driver is usually used to drive 2 stepper motors. // A single Z stepper driver is usually used to drive 2 stepper motors.
@ -100,6 +112,30 @@
// On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder. // On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder.
//#define Z_DUAL_STEPPER_DRIVERS //#define Z_DUAL_STEPPER_DRIVERS
#ifdef Z_DUAL_STEPPER_DRIVERS
// 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.
// That way the machine is capable to align the bed during home, since both Z steppers are homed.
// There is also an implementation of M666 (software endstops adjustment) to this feature.
// After Z homing, this adjustment is applied to just one of the steppers in order to align the bed.
// 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.
// 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.
// Play a little bit with small adjustments (0.5mm) and check the behaviour.
// The M119 (endstops report) will start reporting the Z2 Endstop as well.
#define Z_DUAL_ENDSTOPS
#ifdef Z_DUAL_ENDSTOPS
#define Z2_STEP_PIN E2_STEP_PIN // Stepper to be used to Z2 axis.
#define Z2_DIR_PIN E2_DIR_PIN
#define Z2_ENABLE_PIN E2_ENABLE_PIN
#define Z2_MAX_PIN 36 //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36)
const bool Z2_MAX_ENDSTOP_INVERTING = false;
#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.
#endif
#endif // Z_DUAL_STEPPER_DRIVERS
// Same again but for Y Axis. // Same again but for Y Axis.
//#define Y_DUAL_STEPPER_DRIVERS //#define Y_DUAL_STEPPER_DRIVERS
@ -112,54 +148,58 @@
// allowing faster printing speeds. // allowing faster printing speeds.
//#define DUAL_X_CARRIAGE //#define DUAL_X_CARRIAGE
#ifdef DUAL_X_CARRIAGE #ifdef DUAL_X_CARRIAGE
// Configuration for second X-carriage // Configuration for second X-carriage
// Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop;
// the second x-carriage always homes to the maximum endstop. // the second x-carriage always homes to the maximum endstop.
#define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
#define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed
#define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position
#define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position #define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position
// However: In this mode the EXTRUDER_OFFSET_X value for the second extruder provides a software // However: In this mode the EXTRUDER_OFFSET_X value for the second extruder provides a software
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command). // without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer. // Remember: you should set the second extruder x-offset to 0 in your slicer.
// Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h) // Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h)
#define X2_ENABLE_PIN 29 #define X2_ENABLE_PIN 29
#define X2_STEP_PIN 25 #define X2_STEP_PIN 25
#define X2_DIR_PIN 23 #define X2_DIR_PIN 23
// There are a few selectable movement modes for dual x-carriages using M605 S<mode> // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
// Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results // Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
// as long as it supports dual x-carriages. (M605 S0) // as long as it supports dual x-carriages. (M605 S0)
// Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so // Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
// that additional slicer support is not required. (M605 S1) // that additional slicer support is not required. (M605 S1)
// Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all // Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
// actions of the first x-carriage. This allows the printer to print 2 arbitrary items at // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
// once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm]) // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
// This is the default power-up mode which can be later using M605. // This is the default power-up mode which can be later using M605.
#define DEFAULT_DUAL_X_CARRIAGE_MODE 0 #define DEFAULT_DUAL_X_CARRIAGE_MODE 0
// Default settings in "Auto-park Mode" // Default settings in "Auto-park Mode"
#define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder #define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder
#define TOOLCHANGE_UNPARK_ZLIFT 1 // the distance to raise Z axis when unparking an extruder #define TOOLCHANGE_UNPARK_ZLIFT 1 // the distance to raise Z axis when unparking an extruder
// Default x offset in duplication mode (typically set to half print bed width) // Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100 #define DEFAULT_DUPLICATION_X_OFFSET 100
#endif //DUAL_X_CARRIAGE #endif //DUAL_X_CARRIAGE
// @section homing
//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again: //homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
#define X_HOME_RETRACT_MM 3 #define X_HOME_BUMP_MM 3
#define Y_HOME_RETRACT_MM 3 #define Y_HOME_BUMP_MM 3
#define Z_HOME_RETRACT_MM 3 #define Z_HOME_BUMP_MM 3
#define HOMING_BUMP_DIVISOR {10, 10, 20} // Re-Bump Speed Divisor (Divides the Homing Feedrate) #define HOMING_BUMP_DIVISOR {2, 2, 4} // Re-Bump Speed Divisor (Divides the Homing Feedrate)
//#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially. //#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
// @section machine
#define AXIS_RELATIVE_MODES {false, false, false, false} #define AXIS_RELATIVE_MODES {false, false, false, false}
#define MAX_STEP_FREQUENCY 40000 // Max step frequency for Ultimaker (5000 pps / half step) // @section machine
//By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. //By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step.
#define INVERT_X_STEP_PIN false #define INVERT_X_STEP_PIN false
@ -173,11 +213,15 @@
#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
#define DEFAULT_MINTRAVELFEEDRATE 0.0 #define DEFAULT_MINTRAVELFEEDRATE 0.0
// @section lcd
#ifdef ULTIPANEL #ifdef ULTIPANEL
#define MANUAL_FEEDRATE {50*60, 50*60, 10*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel #define MANUAL_FEEDRATE {50*60, 50*60, 10*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel
#define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder
#endif #endif
// @section extras
// minimum time in microseconds that a movement needs to take if the buffer is emptied. // minimum time in microseconds that a movement needs to take if the buffer is emptied.
#define DEFAULT_MINSEGMENTTIME 20000 #define DEFAULT_MINSEGMENTTIME 20000
@ -212,25 +256,35 @@
//=========================================================================== //===========================================================================
#define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly #define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
#define ENCODER_10X_STEPS_PER_SEC 75 // If the encoder steps per sec exceed this value, multiple the steps moved by ten to quickly advance the value #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
#define ENCODER_100X_STEPS_PER_SEC 160 // If the encoder steps per sec exceed this value, multiple the steps moved by 100 to really quickly advance the value #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
//#define ENCODER_RATE_MULTIPLIER_DEBUG // If defined, output the encoder steps per second value //#define ENCODER_RATE_MULTIPLIER_DEBUG // If defined, output the encoder steps per second value
//#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/ //#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/
#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
#define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? // @section lcd
#define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
#ifdef SDSUPPORT
// If you are using a RAMPS board or cheap E-bay purchased boards that do not detect when an SD card is inserted
// You can get round this by connecting a push button or single throw switch to the pin defined as SDCARDCARDDETECT
// in the pins.h file. When using a push button pulling the pin to ground this will need inverted. This setting should
// be commented out otherwise
#define SDCARDDETECTINVERTED
#define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers?
#define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
#define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order.
// 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. // 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.
// using: // using:
//#define MENU_ADDAUTOSTART //#define MENU_ADDAUTOSTART
// Show a progress bar on the LCD when printing from SD? // Show a progress bar on HD44780 LCDs for SD printing
//#define LCD_PROGRESS_BAR //#define LCD_PROGRESS_BAR
#ifdef LCD_PROGRESS_BAR #ifdef LCD_PROGRESS_BAR
// Amount of time (ms) to show the bar // Amount of time (ms) to show the bar
#define PROGRESS_BAR_BAR_TIME 2000 #define PROGRESS_BAR_BAR_TIME 2000
// Amount of time (ms) to show the status message // Amount of time (ms) to show the status message
@ -239,7 +293,11 @@
#define PROGRESS_MSG_EXPIRE 0 #define PROGRESS_MSG_EXPIRE 0
// Enable this to show messages for MSG_TIME then hide them // Enable this to show messages for MSG_TIME then hide them
//#define PROGRESS_MSG_ONCE //#define PROGRESS_MSG_ONCE
#endif #endif
#endif // SDSUPPORT
// @section more
// The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation. // The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
//#define USE_WATCHDOG //#define USE_WATCHDOG
@ -254,6 +312,8 @@
// Enable the option to stop SD printing when hitting and endstops, needs to be enabled from the LCD menu when this option is enabled. // Enable the option to stop SD printing when hitting and endstops, needs to be enabled from the LCD menu when this option is enabled.
//#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
// @section lcd
// Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process // Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process
// it can e.g. be used to change z-positions in the print startup phase in real-time // it can e.g. be used to change z-positions in the print startup phase in real-time
// does not respect endstops! // does not respect endstops!
@ -264,6 +324,8 @@
#define BABYSTEP_Z_MULTIPLICATOR 2 //faster z movements #define BABYSTEP_Z_MULTIPLICATOR 2 //faster z movements
#endif #endif
// @section extruder
// extruder advance constant (s2/mm3) // extruder advance constant (s2/mm3)
// //
// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2 // advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
@ -275,13 +337,11 @@
#ifdef ADVANCE #ifdef ADVANCE
#define EXTRUDER_ADVANCE_K .0 #define EXTRUDER_ADVANCE_K .0
#define D_FILAMENT 1.75 #define D_FILAMENT 1.75
#define STEPS_MM_E 1000 #define STEPS_MM_E 1000
#define EXTRUSION_AREA (0.25 * D_FILAMENT * D_FILAMENT * 3.14159) #endif
#define STEPS_PER_CUBIC_MM_E (axis_steps_per_unit[E_AXIS]/ EXTRUSION_AREA)
#endif // ADVANCE // @section extras
// Arc interpretation settings: // Arc interpretation settings:
#define MM_PER_ARC_SEGMENT 1 #define MM_PER_ARC_SEGMENT 1
@ -289,11 +349,7 @@
const unsigned int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement const unsigned int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement
// If you are using a RAMPS board or cheap E-bay purchased boards that do not detect when an SD card is inserted // @section temperature
// You can get round this by connecting a push button or single throw switch to the pin defined as SDCARDCARDDETECT
// in the pins.h file. When using a push button pulling the pin to ground this will need inverted. This setting should
// be commented out otherwise
#define SDCARDDETECTINVERTED
// Control heater 0 and heater 1 in parallel. // Control heater 0 and heater 1 in parallel.
//#define HEATERS_PARALLEL //#define HEATERS_PARALLEL
@ -302,19 +358,23 @@ const unsigned int dropsegments=5; //everything with less than this number of st
//=============================Buffers ============================ //=============================Buffers ============================
//=========================================================================== //===========================================================================
// @section hidden
// The number of linear motions that can be in the plan at any give time. // The number of linear motions that can be in the plan at any give time.
// 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. // 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.
#if defined SDSUPPORT #ifdef SDSUPPORT
#define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
#else #else
#define BLOCK_BUFFER_SIZE 16 // maximize block buffer #define BLOCK_BUFFER_SIZE 16 // maximize block buffer
#endif #endif
// @section more
//The ASCII buffer for receiving from the serial: //The ASCII buffer for receiving from the serial:
#define MAX_CMD_SIZE 96 #define MAX_CMD_SIZE 96
#define BUFSIZE 4 #define BUFSIZE 4
// @section fwretract
// Firmware based and LCD controlled retract // Firmware based and LCD controlled retract
// M207 and M208 can be used to define parameters for the retraction. // M207 and M208 can be used to define parameters for the retraction.
@ -326,9 +386,11 @@ const unsigned int dropsegments=5; //everything with less than this number of st
#ifdef FWRETRACT #ifdef FWRETRACT
#define MIN_RETRACT 0.1 //minimum extruded mm to accept a automatic gcode retraction attempt #define MIN_RETRACT 0.1 //minimum extruded mm to accept a automatic gcode retraction attempt
#define RETRACT_LENGTH 3 //default retract length (positive mm) #define RETRACT_LENGTH 3 //default retract length (positive mm)
#define RETRACT_LENGTH_SWAP 13 //default swap retract length (positive mm), for extruder change
#define RETRACT_FEEDRATE 35 //default feedrate for retracting (mm/s) #define RETRACT_FEEDRATE 35 //default feedrate for retracting (mm/s)
#define RETRACT_ZLIFT 0 //default retract Z-lift #define RETRACT_ZLIFT 0 //default retract Z-lift
#define RETRACT_RECOVER_LENGTH 0 //default additional recover length (mm, added to retract length when recovering) #define RETRACT_RECOVER_LENGTH 0 //default additional recover length (mm, added to retract length when recovering)
#define RETRACT_RECOVER_LENGTH_SWAP 0 //default additional swap recover length (mm, added to retract length when recovering from extruder change)
#define RETRACT_RECOVER_FEEDRATE 8 //default feedrate for recovering from retraction (mm/s) #define RETRACT_RECOVER_FEEDRATE 8 //default feedrate for recovering from retraction (mm/s)
#endif #endif
@ -344,6 +406,143 @@ const unsigned int dropsegments=5; //everything with less than this number of st
#endif #endif
#endif #endif
/******************************************************************************\
* enable this section if you have TMC26X motor drivers.
* you need to import the TMC26XStepper library into the arduino IDE for this
******************************************************************************/
// @section tmc
//#define HAVE_TMCDRIVER
#ifdef HAVE_TMCDRIVER
// #define X_IS_TMC
#define X_MAX_CURRENT 1000 //in mA
#define X_SENSE_RESISTOR 91 //in mOhms
#define X_MICROSTEPS 16 //number of microsteps
// #define X2_IS_TMC
#define X2_MAX_CURRENT 1000 //in mA
#define X2_SENSE_RESISTOR 91 //in mOhms
#define X2_MICROSTEPS 16 //number of microsteps
// #define Y_IS_TMC
#define Y_MAX_CURRENT 1000 //in mA
#define Y_SENSE_RESISTOR 91 //in mOhms
#define Y_MICROSTEPS 16 //number of microsteps
// #define Y2_IS_TMC
#define Y2_MAX_CURRENT 1000 //in mA
#define Y2_SENSE_RESISTOR 91 //in mOhms
#define Y2_MICROSTEPS 16 //number of microsteps
// #define Z_IS_TMC
#define Z_MAX_CURRENT 1000 //in mA
#define Z_SENSE_RESISTOR 91 //in mOhms
#define Z_MICROSTEPS 16 //number of microsteps
// #define Z2_IS_TMC
#define Z2_MAX_CURRENT 1000 //in mA
#define Z2_SENSE_RESISTOR 91 //in mOhms
#define Z2_MICROSTEPS 16 //number of microsteps
// #define E0_IS_TMC
#define E0_MAX_CURRENT 1000 //in mA
#define E0_SENSE_RESISTOR 91 //in mOhms
#define E0_MICROSTEPS 16 //number of microsteps
// #define E1_IS_TMC
#define E1_MAX_CURRENT 1000 //in mA
#define E1_SENSE_RESISTOR 91 //in mOhms
#define E1_MICROSTEPS 16 //number of microsteps
// #define E2_IS_TMC
#define E2_MAX_CURRENT 1000 //in mA
#define E2_SENSE_RESISTOR 91 //in mOhms
#define E2_MICROSTEPS 16 //number of microsteps
// #define E3_IS_TMC
#define E3_MAX_CURRENT 1000 //in mA
#define E3_SENSE_RESISTOR 91 //in mOhms
#define E3_MICROSTEPS 16 //number of microsteps
#endif
/******************************************************************************\
* enable this section if you have L6470 motor drivers.
* you need to import the L6470 library into the arduino IDE for this
******************************************************************************/
// @section l6470
//#define HAVE_L6470DRIVER
#ifdef HAVE_L6470DRIVER
// #define X_IS_L6470
#define X_MICROSTEPS 16 //number of microsteps
#define X_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define X_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define X2_IS_L6470
#define X2_MICROSTEPS 16 //number of microsteps
#define X2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define X2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define Y_IS_L6470
#define Y_MICROSTEPS 16 //number of microsteps
#define Y_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define Y_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define Y2_IS_L6470
#define Y2_MICROSTEPS 16 //number of microsteps
#define Y2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define Y2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define Z_IS_L6470
#define Z_MICROSTEPS 16 //number of microsteps
#define Z_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define Z_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define Z2_IS_L6470
#define Z2_MICROSTEPS 16 //number of microsteps
#define Z2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define Z2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define E0_IS_L6470
#define E0_MICROSTEPS 16 //number of microsteps
#define E0_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define E0_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define E1_IS_L6470
#define E1_MICROSTEPS 16 //number of microsteps
#define E1_MICROSTEPS 16 //number of microsteps
#define E1_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define E1_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define E2_IS_L6470
#define E2_MICROSTEPS 16 //number of microsteps
#define E2_MICROSTEPS 16 //number of microsteps
#define E2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define E2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define E3_IS_L6470
#define E3_MICROSTEPS 16 //number of microsteps
#define E3_MICROSTEPS 16 //number of microsteps
#define E3_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define E3_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall
#endif
#include "Conditionals.h" #include "Conditionals.h"
#include "SanityCheck.h" #include "SanityCheck.h"

@ -38,7 +38,7 @@ Here are some standard links for getting your machine calibrated:
// User-specified version info of this build to display in [Pronterface, etc] terminal window during // User-specified version info of this build to display in [Pronterface, etc] terminal window during
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
// build by the user have been successfully uploaded into firmware. // build by the user have been successfully uploaded into firmware.
#define STRING_VERSION "1.0.2" #define STRING_VERSION "1.0.3 dev"
#define STRING_URL "reprap.org" #define STRING_URL "reprap.org"
#define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
#define STRING_CONFIG_H_AUTHOR "(bq Witbox)" // Who made the changes. #define STRING_CONFIG_H_AUTHOR "(bq Witbox)" // Who made the changes.
@ -58,12 +58,11 @@ Here are some standard links for getting your machine calibrated:
// The following define selects which electronics board you have. // The following define selects which electronics board you have.
// Please choose the name from boards.h that matches your setup // Please choose the name from boards.h that matches your setup
#ifndef MOTHERBOARD #define MOTHERBOARD BOARD_WITBOX
#define MOTHERBOARD BOARD_WITBOX
#endif
// Define this to set a custom name for your generic Mendel, // Optional custom name for your RepStrap or other custom machine
// #define CUSTOM_MENDEL_NAME "This Mendel" // Displayed in the LCD "Ready" message
// #define CUSTOM_MACHINE_NAME "3D Printer"
// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines) // Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines)
// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) // You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4)
@ -122,7 +121,7 @@ Here are some standard links for getting your machine calibrated:
// Use it for Testing or Development purposes. NEVER for production machine. // Use it for Testing or Development purposes. NEVER for production machine.
// #define DUMMY_THERMISTOR_998_VALUE 25 // #define DUMMY_THERMISTOR_998_VALUE 25
// #define DUMMY_THERMISTOR_999_VALUE 100 // #define DUMMY_THERMISTOR_999_VALUE 100
// :{ '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" }
#define TEMP_SENSOR_0 1 #define TEMP_SENSOR_0 1
#define TEMP_SENSOR_1 0 #define TEMP_SENSOR_1 0
#define TEMP_SENSOR_2 0 #define TEMP_SENSOR_2 0
@ -184,7 +183,6 @@ Here are some standard links for getting your machine calibrated:
// is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
#define PID_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term #define PID_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term
#define K1 0.95 //smoothing factor within the PID #define K1 0.95 //smoothing factor within the PID
#define PID_dT ((OVERSAMPLENR * 10.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine
// If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
// Ultimaker // Ultimaker
@ -214,7 +212,7 @@ Here are some standard links for getting your machine calibrated:
// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis // Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
// //
// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. // Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder.
// If your PID_dT above is the default, and correct for your hardware/configuration, that means 7.689Hz, // If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz,
// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. // which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. // This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
// If your configuration is significantly different than this and you don't understand the issues involved, you probably // If your configuration is significantly different than this and you don't understand the issues involved, you probably
@ -321,13 +319,14 @@ your extruder heater takes 2 minutes to hit the target on heating.
// #define ENDSTOPPULLUP_ZMIN // #define ENDSTOPPULLUP_ZMIN
#endif #endif
// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins. // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
const bool X_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. const bool X_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Y_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. const bool Y_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Z_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. const bool Z_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
//#define DISABLE_MAX_ENDSTOPS //#define DISABLE_MAX_ENDSTOPS
//#define DISABLE_MIN_ENDSTOPS //#define DISABLE_MIN_ENDSTOPS
@ -344,13 +343,14 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#define DISABLE_E false // For all extruders #define DISABLE_E false // For all extruders
#define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled #define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled
#define INVERT_X_DIR true // for Mendel set to false, for Orca set to true // Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
#define INVERT_Y_DIR false // for Mendel set to true, for Orca set to false #define INVERT_X_DIR true
#define INVERT_Z_DIR true // for Mendel set to false, for Orca set to true #define INVERT_Y_DIR false
#define INVERT_E0_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false #define INVERT_Z_DIR true
#define INVERT_E1_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false #define INVERT_E0_DIR false
#define INVERT_E2_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false #define INVERT_E1_DIR false
#define INVERT_E3_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false #define INVERT_E2_DIR false
#define INVERT_E3_DIR false
// ENDSTOP SETTINGS: // ENDSTOP SETTINGS:
// Sets direction of endstops when homing; 1=MAX, -1=MIN // Sets direction of endstops when homing; 1=MAX, -1=MIN
@ -362,12 +362,12 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below. #define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below.
// Travel limits after homing (units are in mm) // Travel limits after homing (units are in mm)
#define X_MAX_POS 297
#define X_MIN_POS 0 #define X_MIN_POS 0
#define Y_MAX_POS 210
#define Y_MIN_POS 0 #define Y_MIN_POS 0
#define Z_MAX_POS 200
#define Z_MIN_POS 0 #define Z_MIN_POS 0
#define X_MAX_POS 297
#define Y_MAX_POS 210
#define Z_MAX_POS 200
//=========================================================================== //===========================================================================
//============================= Filament Runout Sensor ====================== //============================= Filament Runout Sensor ======================
@ -386,7 +386,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// #define MANUAL_BED_LEVELING // Add display menu option for bed leveling // #define MANUAL_BED_LEVELING // Add display menu option for bed leveling
// #define MESH_BED_LEVELING // Enable mesh bed leveling // #define MESH_BED_LEVELING // Enable mesh bed leveling
#if defined(MESH_BED_LEVELING) #ifdef MANUAL_BED_LEVELING
#define MBL_Z_STEP 0.025
#endif // MANUAL_BED_LEVELING
#ifdef MESH_BED_LEVELING
#define MESH_MIN_X 10 #define MESH_MIN_X 10
#define MESH_MAX_X (X_MAX_POS - MESH_MIN_X) #define MESH_MAX_X (X_MAX_POS - MESH_MIN_X)
#define MESH_MIN_Y 10 #define MESH_MIN_Y 10
@ -433,7 +437,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// You probably don't need more than 3 (squared=9) // You probably don't need more than 3 (squared=9)
#define AUTO_BED_LEVELING_GRID_POINTS 2 #define AUTO_BED_LEVELING_GRID_POINTS 2
#else // !AUTO_BED_LEVELING_GRID #else // !AUTO_BED_LEVELING_GRID
// Arbitrary points to probe. A simple cross-product // Arbitrary points to probe. A simple cross-product
@ -447,11 +450,10 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#endif // AUTO_BED_LEVELING_GRID #endif // AUTO_BED_LEVELING_GRID
// Offsets to the probe relative to the extruder tip (Hotend - Probe) // Offsets to the probe relative to the extruder tip (Hotend - Probe)
// X and Y offsets must be integers // X and Y offsets must be integers
#define X_PROBE_OFFSET_FROM_EXTRUDER -25 // -left +right #define X_PROBE_OFFSET_FROM_EXTRUDER -25 // Probe on: -left +right
#define Y_PROBE_OFFSET_FROM_EXTRUDER -29 // -front +behind #define Y_PROBE_OFFSET_FROM_EXTRUDER -29 // Probe on: -front +behind
#define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35 // -below (always!) #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35 // -below (always!)
#define Z_RAISE_BEFORE_HOMING 4 // (in mm) Raise Z before homing (G28) for Probe Clearance. #define Z_RAISE_BEFORE_HOMING 4 // (in mm) Raise Z before homing (G28) for Probe Clearance.
@ -463,6 +465,9 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#define Z_RAISE_BETWEEN_PROBINGS 5 //How much the extruder will be raised when traveling from between next probing points #define Z_RAISE_BETWEEN_PROBINGS 5 //How much the extruder will be raised when traveling from between next probing points
#define Z_RAISE_AFTER_PROBING 15 //How much the extruder will be raised after the last probing point. #define Z_RAISE_AFTER_PROBING 15 //How much the extruder will be raised after the last probing point.
// #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.
//Useful to retract a deployable probe.
//#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell //#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell
//#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. //#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.
@ -490,6 +495,20 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#endif #endif
// Support for a dedicated Z PROBE endstop separate from the Z MIN endstop.
// If you would like to use both a Z PROBE and a Z MIN endstop together or just a Z PROBE with a custom pin, uncomment #define Z_PROBE_ENDSTOP and read the instructions below.
// If you want to still use the Z min endstop for homing, disable Z_SAFE_HOMING above. Eg; to park the head outside the bed area when homing with G28.
// WARNING: The Z MIN endstop will need to set properly as it would without a Z PROBE to prevent head crashes and premature stopping during a print.
// To use a separate Z PROBE endstop, you must have a Z_PROBE_PIN defined in the pins.h file for your control board.
// If you are using a servo based Z PROBE, you will need to enable NUM_SERVOS, SERVO_ENDSTOPS and SERVO_ENDSTOPS_ANGLES in the R/C Servo below.
// RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin in the Aux 4 section of the RAMPS board. Use 5V for powered sensors, otherwise connect to ground and D32
// for normally closed configuration and 5V and D32 for normally open configurations. Normally closed configuration is advised and assumed.
// The D32 pin in Aux 4 on RAMPS maps to the Arduino D32 pin. Z_PROBE_PIN is setting the pin to use on the Arduino. Since the D32 pin on the RAMPS maps to D32 on Arduino, this works.
// D32 is currently selected in the RAMPS 1.3/1.4 pin file. All other boards will need changes to the respective pins_XXXXX.h file.
// WARNING: Setting the wrong pin may have unexpected and potentially disastrous outcomes. Use with caution and do your homework.
//#define Z_PROBE_ENDSTOP
#endif // ENABLE_AUTO_BED_LEVELING #endif // ENABLE_AUTO_BED_LEVELING
@ -497,15 +516,19 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
//#define MANUAL_HOME_POSITIONS // If defined, MANUAL_*_HOME_POS below will be used //#define MANUAL_HOME_POSITIONS // If defined, MANUAL_*_HOME_POS below will be used
//#define BED_CENTER_AT_0_0 // If defined, the center of the bed is at (X=0, Y=0) //#define BED_CENTER_AT_0_0 // If defined, the center of the bed is at (X=0, Y=0)
//Manual homing switch locations: // Manual homing switch locations:
// For deltabots this means top and center of the Cartesian print volume. // For deltabots this means top and center of the Cartesian print volume.
#define MANUAL_X_HOME_POS 0 #ifdef MANUAL_HOME_POSITIONS
#define MANUAL_Y_HOME_POS 0 #define MANUAL_X_HOME_POS 0
#define MANUAL_Z_HOME_POS 0 #define MANUAL_Y_HOME_POS 0
//#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing. #define MANUAL_Z_HOME_POS 0
//#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing.
#endif
/**
* MOVEMENT SETTINGS
*/
//// MOVEMENT SETTINGS
#define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
#define HOMING_FEEDRATE {120*60, 120*60, 7.2*60, 0} // set the homing speeds (mm/min) #define HOMING_FEEDRATE {120*60, 120*60, 7.2*60, 0} // set the homing speeds (mm/min)
// default settings // default settings
@ -537,9 +560,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// Custom M code points // Custom M code points
#define CUSTOM_M_CODES #define CUSTOM_M_CODES
#ifdef CUSTOM_M_CODES #ifdef CUSTOM_M_CODES
#ifdef ENABLE_AUTO_BED_LEVELING
#define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851 #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
#define Z_PROBE_OFFSET_RANGE_MIN -15 #define Z_PROBE_OFFSET_RANGE_MIN -20
#define Z_PROBE_OFFSET_RANGE_MAX -5 #define Z_PROBE_OFFSET_RANGE_MAX 20
#endif
#endif #endif
@ -550,9 +575,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. // M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
//define this to enable EEPROM support //define this to enable EEPROM support
//#define EEPROM_SETTINGS //#define EEPROM_SETTINGS
//to disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
// please keep turned on if you can. #ifdef EEPROM_SETTINGS
//#define EEPROM_CHITCHAT // To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
#define EEPROM_CHITCHAT // please keep turned on if you can.
#endif
// Preheat Constants // Preheat Constants
#define PLA_PREHEAT_HOTEND_TEMP 200 #define PLA_PREHEAT_HOTEND_TEMP 200
@ -566,13 +593,16 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
//==============================LCD and SD support============================= //==============================LCD and SD support=============================
// Define your display language below. Replace (en) with your language code and uncomment. // Define your display language below. Replace (en) with your language code and uncomment.
// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu // en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
// See also language.h // See also language.h
//#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
// Character based displays can have different extended charsets. // Choose ONE of these 3 charsets. This has to match your hardware. Ignored for full graphic display.
#define DISPLAY_CHARSET_HD44780_JAPAN // "ääööüüß23°" // 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.
//#define DISPLAY_CHARSET_HD44780_WESTERN // "ÄäÖöÜüß²³°" if you see a '~' instead of a 'arrow_right' at the right of submenuitems - this is the right one. // See also documentation/LCDLanguageFont.md
#define DISPLAY_CHARSET_HD44780_JAPAN // this is the most common hardware
//#define DISPLAY_CHARSET_HD44780_WESTERN
//#define DISPLAY_CHARSET_HD44780_CYRILLIC
#define ULTRA_LCD //general LCD support, also 16x2 #define ULTRA_LCD //general LCD support, also 16x2
//#define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family) //#define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
@ -585,6 +615,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
//#define ULTIPANEL //the UltiPanel as on Thingiverse //#define ULTIPANEL //the UltiPanel as on Thingiverse
//#define LCD_FEEDBACK_FREQUENCY_HZ 1000 // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click //#define LCD_FEEDBACK_FREQUENCY_HZ 1000 // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
// 0 to disable buzzer feedback
// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3) // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
// http://reprap.org/wiki/PanelOne // http://reprap.org/wiki/PanelOne
@ -647,7 +678,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
//#define FAST_PWM_FAN //#define FAST_PWM_FAN
// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
// which is not ass annoying as with the hardware PWM. On the other hand, if this frequency // which is not as annoying as with the hardware PWM. On the other hand, if this frequency
// is too low, you should also increment SOFT_PWM_SCALE. // is too low, you should also increment SOFT_PWM_SCALE.
//#define FAN_SOFT_PWM //#define FAN_SOFT_PWM
@ -692,7 +723,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// Servo Endstops // Servo Endstops
// //
// This allows for servo actuated endstops, primary usage is for the Z Axis to eliminate calibration or bed height changes. // This allows for servo actuated endstops, primary usage is for the Z Axis to eliminate calibration or bed height changes.
// Use M206 command to correct for switch height offset to actual nozzle height. Store that setting with M500. // Use M851 to set the z-probe vertical offset from the nozzle. Store that setting with M500.
// //
//#define SERVO_ENDSTOPS {-1, -1, 0} // Servo index for X, Y, Z. Disable with -1 //#define SERVO_ENDSTOPS {-1, -1, 0} // Servo index for X, Y, Z. Disable with -1
//#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles //#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles

@ -3,6 +3,8 @@
#include "Conditionals.h" #include "Conditionals.h"
// @section temperature
//=========================================================================== //===========================================================================
//=============================Thermal Settings ============================ //=============================Thermal Settings ============================
//=========================================================================== //===========================================================================
@ -46,6 +48,8 @@
//The M105 command return, besides traditional information, the ADC value read from temperature sensors. //The M105 command return, besides traditional information, the ADC value read from temperature sensors.
//#define SHOW_TEMP_ADC_VALUES //#define SHOW_TEMP_ADC_VALUES
// @section extruder
// extruder run-out prevention. // extruder run-out prevention.
//if the machine is idle, and the temperature over MINTEMP, every couple of SECONDS some filament is extruded //if the machine is idle, and the temperature over MINTEMP, every couple of SECONDS some filament is extruded
//#define EXTRUDER_RUNOUT_PREVENT //#define EXTRUDER_RUNOUT_PREVENT
@ -55,6 +59,8 @@
#define EXTRUDER_RUNOUT_SPEED 1500. //extrusion speed #define EXTRUDER_RUNOUT_SPEED 1500. //extrusion speed
#define EXTRUDER_RUNOUT_EXTRUDE 100 #define EXTRUDER_RUNOUT_EXTRUDE 100
// @section temperature
//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements. //These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET" //The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
#define TEMP_SENSOR_AD595_OFFSET 0.0 #define TEMP_SENSOR_AD595_OFFSET 0.0
@ -72,6 +78,8 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu) // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100 //#define FAN_KICKSTART_TIME 100
// @section extruder
// Extruder cooling fans // Extruder cooling fans
// Configure fan pin outputs to automatically turn on/off when the associated // Configure fan pin outputs to automatically turn on/off when the associated
// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE. // extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE.
@ -89,8 +97,12 @@
//=============================Mechanical Settings=========================== //=============================Mechanical Settings===========================
//=========================================================================== //===========================================================================
// @section homing
//#define ENDSTOPS_ONLY_FOR_HOMING // If defined the endstops will only be used for homing //#define ENDSTOPS_ONLY_FOR_HOMING // If defined the endstops will only be used for homing
// @section extras
//#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats. //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
// A single Z stepper driver is usually used to drive 2 stepper motors. // A single Z stepper driver is usually used to drive 2 stepper motors.
@ -100,6 +112,30 @@
// On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder. // On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder.
//#define Z_DUAL_STEPPER_DRIVERS //#define Z_DUAL_STEPPER_DRIVERS
#ifdef Z_DUAL_STEPPER_DRIVERS
// 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.
// That way the machine is capable to align the bed during home, since both Z steppers are homed.
// There is also an implementation of M666 (software endstops adjustment) to this feature.
// After Z homing, this adjustment is applied to just one of the steppers in order to align the bed.
// 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.
// 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.
// Play a little bit with small adjustments (0.5mm) and check the behaviour.
// The M119 (endstops report) will start reporting the Z2 Endstop as well.
#define Z_DUAL_ENDSTOPS
#ifdef Z_DUAL_ENDSTOPS
#define Z2_STEP_PIN E2_STEP_PIN // Stepper to be used to Z2 axis.
#define Z2_DIR_PIN E2_DIR_PIN
#define Z2_ENABLE_PIN E2_ENABLE_PIN
#define Z2_MAX_PIN 36 //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36)
const bool Z2_MAX_ENDSTOP_INVERTING = false;
#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.
#endif
#endif // Z_DUAL_STEPPER_DRIVERS
// Same again but for Y Axis. // Same again but for Y Axis.
//#define Y_DUAL_STEPPER_DRIVERS //#define Y_DUAL_STEPPER_DRIVERS
@ -112,57 +148,59 @@
// allowing faster printing speeds. // allowing faster printing speeds.
//#define DUAL_X_CARRIAGE //#define DUAL_X_CARRIAGE
#ifdef DUAL_X_CARRIAGE #ifdef DUAL_X_CARRIAGE
// Configuration for second X-carriage // Configuration for second X-carriage
// Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop;
// the second x-carriage always homes to the maximum endstop. // the second x-carriage always homes to the maximum endstop.
#define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
#define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed
#define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position
#define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position #define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position
// However: In this mode the EXTRUDER_OFFSET_X value for the second extruder provides a software // However: In this mode the EXTRUDER_OFFSET_X value for the second extruder provides a software
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command). // without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer. // Remember: you should set the second extruder x-offset to 0 in your slicer.
// Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h) // Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h)
#define X2_ENABLE_PIN 29 #define X2_ENABLE_PIN 29
#define X2_STEP_PIN 25 #define X2_STEP_PIN 25
#define X2_DIR_PIN 23 #define X2_DIR_PIN 23
// There are a few selectable movement modes for dual x-carriages using M605 S<mode> // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
// Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results // Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
// as long as it supports dual x-carriages. (M605 S0) // as long as it supports dual x-carriages. (M605 S0)
// Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so // Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
// that additional slicer support is not required. (M605 S1) // that additional slicer support is not required. (M605 S1)
// Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all // Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
// actions of the first x-carriage. This allows the printer to print 2 arbitrary items at // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
// once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm]) // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
// This is the default power-up mode which can be later using M605. // This is the default power-up mode which can be later using M605.
#define DEFAULT_DUAL_X_CARRIAGE_MODE 0 #define DEFAULT_DUAL_X_CARRIAGE_MODE 0
// Default settings in "Auto-park Mode" // Default settings in "Auto-park Mode"
#define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder #define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder
#define TOOLCHANGE_UNPARK_ZLIFT 1 // the distance to raise Z axis when unparking an extruder #define TOOLCHANGE_UNPARK_ZLIFT 1 // the distance to raise Z axis when unparking an extruder
// Default x offset in duplication mode (typically set to half print bed width) // Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100 #define DEFAULT_DUPLICATION_X_OFFSET 100
#endif //DUAL_X_CARRIAGE #endif //DUAL_X_CARRIAGE
// @section homing
//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again: //homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
#define X_HOME_RETRACT_MM 5 #define X_HOME_BUMP_MM 5
#define Y_HOME_RETRACT_MM 5 #define Y_HOME_BUMP_MM 5
#define Z_HOME_RETRACT_MM 2 #define Z_HOME_BUMP_MM 2
#define HOMING_BUMP_DIVISOR {10, 10, 20} // Re-Bump Speed Divisor (Divides the Homing Feedrate) #define HOMING_BUMP_DIVISOR {2, 2, 4} // Re-Bump Speed Divisor (Divides the Homing Feedrate)
//#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially. //#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
// @section machine
#define AXIS_RELATIVE_MODES {false, false, false, false} #define AXIS_RELATIVE_MODES {false, false, false, false}
#ifdef CONFIG_STEPPERS_TOSHIBA
#define MAX_STEP_FREQUENCY 10000 // Max step frequency for Toshiba Stepper Controllers // @section machine
#else
#define MAX_STEP_FREQUENCY 40000 // Max step frequency for Ultimaker (5000 pps / half step)
#endif
//By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. //By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step.
#define INVERT_X_STEP_PIN false #define INVERT_X_STEP_PIN false
#define INVERT_Y_STEP_PIN false #define INVERT_Y_STEP_PIN false
@ -175,11 +213,15 @@
#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
#define DEFAULT_MINTRAVELFEEDRATE 0.0 #define DEFAULT_MINTRAVELFEEDRATE 0.0
// @section lcd
#ifdef ULTIPANEL #ifdef ULTIPANEL
#define MANUAL_FEEDRATE {120*60, 120*60, 18*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel #define MANUAL_FEEDRATE {120*60, 120*60, 18*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel
#define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder
#endif #endif
// @section extras
// minimum time in microseconds that a movement needs to take if the buffer is emptied. // minimum time in microseconds that a movement needs to take if the buffer is emptied.
#define DEFAULT_MINSEGMENTTIME 20000 #define DEFAULT_MINSEGMENTTIME 20000
@ -214,25 +256,35 @@
//=========================================================================== //===========================================================================
#define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly #define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
#define ENCODER_10X_STEPS_PER_SEC 75 // If the encoder steps per sec exceed this value, multiple the steps moved by ten to quickly advance the value #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
#define ENCODER_100X_STEPS_PER_SEC 160 // If the encoder steps per sec exceed this value, multiple the steps moved by 100 to really quickly advance the value #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
//#define ENCODER_RATE_MULTIPLIER_DEBUG // If defined, output the encoder steps per second value //#define ENCODER_RATE_MULTIPLIER_DEBUG // If defined, output the encoder steps per second value
//#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/ //#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/
#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
#define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? // @section lcd
#define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
#ifdef SDSUPPORT
#define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. // If you are using a RAMPS board or cheap E-bay purchased boards that do not detect when an SD card is inserted
// 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. // You can get round this by connecting a push button or single throw switch to the pin defined as SDCARDCARDDETECT
// using: // in the pins.h file. When using a push button pulling the pin to ground this will need inverted. This setting should
#define MENU_ADDAUTOSTART // be commented out otherwise
#define SDCARDDETECTINVERTED
// Show a progress bar on HD44780 LCDs for SD printing #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers?
//#define LCD_PROGRESS_BAR #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
#ifdef LCD_PROGRESS_BAR #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order.
// 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.
// using:
//#define MENU_ADDAUTOSTART
// Show a progress bar on HD44780 LCDs for SD printing
//#define LCD_PROGRESS_BAR
#ifdef LCD_PROGRESS_BAR
// Amount of time (ms) to show the bar // Amount of time (ms) to show the bar
#define PROGRESS_BAR_BAR_TIME 2000 #define PROGRESS_BAR_BAR_TIME 2000
// Amount of time (ms) to show the status message // Amount of time (ms) to show the status message
@ -241,7 +293,11 @@
#define PROGRESS_MSG_EXPIRE 0 #define PROGRESS_MSG_EXPIRE 0
// Enable this to show messages for MSG_TIME then hide them // Enable this to show messages for MSG_TIME then hide them
//#define PROGRESS_MSG_ONCE //#define PROGRESS_MSG_ONCE
#endif #endif
#endif // SDSUPPORT
// @section more
// The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation. // The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
//#define USE_WATCHDOG //#define USE_WATCHDOG
@ -256,6 +312,8 @@
// Enable the option to stop SD printing when hitting and endstops, needs to be enabled from the LCD menu when this option is enabled. // Enable the option to stop SD printing when hitting and endstops, needs to be enabled from the LCD menu when this option is enabled.
//#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
// @section lcd
// Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process // Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process
// it can e.g. be used to change z-positions in the print startup phase in real-time // it can e.g. be used to change z-positions in the print startup phase in real-time
// does not respect endstops! // does not respect endstops!
@ -266,6 +324,8 @@
#define BABYSTEP_Z_MULTIPLICATOR 2 //faster z movements #define BABYSTEP_Z_MULTIPLICATOR 2 //faster z movements
#endif #endif
// @section extruder
// extruder advance constant (s2/mm3) // extruder advance constant (s2/mm3)
// //
// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2 // advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
@ -279,7 +339,9 @@
#define EXTRUDER_ADVANCE_K .0 #define EXTRUDER_ADVANCE_K .0
#define D_FILAMENT 1.75 #define D_FILAMENT 1.75
#define STEPS_MM_E 100.47095761381482 #define STEPS_MM_E 100.47095761381482
#endif // ADVANCE #endif
// @section extras
// Arc interpretation settings: // Arc interpretation settings:
#define MM_PER_ARC_SEGMENT 1 #define MM_PER_ARC_SEGMENT 1
@ -287,11 +349,7 @@
const unsigned int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement const unsigned int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement
// If you are using a RAMPS board or cheap E-bay purchased boards that do not detect when an SD card is inserted // @section temperature
// You can get round this by connecting a push button or single throw switch to the pin defined as SDCARDCARDDETECT
// in the pins.h file. When using a push button pulling the pin to ground this will need inverted. This setting should
// be commented out otherwise
#define SDCARDDETECTINVERTED
// Control heater 0 and heater 1 in parallel. // Control heater 0 and heater 1 in parallel.
//#define HEATERS_PARALLEL //#define HEATERS_PARALLEL
@ -300,19 +358,23 @@ const unsigned int dropsegments=5; //everything with less than this number of st
//=============================Buffers ============================ //=============================Buffers ============================
//=========================================================================== //===========================================================================
// @section hidden
// The number of linear motions that can be in the plan at any give time. // The number of linear motions that can be in the plan at any give time.
// 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. // 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.
#if defined SDSUPPORT #ifdef SDSUPPORT
#define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
#else #else
#define BLOCK_BUFFER_SIZE 16 // maximize block buffer #define BLOCK_BUFFER_SIZE 16 // maximize block buffer
#endif #endif
// @section more
//The ASCII buffer for receiving from the serial: //The ASCII buffer for receiving from the serial:
#define MAX_CMD_SIZE 96 #define MAX_CMD_SIZE 96
#define BUFSIZE 5 #define BUFSIZE 5
// @section fwretract
// Firmware based and LCD controlled retract // Firmware based and LCD controlled retract
// M207 and M208 can be used to define parameters for the retraction. // M207 and M208 can be used to define parameters for the retraction.
@ -344,6 +406,143 @@ const unsigned int dropsegments=5; //everything with less than this number of st
#endif #endif
#endif #endif
/******************************************************************************\
* enable this section if you have TMC26X motor drivers.
* you need to import the TMC26XStepper library into the arduino IDE for this
******************************************************************************/
// @section tmc
//#define HAVE_TMCDRIVER
#ifdef HAVE_TMCDRIVER
// #define X_IS_TMC
#define X_MAX_CURRENT 1000 //in mA
#define X_SENSE_RESISTOR 91 //in mOhms
#define X_MICROSTEPS 16 //number of microsteps
// #define X2_IS_TMC
#define X2_MAX_CURRENT 1000 //in mA
#define X2_SENSE_RESISTOR 91 //in mOhms
#define X2_MICROSTEPS 16 //number of microsteps
// #define Y_IS_TMC
#define Y_MAX_CURRENT 1000 //in mA
#define Y_SENSE_RESISTOR 91 //in mOhms
#define Y_MICROSTEPS 16 //number of microsteps
// #define Y2_IS_TMC
#define Y2_MAX_CURRENT 1000 //in mA
#define Y2_SENSE_RESISTOR 91 //in mOhms
#define Y2_MICROSTEPS 16 //number of microsteps
// #define Z_IS_TMC
#define Z_MAX_CURRENT 1000 //in mA
#define Z_SENSE_RESISTOR 91 //in mOhms
#define Z_MICROSTEPS 16 //number of microsteps
// #define Z2_IS_TMC
#define Z2_MAX_CURRENT 1000 //in mA
#define Z2_SENSE_RESISTOR 91 //in mOhms
#define Z2_MICROSTEPS 16 //number of microsteps
// #define E0_IS_TMC
#define E0_MAX_CURRENT 1000 //in mA
#define E0_SENSE_RESISTOR 91 //in mOhms
#define E0_MICROSTEPS 16 //number of microsteps
// #define E1_IS_TMC
#define E1_MAX_CURRENT 1000 //in mA
#define E1_SENSE_RESISTOR 91 //in mOhms
#define E1_MICROSTEPS 16 //number of microsteps
// #define E2_IS_TMC
#define E2_MAX_CURRENT 1000 //in mA
#define E2_SENSE_RESISTOR 91 //in mOhms
#define E2_MICROSTEPS 16 //number of microsteps
// #define E3_IS_TMC
#define E3_MAX_CURRENT 1000 //in mA
#define E3_SENSE_RESISTOR 91 //in mOhms
#define E3_MICROSTEPS 16 //number of microsteps
#endif
/******************************************************************************\
* enable this section if you have L6470 motor drivers.
* you need to import the L6470 library into the arduino IDE for this
******************************************************************************/
// @section l6470
//#define HAVE_L6470DRIVER
#ifdef HAVE_L6470DRIVER
// #define X_IS_L6470
#define X_MICROSTEPS 16 //number of microsteps
#define X_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define X_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define X2_IS_L6470
#define X2_MICROSTEPS 16 //number of microsteps
#define X2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define X2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define Y_IS_L6470
#define Y_MICROSTEPS 16 //number of microsteps
#define Y_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define Y_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define Y2_IS_L6470
#define Y2_MICROSTEPS 16 //number of microsteps
#define Y2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define Y2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define Z_IS_L6470
#define Z_MICROSTEPS 16 //number of microsteps
#define Z_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define Z_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define Z2_IS_L6470
#define Z2_MICROSTEPS 16 //number of microsteps
#define Z2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define Z2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define E0_IS_L6470
#define E0_MICROSTEPS 16 //number of microsteps
#define E0_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define E0_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define E1_IS_L6470
#define E1_MICROSTEPS 16 //number of microsteps
#define E1_MICROSTEPS 16 //number of microsteps
#define E1_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define E1_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define E2_IS_L6470
#define E2_MICROSTEPS 16 //number of microsteps
#define E2_MICROSTEPS 16 //number of microsteps
#define E2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define E2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define E3_IS_L6470
#define E3_MICROSTEPS 16 //number of microsteps
#define E3_MICROSTEPS 16 //number of microsteps
#define E3_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define E3_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall
#endif
#include "Conditionals.h" #include "Conditionals.h"
#include "SanityCheck.h" #include "SanityCheck.h"

@ -1,4 +1,4 @@
#ifndef CONFIGURATION_H #ifndef CONFIGURATION_H
#define CONFIGURATION_H #define CONFIGURATION_H
#include "boards.h" #include "boards.h"
@ -38,7 +38,7 @@ Here are some standard links for getting your machine calibrated:
// User-specified version info of this build to display in [Pronterface, etc] terminal window during // User-specified version info of this build to display in [Pronterface, etc] terminal window during
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
// build by the user have been successfully uploaded into firmware. // build by the user have been successfully uploaded into firmware.
#define STRING_VERSION "1.0.2" #define STRING_VERSION "1.0.3 dev"
#define STRING_URL "reprap.org" #define STRING_URL "reprap.org"
#define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
@ -62,8 +62,9 @@ Here are some standard links for getting your machine calibrated:
#define MOTHERBOARD BOARD_RAMPS_13_EFB #define MOTHERBOARD BOARD_RAMPS_13_EFB
#endif #endif
// Define this to set a custom name for your generic Mendel, // Optional custom name for your RepStrap or other custom machine
// #define CUSTOM_MENDEL_NAME "This Mendel" // Displayed in the LCD "Ready" message
#define CUSTOM_MACHINE_NAME "Deltabot"
// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines) // Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines)
// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) // You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4)
@ -107,11 +108,11 @@ Here are some standard links for getting your machine calibrated:
// Horizontal offset of the universal joints on the carriages. // Horizontal offset of the universal joints on the carriages.
#define DELTA_CARRIAGE_OFFSET 18.0 // mm #define DELTA_CARRIAGE_OFFSET 18.0 // mm
// Effective horizontal distance bridged by diagonal push rods. // Horizontal distance bridged by diagonal push rods when effector is centered.
#define DELTA_RADIUS (DELTA_SMOOTH_ROD_OFFSET-DELTA_EFFECTOR_OFFSET-DELTA_CARRIAGE_OFFSET) #define DELTA_RADIUS (DELTA_SMOOTH_ROD_OFFSET-DELTA_EFFECTOR_OFFSET-DELTA_CARRIAGE_OFFSET)
// Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers). // Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers).
#define DELTA_PRINTABLE_RADIUS 90 #define DELTA_PRINTABLE_RADIUS 140
//=========================================================================== //===========================================================================
@ -155,7 +156,7 @@ Here are some standard links for getting your machine calibrated:
// Use it for Testing or Development purposes. NEVER for production machine. // Use it for Testing or Development purposes. NEVER for production machine.
// #define DUMMY_THERMISTOR_998_VALUE 25 // #define DUMMY_THERMISTOR_998_VALUE 25
// #define DUMMY_THERMISTOR_999_VALUE 100 // #define DUMMY_THERMISTOR_999_VALUE 100
// :{ '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" }
#define TEMP_SENSOR_0 -1 #define TEMP_SENSOR_0 -1
#define TEMP_SENSOR_1 -1 #define TEMP_SENSOR_1 -1
#define TEMP_SENSOR_2 0 #define TEMP_SENSOR_2 0
@ -217,7 +218,6 @@ Here are some standard links for getting your machine calibrated:
// is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
#define PID_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term #define PID_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term
#define K1 0.95 //smoothing factor within the PID #define K1 0.95 //smoothing factor within the PID
#define PID_dT ((OVERSAMPLENR * 10.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine
// If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
// Ultimaker // Ultimaker
@ -242,7 +242,7 @@ Here are some standard links for getting your machine calibrated:
// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis // Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
// //
// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. // Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder.
// If your PID_dT above is the default, and correct for your hardware/configuration, that means 7.689Hz, // If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz,
// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. // which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. // This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
// If your configuration is significantly different than this and you don't understand the issues involved, you probably // If your configuration is significantly different than this and you don't understand the issues involved, you probably
@ -349,13 +349,14 @@ your extruder heater takes 2 minutes to hit the target on heating.
// #define ENDSTOPPULLUP_ZMIN // #define ENDSTOPPULLUP_ZMIN
#endif #endif
// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins. // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
const bool X_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. const bool X_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Y_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. const bool Y_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Z_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. const bool Z_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
//#define DISABLE_MAX_ENDSTOPS //#define DISABLE_MAX_ENDSTOPS
#define DISABLE_MIN_ENDSTOPS // Deltas only use min endstops for probing #define DISABLE_MIN_ENDSTOPS // Deltas only use min endstops for probing
@ -372,19 +373,18 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#define DISABLE_E false // For all extruders #define DISABLE_E false // For all extruders
#define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled #define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled
// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
#define INVERT_X_DIR false // DELTA does not invert #define INVERT_X_DIR false // DELTA does not invert
#define INVERT_Y_DIR false #define INVERT_Y_DIR false
#define INVERT_Z_DIR false #define INVERT_Z_DIR false
#define INVERT_E0_DIR false
#define INVERT_E0_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false #define INVERT_E1_DIR false
#define INVERT_E1_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false #define INVERT_E2_DIR false
#define INVERT_E2_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false #define INVERT_E3_DIR false
#define INVERT_E3_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false
// ENDSTOP SETTINGS: // ENDSTOP SETTINGS:
// Sets direction of endstops when homing; 1=MAX, -1=MIN // Sets direction of endstops when homing; 1=MAX, -1=MIN
// deltas always home to max #define X_HOME_DIR 1 // deltas always home to max
#define X_HOME_DIR 1
#define Y_HOME_DIR 1 #define Y_HOME_DIR 1
#define Z_HOME_DIR 1 #define Z_HOME_DIR 1
@ -392,12 +392,12 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below. #define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below.
// Travel limits after homing (units are in mm) // Travel limits after homing (units are in mm)
#define X_MAX_POS 90 #define X_MIN_POS -DELTA_PRINTABLE_RADIUS
#define X_MIN_POS -90 #define Y_MIN_POS -DELTA_PRINTABLE_RADIUS
#define Y_MAX_POS 90
#define Y_MIN_POS -90
#define Z_MAX_POS MANUAL_Z_HOME_POS
#define Z_MIN_POS 0 #define Z_MIN_POS 0
#define X_MAX_POS DELTA_PRINTABLE_RADIUS
#define Y_MAX_POS DELTA_PRINTABLE_RADIUS
#define Z_MAX_POS MANUAL_Z_HOME_POS
//=========================================================================== //===========================================================================
//============================= Filament Runout Sensor ====================== //============================= Filament Runout Sensor ======================
@ -416,7 +416,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// #define MANUAL_BED_LEVELING // Add display menu option for bed leveling // #define MANUAL_BED_LEVELING // Add display menu option for bed leveling
// #define MESH_BED_LEVELING // Enable mesh bed leveling // #define MESH_BED_LEVELING // Enable mesh bed leveling
#if defined(MESH_BED_LEVELING) #ifdef MANUAL_BED_LEVELING
#define MBL_Z_STEP 0.025
#endif // MANUAL_BED_LEVELING
#ifdef MESH_BED_LEVELING
#define MESH_MIN_X 10 #define MESH_MIN_X 10
#define MESH_MAX_X (X_MAX_POS - MESH_MIN_X) #define MESH_MAX_X (X_MAX_POS - MESH_MIN_X)
#define MESH_MIN_Y 10 #define MESH_MIN_Y 10
@ -431,18 +435,35 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
//=========================================================================== //===========================================================================
//#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line) //#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line)
// Z-Probe Repeatability test is not supported in Deltas yet. //#define Z_PROBE_REPEATABILITY_TEST // Z-Probe Repeatability test is not supported in Deltas yet.
#ifdef ENABLE_AUTO_BED_LEVELING #ifdef ENABLE_AUTO_BED_LEVELING
// Deltas only support grid mode // There are 2 different ways to specify probing locations
#define AUTO_BED_LEVELING_GRID //
// - "grid" mode
// Probe several points in a rectangular grid.
// You specify the rectangle and the density of sample points.
// This mode is preferred because there are more measurements.
//
// - "3-point" mode
// Probe 3 arbitrary points on the bed (that aren't colinear)
// You specify the XY coordinates of all 3 points.
// Enable this to sample the bed in a grid (least squares solution)
// Note: this feature generates 10KB extra code size
#define AUTO_BED_LEVELING_GRID // Deltas only support grid mode
#ifdef AUTO_BED_LEVELING_GRID
#define DELTA_PROBABLE_RADIUS (DELTA_PRINTABLE_RADIUS - 10) #define DELTA_PROBABLE_RADIUS (DELTA_PRINTABLE_RADIUS - 10)
#define LEFT_PROBE_BED_POSITION -DELTA_PROBABLE_RADIUS #define LEFT_PROBE_BED_POSITION -DELTA_PROBABLE_RADIUS
#define RIGHT_PROBE_BED_POSITION DELTA_PROBABLE_RADIUS #define RIGHT_PROBE_BED_POSITION DELTA_PROBABLE_RADIUS
#define BACK_PROBE_BED_POSITION DELTA_PROBABLE_RADIUS
#define FRONT_PROBE_BED_POSITION -DELTA_PROBABLE_RADIUS #define FRONT_PROBE_BED_POSITION -DELTA_PROBABLE_RADIUS
#define BACK_PROBE_BED_POSITION DELTA_PROBABLE_RADIUS
#define MIN_PROBE_EDGE 10 // The probe square sides can be no smaller than this
// Non-linear bed leveling will be used. // Non-linear bed leveling will be used.
// Compensate by interpolating between the nearest four Z probe values for each point. // Compensate by interpolating between the nearest four Z probe values for each point.
@ -450,10 +471,23 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// Works best with ACCURATE_BED_LEVELING_POINTS 5 or higher. // Works best with ACCURATE_BED_LEVELING_POINTS 5 or higher.
#define AUTO_BED_LEVELING_GRID_POINTS 9 #define AUTO_BED_LEVELING_GRID_POINTS 9
#else // !AUTO_BED_LEVELING_GRID
// Arbitrary points to probe. A simple cross-product
// is used to estimate the plane of the bed.
#define ABL_PROBE_PT_1_X 15
#define ABL_PROBE_PT_1_Y 180
#define ABL_PROBE_PT_2_X 15
#define ABL_PROBE_PT_2_Y 20
#define ABL_PROBE_PT_3_X 170
#define ABL_PROBE_PT_3_Y 20
#endif // AUTO_BED_LEVELING_GRID
// Offsets to the probe relative to the extruder tip (Hotend - Probe) // Offsets to the probe relative to the extruder tip (Hotend - Probe)
// X and Y offsets must be integers // X and Y offsets must be integers
#define X_PROBE_OFFSET_FROM_EXTRUDER 0 // -left +right #define X_PROBE_OFFSET_FROM_EXTRUDER 0 // Probe on: -left +right
#define Y_PROBE_OFFSET_FROM_EXTRUDER -10 // -front +behind #define Y_PROBE_OFFSET_FROM_EXTRUDER -10 // Probe on: -front +behind
#define Z_PROBE_OFFSET_FROM_EXTRUDER -3.5 // -below (always!) #define Z_PROBE_OFFSET_FROM_EXTRUDER -3.5 // -below (always!)
#define Z_RAISE_BEFORE_HOMING 4 // (in mm) Raise Z before homing (G28) for Probe Clearance. #define Z_RAISE_BEFORE_HOMING 4 // (in mm) Raise Z before homing (G28) for Probe Clearance.
@ -465,6 +499,12 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#define Z_RAISE_BETWEEN_PROBINGS 5 //How much the extruder will be raised when traveling from between next probing points #define Z_RAISE_BETWEEN_PROBINGS 5 //How much the extruder will be raised when traveling from between next probing points
#define Z_RAISE_AFTER_PROBING 50 //How much the extruder will be raised after the last probing point. #define Z_RAISE_AFTER_PROBING 50 //How much the extruder will be raised after the last probing point.
// #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.
//Useful to retract a deployable probe.
//#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell
//#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.
// Allen key retractable z-probe as seen on many Kossel delta printers - http://reprap.org/wiki/Kossel#Automatic_bed_leveling_probe // Allen key retractable z-probe as seen on many Kossel delta printers - http://reprap.org/wiki/Kossel#Automatic_bed_leveling_probe
// Deploys by touching z-axis belt. Retracts by pushing the probe down. Uses Z_MIN_PIN. // Deploys by touching z-axis belt. Retracts by pushing the probe down. Uses Z_MIN_PIN.
//#define Z_PROBE_ALLEN_KEY //#define Z_PROBE_ALLEN_KEY
@ -473,10 +513,10 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#define Z_PROBE_ALLEN_KEY_DEPLOY_Y DELTA_PRINTABLE_RADIUS #define Z_PROBE_ALLEN_KEY_DEPLOY_Y DELTA_PRINTABLE_RADIUS
#define Z_PROBE_ALLEN_KEY_DEPLOY_Z 100 #define Z_PROBE_ALLEN_KEY_DEPLOY_Z 100
#define Z_PROBE_ALLEN_KEY_RETRACT_X -64 #define Z_PROBE_ALLEN_KEY_STOW_X -64
#define Z_PROBE_ALLEN_KEY_RETRACT_Y 56 #define Z_PROBE_ALLEN_KEY_STOW_Y 56
#define Z_PROBE_ALLEN_KEY_RETRACT_Z 23 #define Z_PROBE_ALLEN_KEY_STOW_Z 23
#define Z_PROBE_ALLEN_KEY_RETRACT_DEPTH 20 #define Z_PROBE_ALLEN_KEY_STOW_DEPTH 20
#endif #endif
//If defined, the Probe servo will be turned on only during movement and then turned off to avoid jerk //If defined, the Probe servo will be turned on only during movement and then turned off to avoid jerk
@ -503,22 +543,39 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#endif #endif
#endif // ENABLE_AUTO_BED_LEVELING // Support for a dedicated Z PROBE endstop separate from the Z MIN endstop.
// If you would like to use both a Z PROBE and a Z MIN endstop together or just a Z PROBE with a custom pin, uncomment #define Z_PROBE_ENDSTOP and read the instructions below.
// If you want to still use the Z min endstop for homing, disable Z_SAFE_HOMING above. Eg; to park the head outside the bed area when homing with G28.
// WARNING: The Z MIN endstop will need to set properly as it would without a Z PROBE to prevent head crashes and premature stopping during a print.
// To use a separate Z PROBE endstop, you must have a Z_PROBE_PIN defined in the pins.h file for your control board.
// If you are using a servo based Z PROBE, you will need to enable NUM_SERVOS, SERVO_ENDSTOPS and SERVO_ENDSTOPS_ANGLES in the R/C Servo below.
// RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin in the Aux 4 section of the RAMPS board. Use 5V for powered sensors, otherwise connect to ground and D32
// for normally closed configuration and 5V and D32 for normally open configurations. Normally closed configuration is advised and assumed.
// The D32 pin in Aux 4 on RAMPS maps to the Arduino D32 pin. Z_PROBE_PIN is setting the pin to use on the Arduino. Since the D32 pin on the RAMPS maps to D32 on Arduino, this works.
// D32 is currently selected in the RAMPS 1.3/1.4 pin file. All other boards will need changes to the respective pins_XXXXX.h file.
// WARNING: Setting the wrong pin may have unexpected and potentially disastrous outcomes. Use with caution and do your homework.
//#define Z_PROBE_ENDSTOP
#endif // ENABLE_AUTO_BED_LEVELING
// The position of the homing switches // The position of the homing switches
#define MANUAL_HOME_POSITIONS // If defined, MANUAL_*_HOME_POS below will be used #define MANUAL_HOME_POSITIONS // If defined, MANUAL_*_HOME_POS below will be used
//#define BED_CENTER_AT_0_0 // If defined, the center of the bed is at (X=0, Y=0) //#define BED_CENTER_AT_0_0 // If defined, the center of the bed is at (X=0, Y=0)
//Manual homing switch locations: // Manual homing switch locations:
// For deltabots this means top and center of the Cartesian print volume. // For deltabots this means top and center of the Cartesian print volume.
#define MANUAL_X_HOME_POS 0 #ifdef MANUAL_HOME_POSITIONS
#define MANUAL_Y_HOME_POS 0 #define MANUAL_X_HOME_POS 0
#define MANUAL_Z_HOME_POS 250 // For delta: Distance between nozzle and print surface after homing. #define MANUAL_Y_HOME_POS 0
#define MANUAL_Z_HOME_POS 250 // For delta: Distance between nozzle and print surface after homing.
#endif
/**
* MOVEMENT SETTINGS
*/
//// MOVEMENT SETTINGS
#define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
// delta homing speeds must be the same on xyz // delta homing speeds must be the same on xyz
#define HOMING_FEEDRATE {200*60, 200*60, 200*60, 0} // set the homing speeds (mm/min) #define HOMING_FEEDRATE {200*60, 200*60, 200*60, 0} // set the homing speeds (mm/min)
@ -533,7 +590,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#define DEFAULT_RETRACT_ACCELERATION 3000 // E acceleration in mm/s^2 for retracts #define DEFAULT_RETRACT_ACCELERATION 3000 // E acceleration in mm/s^2 for retracts
#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves #define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing). // Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder). // The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).
// For the other hotends it is their distance from the extruder 0 hotend. // For the other hotends it is their distance from the extruder 0 hotend.
@ -553,9 +609,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// Custom M code points // Custom M code points
#define CUSTOM_M_CODES #define CUSTOM_M_CODES
#ifdef CUSTOM_M_CODES #ifdef CUSTOM_M_CODES
#ifdef ENABLE_AUTO_BED_LEVELING
#define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851 #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
#define Z_PROBE_OFFSET_RANGE_MIN -15 #define Z_PROBE_OFFSET_RANGE_MIN -20
#define Z_PROBE_OFFSET_RANGE_MAX -5 #define Z_PROBE_OFFSET_RANGE_MAX 20
#endif
#endif #endif
@ -566,9 +624,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. // M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
//define this to enable EEPROM support //define this to enable EEPROM support
//#define EEPROM_SETTINGS //#define EEPROM_SETTINGS
//to disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
// please keep turned on if you can. #ifdef EEPROM_SETTINGS
//#define EEPROM_CHITCHAT // To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
#define EEPROM_CHITCHAT // please keep turned on if you can.
#endif
// Preheat Constants // Preheat Constants
#define PLA_PREHEAT_HOTEND_TEMP 180 #define PLA_PREHEAT_HOTEND_TEMP 180
@ -582,13 +642,16 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
//==============================LCD and SD support============================= //==============================LCD and SD support=============================
// Define your display language below. Replace (en) with your language code and uncomment. // Define your display language below. Replace (en) with your language code and uncomment.
// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu // en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
// See also language.h // See also language.h
//#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
// Character based displays can have different extended charsets. // Choose ONE of these 3 charsets. This has to match your hardware. Ignored for full graphic display.
#define DISPLAY_CHARSET_HD44780_JAPAN // "ääööüüß23°" // 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.
//#define DISPLAY_CHARSET_HD44780_WESTERN // "ÄäÖöÜüß²³°" if you see a '~' instead of a 'arrow_right' at the right of submenuitems - this is the right one. // See also documentation/LCDLanguageFont.md
#define DISPLAY_CHARSET_HD44780_JAPAN // this is the most common hardware
//#define DISPLAY_CHARSET_HD44780_WESTERN
//#define DISPLAY_CHARSET_HD44780_CYRILLIC
//#define ULTRA_LCD //general LCD support, also 16x2 //#define ULTRA_LCD //general LCD support, also 16x2
//#define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family) //#define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
@ -601,6 +664,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
//#define ULTIPANEL //the UltiPanel as on Thingiverse //#define ULTIPANEL //the UltiPanel as on Thingiverse
//#define LCD_FEEDBACK_FREQUENCY_HZ 1000 // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click //#define LCD_FEEDBACK_FREQUENCY_HZ 1000 // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
// 0 to disable buzzer feedback
// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3) // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
// http://reprap.org/wiki/PanelOne // http://reprap.org/wiki/PanelOne
@ -648,7 +712,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// #define DELTA_CALIBRATION_MENU // #define DELTA_CALIBRATION_MENU
/** /**
* I2C PANELS * I2C Panels
*/ */
//#define LCD_I2C_SAINSMART_YWROBOT //#define LCD_I2C_SAINSMART_YWROBOT
@ -670,7 +734,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
//#define FAST_PWM_FAN //#define FAST_PWM_FAN
// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
// which is not ass annoying as with the hardware PWM. On the other hand, if this frequency // which is not as annoying as with the hardware PWM. On the other hand, if this frequency
// is too low, you should also increment SOFT_PWM_SCALE. // is too low, you should also increment SOFT_PWM_SCALE.
//#define FAN_SOFT_PWM //#define FAN_SOFT_PWM
@ -715,7 +779,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// Servo Endstops // Servo Endstops
// //
// This allows for servo actuated endstops, primary usage is for the Z Axis to eliminate calibration or bed height changes. // This allows for servo actuated endstops, primary usage is for the Z Axis to eliminate calibration or bed height changes.
// Use M206 command to correct for switch height offset to actual nozzle height. Store that setting with M500. // Use M851 to set the z-probe vertical offset from the nozzle. Store that setting with M500.
// //
//#define SERVO_ENDSTOPS {-1, -1, 0} // Servo index for X, Y, Z. Disable with -1 //#define SERVO_ENDSTOPS {-1, -1, 0} // Servo index for X, Y, Z. Disable with -1
//#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles //#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles

@ -3,6 +3,8 @@
#include "Conditionals.h" #include "Conditionals.h"
// @section temperature
//=========================================================================== //===========================================================================
//=============================Thermal Settings ============================ //=============================Thermal Settings ============================
//=========================================================================== //===========================================================================
@ -13,7 +15,7 @@
#define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control #define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control
//// Heating sanity check: //// Heating sanity check:
// This waits for the watchperiod in milliseconds whenever an M104 or M109 increases the target temperature // This waits for the watch period in milliseconds whenever an M104 or M109 increases the target temperature
// If the temperature has not increased at the end of that period, the target temperature is set to zero. // If the temperature has not increased at the end of that period, the target temperature is set to zero.
// It can be reset with another M104/M109. This check is also only triggered if the target temperature and the current temperature // It can be reset with another M104/M109. This check is also only triggered if the target temperature and the current temperature
// differ by at least 2x WATCH_TEMP_INCREASE // differ by at least 2x WATCH_TEMP_INCREASE
@ -21,22 +23,22 @@
//#define WATCH_TEMP_INCREASE 10 //Heat up at least 10 degree in 20 seconds //#define WATCH_TEMP_INCREASE 10 //Heat up at least 10 degree in 20 seconds
#ifdef PIDTEMP #ifdef PIDTEMP
// this adds an experimental additional term to the heatingpower, proportional to the extrusion speed. // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
// if Kc is choosen well, the additional required power due to increased melting should be compensated. // if Kc is chosen well, the additional required power due to increased melting should be compensated.
#define PID_ADD_EXTRUSION_RATE #define PID_ADD_EXTRUSION_RATE
#ifdef PID_ADD_EXTRUSION_RATE #ifdef PID_ADD_EXTRUSION_RATE
#define DEFAULT_Kc (1) //heatingpower=Kc*(e_speed) #define DEFAULT_Kc (1) //heating power=Kc*(e_speed)
#endif #endif
#endif #endif
//automatic temperature: The hot end target temperature is calculated by all the buffered lines of gcode. //automatic temperature: The hot end target temperature is calculated by all the buffered lines of gcode.
//The maximum buffered steps/sec of the extruder motor are called "se". //The maximum buffered steps/sec of the extruder motor are called "se".
//You enter the autotemp mode by a M109 S<mintemp> T<maxtemp> F<factor> //You enter the autotemp mode by a M109 S<mintemp> B<maxtemp> F<factor>
// the target temperature is set to mintemp+factor*se[steps/sec] and limited by mintemp and maxtemp // the target temperature is set to mintemp+factor*se[steps/sec] and limited by mintemp and maxtemp
// you exit the value by any M109 without F* // you exit the value by any M109 without F*
// Also, if the temperature is set to a value <mintemp, it is not changed by autotemp. // Also, if the temperature is set to a value <mintemp, it is not changed by autotemp.
// on an ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode // on an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
#define AUTOTEMP #define AUTOTEMP
#ifdef AUTOTEMP #ifdef AUTOTEMP
#define AUTOTEMP_OLDWEIGHT 0.98 #define AUTOTEMP_OLDWEIGHT 0.98
@ -46,6 +48,8 @@
//The M105 command return, besides traditional information, the ADC value read from temperature sensors. //The M105 command return, besides traditional information, the ADC value read from temperature sensors.
//#define SHOW_TEMP_ADC_VALUES //#define SHOW_TEMP_ADC_VALUES
// @section extruder
// extruder run-out prevention. // extruder run-out prevention.
//if the machine is idle, and the temperature over MINTEMP, every couple of SECONDS some filament is extruded //if the machine is idle, and the temperature over MINTEMP, every couple of SECONDS some filament is extruded
//#define EXTRUDER_RUNOUT_PREVENT //#define EXTRUDER_RUNOUT_PREVENT
@ -55,6 +59,8 @@
#define EXTRUDER_RUNOUT_SPEED 1500. //extrusion speed #define EXTRUDER_RUNOUT_SPEED 1500. //extrusion speed
#define EXTRUDER_RUNOUT_EXTRUDE 100 #define EXTRUDER_RUNOUT_EXTRUDE 100
// @section temperature
//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements. //These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET" //The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
#define TEMP_SENSOR_AD595_OFFSET 0.0 #define TEMP_SENSOR_AD595_OFFSET 0.0
@ -72,6 +78,8 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu) // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100 //#define FAN_KICKSTART_TIME 100
// @section extruder
// Extruder cooling fans // Extruder cooling fans
// Configure fan pin outputs to automatically turn on/off when the associated // Configure fan pin outputs to automatically turn on/off when the associated
// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE. // extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE.
@ -89,8 +97,12 @@
//=============================Mechanical Settings=========================== //=============================Mechanical Settings===========================
//=========================================================================== //===========================================================================
// @section homing
#define ENDSTOPS_ONLY_FOR_HOMING // If defined the endstops will only be used for homing #define ENDSTOPS_ONLY_FOR_HOMING // If defined the endstops will only be used for homing
// @section extras
//#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats. //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
// A single Z stepper driver is usually used to drive 2 stepper motors. // A single Z stepper driver is usually used to drive 2 stepper motors.
@ -100,6 +112,30 @@
// On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder. // On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder.
//#define Z_DUAL_STEPPER_DRIVERS //#define Z_DUAL_STEPPER_DRIVERS
#ifdef Z_DUAL_STEPPER_DRIVERS
// 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.
// That way the machine is capable to align the bed during home, since both Z steppers are homed.
// There is also an implementation of M666 (software endstops adjustment) to this feature.
// After Z homing, this adjustment is applied to just one of the steppers in order to align the bed.
// 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.
// 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.
// Play a little bit with small adjustments (0.5mm) and check the behaviour.
// The M119 (endstops report) will start reporting the Z2 Endstop as well.
#define Z_DUAL_ENDSTOPS
#ifdef Z_DUAL_ENDSTOPS
#define Z2_STEP_PIN E2_STEP_PIN // Stepper to be used to Z2 axis.
#define Z2_DIR_PIN E2_DIR_PIN
#define Z2_ENABLE_PIN E2_ENABLE_PIN
#define Z2_MAX_PIN 36 //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36)
const bool Z2_MAX_ENDSTOP_INVERTING = false;
#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.
#endif
#endif // Z_DUAL_STEPPER_DRIVERS
// Same again but for Y Axis. // Same again but for Y Axis.
//#define Y_DUAL_STEPPER_DRIVERS //#define Y_DUAL_STEPPER_DRIVERS
@ -112,55 +148,58 @@
// allowing faster printing speeds. // allowing faster printing speeds.
//#define DUAL_X_CARRIAGE //#define DUAL_X_CARRIAGE
#ifdef DUAL_X_CARRIAGE #ifdef DUAL_X_CARRIAGE
// Configuration for second X-carriage // Configuration for second X-carriage
// Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop;
// the second x-carriage always homes to the maximum endstop. // the second x-carriage always homes to the maximum endstop.
#define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
#define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed
#define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position
#define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position #define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position
// However: In this mode the EXTRUDER_OFFSET_X value for the second extruder provides a software // However: In this mode the EXTRUDER_OFFSET_X value for the second extruder provides a software
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command). // without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer. // Remember: you should set the second extruder x-offset to 0 in your slicer.
// Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h) // Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h)
#define X2_ENABLE_PIN 29 #define X2_ENABLE_PIN 29
#define X2_STEP_PIN 25 #define X2_STEP_PIN 25
#define X2_DIR_PIN 23 #define X2_DIR_PIN 23
// There are a few selectable movement modes for dual x-carriages using M605 S<mode> // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
// Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results // Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
// as long as it supports dual x-carriages. (M605 S0) // as long as it supports dual x-carriages. (M605 S0)
// Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so // Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
// that additional slicer support is not required. (M605 S1) // that additional slicer support is not required. (M605 S1)
// Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all // Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
// actions of the first x-carriage. This allows the printer to print 2 arbitrary items at // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
// once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm]) // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
// This is the default power-up mode which can be later using M605. // This is the default power-up mode which can be later using M605.
#define DEFAULT_DUAL_X_CARRIAGE_MODE 0 #define DEFAULT_DUAL_X_CARRIAGE_MODE 0
// Default settings in "Auto-park Mode" // Default settings in "Auto-park Mode"
#define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder #define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder
#define TOOLCHANGE_UNPARK_ZLIFT 1 // the distance to raise Z axis when unparking an extruder #define TOOLCHANGE_UNPARK_ZLIFT 1 // the distance to raise Z axis when unparking an extruder
// Default x offset in duplication mode (typically set to half print bed width) // Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100 #define DEFAULT_DUPLICATION_X_OFFSET 100
#endif //DUAL_X_CARRIAGE #endif //DUAL_X_CARRIAGE
// @section homing
//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again: //homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
#define X_HOME_RETRACT_MM 5 #define X_HOME_BUMP_MM 5
#define Y_HOME_RETRACT_MM 5 #define Y_HOME_BUMP_MM 5
#define Z_HOME_RETRACT_MM 5 // deltas need the same for all three axis #define Z_HOME_BUMP_MM 5 // deltas need the same for all three axis
#define HOMING_BUMP_DIVISOR {10, 10, 20} // Re-Bump Speed Divisor (Divides the Homing Feedrate) #define HOMING_BUMP_DIVISOR {10, 10, 20} // Re-Bump Speed Divisor (Divides the Homing Feedrate)
//#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially. //#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
// @section machine
#define AXIS_RELATIVE_MODES {false, false, false, false} #define AXIS_RELATIVE_MODES {false, false, false, false}
#define MAX_STEP_FREQUENCY 40000 // Max step frequency for Ultimaker (5000 pps / half step) // @section machine
//By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. //By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step.
#define INVERT_X_STEP_PIN false #define INVERT_X_STEP_PIN false
@ -174,11 +213,15 @@
#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
#define DEFAULT_MINTRAVELFEEDRATE 0.0 #define DEFAULT_MINTRAVELFEEDRATE 0.0
// Feedrates for manual moves along X, Y, Z, E from panel // @section lcd
#ifdef ULTIPANEL #ifdef ULTIPANEL
#define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel
#define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder
#endif #endif
// @section extras
// minimum time in microseconds that a movement needs to take if the buffer is emptied. // minimum time in microseconds that a movement needs to take if the buffer is emptied.
#define DEFAULT_MINSEGMENTTIME 20000 #define DEFAULT_MINSEGMENTTIME 20000
@ -214,36 +257,50 @@
//=========================================================================== //===========================================================================
#define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly #define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
#define ENCODER_10X_STEPS_PER_SEC 75 // If the encoder steps per sec exceed this value, multiple the steps moved by ten to quickly advance the value #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
#define ENCODER_100X_STEPS_PER_SEC 160 // If the encoder steps per sec exceed this value, multiple the steps moved by 100 to really quickly advance the value #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
//#define ENCODER_RATE_MULTIPLIER_DEBUG // If defined, output the encoder steps per second value //#define ENCODER_RATE_MULTIPLIER_DEBUG // If defined, output the encoder steps per second value
//#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/ //#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/
#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
#define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? // @section lcd
#define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
#ifdef SDSUPPORT
// If you are using a RAMPS board or cheap E-bay purchased boards that do not detect when an SD card is inserted
// You can get round this by connecting a push button or single throw switch to the pin defined as SDCARDCARDDETECT
// in the pins.h file. When using a push button pulling the pin to ground this will need inverted. This setting should
// be commented out otherwise
#define SDCARDDETECTINVERTED
#define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the filesystem block order. #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers?
// if a file is deleted, it frees a block. hence, the order is not purely cronological. To still have auto0.g accessible, there is again the option to do that. #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
// using:
//#define MENU_ADDAUTOSTART
// Show a progress bar on the LCD when printing from SD #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order.
//#define LCD_PROGRESS_BAR // 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.
// using:
//#define MENU_ADDAUTOSTART
#ifdef LCD_PROGRESS_BAR // Show a progress bar on HD44780 LCDs for SD printing
//#define LCD_PROGRESS_BAR
#ifdef LCD_PROGRESS_BAR
// Amount of time (ms) to show the bar // Amount of time (ms) to show the bar
#define PROGRESS_BAR_BAR_TIME 2000 #define PROGRESS_BAR_BAR_TIME 2000
// Amount of time (ms) to show the status message // Amount of time (ms) to show the status message
#define PROGRESS_BAR_MSG_TIME 2000 #define PROGRESS_BAR_MSG_TIME 3000
// Amount of time (ms) to retain the status message (0=forever) // Amount of time (ms) to retain the status message (0=forever)
#define PROGRESS_MSG_EXPIRE 0 #define PROGRESS_MSG_EXPIRE 0
// Enable this to show messages for MSG_TIME then hide them // Enable this to show messages for MSG_TIME then hide them
//#define PROGRESS_MSG_ONCE //#define PROGRESS_MSG_ONCE
#endif #endif
#endif // SDSUPPORT
// The hardware watchdog should reset the Microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation. // @section more
// The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
//#define USE_WATCHDOG //#define USE_WATCHDOG
#ifdef USE_WATCHDOG #ifdef USE_WATCHDOG
@ -256,8 +313,10 @@
// Enable the option to stop SD printing when hitting and endstops, needs to be enabled from the LCD menu when this option is enabled. // Enable the option to stop SD printing when hitting and endstops, needs to be enabled from the LCD menu when this option is enabled.
//#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
// @section lcd
// Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process // Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process
// it can e.g. be used to change z-positions in the print startup phase in realtime // it can e.g. be used to change z-positions in the print startup phase in real-time
// does not respect endstops! // does not respect endstops!
//#define BABYSTEPPING //#define BABYSTEPPING
#ifdef BABYSTEPPING #ifdef BABYSTEPPING
@ -266,11 +325,13 @@
#define BABYSTEP_Z_MULTIPLICATOR 2 //faster z movements #define BABYSTEP_Z_MULTIPLICATOR 2 //faster z movements
#endif #endif
// @section extruder
// extruder advance constant (s2/mm3) // extruder advance constant (s2/mm3)
// //
// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2 // advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
// //
// hooke's law says: force = k * distance // Hooke's law says: force = k * distance
// Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant // Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant
// so: v ^ 2 is proportional to number of steps we advance the extruder // so: v ^ 2 is proportional to number of steps we advance the extruder
//#define ADVANCE //#define ADVANCE
@ -279,7 +340,9 @@
#define EXTRUDER_ADVANCE_K .0 #define EXTRUDER_ADVANCE_K .0
#define D_FILAMENT 2.85 #define D_FILAMENT 2.85
#define STEPS_MM_E 836 #define STEPS_MM_E 836
#endif // ADVANCE #endif
// @section extras
// Arc interpretation settings: // Arc interpretation settings:
#define MM_PER_ARC_SEGMENT 1 #define MM_PER_ARC_SEGMENT 1
@ -287,11 +350,7 @@
const unsigned int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement const unsigned int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement
// If you are using a RAMPS board or cheap E-bay purchased boards that do not detect when an SD card is inserted // @section temperature
// You can get round this by connecting a push button or single throw switch to the pin defined as SDCARDCARDDETECT
// in the pins.h file. When using a push button pulling the pin to ground this will need inverted. This setting should
// be commented out otherwise
#define SDCARDDETECTINVERTED
// Control heater 0 and heater 1 in parallel. // Control heater 0 and heater 1 in parallel.
//#define HEATERS_PARALLEL //#define HEATERS_PARALLEL
@ -300,21 +359,25 @@ const unsigned int dropsegments=5; //everything with less than this number of st
//=============================Buffers ============================ //=============================Buffers ============================
//=========================================================================== //===========================================================================
// @section hidden
// The number of linear motions that can be in the plan at any give time. // The number of linear motions that can be in the plan at any give time.
// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2, i.g. 8,16,32 because shifts and ors are used to do the ringbuffering. // 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.
#if defined SDSUPPORT #ifdef SDSUPPORT
#define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
#else #else
#define BLOCK_BUFFER_SIZE 16 // maximize block buffer #define BLOCK_BUFFER_SIZE 16 // maximize block buffer
#endif #endif
// @section more
//The ASCII buffer for recieving from the serial: //The ASCII buffer for receiving from the serial:
#define MAX_CMD_SIZE 96 #define MAX_CMD_SIZE 96
#define BUFSIZE 4 #define BUFSIZE 4
// @section fwretract
// Firmware based and LCD controled retract // Firmware based and LCD controlled retract
// M207 and M208 can be used to define parameters for the retraction. // M207 and M208 can be used to define parameters for the retraction.
// The retraction can be called by the slicer using G10 and G11 // The retraction can be called by the slicer using G10 and G11
// until then, intended retractions can be detected by moves that only extrude and the direction. // until then, intended retractions can be detected by moves that only extrude and the direction.
@ -344,6 +407,143 @@ const unsigned int dropsegments=5; //everything with less than this number of st
#endif #endif
#endif #endif
/******************************************************************************\
* enable this section if you have TMC26X motor drivers.
* you need to import the TMC26XStepper library into the arduino IDE for this
******************************************************************************/
// @section tmc
//#define HAVE_TMCDRIVER
#ifdef HAVE_TMCDRIVER
// #define X_IS_TMC
#define X_MAX_CURRENT 1000 //in mA
#define X_SENSE_RESISTOR 91 //in mOhms
#define X_MICROSTEPS 16 //number of microsteps
// #define X2_IS_TMC
#define X2_MAX_CURRENT 1000 //in mA
#define X2_SENSE_RESISTOR 91 //in mOhms
#define X2_MICROSTEPS 16 //number of microsteps
// #define Y_IS_TMC
#define Y_MAX_CURRENT 1000 //in mA
#define Y_SENSE_RESISTOR 91 //in mOhms
#define Y_MICROSTEPS 16 //number of microsteps
// #define Y2_IS_TMC
#define Y2_MAX_CURRENT 1000 //in mA
#define Y2_SENSE_RESISTOR 91 //in mOhms
#define Y2_MICROSTEPS 16 //number of microsteps
// #define Z_IS_TMC
#define Z_MAX_CURRENT 1000 //in mA
#define Z_SENSE_RESISTOR 91 //in mOhms
#define Z_MICROSTEPS 16 //number of microsteps
// #define Z2_IS_TMC
#define Z2_MAX_CURRENT 1000 //in mA
#define Z2_SENSE_RESISTOR 91 //in mOhms
#define Z2_MICROSTEPS 16 //number of microsteps
// #define E0_IS_TMC
#define E0_MAX_CURRENT 1000 //in mA
#define E0_SENSE_RESISTOR 91 //in mOhms
#define E0_MICROSTEPS 16 //number of microsteps
// #define E1_IS_TMC
#define E1_MAX_CURRENT 1000 //in mA
#define E1_SENSE_RESISTOR 91 //in mOhms
#define E1_MICROSTEPS 16 //number of microsteps
// #define E2_IS_TMC
#define E2_MAX_CURRENT 1000 //in mA
#define E2_SENSE_RESISTOR 91 //in mOhms
#define E2_MICROSTEPS 16 //number of microsteps
// #define E3_IS_TMC
#define E3_MAX_CURRENT 1000 //in mA
#define E3_SENSE_RESISTOR 91 //in mOhms
#define E3_MICROSTEPS 16 //number of microsteps
#endif
/******************************************************************************\
* enable this section if you have L6470 motor drivers.
* you need to import the L6470 library into the arduino IDE for this
******************************************************************************/
// @section l6470
//#define HAVE_L6470DRIVER
#ifdef HAVE_L6470DRIVER
// #define X_IS_L6470
#define X_MICROSTEPS 16 //number of microsteps
#define X_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define X_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define X2_IS_L6470
#define X2_MICROSTEPS 16 //number of microsteps
#define X2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define X2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define Y_IS_L6470
#define Y_MICROSTEPS 16 //number of microsteps
#define Y_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define Y_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define Y2_IS_L6470
#define Y2_MICROSTEPS 16 //number of microsteps
#define Y2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define Y2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define Z_IS_L6470
#define Z_MICROSTEPS 16 //number of microsteps
#define Z_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define Z_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define Z2_IS_L6470
#define Z2_MICROSTEPS 16 //number of microsteps
#define Z2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define Z2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define E0_IS_L6470
#define E0_MICROSTEPS 16 //number of microsteps
#define E0_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define E0_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define E1_IS_L6470
#define E1_MICROSTEPS 16 //number of microsteps
#define E1_MICROSTEPS 16 //number of microsteps
#define E1_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define E1_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define E2_IS_L6470
#define E2_MICROSTEPS 16 //number of microsteps
#define E2_MICROSTEPS 16 //number of microsteps
#define E2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define E2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define E3_IS_L6470
#define E3_MICROSTEPS 16 //number of microsteps
#define E3_MICROSTEPS 16 //number of microsteps
#define E3_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define E3_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall
#endif
#include "Conditionals.h" #include "Conditionals.h"
#include "SanityCheck.h" #include "SanityCheck.h"

@ -1,4 +1,4 @@
#ifndef CONFIGURATION_H #ifndef CONFIGURATION_H
#define CONFIGURATION_H #define CONFIGURATION_H
#include "boards.h" #include "boards.h"
@ -38,7 +38,7 @@ Here are some standard links for getting your machine calibrated:
// User-specified version info of this build to display in [Pronterface, etc] terminal window during // User-specified version info of this build to display in [Pronterface, etc] terminal window during
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
// build by the user have been successfully uploaded into firmware. // build by the user have been successfully uploaded into firmware.
#define STRING_VERSION "1.0.2" #define STRING_VERSION "1.0.3 dev"
#define STRING_URL "reprap.org" #define STRING_URL "reprap.org"
#define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
@ -62,8 +62,9 @@ Here are some standard links for getting your machine calibrated:
#define MOTHERBOARD BOARD_RAMPS_13_EFB #define MOTHERBOARD BOARD_RAMPS_13_EFB
#endif #endif
// Define this to set a custom name for your generic Mendel, // Optional custom name for your RepStrap or other custom machine
#define CUSTOM_MENDEL_NAME "Mini Kossel" // Displayed in the LCD "Ready" message
#define CUSTOM_MACHINE_NAME "Mini Kossel"
// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines) // Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines)
// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) // You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4)
@ -107,7 +108,6 @@ Here are some standard links for getting your machine calibrated:
// Horizontal offset of the universal joints on the carriages. // Horizontal offset of the universal joints on the carriages.
#define DELTA_CARRIAGE_OFFSET 19.5 // mm #define DELTA_CARRIAGE_OFFSET 19.5 // mm
// Horizontal distance bridged by diagonal push rods when effector is centered. // Horizontal distance bridged by diagonal push rods when effector is centered.
#define DELTA_RADIUS (DELTA_SMOOTH_ROD_OFFSET-DELTA_EFFECTOR_OFFSET-DELTA_CARRIAGE_OFFSET) #define DELTA_RADIUS (DELTA_SMOOTH_ROD_OFFSET-DELTA_EFFECTOR_OFFSET-DELTA_CARRIAGE_OFFSET)
@ -156,7 +156,7 @@ Here are some standard links for getting your machine calibrated:
// Use it for Testing or Development purposes. NEVER for production machine. // Use it for Testing or Development purposes. NEVER for production machine.
// #define DUMMY_THERMISTOR_998_VALUE 25 // #define DUMMY_THERMISTOR_998_VALUE 25
// #define DUMMY_THERMISTOR_999_VALUE 100 // #define DUMMY_THERMISTOR_999_VALUE 100
// :{ '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" }
#define TEMP_SENSOR_0 7 #define TEMP_SENSOR_0 7
#define TEMP_SENSOR_1 0 #define TEMP_SENSOR_1 0
#define TEMP_SENSOR_2 0 #define TEMP_SENSOR_2 0
@ -218,7 +218,6 @@ Here are some standard links for getting your machine calibrated:
// is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
#define PID_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term #define PID_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term
#define K1 0.95 //smoothing factor within the PID #define K1 0.95 //smoothing factor within the PID
#define PID_dT ((OVERSAMPLENR * 10.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine
// If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
// Ultimaker // Ultimaker
@ -243,7 +242,7 @@ Here are some standard links for getting your machine calibrated:
// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis // Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
// //
// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. // Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder.
// If your PID_dT above is the default, and correct for your hardware/configuration, that means 7.689Hz, // If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz,
// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. // which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. // This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
// If your configuration is significantly different than this and you don't understand the issues involved, you probably // If your configuration is significantly different than this and you don't understand the issues involved, you probably
@ -350,13 +349,14 @@ your extruder heater takes 2 minutes to hit the target on heating.
// #define ENDSTOPPULLUP_ZMIN // #define ENDSTOPPULLUP_ZMIN
#endif #endif
// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins. // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
const bool X_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop. const bool X_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Y_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop. const bool Y_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop. const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool X_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop. const bool X_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Y_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop. const bool Y_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop. const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
//#define DISABLE_MAX_ENDSTOPS //#define DISABLE_MAX_ENDSTOPS
//#define DISABLE_MIN_ENDSTOPS // Deltas only use min endstops for probing //#define DISABLE_MIN_ENDSTOPS // Deltas only use min endstops for probing
@ -373,19 +373,18 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
#define DISABLE_E false // For all extruders #define DISABLE_E false // For all extruders
#define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled #define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled
// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
#define INVERT_X_DIR false // DELTA does not invert #define INVERT_X_DIR false // DELTA does not invert
#define INVERT_Y_DIR false #define INVERT_Y_DIR false
#define INVERT_Z_DIR false #define INVERT_Z_DIR false
#define INVERT_E0_DIR false
#define INVERT_E0_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false #define INVERT_E1_DIR false
#define INVERT_E1_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false #define INVERT_E2_DIR false
#define INVERT_E2_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false #define INVERT_E3_DIR false
#define INVERT_E3_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false
// ENDSTOP SETTINGS: // ENDSTOP SETTINGS:
// Sets direction of endstops when homing; 1=MAX, -1=MIN // Sets direction of endstops when homing; 1=MAX, -1=MIN
// deltas always home to max #define X_HOME_DIR 1 // deltas always home to max
#define X_HOME_DIR 1
#define Y_HOME_DIR 1 #define Y_HOME_DIR 1
#define Z_HOME_DIR 1 #define Z_HOME_DIR 1
@ -393,12 +392,12 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below. #define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below.
// Travel limits after homing (units are in mm) // Travel limits after homing (units are in mm)
#define X_MAX_POS DELTA_PRINTABLE_RADIUS
#define X_MIN_POS -DELTA_PRINTABLE_RADIUS #define X_MIN_POS -DELTA_PRINTABLE_RADIUS
#define Y_MAX_POS DELTA_PRINTABLE_RADIUS
#define Y_MIN_POS -DELTA_PRINTABLE_RADIUS #define Y_MIN_POS -DELTA_PRINTABLE_RADIUS
#define Z_MAX_POS MANUAL_Z_HOME_POS
#define Z_MIN_POS 0 #define Z_MIN_POS 0
#define X_MAX_POS DELTA_PRINTABLE_RADIUS
#define Y_MAX_POS DELTA_PRINTABLE_RADIUS
#define Z_MAX_POS MANUAL_Z_HOME_POS
//=========================================================================== //===========================================================================
//============================= Filament Runout Sensor ====================== //============================= Filament Runout Sensor ======================
@ -417,7 +416,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
// #define MANUAL_BED_LEVELING // Add display menu option for bed leveling // #define MANUAL_BED_LEVELING // Add display menu option for bed leveling
// #define MESH_BED_LEVELING // Enable mesh bed leveling // #define MESH_BED_LEVELING // Enable mesh bed leveling
#if defined(MESH_BED_LEVELING) #ifdef MANUAL_BED_LEVELING
#define MBL_Z_STEP 0.025
#endif // MANUAL_BED_LEVELING
#ifdef MESH_BED_LEVELING
#define MESH_MIN_X 10 #define MESH_MIN_X 10
#define MESH_MAX_X (X_MAX_POS - MESH_MIN_X) #define MESH_MAX_X (X_MAX_POS - MESH_MIN_X)
#define MESH_MIN_Y 10 #define MESH_MIN_Y 10
@ -432,18 +435,33 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
//=========================================================================== //===========================================================================
#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line) #define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line)
// Z-Probe Repeatability test is not supported in Deltas yet. // #define Z_PROBE_REPEATABILITY_TEST // Z-Probe Repeatability test is not supported in Deltas yet.
#ifdef ENABLE_AUTO_BED_LEVELING #ifdef ENABLE_AUTO_BED_LEVELING
// Deltas only support grid mode // There are 2 different ways to specify probing locations
#define AUTO_BED_LEVELING_GRID //
// - "grid" mode
// Probe several points in a rectangular grid.
// You specify the rectangle and the density of sample points.
// This mode is preferred because there are more measurements.
//
// - "3-point" mode
// Probe 3 arbitrary points on the bed (that aren't colinear)
// You specify the XY coordinates of all 3 points.
// Enable this to sample the bed in a grid (least squares solution)
// Note: this feature generates 10KB extra code size
#define AUTO_BED_LEVELING_GRID // Deltas only support grid mode
#ifdef AUTO_BED_LEVELING_GRID
#define DELTA_PROBABLE_RADIUS (DELTA_PRINTABLE_RADIUS - 10) #define DELTA_PROBABLE_RADIUS (DELTA_PRINTABLE_RADIUS - 10)
#define LEFT_PROBE_BED_POSITION -DELTA_PROBABLE_RADIUS #define LEFT_PROBE_BED_POSITION -DELTA_PROBABLE_RADIUS
#define RIGHT_PROBE_BED_POSITION DELTA_PROBABLE_RADIUS #define RIGHT_PROBE_BED_POSITION DELTA_PROBABLE_RADIUS
#define BACK_PROBE_BED_POSITION DELTA_PROBABLE_RADIUS
#define FRONT_PROBE_BED_POSITION -DELTA_PROBABLE_RADIUS #define FRONT_PROBE_BED_POSITION -DELTA_PROBABLE_RADIUS
#define BACK_PROBE_BED_POSITION DELTA_PROBABLE_RADIUS
#define MIN_PROBE_EDGE 10 // The probe square sides can be no smaller than this #define MIN_PROBE_EDGE 10 // The probe square sides can be no smaller than this
@ -453,10 +471,23 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
// Works best with ACCURATE_BED_LEVELING_POINTS 5 or higher. // Works best with ACCURATE_BED_LEVELING_POINTS 5 or higher.
#define AUTO_BED_LEVELING_GRID_POINTS 9 #define AUTO_BED_LEVELING_GRID_POINTS 9
#else // !AUTO_BED_LEVELING_GRID
// Arbitrary points to probe. A simple cross-product
// is used to estimate the plane of the bed.
#define ABL_PROBE_PT_1_X 15
#define ABL_PROBE_PT_1_Y 180
#define ABL_PROBE_PT_2_X 15
#define ABL_PROBE_PT_2_Y 20
#define ABL_PROBE_PT_3_X 170
#define ABL_PROBE_PT_3_Y 20
#endif // AUTO_BED_LEVELING_GRID
// Offsets to the probe relative to the extruder tip (Hotend - Probe) // Offsets to the probe relative to the extruder tip (Hotend - Probe)
// X and Y offsets must be integers // X and Y offsets must be integers
#define X_PROBE_OFFSET_FROM_EXTRUDER 0 // -left +right #define X_PROBE_OFFSET_FROM_EXTRUDER 0 // Probe on: -left +right
#define Y_PROBE_OFFSET_FROM_EXTRUDER -10 // -front +behind #define Y_PROBE_OFFSET_FROM_EXTRUDER -10 // Probe on: -front +behind
#define Z_PROBE_OFFSET_FROM_EXTRUDER -3.5 // -below (always!) #define Z_PROBE_OFFSET_FROM_EXTRUDER -3.5 // -below (always!)
#define Z_RAISE_BEFORE_HOMING 15 // (in mm) Raise Z before homing (G28) for Probe Clearance. #define Z_RAISE_BEFORE_HOMING 15 // (in mm) Raise Z before homing (G28) for Probe Clearance.
@ -468,6 +499,16 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
#define Z_RAISE_BETWEEN_PROBINGS 5 //How much the extruder will be raised when traveling from between next probing points #define Z_RAISE_BETWEEN_PROBINGS 5 //How much the extruder will be raised when traveling from between next probing points
#define Z_RAISE_AFTER_PROBING 50 //How much the extruder will be raised after the last probing point. #define Z_RAISE_AFTER_PROBING 50 //How much the extruder will be raised after the last probing point.
// #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.
//Useful to retract a deployable probe.
//#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell
//#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.
//If defined, the Probe servo will be turned on only during movement and then turned off to avoid jerk
//The value is the delay to turn the servo off after powered on - depends on the servo speed; 300ms is good value, but you can try lower it.
// You MUST HAVE the SERVO_ENDSTOPS defined to use here a value higher than zero otherwise your code will not compile.
// Allen key retractable z-probe as seen on many Kossel delta printers - http://reprap.org/wiki/Kossel#Automatic_bed_leveling_probe // Allen key retractable z-probe as seen on many Kossel delta printers - http://reprap.org/wiki/Kossel#Automatic_bed_leveling_probe
// Deploys by touching z-axis belt. Retracts by pushing the probe down. Uses Z_MIN_PIN. // Deploys by touching z-axis belt. Retracts by pushing the probe down. Uses Z_MIN_PIN.
#define Z_PROBE_ALLEN_KEY #define Z_PROBE_ALLEN_KEY
@ -476,10 +517,10 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
#define Z_PROBE_ALLEN_KEY_DEPLOY_Y DELTA_PRINTABLE_RADIUS #define Z_PROBE_ALLEN_KEY_DEPLOY_Y DELTA_PRINTABLE_RADIUS
#define Z_PROBE_ALLEN_KEY_DEPLOY_Z 100 #define Z_PROBE_ALLEN_KEY_DEPLOY_Z 100
#define Z_PROBE_ALLEN_KEY_RETRACT_X -64 #define Z_PROBE_ALLEN_KEY_STOW_X -64
#define Z_PROBE_ALLEN_KEY_RETRACT_Y 56 #define Z_PROBE_ALLEN_KEY_STOW_Y 56
#define Z_PROBE_ALLEN_KEY_RETRACT_Z 23 #define Z_PROBE_ALLEN_KEY_STOW_Z 23
#define Z_PROBE_ALLEN_KEY_RETRACT_DEPTH 20 #define Z_PROBE_ALLEN_KEY_STOW_DEPTH 20
#endif #endif
//If defined, the Probe servo will be turned on only during movement and then turned off to avoid jerk //If defined, the Probe servo will be turned on only during movement and then turned off to avoid jerk
@ -506,22 +547,39 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
#endif #endif
#endif // ENABLE_AUTO_BED_LEVELING // Support for a dedicated Z PROBE endstop separate from the Z MIN endstop.
// If you would like to use both a Z PROBE and a Z MIN endstop together or just a Z PROBE with a custom pin, uncomment #define Z_PROBE_ENDSTOP and read the instructions below.
// If you want to still use the Z min endstop for homing, disable Z_SAFE_HOMING above. Eg; to park the head outside the bed area when homing with G28.
// WARNING: The Z MIN endstop will need to set properly as it would without a Z PROBE to prevent head crashes and premature stopping during a print.
// To use a separate Z PROBE endstop, you must have a Z_PROBE_PIN defined in the pins.h file for your control board.
// If you are using a servo based Z PROBE, you will need to enable NUM_SERVOS, SERVO_ENDSTOPS and SERVO_ENDSTOPS_ANGLES in the R/C Servo below.
// RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin in the Aux 4 section of the RAMPS board. Use 5V for powered sensors, otherwise connect to ground and D32
// for normally closed configuration and 5V and D32 for normally open configurations. Normally closed configuration is advised and assumed.
// The D32 pin in Aux 4 on RAMPS maps to the Arduino D32 pin. Z_PROBE_PIN is setting the pin to use on the Arduino. Since the D32 pin on the RAMPS maps to D32 on Arduino, this works.
// D32 is currently selected in the RAMPS 1.3/1.4 pin file. All other boards will need changes to the respective pins_XXXXX.h file.
// WARNING: Setting the wrong pin may have unexpected and potentially disastrous outcomes. Use with caution and do your homework.
//#define Z_PROBE_ENDSTOP
#endif // ENABLE_AUTO_BED_LEVELING
// The position of the homing switches // The position of the homing switches
#define MANUAL_HOME_POSITIONS // If defined, MANUAL_*_HOME_POS below will be used #define MANUAL_HOME_POSITIONS // If defined, MANUAL_*_HOME_POS below will be used
#define BED_CENTER_AT_0_0 // If defined, the center of the bed is at (X=0, Y=0) #define BED_CENTER_AT_0_0 // If defined, the center of the bed is at (X=0, Y=0)
//Manual homing switch locations: // Manual homing switch locations:
// For deltabots this means top and center of the Cartesian print volume. // For deltabots this means top and center of the Cartesian print volume.
#define MANUAL_X_HOME_POS 0 #ifdef MANUAL_HOME_POSITIONS
#define MANUAL_Y_HOME_POS 0 #define MANUAL_X_HOME_POS 0
#define MANUAL_Z_HOME_POS 250 // For delta: Distance between nozzle and print surface after homing. #define MANUAL_Y_HOME_POS 0
#define MANUAL_Z_HOME_POS 250 // For delta: Distance between nozzle and print surface after homing.
#endif
/**
* MOVEMENT SETTINGS
*/
//// MOVEMENT SETTINGS
#define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
// delta homing speeds must be the same on xyz // delta homing speeds must be the same on xyz
#define HOMING_FEEDRATE {200*60, 200*60, 200*60, 0} // set the homing speeds (mm/min) #define HOMING_FEEDRATE {200*60, 200*60, 200*60, 0} // set the homing speeds (mm/min)
@ -532,8 +590,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
#define DEFAULT_MAX_FEEDRATE {500, 500, 500, 25} // (mm/sec) #define DEFAULT_MAX_FEEDRATE {500, 500, 500, 25} // (mm/sec)
#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. #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.
#define DEFAULT_ACCELERATION 3000 // X, Y, Z and E max acceleration in mm/s^2 for printing moves #define DEFAULT_ACCELERATION 3000 // X, Y, Z and E acceleration in mm/s^2 for printing moves
#define DEFAULT_RETRACT_ACCELERATION 3000 // X, Y, Z and E max acceleration in mm/s^2 for retracts #define DEFAULT_RETRACT_ACCELERATION 3000 // E acceleration in mm/s^2 for retracts
#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves #define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing). // Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@ -555,9 +613,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
// Custom M code points // Custom M code points
#define CUSTOM_M_CODES #define CUSTOM_M_CODES
#ifdef CUSTOM_M_CODES #ifdef CUSTOM_M_CODES
#ifdef ENABLE_AUTO_BED_LEVELING
#define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851 #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
#define Z_PROBE_OFFSET_RANGE_MIN -15 #define Z_PROBE_OFFSET_RANGE_MIN -20
#define Z_PROBE_OFFSET_RANGE_MAX -5 #define Z_PROBE_OFFSET_RANGE_MAX 20
#endif
#endif #endif
@ -568,9 +628,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. // M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
//define this to enable EEPROM support //define this to enable EEPROM support
//#define EEPROM_SETTINGS //#define EEPROM_SETTINGS
//to disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
// please keep turned on if you can. #ifdef EEPROM_SETTINGS
//#define EEPROM_CHITCHAT // To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
#define EEPROM_CHITCHAT // please keep turned on if you can.
#endif
// Preheat Constants // Preheat Constants
#define PLA_PREHEAT_HOTEND_TEMP 180 #define PLA_PREHEAT_HOTEND_TEMP 180
@ -584,13 +646,16 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
//==============================LCD and SD support============================= //==============================LCD and SD support=============================
// Define your display language below. Replace (en) with your language code and uncomment. // Define your display language below. Replace (en) with your language code and uncomment.
// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu // en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
// See also language.h // See also language.h
//#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
// Character based displays can have different extended charsets. // Choose ONE of these 3 charsets. This has to match your hardware. Ignored for full graphic display.
#define DISPLAY_CHARSET_HD44780_JAPAN // "ääööüüß23°" // 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.
//#define DISPLAY_CHARSET_HD44780_WESTERN // "ÄäÖöÜüß²³°" if you see a '~' instead of a 'arrow_right' at the right of submenuitems - this is the right one. // See also documentation/LCDLanguageFont.md
#define DISPLAY_CHARSET_HD44780_JAPAN // this is the most common hardware
//#define DISPLAY_CHARSET_HD44780_WESTERN
//#define DISPLAY_CHARSET_HD44780_CYRILLIC
//#define ULTRA_LCD //general LCD support, also 16x2 //#define ULTRA_LCD //general LCD support, also 16x2
//#define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family) //#define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
@ -603,6 +668,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
//#define ULTIPANEL //the UltiPanel as on Thingiverse //#define ULTIPANEL //the UltiPanel as on Thingiverse
//#define LCD_FEEDBACK_FREQUENCY_HZ 1000 // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click //#define LCD_FEEDBACK_FREQUENCY_HZ 1000 // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
// 0 to disable buzzer feedback
// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3) // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
// http://reprap.org/wiki/PanelOne // http://reprap.org/wiki/PanelOne
@ -672,7 +738,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
//#define FAST_PWM_FAN //#define FAST_PWM_FAN
// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
// which is not ass annoying as with the hardware PWM. On the other hand, if this frequency // which is not as annoying as with the hardware PWM. On the other hand, if this frequency
// is too low, you should also increment SOFT_PWM_SCALE. // is too low, you should also increment SOFT_PWM_SCALE.
//#define FAN_SOFT_PWM //#define FAN_SOFT_PWM
@ -717,7 +783,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
// Servo Endstops // Servo Endstops
// //
// This allows for servo actuated endstops, primary usage is for the Z Axis to eliminate calibration or bed height changes. // This allows for servo actuated endstops, primary usage is for the Z Axis to eliminate calibration or bed height changes.
// Use M206 command to correct for switch height offset to actual nozzle height. Store that setting with M500. // Use M851 to set the z-probe vertical offset from the nozzle. Store that setting with M500.
// //
//#define SERVO_ENDSTOPS {-1, -1, 0} // Servo index for X, Y, Z. Disable with -1 //#define SERVO_ENDSTOPS {-1, -1, 0} // Servo index for X, Y, Z. Disable with -1
//#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles //#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles

@ -3,6 +3,8 @@
#include "Conditionals.h" #include "Conditionals.h"
// @section temperature
//=========================================================================== //===========================================================================
//=============================Thermal Settings ============================ //=============================Thermal Settings ============================
//=========================================================================== //===========================================================================
@ -13,7 +15,7 @@
#define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control #define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control
//// Heating sanity check: //// Heating sanity check:
// This waits for the watchperiod in milliseconds whenever an M104 or M109 increases the target temperature // This waits for the watch period in milliseconds whenever an M104 or M109 increases the target temperature
// If the temperature has not increased at the end of that period, the target temperature is set to zero. // If the temperature has not increased at the end of that period, the target temperature is set to zero.
// It can be reset with another M104/M109. This check is also only triggered if the target temperature and the current temperature // It can be reset with another M104/M109. This check is also only triggered if the target temperature and the current temperature
// differ by at least 2x WATCH_TEMP_INCREASE // differ by at least 2x WATCH_TEMP_INCREASE
@ -21,22 +23,22 @@
//#define WATCH_TEMP_INCREASE 10 //Heat up at least 10 degree in 20 seconds //#define WATCH_TEMP_INCREASE 10 //Heat up at least 10 degree in 20 seconds
#ifdef PIDTEMP #ifdef PIDTEMP
// this adds an experimental additional term to the heatingpower, proportional to the extrusion speed. // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
// if Kc is choosen well, the additional required power due to increased melting should be compensated. // if Kc is chosen well, the additional required power due to increased melting should be compensated.
#define PID_ADD_EXTRUSION_RATE #define PID_ADD_EXTRUSION_RATE
#ifdef PID_ADD_EXTRUSION_RATE #ifdef PID_ADD_EXTRUSION_RATE
#define DEFAULT_Kc (1) //heatingpower=Kc*(e_speed) #define DEFAULT_Kc (1) //heating power=Kc*(e_speed)
#endif #endif
#endif #endif
//automatic temperature: The hot end target temperature is calculated by all the buffered lines of gcode. //automatic temperature: The hot end target temperature is calculated by all the buffered lines of gcode.
//The maximum buffered steps/sec of the extruder motor are called "se". //The maximum buffered steps/sec of the extruder motor are called "se".
//You enter the autotemp mode by a M109 S<mintemp> T<maxtemp> F<factor> //You enter the autotemp mode by a M109 S<mintemp> B<maxtemp> F<factor>
// the target temperature is set to mintemp+factor*se[steps/sec] and limited by mintemp and maxtemp // the target temperature is set to mintemp+factor*se[steps/sec] and limited by mintemp and maxtemp
// you exit the value by any M109 without F* // you exit the value by any M109 without F*
// Also, if the temperature is set to a value <mintemp, it is not changed by autotemp. // Also, if the temperature is set to a value <mintemp, it is not changed by autotemp.
// on an ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode // on an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
#define AUTOTEMP #define AUTOTEMP
#ifdef AUTOTEMP #ifdef AUTOTEMP
#define AUTOTEMP_OLDWEIGHT 0.98 #define AUTOTEMP_OLDWEIGHT 0.98
@ -46,6 +48,8 @@
//The M105 command return, besides traditional information, the ADC value read from temperature sensors. //The M105 command return, besides traditional information, the ADC value read from temperature sensors.
//#define SHOW_TEMP_ADC_VALUES //#define SHOW_TEMP_ADC_VALUES
// @section extruder
// extruder run-out prevention. // extruder run-out prevention.
//if the machine is idle, and the temperature over MINTEMP, every couple of SECONDS some filament is extruded //if the machine is idle, and the temperature over MINTEMP, every couple of SECONDS some filament is extruded
//#define EXTRUDER_RUNOUT_PREVENT //#define EXTRUDER_RUNOUT_PREVENT
@ -55,6 +59,8 @@
#define EXTRUDER_RUNOUT_SPEED 1500. //extrusion speed #define EXTRUDER_RUNOUT_SPEED 1500. //extrusion speed
#define EXTRUDER_RUNOUT_EXTRUDE 100 #define EXTRUDER_RUNOUT_EXTRUDE 100
// @section temperature
//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements. //These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET" //The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
#define TEMP_SENSOR_AD595_OFFSET 0.0 #define TEMP_SENSOR_AD595_OFFSET 0.0
@ -72,6 +78,8 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu) // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100 //#define FAN_KICKSTART_TIME 100
// @section extruder
// Extruder cooling fans // Extruder cooling fans
// Configure fan pin outputs to automatically turn on/off when the associated // Configure fan pin outputs to automatically turn on/off when the associated
// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE. // extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE.
@ -89,8 +97,12 @@
//=============================Mechanical Settings=========================== //=============================Mechanical Settings===========================
//=========================================================================== //===========================================================================
// @section homing
#define ENDSTOPS_ONLY_FOR_HOMING // If defined the endstops will only be used for homing #define ENDSTOPS_ONLY_FOR_HOMING // If defined the endstops will only be used for homing
// @section extras
//#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats. //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
// A single Z stepper driver is usually used to drive 2 stepper motors. // A single Z stepper driver is usually used to drive 2 stepper motors.
@ -100,6 +112,30 @@
// On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder. // On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder.
//#define Z_DUAL_STEPPER_DRIVERS //#define Z_DUAL_STEPPER_DRIVERS
#ifdef Z_DUAL_STEPPER_DRIVERS
// 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.
// That way the machine is capable to align the bed during home, since both Z steppers are homed.
// There is also an implementation of M666 (software endstops adjustment) to this feature.
// After Z homing, this adjustment is applied to just one of the steppers in order to align the bed.
// 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.
// 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.
// Play a little bit with small adjustments (0.5mm) and check the behaviour.
// The M119 (endstops report) will start reporting the Z2 Endstop as well.
#define Z_DUAL_ENDSTOPS
#ifdef Z_DUAL_ENDSTOPS
#define Z2_STEP_PIN E2_STEP_PIN // Stepper to be used to Z2 axis.
#define Z2_DIR_PIN E2_DIR_PIN
#define Z2_ENABLE_PIN E2_ENABLE_PIN
#define Z2_MAX_PIN 36 //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36)
const bool Z2_MAX_ENDSTOP_INVERTING = false;
#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.
#endif
#endif // Z_DUAL_STEPPER_DRIVERS
// Same again but for Y Axis. // Same again but for Y Axis.
//#define Y_DUAL_STEPPER_DRIVERS //#define Y_DUAL_STEPPER_DRIVERS
@ -112,55 +148,58 @@
// allowing faster printing speeds. // allowing faster printing speeds.
//#define DUAL_X_CARRIAGE //#define DUAL_X_CARRIAGE
#ifdef DUAL_X_CARRIAGE #ifdef DUAL_X_CARRIAGE
// Configuration for second X-carriage // Configuration for second X-carriage
// Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop;
// the second x-carriage always homes to the maximum endstop. // the second x-carriage always homes to the maximum endstop.
#define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
#define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed
#define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position
#define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position #define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position
// However: In this mode the EXTRUDER_OFFSET_X value for the second extruder provides a software // However: In this mode the EXTRUDER_OFFSET_X value for the second extruder provides a software
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command). // without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer. // Remember: you should set the second extruder x-offset to 0 in your slicer.
// Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h) // Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h)
#define X2_ENABLE_PIN 29 #define X2_ENABLE_PIN 29
#define X2_STEP_PIN 25 #define X2_STEP_PIN 25
#define X2_DIR_PIN 23 #define X2_DIR_PIN 23
// There are a few selectable movement modes for dual x-carriages using M605 S<mode> // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
// Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results // Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
// as long as it supports dual x-carriages. (M605 S0) // as long as it supports dual x-carriages. (M605 S0)
// Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so // Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
// that additional slicer support is not required. (M605 S1) // that additional slicer support is not required. (M605 S1)
// Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all // Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
// actions of the first x-carriage. This allows the printer to print 2 arbitrary items at // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
// once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm]) // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
// This is the default power-up mode which can be later using M605. // This is the default power-up mode which can be later using M605.
#define DEFAULT_DUAL_X_CARRIAGE_MODE 0 #define DEFAULT_DUAL_X_CARRIAGE_MODE 0
// Default settings in "Auto-park Mode" // Default settings in "Auto-park Mode"
#define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder #define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder
#define TOOLCHANGE_UNPARK_ZLIFT 1 // the distance to raise Z axis when unparking an extruder #define TOOLCHANGE_UNPARK_ZLIFT 1 // the distance to raise Z axis when unparking an extruder
// Default x offset in duplication mode (typically set to half print bed width) // Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100 #define DEFAULT_DUPLICATION_X_OFFSET 100
#endif //DUAL_X_CARRIAGE #endif //DUAL_X_CARRIAGE
// @section homing
//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again: //homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
#define X_HOME_RETRACT_MM 5 #define X_HOME_BUMP_MM 5
#define Y_HOME_RETRACT_MM 5 #define Y_HOME_BUMP_MM 5
#define Z_HOME_RETRACT_MM 5 // deltas need the same for all three axis #define Z_HOME_BUMP_MM 5 // deltas need the same for all three axis
#define HOMING_BUMP_DIVISOR {10, 10, 20} // Re-Bump Speed Divisor (Divides the Homing Feedrate) #define HOMING_BUMP_DIVISOR {10, 10, 20} // Re-Bump Speed Divisor (Divides the Homing Feedrate)
//#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially. //#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
// @section machine
#define AXIS_RELATIVE_MODES {false, false, false, false} #define AXIS_RELATIVE_MODES {false, false, false, false}
#define MAX_STEP_FREQUENCY 40000 // Max step frequency for Ultimaker (5000 pps / half step) // @section machine
//By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. //By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step.
#define INVERT_X_STEP_PIN false #define INVERT_X_STEP_PIN false
@ -174,11 +213,15 @@
#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
#define DEFAULT_MINTRAVELFEEDRATE 0.0 #define DEFAULT_MINTRAVELFEEDRATE 0.0
// Feedrates for manual moves along X, Y, Z, E from panel // @section lcd
#ifdef ULTIPANEL #ifdef ULTIPANEL
#define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel
#define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder
#endif #endif
// @section extras
// minimum time in microseconds that a movement needs to take if the buffer is emptied. // minimum time in microseconds that a movement needs to take if the buffer is emptied.
#define DEFAULT_MINSEGMENTTIME 20000 #define DEFAULT_MINSEGMENTTIME 20000
@ -213,36 +256,50 @@
//=========================================================================== //===========================================================================
#define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly #define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
#define ENCODER_10X_STEPS_PER_SEC 75 // If the encoder steps per sec exceed this value, multiple the steps moved by ten to quickly advance the value #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
#define ENCODER_100X_STEPS_PER_SEC 160 // If the encoder steps per sec exceed this value, multiple the steps moved by 100 to really quickly advance the value #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
//#define ENCODER_RATE_MULTIPLIER_DEBUG // If defined, output the encoder steps per second value //#define ENCODER_RATE_MULTIPLIER_DEBUG // If defined, output the encoder steps per second value
//#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/ //#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/
#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
#define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? // @section lcd
#define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
#ifdef SDSUPPORT
// If you are using a RAMPS board or cheap E-bay purchased boards that do not detect when an SD card is inserted
// You can get round this by connecting a push button or single throw switch to the pin defined as SDCARDCARDDETECT
// in the pins.h file. When using a push button pulling the pin to ground this will need inverted. This setting should
// be commented out otherwise
#define SDCARDDETECTINVERTED
#define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the filesystem block order. #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers?
// if a file is deleted, it frees a block. hence, the order is not purely cronological. To still have auto0.g accessible, there is again the option to do that. #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
// using:
//#define MENU_ADDAUTOSTART
// Show a progress bar on the LCD when printing from SD #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order.
//#define LCD_PROGRESS_BAR // 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.
// using:
//#define MENU_ADDAUTOSTART
#ifdef LCD_PROGRESS_BAR // Show a progress bar on HD44780 LCDs for SD printing
//#define LCD_PROGRESS_BAR
#ifdef LCD_PROGRESS_BAR
// Amount of time (ms) to show the bar // Amount of time (ms) to show the bar
#define PROGRESS_BAR_BAR_TIME 2000 #define PROGRESS_BAR_BAR_TIME 2000
// Amount of time (ms) to show the status message // Amount of time (ms) to show the status message
#define PROGRESS_BAR_MSG_TIME 2000 #define PROGRESS_BAR_MSG_TIME 3000
// Amount of time (ms) to retain the status message (0=forever) // Amount of time (ms) to retain the status message (0=forever)
#define PROGRESS_MSG_EXPIRE 0 #define PROGRESS_MSG_EXPIRE 0
// Enable this to show messages for MSG_TIME then hide them // Enable this to show messages for MSG_TIME then hide them
//#define PROGRESS_MSG_ONCE //#define PROGRESS_MSG_ONCE
#endif #endif
#endif // SDSUPPORT
// The hardware watchdog should reset the Microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation. // @section more
// The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
//#define USE_WATCHDOG //#define USE_WATCHDOG
#ifdef USE_WATCHDOG #ifdef USE_WATCHDOG
@ -255,8 +312,10 @@
// Enable the option to stop SD printing when hitting and endstops, needs to be enabled from the LCD menu when this option is enabled. // Enable the option to stop SD printing when hitting and endstops, needs to be enabled from the LCD menu when this option is enabled.
//#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
// @section lcd
// Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process // Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process
// it can e.g. be used to change z-positions in the print startup phase in realtime // it can e.g. be used to change z-positions in the print startup phase in real-time
// does not respect endstops! // does not respect endstops!
//#define BABYSTEPPING //#define BABYSTEPPING
#ifdef BABYSTEPPING #ifdef BABYSTEPPING
@ -265,11 +324,13 @@
#define BABYSTEP_Z_MULTIPLICATOR 2 //faster z movements #define BABYSTEP_Z_MULTIPLICATOR 2 //faster z movements
#endif #endif
// @section extruder
// extruder advance constant (s2/mm3) // extruder advance constant (s2/mm3)
// //
// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2 // advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
// //
// hooke's law says: force = k * distance // Hooke's law says: force = k * distance
// Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant // Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant
// so: v ^ 2 is proportional to number of steps we advance the extruder // so: v ^ 2 is proportional to number of steps we advance the extruder
//#define ADVANCE //#define ADVANCE
@ -278,7 +339,9 @@
#define EXTRUDER_ADVANCE_K .0 #define EXTRUDER_ADVANCE_K .0
#define D_FILAMENT 2.85 #define D_FILAMENT 2.85
#define STEPS_MM_E 836 #define STEPS_MM_E 836
#endif // ADVANCE #endif
// @section extras
// Arc interpretation settings: // Arc interpretation settings:
#define MM_PER_ARC_SEGMENT 1 #define MM_PER_ARC_SEGMENT 1
@ -286,11 +349,7 @@
const unsigned int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement const unsigned int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement
// If you are using a RAMPS board or cheap E-bay purchased boards that do not detect when an SD card is inserted // @section temperature
// You can get round this by connecting a push button or single throw switch to the pin defined as SDCARDCARDDETECT
// in the pins.h file. When using a push button pulling the pin to ground this will need inverted. This setting should
// be commented out otherwise
#define SDCARDDETECTINVERTED
// Control heater 0 and heater 1 in parallel. // Control heater 0 and heater 1 in parallel.
//#define HEATERS_PARALLEL //#define HEATERS_PARALLEL
@ -299,21 +358,25 @@ const unsigned int dropsegments=5; //everything with less than this number of st
//=============================Buffers ============================ //=============================Buffers ============================
//=========================================================================== //===========================================================================
// @section hidden
// The number of linear motions that can be in the plan at any give time. // The number of linear motions that can be in the plan at any give time.
// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2, i.g. 8,16,32 because shifts and ors are used to do the ringbuffering. // 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.
#if defined SDSUPPORT #ifdef SDSUPPORT
#define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
#else #else
#define BLOCK_BUFFER_SIZE 16 // maximize block buffer #define BLOCK_BUFFER_SIZE 16 // maximize block buffer
#endif #endif
// @section more
//The ASCII buffer for recieving from the serial: //The ASCII buffer for receiving from the serial:
#define MAX_CMD_SIZE 96 #define MAX_CMD_SIZE 96
#define BUFSIZE 4 #define BUFSIZE 4
// @section fwretract
// Firmware based and LCD controled retract // Firmware based and LCD controlled retract
// M207 and M208 can be used to define parameters for the retraction. // M207 and M208 can be used to define parameters for the retraction.
// The retraction can be called by the slicer using G10 and G11 // The retraction can be called by the slicer using G10 and G11
// until then, intended retractions can be detected by moves that only extrude and the direction. // until then, intended retractions can be detected by moves that only extrude and the direction.
@ -343,6 +406,143 @@ const unsigned int dropsegments=5; //everything with less than this number of st
#endif #endif
#endif #endif
/******************************************************************************\
* enable this section if you have TMC26X motor drivers.
* you need to import the TMC26XStepper library into the arduino IDE for this
******************************************************************************/
// @section tmc
//#define HAVE_TMCDRIVER
#ifdef HAVE_TMCDRIVER
// #define X_IS_TMC
#define X_MAX_CURRENT 1000 //in mA
#define X_SENSE_RESISTOR 91 //in mOhms
#define X_MICROSTEPS 16 //number of microsteps
// #define X2_IS_TMC
#define X2_MAX_CURRENT 1000 //in mA
#define X2_SENSE_RESISTOR 91 //in mOhms
#define X2_MICROSTEPS 16 //number of microsteps
// #define Y_IS_TMC
#define Y_MAX_CURRENT 1000 //in mA
#define Y_SENSE_RESISTOR 91 //in mOhms
#define Y_MICROSTEPS 16 //number of microsteps
// #define Y2_IS_TMC
#define Y2_MAX_CURRENT 1000 //in mA
#define Y2_SENSE_RESISTOR 91 //in mOhms
#define Y2_MICROSTEPS 16 //number of microsteps
// #define Z_IS_TMC
#define Z_MAX_CURRENT 1000 //in mA
#define Z_SENSE_RESISTOR 91 //in mOhms
#define Z_MICROSTEPS 16 //number of microsteps
// #define Z2_IS_TMC
#define Z2_MAX_CURRENT 1000 //in mA
#define Z2_SENSE_RESISTOR 91 //in mOhms
#define Z2_MICROSTEPS 16 //number of microsteps
// #define E0_IS_TMC
#define E0_MAX_CURRENT 1000 //in mA
#define E0_SENSE_RESISTOR 91 //in mOhms
#define E0_MICROSTEPS 16 //number of microsteps
// #define E1_IS_TMC
#define E1_MAX_CURRENT 1000 //in mA
#define E1_SENSE_RESISTOR 91 //in mOhms
#define E1_MICROSTEPS 16 //number of microsteps
// #define E2_IS_TMC
#define E2_MAX_CURRENT 1000 //in mA
#define E2_SENSE_RESISTOR 91 //in mOhms
#define E2_MICROSTEPS 16 //number of microsteps
// #define E3_IS_TMC
#define E3_MAX_CURRENT 1000 //in mA
#define E3_SENSE_RESISTOR 91 //in mOhms
#define E3_MICROSTEPS 16 //number of microsteps
#endif
/******************************************************************************\
* enable this section if you have L6470 motor drivers.
* you need to import the L6470 library into the arduino IDE for this
******************************************************************************/
// @section l6470
//#define HAVE_L6470DRIVER
#ifdef HAVE_L6470DRIVER
// #define X_IS_L6470
#define X_MICROSTEPS 16 //number of microsteps
#define X_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define X_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define X2_IS_L6470
#define X2_MICROSTEPS 16 //number of microsteps
#define X2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define X2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define Y_IS_L6470
#define Y_MICROSTEPS 16 //number of microsteps
#define Y_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define Y_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define Y2_IS_L6470
#define Y2_MICROSTEPS 16 //number of microsteps
#define Y2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define Y2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define Z_IS_L6470
#define Z_MICROSTEPS 16 //number of microsteps
#define Z_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define Z_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define Z2_IS_L6470
#define Z2_MICROSTEPS 16 //number of microsteps
#define Z2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define Z2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define E0_IS_L6470
#define E0_MICROSTEPS 16 //number of microsteps
#define E0_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define E0_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define E1_IS_L6470
#define E1_MICROSTEPS 16 //number of microsteps
#define E1_MICROSTEPS 16 //number of microsteps
#define E1_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define E1_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define E2_IS_L6470
#define E2_MICROSTEPS 16 //number of microsteps
#define E2_MICROSTEPS 16 //number of microsteps
#define E2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define E2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define E3_IS_L6470
#define E3_MICROSTEPS 16 //number of microsteps
#define E3_MICROSTEPS 16 //number of microsteps
#define E3_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define E3_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall
#endif
#include "Conditionals.h" #include "Conditionals.h"
#include "SanityCheck.h" #include "SanityCheck.h"

@ -38,7 +38,7 @@ Here are some standard links for getting your machine calibrated:
// User-specified version info of this build to display in [Pronterface, etc] terminal window during // User-specified version info of this build to display in [Pronterface, etc] terminal window during
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
// build by the user have been successfully uploaded into firmware. // build by the user have been successfully uploaded into firmware.
#define STRING_VERSION "1.0.2" #define STRING_VERSION "1.0.3 dev"
#define STRING_URL "reprap.org" #define STRING_URL "reprap.org"
#define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
@ -62,8 +62,9 @@ Here are some standard links for getting your machine calibrated:
#define MOTHERBOARD BOARD_5DPRINT #define MOTHERBOARD BOARD_5DPRINT
#endif #endif
// Define this to set a custom name for your generic Mendel, // Optional custom name for your RepStrap or other custom machine
// #define CUSTOM_MENDEL_NAME "This Mendel" // Displayed in the LCD "Ready" message
// #define CUSTOM_MACHINE_NAME "3D Printer"
// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines) // Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines)
// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) // You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4)
@ -122,7 +123,7 @@ Here are some standard links for getting your machine calibrated:
// Use it for Testing or Development purposes. NEVER for production machine. // Use it for Testing or Development purposes. NEVER for production machine.
// #define DUMMY_THERMISTOR_998_VALUE 25 // #define DUMMY_THERMISTOR_998_VALUE 25
// #define DUMMY_THERMISTOR_999_VALUE 100 // #define DUMMY_THERMISTOR_999_VALUE 100
// :{ '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" }
#define TEMP_SENSOR_0 1 #define TEMP_SENSOR_0 1
#define TEMP_SENSOR_1 0 #define TEMP_SENSOR_1 0
#define TEMP_SENSOR_2 0 #define TEMP_SENSOR_2 0
@ -184,7 +185,6 @@ Here are some standard links for getting your machine calibrated:
// is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
#define PID_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term #define PID_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term
#define K1 0.95 //smoothing factor within the PID #define K1 0.95 //smoothing factor within the PID
#define PID_dT ((OVERSAMPLENR * 10.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine
// If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
// Ultimaker // Ultimaker
@ -209,7 +209,7 @@ Here are some standard links for getting your machine calibrated:
// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis // Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
// //
// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. // Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder.
// If your PID_dT above is the default, and correct for your hardware/configuration, that means 7.689Hz, // If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz,
// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. // which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. // This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
// If your configuration is significantly different than this and you don't understand the issues involved, you probably // If your configuration is significantly different than this and you don't understand the issues involved, you probably
@ -319,13 +319,14 @@ your extruder heater takes 2 minutes to hit the target on heating.
// #define ENDSTOPPULLUP_ZMIN // #define ENDSTOPPULLUP_ZMIN
#endif #endif
// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins. // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
const bool X_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop. const bool X_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Y_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop. const bool Y_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop. const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
//#define DISABLE_MAX_ENDSTOPS //#define DISABLE_MAX_ENDSTOPS
//#define DISABLE_MIN_ENDSTOPS //#define DISABLE_MIN_ENDSTOPS
@ -342,13 +343,14 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#define DISABLE_E false // For all extruders #define DISABLE_E false // For all extruders
#define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled #define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled
#define INVERT_X_DIR false // for Mendel set to false, for Orca set to true // Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
#define INVERT_Y_DIR false // for Mendel set to true, for Orca set to false #define INVERT_X_DIR false
#define INVERT_Z_DIR false // for Mendel set to false, for Orca set to true #define INVERT_Y_DIR false
#define INVERT_E0_DIR true // for direct drive extruder v9 set to true, for geared extruder set to false #define INVERT_Z_DIR false
#define INVERT_E1_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false #define INVERT_E0_DIR true
#define INVERT_E2_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false #define INVERT_E1_DIR false
#define INVERT_E3_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false #define INVERT_E2_DIR false
#define INVERT_E3_DIR false
// ENDSTOP SETTINGS: // ENDSTOP SETTINGS:
// Sets direction of endstops when homing; 1=MAX, -1=MIN // Sets direction of endstops when homing; 1=MAX, -1=MIN
@ -360,12 +362,12 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below. #define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below.
// Travel limits after homing (units are in mm) // Travel limits after homing (units are in mm)
#define X_MAX_POS 110
#define X_MIN_POS 0 #define X_MIN_POS 0
#define Y_MAX_POS 150
#define Y_MIN_POS 0 #define Y_MIN_POS 0
#define Z_MAX_POS 86
#define Z_MIN_POS 0 #define Z_MIN_POS 0
#define X_MAX_POS 110
#define Y_MAX_POS 150
#define Z_MAX_POS 86
//=========================================================================== //===========================================================================
//============================= Filament Runout Sensor ====================== //============================= Filament Runout Sensor ======================
@ -384,7 +386,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// #define MANUAL_BED_LEVELING // Add display menu option for bed leveling // #define MANUAL_BED_LEVELING // Add display menu option for bed leveling
// #define MESH_BED_LEVELING // Enable mesh bed leveling // #define MESH_BED_LEVELING // Enable mesh bed leveling
#if defined(MESH_BED_LEVELING) #ifdef MANUAL_BED_LEVELING
#define MBL_Z_STEP 0.025
#endif // MANUAL_BED_LEVELING
#ifdef MESH_BED_LEVELING
#define MESH_MIN_X 10 #define MESH_MIN_X 10
#define MESH_MAX_X (X_MAX_POS - MESH_MIN_X) #define MESH_MAX_X (X_MAX_POS - MESH_MIN_X)
#define MESH_MIN_Y 10 #define MESH_MIN_Y 10
@ -431,7 +437,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// You probably don't need more than 3 (squared=9) // You probably don't need more than 3 (squared=9)
#define AUTO_BED_LEVELING_GRID_POINTS 2 #define AUTO_BED_LEVELING_GRID_POINTS 2
#else // !AUTO_BED_LEVELING_GRID #else // !AUTO_BED_LEVELING_GRID
// Arbitrary points to probe. A simple cross-product // Arbitrary points to probe. A simple cross-product
@ -445,11 +450,10 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#endif // AUTO_BED_LEVELING_GRID #endif // AUTO_BED_LEVELING_GRID
// Offsets to the probe relative to the extruder tip (Hotend - Probe) // Offsets to the probe relative to the extruder tip (Hotend - Probe)
// X and Y offsets must be integers // X and Y offsets must be integers
#define X_PROBE_OFFSET_FROM_EXTRUDER -25 // -left +right #define X_PROBE_OFFSET_FROM_EXTRUDER -25 // Probe on: -left +right
#define Y_PROBE_OFFSET_FROM_EXTRUDER -29 // -front +behind #define Y_PROBE_OFFSET_FROM_EXTRUDER -29 // Probe on: -front +behind
#define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35 // -below (always!) #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35 // -below (always!)
#define Z_RAISE_BEFORE_HOMING 4 // (in mm) Raise Z before homing (G28) for Probe Clearance. #define Z_RAISE_BEFORE_HOMING 4 // (in mm) Raise Z before homing (G28) for Probe Clearance.
@ -461,6 +465,9 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#define Z_RAISE_BETWEEN_PROBINGS 5 //How much the extruder will be raised when traveling from between next probing points #define Z_RAISE_BETWEEN_PROBINGS 5 //How much the extruder will be raised when traveling from between next probing points
#define Z_RAISE_AFTER_PROBING 15 //How much the extruder will be raised after the last probing point. #define Z_RAISE_AFTER_PROBING 15 //How much the extruder will be raised after the last probing point.
// #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.
//Useful to retract a deployable probe.
//#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell //#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell
//#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. //#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.
@ -488,6 +495,20 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#endif #endif
// Support for a dedicated Z PROBE endstop separate from the Z MIN endstop.
// If you would like to use both a Z PROBE and a Z MIN endstop together or just a Z PROBE with a custom pin, uncomment #define Z_PROBE_ENDSTOP and read the instructions below.
// If you want to still use the Z min endstop for homing, disable Z_SAFE_HOMING above. Eg; to park the head outside the bed area when homing with G28.
// WARNING: The Z MIN endstop will need to set properly as it would without a Z PROBE to prevent head crashes and premature stopping during a print.
// To use a separate Z PROBE endstop, you must have a Z_PROBE_PIN defined in the pins.h file for your control board.
// If you are using a servo based Z PROBE, you will need to enable NUM_SERVOS, SERVO_ENDSTOPS and SERVO_ENDSTOPS_ANGLES in the R/C Servo below.
// RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin in the Aux 4 section of the RAMPS board. Use 5V for powered sensors, otherwise connect to ground and D32
// for normally closed configuration and 5V and D32 for normally open configurations. Normally closed configuration is advised and assumed.
// The D32 pin in Aux 4 on RAMPS maps to the Arduino D32 pin. Z_PROBE_PIN is setting the pin to use on the Arduino. Since the D32 pin on the RAMPS maps to D32 on Arduino, this works.
// D32 is currently selected in the RAMPS 1.3/1.4 pin file. All other boards will need changes to the respective pins_XXXXX.h file.
// WARNING: Setting the wrong pin may have unexpected and potentially disastrous outcomes. Use with caution and do your homework.
//#define Z_PROBE_ENDSTOP
#endif // ENABLE_AUTO_BED_LEVELING #endif // ENABLE_AUTO_BED_LEVELING
@ -495,15 +516,19 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
//#define MANUAL_HOME_POSITIONS // If defined, MANUAL_*_HOME_POS below will be used //#define MANUAL_HOME_POSITIONS // If defined, MANUAL_*_HOME_POS below will be used
//#define BED_CENTER_AT_0_0 // If defined, the center of the bed is at (X=0, Y=0) //#define BED_CENTER_AT_0_0 // If defined, the center of the bed is at (X=0, Y=0)
//Manual homing switch locations: // Manual homing switch locations:
// For deltabots this means top and center of the Cartesian print volume. // For deltabots this means top and center of the Cartesian print volume.
#define MANUAL_X_HOME_POS 0 #ifdef MANUAL_HOME_POSITIONS
#define MANUAL_Y_HOME_POS 0 #define MANUAL_X_HOME_POS 0
#define MANUAL_Z_HOME_POS 0 #define MANUAL_Y_HOME_POS 0
//#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing. #define MANUAL_Z_HOME_POS 0
//#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing.
#endif
/**
* MOVEMENT SETTINGS
*/
//// MOVEMENT SETTINGS
#define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
#define HOMING_FEEDRATE {1500, 1500, 120, 0} // set the homing speeds (mm/min) ***** MakiBox A6 ***** #define HOMING_FEEDRATE {1500, 1500, 120, 0} // set the homing speeds (mm/min) ***** MakiBox A6 *****
// default settings // default settings
@ -535,9 +560,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// Custom M code points // Custom M code points
#define CUSTOM_M_CODES #define CUSTOM_M_CODES
#ifdef CUSTOM_M_CODES #ifdef CUSTOM_M_CODES
#ifdef ENABLE_AUTO_BED_LEVELING
#define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851 #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
#define Z_PROBE_OFFSET_RANGE_MIN -15 #define Z_PROBE_OFFSET_RANGE_MIN -20
#define Z_PROBE_OFFSET_RANGE_MAX -5 #define Z_PROBE_OFFSET_RANGE_MAX 20
#endif
#endif #endif
@ -548,9 +575,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. // M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
//define this to enable EEPROM support //define this to enable EEPROM support
#define EEPROM_SETTINGS #define EEPROM_SETTINGS
//to disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
// please keep turned on if you can. #ifdef EEPROM_SETTINGS
//#define EEPROM_CHITCHAT // To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
#define EEPROM_CHITCHAT // please keep turned on if you can.
#endif
// Preheat Constants // Preheat Constants
#define PLA_PREHEAT_HOTEND_TEMP 180 #define PLA_PREHEAT_HOTEND_TEMP 180
@ -564,13 +593,16 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
//==============================LCD and SD support============================= //==============================LCD and SD support=============================
// Define your display language below. Replace (en) with your language code and uncomment. // Define your display language below. Replace (en) with your language code and uncomment.
// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu // en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
// See also language.h // See also language.h
//#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
// Character based displays can have different extended charsets. // Choose ONE of these 3 charsets. This has to match your hardware. Ignored for full graphic display.
#define DISPLAY_CHARSET_HD44780_JAPAN // "ääööüüß23°" // 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.
//#define DISPLAY_CHARSET_HD44780_WESTERN // "ÄäÖöÜüß²³°" if you see a '~' instead of a 'arrow_right' at the right of submenuitems - this is the right one. // See also documentation/LCDLanguageFont.md
#define DISPLAY_CHARSET_HD44780_JAPAN // this is the most common hardware
//#define DISPLAY_CHARSET_HD44780_WESTERN
//#define DISPLAY_CHARSET_HD44780_CYRILLIC
//#define ULTRA_LCD //general LCD support, also 16x2 //#define ULTRA_LCD //general LCD support, also 16x2
//#define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family) //#define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
@ -583,6 +615,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
//#define ULTIPANEL //the UltiPanel as on Thingiverse //#define ULTIPANEL //the UltiPanel as on Thingiverse
//#define LCD_FEEDBACK_FREQUENCY_HZ 1000 // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click //#define LCD_FEEDBACK_FREQUENCY_HZ 1000 // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
// 0 to disable buzzer feedback
// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3) // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
// http://reprap.org/wiki/PanelOne // http://reprap.org/wiki/PanelOne
@ -645,7 +678,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
//#define FAST_PWM_FAN //#define FAST_PWM_FAN
// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
// which is not ass annoying as with the hardware PWM. On the other hand, if this frequency // which is not as annoying as with the hardware PWM. On the other hand, if this frequency
// is too low, you should also increment SOFT_PWM_SCALE. // is too low, you should also increment SOFT_PWM_SCALE.
//#define FAN_SOFT_PWM //#define FAN_SOFT_PWM
@ -690,7 +723,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// Servo Endstops // Servo Endstops
// //
// This allows for servo actuated endstops, primary usage is for the Z Axis to eliminate calibration or bed height changes. // This allows for servo actuated endstops, primary usage is for the Z Axis to eliminate calibration or bed height changes.
// Use M206 command to correct for switch height offset to actual nozzle height. Store that setting with M500. // Use M851 to set the z-probe vertical offset from the nozzle. Store that setting with M500.
// //
//#define SERVO_ENDSTOPS {-1, -1, 0} // Servo index for X, Y, Z. Disable with -1 //#define SERVO_ENDSTOPS {-1, -1, 0} // Servo index for X, Y, Z. Disable with -1
//#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles //#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles

@ -3,6 +3,8 @@
#include "Conditionals.h" #include "Conditionals.h"
// @section temperature
//=========================================================================== //===========================================================================
//=============================Thermal Settings ============================ //=============================Thermal Settings ============================
//=========================================================================== //===========================================================================
@ -32,7 +34,7 @@
//automatic temperature: The hot end target temperature is calculated by all the buffered lines of gcode. //automatic temperature: The hot end target temperature is calculated by all the buffered lines of gcode.
//The maximum buffered steps/sec of the extruder motor are called "se". //The maximum buffered steps/sec of the extruder motor are called "se".
//You enter the autotemp mode by a M109 S<mintemp> T<maxtemp> F<factor> //You enter the autotemp mode by a M109 S<mintemp> B<maxtemp> F<factor>
// the target temperature is set to mintemp+factor*se[steps/sec] and limited by mintemp and maxtemp // the target temperature is set to mintemp+factor*se[steps/sec] and limited by mintemp and maxtemp
// you exit the value by any M109 without F* // you exit the value by any M109 without F*
// Also, if the temperature is set to a value <mintemp, it is not changed by autotemp. // Also, if the temperature is set to a value <mintemp, it is not changed by autotemp.
@ -46,6 +48,8 @@
//The M105 command return, besides traditional information, the ADC value read from temperature sensors. //The M105 command return, besides traditional information, the ADC value read from temperature sensors.
//#define SHOW_TEMP_ADC_VALUES //#define SHOW_TEMP_ADC_VALUES
// @section extruder
// extruder run-out prevention. // extruder run-out prevention.
//if the machine is idle, and the temperature over MINTEMP, every couple of SECONDS some filament is extruded //if the machine is idle, and the temperature over MINTEMP, every couple of SECONDS some filament is extruded
//#define EXTRUDER_RUNOUT_PREVENT //#define EXTRUDER_RUNOUT_PREVENT
@ -55,6 +59,8 @@
#define EXTRUDER_RUNOUT_SPEED 1500. //extrusion speed #define EXTRUDER_RUNOUT_SPEED 1500. //extrusion speed
#define EXTRUDER_RUNOUT_EXTRUDE 100 #define EXTRUDER_RUNOUT_EXTRUDE 100
// @section temperature
//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements. //These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET" //The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
#define TEMP_SENSOR_AD595_OFFSET 0.0 #define TEMP_SENSOR_AD595_OFFSET 0.0
@ -72,6 +78,8 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu) // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100 //#define FAN_KICKSTART_TIME 100
// @section extruder
// Extruder cooling fans // Extruder cooling fans
// Configure fan pin outputs to automatically turn on/off when the associated // Configure fan pin outputs to automatically turn on/off when the associated
// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE. // extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE.
@ -89,8 +97,12 @@
//=============================Mechanical Settings=========================== //=============================Mechanical Settings===========================
//=========================================================================== //===========================================================================
// @section homing
#define ENDSTOPS_ONLY_FOR_HOMING // If defined the endstops will only be used for homing #define ENDSTOPS_ONLY_FOR_HOMING // If defined the endstops will only be used for homing
// @section extras
//#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats. //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
// A single Z stepper driver is usually used to drive 2 stepper motors. // A single Z stepper driver is usually used to drive 2 stepper motors.
@ -100,6 +112,30 @@
// On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder. // On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder.
//#define Z_DUAL_STEPPER_DRIVERS //#define Z_DUAL_STEPPER_DRIVERS
#ifdef Z_DUAL_STEPPER_DRIVERS
// 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.
// That way the machine is capable to align the bed during home, since both Z steppers are homed.
// There is also an implementation of M666 (software endstops adjustment) to this feature.
// After Z homing, this adjustment is applied to just one of the steppers in order to align the bed.
// 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.
// 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.
// Play a little bit with small adjustments (0.5mm) and check the behaviour.
// The M119 (endstops report) will start reporting the Z2 Endstop as well.
#define Z_DUAL_ENDSTOPS
#ifdef Z_DUAL_ENDSTOPS
#define Z2_STEP_PIN E2_STEP_PIN // Stepper to be used to Z2 axis.
#define Z2_DIR_PIN E2_DIR_PIN
#define Z2_ENABLE_PIN E2_ENABLE_PIN
#define Z2_MAX_PIN 36 //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36)
const bool Z2_MAX_ENDSTOP_INVERTING = false;
#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.
#endif
#endif // Z_DUAL_STEPPER_DRIVERS
// Same again but for Y Axis. // Same again but for Y Axis.
//#define Y_DUAL_STEPPER_DRIVERS //#define Y_DUAL_STEPPER_DRIVERS
@ -112,54 +148,58 @@
// allowing faster printing speeds. // allowing faster printing speeds.
//#define DUAL_X_CARRIAGE //#define DUAL_X_CARRIAGE
#ifdef DUAL_X_CARRIAGE #ifdef DUAL_X_CARRIAGE
// Configuration for second X-carriage // Configuration for second X-carriage
// Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop;
// the second x-carriage always homes to the maximum endstop. // the second x-carriage always homes to the maximum endstop.
#define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
#define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed
#define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position
#define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position #define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position
// However: In this mode the EXTRUDER_OFFSET_X value for the second extruder provides a software // However: In this mode the EXTRUDER_OFFSET_X value for the second extruder provides a software
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command). // without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer. // Remember: you should set the second extruder x-offset to 0 in your slicer.
// Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h) // Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h)
#define X2_ENABLE_PIN 29 #define X2_ENABLE_PIN 29
#define X2_STEP_PIN 25 #define X2_STEP_PIN 25
#define X2_DIR_PIN 23 #define X2_DIR_PIN 23
// There are a few selectable movement modes for dual x-carriages using M605 S<mode> // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
// Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results // Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
// as long as it supports dual x-carriages. (M605 S0) // as long as it supports dual x-carriages. (M605 S0)
// Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so // Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
// that additional slicer support is not required. (M605 S1) // that additional slicer support is not required. (M605 S1)
// Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all // Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
// actions of the first x-carriage. This allows the printer to print 2 arbitrary items at // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
// once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm]) // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
// This is the default power-up mode which can be later using M605. // This is the default power-up mode which can be later using M605.
#define DEFAULT_DUAL_X_CARRIAGE_MODE 0 #define DEFAULT_DUAL_X_CARRIAGE_MODE 0
// Default settings in "Auto-park Mode" // Default settings in "Auto-park Mode"
#define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder #define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder
#define TOOLCHANGE_UNPARK_ZLIFT 1 // the distance to raise Z axis when unparking an extruder #define TOOLCHANGE_UNPARK_ZLIFT 1 // the distance to raise Z axis when unparking an extruder
// Default x offset in duplication mode (typically set to half print bed width) // Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100 #define DEFAULT_DUPLICATION_X_OFFSET 100
#endif //DUAL_X_CARRIAGE #endif //DUAL_X_CARRIAGE
// @section homing
//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again: //homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
#define X_HOME_RETRACT_MM 5 #define X_HOME_BUMP_MM 5
#define Y_HOME_RETRACT_MM 5 #define Y_HOME_BUMP_MM 5
#define Z_HOME_RETRACT_MM 2 #define Z_HOME_BUMP_MM 2
#define HOMING_BUMP_DIVISOR {10, 10, 20} // Re-Bump Speed Divisor (Divides the Homing Feedrate) #define HOMING_BUMP_DIVISOR {2, 2, 4} // Re-Bump Speed Divisor (Divides the Homing Feedrate)
//#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially. //#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
// @section machine
#define AXIS_RELATIVE_MODES {false, false, false, false} #define AXIS_RELATIVE_MODES {false, false, false, false}
#define MAX_STEP_FREQUENCY 40000 // Max step frequency for Ultimaker (5000 pps / half step) // @section machine
//By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. //By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step.
#define INVERT_X_STEP_PIN false #define INVERT_X_STEP_PIN false
@ -173,11 +213,15 @@
#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
#define DEFAULT_MINTRAVELFEEDRATE 0.0 #define DEFAULT_MINTRAVELFEEDRATE 0.0
// @section lcd
#ifdef ULTIPANEL #ifdef ULTIPANEL
#define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel
#define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder
#endif #endif
// @section extras
// minimum time in microseconds that a movement needs to take if the buffer is emptied. // minimum time in microseconds that a movement needs to take if the buffer is emptied.
#define DEFAULT_MINSEGMENTTIME 20000 #define DEFAULT_MINSEGMENTTIME 20000
@ -205,7 +249,6 @@
// Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8 // Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8
#define DIGIPOT_I2C_NUM_CHANNELS 4 #define DIGIPOT_I2C_NUM_CHANNELS 4
// actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS // actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
//#define DIGIPOT_I2C_MOTOR_CURRENTS {1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0}
#define DIGIPOT_I2C_MOTOR_CURRENTS {1.7, 1.7, 1.7, 1.7} #define DIGIPOT_I2C_MOTOR_CURRENTS {1.7, 1.7, 1.7, 1.7}
//=========================================================================== //===========================================================================
@ -213,34 +256,48 @@
//=========================================================================== //===========================================================================
#define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly #define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
#define ENCODER_10X_STEPS_PER_SEC 75 // If the encoder steps per sec exceed this value, multiple the steps moved by ten to quickly advance the value #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
#define ENCODER_100X_STEPS_PER_SEC 160 // If the encoder steps per sec exceed this value, multiple the steps moved by 100 to really quickly advance the value #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
//#define ENCODER_RATE_MULTIPLIER_DEBUG // If defined, output the encoder steps per second value //#define ENCODER_RATE_MULTIPLIER_DEBUG // If defined, output the encoder steps per second value
//#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/ //#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/
#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
#define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? // @section lcd
#define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
#ifdef SDSUPPORT
// If you are using a RAMPS board or cheap E-bay purchased boards that do not detect when an SD card is inserted
// You can get round this by connecting a push button or single throw switch to the pin defined as SDCARDCARDDETECT
// in the pins.h file. When using a push button pulling the pin to ground this will need inverted. This setting should
// be commented out otherwise
//#define SDCARDDETECTINVERTED
#define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers?
#define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
#define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order.
// 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. // 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.
// using: // using:
//#define MENU_ADDAUTOSTART //#define MENU_ADDAUTOSTART
// Show a progress bar on the LCD when printing from SD // Show a progress bar on HD44780 LCDs for SD printing
//#define LCD_PROGRESS_BAR //#define LCD_PROGRESS_BAR
#ifdef LCD_PROGRESS_BAR #ifdef LCD_PROGRESS_BAR
// Amount of time (ms) to show the bar // Amount of time (ms) to show the bar
#define PROGRESS_BAR_BAR_TIME 2000 #define PROGRESS_BAR_BAR_TIME 2000
// Amount of time (ms) to show the status message // Amount of time (ms) to show the status message
#define PROGRESS_BAR_MSG_TIME 2000 #define PROGRESS_BAR_MSG_TIME 3000
// Amount of time (ms) to retain the status message (0=forever) // Amount of time (ms) to retain the status message (0=forever)
#define PROGRESS_MSG_EXPIRE 0 #define PROGRESS_MSG_EXPIRE 0
// Enable this to show messages for MSG_TIME then hide them // Enable this to show messages for MSG_TIME then hide them
//#define PROGRESS_MSG_ONCE //#define PROGRESS_MSG_ONCE
#endif #endif
#endif // SDSUPPORT
// @section more
// The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation. // The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
//#define USE_WATCHDOG //#define USE_WATCHDOG
@ -255,6 +312,8 @@
// Enable the option to stop SD printing when hitting and endstops, needs to be enabled from the LCD menu when this option is enabled. // Enable the option to stop SD printing when hitting and endstops, needs to be enabled from the LCD menu when this option is enabled.
//#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
// @section lcd
// Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process // Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process
// it can e.g. be used to change z-positions in the print startup phase in real-time // it can e.g. be used to change z-positions in the print startup phase in real-time
// does not respect endstops! // does not respect endstops!
@ -265,6 +324,8 @@
#define BABYSTEP_Z_MULTIPLICATOR 2 //faster z movements #define BABYSTEP_Z_MULTIPLICATOR 2 //faster z movements
#endif #endif
// @section extruder
// extruder advance constant (s2/mm3) // extruder advance constant (s2/mm3)
// //
// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2 // advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
@ -278,7 +339,9 @@
#define EXTRUDER_ADVANCE_K .0 #define EXTRUDER_ADVANCE_K .0
#define D_FILAMENT 2.85 #define D_FILAMENT 2.85
#define STEPS_MM_E 836 #define STEPS_MM_E 836
#endif // ADVANCE #endif
// @section extras
// Arc interpretation settings: // Arc interpretation settings:
#define MM_PER_ARC_SEGMENT 1 #define MM_PER_ARC_SEGMENT 1
@ -286,11 +349,7 @@
const unsigned int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement const unsigned int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement
// If you are using a RAMPS board or cheap E-bay purchased boards that do not detect when an SD card is inserted // @section temperature
// You can get round this by connecting a push button or single throw switch to the pin defined as SDCARDCARDDETECT
// in the pins.h file. When using a push button pulling the pin to ground this will need inverted. This setting should
// be commented out otherwise
//#define SDCARDDETECTINVERTED
// Control heater 0 and heater 1 in parallel. // Control heater 0 and heater 1 in parallel.
//#define HEATERS_PARALLEL //#define HEATERS_PARALLEL
@ -299,19 +358,23 @@ const unsigned int dropsegments=5; //everything with less than this number of st
//=============================Buffers ============================ //=============================Buffers ============================
//=========================================================================== //===========================================================================
// @section hidden
// The number of linear motions that can be in the plan at any give time. // The number of linear motions that can be in the plan at any give time.
// 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. // 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.
#if defined SDSUPPORT #ifdef SDSUPPORT
#define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
#else #else
#define BLOCK_BUFFER_SIZE 16 // maximize block buffer #define BLOCK_BUFFER_SIZE 16 // maximize block buffer
#endif #endif
// @section more
//The ASCII buffer for receiving from the serial: //The ASCII buffer for receiving from the serial:
#define MAX_CMD_SIZE 96 #define MAX_CMD_SIZE 96
#define BUFSIZE 4 #define BUFSIZE 4
// @section fwretract
// Firmware based and LCD controlled retract // Firmware based and LCD controlled retract
// M207 and M208 can be used to define parameters for the retraction. // M207 and M208 can be used to define parameters for the retraction.
@ -323,9 +386,11 @@ const unsigned int dropsegments=5; //everything with less than this number of st
#ifdef FWRETRACT #ifdef FWRETRACT
#define MIN_RETRACT 0.1 //minimum extruded mm to accept a automatic gcode retraction attempt #define MIN_RETRACT 0.1 //minimum extruded mm to accept a automatic gcode retraction attempt
#define RETRACT_LENGTH 3 //default retract length (positive mm) #define RETRACT_LENGTH 3 //default retract length (positive mm)
#define RETRACT_LENGTH_SWAP 13 //default swap retract length (positive mm), for extruder change
#define RETRACT_FEEDRATE 45 //default feedrate for retracting (mm/s) #define RETRACT_FEEDRATE 45 //default feedrate for retracting (mm/s)
#define RETRACT_ZLIFT 0 //default retract Z-lift #define RETRACT_ZLIFT 0 //default retract Z-lift
#define RETRACT_RECOVER_LENGTH 0 //default additional recover length (mm, added to retract length when recovering) #define RETRACT_RECOVER_LENGTH 0 //default additional recover length (mm, added to retract length when recovering)
#define RETRACT_RECOVER_LENGTH_SWAP 0 //default additional swap recover length (mm, added to retract length when recovering from extruder change)
#define RETRACT_RECOVER_FEEDRATE 8 //default feedrate for recovering from retraction (mm/s) #define RETRACT_RECOVER_FEEDRATE 8 //default feedrate for recovering from retraction (mm/s)
#endif #endif
@ -341,6 +406,143 @@ const unsigned int dropsegments=5; //everything with less than this number of st
#endif #endif
#endif #endif
/******************************************************************************\
* enable this section if you have TMC26X motor drivers.
* you need to import the TMC26XStepper library into the arduino IDE for this
******************************************************************************/
// @section tmc
//#define HAVE_TMCDRIVER
#ifdef HAVE_TMCDRIVER
// #define X_IS_TMC
#define X_MAX_CURRENT 1000 //in mA
#define X_SENSE_RESISTOR 91 //in mOhms
#define X_MICROSTEPS 16 //number of microsteps
// #define X2_IS_TMC
#define X2_MAX_CURRENT 1000 //in mA
#define X2_SENSE_RESISTOR 91 //in mOhms
#define X2_MICROSTEPS 16 //number of microsteps
// #define Y_IS_TMC
#define Y_MAX_CURRENT 1000 //in mA
#define Y_SENSE_RESISTOR 91 //in mOhms
#define Y_MICROSTEPS 16 //number of microsteps
// #define Y2_IS_TMC
#define Y2_MAX_CURRENT 1000 //in mA
#define Y2_SENSE_RESISTOR 91 //in mOhms
#define Y2_MICROSTEPS 16 //number of microsteps
// #define Z_IS_TMC
#define Z_MAX_CURRENT 1000 //in mA
#define Z_SENSE_RESISTOR 91 //in mOhms
#define Z_MICROSTEPS 16 //number of microsteps
// #define Z2_IS_TMC
#define Z2_MAX_CURRENT 1000 //in mA
#define Z2_SENSE_RESISTOR 91 //in mOhms
#define Z2_MICROSTEPS 16 //number of microsteps
// #define E0_IS_TMC
#define E0_MAX_CURRENT 1000 //in mA
#define E0_SENSE_RESISTOR 91 //in mOhms
#define E0_MICROSTEPS 16 //number of microsteps
// #define E1_IS_TMC
#define E1_MAX_CURRENT 1000 //in mA
#define E1_SENSE_RESISTOR 91 //in mOhms
#define E1_MICROSTEPS 16 //number of microsteps
// #define E2_IS_TMC
#define E2_MAX_CURRENT 1000 //in mA
#define E2_SENSE_RESISTOR 91 //in mOhms
#define E2_MICROSTEPS 16 //number of microsteps
// #define E3_IS_TMC
#define E3_MAX_CURRENT 1000 //in mA
#define E3_SENSE_RESISTOR 91 //in mOhms
#define E3_MICROSTEPS 16 //number of microsteps
#endif
/******************************************************************************\
* enable this section if you have L6470 motor drivers.
* you need to import the L6470 library into the arduino IDE for this
******************************************************************************/
// @section l6470
//#define HAVE_L6470DRIVER
#ifdef HAVE_L6470DRIVER
// #define X_IS_L6470
#define X_MICROSTEPS 16 //number of microsteps
#define X_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define X_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define X2_IS_L6470
#define X2_MICROSTEPS 16 //number of microsteps
#define X2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define X2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define Y_IS_L6470
#define Y_MICROSTEPS 16 //number of microsteps
#define Y_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define Y_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define Y2_IS_L6470
#define Y2_MICROSTEPS 16 //number of microsteps
#define Y2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define Y2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define Z_IS_L6470
#define Z_MICROSTEPS 16 //number of microsteps
#define Z_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define Z_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define Z2_IS_L6470
#define Z2_MICROSTEPS 16 //number of microsteps
#define Z2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define Z2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define E0_IS_L6470
#define E0_MICROSTEPS 16 //number of microsteps
#define E0_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define E0_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define E1_IS_L6470
#define E1_MICROSTEPS 16 //number of microsteps
#define E1_MICROSTEPS 16 //number of microsteps
#define E1_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define E1_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define E2_IS_L6470
#define E2_MICROSTEPS 16 //number of microsteps
#define E2_MICROSTEPS 16 //number of microsteps
#define E2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define E2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define E3_IS_L6470
#define E3_MICROSTEPS 16 //number of microsteps
#define E3_MICROSTEPS 16 //number of microsteps
#define E3_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define E3_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall
#endif
#include "Conditionals.h" #include "Conditionals.h"
#include "SanityCheck.h" #include "SanityCheck.h"

@ -38,7 +38,7 @@ Here are some standard links for getting your machine calibrated:
// User-specified version info of this build to display in [Pronterface, etc] terminal window during // User-specified version info of this build to display in [Pronterface, etc] terminal window during
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
// build by the user have been successfully uploaded into firmware. // build by the user have been successfully uploaded into firmware.
#define STRING_VERSION "1.0.2" #define STRING_VERSION "1.0.3 dev"
#define STRING_URL "reprap.org" #define STRING_URL "reprap.org"
#define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
@ -62,8 +62,9 @@ Here are some standard links for getting your machine calibrated:
#define MOTHERBOARD BOARD_OMCA #define MOTHERBOARD BOARD_OMCA
#endif #endif
// Define this to set a custom name for your generic Mendel, // Optional custom name for your RepStrap or other custom machine
// #define CUSTOM_MENDEL_NAME "This Mendel" // Displayed in the LCD "Ready" message
// #define CUSTOM_MACHINE_NAME "3D Printer"
// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines) // Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines)
// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) // You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4)
@ -122,7 +123,7 @@ Here are some standard links for getting your machine calibrated:
// Use it for Testing or Development purposes. NEVER for production machine. // Use it for Testing or Development purposes. NEVER for production machine.
// #define DUMMY_THERMISTOR_998_VALUE 25 // #define DUMMY_THERMISTOR_998_VALUE 25
// #define DUMMY_THERMISTOR_999_VALUE 100 // #define DUMMY_THERMISTOR_999_VALUE 100
// :{ '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" }
#define TEMP_SENSOR_0 5 #define TEMP_SENSOR_0 5
#define TEMP_SENSOR_1 0 #define TEMP_SENSOR_1 0
#define TEMP_SENSOR_2 0 #define TEMP_SENSOR_2 0
@ -184,7 +185,6 @@ Here are some standard links for getting your machine calibrated:
// is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
#define PID_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term #define PID_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term
#define K1 0.95 //smoothing factor within the PID #define K1 0.95 //smoothing factor within the PID
#define PID_dT ((OVERSAMPLENR * 10.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine
// If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
// J-Head Mk V-B // J-Head Mk V-B
@ -214,7 +214,7 @@ Here are some standard links for getting your machine calibrated:
// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis // Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
// //
// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. // Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder.
// If your PID_dT above is the default, and correct for your hardware/configuration, that means 7.689Hz, // If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz,
// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. // which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. // This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
// If your configuration is significantly different than this and you don't understand the issues involved, you probably // If your configuration is significantly different than this and you don't understand the issues involved, you probably
@ -321,13 +321,14 @@ your extruder heater takes 2 minutes to hit the target on heating.
// #define ENDSTOPPULLUP_ZMIN // #define ENDSTOPPULLUP_ZMIN
#endif #endif
// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins. // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
const bool X_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. const bool X_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Y_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. const bool Y_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Z_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. const bool Z_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
//#define DISABLE_MAX_ENDSTOPS //#define DISABLE_MAX_ENDSTOPS
//#define DISABLE_MIN_ENDSTOPS //#define DISABLE_MIN_ENDSTOPS
@ -344,13 +345,14 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#define DISABLE_E false // For all extruders #define DISABLE_E false // For all extruders
#define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled #define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled
#define INVERT_X_DIR false // for Mendel set to false, for Orca set to true // Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
#define INVERT_Y_DIR true // for Mendel set to true, for Orca set to false #define INVERT_X_DIR false
#define INVERT_Z_DIR false // for Mendel set to false, for Orca set to true #define INVERT_Y_DIR false
#define INVERT_E0_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false #define INVERT_Z_DIR true
#define INVERT_E1_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false #define INVERT_E0_DIR false
#define INVERT_E2_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false #define INVERT_E1_DIR false
#define INVERT_E3_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false #define INVERT_E2_DIR false
#define INVERT_E3_DIR false
// ENDSTOP SETTINGS: // ENDSTOP SETTINGS:
// Sets direction of endstops when homing; 1=MAX, -1=MIN // Sets direction of endstops when homing; 1=MAX, -1=MIN
@ -362,12 +364,12 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below. #define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below.
// Travel limits after homing (units are in mm) // Travel limits after homing (units are in mm)
#define X_MAX_POS 205
#define X_MIN_POS 0 #define X_MIN_POS 0
#define Y_MAX_POS 205
#define Y_MIN_POS 0 #define Y_MIN_POS 0
#define Z_MAX_POS 120
#define Z_MIN_POS 0 #define Z_MIN_POS 0
#define X_MAX_POS 205
#define Y_MAX_POS 205
#define Z_MAX_POS 120
//=========================================================================== //===========================================================================
//============================= Filament Runout Sensor ====================== //============================= Filament Runout Sensor ======================
@ -386,7 +388,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// #define MANUAL_BED_LEVELING // Add display menu option for bed leveling // #define MANUAL_BED_LEVELING // Add display menu option for bed leveling
// #define MESH_BED_LEVELING // Enable mesh bed leveling // #define MESH_BED_LEVELING // Enable mesh bed leveling
#if defined(MESH_BED_LEVELING) #ifdef MANUAL_BED_LEVELING
#define MBL_Z_STEP 0.025
#endif // MANUAL_BED_LEVELING
#ifdef MESH_BED_LEVELING
#define MESH_MIN_X 10 #define MESH_MIN_X 10
#define MESH_MAX_X (X_MAX_POS - MESH_MIN_X) #define MESH_MAX_X (X_MAX_POS - MESH_MIN_X)
#define MESH_MIN_Y 10 #define MESH_MIN_Y 10
@ -433,7 +439,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// You probably don't need more than 3 (squared=9) // You probably don't need more than 3 (squared=9)
#define AUTO_BED_LEVELING_GRID_POINTS 2 #define AUTO_BED_LEVELING_GRID_POINTS 2
#else // !AUTO_BED_LEVELING_GRID #else // !AUTO_BED_LEVELING_GRID
// Arbitrary points to probe. A simple cross-product // Arbitrary points to probe. A simple cross-product
@ -447,11 +452,10 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#endif // AUTO_BED_LEVELING_GRID #endif // AUTO_BED_LEVELING_GRID
// Offsets to the probe relative to the extruder tip (Hotend - Probe) // Offsets to the probe relative to the extruder tip (Hotend - Probe)
// X and Y offsets must be integers // X and Y offsets must be integers
#define X_PROBE_OFFSET_FROM_EXTRUDER -25 // -left +right #define X_PROBE_OFFSET_FROM_EXTRUDER -25 // Probe on: -left +right
#define Y_PROBE_OFFSET_FROM_EXTRUDER -29 // -front +behind #define Y_PROBE_OFFSET_FROM_EXTRUDER -29 // Probe on: -front +behind
#define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35 // -below (always!) #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35 // -below (always!)
#define Z_RAISE_BEFORE_HOMING 4 // (in mm) Raise Z before homing (G28) for Probe Clearance. #define Z_RAISE_BEFORE_HOMING 4 // (in mm) Raise Z before homing (G28) for Probe Clearance.
@ -463,6 +467,9 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#define Z_RAISE_BETWEEN_PROBINGS 5 //How much the extruder will be raised when traveling from between next probing points #define Z_RAISE_BETWEEN_PROBINGS 5 //How much the extruder will be raised when traveling from between next probing points
#define Z_RAISE_AFTER_PROBING 15 //How much the extruder will be raised after the last probing point. #define Z_RAISE_AFTER_PROBING 15 //How much the extruder will be raised after the last probing point.
// #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.
//Useful to retract a deployable probe.
//#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell //#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell
//#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. //#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.
@ -490,6 +497,20 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#endif #endif
// Support for a dedicated Z PROBE endstop separate from the Z MIN endstop.
// If you would like to use both a Z PROBE and a Z MIN endstop together or just a Z PROBE with a custom pin, uncomment #define Z_PROBE_ENDSTOP and read the instructions below.
// If you want to still use the Z min endstop for homing, disable Z_SAFE_HOMING above. Eg; to park the head outside the bed area when homing with G28.
// WARNING: The Z MIN endstop will need to set properly as it would without a Z PROBE to prevent head crashes and premature stopping during a print.
// To use a separate Z PROBE endstop, you must have a Z_PROBE_PIN defined in the pins.h file for your control board.
// If you are using a servo based Z PROBE, you will need to enable NUM_SERVOS, SERVO_ENDSTOPS and SERVO_ENDSTOPS_ANGLES in the R/C Servo below.
// RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin in the Aux 4 section of the RAMPS board. Use 5V for powered sensors, otherwise connect to ground and D32
// for normally closed configuration and 5V and D32 for normally open configurations. Normally closed configuration is advised and assumed.
// The D32 pin in Aux 4 on RAMPS maps to the Arduino D32 pin. Z_PROBE_PIN is setting the pin to use on the Arduino. Since the D32 pin on the RAMPS maps to D32 on Arduino, this works.
// D32 is currently selected in the RAMPS 1.3/1.4 pin file. All other boards will need changes to the respective pins_XXXXX.h file.
// WARNING: Setting the wrong pin may have unexpected and potentially disastrous outcomes. Use with caution and do your homework.
//#define Z_PROBE_ENDSTOP
#endif // ENABLE_AUTO_BED_LEVELING #endif // ENABLE_AUTO_BED_LEVELING
@ -497,15 +518,19 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
//#define MANUAL_HOME_POSITIONS // If defined, MANUAL_*_HOME_POS below will be used //#define MANUAL_HOME_POSITIONS // If defined, MANUAL_*_HOME_POS below will be used
//#define BED_CENTER_AT_0_0 // If defined, the center of the bed is at (X=0, Y=0) //#define BED_CENTER_AT_0_0 // If defined, the center of the bed is at (X=0, Y=0)
//Manual homing switch locations: // Manual homing switch locations:
// For deltabots this means top and center of the Cartesian print volume. // For deltabots this means top and center of the Cartesian print volume.
#define MANUAL_X_HOME_POS 0 #ifdef MANUAL_HOME_POSITIONS
#define MANUAL_Y_HOME_POS 0 #define MANUAL_X_HOME_POS 0
#define MANUAL_Z_HOME_POS 0 #define MANUAL_Y_HOME_POS 0
//#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing. #define MANUAL_Z_HOME_POS 0
//#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing.
#endif
/**
* MOVEMENT SETTINGS
*/
//// MOVEMENT SETTINGS
#define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
#define HOMING_FEEDRATE {50*60, 50*60, 4*60, 0} // set the homing speeds (mm/min) #define HOMING_FEEDRATE {50*60, 50*60, 4*60, 0} // set the homing speeds (mm/min)
// default settings // default settings
@ -522,7 +547,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#define DEFAULT_RETRACT_ACCELERATION 3000 // E acceleration in mm/s^2 for retracts #define DEFAULT_RETRACT_ACCELERATION 3000 // E acceleration in mm/s^2 for retracts
#define DEFAULT_TRAVEL_ACCELERATION 500 // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves #define DEFAULT_TRAVEL_ACCELERATION 500 // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing). // Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder). // The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).
// For the other hotends it is their distance from the extruder 0 hotend. // For the other hotends it is their distance from the extruder 0 hotend.
@ -542,9 +566,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// Custom M code points // Custom M code points
#define CUSTOM_M_CODES #define CUSTOM_M_CODES
#ifdef CUSTOM_M_CODES #ifdef CUSTOM_M_CODES
#ifdef ENABLE_AUTO_BED_LEVELING
#define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851 #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
#define Z_PROBE_OFFSET_RANGE_MIN -15 #define Z_PROBE_OFFSET_RANGE_MIN -20
#define Z_PROBE_OFFSET_RANGE_MAX -5 #define Z_PROBE_OFFSET_RANGE_MAX 20
#endif
#endif #endif
@ -555,9 +581,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. // M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
//define this to enable EEPROM support //define this to enable EEPROM support
//#define EEPROM_SETTINGS //#define EEPROM_SETTINGS
//to disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
// please keep turned on if you can. #ifdef EEPROM_SETTINGS
//#define EEPROM_CHITCHAT // To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
#define EEPROM_CHITCHAT // please keep turned on if you can.
#endif
// Preheat Constants // Preheat Constants
#define PLA_PREHEAT_HOTEND_TEMP 180 #define PLA_PREHEAT_HOTEND_TEMP 180
@ -571,13 +599,16 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
//==============================LCD and SD support============================= //==============================LCD and SD support=============================
// Define your display language below. Replace (en) with your language code and uncomment. // Define your display language below. Replace (en) with your language code and uncomment.
// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu // en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
// See also language.h // See also language.h
//#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
// Character based displays can have different extended charsets. // Choose ONE of these 3 charsets. This has to match your hardware. Ignored for full graphic display.
#define DISPLAY_CHARSET_HD44780_JAPAN // "ääööüüß23°" // 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.
//#define DISPLAY_CHARSET_HD44780_WESTERN // "ÄäÖöÜüß²³°" if you see a '~' instead of a 'arrow_right' at the right of submenuitems - this is the right one. // See also documentation/LCDLanguageFont.md
#define DISPLAY_CHARSET_HD44780_JAPAN // this is the most common hardware
//#define DISPLAY_CHARSET_HD44780_WESTERN
//#define DISPLAY_CHARSET_HD44780_CYRILLIC
//#define ULTRA_LCD //general LCD support, also 16x2 //#define ULTRA_LCD //general LCD support, also 16x2
//#define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family) //#define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
@ -590,6 +621,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
//#define ULTIPANEL //the UltiPanel as on Thingiverse //#define ULTIPANEL //the UltiPanel as on Thingiverse
//#define LCD_FEEDBACK_FREQUENCY_HZ 1000 // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click //#define LCD_FEEDBACK_FREQUENCY_HZ 1000 // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
// 0 to disable buzzer feedback
// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3) // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
// http://reprap.org/wiki/PanelOne // http://reprap.org/wiki/PanelOne
@ -652,7 +684,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
//#define FAST_PWM_FAN //#define FAST_PWM_FAN
// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
// which is not ass annoying as with the hardware PWM. On the other hand, if this frequency // which is not as annoying as with the hardware PWM. On the other hand, if this frequency
// is too low, you should also increment SOFT_PWM_SCALE. // is too low, you should also increment SOFT_PWM_SCALE.
//#define FAN_SOFT_PWM //#define FAN_SOFT_PWM
@ -697,7 +729,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// Servo Endstops // Servo Endstops
// //
// This allows for servo actuated endstops, primary usage is for the Z Axis to eliminate calibration or bed height changes. // This allows for servo actuated endstops, primary usage is for the Z Axis to eliminate calibration or bed height changes.
// Use M206 command to correct for switch height offset to actual nozzle height. Store that setting with M500. // Use M851 to set the z-probe vertical offset from the nozzle. Store that setting with M500.
// //
//#define SERVO_ENDSTOPS {-1, -1, 0} // Servo index for X, Y, Z. Disable with -1 //#define SERVO_ENDSTOPS {-1, -1, 0} // Servo index for X, Y, Z. Disable with -1
//#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles //#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles

@ -3,6 +3,8 @@
#include "Conditionals.h" #include "Conditionals.h"
// @section temperature
//=========================================================================== //===========================================================================
//=============================Thermal Settings ============================ //=============================Thermal Settings ============================
//=========================================================================== //===========================================================================
@ -46,6 +48,8 @@
//The M105 command return, besides traditional information, the ADC value read from temperature sensors. //The M105 command return, besides traditional information, the ADC value read from temperature sensors.
//#define SHOW_TEMP_ADC_VALUES //#define SHOW_TEMP_ADC_VALUES
// @section extruder
// extruder run-out prevention. // extruder run-out prevention.
//if the machine is idle, and the temperature over MINTEMP, every couple of SECONDS some filament is extruded //if the machine is idle, and the temperature over MINTEMP, every couple of SECONDS some filament is extruded
//#define EXTRUDER_RUNOUT_PREVENT //#define EXTRUDER_RUNOUT_PREVENT
@ -55,6 +59,8 @@
#define EXTRUDER_RUNOUT_SPEED 1500. //extrusion speed #define EXTRUDER_RUNOUT_SPEED 1500. //extrusion speed
#define EXTRUDER_RUNOUT_EXTRUDE 100 #define EXTRUDER_RUNOUT_EXTRUDE 100
// @section temperature
//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements. //These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET" //The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
#define TEMP_SENSOR_AD595_OFFSET 0.0 #define TEMP_SENSOR_AD595_OFFSET 0.0
@ -72,6 +78,8 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu) // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100 //#define FAN_KICKSTART_TIME 100
// @section extruder
// Extruder cooling fans // Extruder cooling fans
// Configure fan pin outputs to automatically turn on/off when the associated // Configure fan pin outputs to automatically turn on/off when the associated
// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE. // extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE.
@ -89,8 +97,12 @@
//=============================Mechanical Settings=========================== //=============================Mechanical Settings===========================
//=========================================================================== //===========================================================================
// @section homing
#define ENDSTOPS_ONLY_FOR_HOMING // If defined the endstops will only be used for homing #define ENDSTOPS_ONLY_FOR_HOMING // If defined the endstops will only be used for homing
// @section extras
//#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats. //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
// A single Z stepper driver is usually used to drive 2 stepper motors. // A single Z stepper driver is usually used to drive 2 stepper motors.
@ -100,6 +112,30 @@
// On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder. // On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder.
//#define Z_DUAL_STEPPER_DRIVERS //#define Z_DUAL_STEPPER_DRIVERS
#ifdef Z_DUAL_STEPPER_DRIVERS
// 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.
// That way the machine is capable to align the bed during home, since both Z steppers are homed.
// There is also an implementation of M666 (software endstops adjustment) to this feature.
// After Z homing, this adjustment is applied to just one of the steppers in order to align the bed.
// 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.
// 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.
// Play a little bit with small adjustments (0.5mm) and check the behaviour.
// The M119 (endstops report) will start reporting the Z2 Endstop as well.
#define Z_DUAL_ENDSTOPS
#ifdef Z_DUAL_ENDSTOPS
#define Z2_STEP_PIN E2_STEP_PIN // Stepper to be used to Z2 axis.
#define Z2_DIR_PIN E2_DIR_PIN
#define Z2_ENABLE_PIN E2_ENABLE_PIN
#define Z2_MAX_PIN 36 //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36)
const bool Z2_MAX_ENDSTOP_INVERTING = false;
#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.
#endif
#endif // Z_DUAL_STEPPER_DRIVERS
// Same again but for Y Axis. // Same again but for Y Axis.
//#define Y_DUAL_STEPPER_DRIVERS //#define Y_DUAL_STEPPER_DRIVERS
@ -112,57 +148,59 @@
// allowing faster printing speeds. // allowing faster printing speeds.
//#define DUAL_X_CARRIAGE //#define DUAL_X_CARRIAGE
#ifdef DUAL_X_CARRIAGE #ifdef DUAL_X_CARRIAGE
// Configuration for second X-carriage // Configuration for second X-carriage
// Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop;
// the second x-carriage always homes to the maximum endstop. // the second x-carriage always homes to the maximum endstop.
#define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
#define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed
#define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position
#define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position #define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position
// However: In this mode the EXTRUDER_OFFSET_X value for the second extruder provides a software // However: In this mode the EXTRUDER_OFFSET_X value for the second extruder provides a software
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command). // without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer. // Remember: you should set the second extruder x-offset to 0 in your slicer.
// Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h) // Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h)
#define X2_ENABLE_PIN 29 #define X2_ENABLE_PIN 29
#define X2_STEP_PIN 25 #define X2_STEP_PIN 25
#define X2_DIR_PIN 23 #define X2_DIR_PIN 23
// There are a few selectable movement modes for dual x-carriages using M605 S<mode> // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
// Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results // Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
// as long as it supports dual x-carriages. (M605 S0) // as long as it supports dual x-carriages. (M605 S0)
// Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so // Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
// that additional slicer support is not required. (M605 S1) // that additional slicer support is not required. (M605 S1)
// Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all // Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
// actions of the first x-carriage. This allows the printer to print 2 arbitrary items at // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
// once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm]) // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
// This is the default power-up mode which can be later using M605. // This is the default power-up mode which can be later using M605.
#define DEFAULT_DUAL_X_CARRIAGE_MODE 0 #define DEFAULT_DUAL_X_CARRIAGE_MODE 0
// Default settings in "Auto-park Mode" // Default settings in "Auto-park Mode"
#define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder #define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder
#define TOOLCHANGE_UNPARK_ZLIFT 1 // the distance to raise Z axis when unparking an extruder #define TOOLCHANGE_UNPARK_ZLIFT 1 // the distance to raise Z axis when unparking an extruder
// Default x offset in duplication mode (typically set to half print bed width) // Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100 #define DEFAULT_DUPLICATION_X_OFFSET 100
#endif //DUAL_X_CARRIAGE #endif //DUAL_X_CARRIAGE
// @section homing
//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again: //homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
#define X_HOME_RETRACT_MM 5 #define X_HOME_BUMP_MM 5
#define Y_HOME_RETRACT_MM 5 #define Y_HOME_BUMP_MM 5
#define Z_HOME_RETRACT_MM 1 #define Z_HOME_BUMP_MM 1
#define HOMING_BUMP_DIVISOR {10, 10, 20} // Re-Bump Speed Divisor (Divides the Homing Feedrate) #define HOMING_BUMP_DIVISOR {2, 2, 4} // Re-Bump Speed Divisor (Divides the Homing Feedrate)
//#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially. //#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
// @section machine
#define AXIS_RELATIVE_MODES {false, false, false, false} #define AXIS_RELATIVE_MODES {false, false, false, false}
#ifdef CONFIG_STEPPERS_TOSHIBA
#define MAX_STEP_FREQUENCY 10000 // Max step frequency for Toshiba Stepper Controllers // @section machine
#else
#define MAX_STEP_FREQUENCY 40000 // Max step frequency for Ultimaker (5000 pps / half step)
#endif
//By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. //By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step.
#define INVERT_X_STEP_PIN false #define INVERT_X_STEP_PIN false
#define INVERT_Y_STEP_PIN false #define INVERT_Y_STEP_PIN false
@ -175,11 +213,15 @@
#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
#define DEFAULT_MINTRAVELFEEDRATE 0.0 #define DEFAULT_MINTRAVELFEEDRATE 0.0
// @section lcd
#ifdef ULTIPANEL #ifdef ULTIPANEL
#define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel
#define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder
#endif #endif
// @section extras
// minimum time in microseconds that a movement needs to take if the buffer is emptied. // minimum time in microseconds that a movement needs to take if the buffer is emptied.
#define DEFAULT_MINSEGMENTTIME 20000 #define DEFAULT_MINSEGMENTTIME 20000
@ -214,25 +256,35 @@
//=========================================================================== //===========================================================================
#define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly #define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
#define ENCODER_10X_STEPS_PER_SEC 75 // If the encoder steps per sec exceed this value, multiple the steps moved by ten to quickly advance the value #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
#define ENCODER_100X_STEPS_PER_SEC 160 // If the encoder steps per sec exceed this value, multiple the steps moved by 100 to really quickly advance the value #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
//#define ENCODER_RATE_MULTIPLIER_DEBUG // If defined, output the encoder steps per second value //#define ENCODER_RATE_MULTIPLIER_DEBUG // If defined, output the encoder steps per second value
//#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/ //#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/
#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
#define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? // @section lcd
#define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
#ifdef SDSUPPORT
#define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. // If you are using a RAMPS board or cheap E-bay purchased boards that do not detect when an SD card is inserted
// 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. // You can get round this by connecting a push button or single throw switch to the pin defined as SDCARDCARDDETECT
// using: // in the pins.h file. When using a push button pulling the pin to ground this will need inverted. This setting should
//#define MENU_ADDAUTOSTART // be commented out otherwise
#define SDCARDDETECTINVERTED
// Show a progress bar on the LCD when printing from SD? #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers?
//#define LCD_PROGRESS_BAR #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
#ifdef LCD_PROGRESS_BAR #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order.
// 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.
// using:
//#define MENU_ADDAUTOSTART
// Show a progress bar on HD44780 LCDs for SD printing
//#define LCD_PROGRESS_BAR
#ifdef LCD_PROGRESS_BAR
// Amount of time (ms) to show the bar // Amount of time (ms) to show the bar
#define PROGRESS_BAR_BAR_TIME 2000 #define PROGRESS_BAR_BAR_TIME 2000
// Amount of time (ms) to show the status message // Amount of time (ms) to show the status message
@ -241,7 +293,11 @@
#define PROGRESS_MSG_EXPIRE 0 #define PROGRESS_MSG_EXPIRE 0
// Enable this to show messages for MSG_TIME then hide them // Enable this to show messages for MSG_TIME then hide them
//#define PROGRESS_MSG_ONCE //#define PROGRESS_MSG_ONCE
#endif #endif
#endif // SDSUPPORT
// @section more
// The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation. // The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
//#define USE_WATCHDOG //#define USE_WATCHDOG
@ -256,6 +312,8 @@
// Enable the option to stop SD printing when hitting and endstops, needs to be enabled from the LCD menu when this option is enabled. // Enable the option to stop SD printing when hitting and endstops, needs to be enabled from the LCD menu when this option is enabled.
//#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
// @section lcd
// Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process // Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process
// it can e.g. be used to change z-positions in the print startup phase in real-time // it can e.g. be used to change z-positions in the print startup phase in real-time
// does not respect endstops! // does not respect endstops!
@ -266,6 +324,8 @@
#define BABYSTEP_Z_MULTIPLICATOR 2 //faster z movements #define BABYSTEP_Z_MULTIPLICATOR 2 //faster z movements
#endif #endif
// @section extruder
// extruder advance constant (s2/mm3) // extruder advance constant (s2/mm3)
// //
// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2 // advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
@ -277,13 +337,11 @@
#ifdef ADVANCE #ifdef ADVANCE
#define EXTRUDER_ADVANCE_K .0 #define EXTRUDER_ADVANCE_K .0
#define D_FILAMENT 2.85 #define D_FILAMENT 2.85
#define STEPS_MM_E 836 #define STEPS_MM_E 836
#define EXTRUTION_AREA (0.25 * D_FILAMENT * D_FILAMENT * 3.14159) #endif
#define STEPS_PER_CUBIC_MM_E (axis_steps_per_unit[E_AXIS]/ EXTRUTION_AREA)
#endif // ADVANCE // @section extras
// Arc interpretation settings: // Arc interpretation settings:
#define MM_PER_ARC_SEGMENT 1 #define MM_PER_ARC_SEGMENT 1
@ -291,11 +349,7 @@
const unsigned int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement const unsigned int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement
// If you are using a RAMPS board or cheap E-bay purchased boards that do not detect when an SD card is inserted // @section temperature
// You can get round this by connecting a push button or single throw switch to the pin defined as SDCARDCARDDETECT
// in the pins.h file. When using a push button pulling the pin to ground this will need inverted. This setting should
// be commented out otherwise
#define SDCARDDETECTINVERTED
// Control heater 0 and heater 1 in parallel. // Control heater 0 and heater 1 in parallel.
//#define HEATERS_PARALLEL //#define HEATERS_PARALLEL
@ -304,19 +358,23 @@ const unsigned int dropsegments=5; //everything with less than this number of st
//=============================Buffers ============================ //=============================Buffers ============================
//=========================================================================== //===========================================================================
// @section hidden
// The number of linear motions that can be in the plan at any give time. // The number of linear motions that can be in the plan at any give time.
// 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. // 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.
#if defined SDSUPPORT #ifdef SDSUPPORT
#define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
#else #else
#define BLOCK_BUFFER_SIZE 16 // maximize block buffer #define BLOCK_BUFFER_SIZE 16 // maximize block buffer
#endif #endif
// @section more
//The ASCII buffer for receiving from the serial: //The ASCII buffer for receiving from the serial:
#define MAX_CMD_SIZE 96 #define MAX_CMD_SIZE 96
#define BUFSIZE 4 #define BUFSIZE 4
// @section fwretract
// Firmware based and LCD controlled retract // Firmware based and LCD controlled retract
// M207 and M208 can be used to define parameters for the retraction. // M207 and M208 can be used to define parameters for the retraction.
@ -348,6 +406,143 @@ const unsigned int dropsegments=5; //everything with less than this number of st
#endif #endif
#endif #endif
/******************************************************************************\
* enable this section if you have TMC26X motor drivers.
* you need to import the TMC26XStepper library into the arduino IDE for this
******************************************************************************/
// @section tmc
//#define HAVE_TMCDRIVER
#ifdef HAVE_TMCDRIVER
// #define X_IS_TMC
#define X_MAX_CURRENT 1000 //in mA
#define X_SENSE_RESISTOR 91 //in mOhms
#define X_MICROSTEPS 16 //number of microsteps
// #define X2_IS_TMC
#define X2_MAX_CURRENT 1000 //in mA
#define X2_SENSE_RESISTOR 91 //in mOhms
#define X2_MICROSTEPS 16 //number of microsteps
// #define Y_IS_TMC
#define Y_MAX_CURRENT 1000 //in mA
#define Y_SENSE_RESISTOR 91 //in mOhms
#define Y_MICROSTEPS 16 //number of microsteps
// #define Y2_IS_TMC
#define Y2_MAX_CURRENT 1000 //in mA
#define Y2_SENSE_RESISTOR 91 //in mOhms
#define Y2_MICROSTEPS 16 //number of microsteps
// #define Z_IS_TMC
#define Z_MAX_CURRENT 1000 //in mA
#define Z_SENSE_RESISTOR 91 //in mOhms
#define Z_MICROSTEPS 16 //number of microsteps
// #define Z2_IS_TMC
#define Z2_MAX_CURRENT 1000 //in mA
#define Z2_SENSE_RESISTOR 91 //in mOhms
#define Z2_MICROSTEPS 16 //number of microsteps
// #define E0_IS_TMC
#define E0_MAX_CURRENT 1000 //in mA
#define E0_SENSE_RESISTOR 91 //in mOhms
#define E0_MICROSTEPS 16 //number of microsteps
// #define E1_IS_TMC
#define E1_MAX_CURRENT 1000 //in mA
#define E1_SENSE_RESISTOR 91 //in mOhms
#define E1_MICROSTEPS 16 //number of microsteps
// #define E2_IS_TMC
#define E2_MAX_CURRENT 1000 //in mA
#define E2_SENSE_RESISTOR 91 //in mOhms
#define E2_MICROSTEPS 16 //number of microsteps
// #define E3_IS_TMC
#define E3_MAX_CURRENT 1000 //in mA
#define E3_SENSE_RESISTOR 91 //in mOhms
#define E3_MICROSTEPS 16 //number of microsteps
#endif
/******************************************************************************\
* enable this section if you have L6470 motor drivers.
* you need to import the L6470 library into the arduino IDE for this
******************************************************************************/
// @section l6470
//#define HAVE_L6470DRIVER
#ifdef HAVE_L6470DRIVER
// #define X_IS_L6470
#define X_MICROSTEPS 16 //number of microsteps
#define X_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define X_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define X2_IS_L6470
#define X2_MICROSTEPS 16 //number of microsteps
#define X2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define X2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define Y_IS_L6470
#define Y_MICROSTEPS 16 //number of microsteps
#define Y_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define Y_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define Y2_IS_L6470
#define Y2_MICROSTEPS 16 //number of microsteps
#define Y2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define Y2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define Z_IS_L6470
#define Z_MICROSTEPS 16 //number of microsteps
#define Z_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define Z_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define Z2_IS_L6470
#define Z2_MICROSTEPS 16 //number of microsteps
#define Z2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define Z2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define E0_IS_L6470
#define E0_MICROSTEPS 16 //number of microsteps
#define E0_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define E0_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define E1_IS_L6470
#define E1_MICROSTEPS 16 //number of microsteps
#define E1_MICROSTEPS 16 //number of microsteps
#define E1_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define E1_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define E2_IS_L6470
#define E2_MICROSTEPS 16 //number of microsteps
#define E2_MICROSTEPS 16 //number of microsteps
#define E2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define E2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define E3_IS_L6470
#define E3_MICROSTEPS 16 //number of microsteps
#define E3_MICROSTEPS 16 //number of microsteps
#define E3_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define E3_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall
#endif
#include "Conditionals.h" #include "Conditionals.h"
#include "SanityCheck.h" #include "SanityCheck.h"

@ -91,7 +91,7 @@
added as necessary or if I feel like it- not a comprehensive list! added as necessary or if I feel like it- not a comprehensive list!
*/ */
#if defined (__AVR_ATmega168__) || defined (__AVR_ATmega328__) || defined (__AVR_ATmega328P__) #if defined(__AVR_ATmega168__) || defined(__AVR_ATmega328__) || defined(__AVR_ATmega328P__)
// UART // UART
#define RXD DIO0 #define RXD DIO0
#define TXD DIO1 #define TXD DIO1
@ -426,7 +426,7 @@ pins
#define PD7_PWM NULL #define PD7_PWM NULL
#endif /* _AVR_ATmega{168,328,328P}__ */ #endif /* _AVR_ATmega{168,328,328P}__ */
#if defined (__AVR_ATmega644__) || defined (__AVR_ATmega644P__) || defined (__AVR_ATmega644PA__) || defined (__AVR_ATmega1284P__) #if defined(__AVR_ATmega644__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644PA__) || defined(__AVR_ATmega1284P__)
// UART // UART
#define RXD DIO8 #define RXD DIO8
#define TXD DIO9 #define TXD DIO9
@ -929,7 +929,7 @@ pins
#define PD7_PWM OCR2A #define PD7_PWM OCR2A
#endif /* _AVR_ATmega{644,644P,644PA}__ */ #endif /* _AVR_ATmega{644,644P,644PA}__ */
#if defined (__AVR_ATmega1280__) || defined (__AVR_ATmega2560__) #if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
// UART // UART
#define RXD DIO0 #define RXD DIO0
#define TXD DIO1 #define TXD DIO1
@ -2024,7 +2024,7 @@ pins
#endif #endif
#if defined (__AVR_AT90USB1287__) || defined (__AVR_AT90USB1286__) || defined (__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) #if defined(__AVR_AT90USB1287__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__)
// SPI // SPI
#define SCK DIO9 #define SCK DIO9
#define MISO DIO11 #define MISO DIO11
@ -3322,7 +3322,7 @@ Teensy 28 29 30 31 32 33 34 35 20 21 22 23 24 25 26 27 10 11 12 13 14 15 16 17
#endif // __AVR_AT90usbxxx__ #endif // __AVR_AT90usbxxx__
#if defined (__AVR_ATmega1281__) || defined (__AVR_ATmega2561__) #if defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__)
// UART // UART
#define RXD DIO0 #define RXD DIO0
#define TXD DIO1 #define TXD DIO1

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -0,0 +1,6 @@
The fonts are created with Fony.exe (http://hukka.ncn.fi/?fony) because Fontforge didn't do what I want (probably lack off experience).
In Fony export the fonts to bdf-format. Maybe another one can edit them with Fontforge.
Then run make_fonts.bat what calls bdf2u8g.exe with the needed parameters to produce the .h files.
The .h files must be edited to replace '#include "u8g.h"' with '#include <utility/u8g.h>', replace 'U8G_FONT_SECTION' with 'U8G_SECTION', insert '.progmem.' right behind the first '"' and moved to the main directory.
Especially the Kana and Cyrillic fonts should be revised by someone who knows what he/she does. I am only a west-European with very little knowledge about this scripts.

Binary file not shown.

@ -3,6 +3,5 @@
.\bdf2u8g.exe -b 32 -e 255 HD44780_C.bdf HD44780_C_5x7 dogm_font_data_HD44780_C.h .\bdf2u8g.exe -b 32 -e 255 HD44780_C.bdf HD44780_C_5x7 dogm_font_data_HD44780_C.h
.\bdf2u8g.exe -b 32 -e 255 HD44780_J.bdf HD44780_J_5x7 dogm_font_data_HD44780_J.h .\bdf2u8g.exe -b 32 -e 255 HD44780_J.bdf HD44780_J_5x7 dogm_font_data_HD44780_J.h
.\bdf2u8g.exe -b 32 -e 255 ISO10646-1.bdf ISO10646_1_5x7 dogm_font_data_ISO10646_1.h .\bdf2u8g.exe -b 32 -e 255 ISO10646-1.bdf ISO10646_1_5x7 dogm_font_data_ISO10646_1.h
.\bdf2u8g.exe -b 32 -e 255 ISO10646-1-Marlin.bdf ISO10646_1_Marlin_5x7 dogm_font_data_ISO10646_1_Marlin.h
.\bdf2u8g.exe -b 32 -e 255 ISO10646_5_Cyrillic.bdf ISO10646_5_Cyrillic_5x7 dogm_font_data_ISO10646_5_Cyrillic.h .\bdf2u8g.exe -b 32 -e 255 ISO10646_5_Cyrillic.bdf ISO10646_5_Cyrillic_5x7 dogm_font_data_ISO10646_5_Cyrillic.h
.\bdf2u8g.exe -b 32 -e 255 ISO10646_Kana.bdf ISO10646_Kana_5x7 dogm_font_data_ISO10646_Kana.h .\bdf2u8g.exe -b 32 -e 255 ISO10646_Kana.bdf ISO10646_Kana_5x7 dogm_font_data_ISO10646_Kana.h

@ -11,6 +11,7 @@
// //
// ==> ALWAYS TRY TO COMPILE MARLIN WITH/WITHOUT "ULTIPANEL" / "ULTRALCD" / "SDSUPPORT" #define IN "Configuration.h" // ==> ALWAYS TRY TO COMPILE MARLIN WITH/WITHOUT "ULTIPANEL" / "ULTRALCD" / "SDSUPPORT" #define IN "Configuration.h"
// ==> ALSO TRY ALL AVAILABLE LANGUAGE OPTIONS // ==> ALSO TRY ALL AVAILABLE LANGUAGE OPTIONS
// See also documentation/LCDLanguageFont.md
// Languages // Languages
// en English // en English
@ -27,14 +28,19 @@
// nl Dutch // nl Dutch
// ca Catalan // ca Catalan
// eu Basque-Euskera // eu Basque-Euskera
// kana Japanese
// kana_utf Japanese
#ifndef LANGUAGE_INCLUDE #ifndef LANGUAGE_INCLUDE
// pick your language from the list above // pick your language from the list above
#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
#endif #endif
#ifdef HAS_AUTOMATIC_VERSIONING
#include "_Version.h"
#endif
#define PROTOCOL_VERSION "1.0" #define PROTOCOL_VERSION "1.0"
#define FIRMWARE_URL "https://github.com/MarlinFirmware/Marlin"
#if MB(ULTIMAKER)|| MB(ULTIMAKER_OLD)|| MB(ULTIMAIN_2) #if MB(ULTIMAKER)|| MB(ULTIMAKER_OLD)|| MB(ULTIMAIN_2)
#define MACHINE_NAME "Ultimaker" #define MACHINE_NAME "Ultimaker"
@ -57,12 +63,33 @@
#elif MB(HEPHESTOS) #elif MB(HEPHESTOS)
#define MACHINE_NAME "HEPHESTOS" #define MACHINE_NAME "HEPHESTOS"
#define FIRMWARE_URL "http://www.bq.com/gb/downloads-prusa-i3-hephestos.html" #define FIRMWARE_URL "http://www.bq.com/gb/downloads-prusa-i3-hephestos.html"
#else // Default firmware set to Mendel #elif MB(BRAINWAVE_PRO)
#define MACHINE_NAME "Mendel" #define MACHINE_NAME "Kossel Pro"
#ifndef FIRMWARE_URL
#define FIRMWARE_URL "https://github.com/OpenBeamUSA/Marlin/"
#endif
#else
#ifndef MACHINE_NAME
#define MACHINE_NAME "3D Printer"
#endif
#endif #endif
#ifdef CUSTOM_MENDEL_NAME #ifdef CUSTOM_MENDEL_NAME
#define MACHINE_NAME CUSTOM_MENDEL_NAME #error CUSTOM_MENDEL_NAME deprecated - use CUSTOM_MACHINE_NAME
#define CUSTOM_MACHINE_NAME CUSTOM_MENDEL_NAME
#endif
#ifdef CUSTOM_MACHINE_NAME
#undef MACHINE_NAME
#define MACHINE_NAME CUSTOM_MACHINE_NAME
#endif
#ifndef FIRMWARE_URL
#define FIRMWARE_URL "https://github.com/MarlinFirmware/Marlin"
#endif
#ifndef BUILD_VERSION
#define BUILD_VERSION "V1; Sprinter/grbl mashup for gen6"
#endif #endif
#ifndef MACHINE_UUID #ifndef MACHINE_UUID
@ -83,7 +110,7 @@
// Serial Console Messages (do not translate those!) // Serial Console Messages (do not translate those!)
#define MSG_Enqueing "enqueing \"" #define MSG_Enqueueing "enqueueing \""
#define MSG_POWERUP "PowerUp" #define MSG_POWERUP "PowerUp"
#define MSG_EXTERNAL_RESET " External Reset" #define MSG_EXTERNAL_RESET " External Reset"
#define MSG_BROWNOUT_RESET " Brown out Reset" #define MSG_BROWNOUT_RESET " Brown out Reset"
@ -113,7 +140,7 @@
#define MSG_HEATING_COMPLETE "Heating done." #define MSG_HEATING_COMPLETE "Heating done."
#define MSG_BED_HEATING "Bed Heating." #define MSG_BED_HEATING "Bed Heating."
#define MSG_BED_DONE "Bed done." #define MSG_BED_DONE "Bed done."
#define MSG_M115_REPORT "FIRMWARE_NAME:Marlin V1; Sprinter/grbl mashup for gen6 FIRMWARE_URL:" FIRMWARE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:" MACHINE_NAME " EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) " UUID:" MACHINE_UUID "\n" #define MSG_M115_REPORT "FIRMWARE_NAME:Marlin " BUILD_VERSION " FIRMWARE_URL:" FIRMWARE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:" MACHINE_NAME " EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) " UUID:" MACHINE_UUID "\n"
#define MSG_COUNT_X " Count X: " #define MSG_COUNT_X " Count X: "
#define MSG_ERR_KILLED "Printer halted. kill() called!" #define MSG_ERR_KILLED "Printer halted. kill() called!"
#define MSG_ERR_STOPPED "Printer stopped due to errors. Fix the error and use M999 to restart. (Temperature is reset. Set it after restarting)" #define MSG_ERR_STOPPED "Printer stopped due to errors. Fix the error and use M999 to restart. (Temperature is reset. Set it after restarting)"
@ -129,6 +156,7 @@
#define MSG_Z_MIN "z_min: " #define MSG_Z_MIN "z_min: "
#define MSG_Z_MAX "z_max: " #define MSG_Z_MAX "z_max: "
#define MSG_Z2_MAX "z2_max: " #define MSG_Z2_MAX "z2_max: "
#define MSG_Z_PROBE "z_probe: "
#define MSG_M119_REPORT "Reporting endstop status" #define MSG_M119_REPORT "Reporting endstop status"
#define MSG_ENDSTOP_HIT "TRIGGERED" #define MSG_ENDSTOP_HIT "TRIGGERED"
#define MSG_ENDSTOP_OPEN "open" #define MSG_ENDSTOP_OPEN "open"
@ -200,65 +228,9 @@
// LCD Menu Messages // LCD Menu Messages
// Add your own character. Reference: https://github.com/MarlinFirmware/Marlin/pull/1434 photos #if !(defined( DISPLAY_CHARSET_HD44780_JAPAN ) || defined( DISPLAY_CHARSET_HD44780_WESTERN ) || defined( DISPLAY_CHARSET_HD44780_CYRILLIC ))
// and https://www.sparkfun.com/datasheets/LCD/HD44780.pdf page 17-18 #define DISPLAY_CHARSET_HD44780_JAPAN
#ifdef DOGLCD
#define STR_Ae "\304" // 'Ä' U8glib
#define STR_ae "\344" // 'ä'
#define STR_Oe "\326" // 'Ö'
#define STR_oe STR_Oe // 'ö'
#define STR_Ue "\334" // 'Ü'
#define STR_ue STR_Ue // 'ü'
#define STR_sz "\337" // 'ß'
#define STR_h2 "\262" // '²'
#define STR_h3 "\263" // '³'
#define STR_Deg "\260" // '°'
#define STR_THERMOMETER "\377"
#else
#ifdef DISPLAY_CHARSET_HD44780_JAPAN // HD44780 ROM Code: A00 (Japan)
#define STR_ae "\xe1"
#define STR_Ae STR_ae
#define STR_oe "\357"
#define STR_Oe STR_oe
#define STR_ue "\365"
#define STR_Ue STR_ue
#define STR_sz "\342"
#define STR_h2 "2"
#define STR_h3 "3"
#define STR_Deg "\271"
#define STR_THERMOMETER "\002"
#elif defined(DISPLAY_CHARSET_HD44780_WESTERN) // HD44780 ROM Code: A02 (Western)
#define STR_Ae "\216"
#define STR_ae "\204"
#define STR_Oe "\211"
#define STR_oe "\204"
#define STR_Ue "\212"
#define STR_ue "\201"
#define STR_sz "\160"
#define STR_h2 "\262"
#define STR_h3 "\263"
#define STR_Deg "\337"
#define STR_THERMOMETER "\002"
#endif
#endif #endif
/*
#define TESTSTRING000 "\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017"
#define TESTSTRING020 "\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
#define TESTSTRING040 "\040\041\042\043\044\045\046\047\050\051\052\053\054\055\056\057"
#define TESTSTRING060 "\060\061\062\063\064\065\066\067\070\071\072\073\074\075\076\077"
#define TESTSTRING100 "\100\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117"
#define TESTSTRING120 "\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137"
#define TESTSTRING140 "\140\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157"
#define TESTSTRING160 "\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176\177"
#define TESTSTRING200 "\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217"
#define TESTSTRING220 "\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237"
#define TESTSTRING240 "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257"
#define TESTSTRING260 "\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277"
#define TESTSTRING300 "\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317"
#define TESTSTRING320 "\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337"
#define TESTSTRING340 "\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357"
#define TESTSTRING360 "\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377"
*/
#include LANGUAGE_INCLUDE #include LANGUAGE_INCLUDE
#include "language_en.h" #include "language_en.h"

@ -2,12 +2,17 @@
* Aragonese * Aragonese
* *
* LCD Menu Messages * LCD Menu Messages
* Please note these are limited to 17 characters! * See also documentation/LCDLanguageFont.md
* *
*/ */
#ifndef LANGUAGE_AN_H #ifndef LANGUAGE_AN_H
#define LANGUAGE_AN_H #define LANGUAGE_AN_H
#define MAPPER_NON
// Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h
//#define SIMULATE_ROMFONT
#define DISPLAY_CHARSET_ISO10646_1
#define WELCOME_MSG MACHINE_NAME " parada." #define WELCOME_MSG MACHINE_NAME " parada."
#define MSG_SD_INSERTED "Tarcheta colocada" #define MSG_SD_INSERTED "Tarcheta colocada"
#define MSG_SD_REMOVED "Tarcheta retirada" #define MSG_SD_REMOVED "Tarcheta retirada"
@ -46,9 +51,9 @@
#define MSG_FAN_SPEED "Ixoriador" #define MSG_FAN_SPEED "Ixoriador"
#define MSG_FLOW "Fluxo" #define MSG_FLOW "Fluxo"
#define MSG_CONTROL "Control" #define MSG_CONTROL "Control"
#define MSG_MIN "\002 Min" #define MSG_MIN LCD_STR_THERMOMETER " Min"
#define MSG_MAX "\002 Max" #define MSG_MAX LCD_STR_THERMOMETER " Max"
#define MSG_FACTOR "\002 Fact" #define MSG_FACTOR LCD_STR_THERMOMETER " Fact"
#define MSG_AUTOTEMP "Autotemp" #define MSG_AUTOTEMP "Autotemp"
#define MSG_ON "On" #define MSG_ON "On"
#define MSG_OFF "Off" #define MSG_OFF "Off"
@ -118,6 +123,8 @@
#define MSG_BABYSTEP_Y "Babystep Y" #define MSG_BABYSTEP_Y "Babystep Y"
#define MSG_BABYSTEP_Z "Babystep Z" #define MSG_BABYSTEP_Z "Babystep Z"
#define MSG_ENDSTOP_ABORT "Endstop abort" #define MSG_ENDSTOP_ABORT "Endstop abort"
#define MSG_END_HOUR "hours"
#define MSG_END_MINUTE "minutes"
#ifdef DELTA_CALIBRATION_MENU #ifdef DELTA_CALIBRATION_MENU
#define MSG_DELTA_CALIBRATE "Delta Calibration" #define MSG_DELTA_CALIBRATE "Delta Calibration"

@ -2,12 +2,18 @@
* Catalan * Catalan
* *
* LCD Menu Messages * LCD Menu Messages
* Please note these are limited to 17 characters! * See also documentation/LCDLanguageFont.md
* *
*/ */
#ifndef LANGUAGE_CA_H #ifndef LANGUAGE_CA_H
#define LANGUAGE_CA_H #define LANGUAGE_CA_H
//#define MAPPER_NON
#define MAPPER_C2C3 // because of "ó"
// Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h
//#define SIMULATE_ROMFONT
#define DISPLAY_CHARSET_ISO10646_1
#define WELCOME_MSG MACHINE_NAME " preparada." #define WELCOME_MSG MACHINE_NAME " preparada."
#define MSG_SD_INSERTED "SD detectada." #define MSG_SD_INSERTED "SD detectada."
#define MSG_SD_REMOVED "SD expulsada." #define MSG_SD_REMOVED "SD expulsada."
@ -46,9 +52,9 @@
#define MSG_FAN_SPEED "Vel. Ventilador" #define MSG_FAN_SPEED "Vel. Ventilador"
#define MSG_FLOW "Fluxe" #define MSG_FLOW "Fluxe"
#define MSG_CONTROL "Control" #define MSG_CONTROL "Control"
#define MSG_MIN " \002 Min" #define MSG_MIN LCD_STR_THERMOMETER " Min"
#define MSG_MAX " \002 Max" #define MSG_MAX LCD_STR_THERMOMETER " Max"
#define MSG_FACTOR " \002 Fact" #define MSG_FACTOR LCD_STR_THERMOMETER " Fact"
#define MSG_AUTOTEMP "Autotemp" #define MSG_AUTOTEMP "Autotemp"
#define MSG_ON "On " #define MSG_ON "On "
#define MSG_OFF "Off" #define MSG_OFF "Off"
@ -118,6 +124,8 @@
#define MSG_BABYSTEP_Y "Babystep Y" #define MSG_BABYSTEP_Y "Babystep Y"
#define MSG_BABYSTEP_Z "Babystep Z" #define MSG_BABYSTEP_Z "Babystep Z"
#define MSG_ENDSTOP_ABORT "Endstop abort" #define MSG_ENDSTOP_ABORT "Endstop abort"
#define MSG_END_HOUR "hours"
#define MSG_END_MINUTE "minutes"
#ifdef DELTA_CALIBRATION_MENU #ifdef DELTA_CALIBRATION_MENU
#define MSG_DELTA_CALIBRATE "Delta Calibration" #define MSG_DELTA_CALIBRATE "Delta Calibration"

@ -2,32 +2,37 @@
* German * German
* *
* LCD Menu Messages * LCD Menu Messages
* Please note these are limited to 17 characters! * See also documentation/LCDLanguageFont.md
* *
*/ */
#ifndef LANGUAGE_DE_H #ifndef LANGUAGE_DE_H
#define LANGUAGE_DE_H #define LANGUAGE_DE_H
#define MAPPER_C2C3
// Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h
//#define SIMULATE_ROMFONT
#define DISPLAY_CHARSET_ISO10646_1
#define WELCOME_MSG MACHINE_NAME " Bereit." #define WELCOME_MSG MACHINE_NAME " Bereit."
#define MSG_SD_INSERTED "SDKarte erkannt." #define MSG_SD_INSERTED "SDKarte erkannt."
#define MSG_SD_REMOVED "SDKarte entfernt." #define MSG_SD_REMOVED "SDKarte entfernt."
#define MSG_MAIN "Hauptmen" STR_ue #define MSG_MAIN "Hauptmenü"
#define MSG_AUTOSTART "Autostart" #define MSG_AUTOSTART "Autostart"
#define MSG_DISABLE_STEPPERS "Motoren Aus" // M84 #define MSG_DISABLE_STEPPERS "Motoren Aus" // M84
#define MSG_AUTO_HOME "Home" // G28 #define MSG_AUTO_HOME "Home" // G28
#define MSG_SET_HOME_OFFSETS "Setze Home hier" #define MSG_SET_HOME_OFFSETS "Setze Home hier"
#define MSG_SET_ORIGIN "Setze Null hier" //"G92 X0 Y0 Z0" commented out in ultralcd.cpp #define MSG_SET_ORIGIN "Setze Null hier" //"G92 X0 Y0 Z0" commented out in ultralcd.cpp
#define MSG_PREHEAT_PLA "Vorw" STR_ae "rmen PLA" #define MSG_PREHEAT_PLA "Vorwärmen PLA"
#define MSG_PREHEAT_PLA_N "Vorw" STR_ae "rmen PLA " #define MSG_PREHEAT_PLA_N "Vorwärmen PLA "
#define MSG_PREHEAT_PLA_ALL "Vorw. PLA Alle" #define MSG_PREHEAT_PLA_ALL "Vorw. PLA Alle"
#define MSG_PREHEAT_PLA_BEDONLY "Vorw. PLA Bett" #define MSG_PREHEAT_PLA_BEDONLY "Vorw. PLA Bett"
#define MSG_PREHEAT_PLA_SETTINGS "Vorw" STR_ae "rm. PLA Ein." #define MSG_PREHEAT_PLA_SETTINGS "Vorwärm. PLA Ein."
#define MSG_PREHEAT_ABS "Vorw" STR_ae "rmen ABS" #define MSG_PREHEAT_ABS "Vorwärmen ABS"
#define MSG_PREHEAT_ABS_N "Vorw" STR_ae "rmen ABS " #define MSG_PREHEAT_ABS_N "Vorwärmen ABS "
#define MSG_PREHEAT_ABS_ALL "Vorw. ABS Alle" #define MSG_PREHEAT_ABS_ALL "Vorw. ABS Alle"
#define MSG_PREHEAT_ABS_BEDONLY "Vorw. ABS Bett" #define MSG_PREHEAT_ABS_BEDONLY "Vorw. ABS Bett"
#define MSG_PREHEAT_ABS_SETTINGS "Vorw" STR_ae "rm. ABS Ein." #define MSG_PREHEAT_ABS_SETTINGS "Vorwärm. ABS Ein."
#define MSG_COOLDOWN "Abk" STR_ue "hlen" #define MSG_COOLDOWN "Abkühlen"
#define MSG_SWITCH_PS_ON "Netzteil Ein" #define MSG_SWITCH_PS_ON "Netzteil Ein"
#define MSG_SWITCH_PS_OFF "Netzteil Aus" #define MSG_SWITCH_PS_OFF "Netzteil Aus"
#define MSG_RETRACT "Retract" #define MSG_RETRACT "Retract"
@ -40,14 +45,14 @@
#define MSG_MOVE_1MM " 1.0 mm" #define MSG_MOVE_1MM " 1.0 mm"
#define MSG_MOVE_10MM "10.0 mm" #define MSG_MOVE_10MM "10.0 mm"
#define MSG_SPEED "Geschw." #define MSG_SPEED "Geschw."
#define MSG_NOZZLE "D" STR_ue "se" #define MSG_NOZZLE "Düse"
#define MSG_BED "Bett" #define MSG_BED "Bett"
#define MSG_FAN_SPEED "L" STR_ue "ftergeschw." #define MSG_FAN_SPEED "Lüftergeschw."
#define MSG_FLOW "Fluss" #define MSG_FLOW "Fluss"
#define MSG_CONTROL "Einstellungen" #define MSG_CONTROL "Einstellungen"
#define MSG_MIN STR_THERMOMETER " Min" #define MSG_MIN LCD_STR_THERMOMETER " Min"
#define MSG_MAX STR_THERMOMETER " Max" #define MSG_MAX LCD_STR_THERMOMETER " Max"
#define MSG_FACTOR STR_THERMOMETER " Faktor" #define MSG_FACTOR LCD_STR_THERMOMETER " Faktor"
#define MSG_AUTOTEMP "AutoTemp" #define MSG_AUTOTEMP "AutoTemp"
#define MSG_ON "Ein" #define MSG_ON "Ein"
#define MSG_OFF "Aus" #define MSG_OFF "Aus"
@ -75,7 +80,7 @@
#define MSG_TEMPERATURE "Temperatur" #define MSG_TEMPERATURE "Temperatur"
#define MSG_MOTION "Bewegung" #define MSG_MOTION "Bewegung"
#define MSG_VOLUMETRIC "Filament" #define MSG_VOLUMETRIC "Filament"
#define MSG_VOLUMETRIC_ENABLED "E in mm" STR_h3 #define MSG_VOLUMETRIC_ENABLED "E in mm³"
#define MSG_FILAMENT_SIZE_EXTRUDER_0 "Filament D 1" #define MSG_FILAMENT_SIZE_EXTRUDER_0 "Filament D 1"
#define MSG_FILAMENT_SIZE_EXTRUDER_1 "Filament D 2" #define MSG_FILAMENT_SIZE_EXTRUDER_1 "Filament D 2"
#define MSG_FILAMENT_SIZE_EXTRUDER_2 "Filament D 3" #define MSG_FILAMENT_SIZE_EXTRUDER_2 "Filament D 3"
@ -117,6 +122,8 @@
#define MSG_BABYSTEP_Y "Babystep Y" #define MSG_BABYSTEP_Y "Babystep Y"
#define MSG_BABYSTEP_Z "Babystep Z" #define MSG_BABYSTEP_Z "Babystep Z"
#define MSG_ENDSTOP_ABORT "Endstop Abbr. Ein" #define MSG_ENDSTOP_ABORT "Endstop Abbr. Ein"
#define MSG_END_HOUR "Stunden"
#define MSG_END_MINUTE "Minuten"
#ifdef DELTA_CALIBRATION_MENU #ifdef DELTA_CALIBRATION_MENU
#define MSG_DELTA_CALIBRATE "Delta Kalibrieren" #define MSG_DELTA_CALIBRATE "Delta Kalibrieren"

@ -2,12 +2,22 @@
* English * English
* *
* LCD Menu Messages * LCD Menu Messages
* Please note these are limited to 17 characters! * Se also documentation/LCDLanguageFont.md
* *
*/ */
#ifndef LANGUAGE_EN_H #ifndef LANGUAGE_EN_H
#define LANGUAGE_EN_H #define LANGUAGE_EN_H
#if !( defined(MAPPER_NON)|| defined(MAPPER_C2C3)|| defined(MAPPER_D0D1)|| defined(MAPPER_D0D1_MOD)|| defined(MAPPER_E382E383) )
#define MAPPER_NON // For direct asci codes
#endif
//#define SIMULATE_ROMFONT //Comment in to see what is seen on the character based displays
#if !( defined(SIMULATE_ROMFONT)|| defined(DISPLAY_CHARSET_ISO10646_1)|| defined(DISPLAY_CHARSET_ISO10646_5)|| defined(DISPLAY_CHARSET_ISO10646_KANA) )
#define DISPLAY_CHARSET_ISO10646_1 // use the better font on full graphic displays.
#endif
#ifndef WELCOME_MSG #ifndef WELCOME_MSG
#define WELCOME_MSG MACHINE_NAME " ready." #define WELCOME_MSG MACHINE_NAME " ready."
#endif #endif
@ -159,13 +169,13 @@
#define MSG_CONTROL "Control" #define MSG_CONTROL "Control"
#endif #endif
#ifndef MSG_MIN #ifndef MSG_MIN
#define MSG_MIN " " STR_THERMOMETER " Min" #define MSG_MIN " "LCD_STR_THERMOMETER " Min"
#endif #endif
#ifndef MSG_MAX #ifndef MSG_MAX
#define MSG_MAX " " STR_THERMOMETER " Max" #define MSG_MAX " "LCD_STR_THERMOMETER " Max"
#endif #endif
#ifndef MSG_FACTOR #ifndef MSG_FACTOR
#define MSG_FACTOR " " STR_THERMOMETER " Fact" #define MSG_FACTOR " "LCD_STR_THERMOMETER " Fact"
#endif #endif
#ifndef MSG_AUTOTEMP #ifndef MSG_AUTOTEMP
#define MSG_AUTOTEMP "Autotemp" #define MSG_AUTOTEMP "Autotemp"
@ -261,7 +271,7 @@
#define MSG_VOLUMETRIC "Filament" #define MSG_VOLUMETRIC "Filament"
#endif #endif
#ifndef MSG_VOLUMETRIC_ENABLED #ifndef MSG_VOLUMETRIC_ENABLED
#define MSG_VOLUMETRIC_ENABLED "E in mm" STR_h3 #define MSG_VOLUMETRIC_ENABLED "E in mm3"
#endif #endif
#ifndef MSG_FILAMENT_SIZE_EXTRUDER_0 #ifndef MSG_FILAMENT_SIZE_EXTRUDER_0
#define MSG_FILAMENT_SIZE_EXTRUDER_0 "Fil. Dia. 1" #define MSG_FILAMENT_SIZE_EXTRUDER_0 "Fil. Dia. 1"
@ -407,6 +417,12 @@
#ifndef MSG_ERR_MAXTEMP_BED #ifndef MSG_ERR_MAXTEMP_BED
#define MSG_ERR_MAXTEMP_BED "Err: MAXTEMP BED" #define MSG_ERR_MAXTEMP_BED "Err: MAXTEMP BED"
#endif #endif
#ifndef MSG_END_HOUR
#define MSG_END_HOUR "hours"
#endif
#ifndef MSG_END_MINUTE
#define MSG_END_MINUTE "minutes"
#endif
#ifdef DELTA_CALIBRATION_MENU #ifdef DELTA_CALIBRATION_MENU
#ifndef MSG_DELTA_CALIBRATE #ifndef MSG_DELTA_CALIBRATE

@ -2,12 +2,17 @@
* Spanish * Spanish
* *
* LCD Menu Messages * LCD Menu Messages
* Please note these are limited to 17 characters! * See also documentation/LCDLanguageFont.md
* *
*/ */
#ifndef LANGUAGE_ES_H #ifndef LANGUAGE_ES_H
#define LANGUAGE_ES_H #define LANGUAGE_ES_H
#define MAPPER_NON
// Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h
//#define SIMULATE_ROMFONT
#define DISPLAY_CHARSET_ISO10646_1
#define WELCOME_MSG MACHINE_NAME " lista." #define WELCOME_MSG MACHINE_NAME " lista."
#define MSG_SD_INSERTED "Tarjeta colocada" #define MSG_SD_INSERTED "Tarjeta colocada"
#define MSG_SD_REMOVED "Tarjeta retirada" #define MSG_SD_REMOVED "Tarjeta retirada"
@ -46,9 +51,9 @@
#define MSG_FAN_SPEED "Ventilador" #define MSG_FAN_SPEED "Ventilador"
#define MSG_FLOW "Flujo" #define MSG_FLOW "Flujo"
#define MSG_CONTROL "Control" #define MSG_CONTROL "Control"
#define MSG_MIN "\002 Min" #define MSG_MIN LCD_STR_THERMOMETER " Min"
#define MSG_MAX "\002 Max" #define MSG_MAX LCD_STR_THERMOMETER " Max"
#define MSG_FACTOR "\002 Fact" #define MSG_FACTOR LCD_STR_THERMOMETER " Fact"
#define MSG_AUTOTEMP "Autotemp" #define MSG_AUTOTEMP "Autotemp"
#define MSG_ON "On" #define MSG_ON "On"
#define MSG_OFF "Off" #define MSG_OFF "Off"
@ -118,6 +123,8 @@
#define MSG_BABYSTEP_Y "Babystep Y" #define MSG_BABYSTEP_Y "Babystep Y"
#define MSG_BABYSTEP_Z "Babystep Z" #define MSG_BABYSTEP_Z "Babystep Z"
#define MSG_ENDSTOP_ABORT "Endstop abort" #define MSG_ENDSTOP_ABORT "Endstop abort"
#define MSG_END_HOUR "horas"
#define MSG_END_MINUTE "minutos"
#ifdef DELTA_CALIBRATION_MENU #ifdef DELTA_CALIBRATION_MENU
#define MSG_DELTA_CALIBRATE "Delta Calibration" #define MSG_DELTA_CALIBRATE "Delta Calibration"

@ -2,12 +2,17 @@
* Basque-Euskera * Basque-Euskera
* *
* LCD Menu Messages * LCD Menu Messages
* Please note these are limited to 17 characters! * See also documentation/LCDLanguageFont.md
* *
*/ */
#ifndef LANGUAGE_EU_H #ifndef LANGUAGE_EU_H
#define LANGUAGE_EU_H #define LANGUAGE_EU_H
#define MAPPER_NON
// Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h
//#define SIMULATE_ROMFONT
#define DISPLAY_CHARSET_ISO10646_1
#define WELCOME_MSG MACHINE_NAME " prest." #define WELCOME_MSG MACHINE_NAME " prest."
#define MSG_SD_INSERTED "Txartela sartuta" #define MSG_SD_INSERTED "Txartela sartuta"
#define MSG_SD_REMOVED "Txartela kenduta" #define MSG_SD_REMOVED "Txartela kenduta"
@ -46,9 +51,9 @@
#define MSG_FAN_SPEED "Haizagailua" #define MSG_FAN_SPEED "Haizagailua"
#define MSG_FLOW "Fluxua" #define MSG_FLOW "Fluxua"
#define MSG_CONTROL "Kontrola" #define MSG_CONTROL "Kontrola"
#define MSG_MIN " \002 Min" #define MSG_MIN LCD_STR_THERMOMETER " Min"
#define MSG_MAX " \002 Max" #define MSG_MAX LCD_STR_THERMOMETER " Max"
#define MSG_FACTOR " \002 Faktorea" #define MSG_FACTOR LCD_STR_THERMOMETER " Faktorea"
#define MSG_AUTOTEMP "Auto tenperatura" #define MSG_AUTOTEMP "Auto tenperatura"
#define MSG_ON "On " #define MSG_ON "On "
#define MSG_OFF "Off" #define MSG_OFF "Off"
@ -118,6 +123,8 @@
#define MSG_BABYSTEP_Y "Babystep Y" #define MSG_BABYSTEP_Y "Babystep Y"
#define MSG_BABYSTEP_Z "Babystep Z" #define MSG_BABYSTEP_Z "Babystep Z"
#define MSG_ENDSTOP_ABORT "Endstop deuseztat" #define MSG_ENDSTOP_ABORT "Endstop deuseztat"
#define MSG_END_HOUR "hours"
#define MSG_END_MINUTE "minutes"
#ifdef DELTA_CALIBRATION_MENU #ifdef DELTA_CALIBRATION_MENU
#define MSG_DELTA_CALIBRATE "Delta Calibration" #define MSG_DELTA_CALIBRATE "Delta Calibration"

@ -2,12 +2,17 @@
* Finnish * Finnish
* *
* LCD Menu Messages * LCD Menu Messages
* Please note these are limited to 17 characters! * See also documentation/LCDLanguageFont.md
* *
*/ */
#ifndef LANGUAGE_FI_H #ifndef LANGUAGE_FI_H
#define LANGUAGE_FI_H #define LANGUAGE_FI_H
#define MAPPER_C2C3
// Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h
//#define SIMULATE_ROMFONT
#define DISPLAY_CHARSET_ISO10646_1
#define WELCOME_MSG MACHINE_NAME " valmis." #define WELCOME_MSG MACHINE_NAME " valmis."
#define MSG_SD_INSERTED "Kortti asetettu" #define MSG_SD_INSERTED "Kortti asetettu"
#define MSG_SD_REMOVED "Kortti poistettu" #define MSG_SD_REMOVED "Kortti poistettu"
@ -17,21 +22,21 @@
#define MSG_AUTO_HOME "Aja referenssiin" #define MSG_AUTO_HOME "Aja referenssiin"
#define MSG_SET_HOME_OFFSETS "Set home offsets" #define MSG_SET_HOME_OFFSETS "Set home offsets"
#define MSG_SET_ORIGIN "Aseta origo" #define MSG_SET_ORIGIN "Aseta origo"
#define MSG_PREHEAT_PLA "Esil" STR_ae "mmit" STR_ae " PLA" #define MSG_PREHEAT_PLA "Esilämmitä PLA"
#define MSG_PREHEAT_PLA_N "Esil" STR_ae "mmit" STR_ae " PLA " #define MSG_PREHEAT_PLA_N "Esilämmitä PLA "
#define MSG_PREHEAT_PLA_ALL "Esil" STR_ae ". PLA Kaikki" #define MSG_PREHEAT_PLA_ALL "Esilä. PLA Kaikki"
#define MSG_PREHEAT_PLA_BEDONLY "Esil" STR_ae ". PLA Alusta" #define MSG_PREHEAT_PLA_BEDONLY "Esilä. PLA Alusta"
#define MSG_PREHEAT_PLA_SETTINGS "Esil" STR_ae "mm. PLA konf" #define MSG_PREHEAT_PLA_SETTINGS "Esilämm. PLA konf"
#define MSG_PREHEAT_ABS "Esil" STR_ae "mmit" STR_ae " ABS" #define MSG_PREHEAT_ABS "Esilämmitä ABS"
#define MSG_PREHEAT_ABS_N "Esil" STR_ae "mmit" STR_ae " ABS " #define MSG_PREHEAT_ABS_N "Esilämmitä ABS "
#define MSG_PREHEAT_ABS_ALL "Esil" STR_ae ". ABS Kaikki" #define MSG_PREHEAT_ABS_ALL "Esilä. ABS Kaikki"
#define MSG_PREHEAT_ABS_BEDONLY "Esil" STR_ae ". ABS Alusta" #define MSG_PREHEAT_ABS_BEDONLY "Esilä. ABS Alusta"
#define MSG_PREHEAT_ABS_SETTINGS "Esil" STR_ae "mm. ABS konf" #define MSG_PREHEAT_ABS_SETTINGS "Esilämm. ABS konf"
#define MSG_COOLDOWN "J" STR_ae "" STR_ae "hdyt" STR_ae "" #define MSG_COOLDOWN "Jäähdytä"
#define MSG_SWITCH_PS_ON "Virta p" STR_ae "" STR_ae "lle" #define MSG_SWITCH_PS_ON "Virta päälle"
#define MSG_SWITCH_PS_OFF "Virta pois" #define MSG_SWITCH_PS_OFF "Virta pois"
#define MSG_EXTRUDE "Pursota" #define MSG_EXTRUDE "Pursota"
#define MSG_RETRACT "Ved" STR_ae " takaisin" #define MSG_RETRACT "Vedä takaisin"
#define MSG_MOVE_AXIS "Liikuta akseleita" #define MSG_MOVE_AXIS "Liikuta akseleita"
#define MSG_MOVE_X "Liikuta X" #define MSG_MOVE_X "Liikuta X"
#define MSG_MOVE_Y "Liikuta Y" #define MSG_MOVE_Y "Liikuta Y"
@ -46,9 +51,9 @@
#define MSG_FAN_SPEED "Tuul. nopeus" #define MSG_FAN_SPEED "Tuul. nopeus"
#define MSG_FLOW "Virtaus" #define MSG_FLOW "Virtaus"
#define MSG_CONTROL "Kontrolli" #define MSG_CONTROL "Kontrolli"
#define MSG_MIN STR_THERMOMETER " Min" #define MSG_MIN LCD_STR_THERMOMETER " Min"
#define MSG_MAX STR_THERMOMETER " Max" #define MSG_MAX LCD_STR_THERMOMETER " Max"
#define MSG_FACTOR STR_THERMOMETER " Kerr" #define MSG_FACTOR LCD_STR_THERMOMETER " Kerr"
#define MSG_AUTOTEMP "Autotemp" #define MSG_AUTOTEMP "Autotemp"
#define MSG_ON "On " #define MSG_ON "On "
#define MSG_OFF "Off" #define MSG_OFF "Off"
@ -73,10 +78,10 @@
#define MSG_YSTEPS "Ysteps/mm" #define MSG_YSTEPS "Ysteps/mm"
#define MSG_ZSTEPS "Zsteps/mm" #define MSG_ZSTEPS "Zsteps/mm"
#define MSG_ESTEPS "Esteps/mm" #define MSG_ESTEPS "Esteps/mm"
#define MSG_TEMPERATURE "L" STR_ae "mp" STR_oe "tila" #define MSG_TEMPERATURE "Lämpötila"
#define MSG_MOTION "Liike" #define MSG_MOTION "Liike"
#define MSG_VOLUMETRIC "Filament" #define MSG_VOLUMETRIC "Filament"
#define MSG_VOLUMETRIC_ENABLED "E in mm3" #define MSG_VOLUMETRIC_ENABLED "E in mm³"
#define MSG_FILAMENT_SIZE_EXTRUDER_0 "Fil. Dia. 1" #define MSG_FILAMENT_SIZE_EXTRUDER_0 "Fil. Dia. 1"
#define MSG_FILAMENT_SIZE_EXTRUDER_1 "Fil. Dia. 2" #define MSG_FILAMENT_SIZE_EXTRUDER_1 "Fil. Dia. 2"
#define MSG_FILAMENT_SIZE_EXTRUDER_2 "Fil. Dia. 3" #define MSG_FILAMENT_SIZE_EXTRUDER_2 "Fil. Dia. 3"
@ -84,13 +89,13 @@
#define MSG_STORE_EPROM "Tallenna muistiin" #define MSG_STORE_EPROM "Tallenna muistiin"
#define MSG_LOAD_EPROM "Lataa muistista" #define MSG_LOAD_EPROM "Lataa muistista"
#define MSG_RESTORE_FAILSAFE "Palauta oletus" #define MSG_RESTORE_FAILSAFE "Palauta oletus"
#define MSG_REFRESH "P" STR_ae "ivit" STR_ae "" #define MSG_REFRESH "Päivitä"
#define MSG_WATCH "Seuraa" #define MSG_WATCH "Seuraa"
#define MSG_PREPARE "Valmistele" #define MSG_PREPARE "Valmistele"
#define MSG_TUNE "S" STR_ae "" STR_ae "d" STR_ae "" #define MSG_TUNE "Säädä"
#define MSG_PAUSE_PRINT "Keskeyt" STR_ae " tulostus" #define MSG_PAUSE_PRINT "Keskeytä tulostus"
#define MSG_RESUME_PRINT "Jatka tulostusta" #define MSG_RESUME_PRINT "Jatka tulostusta"
#define MSG_STOP_PRINT "Pys" STR_ae "yt" STR_ae " tulostus" #define MSG_STOP_PRINT "Pysäytä tulostus"
#define MSG_CARD_MENU "Korttivalikko" #define MSG_CARD_MENU "Korttivalikko"
#define MSG_NO_CARD "Ei korttia" #define MSG_NO_CARD "Ei korttia"
#define MSG_DWELL "Nukkumassa..." #define MSG_DWELL "Nukkumassa..."
@ -100,9 +105,9 @@
#define MSG_NO_MOVE "Ei liiketta." #define MSG_NO_MOVE "Ei liiketta."
#define MSG_KILLED "KILLED. " #define MSG_KILLED "KILLED. "
#define MSG_STOPPED "STOPPED. " #define MSG_STOPPED "STOPPED. "
#define MSG_CONTROL_RETRACT "Ved" STR_ae " mm" #define MSG_CONTROL_RETRACT "Vedä mm"
#define MSG_CONTROL_RETRACT_SWAP "Va. Ved" STR_ae " mm" #define MSG_CONTROL_RETRACT_SWAP "Va. Vedä mm"
#define MSG_CONTROL_RETRACTF "Ved" STR_ae " V" #define MSG_CONTROL_RETRACTF "Vedä V"
#define MSG_CONTROL_RETRACT_ZLIFT "Z mm" #define MSG_CONTROL_RETRACT_ZLIFT "Z mm"
#define MSG_CONTROL_RETRACT_RECOVER "UnRet +mm" #define MSG_CONTROL_RETRACT_RECOVER "UnRet +mm"
#define MSG_CONTROL_RETRACT_RECOVER_SWAP "Va. UnRet +mm" #define MSG_CONTROL_RETRACT_RECOVER_SWAP "Va. UnRet +mm"
@ -118,6 +123,8 @@
#define MSG_BABYSTEP_Y "Babystep Y" #define MSG_BABYSTEP_Y "Babystep Y"
#define MSG_BABYSTEP_Z "Babystep Z" #define MSG_BABYSTEP_Z "Babystep Z"
#define MSG_ENDSTOP_ABORT "Endstop abort" #define MSG_ENDSTOP_ABORT "Endstop abort"
#define MSG_END_HOUR "hours"
#define MSG_END_MINUTE "minutes"
#ifdef DELTA_CALIBRATION_MENU #ifdef DELTA_CALIBRATION_MENU
#define MSG_DELTA_CALIBRATE "Delta Kalibrointi" #define MSG_DELTA_CALIBRATE "Delta Kalibrointi"

@ -2,12 +2,18 @@
* French * French
* *
* LCD Menu Messages * LCD Menu Messages
* Please note these are limited to 17 characters! * See also documentation/LCDLanguageFont.md
* *
*/ */
#ifndef LANGUAGE_FR_H #ifndef LANGUAGE_FR_H
#define LANGUAGE_FR_H #define LANGUAGE_FR_H
#define MAPPER_NON
// Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h
//#define SIMULATE_ROMFONT
#define DISPLAY_CHARSET_ISO10646_1
#define WELCOME_MSG MACHINE_NAME " prete." #define WELCOME_MSG MACHINE_NAME " prete."
#define MSG_SD_INSERTED "Carte inseree" #define MSG_SD_INSERTED "Carte inseree"
#define MSG_SD_REMOVED "Carte retiree" #define MSG_SD_REMOVED "Carte retiree"
@ -46,9 +52,9 @@
#define MSG_FAN_SPEED "Vite. ventilateur" #define MSG_FAN_SPEED "Vite. ventilateur"
#define MSG_FLOW "Flux" #define MSG_FLOW "Flux"
#define MSG_CONTROL "Controler" #define MSG_CONTROL "Controler"
#define MSG_MIN " \002 Min" #define MSG_MIN LCD_STR_THERMOMETER " Min"
#define MSG_MAX " \002 Max" #define MSG_MAX LCD_STR_THERMOMETER " Max"
#define MSG_FACTOR " \002 Facteur" #define MSG_FACTOR LCD_STR_THERMOMETER " Facteur"
#define MSG_AUTOTEMP "Temp. Auto." #define MSG_AUTOTEMP "Temp. Auto."
#define MSG_ON "Marche " #define MSG_ON "Marche "
#define MSG_OFF "Arret" #define MSG_OFF "Arret"
@ -118,6 +124,8 @@
#define MSG_BABYSTEP_Y "Babystep Y" #define MSG_BABYSTEP_Y "Babystep Y"
#define MSG_BABYSTEP_Z "Babystep Z" #define MSG_BABYSTEP_Z "Babystep Z"
#define MSG_ENDSTOP_ABORT "Butee abandon" #define MSG_ENDSTOP_ABORT "Butee abandon"
#define MSG_END_HOUR "heures"
#define MSG_END_MINUTE "minutes"
#ifdef DELTA_CALIBRATION_MENU #ifdef DELTA_CALIBRATION_MENU
#define MSG_DELTA_CALIBRATE "Delta Calibration" #define MSG_DELTA_CALIBRATE "Delta Calibration"

@ -2,12 +2,17 @@
* Italian * Italian
* *
* LCD Menu Messages * LCD Menu Messages
* Please note these are limited to 17 characters! * See also documentation/LCDLanguageFont.md
* *
*/ */
#ifndef LANGUAGE_IT_H #ifndef LANGUAGE_IT_H
#define LANGUAGE_IT_H #define LANGUAGE_IT_H
#define MAPPER_NON
// Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h
//#define SIMULATE_ROMFONT
#define DISPLAY_CHARSET_ISO10646_1
#define WELCOME_MSG MACHINE_NAME " pronto." #define WELCOME_MSG MACHINE_NAME " pronto."
#define MSG_SD_INSERTED "SD Card inserita" #define MSG_SD_INSERTED "SD Card inserita"
#define MSG_SD_REMOVED "SD Card rimossa" #define MSG_SD_REMOVED "SD Card rimossa"
@ -46,9 +51,9 @@
#define MSG_FAN_SPEED "Ventola" #define MSG_FAN_SPEED "Ventola"
#define MSG_FLOW "Flusso" #define MSG_FLOW "Flusso"
#define MSG_CONTROL "Controllo" #define MSG_CONTROL "Controllo"
#define MSG_MIN " \002 Min" #define MSG_MIN LCD_STR_THERMOMETER " Min"
#define MSG_MAX " \002 Max" #define MSG_MAX LCD_STR_THERMOMETER " Max"
#define MSG_FACTOR " \002 Fact" #define MSG_FACTOR LCD_STR_THERMOMETER " Fact"
#define MSG_AUTOTEMP "Autotemp" #define MSG_AUTOTEMP "Autotemp"
#define MSG_ON "ON " #define MSG_ON "ON "
#define MSG_OFF "OFF" #define MSG_OFF "OFF"
@ -119,6 +124,8 @@
#define MSG_BABYSTEP_Y "Babystep Y" #define MSG_BABYSTEP_Y "Babystep Y"
#define MSG_BABYSTEP_Z "Babystep Z" #define MSG_BABYSTEP_Z "Babystep Z"
#define MSG_ENDSTOP_ABORT "Finecorsa abort" #define MSG_ENDSTOP_ABORT "Finecorsa abort"
#define MSG_END_HOUR "ore"
#define MSG_END_MINUTE "minuti"
#ifdef DELTA_CALIBRATION_MENU #ifdef DELTA_CALIBRATION_MENU
#define MSG_DELTA_CALIBRATE "Calibraz. Delta" #define MSG_DELTA_CALIBRATE "Calibraz. Delta"

@ -0,0 +1,149 @@
/**
* Japanese (Kana)
*
* LCD Menu Messages
* See also documentation/LCDLanguageFont.md
*
*/
#ifndef LANGUAGE_KANA_H
#define LANGUAGE_KANA_H
#define MAPPER_NON
// Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h
#define SIMULATE_ROMFONT
#define DISPLAY_CHARSET_ISO10646_KANA
// 片仮名表示定義
#define WELCOME_MSG MACHINE_NAME " ready."
#define MSG_SD_INSERTED "\xb6\xb0\xc4\xde\x20\xbf\xb3\xc6\xad\xb3\xbb\xda\xcf\xbc\xc0" // "Card inserted"
#define MSG_SD_REMOVED "\xb6\xb0\xc4\xde\xb6xde\xb1\xd8\xcf\xbe\xdd" // "Card removed"
#define MSG_MAIN "\xd2\xb2\xdd" // "Main"
#define MSG_AUTOSTART "\xbc\xde\xc4\xde\xb3\xb6\xb2\xbc" // "Autostart"
#define MSG_DISABLE_STEPPERS "\xd3\xb0\xc0\xb0\xc3\xde\xdd\xb9\xde\xdd\x20\xb5\xcc" // "Disable steppers"
#define MSG_AUTO_HOME "\xb9\xde\xdd\xc3\xdd\xc6\xb2\xc4\xde\xb3" // "Auto home"
#define MSG_SET_HOME_OFFSETS "\xb7\xbc\xde\xad\xdd\xb5\xcc\xbe\xaf\xc4\xbe\xaf\xc3\xb2" // "Set home offsets"
#define MSG_SET_ORIGIN "\xb7\xbc\xde\xad\xdd\xbe\xaf\xc4" // "Set origin"
#define MSG_PREHEAT_PLA "PLA \xd6\xc8\xc2" // "Preheat PLA"
#define MSG_PREHEAT_PLA_N MSG_PREHEAT_PLA " "
#define MSG_PREHEAT_PLA_ALL MSG_PREHEAT_PLA " \xbd\xcd\xde\xc3" // " All"
#define MSG_PREHEAT_PLA_BEDONLY MSG_PREHEAT_PLA " \xcd\xde\xaf\xc4\xde" // "Bed"
#define MSG_PREHEAT_PLA_SETTINGS MSG_PREHEAT_PLA " \xbe\xaf\xc3\xb2" // "conf"
#define MSG_PREHEAT_ABS "ABS \xd6\xc8\xc2" // "Preheat ABS"
#define MSG_PREHEAT_ABS_N MSG_PREHEAT_ABS " "
#define MSG_PREHEAT_ABS_ALL MSG_PREHEAT_ABS " \xbd\xcd\xde\xc3" // " All"
#define MSG_PREHEAT_ABS_BEDONLY MSG_PREHEAT_ABS " \xcd\xde\xaf\xc4\xde" // "Bed"
#define MSG_PREHEAT_ABS_SETTINGS MSG_PREHEAT_ABS " \xbe\xaf\xc3\xb2" // "conf"
#define MSG_COOLDOWN "\xb6\xc8\xc2\xc3\xb2\xbc" // "Cooldown"
#define MSG_SWITCH_PS_ON "\xc3\xde\xdd\xb9\xdd\xde\x20\xb5\xdd" // "Switch power on"
#define MSG_SWITCH_PS_OFF "\xc3\xde\xdd\xb9\xdd\xde\x20\xb5\xcc" // "Switch power off"
#define MSG_EXTRUDE "\xb5\xbc\xc0\xde\xbc" // "Extrude"
#define MSG_RETRACT "\xd8\xc4\xd7\xb8\xc4" // "Retract"
#define MSG_MOVE_AXIS "\xbc\xde\xb8\xb2\xc4\xde\xb3" // "Move axis"
#define MSG_MOVE_X "X\xbc\xde\xb8\x20\xb2\xc4\xde\xb3" // "Move X"
#define MSG_MOVE_Y "Y\xbc\xde\xb8\x20\xb2\xc4\xde\xb3" // "Move Y"
#define MSG_MOVE_Z "Z\xbc\xde\xb8\x20\xb2\xc4\xde\xb3" // "Move Z"
#define MSG_MOVE_E "\xb4\xb8\xbd\xc4\xd9\xb0\xc0\xde\xb0" // "Extruder"
#define MSG_MOVE_01MM "0.1mm \xb2\xc4\xde\xb3" // "Move 0.1mm"
#define MSG_MOVE_1MM " 1mm \xb2\xc4\xde\xb3" // "Move 1mm"
#define MSG_MOVE_10MM " 10mm \xb2\xc4\xde\xb3" // "Move 10mm"
#define MSG_SPEED "\xbd\xcb\xdf\xb0\xc4\xde" // "Speed"
#define MSG_NOZZLE "\xc9\xbd\xde\xd9" // "Nozzle"
#define MSG_BED "\xcd\xde\xaf\xc4\xde" // "Bed"
#define MSG_FAN_SPEED "\xcc\xa7\xdd\xbf\xb8\xc4\xde" // "Fan speed"
#define MSG_FLOW "\xb5\xb8\xd8\xd8\xae\xb3" // "Flow"
#define MSG_CONTROL "\xba\xdd\xc4\xdb\xb0\xd9" // "Control"
#define MSG_MIN LCD_STR_THERMOMETER " Min"
#define MSG_MAX LCD_STR_THERMOMETER " Max"
#define MSG_FACTOR LCD_STR_THERMOMETER " Fact"
#define MSG_AUTOTEMP "\xbc\xde\xc4\xde\xb3\xb5\xdd\xc4\xde" // "Autotemp"
#define MSG_ON "On "
#define MSG_OFF "Off"
#define MSG_PID_P "PID-P"
#define MSG_PID_I "PID-I"
#define MSG_PID_D "PID-D"
#define MSG_PID_C "PID-C"
#define MSG_ACC "\xb6\xbf\xb8\xc4\xde" // "Accel"
#define MSG_VXY_JERK "Vxy-jerk"
#define MSG_VZ_JERK "Vz-jerk"
#define MSG_VE_JERK "Ve-jerk"
#define MSG_VMAX "Vmax "
#define MSG_X "x"
#define MSG_Y "y"
#define MSG_Z "z"
#define MSG_E "e"
#define MSG_VMIN "Vmin"
#define MSG_VTRAV_MIN "VTrav min"
#define MSG_AMAX "Amax "
#define MSG_A_RETRACT "A-retract"
#define MSG_XSTEPS "Xsteps/mm"
#define MSG_YSTEPS "Ysteps/mm"
#define MSG_ZSTEPS "Zsteps/mm"
#define MSG_ESTEPS "Esteps/mm"
#define MSG_TEMPERATURE "\xb5\xdd\xc4\xde" // "Temperature"
#define MSG_MOTION "\xb3\xba\xde\xb7\xbe\xaf\xc3\xb2" // "Motion"
#define MSG_VOLUMETRIC "\xcc\xa8\xd7\xd2\xdd\xc4" // "Filament"
#define MSG_VOLUMETRIC_ENABLED "E in mm3"
#define MSG_FILAMENT_SIZE_EXTRUDER_0 "Fil. Dia. 1"
#define MSG_FILAMENT_SIZE_EXTRUDER_1 "Fil. Dia. 2"
#define MSG_FILAMENT_SIZE_EXTRUDER_2 "Fil. Dia. 3"
#define MSG_FILAMENT_SIZE_EXTRUDER_3 "Fil. Dia. 4"
#define MSG_CONTRAST "LCD\xba\xdd\xc4\xd7\xbd\xc4" // "LCD contrast"
#define MSG_STORE_EPROM "\xd2\xd3\xd8\xcd\xb6\xb8\xc9\xb3" // "Store memory"
#define MSG_LOAD_EPROM "\xd2\xd3\xd8\xb6\xd7\xd6\xd0\ba\xd0" // "Load memory"
#define MSG_RESTORE_FAILSAFE "\xbe\xaf\xc3\xb2\xd8\xbe\xaf\xc4" // "Restore failsafe"
#define MSG_REFRESH "\xd8\xcc\xda\xaf\xbc\xad" // "Refresh"
#define MSG_WATCH "\xb2\xdd\xcc\xab" // "Info screen"
#define MSG_PREPARE "\xbc\xde\xad\xdd\xcb\xde\xbe\xaf\xc3\xb2" // "Prepare"
#define MSG_TUNE "\xc1\xae\xb3\xbe\xb2" // "Tune"
#define MSG_PAUSE_PRINT "\xb2\xc1\xbc\xde\xc3\xb2\xbc" // "Pause print"
#define MSG_RESUME_PRINT "\xcc\xdf\xd8\xdd\xc4\xbb\xb2\xb6\xb2" // "Resume print"
#define MSG_STOP_PRINT "\xcc\xdf\xd8\xdd\xc4\xc3\xb2\xbc" // "Stop print"
#define MSG_CARD_MENU "SD\xb6\xb0\xc4\xde\xb6\xd7\xcc\xdf\xd8\xdd\xc4" // "Print from SD"
#define MSG_NO_CARD "SD\xb6\xb0\xc4\xde\xb6\xde\xb1\xd8\xcf\xbe\xdd" // "No SD card"
#define MSG_DWELL "\xbd\xd8\xb0\xcc\xdf" // "Sleep..."
#define MSG_USERWAIT "\xbc\xca\xde\xd7\xb9\xb5\xcf\xc1\xb8\xc0\xde\xbb\xb2" // "Wait for user..."
#define MSG_RESUMING "\xcc\xdf\xd8\xdd\xc4\xbb\xb2\xb6\xb2" // "Resuming print"
#define MSG_PRINT_ABORTED "\xcc\xdf\xd8\xdd\xc4\xc1\xad\xb3\xbc\xbb\xda\xcf\xbc\xc0" // "Print aborted"
#define MSG_NO_MOVE "\xb3\xba\xde\xb7\xcf\xbe\xdd" // "No move."
#define MSG_KILLED "\xbc\xae\xb3\xb7\xae" // "KILLED. "
#define MSG_STOPPED "\xc3\xb2\xbc\xbc\xcf\xbc\xc0" // "STOPPED. "
#define MSG_CONTROL_RETRACT "Retract mm"
#define MSG_CONTROL_RETRACT_SWAP "Swap Re.mm"
#define MSG_CONTROL_RETRACTF "Retract V"
#define MSG_CONTROL_RETRACT_ZLIFT "Hop mm"
#define MSG_CONTROL_RETRACT_RECOVER "UnRet +mm"
#define MSG_CONTROL_RETRACT_RECOVER_SWAP "S UnRet+mm"
#define MSG_CONTROL_RETRACT_RECOVERF "UnRet V"
#define MSG_AUTORETRACT "AutoRetr."
#define MSG_FILAMENTCHANGE "\xcc\xa8\xd7\xd2\xdd\xc4\xba\xb3\xb6\xdd" // "Change filament"
#define MSG_INIT_SDCARD "SD\xb6\xb0\xc4\xde\xbb\xb2\xd6\xd0\xba\xd0" // "Init. SD card"
#define MSG_CNG_SDCARD "SD\xb6\xb0\xc4\xde\xba\xb3\xb6\xdd" // "Change SD card"
#define MSG_ZPROBE_OUT "Z\xcc\xdf\xdb\xb0\xcc\xde \xcd\xde\xaf\xc4\xee\xb6\xde\xb2" // "Z probe out. bed"
#define MSG_POSITION_UNKNOWN "\xb9\xde\xdd\xc3\xdd\xcaXY\xb2\xc4\xde\xb3\xba\xdeZ" // "Home X/Y before Z"
#define MSG_ZPROBE_ZOFFSET "Z\xb5\xcc\xbe\xaf\xc4" // "Z Offset"
#define MSG_BABYSTEP_X "\xcb\xde\xc4\xde\xb3 X" // "Babystep X"
#define MSG_BABYSTEP_Y "\xcb\xde\xc4\xde\xb3 Y" // "Babystep Y"
#define MSG_BABYSTEP_Z "\xcb\xde\xc4\xde\xb3 Z" // "Babystep Z"
#define MSG_ENDSTOP_ABORT "Endstop abort"
#define MSG_END_HOUR "hours"
#define MSG_END_MINUTE "minutes"
/* These are from language.h. PLEASE DON'T TRANSLATE! All translatable messages can be found in language_en.h
#define MSG_HEATING "\xb6\xc8\xc2\xc1\xad\xb3..." // "Heating..."
#define MSG_HEATING_COMPLETE "\xb6\xc8\xc2\xb6\xdd\xd8x\xae\xb3" // "Heating done."
#define MSG_BED_HEATING "\xcd\xde\xaf\xc4\xde\xb6\xc8\xc2\xc1\xad\xb3" // "Bed Heating."
#define MSG_BED_DONE "\xcd\xde\xaf\xc4\xde\xb6\xc8\xc2\xb6\xdd\xd8x\xae\xb3" // "Bed done."
#define MSG_ENDSTOPS_HIT "endstops hit: "
^ typho
*/
#ifdef DELTA_CALIBRATION_MENU
#define MSG_DELTA_CALIBRATE "Delta Calibration"
#define MSG_DELTA_CALIBRATE_X "Calibrate X"
#define MSG_DELTA_CALIBRATE_Y "Calibrate Y"
#define MSG_DELTA_CALIBRATE_Z "Calibrate Z"
#define MSG_DELTA_CALIBRATE_CENTER "Calibrate Center"
#endif // DELTA_CALIBRATION_MENU
#endif // LANGUAGE_KANA_H

@ -0,0 +1,144 @@
/**
* Japanese (Kana UTF8 version)
*
* LCD Menu Messages
* See also documentation/LCDLanguageFont.md
*
*/
#ifndef LANGUAGE_KANA_UTF_H
#define LANGUAGE_KANA_UTF_H
#define MAPPER_E382E383
// Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h
//#define SIMULATE_ROMFONT
#define DISPLAY_CHARSET_ISO10646_KANA
// This is very crude replacement of the codes used in language_kana.h from somebody who really does not know what he is doing.
// Just to show the potential benefit of unicode.
// This translation can be improved by using the full charset of unicode codeblock U+30A0 to U+30FF.
// 片仮名表示定義
#define WELCOME_MSG MACHINE_NAME " ready."
#define MSG_SD_INSERTED "セード ンウニユウアレマシタ" // "Card inserted"
#define MSG_SD_REMOVED "セードゼアリマセン" // "Card removed"
#define MSG_MAIN "ナイン" // "Main"
#define MSG_AUTOSTART "ヅドウセイシ" // "Autostart"
#define MSG_DISABLE_STEPPERS "モーターデンゲン オフ" // "Disable steppers"
#define MSG_AUTO_HOME "ゲンテンニイドウ" // "Auto home"
#define MSG_SET_HOME_OFFSETS "キヅユンオフセツトセツテイ" // "Set home offsets"
#define MSG_SET_ORIGIN "キヅユンセツト" // "Set origin"
#define MSG_PREHEAT_PLA "PLA ヨネシ" // "Preheat PLA"
#define MSG_PREHEAT_PLA_N MSG_PREHEAT_PLA " "
#define MSG_PREHEAT_PLA_ALL MSG_PREHEAT_PLA " スベテ" // " All"
#define MSG_PREHEAT_PLA_BEDONLY MSG_PREHEAT_PLA " ベツド" // "Bed"
#define MSG_PREHEAT_PLA_SETTINGS MSG_PREHEAT_PLA " セツテイ" // "conf"
#define MSG_PREHEAT_ABS "ABS ヨネシ" // "Preheat ABS"
#define MSG_PREHEAT_ABS_N MSG_PREHEAT_ABS " "
#define MSG_PREHEAT_ABS_ALL MSG_PREHEAT_ABS " スベテ" // " All"
#define MSG_PREHEAT_ABS_BEDONLY MSG_PREHEAT_ABS " ベツド" // "Bed"
#define MSG_PREHEAT_ABS_SETTINGS MSG_PREHEAT_ABS " セツテイ" // "conf"
#define MSG_COOLDOWN "セネシテイシ" // "Cooldown"
#define MSG_SWITCH_PS_ON "デンケゾ オン" // "Switch power on"
#define MSG_SWITCH_PS_OFF "デンケゾ オフ" // "Switch power off"
#define MSG_EXTRUDE "オシダシ" // "Extrude"
#define MSG_RETRACT "リトラケト" // "Retract"
#define MSG_MOVE_AXIS "ヅケイドウ" // "Move axis"
#define MSG_MOVE_X "Xヅケ イドウ" // "Move X"
#define MSG_MOVE_Y "Yヅケ イドウ" // "Move Y"
#define MSG_MOVE_Z "Zヅケ イドウ" // "Move Z"
#define MSG_MOVE_E "エケストルーダー" // "Extruder"
#define MSG_MOVE_01MM "0.1mm イドウ" // "Move 0.1mm"
#define MSG_MOVE_1MM " 1mm イドウ" // "Move 1mm"
#define MSG_MOVE_10MM " 10mm イドウ" // "Move 10mm"
#define MSG_SPEED "スヒ゜ード" // "Speed"
#define MSG_NOZZLE "ノズル" // "Nozzle"
#define MSG_BED "ベツド" // "Bed"
#define MSG_FAN_SPEED "ファンンケド" // "Fan speed"
#define MSG_FLOW "オケリリョウ" // "Flow"
#define MSG_CONTROL "コントロール" // "Control"
#define MSG_MIN LCD_STR_THERMOMETER " Min"
#define MSG_MAX LCD_STR_THERMOMETER " Max"
#define MSG_FACTOR LCD_STR_THERMOMETER " Fact"
#define MSG_AUTOTEMP "ヅドウオンド" // "Autotemp"
#define MSG_ON "On "
#define MSG_OFF "Off"
#define MSG_PID_P "PID-P"
#define MSG_PID_I "PID-I"
#define MSG_PID_D "PID-D"
#define MSG_PID_C "PID-C"
#define MSG_ACC "センケド" // "Accel"
#define MSG_VXY_JERK "Vxy-jerk"
#define MSG_VZ_JERK "Vz-jerk"
#define MSG_VE_JERK "Ve-jerk"
#define MSG_VMAX "Vmax "
#define MSG_X "x"
#define MSG_Y "y"
#define MSG_Z "z"
#define MSG_E "e"
#define MSG_VMIN "Vmin"
#define MSG_VTRAV_MIN "VTrav min"
#define MSG_AMAX "Amax "
#define MSG_A_RETRACT "A-retract"
#define MSG_XSTEPS "Xsteps/mm"
#define MSG_YSTEPS "Ysteps/mm"
#define MSG_ZSTEPS "Zsteps/mm"
#define MSG_ESTEPS "Esteps/mm"
#define MSG_TEMPERATURE "オンド" // "Temperature"
#define MSG_MOTION "ウゴキセツテイ" // "Motion"
#define MSG_VOLUMETRIC "フィラナント" // "Filament"
#define MSG_VOLUMETRIC_ENABLED "E in mm3"
#define MSG_FILAMENT_SIZE_EXTRUDER_0 "Fil. Dia. 1"
#define MSG_FILAMENT_SIZE_EXTRUDER_1 "Fil. Dia. 2"
#define MSG_FILAMENT_SIZE_EXTRUDER_2 "Fil. Dia. 3"
#define MSG_FILAMENT_SIZE_EXTRUDER_3 "Fil. Dia. 4"
#define MSG_CONTRAST "LCDコントラスト" // "LCD contrast"
#define MSG_STORE_EPROM "ナモリヘセケノウ" // "Store memory"
#define MSG_LOAD_EPROM "ナモリセラヨミbaミ" // "Load memory"
#define MSG_RESTORE_FAILSAFE "セツテイリセツト" // "Restore failsafe"
#define MSG_REFRESH "リフレツシユ" // "Refresh"
#define MSG_WATCH "インフォ" // "Info screen"
#define MSG_PREPARE "ヅユンゼセツテイ" //"Prepare"
#define MSG_TUNE "チョウセイ" // "Tune"
#define MSG_PAUSE_PRINT "イチヅテイシ" // "Pause print"
#define MSG_RESUME_PRINT "プリントアイセイ" // "Resume print"
#define MSG_STOP_PRINT "プリントテイシ" // "Stop print"
#define MSG_CARD_MENU "SDセードセラプリント" // "Print from SD"
#define MSG_NO_CARD "SDセードゼアリマセン" // "No SD card"
#define MSG_DWELL "スリープ" // "Sleep..."
#define MSG_USERWAIT "シバラケオマチケダアイ" // "Wait for user..."
#define MSG_RESUMING "プリントアイセイ" // "Resuming print"
#define MSG_PRINT_ABORTED "プリントチユウシアレマシタ" // "Print aborted"
#define MSG_NO_MOVE "ウゴキマセン" // "No move."
#define MSG_KILLED "ショウキョ" // "KILLED. "
#define MSG_STOPPED "テイシシマシタ" // "STOPPED. "
#define MSG_CONTROL_RETRACT "Retract mm"
#define MSG_CONTROL_RETRACT_SWAP "Swap Re.mm"
#define MSG_CONTROL_RETRACTF "Retract V"
#define MSG_CONTROL_RETRACT_ZLIFT "Hop mm"
#define MSG_CONTROL_RETRACT_RECOVER "UnRet +mm"
#define MSG_CONTROL_RETRACT_RECOVER_SWAP "S UnRet+mm"
#define MSG_CONTROL_RETRACT_RECOVERF "UnRet V"
#define MSG_AUTORETRACT "AutoRetr."
#define MSG_FILAMENTCHANGE "フィラナントコウセン" // "Change filament"
#define MSG_INIT_SDCARD "SDセードアイヨミコミ" // "Init. SD card"
#define MSG_CNG_SDCARD "SDセードコウセン" // "Change SD card"
#define MSG_ZPROBE_OUT "Zプローブ ベツトnゼイ" // "Z probe out. bed"
#define MSG_POSITION_UNKNOWN "ゲンテンハXYイドウゴZ" // "Home X/Y before Z"
#define MSG_ZPROBE_ZOFFSET "Zオフセツト" // "Z Offset"
#define MSG_BABYSTEP_X "ゼドウ X" // "Babystep X"
#define MSG_BABYSTEP_Y "ゼドウ Y" // "Babystep Y"
#define MSG_BABYSTEP_Z "ゼドウ Z" // "Babystep Z"
#define MSG_ENDSTOP_ABORT "Endstop abort"
#define MSG_END_HOUR "hours"
#define MSG_END_MINUTE "minutes"
#ifdef DELTA_CALIBRATION_MENU
#define MSG_DELTA_CALIBRATE "Delta Calibration"
#define MSG_DELTA_CALIBRATE_X "Calibrate X"
#define MSG_DELTA_CALIBRATE_Y "Calibrate Y"
#define MSG_DELTA_CALIBRATE_Z "Calibrate Z"
#define MSG_DELTA_CALIBRATE_CENTER "Calibrate Center"
#endif // DELTA_CALIBRATION_MENU
#endif // LANGUAGE_KANA_UTF_H

@ -2,12 +2,17 @@
* Dutch * Dutch
* *
* LCD Menu Messages * LCD Menu Messages
* Please note these are limited to 17 characters! * See also documentation/LCDLanguageFont.md
* *
*/ */
#ifndef LANGUAGE_NL_H #ifndef LANGUAGE_NL_H
#define LANGUAGE_NL_H #define LANGUAGE_NL_H
#define MAPPER_NON
// Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h
//#define SIMULATE_ROMFONT
#define DISPLAY_CHARSET_ISO10646_1
#define WELCOME_MSG MACHINE_NAME " gereed." #define WELCOME_MSG MACHINE_NAME " gereed."
#define MSG_SD_INSERTED "Kaart ingestoken" #define MSG_SD_INSERTED "Kaart ingestoken"
#define MSG_SD_REMOVED "Kaart verwijderd" #define MSG_SD_REMOVED "Kaart verwijderd"
@ -46,9 +51,9 @@
#define MSG_FAN_SPEED "Fan snelheid" #define MSG_FAN_SPEED "Fan snelheid"
#define MSG_FLOW "Flow" #define MSG_FLOW "Flow"
#define MSG_CONTROL "Control" #define MSG_CONTROL "Control"
#define MSG_MIN " \002 Min" #define MSG_MIN LCD_STR_THERMOMETER " Min"
#define MSG_MAX " \002 Max" #define MSG_MAX LCD_STR_THERMOMETER " Max"
#define MSG_FACTOR " \002 Fact" #define MSG_FACTOR LCD_STR_THERMOMETER " Fact"
#define MSG_AUTOTEMP "Autotemp" #define MSG_AUTOTEMP "Autotemp"
#define MSG_ON "Aan " #define MSG_ON "Aan "
#define MSG_OFF "Uit" #define MSG_OFF "Uit"
@ -118,6 +123,8 @@
#define MSG_BABYSTEP_Y "Babystap Y" #define MSG_BABYSTEP_Y "Babystap Y"
#define MSG_BABYSTEP_Z "Babystap Z" #define MSG_BABYSTEP_Z "Babystap Z"
#define MSG_ENDSTOP_ABORT "Endstop afbr." #define MSG_ENDSTOP_ABORT "Endstop afbr."
#define MSG_END_HOUR "hours"
#define MSG_END_MINUTE "minutes"
#ifdef DELTA_CALIBRATION_MENU #ifdef DELTA_CALIBRATION_MENU
#define MSG_DELTA_CALIBRATE "Delta Calibration" #define MSG_DELTA_CALIBRATE "Delta Calibration"

@ -2,12 +2,17 @@
* Polish * Polish
* *
* LCD Menu Messages * LCD Menu Messages
* Please note these are limited to 17 characters! * See also documentation/LCDLanguageFont.md
* *
*/ */
#ifndef LANGUAGE_PL_H #ifndef LANGUAGE_PL_H
#define LANGUAGE_PL_H #define LANGUAGE_PL_H
#define MAPPER_NON
// Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h
//#define SIMULATE_ROMFONT
#define DISPLAY_CHARSET_ISO10646_1
#define WELCOME_MSG MACHINE_NAME " gotowy." #define WELCOME_MSG MACHINE_NAME " gotowy."
#define MSG_SD_INSERTED "Karta wlozona" #define MSG_SD_INSERTED "Karta wlozona"
#define MSG_SD_REMOVED "Karta usunieta" #define MSG_SD_REMOVED "Karta usunieta"
@ -46,9 +51,9 @@
#define MSG_FAN_SPEED "Obroty wiatraka" #define MSG_FAN_SPEED "Obroty wiatraka"
#define MSG_FLOW "Przeplyw" #define MSG_FLOW "Przeplyw"
#define MSG_CONTROL "Ustawienia" #define MSG_CONTROL "Ustawienia"
#define MSG_MIN " \002 Min" #define MSG_MIN LCD_STR_THERMOMETER " Min"
#define MSG_MAX " \002 Max" #define MSG_MAX LCD_STR_THERMOMETER " Max"
#define MSG_FACTOR " \002 Mnoznik" #define MSG_FACTOR LCD_STR_THERMOMETER " Mnoznik"
#define MSG_AUTOTEMP "Auto. temperatura" #define MSG_AUTOTEMP "Auto. temperatura"
#define MSG_ON "Wl. " #define MSG_ON "Wl. "
#define MSG_OFF "Wyl." #define MSG_OFF "Wyl."
@ -84,7 +89,7 @@
#define MSG_STORE_EPROM "Zapisz w pamieci" #define MSG_STORE_EPROM "Zapisz w pamieci"
#define MSG_LOAD_EPROM "Wczytaj z pamieci" #define MSG_LOAD_EPROM "Wczytaj z pamieci"
#define MSG_RESTORE_FAILSAFE "Ustaw. fabryczne" #define MSG_RESTORE_FAILSAFE "Ustaw. fabryczne"
#define MSG_REFRESH "\004Odswiez" #define MSG_REFRESH LCD_STR_REFRESH " Odswiez"
#define MSG_WATCH "Ekran glowny" #define MSG_WATCH "Ekran glowny"
#define MSG_PREPARE "Przygotuj" #define MSG_PREPARE "Przygotuj"
#define MSG_TUNE "Strojenie" #define MSG_TUNE "Strojenie"
@ -118,6 +123,9 @@
#define MSG_BABYSTEP_Y "Babystep Y" #define MSG_BABYSTEP_Y "Babystep Y"
#define MSG_BABYSTEP_Z "Babystep Z" #define MSG_BABYSTEP_Z "Babystep Z"
#define MSG_ENDSTOP_ABORT "Blad wyl. kranc." #define MSG_ENDSTOP_ABORT "Blad wyl. kranc."
#define MSG_END_HOUR "hours"
#define MSG_END_MINUTE "minutes"
#ifdef DELTA_CALIBRATION_MENU #ifdef DELTA_CALIBRATION_MENU
#define MSG_DELTA_CALIBRATE "Delta Calibration" #define MSG_DELTA_CALIBRATE "Delta Calibration"

@ -2,16 +2,21 @@
* Portuguese (Brazil) * Portuguese (Brazil)
* *
* LCD Menu Messages * LCD Menu Messages
* Please note these are limited to 17 characters! * See also documentation/LCDLanguageFont.md
* *
*/ */
#ifndef LANGUAGE_PT_BR_H #ifndef LANGUAGE_PT_BR_H
#define LANGUAGE_PT_BR_H #define LANGUAGE_PT_BR_H
#define MAPPER_NON
// Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h
//#define SIMULATE_ROMFONT
#define DISPLAY_CHARSET_ISO10646_1
#define WELCOME_MSG MACHINE_NAME " pronto." #define WELCOME_MSG MACHINE_NAME " pronto."
#define MSG_SD_INSERTED "Cartao inserido" #define MSG_SD_INSERTED "Cartao inserido"
#define MSG_SD_REMOVED "Cartao removido" #define MSG_SD_REMOVED "Cartao removido"
#define MSG_MAIN " Menu principal \003" #define MSG_MAIN " Menu principal"
#define MSG_AUTOSTART "Autostart" #define MSG_AUTOSTART "Autostart"
#define MSG_DISABLE_STEPPERS " Apagar motores" #define MSG_DISABLE_STEPPERS " Apagar motores"
#define MSG_AUTO_HOME "Ir para origen" #define MSG_AUTO_HOME "Ir para origen"
@ -20,19 +25,19 @@
#define MSG_PREHEAT_PLA "Pre-aquecer PLA" #define MSG_PREHEAT_PLA "Pre-aquecer PLA"
#define MSG_PREHEAT_PLA_N "Pre-aquecer PLA " #define MSG_PREHEAT_PLA_N "Pre-aquecer PLA "
#define MSG_PREHEAT_PLA_ALL "Pre-aq. PLA Tudo" #define MSG_PREHEAT_PLA_ALL "Pre-aq. PLA Tudo"
#define MSG_PREHEAT_PLA_BEDONLY "Pre-aq. PLA \002Base" #define MSG_PREHEAT_PLA_BEDONLY "Pre-aq. PLA " LCD_STR_THERMOMETER "Base"
#define MSG_PREHEAT_PLA_SETTINGS "PLA setting" #define MSG_PREHEAT_PLA_SETTINGS "PLA setting"
#define MSG_PREHEAT_ABS "Pre-aquecer ABS" #define MSG_PREHEAT_ABS "Pre-aquecer ABS"
#define MSG_PREHEAT_ABS_N "Pre-aquecer ABS " #define MSG_PREHEAT_ABS_N "Pre-aquecer ABS "
#define MSG_PREHEAT_ABS_ALL "Pre-aq. ABS Tudo" #define MSG_PREHEAT_ABS_ALL "Pre-aq. ABS Tudo"
#define MSG_PREHEAT_ABS_BEDONLY "Pre-aq. ABS \002Base" #define MSG_PREHEAT_ABS_BEDONLY "Pre-aq. ABS " LCD_STR_THERMOMETER "Base"
#define MSG_PREHEAT_ABS_SETTINGS "ABS setting" #define MSG_PREHEAT_ABS_SETTINGS "ABS setting"
#define MSG_COOLDOWN "Esfriar" #define MSG_COOLDOWN "Esfriar"
#define MSG_SWITCH_PS_ON "Switch Power On" #define MSG_SWITCH_PS_ON "Switch Power On"
#define MSG_SWITCH_PS_OFF "Switch Power Off" #define MSG_SWITCH_PS_OFF "Switch Power Off"
#define MSG_EXTRUDE "Extrudar" #define MSG_EXTRUDE "Extrudar"
#define MSG_RETRACT "Retrair" #define MSG_RETRACT "Retrair"
#define MSG_MOVE_AXIS "Mover eixo \x7E" #define MSG_MOVE_AXIS "Mover eixo"
#define MSG_MOVE_X "Move X" #define MSG_MOVE_X "Move X"
#define MSG_MOVE_Y "Move Y" #define MSG_MOVE_Y "Move Y"
#define MSG_MOVE_Z "Move Z" #define MSG_MOVE_Z "Move Z"
@ -41,14 +46,14 @@
#define MSG_MOVE_1MM "Move 1mm" #define MSG_MOVE_1MM "Move 1mm"
#define MSG_MOVE_10MM "Move 10mm" #define MSG_MOVE_10MM "Move 10mm"
#define MSG_SPEED "Velocidade" #define MSG_SPEED "Velocidade"
#define MSG_NOZZLE "\002Nozzle" #define MSG_NOZZLE LCD_STR_THERMOMETER " Nozzle"
#define MSG_BED "\002Base" #define MSG_BED LCD_STR_THERMOMETER " Base"
#define MSG_FAN_SPEED "Velocidade vento." #define MSG_FAN_SPEED "Velocidade vento."
#define MSG_FLOW "Fluxo" #define MSG_FLOW "Fluxo"
#define MSG_CONTROL "Controle \003" #define MSG_CONTROL "Controle"
#define MSG_MIN "\002 Min" #define MSG_MIN LCD_STR_THERMOMETER " Min"
#define MSG_MAX "\002 Max" #define MSG_MAX LCD_STR_THERMOMETER " Max"
#define MSG_FACTOR "\002 Fact" #define MSG_FACTOR LCD_STR_THERMOMETER " Fact"
#define MSG_AUTOTEMP "Autotemp" #define MSG_AUTOTEMP "Autotemp"
#define MSG_ON "On " #define MSG_ON "On "
#define MSG_OFF "Off" #define MSG_OFF "Off"
@ -84,10 +89,10 @@
#define MSG_STORE_EPROM "Guardar memoria" #define MSG_STORE_EPROM "Guardar memoria"
#define MSG_LOAD_EPROM "Carregar memoria" #define MSG_LOAD_EPROM "Carregar memoria"
#define MSG_RESTORE_FAILSAFE "Rest. de emergen." #define MSG_RESTORE_FAILSAFE "Rest. de emergen."
#define MSG_REFRESH "\004Recarregar" #define MSG_REFRESH LCD_STR_REFRESH " Recarregar"
#define MSG_WATCH "Monitorar \003" #define MSG_WATCH "Monitorar"
#define MSG_PREPARE "Preparar \x7E" #define MSG_PREPARE "Preparar"
#define MSG_TUNE "Tune \x7E" #define MSG_TUNE "Tune"
#define MSG_PAUSE_PRINT "Pausar impressao" #define MSG_PAUSE_PRINT "Pausar impressao"
#define MSG_RESUME_PRINT "Resumir impressao" #define MSG_RESUME_PRINT "Resumir impressao"
#define MSG_STOP_PRINT "Parar impressao" #define MSG_STOP_PRINT "Parar impressao"
@ -118,6 +123,8 @@
#define MSG_BABYSTEP_Y "Babystep Y" #define MSG_BABYSTEP_Y "Babystep Y"
#define MSG_BABYSTEP_Z "Babystep Z" #define MSG_BABYSTEP_Z "Babystep Z"
#define MSG_ENDSTOP_ABORT "Endstop abort" #define MSG_ENDSTOP_ABORT "Endstop abort"
#define MSG_END_HOUR "horas"
#define MSG_END_MINUTE "minutos"
#ifdef DELTA_CALIBRATION_MENU #ifdef DELTA_CALIBRATION_MENU
#define MSG_DELTA_CALIBRATE "Delta Calibration" #define MSG_DELTA_CALIBRATE "Delta Calibration"

@ -2,16 +2,21 @@
* Portuguese * Portuguese
* *
* LCD Menu Messages * LCD Menu Messages
* Please note these are limited to 17 characters! * See also documentation/LCDLanguageFont.md
* *
*/ */
#ifndef LANGUAGE_PT_H #ifndef LANGUAGE_PT_H
#define LANGUAGE_PT_H #define LANGUAGE_PT_H
#define MAPPER_NON
// Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h
//#define SIMULATE_ROMFONT
#define DISPLAY_CHARSET_ISO10646_1
#define WELCOME_MSG MACHINE_NAME " pronto." #define WELCOME_MSG MACHINE_NAME " pronto."
#define MSG_SD_INSERTED "Cartao inserido" #define MSG_SD_INSERTED "Cartao inserido"
#define MSG_SD_REMOVED "Cartao removido" #define MSG_SD_REMOVED "Cartao removido"
#define MSG_MAIN " Menu principal \003" #define MSG_MAIN " Menu principal"
#define MSG_AUTOSTART "Autostart" #define MSG_AUTOSTART "Autostart"
#define MSG_DISABLE_STEPPERS " Desligar motores" #define MSG_DISABLE_STEPPERS " Desligar motores"
#define MSG_AUTO_HOME "Ir para home" #define MSG_AUTO_HOME "Ir para home"
@ -20,19 +25,19 @@
#define MSG_PREHEAT_PLA "Pre-aquecer PLA" #define MSG_PREHEAT_PLA "Pre-aquecer PLA"
#define MSG_PREHEAT_PLA_N "Pre-aquecer PLA " #define MSG_PREHEAT_PLA_N "Pre-aquecer PLA "
#define MSG_PREHEAT_PLA_ALL "Pre-aq. PLA Tudo" #define MSG_PREHEAT_PLA_ALL "Pre-aq. PLA Tudo"
#define MSG_PREHEAT_PLA_BEDONLY "Pre-aq. PLA \002Base" #define MSG_PREHEAT_PLA_BEDONLY "Pre-aq. PLA " LCD_STR_THERMOMETER "Base"
#define MSG_PREHEAT_PLA_SETTINGS "PLA definicoes" #define MSG_PREHEAT_PLA_SETTINGS "PLA definicoes"
#define MSG_PREHEAT_ABS "Pre-aquecer ABS" #define MSG_PREHEAT_ABS "Pre-aquecer ABS"
#define MSG_PREHEAT_ABS_N "Pre-aquecer ABS " #define MSG_PREHEAT_ABS_N "Pre-aquecer ABS "
#define MSG_PREHEAT_ABS_ALL "Pre-aq. ABS Tudo" #define MSG_PREHEAT_ABS_ALL "Pre-aq. ABS Tudo"
#define MSG_PREHEAT_ABS_BEDONLY "Pre-aq. ABS \002Base" #define MSG_PREHEAT_ABS_BEDONLY "Pre-aq. ABS " LCD_STR_THERMOMETER "Base"
#define MSG_PREHEAT_ABS_SETTINGS "ABS definicoes" #define MSG_PREHEAT_ABS_SETTINGS "ABS definicoes"
#define MSG_COOLDOWN "Arrefecer" #define MSG_COOLDOWN "Arrefecer"
#define MSG_SWITCH_PS_ON "Ligar" #define MSG_SWITCH_PS_ON "Ligar"
#define MSG_SWITCH_PS_OFF "Desligar" #define MSG_SWITCH_PS_OFF "Desligar"
#define MSG_EXTRUDE "Extrudir" #define MSG_EXTRUDE "Extrudir"
#define MSG_RETRACT "Retrair" #define MSG_RETRACT "Retrair"
#define MSG_MOVE_AXIS "Mover eixo \x7E" #define MSG_MOVE_AXIS "Mover eixo"
#define MSG_MOVE_X "Mover X" #define MSG_MOVE_X "Mover X"
#define MSG_MOVE_Y "Mover Y" #define MSG_MOVE_Y "Mover Y"
#define MSG_MOVE_Z "Mover Z" #define MSG_MOVE_Z "Mover Z"
@ -41,14 +46,14 @@
#define MSG_MOVE_1MM "Mover 1mm" #define MSG_MOVE_1MM "Mover 1mm"
#define MSG_MOVE_10MM "Mover 10mm" #define MSG_MOVE_10MM "Mover 10mm"
#define MSG_SPEED "Velocidade" #define MSG_SPEED "Velocidade"
#define MSG_NOZZLE "\002Bico" #define MSG_NOZZLE LCD_STR_THERMOMETER "Bico"
#define MSG_BED "\002Base" #define MSG_BED LCD_STR_THERMOMETER "Base"
#define MSG_FAN_SPEED "Velocidade do ar." #define MSG_FAN_SPEED "Velocidade do ar."
#define MSG_FLOW "Fluxo" #define MSG_FLOW "Fluxo"
#define MSG_CONTROL "Controlo \003" #define MSG_CONTROL "Controlo"
#define MSG_MIN "\002 Min" #define MSG_MIN LCD_STR_THERMOMETER " Min"
#define MSG_MAX "\002 Max" #define MSG_MAX LCD_STR_THERMOMETER " Max"
#define MSG_FACTOR "\002 Fact" #define MSG_FACTOR LCD_STR_THERMOMETER " Fact"
#define MSG_AUTOTEMP "Autotemp" #define MSG_AUTOTEMP "Autotemp"
#define MSG_ON "On " #define MSG_ON "On "
#define MSG_OFF "Off" #define MSG_OFF "Off"
@ -84,10 +89,10 @@
#define MSG_STORE_EPROM "Guardar na memoria" #define MSG_STORE_EPROM "Guardar na memoria"
#define MSG_LOAD_EPROM "Carregar da memoria" #define MSG_LOAD_EPROM "Carregar da memoria"
#define MSG_RESTORE_FAILSAFE "Rest. de emergen." #define MSG_RESTORE_FAILSAFE "Rest. de emergen."
#define MSG_REFRESH "\004Recarregar" #define MSG_REFRESH LCD_STR_REFRESH " Recarregar"
#define MSG_WATCH "Monitorar \003" #define MSG_WATCH "Monitorar"
#define MSG_PREPARE "Preparar \x7E" #define MSG_PREPARE "Preparar"
#define MSG_TUNE "Afinar \x7E" #define MSG_TUNE "Afinar"
#define MSG_PAUSE_PRINT "Pausar impressao" #define MSG_PAUSE_PRINT "Pausar impressao"
#define MSG_RESUME_PRINT "Resumir impressao" #define MSG_RESUME_PRINT "Resumir impressao"
#define MSG_STOP_PRINT "Parar impressao" #define MSG_STOP_PRINT "Parar impressao"
@ -118,6 +123,8 @@
#define MSG_BABYSTEP_Y "Babystep Y" #define MSG_BABYSTEP_Y "Babystep Y"
#define MSG_BABYSTEP_Z "Babystep Z" #define MSG_BABYSTEP_Z "Babystep Z"
#define MSG_ENDSTOP_ABORT "Endstop abort." #define MSG_ENDSTOP_ABORT "Endstop abort."
#define MSG_END_HOUR "horas"
#define MSG_END_MINUTE "minutos"
#ifdef DELTA_CALIBRATION_MENU #ifdef DELTA_CALIBRATION_MENU
#define MSG_DELTA_CALIBRATE "Delta Calibracao" #define MSG_DELTA_CALIBRATE "Delta Calibracao"

@ -1,14 +1,17 @@
/** /**
* Russian * Russian
* *
* LCD Menu Messages * LCD Menu Messages
* Please note these are limited to 17 characters! * See also documentation/LCDLanguageFont.md
* *
*/ */
#ifndef LANGUAGE_RU_H #ifndef LANGUAGE_RU_H
#define LANGUAGE_RU_H #define LANGUAGE_RU_H
#define LANGUAGE_RU #define MAPPER_D0D1 // For Cyrillic
// Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h
//#define SIMULATE_ROMFONT
#define DISPLAY_CHARSET_ISO10646_5
#define WELCOME_MSG MACHINE_NAME " Готов." #define WELCOME_MSG MACHINE_NAME " Готов."
#define MSG_SD_INSERTED "Карта вставлена" #define MSG_SD_INSERTED "Карта вставлена"
@ -42,6 +45,7 @@
#define MSG_MOVE_01MM "Move 0.1mm" #define MSG_MOVE_01MM "Move 0.1mm"
#define MSG_MOVE_1MM "Move 1mm" #define MSG_MOVE_1MM "Move 1mm"
#define MSG_MOVE_10MM "Move 10mm" #define MSG_MOVE_10MM "Move 10mm"
#define MSG_LEVEL_BED "Настр. уровня кровати"
#define MSG_SPEED "Скорость" #define MSG_SPEED "Скорость"
#define MSG_NOZZLE LCD_STR_THERMOMETER " Фильера" #define MSG_NOZZLE LCD_STR_THERMOMETER " Фильера"
#define MSG_BED LCD_STR_THERMOMETER " Кровать" #define MSG_BED LCD_STR_THERMOMETER " Кровать"
@ -120,6 +124,8 @@
#define MSG_BABYSTEP_Y "Babystep Y" #define MSG_BABYSTEP_Y "Babystep Y"
#define MSG_BABYSTEP_Z "Babystep Z" #define MSG_BABYSTEP_Z "Babystep Z"
#define MSG_ENDSTOP_ABORT "Endstop abort" #define MSG_ENDSTOP_ABORT "Endstop abort"
#define MSG_END_HOUR "hours"
#define MSG_END_MINUTE "minutes"
#ifdef DELTA_CALIBRATION_MENU #ifdef DELTA_CALIBRATION_MENU
#define MSG_DELTA_CALIBRATE "Delta Calibration" #define MSG_DELTA_CALIBRATE "Delta Calibration"

@ -0,0 +1,215 @@
/**
* TEST
*
* LCD Menu Messages
* See also documentation/LCDLanguageFont.md
*
*/
#ifndef LANGUAGE_TEST_H
#define LANGUAGE_TEST_H
// Select ONE of the following Mappers.
// They decide what to do with a symbol in the area of [0x80:0xFF]. They take a symbol of this language file and make them point
// into an array with 128 cells, where they'll find the place of the symbol of the font in use.
//
// a.)For ASCII coded Language_xx.h files like (en) there are no occurrences of symbols above 0x7F so no mapper is needed.
// If such a symbol appears it is mapped directly into the font. This is the case for the language files we used until now, with all the STR_XX or
// "\xxx" symbols. All Symbols are only one byte long.
// b.) For Unicoded Language_xx.h files (currently ru, de and kana_utf8 ) the non ASCII [0x00-0x7F] symbols are represented by more then one byte.
// In the case of two bytes the first is pointing to a 'codepage' and the second to a place in the codepage. These codepages contain 64 symbols.
// So two of them can be mapped. For most of the European languages the necessary symbols are contained in the pages C2 and C3. Cyrillic uses D0
// and D1.
// c.) For katakana (one of the Japanese symbol sets) Unicode uses 3 bytes. Here the second byte also points to a codepage and byte 3 to the symbol.
// I hope the pages E282 and E283 are sufficient to write katakana.
// Kanji (an other Japanese symbol set) uses far more than two codepages. So currently I don't see a chance to map the Unicodes. Its not
// impossible to have a close to direct mapping but will need giant conversion tables and fonts (we don't want to have in a embedded system).
#define MAPPER_NON // For direct asci codes ( until now all languages except ru, de, fi, kana_utf8, ... )
//#define MAPPER_C2C3 // For most European languages when language file is in utf8
//#define MAPPER_D0D1 // For Cyrillic
//#define MAPPER_E382E383 // For Katakana
// Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h
//#define SIMULATE_ROMFONT
// Select the better font for full graphic displays.
//#define DISPLAY_CHARSET_ISO10646_1
//#define DISPLAY_CHARSET_ISO10646_5
//#define DISPLAY_CHARSET_ISO10646_KANA
// next 5 lines select variants in this file only
#define DISPLAYTEST
//#define WEST
//#define CYRIL
//#define KANA
// TESTSTRINGS
#define STRG_ASCII_2 " !\"#$%&'()*+,-./"
#define STRG_ASCII_3 "0123456789:;<=>?"
#define STRG_ASCII_4 "@ABCDEFGHIJKLMNO"
#define STRG_ASCII_5 "PQRSTUVWXYZ[\]^_"
#define STRG_ASCII_6 "`abcdefghijklmno"
#define STRG_ASCII_7 "pqrstuvwxyz{|}~"
#define STRG_C2_8 ""
#define STRG_C2_9 ""
#define STRG_C2_a " ¡¢£¤¥¦§¨©ª«¬­®¯"
#define STRG_C2_b "°±²³´µ¶·¸¹º»¼½¾¿"
#define STRG_C3_8 "ÈÁÂÃÄÅÆÇÈÉÊËÌÍÎÏ"
#define STRG_C3_9 "ÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞß"
#define STRG_C3_a "àáâãäåæçèéêëìíîï"
#define STRG_C3_b "ðñòóôõö÷øùúûüýþÿ"
#define STRG_D0_8 "ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏ"
#define STRG_D0_9 "АБВГДЕЖЗИЙКЛМНОП"
#define STRG_D0_a "РСТУФХЦЧШЩЪЫЬЭЮЯ"
#define STRG_D0_b "абвгдежзийклмноп"
#define STRG_D1_8 "рстуфхцчшщъыьэюя"
#define STRG_D1_9 "ѐёђѓєѕіїјљњћќѝўџ"
#define STRG_D1_a "ѠѡѢѣѤѥѦѧѨѩѪѫѬѭѮѯ"
#define STRG_D1_b "ѰѱѲѳѴѵѶѷѸѹѺѻѼѽѾѿ"
#define STRG_E382_8 "よめもゃやゅゆょよらりるれろゎわ"
#define STRG_E382_9 "ゐゑをんゔゕゖ゗゘゙゚゛ ゜ゝゞゟ"
#define STRG_E382_a "゠ァアィイゥウェエォオカガキギク"
#define STRG_E382_b "グケゲコゴサザシジスズセゼソゾタ"
#define STRG_E383_8 "トチヂッツヅテデトドナニヌネノハ"
#define STRG_E383_9 "バパヒビピフブプヘベペホボポマミ"
#define STRG_E383_a "ムメモャヤュユョヨラリルレロヮワ"
#define STRG_E383_b "ヰヱヲンヴヵヶヷヸヹヺ・ーヽヾヿ"
#define STRG_OKTAL_0 "\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017"
#define STRG_OKTAL_1 "\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
#define STRG_OKTAL_2 "\040\041\042\043\044\045\046\047\050\051\052\053\054\055\056\057"
#define STRG_OKTAL_3 "\060\061\062\063\064\065\066\067\070\071\072\073\074\075\076\077"
#define STRG_OKTAL_4 "\100\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117"
#define STRG_OKTAL_5 "\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137"
#define STRG_OKTAL_6 "\140\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157"
#define STRG_OKTAL_7 "\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176\177"
#define STRG_OKTAL_8 "\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217"
#define STRG_OKTAL_9 "\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237"
#define STRG_OKTAL_a "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257"
#define STRG_OKTAL_b "\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277"
#define STRG_OKTAL_c "\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317"
#define STRG_OKTAL_d "\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337"
#define STRG_OKTAL_e "\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357"
#define STRG_OKTAL_f "\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377"
#ifdef DISPLAYTEST
#define WELCOME_MSG "Language TEST"
#define MSG_WATCH "Display test"
#define MSG_PREPARE STRG_OKTAL_b
#define MSG_CONTROL STRG_OKTAL_c
#endif
#ifdef WEST
#define WELCOME_MSG "Language TEST"
#define MSG_WATCH "\001\002\003\004\005\006\007\010\011"
#define MSG_PREPARE "UTF8"
#define MSG_CONTROL "ASCII"
//#define MSG_MAIN ".."
#define MSG_DISABLE_STEPPERS STRG_C2_8
#define MSG_AUTO_HOME STRG_C2_9
#define MSG_SET_HOME_OFFSETS STRG_C2_a
#define MSG_PREHEAT_PLA STRG_C2_b
#define MSG_PREHEAT_ABS STRG_C3_8
#define MSG_COOLDOWN STRG_C3_9
#define MSG_SWITCH_PS_OFF STRG_C3_a
#define MSG_MOVE_AXIS STRG_C3_b
#define MSG_MAIN STRG_OKTAL_2
#define MSG_TEMPERATURE STRG_OKTAL_3
#define MSG_MOTION STRG_OKTAL_4
#define MSG_VOLUMETRIC STRG_OKTAL_5
#define MSG_CONTRAST STRG_OKTAL_6
#define MSG_RESTORE_FAILSAFE STRG_OKTAL_7
#define MSG_NOZZLE STRG_OKTAL_8
#define MSG_FAN_SPEED STRG_OKTAL_9
#define MSG_AUTOTEMP STRG_OKTAL_a
#define MSG_MIN STRG_OKTAL_b
#define MSG_MAX STRG_OKTAL_c
#define MSG_FACTOR STRG_OKTAL_d
#define MSG_PID_P STRG_OKTAL_e
#define MSG_PID_I STRG_OKTAL_f
#endif
#ifdef CYRIL
#define WELCOME_MSG "Language TEST"
#define MSG_WATCH "\001\002\003\004\005\006\007\010\011"
#define MSG_PREPARE "UTF8"
#define MSG_CONTROL "ASCII"
//#define MSG_MAIN ".."
#define MSG_DISABLE_STEPPERS STRG_D0_8
#define MSG_AUTO_HOME STRG_D0_9
#define MSG_SET_HOME_OFFSETS STRG_D0_a
#define MSG_PREHEAT_PLA STRG_D0_b
#define MSG_PREHEAT_ABS STRG_D1_8
#define MSG_COOLDOWN STRG_D1_9
#define MSG_SWITCH_PS_OFF STRG_D1_a
#define MSG_MOVE_AXIS STRG_D1_b
#define MSG_MAIN STRG_OKTAL_2
#define MSG_TEMPERATURE STRG_OKTAL_3
#define MSG_MOTION STRG_OKTAL_4
#define MSG_VOLUMETRIC STRG_OKTAL_5
#define MSG_CONTRAST STRG_OKTAL_6
#define MSG_RESTORE_FAILSAFE STRG_OKTAL_7
#define MSG_NOZZLE STRG_OKTAL_8
#define MSG_FAN_SPEED STRG_OKTAL_9
#define MSG_AUTOTEMP STRG_OKTAL_a
#define MSG_MIN STRG_OKTAL_b
#define MSG_MAX STRG_OKTAL_c
#define MSG_FACTOR STRG_OKTAL_d
#define MSG_PID_P STRG_OKTAL_e
#define MSG_PID_I STRG_OKTAL_f
#endif
#if defined( KANA )
#define WELCOME_MSG "Language TEST"
#define MSG_WATCH "\001\002\003\004\005\006\007\010\011"
#define MSG_PREPARE "UTF8"
#define MSG_CONTROL "ASCII"
//#define MSG_MAIN ".."
#define MSG_DISABLE_STEPPERS STRG_E382_8
#define MSG_AUTO_HOME STRG_E382_9
#define MSG_SET_HOME_OFFSETS STRG_E382_a
#define MSG_PREHEAT_PLA STRG_E382_b
#define MSG_PREHEAT_ABS STRG_E383_8
#define MSG_COOLDOWN STRG_E383_9
#define MSG_SWITCH_PS_OFF STRG_E383_a
#define MSG_MOVE_AXIS STRG_E383_b
#define MSG_MAIN STRG_OKTAL_2
#define MSG_TEMPERATURE STRG_OKTAL_3
#define MSG_MOTION STRG_OKTAL_4
#define MSG_VOLUMETRIC STRG_OKTAL_5
#define MSG_CONTRAST STRG_OKTAL_6
#define MSG_RESTORE_FAILSAFE STRG_OKTAL_7
#define MSG_NOZZLE STRG_OKTAL_8
#define MSG_FAN_SPEED STRG_OKTAL_9
#define MSG_AUTOTEMP STRG_OKTAL_a
#define MSG_MIN STRG_OKTAL_b
#define MSG_MAX STRG_OKTAL_c
#define MSG_FACTOR STRG_OKTAL_d
#define MSG_PID_P STRG_OKTAL_e
#define MSG_PID_I STRG_OKTAL_f
#endif
#endif // LANGUAGE_TEST_H

@ -1,20 +1,16 @@
#include "mesh_bed_leveling.h" #include "mesh_bed_leveling.h"
#if defined(MESH_BED_LEVELING) #ifdef MESH_BED_LEVELING
mesh_bed_leveling mbl; mesh_bed_leveling mbl;
mesh_bed_leveling::mesh_bed_leveling() { mesh_bed_leveling::mesh_bed_leveling() { reset(); }
reset();
}
void mesh_bed_leveling::reset() { void mesh_bed_leveling::reset() {
for (int y=0; y<MESH_NUM_Y_POINTS; y++) { active = 0;
for (int x=0; x<MESH_NUM_X_POINTS; x++) { for (int y = 0; y < MESH_NUM_Y_POINTS; y++)
for (int x = 0; x < MESH_NUM_X_POINTS; x++)
z_values[y][x] = 0; z_values[y][x] = 0;
} }
}
active = 0;
}
#endif // MESH_BED_LEVELING #endif // MESH_BED_LEVELING

@ -1,12 +1,12 @@
#include "Marlin.h" #include "Marlin.h"
#if defined(MESH_BED_LEVELING) #ifdef MESH_BED_LEVELING
#define MESH_X_DIST ((MESH_MAX_X - MESH_MIN_X)/(MESH_NUM_X_POINTS - 1)) #define MESH_X_DIST ((MESH_MAX_X - MESH_MIN_X)/(MESH_NUM_X_POINTS - 1))
#define MESH_Y_DIST ((MESH_MAX_Y - MESH_MIN_Y)/(MESH_NUM_Y_POINTS - 1)) #define MESH_Y_DIST ((MESH_MAX_Y - MESH_MIN_Y)/(MESH_NUM_Y_POINTS - 1))
class mesh_bed_leveling { class mesh_bed_leveling {
public: public:
uint8_t active; uint8_t active;
float z_values[MESH_NUM_Y_POINTS][MESH_NUM_X_POINTS]; float z_values[MESH_NUM_Y_POINTS][MESH_NUM_X_POINTS];
@ -14,24 +14,20 @@ public:
void reset(); void reset();
float get_x(int i) { return MESH_MIN_X + MESH_X_DIST*i; } float get_x(int i) { return MESH_MIN_X + MESH_X_DIST * i; }
float get_y(int i) { return MESH_MIN_Y + MESH_Y_DIST*i; } float get_y(int i) { return MESH_MIN_Y + MESH_Y_DIST * i; }
void set_z(int ix, int iy, float z) { z_values[iy][ix] = z; } void set_z(int ix, int iy, float z) { z_values[iy][ix] = z; }
int select_x_index(float x) { int select_x_index(float x) {
int i = 1; int i = 1;
while (x > get_x(i) && i < MESH_NUM_X_POINTS-1) { while (x > get_x(i) && i < MESH_NUM_X_POINTS-1) i++;
i++; return i - 1;
}
return i-1;
} }
int select_y_index(float y) { int select_y_index(float y) {
int i = 1; int i = 1;
while (y > get_y(i) && i < MESH_NUM_Y_POINTS-1) { while (y > get_y(i) && i < MESH_NUM_Y_POINTS - 1) i++;
i++; return i - 1;
}
return i-1;
} }
float calc_z0(float a0, float a1, float z1, float a2, float z2) { float calc_z0(float a0, float a1, float z1, float a2, float z2) {
@ -54,8 +50,8 @@ public:
get_y(y_index+1), z2); get_y(y_index+1), z2);
return z0; return z0;
} }
}; };
extern mesh_bed_leveling mbl; extern mesh_bed_leveling mbl;
#endif // MESH_BED_LEVELING #endif // MESH_BED_LEVELING

@ -127,10 +127,13 @@
#define _E3_PINS #define _E3_PINS
#if EXTRUDERS > 1 #if EXTRUDERS > 1
#undef _E1_PINS
#define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN, HEATER_1_PIN, analogInputToDigitalPin(TEMP_1_PIN), #define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN, HEATER_1_PIN, analogInputToDigitalPin(TEMP_1_PIN),
#if EXTRUDERS > 2 #if EXTRUDERS > 2
#undef _E2_PINS
#define _E2_PINS E2_STEP_PIN, E2_DIR_PIN, E2_ENABLE_PIN, HEATER_2_PIN, analogInputToDigitalPin(TEMP_2_PIN), #define _E2_PINS E2_STEP_PIN, E2_DIR_PIN, E2_ENABLE_PIN, HEATER_2_PIN, analogInputToDigitalPin(TEMP_2_PIN),
#if EXTRUDERS > 3 #if EXTRUDERS > 3
#undef _E3_PINS
#define _E3_PINS E3_STEP_PIN, E3_DIR_PIN, E3_ENABLE_PIN, HEATER_3_PIN, analogInputToDigitalPin(TEMP_3_PIN), #define _E3_PINS E3_STEP_PIN, E3_DIR_PIN, E3_ENABLE_PIN, HEATER_3_PIN, analogInputToDigitalPin(TEMP_3_PIN),
#endif #endif
#endif #endif
@ -167,17 +170,27 @@
#endif #endif
#ifdef DISABLE_MAX_ENDSTOPS #ifdef DISABLE_MAX_ENDSTOPS
#undef X_MAX_PIN
#undef Y_MAX_PIN
#undef Z_MAX_PIN
#define X_MAX_PIN -1 #define X_MAX_PIN -1
#define Y_MAX_PIN -1 #define Y_MAX_PIN -1
#define Z_MAX_PIN -1 #define Z_MAX_PIN -1
#endif #endif
#ifdef DISABLE_MIN_ENDSTOPS #ifdef DISABLE_MIN_ENDSTOPS
#undef X_MIN_PIN
#undef Y_MIN_PIN
#undef Z_MIN_PIN
#define X_MIN_PIN -1 #define X_MIN_PIN -1
#define Y_MIN_PIN -1 #define Y_MIN_PIN -1
#define Z_MIN_PIN -1 #define Z_MIN_PIN -1
#endif #endif
#if defined(DISABLE_Z_PROBE_ENDSTOP) || !defined(Z_PROBE_ENDSTOP) // Allow code to compile regardless of Z_PROBE_ENDSTOP setting.
#define Z_PROBE_PIN -1
#endif
#ifdef DISABLE_XMAX_ENDSTOP #ifdef DISABLE_XMAX_ENDSTOP
#undef X_MAX_PIN #undef X_MAX_PIN
#define X_MAX_PIN -1 #define X_MAX_PIN -1
@ -207,8 +220,11 @@
#define Z_MIN_PIN -1 #define Z_MIN_PIN -1
#endif #endif
#define SENSITIVE_PINS { 0, 1, X_STEP_PIN, X_DIR_PIN, X_ENABLE_PIN, X_MIN_PIN, X_MAX_PIN, Y_STEP_PIN, Y_DIR_PIN, Y_ENABLE_PIN, Y_MIN_PIN, Y_MAX_PIN, Z_STEP_PIN, Z_DIR_PIN, Z_ENABLE_PIN, Z_MIN_PIN, Z_MAX_PIN, PS_ON_PIN, \ #define SENSITIVE_PINS { 0, 1, \
HEATER_BED_PIN, FAN_PIN, \ X_STEP_PIN, X_DIR_PIN, X_ENABLE_PIN, X_MIN_PIN, X_MAX_PIN, \
Y_STEP_PIN, Y_DIR_PIN, Y_ENABLE_PIN, Y_MIN_PIN, Y_MAX_PIN, \
Z_STEP_PIN, Z_DIR_PIN, Z_ENABLE_PIN, Z_MIN_PIN, Z_MAX_PIN, Z_PROBE_PIN, \
PS_ON_PIN, HEATER_BED_PIN, FAN_PIN, \
_E0_PINS _E1_PINS _E2_PINS _E3_PINS \ _E0_PINS _E1_PINS _E2_PINS _E3_PINS \
analogInputToDigitalPin(TEMP_BED_PIN) \ analogInputToDigitalPin(TEMP_BED_PIN) \
} }

@ -4,18 +4,25 @@
#include "pins_RAMPS_13.h" #include "pins_RAMPS_13.h"
#undef Z_ENABLE_PIN
#define Z_ENABLE_PIN 63 #define Z_ENABLE_PIN 63
#undef X_MAX_PIN
#undef Y_MAX_PIN
#undef Z_MAX_PIN
#define X_MAX_PIN 2 #define X_MAX_PIN 2
#define Y_MAX_PIN 15 #define Y_MAX_PIN 15
#define Z_MAX_PIN -1 #define Z_MAX_PIN -1
#undef SDSS
#define SDSS 25//53 #define SDSS 25//53
#define BEEPER 33 #undef FAN_PIN
#define FAN_PIN 8 #define FAN_PIN 8
#undef HEATER_1_PIN
#undef HEATER_2_PIN
#undef HEATER_BED_PIN
#define HEATER_0_PIN 10 #define HEATER_0_PIN 10
#define HEATER_1_PIN 12 #define HEATER_1_PIN 12
#define HEATER_2_PIN 6 #define HEATER_2_PIN 6
@ -23,8 +30,15 @@
#define HEATER_BED_PIN 9 // BED #define HEATER_BED_PIN 9 // BED
#if defined(ULTRA_LCD) && defined(NEWPANEL) #if defined(ULTRA_LCD) && defined(NEWPANEL)
#undef BEEPER
#define BEEPER -1 #define BEEPER -1
#undef LCD_PINS_RS
#undef LCD_PINS_ENABLE
#undef LCD_PINS_D4
#undef LCD_PINS_D5
#undef LCD_PINS_D6
#undef LCD_PINS_D7
#define LCD_PINS_RS 27 #define LCD_PINS_RS 27
#define LCD_PINS_ENABLE 29 #define LCD_PINS_ENABLE 29
#define LCD_PINS_D4 37 #define LCD_PINS_D4 37
@ -33,7 +47,15 @@
#define LCD_PINS_D7 31 #define LCD_PINS_D7 31
// Buttons // Buttons
#undef BTN_EN1
#undef BTN_EN2
#undef BTN_ENC
#define BTN_EN1 16 #define BTN_EN1 16
#define BTN_EN2 17 #define BTN_EN2 17
#define BTN_ENC 23 //the click #define BTN_ENC 23 //the click
#else
#define BEEPER 33
#endif // ULTRA_LCD && NEWPANEL #endif // ULTRA_LCD && NEWPANEL

@ -64,6 +64,15 @@
// Microstepping pins // Microstepping pins
// Note that the pin mapping is not from fastio.h // Note that the pin mapping is not from fastio.h
// See Sd2PinMap.h for the pin configurations // See Sd2PinMap.h for the pin configurations
#undef X_MS1_PIN
#undef X_MS2_PIN
#undef Y_MS1_PIN
#undef Y_MS2_PIN
#undef Z_MS1_PIN
#undef Z_MS2_PIN
#undef E0_MS1_PIN
#undef E0_MS2_PIN
#define X_MS1_PIN 25 #define X_MS1_PIN 25
#define X_MS2_PIN 26 #define X_MS2_PIN 26
#define Y_MS1_PIN 9 #define Y_MS1_PIN 9

@ -7,7 +7,30 @@
#define FAN_PIN 9 // (Sprinter config) #define FAN_PIN 9 // (Sprinter config)
#define HEATER_1_PIN -1 #define HEATER_1_PIN -1
#ifdef TEMP_STAT_LEDS //LCD Pins//
#if defined(VIKI2) || defined(miniVIKI)
#define BEEPER 33
// Pins for DOGM SPI LCD Support
#define DOGLCD_A0 31
#define DOGLCD_CS 32
#define LCD_SCREEN_ROT_180
//The encoder and click button
#define BTN_EN1 22
#define BTN_EN2 7
#define BTN_ENC 12 //the click switch
#define SDSS 53
#define SDCARDDETECT -1 // Pin 49 if using display sd interface
#ifdef TEMP_STAT_LEDS
#define STAT_LED_RED 64
#define STAT_LED_BLUE 63
#endif
#endif
#elif define TEMP_STAT_LEDS
#define STAT_LED_RED 6 #define STAT_LED_RED 6
#define STAT_LED_BLUE 11 #define STAT_LED_BLUE 11
#endif #endif

@ -4,9 +4,42 @@
#include "pins_RAMPS_13.h" #include "pins_RAMPS_13.h"
#define FAN_PIN 9 // (Sprinter config) #undef FAN_PIN
#define FAN_PIN 6 //Part Cooling System
#define BEEPER 33 #define BEEPER 33
#define CONTROLLERFAN_PIN 4 //Pin used for the fan to cool motherboard (-1 to disable)
//Fans/Water Pump to cool the hotend cool side.
#define EXTRUDER_0_AUTO_FAN_PIN 5
#define EXTRUDER_1_AUTO_FAN_PIN 5
#define EXTRUDER_2_AUTO_FAN_PIN 5
#define EXTRUDER_3_AUTO_FAN_PIN 5
//
//This section is to swap the MIN and MAX pins because the X3 Pro comes with only
//MIN endstops soldered onto the board. Delta code wants the homing endstops to be
//the MAX so I swapped them here.
//
#ifdef DELTA
#undef X_MIN_PIN
#undef X_MAX_PIN
#undef Y_MIN_PIN
#undef Y_MAX_PIN
#undef Z_MIN_PIN
#undef Z_MAX_PIN
#define X_MIN_PIN 2
#define X_MAX_PIN 3
#define Y_MIN_PIN 15
#define Y_MAX_PIN 14
#define Z_MIN_PIN 19
#define Z_MAX_PIN 18
#endif
//
#ifdef Z_PROBE_ENDSTOP
//#undef Z_MIN_PIN
//#define Z_MIN_PIN 15
#define Z_PROBE_PIN 19
#endif
//
#define E2_STEP_PIN 23 #define E2_STEP_PIN 23
#define E2_DIR_PIN 25 #define E2_DIR_PIN 25
#define E2_ENABLE_PIN 40 #define E2_ENABLE_PIN 40
@ -19,7 +52,10 @@
#define E4_DIR_PIN 37 #define E4_DIR_PIN 37
#define E4_ENABLE_PIN 42 #define E4_ENABLE_PIN 42
#define HEATER_1_PIN -1 #undef HEATER_1_PIN
#undef HEATER_2_PIN
#undef HEATER_3_PIN
#define HEATER_1_PIN 9
#define HEATER_2_PIN 16 #define HEATER_2_PIN 16
#define HEATER_3_PIN 17 #define HEATER_3_PIN 17
#define HEATER_4_PIN 4 #define HEATER_4_PIN 4
@ -27,8 +63,58 @@
#define HEATER_6_PIN 6 #define HEATER_6_PIN 6
#define HEATER_7_PIN 11 #define HEATER_7_PIN 11
#undef TEMP_2_PIN
#undef TEMP_3_PIN
#define TEMP_2_PIN 12 // ANALOG NUMBERING #define TEMP_2_PIN 12 // ANALOG NUMBERING
#define TEMP_3_PIN 11 // ANALOG NUMBERING #define TEMP_3_PIN 11 // ANALOG NUMBERING
#define TEMP_4_PIN 10 // ANALOG NUMBERING #define TEMP_4_PIN 10 // ANALOG NUMBERING
#define TC1 4 // ANALOG NUMBERING Thermo couple on Azteeg X3Pro #define TC1 4 // ANALOG NUMBERING Thermo couple on Azteeg X3Pro
#define TC2 5 // ANALOG NUMBERING Thermo couple on Azteeg X3Pro #define TC2 5 // ANALOG NUMBERING Thermo couple on Azteeg X3Pro
//
//These Servo pins are for when they are defined. Tested for usage with bed leveling
//on a Delta with 1 servo. Running through the Z servo endstop in code.
//Physical wire attachment was done on EXT1 on the GND, 5V, and D47 pins.
//
#undef SERVO0_PIN
#undef SERVO1_PIN
#undef SERVO2_PIN
#undef SERVO3_PIN
#ifdef NUM_SERVOS
#define SERVO0_PIN 47
#if NUM_SERVOS > 1
#define SERVO1_PIN -1
#if NUM_SERVOS > 2
#define SERVO2_PIN -1
#if NUM_SERVOS > 3
#define SERVO3_PIN -1
#endif
#endif
#endif
#endif
//LCD Pins//
#if defined(VIKI2) || defined(miniVIKI)
#define BEEPER 33
// Pins for DOGM SPI LCD Support
#define DOGLCD_A0 44
#define DOGLCD_CS 45
#define LCD_SCREEN_ROT_180
//The encoder and click button
#define BTN_EN1 22
#define BTN_EN2 7
#define BTN_ENC 39 //the click switch
#define SDSS 53
#define SDCARDDETECT 49
#define KILL_PIN 31
#endif
#ifdef TEMP_STAT_LEDS
#define STAT_LED_RED 32
#define STAT_LED_BLUE 35
#endif

@ -4,8 +4,13 @@
#include "pins_RAMPS_13.h" #include "pins_RAMPS_13.h"
#undef FAN_PIN
#define FAN_PIN 9 // (Sprinter config) #define FAN_PIN 9 // (Sprinter config)
#undef HEATER_1_PIN
#define HEATER_1_PIN -1 #define HEATER_1_PIN -1
#undef TEMP_0_PIN
#undef TEMP_1_PIN
#define TEMP_0_PIN 9 // ANALOG NUMBERING #define TEMP_0_PIN 9 // ANALOG NUMBERING
#define TEMP_1_PIN 11 // ANALOG NUMBERING #define TEMP_1_PIN 11 // ANALOG NUMBERING

@ -4,13 +4,23 @@
#include "pins_RAMPS_13.h" #include "pins_RAMPS_13.h"
#undef X_MAX_PIN
#undef Y_MAX_PIN
#undef Z_MAX_PIN
#define X_MAX_PIN -1 #define X_MAX_PIN -1
#define Y_MAX_PIN -1 #define Y_MAX_PIN -1
#define Z_MAX_PIN -1 #define Z_MAX_PIN -1
#undef Y2_STEP_PIN
#undef Y2_DIR_PIN
#undef Y2_ENABLE_PIN
#define Y2_STEP_PIN -1 #define Y2_STEP_PIN -1
#define Y2_DIR_PIN -1 #define Y2_DIR_PIN -1
#define Y2_ENABLE_PIN -1 #define Y2_ENABLE_PIN -1
#undef Z2_STEP_PIN
#undef Z2_DIR_PIN
#undef Z2_ENABLE_PIN
#define Z2_STEP_PIN -1 #define Z2_STEP_PIN -1
#define Z2_DIR_PIN -1 #define Z2_DIR_PIN -1
#define Z2_ENABLE_PIN -1 #define Z2_ENABLE_PIN -1
@ -19,11 +29,14 @@
#define E1_DIR_PIN 34 #define E1_DIR_PIN 34
#define E1_ENABLE_PIN 30 #define E1_ENABLE_PIN 30
#undef SDPOWER
#define SDPOWER 1 #define SDPOWER 1
#undef FAN_PIN
#define FAN_PIN 9 // (Sprinter config) #define FAN_PIN 9 // (Sprinter config)
#define PS_ON_PIN 12 #define PS_ON_PIN 12
#undef HEATER_1_PIN
#define HEATER_1_PIN 7 // EXTRUDER 2 #define HEATER_1_PIN 7 // EXTRUDER 2
#if defined(ULTRA_LCD) && defined(NEWPANEL) #if defined(ULTRA_LCD) && defined(NEWPANEL)

@ -4,5 +4,8 @@
#include "pins_RAMPS_13.h" #include "pins_RAMPS_13.h"
#undef FAN_PIN
#define FAN_PIN 9 // (Sprinter config) #define FAN_PIN 9 // (Sprinter config)
#undef HEATER_1_PIN
#define HEATER_1_PIN -1 #define HEATER_1_PIN -1

@ -59,6 +59,8 @@
#define TEMP_1_PIN -1 #define TEMP_1_PIN -1
#define TEMP_2_PIN -1 #define TEMP_2_PIN -1
////LCD Pin Setup////
#define SDPOWER -1 #define SDPOWER -1
#define SDSS 8 #define SDSS 8
#define LED_PIN -1 #define LED_PIN -1
@ -86,3 +88,24 @@
//not connected to a pin //not connected to a pin
#define SDCARDDETECT -1 #define SDCARDDETECT -1
#endif // ULTRA_LCD && NEWPANEL #endif // ULTRA_LCD && NEWPANEL
#if defined(VIKI2) || defined(miniVIKI)
#define BEEPER 32 //FastIO
// Pins for DOGM SPI LCD Support
#define DOGLCD_A0 42 //Non-FastIO
#define DOGLCD_CS 43 //Non-FastIO
#define LCD_SCREEN_ROT_180
//The encoder and click button (FastIO Pins)
#define BTN_EN1 26
#define BTN_EN2 27
#define BTN_ENC 47 //the click switch
#define SDSS 45
#define SDCARDDETECT -1 // FastIO (Manual says 72 I'm not certain cause I can't test)
#ifdef TEMP_STAT_LEDS
#define STAT_LED_RED 12 //Non-FastIO
#define STAT_LED_BLUE 10 //Non-FastIO
#endif
#endif

@ -22,6 +22,17 @@
#endif #endif
#endif #endif
#undef X_MS1_PIN
#undef X_MS2_PIN
#undef Y_MS1_PIN
#undef Y_MS2_PIN
#undef Z_MS1_PIN
#undef Z_MS2_PIN
#undef E0_MS1_PIN
#undef E0_MS2_PIN
#undef E1_MS1_PIN
#undef E1_MS2_PIN
#define X_STEP_PIN 37 #define X_STEP_PIN 37
#define X_DIR_PIN 48 #define X_DIR_PIN 48
#define X_MIN_PIN 12 #define X_MIN_PIN 12
@ -75,6 +86,7 @@
#define E1_MS1_PIN 63 #define E1_MS1_PIN 63
#define E1_MS2_PIN 64 #define E1_MS2_PIN 64
#undef DIGIPOTSS_PIN
#define DIGIPOTSS_PIN 38 #define DIGIPOTSS_PIN 38
#define DIGIPOT_CHANNELS {4,5,3,0,1} // X Y Z E0 E1 digipot channels to stepper driver mapping #define DIGIPOT_CHANNELS {4,5,3,0,1} // X Y Z E0 E1 digipot channels to stepper driver mapping
@ -148,6 +160,26 @@
#endif // ULTRA_LCD #endif // ULTRA_LCD
#if defined(VIKI2) || defined(miniVIKI)
#define BEEPER 44
// Pins for DOGM SPI LCD Support
#define DOGLCD_A0 70
#define DOGLCD_CS 71
#define LCD_SCREEN_ROT_180
//The encoder and click button
#define BTN_EN1 85
#define BTN_EN2 84
#define BTN_ENC 83 //the click switch
#define SDCARDDETECT -1 // Pin 72 if using easy adapter board
#ifdef TEMP_STAT_LEDS
#define STAT_LED_RED 22
#define STAT_LED_BLUE 32
#endif
#endif // VIKI2/miniVIKI
#ifdef FILAMENT_SENSOR #ifdef FILAMENT_SENSOR
//Filip added pin for Filament sensor analog input //Filip added pin for Filament sensor analog input
#define FILWIDTH_PIN 3 #define FILWIDTH_PIN 3

@ -34,11 +34,16 @@
#define Z_ENABLE_PIN 62 #define Z_ENABLE_PIN 62
#define Z_MIN_PIN 18 #define Z_MIN_PIN 18
#define Z_MAX_PIN 19 #define Z_MAX_PIN 19
#define Z_PROBE_PIN -1
#define Y2_STEP_PIN 36 #define Y2_STEP_PIN 36
#define Y2_DIR_PIN 34 #define Y2_DIR_PIN 34
#define Y2_ENABLE_PIN 30 #define Y2_ENABLE_PIN 30
#undef Z2_STEP_PIN
#undef Z2_DIR_PIN
#undef Z2_ENABLE_PIN
#define Z2_STEP_PIN 36 #define Z2_STEP_PIN 36
#define Z2_DIR_PIN 34 #define Z2_DIR_PIN 34
#define Z2_ENABLE_PIN 30 #define Z2_ENABLE_PIN 30
@ -61,7 +66,12 @@
#define FILWIDTH_PIN 5 #define FILWIDTH_PIN 5
#endif #endif
#if defined(FILAMENT_RUNOUT_SENSOR) #ifdef Z_PROBE_ENDSTOP
// Define a pin to use as the signal pin on Arduino for the Z_PROBE endstop.
#define Z_PROBE_PIN 32
#endif
#ifdef FILAMENT_RUNOUT_SENSOR
// define digital pin 4 for the filament runout sensor. Use the RAMPS 1.4 digital input 4 on the servos connector // define digital pin 4 for the filament runout sensor. Use the RAMPS 1.4 digital input 4 on the servos connector
#define FILRUNOUT_PIN 4 #define FILRUNOUT_PIN 4
#endif #endif

@ -4,5 +4,8 @@
#include "pins_RAMPS_13.h" #include "pins_RAMPS_13.h"
#undef FAN_PIN
#define FAN_PIN 9 // (Sprinter config) #define FAN_PIN 9 // (Sprinter config)
#undef HEATER_1_PIN
#define HEATER_1_PIN -1 #define HEATER_1_PIN -1

@ -58,16 +58,16 @@
#include "ultralcd.h" #include "ultralcd.h"
#include "language.h" #include "language.h"
#if defined(MESH_BED_LEVELING) #ifdef MESH_BED_LEVELING
#include "mesh_bed_leveling.h" #include "mesh_bed_leveling.h"
#endif // MESH_BED_LEVELING #endif
//=========================================================================== //===========================================================================
//============================= public variables ============================ //============================= public variables ============================
//=========================================================================== //===========================================================================
unsigned long minsegmenttime; millis_t minsegmenttime;
float max_feedrate[NUM_AXIS]; // set the max speeds float max_feedrate[NUM_AXIS]; // Max speeds in mm per minute
float axis_steps_per_unit[NUM_AXIS]; float axis_steps_per_unit[NUM_AXIS];
unsigned long max_acceleration_units_per_sq_second[NUM_AXIS]; // Use M201 to override by software unsigned long max_acceleration_units_per_sq_second[NUM_AXIS]; // Use M201 to override by software
float minimumfeedrate; float minimumfeedrate;
@ -87,7 +87,7 @@ unsigned long axis_steps_per_sqr_second[NUM_AXIS];
0.0, 1.0, 0.0, 0.0, 1.0, 0.0,
0.0, 0.0, 1.0 0.0, 0.0, 1.0
}; };
#endif // #ifdef ENABLE_AUTO_BED_LEVELING #endif // ENABLE_AUTO_BED_LEVELING
// The current position of the tool in absolute steps // The current position of the tool in absolute steps
long position[NUM_AXIS]; //rescaled from extern when axis_steps_per_unit are changed by gcode long position[NUM_AXIS]; //rescaled from extern when axis_steps_per_unit are changed by gcode
@ -113,9 +113,6 @@ volatile unsigned char block_buffer_tail; // Index of the block to pro
//=========================================================================== //===========================================================================
//=============================private variables ============================ //=============================private variables ============================
//=========================================================================== //===========================================================================
#ifdef PREVENT_DANGEROUS_EXTRUDE
float extrude_min_temp = EXTRUDE_MINTEMP;
#endif
#ifdef XY_FREQUENCY_LIMIT #ifdef XY_FREQUENCY_LIMIT
// Used for the frequency limit // Used for the frequency limit
#define MAX_FREQ_TIME (1000000.0/XY_FREQUENCY_LIMIT) #define MAX_FREQ_TIME (1000000.0/XY_FREQUENCY_LIMIT)
@ -162,8 +159,8 @@ void calculate_trapezoid_for_block(block_t *block, float entry_factor, float exi
unsigned long final_rate = ceil(block->nominal_rate * exit_factor); // (step/min) unsigned long final_rate = ceil(block->nominal_rate * exit_factor); // (step/min)
// Limit minimal step rate (Otherwise the timer will overflow.) // Limit minimal step rate (Otherwise the timer will overflow.)
if (initial_rate < 120) initial_rate = 120; NOLESS(initial_rate, 120);
if (final_rate < 120) final_rate = 120; NOLESS(final_rate, 120);
long acceleration = block->acceleration_st; long acceleration = block->acceleration_st;
int32_t accelerate_steps = ceil(estimate_acceleration_distance(initial_rate, block->nominal_rate, acceleration)); int32_t accelerate_steps = ceil(estimate_acceleration_distance(initial_rate, block->nominal_rate, acceleration));
@ -342,7 +339,7 @@ void planner_recalculate_trapezoids() {
// b. No speed reduction within one block requires faster deceleration than the one, true constant // b. No speed reduction within one block requires faster deceleration than the one, true constant
// acceleration. // acceleration.
// 2. Go over every block in chronological order and dial down junction speed reduction values if // 2. Go over every block in chronological order and dial down junction speed reduction values if
// a. The speed increase within one block would require faster accelleration than the one, true // a. The speed increase within one block would require faster acceleration than the one, true
// constant acceleration. // constant acceleration.
// //
// When these stages are complete all blocks have an entry_factor that will allow all speed changes to // When these stages are complete all blocks have an entry_factor that will allow all speed changes to
@ -385,16 +382,18 @@ void plan_init() {
} }
float t = autotemp_min + high * autotemp_factor; float t = autotemp_min + high * autotemp_factor;
if (t < autotemp_min) t = autotemp_min; t = constrain(t, autotemp_min, autotemp_max);
if (t > autotemp_max) t = autotemp_max; if (oldt > t) {
if (oldt > t) t = AUTOTEMP_OLDWEIGHT * oldt + (1 - AUTOTEMP_OLDWEIGHT) * t; t *= (1 - AUTOTEMP_OLDWEIGHT);
t += AUTOTEMP_OLDWEIGHT * oldt;
}
oldt = t; oldt = t;
setTargetHotend0(t); setTargetHotend0(t);
} }
#endif #endif
void check_axes_activity() { void check_axes_activity() {
unsigned char axis_active[NUM_AXIS], unsigned char axis_active[NUM_AXIS] = { 0 },
tail_fan_speed = fanSpeed; tail_fan_speed = fanSpeed;
#ifdef BARICUDA #ifdef BARICUDA
unsigned char tail_valve_pressure = ValvePressure, unsigned char tail_valve_pressure = ValvePressure,
@ -427,9 +426,9 @@ void check_axes_activity() {
disable_e3(); disable_e3();
} }
#if defined(FAN_PIN) && FAN_PIN > -1 // HAS_FAN #if HAS_FAN
#ifdef FAN_KICKSTART_TIME #ifdef FAN_KICKSTART_TIME
static unsigned long fan_kick_end; static millis_t fan_kick_end;
if (tail_fan_speed) { if (tail_fan_speed) {
if (fan_kick_end == 0) { if (fan_kick_end == 0) {
// Just starting up fan - run at full power. // Just starting up fan - run at full power.
@ -447,17 +446,17 @@ void check_axes_activity() {
#else #else
analogWrite(FAN_PIN, tail_fan_speed); analogWrite(FAN_PIN, tail_fan_speed);
#endif //!FAN_SOFT_PWM #endif //!FAN_SOFT_PWM
#endif //FAN_PIN > -1 #endif // HAS_FAN
#ifdef AUTOTEMP #ifdef AUTOTEMP
getHighESpeed(); getHighESpeed();
#endif #endif
#ifdef BARICUDA #ifdef BARICUDA
#if defined(HEATER_1_PIN) && HEATER_1_PIN > -1 // HAS_HEATER_1 #if HAS_HEATER_1
analogWrite(HEATER_1_PIN,tail_valve_pressure); analogWrite(HEATER_1_PIN,tail_valve_pressure);
#endif #endif
#if defined(HEATER_2_PIN) && HEATER_2_PIN > -1 // HAS_HEATER_2 #if HAS_HEATER_2
analogWrite(HEATER_2_PIN,tail_e_to_p_pressure); analogWrite(HEATER_2_PIN,tail_e_to_p_pressure);
#endif #endif
#endif #endif
@ -472,7 +471,7 @@ float junction_deviation = 0.1;
void plan_buffer_line(float x, float y, float z, const float &e, float feed_rate, const uint8_t &extruder) void plan_buffer_line(float x, float y, float z, const float &e, float feed_rate, const uint8_t &extruder)
#else #else
void plan_buffer_line(const float &x, const float &y, const float &z, const float &e, float feed_rate, const uint8_t &extruder) void plan_buffer_line(const float &x, const float &y, const float &z, const float &e, float feed_rate, const uint8_t &extruder)
#endif //ENABLE_AUTO_BED_LEVELING #endif // ENABLE_AUTO_BED_LEVELING
{ {
// Calculate the buffer head after we push this byte // Calculate the buffer head after we push this byte
int next_buffer_head = next_block_index(block_buffer_head); int next_buffer_head = next_block_index(block_buffer_head);
@ -487,9 +486,7 @@ float junction_deviation = 0.1;
#ifdef MESH_BED_LEVELING #ifdef MESH_BED_LEVELING
if (mbl.active) z += mbl.get_z(x, y); if (mbl.active) z += mbl.get_z(x, y);
#endif #elif defined(ENABLE_AUTO_BED_LEVELING)
#ifdef ENABLE_AUTO_BED_LEVELING
apply_rotation_xyz(plan_bed_level_matrix, x, y, z); apply_rotation_xyz(plan_bed_level_matrix, x, y, z);
#endif #endif
@ -509,14 +506,16 @@ float junction_deviation = 0.1;
#ifdef PREVENT_DANGEROUS_EXTRUDE #ifdef PREVENT_DANGEROUS_EXTRUDE
if (de) { if (de) {
if (degHotend(active_extruder) < extrude_min_temp) { if (degHotend(extruder) < extrude_min_temp) {
position[E_AXIS] = target[E_AXIS]; //behave as if the move really took place, but ignore E part position[E_AXIS] = target[E_AXIS]; // Behave as if the move really took place, but ignore E part
de = 0; // no difference
SERIAL_ECHO_START; SERIAL_ECHO_START;
SERIAL_ECHOLNPGM(MSG_ERR_COLD_EXTRUDE_STOP); SERIAL_ECHOLNPGM(MSG_ERR_COLD_EXTRUDE_STOP);
} }
#ifdef PREVENT_LENGTHY_EXTRUDE #ifdef PREVENT_LENGTHY_EXTRUDE
if (labs(de) > axis_steps_per_unit[E_AXIS] * EXTRUDE_MAXLENGTH) { if (labs(de) > axis_steps_per_unit[E_AXIS] * EXTRUDE_MAXLENGTH) {
position[E_AXIS] = target[E_AXIS]; // Behave as if the move really took place, but ignore E part position[E_AXIS] = target[E_AXIS]; // Behave as if the move really took place, but ignore E part
de = 0; // no difference
SERIAL_ECHO_START; SERIAL_ECHO_START;
SERIAL_ECHOLNPGM(MSG_ERR_LONG_EXTRUDE_STOP); SERIAL_ECHOLNPGM(MSG_ERR_LONG_EXTRUDE_STOP);
} }
@ -544,8 +543,8 @@ float junction_deviation = 0.1;
block->steps[Z_AXIS] = labs(dz); block->steps[Z_AXIS] = labs(dz);
block->steps[E_AXIS] = labs(de); block->steps[E_AXIS] = labs(de);
block->steps[E_AXIS] *= volumetric_multiplier[active_extruder]; block->steps[E_AXIS] *= volumetric_multiplier[extruder];
block->steps[E_AXIS] *= extrudemultiply; block->steps[E_AXIS] *= extruder_multiply[extruder];
block->steps[E_AXIS] /= 100; block->steps[E_AXIS] /= 100;
block->step_event_count = max(block->steps[X_AXIS], max(block->steps[Y_AXIS], max(block->steps[Z_AXIS], block->steps[E_AXIS]))); block->step_event_count = max(block->steps[X_AXIS], max(block->steps[Y_AXIS], max(block->steps[Z_AXIS], block->steps[E_AXIS])));
@ -614,7 +613,7 @@ float junction_deviation = 0.1;
#if EXTRUDERS > 1 #if EXTRUDERS > 1
case 1: case 1:
enable_e1(); enable_e1();
g_uc_extruder_last_move[1] = BLOCK_BUFFER_SIZE*2; g_uc_extruder_last_move[1] = BLOCK_BUFFER_SIZE * 2;
if (g_uc_extruder_last_move[0] == 0) disable_e0(); if (g_uc_extruder_last_move[0] == 0) disable_e0();
#if EXTRUDERS > 2 #if EXTRUDERS > 2
if (g_uc_extruder_last_move[2] == 0) disable_e2(); if (g_uc_extruder_last_move[2] == 0) disable_e2();
@ -626,7 +625,7 @@ float junction_deviation = 0.1;
#if EXTRUDERS > 2 #if EXTRUDERS > 2
case 2: case 2:
enable_e2(); enable_e2();
g_uc_extruder_last_move[2] = BLOCK_BUFFER_SIZE*2; g_uc_extruder_last_move[2] = BLOCK_BUFFER_SIZE * 2;
if (g_uc_extruder_last_move[0] == 0) disable_e0(); if (g_uc_extruder_last_move[0] == 0) disable_e0();
if (g_uc_extruder_last_move[1] == 0) disable_e1(); if (g_uc_extruder_last_move[1] == 0) disable_e1();
#if EXTRUDERS > 3 #if EXTRUDERS > 3
@ -636,7 +635,7 @@ float junction_deviation = 0.1;
#if EXTRUDERS > 3 #if EXTRUDERS > 3
case 3: case 3:
enable_e3(); enable_e3();
g_uc_extruder_last_move[3] = BLOCK_BUFFER_SIZE*2; g_uc_extruder_last_move[3] = BLOCK_BUFFER_SIZE * 2;
if (g_uc_extruder_last_move[0] == 0) disable_e0(); if (g_uc_extruder_last_move[0] == 0) disable_e0();
if (g_uc_extruder_last_move[1] == 0) disable_e1(); if (g_uc_extruder_last_move[1] == 0) disable_e1();
if (g_uc_extruder_last_move[2] == 0) disable_e2(); if (g_uc_extruder_last_move[2] == 0) disable_e2();
@ -654,10 +653,10 @@ float junction_deviation = 0.1;
} }
} }
if (block->steps[E_AXIS]) { if (block->steps[E_AXIS])
if (feed_rate < minimumfeedrate) feed_rate = minimumfeedrate; NOLESS(feed_rate, minimumfeedrate);
} else
else if (feed_rate < mintravelfeedrate) feed_rate = mintravelfeedrate; NOLESS(feed_rate, mintravelfeedrate);
/** /**
* This part of the code calculates the total length of the movement. * This part of the code calculates the total length of the movement.
@ -679,7 +678,7 @@ float junction_deviation = 0.1;
delta_mm[Y_AXIS] = dy / axis_steps_per_unit[Y_AXIS]; delta_mm[Y_AXIS] = dy / axis_steps_per_unit[Y_AXIS];
#endif #endif
delta_mm[Z_AXIS] = dz / axis_steps_per_unit[Z_AXIS]; delta_mm[Z_AXIS] = dz / axis_steps_per_unit[Z_AXIS];
delta_mm[E_AXIS] = (de / axis_steps_per_unit[E_AXIS]) * volumetric_multiplier[active_extruder] * extrudemultiply / 100.0; delta_mm[E_AXIS] = (de / axis_steps_per_unit[E_AXIS]) * volumetric_multiplier[extruder] * extruder_multiply[extruder] / 100.0;
if (block->steps[X_AXIS] <= dropsegments && block->steps[Y_AXIS] <= dropsegments && block->steps[Z_AXIS] <= dropsegments) { if (block->steps[X_AXIS] <= dropsegments && block->steps[Y_AXIS] <= dropsegments && block->steps[Z_AXIS] <= dropsegments) {
block->millimeters = fabs(delta_mm[E_AXIS]); block->millimeters = fabs(delta_mm[E_AXIS]);
@ -701,12 +700,12 @@ float junction_deviation = 0.1;
int moves_queued = movesplanned(); int moves_queued = movesplanned();
// slow down when de buffer starts to empty, rather than wait at the corner for a buffer refill // Slow down when the buffer starts to empty, rather than wait at the corner for a buffer refill
#if defined(OLD_SLOWDOWN) || defined(SLOWDOWN)
bool mq = moves_queued > 1 && moves_queued < BLOCK_BUFFER_SIZE / 2; bool mq = moves_queued > 1 && moves_queued < BLOCK_BUFFER_SIZE / 2;
#ifdef OLD_SLOWDOWN #ifdef OLD_SLOWDOWN
if (mq) feed_rate *= 2.0 * moves_queued / BLOCK_BUFFER_SIZE; if (mq) feed_rate *= 2.0 * moves_queued / BLOCK_BUFFER_SIZE;
#endif #endif
#ifdef SLOWDOWN #ifdef SLOWDOWN
// segment time im micro seconds // segment time im micro seconds
unsigned long segment_time = lround(1000000.0/inverse_second); unsigned long segment_time = lround(1000000.0/inverse_second);
@ -720,7 +719,7 @@ float junction_deviation = 0.1;
} }
} }
#endif #endif
// END OF SLOW DOWN SECTION #endif
block->nominal_speed = block->millimeters * inverse_second; // (mm/sec) Always > 0 block->nominal_speed = block->millimeters * inverse_second; // (mm/sec) Always > 0
block->nominal_rate = ceil(block->step_event_count * inverse_second); // (step/sec) Always > 0 block->nominal_rate = ceil(block->step_event_count * inverse_second); // (step/sec) Always > 0
@ -977,10 +976,10 @@ float junction_deviation = 0.1;
void plan_set_position(const float &x, const float &y, const float &z, const float &e) void plan_set_position(const float &x, const float &y, const float &z, const float &e)
#endif // ENABLE_AUTO_BED_LEVELING || MESH_BED_LEVELING #endif // ENABLE_AUTO_BED_LEVELING || MESH_BED_LEVELING
{ {
#ifdef ENABLE_AUTO_BED_LEVELING #ifdef MESH_BED_LEVELING
apply_rotation_xyz(plan_bed_level_matrix, x, y, z);
#elif defined(MESH_BED_LEVELING)
if (mbl.active) z += mbl.get_z(x, y); if (mbl.active) z += mbl.get_z(x, y);
#elif defined(ENABLE_AUTO_BED_LEVELING)
apply_rotation_xyz(plan_bed_level_matrix, x, y, z);
#endif #endif
float nx = position[X_AXIS] = lround(x * axis_steps_per_unit[X_AXIS]); float nx = position[X_AXIS] = lround(x * axis_steps_per_unit[X_AXIS]);
@ -998,10 +997,6 @@ void plan_set_e_position(const float &e) {
st_set_e_position(position[E_AXIS]); st_set_e_position(position[E_AXIS]);
} }
#ifdef PREVENT_DANGEROUS_EXTRUDE
void set_extrude_min_temp(float temp) { extrude_min_temp = temp; }
#endif
// Calculate the steps/s^2 acceleration rates, based on the mm/s^s // Calculate the steps/s^2 acceleration rates, based on the mm/s^s
void reset_acceleration_rates() { void reset_acceleration_rates() {
for (int i = 0; i < NUM_AXIS; i++) for (int i = 0; i < NUM_AXIS; i++)

@ -80,26 +80,42 @@ extern volatile unsigned char block_buffer_tail;
FORCE_INLINE uint8_t movesplanned() { return BLOCK_MOD(block_buffer_head - block_buffer_tail + BLOCK_BUFFER_SIZE); } FORCE_INLINE uint8_t movesplanned() { return BLOCK_MOD(block_buffer_head - block_buffer_tail + BLOCK_BUFFER_SIZE); }
#if defined(ENABLE_AUTO_BED_LEVELING) || defined(MESH_BED_LEVELING) #if defined(ENABLE_AUTO_BED_LEVELING) || defined(MESH_BED_LEVELING)
#if defined(ENABLE_AUTO_BED_LEVELING) #if defined(ENABLE_AUTO_BED_LEVELING)
#include "vector_3.h" #include "vector_3.h"
// this holds the required transform to compensate for bed level
// Transform required to compensate for bed level
extern matrix_3x3 plan_bed_level_matrix; extern matrix_3x3 plan_bed_level_matrix;
// Get the position applying the bed level matrix if enabled
/**
* Get the position applying the bed level matrix
*/
vector_3 plan_get_position(); vector_3 plan_get_position();
#endif // ENABLE_AUTO_BED_LEVELING #endif // ENABLE_AUTO_BED_LEVELING
// Add a new linear movement to the buffer. x, y and z is the signed, absolute target position in
// millimeters. Feed rate specifies the speed of the motion. /**
* Add a new linear movement to the buffer. x, y, z are the signed, absolute target position in
* millimeters. Feed rate specifies the (target) speed of the motion.
*/
void plan_buffer_line(float x, float y, float z, const float &e, float feed_rate, const uint8_t &extruder); void plan_buffer_line(float x, float y, float z, const float &e, float feed_rate, const uint8_t &extruder);
// Set position. Used for G92 instructions.
/**
* Set the planner positions. Used for G92 instructions.
* Multiplies by axis_steps_per_unit[] to set stepper positions.
* Clears previous speed values.
*/
void plan_set_position(float x, float y, float z, const float &e); void plan_set_position(float x, float y, float z, const float &e);
#else #else
void plan_buffer_line(const float &x, const float &y, const float &z, const float &e, float feed_rate, const uint8_t &extruder); void plan_buffer_line(const float &x, const float &y, const float &z, const float &e, float feed_rate, const uint8_t &extruder);
void plan_set_position(const float &x, const float &y, const float &z, const float &e); void plan_set_position(const float &x, const float &y, const float &z, const float &e);
#endif // ENABLE_AUTO_BED_LEVELING || MESH_BED_LEVELING #endif // ENABLE_AUTO_BED_LEVELING || MESH_BED_LEVELING
void plan_set_e_position(const float &e); void plan_set_e_position(const float &e);
extern unsigned long minsegmenttime; extern millis_t minsegmenttime;
extern float max_feedrate[NUM_AXIS]; // set the max speeds extern float max_feedrate[NUM_AXIS]; // set the max speeds
extern float axis_steps_per_unit[NUM_AXIS]; extern float axis_steps_per_unit[NUM_AXIS];
extern unsigned long max_acceleration_units_per_sq_second[NUM_AXIS]; // Use M201 to override by software extern unsigned long max_acceleration_units_per_sq_second[NUM_AXIS]; // Use M201 to override by software
@ -145,10 +161,6 @@ FORCE_INLINE block_t *plan_get_current_block() {
return NULL; return NULL;
} }
#ifdef PREVENT_DANGEROUS_EXTRUDE
void set_extrude_min_temp(float temp);
#endif
void reset_acceleration_rates(); void reset_acceleration_rates();
#endif //PLANNER_H #endif // PLANNER_H

@ -607,7 +607,6 @@ double dnrm2 ( int n, double x[], int incx )
double norm; double norm;
double scale; double scale;
double ssq; double ssq;
double value;
if ( n < 1 || incx < 1 ) if ( n < 1 || incx < 1 )
{ {

@ -0,0 +1,186 @@
#!/usr/bin/python3
# This file is for preprocessing gcode and the new G29 Autobedleveling from Marlin
# It will analyse the first 2 Layer and return the maximum size for this part
# After this it will replace with g29_keyword = ';MarlinG29Script' with the new G29 LRFB
# the new file will be created in the same folder.
# your gcode-file/folder
folder = './'
my_file = 'test.gcode'
# this is the minimum of G1 instructions which should be between 2 different heights
min_g1 = 3
# maximum number of lines to parse, I don't want to parse the complete file
# only the first plane is we are interested in
max_g1 = 100000000
# g29 keyword
g29_keyword = 'g29'
g29_keyword = g29_keyword.upper()
# output filename
output_file = folder + 'g29_' + my_file
# input filename
input_file = folder + my_file
# minimum scan size
min_size = 40
probing_points = 3 # points x points
# other stuff
min_x = 500
min_y = min_x
max_x = -500
max_y = max_x
last_z = 0.001
layer = 0
lines_of_g1 = 0
gcode = []
# return only g1-lines
def has_g1(line):
return line[:2].upper() == "G1"
# find position in g1 (x,y,z)
def find_axis(line, axis):
found = False
number = ""
for char in line:
if found:
if char == ".":
number += char
elif char == "-":
number += char
else:
try:
int(char)
number += char
except ValueError:
break
else:
found = char.upper() == axis.upper()
try:
return float(number)
except ValueError:
return None
# save the min or max-values for each axis
def set_mima(line):
global min_x, max_x, min_y, max_y, last_z
current_x = find_axis(line, 'x')
current_y = find_axis(line, 'y')
if current_x is not None:
min_x = min(current_x, min_x)
max_x = max(current_x, max_x)
if current_y is not None:
min_y = min(current_y, min_y)
max_y = max(current_y, max_y)
return min_x, max_x, min_y, max_y
# find z in the code and return it
def find_z(gcode, start_at_line=0):
for i in range(start_at_line, len(gcode)):
my_z = find_axis(gcode[i], 'Z')
if my_z is not None:
return my_z, i
def z_parse(gcode, start_at_line=0, end_at_line=0):
i = start_at_line
all_z = []
line_between_z = []
z_at_line = []
# last_z = 0
last_i = -1
while len(gcode) > i:
try:
z, i = find_z(gcode, i + 1)
except TypeError:
break
all_z.append(z)
z_at_line.append(i)
temp_line = i - last_i -1
line_between_z.append(i - last_i - 1)
# last_z = z
last_i = i
if 0 < end_at_line <= i or temp_line >= min_g1:
# print('break at line {} at heigth {}'.format(i, z))
break
line_between_z = line_between_z[1:]
return all_z, line_between_z, z_at_line
# get the lines which should be the first layer
def get_lines(gcode, minimum):
i = 0
all_z, line_between_z, z_at_line = z_parse(gcode, end_at_line=max_g1)
for count in line_between_z:
i += 1
if count > minimum:
# print('layer: {}:{}'.format(z_at_line[i-1], z_at_line[i]))
return z_at_line[i - 1], z_at_line[i]
with open(input_file, 'r') as file:
lines = 0
for line in file:
lines += 1
if lines > 1000:
break
if has_g1(line):
gcode.append(line)
file.close()
start, end = get_lines(gcode, min_g1)
for i in range(start, end):
set_mima(gcode[i])
print('x_min:{} x_max:{}\ny_min:{} y_max:{}'.format(min_x, max_x, min_y, max_y))
# resize min/max - values for minimum scan
if max_x - min_x < min_size:
offset_x = int((min_size - (max_x - min_x)) / 2 + 0.5) # int round up
# print('min_x! with {}'.format(int(max_x - min_x)))
min_x = int(min_x) - offset_x
max_x = int(max_x) + offset_x
if max_y - min_y < min_size:
offset_y = int((min_size - (max_y - min_y)) / 2 + 0.5) # int round up
# print('min_y! with {}'.format(int(max_y - min_y)))
min_y = int(min_y) - offset_y
max_y = int(max_y) + offset_y
new_command = 'G29 L{0} R{1} F{2} B{3} P{4}\n'.format(min_x,
max_x,
min_y,
max_y,
probing_points)
out_file = open(output_file, 'w')
in_file = open(input_file, 'r')
for line in in_file:
if line[:len(g29_keyword)].upper() == g29_keyword:
out_file.write(new_command)
print('write G29')
else:
out_file.write(line)
file.close()
out_file.close()
print('auto G29 finished')

@ -76,6 +76,7 @@ volatile long endstops_stepsTotal, endstops_stepsDone;
static volatile bool endstop_x_hit = false; static volatile bool endstop_x_hit = false;
static volatile bool endstop_y_hit = false; static volatile bool endstop_y_hit = false;
static volatile bool endstop_z_hit = false; static volatile bool endstop_z_hit = false;
static volatile bool endstop_z_probe_hit = false; // Leaving this in even if Z_PROBE_ENDSTOP isn't defined, keeps code below cleaner. #ifdef it and usage below to save space.
#ifdef ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED #ifdef ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
bool abort_on_endstop_hit = false; bool abort_on_endstop_hit = false;
@ -85,18 +86,30 @@ static volatile bool endstop_z_hit = false;
int motor_current_setting[3] = DEFAULT_PWM_MOTOR_CURRENT; int motor_current_setting[3] = DEFAULT_PWM_MOTOR_CURRENT;
#endif #endif
static bool old_x_min_endstop = false, #if HAS_X_MIN
old_x_max_endstop = false, static bool old_x_min_endstop = false;
old_y_min_endstop = false, #endif
old_y_max_endstop = false, #if HAS_X_MAX
old_z_min_endstop = false, static bool old_x_max_endstop = false;
#ifndef Z_DUAL_ENDSTOPS #endif
old_z_max_endstop = false; #if HAS_Y_MIN
#else static bool old_y_min_endstop = false;
old_z_max_endstop = false, #endif
old_z2_min_endstop = false, #if HAS_Y_MAX
old_z2_max_endstop = false; static bool old_y_max_endstop = false;
#endif #endif
static bool old_z_min_endstop = false;
static bool old_z_max_endstop = false;
#ifdef Z_DUAL_ENDSTOPS
static bool old_z2_min_endstop = false;
static bool old_z2_max_endstop = false;
#endif
#ifdef Z_PROBE_ENDSTOP // No need to check for valid pin, SanityCheck.h already does this.
static bool old_z_probe_endstop = false;
#endif
static bool check_endstops = true; static bool check_endstops = true;
@ -155,7 +168,7 @@ volatile signed char count_direction[NUM_AXIS] = { 1, 1, 1, 1 };
Z2_STEP_WRITE(v); \ Z2_STEP_WRITE(v); \
} }
#else #else
#define Z_APPLY_STEP(v,Q) Z_STEP_WRITE(v), Z2_STEP_WRITE(v) #define Z_APPLY_STEP(v,Q) { Z_STEP_WRITE(v); Z2_STEP_WRITE(v); }
#endif #endif
#else #else
#define Z_APPLY_DIR(v,Q) Z_DIR_WRITE(v) #define Z_APPLY_DIR(v,Q) Z_DIR_WRITE(v)
@ -240,11 +253,11 @@ volatile signed char count_direction[NUM_AXIS] = { 1, 1, 1, 1 };
#define DISABLE_STEPPER_DRIVER_INTERRUPT() TIMSK1 &= ~BIT(OCIE1A) #define DISABLE_STEPPER_DRIVER_INTERRUPT() TIMSK1 &= ~BIT(OCIE1A)
void endstops_hit_on_purpose() { void endstops_hit_on_purpose() {
endstop_x_hit = endstop_y_hit = endstop_z_hit = false; endstop_x_hit = endstop_y_hit = endstop_z_hit = endstop_z_probe_hit = false; // #ifdef endstop_z_probe_hit = to save space if needed.
} }
void checkHitEndstops() { void checkHitEndstops() {
if (endstop_x_hit || endstop_y_hit || endstop_z_hit) { if (endstop_x_hit || endstop_y_hit || endstop_z_hit || endstop_z_probe_hit) { // #ifdef || endstop_z_probe_hit to save space if needed.
SERIAL_ECHO_START; SERIAL_ECHO_START;
SERIAL_ECHOPGM(MSG_ENDSTOPS_HIT); SERIAL_ECHOPGM(MSG_ENDSTOPS_HIT);
if (endstop_x_hit) { if (endstop_x_hit) {
@ -259,6 +272,12 @@ void checkHitEndstops() {
SERIAL_ECHOPAIR(" Z:", (float)endstops_trigsteps[Z_AXIS] / axis_steps_per_unit[Z_AXIS]); SERIAL_ECHOPAIR(" Z:", (float)endstops_trigsteps[Z_AXIS] / axis_steps_per_unit[Z_AXIS]);
LCD_MESSAGEPGM(MSG_ENDSTOPS_HIT "Z"); LCD_MESSAGEPGM(MSG_ENDSTOPS_HIT "Z");
} }
#ifdef Z_PROBE_ENDSTOP
if (endstop_z_probe_hit) {
SERIAL_ECHOPAIR(" Z_PROBE:", (float)endstops_trigsteps[Z_AXIS] / axis_steps_per_unit[Z_AXIS]);
LCD_MESSAGEPGM(MSG_ENDSTOPS_HIT "ZP");
}
#endif
SERIAL_EOL; SERIAL_EOL;
endstops_hit_on_purpose(); endstops_hit_on_purpose();
@ -374,7 +393,9 @@ ISR(TIMER1_COMPA_vect) {
{ {
current_block = NULL; current_block = NULL;
plan_discard_current_block(); plan_discard_current_block();
if ((cleaning_buffer_counter == 1) && (SD_FINISHED_STEPPERRELEASE)) enquecommands_P(PSTR(SD_FINISHED_RELEASECOMMAND)); #ifdef SD_FINISHED_RELEASECOMMAND
if ((cleaning_buffer_counter == 1) && (SD_FINISHED_STEPPERRELEASE)) enqueuecommands_P(PSTR(SD_FINISHED_RELEASECOMMAND));
#endif
cleaning_buffer_counter--; cleaning_buffer_counter--;
OCR1A = 200; OCR1A = 200;
return; return;
@ -445,7 +466,7 @@ ISR(TIMER1_COMPA_vect) {
#ifdef COREXY #ifdef COREXY
// Head direction in -X axis for CoreXY bots. // Head direction in -X axis for CoreXY bots.
// If DeltaX == -DeltaY, the movement is only in Y axis // If DeltaX == -DeltaY, the movement is only in Y axis
if (current_block->steps[A_AXIS] != current_block->steps[B_AXIS] || (TEST(out_bits, A_AXIS) == TEST(out_bits, B_AXIS))) if ((current_block->steps[A_AXIS] != current_block->steps[B_AXIS]) || (TEST(out_bits, A_AXIS) == TEST(out_bits, B_AXIS))) {
if (TEST(out_bits, X_HEAD)) if (TEST(out_bits, X_HEAD))
#else #else
if (TEST(out_bits, X_AXIS)) // stepping along -X axis (regular cartesians bot) if (TEST(out_bits, X_AXIS)) // stepping along -X axis (regular cartesians bot)
@ -456,7 +477,7 @@ ISR(TIMER1_COMPA_vect) {
if ((current_block->active_extruder == 0 && X_HOME_DIR == -1) || (current_block->active_extruder != 0 && X2_HOME_DIR == -1)) if ((current_block->active_extruder == 0 && X_HOME_DIR == -1) || (current_block->active_extruder != 0 && X2_HOME_DIR == -1))
#endif #endif
{ {
#if defined(X_MIN_PIN) && X_MIN_PIN >= 0 #if HAS_X_MIN
UPDATE_ENDSTOP(x, X, min, MIN); UPDATE_ENDSTOP(x, X, min, MIN);
#endif #endif
} }
@ -467,109 +488,162 @@ ISR(TIMER1_COMPA_vect) {
if ((current_block->active_extruder == 0 && X_HOME_DIR == 1) || (current_block->active_extruder != 0 && X2_HOME_DIR == 1)) if ((current_block->active_extruder == 0 && X_HOME_DIR == 1) || (current_block->active_extruder != 0 && X2_HOME_DIR == 1))
#endif #endif
{ {
#if defined(X_MAX_PIN) && X_MAX_PIN >= 0 #if HAS_X_MAX
UPDATE_ENDSTOP(x, X, max, MAX); UPDATE_ENDSTOP(x, X, max, MAX);
#endif #endif
} }
} }
#ifdef COREXY #ifdef COREXY
}
// Head direction in -Y axis for CoreXY bots. // Head direction in -Y axis for CoreXY bots.
// If DeltaX == DeltaY, the movement is only in X axis // If DeltaX == DeltaY, the movement is only in X axis
if (current_block->steps[A_AXIS] != current_block->steps[B_AXIS] || (TEST(out_bits, A_AXIS) != TEST(out_bits, B_AXIS))) if ((current_block->steps[A_AXIS] != current_block->steps[B_AXIS]) || (TEST(out_bits, A_AXIS) != TEST(out_bits, B_AXIS))) {
if (TEST(out_bits, Y_HEAD)) if (TEST(out_bits, Y_HEAD))
#else #else
if (TEST(out_bits, Y_AXIS)) // -direction if (TEST(out_bits, Y_AXIS)) // -direction
#endif #endif
{ // -direction { // -direction
#if defined(Y_MIN_PIN) && Y_MIN_PIN >= 0 #if HAS_Y_MIN
UPDATE_ENDSTOP(y, Y, min, MIN); UPDATE_ENDSTOP(y, Y, min, MIN);
#endif #endif
} }
else { // +direction else { // +direction
#if defined(Y_MAX_PIN) && Y_MAX_PIN >= 0 #if HAS_Y_MAX
UPDATE_ENDSTOP(y, Y, max, MAX); UPDATE_ENDSTOP(y, Y, max, MAX);
#endif #endif
} }
#ifdef COREXY
}
#endif
} }
if (TEST(out_bits, Z_AXIS)) { // -direction if (TEST(out_bits, Z_AXIS)) { // -direction
Z_APPLY_DIR(INVERT_Z_DIR,0); Z_APPLY_DIR(INVERT_Z_DIR,0);
count_direction[Z_AXIS] = -1; count_direction[Z_AXIS] = -1;
if (check_endstops)
{ if (check_endstops) {
#if defined(Z_MIN_PIN) && Z_MIN_PIN > -1
#ifndef Z_DUAL_ENDSTOPS #if HAS_Z_MIN
UPDATE_ENDSTOP(z, Z, min, MIN);
#else #ifdef Z_DUAL_ENDSTOPS
bool z_min_endstop=(READ(Z_MIN_PIN) != Z_MIN_ENDSTOP_INVERTING);
#if defined(Z2_MIN_PIN) && Z2_MIN_PIN > -1 bool z_min_endstop = READ(Z_MIN_PIN) != Z_MIN_ENDSTOP_INVERTING,
bool z2_min_endstop=(READ(Z2_MIN_PIN) != Z2_MIN_ENDSTOP_INVERTING); z2_min_endstop =
#if HAS_Z2_MIN
READ(Z2_MIN_PIN) != Z2_MIN_ENDSTOP_INVERTING
#else #else
bool z2_min_endstop=z_min_endstop; z_min_endstop
#endif #endif
if(((z_min_endstop && old_z_min_endstop) || (z2_min_endstop && old_z2_min_endstop)) && (current_block->steps[Z_AXIS] > 0)) ;
{
bool z_min_both = z_min_endstop && old_z_min_endstop,
z2_min_both = z2_min_endstop && old_z2_min_endstop;
if ((z_min_both || z2_min_both) && current_block->steps[Z_AXIS] > 0) {
endstops_trigsteps[Z_AXIS] = count_position[Z_AXIS]; endstops_trigsteps[Z_AXIS] = count_position[Z_AXIS];
endstop_z_hit=true; endstop_z_hit = true;
if (!(performing_homing) || ((performing_homing)&&(z_min_endstop && old_z_min_endstop)&&(z2_min_endstop && old_z2_min_endstop))) //if not performing home or if both endstops were trigged during homing... if (!performing_homing || (performing_homing && z_min_both && z2_min_both)) //if not performing home or if both endstops were trigged during homing...
{
step_events_completed = current_block->step_event_count; step_events_completed = current_block->step_event_count;
} }
}
old_z_min_endstop = z_min_endstop; old_z_min_endstop = z_min_endstop;
old_z2_min_endstop = z2_min_endstop; old_z2_min_endstop = z2_min_endstop;
#endif
#endif #else // !Z_DUAL_ENDSTOPS
UPDATE_ENDSTOP(z, Z, min, MIN);
#endif // !Z_DUAL_ENDSTOPS
#endif // Z_MIN_PIN
#ifdef Z_PROBE_ENDSTOP
UPDATE_ENDSTOP(z, Z, probe, PROBE);
z_probe_endstop=(READ(Z_PROBE_PIN) != Z_PROBE_ENDSTOP_INVERTING);
if(z_probe_endstop && old_z_probe_endstop)
{
endstops_trigsteps[Z_AXIS] = count_position[Z_AXIS];
endstop_z_probe_hit=true;
// if (z_probe_endstop && old_z_probe_endstop) SERIAL_ECHOLN("z_probe_endstop = true");
} }
old_z_probe_endstop = z_probe_endstop;
#endif
} // check_endstops
} }
else { // +direction else { // +direction
Z_APPLY_DIR(!INVERT_Z_DIR,0); Z_APPLY_DIR(!INVERT_Z_DIR,0);
count_direction[Z_AXIS] = 1; count_direction[Z_AXIS] = 1;
if (check_endstops) { if (check_endstops) {
#if defined(Z_MAX_PIN) && Z_MAX_PIN >= 0
#ifndef Z_DUAL_ENDSTOPS #if HAS_Z_MAX
UPDATE_ENDSTOP(z, Z, max, MAX);
#else #ifdef Z_DUAL_ENDSTOPS
bool z_max_endstop=(READ(Z_MAX_PIN) != Z_MAX_ENDSTOP_INVERTING);
#if defined(Z2_MAX_PIN) && Z2_MAX_PIN > -1 bool z_max_endstop = READ(Z_MAX_PIN) != Z_MAX_ENDSTOP_INVERTING,
bool z2_max_endstop=(READ(Z2_MAX_PIN) != Z2_MAX_ENDSTOP_INVERTING); z2_max_endstop =
#if HAS_Z2_MAX
READ(Z2_MAX_PIN) != Z2_MAX_ENDSTOP_INVERTING
#else #else
bool z2_max_endstop=z_max_endstop; z_max_endstop
#endif #endif
if(((z_max_endstop && old_z_max_endstop) || (z2_max_endstop && old_z2_max_endstop)) && (current_block->steps[Z_AXIS] > 0)) ;
{
endstops_trigsteps[Z_AXIS] = count_position[Z_AXIS];
endstop_z_hit=true;
// if (z_max_endstop && old_z_max_endstop) SERIAL_ECHOLN("z_max_endstop = true"); bool z_max_both = z_max_endstop && old_z_max_endstop,
// if (z2_max_endstop && old_z2_max_endstop) SERIAL_ECHOLN("z2_max_endstop = true"); z2_max_both = z2_max_endstop && old_z2_max_endstop;
if ((z_max_both || z2_max_both) && current_block->steps[Z_AXIS] > 0) {
endstops_trigsteps[Z_AXIS] = count_position[Z_AXIS];
endstop_z_hit = true;
// if (z_max_both) SERIAL_ECHOLN("z_max_endstop = true");
// if (z2_max_both) SERIAL_ECHOLN("z2_max_endstop = true");
if (!(performing_homing) || ((performing_homing)&&(z_max_endstop && old_z_max_endstop)&&(z2_max_endstop && old_z2_max_endstop))) //if not performing home or if both endstops were trigged during homing... if (!performing_homing || (performing_homing && z_max_both && z2_max_both)) //if not performing home or if both endstops were trigged during homing...
{
step_events_completed = current_block->step_event_count; step_events_completed = current_block->step_event_count;
} }
}
old_z_max_endstop = z_max_endstop; old_z_max_endstop = z_max_endstop;
old_z2_max_endstop = z2_max_endstop; old_z2_max_endstop = z2_max_endstop;
#endif
#endif #else // !Z_DUAL_ENDSTOPS
}
UPDATE_ENDSTOP(z, Z, max, MAX);
#endif // !Z_DUAL_ENDSTOPS
#endif // Z_MAX_PIN
#ifdef Z_PROBE_ENDSTOP
UPDATE_ENDSTOP(z, Z, probe, PROBE);
z_probe_endstop=(READ(Z_PROBE_PIN) != Z_PROBE_ENDSTOP_INVERTING);
if(z_probe_endstop && old_z_probe_endstop)
{
endstops_trigsteps[Z_AXIS] = count_position[Z_AXIS];
endstop_z_probe_hit=true;
// if (z_probe_endstop && old_z_probe_endstop) SERIAL_ECHOLN("z_probe_endstop = true");
} }
old_z_probe_endstop = z_probe_endstop;
#endif
} // check_endstops
} // +direction
#ifndef ADVANCE #ifndef ADVANCE
if (TEST(out_bits, E_AXIS)) { // -direction if (TEST(out_bits, E_AXIS)) { // -direction
REV_E_DIR(); REV_E_DIR();
count_direction[E_AXIS]=-1; count_direction[E_AXIS] = -1;
} }
else { // +direction else { // +direction
NORM_E_DIR(); NORM_E_DIR();
count_direction[E_AXIS]=1; count_direction[E_AXIS] = 1;
} }
#endif //!ADVANCE #endif //!ADVANCE
// Take multiple steps per interrupt (For high speed moves) // Take multiple steps per interrupt (For high speed moves)
for (int8_t i=0; i < step_loops; i++) { for (int8_t i = 0; i < step_loops; i++) {
#ifndef AT90USB #ifndef AT90USB
MSerial.checkRx(); // Check for serial chars. MSerial.checkRx(); // Check for serial chars.
#endif #endif
@ -635,10 +709,10 @@ ISR(TIMER1_COMPA_vect) {
step_events_completed++; step_events_completed++;
if (step_events_completed >= current_block->step_event_count) break; if (step_events_completed >= current_block->step_event_count) break;
} }
// Calculare new timer value // Calculate new timer value
unsigned short timer; unsigned short timer;
unsigned short step_rate; unsigned short step_rate;
if (step_events_completed <= (unsigned long int)current_block->accelerate_until) { if (step_events_completed <= (unsigned long)current_block->accelerate_until) {
MultiU24X24toH16(acc_step_rate, acceleration_time, current_block->acceleration_rate); MultiU24X24toH16(acc_step_rate, acceleration_time, current_block->acceleration_rate);
acc_step_rate += current_block->initial_rate; acc_step_rate += current_block->initial_rate;
@ -662,7 +736,7 @@ ISR(TIMER1_COMPA_vect) {
#endif #endif
} }
else if (step_events_completed > (unsigned long int)current_block->decelerate_after) { else if (step_events_completed > (unsigned long)current_block->decelerate_after) {
MultiU24X24toH16(step_rate, deceleration_time, current_block->acceleration_rate); MultiU24X24toH16(step_rate, deceleration_time, current_block->acceleration_rate);
if (step_rate > acc_step_rate) { // Check step_rate stays positive if (step_rate > acc_step_rate) { // Check step_rate stays positive
@ -791,133 +865,140 @@ void st_init() {
#endif #endif
// Initialize Dir Pins // Initialize Dir Pins
#if defined(X_DIR_PIN) && X_DIR_PIN >= 0 #if HAS_X_DIR
X_DIR_INIT; X_DIR_INIT;
#endif #endif
#if defined(X2_DIR_PIN) && X2_DIR_PIN >= 0 #if HAS_X2_DIR
X2_DIR_INIT; X2_DIR_INIT;
#endif #endif
#if defined(Y_DIR_PIN) && Y_DIR_PIN >= 0 #if HAS_Y_DIR
Y_DIR_INIT; Y_DIR_INIT;
#if defined(Y_DUAL_STEPPER_DRIVERS) && defined(Y2_DIR_PIN) && Y2_DIR_PIN >= 0 #if defined(Y_DUAL_STEPPER_DRIVERS) && HAS_Y2_DIR
Y2_DIR_INIT; Y2_DIR_INIT;
#endif #endif
#endif #endif
#if defined(Z_DIR_PIN) && Z_DIR_PIN >= 0 #if HAS_Z_DIR
Z_DIR_INIT; Z_DIR_INIT;
#if defined(Z_DUAL_STEPPER_DRIVERS) && defined(Z2_DIR_PIN) && Z2_DIR_PIN >= 0 #if defined(Z_DUAL_STEPPER_DRIVERS) && HAS_Z2_DIR
Z2_DIR_INIT; Z2_DIR_INIT;
#endif #endif
#endif #endif
#if defined(E0_DIR_PIN) && E0_DIR_PIN >= 0 #if HAS_E0_DIR
E0_DIR_INIT; E0_DIR_INIT;
#endif #endif
#if defined(E1_DIR_PIN) && E1_DIR_PIN >= 0 #if HAS_E1_DIR
E1_DIR_INIT; E1_DIR_INIT;
#endif #endif
#if defined(E2_DIR_PIN) && E2_DIR_PIN >= 0 #if HAS_E2_DIR
E2_DIR_INIT; E2_DIR_INIT;
#endif #endif
#if defined(E3_DIR_PIN) && E3_DIR_PIN >= 0 #if HAS_E3_DIR
E3_DIR_INIT; E3_DIR_INIT;
#endif #endif
//Initialize Enable Pins - steppers default to disabled. //Initialize Enable Pins - steppers default to disabled.
#if defined(X_ENABLE_PIN) && X_ENABLE_PIN >= 0 #if HAS_X_ENABLE
X_ENABLE_INIT; X_ENABLE_INIT;
if (!X_ENABLE_ON) X_ENABLE_WRITE(HIGH); if (!X_ENABLE_ON) X_ENABLE_WRITE(HIGH);
#endif #endif
#if defined(X2_ENABLE_PIN) && X2_ENABLE_PIN >= 0 #if HAS_X2_ENABLE
X2_ENABLE_INIT; X2_ENABLE_INIT;
if (!X_ENABLE_ON) X2_ENABLE_WRITE(HIGH); if (!X_ENABLE_ON) X2_ENABLE_WRITE(HIGH);
#endif #endif
#if defined(Y_ENABLE_PIN) && Y_ENABLE_PIN >= 0 #if HAS_Y_ENABLE
Y_ENABLE_INIT; Y_ENABLE_INIT;
if (!Y_ENABLE_ON) Y_ENABLE_WRITE(HIGH); if (!Y_ENABLE_ON) Y_ENABLE_WRITE(HIGH);
#if defined(Y_DUAL_STEPPER_DRIVERS) && defined(Y2_ENABLE_PIN) && Y2_ENABLE_PIN >= 0 #if defined(Y_DUAL_STEPPER_DRIVERS) && HAS_Y2_ENABLE
Y2_ENABLE_INIT; Y2_ENABLE_INIT;
if (!Y_ENABLE_ON) Y2_ENABLE_WRITE(HIGH); if (!Y_ENABLE_ON) Y2_ENABLE_WRITE(HIGH);
#endif #endif
#endif #endif
#if defined(Z_ENABLE_PIN) && Z_ENABLE_PIN >= 0 #if HAS_Z_ENABLE
Z_ENABLE_INIT; Z_ENABLE_INIT;
if (!Z_ENABLE_ON) Z_ENABLE_WRITE(HIGH); if (!Z_ENABLE_ON) Z_ENABLE_WRITE(HIGH);
#if defined(Z_DUAL_STEPPER_DRIVERS) && defined(Z2_ENABLE_PIN) && Z2_ENABLE_PIN >= 0 #if defined(Z_DUAL_STEPPER_DRIVERS) && HAS_Z2_ENABLE
Z2_ENABLE_INIT; Z2_ENABLE_INIT;
if (!Z_ENABLE_ON) Z2_ENABLE_WRITE(HIGH); if (!Z_ENABLE_ON) Z2_ENABLE_WRITE(HIGH);
#endif #endif
#endif #endif
#if defined(E0_ENABLE_PIN) && E0_ENABLE_PIN >= 0 #if HAS_E0_ENABLE
E0_ENABLE_INIT; E0_ENABLE_INIT;
if (!E_ENABLE_ON) E0_ENABLE_WRITE(HIGH); if (!E_ENABLE_ON) E0_ENABLE_WRITE(HIGH);
#endif #endif
#if defined(E1_ENABLE_PIN) && E1_ENABLE_PIN >= 0 #if HAS_E1_ENABLE
E1_ENABLE_INIT; E1_ENABLE_INIT;
if (!E_ENABLE_ON) E1_ENABLE_WRITE(HIGH); if (!E_ENABLE_ON) E1_ENABLE_WRITE(HIGH);
#endif #endif
#if defined(E2_ENABLE_PIN) && E2_ENABLE_PIN >= 0 #if HAS_E2_ENABLE
E2_ENABLE_INIT; E2_ENABLE_INIT;
if (!E_ENABLE_ON) E2_ENABLE_WRITE(HIGH); if (!E_ENABLE_ON) E2_ENABLE_WRITE(HIGH);
#endif #endif
#if defined(E3_ENABLE_PIN) && E3_ENABLE_PIN >= 0 #if HAS_E3_ENABLE
E3_ENABLE_INIT; E3_ENABLE_INIT;
if (!E_ENABLE_ON) E3_ENABLE_WRITE(HIGH); if (!E_ENABLE_ON) E3_ENABLE_WRITE(HIGH);
#endif #endif
//endstops and pullups //endstops and pullups
#if defined(X_MIN_PIN) && X_MIN_PIN >= 0 #if HAS_X_MIN
SET_INPUT(X_MIN_PIN); SET_INPUT(X_MIN_PIN);
#ifdef ENDSTOPPULLUP_XMIN #ifdef ENDSTOPPULLUP_XMIN
WRITE(X_MIN_PIN,HIGH); WRITE(X_MIN_PIN,HIGH);
#endif #endif
#endif #endif
#if defined(Y_MIN_PIN) && Y_MIN_PIN >= 0 #if HAS_Y_MIN
SET_INPUT(Y_MIN_PIN); SET_INPUT(Y_MIN_PIN);
#ifdef ENDSTOPPULLUP_YMIN #ifdef ENDSTOPPULLUP_YMIN
WRITE(Y_MIN_PIN,HIGH); WRITE(Y_MIN_PIN,HIGH);
#endif #endif
#endif #endif
#if defined(Z_MIN_PIN) && Z_MIN_PIN >= 0 #if HAS_Z_MIN
SET_INPUT(Z_MIN_PIN); SET_INPUT(Z_MIN_PIN);
#ifdef ENDSTOPPULLUP_ZMIN #ifdef ENDSTOPPULLUP_ZMIN
WRITE(Z_MIN_PIN,HIGH); WRITE(Z_MIN_PIN,HIGH);
#endif #endif
#endif #endif
#if defined(X_MAX_PIN) && X_MAX_PIN >= 0 #if HAS_X_MAX
SET_INPUT(X_MAX_PIN); SET_INPUT(X_MAX_PIN);
#ifdef ENDSTOPPULLUP_XMAX #ifdef ENDSTOPPULLUP_XMAX
WRITE(X_MAX_PIN,HIGH); WRITE(X_MAX_PIN,HIGH);
#endif #endif
#endif #endif
#if defined(Y_MAX_PIN) && Y_MAX_PIN >= 0 #if HAS_Y_MAX
SET_INPUT(Y_MAX_PIN); SET_INPUT(Y_MAX_PIN);
#ifdef ENDSTOPPULLUP_YMAX #ifdef ENDSTOPPULLUP_YMAX
WRITE(Y_MAX_PIN,HIGH); WRITE(Y_MAX_PIN,HIGH);
#endif #endif
#endif #endif
#if defined(Z_MAX_PIN) && Z_MAX_PIN >= 0 #if HAS_Z_MAX
SET_INPUT(Z_MAX_PIN); SET_INPUT(Z_MAX_PIN);
#ifdef ENDSTOPPULLUP_ZMAX #ifdef ENDSTOPPULLUP_ZMAX
WRITE(Z_MAX_PIN,HIGH); WRITE(Z_MAX_PIN,HIGH);
#endif #endif
#endif #endif
#if defined(Z2_MAX_PIN) && Z2_MAX_PIN >= 0 #if HAS_Z2_MAX
SET_INPUT(Z2_MAX_PIN); SET_INPUT(Z2_MAX_PIN);
#ifdef ENDSTOPPULLUP_ZMAX #ifdef ENDSTOPPULLUP_ZMAX
WRITE(Z2_MAX_PIN,HIGH); WRITE(Z2_MAX_PIN,HIGH);
#endif #endif
#endif #endif
#if (defined(Z_PROBE_PIN) && Z_PROBE_PIN >= 0) && defined(Z_PROBE_ENDSTOP) // Check for Z_PROBE_ENDSTOP so we don't pull a pin high unless it's to be used.
SET_INPUT(Z_PROBE_PIN);
#ifdef ENDSTOPPULLUP_ZPROBE
WRITE(Z_PROBE_PIN,HIGH);
#endif
#endif
#define AXIS_INIT(axis, AXIS, PIN) \ #define AXIS_INIT(axis, AXIS, PIN) \
AXIS ##_STEP_INIT; \ AXIS ##_STEP_INIT; \
AXIS ##_STEP_WRITE(INVERT_## PIN ##_STEP_PIN); \ AXIS ##_STEP_WRITE(INVERT_## PIN ##_STEP_PIN); \
@ -926,36 +1007,36 @@ void st_init() {
#define E_AXIS_INIT(NUM) AXIS_INIT(e## NUM, E## NUM, E) #define E_AXIS_INIT(NUM) AXIS_INIT(e## NUM, E## NUM, E)
// Initialize Step Pins // Initialize Step Pins
#if defined(X_STEP_PIN) && X_STEP_PIN >= 0 #if HAS_X_STEP
AXIS_INIT(x, X, X); AXIS_INIT(x, X, X);
#endif #endif
#if defined(X2_STEP_PIN) && X2_STEP_PIN >= 0 #if HAS_X2_STEP
AXIS_INIT(x, X2, X); AXIS_INIT(x, X2, X);
#endif #endif
#if defined(Y_STEP_PIN) && Y_STEP_PIN >= 0 #if HAS_Y_STEP
#if defined(Y_DUAL_STEPPER_DRIVERS) && defined(Y2_STEP_PIN) && Y2_STEP_PIN >= 0 #if defined(Y_DUAL_STEPPER_DRIVERS) && HAS_Y2_STEP
Y2_STEP_INIT; Y2_STEP_INIT;
Y2_STEP_WRITE(INVERT_Y_STEP_PIN); Y2_STEP_WRITE(INVERT_Y_STEP_PIN);
#endif #endif
AXIS_INIT(y, Y, Y); AXIS_INIT(y, Y, Y);
#endif #endif
#if defined(Z_STEP_PIN) && Z_STEP_PIN >= 0 #if HAS_Z_STEP
#if defined(Z_DUAL_STEPPER_DRIVERS) && defined(Z2_STEP_PIN) && Z2_STEP_PIN >= 0 #if defined(Z_DUAL_STEPPER_DRIVERS) && HAS_Z2_STEP
Z2_STEP_INIT; Z2_STEP_INIT;
Z2_STEP_WRITE(INVERT_Z_STEP_PIN); Z2_STEP_WRITE(INVERT_Z_STEP_PIN);
#endif #endif
AXIS_INIT(z, Z, Z); AXIS_INIT(z, Z, Z);
#endif #endif
#if defined(E0_STEP_PIN) && E0_STEP_PIN >= 0 #if HAS_E0_STEP
E_AXIS_INIT(0); E_AXIS_INIT(0);
#endif #endif
#if defined(E1_STEP_PIN) && E1_STEP_PIN >= 0 #if HAS_E1_STEP
E_AXIS_INIT(1); E_AXIS_INIT(1);
#endif #endif
#if defined(E2_STEP_PIN) && E2_STEP_PIN >= 0 #if HAS_E2_STEP
E_AXIS_INIT(2); E_AXIS_INIT(2);
#endif #endif
#if defined(E3_STEP_PIN) && E3_STEP_PIN >= 0 #if HAS_E3_STEP
E_AXIS_INIT(3); E_AXIS_INIT(3);
#endif #endif
@ -985,10 +1066,7 @@ void st_init() {
TCCR0A &= ~BIT(WGM01); TCCR0A &= ~BIT(WGM01);
TCCR0A &= ~BIT(WGM00); TCCR0A &= ~BIT(WGM00);
#endif #endif
e_steps[0] = 0; e_steps[0] = e_steps[1] = e_steps[2] = e_steps[3] = 0;
e_steps[1] = 0;
e_steps[2] = 0;
e_steps[3] = 0;
TIMSK0 |= BIT(OCIE0A); TIMSK0 |= BIT(OCIE0A);
#endif //ADVANCE #endif //ADVANCE
@ -1040,13 +1118,7 @@ long st_get_position(uint8_t axis) {
void finishAndDisableSteppers() { void finishAndDisableSteppers() {
st_synchronize(); st_synchronize();
disable_x(); disable_all_steppers();
disable_y();
disable_z();
disable_e0();
disable_e1();
disable_e2();
disable_e3();
} }
void quickStop() { void quickStop() {
@ -1176,14 +1248,12 @@ void digipot_current(uint8_t driver, int current) {
} }
void microstep_init() { void microstep_init() {
const uint8_t microstep_modes[] = MICROSTEP_MODES; #if HAS_MICROSTEPS_E1
#if defined(E1_MS1_PIN) && E1_MS1_PIN >= 0
pinMode(E1_MS1_PIN,OUTPUT); pinMode(E1_MS1_PIN,OUTPUT);
pinMode(E1_MS2_PIN,OUTPUT); pinMode(E1_MS2_PIN,OUTPUT);
#endif #endif
#if defined(X_MS1_PIN) && X_MS1_PIN >= 0 #if HAS_MICROSTEPS
pinMode(X_MS1_PIN,OUTPUT); pinMode(X_MS1_PIN,OUTPUT);
pinMode(X_MS2_PIN,OUTPUT); pinMode(X_MS2_PIN,OUTPUT);
pinMode(Y_MS1_PIN,OUTPUT); pinMode(Y_MS1_PIN,OUTPUT);
@ -1192,7 +1262,9 @@ void microstep_init() {
pinMode(Z_MS2_PIN,OUTPUT); pinMode(Z_MS2_PIN,OUTPUT);
pinMode(E0_MS1_PIN,OUTPUT); pinMode(E0_MS1_PIN,OUTPUT);
pinMode(E0_MS2_PIN,OUTPUT); pinMode(E0_MS2_PIN,OUTPUT);
for (int i = 0; i <= 4; i++) microstep_mode(i, microstep_modes[i]); const uint8_t microstep_modes[] = MICROSTEP_MODES;
for (uint16_t i = 0; i < sizeof(microstep_modes) / sizeof(microstep_modes[0]); i++)
microstep_mode(i, microstep_modes[i]);
#endif #endif
} }
@ -1202,7 +1274,7 @@ void microstep_ms(uint8_t driver, int8_t ms1, int8_t ms2) {
case 1: digitalWrite(Y_MS1_PIN, ms1); break; case 1: digitalWrite(Y_MS1_PIN, ms1); break;
case 2: digitalWrite(Z_MS1_PIN, ms1); break; case 2: digitalWrite(Z_MS1_PIN, ms1); break;
case 3: digitalWrite(E0_MS1_PIN, ms1); break; case 3: digitalWrite(E0_MS1_PIN, ms1); break;
#if defined(E1_MS1_PIN) && E1_MS1_PIN >= 0 #if HAS_MICROSTEPS_E1
case 4: digitalWrite(E1_MS1_PIN, ms1); break; case 4: digitalWrite(E1_MS1_PIN, ms1); break;
#endif #endif
} }
@ -1241,7 +1313,7 @@ void microstep_readings() {
SERIAL_PROTOCOLPGM("E0: "); SERIAL_PROTOCOLPGM("E0: ");
SERIAL_PROTOCOL(digitalRead(E0_MS1_PIN)); SERIAL_PROTOCOL(digitalRead(E0_MS1_PIN));
SERIAL_PROTOCOLLN(digitalRead(E0_MS2_PIN)); SERIAL_PROTOCOLLN(digitalRead(E0_MS2_PIN));
#if defined(E1_MS1_PIN) && E1_MS1_PIN >= 0 #if HAS_MICROSTEPS_E1
SERIAL_PROTOCOLPGM("E1: "); SERIAL_PROTOCOLPGM("E1: ");
SERIAL_PROTOCOL(digitalRead(E1_MS1_PIN)); SERIAL_PROTOCOL(digitalRead(E1_MS1_PIN));
SERIAL_PROTOCOLLN(digitalRead(E1_MS2_PIN)); SERIAL_PROTOCOLLN(digitalRead(E1_MS2_PIN));

@ -1,5 +1,5 @@
/* /*
temperature.c - temperature control temperature.cpp - temperature control
Part of Marlin Part of Marlin
Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@ -16,18 +16,7 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
/*
This firmware is a mashup between Sprinter and grbl.
(https://github.com/kliment/Sprinter)
(https://github.com/simen/grbl/tree)
It has preliminary support for Matthew Roberts advance algorithm
http://reprap.org/pipermail/reprap-dev/2011-May/003323.html
*/
#include "Marlin.h" #include "Marlin.h"
#include "ultralcd.h" #include "ultralcd.h"
@ -45,14 +34,18 @@
#define K2 (1.0-K1) #define K2 (1.0-K1)
#endif #endif
#if defined(PIDTEMPBED) || defined(PIDTEMP)
#define PID_dT ((OVERSAMPLENR * 12.0)/(F_CPU / 64.0 / 256.0))
#endif
//=========================================================================== //===========================================================================
//============================= public variables ============================ //============================= public variables ============================
//=========================================================================== //===========================================================================
int target_temperature[EXTRUDERS] = { 0 }; int target_temperature[4] = { 0 };
int target_temperature_bed = 0; int target_temperature_bed = 0;
int current_temperature_raw[EXTRUDERS] = { 0 }; int current_temperature_raw[4] = { 0 };
float current_temperature[EXTRUDERS] = { 0.0 }; float current_temperature[4] = { 0.0 };
int current_temperature_bed_raw = 0; int current_temperature_bed_raw = 0;
float current_temperature_bed = 0.0; float current_temperature_bed = 0.0;
#ifdef TEMP_SENSOR_1_AS_REDUNDANT #ifdef TEMP_SENSOR_1_AS_REDUNDANT
@ -79,6 +72,22 @@ unsigned char soft_pwm_bed;
#ifdef FILAMENT_SENSOR #ifdef FILAMENT_SENSOR
int current_raw_filwidth = 0; //Holds measured filament diameter - one extruder only int current_raw_filwidth = 0; //Holds measured filament diameter - one extruder only
#endif #endif
#define HAS_HEATER_THERMAL_PROTECTION (defined(THERMAL_RUNAWAY_PROTECTION_PERIOD) && THERMAL_RUNAWAY_PROTECTION_PERIOD > 0)
#define HAS_BED_THERMAL_PROTECTION (defined(THERMAL_RUNAWAY_PROTECTION_BED_PERIOD) && THERMAL_RUNAWAY_PROTECTION_BED_PERIOD > 0 && TEMP_SENSOR_BED != 0)
#if HAS_HEATER_THERMAL_PROTECTION || HAS_BED_THERMAL_PROTECTION
enum TRState { TRReset, TRInactive, TRFirstHeating, TRStable, TRRunaway };
void thermal_runaway_protection(TRState *state, millis_t *timer, float temperature, float target_temperature, int heater_id, int period_seconds, int hysteresis_degc);
#if HAS_HEATER_THERMAL_PROTECTION
static TRState thermal_runaway_state_machine[4] = { TRReset, TRReset, TRReset, TRReset };
static millis_t thermal_runaway_timer[4]; // = {0,0,0,0};
#endif
#if HAS_BED_THERMAL_PROTECTION
static TRState thermal_runaway_bed_state_machine = TRReset;
static millis_t thermal_runaway_bed_timer;
#endif
#endif
//=========================================================================== //===========================================================================
//=============================private variables============================ //=============================private variables============================
//=========================================================================== //===========================================================================
@ -109,7 +118,7 @@ static volatile bool temp_meas_ready = false;
static float temp_iState_min_bed; static float temp_iState_min_bed;
static float temp_iState_max_bed; static float temp_iState_max_bed;
#else //PIDTEMPBED #else //PIDTEMPBED
static unsigned long previous_millis_bed_heater; static millis_t next_bed_check_ms;
#endif //PIDTEMPBED #endif //PIDTEMPBED
static unsigned char soft_pwm[EXTRUDERS]; static unsigned char soft_pwm[EXTRUDERS];
@ -117,7 +126,7 @@ static volatile bool temp_meas_ready = false;
static unsigned char soft_pwm_fan; static unsigned char soft_pwm_fan;
#endif #endif
#if HAS_AUTO_FAN #if HAS_AUTO_FAN
static unsigned long extruder_autofan_last_check; static millis_t next_auto_fan_check_ms;
#endif #endif
#ifdef PIDTEMP #ifdef PIDTEMP
@ -162,7 +171,7 @@ static void updateTemperaturesFromRawValues();
#ifdef WATCH_TEMP_PERIOD #ifdef WATCH_TEMP_PERIOD
int watch_start_temp[EXTRUDERS] = { 0 }; int watch_start_temp[EXTRUDERS] = { 0 };
unsigned long watchmillis[EXTRUDERS] = { 0 }; millis_t watchmillis[EXTRUDERS] = { 0 };
#endif //WATCH_TEMP_PERIOD #endif //WATCH_TEMP_PERIOD
#ifndef SOFT_PWM_SCALE #ifndef SOFT_PWM_SCALE
@ -187,7 +196,7 @@ void PID_autotune(float temp, int extruder, int ncycles)
int cycles = 0; int cycles = 0;
bool heating = true; bool heating = true;
unsigned long temp_millis = millis(), t1 = temp_millis, t2 = temp_millis; millis_t temp_ms = millis(), t1 = temp_ms, t2 = temp_ms;
long t_high = 0, t_low = 0; long t_high = 0, t_low = 0;
long bias, d; long bias, d;
@ -196,7 +205,7 @@ void PID_autotune(float temp, int extruder, int ncycles)
float max = 0, min = 10000; float max = 0, min = 10000;
#if HAS_AUTO_FAN #if HAS_AUTO_FAN
unsigned long extruder_autofan_last_check = temp_millis; millis_t next_auto_fan_check_ms = temp_ms + 2500;
#endif #endif
if (extruder >= EXTRUDERS if (extruder >= EXTRUDERS
@ -210,7 +219,7 @@ void PID_autotune(float temp, int extruder, int ncycles)
SERIAL_ECHOLN(MSG_PID_AUTOTUNE_START); SERIAL_ECHOLN(MSG_PID_AUTOTUNE_START);
disable_heater(); // switch off all heaters. disable_all_heaters(); // switch off all heaters.
if (extruder < 0) if (extruder < 0)
soft_pwm_bed = bias = d = MAX_BED_POWER / 2; soft_pwm_bed = bias = d = MAX_BED_POWER / 2;
@ -218,11 +227,11 @@ void PID_autotune(float temp, int extruder, int ncycles)
soft_pwm[extruder] = bias = d = PID_MAX / 2; soft_pwm[extruder] = bias = d = PID_MAX / 2;
// PID Tuning loop // PID Tuning loop
for(;;) { for (;;) {
unsigned long ms = millis(); millis_t ms = millis();
if (temp_meas_ready == true) { // temp sample ready if (temp_meas_ready) { // temp sample ready
updateTemperaturesFromRawValues(); updateTemperaturesFromRawValues();
input = (extruder<0)?current_temperature_bed:current_temperature[extruder]; input = (extruder<0)?current_temperature_bed:current_temperature[extruder];
@ -231,9 +240,9 @@ void PID_autotune(float temp, int extruder, int ncycles)
min = min(min, input); min = min(min, input);
#if HAS_AUTO_FAN #if HAS_AUTO_FAN
if (ms > extruder_autofan_last_check + 2500) { if (ms > next_auto_fan_check_ms) {
checkExtruderAutoFans(); checkExtruderAutoFans();
extruder_autofan_last_check = ms; next_auto_fan_check_ms = ms + 2500;
} }
#endif #endif
@ -308,7 +317,7 @@ void PID_autotune(float temp, int extruder, int ncycles)
return; return;
} }
// Every 2 seconds... // Every 2 seconds...
if (ms > temp_millis + 2000) { if (ms > temp_ms + 2000) {
int p; int p;
if (extruder < 0) { if (extruder < 0) {
p = soft_pwm_bed; p = soft_pwm_bed;
@ -323,7 +332,7 @@ void PID_autotune(float temp, int extruder, int ncycles)
SERIAL_PROTOCOLPGM(MSG_AT); SERIAL_PROTOCOLPGM(MSG_AT);
SERIAL_PROTOCOLLN(p); SERIAL_PROTOCOLLN(p);
temp_millis = ms; temp_ms = ms;
} // every 2 seconds } // every 2 seconds
// Over 2 minutes? // Over 2 minutes?
if (((ms - t1) + (ms - t2)) > (10L*60L*1000L*2L)) { if (((ms - t1) + (ms - t2)) > (10L*60L*1000L*2L)) {
@ -434,7 +443,7 @@ void checkExtruderAutoFans()
// Temperature Error Handlers // Temperature Error Handlers
// //
inline void _temp_error(int e, const char *msg1, const char *msg2) { inline void _temp_error(int e, const char *msg1, const char *msg2) {
if (!IsStopped()) { if (IsRunning()) {
SERIAL_ERROR_START; SERIAL_ERROR_START;
if (e >= 0) SERIAL_ERRORLN((int)e); if (e >= 0) SERIAL_ERRORLN((int)e);
serialprintPGM(msg1); serialprintPGM(msg1);
@ -449,11 +458,11 @@ inline void _temp_error(int e, const char *msg1, const char *msg2) {
} }
void max_temp_error(uint8_t e) { void max_temp_error(uint8_t e) {
disable_heater(); disable_all_heaters();
_temp_error(e, PSTR(MSG_MAXTEMP_EXTRUDER_OFF), PSTR(MSG_ERR_MAXTEMP)); _temp_error(e, PSTR(MSG_MAXTEMP_EXTRUDER_OFF), PSTR(MSG_ERR_MAXTEMP));
} }
void min_temp_error(uint8_t e) { void min_temp_error(uint8_t e) {
disable_heater(); disable_all_heaters();
_temp_error(e, PSTR(MSG_MINTEMP_EXTRUDER_OFF), PSTR(MSG_ERR_MINTEMP)); _temp_error(e, PSTR(MSG_MINTEMP_EXTRUDER_OFF), PSTR(MSG_ERR_MINTEMP));
} }
void bed_max_temp_error(void) { void bed_max_temp_error(void) {
@ -570,18 +579,34 @@ float get_pid_output(int e) {
} }
#endif #endif
/**
* Manage heating activities for extruder hot-ends and a heated bed
* - Acquire updated temperature readings
* - Invoke thermal runaway protection
* - Manage extruder auto-fan
* - Apply filament width to the extrusion rate (may move)
* - Update the heated bed PID output value
*/
void manage_heater() { void manage_heater() {
if (!temp_meas_ready) return; if (!temp_meas_ready) return;
updateTemperaturesFromRawValues(); updateTemperaturesFromRawValues();
unsigned long ms = millis(); #ifdef HEATER_0_USES_MAX6675
float ct = current_temperature[0];
if (ct > min(HEATER_0_MAXTEMP, 1023)) max_temp_error(0);
if (ct < max(HEATER_0_MINTEMP, 0.01)) min_temp_error(0);
#endif //HEATER_0_USES_MAX6675
#if defined(WATCH_TEMP_PERIOD) || !defined(PIDTEMPBED) || HAS_AUTO_FAN
millis_t ms = millis();
#endif
// Loop through all extruders // Loop through all extruders
for (int e = 0; e < EXTRUDERS; e++) { for (int e = 0; e < EXTRUDERS; e++) {
#if defined (THERMAL_RUNAWAY_PROTECTION_PERIOD) && THERMAL_RUNAWAY_PROTECTION_PERIOD > 0 #if HAS_HEATER_THERMAL_PROTECTION
thermal_runaway_protection(&thermal_runaway_state_machine[e], &thermal_runaway_timer[e], current_temperature[e], target_temperature[e], e, THERMAL_RUNAWAY_PROTECTION_PERIOD, THERMAL_RUNAWAY_PROTECTION_HYSTERESIS); thermal_runaway_protection(&thermal_runaway_state_machine[e], &thermal_runaway_timer[e], current_temperature[e], target_temperature[e], e, THERMAL_RUNAWAY_PROTECTION_PERIOD, THERMAL_RUNAWAY_PROTECTION_HYSTERESIS);
#endif #endif
@ -606,29 +631,44 @@ void manage_heater() {
#ifdef TEMP_SENSOR_1_AS_REDUNDANT #ifdef TEMP_SENSOR_1_AS_REDUNDANT
if (fabs(current_temperature[0] - redundant_temperature) > MAX_REDUNDANT_TEMP_SENSOR_DIFF) { if (fabs(current_temperature[0] - redundant_temperature) > MAX_REDUNDANT_TEMP_SENSOR_DIFF) {
disable_heater(); disable_all_heaters();
_temp_error(-1, MSG_EXTRUDER_SWITCHED_OFF, MSG_ERR_REDUNDANT_TEMP); _temp_error(0, PSTR(MSG_EXTRUDER_SWITCHED_OFF), PSTR(MSG_ERR_REDUNDANT_TEMP));
} }
#endif //TEMP_SENSOR_1_AS_REDUNDANT #endif // TEMP_SENSOR_1_AS_REDUNDANT
} // Extruders Loop } // Extruders Loop
#if HAS_AUTO_FAN #if HAS_AUTO_FAN
if (ms > extruder_autofan_last_check + 2500) { // only need to check fan state very infrequently if (ms > next_auto_fan_check_ms) { // only need to check fan state very infrequently
checkExtruderAutoFans(); checkExtruderAutoFans();
extruder_autofan_last_check = ms; next_auto_fan_check_ms = ms + 2500;
} }
#endif #endif
// Control the extruder rate based on the width sensor
#ifdef FILAMENT_SENSOR
if (filament_sensor) {
meas_shift_index = delay_index1 - meas_delay_cm;
if (meas_shift_index < 0) meas_shift_index += MAX_MEASUREMENT_DELAY + 1; //loop around buffer if needed
// Get the delayed info and add 100 to reconstitute to a percent of
// the nominal filament diameter then square it to get an area
meas_shift_index = constrain(meas_shift_index, 0, MAX_MEASUREMENT_DELAY);
float vm = pow((measurement_delay[meas_shift_index] + 100.0) / 100.0, 2);
if (vm < 0.01) vm = 0.01;
volumetric_multiplier[FILAMENT_SENSOR_EXTRUDER_NUM] = vm;
}
#endif //FILAMENT_SENSOR
#ifndef PIDTEMPBED #ifndef PIDTEMPBED
if (ms < previous_millis_bed_heater + BED_CHECK_INTERVAL) return; if (ms < next_bed_check_ms) return;
previous_millis_bed_heater = ms; next_bed_check_ms = ms + BED_CHECK_INTERVAL;
#endif //PIDTEMPBED #endif
#if TEMP_SENSOR_BED != 0 #if TEMP_SENSOR_BED != 0
#if defined(THERMAL_RUNAWAY_PROTECTION_BED_PERIOD) && THERMAL_RUNAWAY_PROTECTION_BED_PERIOD > 0 #if HAS_BED_THERMAL_PROTECTION
thermal_runaway_protection(&thermal_runaway_bed_state_machine, &thermal_runaway_bed_timer, current_temperature_bed, target_temperature_bed, 9, THERMAL_RUNAWAY_PROTECTION_BED_PERIOD, THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS); thermal_runaway_protection(&thermal_runaway_bed_state_machine, &thermal_runaway_bed_timer, current_temperature_bed, target_temperature_bed, -1, THERMAL_RUNAWAY_PROTECTION_BED_PERIOD, THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS);
#endif #endif
#ifdef PIDTEMPBED #ifdef PIDTEMPBED
@ -636,22 +676,22 @@ void manage_heater() {
soft_pwm_bed = current_temperature_bed > BED_MINTEMP && current_temperature_bed < BED_MAXTEMP ? (int)pid_output >> 1 : 0; soft_pwm_bed = current_temperature_bed > BED_MINTEMP && current_temperature_bed < BED_MAXTEMP ? (int)pid_output >> 1 : 0;
#elif !defined(BED_LIMIT_SWITCHING) #elif defined(BED_LIMIT_SWITCHING)
// Check if temperature is within the correct range // Check if temperature is within the correct band
if (current_temperature_bed > BED_MINTEMP && current_temperature_bed < BED_MAXTEMP) { if (current_temperature_bed > BED_MINTEMP && current_temperature_bed < BED_MAXTEMP) {
soft_pwm_bed = current_temperature_bed < target_temperature_bed ? MAX_BED_POWER >> 1 : 0; if (current_temperature_bed >= target_temperature_bed + BED_HYSTERESIS)
soft_pwm_bed = 0;
else if (current_temperature_bed <= target_temperature_bed - BED_HYSTERESIS)
soft_pwm_bed = MAX_BED_POWER >> 1;
} }
else { else {
soft_pwm_bed = 0; soft_pwm_bed = 0;
WRITE_HEATER_BED(LOW); WRITE_HEATER_BED(LOW);
} }
#else //#ifdef BED_LIMIT_SWITCHING #else // BED_LIMIT_SWITCHING
// Check if temperature is within the correct band // Check if temperature is within the correct range
if (current_temperature_bed > BED_MINTEMP && current_temperature_bed < BED_MAXTEMP) { if (current_temperature_bed > BED_MINTEMP && current_temperature_bed < BED_MAXTEMP) {
if (current_temperature_bed >= target_temperature_bed + BED_HYSTERESIS) soft_pwm_bed = current_temperature_bed < target_temperature_bed ? MAX_BED_POWER >> 1 : 0;
soft_pwm_bed = 0;
else if (current_temperature_bed <= target_temperature_bed - BED_HYSTERESIS)
soft_pwm_bed = MAX_BED_POWER >> 1;
} }
else { else {
soft_pwm_bed = 0; soft_pwm_bed = 0;
@ -659,32 +699,17 @@ void manage_heater() {
} }
#endif #endif
#endif //TEMP_SENSOR_BED != 0 #endif //TEMP_SENSOR_BED != 0
// Control the extruder rate based on the width sensor
#ifdef FILAMENT_SENSOR
if (filament_sensor) {
meas_shift_index = delay_index1 - meas_delay_cm;
if (meas_shift_index < 0) meas_shift_index += MAX_MEASUREMENT_DELAY + 1; //loop around buffer if needed
// Get the delayed info and add 100 to reconstitute to a percent of
// the nominal filament diameter then square it to get an area
meas_shift_index = constrain(meas_shift_index, 0, MAX_MEASUREMENT_DELAY);
float vm = pow((measurement_delay[meas_shift_index] + 100.0) / 100.0, 2);
if (vm < 0.01) vm = 0.01;
volumetric_multiplier[FILAMENT_SENSOR_EXTRUDER_NUM] = vm;
}
#endif //FILAMENT_SENSOR
} }
#define PGM_RD_W(x) (short)pgm_read_word(&x) #define PGM_RD_W(x) (short)pgm_read_word(&x)
// Derived from RepRap FiveD extruder::getTemperature() // Derived from RepRap FiveD extruder::getTemperature()
// For hot end temperature measurement. // For hot end temperature measurement.
static float analog2temp(int raw, uint8_t e) { static float analog2temp(int raw, uint8_t e) {
#ifdef TEMP_SENSOR_1_AS_REDUNDANT #ifdef TEMP_SENSOR_1_AS_REDUNDANT
if (e > EXTRUDERS) if (e > EXTRUDERS)
#else #else
if (e >= EXTRUDERS) if (e >= EXTRUDERS)
#endif #endif
{ {
SERIAL_ERROR_START; SERIAL_ERROR_START;
SERIAL_ERROR((int)e); SERIAL_ERROR((int)e);
@ -692,23 +717,18 @@ static float analog2temp(int raw, uint8_t e) {
kill(); kill();
return 0.0; return 0.0;
} }
#ifdef HEATER_0_USES_MAX6675 #ifdef HEATER_0_USES_MAX6675
if (e == 0) if (e == 0) return 0.25 * raw;
{
return 0.25 * raw;
}
#endif #endif
if(heater_ttbl_map[e] != NULL) if (heater_ttbl_map[e] != NULL) {
{
float celsius = 0; float celsius = 0;
uint8_t i; uint8_t i;
short (*tt)[][2] = (short (*)[][2])(heater_ttbl_map[e]); short (*tt)[][2] = (short (*)[][2])(heater_ttbl_map[e]);
for (i=1; i<heater_ttbllen_map[e]; i++) for (i = 1; i < heater_ttbllen_map[e]; i++) {
{ if (PGM_RD_W((*tt)[i][0]) > raw) {
if (PGM_RD_W((*tt)[i][0]) > raw)
{
celsius = PGM_RD_W((*tt)[i-1][1]) + celsius = PGM_RD_W((*tt)[i-1][1]) +
(raw - PGM_RD_W((*tt)[i-1][0])) * (raw - PGM_RD_W((*tt)[i-1][0])) *
(float)(PGM_RD_W((*tt)[i][1]) - PGM_RD_W((*tt)[i-1][1])) / (float)(PGM_RD_W((*tt)[i][1]) - PGM_RD_W((*tt)[i-1][1])) /
@ -732,10 +752,8 @@ static float analog2tempBed(int raw) {
float celsius = 0; float celsius = 0;
byte i; byte i;
for (i=1; i<BEDTEMPTABLE_LEN; i++) for (i = 1; i < BEDTEMPTABLE_LEN; i++) {
{ if (PGM_RD_W(BEDTEMPTABLE[i][0]) > raw) {
if (PGM_RD_W(BEDTEMPTABLE[i][0]) > raw)
{
celsius = PGM_RD_W(BEDTEMPTABLE[i-1][1]) + celsius = PGM_RD_W(BEDTEMPTABLE[i-1][1]) +
(raw - PGM_RD_W(BEDTEMPTABLE[i-1][0])) * (raw - PGM_RD_W(BEDTEMPTABLE[i-1][0])) *
(float)(PGM_RD_W(BEDTEMPTABLE[i][1]) - PGM_RD_W(BEDTEMPTABLE[i-1][1])) / (float)(PGM_RD_W(BEDTEMPTABLE[i][1]) - PGM_RD_W(BEDTEMPTABLE[i-1][1])) /
@ -799,11 +817,11 @@ static void updateTemperaturesFromRawValues() {
#endif #endif
/**
* Initialize the temperature manager
* The manager is implemented by periodic calls to manage_heater()
void tp_init() */
{ void tp_init() {
#if MB(RUMBA) && ((TEMP_SENSOR_0==-1)||(TEMP_SENSOR_1==-1)||(TEMP_SENSOR_2==-1)||(TEMP_SENSOR_BED==-1)) #if MB(RUMBA) && ((TEMP_SENSOR_0==-1)||(TEMP_SENSOR_1==-1)||(TEMP_SENSOR_2==-1)||(TEMP_SENSOR_BED==-1))
//disable RUMBA JTAG in case the thermocouple extension is plugged on top of JTAG connector //disable RUMBA JTAG in case the thermocouple extension is plugged on top of JTAG connector
MCUCR=BIT(JTD); MCUCR=BIT(JTD);
@ -975,7 +993,7 @@ void tp_init()
void setWatch() { void setWatch() {
#ifdef WATCH_TEMP_PERIOD #ifdef WATCH_TEMP_PERIOD
unsigned long ms = millis(); millis_t ms = millis();
for (int e = 0; e < EXTRUDERS; e++) { for (int e = 0; e < EXTRUDERS; e++) {
if (degHotend(e) < degTargetHotend(e) - (WATCH_TEMP_INCREASE * 2)) { if (degHotend(e) < degTargetHotend(e) - (WATCH_TEMP_INCREASE * 2)) {
watch_start_temp[e] = degHotend(e); watch_start_temp[e] = degHotend(e);
@ -985,72 +1003,75 @@ void setWatch() {
#endif #endif
} }
#if defined(THERMAL_RUNAWAY_PROTECTION_PERIOD) && THERMAL_RUNAWAY_PROTECTION_PERIOD > 0 #if HAS_HEATER_THERMAL_PROTECTION || HAS_BED_THERMAL_PROTECTION
void thermal_runaway_protection(int *state, unsigned long *timer, float temperature, float target_temperature, int heater_id, int period_seconds, int hysteresis_degc)
{ void thermal_runaway_protection(TRState *state, millis_t *timer, float temperature, float target_temperature, int heater_id, int period_seconds, int hysteresis_degc) {
/*
static float tr_target_temperature[EXTRUDERS+1] = { 0.0 };
/*
SERIAL_ECHO_START; SERIAL_ECHO_START;
SERIAL_ECHO("Thermal Thermal Runaway Running. Heater ID:"); SERIAL_ECHOPGM("Thermal Thermal Runaway Running. Heater ID: ");
SERIAL_ECHO(heater_id); if (heater_id < 0) SERIAL_ECHOPGM("bed"); else SERIAL_ECHOPGM(heater_id);
SERIAL_ECHO(" ; State:"); SERIAL_ECHOPGM(" ; State:");
SERIAL_ECHO(*state); SERIAL_ECHOPGM(*state);
SERIAL_ECHO(" ; Timer:"); SERIAL_ECHOPGM(" ; Timer:");
SERIAL_ECHO(*timer); SERIAL_ECHOPGM(*timer);
SERIAL_ECHO(" ; Temperature:"); SERIAL_ECHOPGM(" ; Temperature:");
SERIAL_ECHO(temperature); SERIAL_ECHOPGM(temperature);
SERIAL_ECHO(" ; Target Temp:"); SERIAL_ECHOPGM(" ; Target Temp:");
SERIAL_ECHO(target_temperature); SERIAL_ECHOPGM(target_temperature);
SERIAL_ECHOLN(""); SERIAL_EOL;
*/ */
if ((target_temperature == 0) || thermal_runaway)
{ int heater_index = heater_id >= 0 ? heater_id : EXTRUDERS;
*state = 0;
// If the target temperature changes, restart
if (tr_target_temperature[heater_index] != target_temperature)
*state = TRReset;
switch (*state) {
case TRReset:
*timer = 0; *timer = 0;
return; *state = TRInactive;
break;
// Inactive state waits for a target temperature to be set
case TRInactive:
if (target_temperature > 0) {
tr_target_temperature[heater_index] = target_temperature;
*state = TRFirstHeating;
} }
switch (*state)
{
case 0: // "Heater Inactive" state
if (target_temperature > 0) *state = 1;
break; break;
case 1: // "First Heating" state // When first heating, wait for the temperature to be reached then go to Stable state
if (temperature >= target_temperature) *state = 2; case TRFirstHeating:
if (temperature >= tr_target_temperature[heater_index]) *state = TRStable;
break; break;
case 2: // "Temperature Stable" state // While the temperature is stable watch for a bad temperature
{ case TRStable:
unsigned long ms = millis(); // If the temperature is over the target (-hysteresis) restart the timer
if (temperature >= (target_temperature - hysteresis_degc)) if (temperature >= tr_target_temperature[heater_index] - hysteresis_degc)
{ *timer = millis();
*timer = ms; // If the timer goes too long without a reset, trigger shutdown
} else if (millis() > *timer + period_seconds * 1000UL)
else if ( (ms - *timer) > ((unsigned long) period_seconds) * 1000) *state = TRRunaway;
{ break;
case TRRunaway:
SERIAL_ERROR_START; SERIAL_ERROR_START;
SERIAL_ERRORLNPGM(MSG_THERMAL_RUNAWAY_STOP); SERIAL_ERRORLNPGM(MSG_THERMAL_RUNAWAY_STOP);
SERIAL_ERRORLN((int)heater_id); if (heater_id < 0) SERIAL_ERRORLNPGM("bed"); else SERIAL_ERRORLN(heater_id);
LCD_ALERTMESSAGEPGM(MSG_THERMAL_RUNAWAY); // translatable LCD_ALERTMESSAGEPGM(MSG_THERMAL_RUNAWAY);
thermal_runaway = true; disable_all_heaters();
while(1) disable_all_steppers();
{ for (;;) {
disable_heater();
disable_x();
disable_y();
disable_z();
disable_e0();
disable_e1();
disable_e2();
disable_e3();
manage_heater(); manage_heater();
lcd_update(); lcd_update();
} }
} }
} break;
} }
}
#endif //THERMAL_RUNAWAY_PROTECTION_PERIOD
#endif // HAS_HEATER_THERMAL_PROTECTION || HAS_BED_THERMAL_PROTECTION
void disable_heater() { void disable_all_heaters() {
for (int i=0; i<EXTRUDERS; i++) setTargetHotend(0, i); for (int i=0; i<EXTRUDERS; i++) setTargetHotend(0, i);
setTargetBed(0); setTargetBed(0);
@ -1088,17 +1109,19 @@ void disable_heater() {
} }
#ifdef HEATER_0_USES_MAX6675 #ifdef HEATER_0_USES_MAX6675
#define MAX6675_HEAT_INTERVAL 250 #define MAX6675_HEAT_INTERVAL 250u
long max6675_previous_millis = MAX6675_HEAT_INTERVAL; static millis_t next_max6675_ms = 0;
int max6675_temp = 2000; int max6675_temp = 2000;
static int read_max6675() { static int read_max6675() {
unsigned long ms = millis(); millis_t ms = millis();
if (ms < max6675_previous_millis + MAX6675_HEAT_INTERVAL)
if (ms < next_max6675_ms)
return max6675_temp; return max6675_temp;
max6675_previous_millis = ms; next_max6675_ms = ms + MAX6675_HEAT_INTERVAL;
max6675_temp = 0; max6675_temp = 0;
#ifdef PRR #ifdef PRR
@ -1162,20 +1185,40 @@ enum TempState {
StartupDelay // Startup, delay initial temp reading a tiny bit so the hardware can settle StartupDelay // Startup, delay initial temp reading a tiny bit so the hardware can settle
}; };
// static unsigned long raw_temp_value[4] = { 0 };
// Timer 0 is shared with millies static unsigned long raw_temp_bed_value = 0;
//
ISR(TIMER0_COMPB_vect) { static void set_current_temp_raw() {
#if HAS_TEMP_0 && !defined(HEATER_0_USES_MAX6675)
current_temperature_raw[0] = raw_temp_value[0];
#endif
#if HAS_TEMP_1
#ifdef TEMP_SENSOR_1_AS_REDUNDANT #ifdef TEMP_SENSOR_1_AS_REDUNDANT
#define TEMP_SENSOR_COUNT 2 redundant_temperature_raw = raw_temp_value[1];
#else #else
#define TEMP_SENSOR_COUNT EXTRUDERS current_temperature_raw[1] = raw_temp_value[1];
#endif
#if HAS_TEMP_2
current_temperature_raw[2] = raw_temp_value[2];
#if HAS_TEMP_3
current_temperature_raw[3] = raw_temp_value[3];
#endif
#endif
#endif #endif
current_temperature_bed_raw = raw_temp_bed_value;
temp_meas_ready = true;
}
/**
* Timer 0 is shared with millies
* - Manage PWM to all the heaters and fan
* - Update the raw temperature values
* - Check new temperature values for MIN/MAX errors
* - Step the babysteps value for each axis towards 0
*/
ISR(TIMER0_COMPB_vect) {
//these variables are only accesible from the ISR, but static, so they don't lose their value
static unsigned char temp_count = 0; static unsigned char temp_count = 0;
static unsigned long raw_temp_value[TEMP_SENSOR_COUNT] = { 0 };
static unsigned long raw_temp_bed_value = 0;
static TempState temp_state = StartupDelay; static TempState temp_state = StartupDelay;
static unsigned char pwm_count = BIT(SOFT_PWM_SCALE); static unsigned char pwm_count = BIT(SOFT_PWM_SCALE);
@ -1376,6 +1419,7 @@ ISR(TIMER0_COMPB_vect) {
#define START_ADC(pin) ADCSRB = 0; SET_ADMUX_ADCSRA(pin) #define START_ADC(pin) ADCSRB = 0; SET_ADMUX_ADCSRA(pin)
#endif #endif
// Prepare or measure a sensor, each one every 12th frame
switch(temp_state) { switch(temp_state) {
case PrepareTemp_0: case PrepareTemp_0:
#if HAS_TEMP_0 #if HAS_TEMP_0
@ -1477,40 +1521,19 @@ ISR(TIMER0_COMPB_vect) {
} // switch(temp_state) } // switch(temp_state)
if (temp_count >= OVERSAMPLENR) { // 10 * 16 * 1/(16000000/64/256) = 164ms. if (temp_count >= OVERSAMPLENR) { // 10 * 16 * 1/(16000000/64/256) = 164ms.
if (!temp_meas_ready) { //Only update the raw values if they have been read. Else we could be updating them during reading. // Update the raw values if they've been read. Else we could be updating them during reading.
#ifndef HEATER_0_USES_MAX6675 if (!temp_meas_ready) set_current_temp_raw();
current_temperature_raw[0] = raw_temp_value[0];
#endif
#if EXTRUDERS > 1
current_temperature_raw[1] = raw_temp_value[1];
#if EXTRUDERS > 2
current_temperature_raw[2] = raw_temp_value[2];
#if EXTRUDERS > 3
current_temperature_raw[3] = raw_temp_value[3];
#endif
#endif
#endif
#ifdef TEMP_SENSOR_1_AS_REDUNDANT
redundant_temperature_raw = raw_temp_value[1];
#endif
current_temperature_bed_raw = raw_temp_bed_value;
} //!temp_meas_ready
// Filament Sensor - can be read any time since IIR filtering is used // Filament Sensor - can be read any time since IIR filtering is used
#if HAS_FILAMENT_SENSOR #if HAS_FILAMENT_SENSOR
current_raw_filwidth = raw_filwidth_value >> 10; // Divide to get to 0-16384 range since we used 1/128 IIR filter approach current_raw_filwidth = raw_filwidth_value >> 10; // Divide to get to 0-16384 range since we used 1/128 IIR filter approach
#endif #endif
temp_meas_ready = true;
temp_count = 0; temp_count = 0;
for (int i = 0; i < TEMP_SENSOR_COUNT; i++) raw_temp_value[i] = 0; for (int i = 0; i < 4; i++) raw_temp_value[i] = 0;
raw_temp_bed_value = 0; raw_temp_bed_value = 0;
#ifdef HEATER_0_USES_MAX6675 #if HAS_TEMP_0 && !defined(HEATER_0_USES_MAX6675)
float ct = current_temperature[0];
if (ct > min(HEATER_0_MAXTEMP, 1023)) max_temp_error(0);
if (ct < max(HEATER_0_MINTEMP, 0.01)) min_temp_error(0);
#else
#if HEATER_0_RAW_LO_TEMP > HEATER_0_RAW_HI_TEMP #if HEATER_0_RAW_LO_TEMP > HEATER_0_RAW_HI_TEMP
#define GE0 <= #define GE0 <=
#else #else
@ -1520,38 +1543,37 @@ ISR(TIMER0_COMPB_vect) {
if (minttemp_raw[0] GE0 current_temperature_raw[0]) min_temp_error(0); if (minttemp_raw[0] GE0 current_temperature_raw[0]) min_temp_error(0);
#endif #endif
#if EXTRUDERS > 1 #if HAS_TEMP_1
#if HEATER_1_RAW_LO_TEMP > HEATER_1_RAW_HI_TEMP #if HEATER_1_RAW_LO_TEMP > HEATER_1_RAW_HI_TEMP
#define GE1 <= #define GE1 <=
#else #else
#define GE1 >= #define GE1 >=
#endif #endif
if (current_temperature_raw[1] GE1 maxttemp_raw[1]) max_temp_error(1); if (current_temperature_raw[1] GE1 maxttemp_raw[1]) max_temp_error(1);
if (minttemp_raw[1] GE0 current_temperature_raw[1]) min_temp_error(1); if (minttemp_raw[1] GE1 current_temperature_raw[1]) min_temp_error(1);
#endif // TEMP_SENSOR_1
#if EXTRUDERS > 2 #if HAS_TEMP_2
#if HEATER_2_RAW_LO_TEMP > HEATER_2_RAW_HI_TEMP #if HEATER_2_RAW_LO_TEMP > HEATER_2_RAW_HI_TEMP
#define GE2 <= #define GE2 <=
#else #else
#define GE2 >= #define GE2 >=
#endif #endif
if (current_temperature_raw[2] GE2 maxttemp_raw[2]) max_temp_error(2); if (current_temperature_raw[2] GE2 maxttemp_raw[2]) max_temp_error(2);
if (minttemp_raw[2] GE0 current_temperature_raw[2]) min_temp_error(2); if (minttemp_raw[2] GE2 current_temperature_raw[2]) min_temp_error(2);
#endif // TEMP_SENSOR_2
#if EXTRUDERS > 3 #if HAS_TEMP_3
#if HEATER_3_RAW_LO_TEMP > HEATER_3_RAW_HI_TEMP #if HEATER_3_RAW_LO_TEMP > HEATER_3_RAW_HI_TEMP
#define GE3 <= #define GE3 <=
#else #else
#define GE3 >= #define GE3 >=
#endif #endif
if (current_temperature_raw[3] GE3 maxttemp_raw[3]) max_temp_error(3); if (current_temperature_raw[3] GE3 maxttemp_raw[3]) max_temp_error(3);
if (minttemp_raw[3] GE0 current_temperature_raw[3]) min_temp_error(3); if (minttemp_raw[3] GE3 current_temperature_raw[3]) min_temp_error(3);
#endif // TEMP_SENSOR_3
#endif // EXTRUDERS > 3 #if HAS_TEMP_BED
#endif // EXTRUDERS > 2
#endif // EXTRUDERS > 1
#if defined(BED_MAXTEMP) && (TEMP_SENSOR_BED != 0)
#if HEATER_BED_RAW_LO_TEMP > HEATER_BED_RAW_HI_TEMP #if HEATER_BED_RAW_LO_TEMP > HEATER_BED_RAW_HI_TEMP
#define GEBED <= #define GEBED <=
#else #else
@ -1566,16 +1588,16 @@ ISR(TIMER0_COMPB_vect) {
} // temp_count >= OVERSAMPLENR } // temp_count >= OVERSAMPLENR
#ifdef BABYSTEPPING #ifdef BABYSTEPPING
for (uint8_t axis=X_AXIS; axis<=Z_AXIS; axis++) { for (uint8_t axis = X_AXIS; axis <= Z_AXIS; axis++) {
int curTodo=babystepsTodo[axis]; //get rid of volatile for performance int curTodo = babystepsTodo[axis]; //get rid of volatile for performance
if (curTodo > 0) { if (curTodo > 0) {
babystep(axis,/*fwd*/true); babystep(axis,/*fwd*/true);
babystepsTodo[axis]--; //less to do next time babystepsTodo[axis]--; //fewer to do next time
} }
else if(curTodo < 0) { else if (curTodo < 0) {
babystep(axis,/*fwd*/false); babystep(axis,/*fwd*/false);
babystepsTodo[axis]++; //less to do next time babystepsTodo[axis]++; //fewer to do next time
} }
} }
#endif //BABYSTEPPING #endif //BABYSTEPPING

@ -18,8 +18,8 @@
along with Grbl. If not, see <http://www.gnu.org/licenses/>. along with Grbl. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef temperature_h #ifndef TEMPERATURE_H
#define temperature_h #define TEMPERATURE_H
#include "Marlin.h" #include "Marlin.h"
#include "planner.h" #include "planner.h"
@ -41,10 +41,10 @@ void manage_heater(); //it is critical that this is called periodically.
// low level conversion routines // low level conversion routines
// do not use these routines and variables outside of temperature.cpp // do not use these routines and variables outside of temperature.cpp
extern int target_temperature[EXTRUDERS]; extern int target_temperature[4];
extern float current_temperature[EXTRUDERS]; extern float current_temperature[4];
#ifdef SHOW_TEMP_ADC_VALUES #ifdef SHOW_TEMP_ADC_VALUES
extern int current_temperature_raw[EXTRUDERS]; extern int current_temperature_raw[4];
extern int current_temperature_bed_raw; extern int current_temperature_bed_raw;
#endif #endif
extern int target_temperature_bed; extern int target_temperature_bed;
@ -53,7 +53,7 @@ extern float current_temperature_bed;
extern float redundant_temperature; extern float redundant_temperature;
#endif #endif
#if defined(CONTROLLERFAN_PIN) && CONTROLLERFAN_PIN > -1 #if HAS_CONTROLLERFAN
extern unsigned char soft_pwm_bed; extern unsigned char soft_pwm_bed;
#endif #endif
@ -72,11 +72,11 @@ extern float current_temperature_bed;
float unscalePID_d(float d); float unscalePID_d(float d);
#endif #endif
#ifdef PIDTEMPBED #ifdef PIDTEMPBED
extern float bedKp,bedKi,bedKd; extern float bedKp,bedKi,bedKd;
#endif #endif
#ifdef BABYSTEPPING #ifdef BABYSTEPPING
extern volatile int babystepsTodo[3]; extern volatile int babystepsTodo[3];
#endif #endif
@ -105,57 +105,38 @@ FORCE_INLINE bool isHeatingBed() { return target_temperature_bed > current_tempe
FORCE_INLINE bool isCoolingHotend(uint8_t extruder) { return target_temperature[extruder] < current_temperature[extruder]; } FORCE_INLINE bool isCoolingHotend(uint8_t extruder) { return target_temperature[extruder] < current_temperature[extruder]; }
FORCE_INLINE bool isCoolingBed() { return target_temperature_bed < current_temperature_bed; } FORCE_INLINE bool isCoolingBed() { return target_temperature_bed < current_temperature_bed; }
#define degHotend0() degHotend(0) #define HOTEND_ROUTINES(NR) \
#define degTargetHotend0() degTargetHotend(0) FORCE_INLINE float degHotend##NR() { return degHotend(NR); } \
#define setTargetHotend0(_celsius) setTargetHotend((_celsius), 0) FORCE_INLINE float degTargetHotend##NR() { return degTargetHotend(NR); } \
#define isHeatingHotend0() isHeatingHotend(0) FORCE_INLINE void setTargetHotend##NR(const float c) { setTargetHotend(c, NR); } \
#define isCoolingHotend0() isCoolingHotend(0) FORCE_INLINE bool isHeatingHotend##NR() { return isHeatingHotend(NR); } \
FORCE_INLINE bool isCoolingHotend##NR() { return isCoolingHotend(NR); }
HOTEND_ROUTINES(0);
#if EXTRUDERS > 1 #if EXTRUDERS > 1
#define degHotend1() degHotend(1) HOTEND_ROUTINES(1);
#define degTargetHotend1() degTargetHotend(1)
#define setTargetHotend1(_celsius) setTargetHotend((_celsius), 1)
#define isHeatingHotend1() isHeatingHotend(1)
#define isCoolingHotend1() isCoolingHotend(1)
#else #else
#define setTargetHotend1(_celsius) do{}while(0) #define setTargetHotend1(c) do{}while(0)
#endif #endif
#if EXTRUDERS > 2 #if EXTRUDERS > 2
#define degHotend2() degHotend(2) HOTEND_ROUTINES(2);
#define degTargetHotend2() degTargetHotend(2)
#define setTargetHotend2(_celsius) setTargetHotend((_celsius), 2)
#define isHeatingHotend2() isHeatingHotend(2)
#define isCoolingHotend2() isCoolingHotend(2)
#else #else
#define setTargetHotend2(_celsius) do{}while(0) #define setTargetHotend2(c) do{}while(0)
#endif #endif
#if EXTRUDERS > 3 #if EXTRUDERS > 3
#define degHotend3() degHotend(3) HOTEND_ROUTINES(3);
#define degTargetHotend3() degTargetHotend(3)
#define setTargetHotend3(_celsius) setTargetHotend((_celsius), 3)
#define isHeatingHotend3() isHeatingHotend(3)
#define isCoolingHotend3() isCoolingHotend(3)
#else #else
#define setTargetHotend3(_celsius) do{}while(0) #define setTargetHotend3(c) do{}while(0)
#endif
#if EXTRUDERS > 4
#error Invalid number of extruders
#endif #endif
int getHeaterPower(int heater); int getHeaterPower(int heater);
void disable_heater(); void disable_all_heaters();
void setWatch(); void setWatch();
void updatePID(); void updatePID();
#if defined (THERMAL_RUNAWAY_PROTECTION_PERIOD) && THERMAL_RUNAWAY_PROTECTION_PERIOD > 0 void PID_autotune(float temp, int extruder, int ncycles);
void thermal_runaway_protection(int *state, unsigned long *timer, float temperature, float target_temperature, int heater_id, int period_seconds, int hysteresis_degc);
static int thermal_runaway_state_machine[4]; // = {0,0,0,0}; void setExtruderAutoFanState(int pin, bool state);
static unsigned long thermal_runaway_timer[4]; // = {0,0,0,0}; void checkExtruderAutoFans();
static bool thermal_runaway = false;
#if TEMP_SENSOR_BED != 0
static int thermal_runaway_bed_state_machine;
static unsigned long thermal_runaway_bed_timer;
#endif
#endif
FORCE_INLINE void autotempShutdown() { FORCE_INLINE void autotempShutdown() {
#ifdef AUTOTEMP #ifdef AUTOTEMP
@ -167,9 +148,4 @@ FORCE_INLINE void autotempShutdown() {
#endif #endif
} }
void PID_autotune(float temp, int extruder, int ncycles); #endif // TEMPERATURE_H
void setExtruderAutoFanState(int pin, bool state);
void checkExtruderAutoFans();
#endif

@ -22,124 +22,122 @@ int absPreheatHPBTemp;
int absPreheatFanSpeed; int absPreheatFanSpeed;
#ifdef FILAMENT_LCD_DISPLAY #ifdef FILAMENT_LCD_DISPLAY
unsigned long message_millis = 0; millis_t previous_lcd_status_ms = 0;
#endif #endif
#ifdef ULTIPANEL
static float manual_feedrate[] = MANUAL_FEEDRATE;
#endif // ULTIPANEL
/* !Configuration settings */ /* !Configuration settings */
//Function pointer to menu functions. //Function pointer to menu functions.
typedef void (*menuFunc_t)(); typedef void (*menuFunc_t)();
uint8_t lcd_status_message_level; uint8_t lcd_status_message_level;
char lcd_status_message[LCD_WIDTH+1] = WELCOME_MSG; char lcd_status_message[3*LCD_WIDTH+1] = WELCOME_MSG; // worst case is kana with up to 3*LCD_WIDTH+1
#ifdef DOGLCD #ifdef DOGLCD
#include "dogm_lcd_implementation.h" #include "dogm_lcd_implementation.h"
#else #else
#include "ultralcd_implementation_hitachi_HD44780.h" #include "ultralcd_implementation_hitachi_HD44780.h"
#endif #endif
/* Different menus */ // The main status screen
static void lcd_status_screen(); static void lcd_status_screen();
#ifdef ULTIPANEL #ifdef ULTIPANEL
extern bool powersupply;
static void lcd_main_menu();
static void lcd_tune_menu();
static void lcd_prepare_menu();
static void lcd_move_menu();
static void lcd_control_menu();
static void lcd_control_temperature_menu();
static void lcd_control_temperature_preheat_pla_settings_menu();
static void lcd_control_temperature_preheat_abs_settings_menu();
static void lcd_control_motion_menu();
static void lcd_control_volumetric_menu();
#ifdef DOGLCD
static void lcd_set_contrast();
#endif
#ifdef FWRETRACT
static void lcd_control_retract_menu();
#endif
static void lcd_sdcard_menu();
#ifdef DELTA_CALIBRATION_MENU #if HAS_POWER_SWITCH
static void lcd_delta_calibrate_menu(); extern bool powersupply;
#endif // DELTA_CALIBRATION_MENU #endif
static float manual_feedrate[] = MANUAL_FEEDRATE;
static void lcd_main_menu();
static void lcd_tune_menu();
static void lcd_prepare_menu();
static void lcd_move_menu();
static void lcd_control_menu();
static void lcd_control_temperature_menu();
static void lcd_control_temperature_preheat_pla_settings_menu();
static void lcd_control_temperature_preheat_abs_settings_menu();
static void lcd_control_motion_menu();
static void lcd_control_volumetric_menu();
#ifdef HAS_LCD_CONTRAST
static void lcd_set_contrast();
#endif
#ifdef FWRETRACT
static void lcd_control_retract_menu();
#endif
static void lcd_sdcard_menu();
#if defined(MANUAL_BED_LEVELING) #ifdef DELTA_CALIBRATION_MENU
#include "mesh_bed_leveling.h" static void lcd_delta_calibrate_menu();
static void _lcd_level_bed(); #endif
static void _lcd_level_bed_homing();
static void lcd_level_bed();
#endif // MANUAL_BED_LEVELING
static void lcd_quick_feedback();//Cause an LCD refresh, and give the user visual or audible feedback that something has happened #if defined(MANUAL_BED_LEVELING)
#include "mesh_bed_leveling.h"
/* Different types of actions that can be used in menu items. */ static void _lcd_level_bed();
static void menu_action_back(menuFunc_t data); static void _lcd_level_bed_homing();
static void menu_action_submenu(menuFunc_t data); static void lcd_level_bed();
static void menu_action_gcode(const char* pgcode); #endif
static void menu_action_function(menuFunc_t data);
static void menu_action_sdfile(const char* filename, char* longFilename); /* Different types of actions that can be used in menu items. */
static void menu_action_sddirectory(const char* filename, char* longFilename); static void menu_action_back(menuFunc_t data);
static void menu_action_setting_edit_bool(const char* pstr, bool* ptr); static void menu_action_submenu(menuFunc_t data);
static void menu_action_setting_edit_int3(const char* pstr, int* ptr, int minValue, int maxValue); static void menu_action_gcode(const char* pgcode);
static void menu_action_setting_edit_float3(const char* pstr, float* ptr, float minValue, float maxValue); static void menu_action_function(menuFunc_t data);
static void menu_action_setting_edit_float32(const char* pstr, float* ptr, float minValue, float maxValue); static void menu_action_sdfile(const char* filename, char* longFilename);
static void menu_action_setting_edit_float43(const char* pstr, float* ptr, float minValue, float maxValue); static void menu_action_sddirectory(const char* filename, char* longFilename);
static void menu_action_setting_edit_float5(const char* pstr, float* ptr, float minValue, float maxValue); static void menu_action_setting_edit_bool(const char* pstr, bool* ptr);
static void menu_action_setting_edit_float51(const char* pstr, float* ptr, float minValue, float maxValue); static void menu_action_setting_edit_int3(const char* pstr, int* ptr, int minValue, int maxValue);
static void menu_action_setting_edit_float52(const char* pstr, float* ptr, float minValue, float maxValue); static void menu_action_setting_edit_float3(const char* pstr, float* ptr, float minValue, float maxValue);
static void menu_action_setting_edit_long5(const char* pstr, unsigned long* ptr, unsigned long minValue, unsigned long maxValue); static void menu_action_setting_edit_float32(const char* pstr, float* ptr, float minValue, float maxValue);
static void menu_action_setting_edit_callback_bool(const char* pstr, bool* ptr, menuFunc_t callbackFunc); static void menu_action_setting_edit_float43(const char* pstr, float* ptr, float minValue, float maxValue);
static void menu_action_setting_edit_callback_int3(const char* pstr, int* ptr, int minValue, int maxValue, menuFunc_t callbackFunc); static void menu_action_setting_edit_float5(const char* pstr, float* ptr, float minValue, float maxValue);
static void menu_action_setting_edit_callback_float3(const char* pstr, float* ptr, float minValue, float maxValue, menuFunc_t callbackFunc); static void menu_action_setting_edit_float51(const char* pstr, float* ptr, float minValue, float maxValue);
static void menu_action_setting_edit_callback_float32(const char* pstr, float* ptr, float minValue, float maxValue, menuFunc_t callbackFunc); static void menu_action_setting_edit_float52(const char* pstr, float* ptr, float minValue, float maxValue);
static void menu_action_setting_edit_callback_float43(const char* pstr, float* ptr, float minValue, float maxValue, menuFunc_t callbackFunc); static void menu_action_setting_edit_long5(const char* pstr, unsigned long* ptr, unsigned long minValue, unsigned long maxValue);
static void menu_action_setting_edit_callback_float5(const char* pstr, float* ptr, float minValue, float maxValue, menuFunc_t callbackFunc); static void menu_action_setting_edit_callback_bool(const char* pstr, bool* ptr, menuFunc_t callbackFunc);
static void menu_action_setting_edit_callback_float51(const char* pstr, float* ptr, float minValue, float maxValue, menuFunc_t callbackFunc); static void menu_action_setting_edit_callback_int3(const char* pstr, int* ptr, int minValue, int maxValue, menuFunc_t callbackFunc);
static void menu_action_setting_edit_callback_float52(const char* pstr, float* ptr, float minValue, float maxValue, menuFunc_t callbackFunc); static void menu_action_setting_edit_callback_float3(const char* pstr, float* ptr, float minValue, float maxValue, menuFunc_t callbackFunc);
static void menu_action_setting_edit_callback_long5(const char* pstr, unsigned long* ptr, unsigned long minValue, unsigned long maxValue, menuFunc_t callbackFunc); static void menu_action_setting_edit_callback_float32(const char* pstr, float* ptr, float minValue, float maxValue, menuFunc_t callbackFunc);
static void menu_action_setting_edit_callback_float43(const char* pstr, float* ptr, float minValue, float maxValue, menuFunc_t callbackFunc);
#define ENCODER_FEEDRATE_DEADZONE 10 static void menu_action_setting_edit_callback_float5(const char* pstr, float* ptr, float minValue, float maxValue, menuFunc_t callbackFunc);
static void menu_action_setting_edit_callback_float51(const char* pstr, float* ptr, float minValue, float maxValue, menuFunc_t callbackFunc);
#if !defined(LCD_I2C_VIKI) static void menu_action_setting_edit_callback_float52(const char* pstr, float* ptr, float minValue, float maxValue, menuFunc_t callbackFunc);
static void menu_action_setting_edit_callback_long5(const char* pstr, unsigned long* ptr, unsigned long minValue, unsigned long maxValue, menuFunc_t callbackFunc);
#define ENCODER_FEEDRATE_DEADZONE 10
#if !defined(LCD_I2C_VIKI)
#ifndef ENCODER_STEPS_PER_MENU_ITEM #ifndef ENCODER_STEPS_PER_MENU_ITEM
#define ENCODER_STEPS_PER_MENU_ITEM 5 #define ENCODER_STEPS_PER_MENU_ITEM 5
#endif #endif
#ifndef ENCODER_PULSES_PER_STEP #ifndef ENCODER_PULSES_PER_STEP
#define ENCODER_PULSES_PER_STEP 1 #define ENCODER_PULSES_PER_STEP 1
#endif #endif
#else #else
#ifndef ENCODER_STEPS_PER_MENU_ITEM #ifndef ENCODER_STEPS_PER_MENU_ITEM
#define ENCODER_STEPS_PER_MENU_ITEM 2 // VIKI LCD rotary encoder uses a different number of steps per rotation #define ENCODER_STEPS_PER_MENU_ITEM 2 // VIKI LCD rotary encoder uses a different number of steps per rotation
#endif #endif
#ifndef ENCODER_PULSES_PER_STEP #ifndef ENCODER_PULSES_PER_STEP
#define ENCODER_PULSES_PER_STEP 1 #define ENCODER_PULSES_PER_STEP 1
#endif #endif
#endif #endif
/* Helper macros for menus */ /* Helper macros for menus */
/** /**
* START_MENU generates the init code for a menu function * START_MENU generates the init code for a menu function
*/ */
#define START_MENU() do { \ #define START_MENU() do { \
encoderRateMultiplierEnabled = false; \ encoderRateMultiplierEnabled = false; \
if (encoderPosition > 0x8000) encoderPosition = 0; \ if (encoderPosition > 0x8000) encoderPosition = 0; \
uint8_t encoderLine = encoderPosition / ENCODER_STEPS_PER_MENU_ITEM; \ uint8_t encoderLine = encoderPosition / ENCODER_STEPS_PER_MENU_ITEM; \
if (encoderLine < currentMenuViewOffset) currentMenuViewOffset = encoderLine; \ if (encoderLine < currentMenuViewOffset) currentMenuViewOffset = encoderLine; \
uint8_t _lineNr = currentMenuViewOffset, _menuItemNr; \ uint8_t _lineNr = currentMenuViewOffset, _menuItemNr; \
bool wasClicked = LCD_CLICKED, itemSelected; \ bool wasClicked = LCD_CLICKED, itemSelected; \
if (wasClicked) lcd_quick_feedback(); \
for (uint8_t _drawLineNr = 0; _drawLineNr < LCD_HEIGHT; _drawLineNr++, _lineNr++) { \ for (uint8_t _drawLineNr = 0; _drawLineNr < LCD_HEIGHT; _drawLineNr++, _lineNr++) { \
_menuItemNr = 0; _menuItemNr = 0;
/** /**
* MENU_ITEM generates draw & handler code for a menu item, potentially calling: * MENU_ITEM generates draw & handler code for a menu item, potentially calling:
* *
* lcd_implementation_drawmenu_[type](sel, row, label, arg3...) * lcd_implementation_drawmenu_[type](sel, row, label, arg3...)
@ -154,26 +152,27 @@ static void menu_action_setting_edit_callback_long5(const char* pstr, unsigned l
* lcd_implementation_drawmenu_function(sel, row, PSTR(MSG_PAUSE_PRINT), lcd_sdcard_pause) * lcd_implementation_drawmenu_function(sel, row, PSTR(MSG_PAUSE_PRINT), lcd_sdcard_pause)
* menu_action_function(lcd_sdcard_pause) * menu_action_function(lcd_sdcard_pause)
* *
* MENU_ITEM_EDIT(int3, MSG_SPEED, &feedmultiply, 10, 999) * MENU_ITEM_EDIT(int3, MSG_SPEED, &feedrate_multiplier, 10, 999)
* MENU_ITEM(setting_edit_int3, MSG_SPEED, PSTR(MSG_SPEED), &feedmultiply, 10, 999) * MENU_ITEM(setting_edit_int3, MSG_SPEED, PSTR(MSG_SPEED), &feedrate_multiplier, 10, 999)
* lcd_implementation_drawmenu_setting_edit_int3(sel, row, PSTR(MSG_SPEED), PSTR(MSG_SPEED), &feedmultiply, 10, 999) * lcd_implementation_drawmenu_setting_edit_int3(sel, row, PSTR(MSG_SPEED), PSTR(MSG_SPEED), &feedrate_multiplier, 10, 999)
* menu_action_setting_edit_int3(PSTR(MSG_SPEED), &feedmultiply, 10, 999) * menu_action_setting_edit_int3(PSTR(MSG_SPEED), &feedrate_multiplier, 10, 999)
* *
*/ */
#define MENU_ITEM(type, label, args...) do { \ #define MENU_ITEM(type, label, args...) do { \
if (_menuItemNr == _lineNr) { \ if (_menuItemNr == _lineNr) { \
itemSelected = encoderLine == _menuItemNr; \ itemSelected = encoderLine == _menuItemNr; \
if (lcdDrawUpdate) \ if (lcdDrawUpdate) \
lcd_implementation_drawmenu_ ## type(itemSelected, _drawLineNr, PSTR(label), ## args); \ lcd_implementation_drawmenu_ ## type(itemSelected, _drawLineNr, PSTR(label), ## args); \
if (wasClicked && itemSelected) { \ if (wasClicked && itemSelected) { \
lcd_quick_feedback(); \
menu_action_ ## type(args); \ menu_action_ ## type(args); \
return; \ return; \
} \ } \
} \ } \
_menuItemNr++; \ _menuItemNr++; \
} while(0) } while(0)
#ifdef ENCODER_RATE_MULTIPLIER #ifdef ENCODER_RATE_MULTIPLIER
/** /**
* MENU_MULTIPLIER_ITEM generates drawing and handling code for a multiplier menu item * MENU_MULTIPLIER_ITEM generates drawing and handling code for a multiplier menu item
*/ */
@ -183,6 +182,7 @@ static void menu_action_setting_edit_callback_long5(const char* pstr, unsigned l
if (lcdDrawUpdate) \ if (lcdDrawUpdate) \
lcd_implementation_drawmenu_ ## type(itemSelected, _drawLineNr, PSTR(label), ## args); \ lcd_implementation_drawmenu_ ## type(itemSelected, _drawLineNr, PSTR(label), ## args); \
if (wasClicked && itemSelected) { \ if (wasClicked && itemSelected) { \
lcd_quick_feedback(); \
encoderRateMultiplierEnabled = true; \ encoderRateMultiplierEnabled = true; \
lastEncoderMovementMillis = 0; \ lastEncoderMovementMillis = 0; \
menu_action_ ## type(args); \ menu_action_ ## type(args); \
@ -191,43 +191,44 @@ static void menu_action_setting_edit_callback_long5(const char* pstr, unsigned l
} \ } \
_menuItemNr++; \ _menuItemNr++; \
} while(0) } while(0)
#endif //ENCODER_RATE_MULTIPLIER #endif //ENCODER_RATE_MULTIPLIER
#define MENU_ITEM_DUMMY() do { _menuItemNr++; } while(0) #define MENU_ITEM_DUMMY() do { _menuItemNr++; } while(0)
#define MENU_ITEM_EDIT(type, label, args...) MENU_ITEM(setting_edit_ ## type, label, PSTR(label), ## args) #define MENU_ITEM_EDIT(type, label, args...) MENU_ITEM(setting_edit_ ## type, label, PSTR(label), ## args)
#define MENU_ITEM_EDIT_CALLBACK(type, label, args...) MENU_ITEM(setting_edit_callback_ ## type, label, PSTR(label), ## args) #define MENU_ITEM_EDIT_CALLBACK(type, label, args...) MENU_ITEM(setting_edit_callback_ ## type, label, PSTR(label), ## args)
#ifdef ENCODER_RATE_MULTIPLIER #ifdef ENCODER_RATE_MULTIPLIER
#define MENU_MULTIPLIER_ITEM_EDIT(type, label, args...) MENU_MULTIPLIER_ITEM(setting_edit_ ## type, label, PSTR(label), ## args) #define MENU_MULTIPLIER_ITEM_EDIT(type, label, args...) MENU_MULTIPLIER_ITEM(setting_edit_ ## type, label, PSTR(label), ## args)
#define MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(type, label, args...) MENU_MULTIPLIER_ITEM(setting_edit_callback_ ## type, label, PSTR(label), ## args) #define MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(type, label, args...) MENU_MULTIPLIER_ITEM(setting_edit_callback_ ## type, label, PSTR(label), ## args)
#else //!ENCODER_RATE_MULTIPLIER #else //!ENCODER_RATE_MULTIPLIER
#define MENU_MULTIPLIER_ITEM_EDIT(type, label, args...) MENU_ITEM(setting_edit_ ## type, label, PSTR(label), ## args) #define MENU_MULTIPLIER_ITEM_EDIT(type, label, args...) MENU_ITEM(setting_edit_ ## type, label, PSTR(label), ## args)
#define MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(type, label, args...) MENU_ITEM(setting_edit_callback_ ## type, label, PSTR(label), ## args) #define MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(type, label, args...) MENU_ITEM(setting_edit_callback_ ## type, label, PSTR(label), ## args)
#endif //!ENCODER_RATE_MULTIPLIER #endif //!ENCODER_RATE_MULTIPLIER
#define END_MENU() \ #define END_MENU() \
if (encoderLine >= _menuItemNr) encoderPosition = _menuItemNr * ENCODER_STEPS_PER_MENU_ITEM - 1; encoderLine = encoderPosition / ENCODER_STEPS_PER_MENU_ITEM;\ if (encoderLine >= _menuItemNr) { encoderPosition = _menuItemNr * ENCODER_STEPS_PER_MENU_ITEM - 1; encoderLine = encoderPosition / ENCODER_STEPS_PER_MENU_ITEM; }\
if (encoderLine >= currentMenuViewOffset + LCD_HEIGHT) { currentMenuViewOffset = encoderLine - LCD_HEIGHT + 1; lcdDrawUpdate = 1; _lineNr = currentMenuViewOffset - 1; _drawLineNr = -1; } \ if (encoderLine >= currentMenuViewOffset + LCD_HEIGHT) { currentMenuViewOffset = encoderLine - LCD_HEIGHT + 1; lcdDrawUpdate = 1; _lineNr = currentMenuViewOffset - 1; _drawLineNr = -1; } \
} } while(0) } } while(0)
/** Used variables to keep track of the menu */ /** Used variables to keep track of the menu */
#ifndef REPRAPWORLD_KEYPAD #ifndef REPRAPWORLD_KEYPAD
volatile uint8_t buttons;//Contains the bits of the currently pressed buttons. volatile uint8_t buttons; // Bits of the pressed buttons.
#else #else
volatile uint8_t buttons_reprapworld_keypad; // to store the reprapworld_keypad shift register values volatile uint8_t buttons_reprapworld_keypad; // The reprapworld_keypad shift register values
#endif #endif
#ifdef LCD_HAS_SLOW_BUTTONS #ifdef LCD_HAS_SLOW_BUTTONS
volatile uint8_t slow_buttons;//Contains the bits of the currently pressed buttons. volatile uint8_t slow_buttons; // Bits of the pressed buttons.
#endif #endif
uint8_t currentMenuViewOffset; /* scroll offset in the current menu */ uint8_t currentMenuViewOffset; /* scroll offset in the current menu */
uint32_t blocking_enc; millis_t next_button_update_ms;
uint8_t lastEncoderBits; uint8_t lastEncoderBits;
uint32_t encoderPosition; uint32_t encoderPosition;
#if (SDCARDDETECT > 0) #if (SDCARDDETECT > 0)
bool lcd_oldcardstatus; bool lcd_oldcardstatus;
#endif #endif
#endif //ULTIPANEL
#endif // ULTIPANEL
menuFunc_t currentMenu = lcd_status_screen; /* function pointer to the currently active menu */ menuFunc_t currentMenu = lcd_status_screen; /* function pointer to the currently active menu */
uint32_t lcd_next_update_millis; millis_t next_lcd_update_ms;
uint8_t lcd_status_update_delay; uint8_t lcd_status_update_delay;
bool ignore_click = false; bool ignore_click = false;
bool wait_for_unclick; bool wait_for_unclick;
@ -245,74 +246,67 @@ menuFunc_t callbackFunc;
// place-holders for Ki and Kd edits // place-holders for Ki and Kd edits
float raw_Ki, raw_Kd; float raw_Ki, raw_Kd;
static void lcd_goto_menu(menuFunc_t menu, const uint32_t encoder=0, const bool feedback=true) { static void lcd_goto_menu(menuFunc_t menu, const bool feedback=false, const uint32_t encoder=0) {
if (currentMenu != menu) { if (currentMenu != menu) {
currentMenu = menu; currentMenu = menu;
#ifdef NEWPANEL
encoderPosition = encoder; encoderPosition = encoder;
if (feedback) lcd_quick_feedback(); if (feedback) lcd_quick_feedback();
#endif
// For LCD_PROGRESS_BAR re-initialize the custom characters // For LCD_PROGRESS_BAR re-initialize the custom characters
#if defined(LCD_PROGRESS_BAR) && defined(SDSUPPORT) && !defined(DOGLCD) #ifdef LCD_PROGRESS_BAR
lcd_set_custom_characters(menu == lcd_status_screen); lcd_set_custom_characters(menu == lcd_status_screen);
#endif #endif
} }
} }
/* Main status screen. It's up to the implementation specific part to show what is needed. As this is very display dependent */ /* Main status screen. It's up to the implementation specific part to show what is needed. As this is very display dependent */
static void lcd_status_screen() static void lcd_status_screen() {
{
encoderRateMultiplierEnabled = false; encoderRateMultiplierEnabled = false;
#if defined(LCD_PROGRESS_BAR) && defined(SDSUPPORT) && !defined(DOGLCD)
uint16_t mil = millis(); #ifdef LCD_PROGRESS_BAR
millis_t ms = millis();
#ifndef PROGRESS_MSG_ONCE #ifndef PROGRESS_MSG_ONCE
if (mil > progressBarTick + PROGRESS_BAR_MSG_TIME + PROGRESS_BAR_BAR_TIME) { if (ms > progressBarTick + PROGRESS_BAR_MSG_TIME + PROGRESS_BAR_BAR_TIME) {
progressBarTick = mil; progressBarTick = ms;
} }
#endif #endif
#if PROGRESS_MSG_EXPIRE > 0 #if PROGRESS_MSG_EXPIRE > 0
// keep the message alive if paused, count down otherwise // Handle message expire
if (messageTick > 0) { if (expireStatusMillis > 0) {
if (card.isFileOpen()) { if (card.isFileOpen()) {
// Expire the message when printing is active
if (IS_SD_PRINTING) { if (IS_SD_PRINTING) {
if ((mil-messageTick) >= PROGRESS_MSG_EXPIRE) { // Expire the message when printing is active
if (ms >= expireStatusMillis) {
lcd_status_message[0] = '\0'; lcd_status_message[0] = '\0';
messageTick = 0; expireStatusMillis = 0;
} }
} }
else { else {
messageTick += LCD_UPDATE_INTERVAL; expireStatusMillis += LCD_UPDATE_INTERVAL;
} }
} }
else { else {
messageTick = 0; expireStatusMillis = 0;
} }
} }
#endif #endif
#endif //LCD_PROGRESS_BAR #endif //LCD_PROGRESS_BAR
if (lcd_status_update_delay)
lcd_status_update_delay--;
else
lcdDrawUpdate = 1;
if (lcdDrawUpdate) {
lcd_implementation_status_screen(); lcd_implementation_status_screen();
lcd_status_update_delay = 10; /* redraw the main screen every second. This is easier then trying keep track of all things that change on the screen */
}
#ifdef ULTIPANEL #ifdef ULTIPANEL
bool current_click = LCD_CLICKED; bool current_click = LCD_CLICKED;
if (ignore_click) { if (ignore_click) {
if (wait_for_unclick) { if (wait_for_unclick) {
if (!current_click) { if (!current_click)
ignore_click = wait_for_unclick = false; ignore_click = wait_for_unclick = false;
} else
else {
current_click = false; current_click = false;
} }
}
else if (current_click) { else if (current_click) {
lcd_quick_feedback(); lcd_quick_feedback();
wait_for_unclick = true; wait_for_unclick = true;
@ -320,55 +314,49 @@ static void lcd_status_screen()
} }
} }
if (current_click) if (current_click) {
{ lcd_goto_menu(lcd_main_menu, true);
lcd_goto_menu(lcd_main_menu);
lcd_implementation_init( // to maybe revive the LCD if static electricity killed it. lcd_implementation_init( // to maybe revive the LCD if static electricity killed it.
#if defined(LCD_PROGRESS_BAR) && defined(SDSUPPORT) && !defined(DOGLCD) #ifdef LCD_PROGRESS_BAR
currentMenu == lcd_status_screen currentMenu == lcd_status_screen
#endif #endif
); );
#ifdef FILAMENT_LCD_DISPLAY #ifdef FILAMENT_LCD_DISPLAY
message_millis = millis(); // get status message to show up for a while previous_lcd_status_ms = millis(); // get status message to show up for a while
#endif #endif
} }
#ifdef ULTIPANEL_FEEDMULTIPLY #ifdef ULTIPANEL_FEEDMULTIPLY
// Dead zone at 100% feedrate // Dead zone at 100% feedrate
if ((feedmultiply < 100 && (feedmultiply + int(encoderPosition)) > 100) || if ((feedrate_multiplier < 100 && (feedrate_multiplier + int(encoderPosition)) > 100) ||
(feedmultiply > 100 && (feedmultiply + int(encoderPosition)) < 100)) (feedrate_multiplier > 100 && (feedrate_multiplier + int(encoderPosition)) < 100)) {
{
encoderPosition = 0; encoderPosition = 0;
feedmultiply = 100; feedrate_multiplier = 100;
} }
if (feedrate_multiplier == 100) {
if (feedmultiply == 100 && int(encoderPosition) > ENCODER_FEEDRATE_DEADZONE) if (int(encoderPosition) > ENCODER_FEEDRATE_DEADZONE) {
{ feedrate_multiplier += int(encoderPosition) - ENCODER_FEEDRATE_DEADZONE;
feedmultiply += int(encoderPosition) - ENCODER_FEEDRATE_DEADZONE;
encoderPosition = 0; encoderPosition = 0;
} }
else if (feedmultiply == 100 && int(encoderPosition) < -ENCODER_FEEDRATE_DEADZONE) else if (int(encoderPosition) < -ENCODER_FEEDRATE_DEADZONE) {
{ feedrate_multiplier += int(encoderPosition) + ENCODER_FEEDRATE_DEADZONE;
feedmultiply += int(encoderPosition) + ENCODER_FEEDRATE_DEADZONE;
encoderPosition = 0; encoderPosition = 0;
} }
else if (feedmultiply != 100) }
{ else {
feedmultiply += int(encoderPosition); feedrate_multiplier += int(encoderPosition);
encoderPosition = 0; encoderPosition = 0;
} }
#endif //ULTIPANEL_FEEDMULTIPLY #endif // ULTIPANEL_FEEDMULTIPLY
if (feedmultiply < 10) feedrate_multiplier = constrain(feedrate_multiplier, 10, 999);
feedmultiply = 10;
else if (feedmultiply > 999) #endif //ULTIPANEL
feedmultiply = 999;
#endif //ULTIPANEL
} }
#ifdef ULTIPANEL #ifdef ULTIPANEL
static void lcd_return_to_status() { lcd_goto_menu(lcd_status_screen, 0, false); } static void lcd_return_to_status() { lcd_goto_menu(lcd_status_screen); }
static void lcd_sdcard_pause() { card.pauseSDPrint(); } static void lcd_sdcard_pause() { card.pauseSDPrint(); }
@ -380,7 +368,7 @@ static void lcd_sdcard_stop() {
card.closefile(); card.closefile();
autotempShutdown(); autotempShutdown();
cancel_heatup = true; cancel_heatup = true;
lcd_setstatus(MSG_PRINT_ABORTED); lcd_setstatus(MSG_PRINT_ABORTED, true);
} }
/* Menu implementation */ /* Menu implementation */
@ -425,7 +413,7 @@ static void lcd_main_menu() {
END_MENU(); END_MENU();
} }
#if defined( SDSUPPORT ) && defined( MENU_ADDAUTOSTART ) #if defined(SDSUPPORT) && defined(MENU_ADDAUTOSTART)
static void lcd_autostart_sd() { static void lcd_autostart_sd() {
card.autostart_index = 0; card.autostart_index = 0;
card.setroot(); card.setroot();
@ -434,7 +422,7 @@ static void lcd_main_menu() {
#endif #endif
void lcd_set_home_offsets() { void lcd_set_home_offsets() {
for(int8_t i=0; i < NUM_AXIS; i++) { for (int8_t i=0; i < NUM_AXIS; i++) {
if (i != E_AXIS) { if (i != E_AXIS) {
home_offset[i] -= current_position[i]; home_offset[i] -= current_position[i];
current_position[i] = 0.0; current_position[i] = 0.0;
@ -443,7 +431,7 @@ void lcd_set_home_offsets() {
plan_set_position(0.0, 0.0, 0.0, current_position[E_AXIS]); plan_set_position(0.0, 0.0, 0.0, current_position[E_AXIS]);
// Audio feedback // Audio feedback
enquecommands_P(PSTR("M300 S659 P200\nM300 S698 P200")); enqueuecommands_P(PSTR("M300 S659 P200\nM300 S698 P200"));
lcd_return_to_status(); lcd_return_to_status();
} }
@ -468,7 +456,7 @@ void lcd_set_home_offsets() {
static void lcd_tune_menu() { static void lcd_tune_menu() {
START_MENU(); START_MENU();
MENU_ITEM(back, MSG_MAIN, lcd_main_menu); MENU_ITEM(back, MSG_MAIN, lcd_main_menu);
MENU_ITEM_EDIT(int3, MSG_SPEED, &feedmultiply, 10, 999); MENU_ITEM_EDIT(int3, MSG_SPEED, &feedrate_multiplier, 10, 999);
#if TEMP_SENSOR_0 != 0 #if TEMP_SENSOR_0 != 0
MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_NOZZLE, &target_temperature[0], 0, HEATER_0_MAXTEMP - 15); MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_NOZZLE, &target_temperature[0], 0, HEATER_0_MAXTEMP - 15);
#endif #endif
@ -485,7 +473,7 @@ static void lcd_tune_menu() {
MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_BED, &target_temperature_bed, 0, BED_MAXTEMP - 15); MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_BED, &target_temperature_bed, 0, BED_MAXTEMP - 15);
#endif #endif
MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_FAN_SPEED, &fanSpeed, 0, 255); MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_FAN_SPEED, &fanSpeed, 0, 255);
MENU_ITEM_EDIT(int3, MSG_FLOW, &extrudemultiply, 10, 999); MENU_ITEM_EDIT(int3, MSG_FLOW, &extruder_multiply[active_extruder], 10, 999);
MENU_ITEM_EDIT(int3, MSG_FLOW MSG_F0, &extruder_multiply[0], 10, 999); MENU_ITEM_EDIT(int3, MSG_FLOW MSG_F0, &extruder_multiply[0], 10, 999);
#if TEMP_SENSOR_1 != 0 #if TEMP_SENSOR_1 != 0
MENU_ITEM_EDIT(int3, MSG_FLOW MSG_F1, &extruder_multiply[1], 10, 999); MENU_ITEM_EDIT(int3, MSG_FLOW MSG_F1, &extruder_multiply[1], 10, 999);
@ -520,22 +508,21 @@ void _lcd_preheat(int endnum, const float temph, const float tempb, const int fa
void lcd_preheat_pla0() { _lcd_preheat(0, plaPreheatHotendTemp, plaPreheatHPBTemp, plaPreheatFanSpeed); } void lcd_preheat_pla0() { _lcd_preheat(0, plaPreheatHotendTemp, plaPreheatHPBTemp, plaPreheatFanSpeed); }
void lcd_preheat_abs0() { _lcd_preheat(0, absPreheatHotendTemp, absPreheatHPBTemp, absPreheatFanSpeed); } void lcd_preheat_abs0() { _lcd_preheat(0, absPreheatHotendTemp, absPreheatHPBTemp, absPreheatFanSpeed); }
#if TEMP_SENSOR_1 != 0 //2nd extruder preheat #if TEMP_SENSOR_1 != 0 || TEMP_SENSOR_2 != 0 || TEMP_SENSOR_3 != 0 || TEMP_SENSOR_BED != 0 //more than one extruder present
#if TEMP_SENSOR_1 != 0
void lcd_preheat_pla1() { _lcd_preheat(1, plaPreheatHotendTemp, plaPreheatHPBTemp, plaPreheatFanSpeed); } void lcd_preheat_pla1() { _lcd_preheat(1, plaPreheatHotendTemp, plaPreheatHPBTemp, plaPreheatFanSpeed); }
void lcd_preheat_abs1() { _lcd_preheat(1, absPreheatHotendTemp, absPreheatHPBTemp, absPreheatFanSpeed); } void lcd_preheat_abs1() { _lcd_preheat(1, absPreheatHotendTemp, absPreheatHPBTemp, absPreheatFanSpeed); }
#endif //2nd extruder preheat #endif
#if TEMP_SENSOR_2 != 0
#if TEMP_SENSOR_2 != 0 //3 extruder preheat
void lcd_preheat_pla2() { _lcd_preheat(2, plaPreheatHotendTemp, plaPreheatHPBTemp, plaPreheatFanSpeed); } void lcd_preheat_pla2() { _lcd_preheat(2, plaPreheatHotendTemp, plaPreheatHPBTemp, plaPreheatFanSpeed); }
void lcd_preheat_abs2() { _lcd_preheat(2, absPreheatHotendTemp, absPreheatHPBTemp, absPreheatFanSpeed); } void lcd_preheat_abs2() { _lcd_preheat(2, absPreheatHotendTemp, absPreheatHPBTemp, absPreheatFanSpeed); }
#endif //3 extruder preheat #endif
#if TEMP_SENSOR_3 != 0
#if TEMP_SENSOR_3 != 0 //4 extruder preheat
void lcd_preheat_pla3() { _lcd_preheat(3, plaPreheatHotendTemp, plaPreheatHPBTemp, plaPreheatFanSpeed); } void lcd_preheat_pla3() { _lcd_preheat(3, plaPreheatHotendTemp, plaPreheatHPBTemp, plaPreheatFanSpeed); }
void lcd_preheat_abs3() { _lcd_preheat(3, absPreheatHotendTemp, absPreheatHPBTemp, absPreheatFanSpeed); } void lcd_preheat_abs3() { _lcd_preheat(3, absPreheatHotendTemp, absPreheatHPBTemp, absPreheatFanSpeed); }
#endif //4 extruder preheat #endif
#if TEMP_SENSOR_1 != 0 || TEMP_SENSOR_2 != 0 || TEMP_SENSOR_3 != 0 //more than one extruder present
void lcd_preheat_pla0123() { void lcd_preheat_pla0123() {
setTargetHotend0(plaPreheatHotendTemp); setTargetHotend0(plaPreheatHotendTemp);
setTargetHotend1(plaPreheatHotendTemp); setTargetHotend1(plaPreheatHotendTemp);
@ -548,54 +535,54 @@ void lcd_preheat_abs0() { _lcd_preheat(0, absPreheatHotendTemp, absPreheatHPBTem
setTargetHotend2(absPreheatHotendTemp); setTargetHotend2(absPreheatHotendTemp);
_lcd_preheat(3, absPreheatHotendTemp, absPreheatHPBTemp, absPreheatFanSpeed); _lcd_preheat(3, absPreheatHotendTemp, absPreheatHPBTemp, absPreheatFanSpeed);
} }
#endif //more than one extruder present
void lcd_preheat_pla_bedonly() { _lcd_preheat(0, 0, plaPreheatHPBTemp, plaPreheatFanSpeed); } #if TEMP_SENSOR_0 != 0
void lcd_preheat_abs_bedonly() { _lcd_preheat(0, 0, absPreheatHPBTemp, absPreheatFanSpeed); }
void lcd_preheat_pla_bedonly() { _lcd_preheat(0, 0, plaPreheatHPBTemp, plaPreheatFanSpeed); }
void lcd_preheat_abs_bedonly() { _lcd_preheat(0, 0, absPreheatHPBTemp, absPreheatFanSpeed); }
static void lcd_preheat_pla_menu() { static void lcd_preheat_pla_menu() {
START_MENU(); START_MENU();
MENU_ITEM(back, MSG_PREPARE, lcd_prepare_menu); MENU_ITEM(back, MSG_PREPARE, lcd_prepare_menu);
MENU_ITEM(function, MSG_PREHEAT_PLA_N MSG_H1, lcd_preheat_pla0); MENU_ITEM(function, MSG_PREHEAT_PLA_N MSG_H1, lcd_preheat_pla0);
#if TEMP_SENSOR_1 != 0 //2 extruder preheat #if TEMP_SENSOR_1 != 0
MENU_ITEM(function, MSG_PREHEAT_PLA_N MSG_H2, lcd_preheat_pla1); MENU_ITEM(function, MSG_PREHEAT_PLA_N MSG_H2, lcd_preheat_pla1);
#endif //2 extruder preheat #endif
#if TEMP_SENSOR_2 != 0 //3 extruder preheat #if TEMP_SENSOR_2 != 0
MENU_ITEM(function, MSG_PREHEAT_PLA_N MSG_H3, lcd_preheat_pla2); MENU_ITEM(function, MSG_PREHEAT_PLA_N MSG_H3, lcd_preheat_pla2);
#endif //3 extruder preheat #endif
#if TEMP_SENSOR_3 != 0 //4 extruder preheat #if TEMP_SENSOR_3 != 0
MENU_ITEM(function, MSG_PREHEAT_PLA_N MSG_H4, lcd_preheat_pla3); MENU_ITEM(function, MSG_PREHEAT_PLA_N MSG_H4, lcd_preheat_pla3);
#endif //4 extruder preheat #endif
#if TEMP_SENSOR_1 != 0 || TEMP_SENSOR_2 != 0 || TEMP_SENSOR_3 != 0 //all extruder preheat
MENU_ITEM(function, MSG_PREHEAT_PLA_ALL, lcd_preheat_pla0123); MENU_ITEM(function, MSG_PREHEAT_PLA_ALL, lcd_preheat_pla0123);
#endif //all extruder preheat
#if TEMP_SENSOR_BED != 0 #if TEMP_SENSOR_BED != 0
MENU_ITEM(function, MSG_PREHEAT_PLA_BEDONLY, lcd_preheat_pla_bedonly); MENU_ITEM(function, MSG_PREHEAT_PLA_BEDONLY, lcd_preheat_pla_bedonly);
#endif #endif
END_MENU(); END_MENU();
} }
static void lcd_preheat_abs_menu() { static void lcd_preheat_abs_menu() {
START_MENU(); START_MENU();
MENU_ITEM(back, MSG_PREPARE, lcd_prepare_menu); MENU_ITEM(back, MSG_PREPARE, lcd_prepare_menu);
MENU_ITEM(function, MSG_PREHEAT_ABS_N MSG_H1, lcd_preheat_abs0); MENU_ITEM(function, MSG_PREHEAT_ABS_N MSG_H1, lcd_preheat_abs0);
#if TEMP_SENSOR_1 != 0 //2 extruder preheat #if TEMP_SENSOR_1 != 0
MENU_ITEM(function, MSG_PREHEAT_ABS_N MSG_H2, lcd_preheat_abs1); MENU_ITEM(function, MSG_PREHEAT_ABS_N MSG_H2, lcd_preheat_abs1);
#endif //2 extruder preheat #endif
#if TEMP_SENSOR_2 != 0 //3 extruder preheat #if TEMP_SENSOR_2 != 0
MENU_ITEM(function, MSG_PREHEAT_ABS_N MSG_H3, lcd_preheat_abs2); MENU_ITEM(function, MSG_PREHEAT_ABS_N MSG_H3, lcd_preheat_abs2);
#endif //3 extruder preheat #endif
#if TEMP_SENSOR_3 != 0 //4 extruder preheat #if TEMP_SENSOR_3 != 0
MENU_ITEM(function, MSG_PREHEAT_ABS_N MSG_H4, lcd_preheat_abs3); MENU_ITEM(function, MSG_PREHEAT_ABS_N MSG_H4, lcd_preheat_abs3);
#endif //4 extruder preheat #endif
#if TEMP_SENSOR_1 != 0 || TEMP_SENSOR_2 != 0 || TEMP_SENSOR_3 != 0 //all extruder preheat
MENU_ITEM(function, MSG_PREHEAT_ABS_ALL, lcd_preheat_abs0123); MENU_ITEM(function, MSG_PREHEAT_ABS_ALL, lcd_preheat_abs0123);
#endif //all extruder preheat
#if TEMP_SENSOR_BED != 0 #if TEMP_SENSOR_BED != 0
MENU_ITEM(function, MSG_PREHEAT_ABS_BEDONLY, lcd_preheat_abs_bedonly); MENU_ITEM(function, MSG_PREHEAT_ABS_BEDONLY, lcd_preheat_abs_bedonly);
#endif #endif
END_MENU(); END_MENU();
} }
#endif
#endif // more than one temperature sensor present
void lcd_cooldown() { void lcd_cooldown() {
setTargetHotend0(0); setTargetHotend0(0);
@ -617,8 +604,9 @@ static void lcd_prepare_menu() {
MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28")); MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28"));
MENU_ITEM(function, MSG_SET_HOME_OFFSETS, lcd_set_home_offsets); MENU_ITEM(function, MSG_SET_HOME_OFFSETS, lcd_set_home_offsets);
//MENU_ITEM(gcode, MSG_SET_ORIGIN, PSTR("G92 X0 Y0 Z0")); //MENU_ITEM(gcode, MSG_SET_ORIGIN, PSTR("G92 X0 Y0 Z0"));
#if TEMP_SENSOR_0 != 0 #if TEMP_SENSOR_0 != 0
#if TEMP_SENSOR_1 != 0 || TEMP_SENSOR_2 != 0 || TEMP_SENSOR_BED != 0 #if TEMP_SENSOR_1 != 0 || TEMP_SENSOR_2 != 0 || TEMP_SENSOR_3 != 0 || TEMP_SENSOR_BED != 0
MENU_ITEM(submenu, MSG_PREHEAT_PLA, lcd_preheat_pla_menu); MENU_ITEM(submenu, MSG_PREHEAT_PLA, lcd_preheat_pla_menu);
MENU_ITEM(submenu, MSG_PREHEAT_ABS, lcd_preheat_abs_menu); MENU_ITEM(submenu, MSG_PREHEAT_ABS, lcd_preheat_abs_menu);
#else #else
@ -626,15 +614,16 @@ static void lcd_prepare_menu() {
MENU_ITEM(function, MSG_PREHEAT_ABS, lcd_preheat_abs0); MENU_ITEM(function, MSG_PREHEAT_ABS, lcd_preheat_abs0);
#endif #endif
#endif #endif
MENU_ITEM(function, MSG_COOLDOWN, lcd_cooldown); MENU_ITEM(function, MSG_COOLDOWN, lcd_cooldown);
#if defined(POWER_SUPPLY) && POWER_SUPPLY > 0 && defined(PS_ON_PIN) && PS_ON_PIN > -1
if (powersupply) { #if HAS_POWER_SWITCH
if (powersupply)
MENU_ITEM(gcode, MSG_SWITCH_PS_OFF, PSTR("M81")); MENU_ITEM(gcode, MSG_SWITCH_PS_OFF, PSTR("M81"));
} else
else {
MENU_ITEM(gcode, MSG_SWITCH_PS_ON, PSTR("M80")); MENU_ITEM(gcode, MSG_SWITCH_PS_ON, PSTR("M80"));
}
#endif #endif
MENU_ITEM(submenu, MSG_MOVE_AXIS, lcd_move_menu); MENU_ITEM(submenu, MSG_MOVE_AXIS, lcd_move_menu);
#if defined(MANUAL_BED_LEVELING) #if defined(MANUAL_BED_LEVELING)
@ -645,8 +634,8 @@ static void lcd_prepare_menu() {
} }
#ifdef DELTA_CALIBRATION_MENU #ifdef DELTA_CALIBRATION_MENU
static void lcd_delta_calibrate_menu()
{ static void lcd_delta_calibrate_menu() {
START_MENU(); START_MENU();
MENU_ITEM(back, MSG_MAIN, lcd_main_menu); MENU_ITEM(back, MSG_MAIN, lcd_main_menu);
MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28")); MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28"));
@ -655,9 +644,19 @@ static void lcd_delta_calibrate_menu()
MENU_ITEM(gcode, MSG_DELTA_CALIBRATE_Z, PSTR("G0 F8000 X0 Y90 Z0")); MENU_ITEM(gcode, MSG_DELTA_CALIBRATE_Z, PSTR("G0 F8000 X0 Y90 Z0"));
MENU_ITEM(gcode, MSG_DELTA_CALIBRATE_CENTER, PSTR("G0 F8000 X0 Y0 Z0")); MENU_ITEM(gcode, MSG_DELTA_CALIBRATE_CENTER, PSTR("G0 F8000 X0 Y0 Z0"));
END_MENU(); END_MENU();
} }
#endif // DELTA_CALIBRATION_MENU #endif // DELTA_CALIBRATION_MENU
inline void line_to_current() {
#ifdef DELTA
calculate_delta(current_position);
plan_buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], current_position[E_AXIS], manual_feedrate[X_AXIS]/60, active_extruder);
#else
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], manual_feedrate[X_AXIS]/60, active_extruder);
#endif
}
float move_menu_scale; float move_menu_scale;
static void lcd_move_menu_axis(); static void lcd_move_menu_axis();
@ -668,12 +667,7 @@ static void _lcd_move(const char *name, int axis, int min, int max) {
if (min_software_endstops && current_position[axis] < min) current_position[axis] = min; if (min_software_endstops && current_position[axis] < min) current_position[axis] = min;
if (max_software_endstops && current_position[axis] > max) current_position[axis] = max; if (max_software_endstops && current_position[axis] > max) current_position[axis] = max;
encoderPosition = 0; encoderPosition = 0;
#ifdef DELTA line_to_current();
calculate_delta(current_position);
plan_buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], current_position[E_AXIS], manual_feedrate[axis]/60, active_extruder);
#else
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], manual_feedrate[axis]/60, active_extruder);
#endif
lcdDrawUpdate = 1; lcdDrawUpdate = 1;
} }
if (lcdDrawUpdate) lcd_implementation_drawedit(name, ftostr31(current_position[axis])); if (lcdDrawUpdate) lcd_implementation_drawedit(name, ftostr31(current_position[axis]));
@ -682,17 +676,11 @@ static void _lcd_move(const char *name, int axis, int min, int max) {
static void lcd_move_x() { _lcd_move(PSTR("X"), X_AXIS, X_MIN_POS, X_MAX_POS); } static void lcd_move_x() { _lcd_move(PSTR("X"), X_AXIS, X_MIN_POS, X_MAX_POS); }
static void lcd_move_y() { _lcd_move(PSTR("Y"), Y_AXIS, Y_MIN_POS, Y_MAX_POS); } static void lcd_move_y() { _lcd_move(PSTR("Y"), Y_AXIS, Y_MIN_POS, Y_MAX_POS); }
static void lcd_move_z() { _lcd_move(PSTR("Z"), Z_AXIS, Z_MIN_POS, Z_MAX_POS); } static void lcd_move_z() { _lcd_move(PSTR("Z"), Z_AXIS, Z_MIN_POS, Z_MAX_POS); }
static void lcd_move_e() { static void lcd_move_e() {
if (encoderPosition != 0) { if (encoderPosition != 0) {
current_position[E_AXIS] += float((int)encoderPosition) * move_menu_scale; current_position[E_AXIS] += float((int)encoderPosition) * move_menu_scale;
encoderPosition = 0; encoderPosition = 0;
#ifdef DELTA line_to_current();
calculate_delta(current_position);
plan_buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], current_position[E_AXIS], manual_feedrate[E_AXIS]/60, active_extruder);
#else
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], manual_feedrate[E_AXIS]/60, active_extruder);
#endif
lcdDrawUpdate = 1; lcdDrawUpdate = 1;
} }
if (lcdDrawUpdate) lcd_implementation_drawedit(PSTR("Extruder"), ftostr31(current_position[E_AXIS])); if (lcdDrawUpdate) lcd_implementation_drawedit(PSTR("Extruder"), ftostr31(current_position[E_AXIS]));
@ -741,7 +729,7 @@ static void lcd_control_menu() {
MENU_ITEM(submenu, MSG_MOTION, lcd_control_motion_menu); MENU_ITEM(submenu, MSG_MOTION, lcd_control_motion_menu);
MENU_ITEM(submenu, MSG_VOLUMETRIC, lcd_control_volumetric_menu); MENU_ITEM(submenu, MSG_VOLUMETRIC, lcd_control_volumetric_menu);
#ifdef DOGLCD #ifdef HAS_LCD_CONTRAST
//MENU_ITEM_EDIT(int3, MSG_CONTRAST, &lcd_contrast, 0, 63); //MENU_ITEM_EDIT(int3, MSG_CONTRAST, &lcd_contrast, 0, 63);
MENU_ITEM(submenu, MSG_CONTRAST, lcd_set_contrast); MENU_ITEM(submenu, MSG_CONTRAST, lcd_set_contrast);
#endif #endif
@ -911,7 +899,7 @@ static void lcd_control_motion_menu() {
START_MENU(); START_MENU();
MENU_ITEM(back, MSG_CONTROL, lcd_control_menu); MENU_ITEM(back, MSG_CONTROL, lcd_control_menu);
#ifdef ENABLE_AUTO_BED_LEVELING #ifdef ENABLE_AUTO_BED_LEVELING
MENU_ITEM_EDIT(float32, MSG_ZPROBE_ZOFFSET, &zprobe_zoffset, 0.0, 50); MENU_ITEM_EDIT(float32, MSG_ZPROBE_ZOFFSET, &zprobe_zoffset, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX);
#endif #endif
MENU_ITEM_EDIT(float5, MSG_ACC, &acceleration, 10, 99000); MENU_ITEM_EDIT(float5, MSG_ACC, &acceleration, 10, 99000);
MENU_ITEM_EDIT(float3, MSG_VXY_JERK, &max_xy_jerk, 1, 990); MENU_ITEM_EDIT(float3, MSG_VXY_JERK, &max_xy_jerk, 1, 990);
@ -965,26 +953,22 @@ static void lcd_control_volumetric_menu() {
END_MENU(); END_MENU();
} }
#ifdef DOGLCD #ifdef HAS_LCD_CONTRAST
static void lcd_set_contrast() {
static void lcd_set_contrast() {
if (encoderPosition != 0) { if (encoderPosition != 0) {
lcd_contrast -= encoderPosition; lcd_contrast -= encoderPosition;
if (lcd_contrast < 0) lcd_contrast = 0; lcd_contrast &= 0x3F;
else if (lcd_contrast > 63) lcd_contrast = 63;
encoderPosition = 0; encoderPosition = 0;
lcdDrawUpdate = 1; lcdDrawUpdate = 1;
u8g.setContrast(lcd_contrast); u8g.setContrast(lcd_contrast);
} }
if (lcdDrawUpdate) lcd_implementation_drawedit(PSTR(MSG_CONTRAST), itostr2(lcd_contrast)); if (lcdDrawUpdate) lcd_implementation_drawedit(PSTR(MSG_CONTRAST), itostr2(lcd_contrast));
if (LCD_CLICKED) lcd_goto_menu(lcd_control_menu); if (LCD_CLICKED) lcd_goto_menu(lcd_control_menu);
} }
#endif // HAS_LCD_CONTRAST
#endif //DOGLCD
#ifdef FWRETRACT #ifdef FWRETRACT
static void lcd_control_retract_menu() {
static void lcd_control_retract_menu() {
START_MENU(); START_MENU();
MENU_ITEM(back, MSG_CONTROL, lcd_control_menu); MENU_ITEM(back, MSG_CONTROL, lcd_control_menu);
MENU_ITEM_EDIT(bool, MSG_AUTORETRACT, &autoretract_enabled); MENU_ITEM_EDIT(bool, MSG_AUTORETRACT, &autoretract_enabled);
@ -1000,9 +984,8 @@ static void lcd_control_retract_menu() {
#endif #endif
MENU_ITEM_EDIT(float3, MSG_CONTROL_RETRACT_RECOVERF, &retract_recover_feedrate, 1, 999); MENU_ITEM_EDIT(float3, MSG_CONTROL_RETRACT_RECOVERF, &retract_recover_feedrate, 1, 999);
END_MENU(); END_MENU();
} }
#endif // FWRETRACT
#endif //FWRETRACT
#if SDCARDDETECT == -1 #if SDCARDDETECT == -1
static void lcd_sd_refresh() { static void lcd_sd_refresh() {
@ -1031,13 +1014,14 @@ void lcd_sdcard_menu() {
MENU_ITEM(function, LCD_STR_FOLDER "..", lcd_sd_updir); MENU_ITEM(function, LCD_STR_FOLDER "..", lcd_sd_updir);
} }
for(uint16_t i = 0; i < fileCnt; i++) { for (uint16_t i = 0; i < fileCnt; i++) {
if (_menuItemNr == _lineNr) { if (_menuItemNr == _lineNr) {
#ifndef SDCARD_RATHERRECENTFIRST card.getfilename(
card.getfilename(i); #ifdef SDCARD_RATHERRECENTFIRST
#else fileCnt-1 -
card.getfilename(fileCnt-1-i);
#endif #endif
i
);
if (card.filenameIsDir) if (card.filenameIsDir)
MENU_ITEM(sddirectory, MSG_CARD_MENU, card.filename, card.longFilename); MENU_ITEM(sddirectory, MSG_CARD_MENU, card.filename, card.longFilename);
else else
@ -1128,30 +1112,57 @@ menu_edit_type(unsigned long, long5, ftostr5, 0.01)
lcd_move_y(); lcd_move_y();
} }
static void reprapworld_keypad_move_home() { static void reprapworld_keypad_move_home() {
enquecommands_P((PSTR("G28"))); // move all axis home enqueuecommands_P((PSTR("G28"))); // move all axis home
} }
#endif //REPRAPWORLD_KEYPAD #endif //REPRAPWORLD_KEYPAD
/** End of menus **/ /** End of menus **/
static void lcd_quick_feedback() { void lcd_quick_feedback() {
lcdDrawUpdate = 2; lcdDrawUpdate = 2;
blocking_enc = millis() + 500; next_button_update_ms = millis() + 500;
lcd_implementation_quick_feedback();
#ifdef LCD_USE_I2C_BUZZER
#ifndef LCD_FEEDBACK_FREQUENCY_HZ
#define LCD_FEEDBACK_FREQUENCY_HZ 100
#endif
#ifndef LCD_FEEDBACK_FREQUENCY_DURATION_MS
#define LCD_FEEDBACK_FREQUENCY_DURATION_MS (1000/6)
#endif
lcd_buzz(LCD_FEEDBACK_FREQUENCY_DURATION_MS, LCD_FEEDBACK_FREQUENCY_HZ);
#elif defined(BEEPER) && BEEPER > -1
SET_OUTPUT(BEEPER);
#ifndef LCD_FEEDBACK_FREQUENCY_HZ
#define LCD_FEEDBACK_FREQUENCY_HZ 5000
#endif
#ifndef LCD_FEEDBACK_FREQUENCY_DURATION_MS
#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
#endif
const uint16_t delay = 1000000 / LCD_FEEDBACK_FREQUENCY_HZ / 2;
uint16_t i = LCD_FEEDBACK_FREQUENCY_DURATION_MS * LCD_FEEDBACK_FREQUENCY_HZ / 1000;
while (i--) {
WRITE(BEEPER,HIGH);
delayMicroseconds(delay);
WRITE(BEEPER,LOW);
delayMicroseconds(delay);
}
const uint16_t j = max(10000 - LCD_FEEDBACK_FREQUENCY_DURATION_MS * 1000, 0);
if (j) delayMicroseconds(j);
#endif
} }
/** Menu action functions **/ /** Menu action functions **/
static void menu_action_back(menuFunc_t data) { lcd_goto_menu(data); } static void menu_action_back(menuFunc_t data) { lcd_goto_menu(data); }
static void menu_action_submenu(menuFunc_t data) { lcd_goto_menu(data); } static void menu_action_submenu(menuFunc_t data) { lcd_goto_menu(data); }
static void menu_action_gcode(const char* pgcode) { enquecommands_P(pgcode); } static void menu_action_gcode(const char* pgcode) { enqueuecommands_P(pgcode); }
static void menu_action_function(menuFunc_t data) { (*data)(); } static void menu_action_function(menuFunc_t data) { (*data)(); }
static void menu_action_sdfile(const char* filename, char* longFilename) { static void menu_action_sdfile(const char* filename, char* longFilename) {
char cmd[30]; char cmd[30];
char* c; char* c;
sprintf_P(cmd, PSTR("M23 %s"), filename); sprintf_P(cmd, PSTR("M23 %s"), filename);
for(c = &cmd[4]; *c; c++) *c = tolower(*c); for(c = &cmd[4]; *c; c++) *c = tolower(*c);
enquecommand(cmd); enqueuecommand(cmd);
enquecommands_P(PSTR("M24")); enqueuecommands_P(PSTR("M24"));
lcd_return_to_status(); lcd_return_to_status();
} }
static void menu_action_sddirectory(const char* filename, char* longFilename) { static void menu_action_sddirectory(const char* filename, char* longFilename) {
@ -1238,7 +1249,9 @@ int lcd_strlen_P(const char *s) {
} }
void lcd_update() { void lcd_update() {
static unsigned long timeoutToStatus = 0; #ifdef ULTIPANEL
static millis_t return_to_status_ms = 0;
#endif
#ifdef LCD_HAS_SLOW_BUTTONS #ifdef LCD_HAS_SLOW_BUTTONS
slow_buttons = lcd_implementation_read_slow_buttons(); // buttons which take too long to read in interrupt context slow_buttons = lcd_implementation_read_slow_buttons(); // buttons which take too long to read in interrupt context
@ -1251,7 +1264,7 @@ void lcd_update() {
lcdDrawUpdate = 2; lcdDrawUpdate = 2;
lcd_oldcardstatus = IS_SD_INSERTED; lcd_oldcardstatus = IS_SD_INSERTED;
lcd_implementation_init( // to maybe revive the LCD if static electricity killed it. lcd_implementation_init( // to maybe revive the LCD if static electricity killed it.
#if defined(LCD_PROGRESS_BAR) && defined(SDSUPPORT) && !defined(DOGLCD) #ifdef LCD_PROGRESS_BAR
currentMenu == lcd_status_screen currentMenu == lcd_status_screen
#endif #endif
); );
@ -1267,8 +1280,8 @@ void lcd_update() {
} }
#endif//CARDINSERTED #endif//CARDINSERTED
uint32_t ms = millis(); millis_t ms = millis();
if (ms > lcd_next_update_millis) { if (ms > next_lcd_update_ms) {
#ifdef ULTIPANEL #ifdef ULTIPANEL
@ -1314,30 +1327,39 @@ void lcd_update() {
} }
lastEncoderMovementMillis = ms; lastEncoderMovementMillis = ms;
} } // encoderRateMultiplierEnabled
#endif //ENCODER_RATE_MULTIPLIER #endif //ENCODER_RATE_MULTIPLIER
lcdDrawUpdate = 1;
encoderPosition += (encoderDiff * encoderMultiplier) / ENCODER_PULSES_PER_STEP; encoderPosition += (encoderDiff * encoderMultiplier) / ENCODER_PULSES_PER_STEP;
encoderDiff = 0; encoderDiff = 0;
} }
timeoutToStatus = ms + LCD_TIMEOUT_TO_STATUS; return_to_status_ms = ms + LCD_TIMEOUT_TO_STATUS;
lcdDrawUpdate = 1;
} }
#endif //ULTIPANEL #endif //ULTIPANEL
if (currentMenu == lcd_status_screen) {
if (!lcd_status_update_delay) {
lcdDrawUpdate = 1;
lcd_status_update_delay = 10; /* redraw the main screen every second. This is easier then trying keep track of all things that change on the screen */
}
else {
lcd_status_update_delay--;
}
}
#ifdef DOGLCD // Changes due to different driver architecture of the DOGM display #ifdef DOGLCD // Changes due to different driver architecture of the DOGM display
if (lcdDrawUpdate) {
blink++; // Variable for fan animation and alive dot blink++; // Variable for fan animation and alive dot
u8g.firstPage(); u8g.firstPage();
do { do {
u8g.setFont(FONT_MENU); lcd_setFont(FONT_MENU);
u8g.setPrintPos(125, 0); u8g.setPrintPos(125, 0);
if (blink % 2) u8g.setColorIndex(1); else u8g.setColorIndex(0); // Set color for the alive dot if (blink % 2) u8g.setColorIndex(1); else u8g.setColorIndex(0); // Set color for the alive dot
u8g.drawPixel(127, 63); // draw alive dot u8g.drawPixel(127, 63); // draw alive dot
u8g.setColorIndex(1); // black on white u8g.setColorIndex(1); // black on white
(*currentMenu)(); (*currentMenu)();
if (!lcdDrawUpdate) break; // Terminate display update, when nothing new to draw. This must be done before the last dogm.next()
} while( u8g.nextPage() ); } while( u8g.nextPage() );
}
#else #else
(*currentMenu)(); (*currentMenu)();
#endif #endif
@ -1347,20 +1369,24 @@ void lcd_update() {
#endif #endif
#ifdef ULTIPANEL #ifdef ULTIPANEL
// Return to Status Screen after a timeout
if (currentMenu != lcd_status_screen && if (currentMenu != lcd_status_screen &&
#if defined(MANUAL_BED_LEVELING) #ifdef MANUAL_BED_LEVELING
currentMenu != _lcd_level_bed && currentMenu != _lcd_level_bed &&
currentMenu != _lcd_level_bed_homing && currentMenu != _lcd_level_bed_homing &&
#endif // MANUAL_BED_LEVELING #endif
millis() > timeoutToStatus) { millis() > return_to_status_ms
) {
lcd_return_to_status(); lcd_return_to_status();
lcdDrawUpdate = 2; lcdDrawUpdate = 2;
} }
#endif //ULTIPANEL
#endif // ULTIPANEL
if (lcdDrawUpdate == 2) lcd_implementation_clear(); if (lcdDrawUpdate == 2) lcd_implementation_clear();
if (lcdDrawUpdate) lcdDrawUpdate--; if (lcdDrawUpdate) lcdDrawUpdate--;
lcd_next_update_millis = millis() + LCD_UPDATE_INTERVAL; next_lcd_update_ms = millis() + LCD_UPDATE_INTERVAL;
} }
} }
@ -1369,42 +1395,52 @@ void lcd_ignore_click(bool b) {
wait_for_unclick = false; wait_for_unclick = false;
} }
void lcd_finishstatus() { void lcd_finishstatus(bool persist=false) {
int len = lcd_strlen(lcd_status_message); #ifdef LCD_PROGRESS_BAR
if (len > 0) { progressBarTick = millis();
while (len < LCD_WIDTH) {
lcd_status_message[len++] = ' ';
}
}
lcd_status_message[LCD_WIDTH] = '\0';
#if defined(LCD_PROGRESS_BAR) && defined(SDSUPPORT) && !defined(DOGLCD)
#if PROGRESS_MSG_EXPIRE > 0 #if PROGRESS_MSG_EXPIRE > 0
messageTick = expireStatusMillis = persist ? 0 : progressBarTick + PROGRESS_MSG_EXPIRE;
#endif #endif
progressBarTick = millis();
#endif #endif
lcdDrawUpdate = 2; lcdDrawUpdate = 2;
#ifdef FILAMENT_LCD_DISPLAY #ifdef FILAMENT_LCD_DISPLAY
message_millis = millis(); //get status message to show up for a while previous_lcd_status_ms = millis(); //get status message to show up for a while
#endif #endif
} }
void lcd_setstatus(const char* message) { #if defined(LCD_PROGRESS_BAR) && PROGRESS_MSG_EXPIRE > 0
if (lcd_status_message_level > 0) return; void dontExpireStatus() { expireStatusMillis = 0; }
strncpy(lcd_status_message, message, LCD_WIDTH); #endif
lcd_finishstatus();
void set_utf_strlen(char *s, uint8_t n) {
uint8_t i = 0, j = 0;
while (s[i] && (j < n)) {
if ((s[i] & 0xc0u) != 0x80u) j++;
i++;
}
while (j++ < n) s[i++] = ' ';
s[i] = 0;
} }
void lcd_setstatuspgm(const char* message) { void lcd_setstatus(const char* message, bool persist) {
if (lcd_status_message_level > 0) return; if (lcd_status_message_level > 0) return;
strncpy_P(lcd_status_message, message, LCD_WIDTH); strncpy(lcd_status_message, message, 3*LCD_WIDTH);
lcd_finishstatus(); set_utf_strlen(lcd_status_message, LCD_WIDTH);
lcd_finishstatus(persist);
}
void lcd_setstatuspgm(const char* message, uint8_t level) {
if (level >= lcd_status_message_level) {
strncpy_P(lcd_status_message, message, 3*LCD_WIDTH);
set_utf_strlen(lcd_status_message, LCD_WIDTH);
lcd_status_message_level = level;
lcd_finishstatus(level > 0);
}
} }
void lcd_setalertstatuspgm(const char* message) { void lcd_setalertstatuspgm(const char* message) {
lcd_setstatuspgm(message); lcd_setstatuspgm(message, 1);
lcd_status_message_level = 1;
#ifdef ULTIPANEL #ifdef ULTIPANEL
lcd_return_to_status(); lcd_return_to_status();
#endif #endif
@ -1412,9 +1448,9 @@ void lcd_setalertstatuspgm(const char* message) {
void lcd_reset_alert_level() { lcd_status_message_level = 0; } void lcd_reset_alert_level() { lcd_status_message_level = 0; }
#ifdef DOGLCD #ifdef HAS_LCD_CONTRAST
void lcd_setcontrast(uint8_t value) { void lcd_setcontrast(uint8_t value) {
lcd_contrast = value & 63; lcd_contrast = value & 0x3F;
u8g.setContrast(lcd_contrast); u8g.setContrast(lcd_contrast);
} }
#endif #endif
@ -1439,7 +1475,7 @@ void lcd_buttons_update() {
if (READ(BTN_EN1) == 0) newbutton |= EN_A; if (READ(BTN_EN1) == 0) newbutton |= EN_A;
if (READ(BTN_EN2) == 0) newbutton |= EN_B; if (READ(BTN_EN2) == 0) newbutton |= EN_B;
#if BTN_ENC > 0 #if BTN_ENC > 0
if (millis() > blocking_enc && READ(BTN_ENC) == 0) newbutton |= EN_C; if (millis() > next_button_update_ms && READ(BTN_ENC) == 0) newbutton |= EN_C;
#endif #endif
buttons = newbutton; buttons = newbutton;
#ifdef LCD_HAS_SLOW_BUTTONS #ifdef LCD_HAS_SLOW_BUTTONS
@ -1517,70 +1553,62 @@ bool lcd_clicked() { return LCD_CLICKED; }
#endif //ULTIPANEL #endif //ULTIPANEL
/********************************/ /*********************************/
/** Float conversion utilities **/ /** Number to string conversion **/
/********************************/ /*********************************/
// convert float to string with +123.4 format
char conv[8]; char conv[8];
char *ftostr3(const float &x)
{ // Convert float to string with +123.4 format
char *ftostr3(const float &x) {
return itostr3((int)x); return itostr3((int)x);
} }
char *itostr2(const uint8_t &x) // Convert int to string with 12 format
{ char *itostr2(const uint8_t &x) {
//sprintf(conv,"%5.1f",x); //sprintf(conv,"%5.1f",x);
int xx=x; int xx = x;
conv[0]=(xx/10)%10+'0'; conv[0] = (xx / 10) % 10 + '0';
conv[1]=(xx)%10+'0'; conv[1] = xx % 10 + '0';
conv[2]=0; conv[2] = 0;
return conv; return conv;
} }
// Convert float to string with 123.4 format, dropping sign // Convert float to string with +123.4 format
char *ftostr31(const float &x) char *ftostr31(const float &x) {
{ int xx = abs(x * 10);
int xx=x*10; conv[0] = (x >= 0) ? '+' : '-';
conv[0]=(xx>=0)?'+':'-'; conv[1] = (xx / 1000) % 10 + '0';
xx=abs(xx); conv[2] = (xx / 100) % 10 + '0';
conv[1]=(xx/1000)%10+'0'; conv[3] = (xx / 10) % 10 + '0';
conv[2]=(xx/100)%10+'0'; conv[4] = '.';
conv[3]=(xx/10)%10+'0'; conv[5] = xx % 10 + '0';
conv[4]='.'; conv[6] = 0;
conv[5]=(xx)%10+'0';
conv[6]=0;
return conv; return conv;
} }
// Convert float to string with 123.4 format // Convert float to string with 123.4 format, dropping sign
char *ftostr31ns(const float &x) char *ftostr31ns(const float &x) {
{ int xx = abs(x * 10);
int xx=x*10; conv[0] = (xx / 1000) % 10 + '0';
//conv[0]=(xx>=0)?'+':'-'; conv[1] = (xx / 100) % 10 + '0';
xx=abs(xx); conv[2] = (xx / 10) % 10 + '0';
conv[0]=(xx/1000)%10+'0'; conv[3] = '.';
conv[1]=(xx/100)%10+'0'; conv[4] = xx % 10 + '0';
conv[2]=(xx/10)%10+'0'; conv[5] = 0;
conv[3]='.';
conv[4]=(xx)%10+'0';
conv[5]=0;
return conv; return conv;
} }
char *ftostr32(const float &x) // Convert float to string with 123.4 format
{ char *ftostr32(const float &x) {
long xx=x*100; long xx = abs(x * 100);
if (xx >= 0) conv[0] = x >= 0 ? (xx / 10000) % 10 + '0' : '-';
conv[0]=(xx/10000)%10+'0'; conv[1] = (xx / 1000) % 10 + '0';
else conv[2] = (xx / 100) % 10 + '0';
conv[0]='-'; conv[3] = '.';
xx=abs(xx); conv[4] = (xx / 10) % 10 + '0';
conv[1]=(xx/1000)%10+'0'; conv[5] = xx % 10 + '0';
conv[2]=(xx/100)%10+'0'; conv[6] = 0;
conv[3]='.';
conv[4]=(xx/10)%10+'0';
conv[5]=(xx)%10+'0';
conv[6]=0;
return conv; return conv;
} }
@ -1601,7 +1629,7 @@ char *ftostr43(const float &x)
return conv; return conv;
} }
//Float to string with 1.23 format // Convert float to string with 1.23 format
char *ftostr12ns(const float &x) char *ftostr12ns(const float &x)
{ {
long xx=x*100; long xx=x*100;
@ -1615,7 +1643,7 @@ char *ftostr12ns(const float &x)
return conv; return conv;
} }
// convert float to space-padded string with -_23.4_ format // Convert float to space-padded string with -_23.4_ format
char *ftostr32sp(const float &x) { char *ftostr32sp(const float &x) {
long xx = abs(x * 100); long xx = abs(x * 100);
uint8_t dig; uint8_t dig;
@ -1661,58 +1689,51 @@ char *ftostr32sp(const float &x) {
return conv; return conv;
} }
char *itostr31(const int &xx) // Convert int to lj string with +123.0 format
{ char *itostr31(const int &x) {
conv[0]=(xx>=0)?'+':'-'; conv[0] = x >= 0 ? '+' : '-';
conv[1]=(xx/1000)%10+'0'; int xx = abs(x);
conv[2]=(xx/100)%10+'0'; conv[1] = (xx / 100) % 10 + '0';
conv[3]=(xx/10)%10+'0'; conv[2] = (xx / 10) % 10 + '0';
conv[4]='.'; conv[3] = xx % 10 + '0';
conv[5]=(xx)%10+'0'; conv[4] = '.';
conv[6]=0; conv[5] = '0';
conv[6] = 0;
return conv; return conv;
} }
// Convert int to rj string with 123 or -12 format // Convert int to rj string with 123 or -12 format
char *itostr3(const int &x) char *itostr3(const int &x) {
{
int xx = x; int xx = x;
if (xx < 0) { if (xx < 0) {
conv[0]='-'; conv[0] = '-';
xx = -xx; xx = -xx;
} else if (xx >= 100) }
conv[0]=(xx/100)%10+'0';
else
conv[0]=' ';
if (xx >= 10)
conv[1]=(xx/10)%10+'0';
else else
conv[1]=' '; conv[0] = xx >= 100 ? (xx / 100) % 10 + '0' : ' ';
conv[2]=(xx)%10+'0';
conv[3]=0; conv[1] = xx >= 10 ? (xx / 10) % 10 + '0' : ' ';
conv[2] = xx % 10 + '0';
conv[3] = 0;
return conv; return conv;
} }
// Convert int to lj string with 123 format // Convert int to lj string with 123 format
char *itostr3left(const int &xx) char *itostr3left(const int &xx) {
{ if (xx >= 100) {
if (xx >= 100) conv[0] = (xx / 100) % 10 + '0';
{ conv[1] = (xx / 10) % 10 + '0';
conv[0]=(xx/100)%10+'0'; conv[2] = xx % 10 + '0';
conv[1]=(xx/10)%10+'0'; conv[3] = 0;
conv[2]=(xx)%10+'0'; }
conv[3]=0; else if (xx >= 10) {
} conv[0] = (xx / 10) % 10 + '0';
else if (xx >= 10) conv[1] = xx % 10 + '0';
{ conv[2] = 0;
conv[0]=(xx/10)%10+'0';
conv[1]=(xx)%10+'0';
conv[2]=0;
} }
else else {
{ conv[0] = xx % 10 + '0';
conv[0]=(xx)%10+'0'; conv[1] = 0;
conv[1]=0;
} }
return conv; return conv;
} }
@ -1740,68 +1761,67 @@ char *ftostr5(const float &x) {
} }
// Convert float to string with +1234.5 format // Convert float to string with +1234.5 format
char *ftostr51(const float &x) char *ftostr51(const float &x) {
{ long xx = abs(x * 10);
long xx=x*10; conv[0] = (x >= 0) ? '+' : '-';
conv[0]=(xx>=0)?'+':'-'; conv[1] = (xx / 10000) % 10 + '0';
xx=abs(xx); conv[2] = (xx / 1000) % 10 + '0';
conv[1]=(xx/10000)%10+'0'; conv[3] = (xx / 100) % 10 + '0';
conv[2]=(xx/1000)%10+'0'; conv[4] = (xx / 10) % 10 + '0';
conv[3]=(xx/100)%10+'0'; conv[5] = '.';
conv[4]=(xx/10)%10+'0'; conv[6] = xx % 10 + '0';
conv[5]='.'; conv[7] = 0;
conv[6]=(xx)%10+'0';
conv[7]=0;
return conv; return conv;
} }
// Convert float to string with +123.45 format // Convert float to string with +123.45 format
char *ftostr52(const float &x) char *ftostr52(const float &x) {
{ conv[0] = (x >= 0) ? '+' : '-';
long xx=x*100; long xx = abs(x * 100);
conv[0]=(xx>=0)?'+':'-'; conv[1] = (xx / 10000) % 10 + '0';
xx=abs(xx); conv[2] = (xx / 1000) % 10 + '0';
conv[1]=(xx/10000)%10+'0'; conv[3] = (xx / 100) % 10 + '0';
conv[2]=(xx/1000)%10+'0'; conv[4] = '.';
conv[3]=(xx/100)%10+'0'; conv[5] = (xx / 10) % 10 + '0';
conv[4]='.'; conv[6] = xx % 10 + '0';
conv[5]=(xx/10)%10+'0'; conv[7] = 0;
conv[6]=(xx)%10+'0';
conv[7]=0;
return conv; return conv;
} }
#if defined(MANUAL_BED_LEVELING) #ifdef MANUAL_BED_LEVELING
static int _lcd_level_bed_position;
static void _lcd_level_bed() static int _lcd_level_bed_position;
{ static void _lcd_level_bed() {
if (encoderPosition != 0) { if (encoderPosition != 0) {
refresh_cmd_timeout(); refresh_cmd_timeout();
current_position[Z_AXIS] += float((int)encoderPosition) * 0.05; current_position[Z_AXIS] += float((int)encoderPosition) * MBL_Z_STEP;
if (min_software_endstops && current_position[Z_AXIS] < Z_MIN_POS) current_position[Z_AXIS] = Z_MIN_POS; if (min_software_endstops && current_position[Z_AXIS] < Z_MIN_POS) current_position[Z_AXIS] = Z_MIN_POS;
if (max_software_endstops && current_position[Z_AXIS] > Z_MAX_POS) current_position[Z_AXIS] = Z_MAX_POS; if (max_software_endstops && current_position[Z_AXIS] > Z_MAX_POS) current_position[Z_AXIS] = Z_MAX_POS;
encoderPosition = 0; encoderPosition = 0;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], manual_feedrate[Z_AXIS]/60, active_extruder); line_to_current();
lcdDrawUpdate = 1; lcdDrawUpdate = 2;
} }
if (lcdDrawUpdate) lcd_implementation_drawedit(PSTR("Z"), ftostr32(current_position[Z_AXIS])); if (lcdDrawUpdate) lcd_implementation_drawedit(PSTR("Z"), ftostr43(current_position[Z_AXIS]));
static bool debounce_click = false; static bool debounce_click = false;
if (LCD_CLICKED) { if (LCD_CLICKED) {
if (!debounce_click) { if (!debounce_click) {
debounce_click = true; debounce_click = true;
int ix = _lcd_level_bed_position % MESH_NUM_X_POINTS; int ix = _lcd_level_bed_position % MESH_NUM_X_POINTS;
int iy = _lcd_level_bed_position / MESH_NUM_X_POINTS; int iy = _lcd_level_bed_position / MESH_NUM_X_POINTS;
if (iy&1) { // Zig zag
ix = (MESH_NUM_X_POINTS - 1) - ix;
}
mbl.set_z(ix, iy, current_position[Z_AXIS]); mbl.set_z(ix, iy, current_position[Z_AXIS]);
_lcd_level_bed_position++; _lcd_level_bed_position++;
if (_lcd_level_bed_position == MESH_NUM_X_POINTS*MESH_NUM_Y_POINTS) { if (_lcd_level_bed_position == MESH_NUM_X_POINTS*MESH_NUM_Y_POINTS) {
current_position[Z_AXIS] = MESH_HOME_SEARCH_Z; current_position[Z_AXIS] = MESH_HOME_SEARCH_Z;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], manual_feedrate[X_AXIS]/60, active_extruder); line_to_current();
mbl.active = 1; mbl.active = 1;
enquecommands_P(PSTR("G28")); enqueuecommands_P(PSTR("G28"));
lcd_return_to_status(); lcd_return_to_status();
} else { } else {
current_position[Z_AXIS] = MESH_HOME_SEARCH_Z; current_position[Z_AXIS] = MESH_HOME_SEARCH_Z;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], manual_feedrate[X_AXIS]/60, active_extruder); line_to_current();
ix = _lcd_level_bed_position % MESH_NUM_X_POINTS; ix = _lcd_level_bed_position % MESH_NUM_X_POINTS;
iy = _lcd_level_bed_position / MESH_NUM_X_POINTS; iy = _lcd_level_bed_position / MESH_NUM_X_POINTS;
if (iy&1) { // Zig zag if (iy&1) { // Zig zag
@ -1809,16 +1829,17 @@ static void _lcd_level_bed()
} }
current_position[X_AXIS] = mbl.get_x(ix); current_position[X_AXIS] = mbl.get_x(ix);
current_position[Y_AXIS] = mbl.get_y(iy); current_position[Y_AXIS] = mbl.get_y(iy);
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], manual_feedrate[X_AXIS]/60, active_extruder); line_to_current();
lcdDrawUpdate = 1; lcdDrawUpdate = 2;
} }
} }
} else { } else {
debounce_click = false; debounce_click = false;
} }
} }
static void _lcd_level_bed_homing()
{ static void _lcd_level_bed_homing() {
if (lcdDrawUpdate) lcd_implementation_drawedit(PSTR("XYZ"), "Homing");
if (axis_known_position[X_AXIS] && if (axis_known_position[X_AXIS] &&
axis_known_position[Y_AXIS] && axis_known_position[Y_AXIS] &&
axis_known_position[Z_AXIS]) { axis_known_position[Z_AXIS]) {
@ -1826,20 +1847,23 @@ static void _lcd_level_bed_homing()
plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]); plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
current_position[X_AXIS] = MESH_MIN_X; current_position[X_AXIS] = MESH_MIN_X;
current_position[Y_AXIS] = MESH_MIN_Y; current_position[Y_AXIS] = MESH_MIN_Y;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], manual_feedrate[X_AXIS]/60, active_extruder); line_to_current();
_lcd_level_bed_position = 0; _lcd_level_bed_position = 0;
lcd_goto_menu(_lcd_level_bed); lcd_goto_menu(_lcd_level_bed);
} }
} lcdDrawUpdate = 2;
static void lcd_level_bed() }
{
static void lcd_level_bed() {
axis_known_position[X_AXIS] = false; axis_known_position[X_AXIS] = false;
axis_known_position[Y_AXIS] = false; axis_known_position[Y_AXIS] = false;
axis_known_position[Z_AXIS] = false; axis_known_position[Z_AXIS] = false;
mbl.reset(); mbl.reset();
enquecommands_P(PSTR("G28")); enqueuecommands_P(PSTR("G28"));
lcdDrawUpdate = 2;
lcd_goto_menu(_lcd_level_bed_homing); lcd_goto_menu(_lcd_level_bed_homing);
} }
#endif // MANUAL_BED_LEVELING #endif // MANUAL_BED_LEVELING
#endif //ULTRA_LCD #endif // ULTRA_LCD

@ -8,19 +8,21 @@
int lcd_strlen_P(const char *s); int lcd_strlen_P(const char *s);
void lcd_update(); void lcd_update();
void lcd_init(); void lcd_init();
void lcd_setstatus(const char* message); void lcd_setstatus(const char* message, const bool persist=false);
void lcd_setstatuspgm(const char* message); void lcd_setstatuspgm(const char* message, const uint8_t level=0);
void lcd_setalertstatuspgm(const char* message); void lcd_setalertstatuspgm(const char* message);
void lcd_reset_alert_level(); void lcd_reset_alert_level();
bool lcd_detected(void); bool lcd_detected(void);
#if defined(LCD_PROGRESS_BAR) && PROGRESS_MSG_EXPIRE > 0
void dontExpireStatus();
#endif
#ifdef DOGLCD #ifdef DOGLCD
extern int lcd_contrast; extern int lcd_contrast;
void lcd_setcontrast(uint8_t value); void lcd_setcontrast(uint8_t value);
#endif #endif
static unsigned char blink = 0; // Variable for visualization of fan rotation in GLCD
#define LCD_MESSAGEPGM(x) lcd_setstatuspgm(PSTR(x)) #define LCD_MESSAGEPGM(x) lcd_setstatuspgm(PSTR(x))
#define LCD_ALERTMESSAGEPGM(x) lcd_setalertstatuspgm(PSTR(x)) #define LCD_ALERTMESSAGEPGM(x) lcd_setalertstatuspgm(PSTR(x))
@ -47,10 +49,11 @@
extern bool cancel_heatup; extern bool cancel_heatup;
#ifdef FILAMENT_LCD_DISPLAY #ifdef FILAMENT_LCD_DISPLAY
extern unsigned long message_millis; extern millis_t previous_lcd_status_ms;
#endif #endif
void lcd_buzz(long duration,uint16_t freq); void lcd_buzz(long duration,uint16_t freq);
void lcd_quick_feedback(); // Audible feedback for a button click - could also be visual
bool lcd_clicked(); bool lcd_clicked();
void lcd_ignore_click(bool b=true); void lcd_ignore_click(bool b=true);
@ -62,14 +65,14 @@
#define LCD_CLICKED (buttons&EN_C) #define LCD_CLICKED (buttons&EN_C)
#ifdef REPRAPWORLD_KEYPAD #ifdef REPRAPWORLD_KEYPAD
#define EN_REPRAPWORLD_KEYPAD_F3 BIT(BLEN_REPRAPWORLD_KEYPAD_F3) #define EN_REPRAPWORLD_KEYPAD_F3 (BIT(BLEN_REPRAPWORLD_KEYPAD_F3))
#define EN_REPRAPWORLD_KEYPAD_F2 BIT(BLEN_REPRAPWORLD_KEYPAD_F2) #define EN_REPRAPWORLD_KEYPAD_F2 (BIT(BLEN_REPRAPWORLD_KEYPAD_F2))
#define EN_REPRAPWORLD_KEYPAD_F1 BIT(BLEN_REPRAPWORLD_KEYPAD_F1) #define EN_REPRAPWORLD_KEYPAD_F1 (BIT(BLEN_REPRAPWORLD_KEYPAD_F1))
#define EN_REPRAPWORLD_KEYPAD_UP BIT(BLEN_REPRAPWORLD_KEYPAD_UP) #define EN_REPRAPWORLD_KEYPAD_UP (BIT(BLEN_REPRAPWORLD_KEYPAD_UP))
#define EN_REPRAPWORLD_KEYPAD_RIGHT BIT(BLEN_REPRAPWORLD_KEYPAD_RIGHT) #define EN_REPRAPWORLD_KEYPAD_RIGHT (BIT(BLEN_REPRAPWORLD_KEYPAD_RIGHT))
#define EN_REPRAPWORLD_KEYPAD_MIDDLE BIT(BLEN_REPRAPWORLD_KEYPAD_MIDDLE) #define EN_REPRAPWORLD_KEYPAD_MIDDLE (BIT(BLEN_REPRAPWORLD_KEYPAD_MIDDLE))
#define EN_REPRAPWORLD_KEYPAD_DOWN BIT(BLEN_REPRAPWORLD_KEYPAD_DOWN) #define EN_REPRAPWORLD_KEYPAD_DOWN (BIT(BLEN_REPRAPWORLD_KEYPAD_DOWN))
#define EN_REPRAPWORLD_KEYPAD_LEFT BIT(BLEN_REPRAPWORLD_KEYPAD_LEFT) #define EN_REPRAPWORLD_KEYPAD_LEFT (BIT(BLEN_REPRAPWORLD_KEYPAD_LEFT))
#define LCD_CLICKED ((buttons&EN_C) || (buttons_reprapworld_keypad&EN_REPRAPWORLD_KEYPAD_F1)) #define LCD_CLICKED ((buttons&EN_C) || (buttons_reprapworld_keypad&EN_REPRAPWORLD_KEYPAD_F1))
#define REPRAPWORLD_KEYPAD_MOVE_Z_UP (buttons_reprapworld_keypad&EN_REPRAPWORLD_KEYPAD_F2) #define REPRAPWORLD_KEYPAD_MOVE_Z_UP (buttons_reprapworld_keypad&EN_REPRAPWORLD_KEYPAD_F2)
@ -97,7 +100,8 @@
#else //no LCD #else //no LCD
FORCE_INLINE void lcd_update() {} FORCE_INLINE void lcd_update() {}
FORCE_INLINE void lcd_init() {} FORCE_INLINE void lcd_init() {}
FORCE_INLINE void lcd_setstatus(const char* message) {} FORCE_INLINE void lcd_setstatus(const char* message, const bool persist=false) {}
FORCE_INLINE void lcd_setstatuspgm(const char* message, const uint8_t level=0) {}
FORCE_INLINE void lcd_buttons_update() {} FORCE_INLINE void lcd_buttons_update() {}
FORCE_INLINE void lcd_reset_alert_level() {} FORCE_INLINE void lcd_reset_alert_level() {}
FORCE_INLINE void lcd_buzz(long duration,uint16_t freq) {} FORCE_INLINE void lcd_buzz(long duration,uint16_t freq) {}

@ -179,46 +179,30 @@
// 2 wire Non-latching LCD SR from: // 2 wire Non-latching LCD SR from:
// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection // https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
#elif defined(SR_LCD_2W_NL) #elif defined(SR_LCD_2W_NL)
extern "C" void __cxa_pure_virtual() { while (1); } extern "C" void __cxa_pure_virtual() { while (1); }
#include <LCD.h> #include <LCD.h>
#include <LiquidCrystal_SR.h> #include <LiquidCrystal_SR.h>
#define LCD_CLASS LiquidCrystal_SR #define LCD_CLASS LiquidCrystal_SR
LCD_CLASS lcd(SR_DATA_PIN, SR_CLK_PIN); LCD_CLASS lcd(SR_DATA_PIN, SR_CLK_PIN);
#else #else
// Standard directly connected LCD implementations // Standard directly connected LCD implementations
#ifdef LANGUAGE_RU
#include "LiquidCrystalRus.h"
#define LCD_CLASS LiquidCrystalRus
#else
#include <LiquidCrystal.h> #include <LiquidCrystal.h>
#define LCD_CLASS LiquidCrystal #define LCD_CLASS LiquidCrystal
#endif
LCD_CLASS lcd(LCD_PINS_RS, LCD_PINS_ENABLE, LCD_PINS_D4, LCD_PINS_D5,LCD_PINS_D6,LCD_PINS_D7); //RS,Enable,D4,D5,D6,D7 LCD_CLASS lcd(LCD_PINS_RS, LCD_PINS_ENABLE, LCD_PINS_D4, LCD_PINS_D5,LCD_PINS_D6,LCD_PINS_D7); //RS,Enable,D4,D5,D6,D7
#endif #endif
#if defined(LCD_PROGRESS_BAR) && defined(SDSUPPORT) #include "utf_mapper.h"
#ifdef LCD_PROGRESS_BAR
static uint16_t progressBarTick = 0; static uint16_t progressBarTick = 0;
#if PROGRESS_MSG_EXPIRE > 0 #if PROGRESS_MSG_EXPIRE > 0
static uint16_t messageTick = 0; static uint16_t expireStatusMillis = 0;
#endif #endif
#define LCD_STR_PROGRESS "\x03\x04\x05" #define LCD_STR_PROGRESS "\x03\x04\x05"
#endif #endif
/* Custom characters defined in the first 8 characters of the LCD */
#define LCD_STR_BEDTEMP "\x00"
#define LCD_STR_DEGREE "\x01"
#define LCD_STR_THERMOMETER "\x02"
#define LCD_STR_UPLEVEL "\x03"
#define LCD_STR_REFRESH "\x04"
#define LCD_STR_FOLDER "\x05"
#define LCD_STR_FEEDRATE "\x06"
#define LCD_STR_CLOCK "\x07"
#define LCD_STR_ARROW_RIGHT "\x7E" /* from the default character set */
static void lcd_set_custom_characters( static void lcd_set_custom_characters(
#if defined(LCD_PROGRESS_BAR) && defined(SDSUPPORT) #ifdef LCD_PROGRESS_BAR
bool progress_bar_set=true bool progress_bar_set=true
#endif #endif
) { ) {
@ -303,7 +287,7 @@ static void lcd_set_custom_characters(
B00000 B00000
}; //thanks Sonny Mounicou }; //thanks Sonny Mounicou
#if defined(LCD_PROGRESS_BAR) && defined(SDSUPPORT) #ifdef LCD_PROGRESS_BAR
static bool char_mode = false; static bool char_mode = false;
byte progress[3][8] = { { byte progress[3][8] = { {
B00000, B00000,
@ -364,7 +348,7 @@ static void lcd_set_custom_characters(
} }
static void lcd_implementation_init( static void lcd_implementation_init(
#if defined(LCD_PROGRESS_BAR) && defined(SDSUPPORT) #ifdef LCD_PROGRESS_BAR
bool progress_bar_set=true bool progress_bar_set=true
#endif #endif
) { ) {
@ -394,7 +378,7 @@ static void lcd_implementation_init(
#endif #endif
lcd_set_custom_characters( lcd_set_custom_characters(
#if defined(LCD_PROGRESS_BAR) && defined(SDSUPPORT) #ifdef LCD_PROGRESS_BAR
progress_bar_set progress_bar_set
#endif #endif
); );
@ -405,15 +389,30 @@ static void lcd_implementation_clear()
{ {
lcd.clear(); lcd.clear();
} }
/* Arduino < 1.0.0 is missing a function to print PROGMEM strings, so we need to implement our own */ /* Arduino < 1.0.0 is missing a function to print PROGMEM strings, so we need to implement our own */
static void lcd_printPGM(const char* str) char lcd_printPGM(const char* str) {
{
char c; char c;
while((c = pgm_read_byte(str++)) != '\0') char n = 0;
{ while((c = pgm_read_byte(str++))) {
lcd.write(c); n += charset_mapper(c);
} }
return n;
} }
char lcd_print(char* str) {
char c, n = 0;;
unsigned char i = 0;
while((c = str[i++])) {
n += charset_mapper(c);
}
return n;
}
unsigned lcd_print(char c) {
return charset_mapper(c);
}
/* /*
Possible status screens: Possible status screens:
16x2 |0123456789012345| 16x2 |0123456789012345|
@ -432,7 +431,7 @@ Possible status screens:
20x4 |01234567890123456789| 20x4 |01234567890123456789|
|T000/000D B000/000D | |T000/000D B000/000D |
|X+000.0 Y+000.0 Z+000.0| |X000 Y000 Z000.00|
|F100% SD100% T--:--| |F100% SD100% T--:--|
|Status line.........| |Status line.........|
@ -442,69 +441,72 @@ Possible status screens:
|F100% SD100% T--:--| |F100% SD100% T--:--|
|Status line.........| |Status line.........|
*/ */
static void lcd_implementation_status_screen() static void lcd_implementation_status_screen() {
{ int tHotend = int(degHotend(0) + 0.5);
int tHotend=int(degHotend(0) + 0.5); int tTarget = int(degTargetHotend(0) + 0.5);
int tTarget=int(degTargetHotend(0) + 0.5);
#if LCD_WIDTH < 20
#if LCD_WIDTH < 20
lcd.setCursor(0, 0); lcd.setCursor(0, 0);
lcd.print(itostr3(tHotend)); lcd.print(itostr3(tHotend));
lcd.print('/'); lcd.print('/');
lcd.print(itostr3left(tTarget)); lcd.print(itostr3left(tTarget));
# if EXTRUDERS > 1 || TEMP_SENSOR_BED != 0 #if EXTRUDERS > 1 || TEMP_SENSOR_BED != 0
//If we have an 2nd extruder or heated bed, show that in the top right corner
// If we have an 2nd extruder or heated bed, show that in the top right corner
lcd.setCursor(8, 0); lcd.setCursor(8, 0);
# if EXTRUDERS > 1 #if EXTRUDERS > 1
tHotend = int(degHotend(1) + 0.5); tHotend = int(degHotend(1) + 0.5);
tTarget = int(degTargetHotend(1) + 0.5); tTarget = int(degTargetHotend(1) + 0.5);
lcd.print(LCD_STR_THERMOMETER[0]); lcd.print(LCD_STR_THERMOMETER[0]);
# else//Heated bed #else // Heated bed
tHotend=int(degBed() + 0.5); tHotend = int(degBed() + 0.5);
tTarget=int(degTargetBed() + 0.5); tTarget = int(degTargetBed() + 0.5);
lcd.print(LCD_STR_BEDTEMP[0]); lcd.print(LCD_STR_BEDTEMP[0]);
# endif #endif
lcd.print(itostr3(tHotend)); lcd.print(itostr3(tHotend));
lcd.print('/'); lcd.print('/');
lcd.print(itostr3left(tTarget)); lcd.print(itostr3left(tTarget));
# endif//EXTRUDERS > 1 || TEMP_SENSOR_BED != 0
#else//LCD_WIDTH > 19 #endif // EXTRUDERS > 1 || TEMP_SENSOR_BED != 0
#else // LCD_WIDTH > 19
lcd.setCursor(0, 0); lcd.setCursor(0, 0);
lcd.print(LCD_STR_THERMOMETER[0]); lcd.print(LCD_STR_THERMOMETER[0]);
lcd.print(itostr3(tHotend)); lcd.print(itostr3(tHotend));
lcd.print('/'); lcd.print('/');
lcd.print(itostr3left(tTarget)); lcd.print(itostr3left(tTarget));
lcd_printPGM(PSTR(LCD_STR_DEGREE " ")); lcd_printPGM(PSTR(LCD_STR_DEGREE " "));
if (tTarget < 10) if (tTarget < 10) lcd.print(' ');
lcd.print(' ');
# if EXTRUDERS > 1 || TEMP_SENSOR_BED != 0 #if EXTRUDERS > 1 || TEMP_SENSOR_BED != 0
//If we have an 2nd extruder or heated bed, show that in the top right corner // If we have an 2nd extruder or heated bed, show that in the top right corner
lcd.setCursor(10, 0); lcd.setCursor(10, 0);
# if EXTRUDERS > 1 #if EXTRUDERS > 1
tHotend = int(degHotend(1) + 0.5); tHotend = int(degHotend(1) + 0.5);
tTarget = int(degTargetHotend(1) + 0.5); tTarget = int(degTargetHotend(1) + 0.5);
lcd.print(LCD_STR_THERMOMETER[0]); lcd.print(LCD_STR_THERMOMETER[0]);
# else//Heated bed #else // Heated bed
tHotend=int(degBed() + 0.5); tHotend = int(degBed() + 0.5);
tTarget=int(degTargetBed() + 0.5); tTarget = int(degTargetBed() + 0.5);
lcd.print(LCD_STR_BEDTEMP[0]); lcd.print(LCD_STR_BEDTEMP[0]);
# endif #endif
lcd.print(itostr3(tHotend)); lcd.print(itostr3(tHotend));
lcd.print('/'); lcd.print('/');
lcd.print(itostr3left(tTarget)); lcd.print(itostr3left(tTarget));
lcd_printPGM(PSTR(LCD_STR_DEGREE " ")); lcd_printPGM(PSTR(LCD_STR_DEGREE " "));
if (tTarget < 10) if (tTarget < 10) lcd.print(' ');
lcd.print(' ');
# endif//EXTRUDERS > 1 || TEMP_SENSOR_BED != 0 #endif // EXTRUDERS > 1 || TEMP_SENSOR_BED != 0
#endif//LCD_WIDTH > 19
#endif // LCD_WIDTH > 19
#if LCD_HEIGHT > 2
//Lines 2 for 4 line LCD #if LCD_HEIGHT > 2
# if LCD_WIDTH < 20 // Lines 2 for 4 line LCD
# ifdef SDSUPPORT #if LCD_WIDTH < 20
#ifdef SDSUPPORT
lcd.setCursor(0, 2); lcd.setCursor(0, 2);
lcd_printPGM(PSTR("SD")); lcd_printPGM(PSTR("SD"));
if (IS_SD_PRINTING) if (IS_SD_PRINTING)
@ -512,12 +514,14 @@ static void lcd_implementation_status_screen()
else else
lcd_printPGM(PSTR("---")); lcd_printPGM(PSTR("---"));
lcd.print('%'); lcd.print('%');
# endif//SDSUPPORT #endif // SDSUPPORT
# else//LCD_WIDTH > 19
# if EXTRUDERS > 1 && TEMP_SENSOR_BED != 0 #else // LCD_WIDTH > 19
//If we both have a 2nd extruder and a heated bed, show the heated bed temp on the 2nd line on the left, as the first line is filled with extruder temps
tHotend=int(degBed() + 0.5); #if EXTRUDERS > 1 && TEMP_SENSOR_BED != 0
tTarget=int(degTargetBed() + 0.5); // If we both have a 2nd extruder and a heated bed, show the heated bed temp on the 2nd line on the left, as the first line is filled with extruder temps
tHotend = int(degBed() + 0.5);
tTarget = int(degTargetBed() + 0.5);
lcd.setCursor(0, 1); lcd.setCursor(0, 1);
lcd.print(LCD_STR_BEDTEMP[0]); lcd.print(LCD_STR_BEDTEMP[0]);
@ -525,28 +529,32 @@ static void lcd_implementation_status_screen()
lcd.print('/'); lcd.print('/');
lcd.print(itostr3left(tTarget)); lcd.print(itostr3left(tTarget));
lcd_printPGM(PSTR(LCD_STR_DEGREE " ")); lcd_printPGM(PSTR(LCD_STR_DEGREE " "));
if (tTarget < 10) if (tTarget < 10) lcd.print(' ');
lcd.print(' '); #else
# else
lcd.setCursor(0,1); lcd.setCursor(0,1);
lcd.print('X'); lcd.print('X');
lcd.print(ftostr3(current_position[X_AXIS])); lcd.print(ftostr3(current_position[X_AXIS]));
lcd_printPGM(PSTR(" Y")); lcd_printPGM(PSTR(" Y"));
lcd.print(ftostr3(current_position[Y_AXIS])); lcd.print(ftostr3(current_position[Y_AXIS]));
# endif//EXTRUDERS > 1 || TEMP_SENSOR_BED != 0 #endif // EXTRUDERS > 1 || TEMP_SENSOR_BED != 0
# endif//LCD_WIDTH > 19
#endif // LCD_WIDTH > 19
lcd.setCursor(LCD_WIDTH - 8, 1); lcd.setCursor(LCD_WIDTH - 8, 1);
lcd.print('Z'); lcd.print('Z');
lcd.print(ftostr32sp(current_position[Z_AXIS] + 0.00001)); lcd.print(ftostr32sp(current_position[Z_AXIS] + 0.00001));
#endif//LCD_HEIGHT > 2
#if LCD_HEIGHT > 3 #endif // LCD_HEIGHT > 2
#if LCD_HEIGHT > 3
lcd.setCursor(0, 2); lcd.setCursor(0, 2);
lcd.print(LCD_STR_FEEDRATE[0]); lcd.print(LCD_STR_FEEDRATE[0]);
lcd.print(itostr3(feedmultiply)); lcd.print(itostr3(feedrate_multiplier));
lcd.print('%'); lcd.print('%');
# if LCD_WIDTH > 19
# ifdef SDSUPPORT #if LCD_WIDTH > 19 && defined(SDSUPPORT)
lcd.setCursor(7, 2); lcd.setCursor(7, 2);
lcd_printPGM(PSTR("SD")); lcd_printPGM(PSTR("SD"));
if (IS_SD_PRINTING) if (IS_SD_PRINTING)
@ -554,29 +562,33 @@ static void lcd_implementation_status_screen()
else else
lcd_printPGM(PSTR("---")); lcd_printPGM(PSTR("---"));
lcd.print('%'); lcd.print('%');
# endif//SDSUPPORT
# endif//LCD_WIDTH > 19 #endif // LCD_WIDTH > 19 && SDSUPPORT
lcd.setCursor(LCD_WIDTH - 6, 2); lcd.setCursor(LCD_WIDTH - 6, 2);
lcd.print(LCD_STR_CLOCK[0]); lcd.print(LCD_STR_CLOCK[0]);
if(starttime != 0) if (print_job_start_ms != 0) {
{ uint16_t time = millis()/60000 - print_job_start_ms/60000;
uint16_t time = millis()/60000 - starttime/60000;
lcd.print(itostr2(time/60)); lcd.print(itostr2(time/60));
lcd.print(':'); lcd.print(':');
lcd.print(itostr2(time%60)); lcd.print(itostr2(time%60));
}else{ }
else {
lcd_printPGM(PSTR("--:--")); lcd_printPGM(PSTR("--:--"));
} }
#endif
// Status message line at the bottom #endif // LCD_HEIGHT > 3
/**
* Display Progress Bar, Filament display, and/or Status Message on the last line
*/
lcd.setCursor(0, LCD_HEIGHT - 1); lcd.setCursor(0, LCD_HEIGHT - 1);
#if defined(LCD_PROGRESS_BAR) && defined(SDSUPPORT) #ifdef LCD_PROGRESS_BAR
if (card.isFileOpen()) { if (card.isFileOpen()) {
uint16_t mil = millis(), diff = mil - progressBarTick; if (millis() >= progressBarTick + PROGRESS_BAR_MSG_TIME || !lcd_status_message[0]) {
if (diff >= PROGRESS_BAR_MSG_TIME || !lcd_status_message[0]) {
// draw the progress bar // draw the progress bar
int tix = (int)(card.percentDone() * LCD_WIDTH * 3) / 100, int tix = (int)(card.percentDone() * LCD_WIDTH * 3) / 100,
cel = tix / 3, rem = tix % 3, i = LCD_WIDTH; cel = tix / 3, rem = tix % 3, i = LCD_WIDTH;
@ -594,11 +606,11 @@ static void lcd_implementation_status_screen()
} }
} //card.isFileOpen } //card.isFileOpen
#endif //LCD_PROGRESS_BAR #elif defined(FILAMENT_LCD_DISPLAY)
//Display both Status message line and Filament display on the last line // Show Filament Diameter and Volumetric Multiplier %
#ifdef FILAMENT_LCD_DISPLAY // After allowing lcd_status_message to show for 5 seconds
if (message_millis + 5000 <= millis()) { //display any status for the first 5 sec after screen is initiated if (millis() >= previous_lcd_status_ms + 5000) {
lcd_printPGM(PSTR("Dia ")); lcd_printPGM(PSTR("Dia "));
lcd.print(ftostr12ns(filament_width_meas)); lcd.print(ftostr12ns(filament_width_meas));
lcd_printPGM(PSTR(" V")); lcd_printPGM(PSTR(" V"));
@ -606,53 +618,52 @@ static void lcd_implementation_status_screen()
lcd.print('%'); lcd.print('%');
return; return;
} }
#endif //FILAMENT_LCD_DISPLAY
lcd.print(lcd_status_message); #endif // FILAMENT_LCD_DISPLAY
lcd_print(lcd_status_message);
} }
static void lcd_implementation_drawmenu_generic(bool sel, uint8_t row, const char* pstr, char pre_char, char post_char) { static void lcd_implementation_drawmenu_generic(bool sel, uint8_t row, const char* pstr, char pre_char, char post_char) {
char c; char c;
uint8_t n = LCD_WIDTH - 1 - (LCD_WIDTH < 20 ? 1 : 2); uint8_t n = LCD_WIDTH - 2;
lcd.setCursor(0, row); lcd.setCursor(0, row);
lcd.print(sel ? pre_char : ' '); lcd.print(sel ? pre_char : ' ');
while ((c = pgm_read_byte(pstr)) && n > 0) { while ((c = pgm_read_byte(pstr)) && n > 0) {
lcd.print(c); n -= lcd_print(c);
pstr++; pstr++;
if ((pgm_read_byte(pstr) & 0xc0) != 0x80) n--;
} }
while(n--) lcd.print(' '); while(n--) lcd.print(' ');
lcd.print(post_char); lcd.print(post_char);
lcd.print(' ');
} }
static void lcd_implementation_drawmenu_setting_edit_generic(bool sel, uint8_t row, const char* pstr, char pre_char, char* data) { static void lcd_implementation_drawmenu_setting_edit_generic(bool sel, uint8_t row, const char* pstr, char pre_char, char* data) {
char c; char c;
uint8_t n = LCD_WIDTH - 1 - (LCD_WIDTH < 20 ? 1 : 2) - lcd_strlen(data); uint8_t n = LCD_WIDTH - 2 - lcd_strlen(data);
lcd.setCursor(0, row); lcd.setCursor(0, row);
lcd.print(sel ? pre_char : ' '); lcd.print(sel ? pre_char : ' ');
while ((c = pgm_read_byte(pstr)) && n > 0) { while ((c = pgm_read_byte(pstr)) && n > 0) {
lcd.print(c); n -= lcd_print(c);
pstr++; pstr++;
if ((pgm_read_byte(pstr) & 0xc0) != 0x80) n--;
} }
lcd.print(':'); lcd.print(':');
while (n--) lcd.print(' '); while (n--) lcd.print(' ');
lcd.print(data); lcd_print(data);
} }
static void lcd_implementation_drawmenu_setting_edit_generic_P(bool sel, uint8_t row, const char* pstr, char pre_char, const char* data) { static void lcd_implementation_drawmenu_setting_edit_generic_P(bool sel, uint8_t row, const char* pstr, char pre_char, const char* data) {
char c; char c;
uint8_t n = LCD_WIDTH - 1 - (LCD_WIDTH < 20 ? 1 : 2) - lcd_strlen_P(data); uint8_t n = LCD_WIDTH - 2 - lcd_strlen_P(data);
lcd.setCursor(0, row); lcd.setCursor(0, row);
lcd.print(sel ? pre_char : ' '); lcd.print(sel ? pre_char : ' ');
while ((c = pgm_read_byte(pstr)) && n > 0) { while ((c = pgm_read_byte(pstr)) && n > 0) {
lcd.print(c); n -= lcd_print(c);
pstr++; pstr++;
if ((pgm_read_byte(pstr) & 0xc0) != 0x80) n--;
} }
lcd.print(':'); lcd.print(':');
while (n--) lcd.print(' '); while (n--) lcd.print(' ');
lcd_printPGM(data); lcd_printPGM(data);
} }
#define lcd_implementation_drawmenu_setting_edit_int3(sel, row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, '>', itostr3(*(data))) #define lcd_implementation_drawmenu_setting_edit_int3(sel, row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, '>', itostr3(*(data)))
#define lcd_implementation_drawmenu_setting_edit_float3(sel, row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, '>', ftostr3(*(data))) #define lcd_implementation_drawmenu_setting_edit_float3(sel, row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, '>', ftostr3(*(data)))
#define lcd_implementation_drawmenu_setting_edit_float32(sel, row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, '>', ftostr32(*(data))) #define lcd_implementation_drawmenu_setting_edit_float32(sel, row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, '>', ftostr32(*(data)))
@ -678,10 +689,11 @@ void lcd_implementation_drawedit(const char* pstr, char* value) {
lcd.setCursor(1, 1); lcd.setCursor(1, 1);
lcd_printPGM(pstr); lcd_printPGM(pstr);
lcd.print(':'); lcd.print(':');
lcd.setCursor(LCD_WIDTH - (LCD_WIDTH < 20 ? 0 : 1) - lcd_strlen(value), 1); lcd.setCursor(LCD_WIDTH - lcd_strlen(value), 1);
lcd.print(value); lcd_print(value);
} }
static void lcd_implementation_drawmenu_sd(bool sel, uint8_t row, const char* pstr, const char* filename, char* longFilename, uint8_t concat) {
static void lcd_implementation_drawmenu_sd(bool sel, uint8_t row, const char* pstr, const char* filename, char* longFilename, uint8_t concat, char post_char) {
char c; char c;
uint8_t n = LCD_WIDTH - concat; uint8_t n = LCD_WIDTH - concat;
lcd.setCursor(0, row); lcd.setCursor(0, row);
@ -691,53 +703,29 @@ static void lcd_implementation_drawmenu_sd(bool sel, uint8_t row, const char* ps
longFilename[n] = '\0'; longFilename[n] = '\0';
} }
while ((c = *filename) && n > 0) { while ((c = *filename) && n > 0) {
lcd.print(c); n -= lcd_print(c);
filename++; filename++;
n--;
} }
while (n--) lcd.print(' '); while (n--) lcd.print(' ');
lcd.print(post_char);
} }
static void lcd_implementation_drawmenu_sdfile(bool sel, uint8_t row, const char* pstr, const char* filename, char* longFilename) { static void lcd_implementation_drawmenu_sdfile(bool sel, uint8_t row, const char* pstr, const char* filename, char* longFilename) {
lcd_implementation_drawmenu_sd(sel, row, pstr, filename, longFilename, 1); lcd_implementation_drawmenu_sd(sel, row, pstr, filename, longFilename, 2, ' ');
} }
static void lcd_implementation_drawmenu_sddirectory(bool sel, uint8_t row, const char* pstr, const char* filename, char* longFilename) { static void lcd_implementation_drawmenu_sddirectory(bool sel, uint8_t row, const char* pstr, const char* filename, char* longFilename) {
lcd_implementation_drawmenu_sd(sel, row, pstr, filename, longFilename, 2); lcd_implementation_drawmenu_sd(sel, row, pstr, filename, longFilename, 2, LCD_STR_FOLDER[0]);
} }
#define lcd_implementation_drawmenu_back(sel, row, pstr, data) lcd_implementation_drawmenu_generic(sel, row, pstr, LCD_STR_UPLEVEL[0], LCD_STR_UPLEVEL[0]) #define lcd_implementation_drawmenu_back(sel, row, pstr, data) lcd_implementation_drawmenu_generic(sel, row, pstr, LCD_STR_UPLEVEL[0], LCD_STR_UPLEVEL[0])
#define lcd_implementation_drawmenu_submenu(sel, row, pstr, data) lcd_implementation_drawmenu_generic(sel, row, pstr, '>', LCD_STR_ARROW_RIGHT[0]) #define lcd_implementation_drawmenu_submenu(sel, row, pstr, data) lcd_implementation_drawmenu_generic(sel, row, pstr, '>', LCD_STR_ARROW_RIGHT[0])
#define lcd_implementation_drawmenu_gcode(sel, row, pstr, gcode) lcd_implementation_drawmenu_generic(sel, row, pstr, '>', ' ') #define lcd_implementation_drawmenu_gcode(sel, row, pstr, gcode) lcd_implementation_drawmenu_generic(sel, row, pstr, '>', ' ')
#define lcd_implementation_drawmenu_function(sel, row, pstr, data) lcd_implementation_drawmenu_generic(sel, row, pstr, '>', ' ') #define lcd_implementation_drawmenu_function(sel, row, pstr, data) lcd_implementation_drawmenu_generic(sel, row, pstr, '>', ' ')
static void lcd_implementation_quick_feedback()
{
#ifdef LCD_USE_I2C_BUZZER
#if defined(LCD_FEEDBACK_FREQUENCY_DURATION_MS) && defined(LCD_FEEDBACK_FREQUENCY_HZ)
lcd_buzz(LCD_FEEDBACK_FREQUENCY_DURATION_MS, LCD_FEEDBACK_FREQUENCY_HZ);
#else
lcd_buzz(1000/6, 100);
#endif
#elif defined(BEEPER) && BEEPER > -1
SET_OUTPUT(BEEPER);
#if !defined(LCD_FEEDBACK_FREQUENCY_HZ) || !defined(LCD_FEEDBACK_FREQUENCY_DURATION_MS)
const unsigned int delay = 100;
uint8_t i = 10;
#else
const unsigned int delay = 1000000 / LCD_FEEDBACK_FREQUENCY_HZ / 2;
int8_t i = LCD_FEEDBACK_FREQUENCY_DURATION_MS * LCD_FEEDBACK_FREQUENCY_HZ / 1000;
#endif
while (i--) {
WRITE(BEEPER,HIGH);
delayMicroseconds(delay);
WRITE(BEEPER,LOW);
delayMicroseconds(delay);
}
#endif
}
#ifdef LCD_HAS_STATUS_INDICATORS #ifdef LCD_HAS_STATUS_INDICATORS
static void lcd_implementation_update_indicators()
{ static void lcd_implementation_update_indicators() {
#if defined(LCD_I2C_PANELOLU2) || defined(LCD_I2C_VIKI) #if defined(LCD_I2C_PANELOLU2) || defined(LCD_I2C_VIKI)
//set the LEDS - referred to as backlights by the LiquidTWI2 library //set the LEDS - referred to as backlights by the LiquidTWI2 library
static uint8_t ledsprev = 0; static uint8_t ledsprev = 0;
@ -753,29 +741,28 @@ static void lcd_implementation_update_indicators()
ledsprev = leds; ledsprev = leds;
} }
#endif #endif
} }
#endif
#endif // LCD_HAS_STATUS_INDICATORS
#ifdef LCD_HAS_SLOW_BUTTONS #ifdef LCD_HAS_SLOW_BUTTONS
extern uint32_t blocking_enc;
static uint8_t lcd_implementation_read_slow_buttons() extern millis_t next_button_update_ms;
{
static uint8_t lcd_implementation_read_slow_buttons() {
#ifdef LCD_I2C_TYPE_MCP23017 #ifdef LCD_I2C_TYPE_MCP23017
uint8_t slow_buttons; uint8_t slow_buttons;
// Reading these buttons this is likely to be too slow to call inside interrupt context // Reading these buttons this is likely to be too slow to call inside interrupt context
// so they are called during normal lcd_update // so they are called during normal lcd_update
slow_buttons = lcd.readButtons() << B_I2C_BTN_OFFSET; slow_buttons = lcd.readButtons() << B_I2C_BTN_OFFSET;
#if defined(LCD_I2C_VIKI) #ifdef LCD_I2C_VIKI
if(slow_buttons & (B_MI|B_RI)) { //LCD clicked if ((slow_buttons & (B_MI|B_RI)) && millis() < next_button_update_ms) // LCD clicked
if(blocking_enc > millis()) {
slow_buttons &= ~(B_MI|B_RI); // Disable LCD clicked buttons if screen is updated slow_buttons &= ~(B_MI|B_RI); // Disable LCD clicked buttons if screen is updated
}
}
#endif #endif
return slow_buttons; return slow_buttons;
#endif #endif
} }
#endif
#endif // LCD_HAS_SLOW_BUTTONS
#endif //__ULTRALCD_IMPLEMENTATION_HITACHI_HD44780_H #endif //__ULTRALCD_IMPLEMENTATION_HITACHI_HD44780_H

@ -43,7 +43,7 @@ static void ST7920_SWSPI_SND_8BIT(uint8_t val)
#define ST7920_NCS() {WRITE(ST7920_CS_PIN,0);} #define ST7920_NCS() {WRITE(ST7920_CS_PIN,0);}
#define ST7920_SET_CMD() {ST7920_SWSPI_SND_8BIT(0xf8);u8g_10MicroDelay();} #define ST7920_SET_CMD() {ST7920_SWSPI_SND_8BIT(0xf8);u8g_10MicroDelay();}
#define ST7920_SET_DAT() {ST7920_SWSPI_SND_8BIT(0xfa);u8g_10MicroDelay();} #define ST7920_SET_DAT() {ST7920_SWSPI_SND_8BIT(0xfa);u8g_10MicroDelay();}
#define ST7920_WRITE_BYTE(a) {ST7920_SWSPI_SND_8BIT((a)&0xf0);ST7920_SWSPI_SND_8BIT((a)<<4);u8g_10MicroDelay();} #define ST7920_WRITE_BYTE(a) {ST7920_SWSPI_SND_8BIT((uint8_t)((a)&0xf0u));ST7920_SWSPI_SND_8BIT((uint8_t)((a)<<4u));u8g_10MicroDelay();}
#define ST7920_WRITE_BYTES(p,l) {uint8_t i;for(i=0;i<l;i++){ST7920_SWSPI_SND_8BIT(*p&0xf0);ST7920_SWSPI_SND_8BIT(*p<<4);p++;}u8g_10MicroDelay();} #define ST7920_WRITE_BYTES(p,l) {uint8_t i;for(i=0;i<l;i++){ST7920_SWSPI_SND_8BIT(*p&0xf0);ST7920_SWSPI_SND_8BIT(*p<<4);p++;}u8g_10MicroDelay();}
uint8_t u8g_dev_rrd_st7920_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, void *arg) uint8_t u8g_dev_rrd_st7920_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, void *arg)

@ -0,0 +1,252 @@
#ifndef UTF_MAPPER_H
#define UTF_MAPPER_H
#include "language.h"
#ifdef DOGLCD
#define HARDWARE_CHAR_OUT u8g.print
#else
#define HARDWARE_CHAR_OUT lcd.write
#endif
#if !(defined( SIMULATE_ROMFONT )) && defined( DOGLCD )
#if defined( DISPLAY_CHARSET_ISO10646_1 )
#define MAPPER_ONE_TO_ONE
#elif defined( DISPLAY_CHARSET_ISO10646_5 )
#define MAPPER_ONE_TO_ONE
#elif defined( DISPLAY_CHARSET_ISO10646_KANA )
#define MAPPER_ONE_TO_ONE
#endif
#else // SIMULATE_ROMFONT
#if defined( DISPLAY_CHARSET_HD44780_JAPAN )
#if defined( MAPPER_C2C3 )
const PROGMEM uint8_t utf_recode[] =
{ // 0 1 2 3 4 5 6 7 8 9 a b c d e f This is fair for symbols
0x20,0x3f,0xec,0xed,0x3f,0x5c,0x7c,0x3f,0x22,0x63,0x61,0x7f,0x3f,0x3f,0x52,0xb0, // c2a
// ' ' ¢ £ ­ l " c a « R
0xdf,0x3f,0x32,0x33,0x27,0xe4,0xf1,0xa5,0x2c,0x31,0xdf,0x7e,0x3f,0x3f,0x3f,0x3f, // c2b but relatively bad for letters.
// ° 2 3 ` N p . , 1 ° »
0x3f,0x3f,0x3f,0x3f,0xe1,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f, // c38
// ä
0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0xef,0x78,0x3f,0x3f,0x3f,0x3f,0xf5,0x3f,0x3f,0xe2, // c39 missing characters display as '?'
// ö x ü ß
0x3f,0x3f,0x3f,0x3f,0xe1,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f, // c3a
// ä
0x3f,0xee,0x3f,0x3f,0x3f,0x3f,0xef,0xfd,0x3f,0x3f,0x3f,0x3f,0xf5,0x3f,0x3f,0x3f // c3b
// n ö ÷ ü
};
#elif defined( MAPPER_E382E383 )
const PROGMEM uint8_t utf_recode[] =
{ // 0 1 2 3 4 5 6 7 8 9 a b c d e f
0x3d,0xb1,0xb1,0xa8,0xb2,0xa9,0xb3,0xaa,0xb4,0xab,0xb5,0xb6,0xb6,0xb7,0xb7,0xb8, // e382a Please test and correct
// = ア ア ィ イ ゥ ウ ェ エ ォ オ ガ ガ キ キ ク
0xb8,0xb9,0xb9,0xba,0xba,0xbb,0xbb,0xbc,0xbc,0xbd,0xbd,0xbe,0xbe,0xbf,0xbf,0xc0, // e382b
// ク ケ ケ コ コ サ サ シ シ ス ス セ セ ソ ソ タ
0xc0,0xc1,0xc1,0xc2,0xc2,0xc2,0xc3,0xc3,0xc4,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca, // e3838
// タ チ チ ッ ッ ッ テ テ ト ト ナ ニ ヌ ネ
0xca,0xca,0xcb,0xcb,0xcb,0xcc,0xcc,0xcc,0xcd,0xcd,0xcd,0xce,0xce,0xce,0xcf,0xd0, // e3839
// ハ ハ ヒ ヒ ヒ フ フ フ ヘ ヘ ヘ ホ ホ ホ マ ミ
0xd1,0xd2,0xd3,0xd4,0xd4,0xd5,0xd5,0xae,0xd6,0xd7,0xd8,0xd9,0xda,0xdb,0xdc,0xdc, // e383a
// ム メ モ ャ ャ ユ ユ ョ ヨ ラ リ ル レ ロ ワ ワ
0xec,0xa7,0xa6,0xdd,0xcc,0x3f,0x3f,0x3f,0x3f,0x3f,0xa6,0xa5,0xb0,0xa4,0xa4,0x3f // e383b
// ヰ ヱ ヲ ン フ ? ? ? ? ? ヲ ・ ー ヽ ヽ ?
};
#elif defined( MAPPER_D0D1 )
#error( "Cyrillic on a japanese dsplay makes no sense. There are no matching symbols.");
#endif
#elif defined( DISPLAY_CHARSET_HD44780_WESTERN )
#if defined( MAPPER_C2C3 )
:
const PROGMEM uint8_t utf_recode[] =
{ // 0 1 2 3 4 5 6 7 8 9 a b c d e f This is relative complete.
0x20,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0x22,0xa9,0xaa,0xab,0x3f,0x3f,0xae,0x3f, // c2a ¡¢£¤¥¦§¨©ª«¬­®¯
// ' ' ¡ ¢ £ ¤ ¥ ¦ § " © ª « ? ? ® ?
0xb0,0xb1,0xb2,0xb3,0x27,0xb5,0xb6,0xb7,0x2c,0xb9,0xba,0xbb,0xbc,0xbd,0xbe,0xbf, // c2b °±²³´µ¶·¸¹º»¼½¾¿
// ° ± ³ ² ? µ ¶ · , ¹ º » ¼ ½ ¾ ¿
0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf, // c38 ÀÁÃÄÅÆÇÈÉÊËÌÍÎÏ
// À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï
0xd0,0xd1,0xd2,0xd3,0xd4,0xd5,0xd6,0xd7,0xd8,0xd9,0xda,0xdb,0xdc,0xdd,0xde,0xdf, // c39 ÐÑÓÔÕÖ×ØÙÚÛÜÝÞß
// Ð Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ü Ý Þ ß
0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea,0xeb,0xec,0xed,0xee,0xef, // c3a àáãäåæçèéêëìíîï
// à á â ã ä å æ ç è é ê ë ì í î ï
0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,0xfc,0xfd,0xfe,0xff // c3b ðñóôõö÷øùúûüýþÿ
// ð ñ ò ó ô õ ö ÷ ø ù ú û ü ý þ ÿ
};
#elif defined( MAPPER_D0D1 )
#define MAPPER_D0D1_MOD
const PROGMEM uint8_t utf_recode[] =
{//0 1 2 3 4 5 6 7 8 9 a b c d e f
0x41,0x80,0x42,0x92,0x81,0x45,0x82,0x83,0x84,0x85,0x4b,0x86,0x4d,0x48,0x4f,0x87, // d0a
// A Б B Г Д E Ж З И Й K Л M H O П
0x50,0x43,0x54,0x88,0xd8,0x58,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x62,0x8f,0xac,0xad, // d0b
// P C T У Ф X Ч ч Ш Щ Ъ Ы b Э Ю Я
0x61,0x36,0x42,0x92,0x81,0x65,0x82,0xb3,0x84,0x85,0x6b,0x86,0x4d,0x48,0x6f,0x87, // d18
// a 6 B Г Д e Ж ³ И Й k Л M H o П
0x70,0x63,0x54,0x79,0xd8,0x78,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x62,0x8f,0xac,0xad // d19
// p c T y Ф x Ч ч Ш Щ Ъ Ы b Э Ю Я
};
#elif defined( MAPPER_E382E383 )
#error( "Katakana on a western display makes no sense. There are no matching symbols." );
#endif
#elif defined( DISPLAY_CHARSET_HD44780_CYRILLIC )
#if defined( MAPPER_D0D1 )
#define MAPPER_D0D1_MOD
// it is a Russian alphabet translation
// except 0401 --> 0xa2 = Ё, 0451 --> 0xb5 = ё
const PROGMEM uint8_t utf_recode[] =
{ 0x41,0xa0,0x42,0xa1,0xe0,0x45,0xa3,0xa4, // unicode U+0400 to U+047f
// A Б->Ё B Г Д E Ж З // 0 Ѐ Ё Ђ Ѓ Є Ѕ І Ї
0xa5,0xa6,0x4b,0xa7,0x4d,0x48,0x4f,0xa8, // Ј Љ Њ Ћ Ќ Ѝ Ў Џ
// И Й K Л M H O П // 1 А Б В Г Д Е Ж З
0x50,0x43,0x54,0xa9,0xaa,0x58,0xe1,0xab, // И Й К Л М Н О П
// P C T У Ф X Ч ч // 2 Р С Т У Ф Х Г Ч
0xac,0xe2,0xad,0xae,0x62,0xaf,0xb0,0xb1, // Ш Щ Ъ Ы Ь Э Ю Я
// Ш Щ Ъ Ы b Э Ю Я // 3 а б в г д е ж з
0x61,0xb2,0xb3,0xb4,0xe3,0x65,0xb6,0xb7, // и й к л м н о п
// a б->ё в г д e ж з // 4 р с т у ф х ц ч
0xb8,0xb9,0xba,0xbb,0xbc,0xbd,0x6f,0xbe, // ш щ ъ ы ь э ю я
// и й к л м н o п // 5 ѐ ё ђ ѓ є ѕ і ї
0x70,0x63,0xbf,0x79,0xe4,0x78,0xe5,0xc0, // ј љ њ ћ ќ ѝ ў џ
// p c т y ф x ц ч // 6 Ѡ ѡ Ѣ ѣ Ѥ ѥ Ѧ ѧ
0xc1,0xe6,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7 // Ѫ ѩ Ѫ ѫ Ѭ ѭ Ѯ ѯ
// ш щ ъ ы ь э ю я // 7 Ѱ ѱ Ѳ ѳ Ѵ ѵ Ѷ ѷ
}; // ѻ ѹ Ѻ ѻ Ѽ ѽ Ѿ ѿ
#elif defined( MAPPER_C2C3 )
#error( "Western languages on a cyrillic display makes no sense. There are no matching symbols." );
#elif defined( MAPPER_E382E383 )
#error( "Katakana on a cyrillic display makes no sense. There are no matching symbols." );
#endif
#else
#error("Something went wrong in the selection of DISPLAY_CHARSET_HD44780's");
#endif // DISPLAY_CHARSET_HD44780_CYRILLIC
#endif // SIMULATE_ROMFONT
#if defined( MAPPER_NON )
char charset_mapper(char c){
HARDWARE_CHAR_OUT( c );
return 1;
}
#elif defined( MAPPER_C2C3 )
uint8_t utf_hi_char; // UTF-8 high part
bool seen_c2 = false;
char charset_mapper(char c){
uint8_t d = c;
if ( d >= 0x80 ) { // UTF-8 handling
if ( (d >= 0xc0) && (!seen_c2) ) {
utf_hi_char = d - 0xc2;
seen_c2 = true;
return 0;
}
else if (seen_c2){
d &= 0x3f;
#ifndef MAPPER_ONE_TO_ONE
HARDWARE_CHAR_OUT( (char) pgm_read_byte_near( utf_recode + d + ( utf_hi_char << 6 ) - 0x20 ) );
#else
HARDWARE_CHAR_OUT( (char) (0x80 + ( utf_hi_char << 6 ) + d) ) ;
#endif
}
else {
HARDWARE_CHAR_OUT('?');
}
}
else {
HARDWARE_CHAR_OUT((char) c );
}
seen_c2 = false;
return 1;
}
#elif defined( MAPPER_D0D1_MOD )
uint8_t utf_hi_char; // UTF-8 high part
bool seen_d5 = false;
char charset_mapper(char c){
// it is a Russian alphabet translation
// except 0401 --> 0xa2 = Ё, 0451 --> 0xb5 = ё
uint8_t d = c;
if ( d >= 0x80 ) { // UTF-8 handling
if ((d >= 0xd0) && (!seen_d5)) {
utf_hi_char = d - 0xd0;
seen_d5 = true;
return 0;
} else if (seen_d5) {
d &= 0x3f;
if ( !utf_hi_char && ( d == 1 )) {
HARDWARE_CHAR_OUT((char) 0xa2 ); // Ё
} else if ((utf_hi_char == 1) && (d == 0x11)) {
HARDWARE_CHAR_OUT((char) 0xb5 ); // ё
} else {
HARDWARE_CHAR_OUT((char) pgm_read_byte_near( utf_recode + d + ( utf_hi_char << 6 ) - 0x10 ) );
}
}
else {
HARDWARE_CHAR_OUT('?');
}
} else {
HARDWARE_CHAR_OUT((char) c );
}
seen_d5 = false;
return 1;
}
#elif defined( MAPPER_D0D1 )
uint8_t utf_hi_char; // UTF-8 high part
bool seen_d5 = false;
char charset_mapper(char c){
uint8_t d = c;
if ( d >= 0x80u ) { // UTF-8 handling
if ((d >= 0xd0u) && (!seen_d5)) {
utf_hi_char = d - 0xd0u;
seen_d5 = true;
return 0;
} else if (seen_d5) {
d &= 0x3fu;
#ifndef MAPPER_ONE_TO_ONE
HARDWARE_CHAR_OUT( (char) pgm_read_byte_near( utf_recode + d + ( utf_hi_char << 6 ) - 0x20 ) );
#else
HARDWARE_CHAR_OUT( (char) (0xa0u + ( utf_hi_char << 6 ) + d ) ) ;
#endif
} else {
HARDWARE_CHAR_OUT('?');
}
} else {
HARDWARE_CHAR_OUT((char) c );
}
seen_d5 = false;
return 1;
}
#elif defined( MAPPER_E382E383 )
uint8_t utf_hi_char; // UTF-8 high part
bool seen_e3 = false;
bool seen_82_83 = false;
char charset_mapper(char c){
uint8_t d = c;
if ( d >= 0x80 ) { // UTF-8 handling
if ( (d == 0xe3) && (seen_e3 == false)) {
seen_e3 = true;
return 0; // eat 0xe3
} else if ( (d >= 0x82) && (seen_e3 == true) && (seen_82_83 == false)) {
utf_hi_char = d - 0x82;
seen_82_83 = true;
return 0;
} else if ((seen_e3 == true) && (seen_82_83 == true)){
d &= 0x3f;
#ifndef MAPPER_ONE_TO_ONE
HARDWARE_CHAR_OUT( (char) pgm_read_byte_near( utf_recode + d + ( utf_hi_char << 6 ) - 0x20 ) );
#else
HARDWARE_CHAR_OUT( (char) (0x80 + ( utf_hi_char << 6 ) + d ) ) ;
#endif
} else {
HARDWARE_CHAR_OUT((char) '?' );
}
} else {
HARDWARE_CHAR_OUT((char) c );
}
seen_e3 = false;
seen_82_83 = false;
return 1;
}
#else
#error "You have to define one of the DISPLAY_INPUT_CODE_MAPPERs in your language_xx.h file" // should not occur because (en) will set.
#endif // code mappers
#endif // UTF_MAPPER_H

@ -26,57 +26,40 @@ vector_3::vector_3() : x(0), y(0), z(0) { }
vector_3::vector_3(float x_, float y_, float z_) : x(x_), y(y_), z(z_) { } vector_3::vector_3(float x_, float y_, float z_) : x(x_), y(y_), z(z_) { }
vector_3 vector_3::cross(vector_3 left, vector_3 right) vector_3 vector_3::cross(vector_3 left, vector_3 right) {
{
return vector_3(left.y * right.z - left.z * right.y, return vector_3(left.y * right.z - left.z * right.y,
left.z * right.x - left.x * right.z, left.z * right.x - left.x * right.z,
left.x * right.y - left.y * right.x); left.x * right.y - left.y * right.x);
} }
vector_3 vector_3::operator+(vector_3 v) vector_3 vector_3::operator+(vector_3 v) { return vector_3((x + v.x), (y + v.y), (z + v.z)); }
{ vector_3 vector_3::operator-(vector_3 v) { return vector_3((x - v.x), (y - v.y), (z - v.z)); }
return vector_3((x + v.x), (y + v.y), (z + v.z));
}
vector_3 vector_3::operator-(vector_3 v)
{
return vector_3((x - v.x), (y - v.y), (z - v.z));
}
vector_3 vector_3::get_normal() vector_3 vector_3::get_normal() {
{
vector_3 normalized = vector_3(x, y, z); vector_3 normalized = vector_3(x, y, z);
normalized.normalize(); normalized.normalize();
return normalized; return normalized;
} }
float vector_3::get_length() float vector_3::get_length() { return sqrt((x * x) + (y * y) + (z * z)); }
{
float length = sqrt((x * x) + (y * y) + (z * z));
return length;
}
void vector_3::normalize() void vector_3::normalize() {
{
float length = get_length(); float length = get_length();
x /= length; x /= length;
y /= length; y /= length;
z /= length; z /= length;
} }
void vector_3::apply_rotation(matrix_3x3 matrix) void vector_3::apply_rotation(matrix_3x3 matrix) {
{
float resultX = x * matrix.matrix[3*0+0] + y * matrix.matrix[3*1+0] + z * matrix.matrix[3*2+0]; float resultX = x * matrix.matrix[3*0+0] + y * matrix.matrix[3*1+0] + z * matrix.matrix[3*2+0];
float resultY = x * matrix.matrix[3*0+1] + y * matrix.matrix[3*1+1] + z * matrix.matrix[3*2+1]; float resultY = x * matrix.matrix[3*0+1] + y * matrix.matrix[3*1+1] + z * matrix.matrix[3*2+1];
float resultZ = x * matrix.matrix[3*0+2] + y * matrix.matrix[3*1+2] + z * matrix.matrix[3*2+2]; float resultZ = x * matrix.matrix[3*0+2] + y * matrix.matrix[3*1+2] + z * matrix.matrix[3*2+2];
x = resultX; x = resultX;
y = resultY; y = resultY;
z = resultZ; z = resultZ;
} }
void vector_3::debug(char* title) void vector_3::debug(const char title[]) {
{
SERIAL_PROTOCOL(title); SERIAL_PROTOCOL(title);
SERIAL_PROTOCOLPGM(" x: "); SERIAL_PROTOCOLPGM(" x: ");
SERIAL_PROTOCOL_F(x, 6); SERIAL_PROTOCOL_F(x, 6);
@ -87,8 +70,7 @@ void vector_3::debug(char* title)
SERIAL_EOL; SERIAL_EOL;
} }
void apply_rotation_xyz(matrix_3x3 matrix, float &x, float& y, float& z) void apply_rotation_xyz(matrix_3x3 matrix, float &x, float& y, float& z) {
{
vector_3 vector = vector_3(x, y, z); vector_3 vector = vector_3(x, y, z);
vector.apply_rotation(matrix); vector.apply_rotation(matrix);
x = vector.x; x = vector.x;
@ -96,8 +78,7 @@ void apply_rotation_xyz(matrix_3x3 matrix, float &x, float& y, float& z)
z = vector.z; z = vector.z;
} }
matrix_3x3 matrix_3x3::create_from_rows(vector_3 row_0, vector_3 row_1, vector_3 row_2) matrix_3x3 matrix_3x3::create_from_rows(vector_3 row_0, vector_3 row_1, vector_3 row_2) {
{
//row_0.debug("row_0"); //row_0.debug("row_0");
//row_1.debug("row_1"); //row_1.debug("row_1");
//row_2.debug("row_2"); //row_2.debug("row_2");
@ -106,19 +87,16 @@ matrix_3x3 matrix_3x3::create_from_rows(vector_3 row_0, vector_3 row_1, vector_3
new_matrix.matrix[3] = row_1.x; new_matrix.matrix[4] = row_1.y; new_matrix.matrix[5] = row_1.z; new_matrix.matrix[3] = row_1.x; new_matrix.matrix[4] = row_1.y; new_matrix.matrix[5] = row_1.z;
new_matrix.matrix[6] = row_2.x; new_matrix.matrix[7] = row_2.y; new_matrix.matrix[8] = row_2.z; new_matrix.matrix[6] = row_2.x; new_matrix.matrix[7] = row_2.y; new_matrix.matrix[8] = row_2.z;
//new_matrix.debug("new_matrix"); //new_matrix.debug("new_matrix");
return new_matrix; return new_matrix;
} }
void matrix_3x3::set_to_identity() void matrix_3x3::set_to_identity() {
{
matrix[0] = 1; matrix[1] = 0; matrix[2] = 0; matrix[0] = 1; matrix[1] = 0; matrix[2] = 0;
matrix[3] = 0; matrix[4] = 1; matrix[5] = 0; matrix[3] = 0; matrix[4] = 1; matrix[5] = 0;
matrix[6] = 0; matrix[7] = 0; matrix[8] = 1; matrix[6] = 0; matrix[7] = 0; matrix[8] = 1;
} }
matrix_3x3 matrix_3x3::create_look_at(vector_3 target) matrix_3x3 matrix_3x3::create_look_at(vector_3 target) {
{
vector_3 z_row = target.get_normal(); vector_3 z_row = target.get_normal();
vector_3 x_row = vector_3(1, 0, -target.x/target.z).get_normal(); vector_3 x_row = vector_3(1, 0, -target.x/target.z).get_normal();
vector_3 y_row = vector_3::cross(z_row, x_row).get_normal(); vector_3 y_row = vector_3::cross(z_row, x_row).get_normal();
@ -127,7 +105,6 @@ matrix_3x3 matrix_3x3::create_look_at(vector_3 target)
// y_row.debug("y_row"); // y_row.debug("y_row");
// z_row.debug("z_row"); // z_row.debug("z_row");
// create the matrix already correctly transposed // create the matrix already correctly transposed
matrix_3x3 rot = matrix_3x3::create_from_rows(x_row, y_row, z_row); matrix_3x3 rot = matrix_3x3::create_from_rows(x_row, y_row, z_row);
@ -135,9 +112,7 @@ matrix_3x3 matrix_3x3::create_look_at(vector_3 target)
return rot; return rot;
} }
matrix_3x3 matrix_3x3::transpose(matrix_3x3 original) {
matrix_3x3 matrix_3x3::transpose(matrix_3x3 original)
{
matrix_3x3 new_matrix; matrix_3x3 new_matrix;
new_matrix.matrix[0] = original.matrix[0]; new_matrix.matrix[1] = original.matrix[3]; new_matrix.matrix[2] = original.matrix[6]; new_matrix.matrix[0] = original.matrix[0]; new_matrix.matrix[1] = original.matrix[3]; new_matrix.matrix[2] = original.matrix[6];
new_matrix.matrix[3] = original.matrix[1]; new_matrix.matrix[4] = original.matrix[4]; new_matrix.matrix[5] = original.matrix[7]; new_matrix.matrix[3] = original.matrix[1]; new_matrix.matrix[4] = original.matrix[4]; new_matrix.matrix[5] = original.matrix[7];
@ -145,18 +120,19 @@ matrix_3x3 matrix_3x3::transpose(matrix_3x3 original)
return new_matrix; return new_matrix;
} }
void matrix_3x3::debug(char* title) { void matrix_3x3::debug(const char title[]) {
SERIAL_PROTOCOLLN(title); SERIAL_PROTOCOLLN(title);
int count = 0; int count = 0;
for(int i=0; i<3; i++) { for(int i=0; i<3; i++) {
for(int j=0; j<3; j++) { for(int j=0; j<3; j++) {
if (matrix[count] >= 0.0) SERIAL_PROTOCOLCHAR('+');
SERIAL_PROTOCOL_F(matrix[count], 6); SERIAL_PROTOCOL_F(matrix[count], 6);
SERIAL_PROTOCOLPGM(" "); SERIAL_PROTOCOLCHAR(' ');
count++; count++;
} }
SERIAL_EOL; SERIAL_EOL;
} }
} }
#endif // #ifdef ENABLE_AUTO_BED_LEVELING #endif // ENABLE_AUTO_BED_LEVELING

@ -37,7 +37,7 @@ struct vector_3
float get_length(); float get_length();
vector_3 get_normal(); vector_3 get_normal();
void debug(char* title); void debug(const char title[]);
void apply_rotation(matrix_3x3 matrix); void apply_rotation(matrix_3x3 matrix);
}; };
@ -52,7 +52,7 @@ struct matrix_3x3
void set_to_identity(); void set_to_identity();
void debug(char* title); void debug(const char title[]);
}; };

@ -10,14 +10,16 @@
* [Auto Bed Leveling](/Documentation/BedLeveling.md) * [Auto Bed Leveling](/Documentation/BedLeveling.md)
* [Filament Sensor](/Documentation/FilamentSensor.md) * [Filament Sensor](/Documentation/FilamentSensor.md)
* [Ramps Servo Power](/Documentation/RampsServoPower.md) * [Ramps Servo Power](/Documentation/RampsServoPower.md)
* [LCD Language - Font - System](Documentation/LCDLanguageFont.md)
* [Mesh Bed Leveling](/Documentation/MeshBedLeveling.md)
##### [RepRap.org Wiki Page](http://reprap.org/wiki/Marlin) ##### [RepRap.org Wiki Page](http://reprap.org/wiki/Marlin)
## Quick Information ## Quick Information
This is a firmware for reprap single-processor electronics setups. This is a firmware for reprap single-processor electronics setups.
It also works on the Ultimaker PCB. It supports printing from SD card+Folders, and look-ahead trajectory planning. It also works on the Ultimaker PCB. It supports printing from SD card+Folders and look-ahead trajectory planning.
This firmware is a mashup between [Sprinter](https://github.com/kliment/Sprinter), [grbl](https://github.com/simen/grbl) and many original parts. This firmware is a mashup between [Sprinter](https://github.com/kliment/Sprinter), [grbl](https://github.com/simen/grbl), and many original parts.
## Current Status: Bug Fixing ## Current Status: Bug Fixing
@ -27,24 +29,20 @@ We are actively looking for testers. So please try the current development versi
[![Coverity Scan Build Status](https://scan.coverity.com/projects/2224/badge.svg)](https://scan.coverity.com/projects/2224) [![Coverity Scan Build Status](https://scan.coverity.com/projects/2224/badge.svg)](https://scan.coverity.com/projects/2224)
[![Travis Build Status](https://travis-ci.org/MarlinFirmware/Marlin.svg)](https://travis-ci.org/MarlinFirmware/Marlin) [![Travis Build Status](https://travis-ci.org/MarlinFirmware/Marlin.svg)](https://travis-ci.org/MarlinFirmware/Marlin)
What bugs are we working on: [Bug Fixing Round 3](https://github.com/MarlinFirmware/Marlin/milestones/Bug%20Fixing%20Round%203)
## Contact ## Contact
__IRC:__ #marlin-firmware @freenode ([WebChat Client](https://webchat.freenode.net/?channels=marlin-firmware) __Google Hangout:__ <a href="https://plus.google.com/hangouts/_/g2wp5duzb2y6ahikg6tmwao3kua" target="_blank">Hangout</a>
__Mailing List:__ marlin@lists.0l.de ([Subscribe](http://lists.0l.de/mailman/listinfo/marlin), [Archive](http://lists.0l.de/pipermail/marlin/))
## Credits ## Credits
The current Marlin dev team consists of: The current Marlin dev team consists of:
- Erik van der Zalm ([@ErikZalm](https://github.com/ErikZalm)) - Scott Lahteine [@thinkyhead]
- [@daid](https://github.com/daid) -
Sprinters lead developers are Kliment and caru. Sprinters lead developers are Kliment and caru.
Grbls lead developer is Simen Svale Skogsrud. Grbl's lead developer is Simen Svale Skogsrud.
Sonney Jeon (Chamnit) improved some parts of grbl Sonney Jeon (Chamnit) improved some parts of grbl.
A fork by bkubicek for the Ultimaker was merged. A fork by bkubicek for the Ultimaker was merged.
More features have been added by: More features have been added by:

Loading…
Cancel
Save