Skip to content

Commit

Permalink
fix: addressed comments from Reviewers (setPositionMeters method name…
Browse files Browse the repository at this point in the history
… and lowering elevator after scoring in trap)
  • Loading branch information
gonzalezgonzalezl authored and rutmanz committed Feb 4, 2024
1 parent 8120e58 commit db08450
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ public TrapAndClimbSequence(Elevator elevator, Hooks hooks, Tramp tramp) {
new ParallelDeadlineGroup(
new WaitCommand(Constants.Tramp.TRAP_SCORING_TIME_SECONDS),
new ScoreInTrap(tramp) //TODO: Do whatever to this but not my job
),
new ElevatorSetpointCommand(elevator, ElevatorState.BOTTOM)
)
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public void periodic(){
public void setElevatorPosition(double positionMeters) {
positionMeters = MathUtil.clamp(positionMeters, Constants.Elevator.ELEVATOR_MINIMUM_HEIGHT, Constants.Elevator.ELEVATOR_MAX_HEIGHT);
setpointMeters = positionMeters;
io.setPositionMeters(setpointMeters);
io.setSetpointMeters(setpointMeters);

positionFilter.clear();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class ElevatorIOInputs {

default void updateInputs(ElevatorIOInputs inputs) {}

default void setPositionMeters(double position) {}
default void setSetpointMeters(double position) {}

default void setVoltage(double voltage) {}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public void setVoltage(double volts) {
elevatorAppliedVolts = MathUtil.clamp(volts, -12.0, 12.0);
}
@Override
public void setPositionMeters(double position) {
public void setSetpointMeters(double position) {
isClosedLoop = true;
setpoint = new TrapezoidProfile.State(position, 0.0);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public void updateInputs(ElevatorIOInputs inputs) {
}

@Override
public void setPositionMeters(double positionMeters) {
public void setSetpointMeters(double positionMeters) {
leader.setControl(motionMagicOut.withPosition(positionMeters));
}

Expand Down
10 changes: 5 additions & 5 deletions vendordeps/photonlib-json-1.0.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"fileName": "photonlib.json",
"name": "photonlib",
"version": "v2024.2.2",
"version": "v2024.2.3",
"uuid": "515fe07e-bfc6-11fa-b3de-0242ac130004",
"frcYear": "2024",
"mavenUrls": [
Expand All @@ -14,7 +14,7 @@
{
"groupId": "org.photonvision",
"artifactId": "photonlib-cpp",
"version": "v2024.2.2",
"version": "v2024.2.3",
"libName": "photonlib",
"headerClassifier": "headers",
"sharedLibrary": true,
Expand All @@ -29,7 +29,7 @@
{
"groupId": "org.photonvision",
"artifactId": "photontargeting-cpp",
"version": "v2024.2.2",
"version": "v2024.2.3",
"libName": "photontargeting",
"headerClassifier": "headers",
"sharedLibrary": true,
Expand All @@ -46,12 +46,12 @@
{
"groupId": "org.photonvision",
"artifactId": "photonlib-java",
"version": "v2024.2.2"
"version": "v2024.2.3"
},
{
"groupId": "org.photonvision",
"artifactId": "photontargeting-java",
"version": "v2024.2.2"
"version": "v2024.2.3"
}
]
}

0 comments on commit db08450

Please sign in to comment.