mirror of
https://github.com/Team4388/2026KPopRobotHunters.git
synced 2026-06-09 00:38:03 -06:00
Merge branch 'New-Intake' of https://github.com/Team4388/2026KPopRobotHunters into New-Intake
This commit is contained in:
@@ -37,6 +37,7 @@ public class Intake extends SubsystemBase {
|
||||
Retracting,
|
||||
|
||||
Idle,
|
||||
RectractTorque,
|
||||
Bouncing
|
||||
}
|
||||
|
||||
@@ -85,6 +86,8 @@ public class Intake extends SubsystemBase {
|
||||
// return FieldZone.InShootZone;
|
||||
// }
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void periodic() {
|
||||
// FaultReporter.register(this); // TODO Implement fault reporter
|
||||
@@ -94,6 +97,7 @@ public class Intake extends SubsystemBase {
|
||||
Logger.processInputs("Intake", state);
|
||||
Logger.recordOutput("Intake/IntakeState", this.mode);
|
||||
|
||||
|
||||
io.updateInputs(state);
|
||||
|
||||
// getCurrentTime
|
||||
@@ -154,6 +158,19 @@ public class Intake extends SubsystemBase {
|
||||
io.setRollerOutput(state, 0);
|
||||
}
|
||||
break;
|
||||
case RectractTorque:
|
||||
io.setRollerOutput(state, IntakeConstants.ROLLER_RETRACT_PERCENT_OUTPUT.get());
|
||||
if (state.armMotorCurrent.in(Amps) < IntakeConstants.INTAKE_SQUEEZE_CURRENT_LIMIT.get()){
|
||||
io.armOutput(IntakeConstants.ARM_SQUEEZE_PERCENT_OUTPUT.get());
|
||||
} else {
|
||||
io.armOutput(IntakeConstants.ARM_REDUCED_SQUEEZE_PERCENT_OUTPUT.get());
|
||||
}
|
||||
if(state.intakeEncoder.in(Rotations) > IntakeConstants.ARM_REVERSE_ROLLER_RANGE.get()) {
|
||||
io.setRollerOutput(state, IntakeConstants.ROLLER_RETRACT_PERCENT_OUTPUT.get());
|
||||
} else {
|
||||
io.setRollerOutput(state, 0);
|
||||
}
|
||||
break;
|
||||
case Idle:
|
||||
io.armOutput(0);
|
||||
io.setRollerOutput(state, 0);
|
||||
|
||||
@@ -25,6 +25,11 @@ public class IntakeConstants {
|
||||
public static final ConfigurableDouble INTAKE_BOUNCE_VELOCITY_LIMIT = new ConfigurableDouble("Intake Bounce Velocity Limit", 4);
|
||||
|
||||
|
||||
//squeeze constants
|
||||
public static final ConfigurableDouble INTAKE_SQUEEZE_CURRENT_LIMIT = new ConfigurableDouble("Intake Squeeze Current Limit", 20);
|
||||
public static final ConfigurableDouble ARM_SQUEEZE_PERCENT_OUTPUT = new ConfigurableDouble("Arm squeeze % output", -0.1);
|
||||
public static final ConfigurableDouble ARM_REDUCED_SQUEEZE_PERCENT_OUTPUT = new ConfigurableDouble("Arm squeeze % output", -0.02);
|
||||
|
||||
|
||||
//IDs
|
||||
|
||||
|
||||
Reference in New Issue
Block a user