Skip to content

Commit

Permalink
log devilbot state
Browse files Browse the repository at this point in the history
  • Loading branch information
loafdog committed Mar 27, 2024
1 parent 1c6a725 commit ed6f833
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/main/java/frc/robot/util/DevilBotState.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
package frc.robot.util;

import java.util.Optional;

import org.littletonrobotics.junction.Logger;

import edu.wpi.first.wpilibj.DriverStation;
import edu.wpi.first.wpilibj.DriverStation.Alliance;
import frc.robot.config.RobotConfig;
import frc.robot.config.RobotConfig.ArmConstants;
import frc.robot.config.RobotConfig.ShooterConstants;
import java.util.Optional;

import org.littletonrobotics.junction.AutoLogOutput;

Expand Down Expand Up @@ -206,6 +209,7 @@ public static double getVisionRobotYawToTarget() {
yawToTarget -= visionYawToTarget.get();
}
}
Logger.recordOutput("DevilBotState/yawToTarget", yawToTarget);
return yawToTarget;
}

Expand All @@ -220,7 +224,9 @@ public static double getVisionRobotXToAmpTarget() {


double xToTarget = distanceToTarget * Math.sin(Math.toRadians(RobotConfig.drive.getAngle())+Math.toRadians(yawToTarget));


Logger.recordOutput("DevilBotState/distanceToTarget", yawToTarget);
Logger.recordOutput("DevilBotState/xToTarget", yawToTarget);
return xToTarget;
}

Expand Down

0 comments on commit ed6f833

Please sign in to comment.