Skip to content
This repository has been archived by the owner on Feb 9, 2024. It is now read-only.

Commit

Permalink
resolve issues about #160
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacob1010-h committed Oct 31, 2023
1 parent e67f82d commit b8daf4d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/util/DriverUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class DriverUI implements Loggable {
@Log(name="Select Auto:", rowIndex = 0, columnIndex = 4, height = 1, width = 2)
public static SendableChooser<AutoPose> autoChooser = new SendableChooser<>();

@Log(name="Field", rowIndex = 0, columnIndex = 0, height = 6, width = 6)
@Log(name="Field", rowIndex = 0, columnIndex = 0, height = 4, width = 10)
public static Field2d field = new Field2d();

@BooleanBox(name = "Fresh Code", rowIndex = 0, columnIndex = 10, height = 1, width = 1, colorWhenTrue = "lime")
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/hardware/Swerve.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import edu.wpi.first.math.kinematics.SwerveModulePosition;
import edu.wpi.first.math.kinematics.SwerveModuleState;
import edu.wpi.first.util.WPIUtilJNI;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
import calc.ADIS16470_IMU;
import calc.Pose3dLogger;
import frc.robot.util.DriverUI;
Expand Down Expand Up @@ -124,6 +125,10 @@ public void periodic() {
public void logPositions() {
SwerveLogBuilder logs = new SwerveLogBuilder();
DriverUI.field.setRobotPose(getPose());

logs.addRealModuleStates(new double[]{ 0, 0, 0, 0, 0, 0, 0, 0 });
logs.addRobotRotation(getPose().getRotation().getDegrees());

logs.addRobotRotation(getYaw().getRadians());
logs.addDesiredModuleStates(desiredModuleStates);
logs.addRealModuleStates(new double[] {
Expand Down

0 comments on commit b8daf4d

Please sign in to comment.