bcl / digitemp

1-wire temperature sensor cmdline interface
GNU General Public License v2.0
37 stars 24 forks source link

DS9097 hotplug patches #12

Closed surr closed 7 years ago

surr commented 8 years ago

I'm using digitemp with USB serial adapter to monitor temperature under collectd. These paches are helping me to handle hotplug events.

bcl commented 8 years ago

Did you push the right branch? Those changes are to the DS9097 code. Also, I don't like using assert for something that could be a normal occurrence, I'd rather see it handled cleanly.

surr commented 8 years ago

Yes, the branch is right. I use these patches for more than two years, and I want to share them.

The intended use case is a passive 1-wire adapter on top of USB-serial device. My current setup is FT232R with one extra diode.

I agree, that using assert is a bad style for handling errors. But these asserts are harmless. They catch situations, that sould not happen at all. In the absence of proper error handling, these asserts do the real job.

Error handling code is still to be written.