Closed robweber closed 3 years ago
Looks like this is a case where an underscore can make all the difference. For the 3.7in model there is a filter to use different functions, including the correct init()
and display()
methods you're having trouble with. Unfortunately it looks like the parent class is setting the device name improperly. Most likely an artifact of refactoring at some point.
If you get a chance please re-install the library and give it another run (version will be 0.2.2beta1). I think it might really be that simple of a fix.
And then fire off the test util?
Aaron
On Mon, May 3, 2021 at 4:35 PM Rob @.***> wrote:
If you get a chance please re-install the library and give it another run. I think it might really be that simple of a fix.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/robweber/omni-epd/issues/18#issuecomment-831517389, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATTPCDI6CMUAEUFTVPQF5DLTL4CKDANCNFSM44BOQ4SA .
I would have thought it would pull in the new version with that command but guess not. Try this:
sudo pip3 uninstall omni-epd
sudo pip3 install git+https://github.com/robweber/omni-epd.git#egg=omni-epd
That should pull it all back in from source again. Then run the test again, hopefully with better results!
https://photos.app.goo.gl/nSNvZF11kJfY3jkp6
So. Close!
It does not appear to be clearing the screen but I am 100% seeing the rectangles and able to load my custom image.
Aaron
On Mon, May 3, 2021 at 6:00 PM Rob @.***> wrote:
I would have thought it would pull in the new version with that command but guess not. Try this:
sudo pip3 uninstall omni-epd
sudo pip3 install git+https://github.com/robweber/omni-epd.git#egg=omni-epd
That should pull it all back in from source again. Then run the test again, hopefully with better results!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/robweber/omni-epd/issues/18#issuecomment-831562289, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATTPCDPVEQU7GEEZ7XVV2PTTL4MIVANCNFSM44BOQ4SA .
For what it's worth, the waveshare demo is clearing the screen without issue.
On Mon, May 3, 2021 at 6:00 PM Rob @.***> wrote:
I would have thought it would pull in the new version with that command but guess not. Try this:
sudo pip3 uninstall omni-epd
sudo pip3 install git+https://github.com/robweber/omni-epd.git#egg=omni-epd
That should pull it all back in from source again. Then run the test again, hopefully with better results!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/robweber/omni-epd/issues/18#issuecomment-831562289, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATTPCDPVEQU7GEEZ7XVV2PTTL4MIVANCNFSM44BOQ4SA .
The images helped illustrate, thanks! I compared the example code in the Waveshare repo to what we implemented here. This particular display is an oddity compared to the rest. It appears to a need manual clear prior to setting a new image. Others just do this as part of the draw function.
I'll implement something based on the example code. Stay tuned for an update.
I created a new branch with some fixes. Try installing the new branch (uninstall original again with pip3 uninstall
) using this:
sudo pip3 install git+https://github.com/robweber/omni-epd.git@waveshare3in7_fixes#egg=omni-epd
That should specify the branch when installing so you get the new changes.
Sadly, no change. The screen is 100% not clearing. I regret this display . . . it's the right size for the Pi . . but the driver seems less than useful.
There isn't much output when things run . . is there another log level I can enable to provide more info?
On Tue, May 4, 2021 at 8:31 PM Rob @.***> wrote:
I created a new branch https://github.com/robweber/omni-epd/tree/waveshare3in7_fixeswith some fixes. Try installing the new branch (uninstall original again with pip3 uninstall) using this:
sudo pip3 install @.***_fixes#egg=omni-epd
That should specify the branch when installing so you get the new changes.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/robweber/omni-epd/issues/18#issuecomment-832341850, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATTPCDOCKOKCXYPQQPERZ23TMCGVLANCNFSM44BOQ4SA .
Can I have a little more information on the commands you are running to get the images? Especially between examples 1 and 2 trying to figure out what is happening. Looking at the supplied photos again:
omni-epd-test
runIn regards to the difference between 3 and 4. By default omni-epd uses b/w only, although this display is capable of 4 color grayscale. You can change the mode to 4 color by using a custom INI file with the mode
tag. That might make examples 3 and 4 look more similar.
1: Yes. omni-epd-test -e waveshare_epd.epd3in7 2: While the test above was present on the display, I used the image parameter with my image 3: Cleared the screen (using the WS demo) ran the omni image test 4: I modified their demo with my image. (which I could send if you needed that to test with)
I'll retest with the mode tag when I have a sec. Thanks.
On Wed, May 5, 2021 at 10:44 AM Rob @.***> wrote:
Can I have a little more information on the commands you are running to get the images? Especially between examples 1 and 2 trying to figure out what is happening. Looking at the supplied photos again:
- This looks like the regular omni-epd-test run
- This one still has the rectangles - did you run this right after the test? If so what command did this image?
- The comments on this say "omni-epd", guessing the test utility but with the image parameter?
- Waveshare native - did you write something to load the image or modify one of their examples?
In regards to the difference between 3 and 4. By default omni-epd uses b/w only, although this display is capable of 4 color grayscale. You can change the mode to 4 color https://github.com/robweber/omni-epd#advanced-epd-control by using a custom INI file with the mode tag. That might make examples 3 and 4 look more similar.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/robweber/omni-epd/issues/18#issuecomment-832746828, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATTPCDIFX4BZOGCK2YKCPCDTMFKWDANCNFSM44BOQ4SA .
@ZubaZ21 and I have been having the same fight with the 3in7 display over on my epaper display project.
Conclusion: the 3in7 display driver from waveshare is a HOT MESS.
@ZubaZ21 - I've finished going through all the different modules and adjusting for any issues. Before publishing this version I'd like confirmation things are working as expected, if possible. If you have some time and can test the 3in7 fixes branch it has all the new code plus the additional clear()
call prior to writing an image. Be sure to uninstall any old versions prior to trying this one.
sudo pip3 install git+https://github.com/robweber/omni-epd.git@waveshare3in7_fixes#egg=omni-epd
:(
On Fri, May 14, 2021 at 3:01 PM Rob @.***> wrote:
@ZubaZ21 https://github.com/ZubaZ21 - I've finished going through all the different modules and adjusting for any issues. Before publishing this version I'd like confirmation things are working as expected, if possible. If you have some time and can test the 3in7 fixes branch it has all the new code plus the additional clear() call prior to writing an image. Be sure to uninstall any old versions prior to trying this one.
sudo pip3 install @.***_fixes#egg=omni-epd
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/robweber/omni-epd/issues/18#issuecomment-841440940, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATTPCDKYTU5JDQ7DUVDLUCTTNVXPLANCNFSM44BOQ4SA .
Weird. Wonder what's so different between the demo and what we're doing here with the clear()
call? The commands are the same and in the same order. I might just buy one of these 3.7in displays as it's vexxing it works so differently.
@robweber I thought the same thing, but couldn't find one at a reputable source for a reasonable price in my area.
Just to keep an update on this I did end up ordering a 3.7in screen. It's currently "in transit". I wanted to make an EPD project for a friend anyway so hopefully can get some hands on experience with this display to close out this issue as well. Stay tuned.
Finally got my 3.7 display in the mail. Just doing some testing I can definitely reproduce this issue. One odd thing is that when using the "gray4" mode everything works fine. Both image updates and clear()
function as expected. When in "1gray" (bw) mode you get the previous image artifacts and the clear()
function does absolutely nothing that I can tell. Looking at the example code from waveshare I'm wondering if when in 1gray mode it's only doing partial updates of the changed pixels and not clearing the image for a full redraw.
I'll play with this some more but the solution might just be as simple as only allowing the gray4 mode for this display.
Yay!
I look forward to magic happening.
From @ZubaZ21
I love the idea of abstracting this. Very cool.
Pulled it down and ran the test util. It threw an error. File "/usr/local/lib/python3.7/dist-packages/omni_epd/displays/waveshare_display.py", line 251, in prepare self._device.init() TypeError: init() missing 1 required positional argument: 'mode'
I added a 0 so it became self._device.init(0) as that is what the waveshare driver requested.
Fired it off again and got the following.
pi@GeneralPie:~ $ omni-epd-test -e waveshare_epd.epd3in7
Loaded waveshare_epd.epd3in7 with width 280 and height 480 Drawing rectangle of width 210.0 and height 360.0 Drawing rectangle of width 105.0 and height 180.0 Drawing rectangle of width 26.25 and height 45.0 Traceback (most recent call last): File "/usr/local/bin/omni-epd-test", line 10, in
sys.exit(main())
File "/usr/local/lib/python3.7/dist-packages/omni_epd/test_utility.py",
line 127, in main
test.draw()
File "/usr/local/lib/python3.7/dist-packages/omni_epd/test_utility.py",
line 85, in draw
self.draw_on_display(im)
File "/usr/local/lib/python3.7/dist-packages/omni_epd/test_utility.py",
line 67, in draw_on_display
self.epd.display(image)
File "/usr/local/lib/python3.7/dist-packages/omni_epd/virtualepd.py",
line 202, in display
self._display(self.__applyConfig(image))
File
"/usr/local/lib/python3.7/dist-packages/omni_epd/displays/waveshare_display.py",
line 263, in _display
self._device.display(self._device.getbuffer(image))
AttributeError: 'EPD' object has no attribute 'display'
Let me know if you need further testing.
Aaron