mirror of
https://github.com/Team4388/RiseOfRidgebotics2020.git
synced 2026-06-09 08:48:01 -06:00
PIDs fully added and tested for Neos
When robot is enabled once after robot code is deplyed, the program works. But, after the robot is disabled and re-enabled, the neo attempts to stay at one position and PID loops will no longer run because the Neo is focused on one position. There were also several commands taken out when testing (ie. the idle shooter command)
This commit is contained in:
@@ -41,6 +41,10 @@ public class Shooter extends SubsystemBase {
|
||||
* Creates a new Shooter subsystem.
|
||||
*/
|
||||
public Shooter() {
|
||||
//Testing purposes reseting gyros
|
||||
resetGyroAngleAdj();
|
||||
resetGyroShooterRotate();
|
||||
|
||||
m_shooterFalcon.configFactoryDefault();
|
||||
|
||||
m_shooterFalcon.setNeutralMode(NeutralMode.Coast);
|
||||
@@ -134,4 +138,16 @@ public class Shooter extends SubsystemBase {
|
||||
|
||||
m_shooterRotatePIDController.setReference(targetAngle, ControlType.kPosition);
|
||||
}
|
||||
|
||||
/* For Testing Purposes, reseting gyro for angle adjuster */
|
||||
public void resetGyroAngleAdj()
|
||||
{
|
||||
m_angleEncoder.setPosition(0);
|
||||
}
|
||||
|
||||
/* For Testing Purposes, reseting gyro for shooter rotation */
|
||||
public void resetGyroShooterRotate()
|
||||
{
|
||||
m_shooterRotateEncoder.setPosition(0);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user