From 931c6bb14162c3afb57a22673a6357db294d41f4 Mon Sep 17 00:00:00 2001 From: Zax71 <67716263+zax71@users.noreply.github.com> Date: Sun, 1 Mar 2026 17:49:36 +0000 Subject: [PATCH] Add `preRun()` to CommandOpMode.java --- .../seattlesolvers/solverslib/command/CommandOpMode.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/src/main/java/com/seattlesolvers/solverslib/command/CommandOpMode.java b/core/src/main/java/com/seattlesolvers/solverslib/command/CommandOpMode.java index 163a8fc1..a727ff36 100644 --- a/core/src/main/java/com/seattlesolvers/solverslib/command/CommandOpMode.java +++ b/core/src/main/java/com/seattlesolvers/solverslib/command/CommandOpMode.java @@ -47,6 +47,7 @@ public void runOpMode() throws InterruptedException { while (opModeInInit()) { initialize_loop(); } + preRun(); while (opModeIsActive()) { run(); } @@ -61,6 +62,11 @@ public void runOpMode() throws InterruptedException { public abstract void initialize(); + /** + * Runs before the OpMode is active and after init. + */ + public void preRun() {} + /** * Runs at the end (when opMode is no longer active) of CommandOpMode */