home.c: introduce SLOW_HOMING
This commit is contained in:
parent
df693c0113
commit
129bdc64bc
|
|
@ -80,6 +80,12 @@
|
|||
#define SEARCH_FEEDRATE_Z 50
|
||||
// no SEARCH_FEEDRATE_E, as E can't be searched
|
||||
|
||||
/** \def SLOW_HOMING
|
||||
wether to search the home point slowly
|
||||
With some endstop configurations, like when probing for the surface of a PCB, you can't deal with overrunning the endstop. In such a case, uncomment this definition.
|
||||
*/
|
||||
// #define SLOW_HOMING
|
||||
|
||||
/// this is how many steps to suck back the filament by when we stop. set to zero to disable
|
||||
#define E_STARTSTOP_STEPS 20
|
||||
|
||||
|
|
|
|||
|
|
@ -81,6 +81,12 @@
|
|||
#define SEARCH_FEEDRATE_Z 50
|
||||
// no SEARCH_FEEDRATE_E, as E can't be searched
|
||||
|
||||
/** \def SLOW_HOMING
|
||||
wether to search the home point slowly
|
||||
With some endstop configurations, like when probing for the surface of a PCB, you can't deal with overrunning the endstop. In such a case, uncomment this definition.
|
||||
*/
|
||||
// #define SLOW_HOMING
|
||||
|
||||
/// this is how many steps to suck back the filament by when we stop. set to zero to disable
|
||||
#define E_STARTSTOP_STEPS 20
|
||||
|
||||
|
|
|
|||
|
|
@ -81,6 +81,12 @@
|
|||
#define SEARCH_FEEDRATE_Z 50
|
||||
// no SEARCH_FEEDRATE_E, as E can't be searched
|
||||
|
||||
/** \def SLOW_HOMING
|
||||
wether to search the home point slowly
|
||||
With some endstop configurations, like when probing for the surface of a PCB, you can't deal with overrunning the endstop. In such a case, uncomment this definition.
|
||||
*/
|
||||
// #define SLOW_HOMING
|
||||
|
||||
/// this is how many steps to suck back the filament by when we stop. set to zero to disable
|
||||
#define E_STARTSTOP_STEPS 20
|
||||
|
||||
|
|
|
|||
|
|
@ -85,6 +85,12 @@
|
|||
#define SEARCH_FEEDRATE_Z 50
|
||||
// no SEARCH_FEEDRATE_E, as E can't be searched
|
||||
|
||||
/** \def SLOW_HOMING
|
||||
wether to search the home point slowly
|
||||
With some endstop configurations, like when probing for the surface of a PCB, you can't deal with overrunning the endstop. In such a case, uncomment this definition.
|
||||
*/
|
||||
// #define SLOW_HOMING
|
||||
|
||||
/// this is how many steps to suck back the filament by when we stop. set to zero to disable
|
||||
#define E_STARTSTOP_STEPS 289
|
||||
|
||||
|
|
|
|||
|
|
@ -86,6 +86,12 @@
|
|||
#define SEARCH_FEEDRATE_Z 1
|
||||
// no SEARCH_FEEDRATE_E, as E can't be searched
|
||||
|
||||
/** \def SLOW_HOMING
|
||||
wether to search the home point slowly
|
||||
With some endstop configurations, like when probing for the surface of a PCB, you can't deal with overrunning the endstop. In such a case, uncomment this definition.
|
||||
*/
|
||||
// #define SLOW_HOMING
|
||||
|
||||
/// this is how many steps to suck back the filament by when we stop. set to zero to disable
|
||||
#define E_STARTSTOP_STEPS 0
|
||||
|
||||
|
|
|
|||
|
|
@ -86,6 +86,12 @@
|
|||
#define SEARCH_FEEDRATE_Z 1
|
||||
// no SEARCH_FEEDRATE_E, as E can't be searched
|
||||
|
||||
/** \def SLOW_HOMING
|
||||
wether to search the home point slowly
|
||||
With some endstop configurations, like when probing for the surface of a PCB, you can't deal with overrunning the endstop. In such a case, uncomment this definition.
|
||||
*/
|
||||
// #define SLOW_HOMING
|
||||
|
||||
/// this is how many steps to suck back the filament by when we stop. set to zero to disable
|
||||
#define E_STARTSTOP_STEPS 0
|
||||
|
||||
|
|
|
|||
|
|
@ -84,6 +84,12 @@
|
|||
#define SEARCH_FEEDRATE_Z 50
|
||||
// no SEARCH_FEEDRATE_E, as E can't be searched
|
||||
|
||||
/** \def SLOW_HOMING
|
||||
wether to search the home point slowly
|
||||
With some endstop configurations, like when probing for the surface of a PCB, you can't deal with overrunning the endstop. In such a case, uncomment this definition.
|
||||
*/
|
||||
// #define SLOW_HOMING
|
||||
|
||||
/// this is how many steps to suck back the filament by when we stop. set to zero to disable
|
||||
#define E_STARTSTOP_STEPS 20
|
||||
|
||||
|
|
|
|||
|
|
@ -84,6 +84,12 @@
|
|||
#define SEARCH_FEEDRATE_Z 50
|
||||
// no SEARCH_FEEDRATE_E, as E can't be searched
|
||||
|
||||
/** \def SLOW_HOMING
|
||||
wether to search the home point slowly
|
||||
With some endstop configurations, like when probing for the surface of a PCB, you can't deal with overrunning the endstop. In such a case, uncomment this definition.
|
||||
*/
|
||||
// #define SLOW_HOMING
|
||||
|
||||
/// this is how many steps to suck back the filament by when we stop. set to zero to disable
|
||||
#define E_STARTSTOP_STEPS 20
|
||||
|
||||
|
|
|
|||
114
home.c
114
home.c
|
|
@ -35,15 +35,22 @@ void home_x_negative() {
|
|||
#if defined X_MIN_PIN
|
||||
TARGET t = {0, current_position.Y, current_position.Z};
|
||||
|
||||
// hit home hard
|
||||
t.X = -1000*STEPS_PER_MM_X;
|
||||
t.F = MAXIMUM_FEEDRATE_X;
|
||||
#ifdef SLOW_HOMING
|
||||
// hit home soft
|
||||
t.F = SEARCH_FEEDRATE_X;
|
||||
#else
|
||||
// hit home hard
|
||||
t.F = MAXIMUM_FEEDRATE_X;
|
||||
#endif
|
||||
enqueue_home(&t, 0x1, 1);
|
||||
|
||||
// back off slowly
|
||||
t.X = +1000*STEPS_PER_MM_X;
|
||||
t.F = SEARCH_FEEDRATE_X;
|
||||
enqueue_home(&t, 0x1, 0);
|
||||
#ifndef SLOW_HOMING
|
||||
// back off slowly
|
||||
t.X = +1000*STEPS_PER_MM_X;
|
||||
t.F = SEARCH_FEEDRATE_X;
|
||||
enqueue_home(&t, 0x1, 0);
|
||||
#endif
|
||||
|
||||
// set X home
|
||||
#ifdef X_MIN
|
||||
|
|
@ -59,15 +66,22 @@ void home_x_positive() {
|
|||
#if defined X_MAX_PIN
|
||||
TARGET t = {0, current_position.Y, current_position.Z};
|
||||
|
||||
// hit home hard
|
||||
t.X = +1000*STEPS_PER_MM_X;
|
||||
t.F = MAXIMUM_FEEDRATE_X;
|
||||
#ifdef SLOW_HOMING
|
||||
// hit home soft
|
||||
t.F = SEARCH_FEEDRATE_X;
|
||||
#else
|
||||
// hit home hard
|
||||
t.F = MAXIMUM_FEEDRATE_X;
|
||||
#endif
|
||||
enqueue_home(t, 0x1, 1);
|
||||
|
||||
// back off slowly
|
||||
t.X = -1000*STEPS_PER_MM_X;
|
||||
t.F = SEARCH_FEEDRATE_X;
|
||||
enqueue_home(t, 0x1, 0);
|
||||
#ifndef SLOW_HOMING
|
||||
// back off slowly
|
||||
t.X = -1000*STEPS_PER_MM_X;
|
||||
t.F = SEARCH_FEEDRATE_X;
|
||||
enqueue_home(t, 0x1, 0);
|
||||
#endif
|
||||
|
||||
// set X home
|
||||
// set position to MAX
|
||||
|
|
@ -84,15 +98,22 @@ void home_y_negative() {
|
|||
#if defined Y_MIN_PIN
|
||||
TARGET t = {0, current_position.Y, current_position.Z};
|
||||
|
||||
// hit home hard
|
||||
t.Y = -1000*STEPS_PER_MM_Y;
|
||||
t.F = MAXIMUM_FEEDRATE_Y;
|
||||
#ifdef SLOW_HOMING
|
||||
// hit home soft
|
||||
t.F = SEARCH_FEEDRATE_Y;
|
||||
#else
|
||||
// hit home hard
|
||||
t.F = MAXIMUM_FEEDRATE_Y;
|
||||
#endif
|
||||
enqueue_home(&t, 0x2, 1);
|
||||
|
||||
// back off slowly
|
||||
t.Y = +1000*STEPS_PER_MM_Y;
|
||||
t.F = SEARCH_FEEDRATE_Y;
|
||||
enqueue_home(&t, 0x2, 0);
|
||||
#ifndef SLOW_HOMING
|
||||
// back off slowly
|
||||
t.Y = +1000*STEPS_PER_MM_Y;
|
||||
t.F = SEARCH_FEEDRATE_Y;
|
||||
enqueue_home(&t, 0x2, 0);
|
||||
#endif
|
||||
|
||||
// set Y home
|
||||
#ifdef Y_MIN
|
||||
|
|
@ -108,15 +129,22 @@ void home_y_positive() {
|
|||
#if defined Y_MAX_PIN
|
||||
TARGET t = {0, current_position.Y, current_position.Z};
|
||||
|
||||
// hit home hard
|
||||
t.Y = +1000*STEPS_PER_MM_Y;
|
||||
t.F = MAXIMUM_FEEDRATE_Y;
|
||||
#ifdef SLOW_HOMING
|
||||
// hit home soft
|
||||
t.F = SEARCH_FEEDRATE_Y;
|
||||
#else
|
||||
// hit home hard
|
||||
t.F = MAXIMUM_FEEDRATE_Y;
|
||||
#endif
|
||||
enqueue_home(&t, 0x2, 1);
|
||||
|
||||
// back off slowly
|
||||
t.X = -1000*STEPS_PER_MM_Y;
|
||||
t.F = SEARCH_FEEDRATE_Y;
|
||||
enqueue_home(&t, 0x2, 0);
|
||||
#ifndef SLOW_HOMING
|
||||
// back off slowly
|
||||
t.X = -1000*STEPS_PER_MM_Y;
|
||||
t.F = SEARCH_FEEDRATE_Y;
|
||||
enqueue_home(&t, 0x2, 0);
|
||||
#endif
|
||||
|
||||
// set Y home
|
||||
// set position to MAX
|
||||
|
|
@ -133,15 +161,22 @@ void home_z_negative() {
|
|||
#if defined Z_MIN_PIN
|
||||
TARGET t = {current_position.X, current_position.Y, 0};
|
||||
|
||||
// hit home hard
|
||||
t.Z = -1000*STEPS_PER_MM_Z;
|
||||
t.F = MAXIMUM_FEEDRATE_Z;
|
||||
#ifdef SLOW_HOMING
|
||||
// hit home soft
|
||||
t.F = SEARCH_FEEDRATE_Z;
|
||||
#else
|
||||
// hit home hard
|
||||
t.F = MAXIMUM_FEEDRATE_Z;
|
||||
#endif
|
||||
enqueue_home(&t, 0x4, 1);
|
||||
|
||||
// back off slowly
|
||||
t.Z = +1000*STEPS_PER_MM_Z;
|
||||
t.F = SEARCH_FEEDRATE_Z;
|
||||
enqueue_home(&t, 0x4, 0);
|
||||
#ifndef SLOW_HOMING
|
||||
// back off slowly
|
||||
t.Z = +1000*STEPS_PER_MM_Z;
|
||||
t.F = SEARCH_FEEDRATE_Z;
|
||||
enqueue_home(&t, 0x4, 0);
|
||||
#endif
|
||||
|
||||
// set Z home
|
||||
#ifdef Z_MIN
|
||||
|
|
@ -158,15 +193,22 @@ void home_z_positive() {
|
|||
#if defined Z_MAX_PIN
|
||||
TARGET t = {current_position.X, current_position.Y, 0};
|
||||
|
||||
// hit home hard
|
||||
t.Z = +1000*STEPS_PER_MM_Z;
|
||||
t.F = MAXIMUM_FEEDRATE_Z;
|
||||
#ifdef SLOW_HOMING
|
||||
// hit home soft
|
||||
t.F = SEARCH_FEEDRATE_Z;
|
||||
#else
|
||||
// hit home hard
|
||||
t.F = MAXIMUM_FEEDRATE_Z;
|
||||
#endif
|
||||
enqueue_home(&t, 0x4, 1);
|
||||
|
||||
// back off slowly
|
||||
t.Z = -1000*STEPS_PER_MM_Z;
|
||||
t.F = SEARCH_FEEDRATE_Z;
|
||||
enqueue_home(&t, 0x4, 0);
|
||||
#ifndef SLOW_HOMING
|
||||
// back off slowly
|
||||
t.Z = -1000*STEPS_PER_MM_Z;
|
||||
t.F = SEARCH_FEEDRATE_Z;
|
||||
enqueue_home(&t, 0x4, 0);
|
||||
#endif
|
||||
|
||||
// set Z home
|
||||
// set position to MAX
|
||||
|
|
|
|||
Loading…
Reference in New Issue