2080 |
kakl |
1 |
/* |
|
|
2 |
Ovladani domu rozvadec 2. n.p. |
|
|
3 |
|
|
|
4 |
Syntaxe prikazu: |
|
|
5 |
|
|
|
6 |
<Roleta/Svetlo><#patro><#mistnost><Nord/Jih/Vychod/Zapad/A/B><Up/Down> |
|
|
7 |
R2aNU - roleta, 2. n.p., mistnost 10, sever, nahoru |
|
|
8 |
S12A - svetlo, 1. n.p., mistnost 2, prostredni |
|
|
9 |
|
2081 |
kakl |
10 |
Rozmisteni desek: |
|
|
11 |
|
|
|
12 |
[CAN] |
|
|
13 |
[IN J] [IN D] |
|
|
14 |
[OUT A] [CPU] |
|
|
15 |
|
|
|
16 |
[OUT F] [OUT B] [OUT E] |
|
|
17 |
|
2080 |
kakl |
18 |
*/ |
1746 |
kakl |
19 |
#include "main.h" |
|
|
20 |
|
|
|
21 |
#case |
2085 |
kakl |
22 |
#use fast_io(A) // Aby se neztracely znaky pri cteni prikazu |
|
|
23 |
#use fast_io(B) |
|
|
24 |
#use fast_io(E) |
|
|
25 |
#use fast_io(F) |
|
|
26 |
#use fast_io(D) |
|
|
27 |
#use fast_io(J) |
1746 |
kakl |
28 |
|
2085 |
kakl |
29 |
#define REVERS 3 // 3*256 ms = 0,75 s |
1747 |
kakl |
30 |
#define GO 117 // 117*256 ms = 30 s |
1749 |
kakl |
31 |
#define GO_ZALUZIE 6 // cca 1,5 s |
|
|
32 |
#define RECEIVE 10 // cca 2,6 s |
2153 |
kakl |
33 |
#define ZAKMIT 2000 // pocet pruchodu hlavni smyckou pred opetovnou detekci prepnuti vypinace |
1747 |
kakl |
34 |
|
2084 |
kakl |
35 |
#define OR110NU PIN_A0 // t1 Zaluzie koupelna dole |
|
|
36 |
#define OR110ND PIN_A1 // t2 |
2080 |
kakl |
37 |
#define OR207VU PIN_A2 // t3 Roleta klubovna |
|
|
38 |
#define OR207VD PIN_A3 // t4 |
|
|
39 |
#define OR103VU PIN_A4 // t5 Roleta loznice |
|
|
40 |
#define OR103VD PIN_A5 // t6 |
|
|
41 |
#define OR104JU PIN_A6 // t7 Roleta laborator jih |
|
|
42 |
#define OR104JD PIN_A7 // t8 |
1746 |
kakl |
43 |
|
2080 |
kakl |
44 |
#define OS103J PIN_B0 // t1 Svetla loznice |
|
|
45 |
#define OS105Z PIN_B1 // t2 Svetlo kuchyn nad lavici |
2084 |
kakl |
46 |
#define OS110N PIN_B2 // t3 Svetlo koupelna dole zachod a sprhca |
2080 |
kakl |
47 |
#define OS106A PIN_B3 // t4 Svetlo trucovna stred |
|
|
48 |
#define OS107A PIN_B4 // t5 Svetlo satna |
|
|
49 |
#define OS109A PIN_B5 // t6 Svetlo technologicka mistnost |
2084 |
kakl |
50 |
#define OS205A PIN_B6 // t7 Svetlo puda |
|
|
51 |
#define OS204A PIN_B7 // t8 Svetlo radiomistnost |
1746 |
kakl |
52 |
|
|
|
53 |
//#define OS105C PIN_C2 |
|
|
54 |
//#define PIN_C3 31763 |
|
|
55 |
//#define PIN_C4 31764 |
|
|
56 |
//#define PIN_C5 31765 |
|
|
57 |
//#define PIN_C6 31766 //TX |
|
|
58 |
//#define PIN_C7 31767 //RX |
|
|
59 |
|
2085 |
kakl |
60 |
#define OS102A PIN_E0 // t1 Svetlo chodba |
|
|
61 |
#define OS105A PIN_E1 // t2 Svetlo kuchyne stred |
|
|
62 |
#define OS207A PIN_E2 // t3 Svetlo klubovna |
|
|
63 |
#define OS104A PIN_E3 // t4 Svetlo laborator |
|
|
64 |
#define OS202A PIN_E4 // t5 Svetlo Kaklik stred |
|
|
65 |
#define OS209A PIN_E5 // t6 Svetlo Zizala koupelna |
|
|
66 |
#define OS203A PIN_E6 // t7 Svetlo Kaklik koupelna |
|
|
67 |
//#define O... PIN_E7 // t8 |
|
|
68 |
|
2081 |
kakl |
69 |
#define OR104VU PIN_F0 // t1 Roleta laborator vychod |
|
|
70 |
#define OR104VD PIN_F1 // t2 |
2084 |
kakl |
71 |
#define OR202JU PIN_F2 // t3 Roleta Kaklik |
|
|
72 |
#define OR202JD PIN_F3 // t4 |
|
|
73 |
#define OR204ZU PIN_F4 // t5 Roleta radiomistnost |
|
|
74 |
#define OR204ZD PIN_F5 // t6 |
2080 |
kakl |
75 |
//#define O... PIN_F6 // t7 |
|
|
76 |
//#define O... PIN_F7 // t8 |
1746 |
kakl |
77 |
|
2084 |
kakl |
78 |
//#define I.... input(PIN_D0) // A |
|
|
79 |
#define IS201AZ input(PIN_D1) // B Vypinac chodba 2.n.p. zapad u Kaklika |
|
|
80 |
#define IS207AJ input(PIN_D2) // C Vypinac klubovna |
|
|
81 |
#define IR207VD input(PIN_D3) // D Vypinac roleta klubovna dolu |
|
|
82 |
#define IR207VU input(PIN_D4) // E Vypinac roleta klubovna nahoru |
|
|
83 |
#define IS201AV input(PIN_D5) // F Vypinac chodba 2.n.p. vychod |
|
|
84 |
#define IS209AJ input(PIN_D6) // G Vypinac koupelna Zizala |
|
|
85 |
#define IS203AJ input(PIN_D7) // H Vypinac koupelna Kaklik |
|
|
86 |
|
|
|
87 |
#define IS202AN input(PIN_J0) // A Vypinac svetlo Kaklik stred u dveri na chodbu |
|
|
88 |
#define IR202ND input(PIN_J1) // B Vypinac roleta Kaklik dolu u dveri |
|
|
89 |
#define IR202NU input(PIN_J2) // C Vypinac roleta Kaklik nahoru u dveri |
|
|
90 |
#define IS205A input(PIN_J3) // D Vypinac svetlo puda |
|
|
91 |
#define IS204AJ input(PIN_J4) // E Vypinac svetlo radiomistnost u dveri na chodbu |
|
|
92 |
#define IR204ZD input(PIN_J5) // F Vypinac roleta radiomistnost dolu |
|
|
93 |
#define IR204ZU input(PIN_J6) // G Vypinac roleta radiomistnost nahoru |
|
|
94 |
//#define I.... input(PIN_J7) // H |
|
|
95 |
|
2080 |
kakl |
96 |
int1 s201AV; |
|
|
97 |
int1 s201AZ; |
|
|
98 |
int1 s207AJ; |
|
|
99 |
int1 s203AJ; |
|
|
100 |
int1 s209AJ; |
|
|
101 |
int1 r207VU; |
|
|
102 |
int1 r207VD; |
2084 |
kakl |
103 |
int1 s202AN; |
|
|
104 |
int1 r202ND; |
|
|
105 |
int1 r202NU; |
|
|
106 |
int1 s205A; |
|
|
107 |
int1 s204AJ; |
|
|
108 |
int1 r204ZD; |
|
|
109 |
int1 r204ZU; |
1746 |
kakl |
110 |
|
1747 |
kakl |
111 |
#bit CREN = 0xFAB.4 // USART enable register |
|
|
112 |
|
2080 |
kakl |
113 |
#define LED1 PIN_C0 |
|
|
114 |
#define LED2 PIN_C1 |
1746 |
kakl |
115 |
|
|
|
116 |
#define ON(port) output_low(port); |
|
|
117 |
#define OFF(port) output_high(port); |
|
|
118 |
|
1747 |
kakl |
119 |
typedef enum {GO_UP, GO_DOWN, REVERS_UP, REVERS_DOWN, STOP} state; |
1746 |
kakl |
120 |
|
2084 |
kakl |
121 |
state r103V, r110N, r104V, r104J, r207V, r202J, r204Z; // Stavy rolet |
|
|
122 |
int8 tr103V, tr110N, tr104V, tr104J, tr207V, tr202J, tr204Z; // Casovace rolet |
1748 |
kakl |
123 |
int8 timer; // Casovac komunikace |
1747 |
kakl |
124 |
|
|
|
125 |
#int_TIMER0 |
|
|
126 |
void TIMER0_isr(void) |
|
|
127 |
{ |
1748 |
kakl |
128 |
if(tr103V>0) tr103V--; |
|
|
129 |
if(tr110N>0) tr110N--; |
|
|
130 |
if(tr104V>0) tr104V--; |
|
|
131 |
if(tr104J>0) tr104J--; |
2080 |
kakl |
132 |
if(tr207V>0) tr207V--; |
2084 |
kakl |
133 |
if(tr202J>0) tr202J--; |
|
|
134 |
if(tr204Z>0) tr204Z--; |
1748 |
kakl |
135 |
if(timer>0) timer--; |
1747 |
kakl |
136 |
output_toggle(LED2); |
|
|
137 |
} |
|
|
138 |
|
|
|
139 |
void up(state *status, int8 *timer) // Zmena stavu rolety smer nahoru |
|
|
140 |
{ |
|
|
141 |
switch (*status) |
|
|
142 |
{ |
|
|
143 |
case STOP: |
|
|
144 |
case GO_DOWN: |
|
|
145 |
*status=REVERS_UP; |
|
|
146 |
*timer=REVERS; |
|
|
147 |
break; |
|
|
148 |
case REVERS_UP: |
|
|
149 |
case GO_UP: |
|
|
150 |
*status=STOP; |
|
|
151 |
*timer=0; |
|
|
152 |
break; |
|
|
153 |
} |
|
|
154 |
} |
|
|
155 |
|
|
|
156 |
void down(state *status, int8 *timer) // Zmena stavu rolety smer dolu |
|
|
157 |
{ |
|
|
158 |
switch (*status) |
|
|
159 |
{ |
|
|
160 |
case STOP: |
|
|
161 |
case GO_UP: |
|
|
162 |
*status=REVERS_DOWN; |
|
|
163 |
*timer=REVERS; |
|
|
164 |
break; |
|
|
165 |
case REVERS_DOWN: |
|
|
166 |
case GO_DOWN: |
|
|
167 |
*status=STOP; |
|
|
168 |
*timer=0; |
|
|
169 |
break; |
|
|
170 |
} |
|
|
171 |
} |
|
|
172 |
|
|
|
173 |
#define run(x) { \ |
|
|
174 |
switch(r##x) \ |
|
|
175 |
{ \ |
|
|
176 |
case STOP: \ |
2080 |
kakl |
177 |
OFF(OR##x##U); \ |
|
|
178 |
OFF(OR##x##D); \ |
1747 |
kakl |
179 |
break; \ |
|
|
180 |
case GO_UP: \ |
2080 |
kakl |
181 |
OFF(OR##x##D); \ |
|
|
182 |
ON(OR##x##U); \ |
1747 |
kakl |
183 |
if(tr##x==0) {r##x=STOP;} \ |
|
|
184 |
break; \ |
|
|
185 |
case GO_DOWN: \ |
2080 |
kakl |
186 |
OFF(OR##x##U); \ |
|
|
187 |
ON(OR##x##D); \ |
1747 |
kakl |
188 |
if(tr##x==0) {r##x=STOP;} \ |
|
|
189 |
break; \ |
|
|
190 |
case REVERS_UP: \ |
2080 |
kakl |
191 |
OFF(OR##x##U); \ |
|
|
192 |
OFF(OR##x##D); \ |
1747 |
kakl |
193 |
if(tr##x==0) {r##x=GO_UP; tr##x=GO;} \ |
|
|
194 |
break; \ |
|
|
195 |
case REVERS_DOWN: \ |
2080 |
kakl |
196 |
OFF(OR##x##U); \ |
|
|
197 |
OFF(OR##x##D); \ |
1747 |
kakl |
198 |
if(tr##x==0) {r##x=GO_DOWN; tr##x=GO;} \ |
|
|
199 |
break; \ |
|
|
200 |
} \ |
|
|
201 |
} |
|
|
202 |
|
1746 |
kakl |
203 |
void main() |
|
|
204 |
{ |
2085 |
kakl |
205 |
char buf[10]; // Buffer pro prijem prikazu |
2153 |
kakl |
206 |
unsigned int16 zakmity=0; // Osetreni zakmitu vypinacu |
1746 |
kakl |
207 |
|
1748 |
kakl |
208 |
setup_adc_ports(NO_ANALOGS|VSS_VDD); |
|
|
209 |
setup_adc(ADC_CLOCK_DIV_2); |
|
|
210 |
setup_psp(PSP_DISABLED); |
|
|
211 |
setup_spi(SPI_SS_DISABLED); |
|
|
212 |
setup_wdt(WDT_OFF); |
2085 |
kakl |
213 |
setup_timer_0(RTCC_INTERNAL|RTCC_DIV_8); |
1748 |
kakl |
214 |
setup_timer_1(T1_DISABLED); |
|
|
215 |
setup_timer_2(T2_DISABLED,0,1); |
|
|
216 |
setup_timer_3(T3_DISABLED|T3_DIV_BY_1); |
|
|
217 |
setup_ccp1(CCP_OFF); |
|
|
218 |
setup_comparator(NC_NC_NC_NC); |
|
|
219 |
setup_vref(FALSE); |
2085 |
kakl |
220 |
|
|
|
221 |
set_tris_a(0); // Vystupy |
|
|
222 |
set_tris_b(0); |
|
|
223 |
set_tris_e(0); |
|
|
224 |
set_tris_f(0); |
|
|
225 |
set_tris_d(0xFF); // Vstupy |
|
|
226 |
set_tris_j(0xFF); |
1747 |
kakl |
227 |
|
2080 |
kakl |
228 |
output_a(0xFF); // Vsechno zhasni a zastav |
|
|
229 |
output_b(0xFF); |
|
|
230 |
output_f(0xFF); |
|
|
231 |
output_e(0xFF); |
1747 |
kakl |
232 |
|
1748 |
kakl |
233 |
r103V=STOP; // Rolety jsou zastaveny |
|
|
234 |
r110N=STOP; |
|
|
235 |
r104V=STOP; |
|
|
236 |
r104J=STOP; |
2080 |
kakl |
237 |
r207V=STOP; |
2084 |
kakl |
238 |
r202J=STOP; |
|
|
239 |
r204Z=STOP; |
1749 |
kakl |
240 |
tr103V=0; |
|
|
241 |
tr110N=0; |
|
|
242 |
tr104V=0; |
|
|
243 |
tr104J=0; |
2080 |
kakl |
244 |
tr207V=0; |
2084 |
kakl |
245 |
tr202J=0; |
|
|
246 |
tr204Z=0; |
1749 |
kakl |
247 |
|
2081 |
kakl |
248 |
{ |
|
|
249 |
int n; |
|
|
250 |
|
|
|
251 |
for(n=0;n<10;n++) |
|
|
252 |
{ |
|
|
253 |
output_low(LED1); // Indikace restartu (pockame na nabiti kondenzatoru ve vstupnich obvodech) |
|
|
254 |
delay_ms(100); |
|
|
255 |
output_high(LED1); |
|
|
256 |
delay_ms(100); |
|
|
257 |
restart_wdt(); |
|
|
258 |
} |
|
|
259 |
} |
1746 |
kakl |
260 |
|
2080 |
kakl |
261 |
s201AV=IS201AV; // Precteme vychozi stav vypinacu |
|
|
262 |
s201AZ=IS201AZ; |
|
|
263 |
s207AJ=IS207AJ; |
|
|
264 |
s203AJ=IS203AJ; |
|
|
265 |
s209AJ=IS209AJ; |
|
|
266 |
r207VU=IR207VU; |
|
|
267 |
r207VD=IR207VD; |
2084 |
kakl |
268 |
s202AN=IS202AN; |
|
|
269 |
r202ND=IR202ND; |
|
|
270 |
r202NU=IR202NU; |
|
|
271 |
s205A=IS205A; |
|
|
272 |
s204AJ=IS204AJ; |
|
|
273 |
r204ZD=IR204ZD; |
|
|
274 |
r204ZU=IR204ZU; |
2081 |
kakl |
275 |
|
|
|
276 |
CREN=0; CREN=1; // Reinitialise USART |
2080 |
kakl |
277 |
|
1748 |
kakl |
278 |
enable_interrupts(INT_TIMER0); |
|
|
279 |
enable_interrupts(GLOBAL); |
2081 |
kakl |
280 |
|
1746 |
kakl |
281 |
while(TRUE) |
|
|
282 |
{ |
2085 |
kakl |
283 |
restart_wdt(); |
1748 |
kakl |
284 |
|
|
|
285 |
if(kbhit()) // Chce po nas nekdo neco? |
1746 |
kakl |
286 |
{ |
1748 |
kakl |
287 |
buf[0]=getc(); |
|
|
288 |
if((buf[0]=='S')||(buf[0]=='R')) // Jinym znakem nesmi zacinat prikaz |
1746 |
kakl |
289 |
{ |
1748 |
kakl |
290 |
int8 n=0; // Ukazatel do prijimaciho bufferu |
|
|
291 |
timer=RECEIVE; // Timeout pro prijem znaku |
|
|
292 |
|
|
|
293 |
do |
1746 |
kakl |
294 |
{ |
1748 |
kakl |
295 |
if(kbhit()) // Je dalsi znak? |
1747 |
kakl |
296 |
{ |
1748 |
kakl |
297 |
n++; |
|
|
298 |
buf[n]=getc(); |
1747 |
kakl |
299 |
} |
1748 |
kakl |
300 |
} while ((buf[n]!='\r')&&(timer>0)&&(n<7)); |
|
|
301 |
|
|
|
302 |
if (timer==0) { CREN=0; CREN=1; } // Reinitialise USART |
|
|
303 |
|
|
|
304 |
output_toggle(LED1); // Ukonceni prijimani prikazu |
|
|
305 |
|
|
|
306 |
if((timer>0)) |
1746 |
kakl |
307 |
{ |
1748 |
kakl |
308 |
|
|
|
309 |
if((buf[0]=='S')&&(n>=4)) // Zmena stavu svetla |
1747 |
kakl |
310 |
{ |
1748 |
kakl |
311 |
if(buf[1]=='1') |
|
|
312 |
{ |
|
|
313 |
switch(buf[2]) |
|
|
314 |
{ |
|
|
315 |
case '2': |
2080 |
kakl |
316 |
output_toggle(OS102A); |
1748 |
kakl |
317 |
break; |
|
|
318 |
case '3': |
2080 |
kakl |
319 |
output_toggle(OS103J); |
1748 |
kakl |
320 |
break; |
|
|
321 |
case '4': |
2080 |
kakl |
322 |
output_toggle(OS104A); |
1748 |
kakl |
323 |
break; |
|
|
324 |
case '5': |
2080 |
kakl |
325 |
if(buf[3]=='A') {output_toggle(OS105A);} |
|
|
326 |
if(buf[3]=='Z') {output_toggle(OS105Z);} |
1748 |
kakl |
327 |
break; |
|
|
328 |
case '6': |
2080 |
kakl |
329 |
output_toggle(OS106A); |
1748 |
kakl |
330 |
break; |
|
|
331 |
case '7': |
2080 |
kakl |
332 |
output_toggle(OS107A); |
1748 |
kakl |
333 |
break; |
|
|
334 |
case '8': |
2080 |
kakl |
335 |
// output_toggle(OS108A); |
1748 |
kakl |
336 |
break; |
|
|
337 |
case '9': |
2080 |
kakl |
338 |
output_toggle(OS109A); |
1748 |
kakl |
339 |
break; |
|
|
340 |
case 'a': |
2080 |
kakl |
341 |
// output_toggle(OS110J); |
|
|
342 |
output_toggle(OS110N); |
1748 |
kakl |
343 |
break; |
|
|
344 |
} |
|
|
345 |
} |
1747 |
kakl |
346 |
} |
1748 |
kakl |
347 |
|
|
|
348 |
if((buf[0]=='R')&&(n>=5)) // Zmena stavu rolety |
|
|
349 |
{ |
|
|
350 |
if(buf[1]=='1') |
|
|
351 |
{ |
|
|
352 |
switch(buf[2]) |
|
|
353 |
{ |
|
|
354 |
case '3': |
|
|
355 |
if(buf[4]=='U') {up(&r103V,&tr103V);} else {down(&r103V,&tr103V);} |
|
|
356 |
break; |
|
|
357 |
case '4': |
|
|
358 |
if(buf[3]=='V') if((buf[4]=='U')) {up(&r104V,&tr104V);} else {down(&r104V,&tr104V);} |
|
|
359 |
if(buf[3]=='J') if((buf[4]=='U')) {up(&r104J,&tr104J);} else {down(&r104J,&tr104J);} |
|
|
360 |
break; |
|
|
361 |
case 'a': |
|
|
362 |
if((buf[4]=='U')) {up(&r110N,&tr110N);} else {down(&r110N,&tr110N);} |
|
|
363 |
break; |
|
|
364 |
} |
|
|
365 |
} |
|
|
366 |
} |
|
|
367 |
|
1746 |
kakl |
368 |
} |
|
|
369 |
} |
|
|
370 |
} |
1748 |
kakl |
371 |
|
|
|
372 |
run(103V); // Rizeni rolet za behu |
2080 |
kakl |
373 |
// run(104V); |
1748 |
kakl |
374 |
run(104J); |
2080 |
kakl |
375 |
run(207V); |
2084 |
kakl |
376 |
run(202J); |
|
|
377 |
run(204Z); |
1747 |
kakl |
378 |
|
1748 |
kakl |
379 |
switch(r110N) // Zaluzie ma specielni rizeni |
|
|
380 |
{ |
|
|
381 |
case STOP: |
2080 |
kakl |
382 |
OFF(OR110NU); |
|
|
383 |
OFF(OR110ND); |
1748 |
kakl |
384 |
break; |
|
|
385 |
case GO_UP: |
2080 |
kakl |
386 |
OFF(OR110ND); |
|
|
387 |
ON(OR110NU); |
1748 |
kakl |
388 |
if(tr110N==0) {r110N=STOP;} |
|
|
389 |
break; |
|
|
390 |
case GO_DOWN: |
2080 |
kakl |
391 |
OFF(OR110NU); |
|
|
392 |
ON(OR110ND); |
1748 |
kakl |
393 |
if(tr110N==0) {r110N=STOP;} |
|
|
394 |
break; |
|
|
395 |
case REVERS_UP: |
2080 |
kakl |
396 |
OFF(OR110NU); |
|
|
397 |
OFF(OR110ND); |
1749 |
kakl |
398 |
if(tr110N==0) {r110N=GO_UP; tr110N=GO_ZALUZIE;} // Nahoru pouze kratce na otevreni zaluzie |
1748 |
kakl |
399 |
break; |
|
|
400 |
case REVERS_DOWN: |
2080 |
kakl |
401 |
OFF(OR110NU); |
|
|
402 |
OFF(OR110ND); |
|
|
403 |
if(tr110N==0) {r110N=GO_DOWN; tr110N=GO_ZALUZIE;} // Dolu take kratce pouze na zaklopeni zaluzie |
1748 |
kakl |
404 |
break; |
|
|
405 |
} |
2080 |
kakl |
406 |
|
|
|
407 |
// mistni vypinace z 2. n.p. |
2085 |
kakl |
408 |
if (0==zakmity) |
|
|
409 |
{ |
|
|
410 |
if(s201AV!=IS201AV) {s201AV=IS201AV; output_toggle(OS102A); zakmity=ZAKMIT;} |
|
|
411 |
if(s201AZ!=IS201AZ) {s201AZ=IS201AZ; output_toggle(OS102A); zakmity=ZAKMIT;} |
|
|
412 |
if(s207AJ!=IS207AJ) {s207AJ=IS207AJ; output_toggle(OS207A); zakmity=ZAKMIT;} |
|
|
413 |
if(s203AJ!=IS203AJ) {s203AJ=IS203AJ; output_toggle(OS203A); zakmity=ZAKMIT;} |
|
|
414 |
if(s209AJ!=IS209AJ) {s209AJ=IS209AJ; output_toggle(OS209A); zakmity=ZAKMIT;} |
|
|
415 |
if(s205A!=IS205A) {s205A=IS205A; output_toggle(OS205A); zakmity=ZAKMIT;} |
|
|
416 |
if(s204AJ!=IS204AJ) {s204AJ=IS204AJ; output_toggle(OS204A); zakmity=ZAKMIT;} |
|
|
417 |
if(s202AN!=IS202AN) {s202AN=IS202AN; output_toggle(OS202A); zakmity=ZAKMIT;} |
|
|
418 |
|
|
|
419 |
if(r207VU!=IR207VU) {r207VU=IR207VU; up(&r207V,&tr207V); zakmity=ZAKMIT;} |
|
|
420 |
if(r207VD!=IR207VD) {r207VD=IR207VD; down(&r207V,&tr207V); zakmity=ZAKMIT;} |
|
|
421 |
if(r202NU!=IR202NU) {r202NU=IR202NU; up(&r202J,&tr202J); zakmity=ZAKMIT;} |
|
|
422 |
if(r202ND!=IR202ND) {r202ND=IR202ND; down(&r202J,&tr202J); zakmity=ZAKMIT;} |
|
|
423 |
if(r204ZU!=IR204ZU) {r204ZU=IR204ZU; up(&r204Z,&tr204Z); zakmity=ZAKMIT;} |
|
|
424 |
if(r204ZD!=IR204ZD) {r204ZD=IR204ZD; down(&r204Z,&tr204Z); zakmity=ZAKMIT;} |
|
|
425 |
} |
|
|
426 |
else zakmity--; |
1746 |
kakl |
427 |
} |
|
|
428 |
} |