animation/position.sh

27 lines
467 B
Bash
Raw Normal View History

2021-08-05 14:56:27 +00:00
#!/bin/bash
2021-09-16 14:42:59 +00:00
###########################
#
# Position the pen at an offset for a frame
# and resets the pen after it is complete.
#
###########################
2021-09-16 05:26:50 +00:00
XZIG=2.0
2021-09-16 05:59:38 +00:00
X=3.35 #4.2 - XZIG
Y=1.93
2021-08-05 14:56:27 +00:00
2021-09-16 05:21:27 +00:00
if [[ "${1}" == "" ]]; then
echo "Please provide an argument. Either 'set' or 'reset'."
exit 1
fi
2021-08-05 14:56:27 +00:00
if [ "${1}" == "set" ]; then
paxi move $XZIG 0
2021-08-05 14:56:27 +00:00
paxi move 0 $Y
2021-08-10 22:48:02 +00:00
paxi move $X 0
2021-08-10 22:44:13 +00:00
elif [ "${1}" == "reset" ]; then
2021-08-05 14:56:27 +00:00
paxi move -$X 0
paxi move 0 -$Y
paxi move -$XZIG 0
2021-08-05 14:56:27 +00:00
fi