Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Commit

Permalink
logging
Browse files Browse the repository at this point in the history
  • Loading branch information
1yd1a authored and dejabot committed Jan 30, 2024
1 parent cb99a36 commit 6f7bfbe
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/main/java/com/team766/odometry/Odometry.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,13 @@ public Odometry(GyroReader gyro, MotorController[] motors, CANcoder[] CANCoders,
WHEEL_CIRCUMFERENCE = wheelCircumference;
GEAR_RATIO = gearRatio;
ENCODER_TO_REVOLUTION_CONSTANT = encoderToRevolutionConstant;
currentPosition = new Pose2d(0, 0, new Rotation2d());
for (int i = 0; i < motorCount; i++) {
prevPositions[i] = new Pose2d(0, 0, new Rotation2d());
currPositions[i] = new Pose2d(0, 0, new Rotation2d());
prevEncoderValues[i] = 0;
currEncoderValues[i] = 0;
}
}

/**
Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/team766/robot/gatorade/OI.java
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ public void run(Context context) {
&& Math.abs(leftJoystickX) + Math.abs(leftJoystickY) + Math.abs(rightJoystickX)
> 0) {
context.takeOwnership(Robot.drive);
log("current pos: "+Robot.drive.getCurrentPosition());
// If a button is pressed, drive is just fine adjustment
if (rightJoystick.getButton(InputConstants.FINE_DRIVING)) {
Robot.drive.controlFieldOriented(
Expand Down

0 comments on commit 6f7bfbe

Please sign in to comment.