]> git.taranathan.com Git - FRC2026.git/commitdiff
add button to smartdashboard
authormoo <moogoesmeow123@gmail.com>
Tue, 23 Sep 2025 21:26:34 +0000 (14:26 -0700)
committermoo <moogoesmeow123@gmail.com>
Tue, 23 Sep 2025 21:26:34 +0000 (14:26 -0700)
src/main/java/frc/robot/RobotContainer.java
src/main/java/frc/robot/commands/vision/ShutdownOrangePi.java

index 49efa97e1f9b72a9d42d08e1c7b07ca85f37fde8..0227e47fa62cd70a86c734b082a9ddb04073abce 100644 (file)
@@ -13,9 +13,11 @@ import edu.wpi.first.math.geometry.Pose3d;
 import edu.wpi.first.wpilibj.DriverStation;
 import edu.wpi.first.wpilibj.RobotController;
 import edu.wpi.first.wpilibj.livewindow.LiveWindow;
+import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
 import edu.wpi.first.wpilibj2.command.Command;
 import frc.robot.commands.DoNothing;
 import frc.robot.commands.drive_comm.DefaultDriveCommand;
+import frc.robot.commands.vision.ShutdownAllPis;
 import frc.robot.constants.AutoConstants;
 import frc.robot.constants.Constants;
 import frc.robot.constants.VisionConstants;
@@ -105,6 +107,9 @@ public class RobotContainer {
     // LiveWindow is causing periodic loop overruns
     LiveWindow.disableAllTelemetry();
     LiveWindow.setEnabled(false);
+
+    SmartDashboard.putData("Shutdown back Orange Pi", new ShutdownAllPis());
+
     
   }
 
index 3ae0d63a5817f12eee42570215dbad703b9ffcf9..c9078ca453ad43c3f34005249ef206c6af5974df 100644 (file)
@@ -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",