Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
183 lines (166 sloc) 3.42 KB
//Written in AppleScript
automode 0 //one tote fun tote
lift to 1
wait until level reached
switch forward Harvester
harvest at -0.5; for 0.5
lift to 4
wait until off ground
drive to 138,0,0; at 0.5 //slide to the right
switch reverse Harvester
lift to 1
reset gyro 90
end
automode 1 //knockdown
sanic at -0.02,0,0; for 0.2
drive at -0.8,0,0; until distance=80
sanic at 1,0,0; for 0.3
reset gyro -90
end
automode 2 //failed three tote
switch reverse Harvester
lift to 4
wait for 2
group 2
drive at 0,0.25,0
harvest at -0.7; until distance=65
switch forward Harvester
group 2
drive at 0,0.25,0
harvest at -0.7; for 0.5
lift to 1
group 2
drive at 0,0.1,0
harvest at -0.5; for 1
drive at 0,0.12,0; until level reached
switch reverse Harvester
lift to 4
drive at 0,0.12,0; for 0.5
group 2
drive at 0,0.25,0
harvest at -0.7; until distance=140
switch forward Harvester
group 2
drive at 0,0.25,0
harvest at -0.65; for 1
drive at 0,0,0; for 0.1
lift to 1
wait until level reached
switch reverse Harvester
//lift to 2
//wait until level reached
reset encoders
drive at 0.7,0,0; until distance=60
lift to 1
//wait until level reached
switch forward Harvester
group 2
harvest at 1; for 1
drive at 0,-0.75,0
switch reverse Harvester
drive at 0,0,0; for 0.1
harvest at 0; for 0.1
end
automode 3 //push RC
reset encoders
lift to 1
drive to 168,0,0; at 0.55 //move forward
reset gyro 90
end
automode 4 //move (from landfill side)
lift to 0
drive to 0,58,0; at 0.45
reset gyro 180 //ayy lmao
end
automode 5 //drive forward
lift to 0
drive to 0,144,0; at 0.3 //should be 72
end
automode 6 //Operation Binstorm (OLD)
reset gyro
lift to 0
drive at -0.05,0,0; for 0.1
drive at -0.9,0,0; for 0.45
switch forward Hooks
drive at -0.2,0,0; for 0.5 //shorten at some point
reset encoders
drive at 0.7,0,0; until distance=85
drive at -0.5,0,0; for 0.25
//drive to 100,0,0; at 0.7
switch reverse Hooks
reset gyro -90
end
automode 7 //Two-Can Toucan
reset gyro
sanic at -1,0,0; for 0.25
switch forward Hooks
sanic at -1,0,0; for 0.3
wait for 0.25
reset encoders
drive at 1,0,0; until distance=82
drive at -1,0,0; for 0.35
switch reverse Hooks
reset gyro -90
end
automode 8 //Two-Can Toucan v2
reset gyro
sanic at -1,0,0; for 0.12
switch forward Hooks
sanic at -1,0,0; for 0.3
wait for 0.2
reset encoders
drive at 1,0,0; until distance=82
drive at -1,0,0; for 0.35
switch reverse Hooks
reset gyro -90
end
automode 9 //align wheels
sanic at -0.05,0,0; for 2
end
automode 10 //do nothing
lift to 0
reset gyro -90
end
automode 11 //secure tote
lift to 1
wait until level reached
switch forward Harvester
harvest at -0.5; for 0.5
switch reverse Harvester
lift to 4
wait until level reached
reset gyro 90
end
automode 12 //trololo left
drive at 0.5,0,0; for 0.65
drive at 0,-0.02,0; for 0.3
drive at 0,-0.6,0; until distance=160
drive at 0,1,0; for 0.32
reset gyro -90
end
automode 13 //trololo right
drive at 0.5,0,0; for 0.65
drive at 0,0.02,0; for 0.3
drive at 0,0.6,0; until distance=160
drive at 0,-1,0; for 0.32
reset gyro -90
end
//nonsense
lift to 1
wait for 0.1
wait until level reached
lift to 4
wait for 0.1
wait until level reached
switch reverse Harvester
group 2
drive to 0,67,0; at 0.4
harvest at -0.5
switch forward Harvester
harvest at -0.5; for 1
lift to 1
wait for 0.1
wait until level reached
lift to 2
wait for 0.1
wait until level reached