From 76bcdb4fc77a4378c15c9065af02ee5dadf1114a Mon Sep 17 00:00:00 2001
From: Maggie Liang <63507305+mliang321cba@users.noreply.github.com>
Date: Fri, 31 May 2024 10:10:23 -0700
Subject: [PATCH] second edits of threshold/plateau
deleted time (integrated time test into threshold and plateau)
---
doc/allclasses-index.html | 10 +-
.../tester/{Plateau.html => PlateauTest.html} | 135 ++++++++++++-----
.../utility/tester/Tester.UnitTest.html | 2 +-
.../{Threshold.html => ThresholdTest.html} | 93 +++++++++---
doc/common/utility/tester/Time.html | 126 ----------------
.../utility/tester/package-summary.html | 6 +-
doc/common/utility/tester/package-tree.html | 5 +-
doc/index-all.html | 66 ++++----
doc/member-search-index.js | 2 +-
doc/overview-tree.html | 5 +-
doc/type-search-index.js | 2 +-
.../java/common/utility/tester/Plateau.java | 91 -----------
.../common/utility/tester/PlateauTest.java | 141 ++++++++++++++++++
.../{Threshold.java => ThresholdTest.java} | 71 +++++++--
src/main/java/common/utility/tester/Time.java | 93 ------------
15 files changed, 422 insertions(+), 426 deletions(-)
rename doc/common/utility/tester/{Plateau.html => PlateauTest.html} (71%)
rename doc/common/utility/tester/{Threshold.html => ThresholdTest.html} (75%)
delete mode 100644 doc/common/utility/tester/Time.html
delete mode 100644 src/main/java/common/utility/tester/Plateau.java
create mode 100644 src/main/java/common/utility/tester/PlateauTest.java
rename src/main/java/common/utility/tester/{Threshold.java => ThresholdTest.java} (52%)
delete mode 100644 src/main/java/common/utility/tester/Time.java
diff --git a/doc/allclasses-index.html b/doc/allclasses-index.html
index 27c9511..4457381 100644
--- a/doc/allclasses-index.html
+++ b/doc/allclasses-index.html
@@ -221,7 +221,7 @@
All Classes and Interfaces<
Team 3128's Pivot Template class.
-
+
@@ -276,12 +276,10 @@
All Classes and Interfaces<
-
+
-
-
-
-
+
+
Team 3128's streamlined ProfiledPIDController
class.
diff --git a/doc/common/utility/tester/Plateau.html b/doc/common/utility/tester/PlateauTest.html
similarity index 71%
rename from doc/common/utility/tester/Plateau.html
rename to doc/common/utility/tester/PlateauTest.html
index 609bf8d..5e09a24 100644
--- a/doc/common/utility/tester/Plateau.html
+++ b/doc/common/utility/tester/PlateauTest.html
@@ -2,10 +2,10 @@
-Plateau (3128-common)
+PlateauTest (3128-common)
-
+
@@ -50,7 +50,7 @@
@@ -68,12 +68,12 @@
@@ -83,7 +83,7 @@ Class Plateau
edu.wpi.first.util.sendable.Sendable
-
Fields inherited from class edu.wpi.first.wpilibj2.command.Command
m_requirements
@@ -117,23 +126,38 @@ Constructor Summary
-
Plateau(String testName,
+
-
-
+
+
Creates a plateau test.
+
+
+
+
Creates a plateau test.
+
+
-
-Plateau(String testName,
+
+
Creates a plateau test.
+
+
-
+ double timeOut)
+
+
Creates a plateau test.
+
@@ -175,39 +199,78 @@
Methods inherited from cl
+
+-
+
+
Field Details
+
+-
+
+
timeout
+public static double timeout
+
+
+
+
+
-
Constructor Details
-
-
-
Plateau
-public Plateau(String testName,
+
+PlateauTest
+public PlateauTest(String testName,
+ edu.wpi.first.wpilibj2.command.Command command,
double plateau,
- DoubleSupplier measurement,
- double expected,
- double tolerance)
+ DoubleSupplier error,
+ double tolerance,
+ double timeOut)
+Creates a plateau test.
- Parameters:
testName
- Name of test.
+command
- Command to run.
plateau
- How long the pass condition must be true for.
-measurement
- Source of measurement
-expected
- Expected value
+error
- Difference from expected value.
tolerance
- Maximum error.
+timeOut
- Time to run the test.
-
-
-
Plateau
-public Plateau(String testName,
+
+PlateauTest
+public PlateauTest(String testName,
+ edu.wpi.first.wpilibj2.command.Command command,
+ double plateau,
+ double timeOut,
+ BooleanSupplier passCondition)
+Creates a plateau test.
+
+- Parameters:
+testName
- Name of test.
+command
- Command to run.
+plateau
- How long the pass condition must be true for.
+timeOut
- Time to run the test.
+passCondition
- Condition to pass the test.
+
+
+
+-
+
+
PlateauTest
+public PlateauTest(String testName,
+ edu.wpi.first.wpilibj2.command.Command command,
double plateau,
DoubleSupplier error,
double tolerance)
+Creates a plateau test.
- Parameters:
testName
- Name of test.
+command
- Command to run.
plateau
- How long the pass condition must be true for.
error
- Difference from expected value.
tolerance
- Maximum error.
@@ -215,19 +278,19 @@ Plateau
-
-
-
Plateau
-public Plateau(String testName,
+
+PlateauTest
+public PlateauTest(String testName,
+ edu.wpi.first.wpilibj2.command.Command command,
double plateau,
- DoubleSupplier error,
- double tolerance,
BooleanSupplier passCondition)
+Creates a plateau test.
- Parameters:
testName
- Name of test.
+command
- Command to run.
plateau
- How long the pass condition must be true for.
-error
- Difference from expected value.
-tolerance
- Maximum error.
+passCondition
- Condition for the test to pass.
diff --git a/doc/common/utility/tester/Tester.UnitTest.html b/doc/common/utility/tester/Tester.UnitTest.html
index 45bf3e5..67ff5f8 100644
--- a/doc/common/utility/tester/Tester.UnitTest.html
+++ b/doc/common/utility/tester/Tester.UnitTest.html
@@ -82,7 +82,7 @@ Class Tester.UnitTest
- Direct Known Subclasses:
-CurrentTest
, NAR_PIDSubsystem.SetpointTest
, Plateau
, Threshold
+CurrentTest
, NAR_PIDSubsystem.SetpointTest
, PlateauTest
, ThresholdTest
- Enclosing class:
diff --git a/doc/common/utility/tester/Threshold.html b/doc/common/utility/tester/ThresholdTest.html
similarity index 75%
rename from doc/common/utility/tester/Threshold.html
rename to doc/common/utility/tester/ThresholdTest.html
index 97b4885..a1679bc 100644
--- a/doc/common/utility/tester/Threshold.html
+++ b/doc/common/utility/tester/ThresholdTest.html
@@ -2,10 +2,10 @@
-Threshold (3128-common)
+ThresholdTest (3128-common)
-
+
@@ -68,12 +68,12 @@
@@ -83,7 +83,7 @@ Class Threshold
edu.wpi.first.util.sendable.Sendable
-public class Threshold
+
@@ -126,18 +126,33 @@ Constructor Summary
-
Threshold(String testName,
+
+
+
Creates a threshold test.
+
+
+
+
Creates a threshold test.
+
+
-
Creates a Threshold test.
+
Creates a threshold test.
-
-
Creates a current test.
+
Creates a threshold test.
@@ -200,33 +215,69 @@
testName
Constructor Details
-
-
-
Threshold
-public Threshold(String testName,
+
+ThresholdTest
+public ThresholdTest(String testName,
+ edu.wpi.first.wpilibj2.command.Command command,
DoubleSupplier measurement,
- double threshold)
-Creates a Threshold test.
+ double threshold,
+ double timeOut)
+Creates a threshold test.
- Parameters:
testName
- Name of the test.
+command
- Command to run.
measurement
- Source of measurement.
threshold
- Threshold that should be reached.
+timeOut
- Time for test to run.
-
-
-
Threshold
-public Threshold(String testName,
- DoubleSupplier measurement,
- double threshold,
+
+ThresholdTest
+public ThresholdTest(String testName,
+ edu.wpi.first.wpilibj2.command.Command command,
+ double timeOut,
BooleanSupplier passCondition)
-Creates a current test.
+Creates a threshold test.
- Parameters:
testName
- Name of the test.
+command
- Command to run.
+timeOut
- Time for test to run.
+passCondition
- Condition for the test to pass.
+
+
+
+-
+
+
ThresholdTest
+public ThresholdTest(String testName,
+ edu.wpi.first.wpilibj2.command.Command command,
+ DoubleSupplier measurement,
+ double threshold)
+Creates a threshold test.
+
+- Parameters:
+testName
- Name of the test.
+command
- Command to run.
measurement
- Source of measurement.
threshold
- Threshold that should be reached.
+
+
+
+-
+
+
ThresholdTest
+public ThresholdTest(String testName,
+ edu.wpi.first.wpilibj2.command.Command command,
+ BooleanSupplier passCondition)
+Creates a threshold test.
+
+- Parameters:
+testName
- Name of the test.
+command
- Command to run.
passCondition
- Condition for the test to pass.
diff --git a/doc/common/utility/tester/Time.html b/doc/common/utility/tester/Time.html
deleted file mode 100644
index 0805175..0000000
--- a/doc/common/utility/tester/Time.html
+++ /dev/null
@@ -1,126 +0,0 @@
-
-
-
-
-Time (3128-common)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-public class Time
-
extends Object
-
-
-
-
--
-
-
Constructor Summary
-Constructors
-
-
-
-
--
-
-
Method Summary
-
-
Methods inherited from class java.lang.Object
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
-
-
-
-
-
-
-
diff --git a/doc/common/utility/tester/package-summary.html b/doc/common/utility/tester/package-summary.html
index 3c87082..f492a43 100644
--- a/doc/common/utility/tester/package-summary.html
+++ b/doc/common/utility/tester/package-summary.html
@@ -95,7 +95,7 @@ Package common.utility.t
UnitTests specifically for checking stall current.
-
+
@@ -113,10 +113,8 @@
Package common.utility.t
-
+
-
-
diff --git a/doc/common/utility/tester/package-tree.html b/doc/common/utility/tester/package-tree.html
index 11497d6..7e16ca0 100644
--- a/doc/common/utility/tester/package-tree.html
+++ b/doc/common/utility/tester/package-tree.html
@@ -64,14 +64,13 @@ Class Hierarchy
- common.utility.tester.Tester.UnitTest
- common.utility.tester.Tester
-- common.utility.tester.Time
diff --git a/doc/index-all.html b/doc/index-all.html
index a07cae0..715ba96 100644
--- a/doc/index-all.html
+++ b/doc/index-all.html
@@ -575,13 +575,13 @@ E
-
- end(boolean) - Method in class common.utility.tester.CurrentTest
-
-- end(boolean) - Method in class common.utility.tester.Plateau
+- end(boolean) - Method in class common.utility.tester.PlateauTest
-
- end(boolean) - Method in class common.utility.tester.Tester.Test
-
- end(boolean) - Method in class common.utility.tester.Tester.UnitTest
-
-- end(boolean) - Method in class common.utility.tester.Threshold
+- end(boolean) - Method in class common.utility.tester.ThresholdTest
-
- endCompetition() - Method in class common.core.misc.NAR_Robot
-
@@ -607,13 +607,13 @@
E
-
- execute() - Method in class common.utility.tester.CurrentTest
-
-- execute() - Method in class common.utility.tester.Plateau
+- execute() - Method in class common.utility.tester.PlateauTest
-
- execute() - Method in class common.utility.tester.Tester.Test
-
- execute() - Method in class common.utility.tester.Tester.UnitTest
-
-- execute() - Method in class common.utility.tester.Threshold
+- execute() - Method in class common.utility.tester.ThresholdTest
-
F
@@ -1080,13 +1080,13 @@ I
-
- initialize() - Method in class common.utility.tester.CurrentTest
-
-- initialize() - Method in class common.utility.tester.Plateau
+- initialize() - Method in class common.utility.tester.PlateauTest
-
- initialize() - Method in class common.utility.tester.Tester.Test
-
- initialize() - Method in class common.utility.tester.Tester.UnitTest
-
-- initialize() - Method in class common.utility.tester.Threshold
+- initialize() - Method in class common.utility.tester.ThresholdTest
-
- initSendable(SendableBuilder) - Method in class common.core.controllers.ControllerBase
-
@@ -1134,13 +1134,13 @@ I
-
- isFinished() - Method in class common.utility.tester.CurrentTest
-
-- isFinished() - Method in class common.utility.tester.Plateau
+- isFinished() - Method in class common.utility.tester.PlateauTest
-
- isFinished() - Method in class common.utility.tester.Tester.Test
-
- isFinished() - Method in class common.utility.tester.Tester.UnitTest
-
-- isFinished() - Method in class common.utility.tester.Threshold
+- isFinished() - Method in class common.utility.tester.ThresholdTest
-
- isGoodEstimate(Pose2d) - Method in class common.hardware.camera.Camera
-
@@ -1619,14 +1619,24 @@ P
-
Moves pivot to a setpoint.
-- Plateau - Class in common.utility.tester
--
-- Plateau(String, double, DoubleSupplier, double) - Constructor for class common.utility.tester.Plateau
--
-- Plateau(String, double, DoubleSupplier, double, double) - Constructor for class common.utility.tester.Plateau
--
-- Plateau(String, double, DoubleSupplier, double, BooleanSupplier) - Constructor for class common.utility.tester.Plateau
+- PlateauTest - Class in common.utility.tester
-
+- PlateauTest(String, Command, double, double, BooleanSupplier) - Constructor for class common.utility.tester.PlateauTest
+-
+
Creates a plateau test.
+
+- PlateauTest(String, Command, double, BooleanSupplier) - Constructor for class common.utility.tester.PlateauTest
+-
+
Creates a plateau test.
+
+- PlateauTest(String, Command, double, DoubleSupplier, double) - Constructor for class common.utility.tester.PlateauTest
+-
+
Creates a plateau test.
+
+- PlateauTest(String, Command, double, DoubleSupplier, double, double) - Constructor for class common.utility.tester.PlateauTest
+-
+
Creates a plateau test.
+
- PolynomialDerivative - Class in common.utility.sysid
-
Team 3128's class to take the derivative of a Polynomial Regression function.
@@ -2250,28 +2260,34 @@ T
- testName - Variable in class common.utility.tester.Tester.UnitTest
-
-- testName - Variable in class common.utility.tester.Threshold
+- testName - Variable in class common.utility.tester.ThresholdTest
-
- testState - Variable in class common.utility.tester.Tester.UnitTest
-
-- Threshold - Class in common.utility.tester
+- ThresholdTest - Class in common.utility.tester
-
-- Threshold(String, DoubleSupplier, double) - Constructor for class common.utility.tester.Threshold
+- ThresholdTest(String, Command, double, BooleanSupplier) - Constructor for class common.utility.tester.ThresholdTest
-
-
Creates a Threshold test.
+Creates a threshold test.
-- Threshold(String, DoubleSupplier, double, BooleanSupplier) - Constructor for class common.utility.tester.Threshold
+- ThresholdTest(String, Command, BooleanSupplier) - Constructor for class common.utility.tester.ThresholdTest
-
-
Creates a current test.
+Creates a threshold test.
+
+- ThresholdTest(String, Command, DoubleSupplier, double) - Constructor for class common.utility.tester.ThresholdTest
+-
+
Creates a threshold test.
+
+- ThresholdTest(String, Command, DoubleSupplier, double, double) - Constructor for class common.utility.tester.ThresholdTest
+-
+
Creates a threshold test.
-- Time - Class in common.utility.tester
--
-- Time() - Constructor for class common.utility.tester.Time
--
- timeConversionFactor - Variable in class common.hardware.motorcontroller.NAR_Motor
-
- timeFactor - Variable in class common.hardware.motorcontroller.NAR_Motor.MotorConfig
-
+- timeout - Static variable in class common.utility.tester.PlateauTest
+-
- toggle() - Method in class common.core.swerve.SwerveBase
-
- toString() - Method in class common.hardware.limelight.LimelightData
diff --git a/doc/member-search-index.js b/doc/member-search-index.js
index 2800bed..da63beb 100644
--- a/doc/member-search-index.js
+++ b/doc/member-search-index.js
@@ -1 +1 @@
-memberSearchIndex = [{"p":"common.hardware.motorcontroller","c":"NAR_CANSpark.EncoderType","l":"Absolute"},{"p":"common.hardware.motorcontroller","c":"NAR_CANSpark.SparkMaxConfig","l":"ABSOLUTE"},{"p":"common.core.subsystems","c":"NAR_PIDSubsystem.SetpointTest","l":"add()"},{"p":"common.utility.sysid","c":"FFCharacterization","l":"add(double, double, double)","u":"add(double,double,double)"},{"p":"common.utility.narwhaldashboard","c":"NarwhalDashboard","l":"addAction(String, Consumer)","u":"addAction(java.lang.String,java.util.function.Consumer)"},{"p":"common.utility.narwhaldashboard","c":"NarwhalDashboard","l":"addAutos(String...)","u":"addAutos(java.lang.String...)"},{"p":"common.utility.shuffleboard","c":"NAR_Shuffleboard","l":"addAutos(String[])","u":"addAutos(java.lang.String[])"},{"p":"common.utility.narwhaldashboard","c":"NarwhalDashboard","l":"addButton(String, BooleanConsumer)","u":"addButton(java.lang.String,edu.wpi.first.util.function.BooleanConsumer)"},{"p":"common.utility.shuffleboard","c":"NAR_Shuffleboard","l":"addData(String, String, Object)","u":"addData(java.lang.String,java.lang.String,java.lang.Object)"},{"p":"common.utility.shuffleboard","c":"NAR_Shuffleboard","l":"addData(String, String, Object, int, int)","u":"addData(java.lang.String,java.lang.String,java.lang.Object,int,int)"},{"p":"common.utility.shuffleboard","c":"NAR_Shuffleboard","l":"addData(String, String, Object, int, int, int, int)","u":"addData(java.lang.String,java.lang.String,java.lang.Object,int,int,int,int)"},{"p":"common.utility.shuffleboard","c":"NAR_Shuffleboard","l":"addData(String, String, Supplier