mirror of
https://github.com/eddyem/pusirobot.git
synced 2026-03-21 17:21:06 +03:00
some changes: bug fixes, working with PMC007
This commit is contained in:
1
commandline/cfg/3axiscorr/Readme
Normal file
1
commandline/cfg/3axiscorr/Readme
Normal file
@@ -0,0 +1 @@
|
||||
scripts for 3-motor local corrector
|
||||
19
commandline/cfg/3axiscorr/loccorr_init
Executable file
19
commandline/cfg/3axiscorr/loccorr_init
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
|
||||
# init 3-point local corrector
|
||||
|
||||
for I in 2 10 11; do
|
||||
./steppermove -I$I -m8000 -r-10000
|
||||
done
|
||||
|
||||
for I in 2 10 11; do
|
||||
./steppermove -I$I -w
|
||||
done
|
||||
|
||||
for I in 2 10 11; do
|
||||
./steppermove -I$I -0
|
||||
done
|
||||
|
||||
for I in 2 10 11; do
|
||||
./steppermove -I$I -a 7200
|
||||
done
|
||||
24
commandline/cfg/3axiscorr/loccorr_telepalka
Executable file
24
commandline/cfg/3axiscorr/loccorr_telepalka
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
|
||||
# random move 3-point local corrector around middle point
|
||||
|
||||
function rmove(){ # $1 - current motor index, $2 - index of motor to correct into+, $3 - relative steps
|
||||
arr=(2 10 11) # ID's of motors
|
||||
ID=${arr[$1]}
|
||||
#./steppermove -I$ID -w
|
||||
if [[ $1 -ne $2 ]]; then # move to minus
|
||||
./steppermove -I$ID -a $(( 7200 - S ))
|
||||
else # move to plus
|
||||
./steppermove -I$ID -a $(( 7200 + S ))
|
||||
fi
|
||||
}
|
||||
|
||||
trap "echo Exited!; exit;" SIGINT SIGTERM
|
||||
|
||||
while true; do
|
||||
I=$(( RANDOM % 3 ))
|
||||
S=$(( RANDOM % 1280 ))
|
||||
for i in 0 1 2; do
|
||||
rmove $i $I $S
|
||||
done
|
||||
done
|
||||
Reference in New Issue
Block a user