diff 1wire.h @ 65:1ef17cd8af7a

Tab to space conversion in usage text.
author darius@Inchoate
date Sun, 18 Jan 2009 20:03:24 +1030
parents 94f71ddb0cda
children 39d629c7d935
line wrap: on
line diff
--- a/1wire.h	Sun Jan 18 18:04:01 2009 +1030
+++ b/1wire.h	Sun Jan 18 20:03:24 2009 +1030
@@ -80,6 +80,7 @@
 #define OW_FAMILY_TEMP		0x10
 
 /* Return codes for OWGetTemp */
+/* XXX: make bigger otherwise we can't handle stuff below -10C */
 #define OW_TEMP_BADVAL		-1000
 #define OW_TEMP_WRONG_FAM	-1000
 #define OW_TEMP_CRC_ERR		-1001
@@ -87,4 +88,4 @@
 
 /* Helpers for OWGetTemp's number system */
 #define GETWHOLE(x)	((x) / 100)
-#define GETFRAC(x)	((x) - (GETWHOLE(x) * 100))
+#define GETFRAC(x)	abs((x) - (GETWHOLE(x) * 100))