Constrain ANGLE_TUNE setting
In case anyone wants to adjust it and doesn't have access to the register definition.
This commit is contained in:
		
							parent
							
								
									a8b247bb0e
								
							
						
					
					
						commit
						3a0d4d14ad
					
				| 
						 | 
				
			
			@ -318,7 +318,8 @@ void initialisePMW3360(void) {
 | 
			
		|||
 | 
			
		||||
  // Rotate the x and y results, since the sensor isn't quite squared up in
 | 
			
		||||
  // the enclosure.
 | 
			
		||||
  adnsWriteReg(ANGLE_TUNE, ROTATIONAL_TRANSFORM_ANGLE);
 | 
			
		||||
  // Sensor rotates up to +/-30 degrees
 | 
			
		||||
  adnsWriteReg(ANGLE_TUNE, constrain(ROTATIONAL_TRANSFORM_ANGLE, -30, 30));
 | 
			
		||||
 | 
			
		||||
  adnsComEnd();
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue