fixed a few bugs

This commit is contained in:
Pushkar9236
2022-01-25 19:56:18 -07:00
parent f9142d40d8
commit 9ab312f84a
2 changed files with 8 additions and 5 deletions
@@ -4,6 +4,8 @@
package frc4388.robot.subsystems;
import java.util.Base64.Encoder;
import com.ctre.phoenix.motorcontrol.NeutralMode;
import com.ctre.phoenix.motorcontrol.TalonFXControlMode;
import com.ctre.phoenix.motorcontrol.can.WPI_TalonFX;
@@ -30,7 +32,7 @@ double input;
public boolean m_isDrumReady = false;
public double m_fireVel;
public Trims shooterTrims;
public Hood m_hoodSubsystem;
public Turret m_turretSubsystem;
@@ -126,7 +128,7 @@ public void setShooterGains() {
//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
m_shooterFalconLeft.set(controller.calculate(encoder.getRate(), targetVel) + 0.9 * feedforward.calculate(targetVel)); */
m_shooterFalconLeft.set(controller.calculate(Encoder.getRate(), targetVel) + 0.9 * feedforward.calculate(targetVel);
}
@@ -9,6 +9,7 @@ import java.lang.ModuleLayer.Controller;
import javax.naming.ldap.Control;
import com.ctre.phoenix.sensors.CANCoder;
import com.revrobotics.CANSparkMax.IdleMode;
import edu.wpi.first.util.sendable.Sendable;
import edu.wpi.first.wpilibj.drive.RobotDriveBase.MotorType;
@@ -18,7 +19,7 @@ import edu.wpi.first.wpilibj2.command.SubsystemBase;
import frc4388.robot.Constants.ShooterConstants;
import frc4388.utility.Gains;
public class Turret<CANSparkMax, CANDigitalInput> extends SubsystemBase {
public class Turret<CANSparkMax, CANDigitalInput,> extends SubsystemBase {
private static final String turretMotor = null;
/** Creates a new Turret. */
public BoomBoom m_boomBoomSubsystem;
@@ -38,9 +39,9 @@ public class Turret<CANSparkMax, CANDigitalInput> extends SubsystemBase {
//Variables
public <m_boomBoomRotateMotor> Turret() {
public Turret() {
Object IdleMode;
m_boomBoomRotateMotor.setIdleMode(IdleMode.kBrake);
boolean enableLimitSwitch = true;
m_turretGyro = getGyroInterface();