mirror of
https://github.com/Team4388/2022NoWayHome.git
synced 2026-06-09 08:48:07 -06:00
fixed a few bugs
This commit is contained in:
@@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
package frc4388.robot.subsystems;
|
package frc4388.robot.subsystems;
|
||||||
|
|
||||||
|
import java.util.Base64.Encoder;
|
||||||
|
|
||||||
import com.ctre.phoenix.motorcontrol.NeutralMode;
|
import com.ctre.phoenix.motorcontrol.NeutralMode;
|
||||||
import com.ctre.phoenix.motorcontrol.TalonFXControlMode;
|
import com.ctre.phoenix.motorcontrol.TalonFXControlMode;
|
||||||
import com.ctre.phoenix.motorcontrol.can.WPI_TalonFX;
|
import com.ctre.phoenix.motorcontrol.can.WPI_TalonFX;
|
||||||
@@ -30,7 +32,7 @@ double input;
|
|||||||
public boolean m_isDrumReady = false;
|
public boolean m_isDrumReady = false;
|
||||||
public double m_fireVel;
|
public double m_fireVel;
|
||||||
|
|
||||||
public Trims shooterTrims;
|
|
||||||
|
|
||||||
public Hood m_hoodSubsystem;
|
public Hood m_hoodSubsystem;
|
||||||
public Turret m_turretSubsystem;
|
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 controller
|
||||||
//Controls a motor with the output of the BangBang conroller and a feedforward
|
//Controls a motor with the output of the BangBang conroller and a feedforward
|
||||||
//Shrinks the feedforward slightly to avoid over speeding the shooter
|
//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 javax.naming.ldap.Control;
|
||||||
|
|
||||||
import com.ctre.phoenix.sensors.CANCoder;
|
import com.ctre.phoenix.sensors.CANCoder;
|
||||||
|
import com.revrobotics.CANSparkMax.IdleMode;
|
||||||
|
|
||||||
import edu.wpi.first.util.sendable.Sendable;
|
import edu.wpi.first.util.sendable.Sendable;
|
||||||
import edu.wpi.first.wpilibj.drive.RobotDriveBase.MotorType;
|
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.robot.Constants.ShooterConstants;
|
||||||
import frc4388.utility.Gains;
|
import frc4388.utility.Gains;
|
||||||
|
|
||||||
public class Turret<CANSparkMax, CANDigitalInput> extends SubsystemBase {
|
public class Turret<CANSparkMax, CANDigitalInput,> extends SubsystemBase {
|
||||||
private static final String turretMotor = null;
|
private static final String turretMotor = null;
|
||||||
/** Creates a new Turret. */
|
/** Creates a new Turret. */
|
||||||
public BoomBoom m_boomBoomSubsystem;
|
public BoomBoom m_boomBoomSubsystem;
|
||||||
@@ -38,9 +39,9 @@ public class Turret<CANSparkMax, CANDigitalInput> extends SubsystemBase {
|
|||||||
|
|
||||||
|
|
||||||
//Variables
|
//Variables
|
||||||
public <m_boomBoomRotateMotor> Turret() {
|
public Turret() {
|
||||||
|
|
||||||
Object IdleMode;
|
|
||||||
m_boomBoomRotateMotor.setIdleMode(IdleMode.kBrake);
|
m_boomBoomRotateMotor.setIdleMode(IdleMode.kBrake);
|
||||||
boolean enableLimitSwitch = true;
|
boolean enableLimitSwitch = true;
|
||||||
m_turretGyro = getGyroInterface();
|
m_turretGyro = getGyroInterface();
|
||||||
|
|||||||
Reference in New Issue
Block a user