This repository was archived by the owner on Jun 20, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed
src/main/java/org/team1540/robot2024 Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -56,15 +56,16 @@ public static class Drivetrain {
56
56
public static final double MAX_ANGULAR_SPEED = MAX_LINEAR_SPEED / DRIVE_BASE_RADIUS ;
57
57
}
58
58
public static class Indexer {
59
+ // TODO: fix these constants
59
60
public static final int INTAKE_ID = 0 ;
60
61
public static final int FEEDER_ID = 0 ;
61
62
public static final double FEEDER_KP = 0.0 ;
62
63
public static final double FEEDER_KI = 0.0 ;
63
64
public static final double FEEDER_KD = 0.0 ;
64
65
public static final double FEEDER_KS = 0.0 ;
65
66
public static final double FEEDER_KV = 0.0 ;
66
- public static final double FEEDER_GEAR_RATIO = 0 .0 ;
67
- public static final double INTAKE_GEAR_RATIO = 0 .0 ;
67
+ public static final double FEEDER_GEAR_RATIO = 1 .0 ;
68
+ public static final double INTAKE_GEAR_RATIO = 1 .0 ;
68
69
69
70
}
70
71
}
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ class IndexerIOInputs {
12
12
public double feederVoltage ;
13
13
public double feederCurrentAmps ;
14
14
public double feederVelocityRPM ;
15
- public boolean noteInIntake ;
15
+ public boolean noteInIntake = false ;
16
16
}
17
17
18
18
/**
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ public class IndexerIOSim implements IndexerIO {
14
14
15
15
private final DCMotorSim intakeSim = new DCMotorSim (DCMotor .getNEO (1 ), INTAKE_GEAR_RATIO ,0.025 );
16
16
private final DCMotorSim feederSim = new DCMotorSim (DCMotor .getNEO (1 ), FEEDER_GEAR_RATIO ,0.025 );
17
- private final SimDeviceSim beamBreakSim = new SimDeviceSim ("Indexer Beam Break" );
17
+ // private final SimDeviceSim beamBreakSim = new SimDeviceSim("Indexer Beam Break");
18
18
private final PIDController feederSimPID = new PIDController (FEEDER_KP , FEEDER_KI ,FEEDER_KD );
19
19
20
20
@ Override
@@ -27,10 +27,10 @@ public void updateInputs(IndexerIOInputs inputs) {
27
27
inputs .feederCurrentAmps = feederSim .getCurrentDrawAmps ();
28
28
// inputs.feederVoltage = feederSim.getBusVoltage() * feederSim.getAppliedOutput();
29
29
inputs .feederVelocityRPM = feederSim .getAngularVelocityRPM ();
30
- inputs .noteInIntake = beamBreakSim .getBoolean ("Indexer Beam Break" ).get ();
30
+ // inputs.noteInIntake = beamBreakSim.getBoolean("Indexer Beam Break").get();
31
31
32
32
// this is a very funny line of code, and absolutely does not belong here, but I don't know how to do this otherwise
33
- feederSim .setState (feederSim .getAngularPositionRad (), feederSimPID .calculate (feederSim .getAngularVelocityRadPerSec ()));
33
+ feederSim .setState (feederSim .getAngularPositionRad (), feederSimPID .calculate (feederSim .getAngularVelocityRadPerSec ()));
34
34
35
35
}
36
36
You can’t perform that action at this time.
0 commit comments