mirror of
https://github.com/Team4388/2026KPopRobotHunters.git
synced 2026-06-09 00:38:03 -06:00
squeeze/toerque retract
This commit is contained in:
@@ -5,15 +5,15 @@ package frc4388.robot.constants;
|
||||
*/
|
||||
public final class BuildConstants {
|
||||
public static final String MAVEN_GROUP = "";
|
||||
public static final String MAVEN_NAME = "2026KPopRobotHunters-new";
|
||||
public static final String MAVEN_NAME = "2026KPopRobotHunters";
|
||||
public static final String VERSION = "unspecified";
|
||||
public static final int GIT_REVISION = 189;
|
||||
public static final String GIT_SHA = "65c76aca95de81f342df7ff26a77e18856f22a83";
|
||||
public static final String GIT_DATE = "2026-03-28 15:56:54 MDT";
|
||||
public static final int GIT_REVISION = 190;
|
||||
public static final String GIT_SHA = "3fe5d0e5a1cfe24710b755b489fa61255e307095";
|
||||
public static final String GIT_DATE = "2026-03-30 16:15:43 MDT";
|
||||
public static final String GIT_BRANCH = "New-Intake";
|
||||
public static final String BUILD_DATE = "2026-03-30 15:59:11 MDT";
|
||||
public static final long BUILD_UNIX_TIME = 1774907951058L;
|
||||
public static final int DIRTY = 0;
|
||||
public static final String BUILD_DATE = "2026-03-31 18:51:12 MDT";
|
||||
public static final long BUILD_UNIX_TIME = 1775004672077L;
|
||||
public static final int DIRTY = 1;
|
||||
|
||||
private BuildConstants(){}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
@@ -147,6 +151,19 @@ public class Intake extends SubsystemBase {
|
||||
|
||||
io.armOutput(percentOutput);
|
||||
|
||||
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 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 {
|
||||
|
||||
@@ -24,6 +24,11 @@ public class IntakeConstants {
|
||||
public static final ConfigurableDouble INTAKE_BOUNCE_VELOCITY_LIMIT = new ConfigurableDouble("Intake Bounce Velocity Limit", 20);
|
||||
|
||||
|
||||
//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