Skip to content

Commit ebfe679

Browse files
committed
Turn off a bunch of SmartDashboard printing - may have been taking too long & causing event loop to overrun.
1 parent 9913eed commit ebfe679

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

src/main/java/frc/robot/drive/Drivetrain.java

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public Drivetrain() {
105105
public void periodic() {
106106
// Update the odometry in the periodic block
107107
updateOdometry();
108-
map.addPose(m_odometry.getPoseMeters(), Timer.getFPGATimestamp());
108+
// map.addPose(m_odometry.getPoseMeters(), Timer.getFPGATimestamp());
109109

110110
SmartDashboard.putNumber("Heading", getHeading().getDegrees());
111111

@@ -114,17 +114,16 @@ public void periodic() {
114114
SmartDashboard.putNumber("currentAngle", getPose().getRotation().getRadians());
115115
SmartDashboard.putNumber("targetPoseAngle", m_targetPose.getRotation().getRadians());
116116

117-
SmartDashboard.putNumber("Distance 0", modules[0].getDriveDistanceMeters());
118-
SmartDashboard.putNumber("Distance 1", modules[1].getDriveDistanceMeters());
119-
SmartDashboard.putNumber("Distance 2", modules[2].getDriveDistanceMeters());
120-
SmartDashboard.putNumber("Distance 3", modules[3].getDriveDistanceMeters());
117+
// SmartDashboard.putNumber("Distance 0", modules[0].getDriveDistanceMeters());
118+
// SmartDashboard.putNumber("Distance 1", modules[1].getDriveDistanceMeters());
119+
// SmartDashboard.putNumber("Distance 2", modules[2].getDriveDistanceMeters());
120+
// SmartDashboard.putNumber("Distance 3", modules[3].getDriveDistanceMeters());
121121

122-
SmartDashboard.putNumber("Angle 0", modules[0].getTurnCANcoderAngle());
123-
SmartDashboard.putNumber("Angle 1", modules[1].getTurnCANcoderAngle());
124-
SmartDashboard.putNumber("Angle 2", modules[2].getTurnCANcoderAngle());
125-
SmartDashboard.putNumber("Angle 3", modules[3].getTurnCANcoderAngle());
122+
// SmartDashboard.putNumber("Angle 0", modules[0].getTurnCANcoderAngle());
123+
// SmartDashboard.putNumber("Angle 1", modules[1].getTurnCANcoderAngle());
124+
// SmartDashboard.putNumber("Angle 2", modules[2].getTurnCANcoderAngle());
125+
// SmartDashboard.putNumber("Angle 3", modules[3].getTurnCANcoderAngle());
126126

127-
SmartDashboard.putNumber("Drive heading", getHeading().getDegrees());
128127
}
129128

130129
public void updateOdometry() {

src/main/java/frc/robot/drive/commands/JoystickDrive.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,21 @@ public JoystickDrive(Drivetrain subsystem, HelixJoysticks joysticks){
2929
@Override
3030
public double getX() {
3131
double xRaw = m_controller.getX();
32-
SmartDashboard.putNumber("JoystickX", xyJoyMap.calculateMappedVal(xRaw));
32+
// SmartDashboard.putNumber("JoystickX", xyJoyMap.calculateMappedVal(xRaw));
3333
return xyJoyMap.calculateMappedVal(xRaw);
3434
}
3535

3636
@Override
3737
public double getY() {
3838
double yRaw = m_controller.getY();
39-
SmartDashboard.putNumber("JoystickY", xyJoyMap.calculateMappedVal(yRaw));
39+
// SmartDashboard.putNumber("JoystickY", xyJoyMap.calculateMappedVal(yRaw));
4040
return xyJoyMap.calculateMappedVal(yRaw);
4141
}
4242

4343
@Override
4444
public double getTheta() {
4545
double thetaRaw = m_controller.getRotation();
46-
SmartDashboard.putNumber("JoystickTheta", xyJoyMap.calculateMappedVal(thetaRaw));
46+
// SmartDashboard.putNumber("JoystickTheta", xyJoyMap.calculateMappedVal(thetaRaw));
4747
return thetaJoyMap.calculateMappedVal(thetaRaw);
4848
}
4949

0 commit comments

Comments
 (0)