LukeUSMC / ds18b20-photon

Dallas One-Wire temp sensor DS18XXX Particle Photon
MIT License
13 stars 32 forks source link

Migrate Libs2.0, add single drop option, destructor and single drop sample #8

Closed ScruffR closed 7 years ago

ScruffR commented 7 years ago

Since most people start off with only one sensor on the bus, the extra effort for addressing can be omitted with the singleDrop parameter in the constructor. I also added a destructor that deletes the OneWire object to prevent possible mem leaks. I replaced the local OneWire lib with a Libs 2.0 dependency against the official Particle OneWire lib. This was a by-product of the Libs 2.0 migration.

A possible next step could be a rework of the ds18b20_test sample to only search the address per sensor once and then reuse the once found address. This will increase stability especially after deep sleep.

ScruffR commented 7 years ago

Currently this lib does not build with 2.0 projects anymore due to the ../ includes.

If you can't or don't want to, can we take ownership of this library for Particle Elite?

LukeUSMC commented 7 years ago

You can take ownership. I wish I could say I can stay on top of it but I have plenty going on and hate that it may create problems for other people. Let me know what I need to do! Thanks.

ScruffR commented 7 years ago

Thanks! You won't need to do anything. Particle will transfer the ownership to a repo that's owned by the Elites so that the burden of keeping the lib up to can be spread on multiple shoulders.