From: moo Date: Thu, 25 Sep 2025 23:18:28 +0000 (-0700) Subject: button work X-Git-Url: https://git.taranathan.com/?a=commitdiff_plain;h=05687b1b530d63b1b4fb2edbe40302c51e1e66f0;p=FRC2026.git button work works, but need to ssh in to rio and chmod 777 the sshpass bin first, will need to fix --- diff --git a/src/main/java/frc/robot/commands/vision/ShutdownOrangePi.java b/src/main/java/frc/robot/commands/vision/ShutdownOrangePi.java index 97b2c67..83a351b 100644 --- a/src/main/java/frc/robot/commands/vision/ShutdownOrangePi.java +++ b/src/main/java/frc/robot/commands/vision/ShutdownOrangePi.java @@ -42,11 +42,20 @@ public class ShutdownOrangePi extends Command { } try { - String[] commandString = new String[] { "ssh", - "-o", "UserKnownHostsFile /dev/null", - "-o", "StrictHostKeyChecking no", - VisionConstants.ORANGEPI_USERNAME + "@" + hostname, - "sudo", "shutdown", "now" }; + // String[] commandString = new String[] { "ssh", + // "-o", "UserKnownHostsFile /dev/null", + // "-o", "StrictHostKeyChecking no", + // VisionConstants.ORANGEPI_USERNAME + "@" + hostname, + // "sudo", "shutdown", "now" }; + + String[] commandString = new String[] { + "/home/lvuser/deploy/sshpass", + "-p", "raspberry", + "ssh", "-o", "StrictHostKeyChecking=no", + VisionConstants.ORANGEPI_USERNAME + "@" + hostname, + "sudo", "shutdown", "now" + }; + this.process = Runtime.getRuntime().exec(commandString); } catch (Exception e) { String message = e.getMessage() == null ? "unknown" : e.getMessage();