Subversion Repositories svnkaklik

Compare Revisions

Ignore whitespace Rev 277 → Rev 278

/programy/Robsim/Robiada2007/kaklik.lab
13,7 → 13,7
while true
do
if LEYE = 1 and CEYE = 1 and REYE = 0 then
LMOT:=0;RMOT:=Rychlost; # jed rovne
LMOT:=-1;RMOT:=Rychlost*0.75; # jed rovne
line:=1; # zaznamenej, kdes videl caru
movement:=1;
continue;
20,14 → 20,14
end;
 
if LEYE = 0 and CEYE = 1 and REYE = 1 then
LMOT:=Rychlost;RMOT:=Rychlost;
LMOT:=Rychlost*0.75;RMOT:=-1;
line:=3;
movement:=2;
movement:=3;
continue;
end;
 
if LEYE = 1 and CEYE = 0 and REYE = 0 then
LMOT:=0;RMOT:=Rychlost; # jed rovne
LMOT:=-Rychlost/2;RMOT:=Rychlost; # jed rovne
line:=1; # zaznamenej, kdes videl caru
movement:=1;
continue;
34,7 → 34,7
end;
 
if LEYE = 0 and CEYE = 0 and REYE = 1 then
LMOT:=Rychlost;RMOT:=0;
LMOT:=Rychlost;RMOT:=-Rychlost/2;
line:=3;
movement:=3;
continue;
41,22 → 41,39
end;
 
if (LEYE = 0 and CEYE = 1 and REYE = 0) then
LMOT:=0;RMOT:=Rychlost;
LMOT:=Rychlost;RMOT:=Rychlost;
line:=2;
movement:=1;
movement:=2;
continue;
end;
 
if (LEYE = 1 and CEYE = 1 and REYE = 1) then
LMOT:=0;RMOT:=Rychlost;
line:=2;
movement:=1;
continue;
if movement = 1 then
LMOT:=Rychlost;RMOT:=0;
line:=2;
# break;
 
elif movement = 2 then
LMOT:=Rychlost;RMOT:=Rychlost;
line:=2;
# break;
 
elif movement = 3 then
LMOT:=0;RMOT:=Rychlost;
line:=2;
end;
end;
 
if (LEYE = 0 and CEYE = 0 and REYE = 0) then
if line = 1 then
LMOT:=0;RMOT:=Rychlost;
line:=2;
movement:=1;
 
elif movement = 3 then
LMOT:=Rychlost;RMOT:=0;
line:=2;
movement:=3;
end;
end;
end;