From 2887c20788079451f951f7b2578ace69c6f8334e Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 1 May 2017 15:03:13 -0500 Subject: [PATCH] Add a function to home all axes (i.e., gcode_G28) --- Marlin/G26_Mesh_Validation_Tool.cpp | 3 +-- Marlin/Marlin_main.cpp | 2 ++ Marlin/ubl.h | 3 ++- Marlin/ubl_G29.cpp | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Marlin/G26_Mesh_Validation_Tool.cpp b/Marlin/G26_Mesh_Validation_Tool.cpp index acac6e0873..43e9bcc45f 100644 --- a/Marlin/G26_Mesh_Validation_Tool.cpp +++ b/Marlin/G26_Mesh_Validation_Tool.cpp @@ -131,8 +131,7 @@ #define PLANNER_XY_FEEDRATE() (min(planner.max_feedrate_mm_s[X_AXIS], planner.max_feedrate_mm_s[Y_AXIS])) //bob bool prepare_move_to_destination_cartesian(); void line_to_destination(); - void line_to_destination(float ); - void gcode_G28(); + void line_to_destination(float); void sync_plan_position_e(); void un_retract_filament(float where[XYZE]); void retract_filament(float where[XYZE]); diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index ac39f6a73d..5cfb0a52a5 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -3928,6 +3928,8 @@ inline void gcode_G28() { #endif } +void home_all_axes() { gcode_G28(); } + #if HAS_PROBING_PROCEDURE void out_of_range_error(const char* p_edge) { diff --git a/Marlin/ubl.h b/Marlin/ubl.h index 843c9d98a3..70ddf6bba9 100644 --- a/Marlin/ubl.h +++ b/Marlin/ubl.h @@ -61,8 +61,9 @@ bool is_bit_set(uint16_t bits[16], uint8_t x, uint8_t y); char *ftostr43sign(const float&, char); + void home_all_axes(); + void gcode_G26(); - void gcode_G28(); void gcode_G29(); extern int ubl_cnt; diff --git a/Marlin/ubl_G29.cpp b/Marlin/ubl_G29.cpp index 79f625370d..c21a1a2eef 100644 --- a/Marlin/ubl_G29.cpp +++ b/Marlin/ubl_G29.cpp @@ -324,7 +324,7 @@ } if (!code_seen('N') && axis_unhomed_error(true, true, true)) // Don't allow auto-leveling without homing first - gcode_G28(); + home_all_axes(); if (g29_parameter_parsing()) return; // abort if parsing the simple parameters causes a problem,