/programy/Robsim/Robiada2007/Callis.lab |
---|
1,7 → 1,6 |
# naportovany algoritmus Callis, ovsem nefunguje. |
program Callis; |
program Orbis; |
var movement, line; |
var line, Rychlost, Zataceni; |
#define L 1 |
#define S 2 |
9,28 → 8,33 |
line:=2; |
Rychlost:=15; # omezeni rychlosti (hlavne pro ladici ucely) |
Zataceni:=0.75; |
while true |
do |
if LEYE > 0 or CEYE > 0 then # Cara pod levim sensorem |
LMOT:=30;RMOT:=30; # jed rovne |
if LEYE = 1 and CEYE = 1 then # Cara pod levim sensorem |
LMOT:=0;RMOT:=Rychlost*Zataceni; # jed rovne |
line:=1; # zaznamenej, kdes videl caru |
continue; |
end; |
if REYE > 0 or CEYE > 0 then |
LMOT:=30;RMOT:=30; |
if REYE = 1 and CEYE = 1 then |
LMOT:=Rychlost*Zataceni;RMOT:=0; |
line:=3; |
continue; |
end; |
if line=1 then |
LMOT:=0; |
movement:=1; |
break; |
if CEYE = 1 then |
LMOT:=Rychlost;RMOT:=Rychlost; |
line:=2; |
continue; |
end; |
elif line=3 then |
RMOT:=0; |
movement:=3; |
break; |
if LEYE = 0 and CEYE = 0 and REYE = 0 then |
LMOT:=Rychlost;RMOT:=0; |
line:=2; |
continue; |
end; |
end; |
/programy/Robsim/Robiada2007/Callis2.lab |
---|
0,0 → 1,34 |
program Orbis; |
var line, Rychlost, Zataceni; |
#define L 1 |
#define S 2 |
#define R 3 |
line:=2; |
Rychlost:=15; # omezeni rychlosti (hlavne pro ladici ucely) |
Zataceni:=0.75; |
while true |
do |
if LEYE=0 and CEYE = 1 and REYE=0 then |
LMOT:=Rychlost;RMOT:=Rychlost; |
line:=2; |
continue; |
end; |
if REYE = 0 then # Cara pod levim sensorem |
LMOT:=0;RMOT:=Rychlost*Zataceni; # jed rovne |
line:=1; # zaznamenej, kdes videl caru |
continue; |
end; |
if LEYE = 0 then |
LMOT:=Rychlost*Zataceni;RMOT:=0; |
line:=3; |
continue; |
end; |
end; |
/programy/Robsim/Robiada2007/Callis3.lab |
---|
0,0 → 1,35 |
program Orbis; |
var line, Rychlost, Zataceni; |
#define L 1 |
#define S 2 |
#define R 3 |
line:=2; |
Rychlost:=15; # omezeni rychlosti (hlavne pro ladici ucely) |
Zataceni:=0.75; |
while true |
do |
if LEYE = 0 and CEYE = 1 and LEYE = 0 then |
LMOT:=Rychlost;RMOT:=Rychlost; |
line:=2; |
continue; |
end; |
if LEYE = 1 and CEYE = 1 then # Cara pod levim sensorem |
LMOT:=0;RMOT:=Rychlost*Zataceni; # jed rovne |
line:=1; # zaznamenej, kdes videl caru |
continue; |
end; |
if REYE = 1 and CEYE = 1 then |
LMOT:=Rychlost*Zataceni;RMOT:=0; |
line:=3; |
continue; |
end; |
end; |
/programy/Robsim/Robiada2007/Callis_edited.lab |
---|
0,0 → 1,59 |
program Orbis; |
var line, Rychlost, Reverz, Zataceni; |
var Rovinka, a; |
#define L 1 |
#define S 2 |
#define R 3 |
line:=2; |
Rovinka:=0; |
Rychlost:=30; # omezeni rychlosti (hlavne pro ladici ucely) |
Reverz := 1; |
Zataceni := 0.75; |
while true |
do |
if LEYE = 1 and CEYE = 1 then # Cara pod levim sensorem |
if line = 2 then |
a:=TIME; |
LMOT:=-Rychlost; RMOT:=-Rychlost; |
while TIME < (a + Reverz) do; |
end; |
if line = 3 then |
a:=TIME; |
RMOT:=-Rychlost; |
while TIME < (a + Reverz) do; |
end; |
LMOT:=0;RMOT:=Rychlost*Zataceni; |
line:=1; # zaznamenej, kdes videl caru |
Rovinka:=0; |
continue; |
end; |
if REYE = 1 and CEYE = 1 then |
if line = 1 then |
a:=TIME; |
LMOT:=-Rychlost;RMOT:=-Rychlost; |
while TIME < (a+Reverz) do; |
end; |
if line = 1 then |
a:=TIME; |
LMOT:=-Rychlost; |
while TIME < (a+Reverz) do; |
end; |
LMOT:=Rychlost*Zataceni;RMOT:=0; |
line:=3; |
Rovinka:=0; |
continue; |
end; |
if CEYE = 1 then |
LMOT:=Rychlost;RMOT:=Rychlost; |
line:=2; |
Rovinka:= Rovinka +1; |
continue; |
end; |
end; |
/programy/Robsim/Robiada2007/Callis_edited_reverz.lab |
---|
0,0 → 1,49 |
program Orbis; |
var line, Rychlost, Reverz, Zataceni; |
var Rovinka, a; |
#define L 1 |
#define S 2 |
#define R 3 |
line:=2; |
Rovinka:=0; |
Rychlost:=30; # omezeni rychlosti (hlavne pro ladici ucely) |
Reverz := 0.001; |
Zataceni := 0.75; |
while true |
do |
if LEYE = 1 and CEYE = 1 then # Cara pod levim sensorem |
if line = 2 then |
a:=TIME; |
LMOT:=-Rychlost; RMOT:=-Rychlost; |
while TIME < (a + Reverz) do end; |
end; |
LMOT:=0;RMOT:=Rychlost*Zataceni; |
line:=1; # zaznamenej, kdes videl caru |
Rovinka:=0; |
continue; |
end; |
if REYE = 1 and CEYE = 1 then |
if line = 2 then |
a:=TIME; |
LMOT:=-Rychlost;RMOT:=-Rychlost; |
while TIME < (a+Reverz) do end; |
end; |
LMOT:=Rychlost*Zataceni;RMOT:=0; |
line:=3; |
Rovinka:=0; |
continue; |
end; |
if CEYE = 1 then |
LMOT:=Rychlost;RMOT:=Rychlost; |
line:=2; |
Rovinka:= Rovinka +1; |
continue; |
end; |
end; |