Subversion Repositories svnkaklik

Rev

Rev 275 | Rev 277 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log

Rev Author Line No. Line
276 kaklik 1
program Orbis;
275 kaklik 2
 
276 kaklik 3
var line, Rychlost;
275 kaklik 4
 
276 kaklik 5
#define L 1
6
#define S 2
7
#define R 3
275 kaklik 8
 
276 kaklik 9
line:=2;
10
 
11
Rychlost:=15;		# omezeni rychlosti (hlavne pro ladici ucely)
12
 
13
while true
275 kaklik 14
do
276 kaklik 15
  if LEYE > 0 and CEYE > 0 then		# Cara pod levim sensorem
16
    LMOT:=0;RMOT:=Rychlost;			# jed rovne
17
    line:=1;		# zaznamenej, kdes videl caru
18
    continue;
19
  end;
275 kaklik 20
 
276 kaklik 21
  if REYE > 0 and CEYE > 0 then
22
    LMOT:=Rychlost;RMOT:=0;
23
    line:=3;
24
    continue;
25
  end;
275 kaklik 26
 
276 kaklik 27
  if CEYE > 0 then 
28
    LMOT:=Rychlost;RMOT:=Rychlost;
29
    line:=2;
30
    continue;
275 kaklik 31
  end;
276 kaklik 32
 
275 kaklik 33
end;