Work from 3/19 Meeting
This commit is contained in:
@@ -12,7 +12,9 @@ import com.revrobotics.spark.SparkMax;
|
||||
import com.revrobotics.spark.SparkBase.ControlType;
|
||||
import com.revrobotics.spark.SparkLowLevel.MotorType;
|
||||
|
||||
import edu.wpi.first.math.MathUtil;
|
||||
import edu.wpi.first.wpilibj.Timer;
|
||||
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
|
||||
import edu.wpi.first.wpilibj2.command.Command;
|
||||
import edu.wpi.first.wpilibj2.command.InstantCommand;
|
||||
import edu.wpi.first.wpilibj2.command.SubsystemBase;
|
||||
@@ -68,6 +70,21 @@ public class Hood extends SubsystemBase {
|
||||
|
||||
@Override
|
||||
public void periodic() {
|
||||
SmartDashboard.putNumber(
|
||||
"HoodTargetDegrees",
|
||||
Math.toDegrees(currentTargetDegrees)
|
||||
);
|
||||
|
||||
SmartDashboard.putNumber(
|
||||
"HoodCurrentAngle",
|
||||
Math.toDegrees(encoder.getPosition())
|
||||
);
|
||||
|
||||
SmartDashboard.putBoolean(
|
||||
"HoodAtSetpoint",
|
||||
controller.isAtSetpoint()
|
||||
);
|
||||
|
||||
Logger.recordOutput("Hood/OutputCurrent", motor.getOutputCurrent());
|
||||
Logger.recordOutput("Hood/CurrentTarget", Math.toDegrees(currentTargetDegrees));
|
||||
Logger.recordOutput("Hood/CurrentAngle", Math.toDegrees(encoder.getPosition()));
|
||||
|
||||
Reference in New Issue
Block a user