From 5d69f7b21be45d5467018226aa6ef590e38ad63a Mon Sep 17 00:00:00 2001 From: Ryan Cahoon Date: Tue, 1 Oct 2024 03:07:58 -0700 Subject: [PATCH] Move new --- .../AdvancedUtils.java | 2 +- .../AutonomousMode.java | 5 +-- .../{framework3 => framework}/Conditions.java | 2 +- .../{framework3 => framework}/Context.java | 2 +- .../ContextImpl.java | 4 +- .../FunctionalInstantProcedure.java | 2 +- .../FunctionalProcedure.java | 2 +- .../InstantCommand.java | 2 +- .../InstantProcedure.java | 2 +- .../LaunchedContext.java | 2 +- .../LoggingBase.java | 2 +- .../{framework3 => framework}/Mechanism.java | 2 +- .../{framework3 => framework}/Procedure.java | 2 +- .../{framework3 => framework}/Request.java | 2 +- .../ReservingCommand.java | 3 +- .../{framework3 => framework}/Rule.java | 2 +- .../{framework3 => framework}/RuleEngine.java | 2 +- .../RulePersistence.java | 2 +- .../SchedulerMonitor.java | 3 +- .../SchedulerUtils.java | 2 +- .../SensorMechanism.java | 2 +- .../team766/framework/SerializableLambda.java | 45 +++++++++++++++++++ .../{framework3 => framework}/Status.java | 2 +- .../{framework3 => framework}/StatusBus.java | 2 +- .../WPILibCommandProcedure.java | 2 +- ...cRobotMain3.java => GenericRobotMain.java} | 20 ++++----- .../com/team766/hal/LocalMotorController.java | 22 +++++---- ...figurator3.java => RobotConfigurator.java} | 15 ++----- .../java/com/team766/hal/RobotSelector.java | 6 +-- .../com/team766/hal/simulator/RobotMain.java | 7 ++- .../com/team766/hal/wpilib/RobotMain.java | 7 ++- .../com/team766/robot/common/DriverOI.java | 8 ++-- .../robot/common/mechanisms/SwerveDrive.java | 8 ++-- .../robot/common/procedures/FollowPath.java | 6 +-- .../common/procedures/PathSequenceAuto.java | 4 +- .../com/team766/robot/example/Lights.java | 2 +- .../java/com/team766/robot/example/OI.java | 2 +- .../java/com/team766/robot/example/Robot.java | 8 ++-- .../example/mechanisms/ExampleMechanism.java | 6 +-- .../robot/example/procedures/DoNothing.java | 4 +- .../com/team766/robot/gatorade/Lights.java | 12 ++--- .../java/com/team766/robot/gatorade/OI.java | 10 ++--- .../com/team766/robot/gatorade/Robot.java | 8 ++-- .../robot/gatorade/mechanisms/Elevator.java | 10 ++--- .../robot/gatorade/mechanisms/Intake.java | 8 ++-- .../robot/gatorade/mechanisms/Shoulder.java | 10 ++--- .../gatorade/mechanisms/Superstructure.java | 10 ++--- .../robot/gatorade/mechanisms/Wrist.java | 10 ++--- .../gatorade/procedures/ExitCommunity.java | 4 +- .../gatorade/procedures/GyroBalance.java | 6 +-- .../robot/gatorade/procedures/IntakeAuto.java | 2 +- .../robot/gatorade/procedures/LoopAuto.java | 2 +- .../gatorade/procedures/OnePieceBalance.java | 4 +- .../procedures/OnePieceExitCommunity.java | 4 +- .../OnePieceExitCommunityBalance.java | 4 +- .../robot/gatorade/procedures/ScoreHigh.java | 4 +- .../gatorade/procedures/TestPathAuto.java | 2 +- .../java/com/team766/robot/reva/BoxOpOI.java | 8 ++-- .../java/com/team766/robot/reva/DebugOI.java | 4 +- .../java/com/team766/robot/reva/DriverOI.java | 6 +-- .../java/com/team766/robot/reva/Lights.java | 10 ++--- src/main/java/com/team766/robot/reva/OI.java | 2 +- .../java/com/team766/robot/reva/Robot.java | 8 ++-- .../reva/VisionUtil/VisionPIDProcedure.java | 2 +- .../reva/VisionUtil/VisionSpeakerHelper.java | 2 +- .../robot/reva/mechanisms/Climber.java | 8 ++-- .../mechanisms/ForwardApriltagCamera.java | 4 +- .../team766/robot/reva/mechanisms/Intake.java | 8 ++-- .../robot/reva/mechanisms/NoteCamera.java | 4 +- .../robot/reva/mechanisms/Shooter.java | 10 ++--- .../robot/reva/mechanisms/Shoulder.java | 10 ++--- .../robot/reva/mechanisms/Superstructure.java | 8 ++-- .../robot/reva/procedures/DriverShootNow.java | 8 ++-- .../DriverShootVelocityAndIntake.java | 6 +-- .../robot/reva/procedures/IntakeUntilIn.java | 10 ++--- .../procedures/MidfieldAutonSourceSide.java | 2 +- .../reva/procedures/NoRotateShootNow.java | 6 +-- .../robot/reva/procedures/PickupNote.java | 6 +-- .../reva/procedures/RotateAndShootNow.java | 4 +- .../reva/procedures/ShootAtSubwoofer.java | 4 +- .../robot/reva/procedures/ShootNow.java | 10 ++--- .../procedures/ShootVelocityAndIntake.java | 8 ++-- .../procedures/ShootingProcedureStatus.java | 2 +- .../reva/procedures/StartAutoIntake.java | 6 +-- .../procedures/auton_routines/AutoBase.java | 2 +- .../auton_routines/FourPieceAmpSide.java | 2 +- .../auton_routines/JustShootAmp.java | 2 +- .../auton_routines/PlayoffAuton.java | 2 +- .../auton_routines/ThreePieceAmpSide.java | 2 +- .../ThreePieceMidfieldAmpSide.java | 2 +- .../ThreePieceStartCenterTopAndAmp.java | 2 +- .../TwoPieceMidfieldSourceSide.java | 2 +- .../com/team766/web/AutonomousSelector.java | 12 +---- .../team766/{TestCase3.java => TestCase.java} | 6 +-- .../AdvancedUtilsTest.java | 6 +-- .../ContextTest.java} | 8 ++-- .../FakeMechanism.java | 4 +- .../FakeProcedure.java | 2 +- .../MechanismTest.java | 10 ++--- .../RuleEngineTest.java | 8 ++-- .../{framework3 => framework}/RuleTest.java | 6 +-- .../TestLoggerExtension.java | 2 +- 102 files changed, 304 insertions(+), 277 deletions(-) rename src/main/java/com/team766/{framework3 => framework}/AdvancedUtils.java (97%) rename src/main/java/com/team766/{framework3 => framework}/AutonomousMode.java (83%) rename src/main/java/com/team766/{framework3 => framework}/Conditions.java (99%) rename src/main/java/com/team766/{framework3 => framework}/Context.java (99%) rename src/main/java/com/team766/{framework3 => framework}/ContextImpl.java (99%) rename src/main/java/com/team766/{framework3 => framework}/FunctionalInstantProcedure.java (94%) rename src/main/java/com/team766/{framework3 => framework}/FunctionalProcedure.java (95%) rename src/main/java/com/team766/{framework3 => framework}/InstantCommand.java (95%) rename src/main/java/com/team766/{framework3 => framework}/InstantProcedure.java (94%) rename src/main/java/com/team766/{framework3 => framework}/LaunchedContext.java (93%) rename src/main/java/com/team766/{framework3 => framework}/LoggingBase.java (96%) rename src/main/java/com/team766/{framework3 => framework}/Mechanism.java (99%) rename src/main/java/com/team766/{framework3 => framework}/Procedure.java (98%) rename src/main/java/com/team766/{framework3 => framework}/Request.java (96%) rename src/main/java/com/team766/{framework3 => framework}/ReservingCommand.java (97%) rename src/main/java/com/team766/{framework3 => framework}/Rule.java (99%) rename src/main/java/com/team766/{framework3 => framework}/RuleEngine.java (99%) rename src/main/java/com/team766/{framework3 => framework}/RulePersistence.java (70%) rename src/main/java/com/team766/{framework3 => framework}/SchedulerMonitor.java (96%) rename src/main/java/com/team766/{framework3 => framework}/SchedulerUtils.java (88%) rename src/main/java/com/team766/{framework3 => framework}/SensorMechanism.java (96%) create mode 100644 src/main/java/com/team766/framework/SerializableLambda.java rename src/main/java/com/team766/{framework3 => framework}/Status.java (94%) rename src/main/java/com/team766/{framework3 => framework}/StatusBus.java (99%) rename src/main/java/com/team766/{framework3 => framework}/WPILibCommandProcedure.java (98%) rename src/main/java/com/team766/hal/{GenericRobotMain3.java => GenericRobotMain.java} (91%) rename src/main/java/com/team766/hal/{RobotConfigurator3.java => RobotConfigurator.java} (60%) rename src/test/java/com/team766/{TestCase3.java => TestCase.java} (94%) rename src/test/java/com/team766/{framework3 => framework}/AdvancedUtilsTest.java (96%) rename src/test/java/com/team766/{framework3/Context3Test.java => framework/ContextTest.java} (97%) rename src/test/java/com/team766/{framework3 => framework}/FakeMechanism.java (90%) rename src/test/java/com/team766/{framework3 => framework}/FakeProcedure.java (96%) rename src/test/java/com/team766/{framework3 => framework}/MechanismTest.java (97%) rename src/test/java/com/team766/{framework3 => framework}/RuleEngineTest.java (98%) rename src/test/java/com/team766/{framework3 => framework}/RuleTest.java (97%) rename src/test/java/com/team766/{framework3 => framework}/TestLoggerExtension.java (96%) diff --git a/src/main/java/com/team766/framework3/AdvancedUtils.java b/src/main/java/com/team766/framework/AdvancedUtils.java similarity index 97% rename from src/main/java/com/team766/framework3/AdvancedUtils.java rename to src/main/java/com/team766/framework/AdvancedUtils.java index 280673afd..9bae1e5e1 100644 --- a/src/main/java/com/team766/framework3/AdvancedUtils.java +++ b/src/main/java/com/team766/framework/AdvancedUtils.java @@ -1,4 +1,4 @@ -package com.team766.framework3; +package com.team766.framework; public class AdvancedUtils { /** diff --git a/src/main/java/com/team766/framework3/AutonomousMode.java b/src/main/java/com/team766/framework/AutonomousMode.java similarity index 83% rename from src/main/java/com/team766/framework3/AutonomousMode.java rename to src/main/java/com/team766/framework/AutonomousMode.java index 9b535f822..3903d4bc1 100644 --- a/src/main/java/com/team766/framework3/AutonomousMode.java +++ b/src/main/java/com/team766/framework/AutonomousMode.java @@ -1,10 +1,9 @@ -package com.team766.framework3; +package com.team766.framework; -import com.team766.web.AutonomousSelector; import edu.wpi.first.wpilibj2.command.Command; import java.util.function.Supplier; -public class AutonomousMode implements AutonomousSelector.Selectable { +public class AutonomousMode { private final Supplier m_constructor; private final String m_name; diff --git a/src/main/java/com/team766/framework3/Conditions.java b/src/main/java/com/team766/framework/Conditions.java similarity index 99% rename from src/main/java/com/team766/framework3/Conditions.java rename to src/main/java/com/team766/framework/Conditions.java index 55ecb57e4..5f3caefd8 100644 --- a/src/main/java/com/team766/framework3/Conditions.java +++ b/src/main/java/com/team766/framework/Conditions.java @@ -1,4 +1,4 @@ -package com.team766.framework3; +package com.team766.framework; import com.team766.library.Holder; import java.util.Optional; diff --git a/src/main/java/com/team766/framework3/Context.java b/src/main/java/com/team766/framework/Context.java similarity index 99% rename from src/main/java/com/team766/framework3/Context.java rename to src/main/java/com/team766/framework/Context.java index 15f186c08..a16448516 100644 --- a/src/main/java/com/team766/framework3/Context.java +++ b/src/main/java/com/team766/framework/Context.java @@ -1,4 +1,4 @@ -package com.team766.framework3; +package com.team766.framework; import java.util.function.BooleanSupplier; diff --git a/src/main/java/com/team766/framework3/ContextImpl.java b/src/main/java/com/team766/framework/ContextImpl.java similarity index 99% rename from src/main/java/com/team766/framework3/ContextImpl.java rename to src/main/java/com/team766/framework/ContextImpl.java index e00ea4e77..c7fe37873 100644 --- a/src/main/java/com/team766/framework3/ContextImpl.java +++ b/src/main/java/com/team766/framework/ContextImpl.java @@ -1,7 +1,5 @@ -package com.team766.framework3; +package com.team766.framework; -import com.team766.framework.ContextStoppedException; -import com.team766.framework.StackTraceUtils; import com.team766.hal.Clock; import com.team766.hal.RobotProvider; import com.team766.logging.Category; diff --git a/src/main/java/com/team766/framework3/FunctionalInstantProcedure.java b/src/main/java/com/team766/framework/FunctionalInstantProcedure.java similarity index 94% rename from src/main/java/com/team766/framework3/FunctionalInstantProcedure.java rename to src/main/java/com/team766/framework/FunctionalInstantProcedure.java index d9eebf7ac..908cf9d13 100644 --- a/src/main/java/com/team766/framework3/FunctionalInstantProcedure.java +++ b/src/main/java/com/team766/framework/FunctionalInstantProcedure.java @@ -1,4 +1,4 @@ -package com.team766.framework3; +package com.team766.framework; import java.util.Set; diff --git a/src/main/java/com/team766/framework3/FunctionalProcedure.java b/src/main/java/com/team766/framework/FunctionalProcedure.java similarity index 95% rename from src/main/java/com/team766/framework3/FunctionalProcedure.java rename to src/main/java/com/team766/framework/FunctionalProcedure.java index 2c0c9a111..cd721cb8e 100644 --- a/src/main/java/com/team766/framework3/FunctionalProcedure.java +++ b/src/main/java/com/team766/framework/FunctionalProcedure.java @@ -1,4 +1,4 @@ -package com.team766.framework3; +package com.team766.framework; import java.util.Set; import java.util.function.Consumer; diff --git a/src/main/java/com/team766/framework3/InstantCommand.java b/src/main/java/com/team766/framework/InstantCommand.java similarity index 95% rename from src/main/java/com/team766/framework3/InstantCommand.java rename to src/main/java/com/team766/framework/InstantCommand.java index 4d22c607c..c956902a4 100644 --- a/src/main/java/com/team766/framework3/InstantCommand.java +++ b/src/main/java/com/team766/framework/InstantCommand.java @@ -1,4 +1,4 @@ -package com.team766.framework3; +package com.team766.framework; import edu.wpi.first.wpilibj2.command.Command; diff --git a/src/main/java/com/team766/framework3/InstantProcedure.java b/src/main/java/com/team766/framework/InstantProcedure.java similarity index 94% rename from src/main/java/com/team766/framework3/InstantProcedure.java rename to src/main/java/com/team766/framework/InstantProcedure.java index b1406c56a..5070b347f 100644 --- a/src/main/java/com/team766/framework3/InstantProcedure.java +++ b/src/main/java/com/team766/framework/InstantProcedure.java @@ -1,4 +1,4 @@ -package com.team766.framework3; +package com.team766.framework; import edu.wpi.first.wpilibj2.command.Command; import java.util.Set; diff --git a/src/main/java/com/team766/framework3/LaunchedContext.java b/src/main/java/com/team766/framework/LaunchedContext.java similarity index 93% rename from src/main/java/com/team766/framework3/LaunchedContext.java rename to src/main/java/com/team766/framework/LaunchedContext.java index 5cecc72e3..f0e33aa97 100644 --- a/src/main/java/com/team766/framework3/LaunchedContext.java +++ b/src/main/java/com/team766/framework/LaunchedContext.java @@ -1,4 +1,4 @@ -package com.team766.framework3; +package com.team766.framework; /** * This interface can be used by the caller to manage Contexts created by startAsync. diff --git a/src/main/java/com/team766/framework3/LoggingBase.java b/src/main/java/com/team766/framework/LoggingBase.java similarity index 96% rename from src/main/java/com/team766/framework3/LoggingBase.java rename to src/main/java/com/team766/framework/LoggingBase.java index 1b7d55661..adf4e129a 100644 --- a/src/main/java/com/team766/framework3/LoggingBase.java +++ b/src/main/java/com/team766/framework/LoggingBase.java @@ -1,4 +1,4 @@ -package com.team766.framework3; +package com.team766.framework; import com.team766.logging.Category; import com.team766.logging.Logger; diff --git a/src/main/java/com/team766/framework3/Mechanism.java b/src/main/java/com/team766/framework/Mechanism.java similarity index 99% rename from src/main/java/com/team766/framework3/Mechanism.java rename to src/main/java/com/team766/framework/Mechanism.java index efe91d589..ba5e86d48 100644 --- a/src/main/java/com/team766/framework3/Mechanism.java +++ b/src/main/java/com/team766/framework/Mechanism.java @@ -1,4 +1,4 @@ -package com.team766.framework3; +package com.team766.framework; import com.team766.logging.Category; import com.team766.logging.LoggerExceptionUtils; diff --git a/src/main/java/com/team766/framework3/Procedure.java b/src/main/java/com/team766/framework/Procedure.java similarity index 98% rename from src/main/java/com/team766/framework3/Procedure.java rename to src/main/java/com/team766/framework/Procedure.java index db8dcd6f4..1c6f1c2a0 100644 --- a/src/main/java/com/team766/framework3/Procedure.java +++ b/src/main/java/com/team766/framework/Procedure.java @@ -1,4 +1,4 @@ -package com.team766.framework3; +package com.team766.framework; import com.google.common.collect.Sets; import com.team766.logging.Category; diff --git a/src/main/java/com/team766/framework3/Request.java b/src/main/java/com/team766/framework/Request.java similarity index 96% rename from src/main/java/com/team766/framework3/Request.java rename to src/main/java/com/team766/framework/Request.java index 1b2f777d7..544248611 100644 --- a/src/main/java/com/team766/framework3/Request.java +++ b/src/main/java/com/team766/framework/Request.java @@ -1,4 +1,4 @@ -package com.team766.framework3; +package com.team766.framework; /** * Code (typically in a Procedure) that manipulates Mechanisms can simply make {@link Request}s of the diff --git a/src/main/java/com/team766/framework3/ReservingCommand.java b/src/main/java/com/team766/framework/ReservingCommand.java similarity index 97% rename from src/main/java/com/team766/framework3/ReservingCommand.java rename to src/main/java/com/team766/framework/ReservingCommand.java index 5ef34bc43..f28660af8 100644 --- a/src/main/java/com/team766/framework3/ReservingCommand.java +++ b/src/main/java/com/team766/framework/ReservingCommand.java @@ -1,6 +1,5 @@ -package com.team766.framework3; +package com.team766.framework; -import com.team766.framework.StackTraceUtils; import com.team766.logging.Category; import com.team766.logging.Logger; import com.team766.logging.Severity; diff --git a/src/main/java/com/team766/framework3/Rule.java b/src/main/java/com/team766/framework/Rule.java similarity index 99% rename from src/main/java/com/team766/framework3/Rule.java rename to src/main/java/com/team766/framework/Rule.java index 68aa50e71..f25f0ee05 100644 --- a/src/main/java/com/team766/framework3/Rule.java +++ b/src/main/java/com/team766/framework/Rule.java @@ -1,4 +1,4 @@ -package com.team766.framework3; +package com.team766.framework; import com.google.common.collect.Maps; import java.util.ArrayList; diff --git a/src/main/java/com/team766/framework3/RuleEngine.java b/src/main/java/com/team766/framework/RuleEngine.java similarity index 99% rename from src/main/java/com/team766/framework3/RuleEngine.java rename to src/main/java/com/team766/framework/RuleEngine.java index a2318d5e3..d128678e8 100644 --- a/src/main/java/com/team766/framework3/RuleEngine.java +++ b/src/main/java/com/team766/framework/RuleEngine.java @@ -1,4 +1,4 @@ -package com.team766.framework3; +package com.team766.framework; import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.BiMap; diff --git a/src/main/java/com/team766/framework3/RulePersistence.java b/src/main/java/com/team766/framework/RulePersistence.java similarity index 70% rename from src/main/java/com/team766/framework3/RulePersistence.java rename to src/main/java/com/team766/framework/RulePersistence.java index 9bb28f2c8..9ca23b200 100644 --- a/src/main/java/com/team766/framework3/RulePersistence.java +++ b/src/main/java/com/team766/framework/RulePersistence.java @@ -1,4 +1,4 @@ -package com.team766.framework3; +package com.team766.framework; public enum RulePersistence { ONCE, diff --git a/src/main/java/com/team766/framework3/SchedulerMonitor.java b/src/main/java/com/team766/framework/SchedulerMonitor.java similarity index 96% rename from src/main/java/com/team766/framework3/SchedulerMonitor.java rename to src/main/java/com/team766/framework/SchedulerMonitor.java index 42b781772..bca614b67 100644 --- a/src/main/java/com/team766/framework3/SchedulerMonitor.java +++ b/src/main/java/com/team766/framework/SchedulerMonitor.java @@ -1,6 +1,5 @@ -package com.team766.framework3; +package com.team766.framework; -import com.team766.framework.StackTraceUtils; import com.team766.logging.Category; import com.team766.logging.Logger; import com.team766.logging.Severity; diff --git a/src/main/java/com/team766/framework3/SchedulerUtils.java b/src/main/java/com/team766/framework/SchedulerUtils.java similarity index 88% rename from src/main/java/com/team766/framework3/SchedulerUtils.java rename to src/main/java/com/team766/framework/SchedulerUtils.java index 165b42fed..acdc802d8 100644 --- a/src/main/java/com/team766/framework3/SchedulerUtils.java +++ b/src/main/java/com/team766/framework/SchedulerUtils.java @@ -1,4 +1,4 @@ -package com.team766.framework3; +package com.team766.framework; import edu.wpi.first.wpilibj2.command.CommandScheduler; diff --git a/src/main/java/com/team766/framework3/SensorMechanism.java b/src/main/java/com/team766/framework/SensorMechanism.java similarity index 96% rename from src/main/java/com/team766/framework3/SensorMechanism.java rename to src/main/java/com/team766/framework/SensorMechanism.java index ceff7797b..70b21581e 100644 --- a/src/main/java/com/team766/framework3/SensorMechanism.java +++ b/src/main/java/com/team766/framework/SensorMechanism.java @@ -1,4 +1,4 @@ -package com.team766.framework3; +package com.team766.framework; import com.team766.logging.Category; import com.team766.logging.LoggerExceptionUtils; diff --git a/src/main/java/com/team766/framework/SerializableLambda.java b/src/main/java/com/team766/framework/SerializableLambda.java new file mode 100644 index 000000000..f75cef0f0 --- /dev/null +++ b/src/main/java/com/team766/framework/SerializableLambda.java @@ -0,0 +1,45 @@ +package com.team766.framework; + +import java.io.Serializable; +import java.lang.invoke.SerializedLambda; +import java.lang.reflect.Method; + +public interface SerializableLambda extends Serializable { + public interface Runnable extends java.lang.Runnable, SerializableLambda {} + + public interface Supplier extends java.util.function.Supplier, SerializableLambda {} + + private static SerializedLambda getSerializedLambda(SerializableLambda lambda) { + SerializedLambda serializedLambda = null; + for (Class cl = lambda.getClass(); cl != null; cl = cl.getSuperclass()) { + try { + Method method = cl.getDeclaredMethod("writeReplace"); + method.setAccessible(true); + Object replacement = method.invoke(lambda); + if (!(replacement instanceof SerializedLambda)) { + break; // custom interface implementation + } + serializedLambda = (SerializedLambda) replacement; + break; + } catch (NoSuchMethodException e) { + // ignore + } catch (ReflectiveOperationException e) { + throw new RuntimeException(e); + } + } + if (serializedLambda == null) { + throw new IllegalArgumentException("Cannot find SerializedLambda for " + lambda); + } + return serializedLambda; + } + + /* package */ static Object[] getLambdaCaptures(SerializableLambda lambda) { + final SerializedLambda serializedLambda = getSerializedLambda(lambda); + final int count = serializedLambda.getCapturedArgCount(); + final Object[] result = new Object[count]; + for (int i = 0; i < count; ++i) { + result[i] = serializedLambda.getCapturedArg(i); + } + return result; + } +} diff --git a/src/main/java/com/team766/framework3/Status.java b/src/main/java/com/team766/framework/Status.java similarity index 94% rename from src/main/java/com/team766/framework3/Status.java rename to src/main/java/com/team766/framework/Status.java index 04a2f50e9..c46b0ddcb 100644 --- a/src/main/java/com/team766/framework3/Status.java +++ b/src/main/java/com/team766/framework/Status.java @@ -1,4 +1,4 @@ -package com.team766.framework3; +package com.team766.framework; /** * Marker interface for Statuses. Mechanisms and complex Procedures can publish Statuses to let diff --git a/src/main/java/com/team766/framework3/StatusBus.java b/src/main/java/com/team766/framework/StatusBus.java similarity index 99% rename from src/main/java/com/team766/framework3/StatusBus.java rename to src/main/java/com/team766/framework/StatusBus.java index f0b9872d1..89e91485e 100644 --- a/src/main/java/com/team766/framework3/StatusBus.java +++ b/src/main/java/com/team766/framework/StatusBus.java @@ -1,4 +1,4 @@ -package com.team766.framework3; +package com.team766.framework; import com.team766.hal.RobotProvider; import com.team766.logging.Category; diff --git a/src/main/java/com/team766/framework3/WPILibCommandProcedure.java b/src/main/java/com/team766/framework/WPILibCommandProcedure.java similarity index 98% rename from src/main/java/com/team766/framework3/WPILibCommandProcedure.java rename to src/main/java/com/team766/framework/WPILibCommandProcedure.java index 6f67c1d55..bbdfc010a 100644 --- a/src/main/java/com/team766/framework3/WPILibCommandProcedure.java +++ b/src/main/java/com/team766/framework/WPILibCommandProcedure.java @@ -1,4 +1,4 @@ -package com.team766.framework3; +package com.team766.framework; import edu.wpi.first.wpilibj2.command.Command; import edu.wpi.first.wpilibj2.command.Subsystem; diff --git a/src/main/java/com/team766/hal/GenericRobotMain3.java b/src/main/java/com/team766/hal/GenericRobotMain.java similarity index 91% rename from src/main/java/com/team766/hal/GenericRobotMain3.java rename to src/main/java/com/team766/hal/GenericRobotMain.java index 5824ce11b..e46f5ecfe 100755 --- a/src/main/java/com/team766/hal/GenericRobotMain3.java +++ b/src/main/java/com/team766/hal/GenericRobotMain.java @@ -1,9 +1,9 @@ package com.team766.hal; -import com.team766.framework3.AutonomousMode; -import com.team766.framework3.RuleEngine; -import com.team766.framework3.SchedulerMonitor; -import com.team766.framework3.SchedulerUtils; +import com.team766.framework.AutonomousMode; +import com.team766.framework.RuleEngine; +import com.team766.framework.SchedulerMonitor; +import com.team766.framework.SchedulerUtils; import com.team766.library.RateLimiter; import com.team766.logging.Category; import com.team766.logging.Logger; @@ -20,13 +20,13 @@ // Team 766 - Robot Interface Base class -public final class GenericRobotMain3 implements GenericRobotMainBase { - private RobotConfigurator3 configurator; +public final class GenericRobotMain { + private RobotConfigurator configurator; private RuleEngine m_oi; private RuleEngine m_lights; private WebServer m_webServer; - private AutonomousSelector m_autonSelector; + private AutonomousSelector m_autonSelector; private AutonomousMode m_autonMode = null; private Command m_autonomous = null; @@ -41,12 +41,12 @@ public final class GenericRobotMain3 implements GenericRobotMainBase { private boolean faultInAutoInit = false; private boolean faultInTeleopInit = false; - public GenericRobotMain3(RobotConfigurator3 configurator) { + public GenericRobotMain() { SchedulerUtils.reset(); SchedulerMonitor.start(); - this.configurator = configurator; - m_autonSelector = new AutonomousSelector<>(configurator.getAutonomousModes()); + configurator = RobotSelector.createConfigurator(); + m_autonSelector = new AutonomousSelector(configurator.getAutonomousModes()); m_webServer = new WebServer(); m_webServer.addHandler(new Dashboard()); m_webServer.addHandler(new DriverInterface(m_autonSelector)); diff --git a/src/main/java/com/team766/hal/LocalMotorController.java b/src/main/java/com/team766/hal/LocalMotorController.java index 19bef9817..0e743768e 100644 --- a/src/main/java/com/team766/hal/LocalMotorController.java +++ b/src/main/java/com/team766/hal/LocalMotorController.java @@ -3,11 +3,12 @@ import com.ctre.phoenix.motorcontrol.FeedbackDevice; import com.ctre.phoenix.motorcontrol.NeutralMode; import com.team766.controllers.PIDController; -import com.team766.framework.Scheduler; import com.team766.logging.Category; import com.team766.logging.Logger; import com.team766.logging.LoggerExceptionUtils; import com.team766.logging.Severity; +import edu.wpi.first.wpilibj2.command.CommandScheduler; +import edu.wpi.first.wpilibj2.command.Subsystem; public class LocalMotorController implements MotorController { private BasicMotorController motor; @@ -34,13 +35,18 @@ public LocalMotorController( } this.pidController = PIDController.loadFromConfig(configPrefix + "pid."); - // TODO(MF3): Use CommandScheduler.getInstance().registerSubsystem() when converted to MF3 - Scheduler.getInstance() - .add( - new Runnable() { + // Register for a periodic callback from the scheduler. + // Register as a Subsystem (rather than a Command) so that we are called in the same phase + // as the real Subsystems. Because this LocalMotorController is almost certainly created + // inside of a Subsystem and the scheduler keeps the Subsystems in insertion order, this has + // the effect that this callback will be called immediately after the periodic function of + // the Subsystem which owns this LocalMotorController. This has the desirable effect that + // any setpoints,etc which are set by the Subsystem immediately take effect. + CommandScheduler.getInstance() + .registerSubsystem( + new Subsystem() { @Override - public void run() { - + public void periodic() { if (leader != null) { setPower(leader.get()); return; @@ -87,7 +93,7 @@ public void run() { } @Override - public String toString() { + public String getName() { return LocalMotorController.this.toString(); } }); diff --git a/src/main/java/com/team766/hal/RobotConfigurator3.java b/src/main/java/com/team766/hal/RobotConfigurator.java similarity index 60% rename from src/main/java/com/team766/hal/RobotConfigurator3.java rename to src/main/java/com/team766/hal/RobotConfigurator.java index c636f068a..1206326ee 100644 --- a/src/main/java/com/team766/hal/RobotConfigurator3.java +++ b/src/main/java/com/team766/hal/RobotConfigurator.java @@ -1,10 +1,7 @@ package com.team766.hal; -import com.team766.framework3.AutonomousMode; -import com.team766.framework3.RuleEngine; -import com.team766.logging.Category; -import com.team766.logging.Logger; -import com.team766.logging.Severity; +import com.team766.framework.AutonomousMode; +import com.team766.framework.RuleEngine; /** * Provides Robot-specific components: initializes {@link Mechanism}s, creates the Operator Interface (OI), @@ -12,7 +9,7 @@ * * @see RobotSelector */ -public interface RobotConfigurator3 extends RobotConfiguratorBase { +public interface RobotConfigurator { /** * Initializes the {@link Mechanism}s for this robot. @@ -35,10 +32,4 @@ public interface RobotConfigurator3 extends RobotConfiguratorBase { * Returns an array of {@link AutonomousMode}s available for this robot. */ AutonomousMode[] getAutonomousModes(); - - @Override - default GenericRobotMainBase createRobotMain() { - Logger.get(Category.FRAMEWORK).logRaw(Severity.INFO, "Instantiating GenericRobotMain3"); - return new GenericRobotMain3(this); - } } diff --git a/src/main/java/com/team766/hal/RobotSelector.java b/src/main/java/com/team766/hal/RobotSelector.java index 83ede635e..52f1e5bee 100644 --- a/src/main/java/com/team766/hal/RobotSelector.java +++ b/src/main/java/com/team766/hal/RobotSelector.java @@ -23,7 +23,7 @@ private RobotSelector() {} // utility class * Creates a configurator specified by the 'robotConfigurator' key in the config file. * If unable to create this configurator, backs off to the example one. */ - public static RobotConfiguratorBase createConfigurator() { + public static RobotConfigurator createConfigurator() { ValueProvider configuratorProvider = ConfigFileReader.instance.getString(ROBOT_CONFIGURATOR_KEY); String robotConfigurator = @@ -37,8 +37,8 @@ public static RobotConfiguratorBase createConfigurator() { try { @SuppressWarnings("unchecked") - Class clazz = - (Class) Class.forName(robotConfigurator); + Class clazz = + (Class) Class.forName(robotConfigurator); return clazz.getDeclaredConstructor().newInstance(); } catch (Exception e) { Logger.get(Category.CONFIGURATION) diff --git a/src/main/java/com/team766/hal/simulator/RobotMain.java b/src/main/java/com/team766/hal/simulator/RobotMain.java index 5adc03e89..8432577e4 100755 --- a/src/main/java/com/team766/hal/simulator/RobotMain.java +++ b/src/main/java/com/team766/hal/simulator/RobotMain.java @@ -1,9 +1,8 @@ package com.team766.hal.simulator; import com.team766.config.ConfigFileReader; -import com.team766.hal.GenericRobotMainBase; +import com.team766.hal.GenericRobotMain; import com.team766.hal.RobotProvider; -import com.team766.hal.RobotSelector; import com.team766.logging.LoggerExceptionUtils; import com.team766.simulator.Program; import com.team766.simulator.ProgramInterface; @@ -16,7 +15,7 @@ enum Mode { VrConnector, } - private GenericRobotMainBase robot; + private GenericRobotMain robot; private Runnable simulator; public RobotMain(final Mode mode) { @@ -25,7 +24,7 @@ public RobotMain(final Mode mode) { ConfigFileReader.instance = new ConfigFileReader("simConfig.txt"); RobotProvider.instance = new SimulationRobotProvider(); - robot = RobotSelector.createConfigurator().createRobotMain(); + robot = new GenericRobotMain(); robot.robotInit(); diff --git a/src/main/java/com/team766/hal/wpilib/RobotMain.java b/src/main/java/com/team766/hal/wpilib/RobotMain.java index 035752e49..ce3e831b2 100755 --- a/src/main/java/com/team766/hal/wpilib/RobotMain.java +++ b/src/main/java/com/team766/hal/wpilib/RobotMain.java @@ -2,9 +2,8 @@ import com.team766.config.ConfigFileReader; import com.team766.hal.CanivPoller; -import com.team766.hal.GenericRobotMainBase; +import com.team766.hal.GenericRobotMain; import com.team766.hal.RobotProvider; -import com.team766.hal.RobotSelector; import com.team766.logging.LoggerExceptionUtils; import edu.wpi.first.wpilibj.DataLogManager; import edu.wpi.first.wpilibj.DriverStation; @@ -24,7 +23,7 @@ public class RobotMain extends LoggedRobot { private static final String USB_CONFIG_FILE = "/U/config/robotConfig.txt"; private static final String INTERNAL_CONFIG_FILE = "/home/lvuser/robotConfig.txt"; - private GenericRobotMainBase robot; + private GenericRobotMain robot; public static void main(final String... args) { Supplier supplier = @@ -97,7 +96,7 @@ public void robotInit() { ConfigFileReader.instance = new ConfigFileReader(filename, configFromUSB ? INTERNAL_CONFIG_FILE : null); RobotProvider.instance = new WPIRobotProvider(); - robot = RobotSelector.createConfigurator().createRobotMain(); + robot = new GenericRobotMain(); DriverStation.startDataLog(DataLogManager.getLog()); diff --git a/src/main/java/com/team766/robot/common/DriverOI.java b/src/main/java/com/team766/robot/common/DriverOI.java index a79b51bb4..f1287d305 100644 --- a/src/main/java/com/team766/robot/common/DriverOI.java +++ b/src/main/java/com/team766/robot/common/DriverOI.java @@ -1,10 +1,10 @@ package com.team766.robot.common; -import static com.team766.framework3.RulePersistence.*; +import static com.team766.framework.RulePersistence.*; -import com.team766.framework3.Conditions; -import com.team766.framework3.Rule; -import com.team766.framework3.RuleEngine; +import com.team766.framework.Conditions; +import com.team766.framework.Rule; +import com.team766.framework.RuleEngine; import com.team766.hal.JoystickReader; import com.team766.robot.common.constants.ControlConstants; import com.team766.robot.common.constants.InputConstants; diff --git a/src/main/java/com/team766/robot/common/mechanisms/SwerveDrive.java b/src/main/java/com/team766/robot/common/mechanisms/SwerveDrive.java index aeb004f98..409093c1a 100644 --- a/src/main/java/com/team766/robot/common/mechanisms/SwerveDrive.java +++ b/src/main/java/com/team766/robot/common/mechanisms/SwerveDrive.java @@ -1,6 +1,6 @@ package com.team766.robot.common.mechanisms; -import static com.team766.framework3.Conditions.checkForStatusWith; +import static com.team766.framework.Conditions.checkForStatusWith; import static com.team766.math.Math.normalizeAngleDegrees; import static com.team766.robot.common.constants.ConfigConstants.*; @@ -9,9 +9,9 @@ import com.pathplanner.lib.util.PIDConstants; import com.team766.config.ConfigFileReader; import com.team766.controllers.PIDController; -import com.team766.framework3.Mechanism; -import com.team766.framework3.Request; -import com.team766.framework3.Status; +import com.team766.framework.Mechanism; +import com.team766.framework.Request; +import com.team766.framework.Status; import com.team766.hal.GyroReader; import com.team766.hal.MotorController; import com.team766.hal.RobotProvider; diff --git a/src/main/java/com/team766/robot/common/procedures/FollowPath.java b/src/main/java/com/team766/robot/common/procedures/FollowPath.java index c97b0488c..29a348eb1 100644 --- a/src/main/java/com/team766/robot/common/procedures/FollowPath.java +++ b/src/main/java/com/team766/robot/common/procedures/FollowPath.java @@ -1,12 +1,12 @@ package com.team766.robot.common.procedures; -import static com.team766.framework3.Conditions.waitForStatus; +import static com.team766.framework.Conditions.waitForStatus; import com.pathplanner.lib.path.PathPlannerPath; import com.pathplanner.lib.path.PathPlannerTrajectory; import com.pathplanner.lib.util.ReplanningConfig; -import com.team766.framework3.Context; -import com.team766.framework3.Procedure; +import com.team766.framework.Context; +import com.team766.framework.Procedure; import com.team766.robot.common.constants.PathPlannerConstants; import com.team766.robot.common.mechanisms.SwerveDrive; import edu.wpi.first.math.geometry.Pose2d; diff --git a/src/main/java/com/team766/robot/common/procedures/PathSequenceAuto.java b/src/main/java/com/team766/robot/common/procedures/PathSequenceAuto.java index f4f3bcb43..58a632337 100644 --- a/src/main/java/com/team766/robot/common/procedures/PathSequenceAuto.java +++ b/src/main/java/com/team766/robot/common/procedures/PathSequenceAuto.java @@ -1,8 +1,8 @@ package com.team766.robot.common.procedures; import com.pathplanner.lib.util.GeometryUtil; -import com.team766.framework3.Context; -import com.team766.framework3.Procedure; +import com.team766.framework.Context; +import com.team766.framework.Procedure; import com.team766.robot.common.mechanisms.SwerveDrive; import edu.wpi.first.math.geometry.Pose2d; import edu.wpi.first.wpilibj.DriverStation; diff --git a/src/main/java/com/team766/robot/example/Lights.java b/src/main/java/com/team766/robot/example/Lights.java index a14db180b..23c1773c4 100644 --- a/src/main/java/com/team766/robot/example/Lights.java +++ b/src/main/java/com/team766/robot/example/Lights.java @@ -1,7 +1,7 @@ package com.team766.robot.example; import com.ctre.phoenix.led.CANdle; -import com.team766.framework3.RuleEngine; +import com.team766.framework.RuleEngine; public class Lights extends RuleEngine { private static final int CANID = 5; diff --git a/src/main/java/com/team766/robot/example/OI.java b/src/main/java/com/team766/robot/example/OI.java index 903256fcc..dcc7f59e5 100644 --- a/src/main/java/com/team766/robot/example/OI.java +++ b/src/main/java/com/team766/robot/example/OI.java @@ -1,6 +1,6 @@ package com.team766.robot.example; -import com.team766.framework3.RuleEngine; +import com.team766.framework.RuleEngine; import com.team766.hal.JoystickReader; import com.team766.hal.RobotProvider; import com.team766.robot.example.mechanisms.*; diff --git a/src/main/java/com/team766/robot/example/Robot.java b/src/main/java/com/team766/robot/example/Robot.java index fe42c6308..0cc777ad9 100644 --- a/src/main/java/com/team766/robot/example/Robot.java +++ b/src/main/java/com/team766/robot/example/Robot.java @@ -1,12 +1,12 @@ package com.team766.robot.example; -import com.team766.framework3.AutonomousMode; -import com.team766.framework3.RuleEngine; -import com.team766.hal.RobotConfigurator3; +import com.team766.framework.AutonomousMode; +import com.team766.framework.RuleEngine; +import com.team766.hal.RobotConfigurator; import com.team766.robot.example.mechanisms.*; import com.team766.robot.example.procedures.*; -public class Robot implements RobotConfigurator3 { +public class Robot implements RobotConfigurator { private ExampleMechanism exampleMechanism; @Override diff --git a/src/main/java/com/team766/robot/example/mechanisms/ExampleMechanism.java b/src/main/java/com/team766/robot/example/mechanisms/ExampleMechanism.java index 4cb101ded..aace03f07 100644 --- a/src/main/java/com/team766/robot/example/mechanisms/ExampleMechanism.java +++ b/src/main/java/com/team766/robot/example/mechanisms/ExampleMechanism.java @@ -1,8 +1,8 @@ package com.team766.robot.example.mechanisms; -import com.team766.framework3.Mechanism; -import com.team766.framework3.Request; -import com.team766.framework3.Status; +import com.team766.framework.Mechanism; +import com.team766.framework.Request; +import com.team766.framework.Status; import com.team766.hal.MotorController; import com.team766.hal.RobotProvider; diff --git a/src/main/java/com/team766/robot/example/procedures/DoNothing.java b/src/main/java/com/team766/robot/example/procedures/DoNothing.java index 45bcf28d1..ee3519344 100644 --- a/src/main/java/com/team766/robot/example/procedures/DoNothing.java +++ b/src/main/java/com/team766/robot/example/procedures/DoNothing.java @@ -1,7 +1,7 @@ package com.team766.robot.example.procedures; -import com.team766.framework3.Context; -import com.team766.framework3.Procedure; +import com.team766.framework.Context; +import com.team766.framework.Procedure; import com.team766.robot.example.mechanisms.ExampleMechanism; public class DoNothing extends Procedure { diff --git a/src/main/java/com/team766/robot/gatorade/Lights.java b/src/main/java/com/team766/robot/gatorade/Lights.java index 6b1cba953..051e417d7 100644 --- a/src/main/java/com/team766/robot/gatorade/Lights.java +++ b/src/main/java/com/team766/robot/gatorade/Lights.java @@ -1,15 +1,15 @@ package com.team766.robot.gatorade; -import static com.team766.framework3.Conditions.checkForStatus; -import static com.team766.framework3.Conditions.checkForStatusEntryWith; -import static com.team766.framework3.RulePersistence.*; -import static com.team766.framework3.StatusBus.getStatusOrThrow; +import static com.team766.framework.Conditions.checkForStatus; +import static com.team766.framework.Conditions.checkForStatusEntryWith; +import static com.team766.framework.RulePersistence.*; +import static com.team766.framework.StatusBus.getStatusOrThrow; import com.ctre.phoenix.led.Animation; import com.ctre.phoenix.led.CANdle; import com.ctre.phoenix.led.RainbowAnimation; -import com.team766.framework3.Rule; -import com.team766.framework3.RuleEngine; +import com.team766.framework.Rule; +import com.team766.framework.RuleEngine; import com.team766.logging.Severity; import com.team766.robot.gatorade.constants.SwerveDriveConstants; import com.team766.robot.gatorade.mechanisms.Intake.GamePieceType; diff --git a/src/main/java/com/team766/robot/gatorade/OI.java b/src/main/java/com/team766/robot/gatorade/OI.java index 5e9d4dfd1..7462d82e6 100644 --- a/src/main/java/com/team766/robot/gatorade/OI.java +++ b/src/main/java/com/team766/robot/gatorade/OI.java @@ -1,11 +1,11 @@ package com.team766.robot.gatorade; -import static com.team766.framework3.RulePersistence.*; -import static com.team766.framework3.StatusBus.publishStatus; +import static com.team766.framework.RulePersistence.*; +import static com.team766.framework.StatusBus.publishStatus; -import com.team766.framework3.Rule; -import com.team766.framework3.RuleEngine; -import com.team766.framework3.Status; +import com.team766.framework.Rule; +import com.team766.framework.RuleEngine; +import com.team766.framework.Status; import com.team766.hal.JoystickReader; import com.team766.hal.RobotProvider; import com.team766.robot.common.DriverOI; diff --git a/src/main/java/com/team766/robot/gatorade/Robot.java b/src/main/java/com/team766/robot/gatorade/Robot.java index f8237e8ea..c6b68505b 100644 --- a/src/main/java/com/team766/robot/gatorade/Robot.java +++ b/src/main/java/com/team766/robot/gatorade/Robot.java @@ -1,8 +1,8 @@ package com.team766.robot.gatorade; -import com.team766.framework3.AutonomousMode; -import com.team766.framework3.RuleEngine; -import com.team766.hal.RobotConfigurator3; +import com.team766.framework.AutonomousMode; +import com.team766.framework.RuleEngine; +import com.team766.hal.RobotConfigurator; import com.team766.robot.common.SwerveConfig; import com.team766.robot.common.mechanisms.SwerveDrive; import com.team766.robot.gatorade.constants.SwerveDriveConstants; @@ -10,7 +10,7 @@ import com.team766.robot.gatorade.procedures.LoopAuto; import com.team766.robot.gatorade.procedures.TestPathAuto; -public class Robot implements RobotConfigurator3 { +public class Robot implements RobotConfigurator { private SwerveDrive drive; private Intake intake; private Superstructure superstructure; diff --git a/src/main/java/com/team766/robot/gatorade/mechanisms/Elevator.java b/src/main/java/com/team766/robot/gatorade/mechanisms/Elevator.java index 13216bf67..a680e8e55 100644 --- a/src/main/java/com/team766/robot/gatorade/mechanisms/Elevator.java +++ b/src/main/java/com/team766/robot/gatorade/mechanisms/Elevator.java @@ -1,7 +1,7 @@ package com.team766.robot.gatorade.mechanisms; -import static com.team766.framework3.Conditions.checkForStatusWith; -import static com.team766.framework3.StatusBus.getStatusOrThrow; +import static com.team766.framework.Conditions.checkForStatusWith; +import static com.team766.framework.StatusBus.getStatusOrThrow; import static com.team766.robot.gatorade.constants.ConfigConstants.*; import com.ctre.phoenix.motorcontrol.NeutralMode; @@ -9,9 +9,9 @@ import com.revrobotics.CANSparkMax; import com.revrobotics.SparkPIDController; import com.team766.config.ConfigFileReader; -import com.team766.framework3.Mechanism; -import com.team766.framework3.Request; -import com.team766.framework3.Status; +import com.team766.framework.Mechanism; +import com.team766.framework.Request; +import com.team766.framework.Status; import com.team766.hal.MotorController; import com.team766.hal.RobotProvider; import com.team766.library.ValueProvider; diff --git a/src/main/java/com/team766/robot/gatorade/mechanisms/Intake.java b/src/main/java/com/team766/robot/gatorade/mechanisms/Intake.java index 38cdf6a0d..2b78abe5e 100644 --- a/src/main/java/com/team766/robot/gatorade/mechanisms/Intake.java +++ b/src/main/java/com/team766/robot/gatorade/mechanisms/Intake.java @@ -1,11 +1,11 @@ package com.team766.robot.gatorade.mechanisms; -import static com.team766.framework3.Conditions.checkForStatusWith; +import static com.team766.framework.Conditions.checkForStatusWith; import static com.team766.robot.gatorade.constants.ConfigConstants.*; -import com.team766.framework3.Mechanism; -import com.team766.framework3.Request; -import com.team766.framework3.Status; +import com.team766.framework.Mechanism; +import com.team766.framework.Request; +import com.team766.framework.Status; import com.team766.hal.MotorController; import com.team766.hal.RobotProvider; diff --git a/src/main/java/com/team766/robot/gatorade/mechanisms/Shoulder.java b/src/main/java/com/team766/robot/gatorade/mechanisms/Shoulder.java index e59c64279..5de4cce1f 100644 --- a/src/main/java/com/team766/robot/gatorade/mechanisms/Shoulder.java +++ b/src/main/java/com/team766/robot/gatorade/mechanisms/Shoulder.java @@ -1,7 +1,7 @@ package com.team766.robot.gatorade.mechanisms; -import static com.team766.framework3.Conditions.checkForStatusWith; -import static com.team766.framework3.StatusBus.getStatusOrThrow; +import static com.team766.framework.Conditions.checkForStatusWith; +import static com.team766.framework.StatusBus.getStatusOrThrow; import static com.team766.robot.gatorade.constants.ConfigConstants.*; import com.ctre.phoenix.motorcontrol.NeutralMode; @@ -9,9 +9,9 @@ import com.revrobotics.CANSparkMax; import com.revrobotics.SparkPIDController; import com.team766.config.ConfigFileReader; -import com.team766.framework3.Mechanism; -import com.team766.framework3.Request; -import com.team766.framework3.Status; +import com.team766.framework.Mechanism; +import com.team766.framework.Request; +import com.team766.framework.Status; import com.team766.hal.MotorController; import com.team766.hal.RobotProvider; import com.team766.library.ValueProvider; diff --git a/src/main/java/com/team766/robot/gatorade/mechanisms/Superstructure.java b/src/main/java/com/team766/robot/gatorade/mechanisms/Superstructure.java index 2aaac1922..c6fc35ee9 100644 --- a/src/main/java/com/team766/robot/gatorade/mechanisms/Superstructure.java +++ b/src/main/java/com/team766/robot/gatorade/mechanisms/Superstructure.java @@ -1,11 +1,11 @@ package com.team766.robot.gatorade.mechanisms; -import static com.team766.framework3.Conditions.checkForStatusWith; -import static com.team766.framework3.StatusBus.getStatusOrThrow; +import static com.team766.framework.Conditions.checkForStatusWith; +import static com.team766.framework.StatusBus.getStatusOrThrow; -import com.team766.framework3.Mechanism; -import com.team766.framework3.Request; -import com.team766.framework3.Status; +import com.team766.framework.Mechanism; +import com.team766.framework.Request; +import com.team766.framework.Status; import com.team766.robot.gatorade.PlacementPosition; import com.team766.robot.gatorade.mechanisms.Intake.GamePieceType; diff --git a/src/main/java/com/team766/robot/gatorade/mechanisms/Wrist.java b/src/main/java/com/team766/robot/gatorade/mechanisms/Wrist.java index de7af0906..0ef9df992 100644 --- a/src/main/java/com/team766/robot/gatorade/mechanisms/Wrist.java +++ b/src/main/java/com/team766/robot/gatorade/mechanisms/Wrist.java @@ -1,16 +1,16 @@ package com.team766.robot.gatorade.mechanisms; -import static com.team766.framework3.Conditions.checkForStatusWith; -import static com.team766.framework3.StatusBus.getStatusOrThrow; +import static com.team766.framework.Conditions.checkForStatusWith; +import static com.team766.framework.StatusBus.getStatusOrThrow; import static com.team766.robot.gatorade.constants.ConfigConstants.*; import com.revrobotics.CANSparkBase.ControlType; import com.revrobotics.CANSparkMax; import com.revrobotics.SparkPIDController; import com.team766.config.ConfigFileReader; -import com.team766.framework3.Mechanism; -import com.team766.framework3.Request; -import com.team766.framework3.Status; +import com.team766.framework.Mechanism; +import com.team766.framework.Request; +import com.team766.framework.Status; import com.team766.hal.MotorController; import com.team766.hal.RobotProvider; import com.team766.library.ValueProvider; diff --git a/src/main/java/com/team766/robot/gatorade/procedures/ExitCommunity.java b/src/main/java/com/team766/robot/gatorade/procedures/ExitCommunity.java index bf330d760..ee778ae88 100644 --- a/src/main/java/com/team766/robot/gatorade/procedures/ExitCommunity.java +++ b/src/main/java/com/team766/robot/gatorade/procedures/ExitCommunity.java @@ -1,7 +1,7 @@ package com.team766.robot.gatorade.procedures; -import com.team766.framework3.Context; -import com.team766.framework3.Procedure; +import com.team766.framework.Context; +import com.team766.framework.Procedure; import com.team766.robot.common.mechanisms.SwerveDrive; import com.team766.robot.gatorade.constants.FollowPointsInputConstants; diff --git a/src/main/java/com/team766/robot/gatorade/procedures/GyroBalance.java b/src/main/java/com/team766/robot/gatorade/procedures/GyroBalance.java index ad7d0ae50..5d772de65 100644 --- a/src/main/java/com/team766/robot/gatorade/procedures/GyroBalance.java +++ b/src/main/java/com/team766/robot/gatorade/procedures/GyroBalance.java @@ -1,9 +1,9 @@ package com.team766.robot.gatorade.procedures; -import static com.team766.framework3.StatusBus.getStatusOrThrow; +import static com.team766.framework.StatusBus.getStatusOrThrow; -import com.team766.framework3.Context; -import com.team766.framework3.Procedure; +import com.team766.framework.Context; +import com.team766.framework.Procedure; import com.team766.robot.common.mechanisms.SwerveDrive; import com.team766.robot.gatorade.constants.ChargeConstants; import com.team766.robot.gatorade.mechanisms.Superstructure; diff --git a/src/main/java/com/team766/robot/gatorade/procedures/IntakeAuto.java b/src/main/java/com/team766/robot/gatorade/procedures/IntakeAuto.java index 2846b5d23..51d2348f3 100644 --- a/src/main/java/com/team766/robot/gatorade/procedures/IntakeAuto.java +++ b/src/main/java/com/team766/robot/gatorade/procedures/IntakeAuto.java @@ -1,6 +1,6 @@ package com.team766.robot.gatorade.procedures; -import com.team766.framework3.Context; +import com.team766.framework.Context; import com.team766.robot.common.mechanisms.SwerveDrive; import com.team766.robot.common.procedures.PathSequenceAuto; import com.team766.robot.gatorade.mechanisms.Intake; diff --git a/src/main/java/com/team766/robot/gatorade/procedures/LoopAuto.java b/src/main/java/com/team766/robot/gatorade/procedures/LoopAuto.java index 7c58bc49a..3b81793f2 100644 --- a/src/main/java/com/team766/robot/gatorade/procedures/LoopAuto.java +++ b/src/main/java/com/team766/robot/gatorade/procedures/LoopAuto.java @@ -1,6 +1,6 @@ package com.team766.robot.gatorade.procedures; -import com.team766.framework3.Context; +import com.team766.framework.Context; import com.team766.robot.common.mechanisms.SwerveDrive; import com.team766.robot.common.procedures.PathSequenceAuto; import edu.wpi.first.math.geometry.Pose2d; diff --git a/src/main/java/com/team766/robot/gatorade/procedures/OnePieceBalance.java b/src/main/java/com/team766/robot/gatorade/procedures/OnePieceBalance.java index ed9ae5c32..da4f76a7f 100644 --- a/src/main/java/com/team766/robot/gatorade/procedures/OnePieceBalance.java +++ b/src/main/java/com/team766/robot/gatorade/procedures/OnePieceBalance.java @@ -1,7 +1,7 @@ package com.team766.robot.gatorade.procedures; -import com.team766.framework3.Context; -import com.team766.framework3.Procedure; +import com.team766.framework.Context; +import com.team766.framework.Procedure; import com.team766.robot.common.mechanisms.SwerveDrive; import com.team766.robot.gatorade.mechanisms.Intake; import com.team766.robot.gatorade.mechanisms.Intake.GamePieceType; diff --git a/src/main/java/com/team766/robot/gatorade/procedures/OnePieceExitCommunity.java b/src/main/java/com/team766/robot/gatorade/procedures/OnePieceExitCommunity.java index ed24e1cdd..55a3e4253 100644 --- a/src/main/java/com/team766/robot/gatorade/procedures/OnePieceExitCommunity.java +++ b/src/main/java/com/team766/robot/gatorade/procedures/OnePieceExitCommunity.java @@ -1,7 +1,7 @@ package com.team766.robot.gatorade.procedures; -import com.team766.framework3.Context; -import com.team766.framework3.Procedure; +import com.team766.framework.Context; +import com.team766.framework.Procedure; import com.team766.robot.common.mechanisms.SwerveDrive; import com.team766.robot.gatorade.mechanisms.Intake; import com.team766.robot.gatorade.mechanisms.Intake.GamePieceType; diff --git a/src/main/java/com/team766/robot/gatorade/procedures/OnePieceExitCommunityBalance.java b/src/main/java/com/team766/robot/gatorade/procedures/OnePieceExitCommunityBalance.java index 9ebd6f5a9..1ed3fba30 100644 --- a/src/main/java/com/team766/robot/gatorade/procedures/OnePieceExitCommunityBalance.java +++ b/src/main/java/com/team766/robot/gatorade/procedures/OnePieceExitCommunityBalance.java @@ -1,7 +1,7 @@ package com.team766.robot.gatorade.procedures; -import com.team766.framework3.Context; -import com.team766.framework3.Procedure; +import com.team766.framework.Context; +import com.team766.framework.Procedure; import com.team766.robot.common.mechanisms.SwerveDrive; import com.team766.robot.gatorade.mechanisms.Intake; import com.team766.robot.gatorade.mechanisms.Intake.GamePieceType; diff --git a/src/main/java/com/team766/robot/gatorade/procedures/ScoreHigh.java b/src/main/java/com/team766/robot/gatorade/procedures/ScoreHigh.java index 8d84c7699..2dcf5ae8c 100644 --- a/src/main/java/com/team766/robot/gatorade/procedures/ScoreHigh.java +++ b/src/main/java/com/team766/robot/gatorade/procedures/ScoreHigh.java @@ -1,7 +1,7 @@ package com.team766.robot.gatorade.procedures; -import com.team766.framework3.Context; -import com.team766.framework3.Procedure; +import com.team766.framework.Context; +import com.team766.framework.Procedure; import com.team766.robot.gatorade.mechanisms.Intake; import com.team766.robot.gatorade.mechanisms.Intake.GamePieceType; import com.team766.robot.gatorade.mechanisms.Superstructure; diff --git a/src/main/java/com/team766/robot/gatorade/procedures/TestPathAuto.java b/src/main/java/com/team766/robot/gatorade/procedures/TestPathAuto.java index 5b8af94fa..8f1c87cd0 100644 --- a/src/main/java/com/team766/robot/gatorade/procedures/TestPathAuto.java +++ b/src/main/java/com/team766/robot/gatorade/procedures/TestPathAuto.java @@ -1,6 +1,6 @@ package com.team766.robot.gatorade.procedures; -import com.team766.framework3.Context; +import com.team766.framework.Context; import com.team766.robot.common.mechanisms.SwerveDrive; import com.team766.robot.common.procedures.PathSequenceAuto; import edu.wpi.first.math.geometry.Pose2d; diff --git a/src/main/java/com/team766/robot/reva/BoxOpOI.java b/src/main/java/com/team766/robot/reva/BoxOpOI.java index 2ca42007a..55ba7b185 100644 --- a/src/main/java/com/team766/robot/reva/BoxOpOI.java +++ b/src/main/java/com/team766/robot/reva/BoxOpOI.java @@ -1,10 +1,10 @@ package com.team766.robot.reva; -import static com.team766.framework3.Conditions.checkForStatusWith; -import static com.team766.framework3.RulePersistence.*; +import static com.team766.framework.Conditions.checkForStatusWith; +import static com.team766.framework.RulePersistence.*; -import com.team766.framework3.Rule; -import com.team766.framework3.RuleEngine; +import com.team766.framework.Rule; +import com.team766.framework.RuleEngine; import com.team766.hal.JoystickReader; import com.team766.robot.common.constants.ControlConstants; import com.team766.robot.reva.constants.InputConstants; diff --git a/src/main/java/com/team766/robot/reva/DebugOI.java b/src/main/java/com/team766/robot/reva/DebugOI.java index 2f1cbac48..e2410f9a6 100644 --- a/src/main/java/com/team766/robot/reva/DebugOI.java +++ b/src/main/java/com/team766/robot/reva/DebugOI.java @@ -1,8 +1,8 @@ package com.team766.robot.reva; -import static com.team766.framework3.RulePersistence.*; +import static com.team766.framework.RulePersistence.*; -import com.team766.framework3.Rule; +import com.team766.framework.Rule; import com.team766.hal.JoystickReader; import com.team766.robot.reva.constants.InputConstants; import com.team766.robot.reva.mechanisms.Climber; diff --git a/src/main/java/com/team766/robot/reva/DriverOI.java b/src/main/java/com/team766/robot/reva/DriverOI.java index b9e278f70..fc12f2a50 100644 --- a/src/main/java/com/team766/robot/reva/DriverOI.java +++ b/src/main/java/com/team766/robot/reva/DriverOI.java @@ -1,9 +1,9 @@ package com.team766.robot.reva; -import static com.team766.framework3.RulePersistence.*; +import static com.team766.framework.RulePersistence.*; -import com.team766.framework3.Conditions; -import com.team766.framework3.Rule; +import com.team766.framework.Conditions; +import com.team766.framework.Rule; import com.team766.hal.JoystickReader; import com.team766.robot.common.constants.ControlConstants; import com.team766.robot.common.mechanisms.SwerveDrive; diff --git a/src/main/java/com/team766/robot/reva/Lights.java b/src/main/java/com/team766/robot/reva/Lights.java index 82c6ae99c..94ff157dc 100644 --- a/src/main/java/com/team766/robot/reva/Lights.java +++ b/src/main/java/com/team766/robot/reva/Lights.java @@ -1,13 +1,13 @@ package com.team766.robot.reva; -import static com.team766.framework3.Conditions.checkForStatusWith; -import static com.team766.framework3.RulePersistence.*; +import static com.team766.framework.Conditions.checkForStatusWith; +import static com.team766.framework.RulePersistence.*; import com.ctre.phoenix.ErrorCode; import com.ctre.phoenix.led.CANdle; -import com.team766.framework3.Context; -import com.team766.framework3.Rule; -import com.team766.framework3.RuleEngine; +import com.team766.framework.Context; +import com.team766.framework.Rule; +import com.team766.framework.RuleEngine; import com.team766.logging.Severity; import com.team766.robot.reva.mechanisms.ForwardApriltagCamera; import edu.wpi.first.wpilibj.DriverStation; diff --git a/src/main/java/com/team766/robot/reva/OI.java b/src/main/java/com/team766/robot/reva/OI.java index 462167d16..324f2fa3e 100644 --- a/src/main/java/com/team766/robot/reva/OI.java +++ b/src/main/java/com/team766/robot/reva/OI.java @@ -1,6 +1,6 @@ package com.team766.robot.reva; -import com.team766.framework3.RuleEngine; +import com.team766.framework.RuleEngine; import com.team766.hal.JoystickReader; import com.team766.hal.RobotProvider; import com.team766.robot.common.mechanisms.SwerveDrive; diff --git a/src/main/java/com/team766/robot/reva/Robot.java b/src/main/java/com/team766/robot/reva/Robot.java index e4509c5e0..1f0bbccc7 100644 --- a/src/main/java/com/team766/robot/reva/Robot.java +++ b/src/main/java/com/team766/robot/reva/Robot.java @@ -1,8 +1,8 @@ package com.team766.robot.reva; -import com.team766.framework3.AutonomousMode; -import com.team766.framework3.RuleEngine; -import com.team766.hal.RobotConfigurator3; +import com.team766.framework.AutonomousMode; +import com.team766.framework.RuleEngine; +import com.team766.hal.RobotConfigurator; import com.team766.robot.common.SwerveConfig; import com.team766.robot.common.mechanisms.SwerveDrive; import com.team766.robot.reva.mechanisms.ForwardApriltagCamera; @@ -12,7 +12,7 @@ import com.team766.robot.reva.mechanisms.Superstructure; import com.team766.robot.reva.procedures.auton_routines.*; -public class Robot implements RobotConfigurator3 { +public class Robot implements RobotConfigurator { private SwerveDrive drive; private Superstructure superstructure; private Intake intake; diff --git a/src/main/java/com/team766/robot/reva/VisionUtil/VisionPIDProcedure.java b/src/main/java/com/team766/robot/reva/VisionUtil/VisionPIDProcedure.java index f882fddb1..7b27037a3 100644 --- a/src/main/java/com/team766/robot/reva/VisionUtil/VisionPIDProcedure.java +++ b/src/main/java/com/team766/robot/reva/VisionUtil/VisionPIDProcedure.java @@ -3,7 +3,7 @@ import com.team766.ViSIONbase.AnywhereScoringPosition; import com.team766.ViSIONbase.AprilTagGeneralCheckedException; import com.team766.controllers.PIDController; -import com.team766.framework3.Procedure; +import com.team766.framework.Procedure; import java.util.ArrayList; public abstract class VisionPIDProcedure extends Procedure { diff --git a/src/main/java/com/team766/robot/reva/VisionUtil/VisionSpeakerHelper.java b/src/main/java/com/team766/robot/reva/VisionUtil/VisionSpeakerHelper.java index 7833ab61f..9524e9b63 100644 --- a/src/main/java/com/team766/robot/reva/VisionUtil/VisionSpeakerHelper.java +++ b/src/main/java/com/team766/robot/reva/VisionUtil/VisionSpeakerHelper.java @@ -1,6 +1,6 @@ package com.team766.robot.reva.VisionUtil; -import static com.team766.framework3.StatusBus.getStatusOrThrow; +import static com.team766.framework.StatusBus.getStatusOrThrow; import com.team766.ViSIONbase.AprilTagGeneralCheckedException; import com.team766.robot.common.mechanisms.SwerveDrive; diff --git a/src/main/java/com/team766/robot/reva/mechanisms/Climber.java b/src/main/java/com/team766/robot/reva/mechanisms/Climber.java index 1dd839847..2af5b26cf 100644 --- a/src/main/java/com/team766/robot/reva/mechanisms/Climber.java +++ b/src/main/java/com/team766/robot/reva/mechanisms/Climber.java @@ -1,12 +1,12 @@ package com.team766.robot.reva.mechanisms; -import static com.team766.framework3.Conditions.checkForStatusWith; +import static com.team766.framework.Conditions.checkForStatusWith; import static com.team766.robot.reva.constants.ConfigConstants.*; import com.ctre.phoenix.motorcontrol.NeutralMode; -import com.team766.framework3.Mechanism; -import com.team766.framework3.Request; -import com.team766.framework3.Status; +import com.team766.framework.Mechanism; +import com.team766.framework.Request; +import com.team766.framework.Status; import com.team766.hal.MotorController; import com.team766.hal.RobotProvider; diff --git a/src/main/java/com/team766/robot/reva/mechanisms/ForwardApriltagCamera.java b/src/main/java/com/team766/robot/reva/mechanisms/ForwardApriltagCamera.java index f553b9e7c..b00a35606 100644 --- a/src/main/java/com/team766/robot/reva/mechanisms/ForwardApriltagCamera.java +++ b/src/main/java/com/team766/robot/reva/mechanisms/ForwardApriltagCamera.java @@ -2,8 +2,8 @@ import com.team766.ViSIONbase.AprilTagGeneralCheckedException; import com.team766.ViSIONbase.GrayScaleCamera; -import com.team766.framework3.SensorMechanism; -import com.team766.framework3.Status; +import com.team766.framework.SensorMechanism; +import com.team766.framework.Status; import com.team766.logging.LoggerExceptionUtils; import com.team766.robot.reva.constants.VisionConstants; import edu.wpi.first.math.geometry.Transform3d; diff --git a/src/main/java/com/team766/robot/reva/mechanisms/Intake.java b/src/main/java/com/team766/robot/reva/mechanisms/Intake.java index 02a72b045..1cfa770f4 100644 --- a/src/main/java/com/team766/robot/reva/mechanisms/Intake.java +++ b/src/main/java/com/team766/robot/reva/mechanisms/Intake.java @@ -1,15 +1,15 @@ package com.team766.robot.reva.mechanisms; -import static com.team766.framework3.StatusBus.getStatusOrThrow; +import static com.team766.framework.StatusBus.getStatusOrThrow; import static com.team766.robot.reva.constants.ConfigConstants.*; import com.ctre.phoenix.motorcontrol.NeutralMode; import com.playingwithfusion.TimeOfFlight; import com.playingwithfusion.TimeOfFlight.RangingMode; import com.team766.config.ConfigFileReader; -import com.team766.framework3.Mechanism; -import com.team766.framework3.Request; -import com.team766.framework3.Status; +import com.team766.framework.Mechanism; +import com.team766.framework.Request; +import com.team766.framework.Status; import com.team766.hal.MotorController; import com.team766.hal.RobotProvider; import com.team766.library.ValueProvider; diff --git a/src/main/java/com/team766/robot/reva/mechanisms/NoteCamera.java b/src/main/java/com/team766/robot/reva/mechanisms/NoteCamera.java index 5757cd1be..93f54b840 100644 --- a/src/main/java/com/team766/robot/reva/mechanisms/NoteCamera.java +++ b/src/main/java/com/team766/robot/reva/mechanisms/NoteCamera.java @@ -2,8 +2,8 @@ import com.team766.ViSIONbase.AprilTagGeneralCheckedException; import com.team766.ViSIONbase.ColorCamera; -import com.team766.framework3.SensorMechanism; -import com.team766.framework3.Status; +import com.team766.framework.SensorMechanism; +import com.team766.framework.Status; import java.util.Optional; public class NoteCamera extends SensorMechanism { diff --git a/src/main/java/com/team766/robot/reva/mechanisms/Shooter.java b/src/main/java/com/team766/robot/reva/mechanisms/Shooter.java index d2ccad3c3..c2f305229 100644 --- a/src/main/java/com/team766/robot/reva/mechanisms/Shooter.java +++ b/src/main/java/com/team766/robot/reva/mechanisms/Shooter.java @@ -1,14 +1,14 @@ package com.team766.robot.reva.mechanisms; -import static com.team766.framework3.Conditions.checkForStatusWith; -import static com.team766.framework3.StatusBus.getStatusOrThrow; +import static com.team766.framework.Conditions.checkForStatusWith; +import static com.team766.framework.StatusBus.getStatusOrThrow; import static com.team766.robot.reva.constants.ConfigConstants.*; import com.ctre.phoenix.motorcontrol.NeutralMode; import com.revrobotics.CANSparkMax; -import com.team766.framework3.Mechanism; -import com.team766.framework3.Request; -import com.team766.framework3.Status; +import com.team766.framework.Mechanism; +import com.team766.framework.Request; +import com.team766.framework.Status; import com.team766.hal.MotorController; import com.team766.hal.MotorController.ControlMode; import com.team766.hal.RobotProvider; diff --git a/src/main/java/com/team766/robot/reva/mechanisms/Shoulder.java b/src/main/java/com/team766/robot/reva/mechanisms/Shoulder.java index 72aeccc72..be6667453 100644 --- a/src/main/java/com/team766/robot/reva/mechanisms/Shoulder.java +++ b/src/main/java/com/team766/robot/reva/mechanisms/Shoulder.java @@ -1,7 +1,7 @@ package com.team766.robot.reva.mechanisms; -import static com.team766.framework3.Conditions.checkForStatusWith; -import static com.team766.framework3.StatusBus.getStatusOrThrow; +import static com.team766.framework.Conditions.checkForStatusWith; +import static com.team766.framework.StatusBus.getStatusOrThrow; import static com.team766.robot.reva.constants.ConfigConstants.SHOULDER_ENCODER; import static com.team766.robot.reva.constants.ConfigConstants.SHOULDER_LEFT; import static com.team766.robot.reva.constants.ConfigConstants.SHOULDER_RIGHT; @@ -10,9 +10,9 @@ import com.ctre.phoenix6.controls.PositionDutyCycle; import com.ctre.phoenix6.hardware.TalonFX; import com.team766.config.ConfigFileReader; -import com.team766.framework3.Mechanism; -import com.team766.framework3.Request; -import com.team766.framework3.Status; +import com.team766.framework.Mechanism; +import com.team766.framework.Request; +import com.team766.framework.Status; import com.team766.hal.MotorController; import com.team766.hal.RobotProvider; import com.team766.hal.wpilib.REVThroughBoreDutyCycleEncoder; diff --git a/src/main/java/com/team766/robot/reva/mechanisms/Superstructure.java b/src/main/java/com/team766/robot/reva/mechanisms/Superstructure.java index e3400540e..7f6fcde74 100644 --- a/src/main/java/com/team766/robot/reva/mechanisms/Superstructure.java +++ b/src/main/java/com/team766/robot/reva/mechanisms/Superstructure.java @@ -1,10 +1,10 @@ package com.team766.robot.reva.mechanisms; -import static com.team766.framework3.StatusBus.getStatusOrThrow; +import static com.team766.framework.StatusBus.getStatusOrThrow; -import com.team766.framework3.Mechanism; -import com.team766.framework3.Request; -import com.team766.framework3.Status; +import com.team766.framework.Mechanism; +import com.team766.framework.Request; +import com.team766.framework.Status; public class Superstructure extends Mechanism< diff --git a/src/main/java/com/team766/robot/reva/procedures/DriverShootNow.java b/src/main/java/com/team766/robot/reva/procedures/DriverShootNow.java index 5ac3d9db1..b89b31f1d 100644 --- a/src/main/java/com/team766/robot/reva/procedures/DriverShootNow.java +++ b/src/main/java/com/team766/robot/reva/procedures/DriverShootNow.java @@ -1,11 +1,11 @@ package com.team766.robot.reva.procedures; -import static com.team766.framework3.Conditions.waitForRequestOrTimeout; -import static com.team766.framework3.StatusBus.getStatus; -import static com.team766.framework3.StatusBus.publishStatus; +import static com.team766.framework.Conditions.waitForRequestOrTimeout; +import static com.team766.framework.StatusBus.getStatus; +import static com.team766.framework.StatusBus.publishStatus; import com.team766.ViSIONbase.AprilTagGeneralCheckedException; -import com.team766.framework3.Context; +import com.team766.framework.Context; import com.team766.logging.LoggerExceptionUtils; import com.team766.logging.Severity; import com.team766.robot.common.mechanisms.SwerveDrive; diff --git a/src/main/java/com/team766/robot/reva/procedures/DriverShootVelocityAndIntake.java b/src/main/java/com/team766/robot/reva/procedures/DriverShootVelocityAndIntake.java index 49fe92377..49ff5a968 100644 --- a/src/main/java/com/team766/robot/reva/procedures/DriverShootVelocityAndIntake.java +++ b/src/main/java/com/team766/robot/reva/procedures/DriverShootVelocityAndIntake.java @@ -1,9 +1,9 @@ package com.team766.robot.reva.procedures; -import static com.team766.framework3.Conditions.waitForStatusOrTimeout; +import static com.team766.framework.Conditions.waitForStatusOrTimeout; -import com.team766.framework3.Context; -import com.team766.framework3.Procedure; +import com.team766.framework.Context; +import com.team766.framework.Procedure; import com.team766.robot.reva.mechanisms.Intake; import com.team766.robot.reva.mechanisms.Shooter; diff --git a/src/main/java/com/team766/robot/reva/procedures/IntakeUntilIn.java b/src/main/java/com/team766/robot/reva/procedures/IntakeUntilIn.java index c0496e805..aa522d53a 100644 --- a/src/main/java/com/team766/robot/reva/procedures/IntakeUntilIn.java +++ b/src/main/java/com/team766/robot/reva/procedures/IntakeUntilIn.java @@ -1,11 +1,11 @@ package com.team766.robot.reva.procedures; -import static com.team766.framework3.Conditions.waitForStatus; -import static com.team766.framework3.StatusBus.publishStatus; +import static com.team766.framework.Conditions.waitForStatus; +import static com.team766.framework.StatusBus.publishStatus; -import com.team766.framework3.Context; -import com.team766.framework3.Procedure; -import com.team766.framework3.Status; +import com.team766.framework.Context; +import com.team766.framework.Procedure; +import com.team766.framework.Status; import com.team766.robot.reva.mechanisms.Intake; public class IntakeUntilIn extends Procedure { diff --git a/src/main/java/com/team766/robot/reva/procedures/MidfieldAutonSourceSide.java b/src/main/java/com/team766/robot/reva/procedures/MidfieldAutonSourceSide.java index aff86d94e..4b4913304 100644 --- a/src/main/java/com/team766/robot/reva/procedures/MidfieldAutonSourceSide.java +++ b/src/main/java/com/team766/robot/reva/procedures/MidfieldAutonSourceSide.java @@ -1,6 +1,6 @@ package com.team766.robot.reva.procedures; -import com.team766.framework3.Context; +import com.team766.framework.Context; import com.team766.robot.common.mechanisms.SwerveDrive; import com.team766.robot.reva.mechanisms.Intake; import com.team766.robot.reva.mechanisms.Shooter; diff --git a/src/main/java/com/team766/robot/reva/procedures/NoRotateShootNow.java b/src/main/java/com/team766/robot/reva/procedures/NoRotateShootNow.java index 5131efcca..0a5366184 100644 --- a/src/main/java/com/team766/robot/reva/procedures/NoRotateShootNow.java +++ b/src/main/java/com/team766/robot/reva/procedures/NoRotateShootNow.java @@ -1,10 +1,10 @@ package com.team766.robot.reva.procedures; -import static com.team766.framework3.Conditions.waitForRequestOrTimeout; +import static com.team766.framework.Conditions.waitForRequestOrTimeout; import com.team766.ViSIONbase.AprilTagGeneralCheckedException; -import com.team766.framework3.Context; -import com.team766.framework3.Procedure; +import com.team766.framework.Context; +import com.team766.framework.Procedure; import com.team766.logging.LoggerExceptionUtils; import com.team766.robot.common.mechanisms.SwerveDrive; import com.team766.robot.reva.VisionUtil.VisionSpeakerHelper; diff --git a/src/main/java/com/team766/robot/reva/procedures/PickupNote.java b/src/main/java/com/team766/robot/reva/procedures/PickupNote.java index 290d48253..da053a58b 100644 --- a/src/main/java/com/team766/robot/reva/procedures/PickupNote.java +++ b/src/main/java/com/team766/robot/reva/procedures/PickupNote.java @@ -1,9 +1,9 @@ package com.team766.robot.reva.procedures; -import static com.team766.framework3.Conditions.checkForStatusWith; -import static com.team766.framework3.StatusBus.getStatus; +import static com.team766.framework.Conditions.checkForStatusWith; +import static com.team766.framework.StatusBus.getStatus; -import com.team766.framework3.Context; +import com.team766.framework.Context; import com.team766.robot.common.mechanisms.SwerveDrive; import com.team766.robot.reva.VisionUtil.VisionPIDProcedure; import com.team766.robot.reva.mechanisms.Intake; diff --git a/src/main/java/com/team766/robot/reva/procedures/RotateAndShootNow.java b/src/main/java/com/team766/robot/reva/procedures/RotateAndShootNow.java index f531688a9..031991b0b 100644 --- a/src/main/java/com/team766/robot/reva/procedures/RotateAndShootNow.java +++ b/src/main/java/com/team766/robot/reva/procedures/RotateAndShootNow.java @@ -1,8 +1,8 @@ package com.team766.robot.reva.procedures; import com.team766.ViSIONbase.AprilTagGeneralCheckedException; -import com.team766.framework3.Context; -import com.team766.framework3.Procedure; +import com.team766.framework.Context; +import com.team766.framework.Procedure; import com.team766.logging.LoggerExceptionUtils; import com.team766.robot.common.mechanisms.SwerveDrive; import com.team766.robot.reva.VisionUtil.VisionSpeakerHelper; diff --git a/src/main/java/com/team766/robot/reva/procedures/ShootAtSubwoofer.java b/src/main/java/com/team766/robot/reva/procedures/ShootAtSubwoofer.java index 20fe3e969..e39ae5b65 100644 --- a/src/main/java/com/team766/robot/reva/procedures/ShootAtSubwoofer.java +++ b/src/main/java/com/team766/robot/reva/procedures/ShootAtSubwoofer.java @@ -1,7 +1,7 @@ package com.team766.robot.reva.procedures; -import com.team766.framework3.Context; -import com.team766.framework3.Procedure; +import com.team766.framework.Context; +import com.team766.framework.Procedure; import com.team766.robot.reva.mechanisms.Intake; import com.team766.robot.reva.mechanisms.Shooter; import com.team766.robot.reva.mechanisms.Shoulder; diff --git a/src/main/java/com/team766/robot/reva/procedures/ShootNow.java b/src/main/java/com/team766/robot/reva/procedures/ShootNow.java index 174694c38..1c866eeb8 100644 --- a/src/main/java/com/team766/robot/reva/procedures/ShootNow.java +++ b/src/main/java/com/team766/robot/reva/procedures/ShootNow.java @@ -1,12 +1,12 @@ package com.team766.robot.reva.procedures; -import static com.team766.framework3.Conditions.waitForRequestOrTimeout; -import static com.team766.framework3.Conditions.waitForValueOrTimeout; -import static com.team766.framework3.StatusBus.getStatus; -import static com.team766.framework3.StatusBus.publishStatus; +import static com.team766.framework.Conditions.waitForRequestOrTimeout; +import static com.team766.framework.Conditions.waitForValueOrTimeout; +import static com.team766.framework.StatusBus.getStatus; +import static com.team766.framework.StatusBus.publishStatus; import com.team766.ViSIONbase.AprilTagGeneralCheckedException; -import com.team766.framework3.Context; +import com.team766.framework.Context; import com.team766.logging.LoggerExceptionUtils; import com.team766.logging.Severity; import com.team766.robot.common.mechanisms.SwerveDrive; diff --git a/src/main/java/com/team766/robot/reva/procedures/ShootVelocityAndIntake.java b/src/main/java/com/team766/robot/reva/procedures/ShootVelocityAndIntake.java index 820e19160..a8b75d6e1 100644 --- a/src/main/java/com/team766/robot/reva/procedures/ShootVelocityAndIntake.java +++ b/src/main/java/com/team766/robot/reva/procedures/ShootVelocityAndIntake.java @@ -1,10 +1,10 @@ package com.team766.robot.reva.procedures; -import static com.team766.framework3.Conditions.waitForRequestOrTimeout; -import static com.team766.framework3.StatusBus.publishStatus; +import static com.team766.framework.Conditions.waitForRequestOrTimeout; +import static com.team766.framework.StatusBus.publishStatus; -import com.team766.framework3.Context; -import com.team766.framework3.Procedure; +import com.team766.framework.Context; +import com.team766.framework.Procedure; import com.team766.robot.reva.mechanisms.Intake; import com.team766.robot.reva.mechanisms.Shooter; import com.team766.robot.reva.procedures.ShootingProcedureStatus.Status; diff --git a/src/main/java/com/team766/robot/reva/procedures/ShootingProcedureStatus.java b/src/main/java/com/team766/robot/reva/procedures/ShootingProcedureStatus.java index e04243158..8660410a1 100644 --- a/src/main/java/com/team766/robot/reva/procedures/ShootingProcedureStatus.java +++ b/src/main/java/com/team766/robot/reva/procedures/ShootingProcedureStatus.java @@ -1,6 +1,6 @@ package com.team766.robot.reva.procedures; -import com.team766.framework3.Status; +import com.team766.framework.Status; public record ShootingProcedureStatus(ShootingProcedureStatus.Status status) implements Status { public enum Status { diff --git a/src/main/java/com/team766/robot/reva/procedures/StartAutoIntake.java b/src/main/java/com/team766/robot/reva/procedures/StartAutoIntake.java index 216f092e7..80435ac0b 100644 --- a/src/main/java/com/team766/robot/reva/procedures/StartAutoIntake.java +++ b/src/main/java/com/team766/robot/reva/procedures/StartAutoIntake.java @@ -1,9 +1,9 @@ package com.team766.robot.reva.procedures; -import static com.team766.framework3.Conditions.waitForRequestOrTimeout; +import static com.team766.framework.Conditions.waitForRequestOrTimeout; -import com.team766.framework3.Context; -import com.team766.framework3.Procedure; +import com.team766.framework.Context; +import com.team766.framework.Procedure; import com.team766.robot.reva.mechanisms.Intake; import com.team766.robot.reva.mechanisms.Shoulder; import com.team766.robot.reva.mechanisms.Superstructure; diff --git a/src/main/java/com/team766/robot/reva/procedures/auton_routines/AutoBase.java b/src/main/java/com/team766/robot/reva/procedures/auton_routines/AutoBase.java index e0d6b6732..e196fa6f4 100644 --- a/src/main/java/com/team766/robot/reva/procedures/auton_routines/AutoBase.java +++ b/src/main/java/com/team766/robot/reva/procedures/auton_routines/AutoBase.java @@ -1,6 +1,6 @@ package com.team766.robot.reva.procedures.auton_routines; -import com.team766.framework3.Context; +import com.team766.framework.Context; import com.team766.robot.common.mechanisms.SwerveDrive; import com.team766.robot.common.procedures.PathSequenceAuto; import com.team766.robot.reva.mechanisms.Climber; diff --git a/src/main/java/com/team766/robot/reva/procedures/auton_routines/FourPieceAmpSide.java b/src/main/java/com/team766/robot/reva/procedures/auton_routines/FourPieceAmpSide.java index f4f85d50d..1a273fcf5 100644 --- a/src/main/java/com/team766/robot/reva/procedures/auton_routines/FourPieceAmpSide.java +++ b/src/main/java/com/team766/robot/reva/procedures/auton_routines/FourPieceAmpSide.java @@ -1,6 +1,6 @@ package com.team766.robot.reva.procedures.auton_routines; -import com.team766.framework3.Context; +import com.team766.framework.Context; import com.team766.robot.common.mechanisms.SwerveDrive; import com.team766.robot.reva.mechanisms.Intake; import com.team766.robot.reva.mechanisms.Shooter; diff --git a/src/main/java/com/team766/robot/reva/procedures/auton_routines/JustShootAmp.java b/src/main/java/com/team766/robot/reva/procedures/auton_routines/JustShootAmp.java index 445e37af9..ace79392a 100644 --- a/src/main/java/com/team766/robot/reva/procedures/auton_routines/JustShootAmp.java +++ b/src/main/java/com/team766/robot/reva/procedures/auton_routines/JustShootAmp.java @@ -1,6 +1,6 @@ package com.team766.robot.reva.procedures.auton_routines; -import com.team766.framework3.Context; +import com.team766.framework.Context; import com.team766.robot.common.mechanisms.SwerveDrive; import com.team766.robot.common.procedures.PathSequenceAuto; import com.team766.robot.reva.mechanisms.Intake; diff --git a/src/main/java/com/team766/robot/reva/procedures/auton_routines/PlayoffAuton.java b/src/main/java/com/team766/robot/reva/procedures/auton_routines/PlayoffAuton.java index bdd16cf04..0d163557c 100644 --- a/src/main/java/com/team766/robot/reva/procedures/auton_routines/PlayoffAuton.java +++ b/src/main/java/com/team766/robot/reva/procedures/auton_routines/PlayoffAuton.java @@ -1,6 +1,6 @@ package com.team766.robot.reva.procedures.auton_routines; -import com.team766.framework3.Context; +import com.team766.framework.Context; import com.team766.robot.common.mechanisms.SwerveDrive; import com.team766.robot.common.procedures.PathSequenceAuto; import com.team766.robot.reva.mechanisms.Intake; diff --git a/src/main/java/com/team766/robot/reva/procedures/auton_routines/ThreePieceAmpSide.java b/src/main/java/com/team766/robot/reva/procedures/auton_routines/ThreePieceAmpSide.java index 28a206a10..dfca234de 100644 --- a/src/main/java/com/team766/robot/reva/procedures/auton_routines/ThreePieceAmpSide.java +++ b/src/main/java/com/team766/robot/reva/procedures/auton_routines/ThreePieceAmpSide.java @@ -1,6 +1,6 @@ package com.team766.robot.reva.procedures.auton_routines; -import com.team766.framework3.Context; +import com.team766.framework.Context; import com.team766.robot.common.mechanisms.SwerveDrive; import com.team766.robot.reva.mechanisms.Intake; import com.team766.robot.reva.mechanisms.Shooter; diff --git a/src/main/java/com/team766/robot/reva/procedures/auton_routines/ThreePieceMidfieldAmpSide.java b/src/main/java/com/team766/robot/reva/procedures/auton_routines/ThreePieceMidfieldAmpSide.java index 9e26f117f..0ff7d4dc5 100644 --- a/src/main/java/com/team766/robot/reva/procedures/auton_routines/ThreePieceMidfieldAmpSide.java +++ b/src/main/java/com/team766/robot/reva/procedures/auton_routines/ThreePieceMidfieldAmpSide.java @@ -1,6 +1,6 @@ package com.team766.robot.reva.procedures.auton_routines; -import com.team766.framework3.Context; +import com.team766.framework.Context; import com.team766.robot.common.mechanisms.SwerveDrive; import com.team766.robot.reva.mechanisms.Intake; import com.team766.robot.reva.mechanisms.Shooter; diff --git a/src/main/java/com/team766/robot/reva/procedures/auton_routines/ThreePieceStartCenterTopAndAmp.java b/src/main/java/com/team766/robot/reva/procedures/auton_routines/ThreePieceStartCenterTopAndAmp.java index 2a354f87c..f2040fa36 100644 --- a/src/main/java/com/team766/robot/reva/procedures/auton_routines/ThreePieceStartCenterTopAndAmp.java +++ b/src/main/java/com/team766/robot/reva/procedures/auton_routines/ThreePieceStartCenterTopAndAmp.java @@ -1,6 +1,6 @@ package com.team766.robot.reva.procedures.auton_routines; -import com.team766.framework3.Context; +import com.team766.framework.Context; import com.team766.robot.common.mechanisms.SwerveDrive; import com.team766.robot.reva.mechanisms.Intake; import com.team766.robot.reva.mechanisms.Shooter; diff --git a/src/main/java/com/team766/robot/reva/procedures/auton_routines/TwoPieceMidfieldSourceSide.java b/src/main/java/com/team766/robot/reva/procedures/auton_routines/TwoPieceMidfieldSourceSide.java index 39779983b..e41f30dc6 100644 --- a/src/main/java/com/team766/robot/reva/procedures/auton_routines/TwoPieceMidfieldSourceSide.java +++ b/src/main/java/com/team766/robot/reva/procedures/auton_routines/TwoPieceMidfieldSourceSide.java @@ -1,6 +1,6 @@ package com.team766.robot.reva.procedures.auton_routines; -import com.team766.framework3.Context; +import com.team766.framework.Context; import com.team766.robot.common.mechanisms.SwerveDrive; import com.team766.robot.reva.mechanisms.Intake; import com.team766.robot.reva.mechanisms.Shooter; diff --git a/src/main/java/com/team766/web/AutonomousSelector.java b/src/main/java/com/team766/web/AutonomousSelector.java index 9f3a29563..0b2f9795d 100644 --- a/src/main/java/com/team766/web/AutonomousSelector.java +++ b/src/main/java/com/team766/web/AutonomousSelector.java @@ -1,5 +1,6 @@ package com.team766.web; +import com.team766.framework.AutonomousMode; import com.team766.logging.Category; import com.team766.logging.Logger; import com.team766.logging.Severity; @@ -9,16 +10,7 @@ import java.util.prefs.Preferences; import java.util.stream.Collectors; -public class AutonomousSelector< - AutonomousMode extends AutonomousSelector.Selectable> - implements WebServer.Handler { - // TODO: Remove this after migration to MF3 is complete. - public interface Selectable> { - String name(); - - S clone(); - } - +public class AutonomousSelector implements WebServer.Handler { private static final String ENDPOINT = "/auton"; private final AutonomousMode[] m_autonModes; diff --git a/src/test/java/com/team766/TestCase3.java b/src/test/java/com/team766/TestCase.java similarity index 94% rename from src/test/java/com/team766/TestCase3.java rename to src/test/java/com/team766/TestCase.java index c80178dd4..66c979668 100644 --- a/src/test/java/com/team766/TestCase3.java +++ b/src/test/java/com/team766/TestCase.java @@ -2,8 +2,8 @@ import com.team766.config.ConfigFileReader; import com.team766.config.ConfigFileTestUtils; -import com.team766.framework3.SchedulerUtils; -import com.team766.framework3.TestLoggerExtension; +import com.team766.framework.SchedulerUtils; +import com.team766.framework.TestLoggerExtension; import com.team766.hal.RobotProvider; import com.team766.hal.mock.TestRobotProvider; import edu.wpi.first.hal.HAL; @@ -18,7 +18,7 @@ import org.littletonrobotics.junction.inputs.LoggedSystemStats; @ExtendWith(TestLoggerExtension.class) -public abstract class TestCase3 { +public abstract class TestCase { @BeforeEach public void setUp() { diff --git a/src/test/java/com/team766/framework3/AdvancedUtilsTest.java b/src/test/java/com/team766/framework/AdvancedUtilsTest.java similarity index 96% rename from src/test/java/com/team766/framework3/AdvancedUtilsTest.java rename to src/test/java/com/team766/framework/AdvancedUtilsTest.java index 8da87210f..8283da2da 100644 --- a/src/test/java/com/team766/framework3/AdvancedUtilsTest.java +++ b/src/test/java/com/team766/framework/AdvancedUtilsTest.java @@ -1,15 +1,15 @@ -package com.team766.framework3; +package com.team766.framework; import static org.assertj.core.api.Assertions.*; import static org.junit.jupiter.api.Assertions.*; -import com.team766.TestCase3; +import com.team766.TestCase; import java.util.Set; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; import org.junit.jupiter.api.Test; -public class AdvancedUtilsTest extends TestCase3 { +public class AdvancedUtilsTest extends TestCase { @Test public void testStartAsync() { var mech = new FakeMechanism1(); diff --git a/src/test/java/com/team766/framework3/Context3Test.java b/src/test/java/com/team766/framework/ContextTest.java similarity index 97% rename from src/test/java/com/team766/framework3/Context3Test.java rename to src/test/java/com/team766/framework/ContextTest.java index b51c3adfa..6857eb442 100644 --- a/src/test/java/com/team766/framework3/Context3Test.java +++ b/src/test/java/com/team766/framework/ContextTest.java @@ -1,9 +1,9 @@ -package com.team766.framework3; +package com.team766.framework; import static org.assertj.core.api.Assertions.*; import static org.junit.jupiter.api.Assertions.*; -import com.team766.TestCase3; +import com.team766.TestCase; import java.util.Set; import java.util.concurrent.atomic.AtomicReference; import java.util.function.BiConsumer; @@ -12,7 +12,7 @@ import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; -public class Context3Test extends TestCase3 { +public class ContextTest extends TestCase { /// Test basic operation of a procedure running in a Context. @Test public void testBasic() { @@ -276,7 +276,7 @@ public void testRunWithMissingReservation(BiConsumer runMeth assertThat(thrownException.get()) .matches( - ".*Context3Test\\$\\$Lambda.* tried to run .*FakeProcedure.* but is missing the reservation on FakeMechanism"); + ".*ContextTest\\$\\$Lambda.* tried to run .*FakeProcedure.* but is missing the reservation on FakeMechanism"); } static Stream> paramsRunWithMissingReservation() { diff --git a/src/test/java/com/team766/framework3/FakeMechanism.java b/src/test/java/com/team766/framework/FakeMechanism.java similarity index 90% rename from src/test/java/com/team766/framework3/FakeMechanism.java rename to src/test/java/com/team766/framework/FakeMechanism.java index d24144195..31df5b2b3 100644 --- a/src/test/java/com/team766/framework3/FakeMechanism.java +++ b/src/test/java/com/team766/framework/FakeMechanism.java @@ -1,6 +1,6 @@ -package com.team766.framework3; +package com.team766.framework; -import static com.team766.framework3.Conditions.checkForStatusWith; +import static com.team766.framework.Conditions.checkForStatusWith; class FakeMechanism extends Mechanism { record FakeStatus(int currentState) implements Status {} diff --git a/src/test/java/com/team766/framework3/FakeProcedure.java b/src/test/java/com/team766/framework/FakeProcedure.java similarity index 96% rename from src/test/java/com/team766/framework3/FakeProcedure.java rename to src/test/java/com/team766/framework/FakeProcedure.java index fb33a298e..f66761fff 100644 --- a/src/test/java/com/team766/framework3/FakeProcedure.java +++ b/src/test/java/com/team766/framework/FakeProcedure.java @@ -1,4 +1,4 @@ -package com.team766.framework3; +package com.team766.framework; import java.util.Set; diff --git a/src/test/java/com/team766/framework3/MechanismTest.java b/src/test/java/com/team766/framework/MechanismTest.java similarity index 97% rename from src/test/java/com/team766/framework3/MechanismTest.java rename to src/test/java/com/team766/framework/MechanismTest.java index f0f75e236..53c7510f7 100644 --- a/src/test/java/com/team766/framework3/MechanismTest.java +++ b/src/test/java/com/team766/framework/MechanismTest.java @@ -1,16 +1,16 @@ -package com.team766.framework3; +package com.team766.framework; import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.Assertions.*; -import com.team766.TestCase3; -import com.team766.framework3.FakeMechanism.FakeRequest; -import com.team766.framework3.FakeMechanism.FakeStatus; +import com.team766.TestCase; +import com.team766.framework.FakeMechanism.FakeRequest; +import com.team766.framework.FakeMechanism.FakeStatus; import java.util.Set; import java.util.concurrent.atomic.AtomicReference; import org.junit.jupiter.api.Test; -public class MechanismTest extends TestCase3 { +public class MechanismTest extends TestCase { /// Test sending requests to a Mechanism. Also test that checkContextReservation succeeds when /// called from a Procedure which reserves the Mechanism. @Test diff --git a/src/test/java/com/team766/framework3/RuleEngineTest.java b/src/test/java/com/team766/framework/RuleEngineTest.java similarity index 98% rename from src/test/java/com/team766/framework3/RuleEngineTest.java rename to src/test/java/com/team766/framework/RuleEngineTest.java index d31ff3845..1538902ec 100644 --- a/src/test/java/com/team766/framework3/RuleEngineTest.java +++ b/src/test/java/com/team766/framework/RuleEngineTest.java @@ -1,12 +1,12 @@ -package com.team766.framework3; +package com.team766.framework; -import static com.team766.framework3.RulePersistence.ONCE; +import static com.team766.framework.RulePersistence.ONCE; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertNull; import static org.junit.jupiter.api.Assertions.assertTrue; -import com.team766.TestCase3; +import com.team766.TestCase; import edu.wpi.first.wpilibj2.command.Command; import edu.wpi.first.wpilibj2.command.CommandScheduler; import java.util.Map; @@ -14,7 +14,7 @@ import java.util.function.BooleanSupplier; import org.junit.jupiter.api.Test; -public class RuleEngineTest extends TestCase3 { +public class RuleEngineTest extends TestCase { private static class PeriodicPredicate implements BooleanSupplier { private final int period; diff --git a/src/test/java/com/team766/framework3/RuleTest.java b/src/test/java/com/team766/framework/RuleTest.java similarity index 97% rename from src/test/java/com/team766/framework3/RuleTest.java rename to src/test/java/com/team766/framework/RuleTest.java index 926a26ba0..e5d8458cb 100644 --- a/src/test/java/com/team766/framework3/RuleTest.java +++ b/src/test/java/com/team766/framework/RuleTest.java @@ -1,11 +1,11 @@ -package com.team766.framework3; +package com.team766.framework; -import static com.team766.framework3.RulePersistence.ONCE; +import static com.team766.framework.RulePersistence.ONCE; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertNull; -import com.team766.framework3.Rule.TriggerType; +import com.team766.framework.Rule.TriggerType; import java.util.Collections; import java.util.List; import java.util.Set; diff --git a/src/test/java/com/team766/framework3/TestLoggerExtension.java b/src/test/java/com/team766/framework/TestLoggerExtension.java similarity index 96% rename from src/test/java/com/team766/framework3/TestLoggerExtension.java rename to src/test/java/com/team766/framework/TestLoggerExtension.java index cee6568f6..8798b4c8b 100644 --- a/src/test/java/com/team766/framework3/TestLoggerExtension.java +++ b/src/test/java/com/team766/framework/TestLoggerExtension.java @@ -1,4 +1,4 @@ -package com.team766.framework3; +package com.team766.framework; import com.team766.logging.Category; import org.junit.jupiter.api.extension.AfterEachCallback;