Niko Sohmers | 3860f8a | 2024-01-12 21:05:19 -0800 | [diff] [blame] | 1 | #!/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 |
| 6 | imu_pi6="pi@10.79.71.106" |
| 7 | |
| 8 | # TODO(milind): add logger in the future |
| 9 | echo "Sending Joystick command '$1' to $imu_pi6" |
| 10 | ssh ${imu_pi6} "bin/aos_send /imu/aos aos.JoystickState '{\"enabled\": $1}'" |
| 11 | |
| 12 | if [ $1 = "false" ] |
| 13 | then |
| 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}'" |
| 18 | fi |