periph / devices

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

waveshare213v2: Add support for partial drawing #38

Closed hansmi closed 2 years ago

hansmi commented 2 years ago

A series of changes bringing support for partial updates to the waveshare213v2 driver. Unittests are implemented to verify that the calculation of the various offsets is correct.

At the moment the partial updates are only useful when aligned to 8-pixel boundaries on the horizontal axis. A future series will bring flicker-free updates with pixel precision using the second image buffer as a mask (it's already working in an experimental implementation).

codecov-commenter commented 2 years ago

Codecov Report

Merging #38 (fae6891) into main (9b7814b) will increase coverage by 0.9%. The diff coverage is 34.1%.

Impacted file tree graph

@@           Coverage Diff           @@
##            main     #38     +/-   ##
=======================================
+ Coverage   61.4%   62.3%   +0.9%     
=======================================
  Files         53      55      +2     
  Lines       6681    6708     +27     
=======================================
+ Hits        4105    4179     +74     
+ Misses      2435    2388     -47     
  Partials     141     141             
Impacted Files Coverage Δ
waveshare2in13v2/errorhandler.go 0.0% <0.0%> (ø)
waveshare2in13v2/waveshare213v2.go 0.0% <0.0%> (-0.7%) :arrow_down:
waveshare2in13v2/drawing.go 100.0% <100.0%> (ø)

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 9b7814b...fae6891. Read the comment docs.

maruel commented 2 years ago

Thanks!