Subversion Repositories svnkaklik

Rev

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

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