From 4bf5f4e95a1c3042c9d2978e278a3ed3e68b0376 Mon Sep 17 00:00:00 2001 From: moo Date: Wed, 17 Sep 2025 16:02:50 -0700 Subject: [PATCH] don't really work yet, debugging --- src/main/java/frc/robot/Robot.java | 2 ++ .../frc/robot/commands/vision/ShutdownOrangePi.java | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/java/frc/robot/Robot.java b/src/main/java/frc/robot/Robot.java index a7d87ff..855b56e 100644 --- a/src/main/java/frc/robot/Robot.java +++ b/src/main/java/frc/robot/Robot.java @@ -20,6 +20,7 @@ import edu.wpi.first.wpilibj.RobotController; import edu.wpi.first.wpilibj.DriverStation.Alliance; import edu.wpi.first.wpilibj2.command.Command; import edu.wpi.first.wpilibj2.command.CommandScheduler; +import frc.robot.commands.vision.ShutdownAllPis; import frc.robot.constants.Constants; import frc.robot.constants.VisionConstants; import frc.robot.constants.swerve.DriveConstants; @@ -169,6 +170,7 @@ public class Robot extends LoggedRobot { @Override public void teleopInit() { robotContainer.setVisionEnabled(true); + CommandScheduler.getInstance().schedule(new ShutdownAllPis()); // This makes sure that the autonomous stops running when // teleop starts running. If you want the autonomous to diff --git a/src/main/java/frc/robot/commands/vision/ShutdownOrangePi.java b/src/main/java/frc/robot/commands/vision/ShutdownOrangePi.java index c9078ca..3ae0d63 100644 --- a/src/main/java/frc/robot/commands/vision/ShutdownOrangePi.java +++ b/src/main/java/frc/robot/commands/vision/ShutdownOrangePi.java @@ -35,11 +35,11 @@ public class ShutdownOrangePi extends Command { @Override public void initialize() { passwordTyped = false; - if (Robot.isSimulation()) { - // this will probably break on Windows systems so... - System.out.println("Would shut down OrangePi at " + hostname + " if this was real."); - return; - } + // if (Robot.isSimulation()) { + // // this will probably break on Windows systems so... + // System.out.println("Would shut down OrangePi at " + hostname + " if this was real."); + // return; + // } try { String[] commandString = new String[] { "ssh", -- 2.39.5