Fix Dead assist so it uses the right constants and TurnRate code

This commit is contained in:
Keenan D. Buckley
2020-02-19 19:15:45 -07:00
parent 9c2a897236
commit 11f7f2272e
5 changed files with 10 additions and 9 deletions
@@ -131,11 +131,7 @@ public class DriveWithJoystickUsingDeadAssistPID extends CommandBase {
private void resetGyroTarget() {
m_targetGyro = m_currentGyro;
m_targetGyro = m_currentGyro
+ (3 * m_drive.m_rightFrontMotor.getSelectedSensorVelocity(1));
m_targetGyro = MathUtil.clamp( m_targetGyro,
m_currentGyro-(DriveConstants.TICKS_PER_GYRO_REV/8),
m_currentGyro+(DriveConstants.TICKS_PER_GYRO_REV/8));
+ m_drive.getTurnRate();
}
// Called once the command ends or is interrupted.