question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to manually set resolution when not detected properly when creating an AutoEPDDisplay object?

See original GitHub issue

I had to buy a loose driver board from WaveShare because I toasted the one supplied with a 9.7" panel. The board they sent works fine, but I think it’s set for 1600x1200 rather than the 1200x825 resolution of the 9.7" panel.

Up until I killed my stock driver board, I used the following code and it worked properly:

from IT8951.display import AutoEPDDisplay
from IT8951 import constants as constants_HD
myepd = AutoEPDDisplay(vcom=self.vcom)

Unfortunately, allowing AutoEPDDisplay to pull the width and height from the driver board results in AutoEPPDisplay pulling the resolution from the board and setting it to 1600x1200. All the images are clearly not formatted correctly; “partial…update” test falls mostly off the screen and the image of Tux is only about 1/4 on the display. Formerly this worked just fine.

$ python3 ./test.py                                                 
Initializing EPD...
VCOM set to -1.9
System info:
  display size: 1600x1200
  img buffer address: 119F00
  firmware version: WS_v.0.1
  LUT version: 6M14T

I can see that the __init__ in AutoEPDDisplay() class sets the property epd=EPD() and AutoDisplay() gets passed the epd.width, epd.height values. What I can’t figure out how to do is properly pass in the width and height arguments so that EPD() gets them.

I tried to set the width and height manually, but I’m clearly not doing things correctly as the resolution reports that it is correct, but the images are still not scaled correctly:

display =  AutoEPDDisplay(vcom=-1.90, rotate=args.rotate, spi_hz=24000000)
display.epd.width=1200
display.epd.height=825
$ python3 ./test.py
Initializing EPD...
VCOM set to -1.9
System info:
  display size: 1200x825
  img buffer address: 119F00
  firmware version: WS_v.0.1
  LUT version: 6M14T

Is there a way to do this?

Alternatively, do you have any idea how to bang the resolution into the board firmware?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
GregDMeyercommented, Oct 5, 2021

By the way, the line you mention originated from the .h file here, hopefully it can help!

https://github.com/waveshare/IT8951/blob/master/IT8951.h#L104

0reactions
txoofcommented, Oct 5, 2021

Maybe the folks over at the papertty project can give some insights. They’re hip-deep into the hardware over there.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Change your screen resolution in Windows
Change your screen resolution in Windows · Select Start > Settings > System > Display, and look at the section that shows your...
Read more >
Fix Screen Resolution Problem in Windows 10 [2022 Tutorial]
Many a time, mostly after an Update to Windows or installation of a new graphics card, you may not be able to adjust...
Read more >
My Monitor Won't Show the Correct Resolution Settings
Is your monitor not showing the correct resolution settings? In this article, we cover several possibilities that can cause this. Discover more here!...
Read more >
Change your Mac display's resolution
While it's best to use the default resolution, you can manually set the resolution to make text and objects appear larger on your...
Read more >
How to Fix Windows 10 Display Size and Resolution Issues
If your screen's native resolution as per its manual or official specs on its website is different from the recommended setting in Windows, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found