Subversion Repositories svnkaklik

Rev

Details | Last modification | View Log

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