Line 11... |
Line 11... |
11 |
|
11 |
|
12 |
#include <string.h> |
12 |
#include <string.h> |
13 |
|
13 |
|
14 |
#CASE // Case sensitive compiler |
14 |
#CASE // Case sensitive compiler |
15 |
|
15 |
|
16 |
#define MAXHEAT 30 // Doba po kterou se topi v [s] |
16 |
#define MAXHEAT 20 // Doba po kterou se topi v [s] |
17 |
#define HEATING PIN_B3 // Heating for defrosting |
17 |
#define HEATING PIN_A2 // Heating for defrosting |
18 |
|
18 |
|
19 |
char VER[4]=VERSION; // Buffer for concatenate of a version string |
19 |
char VER[4]=VERSION; // Buffer for concatenate of a version string |
20 |
|
20 |
|
21 |
int8 heat; // Status variables |
21 |
int8 heat; // Status variables |
22 |
|
22 |
|
Line 31... |
Line 31... |
31 |
void welcome(void) // Welcome message |
31 |
void welcome(void) // Welcome message |
32 |
{ |
32 |
{ |
33 |
char REV[50]=ID; // Buffer for concatenate of a version string |
33 |
char REV[50]=ID; // Buffer for concatenate of a version string |
34 |
|
34 |
|
35 |
if (REV[strlen(REV)-1]=='$') REV[strlen(REV)-1]=0; |
35 |
if (REV[strlen(REV)-1]=='$') REV[strlen(REV)-1]=0; |
36 |
printf("\n\r\n\r# Mrakomer %s (C) 2007 KAKL\n\r",VER); // Welcome message |
36 |
printf("\n\r\n\r# Mrakomer %s (C) 2007-2010 KAKL\n\r",VER); // Welcome message |
37 |
printf("#%s\n\r",&REV[4]); |
37 |
printf("#%s\n\r",&REV[4]); |
38 |
printf("#\n\r"); |
38 |
printf("#\n\r"); |
39 |
printf("# h - Switch On Heating for 30s.\n\r"); |
39 |
printf("# h - Switch On Heating for 20s.\n\r"); |
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> ..."); |
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 |
|