PiSupply / PaPiRus

Resources for PaPiRus ePaper eInk displays
https://www.pi-supply.com/product/papirus-epaper-eink-screen-hat-for-raspberry-pi/
Other
346 stars 88 forks source link

[feature request] add partial update flag to cli papirus-write #153

Closed mikegleasonjr closed 6 years ago

mikegleasonjr commented 6 years ago

And papirus-draw!

shawaj commented 6 years ago

@mikegleasonjr what exactly is the use case for this? how would you want it to work?

mikegleasonjr commented 6 years ago

If I understand the device correctly, the library always write a full image to the device right? Even if you write text, it is converted as an image and sent to the device.

I already have a program that generates images. Like pipes on Linux, instead of writing a program that links the library, I would just produce the images on my end and use the existing cli to send them to the device.

shawaj commented 6 years ago

but what are you meaning with the partial updates? as you can already do that?

mikegleasonjr commented 6 years ago

If I use the library directly. I can do it. I just want the CLIs to support it.

I want to periodically do (oversimplified)...

./papirus-draw my-image-1.bmp
sleep(5)
./papirus-draw --partial my-image-2.bmp
sleep(5)
./papirus-draw --partial my-image-3.bmp
sleep(5)
./papirus-draw --partial my-image-4.bmp
[...]
shawaj commented 6 years ago

@francesco-vannini @tvoverbeek any thoughts on this?

tvoverbeek commented 6 years ago

If I look at @mikegleasonjr 's example above then I suggest to look at papirus-animation which @francesco-vannini added today. It does what what @mikegleasonjr wants with a single call to papirus-animation: 'papirus-animation --delay 5 my-image-1.bmp' Works best when the .bmp already are monochrome, so dithering is a no-op. When color/grayscale pictures are dithered, partial update does not work very well (lots of ghosting).

shawaj commented 6 years ago

I think the idea though was to have a --partial tag on the standard papirus-draw and papirus-text command line tools, in order to force partial updates for them.

I had a feeling we already had this in some way or another due to work from @BenScarb ? Might be wrong though!

mikegleasonjr commented 6 years ago

@tvoverbeek wow this is great, I could use that.

(I don't know how to say it in Unix terms, named pipes or sockets but) I could even use a single file descriptor opened by one of my program, each read by papirus-animation on this file would make my program write an updated version of an image. Since papirus-animation works in loops, this would work.

@francesco-vannini talk about timing!

Thanks @shawaj for raising the discussion.

shawaj commented 6 years ago

@mikegleasonjr no worries, glad you are all sorted! @francesco-vannini and @tvoverbeek are the gurus here in terms of working with PaPiRus!

francesco-vannini commented 6 years ago

Glad it works out for you @mikegleasonjr , yeah the timing is quite scary ;)

mikegleasonjr commented 6 years ago

@shawaj @tvoverbeek @francesco-vannini

Here are some rendering of my program:

test032

test100

test127

Will be publishing on github once I receive my Pi and my screen.

I was able to develop it without hardware because...

That's it

shawaj commented 6 years ago

Looks really cool. Definitely upload the code.

Are you going to add it to this main repo as am example?

mikegleasonjr commented 6 years ago

@shawaj I wrote it in Go so I guess I would put it on my repo and if you guys like it you could link it. If you guys want it here I can also donate it here. Let me receive my Pi and test on it first :D

shawaj commented 6 years ago

Yeah great, stick it in your repo and we will link to it!

On 18 Sep 2017 19:39, "Mike Gleason jr Couturier" notifications@github.com wrote:

@shawaj https://github.com/shawaj I wrote it in Go so I guess I would put it on my repo and if you guys like it you could link it. If you guys want it here I can also donate it here. Let me receive my Pi and test on it first :D

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/PiSupply/PaPiRus/issues/153#issuecomment-330317298, or mute the thread https://github.com/notifications/unsubscribe-auth/ADNCusTbvyEhc1fZsTUBqWhYzshVQKvmks5sjrjRgaJpZM4PYbzv .