From 1add9da8cf39da3d534e8d4a23bc6dc6c722596c Mon Sep 17 00:00:00 2001 From: superpenguin612 <74030080+superpenguin612@users.noreply.github.com> Date: Wed, 20 Dec 2023 20:15:30 -0500 Subject: [PATCH] Add MotorHoldMode --- .../com/techhounds/houndutil/houndlib/MotorHoldMode.java | 7 +++++++ src/main/java/com/techhounds/houndutil/houndlib/Utils.java | 1 - 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 src/main/java/com/techhounds/houndutil/houndlib/MotorHoldMode.java diff --git a/src/main/java/com/techhounds/houndutil/houndlib/MotorHoldMode.java b/src/main/java/com/techhounds/houndutil/houndlib/MotorHoldMode.java new file mode 100644 index 0000000..df1eff8 --- /dev/null +++ b/src/main/java/com/techhounds/houndutil/houndlib/MotorHoldMode.java @@ -0,0 +1,7 @@ +package com.techhounds.houndutil.houndlib; + +// required to be motor-agnostic +public enum MotorHoldMode { + BRAKE, + COAST; +} diff --git a/src/main/java/com/techhounds/houndutil/houndlib/Utils.java b/src/main/java/com/techhounds/houndutil/houndlib/Utils.java index e1e9d21..47e843c 100644 --- a/src/main/java/com/techhounds/houndutil/houndlib/Utils.java +++ b/src/main/java/com/techhounds/houndutil/houndlib/Utils.java @@ -1,7 +1,6 @@ package com.techhounds.houndutil.houndlib; public class Utils { - public static boolean limitMechanism(boolean isLowerTriggered, boolean isUpperTriggered, double value) { return (value > 0.0 && isUpperTriggered) || (value < 0.0 && isLowerTriggered); }