Parcourir la source

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.
AnHardt il y a 8 ans
Parent
révision
94962ee678

+ 13
- 13
Marlin/Marlin_main.cpp Voir le fichier

@@ -1848,7 +1848,7 @@ static void setup_for_endstop_move() {
1848 1848
       float zpos = current_position[Z_AXIS], z_dest = Z_RAISE_BEFORE_PROBING;
1849 1849
       // The zprobe_zoffset is negative any switch below the nozzle, so
1850 1850
       // multiply by Z_HOME_DIR (-1) to move enough away from bed for the probe
1851
-      z_dest += axis_known_position[Z_AXIS] ? zprobe_zoffset * Z_HOME_DIR : zpos;
1851
+      z_dest += axis_homed[Z_AXIS] ? zprobe_zoffset * Z_HOME_DIR : zpos;
1852 1852
       if (zpos < z_dest) do_blocking_move_to_z(z_dest); // also updates current_position
1853 1853
     }
1854 1854
 
@@ -1856,10 +1856,10 @@ static void setup_for_endstop_move() {
1856 1856
 
1857 1857
 #endif // AUTO_BED_LEVELING_FEATURE
1858 1858
 
1859
-static void unknown_position_error() {
1860
-  LCD_MESSAGEPGM(MSG_POSITION_UNKNOWN);
1859
+static void axis_unhomed_error() {
1860
+  LCD_MESSAGEPGM(MSG_YX_UNHOMED);
1861 1861
   SERIAL_ECHO_START;
1862
-  SERIAL_ECHOLNPGM(MSG_POSITION_UNKNOWN);
1862
+  SERIAL_ECHOLNPGM(MSG_YX_UNHOMED);
1863 1863
 }
1864 1864
 
1865 1865
 #if ENABLED(Z_PROBE_SLED)
@@ -1884,8 +1884,8 @@ static void unknown_position_error() {
1884 1884
 
1885 1885
     if (z_probe_is_active == dock) return;
1886 1886
 
1887
-    if (!axis_known_position[X_AXIS] || !axis_known_position[Y_AXIS]) {
1888
-      unknown_position_error();
1887
+    if (!axis_homed[X_AXIS] || !axis_homed[Y_AXIS]) {
1888
+      axis_unhomed_error();
1889 1889
       return;
1890 1890
     }
1891 1891
 
@@ -2616,7 +2616,7 @@ inline void gcode_G28() {
2616 2616
           else if (homeZ) { // Don't need to Home Z twice
2617 2617
 
2618 2618
             // Let's see if X and Y are homed
2619
-            if (axis_known_position[X_AXIS] && axis_known_position[Y_AXIS]) {
2619
+            if (axis_homed[X_AXIS] && axis_homed[Y_AXIS]) {
2620 2620
 
2621 2621
               // Make sure the Z probe is within the physical limits
2622 2622
               // NOTE: This doesn't necessarily ensure the Z probe is also within the bed!
@@ -2636,7 +2636,7 @@ inline void gcode_G28() {
2636 2636
               }
2637 2637
             }
2638 2638
             else {
2639
-              unknown_position_error();
2639
+              axis_unhomed_error();
2640 2640
             }
2641 2641
 
2642 2642
           } // !home_all_axes && homeZ
@@ -2908,8 +2908,8 @@ inline void gcode_G28() {
2908 2908
     #endif
2909 2909
 
2910 2910
     // Don't allow auto-leveling without homing first
2911
-    if (!axis_known_position[X_AXIS] || !axis_known_position[Y_AXIS]) {
2912
-      unknown_position_error();
2911
+    if (!axis_homed[X_AXIS] || !axis_homed[Y_AXIS]) {
2912
+      axis_unhomed_error();
2913 2913
       return;
2914 2914
     }
2915 2915
 
@@ -3711,8 +3711,8 @@ inline void gcode_M42() {
3711 3711
    */
3712 3712
   inline void gcode_M48() {
3713 3713
 
3714
-    if (!axis_known_position[X_AXIS] || !axis_known_position[Y_AXIS] || !axis_known_position[Z_AXIS]) {
3715
-      unknown_position_error();
3714
+    if (!axis_homed[X_AXIS] || !axis_homed[Y_AXIS] || !axis_homed[Z_AXIS]) {
3715
+      axis_unhomed_error();
3716 3716
       return;
3717 3717
     }
3718 3718
 
@@ -5431,7 +5431,7 @@ inline void gcode_M428() {
5431 5431
   memcpy(new_pos, current_position, sizeof(new_pos));
5432 5432
   memcpy(new_offs, home_offset, sizeof(new_offs));
5433 5433
   for (int8_t i = X_AXIS; i <= Z_AXIS; i++) {
5434
-    if (axis_known_position[i]) {
5434
+    if (axis_homed[i]) {
5435 5435
       float base = (new_pos[i] > (min_pos[i] + max_pos[i]) / 2) ? base_home_pos(i) : 0,
5436 5436
             diff = new_pos[i] - base;
5437 5437
       if (diff > -20 && diff < 20) {

+ 1
- 1
Marlin/language_an.h Voir le fichier

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

+ 1
- 1
Marlin/language_bg.h Voir le fichier

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

+ 1
- 1
Marlin/language_ca.h Voir le fichier

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

+ 1
- 1
Marlin/language_cn.h Voir le fichier

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

+ 1
- 1
Marlin/language_cz.h Voir le fichier

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

+ 1
- 1
Marlin/language_da.h Voir le fichier

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

+ 1
- 1
Marlin/language_de.h Voir le fichier

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

+ 2
- 2
Marlin/language_en.h Voir le fichier

@@ -415,8 +415,8 @@
415 415
 #ifndef MSG_ZPROBE_OUT
416 416
   #define MSG_ZPROBE_OUT                      "Z probe out. bed"
417 417
 #endif
418
-#ifndef MSG_POSITION_UNKNOWN
419
-  #define MSG_POSITION_UNKNOWN                "Home X/Y before Z"
418
+#ifndef MSG_YX_UNHOMED
419
+  #define MSG_YX_UNHOMED                      "Home X/Y before Z"
420 420
 #endif
421 421
 #ifndef MSG_ZPROBE_ZOFFSET
422 422
   #define MSG_ZPROBE_ZOFFSET                  "Z Offset"

+ 1
- 1
Marlin/language_es.h Voir le fichier

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

+ 1
- 1
Marlin/language_eu.h Voir le fichier

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

+ 1
- 1
Marlin/language_fi.h Voir le fichier

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

+ 1
- 1
Marlin/language_fr.h Voir le fichier

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

+ 1
- 1
Marlin/language_gl.h Voir le fichier

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

+ 1
- 1
Marlin/language_it.h Voir le fichier

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

+ 1
- 1
Marlin/language_kana.h Voir le fichier

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

+ 1
- 1
Marlin/language_kana_utf8.h Voir le fichier

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

+ 1
- 1
Marlin/language_nl.h Voir le fichier

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

+ 1
- 1
Marlin/language_pl.h Voir le fichier

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

+ 1
- 1
Marlin/language_pt-br.h Voir le fichier

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

+ 1
- 1
Marlin/language_pt-br_utf8.h Voir le fichier

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

+ 1
- 1
Marlin/language_pt.h Voir le fichier

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

+ 1
- 1
Marlin/language_pt_utf8.h Voir le fichier

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

+ 1
- 1
Marlin/language_ru.h Voir le fichier

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

Chargement…
Annuler
Enregistrer