From 59700882f1b17d56abec4755a2009c56eec6a28b Mon Sep 17 00:00:00 2001 From: Kay Kasemir Date: Wed, 12 Sep 2018 00:38:19 -0400 Subject: [PATCH] PIDController: Mention unit for 'period' (#1305) --- .../main/native/include/frc/PIDController.h | 24 +++++++++---------- .../edu/wpi/first/wpilibj/PIDController.java | 12 ++++++---- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/wpilibc/src/main/native/include/frc/PIDController.h b/wpilibc/src/main/native/include/frc/PIDController.h index ee78d353c1..9833d72154 100644 --- a/wpilibc/src/main/native/include/frc/PIDController.h +++ b/wpilibc/src/main/native/include/frc/PIDController.h @@ -45,9 +45,9 @@ class PIDController : public PIDBase, public Controller { * @param Kd the derivative coefficient * @param source The PIDSource object that is used to get values * @param output The PIDOutput object that is set to the output value - * @param period the loop time for doing calculations. This particularly - * effects calculations of the integral and differental terms. - * The default is 50ms. + * @param period the loop time for doing calculations in seconds. This + * particularly affects calculations of the integral and + * differental terms. The default is 0.05 (50ms). */ PIDController(double p, double i, double d, PIDSource* source, PIDOutput* output, double period = 0.05); @@ -60,9 +60,9 @@ class PIDController : public PIDBase, public Controller { * @param Kd the derivative coefficient * @param source The PIDSource object that is used to get values * @param output The PIDOutput object that is set to the output value - * @param period the loop time for doing calculations. This particularly - * effects calculations of the integral and differental terms. - * The default is 50ms. + * @param period the loop time for doing calculations in seconds. This + * particularly affects calculations of the integral and + * differental terms. The default is 0.05 (50ms). */ PIDController(double p, double i, double d, double f, PIDSource* source, PIDOutput* output, double period = 0.05); @@ -75,9 +75,9 @@ class PIDController : public PIDBase, public Controller { * @param Kd the derivative coefficient * @param source The PIDSource object that is used to get values * @param output The PIDOutput object that is set to the output value - * @param period the loop time for doing calculations. This particularly - * effects calculations of the integral and differental terms. - * The default is 50ms. + * @param period the loop time for doing calculations in seconds. This + * particularly affects calculations of the integral and + * differental terms. The default is 0.05 (50ms). */ PIDController(double p, double i, double d, PIDSource& source, PIDOutput& output, double period = 0.05); @@ -90,9 +90,9 @@ class PIDController : public PIDBase, public Controller { * @param Kd the derivative coefficient * @param source The PIDSource object that is used to get values * @param output The PIDOutput object that is set to the output value - * @param period the loop time for doing calculations. This particularly - * effects calculations of the integral and differental terms. - * The default is 50ms. + * @param period the loop time for doing calculations in seconds. This + * particularly affects calculations of the integral and + * differental terms. The default is 0.05 (50ms). */ PIDController(double p, double i, double d, double f, PIDSource& source, PIDOutput& output, double period = 0.05); diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/PIDController.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/PIDController.java index 927bf9eb53..da4118f8c7 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/PIDController.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/PIDController.java @@ -31,8 +31,10 @@ public class PIDController extends PIDBase implements Controller { * @param Kf the feed forward term * @param source The PIDSource object that is used to get values * @param output The PIDOutput object that is set to the output percentage - * @param period the loop time for doing calculations. This particularly effects calculations of - * the integral and differential terms. The default is 50ms. + * @param period the loop time for doing calculations in seconds. + * This particularly affects calculations of + * the integral and differential terms. + * The default is 0.05 (50ms). */ @SuppressWarnings("ParameterName") public PIDController(double Kp, double Ki, double Kd, double Kf, PIDSource source, @@ -49,8 +51,10 @@ public class PIDController extends PIDBase implements Controller { * @param Kd the derivative coefficient * @param source the PIDSource object that is used to get values * @param output the PIDOutput object that is set to the output percentage - * @param period the loop time for doing calculations. This particularly effects calculations of - * the integral and differential terms. The default is 50ms. + * @param period the loop time for doing calculations in seconds. + * This particularly affects calculations of + * the integral and differential terms. + * The default is 0.05 (50ms). */ @SuppressWarnings("ParameterName") public PIDController(double Kp, double Ki, double Kd, PIDSource source, PIDOutput output,