-
Notifications
You must be signed in to change notification settings - Fork 257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve DS1820 driver #1382
base: main
Are you sure you want to change the base?
Improve DS1820 driver #1382
Conversation
Thanks for the extensions, will take a deeper look later. I would not do a conversion every second, from my point of view it's kind of "waste of ressources", if there is no special use case with very fast changing temperatures (and even then the sensor won't be able to follw so fast). But for sure its discussable - maybe simply add the interval as argument to the drivers call. |
New features: * Handle all types of DS1820 tempature sensors by detecting the family of the sensor and calculating the temperature accordingly * Clean up some log prints * Set the channel value with current temperature * Set the period of the conversion interval with an optional first parameter * Start the conversion instantly and not wait for multiple of the conversion period
I added an optional argument to the driver as you said 👍 |
- Output logging to `LOG_FEATURE_SENSOR` and not `CFG` as it would be expected - Created a macro `DS1820_LOG` to simplify logging statements. - Use the macro in various places throughout the driver
Very good work.
|
Co-authored-by: MaxineMuster <146550015+MaxineMuster@users.noreply.github.com>
New features: