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
							
								
									92070e143d
								
							
						
					
					
						commit
						fc9cd621b1
					
				| 
						 | 
					@ -318,7 +318,8 @@ void initialisePMW3360(void) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // Rotate the x and y results, since the sensor isn't quite squared up in
 | 
					  // Rotate the x and y results, since the sensor isn't quite squared up in
 | 
				
			||||||
  // the enclosure.
 | 
					  // the enclosure.
 | 
				
			||||||
  adnsWriteReg(ANGLE_TUNE, ROTATIONAL_TRANSFORM_ANGLE);
 | 
					  // Sensor rotates up to +/-30 degrees
 | 
				
			||||||
 | 
					  adnsWriteReg(ANGLE_TUNE, constrain(ROTATIONAL_TRANSFORM_ANGLE, -30, 30));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  adnsComEnd();
 | 
					  adnsComEnd();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue