Mercurial > ~darius > hgwebdir.cgi > tempctrl
comparison 1wire.h @ 75:39d629c7d935
Change error #define's so that they are outside the range the DS1820 can report.
author | darius@Inchoate |
---|---|
date | Wed, 21 Jan 2009 22:50:43 +1030 |
parents | 1ef17cd8af7a |
children | 4abce5954d25 |
comparison
equal
deleted
inserted
replaced
74:e3d1f56ba0c8 | 75:39d629c7d935 |
---|---|
78 /* Family codes */ | 78 /* Family codes */ |
79 #define OW_FAMILY_ROM 0x09 | 79 #define OW_FAMILY_ROM 0x09 |
80 #define OW_FAMILY_TEMP 0x10 | 80 #define OW_FAMILY_TEMP 0x10 |
81 | 81 |
82 /* Return codes for OWGetTemp */ | 82 /* Return codes for OWGetTemp */ |
83 /* XXX: make bigger otherwise we can't handle stuff below -10C */ | 83 #define OW_TEMP_BADVAL -6000 |
84 #define OW_TEMP_BADVAL -1000 | 84 #define OW_TEMP_WRONG_FAM -6001 |
85 #define OW_TEMP_WRONG_FAM -1000 | 85 #define OW_TEMP_CRC_ERR -6002 |
86 #define OW_TEMP_CRC_ERR -1001 | 86 #define OW_TEMP_NO_ROM -6003 |
87 #define OW_TEMP_NO_ROM -1002 | |
88 | 87 |
89 /* Helpers for OWGetTemp's number system */ | 88 /* Helpers for OWGetTemp's number system */ |
90 #define GETWHOLE(x) ((x) / 100) | 89 #define GETWHOLE(x) ((x) / 100) |
91 #define GETFRAC(x) abs((x) - (GETWHOLE(x) * 100)) | 90 #define GETFRAC(x) abs((x) - (GETWHOLE(x) * 100)) |