blob: 9b60e02bf704b86d290bdfd9e7675cf5738a5887 [file] [log] [blame]
Niko Sohmers3860f8a2024-01-12 21:05:19 -08001#!/usr/bin/sh
2
3# Helper script to spoof joystick state of robot enabled, to triggger image logging
4
5# Currently, this is going through pi6. Need to set the right IP address for the bot
6imu_pi6="pi@10.79.71.106"
7
8# TODO(milind): add logger in the future
9echo "Sending Joystick command '$1' to $imu_pi6"
10ssh ${imu_pi6} "bin/aos_send /imu/aos aos.JoystickState '{\"enabled\": $1}'"
11
12if [ $1 = "false" ]
13then
14 # This extra sleep is necessary to make sure the logs rotate to a new file
15 sleep 6
16 echo "Sending Joystick command '$1' to $imu_pi6"
17 ssh ${imu_pi6} "bin/aos_send /imu/aos aos.JoystickState '{\"enabled\": $1}'"
18fi