|  | @@ -2876,7 +2876,7 @@ bool gcode_M45(bool onlyZ, int8_t verbosity_level)
 | 
												
													
														
															|  |  #endif //TMC2130
 |  |  #endif //TMC2130
 | 
												
													
														
															|  |  		enable_endstops(endstops_enabled);
 |  |  		enable_endstops(endstops_enabled);
 | 
												
													
														
															|  |  
 |  |  
 | 
												
													
														
															|  | -		if ((st_get_position_mm(Z_AXIS) <= (MESH_HOME_Z_SEARCH + HOME_Z_SEARCH_THRESHOLD)) ||
 |  | 
 | 
												
													
														
															|  | 
 |  | +		if ((st_get_position_mm(Z_AXIS) <= (MESH_HOME_Z_SEARCH + HOME_Z_SEARCH_THRESHOLD)) &&
 | 
												
													
														
															|  |  		    (st_get_position_mm(Z_AXIS) >= (MESH_HOME_Z_SEARCH - HOME_Z_SEARCH_THRESHOLD)))
 |  |  		    (st_get_position_mm(Z_AXIS) >= (MESH_HOME_Z_SEARCH - HOME_Z_SEARCH_THRESHOLD)))
 | 
												
													
														
															|  |  		{
 |  |  		{
 | 
												
													
														
															|  |  			if (onlyZ)
 |  |  			if (onlyZ)
 |