mirror of
https://github.com/BroncBotz3481/YAGSL
synced 2026-06-19 06:21:40 +00:00
New name for module locations, some fixes
This commit is contained in:
@@ -263,7 +263,7 @@ public class SwerveDrive
|
||||
// Sets states
|
||||
for (SwerveModule module : swerveModules)
|
||||
{
|
||||
module.setDesiredState(desiredStates[module.moduleNumber], isOpenLoop);
|
||||
module.setDesiredState(desiredStates[module.moduleNumber], isOpenLoop, false);
|
||||
|
||||
if (SwerveDriveTelemetry.verbosity.ordinal() >= TelemetryVerbosity.HIGH.ordinal())
|
||||
{
|
||||
@@ -536,7 +536,7 @@ public class SwerveDrive
|
||||
SwerveDriveTelemetry.desiredStates[(swerveModule.moduleNumber * 2) + 1] =
|
||||
desiredState.speedMetersPerSecond;
|
||||
}
|
||||
swerveModule.setDesiredState(desiredState, false);
|
||||
swerveModule.setDesiredState(desiredState, false, true);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -700,4 +700,16 @@ public class SwerveDrive
|
||||
imu.setOffset(gyro);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset the drive encoders on the robot, useful when manually resetting the robot without a reboot, like in
|
||||
* autonomous.
|
||||
*/
|
||||
public void resetEncoders()
|
||||
{
|
||||
for (SwerveModule module : swerveModules)
|
||||
{
|
||||
module.configuration.driveMotor.setPosition(0);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user