// 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
// build by the user have been successfully uploaded into firmware.
#define STRING_VERSION "4.1.2"
#define STRING_URL "reprap.org"
#define STRING_VERSION "4.1.3"
#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_SPLASH_LINE1 "v" STRING_VERSION // will be shown during bootup in line 1
...
...
@@ -33,7 +39,7 @@
#define SERIAL_PORT 0
// This determines the communication speed of the printer
// 115200 - 250000
// 2400,9600,19200,38400,57600,115200,250000
#define BAUDRATE 115200
// This enables the serial port associated to the Bluetooth interface on AT90USB devices
...
...
@@ -158,7 +164,7 @@
// 1010 is Pt1000 with 1k pullup (non standard)
// 147 is Pt100 with 4k7 pullup
// 110 is Pt100 with 1k pullup (non standard)
// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below.
// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below.
// Use it for Testing or Development purposes. NEVER for production machine.
// #define DUMMY_THERMISTOR_998_VALUE 25
// #define DUMMY_THERMISTOR_999_VALUE 100
...
...
@@ -219,9 +225,10 @@
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
// If the temperature difference between the target temperature and the actual temperature
// is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
#define PID_FUNCTIONAL_RANGE 10 // degC
#define PID_INTEGRAL_DRIVE_MAX PID_MAX // Limit for the integral term
#define K1 0.95 // Smoothing factor within the PID
#define PID_FUNCTIONAL_RANGE 10 // degC
#define PID_INTEGRAL_DRIVE_MAX PID_MAX // Limit for the integral term
#define K1 0.95 // Smoothing factor within the PID
#define MAX_OVERSHOOT_PID_AUTOTUNE 20 // Max valor for overshoot autotune
//==============================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.
// 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 @@
//#define VIKI2
//#define miniVIKI
// This is a new controller currently under development.
// Show a progress bar on HD44780 LCDs for SD printing
#define LCD_PROGRESS_BAR
//#define LCD_PROGRESS_BAR
#ifdef LCD_PROGRESS_BAR
// Amount of time (ms) to show the bar
...
...
@@ -297,8 +316,22 @@
//#define PROGRESS_MSG_ONCE
#endif
// This allows hosts to request long names for files and folders with M33
//#define LONG_FILENAME_HOST_SUPPORT
#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.
//#define USE_WATCHDOG
...
...
@@ -341,7 +374,7 @@
#define MM_PER_ARC_SEGMENT 1
#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.
//#define HEATERS_PARALLEL
...
...
@@ -364,9 +397,10 @@ const unsigned int dropsegments=5; //everything with less than this number of st
#define BUFSIZE 4
// 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'.
// This wait is only send when the buffer is empty. The timeout-length is in milliseconds. 1000 is a good value.
#define NO_TIMEOUTS 1000
// Therefore some clients abort after 30 seconds in a timeout.
// Some other clients start sending commands while receiving a 'wait'.
// 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.
#define ADVANCED_OK
...
...
@@ -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)
#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.
//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_ERR_MATERIAL_INDEX "M145 S<index> out of range (0-2)"
#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_INIT_FAIL "SD init fail"
...
...
@@ -202,23 +197,27 @@
#define MSG_KP " Kp: "
#define MSG_KI " Ki: "
#define MSG_KD " Kd: "
#define MSG_B " B:"
#define MSG_T " T:"
#define MSG_AT " @:"
#define MSG_T "T:"
#define MSG_B "B:"
#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_HEATING_FAILED "Heating failed"
#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
#error You must have a Z_MIN or Z_PROBE endstop to enable Z_PROBE_REPEATABILITY_TEST.
#else
...
...
@@ -236,20 +236,13 @@
*/
#if defined(DELTA) && 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
#error You must have a Z_PROBE_PIN defined in your pins2tool.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
#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.
SET_INPUT(Z_PROBE_PIN);
#ifdef ENDSTOPPULLUP_ZPROBE
WRITE(Z_PROBE_PIN,HIGH);
#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);
lcd.print(LCD_STR_BEDTEMP[0]);
lcd.print(itostr3(tHotend));
lcd.print('/');
lcd.print(itostr3left(tTarget));
lcd_printPGM(PSTR(LCD_STR_DEGREE" "));
if(tTarget<10)lcd.print(' ');
// If we both have a 2nd extruder and a heated bed,
// show the heated bed temp on the left,
// since the first line is filled with extruder temps