From 66622b43e7e65612e4e9eb9fd1178cd68127361c Mon Sep 17 00:00:00 2001 From: James Kuszmaul Date: Fri, 5 Dec 2014 19:16:53 -0500 Subject: [PATCH] Fixed accidental confusion between seconds/milliseconds. get* in CANTalon would've blocked for 1 sec instead of 1ms. Change-Id: I1b6fce24329e2789053372181dbef5c28f4b747a --- .../main/java/edu/wpi/first/wpilibj/CANTalon.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/wpilibj/wpilibJavaDevices/src/main/java/edu/wpi/first/wpilibj/CANTalon.java b/wpilibj/wpilibJavaDevices/src/main/java/edu/wpi/first/wpilibj/CANTalon.java index b095348d61..4a20bc7ac3 100644 --- a/wpilibj/wpilibJavaDevices/src/main/java/edu/wpi/first/wpilibj/CANTalon.java +++ b/wpilibj/wpilibJavaDevices/src/main/java/edu/wpi/first/wpilibj/CANTalon.java @@ -365,7 +365,7 @@ public class CANTalon implements MotorSafety, PIDOutput, SpeedController { m_impl.RequestParam(CanTalonSRX.param_t.eProfileParamSlot1_P); // Briefly wait for new values from the Talon. - Timer.delay(1); + Timer.delay(0.001); long pp = CanTalonJNI.new_doublep(); m_impl.GetPgain(m_profile, new SWIGTYPE_p_double(pp, true)); @@ -384,7 +384,7 @@ public class CANTalon implements MotorSafety, PIDOutput, SpeedController { m_impl.RequestParam(CanTalonSRX.param_t.eProfileParamSlot1_I); // Briefly wait for new values from the Talon. - Timer.delay(1); + Timer.delay(0.001); long ip = CanTalonJNI.new_doublep(); m_impl.GetIgain(m_profile, new SWIGTYPE_p_double(ip, true)); @@ -403,7 +403,7 @@ public class CANTalon implements MotorSafety, PIDOutput, SpeedController { m_impl.RequestParam(CanTalonSRX.param_t.eProfileParamSlot1_D); // Briefly wait for new values from the Talon. - Timer.delay(1); + Timer.delay(0.001); long dp = CanTalonJNI.new_doublep(); m_impl.GetDgain(m_profile, new SWIGTYPE_p_double(dp, true)); @@ -422,7 +422,7 @@ public class CANTalon implements MotorSafety, PIDOutput, SpeedController { m_impl.RequestParam(CanTalonSRX.param_t.eProfileParamSlot1_F); // Briefly wait for new values from the Talon. - Timer.delay(1); + Timer.delay(0.001); long fp = CanTalonJNI.new_doublep(); m_impl.GetFgain(m_profile, new SWIGTYPE_p_double(fp, true)); @@ -441,7 +441,7 @@ public class CANTalon implements MotorSafety, PIDOutput, SpeedController { m_impl.RequestParam(CanTalonSRX.param_t.eProfileParamSlot1_IZone); // Briefly wait for new values from the Talon. - Timer.delay(1); + Timer.delay(0.001); long fp = CanTalonJNI.new_intp(); m_impl.GetIzone(m_profile, new SWIGTYPE_p_int(fp, true)); @@ -460,7 +460,7 @@ public class CANTalon implements MotorSafety, PIDOutput, SpeedController { m_impl.RequestParam(CanTalonSRX.param_t.eProfileParamSlot1_CloseLoopRampRate); // Briefly wait for new values from the Talon. - Timer.delay(1); + Timer.delay(0.001); long fp = CanTalonJNI.new_intp(); m_impl.GetCloseLoopRampRate(m_profile, new SWIGTYPE_p_int(fp, true));