Silentninja1 idex crash fix (#11329)

* Move home all axis prototype to allow access from UBL.h

* Remove home all axis command as it exists in marlin.h now

* Reverse order of tool change and home

Race condition causes E0 carriage to move on E1 commands and crash into parked head if order is reversed. Needs more research into permanent fix, but this will prevent damage to machines in the meantime.
This commit is contained in:
silentninja1 2018-07-24 15:44:50 -04:00 committed by Roxy-3D
parent 3bbb121e7d
commit 060e7a3565
3 changed files with 3 additions and 2 deletions

View File

@ -301,6 +301,8 @@ extern float soft_endstop_min[XYZ], soft_endstop_max[XYZ];
void tool_change(const uint8_t tmp_extruder, const float fr_mm_s=0.0, bool no_move=false);
void home_all_axes();
void report_current_position();
#if IS_KINEMATIC

View File

@ -54,7 +54,6 @@ enum MeshPointType : char { INVALID, REAL, SET_IN_BITMAP };
// External references
char *ftostr43sign(const float&, char);
void home_all_axes();
extern uint8_t ubl_cnt;

View File

@ -296,10 +296,10 @@
// Check for commands that require the printer to be homed
if (may_move) {
if (axis_unhomed_error()) home_all_axes();
#if ENABLED(DUAL_X_CARRIAGE)
if (active_extruder != 0) tool_change(0);
#endif
if (axis_unhomed_error()) home_all_axes();
}
// Invalidate Mesh Points. This command is a little bit asymmetrical because