axis_known_position -> axis_homed

In all these cases we want the axis to be homed. If we could have lost
some steps is secondary.

Reenables homing seperate axis with DISABLE_X / DISABLE_Y true.
master
AnHardt 8 years ago
parent 122bdd187f
commit 94962ee678

@ -1848,7 +1848,7 @@ static void setup_for_endstop_move() {
float zpos = current_position[Z_AXIS], z_dest = Z_RAISE_BEFORE_PROBING;
// The zprobe_zoffset is negative any switch below the nozzle, so
// multiply by Z_HOME_DIR (-1) to move enough away from bed for the probe
z_dest += axis_known_position[Z_AXIS] ? zprobe_zoffset * Z_HOME_DIR : zpos;
z_dest += axis_homed[Z_AXIS] ? zprobe_zoffset * Z_HOME_DIR : zpos;
if (zpos < z_dest) do_blocking_move_to_z(z_dest); // also updates current_position
}
@ -1856,10 +1856,10 @@ static void setup_for_endstop_move() {
#endif // AUTO_BED_LEVELING_FEATURE
static void unknown_position_error() {
LCD_MESSAGEPGM(MSG_POSITION_UNKNOWN);
static void axis_unhomed_error() {
LCD_MESSAGEPGM(MSG_YX_UNHOMED);
SERIAL_ECHO_START;
SERIAL_ECHOLNPGM(MSG_POSITION_UNKNOWN);
SERIAL_ECHOLNPGM(MSG_YX_UNHOMED);
}
#if ENABLED(Z_PROBE_SLED)
@ -1884,8 +1884,8 @@ static void unknown_position_error() {
if (z_probe_is_active == dock) return;
if (!axis_known_position[X_AXIS] || !axis_known_position[Y_AXIS]) {
unknown_position_error();
if (!axis_homed[X_AXIS] || !axis_homed[Y_AXIS]) {
axis_unhomed_error();
return;
}
@ -2616,7 +2616,7 @@ inline void gcode_G28() {
else if (homeZ) { // Don't need to Home Z twice
// Let's see if X and Y are homed
if (axis_known_position[X_AXIS] && axis_known_position[Y_AXIS]) {
if (axis_homed[X_AXIS] && axis_homed[Y_AXIS]) {
// Make sure the Z probe is within the physical limits
// NOTE: This doesn't necessarily ensure the Z probe is also within the bed!
@ -2636,7 +2636,7 @@ inline void gcode_G28() {
}
}
else {
unknown_position_error();
axis_unhomed_error();
}
} // !home_all_axes && homeZ
@ -2908,8 +2908,8 @@ inline void gcode_G28() {
#endif
// Don't allow auto-leveling without homing first
if (!axis_known_position[X_AXIS] || !axis_known_position[Y_AXIS]) {
unknown_position_error();
if (!axis_homed[X_AXIS] || !axis_homed[Y_AXIS]) {
axis_unhomed_error();
return;
}
@ -3711,8 +3711,8 @@ inline void gcode_M42() {
*/
inline void gcode_M48() {
if (!axis_known_position[X_AXIS] || !axis_known_position[Y_AXIS] || !axis_known_position[Z_AXIS]) {
unknown_position_error();
if (!axis_homed[X_AXIS] || !axis_homed[Y_AXIS] || !axis_homed[Z_AXIS]) {
axis_unhomed_error();
return;
}
@ -5431,7 +5431,7 @@ inline void gcode_M428() {
memcpy(new_pos, current_position, sizeof(new_pos));
memcpy(new_offs, home_offset, sizeof(new_offs));
for (int8_t i = X_AXIS; i <= Z_AXIS; i++) {
if (axis_known_position[i]) {
if (axis_homed[i]) {
float base = (new_pos[i] > (min_pos[i] + max_pos[i]) / 2) ? base_home_pos(i) : 0,
diff = new_pos[i] - base;
if (diff > -20 && diff < 20) {

@ -138,7 +138,7 @@
#define MSG_INIT_SDCARD "Encetan. tarcheta"
#define MSG_CNG_SDCARD "Cambiar tarcheta"
#define MSG_ZPROBE_OUT "Z probe out. bed"
#define MSG_POSITION_UNKNOWN "Home X/Y before Z"
#define MSG_YX_UNHOMED "Home X/Y before Z"
#define MSG_ZPROBE_ZOFFSET "Z Offset"
#define MSG_BABYSTEP_X "Babystep X"
#define MSG_BABYSTEP_Y "Babystep Y"

@ -139,7 +139,7 @@
#define MSG_INIT_SDCARD "Иниц. SD-Карта"
#define MSG_CNG_SDCARD "Смяна SD-Карта"
#define MSG_ZPROBE_OUT "Z-сондата е извадена"
#define MSG_POSITION_UNKNOWN "Задайте X/Y преди Z"
#define MSG_YX_UNHOMED "Задайте X/Y преди Z"
#define MSG_ZPROBE_ZOFFSET "Z Отстояние"
#define MSG_BABYSTEP_X "Министъпка X"
#define MSG_BABYSTEP_Y "Министъпка Y"

@ -139,7 +139,7 @@
#define MSG_INIT_SDCARD "Iniciant SD"
#define MSG_CNG_SDCARD "Canviar SD"
#define MSG_ZPROBE_OUT "Z probe out. bed"
#define MSG_POSITION_UNKNOWN "Home X/Y abans Z"
#define MSG_YX_UNHOMED "Home X/Y abans Z"
#define MSG_ZPROBE_ZOFFSET "Z Offset"
#define MSG_BABYSTEP_X "Babystep X"
#define MSG_BABYSTEP_Y "Babystep Y"

@ -138,7 +138,7 @@
#define MSG_INIT_SDCARD "Init. SD card"
#define MSG_CNG_SDCARD "Change SD card"
#define MSG_ZPROBE_OUT "Z probe out. bed"
#define MSG_POSITION_UNKNOWN "Home X/Y before Z"
#define MSG_YX_UNHOMED "Home X/Y before Z"
#define MSG_ZPROBE_ZOFFSET "Z Offset"
#define MSG_BABYSTEP_X "Babystep X"
#define MSG_BABYSTEP_Y "Babystep Y"

@ -144,7 +144,7 @@
#define MSG_INIT_SDCARD "Nacist SD kartu"
#define MSG_CNG_SDCARD "Vymenit SD kartu"
#define MSG_ZPROBE_OUT "Sonda Z mimo podl"
#define MSG_POSITION_UNKNOWN "Domu X/Y pred Z"
#define MSG_YX_UNHOMED "Domu X/Y pred Z"
#define MSG_ZPROBE_ZOFFSET "Z ofset"
#define MSG_BABYSTEP_X "Babystep X"
#define MSG_BABYSTEP_Y "Babystep Y"

@ -140,7 +140,7 @@
#define MSG_FILAMENTCHANGE "Skift filament"
#define MSG_INIT_SDCARD "Init. SD card"
#define MSG_CNG_SDCARD "Skift SD kort"
#define MSG_POSITION_UNKNOWN "Home X/Y før Z"
#define MSG_YX_UNHOMED "Home X/Y før Z"
#define MSG_ZPROBE_ZOFFSET "Z Offset"
#define MSG_BABYSTEP_X "Babystep X"
#define MSG_BABYSTEP_Y "Babystep Y"

@ -137,7 +137,7 @@
#define MSG_INIT_SDCARD "SDKarte erkennen"// Manually initialize the SD-card via user interface
#define MSG_CNG_SDCARD "SDKarte erkennen"// SD-card changed by user. For machines with no autocarddetect. Both send "M21"
#define MSG_ZPROBE_OUT "Sensor ausserhalb"
#define MSG_POSITION_UNKNOWN "X/Y vor Z homen."
#define MSG_YX_UNHOMED "X/Y vor Z homen."
#define MSG_ZPROBE_ZOFFSET "Z Offset"
#define MSG_BABYSTEP_X "Babystep X"
#define MSG_BABYSTEP_Y "Babystep Y"

@ -415,8 +415,8 @@
#ifndef MSG_ZPROBE_OUT
#define MSG_ZPROBE_OUT "Z probe out. bed"
#endif
#ifndef MSG_POSITION_UNKNOWN
#define MSG_POSITION_UNKNOWN "Home X/Y before Z"
#ifndef MSG_YX_UNHOMED
#define MSG_YX_UNHOMED "Home X/Y before Z"
#endif
#ifndef MSG_ZPROBE_ZOFFSET
#define MSG_ZPROBE_ZOFFSET "Z Offset"

@ -139,7 +139,7 @@
#define MSG_INIT_SDCARD "Iniciando tarjeta"
#define MSG_CNG_SDCARD "Cambiar tarjeta"
#define MSG_ZPROBE_OUT "Sonda Z fuera"
#define MSG_POSITION_UNKNOWN "Reiniciar X/Y y Z"
#define MSG_YX_UNHOMED "Reiniciar X/Y y Z"
#define MSG_ZPROBE_ZOFFSET "Offset Z"
#define MSG_BABYSTEP_X "Micropaso X"
#define MSG_BABYSTEP_Y "Micropaso Y"

@ -138,7 +138,7 @@
#define MSG_INIT_SDCARD "Hasieratu txartela"
#define MSG_CNG_SDCARD "Aldatu txartela"
#define MSG_ZPROBE_OUT "Z ohe hasiera"
#define MSG_POSITION_UNKNOWN "Posizio ezezaguna"
#define MSG_YX_UNHOMED "Posizio ezezaguna"
#define MSG_ZPROBE_ZOFFSET "Z konpentsatu"
#define MSG_BABYSTEP_X "Babystep X"
#define MSG_BABYSTEP_Y "Babystep Y"

@ -138,7 +138,7 @@
#define MSG_INIT_SDCARD "Init. SD-Card"
#define MSG_CNG_SDCARD "Change SD-Card"
#define MSG_ZPROBE_OUT "Z probe out. bed"
#define MSG_POSITION_UNKNOWN "Home X/Y before Z"
#define MSG_YX_UNHOMED "Home X/Y before Z"
#define MSG_ZPROBE_ZOFFSET "Z Offset"
#define MSG_BABYSTEP_X "Babystep X"
#define MSG_BABYSTEP_Y "Babystep Y"

@ -140,7 +140,7 @@
#define MSG_INIT_SDCARD "Init. la carte SD"
#define MSG_CNG_SDCARD "Changer de carte"
#define MSG_ZPROBE_OUT "Z sonde exte. lit"
#define MSG_POSITION_UNKNOWN "Rev. dans XY av.Z"
#define MSG_YX_UNHOMED "Rev. dans XY av.Z"
#define MSG_ZPROBE_ZOFFSET "Offset Z"
#define MSG_BABYSTEP_X "Babystep X"
#define MSG_BABYSTEP_Y "Babystep Y"

@ -142,7 +142,7 @@
#define MSG_INIT_SDCARD "Iniciando SD"
#define MSG_CNG_SDCARD "Cambiar SD"
#define MSG_ZPROBE_OUT "Sonda-Z sen cama"
#define MSG_POSITION_UNKNOWN "X/Y antes que Z"
#define MSG_YX_UNHOMED "X/Y antes que Z"
#define MSG_ZPROBE_ZOFFSET "Offset Z"
#define MSG_BABYSTEP_X "Micropaso X"
#define MSG_BABYSTEP_Y "Micropaso Y"

@ -139,7 +139,7 @@
#define MSG_INIT_SDCARD "Iniz. SD-Card"
#define MSG_CNG_SDCARD "Cambia SD-Card"
#define MSG_ZPROBE_OUT "Z probe out. bed"
#define MSG_POSITION_UNKNOWN "Home X/Y before Z"
#define MSG_YX_UNHOMED "Home X/Y before Z"
#define MSG_ZPROBE_ZOFFSET "Z Offset"
#define MSG_BABYSTEP_X "Babystep X"
#define MSG_BABYSTEP_Y "Babystep Y"

@ -142,7 +142,7 @@
#define MSG_INIT_SDCARD "SD\xb6\xb0\xc4\xde\xbb\xb2\xd6\xd0\xba\xd0" // "Init. SD card"
#define MSG_CNG_SDCARD "SD\xb6\xb0\xc4\xde\xba\xb3\xb6\xdd" // "Change SD card"
#define MSG_ZPROBE_OUT "Z\xcc\xdf\xdb\xb0\xcc\xde\x20\xcd\xde\xaf\xc4\xde\xb6\xde\xb2" // "Z probe out. bed"
#define MSG_POSITION_UNKNOWN "\xb9\xde\xdd\xc3\xdd\xcaXY\xb2\xc4\xde\xb3\xba\xdeZ" // "Home X/Y before Z"
#define MSG_YX_UNHOMED "\xb9\xde\xdd\xc3\xdd\xcaXY\xb2\xc4\xde\xb3\xba\xdeZ" // "Home X/Y before Z"
#define MSG_ZPROBE_ZOFFSET "Z\xb5\xcc\xbe\xaf\xc4" // "Z Offset"
#define MSG_BABYSTEP_X "X\xbc\xde\xb8\x20\xcb\xde\xc4\xde\xb3" // "Babystep X"
#define MSG_BABYSTEP_Y "Y\xbc\xde\xb8\x20\xcb\xde\xc4\xde\xb3" // "Babystep Y"

@ -146,7 +146,7 @@
#define MSG_INIT_SDCARD "SDカードサイヨミコミ" // "Init. SD card"
#define MSG_CNG_SDCARD "SDカードコウカン" // "Change SD card"
#define MSG_ZPROBE_OUT "Zプローブ ベッドガイ" // "Z probe out. bed"
#define MSG_POSITION_UNKNOWN "ゲンテンハXYイドウゴZ" // "Home X/Y before Z"
#define MSG_YX_UNHOMED "ゲンテンハXYイドウゴZ" // "Home X/Y before Z"
#define MSG_ZPROBE_ZOFFSET "Zオフセット" // "Z Offset"
#define MSG_BABYSTEP_X "Xジク ビドウ" // "Babystep X"
#define MSG_BABYSTEP_Y "Yジク ビドウ" // "Babystep Y"

@ -138,7 +138,7 @@
#define MSG_INIT_SDCARD "Init. SD kaart"
#define MSG_CNG_SDCARD "Verv. SD card"
#define MSG_ZPROBE_OUT "Z probe uit. bed"
#define MSG_POSITION_UNKNOWN "Home X/Y voor Z"
#define MSG_YX_UNHOMED "Home X/Y voor Z"
#define MSG_ZPROBE_ZOFFSET "Z Offset"
#define MSG_BABYSTEP_X "Babystap X"
#define MSG_BABYSTEP_Y "Babystap Y"

@ -138,7 +138,7 @@
#define MSG_INIT_SDCARD "Inicjal. karty SD"
#define MSG_CNG_SDCARD "Zmiana karty SD"
#define MSG_ZPROBE_OUT "Sonda Z za lozem"
#define MSG_POSITION_UNKNOWN "Wroc w XY przed Z"
#define MSG_YX_UNHOMED "Wroc w XY przed Z"
#define MSG_ZPROBE_ZOFFSET "Offset Z"
#define MSG_BABYSTEP_X "Babystep X"
#define MSG_BABYSTEP_Y "Babystep Y"

@ -138,7 +138,7 @@
#define MSG_INIT_SDCARD "Iniciar SD"
#define MSG_CNG_SDCARD "Trocar SD"
#define MSG_ZPROBE_OUT "Son. fora da mesa"
#define MSG_POSITION_UNKNOWN "Pos. Desconhecida"
#define MSG_YX_UNHOMED "Pos. Desconhecida"
#define MSG_ZPROBE_ZOFFSET "Deslocamento no Z"
#define MSG_BABYSTEP_X "Passinho X"
#define MSG_BABYSTEP_Y "Passinho Y"

@ -138,7 +138,7 @@
#define MSG_INIT_SDCARD "Iniciar SD"
#define MSG_CNG_SDCARD "Trocar SD"
#define MSG_ZPROBE_OUT "Son. fora da mesa"
#define MSG_POSITION_UNKNOWN "Pos. Desconhecida"
#define MSG_YX_UNHOMED "Pos. Desconhecida"
#define MSG_ZPROBE_ZOFFSET "Deslocamento no Z"
#define MSG_BABYSTEP_X "Passinho X"
#define MSG_BABYSTEP_Y "Passinho Y"

@ -142,7 +142,7 @@
#define MSG_INIT_SDCARD "Inici. cartao SD"
#define MSG_CNG_SDCARD "Trocar cartao SD"
#define MSG_ZPROBE_OUT "Sensor fora/base"
#define MSG_POSITION_UNKNOWN "XY antes de Z"
#define MSG_YX_UNHOMED "XY antes de Z"
#define MSG_ZPROBE_ZOFFSET "Desvio Z"
#define MSG_BABYSTEP_X "Babystep X"
#define MSG_BABYSTEP_Y "Babystep Y"

@ -142,7 +142,7 @@
#define MSG_INIT_SDCARD "Inici. cartão SD"
#define MSG_CNG_SDCARD "Trocar cartão SD"
#define MSG_ZPROBE_OUT "Sensor fora/base"
#define MSG_POSITION_UNKNOWN "XY antes de Z"
#define MSG_YX_UNHOMED "XY antes de Z"
#define MSG_ZPROBE_ZOFFSET "Desvio Z"
#define MSG_BABYSTEP_X "Babystep X"
#define MSG_BABYSTEP_Y "Babystep Y"

@ -139,7 +139,7 @@
#define MSG_INIT_SDCARD "Иниц. карту"
#define MSG_CNG_SDCARD "Сменить карту"
#define MSG_ZPROBE_OUT "Z датчик вне стола"
#define MSG_POSITION_UNKNOWN "Паркуй X/Y перед Z"
#define MSG_YX_UNHOMED "Паркуй X/Y перед Z"
#define MSG_ZPROBE_ZOFFSET "Смещение Z"
#define MSG_BABYSTEP_X "Babystep X"
#define MSG_BABYSTEP_Y "Babystep Y"

Loading…
Cancel
Save