Rev 1282 Rev 1283
Line 1... Line 1...
1 /**** IR Mrakomer 4 ****/ 1 /**** IR Mrakomer 4 ****/
2 #define VERSION "4.0" 2 #define VERSION "4.0"
3 #define ID "$Id: irmrak4.c 1282 2009-01-07 13:07:23Z kakl $" 3 #define ID "$Id: irmrak4.c 1283 2009-01-07 14:07:16Z kakl $"
4 #include "irmrak4.h" 4 #include "irmrak4.h"
5   5  
6 #define MAXHEAT 20 // Number of cycles for heating 6 #define MAXHEAT 20 // Number of cycles for heating
7 #define MAXOPEN 20 // Number of cycles for dome open 7 #define MAXOPEN 20 // Number of cycles for dome open
8 #define MEASURE_DELAY 10000 // Delay to a next measurement 8 #define MEASURE_DELAY 10000 // Delay to a next measurement
Line 88... Line 88...
88 setup_timer_1(T1_DISABLED); 88 setup_timer_1(T1_DISABLED);
89 setup_timer_2(T2_DISABLED,0,1); 89 setup_timer_2(T2_DISABLED,0,1);
90 setup_comparator(NC_NC_NC_NC); 90 setup_comparator(NC_NC_NC_NC);
91 setup_vref(FALSE); 91 setup_vref(FALSE);
92 // setup_oscillator(OSC_4MHZ|OSC_INTRC,+2); // Pokud je nutna kalibrace RCosc 92 // setup_oscillator(OSC_4MHZ|OSC_INTRC,+2); // Pokud je nutna kalibrace RCosc
93 setup_oscillator(OSC_4MHZ|OSC_INTRC); 93 setup_oscillator(OSC_8MHZ|OSC_INTRC);
94   94  
95 delay_ms(1000); 95 delay_ms(1000);
96 restart_wdt(); 96 restart_wdt();
97 printf("\n\r* Mrakomer %s (C) 2007 KAKL *\n\r",VER); // Welcome message 97 printf("\n\r* Mrakomer %s (C) 2007 KAKL *\n\r",VER); // Welcome message
98 printf("* %s *\n\r",REV); 98 printf("* %s *\n\r",REV);
Line 188... Line 188...
188 j=0; while(output[j]!=0) { delay(SEND_DELAY); putc(output[j++]); } 188 j=0; while(output[j]!=0) { delay(SEND_DELAY); putc(output[j++]); }
189 sprintf(output,"%Ld ", ta); 189 sprintf(output,"%Ld ", ta);
190 j=0; while(output[j]!=0) { delay(SEND_DELAY); putc(output[j++]); } 190 j=0; while(output[j]!=0) { delay(SEND_DELAY); putc(output[j++]); }
191 sprintf(output,"%Ld ", to); 191 sprintf(output,"%Ld ", to);
192 j=0; while(output[j]!=0) { delay(SEND_DELAY); putc(output[j++]); } 192 j=0; while(output[j]!=0) { delay(SEND_DELAY); putc(output[j++]); }
193 sprintf(output,"%u", heat); 193 sprintf(output,"%u ", heat);
194 j=0; while(output[j]!=0) { delay(SEND_DELAY); putc(output[j++]); } 194 j=0; while(output[j]!=0) { delay(SEND_DELAY); putc(output[j++]); }
195 sprintf(output,"%u\n\r\0", open); 195 sprintf(output,"%u\n\r\0", open);
196 j=0; while(output[j]!=0) { delay(SEND_DELAY); putc(output[j++]); } 196 j=0; while(output[j]!=0) { delay(SEND_DELAY); putc(output[j++]); }
197 } 197 }
198   198