It was a simple goof-up, not allowing for the possibility of a negative
temperature.
Here is a little patch that seems to fix it. It would actually be nice if
the owlib returned a decimal point on all temperatures, even those with
integer values, and with enough trailing zeroes to indicate the precision of
the measurement.
cmd: "cvs" -f diff "connection.py"
Index: connection.py
===================================================================
RCS file: /cvsroot/owfs/owfs/module/ownet/python/ownet/connection.py,v
retrieving revision 1.3
diff -r1.3 connection.py
31a32
import re
246c247,248
< if stripped.isdigit():
---
if re.compile('^-?\d+$').match(stripped) :
#if stripped.isdigit():
249c251,252
< if stripped.replace('.', '').isdigit():
---
if re.compile('^-?\d*\.\d*$').match(stripped) : # Could crash if it
matched '.' - let it.
#if stripped.replace('.', '').isdigit():
On 6/28/07, Doug Collinge <[EMAIL PROTECTED]> wrote:
I'm looking over the situation and will report when I have some
information.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers