From af601cf9f828d7351a8afa450d31c1e887a6a92b Mon Sep 17 00:00:00 2001 From: Julien Vanier Date: Mon, 3 Aug 2026 23:25:43 -0400 Subject: [PATCH] Don't call preRun when stop is pressed during init phase --- .../seattlesolvers/solverslib/command/CommandOpMode.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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 a727ff363..9dbeb0c2a 100644 --- a/core/src/main/java/com/seattlesolvers/solverslib/command/CommandOpMode.java +++ b/core/src/main/java/com/seattlesolvers/solverslib/command/CommandOpMode.java @@ -47,9 +47,11 @@ public void runOpMode() throws InterruptedException { while (opModeInInit()) { initialize_loop(); } - preRun(); - while (opModeIsActive()) { - run(); + if (opModeIsActive()) { + preRun(); + while (opModeIsActive()) { + run(); + } } } finally { try {