Commit 22f2ce3f authored by MagoKimbra's avatar MagoKimbra

Update

parent edcc4c13
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
* M42 - Change pin status via gcode Use M42 Px Sy to set pin x to value y, when omitting Px the onboard led will be used. * M42 - Change pin status via gcode Use M42 Px Sy to set pin x to value y, when omitting Px the onboard led will be used.
* M49 - Z probe repetability test * M49 - Z probe repetability test
* M80 - Turn on Power Supply * M80 - Turn on Power Supply
* M81 - Turn off Power Supply * M81 - Turn off Power, including Power Supply, if possible
* M82 - Set E codes absolute (default) * M82 - Set E codes absolute (default)
* M83 - Set E codes relative while in Absolute Coordinates (G90) mode * M83 - Set E codes relative while in Absolute Coordinates (G90) mode
* M84 - Disable steppers until next move, or use S[seconds] to specify an inactivity timeout, after which the steppers will be disabled. S0 to disable the timeout. * M84 - Disable steppers until next move, or use S[seconds] to specify an inactivity timeout, after which the steppers will be disabled. S0 to disable the timeout.
......
...@@ -159,6 +159,31 @@ ...@@ -159,6 +159,31 @@
#define CONDITIONALS_H #define CONDITIONALS_H
#ifndef AT90USB
#define HardwareSerial_h // trick to disable the standard HWserial
#endif
#if (ARDUINO >= 100)
#include "Arduino.h"
#else
#include "WProgram.h"
#endif
#include "pins.h"
/**
* ENDSTOPPULLUPS
*/
#ifdef ENDSTOPPULLUPS
#define ENDSTOPPULLUP_XMAX
#define ENDSTOPPULLUP_YMAX
#define ENDSTOPPULLUP_ZMAX
#define ENDSTOPPULLUP_XMIN
#define ENDSTOPPULLUP_YMIN
#define ENDSTOPPULLUP_ZMIN
#define ENDSTOPPULLUP_EMIN
#endif
/** /**
* Firmware Test * Firmware Test
*/ */
...@@ -184,18 +209,6 @@ ...@@ -184,18 +209,6 @@
#define DRIVER_EXTRUDERS EXTRUDERS // This defines the number of Driver extruder #define DRIVER_EXTRUDERS EXTRUDERS // This defines the number of Driver extruder
#endif #endif
#ifndef AT90USB
#define HardwareSerial_h // trick to disable the standard HWserial
#endif
#if (ARDUINO >= 100)
#include "Arduino.h"
#else
#include "WProgram.h"
#endif
#include "pins.h"
/** /**
* Axis lengths * Axis lengths
*/ */
...@@ -286,16 +299,14 @@ ...@@ -286,16 +299,14 @@
#ifndef POWER_SUPPLY #ifndef POWER_SUPPLY
#define POWER_SUPPLY 0 #define POWER_SUPPLY 0
#endif #endif
// 0 = Normal - 1 = ATX #if (POWER_SUPPLY == 1) // 1 = ATX
#if (POWER_SUPPLY <= 1)
#define PS_ON_AWAKE LOW #define PS_ON_AWAKE LOW
#define PS_ON_ASLEEP HIGH #define PS_ON_ASLEEP HIGH
#endif #elif (POWER_SUPPLY == 2) // 2 = X-Box 360 203W
// 2 = X-Box 360 203W
#if (POWER_SUPPLY == 2)
#define PS_ON_AWAKE HIGH #define PS_ON_AWAKE HIGH
#define PS_ON_ASLEEP LOW #define PS_ON_ASLEEP LOW
#endif #endif
#define HAS_POWER_SWITCH (POWER_SUPPLY > 0 && defined(PS_ON_PIN) && PS_ON_PIN >= 0)
/** /**
* Temp Sensor defines * Temp Sensor defines
......
...@@ -147,7 +147,7 @@ ...@@ -147,7 +147,7 @@
// 10 is 100k RS thermistor 198-961 (4.7k pullup) // 10 is 100k RS thermistor 198-961 (4.7k pullup)
// 11 is 100k beta 3950 1% thermistor (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) // 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" // 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 // 20 is the PT100 circuit found in the Ultimainboard V2.x
// 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950 // 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
// //
...@@ -296,15 +296,15 @@ The issue: If a thermistor come off, it will read a lower temperature than actua ...@@ -296,15 +296,15 @@ The issue: If a thermistor come off, it will read a lower temperature than actua
The system will turn the heater on forever, burning up the filament and anything The system will turn the heater on forever, burning up the filament and anything
else around. else around.
After the temperature reaches the target for the first time, this feature will 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 start measuring for how long the current temperature stays below the target
minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS). minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS).
If it stays longer than _PERIOD, it means the thermistor temperature 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 cannot catch up with the target, so something *may be* wrong. Then, to be on the
safe side, the system will he halt. safe side, the system will he halt.
Bear in mind the count down will just start AFTER the first time the 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 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. your extruder heater takes 2 minutes to hit the target on heating.
...@@ -582,7 +582,7 @@ your extruder heater takes 2 minutes to hit the target on heating. ...@@ -582,7 +582,7 @@ your extruder heater takes 2 minutes to hit the target on heating.
// Support for BlinkM/CyzRgb // Support for BlinkM/CyzRgb
//#define BLINKM //#define BLINKM
// Support for STEPPERS TOSHIBA // Enable this option for Toshiba steppers
//#define CONFIG_STEPPERS_TOSHIBA //#define CONFIG_STEPPERS_TOSHIBA
// Setting firmware for filament end switch // Setting firmware for filament end switch
......
...@@ -274,7 +274,7 @@ void Config_RetrieveSettings() ...@@ -274,7 +274,7 @@ void Config_RetrieveSettings()
void Config_ResetDefault() void Config_ResetDefault()
{ {
//Setting default baudrate for serial //Setting default baudrate for serial
baudrate=BAUDRATE; baudrate = BAUDRATE;
float tmp1[] = DEFAULT_AXIS_STEPS_PER_UNIT; float tmp1[] = DEFAULT_AXIS_STEPS_PER_UNIT;
float tmp2[] = DEFAULT_MAX_FEEDRATE; float tmp2[] = DEFAULT_MAX_FEEDRATE;
...@@ -286,9 +286,9 @@ void Config_ResetDefault() ...@@ -286,9 +286,9 @@ void Config_ResetDefault()
float tmp7[] = DEFAULT_Kd; float tmp7[] = DEFAULT_Kd;
#endif // PIDTEMP #endif // PIDTEMP
#if defined(EXTRUDER_OFFSET_X) && defined(EXTRUDER_OFFSET_Y) #if defined(HOTEND_OFFSET_X) && defined(HOTEND_OFFSET_Y)
float tmp8[] = EXTRUDER_OFFSET_X; float tmp8[] = HOTEND_OFFSET_X;
float tmp9[] = EXTRUDER_OFFSET_Y; float tmp9[] = HOTEND_OFFSET_Y;
#else #else
float tmp8[] = {0,0,0,0}; float tmp8[] = {0,0,0,0};
float tmp9[] = {0,0,0,0}; float tmp9[] = {0,0,0,0};
...@@ -303,8 +303,8 @@ void Config_ResetDefault() ...@@ -303,8 +303,8 @@ void Config_ResetDefault()
for (int i = 0; i < EXTRUDERS; i++) { for (int i = 0; i < EXTRUDERS; i++) {
max_retraction_feedrate[i] = tmp3[i]; max_retraction_feedrate[i] = tmp3[i];
#if HOTENDS > 1 #if HOTENDS > 1
hotend_offset[i][X_AXIS] = tmp8[i]; hotend_offset[X_AXIS][i] = tmp8[i];
hotend_offset[i][Y_AXIS] = tmp9[i]; hotend_offset[Y_AXIS][i] = tmp9[i];
#endif #endif
#ifdef SCARA #ifdef SCARA
if (i < sizeof(axis_scaling) / sizeof(*axis_scaling)) if (i < sizeof(axis_scaling) / sizeof(*axis_scaling))
......
...@@ -19,17 +19,7 @@ ...@@ -19,17 +19,7 @@
// #define ENDSTOPPULLUP_EMIN // #define ENDSTOPPULLUP_EMIN
#endif #endif
#ifdef ENDSTOPPULLUPS // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
#define ENDSTOPPULLUP_XMAX
#define ENDSTOPPULLUP_YMAX
#define ENDSTOPPULLUP_ZMAX
#define ENDSTOPPULLUP_XMIN
#define ENDSTOPPULLUP_YMIN
#define ENDSTOPPULLUP_ZMIN
#define ENDSTOPPULLUP_EMIN
#endif
// The pullups are needed if you directly connect a mechanical end switch between the signal and ground pins.
const bool X_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop. const bool X_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Y_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop. const bool Y_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop. const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
...@@ -62,7 +52,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the log ...@@ -62,7 +52,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the log
#define DISABLE_E false // For all extruder #define DISABLE_E false // For all extruder
#define DISABLE_INACTIVE_EXTRUDER false //disable only inactive extruder and keep active extruder enabled #define DISABLE_INACTIVE_EXTRUDER false //disable only inactive extruder and keep active extruder enabled
// If you motor turns to wrong direction, you can invert it here: // Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
#define INVERT_X_DIR false #define INVERT_X_DIR false
#define INVERT_Y_DIR false #define INVERT_Y_DIR false
#define INVERT_Z_DIR false #define INVERT_Z_DIR false
...@@ -71,7 +61,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the log ...@@ -71,7 +61,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the log
#define INVERT_E2_DIR false #define INVERT_E2_DIR false
#define INVERT_E3_DIR false #define INVERT_E3_DIR false
// Travel limits after homing // Travel limits after homing (units are in mm)
#define X_MAX_POS 200 #define X_MAX_POS 200
#define X_MIN_POS 0 #define X_MIN_POS 0
#define Y_MAX_POS 200 #define Y_MAX_POS 200
...@@ -143,8 +133,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the log ...@@ -143,8 +133,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the log
// Offsets to the probe relative to the extruder tip (Hotend - Probe) // Offsets to the probe relative to the extruder tip (Hotend - Probe)
// X and Y offsets MUST be INTEGERS // X and Y offsets MUST be INTEGERS
#define X_PROBE_OFFSET_FROM_EXTRUDER 0 // -left +right #define X_PROBE_OFFSET_FROM_EXTRUDER 0 // Probe on: -left +right
#define Y_PROBE_OFFSET_FROM_EXTRUDER 0 // -front +behind #define Y_PROBE_OFFSET_FROM_EXTRUDER 0 // Probe on: -front +behind
#define Z_PROBE_OFFSET_FROM_EXTRUDER -1 // -below (always!) #define Z_PROBE_OFFSET_FROM_EXTRUDER -1 // -below (always!)
#define Z_RAISE_BEFORE_HOMING 10 // (in mm) Raise Z before homing (G28) for Probe Clearance. #define Z_RAISE_BEFORE_HOMING 10 // (in mm) Raise Z before homing (G28) for Probe Clearance.
...@@ -152,6 +142,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the log ...@@ -152,6 +142,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the log
#define Z_RAISE_BEFORE_PROBING 10 //How much the extruder will be raised before travelling to the first probing point. #define Z_RAISE_BEFORE_PROBING 10 //How much the extruder will be raised before travelling to the first probing point.
#define Z_RAISE_BETWEEN_PROBINGS 5 //How much the extruder will be raised when travelling from between next probing points #define Z_RAISE_BETWEEN_PROBINGS 5 //How much the extruder will be raised when travelling from between next probing points
#define Z_RAISE_AFTER_PROBING 5 //How much the extruder will be raised after the last probing point.
//#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell //#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell
//#define SLED_DOCKING_OFFSET 5 // the extra distance the X axis must travel to pick up the sled. 0 should be fine but you can push it further if you'd like. //#define SLED_DOCKING_OFFSET 5 // the extra distance the X axis must travel to pick up the sled. 0 should be fine but you can push it further if you'd like.
...@@ -170,9 +161,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the log ...@@ -170,9 +161,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the log
//#define BED_CENTER_AT_0_0 // If defined, the center of the bed is at (X=0, Y=0) //#define BED_CENTER_AT_0_0 // If defined, the center of the bed is at (X=0, Y=0)
//Manual homing switch locations: //Manual homing switch locations:
#define MANUAL_X_HOME_POS 0 #ifdef MANUAL_HOME_POSITIONS
#define MANUAL_Y_HOME_POS 0 #define MANUAL_X_HOME_POS 0
#define MANUAL_Z_HOME_POS 0 #define MANUAL_Y_HOME_POS 0
#define MANUAL_Z_HOME_POS 0
#endif
// MOVEMENT SETTINGS // MOVEMENT SETTINGS
#define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E #define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
...@@ -207,6 +200,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the log ...@@ -207,6 +200,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the log
//#define CUSTOM_M_CODES //#define CUSTOM_M_CODES
#ifdef CUSTOM_M_CODES #ifdef CUSTOM_M_CODES
#define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851 #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
#define Z_PROBE_OFFSET_RANGE_MIN -15 #define Z_PROBE_OFFSET_RANGE_MIN -20
#define Z_PROBE_OFFSET_RANGE_MAX -5 #define Z_PROBE_OFFSET_RANGE_MAX 20
#endif #endif
...@@ -19,24 +19,14 @@ ...@@ -19,24 +19,14 @@
// #define ENDSTOPPULLUP_EMIN // #define ENDSTOPPULLUP_EMIN
#endif #endif
#ifdef ENDSTOPPULLUPS // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
#define ENDSTOPPULLUP_XMAX const bool X_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
#define ENDSTOPPULLUP_YMAX const bool Y_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
#define ENDSTOPPULLUP_ZMAX const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
#define ENDSTOPPULLUP_XMIN const bool E_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
#define ENDSTOPPULLUP_YMIN const bool X_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
#define ENDSTOPPULLUP_ZMIN const bool Y_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
#define ENDSTOPPULLUP_EMIN const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
#endif
// The pullups are needed if you directly connect a mechanical end switch between the signal and ground pins.
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 E_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.
// ENDSTOP SETTINGS: // ENDSTOP SETTINGS:
// Sets direction of endstop when homing; 1=MAX, -1=MIN // Sets direction of endstop when homing; 1=MAX, -1=MIN
...@@ -45,7 +35,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the lo ...@@ -45,7 +35,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the lo
#define Z_HOME_DIR -1 #define Z_HOME_DIR -1
#define E_HOME_DIR -1 #define E_HOME_DIR -1
#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS. #define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below. #define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below.
...@@ -62,7 +52,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the lo ...@@ -62,7 +52,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the lo
#define DISABLE_E false // For all extruder #define DISABLE_E false // For all extruder
#define DISABLE_INACTIVE_EXTRUDER false //disable only inactive extruder and keep active extruder enabled #define DISABLE_INACTIVE_EXTRUDER false //disable only inactive extruder and keep active extruder enabled
// If you motor turns to wrong direction, you can invert it here: // Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
#define INVERT_X_DIR false #define INVERT_X_DIR false
#define INVERT_Y_DIR false #define INVERT_Y_DIR false
#define INVERT_Z_DIR false #define INVERT_Z_DIR false
...@@ -71,7 +61,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the lo ...@@ -71,7 +61,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the lo
#define INVERT_E2_DIR false #define INVERT_E2_DIR false
#define INVERT_E3_DIR false #define INVERT_E3_DIR false
// Travel limits after homing // Travel limits after homing (units are in mm)
#define X_MAX_POS 200 #define X_MAX_POS 200
#define X_MIN_POS 0 #define X_MIN_POS 0
#define Y_MAX_POS 200 #define Y_MAX_POS 200
...@@ -80,10 +70,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the lo ...@@ -80,10 +70,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the lo
#define Z_MIN_POS 0 #define Z_MIN_POS 0
#define E_MIN_POS 0 #define E_MIN_POS 0
#define X_MAX_LENGTH (X_MAX_POS - X_MIN_POS)
#define Y_MAX_LENGTH (Y_MAX_POS - Y_MIN_POS)
#define Z_MAX_LENGTH (Z_MAX_POS - Z_MIN_POS)
//===================================================================================== //=====================================================================================
//============================= Bed Manual or Auto Leveling =========================== //============================= Bed Manual or Auto Leveling ===========================
//===================================================================================== //=====================================================================================
...@@ -147,15 +133,16 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the lo ...@@ -147,15 +133,16 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the lo
// Offsets to the probe relative to the extruder tip (Hotend - Probe) // Offsets to the probe relative to the extruder tip (Hotend - Probe)
// X and Y offsets must be integers // X and Y offsets must be integers
#define X_PROBE_OFFSET_FROM_EXTRUDER 0 // -left +right #define X_PROBE_OFFSET_FROM_EXTRUDER 0 // Probe on: -left +right
#define Y_PROBE_OFFSET_FROM_EXTRUDER 0 // -front +behind #define Y_PROBE_OFFSET_FROM_EXTRUDER 0 // Probe on: -front +behind
#define Z_PROBE_OFFSET_FROM_EXTRUDER -1 // -below (always!) #define Z_PROBE_OFFSET_FROM_EXTRUDER -1 // -below (always!)
#define Z_RAISE_BEFORE_HOMING 10 // (in mm) Raise Z before homing (G28) for Probe Clearance. #define Z_RAISE_BEFORE_HOMING 10 // (in mm) Raise Z before homing (G28) for Probe Clearance.
// Be sure you have this distance over your Z_MAX_POS in case // Be sure you have this distance over your Z_MAX_POS in case
#define Z_RAISE_BEFORE_PROBING 10 //How much the extruder will be raised before travelling to the first probing point. #define Z_RAISE_BEFORE_PROBING 10 //How much the extruder will be raised before travelling to the first probing point.
#define Z_RAISE_BETWEEN_PROBINGS 5 //How much the extruder will be raised when travelling from between next probing points #define Z_RAISE_BETWEEN_PROBINGS 5 //How much the extruder will be raised when travelling from between next probing points
#define Z_RAISE_AFTER_PROBING 5 //How much the extruder will be raised after the last probing point.
//#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell //#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell
//#define SLED_DOCKING_OFFSET 5 // the extra distance the X axis must travel to pick up the sled. 0 should be fine but you can push it further if you'd like. //#define SLED_DOCKING_OFFSET 5 // the extra distance the X axis must travel to pick up the sled. 0 should be fine but you can push it further if you'd like.
...@@ -174,9 +161,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the lo ...@@ -174,9 +161,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the lo
//#define BED_CENTER_AT_0_0 // If defined, the center of the bed is at (X=0, Y=0) //#define BED_CENTER_AT_0_0 // If defined, the center of the bed is at (X=0, Y=0)
//Manual homing switch locations: //Manual homing switch locations:
#define MANUAL_X_HOME_POS 0 #ifdef MANUAL_HOME_POSITIONS
#define MANUAL_Y_HOME_POS 0 #define MANUAL_X_HOME_POS 0
#define MANUAL_Z_HOME_POS 0 #define MANUAL_Y_HOME_POS 0
#define MANUAL_Z_HOME_POS 0
#endif
// MOVEMENT SETTINGS // MOVEMENT SETTINGS
#define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E #define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
...@@ -211,6 +200,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the lo ...@@ -211,6 +200,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the lo
//#define CUSTOM_M_CODES //#define CUSTOM_M_CODES
#ifdef CUSTOM_M_CODES #ifdef CUSTOM_M_CODES
#define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851 #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
#define Z_PROBE_OFFSET_RANGE_MIN -15 #define Z_PROBE_OFFSET_RANGE_MIN -20
#define Z_PROBE_OFFSET_RANGE_MAX -5 #define Z_PROBE_OFFSET_RANGE_MAX 20
#endif #endif
...@@ -43,17 +43,7 @@ ...@@ -43,17 +43,7 @@
// #define ENDSTOPPULLUP_ZMIN // #define ENDSTOPPULLUP_ZMIN
#endif #endif
#ifdef ENDSTOPPULLUPS // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
#define ENDSTOPPULLUP_XMAX
#define ENDSTOPPULLUP_YMAX
#define ENDSTOPPULLUP_ZMAX
#define ENDSTOPPULLUP_XMIN
#define ENDSTOPPULLUP_YMIN
#define ENDSTOPPULLUP_ZMIN
#define ENDSTOPPULLUP_EMIN
#endif
// The pullups are needed if you directly connect a mechanical end switch between the signal and ground pins.
const bool X_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. const bool X_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Y_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. const bool Y_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Z_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. const bool Z_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
...@@ -86,7 +76,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the log ...@@ -86,7 +76,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the log
#define DISABLE_E false // For all extruder #define DISABLE_E false // For all extruder
#define DISABLE_INACTIVE_EXTRUDER false //disable only inactive extruder and keep active extruder enabled #define DISABLE_INACTIVE_EXTRUDER false //disable only inactive extruder and keep active extruder enabled
// If you motor turns to wrong direction, you can invert it here: // Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
#define INVERT_X_DIR false #define INVERT_X_DIR false
#define INVERT_Y_DIR false #define INVERT_Y_DIR false
#define INVERT_Z_DIR true #define INVERT_Z_DIR true
...@@ -95,7 +85,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the log ...@@ -95,7 +85,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the log
#define INVERT_E2_DIR false #define INVERT_E2_DIR false
#define INVERT_E3_DIR false #define INVERT_E3_DIR false
// Travel limits after homing // Travel limits after homing (units are in mm)
#define X_MAX_POS 200 #define X_MAX_POS 200
#define X_MIN_POS 0 #define X_MIN_POS 0
#define Y_MAX_POS 200 #define Y_MAX_POS 200
...@@ -104,10 +94,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the log ...@@ -104,10 +94,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the log
#define Z_MIN_POS MANUAL_Z_HOME_POS #define Z_MIN_POS MANUAL_Z_HOME_POS
#define E_MIN_POS 0 #define E_MIN_POS 0
#define X_MAX_LENGTH (X_MAX_POS - X_MIN_POS)
#define Y_MAX_LENGTH (Y_MAX_POS - Y_MIN_POS)
#define Z_MAX_LENGTH (Z_MAX_POS - Z_MIN_POS)
//===================================================================================== //=====================================================================================
//============================= Bed Manual or Auto Leveling =========================== //============================= Bed Manual or Auto Leveling ===========================
//===================================================================================== //=====================================================================================
...@@ -118,7 +104,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the log ...@@ -118,7 +104,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the log
#define FRONT_PROBE_BED_POSITION 20 #define FRONT_PROBE_BED_POSITION 20
#define BACK_PROBE_BED_POSITION 180 #define BACK_PROBE_BED_POSITION 180
#define XY_TRAVEL_SPEED 8000 // X and Y axis travel speed between probes, in mm/min #define XY_TRAVEL_SPEED 10000 // X and Y axis travel speed between probes, in mm/min
//If you have enabled the Auto Bed Levelling and are using the same Z Probe for Z Homing, //If you have enabled the Auto Bed Levelling and are using the same Z Probe for Z Homing,
//it is highly recommended you let this Z_SAFE_HOMING enabled!!! //it is highly recommended you let this Z_SAFE_HOMING enabled!!!
...@@ -171,15 +157,16 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the log ...@@ -171,15 +157,16 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the log
// Offsets to the probe relative to the extruder tip (Hotend - Probe) // Offsets to the probe relative to the extruder tip (Hotend - Probe)
// X and Y offsets must be integers // X and Y offsets must be integers
#define X_PROBE_OFFSET_FROM_EXTRUDER 0 // -left +right #define X_PROBE_OFFSET_FROM_EXTRUDER 0 // Probe on: -left +right
#define Y_PROBE_OFFSET_FROM_EXTRUDER 0 // -front +behind #define Y_PROBE_OFFSET_FROM_EXTRUDER 0 // Probe on: -front +behind
#define Z_PROBE_OFFSET_FROM_EXTRUDER -1 // -below (always!) #define Z_PROBE_OFFSET_FROM_EXTRUDER -1 // -below (always!)
#define Z_RAISE_BEFORE_HOMING 10 // (in mm) Raise Z before homing (G28) for Probe Clearance. #define Z_RAISE_BEFORE_HOMING 10 // (in mm) Raise Z before homing (G28) for Probe Clearance.
// Be sure you have this distance over your Z_MAX_POS in case // Be sure you have this distance over your Z_MAX_POS in case
#define Z_RAISE_BEFORE_PROBING 10 //How much the extruder will be raised before travelling to the first probing point. #define Z_RAISE_BEFORE_PROBING 10 //How much the extruder will be raised before travelling to the first probing point.
#define Z_RAISE_BETWEEN_PROBINGS 5 //How much the extruder will be raised when travelling from between next probing points #define Z_RAISE_BETWEEN_PROBINGS 5 //How much the extruder will be raised when travelling from between next probing points
#define Z_RAISE_AFTER_PROBING 5 //How much the extruder will be raised after the last probing point.
//#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell //#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell
//#define SLED_DOCKING_OFFSET 5 // the extra distance the X axis must travel to pick up the sled. 0 should be fine but you can push it further if you'd like. //#define SLED_DOCKING_OFFSET 5 // the extra distance the X axis must travel to pick up the sled. 0 should be fine but you can push it further if you'd like.
...@@ -194,14 +181,16 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the log ...@@ -194,14 +181,16 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the log
// The position of the homing switches // The position of the homing switches
//#define MANUAL_HOME_POSITIONS // If defined, MANUAL_*_HOME_POS below will be used #define MANUAL_HOME_POSITIONS // If defined, MANUAL_*_HOME_POS below will be used
//#define BED_CENTER_AT_0_0 // If defined, the center of the bed is at (X=0, Y=0) //#define BED_CENTER_AT_0_0 // If defined, the center of the bed is at (X=0, Y=0)
//Manual homing switch locations: //Manual homing switch locations:
// For SCARA: Offset between HomingPosition and Bed X=0 / Y=0 // For SCARA: Offset between HomingPosition and Bed X=0 / Y=0
#ifdef MANUAL_HOME_POSITIONS
#define MANUAL_X_HOME_POS -22 #define MANUAL_X_HOME_POS -22
#define MANUAL_Y_HOME_POS -52 #define MANUAL_Y_HOME_POS -52
#define MANUAL_Z_HOME_POS 0.1 // Distance between nozzle and print surface after homing. #define MANUAL_Z_HOME_POS 0.1 // Distance between nozzle and print surface after homing.
#endif
// MOVEMENT SETTINGS // MOVEMENT SETTINGS
#define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E #define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
...@@ -236,6 +225,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the log ...@@ -236,6 +225,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the log
//#define CUSTOM_M_CODES //#define CUSTOM_M_CODES
#ifdef CUSTOM_M_CODES #ifdef CUSTOM_M_CODES
#define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851 #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
#define Z_PROBE_OFFSET_RANGE_MIN -15 #define Z_PROBE_OFFSET_RANGE_MIN -20
#define Z_PROBE_OFFSET_RANGE_MAX -5 #define Z_PROBE_OFFSET_RANGE_MAX 20
#endif #endif
...@@ -115,28 +115,27 @@ ...@@ -115,28 +115,27 @@
#ifdef Z_DUAL_STEPPER_DRIVERS #ifdef Z_DUAL_STEPPER_DRIVERS
// Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper. // Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper.
// That way the machine is capable to align the bed during home, since both Z steppers are homed. // That way the machine is capable to align the bed during home, since both Z steppers are homed.
// There is also an implementation of M666 (software endstops adjustment) to this feature. // There is also an implementation of M666 (software endstops adjustment) to this feature.
// After Z homing, this adjustment is applied to just one of the steppers in order to align the bed. // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed.
// One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2. // One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2.
// If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive. // If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive.
// Play a little bit with small adjustments (0.5mm) and check the behaviour. // Play a little bit with small adjustments (0.5mm) and check the behaviour.
// The M119 (endstops report) will start reporting the Z2 Endstop as well. // The M119 (endstops report) will start reporting the Z2 Endstop as well.
#define Z_DUAL_ENDSTOPS #define Z_DUAL_ENDSTOPS
#ifdef Z_DUAL_ENDSTOPS #ifdef Z_DUAL_ENDSTOPS
#define Z2_STEP_PIN E2_STEP_PIN // Stepper to be used to Z2 axis. #define Z2_STEP_PIN E2_STEP_PIN // Stepper to be used to Z2 axis.
#define Z2_DIR_PIN E2_DIR_PIN #define Z2_DIR_PIN E2_DIR_PIN
#define Z2_ENABLE_PIN E2_ENABLE_PIN #define Z2_ENABLE_PIN E2_ENABLE_PIN
#define Z2_MAX_PIN 36 //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36) #define Z2_MAX_PIN 36 //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36)
const bool Z2_MAX_ENDSTOP_INVERTING = false; const bool Z2_MAX_ENDSTOP_INVERTING = false;
#define DISABLE_XMAX_ENDSTOP //Better to disable the XMAX to avoid conflict. Just rename "XMAX_ENDSTOP" by the endstop you are using for Z2 axis. #define DISABLE_XMAX_ENDSTOP //Better to disable the XMAX to avoid conflict. Just rename "XMAX_ENDSTOP" by the endstop you are using for Z2 axis.
#endif #endif
#endif // Z_DUAL_STEPPER_DRIVERS
#endif
// Same again but for Y Axis. // Same again but for Y Axis.
//#define Y_DUAL_STEPPER_DRIVERS //#define Y_DUAL_STEPPER_DRIVERS
...@@ -248,34 +247,44 @@ ...@@ -248,34 +247,44 @@
//=========================================================================== //===========================================================================
#define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly #define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
#define ENCODER_10X_STEPS_PER_SEC 75 // If the encoder steps per sec exceeds this value, multiple the steps moved by ten to quickly advance the value #define ENCODER_10X_STEPS_PER_SEC 75 // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
#define ENCODER_100X_STEPS_PER_SEC 160 // If the encoder steps per sec exceeds this value, multiple the steps moved by 100 to really quickly advance the value #define ENCODER_100X_STEPS_PER_SEC 160 // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
//#define ENCODER_RATE_MULTIPLIER_DEBUG // If defined, output the encoder steps per second value //#define ENCODER_RATE_MULTIPLIER_DEBUG // If defined, output the encoder steps per second value
//#define CHDK 4 //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/ //#define CHDK 4 //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
#define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? #ifdef SDSUPPORT
#define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
// If you are using a RAMPS board or cheap E-bay purchased boards that do not detect when an SD card is inserted
#define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. // You can get round this by connecting a push button or single throw switch to the pin defined as SDCARDCARDDETECT
// 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. // in the pins.h file. When using a push button pulling the pin to ground this will need inverted. This setting should
// using: // be commented out otherwise
//#define MENU_ADDAUTOSTART #define SDCARDDETECTINVERTED
//========================= LCD PROGRESS BAR ====================== #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers?
// Show a progress bar on HD44780 LCDs for SD printing #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
//#define LCD_PROGRESS_BAR
#ifdef LCD_PROGRESS_BAR #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order.
// Amount of time (ms) to show the bar // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that.
#define PROGRESS_BAR_BAR_TIME 2000 // using:
// Amount of time (ms) to show the status message //#define MENU_ADDAUTOSTART
#define PROGRESS_BAR_MSG_TIME 3000
// Amount of time (ms) to retain the status message (0=forever) // Show a progress bar on HD44780 LCDs for SD printing
#define PROGRESS_MSG_EXPIRE 0 //#define LCD_PROGRESS_BAR
// Enable this to show messages for MSG_TIME then hide them
//#define PROGRESS_MSG_ONCE #ifdef LCD_PROGRESS_BAR
#endif // Amount of time (ms) to show the bar
#define PROGRESS_BAR_BAR_TIME 5000
// Amount of time (ms) to show the status message
#define PROGRESS_BAR_MSG_TIME 1500
// 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
// The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation. // The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
//#define USE_WATCHDOG //#define USE_WATCHDOG
...@@ -321,12 +330,6 @@ ...@@ -321,12 +330,6 @@
const unsigned int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement const unsigned int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement
// 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
// Control heater 0 and heater 1 in parallel. // Control heater 0 and heater 1 in parallel.
//#define HEATERS_PARALLEL //#define HEATERS_PARALLEL
......
...@@ -257,7 +257,7 @@ extern float home_offset[3]; ...@@ -257,7 +257,7 @@ extern float home_offset[3];
#else #else
#define NUM_HOTEND_OFFSETS 3 // supports offsets in XYZ plane #define NUM_HOTEND_OFFSETS 3 // supports offsets in XYZ plane
#endif #endif
extern float hotend_offset[HOTENDS][NUM_HOTEND_OFFSETS]; extern float hotend_offset[NUM_HOTEND_OFFSETS][HOTENDS];
#endif // HOTENDS > 1 #endif // HOTENDS > 1
#ifdef NPR2 #ifdef NPR2
......
This diff is collapsed.
...@@ -17,8 +17,11 @@ ...@@ -17,8 +17,11 @@
* Progress Bar * Progress Bar
*/ */
#ifdef LCD_PROGRESS_BAR #ifdef LCD_PROGRESS_BAR
#ifndef SDSUPPORT
#error LCD_PROGRESS_BAR requires SDSUPPORT.
#endif
#ifdef DOGLCD #ifdef DOGLCD
#warning LCD_PROGRESS_BAR does not apply to graphical displays. #error LCD_PROGRESS_BAR does not apply to graphical displays.
#endif #endif
#ifdef FILAMENT_LCD_DISPLAY #ifdef FILAMENT_LCD_DISPLAY
#error LCD_PROGRESS_BAR and FILAMENT_LCD_DISPLAY are not fully compatible. Comment out this line to use both. #error LCD_PROGRESS_BAR and FILAMENT_LCD_DISPLAY are not fully compatible. Comment out this line to use both.
......
...@@ -358,12 +358,12 @@ static void lcd_implementation_status_screen() { ...@@ -358,12 +358,12 @@ static void lcd_implementation_status_screen() {
#else #else
u8g.setPrintPos(0,63); u8g.setPrintPos(0,63);
#endif #endif
#if HAS_FILAMENT_SENSOR #if HAS_FILAMENT_SENSOR || HAS_POWER_CONSUMPTION_SENSOR
if (millis() < message_millis + 5000) { //Display both Status message line and Filament display on the last line if (millis() < message_millis + 5000) { //Display both Status message line and Filament display on the last line
lcd_print(lcd_status_message); lcd_print(lcd_status_message);
} }
#if (defined(POWER_CONSUMPTION) && defined(POWER_CONSUMPTION_PIN) && POWER_CONSUMPTION_PIN >= 0) && defined(POWER_CONSUMPTION_LCD_DISPLAY) #if HAS_POWER_CONSUMPTION_SENSOR && defined(POWER_CONSUMPTION_LCD_DISPLAY)
#if (defined(FILAMENT_SENSOR) && defined(FILWIDTH_PIN) && FILWIDTH_PIN >= 0) && defined(FILAMENT_LCD_DISPLAY) #if HAS_FILAMENT_SENSOR && defined(FILAMENT_LCD_DISPLAY)
else if (millis() < message_millis + 10000) else if (millis() < message_millis + 10000)
#else #else
else else
...@@ -376,7 +376,7 @@ static void lcd_implementation_status_screen() { ...@@ -376,7 +376,7 @@ static void lcd_implementation_status_screen() {
lcd_printPGM(PSTR("Wh")); lcd_printPGM(PSTR("Wh"));
} }
#endif #endif
#if (defined(FILAMENT_SENSOR) && defined(FILWIDTH_PIN) && FILWIDTH_PIN >= 0) && defined(FILAMENT_LCD_DISPLAY) #if HAS_FILAMENT_SENSOR && defined(FILAMENT_LCD_DISPLAY)
else { else {
lcd_printPGM(PSTR("D:")); lcd_printPGM(PSTR("D:"));
lcd_print(ftostr12ns(filament_width_meas)); lcd_print(ftostr12ns(filament_width_meas));
......
...@@ -150,6 +150,9 @@ ...@@ -150,6 +150,9 @@
#define MSG_ERR_MINTEMP "Err: MINTEMP" #define MSG_ERR_MINTEMP "Err: MINTEMP"
#define MSG_ERR_MAXTEMP_BED "Err: MAXTEMP BED" #define MSG_ERR_MAXTEMP_BED "Err: MAXTEMP BED"
#define MSG_END_HOUR "hours"
#define MSG_END_MINUTE "minutes"
#ifdef DELTA #ifdef DELTA
#define MSG_DELTA_CALIBRATE "Delta Calibration" #define MSG_DELTA_CALIBRATE "Delta Calibration"
#define MSG_DELTA_CALIBRATE_X "Calibrate X" #define MSG_DELTA_CALIBRATE_X "Calibrate X"
......
...@@ -146,6 +146,9 @@ ...@@ -146,6 +146,9 @@
#define MSG_ERR_MINTEMP "Err: MINTEMP" #define MSG_ERR_MINTEMP "Err: MINTEMP"
#define MSG_ERR_MAXTEMP_BED "Err: MAXTEMP BED" #define MSG_ERR_MAXTEMP_BED "Err: MAXTEMP BED"
#define MSG_END_HOUR "ore"
#define MSG_END_MINUTE "minuti"
#ifdef DELTA #ifdef DELTA
#define MSG_DELTA_CALIBRATE "Calibraz. Delta" #define MSG_DELTA_CALIBRATE "Calibraz. Delta"
#define MSG_DELTA_CALIBRATE_X "Calibra X" #define MSG_DELTA_CALIBRATE_X "Calibra X"
......
...@@ -441,7 +441,9 @@ ISR(TIMER1_COMPA_vect) { ...@@ -441,7 +441,9 @@ ISR(TIMER1_COMPA_vect) {
{ {
current_block = NULL; current_block = NULL;
plan_discard_current_block(); plan_discard_current_block();
if ((cleaning_buffer_counter == 1) && (SD_FINISHED_STEPPERRELEASE)) enquecommands_P(PSTR(SD_FINISHED_RELEASECOMMAND)); #ifdef SD_FINISHED_RELEASECOMMAND
if ((cleaning_buffer_counter == 1) && (SD_FINISHED_STEPPERRELEASE)) enquecommands_P(PSTR(SD_FINISHED_RELEASECOMMAND));
#endif
cleaning_buffer_counter--; cleaning_buffer_counter--;
OCR1A = 200; OCR1A = 200;
return; return;
...@@ -564,74 +566,98 @@ ISR(TIMER1_COMPA_vect) { ...@@ -564,74 +566,98 @@ ISR(TIMER1_COMPA_vect) {
} }
if (TEST(out_bits, Z_AXIS)) { // -direction if (TEST(out_bits, Z_AXIS)) { // -direction
Z_APPLY_DIR(INVERT_Z_DIR,0); Z_APPLY_DIR(INVERT_Z_DIR,0);
count_direction[Z_AXIS] = -1; count_direction[Z_AXIS] = -1;
if (check_endstops)
{ if (check_endstops) {
#if defined(Z_MIN_PIN) && Z_MIN_PIN > -1
#ifndef Z_DUAL_ENDSTOPS #if defined(Z_MIN_PIN) && Z_MIN_PIN >= 0
UPDATE_ENDSTOP(z, Z, min, MIN);
#else #ifdef Z_DUAL_ENDSTOPS
bool z_min_endstop=(READ(Z_MIN_PIN) != Z_MIN_ENDSTOP_INVERTING);
#if defined(Z2_MIN_PIN) && Z2_MIN_PIN > -1 bool z_min_endstop = READ(Z_MIN_PIN) != Z_MIN_ENDSTOP_INVERTING,
bool z2_min_endstop=(READ(Z2_MIN_PIN) != Z2_MIN_ENDSTOP_INVERTING); z2_min_endstop =
#else #if defined(Z2_MIN_PIN) && Z2_MIN_PIN >= 0
bool z2_min_endstop=z_min_endstop; READ(Z2_MIN_PIN) != Z2_MIN_ENDSTOP_INVERTING
#endif #else
if(((z_min_endstop && old_z_min_endstop) || (z2_min_endstop && old_z2_min_endstop)) && (current_block->steps[Z_AXIS] > 0)) z_min_endstop
{ #endif
;
bool z_min_both = z_min_endstop && old_z_min_endstop,
z2_min_both = z2_min_endstop && old_z2_min_endstop;
if ((z_min_both || z2_min_both) && current_block->steps[Z_AXIS] > 0) {
endstops_trigsteps[Z_AXIS] = count_position[Z_AXIS]; endstops_trigsteps[Z_AXIS] = count_position[Z_AXIS];
endstop_z_hit=true; endstop_z_hit = true;
if (!(performing_homing) || ((performing_homing)&&(z_min_endstop && old_z_min_endstop)&&(z2_min_endstop && old_z2_min_endstop))) //if not performing home or if both endstops were trigged during homing... if (!performing_homing || (performing_homing && z_min_both && z2_min_both)) //if not performing home or if both endstops were trigged during homing...
{
step_events_completed = current_block->step_event_count; step_events_completed = current_block->step_event_count;
}
} }
old_z_min_endstop = z_min_endstop; old_z_min_endstop = z_min_endstop;
old_z2_min_endstop = z2_min_endstop; old_z2_min_endstop = z2_min_endstop;
#endif
#endif #else // !Z_DUAL_ENDSTOPS
}
UPDATE_ENDSTOP(z, Z, min, MIN);
#endif // !Z_DUAL_ENDSTOPS
#endif // Z_MIN_PIN
} // check_endstops
} }
else { // +direction else { // +direction
Z_APPLY_DIR(!INVERT_Z_DIR,0); Z_APPLY_DIR(!INVERT_Z_DIR,0);
count_direction[Z_AXIS] = 1; count_direction[Z_AXIS] = 1;
if (check_endstops) { if (check_endstops) {
#if defined(Z_MAX_PIN) && Z_MAX_PIN >= 0 #if defined(Z_MAX_PIN) && Z_MAX_PIN >= 0
#ifndef Z_DUAL_ENDSTOPS
UPDATE_ENDSTOP(z, Z, max, MAX); #ifdef Z_DUAL_ENDSTOPS
#else
bool z_max_endstop=(READ(Z_MAX_PIN) != Z_MAX_ENDSTOP_INVERTING); bool z_max_endstop = READ(Z_MAX_PIN) != Z_MAX_ENDSTOP_INVERTING,
#if defined(Z2_MAX_PIN) && Z2_MAX_PIN > -1 z2_max_endstop =
bool z2_max_endstop=(READ(Z2_MAX_PIN) != Z2_MAX_ENDSTOP_INVERTING); #if defined(Z2_MAX_PIN) && Z2_MAX_PIN >= 0
#else READ(Z2_MAX_PIN) != Z2_MAX_ENDSTOP_INVERTING
bool z2_max_endstop=z_max_endstop; #else
#endif z_max_endstop
if(((z_max_endstop && old_z_max_endstop) || (z2_max_endstop && old_z2_max_endstop)) && (current_block->steps[Z_AXIS] > 0)) #endif
{ ;
bool z_max_both = z_max_endstop && old_z_max_endstop,
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]; endstops_trigsteps[Z_AXIS] = count_position[Z_AXIS];
endstop_z_hit=true; endstop_z_hit = true;
// if (z_max_endstop && old_z_max_endstop) SERIAL_ECHOLN("z_max_endstop = true"); // if (z_max_both) SERIAL_ECHOLN("z_max_endstop = true");
// if (z2_max_endstop && old_z2_max_endstop) SERIAL_ECHOLN("z2_max_endstop = true"); // if (z2_max_both) SERIAL_ECHOLN("z2_max_endstop = true");
if (!performing_homing || (performing_homing && z_max_both && z2_max_both)) //if not performing home or if both endstops were trigged during homing...
if (!(performing_homing) || ((performing_homing)&&(z_max_endstop && old_z_max_endstop)&&(z2_max_endstop && old_z2_max_endstop))) //if not performing home or if both endstops were trigged during homing...
{
step_events_completed = current_block->step_event_count; step_events_completed = current_block->step_event_count;
}
} }
old_z_max_endstop = z_max_endstop; old_z_max_endstop = z_max_endstop;
old_z2_max_endstop = z2_max_endstop; old_z2_max_endstop = z2_max_endstop;
#endif
#endif #else // !Z_DUAL_ENDSTOPS
}
} UPDATE_ENDSTOP(z, Z, max, MAX);
#endif // !Z_DUAL_ENDSTOPS
#endif // Z_MAX_PIN
} // check_endstops
} // +direction
#ifndef ADVANCE #ifndef ADVANCE
if (TEST(out_bits, E_AXIS)) { // -direction if (TEST(out_bits, E_AXIS)) { // -direction
REV_E_DIR(); REV_E_DIR();
count_direction[E_AXIS]=-1; count_direction[E_AXIS] = -1;
#ifdef NPR2 #ifdef NPR2
if (check_endstops) { if (check_endstops) {
#if defined(E_MIN_PIN) && E_MIN_PIN > -1 #if defined(E_MIN_PIN) && E_MIN_PIN > -1
...@@ -648,12 +674,12 @@ ISR(TIMER1_COMPA_vect) { ...@@ -648,12 +674,12 @@ ISR(TIMER1_COMPA_vect) {
} }
else { // +direction else { // +direction
NORM_E_DIR(); NORM_E_DIR();
count_direction[E_AXIS]=1; count_direction[E_AXIS] = 1;
} }
#endif //!ADVANCE #endif //!ADVANCE
// Take multiple steps per interrupt (For high speed moves) // Take multiple steps per interrupt (For high speed moves)
for (int8_t i=0; i < step_loops; i++) { for (int8_t i = 0; i < step_loops; i++) {
#ifndef AT90USB #ifndef AT90USB
MSerial.checkRx(); // Check for serial chars. MSerial.checkRx(); // Check for serial chars.
#endif #endif
...@@ -811,51 +837,52 @@ ISR(TIMER1_COMPA_vect) { ...@@ -811,51 +837,52 @@ ISR(TIMER1_COMPA_vect) {
E0_STEP_WRITE(!INVERT_E_STEP_PIN); E0_STEP_WRITE(!INVERT_E_STEP_PIN);
} }
} }
#if DRIVER_EXTRUDERS > 1 #if DRIVER_EXTRUDERS > 1
if (e_steps[1] != 0) { if (e_steps[1] != 0) {
E1_STEP_WRITE(INVERT_E_STEP_PIN); E1_STEP_WRITE(INVERT_E_STEP_PIN);
if (e_steps[1] < 0) { if (e_steps[1] < 0) {
E1_DIR_WRITE(INVERT_E1_DIR); E1_DIR_WRITE(INVERT_E1_DIR);
e_steps[1]++; e_steps[1]++;
E1_STEP_WRITE(!INVERT_E_STEP_PIN); E1_STEP_WRITE(!INVERT_E_STEP_PIN);
}
else if (e_steps[1] > 0) {
E1_DIR_WRITE(!INVERT_E1_DIR);
e_steps[1]--;
E1_STEP_WRITE(!INVERT_E_STEP_PIN);
}
} }
#endif else if (e_steps[1] > 0) {
#if DRIVER_EXTRUDERS > 2 E1_DIR_WRITE(!INVERT_E1_DIR);
if (e_steps[2] != 0) { e_steps[1]--;
E2_STEP_WRITE(INVERT_E_STEP_PIN); E1_STEP_WRITE(!INVERT_E_STEP_PIN);
if (e_steps[2] < 0) {
E2_DIR_WRITE(INVERT_E2_DIR);
e_steps[2]++;
E2_STEP_WRITE(!INVERT_E_STEP_PIN);
}
else if (e_steps[2] > 0) {
E2_DIR_WRITE(!INVERT_E2_DIR);
e_steps[2]--;
E2_STEP_WRITE(!INVERT_E_STEP_PIN);
}
} }
#endif }
#if DRIVER_EXTRUDERS > 3 #endif
if (e_steps[3] != 0) { #if DRIVER_EXTRUDERS > 2
E3_STEP_WRITE(INVERT_E_STEP_PIN); if (e_steps[2] != 0) {
if (e_steps[3] < 0) { E2_STEP_WRITE(INVERT_E_STEP_PIN);
E3_DIR_WRITE(INVERT_E3_DIR); if (e_steps[2] < 0) {
e_steps[3]++; E2_DIR_WRITE(INVERT_E2_DIR);
E3_STEP_WRITE(!INVERT_E_STEP_PIN); e_steps[2]++;
} E2_STEP_WRITE(!INVERT_E_STEP_PIN);
else if (e_steps[3] > 0) {
E3_DIR_WRITE(!INVERT_E3_DIR);
e_steps[3]--;
E3_STEP_WRITE(!INVERT_E_STEP_PIN);
}
} }
#endif else if (e_steps[2] > 0) {
E2_DIR_WRITE(!INVERT_E2_DIR);
e_steps[2]--;
E2_STEP_WRITE(!INVERT_E_STEP_PIN);
}
}
#endif
#if DRIVER_EXTRUDERS > 3
if (e_steps[3] != 0) {
E3_STEP_WRITE(INVERT_E_STEP_PIN);
if (e_steps[3] < 0) {
E3_DIR_WRITE(INVERT_E3_DIR);
e_steps[3]++;
E3_STEP_WRITE(!INVERT_E_STEP_PIN);
}
else if (e_steps[3] > 0) {
E3_DIR_WRITE(!INVERT_E3_DIR);
e_steps[3]--;
E3_STEP_WRITE(!INVERT_E_STEP_PIN);
}
}
#endif
} }
} }
#endif // ADVANCE #endif // ADVANCE
......
This diff is collapsed.
...@@ -8,16 +8,20 @@ ...@@ -8,16 +8,20 @@
int lcd_strlen_P(const char *s); int lcd_strlen_P(const char *s);
void lcd_update(); void lcd_update();
void lcd_init(); void lcd_init();
void lcd_setstatus(const char* message); void lcd_setstatus(const char* message, const bool persist=false);
void lcd_setstatuspgm(const char* message); void lcd_setstatuspgm(const char* message, const uint8_t level=0);
void lcd_setalertstatuspgm(const char* message); void lcd_setalertstatuspgm(const char* message);
void lcd_reset_alert_level(); void lcd_reset_alert_level();
bool lcd_detected(void); bool lcd_detected(void);
#if defined(DOGLCD) && LCD_CONTRAST >= 0 #if defined(LCD_PROGRESS_BAR) && PROGRESS_MSG_EXPIRE > 0
extern int lcd_contrast; void dontExpireStatus();
void lcd_setcontrast(uint8_t value); #endif
#endif
#if defined(DOGLCD) && LCD_CONTRAST >= 0
extern int lcd_contrast;
void lcd_setcontrast(uint8_t value);
#endif
void set_pageShowInfo(int value); void set_pageShowInfo(int value);
void set_ChangeScreen(boolean state); void set_ChangeScreen(boolean state);
...@@ -54,7 +58,7 @@ ...@@ -54,7 +58,7 @@
extern bool cancel_heatup; extern bool cancel_heatup;
#if (defined(FILAMENT_SENSOR) && defined(FILWIDTH_PIN) && FILWIDTH_PIN >= 0) && defined(FILAMENT_LCD_DISPLAY) || (defined(POWER_CONSUMPTION) && defined(POWER_CONSUMPTION_PIN) && POWER_CONSUMPTION_PIN >= 0) && defined(POWER_CONSUMPTION_LCD_DISPLAY) #if (HAS_FILAMENT_SENSOR && defined(FILAMENT_LCD_DISPLAY)) || (HAS_POWER_CONSUMPTION_SENSOR && defined(POWER_CONSUMPTION_LCD_DISPLAY))
extern unsigned long message_millis; extern unsigned long message_millis;
#endif #endif
......
...@@ -193,10 +193,10 @@ ...@@ -193,10 +193,10 @@
#include "utf_mapper.h" #include "utf_mapper.h"
#if defined(LCD_PROGRESS_BAR) && defined(SDSUPPORT) #ifdef LCD_PROGRESS_BAR
static uint16_t progressBarTick = 0; static uint16_t progressBarTick = 0;
#if PROGRESS_MSG_EXPIRE > 0 #if PROGRESS_MSG_EXPIRE > 0
static uint16_t messageTick = 0; static uint16_t expireStatusMillis = 0;
#endif #endif
#define LCD_STR_PROGRESS "\x03\x04\x05" #define LCD_STR_PROGRESS "\x03\x04\x05"
#endif #endif
...@@ -214,7 +214,7 @@ ...@@ -214,7 +214,7 @@
#define LCD_STR_ARROW_RIGHT ">" /* from the default character set */ #define LCD_STR_ARROW_RIGHT ">" /* from the default character set */
static void lcd_set_custom_characters( static void lcd_set_custom_characters(
#if defined(LCD_PROGRESS_BAR) && defined(SDSUPPORT) #ifdef LCD_PROGRESS_BAR
bool progress_bar_set=true bool progress_bar_set=true
#endif #endif
) { ) {
...@@ -316,7 +316,7 @@ static void lcd_set_custom_characters( ...@@ -316,7 +316,7 @@ static void lcd_set_custom_characters(
B00000 B00000
}; //thanks Sonny Mounicou }; //thanks Sonny Mounicou
#if defined(LCD_PROGRESS_BAR) && defined(SDSUPPORT) #ifdef LCD_PROGRESS_BAR
static bool char_mode = false; static bool char_mode = false;
byte progress[3][8] = { { byte progress[3][8] = { {
B00000, B00000,
...@@ -376,9 +376,9 @@ static void lcd_set_custom_characters( ...@@ -376,9 +376,9 @@ static void lcd_set_custom_characters(
#endif #endif
} }
static void lcd_implementation_init ( static void lcd_implementation_init(
#if defined(LCD_PROGRESS_BAR) && defined(SDSUPPORT) #ifdef LCD_PROGRESS_BAR
bool progress_bar_set = true bool progress_bar_set=true
#endif #endif
) { ) {
...@@ -404,7 +404,7 @@ static void lcd_implementation_init ( ...@@ -404,7 +404,7 @@ static void lcd_implementation_init (
#endif #endif
lcd_set_custom_characters( lcd_set_custom_characters(
#if defined(LCD_PROGRESS_BAR) && defined(SDSUPPORT) #ifdef LCD_PROGRESS_BAR
progress_bar_set progress_bar_set
#endif #endif
); );
...@@ -594,8 +594,7 @@ static void lcd_implementation_status_screen() ...@@ -594,8 +594,7 @@ static void lcd_implementation_status_screen()
lcd.print(':'); lcd.print(':');
lcd.print(itostr2(time%60)); lcd.print(itostr2(time%60));
} }
else else {
{
lcd_printPGM(PSTR("--:--")); lcd_printPGM(PSTR("--:--"));
} }
#endif #endif
...@@ -603,7 +602,8 @@ static void lcd_implementation_status_screen() ...@@ -603,7 +602,8 @@ static void lcd_implementation_status_screen()
// Status message line at the bottom // Status message line at the bottom
lcd.setCursor(0, LCD_HEIGHT - 1); lcd.setCursor(0, LCD_HEIGHT - 1);
#if defined(LCD_PROGRESS_BAR) && defined(SDSUPPORT) #ifdef LCD_PROGRESS_BAR
if (card.isFileOpen()) { if (card.isFileOpen()) {
uint16_t mil = millis(), diff = mil - progressBarTick; uint16_t mil = millis(), diff = mil - progressBarTick;
if (diff >= PROGRESS_BAR_MSG_TIME || !lcd_status_message[0]) { if (diff >= PROGRESS_BAR_MSG_TIME || !lcd_status_message[0]) {
...@@ -627,12 +627,12 @@ static void lcd_implementation_status_screen() ...@@ -627,12 +627,12 @@ static void lcd_implementation_status_screen()
#endif //LCD_PROGRESS_BAR #endif //LCD_PROGRESS_BAR
//Display both Status message line and Filament display on the last line //Display both Status message line and Filament display on the last line
#if (defined(FILAMENT_SENSOR) && defined(FILWIDTH_PIN) && FILWIDTH_PIN >= 0) && defined(FILAMENT_LCD_DISPLAY) || (defined(POWER_CONSUMPTION) && defined(POWER_CONSUMPTION_PIN) && POWER_CONSUMPTION_PIN >= 0) && defined(POWER_CONSUMPTION_LCD_DISPLAY) #if (HAS_FILAMENT_SENSOR && defined(FILAMENT_LCD_DISPLAY)) || (HAS_POWER_CONSUMPTION_SENSOR && defined(POWER_CONSUMPTION_LCD_DISPLAY))
if (millis() < message_millis + 5000) { //Display both Status message line and Filament display on the last line if (millis() < message_millis + 5000) { //Display both Status message line and Filament display on the last line
lcd_print(lcd_status_message); lcd_print(lcd_status_message);
} }
#if defined(POWER_CONSUMPTION) && defined(POWER_CONSUMPTION_PIN) && (POWER_CONSUMPTION_PIN >= 0) && defined(POWER_CONSUMPTION_LCD_DISPLAY) #if HAS_POWER_CONSUMPTION_SENSOR && defined(POWER_CONSUMPTION_LCD_DISPLAY)
#if defined(FILAMENT_SENSOR) && defined(FILWIDTH_PIN) && (FILWIDTH_PIN >= 0) && defined(FILAMENT_LCD_DISPLAY) #if HAS_FILAMENT_SENSOR && defined(FILAMENT_LCD_DISPLAY)
else if (millis() < message_millis + 10000) else if (millis() < message_millis + 10000)
#else #else
else else
...@@ -645,7 +645,7 @@ static void lcd_implementation_status_screen() ...@@ -645,7 +645,7 @@ static void lcd_implementation_status_screen()
lcd_printPGM(PSTR("Wh")); lcd_printPGM(PSTR("Wh"));
} }
#endif #endif
#if defined(FILAMENT_SENSOR) && defined(FILWIDTH_PIN) && (FILWIDTH_PIN >= 0) && defined(FILAMENT_LCD_DISPLAY) #if HAS_FILAMENT_SENSOR && defined(FILAMENT_LCD_DISPLAY)
else { else {
lcd_printPGM(PSTR("D:")); lcd_printPGM(PSTR("D:"));
lcd.print(ftostr12ns(filament_width_meas)); lcd.print(ftostr12ns(filament_width_meas));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment