Browse Source

Apply unknown_position_error elsewhere

Scott Lahteine 9 years ago
parent
commit
cf7c444aff
1 changed files with 3 additions and 9 deletions
  1. 3
    9
      Marlin/Marlin_main.cpp

+ 3
- 9
Marlin/Marlin_main.cpp View File

@@ -1834,9 +1834,7 @@ static void unknown_position_error() {
1834 1834
       }
1835 1835
     #endif
1836 1836
     if (!axis_known_position[X_AXIS] || !axis_known_position[Y_AXIS]) {
1837
-      LCD_MESSAGEPGM(MSG_POSITION_UNKNOWN);
1838
-      SERIAL_ECHO_START;
1839
-      SERIAL_ECHOLNPGM(MSG_POSITION_UNKNOWN);
1837
+      unknown_position_error();
1840 1838
       return;
1841 1839
     }
1842 1840
 
@@ -2586,9 +2584,7 @@ inline void gcode_G28() {
2586 2584
               }
2587 2585
             }
2588 2586
             else {
2589
-              LCD_MESSAGEPGM(MSG_POSITION_UNKNOWN);
2590
-              SERIAL_ECHO_START;
2591
-              SERIAL_ECHOLNPGM(MSG_POSITION_UNKNOWN);
2587
+              unknown_position_error();
2592 2588
             }
2593 2589
 
2594 2590
           } // !home_all_axes && homeZ
@@ -2859,9 +2855,7 @@ inline void gcode_G28() {
2859 2855
 
2860 2856
     // Don't allow auto-leveling without homing first
2861 2857
     if (!axis_known_position[X_AXIS] || !axis_known_position[Y_AXIS]) {
2862
-      LCD_MESSAGEPGM(MSG_POSITION_UNKNOWN);
2863
-      SERIAL_ECHO_START;
2864
-      SERIAL_ECHOLNPGM(MSG_POSITION_UNKNOWN);
2858
+      unknown_position_error();
2865 2859
       return;
2866 2860
     }
2867 2861
 

Loading…
Cancel
Save