Subversion Repositories svn.mios32

Rev

Rev 1815 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1815 tk 1
# This run script works together with MULTIBNK.NGC
2
 
3
# the bank selection should be handled regardless of the ^section
4
# Note that ^section == 0 is called after boot
5
# And ^section == 1 will be called whenever the bank has been changed.
6
 
7
# Note also, that logical combinations are not supported by the .NGR parser
8
# e.g. "if ^bank == 1 || ^bank == 2" is not supported!
9
# Therefore we have to duplicate the set_active commands
10
# This might change in future
11
 
12
 
13
if ^bank == 1
14
  ##############################################################################
15
  LOG "Bank 1 branch processed in .NGR script"
16
 
17
  set_active (id)BUTTON:101 1
18
  set_active (id)BUTTON:102 1
19
  set_active (id)BUTTON:103 1
20
  set_active (id)BUTTON:104 1
21
 
22
  set_active (id)BUTTON:301 0
23
  set_active (id)BUTTON:302 0
24
  set_active (id)BUTTON:303 0
25
  set_active (id)BUTTON:304 0
26
 
27
 
28
elsif ^bank == 2
29
  ##############################################################################
30
  LOG "Bank 2 branch processed in .NGR script"
31
 
32
  set_active (id)BUTTON:101 1
33
  set_active (id)BUTTON:102 1
34
  set_active (id)BUTTON:103 1
35
  set_active (id)BUTTON:104 1
36
 
37
  set_active (id)BUTTON:301 0
38
  set_active (id)BUTTON:302 0
39
  set_active (id)BUTTON:303 0
40
  set_active (id)BUTTON:304 0
41
 
42
 
43
elsif ^bank == 3
44
  ##############################################################################
45
  LOG "Bank 3 branch processed in .NGR script"
46
 
47
  set_active (id)BUTTON:101 0
48
  set_active (id)BUTTON:102 0
49
  set_active (id)BUTTON:103 0
50
  set_active (id)BUTTON:104 0
51
 
52
  set_active (id)BUTTON:301 1
53
  set_active (id)BUTTON:302 1
54
  set_active (id)BUTTON:303 1
55
  set_active (id)BUTTON:304 1
56
 
57
 
58
elsif ^bank == 4
59
  ##############################################################################
60
  LOG "Bank 4 branch processed in .NGR script"
61
 
62
  set_active (id)BUTTON:101 0
63
  set_active (id)BUTTON:102 0
64
  set_active (id)BUTTON:103 0
65
  set_active (id)BUTTON:104 0
66
 
67
  set_active (id)BUTTON:301 1
68
  set_active (id)BUTTON:302 1
69
  set_active (id)BUTTON:303 1
70
  set_active (id)BUTTON:304 1
71
 
72
endif
73
 
74
exit