Rev 240 Rev 245
Line 170... Line 170...
170 delay_ms(150); 170 delay_ms(150);
171 output_high(PIN_A4); 171 output_high(PIN_A4);
172 delay_ms(150); 172 delay_ms(150);
173   173  
174   174  
175 set_pwm1_duty(500); -  
176 set_pwm2_duty(500); -  
177   -  
178 fprintf(VRTULE,"ABABABABAB"); -  
179   -  
180   -  
181 /* if(check_new_sms()) // Je odpoved "OK"? 175 if(check_new_sms()) // Je odpoved "OK"?
182 { 176 {
183 // printf(lcd_putc,"736 655 250"); 177 // printf(lcd_putc,"736 655 250");
184 delay_ms(1000); 178 delay_ms(1000);
185 } 179 }
186 else 180 else
187 { 181 {
188 read_sms(); 182 read_sms();
189   183  
190 if (odp[0] == 'A' || odp[0] == 'a') 184 /* if (odp[0] == 'A' || odp[0] == 'a')
191 { 185 {
192 set_pwm1_duty(500); 186 set_pwm1_duty(500);
193 set_pwm2_duty(500); 187 set_pwm2_duty(500);
-   188 Delay_ms(10000);
-   189 fprintf(VRTULE,"JACK[BARmk"); // "JACK BAR :)"
-   190 Delay_ms(2000);
-   191 fprintf(VRTULE,"JACK[BARmk"); // "JACK BAR :)"
194 Delay_ms(5000); 192 Delay_ms(5000);
195 fprintf(VRTULE,"ABABABABAB"); -  
196 Delay_ms(20000); -  
197 set_pwm1_duty(0); 193 set_pwm1_duty(0);
198 set_pwm2_duty(0); 194 set_pwm2_duty(0);
-   195 }*/
-   196  
-   197 /* if (odp[1] == 'h')
199 } 198 {
-   199 set_pwm1_duty(500);
-   200 set_pwm2_duty(500);
-   201 Delay_ms(10000);
-   202 fprintf(VRTULE,"[ERROR[d[["); // " ERROR 3 "
-   203 Delay_ms(2000);
-   204 fprintf(VRTULE,"[ERROR[d[["); // " ERROR 3 "
-   205 Delay_ms(2000);
-   206 fprintf(VRTULE,"[OVERFLOW["); // " OVERFLOW "
-   207 Delay_ms(2000);
-   208 fprintf(VRTULE,"[OVERFLOW[");
-   209 Delay_ms(5000);
-   210 set_pwm1_duty(0);
-   211 set_pwm2_duty(0);
-   212 }*/
200   213  
201 if (odp[0] == 118 && odp[1] == 121 && odp[2] == 112 && odp[3]== 49) 214 if (odp[2] == 'o')
202 { 215 {
-   216 set_pwm1_duty(500);
-   217 set_pwm2_duty(500);
-   218 Delay_ms(10000);
-   219 fprintf(VRTULE,"[ERROR[e[["); // " ERROR 4 "
-   220 Delay_ms(2000);
-   221 fprintf(VRTULE,"[ERROR[e[["); // " ERROR 4 "
-   222 Delay_ms(2000);
-   223 fprintf(VRTULE,"[OPAKUJTE["); // " OPAKUJTE "
-   224 Delay_ms(2000);
203 fprintf(VRTULE,""); 225 fprintf(VRTULE,"[OPAKUJTE[");
204 } 226 Delay_ms(2000);
205   -  
206 if (odp[0] == 97 && odp[1] == 104 && odp[2] == 111 && odp[3]== 106) 227 fprintf(VRTULE,"[[VOLBU[[["); // " VOLBU "
207 { 228 Delay_ms(2000);
208 fprintf(VRTULE,""); 229 fprintf(VRTULE,"[[VOLBU[[[");
-   230 Delay_ms(5000);
-   231 set_pwm1_duty(0);
-   232 set_pwm2_duty(0);
209 } 233 }
210 } 234 }
211 /* read_time(); 235 read_time();
212 time=strtoul(odp,&ptr,10); 236 time=strtoul(odp,&ptr,10);
213 if((time >= 30 && time <= 35) || (time >= 0 && time <= 5)) 237 if((time >= 30 && time <= 35) || (time >= 0 && time <= 5))
214 { 238 {
215 set_pwm1_duty(500); 239 set_pwm1_duty(500);
216 set_pwm2_duty(500); 240 set_pwm2_duty(500);
217 } 241 }
218 else 242 else
219 { 243 {
220 set_pwm1_duty(0); 244 set_pwm1_duty(0);
221 set_pwm2_duty(0); 245 set_pwm2_duty(0);
222 }*/ 246 }
223   247  
224 delay_ms(1000); 248 delay_ms(1000);
225 } 249 }
226 } 250 }