Rev 1586 Rev 1587
Line 1... Line 1...
1 /**** IR Mrakomer - special version for BART ****/ 1 /**** IR Mrakomer - special version for BART ****/
2 #define VERSION "2.2" 2 #define VERSION "2.2"
3 #define ID "$Id: irmrak4.c 1586 2010-08-22 08:35:33Z kakl $" 3 #define ID "$Id: irmrak4.c 1587 2010-08-22 09:25:53Z kakl $"
4   4  
5 #include "irmrak4.h" 5 #include "irmrak4.h"
6   6  
7 #bit CREN = 0x18.4 // USART registers 7 #bit CREN = 0x18.4 // USART registers
8 #bit SPEN = 0x18.7 8 #bit SPEN = 0x18.7
Line 40... Line 40...
40 printf("# f - Freezing. Switch Off Heating.\n\r"); 40 printf("# f - Freezing. Switch Off Heating.\n\r");
41 printf("# i - Print this Information.\n\r"); 41 printf("# i - Print this Information.\n\r");
42 printf("# 0..9 - Single measure at given angle.\n\r"); 42 printf("# 0..9 - Single measure at given angle.\n\r");
43 printf("# m - Measure at three space points.\n\r"); 43 printf("# m - Measure at three space points.\n\r");
44 printf("#\n\r"); 44 printf("#\n\r");
45 printf("$<Angle> <Ambient Temperature> <Space Temperature> ... <H> <Heating>"); 45 printf("#<Angle> <Ambient Temperature> <Space Temperature> ... <H> <Heating>");
46 printf("\n\r\n\r"); 46 printf("\n\r\n\r");
47 //---WDT 47 //---WDT
48 restart_wdt(); 48 restart_wdt();
49 } 49 }
50   50  
Line 136... Line 136...
136 case 'I': 136 case 'I':
137 welcome(); // Information about version, etc... 137 welcome(); // Information about version, etc...
138 break; 138 break;
139 } 139 }
140 printf("%c %Ld %Ld ", ch, ta, to); 140 printf("%c %Ld %Ld ", ch, ta, to);
141 if (('A'!=ch)&&('B'!=ch)&&('C'!=ch)&&('S'!=ch)) printf("H %u\r\n", heat); // Vzdycky se konci natocenim na Ground 141 if (('A'!=ch)&&('B'!=ch)&&('C'!=ch)&&('S'!=ch)) printf("T %u\r\n", heat); // Vzdycky se konci natocenim na Ground
142 } 142 }
143 delay_ms(1); 143 delay_ms(1);
144 if (timer>0) {timer--;} else {timer=1000;} 144 if (timer>0) {timer--;} else {timer=1000;}
145 if (heat>0) {if(1000==timer) heat--; output_high(HEATING);} else { output_low(HEATING); } 145 if (heat>0) {if(1000==timer) heat--; output_high(HEATING);} else { output_low(HEATING); }
146 } 146 }