G34 configurable angle limit (#14321)
This commit is contained in:
		
				
					committed by
					
						 Scott Lahteine
						Scott Lahteine
					
				
			
			
				
	
			
			
			
						parent
						
							a31cb910f5
						
					
				
				
					commit
					a9acd2f497
				
			| @@ -604,6 +604,10 @@ | ||||
|   #define Z_STEPPER_ALIGN_ITERATIONS 3 | ||||
|   // Enable to restore leveling setup after operation | ||||
|   #define RESTORE_LEVELING_AFTER_G34 | ||||
|  | ||||
|   // On a 300mm bed a 5% grade would give a misalignment of ~1.5cm | ||||
|   #define G34_MAX_GRADE  5  // (%) Maximum incline G34 will handle | ||||
|  | ||||
|   // Use the amplification factor to de-/increase correction step. | ||||
|   // In case the stepper (spindle) position is further out than the test point | ||||
|   // Use a value > 1. NOTE: This may cause instability | ||||
|   | ||||
| @@ -125,10 +125,7 @@ void GcodeSuite::G34() { | ||||
|       #define Z_BASIC_CLEARANCE Z_CLEARANCE_BETWEEN_PROBES | ||||
|     #endif | ||||
|  | ||||
|     // 0.05 is a 5% incline. On a 300mm bed that would be a misalignment of about 1.5cm. | ||||
|     // This angle is the maximum misalignment catered for | ||||
|     #define MAX_ANGLE 0.05f | ||||
|     float z_probe = Z_BASIC_CLEARANCE + MAX_ANGLE * ( | ||||
|     float z_probe = Z_BASIC_CLEARANCE + (G34_MAX_GRADE) * 0.01f * ( | ||||
|       #if ENABLED(Z_TRIPLE_STEPPER_DRIVERS) | ||||
|          SQRT(MAX(HYPOT2(z_auto_align_xpos[0] - z_auto_align_ypos[0], z_auto_align_xpos[1] - z_auto_align_ypos[1]), | ||||
|                   HYPOT2(z_auto_align_xpos[1] - z_auto_align_ypos[1], z_auto_align_xpos[2] - z_auto_align_ypos[2]), | ||||
| @@ -160,7 +157,7 @@ void GcodeSuite::G34() { | ||||
|       float z_measured_min = 100000.0f; | ||||
|       // Probe all positions (one per Z-Stepper) | ||||
|       for (uint8_t izstepper = 0; izstepper < Z_STEPPER_COUNT; ++izstepper) { | ||||
|         // iteration odd/even --> downward / upward stepper sequence  | ||||
|         // iteration odd/even --> downward / upward stepper sequence | ||||
|         const uint8_t zstepper = (iteration & 1) ? Z_STEPPER_COUNT - 1 - izstepper : izstepper; | ||||
|  | ||||
|         // Safe clearance even on an incline | ||||
|   | ||||
		Reference in New Issue
	
	Block a user