Skip to content

Commit

Permalink
sysid nondefalt config fix to #13?
Browse files Browse the repository at this point in the history
  • Loading branch information
BrandonS09 committed Mar 5, 2024
1 parent 0dd661b commit 556ee37
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/org/carlmontrobotics/subsystems/Arm.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import static edu.wpi.first.units.Units.DegreesPerSecond;
import static edu.wpi.first.units.Units.Rotations;
import static edu.wpi.first.units.Units.RotationsPerSecond;
import static edu.wpi.first.units.Units.Seconds;
import static edu.wpi.first.units.Units.Volts;
import edu.wpi.first.units.Velocity;
import static edu.wpi.first.units.MutableMeasure.mutable;
Expand Down Expand Up @@ -200,6 +201,7 @@ public void driveMotor(Measure<Voltage> volts) {
armMotorMaster.setVoltage(volts.in(Volts));

}
private SysIdRoutine.Config defaultSysIdConfig = new SysIdRoutine.Config(Volts.of(1).per(Seconds.of(1)), Volts.of(2), Seconds.of(10));

public void logMotor(SysIdRoutineLog log) {
log.motor("armMotorMaster")
Expand All @@ -215,7 +217,7 @@ public void logMotor(SysIdRoutineLog log) {
}

private final SysIdRoutine routine = new SysIdRoutine(
new SysIdRoutine.Config(),
defaultSysIdConfig,
new SysIdRoutine.Mechanism(
this::driveMotor,
this::logMotor,
Expand Down

0 comments on commit 556ee37

Please sign in to comment.