Subversion Repositories svnkaklik

Rev

Rev 277 | Rev 280 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 277 Rev 278
Line 11... Line 11...
11
Rychlost:=15;		# omezeni rychlosti (hlavne pro ladici ucely)
11
Rychlost:=15;		# omezeni rychlosti (hlavne pro ladici ucely)
12
 
12
 
13
while true
13
while true
14
do
14
do
15
  if LEYE = 1 and CEYE = 1 and REYE = 0 then 
15
  if LEYE = 1 and CEYE = 1 and REYE = 0 then 
16
    LMOT:=0;RMOT:=Rychlost;			# jed rovne
16
    LMOT:=-1;RMOT:=Rychlost*0.75;			# jed rovne
17
    line:=1;		# zaznamenej, kdes videl caru
17
    line:=1;		# zaznamenej, kdes videl caru
18
    movement:=1;
18
    movement:=1;
19
    continue;
19
    continue;
20
  end;
20
  end;
21
 
21
 
22
  if LEYE = 0 and CEYE = 1 and REYE = 1 then 
22
  if LEYE = 0 and CEYE = 1 and REYE = 1 then 
23
    LMOT:=Rychlost;RMOT:=Rychlost;
23
    LMOT:=Rychlost*0.75;RMOT:=-1;
24
    line:=3;
24
    line:=3;
25
    movement:=2;
25
    movement:=3;
26
    continue;
26
    continue;
27
  end;
27
  end;
28
 
28
 
29
  if LEYE = 1 and CEYE = 0 and REYE = 0 then 
29
  if LEYE = 1 and CEYE = 0 and REYE = 0 then 
30
    LMOT:=0;RMOT:=Rychlost;			# jed rovne
30
    LMOT:=-Rychlost/2;RMOT:=Rychlost;			# jed rovne
31
    line:=1;		# zaznamenej, kdes videl caru
31
    line:=1;		# zaznamenej, kdes videl caru
32
    movement:=1;
32
    movement:=1;
33
    continue;
33
    continue;
34
  end;
34
  end;
35
 
35
 
36
  if LEYE = 0 and CEYE = 0 and REYE = 1 then 
36
  if LEYE = 0 and CEYE = 0 and REYE = 1 then 
37
    LMOT:=Rychlost;RMOT:=0;
37
    LMOT:=Rychlost;RMOT:=-Rychlost/2;
38
    line:=3;
38
    line:=3;
39
    movement:=3;
39
    movement:=3;
40
    continue;
40
    continue;
41
  end;
41
  end;
42
 
42
 
43
  if (LEYE = 0 and CEYE = 1 and REYE = 0) then 
43
  if (LEYE = 0 and CEYE = 1 and REYE = 0) then 
44
    LMOT:=0;RMOT:=Rychlost;
44
    LMOT:=Rychlost;RMOT:=Rychlost;
45
    line:=2;
45
    line:=2;
46
    movement:=1;
46
    movement:=2;
47
    continue;
47
    continue;
48
  end;
48
  end;
49
 
49
 
50
  if (LEYE = 1 and CEYE = 1 and REYE = 1) then 
50
  if (LEYE = 1 and CEYE = 1 and REYE = 1) then 
-
 
51
    if movement = 1 then
-
 
52
      LMOT:=Rychlost;RMOT:=0;
-
 
53
      line:=2;
-
 
54
#      break;
-
 
55
 
-
 
56
    elif movement = 2 then
51
    LMOT:=0;RMOT:=Rychlost;
57
      LMOT:=Rychlost;RMOT:=Rychlost;
52
    line:=2;
58
      line:=2;
-
 
59
#      break;
-
 
60
 
-
 
61
    elif movement = 3 then
-
 
62
      LMOT:=0;RMOT:=Rychlost;
53
    movement:=1;
63
      line:=2;
54
    continue;
64
    end;
55
  end;
65
  end;
56
 
66
 
57
  if (LEYE = 0 and CEYE = 0 and REYE = 0) then 
67
  if (LEYE = 0 and CEYE = 0 and REYE = 0) then 
-
 
68
    if line = 1 then
-
 
69
      LMOT:=0;RMOT:=Rychlost;
-
 
70
      line:=2;
-
 
71
      movement:=1;
-
 
72
 
-
 
73
    elif movement = 3 then
58
      LMOT:=Rychlost;RMOT:=0;
74
      LMOT:=Rychlost;RMOT:=0;
59
      line:=2;
75
      line:=2;
60
      movement:=3;
76
      movement:=3;
-
 
77
    end;
61
  end;    
78
  end;    
62
end;
79
end;