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