Subversion Repositories svnkaklik

Rev

Rev 279 | Details | Compare with Previous | Last modification | View Log

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