From 66dd400d0d16f8e1925024aae1b5c86420c44f2c Mon Sep 17 00:00:00 2001 From: Olivier Demers Date: Tue, 29 Nov 2022 19:25:53 -0500 Subject: [PATCH] try-catch reset gyro --- src/main/java/frc/robot/commands/ResetGyro.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/frc/robot/commands/ResetGyro.java b/src/main/java/frc/robot/commands/ResetGyro.java index fc17b51..d9a4050 100644 --- a/src/main/java/frc/robot/commands/ResetGyro.java +++ b/src/main/java/frc/robot/commands/ResetGyro.java @@ -19,7 +19,12 @@ public class ResetGyro extends CommandBase { // Called when the command is initially scheduled. @Override public void initialize() { - basePilotable.resetgyro(); + try { + basePilotable.resetgyro(); + } catch( Exception e) { + e.printStackTrace(); + } + } // Called every time the scheduler runs while the command is scheduled.