Messing with Turret and storage

Not completly sure why the shooting actions arent happening in the right order
This commit is contained in:
ryan123rudder
2020-02-28 20:05:56 -07:00
parent 7c83d87085
commit b45f66b023
15 changed files with 85 additions and 35 deletions
@@ -7,6 +7,7 @@
package frc4388.robot.commands;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
import edu.wpi.first.wpilibj2.command.CommandBase;
import frc4388.robot.subsystems.Shooter;
@@ -35,6 +36,8 @@ public class ShooterVelocityControlPID extends CommandBase {
public void execute() {
m_shooter.runDrumShooterVelocityPID(m_shooter.addFireVel(), m_shooter.m_shooterFalcon.getSelectedSensorVelocity());
m_shooter.runAngleAdjustPID(m_shooter.addFireAngle());
SmartDashboard.putNumber("Fire Velocity", m_shooter.addFireVel());
SmartDashboard.putNumber("Fire Angle", m_shooter.addFireAngle());
}
// Called once the command ends or is interrupted.
@@ -49,9 +52,11 @@ public class ShooterVelocityControlPID extends CommandBase {
double upperBound = m_targetVel + 300;
double lowerBound = m_targetVel - 300;
if (m_actualVel < upperBound && m_actualVel > lowerBound){
SmartDashboard.putBoolean("ShooterVelocityPID Finished", true);
return true;
}
else{
SmartDashboard.putBoolean("ShooterVelocityPID Finished", false);
return false;
}
}