From 1e168f363e23c42bde8b39e75765bb2eb81f97b2 Mon Sep 17 00:00:00 2001 From: fodfodfod <94200657+fodfodfod@users.noreply.github.com> Date: Sun, 11 Feb 2024 13:42:04 -0500 Subject: [PATCH] [wpimath] Feed forwards: Use correct 'k' value in error message (#6360) --- .../main/java/edu/wpi/first/math/controller/ArmFeedforward.java | 2 +- .../java/edu/wpi/first/math/controller/ElevatorFeedforward.java | 2 +- .../edu/wpi/first/math/controller/SimpleMotorFeedforward.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wpimath/src/main/java/edu/wpi/first/math/controller/ArmFeedforward.java b/wpimath/src/main/java/edu/wpi/first/math/controller/ArmFeedforward.java index d7a695fced4..0d8b11b465f 100644 --- a/wpimath/src/main/java/edu/wpi/first/math/controller/ArmFeedforward.java +++ b/wpimath/src/main/java/edu/wpi/first/math/controller/ArmFeedforward.java @@ -52,7 +52,7 @@ public ArmFeedforward(double ks, double kg, double kv, double ka) { throw new IllegalArgumentException("kv must be a non-negative number, got " + kv + "!"); } if (ka < 0.0) { - throw new IllegalArgumentException("ka must be a non-negative number, got " + kv + "!"); + throw new IllegalArgumentException("ka must be a non-negative number, got " + ka + "!"); } } diff --git a/wpimath/src/main/java/edu/wpi/first/math/controller/ElevatorFeedforward.java b/wpimath/src/main/java/edu/wpi/first/math/controller/ElevatorFeedforward.java index 854462a652c..dc56ece26a4 100644 --- a/wpimath/src/main/java/edu/wpi/first/math/controller/ElevatorFeedforward.java +++ b/wpimath/src/main/java/edu/wpi/first/math/controller/ElevatorFeedforward.java @@ -55,7 +55,7 @@ public ElevatorFeedforward(double ks, double kg, double kv, double ka) { throw new IllegalArgumentException("kv must be a non-negative number, got " + kv + "!"); } if (ka < 0.0) { - throw new IllegalArgumentException("ka must be a non-negative number, got " + kv + "!"); + throw new IllegalArgumentException("ka must be a non-negative number, got " + ka + "!"); } } diff --git a/wpimath/src/main/java/edu/wpi/first/math/controller/SimpleMotorFeedforward.java b/wpimath/src/main/java/edu/wpi/first/math/controller/SimpleMotorFeedforward.java index 2b25bccbf8f..eeb76db3196 100644 --- a/wpimath/src/main/java/edu/wpi/first/math/controller/SimpleMotorFeedforward.java +++ b/wpimath/src/main/java/edu/wpi/first/math/controller/SimpleMotorFeedforward.java @@ -37,7 +37,7 @@ public SimpleMotorFeedforward(double ks, double kv, double ka) { throw new IllegalArgumentException("kv must be a non-negative number, got " + kv + "!"); } if (ka < 0.0) { - throw new IllegalArgumentException("ka must be a non-negative number, got " + kv + "!"); + throw new IllegalArgumentException("ka must be a non-negative number, got " + ka + "!"); } }