mirror of
https://github.com/Team4388/2024AcrossTheRidgebotiverse.git
synced 2026-06-08 16:28:03 -06:00
phoenix 6?
This commit is contained in:
@@ -186,7 +186,7 @@ public class RobotContainer {
|
||||
m_robotSwerveDrive.setDefaultCommand(new RunCommand(() -> {
|
||||
m_robotSwerveDrive.driveWithInput(getDeadbandedDriverController().getLeft(),
|
||||
getDeadbandedDriverController().getRight(),
|
||||
true);
|
||||
false);
|
||||
}, m_robotSwerveDrive)
|
||||
.withName("SwerveDrive DefaultCommand"));
|
||||
m_robotSwerveDrive.setToSlow();
|
||||
|
||||
@@ -132,7 +132,7 @@ public class SwerveModule extends SubsystemBase {
|
||||
*/
|
||||
public Rotation2d getAngle() {
|
||||
// * Note: This assumes that the CANCoders are setup with the default feedback coefficient and the sensor value reports degrees.
|
||||
return Rotation2d.fromDegrees(encoder.getAbsolutePosition().getValue());
|
||||
return Rotation2d.fromDegrees(encoder.getPosition().getValue() * 360);
|
||||
// return Rotation2d.fromDegrees(tal.get());
|
||||
}
|
||||
|
||||
@@ -207,8 +207,8 @@ public class SwerveModule extends SubsystemBase {
|
||||
|
||||
// angleMotor.setControl(new PositionVoltage(currentTicks + deltaTicks));
|
||||
|
||||
System.out.println(state.angle.getDegrees());
|
||||
angleMotor.setControl(new PositionVoltage(state.angle.getDegrees()));
|
||||
System.out.println(desiredState.angle.getDegrees());
|
||||
angleMotor.setControl(new PositionVoltage(desiredState.angle.getDegrees()/360));
|
||||
// angleMotor.setControl(new PositionVoltage(0));
|
||||
// angleMotor.set(TalonFXControlMode.Position, currentTicks + deltaTicks);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user