Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MBL: Add option to configure G28 resting position for all axes #3802

Merged
merged 4 commits into from
May 20, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,12 @@ script:
- opt_enable ENABLE_AUTO_BED_LEVELING DEBUG_LEVELING_FEATURE
- build_marlin
#
# Test MESH_BED_LEVELING feature, with LCD
#
- restore_configs
- opt_enable MESH_BED_LEVELING MESH_G28_REST_ORIGIN MANUAL_BED_LEVELING ULTIMAKERCONTROLLER
- build_marlin
#
# Test AUTO_BED_LEVELING & DEBUG_LEVELING_FEATURE with Servos
#
- opt_enable NUM_SERVOS Z_ENDSTOP_SERVO_NR SERVO_ENDSTOP_ANGLES DEACTIVATE_SERVOS_AFTER_MOVE
Expand Down
2 changes: 2 additions & 0 deletions Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
#define MESH_NUM_Y_POINTS 3
#define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0.

//#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0]

//#define MANUAL_BED_LEVELING // Add display menu option for bed leveling.

#if ENABLED(MANUAL_BED_LEVELING)
Expand Down
14 changes: 8 additions & 6 deletions Marlin/Marlin_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2918,17 +2918,19 @@ inline void gcode_G28() {
#endif
#endif

// For mesh leveling move back to Z=0
// Enable mesh leveling again
#if ENABLED(MESH_BED_LEVELING)
if (mbl_was_active && home_all_axis) {
current_position[Z_AXIS] = MESH_HOME_SEARCH_Z;
sync_plan_position();
mbl.active = 1;
current_position[Z_AXIS] = 0.0;
set_destination_to_current();
feedrate = homing_feedrate[Z_AXIS];
line_to_destination();
stepper.synchronize();
#if ENABLED(MESH_G28_REST_ORIGIN)
current_position[Z_AXIS] = 0.0;
set_destination_to_current();
feedrate = homing_feedrate[Z_AXIS];
line_to_destination();
stepper.synchronize();
#endif
#if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) DEBUG_POS("mbl_was_active", current_position);
#endif
Expand Down
2 changes: 2 additions & 0 deletions Marlin/example_configurations/Felix/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
#define MESH_NUM_Y_POINTS 3
#define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0.

//#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0]

//#define MANUAL_BED_LEVELING // Add display menu option for bed leveling.

#if ENABLED(MANUAL_BED_LEVELING)
Expand Down
2 changes: 2 additions & 0 deletions Marlin/example_configurations/Felix/DUAL/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
#define MESH_NUM_Y_POINTS 3
#define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0.

//#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0]

//#define MANUAL_BED_LEVELING // Add display menu option for bed leveling.

#if ENABLED(MANUAL_BED_LEVELING)
Expand Down
2 changes: 2 additions & 0 deletions Marlin/example_configurations/Hephestos/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
#define MESH_NUM_Y_POINTS 3
#define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0.

//#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0]

//#define MANUAL_BED_LEVELING // Add display menu option for bed leveling.

#if ENABLED(MANUAL_BED_LEVELING)
Expand Down
2 changes: 2 additions & 0 deletions Marlin/example_configurations/Hephestos_2/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
#define MESH_NUM_Y_POINTS 3
#define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0.

//#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0]

//#define MANUAL_BED_LEVELING // Add display menu option for bed leveling.

#if ENABLED(MANUAL_BED_LEVELING)
Expand Down
2 changes: 2 additions & 0 deletions Marlin/example_configurations/K8200/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
#define MESH_NUM_Y_POINTS 3
#define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0.

//#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0]

//#define MANUAL_BED_LEVELING // Add display menu option for bed leveling.

#if ENABLED(MANUAL_BED_LEVELING)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
#define MESH_NUM_Y_POINTS 3
#define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0.

//#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0]

//#define MANUAL_BED_LEVELING // Add display menu option for bed leveling.

#if ENABLED(MANUAL_BED_LEVELING)
Expand Down
2 changes: 2 additions & 0 deletions Marlin/example_configurations/RigidBot/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
#define MESH_NUM_Y_POINTS 3
#define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0.

//#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0]

//#define MANUAL_BED_LEVELING // Add display menu option for bed leveling.

#if ENABLED(MANUAL_BED_LEVELING)
Expand Down
2 changes: 2 additions & 0 deletions Marlin/example_configurations/SCARA/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
#define MESH_NUM_Y_POINTS 3
#define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0.

//#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0]

//#define MANUAL_BED_LEVELING // Add display menu option for bed leveling.

#if ENABLED(MANUAL_BED_LEVELING)
Expand Down
2 changes: 2 additions & 0 deletions Marlin/example_configurations/TAZ4/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
#define MESH_NUM_Y_POINTS 3
#define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0.

//#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0]

//#define MANUAL_BED_LEVELING // Add display menu option for bed leveling.

#if ENABLED(MANUAL_BED_LEVELING)
Expand Down
2 changes: 2 additions & 0 deletions Marlin/example_configurations/WITBOX/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
#define MESH_NUM_Y_POINTS 3
#define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0.

//#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0]

//#define MANUAL_BED_LEVELING // Add display menu option for bed leveling.

#if ENABLED(MANUAL_BED_LEVELING)
Expand Down
2 changes: 2 additions & 0 deletions Marlin/example_configurations/adafruit/ST7565/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
#define MESH_NUM_Y_POINTS 3
#define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0.

//#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0]

//#define MANUAL_BED_LEVELING // Add display menu option for bed leveling.

#if ENABLED(MANUAL_BED_LEVELING)
Expand Down
2 changes: 2 additions & 0 deletions Marlin/example_configurations/delta/biv2.5/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
#define MESH_NUM_Y_POINTS 3
#define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0.

//#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0]

//#define MANUAL_BED_LEVELING // Add display menu option for bed leveling.

#if ENABLED(MANUAL_BED_LEVELING)
Expand Down
2 changes: 2 additions & 0 deletions Marlin/example_configurations/delta/generic/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
#define MESH_NUM_Y_POINTS 3
#define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0.

//#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0]

//#define MANUAL_BED_LEVELING // Add display menu option for bed leveling.

#if ENABLED(MANUAL_BED_LEVELING)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
#define MESH_NUM_Y_POINTS 3
#define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0.

//#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0]

//#define MANUAL_BED_LEVELING // Add display menu option for bed leveling.

#if ENABLED(MANUAL_BED_LEVELING)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
#define MESH_NUM_Y_POINTS 3
#define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0.

//#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0]

//#define MANUAL_BED_LEVELING // Add display menu option for bed leveling.

#if ENABLED(MANUAL_BED_LEVELING)
Expand Down
2 changes: 2 additions & 0 deletions Marlin/example_configurations/delta/kossel_xl/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
#define MESH_NUM_Y_POINTS 3
#define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0.

//#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0]

//#define MANUAL_BED_LEVELING // Add display menu option for bed leveling.

#if ENABLED(MANUAL_BED_LEVELING)
Expand Down
2 changes: 2 additions & 0 deletions Marlin/example_configurations/makibox/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
#define MESH_NUM_Y_POINTS 3
#define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0.

//#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0]

//#define MANUAL_BED_LEVELING // Add display menu option for bed leveling.

#if ENABLED(MANUAL_BED_LEVELING)
Expand Down
2 changes: 2 additions & 0 deletions Marlin/example_configurations/tvrrug/Round2/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
#define MESH_NUM_Y_POINTS 3
#define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0.

//#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0]

//#define MANUAL_BED_LEVELING // Add display menu option for bed leveling.

#if ENABLED(MANUAL_BED_LEVELING)
Expand Down