Merge branch 'Development' of https://github.com/MarlinFirmware/Marlin into Bulgarian
This commit is contained in:
@ -276,6 +276,13 @@
|
||||
#define MAX_PROBE_Y (min(Y_MAX_POS, Y_MAX_POS + Y_PROBE_OFFSET_FROM_EXTRUDER))
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sled Options
|
||||
*/
|
||||
#ifdef Z_PROBE_SLED
|
||||
#define Z_SAFE_HOMING
|
||||
#endif
|
||||
|
||||
/**
|
||||
* MAX_STEP_FREQUENCY differs for TOSHIBA
|
||||
*/
|
||||
|
@ -270,44 +270,24 @@ Here are some standard links for getting your machine calibrated:
|
||||
#define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
|
||||
|
||||
//===========================================================================
|
||||
//============================= Thermal Runaway Protection ==================
|
||||
//======================== Thermal Runaway Protection =======================
|
||||
//===========================================================================
|
||||
/*
|
||||
This is a feature to protect your printer from burn up in flames if it has
|
||||
a thermistor coming off place (this happened to a friend of mine recently and
|
||||
motivated me writing this feature).
|
||||
|
||||
The issue: If a thermistor come off, it will read a lower temperature than actual.
|
||||
The system will turn the heater on forever, burning up the filament and anything
|
||||
else around.
|
||||
|
||||
After the temperature reaches the target for the first time, this feature will
|
||||
start measuring for how long the current temperature stays below the target
|
||||
minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS).
|
||||
|
||||
If it stays longer than _PERIOD, it means the thermistor temperature
|
||||
cannot catch up with the target, so something *may be* wrong. Then, to be on the
|
||||
safe side, the system will he halt.
|
||||
|
||||
Bear in mind the count down will just start AFTER the first time the
|
||||
thermistor temperature is over the target, so you will have no problem if
|
||||
your extruder heater takes 2 minutes to hit the target on heating.
|
||||
|
||||
*/
|
||||
// If you want to enable this feature for all your extruder heaters,
|
||||
// uncomment the 2 defines below:
|
||||
|
||||
// Parameters for all extruder heaters
|
||||
//#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds
|
||||
//#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius
|
||||
|
||||
// If you want to enable this feature for your bed heater,
|
||||
// uncomment the 2 defines below:
|
||||
|
||||
// Parameters for the bed heater
|
||||
//#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds
|
||||
//#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius
|
||||
/**
|
||||
* Thermal Runaway Protection protects your printer from damage and fire if a
|
||||
* thermistor falls out or temperature sensors fail in any way.
|
||||
*
|
||||
* The issue: If a thermistor falls out or a temperature sensor fails,
|
||||
* Marlin can no longer sense the actual temperature. Since a disconnected
|
||||
* thermistor reads as a low temperature, the firmware will keep the heater on.
|
||||
*
|
||||
* The solution: Once the temperature reaches the target, start observing.
|
||||
* If the temperature stays too far below the target (hysteresis) for too long,
|
||||
* the firmware will halt as a safety precaution.
|
||||
*/
|
||||
|
||||
#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
|
||||
#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed
|
||||
|
||||
//===========================================================================
|
||||
//============================= Mechanical Settings =========================
|
||||
@ -377,7 +357,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
|
||||
|
||||
// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
|
||||
#define INVERT_X_DIR false
|
||||
#define INVERT_Y_DIR false
|
||||
#define INVERT_Y_DIR true
|
||||
#define INVERT_Z_DIR false
|
||||
|
||||
// @section extruder
|
||||
@ -411,17 +391,20 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
|
||||
#define Z_MAX_POS 200
|
||||
|
||||
//===========================================================================
|
||||
//============================= Filament Runout Sensor ======================
|
||||
//========================= Filament Runout Sensor ==========================
|
||||
//===========================================================================
|
||||
//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament
|
||||
// In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
|
||||
// It is assumed that when logic high = filament available
|
||||
// when logic low = filament ran out
|
||||
//const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned
|
||||
//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
|
||||
#ifdef FILAMENT_RUNOUT_SENSOR
|
||||
const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned
|
||||
#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
|
||||
#define FILAMENT_RUNOUT_SCRIPT "M600"
|
||||
#endif
|
||||
|
||||
//===========================================================================
|
||||
//============================ Mesh Bed Leveling ============================
|
||||
//=========================== Manual Bed Leveling ===========================
|
||||
//===========================================================================
|
||||
|
||||
// #define MANUAL_BED_LEVELING // Add display menu option for bed leveling
|
||||
@ -442,7 +425,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
|
||||
#endif // MESH_BED_LEVELING
|
||||
|
||||
//===========================================================================
|
||||
//============================= Bed Auto Leveling ===========================
|
||||
//============================ Bed Auto Leveling ============================
|
||||
//===========================================================================
|
||||
|
||||
// @section bedlevel
|
||||
@ -622,10 +605,9 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
|
||||
|
||||
#ifdef EEPROM_SETTINGS
|
||||
// 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.
|
||||
#define EEPROM_CHITCHAT // Please keep turned on if you can.
|
||||
#endif
|
||||
|
||||
|
||||
// @section temperature
|
||||
|
||||
// Preheat Constants
|
||||
|
@ -14,13 +14,27 @@
|
||||
#endif
|
||||
#define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control
|
||||
|
||||
//// Heating sanity check:
|
||||
// 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.
|
||||
// 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
|
||||
//#define WATCH_TEMP_PERIOD 40000 //40 seconds
|
||||
//#define WATCH_TEMP_INCREASE 10 //Heat up at least 10 degree in 20 seconds
|
||||
/**
|
||||
* Thermal Protection parameters
|
||||
*/
|
||||
#ifdef THERMAL_PROTECTION_HOTENDS
|
||||
#define THERMAL_PROTECTION_PERIOD 40 // Seconds
|
||||
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
|
||||
|
||||
/**
|
||||
* Whenever an M104 or M109 increases the target temperature the firmware will wait for the
|
||||
* WATCH_TEMP_PERIOD to transpire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
|
||||
* degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
|
||||
* but only if the current temperature is far enough below the target for a reliable test.
|
||||
*/
|
||||
#define WATCH_TEMP_PERIOD 16 // Seconds
|
||||
#define WATCH_TEMP_INCREASE 4 // Degrees Celsius
|
||||
#endif
|
||||
|
||||
#ifdef THERMAL_PROTECTION_BED
|
||||
#define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds
|
||||
#define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
|
||||
#endif
|
||||
|
||||
#ifdef PIDTEMP
|
||||
// this adds an experimental additional term to the heating power, proportional to the extrusion speed.
|
||||
@ -31,14 +45,16 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
//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".
|
||||
//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
|
||||
// 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.
|
||||
// on an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
|
||||
/**
|
||||
* Automatic Temperature:
|
||||
* The hotend target temperature is calculated by all the buffered lines of gcode.
|
||||
* The maximum buffered steps/sec of the extruder motor is called "se".
|
||||
* Start autotemp mode with M109 S<mintemp> B<maxtemp> F<factor>
|
||||
* The target temperature is set to mintemp+factor*se[steps/sec] and is limited by
|
||||
* mintemp and maxtemp. Turn this off by excuting M109 without F*
|
||||
* Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp.
|
||||
* On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
|
||||
*/
|
||||
#define AUTOTEMP
|
||||
#ifdef AUTOTEMP
|
||||
#define AUTOTEMP_OLDWEIGHT 0.98
|
||||
@ -376,6 +392,15 @@ const unsigned int dropsegments=5; //everything with less than this number of st
|
||||
#define MAX_CMD_SIZE 96
|
||||
#define BUFSIZE 4
|
||||
|
||||
// Bad Serial-connections can miss a received command by sending an 'ok'
|
||||
// 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
|
||||
|
||||
// @section fwretract
|
||||
|
||||
// Firmware based and LCD controlled retract
|
||||
|
@ -266,8 +266,8 @@ VPATH += $(ARDUINO_INSTALL_DIR)/hardware/teensy/cores/teensy
|
||||
endif
|
||||
CXXSRC = WMath.cpp WString.cpp Print.cpp Marlin_main.cpp \
|
||||
MarlinSerial.cpp Sd2Card.cpp SdBaseFile.cpp SdFatUtil.cpp \
|
||||
SdFile.cpp SdVolume.cpp motion_control.cpp planner.cpp \
|
||||
stepper.cpp temperature.cpp cardreader.cpp configuration_store.cpp \
|
||||
SdFile.cpp SdVolume.cpp planner.cpp stepper.cpp \
|
||||
temperature.cpp cardreader.cpp configuration_store.cpp \
|
||||
watchdog.cpp SPI.cpp servo.cpp Tone.cpp ultralcd.cpp digipot_mcp4451.cpp \
|
||||
vector_3.cpp qr_solve.cpp
|
||||
ifeq ($(LIQUID_TWI2), 0)
|
||||
|
@ -21,6 +21,10 @@
|
||||
#include "fastio.h"
|
||||
#include "Configuration.h"
|
||||
|
||||
#ifndef SANITYCHECK_H
|
||||
#error Your Configuration.h and Configuration_adv.h files are outdated!
|
||||
#endif
|
||||
|
||||
#if (ARDUINO >= 100)
|
||||
#include "Arduino.h"
|
||||
#else
|
||||
@ -109,7 +113,6 @@ FORCE_INLINE void serialprintPGM(const char *str) {
|
||||
}
|
||||
|
||||
void get_command();
|
||||
void process_commands();
|
||||
|
||||
void manage_inactivity(bool ignore_stepper_queue=false);
|
||||
|
||||
@ -195,13 +198,14 @@ void manage_inactivity(bool ignore_stepper_queue=false);
|
||||
*/
|
||||
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 EndstopEnum {X_MIN=0, Y_MIN=1, Z_MIN=2, Z_PROBE=3, X_MAX=4, Y_MAX=5, Z_MAX=6};
|
||||
|
||||
void enable_all_steppers();
|
||||
void disable_all_steppers();
|
||||
|
||||
void FlushSerialRequestResend();
|
||||
void ClearToSend();
|
||||
void ok_to_send();
|
||||
|
||||
void get_coordinates();
|
||||
#ifdef DELTA
|
||||
void calculate_delta(float cartesian[3]);
|
||||
#ifdef ENABLE_AUTO_BED_LEVELING
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -313,4 +313,16 @@
|
||||
#error [XYZ]_HOME_RETRACT_MM settings have been renamed [XYZ]_HOME_BUMP_MM
|
||||
#endif
|
||||
|
||||
#if WATCH_TEMP_PERIOD > 500
|
||||
#error WATCH_TEMP_PERIOD now uses seconds instead of milliseconds
|
||||
#endif
|
||||
|
||||
#if !defined(THERMAL_PROTECTION_HOTENDS) && (defined(WATCH_TEMP_PERIOD) || defined(THERMAL_PROTECTION_PERIOD))
|
||||
#error Thermal Runaway Protection for hotends must now be enabled with THERMAL_PROTECTION_HOTENDS
|
||||
#endif
|
||||
|
||||
#if !defined(THERMAL_PROTECTION_BED) && defined(THERMAL_PROTECTION_BED_PERIOD)
|
||||
#error Thermal Runaway Protection for the bed must now be enabled with THERMAL_PROTECTION_BED
|
||||
#endif
|
||||
|
||||
#endif //SANITYCHECK_H
|
||||
|
@ -1097,8 +1097,9 @@ int16_t SdBaseFile::read(void* buf, uint16_t nbyte) {
|
||||
fail:
|
||||
return -1;
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
/** Read the next directory entry from a directory file.
|
||||
|
||||
/**
|
||||
* Read the next entry in a directory.
|
||||
*
|
||||
* \param[out] dir The dir_t struct that will receive the data.
|
||||
*
|
||||
@ -1114,50 +1115,38 @@ int8_t SdBaseFile::readDir(dir_t* dir, char* longFilename) {
|
||||
if (!isDir() || (0X1F & curPosition_)) return -1;
|
||||
|
||||
//If we have a longFilename buffer, mark it as invalid. If we find a long filename it will be filled automaticly.
|
||||
if (longFilename != NULL)
|
||||
{
|
||||
longFilename[0] = '\0';
|
||||
}
|
||||
if (longFilename != NULL) longFilename[0] = '\0';
|
||||
|
||||
while (1) {
|
||||
|
||||
n = read(dir, sizeof(dir_t));
|
||||
if (n != sizeof(dir_t)) return n == 0 ? 0 : -1;
|
||||
|
||||
// last entry if DIR_NAME_FREE
|
||||
if (dir->name[0] == DIR_NAME_FREE) return 0;
|
||||
|
||||
// skip empty entries and entry for . and ..
|
||||
if (dir->name[0] == DIR_NAME_DELETED || dir->name[0] == '.') continue;
|
||||
//Fill the long filename if we have a long filename entry,
|
||||
// long filename entries are stored before the actual filename.
|
||||
if (DIR_IS_LONG_NAME(dir) && longFilename != NULL)
|
||||
{
|
||||
vfat_t *VFAT = (vfat_t*)dir;
|
||||
//Sanity check the VFAT entry. The first cluster is always set to zero. And th esequence number should be higher then 0
|
||||
if (VFAT->firstClusterLow == 0 && (VFAT->sequenceNumber & 0x1F) > 0 && (VFAT->sequenceNumber & 0x1F) <= MAX_VFAT_ENTRIES)
|
||||
{
|
||||
//TODO: Store the filename checksum to verify if a none-long filename aware system modified the file table.
|
||||
n = ((VFAT->sequenceNumber & 0x1F) - 1) * FILENAME_LENGTH;
|
||||
longFilename[n+0] = VFAT->name1[0];
|
||||
longFilename[n+1] = VFAT->name1[1];
|
||||
longFilename[n+2] = VFAT->name1[2];
|
||||
longFilename[n+3] = VFAT->name1[3];
|
||||
longFilename[n+4] = VFAT->name1[4];
|
||||
longFilename[n+5] = VFAT->name2[0];
|
||||
longFilename[n+6] = VFAT->name2[1];
|
||||
longFilename[n+7] = VFAT->name2[2];
|
||||
longFilename[n+8] = VFAT->name2[3];
|
||||
longFilename[n+9] = VFAT->name2[4];
|
||||
longFilename[n+10] = VFAT->name2[5];
|
||||
longFilename[n+11] = VFAT->name3[0];
|
||||
longFilename[n+12] = VFAT->name3[1];
|
||||
//If this VFAT entry is the last one, add a NUL terminator at the end of the string
|
||||
if (VFAT->sequenceNumber & 0x40)
|
||||
longFilename[n+FILENAME_LENGTH] = '\0';
|
||||
}
|
||||
|
||||
// Fill the long filename if we have a long filename entry.
|
||||
// Long filename entries are stored before the short filename.
|
||||
if (longFilename != NULL && DIR_IS_LONG_NAME(dir)) {
|
||||
vfat_t *VFAT = (vfat_t*)dir;
|
||||
// Sanity-check the VFAT entry. The first cluster is always set to zero. And the sequence number should be higher than 0
|
||||
if (VFAT->firstClusterLow == 0 && (VFAT->sequenceNumber & 0x1F) > 0 && (VFAT->sequenceNumber & 0x1F) <= MAX_VFAT_ENTRIES) {
|
||||
// TODO: Store the filename checksum to verify if a none-long filename aware system modified the file table.
|
||||
n = ((VFAT->sequenceNumber & 0x1F) - 1) * FILENAME_LENGTH;
|
||||
for (uint8_t i=0; i<FILENAME_LENGTH; i++)
|
||||
longFilename[n+i] = (i < 5) ? VFAT->name1[i] : (i < 11) ? VFAT->name2[i-5] : VFAT->name3[i-11];
|
||||
// If this VFAT entry is the last one, add a NUL terminator at the end of the string
|
||||
if (VFAT->sequenceNumber & 0x40) longFilename[n+FILENAME_LENGTH] = '\0';
|
||||
}
|
||||
}
|
||||
// return if normal file or subdirectory
|
||||
// Return if normal file or subdirectory
|
||||
if (DIR_IS_FILE_OR_SUBDIR(dir)) return n;
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Read next directory entry into the cache
|
||||
// Assumes file is correctly positioned
|
||||
|
@ -14,6 +14,7 @@
|
||||
#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 (Power outputs: Extruder, Fan, Fan)
|
||||
#define BOARD_RAMPS_13_EEF 36 // RAMPS 1.3 / 1.4 (Power outputs: Extruder0, Extruder1, Fan)
|
||||
#define BOARD_RAMPS_13_SF 38 // RAMPS 1.3 / 1.4 (Power outputs: Spindle, Controller Fan)
|
||||
#define BOARD_FELIX2 37 // Felix 2.0+ Electronics Board (RAMPS like)
|
||||
#define BOARD_DUEMILANOVE_328P 4 // Duemilanove w/ ATMega328P pin assignments
|
||||
#define BOARD_GEN6 5 // Gen6
|
||||
@ -50,6 +51,7 @@
|
||||
#define BOARD_ELEFU_3 21 // Elefu Ra Board (v3)
|
||||
#define BOARD_5DPRINT 88 // 5DPrint D8 Driver Board
|
||||
#define BOARD_LEAPFROG 999 // Leapfrog
|
||||
#define BOARD_MKS_BASE 40 // MKS BASE 1.0
|
||||
#define BOARD_WITBOX 41 // bq WITBOX
|
||||
#define BOARD_HEPHESTOS 42 // bq Prusa i3 Hephestos
|
||||
#define BOARD_BAM_DICE 401 // 2PrintBeta BAM&DICE with STK drivers
|
||||
|
@ -20,6 +20,7 @@ CardReader::CardReader() {
|
||||
|
||||
autostart_stilltocheck = true; //the SD start is delayed, because otherwise the serial cannot answer fast enough to make contact with the host software.
|
||||
autostart_index = 0;
|
||||
|
||||
//power to SD reader
|
||||
#if SDPOWER > -1
|
||||
OUT_WRITE(SDPOWER, HIGH);
|
||||
@ -39,24 +40,43 @@ char *createFilename(char *buffer, const dir_t &p) { //buffer > 12characters
|
||||
return buffer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Dive into a folder and recurse depth-first to perform a pre-set operation lsAction:
|
||||
* LS_Count - Add +1 to nrFiles for every file within the parent
|
||||
* LS_GetFilename - Get the filename of the file indexed by nrFiles
|
||||
* LS_SerialPrint - Print the full path of each file to serial output
|
||||
*/
|
||||
void CardReader::lsDive(const char *prepend, SdFile parent, const char * const match/*=NULL*/) {
|
||||
dir_t p;
|
||||
uint8_t cnt = 0;
|
||||
|
||||
// Read the next entry from a directory
|
||||
while (parent.readDir(p, longFilename) > 0) {
|
||||
if (DIR_IS_SUBDIR(&p) && lsAction != LS_Count && lsAction != LS_GetFilename) { // hence LS_SerialPrint
|
||||
char path[FILENAME_LENGTH*2];
|
||||
|
||||
// If the entry is a directory and the action is LS_SerialPrint
|
||||
if (DIR_IS_SUBDIR(&p) && lsAction != LS_Count && lsAction != LS_GetFilename) {
|
||||
|
||||
// Allocate enough stack space for the full path to a folder
|
||||
int len = strlen(prepend) + FILENAME_LENGTH + 1;
|
||||
char path[len];
|
||||
|
||||
// Get the short name for the item, which we know is a folder
|
||||
char lfilename[FILENAME_LENGTH];
|
||||
createFilename(lfilename, p);
|
||||
|
||||
path[0] = 0;
|
||||
if (prepend[0] == 0) strcat(path, "/"); //avoid leading / if already in prepend
|
||||
// Append the FOLDERNAME12/ to the passed string.
|
||||
// It contains the full path to the "parent" argument.
|
||||
// We now have the full path to the item in this folder.
|
||||
path[0] = '\0';
|
||||
if (prepend[0] == '\0') strcat(path, "/"); // a root slash if prepend is empty
|
||||
strcat(path, prepend);
|
||||
strcat(path, lfilename);
|
||||
strcat(path, "/");
|
||||
|
||||
//Serial.print(path);
|
||||
// Serial.print(path);
|
||||
|
||||
// Get a new directory object using the full path
|
||||
// and dive recursively into it.
|
||||
SdFile dir;
|
||||
if (!dir.open(parent, lfilename, O_READ)) {
|
||||
if (lsAction == LS_SerialPrint) {
|
||||
@ -66,14 +86,13 @@ void CardReader::lsDive(const char *prepend, SdFile parent, const char * const m
|
||||
}
|
||||
}
|
||||
lsDive(path, dir);
|
||||
//close done automatically by destructor of SdFile
|
||||
// close() is done automatically by destructor of SdFile
|
||||
}
|
||||
else {
|
||||
char pn0 = p.name[0];
|
||||
if (pn0 == DIR_NAME_FREE) break;
|
||||
if (pn0 == DIR_NAME_DELETED || pn0 == '.') continue;
|
||||
char lf0 = longFilename[0];
|
||||
if (lf0 == '.') continue;
|
||||
if (longFilename[0] == '.') continue;
|
||||
|
||||
if (!DIR_IS_FILE_OR_SUBDIR(&p)) continue;
|
||||
|
||||
@ -81,24 +100,27 @@ void CardReader::lsDive(const char *prepend, SdFile parent, const char * const m
|
||||
|
||||
if (!filenameIsDir && (p.name[8] != 'G' || p.name[9] == '~')) continue;
|
||||
|
||||
//if (cnt++ != nr) continue;
|
||||
createFilename(filename, p);
|
||||
if (lsAction == LS_SerialPrint) {
|
||||
SERIAL_PROTOCOL(prepend);
|
||||
SERIAL_PROTOCOLLN(filename);
|
||||
}
|
||||
else if (lsAction == LS_Count) {
|
||||
nrFiles++;
|
||||
}
|
||||
else if (lsAction == LS_GetFilename) {
|
||||
if (match != NULL) {
|
||||
if (strcasecmp(match, filename) == 0) return;
|
||||
}
|
||||
else if (cnt == nrFiles) return;
|
||||
cnt++;
|
||||
switch (lsAction) {
|
||||
case LS_Count:
|
||||
nrFiles++;
|
||||
break;
|
||||
case LS_SerialPrint:
|
||||
createFilename(filename, p);
|
||||
SERIAL_PROTOCOL(prepend);
|
||||
SERIAL_PROTOCOLLN(filename);
|
||||
break;
|
||||
case LS_GetFilename:
|
||||
createFilename(filename, p);
|
||||
if (match != NULL) {
|
||||
if (strcasecmp(match, filename) == 0) return;
|
||||
}
|
||||
else if (cnt == nrFiles) return;
|
||||
cnt++;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
} // while readDir
|
||||
}
|
||||
|
||||
void CardReader::ls() {
|
||||
@ -237,7 +259,7 @@ void CardReader::openFile(char* name, bool read, bool replace_current/*=true*/)
|
||||
char *dirname_start, *dirname_end;
|
||||
if (name[0] == '/') {
|
||||
dirname_start = &name[1];
|
||||
while(dirname_start > 0) {
|
||||
while (dirname_start > 0) {
|
||||
dirname_end = strchr(dirname_start, '/');
|
||||
//SERIAL_ECHO("start:");SERIAL_ECHOLN((int)(dirname_start - name));
|
||||
//SERIAL_ECHO("end :");SERIAL_ECHOLN((int)(dirname_end - name));
|
||||
@ -287,14 +309,14 @@ void CardReader::openFile(char* name, bool read, bool replace_current/*=true*/)
|
||||
else {
|
||||
SERIAL_PROTOCOLPGM(MSG_SD_OPEN_FILE_FAIL);
|
||||
SERIAL_PROTOCOL(fname);
|
||||
SERIAL_PROTOCOLCHAR('.');
|
||||
SERIAL_PROTOCOLPGM(".\n");
|
||||
}
|
||||
}
|
||||
else { //write
|
||||
if (!file.open(curDir, fname, O_CREAT | O_APPEND | O_WRITE | O_TRUNC)) {
|
||||
SERIAL_PROTOCOLPGM(MSG_SD_OPEN_FILE_FAIL);
|
||||
SERIAL_PROTOCOL(fname);
|
||||
SERIAL_PROTOCOLCHAR('.');
|
||||
SERIAL_PROTOCOLPGM(".\n");
|
||||
}
|
||||
else {
|
||||
saving = true;
|
||||
|
@ -676,9 +676,9 @@ void Config_PrintSettings(bool forReplay) {
|
||||
SERIAL_ECHOLNPGM("Mesh bed leveling:");
|
||||
CONFIG_ECHO_START;
|
||||
}
|
||||
SERIAL_ECHOPAIR(" M420 S", (int32_t)mbl.active);
|
||||
SERIAL_ECHOPAIR(" X", MESH_NUM_X_POINTS);
|
||||
SERIAL_ECHOPAIR(" Y", MESH_NUM_Y_POINTS);
|
||||
SERIAL_ECHOPAIR(" M420 S", (unsigned long)mbl.active);
|
||||
SERIAL_ECHOPAIR(" X", (unsigned long)MESH_NUM_X_POINTS);
|
||||
SERIAL_ECHOPAIR(" Y", (unsigned long)MESH_NUM_Y_POINTS);
|
||||
SERIAL_EOL;
|
||||
for (int y=0; y<MESH_NUM_Y_POINTS; y++) {
|
||||
for (int x=0; x<MESH_NUM_X_POINTS; x++) {
|
||||
|
@ -270,44 +270,24 @@ Here are some standard links for getting your machine calibrated:
|
||||
#define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
|
||||
|
||||
//===========================================================================
|
||||
//============================= Thermal Runaway Protection ==================
|
||||
//======================== Thermal Runaway Protection =======================
|
||||
//===========================================================================
|
||||
/*
|
||||
This is a feature to protect your printer from burn up in flames if it has
|
||||
a thermistor coming off place (this happened to a friend of mine recently and
|
||||
motivated me writing this feature).
|
||||
|
||||
The issue: If a thermistor come off, it will read a lower temperature than actual.
|
||||
The system will turn the heater on forever, burning up the filament and anything
|
||||
else around.
|
||||
|
||||
After the temperature reaches the target for the first time, this feature will
|
||||
start measuring for how long the current temperature stays below the target
|
||||
minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS).
|
||||
|
||||
If it stays longer than _PERIOD, it means the thermistor temperature
|
||||
cannot catch up with the target, so something *may be* wrong. Then, to be on the
|
||||
safe side, the system will he halt.
|
||||
|
||||
Bear in mind the count down will just start AFTER the first time the
|
||||
thermistor temperature is over the target, so you will have no problem if
|
||||
your extruder heater takes 2 minutes to hit the target on heating.
|
||||
|
||||
*/
|
||||
// If you want to enable this feature for all your extruder heaters,
|
||||
// uncomment the 2 defines below:
|
||||
|
||||
// Parameters for all extruder heaters
|
||||
//#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds
|
||||
//#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius
|
||||
|
||||
// If you want to enable this feature for your bed heater,
|
||||
// uncomment the 2 defines below:
|
||||
|
||||
// Parameters for the bed heater
|
||||
//#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds
|
||||
//#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius
|
||||
/**
|
||||
* Thermal Runaway Protection protects your printer from damage and fire if a
|
||||
* thermistor falls out or temperature sensors fail in any way.
|
||||
*
|
||||
* The issue: If a thermistor falls out or a temperature sensor fails,
|
||||
* Marlin can no longer sense the actual temperature. Since a disconnected
|
||||
* thermistor reads as a low temperature, the firmware will keep the heater on.
|
||||
*
|
||||
* The solution: Once the temperature reaches the target, start observing.
|
||||
* If the temperature stays too far below the target (hysteresis) for too long,
|
||||
* the firmware will halt as a safety precaution.
|
||||
*/
|
||||
|
||||
#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
|
||||
#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed
|
||||
|
||||
//===========================================================================
|
||||
//============================= Mechanical Settings =========================
|
||||
@ -377,7 +357,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
|
||||
|
||||
// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
|
||||
#define INVERT_X_DIR false
|
||||
#define INVERT_Y_DIR false
|
||||
#define INVERT_Y_DIR true
|
||||
#define INVERT_Z_DIR false
|
||||
|
||||
// @section extruder
|
||||
@ -411,17 +391,20 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
|
||||
#define Z_MAX_POS 200
|
||||
|
||||
//===========================================================================
|
||||
//============================= Filament Runout Sensor ======================
|
||||
//========================= Filament Runout Sensor ==========================
|
||||
//===========================================================================
|
||||
//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament
|
||||
// In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
|
||||
// It is assumed that when logic high = filament available
|
||||
// when logic low = filament ran out
|
||||
//const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned
|
||||
//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
|
||||
#ifdef FILAMENT_RUNOUT_SENSOR
|
||||
const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned
|
||||
#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
|
||||
#define FILAMENT_RUNOUT_SCRIPT "M600"
|
||||
#endif
|
||||
|
||||
//===========================================================================
|
||||
//============================ Manual Bed Leveling ==========================
|
||||
//=========================== Manual Bed Leveling ===========================
|
||||
//===========================================================================
|
||||
|
||||
// #define MANUAL_BED_LEVELING // Add display menu option for bed leveling
|
||||
@ -442,7 +425,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
|
||||
#endif // MESH_BED_LEVELING
|
||||
|
||||
//===========================================================================
|
||||
//============================= Bed Auto Leveling ===========================
|
||||
//============================ Bed Auto Leveling ============================
|
||||
//===========================================================================
|
||||
|
||||
// @section bedlevel
|
||||
|
@ -14,14 +14,38 @@
|
||||
#endif
|
||||
#define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control
|
||||
|
||||
//// Heating sanity check:
|
||||
// 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.
|
||||
// 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
|
||||
//#define WATCH_TEMP_PERIOD 40000 //40 seconds
|
||||
//#define WATCH_TEMP_INCREASE 10 //Heat up at least 10 degree in 20 seconds
|
||||
/**
|
||||
* Thermal Protection parameters
|
||||
*/
|
||||
#ifdef THERMAL_PROTECTION_HOTENDS
|
||||
#define THERMAL_PROTECTION_PERIOD 40 // Seconds
|
||||
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
|
||||
|
||||
/**
|
||||
* Whenever an M104 or M109 increases the target temperature the firmware will wait for the
|
||||
* WATCH_TEMP_PERIOD to transpire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
|
||||
* degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
|
||||
* but only if the current temperature is far enough below the target for a reliable test.
|
||||
*/
|
||||
#define WATCH_TEMP_PERIOD 16 // Seconds
|
||||
#define WATCH_TEMP_INCREASE 4 // Degrees Celsius
|
||||
#endif
|
||||
|
||||
#ifdef THERMAL_PROTECTION_BED
|
||||
#define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds
|
||||
#define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Automatic Temperature:
|
||||
* The hotend target temperature is calculated by all the buffered lines of gcode.
|
||||
* The maximum buffered steps/sec of the extruder motor is called "se".
|
||||
* Start autotemp mode with M109 S<mintemp> B<maxtemp> F<factor>
|
||||
* The target temperature is set to mintemp+factor*se[steps/sec] and is limited by
|
||||
* mintemp and maxtemp. Turn this off by excuting M109 without F*
|
||||
* Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp.
|
||||
* On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
|
||||
*/
|
||||
#ifdef PIDTEMP
|
||||
// this adds an experimental additional term to the heating power, proportional to the extrusion speed.
|
||||
// if Kc is chosen well, the additional required power due to increased melting should be compensated.
|
||||
@ -376,6 +400,15 @@ const unsigned int dropsegments=5; //everything with less than this number of st
|
||||
#define MAX_CMD_SIZE 96
|
||||
#define BUFSIZE 4
|
||||
|
||||
// Bad Serial-connections can miss a received command by sending an 'ok'
|
||||
// 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
|
||||
|
||||
// @section fwretract
|
||||
|
||||
// Firmware based and LCD controlled retract
|
||||
|
@ -30,6 +30,7 @@
|
||||
// eu Basque-Euskera
|
||||
// kana Japanese
|
||||
// kana_utf Japanese
|
||||
// cn Chinese
|
||||
|
||||
#ifndef LANGUAGE_INCLUDE
|
||||
// pick your language from the list above
|
||||
@ -122,21 +123,22 @@
|
||||
#define MSG_PLANNER_BUFFER_BYTES " PlannerBufferBytes: "
|
||||
#define MSG_OK "ok"
|
||||
#define MSG_FILE_SAVED "Done saving file."
|
||||
#define MSG_ERR_LINE_NO1 "Line Number out of sequence. Expected: "
|
||||
#define MSG_ERR_LINE_NO2 " Got: "
|
||||
#define MSG_ERR_LINE_NO "Line Number is not Last Line Number+1, Last Line: "
|
||||
#define MSG_ERR_CHECKSUM_MISMATCH "checksum mismatch, Last Line: "
|
||||
#define MSG_ERR_NO_CHECKSUM "No Checksum with line number, Last Line: "
|
||||
#define MSG_ERR_NO_LINENUMBER_WITH_CHECKSUM "No Line Number with checksum, Last Line: "
|
||||
#define MSG_FILE_PRINTED "Done printing file"
|
||||
#define MSG_BEGIN_FILE_LIST "Begin file list"
|
||||
#define MSG_END_FILE_LIST "End file list"
|
||||
#define MSG_M104_INVALID_EXTRUDER "M104 Invalid extruder "
|
||||
#define MSG_M105_INVALID_EXTRUDER "M105 Invalid extruder "
|
||||
#define MSG_M200_INVALID_EXTRUDER "M200 Invalid extruder "
|
||||
#define MSG_M218_INVALID_EXTRUDER "M218 Invalid extruder "
|
||||
#define MSG_M221_INVALID_EXTRUDER "M221 Invalid extruder "
|
||||
#define MSG_INVALID_EXTRUDER "Invalid extruder"
|
||||
#define MSG_INVALID_SOLENOID "Invalid solenoid"
|
||||
#define MSG_M104_INVALID_EXTRUDER "M104 " MSG_INVALID_EXTRUDER " "
|
||||
#define MSG_M105_INVALID_EXTRUDER "M105 " MSG_INVALID_EXTRUDER " "
|
||||
#define MSG_M109_INVALID_EXTRUDER "M109 " MSG_INVALID_EXTRUDER " "
|
||||
#define MSG_M200_INVALID_EXTRUDER "M200 " MSG_INVALID_EXTRUDER " "
|
||||
#define MSG_M218_INVALID_EXTRUDER "M218 " MSG_INVALID_EXTRUDER " "
|
||||
#define MSG_M221_INVALID_EXTRUDER "M221 " MSG_INVALID_EXTRUDER " "
|
||||
#define MSG_ERR_NO_THERMISTORS "No thermistors - no temperature"
|
||||
#define MSG_M109_INVALID_EXTRUDER "M109 Invalid extruder "
|
||||
#define MSG_HEATING "Heating..."
|
||||
#define MSG_HEATING_COMPLETE "Heating done."
|
||||
#define MSG_BED_HEATING "Bed Heating."
|
||||
@ -148,8 +150,6 @@
|
||||
#define MSG_RESEND "Resend: "
|
||||
#define MSG_UNKNOWN_COMMAND "Unknown command: \""
|
||||
#define MSG_ACTIVE_EXTRUDER "Active Extruder: "
|
||||
#define MSG_INVALID_EXTRUDER "Invalid extruder"
|
||||
#define MSG_INVALID_SOLENOID "Invalid solenoid"
|
||||
#define MSG_X_MIN "x_min: "
|
||||
#define MSG_X_MAX "x_max: "
|
||||
#define MSG_Y_MIN "y_min: "
|
||||
@ -161,6 +161,7 @@
|
||||
#define MSG_ERR_MATERIAL_INDEX "M145 S<index> out of range (0-1)"
|
||||
#define MSG_ERR_M421_REQUIRES_XYZ "M421 requires XYZ parameters"
|
||||
#define MSG_ERR_MESH_INDEX_OOB "Mesh XY index is out of bounds"
|
||||
#define MSG_ERR_M428_TOO_FAR "Too far from reference point"
|
||||
#define MSG_M119_REPORT "Reporting endstop status"
|
||||
#define MSG_ENDSTOP_HIT "TRIGGERED"
|
||||
#define MSG_ENDSTOP_OPEN "open"
|
||||
|
@ -273,7 +273,6 @@ static void lcd_implementation_status_screen() {
|
||||
u8g.drawFrame(42, 49 - TALL_FONT_CORRECTION, 10, 4);
|
||||
u8g.drawPixel(50, 43 - TALL_FONT_CORRECTION);
|
||||
|
||||
|
||||
// Progress bar frame
|
||||
u8g.drawFrame(54, 49, 73, 4 - TALL_FONT_CORRECTION);
|
||||
|
||||
@ -333,19 +332,28 @@ static void lcd_implementation_status_screen() {
|
||||
u8g.drawPixel(8,XYZ_BASELINE - 5);
|
||||
u8g.drawPixel(8,XYZ_BASELINE - 3);
|
||||
u8g.setPrintPos(10,XYZ_BASELINE);
|
||||
lcd_print(ftostr31ns(current_position[X_AXIS]));
|
||||
if (axis_known_position[X_AXIS])
|
||||
lcd_print(ftostr31ns(current_position[X_AXIS]));
|
||||
else
|
||||
lcd_printPGM(PSTR("---"));
|
||||
u8g.setPrintPos(43,XYZ_BASELINE);
|
||||
lcd_print('Y');
|
||||
u8g.drawPixel(49,XYZ_BASELINE - 5);
|
||||
u8g.drawPixel(49,XYZ_BASELINE - 3);
|
||||
u8g.setPrintPos(51,XYZ_BASELINE);
|
||||
lcd_print(ftostr31ns(current_position[Y_AXIS]));
|
||||
if (axis_known_position[Y_AXIS])
|
||||
lcd_print(ftostr31ns(current_position[Y_AXIS]));
|
||||
else
|
||||
lcd_printPGM(PSTR("---"));
|
||||
u8g.setPrintPos(83,XYZ_BASELINE);
|
||||
lcd_print('Z');
|
||||
u8g.drawPixel(89,XYZ_BASELINE - 5);
|
||||
u8g.drawPixel(89,XYZ_BASELINE - 3);
|
||||
u8g.setPrintPos(91,XYZ_BASELINE);
|
||||
lcd_print(ftostr31(current_position[Z_AXIS]));
|
||||
if (axis_known_position[Z_AXIS])
|
||||
lcd_print(ftostr32sp(current_position[Z_AXIS]));
|
||||
else
|
||||
lcd_printPGM(PSTR("---.--"));
|
||||
u8g.setColorIndex(1); // black on white
|
||||
|
||||
// Feedrate
|
||||
|
@ -236,44 +236,24 @@ Here are some standard links for getting your machine calibrated:
|
||||
#define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
|
||||
|
||||
//===========================================================================
|
||||
//============================= Thermal Runaway Protection ==================
|
||||
//======================== Thermal Runaway Protection =======================
|
||||
//===========================================================================
|
||||
/*
|
||||
This is a feature to protect your printer from burn up in flames if it has
|
||||
a thermistor coming off place (this happened to a friend of mine recently and
|
||||
motivated me writing this feature).
|
||||
|
||||
The issue: If a thermistor come off, it will read a lower temperature than actual.
|
||||
The system will turn the heater on forever, burning up the filament and anything
|
||||
else around.
|
||||
|
||||
After the temperature reaches the target for the first time, this feature will
|
||||
start measuring for how long the current temperature stays below the target
|
||||
minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS).
|
||||
|
||||
If it stays longer than _PERIOD, it means the thermistor temperature
|
||||
cannot catch up with the target, so something *may be* wrong. Then, to be on the
|
||||
safe side, the system will he halt.
|
||||
|
||||
Bear in mind the count down will just start AFTER the first time the
|
||||
thermistor temperature is over the target, so you will have no problem if
|
||||
your extruder heater takes 2 minutes to hit the target on heating.
|
||||
|
||||
*/
|
||||
// If you want to enable this feature for all your extruder heaters,
|
||||
// uncomment the 2 defines below:
|
||||
|
||||
// Parameters for all extruder heaters
|
||||
//#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds
|
||||
//#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius
|
||||
|
||||
// If you want to enable this feature for your bed heater,
|
||||
// uncomment the 2 defines below:
|
||||
|
||||
// Parameters for the bed heater
|
||||
//#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds
|
||||
//#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius
|
||||
/**
|
||||
* Thermal Runaway Protection protects your printer from damage and fire if a
|
||||
* thermistor falls out or temperature sensors fail in any way.
|
||||
*
|
||||
* The issue: If a thermistor falls out or a temperature sensor fails,
|
||||
* Marlin can no longer sense the actual temperature. Since a disconnected
|
||||
* thermistor reads as a low temperature, the firmware will keep the heater on.
|
||||
*
|
||||
* The solution: Once the temperature reaches the target, start observing.
|
||||
* If the temperature stays too far below the target (hysteresis) for too long,
|
||||
* the firmware will halt as a safety precaution.
|
||||
*/
|
||||
|
||||
#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
|
||||
#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed
|
||||
|
||||
//===========================================================================
|
||||
//============================= Mechanical Settings =========================
|
||||
@ -350,17 +330,20 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
|
||||
#define Z_MAX_POS 235
|
||||
|
||||
//===========================================================================
|
||||
//============================= Filament Runout Sensor ======================
|
||||
//========================= Filament Runout Sensor ==========================
|
||||
//===========================================================================
|
||||
//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament
|
||||
// In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
|
||||
// It is assumed that when logic high = filament available
|
||||
// when logic low = filament ran out
|
||||
//const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned
|
||||
//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
|
||||
|
||||
#ifdef FILAMENT_RUNOUT_SENSOR
|
||||
const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned
|
||||
#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
|
||||
#define FILAMENT_RUNOUT_SCRIPT "M600"
|
||||
#endif
|
||||
|
||||
//===========================================================================
|
||||
//============================ Manual Bed Leveling ==========================
|
||||
//=========================== Manual Bed Leveling ===========================
|
||||
//===========================================================================
|
||||
|
||||
// #define MANUAL_BED_LEVELING // Add display menu option for bed leveling
|
||||
@ -381,7 +364,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
|
||||
#endif // MESH_BED_LEVELING
|
||||
|
||||
//===========================================================================
|
||||
//============================= Bed Auto Leveling ===========================
|
||||
//============================ Bed Auto Leveling ============================
|
||||
//===========================================================================
|
||||
|
||||
//#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line)
|
||||
|
@ -236,44 +236,24 @@ Here are some standard links for getting your machine calibrated:
|
||||
#define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
|
||||
|
||||
//===========================================================================
|
||||
//============================= Thermal Runaway Protection ==================
|
||||
//======================== Thermal Runaway Protection =======================
|
||||
//===========================================================================
|
||||
/*
|
||||
This is a feature to protect your printer from burn up in flames if it has
|
||||
a thermistor coming off place (this happened to a friend of mine recently and
|
||||
motivated me writing this feature).
|
||||
|
||||
The issue: If a thermistor come off, it will read a lower temperature than actual.
|
||||
The system will turn the heater on forever, burning up the filament and anything
|
||||
else around.
|
||||
|
||||
After the temperature reaches the target for the first time, this feature will
|
||||
start measuring for how long the current temperature stays below the target
|
||||
minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS).
|
||||
|
||||
If it stays longer than _PERIOD, it means the thermistor temperature
|
||||
cannot catch up with the target, so something *may be* wrong. Then, to be on the
|
||||
safe side, the system will he halt.
|
||||
|
||||
Bear in mind the count down will just start AFTER the first time the
|
||||
thermistor temperature is over the target, so you will have no problem if
|
||||
your extruder heater takes 2 minutes to hit the target on heating.
|
||||
|
||||
*/
|
||||
// If you want to enable this feature for all your extruder heaters,
|
||||
// uncomment the 2 defines below:
|
||||
|
||||
// Parameters for all extruder heaters
|
||||
//#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds
|
||||
//#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius
|
||||
|
||||
// If you want to enable this feature for your bed heater,
|
||||
// uncomment the 2 defines below:
|
||||
|
||||
// Parameters for the bed heater
|
||||
//#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds
|
||||
//#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius
|
||||
/**
|
||||
* Thermal Runaway Protection protects your printer from damage and fire if a
|
||||
* thermistor falls out or temperature sensors fail in any way.
|
||||
*
|
||||
* The issue: If a thermistor falls out or a temperature sensor fails,
|
||||
* Marlin can no longer sense the actual temperature. Since a disconnected
|
||||
* thermistor reads as a low temperature, the firmware will keep the heater on.
|
||||
*
|
||||
* The solution: Once the temperature reaches the target, start observing.
|
||||
* If the temperature stays too far below the target (hysteresis) for too long,
|
||||
* the firmware will halt as a safety precaution.
|
||||
*/
|
||||
|
||||
#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
|
||||
#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed
|
||||
|
||||
//===========================================================================
|
||||
//============================= Mechanical Settings =========================
|
||||
@ -350,17 +330,20 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
|
||||
#define Z_MAX_POS 235
|
||||
|
||||
//===========================================================================
|
||||
//============================= Filament Runout Sensor ======================
|
||||
//========================= Filament Runout Sensor ==========================
|
||||
//===========================================================================
|
||||
//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament
|
||||
// In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
|
||||
// It is assumed that when logic high = filament available
|
||||
// when logic low = filament ran out
|
||||
//const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned
|
||||
//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
|
||||
|
||||
#ifdef FILAMENT_RUNOUT_SENSOR
|
||||
const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned
|
||||
#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
|
||||
#define FILAMENT_RUNOUT_SCRIPT "M600"
|
||||
#endif
|
||||
|
||||
//===========================================================================
|
||||
//============================ Manual Bed Leveling ==========================
|
||||
//=========================== Manual Bed Leveling ===========================
|
||||
//===========================================================================
|
||||
|
||||
// #define MANUAL_BED_LEVELING // Add display menu option for bed leveling
|
||||
@ -377,7 +360,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
|
||||
#endif // MESH_BED_LEVELING
|
||||
|
||||
//===========================================================================
|
||||
//============================= Bed Auto Leveling ===========================
|
||||
//============================ Bed Auto Leveling ============================
|
||||
//===========================================================================
|
||||
|
||||
//#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line)
|
||||
|
@ -14,14 +14,38 @@
|
||||
#endif
|
||||
#define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control
|
||||
|
||||
//// Heating sanity check:
|
||||
// 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.
|
||||
// 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
|
||||
//#define WATCH_TEMP_PERIOD 40000 //40 seconds
|
||||
//#define WATCH_TEMP_INCREASE 10 //Heat up at least 10 degree in 20 seconds
|
||||
/**
|
||||
* Thermal Protection parameters
|
||||
*/
|
||||
#ifdef THERMAL_PROTECTION_HOTENDS
|
||||
#define THERMAL_PROTECTION_PERIOD 40 // Seconds
|
||||
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
|
||||
|
||||
/**
|
||||
* Whenever an M104 or M109 increases the target temperature the firmware will wait for the
|
||||
* WATCH_TEMP_PERIOD to transpire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
|
||||
* degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
|
||||
* but only if the current temperature is far enough below the target for a reliable test.
|
||||
*/
|
||||
#define WATCH_TEMP_PERIOD 16 // Seconds
|
||||
#define WATCH_TEMP_INCREASE 4 // Degrees Celsius
|
||||
#endif
|
||||
|
||||
#ifdef THERMAL_PROTECTION_BED
|
||||
#define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds
|
||||
#define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Automatic Temperature:
|
||||
* The hotend target temperature is calculated by all the buffered lines of gcode.
|
||||
* The maximum buffered steps/sec of the extruder motor is called "se".
|
||||
* Start autotemp mode with M109 S<mintemp> B<maxtemp> F<factor>
|
||||
* The target temperature is set to mintemp+factor*se[steps/sec] and is limited by
|
||||
* mintemp and maxtemp. Turn this off by excuting M109 without F*
|
||||
* Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp.
|
||||
* On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
|
||||
*/
|
||||
#ifdef PIDTEMP
|
||||
// this adds an experimental additional term to the heating power, proportional to the extrusion speed.
|
||||
// if Kc is chosen well, the additional required power due to increased melting should be compensated.
|
||||
@ -376,6 +400,15 @@ const unsigned int dropsegments=5; //everything with less than this number of st
|
||||
#define MAX_CMD_SIZE 96
|
||||
#define BUFSIZE 4
|
||||
|
||||
// Bad Serial-connections can miss a received command by sending an 'ok'
|
||||
// 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
|
||||
|
||||
// @section fwretract
|
||||
|
||||
// Firmware based and LCD controlled retract
|
||||
|
@ -257,44 +257,24 @@ Here are some standard links for getting your machine calibrated:
|
||||
#define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
|
||||
|
||||
//===========================================================================
|
||||
//============================= Thermal Runaway Protection ==================
|
||||
//======================== Thermal Runaway Protection =======================
|
||||
//===========================================================================
|
||||
/*
|
||||
This is a feature to protect your printer from burn up in flames if it has
|
||||
a thermistor coming off place (this happened to a friend of mine recently and
|
||||
motivated me writing this feature).
|
||||
|
||||
The issue: If a thermistor come off, it will read a lower temperature than actual.
|
||||
The system will turn the heater on forever, burning up the filament and anything
|
||||
else around.
|
||||
|
||||
After the temperature reaches the target for the first time, this feature will
|
||||
start measuring for how long the current temperature stays below the target
|
||||
minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS).
|
||||
|
||||
If it stays longer than _PERIOD, it means the thermistor temperature
|
||||
cannot catch up with the target, so something *may be* wrong. Then, to be on the
|
||||
safe side, the system will he halt.
|
||||
|
||||
Bear in mind the count down will just start AFTER the first time the
|
||||
thermistor temperature is over the target, so you will have no problem if
|
||||
your extruder heater takes 2 minutes to hit the target on heating.
|
||||
|
||||
*/
|
||||
// If you want to enable this feature for all your extruder heaters,
|
||||
// uncomment the 2 defines below:
|
||||
|
||||
// Parameters for all extruder heaters
|
||||
//#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds
|
||||
//#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius
|
||||
|
||||
// If you want to enable this feature for your bed heater,
|
||||
// uncomment the 2 defines below:
|
||||
|
||||
// Parameters for the bed heater
|
||||
//#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds
|
||||
//#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius
|
||||
/**
|
||||
* Thermal Runaway Protection protects your printer from damage and fire if a
|
||||
* thermistor falls out or temperature sensors fail in any way.
|
||||
*
|
||||
* The issue: If a thermistor falls out or a temperature sensor fails,
|
||||
* Marlin can no longer sense the actual temperature. Since a disconnected
|
||||
* thermistor reads as a low temperature, the firmware will keep the heater on.
|
||||
*
|
||||
* The solution: Once the temperature reaches the target, start observing.
|
||||
* If the temperature stays too far below the target (hysteresis) for too long,
|
||||
* the firmware will halt as a safety precaution.
|
||||
*/
|
||||
|
||||
#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
|
||||
#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed
|
||||
|
||||
//===========================================================================
|
||||
//============================= Mechanical Settings =========================
|
||||
@ -371,17 +351,20 @@ const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic
|
||||
#define Z_MAX_POS 180
|
||||
|
||||
//===========================================================================
|
||||
//============================= Filament Runout Sensor ======================
|
||||
//========================= Filament Runout Sensor ==========================
|
||||
//===========================================================================
|
||||
//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament
|
||||
// In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
|
||||
// It is assumed that when logic high = filament available
|
||||
// when logic low = filament ran out
|
||||
//const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned
|
||||
//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
|
||||
|
||||
#ifdef FILAMENT_RUNOUT_SENSOR
|
||||
const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned
|
||||
#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
|
||||
#define FILAMENT_RUNOUT_SCRIPT "M600"
|
||||
#endif
|
||||
|
||||
//===========================================================================
|
||||
//============================ Manual Bed Leveling ==========================
|
||||
//=========================== Manual Bed Leveling ===========================
|
||||
//===========================================================================
|
||||
|
||||
// #define MANUAL_BED_LEVELING // Add display menu option for bed leveling
|
||||
@ -402,7 +385,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic
|
||||
#endif // MESH_BED_LEVELING
|
||||
|
||||
//===========================================================================
|
||||
//============================= Bed Auto Leveling ===========================
|
||||
//============================ Bed Auto Leveling ============================
|
||||
//===========================================================================
|
||||
|
||||
//#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line)
|
||||
|
@ -14,14 +14,38 @@
|
||||
#endif
|
||||
#define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control
|
||||
|
||||
//// Heating sanity check:
|
||||
// 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.
|
||||
// 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
|
||||
//#define WATCH_TEMP_PERIOD 40000 //40 seconds
|
||||
//#define WATCH_TEMP_INCREASE 10 //Heat up at least 10 degree in 20 seconds
|
||||
/**
|
||||
* Thermal Protection parameters
|
||||
*/
|
||||
#ifdef THERMAL_PROTECTION_HOTENDS
|
||||
#define THERMAL_PROTECTION_PERIOD 40 // Seconds
|
||||
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
|
||||
|
||||
/**
|
||||
* Whenever an M104 or M109 increases the target temperature the firmware will wait for the
|
||||
* WATCH_TEMP_PERIOD to transpire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
|
||||
* degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
|
||||
* but only if the current temperature is far enough below the target for a reliable test.
|
||||
*/
|
||||
#define WATCH_TEMP_PERIOD 16 // Seconds
|
||||
#define WATCH_TEMP_INCREASE 4 // Degrees Celsius
|
||||
#endif
|
||||
|
||||
#ifdef THERMAL_PROTECTION_BED
|
||||
#define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds
|
||||
#define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Automatic Temperature:
|
||||
* The hotend target temperature is calculated by all the buffered lines of gcode.
|
||||
* The maximum buffered steps/sec of the extruder motor is called "se".
|
||||
* Start autotemp mode with M109 S<mintemp> B<maxtemp> F<factor>
|
||||
* The target temperature is set to mintemp+factor*se[steps/sec] and is limited by
|
||||
* mintemp and maxtemp. Turn this off by excuting M109 without F*
|
||||
* Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp.
|
||||
* On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
|
||||
*/
|
||||
#ifdef PIDTEMP
|
||||
// this adds an experimental additional term to the heating power, proportional to the extrusion speed.
|
||||
// if Kc is chosen well, the additional required power due to increased melting should be compensated.
|
||||
@ -374,7 +398,16 @@ const unsigned int dropsegments=5; //everything with less than this number of st
|
||||
|
||||
//The ASCII buffer for receiving from the serial:
|
||||
#define MAX_CMD_SIZE 96
|
||||
#define BUFSIZE 5
|
||||
#define BUFSIZE 4
|
||||
|
||||
// Bad Serial-connections can miss a received command by sending an 'ok'
|
||||
// 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
|
||||
|
||||
// @section fwretract
|
||||
|
||||
|
@ -286,44 +286,24 @@ Here are some standard links for getting your machine calibrated:
|
||||
#define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
|
||||
|
||||
//===========================================================================
|
||||
//============================= Thermal Runaway Protection ==================
|
||||
//======================== Thermal Runaway Protection =======================
|
||||
//===========================================================================
|
||||
/*
|
||||
This is a feature to protect your printer from burn up in flames if it has
|
||||
a thermistor coming off place (this happened to a friend of mine recently and
|
||||
motivated me writing this feature).
|
||||
|
||||
The issue: If a thermistor come off, it will read a lower temperature than actual.
|
||||
The system will turn the heater on forever, burning up the filament and anything
|
||||
else around.
|
||||
|
||||
After the temperature reaches the target for the first time, this feature will
|
||||
start measuring for how long the current temperature stays below the target
|
||||
minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS).
|
||||
|
||||
If it stays longer than _PERIOD, it means the thermistor temperature
|
||||
cannot catch up with the target, so something *may be* wrong. Then, to be on the
|
||||
safe side, the system will he halt.
|
||||
|
||||
Bear in mind the count down will just start AFTER the first time the
|
||||
thermistor temperature is over the target, so you will have no problem if
|
||||
your extruder heater takes 2 minutes to hit the target on heating.
|
||||
|
||||
*/
|
||||
// If you want to enable this feature for all your extruder heaters,
|
||||
// uncomment the 2 defines below:
|
||||
|
||||
// Parameters for all extruder heaters
|
||||
//#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds
|
||||
//#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius
|
||||
|
||||
// If you want to enable this feature for your bed heater,
|
||||
// uncomment the 2 defines below:
|
||||
|
||||
// Parameters for the bed heater
|
||||
//#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds
|
||||
//#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius
|
||||
/**
|
||||
* Thermal Runaway Protection protects your printer from damage and fire if a
|
||||
* thermistor falls out or temperature sensors fail in any way.
|
||||
*
|
||||
* The issue: If a thermistor falls out or a temperature sensor fails,
|
||||
* Marlin can no longer sense the actual temperature. Since a disconnected
|
||||
* thermistor reads as a low temperature, the firmware will keep the heater on.
|
||||
*
|
||||
* The solution: Once the temperature reaches the target, start observing.
|
||||
* If the temperature stays too far below the target (hysteresis) for too long,
|
||||
* the firmware will halt as a safety precaution.
|
||||
*/
|
||||
|
||||
#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
|
||||
#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed
|
||||
|
||||
//===========================================================================
|
||||
//============================= Mechanical Settings =========================
|
||||
@ -427,17 +407,20 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
|
||||
#define Z_MAX_POS 200
|
||||
|
||||
//===========================================================================
|
||||
//============================= Filament Runout Sensor ======================
|
||||
//========================= Filament Runout Sensor ==========================
|
||||
//===========================================================================
|
||||
//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament
|
||||
// In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
|
||||
// It is assumed that when logic high = filament available
|
||||
// when logic low = filament ran out
|
||||
//const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned
|
||||
//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
|
||||
#ifdef FILAMENT_RUNOUT_SENSOR
|
||||
const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned
|
||||
#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
|
||||
#define FILAMENT_RUNOUT_SCRIPT "M600"
|
||||
#endif
|
||||
|
||||
//===========================================================================
|
||||
//============================ Mesh Bed Leveling ============================
|
||||
//=========================== Manual Bed Leveling ===========================
|
||||
//===========================================================================
|
||||
|
||||
// #define MANUAL_BED_LEVELING // Add display menu option for bed leveling
|
||||
@ -458,7 +441,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
|
||||
#endif // MESH_BED_LEVELING
|
||||
|
||||
//===========================================================================
|
||||
//============================= Bed Auto Leveling ===========================
|
||||
//============================ Bed Auto Leveling ============================
|
||||
//===========================================================================
|
||||
|
||||
// @section bedlevel
|
||||
|
@ -14,14 +14,38 @@
|
||||
#endif
|
||||
#define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control
|
||||
|
||||
//// Heating sanity check:
|
||||
// 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.
|
||||
// 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
|
||||
//#define WATCH_TEMP_PERIOD 40000 //40 seconds
|
||||
//#define WATCH_TEMP_INCREASE 10 //Heat up at least 10 degree in 20 seconds
|
||||
/**
|
||||
* Thermal Protection parameters
|
||||
*/
|
||||
#ifdef THERMAL_PROTECTION_HOTENDS
|
||||
#define THERMAL_PROTECTION_PERIOD 40 // Seconds
|
||||
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
|
||||
|
||||
/**
|
||||
* Whenever an M104 or M109 increases the target temperature the firmware will wait for the
|
||||
* WATCH_TEMP_PERIOD to transpire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
|
||||
* degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
|
||||
* but only if the current temperature is far enough below the target for a reliable test.
|
||||
*/
|
||||
#define WATCH_TEMP_PERIOD 16 // Seconds
|
||||
#define WATCH_TEMP_INCREASE 4 // Degrees Celsius
|
||||
#endif
|
||||
|
||||
#ifdef THERMAL_PROTECTION_BED
|
||||
#define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds
|
||||
#define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Automatic Temperature:
|
||||
* The hotend target temperature is calculated by all the buffered lines of gcode.
|
||||
* The maximum buffered steps/sec of the extruder motor is called "se".
|
||||
* Start autotemp mode with M109 S<mintemp> B<maxtemp> F<factor>
|
||||
* The target temperature is set to mintemp+factor*se[steps/sec] and is limited by
|
||||
* mintemp and maxtemp. Turn this off by excuting M109 without F*
|
||||
* Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp.
|
||||
* On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
|
||||
*/
|
||||
#ifdef PIDTEMP
|
||||
// this adds an experimental additional term to the heating power, proportional to the extrusion speed.
|
||||
// if Kc is chosen well, the additional required power due to increased melting should be compensated.
|
||||
@ -376,6 +400,15 @@ const unsigned int dropsegments=5; //everything with less than this number of st
|
||||
#define MAX_CMD_SIZE 96
|
||||
#define BUFSIZE 4
|
||||
|
||||
// Bad Serial-connections can miss a received command by sending an 'ok'
|
||||
// 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
|
||||
|
||||
// @section fwretract
|
||||
|
||||
// Firmware based and LCD controlled retract
|
||||
|
@ -0,0 +1,799 @@
|
||||
#ifndef CONFIGURATION_H
|
||||
#define CONFIGURATION_H
|
||||
|
||||
#include "boards.h"
|
||||
|
||||
//===========================================================================
|
||||
//============================= Getting Started =============================
|
||||
//===========================================================================
|
||||
/*
|
||||
Here are some standard links for getting your machine calibrated:
|
||||
* http://reprap.org/wiki/Calibration
|
||||
* http://youtu.be/wAL9d7FgInk
|
||||
* http://calculator.josefprusa.cz
|
||||
* http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide
|
||||
* http://www.thingiverse.com/thing:5573
|
||||
* https://sites.google.com/site/repraplogphase/calibration-of-your-reprap
|
||||
* http://www.thingiverse.com/thing:298812
|
||||
*/
|
||||
|
||||
// This configuration file contains the basic settings.
|
||||
// Advanced settings can be found in Configuration_adv.h
|
||||
// BASIC SETTINGS: select your board type, temperature sensor type, axis scaling, and endstop configuration
|
||||
|
||||
//===========================================================================
|
||||
//============================= DELTA Printer ===============================
|
||||
//===========================================================================
|
||||
// For a Delta printer replace the configuration files with the files in the
|
||||
// example_configurations/delta directory.
|
||||
//
|
||||
|
||||
//===========================================================================
|
||||
//============================= SCARA Printer ===============================
|
||||
//===========================================================================
|
||||
// For a Scara printer replace the configuration files with the files in the
|
||||
// example_configurations/SCARA directory.
|
||||
//
|
||||
|
||||
// @section info
|
||||
|
||||
// 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 "1.0.3 dev"
|
||||
#define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
|
||||
#define STRING_CONFIG_H_AUTHOR "RepRapWorld.com" // Who made the changes.
|
||||
#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
|
||||
|
||||
// @section machine
|
||||
|
||||
// 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.
|
||||
// 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
|
||||
|
||||
// This determines the communication speed of the printer
|
||||
// :[2400,9600,19200,38400,57600,115200,250000]
|
||||
#define BAUDRATE 250000
|
||||
|
||||
// This enables the serial port associated to the Bluetooth interface
|
||||
//#define BTENABLED // Enable BT interface on AT90USB devices
|
||||
|
||||
// The following define selects which electronics board you have.
|
||||
// Please choose the name from boards.h that matches your setup
|
||||
#ifndef MOTHERBOARD
|
||||
#define MOTHERBOARD BOARD_MEGATRONICS_3
|
||||
#endif
|
||||
|
||||
// Optional custom name for your RepStrap or other custom machine
|
||||
// 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)
|
||||
// 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"
|
||||
|
||||
// This defines the number of extruders
|
||||
// :[1,2,3,4]
|
||||
#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
|
||||
// 1 = ATX
|
||||
// 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 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
|
||||
|
||||
// @section temperature
|
||||
|
||||
//===========================================================================
|
||||
//============================= Thermal Settings ============================
|
||||
//===========================================================================
|
||||
//
|
||||
//--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table
|
||||
//
|
||||
//// Temperature sensor settings:
|
||||
// -2 is thermocouple with MAX6675 (only for sensor 0)
|
||||
// -1 is thermocouple with AD595
|
||||
// 0 is not used
|
||||
// 1 is 100k thermistor - best choice for EPCOS 100k (4.7k pullup)
|
||||
// 2 is 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup)
|
||||
// 3 is Mendel-parts thermistor (4.7k pullup)
|
||||
// 4 is 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
|
||||
// 5 is 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (4.7k pullup)
|
||||
// 6 is 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup)
|
||||
// 7 is 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup)
|
||||
// 71 is 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup)
|
||||
// 8 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup)
|
||||
// 9 is 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup)
|
||||
// 10 is 100k RS thermistor 198-961 (4.7k pullup)
|
||||
// 11 is 100k beta 3950 1% thermistor (4.7k pullup)
|
||||
// 12 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed)
|
||||
// 13 is 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
|
||||
// 20 is the PT100 circuit found in the Ultimainboard V2.x
|
||||
// 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
|
||||
//
|
||||
// 1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k
|
||||
// (but gives greater accuracy and more stable PID)
|
||||
// 51 is 100k thermistor - EPCOS (1k pullup)
|
||||
// 52 is 200k thermistor - ATC Semitec 204GT-2 (1k pullup)
|
||||
// 55 is 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup)
|
||||
//
|
||||
// 1047 is Pt1000 with 4k7 pullup
|
||||
// 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.
|
||||
// Use it for Testing or Development purposes. NEVER for production machine.
|
||||
// #define DUMMY_THERMISTOR_998_VALUE 25
|
||||
// #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_1 0
|
||||
#define TEMP_SENSOR_2 0
|
||||
#define TEMP_SENSOR_3 0
|
||||
#define TEMP_SENSOR_BED 1
|
||||
|
||||
// This makes temp sensor 1 a redundant sensor for sensor 0. If the temperatures difference between these sensors is to high the print will be aborted.
|
||||
//#define TEMP_SENSOR_1_AS_REDUNDANT
|
||||
#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10
|
||||
|
||||
// Actual temperature must be close to target for this long before M109 returns success
|
||||
#define TEMP_RESIDENCY_TIME 10 // (seconds)
|
||||
#define TEMP_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one
|
||||
#define TEMP_WINDOW 1 // (degC) Window around target to start the residency timer x degC early.
|
||||
|
||||
// The minimal temperature defines the temperature below which the heater will not be enabled It is used
|
||||
// to check that the wiring to the thermistor is not broken.
|
||||
// Otherwise this would lead to the heater being powered on all the time.
|
||||
#define HEATER_0_MINTEMP 5
|
||||
#define HEATER_1_MINTEMP 5
|
||||
#define HEATER_2_MINTEMP 5
|
||||
#define HEATER_3_MINTEMP 5
|
||||
#define BED_MINTEMP 5
|
||||
|
||||
// When temperature exceeds max temp, your heater will be switched off.
|
||||
// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure!
|
||||
// You should use MINTEMP for thermistor short/failure protection.
|
||||
#define HEATER_0_MAXTEMP 275
|
||||
#define HEATER_1_MAXTEMP 275
|
||||
#define HEATER_2_MAXTEMP 275
|
||||
#define HEATER_3_MAXTEMP 275
|
||||
#define BED_MAXTEMP 150
|
||||
|
||||
// If your bed has low resistance e.g. .6 ohm and throws the fuse you can duty cycle it to reduce the
|
||||
// average current. The value should be an integer and the heat bed will be turned on for 1 interval of
|
||||
// HEATER_BED_DUTY_CYCLE_DIVIDER intervals.
|
||||
//#define HEATER_BED_DUTY_CYCLE_DIVIDER 4
|
||||
|
||||
// If you want the M105 heater power reported in watts, define the BED_WATTS, and (shared for all extruders) EXTRUDER_WATTS
|
||||
//#define EXTRUDER_WATTS (12.0*12.0/6.7) // P=I^2/R
|
||||
//#define BED_WATTS (12.0*12.0/1.1) // P=I^2/R
|
||||
|
||||
//===========================================================================
|
||||
//============================= PID Settings ================================
|
||||
//===========================================================================
|
||||
// PID Tuning Guide here: http://reprap.org/wiki/PID_Tuning
|
||||
|
||||
// Comment the following line to disable PID and enable bang-bang.
|
||||
#define PIDTEMP
|
||||
#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
|
||||
#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
|
||||
#ifdef PIDTEMP
|
||||
//#define PID_DEBUG // Sends debug data to the serial port.
|
||||
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
|
||||
//#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
|
||||
//#define PID_PARAMS_PER_EXTRUDER // Uses separate PID parameters for each extruder (useful for mismatched extruders)
|
||||
// Set/get with gcode: M301 E[extruder number, 0-2]
|
||||
#define PID_FUNCTIONAL_RANGE 10 // 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_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term
|
||||
#define K1 0.95 //smoothing factor within the PID
|
||||
|
||||
// If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
|
||||
// Ultimaker
|
||||
#define DEFAULT_Kp 22.2
|
||||
#define DEFAULT_Ki 1.08
|
||||
#define DEFAULT_Kd 114
|
||||
|
||||
// MakerGear
|
||||
// #define DEFAULT_Kp 7.0
|
||||
// #define DEFAULT_Ki 0.1
|
||||
// #define DEFAULT_Kd 12
|
||||
|
||||
// Mendel Parts V9 on 12V
|
||||
// #define DEFAULT_Kp 63.0
|
||||
// #define DEFAULT_Ki 2.25
|
||||
// #define DEFAULT_Kd 440
|
||||
#endif // PIDTEMP
|
||||
|
||||
//===========================================================================
|
||||
//============================= PID > Bed Temperature Control ===============
|
||||
//===========================================================================
|
||||
// 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.
|
||||
// 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.
|
||||
// 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
|
||||
// shouldn't use bed PID until someone else verifies your hardware works.
|
||||
// If this is enabled, find your own PID constants below.
|
||||
//#define PIDTEMPBED
|
||||
//
|
||||
//#define BED_LIMIT_SWITCHING
|
||||
|
||||
// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option.
|
||||
// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis)
|
||||
// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did,
|
||||
// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED)
|
||||
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
|
||||
|
||||
//#define PID_BED_DEBUG // Sends debug data to the serial port.
|
||||
|
||||
#ifdef PIDTEMPBED
|
||||
//120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
|
||||
//from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
|
||||
#define DEFAULT_bedKp 10.00
|
||||
#define DEFAULT_bedKi .023
|
||||
#define DEFAULT_bedKd 305.4
|
||||
|
||||
//120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
|
||||
//from pidautotune
|
||||
// #define DEFAULT_bedKp 97.1
|
||||
// #define DEFAULT_bedKi 1.41
|
||||
// #define DEFAULT_bedKd 1675.16
|
||||
|
||||
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
|
||||
#endif // PIDTEMPBED
|
||||
|
||||
// @section extruder
|
||||
|
||||
//this prevents dangerous Extruder moves, i.e. if the temperature is under the limit
|
||||
//can be software-disabled for whatever purposes by
|
||||
#define PREVENT_DANGEROUS_EXTRUDE
|
||||
//if PREVENT_DANGEROUS_EXTRUDE is on, you can still disable (uncomment) very long bits of extrusion separately.
|
||||
#define PREVENT_LENGTHY_EXTRUDE
|
||||
|
||||
#define EXTRUDE_MINTEMP 170
|
||||
#define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
|
||||
|
||||
//===========================================================================
|
||||
//======================== Thermal Runaway Protection =======================
|
||||
//===========================================================================
|
||||
|
||||
/**
|
||||
* Thermal Runaway Protection protects your printer from damage and fire if a
|
||||
* thermistor falls out or temperature sensors fail in any way.
|
||||
*
|
||||
* The issue: If a thermistor falls out or a temperature sensor fails,
|
||||
* Marlin can no longer sense the actual temperature. Since a disconnected
|
||||
* thermistor reads as a low temperature, the firmware will keep the heater on.
|
||||
*
|
||||
* The solution: Once the temperature reaches the target, start observing.
|
||||
* If the temperature stays too far below the target (hysteresis) for too long,
|
||||
* the firmware will halt as a safety precaution.
|
||||
*/
|
||||
|
||||
#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
|
||||
#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed
|
||||
|
||||
//===========================================================================
|
||||
//============================= Mechanical Settings =========================
|
||||
//===========================================================================
|
||||
|
||||
// @section machine
|
||||
|
||||
// Uncomment this option to enable CoreXY kinematics
|
||||
// #define COREXY
|
||||
|
||||
// Enable this option for Toshiba steppers
|
||||
// #define CONFIG_STEPPERS_TOSHIBA
|
||||
|
||||
// @section homing
|
||||
|
||||
// coarse Endstop Settings
|
||||
#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
|
||||
|
||||
#ifndef ENDSTOPPULLUPS
|
||||
// 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).
|
||||
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 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 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_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
|
||||
//#define DISABLE_MAX_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
|
||||
// :{0:'Low',1:'High'}
|
||||
#define X_ENABLE_ON 0
|
||||
#define Y_ENABLE_ON 0
|
||||
#define Z_ENABLE_ON 0
|
||||
#define E_ENABLE_ON 0 // For all extruders
|
||||
|
||||
// Disables axis when it's not being used.
|
||||
// WARNING: When motors turn off there is a chance of losing position accuracy!
|
||||
#define DISABLE_X false
|
||||
#define DISABLE_Y false
|
||||
#define DISABLE_Z false
|
||||
|
||||
// @section extruder
|
||||
|
||||
#define DISABLE_E false // For all extruders
|
||||
#define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled
|
||||
|
||||
// @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_Y_DIR true
|
||||
#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_E1_DIR false
|
||||
#define INVERT_E2_DIR false
|
||||
#define INVERT_E3_DIR false
|
||||
|
||||
// @section homing
|
||||
|
||||
// ENDSTOP SETTINGS:
|
||||
// Sets direction of endstops when homing; 1=MAX, -1=MIN
|
||||
// :[-1,1]
|
||||
#define X_HOME_DIR -1
|
||||
#define Y_HOME_DIR -1
|
||||
#define Z_HOME_DIR -1
|
||||
|
||||
#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.
|
||||
|
||||
// @section machine
|
||||
|
||||
// Travel limits after homing (units are in mm)
|
||||
#define X_MIN_POS 0
|
||||
#define Y_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 ==========================
|
||||
//===========================================================================
|
||||
//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament
|
||||
// In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
|
||||
// It is assumed that when logic high = filament available
|
||||
// when logic low = filament ran out
|
||||
#ifdef FILAMENT_RUNOUT_SENSOR
|
||||
const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned
|
||||
#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
|
||||
#define FILAMENT_RUNOUT_SCRIPT "M600"
|
||||
#endif
|
||||
|
||||
//===========================================================================
|
||||
//=========================== Manual Bed Leveling ===========================
|
||||
//===========================================================================
|
||||
|
||||
// #define MANUAL_BED_LEVELING // Add display menu option for bed leveling
|
||||
// #define MESH_BED_LEVELING // Enable 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_MAX_X (X_MAX_POS - MESH_MIN_X)
|
||||
#define MESH_MIN_Y 10
|
||||
#define MESH_MAX_Y (Y_MAX_POS - MESH_MIN_Y)
|
||||
#define MESH_NUM_X_POINTS 3 // Don't use more than 7 points per axis, implementation limited
|
||||
#define MESH_NUM_Y_POINTS 3
|
||||
#define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0
|
||||
#endif // MESH_BED_LEVELING
|
||||
|
||||
//===========================================================================
|
||||
//============================ Bed Auto Leveling ============================
|
||||
//===========================================================================
|
||||
|
||||
// @section bedlevel
|
||||
|
||||
//#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.
|
||||
|
||||
#ifdef ENABLE_AUTO_BED_LEVELING
|
||||
|
||||
// There are 2 different ways to specify probing locations
|
||||
//
|
||||
// - "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
|
||||
|
||||
#ifdef AUTO_BED_LEVELING_GRID
|
||||
|
||||
#define LEFT_PROBE_BED_POSITION 15
|
||||
#define RIGHT_PROBE_BED_POSITION 170
|
||||
#define FRONT_PROBE_BED_POSITION 20
|
||||
#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
|
||||
// You probably don't need more than 3 (squared=9)
|
||||
#define AUTO_BED_LEVELING_GRID_POINTS 2
|
||||
|
||||
#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)
|
||||
// X and Y offsets must be integers
|
||||
#define X_PROBE_OFFSET_FROM_EXTRUDER -25 // Probe on: -left +right
|
||||
#define Y_PROBE_OFFSET_FROM_EXTRUDER -29 // Probe on: -front +behind
|
||||
#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.
|
||||
// Be sure you have this distance over your Z_MAX_POS in case
|
||||
|
||||
#define XY_TRAVEL_SPEED 8000 // X and Y axis travel speed between probes, in mm/min
|
||||
|
||||
#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_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 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.
|
||||
|
||||
// #define PROBE_SERVO_DEACTIVATION_DELAY 300
|
||||
|
||||
|
||||
//If you have enabled the Bed Auto Leveling and are using the same Z Probe for Z Homing,
|
||||
//it is highly recommended you let this Z_SAFE_HOMING enabled!!!
|
||||
|
||||
#define Z_SAFE_HOMING // This feature is meant to avoid Z homing with probe outside the bed area.
|
||||
// When defined, it will:
|
||||
// - Allow Z homing only after X and Y homing AND stepper drivers still enabled
|
||||
// - If stepper drivers timeout, it will need X and Y homing again before Z homing
|
||||
// - Position the probe in a defined XY point before Z Homing when homing all axis (G28)
|
||||
// - Block Z homing only when the probe is outside bed area.
|
||||
|
||||
#ifdef Z_SAFE_HOMING
|
||||
|
||||
#define Z_SAFE_HOMING_X_POINT (X_MAX_LENGTH/2) // X point for Z homing when homing all axis (G28)
|
||||
#define Z_SAFE_HOMING_Y_POINT (Y_MAX_LENGTH/2) // Y point for Z homing when homing all axis (G28)
|
||||
|
||||
#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
|
||||
|
||||
|
||||
// @section homing
|
||||
|
||||
// The position of the homing switches
|
||||
//#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)
|
||||
|
||||
// Manual homing switch locations:
|
||||
// For deltabots this means top and center of the Cartesian print volume.
|
||||
#ifdef MANUAL_HOME_POSITIONS
|
||||
#define MANUAL_X_HOME_POS 0
|
||||
#define MANUAL_Y_HOME_POS 0
|
||||
#define MANUAL_Z_HOME_POS 0
|
||||
//#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing.
|
||||
#endif
|
||||
|
||||
// @section movement
|
||||
|
||||
/**
|
||||
* MOVEMENT SETTINGS
|
||||
*/
|
||||
|
||||
#define HOMING_FEEDRATE {50*60, 50*60, 4*60, 0} // set the homing speeds (mm/min)
|
||||
|
||||
// default settings
|
||||
|
||||
#define DEFAULT_AXIS_STEPS_PER_UNIT {78.7402*2,78.7402*2,5120.00,760*1*1.5} // default steps per unit for Ultimaker
|
||||
#define DEFAULT_MAX_FEEDRATE {300, 300, 5, 25} // (mm/sec)
|
||||
#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 acceleration in mm/s^2 for printing moves
|
||||
#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
|
||||
|
||||
// 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_ZJERK 0.4 // (mm/sec)
|
||||
#define DEFAULT_EJERK 5.0 // (mm/sec)
|
||||
|
||||
|
||||
//=============================================================================
|
||||
//============================= Additional Features ===========================
|
||||
//=============================================================================
|
||||
|
||||
// @section more
|
||||
|
||||
// Custom M code points
|
||||
#define CUSTOM_M_CODES
|
||||
#ifdef CUSTOM_M_CODES
|
||||
#ifdef ENABLE_AUTO_BED_LEVELING
|
||||
#define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
|
||||
#define Z_PROBE_OFFSET_RANGE_MIN -20
|
||||
#define Z_PROBE_OFFSET_RANGE_MAX 20
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// @section extras
|
||||
|
||||
// EEPROM
|
||||
// The microcontroller can store settings in the EEPROM, e.g. max velocity...
|
||||
// M500 - stores parameters 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.
|
||||
//define this to enable EEPROM support
|
||||
//#define EEPROM_SETTINGS
|
||||
|
||||
#ifdef EEPROM_SETTINGS
|
||||
// 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
|
||||
#define PLA_PREHEAT_HOTEND_TEMP 180
|
||||
#define PLA_PREHEAT_HPB_TEMP 70
|
||||
#define PLA_PREHEAT_FAN_SPEED 0 // Insert Value between 0 and 255
|
||||
|
||||
#define ABS_PREHEAT_HOTEND_TEMP 240
|
||||
#define ABS_PREHEAT_HPB_TEMP 110
|
||||
#define ABS_PREHEAT_FAN_SPEED 0 // Insert Value between 0 and 255
|
||||
|
||||
//==============================LCD and SD support=============================
|
||||
// @section lcd
|
||||
|
||||
// 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, kana, kana_utf8, cn, test
|
||||
// See also language.h
|
||||
#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
|
||||
|
||||
// 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.
|
||||
// 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 DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
|
||||
#define SDSUPPORT // Enable SD Card Support in Hardware Console
|
||||
//#define SDSLOW // Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
|
||||
#define SD_CHECK_AND_RETRY // Use CRC checks and retries on the SD communication
|
||||
//#define ENCODER_PULSES_PER_STEP 1 // Increase if you have a high resolution encoder
|
||||
//#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
|
||||
//#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
|
||||
//#define ULTIPANEL //the UltiPanel as on Thingiverse
|
||||
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
|
||||
//#define LCD_FEEDBACK_FREQUENCY_HZ 1000 // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
|
||||
// 0 to disable buzzer feedback. Test with M300 S<frequency Hz> P<duration ms>
|
||||
// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
|
||||
// http://reprap.org/wiki/PanelOne
|
||||
//#define PANEL_ONE
|
||||
|
||||
// The MaKr3d Makr-Panel with graphic controller and SD support
|
||||
// http://reprap.org/wiki/MaKr3d_MaKrPanel
|
||||
//#define MAKRPANEL
|
||||
|
||||
// The Panucatt Devices Viki 2.0 and mini Viki with Graphic LCD
|
||||
// http://panucatt.com
|
||||
// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
|
||||
//#define VIKI2
|
||||
//#define miniVIKI
|
||||
|
||||
// The RepRapDiscount Smart Controller (white PCB)
|
||||
// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
|
||||
//#define REPRAP_DISCOUNT_SMART_CONTROLLER
|
||||
|
||||
// The GADGETS3D G3D LCD/SD Controller (blue PCB)
|
||||
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
|
||||
//#define G3D_PANEL
|
||||
|
||||
// The RepRapDiscount FULL GRAPHIC Smart Controller (quadratic white PCB)
|
||||
// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
|
||||
//
|
||||
// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
|
||||
//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
|
||||
|
||||
// The RepRapWorld REPRAPWORLD_KEYPAD v1.1
|
||||
// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
|
||||
#define REPRAPWORLD_KEYPAD
|
||||
#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 // how much should be moved when a key is pressed, eg 10.0 means 10mm per click
|
||||
|
||||
// The Elefu RA Board Control Panel
|
||||
// http://www.elefu.com/index.php?route=product/product&product_id=53
|
||||
// REMEMBER TO INSTALL LiquidCrystal_I2C.h in your ARDUINO library folder: https://github.com/kiyoshigawa/LiquidCrystal_I2C
|
||||
//#define RA_CONTROL_PANEL
|
||||
|
||||
/**
|
||||
* I2C Panels
|
||||
*/
|
||||
|
||||
//#define LCD_I2C_SAINSMART_YWROBOT
|
||||
|
||||
// PANELOLU2 LCD with status LEDs, separate encoder and click inputs
|
||||
//#define LCD_I2C_PANELOLU2
|
||||
|
||||
// Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs
|
||||
//#define LCD_I2C_VIKI
|
||||
|
||||
// Shift register panels
|
||||
// ---------------------
|
||||
// 2 wire Non-latching LCD SR from:
|
||||
// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
|
||||
|
||||
//#define SAV_3DLCD
|
||||
|
||||
// @section extras
|
||||
|
||||
// Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
|
||||
//#define FAST_PWM_FAN
|
||||
|
||||
// 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
|
||||
// is too low, you should also increment SOFT_PWM_SCALE.
|
||||
//#define FAN_SOFT_PWM
|
||||
|
||||
// Incrementing this by 1 will double the software PWM frequency,
|
||||
// affecting heaters, and the fan if FAN_SOFT_PWM is enabled.
|
||||
// However, control resolution will be halved for each increment;
|
||||
// at zero value, there are 128 effective control positions.
|
||||
#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
|
||||
// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
|
||||
// #define PHOTOGRAPH_PIN 23
|
||||
|
||||
// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
|
||||
//#define SF_ARC_FIX
|
||||
|
||||
// Support for the BariCUDA Paste Extruder.
|
||||
//#define BARICUDA
|
||||
|
||||
//define BlinkM/CyzRgb Support
|
||||
//#define BLINKM
|
||||
|
||||
/*********************************************************************\
|
||||
* R/C SERVO support
|
||||
* Sponsored by TrinityLabs, Reworked by codexmas
|
||||
**********************************************************************/
|
||||
|
||||
// Number of servos
|
||||
//
|
||||
// If you select a configuration below, this will receive a default value and does not need to be set manually
|
||||
// set it manually if you have more servos than extruders and wish to manually control some
|
||||
// leaving it undefined or defining as 0 will disable the servo subsystem
|
||||
// If unsure, leave commented / disabled
|
||||
//
|
||||
//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
|
||||
|
||||
// Servo Endstops
|
||||
//
|
||||
// This allows for servo actuated endstops, primary usage is for the Z Axis to eliminate calibration or bed height changes.
|
||||
// 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_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles
|
||||
|
||||
/**********************************************************************\
|
||||
* Support for a filament diameter sensor
|
||||
* Also allows adjustment of diameter at print time (vs at slicing)
|
||||
* Single extruder only at this point (extruder 0)
|
||||
*
|
||||
* Motherboards
|
||||
* 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector
|
||||
* 81 - Printrboard - Uses Analog input 2 on the Exp1 connector (version B,C,D,E)
|
||||
* 301 - Rambo - uses Analog input 3
|
||||
* Note may require analog pins to be defined for different motherboards
|
||||
**********************************************************************/
|
||||
// Uncomment below to enable
|
||||
//#define FILAMENT_SENSOR
|
||||
|
||||
#define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2)
|
||||
#define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel
|
||||
|
||||
#define DEFAULT_NOMINAL_FILAMENT_DIA 3.0 //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software. Used for sensor reading validation
|
||||
#define MEASURED_UPPER_LIMIT 3.3 //upper limit factor used for sensor reading validation in mm
|
||||
#define MEASURED_LOWER_LIMIT 1.9 //lower limit factor for sensor reading validation in mm
|
||||
#define MAX_MEASUREMENT_DELAY 20 //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM and lower number saves RAM)
|
||||
|
||||
//defines used in the code
|
||||
#define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA //set measured to nominal initially
|
||||
|
||||
//When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status. Status will appear for 5 sec.
|
||||
//#define FILAMENT_LCD_DISPLAY
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#include "Configuration_adv.h"
|
||||
#include "thermistortables.h"
|
||||
|
||||
#endif //CONFIGURATION_H
|
@ -30,7 +30,7 @@ Here are some standard links for getting your machine calibrated:
|
||||
// You might need Z-Min endstop on SCARA-Printer to use this feature. Actually untested!
|
||||
// Uncomment to use Morgan scara mode
|
||||
#define SCARA
|
||||
#define scara_segments_per_second 200 //careful, two much will decrease performance...
|
||||
#define SCARA_SEGMENTS_PER_SECOND 200 // If movement is choppy try lowering this value
|
||||
// Length of inner support arm
|
||||
#define Linkage_1 150 //mm Preprocessor cannot handle decimal point...
|
||||
// Length of outer support arm Measure arm lengths precisely and enter
|
||||
@ -288,44 +288,24 @@ Here are some standard links for getting your machine calibrated:
|
||||
#define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
|
||||
|
||||
//===========================================================================
|
||||
//============================= Thermal Runaway Protection ==================
|
||||
//======================== Thermal Runaway Protection =======================
|
||||
//===========================================================================
|
||||
/*
|
||||
This is a feature to protect your printer from burn up in flames if it has
|
||||
a thermistor coming off place (this happened to a friend of mine recently and
|
||||
motivated me writing this feature).
|
||||
|
||||
The issue: If a thermistor come off, it will read a lower temperature than actual.
|
||||
The system will turn the heater on forever, burning up the filament and anything
|
||||
else around.
|
||||
|
||||
After the temperature reaches the target for the first time, this feature will
|
||||
start measuring for how long the current temperature stays below the target
|
||||
minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS).
|
||||
|
||||
If it stays longer than _PERIOD, it means the thermistor temperature
|
||||
cannot catch up with the target, so something *may be* wrong. Then, to be on the
|
||||
safe side, the system will he halt.
|
||||
|
||||
Bear in mind the count down will just start AFTER the first time the
|
||||
thermistor temperature is over the target, so you will have no problem if
|
||||
your extruder heater takes 2 minutes to hit the target on heating.
|
||||
|
||||
*/
|
||||
// If you want to enable this feature for all your extruder heaters,
|
||||
// uncomment the 2 defines below:
|
||||
|
||||
// Parameters for all extruder heaters
|
||||
//#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds
|
||||
//#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius
|
||||
|
||||
// If you want to enable this feature for your bed heater,
|
||||
// uncomment the 2 defines below:
|
||||
|
||||
// Parameters for the bed heater
|
||||
//#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds
|
||||
//#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius
|
||||
/**
|
||||
* Thermal Runaway Protection protects your printer from damage and fire if a
|
||||
* thermistor falls out or temperature sensors fail in any way.
|
||||
*
|
||||
* The issue: If a thermistor falls out or a temperature sensor fails,
|
||||
* Marlin can no longer sense the actual temperature. Since a disconnected
|
||||
* thermistor reads as a low temperature, the firmware will keep the heater on.
|
||||
*
|
||||
* The solution: Once the temperature reaches the target, start observing.
|
||||
* If the temperature stays too far below the target (hysteresis) for too long,
|
||||
* the firmware will halt as a safety precaution.
|
||||
*/
|
||||
|
||||
#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
|
||||
#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed
|
||||
|
||||
//===========================================================================
|
||||
//============================= Mechanical Settings =========================
|
||||
@ -402,17 +382,20 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
|
||||
#define Z_MAX_POS 225
|
||||
|
||||
//===========================================================================
|
||||
//============================= Filament Runout Sensor ======================
|
||||
//========================= Filament Runout Sensor ==========================
|
||||
//===========================================================================
|
||||
//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament
|
||||
// In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
|
||||
// It is assumed that when logic high = filament available
|
||||
// when logic low = filament ran out
|
||||
//const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned
|
||||
//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
|
||||
|
||||
#ifdef FILAMENT_RUNOUT_SENSOR
|
||||
const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned
|
||||
#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
|
||||
#define FILAMENT_RUNOUT_SCRIPT "M600"
|
||||
#endif
|
||||
|
||||
//===========================================================================
|
||||
//============================ Manual Bed Leveling ==========================
|
||||
//=========================== Manual Bed Leveling ===========================
|
||||
//===========================================================================
|
||||
|
||||
// #define MANUAL_BED_LEVELING // Add display menu option for bed leveling
|
||||
@ -433,7 +416,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
|
||||
#endif // MESH_BED_LEVELING
|
||||
|
||||
//===========================================================================
|
||||
//============================= Bed Auto Leveling ===========================
|
||||
//============================ Bed Auto Leveling ============================
|
||||
//===========================================================================
|
||||
|
||||
//#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line)
|
||||
|
@ -14,14 +14,38 @@
|
||||
#endif
|
||||
#define BED_CHECK_INTERVAL 3000 //ms between checks in bang-bang control
|
||||
|
||||
//// Heating sanity check:
|
||||
// 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.
|
||||
// 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
|
||||
//#define WATCH_TEMP_PERIOD 40000 //40 seconds
|
||||
//#define WATCH_TEMP_INCREASE 10 //Heat up at least 10 degree in 20 seconds
|
||||
/**
|
||||
* Thermal Protection parameters
|
||||
*/
|
||||
#ifdef THERMAL_PROTECTION_HOTENDS
|
||||
#define THERMAL_PROTECTION_PERIOD 40 // Seconds
|
||||
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
|
||||
|
||||
/**
|
||||
* Whenever an M104 or M109 increases the target temperature the firmware will wait for the
|
||||
* WATCH_TEMP_PERIOD to transpire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
|
||||
* degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
|
||||
* but only if the current temperature is far enough below the target for a reliable test.
|
||||
*/
|
||||
#define WATCH_TEMP_PERIOD 16 // Seconds
|
||||
#define WATCH_TEMP_INCREASE 4 // Degrees Celsius
|
||||
#endif
|
||||
|
||||
#ifdef THERMAL_PROTECTION_BED
|
||||
#define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds
|
||||
#define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Automatic Temperature:
|
||||
* The hotend target temperature is calculated by all the buffered lines of gcode.
|
||||
* The maximum buffered steps/sec of the extruder motor is called "se".
|
||||
* Start autotemp mode with M109 S<mintemp> B<maxtemp> F<factor>
|
||||
* The target temperature is set to mintemp+factor*se[steps/sec] and is limited by
|
||||
* mintemp and maxtemp. Turn this off by excuting M109 without F*
|
||||
* Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp.
|
||||
* On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
|
||||
*/
|
||||
#ifdef PIDTEMP
|
||||
// this adds an experimental additional term to the heating power, proportional to the extrusion speed.
|
||||
// if Kc is chosen well, the additional required power due to increased melting should be compensated.
|
||||
@ -376,6 +400,15 @@ const unsigned int dropsegments=5; //everything with less than this number of st
|
||||
#define MAX_CMD_SIZE 96
|
||||
#define BUFSIZE 4
|
||||
|
||||
// Bad Serial-connections can miss a received command by sending an 'ok'
|
||||
// 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
|
||||
|
||||
// @section fwretract
|
||||
|
||||
// Firmware based and LCD controlled retract
|
||||
|
@ -256,44 +256,24 @@ Here are some standard links for getting your machine calibrated:
|
||||
#define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
|
||||
|
||||
//===========================================================================
|
||||
//============================= Thermal Runaway Protection ==================
|
||||
//======================== Thermal Runaway Protection =======================
|
||||
//===========================================================================
|
||||
/*
|
||||
This is a feature to protect your printer from burn up in flames if it has
|
||||
a thermistor coming off place (this happened to a friend of mine recently and
|
||||
motivated me writing this feature).
|
||||
|
||||
The issue: If a thermistor come off, it will read a lower temperature than actual.
|
||||
The system will turn the heater on forever, burning up the filament and anything
|
||||
else around.
|
||||
|
||||
After the temperature reaches the target for the first time, this feature will
|
||||
start measuring for how long the current temperature stays below the target
|
||||
minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS).
|
||||
|
||||
If it stays longer than _PERIOD, it means the thermistor temperature
|
||||
cannot catch up with the target, so something *may be* wrong. Then, to be on the
|
||||
safe side, the system will he halt.
|
||||
|
||||
Bear in mind the count down will just start AFTER the first time the
|
||||
thermistor temperature is over the target, so you will have no problem if
|
||||
your extruder heater takes 2 minutes to hit the target on heating.
|
||||
|
||||
*/
|
||||
// If you want to enable this feature for all your extruder heaters,
|
||||
// uncomment the 2 defines below:
|
||||
|
||||
// Parameters for all extruder heaters
|
||||
//#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds
|
||||
//#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius
|
||||
|
||||
// If you want to enable this feature for your bed heater,
|
||||
// uncomment the 2 defines below:
|
||||
|
||||
// Parameters for the bed heater
|
||||
//#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds
|
||||
//#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius
|
||||
/**
|
||||
* Thermal Runaway Protection protects your printer from damage and fire if a
|
||||
* thermistor falls out or temperature sensors fail in any way.
|
||||
*
|
||||
* The issue: If a thermistor falls out or a temperature sensor fails,
|
||||
* Marlin can no longer sense the actual temperature. Since a disconnected
|
||||
* thermistor reads as a low temperature, the firmware will keep the heater on.
|
||||
*
|
||||
* The solution: Once the temperature reaches the target, start observing.
|
||||
* If the temperature stays too far below the target (hysteresis) for too long,
|
||||
* the firmware will halt as a safety precaution.
|
||||
*/
|
||||
|
||||
#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
|
||||
#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed
|
||||
|
||||
//===========================================================================
|
||||
//============================= Mechanical Settings =========================
|
||||
@ -370,17 +350,20 @@ const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic
|
||||
#define Z_MAX_POS 200
|
||||
|
||||
//===========================================================================
|
||||
//============================= Filament Runout Sensor ======================
|
||||
//========================= Filament Runout Sensor ==========================
|
||||
//===========================================================================
|
||||
//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament
|
||||
// In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
|
||||
// It is assumed that when logic high = filament available
|
||||
// when logic low = filament ran out
|
||||
//const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned
|
||||
//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
|
||||
|
||||
#ifdef FILAMENT_RUNOUT_SENSOR
|
||||
const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned
|
||||
#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
|
||||
#define FILAMENT_RUNOUT_SCRIPT "M600"
|
||||
#endif
|
||||
|
||||
//===========================================================================
|
||||
//============================ Manual Bed Leveling ==========================
|
||||
//=========================== Manual Bed Leveling ===========================
|
||||
//===========================================================================
|
||||
|
||||
// #define MANUAL_BED_LEVELING // Add display menu option for bed leveling
|
||||
@ -401,7 +384,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic
|
||||
#endif // MESH_BED_LEVELING
|
||||
|
||||
//===========================================================================
|
||||
//============================= Bed Auto Leveling ===========================
|
||||
//============================ Bed Auto Leveling ============================
|
||||
//===========================================================================
|
||||
|
||||
//#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line)
|
||||
|
@ -14,14 +14,38 @@
|
||||
#endif
|
||||
#define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control
|
||||
|
||||
//// Heating sanity check:
|
||||
// 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.
|
||||
// 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
|
||||
//#define WATCH_TEMP_PERIOD 40000 //40 seconds
|
||||
//#define WATCH_TEMP_INCREASE 10 //Heat up at least 10 degree in 20 seconds
|
||||
/**
|
||||
* Thermal Protection parameters
|
||||
*/
|
||||
#ifdef THERMAL_PROTECTION_HOTENDS
|
||||
#define THERMAL_PROTECTION_PERIOD 40 // Seconds
|
||||
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
|
||||
|
||||
/**
|
||||
* Whenever an M104 or M109 increases the target temperature the firmware will wait for the
|
||||
* WATCH_TEMP_PERIOD to transpire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
|
||||
* degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
|
||||
* but only if the current temperature is far enough below the target for a reliable test.
|
||||
*/
|
||||
#define WATCH_TEMP_PERIOD 16 // Seconds
|
||||
#define WATCH_TEMP_INCREASE 4 // Degrees Celsius
|
||||
#endif
|
||||
|
||||
#ifdef THERMAL_PROTECTION_BED
|
||||
#define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds
|
||||
#define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Automatic Temperature:
|
||||
* The hotend target temperature is calculated by all the buffered lines of gcode.
|
||||
* The maximum buffered steps/sec of the extruder motor is called "se".
|
||||
* Start autotemp mode with M109 S<mintemp> B<maxtemp> F<factor>
|
||||
* The target temperature is set to mintemp+factor*se[steps/sec] and is limited by
|
||||
* mintemp and maxtemp. Turn this off by excuting M109 without F*
|
||||
* Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp.
|
||||
* On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
|
||||
*/
|
||||
#ifdef PIDTEMP
|
||||
// this adds an experimental additional term to the heating power, proportional to the extrusion speed.
|
||||
// if Kc is chosen well, the additional required power due to increased melting should be compensated.
|
||||
@ -374,7 +398,16 @@ const unsigned int dropsegments=5; //everything with less than this number of st
|
||||
|
||||
//The ASCII buffer for receiving from the serial:
|
||||
#define MAX_CMD_SIZE 96
|
||||
#define BUFSIZE 5
|
||||
#define BUFSIZE 4
|
||||
|
||||
// Bad Serial-connections can miss a received command by sending an 'ok'
|
||||
// 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
|
||||
|
||||
// @section fwretract
|
||||
|
||||
|
803
Marlin/example_configurations/delta/biv2.5/Configuration.h
Normal file
803
Marlin/example_configurations/delta/biv2.5/Configuration.h
Normal file
@ -0,0 +1,803 @@
|
||||
#ifndef CONFIGURATION_H
|
||||
#define CONFIGURATION_H
|
||||
|
||||
#include "boards.h"
|
||||
|
||||
//===========================================================================
|
||||
//============================= Getting Started =============================
|
||||
//===========================================================================
|
||||
/*
|
||||
Here are some standard links for getting your machine calibrated:
|
||||
* http://reprap.org/wiki/Calibration
|
||||
* http://youtu.be/wAL9d7FgInk
|
||||
* http://calculator.josefprusa.cz
|
||||
* http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide
|
||||
* http://www.thingiverse.com/thing:5573
|
||||
* https://sites.google.com/site/repraplogphase/calibration-of-your-reprap
|
||||
* http://www.thingiverse.com/thing:298812
|
||||
*/
|
||||
|
||||
// This configuration file contains the basic settings.
|
||||
// Advanced settings can be found in Configuration_adv.h
|
||||
// BASIC SETTINGS: select your board type, temperature sensor type, axis scaling, and endstop configuration
|
||||
|
||||
//===========================================================================
|
||||
//============================= DELTA Printer ===============================
|
||||
//===========================================================================
|
||||
// For a Delta printer replace the configuration files with the files in the
|
||||
// example_configurations/delta directory.
|
||||
//
|
||||
|
||||
//===========================================================================
|
||||
//============================= SCARA Printer ===============================
|
||||
//===========================================================================
|
||||
// For a Delta printer replace the configuration files with the files in the
|
||||
// example_configurations/SCARA directory.
|
||||
//
|
||||
|
||||
// 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 "1.0.3 dev"
|
||||
#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
|
||||
//#define STRING_SPLASH_LINE2 STRING_VERSION_CONFIG_H // will be shown during bootup in line2
|
||||
|
||||
// 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.
|
||||
// Serial port 0 is still used by the Arduino bootloader regardless of this setting.
|
||||
#define SERIAL_PORT 0
|
||||
|
||||
// This determines the communication speed of the printer
|
||||
#define BAUDRATE 250000
|
||||
|
||||
// This enables the serial port associated to the Bluetooth interface
|
||||
//#define BTENABLED // Enable BT interface on AT90USB devices
|
||||
|
||||
// The following define selects which electronics board you have.
|
||||
// Please choose the name from boards.h that matches your setup
|
||||
#ifndef MOTHERBOARD
|
||||
#define MOTHERBOARD BOARD_RUMBA
|
||||
#endif
|
||||
|
||||
// Optional custom name for your RepStrap or other custom machine
|
||||
// Displayed in the LCD "Ready" message
|
||||
#define CUSTOM_MACHINE_NAME "BI V2.5"
|
||||
|
||||
// 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)
|
||||
// #define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
|
||||
|
||||
// This defines the number of extruders
|
||||
#define EXTRUDERS 2
|
||||
|
||||
//// The following define selects which power supply you have. Please choose the one that matches your setup
|
||||
// 1 = ATX
|
||||
// 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC)
|
||||
|
||||
#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 PS_DEFAULT_OFF
|
||||
|
||||
|
||||
//===========================================================================
|
||||
//============================== Delta Settings =============================
|
||||
//===========================================================================
|
||||
// Enable DELTA kinematics and most of the default configuration for Deltas
|
||||
#define DELTA
|
||||
|
||||
// Make delta curves from many straight lines (linear interpolation).
|
||||
// This is a trade-off between visible corners (not enough segments)
|
||||
// and processor overload (too many expensive sqrt calls).
|
||||
#define DELTA_SEGMENTS_PER_SECOND 100
|
||||
|
||||
// NOTE NB all values for DELTA_* values MUST be floating point, so always have a decimal point in them
|
||||
|
||||
// Center-to-center distance of the holes in the diagonal push rods.
|
||||
#define DELTA_DIAGONAL_ROD 440.0 // mm
|
||||
|
||||
// Horizontal offset from middle of printer to smooth rod center.
|
||||
#define DELTA_SMOOTH_ROD_OFFSET 330.0 // mm
|
||||
|
||||
// Horizontal offset of the universal joints on the end effector.
|
||||
#define DELTA_EFFECTOR_OFFSET 50.0 // mm
|
||||
|
||||
// Horizontal offset of the universal joints on the carriages.
|
||||
#define DELTA_CARRIAGE_OFFSET 20.0 // mm
|
||||
|
||||
// Horizontal distance bridged by diagonal push rods when effector is centered.
|
||||
#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).
|
||||
#define DELTA_PRINTABLE_RADIUS 160
|
||||
|
||||
|
||||
//===========================================================================
|
||||
//============================= Thermal Settings ============================
|
||||
//===========================================================================
|
||||
//
|
||||
//--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table
|
||||
//
|
||||
//// Temperature sensor settings:
|
||||
// -2 is thermocouple with MAX6675 (only for sensor 0)
|
||||
// -1 is thermocouple with AD595
|
||||
// 0 is not used
|
||||
// 1 is 100k thermistor - best choice for EPCOS 100k (4.7k pullup)
|
||||
// 2 is 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup)
|
||||
// 3 is Mendel-parts thermistor (4.7k pullup)
|
||||
// 4 is 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
|
||||
// 5 is 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (4.7k pullup)
|
||||
// 6 is 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup)
|
||||
// 7 is 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup)
|
||||
// 71 is 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup)
|
||||
// 8 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup)
|
||||
// 9 is 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup)
|
||||
// 10 is 100k RS thermistor 198-961 (4.7k pullup)
|
||||
// 11 is 100k beta 3950 1% thermistor (4.7k pullup)
|
||||
// 12 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed)
|
||||
// 13 is 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
|
||||
// 20 is the PT100 circuit found in the Ultimainboard V2.x
|
||||
// 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
|
||||
//
|
||||
// 1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k
|
||||
// (but gives greater accuracy and more stable PID)
|
||||
// 51 is 100k thermistor - EPCOS (1k pullup)
|
||||
// 52 is 200k thermistor - ATC Semitec 204GT-2 (1k pullup)
|
||||
// 55 is 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup)
|
||||
//
|
||||
// 1047 is Pt1000 with 4k7 pullup
|
||||
// 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.
|
||||
// Use it for Testing or Development purposes. NEVER for production machine.
|
||||
// #define DUMMY_THERMISTOR_998_VALUE 25
|
||||
// #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_1 5
|
||||
#define TEMP_SENSOR_2 0
|
||||
#define TEMP_SENSOR_3 0
|
||||
#define TEMP_SENSOR_BED 1
|
||||
|
||||
// This makes temp sensor 1 a redundant sensor for sensor 0. If the temperatures difference between these sensors is to high the print will be aborted.
|
||||
//#define TEMP_SENSOR_1_AS_REDUNDANT
|
||||
#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10
|
||||
|
||||
// Actual temperature must be close to target for this long before M109 returns success
|
||||
#define TEMP_RESIDENCY_TIME 10 // (seconds)
|
||||
#define TEMP_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one
|
||||
#define TEMP_WINDOW 1 // (degC) Window around target to start the residency timer x degC early.
|
||||
|
||||
// The minimal temperature defines the temperature below which the heater will not be enabled It is used
|
||||
// to check that the wiring to the thermistor is not broken.
|
||||
// Otherwise this would lead to the heater being powered on all the time.
|
||||
#define HEATER_0_MINTEMP 5
|
||||
#define HEATER_1_MINTEMP 5
|
||||
#define HEATER_2_MINTEMP 5
|
||||
#define HEATER_3_MINTEMP 5
|
||||
#define BED_MINTEMP 5
|
||||
|
||||
// When temperature exceeds max temp, your heater will be switched off.
|
||||
// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure!
|
||||
// You should use MINTEMP for thermistor short/failure protection.
|
||||
#define HEATER_0_MAXTEMP 275
|
||||
#define HEATER_1_MAXTEMP 275
|
||||
#define HEATER_2_MAXTEMP 275
|
||||
#define HEATER_3_MAXTEMP 275
|
||||
#define BED_MAXTEMP 150
|
||||
|
||||
// If your bed has low resistance e.g. .6 ohm and throws the fuse you can duty cycle it to reduce the
|
||||
// average current. The value should be an integer and the heat bed will be turned on for 1 interval of
|
||||
// HEATER_BED_DUTY_CYCLE_DIVIDER intervals.
|
||||
//#define HEATER_BED_DUTY_CYCLE_DIVIDER 4
|
||||
|
||||
// If you want the M105 heater power reported in watts, define the BED_WATTS, and (shared for all extruders) EXTRUDER_WATTS
|
||||
//#define EXTRUDER_WATTS (12.0*12.0/6.7) // P=I^2/R
|
||||
//#define BED_WATTS (12.0*12.0/1.1) // P=I^2/R
|
||||
|
||||
//===========================================================================
|
||||
//============================= PID Settings ================================
|
||||
//===========================================================================
|
||||
// PID Tuning Guide here: http://reprap.org/wiki/PID_Tuning
|
||||
|
||||
// Comment the following line to disable PID and enable bang-bang.
|
||||
#define PIDTEMP
|
||||
#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
|
||||
#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
|
||||
#ifdef PIDTEMP
|
||||
//#define PID_DEBUG // Sends debug data to the serial port.
|
||||
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
|
||||
//#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
|
||||
//#define PID_PARAMS_PER_EXTRUDER // Uses separate PID parameters for each extruder (useful for mismatched extruders)
|
||||
// Set/get with gcode: M301 E[extruder number, 0-2]
|
||||
#define PID_FUNCTIONAL_RANGE 10 // 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_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term
|
||||
#define K1 0.95 //smoothing factor within the PID
|
||||
|
||||
// If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
|
||||
// Ultimaker
|
||||
#define DEFAULT_Kp 22.2
|
||||
#define DEFAULT_Ki 1.08
|
||||
#define DEFAULT_Kd 114
|
||||
|
||||
// MakerGear
|
||||
// #define DEFAULT_Kp 7.0
|
||||
// #define DEFAULT_Ki 0.1
|
||||
// #define DEFAULT_Kd 12
|
||||
|
||||
// Mendel Parts V9 on 12V
|
||||
// #define DEFAULT_Kp 63.0
|
||||
// #define DEFAULT_Ki 2.25
|
||||
// #define DEFAULT_Kd 440
|
||||
#endif // PIDTEMP
|
||||
|
||||
//===========================================================================
|
||||
//============================= PID > Bed Temperature Control ===============
|
||||
//===========================================================================
|
||||
// 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.
|
||||
// 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.
|
||||
// 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
|
||||
// shouldn't use bed PID until someone else verifies your hardware works.
|
||||
// If this is enabled, find your own PID constants below.
|
||||
//#define PIDTEMPBED
|
||||
//
|
||||
//#define BED_LIMIT_SWITCHING
|
||||
|
||||
// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option.
|
||||
// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis)
|
||||
// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did,
|
||||
// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED)
|
||||
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
|
||||
|
||||
//#define PID_BED_DEBUG // Sends debug data to the serial port.
|
||||
|
||||
#ifdef PIDTEMPBED
|
||||
//120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
|
||||
//from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
|
||||
#define DEFAULT_bedKp 10.00
|
||||
#define DEFAULT_bedKi .023
|
||||
#define DEFAULT_bedKd 305.4
|
||||
|
||||
//120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
|
||||
//from pidautotune
|
||||
// #define DEFAULT_bedKp 97.1
|
||||
// #define DEFAULT_bedKi 1.41
|
||||
// #define DEFAULT_bedKd 1675.16
|
||||
|
||||
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
|
||||
#endif // PIDTEMPBED
|
||||
|
||||
|
||||
//this prevents dangerous Extruder moves, i.e. if the temperature is under the limit
|
||||
//can be software-disabled for whatever purposes by
|
||||
#define PREVENT_DANGEROUS_EXTRUDE
|
||||
//if PREVENT_DANGEROUS_EXTRUDE is on, you can still disable (uncomment) very long bits of extrusion separately.
|
||||
#define PREVENT_LENGTHY_EXTRUDE
|
||||
|
||||
#define EXTRUDE_MINTEMP 170
|
||||
#define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
|
||||
|
||||
//===========================================================================
|
||||
//======================== Thermal Runaway Protection =======================
|
||||
//===========================================================================
|
||||
|
||||
/**
|
||||
* Thermal Runaway Protection protects your printer from damage and fire if a
|
||||
* thermistor falls out or temperature sensors fail in any way.
|
||||
*
|
||||
* The issue: If a thermistor falls out or a temperature sensor fails,
|
||||
* Marlin can no longer sense the actual temperature. Since a disconnected
|
||||
* thermistor reads as a low temperature, the firmware will keep the heater on.
|
||||
*
|
||||
* The solution: Once the temperature reaches the target, start observing.
|
||||
* If the temperature stays too far below the target (hysteresis) for too long,
|
||||
* the firmware will halt as a safety precaution.
|
||||
*/
|
||||
|
||||
#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
|
||||
#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed
|
||||
|
||||
//===========================================================================
|
||||
//============================= Mechanical Settings =========================
|
||||
//===========================================================================
|
||||
|
||||
// Uncomment this option to enable CoreXY kinematics
|
||||
// #define COREXY
|
||||
|
||||
// Enable this option for Toshiba steppers
|
||||
// #define CONFIG_STEPPERS_TOSHIBA
|
||||
|
||||
// coarse Endstop Settings
|
||||
#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
|
||||
|
||||
#ifndef ENDSTOPPULLUPS
|
||||
// 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
|
||||
#endif
|
||||
|
||||
// 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 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 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 Z_MAX_ENDSTOP_INVERTING = false; // 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_MIN_ENDSTOPS // Deltas only use min endstops for probing
|
||||
|
||||
// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
|
||||
#define X_ENABLE_ON 0
|
||||
#define Y_ENABLE_ON 0
|
||||
#define Z_ENABLE_ON 0
|
||||
#define E_ENABLE_ON 0 // For all extruders
|
||||
|
||||
// Disables axis when it's not being used.
|
||||
// WARNING: When motors turn off there is a chance of losing position accuracy!
|
||||
#define DISABLE_X false
|
||||
#define DISABLE_Y false
|
||||
#define DISABLE_Z false
|
||||
#define DISABLE_E false // For all extruders
|
||||
#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_Y_DIR false
|
||||
#define INVERT_Z_DIR false
|
||||
#define INVERT_E0_DIR false
|
||||
#define INVERT_E1_DIR false
|
||||
#define INVERT_E2_DIR false
|
||||
#define INVERT_E3_DIR false
|
||||
|
||||
// ENDSTOP SETTINGS:
|
||||
// Sets direction of endstops when homing; 1=MAX, -1=MIN
|
||||
#define X_HOME_DIR 1 // deltas always home to max
|
||||
#define Y_HOME_DIR 1
|
||||
#define Z_HOME_DIR 1
|
||||
|
||||
#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.
|
||||
|
||||
// Travel limits after homing (units are in mm)
|
||||
#define X_MIN_POS -DELTA_PRINTABLE_RADIUS
|
||||
#define Y_MIN_POS -DELTA_PRINTABLE_RADIUS
|
||||
#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 ==========================
|
||||
//===========================================================================
|
||||
//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament
|
||||
// In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
|
||||
// It is assumed that when logic high = filament available
|
||||
// when logic low = filament ran out
|
||||
//const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned
|
||||
//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
|
||||
|
||||
//===========================================================================
|
||||
//=========================== Manual Bed Leveling ===========================
|
||||
//===========================================================================
|
||||
|
||||
// #define MANUAL_BED_LEVELING // Add display menu option for bed leveling
|
||||
// #define MESH_BED_LEVELING // Enable 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_MAX_X (X_MAX_POS - MESH_MIN_X)
|
||||
#define MESH_MIN_Y 10
|
||||
#define MESH_MAX_Y (Y_MAX_POS - MESH_MIN_Y)
|
||||
#define MESH_NUM_X_POINTS 3 // Don't use more than 7 points per axis, implementation limited
|
||||
#define MESH_NUM_Y_POINTS 3
|
||||
#define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0
|
||||
#endif // MESH_BED_LEVELING
|
||||
|
||||
//===========================================================================
|
||||
//============================ Bed Auto Leveling ============================
|
||||
//===========================================================================
|
||||
|
||||
//#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line)
|
||||
//#define Z_PROBE_REPEATABILITY_TEST // Z-Probe Repeatability test is not supported in Deltas yet.
|
||||
|
||||
#ifdef ENABLE_AUTO_BED_LEVELING
|
||||
|
||||
// There are 2 different ways to specify probing locations
|
||||
//
|
||||
// - "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 LEFT_PROBE_BED_POSITION -DELTA_PROBABLE_RADIUS
|
||||
#define RIGHT_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.
|
||||
// Compensate by interpolating between the nearest four Z probe values for each point.
|
||||
// Useful for deltas where the print surface may appear like a bowl or dome shape.
|
||||
// Works best with ACCURATE_BED_LEVELING_POINTS 5 or higher.
|
||||
#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)
|
||||
// X and Y offsets must be integers
|
||||
#define X_PROBE_OFFSET_FROM_EXTRUDER 0 // Probe on: -left +right
|
||||
#define Y_PROBE_OFFSET_FROM_EXTRUDER -10 // Probe on: -front +behind
|
||||
#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.
|
||||
// Be sure you have this distance over your Z_MAX_POS in case
|
||||
|
||||
#define XY_TRAVEL_SPEED 4000 // X and Y axis travel speed between probes, in mm/min
|
||||
|
||||
#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_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
|
||||
// Deploys by touching z-axis belt. Retracts by pushing the probe down. Uses Z_MIN_PIN.
|
||||
//#define Z_PROBE_ALLEN_KEY
|
||||
#ifdef Z_PROBE_ALLEN_KEY
|
||||
#define Z_PROBE_ALLEN_KEY_DEPLOY_X 30
|
||||
#define Z_PROBE_ALLEN_KEY_DEPLOY_Y DELTA_PRINTABLE_RADIUS
|
||||
#define Z_PROBE_ALLEN_KEY_DEPLOY_Z 100
|
||||
|
||||
#define Z_PROBE_ALLEN_KEY_STOW_X -64
|
||||
#define Z_PROBE_ALLEN_KEY_STOW_Y 56
|
||||
#define Z_PROBE_ALLEN_KEY_STOW_Z 23
|
||||
#define Z_PROBE_ALLEN_KEY_STOW_DEPTH 20
|
||||
#endif
|
||||
|
||||
//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.
|
||||
|
||||
// #define PROBE_SERVO_DEACTIVATION_DELAY 300
|
||||
|
||||
|
||||
//If you have enabled the Bed Auto Leveling and are using the same Z Probe for Z Homing,
|
||||
//it is highly recommended you let this Z_SAFE_HOMING enabled!!!
|
||||
|
||||
#define Z_SAFE_HOMING // This feature is meant to avoid Z homing with probe outside the bed area.
|
||||
// When defined, it will:
|
||||
// - Allow Z homing only after X and Y homing AND stepper drivers still enabled
|
||||
// - If stepper drivers timeout, it will need X and Y homing again before Z homing
|
||||
// - Position the probe in a defined XY point before Z Homing when homing all axis (G28)
|
||||
// - Block Z homing only when the probe is outside bed area.
|
||||
|
||||
#ifdef Z_SAFE_HOMING
|
||||
|
||||
#define Z_SAFE_HOMING_X_POINT (X_MAX_LENGTH/2) // X point for Z homing when homing all axis (G28)
|
||||
#define Z_SAFE_HOMING_Y_POINT (Y_MAX_LENGTH/2) // Y point for Z homing when homing all axis (G28)
|
||||
|
||||
#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
|
||||
|
||||
|
||||
// The position of the homing switches
|
||||
#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)
|
||||
|
||||
// Manual homing switch locations:
|
||||
// For deltabots this means top and center of the Cartesian print volume.
|
||||
#ifdef MANUAL_HOME_POSITIONS
|
||||
#define MANUAL_X_HOME_POS 0
|
||||
#define MANUAL_Y_HOME_POS 0
|
||||
#define MANUAL_Z_HOME_POS 405 // For delta: Distance between nozzle and print surface after homing.
|
||||
#endif
|
||||
|
||||
/**
|
||||
* MOVEMENT SETTINGS
|
||||
*/
|
||||
|
||||
|
||||
// delta homing speeds must be the same on xyz
|
||||
#define HOMING_FEEDRATE {200*30, 200*30, 200*30, 0} // set the homing speeds (mm/min)
|
||||
|
||||
// default settings
|
||||
// delta speeds must be the same on xyz
|
||||
#define DEFAULT_AXIS_STEPS_PER_UNIT {72.9, 72.9, 72.9, 291} // default steps per unit for BI v2.5 (cable drive)
|
||||
#define DEFAULT_MAX_FEEDRATE {500, 500, 500, 150} // (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_ACCELERATION 3000 // X, Y, Z and E acceleration in mm/s^2 for printing moves
|
||||
#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)
|
||||
#define DEFAULT_XYJERK 15.0 // (mm/sec)
|
||||
#define DEFAULT_ZJERK 15.0 // (mm/sec) Must be same as XY for delta
|
||||
#define DEFAULT_EJERK 5.0 // (mm/sec)
|
||||
|
||||
|
||||
//=============================================================================
|
||||
//============================= Additional Features ===========================
|
||||
//=============================================================================
|
||||
|
||||
// Custom M code points
|
||||
#define CUSTOM_M_CODES
|
||||
#ifdef CUSTOM_M_CODES
|
||||
#ifdef ENABLE_AUTO_BED_LEVELING
|
||||
#define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
|
||||
#define Z_PROBE_OFFSET_RANGE_MIN -20
|
||||
#define Z_PROBE_OFFSET_RANGE_MAX 20
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
// EEPROM
|
||||
// The microcontroller can store settings in the EEPROM, e.g. max velocity...
|
||||
// M500 - stores parameters 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.
|
||||
//define this to enable EEPROM support
|
||||
//#define EEPROM_SETTINGS
|
||||
|
||||
#ifdef EEPROM_SETTINGS
|
||||
// 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
|
||||
#define PLA_PREHEAT_HOTEND_TEMP 180
|
||||
#define PLA_PREHEAT_HPB_TEMP 70
|
||||
#define PLA_PREHEAT_FAN_SPEED 255 // Insert Value between 0 and 255
|
||||
|
||||
#define ABS_PREHEAT_HOTEND_TEMP 240
|
||||
#define ABS_PREHEAT_HPB_TEMP 100
|
||||
#define ABS_PREHEAT_FAN_SPEED 255 // Insert Value between 0 and 255
|
||||
|
||||
//==============================LCD and SD support=============================
|
||||
|
||||
// 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, kana, kana_utf8, cn, test
|
||||
// See also language.h
|
||||
#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
|
||||
|
||||
// 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.
|
||||
// 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 DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
|
||||
//#define SDSUPPORT // Enable SD Card Support in Hardware Console
|
||||
//#define SDSLOW // Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
|
||||
//#define SD_CHECK_AND_RETRY // Use CRC checks and retries on the SD communication
|
||||
//#define ENCODER_PULSES_PER_STEP 1 // Increase if you have a high resolution encoder
|
||||
//#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
|
||||
//#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
|
||||
//#define ULTIPANEL //the UltiPanel as on Thingiverse
|
||||
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
|
||||
//#define LCD_FEEDBACK_FREQUENCY_HZ 1000 // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
|
||||
// 0 to disable buzzer feedback. Test with M300 S<frequency Hz> P<duration ms>
|
||||
|
||||
// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
|
||||
// http://reprap.org/wiki/PanelOne
|
||||
//#define PANEL_ONE
|
||||
|
||||
// The MaKr3d Makr-Panel with graphic controller and SD support
|
||||
// http://reprap.org/wiki/MaKr3d_MaKrPanel
|
||||
//#define MAKRPANEL
|
||||
|
||||
// The Panucatt Devices Viki 2.0 and mini Viki with Graphic LCD
|
||||
// http://panucatt.com
|
||||
// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
|
||||
//#define VIKI2
|
||||
//#define miniVIKI
|
||||
|
||||
// The RepRapDiscount Smart Controller (white PCB)
|
||||
// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
|
||||
//#define REPRAP_DISCOUNT_SMART_CONTROLLER
|
||||
|
||||
// The GADGETS3D G3D LCD/SD Controller (blue PCB)
|
||||
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
|
||||
//#define G3D_PANEL
|
||||
|
||||
// The RepRapDiscount FULL GRAPHIC Smart Controller (quadratic white PCB)
|
||||
// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
|
||||
//
|
||||
// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
|
||||
#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
|
||||
|
||||
// The RepRapWorld REPRAPWORLD_KEYPAD v1.1
|
||||
// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
|
||||
//#define REPRAPWORLD_KEYPAD
|
||||
//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 // how much should be moved when a key is pressed, eg 10.0 means 10mm per click
|
||||
|
||||
// The Elefu RA Board Control Panel
|
||||
// http://www.elefu.com/index.php?route=product/product&product_id=53
|
||||
// REMEMBER TO INSTALL LiquidCrystal_I2C.h in your ARDUINO library folder: https://github.com/kiyoshigawa/LiquidCrystal_I2C
|
||||
//#define RA_CONTROL_PANEL
|
||||
|
||||
// Delta calibration menu
|
||||
// uncomment to add three points calibration menu option.
|
||||
// See http://minow.blogspot.com/index.html#4918805519571907051
|
||||
// If needed, adjust the X, Y, Z calibration coordinates
|
||||
// in ultralcd.cpp@lcd_delta_calibrate_menu()
|
||||
// #define DELTA_CALIBRATION_MENU
|
||||
|
||||
/**
|
||||
* I2C Panels
|
||||
*/
|
||||
|
||||
//#define LCD_I2C_SAINSMART_YWROBOT
|
||||
|
||||
// PANELOLU2 LCD with status LEDs, separate encoder and click inputs
|
||||
//#define LCD_I2C_PANELOLU2
|
||||
|
||||
// Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs
|
||||
//#define LCD_I2C_VIKI
|
||||
|
||||
// Shift register panels
|
||||
// ---------------------
|
||||
// 2 wire Non-latching LCD SR from:
|
||||
// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
|
||||
|
||||
//#define SAV_3DLCD
|
||||
|
||||
// Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
|
||||
//#define FAST_PWM_FAN
|
||||
|
||||
// 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
|
||||
// is too low, you should also increment SOFT_PWM_SCALE.
|
||||
//#define FAN_SOFT_PWM
|
||||
|
||||
// Incrementing this by 1 will double the software PWM frequency,
|
||||
// affecting heaters, and the fan if FAN_SOFT_PWM is enabled.
|
||||
// However, control resolution will be halved for each increment;
|
||||
// at zero value, there are 128 effective control positions.
|
||||
#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
|
||||
// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
|
||||
// #define PHOTOGRAPH_PIN 23
|
||||
|
||||
// SF send wrong arc g-codes when using Arc Point as fillet procedure
|
||||
//#define SF_ARC_FIX
|
||||
|
||||
// Support for the BariCUDA Paste Extruder.
|
||||
//#define BARICUDA
|
||||
|
||||
//define BlinkM/CyzRgb Support
|
||||
//#define BLINKM
|
||||
|
||||
/*********************************************************************\
|
||||
* R/C SERVO support
|
||||
* Sponsored by TrinityLabs, Reworked by codexmas
|
||||
**********************************************************************/
|
||||
|
||||
// Number of servos
|
||||
//
|
||||
// If you select a configuration below, this will receive a default value and does not need to be set manually
|
||||
// set it manually if you have more servos than extruders and wish to manually control some
|
||||
// leaving it undefined or defining as 0 will disable the servo subsystem
|
||||
// If unsure, leave commented / disabled
|
||||
//
|
||||
//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
|
||||
|
||||
// Servo Endstops
|
||||
//
|
||||
// This allows for servo actuated endstops, primary usage is for the Z Axis to eliminate calibration or bed height changes.
|
||||
// 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_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles
|
||||
|
||||
/**********************************************************************\
|
||||
* Support for a filament diameter sensor
|
||||
* Also allows adjustment of diameter at print time (vs at slicing)
|
||||
* Single extruder only at this point (extruder 0)
|
||||
*
|
||||
* Motherboards
|
||||
* 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector
|
||||
* 81 - Printrboard - Uses Analog input 2 on the Exp1 connector (version B,C,D,E)
|
||||
* 301 - Rambo - uses Analog input 3
|
||||
* Note may require analog pins to be defined for different motherboards
|
||||
**********************************************************************/
|
||||
// Uncomment below to enable
|
||||
//#define FILAMENT_SENSOR
|
||||
|
||||
#define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2)
|
||||
#define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel
|
||||
|
||||
#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75 //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software. Used for sensor reading validation
|
||||
#define MEASURED_UPPER_LIMIT 3.30 //upper limit factor used for sensor reading validation in mm
|
||||
#define MEASURED_LOWER_LIMIT 1.90 //lower limit factor for sensor reading validation in mm
|
||||
#define MAX_MEASUREMENT_DELAY 20 //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM and lower number saves RAM)
|
||||
|
||||
//defines used in the code
|
||||
#define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA //set measured to nominal initially
|
||||
|
||||
//When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status. Status will appear for 5 sec.
|
||||
//#define FILAMENT_LCD_DISPLAY
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#include "Configuration_adv.h"
|
||||
#include "thermistortables.h"
|
||||
|
||||
#endif //CONFIGURATION_H
|
585
Marlin/example_configurations/delta/biv2.5/Configuration_adv.h
Normal file
585
Marlin/example_configurations/delta/biv2.5/Configuration_adv.h
Normal file
@ -0,0 +1,585 @@
|
||||
#ifndef CONFIGURATION_ADV_H
|
||||
#define CONFIGURATION_ADV_H
|
||||
|
||||
#include "Conditionals.h"
|
||||
|
||||
// @section temperature
|
||||
|
||||
//===========================================================================
|
||||
//=============================Thermal Settings ============================
|
||||
//===========================================================================
|
||||
|
||||
#ifdef BED_LIMIT_SWITCHING
|
||||
#define BED_HYSTERESIS 2 //only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS
|
||||
#endif
|
||||
#define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control
|
||||
|
||||
/**
|
||||
* Thermal Protection parameters
|
||||
*/
|
||||
#ifdef THERMAL_PROTECTION_HOTENDS
|
||||
#define THERMAL_PROTECTION_PERIOD 40 // Seconds
|
||||
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
|
||||
|
||||
/**
|
||||
* Whenever an M104 or M109 increases the target temperature the firmware will wait for the
|
||||
* WATCH_TEMP_PERIOD to transpire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
|
||||
* degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
|
||||
* but only if the current temperature is far enough below the target for a reliable test.
|
||||
*/
|
||||
#define WATCH_TEMP_PERIOD 16 // Seconds
|
||||
#define WATCH_TEMP_INCREASE 4 // Degrees Celsius
|
||||
#endif
|
||||
|
||||
#ifdef THERMAL_PROTECTION_BED
|
||||
#define THERMAL_PROTECTION_BED_PERIOD 120 // Seconds
|
||||
#define THERMAL_PROTECTION_BED_HYSTERESIS 4 // Degrees Celsius
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Automatic Temperature:
|
||||
* The hotend target temperature is calculated by all the buffered lines of gcode.
|
||||
* The maximum buffered steps/sec of the extruder motor is called "se".
|
||||
* Start autotemp mode with M109 S<mintemp> B<maxtemp> F<factor>
|
||||
* The target temperature is set to mintemp+factor*se[steps/sec] and is limited by
|
||||
* mintemp and maxtemp. Turn this off by excuting M109 without F*
|
||||
* Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp.
|
||||
* On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
|
||||
*/
|
||||
#ifdef PIDTEMP
|
||||
// this adds an experimental additional term to the heating power, proportional to the extrusion speed.
|
||||
// if Kc is chosen well, the additional required power due to increased melting should be compensated.
|
||||
#define PID_ADD_EXTRUSION_RATE
|
||||
#ifdef PID_ADD_EXTRUSION_RATE
|
||||
#define DEFAULT_Kc (1) //heating power=Kc*(e_speed)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
//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".
|
||||
//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
|
||||
// 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.
|
||||
// on an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
|
||||
#define AUTOTEMP
|
||||
#ifdef AUTOTEMP
|
||||
#define AUTOTEMP_OLDWEIGHT 0.98
|
||||
#endif
|
||||
|
||||
//Show Temperature ADC value
|
||||
//The M105 command return, besides traditional information, the ADC value read from temperature sensors.
|
||||
//#define SHOW_TEMP_ADC_VALUES
|
||||
|
||||
// @section extruder
|
||||
|
||||
// extruder run-out prevention.
|
||||
//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_MINTEMP 190
|
||||
#define EXTRUDER_RUNOUT_SECONDS 30.
|
||||
#define EXTRUDER_RUNOUT_ESTEPS 14. //mm filament
|
||||
#define EXTRUDER_RUNOUT_SPEED 1500. //extrusion speed
|
||||
#define EXTRUDER_RUNOUT_EXTRUDE 100
|
||||
|
||||
// @section temperature
|
||||
|
||||
//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"
|
||||
#define TEMP_SENSOR_AD595_OFFSET 0.0
|
||||
#define TEMP_SENSOR_AD595_GAIN 1.0
|
||||
|
||||
//This is for controlling a fan to cool down the stepper drivers
|
||||
//it will turn on when any driver is enabled
|
||||
//and turn off after the set amount of seconds from last driver being disabled again
|
||||
#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable)
|
||||
#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run
|
||||
#define CONTROLLERFAN_SPEED 255 // == full speed
|
||||
|
||||
// When first starting the main fan, run it at full speed for the
|
||||
// given number of milliseconds. This gets the fan spinning reliably
|
||||
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
|
||||
//#define FAN_KICKSTART_TIME 100
|
||||
|
||||
// @section extruder
|
||||
|
||||
// Extruder cooling fans
|
||||
// Configure fan pin outputs to automatically turn on/off when the associated
|
||||
// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE.
|
||||
// Multiple extruders can be assigned to the same pin in which case
|
||||
// the fan will turn on when any selected extruder is above the threshold.
|
||||
#define EXTRUDER_0_AUTO_FAN_PIN -1
|
||||
#define EXTRUDER_1_AUTO_FAN_PIN -1
|
||||
#define EXTRUDER_2_AUTO_FAN_PIN -1
|
||||
#define EXTRUDER_3_AUTO_FAN_PIN -1
|
||||
#define EXTRUDER_AUTO_FAN_TEMPERATURE 50
|
||||
#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed
|
||||
|
||||
|
||||
//===========================================================================
|
||||
//=============================Mechanical Settings===========================
|
||||
//===========================================================================
|
||||
|
||||
// @section 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.
|
||||
|
||||
// A single Z stepper driver is usually used to drive 2 stepper motors.
|
||||
// Uncomment this define to utilize a separate stepper driver for each Z axis motor.
|
||||
// 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.
|
||||
// On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder.
|
||||
//#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.
|
||||
//#define Y_DUAL_STEPPER_DRIVERS
|
||||
|
||||
// Define if the two Y drives need to rotate in opposite directions
|
||||
#define INVERT_Y2_VS_Y_DIR true
|
||||
|
||||
// Enable this for dual x-carriage printers.
|
||||
// A dual x-carriage design has the advantage that the inactive extruder can be parked which
|
||||
// prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
|
||||
// allowing faster printing speeds.
|
||||
//#define DUAL_X_CARRIAGE
|
||||
#ifdef DUAL_X_CARRIAGE
|
||||
// Configuration for second X-carriage
|
||||
// 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.
|
||||
#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_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
|
||||
// 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
|
||||
// without modifying the firmware (through the "M218 T1 X???" command).
|
||||
// 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)
|
||||
#define X2_ENABLE_PIN 29
|
||||
#define X2_STEP_PIN 25
|
||||
#define X2_DIR_PIN 23
|
||||
|
||||
// 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
|
||||
// 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
|
||||
// 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
|
||||
// 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])
|
||||
|
||||
// This is the default power-up mode which can be later using M605.
|
||||
#define DEFAULT_DUAL_X_CARRIAGE_MODE 0
|
||||
|
||||
// Default settings in "Auto-park Mode"
|
||||
#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
|
||||
|
||||
// Default x offset in duplication mode (typically set to half print bed width)
|
||||
#define DEFAULT_DUPLICATION_X_OFFSET 100
|
||||
|
||||
#endif //DUAL_X_CARRIAGE
|
||||
|
||||
// @section homing
|
||||
|
||||
//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
|
||||
#define X_HOME_BUMP_MM 5
|
||||
#define Y_HOME_BUMP_MM 5
|
||||
#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 QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
|
||||
|
||||
// When G28 is called, this option will make Y home before X
|
||||
// #define HOME_Y_BEFORE_X
|
||||
|
||||
// @section machine
|
||||
|
||||
#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.
|
||||
#define INVERT_X_STEP_PIN false
|
||||
#define INVERT_Y_STEP_PIN false
|
||||
#define INVERT_Z_STEP_PIN false
|
||||
#define INVERT_E_STEP_PIN false
|
||||
|
||||
// Default stepper release if idle. Set to 0 to deactivate.
|
||||
#define DEFAULT_STEPPER_DEACTIVE_TIME 0
|
||||
|
||||
#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
|
||||
#define DEFAULT_MINTRAVELFEEDRATE 0.0
|
||||
|
||||
// @section lcd
|
||||
|
||||
#ifdef ULTIPANEL
|
||||
#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
|
||||
|
||||
// @section extras
|
||||
|
||||
// minimum time in microseconds that a movement needs to take if the buffer is emptied.
|
||||
#define DEFAULT_MINSEGMENTTIME 20000
|
||||
|
||||
// If defined the movements slow down when the look ahead buffer is only half full
|
||||
// (don't use SLOWDOWN with DELTA because DELTA generates hundreds of segments per second)
|
||||
//#define SLOWDOWN
|
||||
|
||||
// Frequency limit
|
||||
// See nophead's blog for more info
|
||||
// Not working O
|
||||
//#define XY_FREQUENCY_LIMIT 15
|
||||
|
||||
// Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end
|
||||
// of the buffer and all stops. This should not be much greater than zero and should only be changed
|
||||
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
|
||||
#define MINIMUM_PLANNER_SPEED 0.05// (mm/sec)
|
||||
|
||||
// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
|
||||
#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
|
||||
|
||||
// Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
|
||||
#define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
|
||||
|
||||
// uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
|
||||
//#define DIGIPOT_I2C
|
||||
// Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8
|
||||
#define DIGIPOT_I2C_NUM_CHANNELS 8
|
||||
// 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}
|
||||
|
||||
//===========================================================================
|
||||
//=============================Additional Features===========================
|
||||
//===========================================================================
|
||||
|
||||
#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 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 exceeds this value, multiply steps moved x100 to really quickly advance the 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_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
|
||||
|
||||
// @section lcd
|
||||
|
||||
#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.
|
||||
// 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
|
||||
#define PROGRESS_BAR_BAR_TIME 2000
|
||||
// Amount of time (ms) to show the status message
|
||||
#define PROGRESS_BAR_MSG_TIME 3000
|
||||
// Amount of time (ms) to retain the status message (0=forever)
|
||||
#define PROGRESS_MSG_EXPIRE 0
|
||||
// Enable this to show messages for MSG_TIME then hide them
|
||||
//#define PROGRESS_MSG_ONCE
|
||||
#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.
|
||||
//#define USE_WATCHDOG
|
||||
|
||||
#ifdef USE_WATCHDOG
|
||||
// If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
|
||||
// The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset.
|
||||
// However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled.
|
||||
//#define WATCHDOG_RESET_MANUAL
|
||||
#endif
|
||||
|
||||
// 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
|
||||
|
||||
// @section lcd
|
||||
|
||||
// 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
|
||||
// does not respect endstops!
|
||||
//#define BABYSTEPPING
|
||||
#ifdef BABYSTEPPING
|
||||
#define BABYSTEP_XY //not only z, but also XY in the menu. more clutter, more functions
|
||||
#define BABYSTEP_INVERT_Z false //true for inverse movements in Z
|
||||
#define BABYSTEP_Z_MULTIPLICATOR 2 //faster z movements
|
||||
#endif
|
||||
|
||||
// @section extruder
|
||||
|
||||
// extruder advance constant (s2/mm3)
|
||||
//
|
||||
// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
|
||||
//
|
||||
// Hooke's law says: force = k * distance
|
||||
// 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
|
||||
//#define ADVANCE
|
||||
|
||||
#ifdef ADVANCE
|
||||
#define EXTRUDER_ADVANCE_K .0
|
||||
#define D_FILAMENT 2.85
|
||||
#define STEPS_MM_E 836
|
||||
#endif
|
||||
|
||||
// @section extras
|
||||
|
||||
// Arc interpretation settings:
|
||||
#define MM_PER_ARC_SEGMENT 1
|
||||
#define N_ARC_CORRECTION 25
|
||||
|
||||
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 temperature
|
||||
|
||||
// Control heater 0 and heater 1 in parallel.
|
||||
//#define HEATERS_PARALLEL
|
||||
|
||||
//===========================================================================
|
||||
//================================= Buffers =================================
|
||||
//===========================================================================
|
||||
|
||||
// @section hidden
|
||||
|
||||
// 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.
|
||||
#ifdef SDSUPPORT
|
||||
#define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
|
||||
#else
|
||||
#define BLOCK_BUFFER_SIZE 16 // maximize block buffer
|
||||
#endif
|
||||
|
||||
// @section more
|
||||
|
||||
//The ASCII buffer for receiving from the serial:
|
||||
#define MAX_CMD_SIZE 96
|
||||
#define BUFSIZE 4
|
||||
|
||||
// Bad Serial-connections can miss a received command by sending an 'ok'
|
||||
// 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
|
||||
|
||||
// @section fwretract
|
||||
|
||||
// Firmware based and LCD controlled retract
|
||||
// M207 and M208 can be used to define parameters for the retraction.
|
||||
// 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.
|
||||
// the moves are than replaced by the firmware controlled ones.
|
||||
|
||||
#define FWRETRACT //ONLY PARTIALLY TESTED
|
||||
#ifdef FWRETRACT
|
||||
#define MIN_RETRACT 0.1 //minimum extruded mm to accept a automatic gcode retraction attempt
|
||||
#define RETRACT_LENGTH 5 //default retract length (positive mm)
|
||||
#define RETRACT_LENGTH_SWAP 13 //default swap retract length (positive mm), for extruder change
|
||||
#define RETRACT_FEEDRATE 100 //default feedrate for retracting (mm/s)
|
||||
#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_SWAP 0 //default additional swap recover length (mm, added to retract length when recovering from extruder change)
|
||||
#define RETRACT_RECOVER_FEEDRATE 100 //default feedrate for recovering from retraction (mm/s)
|
||||
#endif
|
||||
|
||||
// Add support for experimental filament exchange support M600; requires display
|
||||
#ifdef ULTIPANEL
|
||||
//#define FILAMENTCHANGEENABLE
|
||||
#ifdef FILAMENTCHANGEENABLE
|
||||
#define FILAMENTCHANGE_XPOS 3
|
||||
#define FILAMENTCHANGE_YPOS 3
|
||||
#define FILAMENTCHANGE_ZADD 10
|
||||
#define FILAMENTCHANGE_FIRSTRETRACT -2
|
||||
#define FILAMENTCHANGE_FINALRETRACT -100
|
||||
#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 "SanityCheck.h"
|
||||
|
||||
#endif //CONFIGURATION_ADV_H
|
@ -286,44 +286,24 @@ Here are some standard links for getting your machine calibrated:
|
||||
#define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
|
||||
|
||||
//===========================================================================
|
||||
//============================= Thermal Runaway Protection ==================
|
||||
//======================== Thermal Runaway Protection =======================
|
||||
//===========================================================================
|
||||
/*
|
||||
This is a feature to protect your printer from burn up in flames if it has
|
||||
a thermistor coming off place (this happened to a friend of mine recently and
|
||||
motivated me writing this feature).
|
||||
|
||||
The issue: If a thermistor come off, it will read a lower temperature than actual.
|
||||
The system will turn the heater on forever, burning up the filament and anything
|
||||
else around.
|
||||
|
||||
After the temperature reaches the target for the first time, this feature will
|
||||
start measuring for how long the current temperature stays below the target
|
||||
minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS).
|
||||
|
||||
If it stays longer than _PERIOD, it means the thermistor temperature
|
||||
cannot catch up with the target, so something *may be* wrong. Then, to be on the
|
||||
safe side, the system will he halt.
|
||||
|
||||
Bear in mind the count down will just start AFTER the first time the
|
||||
thermistor temperature is over the target, so you will have no problem if
|
||||
your extruder heater takes 2 minutes to hit the target on heating.
|
||||
|
||||
*/
|
||||
// If you want to enable this feature for all your extruder heaters,
|
||||
// uncomment the 2 defines below:
|
||||
|
||||
// Parameters for all extruder heaters
|
||||
//#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds
|
||||
//#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius
|
||||
|
||||
// If you want to enable this feature for your bed heater,
|
||||
// uncomment the 2 defines below:
|
||||
|
||||
// Parameters for the bed heater
|
||||
//#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds
|
||||
//#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius
|
||||
/**
|
||||
* Thermal Runaway Protection protects your printer from damage and fire if a
|
||||
* thermistor falls out or temperature sensors fail in any way.
|
||||
*
|
||||
* The issue: If a thermistor falls out or a temperature sensor fails,
|
||||
* Marlin can no longer sense the actual temperature. Since a disconnected
|
||||
* thermistor reads as a low temperature, the firmware will keep the heater on.
|
||||
*
|
||||
* The solution: Once the temperature reaches the target, start observing.
|
||||
* If the temperature stays too far below the target (hysteresis) for too long,
|
||||
* the firmware will halt as a safety precaution.
|
||||
*/
|
||||
|
||||
#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
|
||||
#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed
|
||||
|
||||
//===========================================================================
|
||||
//============================= Mechanical Settings =========================
|
||||
@ -400,17 +380,20 @@ const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic
|
||||
#define Z_MAX_POS MANUAL_Z_HOME_POS
|
||||
|
||||
//===========================================================================
|
||||
//============================= Filament Runout Sensor ======================
|
||||
//========================= Filament Runout Sensor ==========================
|
||||
//===========================================================================
|
||||
//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament
|
||||
// In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
|
||||
// It is assumed that when logic high = filament available
|
||||
// when logic low = filament ran out
|
||||
//const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned
|
||||
//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
|
||||
|
||||
#ifdef FILAMENT_RUNOUT_SENSOR
|
||||
const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned
|
||||
#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
|
||||
#define FILAMENT_RUNOUT_SCRIPT "M600"
|
||||
#endif
|
||||
|
||||
//===========================================================================
|
||||
//============================ Manual Bed Leveling ==========================
|
||||
//=========================== Manual Bed Leveling ===========================
|
||||
//===========================================================================
|
||||
|
||||
// #define MANUAL_BED_LEVELING // Add display menu option for bed leveling
|
||||
@ -431,7 +414,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic
|
||||
#endif // MESH_BED_LEVELING
|
||||
|
||||
//===========================================================================
|
||||
//============================= Bed Auto Leveling ===========================
|
||||
//============================ Bed Auto Leveling ============================
|
||||
//===========================================================================
|
||||
|
||||
//#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line)
|
||||
|
@ -14,14 +14,38 @@
|
||||
#endif
|
||||
#define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control
|
||||
|
||||
//// Heating sanity check:
|
||||
// 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.
|
||||
// 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
|
||||
//#define WATCH_TEMP_PERIOD 40000 //40 seconds
|
||||
//#define WATCH_TEMP_INCREASE 10 //Heat up at least 10 degree in 20 seconds
|
||||
/**
|
||||
* Thermal Protection parameters
|
||||
*/
|
||||
#ifdef THERMAL_PROTECTION_HOTENDS
|
||||
#define THERMAL_PROTECTION_PERIOD 40 // Seconds
|
||||
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
|
||||
|
||||
/**
|
||||
* Whenever an M104 or M109 increases the target temperature the firmware will wait for the
|
||||
* WATCH_TEMP_PERIOD to transpire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
|
||||
* degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
|
||||
* but only if the current temperature is far enough below the target for a reliable test.
|
||||
*/
|
||||
#define WATCH_TEMP_PERIOD 16 // Seconds
|
||||
#define WATCH_TEMP_INCREASE 4 // Degrees Celsius
|
||||
#endif
|
||||
|
||||
#ifdef THERMAL_PROTECTION_BED
|
||||
#define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds
|
||||
#define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Automatic Temperature:
|
||||
* The hotend target temperature is calculated by all the buffered lines of gcode.
|
||||
* The maximum buffered steps/sec of the extruder motor is called "se".
|
||||
* Start autotemp mode with M109 S<mintemp> B<maxtemp> F<factor>
|
||||
* The target temperature is set to mintemp+factor*se[steps/sec] and is limited by
|
||||
* mintemp and maxtemp. Turn this off by excuting M109 without F*
|
||||
* Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp.
|
||||
* On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
|
||||
*/
|
||||
#ifdef PIDTEMP
|
||||
// this adds an experimental additional term to the heating power, proportional to the extrusion speed.
|
||||
// if Kc is chosen well, the additional required power due to increased melting should be compensated.
|
||||
@ -377,6 +401,15 @@ const unsigned int dropsegments=5; //everything with less than this number of st
|
||||
#define MAX_CMD_SIZE 96
|
||||
#define BUFSIZE 4
|
||||
|
||||
// Bad Serial-connections can miss a received command by sending an 'ok'
|
||||
// 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
|
||||
|
||||
// @section fwretract
|
||||
|
||||
// Firmware based and LCD controlled retract
|
||||
|
@ -286,44 +286,24 @@ Here are some standard links for getting your machine calibrated:
|
||||
#define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
|
||||
|
||||
//===========================================================================
|
||||
//============================= Thermal Runaway Protection ==================
|
||||
//======================== Thermal Runaway Protection =======================
|
||||
//===========================================================================
|
||||
/*
|
||||
This is a feature to protect your printer from burn up in flames if it has
|
||||
a thermistor coming off place (this happened to a friend of mine recently and
|
||||
motivated me writing this feature).
|
||||
|
||||
The issue: If a thermistor come off, it will read a lower temperature than actual.
|
||||
The system will turn the heater on forever, burning up the filament and anything
|
||||
else around.
|
||||
|
||||
After the temperature reaches the target for the first time, this feature will
|
||||
start measuring for how long the current temperature stays below the target
|
||||
minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS).
|
||||
|
||||
If it stays longer than _PERIOD, it means the thermistor temperature
|
||||
cannot catch up with the target, so something *may be* wrong. Then, to be on the
|
||||
safe side, the system will he halt.
|
||||
|
||||
Bear in mind the count down will just start AFTER the first time the
|
||||
thermistor temperature is over the target, so you will have no problem if
|
||||
your extruder heater takes 2 minutes to hit the target on heating.
|
||||
|
||||
*/
|
||||
// If you want to enable this feature for all your extruder heaters,
|
||||
// uncomment the 2 defines below:
|
||||
|
||||
// Parameters for all extruder heaters
|
||||
//#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds
|
||||
//#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius
|
||||
|
||||
// If you want to enable this feature for your bed heater,
|
||||
// uncomment the 2 defines below:
|
||||
|
||||
// Parameters for the bed heater
|
||||
//#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds
|
||||
//#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius
|
||||
/**
|
||||
* Thermal Runaway Protection protects your printer from damage and fire if a
|
||||
* thermistor falls out or temperature sensors fail in any way.
|
||||
*
|
||||
* The issue: If a thermistor falls out or a temperature sensor fails,
|
||||
* Marlin can no longer sense the actual temperature. Since a disconnected
|
||||
* thermistor reads as a low temperature, the firmware will keep the heater on.
|
||||
*
|
||||
* The solution: Once the temperature reaches the target, start observing.
|
||||
* If the temperature stays too far below the target (hysteresis) for too long,
|
||||
* the firmware will halt as a safety precaution.
|
||||
*/
|
||||
|
||||
#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
|
||||
#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed
|
||||
|
||||
//===========================================================================
|
||||
//============================= Mechanical Settings =========================
|
||||
@ -400,17 +380,20 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
|
||||
#define Z_MAX_POS MANUAL_Z_HOME_POS
|
||||
|
||||
//===========================================================================
|
||||
//============================= Filament Runout Sensor ======================
|
||||
//========================= Filament Runout Sensor ==========================
|
||||
//===========================================================================
|
||||
//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament
|
||||
// In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
|
||||
// It is assumed that when logic high = filament available
|
||||
// when logic low = filament ran out
|
||||
//const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned
|
||||
//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
|
||||
|
||||
#ifdef FILAMENT_RUNOUT_SENSOR
|
||||
const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned
|
||||
#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
|
||||
#define FILAMENT_RUNOUT_SCRIPT "M600"
|
||||
#endif
|
||||
|
||||
//===========================================================================
|
||||
//============================ Manual Bed Leveling ==========================
|
||||
//=========================== Manual Bed Leveling ===========================
|
||||
//===========================================================================
|
||||
|
||||
// #define MANUAL_BED_LEVELING // Add display menu option for bed leveling
|
||||
@ -431,7 +414,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
|
||||
#endif // MESH_BED_LEVELING
|
||||
|
||||
//===========================================================================
|
||||
//============================= Bed Auto Leveling ===========================
|
||||
//============================ Bed Auto Leveling ============================
|
||||
//===========================================================================
|
||||
|
||||
#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line)
|
||||
|
@ -14,14 +14,38 @@
|
||||
#endif
|
||||
#define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control
|
||||
|
||||
//// Heating sanity check:
|
||||
// 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.
|
||||
// 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
|
||||
//#define WATCH_TEMP_PERIOD 40000 //40 seconds
|
||||
//#define WATCH_TEMP_INCREASE 10 //Heat up at least 10 degree in 20 seconds
|
||||
/**
|
||||
* Thermal Protection parameters
|
||||
*/
|
||||
#ifdef THERMAL_PROTECTION_HOTENDS
|
||||
#define THERMAL_PROTECTION_PERIOD 40 // Seconds
|
||||
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
|
||||
|
||||
/**
|
||||
* Whenever an M104 or M109 increases the target temperature the firmware will wait for the
|
||||
* WATCH_TEMP_PERIOD to transpire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
|
||||
* degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
|
||||
* but only if the current temperature is far enough below the target for a reliable test.
|
||||
*/
|
||||
#define WATCH_TEMP_PERIOD 16 // Seconds
|
||||
#define WATCH_TEMP_INCREASE 4 // Degrees Celsius
|
||||
#endif
|
||||
|
||||
#ifdef THERMAL_PROTECTION_BED
|
||||
#define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds
|
||||
#define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Automatic Temperature:
|
||||
* The hotend target temperature is calculated by all the buffered lines of gcode.
|
||||
* The maximum buffered steps/sec of the extruder motor is called "se".
|
||||
* Start autotemp mode with M109 S<mintemp> B<maxtemp> F<factor>
|
||||
* The target temperature is set to mintemp+factor*se[steps/sec] and is limited by
|
||||
* mintemp and maxtemp. Turn this off by excuting M109 without F*
|
||||
* Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp.
|
||||
* On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
|
||||
*/
|
||||
#ifdef PIDTEMP
|
||||
// this adds an experimental additional term to the heating power, proportional to the extrusion speed.
|
||||
// if Kc is chosen well, the additional required power due to increased melting should be compensated.
|
||||
@ -376,6 +400,15 @@ const unsigned int dropsegments=5; //everything with less than this number of st
|
||||
#define MAX_CMD_SIZE 96
|
||||
#define BUFSIZE 4
|
||||
|
||||
// Bad Serial-connections can miss a received command by sending an 'ok'
|
||||
// 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
|
||||
|
||||
// @section fwretract
|
||||
|
||||
// Firmware based and LCD controlled retract
|
||||
|
@ -256,44 +256,24 @@ Here are some standard links for getting your machine calibrated:
|
||||
#define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
|
||||
|
||||
//===========================================================================
|
||||
//============================= Thermal Runaway Protection ==================
|
||||
//======================== Thermal Runaway Protection =======================
|
||||
//===========================================================================
|
||||
/*
|
||||
This is a feature to protect your printer from burn up in flames if it has
|
||||
a thermistor coming off place (this happened to a friend of mine recently and
|
||||
motivated me writing this feature).
|
||||
|
||||
The issue: If a thermistor come off, it will read a lower temperature than actual.
|
||||
The system will turn the heater on forever, burning up the filament and anything
|
||||
else around.
|
||||
|
||||
After the temperature reaches the target for the first time, this feature will
|
||||
start measuring for how long the current temperature stays below the target
|
||||
minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS).
|
||||
|
||||
If it stays longer than _PERIOD, it means the thermistor temperature
|
||||
cannot catch up with the target, so something *may be* wrong. Then, to be on the
|
||||
safe side, the system will he halt.
|
||||
|
||||
Bear in mind the count down will just start AFTER the first time the
|
||||
thermistor temperature is over the target, so you will have no problem if
|
||||
your extruder heater takes 2 minutes to hit the target on heating.
|
||||
|
||||
*/
|
||||
// If you want to enable this feature for all your extruder heaters,
|
||||
// uncomment the 2 defines below:
|
||||
|
||||
// Parameters for all extruder heaters
|
||||
//#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds
|
||||
//#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius
|
||||
|
||||
// If you want to enable this feature for your bed heater,
|
||||
// uncomment the 2 defines below:
|
||||
|
||||
// Parameters for the bed heater
|
||||
//#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds
|
||||
//#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius
|
||||
/**
|
||||
* Thermal Runaway Protection protects your printer from damage and fire if a
|
||||
* thermistor falls out or temperature sensors fail in any way.
|
||||
*
|
||||
* The issue: If a thermistor falls out or a temperature sensor fails,
|
||||
* Marlin can no longer sense the actual temperature. Since a disconnected
|
||||
* thermistor reads as a low temperature, the firmware will keep the heater on.
|
||||
*
|
||||
* The solution: Once the temperature reaches the target, start observing.
|
||||
* If the temperature stays too far below the target (hysteresis) for too long,
|
||||
* the firmware will halt as a safety precaution.
|
||||
*/
|
||||
|
||||
#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
|
||||
#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed
|
||||
|
||||
//===========================================================================
|
||||
//============================= Mechanical Settings =========================
|
||||
@ -347,6 +327,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
|
||||
#define INVERT_X_DIR false
|
||||
#define INVERT_Y_DIR false
|
||||
#define INVERT_Z_DIR false
|
||||
|
||||
#define INVERT_E0_DIR true
|
||||
#define INVERT_E1_DIR false
|
||||
#define INVERT_E2_DIR false
|
||||
@ -370,17 +351,19 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
|
||||
#define Z_MAX_POS 86
|
||||
|
||||
//===========================================================================
|
||||
//============================= Filament Runout Sensor ======================
|
||||
//========================= Filament Runout Sensor ==========================
|
||||
//===========================================================================
|
||||
//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament
|
||||
// In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
|
||||
// It is assumed that when logic high = filament available
|
||||
// when logic low = filament ran out
|
||||
//const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned
|
||||
//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
|
||||
|
||||
#ifdef FILAMENT_RUNOUT_SENSOR
|
||||
const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned
|
||||
#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
|
||||
#define FILAMENT_RUNOUT_SCRIPT "M600"
|
||||
#endif
|
||||
//===========================================================================
|
||||
//============================ Manual Bed Leveling ==========================
|
||||
//=========================== Manual Bed Leveling ===========================
|
||||
//===========================================================================
|
||||
|
||||
// #define MANUAL_BED_LEVELING // Add display menu option for bed leveling
|
||||
@ -401,7 +384,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
|
||||
#endif // MESH_BED_LEVELING
|
||||
|
||||
//===========================================================================
|
||||
//============================= Bed Auto Leveling ===========================
|
||||
//============================ Bed Auto Leveling ============================
|
||||
//===========================================================================
|
||||
|
||||
//#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line)
|
||||
|
@ -14,14 +14,38 @@
|
||||
#endif
|
||||
#define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control
|
||||
|
||||
//// Heating sanity check:
|
||||
// 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.
|
||||
// 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
|
||||
//#define WATCH_TEMP_PERIOD 40000 //40 seconds
|
||||
//#define WATCH_TEMP_INCREASE 10 //Heat up at least 10 degree in 20 seconds
|
||||
/**
|
||||
* Thermal Protection parameters
|
||||
*/
|
||||
#ifdef THERMAL_PROTECTION_HOTENDS
|
||||
#define THERMAL_PROTECTION_PERIOD 40 // Seconds
|
||||
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
|
||||
|
||||
/**
|
||||
* Whenever an M104 or M109 increases the target temperature the firmware will wait for the
|
||||
* WATCH_TEMP_PERIOD to transpire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
|
||||
* degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
|
||||
* but only if the current temperature is far enough below the target for a reliable test.
|
||||
*/
|
||||
#define WATCH_TEMP_PERIOD 16 // Seconds
|
||||
#define WATCH_TEMP_INCREASE 4 // Degrees Celsius
|
||||
#endif
|
||||
|
||||
#ifdef THERMAL_PROTECTION_BED
|
||||
#define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds
|
||||
#define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Automatic Temperature:
|
||||
* The hotend target temperature is calculated by all the buffered lines of gcode.
|
||||
* The maximum buffered steps/sec of the extruder motor is called "se".
|
||||
* Start autotemp mode with M109 S<mintemp> B<maxtemp> F<factor>
|
||||
* The target temperature is set to mintemp+factor*se[steps/sec] and is limited by
|
||||
* mintemp and maxtemp. Turn this off by excuting M109 without F*
|
||||
* Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp.
|
||||
* On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
|
||||
*/
|
||||
#ifdef PIDTEMP
|
||||
// this adds an experimental additional term to the heating power, proportional to the extrusion speed.
|
||||
// if Kc is chosen well, the additional required power due to increased melting should be compensated.
|
||||
@ -376,6 +400,15 @@ const unsigned int dropsegments=5; //everything with less than this number of st
|
||||
#define MAX_CMD_SIZE 96
|
||||
#define BUFSIZE 4
|
||||
|
||||
// Bad Serial-connections can miss a received command by sending an 'ok'
|
||||
// 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
|
||||
|
||||
// @section fwretract
|
||||
|
||||
// Firmware based and LCD controlled retract
|
||||
|
@ -258,44 +258,24 @@ Here are some standard links for getting your machine calibrated:
|
||||
#define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
|
||||
|
||||
//===========================================================================
|
||||
//============================= Thermal Runaway Protection ==================
|
||||
//======================== Thermal Runaway Protection =======================
|
||||
//===========================================================================
|
||||
/*
|
||||
This is a feature to protect your printer from burn up in flames if it has
|
||||
a thermistor coming off place (this happened to a friend of mine recently and
|
||||
motivated me writing this feature).
|
||||
|
||||
The issue: If a thermistor come off, it will read a lower temperature than actual.
|
||||
The system will turn the heater on forever, burning up the filament and anything
|
||||
else around.
|
||||
|
||||
After the temperature reaches the target for the first time, this feature will
|
||||
start measuring for how long the current temperature stays below the target
|
||||
minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS).
|
||||
|
||||
If it stays longer than _PERIOD, it means the thermistor temperature
|
||||
cannot catch up with the target, so something *may be* wrong. Then, to be on the
|
||||
safe side, the system will he halt.
|
||||
|
||||
Bear in mind the count down will just start AFTER the first time the
|
||||
thermistor temperature is over the target, so you will have no problem if
|
||||
your extruder heater takes 2 minutes to hit the target on heating.
|
||||
|
||||
*/
|
||||
// If you want to enable this feature for all your extruder heaters,
|
||||
// uncomment the 2 defines below:
|
||||
|
||||
// Parameters for all extruder heaters
|
||||
//#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds
|
||||
//#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius
|
||||
|
||||
// If you want to enable this feature for your bed heater,
|
||||
// uncomment the 2 defines below:
|
||||
|
||||
// Parameters for the bed heater
|
||||
//#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds
|
||||
//#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius
|
||||
/**
|
||||
* Thermal Runaway Protection protects your printer from damage and fire if a
|
||||
* thermistor falls out or temperature sensors fail in any way.
|
||||
*
|
||||
* The issue: If a thermistor falls out or a temperature sensor fails,
|
||||
* Marlin can no longer sense the actual temperature. Since a disconnected
|
||||
* thermistor reads as a low temperature, the firmware will keep the heater on.
|
||||
*
|
||||
* The solution: Once the temperature reaches the target, start observing.
|
||||
* If the temperature stays too far below the target (hysteresis) for too long,
|
||||
* the firmware will halt as a safety precaution.
|
||||
*/
|
||||
|
||||
#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
|
||||
#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed
|
||||
|
||||
//===========================================================================
|
||||
//============================= Mechanical Settings =========================
|
||||
@ -372,17 +352,20 @@ const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic
|
||||
#define Z_MAX_POS 120
|
||||
|
||||
//===========================================================================
|
||||
//============================= Filament Runout Sensor ======================
|
||||
//========================= Filament Runout Sensor ==========================
|
||||
//===========================================================================
|
||||
//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament
|
||||
// In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
|
||||
// It is assumed that when logic high = filament available
|
||||
// when logic low = filament ran out
|
||||
//const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned
|
||||
//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
|
||||
#ifdef FILAMENT_RUNOUT_SENSOR
|
||||
const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned
|
||||
#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
|
||||
#define FILAMENT_RUNOUT_SCRIPT "M600"
|
||||
#endif
|
||||
|
||||
//===========================================================================
|
||||
//============================ Manual Bed Leveling ==========================
|
||||
//=========================== Manual Bed Leveling ===========================
|
||||
//===========================================================================
|
||||
|
||||
// #define MANUAL_BED_LEVELING // Add display menu option for bed leveling
|
||||
@ -403,7 +386,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic
|
||||
#endif // MESH_BED_LEVELING
|
||||
|
||||
//===========================================================================
|
||||
//============================= Bed Auto Leveling ===========================
|
||||
//============================ Bed Auto Leveling ============================
|
||||
//===========================================================================
|
||||
|
||||
//#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line)
|
||||
|
@ -14,14 +14,38 @@
|
||||
#endif
|
||||
#define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control
|
||||
|
||||
//// Heating sanity check:
|
||||
// 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.
|
||||
// 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
|
||||
//#define WATCH_TEMP_PERIOD 40000 //40 seconds
|
||||
//#define WATCH_TEMP_INCREASE 10 //Heat up at least 10 degree in 20 seconds
|
||||
/**
|
||||
* Thermal Protection parameters
|
||||
*/
|
||||
#ifdef THERMAL_PROTECTION_HOTENDS
|
||||
#define THERMAL_PROTECTION_PERIOD 40 // Seconds
|
||||
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
|
||||
|
||||
/**
|
||||
* Whenever an M104 or M109 increases the target temperature the firmware will wait for the
|
||||
* WATCH_TEMP_PERIOD to transpire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
|
||||
* degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
|
||||
* but only if the current temperature is far enough below the target for a reliable test.
|
||||
*/
|
||||
#define WATCH_TEMP_PERIOD 16 // Seconds
|
||||
#define WATCH_TEMP_INCREASE 4 // Degrees Celsius
|
||||
#endif
|
||||
|
||||
#ifdef THERMAL_PROTECTION_BED
|
||||
#define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds
|
||||
#define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Automatic Temperature:
|
||||
* The hotend target temperature is calculated by all the buffered lines of gcode.
|
||||
* The maximum buffered steps/sec of the extruder motor is called "se".
|
||||
* Start autotemp mode with M109 S<mintemp> B<maxtemp> F<factor>
|
||||
* The target temperature is set to mintemp+factor*se[steps/sec] and is limited by
|
||||
* mintemp and maxtemp. Turn this off by excuting M109 without F*
|
||||
* Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp.
|
||||
* On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
|
||||
*/
|
||||
#ifdef PIDTEMP
|
||||
// this adds an experimental additional term to the heating power, proportional to the extrusion speed.
|
||||
// if Kc is chosen well, the additional required power due to increased melting should be compensated.
|
||||
@ -376,6 +400,15 @@ const unsigned int dropsegments=5; //everything with less than this number of st
|
||||
#define MAX_CMD_SIZE 96
|
||||
#define BUFSIZE 4
|
||||
|
||||
// Bad Serial-connections can miss a received command by sending an 'ok'
|
||||
// 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
|
||||
|
||||
// @section fwretract
|
||||
|
||||
// Firmware based and LCD controlled retract
|
||||
|
@ -123,22 +123,24 @@
|
||||
#define MSG_FREE_MEMORY " Free Memory: "
|
||||
#define MSG_PLANNER_BUFFER_BYTES " PlannerBufferBytes: "
|
||||
#define MSG_OK "ok"
|
||||
#define MSG_WAIT "wait"
|
||||
#define MSG_FILE_SAVED "Done saving file."
|
||||
#define MSG_ERR_LINE_NO1 "Line Number out of sequence. Expected: "
|
||||
#define MSG_ERR_LINE_NO2 " Got: "
|
||||
#define MSG_ERR_LINE_NO "Line Number is not Last Line Number+1, Last Line: "
|
||||
#define MSG_ERR_CHECKSUM_MISMATCH "checksum mismatch, Last Line: "
|
||||
#define MSG_ERR_NO_CHECKSUM "No Checksum with line number, Last Line: "
|
||||
#define MSG_ERR_NO_LINENUMBER_WITH_CHECKSUM "No Line Number with checksum, Last Line: "
|
||||
#define MSG_FILE_PRINTED "Done printing file"
|
||||
#define MSG_BEGIN_FILE_LIST "Begin file list"
|
||||
#define MSG_END_FILE_LIST "End file list"
|
||||
#define MSG_M104_INVALID_EXTRUDER "M104 Invalid extruder "
|
||||
#define MSG_M105_INVALID_EXTRUDER "M105 Invalid extruder "
|
||||
#define MSG_M200_INVALID_EXTRUDER "M200 Invalid extruder "
|
||||
#define MSG_M218_INVALID_EXTRUDER "M218 Invalid extruder "
|
||||
#define MSG_M221_INVALID_EXTRUDER "M221 Invalid extruder "
|
||||
#define MSG_INVALID_EXTRUDER "Invalid extruder"
|
||||
#define MSG_INVALID_SOLENOID "Invalid solenoid"
|
||||
#define MSG_M104_INVALID_EXTRUDER "M104 " MSG_INVALID_EXTRUDER " "
|
||||
#define MSG_M105_INVALID_EXTRUDER "M105 " MSG_INVALID_EXTRUDER " "
|
||||
#define MSG_M109_INVALID_EXTRUDER "M109 " MSG_INVALID_EXTRUDER " "
|
||||
#define MSG_M200_INVALID_EXTRUDER "M200 " MSG_INVALID_EXTRUDER " "
|
||||
#define MSG_M218_INVALID_EXTRUDER "M218 " MSG_INVALID_EXTRUDER " "
|
||||
#define MSG_M221_INVALID_EXTRUDER "M221 " MSG_INVALID_EXTRUDER " "
|
||||
#define MSG_ERR_NO_THERMISTORS "No thermistors - no temperature"
|
||||
#define MSG_M109_INVALID_EXTRUDER "M109 Invalid extruder "
|
||||
#define MSG_HEATING "Heating..."
|
||||
#define MSG_HEATING_COMPLETE "Heating done."
|
||||
#define MSG_BED_HEATING "Bed Heating."
|
||||
@ -150,8 +152,6 @@
|
||||
#define MSG_RESEND "Resend: "
|
||||
#define MSG_UNKNOWN_COMMAND "Unknown command: \""
|
||||
#define MSG_ACTIVE_EXTRUDER "Active Extruder: "
|
||||
#define MSG_INVALID_EXTRUDER "Invalid extruder"
|
||||
#define MSG_INVALID_SOLENOID "Invalid solenoid"
|
||||
#define MSG_X_MIN "x_min: "
|
||||
#define MSG_X_MAX "x_max: "
|
||||
#define MSG_Y_MIN "y_min: "
|
||||
@ -163,6 +163,7 @@
|
||||
#define MSG_ERR_MATERIAL_INDEX "M145 S<index> out of range (0-1)"
|
||||
#define MSG_ERR_M421_REQUIRES_XYZ "M421 requires XYZ parameters"
|
||||
#define MSG_ERR_MESH_INDEX_OOB "Mesh XY index is out of bounds"
|
||||
#define MSG_ERR_M428_TOO_FAR "Too far from reference point"
|
||||
#define MSG_M119_REPORT "Reporting endstop status"
|
||||
#define MSG_ENDSTOP_HIT "TRIGGERED"
|
||||
#define MSG_ENDSTOP_OPEN "open"
|
||||
|
@ -39,16 +39,17 @@
|
||||
#define MSG_EXTRUDE "Extrusion"
|
||||
#define MSG_RETRACT "Retraction"
|
||||
#define MSG_MOVE_AXIS "Deplacer un axe"
|
||||
#define MSG_MOVE_X "Move X"
|
||||
#define MSG_MOVE_Y "Move Y"
|
||||
#define MSG_MOVE_Z "Move Z"
|
||||
#define MSG_MOVE_X "Depl. X"
|
||||
#define MSG_MOVE_Y "Depl. Y"
|
||||
#define MSG_MOVE_Z "Depl. Z"
|
||||
#define MSG_MOVE_E "Extruder"
|
||||
#define MSG_MOVE_01MM "Move 0.1mm"
|
||||
#define MSG_MOVE_1MM "Move 1mm"
|
||||
#define MSG_MOVE_10MM "Move 10mm"
|
||||
#define MSG_MOVE_01MM "Depl. 0.1mm"
|
||||
#define MSG_MOVE_1MM "Depl. 1mm"
|
||||
#define MSG_MOVE_10MM "Depl. 10mm"
|
||||
#define MSG_SPEED " Vitesse"
|
||||
#define MSG_NOZZLE "Buse"
|
||||
#define MSG_BED "Plateau"
|
||||
#define MSG_LEVEL_BED "Regl. Niv. Plateau"
|
||||
#define MSG_FAN_SPEED "Vite. ventilateur"
|
||||
#define MSG_FLOW "Flux"
|
||||
#define MSG_CONTROL "Controler"
|
||||
@ -102,7 +103,7 @@
|
||||
#define MSG_DWELL "Repos..."
|
||||
#define MSG_USERWAIT "Atten. de l'util."
|
||||
#define MSG_RESUMING "Repri. de l'impr."
|
||||
#define MSG_PRINT_ABORTED "Print aborted"
|
||||
#define MSG_PRINT_ABORTED "Impr. Annulee"
|
||||
#define MSG_NO_MOVE "Aucun mouvement."
|
||||
#define MSG_KILLED "MORT."
|
||||
#define MSG_STOPPED "STOPPE."
|
||||
|
@ -1,145 +0,0 @@
|
||||
/*
|
||||
motion_control.c - high level interface for issuing motion commands
|
||||
Part of Grbl
|
||||
|
||||
Copyright (c) 2009-2011 Simen Svale Skogsrud
|
||||
Copyright (c) 2011 Sungeun K. Jeon
|
||||
|
||||
Grbl is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Grbl is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Grbl. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "Marlin.h"
|
||||
#include "stepper.h"
|
||||
#include "planner.h"
|
||||
|
||||
// The arc is approximated by generating a huge number of tiny, linear segments. The length of each
|
||||
// segment is configured in settings.mm_per_arc_segment.
|
||||
void mc_arc(float *position, float *target, float *offset, uint8_t axis_0, uint8_t axis_1,
|
||||
uint8_t axis_linear, float feed_rate, float radius, uint8_t isclockwise, uint8_t extruder)
|
||||
{
|
||||
// int acceleration_manager_was_enabled = plan_is_acceleration_manager_enabled();
|
||||
// plan_set_acceleration_manager_enabled(false); // disable acceleration management for the duration of the arc
|
||||
float center_axis0 = position[axis_0] + offset[axis_0];
|
||||
float center_axis1 = position[axis_1] + offset[axis_1];
|
||||
float linear_travel = target[axis_linear] - position[axis_linear];
|
||||
float extruder_travel = target[E_AXIS] - position[E_AXIS];
|
||||
float r_axis0 = -offset[axis_0]; // Radius vector from center to current location
|
||||
float r_axis1 = -offset[axis_1];
|
||||
float rt_axis0 = target[axis_0] - center_axis0;
|
||||
float rt_axis1 = target[axis_1] - center_axis1;
|
||||
|
||||
// CCW angle between position and target from circle center. Only one atan2() trig computation required.
|
||||
float angular_travel = atan2(r_axis0*rt_axis1-r_axis1*rt_axis0, r_axis0*rt_axis0+r_axis1*rt_axis1);
|
||||
if (angular_travel < 0) { angular_travel += 2*M_PI; }
|
||||
if (isclockwise) { angular_travel -= 2*M_PI; }
|
||||
|
||||
//20141002:full circle for G03 did not work, e.g. G03 X80 Y80 I20 J0 F2000 is giving an Angle of zero so head is not moving
|
||||
//to compensate when start pos = target pos && angle is zero -> angle = 2Pi
|
||||
if (position[axis_0] == target[axis_0] && position[axis_1] == target[axis_1] && angular_travel == 0)
|
||||
{
|
||||
angular_travel += 2*M_PI;
|
||||
}
|
||||
//end fix G03
|
||||
|
||||
float millimeters_of_travel = hypot(angular_travel*radius, fabs(linear_travel));
|
||||
if (millimeters_of_travel < 0.001) { return; }
|
||||
uint16_t segments = floor(millimeters_of_travel/MM_PER_ARC_SEGMENT);
|
||||
if(segments == 0) segments = 1;
|
||||
|
||||
/*
|
||||
// Multiply inverse feed_rate to compensate for the fact that this movement is approximated
|
||||
// by a number of discrete segments. The inverse feed_rate should be correct for the sum of
|
||||
// all segments.
|
||||
if (invert_feed_rate) { feed_rate *= segments; }
|
||||
*/
|
||||
float theta_per_segment = angular_travel/segments;
|
||||
float linear_per_segment = linear_travel/segments;
|
||||
float extruder_per_segment = extruder_travel/segments;
|
||||
|
||||
/* Vector rotation by transformation matrix: r is the original vector, r_T is the rotated vector,
|
||||
and phi is the angle of rotation. Based on the solution approach by Jens Geisler.
|
||||
r_T = [cos(phi) -sin(phi);
|
||||
sin(phi) cos(phi] * r ;
|
||||
|
||||
For arc generation, the center of the circle is the axis of rotation and the radius vector is
|
||||
defined from the circle center to the initial position. Each line segment is formed by successive
|
||||
vector rotations. This requires only two cos() and sin() computations to form the rotation
|
||||
matrix for the duration of the entire arc. Error may accumulate from numerical round-off, since
|
||||
all double numbers are single precision on the Arduino. (True double precision will not have
|
||||
round off issues for CNC applications.) Single precision error can accumulate to be greater than
|
||||
tool precision in some cases. Therefore, arc path correction is implemented.
|
||||
|
||||
Small angle approximation may be used to reduce computation overhead further. This approximation
|
||||
holds for everything, but very small circles and large mm_per_arc_segment values. In other words,
|
||||
theta_per_segment would need to be greater than 0.1 rad and N_ARC_CORRECTION would need to be large
|
||||
to cause an appreciable drift error. N_ARC_CORRECTION~=25 is more than small enough to correct for
|
||||
numerical drift error. N_ARC_CORRECTION may be on the order a hundred(s) before error becomes an
|
||||
issue for CNC machines with the single precision Arduino calculations.
|
||||
|
||||
This approximation also allows mc_arc to immediately insert a line segment into the planner
|
||||
without the initial overhead of computing cos() or sin(). By the time the arc needs to be applied
|
||||
a correction, the planner should have caught up to the lag caused by the initial mc_arc overhead.
|
||||
This is important when there are successive arc motions.
|
||||
*/
|
||||
// Vector rotation matrix values
|
||||
float cos_T = 1-0.5*theta_per_segment*theta_per_segment; // Small angle approximation
|
||||
float sin_T = theta_per_segment;
|
||||
|
||||
float arc_target[4];
|
||||
float sin_Ti;
|
||||
float cos_Ti;
|
||||
float r_axisi;
|
||||
uint16_t i;
|
||||
int8_t count = 0;
|
||||
|
||||
// Initialize the linear axis
|
||||
arc_target[axis_linear] = position[axis_linear];
|
||||
|
||||
// Initialize the extruder axis
|
||||
arc_target[E_AXIS] = position[E_AXIS];
|
||||
|
||||
for (i = 1; i<segments; i++) { // Increment (segments-1)
|
||||
|
||||
if (count < N_ARC_CORRECTION) {
|
||||
// Apply vector rotation matrix
|
||||
r_axisi = r_axis0*sin_T + r_axis1*cos_T;
|
||||
r_axis0 = r_axis0*cos_T - r_axis1*sin_T;
|
||||
r_axis1 = r_axisi;
|
||||
count++;
|
||||
} else {
|
||||
// Arc correction to radius vector. Computed only every N_ARC_CORRECTION increments.
|
||||
// Compute exact location by applying transformation matrix from initial radius vector(=-offset).
|
||||
cos_Ti = cos(i*theta_per_segment);
|
||||
sin_Ti = sin(i*theta_per_segment);
|
||||
r_axis0 = -offset[axis_0]*cos_Ti + offset[axis_1]*sin_Ti;
|
||||
r_axis1 = -offset[axis_0]*sin_Ti - offset[axis_1]*cos_Ti;
|
||||
count = 0;
|
||||
}
|
||||
|
||||
// Update arc_target location
|
||||
arc_target[axis_0] = center_axis0 + r_axis0;
|
||||
arc_target[axis_1] = center_axis1 + r_axis1;
|
||||
arc_target[axis_linear] += linear_per_segment;
|
||||
arc_target[E_AXIS] += extruder_per_segment;
|
||||
|
||||
clamp_to_software_endstops(arc_target);
|
||||
plan_buffer_line(arc_target[X_AXIS], arc_target[Y_AXIS], arc_target[Z_AXIS], arc_target[E_AXIS], feed_rate, extruder);
|
||||
|
||||
}
|
||||
// Ensure last segment arrives at target location.
|
||||
plan_buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], feed_rate, extruder);
|
||||
|
||||
// plan_set_acceleration_manager_enabled(acceleration_manager_was_enabled);
|
||||
}
|
||||
|
@ -1,32 +0,0 @@
|
||||
/*
|
||||
motion_control.h - high level interface for issuing motion commands
|
||||
Part of Grbl
|
||||
|
||||
Copyright (c) 2009-2011 Simen Svale Skogsrud
|
||||
Copyright (c) 2011 Sungeun K. Jeon
|
||||
|
||||
Grbl is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Grbl is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Grbl. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef motion_control_h
|
||||
#define motion_control_h
|
||||
|
||||
// Execute an arc in offset mode format. position == current xyz, target == target xyz,
|
||||
// offset == offset from current xyz, axis_XXX defines circle plane in tool space, axis_linear is
|
||||
// the direction of helical travel, radius == circle radius, isclockwise boolean. Used
|
||||
// for vector transformation direction.
|
||||
void mc_arc(float *position, float *target, float *offset, unsigned char axis_0, unsigned char axis_1,
|
||||
unsigned char axis_linear, float feed_rate, float radius, unsigned char isclockwise, uint8_t extruder);
|
||||
|
||||
#endif
|
@ -34,7 +34,7 @@
|
||||
#include "pins_SETHI.h"
|
||||
#elif MB(RAMPS_OLD)
|
||||
#include "pins_RAMPS_OLD.h"
|
||||
#elif MB(RAMPS_13_EFB) || MB(RAMPS_13_EEB) || MB(RAMPS_13_EFF) || MB(RAMPS_13_EEF)
|
||||
#elif MB(RAMPS_13_EFB) || MB(RAMPS_13_EEB) || MB(RAMPS_13_EFF) || MB(RAMPS_13_EEF) || MB(RAMPS_13_SF)
|
||||
#include "pins_RAMPS_13.h"
|
||||
#elif MB(DUEMILANOVE_328P)
|
||||
#include "pins_DUEMILANOVE_328P.h"
|
||||
@ -190,6 +190,7 @@
|
||||
#endif
|
||||
|
||||
#if defined(DISABLE_Z_PROBE_ENDSTOP) || !defined(Z_PROBE_ENDSTOP) // Allow code to compile regardless of Z_PROBE_ENDSTOP setting.
|
||||
#undef Z_PROBE_PIN
|
||||
#define Z_PROBE_PIN -1
|
||||
#endif
|
||||
|
||||
|
@ -8,6 +8,11 @@
|
||||
|
||||
#define LARGE_FLASH true
|
||||
|
||||
|
||||
#ifdef Z_PROBE_SLED
|
||||
#define SLED_PIN -1
|
||||
#endif
|
||||
|
||||
// Servo support
|
||||
#ifdef NUM_SERVOS
|
||||
#define SERVO0_PIN 46 //AUX3-6
|
||||
@ -26,19 +31,19 @@
|
||||
#define X_DIR_PIN 57
|
||||
#define X_ENABLE_PIN 59
|
||||
#define X_MIN_PIN 37
|
||||
#define X_MAX_PIN 40 // 2 // Max endstops default to disabled "-1", set to commented value to enable.
|
||||
#define X_MAX_PIN 40 // put to -1 to disable
|
||||
|
||||
#define Y_STEP_PIN 5 // A6
|
||||
#define Y_DIR_PIN 17 // A0
|
||||
#define Y_STEP_PIN 5
|
||||
#define Y_DIR_PIN 17
|
||||
#define Y_ENABLE_PIN 4
|
||||
#define Y_MIN_PIN 41
|
||||
#define Y_MAX_PIN 38 // 15
|
||||
#define Y_MAX_PIN 38 // put to -1 to disable
|
||||
|
||||
#define Z_STEP_PIN 16 // A2
|
||||
#define Z_DIR_PIN 11 // A6
|
||||
#define Z_ENABLE_PIN 3 // A1
|
||||
#define Z_STEP_PIN 16
|
||||
#define Z_DIR_PIN 11
|
||||
#define Z_ENABLE_PIN 3
|
||||
#define Z_MIN_PIN 18
|
||||
#define Z_MAX_PIN 19
|
||||
#define Z_MAX_PIN 19 // put to -1 to disable
|
||||
|
||||
#define E0_STEP_PIN 28
|
||||
#define E0_DIR_PIN 27
|
||||
|
11
Marlin/pins_MKS_BASE.h
Normal file
11
Marlin/pins_MKS_BASE.h
Normal file
@ -0,0 +1,11 @@
|
||||
/**
|
||||
* MKS BASE 1.0 – Arduino Mega2560 with RAMPS v1.4 pin assignments
|
||||
*/
|
||||
|
||||
#include "pins_RAMPS_13.h"
|
||||
|
||||
#undef FAN_PIN
|
||||
#define FAN_PIN 9 // (Sprinter config)
|
||||
|
||||
#undef HEATER_1_PIN
|
||||
#define HEATER_1_PIN 7
|
@ -48,9 +48,9 @@
|
||||
#define Z_ENABLE_PIN 10
|
||||
#define Z_STOP_PIN 2
|
||||
|
||||
#define E0_STEP_PIN 24
|
||||
#define E0_DIR_PIN 21
|
||||
#define E0_ENABLE_PIN 10
|
||||
#define E0_STEP_PIN 24
|
||||
#define E0_DIR_PIN 21
|
||||
#define E0_ENABLE_PIN 10
|
||||
|
||||
// future proofing
|
||||
#define __FS 20
|
||||
@ -58,15 +58,15 @@
|
||||
#define __GS 18
|
||||
#define __GD 13
|
||||
|
||||
#define UNUSED_PWM 14 // PWM on LEFT connector
|
||||
#define UNUSED_PWM 14 // PWM on LEFT connector
|
||||
|
||||
#define E1_STEP_PIN -1 // 21
|
||||
#define E1_DIR_PIN -1 // 20
|
||||
#define E1_ENABLE_PIN -1 // 19
|
||||
#define E1_STEP_PIN -1 // 21
|
||||
#define E1_DIR_PIN -1 // 20
|
||||
#define E1_ENABLE_PIN -1 // 19
|
||||
|
||||
#define E2_STEP_PIN -1 // 21
|
||||
#define E2_DIR_PIN -1 // 20
|
||||
#define E2_ENABLE_PIN -1 // 18
|
||||
#define E2_STEP_PIN -1 // 21
|
||||
#define E2_DIR_PIN -1 // 20
|
||||
#define E2_ENABLE_PIN -1 // 18
|
||||
|
||||
#define SDPOWER -1
|
||||
#define SDSS 11
|
||||
@ -87,5 +87,6 @@
|
||||
#define HEATER_BED_PIN 4
|
||||
#define TEMP_BED_PIN 2 // 1,2 or I2C
|
||||
|
||||
#define I2C_SCL 16
|
||||
#define I2C_SDA 17
|
||||
#define I2C_SCL 16
|
||||
#define I2C_SDA 17
|
||||
|
||||
|
@ -22,6 +22,10 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef Z_PROBE_SLED
|
||||
#define SLED_PIN -1
|
||||
#endif
|
||||
|
||||
#undef X_MS1_PIN
|
||||
#undef X_MS2_PIN
|
||||
#undef Y_MS1_PIN
|
||||
|
@ -7,6 +7,7 @@
|
||||
* RAMPS_13_EEB (Extruder, Extruder, Bed)
|
||||
* RAMPS_13_EFF (Extruder, Fan, Fan)
|
||||
* RAMPS_13_EEF (Extruder, Extruder, Fan)
|
||||
* RAMPS_13_SF (Spindle, Controller Fan)
|
||||
*
|
||||
* Other pins_MYBOARD.h files may override these defaults
|
||||
*/
|
||||
@ -81,7 +82,7 @@
|
||||
#if MB(RAMPS_13_EFF)
|
||||
#define CONTROLLERFAN_PIN -1 // Pin used for the fan to cool controller
|
||||
#endif
|
||||
#elif MB(RAMPS_13_EEF)
|
||||
#elif MB(RAMPS_13_EEF) || MB(RAMPS_13_SF)
|
||||
#define FAN_PIN 8
|
||||
#else
|
||||
#define FAN_PIN 4 // IO pin. Buffer needed
|
||||
@ -101,7 +102,7 @@
|
||||
#define HEATER_0_PIN 10 // EXTRUDER 1
|
||||
#endif
|
||||
|
||||
#if MB(RAMPS_13_EFB)
|
||||
#if MB(RAMPS_13_EFB) || MB(RAMPS_13_SF)
|
||||
#define HEATER_1_PIN -1
|
||||
#else
|
||||
#define HEATER_1_PIN 9 // EXTRUDER 2 (FAN On Sprinter)
|
||||
@ -113,7 +114,7 @@
|
||||
#define TEMP_1_PIN 15 // ANALOG NUMBERING
|
||||
#define TEMP_2_PIN -1 // ANALOG NUMBERING
|
||||
|
||||
#if MB(RAMPS_13_EFF) || MB(RAMPS_13_EEF)
|
||||
#if MB(RAMPS_13_EFF) || MB(RAMPS_13_EEF) || MB(RAMPS_13_SF)
|
||||
#define HEATER_BED_PIN -1 // NO BED
|
||||
#else
|
||||
#define HEATER_BED_PIN 8 // BED
|
||||
@ -134,6 +135,10 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef Z_PROBE_SLED
|
||||
#define SLED_PIN -1
|
||||
#endif
|
||||
|
||||
#ifdef ULTRA_LCD
|
||||
|
||||
#ifdef NEWPANEL
|
||||
|
@ -44,6 +44,10 @@
|
||||
#define FAN_PIN 4
|
||||
#endif
|
||||
|
||||
#ifdef Z_PROBE_SLED
|
||||
#define SLED_PIN -1
|
||||
#endif
|
||||
|
||||
#ifdef NUM_SERVOS
|
||||
#define SERVO0_PIN -1
|
||||
|
||||
|
@ -429,11 +429,12 @@ void check_axes_activity() {
|
||||
#ifdef FAN_KICKSTART_TIME
|
||||
static millis_t fan_kick_end;
|
||||
if (tail_fan_speed) {
|
||||
millis_t ms = millis();
|
||||
if (fan_kick_end == 0) {
|
||||
// Just starting up fan - run at full power.
|
||||
fan_kick_end = millis() + FAN_KICKSTART_TIME;
|
||||
fan_kick_end = ms + FAN_KICKSTART_TIME;
|
||||
tail_fan_speed = 255;
|
||||
} else if (fan_kick_end > millis())
|
||||
} else if (fan_kick_end > ms)
|
||||
// Fan still spinning up.
|
||||
tail_fan_speed = 255;
|
||||
} else {
|
||||
@ -959,7 +960,7 @@ float junction_deviation = 0.1;
|
||||
vector_3 position = vector_3(st_get_position_mm(X_AXIS), st_get_position_mm(Y_AXIS), st_get_position_mm(Z_AXIS));
|
||||
|
||||
//position.debug("in plan_get position");
|
||||
//plan_bed_level_matrix.debug("in plan_get bed_level");
|
||||
//plan_bed_level_matrix.debug("in plan_get_position");
|
||||
matrix_3x3 inverse = matrix_3x3::transpose(plan_bed_level_matrix);
|
||||
//inverse.debug("in plan_get inverse");
|
||||
position.apply_rotation(inverse);
|
||||
@ -981,10 +982,10 @@ float junction_deviation = 0.1;
|
||||
apply_rotation_xyz(plan_bed_level_matrix, x, y, z);
|
||||
#endif
|
||||
|
||||
float nx = position[X_AXIS] = lround(x * axis_steps_per_unit[X_AXIS]);
|
||||
float ny = position[Y_AXIS] = lround(y * axis_steps_per_unit[Y_AXIS]);
|
||||
float nz = position[Z_AXIS] = lround(z * axis_steps_per_unit[Z_AXIS]);
|
||||
float ne = position[E_AXIS] = lround(e * axis_steps_per_unit[E_AXIS]);
|
||||
float nx = position[X_AXIS] = lround(x * axis_steps_per_unit[X_AXIS]),
|
||||
ny = position[Y_AXIS] = lround(y * axis_steps_per_unit[Y_AXIS]),
|
||||
nz = position[Z_AXIS] = lround(z * axis_steps_per_unit[Z_AXIS]),
|
||||
ne = position[E_AXIS] = lround(e * axis_steps_per_unit[E_AXIS]);
|
||||
st_set_position(nx, ny, nz, ne);
|
||||
previous_nominal_speed = 0.0; // Resets planner junction speeds. Assumes start from rest.
|
||||
|
||||
|
@ -48,7 +48,7 @@
|
||||
#include <avr/interrupt.h>
|
||||
#include <Arduino.h>
|
||||
|
||||
#include "Servo.h"
|
||||
#include "servo.h"
|
||||
|
||||
#define usToTicks(_us) (( clockCyclesPerMicrosecond()* _us) / 8) // converts microseconds to tick (assumes prescale of 8) // 12 Aug 2009
|
||||
#define ticksToUs(_ticks) (( (unsigned)_ticks * 8)/ clockCyclesPerMicrosecond() ) // converts from ticks back to microseconds
|
@ -1,22 +1,23 @@
|
||||
/*
|
||||
stepper.c - stepper motor driver: executes motion plans using stepper motors
|
||||
Part of Grbl
|
||||
|
||||
Copyright (c) 2009-2011 Simen Svale Skogsrud
|
||||
|
||||
Grbl is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Grbl is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Grbl. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/**
|
||||
* stepper.cpp - stepper motor driver: executes motion plans using stepper motors
|
||||
* Marlin Firmware
|
||||
*
|
||||
* Derived from Grbl
|
||||
* Copyright (c) 2009-2011 Simen Svale Skogsrud
|
||||
*
|
||||
* Grbl is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Grbl is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Grbl. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* The timer calculations of this module informed by the 'RepRap cartesian firmware' by Zack Smith
|
||||
and Philipp Tiefenbacher. */
|
||||
@ -45,7 +46,7 @@ block_t *current_block; // A pointer to the block currently being traced
|
||||
//static makes it impossible to be called from outside of this file by extern.!
|
||||
|
||||
// Variables used by The Stepper Driver Interrupt
|
||||
static unsigned char out_bits; // The next stepping-bits to be output
|
||||
static unsigned char out_bits = 0; // The next stepping-bits to be output
|
||||
static unsigned int cleaning_buffer_counter;
|
||||
|
||||
#ifdef Z_DUAL_ENDSTOPS
|
||||
@ -73,10 +74,7 @@ static unsigned short step_loops_nominal;
|
||||
|
||||
volatile long endstops_trigsteps[3] = { 0 };
|
||||
volatile long endstops_stepsTotal, endstops_stepsDone;
|
||||
static volatile bool endstop_x_hit = false;
|
||||
static volatile bool endstop_y_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.
|
||||
static volatile char endstop_hit_bits = 0; // use X_MIN, Y_MIN, Z_MIN and Z_PROBE as BIT value
|
||||
|
||||
#ifdef ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
|
||||
bool abort_on_endstop_hit = false;
|
||||
@ -264,27 +262,27 @@ volatile signed char count_direction[NUM_AXIS] = { 1, 1, 1, 1 };
|
||||
#define DISABLE_STEPPER_DRIVER_INTERRUPT() TIMSK1 &= ~BIT(OCIE1A)
|
||||
|
||||
void endstops_hit_on_purpose() {
|
||||
endstop_x_hit = endstop_y_hit = endstop_z_hit = endstop_z_probe_hit = false; // #ifdef endstop_z_probe_hit = to save space if needed.
|
||||
endstop_hit_bits = 0;
|
||||
}
|
||||
|
||||
void checkHitEndstops() {
|
||||
if (endstop_x_hit || endstop_y_hit || endstop_z_hit || endstop_z_probe_hit) { // #ifdef || endstop_z_probe_hit to save space if needed.
|
||||
if (endstop_hit_bits) { // #ifdef || endstop_z_probe_hit to save space if needed.
|
||||
SERIAL_ECHO_START;
|
||||
SERIAL_ECHOPGM(MSG_ENDSTOPS_HIT);
|
||||
if (endstop_x_hit) {
|
||||
if (endstop_hit_bits & BIT(X_MIN)) {
|
||||
SERIAL_ECHOPAIR(" X:", (float)endstops_trigsteps[X_AXIS] / axis_steps_per_unit[X_AXIS]);
|
||||
LCD_MESSAGEPGM(MSG_ENDSTOPS_HIT "X");
|
||||
}
|
||||
if (endstop_y_hit) {
|
||||
if (endstop_hit_bits & BIT(Y_MIN)) {
|
||||
SERIAL_ECHOPAIR(" Y:", (float)endstops_trigsteps[Y_AXIS] / axis_steps_per_unit[Y_AXIS]);
|
||||
LCD_MESSAGEPGM(MSG_ENDSTOPS_HIT "Y");
|
||||
}
|
||||
if (endstop_z_hit) {
|
||||
if (endstop_hit_bits & BIT(Z_MIN)) {
|
||||
SERIAL_ECHOPAIR(" Z:", (float)endstops_trigsteps[Z_AXIS] / axis_steps_per_unit[Z_AXIS]);
|
||||
LCD_MESSAGEPGM(MSG_ENDSTOPS_HIT "Z");
|
||||
}
|
||||
#ifdef Z_PROBE_ENDSTOP
|
||||
if (endstop_z_probe_hit) {
|
||||
if (endstop_hit_bits & BIT(Z_PROBE)) {
|
||||
SERIAL_ECHOPAIR(" Z_PROBE:", (float)endstops_trigsteps[Z_AXIS] / axis_steps_per_unit[Z_AXIS]);
|
||||
LCD_MESSAGEPGM(MSG_ENDSTOPS_HIT "ZP");
|
||||
}
|
||||
@ -366,9 +364,58 @@ FORCE_INLINE unsigned short calc_timer(unsigned short step_rate) {
|
||||
return timer;
|
||||
}
|
||||
|
||||
// set the stepper direction of each axis
|
||||
void set_stepper_direction() {
|
||||
|
||||
// Set the direction bits (X_AXIS=A_AXIS and Y_AXIS=B_AXIS for COREXY)
|
||||
if (TEST(out_bits, X_AXIS)) {
|
||||
X_APPLY_DIR(INVERT_X_DIR,0);
|
||||
count_direction[X_AXIS] = -1;
|
||||
}
|
||||
else {
|
||||
X_APPLY_DIR(!INVERT_X_DIR,0);
|
||||
count_direction[X_AXIS] = 1;
|
||||
}
|
||||
|
||||
if (TEST(out_bits, Y_AXIS)) {
|
||||
Y_APPLY_DIR(INVERT_Y_DIR,0);
|
||||
count_direction[Y_AXIS] = -1;
|
||||
}
|
||||
else {
|
||||
Y_APPLY_DIR(!INVERT_Y_DIR,0);
|
||||
count_direction[Y_AXIS] = 1;
|
||||
}
|
||||
|
||||
if (TEST(out_bits, Z_AXIS)) {
|
||||
Z_APPLY_DIR(INVERT_Z_DIR,0);
|
||||
count_direction[Z_AXIS] = -1;
|
||||
}
|
||||
else {
|
||||
Z_APPLY_DIR(!INVERT_Z_DIR,0);
|
||||
count_direction[Z_AXIS] = 1;
|
||||
}
|
||||
|
||||
#ifndef ADVANCE
|
||||
if (TEST(out_bits, E_AXIS)) {
|
||||
REV_E_DIR();
|
||||
count_direction[E_AXIS] = -1;
|
||||
}
|
||||
else {
|
||||
NORM_E_DIR();
|
||||
count_direction[E_AXIS] = 1;
|
||||
}
|
||||
#endif //!ADVANCE
|
||||
}
|
||||
|
||||
// Initializes the trapezoid generator from the current block. Called whenever a new
|
||||
// block begins.
|
||||
FORCE_INLINE void trapezoid_generator_reset() {
|
||||
|
||||
if (current_block->direction_bits != out_bits) {
|
||||
out_bits = current_block->direction_bits;
|
||||
set_stepper_direction();
|
||||
}
|
||||
|
||||
#ifdef ADVANCE
|
||||
advance = current_block->initial_advance;
|
||||
final_advance = current_block->final_advance;
|
||||
@ -441,47 +488,27 @@ ISR(TIMER1_COMPA_vect) {
|
||||
}
|
||||
|
||||
if (current_block != NULL) {
|
||||
// Set directions TO DO This should be done once during init of trapezoid. Endstops -> interrupt
|
||||
out_bits = current_block->direction_bits;
|
||||
|
||||
// Set the direction bits (X_AXIS=A_AXIS and Y_AXIS=B_AXIS for COREXY)
|
||||
if (TEST(out_bits, X_AXIS)) {
|
||||
X_APPLY_DIR(INVERT_X_DIR,0);
|
||||
count_direction[X_AXIS] = -1;
|
||||
}
|
||||
else {
|
||||
X_APPLY_DIR(!INVERT_X_DIR,0);
|
||||
count_direction[X_AXIS] = 1;
|
||||
}
|
||||
|
||||
if (TEST(out_bits, Y_AXIS)) {
|
||||
Y_APPLY_DIR(INVERT_Y_DIR,0);
|
||||
count_direction[Y_AXIS] = -1;
|
||||
}
|
||||
else {
|
||||
Y_APPLY_DIR(!INVERT_Y_DIR,0);
|
||||
count_direction[Y_AXIS] = 1;
|
||||
}
|
||||
|
||||
#define _ENDSTOP(axis, minmax) axis ##_## minmax ##_endstop
|
||||
#define _ENDSTOP_PIN(AXIS, MINMAX) AXIS ##_## MINMAX ##_PIN
|
||||
#define _ENDSTOP_INVERTING(AXIS, MINMAX) AXIS ##_## MINMAX ##_ENDSTOP_INVERTING
|
||||
#define _OLD_ENDSTOP(axis, minmax) old_## axis ##_## minmax ##_endstop
|
||||
#define _AXIS(AXIS) AXIS ##_AXIS
|
||||
#define _ENDSTOP_HIT(axis) endstop_## axis ##_hit
|
||||
|
||||
#define UPDATE_ENDSTOP(axis,AXIS,minmax,MINMAX) \
|
||||
bool _ENDSTOP(axis, minmax) = (READ(_ENDSTOP_PIN(AXIS, MINMAX)) != _ENDSTOP_INVERTING(AXIS, MINMAX)); \
|
||||
if (_ENDSTOP(axis, minmax) && _OLD_ENDSTOP(axis, minmax) && (current_block->steps[_AXIS(AXIS)] > 0)) { \
|
||||
endstops_trigsteps[_AXIS(AXIS)] = count_position[_AXIS(AXIS)]; \
|
||||
_ENDSTOP_HIT(axis) = true; \
|
||||
step_events_completed = current_block->step_event_count; \
|
||||
} \
|
||||
_OLD_ENDSTOP(axis, minmax) = _ENDSTOP(axis, minmax);
|
||||
|
||||
|
||||
// Check X and Y endstops
|
||||
// Check endstops
|
||||
if (check_endstops) {
|
||||
|
||||
#define _ENDSTOP(axis, minmax) axis ##_## minmax ##_endstop
|
||||
#define _ENDSTOP_PIN(AXIS, MINMAX) AXIS ##_## MINMAX ##_PIN
|
||||
#define _ENDSTOP_INVERTING(AXIS, MINMAX) AXIS ##_## MINMAX ##_ENDSTOP_INVERTING
|
||||
#define _OLD_ENDSTOP(axis, minmax) old_## axis ##_## minmax ##_endstop
|
||||
#define _AXIS(AXIS) AXIS ##_AXIS
|
||||
#define _HIT_BIT(AXIS) AXIS ##_MIN
|
||||
#define _ENDSTOP_HIT(AXIS) endstop_hit_bits |= BIT(_HIT_BIT(AXIS))
|
||||
|
||||
#define UPDATE_ENDSTOP(axis,AXIS,minmax,MINMAX) \
|
||||
bool _ENDSTOP(axis, minmax) = (READ(_ENDSTOP_PIN(AXIS, MINMAX)) != _ENDSTOP_INVERTING(AXIS, MINMAX)); \
|
||||
if (_ENDSTOP(axis, minmax) && _OLD_ENDSTOP(axis, minmax) && (current_block->steps[_AXIS(AXIS)] > 0)) { \
|
||||
endstops_trigsteps[_AXIS(AXIS)] = count_position[_AXIS(AXIS)]; \
|
||||
_ENDSTOP_HIT(AXIS); \
|
||||
step_events_completed = current_block->step_event_count; \
|
||||
} \
|
||||
_OLD_ENDSTOP(axis, minmax) = _ENDSTOP(axis, minmax);
|
||||
|
||||
#ifdef COREXY
|
||||
// Head direction in -X axis for CoreXY bots.
|
||||
// If DeltaX == -DeltaY, the movement is only in Y axis
|
||||
@ -534,15 +561,7 @@ ISR(TIMER1_COMPA_vect) {
|
||||
#ifdef COREXY
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if (TEST(out_bits, Z_AXIS)) { // -direction
|
||||
|
||||
Z_APPLY_DIR(INVERT_Z_DIR,0);
|
||||
count_direction[Z_AXIS] = -1;
|
||||
|
||||
if (check_endstops) {
|
||||
|
||||
if (TEST(out_bits, Z_AXIS)) { // z -direction
|
||||
#if HAS_Z_MIN
|
||||
|
||||
#ifdef Z_DUAL_ENDSTOPS
|
||||
@ -560,7 +579,7 @@ ISR(TIMER1_COMPA_vect) {
|
||||
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];
|
||||
endstop_z_hit = true;
|
||||
endstop_hit_bits |= BIT(Z_MIN);
|
||||
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;
|
||||
}
|
||||
@ -581,23 +600,13 @@ ISR(TIMER1_COMPA_vect) {
|
||||
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");
|
||||
endstop_hit_bits |= BIT(Z_PROBE);
|
||||
// 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
|
||||
|
||||
Z_APPLY_DIR(!INVERT_Z_DIR,0);
|
||||
count_direction[Z_AXIS] = 1;
|
||||
|
||||
if (check_endstops) {
|
||||
|
||||
}
|
||||
else { // z +direction
|
||||
#if HAS_Z_MAX
|
||||
|
||||
#ifdef Z_DUAL_ENDSTOPS
|
||||
@ -615,7 +624,7 @@ ISR(TIMER1_COMPA_vect) {
|
||||
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;
|
||||
endstop_hit_bits |= BIT(Z_MIN);
|
||||
|
||||
// if (z_max_both) SERIAL_ECHOLN("z_max_endstop = true");
|
||||
// if (z2_max_both) SERIAL_ECHOLN("z2_max_endstop = true");
|
||||
@ -633,33 +642,23 @@ ISR(TIMER1_COMPA_vect) {
|
||||
#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");
|
||||
endstop_hit_bits |= BIT(Z_PROBE);
|
||||
// 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
|
||||
if (TEST(out_bits, E_AXIS)) { // -direction
|
||||
REV_E_DIR();
|
||||
count_direction[E_AXIS] = -1;
|
||||
}
|
||||
else { // +direction
|
||||
NORM_E_DIR();
|
||||
count_direction[E_AXIS] = 1;
|
||||
}
|
||||
#endif //!ADVANCE
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Take multiple steps per interrupt (For high speed moves)
|
||||
for (int8_t i = 0; i < step_loops; i++) {
|
||||
@ -676,60 +675,34 @@ ISR(TIMER1_COMPA_vect) {
|
||||
#endif //ADVANCE
|
||||
|
||||
#define _COUNTER(axis) counter_## axis
|
||||
#define _WRITE_STEP(AXIS, HIGHLOW) AXIS ##_STEP_WRITE(HIGHLOW)
|
||||
#define _APPLY_STEP(AXIS) AXIS ##_APPLY_STEP
|
||||
#define _INVERT_STEP_PIN(AXIS) INVERT_## AXIS ##_STEP_PIN
|
||||
|
||||
#ifdef CONFIG_STEPPERS_TOSHIBA
|
||||
/**
|
||||
* The Toshiba stepper controller require much longer pulses.
|
||||
* So we 'stage' decompose the pulses between high and low
|
||||
* instead of doing each in turn. The extra tests add enough
|
||||
* lag to allow it work with without needing NOPs
|
||||
*/
|
||||
#define STEP_ADD(axis, AXIS) \
|
||||
_COUNTER(axis) += current_block->steps[_AXIS(AXIS)]; \
|
||||
if (_COUNTER(axis) > 0) { _WRITE_STEP(AXIS, HIGH); }
|
||||
STEP_ADD(x,X);
|
||||
STEP_ADD(y,Y);
|
||||
STEP_ADD(z,Z);
|
||||
#ifndef ADVANCE
|
||||
STEP_ADD(e,E);
|
||||
#endif
|
||||
#define STEP_ADD(axis, AXIS) \
|
||||
_COUNTER(axis) += current_block->steps[_AXIS(AXIS)]; \
|
||||
if (_COUNTER(axis) > 0) { _APPLY_STEP(AXIS)(!_INVERT_STEP_PIN(AXIS),0); }
|
||||
|
||||
#define STEP_IF_COUNTER(axis, AXIS) \
|
||||
if (_COUNTER(axis) > 0) { \
|
||||
_COUNTER(axis) -= current_block->step_event_count; \
|
||||
count_position[_AXIS(AXIS)] += count_direction[_AXIS(AXIS)]; \
|
||||
_WRITE_STEP(AXIS, LOW); \
|
||||
}
|
||||
STEP_ADD(x,X);
|
||||
STEP_ADD(y,Y);
|
||||
STEP_ADD(z,Z);
|
||||
#ifndef ADVANCE
|
||||
STEP_ADD(e,E);
|
||||
#endif
|
||||
|
||||
STEP_IF_COUNTER(x, X);
|
||||
STEP_IF_COUNTER(y, Y);
|
||||
STEP_IF_COUNTER(z, Z);
|
||||
#ifndef ADVANCE
|
||||
STEP_IF_COUNTER(e, E);
|
||||
#endif
|
||||
#define STEP_IF_COUNTER(axis, AXIS) \
|
||||
if (_COUNTER(axis) > 0) { \
|
||||
_COUNTER(axis) -= current_block->step_event_count; \
|
||||
count_position[_AXIS(AXIS)] += count_direction[_AXIS(AXIS)]; \
|
||||
_APPLY_STEP(AXIS)(_INVERT_STEP_PIN(AXIS),0); \
|
||||
}
|
||||
|
||||
#else // !CONFIG_STEPPERS_TOSHIBA
|
||||
STEP_IF_COUNTER(x, X);
|
||||
STEP_IF_COUNTER(y, Y);
|
||||
STEP_IF_COUNTER(z, Z);
|
||||
#ifndef ADVANCE
|
||||
STEP_IF_COUNTER(e, E);
|
||||
#endif
|
||||
|
||||
#define APPLY_MOVEMENT(axis, AXIS) \
|
||||
_COUNTER(axis) += current_block->steps[_AXIS(AXIS)]; \
|
||||
if (_COUNTER(axis) > 0) { \
|
||||
_APPLY_STEP(AXIS)(!_INVERT_STEP_PIN(AXIS),0); \
|
||||
_COUNTER(axis) -= current_block->step_event_count; \
|
||||
count_position[_AXIS(AXIS)] += count_direction[_AXIS(AXIS)]; \
|
||||
_APPLY_STEP(AXIS)(_INVERT_STEP_PIN(AXIS),0); \
|
||||
}
|
||||
|
||||
APPLY_MOVEMENT(x, X);
|
||||
APPLY_MOVEMENT(y, Y);
|
||||
APPLY_MOVEMENT(z, Z);
|
||||
#ifndef ADVANCE
|
||||
APPLY_MOVEMENT(e, E);
|
||||
#endif
|
||||
|
||||
#endif // CONFIG_STEPPERS_TOSHIBA
|
||||
step_events_completed++;
|
||||
if (step_events_completed >= current_block->step_event_count) break;
|
||||
}
|
||||
@ -1016,14 +989,15 @@ void st_init() {
|
||||
#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);
|
||||
#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
|
||||
#endif
|
||||
|
||||
#define _STEP_INIT(AXIS) AXIS ##_STEP_INIT
|
||||
#define _WRITE_STEP(AXIS, HIGHLOW) AXIS ##_STEP_WRITE(HIGHLOW)
|
||||
#define _DISABLE(axis) disable_## axis()
|
||||
|
||||
#define AXIS_INIT(axis, AXIS, PIN) \
|
||||
@ -1099,6 +1073,8 @@ void st_init() {
|
||||
|
||||
enable_endstops(true); // Start with endstops active. After homing they can be disabled
|
||||
sei();
|
||||
|
||||
set_stepper_direction(); // Init directions to out_bits = 0
|
||||
}
|
||||
|
||||
|
||||
@ -1136,9 +1112,8 @@ long st_get_position(uint8_t axis) {
|
||||
|
||||
#ifdef ENABLE_AUTO_BED_LEVELING
|
||||
|
||||
float st_get_position_mm(uint8_t axis) {
|
||||
float steper_position_in_steps = st_get_position(axis);
|
||||
return steper_position_in_steps / axis_steps_per_unit[axis];
|
||||
float st_get_position_mm(AxisEnum axis) {
|
||||
return st_get_position(axis) / axis_steps_per_unit[axis];
|
||||
}
|
||||
|
||||
#endif // ENABLE_AUTO_BED_LEVELING
|
||||
|
@ -67,9 +67,9 @@ void st_set_e_position(const long &e);
|
||||
long st_get_position(uint8_t axis);
|
||||
|
||||
#ifdef ENABLE_AUTO_BED_LEVELING
|
||||
// Get current position in mm
|
||||
float st_get_position_mm(uint8_t axis);
|
||||
#endif //ENABLE_AUTO_BED_LEVELING
|
||||
// Get current position in mm
|
||||
float st_get_position_mm(AxisEnum axis);
|
||||
#endif
|
||||
|
||||
// The stepper subsystem goes to sleep when it runs out of things to execute. Call this
|
||||
// to notify the subsystem that it is time to go to work.
|
||||
|
@ -73,16 +73,14 @@ unsigned char soft_pwm_bed;
|
||||
int current_raw_filwidth = 0; //Holds measured filament diameter - one extruder only
|
||||
#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
|
||||
#if defined(THERMAL_PROTECTION_HOTENDS) || defined(THERMAL_PROTECTION_BED)
|
||||
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
|
||||
#ifdef THERMAL_PROTECTION_HOTENDS
|
||||
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
|
||||
#ifdef THERMAL_PROTECTION_BED
|
||||
static TRState thermal_runaway_bed_state_machine = TRReset;
|
||||
static millis_t thermal_runaway_bed_timer;
|
||||
#endif
|
||||
@ -170,10 +168,10 @@ static float analog2temp(int raw, uint8_t e);
|
||||
static float analog2tempBed(int raw);
|
||||
static void updateTemperaturesFromRawValues();
|
||||
|
||||
#ifdef WATCH_TEMP_PERIOD
|
||||
int watch_start_temp[EXTRUDERS] = { 0 };
|
||||
millis_t watchmillis[EXTRUDERS] = { 0 };
|
||||
#endif //WATCH_TEMP_PERIOD
|
||||
#ifdef THERMAL_PROTECTION_HOTENDS
|
||||
int watch_target_temp[EXTRUDERS] = { 0 };
|
||||
millis_t watch_heater_next_ms[EXTRUDERS] = { 0 };
|
||||
#endif
|
||||
|
||||
#ifndef SOFT_PWM_SCALE
|
||||
#define SOFT_PWM_SCALE 0
|
||||
@ -247,8 +245,8 @@ void PID_autotune(float temp, int extruder, int ncycles)
|
||||
}
|
||||
#endif
|
||||
|
||||
if (heating == true && input > temp) {
|
||||
if (ms - t2 > 5000) {
|
||||
if (heating && input > temp) {
|
||||
if (ms > t2 + 5000) {
|
||||
heating = false;
|
||||
if (extruder < 0)
|
||||
soft_pwm_bed = (bias - d) >> 1;
|
||||
@ -259,8 +257,9 @@ void PID_autotune(float temp, int extruder, int ncycles)
|
||||
max = temp;
|
||||
}
|
||||
}
|
||||
if (heating == false && input < temp) {
|
||||
if (ms - t1 > 5000) {
|
||||
|
||||
if (!heating && input < temp) {
|
||||
if (ms > t1 + 5000) {
|
||||
heating = true;
|
||||
t2 = ms;
|
||||
t_low = t2 - t1;
|
||||
@ -313,7 +312,8 @@ void PID_autotune(float temp, int extruder, int ncycles)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (input > temp + 20) {
|
||||
#define MAX_OVERSHOOT_PID_AUTOTUNE 20
|
||||
if (input > temp + MAX_OVERSHOOT_PID_AUTOTUNE) {
|
||||
SERIAL_PROTOCOLLNPGM(MSG_PID_TEMP_TOO_HIGH);
|
||||
return;
|
||||
}
|
||||
@ -447,14 +447,14 @@ void checkExtruderAutoFans()
|
||||
//
|
||||
// Temperature Error Handlers
|
||||
//
|
||||
inline void _temp_error(int e, const char *msg1, const char *msg2) {
|
||||
inline void _temp_error(int e, const char *serial_msg, const char *lcd_msg) {
|
||||
if (IsRunning()) {
|
||||
SERIAL_ERROR_START;
|
||||
if (e >= 0) SERIAL_ERRORLN((int)e);
|
||||
serialprintPGM(msg1);
|
||||
serialprintPGM(serial_msg);
|
||||
MYSERIAL.write('\n');
|
||||
#ifdef ULTRA_LCD
|
||||
lcd_setalertstatuspgm(msg2);
|
||||
lcd_setalertstatuspgm(lcd_msg);
|
||||
#endif
|
||||
}
|
||||
#ifndef BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE
|
||||
@ -602,17 +602,17 @@ void manage_heater() {
|
||||
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
|
||||
#endif
|
||||
|
||||
#if defined(WATCH_TEMP_PERIOD) || !defined(PIDTEMPBED) || HAS_AUTO_FAN
|
||||
#if defined(THERMAL_PROTECTION_HOTENDS) || !defined(PIDTEMPBED) || HAS_AUTO_FAN
|
||||
millis_t ms = millis();
|
||||
#endif
|
||||
|
||||
// Loop through all extruders
|
||||
for (int e = 0; e < EXTRUDERS; e++) {
|
||||
|
||||
#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);
|
||||
#ifdef THERMAL_PROTECTION_HOTENDS
|
||||
thermal_runaway_protection(&thermal_runaway_state_machine[e], &thermal_runaway_timer[e], current_temperature[e], target_temperature[e], e, THERMAL_PROTECTION_PERIOD, THERMAL_PROTECTION_HYSTERESIS);
|
||||
#endif
|
||||
|
||||
float pid_output = get_pid_output(e);
|
||||
@ -620,26 +620,31 @@ void manage_heater() {
|
||||
// Check if temperature is within the correct range
|
||||
soft_pwm[e] = current_temperature[e] > minttemp[e] && current_temperature[e] < maxttemp[e] ? (int)pid_output >> 1 : 0;
|
||||
|
||||
#ifdef WATCH_TEMP_PERIOD
|
||||
if (watchmillis[e] && ms > watchmillis[e] + WATCH_TEMP_PERIOD) {
|
||||
if (degHotend(e) < watch_start_temp[e] + WATCH_TEMP_INCREASE) {
|
||||
setTargetHotend(0, e);
|
||||
LCD_MESSAGEPGM(MSG_HEATING_FAILED_LCD); // translatable
|
||||
SERIAL_ECHO_START;
|
||||
SERIAL_ECHOLNPGM(MSG_HEATING_FAILED);
|
||||
// Check if the temperature is failing to increase
|
||||
#ifdef THERMAL_PROTECTION_HOTENDS
|
||||
|
||||
// Is it time to check this extruder's heater?
|
||||
if (watch_heater_next_ms[e] && ms > watch_heater_next_ms[e]) {
|
||||
// Has it failed to increase enough?
|
||||
if (degHotend(e) < watch_target_temp[e]) {
|
||||
// Stop!
|
||||
disable_all_heaters();
|
||||
_temp_error(e, PSTR(MSG_HEATING_FAILED), PSTR(MSG_HEATING_FAILED_LCD));
|
||||
}
|
||||
else {
|
||||
watchmillis[e] = 0;
|
||||
// Start again if the target is still far off
|
||||
start_watching_heater(e);
|
||||
}
|
||||
}
|
||||
#endif //WATCH_TEMP_PERIOD
|
||||
|
||||
#endif // THERMAL_PROTECTION_HOTENDS
|
||||
|
||||
#ifdef TEMP_SENSOR_1_AS_REDUNDANT
|
||||
if (fabs(current_temperature[0] - redundant_temperature) > MAX_REDUNDANT_TEMP_SENSOR_DIFF) {
|
||||
disable_all_heaters();
|
||||
_temp_error(0, PSTR(MSG_EXTRUDER_SWITCHED_OFF), PSTR(MSG_ERR_REDUNDANT_TEMP));
|
||||
}
|
||||
#endif // TEMP_SENSOR_1_AS_REDUNDANT
|
||||
#endif
|
||||
|
||||
} // Extruders Loop
|
||||
|
||||
@ -672,8 +677,8 @@ void manage_heater() {
|
||||
|
||||
#if TEMP_SENSOR_BED != 0
|
||||
|
||||
#if HAS_BED_THERMAL_PROTECTION
|
||||
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);
|
||||
#ifdef THERMAL_PROTECTION_BED
|
||||
thermal_runaway_protection(&thermal_runaway_bed_state_machine, &thermal_runaway_bed_timer, current_temperature_bed, target_temperature_bed, -1, THERMAL_PROTECTION_BED_PERIOD, THERMAL_PROTECTION_BED_HYSTERESIS);
|
||||
#endif
|
||||
|
||||
#ifdef PIDTEMPBED
|
||||
@ -784,7 +789,7 @@ static void updateTemperaturesFromRawValues() {
|
||||
#ifdef HEATER_0_USES_MAX6675
|
||||
current_temperature_raw[0] = read_max6675();
|
||||
#endif
|
||||
for(uint8_t e = 0; e < EXTRUDERS; e++) {
|
||||
for (uint8_t e = 0; e < EXTRUDERS; e++) {
|
||||
current_temperature[e] = analog2temp(current_temperature_raw[e], e);
|
||||
}
|
||||
current_temperature_bed = analog2tempBed(current_temperature_bed_raw);
|
||||
@ -996,19 +1001,24 @@ void tp_init() {
|
||||
#endif //BED_MAXTEMP
|
||||
}
|
||||
|
||||
void setWatch() {
|
||||
#ifdef WATCH_TEMP_PERIOD
|
||||
millis_t ms = millis();
|
||||
for (int e = 0; e < EXTRUDERS; e++) {
|
||||
if (degHotend(e) < degTargetHotend(e) - (WATCH_TEMP_INCREASE * 2)) {
|
||||
watch_start_temp[e] = degHotend(e);
|
||||
watchmillis[e] = ms;
|
||||
}
|
||||
#ifdef THERMAL_PROTECTION_HOTENDS
|
||||
/**
|
||||
* Start Heating Sanity Check for hotends that are below
|
||||
* their target temperature by a configurable margin.
|
||||
* This is called when the temperature is set. (M104, M109)
|
||||
*/
|
||||
void start_watching_heater(int e) {
|
||||
millis_t ms = millis() + WATCH_TEMP_PERIOD * 1000;
|
||||
if (degHotend(e) < degTargetHotend(e) - (WATCH_TEMP_INCREASE + TEMP_HYSTERESIS + 1)) {
|
||||
watch_target_temp[e] = degHotend(e) + WATCH_TEMP_INCREASE;
|
||||
watch_heater_next_ms[e] = ms;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else
|
||||
watch_heater_next_ms[e] = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if HAS_HEATER_THERMAL_PROTECTION || HAS_BED_THERMAL_PROTECTION
|
||||
#if defined(THERMAL_PROTECTION_HOTENDS) || defined(THERMAL_PROTECTION_BED)
|
||||
|
||||
void thermal_runaway_protection(TRState *state, millis_t *timer, float temperature, float target_temperature, int heater_id, int period_seconds, int hysteresis_degc) {
|
||||
|
||||
@ -1074,7 +1084,7 @@ void setWatch() {
|
||||
}
|
||||
}
|
||||
|
||||
#endif // HAS_HEATER_THERMAL_PROTECTION || HAS_BED_THERMAL_PROTECTION
|
||||
#endif // THERMAL_PROTECTION_HOTENDS || THERMAL_PROTECTION_BED
|
||||
|
||||
void disable_all_heaters() {
|
||||
for (int i=0; i<EXTRUDERS; i++) setTargetHotend(0, i);
|
||||
|
@ -130,7 +130,6 @@ HOTEND_ROUTINES(0);
|
||||
|
||||
int getHeaterPower(int heater);
|
||||
void disable_all_heaters();
|
||||
void setWatch();
|
||||
void updatePID();
|
||||
|
||||
void PID_autotune(float temp, int extruder, int ncycles);
|
||||
@ -138,6 +137,10 @@ void PID_autotune(float temp, int extruder, int ncycles);
|
||||
void setExtruderAutoFanState(int pin, bool state);
|
||||
void checkExtruderAutoFans();
|
||||
|
||||
#ifdef THERMAL_PROTECTION_HOTENDS
|
||||
void start_watching_heater(int e=0);
|
||||
#endif
|
||||
|
||||
FORCE_INLINE void autotempShutdown() {
|
||||
#ifdef AUTOTEMP
|
||||
if (autotemp_enabled) {
|
||||
|
@ -7,12 +7,11 @@
|
||||
#include "stepper.h"
|
||||
#include "configuration_store.h"
|
||||
|
||||
int8_t encoderDiff; /* encoderDiff is updated from interrupt context and added to encoderPosition every LCD update */
|
||||
int8_t encoderDiff; // updated from interrupt context and added to encoderPosition every LCD update
|
||||
|
||||
bool encoderRateMultiplierEnabled;
|
||||
int32_t lastEncoderMovementMillis;
|
||||
|
||||
/* Configuration settings */
|
||||
int plaPreheatHotendTemp;
|
||||
int plaPreheatHPBTemp;
|
||||
int plaPreheatFanSpeed;
|
||||
@ -25,9 +24,7 @@ int absPreheatFanSpeed;
|
||||
millis_t previous_lcd_status_ms = 0;
|
||||
#endif
|
||||
|
||||
/* !Configuration settings */
|
||||
|
||||
//Function pointer to menu functions.
|
||||
// Function pointer to menu functions.
|
||||
typedef void (*menuFunc_t)();
|
||||
|
||||
uint8_t lcd_status_message_level;
|
||||
@ -212,11 +209,11 @@ static void lcd_status_screen();
|
||||
} } while(0)
|
||||
|
||||
/** Used variables to keep track of the menu */
|
||||
#ifndef REPRAPWORLD_KEYPAD
|
||||
volatile uint8_t buttons; // Bits of the pressed buttons.
|
||||
#else
|
||||
volatile uint8_t buttons_reprapworld_keypad; // The reprapworld_keypad shift register values
|
||||
volatile uint8_t buttons; //the last checked buttons in a bit array.
|
||||
#ifdef REPRAPWORLD_KEYPAD
|
||||
volatile uint8_t buttons_reprapworld_keypad; // to store the keypad shift register values
|
||||
#endif
|
||||
|
||||
#ifdef LCD_HAS_SLOW_BUTTONS
|
||||
volatile uint8_t slow_buttons; // Bits of the pressed buttons.
|
||||
#endif
|
||||
@ -438,17 +435,12 @@ static void lcd_main_menu() {
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Set the home offset based on the current_position
|
||||
*/
|
||||
void lcd_set_home_offsets() {
|
||||
for (int8_t i=0; i < NUM_AXIS; i++) {
|
||||
if (i != E_AXIS) {
|
||||
home_offset[i] -= current_position[i];
|
||||
current_position[i] = 0.0;
|
||||
}
|
||||
}
|
||||
plan_set_position(0.0, 0.0, 0.0, current_position[E_AXIS]);
|
||||
|
||||
// Audio feedback
|
||||
enqueuecommands_P(PSTR("M300 S659 P200\nM300 S698 P200"));
|
||||
// M428 Command
|
||||
enqueuecommands_P(PSTR("M428"));
|
||||
lcd_return_to_status();
|
||||
}
|
||||
|
||||
@ -526,7 +518,9 @@ void _lcd_preheat(int endnum, const float temph, const float tempb, const int fa
|
||||
setTargetBed(tempb);
|
||||
fanSpeed = fan;
|
||||
lcd_return_to_status();
|
||||
setWatch(); // heater sanity check timer
|
||||
#ifdef WATCH_TEMP_PERIOD
|
||||
if (endnum >= 0) start_watching_heater(endnum);
|
||||
#endif
|
||||
}
|
||||
void lcd_preheat_pla0() { _lcd_preheat(0, plaPreheatHotendTemp, plaPreheatHPBTemp, plaPreheatFanSpeed); }
|
||||
void lcd_preheat_abs0() { _lcd_preheat(0, absPreheatHotendTemp, absPreheatHPBTemp, absPreheatFanSpeed); }
|
||||
@ -878,10 +872,17 @@ static void lcd_control_menu() {
|
||||
* "Control" > "Temperature" submenu
|
||||
*
|
||||
*/
|
||||
|
||||
static void lcd_control_temperature_menu() {
|
||||
START_MENU();
|
||||
|
||||
//
|
||||
// ^ Control
|
||||
//
|
||||
MENU_ITEM(back, MSG_CONTROL, lcd_control_menu);
|
||||
|
||||
//
|
||||
// Nozzle, Nozzle 2, Nozzle 3, Nozzle 4
|
||||
//
|
||||
#if TEMP_SENSOR_0 != 0
|
||||
MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_NOZZLE, &target_temperature[0], 0, HEATER_0_MAXTEMP - 15);
|
||||
#endif
|
||||
@ -900,16 +901,32 @@ static void lcd_control_temperature_menu() {
|
||||
#endif // EXTRUDERS > 3
|
||||
#endif // EXTRUDERS > 2
|
||||
#endif // EXTRUDERS > 1
|
||||
|
||||
//
|
||||
// Bed
|
||||
//
|
||||
#if TEMP_SENSOR_BED != 0
|
||||
MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_BED, &target_temperature_bed, 0, BED_MAXTEMP - 15);
|
||||
#endif
|
||||
|
||||
//
|
||||
// Fan Speed
|
||||
//
|
||||
MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_FAN_SPEED, &fanSpeed, 0, 255);
|
||||
|
||||
//
|
||||
// Autotemp, Min, Max, Fact
|
||||
//
|
||||
#if defined(AUTOTEMP) && (TEMP_SENSOR_0 != 0)
|
||||
MENU_ITEM_EDIT(bool, MSG_AUTOTEMP, &autotemp_enabled);
|
||||
MENU_ITEM_EDIT(float3, MSG_MIN, &autotemp_min, 0, HEATER_0_MAXTEMP - 15);
|
||||
MENU_ITEM_EDIT(float3, MSG_MAX, &autotemp_max, 0, HEATER_0_MAXTEMP - 15);
|
||||
MENU_ITEM_EDIT(float32, MSG_FACTOR, &autotemp_factor, 0.0, 1.0);
|
||||
#endif
|
||||
|
||||
//
|
||||
// PID-P, PID-I, PID-D, PID-C
|
||||
//
|
||||
#ifdef PIDTEMP
|
||||
// set up temp variables - undo the default scaling
|
||||
raw_Ki = unscalePID_i(PID_PARAM(Ki,0));
|
||||
@ -962,7 +979,15 @@ static void lcd_control_temperature_menu() {
|
||||
#endif//EXTRUDERS > 1
|
||||
#endif //PID_PARAMS_PER_EXTRUDER
|
||||
#endif//PIDTEMP
|
||||
|
||||
//
|
||||
// Preheat PLA conf
|
||||
//
|
||||
MENU_ITEM(submenu, MSG_PREHEAT_PLA_SETTINGS, lcd_control_temperature_preheat_pla_settings_menu);
|
||||
|
||||
//
|
||||
// Preheat ABS conf
|
||||
//
|
||||
MENU_ITEM(submenu, MSG_PREHEAT_ABS_SETTINGS, lcd_control_temperature_preheat_abs_settings_menu);
|
||||
END_MENU();
|
||||
}
|
||||
@ -972,7 +997,6 @@ static void lcd_control_temperature_menu() {
|
||||
* "Temperature" > "Preheat PLA conf" submenu
|
||||
*
|
||||
*/
|
||||
|
||||
static void lcd_control_temperature_preheat_pla_settings_menu() {
|
||||
START_MENU();
|
||||
MENU_ITEM(back, MSG_TEMPERATURE, lcd_control_temperature_menu);
|
||||
@ -994,7 +1018,6 @@ static void lcd_control_temperature_preheat_pla_settings_menu() {
|
||||
* "Temperature" > "Preheat ABS conf" submenu
|
||||
*
|
||||
*/
|
||||
|
||||
static void lcd_control_temperature_preheat_abs_settings_menu() {
|
||||
START_MENU();
|
||||
MENU_ITEM(back, MSG_TEMPERATURE, lcd_control_temperature_menu);
|
||||
@ -1016,7 +1039,6 @@ static void lcd_control_temperature_preheat_abs_settings_menu() {
|
||||
* "Control" > "Motion" submenu
|
||||
*
|
||||
*/
|
||||
|
||||
static void lcd_control_motion_menu() {
|
||||
START_MENU();
|
||||
MENU_ITEM(back, MSG_CONTROL, lcd_control_menu);
|
||||
@ -1058,7 +1080,6 @@ static void lcd_control_motion_menu() {
|
||||
* "Control" > "Filament" submenu
|
||||
*
|
||||
*/
|
||||
|
||||
static void lcd_control_volumetric_menu() {
|
||||
START_MENU();
|
||||
MENU_ITEM(back, MSG_CONTROL, lcd_control_menu);
|
||||
@ -1086,7 +1107,6 @@ static void lcd_control_volumetric_menu() {
|
||||
* "Control" > "Contrast" submenu
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef HAS_LCD_CONTRAST
|
||||
static void lcd_set_contrast() {
|
||||
if (encoderPosition != 0) {
|
||||
@ -1106,7 +1126,6 @@ static void lcd_control_volumetric_menu() {
|
||||
* "Control" > "Retract" submenu
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef FWRETRACT
|
||||
static void lcd_control_retract_menu() {
|
||||
START_MENU();
|
||||
@ -1144,7 +1163,6 @@ static void lcd_sd_updir() {
|
||||
* "Print from SD" submenu
|
||||
*
|
||||
*/
|
||||
|
||||
void lcd_sdcard_menu() {
|
||||
if (lcdDrawUpdate == 0 && LCD_CLICKED == 0) return; // nothing to do (so don't thrash the SD card)
|
||||
uint16_t fileCnt = card.getnrfilenames();
|
||||
@ -1290,7 +1308,7 @@ void lcd_quick_feedback() {
|
||||
#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
|
||||
#elif defined(BEEPER) && BEEPER >= 0
|
||||
#ifndef LCD_FEEDBACK_FREQUENCY_HZ
|
||||
#define LCD_FEEDBACK_FREQUENCY_HZ 5000
|
||||
#endif
|
||||
@ -1723,12 +1741,12 @@ void lcd_reset_alert_level() { lcd_status_message_level = 0; }
|
||||
|
||||
void lcd_buzz(long duration, uint16_t freq) {
|
||||
if (freq > 0) {
|
||||
#if BEEPER > 0
|
||||
#ifdef LCD_USE_I2C_BUZZER
|
||||
lcd.buzz(duration, freq);
|
||||
#elif defined(BEEPER) && BEEPER >= 0
|
||||
SET_OUTPUT(BEEPER);
|
||||
tone(BEEPER, freq, duration);
|
||||
delay(duration);
|
||||
#elif defined(LCD_USE_I2C_BUZZER)
|
||||
lcd.buzz(duration, freq);
|
||||
#else
|
||||
delay(duration);
|
||||
#endif
|
||||
|
@ -106,7 +106,7 @@
|
||||
FORCE_INLINE void lcd_setstatuspgm(const char* message, const uint8_t level=0) {}
|
||||
FORCE_INLINE void lcd_buttons_update() {}
|
||||
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) {}
|
||||
FORCE_INLINE bool lcd_detected(void) { return true; }
|
||||
|
||||
#define LCD_MESSAGEPGM(x) do{}while(0)
|
||||
|
@ -6,17 +6,17 @@
|
||||
* When selecting the Russian language, a slightly different LCD implementation is used to handle UTF8 characters.
|
||||
**/
|
||||
|
||||
#ifndef REPRAPWORLD_KEYPAD
|
||||
extern volatile uint8_t buttons; //the last checked buttons in a bit array.
|
||||
#else
|
||||
extern volatile uint16_t buttons; //an extended version of the last checked buttons in a bit array.
|
||||
#endif
|
||||
//#ifndef REPRAPWORLD_KEYPAD
|
||||
// extern volatile uint8_t buttons; //the last checked buttons in a bit array.
|
||||
//#else
|
||||
extern volatile uint8_t buttons; //an extended version of the last checked buttons in a bit array.
|
||||
//#endif
|
||||
|
||||
////////////////////////////////////
|
||||
// Setup button and encode mappings for each panel (into 'buttons' variable
|
||||
//
|
||||
// This is just to map common functions (across different panels) onto the same
|
||||
// macro name. The mapping is independent of whether the button is directly connected or
|
||||
// This is just to map common functions (across different panels) onto the same
|
||||
// macro name. The mapping is independent of whether the button is directly connected or
|
||||
// via a shift/i2c register.
|
||||
|
||||
#ifdef ULTIPANEL
|
||||
@ -38,7 +38,7 @@
|
||||
//
|
||||
#if defined(LCD_I2C_VIKI)
|
||||
#define B_I2C_BTN_OFFSET 3 // (the first three bit positions reserved for EN_A, EN_B, EN_C)
|
||||
|
||||
|
||||
// button and encoder bit positions within 'buttons'
|
||||
#define B_LE (BUTTON_LEFT<<B_I2C_BTN_OFFSET) // The remaining normalized buttons are all read via I2C
|
||||
#define B_UP (BUTTON_UP<<B_I2C_BTN_OFFSET)
|
||||
@ -46,22 +46,22 @@
|
||||
#define B_DW (BUTTON_DOWN<<B_I2C_BTN_OFFSET)
|
||||
#define B_RI (BUTTON_RIGHT<<B_I2C_BTN_OFFSET)
|
||||
|
||||
#if defined(BTN_ENC) && BTN_ENC > -1
|
||||
#if defined(BTN_ENC) && BTN_ENC > -1
|
||||
// the pause/stop/restart button is connected to BTN_ENC when used
|
||||
#define B_ST (EN_C) // Map the pause/stop/resume button into its normalized functional name
|
||||
#define B_ST (EN_C) // Map the pause/stop/resume button into its normalized functional name
|
||||
#define LCD_CLICKED (buttons&(B_MI|B_RI|B_ST)) // pause/stop button also acts as click until we implement proper pause/stop.
|
||||
#else
|
||||
#define LCD_CLICKED (buttons&(B_MI|B_RI))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// I2C buttons take too long to read inside an interrupt context and so we read them during lcd_update
|
||||
#define LCD_HAS_SLOW_BUTTONS
|
||||
|
||||
#elif defined(LCD_I2C_PANELOLU2)
|
||||
// encoder click can be read through I2C if not directly connected
|
||||
#if BTN_ENC <= 0
|
||||
#if BTN_ENC <= 0
|
||||
#define B_I2C_BTN_OFFSET 3 // (the first three bit positions reserved for EN_A, EN_B, EN_C)
|
||||
|
||||
|
||||
#define B_MI (PANELOLU2_ENCODER_C<<B_I2C_BTN_OFFSET) // requires LiquidTWI2 library v1.2.3 or later
|
||||
|
||||
#define LCD_CLICKED (buttons&B_MI)
|
||||
@ -69,7 +69,7 @@
|
||||
// I2C buttons take too long to read inside an interrupt context and so we read them during lcd_update
|
||||
#define LCD_HAS_SLOW_BUTTONS
|
||||
#else
|
||||
#define LCD_CLICKED (buttons&EN_C)
|
||||
#define LCD_CLICKED (buttons&EN_C)
|
||||
#endif
|
||||
|
||||
#elif defined(REPRAPWORLD_KEYPAD)
|
||||
@ -77,13 +77,13 @@
|
||||
#define BLEN_REPRAPWORLD_KEYPAD_F3 0
|
||||
#define BLEN_REPRAPWORLD_KEYPAD_F2 1
|
||||
#define BLEN_REPRAPWORLD_KEYPAD_F1 2
|
||||
#define BLEN_REPRAPWORLD_KEYPAD_UP 3
|
||||
#define BLEN_REPRAPWORLD_KEYPAD_UP 6
|
||||
#define BLEN_REPRAPWORLD_KEYPAD_RIGHT 4
|
||||
#define BLEN_REPRAPWORLD_KEYPAD_MIDDLE 5
|
||||
#define BLEN_REPRAPWORLD_KEYPAD_DOWN 6
|
||||
#define BLEN_REPRAPWORLD_KEYPAD_DOWN 3
|
||||
#define BLEN_REPRAPWORLD_KEYPAD_LEFT 7
|
||||
|
||||
#define REPRAPWORLD_BTN_OFFSET 3 // bit offset into buttons for shift register values
|
||||
#define REPRAPWORLD_BTN_OFFSET 0 // bit offset into buttons for shift register values
|
||||
|
||||
#define EN_REPRAPWORLD_KEYPAD_F3 BIT((BLEN_REPRAPWORLD_KEYPAD_F3+REPRAPWORLD_BTN_OFFSET))
|
||||
#define EN_REPRAPWORLD_KEYPAD_F2 BIT((BLEN_REPRAPWORLD_KEYPAD_F2+REPRAPWORLD_BTN_OFFSET))
|
||||
@ -94,14 +94,14 @@
|
||||
#define EN_REPRAPWORLD_KEYPAD_DOWN BIT((BLEN_REPRAPWORLD_KEYPAD_DOWN+REPRAPWORLD_BTN_OFFSET))
|
||||
#define EN_REPRAPWORLD_KEYPAD_LEFT BIT((BLEN_REPRAPWORLD_KEYPAD_LEFT+REPRAPWORLD_BTN_OFFSET))
|
||||
|
||||
#define LCD_CLICKED ((buttons&EN_C) || (buttons&EN_REPRAPWORLD_KEYPAD_F1))
|
||||
#define REPRAPWORLD_KEYPAD_MOVE_Y_DOWN (buttons&EN_REPRAPWORLD_KEYPAD_DOWN)
|
||||
#define REPRAPWORLD_KEYPAD_MOVE_Y_UP (buttons&EN_REPRAPWORLD_KEYPAD_UP)
|
||||
#define REPRAPWORLD_KEYPAD_MOVE_HOME (buttons&EN_REPRAPWORLD_KEYPAD_MIDDLE)
|
||||
//#define LCD_CLICKED ((buttons&EN_C) || (buttons&EN_REPRAPWORLD_KEYPAD_F1))
|
||||
//#define REPRAPWORLD_KEYPAD_MOVE_Y_DOWN (buttons&EN_REPRAPWORLD_KEYPAD_DOWN)
|
||||
//#define REPRAPWORLD_KEYPAD_MOVE_Y_UP (buttons&EN_REPRAPWORLD_KEYPAD_UP)
|
||||
//#define REPRAPWORLD_KEYPAD_MOVE_HOME (buttons&EN_REPRAPWORLD_KEYPAD_MIDDLE)
|
||||
|
||||
#elif defined(NEWPANEL)
|
||||
#define LCD_CLICKED (buttons&EN_C)
|
||||
|
||||
|
||||
#else // old style ULTIPANEL
|
||||
//bits in the shift register that carry the buttons for:
|
||||
// left up center down right red(stop)
|
||||
@ -143,7 +143,7 @@
|
||||
#include <LiquidCrystal_I2C.h>
|
||||
#define LCD_CLASS LiquidCrystal_I2C
|
||||
LCD_CLASS lcd(LCD_I2C_ADDRESS,LCD_I2C_PIN_EN,LCD_I2C_PIN_RW,LCD_I2C_PIN_RS,LCD_I2C_PIN_D4,LCD_I2C_PIN_D5,LCD_I2C_PIN_D6,LCD_I2C_PIN_D7);
|
||||
|
||||
|
||||
#elif defined(LCD_I2C_TYPE_MCP23017)
|
||||
//for the LED indicators (which maybe mapped to different things in lcd_implementation_update_indicators())
|
||||
#define LED_A 0x04 //100
|
||||
@ -156,28 +156,28 @@
|
||||
#include <LiquidTWI2.h>
|
||||
#define LCD_CLASS LiquidTWI2
|
||||
#if defined(DETECT_DEVICE)
|
||||
LCD_CLASS lcd(LCD_I2C_ADDRESS, 1);
|
||||
LCD_CLASS lcd(LCD_I2C_ADDRESS, 1);
|
||||
#else
|
||||
LCD_CLASS lcd(LCD_I2C_ADDRESS);
|
||||
LCD_CLASS lcd(LCD_I2C_ADDRESS);
|
||||
#endif
|
||||
|
||||
|
||||
#elif defined(LCD_I2C_TYPE_MCP23008)
|
||||
#include <Wire.h>
|
||||
#include <LiquidTWI2.h>
|
||||
#define LCD_CLASS LiquidTWI2
|
||||
#if defined(DETECT_DEVICE)
|
||||
LCD_CLASS lcd(LCD_I2C_ADDRESS, 1);
|
||||
LCD_CLASS lcd(LCD_I2C_ADDRESS, 1);
|
||||
#else
|
||||
LCD_CLASS lcd(LCD_I2C_ADDRESS);
|
||||
LCD_CLASS lcd(LCD_I2C_ADDRESS);
|
||||
#endif
|
||||
|
||||
#elif defined(LCD_I2C_TYPE_PCA8574)
|
||||
#include <LiquidCrystal_I2C.h>
|
||||
#define LCD_CLASS LiquidCrystal_I2C
|
||||
LCD_CLASS lcd(LCD_I2C_ADDRESS, LCD_WIDTH, LCD_HEIGHT);
|
||||
|
||||
|
||||
// 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)
|
||||
extern "C" void __cxa_pure_virtual() { while (1); }
|
||||
#include <LCD.h>
|
||||
@ -353,159 +353,152 @@ static void lcd_implementation_init(
|
||||
#endif
|
||||
) {
|
||||
|
||||
#if defined(LCD_I2C_TYPE_PCF8575)
|
||||
#if defined(LCD_I2C_TYPE_PCF8575)
|
||||
lcd.begin(LCD_WIDTH, LCD_HEIGHT);
|
||||
#ifdef LCD_I2C_PIN_BL
|
||||
lcd.setBacklightPin(LCD_I2C_PIN_BL,POSITIVE);
|
||||
lcd.setBacklight(HIGH);
|
||||
#endif
|
||||
|
||||
#elif defined(LCD_I2C_TYPE_MCP23017)
|
||||
#ifdef LCD_I2C_PIN_BL
|
||||
lcd.setBacklightPin(LCD_I2C_PIN_BL, POSITIVE);
|
||||
lcd.setBacklight(HIGH);
|
||||
#endif
|
||||
|
||||
#elif defined(LCD_I2C_TYPE_MCP23017)
|
||||
lcd.setMCPType(LTI_TYPE_MCP23017);
|
||||
lcd.begin(LCD_WIDTH, LCD_HEIGHT);
|
||||
lcd.setBacklight(0); //set all the LEDs off to begin with
|
||||
|
||||
#elif defined(LCD_I2C_TYPE_MCP23008)
|
||||
|
||||
#elif defined(LCD_I2C_TYPE_MCP23008)
|
||||
lcd.setMCPType(LTI_TYPE_MCP23008);
|
||||
lcd.begin(LCD_WIDTH, LCD_HEIGHT);
|
||||
|
||||
#elif defined(LCD_I2C_TYPE_PCA8574)
|
||||
lcd.init();
|
||||
lcd.backlight();
|
||||
|
||||
#else
|
||||
#elif defined(LCD_I2C_TYPE_PCA8574)
|
||||
lcd.init();
|
||||
lcd.backlight();
|
||||
|
||||
#else
|
||||
lcd.begin(LCD_WIDTH, LCD_HEIGHT);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
lcd_set_custom_characters(
|
||||
#ifdef LCD_PROGRESS_BAR
|
||||
progress_bar_set
|
||||
#endif
|
||||
);
|
||||
lcd_set_custom_characters(
|
||||
#ifdef LCD_PROGRESS_BAR
|
||||
progress_bar_set
|
||||
#endif
|
||||
);
|
||||
|
||||
lcd.clear();
|
||||
}
|
||||
static void lcd_implementation_clear()
|
||||
{
|
||||
lcd.clear();
|
||||
lcd.clear();
|
||||
}
|
||||
|
||||
static void lcd_implementation_clear() { lcd.clear(); }
|
||||
|
||||
/* 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 += charset_mapper(c);
|
||||
}
|
||||
char c, n = 0;
|
||||
while ((c = pgm_read_byte(str++))) 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);
|
||||
}
|
||||
while ((c = str[i++])) n += charset_mapper(c);
|
||||
return n;
|
||||
}
|
||||
|
||||
unsigned lcd_print(char c) {
|
||||
return charset_mapper(c);
|
||||
}
|
||||
unsigned lcd_print(char c) { return charset_mapper(c); }
|
||||
|
||||
/*
|
||||
Possible status screens:
|
||||
16x2 |0123456789012345|
|
||||
|000/000 B000/000|
|
||||
|Status line.....|
|
||||
16x2 |000/000 B000/000|
|
||||
|0123456789012345|
|
||||
|
||||
16x4 |0123456789012345|
|
||||
|000/000 B000/000|
|
||||
|SD100% Z000.0|
|
||||
16x4 |000/000 B000/000|
|
||||
|SD100% Z000.00 |
|
||||
|F100% T--:--|
|
||||
|Status line.....|
|
||||
|0123456789012345|
|
||||
|
||||
20x2 |01234567890123456789|
|
||||
|T000/000D B000/000D |
|
||||
|Status line.........|
|
||||
20x2 |T000/000D B000/000D |
|
||||
|01234567890123456789|
|
||||
|
||||
20x4 |01234567890123456789|
|
||||
|T000/000D B000/000D |
|
||||
|X000 Y000 Z000.00|
|
||||
20x4 |T000/000D B000/000D |
|
||||
|X000 Y000 Z000.00 |
|
||||
|F100% SD100% T--:--|
|
||||
|Status line.........|
|
||||
|01234567890123456789|
|
||||
|
||||
20x4 |01234567890123456789|
|
||||
|T000/000D B000/000D |
|
||||
|T000/000D Z000.0|
|
||||
20x4 |T000/000D B000/000D |
|
||||
|T000/000D Z000.00 |
|
||||
|F100% SD100% T--:--|
|
||||
|Status line.........|
|
||||
|01234567890123456789|
|
||||
*/
|
||||
static void lcd_implementation_status_screen() {
|
||||
int tHotend = int(degHotend(0) + 0.5);
|
||||
int tTarget = int(degTargetHotend(0) + 0.5);
|
||||
|
||||
#define LCD_TEMP_ONLY(T1,T2) \
|
||||
lcd.print(itostr3(T1 + 0.5)); \
|
||||
lcd.print('/'); \
|
||||
lcd.print(itostr3left(T2 + 0.5))
|
||||
|
||||
#define LCD_TEMP(T1,T2,PREFIX) \
|
||||
lcd.print(PREFIX); \
|
||||
LCD_TEMP_ONLY(T1,T2); \
|
||||
lcd_printPGM(PSTR(LCD_STR_DEGREE " ")); \
|
||||
if (T2 < 10) lcd.print(' ')
|
||||
|
||||
//
|
||||
// Line 1
|
||||
//
|
||||
|
||||
lcd.setCursor(0, 0);
|
||||
|
||||
#if LCD_WIDTH < 20
|
||||
|
||||
lcd.setCursor(0, 0);
|
||||
lcd.print(itostr3(tHotend));
|
||||
lcd.print('/');
|
||||
lcd.print(itostr3left(tTarget));
|
||||
//
|
||||
// Hotend 0 Temperature
|
||||
//
|
||||
LCD_TEMP_ONLY(degHotend(0), degTargetHotend(0));
|
||||
|
||||
//
|
||||
// Hotend 1 or Bed Temperature
|
||||
//
|
||||
#if EXTRUDERS > 1 || TEMP_SENSOR_BED != 0
|
||||
|
||||
// If we have an 2nd extruder or heated bed, show that in the top right corner
|
||||
lcd.setCursor(8, 0);
|
||||
#if EXTRUDERS > 1
|
||||
tHotend = int(degHotend(1) + 0.5);
|
||||
tTarget = int(degTargetHotend(1) + 0.5);
|
||||
lcd.print(LCD_STR_THERMOMETER[0]);
|
||||
#else // Heated bed
|
||||
tHotend = int(degBed() + 0.5);
|
||||
tTarget = int(degTargetBed() + 0.5);
|
||||
LCD_TEMP_ONLY(degHotend(1), degTargetHotend(1));
|
||||
#else
|
||||
lcd.print(LCD_STR_BEDTEMP[0]);
|
||||
LCD_TEMP_ONLY(degBed(), degTargetBed());
|
||||
#endif
|
||||
lcd.print(itostr3(tHotend));
|
||||
lcd.print('/');
|
||||
lcd.print(itostr3left(tTarget));
|
||||
|
||||
#endif // EXTRUDERS > 1 || TEMP_SENSOR_BED != 0
|
||||
|
||||
#else // LCD_WIDTH > 19
|
||||
#else // LCD_WIDTH >= 20
|
||||
|
||||
lcd.setCursor(0, 0);
|
||||
lcd.print(LCD_STR_THERMOMETER[0]);
|
||||
lcd.print(itostr3(tHotend));
|
||||
lcd.print('/');
|
||||
lcd.print(itostr3left(tTarget));
|
||||
lcd_printPGM(PSTR(LCD_STR_DEGREE " "));
|
||||
if (tTarget < 10) lcd.print(' ');
|
||||
//
|
||||
// Hotend 0 Temperature
|
||||
//
|
||||
LCD_TEMP(degHotend(0), degTargetHotend(0), LCD_STR_THERMOMETER[0]);
|
||||
|
||||
//
|
||||
// Hotend 1 or Bed Temperature
|
||||
//
|
||||
#if EXTRUDERS > 1 || TEMP_SENSOR_BED != 0
|
||||
// If we have an 2nd extruder or heated bed, show that in the top right corner
|
||||
lcd.setCursor(10, 0);
|
||||
#if EXTRUDERS > 1
|
||||
tHotend = int(degHotend(1) + 0.5);
|
||||
tTarget = int(degTargetHotend(1) + 0.5);
|
||||
lcd.print(LCD_STR_THERMOMETER[0]);
|
||||
#else // Heated bed
|
||||
tHotend = int(degBed() + 0.5);
|
||||
tTarget = int(degTargetBed() + 0.5);
|
||||
lcd.print(LCD_STR_BEDTEMP[0]);
|
||||
LCD_TEMP(degHotend(1), degTargetHotend(1), LCD_STR_THERMOMETER[0]);
|
||||
#else
|
||||
LCD_TEMP(degBed(), degTargetBed(), LCD_STR_BEDTEMP[0]);
|
||||
#endif
|
||||
lcd.print(itostr3(tHotend));
|
||||
lcd.print('/');
|
||||
lcd.print(itostr3left(tTarget));
|
||||
lcd_printPGM(PSTR(LCD_STR_DEGREE " "));
|
||||
if (tTarget < 10) lcd.print(' ');
|
||||
|
||||
#endif // EXTRUDERS > 1 || TEMP_SENSOR_BED != 0
|
||||
|
||||
#endif // LCD_WIDTH > 19
|
||||
#endif // LCD_WIDTH >= 20
|
||||
|
||||
//
|
||||
// Line 2
|
||||
//
|
||||
|
||||
#if LCD_HEIGHT > 2
|
||||
// Lines 2 for 4 line LCD
|
||||
|
||||
#if LCD_WIDTH < 20
|
||||
|
||||
#ifdef SDSUPPORT
|
||||
lcd.setCursor(0, 2);
|
||||
lcd_printPGM(PSTR("SD"));
|
||||
@ -516,36 +509,48 @@ static void lcd_implementation_status_screen() {
|
||||
lcd.print('%');
|
||||
#endif // SDSUPPORT
|
||||
|
||||
#else // LCD_WIDTH > 19
|
||||
#else // LCD_WIDTH >= 20
|
||||
|
||||
lcd.setCursor(0, 1);
|
||||
|
||||
#if EXTRUDERS > 1 && TEMP_SENSOR_BED != 0
|
||||
// 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
|
||||
LCD_TEMP(degBed(), degTargetBed(), LCD_STR_BEDTEMP[0]);
|
||||
|
||||
#else
|
||||
lcd.setCursor(0,1);
|
||||
|
||||
lcd.print('X');
|
||||
lcd.print(ftostr3(current_position[X_AXIS]));
|
||||
if (axis_known_position[X_AXIS])
|
||||
lcd.print(ftostr3(current_position[X_AXIS]));
|
||||
else
|
||||
lcd_printPGM(PSTR("---"));
|
||||
|
||||
lcd_printPGM(PSTR(" Y"));
|
||||
lcd.print(ftostr3(current_position[Y_AXIS]));
|
||||
if (axis_known_position[Y_AXIS])
|
||||
lcd.print(ftostr3(current_position[Y_AXIS]));
|
||||
else
|
||||
lcd_printPGM(PSTR("---"));
|
||||
|
||||
#endif // EXTRUDERS > 1 || TEMP_SENSOR_BED != 0
|
||||
|
||||
#endif // LCD_WIDTH > 19
|
||||
#endif // LCD_WIDTH >= 20
|
||||
|
||||
lcd.setCursor(LCD_WIDTH - 8, 1);
|
||||
lcd.print('Z');
|
||||
lcd.print(ftostr32sp(current_position[Z_AXIS] + 0.00001));
|
||||
if (axis_known_position[Z_AXIS])
|
||||
lcd.print(ftostr32sp(current_position[Z_AXIS] + 0.00001));
|
||||
else
|
||||
lcd_printPGM(PSTR("---.--"));
|
||||
|
||||
#endif // LCD_HEIGHT > 2
|
||||
|
||||
//
|
||||
// Line 3
|
||||
//
|
||||
|
||||
#if LCD_HEIGHT > 3
|
||||
|
||||
lcd.setCursor(0, 2);
|
||||
@ -579,9 +584,10 @@ static void lcd_implementation_status_screen() {
|
||||
|
||||
#endif // LCD_HEIGHT > 3
|
||||
|
||||
/**
|
||||
* Display Progress Bar, Filament display, and/or Status Message on the last line
|
||||
*/
|
||||
//
|
||||
// Last Line
|
||||
// Status Message (which may be a Progress Bar or Filament display)
|
||||
//
|
||||
|
||||
lcd.setCursor(0, LCD_HEIGHT - 1);
|
||||
|
||||
@ -728,13 +734,13 @@ static void lcd_implementation_drawmenu_sddirectory(bool sel, uint8_t row, const
|
||||
|
||||
static void lcd_implementation_update_indicators() {
|
||||
#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;
|
||||
uint8_t leds = 0;
|
||||
if (target_temperature_bed > 0) leds |= LED_A;
|
||||
if (target_temperature[0] > 0) leds |= LED_B;
|
||||
if (fanSpeed) leds |= LED_C;
|
||||
#if EXTRUDERS > 1
|
||||
#if EXTRUDERS > 1
|
||||
if (target_temperature[1] > 0) leds |= LED_C;
|
||||
#endif
|
||||
if (leds != ledsprev) {
|
||||
@ -766,4 +772,4 @@ static void lcd_implementation_drawmenu_sddirectory(bool sel, uint8_t row, const
|
||||
|
||||
#endif // LCD_HAS_SLOW_BUTTONS
|
||||
|
||||
#endif //__ULTRALCD_IMPLEMENTATION_HITACHI_HD44780_H
|
||||
#endif // ULTRALCD_IMPLEMENTATION_HITACHI_HD44780_H
|
||||
|
Reference in New Issue
Block a user