-
Notifications
You must be signed in to change notification settings - Fork 52
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
Retrieve supported display modes for device #155
Comments
@rm-hull I was thinking about something like a For example, for [(160, 80), (160, 128), (128, 128)] For {
(128, 128): dict(multiplex=0xFF, displayoffset=0x02),
(128, 64): dict(multiplex=0x3F, displayoffset=0x00),
(128, 32): dict(multiplex=0x20, displayoffset=0x0F)
} Like the previous example, it should return a list: [(128, 128), (128, 64), (128, 32)] but with some more metadata, so not a tuple but perhaps a dict with width/height keys? Thoughts? |
What or how would you make use of I think in principle, yes we could readily add that to every device class (possibly as a class method?) but I’m wondering how a program could actually make use of it, because mostly if you have a display you almost certainly know up-front what the size is. |
I would use it in the luma.examples, and show what sizes are supported in the error message. And yea overall it's cleaner to have it in a central place, I often check the source code what sizes are supported and having it in a general place across all luma devices would be nice. It's actually surprising to me that not having it central/in place since day one, and that it's an afterthought in the API. I guess this indicates it also not as important to have but still. It's mostly a refactor thing to make things uniform. |
Would be nice to have a unified API that returns the supported display modes for a certain device. Right now these values are hardcoded and impossible to retrieve, e.g.
The text was updated successfully, but these errors were encountered: