//==============================LCD and SD support=============================
//============================ LCD and SD support ===========================
// Choose ONE of these 3 charsets. This has to match your hardware. Ignored for full graphic display.
// Choose ONE of these 3 charsets. This has to match your hardware. Ignored for full graphic display.
// 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.
// 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.
...
@@ -352,6 +345,11 @@
...
@@ -352,6 +345,11 @@
//#define VIKI2
//#define VIKI2
//#define miniVIKI
//#define miniVIKI
// This is a new controller currently under development.
// 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
...
@@ -297,8 +316,22 @@
...
@@ -297,8 +316,22 @@
//#define PROGRESS_MSG_ONCE
//#define PROGRESS_MSG_ONCE
#endif
#endif
// This allows hosts to request long names for files and folders with M33
//#define LONG_FILENAME_HOST_SUPPORT
#endif // SDSUPPORT
#endif // SDSUPPORT
// for dogm lcd displays you can choose some additional fonts:
#ifdef DOGLCD
// save 3120 bytes of PROGMEM by commenting out #define USE_BIG_EDIT_FONT
// we don't have a big font for Cyrillic, Kana
//#define USE_BIG_EDIT_FONT
// If you have spare 2300Byte of progmem and want to use a
// smaller font on the Info-screen uncomment the next line.
//#define USE_SMALL_INFOFONT
#endif // DOGLCD
// 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
...
@@ -341,7 +374,7 @@
...
@@ -341,7 +374,7 @@
#define MM_PER_ARC_SEGMENT 1
#define MM_PER_ARC_SEGMENT 1
#define N_ARC_CORRECTION 25
#define N_ARC_CORRECTION 25
constunsignedintdropsegments=5;//everything with less than this number of steps will be ignored as move and joined with the next movement
constunsignedintdropsegments=5;// everything with less than this number of steps will be ignored as move and joined with the next movement
// Control heater 0 and heater 1 in parallel.
// Control heater 0 and heater 1 in parallel.
//#define HEATERS_PARALLEL
//#define HEATERS_PARALLEL
...
@@ -364,9 +397,10 @@ const unsigned int dropsegments=5; //everything with less than this number of st
...
@@ -364,9 +397,10 @@ const unsigned int dropsegments=5; //everything with less than this number of st
#define BUFSIZE 4
#define BUFSIZE 4
// Bad Serial-connections can miss a received command by sending an 'ok'
// Bad Serial-connections can miss a received command by sending an 'ok'
// Therefore some clients go after 30 seconds in a timeout. Some other clients start sending commands while receiving a 'wait'.
// Therefore some clients abort after 30 seconds in a timeout.
// This wait is only send when the buffer is empty. The timeout-length is in milliseconds. 1000 is a good value.
// Some other clients start sending commands while receiving a 'wait'.
#define NO_TIMEOUTS 1000
// This "wait" is only sent when the buffer is empty. 1 second is a good value here.
#define NO_TIMEOUTS 1000 // Milliseconds
// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary.
// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary.
#define ADVANCED_OK
#define ADVANCED_OK
...
@@ -389,7 +423,7 @@ const unsigned int dropsegments=5; //everything with less than this number of st
...
@@ -389,7 +423,7 @@ const unsigned int dropsegments=5; //everything with less than this number of st
#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
// Add support for experimental filament exchange support M600; requires display
// Add support for filament exchange support M600; requires display
externunsignedlongprinter_usage_seconds;//this can old about 136 year before go overflow. If you belive that you can live more than this please contact me.
externunsignedlongprinter_usage_seconds;//this can old about 136 year before go overflow. If you belive that you can live more than this please contact me.
//this is to delay autostart and hence the initialisaiton of the sd card to some seconds after the normal init, so the device is available quick after a reset
//this is to delay autostart and hence the initialisaiton of the sd card to some seconds after the normal init, so the device is available quick after a reset
intConfigSD_KeyIndex(char*key){//At the moment a binary search algorithm is used for simplicity, if it will be necessary (Eg. tons of key), an hash search algorithm will be implemented.
staticconstchar*cfgSD_KEY[]={//Keep this in lexicographical order for better search performance(O(Nlog2(N)) insted of O(N*N)) (if you don't keep this sorted, the algorithm for find the key index won't work, keep attention.)
#ifdef POWER_CONSUMPTION
"PWR",
#endif
"TME",
};
enumcfgSD_ENUM{//This need to be in the same order as cfgSD_KEY
#define MSG_EMPTY_PLANE "Autolevel can only be execute on an actual plane, make sure width and height are not 0!"
#define MSG_EMPTY_PLANE "Autolevel can only be execute on an actual plane, make sure width and height are not 0!"
#define MSG_ERR_MATERIAL_INDEX "M145 S<index> out of range (0-2)"
#define MSG_FILRUNOUT_PIN "filament_runout_pin: "
#define MSG_FILRUNOUT_PIN "filament_runout_pin: "
#define MSG_ERR_M428_TOO_FAR "Too far from reference point"
#define MSG_SD_CANT_OPEN_SUBDIR "Cannot open subdir"
#define MSG_SD_CANT_OPEN_SUBDIR "Cannot open subdir"
#define MSG_SD_INIT_FAIL "SD init fail"
#define MSG_SD_INIT_FAIL "SD init fail"
...
@@ -202,23 +197,27 @@
...
@@ -202,23 +197,27 @@
#define MSG_KP " Kp: "
#define MSG_KP " Kp: "
#define MSG_KI " Ki: "
#define MSG_KI " Ki: "
#define MSG_KD " Kd: "
#define MSG_KD " Kd: "
#define MSG_B " B:"
#define MSG_T "T:"
#define MSG_T " T:"
#define MSG_B "B:"
#define MSG_AT " @:"
#define MSG_AT "@:"
#define MSG_BAT "B@:"
#define MSG_W "W:"
#define MSG_PID_AUTOTUNE_FINISHED MSG_PID_AUTOTUNE " finished! Put the last Kp, Ki and Kd constants from above into Configuration.h or send command M500 for save in EEPROM the new value!"
#define MSG_PID_AUTOTUNE_FINISHED MSG_PID_AUTOTUNE " finished! Put the last Kp, Ki and Kd constants from above into Configuration.h or send command M500 for save in EEPROM the new value!"
#define MSG_PID_DEBUG " PID_DEBUG "
#define MSG_HEATING_FAILED "Heating failed"
#define MSG_PID_DEBUG_INPUT ": Input "
#define MSG_THERMAL_RUNAWAY_STOP "Thermal Runaway, system stopped! Heater_ID: "
#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.
#if Z_PROBE_PIN == -1 || defined(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 or Z_PROBE 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
...
@@ -236,20 +236,13 @@
...
@@ -236,20 +236,13 @@
*/
*/
#if defined(DELTA) && defined(Z_PROBE_ENDSTOP)
#if defined(DELTA) && defined(Z_PROBE_ENDSTOP)
#ifndef Z_PROBE_PIN
#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
#error You must have a Z_PROBE_PIN defined in your pins2tool.h file if you enable Z_PROBE_ENDSTOP
#endif
#endif
#if Z_PROBE_PIN == -1
#if Z_PROBE_PIN == -1
#error You must set Z_PROBE_PIN to a valid pin if you enable Z_PROBE_ENDSTOP
#error You must set Z_PROBE_PIN to a valid pin if you enable Z_PROBE_ENDSTOP
#endif
#endif
#endif
#endif
/**
* Allen Key Z Probe requires Auto Bed Leveling grid and Delta
#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.
#if HAS_Z_PROBE && defined(Z_PROBE_ENDSTOP) // Check for Z_PROBE_ENDSTOP so we don't pull a pin high unless it's to be used.
// 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);
// If we both have a 2nd extruder and a heated bed,
lcd.print(LCD_STR_BEDTEMP[0]);
// show the heated bed temp on the left,
lcd.print(itostr3(tHotend));
// since the first line is filled with extruder temps