Skip to content

Commit

Permalink
advantagekit logger
Browse files Browse the repository at this point in the history
  • Loading branch information
SourWasHere committed Jan 20, 2025
1 parent e9e3b43 commit 12d33bc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package frc.robot.subsystems.ClawSubsystem;
import edu.wpi.first.wpilibj2.command.SubsystemBase;
import org.littletonrobotics.junction.AutoLog;
import org.littletonrobotics.junction.Logger;
import org.littletonrobotics.junction.inputs.LoggableInputs;

public class ClawSubsystem extends SubsystemBase {
private final EndEffectorIO endEffector;
Expand All @@ -20,5 +23,6 @@ public void close() {

public void robotPeriodic() {
endEffector.updateInputs(inputs);
Logger.processInputs("ClawSubsystem", (LoggableInputs) inputs);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public void goToSetpoint(DCMotorSim motor, double setpoint) {
public void rotateGrippers() {
setVelocity(gripperWheel, 1);
try {
Thread.sleep(30);
Thread.sleep(ClawConstants.gripperMoveTimeMilliseconds);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
Expand All @@ -41,4 +41,8 @@ public void setVelocity(DCMotorSim motor, double velocity) {
public void setVoltage(DCMotorSim motor, double volts) {
motor.setInputVoltage(volts);
}

public void updateInputs(EndEffectorInputs inputs) {
inputs.volts = 0.0;
}
}

0 comments on commit 12d33bc

Please sign in to comment.