Closed slavkoja closed 7 years ago
Sure, it is better to throw an exception out of the get_temperature()
method. It is easy to fix but let me check the change doesn't break things in my projects.
If you need the fix right now -- in pydigitemp/digitemp/device/termometer.py
just remove outer try...except block in get_temperature()
. It is lines 68, 82-84.
Thanks for quick response, i don't need the fix immediately, but thanks for suggestion, i can test it ;-)
BTW, do want to include here schematics (UART <-> 1-wire) in SVG format? I can provide them.
Sure, that would be great!
Hi,
in my simple test program i have:
The sensors list is list of
DS18B20()
objects...I use it to test different UART <-> 1-wire circuits and i sometime get "Read/Write error", the problem is, that it is not an exception, but it appears as stdin (or perhaps stderr) output. Here is example two readings of two sensors, one without error and one with error:
It seems, that the
get_temperature()
doesn't raise this exception, but only reports text and this is problem to catch. I try to find, where this printing happens, but i lost in code. Please, can you implement raising this error instead printing, to one can catch it in try .. except block?