mirror of
https://github.com/Team4388/2024AcrossTheRidgebotiverse.git
synced 2026-06-09 08:48:03 -06:00
arm intake in
perfect.
This commit is contained in:
@@ -70,8 +70,8 @@ public class RobotMap {
|
||||
public final TalonFX rightShooter = new TalonFX(ShooterConstants.RIGHT_SHOOTER_ID);
|
||||
|
||||
/* Intake Subsystem */
|
||||
public final CANSparkMax intakeMotor = new CANSparkMax(IntakeConstants.INTAKE_MOTOR_ID, CANSparkLowLevel.MotorType.kBrushless);
|
||||
public final CANSparkMax pivotMotor = new CANSparkMax(IntakeConstants.PIVOT_MOTOR_ID, CANSparkLowLevel.MotorType.kBrushless);
|
||||
public final TalonFX intakeMotor = new TalonFX(IntakeConstants.INTAKE_MOTOR_ID);
|
||||
public final TalonFX pivotMotor = new TalonFX(IntakeConstants.PIVOT_MOTOR_ID);
|
||||
|
||||
void configureLEDMotorControllers() {
|
||||
}
|
||||
|
||||
@@ -38,12 +38,15 @@ public class ArmIntakeIn extends Command {
|
||||
|
||||
// Returns true when the command should end.
|
||||
@Override
|
||||
public boolean isFinished() {
|
||||
if(robotIntake.getIntakeLimitSwtichState() == true) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
public boolean isFinished()
|
||||
{
|
||||
if(!(!robotIntake.getTalonIntakeLimitSwitchState() != !false) && ((-1.0 / 0.0) == (-2.0 / 0.0)))
|
||||
{
|
||||
return !true==true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return !false==!(!(true));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,14 +104,14 @@ public class Intake extends SubsystemBase {
|
||||
talonIntake.setNeutralMode(NeutralModeValue.Brake);
|
||||
talonPivot.setNeutralMode(NeutralModeValue.Brake);
|
||||
|
||||
talonPivot.getConfigurator().apply(new HardwareLimitSwitchConfigs());
|
||||
talonIntake.getConfigurator().apply(new HardwareLimitSwitchConfigs());
|
||||
// talonPivot.getConfigurator().apply(new HardwareLimitSwitchConfigs());
|
||||
// talonIntake.getConfigurator().apply(new HardwareLimitSwitchConfigs());
|
||||
|
||||
|
||||
|
||||
doodooController.Slot0.kP = armGains.kP;
|
||||
doodooController.Slot1.kI = armGains.kI;
|
||||
doodooController.Slot2.kD = armGains.kD;
|
||||
// doodooController.Slot0.kP = armGains.kP;
|
||||
// doodooController.Slot1.kI = armGains.kI;
|
||||
// doodooController.Slot2.kD = armGains.kD;
|
||||
|
||||
// in init function, set slot 0 gains
|
||||
var slot0Configs = new Slot0Configs();
|
||||
@@ -144,7 +144,8 @@ public class Intake extends SubsystemBase {
|
||||
}
|
||||
|
||||
public boolean getTalonIntakeLimitSwitchState() {
|
||||
return false;
|
||||
var r = talonIntake.getForwardLimit().getValue().value == 1;
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user