Commit 77c86772 authored by MagoKimbra's avatar MagoKimbra

Revert "Change AUTO_BED_LEVELING with AUTO_BED_COMPENSATION"

This reverts commit 920a6718.
parent 1ab27c1a
......@@ -74,7 +74,7 @@ void Config_StoreSettings()
EEPROM_WRITE_VAR(i,tower_adj);
EEPROM_WRITE_VAR(i,z_probe_offset);
#endif
#ifdef ENABLE_AUTO_BED_COMPENSATION
#ifdef ENABLE_AUTO_BED_LEVELING
EEPROM_WRITE_VAR(i,zprobe_zoffset);
#endif
#ifndef ULTIPANEL
......@@ -239,11 +239,11 @@ void Config_PrintSettings()
*/
#endif // DELTA
#ifdef ENABLE_AUTO_BED_COMPENSATION
#ifdef ENABLE_AUTO_BED_LEVELING
SERIAL_ECHO_START;
SERIAL_ECHOPAIR("Z Probe offset (mm):" ,zprobe_zoffset);
SERIAL_ECHOLN("");
#endif // ENABLE_AUTO_BED_COMPENSATION
#endif // ENABLE_AUTO_BED_LEVELING
#ifdef PIDTEMP
SERIAL_ECHO_START;
......@@ -297,7 +297,7 @@ void Config_RetrieveSettings()
// Update delta constants for updated delta_radius & tower_adj values
set_delta_constants();
#endif
#ifdef ENABLE_AUTO_BED_COMPENSATION
#ifdef ENABLE_AUTO_BED_LEVELING
EEPROM_READ_VAR(i,zprobe_zoffset);
#endif
#ifndef ULTIPANEL
......@@ -357,7 +357,7 @@ void Config_ResetDefault()
float tmp6[]=DEFAULT_Ki;
float tmp7[]=DEFAULT_Kd;
for (short i=0;i<NUM_AXIS;i++)
for (short i=0;i<7;i++)
{
axis_steps_per_unit[i]=tmp1[i];
max_feedrate[i]=tmp2[i];
......@@ -404,7 +404,7 @@ void Config_ResetDefault()
gumPreheatHPBTemp = GUM_PREHEAT_HPB_TEMP;
gumPreheatFanSpeed = GUM_PREHEAT_FAN_SPEED;
#endif
#ifdef ENABLE_AUTO_BED_COMPENSATION
#ifdef ENABLE_AUTO_BED_LEVELING
zprobe_zoffset = -Z_PROBE_OFFSET_FROM_EXTRUDER;
#endif
#ifdef DOGLCD
......
......@@ -89,9 +89,9 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the lo
#define Z_MAX_LENGTH (Z_MAX_POS - Z_MIN_POS)
//============================= Bed Auto Compensation ===========================
//============================= Bed Leveling ===========================
//#define ENABLE_AUTO_BED_COMPENSATION // Delete the comment to enable
//#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable
//#define Z_PROBE_REPEATABILITY_TEST // Delete the comment to enable
// set the rectangle in which to probe in manual or automatic
......@@ -102,7 +102,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the lo
#define XY_TRAVEL_SPEED 8000 // X and Y axis travel speed between probes, in mm/min
#ifdef ENABLE_AUTO_BED_COMPENSATION
#ifdef ENABLE_AUTO_BED_LEVELING
// There are 2 different ways to pick the X and Y locations to probe:
......@@ -116,17 +116,17 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the lo
// Probe 3 arbitrary points on the bed (that aren't colinear)
// You must specify the X & Y coordinates of all 3 points
#define AUTO_BED_COMPENSATION_GRID
// with AUTO_BED_COMPENSATION_GRID, the bed is sampled in a
// AUTO_BED_COMPENSATION_GRID_POINTSxAUTO_BED_COMPENSATION_GRID_POINTS grid
#define AUTO_BED_LEVELING_GRID
// with AUTO_BED_LEVELING_GRID, the bed is sampled in a
// AUTO_BED_LEVELING_GRID_POINTSxAUTO_BED_LEVELING_GRID_POINTS grid
// and least squares solution is calculated
// Note: this feature occupies 10'206 byte
#ifdef AUTO_BED_COMPENSATION_GRID
#ifdef AUTO_BED_LEVELING_GRID
// set the number of grid points per dimension
// I wouldn't see a reason to go above 3 (=9 probing points on the bed)
#define AUTO_BED_COMPENSATION_GRID_POINTS 2
#define AUTO_BED_LEVELING_GRID_POINTS 2
#else // not AUTO_BED_COMPENSATION_GRID
#else // not AUTO_BED_LEVELING_GRID
// with no grid, just probe 3 arbitrary points. A simple cross-product
// is used to esimate the plane of the print bed
......@@ -137,7 +137,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the lo
#define ABL_PROBE_PT_3_X 170
#define ABL_PROBE_PT_3_Y 20
#endif // AUTO_BED_COMPENSATION_GRID
#endif // AUTO_BED_LEVELING_GRID
// these are the offsets to the probe relative to the extruder tip (Hotend - Probe)
......@@ -178,7 +178,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the lo
#endif
#endif // ENABLE_AUTO_BED_COMPENSATION
#endif // ENABLE_AUTO_BED_LEVELING
// The position of the homing switches
......
......@@ -94,9 +94,9 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the lo
#define Z_MAX_LENGTH (Z_MAX_POS - Z_MIN_POS)
//============================= Bed Auto Compensation ===========================
//============================= Bed Leveling ===========================
//#define ENABLE_AUTO_BED_COMPENSATION // Delete the comment to enable
//#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable
//#define Z_PROBE_REPEATABILITY_TEST // Delete the comment to enable
// set the rectangle in which to probe in manual or automatic
......@@ -107,7 +107,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the lo
#define XY_TRAVEL_SPEED 8000 // X and Y axis travel speed between probes, in mm/min
#ifdef ENABLE_AUTO_BED_COMPENSATION
#ifdef ENABLE_AUTO_BED_LEVELING
// There are 2 different ways to pick the X and Y locations to probe:
......@@ -121,17 +121,17 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the lo
// Probe 3 arbitrary points on the bed (that aren't colinear)
// You must specify the X & Y coordinates of all 3 points
#define AUTO_BED_COMPENSATION_GRID
// with AUTO_BED_COMPENSATION_GRID, the bed is sampled in a
// AUTO_BED_COMPENSATION_GRID_POINTSxAUTO_BED_COMPENSATION_GRID_POINTS grid
#define AUTO_BED_LEVELING_GRID
// with AUTO_BED_LEVELING_GRID, the bed is sampled in a
// AUTO_BED_LEVELING_GRID_POINTSxAUTO_BED_LEVELING_GRID_POINTS grid
// and least squares solution is calculated
// Note: this feature occupies 10'206 byte
#ifdef AUTO_BED_COMPENSATION_GRID
#ifdef AUTO_BED_LEVELING_GRID
// set the number of grid points per dimension
// I wouldn't see a reason to go above 3 (=9 probing points on the bed)
#define AUTO_BED_COMPENSATION_GRID_POINTS 2
#define AUTO_BED_LEVELING_GRID_POINTS 2
#else // not AUTO_BED_COMPENSATION_GRID
#else // not AUTO_BED_LEVELING_GRID
// with no grid, just probe 3 arbitrary points. A simple cross-product
// is used to esimate the plane of the print bed
......@@ -142,7 +142,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the lo
#define ABL_PROBE_PT_3_X 170
#define ABL_PROBE_PT_3_Y 20
#endif // AUTO_BED_COMPENSATION_GRID
#endif // AUTO_BED_LEVELING_GRID
// these are the offsets to the probe relative to the extruder tip (Hotend - Probe)
......@@ -183,7 +183,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the lo
#endif
#endif // ENABLE_AUTO_BED_COMPENSATION
#endif // ENABLE_AUTO_BED_LEVELING
// The position of the homing switches
......
......@@ -54,20 +54,23 @@
#define ENDSTOPPULLUP_XMIN
#define ENDSTOPPULLUP_YMIN
#define ENDSTOPPULLUP_ZMIN
#define ENDSTOPPULLUP_EMIN
#endif
// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
const bool X_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Y_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Z_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool E_MIN_ENDSTOP_INVERTING = false;// set to true to invert the logic of the endstop.
const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
//#define DISABLE_MAX_ENDSTOPS
//#define DISABLE_MIN_ENDSTOPS
// Disable max endstops for compatibility with endstop checking routine
#if defined(COREXY) && !defined(DISABLE_MAX_ENDSTOPS)
#define DISABLE_MAX_ENDSTOPS
#endif
// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
#define X_ENABLE_ON 0
#define Y_ENABLE_ON 0
......@@ -79,7 +82,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#define DISABLE_Y false
#define DISABLE_Z false
#define DISABLE_E false // For all extruders
#define DISABLE_INACTIVE_EXTRUDER false //disable only inactive extruders and keep active extruder enabled
#define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled
#define INVERT_X_DIR false // for Mendel set to false, for Orca set to true
#define INVERT_Y_DIR false // for Mendel set to true, for Orca set to false
......@@ -89,11 +92,10 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#define INVERT_E2_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false
// ENDSTOP SETTINGS:
// Sets direction of endstops when homing; 1=MAX, -1=MIN
// Sets direction of endstop s when homing; 1=MAX, -1=MIN
#define X_HOME_DIR 1
#define Y_HOME_DIR 1
#define Z_HOME_DIR -1
#define E_HOME_DIR -1
#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below.
......@@ -105,27 +107,15 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#define Y_MIN_POS 0
#define Z_MAX_POS 225
#define Z_MIN_POS MANUAL_Z_HOME_POS
#define E_MIN_POS 0
#define X_MAX_LENGTH (X_MAX_POS - X_MIN_POS)
#define Y_MAX_LENGTH (Y_MAX_POS - Y_MIN_POS)
#define Z_MAX_LENGTH (Z_MAX_POS - Z_MIN_POS)
//============================= Bed Auto Leveling ===========================
//#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line)
//============================= Bed Auto Compensation ===========================
//#define ENABLE_AUTO_BED_COMPENSATION // Delete the comment to enable
//#define Z_PROBE_REPEATABILITY_TEST // Delete the comment to enable
// set the rectangle in which to probe in manual or automatic
#define LEFT_PROBE_BED_POSITION 20
#define RIGHT_PROBE_BED_POSITION 180
#define BACK_PROBE_BED_POSITION 180
#define FRONT_PROBE_BED_POSITION 20
#define XY_TRAVEL_SPEED 8000 // X and Y axis travel speed between probes, in mm/min
#ifdef ENABLE_AUTO_BED_COMPENSATION
#ifdef ENABLE_AUTO_BED_LEVELING
// There are 2 different ways to pick the X and Y locations to probe:
......@@ -139,17 +129,25 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// Probe 3 arbitrary points on the bed (that aren't colinear)
// You must specify the X & Y coordinates of all 3 points
#define AUTO_BED_COMPENSATION_GRID
// with AUTO_BED_COMPENSATION_GRID, the bed is sampled in a
// AUTO_BED_COMPENSATION_GRID_POINTSxAUTO_BED_COMPENSATION_GRID_POINTS grid
#define AUTO_BED_LEVELING_GRID
// with AUTO_BED_LEVELING_GRID, the bed is sampled in a
// AUTO_BED_LEVELING_GRID_POINTSxAUTO_BED_LEVELING_GRID_POINTS grid
// and least squares solution is calculated
// Note: this feature occupies 10'206 byte
#ifdef AUTO_BED_COMPENSATION_GRID
#ifdef AUTO_BED_LEVELING_GRID
// set the rectangle in which to probe
#define LEFT_PROBE_BED_POSITION 15
#define RIGHT_PROBE_BED_POSITION 170
#define BACK_PROBE_BED_POSITION 180
#define FRONT_PROBE_BED_POSITION 20
// set the number of grid points per dimension
// I wouldn't see a reason to go above 3 (=9 probing points on the bed)
#define AUTO_BED_COMPENSATION_GRID_POINTS 2
#define AUTO_BED_LEVELING_GRID_POINTS 2
#else // not AUTO_BED_COMPENSATION_GRID
#else // not AUTO_BED_LEVELING_GRID
// with no grid, just probe 3 arbitrary points. A simple cross-product
// is used to esimate the plane of the print bed
......@@ -160,7 +158,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#define ABL_PROBE_PT_3_X 170
#define ABL_PROBE_PT_3_Y 20
#endif // AUTO_BED_COMPENSATION_GRID
#endif // AUTO_BED_LEVELING_GRID
// these are the offsets to the probe relative to the extruder tip (Hotend - Probe)
......@@ -171,6 +169,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
//#define Z_RAISE_BEFORE_HOMING 4 // (in mm) Raise Z before homing (G28) for Probe Clearance.
// Be sure you have this distance over your Z_MAX_POS in case
#define XY_TRAVEL_SPEED 8000 // X and Y axis travel speed between probes, in mm/min
#define Z_RAISE_BEFORE_PROBING 15 //How much the extruder will be raised before traveling to the first probing point.
#define Z_RAISE_BETWEEN_PROBINGS 5 //How much the extruder will be raised when traveling from between next probing points
......@@ -185,12 +185,12 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
//If you have enabled the Bed Auto Compensation and are using the same Z Probe for Z Homing,
//it is highly recommended you let this Z_SAFE_HOMING enabled!!!
#define Z_SAFE_HOMING // This feature is meant to avoid Z homing with probe outside the bed area.
// When defined, it will:
// - Allow Z homing only after X and Y homing AND stepper drivers still enabled
// - If stepper drivers timeout, it will need X and Y homing again before Z homing
// - Position the probe in a defined XY point before Z Homing when homing all axis (G28)
// - Block Z homing only when the probe is outside bed area.
// #define Z_SAFE_HOMING // This feature is meant to avoid Z homing with probe outside the bed area.
// When defined, it will:
// - Allow Z homing only after X and Y homing AND stepper drivers still enabled
// - If stepper drivers timeout, it will need X and Y homing again before Z homing
// - Position the probe in a defined XY point before Z Homing when homing all axis (G28)
// - Block Z homing only when the probe is outside bed area.
#ifdef Z_SAFE_HOMING
......@@ -199,7 +199,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#endif
#endif // ENABLE_AUTO_BED_COMPENSATION
#endif // ENABLE_AUTO_BED_LEVELING
// The position of the homing switches
......@@ -238,15 +238,3 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#define DEFAULT_XYJERK 5 // (mm/sec)
#define DEFAULT_ZJERK 0.4 // (mm/sec)
#define DEFAULT_EJERK 3 // (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 -15
#define Z_PROBE_OFFSET_RANGE_MAX -5
#endif
This diff is collapsed.
......@@ -262,7 +262,7 @@ uint8_t Servo::attach(int pin)
uint8_t Servo::attach(int pin, int min, int max)
{
if(this->servoIndex < MAX_SERVOS ) {
#if defined (ENABLE_AUTO_BED_COMPENSATION) && (PROBE_SERVO_DEACTIVATION_DELAY > 0)
#if defined (ENABLE_AUTO_BED_LEVELING) && (PROBE_SERVO_DEACTIVATION_DELAY > 0)
if (pin > 0) this->pin = pin; else pin = this->pin;
#endif
pinMode( pin, OUTPUT) ; // set servo pin to output
......
......@@ -123,7 +123,7 @@ public:
int read(); // returns current pulse width as an angle between 0 and 180 degrees
int readMicroseconds(); // returns current pulse width in microseconds for this servo (was read_us() in first release)
bool attached(); // return true if this servo is attached, otherwise false
#if defined (ENABLE_AUTO_BED_COMPENSATION) && (PROBE_SERVO_DEACTIVATION_DELAY > 0)
#if defined (ENABLE_AUTO_BED_LEVELING) && (PROBE_SERVO_DEACTIVATION_DELAY > 0)
int pin; // store the hardware pin of the servo
#endif
private:
......
......@@ -76,14 +76,14 @@ float max_e_jerk;
float mintravelfeedrate;
unsigned long axis_steps_per_sqr_second[NUM_AXIS];
#ifdef ENABLE_AUTO_BED_COMPENSATION
#ifdef ENABLE_AUTO_BED_LEVELING
// this holds the required transform to compensate for bed level
matrix_3x3 plan_bed_compensation_matrix = {
matrix_3x3 plan_bed_level_matrix = {
1.0, 0.0, 0.0,
0.0, 1.0, 0.0,
0.0, 0.0, 1.0,
};
#endif // #ifdef ENABLE_AUTO_BED_COMPENSATION
#endif // #ifdef ENABLE_AUTO_BED_LEVELING
// The current position of the tool in absolute steps
long position[4]; //rescaled from extern when axis_steps_per_unit are changed by gcode
......@@ -543,11 +543,11 @@ float junction_deviation = 0.1;
// Add a new linear movement to the buffer. steps_x, _y and _z is the absolute position in
// 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.
#ifdef ENABLE_AUTO_BED_COMPENSATION
#ifdef ENABLE_AUTO_BED_LEVELING
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
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_COMPENSATION
#endif //ENABLE_AUTO_BED_LEVELING
{
// Calculate the buffer head after we push this byte
int next_buffer_head = next_block_index(block_buffer_head);
......@@ -561,9 +561,9 @@ void plan_buffer_line(const float &x, const float &y, const float &z, const floa
lcd_update();
}
#ifdef ENABLE_AUTO_BED_COMPENSATION
apply_rotation_xyz(plan_bed_compensation_matrix, x, y, z);
#endif // ENABLE_AUTO_BED_COMPENSATION
#ifdef ENABLE_AUTO_BED_LEVELING
apply_rotation_xyz(plan_bed_level_matrix, x, y, z);
#endif // ENABLE_AUTO_BED_LEVELING
// The target position of the tool in absolute steps
// Calculate target position in absolute steps
......@@ -1082,29 +1082,29 @@ block->steps_y = labs((target[X_AXIS]-position[X_AXIS]) - (target[Y_AXIS]-positi
st_wake_up();
}
#ifdef ENABLE_AUTO_BED_COMPENSATION
#ifdef ENABLE_AUTO_BED_LEVELING
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));
//position.debug("in plan_get position");
//plan_bed_compensation_matrix.debug("in plan_get bed_level");
matrix_3x3 inverse = matrix_3x3::transpose(plan_bed_compensation_matrix);
//plan_bed_level_matrix.debug("in plan_get bed_level");
matrix_3x3 inverse = matrix_3x3::transpose(plan_bed_level_matrix);
//inverse.debug("in plan_get inverse");
position.apply_rotation(inverse);
//position.debug("after rotation");
return position;
}
#endif // ENABLE_AUTO_BED_COMPENSATION
#endif // ENABLE_AUTO_BED_LEVELING
#ifdef ENABLE_AUTO_BED_COMPENSATION
#ifdef ENABLE_AUTO_BED_LEVELING
void plan_set_position(float x, float y, float z, const float &e)
{
apply_rotation_xyz(plan_bed_compensation_matrix, x, y, z);
apply_rotation_xyz(plan_bed_level_matrix, x, y, z);
#else
void plan_set_position(const float &x, const float &y, const float &z, const float &e)
{
#endif // ENABLE_AUTO_BED_COMPENSATION
#endif // ENABLE_AUTO_BED_LEVELING
position[X_AXIS] = lround(x*axis_steps_per_unit[X_AXIS]);
position[Y_AXIS] = lround(y*axis_steps_per_unit[Y_AXIS]);
......
......@@ -26,9 +26,9 @@
#include "Marlin.h"
#ifdef ENABLE_AUTO_BED_COMPENSATION
#ifdef ENABLE_AUTO_BED_LEVELING
#include "vector_3.h"
#endif // ENABLE_AUTO_BED_COMPENSATION
#endif // ENABLE_AUTO_BED_LEVELING
// This struct is used when buffering the setup for each linear movement "nominal" values are as specified in
// the source g-code and may never actually be reached if acceleration management is active.
......@@ -75,10 +75,10 @@ typedef struct {
}
block_t;
#ifdef ENABLE_AUTO_BED_COMPENSATION
#ifdef ENABLE_AUTO_BED_LEVELING
// this holds the required transform to compensate for bed level
extern matrix_3x3 plan_bed_compensation_matrix;
#endif // #ifdef ENABLE_AUTO_BED_COMPENSATION
extern matrix_3x3 plan_bed_level_matrix;
#endif // #ifdef ENABLE_AUTO_BED_LEVELING
// Initialize the motion plan subsystem
void plan_init();
......@@ -86,21 +86,21 @@ void plan_init();
// Add a new linear movement to the buffer. x, y and z is the signed, absolute target position in
// millimaters. Feed rate specifies the speed of the motion.
#ifdef ENABLE_AUTO_BED_COMPENSATION
#ifdef ENABLE_AUTO_BED_LEVELING
void plan_buffer_line(float x, float y, float z, const float &e, float feed_rate, const uint8_t &extruder, const uint8_t &driver);
// Get the position applying the bed level matrix if enabled
vector_3 plan_get_position();
#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);
#endif // ENABLE_AUTO_BED_COMPENSATION
#endif // ENABLE_AUTO_BED_LEVELING
// Set position. Used for G92 instructions.
#ifdef ENABLE_AUTO_BED_COMPENSATION
#ifdef ENABLE_AUTO_BED_LEVELING
void plan_set_position(float x, float y, float z, const float &e);
#else
void plan_set_position(const float &x, const float &y, const float &z, const float &e);
#endif // ENABLE_AUTO_BED_COMPENSATION
#endif // ENABLE_AUTO_BED_LEVELING
void plan_set_e_position(const float &e);
......
#include "qr_solve.h"
#ifdef AUTO_BED_COMPENSATION_GRID
#ifdef AUTO_BED_LEVELING_GRID
#include <stdlib.h>
#include <math.h>
......
#include "Configuration.h"
#ifdef AUTO_BED_COMPENSATION_GRID
#ifdef AUTO_BED_LEVELING_GRID
void daxpy ( int n, double da, double dx[], int incx, double dy[], int incy );
double ddot ( int n, double dx[], int incx, double dy[], int incy );
......
......@@ -1180,13 +1180,13 @@ long st_get_position(uint8_t axis)
return count_pos;
}
#ifdef ENABLE_AUTO_BED_COMPENSATION
#ifdef ENABLE_AUTO_BED_LEVELING
float st_get_position_mm(uint8_t axis)
{
float steper_position_in_steps = st_get_position(axis);
return steper_position_in_steps / axis_steps_per_unit[axis];
}
#endif // ENABLE_AUTO_BED_COMPENSATION
#endif // ENABLE_AUTO_BED_LEVELING
void finishAndDisableSteppers()
{
......
......@@ -65,10 +65,10 @@ void st_set_e_position(const long &e);
// Get current position in steps
long st_get_position(uint8_t axis);
#ifdef ENABLE_AUTO_BED_COMPENSATION
#ifdef ENABLE_AUTO_BED_LEVELING
// Get current position in mm
float st_get_position_mm(uint8_t axis);
#endif //ENABLE_AUTO_BED_COMPENSATION
#endif //ENABLE_AUTO_BED_LEVELING
// The stepper subsystem goes to sleep when it runs out of things to execute. Call this
// to notify the subsystem that it is time to go to work.
......
......@@ -1107,7 +1107,7 @@ static void lcd_control_motion_menu()
{
START_MENU();
MENU_ITEM(back, MSG_CONTROL, lcd_control_menu);
#ifdef ENABLE_AUTO_BED_COMPENSATION
#ifdef ENABLE_AUTO_BED_LEVELING
MENU_ITEM_EDIT(float32, MSG_ZPROBE_ZOFFSET, &zprobe_zoffset, 0.5, 50);
#endif
MENU_ITEM_EDIT(float5, MSG_ACC, &acceleration, 500, 99000);
......
......@@ -19,7 +19,7 @@
#include <math.h>
#include "Marlin.h"
#ifdef ENABLE_AUTO_BED_COMPENSATION
#ifdef ENABLE_AUTO_BED_LEVELING
#include "vector_3.h"
vector_3::vector_3() : x(0), y(0), z(0) { }
......@@ -163,5 +163,5 @@ void matrix_3x3::debug(char* title)
}
}
#endif // #ifdef ENABLE_AUTO_BED_COMPENSATION
#endif // #ifdef ENABLE_AUTO_BED_LEVELING
......@@ -19,7 +19,7 @@
#ifndef VECTOR_3_H
#define VECTOR_3_H
#ifdef ENABLE_AUTO_BED_COMPENSATION
#ifdef ENABLE_AUTO_BED_LEVELING
class matrix_3x3;
struct vector_3
......@@ -57,6 +57,6 @@ struct matrix_3x3
void apply_rotation_xyz(matrix_3x3 rotationMatrix, float &x, float& y, float& z);
#endif // ENABLE_AUTO_BED_COMPENSATION
#endif // ENABLE_AUTO_BED_LEVELING
#endif // VECTOR_3_H
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