Updated Telemetry, added javadocs

This commit is contained in:
thenetworkgrinch
2024-06-12 15:58:37 -05:00
parent 2d992a453a
commit 6aa91f2598
4 changed files with 48 additions and 44 deletions

View File

@@ -286,9 +286,9 @@ public class SwerveDriveTest
double power = powerSupplied.get();
double distance = module.getPosition().distanceMeters;
double velocity = module.getDriveMotor().getVelocity();
SmartDashboard.putNumber("Module[" + module.configuration.name + "] SysId Drive Power", power);
SmartDashboard.putNumber("Module[" + module.configuration.name + "] SysId Drive Position", distance);
SmartDashboard.putNumber("Module[" + module.configuration.name + "] SysId Drive Velocity", velocity);
SmartDashboard.putNumber("swerve/modules/" + module.configuration.name + "/SysId Drive Power", power);
SmartDashboard.putNumber("swerve/modules/" + module.configuration.name + "/SysId Drive Position", distance);
SmartDashboard.putNumber("swerve/modules/" + module.configuration.name + "/SysId Drive Velocity", velocity);
log.motor("drive-" + module.configuration.name)
.voltage(m_appliedVoltage.mut_replace(power, Volts))
.linearPosition(m_distance.mut_replace(distance, Meters))
@@ -358,9 +358,9 @@ public class SwerveDriveTest
double power = powerSupplied.get();
double angle = module.getAbsolutePosition();
double velocity = module.getAbsoluteEncoder().getVelocity();
SmartDashboard.putNumber("Module[" + module.configuration.name + "] SysId Angle Power", power);
SmartDashboard.putNumber("Module[" + module.configuration.name + "] SysId Angle Position", angle);
SmartDashboard.putNumber("Module[" + module.configuration.name + "] SysId Absolute Encoder Velocity", velocity);
SmartDashboard.putNumber("swerve/modules/" + module.configuration.name + "/SysId Angle Power", power);
SmartDashboard.putNumber("swerve/modules/" + module.configuration.name + "/SysId Angle Position", angle);
SmartDashboard.putNumber("swerve/modules/" + module.configuration.name + "/SysId Absolute Encoder Velocity", velocity);
log.motor("angle-" + module.configuration.name)
.voltage(m_appliedVoltage.mut_replace(power, Volts))
.angularPosition(m_anglePosition.mut_replace(angle, Degrees))