From 70b60e3a7465cbfe98c3626449ea04890906ded3 Mon Sep 17 00:00:00 2001 From: Gold856 <117957790+Gold856@users.noreply.github.com> Date: Tue, 18 Jul 2023 11:12:50 -0400 Subject: [PATCH] [commands] Trigger: Fix method names in requireNonNullParam (#5454) --- .../wpi/first/wpilibj2/command/button/Trigger.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/button/Trigger.java b/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/button/Trigger.java index 40f7f78ddf..5bdee377b4 100644 --- a/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/button/Trigger.java +++ b/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/button/Trigger.java @@ -56,7 +56,7 @@ public class Trigger implements BooleanSupplier { * @return this trigger, so calls can be chained */ public Trigger onTrue(Command command) { - requireNonNullParam(command, "command", "onRising"); + requireNonNullParam(command, "command", "onTrue"); m_loop.bind( new Runnable() { private boolean m_pressedLast = m_condition.getAsBoolean(); @@ -82,7 +82,7 @@ public class Trigger implements BooleanSupplier { * @return this trigger, so calls can be chained */ public Trigger onFalse(Command command) { - requireNonNullParam(command, "command", "onFalling"); + requireNonNullParam(command, "command", "onFalse"); m_loop.bind( new Runnable() { private boolean m_pressedLast = m_condition.getAsBoolean(); @@ -112,7 +112,7 @@ public class Trigger implements BooleanSupplier { * @return this trigger, so calls can be chained */ public Trigger whileTrue(Command command) { - requireNonNullParam(command, "command", "whileHigh"); + requireNonNullParam(command, "command", "whileTrue"); m_loop.bind( new Runnable() { private boolean m_pressedLast = m_condition.getAsBoolean(); @@ -144,7 +144,7 @@ public class Trigger implements BooleanSupplier { * @return this trigger, so calls can be chained */ public Trigger whileFalse(Command command) { - requireNonNullParam(command, "command", "whileLow"); + requireNonNullParam(command, "command", "whileFalse"); m_loop.bind( new Runnable() { private boolean m_pressedLast = m_condition.getAsBoolean(); @@ -172,7 +172,7 @@ public class Trigger implements BooleanSupplier { * @return this trigger, so calls can be chained */ public Trigger toggleOnTrue(Command command) { - requireNonNullParam(command, "command", "toggleOnRising"); + requireNonNullParam(command, "command", "toggleOnTrue"); m_loop.bind( new Runnable() { private boolean m_pressedLast = m_condition.getAsBoolean(); @@ -202,7 +202,7 @@ public class Trigger implements BooleanSupplier { * @return this trigger, so calls can be chained */ public Trigger toggleOnFalse(Command command) { - requireNonNullParam(command, "command", "toggleOnFalling"); + requireNonNullParam(command, "command", "toggleOnFalse"); m_loop.bind( new Runnable() { private boolean m_pressedLast = m_condition.getAsBoolean();