periph / devices

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

[inky] Add Inky Impression 5.7" and 4" support #55

Closed caglar10ur closed 1 year ago

caglar10ur commented 1 year ago

Inky Impression is a 7 color ePaper/eInk HAT that comes as 5.7" (600 x 448 pixel) or 4" (640 x 400 pixel) variants.

This commit also refactors the existing 3 color Inky code a bit and adds additional auto-detection improvements.

Tested with 5.7" version.

maruel commented 1 year ago

Thanks! Will try to review tomorrow.

codecov-commenter commented 1 year ago

Codecov Report

Merging #55 (0de3494) into main (ae32059) will decrease coverage by 2.4%. The diff coverage is 0.0%.

@@           Coverage Diff           @@
##            main     #55     +/-   ##
=======================================
- Coverage   64.9%   62.5%   -2.4%     
=======================================
  Files         60      64      +4     
  Lines       7066    7337    +271     
=======================================
+ Hits        4583    4585      +2     
- Misses      2329    2598    +269     
  Partials     154     154             
Impacted Files Coverage Δ
inky/impression.go 0.0% <0.0%> (ø)
inky/inky.go 0.0% <0.0%> (ø)
inky/opts.go 0.0% <0.0%> (ø)
inky/types.go 0.0% <0.0%> (ø)
inky/types_string.go 0.0% <0.0%> (ø)
as7262/as7262.go 99.3% <0.0%> (+0.7%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

caglar10ur commented 1 year ago

Thanks for the review! Will address your comments (probably over the weekend) and ping you once it is ready for another pass.

caglar10ur commented 1 year ago

@maruel I believe this is now ready for another round of your review. Thanks.

Also I'm planning to squash the commits into one before merging, please let me know if that is not what you prefer.

maruel commented 1 year ago

I squash and rebase anyway, so you can squash if you want but it doesn't matter with what gets merged in.

caglar10ur commented 1 year ago

I squash and rebase anyway, so you can squash if you want but it doesn't matter with what gets merged in.

Great, will leave it as it is then. Some folks just merge without squash/rebase and I'm a not big fan of that :) Thanks

maruel commented 1 year ago

Please fix the err shadow. I know it's overly zealous but it's easier to enforce it wholesale than comment on the relevant cases in code review.

maruel commented 1 year ago

Thanks a lot!