]> git.taranathan.com Git - FRC2026.git/commitdiff
button work
authormoo <moogoesmeow123@gmail.com>
Thu, 25 Sep 2025 23:18:28 +0000 (16:18 -0700)
committermoo <moogoesmeow123@gmail.com>
Thu, 25 Sep 2025 23:18:28 +0000 (16:18 -0700)
works, but need to ssh in to rio and chmod 777 the sshpass bin first, will need to fix

src/main/java/frc/robot/commands/vision/ShutdownOrangePi.java

index 97b2c67fd49f28d13adbd5c23def6824d14f83e7..83a351b2d450af32acc38e39cdbab0843dcde902 100644 (file)
@@ -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();