Consider negative Z Offsets when auto bed leveling is active
This commit is contained in:
		
							parent
							
								
									c9f60183a9
								
							
						
					
					
						commit
						9eb6df17a7
					
				| @ -3946,7 +3946,14 @@ void clamp_to_software_endstops(float target[3]) | |||||||
|   if (min_software_endstops) { |   if (min_software_endstops) { | ||||||
|     if (target[X_AXIS] < min_pos[X_AXIS]) target[X_AXIS] = min_pos[X_AXIS]; |     if (target[X_AXIS] < min_pos[X_AXIS]) target[X_AXIS] = min_pos[X_AXIS]; | ||||||
|     if (target[Y_AXIS] < min_pos[Y_AXIS]) target[Y_AXIS] = min_pos[Y_AXIS]; |     if (target[Y_AXIS] < min_pos[Y_AXIS]) target[Y_AXIS] = min_pos[Y_AXIS]; | ||||||
|     if (target[Z_AXIS] < min_pos[Z_AXIS]) target[Z_AXIS] = min_pos[Z_AXIS]; |      | ||||||
|  |     float negative_z_offset = 0; | ||||||
|  |     #ifdef ENABLE_AUTO_BED_LEVELING | ||||||
|  |       if (Z_PROBE_OFFSET_FROM_EXTRUDER < 0) negative_z_offset = negative_z_offset + Z_PROBE_OFFSET_FROM_EXTRUDER; | ||||||
|  |       if (add_homing[Z_AXIS] < 0) negative_z_offset = negative_z_offset + add_homing[Z_AXIS]; | ||||||
|  |     #endif | ||||||
|  |      | ||||||
|  |     if (target[Z_AXIS] < min_pos[Z_AXIS]+negative_z_offset) target[Z_AXIS] = min_pos[Z_AXIS]+negative_z_offset; | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   if (max_software_endstops) { |   if (max_software_endstops) { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user