Things Happened

This commit is contained in:
Abhishrek05
2022-01-20 20:00:31 -07:00
parent 39c9fbb593
commit ed87f4deac
4 changed files with 75 additions and 6 deletions
@@ -8,6 +8,7 @@ import com.ctre.phoenix.motorcontrol.NeutralMode;
import com.ctre.phoenix.motorcontrol.TalonFXControlMode;
import com.ctre.phoenix.motorcontrol.can.WPI_TalonFX;
import edu.wpi.first.math.controller.BangBangController;
import edu.wpi.first.wpilibj2.command.SubsystemBase;
import frc4388.robot.Constants.ShooterConstants;
import frc4388.utility.ShooterTables;
@@ -65,5 +66,13 @@ public void runDrumShooter(double speed) {
public void runDrumShooterVelocityPID(double targetVel) {
m_shooterFalconLeft.set(TalonFXControlMode.Velocity, targetVel); //Init
m_shooterFalconRight.follow(m_shooterFalconLeft);
}
* // New BoomBoom controller stuff
BangBangController controller = new BangBangController();
//Controls a motor with the output of the BangBang controller
//Controls a motor with the output of the BangBang conroller and a feedforward
//Shrinks the feedforward slightly to avoid over speeding the shooter
motor.set(controller.calculate(encoder.getRate(), setpoint) + 0.9 * feedforward.calculate(setpoint)); */
}
}