Merge pull request #1805 from thinkyhead/fixup_probing
Optimize coordinate copying, fix EXTRUDER_RUNOUT_PREVENT
This commit is contained in:
commit
41ded7e996
@ -503,7 +503,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
|
|||||||
// If you would like to use both a Z PROBE and a Z MIN endstop together or just a Z PROBE with a custom pin, uncomment #define Z_PROBE_ENDSTOP and read the instructions below.
|
// If you would like to use both a Z PROBE and a Z MIN endstop together or just a Z PROBE with a custom pin, uncomment #define Z_PROBE_ENDSTOP and read the instructions below.
|
||||||
// If you want to still use the Z min endstop for homing, disable Z_SAFE_HOMING above. Eg; to park the head outside the bed area when homing with G28.
|
// If you want to still use the Z min endstop for homing, disable Z_SAFE_HOMING above. Eg; to park the head outside the bed area when homing with G28.
|
||||||
// WARNING: The Z MIN endstop will need to set properly as it would without a Z PROBE to prevent head crashes and premature stopping during a print.
|
// WARNING: The Z MIN endstop will need to set properly as it would without a Z PROBE to prevent head crashes and premature stopping during a print.
|
||||||
// To use a separte Z PROBE endstop, you must have a Z_PROBE_PIN defined in the pins.h file for your control board.
|
// To use a separate Z PROBE endstop, you must have a Z_PROBE_PIN defined in the pins.h file for your control board.
|
||||||
// If you are using a servo based Z PROBE, you will need to enable NUM_SERVOS, SERVO_ENDSTOPS and SERVO_ENDSTOPS_ANGLES in the R/C Servo below.
|
// If you are using a servo based Z PROBE, you will need to enable NUM_SERVOS, SERVO_ENDSTOPS and SERVO_ENDSTOPS_ANGLES in the R/C Servo below.
|
||||||
// RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin in the Aux 4 section of the RAMPS board. Use 5V for powered sensors, otherwise connect to ground and D32
|
// RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin in the Aux 4 section of the RAMPS board. Use 5V for powered sensors, otherwise connect to ground and D32
|
||||||
// for normally closed configuration and 5V and D32 for normally open configurations. Normally closed configuration is advised and assumed.
|
// for normally closed configuration and 5V and D32 for normally open configurations. Normally closed configuration is advised and assumed.
|
||||||
|
@ -227,7 +227,7 @@ void enquecommands_P(const char *cmd); //put one or many ASCII commands at the e
|
|||||||
void prepare_arc_move(char isclockwise);
|
void prepare_arc_move(char isclockwise);
|
||||||
void clamp_to_software_endstops(float target[3]);
|
void clamp_to_software_endstops(float target[3]);
|
||||||
|
|
||||||
void refresh_cmd_timeout(void);
|
void refresh_cmd_timeout();
|
||||||
|
|
||||||
#ifdef FAST_PWM_FAN
|
#ifdef FAST_PWM_FAN
|
||||||
void setPwmFrequency(uint8_t pin, int val);
|
void setPwmFrequency(uint8_t pin, int val);
|
||||||
|
@ -287,7 +287,6 @@ MarlinSerial MSerial;
|
|||||||
#endif // !AT90USB
|
#endif // !AT90USB
|
||||||
|
|
||||||
// For AT90USB targets use the UART for BT interfacing
|
// For AT90USB targets use the UART for BT interfacing
|
||||||
#if defined(AT90USB) && defined (BTENABLED)
|
#if defined(AT90USB) && defined(BTENABLED)
|
||||||
HardwareSerial bt;
|
HardwareSerial bt;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -153,8 +153,8 @@ extern MarlinSerial MSerial;
|
|||||||
#endif // !AT90USB
|
#endif // !AT90USB
|
||||||
|
|
||||||
// Use the UART for BT in AT90USB configurations
|
// Use the UART for BT in AT90USB configurations
|
||||||
#if defined(AT90USB) && defined (BTENABLED)
|
#if defined(AT90USB) && defined(BTENABLED)
|
||||||
extern HardwareSerial bt;
|
extern HardwareSerial bt;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1009,6 +1009,8 @@ inline void sync_plan_position() {
|
|||||||
plan_set_position(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], current_position[E_AXIS]);
|
plan_set_position(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], current_position[E_AXIS]);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
inline void set_current_to_destination() { memcpy(current_position, destination, sizeof(current_position)); }
|
||||||
|
inline void set_destination_to_current() { memcpy(destination, current_position, sizeof(destination)); }
|
||||||
|
|
||||||
#ifdef ENABLE_AUTO_BED_LEVELING
|
#ifdef ENABLE_AUTO_BED_LEVELING
|
||||||
|
|
||||||
@ -1020,7 +1022,7 @@ inline void sync_plan_position() {
|
|||||||
refresh_cmd_timeout();
|
refresh_cmd_timeout();
|
||||||
calculate_delta(destination);
|
calculate_delta(destination);
|
||||||
plan_buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], destination[E_AXIS], (feedrate/60)*(feedmultiply/100.0), active_extruder);
|
plan_buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], destination[E_AXIS], (feedrate/60)*(feedmultiply/100.0), active_extruder);
|
||||||
for (int i = 0; i < NUM_AXIS; i++) current_position[i] = destination[i];
|
set_current_to_destination();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1564,7 +1566,7 @@ static void homeaxis(int axis) {
|
|||||||
|
|
||||||
float oldFeedrate = feedrate;
|
float oldFeedrate = feedrate;
|
||||||
|
|
||||||
for (int i = 0; i < NUM_AXIS; i++) destination[i] = current_position[i];
|
set_destination_to_current();
|
||||||
|
|
||||||
if (retracting) {
|
if (retracting) {
|
||||||
|
|
||||||
@ -1769,7 +1771,7 @@ inline void gcode_G28() {
|
|||||||
|
|
||||||
enable_endstops(true);
|
enable_endstops(true);
|
||||||
|
|
||||||
for (int i = 0; i < NUM_AXIS; i++) destination[i] = current_position[i]; // includes E_AXIS
|
set_destination_to_current();
|
||||||
|
|
||||||
feedrate = 0.0;
|
feedrate = 0.0;
|
||||||
|
|
||||||
@ -1997,7 +1999,7 @@ inline void gcode_G28() {
|
|||||||
if (mbl_was_active) {
|
if (mbl_was_active) {
|
||||||
current_position[X_AXIS] = mbl.get_x(0);
|
current_position[X_AXIS] = mbl.get_x(0);
|
||||||
current_position[Y_AXIS] = mbl.get_y(0);
|
current_position[Y_AXIS] = mbl.get_y(0);
|
||||||
for (int i = 0; i < NUM_AXIS; i++) destination[i] = current_position[i];
|
set_destination_to_current();
|
||||||
feedrate = homing_feedrate[X_AXIS];
|
feedrate = homing_feedrate[X_AXIS];
|
||||||
line_to_destination();
|
line_to_destination();
|
||||||
st_synchronize();
|
st_synchronize();
|
||||||
@ -2776,13 +2778,13 @@ inline void gcode_M42() {
|
|||||||
|
|
||||||
#if defined(ENABLE_AUTO_BED_LEVELING) && defined(Z_PROBE_REPEATABILITY_TEST)
|
#if defined(ENABLE_AUTO_BED_LEVELING) && defined(Z_PROBE_REPEATABILITY_TEST)
|
||||||
|
|
||||||
// This is redudant since the SanityCheck.h already checks for a valid Z_PROBE_PIN, but here for clarity.
|
// This is redundant since the SanityCheck.h already checks for a valid Z_PROBE_PIN, but here for clarity.
|
||||||
#ifdef Z_PROBE_ENDSTOP
|
#ifdef Z_PROBE_ENDSTOP
|
||||||
#if !HAS_Z_PROBE
|
#if !HAS_Z_PROBE
|
||||||
#error "You must have a Z_PROBE_PIN defined in order to enable calculation of Z-Probe repeatability."
|
#error You must define Z_PROBE_PIN to enable Z-Probe repeatability calculation.
|
||||||
#endif
|
#endif
|
||||||
#elif !HAS_Z_MIN
|
#elif !HAS_Z_MIN
|
||||||
#error "You must have a Z_MIN_PIN defined in order to enable calculation of Z-Probe repeatability."
|
#error You must define Z_MIN_PIN to enable Z-Probe repeatability calculation.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -4613,7 +4615,7 @@ inline void gcode_T() {
|
|||||||
#if EXTRUDERS > 1
|
#if EXTRUDERS > 1
|
||||||
if (tmp_extruder != active_extruder) {
|
if (tmp_extruder != active_extruder) {
|
||||||
// Save current position to return to after applying extruder offset
|
// Save current position to return to after applying extruder offset
|
||||||
memcpy(destination, current_position, sizeof(destination));
|
set_destination_to_current();
|
||||||
#ifdef DUAL_X_CARRIAGE
|
#ifdef DUAL_X_CARRIAGE
|
||||||
if (dual_x_carriage_mode == DXC_AUTO_PARK_MODE && Stopped == false &&
|
if (dual_x_carriage_mode == DXC_AUTO_PARK_MODE && Stopped == false &&
|
||||||
(delayed_move_time != 0 || current_position[X_AXIS] != x_home_pos(active_extruder))) {
|
(delayed_move_time != 0 || current_position[X_AXIS] != x_home_pos(active_extruder))) {
|
||||||
@ -5338,9 +5340,7 @@ void mesh_plan_buffer_line(float x, float y, float z, const float e, float feed_
|
|||||||
{
|
{
|
||||||
if (!mbl.active) {
|
if (!mbl.active) {
|
||||||
plan_buffer_line(x, y, z, e, feed_rate, extruder);
|
plan_buffer_line(x, y, z, e, feed_rate, extruder);
|
||||||
for(int8_t i=0; i < NUM_AXIS; i++) {
|
set_current_to_destination();
|
||||||
current_position[i] = destination[i];
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
int pix = mbl.select_x_index(current_position[X_AXIS]);
|
int pix = mbl.select_x_index(current_position[X_AXIS]);
|
||||||
@ -5354,9 +5354,7 @@ void mesh_plan_buffer_line(float x, float y, float z, const float e, float feed_
|
|||||||
if (pix == ix && piy == iy) {
|
if (pix == ix && piy == iy) {
|
||||||
// Start and end on same mesh square
|
// Start and end on same mesh square
|
||||||
plan_buffer_line(x, y, z, e, feed_rate, extruder);
|
plan_buffer_line(x, y, z, e, feed_rate, extruder);
|
||||||
for(int8_t i=0; i < NUM_AXIS; i++) {
|
set_current_to_destination();
|
||||||
current_position[i] = destination[i];
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
float nx, ny, ne, normalized_dist;
|
float nx, ny, ne, normalized_dist;
|
||||||
@ -5387,9 +5385,7 @@ void mesh_plan_buffer_line(float x, float y, float z, const float e, float feed_
|
|||||||
} else {
|
} else {
|
||||||
// Already split on a border
|
// Already split on a border
|
||||||
plan_buffer_line(x, y, z, e, feed_rate, extruder);
|
plan_buffer_line(x, y, z, e, feed_rate, extruder);
|
||||||
for(int8_t i=0; i < NUM_AXIS; i++) {
|
set_current_to_destination();
|
||||||
current_position[i] = destination[i];
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Do the split and look for more borders
|
// Do the split and look for more borders
|
||||||
@ -5477,64 +5473,58 @@ void prepare_move() {
|
|||||||
|
|
||||||
#endif // DELTA
|
#endif // DELTA
|
||||||
|
|
||||||
#ifdef DUAL_X_CARRIAGE
|
#ifdef DUAL_X_CARRIAGE
|
||||||
if (active_extruder_parked)
|
if (active_extruder_parked) {
|
||||||
{
|
if (dual_x_carriage_mode == DXC_DUPLICATION_MODE && active_extruder == 0) {
|
||||||
if (dual_x_carriage_mode == DXC_DUPLICATION_MODE && active_extruder == 0)
|
// move duplicate extruder into correct duplication position.
|
||||||
{
|
plan_set_position(inactive_extruder_x_pos, current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
|
||||||
// move duplicate extruder into correct duplication position.
|
plan_buffer_line(current_position[X_AXIS] + duplicate_extruder_x_offset, current_position[Y_AXIS], current_position[Z_AXIS],
|
||||||
plan_set_position(inactive_extruder_x_pos, current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
|
current_position[E_AXIS], max_feedrate[X_AXIS], 1);
|
||||||
plan_buffer_line(current_position[X_AXIS] + duplicate_extruder_x_offset, current_position[Y_AXIS], current_position[Z_AXIS],
|
sync_plan_position();
|
||||||
current_position[E_AXIS], max_feedrate[X_AXIS], 1);
|
st_synchronize();
|
||||||
sync_plan_position();
|
extruder_duplication_enabled = true;
|
||||||
st_synchronize();
|
active_extruder_parked = false;
|
||||||
extruder_duplication_enabled = true;
|
}
|
||||||
active_extruder_parked = false;
|
else if (dual_x_carriage_mode == DXC_AUTO_PARK_MODE) { // handle unparking of head
|
||||||
}
|
if (current_position[E_AXIS] == destination[E_AXIS]) {
|
||||||
else if (dual_x_carriage_mode == DXC_AUTO_PARK_MODE) // handle unparking of head
|
// this is a travel move - skit it but keep track of current position (so that it can later
|
||||||
{
|
// be used as start of first non-travel move)
|
||||||
if (current_position[E_AXIS] == destination[E_AXIS])
|
if (delayed_move_time != 0xFFFFFFFFUL) {
|
||||||
{
|
set_current_to_destination();
|
||||||
// this is a travel move - skit it but keep track of current position (so that it can later
|
if (destination[Z_AXIS] > raised_parked_position[Z_AXIS])
|
||||||
// be used as start of first non-travel move)
|
raised_parked_position[Z_AXIS] = destination[Z_AXIS];
|
||||||
if (delayed_move_time != 0xFFFFFFFFUL)
|
delayed_move_time = millis();
|
||||||
{
|
return;
|
||||||
memcpy(current_position, destination, sizeof(current_position));
|
}
|
||||||
if (destination[Z_AXIS] > raised_parked_position[Z_AXIS])
|
}
|
||||||
raised_parked_position[Z_AXIS] = destination[Z_AXIS];
|
delayed_move_time = 0;
|
||||||
delayed_move_time = millis();
|
// unpark extruder: 1) raise, 2) move into starting XY position, 3) lower
|
||||||
return;
|
plan_buffer_line(raised_parked_position[X_AXIS], raised_parked_position[Y_AXIS], raised_parked_position[Z_AXIS], current_position[E_AXIS], max_feedrate[Z_AXIS], active_extruder);
|
||||||
}
|
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], raised_parked_position[Z_AXIS],
|
||||||
|
current_position[E_AXIS], min(max_feedrate[X_AXIS],max_feedrate[Y_AXIS]), active_extruder);
|
||||||
|
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS],
|
||||||
|
current_position[E_AXIS], max_feedrate[Z_AXIS], active_extruder);
|
||||||
|
active_extruder_parked = false;
|
||||||
}
|
}
|
||||||
delayed_move_time = 0;
|
|
||||||
// unpark extruder: 1) raise, 2) move into starting XY position, 3) lower
|
|
||||||
plan_buffer_line(raised_parked_position[X_AXIS], raised_parked_position[Y_AXIS], raised_parked_position[Z_AXIS], current_position[E_AXIS], max_feedrate[Z_AXIS], active_extruder);
|
|
||||||
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], raised_parked_position[Z_AXIS],
|
|
||||||
current_position[E_AXIS], min(max_feedrate[X_AXIS],max_feedrate[Y_AXIS]), active_extruder);
|
|
||||||
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS],
|
|
||||||
current_position[E_AXIS], max_feedrate[Z_AXIS], active_extruder);
|
|
||||||
active_extruder_parked = false;
|
|
||||||
}
|
}
|
||||||
}
|
#endif // DUAL_X_CARRIAGE
|
||||||
#endif //DUAL_X_CARRIAGE
|
|
||||||
|
|
||||||
#if !defined(DELTA) && !defined(SCARA)
|
#if !defined(DELTA) && !defined(SCARA)
|
||||||
// Do not use feedmultiply for E or Z only moves
|
// Do not use feedmultiply for E or Z only moves
|
||||||
if( (current_position[X_AXIS] == destination [X_AXIS]) && (current_position[Y_AXIS] == destination [Y_AXIS])) {
|
if ( (current_position[X_AXIS] == destination [X_AXIS]) && (current_position[Y_AXIS] == destination [Y_AXIS])) {
|
||||||
line_to_destination();
|
line_to_destination();
|
||||||
} else {
|
}
|
||||||
#ifdef MESH_BED_LEVELING
|
else {
|
||||||
mesh_plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], (feedrate/60)*(feedmultiply/100.0), active_extruder);
|
#ifdef MESH_BED_LEVELING
|
||||||
return;
|
mesh_plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], (feedrate/60)*(feedmultiply/100.0), active_extruder);
|
||||||
#else
|
return;
|
||||||
plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], (feedrate/60)*(feedmultiply/100.0), active_extruder);
|
#else
|
||||||
#endif // MESH_BED_LEVELING
|
plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], (feedrate/60)*(feedmultiply/100.0), active_extruder);
|
||||||
}
|
#endif // MESH_BED_LEVELING
|
||||||
#endif // !(DELTA || SCARA)
|
}
|
||||||
|
#endif // !(DELTA || SCARA)
|
||||||
|
|
||||||
for(int8_t i=0; i < NUM_AXIS; i++) {
|
set_current_to_destination();
|
||||||
current_position[i] = destination[i];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void prepare_arc_move(char isclockwise) {
|
void prepare_arc_move(char isclockwise) {
|
||||||
@ -5546,9 +5536,7 @@ void prepare_arc_move(char isclockwise) {
|
|||||||
// As far as the parser is concerned, the position is now == target. In reality the
|
// As far as the parser is concerned, the position is now == target. In reality the
|
||||||
// motion control system might still be processing the action and the real tool position
|
// motion control system might still be processing the action and the real tool position
|
||||||
// in any intermediate location.
|
// in any intermediate location.
|
||||||
for(int8_t i=0; i < NUM_AXIS; i++) {
|
set_current_to_destination();
|
||||||
current_position[i] = destination[i];
|
|
||||||
}
|
|
||||||
refresh_cmd_timeout();
|
refresh_cmd_timeout();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5718,7 +5706,16 @@ void disable_all_steppers() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Manage several activities:
|
||||||
|
* - Check for Filament Runout
|
||||||
|
* - Keep the command buffer full
|
||||||
|
* - Check for maximum inactive time between commands
|
||||||
|
* - Check for maximum inactive time between stepper commands
|
||||||
|
* - Check if pin CHDK needs to go LOW
|
||||||
|
* - Check for KILL button held down
|
||||||
|
* - Check for HOME button held down
|
||||||
|
* - Check if cooling fan needs to be switched on
|
||||||
|
* - Check if an idle but hot extruder needs filament extruded (EXTRUDER_RUNOUT_PREVENT)
|
||||||
*/
|
*/
|
||||||
void manage_inactivity(bool ignore_stepper_queue/*=false*/) {
|
void manage_inactivity(bool ignore_stepper_queue/*=false*/) {
|
||||||
|
|
||||||
@ -5737,7 +5734,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) {
|
|||||||
&& !ignore_stepper_queue && !blocks_queued())
|
&& !ignore_stepper_queue && !blocks_queued())
|
||||||
disable_all_steppers();
|
disable_all_steppers();
|
||||||
|
|
||||||
#ifdef CHDK //Check if pin should be set to LOW after M240 set it to HIGH
|
#ifdef CHDK // Check if pin should be set to LOW after M240 set it to HIGH
|
||||||
if (chdkActive && ms > chdkHigh + CHDK_DELAY) {
|
if (chdkActive && ms > chdkHigh + CHDK_DELAY) {
|
||||||
chdkActive = false;
|
chdkActive = false;
|
||||||
WRITE(CHDK, LOW);
|
WRITE(CHDK, LOW);
|
||||||
@ -5780,14 +5777,37 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAS_CONTROLLERFAN
|
#if HAS_CONTROLLERFAN
|
||||||
controllerFan(); //Check if fan should be turned on to cool stepper drivers down
|
controllerFan(); // Check if fan should be turned on to cool stepper drivers down
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef EXTRUDER_RUNOUT_PREVENT
|
#ifdef EXTRUDER_RUNOUT_PREVENT
|
||||||
if (ms > previous_millis_cmd + EXTRUDER_RUNOUT_SECONDS * 1000)
|
if (ms > previous_millis_cmd + EXTRUDER_RUNOUT_SECONDS * 1000)
|
||||||
if (degHotend(active_extruder) > EXTRUDER_RUNOUT_MINTEMP) {
|
if (degHotend(active_extruder) > EXTRUDER_RUNOUT_MINTEMP) {
|
||||||
bool oldstatus = E0_ENABLE_READ;
|
bool oldstatus;
|
||||||
enable_e0();
|
switch(active_extruder) {
|
||||||
|
case 0:
|
||||||
|
oldstatus = E0_ENABLE_READ;
|
||||||
|
enable_e0();
|
||||||
|
break;
|
||||||
|
#if EXTRUDERS > 1
|
||||||
|
case 1:
|
||||||
|
oldstatus = E1_ENABLE_READ;
|
||||||
|
enable_e1();
|
||||||
|
break;
|
||||||
|
#if EXTRUDERS > 2
|
||||||
|
case 2:
|
||||||
|
oldstatus = E2_ENABLE_READ;
|
||||||
|
enable_e2();
|
||||||
|
break;
|
||||||
|
#if EXTRUDERS > 3
|
||||||
|
case 3:
|
||||||
|
oldstatus = E3_ENABLE_READ;
|
||||||
|
enable_e3();
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
}
|
||||||
float oldepos = current_position[E_AXIS], oldedes = destination[E_AXIS];
|
float oldepos = current_position[E_AXIS], oldedes = destination[E_AXIS];
|
||||||
plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS],
|
plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS],
|
||||||
destination[E_AXIS] + EXTRUDER_RUNOUT_EXTRUDE * EXTRUDER_RUNOUT_ESTEPS / axis_steps_per_unit[E_AXIS],
|
destination[E_AXIS] + EXTRUDER_RUNOUT_EXTRUDE * EXTRUDER_RUNOUT_ESTEPS / axis_steps_per_unit[E_AXIS],
|
||||||
@ -5797,7 +5817,26 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) {
|
|||||||
plan_set_e_position(oldepos);
|
plan_set_e_position(oldepos);
|
||||||
previous_millis_cmd = ms; // refresh_cmd_timeout()
|
previous_millis_cmd = ms; // refresh_cmd_timeout()
|
||||||
st_synchronize();
|
st_synchronize();
|
||||||
E0_ENABLE_WRITE(oldstatus);
|
switch(active_extruder) {
|
||||||
|
case 0:
|
||||||
|
E0_ENABLE_WRITE(oldstatus);
|
||||||
|
break;
|
||||||
|
#if EXTRUDERS > 1
|
||||||
|
case 1:
|
||||||
|
E1_ENABLE_WRITE(oldstatus);
|
||||||
|
break;
|
||||||
|
#if EXTRUDERS > 2
|
||||||
|
case 2:
|
||||||
|
E2_ENABLE_WRITE(oldstatus);
|
||||||
|
break;
|
||||||
|
#if EXTRUDERS > 3
|
||||||
|
case 3:
|
||||||
|
E3_ENABLE_WRITE(oldstatus);
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -5806,7 +5845,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) {
|
|||||||
if (delayed_move_time && ms > delayed_move_time + 1000 && !Stopped) {
|
if (delayed_move_time && ms > delayed_move_time + 1000 && !Stopped) {
|
||||||
// travel moves have been received so enact them
|
// travel moves have been received so enact them
|
||||||
delayed_move_time = 0xFFFFFFFFUL; // force moves to be done
|
delayed_move_time = 0xFFFFFFFFUL; // force moves to be done
|
||||||
memcpy(destination, current_position, sizeof(destination));
|
set_destination_to_current();
|
||||||
prepare_move();
|
prepare_move();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -100,7 +100,7 @@
|
|||||||
* Require a Z Min pin
|
* Require a Z Min pin
|
||||||
*/
|
*/
|
||||||
#if Z_MIN_PIN == -1
|
#if Z_MIN_PIN == -1
|
||||||
#if Z_PROBE_PIN == -1 || (! defined (Z_PROBE_ENDSTOP) || defined (DISABLE_Z_PROBE_ENDSTOP)) // It's possible for someone to set a pin for the Z Probe, but not enable it.
|
#if Z_PROBE_PIN == -1 || (!defined(Z_PROBE_ENDSTOP) || defined(DISABLE_Z_PROBE_ENDSTOP)) // It's possible for someone to set a pin for the Z Probe, but not enable it.
|
||||||
#ifdef Z_PROBE_REPEATABILITY_TEST
|
#ifdef Z_PROBE_REPEATABILITY_TEST
|
||||||
#error You must have a Z_MIN or Z_PROBE endstop to enable Z_PROBE_REPEATABILITY_TEST.
|
#error You must have a Z_MIN or Z_PROBE endstop to enable Z_PROBE_REPEATABILITY_TEST.
|
||||||
#else
|
#else
|
||||||
|
@ -123,7 +123,7 @@ class Servo {
|
|||||||
int read(); // returns current pulse width as an angle between 0 and 180 degrees
|
int read(); // returns current pulse width as an angle between 0 and 180 degrees
|
||||||
int readMicroseconds(); // returns current pulse width in microseconds for this servo (was read_us() in first release)
|
int readMicroseconds(); // returns current pulse width in microseconds for this servo (was read_us() in first release)
|
||||||
bool attached(); // return true if this servo is attached, otherwise false
|
bool attached(); // return true if this servo is attached, otherwise false
|
||||||
#if defined (ENABLE_AUTO_BED_LEVELING) && (PROBE_SERVO_DEACTIVATION_DELAY > 0)
|
#if defined(ENABLE_AUTO_BED_LEVELING) && PROBE_SERVO_DEACTIVATION_DELAY > 0
|
||||||
int pin; // store the hardware pin of the servo
|
int pin; // store the hardware pin of the servo
|
||||||
#endif
|
#endif
|
||||||
private:
|
private:
|
||||||
|
@ -523,7 +523,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
|
|||||||
// If you would like to use both a Z PROBE and a Z MIN endstop together or just a Z PROBE with a custom pin, uncomment #define Z_PROBE_ENDSTOP and read the instructions below.
|
// If you would like to use both a Z PROBE and a Z MIN endstop together or just a Z PROBE with a custom pin, uncomment #define Z_PROBE_ENDSTOP and read the instructions below.
|
||||||
// If you want to still use the Z min endstop for homing, disable Z_SAFE_HOMING above. Eg; to park the head outside the bed area when homing with G28.
|
// If you want to still use the Z min endstop for homing, disable Z_SAFE_HOMING above. Eg; to park the head outside the bed area when homing with G28.
|
||||||
// WARNING: The Z MIN endstop will need to set properly as it would without a Z PROBE to prevent head crashes and premature stopping during a print.
|
// WARNING: The Z MIN endstop will need to set properly as it would without a Z PROBE to prevent head crashes and premature stopping during a print.
|
||||||
// To use a separte Z PROBE endstop, you must have a Z_PROBE_PIN defined in the pins.h file for your control board.
|
// To use a separate Z PROBE endstop, you must have a Z_PROBE_PIN defined in the pins.h file for your control board.
|
||||||
// If you are using a servo based Z PROBE, you will need to enable NUM_SERVOS, SERVO_ENDSTOPS and SERVO_ENDSTOPS_ANGLES in the R/C Servo below.
|
// If you are using a servo based Z PROBE, you will need to enable NUM_SERVOS, SERVO_ENDSTOPS and SERVO_ENDSTOPS_ANGLES in the R/C Servo below.
|
||||||
// RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin in the Aux 4 section of the RAMPS board. Use 5V for powered sensors, otherwise connect to ground and D32
|
// RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin in the Aux 4 section of the RAMPS board. Use 5V for powered sensors, otherwise connect to ground and D32
|
||||||
// for normally closed configuration and 5V and D32 for normally open configurations. Normally closed configuration is advised and assumed.
|
// for normally closed configuration and 5V and D32 for normally open configurations. Normally closed configuration is advised and assumed.
|
||||||
|
@ -473,7 +473,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
|
|||||||
// If you would like to use both a Z PROBE and a Z MIN endstop together or just a Z PROBE with a custom pin, uncomment #define Z_PROBE_ENDSTOP and read the instructions below.
|
// If you would like to use both a Z PROBE and a Z MIN endstop together or just a Z PROBE with a custom pin, uncomment #define Z_PROBE_ENDSTOP and read the instructions below.
|
||||||
// If you want to still use the Z min endstop for homing, disable Z_SAFE_HOMING above. Eg; to park the head outside the bed area when homing with G28.
|
// If you want to still use the Z min endstop for homing, disable Z_SAFE_HOMING above. Eg; to park the head outside the bed area when homing with G28.
|
||||||
// WARNING: The Z MIN endstop will need to set properly as it would without a Z PROBE to prevent head crashes and premature stopping during a print.
|
// WARNING: The Z MIN endstop will need to set properly as it would without a Z PROBE to prevent head crashes and premature stopping during a print.
|
||||||
// To use a separte Z PROBE endstop, you must have a Z_PROBE_PIN defined in the pins.h file for your control board.
|
// To use a separate Z PROBE endstop, you must have a Z_PROBE_PIN defined in the pins.h file for your control board.
|
||||||
// If you are using a servo based Z PROBE, you will need to enable NUM_SERVOS, SERVO_ENDSTOPS and SERVO_ENDSTOPS_ANGLES in the R/C Servo below.
|
// If you are using a servo based Z PROBE, you will need to enable NUM_SERVOS, SERVO_ENDSTOPS and SERVO_ENDSTOPS_ANGLES in the R/C Servo below.
|
||||||
// RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin in the Aux 4 section of the RAMPS board. Use 5V for powered sensors, otherwise connect to ground and D32
|
// RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin in the Aux 4 section of the RAMPS board. Use 5V for powered sensors, otherwise connect to ground and D32
|
||||||
// for normally closed configuration and 5V and D32 for normally open configurations. Normally closed configuration is advised and assumed.
|
// for normally closed configuration and 5V and D32 for normally open configurations. Normally closed configuration is advised and assumed.
|
||||||
|
@ -473,7 +473,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
|
|||||||
// If you would like to use both a Z PROBE and a Z MIN endstop together or just a Z PROBE with a custom pin, uncomment #define Z_PROBE_ENDSTOP and read the instructions below.
|
// If you would like to use both a Z PROBE and a Z MIN endstop together or just a Z PROBE with a custom pin, uncomment #define Z_PROBE_ENDSTOP and read the instructions below.
|
||||||
// If you want to still use the Z min endstop for homing, disable Z_SAFE_HOMING above. Eg; to park the head outside the bed area when homing with G28.
|
// If you want to still use the Z min endstop for homing, disable Z_SAFE_HOMING above. Eg; to park the head outside the bed area when homing with G28.
|
||||||
// WARNING: The Z MIN endstop will need to set properly as it would without a Z PROBE to prevent head crashes and premature stopping during a print.
|
// WARNING: The Z MIN endstop will need to set properly as it would without a Z PROBE to prevent head crashes and premature stopping during a print.
|
||||||
// To use a separte Z PROBE endstop, you must have a Z_PROBE_PIN defined in the pins.h file for your control board.
|
// To use a separate Z PROBE endstop, you must have a Z_PROBE_PIN defined in the pins.h file for your control board.
|
||||||
// If you are using a servo based Z PROBE, you will need to enable NUM_SERVOS, SERVO_ENDSTOPS and SERVO_ENDSTOPS_ANGLES in the R/C Servo below.
|
// If you are using a servo based Z PROBE, you will need to enable NUM_SERVOS, SERVO_ENDSTOPS and SERVO_ENDSTOPS_ANGLES in the R/C Servo below.
|
||||||
// RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin in the Aux 4 section of the RAMPS board. Use 5V for powered sensors, otherwise connect to ground and D32
|
// RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin in the Aux 4 section of the RAMPS board. Use 5V for powered sensors, otherwise connect to ground and D32
|
||||||
// for normally closed configuration and 5V and D32 for normally open configurations. Normally closed configuration is advised and assumed.
|
// for normally closed configuration and 5V and D32 for normally open configurations. Normally closed configuration is advised and assumed.
|
||||||
|
@ -496,7 +496,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
|
|||||||
// If you would like to use both a Z PROBE and a Z MIN endstop together or just a Z PROBE with a custom pin, uncomment #define Z_PROBE_ENDSTOP and read the instructions below.
|
// If you would like to use both a Z PROBE and a Z MIN endstop together or just a Z PROBE with a custom pin, uncomment #define Z_PROBE_ENDSTOP and read the instructions below.
|
||||||
// If you want to still use the Z min endstop for homing, disable Z_SAFE_HOMING above. Eg; to park the head outside the bed area when homing with G28.
|
// If you want to still use the Z min endstop for homing, disable Z_SAFE_HOMING above. Eg; to park the head outside the bed area when homing with G28.
|
||||||
// WARNING: The Z MIN endstop will need to set properly as it would without a Z PROBE to prevent head crashes and premature stopping during a print.
|
// WARNING: The Z MIN endstop will need to set properly as it would without a Z PROBE to prevent head crashes and premature stopping during a print.
|
||||||
// To use a separte Z PROBE endstop, you must have a Z_PROBE_PIN defined in the pins.h file for your control board.
|
// To use a separate Z PROBE endstop, you must have a Z_PROBE_PIN defined in the pins.h file for your control board.
|
||||||
// If you are using a servo based Z PROBE, you will need to enable NUM_SERVOS, SERVO_ENDSTOPS and SERVO_ENDSTOPS_ANGLES in the R/C Servo below.
|
// If you are using a servo based Z PROBE, you will need to enable NUM_SERVOS, SERVO_ENDSTOPS and SERVO_ENDSTOPS_ANGLES in the R/C Servo below.
|
||||||
// RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin in the Aux 4 section of the RAMPS board. Use 5V for powered sensors, otherwise connect to ground and D32
|
// RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin in the Aux 4 section of the RAMPS board. Use 5V for powered sensors, otherwise connect to ground and D32
|
||||||
// for normally closed configuration and 5V and D32 for normally open configurations. Normally closed configuration is advised and assumed.
|
// for normally closed configuration and 5V and D32 for normally open configurations. Normally closed configuration is advised and assumed.
|
||||||
|
@ -501,7 +501,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
|
|||||||
// If you would like to use both a Z PROBE and a Z MIN endstop together or just a Z PROBE with a custom pin, uncomment #define Z_PROBE_ENDSTOP and read the instructions below.
|
// If you would like to use both a Z PROBE and a Z MIN endstop together or just a Z PROBE with a custom pin, uncomment #define Z_PROBE_ENDSTOP and read the instructions below.
|
||||||
// If you want to still use the Z min endstop for homing, disable Z_SAFE_HOMING above. Eg; to park the head outside the bed area when homing with G28.
|
// If you want to still use the Z min endstop for homing, disable Z_SAFE_HOMING above. Eg; to park the head outside the bed area when homing with G28.
|
||||||
// WARNING: The Z MIN endstop will need to set properly as it would without a Z PROBE to prevent head crashes and premature stopping during a print.
|
// WARNING: The Z MIN endstop will need to set properly as it would without a Z PROBE to prevent head crashes and premature stopping during a print.
|
||||||
// To use a separte Z PROBE endstop, you must have a Z_PROBE_PIN defined in the pins.h file for your control board.
|
// To use a separate Z PROBE endstop, you must have a Z_PROBE_PIN defined in the pins.h file for your control board.
|
||||||
// If you are using a servo based Z PROBE, you will need to enable NUM_SERVOS, SERVO_ENDSTOPS and SERVO_ENDSTOPS_ANGLES in the R/C Servo below.
|
// If you are using a servo based Z PROBE, you will need to enable NUM_SERVOS, SERVO_ENDSTOPS and SERVO_ENDSTOPS_ANGLES in the R/C Servo below.
|
||||||
// RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin in the Aux 4 section of the RAMPS board. Use 5V for powered sensors, otherwise connect to ground and D32
|
// RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin in the Aux 4 section of the RAMPS board. Use 5V for powered sensors, otherwise connect to ground and D32
|
||||||
// for normally closed configuration and 5V and D32 for normally open configurations. Normally closed configuration is advised and assumed.
|
// for normally closed configuration and 5V and D32 for normally open configurations. Normally closed configuration is advised and assumed.
|
||||||
|
@ -525,7 +525,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
|
|||||||
// If you would like to use both a Z PROBE and a Z MIN endstop together or just a Z PROBE with a custom pin, uncomment #define Z_PROBE_ENDSTOP and read the instructions below.
|
// If you would like to use both a Z PROBE and a Z MIN endstop together or just a Z PROBE with a custom pin, uncomment #define Z_PROBE_ENDSTOP and read the instructions below.
|
||||||
// If you want to still use the Z min endstop for homing, disable Z_SAFE_HOMING above. Eg; to park the head outside the bed area when homing with G28.
|
// If you want to still use the Z min endstop for homing, disable Z_SAFE_HOMING above. Eg; to park the head outside the bed area when homing with G28.
|
||||||
// WARNING: The Z MIN endstop will need to set properly as it would without a Z PROBE to prevent head crashes and premature stopping during a print.
|
// WARNING: The Z MIN endstop will need to set properly as it would without a Z PROBE to prevent head crashes and premature stopping during a print.
|
||||||
// To use a separte Z PROBE endstop, you must have a Z_PROBE_PIN defined in the pins.h file for your control board.
|
// To use a separate Z PROBE endstop, you must have a Z_PROBE_PIN defined in the pins.h file for your control board.
|
||||||
// If you are using a servo based Z PROBE, you will need to enable NUM_SERVOS, SERVO_ENDSTOPS and SERVO_ENDSTOPS_ANGLES in the R/C Servo below.
|
// If you are using a servo based Z PROBE, you will need to enable NUM_SERVOS, SERVO_ENDSTOPS and SERVO_ENDSTOPS_ANGLES in the R/C Servo below.
|
||||||
// RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin in the Aux 4 section of the RAMPS board. Use 5V for powered sensors, otherwise connect to ground and D32
|
// RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin in the Aux 4 section of the RAMPS board. Use 5V for powered sensors, otherwise connect to ground and D32
|
||||||
// for normally closed configuration and 5V and D32 for normally open configurations. Normally closed configuration is advised and assumed.
|
// for normally closed configuration and 5V and D32 for normally open configurations. Normally closed configuration is advised and assumed.
|
||||||
|
@ -495,7 +495,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
|
|||||||
// If you would like to use both a Z PROBE and a Z MIN endstop together or just a Z PROBE with a custom pin, uncomment #define Z_PROBE_ENDSTOP and read the instructions below.
|
// If you would like to use both a Z PROBE and a Z MIN endstop together or just a Z PROBE with a custom pin, uncomment #define Z_PROBE_ENDSTOP and read the instructions below.
|
||||||
// If you want to still use the Z min endstop for homing, disable Z_SAFE_HOMING above. Eg; to park the head outside the bed area when homing with G28.
|
// If you want to still use the Z min endstop for homing, disable Z_SAFE_HOMING above. Eg; to park the head outside the bed area when homing with G28.
|
||||||
// WARNING: The Z MIN endstop will need to set properly as it would without a Z PROBE to prevent head crashes and premature stopping during a print.
|
// WARNING: The Z MIN endstop will need to set properly as it would without a Z PROBE to prevent head crashes and premature stopping during a print.
|
||||||
// To use a separte Z PROBE endstop, you must have a Z_PROBE_PIN defined in the pins.h file for your control board.
|
// To use a separate Z PROBE endstop, you must have a Z_PROBE_PIN defined in the pins.h file for your control board.
|
||||||
// If you are using a servo based Z PROBE, you will need to enable NUM_SERVOS, SERVO_ENDSTOPS and SERVO_ENDSTOPS_ANGLES in the R/C Servo below.
|
// If you are using a servo based Z PROBE, you will need to enable NUM_SERVOS, SERVO_ENDSTOPS and SERVO_ENDSTOPS_ANGLES in the R/C Servo below.
|
||||||
// RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin in the Aux 4 section of the RAMPS board. Use 5V for powered sensors, otherwise connect to ground and D32
|
// RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin in the Aux 4 section of the RAMPS board. Use 5V for powered sensors, otherwise connect to ground and D32
|
||||||
// for normally closed configuration and 5V and D32 for normally open configurations. Normally closed configuration is advised and assumed.
|
// for normally closed configuration and 5V and D32 for normally open configurations. Normally closed configuration is advised and assumed.
|
||||||
|
@ -541,7 +541,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
|
|||||||
// If you would like to use both a Z PROBE and a Z MIN endstop together or just a Z PROBE with a custom pin, uncomment #define Z_PROBE_ENDSTOP and read the instructions below.
|
// If you would like to use both a Z PROBE and a Z MIN endstop together or just a Z PROBE with a custom pin, uncomment #define Z_PROBE_ENDSTOP and read the instructions below.
|
||||||
// If you want to still use the Z min endstop for homing, disable Z_SAFE_HOMING above. Eg; to park the head outside the bed area when homing with G28.
|
// If you want to still use the Z min endstop for homing, disable Z_SAFE_HOMING above. Eg; to park the head outside the bed area when homing with G28.
|
||||||
// WARNING: The Z MIN endstop will need to set properly as it would without a Z PROBE to prevent head crashes and premature stopping during a print.
|
// WARNING: The Z MIN endstop will need to set properly as it would without a Z PROBE to prevent head crashes and premature stopping during a print.
|
||||||
// To use a separte Z PROBE endstop, you must have a Z_PROBE_PIN defined in the pins.h file for your control board.
|
// To use a separate Z PROBE endstop, you must have a Z_PROBE_PIN defined in the pins.h file for your control board.
|
||||||
// If you are using a servo based Z PROBE, you will need to enable NUM_SERVOS, SERVO_ENDSTOPS and SERVO_ENDSTOPS_ANGLES in the R/C Servo below.
|
// If you are using a servo based Z PROBE, you will need to enable NUM_SERVOS, SERVO_ENDSTOPS and SERVO_ENDSTOPS_ANGLES in the R/C Servo below.
|
||||||
// RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin in the Aux 4 section of the RAMPS board. Use 5V for powered sensors, otherwise connect to ground and D32
|
// RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin in the Aux 4 section of the RAMPS board. Use 5V for powered sensors, otherwise connect to ground and D32
|
||||||
// for normally closed configuration and 5V and D32 for normally open configurations. Normally closed configuration is advised and assumed.
|
// for normally closed configuration and 5V and D32 for normally open configurations. Normally closed configuration is advised and assumed.
|
||||||
|
@ -545,7 +545,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
|
|||||||
// If you would like to use both a Z PROBE and a Z MIN endstop together or just a Z PROBE with a custom pin, uncomment #define Z_PROBE_ENDSTOP and read the instructions below.
|
// If you would like to use both a Z PROBE and a Z MIN endstop together or just a Z PROBE with a custom pin, uncomment #define Z_PROBE_ENDSTOP and read the instructions below.
|
||||||
// If you want to still use the Z min endstop for homing, disable Z_SAFE_HOMING above. Eg; to park the head outside the bed area when homing with G28.
|
// If you want to still use the Z min endstop for homing, disable Z_SAFE_HOMING above. Eg; to park the head outside the bed area when homing with G28.
|
||||||
// WARNING: The Z MIN endstop will need to set properly as it would without a Z PROBE to prevent head crashes and premature stopping during a print.
|
// WARNING: The Z MIN endstop will need to set properly as it would without a Z PROBE to prevent head crashes and premature stopping during a print.
|
||||||
// To use a separte Z PROBE endstop, you must have a Z_PROBE_PIN defined in the pins.h file for your control board.
|
// To use a separate Z PROBE endstop, you must have a Z_PROBE_PIN defined in the pins.h file for your control board.
|
||||||
// If you are using a servo based Z PROBE, you will need to enable NUM_SERVOS, SERVO_ENDSTOPS and SERVO_ENDSTOPS_ANGLES in the R/C Servo below.
|
// If you are using a servo based Z PROBE, you will need to enable NUM_SERVOS, SERVO_ENDSTOPS and SERVO_ENDSTOPS_ANGLES in the R/C Servo below.
|
||||||
// RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin in the Aux 4 section of the RAMPS board. Use 5V for powered sensors, otherwise connect to ground and D32
|
// RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin in the Aux 4 section of the RAMPS board. Use 5V for powered sensors, otherwise connect to ground and D32
|
||||||
// for normally closed configuration and 5V and D32 for normally open configurations. Normally closed configuration is advised and assumed.
|
// for normally closed configuration and 5V and D32 for normally open configurations. Normally closed configuration is advised and assumed.
|
||||||
|
@ -493,7 +493,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
|
|||||||
// If you would like to use both a Z PROBE and a Z MIN endstop together or just a Z PROBE with a custom pin, uncomment #define Z_PROBE_ENDSTOP and read the instructions below.
|
// If you would like to use both a Z PROBE and a Z MIN endstop together or just a Z PROBE with a custom pin, uncomment #define Z_PROBE_ENDSTOP and read the instructions below.
|
||||||
// If you want to still use the Z min endstop for homing, disable Z_SAFE_HOMING above. Eg; to park the head outside the bed area when homing with G28.
|
// If you want to still use the Z min endstop for homing, disable Z_SAFE_HOMING above. Eg; to park the head outside the bed area when homing with G28.
|
||||||
// WARNING: The Z MIN endstop will need to set properly as it would without a Z PROBE to prevent head crashes and premature stopping during a print.
|
// WARNING: The Z MIN endstop will need to set properly as it would without a Z PROBE to prevent head crashes and premature stopping during a print.
|
||||||
// To use a separte Z PROBE endstop, you must have a Z_PROBE_PIN defined in the pins.h file for your control board.
|
// To use a separate Z PROBE endstop, you must have a Z_PROBE_PIN defined in the pins.h file for your control board.
|
||||||
// If you are using a servo based Z PROBE, you will need to enable NUM_SERVOS, SERVO_ENDSTOPS and SERVO_ENDSTOPS_ANGLES in the R/C Servo below.
|
// If you are using a servo based Z PROBE, you will need to enable NUM_SERVOS, SERVO_ENDSTOPS and SERVO_ENDSTOPS_ANGLES in the R/C Servo below.
|
||||||
// RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin in the Aux 4 section of the RAMPS board. Use 5V for powered sensors, otherwise connect to ground and D32
|
// RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin in the Aux 4 section of the RAMPS board. Use 5V for powered sensors, otherwise connect to ground and D32
|
||||||
// for normally closed configuration and 5V and D32 for normally open configurations. Normally closed configuration is advised and assumed.
|
// for normally closed configuration and 5V and D32 for normally open configurations. Normally closed configuration is advised and assumed.
|
||||||
|
@ -495,7 +495,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
|
|||||||
// If you would like to use both a Z PROBE and a Z MIN endstop together or just a Z PROBE with a custom pin, uncomment #define Z_PROBE_ENDSTOP and read the instructions below.
|
// If you would like to use both a Z PROBE and a Z MIN endstop together or just a Z PROBE with a custom pin, uncomment #define Z_PROBE_ENDSTOP and read the instructions below.
|
||||||
// If you want to still use the Z min endstop for homing, disable Z_SAFE_HOMING above. Eg; to park the head outside the bed area when homing with G28.
|
// If you want to still use the Z min endstop for homing, disable Z_SAFE_HOMING above. Eg; to park the head outside the bed area when homing with G28.
|
||||||
// WARNING: The Z MIN endstop will need to set properly as it would without a Z PROBE to prevent head crashes and premature stopping during a print.
|
// WARNING: The Z MIN endstop will need to set properly as it would without a Z PROBE to prevent head crashes and premature stopping during a print.
|
||||||
// To use a separte Z PROBE endstop, you must have a Z_PROBE_PIN defined in the pins.h file for your control board.
|
// To use a separate Z PROBE endstop, you must have a Z_PROBE_PIN defined in the pins.h file for your control board.
|
||||||
// If you are using a servo based Z PROBE, you will need to enable NUM_SERVOS, SERVO_ENDSTOPS and SERVO_ENDSTOPS_ANGLES in the R/C Servo below.
|
// If you are using a servo based Z PROBE, you will need to enable NUM_SERVOS, SERVO_ENDSTOPS and SERVO_ENDSTOPS_ANGLES in the R/C Servo below.
|
||||||
// RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin in the Aux 4 section of the RAMPS board. Use 5V for powered sensors, otherwise connect to ground and D32
|
// RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin in the Aux 4 section of the RAMPS board. Use 5V for powered sensors, otherwise connect to ground and D32
|
||||||
// for normally closed configuration and 5V and D32 for normally open configurations. Normally closed configuration is advised and assumed.
|
// for normally closed configuration and 5V and D32 for normally open configurations. Normally closed configuration is advised and assumed.
|
||||||
|
@ -91,7 +91,7 @@
|
|||||||
added as necessary or if I feel like it- not a comprehensive list!
|
added as necessary or if I feel like it- not a comprehensive list!
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined (__AVR_ATmega168__) || defined (__AVR_ATmega328__) || defined (__AVR_ATmega328P__)
|
#if defined(__AVR_ATmega168__) || defined(__AVR_ATmega328__) || defined(__AVR_ATmega328P__)
|
||||||
// UART
|
// UART
|
||||||
#define RXD DIO0
|
#define RXD DIO0
|
||||||
#define TXD DIO1
|
#define TXD DIO1
|
||||||
@ -426,7 +426,7 @@ pins
|
|||||||
#define PD7_PWM NULL
|
#define PD7_PWM NULL
|
||||||
#endif /* _AVR_ATmega{168,328,328P}__ */
|
#endif /* _AVR_ATmega{168,328,328P}__ */
|
||||||
|
|
||||||
#if defined (__AVR_ATmega644__) || defined (__AVR_ATmega644P__) || defined (__AVR_ATmega644PA__) || defined (__AVR_ATmega1284P__)
|
#if defined(__AVR_ATmega644__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644PA__) || defined(__AVR_ATmega1284P__)
|
||||||
// UART
|
// UART
|
||||||
#define RXD DIO8
|
#define RXD DIO8
|
||||||
#define TXD DIO9
|
#define TXD DIO9
|
||||||
@ -929,7 +929,7 @@ pins
|
|||||||
#define PD7_PWM OCR2A
|
#define PD7_PWM OCR2A
|
||||||
#endif /* _AVR_ATmega{644,644P,644PA}__ */
|
#endif /* _AVR_ATmega{644,644P,644PA}__ */
|
||||||
|
|
||||||
#if defined (__AVR_ATmega1280__) || defined (__AVR_ATmega2560__)
|
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
|
||||||
// UART
|
// UART
|
||||||
#define RXD DIO0
|
#define RXD DIO0
|
||||||
#define TXD DIO1
|
#define TXD DIO1
|
||||||
@ -2024,7 +2024,7 @@ pins
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined (__AVR_AT90USB1287__) || defined (__AVR_AT90USB1286__) || defined (__AVR_AT90USB646__) || defined(__AVR_AT90USB647__)
|
#if defined(__AVR_AT90USB1287__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__)
|
||||||
// SPI
|
// SPI
|
||||||
#define SCK DIO9
|
#define SCK DIO9
|
||||||
#define MISO DIO11
|
#define MISO DIO11
|
||||||
@ -3322,7 +3322,7 @@ Teensy 28 29 30 31 32 33 34 35 20 21 22 23 24 25 26 27 10 11 12 13 14 15 16 17
|
|||||||
#endif // __AVR_AT90usbxxx__
|
#endif // __AVR_AT90usbxxx__
|
||||||
|
|
||||||
|
|
||||||
#if defined (__AVR_ATmega1281__) || defined (__AVR_ATmega2561__)
|
#if defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__)
|
||||||
// UART
|
// UART
|
||||||
#define RXD DIO0
|
#define RXD DIO0
|
||||||
#define TXD DIO1
|
#define TXD DIO1
|
||||||
|
@ -187,7 +187,7 @@
|
|||||||
#define Z_MIN_PIN -1
|
#define Z_MIN_PIN -1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined (DISABLE_Z_PROBE_ENDSTOP) || ! defined (Z_PROBE_ENDSTOP) // Allow code to compile regardless of Z_PROBE_ENDSTOP setting.
|
#if defined(DISABLE_Z_PROBE_ENDSTOP) || !defined(Z_PROBE_ENDSTOP) // Allow code to compile regardless of Z_PROBE_ENDSTOP setting.
|
||||||
#define Z_PROBE_PIN -1
|
#define Z_PROBE_PIN -1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -220,8 +220,11 @@
|
|||||||
#define Z_MIN_PIN -1
|
#define Z_MIN_PIN -1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define SENSITIVE_PINS { 0, 1, X_STEP_PIN, X_DIR_PIN, X_ENABLE_PIN, X_MIN_PIN, X_MAX_PIN, Y_STEP_PIN, Y_DIR_PIN, Y_ENABLE_PIN, Y_MIN_PIN, Y_MAX_PIN, Z_STEP_PIN, Z_DIR_PIN, Z_ENABLE_PIN, Z_MIN_PIN, Z_MAX_PIN, Z_PROBE_PIN, PS_ON_PIN, \
|
#define SENSITIVE_PINS { 0, 1, \
|
||||||
HEATER_BED_PIN, FAN_PIN, \
|
X_STEP_PIN, X_DIR_PIN, X_ENABLE_PIN, X_MIN_PIN, X_MAX_PIN, \
|
||||||
|
Y_STEP_PIN, Y_DIR_PIN, Y_ENABLE_PIN, Y_MIN_PIN, Y_MAX_PIN, \
|
||||||
|
Z_STEP_PIN, Z_DIR_PIN, Z_ENABLE_PIN, Z_MIN_PIN, Z_MAX_PIN, Z_PROBE_PIN, \
|
||||||
|
PS_ON_PIN, HEATER_BED_PIN, FAN_PIN, \
|
||||||
_E0_PINS _E1_PINS _E2_PINS _E3_PINS \
|
_E0_PINS _E1_PINS _E2_PINS _E3_PINS \
|
||||||
analogInputToDigitalPin(TEMP_BED_PIN) \
|
analogInputToDigitalPin(TEMP_BED_PIN) \
|
||||||
}
|
}
|
||||||
|
@ -62,12 +62,12 @@
|
|||||||
#define FILWIDTH_PIN 5
|
#define FILWIDTH_PIN 5
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(Z_PROBE_ENDSTOP)
|
#ifdef Z_PROBE_ENDSTOP
|
||||||
// Define a pin to use as the signal pin on Arduino for the Z_PROBE endstop.
|
// Define a pin to use as the signal pin on Arduino for the Z_PROBE endstop.
|
||||||
#define Z_PROBE_PIN 32
|
#define Z_PROBE_PIN 32
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(FILAMENT_RUNOUT_SENSOR)
|
#ifdef FILAMENT_RUNOUT_SENSOR
|
||||||
// define digital pin 4 for the filament runout sensor. Use the RAMPS 1.4 digital input 4 on the servos connector
|
// define digital pin 4 for the filament runout sensor. Use the RAMPS 1.4 digital input 4 on the servos connector
|
||||||
#define FILRUNOUT_PIN 4
|
#define FILRUNOUT_PIN 4
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user