Add Conversion to degrees on Hood and Turret

This commit is contained in:
Keenan D. Buckley
2020-03-08 15:20:55 -06:00
parent 74f60f0e85
commit 7e760c1b55
3 changed files with 50 additions and 36 deletions
@@ -59,7 +59,7 @@ public class ShooterHood extends SubsystemBase {
// This method will be called once per scheduler run
SmartDashboard.putNumber("Fire Angle CSV", m_fireAngle);
SmartDashboard.putNumber("Hood Angle Raw", getAnglePosition());
SmartDashboard.putNumber("Hood Angle Raw", getAnglePositionDegrees());
}
/**
@@ -95,4 +95,8 @@ public class ShooterHood extends SubsystemBase {
public double getAnglePosition(){
return m_angleEncoder.getPosition();
}
public double getAnglePositionDegrees(){
return (m_angleEncoder.getPosition() - ShooterConstants.HOOD_MOTOR_POS_AT_ZERO_ROT) * 360/ShooterConstants.HOOD_MOTOR_ROTS_PER_ROT;
}
}