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 1289 2009-01-08 19:13:06Z kakl $" |
3 |
#define ID "$Id: irmrak4.c 1290 2009-01-08 19:23:15Z kakl $" |
4 |
#include "irmrak4.h" |
4 |
#include "irmrak4.h" |
5 |
|
5 |
|
6 |
#CASE // Case sensitive compiler |
6 |
#CASE // Case sensitive compiler |
7 |
|
7 |
|
8 |
#define MAXHEAT 20 // Number of cycles for heating |
8 |
#define MAXHEAT 20 // Number of cycles for heating |
Line 134... |
Line 134... |
134 |
if (safety_counter>=SAFETY_COUNT) |
134 |
if (safety_counter>=SAFETY_COUNT) |
135 |
{ |
135 |
{ |
136 |
if (heat>0) heat--; |
136 |
if (heat>0) heat--; |
137 |
if (open>0) open--; |
137 |
if (open>0) open--; |
138 |
|
138 |
|
- |
|
139 |
if (heat>0) { output_high(HEATING); } else { output_low(HEATING); } |
- |
|
140 |
|
139 |
safety_counter=0; |
141 |
safety_counter=0; |
140 |
//---WDT |
142 |
//---WDT |
141 |
restart_wdt(); |
143 |
restart_wdt(); |
142 |
} |
144 |
} |
143 |
} while (!kbhit()&&!repeat); |
145 |
} while (!kbhit()&&!repeat); |
Line 211... |
Line 213... |
211 |
j=0; while(output[j]!=0) { delay(SEND_DELAY); putc(output[j++]); } |
213 |
j=0; while(output[j]!=0) { delay(SEND_DELAY); putc(output[j++]); } |
212 |
sprintf(output,"%u\n\r\0", open); |
214 |
sprintf(output,"%u\n\r\0", open); |
213 |
j=0; while(output[j]!=0) { delay(SEND_DELAY); putc(output[j++]); } |
215 |
j=0; while(output[j]!=0) { delay(SEND_DELAY); putc(output[j++]); } |
214 |
} |
216 |
} |
215 |
|
217 |
|
216 |
if(heat>0) { output_high(HEATING); } else { output_low(HEATING); } |
- |
|
217 |
|
- |
|
218 |
delay(MEASURE_DELAY); // Delay to a next measurement |
218 |
delay(MEASURE_DELAY); // Delay to a next measurement |
219 |
//---WDT |
219 |
//---WDT |
220 |
restart_wdt(); |
220 |
restart_wdt(); |
221 |
} |
221 |
} |
222 |
} |
222 |
} |