Skip to content
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

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

Merged
merged 8 commits into from
Jan 16, 2023
Merged

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

merged 8 commits into from
Jan 16, 2023

Conversation

caglar10ur
Copy link
Contributor

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.

It is a 7 colour ePaper/eInk HAT that comes with 5.7" (600 x 448 pixel) or 4" )640 x 400 pixel).

Refactors the existing 3 color Inky and adds additional fields to
auto-detect via EEPROM.

Tested with 5.7" version.
@maruel
Copy link
Member

maruel commented Jan 9, 2023

Thanks! Will try to review tomorrow.

@codecov-commenter
Copy link

codecov-commenter commented Jan 9, 2023

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%) ⬆️

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

Copy link
Member

@maruel maruel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution! I have a few small nits, nothing huge.

inky/impression.go Outdated Show resolved Hide resolved
inky/types.go Outdated
// Use of this source code is governed under the Apache License, Version 2.0
// that can be found in the LICENSE file.

//go:generate stringer -type=Model,Color,ImpressionColor -output types_string.go
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You want an empty line after so it's not considered part of the package documentation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

inky/types.go Outdated Show resolved Hide resolved
inky/types.go Outdated Show resolved Hide resolved
inky/opts.go Outdated Show resolved Hide resolved
inky/opts.go Outdated Show resolved Hide resolved
inky/inky.go Outdated Show resolved Hide resolved
inky/inky.go Outdated Show resolved Hide resolved
inky/impression.go Outdated Show resolved Hide resolved
@caglar10ur
Copy link
Contributor Author

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

@caglar10ur
Copy link
Contributor Author

@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.

Copy link
Member

@maruel maruel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, the only blocker is to not pull the copyright into package doc. Please refer to https://go.dev/doc/comment. Thanks!

inky/opts.go Outdated
17: "Black wHAT (SSD1683)",
18: "Red wHAT (SSD1683)",
19: "Yellow wHAT (SSD1683)",
displayVariantMap = []string{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fun fact: you can make the slice an array with using [...] instead of [].

I don't think the () are useful but it's not a big deal.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed it to an array.

The () might be handy to distinguish boards with different IC drivers tbh. I haven't checked but there might be even material differences between them and the existing code may not work for new ones (they are 2 different implementations at https://github.com/pimoroni/inky ATM)

inky/types.go Show resolved Hide resolved
@maruel
Copy link
Member

maruel commented Jan 15, 2023

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

@caglar10ur
Copy link
Contributor Author

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
Copy link
Member

maruel commented Jan 16, 2023

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 maruel merged commit e271f7c into periph:main Jan 16, 2023
@maruel
Copy link
Member

maruel commented Jan 16, 2023

Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants