From: Arnav495 Date: Thu, 25 Sep 2025 22:55:32 +0000 (-0700) Subject: Fix command. X-Git-Url: https://git.taranathan.com/?a=commitdiff_plain;h=36f2b4087db63ffb0751f3ae03b7e16c4a4eead3;p=FRC2026.git Fix command. --- diff --git a/src/main/java/frc/robot/commands/vision/ShutdownOrangePi.java b/src/main/java/frc/robot/commands/vision/ShutdownOrangePi.java index c9078ca..97b2c67 100644 --- a/src/main/java/frc/robot/commands/vision/ShutdownOrangePi.java +++ b/src/main/java/frc/robot/commands/vision/ShutdownOrangePi.java @@ -90,8 +90,14 @@ public class ShutdownOrangePi extends Command { if (this.process.isAlive()) this.process.destroy(); // end the process if we've been interrupted - int exitValue = this.process.exitValue(); - if (exitValue != 0) // abnormal termination - System.out.println("OrangePi shutdown failed with exit code " + exitValue + "."); + if (interrupted) { + this.process.destroy(); // end the process if we've been interrupted + } else { + int exitValue = this.process.exitValue(); + if (exitValue != 0) // abnormal termination + System.out.println("OrangePi shutdown failed with exit code " + exitValue + "."); + else + System.out.println("OrangePi shutdown succesful."); + } } }