Merge pull request #6965 from thinkyhead/bf_save_more_sram

Use createChar_P to save SRAM in bootscreen
master
Scott Lahteine 8 years ago committed by GitHub
commit 1419126721

@ -243,7 +243,7 @@
/* Custom characters defined in the first 8 characters of the LCD */ /* Custom characters defined in the first 8 characters of the LCD */
#define LCD_BEDTEMP_CHAR 0x00 // Print only as a char. This will have 'unexpected' results when used in a string! #define LCD_BEDTEMP_CHAR 0x00 // Print only as a char. This will have 'unexpected' results when used in a string!
#define LCD_DEGREE_CHAR 0x01 #define LCD_DEGREE_CHAR 0x01
#define LCD_STR_THERMOMETER "\x02" // Too many places use preprocessor string concatination to change this to a char right now. #define LCD_STR_THERMOMETER "\x02" // Still used with string concatenation
#define LCD_UPLEVEL_CHAR 0x03 #define LCD_UPLEVEL_CHAR 0x03
#define LCD_REFRESH_CHAR 0x04 #define LCD_REFRESH_CHAR 0x04
#define LCD_STR_FOLDER "\x05" #define LCD_STR_FOLDER "\x05"

@ -881,12 +881,14 @@
#define UBL_MESH_INSET 1 // Mesh inset margin on print area #define UBL_MESH_INSET 1 // Mesh inset margin on print area
#define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
#define UBL_PROBE_PT_1_X 39 // These set the probe locations for when UBL does a 3-Point leveling
#define UBL_PROBE_PT_1_Y 180 // of the mesh. #define UBL_PROBE_PT_1_X 39 // Probing points for 3-Point leveling of the mesh
#define UBL_PROBE_PT_1_Y 180
#define UBL_PROBE_PT_2_X 39 #define UBL_PROBE_PT_2_X 39
#define UBL_PROBE_PT_2_Y 20 #define UBL_PROBE_PT_2_Y 20
#define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_3_X 180
#define UBL_PROBE_PT_3_Y 20 #define UBL_PROBE_PT_3_Y 20
#define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle

@ -225,13 +225,11 @@
*/ */
//#define CASE_LIGHT_ENABLE //#define CASE_LIGHT_ENABLE
#if ENABLED(CASE_LIGHT_ENABLE) #if ENABLED(CASE_LIGHT_ENABLE)
#define CASE_LIGHT_PIN 4 // can be defined here or in the pins_XXX.h file for your board //#define CASE_LIGHT_PIN 4 // Override the default pin if needed
// pins_XXX.h file overrides this one #define INVERT_CASE_LIGHT false // Set true if Case Light is ON when pin is LOW
#define INVERT_CASE_LIGHT false // set to true if case light is ON when pin is at 0 #define CASE_LIGHT_DEFAULT_ON true // Set default power-up state on
#define CASE_LIGHT_DEFAULT_ON true // set default power up state to on or off #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // Set default power-up brightness (0-255, requires PWM pin)
#define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // set power up brightness 0-255 ( only used if on PWM //#define MENU_ITEM_CASE_LIGHT // Add a Case Light option to the LCD main menu
// and if CASE_LIGHT_DEFAULT is set to on
//#define MENU_ITEM_CASE_LIGHT // Uncomment to have a Case Light entry in main menu
#endif #endif
//=========================================================================== //===========================================================================
@ -427,7 +425,7 @@
// Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro // Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
//#define DIGIPOT_I2C //#define DIGIPOT_I2C
//#define DIGIPOT_MCP4018 //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO

@ -252,8 +252,8 @@
// Move nozzle to the specified height for the first layer // Move nozzle to the specified height for the first layer
set_destination_to_current(); set_destination_to_current();
destination[Z_AXIS] = g26_layer_height; destination[Z_AXIS] = g26_layer_height;
move_to(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], 0.0); move_to(destination, 0.0);
move_to(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], g26_ooze_amount); move_to(destination, g26_ooze_amount);
has_control_of_lcd_panel = true; has_control_of_lcd_panel = true;
//debug_current_and_destination(PSTR("Starting G26 Mesh Validation Pattern.")); //debug_current_and_destination(PSTR("Starting G26 Mesh Validation Pattern."));
@ -368,14 +368,14 @@
destination[Z_AXIS] = Z_CLEARANCE_BETWEEN_PROBES; destination[Z_AXIS] = Z_CLEARANCE_BETWEEN_PROBES;
//debug_current_and_destination(PSTR("ready to do Z-Raise.")); //debug_current_and_destination(PSTR("ready to do Z-Raise."));
move_to(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], 0); // Raise the nozzle move_to(destination, 0); // Raise the nozzle
//debug_current_and_destination(PSTR("done doing Z-Raise.")); //debug_current_and_destination(PSTR("done doing Z-Raise."));
destination[X_AXIS] = g26_x_pos; // Move back to the starting position destination[X_AXIS] = g26_x_pos; // Move back to the starting position
destination[Y_AXIS] = g26_y_pos; destination[Y_AXIS] = g26_y_pos;
//destination[Z_AXIS] = Z_CLEARANCE_BETWEEN_PROBES; // Keep the nozzle where it is //destination[Z_AXIS] = Z_CLEARANCE_BETWEEN_PROBES; // Keep the nozzle where it is
move_to(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], 0); // Move back to the starting position move_to(destination, 0); // Move back to the starting position
//debug_current_and_destination(PSTR("done doing X/Y move.")); //debug_current_and_destination(PSTR("done doing X/Y move."));
has_control_of_lcd_panel = false; // Give back control of the LCD Panel! has_control_of_lcd_panel = false; // Give back control of the LCD Panel!
@ -554,16 +554,16 @@
} }
void unified_bed_leveling::retract_filament(float where[XYZE]) { void unified_bed_leveling::retract_filament(const float where[XYZE]) {
if (!g26_retracted) { // Only retract if we are not already retracted! if (!g26_retracted) { // Only retract if we are not already retracted!
g26_retracted = true; g26_retracted = true;
move_to(where[X_AXIS], where[Y_AXIS], where[Z_AXIS], -1.0 * g26_retraction_multiplier); move_to(where, -1.0 * g26_retraction_multiplier);
} }
} }
void unified_bed_leveling::recover_filament(float where[XYZE]) { void unified_bed_leveling::recover_filament(const float where[XYZE]) {
if (g26_retracted) { // Only un-retract if we are retracted. if (g26_retracted) { // Only un-retract if we are retracted.
move_to(where[X_AXIS], where[Y_AXIS], where[Z_AXIS], 1.2 * g26_retraction_multiplier); move_to(where, 1.2 * g26_retraction_multiplier);
g26_retracted = false; g26_retracted = false;
} }
} }

@ -389,7 +389,7 @@ static const char *injected_commands_P = NULL;
* Feed rates are often configured with mm/m * Feed rates are often configured with mm/m
* but the planner and stepper like mm/s units. * but the planner and stepper like mm/s units.
*/ */
float constexpr homing_feedrate_mm_s[] = { static const float homing_feedrate_mm_s[] PROGMEM = {
#if ENABLED(DELTA) #if ENABLED(DELTA)
MMM_TO_MMS(HOMING_FEEDRATE_Z), MMM_TO_MMS(HOMING_FEEDRATE_Z), MMM_TO_MMS(HOMING_FEEDRATE_Z), MMM_TO_MMS(HOMING_FEEDRATE_Z),
#else #else
@ -397,6 +397,8 @@ float constexpr homing_feedrate_mm_s[] = {
#endif #endif
MMM_TO_MMS(HOMING_FEEDRATE_Z), 0 MMM_TO_MMS(HOMING_FEEDRATE_Z), 0
}; };
FORCE_INLINE float homing_feedrate(const AxisEnum a) { return pgm_read_float(&homing_feedrate_mm_s[a]); }
float feedrate_mm_s = MMM_TO_MMS(1500.0); float feedrate_mm_s = MMM_TO_MMS(1500.0);
static float saved_feedrate_mm_s; static float saved_feedrate_mm_s;
int feedrate_percentage = 100, saved_feedrate_percentage, int feedrate_percentage = 100, saved_feedrate_percentage,
@ -660,8 +662,8 @@ static bool send_ok[BUFSIZE];
#define host_keepalive() NOOP #define host_keepalive() NOOP
#endif #endif
static inline float pgm_read_any(const float *p) { return pgm_read_float_near(p); } FORCE_INLINE float pgm_read_any(const float *p) { return pgm_read_float_near(p); }
static inline signed char pgm_read_any(const signed char *p) { return pgm_read_byte_near(p); } FORCE_INLINE signed char pgm_read_any(const signed char *p) { return pgm_read_byte_near(p); }
#define XYZ_CONSTS_FROM_CONFIG(type, array, CONFIG) \ #define XYZ_CONSTS_FROM_CONFIG(type, array, CONFIG) \
static const PROGMEM type array##_P[XYZ] = { X_##CONFIG, Y_##CONFIG, Z_##CONFIG }; \ static const PROGMEM type array##_P[XYZ] = { X_##CONFIG, Y_##CONFIG, Z_##CONFIG }; \
@ -780,7 +782,7 @@ extern "C" {
#endif // !SDSUPPORT #endif // !SDSUPPORT
#if ENABLED(DIGIPOT_I2C) #if ENABLED(DIGIPOT_I2C)
extern void digipot_i2c_set_current(int channel, float current); extern void digipot_i2c_set_current(uint8_t channel, float current);
extern void digipot_i2c_init(); extern void digipot_i2c_init();
#endif #endif
@ -1394,7 +1396,7 @@ bool get_target_extruder_from_command(int code) {
* *
* Callers must sync the planner position after calling this! * Callers must sync the planner position after calling this!
*/ */
static void set_axis_is_at_home(AxisEnum axis) { static void set_axis_is_at_home(const AxisEnum axis) {
#if ENABLED(DEBUG_LEVELING_FEATURE) #if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) { if (DEBUGGING(LEVELING)) {
SERIAL_ECHOPAIR(">>> set_axis_is_at_home(", axis_codes[axis]); SERIAL_ECHOPAIR(">>> set_axis_is_at_home(", axis_codes[axis]);
@ -1496,31 +1498,30 @@ static void set_axis_is_at_home(AxisEnum axis) {
/** /**
* Some planner shorthand inline functions * Some planner shorthand inline functions
*/ */
inline float get_homing_bump_feedrate(AxisEnum axis) { inline float get_homing_bump_feedrate(const AxisEnum axis) {
int constexpr homing_bump_divisor[] = HOMING_BUMP_DIVISOR; const uint8_t homing_bump_divisor[] PROGMEM = HOMING_BUMP_DIVISOR;
int hbd = homing_bump_divisor[axis]; uint8_t hbd = pgm_read_byte(&homing_bump_divisor[axis]);
if (hbd < 1) { if (hbd < 1) {
hbd = 10; hbd = 10;
SERIAL_ECHO_START; SERIAL_ECHO_START;
SERIAL_ECHOLNPGM("Warning: Homing Bump Divisor < 1"); SERIAL_ECHOLNPGM("Warning: Homing Bump Divisor < 1");
} }
return homing_feedrate_mm_s[axis] / hbd; return homing_feedrate(axis) / hbd;
} }
// /**
// line_to_current_position * Move the planner to the current position from wherever it last moved
// Move the planner to the current position from wherever it last moved * (or from wherever it has been told it is located).
// (or from wherever it has been told it is located). */
//
inline void line_to_current_position() { inline void line_to_current_position() {
planner.buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], feedrate_mm_s, active_extruder); planner.buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], feedrate_mm_s, active_extruder);
} }
// /**
// line_to_destination * Move the planner to the position stored in the destination array, which is
// Move the planner, not necessarily synced with current_position * used by G0/G1/G2/G3/G5 and many other functions to set a destination.
// */
inline void line_to_destination(float fr_mm_s) { inline void line_to_destination(const float fr_mm_s) {
planner.buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], fr_mm_s, active_extruder); planner.buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], fr_mm_s, active_extruder);
} }
inline void line_to_destination() { line_to_destination(feedrate_mm_s); } inline void line_to_destination() { line_to_destination(feedrate_mm_s); }
@ -1560,16 +1561,16 @@ inline void set_destination_to_current() { COPY(destination, current_position);
* Plan a move to (X, Y, Z) and set the current_position * Plan a move to (X, Y, Z) and set the current_position
* The final current_position may not be the one that was requested * The final current_position may not be the one that was requested
*/ */
void do_blocking_move_to(const float &x, const float &y, const float &z, const float &fr_mm_s /*=0.0*/) { void do_blocking_move_to(const float &lx, const float &ly, const float &lz, const float &fr_mm_s/*=0.0*/) {
const float old_feedrate_mm_s = feedrate_mm_s; const float old_feedrate_mm_s = feedrate_mm_s;
#if ENABLED(DEBUG_LEVELING_FEATURE) #if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) print_xyz(PSTR(">>> do_blocking_move_to"), NULL, x, y, z); if (DEBUGGING(LEVELING)) print_xyz(PSTR(">>> do_blocking_move_to"), NULL, lx, ly, lz);
#endif #endif
#if ENABLED(DELTA) #if ENABLED(DELTA)
if (!position_is_reachable_xy(x, y)) return; if (!position_is_reachable_xy(lx, ly)) return;
feedrate_mm_s = fr_mm_s ? fr_mm_s : XY_PROBE_FEEDRATE_MM_S; feedrate_mm_s = fr_mm_s ? fr_mm_s : XY_PROBE_FEEDRATE_MM_S;
@ -1581,10 +1582,10 @@ void do_blocking_move_to(const float &x, const float &y, const float &z, const f
// when in the danger zone // when in the danger zone
if (current_position[Z_AXIS] > delta_clip_start_height) { if (current_position[Z_AXIS] > delta_clip_start_height) {
if (z > delta_clip_start_height) { // staying in the danger zone if (lz > delta_clip_start_height) { // staying in the danger zone
destination[X_AXIS] = x; // move directly (uninterpolated) destination[X_AXIS] = lx; // move directly (uninterpolated)
destination[Y_AXIS] = y; destination[Y_AXIS] = ly;
destination[Z_AXIS] = z; destination[Z_AXIS] = lz;
prepare_uninterpolated_move_to_destination(); // set_current_to_destination prepare_uninterpolated_move_to_destination(); // set_current_to_destination
#if ENABLED(DEBUG_LEVELING_FEATURE) #if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) DEBUG_POS("danger zone move", current_position); if (DEBUGGING(LEVELING)) DEBUG_POS("danger zone move", current_position);
@ -1600,23 +1601,23 @@ void do_blocking_move_to(const float &x, const float &y, const float &z, const f
} }
} }
if (z > current_position[Z_AXIS]) { // raising? if (lz > current_position[Z_AXIS]) { // raising?
destination[Z_AXIS] = z; destination[Z_AXIS] = lz;
prepare_uninterpolated_move_to_destination(); // set_current_to_destination prepare_uninterpolated_move_to_destination(); // set_current_to_destination
#if ENABLED(DEBUG_LEVELING_FEATURE) #if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) DEBUG_POS("z raise move", current_position); if (DEBUGGING(LEVELING)) DEBUG_POS("z raise move", current_position);
#endif #endif
} }
destination[X_AXIS] = x; destination[X_AXIS] = lx;
destination[Y_AXIS] = y; destination[Y_AXIS] = ly;
prepare_move_to_destination(); // set_current_to_destination prepare_move_to_destination(); // set_current_to_destination
#if ENABLED(DEBUG_LEVELING_FEATURE) #if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) DEBUG_POS("xy move", current_position); if (DEBUGGING(LEVELING)) DEBUG_POS("xy move", current_position);
#endif #endif
if (z < current_position[Z_AXIS]) { // lowering? if (lz < current_position[Z_AXIS]) { // lowering?
destination[Z_AXIS] = z; destination[Z_AXIS] = lz;
prepare_uninterpolated_move_to_destination(); // set_current_to_destination prepare_uninterpolated_move_to_destination(); // set_current_to_destination
#if ENABLED(DEBUG_LEVELING_FEATURE) #if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) DEBUG_POS("z lower move", current_position); if (DEBUGGING(LEVELING)) DEBUG_POS("z lower move", current_position);
@ -1625,44 +1626,44 @@ void do_blocking_move_to(const float &x, const float &y, const float &z, const f
#elif IS_SCARA #elif IS_SCARA
if (!position_is_reachable_xy(x, y)) return; if (!position_is_reachable_xy(lx, ly)) return;
set_destination_to_current(); set_destination_to_current();
// If Z needs to raise, do it before moving XY // If Z needs to raise, do it before moving XY
if (destination[Z_AXIS] < z) { if (destination[Z_AXIS] < lz) {
destination[Z_AXIS] = z; destination[Z_AXIS] = lz;
prepare_uninterpolated_move_to_destination(fr_mm_s ? fr_mm_s : homing_feedrate_mm_s[Z_AXIS]); prepare_uninterpolated_move_to_destination(fr_mm_s ? fr_mm_s : homing_feedrate(Z_AXIS));
} }
destination[X_AXIS] = x; destination[X_AXIS] = lx;
destination[Y_AXIS] = y; destination[Y_AXIS] = ly;
prepare_uninterpolated_move_to_destination(fr_mm_s ? fr_mm_s : XY_PROBE_FEEDRATE_MM_S); prepare_uninterpolated_move_to_destination(fr_mm_s ? fr_mm_s : XY_PROBE_FEEDRATE_MM_S);
// If Z needs to lower, do it after moving XY // If Z needs to lower, do it after moving XY
if (destination[Z_AXIS] > z) { if (destination[Z_AXIS] > lz) {
destination[Z_AXIS] = z; destination[Z_AXIS] = lz;
prepare_uninterpolated_move_to_destination(fr_mm_s ? fr_mm_s : homing_feedrate_mm_s[Z_AXIS]); prepare_uninterpolated_move_to_destination(fr_mm_s ? fr_mm_s : homing_feedrate(Z_AXIS));
} }
#else #else
// If Z needs to raise, do it before moving XY // If Z needs to raise, do it before moving XY
if (current_position[Z_AXIS] < z) { if (current_position[Z_AXIS] < lz) {
feedrate_mm_s = fr_mm_s ? fr_mm_s : homing_feedrate_mm_s[Z_AXIS]; feedrate_mm_s = fr_mm_s ? fr_mm_s : homing_feedrate(Z_AXIS);
current_position[Z_AXIS] = z; current_position[Z_AXIS] = lz;
line_to_current_position(); line_to_current_position();
} }
feedrate_mm_s = fr_mm_s ? fr_mm_s : XY_PROBE_FEEDRATE_MM_S; feedrate_mm_s = fr_mm_s ? fr_mm_s : XY_PROBE_FEEDRATE_MM_S;
current_position[X_AXIS] = x; current_position[X_AXIS] = lx;
current_position[Y_AXIS] = y; current_position[Y_AXIS] = ly;
line_to_current_position(); line_to_current_position();
// If Z needs to lower, do it after moving XY // If Z needs to lower, do it after moving XY
if (current_position[Z_AXIS] > z) { if (current_position[Z_AXIS] > lz) {
feedrate_mm_s = fr_mm_s ? fr_mm_s : homing_feedrate_mm_s[Z_AXIS]; feedrate_mm_s = fr_mm_s ? fr_mm_s : homing_feedrate(Z_AXIS);
current_position[Z_AXIS] = z; current_position[Z_AXIS] = lz;
line_to_current_position(); line_to_current_position();
} }
@ -1676,14 +1677,14 @@ void do_blocking_move_to(const float &x, const float &y, const float &z, const f
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("<<< do_blocking_move_to"); if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("<<< do_blocking_move_to");
#endif #endif
} }
void do_blocking_move_to_x(const float &x, const float &fr_mm_s/*=0.0*/) { void do_blocking_move_to_x(const float &lx, const float &fr_mm_s/*=0.0*/) {
do_blocking_move_to(x, current_position[Y_AXIS], current_position[Z_AXIS], fr_mm_s); do_blocking_move_to(lx, current_position[Y_AXIS], current_position[Z_AXIS], fr_mm_s);
} }
void do_blocking_move_to_z(const float &z, const float &fr_mm_s/*=0.0*/) { void do_blocking_move_to_z(const float &lz, const float &fr_mm_s/*=0.0*/) {
do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], z, fr_mm_s); do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], lz, fr_mm_s);
} }
void do_blocking_move_to_xy(const float &x, const float &y, const float &fr_mm_s/*=0.0*/) { void do_blocking_move_to_xy(const float &lx, const float &ly, const float &fr_mm_s/*=0.0*/) {
do_blocking_move_to(x, y, current_position[Z_AXIS], fr_mm_s); do_blocking_move_to(lx, ly, current_position[Z_AXIS], fr_mm_s);
} }
// //
@ -1718,7 +1719,7 @@ static void clean_up_after_endstop_or_probe_move() {
/** /**
* Raise Z to a minimum height to make room for a probe to move * Raise Z to a minimum height to make room for a probe to move
*/ */
inline void do_probe_raise(float z_raise) { inline void do_probe_raise(const float z_raise) {
#if ENABLED(DEBUG_LEVELING_FEATURE) #if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) { if (DEBUGGING(LEVELING)) {
SERIAL_ECHOPAIR("do_probe_raise(", z_raise); SERIAL_ECHOPAIR("do_probe_raise(", z_raise);
@ -1800,6 +1801,10 @@ static void clean_up_after_endstop_or_probe_move() {
#elif ENABLED(Z_PROBE_ALLEN_KEY) #elif ENABLED(Z_PROBE_ALLEN_KEY)
FORCE_INLINE void do_blocking_move_to(const float logical[XYZ], const float &fr_mm_s) {
do_blocking_move_to(logical[X_AXIS], logical[Y_AXIS], logical[Z_AXIS], fr_mm_s);
}
void run_deploy_moves_script() { void run_deploy_moves_script() {
#if defined(Z_PROBE_ALLEN_KEY_DEPLOY_1_X) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_1_Y) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_1_Z) #if defined(Z_PROBE_ALLEN_KEY_DEPLOY_1_X) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_1_Y) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_1_Z)
#ifndef Z_PROBE_ALLEN_KEY_DEPLOY_1_X #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_1_X
@ -1814,7 +1819,8 @@ static void clean_up_after_endstop_or_probe_move() {
#ifndef Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE
#define Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE 0.0 #define Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE 0.0
#endif #endif
do_blocking_move_to(Z_PROBE_ALLEN_KEY_DEPLOY_1_X, Z_PROBE_ALLEN_KEY_DEPLOY_1_Y, Z_PROBE_ALLEN_KEY_DEPLOY_1_Z, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE)); const float deploy_1[] = { Z_PROBE_ALLEN_KEY_DEPLOY_1_X, Z_PROBE_ALLEN_KEY_DEPLOY_1_Y, Z_PROBE_ALLEN_KEY_DEPLOY_1_Z };
do_blocking_move_to(deploy_1, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE));
#endif #endif
#if defined(Z_PROBE_ALLEN_KEY_DEPLOY_2_X) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_2_Y) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_2_Z) #if defined(Z_PROBE_ALLEN_KEY_DEPLOY_2_X) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_2_Y) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_2_Z)
#ifndef Z_PROBE_ALLEN_KEY_DEPLOY_2_X #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_2_X
@ -1829,7 +1835,8 @@ static void clean_up_after_endstop_or_probe_move() {
#ifndef Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE
#define Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE 0.0 #define Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE 0.0
#endif #endif
do_blocking_move_to(Z_PROBE_ALLEN_KEY_DEPLOY_2_X, Z_PROBE_ALLEN_KEY_DEPLOY_2_Y, Z_PROBE_ALLEN_KEY_DEPLOY_2_Z, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE)); const float deploy_2[] = { Z_PROBE_ALLEN_KEY_DEPLOY_2_X, Z_PROBE_ALLEN_KEY_DEPLOY_2_Y, Z_PROBE_ALLEN_KEY_DEPLOY_2_Z };
do_blocking_move_to(deploy_2, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE));
#endif #endif
#if defined(Z_PROBE_ALLEN_KEY_DEPLOY_3_X) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_3_Y) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_3_Z) #if defined(Z_PROBE_ALLEN_KEY_DEPLOY_3_X) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_3_Y) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_3_Z)
#ifndef Z_PROBE_ALLEN_KEY_DEPLOY_3_X #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_3_X
@ -1844,7 +1851,8 @@ static void clean_up_after_endstop_or_probe_move() {
#ifndef Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE
#define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE 0.0 #define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE 0.0
#endif #endif
do_blocking_move_to(Z_PROBE_ALLEN_KEY_DEPLOY_3_X, Z_PROBE_ALLEN_KEY_DEPLOY_3_Y, Z_PROBE_ALLEN_KEY_DEPLOY_3_Z, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE)); const float deploy_3[] = { Z_PROBE_ALLEN_KEY_DEPLOY_3_X, Z_PROBE_ALLEN_KEY_DEPLOY_3_Y, Z_PROBE_ALLEN_KEY_DEPLOY_3_Z };
do_blocking_move_to(deploy_3, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE));
#endif #endif
#if defined(Z_PROBE_ALLEN_KEY_DEPLOY_4_X) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_4_Y) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_4_Z) #if defined(Z_PROBE_ALLEN_KEY_DEPLOY_4_X) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_4_Y) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_4_Z)
#ifndef Z_PROBE_ALLEN_KEY_DEPLOY_4_X #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_4_X
@ -1859,7 +1867,8 @@ static void clean_up_after_endstop_or_probe_move() {
#ifndef Z_PROBE_ALLEN_KEY_DEPLOY_4_FEEDRATE #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_4_FEEDRATE
#define Z_PROBE_ALLEN_KEY_DEPLOY_4_FEEDRATE 0.0 #define Z_PROBE_ALLEN_KEY_DEPLOY_4_FEEDRATE 0.0
#endif #endif
do_blocking_move_to(Z_PROBE_ALLEN_KEY_DEPLOY_4_X, Z_PROBE_ALLEN_KEY_DEPLOY_4_Y, Z_PROBE_ALLEN_KEY_DEPLOY_4_Z, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_DEPLOY_4_FEEDRATE)); const float deploy_4[] = { Z_PROBE_ALLEN_KEY_DEPLOY_4_X, Z_PROBE_ALLEN_KEY_DEPLOY_4_Y, Z_PROBE_ALLEN_KEY_DEPLOY_4_Z };
do_blocking_move_to(deploy_4, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_DEPLOY_4_FEEDRATE));
#endif #endif
#if defined(Z_PROBE_ALLEN_KEY_DEPLOY_5_X) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_5_Y) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_5_Z) #if defined(Z_PROBE_ALLEN_KEY_DEPLOY_5_X) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_5_Y) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_5_Z)
#ifndef Z_PROBE_ALLEN_KEY_DEPLOY_5_X #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_5_X
@ -1874,7 +1883,8 @@ static void clean_up_after_endstop_or_probe_move() {
#ifndef Z_PROBE_ALLEN_KEY_DEPLOY_5_FEEDRATE #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_5_FEEDRATE
#define Z_PROBE_ALLEN_KEY_DEPLOY_5_FEEDRATE 0.0 #define Z_PROBE_ALLEN_KEY_DEPLOY_5_FEEDRATE 0.0
#endif #endif
do_blocking_move_to(Z_PROBE_ALLEN_KEY_DEPLOY_5_X, Z_PROBE_ALLEN_KEY_DEPLOY_5_Y, Z_PROBE_ALLEN_KEY_DEPLOY_5_Z, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_DEPLOY_5_FEEDRATE)); const float deploy_5[] = { Z_PROBE_ALLEN_KEY_DEPLOY_5_X, Z_PROBE_ALLEN_KEY_DEPLOY_5_Y, Z_PROBE_ALLEN_KEY_DEPLOY_5_Z };
do_blocking_move_to(deploy_5, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_DEPLOY_5_FEEDRATE));
#endif #endif
} }
@ -1892,7 +1902,8 @@ static void clean_up_after_endstop_or_probe_move() {
#ifndef Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE #ifndef Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE
#define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE 0.0 #define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE 0.0
#endif #endif
do_blocking_move_to(Z_PROBE_ALLEN_KEY_STOW_1_X, Z_PROBE_ALLEN_KEY_STOW_1_Y, Z_PROBE_ALLEN_KEY_STOW_1_Z, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE)); const float stow_1[] = { Z_PROBE_ALLEN_KEY_STOW_1_X, Z_PROBE_ALLEN_KEY_STOW_1_Y, Z_PROBE_ALLEN_KEY_STOW_1_Z };
do_blocking_move_to(stow_1, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE));
#endif #endif
#if defined(Z_PROBE_ALLEN_KEY_STOW_2_X) || defined(Z_PROBE_ALLEN_KEY_STOW_2_Y) || defined(Z_PROBE_ALLEN_KEY_STOW_2_Z) #if defined(Z_PROBE_ALLEN_KEY_STOW_2_X) || defined(Z_PROBE_ALLEN_KEY_STOW_2_Y) || defined(Z_PROBE_ALLEN_KEY_STOW_2_Z)
#ifndef Z_PROBE_ALLEN_KEY_STOW_2_X #ifndef Z_PROBE_ALLEN_KEY_STOW_2_X
@ -1907,7 +1918,8 @@ static void clean_up_after_endstop_or_probe_move() {
#ifndef Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE #ifndef Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE
#define Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE 0.0 #define Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE 0.0
#endif #endif
do_blocking_move_to(Z_PROBE_ALLEN_KEY_STOW_2_X, Z_PROBE_ALLEN_KEY_STOW_2_Y, Z_PROBE_ALLEN_KEY_STOW_2_Z, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE)); const float stow_2[] = { Z_PROBE_ALLEN_KEY_STOW_2_X, Z_PROBE_ALLEN_KEY_STOW_2_Y, Z_PROBE_ALLEN_KEY_STOW_2_Z };
do_blocking_move_to(stow_2, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE));
#endif #endif
#if defined(Z_PROBE_ALLEN_KEY_STOW_3_X) || defined(Z_PROBE_ALLEN_KEY_STOW_3_Y) || defined(Z_PROBE_ALLEN_KEY_STOW_3_Z) #if defined(Z_PROBE_ALLEN_KEY_STOW_3_X) || defined(Z_PROBE_ALLEN_KEY_STOW_3_Y) || defined(Z_PROBE_ALLEN_KEY_STOW_3_Z)
#ifndef Z_PROBE_ALLEN_KEY_STOW_3_X #ifndef Z_PROBE_ALLEN_KEY_STOW_3_X
@ -1922,7 +1934,8 @@ static void clean_up_after_endstop_or_probe_move() {
#ifndef Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE #ifndef Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE
#define Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE 0.0 #define Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE 0.0
#endif #endif
do_blocking_move_to(Z_PROBE_ALLEN_KEY_STOW_3_X, Z_PROBE_ALLEN_KEY_STOW_3_Y, Z_PROBE_ALLEN_KEY_STOW_3_Z, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE)); const float stow_3[] = { Z_PROBE_ALLEN_KEY_STOW_3_X, Z_PROBE_ALLEN_KEY_STOW_3_Y, Z_PROBE_ALLEN_KEY_STOW_3_Z };
do_blocking_move_to(stow_3, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE));
#endif #endif
#if defined(Z_PROBE_ALLEN_KEY_STOW_4_X) || defined(Z_PROBE_ALLEN_KEY_STOW_4_Y) || defined(Z_PROBE_ALLEN_KEY_STOW_4_Z) #if defined(Z_PROBE_ALLEN_KEY_STOW_4_X) || defined(Z_PROBE_ALLEN_KEY_STOW_4_Y) || defined(Z_PROBE_ALLEN_KEY_STOW_4_Z)
#ifndef Z_PROBE_ALLEN_KEY_STOW_4_X #ifndef Z_PROBE_ALLEN_KEY_STOW_4_X
@ -1937,7 +1950,8 @@ static void clean_up_after_endstop_or_probe_move() {
#ifndef Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE #ifndef Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE
#define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE 0.0 #define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE 0.0
#endif #endif
do_blocking_move_to(Z_PROBE_ALLEN_KEY_STOW_4_X, Z_PROBE_ALLEN_KEY_STOW_4_Y, Z_PROBE_ALLEN_KEY_STOW_4_Z, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE)); const float stow_4[] = { Z_PROBE_ALLEN_KEY_STOW_4_X, Z_PROBE_ALLEN_KEY_STOW_4_Y, Z_PROBE_ALLEN_KEY_STOW_4_Z };
do_blocking_move_to(stow_4, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE));
#endif #endif
#if defined(Z_PROBE_ALLEN_KEY_STOW_5_X) || defined(Z_PROBE_ALLEN_KEY_STOW_5_Y) || defined(Z_PROBE_ALLEN_KEY_STOW_5_Z) #if defined(Z_PROBE_ALLEN_KEY_STOW_5_X) || defined(Z_PROBE_ALLEN_KEY_STOW_5_Y) || defined(Z_PROBE_ALLEN_KEY_STOW_5_Z)
#ifndef Z_PROBE_ALLEN_KEY_STOW_5_X #ifndef Z_PROBE_ALLEN_KEY_STOW_5_X
@ -1952,7 +1966,8 @@ static void clean_up_after_endstop_or_probe_move() {
#ifndef Z_PROBE_ALLEN_KEY_STOW_5_FEEDRATE #ifndef Z_PROBE_ALLEN_KEY_STOW_5_FEEDRATE
#define Z_PROBE_ALLEN_KEY_STOW_5_FEEDRATE 0.0 #define Z_PROBE_ALLEN_KEY_STOW_5_FEEDRATE 0.0
#endif #endif
do_blocking_move_to(Z_PROBE_ALLEN_KEY_STOW_5_X, Z_PROBE_ALLEN_KEY_STOW_5_Y, Z_PROBE_ALLEN_KEY_STOW_5_Z, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_STOW_5_FEEDRATE)); const float stow_5[] = { Z_PROBE_ALLEN_KEY_STOW_5_X, Z_PROBE_ALLEN_KEY_STOW_5_Y, Z_PROBE_ALLEN_KEY_STOW_5_Z };
do_blocking_move_to(stow_5, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_STOW_5_FEEDRATE));
#endif #endif
} }
@ -2751,7 +2766,7 @@ static void clean_up_after_endstop_or_probe_move() {
/** /**
* Home an individual linear axis * Home an individual linear axis
*/ */
static void do_homing_move(const AxisEnum axis, float distance, float fr_mm_s=0.0) { static void do_homing_move(const AxisEnum axis, const float distance, const float fr_mm_s=0.0) {
#if ENABLED(DEBUG_LEVELING_FEATURE) #if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) { if (DEBUGGING(LEVELING)) {
@ -2779,11 +2794,11 @@ static void do_homing_move(const AxisEnum axis, float distance, float fr_mm_s=0.
SYNC_PLAN_POSITION_KINEMATIC(); SYNC_PLAN_POSITION_KINEMATIC();
current_position[axis] = distance; current_position[axis] = distance;
inverse_kinematics(current_position); inverse_kinematics(current_position);
planner.buffer_line(delta[A_AXIS], delta[B_AXIS], delta[C_AXIS], current_position[E_AXIS], fr_mm_s ? fr_mm_s : homing_feedrate_mm_s[axis], active_extruder); planner.buffer_line(delta[A_AXIS], delta[B_AXIS], delta[C_AXIS], current_position[E_AXIS], fr_mm_s ? fr_mm_s : homing_feedrate(axis), active_extruder);
#else #else
sync_plan_position(); sync_plan_position();
current_position[axis] = distance; current_position[axis] = distance;
planner.buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], fr_mm_s ? fr_mm_s : homing_feedrate_mm_s[axis], active_extruder); planner.buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], fr_mm_s ? fr_mm_s : homing_feedrate(axis), active_extruder);
#endif #endif
stepper.synchronize(); stepper.synchronize();
@ -3398,7 +3413,7 @@ inline void gcode_G4() {
const float mlx = max_length(X_AXIS), const float mlx = max_length(X_AXIS),
mly = max_length(Y_AXIS), mly = max_length(Y_AXIS),
mlratio = mlx > mly ? mly / mlx : mlx / mly, mlratio = mlx > mly ? mly / mlx : mlx / mly,
fr_mm_s = min(homing_feedrate_mm_s[X_AXIS], homing_feedrate_mm_s[Y_AXIS]) * sqrt(sq(mlratio) + 1.0); fr_mm_s = min(homing_feedrate(X_AXIS), homing_feedrate(Y_AXIS)) * sqrt(sq(mlratio) + 1.0);
do_blocking_move_to_xy(1.5 * mlx * x_axis_home_dir, 1.5 * mly * home_dir(Y_AXIS), fr_mm_s); do_blocking_move_to_xy(1.5 * mlx * x_axis_home_dir, 1.5 * mly * home_dir(Y_AXIS), fr_mm_s);
endstops.hit_on_purpose(); // clear endstop hit flags endstops.hit_on_purpose(); // clear endstop hit flags
@ -3541,7 +3556,7 @@ inline void gcode_G4() {
// Move all carriages together linearly until an endstop is hit. // Move all carriages together linearly until an endstop is hit.
current_position[X_AXIS] = current_position[Y_AXIS] = current_position[Z_AXIS] = (Z_MAX_LENGTH + 10); current_position[X_AXIS] = current_position[Y_AXIS] = current_position[Z_AXIS] = (Z_MAX_LENGTH + 10);
feedrate_mm_s = homing_feedrate_mm_s[X_AXIS]; feedrate_mm_s = homing_feedrate(X_AXIS);
line_to_current_position(); line_to_current_position();
stepper.synchronize(); stepper.synchronize();
endstops.hit_on_purpose(); // clear endstop hit flags endstops.hit_on_purpose(); // clear endstop hit flags
@ -3854,7 +3869,7 @@ void home_all_axes() { gcode_G28(true); }
const float old_feedrate_mm_s = feedrate_mm_s; const float old_feedrate_mm_s = feedrate_mm_s;
#if MANUAL_PROBE_HEIGHT > 0 #if MANUAL_PROBE_HEIGHT > 0
feedrate_mm_s = homing_feedrate_mm_s[Z_AXIS]; feedrate_mm_s = homing_feedrate(Z_AXIS);
current_position[Z_AXIS] = LOGICAL_Z_POSITION(Z_MIN_POS) + MANUAL_PROBE_HEIGHT; current_position[Z_AXIS] = LOGICAL_Z_POSITION(Z_MIN_POS) + MANUAL_PROBE_HEIGHT;
line_to_current_position(); line_to_current_position();
#endif #endif
@ -3865,7 +3880,7 @@ void home_all_axes() { gcode_G28(true); }
line_to_current_position(); line_to_current_position();
#if MANUAL_PROBE_HEIGHT > 0 #if MANUAL_PROBE_HEIGHT > 0
feedrate_mm_s = homing_feedrate_mm_s[Z_AXIS]; feedrate_mm_s = homing_feedrate(Z_AXIS);
current_position[Z_AXIS] = LOGICAL_Z_POSITION(Z_MIN_POS); // just slightly over the bed current_position[Z_AXIS] = LOGICAL_Z_POSITION(Z_MIN_POS); // just slightly over the bed
line_to_current_position(); line_to_current_position();
#endif #endif
@ -3901,7 +3916,7 @@ void home_all_axes() { gcode_G28(true); }
#if ENABLED(MESH_G28_REST_ORIGIN) #if ENABLED(MESH_G28_REST_ORIGIN)
current_position[Z_AXIS] = LOGICAL_Z_POSITION(Z_MIN_POS); current_position[Z_AXIS] = LOGICAL_Z_POSITION(Z_MIN_POS);
set_destination_to_current(); set_destination_to_current();
line_to_destination(homing_feedrate_mm_s[Z_AXIS]); line_to_destination(homing_feedrate(Z_AXIS));
stepper.synchronize(); stepper.synchronize();
#endif #endif
} }
@ -4907,7 +4922,7 @@ void home_all_axes() { gcode_G28(true); }
if ( NEAR(current_position[X_AXIS], xProbe - (X_PROBE_OFFSET_FROM_EXTRUDER)) if ( NEAR(current_position[X_AXIS], xProbe - (X_PROBE_OFFSET_FROM_EXTRUDER))
&& NEAR(current_position[Y_AXIS], yProbe - (Y_PROBE_OFFSET_FROM_EXTRUDER)) && NEAR(current_position[Y_AXIS], yProbe - (Y_PROBE_OFFSET_FROM_EXTRUDER))
) { ) {
float simple_z = current_position[Z_AXIS] - measured_z; const float simple_z = current_position[Z_AXIS] - measured_z;
#if ENABLED(DEBUG_LEVELING_FEATURE) #if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) { if (DEBUGGING(LEVELING)) {
SERIAL_ECHOPAIR("Z from Probe:", simple_z); SERIAL_ECHOPAIR("Z from Probe:", simple_z);
@ -5503,7 +5518,7 @@ void home_all_axes() { gcode_G28(true); }
// If any axis has enough movement, do the move // If any axis has enough movement, do the move
LOOP_XYZ(i) LOOP_XYZ(i)
if (fabs(destination[i] - current_position[i]) >= G38_MINIMUM_MOVE) { if (fabs(destination[i] - current_position[i]) >= G38_MINIMUM_MOVE) {
if (!parser.seen('F')) feedrate_mm_s = homing_feedrate_mm_s[i]; if (!parser.seen('F')) feedrate_mm_s = homing_feedrate(i);
// If G38.2 fails throw an error // If G38.2 fails throw an error
if (!G38_run_probe() && is_38_2) { if (!G38_run_probe() && is_38_2) {
SERIAL_ERROR_START; SERIAL_ERROR_START;
@ -6271,10 +6286,10 @@ inline void gcode_M31() {
/** /**
* Sensitive pin test for M42, M226 * Sensitive pin test for M42, M226
*/ */
static bool pin_is_protected(uint8_t pin) { static bool pin_is_protected(const int8_t pin) {
static const int sensitive_pins[] = SENSITIVE_PINS; static const int8_t sensitive_pins[] PROGMEM = SENSITIVE_PINS;
for (uint8_t i = 0; i < COUNT(sensitive_pins); i++) for (uint8_t i = 0; i < COUNT(sensitive_pins); i++)
if (sensitive_pins[i] == pin) return true; if (pin == (int8_t)pgm_read_byte(&sensitive_pins[i])) return true;
return false; return false;
} }
@ -7667,45 +7682,32 @@ void report_current_position() {
#ifdef M114_DETAIL #ifdef M114_DETAIL
static const char axis_char[XYZE] = {'X','Y','Z','E'}; void report_xyze(const float pos[XYZE], const uint8_t n = 4, const uint8_t precision = 3) {
void report_xyze(const float pos[XYZE], uint8_t n = 4, uint8_t precision = 3) {
char str[12]; char str[12];
for (uint8_t i = 0; i < n; i++) { for (uint8_t i = 0; i < n; i++) {
SERIAL_CHAR(' '); SERIAL_CHAR(' ');
SERIAL_CHAR(axis_char[i]); SERIAL_CHAR(axis_codes[i]);
SERIAL_CHAR(':'); SERIAL_CHAR(':');
SERIAL_PROTOCOL(dtostrf(pos[i], 8, precision, str)); SERIAL_PROTOCOL(dtostrf(pos[i], 8, precision, str));
} }
SERIAL_EOL; SERIAL_EOL;
} }
inline void report_xyz(const float pos[XYZ]) { inline void report_xyz(const float pos[XYZ]) { report_xyze(pos, 3); }
report_xyze(pos,3);
}
void report_current_position_detail() { void report_current_position_detail() {
stepper.synchronize(); stepper.synchronize();
SERIAL_EOL; SERIAL_PROTOCOLPGM("\nLogical:");
SERIAL_PROTOCOLPGM("Logical:");
report_xyze(current_position); report_xyze(current_position);
SERIAL_PROTOCOLPGM("Raw: "); SERIAL_PROTOCOLPGM("Raw: ");
const float raw[XYZ] = { const float raw[XYZ] = { RAW_X_POSITION(current_position[X_AXIS]), RAW_Y_POSITION(current_position[Y_AXIS]), RAW_Z_POSITION(current_position[Z_AXIS]) };
RAW_X_POSITION(current_position[X_AXIS]),
RAW_Y_POSITION(current_position[Y_AXIS]),
RAW_Z_POSITION(current_position[Z_AXIS])
};
report_xyz(raw); report_xyz(raw);
SERIAL_PROTOCOLPGM("Leveled:"); SERIAL_PROTOCOLPGM("Leveled:");
float leveled[XYZ] = { float leveled[XYZ] = { current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS] };
current_position[X_AXIS],
current_position[Y_AXIS],
current_position[Z_AXIS]
};
planner.apply_leveling(leveled); planner.apply_leveling(leveled);
report_xyz(leveled); report_xyz(leveled);
@ -7725,12 +7727,7 @@ void report_current_position() {
#endif #endif
SERIAL_PROTOCOLPGM("Stepper:"); SERIAL_PROTOCOLPGM("Stepper:");
const float step_count[XYZE] = { const float step_count[XYZE] = { stepper.position(X_AXIS), stepper.position(Y_AXIS), stepper.position(Z_AXIS), stepper.position(E_AXIS) };
(float)stepper.position(X_AXIS),
(float)stepper.position(Y_AXIS),
(float)stepper.position(Z_AXIS),
(float)stepper.position(E_AXIS)
};
report_xyze(step_count, 4, 0); report_xyze(step_count, 4, 0);
#if IS_SCARA #if IS_SCARA
@ -7744,12 +7741,7 @@ void report_current_position() {
SERIAL_PROTOCOLPGM("FromStp:"); SERIAL_PROTOCOLPGM("FromStp:");
get_cartesian_from_steppers(); // writes cartes[XYZ] (with forward kinematics) get_cartesian_from_steppers(); // writes cartes[XYZ] (with forward kinematics)
const float from_steppers[XYZE] = { const float from_steppers[XYZE] = { cartes[X_AXIS], cartes[Y_AXIS], cartes[Z_AXIS], stepper.get_axis_position_mm(E_AXIS) };
cartes[X_AXIS],
cartes[Y_AXIS],
cartes[Z_AXIS],
stepper.get_axis_position_mm(E_AXIS)
};
report_xyze(from_steppers); report_xyze(from_steppers);
const float diff[XYZE] = { const float diff[XYZE] = {
@ -7764,7 +7756,7 @@ void report_current_position() {
#endif // M114_DETAIL #endif // M114_DETAIL
/** /**
* M114: Output current position to serial port * M114: Report current position to host
*/ */
inline void gcode_M114() { inline void gcode_M114() {
@ -7859,9 +7851,7 @@ inline void gcode_M115() {
/** /**
* M117: Set LCD Status Message * M117: Set LCD Status Message
*/ */
inline void gcode_M117() { inline void gcode_M117() { lcd_setstatus(parser.string_arg); }
lcd_setstatus(parser.string_arg);
}
/** /**
* M119: Output endstop states to serial output * M119: Output endstop states to serial output
@ -8890,8 +8880,11 @@ void quickstop_stepper() {
inline void gcode_M420() { inline void gcode_M420() {
#if ENABLED(AUTO_BED_LEVELING_UBL) #if ENABLED(AUTO_BED_LEVELING_UBL)
// L to load a mesh from the EEPROM // L to load a mesh from the EEPROM
if (parser.seen('L')) { if (parser.seen('L')) {
#if ENABLED(EEPROM_SETTINGS)
const int8_t storage_slot = parser.has_value() ? parser.value_int() : ubl.state.storage_slot; const int8_t storage_slot = parser.has_value() ? parser.value_int() : ubl.state.storage_slot;
const int16_t a = settings.calc_num_meshes(); const int16_t a = settings.calc_num_meshes();
@ -8908,7 +8901,22 @@ void quickstop_stepper() {
settings.load_mesh(storage_slot); settings.load_mesh(storage_slot);
ubl.state.storage_slot = storage_slot; ubl.state.storage_slot = storage_slot;
#else
SERIAL_PROTOCOLLNPGM("?EEPROM storage not available.");
return;
#endif
} }
// L to load a mesh from the EEPROM
if (parser.seen('L') || parser.seen('V')) {
ubl.display_map(0); // Currently only supports one map type
SERIAL_ECHOLNPAIR("UBL_MESH_VALID = ", UBL_MESH_VALID);
SERIAL_ECHOLNPAIR("ubl.state.storage_slot = ", ubl.state.storage_slot);
}
#endif // AUTO_BED_LEVELING_UBL #endif // AUTO_BED_LEVELING_UBL
// V to print the matrix or mesh // V to print the matrix or mesh
@ -8930,15 +8938,6 @@ void quickstop_stepper() {
#endif #endif
} }
#if ENABLED(AUTO_BED_LEVELING_UBL)
// L to load a mesh from the EEPROM
if (parser.seen('L') || parser.seen('V')) {
ubl.display_map(0); // Currently only supports one map type
SERIAL_ECHOLNPAIR("UBL_MESH_VALID = ", UBL_MESH_VALID);
SERIAL_ECHOLNPAIR("ubl.state.storage_slot = ", ubl.state.storage_slot);
}
#endif
bool to_enable = false; bool to_enable = false;
if (parser.seen('S')) { if (parser.seen('S')) {
to_enable = parser.value_bool(); to_enable = parser.value_bool();

@ -270,23 +270,6 @@
#endif #endif
#endif #endif
/**
* Delta requirements
*/
#if ENABLED(DELTA)
#if DISABLED(USE_XMAX_PLUG) && DISABLED(USE_YMAX_PLUG) && DISABLED(USE_ZMAX_PLUG)
#error "You probably want to use Max Endstops for DELTA!"
#elif ENABLED(ENABLE_LEVELING_FADE_HEIGHT) && DISABLED(AUTO_BED_LEVELING_BILINEAR) && !UBL_DELTA
#error "ENABLE_LEVELING_FADE_HEIGHT on DELTA requires AUTO_BED_LEVELING_BILINEAR or AUTO_BED_LEVELING_UBL."
#elif ABL_GRID
#if (GRID_MAX_POINTS_X & 1) == 0 || (GRID_MAX_POINTS_Y & 1) == 0
#error "DELTA requires GRID_MAX_POINTS_X and GRID_MAX_POINTS_Y to be odd numbers."
#elif GRID_MAX_POINTS_X < 3
#error "DELTA requires GRID_MAX_POINTS_X and GRID_MAX_POINTS_Y to be 3 or higher."
#endif
#endif
#endif
/** /**
* Babystepping * Babystepping
*/ */
@ -430,44 +413,57 @@
#endif #endif
/** /**
* Allow only one bed leveling option to be defined * Kinematics
*/
/**
* Allow only one kinematic type to be defined
*/ */
static_assert(1 >= 0 static_assert(1 >= 0
#if ENABLED(AUTO_BED_LEVELING_LINEAR) #if ENABLED(DELTA)
+ 1 + 1
#endif #endif
#if ENABLED(AUTO_BED_LEVELING_3POINT) #if ENABLED(MORGAN_SCARA)
+ 1 + 1
#endif #endif
#if ENABLED(AUTO_BED_LEVELING_BILINEAR) #if ENABLED(MAKERARM_SCARA)
+ 1 + 1
#endif #endif
#if ENABLED(AUTO_BED_LEVELING_UBL) #if ENABLED(COREXY)
+ 1 + 1
#endif #endif
#if ENABLED(MESH_BED_LEVELING) #if ENABLED(COREXZ)
+ 1 + 1
#endif #endif
, "Select only one of: MESH_BED_LEVELING, AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_BILINEAR or AUTO_BED_LEVELING_UBL." #if ENABLED(COREYZ)
+ 1
#endif
#if ENABLED(COREYX)
+ 1
#endif
#if ENABLED(COREZX)
+ 1
#endif
#if ENABLED(COREZY)
+ 1
#endif
, "Please enable only one of DELTA, MORGAN_SCARA, MAKERARM_SCARA, COREXY, COREYX, COREXZ, COREZX, COREYZ, or COREZY."
); );
/** /**
* Mesh Bed Leveling * Delta requirements
*/ */
#if ENABLED(MESH_BED_LEVELING)
#if ENABLED(DELTA) #if ENABLED(DELTA)
#error "MESH_BED_LEVELING does not yet support DELTA printers." #if DISABLED(USE_XMAX_PLUG) && DISABLED(USE_YMAX_PLUG) && DISABLED(USE_ZMAX_PLUG)
#elif GRID_MAX_POINTS_X > 9 || GRID_MAX_POINTS_Y > 9 #error "You probably want to use Max Endstops for DELTA!"
#error "GRID_MAX_POINTS_X and GRID_MAX_POINTS_Y must be less than 10 for MBL." #elif ENABLED(ENABLE_LEVELING_FADE_HEIGHT) && DISABLED(AUTO_BED_LEVELING_BILINEAR) && !UBL_DELTA
#endif #error "ENABLE_LEVELING_FADE_HEIGHT on DELTA requires AUTO_BED_LEVELING_BILINEAR or AUTO_BED_LEVELING_UBL."
#elif ABL_GRID
#if (GRID_MAX_POINTS_X & 1) == 0 || (GRID_MAX_POINTS_Y & 1) == 0
#error "DELTA requires GRID_MAX_POINTS_X and GRID_MAX_POINTS_Y to be odd numbers."
#elif GRID_MAX_POINTS_X < 3
#error "DELTA requires GRID_MAX_POINTS_X and GRID_MAX_POINTS_Y to be 3 or higher."
#endif #endif
/**
* Unified Bed Leveling
*/
#if ENABLED(AUTO_BED_LEVELING_UBL)
#if IS_SCARA
#error "AUTO_BED_LEVELING_UBL does not yet support SCARA printers."
#endif #endif
#endif #endif
@ -503,7 +499,6 @@ static_assert(1 >= 0
, "Please enable only one probe option: PROBE_MANUALLY, FIX_MOUNTED_PROBE, BLTOUCH, SOLENOID_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or Z Servo." , "Please enable only one probe option: PROBE_MANUALLY, FIX_MOUNTED_PROBE, BLTOUCH, SOLENOID_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or Z Servo."
); );
#if PROBE_SELECTED #if PROBE_SELECTED
/** /**
@ -594,46 +589,57 @@ static_assert(1 >= 0
#endif #endif
/** /**
* LCD_BED_LEVELING requirements * Allow only one bed leveling option to be defined
*/ */
#if ENABLED(LCD_BED_LEVELING) static_assert(1 >= 0
#if DISABLED(ULTIPANEL) #if ENABLED(AUTO_BED_LEVELING_LINEAR)
#error "LCD_BED_LEVELING requires an LCD controller." + 1
#elif DISABLED(MESH_BED_LEVELING) && !(HAS_ABL && ENABLED(PROBE_MANUALLY)) #endif
#error "LCD_BED_LEVELING requires MESH_BED_LEVELING or PROBE_MANUALLY." #if ENABLED(AUTO_BED_LEVELING_3POINT)
+ 1
#endif #endif
#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
+ 1
#endif
#if ENABLED(AUTO_BED_LEVELING_UBL)
+ 1
#endif #endif
#if ENABLED(MESH_BED_LEVELING)
+ 1
#endif
, "Select only one of: MESH_BED_LEVELING, AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_BILINEAR or AUTO_BED_LEVELING_UBL."
);
/** /**
* Homing Bump * Bed Leveling Requirements
*/ */
#if X_HOME_BUMP_MM < 0 || Y_HOME_BUMP_MM < 0 || Z_HOME_BUMP_MM < 0
#error "[XYZ]_HOME_BUMP_MM must be greater than or equal to 0." #if ENABLED(AUTO_BED_LEVELING_UBL)
#endif
/** /**
* Make sure Z_SAFE_HOMING point is reachable * Unified Bed Leveling
*/ */
#if ENABLED(Z_SAFE_HOMING)
#if !WITHIN(Z_SAFE_HOMING_X_POINT, MIN_PROBE_X, MAX_PROBE_X) #if IS_SCARA
#if HAS_BED_PROBE #error "AUTO_BED_LEVELING_UBL does not yet support SCARA printers."
#error "Z_SAFE_HOMING_X_POINT can't be reached by the Z probe." #elif DISABLED(EEPROM_SETTINGS)
#else #error "AUTO_BED_LEVELING_UBL requires EEPROM_SETTINGS. Please update your configuration."
#error "Z_SAFE_HOMING_X_POINT can't be reached by the nozzle." #elif !WITHIN(GRID_MAX_POINTS_X, 3, 15) || !WITHIN(GRID_MAX_POINTS_Y, 3, 15)
#endif #error "GRID_MAX_POINTS_[XY] must be a whole number between 3 and 15."
#elif !WITHIN(Z_SAFE_HOMING_Y_POINT, MIN_PROBE_Y, MAX_PROBE_Y)
#if HAS_BED_PROBE
#error "Z_SAFE_HOMING_Y_POINT can't be reached by the Z probe."
#else #else
#error "Z_SAFE_HOMING_Y_POINT can't be reached by the nozzle." static_assert(WITHIN(UBL_PROBE_PT_1_X, MIN_PROBE_X, MAX_PROBE_X), "UBL_PROBE_PT_1_X can't be reached by the Z probe.");
static_assert(WITHIN(UBL_PROBE_PT_2_X, MIN_PROBE_X, MAX_PROBE_X), "UBL_PROBE_PT_2_X can't be reached by the Z probe.");
static_assert(WITHIN(UBL_PROBE_PT_3_X, MIN_PROBE_X, MAX_PROBE_X), "UBL_PROBE_PT_3_X can't be reached by the Z probe.");
static_assert(WITHIN(UBL_PROBE_PT_1_Y, MIN_PROBE_Y, MAX_PROBE_Y), "UBL_PROBE_PT_1_Y can't be reached by the Z probe.");
static_assert(WITHIN(UBL_PROBE_PT_2_Y, MIN_PROBE_Y, MAX_PROBE_Y), "UBL_PROBE_PT_2_Y can't be reached by the Z probe.");
static_assert(WITHIN(UBL_PROBE_PT_3_Y, MIN_PROBE_Y, MAX_PROBE_Y), "UBL_PROBE_PT_3_Y can't be reached by the Z probe.");
#endif #endif
#endif
#endif // Z_SAFE_HOMING #elif HAS_ABL
/** /**
* Auto Bed Leveling * Auto Bed Leveling
*/ */
#if HAS_ABL
#if ENABLED(USE_RAW_KINEMATICS) #if ENABLED(USE_RAW_KINEMATICS)
#error "USE_RAW_KINEMATICS is not compatible with AUTO_BED_LEVELING" #error "USE_RAW_KINEMATICS is not compatible with AUTO_BED_LEVELING"
@ -647,65 +653,85 @@ static_assert(1 >= 0
#endif #endif
/** /**
* Check auto bed leveling sub-options, especially probe points * Check auto bed leveling probe points
*/ */
#if ABL_GRID #if ABL_GRID
#ifndef DELTA_PROBEABLE_RADIUS
#if LEFT_PROBE_BED_POSITION > RIGHT_PROBE_BED_POSITION #ifdef DELTA_PROBEABLE_RADIUS
#error "LEFT_PROBE_BED_POSITION must be less than RIGHT_PROBE_BED_POSITION." static_assert(LEFT_PROBE_BED_POSITION >= -DELTA_PROBEABLE_RADIUS, "LEFT_PROBE_BED_POSITION must be within DELTA_PROBEABLE_RADIUS.");
#elif FRONT_PROBE_BED_POSITION > BACK_PROBE_BED_POSITION static_assert(RIGHT_PROBE_BED_POSITION <= DELTA_PROBEABLE_RADIUS, "RIGHT_PROBE_BED_POSITION must be within DELTA_PROBEABLE_RADIUS.");
#error "FRONT_PROBE_BED_POSITION must be less than BACK_PROBE_BED_POSITION." static_assert(FRONT_PROBE_BED_POSITION >= -DELTA_PROBEABLE_RADIUS, "FRONT_PROBE_BED_POSITION must be within DELTA_PROBEABLE_RADIUS.");
#endif static_assert(BACK_PROBE_BED_POSITION <= DELTA_PROBEABLE_RADIUS, "BACK_PROBE_BED_POSITION must be within DELTA_PROBEABLE_RADIUS.");
#if LEFT_PROBE_BED_POSITION < MIN_PROBE_X #else
#error "The given LEFT_PROBE_BED_POSITION can't be reached by the Z probe." static_assert(LEFT_PROBE_BED_POSITION < RIGHT_PROBE_BED_POSITION, "LEFT_PROBE_BED_POSITION must be less than RIGHT_PROBE_BED_POSITION.");
#elif RIGHT_PROBE_BED_POSITION > MAX_PROBE_X static_assert(FRONT_PROBE_BED_POSITION < BACK_PROBE_BED_POSITION, "FRONT_PROBE_BED_POSITION must be less than BACK_PROBE_BED_POSITION.");
#error "The given RIGHT_PROBE_BED_POSITION can't be reached by the Z probe." static_assert(LEFT_PROBE_BED_POSITION >= MIN_PROBE_X, "LEFT_PROBE_BED_POSITION can't be reached by the Z probe.");
#elif FRONT_PROBE_BED_POSITION < MIN_PROBE_Y static_assert(RIGHT_PROBE_BED_POSITION <= MAX_PROBE_X, "RIGHT_PROBE_BED_POSITION can't be reached by the Z probe.");
#error "The given FRONT_PROBE_BED_POSITION can't be reached by the Z probe." static_assert(FRONT_PROBE_BED_POSITION >= MIN_PROBE_Y, "FRONT_PROBE_BED_POSITION can't be reached by the Z probe.");
#elif BACK_PROBE_BED_POSITION > MAX_PROBE_Y static_assert(BACK_PROBE_BED_POSITION <= MAX_PROBE_Y, "BACK_PROBE_BED_POSITION can't be reached by the Z probe.");
#error "The given BACK_PROBE_BED_POSITION can't be reached by the Z probe."
#endif
#endif
#elif ENABLED(AUTO_BED_LEVELING_UBL)
#if DISABLED(EEPROM_SETTINGS)
#error "AUTO_BED_LEVELING_UBL requires EEPROM_SETTINGS. Please update your configuration."
#elif !WITHIN(GRID_MAX_POINTS_X, 3, 15) || !WITHIN(GRID_MAX_POINTS_Y, 3, 15)
#error "GRID_MAX_POINTS_[XY] must be a whole number between 3 and 15."
#endif #endif
#if IS_CARTESIAN
#if !WITHIN(GRID_MAX_POINTS_X, 3, 15) || !WITHIN(GRID_MAX_POINTS_Y, 3, 15) #else // AUTO_BED_LEVELING_3POINT
#error "GRID_MAX_POINTS_[XY] must be a whole number between 3 and 15."
#elif !WITHIN(UBL_PROBE_PT_1_X, MIN_PROBE_X, MAX_PROBE_X) static_assert(WITHIN(ABL_PROBE_PT_1_X, MIN_PROBE_X, MAX_PROBE_X), "ABL_PROBE_PT_1_X can't be reached by the Z probe.");
#error "The given UBL_PROBE_PT_1_X can't be reached by the Z probe." static_assert(WITHIN(ABL_PROBE_PT_2_X, MIN_PROBE_X, MAX_PROBE_X), "ABL_PROBE_PT_2_X can't be reached by the Z probe.");
#elif !WITHIN(UBL_PROBE_PT_2_X, MIN_PROBE_X, MAX_PROBE_X) static_assert(WITHIN(ABL_PROBE_PT_3_X, MIN_PROBE_X, MAX_PROBE_X), "ABL_PROBE_PT_3_X can't be reached by the Z probe.");
#error "The given UBL_PROBE_PT_2_X can't be reached by the Z probe." static_assert(WITHIN(ABL_PROBE_PT_1_Y, MIN_PROBE_Y, MAX_PROBE_Y), "ABL_PROBE_PT_1_Y can't be reached by the Z probe.");
#elif !WITHIN(UBL_PROBE_PT_3_X, MIN_PROBE_X, MAX_PROBE_X) static_assert(WITHIN(ABL_PROBE_PT_2_Y, MIN_PROBE_Y, MAX_PROBE_Y), "ABL_PROBE_PT_2_Y can't be reached by the Z probe.");
#error "The given UBL_PROBE_PT_3_X can't be reached by the Z probe." static_assert(WITHIN(ABL_PROBE_PT_3_Y, MIN_PROBE_Y, MAX_PROBE_Y), "ABL_PROBE_PT_3_Y can't be reached by the Z probe.");
#elif !WITHIN(UBL_PROBE_PT_1_Y, MIN_PROBE_Y, MAX_PROBE_Y)
#error "The given UBL_PROBE_PT_1_Y can't be reached by the Z probe." #endif // AUTO_BED_LEVELING_3POINT
#elif !WITHIN(UBL_PROBE_PT_2_Y, MIN_PROBE_Y, MAX_PROBE_Y)
#error "The given UBL_PROBE_PT_2_Y can't be reached by the Z probe." #elif ENABLED(MESH_BED_LEVELING)
#elif !WITHIN(UBL_PROBE_PT_3_Y, MIN_PROBE_Y, MAX_PROBE_Y)
#error "The given UBL_PROBE_PT_3_Y can't be reached by the Z probe." /**
* Mesh Bed Leveling
*/
#if ENABLED(DELTA)
#error "MESH_BED_LEVELING does not yet support DELTA printers."
#elif GRID_MAX_POINTS_X > 9 || GRID_MAX_POINTS_Y > 9
#error "GRID_MAX_POINTS_X and GRID_MAX_POINTS_Y must be less than 10 for MBL."
#endif #endif
#endif #endif
#else // AUTO_BED_LEVELING_3POINT
#if !WITHIN(ABL_PROBE_PT_1_X, MIN_PROBE_X, MAX_PROBE_X) /**
#error "The given ABL_PROBE_PT_1_X can't be reached by the Z probe." * LCD_BED_LEVELING requirements
#elif !WITHIN(ABL_PROBE_PT_2_X, MIN_PROBE_X, MAX_PROBE_X) */
#error "The given ABL_PROBE_PT_2_X can't be reached by the Z probe." #if ENABLED(LCD_BED_LEVELING)
#elif !WITHIN(ABL_PROBE_PT_3_X, MIN_PROBE_X, MAX_PROBE_X) #if DISABLED(ULTIPANEL)
#error "The given ABL_PROBE_PT_3_X can't be reached by the Z probe." #error "LCD_BED_LEVELING requires an LCD controller."
#elif !WITHIN(ABL_PROBE_PT_1_Y, MIN_PROBE_Y, MAX_PROBE_Y) #elif DISABLED(MESH_BED_LEVELING) && !(HAS_ABL && ENABLED(PROBE_MANUALLY))
#error "The given ABL_PROBE_PT_1_Y can't be reached by the Z probe." #error "LCD_BED_LEVELING requires MESH_BED_LEVELING or PROBE_MANUALLY."
#elif !WITHIN(ABL_PROBE_PT_2_Y, MIN_PROBE_Y, MAX_PROBE_Y) #endif
#error "The given ABL_PROBE_PT_2_Y can't be reached by the Z probe." #endif
#elif !WITHIN(ABL_PROBE_PT_3_Y, MIN_PROBE_Y, MAX_PROBE_Y)
#error "The given ABL_PROBE_PT_3_Y can't be reached by the Z probe." /**
* Homing Bump
*/
#if X_HOME_BUMP_MM < 0 || Y_HOME_BUMP_MM < 0 || Z_HOME_BUMP_MM < 0
#error "[XYZ]_HOME_BUMP_MM must be greater than or equal to 0."
#endif #endif
#endif // AUTO_BED_LEVELING_3POINT
#endif // HAS_ABL /**
* Make sure Z_SAFE_HOMING point is reachable
*/
#if ENABLED(Z_SAFE_HOMING)
#if !WITHIN(Z_SAFE_HOMING_X_POINT, MIN_PROBE_X, MAX_PROBE_X)
#if HAS_BED_PROBE
#error "Z_SAFE_HOMING_X_POINT can't be reached by the Z probe."
#else
#error "Z_SAFE_HOMING_X_POINT can't be reached by the nozzle."
#endif
#elif !WITHIN(Z_SAFE_HOMING_Y_POINT, MIN_PROBE_Y, MAX_PROBE_Y)
#if HAS_BED_PROBE
#error "Z_SAFE_HOMING_Y_POINT can't be reached by the Z probe."
#else
#error "Z_SAFE_HOMING_Y_POINT can't be reached by the nozzle."
#endif
#endif
#endif // Z_SAFE_HOMING
/** /**
* Advance Extrusion * Advance Extrusion
@ -739,40 +765,6 @@ static_assert(1 >= 0
#error "Only enable one SAV_3DGLCD display type: U8GLIB_SSD1306 or U8GLIB_SH1106." #error "Only enable one SAV_3DGLCD display type: U8GLIB_SSD1306 or U8GLIB_SH1106."
#endif #endif
/**
* Don't set more than one kinematic type
*/
static_assert(1 >= 0
#if ENABLED(DELTA)
+ 1
#endif
#if ENABLED(MORGAN_SCARA)
+ 1
#endif
#if ENABLED(MAKERARM_SCARA)
+ 1
#endif
#if ENABLED(COREXY)
+ 1
#endif
#if ENABLED(COREXZ)
+ 1
#endif
#if ENABLED(COREYZ)
+ 1
#endif
#if ENABLED(COREYX)
+ 1
#endif
#if ENABLED(COREZX)
+ 1
#endif
#if ENABLED(COREZY)
+ 1
#endif
, "Please enable only one of DELTA, MORGAN_SCARA, MAKERARM_SCARA, COREXY, COREYX, COREXZ, COREZX, COREYZ, or COREZY."
);
/** /**
* Allen Key * Allen Key
* Deploying the Allen Key probe uses big moves in z direction. Too dangerous for an unhomed z-axis. * Deploying the Allen Key probe uses big moves in z direction. Too dangerous for an unhomed z-axis.
@ -1147,8 +1139,30 @@ static_assert(1 >= 0
, "Please select no more than one LCD controller option." , "Please select no more than one LCD controller option."
); );
#if ENABLED(HAVE_TMC2130) && !( \ /**
ENABLED( X_IS_TMC2130 ) \ * Make sure HAVE_TMCDRIVER is warranted
*/
#if ENABLED(HAVE_TMCDRIVER) && !( \
ENABLED( X_IS_TMC ) \
|| ENABLED( X2_IS_TMC ) \
|| ENABLED( Y_IS_TMC ) \
|| ENABLED( Y2_IS_TMC ) \
|| ENABLED( Z_IS_TMC ) \
|| ENABLED( Z2_IS_TMC ) \
|| ENABLED( E0_IS_TMC ) \
|| ENABLED( E1_IS_TMC ) \
|| ENABLED( E2_IS_TMC ) \
|| ENABLED( E3_IS_TMC ) \
|| ENABLED( E4_IS_TMC ) \
)
#error "HAVE_TMCDRIVER requires at least one TMC stepper to be set."
#endif
/**
* Make sure HAVE_TMC2130 is warranted
*/
#if ENABLED(HAVE_TMC2130)
#if !( ENABLED( X_IS_TMC2130 ) \
|| ENABLED( X2_IS_TMC2130 ) \ || ENABLED( X2_IS_TMC2130 ) \
|| ENABLED( Y_IS_TMC2130 ) \ || ENABLED( Y_IS_TMC2130 ) \
|| ENABLED( Y2_IS_TMC2130 ) \ || ENABLED( Y2_IS_TMC2130 ) \
@ -1157,12 +1171,42 @@ static_assert(1 >= 0
|| ENABLED( E0_IS_TMC2130 ) \ || ENABLED( E0_IS_TMC2130 ) \
|| ENABLED( E1_IS_TMC2130 ) \ || ENABLED( E1_IS_TMC2130 ) \
|| ENABLED( E2_IS_TMC2130 ) \ || ENABLED( E2_IS_TMC2130 ) \
|| ENABLED( E3_IS_TMC2130 ) ) || ENABLED( E3_IS_TMC2130 ) \
#error "Choose at least one TMC2130 stepper." || ENABLED( E4_IS_TMC2130 ) \
)
#error "HAVE_TMC2130 requires at least one TMC2130 stepper to be set."
#elif ENABLED(HYBRID_THRESHOLD) && DISABLED(STEALTHCHOP)
#error "Enable STEALTHCHOP to use HYBRID_THRESHOLD."
#endif
#endif #endif
#if ENABLED(HYBRID_THRESHOLD) && DISABLED(STEALTHCHOP) /**
#error "Enable STEALTHCHOP to use HYBRID_THRESHOLD." * Make sure HAVE_L6470DRIVER is warranted
*/
#if ENABLED(HAVE_L6470DRIVER) && !( \
ENABLED( X_IS_L6470 ) \
|| ENABLED( X2_IS_L6470 ) \
|| ENABLED( Y_IS_L6470 ) \
|| ENABLED( Y2_IS_L6470 ) \
|| ENABLED( Z_IS_L6470 ) \
|| ENABLED( Z2_IS_L6470 ) \
|| ENABLED( E0_IS_L6470 ) \
|| ENABLED( E1_IS_L6470 ) \
|| ENABLED( E2_IS_L6470 ) \
|| ENABLED( E3_IS_L6470 ) \
|| ENABLED( E4_IS_L6470 ) \
)
#error "HAVE_L6470DRIVER requires at least one L6470 stepper to be set."
#endif
/**
* Digipot requirement
*/
#if ENABLED(DIGIPOT_MCP4018)
#if !defined(DIGIPOTS_I2C_SDA_X) || !defined(DIGIPOTS_I2C_SDA_Y) || !defined(DIGIPOTS_I2C_SDA_Z) \
|| !defined(DIGIPOTS_I2C_SDA_E0) || !defined(DIGIPOTS_I2C_SDA_E1)
#error "DIGIPOT_MCP4018 requires DIGIPOTS_I2C_SDA_* pins to be defined."
#endif
#endif #endif
/** /**

@ -104,7 +104,7 @@ class Buzzer {
* @param duration Duration of the tone in milliseconds * @param duration Duration of the tone in milliseconds
* @param frequency Frequency of the tone in hertz * @param frequency Frequency of the tone in hertz
*/ */
void tone(uint16_t const &duration, uint16_t const &frequency = 0) { void tone(const uint16_t &duration, const uint16_t &frequency = 0) {
while (buffer.isFull()) { while (buffer.isFull()) {
this->tick(); this->tick();
thermalManager.manage_heater(); thermalManager.manage_heater();

@ -457,10 +457,10 @@ void MarlinSettings::postprocess() {
#endif #endif
#if DISABLED(ULTIPANEL) #if DISABLED(ULTIPANEL)
const int lcd_preheat_hotend_temp[2] = { PREHEAT_1_TEMP_HOTEND, PREHEAT_2_TEMP_HOTEND }, constexpr int lcd_preheat_hotend_temp[2] = { PREHEAT_1_TEMP_HOTEND, PREHEAT_2_TEMP_HOTEND },
lcd_preheat_bed_temp[2] = { PREHEAT_1_TEMP_BED, PREHEAT_2_TEMP_BED }, lcd_preheat_bed_temp[2] = { PREHEAT_1_TEMP_BED, PREHEAT_2_TEMP_BED },
lcd_preheat_fan_speed[2] = { PREHEAT_1_FAN_SPEED, PREHEAT_2_FAN_SPEED }; lcd_preheat_fan_speed[2] = { PREHEAT_1_FAN_SPEED, PREHEAT_2_FAN_SPEED };
#endif // !ULTIPANEL #endif
EEPROM_WRITE(lcd_preheat_hotend_temp); EEPROM_WRITE(lcd_preheat_hotend_temp);
EEPROM_WRITE(lcd_preheat_bed_temp); EEPROM_WRITE(lcd_preheat_bed_temp);
@ -1125,12 +1125,12 @@ void MarlinSettings::postprocess() {
* M502 - Reset Configuration * M502 - Reset Configuration
*/ */
void MarlinSettings::reset() { void MarlinSettings::reset() {
const float tmp1[] = DEFAULT_AXIS_STEPS_PER_UNIT, tmp2[] = DEFAULT_MAX_FEEDRATE; static const float tmp1[] PROGMEM = DEFAULT_AXIS_STEPS_PER_UNIT, tmp2[] PROGMEM = DEFAULT_MAX_FEEDRATE;
const uint32_t tmp3[] = DEFAULT_MAX_ACCELERATION; static const uint32_t tmp3[] PROGMEM = DEFAULT_MAX_ACCELERATION;
LOOP_XYZE_N(i) { LOOP_XYZE_N(i) {
planner.axis_steps_per_mm[i] = tmp1[i < COUNT(tmp1) ? i : COUNT(tmp1) - 1]; planner.axis_steps_per_mm[i] = pgm_read_float(&tmp1[i < COUNT(tmp1) ? i : COUNT(tmp1) - 1]);
planner.max_feedrate_mm_s[i] = tmp2[i < COUNT(tmp2) ? i : COUNT(tmp2) - 1]; planner.max_feedrate_mm_s[i] = pgm_read_float(&tmp2[i < COUNT(tmp2) ? i : COUNT(tmp2) - 1]);
planner.max_acceleration_mm_per_s2[i] = tmp3[i < COUNT(tmp3) ? i : COUNT(tmp3) - 1]; planner.max_acceleration_mm_per_s2[i] = pgm_read_float(&tmp3[i < COUNT(tmp3) ? i : COUNT(tmp3) - 1]);
} }
planner.acceleration = DEFAULT_ACCELERATION; planner.acceleration = DEFAULT_ACCELERATION;
@ -1265,9 +1265,9 @@ void MarlinSettings::reset() {
endstops.enable_globally( endstops.enable_globally(
#if ENABLED(ENDSTOPS_ALWAYS_ON_DEFAULT) #if ENABLED(ENDSTOPS_ALWAYS_ON_DEFAULT)
(true) true
#else #else
(false) false
#endif #endif
); );

@ -24,6 +24,7 @@
#if ENABLED(DIGIPOT_I2C) && ENABLED(DIGIPOT_MCP4018) #if ENABLED(DIGIPOT_I2C) && ENABLED(DIGIPOT_MCP4018)
#include "enum.h"
#include "Stream.h" #include "Stream.h"
#include "utility/twi.h" #include "utility/twi.h"
#include <SlowSoftI2CMaster.h> //https://github.com/stawel/SlowSoftI2CMaster #include <SlowSoftI2CMaster.h> //https://github.com/stawel/SlowSoftI2CMaster
@ -38,31 +39,47 @@
#define DIGIPOT_A4988_Itripmax(Vref) ((Vref)/(8.0*DIGIPOT_A4988_Rsx)) #define DIGIPOT_A4988_Itripmax(Vref) ((Vref)/(8.0*DIGIPOT_A4988_Rsx))
#define DIGIPOT_A4988_FACTOR (DIGIPOT_A4988_MAX_VALUE/DIGIPOT_A4988_Itripmax(DIGIPOT_A4988_Vrefmax)) #define DIGIPOT_A4988_FACTOR ((DIGIPOT_A4988_MAX_VALUE)/DIGIPOT_A4988_Itripmax(DIGIPOT_A4988_Vrefmax))
//TODO: MAX_CURRENT -0.5A ?? (currently set to 2A, max possible current 2.5A) //TODO: MAX_CURRENT -0.5A ?? (currently set to 2A, max possible current 2.5A)
#define DIGIPOT_A4988_MAX_CURRENT (DIGIPOT_A4988_Itripmax(DIGIPOT_A4988_Vrefmax) - 0.5) #define DIGIPOT_A4988_MAX_CURRENT (DIGIPOT_A4988_Itripmax(DIGIPOT_A4988_Vrefmax) - 0.5)
static byte current_to_wiper(float current) { static byte current_to_wiper(const float current) {
return byte(ceil(float((DIGIPOT_A4988_FACTOR * current)))); return byte(ceil(float(DIGIPOT_A4988_FACTOR) * current));
} }
static uint8_t sda_pins[DIGIPOT_I2C_NUM_CHANNELS] = { const uint8_t sda_pins[DIGIPOT_I2C_NUM_CHANNELS] = {
DIGIPOTS_I2C_SDA_X, DIGIPOTS_I2C_SDA_X
DIGIPOTS_I2C_SDA_Y, #if DIGIPOT_I2C_NUM_CHANNELS > 1
DIGIPOTS_I2C_SDA_Z, , DIGIPOTS_I2C_SDA_Y
DIGIPOTS_I2C_SDA_E0, #if DIGIPOT_I2C_NUM_CHANNELS > 2
DIGIPOTS_I2C_SDA_E1, , DIGIPOTS_I2C_SDA_Z
#if DIGIPOT_I2C_NUM_CHANNELS > 3
, DIGIPOTS_I2C_SDA_E0
#if DIGIPOT_I2C_NUM_CHANNELS > 4
, DIGIPOTS_I2C_SDA_E1
#endif
#endif
#endif
#endif
}; };
static SlowSoftI2CMaster pots[DIGIPOT_I2C_NUM_CHANNELS] = { static SlowSoftI2CMaster pots[DIGIPOT_I2C_NUM_CHANNELS] = {
SlowSoftI2CMaster { sda_pins[0], DIGIPOTS_I2C_SCL }, SlowSoftI2CMaster { sda_pins[X_AXIS], DIGIPOTS_I2C_SCL }
SlowSoftI2CMaster { sda_pins[1], DIGIPOTS_I2C_SCL }, #if DIGIPOT_I2C_NUM_CHANNELS > 1
SlowSoftI2CMaster { sda_pins[2], DIGIPOTS_I2C_SCL }, , SlowSoftI2CMaster { sda_pins[Y_AXIS], DIGIPOTS_I2C_SCL }
SlowSoftI2CMaster { sda_pins[3], DIGIPOTS_I2C_SCL }, #if DIGIPOT_I2C_NUM_CHANNELS > 2
SlowSoftI2CMaster { sda_pins[4], DIGIPOTS_I2C_SCL } , SlowSoftI2CMaster { sda_pins[Z_AXIS], DIGIPOTS_I2C_SCL }
#if DIGIPOT_I2C_NUM_CHANNELS > 3
, SlowSoftI2CMaster { sda_pins[E_AXIS], DIGIPOTS_I2C_SCL }
#if DIGIPOT_I2C_NUM_CHANNELS > 4
, SlowSoftI2CMaster { sda_pins[E_AXIS + 1], DIGIPOTS_I2C_SCL }
#endif
#endif
#endif
#endif
}; };
static void i2c_send(int channel, byte v) { static void i2c_send(const uint8_t channel, const byte v) {
if (WITHIN(channel, 0, DIGIPOT_I2C_NUM_CHANNELS - 1)) { if (WITHIN(channel, 0, DIGIPOT_I2C_NUM_CHANNELS - 1)) {
pots[channel].i2c_start(((DIGIPOT_I2C_ADDRESS) << 1) | I2C_WRITE); pots[channel].i2c_start(((DIGIPOT_I2C_ADDRESS) << 1) | I2C_WRITE);
pots[channel].i2c_write(v); pots[channel].i2c_write(v);
@ -71,21 +88,19 @@ static void i2c_send(int channel, byte v) {
} }
// This is for the MCP4018 I2C based digipot // This is for the MCP4018 I2C based digipot
void digipot_i2c_set_current(int channel, float current) { void digipot_i2c_set_current(uint8_t channel, float current) {
current = min(max(current, 0.0f), float(DIGIPOT_A4988_MAX_CURRENT)); i2c_send(channel, current_to_wiper(min(max(current, 0.0f), float(DIGIPOT_A4988_MAX_CURRENT))));
i2c_send(channel, current_to_wiper(current));
} }
void digipot_i2c_init() { void digipot_i2c_init() {
const float digipot_motor_current[] = DIGIPOT_I2C_MOTOR_CURRENTS; static const float digipot_motor_current[] PROGMEM = DIGIPOT_I2C_MOTOR_CURRENTS;
for (uint8_t i = 0; i < DIGIPOT_I2C_NUM_CHANNELS; i++) for (uint8_t i = 0; i < DIGIPOT_I2C_NUM_CHANNELS; i++)
pots[i].i2c_init(); pots[i].i2c_init();
// setup initial currents as defined in Configuration_adv.h // setup initial currents as defined in Configuration_adv.h
for (uint8_t i = 0; i < COUNT(digipot_motor_current); i++) for (uint8_t i = 0; i < COUNT(digipot_motor_current); i++)
digipot_i2c_set_current(i, digipot_motor_current[i]); digipot_i2c_set_current(i, pgm_read_float(&digipot_motor_current[i]));
} }
#endif // DIGIPOT_I2C && DIGIPOT_MCP4018 #endif // DIGIPOT_I2C && DIGIPOT_MCP4018

@ -37,11 +37,11 @@
#define DIGIPOT_I2C_MAX_CURRENT 2.5 #define DIGIPOT_I2C_MAX_CURRENT 2.5
#endif #endif
static byte current_to_wiper(float current) { static byte current_to_wiper(const float current) {
return byte(ceil(float((DIGIPOT_I2C_FACTOR * current)))); return byte(ceil(float((DIGIPOT_I2C_FACTOR * current))));
} }
static void i2c_send(byte addr, byte a, byte b) { static void i2c_send(const byte addr, const byte a, const byte b) {
Wire.beginTransmission(addr); Wire.beginTransmission(addr);
Wire.write(a); Wire.write(a);
Wire.write(b); Wire.write(b);
@ -49,7 +49,7 @@ static void i2c_send(byte addr, byte a, byte b) {
} }
// This is for the MCP4451 I2C based digipot // This is for the MCP4451 I2C based digipot
void digipot_i2c_set_current(int channel, float current) { void digipot_i2c_set_current(uint8_t channel, float current) {
current = min((float) max(current, 0.0f), DIGIPOT_I2C_MAX_CURRENT); current = min((float) max(current, 0.0f), DIGIPOT_I2C_MAX_CURRENT);
// these addresses are specific to Azteeg X3 Pro, can be set to others, // these addresses are specific to Azteeg X3 Pro, can be set to others,
// In this case first digipot is at address A0=0, A1= 0, second one is at A0=0, A1= 1 // In this case first digipot is at address A0=0, A1= 0, second one is at A0=0, A1= 1
@ -69,11 +69,11 @@ void digipot_i2c_set_current(int channel, float current) {
} }
void digipot_i2c_init() { void digipot_i2c_init() {
const float digipot_motor_current[] = DIGIPOT_I2C_MOTOR_CURRENTS; static const float digipot_motor_current[] PROGMEM = DIGIPOT_I2C_MOTOR_CURRENTS;
Wire.begin(); Wire.begin();
// setup initial currents as defined in Configuration_adv.h // setup initial currents as defined in Configuration_adv.h
for (int i = 0; i < COUNT(digipot_motor_current); i++) for (uint8_t i = 0; i < COUNT(digipot_motor_current); i++)
digipot_i2c_set_current(i, digipot_motor_current[i]); digipot_i2c_set_current(i, pgm_read_float(&digipot_motor_current[i]));
} }
#endif // DIGIPOT_I2C #endif // DIGIPOT_I2C

@ -878,12 +878,14 @@
#define UBL_MESH_INSET 1 // Mesh inset margin on print area #define UBL_MESH_INSET 1 // Mesh inset margin on print area
#define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
#define UBL_PROBE_PT_1_X 39 // These set the probe locations for when UBL does a 3-Point leveling
#define UBL_PROBE_PT_1_Y 180 // of the mesh. #define UBL_PROBE_PT_1_X 39 // Probing points for 3-Point leveling of the mesh
#define UBL_PROBE_PT_1_Y 180
#define UBL_PROBE_PT_2_X 39 #define UBL_PROBE_PT_2_X 39
#define UBL_PROBE_PT_2_Y 20 #define UBL_PROBE_PT_2_Y 20
#define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_3_X 180
#define UBL_PROBE_PT_3_Y 20 #define UBL_PROBE_PT_3_Y 20
#define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle

@ -425,7 +425,7 @@
// Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro // Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
//#define DIGIPOT_I2C //#define DIGIPOT_I2C
//#define DIGIPOT_MCP4018 //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO

@ -862,12 +862,14 @@
#define UBL_MESH_INSET 1 // Mesh inset margin on print area #define UBL_MESH_INSET 1 // Mesh inset margin on print area
#define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
#define UBL_PROBE_PT_1_X 39 // These set the probe locations for when UBL does a 3-Point leveling
#define UBL_PROBE_PT_1_Y 180 // of the mesh. #define UBL_PROBE_PT_1_X 39 // Probing points for 3-Point leveling of the mesh
#define UBL_PROBE_PT_1_Y 180
#define UBL_PROBE_PT_2_X 39 #define UBL_PROBE_PT_2_X 39
#define UBL_PROBE_PT_2_Y 20 #define UBL_PROBE_PT_2_Y 20
#define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_3_X 180
#define UBL_PROBE_PT_3_Y 20 #define UBL_PROBE_PT_3_Y 20
#define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle

@ -425,7 +425,7 @@
// Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro // Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
//#define DIGIPOT_I2C //#define DIGIPOT_I2C
//#define DIGIPOT_MCP4018 //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO

@ -862,12 +862,14 @@
#define UBL_MESH_INSET 1 // Mesh inset margin on print area #define UBL_MESH_INSET 1 // Mesh inset margin on print area
#define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
#define UBL_PROBE_PT_1_X 39 // These set the probe locations for when UBL does a 3-Point leveling
#define UBL_PROBE_PT_1_Y 180 // of the mesh. #define UBL_PROBE_PT_1_X 39 // Probing points for 3-Point leveling of the mesh
#define UBL_PROBE_PT_1_Y 180
#define UBL_PROBE_PT_2_X 39 #define UBL_PROBE_PT_2_X 39
#define UBL_PROBE_PT_2_Y 20 #define UBL_PROBE_PT_2_Y 20
#define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_3_X 180
#define UBL_PROBE_PT_3_Y 20 #define UBL_PROBE_PT_3_Y 20
#define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle

@ -884,12 +884,14 @@
#define UBL_MESH_INSET 1 // Mesh inset margin on print area #define UBL_MESH_INSET 1 // Mesh inset margin on print area
#define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
#define GRID_MAX_POINTS_Y 10 #define GRID_MAX_POINTS_Y 10
#define UBL_PROBE_PT_1_X 45 // These set the probe locations for when UBL does a 3-Point leveling
#define UBL_PROBE_PT_1_Y 170 // of the mesh. #define UBL_PROBE_PT_1_X 45 // Probing points for 3-Point leveling of the mesh
#define UBL_PROBE_PT_1_Y 170
#define UBL_PROBE_PT_2_X 45 #define UBL_PROBE_PT_2_X 45
#define UBL_PROBE_PT_2_Y 25 #define UBL_PROBE_PT_2_Y 25
#define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_3_X 180
#define UBL_PROBE_PT_3_Y 25 #define UBL_PROBE_PT_3_Y 25
#define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle

@ -425,7 +425,7 @@
// Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro // Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
//#define DIGIPOT_I2C //#define DIGIPOT_I2C
//#define DIGIPOT_MCP4018 //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO

@ -870,12 +870,14 @@
#define UBL_MESH_INSET 1 // Mesh inset margin on print area #define UBL_MESH_INSET 1 // Mesh inset margin on print area
#define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
#define UBL_PROBE_PT_1_X 39 // These set the probe locations for when UBL does a 3-Point leveling
#define UBL_PROBE_PT_1_Y 180 // of the mesh. #define UBL_PROBE_PT_1_X 39 // Probing points for 3-Point leveling of the mesh
#define UBL_PROBE_PT_1_Y 180
#define UBL_PROBE_PT_2_X 39 #define UBL_PROBE_PT_2_X 39
#define UBL_PROBE_PT_2_Y 20 #define UBL_PROBE_PT_2_Y 20
#define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_3_X 180
#define UBL_PROBE_PT_3_Y 20 #define UBL_PROBE_PT_3_Y 20
#define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle

@ -425,7 +425,7 @@
// Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro // Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
//#define DIGIPOT_I2C //#define DIGIPOT_I2C
//#define DIGIPOT_MCP4018 //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO

@ -873,12 +873,14 @@
#define UBL_MESH_INSET 1 // Mesh inset margin on print area #define UBL_MESH_INSET 1 // Mesh inset margin on print area
#define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
#define UBL_PROBE_PT_1_X 39 // These set the probe locations for when UBL does a 3-Point leveling
#define UBL_PROBE_PT_1_Y 180 // of the mesh. #define UBL_PROBE_PT_1_X 39 // Probing points for 3-Point leveling of the mesh
#define UBL_PROBE_PT_1_Y 180
#define UBL_PROBE_PT_2_X 39 #define UBL_PROBE_PT_2_X 39
#define UBL_PROBE_PT_2_Y 20 #define UBL_PROBE_PT_2_Y 20
#define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_3_X 180
#define UBL_PROBE_PT_3_Y 20 #define UBL_PROBE_PT_3_Y 20
#define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle

@ -421,12 +421,11 @@
*/ */
//#define PWM_MOTOR_CURRENT { 1300, 1300, 1250 } // Values in milliamps //#define PWM_MOTOR_CURRENT { 1300, 1300, 1250 } // Values in milliamps
#define DIGIPOT_MOTOR_CURRENT { 150, 170, 180, 190, 180 } // Values 0-255 (bq ZUM Mega 3D (default): X = 150 [~1.17A]; Y = 170 [~1.33A]; Z = 180 [~1.41A]; E0 = 190 [~1.49A]) #define DIGIPOT_MOTOR_CURRENT { 150, 170, 180, 190, 180 } // Values 0-255 (bq ZUM Mega 3D (default): X = 150 [~1.17A]; Y = 170 [~1.33A]; Z = 180 [~1.41A]; E0 = 190 [~1.49A])
//#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 } // Default drive percent - X, Y, Z, E axis //#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 } // Default drive percent - X, Y, Z, E axis
// Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro // Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
//#define DIGIPOT_I2C //#define DIGIPOT_I2C
//#define DIGIPOT_MCP4018 //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO

@ -909,12 +909,14 @@
#define UBL_MESH_INSET 1 // Mesh inset margin on print area #define UBL_MESH_INSET 1 // Mesh inset margin on print area
#define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
#define UBL_PROBE_PT_1_X 39 // These set the probe locations for when UBL does a 3-Point leveling
#define UBL_PROBE_PT_1_Y 180 // of the mesh. #define UBL_PROBE_PT_1_X 39 // Probing points for 3-Point leveling of the mesh
#define UBL_PROBE_PT_1_Y 180
#define UBL_PROBE_PT_2_X 39 #define UBL_PROBE_PT_2_X 39
#define UBL_PROBE_PT_2_Y 20 #define UBL_PROBE_PT_2_Y 20
#define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_3_X 180
#define UBL_PROBE_PT_3_Y 20 #define UBL_PROBE_PT_3_Y 20
#define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle

@ -438,7 +438,7 @@
// Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro // Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
//#define DIGIPOT_I2C //#define DIGIPOT_I2C
//#define DIGIPOT_MCP4018 //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO

@ -880,12 +880,14 @@
#define UBL_MESH_INSET 1 // Mesh inset margin on print area #define UBL_MESH_INSET 1 // Mesh inset margin on print area
#define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
#define UBL_PROBE_PT_1_X 39 // These set the probe locations for when UBL does a 3-Point leveling
#define UBL_PROBE_PT_1_Y 180 // of the mesh. #define UBL_PROBE_PT_1_X 39 // Probing points for 3-Point leveling of the mesh
#define UBL_PROBE_PT_1_Y 180
#define UBL_PROBE_PT_2_X 39 #define UBL_PROBE_PT_2_X 39
#define UBL_PROBE_PT_2_Y 20 #define UBL_PROBE_PT_2_Y 20
#define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_3_X 180
#define UBL_PROBE_PT_3_Y 20 #define UBL_PROBE_PT_3_Y 20
#define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle

@ -425,7 +425,7 @@
// Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro // Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
//#define DIGIPOT_I2C //#define DIGIPOT_I2C
//#define DIGIPOT_MCP4018 //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO

@ -880,12 +880,14 @@
#define UBL_MESH_INSET 1 // Mesh inset margin on print area #define UBL_MESH_INSET 1 // Mesh inset margin on print area
#define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
#define UBL_PROBE_PT_1_X 39 // These set the probe locations for when UBL does a 3-Point leveling
#define UBL_PROBE_PT_1_Y 180 // of the mesh. #define UBL_PROBE_PT_1_X 39 // Probing points for 3-Point leveling of the mesh
#define UBL_PROBE_PT_1_Y 180
#define UBL_PROBE_PT_2_X 39 #define UBL_PROBE_PT_2_X 39
#define UBL_PROBE_PT_2_Y 20 #define UBL_PROBE_PT_2_Y 20
#define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_3_X 180
#define UBL_PROBE_PT_3_Y 20 #define UBL_PROBE_PT_3_Y 20
#define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle

@ -907,12 +907,14 @@
#define UBL_MESH_INSET 1 // Mesh inset margin on print area #define UBL_MESH_INSET 1 // Mesh inset margin on print area
#define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
#define UBL_PROBE_PT_1_X 39 // These set the probe locations for when UBL does a 3-Point leveling
#define UBL_PROBE_PT_1_Y 180 // of the mesh. #define UBL_PROBE_PT_1_X 39 // Probing points for 3-Point leveling of the mesh
#define UBL_PROBE_PT_1_Y 180
#define UBL_PROBE_PT_2_X 39 #define UBL_PROBE_PT_2_X 39
#define UBL_PROBE_PT_2_Y 20 #define UBL_PROBE_PT_2_Y 20
#define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_3_X 180
#define UBL_PROBE_PT_3_Y 20 #define UBL_PROBE_PT_3_Y 20
#define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle

@ -425,7 +425,7 @@
// Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro // Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
//#define DIGIPOT_I2C //#define DIGIPOT_I2C
//#define DIGIPOT_MCP4018 //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO

@ -880,12 +880,14 @@
#define UBL_MESH_INSET 1 // Mesh inset margin on print area #define UBL_MESH_INSET 1 // Mesh inset margin on print area
#define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
#define UBL_PROBE_PT_1_X 39 // These set the probe locations for when UBL does a 3-Point leveling
#define UBL_PROBE_PT_1_Y 180 // of the mesh. #define UBL_PROBE_PT_1_X 39 // Probing points for 3-Point leveling of the mesh
#define UBL_PROBE_PT_1_Y 180
#define UBL_PROBE_PT_2_X 39 #define UBL_PROBE_PT_2_X 39
#define UBL_PROBE_PT_2_Y 20 #define UBL_PROBE_PT_2_Y 20
#define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_3_X 180
#define UBL_PROBE_PT_3_Y 20 #define UBL_PROBE_PT_3_Y 20
#define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle

@ -878,12 +878,14 @@
#define UBL_MESH_INSET 1 // Mesh inset margin on print area #define UBL_MESH_INSET 1 // Mesh inset margin on print area
#define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
#define UBL_PROBE_PT_1_X 39 // These set the probe locations for when UBL does a 3-Point leveling
#define UBL_PROBE_PT_1_Y 180 // of the mesh. #define UBL_PROBE_PT_1_X 39 // Probing points for 3-Point leveling of the mesh
#define UBL_PROBE_PT_1_Y 180
#define UBL_PROBE_PT_2_X 39 #define UBL_PROBE_PT_2_X 39
#define UBL_PROBE_PT_2_Y 20 #define UBL_PROBE_PT_2_Y 20
#define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_3_X 180
#define UBL_PROBE_PT_3_Y 20 #define UBL_PROBE_PT_3_Y 20
#define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle

@ -425,7 +425,7 @@
// Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro // Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
//#define DIGIPOT_I2C //#define DIGIPOT_I2C
//#define DIGIPOT_MCP4018 //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO

@ -895,12 +895,14 @@
#define UBL_MESH_INSET 1 // Mesh inset margin on print area #define UBL_MESH_INSET 1 // Mesh inset margin on print area
#define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
#define UBL_PROBE_PT_1_X 39 // These set the probe locations for when UBL does a 3-Point leveling
#define UBL_PROBE_PT_1_Y 180 // of the mesh. #define UBL_PROBE_PT_1_X 39 // Probing points for 3-Point leveling of the mesh
#define UBL_PROBE_PT_1_Y 180
#define UBL_PROBE_PT_2_X 39 #define UBL_PROBE_PT_2_X 39
#define UBL_PROBE_PT_2_Y 20 #define UBL_PROBE_PT_2_Y 20
#define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_3_X 180
#define UBL_PROBE_PT_3_Y 20 #define UBL_PROBE_PT_3_Y 20
#define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle

@ -425,7 +425,7 @@
// Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro // Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
//#define DIGIPOT_I2C //#define DIGIPOT_I2C
//#define DIGIPOT_MCP4018 //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO

@ -899,12 +899,14 @@
#define UBL_MESH_INSET 1 // Mesh inset margin on print area #define UBL_MESH_INSET 1 // Mesh inset margin on print area
#define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
#define UBL_PROBE_PT_1_X 39 // These set the probe locations for when UBL does a 3-Point leveling
#define UBL_PROBE_PT_1_Y 180 // of the mesh. #define UBL_PROBE_PT_1_X 39 // Probing points for 3-Point leveling of the mesh
#define UBL_PROBE_PT_1_Y 180
#define UBL_PROBE_PT_2_X 39 #define UBL_PROBE_PT_2_X 39
#define UBL_PROBE_PT_2_Y 20 #define UBL_PROBE_PT_2_Y 20
#define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_3_X 180
#define UBL_PROBE_PT_3_Y 20 #define UBL_PROBE_PT_3_Y 20
#define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle

@ -425,7 +425,7 @@
// Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro // Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
//#define DIGIPOT_I2C //#define DIGIPOT_I2C
//#define DIGIPOT_MCP4018 //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO

@ -936,12 +936,14 @@
#define UBL_MESH_INSET 1 // Mesh inset margin on print area #define UBL_MESH_INSET 1 // Mesh inset margin on print area
#define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
#define UBL_PROBE_PT_1_X 39 // These set the probe locations for when UBL does a 3-Point leveling
#define UBL_PROBE_PT_1_Y 180 // of the mesh. #define UBL_PROBE_PT_1_X 39 // Probing points for 3-Point leveling of the mesh
#define UBL_PROBE_PT_1_Y 180
#define UBL_PROBE_PT_2_X 39 #define UBL_PROBE_PT_2_X 39
#define UBL_PROBE_PT_2_Y 20 #define UBL_PROBE_PT_2_Y 20
#define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_3_X 180
#define UBL_PROBE_PT_3_Y 20 #define UBL_PROBE_PT_3_Y 20
#define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle

@ -425,7 +425,7 @@
// Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro // Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
//#define DIGIPOT_I2C //#define DIGIPOT_I2C
//#define DIGIPOT_MCP4018 //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO

@ -870,12 +870,14 @@
#define UBL_MESH_INSET 1 // Mesh inset margin on print area #define UBL_MESH_INSET 1 // Mesh inset margin on print area
#define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
#define UBL_PROBE_PT_1_X 39 // These set the probe locations for when UBL does a 3-Point leveling
#define UBL_PROBE_PT_1_Y 180 // of the mesh. #define UBL_PROBE_PT_1_X 39 // Probing points for 3-Point leveling of the mesh
#define UBL_PROBE_PT_1_Y 180
#define UBL_PROBE_PT_2_X 39 #define UBL_PROBE_PT_2_X 39
#define UBL_PROBE_PT_2_Y 20 #define UBL_PROBE_PT_2_Y 20
#define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_3_X 180
#define UBL_PROBE_PT_3_Y 20 #define UBL_PROBE_PT_3_Y 20
#define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle

@ -425,7 +425,7 @@
// Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro // Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
//#define DIGIPOT_I2C //#define DIGIPOT_I2C
//#define DIGIPOT_MCP4018 //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO

@ -880,12 +880,14 @@
#define UBL_MESH_INSET 1 // Mesh inset margin on print area #define UBL_MESH_INSET 1 // Mesh inset margin on print area
#define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
#define UBL_PROBE_PT_1_X 39 // These set the probe locations for when UBL does a 3-Point leveling
#define UBL_PROBE_PT_1_Y 180 // of the mesh. #define UBL_PROBE_PT_1_X 39 // Probing points for 3-Point leveling of the mesh
#define UBL_PROBE_PT_1_Y 180
#define UBL_PROBE_PT_2_X 39 #define UBL_PROBE_PT_2_X 39
#define UBL_PROBE_PT_2_Y 20 #define UBL_PROBE_PT_2_Y 20
#define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_3_X 180
#define UBL_PROBE_PT_3_Y 20 #define UBL_PROBE_PT_3_Y 20
#define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle

@ -999,12 +999,16 @@
#define UBL_MESH_INSET 1 // Mesh inset margin on print area #define UBL_MESH_INSET 1 // Mesh inset margin on print area
#define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
#define UBL_PROBE_PT_1_X 39 // These set the probe locations for when UBL does a 3-Point leveling
#define UBL_PROBE_PT_1_Y 180 // of the mesh. #define _PX(R,A) (R) * cos(RADIANS(A))
#define UBL_PROBE_PT_2_X 39 #define _PY(R,A) (R) * sin(RADIANS(A))
#define UBL_PROBE_PT_2_Y 20 #define UBL_PROBE_PT_1_X _PX(DELTA_PROBEABLE_RADIUS, 0) // Probing points for 3-Point leveling of the mesh
#define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_1_Y _PY(DELTA_PROBEABLE_RADIUS, 0)
#define UBL_PROBE_PT_3_Y 20 #define UBL_PROBE_PT_2_X _PX(DELTA_PROBEABLE_RADIUS, 120)
#define UBL_PROBE_PT_2_Y _PY(DELTA_PROBEABLE_RADIUS, 120)
#define UBL_PROBE_PT_3_X _PX(DELTA_PROBEABLE_RADIUS, 240)
#define UBL_PROBE_PT_3_Y _PY(DELTA_PROBEABLE_RADIUS, 240)
#define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle

@ -427,7 +427,7 @@
// Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro // Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
//#define DIGIPOT_I2C //#define DIGIPOT_I2C
//#define DIGIPOT_MCP4018 //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO

@ -1001,12 +1001,16 @@
#define UBL_MESH_INSET 1 // Mesh inset margin on print area #define UBL_MESH_INSET 1 // Mesh inset margin on print area
#define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
#define UBL_PROBE_PT_1_X 39 // These set the probe locations for when UBL does a 3-Point leveling
#define UBL_PROBE_PT_1_Y 180 // of the mesh. #define _PX(R,A) (R) * cos(RADIANS(A))
#define UBL_PROBE_PT_2_X 39 #define _PY(R,A) (R) * sin(RADIANS(A))
#define UBL_PROBE_PT_2_Y 20 #define UBL_PROBE_PT_1_X _PX(DELTA_PROBEABLE_RADIUS, 0) // Probing points for 3-Point leveling of the mesh
#define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_1_Y _PY(DELTA_PROBEABLE_RADIUS, 0)
#define UBL_PROBE_PT_3_Y 20 #define UBL_PROBE_PT_2_X _PX(DELTA_PROBEABLE_RADIUS, 120)
#define UBL_PROBE_PT_2_Y _PY(DELTA_PROBEABLE_RADIUS, 120)
#define UBL_PROBE_PT_3_X _PX(DELTA_PROBEABLE_RADIUS, 240)
#define UBL_PROBE_PT_3_Y _PY(DELTA_PROBEABLE_RADIUS, 240)
#define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle

@ -427,7 +427,7 @@
// Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro // Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
//#define DIGIPOT_I2C //#define DIGIPOT_I2C
//#define DIGIPOT_MCP4018 //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO

@ -990,12 +990,16 @@
#define UBL_MESH_INSET 1 // Mesh inset margin on print area #define UBL_MESH_INSET 1 // Mesh inset margin on print area
#define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
#define UBL_PROBE_PT_1_X 39 // These set the probe locations for when UBL does a 3-Point leveling
#define UBL_PROBE_PT_1_Y 180 // of the mesh. #define _PX(R,A) (R) * cos(RADIANS(A))
#define UBL_PROBE_PT_2_X 39 #define _PY(R,A) (R) * sin(RADIANS(A))
#define UBL_PROBE_PT_2_Y 20 #define UBL_PROBE_PT_1_X _PX(DELTA_PROBEABLE_RADIUS, 0) // Probing points for 3-Point leveling of the mesh
#define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_1_Y _PY(DELTA_PROBEABLE_RADIUS, 0)
#define UBL_PROBE_PT_3_Y 20 #define UBL_PROBE_PT_2_X _PX(DELTA_PROBEABLE_RADIUS, 120)
#define UBL_PROBE_PT_2_Y _PY(DELTA_PROBEABLE_RADIUS, 120)
#define UBL_PROBE_PT_3_X _PX(DELTA_PROBEABLE_RADIUS, 240)
#define UBL_PROBE_PT_3_Y _PY(DELTA_PROBEABLE_RADIUS, 240)
#define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle

@ -427,7 +427,7 @@
// Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro // Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
//#define DIGIPOT_I2C //#define DIGIPOT_I2C
//#define DIGIPOT_MCP4018 //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO

@ -993,12 +993,16 @@
#define UBL_MESH_INSET 1 // Mesh inset margin on print area #define UBL_MESH_INSET 1 // Mesh inset margin on print area
#define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
#define UBL_PROBE_PT_1_X 39 // These set the probe locations for when UBL does a 3-Point leveling
#define UBL_PROBE_PT_1_Y 180 // of the mesh. #define _PX(R,A) (R) * cos(RADIANS(A))
#define UBL_PROBE_PT_2_X 39 #define _PY(R,A) (R) * sin(RADIANS(A))
#define UBL_PROBE_PT_2_Y 20 #define UBL_PROBE_PT_1_X _PX(DELTA_PROBEABLE_RADIUS, 0) // Probing points for 3-Point leveling of the mesh
#define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_1_Y _PY(DELTA_PROBEABLE_RADIUS, 0)
#define UBL_PROBE_PT_3_Y 20 #define UBL_PROBE_PT_2_X _PX(DELTA_PROBEABLE_RADIUS, 120)
#define UBL_PROBE_PT_2_Y _PY(DELTA_PROBEABLE_RADIUS, 120)
#define UBL_PROBE_PT_3_X _PX(DELTA_PROBEABLE_RADIUS, 240)
#define UBL_PROBE_PT_3_Y _PY(DELTA_PROBEABLE_RADIUS, 240)
#define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle

@ -427,7 +427,7 @@
// Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro // Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
//#define DIGIPOT_I2C //#define DIGIPOT_I2C
//#define DIGIPOT_MCP4018 //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO

@ -998,12 +998,16 @@
#define UBL_MESH_INSET 1 // Mesh inset margin on print area #define UBL_MESH_INSET 1 // Mesh inset margin on print area
#define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
#define UBL_PROBE_PT_1_X 39 // These set the probe locations for when UBL does a 3-Point leveling
#define UBL_PROBE_PT_1_Y 180 // of the mesh. #define _PX(R,A) (R) * cos(RADIANS(A))
#define UBL_PROBE_PT_2_X 39 #define _PY(R,A) (R) * sin(RADIANS(A))
#define UBL_PROBE_PT_2_Y 20 #define UBL_PROBE_PT_1_X _PX(DELTA_PROBEABLE_RADIUS, 0) // Probing points for 3-Point leveling of the mesh
#define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_1_Y _PY(DELTA_PROBEABLE_RADIUS, 0)
#define UBL_PROBE_PT_3_Y 20 #define UBL_PROBE_PT_2_X _PX(DELTA_PROBEABLE_RADIUS, 120)
#define UBL_PROBE_PT_2_Y _PY(DELTA_PROBEABLE_RADIUS, 120)
#define UBL_PROBE_PT_3_X _PX(DELTA_PROBEABLE_RADIUS, 240)
#define UBL_PROBE_PT_3_Y _PY(DELTA_PROBEABLE_RADIUS, 240)
#define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle

@ -432,7 +432,7 @@
// Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro // Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
//#define DIGIPOT_I2C //#define DIGIPOT_I2C
//#define DIGIPOT_MCP4018 //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO

@ -1056,12 +1056,16 @@
#define UBL_MESH_INSET 1 // Mesh inset margin on print area #define UBL_MESH_INSET 1 // Mesh inset margin on print area
#define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
#define UBL_PROBE_PT_1_X 39 // These set the probe locations for when UBL does a 3-Point leveling
#define UBL_PROBE_PT_1_Y 180 // of the mesh. #define _PX(R,A) (R) * cos(RADIANS(A))
#define UBL_PROBE_PT_2_X 39 #define _PY(R,A) (R) * sin(RADIANS(A))
#define UBL_PROBE_PT_2_Y 20 #define UBL_PROBE_PT_1_X _PX(DELTA_PROBEABLE_RADIUS, 0) // Probing points for 3-Point leveling of the mesh
#define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_1_Y _PY(DELTA_PROBEABLE_RADIUS, 0)
#define UBL_PROBE_PT_3_Y 20 #define UBL_PROBE_PT_2_X _PX(DELTA_PROBEABLE_RADIUS, 120)
#define UBL_PROBE_PT_2_Y _PY(DELTA_PROBEABLE_RADIUS, 120)
#define UBL_PROBE_PT_3_X _PX(DELTA_PROBEABLE_RADIUS, 240)
#define UBL_PROBE_PT_3_Y _PY(DELTA_PROBEABLE_RADIUS, 240)
#define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle

@ -427,7 +427,7 @@
// Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro // Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
//#define DIGIPOT_I2C //#define DIGIPOT_I2C
//#define DIGIPOT_MCP4018 //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO

@ -896,12 +896,14 @@
#define UBL_MESH_INSET 45 // Mesh inset margin on print area #define UBL_MESH_INSET 45 // Mesh inset margin on print area
#define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
#define UBL_PROBE_PT_1_X 53 // These set the probe locations for when UBL does a 3-Point leveling
#define UBL_PROBE_PT_1_Y 323 // of the mesh. #define UBL_PROBE_PT_1_X 53 // Probing points for 3-Point leveling of the mesh
#define UBL_PROBE_PT_1_Y 323
#define UBL_PROBE_PT_2_X 53 #define UBL_PROBE_PT_2_X 53
#define UBL_PROBE_PT_2_Y 63 #define UBL_PROBE_PT_2_Y 63
#define UBL_PROBE_PT_3_X 348 #define UBL_PROBE_PT_3_X 348
#define UBL_PROBE_PT_3_Y 211 #define UBL_PROBE_PT_3_Y 211
#define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle

@ -425,7 +425,7 @@
// Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro // Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
//#define DIGIPOT_I2C //#define DIGIPOT_I2C
//#define DIGIPOT_MCP4018 //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO

@ -883,12 +883,14 @@
#define UBL_MESH_INSET 1 // Mesh inset margin on print area #define UBL_MESH_INSET 1 // Mesh inset margin on print area
#define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
#define UBL_PROBE_PT_1_X 39 // These set the probe locations for when UBL does a 3-Point leveling
#define UBL_PROBE_PT_1_Y 180 // of the mesh. #define UBL_PROBE_PT_1_X 39 // Probing points for 3-Point leveling of the mesh
#define UBL_PROBE_PT_1_Y 180
#define UBL_PROBE_PT_2_X 39 #define UBL_PROBE_PT_2_X 39
#define UBL_PROBE_PT_2_Y 20 #define UBL_PROBE_PT_2_Y 20
#define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_3_X 180
#define UBL_PROBE_PT_3_Y 20 #define UBL_PROBE_PT_3_Y 20
#define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle

@ -425,7 +425,7 @@
// Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro // Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
//#define DIGIPOT_I2C //#define DIGIPOT_I2C
//#define DIGIPOT_MCP4018 //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
#define DIGIPOT_I2C_NUM_CHANNELS 4 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 #define DIGIPOT_I2C_NUM_CHANNELS 4 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.7, 1.7, 1.7, 1.7 } // 5DPRINT #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.7, 1.7, 1.7, 1.7 } // 5DPRINT

@ -875,12 +875,14 @@
#define UBL_MESH_INSET 1 // Mesh inset margin on print area #define UBL_MESH_INSET 1 // Mesh inset margin on print area
#define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
#define UBL_PROBE_PT_1_X 39 // These set the probe locations for when UBL does a 3-Point leveling
#define UBL_PROBE_PT_1_Y 180 // of the mesh. #define UBL_PROBE_PT_1_X 39 // Probing points for 3-Point leveling of the mesh
#define UBL_PROBE_PT_1_Y 180
#define UBL_PROBE_PT_2_X 39 #define UBL_PROBE_PT_2_X 39
#define UBL_PROBE_PT_2_Y 20 #define UBL_PROBE_PT_2_Y 20
#define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_3_X 180
#define UBL_PROBE_PT_3_Y 20 #define UBL_PROBE_PT_3_Y 20
#define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle

@ -425,7 +425,7 @@
// Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro // Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
//#define DIGIPOT_I2C //#define DIGIPOT_I2C
//#define DIGIPOT_MCP4018 //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO

@ -885,12 +885,14 @@
#define UBL_MESH_INSET 1 // Mesh inset margin on print area #define UBL_MESH_INSET 1 // Mesh inset margin on print area
#define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
#define UBL_PROBE_PT_1_X 39 // These set the probe locations for when UBL does a 3-Point leveling
#define UBL_PROBE_PT_1_Y 180 // of the mesh. #define UBL_PROBE_PT_1_X 39 // Probing points for 3-Point leveling of the mesh
#define UBL_PROBE_PT_1_Y 180
#define UBL_PROBE_PT_2_X 39 #define UBL_PROBE_PT_2_X 39
#define UBL_PROBE_PT_2_Y 20 #define UBL_PROBE_PT_2_Y 20
#define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_3_X 180
#define UBL_PROBE_PT_3_Y 20 #define UBL_PROBE_PT_3_Y 20
#define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle

@ -425,7 +425,7 @@
// Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro // Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
#define DIGIPOT_I2C #define DIGIPOT_I2C
#define DIGIPOT_MCP4018 #define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
#define DIGIPOT_I2C_NUM_CHANNELS 5 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 #define DIGIPOT_I2C_NUM_CHANNELS 5 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS // Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
#define DIGIPOT_I2C_MOTOR_CURRENTS {0.68, 0.68, 1.18, 1.27, 1.27} #define DIGIPOT_I2C_MOTOR_CURRENTS {0.68, 0.68, 1.18, 1.27, 1.27}

@ -20,8 +20,8 @@
* *
*/ */
#ifndef PINS_H #ifndef __PINS_H__
#define PINS_H #define __PINS_H__
#if MB(GEN7_CUSTOM) #if MB(GEN7_CUSTOM)
#include "pins_GEN7_CUSTOM.h" #include "pins_GEN7_CUSTOM.h"
@ -570,4 +570,4 @@
#define SS_PIN AVR_SS_PIN #define SS_PIN AVR_SS_PIN
#endif #endif
#endif // __PINS_H #endif // __PINS_H__

@ -472,8 +472,8 @@ int Temperature::getHeaterPower(int heater) {
#if HAS_AUTO_FAN #if HAS_AUTO_FAN
void Temperature::checkExtruderAutoFans() { void Temperature::checkExtruderAutoFans() {
constexpr int8_t fanPin[] = { E0_AUTO_FAN_PIN, E1_AUTO_FAN_PIN, E2_AUTO_FAN_PIN, E3_AUTO_FAN_PIN, E4_AUTO_FAN_PIN }; static const int8_t fanPin[] PROGMEM = { E0_AUTO_FAN_PIN, E1_AUTO_FAN_PIN, E2_AUTO_FAN_PIN, E3_AUTO_FAN_PIN, E4_AUTO_FAN_PIN };
constexpr int fanBit[] = { static const uint8_t fanBit[] PROGMEM = {
0, 0,
AUTO_1_IS_0 ? 0 : 1, AUTO_1_IS_0 ? 0 : 1,
AUTO_2_IS_0 ? 0 : AUTO_2_IS_1 ? 1 : 2, AUTO_2_IS_0 ? 0 : AUTO_2_IS_1 ? 1 : 2,
@ -482,20 +482,20 @@ int Temperature::getHeaterPower(int heater) {
}; };
uint8_t fanState = 0; uint8_t fanState = 0;
HOTEND_LOOP() { HOTEND_LOOP()
if (current_temperature[e] > EXTRUDER_AUTO_FAN_TEMPERATURE) if (current_temperature[e] > EXTRUDER_AUTO_FAN_TEMPERATURE)
SBI(fanState, fanBit[e]); SBI(fanState, pgm_read_byte(&fanBit[e]));
}
uint8_t fanDone = 0; uint8_t fanDone = 0;
for (uint8_t f = 0; f < COUNT(fanPin); f++) { for (uint8_t f = 0; f < COUNT(fanPin); f++) {
int8_t pin = fanPin[f]; int8_t pin = pgm_read_byte(&fanPin[f]);
if (pin >= 0 && !TEST(fanDone, fanBit[f])) { const uint8_t bit = pgm_read_byte(&fanBit[f]);
uint8_t newFanSpeed = TEST(fanState, fanBit[f]) ? EXTRUDER_AUTO_FAN_SPEED : 0; if (pin >= 0 && !TEST(fanDone, bit)) {
uint8_t newFanSpeed = TEST(fanState, bit) ? EXTRUDER_AUTO_FAN_SPEED : 0;
// this idiom allows both digital and PWM fan outputs (see M42 handling). // this idiom allows both digital and PWM fan outputs (see M42 handling).
digitalWrite(pin, newFanSpeed); digitalWrite(pin, newFanSpeed);
analogWrite(pin, newFanSpeed); analogWrite(pin, newFanSpeed);
SBI(fanDone, fanBit[f]); SBI(fanDone, bit);
} }
} }
} }

@ -138,10 +138,11 @@
static bool look_for_lines_to_connect(); static bool look_for_lines_to_connect();
static bool turn_on_heaters(); static bool turn_on_heaters();
static bool prime_nozzle(); static bool prime_nozzle();
static void retract_filament(float where[XYZE]); static void retract_filament(const float where[XYZE]);
static void recover_filament(float where[XYZE]); static void recover_filament(const float where[XYZE]);
static void print_line_from_here_to_there(const float&, const float&, const float&, const float&, const float&, const float&); static void print_line_from_here_to_there(const float&, const float&, const float&, const float&, const float&, const float&);
static void move_to(const float&, const float&, const float&, const float&); static void move_to(const float&, const float&, const float&, const float&);
inline static void move_to(const float where[XYZE], const float &de) { move_to(where[X_AXIS], where[Y_AXIS], where[Z_AXIS], de); }
#endif #endif
public: public:

@ -1593,24 +1593,33 @@
typedef struct { uint8_t sx, ex, sy, ey; bool yfirst; } smart_fill_info; typedef struct { uint8_t sx, ex, sy, ey; bool yfirst; } smart_fill_info;
void unified_bed_leveling::smart_fill_mesh() { void unified_bed_leveling::smart_fill_mesh() {
const smart_fill_info info[] = { static const smart_fill_info
{ 0, GRID_MAX_POINTS_X, 0, GRID_MAX_POINTS_Y - 2, false }, // Bottom of the mesh looking up info0 PROGMEM = { 0, GRID_MAX_POINTS_X, 0, GRID_MAX_POINTS_Y - 2, false }, // Bottom of the mesh looking up
{ 0, GRID_MAX_POINTS_X, GRID_MAX_POINTS_Y - 1, 0, false }, // Top of the mesh looking down info1 PROGMEM = { 0, GRID_MAX_POINTS_X, GRID_MAX_POINTS_Y - 1, 0, false }, // Top of the mesh looking down
{ 0, GRID_MAX_POINTS_X - 2, 0, GRID_MAX_POINTS_Y, true }, // Left side of the mesh looking right info2 PROGMEM = { 0, GRID_MAX_POINTS_X - 2, 0, GRID_MAX_POINTS_Y, true }, // Left side of the mesh looking right
{ GRID_MAX_POINTS_X - 1, 0, 0, GRID_MAX_POINTS_Y, true } // Right side of the mesh looking left info3 PROGMEM = { GRID_MAX_POINTS_X - 1, 0, 0, GRID_MAX_POINTS_Y, true }; // Right side of the mesh looking left
}; static const smart_fill_info * const info[] PROGMEM = { &info0, &info1, &info2, &info3 };
// static const smart_fill_info info[] PROGMEM = {
// { 0, GRID_MAX_POINTS_X, 0, GRID_MAX_POINTS_Y - 2, false } PROGMEM, // Bottom of the mesh looking up
// { 0, GRID_MAX_POINTS_X, GRID_MAX_POINTS_Y - 1, 0, false } PROGMEM, // Top of the mesh looking down
// { 0, GRID_MAX_POINTS_X - 2, 0, GRID_MAX_POINTS_Y, true } PROGMEM, // Left side of the mesh looking right
// { GRID_MAX_POINTS_X - 1, 0, 0, GRID_MAX_POINTS_Y, true } PROGMEM // Right side of the mesh looking left
// };
for (uint8_t i = 0; i < COUNT(info); ++i) { for (uint8_t i = 0; i < COUNT(info); ++i) {
const smart_fill_info &f = info[i]; const smart_fill_info *f = (smart_fill_info*)pgm_read_word(&info[i]);
if (f.yfirst) { const int8_t sx = pgm_read_word(&f->sx), sy = pgm_read_word(&f->sy),
const int8_t dir = f.ex > f.sx ? 1 : -1; ex = pgm_read_word(&f->ex), ey = pgm_read_word(&f->ey);
for (uint8_t y = f.sy; y != f.ey; ++y) if (pgm_read_byte(&f->yfirst)) {
for (uint8_t x = f.sx; x != f.ex; x += dir) const int8_t dir = ex > sx ? 1 : -1;
for (uint8_t y = sy; y != ey; ++y)
for (uint8_t x = sx; x != ex; x += dir)
if (smart_fill_one(x, y, dir, 0)) break; if (smart_fill_one(x, y, dir, 0)) break;
} }
else { else {
const int8_t dir = f.ey > f.sy ? 1 : -1; const int8_t dir = ey > sy ? 1 : -1;
for (uint8_t x = f.sx; x != f.ex; ++x) for (uint8_t x = sx; x != ex; ++x)
for (uint8_t y = f.sy; y != f.ey; y += dir) for (uint8_t y = sy; y != ey; y += dir)
if (smart_fill_one(x, y, 0, dir)) break; if (smart_fill_one(x, y, 0, dir)) break;
} }
} }

@ -67,19 +67,17 @@
const float de = destination[E_AXIS] - current_position[E_AXIS]; const float de = destination[E_AXIS] - current_position[E_AXIS];
if (de == 0.0) return; if (de == 0.0) return; // Printing moves only
const float dx = current_position[X_AXIS] - destination[X_AXIS], const float dx = destination[X_AXIS] - current_position[X_AXIS],
dy = current_position[Y_AXIS] - destination[Y_AXIS], dy = destination[Y_AXIS] - current_position[Y_AXIS],
xy_dist = HYPOT(dx, dy); xy_dist = HYPOT(dx, dy);
if (xy_dist == 0.0) if (xy_dist == 0.0) return;
return;
else {
SERIAL_ECHOPGM(" fpmm="); SERIAL_ECHOPGM(" fpmm=");
const float fpmm = de / xy_dist; const float fpmm = de / xy_dist;
SERIAL_ECHO_F(fpmm, 6); SERIAL_ECHO_F(fpmm, 6);
}
SERIAL_ECHOPGM(" current=( "); SERIAL_ECHOPGM(" current=( ");
SERIAL_ECHO_F(current_position[X_AXIS], 6); SERIAL_ECHO_F(current_position[X_AXIS], 6);

@ -686,8 +686,13 @@ void kill_screen(const char* lcd_msg) {
else lcd_buzz(20, 440); else lcd_buzz(20, 440);
} }
inline void line_to_current(AxisEnum axis) { inline void line_to_current_z() {
planner.buffer_line_kinematic(current_position, MMM_TO_MMS(manual_feedrate_mm_m[axis]), active_extruder); planner.buffer_line_kinematic(current_position, MMM_TO_MMS(manual_feedrate_mm_m[Z_AXIS]), active_extruder);
}
inline void line_to_z(const float &z) {
current_position[Z_AXIS] = z;
line_to_current_z();
} }
#if ENABLED(SDSUPPORT) #if ENABLED(SDSUPPORT)
@ -1521,8 +1526,7 @@ void kill_screen(const char* lcd_msg) {
// //
void _lcd_after_probing() { void _lcd_after_probing() {
#if MANUAL_PROBE_HEIGHT > 0 #if MANUAL_PROBE_HEIGHT > 0
current_position[Z_AXIS] = LOGICAL_Z_POSITION(Z_MIN_POS) + MANUAL_PROBE_HEIGHT; line_to_z(LOGICAL_Z_POSITION(Z_MIN_POS) + MANUAL_PROBE_HEIGHT);
line_to_current(Z_AXIS);
#endif #endif
// Display "Done" screen and wait for moves to complete // Display "Done" screen and wait for moves to complete
#if MANUAL_PROBE_HEIGHT > 0 || ENABLED(MESH_BED_LEVELING) #if MANUAL_PROBE_HEIGHT > 0 || ENABLED(MESH_BED_LEVELING)
@ -1539,15 +1543,13 @@ void kill_screen(const char* lcd_msg) {
// Utility to go to the next mesh point // Utility to go to the next mesh point
inline void _manual_probe_goto_xy(float x, float y) { inline void _manual_probe_goto_xy(float x, float y) {
#if MANUAL_PROBE_HEIGHT > 0 #if MANUAL_PROBE_HEIGHT > 0
current_position[Z_AXIS] = LOGICAL_Z_POSITION(Z_MIN_POS) + MANUAL_PROBE_HEIGHT; line_to_z(LOGICAL_Z_POSITION(Z_MIN_POS) + MANUAL_PROBE_HEIGHT);
line_to_current(Z_AXIS);
#endif #endif
current_position[X_AXIS] = LOGICAL_X_POSITION(x); current_position[X_AXIS] = LOGICAL_X_POSITION(x);
current_position[Y_AXIS] = LOGICAL_Y_POSITION(y); current_position[Y_AXIS] = LOGICAL_Y_POSITION(y);
planner.buffer_line_kinematic(current_position, MMM_TO_MMS(XY_PROBE_SPEED), active_extruder); planner.buffer_line_kinematic(current_position, MMM_TO_MMS(XY_PROBE_SPEED), active_extruder);
#if MANUAL_PROBE_HEIGHT > 0 #if MANUAL_PROBE_HEIGHT > 0
current_position[Z_AXIS] = LOGICAL_Z_POSITION(Z_MIN_POS); line_to_z(LOGICAL_Z_POSITION(Z_MIN_POS));
line_to_current(Z_AXIS);
#endif #endif
lcd_synchronize(); lcd_synchronize();
} }
@ -1629,10 +1631,8 @@ void kill_screen(const char* lcd_msg) {
// //
if (encoderPosition) { if (encoderPosition) {
refresh_cmd_timeout(); refresh_cmd_timeout();
current_position[Z_AXIS] += float((int32_t)encoderPosition) * (MBL_Z_STEP); const float z = current_position[Z_AXIS] + float((int32_t)encoderPosition) * (MBL_Z_STEP);
NOLESS(current_position[Z_AXIS], -(LCD_PROBE_Z_RANGE) * 0.5); line_to_z(constrain(z, -(LCD_PROBE_Z_RANGE) * 0.5, (LCD_PROBE_Z_RANGE) * 0.5));
NOMORE(current_position[Z_AXIS], (LCD_PROBE_Z_RANGE) * 0.5);
line_to_current(Z_AXIS);
lcdDrawUpdate = LCDVIEW_CALL_REDRAW_NEXT; lcdDrawUpdate = LCDVIEW_CALL_REDRAW_NEXT;
encoderPosition = 0; encoderPosition = 0;
} }
@ -2299,15 +2299,13 @@ void kill_screen(const char* lcd_msg) {
reset_bed_level(); // After calibration bed-level data is no longer valid reset_bed_level(); // After calibration bed-level data is no longer valid
#endif #endif
current_position[Z_AXIS] = max(Z_HOMING_HEIGHT, Z_CLEARANCE_BETWEEN_PROBES) + (DELTA_PRINTABLE_RADIUS) / 5; line_to_z(max(Z_HOMING_HEIGHT, Z_CLEARANCE_BETWEEN_PROBES) + (DELTA_PRINTABLE_RADIUS) / 5);
line_to_current(Z_AXIS);
current_position[X_AXIS] = a < 0 ? LOGICAL_X_POSITION(X_HOME_POS) : cos(RADIANS(a)) * delta_calibration_radius; current_position[X_AXIS] = a < 0 ? LOGICAL_X_POSITION(X_HOME_POS) : cos(RADIANS(a)) * delta_calibration_radius;
current_position[Y_AXIS] = a < 0 ? LOGICAL_Y_POSITION(Y_HOME_POS) : sin(RADIANS(a)) * delta_calibration_radius; current_position[Y_AXIS] = a < 0 ? LOGICAL_Y_POSITION(Y_HOME_POS) : sin(RADIANS(a)) * delta_calibration_radius;
line_to_current(Z_AXIS); line_to_current_z();
current_position[Z_AXIS] = 4.0; line_to_z(4.0);
line_to_current(Z_AXIS);
lcd_synchronize(); lcd_synchronize();
@ -2536,8 +2534,7 @@ void kill_screen(const char* lcd_msg) {
#if ENABLED(DELTA) #if ENABLED(DELTA)
#define _MOVE_XY_ALLOWED (current_position[Z_AXIS] <= delta_clip_start_height) #define _MOVE_XY_ALLOWED (current_position[Z_AXIS] <= delta_clip_start_height)
void lcd_lower_z_to_clip_height() { void lcd_lower_z_to_clip_height() {
current_position[Z_AXIS] = delta_clip_start_height; line_to_z(delta_clip_start_height);
line_to_current(Z_AXIS);
lcd_synchronize(); lcd_synchronize();
} }
#else #else
@ -4179,7 +4176,7 @@ void pad_message_string() {
// pad with spaces to fill up the line // pad with spaces to fill up the line
while (j++ < LCD_WIDTH) lcd_status_message[i++] = ' '; while (j++ < LCD_WIDTH) lcd_status_message[i++] = ' ';
// chop off at the edge // chop off at the edge
lcd_status_message[i] = '\0'; lcd_status_message[--i] = '\0';
} }
} }

@ -193,17 +193,18 @@ extern volatile uint8_t buttons; //an extended version of the last checked butt
static void lcd_implementation_update_indicators(); static void lcd_implementation_update_indicators();
#endif #endif
static void createChar_P(const char c, const byte * const ptr) {
static void createChar_P(char c, PROGMEM byte *ptr) {
byte temp[8]; byte temp[8];
int8_t i; for (uint8_t i = 0; i < 8; i++)
for(i=0; i<8; i++) {
temp[i] = pgm_read_byte(&ptr[i]); temp[i] = pgm_read_byte(&ptr[i]);
}
lcd.createChar(c, temp); lcd.createChar(c, temp);
} }
static void lcd_set_custom_characters(
#if ENABLED(LCD_PROGRESS_BAR)
const bool info_screen_charset = true
#endif
) {
const static PROGMEM byte bedTemp[8] = { const static PROGMEM byte bedTemp[8] = {
B00000, B00000,
B11111, B11111,
@ -324,12 +325,6 @@ const static PROGMEM byte clock[8] = {
#endif #endif
#endif #endif
static void lcd_set_custom_characters(
#if ENABLED(LCD_PROGRESS_BAR)
const bool info_screen_charset = true
#endif
) {
createChar_P(LCD_BEDTEMP_CHAR, bedTemp); createChar_P(LCD_BEDTEMP_CHAR, bedTemp);
createChar_P(LCD_DEGREE_CHAR, degree); createChar_P(LCD_DEGREE_CHAR, degree);
createChar_P(LCD_STR_THERMOMETER[0], thermometer); createChar_P(LCD_STR_THERMOMETER[0], thermometer);
@ -445,7 +440,7 @@ void lcd_printPGM_utf(const char *str, uint8_t n=LCD_WIDTH) {
} }
void bootscreen() { void bootscreen() {
byte top_left[8] = { const static PROGMEM byte corner[4][8] = { {
B00000, B00000,
B00000, B00000,
B00000, B00000,
@ -454,8 +449,7 @@ void lcd_printPGM_utf(const char *str, uint8_t n=LCD_WIDTH) {
B00010, B00010,
B00100, B00100,
B00100 B00100
}; }, {
byte top_right[8] = {
B00000, B00000,
B00000, B00000,
B00000, B00000,
@ -464,8 +458,7 @@ void lcd_printPGM_utf(const char *str, uint8_t n=LCD_WIDTH) {
B01100, B01100,
B00100, B00100,
B00100 B00100
}; }, {
byte botom_left[8] = {
B00100, B00100,
B00010, B00010,
B00001, B00001,
@ -474,8 +467,7 @@ void lcd_printPGM_utf(const char *str, uint8_t n=LCD_WIDTH) {
B00000, B00000,
B00000, B00000,
B00000 B00000
}; }, {
byte botom_right[8] = {
B00100, B00100,
B01000, B01000,
B10000, B10000,
@ -484,11 +476,9 @@ void lcd_printPGM_utf(const char *str, uint8_t n=LCD_WIDTH) {
B00000, B00000,
B00000, B00000,
B00000 B00000
}; } };
lcd.createChar(0, top_left); for (uint8_t i = 0; i < 4; i++)
lcd.createChar(1, top_right); createChar_P(i, corner[i]);
lcd.createChar(2, botom_left);
lcd.createChar(3, botom_right);
lcd.clear(); lcd.clear();
@ -638,10 +628,12 @@ FORCE_INLINE void _draw_heater_status(const int8_t heater, const char prefix, co
#if ENABLED(LCD_PROGRESS_BAR) #if ENABLED(LCD_PROGRESS_BAR)
inline void lcd_draw_progress_bar(const uint8_t percent) { inline void lcd_draw_progress_bar(const uint8_t percent) {
int tix = (int)(percent * (LCD_WIDTH) * 3) / 100, const int tix = (int)(percent * (LCD_WIDTH) * 3) / 100,
cel = tix / 3, rem = tix % 3, i = LCD_WIDTH; cel = tix / 3,
rem = tix % 3;
uint8_t i = LCD_WIDTH;
char msg[LCD_WIDTH + 1], b = ' '; char msg[LCD_WIDTH + 1], b = ' ';
msg[i] = '\0'; msg[LCD_WIDTH] = '\0';
while (i--) { while (i--) {
if (i == cel - 1) if (i == cel - 1)
b = LCD_STR_PROGRESS[2]; b = LCD_STR_PROGRESS[2];

Loading…
Cancel
Save