Skip to content

Commit 22fc661

Browse files
Fixed elevator homing example (Yet-Another-Software-Suite#47)
1 parent 3be1a19 commit 22fc661

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/simple_robot/src/main/java/frc/robot/subsystems/ExponentiallyProfiledElevatorSubsystem.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ public void simulationPeriodic()
139139
public Command homing(Current threshhold)
140140
{
141141
Debouncer currentDebouncer = new Debouncer(0.4); // Current threshold is only detected if exceeded for 0.4 seconds.
142-
Voltage runVolts = Volts.of(-2); // Volts required to run the mechanism down. Could be negative if the mechanism is inverted.
143-
Distance limitHit = hardUpperLimit; // Limit which gets hit. Could be the lower limit if the volts makes the arm go down.
142+
Voltage runVolts = Volts.of(-2); // Volts required to run the mechanism down. Could be positive if the mechanism is inverted.
143+
Distance limitHit = hardLowerLimit; // Limit which gets hit. Could be the lower limit if the volts makes the arm go down.
144144
AngularVelocity velocityThreshold = DegreesPerSecond.of(2); // The maximum amount of movement for the arm to be considered "hitting the hard limit".
145145
return Commands.startRun(motor::stopClosedLoopController, // Stop the closed loop controller
146146
() -> motor.setVoltage(runVolts)) // Set the voltage of the motor

0 commit comments

Comments
 (0)