Subversion Repositories svnkaklik

Compare Revisions

Ignore whitespace Rev 275 → Rev 276

/programy/Robsim/Robiada2007/Callis.lab
0,0 → 1,35
program Callis;
 
var movement, line;
 
#define L 1
#define S 2
#define R 3
 
line:=2;
 
while true
do
if LEYE > 0 or CEYE > 0 then # Cara pod levim sensorem
LMOT:=30;RMOT:=30; # jed rovne
line:=1; # zaznamenej, kdes videl caru
continue;
end;
 
if REYE > 0 or CEYE > 0 then
LMOT:=30;RMOT:=30;
line:=3;
continue;
end;
if line=1 then
LMOT:=0;
movement:=1;
break;
 
elif line=3 then
RMOT:=0;
movement:=3;
break;
end;
end;
/programy/Robsim/Robiada2007/kaklik.lab
1,17 → 1,33
program Callis;
program Orbis;
 
var movement, line;
var line, Rychlost;
 
line:=S;
#define L 1
#define S 2
#define R 3
 
While true
line:=2;
 
Rychlost:=15; # omezeni rychlosti (hlavne pro ladici ucely)
 
while true
do
if LEYE then # Cara pod levim sensorem
MOTL:=30; # jed rovne
line:=L; # zaznamenej, kdes videl caru
if LEYE > 0 and CEYE > 0 then # Cara pod levim sensorem
LMOT:=0;RMOT:=Rychlost; # jed rovne
line:=1; # zaznamenej, kdes videl caru
continue;
end;
 
elif REYE then
if REYE > 0 and CEYE > 0 then
LMOT:=Rychlost;RMOT:=0;
line:=3;
continue;
end;
 
if CEYE > 0 then
LMOT:=Rychlost;RMOT:=Rychlost;
line:=2;
continue;
end;
 
end;