periph / devices

Go·Hardware·Lean - Device drivers
https://periph.io
Apache License 2.0
85 stars 42 forks source link

ds18b20: support for DS18S20 #18

Closed bboehmke closed 3 years ago

bboehmke commented 3 years ago

This change add support for the DS18S20 to the ds18b20 package. I also added some tests for the temperature parsing based on values from the datasheets of the DS18B20 and the DS18S20.

Because the implementation of these 2 sensors are nearly identically I simply extended the ds18b20 package.

codecov-commenter commented 3 years ago

Codecov Report

Merging #18 (cf122b8) into main (b5024d6) will increase coverage by 0.1%. The diff coverage is 82.4%.

Impacted file tree graph

@@           Coverage Diff           @@
##            main     #18     +/-   ##
=======================================
+ Coverage   59.8%   59.9%   +0.1%     
=======================================
  Files         48      48             
  Lines       4331    4344     +13     
=======================================
+ Hits        2590    2601     +11     
- Misses      1608    1610      +2     
  Partials     133     133             
Impacted Files Coverage Δ
ds18b20/ds18b20.go 60.9% <82.4%> (+6.0%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update b5024d6...cf122b8. Read the comment docs.