]> git.taranathan.com Git - FRC2026.git/commitdiff
Fix command.
authorArnav495 <arnieincyberland@gmail.com>
Thu, 25 Sep 2025 22:55:32 +0000 (15:55 -0700)
committerArnav495 <arnieincyberland@gmail.com>
Thu, 25 Sep 2025 22:55:32 +0000 (15:55 -0700)
src/main/java/frc/robot/commands/vision/ShutdownOrangePi.java

index c9078ca453ad43c3f34005249ef206c6af5974df..97b2c67fd49f28d13adbd5c23def6824d14f83e7 100644 (file)
@@ -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.");
+               }
        }
 }