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

InkyMockImpression class doesn't easily support multiple resolutions #168

Open
corranwebster opened this issue May 20, 2023 · 0 comments
Open

Comments

@corranwebster
Copy link
Contributor

When testing, the InkyMockImpression class currently only supports 600 x 448 (which I think is 5.7 inch). You can override the class attributes WIDTH and HEIGHT to change this, but this is less than ideal.

Ideally the resolution could be passed in to the constructor as it is in the actual class being mocked, so you could do something like:

display = InkyMockImpression((800, 480))

to mock the 7.3 inch Inky Impression.

corranwebster added a commit to corranwebster/inky that referenced this issue May 20, 2023
This permits simpler setting of the size of the Inky Impression being mocked.

For example, this allows:
``` python
display = InkyMockImpression((800, 480))
```
which will ensure that the buffer size gets set up correctly.

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

Successfully merging a pull request may close this issue.

1 participant