Subversion Repositories svn.mios32

Rev

Rev 2045 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2045 Rev 2557
1
if ^section == 0
1
if ^section == 0
2
  exit
2
  exit
3
endif
3
endif
4
4
5
# should the PC value be cleared?
5
# should the PC value be cleared?
6
if LED:2001 == 2
6
if LED:2001 == 2
7
  set LED:2000 0
7
  set LED:2000 0
8
  set LED:2001 0
8
  set LED:2001 0
9
endif
9
endif
10
10
11
11
12
# keypad buttons
12
# keypad buttons
13
13
14
# '1' button
14
# '1' button
15
if ^section == 1
15
if ^section == 1
16
  if LED:2000 <= 12
16
  if LED:2000 <= 12
17
    set LED:2000 [LED:2000 * 10]
17
    set LED:2000 [LED:2000 * 10]
18
    set LED:2000 [LED:2000 + 1]
18
    set LED:2000 [LED:2000 + 1]
19
19
20
    # indicate a valid number
20
    # indicate a valid number
21
    set LED:2001 1
21
    set LED:2001 1
22
  endif
22
  endif
23
  exit
23
  exit
24
endif
24
endif
25
25
26
# '2' button
26
# '2' button
27
if ^section == 2
27
if ^section == 2
28
  if LED:2000 <= 12
28
  if LED:2000 <= 12
29
    set LED:2000 [LED:2000 * 10]
29
    set LED:2000 [LED:2000 * 10]
30
    set LED:2000 [LED:2000 + 2]
30
    set LED:2000 [LED:2000 + 2]
31
31
32
    # indicate a valid number
32
    # indicate a valid number
33
    set LED:2001 1
33
    set LED:2001 1
34
  endif
34
  endif
35
  exit
35
  exit
36
endif
36
endif
37
37
38
# '3' button
38
# '3' button
39
if ^section == 3
39
if ^section == 3
40
  if LED:2000 <= 12
40
  if LED:2000 <= 12
41
    set LED:2000 [LED:2000 * 10]
41
    set LED:2000 [LED:2000 * 10]
42
    set LED:2000 [LED:2000 + 3]
42
    set LED:2000 [LED:2000 + 3]
43
43
44
    # indicate a valid number
44
    # indicate a valid number
45
    set LED:2001 1
45
    set LED:2001 1
46
  endif
46
  endif
47
  exit
47
  exit
48
endif
48
endif
49
49
50
# '4' button
50
# '4' button
51
if ^section == 4
51
if ^section == 4
52
  if LED:2000 <= 12
52
  if LED:2000 <= 12
53
    set LED:2000 [LED:2000 * 10]
53
    set LED:2000 [LED:2000 * 10]
54
    set LED:2000 [LED:2000 + 4]
54
    set LED:2000 [LED:2000 + 4]
55
55
56
    # indicate a valid number
56
    # indicate a valid number
57
    set LED:2001 1
57
    set LED:2001 1
58
  endif
58
  endif
59
  exit
59
  exit
60
endif
60
endif
61
61
62
# '5' button
62
# '5' button
63
if ^section == 5
63
if ^section == 5
64
  if LED:2000 <= 12
64
  if LED:2000 <= 12
65
    set LED:2000 [LED:2000 * 10]
65
    set LED:2000 [LED:2000 * 10]
66
    set LED:2000 [LED:2000 + 5]
66
    set LED:2000 [LED:2000 + 5]
67
67
68
    # indicate a valid number
68
    # indicate a valid number
69
    set LED:2001 1
69
    set LED:2001 1
70
  endif
70
  endif
71
  exit
71
  exit
72
endif
72
endif
73
73
74
# '6' button
74
# '6' button
75
if ^section == 6
75
if ^section == 6
76
  if LED:2000 <= 12
76
  if LED:2000 <= 12
77
    set LED:2000 [LED:2000 * 10]
77
    set LED:2000 [LED:2000 * 10]
78
    set LED:2000 [LED:2000 + 6]
78
    set LED:2000 [LED:2000 + 6]
79
79
80
    # indicate a valid number
80
    # indicate a valid number
81
    set LED:2001 1
81
    set LED:2001 1
82
  endif
82
  endif
83
  exit
83
  exit
84
endif
84
endif
85
85
86
# '7' button
86
# '7' button
87
if ^section == 7
87
if ^section == 7
88
  if LED:2000 <= 12
88
  if LED:2000 <= 12
89
    set LED:2000 [LED:2000 * 10]
89
    set LED:2000 [LED:2000 * 10]
90
    set LED:2000 [LED:2000 + 7]
90
    set LED:2000 [LED:2000 + 7]
91
91
92
    # indicate a valid number
92
    # indicate a valid number
93
    set LED:2001 1
93
    set LED:2001 1
94
  endif
94
  endif
95
  exit
95
  exit
96
endif
96
endif
97
97
98
# '8' button
98
# '8' button
99
if ^section == 8
99
if ^section == 8
100
  if LED:2000 <= 11
100
  if LED:2000 <= 11
101
    set LED:2000 [LED:2000 * 10]
101
    set LED:2000 [LED:2000 * 10]
102
    set LED:2000 [LED:2000 + 8]
102
    set LED:2000 [LED:2000 + 8]
103
103
104
    # indicate a valid number
104
    # indicate a valid number
105
    set LED:2001 1
105
    set LED:2001 1
106
  endif
106
  endif
107
  exit
107
  exit
108
endif
108
endif
109
109
110
# '9' button
110
# '9' button
111
if ^section == 9
111
if ^section == 9
112
  if LED:2000 <= 11
112
  if LED:2000 <= 11
113
    set LED:2000 [LED:2000 * 10]
113
    set LED:2000 [LED:2000 * 10]
114
    set LED:2000 [LED:2000 + 9]
114
    set LED:2000 [LED:2000 + 9]
115
115
116
    # indicate a valid number
116
    # indicate a valid number
117
    set LED:2001 1
117
    set LED:2001 1
118
  endif
118
  endif
119
  exit
119
  exit
120
endif
120
endif
121
121
122
# '0' button
122
# '0' button
123
if ^section == 10
123
if ^section == 10
124
  if LED:2000 <= 12
124
  if LED:2000 <= 12
125
    set LED:2000 [LED:2000 * 10]
125
    set LED:2000 [LED:2000 * 10]
126
126
127
    # indicate a valid number
127
    # indicate a valid number
128
    set LED:2001 1
128
    set LED:2001 1
129
  endif
129
  endif
130
  exit
130
  exit
131
endif
131
endif
132
132
133
# EXEC button
133
# EXEC button
134
if ^section == 11
134
if ^section == 11
135
  # valid number?
135
  # valid number?
136
  if LED:2001 == 1
136
  if LED:2001 == 1
137
    send ProgramChange USB1 1 LED:2000
137
    send ProgramChange USB1 1 LED:2000
138
138
139
    # next entry will reset the number
139
    # next entry will reset the number
140
    set LED:2001 2
140
    set LED:2001 2
141
  endif
141
  endif
142
142
143
  exit
143
  exit
144
endif
144
endif
145
145
146
# CLEAR button
146
# CLEAR button
147
if ^section == 12
147
if ^section == 12
148
  set LED:2000 0
148
  set LED:2000 0
149
  set LED:2001 0
149
  set LED:2001 0
150
  exit
150
  exit
151
endif
151
endif