Subversion Repositories svnkaklik

Rev

Details | Last modification | View Log

Rev Author Line No. Line
310 kaklik 1
program Cholerik;
2
 
3
var i, last;
4
 
5
LMOT:=30;
6
RMOT:=20;
7
 
8
while true
9
do
10
 
11
#last:= RRTOUCH & RFTOUCH & LRTOUCH & LFTOUCH;
12
 
13
  if LEYE = 0 then
14
    LMOT:=-30;
15
    RMOT:=-30;
16
    i:=TIME;
17
    while TIME < (i+0.5) 
18
    do end;
19
    LMOT:=-30;
20
    RMOT:=30;
21
    i:=TIME;
22
    while TIME < (i+1)
23
    do
24
      if CEYE = 0 then 
25
        break;
26
      end;
27
    end;
28
    LMOT:=30;
29
    RMOT:=30;
30
  end;
31
 
32
  if REYE = 0 then
33
    LMOT:=-30;
34
    RMOT:=-30;
35
    while TIME < (i+0.5)
36
    do end;
37
    LMOT:=30;
38
    RMOT:=-30;
39
    i:=TIME;
40
    while TIME < (i+1)
41
    do 
42
      if CEYE = 0 then 
43
        break;
44
      end;
45
    end;
46
    LMOT:=30;
47
    RMOT:=30;
48
  end;
49
 
50
  if CEYE = 0 then
51
    RMOT:=-30;
52
    LMOT:=-30;
53
    i:=TIME;
54
    while TIME < (i+1)
55
    do end;
56
    RMOT:=30;
57
    LMOT:=-30;
58
    i:=TIME;
59
    while TIME < (i+1)
60
    do
61
      if RRADAR>0 or LRADAR>0 then 
62
      break;
63
    end;
64
    RMOT:=30;
65
    LMOT:=30;
66
  end;
67
 
68
  if RFTOUCH = 1 then
69
    RMOT:=-30;
70
    LMOT:=30;
71
    i:=TIME;
72
    while TIME < (i+1)
73
    do 
74
      if CEYE = 0 then 
75
        break;
76
      end;
77
    end;    
78
    RMOT:=30;
79
    LMOT:=0;
80
    i:=TIME;
81
    while TIME < (i+1)
82
    do
83
      if CEYE = 0 or RRADAR>0 or LRADAR>0 then 
84
        break;
85
      end;
86
    end;    
87
    RMOT:=30;
88
    LMOT:=30;
89
  end;
90
 
91
  if LFTOUCH = 1 then
92
    RMOT:=30;
93
    LMOT:=-30;
94
    i:=TIME;
95
    while TIME < (i+0.5)
96
    do 
97
      if CEYE = 0 then 
98
        break;
99
      end;
100
    end;    
101
    RMOT:=0;
102
    LMOT:=30;
103
    i:=TIME;
104
    while TIME < (i+0.5)
105
    do 
106
      if CEYE = 0 or RRADAR>0 or LRADAR>0 then 
107
        break;
108
      end;
109
    end;    
110
    RMOT:=30;
111
    LMOT:=30;
112
  end;
113
 
114
  if RRTOUCH = 1 or LRTOUCH = 1 then
115
    RMOT:=30;
116
    LMOT:=-30;
117
  end;
118
end;
119
end;