Skip to content

Commit

Permalink
working debug items for delta homing issue.
Browse files Browse the repository at this point in the history
* merged in changes in bug fixes since they all make sense
* merged in head since fixing types makes sense as well
* still looking into how to address MarlinFirmware#11676 -
confirmed code location of errors with homing
  • Loading branch information
wyattearp committed May 12, 2020
1 parent a625b49 commit b4dafc3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
10 changes: 5 additions & 5 deletions Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@
//#define ENDSTOPPULLUP_XMIN
//#define ENDSTOPPULLUP_YMIN
//#define ENDSTOPPULLUP_ZMIN
//#define ENDSTOPPULLUP_ZMIN_PROBE
#define ENDSTOPPULLUP_ZMIN_PROBE
#endif

// Enable pulldown for all endstops to prevent a floating state
Expand Down Expand Up @@ -823,7 +823,7 @@
*
* :[2,3,4,5,6,7]
*/
//#define ENDSTOP_NOISE_THRESHOLD 2
#define ENDSTOP_NOISE_THRESHOLD 2

//=============================================================================
//============================== Movement Settings ============================
Expand Down Expand Up @@ -1376,8 +1376,8 @@
#define AUTO_BED_LEVELING_3POINT
#else
//#define AUTO_BED_LEVELING_LINEAR
#define AUTO_BED_LEVELING_BILINEAR
//#define AUTO_BED_LEVELING_UBL
//#define AUTO_BED_LEVELING_BILINEAR
#define AUTO_BED_LEVELING_UBL
//#define MESH_BED_LEVELING
#endif

Expand All @@ -1392,7 +1392,7 @@
* Turn on with the command 'M111 S32'.
* NOTE: Requires a lot of PROGMEM!
*/
//#define DEBUG_LEVELING_FEATURE
#define DEBUG_LEVELING_FEATURE

#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL)
// Gradually reduce leveling correction until a set height is reached,
Expand Down
9 changes: 8 additions & 1 deletion Marlin/src/module/delta.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,13 @@ void forward_kinematics_DELTA(const float &z1, const float &z2, const float &z3)
void home_delta() {
if (DEBUGGING(LEVELING)) DEBUG_POS(">>> home_delta", current_position);
// Init the current position of all carriages to 0,0,0
current_position.reset();
// if we know where we are, do not throw away our current_position
if (!all_axes_known()) {
current_position.reset();
} else {
if (DEBUGGING(LEVELING)) DEBUG_POS(">>> home_delta.no_dumb.reset()", current_position);
//current_position.reset();
}
destination.reset();
sync_plan_position();

Expand All @@ -254,6 +260,7 @@ void home_delta() {
- probe.offset.z
#endif
);
if (DEBUGGING(LEVELING)) DEBUG_POS(">>> home_delta.line_to_current_position()", current_position);
line_to_current_position(homing_feedrate(Z_AXIS));
planner.synchronize();

Expand Down

0 comments on commit b4dafc3

Please sign in to comment.