mirror of
https://github.com/Team4388/RiseOfRidgebotics2020.git
synced 2026-06-09 00:38:00 -06:00
Add Conversion to degrees on Hood and Turret
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user