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

EPD2in13v4 and moving in line with waveshare reccommendations #126

Open
BOTButtcheeks opened this issue Jan 17, 2024 · 6 comments
Open

EPD2in13v4 and moving in line with waveshare reccommendations #126

BOTButtcheeks opened this issue Jan 17, 2024 · 6 comments

Comments

@BOTButtcheeks
Copy link

Hi,

Excellent work on originally maintaining this large and pivotal project
I have been staring at the driver code and the code in general for half the day motivated by needing to make this work.

Unfortunately it appears, as waveshare has started embedding the waveforms in the ic, the driver code for EPD2in13V3 and EPD2in13V4 has significantly changed typical structure from what I can see. I might be wrong but EPD2in13V4's waveshare driver is very different from V1 and V2 and might need extra work in either writing new drivers, or even creating a wrapper for waveshare's driver

(I'll also ruin the tunnel vision of the people reading this that there is an open issue about display safety, sleep and full refresh intervals that really needs attending to)

I know the original maintainer is busy, and this isn't a request for them to look specifically but more for new maintainers. If you are reading this and are proficient at python I encourage you to assist in this project. It really is a gamechanger in terms of FOSS systems.

(Unfortunately while I can read the code to a degree after hours of determination, I do not think I have the time to suddenly become proficient at programmer mindset and do the work. Maybe one day.)

@MykeHalk
Copy link

Try Tomfullylove's fork https://github.com/tomfullylove/papertty

@mcarr823
Copy link
Collaborator

I've just submitted a PR for the EPD2in13V4: #127

It hasn't been merged, but in the meantime you could try running that branch yourself: https://github.com/mcarr823/PaperTTY/tree/epd2in13v4

@MykeHalk
Copy link

@mcarr823 Finally, thank you.

@hunter-meloche
Copy link

@mcarr823 I'm trying to run your branch, but I'm getting an error. Should I be using a Python version older than 3.9? Any help would be appreciated.

poetry run papertty --driver EPD2in13v4 terminal

gpiozero found - using that instead of RPi.GPIO
Loading PIL font /home/user/PaperTTY/papertty/resources/tom-thumb.pil. Font size is ignored.
Started displaying /dev/vcsa1, minimum update interval 0.1 s, exit with Ctrl-C
Font /home/user/PaperTTY/papertty/resources/tom-thumb.pbm doesn't support Unicode. Falling back to 8-bit encoding.
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/root/.cache/pypoetry/virtualenvs/papertty-ah46anYm-py3.9/lib/python3.9/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/root/.cache/pypoetry/virtualenvs/papertty-ah46anYm-py3.9/lib/python3.9/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/root/.cache/pypoetry/virtualenvs/papertty-ah46anYm-py3.9/lib/python3.9/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/root/.cache/pypoetry/virtualenvs/papertty-ah46anYm-py3.9/lib/python3.9/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/root/.cache/pypoetry/virtualenvs/papertty-ah46anYm-py3.9/lib/python3.9/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/root/.cache/pypoetry/virtualenvs/papertty-ah46anYm-py3.9/lib/python3.9/site-packages/click/decorators.py", line 33, in new_func
    return f(get_current_context().obj, *args, **kwargs)
  File "/home/user/PaperTTY/papertty/papertty.py", line 1495, in terminal
    oldimage = ptty.showtext(buff, fill=ptty.black, cursor=cursor if not nocursor else None,
  File "/home/user/PaperTTY/papertty/papertty.py", line 413, in showtext
    return self.partialdraw_showtext(text=text, fill=fill, cursor=cursor, portrait=portrait, flipx=flipx, flipy=flipy, oldimage=oldimage, oldtext=oldtext, oldcursor=oldcursor)
  File "/home/user/PaperTTY/papertty/papertty.py", line 494, in partialdraw_showtext
    changedLines = self.partialdraw_get_changed_lines(cursor, oldcursor, oldlines, newlines)
  File "/home/user/PaperTTY/papertty/papertty.py", line 602, in partialdraw_get_changed_lines
    for i in range(self.rows):
TypeError: 'NoneType' object cannot be interpreted as an integer

@hunter-meloche
Copy link

Ah I figured it out. I think I just needed --autofit at the end of my command.

sudo poetry run papertty --driver EPD2in13v4 terminal --autofit

@mcarr823
Copy link
Collaborator

@hunter-meloche Sorry for the delayed response. Yeah, you either need to supply --autofit or --rows and --cols so that PaperTTY knows how big to make the terminal area.

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

No branches or pull requests

4 participants