Commit 1bc7a1c0 authored by MagoKimbra's avatar MagoKimbra

Update 4.1.4 dev

parent 585e86f3
...@@ -18,7 +18,7 @@ If jumping the arduino Vcc do RAMPS 5V rail, take care to not use a power hungry ...@@ -18,7 +18,7 @@ If jumping the arduino Vcc do RAMPS 5V rail, take care to not use a power hungry
Instructions for Both Options Instructions for Both Options
----------------------------- -----------------------------
Uncomment the "ENABLE_AUTO_BED_LEVELING" define (commented by default) Uncomment the "AUTO_BED_LEVELING_FEATURE" define (commented by default)
The following options define the probing positions. These are good starting values. The following options define the probing positions. These are good starting values.
I recommend to keep a better clearance from borders in the first run and then make the probes as close as possible to borders: I recommend to keep a better clearance from borders in the first run and then make the probes as close as possible to borders:
...@@ -52,9 +52,14 @@ In order to get the servo working, you need to enable: ...@@ -52,9 +52,14 @@ In order to get the servo working, you need to enable:
* \#define NUM_SERVOS 1 // Servo index starts with 0 for M280 command * \#define NUM_SERVOS 1 // Servo index starts with 0 for M280 command
* \#define SERVO_ENDSTOPS {-1, -1, 0} // Servo index for X, Y, Z. Disable with -1 * \// Define nr servo for endstop -1 not define. Servo index start 0
* \#define X_ENDSTOP_SERVO_NR -1
* \#define Y_ENDSTOP_SERVO_NR -1
* \#define Z_ENDSTOP_SERVO_NR 0
* \#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 165,60} // X,Y,Z Axis Extend and Retract angles * \#define X_ENDSTOP_SERVO_ANGLES {0,0} // X Axis Extend and Retract angles
* \#define Y_ENDSTOP_SERVO_ANGLES {0,0} // Y Axis Extend and Retract angles
* \#define Z_ENDSTOP_SERVO_ANGLES {90,0} // Z Axis Extend and Retract angles
The first define tells firmware how many servos you have. The first define tells firmware how many servos you have.
The second tells what axis this servo will be attached to. In the example above, we have a servo in Z axis. The second tells what axis this servo will be attached to. In the example above, we have a servo in Z axis.
......
### Version 4.1.4 ### Version 4.1.4
* Add Debug_info. Repetier button info for enabled or disabled, or M111 S2 for enabled and M111 S0 for disabled.
* Add improve Topography Auto Bed Level.
* Add Dryrun ABL and verbose width command G29 D or G29 V(0-4).
* Improve Autoconfiguration for Delta printer.
* Add support (test only) for NEXTION HMI LCD.
* Improved firmare test dialog. * Improved firmare test dialog.
* Bugfix for SDCONFIG routine. Now the configuration file will be readed and created only on the root of the SD. * Bugfix for SDCONFIG routine. Now the configuration file will be readed and created only on the root of the SD.
* Improved "Thermal Runaway Protection" now the system will be halted also if the thermistor is missing before the temperature is reached as suggested in Issue #35. * Improved "Thermal Runaway Protection" now the system will be halted also if the thermistor is missing before the temperature is reached as suggested in Issue #35.
......
...@@ -425,7 +425,6 @@ ...@@ -425,7 +425,6 @@
/** /**
* Nextion HMI panel * Nextion HMI panel
*/ */
//
//#define NEXTION //#define NEXTION
// option for invert rotary switch // option for invert rotary switch
......
...@@ -90,15 +90,15 @@ ...@@ -90,15 +90,15 @@
//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!!!
//#define Z_SAFE_HOMING //#define Z_SAFE_HOMING
#ifdef Z_SAFE_HOMING #if ENABLED(Z_SAFE_HOMING)
#define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28) #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28)
#define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28) #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28)
#endif #endif
//#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (ABL) //#define AUTO_BED_LEVELING_FEATURE // Delete the comment to enable (remove // at the start of the line)
//#define Z_PROBE_REPEATABILITY_TEST // Delete the comment to enable //#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 #if ENABLED(AUTO_BED_LEVELING_FEATURE)
// There are 2 different ways to specify probing locations // There are 2 different ways to specify probing locations
// //
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
// Note: this feature generates 10KB extra code size // Note: this feature generates 10KB extra code size
#define AUTO_BED_LEVELING_GRID #define AUTO_BED_LEVELING_GRID
#ifdef AUTO_BED_LEVELING_GRID #if ENABLED(AUTO_BED_LEVELING_GRID)
#define MIN_PROBE_EDGE 10 // The probe square sides can be no smaller than this #define MIN_PROBE_EDGE 10 // The probe square sides can be no smaller than this
...@@ -162,7 +162,7 @@ ...@@ -162,7 +162,7 @@
//#define Z_PROBE_ENDSTOP //#define Z_PROBE_ENDSTOP
#endif // ENABLE_AUTO_BED_LEVELING #endif // AUTO_BED_LEVELING_FEATURE
// The position of the homing switches // The position of the homing switches
...@@ -197,15 +197,3 @@ ...@@ -197,15 +197,3 @@
#define DEFAULT_XYJERK 10.0 // (mm/sec) #define DEFAULT_XYJERK 10.0 // (mm/sec)
#define DEFAULT_ZJERK 0.4 // (mm/sec) #define DEFAULT_ZJERK 0.4 // (mm/sec)
#define DEFAULT_EJERK {5.0,5.0,5.0,5.0} // E0... (mm/sec) per extruder, max initial speed for retract moves #define DEFAULT_EJERK {5.0,5.0,5.0,5.0} // E0... (mm/sec) per extruder, max initial speed for retract moves
//===========================================================================
//=============================Additional Features===========================
//===========================================================================
// Custom M code points
//#define CUSTOM_M_CODES
#ifdef CUSTOM_M_CODES
#define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
#define Z_PROBE_OFFSET_RANGE_MIN -20
#define Z_PROBE_OFFSET_RANGE_MAX 20
#endif
...@@ -95,10 +95,10 @@ ...@@ -95,10 +95,10 @@
#define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28) #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28)
#endif #endif
//#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (ABL) //#define AUTO_BED_LEVELING_FEATURE // Delete the comment to enable (remove // at the start of the line)
//#define Z_PROBE_REPEATABILITY_TEST // Delete the comment to enable //#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 #if ENABLED(AUTO_BED_LEVELING_FEATURE)
// There are 2 different ways to specify probing locations // There are 2 different ways to specify probing locations
// //
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
// Note: this feature generates 10KB extra code size // Note: this feature generates 10KB extra code size
#define AUTO_BED_LEVELING_GRID #define AUTO_BED_LEVELING_GRID
#ifdef AUTO_BED_LEVELING_GRID #if ENABLED(AUTO_BED_LEVELING_GRID)
#define MIN_PROBE_EDGE 10 // The probe square sides can be no smaller than this #define MIN_PROBE_EDGE 10 // The probe square sides can be no smaller than this
...@@ -162,7 +162,7 @@ ...@@ -162,7 +162,7 @@
//#define Z_PROBE_ENDSTOP //#define Z_PROBE_ENDSTOP
#endif // ENABLE_AUTO_BED_LEVELING #endif // AUTO_BED_LEVELING_FEATURE
// The position of the homing switches // The position of the homing switches
...@@ -197,15 +197,3 @@ ...@@ -197,15 +197,3 @@
#define DEFAULT_XYJERK 10.0 // (mm/sec) #define DEFAULT_XYJERK 10.0 // (mm/sec)
#define DEFAULT_ZJERK 0.4 // (mm/sec) #define DEFAULT_ZJERK 0.4 // (mm/sec)
#define DEFAULT_EJERK {5.0,5.0,5.0,5.0} // E0... (mm/sec) per extruder, max initial speed for retract moves #define DEFAULT_EJERK {5.0,5.0,5.0,5.0} // E0... (mm/sec) per extruder, max initial speed for retract moves
//===========================================================================
//=============================Additional Features===========================
//===========================================================================
// Custom M code points
//#define CUSTOM_M_CODES
#ifdef CUSTOM_M_CODES
#define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
#define Z_PROBE_OFFSET_RANGE_MIN -20
#define Z_PROBE_OFFSET_RANGE_MAX 20
#endif
...@@ -19,8 +19,8 @@ ...@@ -19,8 +19,8 @@
#define SCARA_offset_y -56 //mm #define SCARA_offset_y -56 //mm
#define SCARA_RAD2DEG 57.2957795 // to convert RAD to degrees #define SCARA_RAD2DEG 57.2957795 // to convert RAD to degrees
#define THETA_HOMING_OFFSET 0 //calculatated from Calibration Guide and command M360 / M114 see picture in http://reprap.harleystudio.co.za/?page_id=1073 #define THETA_HOMING_OFFSET 0 //calculatated from Calibration Guide and command M360 / M114 see picture in http://reprap.harleystudio.co.za/?page_id=1073
#define PSI_HOMING_OFFSET 0 // calculatated from Calibration Guide and command M364 / M114 see picture in http://reprap.harleystudio.co.za/?page_id=1073 #define PSI_HOMING_OFFSET 0 // calculatated from Calibration Guide and command M364 / M114 see picture in http://reprap.harleystudio.co.za/?page_id=1073
//some helper variables to make kinematics faster //some helper variables to make kinematics faster
#define L1_2 sq(Linkage_1) // do not change #define L1_2 sq(Linkage_1) // do not change
...@@ -118,10 +118,10 @@ ...@@ -118,10 +118,10 @@
#define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28) #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28)
#endif #endif
//#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (ABL) //#define AUTO_BED_LEVELING_FEATURE // Delete the comment to enable (remove // at the start of the line)
//#define Z_PROBE_REPEATABILITY_TEST // Delete the comment to enable //#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 #if ENABLED(AUTO_BED_LEVELING_FEATURE)
// There are 2 different ways to specify probing locations // There are 2 different ways to specify probing locations
// //
...@@ -138,7 +138,7 @@ ...@@ -138,7 +138,7 @@
// Note: this feature generates 10KB extra code size // Note: this feature generates 10KB extra code size
#define AUTO_BED_LEVELING_GRID #define AUTO_BED_LEVELING_GRID
#ifdef AUTO_BED_LEVELING_GRID #if ENABLED(AUTO_BED_LEVELING_GRID)
#define MIN_PROBE_EDGE 10 // The probe square sides can be no smaller than this #define MIN_PROBE_EDGE 10 // The probe square sides can be no smaller than this
...@@ -185,7 +185,7 @@ ...@@ -185,7 +185,7 @@
//#define Z_PROBE_ENDSTOP //#define Z_PROBE_ENDSTOP
#endif // ENABLE_AUTO_BED_LEVELING #endif // AUTO_BED_LEVELING_FEATURE
// The position of the homing switches // The position of the homing switches
...@@ -221,15 +221,3 @@ ...@@ -221,15 +221,3 @@
#define DEFAULT_XYJERK 5 // (mm/sec) #define DEFAULT_XYJERK 5 // (mm/sec)
#define DEFAULT_ZJERK 0.4 // (mm/sec) #define DEFAULT_ZJERK 0.4 // (mm/sec)
#define DEFAULT_EJERK {3.0,3.0,3.0,3.0} // (mm/sec) #define DEFAULT_EJERK {3.0,3.0,3.0,3.0} // (mm/sec)
//===========================================================================
//=============================Additional Features===========================
//===========================================================================
// Custom M code points
//#define CUSTOM_M_CODES
#ifdef CUSTOM_M_CODES
#define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
#define Z_PROBE_OFFSET_RANGE_MIN -20
#define Z_PROBE_OFFSET_RANGE_MAX 20
#endif
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
* some filament is retracted. The filament retracted is re-added before the next extrusion * some filament is retracted. The filament retracted is re-added before the next extrusion
* or when the target temperature is less than IDLE_OOZING_MINTEMP and the actual temperature * or when the target temperature is less than IDLE_OOZING_MINTEMP and the actual temperature
* is greater than IDLE_OOZING_MINTEMP. * is greater than IDLE_OOZING_MINTEMP.
* PS: Always remember to set your extruder target temperature to 0°C before shoudown the printer if you enable this feature. * PS: Always remember to set your extruder target temperature to 0°C before shoudown the printer if you enable this feature.
*/ */
//#define IDLE_OOZING_PREVENT //#define IDLE_OOZING_PREVENT
#define IDLE_OOZING_MINTEMP EXTRUDE_MINTEMP + 5 #define IDLE_OOZING_MINTEMP EXTRUDE_MINTEMP + 5
......
...@@ -30,8 +30,8 @@ ...@@ -30,8 +30,8 @@
// The presence of the UBRRH register is used to detect a UART. // The presence of the UBRRH register is used to detect a UART.
#define UART_PRESENT(port) ((port == 0 && (defined(UBRRH) || defined(UBRR0H))) || \ #define UART_PRESENT(port) ((port == 0 && (defined(UBRRH) || defined(UBRR0H))) || \
(port == 1 && defined(UBRR1H)) || (port == 2 && defined(UBRR2H)) || \ (port == 1 && defined(UBRR1H)) || (port == 2 && defined(UBRR2H)) || \
(port == 3 && defined(UBRR3H))) (port == 3 && defined(UBRR3H)))
// These are macros to build serial port register names for the selected SERIAL_PORT (C preprocessor // These are macros to build serial port register names for the selected SERIAL_PORT (C preprocessor
// requires two levels of indirection to expand macro values properly) // requires two levels of indirection to expand macro values properly)
#define SERIAL_REGNAME(registerbase,number,suffix) SERIAL_REGNAME_INTERNAL(registerbase,number,suffix) #define SERIAL_REGNAME(registerbase,number,suffix) SERIAL_REGNAME_INTERNAL(registerbase,number,suffix)
......
...@@ -29,12 +29,12 @@ ...@@ -29,12 +29,12 @@
#include "Marlin.h" #include "Marlin.h"
#if ENABLED(ENABLE_AUTO_BED_LEVELING) #if ENABLED(AUTO_BED_LEVELING_FEATURE)
#include "vector_3.h" #include "vector_3.h"
#if ENABLED(AUTO_BED_LEVELING_GRID) #if ENABLED(AUTO_BED_LEVELING_GRID)
#include "qr_solve.h" #include "qr_solve.h"
#endif #endif
#endif // ENABLE_AUTO_BED_LEVELING #endif // AUTO_BED_LEVELING_FEATURE
#include "ultralcd.h" #include "ultralcd.h"
...@@ -747,7 +747,7 @@ void setup() { ...@@ -747,7 +747,7 @@ void setup() {
Config_RetrieveSettings(); Config_RetrieveSettings();
lcd_init(); lcd_init();
#ifndef NEXTION #if DISABLED(NEXTION)
delay(SPLASH_SCREEN_DURATION); // wait to display the splash screen delay(SPLASH_SCREEN_DURATION); // wait to display the splash screen
#endif #endif
...@@ -771,7 +771,7 @@ void setup() { ...@@ -771,7 +771,7 @@ void setup() {
digipot_i2c_init(); digipot_i2c_init();
#endif #endif
#ifdef Z_PROBE_SLED #if ENABLED(Z_PROBE_SLED)
pinMode(SLED_PIN, OUTPUT); pinMode(SLED_PIN, OUTPUT);
digitalWrite(SLED_PIN, LOW); // turn it off digitalWrite(SLED_PIN, LOW); // turn it off
#endif // Z_PROBE_SLED #endif // Z_PROBE_SLED
...@@ -788,7 +788,7 @@ void setup() { ...@@ -788,7 +788,7 @@ void setup() {
digitalWrite(STAT_LED_BLUE, LOW); // turn it off digitalWrite(STAT_LED_BLUE, LOW); // turn it off
#endif #endif
#ifdef FIRMWARE_TEST #if ENABLED(FIRMWARE_TEST)
FirmwareTest(); FirmwareTest();
#endif // FIRMWARE_TEST #endif // FIRMWARE_TEST
} }
...@@ -1093,7 +1093,7 @@ XYZ_CONSTS_FROM_CONFIG(float, base_min_pos, MIN_POS); ...@@ -1093,7 +1093,7 @@ XYZ_CONSTS_FROM_CONFIG(float, base_min_pos, MIN_POS);
XYZ_CONSTS_FROM_CONFIG(float, home_bump_mm, HOME_BUMP_MM); XYZ_CONSTS_FROM_CONFIG(float, home_bump_mm, HOME_BUMP_MM);
XYZ_CONSTS_FROM_CONFIG(signed char, home_dir, HOME_DIR); XYZ_CONSTS_FROM_CONFIG(signed char, home_dir, HOME_DIR);
#ifdef DUAL_X_CARRIAGE #if ENABLED(DUAL_X_CARRIAGE)
#define DXC_FULL_CONTROL_MODE 0 #define DXC_FULL_CONTROL_MODE 0
#define DXC_AUTO_PARK_MODE 1 #define DXC_AUTO_PARK_MODE 1
...@@ -1126,9 +1126,21 @@ XYZ_CONSTS_FROM_CONFIG(signed char, home_dir, HOME_DIR); ...@@ -1126,9 +1126,21 @@ XYZ_CONSTS_FROM_CONFIG(signed char, home_dir, HOME_DIR);
#endif //DUAL_X_CARRIAGE #endif //DUAL_X_CARRIAGE
static void axis_is_at_home(AxisEnum axis) { void print_xyz(const char *prefix, const float x, const float y, const float z, bool eol = true) {
ECHO_V(prefix);
ECHO_MV(": (", x);
ECHO_MV(", ", y);
ECHO_MV(", ", z);
ECHO_M(")");
if (eol) ECHO_E;
}
void print_xyz(const char *prefix, const float xyz[], bool eol = true) {
print_xyz(prefix, xyz[X_AXIS], xyz[Y_AXIS], xyz[Z_AXIS], eol);
}
static void set_axis_is_at_home(AxisEnum axis) {
#ifdef DUAL_X_CARRIAGE #if ENABLED(DUAL_X_CARRIAGE)
if (axis == X_AXIS) { if (axis == X_AXIS) {
if (active_extruder != 0) { if (active_extruder != 0) {
current_position[X_AXIS] = x_home_pos(active_extruder); current_position[X_AXIS] = x_home_pos(active_extruder);
...@@ -1146,7 +1158,7 @@ static void axis_is_at_home(AxisEnum axis) { ...@@ -1146,7 +1158,7 @@ static void axis_is_at_home(AxisEnum axis) {
} }
#endif #endif
#ifdef SCARA #if ENABLED(SCARA)
if (axis == X_AXIS || axis == Y_AXIS) { if (axis == X_AXIS || axis == Y_AXIS) {
...@@ -1186,7 +1198,7 @@ static void axis_is_at_home(AxisEnum axis) { ...@@ -1186,7 +1198,7 @@ static void axis_is_at_home(AxisEnum axis) {
min_pos[axis] = base_min_pos(axis) + home_offset[axis]; min_pos[axis] = base_min_pos(axis) + home_offset[axis];
max_pos[axis] = base_max_pos(axis) + home_offset[axis]; max_pos[axis] = base_max_pos(axis) + home_offset[axis];
} }
#elif defined(DELTA) #elif ENABLED(DELTA)
current_position[axis] = base_home_pos[axis] + home_offset[axis]; current_position[axis] = base_home_pos[axis] + home_offset[axis];
min_pos[axis] = base_min_pos(axis) + home_offset[axis]; min_pos[axis] = base_min_pos(axis) + home_offset[axis];
max_pos[axis] = base_max_pos[axis] + home_offset[axis]; max_pos[axis] = base_max_pos[axis] + home_offset[axis];
...@@ -1196,9 +1208,15 @@ static void axis_is_at_home(AxisEnum axis) { ...@@ -1196,9 +1208,15 @@ static void axis_is_at_home(AxisEnum axis) {
max_pos[axis] = base_max_pos(axis) + home_offset[axis]; max_pos[axis] = base_max_pos(axis) + home_offset[axis];
#endif #endif
#if defined(ENABLE_AUTO_BED_LEVELING) && Z_HOME_DIR < 0 #if ENABLED(AUTO_BED_LEVELING_FEATURE) && Z_HOME_DIR < 0
if (axis == Z_AXIS) current_position[Z_AXIS] -= zprobe_zoffset; if (axis == Z_AXIS) current_position[Z_AXIS] -= zprobe_zoffset;
#endif #endif
if (debugLevel & DEBUG_INFO) {
ECHO_SMV(DB, "set_axis_is_at_home ", (unsigned long)axis);
ECHO_MV(" > (home_offset[axis]==", home_offset[axis]);
print_xyz(") > current_position", current_position);
}
} }
/** /**
...@@ -1251,7 +1269,7 @@ static void setup_for_endstop_move() { ...@@ -1251,7 +1269,7 @@ static void setup_for_endstop_move() {
} }
static void clean_up_after_endstop_move() { static void clean_up_after_endstop_move() {
#ifdef ENDSTOPS_ONLY_FOR_HOMING #if ENABLED(ENDSTOPS_ONLY_FOR_HOMING)
enable_endstops(false); enable_endstops(false);
#endif #endif
feedrate = saved_feedrate; feedrate = saved_feedrate;
...@@ -1260,7 +1278,7 @@ static void clean_up_after_endstop_move() { ...@@ -1260,7 +1278,7 @@ static void clean_up_after_endstop_move() {
refresh_cmd_timeout(); refresh_cmd_timeout();
} }
#if defined(CARTESIAN) || defined(COREXY) || defined(COREXZ) || defined(SCARA) #if ENABLED(CARTESIAN) || ENABLED(COREXY) || ENABLED(COREXZ) || ENABLED(SCARA)
/** /**
* Plan a move to (X, Y, Z) and set the current_position * Plan a move to (X, Y, Z) and set the current_position
...@@ -1270,6 +1288,11 @@ static void clean_up_after_endstop_move() { ...@@ -1270,6 +1288,11 @@ static void clean_up_after_endstop_move() {
float oldFeedRate = feedrate; float oldFeedRate = feedrate;
feedrate = homing_feedrate[Z_AXIS]; feedrate = homing_feedrate[Z_AXIS];
if (debugLevel & DEBUG_INFO) {
ECHO_S(DB);
print_xyz("do_blocking_move_to", x, y, z);
}
current_position[Z_AXIS] = z; current_position[Z_AXIS] = z;
line_to_current_position(); line_to_current_position();
st_synchronize(); st_synchronize();
...@@ -1288,9 +1311,9 @@ static void clean_up_after_endstop_move() { ...@@ -1288,9 +1311,9 @@ static void clean_up_after_endstop_move() {
inline void do_blocking_move_to_x(float x) { do_blocking_move_to(x, current_position[Y_AXIS], current_position[Z_AXIS]); } inline void do_blocking_move_to_x(float x) { do_blocking_move_to(x, current_position[Y_AXIS], current_position[Z_AXIS]); }
inline void do_blocking_move_to_z(float z) { do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], z); } inline void do_blocking_move_to_z(float z) { do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], z); }
#ifdef ENABLE_AUTO_BED_LEVELING #if ENABLED(AUTO_BED_LEVELING_FEATURE)
#ifdef AUTO_BED_LEVELING_GRID #if ENABLED(AUTO_BED_LEVELING_GRID)
static void set_bed_level_equation_lsq(double *plane_equation_coefficients) { static void set_bed_level_equation_lsq(double *plane_equation_coefficients) {
vector_3 planeNormal = vector_3(-plane_equation_coefficients[0], -plane_equation_coefficients[1], 1); vector_3 planeNormal = vector_3(-plane_equation_coefficients[0], -plane_equation_coefficients[1], 1);
planeNormal.debug("planeNormal"); planeNormal.debug("planeNormal");
...@@ -1307,6 +1330,11 @@ static void clean_up_after_endstop_move() { ...@@ -1307,6 +1330,11 @@ static void clean_up_after_endstop_move() {
current_position[Y_AXIS] = corrected_position.y; current_position[Y_AXIS] = corrected_position.y;
current_position[Z_AXIS] = corrected_position.z; current_position[Z_AXIS] = corrected_position.z;
if (debugLevel & DEBUG_INFO) {
ECHO_S(DB);
print_xyz("set_bed_level_equation_lsq > current_position", current_position);
}
sync_plan_position(); sync_plan_position();
} }
#else // not AUTO_BED_LEVELING_GRID #else // not AUTO_BED_LEVELING_GRID
...@@ -1332,6 +1360,11 @@ static void clean_up_after_endstop_move() { ...@@ -1332,6 +1360,11 @@ static void clean_up_after_endstop_move() {
current_position[Y_AXIS] = corrected_position.y; current_position[Y_AXIS] = corrected_position.y;
current_position[Z_AXIS] = corrected_position.z; current_position[Z_AXIS] = corrected_position.z;
if (debugLevel & DEBUG_INFO) {
ECHO_S(DB);
print_xyz("set_bed_level_equation_3pts > current_position", current_position);
}
sync_plan_position(); sync_plan_position();
} }
...@@ -1368,9 +1401,18 @@ static void clean_up_after_endstop_move() { ...@@ -1368,9 +1401,18 @@ static void clean_up_after_endstop_move() {
// Get the current stepper position after bumping an endstop // Get the current stepper position after bumping an endstop
current_position[Z_AXIS] = st_get_position_mm(Z_AXIS); current_position[Z_AXIS] = st_get_position_mm(Z_AXIS);
sync_plan_position(); sync_plan_position();
if (debugLevel & DEBUG_INFO) {
ECHO_S(DB);
print_xyz("run_z_probe > current_position", current_position);
}
} }
static void deploy_z_probe() { static void deploy_z_probe() {
if (debugLevel & DEBUG_INFO) {
ECHO_S(DB);
print_xyz("deploy_z_probe > current_position", current_position);
}
#if HAS_SERVO_ENDSTOPS #if HAS_SERVO_ENDSTOPS
// Engage Z Servo endstop if enabled // Engage Z Servo endstop if enabled
if (servo_endstop_id[Z_AXIS] >= 0) servo[servo_endstop_id[Z_AXIS]].move(servo_endstop_angle[Z_AXIS][0]); if (servo_endstop_id[Z_AXIS] >= 0) servo[servo_endstop_id[Z_AXIS]].move(servo_endstop_angle[Z_AXIS][0]);
...@@ -1378,12 +1420,20 @@ static void clean_up_after_endstop_move() { ...@@ -1378,12 +1420,20 @@ static void clean_up_after_endstop_move() {
} }
static void stow_z_probe(bool doRaise = true) { static void stow_z_probe(bool doRaise = true) {
if (debugLevel & DEBUG_INFO) {
ECHO_S(DB);
print_xyz("stow_z_probe > current_position", current_position);
}
#if HAS_SERVO_ENDSTOPS #if HAS_SERVO_ENDSTOPS
// Retract Z Servo endstop if enabled // Retract Z Servo endstop if enabled
if (servo_endstop_id[Z_AXIS] >= 0) { if (servo_endstop_id[Z_AXIS] >= 0) {
#if Z_RAISE_AFTER_PROBING > 0 #if Z_RAISE_AFTER_PROBING > 0
if (doRaise) { if (doRaise) {
if (debugLevel & DEBUG_INFO) {
ECHO_LMV(DB, "Raise Z (after) by ", (float)Z_RAISE_AFTER_PROBING);
ECHO_LMV(DB, "> SERVO_ENDSTOPS > do_blocking_move_to_z ", current_position[Z_AXIS] + Z_RAISE_AFTER_PROBING);
}
do_blocking_move_to_z(current_position[Z_AXIS] + Z_RAISE_AFTER_PROBING); // this also updates current_position do_blocking_move_to_z(current_position[Z_AXIS] + Z_RAISE_AFTER_PROBING); // this also updates current_position
st_synchronize(); st_synchronize();
} }
...@@ -1404,19 +1454,39 @@ static void clean_up_after_endstop_move() { ...@@ -1404,19 +1454,39 @@ static void clean_up_after_endstop_move() {
// Probe bed height at position (x,y), returns the measured z value // Probe bed height at position (x,y), returns the measured z value
static float probe_pt(float x, float y, float z_before, ProbeAction probe_action = ProbeDeployAndStow, int verbose_level = 1) { static float probe_pt(float x, float y, float z_before, ProbeAction probe_action = ProbeDeployAndStow, int verbose_level = 1) {
// move to right place if (debugLevel & DEBUG_INFO) {
ECHO_LM(DB, "probe_pt >>>");
ECHO_SMV(DB, "> ProbeAction:", (unsigned long)probe_action);
print_xyz(" > current_position", current_position);
ECHO_SMV(DB, "Z Raise to z_before ", z_before);
ECHO_EMV(" > do_blocking_move_to_z ", z_before);
}
// Move Z up to the z_before height, then move the probe to the given XY
do_blocking_move_to_z(z_before); // this also updates current_position do_blocking_move_to_z(z_before); // this also updates current_position
if (debugLevel & DEBUG_INFO) {
ECHO_SMV(DB, "> do_blocking_move_to_xy ", x - X_PROBE_OFFSET_FROM_EXTRUDER);
ECHO_EMV(", ", y - Y_PROBE_OFFSET_FROM_EXTRUDER);
}
do_blocking_move_to_xy(x - X_PROBE_OFFSET_FROM_EXTRUDER, y - Y_PROBE_OFFSET_FROM_EXTRUDER); // this also updates current_position do_blocking_move_to_xy(x - X_PROBE_OFFSET_FROM_EXTRUDER, y - Y_PROBE_OFFSET_FROM_EXTRUDER); // this also updates current_position
#ifndef Z_PROBE_SLED #if DISABLED(Z_PROBE_SLED)
if (probe_action & ProbeDeploy) deploy_z_probe(); if (probe_action & ProbeDeploy) {
#endif // Z_PROBE_SLED if (debugLevel & DEBUG_INFO) ECHO_LM(DB, "> ProbeDeploy");
deploy_z_probe();
}
#endif
run_z_probe(); run_z_probe();
float measured_z = current_position[Z_AXIS]; float measured_z = current_position[Z_AXIS];
#ifndef Z_PROBE_SLED #if DISABLED(Z_PROBE_SLED)
if (probe_action & ProbeStow) stow_z_probe(); if (probe_action & ProbeStow) {
if (debugLevel & DEBUG_INFO) ECHO_LM(DB, "> ProbeStow (stow_z_probe will do Z Raise)");
stow_z_probe();
}
#endif #endif
if (verbose_level > 2) { if (verbose_level > 2) {
...@@ -1425,18 +1495,26 @@ static void clean_up_after_endstop_move() { ...@@ -1425,18 +1495,26 @@ static void clean_up_after_endstop_move() {
ECHO_MV(MSG_BED_LEVELLING_Y, y, 3); ECHO_MV(MSG_BED_LEVELLING_Y, y, 3);
ECHO_EMV(MSG_BED_LEVELLING_Z, measured_z, 3); ECHO_EMV(MSG_BED_LEVELLING_Z, measured_z, 3);
} }
if (debugLevel & DEBUG_INFO) ECHO_LM(DB, "<<< probe_pt");
return measured_z; return measured_z;
} }
#endif //ENABLE_AUTO_BED_LEVELING #endif //AUTO_BED_LEVELING_FEATURE
static void homeaxis(AxisEnum axis) { static void homeaxis(AxisEnum axis) {
#define HOMEAXIS_DO(LETTER) \ #define HOMEAXIS_DO(LETTER) \
((LETTER##_MIN_PIN > -1 && LETTER##_HOME_DIR==-1) || (LETTER##_MAX_PIN > -1 && LETTER##_HOME_DIR==1)) ((LETTER##_MIN_PIN > -1 && LETTER##_HOME_DIR==-1) || (LETTER##_MAX_PIN > -1 && LETTER##_HOME_DIR==1))
if (debugLevel & DEBUG_INFO) {
ECHO_SMV(DB, ">>> homeaxis(", (unsigned long)axis);
ECHO_EM(")");
}
if (axis == X_AXIS ? HOMEAXIS_DO(X) : axis == Y_AXIS ? HOMEAXIS_DO(Y) : axis == Z_AXIS ? HOMEAXIS_DO(Z) : 0) { if (axis == X_AXIS ? HOMEAXIS_DO(X) : axis == Y_AXIS ? HOMEAXIS_DO(Y) : axis == Z_AXIS ? HOMEAXIS_DO(Z) : 0) {
int axis_home_dir = int axis_home_dir =
#ifdef DUAL_X_CARRIAGE #if ENABLED(DUAL_X_CARRIAGE)
(axis == X_AXIS) ? x_home_dir(active_extruder) : (axis == X_AXIS) ? x_home_dir(active_extruder) :
#endif #endif
home_dir(axis); home_dir(axis);
...@@ -1445,7 +1523,7 @@ static void clean_up_after_endstop_move() { ...@@ -1445,7 +1523,7 @@ static void clean_up_after_endstop_move() {
current_position[axis] = 0; current_position[axis] = 0;
sync_plan_position(); sync_plan_position();
#ifdef Z_PROBE_SLED #if ENABLED(Z_PROBE_SLED)
// Get Probe // Get Probe
if (axis == Z_AXIS) { if (axis == Z_AXIS) {
if (axis_home_dir < 0) dock_sled(false); if (axis_home_dir < 0) dock_sled(false);
...@@ -1466,7 +1544,7 @@ static void clean_up_after_endstop_move() { ...@@ -1466,7 +1544,7 @@ static void clean_up_after_endstop_move() {
#endif #endif
// Set a flag for Z motor locking // Set a flag for Z motor locking
#ifdef Z_DUAL_ENDSTOPS #if ENABLED(Z_DUAL_ENDSTOPS)
if (axis == Z_AXIS) In_Homing_Process(true); if (axis == Z_AXIS) In_Homing_Process(true);
#endif #endif
...@@ -1497,6 +1575,11 @@ static void clean_up_after_endstop_move() { ...@@ -1497,6 +1575,11 @@ static void clean_up_after_endstop_move() {
line_to_destination(); line_to_destination();
st_synchronize(); st_synchronize();
if (debugLevel & DEBUG_INFO) {
ECHO_S(DB);
print_xyz("> TRIGGER ENDSTOP > current_position", current_position);
}
#ifdef Z_DUAL_ENDSTOPS #ifdef Z_DUAL_ENDSTOPS
if (axis == Z_AXIS) { if (axis == Z_AXIS) {
float adj = fabs(z_endstop_adj); float adj = fabs(z_endstop_adj);
...@@ -1523,9 +1606,14 @@ static void clean_up_after_endstop_move() { ...@@ -1523,9 +1606,14 @@ static void clean_up_after_endstop_move() {
#endif #endif
// Set the axis position to its home position (plus home offsets) // Set the axis position to its home position (plus home offsets)
axis_is_at_home(axis); set_axis_is_at_home(axis);
sync_plan_position(); sync_plan_position();
if (debugLevel & DEBUG_INFO) {
ECHO_S(DB);
print_xyz("> AFTER set_axis_is_at_home > current_position", current_position);
}
destination[axis] = current_position[axis]; destination[axis] = current_position[axis];
feedrate = 0.0; feedrate = 0.0;
endstops_hit_on_purpose(); // clear endstop hit flags endstops_hit_on_purpose(); // clear endstop hit flags
...@@ -1541,23 +1629,32 @@ static void clean_up_after_endstop_move() { ...@@ -1541,23 +1629,32 @@ static void clean_up_after_endstop_move() {
#if SERVO_LEVELING && DISABLED(Z_PROBE_SLED) #if SERVO_LEVELING && DISABLED(Z_PROBE_SLED)
// Deploy a probe if there is one, and homing towards the bed // Deploy a probe if there is one, and homing towards the bed
if (axis == Z_AXIS) { if (axis == Z_AXIS) {
if (axis_home_dir < 0) stow_z_probe(); if (axis_home_dir < 0) {
if (debugLevel & DEBUG_INFO) ECHO_LM(DB, "> SERVO_LEVELING > stow_z_probe");
stow_z_probe();
}
} }
else else
#endif #endif
{ {
#if HAS_SERVO_ENDSTOPS #if HAS_SERVO_ENDSTOPS
// Retract Servo endstop if enabled // Retract Servo endstop if enabled
if (servo_endstop_id[axis] >= 0) if (servo_endstop_id[axis] >= 0) {
servo[servo_endstop_id[axis]].move(servo_endstop_angle[axis][1]); if (debugLevel & DEBUG_INFO) ECHO_LM(DB, "> SERVO_ENDSTOPS > Stow with servo.move()");
servo[servo_endstop_id[axis]].move(servo_endstop_angle[axis][1]);
}
#endif #endif
} }
} }
if (debugLevel & DEBUG_INFO) {
ECHO_SMV(DB, "<<< homeaxis(", (unsigned long)axis);
ECHO_EM(")");
}
} }
#define HOMEAXIS(LETTER) homeaxis(LETTER##_AXIS) #define HOMEAXIS(LETTER) homeaxis(LETTER##_AXIS)
#endif // CARTESIAN || COREXY || COREXZ || SCARA #endif // CARTESIAN || COREXY || COREXZ || SCARA
#ifdef DELTA #if ENABLED(DELTA)
static void homeaxis(AxisEnum axis) { static void homeaxis(AxisEnum axis) {
#define HOMEAXIS_DO(LETTER) \ #define HOMEAXIS_DO(LETTER) \
...@@ -1601,15 +1698,26 @@ static void clean_up_after_endstop_move() { ...@@ -1601,15 +1698,26 @@ static void clean_up_after_endstop_move() {
enable_endstops(false); // Disable endstops while moving away enable_endstops(false); // Disable endstops while moving away
sync_plan_position(); sync_plan_position();
destination[axis] = endstop_adj[axis]; destination[axis] = endstop_adj[axis];
if (debugLevel & DEBUG_INFO) {
ECHO_SMV(DB, "> endstop_adj = ", endstop_adj[axis]);
print_xyz(" > destination", destination);
}
line_to_destination(); line_to_destination();
st_synchronize(); st_synchronize();
enable_endstops(true); // Enable endstops for next homing move enable_endstops(true); // Enable endstops for next homing move
} }
if (debugLevel & DEBUG_INFO) ECHO_LMV(DB, "> endstop_adj * axis_home_dir = ", endstop_adj[axis] * axis_home_dir);
// Set the axis position to its home position (plus home offsets) // Set the axis position to its home position (plus home offsets)
axis_is_at_home(axis); set_axis_is_at_home(axis);
sync_plan_position(); sync_plan_position();
if (debugLevel & DEBUG_INFO) {
ECHO_S(DB);
print_xyz("> AFTER set_axis_is_at_home > current_position", current_position);
}
destination[axis] = current_position[axis]; destination[axis] = current_position[axis];
feedrate = 0.0; feedrate = 0.0;
endstops_hit_on_purpose(); // clear endstop hit flags endstops_hit_on_purpose(); // clear endstop hit flags
...@@ -1687,6 +1795,7 @@ static void clean_up_after_endstop_move() { ...@@ -1687,6 +1795,7 @@ static void clean_up_after_endstop_move() {
// Reset calibration results to zero. // Reset calibration results to zero.
void reset_bed_level() { void reset_bed_level() {
if (debugLevel & DEBUG_INFO) ECHO_LM(DB, "reset_bed_level");
for (int y = 0; y < AUTO_BED_LEVELING_GRID_POINTS; y++) { for (int y = 0; y < AUTO_BED_LEVELING_GRID_POINTS; y++) {
for (int x = 0; x < AUTO_BED_LEVELING_GRID_POINTS; x++) { for (int x = 0; x < AUTO_BED_LEVELING_GRID_POINTS; x++) {
bed_level[x][y] = 0.0; bed_level[x][y] = 0.0;
...@@ -2471,6 +2580,10 @@ static void clean_up_after_endstop_move() { ...@@ -2471,6 +2580,10 @@ static void clean_up_after_endstop_move() {
} }
void prepare_move_raw() { void prepare_move_raw() {
if (debugLevel & DEBUG_INFO) {
ECHO_S(DB);
print_xyz("prepare_move_raw > destination", destination);
}
refresh_cmd_timeout(); refresh_cmd_timeout();
calculate_delta(destination); calculate_delta(destination);
plan_buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], destination[E_AXIS], feedrate*feedrate_multiplier/60/100.0, active_extruder, active_driver); plan_buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], destination[E_AXIS], feedrate*feedrate_multiplier/60/100.0, active_extruder, active_driver);
...@@ -2611,7 +2724,7 @@ static void clean_up_after_endstop_move() { ...@@ -2611,7 +2724,7 @@ static void clean_up_after_endstop_move() {
} // retract() } // retract()
#endif //FWRETRACT #endif //FWRETRACT
#ifdef Z_PROBE_SLED #if ENABLED(Z_PROBE_SLED)
#ifndef SLED_DOCKING_OFFSET #ifndef SLED_DOCKING_OFFSET
#define SLED_DOCKING_OFFSET 0 #define SLED_DOCKING_OFFSET 0
...@@ -2624,6 +2737,8 @@ static void clean_up_after_endstop_move() { ...@@ -2624,6 +2737,8 @@ static void clean_up_after_endstop_move() {
* offset[in] The additional distance to move to adjust docking location * offset[in] The additional distance to move to adjust docking location
*/ */
static void dock_sled(bool dock, int offset=0) { static void dock_sled(bool dock, int offset=0) {
if (debugLevel & DEBUG_INFO) ECHO_LMV(DB, "dock_sled", dock);
if (!axis_known_position[X_AXIS] || !axis_known_position[Y_AXIS]) { if (!axis_known_position[X_AXIS] || !axis_known_position[Y_AXIS]) {
LCD_MESSAGEPGM(MSG_POSITION_UNKNOWN); LCD_MESSAGEPGM(MSG_POSITION_UNKNOWN);
ECHO_LM(DB, MSG_POSITION_UNKNOWN); ECHO_LM(DB, MSG_POSITION_UNKNOWN);
...@@ -2871,11 +2986,13 @@ inline void gcode_G4() { ...@@ -2871,11 +2986,13 @@ inline void gcode_G4() {
*/ */
inline void gcode_G28() { inline void gcode_G28() {
if (debugLevel & DEBUG_INFO) ECHO_LM(DB, "gcode_G28 >>>");
// Wait for planner moves to finish! // Wait for planner moves to finish!
st_synchronize(); st_synchronize();
// For auto bed leveling, clear the level matrix // For auto bed leveling, clear the level matrix
#ifdef ENABLE_AUTO_BED_LEVELING #if ENABLED(AUTO_BED_LEVELING_FEATURE)
plan_bed_level_matrix.set_to_identity(); plan_bed_level_matrix.set_to_identity();
#elif defined(DELTA) #elif defined(DELTA)
reset_bed_level(); reset_bed_level();
...@@ -2904,7 +3021,7 @@ inline void gcode_G28() { ...@@ -2904,7 +3021,7 @@ inline void gcode_G28() {
} }
#endif #endif
#ifdef DELTA #if ENABLED(DELTA)
// A delta can only safely home all axis at the same time // A delta can only safely home all axis at the same time
// all axis have to home at the same time // all axis have to home at the same time
...@@ -2929,6 +3046,11 @@ inline void gcode_G28() { ...@@ -2929,6 +3046,11 @@ inline void gcode_G28() {
sync_plan_position_delta(); sync_plan_position_delta();
if (debugLevel & DEBUG_INFO) {
ECHO_S(DB);
print_xyz("(DELTA) > current_position", current_position);
}
#else // NOT DELTA #else // NOT DELTA
if (home_all_axis || homeZ) { if (home_all_axis || homeZ) {
...@@ -2936,12 +3058,19 @@ inline void gcode_G28() { ...@@ -2936,12 +3058,19 @@ inline void gcode_G28() {
#if Z_HOME_DIR > 0 // If homing away from BED do Z first #if Z_HOME_DIR > 0 // If homing away from BED do Z first
HOMEAXIS(Z); HOMEAXIS(Z);
if (debugLevel & DEBUG_INFO) {
ECHO_S(DB);
print_xyz("> HOMEAXIS(Z) > current_position", current_position);
}
#elif !defined(Z_SAFE_HOMING) && defined(Z_RAISE_BEFORE_HOMING) && Z_RAISE_BEFORE_HOMING > 0 #elif DISABLED(Z_SAFE_HOMING) && defined(Z_RAISE_BEFORE_HOMING) && Z_RAISE_BEFORE_HOMING > 0
// Raise Z before homing any other axes // Raise Z before homing any other axes
destination[Z_AXIS] = -Z_RAISE_BEFORE_HOMING * home_dir(Z_AXIS); // Set destination away from bed destination[Z_AXIS] = -Z_RAISE_BEFORE_HOMING * home_dir(Z_AXIS); // Set destination away from bed
if (debugLevel & DEBUG_INFO) {
ECHO_SMV(DB, "Raise Z (before homing) by ", (float)Z_RAISE_BEFORE_HOMING);
print_xyz(" > (home_all_axis || homeZ) > destination", destination);
}
feedrate = max_feedrate[Z_AXIS] * 60; feedrate = max_feedrate[Z_AXIS] * 60;
line_to_destination(); line_to_destination();
st_synchronize(); st_synchronize();
...@@ -2974,10 +3103,15 @@ inline void gcode_G28() { ...@@ -2974,10 +3103,15 @@ inline void gcode_G28() {
line_to_destination(); line_to_destination();
st_synchronize(); st_synchronize();
axis_is_at_home(X_AXIS); set_axis_is_at_home(X_AXIS);
axis_is_at_home(Y_AXIS); set_axis_is_at_home(Y_AXIS);
sync_plan_position(); sync_plan_position();
if (debugLevel & DEBUG_INFO) {
ECHO_S(DB);
print_xyz("> QUICK_HOME > current_position 1", current_position);
}
destination[X_AXIS] = current_position[X_AXIS]; destination[X_AXIS] = current_position[X_AXIS];
destination[Y_AXIS] = current_position[Y_AXIS]; destination[Y_AXIS] = current_position[Y_AXIS];
line_to_destination(); line_to_destination();
...@@ -2987,11 +3121,15 @@ inline void gcode_G28() { ...@@ -2987,11 +3121,15 @@ inline void gcode_G28() {
current_position[X_AXIS] = destination[X_AXIS]; current_position[X_AXIS] = destination[X_AXIS];
current_position[Y_AXIS] = destination[Y_AXIS]; current_position[Y_AXIS] = destination[Y_AXIS];
#ifndef SCARA #if DISABLED(SCARA)
current_position[Z_AXIS] = destination[Z_AXIS]; current_position[Z_AXIS] = destination[Z_AXIS];
#endif #endif
}
if (debugLevel & DEBUG_INFO) {
ECHO_S(DB);
print_xyz("> QUICK_HOME > current_position 2", current_position);
}
}
#endif // QUICK_HOME #endif // QUICK_HOME
#ifdef HOME_Y_BEFORE_X #ifdef HOME_Y_BEFORE_X
...@@ -3016,16 +3154,26 @@ inline void gcode_G28() { ...@@ -3016,16 +3154,26 @@ inline void gcode_G28() {
#else #else
HOMEAXIS(X); HOMEAXIS(X);
#endif #endif
if (debugLevel & DEBUG_INFO) {
ECHO_S(DB);
print_xyz("> homeX", current_position);
}
} }
#ifndef HOME_Y_BEFORE_X #if DISABLED(HOME_Y_BEFORE_X)
// Home Y // Home Y
if (home_all_axis || homeY) HOMEAXIS(Y); if (home_all_axis || homeY) {
HOMEAXIS(Y);
if (debugLevel & DEBUG_INFO) {
ECHO_S(DB);
print_xyz("> homeY", current_position);
}
}
#endif #endif
// Home Z last if homing towards the bed // Home Z last if homing towards the bed
#if Z_HOME_DIR < 0 #if Z_HOME_DIR < 0
#ifndef Z_SAFE_HOMING #if DISABLED(Z_SAFE_HOMING)
if (code_seen('M') && !(homeX || homeY)) { if (code_seen('M') && !(homeX || homeY)) {
// Manual G28 bed level // Manual G28 bed level
#ifdef ULTIPANEL #ifdef ULTIPANEL
...@@ -3116,8 +3264,17 @@ inline void gcode_G28() { ...@@ -3116,8 +3264,17 @@ inline void gcode_G28() {
enqueuecommands_P(PSTR("G28")); enqueuecommands_P(PSTR("G28"));
#endif // ULTIPANEL #endif // ULTIPANEL
} }
else if (home_all_axis || homeZ) HOMEAXIS(Z); else if (home_all_axis || homeZ) {
#elif defined(Z_SAFE_HOMING) && defined(ENABLE_AUTO_BED_LEVELING)// Z Safe mode activated. HOMEAXIS(Z);
if (debugLevel & DEBUG_INFO) {
ECHO_S(DB);
print_xyz("> (home_all_axis || homeZ) > final", current_position);
}
}
#elif ENABLED(Z_SAFE_HOMING) && ENABLED(AUTO_BED_LEVELING_FEATURE)// Z Safe mode activated.
if (debugLevel & DEBUG_INFO) ECHO_LM(DB, "> Z_SAFE_HOMING >>>");
if (home_all_axis) { if (home_all_axis) {
current_position[Z_AXIS] = 0; current_position[Z_AXIS] = 0;
...@@ -3132,6 +3289,13 @@ inline void gcode_G28() { ...@@ -3132,6 +3289,13 @@ inline void gcode_G28() {
destination[Y_AXIS] = round(Z_SAFE_HOMING_Y_POINT - Y_PROBE_OFFSET_FROM_EXTRUDER); destination[Y_AXIS] = round(Z_SAFE_HOMING_Y_POINT - Y_PROBE_OFFSET_FROM_EXTRUDER);
destination[Z_AXIS] = -Z_RAISE_BEFORE_HOMING * home_dir(Z_AXIS); destination[Z_AXIS] = -Z_RAISE_BEFORE_HOMING * home_dir(Z_AXIS);
feedrate = xy_travel_speed; feedrate = xy_travel_speed;
if (debugLevel & DEBUG_INFO) {
ECHO_SMV(DB, "Raise Z (before homing) by ", (float)Z_RAISE_BEFORE_HOMING);
print_xyz(" > home_all_axis > current_position", current_position, false);
print_xyz(" > home_all_axis > destination", destination);
}
// This could potentially move X, Y, Z all together // This could potentially move X, Y, Z all together
line_to_destination(); line_to_destination();
st_synchronize(); st_synchronize();
...@@ -3161,6 +3325,13 @@ inline void gcode_G28() { ...@@ -3161,6 +3325,13 @@ inline void gcode_G28() {
// Set Z destination away from bed and raise the axis // Set Z destination away from bed and raise the axis
destination[Z_AXIS] = -Z_RAISE_BEFORE_HOMING * home_dir(Z_AXIS); // Set destination away from bed destination[Z_AXIS] = -Z_RAISE_BEFORE_HOMING * home_dir(Z_AXIS); // Set destination away from bed
feedrate = max_feedrate[Z_AXIS] * 60; feedrate = max_feedrate[Z_AXIS] * 60;
if (debugLevel & DEBUG_INFO) {
ECHO_SMV(DB, "Raise Z (before homing) by ", (float)Z_RAISE_BEFORE_HOMING);
print_xyz(" > homeZ > current_position", current_position, false);
print_xyz(" > homeZ > destination", destination);
}
line_to_destination(); line_to_destination();
st_synchronize(); st_synchronize();
...@@ -3177,7 +3348,8 @@ inline void gcode_G28() { ...@@ -3177,7 +3348,8 @@ inline void gcode_G28() {
ECHO_LM(ER, MSG_POSITION_UNKNOWN); ECHO_LM(ER, MSG_POSITION_UNKNOWN);
} }
} }
#elif defined(Z_SAFE_HOMING) if (debugLevel & DEBUG_INFO) ECHO_LM(DB, "<<< Z_SAFE_HOMING");
#elif ENABLED(Z_SAFE_HOMING)
if (home_all_axis || homeZ) { if (home_all_axis || homeZ) {
// Let's see if X and Y are homed // Let's see if X and Y are homed
...@@ -3189,6 +3361,13 @@ inline void gcode_G28() { ...@@ -3189,6 +3361,13 @@ inline void gcode_G28() {
destination[Y_AXIS] = round(Z_SAFE_HOMING_Y_POINT); destination[Y_AXIS] = round(Z_SAFE_HOMING_Y_POINT);
destination[Z_AXIS] = current_position[Z_AXIS] = 0; destination[Z_AXIS] = current_position[Z_AXIS] = 0;
feedrate = xy_travel_speed; feedrate = xy_travel_speed;
if (debugLevel & DEBUG_INFO) {
ECHO_SMV(DB, "Raise Z (before homing) by ", (float)Z_RAISE_BEFORE_HOMING);
print_xyz(" > home_all_axis > current_position", current_position, false);
print_xyz(" > home_all_axis > destination", destination);
}
// This could potentially move X, Y, Z all together // This could potentially move X, Y, Z all together
line_to_destination(); line_to_destination();
st_synchronize(); st_synchronize();
...@@ -3203,6 +3382,7 @@ inline void gcode_G28() { ...@@ -3203,6 +3382,7 @@ inline void gcode_G28() {
ECHO_LM(ER, MSG_POSITION_UNKNOWN); ECHO_LM(ER, MSG_POSITION_UNKNOWN);
} }
} }
if (debugLevel & DEBUG_INFO) ECHO_LM(DB, "<<< Z_SAFE_HOMING");
#endif //Z_SAFE_HOMING #endif //Z_SAFE_HOMING
#endif //Z_HOME_DIR < 0 #endif //Z_HOME_DIR < 0
...@@ -3210,14 +3390,14 @@ inline void gcode_G28() { ...@@ -3210,14 +3390,14 @@ inline void gcode_G28() {
#endif // !DELTA #endif // !DELTA
#ifdef SCARA #if ENABLED(SCARA)
sync_plan_position_delta(); sync_plan_position_delta();
#endif #endif
clean_up_after_endstop_move(); clean_up_after_endstop_move();
} }
#ifdef ENABLE_AUTO_BED_LEVELING #if ENABLED(AUTO_BED_LEVELING_FEATURE)
void out_of_range_error(const char *p_edge) { void out_of_range_error(const char *p_edge) {
ECHO_M("?Probe "); ECHO_M("?Probe ");
...@@ -3263,6 +3443,8 @@ inline void gcode_G28() { ...@@ -3263,6 +3443,8 @@ inline void gcode_G28() {
*/ */
inline void gcode_G29() { inline void gcode_G29() {
if (debugLevel & DEBUG_INFO) ECHO_LM(DB, "gcode_G29 >>>");
// Don't allow auto-leveling without homing first // Don't allow auto-leveling without homing first
if (!axis_known_position[X_AXIS] || !axis_known_position[Y_AXIS]) { if (!axis_known_position[X_AXIS] || !axis_known_position[Y_AXIS]) {
LCD_MESSAGEPGM(MSG_POSITION_UNKNOWN); LCD_MESSAGEPGM(MSG_POSITION_UNKNOWN);
...@@ -3270,16 +3452,16 @@ inline void gcode_G28() { ...@@ -3270,16 +3452,16 @@ inline void gcode_G28() {
return; return;
} }
int verbose_level = code_seen('V') || code_seen('v') ? code_value_short() : 1; int verbose_level = code_seen('V') ? code_value_short() : 1;
if (verbose_level < 0 || verbose_level > 4) { if (verbose_level < 0 || verbose_level > 4) {
ECHO_LM(ER,"?(V)erbose Level is implausible (0-4)."); ECHO_LM(ER,"?(V)erbose Level is implausible (0-4).");
return; return;
} }
bool dryrun = code_seen('D') || code_seen('d'), bool dryrun = code_seen('D'),
deploy_probe_for_each_reading = code_seen('E'); deploy_probe_for_each_reading = code_seen('E');
#ifdef AUTO_BED_LEVELING_GRID #if ENABLED(AUTO_BED_LEVELING_GRID)
bool do_topography_map = verbose_level > 2 || code_seen('T'); bool do_topography_map = verbose_level > 2 || code_seen('T');
...@@ -3332,7 +3514,7 @@ inline void gcode_G28() { ...@@ -3332,7 +3514,7 @@ inline void gcode_G28() {
#endif // AUTO_BED_LEVELING_GRID #endif // AUTO_BED_LEVELING_GRID
#ifdef Z_PROBE_SLED #if ENABLED(Z_PROBE_SLED)
dock_sled(false); // engage (un-dock) the probe dock_sled(false); // engage (un-dock) the probe
#endif #endif
...@@ -3355,7 +3537,7 @@ inline void gcode_G28() { ...@@ -3355,7 +3537,7 @@ inline void gcode_G28() {
setup_for_endstop_move(); setup_for_endstop_move();
feedrate = homing_feedrate[Z_AXIS]; feedrate = homing_feedrate[Z_AXIS];
#ifdef AUTO_BED_LEVELING_GRID #if ENABLED(AUTO_BED_LEVELING_GRID)
// probe at the points of a lattice grid // probe at the points of a lattice grid
const int xGridSpacing = (right_probe_bed_position - left_probe_bed_position) / (auto_bed_leveling_grid_points - 1), const int xGridSpacing = (right_probe_bed_position - left_probe_bed_position) / (auto_bed_leveling_grid_points - 1),
...@@ -3370,8 +3552,7 @@ inline void gcode_G28() { ...@@ -3370,8 +3552,7 @@ inline void gcode_G28() {
int abl2 = auto_bed_leveling_grid_points * auto_bed_leveling_grid_points; int abl2 = auto_bed_leveling_grid_points * auto_bed_leveling_grid_points;
double eqnAMatrix[abl2 * 3], // "A" matrix of the linear system of equations double eqnAMatrix[abl2 * 3], // "A" matrix of the linear system of equations
eqnBVector[abl2], // "B" vector of Z points eqnBVector[abl2]; // "B" vector of Z points
mean = 0.0;
int probePointCounter = 0; int probePointCounter = 0;
bool zig = true; bool zig = true;
...@@ -3401,6 +3582,13 @@ inline void gcode_G28() { ...@@ -3401,6 +3582,13 @@ inline void gcode_G28() {
float measured_z, float measured_z,
z_before = probePointCounter ? Z_RAISE_BETWEEN_PROBINGS + current_position[Z_AXIS] : Z_RAISE_BEFORE_PROBING; z_before = probePointCounter ? Z_RAISE_BETWEEN_PROBINGS + current_position[Z_AXIS] : Z_RAISE_BEFORE_PROBING;
if (probePointCounter) {
if (debugLevel & DEBUG_INFO) ECHO_LMV(DB, "z_before = (between) ", (float)(Z_RAISE_BETWEEN_PROBINGS + current_position[Z_AXIS]));
}
else {
if (debugLevel & DEBUG_INFO) ECHO_LMV(DB, "z_before = (before) ", (float)Z_RAISE_BEFORE_PROBING);
}
// Enhanced G29 - Do not retract servo between probes // Enhanced G29 - Do not retract servo between probes
ProbeAction act; ProbeAction act;
if (deploy_probe_for_each_reading) // G29 E - Stow between probes if (deploy_probe_for_each_reading) // G29 E - Stow between probes
...@@ -3414,8 +3602,6 @@ inline void gcode_G28() { ...@@ -3414,8 +3602,6 @@ inline void gcode_G28() {
measured_z = probe_pt(xProbe, yProbe, z_before, act, verbose_level); measured_z = probe_pt(xProbe, yProbe, z_before, act, verbose_level);
mean += measured_z;
eqnBVector[probePointCounter] = measured_z; eqnBVector[probePointCounter] = measured_z;
eqnAMatrix[probePointCounter + 0 * abl2] = xProbe; eqnAMatrix[probePointCounter + 0 * abl2] = xProbe;
eqnAMatrix[probePointCounter + 1 * abl2] = yProbe; eqnAMatrix[probePointCounter + 1 * abl2] = yProbe;
...@@ -3428,52 +3614,94 @@ inline void gcode_G28() { ...@@ -3428,52 +3614,94 @@ inline void gcode_G28() {
} //xProbe } //xProbe
} //yProbe } //yProbe
if (debugLevel & DEBUG_INFO) {
ECHO_S(DB);
print_xyz("> probing complete > current_position", current_position);
}
clean_up_after_endstop_move(); clean_up_after_endstop_move();
// solve lsq problem // solve lsq problem
double plane_equation_coefficients[3]; double *plane_equation_coefficients = qr_solve(abl2, 3, eqnAMatrix, eqnBVector);
qr_solve(plane_equation_coefficients, abl2, 3, eqnAMatrix, eqnBVector);
mean /= abl2;
if (verbose_level) { if (verbose_level) {
ECHO_SMV(DB, "Eqn coefficients: a: ", plane_equation_coefficients[0], 8); ECHO_SMV(DB, "Eqn coefficients: a: ", plane_equation_coefficients[0], 8);
ECHO_MV(" b: ", plane_equation_coefficients[1], 8); ECHO_MV(" b: ", plane_equation_coefficients[1], 8);
ECHO_EMV(" d: ", plane_equation_coefficients[2], 8); ECHO_EMV(" d: ", plane_equation_coefficients[2], 8);
if (verbose_level > 2) {
ECHO_LMV(DB, "Mean of sampled points: ", mean, 8);
}
} }
if (!dryrun) set_bed_level_equation_lsq(plane_equation_coefficients); if (!dryrun) set_bed_level_equation_lsq(plane_equation_coefficients);
free(plane_equation_coefficients); free(plane_equation_coefficients);
matrix_3x3 inverse_bed_level_matrix = matrix_3x3::transpose(plan_bed_level_matrix); // inverse bed level matrix
// In the special case of an rotation matrix "the inverse" = "the transposed" matrix.
// search minimum and maximum point on bed in rotated coordinates
float rot_min_diff = Z_MAX_POS,
rot_max_diff = -Z_MAX_POS,
min_diff = Z_MAX_POS;
for (int8_t i = 0; i < abl2; i++) {
vector_3 probe_point = vector_3(eqnAMatrix[i + 0 * abl2], eqnAMatrix[i + 1 * abl2], eqnBVector[i]);
probe_point.apply_rotation(inverse_bed_level_matrix);
rot_min_diff = min(rot_min_diff, probe_point.z);
rot_max_diff = max(rot_max_diff, probe_point.z);
min_diff = min(min_diff, eqnBVector[i]);
}
// Show the Topography map if enabled // Show the Topography map if enabled
if (do_topography_map) { if (do_topography_map) {
// search minimum measured Z
ECHO_LM(DB, "Bed Height Topography: \n"); ECHO_LM(DB, "+-----------+");
ECHO_LM(DB, "+-----------+\n"); ECHO_LM(DB, "|...Back....|");
ECHO_LM(DB, "|...Back....|\n"); ECHO_LM(DB, "|Left..Right|");
ECHO_LM(DB, "|Left..Right|\n"); ECHO_LM(DB, "|...Front...|");
ECHO_LM(DB, "|...Front...|\n"); ECHO_LM(DB, "+-----------+");
ECHO_LM(DB, "+-----------+\n"); ECHO_LM(DB, "Measured Bed Topography:");
float min_diff = 999; for (int8_t yy = auto_bed_leveling_grid_points - 1; yy >= 0; yy--) {
ECHO_S(DB);
for (int8_t xx = 0; xx < auto_bed_leveling_grid_points; xx++) {
int8_t ind = yy * auto_bed_leveling_grid_points + xx;
float diff = eqnBVector[ind];
if (diff >= 0.0)
ECHO_M(" +"); // Include + for column alignment
else
ECHO_M(" ");
ECHO_V(diff, 5);
} // xx
ECHO_E;
} // yy
ECHO_E;
for (int yy = auto_bed_leveling_grid_points - 1; yy >= 0; yy--) { ECHO_LM(DB, "Corrected Bed Topography:");
for (int8_t yy = auto_bed_leveling_grid_points - 1; yy >= 0; yy--) {
ECHO_S(DB); ECHO_S(DB);
for (int xx = 0; xx < auto_bed_leveling_grid_points; xx++) { for (int8_t xx = 0; xx < auto_bed_leveling_grid_points; xx++) {
int ind = yy * auto_bed_leveling_grid_points + xx; int8_t ind = yy * auto_bed_leveling_grid_points + xx;
float diff = eqnBVector[ind] - mean;
float x_tmp = eqnAMatrix[ind + 0 * abl2], float diff = eqnBVector[ind] - min_diff;
y_tmp = eqnAMatrix[ind + 1 * abl2],
z_tmp = 0; if (diff >= 0.0)
ECHO_M(" +"); // Include + for column alignment
else
ECHO_M(" ");
ECHO_V(diff, 5);
} // xx
ECHO_E;
} // yy
ECHO_E;
apply_rotation_xyz(plan_bed_level_matrix,x_tmp,y_tmp,z_tmp); ECHO_LM(DB, "Corrected Bed Topography in new coordinates:");
for (int8_t yy = auto_bed_leveling_grid_points - 1; yy >= 0; yy--) {
ECHO_S(DB);
for (int8_t xx = 0; xx < auto_bed_leveling_grid_points; xx++) {
int8_t ind = yy * auto_bed_leveling_grid_points + xx;
if (eqnBVector[ind] - z_tmp < min_diff) vector_3 probe_point = vector_3(eqnAMatrix[ind + 0 * abl2], eqnAMatrix[ind + 1 * abl2], eqnBVector[ind]);
min_diff = eqnBVector[ind] - z_tmp; probe_point.apply_rotation(inverse_bed_level_matrix);
float diff = probe_point.z - rot_min_diff;
if (diff >= 0.0) if (diff >= 0.0)
ECHO_M(" +"); // Include + for column alignment ECHO_M(" +"); // Include + for column alignment
...@@ -3484,32 +3712,33 @@ inline void gcode_G28() { ...@@ -3484,32 +3712,33 @@ inline void gcode_G28() {
ECHO_E; ECHO_E;
} // yy } // yy
ECHO_E; ECHO_E;
if (verbose_level > 3) {
ECHO_LM(DB, " Corrected Bed Height vs. Bed Topology: \n"); ECHO_LM(DB, "Height from Bed to Nozzle");
for (int yy = auto_bed_leveling_grid_points - 1; yy >= 0; yy--) { ECHO_LM(DB, "(+) above, or (-) below surface :");
ECHO_S(DB); for (int8_t yy = auto_bed_leveling_grid_points - 1; yy >= 0; yy--) {
for (int xx = 0; xx < auto_bed_leveling_grid_points; xx++) { ECHO_S(DB);
int ind = yy * auto_bed_leveling_grid_points + xx; for (int8_t xx = 0; xx < auto_bed_leveling_grid_points; xx++) {
float x_tmp = eqnAMatrix[ind + 0 * abl2], int8_t ind = yy * auto_bed_leveling_grid_points + xx;
y_tmp = eqnAMatrix[ind + 1 * abl2],
z_tmp = 0; vector_3 probe_point = vector_3(eqnAMatrix[ind + 0 * abl2], eqnAMatrix[ind + 1 * abl2], eqnBVector[ind]);
probe_point.apply_rotation(inverse_bed_level_matrix);
apply_rotation_xyz(plan_bed_level_matrix,x_tmp,y_tmp,z_tmp); float diff = -(probe_point.z - rot_max_diff);
float diff = eqnBVector[ind] - z_tmp - min_diff; if (diff >= 0.0)
if (diff >= 0.0) ECHO_M(" +"); // Include + for column alignment
ECHO_M(" +"); // Include + for column alignment else
else ECHO_M(" ");
ECHO_M(" "); ECHO_V(diff, 5);
ECHO_V(diff, 5); } // xx
} // xx
ECHO_E;
} // yy
ECHO_E; ECHO_E;
} } // yy
ECHO_E;
} //do_topography_map } //do_topography_map
#else // !AUTO_BED_LEVELING_GRID #else // !AUTO_BED_LEVELING_GRID
if (debugLevel & DEBUG_INFO) ECHO_LM(DB, "> 3-point Leveling");
// Actions for each probe // Actions for each probe
ProbeAction p1, p2, p3; ProbeAction p1, p2, p3;
if (deploy_probe_for_each_reading) if (deploy_probe_for_each_reading)
...@@ -3527,48 +3756,27 @@ inline void gcode_G28() { ...@@ -3527,48 +3756,27 @@ inline void gcode_G28() {
#endif // !AUTO_BED_LEVELING_GRID #endif // !AUTO_BED_LEVELING_GRID
if (verbose_level > 0) if (verbose_level > 0)
plan_bed_level_matrix.debug("Bed Level Correction Matrix:"); plan_bed_level_matrix.debug(" Bed Level Correction Matrix:");
if (!dryrun) { if (!dryrun) {
// Correct the Z height difference from z-probe position and hotend tip position. uint8_t ind = abl2-1; // last point probe = current point
// The Z height on homing is measured by Z-Probe, but the probe is quite far from the hotend. vector_3 probe_point = vector_3(eqnAMatrix[ind + 0 * abl2], eqnAMatrix[ind + 1 * abl2], eqnBVector[ind]);
// When the bed is uneven, this height must be corrected. probe_point.apply_rotation(inverse_bed_level_matrix);
float x_tmp = current_position[X_AXIS] + X_PROBE_OFFSET_FROM_EXTRUDER, current_position[Z_AXIS] = -zprobe_zoffset + (probe_point.z - rot_max_diff)
y_tmp = current_position[Y_AXIS] + Y_PROBE_OFFSET_FROM_EXTRUDER, #if HAS_SERVO_ENDSTOPS || ENABLED(Z_PROBE_SLED)
z_tmp = current_position[Z_AXIS], + Z_RAISE_AFTER_PROBING
real_z = st_get_position_mm(Z_AXIS); //get the real Z (since plan_get_position is now correcting the plane) #endif
;
apply_rotation_xyz(plan_bed_level_matrix, x_tmp, y_tmp, z_tmp); // Apply the correction sending the probe offset
// Get the current Z position and send it to the planner.
//
// >> (z_tmp - real_z) : The rotated current Z minus the uncorrected Z (most recent plan_set_position/sync_plan_position)
//
// >> zprobe_zoffset : Z distance from nozzle to probe (set by default, M851, EEPROM, or Menu)
//
// >> Z_RAISE_AFTER_PROBING : The distance the probe will have lifted after the last probe
//
// >> Should home_offset[Z_AXIS] be included?
//
// Discussion: home_offset[Z_AXIS] was applied in G28 to set the starting Z.
// If Z is not tweaked in G29 -and- the Z probe in G29 is not actually "homing" Z...
// then perhaps it should not be included here. The purpose of home_offset[] is to
// adjust for inaccurate endstops, not for reasonably accurate probes. If it were
// added here, it could be seen as a compensating factor for the Z probe.
//
current_position[Z_AXIS] = -zprobe_zoffset + (z_tmp - real_z)
#if HAS_SERVO_ENDSTOPS || ENABLED(Z_PROBE_SLED)
+ Z_RAISE_AFTER_PROBING
#endif
;
// current_position[Z_AXIS] += home_offset[Z_AXIS]; // The probe determines Z=0, not "Z home"
sync_plan_position(); sync_plan_position();
if (debugLevel & DEBUG_INFO) ECHO_LMV(DB, "> AFTER apply_rotation_xyz > current_position[Z_AXIS]= ", current_position[Z_AXIS], 5);
} }
#ifdef Z_PROBE_SLED #if ENABLED(Z_PROBE_SLED)
dock_sled(true); // dock the probe dock_sled(true); // dock the probe
#endif #endif
if (debugLevel & DEBUG_INFO) ECHO_LM(DB, "<<< gcode_G29");
} }
#if DISABLED(Z_PROBE_SLED) #if DISABLED(Z_PROBE_SLED)
...@@ -3590,14 +3798,16 @@ inline void gcode_G28() { ...@@ -3590,14 +3798,16 @@ inline void gcode_G28() {
stow_z_probe(); // Retract Z Servo endstop if available stow_z_probe(); // Retract Z Servo endstop if available
} }
#endif // !Z_PROBE_SLED #endif // !Z_PROBE_SLED
#endif // ENABLE_AUTO_BED_LEVELING #endif // AUTO_BED_LEVELING_FEATURE
#if defined(DELTA) && defined(Z_PROBE_ENDSTOP) #if ENABLED(DELTA) && ENABLED(Z_PROBE_ENDSTOP)
/** /**
* G29: Delta Z-Probe, probes the bed at more points. * G29: Delta Z-Probe, probes the bed at more points.
*/ */
inline void gcode_G29() { inline void gcode_G29() {
if (debugLevel & DEBUG_INFO) ECHO_LM(DB, "gcode_G29 >>>");
if (code_seen('D')) { if (code_seen('D')) {
print_bed_level(); print_bed_level();
return; return;
...@@ -3612,6 +3822,8 @@ inline void gcode_G28() { ...@@ -3612,6 +3822,8 @@ inline void gcode_G28() {
calibrate_print_surface(z_probe_offset[Z_AXIS] + (code_seen(axis_codes[Z_AXIS]) ? code_value() : 0.0)); calibrate_print_surface(z_probe_offset[Z_AXIS] + (code_seen(axis_codes[Z_AXIS]) ? code_value() : 0.0));
retract_z_probe(); retract_z_probe();
if (debugLevel & DEBUG_INFO) ECHO_LM(DB, "<<< gcode_G29");
clean_up_after_endstop_move(); clean_up_after_endstop_move();
} }
...@@ -3646,14 +3858,16 @@ inline void gcode_G28() { ...@@ -3646,14 +3858,16 @@ inline void gcode_G28() {
deploy_z_probe(); deploy_z_probe();
probe_value = probe_bed(x, y); probe_value = probe_bed(x, y);
ECHO_SMV(DB, "Bed Z-Height at X:", x); if (debugLevel & DEBUG_INFO) {
ECHO_MV(" Y:", y); ECHO_SMV(DB, "Bed Z-Height at X:", x);
ECHO_EMV(" = ", probe_value, 4); ECHO_MV(" Y:", y);
ECHO_EMV(" = ", probe_value, 4);
ECHO_SMV(DB, "Carriage Positions: [", saved_position[X_AXIS]);
ECHO_MV(", ", saved_position[Y_AXIS]); ECHO_SMV(DB, "Carriage Positions: [", saved_position[X_AXIS]);
ECHO_MV(", ", saved_position[Z_AXIS]); ECHO_MV(", ", saved_position[Y_AXIS]);
ECHO_EM("]"); ECHO_MV(", ", saved_position[Z_AXIS]);
ECHO_EM("]");
}
retract_z_probe(); retract_z_probe();
return; return;
} }
...@@ -4208,7 +4422,7 @@ inline void gcode_M42() { ...@@ -4208,7 +4422,7 @@ inline void gcode_M42() {
} // code_seen('S') } // code_seen('S')
} }
#if defined(ENABLE_AUTO_BED_LEVELING) && defined(Z_PROBE_REPEATABILITY_TEST) #if ENABLED(AUTO_BED_LEVELING_FEATURE) && ENABLED(Z_PROBE_REPEATABILITY_TEST)
/** /**
* M48: Z-Probe repeatability measurement function. * M48: Z-Probe repeatability measurement function.
* *
...@@ -4431,7 +4645,7 @@ inline void gcode_M42() { ...@@ -4431,7 +4645,7 @@ inline void gcode_M42() {
} }
#endif // ENABLE_AUTO_BED_LEVELING && Z_PROBE_REPEATABILITY_TEST #endif // AUTO_BED_LEVELING_FEATURE && Z_PROBE_REPEATABILITY_TEST
#if HAS_POWER_SWITCH #if HAS_POWER_SWITCH
...@@ -4674,12 +4888,17 @@ inline void gcode_M111() { ...@@ -4674,12 +4888,17 @@ inline void gcode_M111() {
debugLevel = code_seen('S') ? code_value_short() : DEBUG_INFO|DEBUG_COMMUNICATION; debugLevel = code_seen('S') ? code_value_short() : DEBUG_INFO|DEBUG_COMMUNICATION;
if (debugLevel & DEBUG_ECHO) ECHO_LM(DB, MSG_DEBUG_ECHO); if (debugLevel & DEBUG_ECHO) ECHO_LM(DB, MSG_DEBUG_ECHO);
//if (debugLevel & DEBUG_INFO) ECHO_LM(DB, MSG_DEBUG_INFO); if (debugLevel & DEBUG_INFO) ECHO_LM(DB, MSG_DEBUG_INFO);
//if (debugLevel & DEBUG_ERRORS) ECHO_LM(DB, MSG_DEBUG_ERRORS); //if (debugLevel & DEBUG_ERRORS) ECHO_LM(DB, MSG_DEBUG_ERRORS);
if (debugLevel & DEBUG_DRYRUN) { if (debugLevel & DEBUG_DRYRUN) {
ECHO_LM(DB, MSG_DEBUG_DRYRUN); ECHO_LM(DB, MSG_DEBUG_DRYRUN);
disable_all_heaters(); disable_all_heaters();
} }
#if ENABLED(DEBUG_LEVELING_FEATURE)
if (debugLevel & DEBUG_LEVELING) {
ECHO_LM(DB, MSG_DEBUG_LEVELING);
}
#endif
} }
/** /**
...@@ -5539,7 +5758,7 @@ inline void gcode_M226() { ...@@ -5539,7 +5758,7 @@ inline void gcode_M226() {
*/ */
inline void gcode_M400() { st_synchronize(); } inline void gcode_M400() { st_synchronize(); }
#if defined(ENABLE_AUTO_BED_LEVELING) && !defined(Z_PROBE_SLED) && SERVO_LEVELING #if ENABLED(AUTO_BED_LEVELING_FEATURE) && DISABLED(Z_PROBE_SLED) && SERVO_LEVELING
#if SERVO_LEVELING #if SERVO_LEVELING
void raise_z_for_servo() { void raise_z_for_servo() {
...@@ -5926,7 +6145,7 @@ inline void gcode_M503() { ...@@ -5926,7 +6145,7 @@ inline void gcode_M503() {
} }
#endif // DUAL_X_CARRIAGE #endif // DUAL_X_CARRIAGE
#ifdef ENABLE_AUTO_BED_LEVELING #if ENABLED(AUTO_BED_LEVELING_FEATURE)
//M666: Set Z probe offset //M666: Set Z probe offset
inline void gcode_M666() { inline void gcode_M666() {
if (code_seen('P')) { if (code_seen('P')) {
...@@ -5939,7 +6158,7 @@ inline void gcode_M503() { ...@@ -5939,7 +6158,7 @@ inline void gcode_M503() {
} }
#endif #endif
#ifdef DELTA #if ENABLED(DELTA)
//M666: Set delta endstop and geometry adjustment //M666: Set delta endstop and geometry adjustment
inline void gcode_M666() { inline void gcode_M666() {
if (code_seen('A')) { if (code_seen('A')) {
...@@ -6094,29 +6313,6 @@ inline void gcode_M999() { ...@@ -6094,29 +6313,6 @@ inline void gcode_M999() {
FlushSerialRequestResend(); FlushSerialRequestResend();
} }
#ifdef CUSTOM_M_CODE_SET_Z_PROBE_OFFSET
inline void gcode_SET_Z_PROBE_OFFSET() {
float value;
if (code_seen('Z')) {
value = code_value();
if (Z_PROBE_OFFSET_RANGE_MIN <= value && value <= Z_PROBE_OFFSET_RANGE_MAX) {
zprobe_zoffset = value;
ECHO_LM(DB, MSG_ZPROBE_ZOFFSET " " OK);
}
else {
ECHO_SM(DB, MSG_ZPROBE_ZOFFSET);
ECHO_MV(MSG_Z_MIN, Z_PROBE_OFFSET_RANGE_MIN);
ECHO_EMV(MSG_Z_MAX, Z_PROBE_OFFSET_RANGE_MAX);
}
}
else {
ECHO_LMV(DB, MSG_ZPROBE_ZOFFSET " : ", zprobe_zoffset);
}
}
#endif // CUSTOM_M_CODE_SET_Z_PROBE_OFFSET
/** /**
* T0-T3: Switch tool, usually switching extruders * T0-T3: Switch tool, usually switching extruders
* *
...@@ -6177,7 +6373,7 @@ inline void gcode_T(uint8_t tmp_extruder) { ...@@ -6177,7 +6373,7 @@ inline void gcode_T(uint8_t tmp_extruder) {
active_extruder = target_extruder; active_extruder = target_extruder;
// This function resets the max/min values - the current position may be overwritten below. // This function resets the max/min values - the current position may be overwritten below.
axis_is_at_home(X_AXIS); set_axis_is_at_home(X_AXIS);
if (dual_x_carriage_mode == DXC_FULL_CONTROL_MODE) { if (dual_x_carriage_mode == DXC_FULL_CONTROL_MODE) {
current_position[X_AXIS] = inactive_extruder_x_pos; current_position[X_AXIS] = inactive_extruder_x_pos;
...@@ -6429,10 +6625,10 @@ void process_next_command() { ...@@ -6429,10 +6625,10 @@ void process_next_command() {
case 28: //G28: Home all axes, one at a time case 28: //G28: Home all axes, one at a time
gcode_G28(); gcode_M114(); break; gcode_G28(); gcode_M114(); break;
#ifdef ENABLE_AUTO_BED_LEVELING #if ENABLED(AUTO_BED_LEVELING_FEATURE)
case 29: // G29 Detailed Z-Probe, probes the bed at 3 or more points. case 29: // G29 Detailed Z-Probe, probes the bed at 3 or more points.
gcode_G29(); gcode_M114(); break; gcode_G29(); gcode_M114(); break;
#ifndef Z_PROBE_SLED #if DISABLED(Z_PROBE_SLED)
case 30: // G30 Single Z Probe case 30: // G30 Single Z Probe
gcode_G30(); break; gcode_G30(); break;
#else // Z_PROBE_SLED #else // Z_PROBE_SLED
...@@ -6440,7 +6636,7 @@ void process_next_command() { ...@@ -6440,7 +6636,7 @@ void process_next_command() {
case 32: // G32: undock the sled case 32: // G32: undock the sled
dock_sled(codenum == 31); break; dock_sled(codenum == 31); break;
#endif // Z_PROBE_SLED #endif // Z_PROBE_SLED
#endif // ENABLE_AUTO_BED_LEVELING #endif // AUTO_BED_LEVELING_FEATURE
#if defined(DELTA) && defined(Z_PROBE_ENDSTOP) #if defined(DELTA) && defined(Z_PROBE_ENDSTOP)
case 29: // G29 Detailed Z-Probe, probes the bed at more points. case 29: // G29 Detailed Z-Probe, probes the bed at more points.
...@@ -6527,7 +6723,7 @@ void process_next_command() { ...@@ -6527,7 +6723,7 @@ void process_next_command() {
case 42: // M42 -Change pin status via gcode case 42: // M42 -Change pin status via gcode
gcode_M42(); break; gcode_M42(); break;
#if defined(ENABLE_AUTO_BED_LEVELING) && defined(Z_PROBE_REPEATABILITY_TEST) #if ENABLED(AUTO_BED_LEVELING_FEATURE) && ENABLED(Z_PROBE_REPEATABILITY_TEST)
case 48: // M48 Z-Probe repeatability case 48: // M48 Z-Probe repeatability
gcode_M48(); break; gcode_M48(); break;
#endif #endif
...@@ -6553,7 +6749,7 @@ void process_next_command() { ...@@ -6553,7 +6749,7 @@ void process_next_command() {
case 104: // M104 case 104: // M104
gcode_M104(); break; gcode_M104(); break;
case 105: // M105 Read current temperature case 105: // M105 Read current temperature
gcode_M105(); return; break; // "ok" already printed gcode_M105(); return; // "ok" already printed
#if HAS_FAN #if HAS_FAN
case 106: //M106 Fan On case 106: //M106 Fan On
...@@ -6775,7 +6971,7 @@ void process_next_command() { ...@@ -6775,7 +6971,7 @@ void process_next_command() {
gcode_M605(); break; gcode_M605(); break;
#endif #endif
#if defined(ENABLE_AUTO_BED_LEVELING) || defined(DELTA) #if ENABLED(AUTO_BED_LEVELING_FEATURE) || ENABLED(DELTA)
case 666: // M666 Set Z probe offset or set delta endstop and geometry adjustment case 666: // M666 Set Z probe offset or set delta endstop and geometry adjustment
gcode_M666(); break; gcode_M666(); break;
#endif #endif
...@@ -6793,13 +6989,8 @@ void process_next_command() { ...@@ -6793,13 +6989,8 @@ void process_next_command() {
gcode_M997(); break; gcode_M997(); break;
#endif // NPR2 #endif // NPR2
case 999: // M999: Restart after being Stopped case 999: // M999: Restart after being Stopped
gcode_M999(); break; gcode_M999(); break;
#ifdef CUSTOM_M_CODE_SET_Z_PROBE_OFFSET
case CUSTOM_M_CODE_SET_Z_PROBE_OFFSET:
gcode_SET_Z_PROBE_OFFSET(); break;
#endif // CUSTOM_M_CODE_SET_Z_PROBE_OFFSET
} }
break; break;
...@@ -6845,7 +7036,7 @@ void clamp_to_software_endstops(float target[3]) { ...@@ -6845,7 +7036,7 @@ void clamp_to_software_endstops(float target[3]) {
NOLESS(target[Y_AXIS], min_pos[Y_AXIS]); NOLESS(target[Y_AXIS], min_pos[Y_AXIS]);
float negative_z_offset = 0; float negative_z_offset = 0;
#ifdef ENABLE_AUTO_BED_LEVELING #if ENABLED(AUTO_BED_LEVELING_FEATURE)
if (zprobe_zoffset < 0) negative_z_offset += zprobe_zoffset; if (zprobe_zoffset < 0) negative_z_offset += zprobe_zoffset;
if (home_offset[Z_AXIS] < 0) negative_z_offset += home_offset[Z_AXIS]; if (home_offset[Z_AXIS] < 0) negative_z_offset += home_offset[Z_AXIS];
#endif #endif
...@@ -7024,7 +7215,12 @@ void prepare_move() { ...@@ -7024,7 +7215,12 @@ void prepare_move() {
#if defined(CARTESIAN) || defined(COREXY) || defined(COREXZ) #if defined(CARTESIAN) || defined(COREXY) || defined(COREXZ)
if (!prepare_move_cartesian()) return; if (!prepare_move_cartesian()) return;
#endif #endif
#ifdef IDLE_OOZING_PREVENT || EXTRUDER_RUNOUT_PREVENT
axis_last_activity = millis();
axis_is_moving = false;
#endif
set_current_to_destination(); set_current_to_destination();
} }
......
...@@ -102,4 +102,3 @@ void NexText::detachPop(void) ...@@ -102,4 +102,3 @@ void NexText::detachPop(void)
{ {
NexTouch::detachPop(); NexTouch::detachPop();
} }
...@@ -316,8 +316,8 @@ void CardReader::openFile(char* name, bool read, bool replace_current/*=true*/, ...@@ -316,8 +316,8 @@ void CardReader::openFile(char* name, bool read, bool replace_current/*=true*/,
subdirname[dirname_end - dirname_start] = 0; subdirname[dirname_end - dirname_start] = 0;
ECHO_EV(subdirname); ECHO_EV(subdirname);
if (!myDir.open(curDir, subdirname, O_READ)) { if (!myDir.open(curDir, subdirname, O_READ)) {
ECHO_MV(MSG_SD_OPEN_FILE_FAIL, subdirname); ECHO_SMV(ER, MSG_SD_OPEN_FILE_FAIL, subdirname);
ECHO_C('.'); ECHO_EM(".");
return; return;
} }
else { else {
...@@ -357,12 +357,12 @@ void CardReader::openFile(char* name, bool read, bool replace_current/*=true*/, ...@@ -357,12 +357,12 @@ void CardReader::openFile(char* name, bool read, bool replace_current/*=true*/,
} }
else { //write else { //write
if (!file.open(curDir, fname, O_CREAT | O_APPEND | O_WRITE | O_TRUNC)) { if (!file.open(curDir, fname, O_CREAT | O_APPEND | O_WRITE | O_TRUNC)) {
ECHO_MV(MSG_SD_OPEN_FILE_FAIL, fname); ECHO_SMV(ER, MSG_SD_OPEN_FILE_FAIL, fname);
ECHO_PGM(".\n"); ECHO_EM(".");
} }
else { else {
saving = true; saving = true;
ECHO_EMV(MSG_SD_WRITE_TO_FILE, name); ECHO_LMV(DB, MSG_SD_WRITE_TO_FILE, name);
if(lcd_status) lcd_setstatus(fname); if(lcd_status) lcd_setstatus(fname);
} }
} }
...@@ -389,8 +389,8 @@ void CardReader::removeFile(char* name) { ...@@ -389,8 +389,8 @@ void CardReader::removeFile(char* name) {
subdirname[dirname_end - dirname_start] = 0; subdirname[dirname_end - dirname_start] = 0;
ECHO_EV(subdirname); ECHO_EV(subdirname);
if (!myDir.open(curDir, subdirname, O_READ)) { if (!myDir.open(curDir, subdirname, O_READ)) {
ECHO_MV(MSG_SD_OPEN_FILE_FAIL, subdirname); ECHO_SMV(DB, MSG_SD_OPEN_FILE_FAIL, subdirname);
ECHO_C('.'); ECHO_EM(".");
return; return;
} }
...@@ -509,7 +509,7 @@ void CardReader::parseKeyLine(char *key, char *value, int &len_k, int &len_v) { ...@@ -509,7 +509,7 @@ void CardReader::parseKeyLine(char *key, char *value, int &len_k, int &len_v) {
int ln_buf = 0; int ln_buf = 0;
char ln_char; char ln_char;
bool ln_space = false, ln_ignore = false, key_found = false; bool ln_space = false, ln_ignore = false, key_found = false;
while(!eof()) { //READ KEY while(!eof()) { //READ KEY
ln_char = (char)get(); ln_char = (char)get();
if(ln_char == '\n') { if(ln_char == '\n') {
ln_buf = 0; ln_buf = 0;
...@@ -542,7 +542,7 @@ void CardReader::parseKeyLine(char *key, char *value, int &len_k, int &len_v) { ...@@ -542,7 +542,7 @@ void CardReader::parseKeyLine(char *key, char *value, int &len_k, int &len_v) {
} }
ln_buf = 0; ln_buf = 0;
ln_ignore = false; ln_ignore = false;
while(!eof()) { //READ VALUE while(!eof()) { //READ VALUE
ln_char = (char)get(); ln_char = (char)get();
if(ln_char == '\n') { if(ln_char == '\n') {
value[ln_buf] = '\0'; value[ln_buf] = '\0';
......
...@@ -366,7 +366,7 @@ ...@@ -366,7 +366,7 @@
/** /**
* Auto Bed Leveling * Auto Bed Leveling
*/ */
#if ENABLED(ENABLE_AUTO_BED_LEVELING) #if ENABLED(AUTO_BED_LEVELING_FEATURE)
// Boundaries for probing based on set limits // Boundaries for probing based on set limits
#define MIN_PROBE_X (max(X_MIN_POS, X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER)) #define MIN_PROBE_X (max(X_MIN_POS, X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER))
#define MAX_PROBE_X (min(X_MAX_POS, X_MAX_POS + X_PROBE_OFFSET_FROM_EXTRUDER)) #define MAX_PROBE_X (min(X_MAX_POS, X_MAX_POS + X_PROBE_OFFSET_FROM_EXTRUDER))
......
...@@ -488,7 +488,7 @@ void Config_ResetDefault() { ...@@ -488,7 +488,7 @@ void Config_ResetDefault() {
max_z_jerk = DEFAULT_ZJERK; max_z_jerk = DEFAULT_ZJERK;
home_offset[X_AXIS] = home_offset[Y_AXIS] = home_offset[Z_AXIS] = 0; home_offset[X_AXIS] = home_offset[Y_AXIS] = home_offset[Z_AXIS] = 0;
#if ENABLED(ENABLE_AUTO_BED_LEVELING) #if ENABLED(AUTO_BED_LEVELING_FEATURE)
zprobe_zoffset = Z_PROBE_OFFSET_FROM_EXTRUDER; zprobe_zoffset = Z_PROBE_OFFSET_FROM_EXTRUDER;
#elif !defined(DELTA) #elif !defined(DELTA)
zprobe_zoffset = 0; zprobe_zoffset = 0;
...@@ -718,7 +718,7 @@ void Config_ResetDefault() { ...@@ -718,7 +718,7 @@ void Config_ResetDefault() {
ECHO_LM(DB, "Z2 Endstop adjustement (mm):"); ECHO_LM(DB, "Z2 Endstop adjustement (mm):");
} }
ECHO_LMV(DB, " M666 Z", z_endstop_adj ); ECHO_LMV(DB, " M666 Z", z_endstop_adj );
#elif ENABLED(ENABLE_AUTO_BED_LEVELING) #elif ENABLED(AUTO_BED_LEVELING_FEATURE)
if (!forReplay) { if (!forReplay) {
ECHO_LM(DB, "Z Probe offset (mm)"); ECHO_LM(DB, "Z Probe offset (mm)");
} }
......
...@@ -30,7 +30,7 @@ void ConfigSD_ResetDefault(); ...@@ -30,7 +30,7 @@ void ConfigSD_ResetDefault();
"TME", "TME",
}; };
enum cfgSD_ENUM { //This need to be in the same order as cfgSD_KEY enum cfgSD_ENUM { //This need to be in the same order as cfgSD_KEY
#if HAS_POWER_CONSUMPTION_SENSOR #if HAS_POWER_CONSUMPTION_SENSOR
SD_CFG_PWR, SD_CFG_PWR,
#endif #endif
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
0xff,0xff,0x0,0x30,0xe6,0x63,0x19,0xe3,0x1,0xef,0x0,0x2,0x0,0x6,0xff,0xff,0x80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xe,0xff,0xff,0xc0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c,0xff,0xff,0xe0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x78,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xc0 0xff,0xff,0x0,0x30,0xe6,0x63,0x19,0xe3,0x1,0xef,0x0,0x2,0x0,0x6,0xff,0xff,0x80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xe,0xff,0xff,0xc0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c,0xff,0xff,0xe0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x78,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xc0
}; };
#else #else
#define START_BMPWIDTH 56 #define START_BMPWIDTH 56
#define START_BMPHEIGHT 19 #define START_BMPHEIGHT 19
#define START_BMPBYTEWIDTH 7 #define START_BMPBYTEWIDTH 7
#define START_BMPBYTES 133 // START_BMPWIDTH * START_BMPHEIGHT / 8 #define START_BMPBYTES 133 // START_BMPWIDTH * START_BMPHEIGHT / 8
...@@ -37,8 +37,8 @@ ...@@ -37,8 +37,8 @@
#if HOTENDS == 1 #if HOTENDS == 1
#define STATUS_SCREENWIDTH 115 //Width in pixels #define STATUS_SCREENWIDTH 115 //Width in pixels
#define STATUS_SCREENHEIGHT 19 //Height in pixels #define STATUS_SCREENHEIGHT 19 //Height in pixels
#define STATUS_SCREENBYTEWIDTH 15 //Width in bytes #define STATUS_SCREENBYTEWIDTH 15 //Width in bytes
const unsigned char status_screen0_bmp[] PROGMEM = { //AVR-GCC, WinAVR const unsigned char status_screen0_bmp[] PROGMEM = { //AVR-GCC, WinAVR
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFF,0xE0, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFF,0xE0,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0xE0, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0xE0,
...@@ -62,8 +62,8 @@ ...@@ -62,8 +62,8 @@
}; };
#define STATUS_SCREENWIDTH 115 //Width in pixels #define STATUS_SCREENWIDTH 115 //Width in pixels
#define STATUS_SCREENHEIGHT 19 //Height in pixels #define STATUS_SCREENHEIGHT 19 //Height in pixels
#define STATUS_SCREENBYTEWIDTH 15 //Width in bytes #define STATUS_SCREENBYTEWIDTH 15 //Width in bytes
const unsigned char status_screen1_bmp[] PROGMEM = { //AVR-GCC, WinAVR const unsigned char status_screen1_bmp[] PROGMEM = { //AVR-GCC, WinAVR
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFF,0xE0, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFF,0xE0,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0xE0, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0xE0,
...@@ -87,8 +87,8 @@ ...@@ -87,8 +87,8 @@
}; };
#elif HOTENDS == 2 #elif HOTENDS == 2
#define STATUS_SCREENWIDTH 115 //Width in pixels #define STATUS_SCREENWIDTH 115 //Width in pixels
#define STATUS_SCREENHEIGHT 19 //Height in pixels #define STATUS_SCREENHEIGHT 19 //Height in pixels
#define STATUS_SCREENBYTEWIDTH 15 //Width in bytes #define STATUS_SCREENBYTEWIDTH 15 //Width in bytes
const unsigned char status_screen0_bmp[] PROGMEM = { //AVR-GCC, WinAVR const unsigned char status_screen0_bmp[] PROGMEM = { //AVR-GCC, WinAVR
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFF,0xE0, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFF,0xE0,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0xE0, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0xE0,
...@@ -112,8 +112,8 @@ ...@@ -112,8 +112,8 @@
}; };
#define STATUS_SCREENWIDTH 115 //Width in pixels #define STATUS_SCREENWIDTH 115 //Width in pixels
#define STATUS_SCREENHEIGHT 19 //Height in pixels #define STATUS_SCREENHEIGHT 19 //Height in pixels
#define STATUS_SCREENBYTEWIDTH 15 //Width in bytes #define STATUS_SCREENBYTEWIDTH 15 //Width in bytes
const unsigned char status_screen1_bmp[] PROGMEM = { //AVR-GCC, WinAVR const unsigned char status_screen1_bmp[] PROGMEM = { //AVR-GCC, WinAVR
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFF,0xE0, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFF,0xE0,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0xE0, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0xE0,
...@@ -137,8 +137,8 @@ ...@@ -137,8 +137,8 @@
}; };
#else #else
#define STATUS_SCREENWIDTH 115 //Width in pixels #define STATUS_SCREENWIDTH 115 //Width in pixels
#define STATUS_SCREENHEIGHT 19 //Height in pixels #define STATUS_SCREENHEIGHT 19 //Height in pixels
#define STATUS_SCREENBYTEWIDTH 15 //Width in bytes #define STATUS_SCREENBYTEWIDTH 15 //Width in bytes
const unsigned char status_screen0_bmp[] PROGMEM = { //AVR-GCC, WinAVR const unsigned char status_screen0_bmp[] PROGMEM = { //AVR-GCC, WinAVR
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFF,0xE0, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFF,0xE0,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0xE0, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0xE0,
...@@ -162,8 +162,8 @@ ...@@ -162,8 +162,8 @@
}; };
#define STATUS_SCREENWIDTH 115 //Width in pixels #define STATUS_SCREENWIDTH 115 //Width in pixels
#define STATUS_SCREENHEIGHT 19 //Height in pixels #define STATUS_SCREENHEIGHT 19 //Height in pixels
#define STATUS_SCREENBYTEWIDTH 15 //Width in bytes #define STATUS_SCREENBYTEWIDTH 15 //Width in bytes
const unsigned char status_screen1_bmp[] PROGMEM = { //AVR-GCC, WinAVR const unsigned char status_screen1_bmp[] PROGMEM = { //AVR-GCC, WinAVR
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFF,0xE0, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFF,0xE0,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0xE0, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0xE0,
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -113,7 +113,6 @@ ...@@ -113,7 +113,6 @@
#define MSG_COUNT_X " Count X: " #define MSG_COUNT_X " Count X: "
#define MSG_ERR_KILLED "Printer halted. kill() called!" #define MSG_ERR_KILLED "Printer halted. kill() called!"
#define MSG_ERR_STOPPED "Printer stopped due to errors. Fix the error and use M999 to restart. (Temperature is reset. Set it after restarting)" #define MSG_ERR_STOPPED "Printer stopped due to errors. Fix the error and use M999 to restart. (Temperature is reset. Set it after restarting)"
#define MSG_RESEND "Resend: "
#define MSG_UNKNOWN_COMMAND "Unknown command: \"" #define MSG_UNKNOWN_COMMAND "Unknown command: \""
#define MSG_ACTIVE_DRIVER "Active Driver: " #define MSG_ACTIVE_DRIVER "Active Driver: "
#define MSG_ACTIVE_EXTRUDER "Active Extruder: " #define MSG_ACTIVE_EXTRUDER "Active Extruder: "
......
...@@ -632,7 +632,7 @@ ...@@ -632,7 +632,7 @@
#define ORIG_TEMP_2_PIN 1 //ANALOG NUMBERING #define ORIG_TEMP_2_PIN 1 //ANALOG NUMBERING
#define ORIG_TEMP_BED_PIN 0 //ANALOG NUMBERING #define ORIG_TEMP_BED_PIN 0 //ANALOG NUMBERING
#define BEEPER_PIN 36 #define BEEPER_PIN 36
#define KILL_PIN -1 #define KILL_PIN -1
...@@ -699,13 +699,13 @@ ...@@ -699,13 +699,13 @@
#if MB(GEN3_MONOLITHIC) #if MB(GEN3_MONOLITHIC)
#define KNOWN_BOARD 1 #define KNOWN_BOARD 1
#ifndef __AVR_ATmega644P__ #ifndef __AVR_ATmega644P__
#error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
#endif #endif
#define DEBUG_PIN 0 #define DEBUG_PIN 0
// x axis // x axis
#define ORIG_X_STEP_PIN 15 #define ORIG_X_STEP_PIN 15
#define ORIG_X_DIR_PIN 18 #define ORIG_X_DIR_PIN 18
...@@ -713,7 +713,7 @@ ...@@ -713,7 +713,7 @@
//Alex Checar #define X_STOP_PIN 20 //Alex Checar #define X_STOP_PIN 20
#define ORIG_X_ENABLE_PIN 24 //actually uses ORIG_Y_DIR_PIN #define ORIG_X_ENABLE_PIN 24 //actually uses ORIG_Y_DIR_PIN
#define X_MAX_PIN -1 #define X_MAX_PIN -1
// y axes // y axes
#define ORIG_Y_STEP_PIN 23 #define ORIG_Y_STEP_PIN 23
#define ORIG_Y_DIR_PIN 22 #define ORIG_Y_DIR_PIN 22
...@@ -721,7 +721,7 @@ ...@@ -721,7 +721,7 @@
//Alex Checar #define Y_STOP_PIN 25 //Alex Checar #define Y_STOP_PIN 25
#define ORIG_Y_ENABLE_PIN 24 //shared with ORIG_X_ENABLE_PIN #define ORIG_Y_ENABLE_PIN 24 //shared with ORIG_X_ENABLE_PIN
#define Y_MAX_PIN -1 #define Y_MAX_PIN -1
// z axes // z axes
#define ORIG_Z_STEP_PIN 27 #define ORIG_Z_STEP_PIN 27
#define ORIG_Z_DIR_PIN 28 #define ORIG_Z_DIR_PIN 28
...@@ -729,33 +729,33 @@ ...@@ -729,33 +729,33 @@
//Alex Checar #define Z_STOP_PIN 30 //Alex Checar #define Z_STOP_PIN 30
#define ORIG_Z_ENABLE_PIN 29 #define ORIG_Z_ENABLE_PIN 29
#define Z_MAX_PIN -1 #define Z_MAX_PIN -1
//extruder pins //extruder pins
#define ORIG_E0_STEP_PIN 12 #define ORIG_E0_STEP_PIN 12
#define ORIG_E0_DIR_PIN 17 #define ORIG_E0_DIR_PIN 17
#define ORIG_E0_ENABLE_PIN 3 #define ORIG_E0_ENABLE_PIN 3
#define ORIG_HEATER_0_PIN 16 #define ORIG_HEATER_0_PIN 16
#define ORIG_TEMP_0_PIN 0 #define ORIG_TEMP_0_PIN 0
#define ORIG_FAN_PIN -1 #define ORIG_FAN_PIN -1
//bed pins //bed pins
#define ORIG_HEATER_BED_PIN -1 #define ORIG_HEATER_BED_PIN -1
#define ORIG_TEMP_BED_PIN -1 #define ORIG_TEMP_BED_PIN -1
#define SDSS -1 #define SDSS -1
#define SDPOWER -1 #define SDPOWER -1
#define LED_PIN -1 #define LED_PIN -1
//pin for controlling the PSU. //pin for controlling the PSU.
#define PS_ON_PIN 14 //Alex, Do this work on the card? #define PS_ON_PIN 14
//Alex extras from Gen3+ //Alex extras from Gen3+
#define KILL_PIN -1 #define KILL_PIN -1
#define ORIG_TEMP_1_PIN -1 #define ORIG_TEMP_1_PIN -1
#define ORIG_TEMP_2_PIN -1 #define ORIG_TEMP_2_PIN -1
#define ORIG_HEATER_2_PIN -1 #define ORIG_HEATER_2_PIN -1
#endif // GEN3_MONOLITHIC #endif // GEN3_MONOLITHIC
/****************************************************************************************/ /****************************************************************************************/
...@@ -916,7 +916,7 @@ ...@@ -916,7 +916,7 @@
#define ORIG_HEATER_BED_PIN 8 // BED #define ORIG_HEATER_BED_PIN 8 // BED
#define ORIG_TEMP_BED_PIN 14 // ANALOG NUMBERING #define ORIG_TEMP_BED_PIN 14 // ANALOG NUMBERING
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) || ENABLED(G3D_PANEL) #if defined(REPRAP_DISCOUNT_SMART_CONTROLLER) || defined(G3D_PANEL)
#define KILL_PIN 41 #define KILL_PIN 41
#else #else
#define KILL_PIN -1 #define KILL_PIN -1
...@@ -3548,84 +3548,82 @@ ...@@ -3548,84 +3548,82 @@
#error Oops! Make sure you have 'Minitronics ' selected from the 'Tools -> Boards' menu. #error Oops! Make sure you have 'Minitronics ' selected from the 'Tools -> Boards' menu.
#endif #endif
#define LARGE_FLASH true #define LARGE_FLASH true
#define ORIG_X_STEP_PIN 48
#define ORIG_X_DIR_PIN 47
#define ORIG_X_ENABLE_PIN 49
#define X_MIN_PIN 5
#define X_MAX_PIN -1 //2 //Max endstops default to disabled "-1", set to commented value to enable.
#define ORIG_Y_STEP_PIN 39 // A6
#define ORIG_Y_DIR_PIN 40 // A0
#define ORIG_Y_ENABLE_PIN 38
#define Y_MIN_PIN 2
#define Y_MAX_PIN -1 //15
#define ORIG_Z_STEP_PIN 42 // A2
#define ORIG_Z_DIR_PIN 43 // A6
#define ORIG_Z_ENABLE_PIN 41 // A1
#define Z_MIN_PIN 6
#define Z_MAX_PIN -1
#define ORIG_E0_STEP_PIN 45
#define ORIG_E0_DIR_PIN 44
#define ORIG_E0_ENABLE_PIN 27
#define ORIG_E1_STEP_PIN 36
#define ORIG_E1_DIR_PIN 35
#define ORIG_E1_ENABLE_PIN 37
#define ORIG_E2_STEP_PIN -1
#define ORIG_E2_DIR_PIN -1
#define ORIG_E2_ENABLE_PIN -1
#define SDPOWER -1
#define SDSS 53
#define LED_PIN 46 #define ORIG_X_STEP_PIN 48
#define ORIG_X_DIR_PIN 47
#define ORIG_FAN_PIN 9 #define ORIG_X_ENABLE_PIN 49
#define FAN2_PIN -1 #define X_MIN_PIN 5
#define PS_ON_PIN -1 #define X_MAX_PIN -1 //2 //Max endstops default to disabled "-1", set to commented value to enable.
#define KILL_PIN -1
#define ORIG_HEATER_0_PIN 7 // EXTRUDER 1
#define ORIG_HEATER_1_PIN 8 // EXTRUDER 2
#define ORIG_HEATER_2_PIN 9 // thermo couple
#if TEMP_SENSOR_0 == -1
#define ORIG_TEMP_0_PIN 5 // ANALOG NUMBERING
#else
#define ORIG_TEMP_0_PIN 7 // ANALOG NUMBERING
#endif
#define ORIG_TEMP_1_PIN 6 // ANALOG NUMBERING
#define ORIG_TEMP_2_PIN -1 // ANALOG NUMBERING
#define ORIG_HEATER_BED_PIN 3 // BED
#define ORIG_TEMP_BED_PIN 6 // ANALOG NUMBERING
#define BEEPER_PIN -1
#define LCD_PINS_RS -1
#define LCD_PINS_ENABLE -1
#define LCD_PINS_D4 -1
#define LCD_PINS_D5 -1
#define LCD_PINS_D6 -1
#define LCD_PINS_D7 -1
#define ORIG_Y_STEP_PIN 39 // A6
#define ORIG_Y_DIR_PIN 40 // A0
#define ORIG_Y_ENABLE_PIN 38
#define Y_MIN_PIN 2
#define Y_MAX_PIN -1 //15
//buttons are directly attached using keypad #define ORIG_Z_STEP_PIN 42 // A2
#define BTN_EN1 -1 #define ORIG_Z_DIR_PIN 43 // A6
#define BTN_EN2 -1 #define ORIG_Z_ENABLE_PIN 41 // A1
#define BTN_ENC -1 //the click #define Z_MIN_PIN 6
#define Z_MAX_PIN -1
#define BLEN_C 2 #define ORIG_E0_STEP_PIN 45
#define BLEN_B 1 #define ORIG_E0_DIR_PIN 44
#define BLEN_A 0 #define ORIG_E0_ENABLE_PIN 27
#define SD_DETECT_PIN -1 // Megatronics does not use this port #define ORIG_E1_STEP_PIN 36
#define ORIG_E1_DIR_PIN 35
#define ORIG_E1_ENABLE_PIN 37
#define ORIG_E2_STEP_PIN -1
#define ORIG_E2_DIR_PIN -1
#define ORIG_E2_ENABLE_PIN -1
#define SDPOWER -1
#define SDSS 53
#define LED_PIN 46
#define ORIG_FAN_PIN 9
#define FAN2_PIN -1
#define PS_ON_PIN -1
#define KILL_PIN -1
#define ORIG_HEATER_0_PIN 7 // EXTRUDER 1
#define ORIG_HEATER_1_PIN 8 // EXTRUDER 2
#define ORIG_HEATER_2_PIN 9 // thermo couple
#if TEMP_SENSOR_0 == -1
#define ORIG_TEMP_0_PIN 5 // ANALOG NUMBERING
#else
#define ORIG_TEMP_0_PIN 7 // ANALOG NUMBERING
#endif
#define ORIG_TEMP_1_PIN 6 // ANALOG NUMBERING
#define ORIG_TEMP_2_PIN -1 // ANALOG NUMBERING
#define ORIG_HEATER_BED_PIN 3 // BED
#define ORIG_TEMP_BED_PIN 6 // ANALOG NUMBERING
#define BEEPER_PIN -1
#define LCD_PINS_RS -1
#define LCD_PINS_ENABLE -1
#define LCD_PINS_D4 -1
#define LCD_PINS_D5 -1
#define LCD_PINS_D6 -1
#define LCD_PINS_D7 -1
//buttons are directly attached using keypad
#define BTN_EN1 -1
#define BTN_EN2 -1
#define BTN_ENC -1 //the click
#define BLEN_C 2
#define BLEN_B 1
#define BLEN_A 0
#define SD_DETECT_PIN -1 // Megatronics does not use this port
#endif // MEGATRONICS_1 #endif // MEGATRONICS_1
/****************************************************************************************/ /****************************************************************************************/
...@@ -3731,7 +3729,7 @@ ...@@ -3731,7 +3729,7 @@
#define ORIG_TEMP_BED_PIN 14 // ANALOG NUMBERING #define ORIG_TEMP_BED_PIN 14 // ANALOG NUMBERING
#endif #endif
#define BEEPER_PIN 61 #define BEEPER_PIN 61
#define LCD_PINS_RS 32 #define LCD_PINS_RS 32
#define LCD_PINS_ENABLE 31 #define LCD_PINS_ENABLE 31
...@@ -4651,7 +4649,7 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a ...@@ -4651,7 +4649,7 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a
#define ORIG_TEMP_2_PIN -1 #define ORIG_TEMP_2_PIN -1
#define SDPOWER -1 #define SDPOWER -1
#define SD_DETECT_PIN -1 #define SD_DETECT_PIN -1
#define SDSS 20 // 8 #define SDSS 20 // 8
#define LED_PIN 6 #define LED_PIN 6
#define PS_ON_PIN 27 #define PS_ON_PIN 27
...@@ -5296,7 +5294,7 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a ...@@ -5296,7 +5294,7 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a
#ifdef LASERBEAM #ifdef LASERBEAM
#define LASER_PWR_PIN 41 #define LASER_PWR_PIN 41
#define LASER_TTL_PIN 42 #define LASER_TTL_PIN 42
#endif #endif
#ifdef FILAMENT_RUNOUT_SENSOR #ifdef FILAMENT_RUNOUT_SENSOR
......
...@@ -74,14 +74,14 @@ float mintravelfeedrate; ...@@ -74,14 +74,14 @@ float mintravelfeedrate;
unsigned long axis_steps_per_sqr_second[3 + EXTRUDERS]; unsigned long axis_steps_per_sqr_second[3 + EXTRUDERS];
uint8_t last_extruder; uint8_t last_extruder;
#if ENABLED(ENABLE_AUTO_BED_LEVELING) #if ENABLED(AUTO_BED_LEVELING_FEATURE)
// Transform required to compensate for bed level // Transform required to compensate for bed level
matrix_3x3 plan_bed_level_matrix = { matrix_3x3 plan_bed_level_matrix = {
1.0, 0.0, 0.0, 1.0, 0.0, 0.0,
0.0, 1.0, 0.0, 0.0, 1.0, 0.0,
0.0, 0.0, 1.0 0.0, 0.0, 1.0
}; };
#endif // ENABLE_AUTO_BED_LEVELING #endif // AUTO_BED_LEVELING_FEATURE
#if ENABLED(AUTOTEMP) #if ENABLED(AUTOTEMP)
float autotemp_max = 250; float autotemp_max = 250;
...@@ -480,11 +480,11 @@ float junction_deviation = 0.1; ...@@ -480,11 +480,11 @@ float junction_deviation = 0.1;
// Add a new linear movement to the buffer. steps[X_AXIS], _y and _z is the absolute position in // Add a new linear movement to the buffer. steps[X_AXIS], _y and _z is the absolute position in
// mm. Microseconds specify how many microseconds the move should take to perform. To aid acceleration // mm. Microseconds specify how many microseconds the move should take to perform. To aid acceleration
// calculation the caller must also provide the physical length of the line in millimeters. // calculation the caller must also provide the physical length of the line in millimeters.
#if ENABLED(ENABLE_AUTO_BED_LEVELING) #if ENABLED(AUTO_BED_LEVELING_FEATURE)
void plan_buffer_line(float x, float y, float z, const float &e, float feed_rate, const uint8_t &extruder, const uint8_t &driver) void plan_buffer_line(float x, float y, float z, const float &e, float feed_rate, const uint8_t &extruder, const uint8_t &driver)
#else #else
void plan_buffer_line(const float &x, const float &y, const float &z, const float &e, float feed_rate, const uint8_t &extruder, const uint8_t &driver) void plan_buffer_line(const float &x, const float &y, const float &z, const float &e, float feed_rate, const uint8_t &extruder, const uint8_t &driver)
#endif // ENABLE_AUTO_BED_LEVELING #endif // AUTO_BED_LEVELING_FEATURE
{ {
// Calculate the buffer head after we push this byte // Calculate the buffer head after we push this byte
int next_buffer_head = next_block_index(block_buffer_head); int next_buffer_head = next_block_index(block_buffer_head);
...@@ -493,7 +493,7 @@ float junction_deviation = 0.1; ...@@ -493,7 +493,7 @@ float junction_deviation = 0.1;
// Rest here until there is room in the buffer. // Rest here until there is room in the buffer.
while (block_buffer_tail == next_buffer_head) idle(); while (block_buffer_tail == next_buffer_head) idle();
#if ENABLED(ENABLE_AUTO_BED_LEVELING) #if ENABLED(AUTO_BED_LEVELING_FEATURE)
apply_rotation_xyz(plan_bed_level_matrix, x, y, z); apply_rotation_xyz(plan_bed_level_matrix, x, y, z);
#endif #endif
...@@ -1040,7 +1040,7 @@ float junction_deviation = 0.1; ...@@ -1040,7 +1040,7 @@ float junction_deviation = 0.1;
} // plan_buffer_line() } // plan_buffer_line()
#if ENABLED(ENABLE_AUTO_BED_LEVELING) #if ENABLED(AUTO_BED_LEVELING_FEATURE)
vector_3 plan_get_position() { vector_3 plan_get_position() {
vector_3 position = vector_3(st_get_position_mm(X_AXIS), st_get_position_mm(Y_AXIS), st_get_position_mm(Z_AXIS)); vector_3 position = vector_3(st_get_position_mm(X_AXIS), st_get_position_mm(Y_AXIS), st_get_position_mm(Z_AXIS));
...@@ -1053,15 +1053,15 @@ float junction_deviation = 0.1; ...@@ -1053,15 +1053,15 @@ float junction_deviation = 0.1;
return position; return position;
} }
#endif // ENABLE_AUTO_BED_LEVELING #endif // AUTO_BED_LEVELING_FEATURE
#if ENABLED(ENABLE_AUTO_BED_LEVELING) #if ENABLED(AUTO_BED_LEVELING_FEATURE)
void plan_set_position(float x, float y, float z, const float &e) void plan_set_position(float x, float y, float z, const float &e)
#else #else
void plan_set_position(const float &x, const float &y, const float &z, const float &e) void plan_set_position(const float &x, const float &y, const float &z, const float &e)
#endif // ENABLE_AUTO_BED_LEVELING #endif // AUTO_BED_LEVELING_FEATURE
{ {
#if ENABLED(ENABLE_AUTO_BED_LEVELING) #if ENABLED(AUTO_BED_LEVELING_FEATURE)
apply_rotation_xyz(plan_bed_level_matrix, x, y, z); apply_rotation_xyz(plan_bed_level_matrix, x, y, z);
#endif #endif
......
...@@ -82,7 +82,7 @@ extern volatile unsigned char block_buffer_head; ...@@ -82,7 +82,7 @@ extern volatile unsigned char block_buffer_head;
extern volatile unsigned char block_buffer_tail; extern volatile unsigned char block_buffer_tail;
FORCE_INLINE uint8_t movesplanned() { return BLOCK_MOD(block_buffer_head - block_buffer_tail + BLOCK_BUFFER_SIZE); } FORCE_INLINE uint8_t movesplanned() { return BLOCK_MOD(block_buffer_head - block_buffer_tail + BLOCK_BUFFER_SIZE); }
#if ENABLED(ENABLE_AUTO_BED_LEVELING) #if ENABLED(AUTO_BED_LEVELING_FEATURE)
#include "vector_3.h" #include "vector_3.h"
...@@ -110,7 +110,7 @@ FORCE_INLINE uint8_t movesplanned() { return BLOCK_MOD(block_buffer_head - block ...@@ -110,7 +110,7 @@ FORCE_INLINE uint8_t movesplanned() { return BLOCK_MOD(block_buffer_head - block
#else #else
void plan_buffer_line(const float &x, const float &y, const float &z, const float &e, float feed_rate, const uint8_t &extruder, const uint8_t &driver); void plan_buffer_line(const float &x, const float &y, const float &z, const float &e, float feed_rate, const uint8_t &extruder, const uint8_t &driver);
void plan_set_position(const float &x, const float &y, const float &z, const float &e); void plan_set_position(const float &x, const float &y, const float &z, const float &e);
#endif // ENABLE_AUTO_BED_LEVELING #endif // AUTO_BED_LEVELING_FEATURE
void plan_set_e_position(const float &e); void plan_set_e_position(const float &e);
......
...@@ -260,7 +260,7 @@ double r8mat_amax ( int m, int n, double a[] ) ...@@ -260,7 +260,7 @@ double r8mat_amax ( int m, int n, double a[] )
return value; return value;
} }
void r8mat_copy( double a2[], int m, int n, double a1[] ) double *r8mat_copy_new ( int m, int n, double a1[] )
/******************************************************************************/ /******************************************************************************/
/* /*
...@@ -294,9 +294,12 @@ void r8mat_copy( double a2[], int m, int n, double a1[] ) ...@@ -294,9 +294,12 @@ void r8mat_copy( double a2[], int m, int n, double a1[] )
Output, double R8MAT_COPY_NEW[M*N], the copy of A1. Output, double R8MAT_COPY_NEW[M*N], the copy of A1.
*/ */
{ {
double *a2;
int i; int i;
int j; int j;
a2 = ( double * ) malloc ( m * n * sizeof ( double ) );
for ( j = 0; j < n; j++ ) for ( j = 0; j < n; j++ )
{ {
for ( i = 0; i < m; i++ ) for ( i = 0; i < m; i++ )
...@@ -304,6 +307,8 @@ void r8mat_copy( double a2[], int m, int n, double a1[] ) ...@@ -304,6 +307,8 @@ void r8mat_copy( double a2[], int m, int n, double a1[] )
a2[i+j*m] = a1[i+j*m]; a2[i+j*m] = a1[i+j*m];
} }
} }
return a2;
} }
/******************************************************************************/ /******************************************************************************/
...@@ -721,13 +726,14 @@ void dqrank ( double a[], int lda, int m, int n, double tol, int *kr, ...@@ -721,13 +726,14 @@ void dqrank ( double a[], int lda, int m, int n, double tol, int *kr,
int j; int j;
int job; int job;
int k; int k;
double work[n]; double *work;
for ( i = 0; i < n; i++ ) for ( i = 0; i < n; i++ )
{ {
jpvt[i] = 0; jpvt[i] = 0;
} }
work = ( double * ) malloc ( n * sizeof ( double ) );
job = 1; job = 1;
dqrdc ( a, lda, m, n, qraux, jpvt, work, job ); dqrdc ( a, lda, m, n, qraux, jpvt, work, job );
...@@ -744,6 +750,8 @@ void dqrank ( double a[], int lda, int m, int n, double tol, int *kr, ...@@ -744,6 +750,8 @@ void dqrank ( double a[], int lda, int m, int n, double tol, int *kr,
*kr = j + 1; *kr = j + 1;
} }
free ( work );
return; return;
} }
/******************************************************************************/ /******************************************************************************/
...@@ -1837,7 +1845,7 @@ void dswap ( int n, double x[], int incx, double y[], int incy ) ...@@ -1837,7 +1845,7 @@ void dswap ( int n, double x[], int incx, double y[], int incy )
/******************************************************************************/ /******************************************************************************/
void qr_solve ( double x[], int m, int n, double a[], double b[] ) double *qr_solve ( int m, int n, double a[], double b[] )
/******************************************************************************/ /******************************************************************************/
/* /*
...@@ -1887,22 +1895,34 @@ void qr_solve ( double x[], int m, int n, double a[], double b[] ) ...@@ -1887,22 +1895,34 @@ void qr_solve ( double x[], int m, int n, double a[], double b[] )
Output, double QR_SOLVE[N], the least squares solution. Output, double QR_SOLVE[N], the least squares solution.
*/ */
{ {
double a_qr[n*m]; double *a_qr;
int ind; int ind;
int itask; int itask;
int jpvt[n]; int *jpvt;
int kr; int kr;
int lda; int lda;
double qraux[n]; double *qraux;
double r[m]; double *r;
double tol; double tol;
double *x;
r8mat_copy( a_qr, m, n, a ); a_qr = r8mat_copy_new ( m, n, a );
lda = m; lda = m;
tol = r8_epsilon ( ) / r8mat_amax ( m, n, a_qr ); tol = r8_epsilon ( ) / r8mat_amax ( m, n, a_qr );
x = ( double * ) malloc ( n * sizeof ( double ) );
jpvt = ( int * ) malloc ( n * sizeof ( int ) );
qraux = ( double * ) malloc ( n * sizeof ( double ) );
r = ( double * ) malloc ( m * sizeof ( double ) );
itask = 1; itask = 1;
ind = dqrls ( a_qr, lda, m, n, tol, &kr, b, x, r, jpvt, qraux, itask ); ind = dqrls ( a_qr, lda, m, n, tol, &kr, b, x, r, jpvt, qraux, itask );
free ( a_qr );
free ( jpvt );
free ( qraux );
free ( r );
return x;
} }
/******************************************************************************/ /******************************************************************************/
......
...@@ -17,6 +17,6 @@ int dqrsl ( double a[], int lda, int n, int k, double qraux[], double y[], ...@@ -17,6 +17,6 @@ int dqrsl ( double a[], int lda, int n, int k, double qraux[], double y[],
double qy[], double qty[], double b[], double rsd[], double ab[], int job ); double qy[], double qty[], double b[], double rsd[], double ab[], int job );
void dscal ( int n, double sa, double x[], int incx ); void dscal ( int n, double sa, double x[], int incx );
void dswap ( int n, double x[], int incx, double y[], int incy ); void dswap ( int n, double x[], int incx, double y[], int incy );
void qr_solve ( double x[], int m, int n, double a[], double b[] ); double *qr_solve ( int m, int n, double a[], double b[] );
#endif #endif
...@@ -124,7 +124,7 @@ ...@@ -124,7 +124,7 @@
/** /**
* Auto Bed Leveling * Auto Bed Leveling
*/ */
#if ENABLED(ENABLE_AUTO_BED_LEVELING) #if ENABLED(AUTO_BED_LEVELING_FEATURE)
/** /**
* Require a Z Min pin * Require a Z Min pin
...@@ -134,7 +134,7 @@ ...@@ -134,7 +134,7 @@
#if ENABLED(Z_PROBE_REPEATABILITY_TEST) #if ENABLED(Z_PROBE_REPEATABILITY_TEST)
#error You must have a Z_MIN or Z_PROBE endstop to enable Z_PROBE_REPEATABILITY_TEST. #error You must have a Z_MIN or Z_PROBE endstop to enable Z_PROBE_REPEATABILITY_TEST.
#else #else
#error ENABLE_AUTO_BED_LEVELING requires a Z_MIN or Z_PROBE endstop. Z_MIN_PIN or Z_PROBE_PIN must point to a valid hardware pin. #error AUTO_BED_LEVELING_FEATURE requires a Z_MIN or Z_PROBE endstop. Z_MIN_PIN or Z_PROBE_PIN must point to a valid hardware pin.
#endif #endif
#endif #endif
#endif #endif
...@@ -203,7 +203,7 @@ ...@@ -203,7 +203,7 @@
#endif // !AUTO_BED_LEVELING_GRID #endif // !AUTO_BED_LEVELING_GRID
#endif // ENABLE_AUTO_BED_LEVELING #endif // AUTO_BED_LEVELING_FEATURE
/** /**
* ULTIPANEL encoder * ULTIPANEL encoder
...@@ -317,7 +317,7 @@ ...@@ -317,7 +317,7 @@
#ifdef SDCARDDETECTINVERTED #ifdef SDCARDDETECTINVERTED
#error SDCARDDETECTINVERTED is now SD_DETECT_INVERTED. Please update your configuration. #error SDCARDDETECTINVERTED is now SD_DETECT_INVERTED. Please update your configuration.
#endif #endif
#if ENABLED(POWER_CONSUMPTION) && !PIN_EXISTS(POWER_CONSUMPTION) #if ENABLED(POWER_CONSUMPTION) && !PIN_EXISTS(POWER_CONSUMPTION)
#error You have to set a valid POWER_CONSUMPTION_PIN in pins.h in order to use this feature. #error You have to set a valid POWER_CONSUMPTION_PIN in pins.h in order to use this feature.
#endif #endif
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
detach() - Stops an attached servos from pulsing its i/o pin. detach() - Stops an attached servos from pulsing its i/o pin.
*/ */
#include "Configuration.h" #include "Configuration.h"
#if HAS_SERVOS #if HAS_SERVOS
......
...@@ -666,7 +666,7 @@ ISR(TIMER1_COMPA_vect) { ...@@ -666,7 +666,7 @@ ISR(TIMER1_COMPA_vect) {
STEP_START(e,E); STEP_START(e,E);
#endif #endif
#ifdef STEPPER_HIGH_LOW_DELAY #if ENABLED(STEPPER_HIGH_LOW_DELAY)
delayMicroseconds(STEPPER_HIGH_LOW_DELAY); delayMicroseconds(STEPPER_HIGH_LOW_DELAY);
#endif #endif
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
#endif #endif
#if ENABLED(E3_IS_TMC) #if ENABLED(E3_IS_TMC)
TMC26XStepper stepperE3(200,E3_ENABLE_PIN,E3_STEP_PIN,E3_DIR_PIN,E3_MAX_CURRENT,E3_SENSE_RESISTOR); TMC26XStepper stepperE3(200,E3_ENABLE_PIN,E3_STEP_PIN,E3_DIR_PIN,E3_MAX_CURRENT,E3_SENSE_RESISTOR);
#endif #endif
#if ENABLED(HAVE_TMCDRIVER) #if ENABLED(HAVE_TMCDRIVER)
void tmc_init() void tmc_init()
...@@ -142,7 +142,7 @@ void tmc_init() ...@@ -142,7 +142,7 @@ void tmc_init()
#endif #endif
#if ENABLED(E3_IS_L6470) #if ENABLED(E3_IS_L6470)
L6470 stepperE3(E3_ENABLE_PIN); L6470 stepperE3(E3_ENABLE_PIN);
#endif #endif
// init routine // init routine
...@@ -218,7 +218,6 @@ void L6470_init() ...@@ -218,7 +218,6 @@ void L6470_init()
stepperE3.setMicroSteps(E3_MICROSTEPS); stepperE3.setMicroSteps(E3_MICROSTEPS);
stepperE3.setOverCurrent(E3_OVERCURRENT); //set overcurrent protection stepperE3.setOverCurrent(E3_OVERCURRENT); //set overcurrent protection
stepperE3.setStallCurrent(E3_STALLCURRENT); stepperE3.setStallCurrent(E3_STALLCURRENT);
#endif #endif
} }
#endif #endif
...@@ -626,69 +626,30 @@ const short temptable_11[][2] PROGMEM = { ...@@ -626,69 +626,30 @@ const short temptable_11[][2] PROGMEM = {
// Hisens thermistor B25/50 =3950 +/-1% // Hisens thermistor B25/50 =3950 +/-1%
const short temptable_13[][2] PROGMEM = { const short temptable_13[][2] PROGMEM = {
{22.5 * OVERSAMPLENR, 300}, {20.04*OVERSAMPLENR, 300 },
{24.125 * OVERSAMPLENR, 295}, {23.19*OVERSAMPLENR, 290 },
{25.875 * OVERSAMPLENR, 290}, {26.71*OVERSAMPLENR, 280 },
{27.8125 * OVERSAMPLENR, 285}, {31.23*OVERSAMPLENR, 270 },
{29.9375 * OVERSAMPLENR, 280}, {36.52*OVERSAMPLENR, 260 },
{32.25 * OVERSAMPLENR, 275}, {42.75*OVERSAMPLENR, 250 },
{34.8125 * OVERSAMPLENR, 270}, {50.68*OVERSAMPLENR, 240 },
{37.625 * OVERSAMPLENR, 265}, {60.22*OVERSAMPLENR, 230 },
{40.6875 * OVERSAMPLENR, 260}, {72.03*OVERSAMPLENR, 220 },
{44.0625 * OVERSAMPLENR, 255}, {86.84*OVERSAMPLENR, 210 },
{47.75 * OVERSAMPLENR, 250}, {102.79*OVERSAMPLENR, 200 },
{51.8125 * OVERSAMPLENR, 245}, {124.46*OVERSAMPLENR, 190 },
{56.3125 * OVERSAMPLENR, 240}, {151.02*OVERSAMPLENR, 180 },
{61.25 * OVERSAMPLENR, 235}, {182.86*OVERSAMPLENR, 170 },
{66.75 * OVERSAMPLENR, 230}, {220.72*OVERSAMPLENR, 160 },
{72.8125 * OVERSAMPLENR, 225}, {316.96*OVERSAMPLENR, 140 },
{79.5 * OVERSAMPLENR, 220}, {447.17*OVERSAMPLENR, 120 },
{87 * OVERSAMPLENR, 215}, {590.61*OVERSAMPLENR, 100 },
{95.3125 * OVERSAMPLENR, 210}, {737.31*OVERSAMPLENR, 80 },
{104.1875 * OVERSAMPLENR, 205}, {857.77*OVERSAMPLENR, 60 },
{112.75 * OVERSAMPLENR, 200}, {939.52*OVERSAMPLENR, 40 },
{123.125 * OVERSAMPLENR, 195}, {986.03*OVERSAMPLENR, 20 },
{135.75 * OVERSAMPLENR, 190}, {1008.7*OVERSAMPLENR, 0}
{148.3125 * OVERSAMPLENR, 185}, };
{163.8125 * OVERSAMPLENR, 180},
{179 * OVERSAMPLENR, 175},
{211.125 * OVERSAMPLENR, 170},
{216.125 * OVERSAMPLENR, 165},
{236.5625 * OVERSAMPLENR, 160},
{258.5 * OVERSAMPLENR, 155},
{279.875 * OVERSAMPLENR, 150},
{305.375 * OVERSAMPLENR, 145},
{333.25 * OVERSAMPLENR, 140},
{362.5625 * OVERSAMPLENR, 135},
{393.6875 * OVERSAMPLENR, 130},
{425 * OVERSAMPLENR, 125},
{460.625 * OVERSAMPLENR, 120},
{495.1875 * OVERSAMPLENR, 115},
{530.875 * OVERSAMPLENR, 110},
{567.25 * OVERSAMPLENR, 105},
{601.625 * OVERSAMPLENR, 100},
{637.875 * OVERSAMPLENR, 95},
{674.5625 * OVERSAMPLENR, 90},
{710 * OVERSAMPLENR, 85},
{744.125 * OVERSAMPLENR, 80},
{775.9375 * OVERSAMPLENR, 75},
{806.875 * OVERSAMPLENR, 70},
{835.1875 * OVERSAMPLENR, 65},
{861.125 * OVERSAMPLENR, 60},
{884.375 * OVERSAMPLENR, 55},
{904.5625 * OVERSAMPLENR, 50},
{923.8125 * OVERSAMPLENR, 45},
{940.375 * OVERSAMPLENR, 40},
{954.625 * OVERSAMPLENR, 35},
{966.875 * OVERSAMPLENR, 30},
{977.0625 * OVERSAMPLENR, 25},
{986 * OVERSAMPLENR, 20},
{993.375 * OVERSAMPLENR, 15},
{999.5 * OVERSAMPLENR, 10},
{1004.5 * OVERSAMPLENR, 5},
{1008.5 * OVERSAMPLENR, 0}
};
#endif #endif
#if (THERMISTORHEATER_0 == 20) || (THERMISTORHEATER_1 == 20) || (THERMISTORHEATER_2 == 20) || (THERMISTORBED == 20) // PT100 with INA826 amp on Ultimaker v2.0 electronics #if (THERMISTORHEATER_0 == 20) || (THERMISTORHEATER_1 == 20) || (THERMISTORHEATER_2 == 20) || (THERMISTORBED == 20) // PT100 with INA826 amp on Ultimaker v2.0 electronics
......
...@@ -724,7 +724,7 @@ static void lcd_prepare_menu() { ...@@ -724,7 +724,7 @@ static void lcd_prepare_menu() {
// //
// Level Bed // Level Bed
// //
#if ENABLED(ENABLE_AUTO_BED_LEVELING) #if ENABLED(AUTO_BED_LEVELING_FEATURE)
if (axis_known_position[X_AXIS] && axis_known_position[Y_AXIS]) if (axis_known_position[X_AXIS] && axis_known_position[Y_AXIS])
MENU_ITEM(gcode, MSG_LEVEL_BED, PSTR("G29")); MENU_ITEM(gcode, MSG_LEVEL_BED, PSTR("G29"));
#elif DISABLED(DELTA) && DISABLED(Z_SAFE_HOMING) && Z_HOME_DIR < 0 #elif DISABLED(DELTA) && DISABLED(Z_SAFE_HOMING) && Z_HOME_DIR < 0
...@@ -1165,7 +1165,7 @@ static void lcd_control_temperature_preheat_gum_settings_menu() { ...@@ -1165,7 +1165,7 @@ static void lcd_control_temperature_preheat_gum_settings_menu() {
static void lcd_control_motion_menu() { static void lcd_control_motion_menu() {
START_MENU(lcd_control_menu); START_MENU(lcd_control_menu);
MENU_ITEM(back, MSG_CONTROL, lcd_control_menu); MENU_ITEM(back, MSG_CONTROL, lcd_control_menu);
#if ENABLED(ENABLE_AUTO_BED_LEVELING) #if ENABLED(AUTO_BED_LEVELING_FEATURE)
MENU_ITEM_EDIT(float32, MSG_ZPROBE_ZOFFSET, &zprobe_zoffset, -50, 50); MENU_ITEM_EDIT(float32, MSG_ZPROBE_ZOFFSET, &zprobe_zoffset, -50, 50);
#endif #endif
MENU_ITEM_EDIT(float5, MSG_ACC, &acceleration, 10, 99000); MENU_ITEM_EDIT(float5, MSG_ACC, &acceleration, 10, 99000);
...@@ -1322,7 +1322,7 @@ static void lcd_sd_updir() { ...@@ -1322,7 +1322,7 @@ static void lcd_sd_updir() {
* *
*/ */
void lcd_sdcard_menu() { void lcd_sdcard_menu() {
if (lcdDrawUpdate == 0 && LCD_CLICKED == 0) return; // nothing to do (so don't thrash the SD card) if (lcdDrawUpdate == 0 && LCD_CLICKED == 0) return; // nothing to do (so don't thrash the SD card)
uint16_t fileCnt = card.getnrfilenames(); uint16_t fileCnt = card.getnrfilenames();
START_MENU(lcd_main_menu); START_MENU(lcd_main_menu);
MENU_ITEM(back, MSG_MAIN, lcd_main_menu); MENU_ITEM(back, MSG_MAIN, lcd_main_menu);
......
...@@ -75,10 +75,10 @@ ...@@ -75,10 +75,10 @@
#define EN_A BIT(BLEN_A) #define EN_A BIT(BLEN_A)
#define LCD_CLICKED (buttons&EN_C) #define LCD_CLICKED (buttons&EN_C)
#if defined(BTN_BACK) && BTN_BACK > 0 #if defined(BTN_BACK) && BTN_BACK > 0
#define EN_D BIT(BLEN_D) #define EN_D BIT(BLEN_D)
#define LCD_BACK_CLICKED (buttons&EN_D) #define LCD_BACK_CLICKED (buttons&EN_D)
#endif #endif
#if ENABLED(REPRAPWORLD_KEYPAD) #if ENABLED(REPRAPWORLD_KEYPAD)
#define EN_REPRAPWORLD_KEYPAD_F3 (BIT(BLEN_REPRAPWORLD_KEYPAD_F3)) #define EN_REPRAPWORLD_KEYPAD_F3 (BIT(BLEN_REPRAPWORLD_KEYPAD_F3))
#define EN_REPRAPWORLD_KEYPAD_F2 (BIT(BLEN_REPRAPWORLD_KEYPAD_F2)) #define EN_REPRAPWORLD_KEYPAD_F2 (BIT(BLEN_REPRAPWORLD_KEYPAD_F2))
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
#include <math.h> #include <math.h>
#include "Marlin.h" #include "Marlin.h"
#if ENABLED(ENABLE_AUTO_BED_LEVELING) #if ENABLED(AUTO_BED_LEVELING_FEATURE)
#include "vector_3.h" #include "vector_3.h"
vector_3::vector_3() : x(0), y(0), z(0) { } vector_3::vector_3() : x(0), y(0), z(0) { }
...@@ -131,4 +131,4 @@ void matrix_3x3::debug(const char title[]) { ...@@ -131,4 +131,4 @@ void matrix_3x3::debug(const char title[]) {
} }
} }
#endif // ENABLE_AUTO_BED_LEVELING #endif // AUTO_BED_LEVELING_FEATURE
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
#ifndef VECTOR_3_H #ifndef VECTOR_3_H
#define VECTOR_3_H #define VECTOR_3_H
#if ENABLED(ENABLE_AUTO_BED_LEVELING) #if ENABLED(AUTO_BED_LEVELING_FEATURE)
class matrix_3x3; class matrix_3x3;
struct vector_3 struct vector_3
...@@ -57,6 +57,6 @@ struct matrix_3x3 ...@@ -57,6 +57,6 @@ struct matrix_3x3
void apply_rotation_xyz(matrix_3x3 rotationMatrix, float &x, float& y, float& z); void apply_rotation_xyz(matrix_3x3 rotationMatrix, float &x, float& y, float& z);
#endif // ENABLE_AUTO_BED_LEVELING #endif // AUTO_BED_LEVELING_FEATURE
#endif // VECTOR_3_H #endif // VECTOR_3_H
...@@ -34,7 +34,7 @@ Adding commands to facilitate purging of hotend. ...@@ -34,7 +34,7 @@ Adding commands to facilitate purging of hotend.
Step per unit varied for each extruder as well as the feedrate. Step per unit varied for each extruder as well as the feedrate.
The addition of a different feedrate for retraction. The addition of a different feedrate for retraction.
Adding Debug Dryrun used by repetier. Adding Debug Dryrun used by repetier.
Added total Power on time writec in SD CARD. Added total Power on time writed in SD CARD.
Added total Power consumption writed in SD CARD. Added total Power consumption writed in SD CARD.
Added anti extruder idle oozing system. Added anti extruder idle oozing system.
## Credits ## Credits
......
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